Belle II Software development
MCRecoTracksMatcherModule Class Reference

This module compares tracks generated by some pattern recognition algorithm for PXD, SVD and CDC to ideal Monte Carlo tracks and performs a matching from the former to the underlying MCParticles. More...

#include <MCRecoTracksMatcherModule.h>

Inheritance diagram for MCRecoTracksMatcherModule:
Module PathElement

Public Types

enum  EModulePropFlags {
  c_Input = 1 ,
  c_Output = 2 ,
  c_ParallelProcessingCertified = 4 ,
  c_HistogramManager = 8 ,
  c_InternalSerializer = 16 ,
  c_TerminateInAllProcesses = 32 ,
  c_DontCollectStatistics = 64
}
 Each module can be tagged with property flags, which indicate certain features of the module. More...
 
typedef ModuleCondition::EAfterConditionPath EAfterConditionPath
 Forward the EAfterConditionPath definition from the ModuleCondition.
 

Public Member Functions

 MCRecoTracksMatcherModule ()
 Constructor setting up the parameter.
 
void initialize () final
 Signal the beginning of the event processing.
 
void event () final
 Process the event.
 
virtual std::vector< std::string > getFileNames (bool outputFiles)
 Return a list of output filenames for this modules.
 
virtual void beginRun ()
 Called when entering a new run.
 
virtual void endRun ()
 This method is called if the current run ends.
 
virtual void terminate ()
 This method is called at the end of the event processing.
 
const std::string & getName () const
 Returns the name of the module.
 
const std::string & getType () const
 Returns the type of the module (i.e.
 
const std::string & getPackage () const
 Returns the package this module is in.
 
const std::string & getDescription () const
 Returns the description of the module.
 
void setName (const std::string &name)
 Set the name of the module.
 
void setPropertyFlags (unsigned int propertyFlags)
 Sets the flags for the module properties.
 
LogConfiggetLogConfig ()
 Returns the log system configuration.
 
void setLogConfig (const LogConfig &logConfig)
 Set the log system configuration.
 
void setLogLevel (int logLevel)
 Configure the log level.
 
void setDebugLevel (int debugLevel)
 Configure the debug messaging level.
 
void setAbortLevel (int abortLevel)
 Configure the abort log level.
 
void setLogInfo (int logLevel, unsigned int logInfo)
 Configure the printed log information for the given level.
 
void if_value (const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 Add a condition to the module.
 
void if_false (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to add a condition to the module.
 
void if_true (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to set the condition of the module.
 
bool hasCondition () const
 Returns true if at least one condition was set for the module.
 
const ModuleConditiongetCondition () const
 Return a pointer to the first condition (or nullptr, if none was set)
 
const std::vector< ModuleCondition > & getAllConditions () const
 Return all set conditions for this module.
 
bool evalCondition () const
 If at least one condition was set, it is evaluated and true returned if at least one condition returns true.
 
std::shared_ptr< PathgetConditionPath () const
 Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).
 
Module::EAfterConditionPath getAfterConditionPath () const
 What to do after the conditional path is finished.
 
std::vector< std::shared_ptr< Path > > getAllConditionPaths () const
 Return all condition paths currently set (no matter if the condition is true or not).
 
bool hasProperties (unsigned int propertyFlags) const
 Returns true if all specified property flags are available in this module.
 
bool hasUnsetForcedParams () const
 Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.
 
const ModuleParamListgetParamList () const
 Return module param list.
 
template<typename T >
ModuleParam< T > & getParam (const std::string &name) const
 Returns a reference to a parameter.
 
bool hasReturnValue () const
 Return true if this module has a valid return value set.
 
int getReturnValue () const
 Return the return value set by this module.
 
std::shared_ptr< PathElementclone () const override
 Create an independent copy of this module.
 
std::shared_ptr< boost::python::list > getParamInfoListPython () const
 Returns a python list of all parameters.
 

Static Public Member Functions

static void exposePythonAPI ()
 Exposes methods of the Module class to Python.
 

Protected Member Functions

virtual void def_initialize ()
 Wrappers to make the methods without "def_" prefix callable from Python.
 
virtual void def_beginRun ()
 Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.
 
virtual void def_event ()
 Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.
 
virtual void def_endRun ()
 This method can receive that the current run ends as a call from the Python side.
 
virtual void def_terminate ()
 Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.
 
void setDescription (const std::string &description)
 Sets the description of the module.
 
void setType (const std::string &type)
 Set the module type.
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
 Adds a new parameter to the module.
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description)
 Adds a new enforced parameter to the module.
 
void setReturnValue (int value)
 Sets the return value for this module as integer.
 
void setReturnValue (bool value)
 Sets the return value for this module as bool.
 
void setParamList (const ModuleParamList &params)
 Replace existing parameter list.
 

Private Types

using NDF = int
 Descriptive type definition for a number of degrees of freedom.
 

Private Member Functions

std::list< ModulePtrgetModules () const override
 no submodules, return empty list
 
std::string getPathString () const override
 return the module name.
 
void setParamPython (const std::string &name, const boost::python::object &pyObj)
 Implements a method for setting boost::python objects.
 
void setParamPythonDict (const boost::python::dict &dictionary)
 Implements a method for reading the parameter values from a boost::python dictionary.
 

Private Attributes

std::string m_prRecoTracksStoreArrayName
 Parameter : Name of the RecoTracks StoreArray from pattern recognition.
 
std::string m_mcRecoTracksStoreArrayName
 Parameter : Name of the RecoTracks StoreArray from MC track finding.
 
std::string m_TracksStoreArrayName
 Parameter : Name of the Tracks StoreArray.
 
bool m_usePXDHits
 Parameter : Switch whether PXDHits should be used in the matching.
 
bool m_useSVDHits
 Parameter : Switch whether SVDHits should be used in the matching.
 
bool m_useCDCHits
 Parameter : Switch whether CDCHits should be used in the matching.
 
bool m_useOnlyAxialCDCHits
 Parameter : Switch whether only axial CDCHits should be used.
 
bool m_useFittedTracks = true
 Use fitted tracks for matching.
 
double m_minimalPurity
 Parameter : Minimal purity of a PRTrack to be considered matchable to a MCTrack.
 
double m_minimalEfficiency
 Parameter : Minimal efficiency for a MCTrack to be considered matchable to a PRTrack.
 
StoreArray< MCParticlem_MCParticles
 StoreArray containing MCParticles.
 
StoreArray< RecoTrackm_PRRecoTracks
 StoreArray containing PR RecoTracks.
 
StoreArray< RecoTrackm_MCRecoTracks
 StoreArray containing MC RecoTracks.
 
StoreArray< PXDClusterm_PXDClusters
 StoreArray containing PXDClusters.
 
StoreArray< SVDClusterm_SVDClusters
 StoreArray containing SVDClusters.
 
StoreArray< CDCHitm_CDCHits
 StoreArray containing CDCHits.
 
bool m_mcParticlesPresent = false
 Flag to indicated whether the Monte Carlo track are on the DataStore.
 
std::map< int, NDFm_ndf_by_detId = {{Const::PXD, 2}, {Const::SVD, 1}, {Const::CDC, 1}}
 Map storing the standard number degrees of freedom for a single hit by detector *‍/.
 
std::string m_name
 The name of the module, saved as a string (user-modifiable)
 
std::string m_type
 The type of the module, saved as a string.
 
std::string m_package
 Package this module is found in (may be empty).
 
std::string m_description
 The description of the module.
 
unsigned int m_propertyFlags
 The properties of the module as bitwise or (with |) of EModulePropFlags.
 
LogConfig m_logConfig
 The log system configuration of the module.
 
ModuleParamList m_moduleParamList
 List storing and managing all parameter of the module.
 
bool m_hasReturnValue
 True, if the return value is set.
 
int m_returnValue
 The return value.
 
std::vector< ModuleConditionm_conditions
 Module condition, only non-null if set.
 

Detailed Description

This module compares tracks generated by some pattern recognition algorithm for PXD, SVD and CDC to ideal Monte Carlo tracks and performs a matching from the former to the underlying MCParticles.

To achieve this it evaluates and saves the purities and efficiencies from the pattern recognition track to Monte-Carlo tracks, which can than also be used by a subsequent evaluation modules.

In order to match the tracks the module takes two StoreArrays of RecoTracks, which should be compared.

One of them contains RecoTracks composed by the pattern recognition algorithm to be assessed. They are referred to as PRTracks.

The second StoreArray holds the reference tracks, which should ideally be reconstructed. These are referred to as MCTracks and should generally be composed by the MCTrackingModule. (Design note : We use the tracks composed by the MCTrackFinder as reference, because the mere definition of what a trackable particle and what the best achievable track is, lies within the implementation of the MCTrackFinder. If we did not use the tracks from the MCTrackFinder as input, it would mean a double implementation of great parts of that logic.)

If the pattern recognition only covers a part of the tracking detectors, the matching can be constrained to specific subdetectors by switching of the appropriate usePXDHits, useSVDHits or useCDCHits parameters.

As a result the module

  1. creates a RelationArray from the PRTracks to the MCTracks, which will be called the purity relation,
  2. creates a RelationArray from the MCTracks to the PRTracks, which will be called the efficiency relation,
  3. assigns the McTrackId property of the PRTracks and
  4. creates a RelationArray from the PRTracks to the MCParticles.

The RelationArray for purity and efficiency generally store only the single highest purity and the single highest efficiency for a given PRTrack, MCTrack respectively. However these values are stored with a minus sign if the PRTrack is a clone, or the MCTrack is merged into another PRTrack. The McTrackId is either set to the index of the MCParticle or to some negative value indicating the severity of the mismatch. (Classification details below).

Moreover, only PRTracks that exceed the minimal purity requirement and a minimal efficiency requirement will have their purity/efficiency stored and will take part in the matching. The minimal purity can be chosen by the minimalPurity parameter (default 2.0/3.0). The minimal efficiency can be chosen by the minimalEfficiency parameter (default 0.05).

Last but not least a RelationArray from matched PRTracks to MCParticles is build and the McTrackId property of the PRTrack is set to the StoreArray index of the MCParticle (similar as the MCTrackFinder does it for the MCTracks). By default clone tracks are also assigned to their MCParticle. This behaviour can be switched off by the relateClonesToMCParticles.

In the following a more detailed explanation is given for the matching and the classification of PRTracks and MCTracks.

The PRTracks can be classified into six categories:

  • UNDEFINED
    • Status of the track before any real status has been set.
    • If the track status is still UNDEFINED after matching, something went wrong.
  • MATCHED
    • The highest efficiency PRTrack of the highest purity MCTrack to this PRTrack is the same as this PRTrack.
    • In addition, the charge of the PRTrack and the one of the MCTrack are the same.
    • This means the PRTrack contains a high contribution of only one MCTrack and is also the best of all PRTracks describing this MCTrack (including the charge).
    • The McTrackId property of matched PRTrack is set to the MCTrackId property of the MCTrack, which is usually the index of the MCParticle in its corresponding StoreArray.
    • Also the relation from PRTrack to MCParticle is added.
    • The purity relation is setup from the PRTrack to the MCTrack with the (positive) purity as weight.
  • WRONG CHARGE
    • The highest efficiency PRTrack of the highest purity MCTrack to this PRTrack is the same as this PRTrack.
    • But, the charge of the PRTrack and the one of the MCTrack are NOT the same.
    • This means the PRTrack contains a high contribution of only one MCTrack and is also the best of all PRTracks describing this MCTrack, but the charge is wrong.
    • The McTrackId property of matched PRTrack is set to the MCTrackId property of the MCTrack, which is usually the index of the MCParticle in its corresponding StoreArray.
    • Also the relation from PRTrack to MCParticle is added.
    • The purity relation is setup from the PRTrack to the MCTrack with the (positive) purity as weight.
  • CLONE
    • The highest purity MCTrack has a different highest efficiency PRTrack than this track.
    • Anyway, the charge of the PRTrack and the one of the MCTrack are the same.
    • This means the PRTrack contains high contributions of only one MCTrack but a different other PRTrack contains an even higher contribution to this MCTrack.
    • Only if the relateClonesToMCParticles parameter is active The McTrackId property of cloned PRTracks is set to the MCTrackId property of the MCTrack. Else it will be set to -9.
    • Also the relation from PRTrack to MCParticle is added, only if the relateClonesToMCParticles parameter is active.
    • The purity relation is always setup from the PRTrack to the MCTrack with the negative purity as weight, to be able to distinguish them from the matched tracks.
  • CLONE WRONG CHARGE
    • The highest purity MCTrack has a different highest efficiency PRTrack than this track.
    • Moreover, the charge of the PRTrack and the one of the MCTrack are NOT the same.
    • This means the PRTrack contains high contributions of only one MCTrack but a different other PRTrack contains an even higher contribution to this MCTrack.
    • Only if the relateClonesToMCParticles parameter is active The McTrackId property of cloned PRTracks is set to the MCTrackId property of the MCTrack. Else it will be set to -9.
    • Also the relation from PRTrack to MCParticle is added, only if the relateClonesToMCParticles parameter is active.
    • The purity relation is always setup from the PRTrack to the MCTrack with the negative purity as weight, to be able to distinguish them from the matched tracks.
  • BACKGROUND
    • The PRTrack contains mostly hits, which are not part of any MCTrack.
    • This normally means, that this PRTracks is made of beam background hits.
    • If one constrains the MCTracks in the MCTrackFinder to some specific particles, say the tag side, also all signal side tracks end up in this category (in case of reasonable tracking performance). In this case the background rate is somewhat less meaningful.
    • For background tracks the McTrackId of the PRTrack is set to -99.
    • No relation from the PRTrack to the MCParticle is inserted.
    • PRTracks classified as background are not entered in the purity RelationArray.
  • GHOST
    • The highest purity MCTrack to this PRTrack has a purity lower than the minimal purity given in the parameter minimalPurity or
    • has an efficiency lower than the efficiency given in the parameter minimalEfficiency.
    • This means that the PRTrack does not contain a significant number of a specific MCTrack nor can it considered only made of background.
    • For ghost tracks the McTrackId of the RecoTracks is set to -999.
    • No relation from the PRTrack to the MCParticle is inserted.
    • PRTracks classified as ghost are not entered in the purity RelationArray.

MCTracks are classified into five categories:

  • UNDEFINED
    • Status of the track before any real status has been set.
    • If the track status is still UNDEFINED after matching, something went wrong.
  • MATCHED
    • The highest purity MCTrack of the highest efficiency PRTrack of this MCTrack is the same as this MCTrack.
    • In addition, the charge of the MCTrack and the one of the PRTrack are the same.
    • This means the MCTrack is well described by a PRTrack and this PRTrack has only a significant contribution from this MCTrack.
    • The efficiency relation is setup from the MCTrack to the PRTrack with the (positive) efficiency as weight.
  • WRONG CHARGE
    • The highest purity MCTrack of the highest efficiency PRTrack of this MCTrack is the same as this MCTrack.
    • But, the charge of the MCTrack and the one of the PRTrack are NOT the same.
    • This means the MCTrack is well described by a PRTrack and this PRTrack has only a significant contribution from this MCTrack.
    • The efficiency relation is setup from the MCTrack to the PRTrack with the (positive) efficiency as weight.
  • MERGED
    • The highest purity MCTrack of the highest efficiency PRTrack of this MCTrack is not the same as this MCTrack.
    • Anyway, the charge of this MCTrack and the one of the PRTrack are the same.
    • This means this MCTrack is mostly contained in a PRTrack, which in turn however better describes a MCTrack different form this.
    • The efficiency relation is setup from the MCTrack to the PRTrack with the negative efficiency as weight, to be able to distinguish them from the matched tracks.
  • MERGED WRONG CHARGE
    • The highest purity MCTrack of the highest efficiency PRTrack of this MCTrack is not the same as this MCTrack.
    • Moreover, the charge of this MCTrack and the one of the PRTrack are NOT the same.
    • This means this MCTrack is mostly contained in a PRTrack, which in turn however better describes a MCTrack different form this.
    • The efficiency relation is setup from the MCTrack to the PRTrack with the negative efficiency as weight, to be able to distinguish them from the matched tracks.
  • MISSING
    • There is no highest efficiency PRTrack to this MCTrack, which also fulfills the minimal purity requirement.
    • For this category no efficiency relation is inserted.

Definition at line 175 of file MCRecoTracksMatcherModule.h.

Member Typedef Documentation

◆ EAfterConditionPath

Forward the EAfterConditionPath definition from the ModuleCondition.

Definition at line 88 of file Module.h.

◆ NDF

using NDF = int
private

Descriptive type definition for a number of degrees of freedom.

Definition at line 239 of file MCRecoTracksMatcherModule.h.

Member Enumeration Documentation

◆ EModulePropFlags

enum EModulePropFlags
inherited

Each module can be tagged with property flags, which indicate certain features of the module.

Enumerator
c_Input 

This module is an input module (reads data).

c_Output 

This module is an output module (writes data).

c_ParallelProcessingCertified 

This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)

c_HistogramManager 

This module is used to manage histograms accumulated by other modules.

c_InternalSerializer 

This module is an internal serializer/deserializer for parallel processing.

c_TerminateInAllProcesses 

When using parallel processing, call this module's terminate() function in all processes().

This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.

c_DontCollectStatistics 

No statistics is collected for this module.

Definition at line 77 of file Module.h.

77 {
78 c_Input = 1,
79 c_Output = 2,
85 };
@ c_HistogramManager
This module is used to manage histograms accumulated by other modules.
Definition: Module.h:81
@ c_Input
This module is an input module (reads data).
Definition: Module.h:78
@ c_DontCollectStatistics
No statistics is collected for this module.
Definition: Module.h:84
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
@ c_InternalSerializer
This module is an internal serializer/deserializer for parallel processing.
Definition: Module.h:82
@ c_Output
This module is an output module (writes data).
Definition: Module.h:79
@ c_TerminateInAllProcesses
When using parallel processing, call this module's terminate() function in all processes().
Definition: Module.h:83

Constructor & Destructor Documentation

◆ MCRecoTracksMatcherModule()

Constructor setting up the parameter.

Definition at line 131 of file MCRecoTracksMatcherModule.cc.

132 : Module()
133{
134 setDescription("This module compares reconstructed tracks generated by some pattern recognition "
135 "algorithm for PXD, SVD and/or CDC to ideal Monte Carlo tracks and performs a "
136 "matching from the former to the underlying MCParticles.");
137
139
140 //Parameter definition
141 // Inputs
142 addParam("prRecoTracksStoreArrayName",
144 "Name of the collection containing the tracks as generate a pattern recognition algorithm to be evaluated ",
145 std::string(""));
146
147 addParam("mcRecoTracksStoreArrayName",
149 "Name of the collection containing the reference tracks as generate by a Monte-Carlo-Tracker (e.g. MCTrackFinder)",
150 std::string("MCGFTrackCands"));
151
152 addParam("TracksStoreArrayName",
154 "Name of the Tracks StoreArray to be used when checking fitted tracks.",
155 std::string(""));
156
157 // Hit content to be evaluated
158 addParam("UsePXDHits",
160 "Set true if PXDHits or PXDClusters should be used in the matching in case they are present",
161 true);
162
163 addParam("UseSVDHits",
165 "Set true if SVDHits or SVDClusters should be used in the matching in case they are present",
166 true);
167
168 addParam("UseCDCHits",
170 "Set true if CDCHits should be used in the matching in case they are present",
171 true);
172
173 addParam("UseOnlyAxialCDCHits",
175 "Set true if only the axial CDCHits should be used",
176 false);
177
178 addParam("MinimalPurity",
180 "Minimal purity of a PRTrack to be considered matchable to a MCTrack. "
181 "This number encodes how many correct hits are minimally need to compensate for a false hits. "
182 "The default 2.0 / 3.0 suggests that for each background hit can be compensated by two correct hits.",
183 2.0 / 3.0);
184
185 addParam("MinimalEfficiency",
187 "Minimal efficiency of a MCTrack to be considered matchable to a PRTrack. "
188 "This number encodes which fraction of the true hits must at least be in the reconstructed track. "
189 "The default 0.05 suggests that at least 5% of the true hits should have been picked up.",
190 0.05);
191
192 addParam("useFittedTracks",
194 "If true, it uses fitted tracks for matching. Note that the charge of the track can be different from\
195 the seed charge (that is provided by the pattern recognition) since the DAF can flip tracks.",
197}
bool m_useCDCHits
Parameter : Switch whether CDCHits should be used in the matching.
std::string m_TracksStoreArrayName
Parameter : Name of the Tracks StoreArray.
double m_minimalPurity
Parameter : Minimal purity of a PRTrack to be considered matchable to a MCTrack.
double m_minimalEfficiency
Parameter : Minimal efficiency for a MCTrack to be considered matchable to a PRTrack.
bool m_useFittedTracks
Use fitted tracks for matching.
bool m_usePXDHits
Parameter : Switch whether PXDHits should be used in the matching.
std::string m_prRecoTracksStoreArrayName
Parameter : Name of the RecoTracks StoreArray from pattern recognition.
bool m_useOnlyAxialCDCHits
Parameter : Switch whether only axial CDCHits should be used.
std::string m_mcRecoTracksStoreArrayName
Parameter : Name of the RecoTracks StoreArray from MC track finding.
bool m_useSVDHits
Parameter : Switch whether SVDHits should be used in the matching.
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
Module()
Constructor.
Definition: Module.cc:30
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560

Member Function Documentation

◆ beginRun()

virtual void beginRun ( void  )
inlinevirtualinherited

Called when entering a new run.

Called at the beginning of each run, the method gives you the chance to change run dependent constants like alignment parameters, etc.

This method can be implemented by subclasses.

Reimplemented in ARICHBackgroundModule, BeamabortModule, BgoModule, CaveModule, ClawModule, CLAWSModule, DosiModule, FANGSModule, He3tubeModule, MicrotpcModule, Ph1bpipeModule, Ph1sustrModule, PindiodeModule, PlumeModule, QcsmonitorModule, SrsensorModule, GetEventFromSocketModule, CalibrationCollectorModule, EventsOfDoomBusterModule, CosmicsAlignmentValidationModule, EnergyBiasCorrectionModule, ChargedPidMVAModule, ChargedPidMVAMulticlassModule, CurlTaggerModule, LowEnergyPi0IdentificationExpertModule, LowEnergyPi0VetoExpertModule, ParticleVertexFitterModule, PhotonEfficiencySystematicsModule, TagVertexModule, TreeFitterModule, arichBtestModule, ARICHDigitizerModule, ARICHDQMModule, ARICHRateCalModule, ARICHReconstructorModule, B2BIIMCParticlesMonitorModule, B2BIIConvertBeamParamsModule, B2BIIConvertMdstModule, B2BIIFixMdstModule, B2BIIMdstInputModule, BelleMCOutputModule, BeamBkgGeneratorModule, BeamBkgHitRateMonitorModule, BeamBkgMixerModule, BeamBkgTagSetterModule, BGOverlayInputModule, AnalysisPhase1StudyModule, NtuplePhase1_v6Module, ReprocessorModule, BeamabortStudyModule, BeamDigitizerModule, BgoDigitizerModule, BgoStudyModule, ClawDigitizerModule, ClawStudyModule, ClawsDigitizerModule, ClawsStudyModule, CsiDigitizer_v2Module, CsIDigitizerModule, CsiModule, CsiStudy_v2Module, CsIStudyModule, DosiDigitizerModule, DosiStudyModule, FANGSDigitizerModule, FANGSStudyModule, He3DigitizerModule, He3tubeStudyModule, MicrotpcStudyModule, TpcDigitizerModule, PinDigitizerModule, PindiodeStudyModule, PlumeDigitizerModule, QcsmonitorDigitizerModule, QcsmonitorStudyModule, CDCCosmicAnalysisModule, CDCCRTestModule, cdcDQM7Module, CDCDQMModule, CDCPackerModule, CDCRecoTrackFilterModule, CDCUnpackerModule, DAQPerfModule, RxSocketModule, TxSocketModule, DqmHistoManagerModule, MonitorDataModule, TrackAnaModule, Ds2SampleModule, ReceiveEventModule, HLTDQM2ZMQModule, ElapsedTimeModule, DeSerializerPXDModule, GenRawSendModule, SerializerModule, CertifyParallelModule, Ds2RawModule, Ds2RbufModule, EvReductionModule, FastRbuf2DsModule, Raw2DsModule, RawInputModule, Rbuf2DsModule, Rbuf2RbufModule, Ds2RawFileModule, PartialSeqRootReaderModule, SeqRootMergerModule, StorageDeserializerModule, StorageSerializerModule, IPDQMModule, PhysicsObjectsDQMModule, PhysicsObjectsMiraBelleBhabhaModule, PhysicsObjectsMiraBelleDst2Module, PhysicsObjectsMiraBelleDstModule, PhysicsObjectsMiraBelleHadronModule, PhysicsObjectsMiraBelleModule, ECLBackgroundModule, ECLChargedPIDModule, ECLChargedPIDDataAnalysisModule, ECLChargedPIDDataAnalysisValidationModule, ECLChargedPIDMVAModule, ECLClusterPSDModule, ECLCovarianceMatrixModule, ECLCRFinderModule, ECLDataAnalysisModule, ECLDigitCalibratorModule, ECLDigitizerModule, ECLDigitizerPureCsIModule, EclDisplayModule, ECLDQMModule, ECLDQMConnectedRegionsModule, ECLDQMEXTENDEDModule, ECLDQMOutOfTimeDigitsModule, ECLFinalizerModule, ECLHitDebugModule, ECLLocalMaximumFinderModule, ECLLocalRunCalibratorModule, ECLLOMModule, ECLPackerModule, ECLShowerCorrectorModule, ECLShowerShapeModule, ECLSplitterN1Module, ECLSplitterN2Module, ECLUnpackerModule, ECLWaveformFitModule, HistoModule, SubEventModule, SwitchDataStoreModule, EventInfoPrinterModule, EventLimiterModule, IoVDependentConditionModule, ProgressModule, RandomBarrierModule, GearboxModule, HistoManagerModule, StatisticsSummaryModule, SeqRootInputModule, SeqRootOutputModule, RxModule, TxModule, EvtGenDecayModule, EvtGenInputModule, OverrideGenerationFlagsModule, KKGenInputModule, CreateFieldMapModule, ExportGeometryModule, SoftwareTriggerModule, SoftwareTriggerHLTDQMModule, StatisticsTimingHLTDQMModule, BKLMAnaModule, BKLMDigitAnalyzerModule, BKLMSimHistogrammerModule, BKLMTrackingModule, EKLMDataCheckerModule, KLMClusterAnaModule, KLMClusterEfficiencyModule, KLMClustersReconstructorModule, KLMDigitizerModule, KLMDigitTimeShifterModule, KLMDQMModule, KLMDQM2Module, KLMPackerModule, KLMReconstructorModule, KLMScintillatorSimulatorModule, KLMUnpackerModule, MVAExpertModule, MVAMultipleExpertsModule, MVAPrototypeModule, AWESOMEBasicModule, PXDBackgroundModule, PXDRawDQMChipsModule, PXDClustersFromTracksModule, PXDPerformanceModule, PXDClusterizerModule, Convert2RawDetModule, CDCDedxDQMModule, CDCDedxValidationModule, EventT0DQMModule, EventT0ValidationModule, DataWriterModule, ECLExpertModule, KLMExpertModule, KlongValidationModule, KLMMuonIDDNNExpertModule, FullSimModule, MaterialScanModule, SVDBackgroundModule, SVDClusterCalibrationsMonitorModule, SVDHotStripFinderModule, SVDLatencyCalibrationModule, SVDLocalCalibrationsCheckModule, SVDLocalCalibrationsMonitorModule, SVDPositionErrorScaleFactorImporterModule, SVDTimeCalibrationsMonitorModule, SVDDQMHitTimeModule, svdDumpModule, SVDPackerModule, SVDB4CommissioningPlotsModule, SVDClusterEvaluationModule, SVDClusterEvaluationTrueInfoModule, SVDClusterFilterModule, SVDMaxStripTTreeModule, SVDOccupancyAnalysisModule, SVDPerformanceModule, SVDPerformanceTTreeModule, SVDShaperDigitsFromTracksModule, SVDClusterizerModule, SVDCoGTimeEstimatorModule, SVDDataFormatCheckModule, SVDMissingAPVsClusterCreatorModule, SVDRecoDigitCreatorModule, SVD3SamplesEmulatorModule, SVDDigitizerModule, SVDEventInfoSetterModule, SVDTriggerQualityGeneratorModule, SVDSpacePointCreatorModule, SVDTimeGroupingModule, SVDUnpackerModule, TOPBackgroundModule, TOPBunchFinderModule, TOPChannelMaskerModule, TOPChannelT0MCModule, TOPDigitizerModule, TOPTriggerDigitizerModule, TOPDoublePulseGeneratorModule, TOPDQMModule, TOPGainEfficiencyCalculatorModule, TOPLaserHitSelectorModule, TOPInterimFENtupleModule, TOPLaserCalibratorModule, TOPMCTrackMakerModule, TOPModuleT0CalibratorModule, TOPNtupleModule, TOPPackerModule, TOPRawDigitConverterModule, TOPTBCComparatorModule, TOPTimeBaseCalibratorModule, TOPTimeRecalibratorModule, TOPUnpackerModule, TOPWaveformFeatureExtractorModule, TOPXTalkChargeShareSetterModule, DQMHistoModuleBase, SVDEventT0EstimatorModule, ExtModule, FlipQualityModule, BeamSpotMonitorModule, KinkFinderModule, MCV0MatcherModule, MCTrackCandClassifierModule, MuidModule, PXDROIFinderModule, SVDROIFinderAnalysisModule, SVDROIFinderModule, SPTCmomentumSeedRetrieverModule, SPTCvirtualIPRemoverModule, TrackCreatorModule, TrackFinderMCTruthRecoTracksModule, EffPlotsModule, HitXPModule, TrackingPerformanceEvaluationModule, V0findingPerformanceEvaluationModule, TrackQETrainingDataCollectorModule, TrackQualityEstimatorMVAModule, SecMapTrainerBaseModule, SecMapTrainerVXDTFModule, TrackFinderVXDAnalizerModule, VXDSimpleClusterizerModule, QualityEstimatorVXDModule, VXDQETrainingDataCollectorModule, VXDQualityEstimatorMVAModule, SectorMapBootstrapModule, SegmentNetworkProducerModule, TrackFinderVXDBasicPathFinderModule, TrackFinderVXDCellOMatModule, VXDTFTrainingDataCollectorModule, FindletModule< AFindlet >, FindletModule< HitBasedT0Extractor >, FindletModule< CKFToSVDSeedFindlet >, FindletModule< CKFToSVDFindlet >, FindletModule< CosmicsTrackMergerFindlet >, FindletModule< DATCONFPGAFindlet >, FindletModule< MCVXDCDCTrackMergerFindlet >, FindletModule< vxdHoughTracking::SVDHoughTracking >, FindletModule< CKFToCDCFindlet >, FindletModule< CKFToCDCFromEclFindlet >, FindletModule< CKFToPXDFindlet >, FindletModule< AsicBackgroundLibraryCreator >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromHitsFindlet >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromSegmentsFindlet >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderLegendre >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterPreparer >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< FacetCreator >, FindletModule< HitReclaimer >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFitter >, FindletModule< SegmentLinker >, FindletModule< SegmentOrienter >, FindletModule< SegmentPairCreator >, FindletModule< SegmentRejecter >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTripleCreator >, FindletModule< StereoHitFinder >, FindletModule< SuperClusterCreator >, FindletModule< TrackCombiner >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackExporter >, FindletModule< TrackFinderAutomaton >, FindletModule< TrackFinderCosmics >, FindletModule< TrackFinder >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackLinker >, FindletModule< TrackOrienter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityEstimator >, FindletModule< TrackRejecter >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitCreator >, FindletModule< WireHitPreparer >, CDCTriggerNeuroDQMModule, CDCTriggerNeuroDQMOnlineModule, CDCTriggerNDFinderModule, CDCTriggerTSFModule, TRGCDCModule, TRGCDCETFUnpackerModule, TRGCDCT2DDQMModule, TRGCDCT3DConverterModule, TRGCDCT3DDQMModule, TRGCDCT3DUnpackerModule, TRGCDCTSFDQMModule, TRGCDCTSFUnpackerModule, TRGCDCTSStreamModule, CDCTriggerUnpackerModule, MCMatcherTRGECLModule, TRGECLFAMModule, TRGECLModule, TRGECLBGTCHitModule, TRGECLDQMModule, TRGECLEventTimingDQMModule, TRGECLQAMModule, TRGECLRawdataAnalysisModule, TRGECLTimingCalModule, TRGECLUnpackerModule, TRGGDLModule, TRGEFFDQMModule, TRGGDLDQMModule, TRGGDLDSTModule, TRGGDLSummaryModule, TRGGDLUnpackerModule, TRGGRLMatchModule, TRGGRLModule, TRGGRLProjectsModule, TRGGRLDQMModule, TRGGRLUnpackerModule, KLMTriggerModule, TRGTOPDQMModule, TRGTOPTRD2TTSConverterModule, TRGTOPUnpackerModule, TRGTOPUnpackerWaveformModule, TRGTOPWaveformPlotterModule, TRGRAWDATAModule, VXDMisalignmentModule, DQMHistAnalysisARICHModule, DQMHistAnalysisCDCDedxModule, DQMHistAnalysisCDCEpicsModule, DQMHistAnalysisCDCMonObjModule, DQMHistAnalysisDAQMonObjModule, DQMHistAnalysisECLModule, DQMHistAnalysisECLConnectedRegionsModule, DQMHistAnalysisECLShapersModule, DQMHistAnalysisECLSummaryModule, DQMHistAnalysisEpicsExampleModule, DQMHistAnalysisEventT0EfficiencyModule, DQMHistAnalysisEventT0TriggerJitterModule, DQMHistAnalysisExampleModule, DQMHistAnalysisExampleFlagsModule, DQMHistAnalysisHLTModule, DQMHistAnalysisInput2Module, DQMHistAnalysisInputPVSrvModule, DQMHistAnalysisInputRootFileModule, DQMHistAnalysisInputTestModule, DQMHistAnalysisKLMModule, DQMHistAnalysisKLM2Module, DQMHistAnalysisMiraBelleModule, DQMHistAnalysisOutputMonObjModule, DQMHistAnalysisOutputRelayMsgModule, DQMHistAnalysisPeakModule, DQMHistAnalysisPXDERModule, DQMHistAnalysisPXDFitsModule, DQMHistAnalysisSVDClustersOnTrackModule, DQMHistAnalysisSVDDoseModule, DQMHistAnalysisSVDEfficiencyModule, DQMHistAnalysisSVDGeneralModule, DQMHistAnalysisSVDOccupancyModule, DQMHistAnalysisSVDOnMiraBelleModule, DQMHistAnalysisSVDUnpackerModule, DQMHistAnalysisTOPModule, DQMHistAnalysisTrackingAbortModule, DQMHistAnalysisTrackingHLTModule, DQMHistAnalysisTRGECLModule, DQMHistAutoCanvasModule, DQMHistComparitorModule, DQMHistDeltaHistoModule, DQMHistReferenceModule, DQMHistSnapshotsModule, DAQMonitorModule, DelayDQMModule, V0ObjectsDQMModule, ECLDQMInjectionModule, PyModule, PXDBgTupleProducerModule, PXDMCBgTupleProducerModule, PXDDAQDQMModule, PXDDQMClustersModule, PXDDQMCorrModule, PXDDQMEfficiencyModule, PXDDQMEfficiencySelftrackModule, PXDDQMExpressRecoModule, PXDGatedDHCDQMModule, PXDGatedModeDQMModule, PXDInjectionDQMModule, PXDRawDQMCorrModule, PXDRawDQMModule, PXDROIDQMModule, PXDTrackClusterDQMModule, PXDDigitizerModule, PXDPackerModule, PXDUnpackerModule, TTDDQMModule, DetectorOccupanciesDQMModule, SVDDQMClustersOnTrackModule, SVDDQMDoseModule, SVDDQMExpressRecoModule, SVDDQMInjectionModule, SVDUnpackerDQMModule, PXDclusterFilterModule, PXDdigiFilterModule, PXDROIFinderAnalysisModule, TrackingAbortDQMModule, VXDDQMExpressRecoModule, vxdDigitMaskingModule, DQMHistAnalysisDeltaEpicsMonObjExampleModule, DQMHistAnalysisDeltaTestModule, DQMHistAnalysisEpicsOutputModule, DQMHistAnalysisPhysicsModule, DQMHistAnalysisPXDChargeModule, DQMHistAnalysisPXDCMModule, DQMHistAnalysisPXDDAQModule, DQMHistAnalysisPXDEffModule, DQMHistAnalysisPXDInjectionModule, DQMHistAnalysisPXDReductionModule, DQMHistAnalysisPXDTrackChargeModule, DQMHistAnalysisRooFitExampleModule, DQMHistAnalysisRunNrModule, DQMHistAnalysisTRGModule, DQMHistInjectionModule, and DQMHistOutputToEPICSModule.

Definition at line 147 of file Module.h.

147{};

◆ clone()

std::shared_ptr< PathElement > clone ( ) const
overridevirtualinherited

Create an independent copy of this module.

Note that parameters are shared, so changing them on a cloned module will also affect the original module.

Implements PathElement.

Definition at line 179 of file Module.cc.

180{
182 newModule->m_moduleParamList.setParameters(getParamList());
183 newModule->setName(getName());
184 newModule->m_package = m_package;
185 newModule->m_propertyFlags = m_propertyFlags;
186 newModule->m_logConfig = m_logConfig;
187 newModule->m_conditions = m_conditions;
188
189 return newModule;
190}
std::shared_ptr< Module > registerModule(const std::string &moduleName, std::string sharedLibPath="") noexcept(false)
Creates an instance of a module and registers it to the ModuleManager.
static ModuleManager & Instance()
Exception is thrown if the requested module could not be created by the ModuleManager.
const ModuleParamList & getParamList() const
Return module param list.
Definition: Module.h:363
const std::string & getName() const
Returns the name of the module.
Definition: Module.h:187
const std::string & getType() const
Returns the type of the module (i.e.
Definition: Module.cc:41
unsigned int m_propertyFlags
The properties of the module as bitwise or (with |) of EModulePropFlags.
Definition: Module.h:512
LogConfig m_logConfig
The log system configuration of the module.
Definition: Module.h:514
std::vector< ModuleCondition > m_conditions
Module condition, only non-null if set.
Definition: Module.h:521
std::string m_package
Package this module is found in (may be empty).
Definition: Module.h:510
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
Definition: Module.h:43

◆ def_beginRun()

virtual void def_beginRun ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 426 of file Module.h.

426{ beginRun(); }
virtual void beginRun()
Called when entering a new run.
Definition: Module.h:147

◆ def_endRun()

virtual void def_endRun ( )
inlineprotectedvirtualinherited

This method can receive that the current run ends as a call from the Python side.

For regular C++-Modules that forwards the call to the regular endRun() method.

Reimplemented in PyModule.

Definition at line 439 of file Module.h.

439{ endRun(); }
virtual void endRun()
This method is called if the current run ends.
Definition: Module.h:166

◆ def_event()

virtual void def_event ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 432 of file Module.h.

432{ event(); }
virtual void event()
This method is the core of the module.
Definition: Module.h:157

◆ def_initialize()

virtual void def_initialize ( )
inlineprotectedvirtualinherited

Wrappers to make the methods without "def_" prefix callable from Python.

Overridden in PyModule. Wrapper method for the virtual function initialize() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 420 of file Module.h.

420{ initialize(); }
virtual void initialize()
Initialize the Module.
Definition: Module.h:109

◆ def_terminate()

virtual void def_terminate ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 445 of file Module.h.

445{ terminate(); }
virtual void terminate()
This method is called at the end of the event processing.
Definition: Module.h:176

◆ endRun()

virtual void endRun ( void  )
inlinevirtualinherited

This method is called if the current run ends.

Use this method to store information, which should be aggregated over one run.

This method can be implemented by subclasses.

Reimplemented in BeamabortModule, BgoModule, CaveModule, ClawModule, CLAWSModule, DosiModule, FANGSModule, He3tubeModule, MicrotpcModule, Ph1bpipeModule, Ph1sustrModule, PindiodeModule, PlumeModule, QcsmonitorModule, SrsensorModule, GetEventFromSocketModule, CalibrationCollectorModule, AlignDQMModule, CosmicsAlignmentValidationModule, CurlTaggerModule, LowEnergyPi0IdentificationExpertModule, LowEnergyPi0VetoExpertModule, arichBtestModule, ARICHDQMModule, B2BIIMCParticlesMonitorModule, B2BIIConvertMdstModule, B2BIIMdstInputModule, BelleMCOutputModule, BeamBkgGeneratorModule, BeamBkgHitRateMonitorModule, BeamBkgMixerModule, BeamBkgTagSetterModule, BGOverlayInputModule, AnalysisPhase1StudyModule, NtuplePhase1_v6Module, ReprocessorModule, BeamabortStudyModule, BeamDigitizerModule, BgoDigitizerModule, BgoStudyModule, ClawDigitizerModule, ClawStudyModule, ClawsDigitizerModule, ClawsStudyModule, CsiDigitizer_v2Module, CsIDigitizerModule, CsiModule, CsiStudy_v2Module, CsIStudyModule, DosiDigitizerModule, DosiStudyModule, FANGSDigitizerModule, FANGSStudyModule, He3DigitizerModule, He3tubeStudyModule, MicrotpcStudyModule, TpcDigitizerModule, TPCStudyModule, PinDigitizerModule, PindiodeStudyModule, PlumeDigitizerModule, QcsmonitorDigitizerModule, QcsmonitorStudyModule, CDCCosmicAnalysisModule, CDCCRTestModule, cdcDQM7Module, CDCDQMModule, CDCPackerModule, CDCRecoTrackFilterModule, CDCUnpackerModule, DAQPerfModule, RxSocketModule, TxSocketModule, DqmHistoManagerModule, MonitorDataModule, TrackAnaModule, Ds2SampleModule, ReceiveEventModule, HLTDQM2ZMQModule, HLTDs2ZMQModule, ElapsedTimeModule, DeSerializerPXDModule, GenRawSendModule, Root2RawModule, SerializerModule, CertifyParallelModule, Ds2RawModule, Ds2RbufModule, EvReductionModule, FastRbuf2DsModule, Raw2DsModule, RawInputModule, Rbuf2DsModule, Rbuf2RbufModule, Ds2RawFileModule, PartialSeqRootReaderModule, SeqRootMergerModule, StorageDeserializerModule, StorageRootOutputModule, StorageSerializerModule, PhysicsObjectsDQMModule, PhysicsObjectsMiraBelleBhabhaModule, PhysicsObjectsMiraBelleDst2Module, PhysicsObjectsMiraBelleDstModule, PhysicsObjectsMiraBelleHadronModule, PhysicsObjectsMiraBelleModule, ECLBackgroundModule, ECLChargedPIDModule, ECLChargedPIDDataAnalysisModule, ECLChargedPIDDataAnalysisValidationModule, ECLClusterPSDModule, ECLCovarianceMatrixModule, ECLCRFinderModule, ECLDataAnalysisModule, ECLDigitCalibratorModule, ECLDigitizerModule, ECLDigitizerPureCsIModule, EclDisplayModule, ECLDQMModule, ECLDQMEXTENDEDModule, ECLFinalizerModule, ECLHitDebugModule, ECLLocalMaximumFinderModule, ECLLocalRunCalibratorModule, ECLLOMModule, ECLPackerModule, ECLShowerCorrectorModule, ECLShowerShapeModule, ECLSplitterN1Module, ECLSplitterN2Module, ECLUnpackerModule, ECLWaveformFitModule, HistoModule, SubEventModule, SwitchDataStoreModule, EventInfoPrinterModule, RandomBarrierModule, HistoManagerModule, StatisticsSummaryModule, SeqRootInputModule, SeqRootOutputModule, RxModule, TxModule, ZMQTxInputModule, ZMQTxWorkerModule, EvtGenDecayModule, OverrideGenerationFlagsModule, BKLMAnaModule, BKLMDigitAnalyzerModule, BKLMSimHistogrammerModule, BKLMTrackingModule, EKLMDataCheckerModule, KLMClusterEfficiencyModule, KLMClustersReconstructorModule, KLMDigitizerModule, KLMDQMModule, KLMDQM2Module, KLMPackerModule, KLMReconstructorModule, KLMScintillatorSimulatorModule, KLMUnpackerModule, AWESOMEBasicModule, PXDBackgroundModule, PXDClustersFromTracksModule, PXDPerformanceModule, Convert2RawDetModule, PrintDataModule, PrintEventRateModule, Root2BinaryModule, CDCDedxDQMModule, CDCDedxValidationModule, EventT0ValidationModule, DataWriterModule, KlongValidationModule, KLMMuonIDDNNExpertModule, FullSimModule, SVDBackgroundModule, SVDClusterCalibrationsMonitorModule, SVDHotStripFinderModule, SVDLatencyCalibrationModule, SVDLocalCalibrationsMonitorModule, SVDPositionErrorScaleFactorImporterModule, SVDTimeCalibrationsMonitorModule, svdDumpModule, SVDPackerModule, SVDB4CommissioningPlotsModule, SVDClusterEvaluationModule, SVDClusterEvaluationTrueInfoModule, SVDClusterFilterModule, SVDOccupancyAnalysisModule, SVDPerformanceModule, SVDShaperDigitsFromTracksModule, SVDClusterizerModule, SVDCoGTimeEstimatorModule, SVDDataFormatCheckModule, SVDRecoDigitCreatorModule, SVD3SamplesEmulatorModule, SVDTriggerQualityGeneratorModule, SVDUnpackerModule, TOPBackgroundModule, TOPChannelT0MCModule, TOPTriggerDigitizerModule, TOPDoublePulseGeneratorModule, TOPGainEfficiencyCalculatorModule, TOPLaserHitSelectorModule, TOPInterimFENtupleModule, TOPLaserCalibratorModule, TOPMCTrackMakerModule, TOPNtupleModule, TOPPackerModule, TOPRawDigitConverterModule, TOPTBCComparatorModule, TOPTimeBaseCalibratorModule, TOPUnpackerModule, TOPWaveformFeatureExtractorModule, TOPWaveformQualityPlotterModule, TOPXTalkChargeShareSetterModule, ExtModule, GenfitVisModule, MCV0MatcherModule, MCTrackCandClassifierModule, MuidModule, MCSlowPionPXDROICreatorModule, PXDROIFinderModule, SVDROIDQMModule, SVDROIFinderAnalysisModule, SVDROIFinderModule, RT2SPTCConverterModule, SPTCmomentumSeedRetrieverModule, SPTCvirtualIPRemoverModule, TrackFinderMCTruthRecoTracksModule, EffPlotsModule, HitXPModule, TrackingPerformanceEvaluationModule, V0findingPerformanceEvaluationModule, SecMapTrainerBaseModule, SecMapTrainerVXDTFModule, TrackFinderVXDAnalizerModule, VXDSimpleClusterizerModule, NoKickCutsEvalModule, SectorMapBootstrapModule, VXDTFTrainingDataCollectorModule, FindletModule< AFindlet >, FindletModule< HitBasedT0Extractor >, FindletModule< CKFToSVDSeedFindlet >, FindletModule< CKFToSVDFindlet >, FindletModule< CosmicsTrackMergerFindlet >, FindletModule< DATCONFPGAFindlet >, FindletModule< MCVXDCDCTrackMergerFindlet >, FindletModule< vxdHoughTracking::SVDHoughTracking >, FindletModule< CKFToCDCFindlet >, FindletModule< CKFToCDCFromEclFindlet >, FindletModule< CKFToPXDFindlet >, FindletModule< AsicBackgroundLibraryCreator >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromHitsFindlet >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromSegmentsFindlet >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderLegendre >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterPreparer >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< FacetCreator >, FindletModule< HitReclaimer >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFitter >, FindletModule< SegmentLinker >, FindletModule< SegmentOrienter >, FindletModule< SegmentPairCreator >, FindletModule< SegmentRejecter >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTripleCreator >, FindletModule< StereoHitFinder >, FindletModule< SuperClusterCreator >, FindletModule< TrackCombiner >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackExporter >, FindletModule< TrackFinderAutomaton >, FindletModule< TrackFinderCosmics >, FindletModule< TrackFinder >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackLinker >, FindletModule< TrackOrienter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityEstimator >, FindletModule< TrackRejecter >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitCreator >, FindletModule< WireHitPreparer >, CDCTriggerNeuroDQMModule, CDCTriggerNeuroDQMOnlineModule, CDCTriggerNDFinderModule, TRGCDCModule, TRGCDCETFUnpackerModule, TRGCDCT2DDQMModule, TRGCDCT3DConverterModule, TRGCDCT3DDQMModule, TRGCDCT3DUnpackerModule, TRGCDCTSFDQMModule, TRGCDCTSFUnpackerModule, TRGCDCTSStreamModule, MCMatcherTRGECLModule, TRGECLFAMModule, TRGECLModule, TRGECLBGTCHitModule, TRGECLDQMModule, TRGECLQAMModule, TRGECLRawdataAnalysisModule, TRGECLTimingCalModule, TRGECLUnpackerModule, TRGGDLModule, TRGEFFDQMModule, TRGGDLDQMModule, TRGGDLDSTModule, TRGGDLSummaryModule, TRGGDLUnpackerModule, TRGGRLMatchModule, TRGGRLModule, TRGGRLProjectsModule, TRGGRLDQMModule, TRGGRLUnpackerModule, KLMTriggerModule, TRGTOPDQMModule, TRGTOPTRD2TTSConverterModule, TRGTOPUnpackerModule, TRGTOPUnpackerWaveformModule, TRGTOPWaveformPlotterModule, TRGRAWDATAModule, DQMHistAnalysisARICHModule, DQMHistAnalysisARICHMonObjModule, DQMHistAnalysisCDCDedxModule, DQMHistAnalysisCDCEpicsModule, DQMHistAnalysisCDCMonObjModule, DQMHistAnalysisDAQMonObjModule, DQMHistAnalysisECLModule, DQMHistAnalysisECLConnectedRegionsModule, DQMHistAnalysisECLOutOfTimeDigitsModule, DQMHistAnalysisECLShapersModule, DQMHistAnalysisECLSummaryModule, DQMHistAnalysisEpicsExampleModule, DQMHistAnalysisExampleModule, DQMHistAnalysisExampleFlagsModule, DQMHistAnalysisHLTMonObjModule, DQMHistAnalysisInput2Module, DQMHistAnalysisInputPVSrvModule, DQMHistAnalysisInputTestModule, DQMHistAnalysisKLMModule, DQMHistAnalysisKLM2Module, DQMHistAnalysisMiraBelleModule, DQMHistAnalysisMonObjModule, DQMHistAnalysisOutputFileModule, DQMHistAnalysisOutputMonObjModule, DQMHistAnalysisOutputRelayMsgModule, DQMHistAnalysisPXDFitsModule, DQMHistAnalysisSVDClustersOnTrackModule, DQMHistAnalysisSVDDoseModule, DQMHistAnalysisSVDEfficiencyModule, DQMHistAnalysisSVDGeneralModule, DQMHistAnalysisSVDOccupancyModule, DQMHistAnalysisSVDOnMiraBelleModule, DQMHistAnalysisSVDUnpackerModule, DQMHistAnalysisTOPModule, DQMHistAnalysisTRGECLModule, DQMHistAnalysisTRGEFFModule, DQMHistAnalysisTRGGDLModule, DQMHistComparitorModule, DQMHistDeltaHistoModule, DQMHistReferenceModule, DQMHistSnapshotsModule, PyModule, SVDUnpackerDQMModule, TrackSetEvaluatorHopfieldNNDEVModule, vxdDigitMaskingModule, DQMHistAnalysisDeltaEpicsMonObjExampleModule, DQMHistAnalysisDeltaTestModule, DQMHistAnalysisEpicsOutputModule, DQMHistAnalysisPhysicsModule, DQMHistAnalysisPXDChargeModule, DQMHistAnalysisPXDTrackChargeModule, DQMHistAnalysisRooFitExampleModule, DQMHistAnalysisTRGModule, and DQMHistOutputToEPICSModule.

Definition at line 166 of file Module.h.

166{};

◆ evalCondition()

bool evalCondition ( ) const
inherited

If at least one condition was set, it is evaluated and true returned if at least one condition returns true.

If no condition or result value was defined, the method returns false. Otherwise, the condition is evaluated and true returned, if at least one condition returns true. To speed up the evaluation, the condition strings were already parsed in the method if_value().

Returns
True if at least one condition and return value exists and at least one condition expression was evaluated to true.

Definition at line 96 of file Module.cc.

97{
98 if (m_conditions.empty()) return false;
99
100 //okay, a condition was set for this Module...
101 if (!m_hasReturnValue) {
102 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
103 }
104
105 for (const auto& condition : m_conditions) {
106 if (condition.evaluate(m_returnValue)) {
107 return true;
108 }
109 }
110 return false;
111}
int m_returnValue
The return value.
Definition: Module.h:519
bool m_hasReturnValue
True, if the return value is set.
Definition: Module.h:518

◆ event()

void event ( void  )
finalvirtual

Process the event.

Reimplemented from Module.

Definition at line 240 of file MCRecoTracksMatcherModule.cc.

241{
242 // Skip in the case there are no MC particles present.
243 if (not m_mcParticlesPresent) {
244 B2DEBUG(23, "Skipping MC Track Matcher as there are no MC Particles registered in the DataStore.");
245 return;
246 }
247
248 B2DEBUG(23, "########## MCRecoTracksMatcherModule ############");
249
250 int nMCRecoTracks = m_MCRecoTracks.getEntries();
251 int nPRRecoTracks = m_PRRecoTracks.getEntries();
252
253 B2DEBUG(23, "Number pattern recognition tracks is " << nPRRecoTracks);
254 B2DEBUG(23, "Number Monte-Carlo tracks is " << nMCRecoTracks);
255
256 if (not nMCRecoTracks or not nPRRecoTracks) {
257 // Neither no pattern recognition tracks
258 // or no Monte Carlo tracks are present in this event
259 // Cannot perform matching.
260 return;
261 }
262
263 // ### Build a detector_id hit_id to reco track map for easier lookup later ###
264 std::multimap<DetHitIdPair, WeightedRecoTrackId > mcId_by_hitId;
265 fillIDsFromStoreArray(mcId_by_hitId, m_MCRecoTracks);
266
267 // Use set instead of multimap to handle to following situation
268 // * One hit may be assigned to multiple tracks should contribute to the efficiency of both tracks
269 // * One hit assigned twice or more to the same track should not contribute to the purity multiple times
270 // The first part is handled well by the multimap. But to enforce that one hit is also only assigned
271 // once to a track we use a set.
272 std::set<std::pair<DetHitIdPair, WeightedRecoTrackId>> prId_by_hitId;
273 fillIDsFromStoreArray(prId_by_hitId, m_PRRecoTracks);
274
275 // ### Get the number of relevant hits for each detector ###
276 // Since we are mostly dealing with indices in this module, this is all we need from the StoreArray
277 // Silently skip store arrays that are not present in reduced detector setups.
278 std::map<DetId, int> nHits_by_detId;
279
280 // PXD
281 if (m_usePXDHits) {
282 nHits_by_detId[Const::PXD] = m_PXDClusters.getEntries();
283 }
284
285 // SVD
286 if (m_useSVDHits) {
287 nHits_by_detId[Const::SVD] = m_SVDClusters.getEntries();
288 }
289
290 // CDC
291 if (m_useCDCHits) {
292 nHits_by_detId[Const::CDC] = m_CDCHits.getEntries();
293 }
294
295 //### Build the confusion matrix ###
296
297 // Reserve enough space for the confusion matrix
298 // The last row is meant for hits not assigned to a mcRecoTrack (aka background hits)
299 Eigen::MatrixXd confusionMatrix = Eigen::MatrixXd::Zero(nPRRecoTracks, nMCRecoTracks + 1);
300 Eigen::MatrixXd weightedConfusionMatrix = Eigen::MatrixXd::Zero(nPRRecoTracks, nMCRecoTracks + 1);
301
302 // Accumulated the total number of hits/ndf for each Monte-Carlo track separately to avoid double counting,
303 // in case pattern recognition tracks share hits.
304 Eigen::RowVectorXd totalNDF_by_mcId = Eigen::RowVectorXd::Zero(nMCRecoTracks + 1);
305 Eigen::RowVectorXd totalWeight_by_mcId = Eigen::RowVectorXd::Zero(nMCRecoTracks + 1);
306
307 // Accumulated the total number of hits/ndf for each pattern recognition track separately to avoid double counting,
308 // in case Monte-Carlo tracks share hits.
309 Eigen::VectorXd totalNDF_by_prId = Eigen::VectorXd::Zero(nPRRecoTracks);
310
311 // Column index for the hits not assigned to any MCRecoTrack
312 const int mcBkgId = nMCRecoTracks;
313
314 // for each detector examine every hit to which mcRecoTrack and prRecoTrack it belongs
315 // if the hit is not part of any mcRecoTrack put the hit in the background column.
316 for (const std::pair<const DetId, NDF>& detId_nHits_pair : nHits_by_detId) {
317
318 DetId detId = detId_nHits_pair.first;
319 int nHits = detId_nHits_pair.second;
320 NDF ndfForOneHit = m_ndf_by_detId[detId];
321
322 for (HitId hitId = 0; hitId < nHits; ++hitId) {
323 DetHitIdPair detId_hitId_pair(detId, hitId);
324
325 if (m_useOnlyAxialCDCHits and detId == Const::CDC) {
326 StoreArray<CDCHit> cdcHits;
327 const CDCHit* cdcHit = cdcHits[hitId];
328 if (cdcHit->getISuperLayer() % 2 != 0) {
329 // Skip stereo hits
330 continue;
331 }
332 }
333
334 // Seek all Monte Carlo tracks with the given hit
335 const auto mcIds_for_detId_hitId_pair =
336 as_range(mcId_by_hitId.equal_range(detId_hitId_pair));
337
338 // Seek all pattern recognition tracks with the given hit
339 const auto prIds_for_detId_hitId_pair =
340 as_range(std::equal_range(prId_by_hitId.begin(),
341 prId_by_hitId.end(),
342 detId_hitId_pair,
343 CompDetHitIdPair()));
344
345 // Assign the hits/ndf to the total ndf vector separately to avoid double counting,
346 // if pattern recognition track share hits.
347 if (mcIds_for_detId_hitId_pair.empty()) {
348 // If the hit is not assigned to any mcRecoTrack
349 // The hit is assigned to the background column
350 RecoTrackId mcId = mcBkgId;
351 double mcWeight = 1;
352 totalNDF_by_mcId(mcId) += ndfForOneHit;
353 totalWeight_by_mcId(mcId) += ndfForOneHit * mcWeight;
354 } else {
355 for (const auto& detId_hitId_pair_and_mcId : mcIds_for_detId_hitId_pair) {
356 int mcId = detId_hitId_pair_and_mcId.second;
357 double mcWeight = detId_hitId_pair_and_mcId.second.weight;
358 totalNDF_by_mcId(mcId) += ndfForOneHit;
359 totalWeight_by_mcId(mcId) += ndfForOneHit * mcWeight;
360 }
361 }
362
363 // Assign the hits/ndf to the total ndf vector separately here to avoid double counting,
364 // if Monte-Carlo track share hits.
365 for (const auto& detId_hitId_pair_and_prId : prIds_for_detId_hitId_pair) {
366 RecoTrackId prId = detId_hitId_pair_and_prId.second;
367 totalNDF_by_prId(prId) += ndfForOneHit;
368 }
369
370 // Fill the confusion matrix
371 for (const auto& detId_hitId_pair_and_prId : prIds_for_detId_hitId_pair) {
372 int prId = detId_hitId_pair_and_prId.second;
373 if (mcIds_for_detId_hitId_pair.empty()) {
374 int mcId = mcBkgId;
375 double mcWeight = 1;
376 confusionMatrix(prId, mcId) += ndfForOneHit;
377 weightedConfusionMatrix(prId, mcId) += ndfForOneHit * mcWeight;
378 } else {
379 for (const auto& detId_hitId_pair_and_mcId : mcIds_for_detId_hitId_pair) {
380 int mcId = detId_hitId_pair_and_mcId.second;
381 double mcWeight = detId_hitId_pair_and_mcId.second.weight;
382 confusionMatrix(prId, mcId) += ndfForOneHit;
383 weightedConfusionMatrix(prId, mcId) += ndfForOneHit * mcWeight;
384 }
385 }
386 } // end for
387 } // end for hitId
388 } // end for detId
389
390 B2DEBUG(24, "Confusion matrix of the event : " << std::endl << confusionMatrix);
391 B2DEBUG(24, "Weighted confusion matrix of the event : " << std::endl << weightedConfusionMatrix);
392
393 B2DEBUG(24, "totalNDF_by_mcId : " << std::endl << totalNDF_by_mcId);
394 B2DEBUG(24, "totalWeight_by_mcId : " << std::endl << totalWeight_by_mcId);
395
396 B2DEBUG(24, "totalNDF_by_prId : " << std::endl << totalNDF_by_prId);
397
398 Eigen::MatrixXd purityMatrix = confusionMatrix.array().colwise() / totalNDF_by_prId.array();
399 Eigen::MatrixXd efficiencyMatrix = confusionMatrix.array().rowwise() / totalNDF_by_mcId.array();
400 Eigen::MatrixXd weightedEfficiencyMatrix = weightedConfusionMatrix.array().rowwise() / totalWeight_by_mcId.array();
401
402 B2DEBUG(23, "Purities");
403 B2DEBUG(23, purityMatrix);
404
405 B2DEBUG(23, "Efficiencies");
406 B2DEBUG(23, efficiencyMatrix);
407
408 B2DEBUG(23, "Weighted efficiencies");
409 B2DEBUG(23, weightedEfficiencyMatrix);
410
411 // ### Building the Monte-Carlo track to highest efficiency pattern recognition track relation ###
412 // Weighted efficiency
413 using Efficiency = float;
414 using Purity = float;
415
416 struct MostWeightEfficientPRId {
417 RecoTrackId id;
418 Efficiency weightedEfficiency;
419 // cppcheck-suppress unusedStructMember
420 Efficiency efficiency;
421 };
422 std::vector<MostWeightEfficientPRId> mostWeightEfficientPRId_by_mcId(nMCRecoTracks);
423 for (RecoTrackId mcId = 0; mcId < nMCRecoTracks; ++mcId) {
424 Eigen::VectorXd efficiencyCol = efficiencyMatrix.col(mcId);
425 Eigen::VectorXd weightedEfficiencyCol = weightedEfficiencyMatrix.col(mcId);
426
427 RecoTrackId bestPrId = 0;
428 Efficiency bestWeightedEfficiency = weightedEfficiencyCol(0);
429 Efficiency bestEfficiency = efficiencyCol(0);
430 Purity bestPurity = purityMatrix.row(0)(mcId);
431
432 // Reject efficiency smaller than the minimal one
433 if (bestWeightedEfficiency < m_minimalEfficiency) {
434 bestWeightedEfficiency = 0;
435 }
436
437 // In case of a tie in the weighted efficiency we use the regular efficiency to break it.
438 for (RecoTrackId prId = 1; prId < nPRRecoTracks; ++prId) {
439 Eigen::RowVectorXd purityRow = purityMatrix.row(prId);
440
441 Efficiency currentWeightedEfficiency = weightedEfficiencyCol(prId);
442 Efficiency currentEfficiency = efficiencyCol(prId);
443 Purity currentPurity = purityRow(mcId);
444
445 // Reject efficiency smaller than the minimal one
446 if (currentWeightedEfficiency < m_minimalEfficiency) {
447 currentWeightedEfficiency = 0;
448 }
449
450 if (std::tie(currentWeightedEfficiency, currentEfficiency, currentPurity) >
451 std::tie(bestWeightedEfficiency, bestEfficiency, bestPurity)) {
452 bestPrId = prId;
453 bestEfficiency = currentEfficiency;
454 bestWeightedEfficiency = currentWeightedEfficiency;
455 bestPurity = currentPurity;
456 }
457 }
458
459 bestWeightedEfficiency = weightedEfficiencyCol(bestPrId);
460 bestEfficiency = efficiencyCol(bestPrId);
461 mostWeightEfficientPRId_by_mcId[mcId] = {bestPrId, bestWeightedEfficiency, bestEfficiency};
462 }
463
464 // ### Building the pattern recognition track to highest purity Monte-Carlo track relation ###
465 // Unweighted purity
466 struct MostPureMCId {
467 RecoTrackId id;
468 Purity purity;
469 };
470
471 std::vector<MostPureMCId> mostPureMCId_by_prId(nPRRecoTracks);
472 for (int prId = 0; prId < nPRRecoTracks; ++prId) {
473 Eigen::RowVectorXd purityRow = purityMatrix.row(prId);
474
475 int mcId;
476 Purity highestPurity = purityRow.maxCoeff(&mcId);
477
478 mostPureMCId_by_prId[prId] = {mcId, highestPurity};
479 }
480
481 // Log the Monte-Carlo track to highest efficiency pattern recognition track relation
482 // Weighted efficiency
483 {
484 RecoTrackId mcId = -1;
485 B2DEBUG(24, "MCTrack to highest weighted efficiency PRTrack relation");
486 for (const auto& mostWeightEfficientPRId_for_mcId : mostWeightEfficientPRId_by_mcId) {
487 ++mcId;
488 const Efficiency& weightedEfficiency = mostWeightEfficientPRId_for_mcId.weightedEfficiency;
489 const RecoTrackId& prId = mostWeightEfficientPRId_for_mcId.id;
490 B2DEBUG(24,
491 "mcId : " << mcId << " -> prId : " << prId << " with weighted efficiency "
492 << weightedEfficiency);
493 }
494 }
495
496 // Log the pattern recognition track to highest purity Monte-Carlo track relation
497 // Unweighted purity
498 {
499 RecoTrackId prId = -1;
500 B2DEBUG(24, "PRTrack to highest purity MCTrack relation");
501 for (const auto& mostPureMCId_for_prId : mostPureMCId_by_prId) {
502 ++prId;
503 const RecoTrackId& mcId = mostPureMCId_for_prId.id;
504 const Purity& purity = mostPureMCId_for_prId.purity;
505 B2DEBUG(24, "prId : " << prId << " -> mcId : " << mcId << " with purity " << purity);
506 }
507 }
508
509 // Count the categories
510 int nMatched{}, nWrongCharge{}, nBackground{}, nClones{}, nClonesWrongCharge{}, nGhost{};
511
512 // ### Classify the pattern recognition tracks ###
513 // Means saving the highest purity relation to the data store
514 // + setup the PRTrack to MCParticle relation
515 // + save the set the MatchingStatus
516 for (RecoTrackId prId = 0; prId < nPRRecoTracks; ++prId) {
517 RecoTrack* prRecoTrack = m_PRRecoTracks[prId];
518
519 const MostPureMCId& mostPureMCId = mostPureMCId_by_prId[prId];
520
521 const RecoTrackId& mcId = mostPureMCId.id;
522 const Purity& purity = mostPureMCId.purity;
523
524 // GHOST
525 if (not(purity > 0) or not(purity >= m_minimalPurity)) {
526 prRecoTrack->setMatchingStatus(RecoTrack::MatchingStatus::c_ghost);
527
528 B2DEBUG(23, "Stored PRTrack " << prId << " as ghost because of too low purity");
529 ++nGhost;
530 continue;
531 }
532
533 // BACKGROUND
534 if (mcId == mcBkgId) {
535 prRecoTrack->setMatchingStatus(RecoTrack::MatchingStatus::c_background);
536
537 B2DEBUG(23, "Stored PRTrack " << prId << " as background because of too low purity.");
538 ++nBackground;
539 continue;
540 }
541
542 // After the classification for bad purity and background we examine,
543 // whether the highest purity Monte-Carlo track has in turn the highest efficiency
544 // pattern recognition track equal to this track.
545 // All extra pattern recognition tracks are marked as clones.
546
547 RecoTrack* mcRecoTrack = m_MCRecoTracks[mcId];
548 MCParticle* mcParticle = mcRecoTrack->getRelated<MCParticle>();
549
550 B2ASSERT("No relation from MCRecoTrack to MCParticle.", mcParticle);
551
552 const MostWeightEfficientPRId& mostWeightEfficientPRId_for_mcId =
553 mostWeightEfficientPRId_by_mcId[mcId];
554
555 const RecoTrackId& mostWeightEfficientPRId = mostWeightEfficientPRId_for_mcId.id;
556 const Efficiency& weightedEfficiency = mostWeightEfficientPRId_for_mcId.weightedEfficiency;
557 // const Efficiency& efficiency = mostWeightEfficientPRId_for_mcId.efficiency;
558
559 // find the true charge and reconstructed charge
560 const short MCParticleTrackCharge = mcParticle->getCharge() > 0 ? 1 : -1;
561 short foundTrackCharge = prRecoTrack->getChargeSeed();
562 if (m_useFittedTracks) {
563 const RelationVector<Track> fittedTracks = prRecoTrack->getRelationsFrom<Track>(m_TracksStoreArrayName);
564 short nPositiveCharges = 0;
565 short nNegativeCharges = 0;
566
567
568
569 if (fittedTracks.size() > 0) {
570
571 for (const auto& fittedTrack : fittedTracks) {
572
573 // catch rare case we track long lived non-chargedStable particles (e.g. Sigma)
574 try {
575 const TrackFitResult* trackFitResult = fittedTrack.getTrackFitResultWithClosestMass(Const::ChargedStable(std::abs(
576 mcParticle->getPDG())));
577 trackFitResult->getChargeSign() > 0 ? nPositiveCharges++ : nNegativeCharges++;
578 } catch (...) {
579 const TrackFitResult* trackFitResult = fittedTrack.getTrackFitResultWithClosestMass(Const::pion);
580 trackFitResult->getChargeSign() > 0 ? nPositiveCharges++ : nNegativeCharges++;
581 }
582 }
583 }
584 if (nPositiveCharges > 0 and nNegativeCharges > 0) {
585 B2DEBUG(23,
586 "There are different charges attributed to the same track, this shouldn't happen. Continue with the majority of positive or negative charges");
587 }
588 // Only use nPositiveCharges and nNegativeCharges to assign a new value to foundTrackCharge if at least one fitted Tracks exists
589 // and at least one of the two values is > 0
590 if (fittedTracks.size() > 0 and (nPositiveCharges > 0 or nNegativeCharges > 0)) {
591 foundTrackCharge = nPositiveCharges > nNegativeCharges ? 1 : -1;
592 }
593 }
594
595 // Note : The matched category may also contain higher order clones recognisable by their low
596 // absolute efficiency
597
598 // MATCHED
599 if (prId == mostWeightEfficientPRId) {
600 if (foundTrackCharge != MCParticleTrackCharge) {
601 prRecoTrack->setMatchingStatus(RecoTrack::MatchingStatus::c_matchedWrongCharge);
602 ++nWrongCharge;
603 } else {
604 prRecoTrack->setMatchingStatus(RecoTrack::MatchingStatus::c_matched);
605 ++nMatched;
606 }
607 // Setup the relation purity relation
608 // regardless of the charge matching
609 prRecoTrack->addRelationTo(mcRecoTrack, purity);
610
611 // Add the mc matching relation
612 prRecoTrack->addRelationTo(mcParticle, purity);
613
614 B2DEBUG(23, "Stored PRTrack " << prId << " as matched.");
615 B2DEBUG(23, "MC Match prId " << prId << " to mcPartId " << mcParticle->getArrayIndex());
616 B2DEBUG(23, "Purity rel: prId " << prId << " -> mcId " << mcId << " : " << purity);
617 continue;
618 }
619
620 // GHOST
621 // Pattern recognition track fails the minimal efficiency requirement to be matched.
622 // We might want to introduce a different classification here, if we see problems
623 // with too many ghosts and want to investigate the specific source of the mismatch.
624 if (not(weightedEfficiency >= m_minimalEfficiency)) {
625 prRecoTrack->setMatchingStatus(RecoTrack::MatchingStatus::c_ghost);
626 B2DEBUG(23, "Stored PRTrack " << prId << " as ghost because of too low efficiency.");
627 ++nGhost;
628 continue;
629 }
630
631 // Final category
632 // CLONE
633 if (foundTrackCharge != MCParticleTrackCharge) {
634 prRecoTrack->setMatchingStatus(RecoTrack::MatchingStatus::c_cloneWrongCharge);
635 ++nClonesWrongCharge;
636 } else {
637 prRecoTrack->setMatchingStatus(RecoTrack::MatchingStatus::c_clone);
638 ++nClones;
639 }
640 // Setup the relation purity relation
641 // regardless whether the charge is correctly reconstructed or not
642 prRecoTrack->addRelationTo(mcRecoTrack, -purity);
643 prRecoTrack->addRelationTo(mcParticle, -purity);
644
645 // Add the mc matching relation to the mc particle
646 B2DEBUG(23, "Stored PRTrack " << prId << " as clone.");
647 B2DEBUG(23, "MC Match prId " << prId << " to mcPartId " << mcParticle->getArrayIndex());
648 B2DEBUG(23, "Purity rel: prId " << prId << " -> mcId " << mcId << " : " << -purity);
649 } // end for prId
650
651
652
653 B2DEBUG(23, "Number of matches " << nMatched);
654 B2DEBUG(23, "Number of wrongCharge " << nWrongCharge);
655 B2DEBUG(23, "Number of clones " << nClones);
656 B2DEBUG(23, "Number of clones wrongCharge " << nClonesWrongCharge);
657 B2DEBUG(23, "Number of bkg " << nBackground);
658 B2DEBUG(23, "Number of ghost " << nGhost);
659
660 // ### Classify the Monte-Carlo tracks ###
661 // Meaning save the highest weighted efficiency relation to the data store.
662 for (RecoTrackId mcId = 0; mcId < nMCRecoTracks; ++mcId) {
663 RecoTrack* mcRecoTrack = m_MCRecoTracks[mcId];
664 MCParticle* mcParticle = mcRecoTrack->getRelated<MCParticle>();
665
666 const MostWeightEfficientPRId& mostWeightEfficiencyPRId = mostWeightEfficientPRId_by_mcId[mcId];
667
668 const RecoTrackId& prId = mostWeightEfficiencyPRId.id;
669 const Efficiency& weightedEfficiency = mostWeightEfficiencyPRId.weightedEfficiency;
670 // const Efficiency& efficiency = mostWeightEfficiencyPRId.efficiency;
671
672 B2ASSERT("Index of pattern recognition tracks out of range.", prId < nPRRecoTracks and prId >= 0);
673
674 RecoTrack* prRecoTrack = m_PRRecoTracks[prId];
675
676 const MostPureMCId& mostPureMCId_for_prId = mostPureMCId_by_prId[prId];
677 const RecoTrackId& mostPureMCId = mostPureMCId_for_prId.id;
678
679 // MATCHED
680 if (mcId == mostPureMCId and
681 (prRecoTrack->getMatchingStatus() == RecoTrack::MatchingStatus::c_matched or
682 prRecoTrack->getMatchingStatus() == RecoTrack::MatchingStatus::c_matchedWrongCharge or
683 prRecoTrack->getMatchingStatus() == RecoTrack::MatchingStatus::c_clone or
684 prRecoTrack->getMatchingStatus() == RecoTrack::MatchingStatus::c_cloneWrongCharge)) {
685 // Setup the relation with positive weighted efficiency for this case.
686 mcRecoTrack->addRelationTo(prRecoTrack, weightedEfficiency);
687 mcParticle->addRelationTo(prRecoTrack, weightedEfficiency);
688 B2DEBUG(23, "Efficiency rel: mcId " << mcId << " -> prId " << prId << " : " << weightedEfficiency);
689 continue;
690 }
691
692 // MERGED
693 // This MCTrack has a significant portion of hits in a PRTrack
694 // which in turn better describes a MCTrack different form this.
695 // Setup the relation with negative weighted efficiency for this case.
696 bool isMergedMCRecoTrack =
697 (weightedEfficiency >= m_minimalEfficiency) and
698 (prRecoTrack->getMatchingStatus() == RecoTrack::MatchingStatus::c_matched or
699 prRecoTrack->getMatchingStatus() == RecoTrack::MatchingStatus::c_matchedWrongCharge or
700 prRecoTrack->getMatchingStatus() == RecoTrack::MatchingStatus::c_clone or
701 prRecoTrack->getMatchingStatus() == RecoTrack::MatchingStatus::c_cloneWrongCharge);
702
703 if (isMergedMCRecoTrack) {
704 mcRecoTrack->addRelationTo(prRecoTrack, -weightedEfficiency);
705 mcParticle->addRelationTo(prRecoTrack, -weightedEfficiency);
706 B2DEBUG(23, "Efficiency rel: mcId " << mcId << " -> prId " << prId << " : " << -weightedEfficiency);
707 continue;
708 }
709
710 // MISSING
711 // No related pattern recognition track
712 // Do not create a relation.
713 B2DEBUG(23, "mcId " << mcId << " is missing. No relation created.");
714 B2DEBUG(23, "is Primary " << m_MCRecoTracks[mcId]->getRelatedTo<MCParticle>()->isPrimaryParticle());
715 B2DEBUG(23, "best prId " << prId << " with purity " << mostPureMCId_for_prId.purity << " -> " << mostPureMCId);
716 B2DEBUG(23, "MC Total ndf " << totalNDF_by_mcId[mcId]);
717 B2DEBUG(23, "MC Total weight " << totalWeight_by_mcId[mcId]);
718 B2DEBUG(23, "MC Overlap ndf\n " << confusionMatrix.col(mcId).transpose());
719 B2DEBUG(23, "MC Overlap weight\n " << weightedConfusionMatrix.col(mcId).transpose());
720 B2DEBUG(23, "MC Efficiencies for the track\n" << efficiencyMatrix.col(mcId).transpose());
721 B2DEBUG(23, "MC Weighted efficiencies for the track\n" << weightedEfficiencyMatrix.col(mcId).transpose());
722 } // end for mcId
723
724 B2DEBUG(23, "########## End MCRecoTracksMatcherModule ############");
725
726} //end event()
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:40
unsigned short getISuperLayer() const
Getter for iSuperLayer.
Definition: CDCHit.h:184
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:589
static const ChargedStable pion
charged pion particle
Definition: Const.h:661
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
int getArrayIndex() const
Get 0-based index of the particle in the corresponding MCParticle list.
Definition: MCParticle.h:244
float getCharge() const
Return the particle charge defined in TDatabasePDG.
Definition: MCParticle.cc:36
int getPDG() const
Return PDG code of particle.
Definition: MCParticle.h:112
StoreArray< SVDCluster > m_SVDClusters
StoreArray containing SVDClusters.
int NDF
Descriptive type definition for a number of degrees of freedom.
bool m_mcParticlesPresent
Flag to indicated whether the Monte Carlo track are on the DataStore.
StoreArray< RecoTrack > m_PRRecoTracks
StoreArray containing PR RecoTracks.
StoreArray< PXDCluster > m_PXDClusters
StoreArray containing PXDClusters.
StoreArray< RecoTrack > m_MCRecoTracks
StoreArray containing MC RecoTracks.
std::map< int, NDF > m_ndf_by_detId
Map storing the standard number degrees of freedom for a single hit by detector *‍/.
StoreArray< CDCHit > m_CDCHits
StoreArray containing CDCHits.
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
void setMatchingStatus(MatchingStatus matchingStatus)
Set the matching status (used by the TrackMatcher module)
Definition: RecoTrack.h:835
MatchingStatus getMatchingStatus() const
Return the matching status set by the TrackMatcher module.
Definition: RecoTrack.h:829
short int getChargeSeed() const
Return the charge seed stored in the reco track. ATTENTION: This is not the fitted charge.
Definition: RecoTrack.h:508
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).
RelationVector< FROM > getRelationsFrom(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from another store array to this object.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
Values of the result of a track fit with a given particle hypothesis.
short getChargeSign() const
Return track charge (1 or -1).
Class that bundles various TrackFitResults.
Definition: Track.h:25

◆ exposePythonAPI()

void exposePythonAPI ( )
staticinherited

Exposes methods of the Module class to Python.

Definition at line 325 of file Module.cc.

326{
327 // to avoid confusion between std::arg and boost::python::arg we want a shorthand namespace as well
328 namespace bp = boost::python;
329
330 docstring_options options(true, true, false); //userdef, py sigs, c++ sigs
331
332 void (Module::*setReturnValueInt)(int) = &Module::setReturnValue;
333
334 enum_<Module::EAfterConditionPath>("AfterConditionPath",
335 R"(Determines execution behaviour after a conditional path has been executed:
336
337.. attribute:: END
338
339 End processing of this path after the conditional path. (this is the default for if_value() etc.)
340
341.. attribute:: CONTINUE
342
343 After the conditional path, resume execution after this module.)")
344 .value("END", Module::EAfterConditionPath::c_End)
345 .value("CONTINUE", Module::EAfterConditionPath::c_Continue)
346 ;
347
348 /* Do not change the names of >, <, ... we use them to serialize conditional pathes */
349 enum_<Belle2::ModuleCondition::EConditionOperators>("ConditionOperator")
356 ;
357
358 enum_<Module::EModulePropFlags>("ModulePropFlags",
359 R"(Flags to indicate certain low-level features of modules, see :func:`Module.set_property_flags()`, :func:`Module.has_properties()`. Most useful flags are:
360
361.. attribute:: PARALLELPROCESSINGCERTIFIED
362
363 This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)
364
365.. attribute:: HISTOGRAMMANAGER
366
367 This module is used to manage histograms accumulated by other modules
368
369.. attribute:: TERMINATEINALLPROCESSES
370
371 When using parallel processing, call this module's terminate() function in all processes. This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.
372)")
373 .value("INPUT", Module::EModulePropFlags::c_Input)
374 .value("OUTPUT", Module::EModulePropFlags::c_Output)
375 .value("PARALLELPROCESSINGCERTIFIED", Module::EModulePropFlags::c_ParallelProcessingCertified)
376 .value("HISTOGRAMMANAGER", Module::EModulePropFlags::c_HistogramManager)
377 .value("INTERNALSERIALIZER", Module::EModulePropFlags::c_InternalSerializer)
378 .value("TERMINATEINALLPROCESSES", Module::EModulePropFlags::c_TerminateInAllProcesses)
379 ;
380
381 //Python class definition
382 class_<Module, PyModule> module("Module", R"(
383Base class for Modules.
384
385A module is the smallest building block of the framework.
386A typical event processing chain consists of a Path containing
387modules. By inheriting from this base class, various types of
388modules can be created. To use a module, please refer to
389:func:`Path.add_module()`. A list of modules is available by running
390``basf2 -m`` or ``basf2 -m package``, detailed information on parameters is
391given by e.g. ``basf2 -m RootInput``.
392
393The 'Module Development' section in the manual provides detailed information
394on how to create modules, setting parameters, or using return values/conditions:
395https://xwiki.desy.de/xwiki/rest/p/f4fa4/#HModuleDevelopment
396
397)");
398 module
399 .def("__str__", &Module::getPathString)
400 .def("name", &Module::getName, return_value_policy<copy_const_reference>(),
401 "Returns the name of the module. Can be changed via :func:`set_name() <Module.set_name()>`, use :func:`type() <Module.type()>` for identifying a particular module class.")
402 .def("type", &Module::getType, return_value_policy<copy_const_reference>(),
403 "Returns the type of the module (i.e. class name minus 'Module')")
404 .def("set_name", &Module::setName, args("name"), R"(
405Set custom name, e.g. to distinguish multiple modules of the same type.
406
407>>> path.add_module('EventInfoSetter')
408>>> ro = path.add_module('RootOutput', branchNames=['EventMetaData'])
409>>> ro.set_name('RootOutput_metadata_only')
410>>> print(path)
411[EventInfoSetter -> RootOutput_metadata_only]
412
413)")
414 .def("description", &Module::getDescription, return_value_policy<copy_const_reference>(),
415 "Returns the description of this module.")
416 .def("package", &Module::getPackage, return_value_policy<copy_const_reference>(),
417 "Returns the package this module belongs to.")
418 .def("available_params", &_getParamInfoListPython,
419 "Return list of all module parameters as `ModuleParamInfo` instances")
420 .def("has_properties", &Module::hasProperties, (bp::arg("properties")),
421 R"DOCSTRING(Allows to check if the module has the given properties out of `ModulePropFlags` set.
422
423>>> if module.has_properties(ModulePropFlags.PARALLELPROCESSINGCERTIFIED):
424>>> ...
425
426Parameters:
427 properties (int): bitmask of `ModulePropFlags` to check for.
428)DOCSTRING")
429 .def("set_property_flags", &Module::setPropertyFlags, args("property_mask"),
430 "Set module properties in the form of an OR combination of `ModulePropFlags`.");
431 {
432 // python signature is too crowded, make ourselves
433 docstring_options subOptions(true, false, false); //userdef, py sigs, c++ sigs
434 module
435 .def("if_value", &Module::if_value,
436 (bp::arg("expression"), bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
437 R"DOCSTRING(if_value(expression, condition_path, after_condition_path=AfterConditionPath.END)
438
439Sets a conditional sub path which will be executed after this
440module if the return value set in the module passes the given ``expression``.
441
442Modules can define a return value (int or bool) using ``setReturnValue()``,
443which can be used in the steering file to split the Path based on this value, for example
444
445>>> module_with_condition.if_value("<1", another_path)
446
447In case the return value of the ``module_with_condition`` for a given event is
448less than 1, the execution will be diverted into ``another_path`` for this event.
449
450You could for example set a special return value if an error occurs, and divert
451the execution into a path containing :b2:mod:`RootOutput` if it is found;
452saving only the data producing/produced by the error.
453
454After a conditional path has executed, basf2 will by default stop processing
455the path for this event. This behaviour can be changed by setting the
456``after_condition_path`` argument.
457
458Parameters:
459 expression (str): Expression to determine if the conditional path should be executed.
460 This should be one of the comparison operators ``<``, ``>``, ``<=``,
461 ``>=``, ``==``, or ``!=`` followed by a numerical value for the return value
462 condition_path (Path): path to execute in case the expression is fulfilled
463 after_condition_path (AfterConditionPath): What to do once the ``condition_path`` has been executed.
464)DOCSTRING")
465 .def("if_false", &Module::if_false,
466 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
467 R"DOC(if_false(condition_path, after_condition_path=AfterConditionPath.END)
468
469Sets a conditional sub path which will be executed after this module if
470the return value of the module evaluates to False. This is equivalent to
471calling `if_value` with ``expression=\"<1\"``)DOC")
472 .def("if_true", &Module::if_true,
473 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
474 R"DOC(if_true(condition_path, after_condition_path=AfterConditionPath.END)
475
476Sets a conditional sub path which will be executed after this module if
477the return value of the module evaluates to True. It is equivalent to
478calling `if_value` with ``expression=\">=1\"``)DOC");
479 }
480 module
481 .def("has_condition", &Module::hasCondition,
482 "Return true if a conditional path has been set for this module "
483 "using `if_value`, `if_true` or `if_false`")
484 .def("get_all_condition_paths", &_getAllConditionPathsPython,
485 "Return a list of all conditional paths set for this module using "
486 "`if_value`, `if_true` or `if_false`")
487 .def("get_all_conditions", &_getAllConditionsPython,
488 "Return a list of all conditional path expressions set for this module using "
489 "`if_value`, `if_true` or `if_false`")
490 .add_property("logging", make_function(&Module::getLogConfig, return_value_policy<reference_existing_object>()),
@ c_GE
Greater or equal than: ">=".
@ c_SE
Smaller or equal than: "<=".
@ c_GT
Greater than: ">"
@ c_NE
Not equal: "!=".
@ c_EQ
Equal: "=" or "=="
@ c_ST
Smaller than: "<"
Base class for Modules.
Definition: Module.h:72
LogConfig & getLogConfig()
Returns the log system configuration.
Definition: Module.h:225
void if_value(const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
Add a condition to the module.
Definition: Module.cc:79
void if_true(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to set the condition of the module.
Definition: Module.cc:90
void setReturnValue(int value)
Sets the return value for this module as integer.
Definition: Module.cc:220
void setLogConfig(const LogConfig &logConfig)
Set the log system configuration.
Definition: Module.h:230
const std::string & getDescription() const
Returns the description of the module.
Definition: Module.h:202
void if_false(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to add a condition to the module.
Definition: Module.cc:85
bool hasCondition() const
Returns true if at least one condition was set for the module.
Definition: Module.h:311
const std::string & getPackage() const
Returns the package this module is in.
Definition: Module.h:197
void setName(const std::string &name)
Set the name of the module.
Definition: Module.h:214
bool hasProperties(unsigned int propertyFlags) const
Returns true if all specified property flags are available in this module.
Definition: Module.cc:160
std::string getPathString() const override
return the module name.
Definition: Module.cc:192

◆ getAfterConditionPath()

Module::EAfterConditionPath getAfterConditionPath ( ) const
inherited

What to do after the conditional path is finished.

(defaults to c_End if no condition is set)

Definition at line 133 of file Module.cc.

134{
135 if (m_conditions.empty()) return EAfterConditionPath::c_End;
136
137 //okay, a condition was set for this Module...
138 if (!m_hasReturnValue) {
139 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
140 }
141
142 for (const auto& condition : m_conditions) {
143 if (condition.evaluate(m_returnValue)) {
144 return condition.getAfterConditionPath();
145 }
146 }
147
148 return EAfterConditionPath::c_End;
149}

◆ getAllConditionPaths()

std::vector< std::shared_ptr< Path > > getAllConditionPaths ( ) const
inherited

Return all condition paths currently set (no matter if the condition is true or not).

Definition at line 150 of file Module.cc.

151{
152 std::vector<std::shared_ptr<Path>> allConditionPaths;
153 for (const auto& condition : m_conditions) {
154 allConditionPaths.push_back(condition.getPath());
155 }
156
157 return allConditionPaths;
158}

◆ getAllConditions()

const std::vector< ModuleCondition > & getAllConditions ( ) const
inlineinherited

Return all set conditions for this module.

Definition at line 324 of file Module.h.

325 {
326 return m_conditions;
327 }

◆ getCondition()

const ModuleCondition * getCondition ( ) const
inlineinherited

Return a pointer to the first condition (or nullptr, if none was set)

Definition at line 314 of file Module.h.

315 {
316 if (m_conditions.empty()) {
317 return nullptr;
318 } else {
319 return &m_conditions.front();
320 }
321 }

◆ getConditionPath()

std::shared_ptr< Path > getConditionPath ( ) const
inherited

Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).


Definition at line 113 of file Module.cc.

114{
115 PathPtr p;
116 if (m_conditions.empty()) return p;
117
118 //okay, a condition was set for this Module...
119 if (!m_hasReturnValue) {
120 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
121 }
122
123 for (const auto& condition : m_conditions) {
124 if (condition.evaluate(m_returnValue)) {
125 return condition.getPath();
126 }
127 }
128
129 // if none of the conditions were true, return a null pointer.
130 return p;
131}
std::shared_ptr< Path > PathPtr
Defines a pointer to a path object as a boost shared pointer.
Definition: Path.h:35

◆ getDescription()

const std::string & getDescription ( ) const
inlineinherited

Returns the description of the module.

Definition at line 202 of file Module.h.

202{return m_description;}
std::string m_description
The description of the module.
Definition: Module.h:511

◆ getFileNames()

virtual std::vector< std::string > getFileNames ( bool  outputFiles)
inlinevirtualinherited

Return a list of output filenames for this modules.

This will be called when basf2 is run with "--dry-run" if the module has set either the c_Input or c_Output properties.

If the parameter outputFiles is false (for modules with c_Input) the list of input filenames should be returned (if any). If outputFiles is true (for modules with c_Output) the list of output files should be returned (if any).

If a module has sat both properties this member is called twice, once for each property.

The module should return the actual list of requested input or produced output filenames (including handling of input/output overrides) so that the grid system can handle input/output files correctly.

This function should return the same value when called multiple times. This is especially important when taking the input/output overrides from Environment as they get consumed when obtained so the finalized list of output files should be stored for subsequent calls.

Reimplemented in RootInputModule, StorageRootOutputModule, and RootOutputModule.

Definition at line 134 of file Module.h.

135 {
136 return std::vector<std::string>();
137 }

◆ getLogConfig()

LogConfig & getLogConfig ( )
inlineinherited

Returns the log system configuration.

Definition at line 225 of file Module.h.

225{return m_logConfig;}

◆ getModules()

std::list< ModulePtr > getModules ( ) const
inlineoverrideprivatevirtualinherited

no submodules, return empty list

Implements PathElement.

Definition at line 506 of file Module.h.

506{ return std::list<ModulePtr>(); }

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns the name of the module.

This can be changed via e.g. set_name() in the steering file to give more useful names if there is more than one module of the same type.

For identifying the type of a module, using getType() (or type() in Python) is recommended.

Definition at line 187 of file Module.h.

187{return m_name;}
std::string m_name
The name of the module, saved as a string (user-modifiable)
Definition: Module.h:508

◆ getPackage()

const std::string & getPackage ( ) const
inlineinherited

Returns the package this module is in.

Definition at line 197 of file Module.h.

197{return m_package;}

◆ getParamInfoListPython()

std::shared_ptr< boost::python::list > getParamInfoListPython ( ) const
inherited

Returns a python list of all parameters.

Each item in the list consists of the name of the parameter, a string describing its type, a python list of all default values and the description of the parameter.

Returns
A python list containing the parameters of this parameter list.

Definition at line 279 of file Module.cc.

280{
282}
std::shared_ptr< boost::python::list > getParamInfoListPython() const
Returns a python list of all parameters.
ModuleParamList m_moduleParamList
List storing and managing all parameter of the module.
Definition: Module.h:516

◆ getParamList()

const ModuleParamList & getParamList ( ) const
inlineinherited

Return module param list.

Definition at line 363 of file Module.h.

363{ return m_moduleParamList; }

◆ getPathString()

std::string getPathString ( ) const
overrideprivatevirtualinherited

return the module name.

Implements PathElement.

Definition at line 192 of file Module.cc.

193{
194
195 std::string output = getName();
196
197 for (const auto& condition : m_conditions) {
198 output += condition.getString();
199 }
200
201 return output;
202}

◆ getReturnValue()

int getReturnValue ( ) const
inlineinherited

Return the return value set by this module.

This value is only meaningful if hasReturnValue() is true

Definition at line 381 of file Module.h.

381{ return m_returnValue; }

◆ getType()

const std::string & getType ( ) const
inherited

Returns the type of the module (i.e.

class name minus 'Module')

Definition at line 41 of file Module.cc.

42{
43 if (m_type.empty())
44 B2FATAL("Module type not set for " << getName());
45 return m_type;
46}
std::string m_type
The type of the module, saved as a string.
Definition: Module.h:509

◆ hasCondition()

bool hasCondition ( ) const
inlineinherited

Returns true if at least one condition was set for the module.

Definition at line 311 of file Module.h.

311{ return not m_conditions.empty(); };

◆ hasProperties()

bool hasProperties ( unsigned int  propertyFlags) const
inherited

Returns true if all specified property flags are available in this module.

Parameters
propertyFlagsOred EModulePropFlags which should be compared with the module flags.

Definition at line 160 of file Module.cc.

161{
162 return (propertyFlags & m_propertyFlags) == propertyFlags;
163}

◆ hasReturnValue()

bool hasReturnValue ( ) const
inlineinherited

Return true if this module has a valid return value set.

Definition at line 378 of file Module.h.

378{ return m_hasReturnValue; }

◆ hasUnsetForcedParams()

bool hasUnsetForcedParams ( ) const
inherited

Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.

Definition at line 166 of file Module.cc.

167{
169 std::string allMissing = "";
170 for (const auto& s : missing)
171 allMissing += s + " ";
172 if (!missing.empty())
173 B2ERROR("The following required parameters of Module '" << getName() << "' were not specified: " << allMissing <<
174 "\nPlease add them to your steering file.");
175 return !missing.empty();
176}
std::vector< std::string > getUnsetForcedParams() const
Returns list of unset parameters (if they are required to have a value.

◆ if_false()

void if_false ( const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

A simplified version to add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression "<1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is false.
afterConditionPathWhat to do after executing 'path'.

Definition at line 85 of file Module.cc.

86{
87 if_value("<1", path, afterConditionPath);
88}

◆ if_true()

void if_true ( const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

A simplified version to set the condition of the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression ">=1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 90 of file Module.cc.

91{
92 if_value(">=1", path, afterConditionPath);
93}

◆ if_value()

void if_value ( const std::string &  expression,
const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

Add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

See https://xwiki.desy.de/xwiki/rest/p/a94f2 or ModuleCondition for a description of the syntax.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

Parameters
expressionThe expression of the condition.
pathShared pointer to the Path which will be executed if the condition is evaluated to true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 79 of file Module.cc.

80{
81 m_conditions.emplace_back(expression, path, afterConditionPath);
82}

◆ initialize()

void initialize ( void  )
finalvirtual

Signal the beginning of the event processing.

Reimplemented from Module.

Definition at line 199 of file MCRecoTracksMatcherModule.cc.

200{
203
204 // Require both RecoTrack arrays and the MCParticles to be present in the DataStore
208
209 // Purity relation - for each PRTrack to store the purest MCTrack
211
212 // Efficiency relation - for each MCTrack to store the most efficient PRTrack
214
215 // MCParticle matching relation - purity
217
218 // MCParticle matching relation - efficiency
220
221 // Announce optional store arrays to the hits or clusters in case they should be used
222 // We make them optional in case of limited detector setup.
223 // PXD
224 if (m_usePXDHits) {
226 }
227
228 // SVD
229 if (m_useSVDHits) {
231 }
232
233 // CDC
234 if (m_useCDCHits) {
235 m_CDCHits.isOptional();
236 }
237 }
238}
StoreArray< MCParticle > m_MCParticles
StoreArray containing MCParticles.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Definition: StoreArray.h:140

◆ setAbortLevel()

void setAbortLevel ( int  abortLevel)
inherited

Configure the abort log level.

Definition at line 67 of file Module.cc.

68{
69 m_logConfig.setAbortLevel(static_cast<LogConfig::ELogLevel>(abortLevel));
70}
ELogLevel
Definition of the supported log levels.
Definition: LogConfig.h:26
void setAbortLevel(ELogLevel abortLevel)
Configure the abort level.
Definition: LogConfig.h:112

◆ setDebugLevel()

void setDebugLevel ( int  debugLevel)
inherited

Configure the debug messaging level.

Definition at line 61 of file Module.cc.

62{
63 m_logConfig.setDebugLevel(debugLevel);
64}
void setDebugLevel(int debugLevel)
Configure the debug messaging level.
Definition: LogConfig.h:98

◆ setDescription()

void setDescription ( const std::string &  description)
protectedinherited

Sets the description of the module.

Parameters
descriptionA description of the module.

Definition at line 214 of file Module.cc.

215{
216 m_description = description;
217}

◆ setLogConfig()

void setLogConfig ( const LogConfig logConfig)
inlineinherited

Set the log system configuration.

Definition at line 230 of file Module.h.

230{m_logConfig = logConfig;}

◆ setLogInfo()

void setLogInfo ( int  logLevel,
unsigned int  logInfo 
)
inherited

Configure the printed log information for the given level.

Parameters
logLevelThe log level (one of LogConfig::ELogLevel)
logInfoWhat kind of info should be printed? ORed combination of LogConfig::ELogInfo flags.

Definition at line 73 of file Module.cc.

74{
75 m_logConfig.setLogInfo(static_cast<LogConfig::ELogLevel>(logLevel), logInfo);
76}
void setLogInfo(ELogLevel logLevel, unsigned int logInfo)
Configure the printed log information for the given level.
Definition: LogConfig.h:127

◆ setLogLevel()

void setLogLevel ( int  logLevel)
inherited

Configure the log level.

Definition at line 55 of file Module.cc.

56{
57 m_logConfig.setLogLevel(static_cast<LogConfig::ELogLevel>(logLevel));
58}
void setLogLevel(ELogLevel logLevel)
Configure the log level.
Definition: LogConfig.cc:25

◆ setName()

void setName ( const std::string &  name)
inlineinherited

Set the name of the module.

Note
The module name is set when using the REG_MODULE macro, but the module can be renamed before calling process() using the set_name() function in your steering file.
Parameters
nameThe name of the module

Definition at line 214 of file Module.h.

214{ m_name = name; };

◆ setParamList()

void setParamList ( const ModuleParamList params)
inlineprotectedinherited

Replace existing parameter list.

Definition at line 501 of file Module.h.

501{ m_moduleParamList = params; }

◆ setParamPython()

void setParamPython ( const std::string &  name,
const boost::python::object &  pyObj 
)
privateinherited

Implements a method for setting boost::python objects.

The method supports the following types: list, dict, int, double, string, bool The conversion of the python object to the C++ type and the final storage of the parameter value is done in the ModuleParam class.

Parameters
nameThe unique name of the parameter.
pyObjThe object which should be converted and stored as the parameter value.

Definition at line 234 of file Module.cc.

235{
236 LogSystem& logSystem = LogSystem::Instance();
237 logSystem.updateModule(&(getLogConfig()), getName());
238 try {
240 } catch (std::runtime_error& e) {
241 throw std::runtime_error("Cannot set parameter '" + name + "' for module '"
242 + m_name + "': " + e.what());
243 }
244
245 logSystem.updateModule(nullptr);
246}
Class for logging debug, info and error messages.
Definition: LogSystem.h:46
void updateModule(const LogConfig *moduleLogConfig=nullptr, const std::string &moduleName="")
Sets the log configuration to the given module log configuration and sets the module name This method...
Definition: LogSystem.h:191
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition: LogSystem.cc:31
void setParamPython(const std::string &name, const PythonObject &pyObj)
Implements a method for setting boost::python objects.

◆ setParamPythonDict()

void setParamPythonDict ( const boost::python::dict &  dictionary)
privateinherited

Implements a method for reading the parameter values from a boost::python dictionary.

The key of the dictionary has to be the name of the parameter and the value has to be of one of the supported parameter types.

Parameters
dictionaryThe python dictionary from which the parameter values are read.

Definition at line 249 of file Module.cc.

250{
251
252 LogSystem& logSystem = LogSystem::Instance();
253 logSystem.updateModule(&(getLogConfig()), getName());
254
255 boost::python::list dictKeys = dictionary.keys();
256 int nKey = boost::python::len(dictKeys);
257
258 //Loop over all keys in the dictionary
259 for (int iKey = 0; iKey < nKey; ++iKey) {
260 boost::python::object currKey = dictKeys[iKey];
261 boost::python::extract<std::string> keyProxy(currKey);
262
263 if (keyProxy.check()) {
264 const boost::python::object& currValue = dictionary[currKey];
265 setParamPython(keyProxy, currValue);
266 } else {
267 B2ERROR("Setting the module parameters from a python dictionary: invalid key in dictionary!");
268 }
269 }
270
271 logSystem.updateModule(nullptr);
272}
void setParamPython(const std::string &name, const boost::python::object &pyObj)
Implements a method for setting boost::python objects.
Definition: Module.cc:234

◆ setPropertyFlags()

void setPropertyFlags ( unsigned int  propertyFlags)
inherited

Sets the flags for the module properties.

Parameters
propertyFlagsbitwise OR of EModulePropFlags

Definition at line 208 of file Module.cc.

209{
210 m_propertyFlags = propertyFlags;
211}

◆ setReturnValue() [1/2]

void setReturnValue ( bool  value)
protectedinherited

Sets the return value for this module as bool.

The bool value is saved as an integer with the convention 1 meaning true and 0 meaning false. The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 227 of file Module.cc.

228{
229 m_hasReturnValue = true;
230 m_returnValue = value;
231}

◆ setReturnValue() [2/2]

void setReturnValue ( int  value)
protectedinherited

Sets the return value for this module as integer.

The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 220 of file Module.cc.

221{
222 m_hasReturnValue = true;
223 m_returnValue = value;
224}

◆ setType()

void setType ( const std::string &  type)
protectedinherited

Set the module type.

Only for use by internal modules (which don't use the normal REG_MODULE mechanism).

Definition at line 48 of file Module.cc.

49{
50 if (!m_type.empty())
51 B2FATAL("Trying to change module type from " << m_type << " is not allowed, the value is assumed to be fixed.");
52 m_type = type;
53}

◆ terminate()

virtual void terminate ( void  )
inlinevirtualinherited

This method is called at the end of the event processing.

This method is called only once after the event processing finished. Use this method for cleaning up, closing files, etc.

This method can be implemented by subclasses.

Reimplemented in ARICHBackgroundModule, BeamabortModule, BgoModule, CaveModule, ClawModule, CLAWSModule, DosiModule, FANGSModule, He3tubeModule, MicrotpcModule, Ph1bpipeModule, Ph1sustrModule, PindiodeModule, PlumeModule, QcsmonitorModule, SrsensorModule, GetEventFromSocketModule, CalibrationCollectorModule, CosmicsAlignmentValidationModule, CurlTaggerModule, EventKinematicsModule, FlavorTaggerInfoFillerModule, LowEnergyPi0IdentificationExpertModule, LowEnergyPi0VetoExpertModule, ParticleKinematicFitterModule, ParticleLoaderModule, ParticleMassHypothesesUpdaterModule, ParticleMassUpdaterModule, ParticleMCDecayStringModule, ParticleMomentumUpdaterModule, ParticleStatsModule, ParticleWeightingLookUpCreatorModule, RemoveParticlesNotInListsModule, SkimFilterModule, TreeFitterModule, VariablesToEventBasedTreeModule, VariablesToHistogramModule, VariablesToNtupleModule, arichBtestModule, ARICHNtupleModule, arichToNtupleModule, B2BIIMCParticlesMonitorModule, B2BIIConvertMdstModule, B2BIIFixMdstModule, B2BIIMdstInputModule, BelleMCOutputModule, BeamBkgGeneratorModule, BeamBkgHitRateMonitorModule, BeamBkgMixerModule, BeamBkgTagSetterModule, BGOverlayInputModule, AnalysisPhase1StudyModule, NtuplePhase1_v6Module, ReprocessorModule, BeamabortStudyModule, BeamDigitizerModule, BgoDigitizerModule, BgoStudyModule, ClawDigitizerModule, ClawStudyModule, ClawsDigitizerModule, ClawsStudyModule, CsiDigitizer_v2Module, CsIDigitizerModule, CsiModule, CsiStudy_v2Module, CsIStudyModule, DosiDigitizerModule, DosiStudyModule, FANGSDigitizerModule, FANGSStudyModule, He3DigitizerModule, He3tubeStudyModule, MicrotpcStudyModule, TpcDigitizerModule, PinDigitizerModule, PindiodeStudyModule, PlumeDigitizerModule, QcsmonitorDigitizerModule, QcsmonitorStudyModule, CDCCosmicAnalysisModule, CDCCrossTalkAdderModule, CDCCRTestModule, CDCDigitizerModule, cdcDQM7Module, CDCDQMModule, ScanCDCGeoModule, CDCInitialT0DeterminationModule, CDCPackerModule, CDCRecoTrackFilterModule, CDCUnpackerModule, DAQPerfModule, RxSocketModule, TxSocketModule, DqmHistoManagerModule, MonitorDataModule, TrackAnaModule, Ds2SampleModule, ReceiveEventModule, HLTDQM2ZMQModule, HLTDs2ZMQModule, ElapsedTimeModule, DeSerializerModule, DeSerializerPXDModule, GenRawSendModule, Root2RawModule, SerializerModule, CertifyParallelModule, Ds2RawModule, Ds2RbufModule, EvReductionModule, FastRbuf2DsModule, Raw2DsModule, RawInputModule, Rbuf2DsModule, Rbuf2RbufModule, Ds2RawFileModule, PartialSeqRootReaderModule, SeqRootMergerModule, StorageDeserializerModule, StorageRootOutputModule, StorageSerializerModule, DisplayModule, PhysicsObjectsDQMModule, PhysicsObjectsMiraBelleBhabhaModule, PhysicsObjectsMiraBelleDst2Module, PhysicsObjectsMiraBelleDstModule, PhysicsObjectsMiraBelleHadronModule, PhysicsObjectsMiraBelleModule, ECLBackgroundModule, ECLChargedPIDModule, ECLChargedPIDDataAnalysisModule, ECLChargedPIDDataAnalysisValidationModule, ECLClusterPSDModule, ECLCompressBGOverlayModule, ECLCovarianceMatrixModule, ECLCRFinderModule, EclCovMatrixNtupleModule, ECLDataAnalysisModule, ECLDigiStudyModule, ECLDigitCalibratorModule, ECLDigitizerModule, ECLDigitizerPureCsIModule, EclDisplayModule, ECLDQMModule, ECLDQMEXTENDEDModule, ECLFillCellIdMappingModule, ECLFinalizerModule, ECLHitDebugModule, ECLLocalMaximumFinderModule, ECLLOMModule, ECLMatchingPerformanceExpertModule, ECLPackerModule, ECLShowerCorrectorModule, ECLShowerShapeModule, ECLSplitterN1Module, ECLSplitterN2Module, ECLTrackClusterMatchingModule, ECLTrackClusterMatchingParametrizationExpertModule, ECLTrackClusterMatchingPerformanceModule, ECLTRGInformationModule, ECLTrimShowersAndDigitsModule, ECLUnpackerModule, eclWaveformCalibCollectorModule, ECLWaveformFitModule, HistoModule, MergeDataStoreModule, SubEventModule, SwitchDataStoreModule, ProgressBarModule, RandomBarrierModule, HistoManagerModule, ProfileModule, RootInputModule, RootOutputModule, SeqRootInputModule, SeqRootOutputModule, AsyncWrapper, RxModule, TxModule, ZMQRxOutputModule, ZMQRxWorkerModule, ZMQTxInputModule, ZMQTxWorkerModule, AafhInputModule, BabayagaNLOInputModule, BBBremInputModule, BHWideInputModule, CRYInputModule, EvtGenDecayModule, FragmentationModule, HepMCInputModule, HepMCOutputModule, GeneratedVertexDisplacerModule, GeneratorPreselectionModule, HepevtOutputModule, OverrideGenerationFlagsModule, RemoveMCParticlesModule, KKGenInputModule, KoralWInputModule, PhokharaInputModule, TeeggInputModule, TrepsInputModule, GeometryModule, SoftwareTriggerModule, SoftwareTriggerResultPrinterModule, BKLMAnaModule, BKLMDigitAnalyzerModule, BKLMSimHistogrammerModule, BKLMTrackingModule, EKLMDataCheckerModule, KLMClusterEfficiencyModule, KLMClustersReconstructorModule, KLMDigitizerModule, KLMDQMModule, KLMDQM2Module, KLMPackerModule, KLMReconstructorModule, KLMScintillatorSimulatorModule, KLMUnpackerModule, MasterClassModule, MVAExpertModule, MVAMultipleExpertsModule, AWESOMEBasicModule, PXDBackgroundModule, PXDClustersFromTracksModule, PXDPerformanceModule, PXDSpacePointCreatorModule, CheckErrorEventModule, Convert2RawDetModule, Root2BinaryModule, CDCDedxCorrectionModule, CDCDedxDQMModule, CDCDedxPIDModule, CDCDedxScanModule, CDCDedxSkimModule, CDCDedxSkimCDSTModule, CDCDedxValidationModule, HitLevelInfoWriterModule, DataWriterModule, ECLExpertModule, KLMExpertModule, KlongValidationModule, KLMMuonIDDNNExpertModule, PIDNtupleModule, VXDDedxPIDModule, FullSimModule, FullSimTimingModule, SVDBackgroundModule, SVDChannelMappingModule, SVDHotStripFinderModule, SVDChargeSharingAnalysisModule, SVDClusterQualityEstimatorCalibrationModule, SVDClusterQualityEstimatorModule, SVDCrossTalkFinderModule, svdDumpModule, SVDPackerModule, SVDClusterEvaluationTrueInfoModule, SVDClusterFilterModule, SVDEventT0PerformanceTTreeModule, SVDMaxStripTTreeModule, SVDPerformanceTTreeModule, SVDShaperDigitsFromTracksModule, SVDCoGTimeEstimatorModule, SVDDataFormatCheckModule, SVD3SamplesEmulatorModule, SVDDigitizerModule, SVDTriggerQualityGeneratorModule, SVDSpacePointCreatorModule, SVDSpacePointQICalibrationModule, TOPAlignerModule, TOPBackgroundModule, TOPBunchFinderModule, TOPChannelT0CalibratorModule, TOPChannelT0MCModule, TOPCommonT0CalibratorModule, TOPCosmicT0FinderModule, TOPTriggerDigitizerModule, TOPDoublePulseGeneratorModule, TOPGainEfficiencyCalculatorModule, TOPLaserHitSelectorModule, TOPInterimFENtupleModule, TOPLaserCalibratorModule, TOPLLScannerModule, TOPMCTrackMakerModule, TOPModuleT0CalibratorModule, TOPNtupleModule, TOPPackerModule, TOPPDFCheckerModule, TOPRawDigitConverterModule, TOPRingPlotterModule, TOPTBCComparatorModule, TOPTimeBaseCalibratorModule, TOPUnpackerModule, TOPWaveformFeatureExtractorModule, TOPXTalkChargeShareSetterModule, ExtModule, GenfitVisModule, BeamSpotMonitorModule, KinkFinderModule, Chi2MCTrackMatcherModule, MCV0MatcherModule, MCTrackCandClassifierModule, MuidModule, ROIReadTestModule, SVDROIFinderAnalysisDataModule, SVDROIFinderAnalysisModule, SVDROIFinderModule, CurlingTrackCandSplitterModule, GFTC2SPTCConverterModule, PhaseSpaceAnalysisModule, RT2SPTCConverterModule, SpacePoint2TrueHitConnectorModule, SpacePointCreatorTestModule, SPTC2GFTCConverterModule, SPTCRefereeModule, TCConvertersTestModule, StandardTrackingPerformanceModule, TrackFilterModule, CollectorTestModule, StudyMaterialEffectsModule, EffPlotsModule, FillTrackFitNtupleModule, HitXPModule, TrackingPerformanceEvaluationModule, V0findingPerformanceEvaluationModule, TrackQETrainingDataCollectorModule, V0FinderModule, SecMapTrainerBaseModule, SecMapTrainerVXDTFModule, TrackFinderVXDAnalizerModule, VXDQETrainingDataCollectorModule, FastBDTClassifierAnalyzerModule, FastBDTClassifierTrainingModule, MLSegmentNetworkProducerModule, NoKickCutsEvalModule, SegmentNetworkAnalyzerModule, SPTC2RTConverterModule, VXDTFTrainingDataCollectorModule, FindletModule< AFindlet >, FindletModule< HitBasedT0Extractor >, FindletModule< CKFToSVDSeedFindlet >, FindletModule< CKFToSVDFindlet >, FindletModule< CosmicsTrackMergerFindlet >, FindletModule< DATCONFPGAFindlet >, FindletModule< MCVXDCDCTrackMergerFindlet >, FindletModule< vxdHoughTracking::SVDHoughTracking >, FindletModule< CKFToCDCFindlet >, FindletModule< CKFToCDCFromEclFindlet >, FindletModule< CKFToPXDFindlet >, FindletModule< AsicBackgroundLibraryCreator >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromHitsFindlet >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFromSegmentsFindlet >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderLegendre >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterPreparer >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< FacetCreator >, FindletModule< HitReclaimer >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFitter >, FindletModule< SegmentLinker >, FindletModule< SegmentOrienter >, FindletModule< SegmentPairCreator >, FindletModule< SegmentRejecter >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTripleCreator >, FindletModule< StereoHitFinder >, FindletModule< SuperClusterCreator >, FindletModule< TrackCombiner >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackExporter >, FindletModule< TrackFinderAutomaton >, FindletModule< TrackFinderCosmics >, FindletModule< TrackFinder >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackLinker >, FindletModule< TrackOrienter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityEstimator >, FindletModule< TrackRejecter >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitCreator >, FindletModule< WireHitPreparer >, CDCTriggerNeuroDQMModule, CDCTriggerNeuroDQMOnlineModule, CDCTriggerHoughETFModule, CDCTrigger2DFinderModule, CDCTriggerNDFinderModule, CDCTriggerNeuroDataModule, CDCTriggerNeuroIDHistModule, CDCTriggerTSFFirmwareModule, CDCTriggerTSFModule, TRGCDCModule, TRGCDCETFUnpackerModule, TRGCDCT2DDQMModule, TRGCDCT3DConverterModule, TRGCDCT3DDQMModule, TRGCDCT3DUnpackerModule, TRGCDCTSFDQMModule, TRGCDCTSFUnpackerModule, TRGCDCTSStreamModule, CDCTriggerUnpackerModule, MCMatcherTRGECLModule, TRGECLFAMModule, TRGECLModule, TRGECLBGTCHitModule, TRGECLDQMModule, TRGECLQAMModule, TRGECLRawdataAnalysisModule, TRGECLTimingCalModule, TRGECLUnpackerModule, TRGGDLModule, TRGEFFDQMModule, TRGGDLDQMModule, TRGGDLDSTModule, TRGGDLSummaryModule, TRGGDLUnpackerModule, TRGGRLMatchModule, TRGGRLModule, TRGGRLProjectsModule, TRGGRLDQMModule, GRLNeuroModule, GRLNeuroTrainerModule, TRGGRLUnpackerModule, KLMTriggerModule, TRGTOPDQMModule, TRGTOPTRD2TTSConverterModule, TRGTOPUnpackerModule, TRGTOPUnpackerWaveformModule, TRGTOPWaveformPlotterModule, TRGRAWDATAModule, VXDMisalignmentModule, DQMHistAnalysisARICHModule, DQMHistAnalysisARICHMonObjModule, DQMHistAnalysisCDCDedxModule, DQMHistAnalysisCDCEpicsModule, DQMHistAnalysisCDCMonObjModule, DQMHistAnalysisDAQMonObjModule, DQMHistAnalysisECLModule, DQMHistAnalysisECLConnectedRegionsModule, DQMHistAnalysisECLOutOfTimeDigitsModule, DQMHistAnalysisECLShapersModule, DQMHistAnalysisECLSummaryModule, DQMHistAnalysisEpicsExampleModule, DQMHistAnalysisEventT0EfficiencyModule, DQMHistAnalysisEventT0TriggerJitterModule, DQMHistAnalysisExampleModule, DQMHistAnalysisExampleFlagsModule, DQMHistAnalysisHLTModule, DQMHistAnalysisHLTMonObjModule, DQMHistAnalysisInput2Module, DQMHistAnalysisInputPVSrvModule, DQMHistAnalysisInputTestModule, DQMHistAnalysisKLMModule, DQMHistAnalysisMiraBelleModule, DQMHistAnalysisMonObjModule, DQMHistAnalysisOutputFileModule, DQMHistAnalysisOutputMonObjModule, DQMHistAnalysisOutputRelayMsgModule, DQMHistAnalysisPeakModule, DQMHistAnalysisPXDFitsModule, DQMHistAnalysisSVDClustersOnTrackModule, DQMHistAnalysisSVDEfficiencyModule, DQMHistAnalysisSVDGeneralModule, DQMHistAnalysisSVDOccupancyModule, DQMHistAnalysisSVDOnMiraBelleModule, DQMHistAnalysisSVDUnpackerModule, DQMHistAnalysisTOPModule, DQMHistAnalysisTrackingAbortModule, DQMHistAnalysisTRGECLModule, DQMHistAnalysisTRGEFFModule, DQMHistAnalysisTRGGDLModule, DQMHistAutoCanvasModule, DQMHistComparitorModule, DQMHistDeltaHistoModule, DQMHistReferenceModule, DQMHistSnapshotsModule, PyModule, PXDBgTupleProducerModule, PXDMCBgTupleProducerModule, PXDDQMEfficiencyNtupleModule, PXDDQMEfficiencyNtupleSelftrackModule, PXDDQMTrackRawNtupleModule, PXDPackerErrModule, PXDPackerModule, PXDReadRawBonnDAQModule, PXDReadRawBonnDAQMatchedModule, PXDReadRawONSENModule, PXDUnpackerModule, PXDUnpackerOldModule, PXDUnpackerOTModule, SVDDQMClustersOnTrackModule, SVDDQMExpressRecoModule, PXDROIFinderAnalysisModule, ROISenderModule, DQMHistAnalysisDeltaEpicsMonObjExampleModule, DQMHistAnalysisDeltaTestModule, DQMHistAnalysisPhysicsModule, DQMHistAnalysisPXDChargeModule, DQMHistAnalysisPXDCMModule, DQMHistAnalysisPXDDAQModule, DQMHistAnalysisPXDEffModule, DQMHistAnalysisPXDERModule, DQMHistAnalysisPXDInjectionModule, DQMHistAnalysisPXDReductionModule, DQMHistAnalysisPXDTrackChargeModule, DQMHistAnalysisRooFitExampleModule, DQMHistAnalysisRunNrModule, DQMHistAnalysisTRGModule, DQMHistOutputToEPICSModule, and ROIDQMModule.

Definition at line 176 of file Module.h.

176{};

Member Data Documentation

◆ m_CDCHits

StoreArray<CDCHit> m_CDCHits
private

StoreArray containing CDCHits.

Definition at line 233 of file MCRecoTracksMatcherModule.h.

◆ m_conditions

std::vector<ModuleCondition> m_conditions
privateinherited

Module condition, only non-null if set.

Definition at line 521 of file Module.h.

◆ m_description

std::string m_description
privateinherited

The description of the module.

Definition at line 511 of file Module.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 518 of file Module.h.

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 514 of file Module.h.

◆ m_MCParticles

StoreArray<MCParticle> m_MCParticles
private

StoreArray containing MCParticles.

Definition at line 228 of file MCRecoTracksMatcherModule.h.

◆ m_mcParticlesPresent

bool m_mcParticlesPresent = false
private

Flag to indicated whether the Monte Carlo track are on the DataStore.

Definition at line 236 of file MCRecoTracksMatcherModule.h.

◆ m_MCRecoTracks

StoreArray<RecoTrack> m_MCRecoTracks
private

StoreArray containing MC RecoTracks.

Definition at line 230 of file MCRecoTracksMatcherModule.h.

◆ m_mcRecoTracksStoreArrayName

std::string m_mcRecoTracksStoreArrayName
private

Parameter : Name of the RecoTracks StoreArray from MC track finding.

Definition at line 192 of file MCRecoTracksMatcherModule.h.

◆ m_minimalEfficiency

double m_minimalEfficiency
private

Parameter : Minimal efficiency for a MCTrack to be considered matchable to a PRTrack.

This number encodes which fraction of the true hits must at least be in the reconstructed track. The default 0.05 suggests that at least 5% of the true hits should have been picked up.

Definition at line 226 of file MCRecoTracksMatcherModule.h.

◆ m_minimalPurity

double m_minimalPurity
private

Parameter : Minimal purity of a PRTrack to be considered matchable to a MCTrack.

This number encodes how many correct hits are minimally need to compensate for a false hits. The default 2. / 3. suggests that for each background hit can be compensated by two correct hits.

Definition at line 218 of file MCRecoTracksMatcherModule.h.

◆ m_moduleParamList

ModuleParamList m_moduleParamList
privateinherited

List storing and managing all parameter of the module.

Definition at line 516 of file Module.h.

◆ m_name

std::string m_name
privateinherited

The name of the module, saved as a string (user-modifiable)

Definition at line 508 of file Module.h.

◆ m_ndf_by_detId

std::map<int, NDF> m_ndf_by_detId = {{Const::PXD, 2}, {Const::SVD, 1}, {Const::CDC, 1}}
private

Map storing the standard number degrees of freedom for a single hit by detector *‍/.

Definition at line 242 of file MCRecoTracksMatcherModule.h.

◆ m_package

std::string m_package
privateinherited

Package this module is found in (may be empty).

Definition at line 510 of file Module.h.

◆ m_propertyFlags

unsigned int m_propertyFlags
privateinherited

The properties of the module as bitwise or (with |) of EModulePropFlags.

Definition at line 512 of file Module.h.

◆ m_PRRecoTracks

StoreArray<RecoTrack> m_PRRecoTracks
private

StoreArray containing PR RecoTracks.

Definition at line 229 of file MCRecoTracksMatcherModule.h.

◆ m_prRecoTracksStoreArrayName

std::string m_prRecoTracksStoreArrayName
private

Parameter : Name of the RecoTracks StoreArray from pattern recognition.

Definition at line 189 of file MCRecoTracksMatcherModule.h.

◆ m_PXDClusters

StoreArray<PXDCluster> m_PXDClusters
private

StoreArray containing PXDClusters.

Definition at line 231 of file MCRecoTracksMatcherModule.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 519 of file Module.h.

◆ m_SVDClusters

StoreArray<SVDCluster> m_SVDClusters
private

StoreArray containing SVDClusters.

Definition at line 232 of file MCRecoTracksMatcherModule.h.

◆ m_TracksStoreArrayName

std::string m_TracksStoreArrayName
private

Parameter : Name of the Tracks StoreArray.

Definition at line 195 of file MCRecoTracksMatcherModule.h.

◆ m_type

std::string m_type
privateinherited

The type of the module, saved as a string.

Definition at line 509 of file Module.h.

◆ m_useCDCHits

bool m_useCDCHits
private

Parameter : Switch whether CDCHits should be used in the matching.

Definition at line 204 of file MCRecoTracksMatcherModule.h.

◆ m_useFittedTracks

bool m_useFittedTracks = true
private

Use fitted tracks for matching.

Definition at line 210 of file MCRecoTracksMatcherModule.h.

◆ m_useOnlyAxialCDCHits

bool m_useOnlyAxialCDCHits
private

Parameter : Switch whether only axial CDCHits should be used.

Definition at line 207 of file MCRecoTracksMatcherModule.h.

◆ m_usePXDHits

bool m_usePXDHits
private

Parameter : Switch whether PXDHits should be used in the matching.

Definition at line 198 of file MCRecoTracksMatcherModule.h.

◆ m_useSVDHits

bool m_useSVDHits
private

Parameter : Switch whether SVDHits should be used in the matching.

Definition at line 201 of file MCRecoTracksMatcherModule.h.


The documentation for this class was generated from the following files: