Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4TpcDirectLaser Class Reference

#include <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
 
void SetFileStepping (int n)
 define steps for file
 
int GetNpatternSteps () const
 get total number of steps
 
void SetCurrentPatternStep (int value)
 set current patter step
 
void SetDirectLaserAuto (bool value)
 advance automatically through patterns
 
void SetDirectLaserPatternfromFile (bool value)
 advance automatically through pattern from file
 
void SetArbitraryThetaPhi (double theta, double phi)
 
- 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
 
PHParameterInterfaceoperator= (PHParameterInterface const &)=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)
 
void Print () const
 

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 AimToPatternStep_File (int n)
 aim lasers to a give step from file
 
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

float theta_p
 
float phi_p
 
TNtuple * pattern = nullptr
 
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
 
double arbitrary_theta = -30.0
 
double arbitrary_phi = -30.0
 
int currentPatternStep = 0
 
bool m_autoAdvanceDirectLaser = false
 set to true to change direct laser tracks from one event to the other
 
bool m_steppingpattern = false
 set to true to get stepping patern from file
 
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 = std::numeric_limits<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 20 of file PHG4TpcDirectLaser.h.

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

Constructor & Destructor Documentation

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

constructor

Definition at line 171 of file PHG4TpcDirectLaser.cc.

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

References PHParameterInterface::InitializeParameters(), phi_p, and theta_p.

+ 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 419 of file PHG4TpcDirectLaser.cc.

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

References AimToPatternStep(), AimToPatternStep_File(), currentPatternStep, m_steppingpattern, 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 452 of file PHG4TpcDirectLaser.cc.

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

References AimToThetaPhi(), currentPatternStep, maxPhi, maxTheta, minPhi, minTheta, n, nPhiSteps, nThetaSteps, nTotalSteps, ActsTests::PropagationDatasets::phi, ActsTests::PropagationDatasets::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::AimToPatternStep_File ( int  n)
private

aim lasers to a give step from file

Definition at line 481 of file PHG4TpcDirectLaser.cc.

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

References AimToThetaPhi(), currentPatternStep, n, nTotalSteps, pattern, ActsTests::PropagationDatasets::phi, phi_p, ActsTests::PropagationDatasets::theta, theta_p, 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 437 of file PHG4TpcDirectLaser.cc.

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

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

Referenced by AimToPatternStep(), AimToPatternStep_File(), 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 514 of file PHG4TpcDirectLaser.cc.

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

References PHG4HitContainer::AddHit(), PHG4TruthInfoContainer::AddParticle(), PHG4TruthInfoContainer::AddVertex(), Acts::UnitConstants::cm, physmon_vertexing::delta, electrons_per_cm, electrons_per_gev, end, i, 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, Acts::Test::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, 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 39 of file PHG4TpcDirectLaser.h.

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

int PHG4TpcDirectLaser::GetNpatternSteps ( ) const
inline

get total number of steps

Definition at line 55 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 55 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 271 of file PHG4TpcDirectLaser.cc.

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

References AimToNextPatternStep(), AimToThetaPhi(), arbitrary_phi, arbitrary_theta, assert, Fun4AllReturnCodes::EVENT_OK, hitnodename, m_autoAdvanceDirectLaser, m_g4hitcontainer, m_g4truthinfo, m_steppingpattern, m_track_map, and m_track_map_name.

+ Here is the call graph for this function:

void PHG4TpcDirectLaser::SetArbitraryThetaPhi ( double  theta,
double  phi 
)
inline

Definition at line 78 of file PHG4TpcDirectLaser.h.

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

References arbitrary_phi, arbitrary_theta, ActsTests::PropagationDatasets::phi, and ActsTests::PropagationDatasets::theta.

void PHG4TpcDirectLaser::SetCurrentPatternStep ( int  value)
inline

set current patter step

Definition at line 61 of file PHG4TpcDirectLaser.h.

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

References currentPatternStep, and value.

void PHG4TpcDirectLaser::SetDefaultParameters ( )
overridevirtual

default parameters

Implements PHParameterInterface.

Definition at line 307 of file PHG4TpcDirectLaser.cc.

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

References CF4_dEdx, CF4_NTotal, Ne_dEdx, Ne_NTotal, 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 67 of file PHG4TpcDirectLaser.h.

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

References m_autoAdvanceDirectLaser, and value.

void PHG4TpcDirectLaser::SetDirectLaserPatternfromFile ( bool  value)
inline

advance automatically through pattern from file

Definition at line 73 of file PHG4TpcDirectLaser.h.

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

References m_steppingpattern, and value.

void PHG4TpcDirectLaser::SetFileStepping ( int  n)

define steps for file

Definition at line 361 of file PHG4TpcDirectLaser.cc.

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

References n, nTotalSteps, and PHWHERE.

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

define steps along phi

Definition at line 331 of file PHG4TpcDirectLaser.cc.

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

References maxPhi, Acts::UnitConstants::min, minPhi, n, nPhiSteps, nThetaSteps, nTotalSteps, and PHWHERE.

Referenced by TPC_Cells().

+ Here is the caller graph for this function:

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

define steps along theta

Definition at line 345 of file PHG4TpcDirectLaser.cc.

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

References maxTheta, Acts::UnitConstants::min, minTheta, n, nPhiSteps, nThetaSteps, nTotalSteps, and PHWHERE.

void PHG4TpcDirectLaser::SetupLasers ( )
private

define lasers

Definition at line 375 of file PHG4TpcDirectLaser.cc.

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

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

Referenced by InitRun().

+ Here is the caller graph for this function:

Member Data Documentation

double PHG4TpcDirectLaser::arbitrary_phi = -30.0
private

Definition at line 142 of file PHG4TpcDirectLaser.h.

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

Referenced by process_event(), and SetArbitraryThetaPhi().

double PHG4TpcDirectLaser::arbitrary_theta = -30.0
private

Definition at line 141 of file PHG4TpcDirectLaser.h.

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

Referenced by process_event(), and SetArbitraryThetaPhi().

int PHG4TpcDirectLaser::currentPatternStep = 0
private

Definition at line 156 of file PHG4TpcDirectLaser.h.

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

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

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

detector name

Definition at line 122 of file PHG4TpcDirectLaser.h.

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

Referenced by InitRun().

int PHG4TpcDirectLaser::electrons_per_cm = 300
private

number of electrons deposited per cm laser track

Definition at line 131 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 131 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 139 of file PHG4TpcDirectLaser.h.

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

Referenced by AppendLaserTrack(), and InitRun().

std::string PHG4TpcDirectLaser::hitnodename
private

g4hitnode name

Definition at line 125 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 125 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 159 of file PHG4TpcDirectLaser.h.

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

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

PHG4HitContainer* PHG4TpcDirectLaser::m_g4hitcontainer = nullptr
private

g4hit container

Definition at line 166 of file PHG4TpcDirectLaser.h.

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

Referenced by AppendLaserTrack(), and process_event().

PHG4TruthInfoContainer* PHG4TpcDirectLaser::m_g4truthinfo = nullptr
private

truth information

Definition at line 169 of file PHG4TpcDirectLaser.h.

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

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

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

lasers

Definition at line 128 of file PHG4TpcDirectLaser.h.

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

Referenced by AimToThetaPhi(), and SetupLasers().

bool PHG4TpcDirectLaser::m_steppingpattern = false
private

set to true to get stepping patern from file

Definition at line 162 of file PHG4TpcDirectLaser.h.

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

Referenced by AimToNextPatternStep(), InitRun(), process_event(), and SetDirectLaserPatternfromFile().

SvtxTrackMap* PHG4TpcDirectLaser::m_track_map = nullptr
private

Definition at line 173 of file PHG4TpcDirectLaser.h.

View newest version in sPHENIX GitHub at line 173 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 172 of file PHG4TpcDirectLaser.h.

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

Referenced by InitRun(), and process_event().

double PHG4TpcDirectLaser::maxPhi = 0
private

Definition at line 150 of file PHG4TpcDirectLaser.h.

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

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

double PHG4TpcDirectLaser::maxTheta = 0
private

Definition at line 152 of file PHG4TpcDirectLaser.h.

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

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

double PHG4TpcDirectLaser::minPhi = 0
private

Definition at line 149 of file PHG4TpcDirectLaser.h.

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

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

double PHG4TpcDirectLaser::minTheta = 0
private

Definition at line 151 of file PHG4TpcDirectLaser.h.

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

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

int PHG4TpcDirectLaser::nPhiSteps = 1
private

Definition at line 146 of file PHG4TpcDirectLaser.h.

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

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

int PHG4TpcDirectLaser::nThetaSteps = 1
private

Definition at line 147 of file PHG4TpcDirectLaser.h.

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

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

int PHG4TpcDirectLaser::nTotalSteps = 1
private

Definition at line 148 of file PHG4TpcDirectLaser.h.

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

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

TNtuple* PHG4TpcDirectLaser::pattern = nullptr
private

Definition at line 99 of file PHG4TpcDirectLaser.h.

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

Referenced by AimToPatternStep_File(), and InitRun().

float PHG4TpcDirectLaser::phi_p
private

Definition at line 98 of file PHG4TpcDirectLaser.h.

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

Referenced by AimToPatternStep_File(), InitRun(), and PHG4TpcDirectLaser().

float PHG4TpcDirectLaser::theta_p
private

Definition at line 98 of file PHG4TpcDirectLaser.h.

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

Referenced by AimToPatternStep_File(), InitRun(), and PHG4TpcDirectLaser().


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