11 #include <framework/dataobjects/EventMetaData.h>
12 #include <framework/datastore/StoreObjPtr.h>
13 #include <framework/core/ModuleParam.templateDetails.h>
16 #include <tracking/modules/VXDTFHelperTools/TrackFinderVXDAnalizerModule.h>
17 #include <tracking/spacePointCreation/SpacePointTrackCand.h>
18 #include <tracking/spacePointCreation/PurityCalculatorTools.h>
19 #include <tracking/trackFindingVXD/analyzingTools/AnalizerTCInfo.h>
20 #include <tracking/trackFindingVXD/analyzingTools/AnalyzingAlgorithmFactory.h>
21 #include <tracking/trackFindingVXD/analyzingTools/AlgoritmType.h>
32 using namespace Belle2::Tracking;
47 B2INFO(
"TrackFinderVXDAnalizer-initialize");
49 vector<string> rootFileNameVals;
50 rootFileNameVals.push_back(
"TrackFinderVXDAnalizerResults");
51 rootFileNameVals.push_back(
"RECREATE");
54 vector< vector< vector< string> > > trackedParametersDouble = {
56 {
"AnalyzingAlgorithmValueP",
"AnalyzingAlgorithmValuePT",
"AnalyzingAlgorithmValuePTheta",
"AnalyzingAlgorithmValuePPhi",
"AnalyzingAlgorithmValueDistSeed2IPXY",
"AnalyzingAlgorithmValueDistSeed2IPZ",
"AnalyzingAlgorithmValueQI"}
59 {
"AnalyzingAlgorithmValueP",
"AnalyzingAlgorithmValuePT",
"AnalyzingAlgorithmValuePTheta",
"AnalyzingAlgorithmValuePPhi",
"AnalyzingAlgorithmValueDistSeed2IPXY",
"AnalyzingAlgorithmValueDistSeed2IPZ",
"AnalyzingAlgorithmValueQI"}
63 "AnalyzingAlgorithmValueP",
"AnalyzingAlgorithmValuePT",
"AnalyzingAlgorithmValuePTheta",
"AnalyzingAlgorithmValuePPhi",
"AnalyzingAlgorithmValueDistSeed2IPXY",
"AnalyzingAlgorithmValueDistSeed2IPZ",
"AnalyzingAlgorithmValueQI",
64 "AnalyzingAlgorithmResidualP",
"AnalyzingAlgorithmResidualPT",
"AnalyzingAlgorithmResidualPTheta",
"AnalyzingAlgorithmResidualPPhi",
"AnalyzingAlgorithmResidualPTAngle"
69 "AnalyzingAlgorithmValueP",
"AnalyzingAlgorithmValuePT",
"AnalyzingAlgorithmValuePTheta",
"AnalyzingAlgorithmValuePPhi",
"AnalyzingAlgorithmValueDistSeed2IPXY",
"AnalyzingAlgorithmValueDistSeed2IPZ",
"AnalyzingAlgorithmValueQI",
70 "AnalyzingAlgorithmResidualP",
"AnalyzingAlgorithmResidualPT",
"AnalyzingAlgorithmResidualPTheta",
"AnalyzingAlgorithmResidualPPhi",
"AnalyzingAlgorithmResidualPTAngle"
75 "AnalyzingAlgorithmValueP",
"AnalyzingAlgorithmValuePT",
"AnalyzingAlgorithmValuePTheta",
"AnalyzingAlgorithmValuePPhi",
"AnalyzingAlgorithmValueDistSeed2IPXY",
"AnalyzingAlgorithmValueDistSeed2IPZ",
"AnalyzingAlgorithmValueQI",
76 "AnalyzingAlgorithmResidualP",
"AnalyzingAlgorithmResidualPT",
"AnalyzingAlgorithmResidualPTheta",
"AnalyzingAlgorithmResidualPPhi",
"AnalyzingAlgorithmResidualPTAngle"
81 vector< vector< vector< string> > > trackedParametersInt = {
83 {
"AnalyzingAlgorithmTotalUClusters",
"AnalyzingAlgorithmTotalVClusters"}
86 {
"AnalyzingAlgorithmTotalUClusters",
"AnalyzingAlgorithmTotalVClusters"}
89 {
"AnalyzingAlgorithmTotalUClusters",
"AnalyzingAlgorithmTotalVClusters",
"AnalyzingAlgorithmLostUClusters",
"AnalyzingAlgorithmLostVClusters"}
92 {
"AnalyzingAlgorithmTotalUClusters",
"AnalyzingAlgorithmTotalVClusters",
"AnalyzingAlgorithmLostUClusters",
"AnalyzingAlgorithmLostVClusters"}
95 {
"AnalyzingAlgorithmTotalUClusters",
"AnalyzingAlgorithmTotalVClusters",
"AnalyzingAlgorithmLostUClusters",
"AnalyzingAlgorithmLostVClusters"}
100 vector< vector< vector< string> > > trackedParametersVecDouble = {
102 {
"AnalyzingAlgorithmTotalUEDep",
"AnalyzingAlgorithmTotalVEDep"}
105 {
"AnalyzingAlgorithmTotalUEDep",
"AnalyzingAlgorithmTotalVEDep"}
108 {
"AnalyzingAlgorithmTotalUEDep",
"AnalyzingAlgorithmTotalVEDep",
"AnalyzingAlgorithmLostUEDep",
"AnalyzingAlgorithmLostVEDep"}
111 {
"AnalyzingAlgorithmTotalUEDep",
"AnalyzingAlgorithmTotalVEDep",
"AnalyzingAlgorithmLostUEDep",
"AnalyzingAlgorithmLostVEDep"}
114 {
"AnalyzingAlgorithmTotalUEDep",
"AnalyzingAlgorithmTotalVEDep",
"AnalyzingAlgorithmLostUEDep",
"AnalyzingAlgorithmLostVEDep"}
119 setDescription(
"analyzes quality of SpacePointTrackCands delivered by a test-TF compared to a reference TF");
120 setPropertyFlags(c_ParallelProcessingCertified);
123 addParam(
"referenceTCname", m_PARAMreferenceTCname,
"the name of the storeArray container provided by the reference TF",
125 addParam(
"testTCname", m_PARAMtestTCname,
"the name of the storeArray container provided by the TF to be evaluated",
string(
""));
126 addParam(
"acceptedTCname", m_PARAMacceptedTCname,
"special name for accepted/successfully reconstructed track candidates",
127 string(
"acceptedVXDTFTracks"));
128 addParam(
"lostTCname", m_PARAMlostTCname,
"special name for lost track candidates",
string(
"lostTracks"));
129 addParam(
"purityThreshold", m_PARAMpurityThreshold,
130 " chose value to filter TCs found by Test TF. TCs having purities lower than this value won't be marked as reconstructed",
132 addParam(
"minNDFThreshold", m_PARAMminNDFThreshold,
133 " defines how many measurements (numbers of degrees of freedom) the TC must have to be accepted as reconstructed, standard is 5",
136 addParam(
"writeToRoot", m_PARAMwriteToRoot,
137 " if true, analysis data is stored to root file with file name chosen by 'rootFileName'",
bool(
true));
138 addParam(
"rootFileName", m_PARAMrootFileName,
139 " 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 ",
142 addParam(
"trackedParametersDouble", m_PARAMtrackedParametersDouble,
143 "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",
144 trackedParametersDouble);
146 addParam(
"trackedParametersInt", m_PARAMtrackedParametersInt,
147 "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",
148 trackedParametersInt);
150 addParam(
"trackedParametersVecDouble", m_PARAMtrackedParametersVecDouble,
151 "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",
152 trackedParametersVecDouble);
155 addParam(
"origin", m_PARAMorigin,
" only allowed size: 3. stores coordinates of the origin used", {0, 0, 0});
156 addParam(
"useMCDataForValues", m_PARAMuseMCDataForValues,
157 "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."
160 addParam(
"ignoreDeadTCs", m_PARAMignoreDeadTCs,
161 " if true, test-tc whose activation-state is set to false are skipped for analysis",
bool(
true));
163 addParam(
"doEventSummary", m_PARAMdoEventSummary,
164 "if true, for each event a summary will be given (WARNING produces a lot of output!",
bool(
false));
168 void TrackFinderVXDAnalizerModule::initialize()
170 m_referenceTCs.isRequired(m_PARAMreferenceTCname);
171 m_testTCs.isRequired(m_PARAMtestTCname);
172 m_acceptedTCs.registerInDataStore(m_PARAMacceptedTCname, DataStore::c_DontWriteOut | DataStore::c_ErrorIfAlreadyRegistered);
173 m_lostTCs.registerInDataStore(m_PARAMlostTCname, DataStore::c_DontWriteOut | DataStore::c_ErrorIfAlreadyRegistered);
176 if (m_PARAMorigin.size() != 3) {
177 B2ERROR(
"TrackFinderVXDAnalizerModule::initialize() passed parameter 'origin' has wrong number of entries (allowed: 3) of " <<
178 m_PARAMorigin.size() <<
" reset to standard (0, 0, 0)");
179 m_PARAMorigin = {0, 0, 0};
183 if (m_PARAMwriteToRoot ==
false) {
return; }
185 if ((m_PARAMrootFileName.size()) != 2) {
187 for (
string& entry : m_PARAMrootFileName) {
189 output +=
"'" + entry +
"' ";
191 B2FATAL(
"TrackFinderVXDAnalizer::initialize(), rootFileName is set wrong, although parameter 'writeToRoot' is enabled! Actual entries are: "
196 m_rootParameterTracker.initialize(m_PARAMrootFileName[0] +
".root", m_PARAMrootFileName[1]);
204 for (
auto& parameterPackage : m_PARAMtrackedParametersDouble) {
206 if (parameterPackage.size() != 2) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
209 if (parameterPackage.front().size() != 1) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
211 std::string tcTypeName = parameterPackage.front()[0];
212 if (TCType::isValidName(tcTypeName) ==
false)
213 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (invalid tcType: " << tcTypeName <<
")"); }
216 for (
auto& algorithm : parameterPackage.back()) {
217 if (AlgoritmType::isValidName(algorithm) ==
false)
218 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (invalid algorithmType: " << algorithm <<
")"); }
219 m_rootParameterTracker.addParameters4DoubleAlgorithms(tcTypeName, algorithm);
222 AlgorithmDouble::setOrigin(TVector3(m_PARAMorigin[0], m_PARAMorigin[1], m_PARAMorigin[2]));
223 AlgorithmDouble::setWillRefTCdataBeUsed4TestTCs(m_PARAMuseMCDataForValues);
226 for (
auto& parameterPackage : m_PARAMtrackedParametersInt) {
228 if (parameterPackage.size() != 2) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
231 if (parameterPackage.front().size() != 1) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
233 std::string tcTypeName = parameterPackage.front()[0];
234 if (TCType::isValidName(tcTypeName) ==
false)
235 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (invalid tcType: " << tcTypeName <<
")"); }
238 for (
auto& algorithm : parameterPackage.back()) {
239 if (AlgoritmType::isValidName(algorithm) ==
false)
240 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (invalid algorithmType: " << algorithm <<
")"); }
241 m_rootParameterTracker.addParameters4IntAlgorithms(tcTypeName, algorithm);
244 AlgorithmInt::setOrigin(TVector3(m_PARAMorigin[0], m_PARAMorigin[1], m_PARAMorigin[2]));
245 AlgorithmInt::setWillRefTCdataBeUsed4TestTCs(m_PARAMuseMCDataForValues);
248 for (
auto& parameterPackage : m_PARAMtrackedParametersVecDouble) {
250 if (parameterPackage.size() != 2) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
253 if (parameterPackage.front().size() != 1) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
255 std::string tcTypeName = parameterPackage.front()[0];
256 if (TCType::isValidName(tcTypeName) ==
false)
257 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (invalid tcType: " << tcTypeName <<
")"); }
260 for (
auto& algorithm : parameterPackage.back()) {
261 if (AlgoritmType::isValidName(algorithm) ==
false)
262 { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (invalid algorithmType: " << algorithm <<
")"); }
263 m_rootParameterTracker.addParameters4VecDoubleAlgorithms(tcTypeName, algorithm);
266 AlgorithmVecDouble::setOrigin(TVector3(m_PARAMorigin[0], m_PARAMorigin[1], m_PARAMorigin[2]));
267 AlgorithmVecDouble::setWillRefTCdataBeUsed4TestTCs(m_PARAMuseMCDataForValues);
271 void TrackFinderVXDAnalizerModule::event()
275 m_eventCounter = eventMetaDataPtr->getEvent();
276 B2DEBUG(10,
"################## entering TrackFinderVXDAnalizerModule - event " << m_eventCounter <<
" ######################");
278 int nReferenceTCs = m_referenceTCs.getEntries();
279 m_mcTrackCounter += nReferenceTCs;
280 m_mcTrackVectorCounter += nReferenceTCs;
281 int nTestTCs = m_testTCs.getEntries();
282 m_caTrackCounter += nTestTCs;
287 vector<AnalizerTCInfo> referenceTCVector;
292 B2DEBUG(25,
"Calculating purities for reference TC " << nTC <<
", name. Dominating iD " << particleInfo.
getParticleID() <<
293 " with purity " << particleInfo.
getPurity().second <<
" was found among " << purities.size() <<
" assigned particles");
295 AnalizerTCInfo referenceTC = AnalizerTCInfo::createTC(
true, particleInfo, aTC);
296 referenceTCVector.push_back(referenceTC);
299 if (LogSystem::Instance().isLevelEnabled(LogConfig::c_Debug, 1, PACKAGENAME())) { aTC.print(1); }
305 vector<AnalizerTCInfo> testTCVector;
307 if (m_PARAMignoreDeadTCs and aTC.hasRefereeStatus(SpacePointTrackCand::c_isActive) ==
false) {
continue; }
311 B2DEBUG(25,
"Calculating purities for test TC " << nTC <<
", name. Dominating iD " << particleInfo.
getParticleID() <<
312 " with purity" << particleInfo.
getPurity().second <<
" was found among " << purities.size() <<
" assigned particles");
314 AnalizerTCInfo testTC = AnalizerTCInfo::createTC(
false, particleInfo, aTC);
315 testTCVector.push_back(testTC);
318 if (LogSystem::Instance().isLevelEnabled(LogConfig::c_Debug, 1, PACKAGENAME())) { aTC.print(1); }
329 vector<std::pair<AnalizerTCInfo*, AnalizerTCInfo*> > pairedTCs;
331 int testID = testTC.assignedID.getParticleID();
334 int refID = referenceTC.assignedID.getParticleID();
335 B2DEBUG(50,
"test TC with assigned ID " << testID <<
" was matched with refID " << refID);
336 if (refID != testID)
continue;
338 testTC.tcType = AnalizerTCInfo::classifyTC(referenceTC, testTC, m_PARAMpurityThreshold, m_PARAMminNDFThreshold);
340 B2DEBUG(50,
"test TC with assigned ID " << testID <<
341 " was classified for the corresponding with type for testTC/refTC: " << TCType::getTypeName(testTC.tcType) <<
342 "/" << TCType::getTypeName(referenceTC.tcType) <<
" and will now paired up");
344 referenceTC.pairUp(&testTC);
346 pairedTCs.push_back({ &testTC, &referenceTC});
351 AnalizerTCInfo::markUnused(testTCVector, TCType::Ghost);
354 AnalizerTCInfo::markUnused(referenceTCVector, TCType::Lost);
359 unsigned int nPerfectTCs = 0, nCleanTCs = 0, nContaminatedTCs = 0, nFound = 0;
361 unsigned int nClonedTCs = 0, nSmallTCs = 0, nGhostTCs = 0, nLostTestTCs = 0, nLostRefTCs = 0;
363 unsigned int nBadCases = 0, nRefClones = 0;
365 unsigned int refPXDClusters = 0, refSVDClusters = 0, testPXDClusters = 0, testSVDClusters = 0;
368 testPXDClusters += aTC.assignedID.getNPXDClustersTotal();
369 testSVDClusters += aTC.assignedID.getNSVDUClustersTotal() + aTC.assignedID.getNSVDVClustersTotal();
371 switch (aTC.tcType) {
372 case TCType::Perfect: { nPerfectTCs++; nFound++;
break; }
373 case TCType::Clean: { nCleanTCs++; nFound++;
break; }
374 case TCType::Contaminated: { nContaminatedTCs++; nFound ++;
break; }
375 case TCType::Clone: { nClonedTCs++;
break; }
376 case TCType::SmallStump: { nSmallTCs++;
break; }
377 case TCType::Ghost: { nGhostTCs++;
break; }
378 case TCType::Lost: { nLostTestTCs++;
break; }
381 B2WARNING(
"TrackFinderVXDAnalizer::event(): test TC got type " << TCType::getTypeName(aTC.tcType) <<
382 " which is not counted for efficiency-calculation");
388 refPXDClusters += aTC.assignedID.getNPXDClustersTotal();
389 refSVDClusters += aTC.assignedID.getNSVDUClustersTotal() + aTC.assignedID.getNSVDVClustersTotal();
391 switch (aTC.tcType) {
392 case TCType::Reference: {
break; }
393 case TCType::Clone: { nRefClones++;
break; }
394 case TCType::Lost: { nLostRefTCs++;
break; }
397 B2WARNING(
"TrackFinderVXDAnalizer::event(): reference TC got type " << TCType::getTypeName(aTC.tcType) <<
398 " which is not counted for efficiency-calculation");
405 string summary1 =
"TrackFinderVXDAnalizer-Event " + to_string(m_eventCounter) +
406 ": the tested TrackFinder found: " +
407 " IDs (total/perfect/clean/contaminated/clone/tooShort/ghost: " + to_string(nFound) +
408 "/" + to_string(nPerfectTCs) +
409 "/" + to_string(nCleanTCs) +
410 "/" + to_string(nContaminatedTCs) +
411 "/" + to_string(nClonedTCs) +
412 "/" + to_string(nSmallTCs) +
413 "/" + to_string(nGhostTCs) +
414 ") within " + to_string(nTestTCs) +
415 " TCs and lost (test/ref) " + to_string(nLostTestTCs) +
416 "/" + to_string(nLostRefTCs) +
417 " TCs. nBadCases: " + to_string(nBadCases) +
418 " refClones: " + to_string(nRefClones) +
420 "There are " + to_string(nReferenceTCs) +
421 " referenceTCs, with mean of " + to_string((
float(refPXDClusters) /
float(nReferenceTCs))) +
422 "/" + to_string((
float(refSVDClusters) /
float(nReferenceTCs))) +
" PXD/SVD clusters"
424 "There are " + to_string(nTestTCs) +
425 " testTCs, with mean of " + to_string((
float(testPXDClusters) /
float(nTestTCs))) +
426 "/" + to_string((
float(testSVDClusters) /
float(nTestTCs))) +
" PXD/SVD clusters";
428 string summary2 =
"TrackFinderVXDAnalizer-Event " + to_string(m_eventCounter) +
429 ": the tested TrackFinder had an efficiency : total/perfect/clean/contaminated/clone/tooShort/ghost: " +
430 to_string(
double(100 * nFound) /
double(nReferenceTCs)) +
431 "%/" + to_string(
double(100 * nPerfectTCs) /
double(nReferenceTCs)) +
432 "%/" + to_string(
double(100 * nCleanTCs) /
double(nReferenceTCs)) +
433 "%/" + to_string(
double(100 * nContaminatedTCs) /
double(nReferenceTCs)) +
434 "%/" + to_string(
double(100 * nClonedTCs) /
double(nReferenceTCs)) +
435 "%/" + to_string(
double(100 * nSmallTCs) /
double(nReferenceTCs)) +
436 "%/" + to_string(
double(100 * nGhostTCs) /
double(nReferenceTCs)) +
"%";
438 string summary3 =
"TrackFinderVXDAnalizer-Event " + to_string(m_eventCounter) +
439 ": totalCA|totalMC|ratio of pxdHits " + to_string(testPXDClusters) +
440 "|" + to_string(refPXDClusters) +
441 "|" + to_string(
float(testPXDClusters) /
float(refPXDClusters)) +
442 ", svdHits " + to_string(testSVDClusters) +
443 "|" + to_string(refSVDClusters) +
444 "|" + to_string(
float(testSVDClusters) /
float(refSVDClusters)) +
" found by the two TFs";
446 if (m_PARAMdoEventSummary) {
451 B2DEBUG(10, summary1);
452 B2DEBUG(10, summary2);
453 B2DEBUG(10, summary3);
456 m_totalRealHits += refPXDClusters + refSVDClusters;
457 m_nCaPXDHits += testPXDClusters;
458 m_nMcPXDHits += refPXDClusters;
459 m_nCaSVDHits += testSVDClusters;
460 m_nMcSVDHits += refSVDClusters;
461 m_countReconstructedTCs += nFound;
462 m_countedPerfectRecoveries += nPerfectTCs;
463 m_countedCleanRecoveries += nCleanTCs;
464 m_countedContaminatedRecoveries += nContaminatedTCs;
465 m_countedDoubleEntries += nClonedTCs;
466 m_countedTCsTooShort += nSmallTCs;
467 m_countedGhosts += nGhostTCs;
468 m_countedLostTest += nLostTestTCs;
469 m_countedLostRef += nLostRefTCs;
470 m_countedReferenceClones += nRefClones;
498 if (m_PARAMwriteToRoot ==
false) {
return; }
502 m_rootParameterTracker.collectData(testTCVector);
503 m_rootParameterTracker.collectData(referenceTCVector);
505 m_rootParameterTracker.fillRoot();
510 void TrackFinderVXDAnalizerModule::endRun()
512 B2INFO(
"------------- >>>TrackFinderVXDAnalizerModule::endRun<<< -------------");
513 B2DEBUG(1,
"TrackFinderVXDAnalizerModule-explanation: \n" <<
514 " perfect recovery means: all hits of mc-TC found again and clean TC. \n" <<
515 " clean recovery means: no foreign hits within TC. \n" <<
516 " ghost means: QI was below threshold or mcTC was found more than once (e.g. because of curlers) \n" <<
517 " 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");
519 B2INFO(
"TrackFinderVXDAnalizerModule: After " << m_eventCounter + 1 <<
" events there was a total number of " << m_mcTrackCounter <<
520 " mcTrackCandidates and " << m_totalRealHits <<
" realHits. Of these TCs, " << m_mcTrackVectorCounter <<
521 " mcTrackCandidates where used for analysis because of cutoffs.");
522 B2INFO(
"TrackFinderVXDAnalizerModule: There were " << m_caTrackCounter <<
" caTrackCandidates, of those " << m_countAcceptedGFTCs <<
523 " were stored in " << m_PARAMacceptedTCname <<
" and " << m_lostGFTCs <<
" lost TCs were stored in " << m_PARAMlostTCname <<
524 " for further use, number of times where charge was guessed wrong: " << m_wrongChargeSignCounter <<
525 ", number of caTCs which produced a double entry: " << m_countedDoubleEntries);
526 B2INFO(
"TrackFinderVXDAnalizerModule: totalCA|totalMC|ratio of pxdHits " << m_nCaPXDHits <<
"|" << m_nMcPXDHits <<
"|" <<
float(
527 m_nCaPXDHits) /
float(m_nMcPXDHits) <<
528 ", svdHits " << m_nCaSVDHits <<
"|" << m_nMcSVDHits <<
"|" <<
float(m_nCaSVDHits) /
float(m_nMcSVDHits) <<
529 " found by the two TFs (ghost hits not removed, therefore only useful if ghost-rate is low)");
531 B2INFO(
"TrackFinderVXDAnalizerModule: the VXDTF found:\n" <<
532 "Absolute numbers: total/perfect/clean/contaminated/clone/tooShort/ghost: " << m_countReconstructedTCs <<
533 "/" << m_countedPerfectRecoveries <<
534 "/" << m_countedCleanRecoveries <<
535 "/" << m_countedContaminatedRecoveries <<
536 "/" << m_countedDoubleEntries <<
537 "/" << m_countedTCsTooShort <<
538 "/" << m_countedGhosts <<
539 " efficiency : total/perfect/clean/contaminated/clone/tooShort/ghost: " <<
double(100 * m_countReconstructedTCs) /
double(
540 m_mcTrackVectorCounter) <<
541 "%/" <<
double(100 * m_countedPerfectRecoveries) /
double(m_mcTrackVectorCounter) <<
542 "%/" <<
double(100 * m_countedCleanRecoveries) /
double(m_mcTrackVectorCounter) <<
543 "%/" <<
double(100 * m_countedContaminatedRecoveries) /
double(m_mcTrackVectorCounter) <<
544 "%/" <<
double(100 * m_countedDoubleEntries) /
double(m_mcTrackVectorCounter) <<
545 "%/" <<
double(100 * m_countedTCsTooShort) /
double(m_mcTrackVectorCounter) <<
546 "%/" <<
double(100 * m_countedGhosts) /
double(m_mcTrackVectorCounter) <<
549 B2INFO(
"TrackFinderVXDAnalizerModule: additional numbers:\"" <<
550 "nCountedLost (test/ref): " << m_countedLostTest <<
551 "/" << m_countedLostRef <<
552 ", nRefClones: " << m_countedReferenceClones <<
553 ", in percent - nLost (test/ref): " <<
double(100 * m_countedLostTest) /
double(m_mcTrackVectorCounter) <<
554 "/" <<
double(100 * m_countedLostRef) /
double(m_mcTrackVectorCounter) <<
555 "%, nClones: " <<
double(100 * m_countedReferenceClones) /
double(m_mcTrackVectorCounter) <<
567 void TrackFinderVXDAnalizerModule::terminate()
570 if (m_PARAMwriteToRoot ==
false) {
return; }
571 m_rootParameterTracker.terminate();