Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TruthNodeMaker Class Reference

An SubsysReco module to create a set of SQ nodes for the simulation true info. More...

#include </dev/shm/kenichi/update-github-e1039-doc/e1039-core/simulation/g4dst/TruthNodeMaker.h>

+ Inheritance diagram for TruthNodeMaker:
+ Collaboration diagram for TruthNodeMaker:

Public Member Functions

 TruthNodeMaker ()
 
virtual ~TruthNodeMaker ()
 
int Init (PHCompositeNode *topNode)
 
int InitRun (PHCompositeNode *topNode)
 
int process_event (PHCompositeNode *topNode)
 
int End (PHCompositeNode *topNode)
 Called at the end of all processing. More...
 
void set_legacy_rec_container (bool b=true)
 
void set_matching_threshold (double threshold)
 
- Public Member Functions inherited from SubsysReco
virtual ~SubsysReco ()
 
virtual int EndRun (const int)
 Called at the end of each run. More...
 
virtual int Reset (PHCompositeNode *)
 Reset. More...
 
virtual int ResetEvent (PHCompositeNode *)
 Clean up after each event. More...
 
virtual void Print (const std::string &what="ALL") const
 
- Public Member Functions inherited from Fun4AllBase
virtual ~Fun4AllBase ()
 
virtual const std::string Name () const
 Returns the name of this module. More...
 
virtual void Name (const std::string &name)
 Sets the name of this module. More...
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet). More...
 
virtual void Verbosity (enu_Verbosity ival)
 Sets the verbosity of this module (0 by default=quiet). More...
 
virtual int Verbosity () const
 Gets the verbosity of this module. More...
 

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 Fun4AllBase
 Fun4AllBase (const std::string &name="NONAME")
 
- Protected Attributes inherited from Fun4AllBase
std::string ThisName
 
int verbosity
 The verbosity level. 0 means not verbose at all. More...
 

Detailed Description

An SubsysReco module to create a set of SQ nodes for the simulation true info.

This module adds the following SQ nodes to the DST top node;

The contents of these nodes are not original but extracted from HepMC::GenEvent, PHG4TruthInfoContainer, etc. Thus you can extract the same or more detailed info when necessary.

The info on the true tracks is stored in HepMC::GenEvent as well, where it is extracted from PHG4TruthInfoContainer in this module. It is because the positions/momenta of tracks at Stations 1 and 3 are accessible only via PHG4TruthInfoContainer. As a side effect, the parent particle type (i.e. PDG ID) of each muon pair is not available now, which is stored only in HepMC::GenEvent. Analyzer should use the (true) invariant mass of muon pair to identify its parent particle type.

Definition at line 41 of file TruthNodeMaker.h.

Constructor & Destructor Documentation

TruthNodeMaker::TruthNodeMaker ( )

Definition at line 27 of file TruthNodeMaker.cc.

References nChamberPlanes.

TruthNodeMaker::~TruthNodeMaker ( )
virtual

Definition at line 48 of file TruthNodeMaker.cc.

Member Function Documentation

int TruthNodeMaker::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 271 of file TruthNodeMaker.cc.

References Fun4AllReturnCodes::EVENT_OK.

int TruthNodeMaker::Init ( PHCompositeNode )
virtual

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 56 of file TruthNodeMaker.cc.

References Fun4AllReturnCodes::EVENT_OK.

int TruthNodeMaker::InitRun ( PHCompositeNode )
virtual

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 61 of file TruthNodeMaker.cc.

References Fun4AllReturnCodes::EVENT_OK.

int TruthNodeMaker::process_event ( PHCompositeNode )
virtual

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

Extract the hard process.

Extract the true-track info

Construct the dimuon info

link digi hits to truth tracks

Update truth track pos/mom at station-1/3

optionally, link the rec track to truth track

Reimplemented from SubsysReco.

Definition at line 70 of file TruthNodeMaker.cc.

References SQTrackVector::at(), SQHitVector::at(), PHHepMCGenEventMap::begin(), SQTrackVector::clear(), SQDimuonVector::clear(), PHHepMCGenEventMap::end(), Fun4AllReturnCodes::EVENT_OK, SQTrack::get_charge(), SQHit::get_detector_id(), PHG4Particle::get_e(), SQTrack::get_mom_vtx(), PHG4Particle::get_pid(), SQTrack::get_pos_vtx(), PHG4Particle::get_px(), PHG4Particle::get_py(), PHG4Particle::get_pz(), SQTrack::get_track_id(), PHG4Particle::get_track_id(), SQHit::get_track_id(), PHG4Particle::get_vtx_id(), PHG4VtxPoint::get_x(), PHG4VtxPoint::get_y(), PHG4VtxPoint::get_z(), PHHepMCGenEvent::getEvent(), SRecTrack::getHitIndex(), SRecTrack::getNHits(), SRecEvent::getNTracks(), PHG4TruthInfoContainer::GetPrimaryParticleRange(), SRecEvent::getTrack(), PHG4TruthInfoContainer::GetVtx(), nChamberPlanes, SQTrackVector::push_back(), SQDimuonVector::push_back(), SQTrack_v1::set_charge(), SQDimuon_v1::set_dimuon_id(), SQEvent::set_event_id(), SQDimuon_v1::set_mom(), SQDimuon_v1::set_mom_neg(), SQDimuon_v1::set_mom_pos(), SQTrack::set_mom_st1(), SQTrack::set_mom_st3(), SQTrack_v1::set_mom_vtx(), SQTrack::set_num_hits(), SQMCEvent::set_particle_id(), SQMCEvent::set_particle_momentum(), SQDimuon_v1::set_pos(), SQTrack::set_pos_st1(), SQTrack::set_pos_st3(), SQTrack_v1::set_pos_vtx(), SQMCEvent::set_process_id(), SQTrack::set_rec_track_id(), SQEvent::set_run_id(), SQEvent::set_spill_id(), SQTrack_v1::set_track_id(), SQDimuon_v1::set_track_id_neg(), SQDimuon_v1::set_track_id_pos(), SQTrackVector::size(), PHHepMCGenEventMap::size(), and SQHitVector::size().

void TruthNodeMaker::set_legacy_rec_container ( bool  b = true)
inline

Definition at line 72 of file TruthNodeMaker.h.

Referenced by RecoE1039Sim().

+ Here is the caller graph for this function:

void TruthNodeMaker::set_matching_threshold ( double  threshold)
inline

Definition at line 73 of file TruthNodeMaker.h.


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