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

#include <analysis/blob/master/PhotonConversion/truthconversion/TruthConversionEval.h>

+ Inheritance diagram for TruthConversionEval:
+ Collaboration diagram for TruthConversionEval:

Public Member Functions

 TruthConversionEval (const std::string &name, unsigned int runnumber, int particleEmbed, int pythiaEmbed, bool makeTTree, std::string TMVAName, std::string TMVAPath)
 
 ~TruthConversionEval ()
 
int InitRun (PHCompositeNode *)
 
int process_event (PHCompositeNode *)
 
int End (PHCompositeNode *)
 Called at the end of all processing.
 
const RawClusterContainergetClusters () const
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
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.
 

Private Member Functions

TLorentzVector tracktoTLV (SvtxTrack *track)
 
TLorentzVector particletoTLV (PHG4Particle *particle)
 
bool doNodePointers (PHCompositeNode *topNode)
 
SvtxVertexget_primary_vertex (PHCompositeNode *topNode) const
 
void numUnique (std::map< int, Conversion > *map, SvtxTrackEval *trackEval, RawClusterContainer *mainClusterContainer, std::vector< std::pair< SvtxTrack *, SvtxTrack * >> *tightBackground)
 
void processTrackBackground (std::vector< SvtxTrack * > *v, SvtxTrackEval *)
 fills the member fields for all the background trees
 
void recordConversion (Conversion *conversion, TLorentzVector *tlv_photon, TLorentzVector *tlv_electron, TLorentzVector *tlv_positron)
 
int get_embed (PHG4Particle *particle, PHG4TruthInfoContainer *truthinfo) const
 
float vtoR (PHG4VtxPoint *vtx) const
 

Private Attributes

const unsigned int _kRunNumber
 
const int _kParticleEmbed
 primary embedID
 
const int _kPythiaEmbed
 background event embedID i.e. pythia or AA
 
const bool _kMakeTTree
 
int _runNumber
 for the TTree do not change
 
TFile * _f =NULL
 output file
 
TTree * _signalCutTree =NULL
 signal data for making track pair cuts
 
TTree * _trackBackTree =NULL
 background for all possible single tracks
 
TTree * _pairBackTree =NULL
 background for all possible track pairs
 
TTree * _vtxBackTree =NULL
 background that passes existing track pair cuts
 
TTree * _vtxingTree =NULL
 data for training vtxing
 
TTree * _observTree =NULL
 per event observables
 
RawClusterContainer_mainClusterContainer
 
PHG4TruthInfoContainer_truthinfo
 
TrkrClusterContainer_clusterMap
 
SvtxTrackMap_allTracks
 
SvtxHitMap * _hitMap
 
std::string _foutname
 name of the output file
 
SVReco_vertexer =NULL
 for reco vertex finding
 
VtxRegressor_regressor =NULL
 for reco vertex correction with TMVA
 
float _b_refitdiffx
 
float _b_refitdiffy
 
float _b_refitdiffz
 
int _b_nCluster
 
int _bb_track1_pid
 
int _bb_track2_pid
 
int _bb_parent_pid
 
float _b_cluster_dphi
 
float _b_cluster_deta
 
int _bb_nCluster
 
float _bb_cluster_dphi
 
float _bb_cluster_deta
 
float _b_track1_pt
 
float _b_track1_eta
 
float _b_track1_phi
 
float _b_track2_pt
 
float _b_track2_eta
 
float _b_track2_phi
 
float _b_track_deta
 
int _b_track_layer
 
int _b_track_dlayer
 
float _b_track_pT
 
float _b_track_dca
 
float _b_ttrack_pT
 
double _b_approach
 
float _b_vtx_radius
 
float _b_vtx_phi
 
float _b_vtx_eta
 
float _b_vtx_x
 
float _b_vtx_y
 
float _b_vtx_z
 
float _b_tvtx_eta
 
float _b_tvtx_x
 
float _b_tvtx_y
 
float _b_tvtx_z
 
float _b_tvtx_radius
 
float _b_tvtx_phi
 
float _b_vtxTrackRZ_dist
 
float _b_vtxTrackRPhi_dist
 
float _b_vtx_chi2
 
float _b_photon_m
 
float _b_tphoton_m
 
float _b_tphoton_pT
 
float _b_photon_pT
 
float _b_cluster_prob
 
float _b_track_dphi
 
float _bb_track_deta
 
float _bb_vtx_radius
 
float _bb_track_dca
 
int _bb_track_layer
 
int _bb_track_dlayer
 
float _bb_track_pT
 
double _bb_approach
 
float _bb_vtxTrackRZ_dist
 
float _bb_vtxTrackRPhi_dist
 
float _bb_vtx_chi2
 
float _bb_photon_m
 
float _bb_photon_pT
 
float _bb_cluster_prob
 
float _bb_track_dphi
 
int _bb_pid
 
int _b_nMatched =0
 
int _b_nUnmatched =0
 
std::vector< float > _b_truth_pT
 
std::vector< float > _b_reco_pT
 
std::vector< float > _b_alltrack_pT
 
std::vector< float > _b_allphoton_pT
 
RawClusterContainer _conversionClusters
 
float _kRAPIDITYACCEPT =1
 <TPC radius currently hardcoded
 
float _kTightPtMin =2.5
 
float _kTightDetaMax =.0082
 

Static Private Attributes

static const int s_kMAXParticles =200
 increase this number if arrays go out of bounds
 
static const int s_kTPCRADIUS =21
 

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")
 

Detailed Description

Definition at line 38 of file TruthConversionEval.h.

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

Constructor & Destructor Documentation

TruthConversionEval::TruthConversionEval ( const std::string &  name,
unsigned int  runnumber,
int  particleEmbed,
int  pythiaEmbed,
bool  makeTTree,
std::string  TMVAName,
std::string  TMVAPath 
)
Parameters
namename of the output file
runnumberprinted in TTree for condor jobs
particleEmbedthe embedID of particles embeded by Fun4All
pythiaEmbedthe embedID for an embeded pythia event
makeTTreetrue-writes the TTree false-won't make TTree will still find clusters

Definition at line 53 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 53 of file TruthConversionEval.C

References _foutname, _regressor, and perf_headwind::name.

TruthConversionEval::~TruthConversionEval ( )

Definition at line 61 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 61 of file TruthConversionEval.C

References _f, _regressor, and _vertexer.

Member Function Documentation

bool TruthConversionEval::doNodePointers ( PHCompositeNode topNode)
private

Definition at line 179 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 179 of file TruthConversionEval.C

References _allTracks, _clusterMap, _mainClusterContainer, _truthinfo, and Fun4AllBase::Name().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int TruthConversionEval::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 824 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 824 of file TruthConversionEval.C

References _f, and _kMakeTTree.

int TruthConversionEval::get_embed ( PHG4Particle particle,
PHG4TruthInfoContainer truthinfo 
) const
private

Definition at line 816 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 816 of file TruthConversionEval.C

References PHG4Particle::get_track_id(), and PHG4TruthInfoContainer::isEmbeded().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

SvtxVertex * TruthConversionEval::get_primary_vertex ( PHCompositeNode topNode) const
private

Definition at line 207 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 207 of file TruthConversionEval.C

References SvtxVertexMap::get().

+ Here is the call graph for this function:

const RawClusterContainer * TruthConversionEval::getClusters ( ) const

get the clusters associated with converions

Definition at line 814 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 814 of file TruthConversionEval.C

References _conversionClusters.

int TruthConversionEval::InitRun ( PHCompositeNode )
virtual
void TruthConversionEval::numUnique ( std::map< int, Conversion > *  map = NULL,
SvtxTrackEval trackEval = NULL,
RawClusterContainer mainClusterContainer = NULL,
std::vector< std::pair< SvtxTrack *, SvtxTrack * >> *  tightBackground = NULL 
)
private

helper function for process_event fills the member fields with information from the conversions finds the clusters associated with the truth conversions

Definition at line 341 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 341 of file TruthConversionEval.C

References _kRAPIDITYACCEPT, PHG4Particle::get_e(), PHG4Particle::get_pid(), PHG4Particle::get_px(), PHG4Particle::get_py(), PHG4Particle::get_pz(), PHG4Particle::get_track_id(), i, Fun4AllBase::Name(), recordConversion(), and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TLorentzVector TruthConversionEval::particletoTLV ( PHG4Particle particle)
inlineprivate

Definition at line 71 of file TruthConversionEval.h.

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

References PHG4Particle::get_e(), PHG4Particle::get_px(), PHG4Particle::get_py(), and PHG4Particle::get_pz().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int TruthConversionEval::process_event ( PHCompositeNode topNode)
virtual
void TruthConversionEval::processTrackBackground ( std::vector< SvtxTrack * > *  v,
SvtxTrackEval trackeval 
)
private

fills the member fields for all the background trees

Definition at line 419 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 419 of file TruthConversionEval.C

References _bb_approach, _bb_cluster_deta, _bb_cluster_dphi, _bb_cluster_prob, _bb_nCluster, _bb_photon_m, _bb_photon_pT, _bb_track_dca, _bb_track_deta, _bb_track_dlayer, _bb_track_dphi, _bb_track_layer, _bb_track_pT, _bb_vtx_chi2, _bb_vtx_radius, _bb_vtxTrackRPhi_dist, _bb_vtxTrackRZ_dist, _clusterMap, _kTightDetaMax, _kTightPtMin, _mainClusterContainer, _pairBackTree, _regressor, _trackBackTree, _vertexer, _vtxBackTree, Conversion::approachDistance(), SvtxTrack::begin_cluster_keys(), Conversion::correctSecondaryVertex(), SvtxTrack::end_cluster_keys(), TrkrClusterContainer::findCluster(), SVReco::findSecondaryVertex(), SvtxTrack::get_cal_cluster_id(), SvtxTrack::get_dca(), SvtxTrack::get_eta(), SvtxTrack::get_pt(), genfit::GFRaveVertex::getChi2(), RawClusterContainer::getCluster(), TrkrDefs::getLayer(), genfit::GFRaveVertex::getPos(), Conversion::getRecoPhoton(), next, Conversion::trackDEta(), Conversion::trackDLayer(), Conversion::trackDPhi(), Conversion::vtxTrackRPhi(), and Conversion::vtxTrackRZ().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TruthConversionEval::recordConversion ( Conversion conversion,
TLorentzVector *  tlv_photon,
TLorentzVector *  tlv_electron,
TLorentzVector *  tlv_positron 
)
private

Definition at line 545 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 545 of file TruthConversionEval.C

References _b_approach, _b_cluster_deta, _b_cluster_dphi, _b_cluster_prob, _b_nCluster, _b_photon_m, _b_photon_pT, _b_tphoton_m, _b_tphoton_pT, _b_track1_eta, _b_track1_phi, _b_track1_pt, _b_track2_eta, _b_track2_phi, _b_track2_pt, _b_track_dca, _b_track_deta, _b_track_dlayer, _b_track_dphi, _b_track_layer, _b_track_pT, _b_ttrack_pT, _b_tvtx_eta, _b_tvtx_phi, _b_tvtx_radius, _b_tvtx_x, _b_tvtx_y, _b_tvtx_z, _b_vtx_chi2, _b_vtx_eta, _b_vtx_phi, _b_vtx_radius, _b_vtx_x, _b_vtx_y, _b_vtx_z, _b_vtxTrackRPhi_dist, _b_vtxTrackRZ_dist, _clusterMap, _kMakeTTree, _mainClusterContainer, _regressor, _signalCutTree, _vertexer, _vtxingTree, Conversion::approachDistance(), RawCluster::CloneMe(), Conversion::correctSecondaryVertex(), Conversion::firstLayer(), Conversion::get_cluster_ids(), RawCluster::get_phi(), RawCluster::get_prob(), PHG4VtxPoint::get_x(), RawCluster::get_x(), PHG4VtxPoint::get_y(), RawCluster::get_y(), PHG4VtxPoint::get_z(), RawCluster::get_z(), genfit::GFRaveVertex::getChi2(), RawClusterContainer::getCluster(), genfit::GFRaveVertex::getPos(), Conversion::getRecoPhoton(), Conversion::getRefitRecoPhoton(), Conversion::getSecondaryVertex(), Conversion::getTrackEtas(), Conversion::getTrackPhis(), Conversion::getTrackpTs(), Conversion::getVtx(), Conversion::minDca(), Conversion::minTrackpT(), Conversion::PrintPhotonRecoInfo(), Conversion::recoCount(), Conversion::trackDEta(), Conversion::trackDLayer(), Conversion::trackDPhi(), Conversion::vtxTrackRPhi(), and Conversion::vtxTrackRZ().

Referenced by numUnique().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TLorentzVector TruthConversionEval::tracktoTLV ( SvtxTrack track)
inlineprivate

Definition at line 65 of file TruthConversionEval.h.

View newest version in sPHENIX GitHub at line 65 of file TruthConversionEval.h

References SvtxTrack::get_eta(), SvtxTrack::get_phi(), SvtxTrack::get_pt(), and physmon_track_finding_ttbar::r.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float TruthConversionEval::vtoR ( PHG4VtxPoint vtx) const
private

Definition at line 820 of file TruthConversionEval.C.

View newest version in sPHENIX GitHub at line 820 of file TruthConversionEval.C

References PHG4VtxPoint::get_x(), and PHG4VtxPoint::get_y().

+ Here is the call graph for this function:

Member Data Documentation

SvtxTrackMap* TruthConversionEval::_allTracks
private

Definition at line 103 of file TruthConversionEval.h.

View newest version in sPHENIX GitHub at line 103 of file TruthConversionEval.h

Referenced by doNodePointers(), and process_event().

TrkrClusterContainer* TruthConversionEval::_clusterMap
private

Definition at line 102 of file TruthConversionEval.h.

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

Referenced by doNodePointers(), processTrackBackground(), and recordConversion().

RawClusterContainer TruthConversionEval::_conversionClusters
private

RawClusters associated with truth conversions processed by other modules currently empty

Definition at line 185 of file TruthConversionEval.h.

View newest version in sPHENIX GitHub at line 185 of file TruthConversionEval.h

Referenced by getClusters(), and process_event().

TFile* TruthConversionEval::_f =NULL
private

output file

Definition at line 93 of file TruthConversionEval.h.

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

Referenced by End(), InitRun(), and ~TruthConversionEval().

std::string TruthConversionEval::_foutname
private

name of the output file

Definition at line 105 of file TruthConversionEval.h.

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

Referenced by InitRun(), and TruthConversionEval().

SvtxHitMap* TruthConversionEval::_hitMap
private

Definition at line 104 of file TruthConversionEval.h.

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

const bool TruthConversionEval::_kMakeTTree
private

Definition at line 91 of file TruthConversionEval.h.

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

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

const int TruthConversionEval::_kParticleEmbed
private

primary embedID

Definition at line 89 of file TruthConversionEval.h.

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

const int TruthConversionEval::_kPythiaEmbed
private

background event embedID i.e. pythia or AA

Definition at line 90 of file TruthConversionEval.h.

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

float TruthConversionEval::_kRAPIDITYACCEPT =1
private

<TPC radius currently hardcoded

Definition at line 189 of file TruthConversionEval.h.

View newest version in sPHENIX GitHub at line 189 of file TruthConversionEval.h

Referenced by numUnique().

const unsigned int TruthConversionEval::_kRunNumber
private

Definition at line 88 of file TruthConversionEval.h.

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

Referenced by InitRun().

float TruthConversionEval::_kTightDetaMax =.0082
private

Definition at line 191 of file TruthConversionEval.h.

View newest version in sPHENIX GitHub at line 191 of file TruthConversionEval.h

Referenced by process_event(), and processTrackBackground().

float TruthConversionEval::_kTightPtMin =2.5
private

Definition at line 190 of file TruthConversionEval.h.

View newest version in sPHENIX GitHub at line 190 of file TruthConversionEval.h

Referenced by process_event(), and processTrackBackground().

RawClusterContainer* TruthConversionEval::_mainClusterContainer
private

Definition at line 100 of file TruthConversionEval.h.

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

Referenced by doNodePointers(), process_event(), processTrackBackground(), and recordConversion().

TTree* TruthConversionEval::_observTree =NULL
private

per event observables

Definition at line 99 of file TruthConversionEval.h.

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

Referenced by InitRun(), and process_event().

TTree* TruthConversionEval::_pairBackTree =NULL
private

background for all possible track pairs

Definition at line 96 of file TruthConversionEval.h.

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

Referenced by InitRun(), and processTrackBackground().

VtxRegressor* TruthConversionEval::_regressor =NULL
private

for reco vertex correction with TMVA

Definition at line 107 of file TruthConversionEval.h.

View newest version in sPHENIX GitHub at line 107 of file TruthConversionEval.h

Referenced by processTrackBackground(), recordConversion(), TruthConversionEval(), and ~TruthConversionEval().

int TruthConversionEval::_runNumber
private

for the TTree do not change

Definition at line 92 of file TruthConversionEval.h.

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

Referenced by InitRun().

TTree* TruthConversionEval::_signalCutTree =NULL
private

signal data for making track pair cuts

Definition at line 94 of file TruthConversionEval.h.

View newest version in sPHENIX GitHub at line 94 of file TruthConversionEval.h

Referenced by InitRun(), and recordConversion().

TTree* TruthConversionEval::_trackBackTree =NULL
private

background for all possible single tracks

Definition at line 95 of file TruthConversionEval.h.

View newest version in sPHENIX GitHub at line 95 of file TruthConversionEval.h

Referenced by InitRun(), and processTrackBackground().

PHG4TruthInfoContainer* TruthConversionEval::_truthinfo
private

Definition at line 101 of file TruthConversionEval.h.

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

Referenced by doNodePointers(), and process_event().

SVReco* TruthConversionEval::_vertexer =NULL
private

for reco vertex finding

Definition at line 106 of file TruthConversionEval.h.

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

Referenced by InitRun(), process_event(), processTrackBackground(), recordConversion(), and ~TruthConversionEval().

TTree* TruthConversionEval::_vtxBackTree =NULL
private

background that passes existing track pair cuts

Definition at line 97 of file TruthConversionEval.h.

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

Referenced by InitRun(), and processTrackBackground().

TTree* TruthConversionEval::_vtxingTree =NULL
private

data for training vtxing

Definition at line 98 of file TruthConversionEval.h.

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

Referenced by InitRun(), and recordConversion().

const int TruthConversionEval::s_kMAXParticles =200
staticprivate

increase this number if arrays go out of bounds

Definition at line 87 of file TruthConversionEval.h.

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

const int TruthConversionEval::s_kTPCRADIUS =21
staticprivate

Definition at line 187 of file TruthConversionEval.h.

View newest version in sPHENIX GitHub at line 187 of file TruthConversionEval.h

Referenced by process_event().


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