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

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

+ Inheritance diagram for PHG4TpcElectronDrift:
+ Collaboration diagram for PHG4TpcElectronDrift:

Classes

class  Deleter
 rng de-allocator More...
 

Public Member Functions

 PHG4TpcElectronDrift (const std::string &name="PHG4TpcElectronDrift")
 
 ~PHG4TpcElectronDrift () override=default
 
int Init (PHCompositeNode *) override
 
int InitRun (PHCompositeNode *) override
 
int process_event (PHCompositeNode *) override
 
int End (PHCompositeNode *) override
 Called at the end of all processing.
 
void SetDefaultParameters () override
 
void Detector (const std::string &d)
 detector name
 
std::string Detector () const
 detector name
 
void set_seed (const unsigned int iseed)
 random seed
 
void setTpcDistortion (PHG4TpcDistortion *)
 setup TPC distortion
 
void registerPadPlane (PHG4TpcPadPlane *padplane)
 setup readout plane
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int EndRun (const int)
 Called at the end of each run.
 
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 MapToPadPlane (const double x, const double y, const double z, PHG4HitContainer::ConstIterator hiter, TNtuple *ntpad, TNtuple *nthit)
 map a given x,y,z coordinates to plane hits
 

Private Attributes

TrkrHitSetContainerhitsetcontainer = nullptr
 
TrkrHitTruthAssochittruthassoc = nullptr
 
std::unique_ptr
< TrkrHitSetContainer
temp_hitsetcontainer
 
std::unique_ptr
< TrkrHitSetContainer
single_hitsetcontainer
 
std::unique_ptr< PHG4TpcPadPlanepadplane
 
std::unique_ptr
< PHG4TpcDistortion
m_distortionMap
 
int event_num = 0
 
bool do_ElectronDriftQAHistos = false
 
std::unique_ptr< TFile > m_outf
 
std::unique_ptr< TFile > EDrift_outf
 
TNtuple * nt = nullptr
 
TNtuple * nthit = nullptr
 
TNtuple * ntfinalhit = nullptr
 
TNtuple * ntpad = nullptr
 
std::string detector
 
std::string hitnodename
 
std::string seggeonodename
 
double diffusion_trans = NAN
 
double added_smear_sigma_trans = NAN
 
double diffusion_long = NAN
 
double added_smear_sigma_long = NAN
 
double drift_velocity = NAN
 
double tpc_length = NAN
 
double electrons_per_gev = NAN
 
double min_active_radius = NAN
 
double max_active_radius = NAN
 
double min_time = NAN
 
double max_time = NAN
 
std::unique_ptr< gsl_rng, DeleterRandomGenerator
 
evaluation histograms
TH1 * dlong = nullptr
 
TH1 * dtrans = nullptr
 
TH2 * hitmapstart = nullptr
 
TH2 * hitmapend = nullptr
 
TH2 * z_startmap = nullptr
 
TH2 * deltaphi = nullptr
 
TH2 * deltar = nullptr
 
TH2 * deltaphinodiff = nullptr
 
TH2 * deltaRphinodiff = nullptr
 
TH2 * deltaphivsRnodiff = nullptr
 
TH2 * deltaphinodist = nullptr
 
TH2 * deltarnodiff = nullptr
 
TH2 * deltarnodist = nullptr
 
TH2 * deltaz = nullptr
 

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 31 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 31 of file PHG4TpcElectronDrift.h

Constructor & Destructor Documentation

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

Definition at line 68 of file PHG4TpcElectronDrift.cc.

View newest version in sPHENIX GitHub at line 68 of file PHG4TpcElectronDrift.cc

References PHParameterInterface::InitializeParameters(), RandomGenerator, and set_seed().

+ Here is the call graph for this function:

PHG4TpcElectronDrift::~PHG4TpcElectronDrift ( )
overridedefault

Member Function Documentation

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

detector name

Definition at line 44 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 44 of file PHG4TpcElectronDrift.h

References d, and detector.

Referenced by TPC_Cells().

+ Here is the caller graph for this function:

std::string PHG4TpcElectronDrift::Detector ( ) const
inline

detector name

Definition at line 50 of file PHG4TpcElectronDrift.h.

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

References detector.

Referenced by registerPadPlane().

+ Here is the caller graph for this function:

int PHG4TpcElectronDrift::End ( PHCompositeNode )
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 596 of file PHG4TpcElectronDrift.cc.

View newest version in sPHENIX GitHub at line 596 of file PHG4TpcElectronDrift.cc

References deltaphi, deltaphinodiff, deltaphinodist, deltaphivsRnodiff, deltar, deltarnodiff, deltarnodist, deltaRphinodiff, deltaz, do_ElectronDriftQAHistos, EDrift_outf, Fun4AllReturnCodes::EVENT_OK, hitmapend, hitmapstart, m_outf, nt, ntfinalhit, nthit, ntpad, Fun4AllBase::Verbosity(), and z_startmap.

+ Here is the call graph for this function:

int PHG4TpcElectronDrift::Init ( PHCompositeNode )
overridevirtual

Called during initialization. Typically this is where you can book histograms, and e.g. register them to Fun4AllServer (so they can be output to file using Fun4AllServer::dumpHistos() method).

Reimplemented from SubsysReco.

Definition at line 80 of file PHG4TpcElectronDrift.cc.

View newest version in sPHENIX GitHub at line 80 of file PHG4TpcElectronDrift.cc

References event_num, Fun4AllReturnCodes::EVENT_OK, and padplane.

void PHG4TpcElectronDrift::MapToPadPlane ( const double  x,
const double  y,
const double  z,
PHG4HitContainer::ConstIterator  hiter,
TNtuple *  ntpad,
TNtuple *  nthit 
)
private

map a given x,y,z coordinates to plane hits

Definition at line 591 of file PHG4TpcElectronDrift.cc.

View newest version in sPHENIX GitHub at line 591 of file PHG4TpcElectronDrift.cc

References hittruthassoc, nthit, ntpad, padplane, single_hitsetcontainer, and temp_hitsetcontainer.

Referenced by process_event().

+ Here is the caller graph for this function:

void PHG4TpcElectronDrift::registerPadPlane ( PHG4TpcPadPlane padplane)

setup readout plane

Definition at line 674 of file PHG4TpcElectronDrift.cc.

View newest version in sPHENIX GitHub at line 674 of file PHG4TpcElectronDrift.cc

References Detector(), and padplane.

+ Here is the call graph for this function:

void PHG4TpcElectronDrift::set_seed ( const unsigned int  iseed)

random seed

Definition at line 634 of file PHG4TpcElectronDrift.cc.

View newest version in sPHENIX GitHub at line 634 of file PHG4TpcElectronDrift.cc

References RandomGenerator.

Referenced by PHG4TpcElectronDrift().

+ Here is the caller graph for this function:

void PHG4TpcElectronDrift::SetDefaultParameters ( )
overridevirtual

Implements PHParameterInterface.

Definition at line 639 of file PHG4TpcElectronDrift.cc.

View newest version in sPHENIX GitHub at line 639 of file PHG4TpcElectronDrift.cc

References PHParameterInterface::set_default_double_param().

+ Here is the call graph for this function:

void PHG4TpcElectronDrift::setTpcDistortion ( PHG4TpcDistortion distortionMap)

setup TPC distortion

Definition at line 669 of file PHG4TpcElectronDrift.cc.

View newest version in sPHENIX GitHub at line 669 of file PHG4TpcElectronDrift.cc

References m_distortionMap.

Member Data Documentation

double PHG4TpcElectronDrift::added_smear_sigma_long = NAN
private

Definition at line 111 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 111 of file PHG4TpcElectronDrift.h

Referenced by InitRun(), and process_event().

double PHG4TpcElectronDrift::added_smear_sigma_trans = NAN
private

Definition at line 109 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 109 of file PHG4TpcElectronDrift.h

Referenced by InitRun(), and process_event().

TH2* PHG4TpcElectronDrift::deltaphi = nullptr
private

Definition at line 85 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 85 of file PHG4TpcElectronDrift.h

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

TH2* PHG4TpcElectronDrift::deltaphinodiff = nullptr
private

Definition at line 87 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 87 of file PHG4TpcElectronDrift.h

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

TH2* PHG4TpcElectronDrift::deltaphinodist = nullptr
private

Definition at line 90 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 90 of file PHG4TpcElectronDrift.h

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

TH2* PHG4TpcElectronDrift::deltaphivsRnodiff = nullptr
private

Definition at line 89 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 89 of file PHG4TpcElectronDrift.h

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

TH2* PHG4TpcElectronDrift::deltar = nullptr
private

Definition at line 86 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 86 of file PHG4TpcElectronDrift.h

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

TH2* PHG4TpcElectronDrift::deltarnodiff = nullptr
private

Definition at line 91 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 91 of file PHG4TpcElectronDrift.h

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

TH2* PHG4TpcElectronDrift::deltarnodist = nullptr
private

Definition at line 92 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 92 of file PHG4TpcElectronDrift.h

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

TH2* PHG4TpcElectronDrift::deltaRphinodiff = nullptr
private

Definition at line 88 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 88 of file PHG4TpcElectronDrift.h

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

TH2* PHG4TpcElectronDrift::deltaz = nullptr
private

Definition at line 93 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 93 of file PHG4TpcElectronDrift.h

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

std::string PHG4TpcElectronDrift::detector
private

Definition at line 104 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 104 of file PHG4TpcElectronDrift.h

Referenced by Detector(), and InitRun().

double PHG4TpcElectronDrift::diffusion_long = NAN
private

Definition at line 110 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 110 of file PHG4TpcElectronDrift.h

Referenced by InitRun(), and process_event().

double PHG4TpcElectronDrift::diffusion_trans = NAN
private

Definition at line 108 of file PHG4TpcElectronDrift.h.

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

Referenced by InitRun(), and process_event().

TH1* PHG4TpcElectronDrift::dlong = nullptr
private

Definition at line 80 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 80 of file PHG4TpcElectronDrift.h

Referenced by InitRun().

bool PHG4TpcElectronDrift::do_ElectronDriftQAHistos = false
private

Definition at line 76 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 76 of file PHG4TpcElectronDrift.h

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

double PHG4TpcElectronDrift::drift_velocity = NAN
private

Definition at line 112 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 112 of file PHG4TpcElectronDrift.h

Referenced by InitRun(), and process_event().

TH1* PHG4TpcElectronDrift::dtrans = nullptr
private

Definition at line 81 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 81 of file PHG4TpcElectronDrift.h

Referenced by InitRun().

std::unique_ptr<TFile> PHG4TpcElectronDrift::EDrift_outf
private

Definition at line 97 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 97 of file PHG4TpcElectronDrift.h

Referenced by End().

double PHG4TpcElectronDrift::electrons_per_gev = NAN
private

Definition at line 114 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 114 of file PHG4TpcElectronDrift.h

Referenced by InitRun(), and process_event().

int PHG4TpcElectronDrift::event_num = 0
private

Definition at line 75 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 75 of file PHG4TpcElectronDrift.h

Referenced by Init(), and process_event().

TH2* PHG4TpcElectronDrift::hitmapend = nullptr
private

Definition at line 83 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 83 of file PHG4TpcElectronDrift.h

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

TH2* PHG4TpcElectronDrift::hitmapstart = nullptr
private

Definition at line 82 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 82 of file PHG4TpcElectronDrift.h

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

std::string PHG4TpcElectronDrift::hitnodename
private

Definition at line 105 of file PHG4TpcElectronDrift.h.

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

Referenced by InitRun(), and process_event().

TrkrHitSetContainer* PHG4TpcElectronDrift::hitsetcontainer = nullptr
private

Definition at line 68 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 68 of file PHG4TpcElectronDrift.h

Referenced by InitRun(), and process_event().

TrkrHitTruthAssoc* PHG4TpcElectronDrift::hittruthassoc = nullptr
private

Definition at line 69 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 69 of file PHG4TpcElectronDrift.h

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

std::unique_ptr<PHG4TpcDistortion> PHG4TpcElectronDrift::m_distortionMap
private

Definition at line 74 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 74 of file PHG4TpcElectronDrift.h

Referenced by process_event(), and setTpcDistortion().

std::unique_ptr<TFile> PHG4TpcElectronDrift::m_outf
private

Definition at line 96 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 96 of file PHG4TpcElectronDrift.h

Referenced by End(), and InitRun().

double PHG4TpcElectronDrift::max_active_radius = NAN
private

Definition at line 116 of file PHG4TpcElectronDrift.h.

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

Referenced by InitRun(), and process_event().

double PHG4TpcElectronDrift::max_time = NAN
private

Definition at line 118 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 118 of file PHG4TpcElectronDrift.h

Referenced by InitRun(), and process_event().

double PHG4TpcElectronDrift::min_active_radius = NAN
private

Definition at line 115 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 115 of file PHG4TpcElectronDrift.h

Referenced by InitRun().

double PHG4TpcElectronDrift::min_time = NAN
private

Definition at line 117 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 117 of file PHG4TpcElectronDrift.h

Referenced by InitRun().

TNtuple* PHG4TpcElectronDrift::nt = nullptr
private

Definition at line 99 of file PHG4TpcElectronDrift.h.

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

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

TNtuple* PHG4TpcElectronDrift::ntfinalhit = nullptr
private

Definition at line 101 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 101 of file PHG4TpcElectronDrift.h

Referenced by End(), and InitRun().

TNtuple* PHG4TpcElectronDrift::nthit = nullptr
private

Definition at line 100 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 100 of file PHG4TpcElectronDrift.h

Referenced by End(), InitRun(), MapToPadPlane(), and process_event().

TNtuple* PHG4TpcElectronDrift::ntpad = nullptr
private

Definition at line 102 of file PHG4TpcElectronDrift.h.

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

Referenced by End(), InitRun(), MapToPadPlane(), and process_event().

std::unique_ptr<PHG4TpcPadPlane> PHG4TpcElectronDrift::padplane
private

Definition at line 72 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 72 of file PHG4TpcElectronDrift.h

Referenced by Init(), InitRun(), MapToPadPlane(), and registerPadPlane().

std::unique_ptr<gsl_rng, Deleter> PHG4TpcElectronDrift::RandomGenerator
private

Definition at line 127 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 127 of file PHG4TpcElectronDrift.h

Referenced by PHG4TpcElectronDrift(), process_event(), and set_seed().

std::string PHG4TpcElectronDrift::seggeonodename
private

Definition at line 106 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 106 of file PHG4TpcElectronDrift.h

Referenced by InitRun().

std::unique_ptr<TrkrHitSetContainer> PHG4TpcElectronDrift::single_hitsetcontainer
private

Definition at line 71 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 71 of file PHG4TpcElectronDrift.h

Referenced by MapToPadPlane(), and process_event().

std::unique_ptr<TrkrHitSetContainer> PHG4TpcElectronDrift::temp_hitsetcontainer
private

Definition at line 70 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 70 of file PHG4TpcElectronDrift.h

Referenced by MapToPadPlane(), and process_event().

double PHG4TpcElectronDrift::tpc_length = NAN
private

Definition at line 113 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 113 of file PHG4TpcElectronDrift.h

Referenced by InitRun(), and process_event().

TH2* PHG4TpcElectronDrift::z_startmap = nullptr
private

Definition at line 84 of file PHG4TpcElectronDrift.h.

View newest version in sPHENIX GitHub at line 84 of file PHG4TpcElectronDrift.h

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


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