Belle II Software  release-05-02-19
TrackFinderMCTruthRecoTracksModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Heck, Oksana Brovchenko, Moritz Nadler, *
7  * Thomas Hauth, Oliver Frost *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 #include <TMatrixDSym.h>
15 #include <string>
16 
17 namespace Belle2 {
39  class TrackFinderMCTruthRecoTracksModule : public Module {
40 
41  public:
48 
52  void initialize() override;
53 
56  void beginRun() override;
57 
61  void event() override;
64  void endRun() override;
65 
66  private:
67 
74  template<class THit, class TSimHit>
75  bool isWithinNLoops(double Bz, const THit* aHit, double nLoops);
76 
77  bool m_usePXDHits;
78  bool m_useSVDHits;
79  bool m_useCDCHits;
81  bool m_useOnlyBeforeTOP;
82  float m_useNLoops;
83  bool m_useReassignedHits;
84  bool m_useSecondCDCHits;
87  std::vector<std::string>
90  0;
91  double m_energyCut;
92  bool m_neutrals;
96  double m_smearing;
97  std::vector<double>
99  TMatrixDSym
102  0;
103  int m_noTrueHitCounter =
104  0;
105  int m_nRecoTracks = 0;
106  std::string m_recoTracksStoreArrayName;
108  int m_minSVDHits;
113  std::vector<int>
115  std::vector<int>
119  false;
122  bool m_discardAuxiliaryHits = false;
123  };
125 }
126 
Belle2::TrackFinderMCTruthRecoTracksModule::m_usePXDHits
bool m_usePXDHits
Boolean to select if PXDHits should be used.
Definition: TrackFinderMCTruthRecoTracksModule.h:86
Belle2::TrackFinderMCTruthRecoTracksModule::m_minCDCAxialHits
int m_minCDCAxialHits
Minimum number of CDC hits from axial wires per track to allow track candidate creation.
Definition: TrackFinderMCTruthRecoTracksModule.h:118
Belle2::TrackFinderMCTruthRecoTracksModule::m_notEnoughtHitsCounter
int m_notEnoughtHitsCounter
will hold number of tracks that do not have enough hits to form a track candidate (total NDF less tha...
Definition: TrackFinderMCTruthRecoTracksModule.h:110
Belle2::TrackFinderMCTruthRecoTracksModule::m_minCDCStereoHits
int m_minCDCStereoHits
Minimum number of CDC hits from stereo wires per track to allow track candidate creation.
Definition: TrackFinderMCTruthRecoTracksModule.h:119
Belle2::TrackFinderMCTruthRecoTracksModule::m_allowFirstCDCSuperLayerOnly
bool m_allowFirstCDCSuperLayerOnly
Boolean to allow tracks to pass the stereo hit requirement if they touched only the first (axial) CDC...
Definition: TrackFinderMCTruthRecoTracksModule.h:120
Belle2::TrackFinderMCTruthRecoTracksModule::m_mergeDecayInFlight
bool m_mergeDecayInFlight
Boolean to merge decay in flight chains that involve a single charged particle.
Definition: TrackFinderMCTruthRecoTracksModule.h:102
Belle2::TrackFinderMCTruthRecoTracksModule::m_useOnlyBeforeTOP
bool m_useOnlyBeforeTOP
Boolean to select if CDC hits after TOP detector are discarded.
Definition: TrackFinderMCTruthRecoTracksModule.h:90
Belle2::TrackFinderMCTruthRecoTracksModule::isWithinNLoops
bool isWithinNLoops(double Bz, const THit *aHit, double nLoops)
helper function which returns true if the current hit is within n loops the template give the hit typ...
Definition: TrackFinderMCTruthRecoTracksModule.cc:909
Belle2::TrackFinderMCTruthRecoTracksModule::m_useSecondCDCHits
bool m_useSecondCDCHits
Also includes the CDC 2nd hit information in the mc tracks.
Definition: TrackFinderMCTruthRecoTracksModule.h:93
Belle2::TrackFinderMCTruthRecoTracksModule::event
void event() override
This method is the core of the module.
Definition: TrackFinderMCTruthRecoTracksModule.cc:279
Belle2::TrackFinderMCTruthRecoTracksModule::m_minSVDHits
int m_minSVDHits
Minimum number of SVD hits per track to allow track candidate creation.
Definition: TrackFinderMCTruthRecoTracksModule.h:117
Belle2::TrackFinderMCTruthRecoTracksModule::m_smearingCov
std::vector< double > m_smearingCov
Covariance matrix used to smear the true pos and mom before passed to track candidate.
Definition: TrackFinderMCTruthRecoTracksModule.h:107
Belle2::TrackFinderMCTruthRecoTracksModule::m_setTimeSeed
bool m_setTimeSeed
Boolean to forward the production time as seed time.
Definition: TrackFinderMCTruthRecoTracksModule.h:104
Belle2::TrackFinderMCTruthRecoTracksModule::m_particleProperties
int m_particleProperties
Internal encoding of m_whichParticles to avoid string comparisons.
Definition: TrackFinderMCTruthRecoTracksModule.h:98
Belle2::TrackFinderMCTruthRecoTracksModule::m_useCDCHits
bool m_useCDCHits
Boolean to select if CDCHits should be used.
Definition: TrackFinderMCTruthRecoTracksModule.h:88
Belle2::TrackFinderMCTruthRecoTracksModule::m_discardAuxiliaryHits
bool m_discardAuxiliaryHits
if true hits marked as auxiliary will not be included in the RecoTrack
Definition: TrackFinderMCTruthRecoTracksModule.h:131
Belle2::TrackFinderMCTruthRecoTracksModule::m_fromPdgCodes
std::vector< int > m_fromPdgCodes
if size() is not 0, only for particles having an ancestor (mother or mother of mother etc) with PDG c...
Definition: TrackFinderMCTruthRecoTracksModule.h:123
Belle2::TrackFinderMCTruthRecoTracksModule::m_splitAfterDeltaT
double m_splitAfterDeltaT
Minimal time delay between two sim hits (in ns) after which MC reco track will be split into seperate...
Definition: TrackFinderMCTruthRecoTracksModule.h:129
Belle2::TrackFinderMCTruthRecoTracksModule::m_energyCut
double m_energyCut
Create track candidates only for MCParticles with energy above this cut.
Definition: TrackFinderMCTruthRecoTracksModule.h:100
Belle2::TrackFinderMCTruthRecoTracksModule::m_useReassignedHits
bool m_useReassignedHits
Boolean to select the inclusion of hits form discarded secondary daughters.
Definition: TrackFinderMCTruthRecoTracksModule.h:92
Belle2::TrackFinderMCTruthRecoTracksModule::m_neutrals
bool m_neutrals
Boolean to mark if track candidates should also be created for neutral particles.
Definition: TrackFinderMCTruthRecoTracksModule.h:101
Belle2::TrackFinderMCTruthRecoTracksModule::m_noTrueHitCounter
int m_noTrueHitCounter
will hold number of cluster hits that do not have a corresponding true hit
Definition: TrackFinderMCTruthRecoTracksModule.h:112
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFinderMCTruthRecoTracksModule::m_recoTracksStoreArrayName
std::string m_recoTracksStoreArrayName
RecoTracks StoreArray name.
Definition: TrackFinderMCTruthRecoTracksModule.h:115
Belle2::TrackFinderMCTruthRecoTracksModule::initialize
void initialize() override
Initialize the Module.
Definition: TrackFinderMCTruthRecoTracksModule.cc:200
Belle2::TrackFinderMCTruthRecoTracksModule::endRun
void endRun() override
This method is called if the current run ends.
Definition: TrackFinderMCTruthRecoTracksModule.cc:943
Belle2::TrackFinderMCTruthRecoTracksModule::m_initialCov
TMatrixDSym m_initialCov
The std::vector m_smearingCov will be translated into this TMatrixD.
Definition: TrackFinderMCTruthRecoTracksModule.h:109
Belle2::TrackFinderMCTruthRecoTracksModule::m_minimalNdf
int m_minimalNdf
Minimum number of total hits per track to allow track candidate creation.
Definition: TrackFinderMCTruthRecoTracksModule.h:121
Belle2::TrackFinderMCTruthRecoTracksModule::beginRun
void beginRun() override
Called when entering a new run.
Definition: TrackFinderMCTruthRecoTracksModule.cc:271
Belle2::TrackFinderMCTruthRecoTracksModule::m_enforceTrueHit
bool m_enforceTrueHit
If set true only cluster hits that have a relation to a TrueHit will be included in the track candida...
Definition: TrackFinderMCTruthRecoTracksModule.h:95
Belle2::TrackFinderMCTruthRecoTracksModule::m_whichParticles
std::vector< std::string > m_whichParticles
List of keywords to mark what properties particles must have to get a track candidate .
Definition: TrackFinderMCTruthRecoTracksModule.h:97
Belle2::TrackFinderMCTruthRecoTracksModule::m_nRecoTracks
int m_nRecoTracks
will hold the total number of created track candidates
Definition: TrackFinderMCTruthRecoTracksModule.h:114
Belle2::TrackFinderMCTruthRecoTracksModule::m_useNLoops
float m_useNLoops
Number of loops to include in the MC tracks - effects only CDC.
Definition: TrackFinderMCTruthRecoTracksModule.h:91
Belle2::TrackFinderMCTruthRecoTracksModule::m_particlePdgCodes
std::vector< int > m_particlePdgCodes
if size() is not 0, only for particles with PDG codes same as in this vector a track candidate will b...
Definition: TrackFinderMCTruthRecoTracksModule.h:125
Belle2::TrackFinderMCTruthRecoTracksModule::TrackFinderMCTruthRecoTracksModule
TrackFinderMCTruthRecoTracksModule()
Constructor of the module.
Definition: TrackFinderMCTruthRecoTracksModule.cc:53
Belle2::TrackFinderMCTruthRecoTracksModule::m_useSVDHits
bool m_useSVDHits
Boolean to select if SVDHits should be used.
Definition: TrackFinderMCTruthRecoTracksModule.h:87
Belle2::TrackFinderMCTruthRecoTracksModule::m_smearing
double m_smearing
Smearing of MCMomentum and MCVertex in %.
Definition: TrackFinderMCTruthRecoTracksModule.h:105
Belle2::TrackFinderMCTruthRecoTracksModule::m_useOnlyAxialCDCHits
bool m_useOnlyAxialCDCHits
Boolean to select if only axial CDCHits should be used.
Definition: TrackFinderMCTruthRecoTracksModule.h:89
Belle2::TrackFinderMCTruthRecoTracksModule::m_mcParticlesPresent
bool m_mcParticlesPresent
This flag is set to false if there are no MC Particles in the data store (probably data run?...
Definition: TrackFinderMCTruthRecoTracksModule.h:127
Belle2::TrackFinderMCTruthRecoTracksModule::m_minPXDHits
int m_minPXDHits
Minimum number of PXD hits per track to allow track candidate creation.
Definition: TrackFinderMCTruthRecoTracksModule.h:116