Belle II Software development
TrackFinderVXDAnalizerModule.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#pragma once
10
11//framework-stuff
12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14
15#include <tracking/spacePointCreation/SpacePointTrackCand.h>
16#include <tracking/trackFindingVXD/analyzingTools/RootParameterTracker.h>
17
18//stl-stuff
19#include <string>
20
21namespace Belle2 {
26 namespace Tracking {
27
28
29
36 public:
37
38
41
42
45
46
48 void initialize() override;
49
50
52 void beginRun() override {}
53
54
56 void event() override;
57
58
60 void endRun() override;
61
62
64 void terminate() override;
65
66
68 template<class PurityType>
69 PurityType returnDominantParticleID(const std::vector<PurityType >& purities)
70 {
71 PurityType bestResult = PurityType();
72
73 for (const PurityType& iD : purities) {
74 // cppcheck-suppress useStlAlgorithm
75 if (iD > bestResult) { bestResult = iD; }
76 }
77 return bestResult;
78 }
79
80
81 protected:
82
83
86
89
92
95
98
99
100// parameters:
101
103 std::string m_PARAMprintData;
104
111 std::vector< std::vector<std::vector<std::string> > > m_PARAMtrackedParametersDouble;
112
119 std::vector< std::vector<std::vector<std::string> > > m_PARAMtrackedParametersInt;
120
127 std::vector< std::vector<std::vector<std::string> > > m_PARAMtrackedParametersVecDouble;
128
131
133 std::vector<std::string> m_PARAMrootFileName;
134
136 std::vector<double> m_PARAMorigin;
137
140
143
145 std::string m_PARAMtestTCname;
146
149
151 std::string m_PARAMlostTCname;
152
160
165
168
171
172
173// counters:
174
176 unsigned int m_countReconstructedTCs = 0;
177
179 unsigned int m_countAcceptedGFTCs = 0;
180
182 unsigned int m_lostGFTCs = 0;
183
185 unsigned int m_eventCounter = 0;
186
188 unsigned int m_mcTrackCounter = 0;
189
191 unsigned int m_totalRealHits = 0;
192
194 unsigned int m_caTrackCounter = 0;
195
198
200 unsigned int m_countedCleanRecoveries = 0;
201
204
206 unsigned int m_countedTCsTooShort = 0;
207
209 unsigned int m_countedGhosts = 0;
210
212 unsigned int m_countedDoubleEntries = 0;
213
215 unsigned int m_countedLostTest = 0;
216
218 unsigned int m_countedLostRef = 0;
219
221 unsigned int m_countedReferenceClones = 0;
222
224 unsigned int m_wrongChargeSignCounter = 0;
225
227 unsigned int m_mcTrackVectorCounter = 0;
228
230 unsigned int m_nMcPXDHits = 0;
231
233 unsigned int m_nMcSVDHits = 0;
234
236 unsigned int m_nCaPXDHits = 0;
237
239 unsigned int m_nCaSVDHits = 0;
240
241
242
243 private:
244 };
245 } // Tracking namespace
247}
Base class for Modules.
Definition: Module.h:72
Production notes for RootParameterTracker:
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
std::string m_PARAMlostTCname
the name of the trackCandidateCollection of lost track candidates determined by the TFAnalizer
unsigned int m_eventCounter
knows current event number.
unsigned int m_nMcPXDHits
counts total number of pxdHits added by mcTF.
unsigned int m_nCaSVDHits
counts total number of svdHits added by caTF.
unsigned int m_lostGFTCs
counts number of TCs found by MCTF but lost by VXDTF, they are stored for external tests in storaArra...
std::string m_PARAMreferenceTCname
the name of the storeArray container provided by the reference TF (has to be set manually there and h...
unsigned int m_PARAMminNDFThreshold
defines how many measurements (numbers of degrees of freedom) the TC must have to be accepted as reco...
unsigned int m_nCaPXDHits
counts total number of pxdHits added by caTF.
unsigned int m_mcTrackVectorCounter
another counter of mcTCs, consideres size of datastores containing mcTCs.
unsigned int m_countAcceptedGFTCs
counts number of accepted TCs which are stored in separate container for external tests (e....
unsigned int m_countedCleanRecoveries
counts number of tracks, where no foreign hits were attached ('clean'), does NOT mean that all recons...
unsigned int m_countedReferenceClones
counts number reference TCs which were marked as clones.
StoreArray< SpacePointTrackCand > m_referenceTCs
StoreArray for the reference TCs provided by a reference TF (like trackFinderMCTruth).
unsigned int m_totalRealHits
total number of hits (clusters/2) attached to mcTCs (therefore total number of real hits).
double m_PARAMpurityThreshold
choose value to filter TCs found by VXDTF.
StoreArray< SpacePointTrackCand > m_lostTCs
StoreArray for lost track candidates.
unsigned int m_wrongChargeSignCounter
counts number of times, where assigned caTC guessed wrong sign of charge.
unsigned int m_countedLostTest
counts number of Lost test tcs.
std::string m_PARAMprintData
depending on what value you set it, it will print data like momentum residuals or any other interesti...
bool m_PARAMignoreDeadTCs
if true, test-tc whose activation-state is set to false are skipped for analysis.
unsigned int m_countedTCsTooShort
counts number of tracks, which did not have enough hits at all.
bool m_PARAMwriteToRoot
if true, analysis data is stored to root file with file name chosen by 'rootFileName'
std::vector< std::string > m_PARAMrootFileName
only two entries accepted, first one is the root filename, second one is 'RECREATE' or 'UPDATE' which...
bool m_PARAMdoEventSummary
if true, for each event a summary will be given (WARNING produces a lot of output!
unsigned int m_caTrackCounter
counts number of tracks reconstructed by the CATF.
RootParameterTracker m_rootParameterTracker
takes care of collecting data and storing it to root branches
std::string m_PARAMacceptedTCname
the name of the trackCandidateCollection of successfully reconstructed track candidates determined by...
unsigned int m_countedContaminatedRecoveries
counts number of tracks, where foreign hits werew attached but its purity was above the threshold.
unsigned int m_nMcSVDHits
counts total number of svdHits added by mcTF.
unsigned int m_countedDoubleEntries
if a TC was found more than once with good (contaminated or clean ones) caTCs, it will be counted to ...
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.
StoreArray< SpacePointTrackCand > m_testTCs
StoreArray for the TCs provided by a TF to be tested (like VXDTF).
std::string m_PARAMtestTCname
the name of the storeArray container provided by the TF to be evaluated (has to be set manually there...
unsigned int m_mcTrackCounter
counts number of tracks reconstructed by the mcTrackFinder.
StoreArray< SpacePointTrackCand > m_acceptedTCs
StoreArray for accepted/successfully reconstructed track candidates.
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.
bool m_PARAMuseMCDataForValues
if true, for testTC the values of attached refTC will be stored instead of own values.
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.
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
unsigned int m_countedGhosts
counts number of tracks, where a dominating TC was found, but the purity did not reach the threshold.
std::vector< double > m_PARAMorigin
only allowed size: 3.
unsigned int m_countReconstructedTCs
counts number of reconstructed TCs.
unsigned int m_countedPerfectRecoveries
counts number of tracks, where no foreign hits were attached ('clean') AND all hits of the mcTC were ...
unsigned int m_countedLostRef
counts number of Lost reference tcs.
Abstract base class for different kinds of events.