EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4TpcDirectLaser Class Reference

#include <fun4all_coresoftware/blob/master/simulation/g4simulation/g4tpc/PHG4TpcDirectLaser.h>

+ Inheritance diagram for PHG4TpcDirectLaser:
+ Collaboration diagram for PHG4TpcDirectLaser:

Classes

class  Laser
 stores laser position and direction along z More...
 

Public Member Functions

 PHG4TpcDirectLaser (const std::string &name="PHG4TpcDirectLaser")
 constructor
 
 ~PHG4TpcDirectLaser () override=default
 destructor
 
int InitRun (PHCompositeNode *) override
 run initialization
 
int process_event (PHCompositeNode *) override
 per event processing
 
void SetDefaultParameters () override
 default parameters
 
void Detector (const std::string &d)
 detector name
 
void SetPhiStepping (int n, double min, double max)
 define steps along phi
 
void SetThetaStepping (int n, double min, double max)
 define steps along theta
 
int GetNpatternSteps () const
 get total number of steps
 
void SetCurrentPatternStep (int value)
 set current patter step
 
void SetDirectLaserAuto (bool value)
 advance automatically through patterns
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int End (PHCompositeNode *)
 Called at the end of all processing.
 
virtual int EndRun (const int)
 Called at the end of each run.
 
virtual int Init (PHCompositeNode *)
 
virtual int Reset (PHCompositeNode *)
 Reset.
 
virtual int ResetEvent (PHCompositeNode *)
 Clean up after each event.
 
void Print (const std::string &="ALL") const override
 
- Public Member Functions inherited from Fun4AllBase
virtual ~Fun4AllBase ()
 
virtual const std::string Name () const
 Returns the name of this module.
 
virtual void Name (const std::string &name)
 Sets the name of this module.
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual void Verbosity (enu_Verbosity ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual int Verbosity () const
 Gets the verbosity of this module.
 
- Public Member Functions inherited from PHParameterInterface
 PHParameterInterface (const std::string &name)
 
 PHParameterInterface (const PHParameterInterface &)=delete
 
virtual ~PHParameterInterface ()
 
void set_paramname (const std::string &name)
 
void set_double_param (const std::string &name, const double dval)
 
double get_double_param (const std::string &name) const
 
void set_int_param (const std::string &name, const int ival)
 
int get_int_param (const std::string &name) const
 
void set_string_param (const std::string &name, const std::string &sval)
 
std::string get_string_param (const std::string &name) const
 
void UpdateParametersWithMacro ()
 
void SaveToNodeTree (PHCompositeNode *runNode, const std::string &nodename)
 
void PutOnParNode (PHCompositeNode *parNode, const std::string &nodename)
 

Private Member Functions

void SetupLasers ()
 define lasers
 
void AimToThetaPhi (double theta, double phi)
 aim lasers to a given theta and phi angle
 
void AimToPatternStep (int n)
 aim lasers to a give step
 
void AimToNextPatternStep ()
 aim to next step
 
void AppendLaserTrack (double theta, double phi, const Laser &)
 append track in given angular direction and for a given laser
 

Private Attributes

std::string detector = "TPC"
 detector name
 
std::string hitnodename
 g4hitnode name
 
std::vector< Laserm_lasers
 lasers
 
int electrons_per_cm = 300
 number of electrons deposited per cm laser track
 
double electrons_per_gev = NAN
 
int currentPatternStep = 0
 
bool m_autoAdvanceDirectLaser = false
 set to true to change direct laser tracks from one event to the other
 
PHG4HitContainerm_g4hitcontainer = nullptr
 g4hit container
 
PHG4TruthInfoContainerm_g4truthinfo = nullptr
 truth information
 
std::string m_track_map_name = "SvtxTrackMap"
 track map, used to store track parameters
 
SvtxTrackMapm_track_map = nullptr
 
default phi and theta steps
int nPhiSteps = 1
 
int nThetaSteps = 1
 
int nTotalSteps = 1
 
double minPhi = 0
 
double maxPhi = 0
 
double minTheta = 0
 
double maxTheta = 0
 

Additional Inherited Members

- Public Types inherited from Fun4AllBase
enum  enu_Verbosity {
  VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3,
  VERBOSITY_A_LOT = 4, VERBOSITY_MAX = INT_MAX - 10
}
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 
- Protected Member Functions inherited from PHParameterInterface
void set_default_double_param (const std::string &name, const double dval)
 
void set_default_int_param (const std::string &name, const int ival)
 
void set_default_string_param (const std::string &name, const std::string &sval)
 
void InitializeParameters ()
 

Detailed Description

Definition at line 19 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 19 of file PHG4TpcDirectLaser.h

Constructor & Destructor Documentation

PHG4TpcDirectLaser::PHG4TpcDirectLaser ( const std::string &  name = "PHG4TpcDirectLaser")

constructor

Definition at line 169 of file PHG4TpcDirectLaser.cc.

View newest version in sPHENIX GitHub at line 169 of file PHG4TpcDirectLaser.cc

References PHParameterInterface::InitializeParameters().

+ Here is the call graph for this function:

PHG4TpcDirectLaser::~PHG4TpcDirectLaser ( )
overridedefault

destructor

Member Function Documentation

void PHG4TpcDirectLaser::AimToNextPatternStep ( )
private

aim to next step

Definition at line 373 of file PHG4TpcDirectLaser.cc.

View newest version in sPHENIX GitHub at line 373 of file PHG4TpcDirectLaser.cc

References AimToPatternStep(), currentPatternStep, and nTotalSteps.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4TpcDirectLaser::AimToPatternStep ( int  n)
private

aim lasers to a give step

Definition at line 398 of file PHG4TpcDirectLaser.cc.

View newest version in sPHENIX GitHub at line 398 of file PHG4TpcDirectLaser.cc

References AimToThetaPhi(), currentPatternStep, maxPhi, maxTheta, minPhi, minTheta, n, nPhiSteps, nThetaSteps, nTotalSteps, phi, theta(), and Fun4AllBase::Verbosity().

Referenced by AimToNextPatternStep().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4TpcDirectLaser::AimToThetaPhi ( double  theta,
double  phi 
)
private

aim lasers to a given theta and phi angle

Definition at line 383 of file PHG4TpcDirectLaser.cc.

View newest version in sPHENIX GitHub at line 383 of file PHG4TpcDirectLaser.cc

References AppendLaserTrack(), m_lasers, and Fun4AllBase::Verbosity().

Referenced by AimToPatternStep(), and process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4TpcDirectLaser::AppendLaserTrack ( double  theta,
double  phi,
const Laser laser 
)
private

append track in given angular direction and for a given laser

Definition at line 426 of file PHG4TpcDirectLaser.cc.

View newest version in sPHENIX GitHub at line 426 of file PHG4TpcDirectLaser.cc

References PHG4HitContainer::AddHit(), PHG4TruthInfoContainer::AddParticle(), PHG4TruthInfoContainer::AddVertex(), Acts::UnitConstants::cm, Acts::Test::delta, electrons_per_cm, electrons_per_gev, SvtxTrackMap::insert(), PHG4TpcDirectLaser::Laser::m_direction, m_g4hitcontainer, m_g4truthinfo, PHG4TpcDirectLaser::Laser::m_phi, PHG4TpcDirectLaser::Laser::m_position, m_track_map, PHG4TruthInfoContainer::maxtrkindex(), PHG4TruthInfoContainer::maxvtxindex(), particle, PHWHERE, pos(), SvtxTrack_v2::set_px(), SvtxTrack_v2::set_py(), SvtxTrack_v2::set_pz(), SvtxTrack_v2::set_x(), SvtxTrack_v2::set_y(), SvtxTrack_v2::set_z(), start(), Acts::Test::step(), and Fun4AllBase::Verbosity().

Referenced by AimToThetaPhi().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4TpcDirectLaser::Detector ( const std::string &  d)
inline

detector name

Definition at line 38 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 38 of file PHG4TpcDirectLaser.h

References d, and detector.

int PHG4TpcDirectLaser::GetNpatternSteps ( ) const
inline

get total number of steps

Definition at line 50 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 50 of file PHG4TpcDirectLaser.h

References nPhiSteps, and nThetaSteps.

int PHG4TpcDirectLaser::InitRun ( PHCompositeNode topNode)
overridevirtual
int PHG4TpcDirectLaser::process_event ( PHCompositeNode topNode)
overridevirtual

per event processing

Reimplemented from SubsysReco.

Definition at line 251 of file PHG4TpcDirectLaser.cc.

View newest version in sPHENIX GitHub at line 251 of file PHG4TpcDirectLaser.cc

References AimToNextPatternStep(), AimToThetaPhi(), Fun4AllReturnCodes::EVENT_OK, hitnodename, m_autoAdvanceDirectLaser, m_g4hitcontainer, m_g4truthinfo, M_PI, m_track_map, and m_track_map_name.

+ Here is the call graph for this function:

void PHG4TpcDirectLaser::SetCurrentPatternStep ( int  value)
inline

set current patter step

Definition at line 56 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 56 of file PHG4TpcDirectLaser.h

References currentPatternStep, and value.

void PHG4TpcDirectLaser::SetDefaultParameters ( )
overridevirtual

default parameters

Implements PHParameterInterface.

Definition at line 279 of file PHG4TpcDirectLaser.cc.

View newest version in sPHENIX GitHub at line 279 of file PHG4TpcDirectLaser.cc

References PHParameterInterface::set_default_double_param(), and PHParameterInterface::set_default_int_param().

+ Here is the call graph for this function:

void PHG4TpcDirectLaser::SetDirectLaserAuto ( bool  value)
inline

advance automatically through patterns

Definition at line 62 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 62 of file PHG4TpcDirectLaser.h

References m_autoAdvanceDirectLaser, and value.

void PHG4TpcDirectLaser::SetPhiStepping ( int  n,
double  min,
double  max 
)

define steps along phi

Definition at line 303 of file PHG4TpcDirectLaser.cc.

View newest version in sPHENIX GitHub at line 303 of file PHG4TpcDirectLaser.cc

References max, maxPhi, min, minPhi, n, nPhiSteps, nThetaSteps, nTotalSteps, and PHWHERE.

void PHG4TpcDirectLaser::SetThetaStepping ( int  n,
double  min,
double  max 
)

define steps along theta

Definition at line 317 of file PHG4TpcDirectLaser.cc.

View newest version in sPHENIX GitHub at line 317 of file PHG4TpcDirectLaser.cc

References max, maxTheta, min, minTheta, n, nPhiSteps, nThetaSteps, nTotalSteps, and PHWHERE.

void PHG4TpcDirectLaser::SetupLasers ( )
private

define lasers

Definition at line 333 of file PHG4TpcDirectLaser.cc.

View newest version in sPHENIX GitHub at line 333 of file PHG4TpcDirectLaser.cc

References PHG4TpcDirectLaser::Laser::m_direction, m_lasers, PHG4TpcDirectLaser::Laser::m_phi, M_PI, and PHG4TpcDirectLaser::Laser::m_position.

Referenced by InitRun().

+ Here is the caller graph for this function:

Member Data Documentation

int PHG4TpcDirectLaser::currentPatternStep = 0
private

Definition at line 130 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 130 of file PHG4TpcDirectLaser.h

Referenced by AimToNextPatternStep(), AimToPatternStep(), and SetCurrentPatternStep().

std::string PHG4TpcDirectLaser::detector = "TPC"
private

detector name

Definition at line 99 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 99 of file PHG4TpcDirectLaser.h

Referenced by Detector(), and InitRun().

int PHG4TpcDirectLaser::electrons_per_cm = 300
private

number of electrons deposited per cm laser track

Definition at line 108 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 108 of file PHG4TpcDirectLaser.h

Referenced by AppendLaserTrack(), and InitRun().

double PHG4TpcDirectLaser::electrons_per_gev = NAN
private

it is used to convert a given number of electrons into an energy as expected by G4Hit. The energy is then converted back to a number of electrons inside PHG4TpcElectronDrift

Definition at line 116 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 116 of file PHG4TpcDirectLaser.h

Referenced by AppendLaserTrack(), and InitRun().

std::string PHG4TpcDirectLaser::hitnodename
private

g4hitnode name

Definition at line 102 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 102 of file PHG4TpcDirectLaser.h

Referenced by InitRun(), and process_event().

bool PHG4TpcDirectLaser::m_autoAdvanceDirectLaser = false
private

set to true to change direct laser tracks from one event to the other

Definition at line 133 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 133 of file PHG4TpcDirectLaser.h

Referenced by InitRun(), process_event(), and SetDirectLaserAuto().

PHG4HitContainer* PHG4TpcDirectLaser::m_g4hitcontainer = nullptr
private

g4hit container

Definition at line 136 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 136 of file PHG4TpcDirectLaser.h

Referenced by AppendLaserTrack(), and process_event().

PHG4TruthInfoContainer* PHG4TpcDirectLaser::m_g4truthinfo = nullptr
private

truth information

Definition at line 139 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 139 of file PHG4TpcDirectLaser.h

Referenced by AppendLaserTrack(), InitRun(), and process_event().

std::vector<Laser> PHG4TpcDirectLaser::m_lasers
private

lasers

Definition at line 105 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 105 of file PHG4TpcDirectLaser.h

Referenced by AimToThetaPhi(), and SetupLasers().

SvtxTrackMap* PHG4TpcDirectLaser::m_track_map = nullptr
private

Definition at line 143 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 143 of file PHG4TpcDirectLaser.h

Referenced by AppendLaserTrack(), InitRun(), and process_event().

std::string PHG4TpcDirectLaser::m_track_map_name = "SvtxTrackMap"
private

track map, used to store track parameters

Definition at line 142 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 142 of file PHG4TpcDirectLaser.h

Referenced by InitRun(), and process_event().

double PHG4TpcDirectLaser::maxPhi = 0
private

Definition at line 124 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 124 of file PHG4TpcDirectLaser.h

Referenced by AimToPatternStep(), InitRun(), and SetPhiStepping().

double PHG4TpcDirectLaser::maxTheta = 0
private

Definition at line 126 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 126 of file PHG4TpcDirectLaser.h

Referenced by AimToPatternStep(), InitRun(), and SetThetaStepping().

double PHG4TpcDirectLaser::minPhi = 0
private

Definition at line 123 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 123 of file PHG4TpcDirectLaser.h

Referenced by AimToPatternStep(), InitRun(), and SetPhiStepping().

double PHG4TpcDirectLaser::minTheta = 0
private

Definition at line 125 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 125 of file PHG4TpcDirectLaser.h

Referenced by AimToPatternStep(), InitRun(), and SetThetaStepping().

int PHG4TpcDirectLaser::nPhiSteps = 1
private

Definition at line 120 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 120 of file PHG4TpcDirectLaser.h

Referenced by AimToPatternStep(), GetNpatternSteps(), InitRun(), SetPhiStepping(), and SetThetaStepping().

int PHG4TpcDirectLaser::nThetaSteps = 1
private

Definition at line 121 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 121 of file PHG4TpcDirectLaser.h

Referenced by AimToPatternStep(), GetNpatternSteps(), InitRun(), SetPhiStepping(), and SetThetaStepping().

int PHG4TpcDirectLaser::nTotalSteps = 1
private

Definition at line 122 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 122 of file PHG4TpcDirectLaser.h

Referenced by AimToNextPatternStep(), AimToPatternStep(), InitRun(), SetPhiStepping(), and SetThetaStepping().


The documentation for this class was generated from the following files: