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

#include <analysis/blob/master/EICAnalysis/DISKinematicsReco.h>

+ Inheritance diagram for DISKinematicsReco:
+ Collaboration diagram for DISKinematicsReco:

Public Member Functions

 DISKinematicsReco (std::string filename)
 
int Init (PHCompositeNode *)
 
int InitRun (PHCompositeNode *)
 
int process_event (PHCompositeNode *)
 
int End (PHCompositeNode *)
 Called at the end of all processing.
 
void set_beam_energies (float beam_electron, float beam_proton)
 
void set_do_process_geant4_cluster (bool select)
 
void set_do_process_truth (bool select)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int EndRun (const int)
 Called at the end of each run.
 
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

int CollectEmCandidatesFromCluster (type_map_tcan &)
 
int CollectEmCandidatesFromTruth (type_map_tcan &)
 
int InsertCandidateFromCluster (type_map_tcan &, RawCluster *, CaloEvalStack *, SvtxTrackMap *)
 
int AddGlobalCalorimeterInformation ()
 
int AddReconstructedKinematics (type_map_tcan &, std::string)
 
int WriteCandidatesToTree (type_map_tcan &)
 
int AddTruthEventInformation ()
 
PidCandidateFindMinDeltaRCandidate (type_map_tcan *, const float, const float)
 
float CalculateDeltaR (float, float, float, float)
 
void ResetBranchMap ()
 

Private Attributes

const float _mproton
 
bool _verbose
 
bool _save_towers
 
bool _save_tracks
 
bool _do_process_geant4_cluster
 
bool _do_process_truth
 
int _ievent
 
int _total_pass
 
std::string _filename
 
TFile * _tfile
 
TTree * _tree_event_cluster
 
TTree * _tree_event_truth
 
float _beam_electron_ptotal
 
float _beam_hadron_ptotal
 
std::map< std::string,
CaloRawTowerEval * > 
_map_towereval
 
TrackProjectorPlaneECAL_trackproj
 
std::map
< PidCandidate::PROPERTY,
std::vector< float > > 
_map_em_candidate_branches
 
std::map< std::string, float > _map_event_branches
 
PHCompositeNode_topNode
 

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 DISKinematicsReco.h.

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

Constructor & Destructor Documentation

DISKinematicsReco::DISKinematicsReco ( std::string  filename)

Definition at line 49 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 49 of file DISKinematicsReco.C

Member Function Documentation

int DISKinematicsReco::AddGlobalCalorimeterInformation ( )
private

Definition at line 687 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 687 of file DISKinematicsReco.C

References _map_event_branches, _topNode, RawTower::get_energy(), RawTowerGeom::get_eta(), RawTowerGeom::get_phi(), RawTowerGeomContainer::get_tower_geometry(), RawTowerContainer::getTowers(), i, PHWHERE, and G4HCALIN::tower_emin.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int DISKinematicsReco::AddReconstructedKinematics ( type_map_tcan em_candidates,
std::string  mode 
)
private

Definition at line 838 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 838 of file DISKinematicsReco.C

References _beam_electron_ptotal, _beam_hadron_ptotal, _mproton, PidCandidate::em_cluster_e, PidCandidate::em_cluster_theta, PidCandidate::em_evtgen_ptotal, PidCandidate::em_evtgen_theta, PidCandidate::em_reco_q2_e, PidCandidate::em_reco_w_e, PidCandidate::em_reco_x_e, PidCandidate::em_reco_y_e, PidCandidate::get_property_float(), and PidCandidate::set_property().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int DISKinematicsReco::AddTruthEventInformation ( )
private

Definition at line 903 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 903 of file DISKinematicsReco.C

References _beam_electron_ptotal, _beam_hadron_ptotal, _map_event_branches, _mproton, _topNode, PHHepMCGenEventMap::get(), PHHepMCGenEvent::getEvent(), PHHepMCGenEventMap::identify(), and PHWHERE.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float DISKinematicsReco::CalculateDeltaR ( float  eta1,
float  phi1,
float  eta2,
float  phi2 
)
private

Calculate Delta R ("distance in eta-phi space") between two sets of eta, phi angles

Definition at line 824 of file DISKinematicsReco.C.

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

int DISKinematicsReco::CollectEmCandidatesFromCluster ( type_map_tcan electronCandidateMap)
private

Definition at line 265 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 265 of file DISKinematicsReco.C

References _topNode, RawCluster::get_energy(), RawClusterContainer::getCluster(), ambiguity_solver_full_chain::idx, InsertCandidateFromCluster(), k, PHWHERE, and RawClusterContainer::size().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int DISKinematicsReco::CollectEmCandidatesFromTruth ( type_map_tcan candidateMap)
private

Definition at line 307 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 307 of file DISKinematicsReco.C

References _topNode, charge(), PidCandidate::em_evtgen_charge, PidCandidate::em_evtgen_eta, PidCandidate::em_evtgen_is_scattered_lepton, PidCandidate::em_evtgen_phi, PidCandidate::em_evtgen_pid, PidCandidate::em_evtgen_ptotal, PidCandidate::em_evtgen_theta, TruthTrackerHepMC::FindScatteredLepton(), PHHepMCGenEventMap::get(), PidCandidatev1::get_candidate_id(), PHHepMCGenEvent::getEvent(), PHHepMCGenEventMap::identify(), merge_hashes::p, PHWHERE, PidCandidatev1::set_candidate_id(), TruthTrackerHepMC::set_hepmc_geneventmap(), PidCandidatev1::set_property(), and tc.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int DISKinematicsReco::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 982 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 982 of file DISKinematicsReco.C

References _tfile, _tree_event_cluster, and _tree_event_truth.

PidCandidate * DISKinematicsReco::FindMinDeltaRCandidate ( type_map_tcan candidates,
const float  eta_ref,
const float  phi_ref 
)
private

Find tau candidate in map that is closest to given eta, phi angle

Definition at line 814 of file DISKinematicsReco.C.

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

int DISKinematicsReco::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 69 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 69 of file DISKinematicsReco.C

References _filename, _ievent, _map_em_candidate_branches, _map_event_branches, _tfile, _topNode, _tree_event_cluster, _tree_event_truth, dummy, PidCandidate::em_cluster_caloid, PidCandidate::em_cluster_e, PidCandidate::em_cluster_ecore, PidCandidate::em_cluster_et_iso, PidCandidate::em_cluster_eta, PidCandidate::em_cluster_id, PidCandidate::em_cluster_ntower, PidCandidate::em_cluster_phi, PidCandidate::em_cluster_posx, PidCandidate::em_cluster_posy, PidCandidate::em_cluster_posz, PidCandidate::em_cluster_prob, PidCandidate::em_cluster_pt, PidCandidate::em_cluster_theta, PidCandidate::em_evtgen_charge, PidCandidate::em_evtgen_eta, PidCandidate::em_evtgen_is_scattered_lepton, PidCandidate::em_evtgen_phi, PidCandidate::em_evtgen_pid, PidCandidate::em_evtgen_ptotal, PidCandidate::em_evtgen_theta, PidCandidate::em_pid_prob_electron, PidCandidate::em_pid_prob_kaon, PidCandidate::em_pid_prob_pion, PidCandidate::em_pid_prob_proton, PidCandidate::em_reco_q2_e, PidCandidate::em_reco_w_e, PidCandidate::em_reco_x_e, PidCandidate::em_reco_y_e, PidCandidate::em_track_charge, PidCandidate::em_track_cluster_dr, PidCandidate::em_track_dca, PidCandidate::em_track_e3x3_cemc, PidCandidate::em_track_e3x3_eemc, PidCandidate::em_track_e3x3_ehcal, PidCandidate::em_track_e3x3_femc, PidCandidate::em_track_e3x3_fhcal, PidCandidate::em_track_e3x3_ihcal, PidCandidate::em_track_e3x3_ohcal, PidCandidate::em_track_eta, PidCandidate::em_track_eta2cluster, PidCandidate::em_track_id, PidCandidate::em_track_p2cluster, PidCandidate::em_track_phi, PidCandidate::em_track_phi2cluster, PidCandidate::em_track_ptotal, PidCandidate::em_track_ptrans, PidCandidate::em_track_quality, PidCandidate::em_track_section, PidCandidate::em_track_theta, PidCandidate::em_track_theta2cluster, PidCandidate::em_track_x2cluster, PidCandidate::em_track_y2cluster, PidCandidate::em_track_z2cluster, and PidCandidate::get_property_info().

+ Here is the call graph for this function:

int DISKinematicsReco::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 199 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 199 of file DISKinematicsReco.C

References _do_process_geant4_cluster, and _trackproj.

int DISKinematicsReco::InsertCandidateFromCluster ( type_map_tcan candidateMap,
RawCluster cluster,
CaloEvalStack caloevalstack,
SvtxTrackMap trackmap 
)
private

Definition at line 384 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 384 of file DISKinematicsReco.C

References _topNode, _trackproj, SvtxTrack::begin_states(), SvtxTrack::CEMC, RawTowerDefs::decode_caloid(), PidCandidate::em_cluster_caloid, PidCandidate::em_cluster_e, PidCandidate::em_cluster_ecore, PidCandidate::em_cluster_et_iso, PidCandidate::em_cluster_eta, PidCandidate::em_cluster_id, PidCandidate::em_cluster_ntower, PidCandidate::em_cluster_phi, PidCandidate::em_cluster_posx, PidCandidate::em_cluster_posy, PidCandidate::em_cluster_posz, PidCandidate::em_cluster_prob, PidCandidate::em_cluster_pt, PidCandidate::em_cluster_theta, PidCandidate::em_evtgen_charge, PidCandidate::em_evtgen_eta, PidCandidate::em_evtgen_phi, PidCandidate::em_evtgen_pid, PidCandidate::em_evtgen_ptotal, PidCandidate::em_evtgen_theta, PidCandidate::em_pid_prob_electron, PidCandidate::em_pid_prob_kaon, PidCandidate::em_pid_prob_pion, PidCandidate::em_pid_prob_proton, PidCandidate::em_track_charge, PidCandidate::em_track_cluster_dr, PidCandidate::em_track_dca, PidCandidate::em_track_e3x3_cemc, PidCandidate::em_track_e3x3_eemc, PidCandidate::em_track_e3x3_femc, PidCandidate::em_track_e3x3_fhcal, PidCandidate::em_track_e3x3_ihcal, PidCandidate::em_track_e3x3_ohcal, PidCandidate::em_track_eta, PidCandidate::em_track_eta2cluster, PidCandidate::em_track_id, PidCandidate::em_track_p2cluster, PidCandidate::em_track_phi, PidCandidate::em_track_phi2cluster, PidCandidate::em_track_ptotal, PidCandidate::em_track_ptrans, PidCandidate::em_track_quality, PidCandidate::em_track_section, PidCandidate::em_track_theta, PidCandidate::em_track_theta2cluster, PidCandidate::em_track_x2cluster, PidCandidate::em_track_y2cluster, PidCandidate::em_track_z2cluster, SvtxTrack::end_states(), eta, TrackProjectorPlaneECAL::get_best_state(), TrackProjectorPlaneECAL::get_best_track(), SvtxTrack::get_cal_energy_3x3(), PidCandidatev1::get_candidate_id(), SvtxTrack_v1::get_charge(), SvtxTrack::get_charge(), SvtxTrack::get_dca(), TrackProjectorPlaneECAL::get_detector_from_cluster(), RawCluster::get_ecore(), RawCluster::get_energy(), RawCluster::get_et_iso(), SvtxTrack_v1::get_eta(), SvtxTrack::get_eta(), RawCluster::get_id(), SvtxTrack::get_id(), SvtxTrackState::get_name(), SvtxTrack_v1::get_p(), SvtxTrack::get_p(), RawCluster::get_phi(), SvtxTrack_v1::get_phi(), SvtxTrack::get_phi(), PHG4Particle::get_pid(), RawCluster::get_prob(), SvtxTrack_v1::get_pt(), SvtxTrack::get_pt(), PHG4Particle::get_px(), PHG4Particle::get_py(), PHG4Particle::get_pz(), SvtxTrack::get_quality(), RawCluster::get_r(), CaloEvalStack::get_rawcluster_eval(), RawCluster::get_towers(), PHG4Particle::get_track_id(), SvtxTrackState::get_x(), RawCluster::get_x(), SvtxTrackState::get_y(), RawCluster::get_y(), SvtxTrackState::get_z(), RawCluster::get_z(), geta, TrackProjectionTools::getE33Forward(), RawCluster::getNTowers(), gpx, gpy, gpz, SvtxTrack::HCALIN, SvtxTrack::HCALOUT, CaloRawClusterEval::max_truth_primary_particle_by_energy(), physmon_track_finding_ttbar::pt, PidCandidatev1::set_candidate_id(), TrackProjectorPlaneECAL::set_detector(), PidCandidatev1::set_property(), tc, ActsTests::PropagationDatasets::theta, and tpt.

Referenced by CollectEmCandidatesFromCluster().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int DISKinematicsReco::process_event ( PHCompositeNode )
virtual

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

Reimplemented from SubsysReco.

Definition at line 207 of file DISKinematicsReco.C.

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

References _do_process_geant4_cluster, _do_process_truth, _ievent, _tree_event_cluster, _tree_event_truth, AddGlobalCalorimeterInformation(), AddReconstructedKinematics(), AddTruthEventInformation(), CollectEmCandidatesFromCluster(), CollectEmCandidatesFromTruth(), ResetBranchMap(), and WriteCandidatesToTree().

+ Here is the call graph for this function:

void DISKinematicsReco::ResetBranchMap ( )
private

Reset branch maps for each event

Definition at line 960 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 960 of file DISKinematicsReco.C

References _map_em_candidate_branches, and _map_event_branches.

Referenced by process_event().

+ Here is the caller graph for this function:

void DISKinematicsReco::set_beam_energies ( float  beam_electron,
float  beam_proton 
)
inline

Definition at line 55 of file DISKinematicsReco.h.

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

References _beam_electron_ptotal, and _beam_hadron_ptotal.

void DISKinematicsReco::set_do_process_geant4_cluster ( bool  select)
inline

Definition at line 62 of file DISKinematicsReco.h.

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

References _do_process_geant4_cluster.

Referenced by Fun4All_EICAnalysis_DIS(), and Fun4All_EICAnalysis_DISReco().

+ Here is the caller graph for this function:

void DISKinematicsReco::set_do_process_truth ( bool  select)
inline

Definition at line 68 of file DISKinematicsReco.h.

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

References _do_process_truth.

Referenced by Fun4All_EICAnalysis_DIS(), and Fun4All_EICAnalysis_DISReco().

+ Here is the caller graph for this function:

int DISKinematicsReco::WriteCandidatesToTree ( type_map_tcan electronCandidateMap)
private

Definition at line 774 of file DISKinematicsReco.C.

View newest version in sPHENIX GitHub at line 774 of file DISKinematicsReco.C

References _map_em_candidate_branches, _map_event_branches, PidCandidate::get_property_info(), PidCandidate::type_float, PidCandidate::type_int, PidCandidate::type_uint, and PidCandidate::type_unknown.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

float DISKinematicsReco::_beam_electron_ptotal
private

Definition at line 98 of file DISKinematicsReco.h.

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

Referenced by AddReconstructedKinematics(), AddTruthEventInformation(), and set_beam_energies().

float DISKinematicsReco::_beam_hadron_ptotal
private

Definition at line 99 of file DISKinematicsReco.h.

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

Referenced by AddReconstructedKinematics(), AddTruthEventInformation(), and set_beam_energies().

bool DISKinematicsReco::_do_process_geant4_cluster
private

Definition at line 82 of file DISKinematicsReco.h.

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

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

bool DISKinematicsReco::_do_process_truth
private

Definition at line 83 of file DISKinematicsReco.h.

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

Referenced by process_event(), and set_do_process_truth().

std::string DISKinematicsReco::_filename
private

Definition at line 88 of file DISKinematicsReco.h.

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

Referenced by Init().

int DISKinematicsReco::_ievent
private

Definition at line 85 of file DISKinematicsReco.h.

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

Referenced by Init(), and process_event().

std::map< PidCandidate::PROPERTY , std::vector< float > > DISKinematicsReco::_map_em_candidate_branches
private

Map of PidCandidate properties that will be written to output ROOT Tree Map of EM Candidates that will be written to output ROOT Tree

Definition at line 113 of file DISKinematicsReco.h.

View newest version in sPHENIX GitHub at line 113 of file DISKinematicsReco.h

Referenced by Init(), ResetBranchMap(), and WriteCandidatesToTree().

std::map< std::string , float > DISKinematicsReco::_map_event_branches
private

Map of Event properties that will be written to output ROOT Tree

Definition at line 117 of file DISKinematicsReco.h.

View newest version in sPHENIX GitHub at line 117 of file DISKinematicsReco.h

Referenced by AddGlobalCalorimeterInformation(), AddTruthEventInformation(), Init(), ResetBranchMap(), and WriteCandidatesToTree().

std::map< std::string, CaloRawTowerEval* > DISKinematicsReco::_map_towereval
private

CaloRawTowerEvaluators to access tru particle info for given towers

Definition at line 103 of file DISKinematicsReco.h.

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

const float DISKinematicsReco::_mproton
private

Definition at line 77 of file DISKinematicsReco.h.

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

Referenced by AddReconstructedKinematics(), and AddTruthEventInformation().

bool DISKinematicsReco::_save_towers
private

Definition at line 80 of file DISKinematicsReco.h.

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

bool DISKinematicsReco::_save_tracks
private

Definition at line 81 of file DISKinematicsReco.h.

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

TFile* DISKinematicsReco::_tfile
private

Definition at line 89 of file DISKinematicsReco.h.

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

Referenced by End(), and Init().

PHCompositeNode* DISKinematicsReco::_topNode
private

helper pointer to topNode

Definition at line 120 of file DISKinematicsReco.h.

View newest version in sPHENIX GitHub at line 120 of file DISKinematicsReco.h

Referenced by AddGlobalCalorimeterInformation(), AddTruthEventInformation(), CollectEmCandidatesFromCluster(), CollectEmCandidatesFromTruth(), Init(), and InsertCandidateFromCluster().

int DISKinematicsReco::_total_pass
private

Definition at line 86 of file DISKinematicsReco.h.

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

TrackProjectorPlaneECAL* DISKinematicsReco::_trackproj
private

Definition at line 106 of file DISKinematicsReco.h.

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

Referenced by InitRun(), and InsertCandidateFromCluster().

TTree* DISKinematicsReco::_tree_event_cluster
private

Definition at line 92 of file DISKinematicsReco.h.

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

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

TTree* DISKinematicsReco::_tree_event_truth
private

Definition at line 95 of file DISKinematicsReco.h.

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

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

bool DISKinematicsReco::_verbose
private

Definition at line 79 of file DISKinematicsReco.h.

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


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