Analysis Software
Documentation for sPHENIX simulation software
|
#include <coresoftware/blob/master/simulation/g4simulation/g4tpc/PHG4TpcDirectLaser.h>
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 | |
PHParameterInterface & | operator= (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< Laser > | m_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 | |
PHG4HitContainer * | m_g4hitcontainer = nullptr |
g4hit container | |
PHG4TruthInfoContainer * | m_g4truthinfo = nullptr |
truth information | |
std::string | m_track_map_name = "SvtxTrackMap" |
track map, used to store track parameters | |
SvtxTrackMap * | m_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 () |
Definition at line 20 of file PHG4TpcDirectLaser.h.
View newest version in sPHENIX GitHub at line 20 of file PHG4TpcDirectLaser.h
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.
|
overridedefault |
destructor
|
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().
|
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().
|
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().
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().
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().
|
inline |
detector name
Definition at line 39 of file PHG4TpcDirectLaser.h.
View newest version in sPHENIX GitHub at line 39 of file PHG4TpcDirectLaser.h
|
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.
|
overridevirtual |
run initialization
Reimplemented from SubsysReco.
Definition at line 181 of file PHG4TpcDirectLaser.cc.
View newest version in sPHENIX GitHub at line 181 of file PHG4TpcDirectLaser.cc
References Fun4AllReturnCodes::ABORTRUN, PHCompositeNode::addNode(), detector, electrons_per_cm, electrons_per_gev, Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), PHParameterInterface::get_double_param(), PHParameterInterface::get_int_param(), hitnodename, m_autoAdvanceDirectLaser, m_g4truthinfo, m_steppingpattern, m_track_map, m_track_map_name, maxPhi, maxTheta, minPhi, minTheta, Fun4AllBase::Name(), nPhiSteps, nThetaSteps, nTotalSteps, pattern, phi_p, PHWHERE, SetupLasers(), theta_p, and PHParameterInterface::UpdateParametersWithMacro().
|
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.
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.
|
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.
|
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().
|
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.
|
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.
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().
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.
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().