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
51
52
54 void event() override;
55
56
58 void endRun() override;
59
60
62 void terminate() override;
63
64
66 template<class PurityType>
67 static PurityType returnDominantParticleID(const std::vector<PurityType >& purities)
68 {
69 PurityType bestResult = PurityType();
70
71 for (const PurityType& iD : purities) {
72 // cppcheck-suppress useStlAlgorithm
73 if (iD > bestResult) { bestResult = iD; }
74 }
75 return bestResult;
76 }
77
78
79 protected:
80
81
84
87
90
93
96
97
98// parameters:
99
101 std::string m_PARAMprintData;
102
109 std::vector< std::vector<std::vector<std::string> > > m_PARAMtrackedParametersDouble;
110
117 std::vector< std::vector<std::vector<std::string> > > m_PARAMtrackedParametersInt;
118
125 std::vector< std::vector<std::vector<std::string> > > m_PARAMtrackedParametersVecDouble;
126
129
131 std::vector<std::string> m_PARAMrootFileName;
132
134 std::vector<double> m_PARAMorigin;
135
138
141
143 std::string m_PARAMtestTCname;
144
147
149 std::string m_PARAMlostTCname;
150
158
163
166
169
170
171// counters:
172
174 unsigned int m_countReconstructedTCs = 0;
175
177 unsigned int m_countAcceptedGFTCs = 0;
178
180 unsigned int m_lostGFTCs = 0;
181
183 unsigned int m_eventCounter = 0;
184
186 unsigned int m_mcTrackCounter = 0;
187
189 unsigned int m_totalRealHits = 0;
190
192 unsigned int m_caTrackCounter = 0;
193
196
198 unsigned int m_countedCleanRecoveries = 0;
199
202
204 unsigned int m_countedTCsTooShort = 0;
205
207 unsigned int m_countedGhosts = 0;
208
210 unsigned int m_countedDoubleEntries = 0;
211
213 unsigned int m_countedLostTest = 0;
214
216 unsigned int m_countedLostRef = 0;
217
219 unsigned int m_countedReferenceClones = 0;
220
222 unsigned int m_wrongChargeSignCounter = 0;
223
225 unsigned int m_mcTrackVectorCounter = 0;
226
228 unsigned int m_nMcPXDHits = 0;
229
231 unsigned int m_nMcSVDHits = 0;
232
234 unsigned int m_nCaPXDHits = 0;
235
237 unsigned int m_nCaSVDHits = 0;
238
239
240
241 private:
242 };
243 } // Tracking namespace
245}
Module()
Constructor.
Definition Module.cc:30
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...
static 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
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, considers 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.
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.