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

#include <analysis/blob/master/EMCal-commissioning/emcalTreeMaker/src/caloTreeGen.h>

+ Inheritance diagram for caloTreeGen:
+ Collaboration diagram for caloTreeGen:

Public Member Functions

 caloTreeGen (const std::string &name="caloTreeGen")
 
 ~caloTreeGen () override
 
int Init (PHCompositeNode *topNode) override
 
int InitRun (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
int ResetEvent (PHCompositeNode *topNode) override
 Clean up internals after each event.
 
int EndRun (const int runnumber) override
 Called at the end of each run.
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
int Reset (PHCompositeNode *) override
 Reset.
 
void Print (const std::string &what="ALL") const override
 
void setClusters (int clusters)
 
void setFineClusters (int fineCluster)
 
 caloTreeGen (const std::string &name="caloTreeGen", const std::string &eventFile="test.json", const int eventNumber=0, const int runid=0, const float tow_cemc_min=0, const float tow_hcalin_min=0, const float tow_hcalout_min=0)
 
 ~caloTreeGen () override
 
int Init (PHCompositeNode *topNode) override
 
int InitRun (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
int ResetEvent (PHCompositeNode *topNode) override
 Clean up internals after each event.
 
int EndRun (const int runnumber) override
 Called at the end of each run.
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
int Reset (PHCompositeNode *) override
 Reset.
 
void Print (const std::string &what="ALL") const override
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
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

unsigned int getCaloTowerPhiBin (const unsigned int key)
 
unsigned int getCaloTowerEtaBin (const unsigned int key)
 
float getMaxTowerE (RawCluster *cluster, TowerInfoContainer *towerContainer)
 
std::vector< float > returnClusterTowE (RawCluster *cluster, TowerInfoContainer *towerContainer)
 
std::vector< int > returnClusterTowPhi (RawCluster *cluster, TowerInfoContainer *towerContainer)
 
std::vector< int > returnClusterTowEta (RawCluster *cluster, TowerInfoContainer *towerContainer)
 
unsigned int getCaloTowerPhiBin (const unsigned int key)
 
unsigned int getCaloTowerEtaBin (const unsigned int key)
 
float getMaxTowerE (RawCluster *cluster, TowerInfoContainer *towerContainer)
 
std::vector< float > returnClusterTowE (RawCluster *cluster, TowerInfoContainer *towerContainer)
 
std::vector< int > returnClusterTowPhi (RawCluster *cluster, TowerInfoContainer *towerContainer)
 
std::vector< int > returnClusterTowEta (RawCluster *cluster, TowerInfoContainer *towerContainer)
 

Private Attributes

TTree * T
 
std::vector< float > m_emcTowPhi
 
std::vector< float > m_emcTowEta
 
std::vector< float > m_emcTowE
 
std::vector< float > m_emcTiming
 
std::vector< float > m_emciEta
 
std::vector< float > m_emciPhi
 
std::vector< float > m_clusterE
 
std::vector< float > m_clusterPhi
 
std::vector< float > m_clusterEta
 
std::vector< float > m_clusterPt
 
std::vector< float > m_clusterChi
 
std::vector< float > m_clusterNtow
 
std::vector< float > m_clusterTowMax
 
std::vector< float > m_clusterECore
 
std::vector< std::vector< int > > m_clusTowEta
 
std::vector< std::vector< int > > m_clusTowPhi
 
std::vector< std::vector< float > > m_clusTowE
 
TFile * out
 
std::string Outfile = "commissioning.root"
 
int doClusters
 
float totalCaloE
 
int doFineCluster
 
std::vector< float > m_ohciTowPhi
 
std::vector< float > m_ohciTowEta
 
std::vector< float > m_ohcTowE
 
std::vector< float > m_ihciTowPhi
 
std::vector< float > m_ihciTowEta
 
std::vector< float > m_ihcTowE
 
std::string eventFile = "test.json"
 
int iEvent
 
int eventNumber
 
int runid
 
float tow_cemc_min
 
float tow_hcalin_min
 
float tow_hcalout_min
 
std::ofstream eventOutput
 
const float eta_map [24]
 
const float phi_map [64]
 

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 19 of file caloTreeGen.h.

View newest version in sPHENIX GitHub at line 19 of file caloTreeGen.h

Constructor & Destructor Documentation

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

Definition at line 39 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 39 of file caloTreeGen.cc

caloTreeGen::~caloTreeGen ( )
override

Definition at line 51 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 51 of file caloTreeGen.cc

caloTreeGen::caloTreeGen ( const std::string &  name = "caloTreeGen",
const std::string &  eventFile = "test.json",
const int  eventNumber = 0,
const int  runid = 0,
const float  tow_cemc_min = 0,
const float  tow_hcalin_min = 0,
const float  tow_hcalout_min = 0 
)

Definition at line 40 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 40 of file caloTreeGen.cc

caloTreeGen::~caloTreeGen ( )
override

Member Function Documentation

int caloTreeGen::End ( PHCompositeNode topNode)
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 238 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 238 of file caloTreeGen.cc

References cd(), Close(), Fun4AllReturnCodes::EVENT_OK, out, T, and Write().

+ Here is the call graph for this function:

int caloTreeGen::End ( PHCompositeNode topNode)
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

int caloTreeGen::EndRun ( const int  runnumber)
overridevirtual

Called at the end of each run.

Reimplemented from SubsysReco.

Definition at line 231 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 231 of file caloTreeGen.cc

References Fun4AllReturnCodes::EVENT_OK.

int caloTreeGen::EndRun ( const int  runnumber)
overridevirtual

Called at the end of each run.

Reimplemented from SubsysReco.

unsigned int caloTreeGen::getCaloTowerEtaBin ( const unsigned int  key)
private
unsigned int caloTreeGen::getCaloTowerEtaBin ( const unsigned int  key)
private

Definition at line 274 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 274 of file caloTreeGen.cc

References KF_timing::etabin.

Referenced by process_event().

+ Here is the caller graph for this function:

unsigned int caloTreeGen::getCaloTowerPhiBin ( const unsigned int  key)
private
unsigned int caloTreeGen::getCaloTowerPhiBin ( const unsigned int  key)
private

Definition at line 265 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 265 of file caloTreeGen.cc

References KF_timing::etabin.

Referenced by process_event().

+ Here is the caller graph for this function:

float caloTreeGen::getMaxTowerE ( RawCluster cluster,
TowerInfoContainer towerContainer 
)
private
float caloTreeGen::getMaxTowerE ( RawCluster cluster,
TowerInfoContainer towerContainer 
)
private

Definition at line 280 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 280 of file caloTreeGen.cc

Referenced by process_event().

+ Here is the caller graph for this function:

int caloTreeGen::Init ( PHCompositeNode topNode)
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 57 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 57 of file caloTreeGen.cc

References Branch(), Fun4AllReturnCodes::EVENT_OK, Fun4AllServer::instance(), m_clusterChi, m_clusterE, m_clusterECore, m_clusterEta, m_clusterNtow, m_clusterPhi, m_clusterPt, m_clusterTowMax, m_clusTowE, m_clusTowEta, m_clusTowPhi, m_emciEta, m_emciPhi, m_emcTiming, m_emcTowE, m_emcTowEta, m_emcTowPhi, out, Outfile, Print(), T, and totalCaloE.

+ Here is the call graph for this function:

int caloTreeGen::Init ( PHCompositeNode topNode)
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.

int caloTreeGen::InitRun ( PHCompositeNode topNode)
overridevirtual

Called for first event when run number is known. Typically this is where you may want to fetch data from database, because you know the run number. A place to book histograms which have to know the run number.

Reimplemented from SubsysReco.

Definition at line 97 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 97 of file caloTreeGen.cc

References Fun4AllReturnCodes::EVENT_OK.

int caloTreeGen::InitRun ( PHCompositeNode topNode)
overridevirtual

Called for first event when run number is known. Typically this is where you may want to fetch data from database, because you know the run number. A place to book histograms which have to know the run number.

Reimplemented from SubsysReco.

void caloTreeGen::Print ( const std::string &  what = "ALL") const
overridevirtual

Print out some info about this module.

Parameters
whatcan be used to specify what to print exactly.

Reimplemented from Fun4AllBase.

Definition at line 259 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 259 of file caloTreeGen.cc

Referenced by Init().

+ Here is the caller graph for this function:

void caloTreeGen::Print ( const std::string &  what = "ALL") const
overridevirtual

Print out some info about this module.

Parameters
whatcan be used to specify what to print exactly.

Reimplemented from Fun4AllBase.

int caloTreeGen::process_event ( PHCompositeNode topNode)
overridevirtual
int caloTreeGen::process_event ( PHCompositeNode topNode)
overridevirtual

Called for each event. This is where you do the real work.

Reimplemented from SubsysReco.

int caloTreeGen::Reset ( PHCompositeNode topNode)
overridevirtual

Reset.

Reimplemented from SubsysReco.

Definition at line 252 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 252 of file caloTreeGen.cc

References Fun4AllReturnCodes::EVENT_OK.

int caloTreeGen::Reset ( PHCompositeNode )
overridevirtual

Reset.

Reimplemented from SubsysReco.

int caloTreeGen::ResetEvent ( PHCompositeNode topNode)
overridevirtual

Clean up internals after each event.

Reimplemented from SubsysReco.

Definition at line 205 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 205 of file caloTreeGen.cc

References Fun4AllReturnCodes::EVENT_OK, m_clusterChi, m_clusterE, m_clusterECore, m_clusterEta, m_clusterNtow, m_clusterPhi, m_clusterPt, m_clusterTowMax, m_clusTowE, m_clusTowEta, m_clusTowPhi, m_emciEta, m_emciPhi, m_emcTiming, m_emcTowE, m_emcTowEta, and m_emcTowPhi.

int caloTreeGen::ResetEvent ( PHCompositeNode topNode)
overridevirtual

Clean up internals after each event.

Reimplemented from SubsysReco.

std::vector<float> caloTreeGen::returnClusterTowE ( RawCluster cluster,
TowerInfoContainer towerContainer 
)
private
std::vector< float > caloTreeGen::returnClusterTowE ( RawCluster cluster,
TowerInfoContainer towerContainer 
)
private

Definition at line 316 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 316 of file caloTreeGen.cc

Referenced by process_event().

+ Here is the caller graph for this function:

std::vector<int> caloTreeGen::returnClusterTowEta ( RawCluster cluster,
TowerInfoContainer towerContainer 
)
private
std::vector< int > caloTreeGen::returnClusterTowEta ( RawCluster cluster,
TowerInfoContainer towerContainer 
)
private

Definition at line 295 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 295 of file caloTreeGen.cc

References RawTowerDefs::decode_index1().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector<int> caloTreeGen::returnClusterTowPhi ( RawCluster cluster,
TowerInfoContainer towerContainer 
)
private
std::vector< int > caloTreeGen::returnClusterTowPhi ( RawCluster cluster,
TowerInfoContainer towerContainer 
)
private

Definition at line 306 of file caloTreeGen.cc.

View newest version in sPHENIX GitHub at line 306 of file caloTreeGen.cc

References RawTowerDefs::decode_index2().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void caloTreeGen::setClusters ( int  clusters)
inline

Definition at line 60 of file caloTreeGen.h.

View newest version in sPHENIX GitHub at line 60 of file caloTreeGen.h

References clusters, and doClusters.

void caloTreeGen::setFineClusters ( int  fineCluster)
inline

Definition at line 62 of file caloTreeGen.h.

View newest version in sPHENIX GitHub at line 62 of file caloTreeGen.h

References doFineCluster.

Member Data Documentation

int caloTreeGen::doClusters
private

Definition at line 100 of file caloTreeGen.h.

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

Referenced by process_event(), and setClusters().

int caloTreeGen::doFineCluster
private

Definition at line 103 of file caloTreeGen.h.

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

Referenced by process_event(), and setFineClusters().

const float caloTreeGen::eta_map[24]
private
Initial value:
= {-1.05417, -0.9625, -0.870833, -0.779167, -0.6875, -0.595833, -0.504167, -0.4125, -0.320833, -0.229167, -0.1375, -0.0458333,
0.0458333, 0.1375, 0.229167, 0.320833, 0.4125, 0.504167, 0.595833, 0.6875, 0.779167, 0.870833, 0.9625, 1.05417}

Definition at line 108 of file caloTreeGen.h.

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

std::string caloTreeGen::eventFile = "test.json"
private

Definition at line 89 of file caloTreeGen.h.

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

int caloTreeGen::eventNumber
private

Definition at line 100 of file caloTreeGen.h.

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

std::ofstream caloTreeGen::eventOutput
private

Definition at line 106 of file caloTreeGen.h.

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

int caloTreeGen::iEvent
private

Definition at line 99 of file caloTreeGen.h.

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

std::vector<float> caloTreeGen::m_clusterChi
private

Definition at line 79 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<float> caloTreeGen::m_clusterE
private

Definition at line 75 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<float> caloTreeGen::m_clusterECore
private

Definition at line 82 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<float> caloTreeGen::m_clusterEta
private

Definition at line 77 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<float> caloTreeGen::m_clusterNtow
private

Definition at line 80 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<float> caloTreeGen::m_clusterPhi
private

Definition at line 76 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<float> caloTreeGen::m_clusterPt
private

Definition at line 78 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<float> caloTreeGen::m_clusterTowMax
private

Definition at line 81 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<std::vector<float> > caloTreeGen::m_clusTowE
private

Definition at line 86 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<std::vector<int> > caloTreeGen::m_clusTowEta
private

Definition at line 84 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<std::vector<int> > caloTreeGen::m_clusTowPhi
private

Definition at line 85 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector< float > caloTreeGen::m_emciEta
private

Definition at line 72 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector< float > caloTreeGen::m_emciPhi
private

Definition at line 73 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector< float > caloTreeGen::m_emcTiming
private

Definition at line 71 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector< float > caloTreeGen::m_emcTowE
private

Definition at line 70 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector< float > caloTreeGen::m_emcTowEta
private

Definition at line 69 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector< float > caloTreeGen::m_emcTowPhi
private

Definition at line 68 of file caloTreeGen.h.

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

Referenced by Init(), process_event(), and ResetEvent().

std::vector<float> caloTreeGen::m_ihciTowEta
private

Definition at line 83 of file caloTreeGen.h.

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

std::vector<float> caloTreeGen::m_ihciTowPhi
private

Definition at line 82 of file caloTreeGen.h.

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

std::vector<float> caloTreeGen::m_ihcTowE
private

Definition at line 84 of file caloTreeGen.h.

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

std::vector<float> caloTreeGen::m_ohciTowEta
private

Definition at line 79 of file caloTreeGen.h.

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

std::vector<float> caloTreeGen::m_ohciTowPhi
private

Definition at line 78 of file caloTreeGen.h.

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

std::vector<float> caloTreeGen::m_ohcTowE
private

Definition at line 80 of file caloTreeGen.h.

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

TFile * caloTreeGen::out
private

Definition at line 89 of file caloTreeGen.h.

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

Referenced by End(), and Init().

std::string caloTreeGen::Outfile = "commissioning.root"
private

Definition at line 91 of file caloTreeGen.h.

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

Referenced by Init().

const float caloTreeGen::phi_map[64]
private
Initial value:
= {0.0490874, 0.147262, 0.245437, 0.343612, 0.441786, 0.539961, 0.638136, 0.736311,
0.834486, 0.93266, 1.03084, 1.12901, 1.22718, 1.32536, 1.42353, 1.52171,
1.61988, 1.71806, 1.81623, 1.91441, 2.01258, 2.11076, 2.20893, 2.30711,
2.40528, 2.50346, 2.60163, 2.69981, 2.79798, 2.89616, 2.99433, 3.09251,
3.19068, 3.28885, 3.38703, 3.4852, 3.58338, 3.68155, 3.77973, 3.8779,
3.97608, 4.07425, 4.17243, 4.2706, 4.36878, 4.46695, 4.56513, 4.6633,
4.76148, 4.85965, 4.95783, 5.056, 5.15418, 5.25235, 5.35052, 5.4487,
5.54687, 5.64505, 5.74322, 5.8414, 5.93957, 6.03775, 6.13592, 6.2341}

Definition at line 111 of file caloTreeGen.h.

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

int caloTreeGen::runid
private

Definition at line 101 of file caloTreeGen.h.

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

TTree * caloTreeGen::T
private

Definition at line 66 of file caloTreeGen.h.

View newest version in sPHENIX GitHub at line 66 of file caloTreeGen.h

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

float caloTreeGen::totalCaloE
private

Definition at line 102 of file caloTreeGen.h.

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

Referenced by Init(), and process_event().

float caloTreeGen::tow_cemc_min
private

Definition at line 102 of file caloTreeGen.h.

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

float caloTreeGen::tow_hcalin_min
private

Definition at line 103 of file caloTreeGen.h.

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

float caloTreeGen::tow_hcalout_min
private

Definition at line 104 of file caloTreeGen.h.

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


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