Belle II Software development
TrackingAction.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#ifndef TRACKINGACTION_H_
10#define TRACKINGACTION_H_
11
12#include <mdst/dataobjects/MCParticleGraph.h>
13#include <simulation/dataobjects/MCParticleTrajectory.h>
14#include <framework/datastore/StoreArray.h>
15#include <framework/datastore/RelationArray.h>
16
17#include <G4UserTrackingAction.hh>
18
19namespace Belle2 {
25 namespace Simulation {
26
30 class TrackingAction : public G4UserTrackingAction {
31
32 public:
33
38 explicit TrackingAction(MCParticleGraph& mcParticleGraph);
39
43 virtual ~TrackingAction();
44
51 void PreUserTrackingAction(const G4Track* track);
52
58 void PostUserTrackingAction(const G4Track* track);
59
65 void setIgnoreOpticalPhotons(bool ignore = true) {m_ignoreOpticalPhotons = ignore;}
66
72 void setIgnoreSecondaries(bool ignore = true) {m_ignoreSecondaries = ignore;}
73
78 void setSecondariesEnergyCut(double cut_MeV) {m_secondariesEnergyCut = cut_MeV;}
79
87
93
100 void setIgnorePairConversions(bool ignore = true) {m_ignorePairConversions = ignore;}
101
107
109 void setStoreTrajectories(int store, double distanceTolerance);
110
111
112 protected:
113
132 };
133
134 } // end namespace Simulation
136} // end namespace Belle2
137
138#endif /* TRACKINGACTION_H_ */
Class to build, validate and sort a particle decay chain.
Low-level class to create/modify relations between StoreArrays.
Definition: RelationArray.h:62
The Tracking Action class.
virtual ~TrackingAction()
Destructor.
void setIgnorePairConversions(bool ignore=true)
Set ignore flag for e+ or e- coming from gamma conversions into a pair if set to true,...
void setIgnoreBremsstrahlungPhotons(bool ignore=true)
Set ignore flag for low energy breamsstrahlung photons if set to true, breamsstrahlung photons with k...
bool m_ignoreSecondaries
do not store secondaries in MCParticles
MCParticleGraph & m_mcParticleGraph
Reference to the MCParticle graph which is updated by the tracking action.
double m_pairConversionsEnergyCut
kinetic energy cut for stored e+ or e- from pair conversions [MeV]
void setSecondariesEnergyCut(double cut_MeV)
Set kinetic energy cut for secondaries.
void setStoreTrajectories(int store, double distanceTolerance)
Sets the trajectory option to enable storing of the simulated particle trajectories.
RelationArray m_relMCTrajectories
RelationArry for the relation between MCParticles and Trajectories.
void setBremsstrahlungPhotonsEnergyCut(double cut_MeV)
Set kinetic energy cut for bremsstrahlung photons.
StoreArray< MCParticleTrajectory > m_storeMCTrajectories
Store array for the Trajectories.
double m_distanceTolerance
distance tolerance to merge trajectory points
void PreUserTrackingAction(const G4Track *track)
Checks if the particle associated to the track is already in the MCParticle list.
double m_secondariesEnergyCut
kinetic energy cut for stored secondaries [MeV]
void setPairConversionsEnergyCut(double cut_MeV)
Set kinetic energy cut for e+ e- pair conversions.
void setIgnoreSecondaries(bool ignore=true)
Set ignore flag for low energy Geant-produced secondary particles if set to true, secondaries with ki...
void PostUserTrackingAction(const G4Track *track)
Updates the data of the MCParticle associated with the Geant4 track.
bool m_ignorePairConversions
do not store e+ or e- from pair conversions in MCparticles
bool m_ignoreBremsstrahlungPhotons
do not store bremsstrahlung photons in MCParticles
bool m_ignoreOpticalPhotons
do not store optical photons in MCParticles
void setIgnoreOpticalPhotons(bool ignore=true)
Set ignore flag for optical photons if set to true, optical photons will not be stored in MCParticles...
double m_bremsstrahlungPhotonsEnergyCut
kinetic energy cut for stored bremsstrahlung photons [MeV]
int m_storeTrajectories
Store trajectories for 0=none, 1=primary or 2=all particles.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.