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

#include <analysis/blob/master/HF-Jet/HighDCATrackCounting/TracksInJets.h>

+ Inheritance diagram for TracksInJets:
+ Collaboration diagram for TracksInJets:

Public Member Functions

 TracksInJets (const std::string &name="TracksInJets", const std::string &out="TracksInJets.root")
 
 ~TracksInJets () override
 
void minTruthJetPt (const float pt)
 
void truthJetMapName (const std::string &name)
 
void recoJetMapName (const std::string &name)
 
int Init (PHCompositeNode *topNode) override
 
int InitRun (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
int ResetEvent (PHCompositeNode *topNode) override
 Clean up after each event.
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
 TracksInJets (const std::string &recojetname="AntiKt_Tower_r04", const std::string &outputfilename="tracksinjets.root")
 
 ~TracksInJets () 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

void setBranches ()
 
float dR (const float &eta1, const float &eta2, const float &phi1, const float &phi2)
 

Private Attributes

std::string m_outfilename = "TracksInJets.root"
 
std::string m_truthjetmapname = "AntiKt_Truth_r04"
 
std::string m_recojetmapname = "AntiKt_ParticleFlow_r04"
 
TFile * m_outfile = nullptr
 
TTree * m_tree = nullptr
 
int m_embeddingid = 1
 
float m_minjettruthpt = 10
 
float m_truthjetpx
 
float m_truthjetpy
 
float m_truthjetpz
 
float m_truthjete
 
float m_recojetpx
 
float m_recojetpy
 
float m_recojetpz
 
float m_recojete
 
int m_truthjetconst
 
int m_recojetconst
 
std::vector< float > m_truthjettrackpx
 
std::vector< float > m_truthjettrackpy
 
std::vector< float > m_truthjettrackpz
 
std::vector< float > m_truthjettrackpid
 
std::vector< float > m_truthjettrackvx
 
std::vector< float > m_truthjettrackvy
 
std::vector< float > m_truthjettrackvz
 
std::vector< float > m_recojettrackpx
 
std::vector< float > m_recojettrackpy
 
std::vector< float > m_recojettrackpz
 
std::vector< float > m_recojettracke
 
std::vector
< ParticleFlowElement::PFLOWTYPE
m_recojettracktype
 
std::vector< float > m_recojettrackvx
 
std::vector< float > m_recojettrackvy
 
std::vector< float > m_recojettrackvz
 
std::vector< float > m_recojettrackpcax
 
std::vector< float > m_recojettrackpcay
 
std::vector< float > m_recojettrackpcaz
 
std::string m_recoJetName
 
float m_trk_pt_cut
 
float m_jetRadius
 
std::string m_outputFileName
 
TH3 * m_h_track_vs_calo_pt
 

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 15 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 15 of file TracksInJets.h

Constructor & Destructor Documentation

TracksInJets::TracksInJets ( const std::string &  name = "TracksInJets",
const std::string &  out = "TracksInJets.root" 
)

Definition at line 36 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 36 of file TracksInJets.cc

TracksInJets::~TracksInJets ( )
override

Definition at line 44 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 44 of file TracksInJets.cc

TracksInJets::TracksInJets ( const std::string &  recojetname = "AntiKt_Tower_r04",
const std::string &  outputfilename = "tracksinjets.root" 
)
TracksInJets::~TracksInJets ( )
override

Member Function Documentation

float TracksInJets::dR ( const float &  eta1,
const float &  eta2,
const float &  phi1,
const float &  phi2 
)
private

Definition at line 287 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 287 of file TracksInJets.cc

References INTTVtxZ::dphi.

Referenced by process_event().

+ Here is the caller graph for this function:

int TracksInJets::End ( PHCompositeNode )
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 243 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 243 of file TracksInJets.cc

References Fun4AllReturnCodes::EVENT_OK, and m_outfile.

int TracksInJets::End ( PHCompositeNode topNode)
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

int TracksInJets::EndRun ( const int  runnumber)
overridevirtual

Called at the end of each run.

Reimplemented from SubsysReco.

Definition at line 149 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 149 of file TracksInJets.cc

References Fun4AllReturnCodes::EVENT_OK.

int TracksInJets::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 49 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 49 of file TracksInJets.cc

References Fun4AllReturnCodes::EVENT_OK.

int TracksInJets::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 TracksInJets::InitRun ( PHCompositeNode )
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.

Reimplemented from SubsysReco.

Definition at line 55 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 55 of file TracksInJets.cc

References Fun4AllReturnCodes::EVENT_OK, m_outfile, m_outfilename, m_tree, and setBranches().

+ Here is the call graph for this function:

int TracksInJets::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 TracksInJets::minTruthJetPt ( const float  pt)
inline

Definition at line 23 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 23 of file TracksInJets.h

References m_minjettruthpt, and physmon_track_finding_ttbar::pt.

void TracksInJets::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 180 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 180 of file TracksInJets.cc

int TracksInJets::process_event ( PHCompositeNode )
overridevirtual

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

no good jet found, continue

matchedrecojet is the reco jet matched to truthjet

Reimplemented from SubsysReco.

Definition at line 65 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 65 of file TracksInJets.cc

References Fun4AllReturnCodes::ABORTEVENT, JetMap::begin(), Jet::begin_comp(), dR(), JetMap::end(), Jet::end_comp(), Fun4AllReturnCodes::EVENT_OK, PHHepMCGenEventMap::get(), ParticleFlowElement::get_e(), Jet::get_e(), Jet::get_eta(), Jet::get_phi(), Jet::get_pt(), ParticleFlowElement::get_px(), Jet::get_px(), ParticleFlowElement::get_py(), Jet::get_py(), ParticleFlowElement::get_pz(), Jet::get_pz(), JetEvalStack::get_truth_eval(), ParticleFlowElement::get_type(), PHG4VtxPoint::get_x(), ParticleFlowElementContainer::getParticleFlowElement(), PHG4TruthInfoContainer::GetPrimaryVertexIndex(), PHG4TruthInfoContainer::GetPrimaryVtx(), PHHepMCGenEventMap::identify(), m_embeddingid, m_minjettruthpt, m_recojetconst, m_recojete, m_recojetmapname, m_recojetpx, m_recojetpy, m_recojetpz, m_recojettracke, m_recojettrackpx, m_recojettrackpy, m_recojettrackpz, m_recojettracktype, m_tree, m_truthjetconst, m_truthjete, m_truthjetmapname, m_truthjetpx, m_truthjetpy, m_truthjetpz, m_truthjettrackpx, m_truthjettrackpy, m_truthjettrackpz, m_truthjettrackvx, m_truthjettrackvy, m_truthjettrackvz, SvtxEvalStack::next_event(), PHWHERE, Jet::size_comp(), and parse_cmake_options::type.

+ Here is the call graph for this function:

int TracksInJets::process_event ( PHCompositeNode topNode)
overridevirtual

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

Reimplemented from SubsysReco.

void TracksInJets::recoJetMapName ( const std::string &  name)
inline

Definition at line 25 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 25 of file TracksInJets.h

References m_recojetmapname, and perf_headwind::name.

int TracksInJets::Reset ( PHCompositeNode topNode)
overridevirtual

Reset.

Reimplemented from SubsysReco.

Definition at line 173 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 173 of file TracksInJets.cc

References Fun4AllReturnCodes::EVENT_OK.

int TracksInJets::ResetEvent ( PHCompositeNode topNode)
overridevirtual

Clean up internals after each event.

Reimplemented from SubsysReco.

void TracksInJets::setBranches ( )
private

Definition at line 250 of file TracksInJets.cc.

View newest version in sPHENIX GitHub at line 250 of file TracksInJets.cc

References m_recojetconst, m_recojete, m_recojetpx, m_recojetpy, m_recojetpz, m_recojettracke, m_recojettrackpcax, m_recojettrackpcay, m_recojettrackpcaz, m_recojettrackpx, m_recojettrackpy, m_recojettrackpz, m_recojettracktype, m_recojettrackvx, m_recojettrackvy, m_recojettrackvz, m_tree, m_truthjetconst, m_truthjete, m_truthjetpx, m_truthjetpy, m_truthjetpz, m_truthjettrackpid, m_truthjettrackpx, m_truthjettrackpy, m_truthjettrackpz, m_truthjettrackvx, m_truthjettrackvy, and m_truthjettrackvz.

Referenced by InitRun().

+ Here is the caller graph for this function:

void TracksInJets::truthJetMapName ( const std::string &  name)
inline

Definition at line 24 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 24 of file TracksInJets.h

References m_truthjetmapname, and perf_headwind::name.

Member Data Documentation

int TracksInJets::m_embeddingid = 1
private

Definition at line 44 of file TracksInJets.h.

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

Referenced by process_event().

TH3* TracksInJets::m_h_track_vs_calo_pt
private

Definition at line 61 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 61 of file TracksInJets.h

float TracksInJets::m_jetRadius
private

Definition at line 59 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 59 of file TracksInJets.h

float TracksInJets::m_minjettruthpt = 10
private

Definition at line 45 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 45 of file TracksInJets.h

Referenced by minTruthJetPt(), and process_event().

TFile* TracksInJets::m_outfile = nullptr
private

Definition at line 41 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 41 of file TracksInJets.h

Referenced by End(), and InitRun().

std::string TracksInJets::m_outfilename = "TracksInJets.root"
private

Definition at line 37 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 37 of file TracksInJets.h

Referenced by InitRun().

std::string TracksInJets::m_outputFileName
private

Definition at line 60 of file TracksInJets.h.

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

int TracksInJets::m_recojetconst
private

Definition at line 56 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 56 of file TracksInJets.h

Referenced by process_event(), and setBranches().

float TracksInJets::m_recojete
private

Definition at line 54 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 54 of file TracksInJets.h

Referenced by process_event(), and setBranches().

std::string TracksInJets::m_recojetmapname = "AntiKt_ParticleFlow_r04"
private

Definition at line 39 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 39 of file TracksInJets.h

Referenced by process_event(), and recoJetMapName().

std::string TracksInJets::m_recoJetName
private

Definition at line 57 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 57 of file TracksInJets.h

float TracksInJets::m_recojetpx
private

Definition at line 51 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 51 of file TracksInJets.h

Referenced by process_event(), and setBranches().

float TracksInJets::m_recojetpy
private

Definition at line 52 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 52 of file TracksInJets.h

Referenced by process_event(), and setBranches().

float TracksInJets::m_recojetpz
private

Definition at line 53 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 53 of file TracksInJets.h

Referenced by process_event(), and setBranches().

std::vector<float> TracksInJets::m_recojettracke
private

Definition at line 69 of file TracksInJets.h.

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

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

std::vector<float> TracksInJets::m_recojettrackpcax
private

Definition at line 74 of file TracksInJets.h.

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

Referenced by ResetEvent(), and setBranches().

std::vector<float> TracksInJets::m_recojettrackpcay
private

Definition at line 75 of file TracksInJets.h.

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

Referenced by ResetEvent(), and setBranches().

std::vector<float> TracksInJets::m_recojettrackpcaz
private

Definition at line 76 of file TracksInJets.h.

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

Referenced by ResetEvent(), and setBranches().

std::vector<float> TracksInJets::m_recojettrackpx
private

Definition at line 66 of file TracksInJets.h.

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

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

std::vector<float> TracksInJets::m_recojettrackpy
private

Definition at line 67 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 67 of file TracksInJets.h

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

std::vector<float> TracksInJets::m_recojettrackpz
private

Definition at line 68 of file TracksInJets.h.

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

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

std::vector<ParticleFlowElement::PFLOWTYPE> TracksInJets::m_recojettracktype
private

Definition at line 70 of file TracksInJets.h.

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

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

std::vector<float> TracksInJets::m_recojettrackvx
private

Definition at line 71 of file TracksInJets.h.

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

Referenced by ResetEvent(), and setBranches().

std::vector<float> TracksInJets::m_recojettrackvy
private

Definition at line 72 of file TracksInJets.h.

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

Referenced by ResetEvent(), and setBranches().

std::vector<float> TracksInJets::m_recojettrackvz
private

Definition at line 73 of file TracksInJets.h.

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

Referenced by ResetEvent(), and setBranches().

TTree* TracksInJets::m_tree = nullptr
private

Definition at line 42 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 42 of file TracksInJets.h

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

float TracksInJets::m_trk_pt_cut
private

Definition at line 58 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 58 of file TracksInJets.h

int TracksInJets::m_truthjetconst
private

Definition at line 55 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 55 of file TracksInJets.h

Referenced by process_event(), and setBranches().

float TracksInJets::m_truthjete
private

Definition at line 50 of file TracksInJets.h.

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

Referenced by process_event(), and setBranches().

std::string TracksInJets::m_truthjetmapname = "AntiKt_Truth_r04"
private

Definition at line 38 of file TracksInJets.h.

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

Referenced by process_event(), and truthJetMapName().

float TracksInJets::m_truthjetpx
private

Definition at line 47 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 47 of file TracksInJets.h

Referenced by process_event(), and setBranches().

float TracksInJets::m_truthjetpy
private

Definition at line 48 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 48 of file TracksInJets.h

Referenced by process_event(), and setBranches().

float TracksInJets::m_truthjetpz
private

Definition at line 49 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 49 of file TracksInJets.h

Referenced by process_event(), and setBranches().

std::vector<float> TracksInJets::m_truthjettrackpid
private

Definition at line 61 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 61 of file TracksInJets.h

Referenced by ResetEvent(), and setBranches().

std::vector<float> TracksInJets::m_truthjettrackpx
private

Definition at line 58 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 58 of file TracksInJets.h

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

std::vector<float> TracksInJets::m_truthjettrackpy
private

Definition at line 59 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 59 of file TracksInJets.h

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

std::vector<float> TracksInJets::m_truthjettrackpz
private

Definition at line 60 of file TracksInJets.h.

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

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

std::vector<float> TracksInJets::m_truthjettrackvx
private

Definition at line 62 of file TracksInJets.h.

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

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

std::vector<float> TracksInJets::m_truthjettrackvy
private

Definition at line 63 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 63 of file TracksInJets.h

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

std::vector<float> TracksInJets::m_truthjettrackvz
private

Definition at line 64 of file TracksInJets.h.

View newest version in sPHENIX GitHub at line 64 of file TracksInJets.h

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


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