9#include <framework/dataobjects/EventMetaData.h> 
   10#include <framework/datastore/StoreObjPtr.h> 
   11#include <framework/core/ModuleParam.templateDetails.h> 
   12#include <framework/geometry/B2Vector3.h> 
   15#include <tracking/modules/VXDTFHelperTools/TrackFinderVXDAnalizerModule.h> 
   16#include <tracking/spacePointCreation/SpacePointTrackCand.h> 
   17#include <tracking/spacePointCreation/PurityCalculatorTools.h> 
   18#include <tracking/trackFindingVXD/analyzingTools/AnalizerTCInfo.h> 
   19#include <tracking/trackFindingVXD/analyzingTools/AnalyzingAlgorithmFactory.h> 
   20#include <tracking/trackFindingVXD/analyzingTools/AlgoritmType.h> 
   22#include <Math/Vector3D.h> 
   27using namespace Belle2::Tracking;
 
   41  B2INFO(
"TrackFinderVXDAnalizer-initialize");
 
   43  std::vector<std::string> rootFileNameVals;
 
   44  rootFileNameVals.push_back(
"TrackFinderVXDAnalizerResults");
 
   45  rootFileNameVals.push_back(
"RECREATE");
 
   48  std::vector< std::vector< std::vector< std::string> > > trackedParametersDouble = {
 
   50      {
"AnalyzingAlgorithmValueP", 
"AnalyzingAlgorithmValuePT", 
"AnalyzingAlgorithmValuePTheta", 
"AnalyzingAlgorithmValuePPhi", 
"AnalyzingAlgorithmValueDistSeed2IPXY", 
"AnalyzingAlgorithmValueDistSeed2IPZ", 
"AnalyzingAlgorithmValueQI"}
 
   53      {
"AnalyzingAlgorithmValueP", 
"AnalyzingAlgorithmValuePT", 
"AnalyzingAlgorithmValuePTheta", 
"AnalyzingAlgorithmValuePPhi", 
"AnalyzingAlgorithmValueDistSeed2IPXY", 
"AnalyzingAlgorithmValueDistSeed2IPZ", 
"AnalyzingAlgorithmValueQI"}
 
   57        "AnalyzingAlgorithmValueP", 
"AnalyzingAlgorithmValuePT", 
"AnalyzingAlgorithmValuePTheta", 
"AnalyzingAlgorithmValuePPhi", 
"AnalyzingAlgorithmValueDistSeed2IPXY", 
"AnalyzingAlgorithmValueDistSeed2IPZ", 
"AnalyzingAlgorithmValueQI",
 
   58        "AnalyzingAlgorithmResidualP", 
"AnalyzingAlgorithmResidualPT", 
"AnalyzingAlgorithmResidualPTheta", 
"AnalyzingAlgorithmResidualPPhi", 
"AnalyzingAlgorithmResidualPTAngle" 
   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  std::vector< std::vector< std::vector< std::string> > > trackedParametersInt = {
 
   77      {
"AnalyzingAlgorithmTotalUClusters", 
"AnalyzingAlgorithmTotalVClusters"}
 
   80      {
"AnalyzingAlgorithmTotalUClusters", 
"AnalyzingAlgorithmTotalVClusters"}
 
   83      {
"AnalyzingAlgorithmTotalUClusters", 
"AnalyzingAlgorithmTotalVClusters", 
"AnalyzingAlgorithmLostUClusters", 
"AnalyzingAlgorithmLostVClusters"}
 
   86      {
"AnalyzingAlgorithmTotalUClusters", 
"AnalyzingAlgorithmTotalVClusters", 
"AnalyzingAlgorithmLostUClusters", 
"AnalyzingAlgorithmLostVClusters"}
 
   89      {
"AnalyzingAlgorithmTotalUClusters", 
"AnalyzingAlgorithmTotalVClusters", 
"AnalyzingAlgorithmLostUClusters", 
"AnalyzingAlgorithmLostVClusters"}
 
   94  std::vector< std::vector< std::vector< std::string> > > trackedParametersVecDouble = {
 
   96      {
"AnalyzingAlgorithmTotalUEDep", 
"AnalyzingAlgorithmTotalVEDep"}
 
   99      {
"AnalyzingAlgorithmTotalUEDep", 
"AnalyzingAlgorithmTotalVEDep"}
 
  102      {
"AnalyzingAlgorithmTotalUEDep", 
"AnalyzingAlgorithmTotalVEDep", 
"AnalyzingAlgorithmLostUEDep", 
"AnalyzingAlgorithmLostVEDep"}
 
  105      {
"AnalyzingAlgorithmTotalUEDep", 
"AnalyzingAlgorithmTotalVEDep", 
"AnalyzingAlgorithmLostUEDep", 
"AnalyzingAlgorithmLostVEDep"}
 
  108      {
"AnalyzingAlgorithmTotalUEDep", 
"AnalyzingAlgorithmTotalVEDep", 
"AnalyzingAlgorithmLostUEDep", 
"AnalyzingAlgorithmLostVEDep"}
 
  113  setDescription(
"analyzes quality of SpacePointTrackCands delivered by a test-TF compared to a reference TF");
 
  118           std::string(
"mcTracks"));
 
  122           std::string(
"acceptedVXDTFTracks"));
 
  125           " chose value to filter TCs found by Test TF. TCs having purities lower than this value won't be marked as reconstructed",
 
  128           " defines how many measurements (numbers of degrees of freedom) the TC must have to be accepted as reconstructed, standard is 5",
 
  132           " if true, analysis data is stored to root file with file name chosen by 'rootFileName'", 
bool(
true));
 
  134           " 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  ",
 
  138           "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",
 
  139           trackedParametersDouble);
 
  142           "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",
 
  143           trackedParametersInt);
 
  146           "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",
 
  147           trackedParametersVecDouble);
 
  150  addParam(
"origin", 
m_PARAMorigin, 
" only allowed size: 3. stores coordinates of the origin used", {0, 0, 0});
 
  152           "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." 
  156           " if true, test-tc whose activation-state is set to false are skipped for analysis", 
bool(
true));
 
  159           "if true, for each event a summary will be given (WARNING produces a lot of output!", 
bool(
false));
 
  172    B2ERROR(
"TrackFinderVXDAnalizerModule::initialize() passed parameter 'origin' has wrong number of entries (allowed: 3) of " <<
 
  183      output += 
"'" + entry + 
"' ";
 
  185    B2FATAL(
"TrackFinderVXDAnalizer::initialize(), rootFileName is set wrong, although parameter 'writeToRoot' is enabled! Actual entries are: " 
  200    if (parameterPackage.size() != 2) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
 
  203    if (parameterPackage.front().size() != 1) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
 
  205    std::string tcTypeName = parameterPackage.front()[0];
 
  207    { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (invalid tcType: " << tcTypeName << 
")"); }
 
  210    for (
auto& algorithm : parameterPackage.back()) {
 
  212      { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersDouble' was mis-used! Please read the documentation! (invalid algorithmType: " << algorithm << 
")"); }
 
  222    if (parameterPackage.size() != 2) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
 
  225    if (parameterPackage.front().size() != 1) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
 
  227    std::string tcTypeName = parameterPackage.front()[0];
 
  229    { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (invalid tcType: " << tcTypeName << 
")"); }
 
  232    for (
auto& algorithm : parameterPackage.back()) {
 
  234      { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersInt' was mis-used! Please read the documentation! (invalid algorithmType: " << algorithm << 
")"); }
 
  244    if (parameterPackage.size() != 2) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
 
  247    if (parameterPackage.front().size() != 1) { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (wrong number of added parameters)"); }
 
  249    std::string tcTypeName = parameterPackage.front()[0];
 
  251    { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (invalid tcType: " << tcTypeName << 
")"); }
 
  254    for (
auto& algorithm : parameterPackage.back()) {
 
  256      { B2FATAL(
"TrackFinderVXDAnalizer::initialize(), parameter 'trackedParametersVecDouble' was mis-used! Please read the documentation! (invalid algorithmType: " << algorithm << 
")"); }
 
  270  B2DEBUG(20, 
"################## entering TrackFinderVXDAnalizerModule - event " << 
m_eventCounter << 
" ######################");
 
  281  std::vector<AnalizerTCInfo> referenceTCVector;
 
  286    B2DEBUG(25, 
"Calculating purities for reference TC " << nTC << 
", name. Dominating iD " << particleInfo.
getParticleID() <<
 
  287            " with purity " << particleInfo.
getPurity().second << 
" was found among " << purities.size() << 
" assigned particles");
 
  290    referenceTCVector.push_back(referenceTC);
 
  299  std::vector<AnalizerTCInfo> testTCVector;
 
  305    B2DEBUG(25, 
"Calculating purities for test TC " << nTC << 
", name. Dominating iD " << particleInfo.
getParticleID() <<
 
  306            " with purity" << particleInfo.
getPurity().second << 
" was found among " << purities.size() << 
" assigned particles");
 
  309    testTCVector.push_back(testTC);
 
  323  std::vector<std::pair<AnalizerTCInfo*, AnalizerTCInfo*> > pairedTCs;
 
  325    int testID = testTC.assignedID.getParticleID();
 
  328      int refID = referenceTC.assignedID.getParticleID();
 
  329      B2DEBUG(29, 
"test TC with assigned ID " << testID << 
" was matched with refID " << refID);
 
  330      if (refID != testID) 
continue;
 
  334      B2DEBUG(29, 
"test TC with assigned ID " << testID <<
 
  335              " was classified for the corresponding with type for testTC/refTC: " << 
TCType::getTypeName(testTC.tcType) <<
 
  338      referenceTC.pairUp(&testTC);
 
  340      pairedTCs.push_back({ &testTC, &referenceTC});
 
  353  unsigned int nPerfectTCs = 0, nCleanTCs = 0, nContaminatedTCs = 0, nFound = 0;
 
  355  unsigned int nClonedTCs = 0, nSmallTCs = 0, nGhostTCs = 0, nLostTestTCs = 0, nLostRefTCs = 0;
 
  357  unsigned int nBadCases = 0, nRefClones = 0; 
 
  359  unsigned int refPXDClusters = 0, refSVDClusters = 0, testPXDClusters = 0, testSVDClusters = 0;
 
  362    testPXDClusters += aTC.assignedID.getNPXDClustersTotal();
 
  363    testSVDClusters += aTC.assignedID.getNSVDUClustersTotal() + aTC.assignedID.getNSVDVClustersTotal();
 
  365    switch (aTC.tcType) {
 
  366      case TCType::Perfect: { nPerfectTCs++; nFound++; 
break; }
 
  367      case TCType::Clean: { nCleanTCs++; nFound++; 
break; }
 
  368      case TCType::Contaminated: { nContaminatedTCs++; nFound ++; 
break; }
 
  369      case TCType::Clone: { nClonedTCs++; 
break; }
 
  370      case TCType::SmallStump: { nSmallTCs++; 
break; }
 
  371      case TCType::Ghost: { nGhostTCs++; 
break; }
 
  372      case TCType::Lost: { nLostTestTCs++; 
break; }
 
  375        B2WARNING(
"TrackFinderVXDAnalizer::event(): test TC got type " << 
TCType::getTypeName(aTC.tcType) <<
 
  376                  " which is not counted for efficiency-calculation");
 
  382    refPXDClusters += aTC.assignedID.getNPXDClustersTotal();
 
  383    refSVDClusters += aTC.assignedID.getNSVDUClustersTotal() + aTC.assignedID.getNSVDVClustersTotal();
 
  385    switch (aTC.tcType) {
 
  386      case TCType::Reference: { 
break; }
 
  387      case TCType::Clone: { nRefClones++; 
break; }
 
  388      case TCType::Lost: { nLostRefTCs++; 
break; }
 
  391        B2WARNING(
"TrackFinderVXDAnalizer::event(): reference TC got type " << 
TCType::getTypeName(aTC.tcType) <<
 
  392                  " which is not counted for efficiency-calculation");
 
  399  std::string summary1 = 
"TrackFinderVXDAnalizer-Event " + std::to_string(
m_eventCounter) +
 
  400                         ": the tested TrackFinder found: " +
 
  401                         " IDs (total/perfect/clean/contaminated/clone/tooShort/ghost: " + std::to_string(nFound) +
 
  402                         "/" + std::to_string(nPerfectTCs) +
 
  403                         "/" + std::to_string(nCleanTCs) +
 
  404                         "/" + std::to_string(nContaminatedTCs) +
 
  405                         "/" + std::to_string(nClonedTCs) +
 
  406                         "/" + std::to_string(nSmallTCs) +
 
  407                         "/" + std::to_string(nGhostTCs) +
 
  408                         ") within " + std::to_string(nTestTCs) +
 
  409                         " TCs and lost (test/ref) " + std::to_string(nLostTestTCs) +
 
  410                         "/" + std::to_string(nLostRefTCs) +
 
  411                         " TCs. nBadCases: " + std::to_string(nBadCases) +
 
  412                         " refClones: " + std::to_string(nRefClones) +
 
  414                         "There are " + std::to_string(nReferenceTCs) +
 
  415                         " referenceTCs, with mean of " + std::to_string((
float(refPXDClusters) / 
float(nReferenceTCs))) +
 
  416                         "/" + std::to_string((
float(refSVDClusters) / 
float(nReferenceTCs))) + 
" PXD/SVD clusters" 
  418                         "There are " + std::to_string(nTestTCs) +
 
  419                         " testTCs, with mean of " + std::to_string((
float(testPXDClusters) / 
float(nTestTCs))) +
 
  420                         "/" + std::to_string((
float(testSVDClusters) / 
float(nTestTCs))) + 
" PXD/SVD clusters";
 
  422  std::string summary2 = 
"TrackFinderVXDAnalizer-Event " + std::to_string(
m_eventCounter) +
 
  423                         ": the tested TrackFinder had an efficiency : total/perfect/clean/contaminated/clone/tooShort/ghost: " +
 
  424                         std::to_string(
double(100 * nFound) / 
double(nReferenceTCs)) +
 
  425                         "%/" + std::to_string(
double(100 * nPerfectTCs) / 
double(nReferenceTCs)) +
 
  426                         "%/" + std::to_string(
double(100 * nCleanTCs) / 
double(nReferenceTCs)) +
 
  427                         "%/" + std::to_string(
double(100 * nContaminatedTCs) / 
double(nReferenceTCs)) +
 
  428                         "%/" + std::to_string(
double(100 * nClonedTCs) / 
double(nReferenceTCs)) +
 
  429                         "%/" + std::to_string(
double(100 * nSmallTCs) / 
double(nReferenceTCs)) +
 
  430                         "%/" + std::to_string(
double(100 * nGhostTCs) / 
double(nReferenceTCs)) + 
"%";
 
  432  std::string summary3 = 
"TrackFinderVXDAnalizer-Event " + std::to_string(
m_eventCounter) +
 
  433                         ": totalCA|totalMC|ratio of pxdHits " + std::to_string(testPXDClusters) +
 
  434                         "|" + std::to_string(refPXDClusters) +
 
  435                         "|" + std::to_string(
float(testPXDClusters) / 
float(refPXDClusters)) +
 
  436                         ", svdHits " + std::to_string(testSVDClusters) +
 
  437                         "|" + std::to_string(refSVDClusters) +
 
  438                         "|" + std::to_string(
float(testSVDClusters) / 
float(refSVDClusters)) + 
" found by the two TFs";
 
  445    B2DEBUG(20, summary1);
 
  446    B2DEBUG(20, summary2);
 
  447    B2DEBUG(20, summary3);
 
  506  B2INFO(
"------------- >>>TrackFinderVXDAnalizerModule::endRun<<< -------------");
 
  507  B2DEBUG(20, 
"TrackFinderVXDAnalizerModule-explanation: \n" <<
 
  508          " perfect recovery means: all hits of mc-TC found again and clean TC. \n" <<
 
  509          " clean recovery means: no foreign hits within TC. \n" <<
 
  510          " ghost means: QI was below threshold or mcTC was found more than once (e.g. because of curlers) \n" <<
 
  511          " 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");
 
  515         " mcTrackCandidates where used for analysis because of cutoffs.");
 
  520  B2INFO(
"TrackFinderVXDAnalizerModule:  totalCA|totalMC|ratio of pxdHits " << 
m_nCaPXDHits << 
"|" << 
m_nMcPXDHits << 
"|" << 
float(
 
  523         " found by the two TFs (ghost hits not removed, therefore only useful if ghost-rate is low)");
 
  525  B2INFO(
"TrackFinderVXDAnalizerModule: the VXDTF found:\n" <<
 
  533         " efficiency : total/perfect/clean/contaminated/clone/tooShort/ghost: " << 
double(100 * 
m_countReconstructedTCs) / 
double(
 
  543  B2INFO(
"TrackFinderVXDAnalizerModule: additional numbers:\"" <<
 
static bool isValidName(std::string type)
checks if the name given is a valid name for an AlgoritmType
simple class storing infos relevant for a TC for analizing it.
static TCType::Type classifyTC(AnalizerTCInfo &referenceTC, AnalizerTCInfo &testTC, double purityThreshold, unsigned int ndfThreshold)
for given pair of TCs their compatibility will be checked and the testTC classified,...
static void markUnused(std::vector< AnalizerTCInfo > &tcs, TCType::Type newType)
find unpaired tcs and mark them with given type
static AnalizerTCInfo createTC(bool isReference, const MCVXDPurityInfo &iD, SpacePointTrackCand &aTC)
static function for correctly creating TrackCandidates
Base class for storing an algorithm determining the data one wants to have.
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
@ c_Debug
Debug: for code development.
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
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
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void addParameters4DoubleAlgorithms(std::string tcTypeName, std::string algorithmName)
relevant for all algorithms storing one double per TC:
void addParameters4VecDoubleAlgorithms(std::string tcTypeName, std::string algorithmName)
relevant for all algorithms storing one vector of double per TC:
void terminate()
final cleanup and closing rootFile
void fillRoot()
fills tree/branches with their stuff, clear intermediate results afterwards
void initialize(std::string fileName, std::string fileTreatment)
creates rootFile, first parameter is fileName, second one specifies how the file shall be treated.
void addParameters4IntAlgorithms(std::string tcTypeName, std::string algorithmName)
relevant for all algorithms storing one int per TC:
void collectData(const std::vector< AnalizerTCInfo > &tcVector)
take vector and fill for each tcType stored in rootParameterTracker
Storage for (VXD) SpacePoint-based track candidates.
@ c_isActive
bit 11: SPTC is active (i.e.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
int getEntries() const
Get the number of objects in the array.
Type-safe access to single objects in the data store.
static std::string getTypeName(TCType::Type type)
for given TCType the corresponding string-name will be returned.
static bool isValidName(std::string type)
checks if the name given is a valid name for a TCType
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.
void initialize() override
inizialize function
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....
void event() override
event function
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).
void endRun() override
endRun function
unsigned int m_totalRealHits
total number of hits (clusters/2) attached to mcTCs (therefore total number of real hits).
void terminate() override
terminate function
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.
TrackFinderVXDAnalizerModule()
constructor
unsigned int m_countedLostTest
counts number of Lost test tcs.
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.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
B2Vector3< double > B2Vector3D
typedef for common usage with double
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.