Belle II Software  release-05-02-19
TrackFinderVXDAnalizerModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2011 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Jakob Lettenbichler *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 //framework-stuff
14 #include <framework/core/Module.h>
15 #include <framework/datastore/StoreArray.h>
16 
17 #include <tracking/spacePointCreation/SpacePointTrackCand.h>
18 #include <tracking/trackFindingVXD/analyzingTools/RootParameterTracker.h>
19 
20 //stl-stuff
21 #include <string>
22 
23 namespace Belle2 {
28  namespace Tracking {
29 
30 
31 
37  class TrackFinderVXDAnalizerModule : public Module {
38  public:
39 
40 
43 
44 
47 
48 
50  void initialize() override;
51 
52 
54  void beginRun() override {}
55 
56 
58  void event() override;
59 
60 
62  void endRun() override;
63 
64 
66  void terminate() override;
67 
68 
70  template<class PurityType>
71  PurityType returnDominantParticleID(const std::vector<PurityType >& purities)
72  {
73  PurityType bestResult = PurityType();
74 
75  for (const PurityType& iD : purities) {
76  // cppcheck-suppress useStlAlgorithm
77  if (iD > bestResult) { bestResult = iD; }
78  }
79  return bestResult;
80  }
81 
82 
83  protected:
84 
85 
88 
91 
94 
97 
100 
101 
102 // parameters:
103 
105  std::string m_PARAMprintData;
106 
113  std::vector< std::vector<std::vector<std::string> > > m_PARAMtrackedParametersDouble;
114 
121  std::vector< std::vector<std::vector<std::string> > > m_PARAMtrackedParametersInt;
122 
129  std::vector< std::vector<std::vector<std::string> > > m_PARAMtrackedParametersVecDouble;
130 
132  bool m_PARAMwriteToRoot;
133 
135  std::vector<std::string> m_PARAMrootFileName;
136 
138  std::vector<double> m_PARAMorigin;
139 
142 
144  std::string m_PARAMreferenceTCname;
145 
147  std::string m_PARAMtestTCname;
148 
150  std::string m_PARAMacceptedTCname;
151 
153  std::string m_PARAMlostTCname;
154 
162 
166  unsigned int m_PARAMminNDFThreshold;
167 
170 
173 
174 
175 // counters:
176 
178  unsigned int m_countReconstructedTCs = 0;
179 
181  unsigned int m_countAcceptedGFTCs = 0;
182 
184  unsigned int m_lostGFTCs = 0;
185 
187  unsigned int m_eventCounter = 0;
188 
190  unsigned int m_mcTrackCounter = 0;
191 
193  unsigned int m_totalRealHits = 0;
194 
196  unsigned int m_caTrackCounter = 0;
197 
199  unsigned int m_countedPerfectRecoveries = 0;
200 
202  unsigned int m_countedCleanRecoveries = 0;
203 
205  unsigned int m_countedContaminatedRecoveries = 0;
206 
208  unsigned int m_countedTCsTooShort = 0;
209 
211  unsigned int m_countedGhosts = 0;
212 
214  unsigned int m_countedDoubleEntries = 0;
215 
217  unsigned int m_countedLostTest = 0;
218 
220  unsigned int m_countedLostRef = 0;
221 
223  unsigned int m_countedReferenceClones = 0;
224 
226  unsigned int m_wrongChargeSignCounter = 0;
227 
229  unsigned int m_mcTrackVectorCounter = 0;
230 
232  unsigned int m_nMcPXDHits = 0;
233 
235  unsigned int m_nMcSVDHits = 0;
236 
238  unsigned int m_nCaPXDHits = 0;
239 
241  unsigned int m_nCaSVDHits = 0;
242 
243 
244 
245  private:
246  };
247  } // Tracking namespace
249 }
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMdoEventSummary
bool m_PARAMdoEventSummary
if true, for each event a summary will be given (WARNING produces a lot of output!
Definition: TrackFinderVXDAnalizerModule.h:180
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_rootParameterTracker
RootParameterTracker m_rootParameterTracker
takes care of collecting data and storing it to root branches
Definition: TrackFinderVXDAnalizerModule.h:107
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countedTCsTooShort
unsigned int m_countedTCsTooShort
counts number of tracks, which did not have enough hits at all.
Definition: TrackFinderVXDAnalizerModule.h:216
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countedCleanRecoveries
unsigned int m_countedCleanRecoveries
counts number of tracks, where no foreign hits were attached ('clean'), does NOT mean that all recons...
Definition: TrackFinderVXDAnalizerModule.h:210
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_lostTCs
StoreArray< SpacePointTrackCand > m_lostTCs
StoreArray for lost track candidates.
Definition: TrackFinderVXDAnalizerModule.h:104
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countedReferenceClones
unsigned int m_countedReferenceClones
counts number reference TCs which were marked as clones.
Definition: TrackFinderVXDAnalizerModule.h:231
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMreferenceTCname
std::string m_PARAMreferenceTCname
the name of the storeArray container provided by the reference TF (has to be set manually there and h...
Definition: TrackFinderVXDAnalizerModule.h:152
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_totalRealHits
unsigned int m_totalRealHits
total number of hits (clusters/2) attached to mcTCs (therefore total number of real hits).
Definition: TrackFinderVXDAnalizerModule.h:201
Belle2::Tracking::TrackFinderVXDAnalizerModule::endRun
void endRun() override
endRun function
Definition: TrackFinderVXDAnalizerModule.cc:510
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countedGhosts
unsigned int m_countedGhosts
counts number of tracks, where a dominating TC was found, but the purity did not reach the threshold.
Definition: TrackFinderVXDAnalizerModule.h:219
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_nCaPXDHits
unsigned int m_nCaPXDHits
counts total number of pxdHits added by caTF.
Definition: TrackFinderVXDAnalizerModule.h:246
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMtrackedParametersInt
std::vector< std::vector< std::vector< std::string > > > m_PARAMtrackedParametersInt
set here all parameters to be tracked which use an algorithm storing one int per tc.
Definition: TrackFinderVXDAnalizerModule.h:129
Belle2::Tracking::TrackFinderVXDAnalizerModule::event
void event() override
event function
Definition: TrackFinderVXDAnalizerModule.cc:271
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_mcTrackCounter
unsigned int m_mcTrackCounter
counts number of tracks reconstructed by the mcTrackFinder.
Definition: TrackFinderVXDAnalizerModule.h:198
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_lostGFTCs
unsigned int m_lostGFTCs
counts number of TCs found by MCTF but lost by VXDTF, they are stored for external tests in storaArra...
Definition: TrackFinderVXDAnalizerModule.h:192
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countedLostTest
unsigned int m_countedLostTest
counts number of Lost test tcs.
Definition: TrackFinderVXDAnalizerModule.h:225
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_nCaSVDHits
unsigned int m_nCaSVDHits
counts total number of svdHits added by caTF.
Definition: TrackFinderVXDAnalizerModule.h:249
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_referenceTCs
StoreArray< SpacePointTrackCand > m_referenceTCs
StoreArray for the reference TCs provided by a reference TF (like trackFinderMCTruth).
Definition: TrackFinderVXDAnalizerModule.h:95
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countedPerfectRecoveries
unsigned int m_countedPerfectRecoveries
counts number of tracks, where no foreign hits were attached ('clean') AND all hits of the mcTC were ...
Definition: TrackFinderVXDAnalizerModule.h:207
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMminNDFThreshold
unsigned int m_PARAMminNDFThreshold
defines how many measurements (numbers of degrees of freedom) the TC must have to be accepted as reco...
Definition: TrackFinderVXDAnalizerModule.h:174
Belle2::Tracking::TrackFinderVXDAnalizerModule::initialize
void initialize() override
inizialize function
Definition: TrackFinderVXDAnalizerModule.cc:168
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMpurityThreshold
double m_PARAMpurityThreshold
choose value to filter TCs found by VXDTF.
Definition: TrackFinderVXDAnalizerModule.h:169
Belle2::Tracking::TrackFinderVXDAnalizerModule::~TrackFinderVXDAnalizerModule
~TrackFinderVXDAnalizerModule()
destructor
Definition: TrackFinderVXDAnalizerModule.h:54
Belle2::Tracking::TrackFinderVXDAnalizerModule::terminate
void terminate() override
terminate function
Definition: TrackFinderVXDAnalizerModule.cc:567
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countReconstructedTCs
unsigned int m_countReconstructedTCs
counts number of reconstructed TCs.
Definition: TrackFinderVXDAnalizerModule.h:186
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_mcTrackVectorCounter
unsigned int m_mcTrackVectorCounter
another counter of mcTCs, consideres size of datastores containing mcTCs.
Definition: TrackFinderVXDAnalizerModule.h:237
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMwriteToRoot
bool m_PARAMwriteToRoot
if true, analysis data is stored to root file with file name chosen by 'rootFileName'
Definition: TrackFinderVXDAnalizerModule.h:140
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countedContaminatedRecoveries
unsigned int m_countedContaminatedRecoveries
counts number of tracks, where foreign hits werew attached but its purity was above the threshold.
Definition: TrackFinderVXDAnalizerModule.h:213
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMprintData
std::string m_PARAMprintData
depending on what value you set it, it will print data like momentum residuals or any other interesti...
Definition: TrackFinderVXDAnalizerModule.h:113
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_nMcPXDHits
unsigned int m_nMcPXDHits
counts total number of pxdHits added by mcTF.
Definition: TrackFinderVXDAnalizerModule.h:240
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMignoreDeadTCs
bool m_PARAMignoreDeadTCs
if true, test-tc whose activation-state is set to false are skipped for analysis.
Definition: TrackFinderVXDAnalizerModule.h:177
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMtrackedParametersDouble
std::vector< std::vector< std::vector< std::string > > > m_PARAMtrackedParametersDouble
set here all parameters to be tracked which use an algorithm storing one double per tc.
Definition: TrackFinderVXDAnalizerModule.h:121
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMtrackedParametersVecDouble
std::vector< std::vector< std::vector< std::string > > > m_PARAMtrackedParametersVecDouble
set here all parameters to be tracked which use an algorithm storing one vector< double> per tc.
Definition: TrackFinderVXDAnalizerModule.h:137
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMtestTCname
std::string m_PARAMtestTCname
the name of the storeArray container provided by the TF to be evaluated (has to be set manually there...
Definition: TrackFinderVXDAnalizerModule.h:155
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMuseMCDataForValues
bool m_PARAMuseMCDataForValues
if true, for testTC the values of attached refTC will be stored instead of own values.
Definition: TrackFinderVXDAnalizerModule.h:149
Belle2::RootParameterTracker
Production notes for RootParameterTracker:
Definition: RootParameterTracker.h:59
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_wrongChargeSignCounter
unsigned int m_wrongChargeSignCounter
counts number of times, where assigned caTC guessed wrong sign of charge.
Definition: TrackFinderVXDAnalizerModule.h:234
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countedDoubleEntries
unsigned int m_countedDoubleEntries
if a TC was found more than once with good (contaminated or clean ones) caTCs, it will be counted to ...
Definition: TrackFinderVXDAnalizerModule.h:222
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_caTrackCounter
unsigned int m_caTrackCounter
counts number of tracks reconstructed by the CATF.
Definition: TrackFinderVXDAnalizerModule.h:204
Belle2::Tracking::TrackFinderVXDAnalizerModule::returnDominantParticleID
PurityType returnDominantParticleID(const std::vector< PurityType > &purities)
of a vector of given particleIDs with their purities it returns the one which had the highest purity
Definition: TrackFinderVXDAnalizerModule.h:79
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_eventCounter
unsigned int m_eventCounter
knows current event number.
Definition: TrackFinderVXDAnalizerModule.h:195
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMlostTCname
std::string m_PARAMlostTCname
the name of the trackCandidateCollection of lost track candidates determined by the TFAnalizer
Definition: TrackFinderVXDAnalizerModule.h:161
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_acceptedTCs
StoreArray< SpacePointTrackCand > m_acceptedTCs
StoreArray for accepted/successfully reconstructed track candidates.
Definition: TrackFinderVXDAnalizerModule.h:101
Belle2::StoreArray< SpacePointTrackCand >
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countedLostRef
unsigned int m_countedLostRef
counts number of Lost reference tcs.
Definition: TrackFinderVXDAnalizerModule.h:228
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_testTCs
StoreArray< SpacePointTrackCand > m_testTCs
StoreArray for the TCs provided by a TF to be tested (like VXDTF).
Definition: TrackFinderVXDAnalizerModule.h:98
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMacceptedTCname
std::string m_PARAMacceptedTCname
the name of the trackCandidateCollection of successfully reconstructed track candidates determined by...
Definition: TrackFinderVXDAnalizerModule.h:158
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMrootFileName
std::vector< std::string > m_PARAMrootFileName
only two entries accepted, first one is the root filename, second one is 'RECREATE' or 'UPDATE' which...
Definition: TrackFinderVXDAnalizerModule.h:143
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_nMcSVDHits
unsigned int m_nMcSVDHits
counts total number of svdHits added by mcTF.
Definition: TrackFinderVXDAnalizerModule.h:243
Belle2::Tracking::TrackFinderVXDAnalizerModule::beginRun
void beginRun() override
beginRun function
Definition: TrackFinderVXDAnalizerModule.h:62
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_PARAMorigin
std::vector< double > m_PARAMorigin
only allowed size: 3.
Definition: TrackFinderVXDAnalizerModule.h:146
Belle2::Tracking::TrackFinderVXDAnalizerModule::TrackFinderVXDAnalizerModule
TrackFinderVXDAnalizerModule()
constructor
Definition: TrackFinderVXDAnalizerModule.cc:45
Belle2::Tracking::TrackFinderVXDAnalizerModule::m_countAcceptedGFTCs
unsigned int m_countAcceptedGFTCs
counts number of accepted TCs which are stored in separate container for external tests (e....
Definition: TrackFinderVXDAnalizerModule.h:189