9 #include <framework/dataobjects/EventMetaData.h>
10 #include <framework/datastore/StoreObjPtr.h>
11 #include <framework/core/ModuleParam.templateDetails.h>
14 #include <tracking/modules/VXDTFHelperTools/TrackFinderVXDAnalizerModule.h>
15 #include <tracking/spacePointCreation/SpacePointTrackCand.h>
16 #include <tracking/spacePointCreation/PurityCalculatorTools.h>
17 #include <tracking/trackFindingVXD/analyzingTools/AnalizerTCInfo.h>
18 #include <tracking/trackFindingVXD/analyzingTools/AnalyzingAlgorithmFactory.h>
19 #include <tracking/trackFindingVXD/analyzingTools/AlgoritmType.h>
30 using namespace Belle2::Tracking;
45 B2INFO(
"TrackFinderVXDAnalizer-initialize");
47 vector<string> rootFileNameVals;
48 rootFileNameVals.push_back(
"TrackFinderVXDAnalizerResults");
49 rootFileNameVals.push_back(
"RECREATE");
52 vector< vector< vector< string> > > trackedParametersDouble = {
54 {
"AnalyzingAlgorithmValueP",
"AnalyzingAlgorithmValuePT",
"AnalyzingAlgorithmValuePTheta",
"AnalyzingAlgorithmValuePPhi",
"AnalyzingAlgorithmValueDistSeed2IPXY",
"AnalyzingAlgorithmValueDistSeed2IPZ",
"AnalyzingAlgorithmValueQI"}
57 {
"AnalyzingAlgorithmValueP",
"AnalyzingAlgorithmValuePT",
"AnalyzingAlgorithmValuePTheta",
"AnalyzingAlgorithmValuePPhi",
"AnalyzingAlgorithmValueDistSeed2IPXY",
"AnalyzingAlgorithmValueDistSeed2IPZ",
"AnalyzingAlgorithmValueQI"}
61 "AnalyzingAlgorithmValueP",
"AnalyzingAlgorithmValuePT",
"AnalyzingAlgorithmValuePTheta",
"AnalyzingAlgorithmValuePPhi",
"AnalyzingAlgorithmValueDistSeed2IPXY",
"AnalyzingAlgorithmValueDistSeed2IPZ",
"AnalyzingAlgorithmValueQI",
62 "AnalyzingAlgorithmResidualP",
"AnalyzingAlgorithmResidualPT",
"AnalyzingAlgorithmResidualPTheta",
"AnalyzingAlgorithmResidualPPhi",
"AnalyzingAlgorithmResidualPTAngle"
67 "AnalyzingAlgorithmValueP",
"AnalyzingAlgorithmValuePT",
"AnalyzingAlgorithmValuePTheta",
"AnalyzingAlgorithmValuePPhi",
"AnalyzingAlgorithmValueDistSeed2IPXY",
"AnalyzingAlgorithmValueDistSeed2IPZ",
"AnalyzingAlgorithmValueQI",
68 "AnalyzingAlgorithmResidualP",
"AnalyzingAlgorithmResidualPT",
"AnalyzingAlgorithmResidualPTheta",
"AnalyzingAlgorithmResidualPPhi",
"AnalyzingAlgorithmResidualPTAngle"
73 "AnalyzingAlgorithmValueP",
"AnalyzingAlgorithmValuePT",
"AnalyzingAlgorithmValuePTheta",
"AnalyzingAlgorithmValuePPhi",
"AnalyzingAlgorithmValueDistSeed2IPXY",
"AnalyzingAlgorithmValueDistSeed2IPZ",
"AnalyzingAlgorithmValueQI",
74 "AnalyzingAlgorithmResidualP",
"AnalyzingAlgorithmResidualPT",
"AnalyzingAlgorithmResidualPTheta",
"AnalyzingAlgorithmResidualPPhi",
"AnalyzingAlgorithmResidualPTAngle"
79 vector< vector< vector< string> > > trackedParametersInt = {
81 {
"AnalyzingAlgorithmTotalUClusters",
"AnalyzingAlgorithmTotalVClusters"}
84 {
"AnalyzingAlgorithmTotalUClusters",
"AnalyzingAlgorithmTotalVClusters"}
87 {
"AnalyzingAlgorithmTotalUClusters",
"AnalyzingAlgorithmTotalVClusters",
"AnalyzingAlgorithmLostUClusters",
"AnalyzingAlgorithmLostVClusters"}
90 {
"AnalyzingAlgorithmTotalUClusters",
"AnalyzingAlgorithmTotalVClusters",
"AnalyzingAlgorithmLostUClusters",
"AnalyzingAlgorithmLostVClusters"}
93 {
"AnalyzingAlgorithmTotalUClusters",
"AnalyzingAlgorithmTotalVClusters",
"AnalyzingAlgorithmLostUClusters",
"AnalyzingAlgorithmLostVClusters"}
98 vector< vector< vector< string> > > trackedParametersVecDouble = {
100 {
"AnalyzingAlgorithmTotalUEDep",
"AnalyzingAlgorithmTotalVEDep"}
103 {
"AnalyzingAlgorithmTotalUEDep",
"AnalyzingAlgorithmTotalVEDep"}
106 {
"AnalyzingAlgorithmTotalUEDep",
"AnalyzingAlgorithmTotalVEDep",
"AnalyzingAlgorithmLostUEDep",
"AnalyzingAlgorithmLostVEDep"}
109 {
"AnalyzingAlgorithmTotalUEDep",
"AnalyzingAlgorithmTotalVEDep",
"AnalyzingAlgorithmLostUEDep",
"AnalyzingAlgorithmLostVEDep"}
112 {
"AnalyzingAlgorithmTotalUEDep",
"AnalyzingAlgorithmTotalVEDep",
"AnalyzingAlgorithmLostUEDep",
"AnalyzingAlgorithmLostVEDep"}
117 setDescription(
"analyzes quality of SpacePointTrackCands delivered by a test-TF compared to a reference TF");
118 setPropertyFlags(c_ParallelProcessingCertified);
121 addParam(
"referenceTCname", m_PARAMreferenceTCname,
"the name of the storeArray container provided by the reference TF",
123 addParam(
"testTCname", m_PARAMtestTCname,
"the name of the storeArray container provided by the TF to be evaluated",
string(
""));
124 addParam(
"acceptedTCname", m_PARAMacceptedTCname,
"special name for accepted/successfully reconstructed track candidates",
125 string(
"acceptedVXDTFTracks"));
126 addParam(
"lostTCname", m_PARAMlostTCname,
"special name for lost track candidates",
string(
"lostTracks"));
127 addParam(
"purityThreshold", m_PARAMpurityThreshold,
128 " chose value to filter TCs found by Test TF. TCs having purities lower than this value won't be marked as reconstructed",
130 addParam(
"minNDFThreshold", m_PARAMminNDFThreshold,
131 " defines how many measurements (numbers of degrees of freedom) the TC must have to be accepted as reconstructed, standard is 5",
134 addParam(
"writeToRoot", m_PARAMwriteToRoot,
135 " if true, analysis data is stored to root file with file name chosen by 'rootFileName'",
bool(
true));
136 addParam(
"rootFileName", m_PARAMrootFileName,
137 " only two entries accepted, first one is the root filename, second one is 'RECREATE' or 'UPDATE' which is the write mode for the root file, parameter is used only if 'writeToRoot'=true ",
140 addParam(
"trackedParametersDouble", m_PARAMtrackedParametersDouble,
141 "set here all parameters to be tracked which use an algorithm storing one double per tc. Accepts a vector of vector of vector of strings of entries. Sample usage in steering file: param('trackedParametersDouble', [ [ ['Perfect'], ['AnalyzingAlgorithmValuePX', 'AnalyzingAlgorithmResidualP'] ] ]) first innermost vector storest the TCType to be tracked, second the algorithms which shall be applied on that tcType",
142 trackedParametersDouble);
144 addParam(
"trackedParametersInt", m_PARAMtrackedParametersInt,
145 "set here all parameters to be tracked which use an algorithm storing one int per tc. Accepts a vector of vector of vector of strings of entries. Sample usage in steering file: param('trackedParametersDouble', [ [ ['Contaminated'], ['AnalyzingAlgorithmLostUClusters', 'AnalyzingAlgorithmLostVClusters'] ] ]) first innermost vector storest the TCType to be tracked, second the algorithms which shall be applied on that tcType",
146 trackedParametersInt);
148 addParam(
"trackedParametersVecDouble", m_PARAMtrackedParametersVecDouble,
149 "set here all parameters to be tracked which use an algorithm storing one vector< double> per tc. Accepts a vector of vector of vector of strings of entries. Sample usage in steering file: param('trackedParametersDouble', [ [ ['Clean'], ['AnalyzingAlgorithmLostUEDep', 'AnalyzingAlgorithmLostVEDep'] ] ]) first innermost vector storest the TCType to be tracked, second the algorithms which shall be applied on that tcType",
150 trackedParametersVecDouble);
153 addParam(
"origin", m_PARAMorigin,
" only allowed size: 3. stores coordinates of the origin used", {0, 0, 0});
154 addParam(
"useMCDataForValues", m_PARAMuseMCDataForValues,
155 "if true, for testTC the values of attached refTC will be stored instead of own values. - why are there values of the refTC stored? we want to know the real data, not the guesses of the reconstructed data. Deviations of reference values to guesses of the reconstructed data will be stored in resiudals anyway."
158 addParam(
"ignoreDeadTCs", m_PARAMignoreDeadTCs,
159 " if true, test-tc whose activation-state is set to false are skipped for analysis",
bool(
true));
161 addParam(
"doEventSummary", m_PARAMdoEventSummary,
162 "if true, for each event a summary will be given (WARNING produces a lot of output!",
bool(
false));
166 void TrackFinderVXDAnalizerModule::initialize()
168 m_referenceTCs.isRequired(m_PARAMreferenceTCname);
169 m_testTCs.isRequired(m_PARAMtestTCname);
170 m_acceptedTCs.registerInDataStore(m_PARAMacceptedTCname, DataStore::c_DontWriteOut | DataStore::c_ErrorIfAlreadyRegistered);
171 m_lostTCs.registerInDataStore(m_PARAMlostTCname, DataStore::c_DontWriteOut | DataStore::c_ErrorIfAlreadyRegistered);
174 if (m_PARAMorigin.size() != 3) {
175 B2ERROR(
"TrackFinderVXDAnalizerModule::initialize() passed parameter 'origin' has wrong number of entries (allowed: 3) of " <<
176 m_PARAMorigin.size() <<
" reset to standard (0, 0, 0)");
177 m_PARAMorigin = {0, 0, 0};
181 if (m_PARAMwriteToRoot ==
false) {
return; }
183 if ((m_PARAMrootFileName.size()) != 2) {
185 for (
string& entry : m_PARAMrootFileName) {
186 output +=
"'" + entry +
"' ";
188 B2FATAL(
"TrackFinderVXDAnalizer::initialize(), rootFileName is set wrong, although parameter 'writeToRoot' is enabled! Actual entries are: "
193 m_rootParameterTracker.initialize(m_PARAMrootFileName[0] +
".root", m_PARAMrootFileName[1]);
201 for (
auto& parameterPackage : m_PARAMtrackedParametersDouble) {
203 if (parameterPackage.size() != 2) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
206 if (parameterPackage.front().size() != 1) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
208 std::string tcTypeName = parameterPackage.front()[0];
209 if (TCType::isValidName(tcTypeName) ==
false)
210 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (invalid tcType: " << tcTypeName <<
")"); }
213 for (
auto& algorithm : parameterPackage.back()) {
214 if (AlgoritmType::isValidName(algorithm) ==
false)
215 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (invalid algorithmType: " << algorithm <<
")"); }
216 m_rootParameterTracker.addParameters4DoubleAlgorithms(tcTypeName, algorithm);
219 AlgorithmDouble::setOrigin(TVector3(m_PARAMorigin[0], m_PARAMorigin[1], m_PARAMorigin[2]));
220 AlgorithmDouble::setWillRefTCdataBeUsed4TestTCs(m_PARAMuseMCDataForValues);
223 for (
auto& parameterPackage : m_PARAMtrackedParametersInt) {
225 if (parameterPackage.size() != 2) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
228 if (parameterPackage.front().size() != 1) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
230 std::string tcTypeName = parameterPackage.front()[0];
231 if (TCType::isValidName(tcTypeName) ==
false)
232 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (invalid tcType: " << tcTypeName <<
")"); }
235 for (
auto& algorithm : parameterPackage.back()) {
236 if (AlgoritmType::isValidName(algorithm) ==
false)
237 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (invalid algorithmType: " << algorithm <<
")"); }
238 m_rootParameterTracker.addParameters4IntAlgorithms(tcTypeName, algorithm);
241 AlgorithmInt::setOrigin(TVector3(m_PARAMorigin[0], m_PARAMorigin[1], m_PARAMorigin[2]));
242 AlgorithmInt::setWillRefTCdataBeUsed4TestTCs(m_PARAMuseMCDataForValues);
245 for (
auto& parameterPackage : m_PARAMtrackedParametersVecDouble) {
247 if (parameterPackage.size() != 2) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
250 if (parameterPackage.front().size() != 1) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
252 std::string tcTypeName = parameterPackage.front()[0];
253 if (TCType::isValidName(tcTypeName) ==
false)
254 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (invalid tcType: " << tcTypeName <<
")"); }
257 for (
auto& algorithm : parameterPackage.back()) {
258 if (AlgoritmType::isValidName(algorithm) ==
false)
259 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (invalid algorithmType: " << algorithm <<
")"); }
260 m_rootParameterTracker.addParameters4VecDoubleAlgorithms(tcTypeName, algorithm);
263 AlgorithmVecDouble::setOrigin(TVector3(m_PARAMorigin[0], m_PARAMorigin[1], m_PARAMorigin[2]));
264 AlgorithmVecDouble::setWillRefTCdataBeUsed4TestTCs(m_PARAMuseMCDataForValues);
268 void TrackFinderVXDAnalizerModule::event()
272 m_eventCounter = eventMetaDataPtr->getEvent();
273 B2DEBUG(10,
"################## entering TrackFinderVXDAnalizerModule - event " << m_eventCounter <<
" ######################");
275 int nReferenceTCs = m_referenceTCs.getEntries();
276 m_mcTrackCounter += nReferenceTCs;
277 m_mcTrackVectorCounter += nReferenceTCs;
278 int nTestTCs = m_testTCs.getEntries();
279 m_caTrackCounter += nTestTCs;
284 vector<AnalizerTCInfo> referenceTCVector;
289 B2DEBUG(25,
"Calculating purities for reference TC " << nTC <<
", name. Dominating iD " << particleInfo.
getParticleID() <<
290 " with purity " << particleInfo.
getPurity().second <<
" was found among " << purities.size() <<
" assigned particles");
292 AnalizerTCInfo referenceTC = AnalizerTCInfo::createTC(
true, particleInfo, aTC);
293 referenceTCVector.push_back(referenceTC);
296 if (LogSystem::Instance().isLevelEnabled(LogConfig::c_Debug, 1, PACKAGENAME())) { aTC.print(1); }
302 vector<AnalizerTCInfo> testTCVector;
304 if (m_PARAMignoreDeadTCs and aTC.hasRefereeStatus(SpacePointTrackCand::c_isActive) ==
false) {
continue; }
308 B2DEBUG(25,
"Calculating purities for test TC " << nTC <<
", name. Dominating iD " << particleInfo.
getParticleID() <<
309 " with purity" << particleInfo.
getPurity().second <<
" was found among " << purities.size() <<
" assigned particles");
311 AnalizerTCInfo testTC = AnalizerTCInfo::createTC(
false, particleInfo, aTC);
312 testTCVector.push_back(testTC);
315 if (LogSystem::Instance().isLevelEnabled(LogConfig::c_Debug, 1, PACKAGENAME())) { aTC.print(1); }
326 vector<std::pair<AnalizerTCInfo*, AnalizerTCInfo*> > pairedTCs;
328 int testID = testTC.assignedID.getParticleID();
331 int refID = referenceTC.assignedID.getParticleID();
332 B2DEBUG(50,
"test TC with assigned ID " << testID <<
" was matched with refID " << refID);
333 if (refID != testID)
continue;
335 testTC.tcType = AnalizerTCInfo::classifyTC(referenceTC, testTC, m_PARAMpurityThreshold, m_PARAMminNDFThreshold);
337 B2DEBUG(50,
"test TC with assigned ID " << testID <<
338 " was classified for the corresponding with type for testTC/refTC: " << TCType::getTypeName(testTC.tcType) <<
339 "/" << TCType::getTypeName(referenceTC.tcType) <<
" and will now paired up");
341 referenceTC.pairUp(&testTC);
343 pairedTCs.push_back({ &testTC, &referenceTC});
348 AnalizerTCInfo::markUnused(testTCVector, TCType::Ghost);
351 AnalizerTCInfo::markUnused(referenceTCVector, TCType::Lost);
356 unsigned int nPerfectTCs = 0, nCleanTCs = 0, nContaminatedTCs = 0, nFound = 0;
358 unsigned int nClonedTCs = 0, nSmallTCs = 0, nGhostTCs = 0, nLostTestTCs = 0, nLostRefTCs = 0;
360 unsigned int nBadCases = 0, nRefClones = 0;
362 unsigned int refPXDClusters = 0, refSVDClusters = 0, testPXDClusters = 0, testSVDClusters = 0;
365 testPXDClusters += aTC.assignedID.getNPXDClustersTotal();
366 testSVDClusters += aTC.assignedID.getNSVDUClustersTotal() + aTC.assignedID.getNSVDVClustersTotal();
368 switch (aTC.tcType) {
369 case TCType::Perfect: { nPerfectTCs++; nFound++;
break; }
370 case TCType::Clean: { nCleanTCs++; nFound++;
break; }
371 case TCType::Contaminated: { nContaminatedTCs++; nFound ++;
break; }
372 case TCType::Clone: { nClonedTCs++;
break; }
373 case TCType::SmallStump: { nSmallTCs++;
break; }
374 case TCType::Ghost: { nGhostTCs++;
break; }
375 case TCType::Lost: { nLostTestTCs++;
break; }
378 B2WARNING(
"TrackFinderVXDAnalizer::event(): test TC got type " << TCType::getTypeName(aTC.tcType) <<
379 " which is not counted for efficiency-calculation");
385 refPXDClusters += aTC.assignedID.getNPXDClustersTotal();
386 refSVDClusters += aTC.assignedID.getNSVDUClustersTotal() + aTC.assignedID.getNSVDVClustersTotal();
388 switch (aTC.tcType) {
389 case TCType::Reference: {
break; }
390 case TCType::Clone: { nRefClones++;
break; }
391 case TCType::Lost: { nLostRefTCs++;
break; }
394 B2WARNING(
"TrackFinderVXDAnalizer::event(): reference TC got type " << TCType::getTypeName(aTC.tcType) <<
395 " which is not counted for efficiency-calculation");
402 string summary1 =
"TrackFinderVXDAnalizer-Event " + to_string(m_eventCounter) +
403 ": the tested TrackFinder found: " +
404 " IDs (total/perfect/clean/contaminated/clone/tooShort/ghost: " + to_string(nFound) +
405 "/" + to_string(nPerfectTCs) +
406 "/" + to_string(nCleanTCs) +
407 "/" + to_string(nContaminatedTCs) +
408 "/" + to_string(nClonedTCs) +
409 "/" + to_string(nSmallTCs) +
410 "/" + to_string(nGhostTCs) +
411 ") within " + to_string(nTestTCs) +
412 " TCs and lost (test/ref) " + to_string(nLostTestTCs) +
413 "/" + to_string(nLostRefTCs) +
414 " TCs. nBadCases: " + to_string(nBadCases) +
415 " refClones: " + to_string(nRefClones) +
417 "There are " + to_string(nReferenceTCs) +
418 " referenceTCs, with mean of " + to_string((
float(refPXDClusters) /
float(nReferenceTCs))) +
419 "/" + to_string((
float(refSVDClusters) /
float(nReferenceTCs))) +
" PXD/SVD clusters"
421 "There are " + to_string(nTestTCs) +
422 " testTCs, with mean of " + to_string((
float(testPXDClusters) /
float(nTestTCs))) +
423 "/" + to_string((
float(testSVDClusters) /
float(nTestTCs))) +
" PXD/SVD clusters";
425 string summary2 =
"TrackFinderVXDAnalizer-Event " + to_string(m_eventCounter) +
426 ": the tested TrackFinder had an efficiency : total/perfect/clean/contaminated/clone/tooShort/ghost: " +
427 to_string(
double(100 * nFound) /
double(nReferenceTCs)) +
428 "%/" + to_string(
double(100 * nPerfectTCs) /
double(nReferenceTCs)) +
429 "%/" + to_string(
double(100 * nCleanTCs) /
double(nReferenceTCs)) +
430 "%/" + to_string(
double(100 * nContaminatedTCs) /
double(nReferenceTCs)) +
431 "%/" + to_string(
double(100 * nClonedTCs) /
double(nReferenceTCs)) +
432 "%/" + to_string(
double(100 * nSmallTCs) /
double(nReferenceTCs)) +
433 "%/" + to_string(
double(100 * nGhostTCs) /
double(nReferenceTCs)) +
"%";
435 string summary3 =
"TrackFinderVXDAnalizer-Event " + to_string(m_eventCounter) +
436 ": totalCA|totalMC|ratio of pxdHits " + to_string(testPXDClusters) +
437 "|" + to_string(refPXDClusters) +
438 "|" + to_string(
float(testPXDClusters) /
float(refPXDClusters)) +
439 ", svdHits " + to_string(testSVDClusters) +
440 "|" + to_string(refSVDClusters) +
441 "|" + to_string(
float(testSVDClusters) /
float(refSVDClusters)) +
" found by the two TFs";
443 if (m_PARAMdoEventSummary) {
448 B2DEBUG(10, summary1);
449 B2DEBUG(10, summary2);
450 B2DEBUG(10, summary3);
453 m_totalRealHits += refPXDClusters + refSVDClusters;
454 m_nCaPXDHits += testPXDClusters;
455 m_nMcPXDHits += refPXDClusters;
456 m_nCaSVDHits += testSVDClusters;
457 m_nMcSVDHits += refSVDClusters;
458 m_countReconstructedTCs += nFound;
459 m_countedPerfectRecoveries += nPerfectTCs;
460 m_countedCleanRecoveries += nCleanTCs;
461 m_countedContaminatedRecoveries += nContaminatedTCs;
462 m_countedDoubleEntries += nClonedTCs;
463 m_countedTCsTooShort += nSmallTCs;
464 m_countedGhosts += nGhostTCs;
465 m_countedLostTest += nLostTestTCs;
466 m_countedLostRef += nLostRefTCs;
467 m_countedReferenceClones += nRefClones;
495 if (m_PARAMwriteToRoot ==
false) {
return; }
499 m_rootParameterTracker.collectData(testTCVector);
500 m_rootParameterTracker.collectData(referenceTCVector);
502 m_rootParameterTracker.fillRoot();
507 void TrackFinderVXDAnalizerModule::endRun()
509 B2INFO(
"------------- >>>TrackFinderVXDAnalizerModule::endRun<<< -------------");
510 B2DEBUG(1,
"TrackFinderVXDAnalizerModule-explanation: \n" <<
511 " perfect recovery means: all hits of mc-TC found again and clean TC. \n" <<
512 " clean recovery means: no foreign hits within TC. \n" <<
513 " ghost means: QI was below threshold or mcTC was found more than once (e.g. because of curlers) \n" <<
514 " found more than once means: that there was more than one TC which was assigned to the same mcTC but each of them were good enough for themselves to be classified as reconstructed");
516 B2INFO(
"TrackFinderVXDAnalizerModule: After " << m_eventCounter + 1 <<
" events there was a total number of " << m_mcTrackCounter <<
517 " mcTrackCandidates and " << m_totalRealHits <<
" realHits. Of these TCs, " << m_mcTrackVectorCounter <<
518 " mcTrackCandidates where used for analysis because of cutoffs.");
519 B2INFO(
"TrackFinderVXDAnalizerModule: There were " << m_caTrackCounter <<
" caTrackCandidates, of those " << m_countAcceptedGFTCs <<
520 " were stored in " << m_PARAMacceptedTCname <<
" and " << m_lostGFTCs <<
" lost TCs were stored in " << m_PARAMlostTCname <<
521 " for further use, number of times where charge was guessed wrong: " << m_wrongChargeSignCounter <<
522 ", number of caTCs which produced a double entry: " << m_countedDoubleEntries);
523 B2INFO(
"TrackFinderVXDAnalizerModule: totalCA|totalMC|ratio of pxdHits " << m_nCaPXDHits <<
"|" << m_nMcPXDHits <<
"|" <<
float(
524 m_nCaPXDHits) /
float(m_nMcPXDHits) <<
525 ", svdHits " << m_nCaSVDHits <<
"|" << m_nMcSVDHits <<
"|" <<
float(m_nCaSVDHits) /
float(m_nMcSVDHits) <<
526 " found by the two TFs (ghost hits not removed, therefore only useful if ghost-rate is low)");
528 B2INFO(
"TrackFinderVXDAnalizerModule: the VXDTF found:\n" <<
529 "Absolute numbers: total/perfect/clean/contaminated/clone/tooShort/ghost: " << m_countReconstructedTCs <<
530 "/" << m_countedPerfectRecoveries <<
531 "/" << m_countedCleanRecoveries <<
532 "/" << m_countedContaminatedRecoveries <<
533 "/" << m_countedDoubleEntries <<
534 "/" << m_countedTCsTooShort <<
535 "/" << m_countedGhosts <<
536 " efficiency : total/perfect/clean/contaminated/clone/tooShort/ghost: " <<
double(100 * m_countReconstructedTCs) /
double(
537 m_mcTrackVectorCounter) <<
538 "%/" <<
double(100 * m_countedPerfectRecoveries) /
double(m_mcTrackVectorCounter) <<
539 "%/" <<
double(100 * m_countedCleanRecoveries) /
double(m_mcTrackVectorCounter) <<
540 "%/" <<
double(100 * m_countedContaminatedRecoveries) /
double(m_mcTrackVectorCounter) <<
541 "%/" <<
double(100 * m_countedDoubleEntries) /
double(m_mcTrackVectorCounter) <<
542 "%/" <<
double(100 * m_countedTCsTooShort) /
double(m_mcTrackVectorCounter) <<
543 "%/" <<
double(100 * m_countedGhosts) /
double(m_mcTrackVectorCounter) <<
546 B2INFO(
"TrackFinderVXDAnalizerModule: additional numbers:\"" <<
547 "nCountedLost (test/ref): " << m_countedLostTest <<
548 "/" << m_countedLostRef <<
549 ", nRefClones: " << m_countedReferenceClones <<
550 ", in percent - nLost (test/ref): " <<
double(100 * m_countedLostTest) /
double(m_mcTrackVectorCounter) <<
551 "/" <<
double(100 * m_countedLostRef) /
double(m_mcTrackVectorCounter) <<
552 "%, nClones: " <<
double(100 * m_countedReferenceClones) /
double(m_mcTrackVectorCounter) <<
564 void TrackFinderVXDAnalizerModule::terminate()
567 if (m_PARAMwriteToRoot ==
false) {
return; }
568 m_rootParameterTracker.terminate();
simple class storing infos relevant for a TC for analizing it.
Base class for storing an algorithm determining the data one wants to have.
The MC VXD Purity info container class.
std::pair< int, float > getPurity() const
getter - returns overal purity (.second) for this particleID (.first).
int getParticleID() const
getter - returns the ID of the particle, if value is -1 no particle has been able to be found for it
Storage for (VXD) SpacePoint-based track candidates.
Type-safe access to single objects in the data store.
The TrackFinderVXDAnalizerModule.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
static std::vector< Belle2::MCVXDPurityInfo > createPurityInfos(const SPContainer *container)
create a vector of MCVXDPurityInfos objects for any given container holding SpacePoints and providing...
Abstract base class for different kinds of events.