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

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

+ Inheritance diagram for VtxTest:
+ Collaboration diagram for VtxTest:

Public Member Functions

 VtxTest (const std::string &name, unsigned int runnumber, int particleEmbed, int pythiaEmbed, bool makeTTree)
 
 ~VtxTest ()
 
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

void doNodePointers (PHCompositeNode *topNode)
 
std::queue< std::pair< int, int > > numUnique (std::map< int, Conversion > *map, SvtxTrackEval *trackEval, RawClusterContainer *mainClusterContainer)
 
void findChildren (std::queue< std::pair< int, int >> missing, PHG4TruthInfoContainer *truthinfo)
 
void processBackground (std::map< int, Conversion > *map, SvtxTrackEval *trackEval, TTree *tree)
 
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 * _tree =NULL
 stores most of the data about the conversions
 
TTree * _signalCutTree =NULL
 signal data for making track pair cuts
 
TTree * _h_backgroundCutTree =NULL
 hadronic background data for making track pair cuts
 
TTree * _e_backgroundCutTree =NULL
 EM background data for making track pair cuts.
 
RawClusterContainer_mainClusterContainer
 contain 1 cluster associated with each conversion
 
PHG4TruthInfoContainer_truthinfo
 
TrkrClusterContainer_clusterMap
 
SvtxHitMap * _hitMap
 
std::string _foutname
 name of the output file
 
SVReco_vertexer =NULL
 for reco vertex finding
 
int _b_event
 
int _b_nVtx
 total conversions
 
int _b_Tpair
 count acceptance e pairs in truth
 
int _b_Rpair
 count acceptance e pairs in reco
 
double _b_rVtx [s_kMAXParticles]
 truth conversion radius used for the signal tree
 
bool _b_pythia [s_kMAXParticles]
 record if the conversion is from pythia or G4 particle
 
float _b_electron_pt [s_kMAXParticles]
 
float _b_positron_pt [s_kMAXParticles]
 
float _b_electron_reco_pt [s_kMAXParticles]
 
float _b_positron_reco_pt [s_kMAXParticles]
 
float _b_e_deta [s_kMAXParticles]
 
float _b_e_dphi [s_kMAXParticles]
 
float _b_parent_pt [s_kMAXParticles]
 
float _b_parent_eta [s_kMAXParticles]
 
float _b_parent_phi [s_kMAXParticles]
 
int _b_grandparent_id [s_kMAXParticles]
 pid of the source of the photon 0 for prompt
 
int _b_nCluster [s_kMAXRecoMatch]
 
int _b_fLayer [s_kMAXRecoMatch]
 
float _b_cluster_dphi [s_kMAXRecoMatch]
 
float _b_cluster_deta [s_kMAXRecoMatch]
 
float _b_Mcluster_prob [s_kMAXRecoMatch]
 cluster prob for merged clusters
 
float _b_Scluster_prob [s_kMAXRecoMatch]
 cluster prob for split clusters
 
float _b_track_deta
 
int _b_track_layer
 
int _b_track_dlayer
 
float _b_track_pT
 
float _b_ttrack_pT
 
double _b_approach
 
double _b_vtx_radius
 
double _b_vtx_phi
 
double _b_vtx_eta
 
double _b_vtx_x
 
double _b_vtx_y
 
double _b_vtx_z
 
double _b_tvtx_eta
 
double _b_tvtx_x
 
double _b_tvtx_y
 
double _b_tvtx_z
 
double _b_tvtx_radius
 
double _b_tvtx_phi
 
double _b_vtxTrack_dist
 
float _b_vtx_chi2
 
float _b_photon_m
 
float _b_photon_pT
 
float _b_cluster_prob
 
float _b_track_dphi
 
float _bb_track_deta
 
int _bb_track_layer
 
int _bb_track_dlayer
 
float _bb_track_pT
 
double _bb_approach
 
double _bb_vtx_radius
 
double _bb_vtxTrack_dist
 
float _bb_vtx_chi2
 
float _bb_photon_m
 
float _bb_photon_pT
 
float _bb_cluster_prob
 
float _bb_track_dphi
 
int _bb_pid
 
RawClusterContainer _conversionClusters
 
float _kRAPIDITYACCEPT =1
 <TPC radius currently hardcoded
 

Static Private Attributes

static const int s_kMAXParticles =200
 increase this number if arrays go out of bounds
 
static const int s_kMAXRecoMatch =20
 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 33 of file VtxTest.h.

View newest version in sPHENIX GitHub at line 33 of file VtxTest.h

Constructor & Destructor Documentation

VtxTest::VtxTest ( const std::string &  name,
unsigned int  runnumber,
int  particleEmbed,
int  pythiaEmbed,
bool  makeTTree = true 
)
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 47 of file VtxTest.C.

View newest version in sPHENIX GitHub at line 47 of file VtxTest.C

References _foutname, and perf_headwind::name.

VtxTest::~VtxTest ( )

Definition at line 54 of file VtxTest.C.

View newest version in sPHENIX GitHub at line 54 of file VtxTest.C

References _f, and _vertexer.

Member Function Documentation

void VtxTest::doNodePointers ( PHCompositeNode topNode)
private

Definition at line 154 of file VtxTest.C.

View newest version in sPHENIX GitHub at line 154 of file VtxTest.C

References _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 VtxTest::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 481 of file VtxTest.C.

View newest version in sPHENIX GitHub at line 481 of file VtxTest.C

References _f, and _kMakeTTree.

void VtxTest::findChildren ( std::queue< std::pair< int, int >>  missing,
PHG4TruthInfoContainer truthinfo 
)
private

attempts to find other truth associated tracks for conversions with only 1 truth associated track

Definition at line 452 of file VtxTest.C.

View newest version in sPHENIX GitHub at line 452 of file VtxTest.C

References PHG4TruthInfoContainer::GetParticleRange(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

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

Definition at line 472 of file VtxTest.C.

View newest version in sPHENIX GitHub at line 472 of file VtxTest.C

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

+ Here is the call graph for this function:

const RawClusterContainer * VtxTest::getClusters ( ) const

get the clusters associated with converions

Definition at line 470 of file VtxTest.C.

View newest version in sPHENIX GitHub at line 470 of file VtxTest.C

References _conversionClusters.

std::queue< std::pair< int, int > > VtxTest::numUnique ( std::map< int, Conversion > *  map = NULL,
SvtxTrackEval trackEval = NULL,
RawClusterContainer mainClusterContainer = NULL 
)
private

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

Returns
currently will return nothing but can easily be changed to return a structure for the converions with only 1 truth associated track

Definition at line 252 of file VtxTest.C.

View newest version in sPHENIX GitHub at line 252 of file VtxTest.C

References _b_approach, _b_cluster_deta, _b_cluster_dphi, _b_cluster_prob, _b_e_deta, _b_e_dphi, _b_electron_pt, _b_fLayer, _b_grandparent_id, _b_Mcluster_prob, _b_nCluster, _b_nVtx, _b_parent_eta, _b_parent_phi, _b_parent_pt, _b_photon_m, _b_photon_pT, _b_positron_pt, _b_pythia, _b_Rpair, _b_rVtx, _b_Scluster_prob, _b_Tpair, _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_vtxTrack_dist, _clusterMap, _conversionClusters, _kMakeTTree, _kPythiaEmbed, _kRAPIDITYACCEPT, _signalCutTree, _vertexer, RawClusterContainer::AddCluster(), SVReco::findSecondaryVertex(), PHG4Particle::get_e(), RawCluster::get_phi(), RawCluster::get_prob(), PHG4Particle::get_px(), PHG4Particle::get_py(), PHG4Particle::get_pz(), PHG4VtxPoint::get_x(), RawCluster::get_x(), PHG4VtxPoint::get_y(), RawCluster::get_y(), PHG4VtxPoint::get_z(), RawCluster::get_z(), genfit::GFRaveVertex::getChi2(), genfit::GFRaveVertex::getPos(), i, Fun4AllBase::Name(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

void VtxTest::processBackground ( std::map< int, Conversion > *  map,
SvtxTrackEval trackEval,
TTree *  tree 
)
private
Parameters
mapshould contain Conversion objects which hold background events i.e. not conversions fills the fields for _backgroundCutTree

Definition at line 413 of file VtxTest.C.

View newest version in sPHENIX GitHub at line 413 of file VtxTest.C

References _bb_approach, _bb_cluster_prob, _bb_photon_m, _bb_photon_pT, _bb_pid, _bb_track_deta, _bb_track_dlayer, _bb_track_dphi, _bb_track_layer, _bb_track_pT, _bb_vtx_chi2, _bb_vtx_radius, _bb_vtxTrack_dist, _clusterMap, _mainClusterContainer, _vertexer, SVReco::findSecondaryVertex(), genfit::GFRaveVertex::getChi2(), RawClusterContainer::getCluster(), genfit::GFRaveVertex::getPos(), and i.

+ Here is the call graph for this function:

float VtxTest::vtoR ( PHG4VtxPoint vtx) const
private

Definition at line 476 of file VtxTest.C.

View newest version in sPHENIX GitHub at line 476 of file VtxTest.C

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

+ Here is the call graph for this function:

Member Data Documentation

TrkrClusterContainer* VtxTest::_clusterMap
private

Definition at line 89 of file VtxTest.h.

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

Referenced by doNodePointers(), numUnique(), and processBackground().

RawClusterContainer VtxTest::_conversionClusters
private

RawClusters associated with truth conversions processed by other modules

Definition at line 166 of file VtxTest.h.

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

Referenced by getClusters(), and numUnique().

TTree* VtxTest::_e_backgroundCutTree =NULL
private

EM background data for making track pair cuts.

Definition at line 86 of file VtxTest.h.

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

Referenced by InitRun().

TFile* VtxTest::_f =NULL
private

output file

Definition at line 82 of file VtxTest.h.

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

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

std::string VtxTest::_foutname
private

name of the output file

Definition at line 91 of file VtxTest.h.

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

Referenced by InitRun(), and VtxTest().

TTree* VtxTest::_h_backgroundCutTree =NULL
private

hadronic background data for making track pair cuts

Definition at line 85 of file VtxTest.h.

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

Referenced by InitRun().

SvtxHitMap* VtxTest::_hitMap
private

Definition at line 90 of file VtxTest.h.

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

const bool VtxTest::_kMakeTTree
private

Definition at line 80 of file VtxTest.h.

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

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

const int VtxTest::_kParticleEmbed
private

primary embedID

Definition at line 78 of file VtxTest.h.

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

const int VtxTest::_kPythiaEmbed
private

background event embedID i.e. pythia or AA

Definition at line 79 of file VtxTest.h.

View newest version in sPHENIX GitHub at line 79 of file VtxTest.h

Referenced by numUnique().

float VtxTest::_kRAPIDITYACCEPT =1
private

<TPC radius currently hardcoded

Definition at line 170 of file VtxTest.h.

View newest version in sPHENIX GitHub at line 170 of file VtxTest.h

Referenced by numUnique().

const unsigned int VtxTest::_kRunNumber
private

Definition at line 77 of file VtxTest.h.

View newest version in sPHENIX GitHub at line 77 of file VtxTest.h

Referenced by InitRun().

RawClusterContainer* VtxTest::_mainClusterContainer
private

contain 1 cluster associated with each conversion

Definition at line 87 of file VtxTest.h.

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

Referenced by doNodePointers(), and processBackground().

int VtxTest::_runNumber
private

for the TTree do not change

Definition at line 81 of file VtxTest.h.

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

Referenced by InitRun().

TTree* VtxTest::_signalCutTree =NULL
private

signal data for making track pair cuts

Definition at line 84 of file VtxTest.h.

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

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

TTree* VtxTest::_tree =NULL
private

stores most of the data about the conversions

Definition at line 83 of file VtxTest.h.

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

Referenced by InitRun().

PHG4TruthInfoContainer* VtxTest::_truthinfo
private

Definition at line 88 of file VtxTest.h.

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

Referenced by doNodePointers(), and process_event().

SVReco* VtxTest::_vertexer =NULL
private

for reco vertex finding

Definition at line 92 of file VtxTest.h.

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

Referenced by InitRun(), numUnique(), process_event(), processBackground(), and ~VtxTest().

const int VtxTest::s_kMAXParticles =200
staticprivate

increase this number if arrays go out of bounds

Definition at line 75 of file VtxTest.h.

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

const int VtxTest::s_kMAXRecoMatch =20
staticprivate

increase this number if arrays go out of bounds

Definition at line 76 of file VtxTest.h.

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

const int VtxTest::s_kTPCRADIUS =21
staticprivate

Definition at line 168 of file VtxTest.h.

View newest version in sPHENIX GitHub at line 168 of file VtxTest.h


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