Belle II Software  release-05-02-19
TrackingAction.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2011 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Andreas Moll, Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef TRACKINGACTION_H_
12 #define TRACKINGACTION_H_
13 
14 #include <mdst/dataobjects/MCParticleGraph.h>
15 #include <simulation/dataobjects/MCParticleTrajectory.h>
16 #include <framework/datastore/StoreArray.h>
17 #include <framework/datastore/RelationArray.h>
18 
19 #include <G4UserTrackingAction.hh>
20 
21 namespace Belle2 {
27  namespace Simulation {
28 
32  class TrackingAction : public G4UserTrackingAction {
33 
34  public:
35 
40  explicit TrackingAction(MCParticleGraph& mcParticleGraph);
41 
45  virtual ~TrackingAction();
46 
53  void PreUserTrackingAction(const G4Track* track);
54 
60  void PostUserTrackingAction(const G4Track* track);
61 
67  void setIgnoreOpticalPhotons(bool ignore = true) {m_ignoreOpticalPhotons = ignore;}
68 
74  void setIgnoreSecondaries(bool ignore = true) {m_ignoreSecondaries = ignore;}
75 
80  void setSecondariesEnergyCut(double cut_MeV) {m_secondariesEnergyCut = cut_MeV;}
81 
89 
95 
102  void setIgnorePairConversions(bool ignore = true) {m_ignorePairConversions = ignore;}
103 
108  void setPairConversionsEnergyCut(double cut_MeV) {m_pairConversionsEnergyCut = cut_MeV;}
109 
111  void setStoreTrajectories(int store, double distanceTolerance);
112 
113 
114  protected:
115 
118 
120  bool m_ignoreSecondaries;
121  double m_secondariesEnergyCut;
135  };
136 
137  } // end namespace Simulation
139 } // end namespace Belle2
140 
141 #endif /* TRACKINGACTION_H_ */
Belle2::RelationArray
Low-level class to create/modify relations between StoreArrays.
Definition: RelationArray.h:72
Belle2::Simulation::TrackingAction::m_storeMCTrajectories
StoreArray< MCParticleTrajectory > m_storeMCTrajectories
Store array for the Trajectories.
Definition: TrackingAction.h:140
Belle2::Simulation::TrackingAction::m_ignoreSecondaries
bool m_ignoreSecondaries
do not store secondaries in MCParticles
Definition: TrackingAction.h:128
Belle2::Simulation::TrackingAction::setStoreTrajectories
void setStoreTrajectories(int store, double distanceTolerance)
Sets the trajectory option to enable storing of the simulated particle trajectories.
Definition: TrackingAction.cc:44
Belle2::Simulation::TrackingAction::m_ignoreBremsstrahlungPhotons
bool m_ignoreBremsstrahlungPhotons
do not store bremsstrahlung photons in MCParticles
Definition: TrackingAction.h:130
Belle2::Simulation::TrackingAction::TrackingAction
TrackingAction(MCParticleGraph &mcParticleGraph)
Constructor.
Definition: TrackingAction.cc:29
Belle2::MCParticleGraph
Class to build, validate and sort a particle decay chain.
Definition: MCParticleGraph.h:48
Belle2::Simulation::TrackingAction::setIgnoreSecondaries
void setIgnoreSecondaries(bool ignore=true)
Set ignore flag for low energy Geant-produced secondary particles if set to true, secondaries with ki...
Definition: TrackingAction.h:82
Belle2::Simulation::TrackingAction::setBremsstrahlungPhotonsEnergyCut
void setBremsstrahlungPhotonsEnergyCut(double cut_MeV)
Set kinetic energy cut for bremsstrahlung photons.
Definition: TrackingAction.h:102
Belle2::Simulation::TrackingAction::setPairConversionsEnergyCut
void setPairConversionsEnergyCut(double cut_MeV)
Set kinetic energy cut for e+ e- pair conversions.
Definition: TrackingAction.h:116
Belle2::Simulation::TrackingAction::m_bremsstrahlungPhotonsEnergyCut
double m_bremsstrahlungPhotonsEnergyCut
kinetic energy cut for stored bremsstrahlung photons [MeV]
Definition: TrackingAction.h:131
Belle2::Simulation::TrackingAction::PreUserTrackingAction
void PreUserTrackingAction(const G4Track *track)
Checks if the particle associated to the track is already in the MCParticle list.
Definition: TrackingAction.cc:60
Belle2::Simulation::TrackingAction::setIgnorePairConversions
void setIgnorePairConversions(bool ignore=true)
Set ignore flag for e+ or e- coming from gamma conversions into a pair if set to true,...
Definition: TrackingAction.h:110
Belle2::Simulation::TrackingAction::~TrackingAction
virtual ~TrackingAction()
Destructor.
Definition: TrackingAction.cc:40
Belle2::Simulation::TrackingAction::m_secondariesEnergyCut
double m_secondariesEnergyCut
kinetic energy cut for stored secondaries [MeV]
Definition: TrackingAction.h:129
Belle2::Simulation::TrackingAction::m_relMCTrajectories
RelationArray m_relMCTrajectories
RelationArry for the relation between MCParticles and Trajectories.
Definition: TrackingAction.h:142
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::Simulation::TrackingAction::setIgnoreOpticalPhotons
void setIgnoreOpticalPhotons(bool ignore=true)
Set ignore flag for optical photons if set to true, optical photons will not be stored in MCParticles...
Definition: TrackingAction.h:75
Belle2::Simulation::TrackingAction::m_pairConversionsEnergyCut
double m_pairConversionsEnergyCut
kinetic energy cut for stored e+ or e- from pair conversions [MeV]
Definition: TrackingAction.h:133
Belle2::Simulation::TrackingAction::m_distanceTolerance
double m_distanceTolerance
distance tolerance to merge trajectory points
Definition: TrackingAction.h:137
Belle2::Simulation::TrackingAction::setIgnoreBremsstrahlungPhotons
void setIgnoreBremsstrahlungPhotons(bool ignore=true)
Set ignore flag for low energy breamsstrahlung photons if set to true, breamsstrahlung photons with k...
Definition: TrackingAction.h:96
Belle2::Simulation::TrackingAction::m_mcParticleGraph
MCParticleGraph & m_mcParticleGraph
< Reference to the MCParticle graph which is updated by the tracking action.
Definition: TrackingAction.h:125
Belle2::Simulation::TrackingAction::PostUserTrackingAction
void PostUserTrackingAction(const G4Track *track)
Updates the data of the MCParticle associated with the Geant4 track.
Definition: TrackingAction.cc:145
Belle2::Simulation::TrackingAction::m_ignorePairConversions
bool m_ignorePairConversions
do not store e+ or e- from pair conversions in MCparticles
Definition: TrackingAction.h:132
Belle2::Simulation::TrackingAction::setSecondariesEnergyCut
void setSecondariesEnergyCut(double cut_MeV)
Set kinetic energy cut for secondaries.
Definition: TrackingAction.h:88
Belle2::Simulation::TrackingAction::m_ignoreOpticalPhotons
bool m_ignoreOpticalPhotons
do not store optical photons in MCParticles
Definition: TrackingAction.h:127
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::Simulation::TrackingAction::m_storeTrajectories
int m_storeTrajectories
Store trajectories for 0=none, 1=primary or 2=all particles.
Definition: TrackingAction.h:136