Belle II Software development
MCTrackCandClassifierModule Class Reference

The MCTrackCandClassifier Definition Module. More...

#include <MCTrackCandClassifierModule.h>

Inheritance diagram for MCTrackCandClassifierModule:
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

 MCTrackCandClassifierModule ()
 Constructor of the module.
 
void initialize () override
 Initializes the Module.
 
void beginRun () override
 Begin run.
 
void event () override
 Event function.
 
void endRun () override
 End run.
 
void terminate () override
 Termination action.
 
virtual std::vector< std::string > getFileNames (bool outputFiles)
 Return a list of output filenames for this modules.
 
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.
 

Protected Attributes

std::string m_mcTrackCandsColName
 TrackCand list name.
 
std::string m_mcParticlesName
 MCParticle list name.
 
std::string m_rootFileName
 root file name
 
int m_nSigma
 nSigma dR
 
bool m_usePXD
 Whether to use PXD.
 
bool m_applyAnnulus
 Whether to require that the hit is in the expected annulus.
 
bool m_applySemiplane
 Wether to require that the hit is in the expected semiplane.
 
bool m_applyLap
 Whether to require that the hit belongs to the first lap in the transverse plane.
 
bool m_applyWedge
 Whether to require that the hit belong to the barrel part of the SVD.
 
bool m_removeBadHits
 Whether to remove the clusters that do not satisfy the criteria from the idealMCTrackCands.
 
int m_minHit
 Minimum number of 1D Clusters to classify the MCTrackCand as ideal.
 
double m_fraction
 Fraction of lap.
 
int nWedge = 0
 Counter for hits on wedged sensors.
 
int nBarrel = 0
 Counter for hits on barrel sensors.
 
TFile * m_rootFilePtr = nullptr
 Pointer to root file used for storing histograms.
 
TList * m_histoList = nullptr
 List of histograms.
 
TH3F * m_h3_MCParticle = nullptr
 Histogram.
 
TH3F * m_h3_idealMCTrackCand = nullptr
 Histogram.
 
TH3F * m_h3_MCTrackCand = nullptr
 Histogram.
 
TH1F * m_h1_thetaMS_SVD = nullptr
 Histogram.
 
TH1F * m_h1_thetaMS_PXD = nullptr
 Histogram.
 
TH1F * m_h1_dR = nullptr
 Histogram.
 
TH1F * m_h1_dRoverR = nullptr
 Histogram.
 
TH1F * m_h1_distOVERdR = nullptr
 Histogram.
 
TH1F * m_h1_hitRadius_accepted = nullptr
 Histogram.
 
TH1F * m_h1_hitRadius_rejected = nullptr
 Histogram.
 
TH1F * m_h1_hitDistance_accepted = nullptr
 Histogram.
 
TH1F * m_h1_hitDistance_rejected = nullptr
 Histogram.
 
TH1F * m_h1_MCTrackCandNhits = nullptr
 Histogram.
 
TH1F * m_h1_firstRejectedHit = nullptr
 Histogram.
 
TH1F * m_h1_firstRejectedOVERMCHit = nullptr
 Histogram.
 
TH1F * m_h1_lapTime = nullptr
 Histogram.
 
TH1F * m_h1_timeDifference = nullptr
 Histogram.
 
TH1F * m_h1_diffOVERlap = nullptr
 Histogram.
 
TH1F * m_h1_nGoodTrueHits = nullptr
 Histogram.
 
TH1F * m_h1_nBadTrueHits = nullptr
 Histogram.
 
TH1F * m_h1_nGood1dInfo = nullptr
 Histogram.
 
TH1F * m_h1_nBad1dInfo = nullptr
 Histogram.
 

Private Member Functions

double semiPlane (ROOT::Math::XYZVector vertex, ROOT::Math::XYZVector center, ROOT::Math::XYZVector hit)
 Function to get semiplane.
 
bool isInSemiPlane (double semiPlane, double omega)
 Function to check if a omega value is in a given semiPlane.
 
double theDistance (ROOT::Math::XYZVector center, ROOT::Math::XYZVector hit)
 Get distance between two points.
 
bool isInAnnulus (double hitDistance, double R, double dR)
 Function to check if hitDistance is within a given annulus.
 
bool isFirstLap (double FirstHitTime, double HitTime, double LapTime)
 Function to check if a hitTime is within a given lapTime, under consideration of m_fraction and with respect to first hit.
 
TH3F * createHistogram3D (const char *name, const char *title, Int_t nbinsX, Double_t minX, Double_t maxX, const char *titleX, Int_t nbinsY, Double_t minY, Double_t maxY, const char *titleY, Int_t nbinsZ, Double_t minZ, Double_t maxZ, const char *titleZ, TList *histoList=nullptr)
 Create a 3D ROOT Histogram.
 
TH3F * createHistogram3D (const char *name, const char *title, Int_t nbinsX, Double_t *binsX, const char *titleX, Int_t nbinsY, Double_t *binsY, const char *titleY, Int_t nbinsZ, Double_t *binsZ, const char *titleZ, TList *histoList=nullptr)
 Create a 3D ROOT Histogram.
 
TH1 * duplicateHistogram (const char *newname, const char *newtitle, TH1 *h, TList *histoList=nullptr)
 Function to clone a histogram.
 
TH1F * createHistogramsRatio (const char *name, const char *title, TH1 *hNum, TH1 *hDen, bool isEffPlot, int axisRef)
 Function to create a ratio histogram from two histograms.
 
void addEfficiencyPlots (TList *graphList=nullptr)
 Function to create efficiency plots and add them to list.
 
void addInefficiencyPlots (TList *graphList=nullptr)
 Function to create inefficiency plots and add them to list.
 
float compute_dR (double thetaMS, double omega)
 Calculate dR.
 
float compute_thetaMS (MCParticleInfo &mcParticleInfo, VXDTrueHit *aTrueHit)
 Calculate thetaMS.
 
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

StoreArray< PXDClusterm_PXDClusters
 PXDClusters StoreArray.
 
StoreArray< SVDClusterm_SVDClusters
 SVDClusters StoreArray.
 
StoreArray< MCParticlem_MCParticles
 MCParticles StoreArray.
 
StoreArray< genfit::TrackCand > m_GenfitMCTrackCands
 MC Genfit TrackCands StoreArray.
 
StoreArray< genfit::TrackCand > m_GenfitIdealMCTrackCands
 Ideal Genfit TrackCands StoreArray.
 
ROOT::Math::XYZVector m_magField
 magnetic field needed set particle info
 
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

The MCTrackCandClassifier Definition Module.

this module classifies the MCTrackCands in

  • idealMCTrackCands: MCTrackCand
  • fineMCTrackCands (not produced yet)
  • nastyMCTrackCands (not produced yet) on the basis of their properties in order to study the inefficiencies of the pattern recognition and the fitter

Definition at line 42 of file MCTrackCandClassifierModule.h.

Member Typedef Documentation

◆ EAfterConditionPath

Forward the EAfterConditionPath definition from the ModuleCondition.

Definition at line 88 of file Module.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

◆ MCTrackCandClassifierModule()

Constructor of the module.

Implementation.

Definition at line 26 of file MCTrackCandClassifierModule.cc.

26 : Module()
27 , m_rootFilePtr(nullptr)
28{
29 //Set module properties
30 setDescription("This module is meant to classify the MCTrackCands as either ideal, fine and nasty");
32
33 addParam("MCParticlesName", m_mcParticlesName,
34 "Name of MC Particle collection.",
35 std::string(""));
36
37 addParam("MCTrackCandCollName", m_mcTrackCandsColName,
38 "Name of the input collection of MC track candidates",
39 std::string(""));
40
41 addParam("rootFileName", m_rootFileName,
42 "Name of the root file",
43 std::string("MCTrackCandClassifier.root"));
44
45 addParam("isInAnnulusCriterium", m_applyAnnulus,
46 "Require that the hit is in the expected annulus",
47 bool(true));
48 addParam("isInSemiplaneCriterium", m_applySemiplane,
49 "Require that the hit is in the expected semiplane",
50 bool(true));
51 addParam("isInFirstLapCriterium", m_applyLap,
52 "Require that the hit belong to the first lap in the transverse plane",
53 bool(true));
54 addParam("isInWedgePartCriterium", m_applyWedge,
55 "Require that the hit belong to the barrel part of the SVD",
56 bool(true));
57 addParam("removeBadHits", m_removeBadHits,
58 "Remove the clusters that do not satisfy the criteria from the idealMCTrackCands",
59 bool(true));
60
61 addParam("minNhits", m_minHit,
62 "Minimum number of 1D Clusters to classify the MCTrackCand as ideal",
63 int(5));
64
65 addParam("nSigma_dR", m_nSigma, "n sigma dR", int(3));
66
67 addParam("lapFraction", m_fraction, "Fraction of lap", double(1));
68
69 addParam("usePXD", m_usePXD, "Use the PXD or not", bool(true));
70}
bool m_applySemiplane
Wether to require that the hit is in the expected semiplane.
bool m_applyWedge
Whether to require that the hit belong to the barrel part of the SVD.
std::string m_mcParticlesName
MCParticle list name.
bool m_applyLap
Whether to require that the hit belongs to the first lap in the transverse plane.
TFile * m_rootFilePtr
Pointer to root file used for storing histograms.
bool m_applyAnnulus
Whether to require that the hit is in the expected annulus.
std::string m_mcTrackCandsColName
TrackCand list name.
bool m_removeBadHits
Whether to remove the clusters that do not satisfy the criteria from the idealMCTrackCands.
int m_minHit
Minimum number of 1D Clusters to classify the MCTrackCand as ideal.
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

◆ addEfficiencyPlots()

void addEfficiencyPlots ( TList *  graphList = nullptr)
private

Function to create efficiency plots and add them to list.

Parameters
graphListpointer to list to add the plots to

Definition at line 655 of file MCTrackCandClassifierModule.cc.

656{
657 //normalized to MCTrackCands
658 TH1F* h_effMCTC_pt = createHistogramsRatio("heffMCTCpt", "fraction of idealMCTrackCand VS pt", m_h3_idealMCTrackCand,
659 m_h3_MCTrackCand, true, 0);
660 histoList->Add(h_effMCTC_pt);
661
662 TH1F* h_effMCTC_theta = createHistogramsRatio("heffMCTCtheta", "fraction of idealMCTrackCandVS #lambda", m_h3_idealMCTrackCand,
663 m_h3_MCTrackCand, true, 1);
664 histoList->Add(h_effMCTC_theta);
665
666 TH1F* h_effMCTC_phi = createHistogramsRatio("heffMCTCphi", "fraction of idealMCTrackCand VS #phi", m_h3_idealMCTrackCand,
667 m_h3_MCTrackCand, true, 2);
668 histoList->Add(h_effMCTC_phi);
669}
TH1F * createHistogramsRatio(const char *name, const char *title, TH1 *hNum, TH1 *hDen, bool isEffPlot, int axisRef)
Function to create a ratio histogram from two histograms.

◆ addInefficiencyPlots()

void addInefficiencyPlots ( TList *  graphList = nullptr)
private

Function to create inefficiency plots and add them to list.

Parameters
graphListpointer to list to add the plots to

Definition at line 672 of file MCTrackCandClassifierModule.cc.

673{
674 //normalized to MCTrackCands
675 TH1F* h_ineffMCTC_pt = createHistogramsRatio("hineffMCTCpt", "1 - fraction of idealMCTrackCand VS pt", m_h3_idealMCTrackCand,
676 m_h3_MCTrackCand, false, 0);
677 histoList->Add(h_ineffMCTC_pt);
678
679 TH1F* h_ineffMCTC_theta = createHistogramsRatio("hineffMCTCtheta", "1 - fraction of idealMCTrackCandVS #lambda",
681 histoList->Add(h_ineffMCTC_theta);
682
683 TH1F* h_ineffMCTC_phi = createHistogramsRatio("hineffMCTCphi", "1 - fraction of idealMCTrackCand VS #phi", m_h3_idealMCTrackCand,
684 m_h3_MCTrackCand, false, 2);
685 histoList->Add(h_ineffMCTC_phi);
686}

◆ beginRun()

void beginRun ( void  )
overridevirtual

Begin run.

Reimplemented from Module.

Definition at line 192 of file MCTrackCandClassifierModule.cc.

193{
194 nWedge = 0;
195 nBarrel = 0;
196
198}
ROOT::Math::XYZVector m_magField
magnetic field needed set particle info
int nWedge
Counter for hits on wedged sensors.
int nBarrel
Counter for hits on barrel sensors.
static const double T
[tesla]
Definition: Unit.h:120
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Definition: BFieldManager.h:91

◆ 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

◆ compute_dR()

float compute_dR ( double  thetaMS,
double  omega 
)
private

Calculate dR.

Parameters
thetaMSthetaMS of a hit
omegaomega value
Returns
dR value

Definition at line 795 of file MCTrackCandClassifierModule.cc.

796{
797 double dL;
798 if (hitDistance < 1.8) //L1
799 dL = 0.4;
800 else if (hitDistance < 3) //L2
801 dL = 0.8;
802 else if (hitDistance < 5) //L3
803 dL = 1.6;
804 else if (hitDistance < 9) //L4
805 dL = 4.2;
806 else if (hitDistance < 12) //L5
807 dL = 2.4;
808 else dL = 3.1;
809
810 if ((hitDistance < 3) && (hitDistance > 1.2))
811 thetaMS = thetaMS / 2;
812
813 double dR = m_nSigma * dL * thetaMS;
814
815 return dR;
816};

◆ compute_thetaMS()

float compute_thetaMS ( MCParticleInfo mcParticleInfo,
VXDTrueHit aTrueHit 
)
private

Calculate thetaMS.

Parameters
mcParticleInfomcParticleInfo object
aTrueHitpointer to vxd ture hit
Returns
thetaMS value

Definition at line 819 of file MCTrackCandClassifierModule.cc.

820{
821 // double thetaMS = 0.0136 * 14 * sqrt(0.008); //SVD, PXD is half of it
822 double thetaMS = 0.0136 * 14; //SVD, PXD is half of it
823
824 double p = mcParticleInfo.getP();
825 // double pt = mcParticleInfo.getPt();
826 double E = mcParticleInfo.getEnergy();
827
828 double X = sqrt(pow(aTrueHit->getEntryU() - aTrueHit->getExitU(), 2) +
829 pow(aTrueHit->getEntryV() - aTrueHit->getExitV(), 2) +
830 pow(aTrueHit->getEntryW() - aTrueHit->getExitW(), 2));
831
832 double X0 = 21.82; // g cm-2
833 double rho = 2.329; // g cm-3
834 thetaMS = thetaMS / (p * p / E) * sqrt(X / X0 * rho);
835
836 return thetaMS;
837};
R E
internal precision of FFTW codelets
double getEnergy()
Getter for energy.
double getP()
Getter for magnitut of momentum.
float getEntryU() const
Return local u coordinate of hit when entering silicon.
Definition: VXDTrueHit.h:80
float getExitW() const
Return local w coordinate of hit at the endpoint of the track.
Definition: VXDTrueHit.h:90
float getEntryW() const
Return local w coordinate of the start point of the track.
Definition: VXDTrueHit.h:84
float getExitU() const
Return local u coordinate of hit at the endpoint of the track.
Definition: VXDTrueHit.h:86
float getExitV() const
Return local v coordinate of hit at the endpoint of the track.
Definition: VXDTrueHit.h:88
float getEntryV() const
Return local v coordinate of the start point of the track.
Definition: VXDTrueHit.h:82
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

◆ createHistogram3D() [1/2]

TH3F * createHistogram3D ( const char *  name,
const char *  title,
Int_t  nbinsX,
Double_t *  binsX,
const char *  titleX,
Int_t  nbinsY,
Double_t *  binsY,
const char *  titleY,
Int_t  nbinsZ,
Double_t *  binsZ,
const char *  titleZ,
TList *  histoList = nullptr 
)
private

Create a 3D ROOT Histogram.

Parameters
namename of histogram
titletitle of histogram
nbinsXnumber of bins on x axis
binsXx bins
titleXx axis title
nbinsYnumber of bins on y axis
binsYy bins
titleYy axis title
nbinsZnumber of bins on z axis
binsZz bins
titleZz axis title
histoListlist of histograms to add this histogram to
Returns
the histogram

Definition at line 601 of file MCTrackCandClassifierModule.cc.

609{
610 TH3F* h = new TH3F(name, title, nbinsX, binsX, nbinsY, binsY, nbinsZ, binsZ);
611
612 h->GetXaxis()->SetTitle(titleX);
613 h->GetYaxis()->SetTitle(titleY);
614 h->GetZaxis()->SetTitle(titleZ);
615
616 if (histoList)
617 histoList->Add(h);
618
619 return h;
620}

◆ createHistogram3D() [2/2]

TH3F * createHistogram3D ( const char *  name,
const char *  title,
Int_t  nbinsX,
Double_t  minX,
Double_t  maxX,
const char *  titleX,
Int_t  nbinsY,
Double_t  minY,
Double_t  maxY,
const char *  titleY,
Int_t  nbinsZ,
Double_t  minZ,
Double_t  maxZ,
const char *  titleZ,
TList *  histoList = nullptr 
)
private

Create a 3D ROOT Histogram.

Parameters
namename of histogram
titletitle of histogram
nbinsXnumber of bins on x axis
minXminimal x value
maxXmaximal x value
titleXx axis title
nbinsYnumber of bins on y axis
minYminimal y value
maxYmaximal y value
titleYy axis title
nbinsZnumber of bins on z axis
minZminimal z value
maxZmaximal z value
titleZz axis title
histoListlist of histograms to add this histogram to
Returns
the histogram

Definition at line 579 of file MCTrackCandClassifierModule.cc.

587{
588 TH3F* h = new TH3F(name, title, nbinsX, minX, maxX, nbinsY, minY, maxY, nbinsZ, minZ, maxZ);
589
590 h->GetXaxis()->SetTitle(titleX);
591 h->GetYaxis()->SetTitle(titleY);
592 h->GetZaxis()->SetTitle(titleZ);
593
594 if (histoList)
595 histoList->Add(h);
596
597 return h;
598}

◆ createHistogramsRatio()

TH1F * createHistogramsRatio ( const char *  name,
const char *  title,
TH1 *  hNum,
TH1 *  hDen,
bool  isEffPlot,
int  axisRef 
)
private

Function to create a ratio histogram from two histograms.

Parameters
namename of histogram
titletitle of histogram
hNumhistogram for the numerator of the ratio
hDenhistogram for the denominator of the ratio
isEffPlotif the result is a efficiency plot
axisRefreference axis to use. (x=0, y=1, z=2)
Returns
the histogram

Definition at line 689 of file MCTrackCandClassifierModule.cc.

692{
693 TH1F* h1den = dynamic_cast<TH1F*>(hDen);
694 TH1F* h1num = dynamic_cast<TH1F*>(hNum);
695 TH2F* h2den = dynamic_cast<TH2F*>(hDen);
696 TH2F* h2num = dynamic_cast<TH2F*>(hNum);
697 TH3F* h3den = dynamic_cast<TH3F*>(hDen);
698 TH3F* h3num = dynamic_cast<TH3F*>(hNum);
699
700 TH1* hden = nullptr;
701 TH1* hnum = nullptr;
702
703 if (h1den) {
704 hden = new TH1F(*h1den);
705 hnum = new TH1F(*h1num);
706 }
707 if (h2den) {
708 hden = new TH2F(*h2den);
709 hnum = new TH2F(*h2num);
710 }
711 if (h3den) {
712 hden = new TH3F(*h3den);
713 hnum = new TH3F(*h3num);
714 }
715
716 if (hden == nullptr or hnum == nullptr) {
717 B2ERROR("In function createHistogramsRatio: either hden or hnum are a nullptr. This shouldn't happen."\
718 "Don't continue creatio of histogram ratios in this case and return nullptr.");
719 return nullptr;
720 }
721
722 TAxis* the_axis;
723 TAxis* the_other1;
724 TAxis* the_other2;
725
726 if (axisRef == 0) {
727 the_axis = hden->GetXaxis();
728 the_other1 = hden->GetYaxis();
729 the_other2 = hden->GetZaxis();
730 } else if (axisRef == 1) {
731 the_axis = hden->GetYaxis();
732 the_other1 = hden->GetXaxis();
733 the_other2 = hden->GetZaxis();
734 } else if (axisRef == 2) {
735 the_axis = hden->GetZaxis();
736 the_other1 = hden->GetXaxis();
737 the_other2 = hden->GetYaxis();
738 } else
739 return nullptr;
740
741
742 TH1F* h;
743 if (the_axis->GetXbins()->GetSize())
744 h = new TH1F(name, title, the_axis->GetNbins(), (the_axis->GetXbins())->GetArray());
745 else
746 h = new TH1F(name, title, the_axis->GetNbins(), the_axis->GetXmin(), the_axis->GetXmax());
747 h->GetXaxis()->SetTitle(the_axis->GetTitle());
748
749 h->GetYaxis()->SetRangeUser(0.00001, 1);
750
751 Int_t bin = 0;
752
753 for (int the_bin = 1; the_bin < the_axis->GetNbins() + 1; the_bin++) {
754
755 double num = 0;
756 double den = 0 ;
757
758 for (int other1_bin = 1; other1_bin < the_other1->GetNbins() + 1; other1_bin++)
759 for (int other2_bin = 1; other2_bin < the_other2->GetNbins() + 1; other2_bin++) {
760
761 if (axisRef == 0) bin = hden->GetBin(the_bin, other1_bin, other2_bin);
762 else if (axisRef == 1) bin = hden->GetBin(other1_bin, the_bin, other2_bin);
763 else if (axisRef == 2) bin = hden->GetBin(other1_bin, other2_bin, the_bin);
764
765 if (hden->IsBinUnderflow(bin))
766 B2DEBUG(21, " bin = " << bin << "(" << the_bin << "," << other1_bin << "," << other2_bin << "), UNDERFLOW");
767 if (hden->IsBinOverflow(bin))
768 B2DEBUG(21, " bin = " << bin << "(" << the_bin << "," << other1_bin << "," << other2_bin << "), OVERFLOW");
769
770 num += hnum->GetBinContent(bin);
771 den += hden->GetBinContent(bin);
772 }
773 double eff = 0;
774 double err = 0;
775
776 if (den > 0) {
777 eff = (double)num / den;
778 err = sqrt(eff * (1 - eff)) / sqrt(den);
779 }
780
781 if (isEffPlot) {
782 h->SetBinContent(the_bin, eff);
783 h->SetBinError(the_bin, err);
784 } else {
785 h->SetBinContent(the_bin, 1 - eff);
786 h->SetBinError(the_bin, err);
787 }
788
789 }
790
791 return h;
792}

◆ 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

◆ duplicateHistogram()

TH1 * duplicateHistogram ( const char *  newname,
const char *  newtitle,
TH1 *  h,
TList *  histoList = nullptr 
)
private

Function to clone a histogram.

Parameters
newnamenew histogram name
newtitlenew title
hhistogram to clone
histoListlist of histograms to add this histogram to
Returns
the duplicated histogram

Definition at line 623 of file MCTrackCandClassifierModule.cc.

625{
626 TH1F* h1 = dynamic_cast<TH1F*>(h);
627 TH2F* h2 = dynamic_cast<TH2F*>(h);
628 TH3F* h3 = dynamic_cast<TH3F*>(h);
629
630 TH1* newh = nullptr;
631
632 if (h1)
633 newh = new TH1F(*h1);
634 if (h2)
635 newh = new TH2F(*h2);
636 if (h3)
637 newh = new TH3F(*h3);
638
639 if (newh == nullptr) {
640 B2ERROR("In function duplicateHistogram: newh is a nullptr. This shouldn't happen."\
641 "Don't continue creation of duplicate histogram in this case and return nullptr.");
642 return nullptr;
643 }
644
645 newh->SetName(newname);
646 newh->SetTitle(newtitle);
647
648 if (histoList)
649 histoList->Add(newh);
650
651 return newh;
652}

◆ endRun()

void endRun ( void  )
overridevirtual

End run.

Reimplemented from Module.

Definition at line 444 of file MCTrackCandClassifierModule.cc.

445{
446 B2INFO("** MCTrackCandClassifier parameters **");
447 B2INFO("rootfilename = " << m_rootFileName);
448 B2INFO("use PXD informations = " << m_usePXD);
449 B2INFO("--> classification criteria:");
450 if (m_applyAnnulus)
451 B2INFO(" -) |d - R| < " << m_nSigma << " dL thetaMS");
453 B2INFO(" -) hit in the expected semiplane");
454 if (m_applyLap)
455 B2INFO(" -) HitTime < " << m_fraction << " lap time");
456 if (m_applyWedge)
457 B2INFO(" -) hit must be in the barrel part of the VXD");
458 B2INFO("");
459
460 double num = 0;
461 double den = 0;
462
463 num = m_h3_idealMCTrackCand->GetEntries();
464 den = m_h3_MCTrackCand->GetEntries();
465 double efficiency = num / den ;
466 double efficiencyErr = sqrt(efficiency * (1 - efficiency)) / sqrt(den);
467
468 B2INFO("");
469 B2INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
470 B2INFO("~ MCTrackCandClassifier ~ SHORT SUMMARY ~");
471 B2INFO("");
472 B2INFO(" + overall:");
473 B2INFO(" fraction of ideal MCTrackCands = (" << efficiency * 100 << " +/- " << efficiencyErr * 100 << ")% ");
474 B2INFO("");
475 B2INFO(" # idealMCTrackCand = " << num);
476 B2INFO(" # MCTrackCand = " << den);
477 B2INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
478 B2INFO("");
479 B2DEBUG(21, " nWedge = " << nWedge);
480 B2DEBUG(21, " nBarrel = " << nBarrel);
481}

◆ 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  )
overridevirtual

Event function.

Reimplemented from Module.

Definition at line 201 of file MCTrackCandClassifierModule.cc.

202{
203 B2DEBUG(21, "+++++ 1. loop on MCTrackCands");
204
205 const VXD::GeoCache& aGeometry = VXD::GeoCache::getInstance();
206
207 //1.a retrieve the MCTrackCands
208 for (const genfit::TrackCand& mcTrackCand : m_GenfitMCTrackCands) {
209
210 int nGoodTrueHits = 0;
211 int nGood1Dinfo = 0;
212
213 B2DEBUG(21, " a NEW MCTrackCand ");
214
215 //1.b retrieve the MCParticle
216 RelationVector<MCParticle> MCParticles_fromMCTrackCand = DataStore::getRelationsWithObj<MCParticle>(&mcTrackCand);
217
218 B2DEBUG(21, "~~~ " << MCParticles_fromMCTrackCand.size() << " MCParticles related to this MCTrackCand");
219 for (int mcp = 0; mcp < (int)MCParticles_fromMCTrackCand.size(); mcp++) { //should be ONE
220
221 MCParticle mcParticle = *MCParticles_fromMCTrackCand[mcp];
222
223 B2DEBUG(21, " a NEW charged MC Particle, " << mcParticle.getIndex() << ", " << mcParticle.getPDG());
224
225 MCParticleInfo mcParticleInfo(mcParticle, m_magField);
226
227 B2Vector3D decayVertex = mcParticle.getProductionVertex();
228 ROOT::Math::XYZVector mom = mcParticle.getMomentum();
229 double charge = mcParticle.getCharge();
230 double omega = mcParticleInfo.getOmega();
231 double px = mom.x();
232 double py = mom.y();
233 double pt = mom.Rho();
234 double x = decayVertex.X();
235 double y = decayVertex.Y();
236 double R = 1 / abs(omega); //cm
237
238 m_h3_MCTrackCand->Fill(mcParticleInfo.getPt(), mcParticleInfo.getLambda(), mcParticleInfo.getPphi());
239
240 double alpha = R / pt * charge; //cm/GeV
241 double Cx = x + alpha * py; //cm
242 double Cy = y - alpha * px; //cm
243
244 ROOT::Math::XYZVector center(Cx, Cy, 0);
245
246 //recover Clusters and loop on them
247 int Nhits = mcTrackCand.getNHits();
248 m_h1_MCTrackCandNhits->Fill(Nhits);
249
250 int cluster = 0;
251 bool hasTrueHit = true;
252 bool isAccepted = true;
253 int firstRejectedHit = Nhits + 1;
254 double prevHitRadius = abs(1 / omega);
255
256 double lapTime = 2 * M_PI * mcParticle.getEnergy() / 0.299792 / m_magField.Z();
257 double FirstHitTime = -1;
258 double HitTime = -1;
259
260 bool isFirstSVDhit = true;
261
262 while (cluster < Nhits && isAccepted && hasTrueHit) {
263 int detId, hitId;
264 mcTrackCand.getHit(cluster, detId, hitId);
265
266 bool hasPXDCluster = false;
267 bool hasSVDuCluster = false;
268 bool hasSVDvCluster = false;
269
270 double uCoor = 0;
271 double vCoor = 0;
272 VxdID sensor = 0;
273
274 double thetaMS = 0;
275
276 if (detId == Const::PXD && m_usePXD) {
277
278 PXDCluster* aPXDCluster = m_PXDClusters[hitId];
279 RelationVector<PXDTrueHit> PXDTrueHit_fromPXDCluster = aPXDCluster->getRelationsWith<PXDTrueHit>();
280 if (PXDTrueHit_fromPXDCluster.size() == 0) {
281 B2WARNING("What's happening?!? no True Hit associated to the PXD Cluster");
282 hasTrueHit = false;
283 isAccepted = false;
284 continue;
285 }
286
287 PXDTrueHit* aPXDTrueHit = PXDTrueHit_fromPXDCluster[0];
288 thetaMS = compute_thetaMS(mcParticleInfo, aPXDTrueHit);
289 m_h1_thetaMS_PXD->Fill(thetaMS / 2 * 1000); //PXD
290
291 uCoor = aPXDTrueHit->getU();
292 vCoor = aPXDTrueHit->getV();
293 sensor = aPXDTrueHit->getSensorID();
294 if (cluster == 0) {
295 FirstHitTime = aPXDTrueHit->getGlobalTime();
296 HitTime = FirstHitTime;
297 } else
298 HitTime = aPXDTrueHit->getGlobalTime();
299
300 hasPXDCluster = true;
301 } else if (detId == Const::SVD) {
302 SVDCluster* aSVDCluster = m_SVDClusters[hitId];
303 RelationVector<SVDTrueHit> SVDTrueHit_fromSVDCluster = aSVDCluster->getRelationsWith<SVDTrueHit>();
304 if (SVDTrueHit_fromSVDCluster.size() == 0) {
305 B2WARNING("What's happening?!? no True Hit associated to the SVD Cluster");
306 hasTrueHit = false;
307 isAccepted = false;
308 continue;
309 }
310
311 SVDTrueHit* aSVDTrueHit = SVDTrueHit_fromSVDCluster[0];
312
313 thetaMS = compute_thetaMS(mcParticleInfo, aSVDTrueHit);
314 m_h1_thetaMS_SVD->Fill(thetaMS * 1000); //SVD
315
316 uCoor = aSVDTrueHit->getU();
317 vCoor = aSVDTrueHit->getV();
318 sensor = aSVDTrueHit->getSensorID();
319 if (isFirstSVDhit) {
320 FirstHitTime = aSVDTrueHit->getGlobalTime();
321 HitTime = FirstHitTime;
322 isFirstSVDhit = false;
323
324 } else
325 HitTime = aSVDTrueHit->getGlobalTime();
326 if (aSVDCluster->isUCluster())
327 hasSVDuCluster = true;
328 else
329 hasSVDvCluster = true;
330 } else {
331 cluster++;
332 continue;
333 }
334
335 const VXD::SensorInfoBase& aSensorInfo = aGeometry.getSensorInfo(sensor);
336 bool accepted4 = true;
337 if (m_applyWedge) {
338 if (aSensorInfo.getForwardWidth() != aSensorInfo.getBackwardWidth()) {
339 nWedge++;
340 accepted4 = false;
341 } else
342 nBarrel++;
343 }
344
345 ROOT::Math::XYZVector globalHit = aSensorInfo.pointToGlobal(ROOT::Math::XYZVector(uCoor, vCoor, 0), true);
346 double hitRadius = theDistance(center, globalHit);
347
348 bool accepted1 = true;
350 accepted1 = isInSemiPlane(semiPlane(decayVertex, center, globalHit), omega);
351
352 if (accepted1) {
353 B2DEBUG(21, " semiplane: ACCEPTED");
354 } else {
355 B2DEBUG(21, " semiplane: REJECTED, next track");
356 }
357
358 double dR = compute_dR(thetaMS, theDistance(ROOT::Math::XYZVector(0, 0, 0), globalHit));
359 m_h1_dR->Fill(dR);
360 m_h1_dRoverR->Fill(dR * abs(omega));
361 m_h1_distOVERdR->Fill((hitRadius - abs(1 / omega)) / dR);
362
363
364 bool accepted2 = true;
365 if (m_applyAnnulus)
366 accepted2 = isInAnnulus(hitRadius, prevHitRadius, dR);
367
368 prevHitRadius = hitRadius;
369
370 if (accepted2) {
371 B2DEBUG(21, " annulus: ACCEPTED");
372 } else {
373 B2DEBUG(21, " annulus: REJECTED, next track");
374 }
375
376 bool accepted3 = true;
377 if (m_applyLap)
378 accepted3 = isFirstLap(FirstHitTime, HitTime, lapTime);
379
380 if (accepted3) {
381 B2DEBUG(21, " lapTime: ACCEPTED");
382 } else {
383 B2DEBUG(21, " lapTime: REJECTED, next track");
384 }
385
386 if (accepted2 && accepted1 && accepted3 && accepted4) {
387 nGoodTrueHits ++;
388 m_h1_hitDistance_accepted->Fill(theDistance(ROOT::Math::XYZVector(0, 0, 0), globalHit));
389 m_h1_hitRadius_accepted->Fill(hitRadius);
390 } else {
391 m_h1_hitDistance_rejected->Fill(theDistance(ROOT::Math::XYZVector(0, 0, 0), globalHit));
392 m_h1_hitRadius_rejected->Fill(hitRadius);
393 if (m_removeBadHits)
394 firstRejectedHit = cluster;
395 isAccepted = false;
396 continue;
397 }
398
399 if (hasPXDCluster)
400 nGood1Dinfo = +2;
401 else {
402 if (hasSVDuCluster)
403 nGood1Dinfo++;
404 if (hasSVDvCluster)
405 nGood1Dinfo++;
406 }
407 if (hasPXDCluster || hasSVDuCluster || hasSVDvCluster)
408 B2DEBUG(21, "cluster: ACCEPTED (" << nGood1Dinfo << ")");
409
410 cluster++;
411 }//close loop on clusters
412
413 if (nGood1Dinfo >= m_minHit) {
414 B2DEBUG(21, " idealMCTrackCand FOUND!! " << nGood1Dinfo << " 1D infos (" << nGoodTrueHits << " good true hits)");
415 m_h3_idealMCTrackCand->Fill(mcParticleInfo.getPt(), mcParticleInfo.getLambda(), mcParticleInfo.getPphi());
416 m_h1_nGoodTrueHits->Fill(nGoodTrueHits);
417 m_h1_nGood1dInfo->Fill(nGood1Dinfo);
418
419 genfit::TrackCand* tmpTrackCand = new genfit::TrackCand(mcTrackCand);
420
421 if ((int)firstRejectedHit <= (int)mcTrackCand.getNHits()) {
422 tmpTrackCand->reset();
423 for (int hit = 0; hit < firstRejectedHit; hit++)
424 if (mcTrackCand.getHit(hit))
425 tmpTrackCand->addHit(mcTrackCand.getHit(hit));
426 tmpTrackCand->sortHits();
427 }
429
430 m_h1_firstRejectedHit->Fill(tmpTrackCand->getNHits());
431 m_h1_firstRejectedOVERMCHit->Fill((float)tmpTrackCand->getNHits() / mcTrackCand.getNHits());
432 } else {
433 B2DEBUG(21, " too few good hits (" << nGood1Dinfo << ") to track this one ( vs " << nGoodTrueHits << " true hits)");
434 m_h1_nBadTrueHits->Fill(nGoodTrueHits);
435 m_h1_nBad1dInfo->Fill(nGood1Dinfo);
436 }
437
438 B2DEBUG(21, "");
439 }//close loop on MCParticles
440 }//close loop on MCTrackCands
441}
double R
typedef autogenerated by FFTW
DataType X() const
access variable X (= .at(0) without boundary check)
Definition: B2Vector3.h:431
DataType Y() const
access variable Y (= .at(1) without boundary check)
Definition: B2Vector3.h:433
This struct is used by the TrackingPerformanceEvaluation Module to save information of reconstructed ...
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
float getEnergy() const
Return particle energy in GeV.
Definition: MCParticle.h:147
int getIndex() const
Get 1-based index of the particle in the corresponding MCParticle list.
Definition: MCParticle.h:230
ROOT::Math::XYZVector getProductionVertex() const
Return production vertex position.
Definition: MCParticle.h:189
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
ROOT::Math::XYZVector getMomentum() const
Return momentum.
Definition: MCParticle.h:198
StoreArray< genfit::TrackCand > m_GenfitMCTrackCands
MC Genfit TrackCands StoreArray.
StoreArray< SVDCluster > m_SVDClusters
SVDClusters StoreArray.
bool isInAnnulus(double hitDistance, double R, double dR)
Function to check if hitDistance is within a given annulus.
float compute_thetaMS(MCParticleInfo &mcParticleInfo, VXDTrueHit *aTrueHit)
Calculate thetaMS.
StoreArray< genfit::TrackCand > m_GenfitIdealMCTrackCands
Ideal Genfit TrackCands StoreArray.
bool isFirstLap(double FirstHitTime, double HitTime, double LapTime)
Function to check if a hitTime is within a given lapTime, under consideration of m_fraction and with ...
StoreArray< PXDCluster > m_PXDClusters
PXDClusters StoreArray.
double semiPlane(ROOT::Math::XYZVector vertex, ROOT::Math::XYZVector center, ROOT::Math::XYZVector hit)
Function to get semiplane.
double theDistance(ROOT::Math::XYZVector center, ROOT::Math::XYZVector hit)
Get distance between two points.
bool isInSemiPlane(double semiPlane, double omega)
Function to check if a omega value is in a given semiPlane.
float compute_dR(double thetaMS, double omega)
Calculate dR.
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:30
Class PXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: PXDTrueHit.h:31
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:29
bool isUCluster() const
Get the direction of strips.
Definition: SVDCluster.h:110
Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: SVDTrueHit.h:33
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:246
float getV() const
Return local v coordinate of hit.
Definition: VXDTrueHit.h:76
float getGlobalTime() const
Return the time when the track reached its midpoint.
Definition: VXDTrueHit.h:94
VxdID getSensorID() const
Return the Sensor ID.
Definition: VXDTrueHit.h:70
float getU() const
Return local u coordinate of hit.
Definition: VXDTrueHit.h:74
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:39
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:67
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
Base class to provide Sensor Information for PXD and SVD.
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global coordinates.
double getForwardWidth() const
Convinience Wrapper to return width at forward side.
double getBackwardWidth() const
Convinience Wrapper to return width at backward side.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition: EvtPDLUtil.cc:44

◆ 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://confluence.desy.de/display/BI/Software+Basf2manual#Module_Development
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://confluence.desy.de/display/BI/Software+ModCondTut 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  )
overridevirtual

Initializes the Module.

Reimplemented from Module.

Definition at line 73 of file MCTrackCandClassifierModule.cc.

74{
75 // MCParticles, MCTrackCands, MCTracks needed for this module
79
82
83 //create list of histograms to be saved in the rootfile
84 m_histoList = new TList;
85
86 //set the ROOT File
87 m_rootFilePtr = new TFile(m_rootFileName.c_str(), "RECREATE");
88
89 //histograms to produce efficiency plots
90 Double_t bins_pt[9 + 1] = {0, 0.05, 0.1, 0.15, 0.2, 0.3, 0.5, 1, 2, 3.5}; //GeV/c
91 const Double_t bins_theta[10 + 1] = {0, 0.25, 0.5, 0.75, 0.75 + 0.32, 0.75 + 2 * 0.32, 0.75 + 3 * 0.32, 0.75 + 4 * 0.32, 0.75 + 5 * 0.32, 2.65, TMath::Pi()};
92 Double_t bins_lambda[10 + 1];
93 const Double_t width_lambda = TMath::Pi() / 10;
94 Double_t bins_phi[14 + 1];
95 const Double_t width_phi = 2 * TMath::Pi() / 14;
96 for (int bin = 0; bin < 14 + 1; bin++)
97 bins_phi[bin] = - TMath::Pi() + bin * width_phi;
98
99 for (int bin = 0; bin < 10 + 1; bin++) {
100 bins_lambda[bin] = - TMath::Pi() / 2 + bin * width_lambda;
101 B2DEBUG(21, bins_lambda[bin] << " " << bins_theta[bin]);
102 }
103
104 m_h3_MCParticle = createHistogram3D("h3MCParticle", "entry per MCParticle",
105 9, bins_pt, "p_{t} (GeV/c)",
106 10, bins_lambda, "#lambda",
107 14, bins_phi, "#phi" /*, m_histoList*/);
108
109 m_h3_idealMCTrackCand = (TH3F*)duplicateHistogram("h3idealMCTrackCand",
110 "entry per idealMCTrackCand",
111 m_h3_MCParticle /*, m_histoList*/);
112
113 m_h3_MCTrackCand = (TH3F*)duplicateHistogram("h3MCTrackCand",
114 "entry per MCTrackCand",
115 m_h3_MCParticle /*, m_histoList*/);
116
117
118 m_h1_thetaMS_SVD = new TH1F("h1thetaMS_SVD", "Multiple Scattering Angle (SVD)", 500, 0, 500);
120 m_h1_thetaMS_SVD->GetXaxis()->SetTitle("#theta_{MS} (mrad)");
121
122 m_h1_thetaMS_PXD = (TH1F*) duplicateHistogram("h1thetaMS_PXD", "Multiple Scattering Angle (PXD)", m_h1_thetaMS_SVD, m_histoList);
123
124 m_h1_dR = new TH1F("h1dR", "dR, annulus half width", 1000, 0, 5);
125 m_histoList->Add(m_h1_dR);
126 m_h1_dR->GetXaxis()->SetTitle("dR (cm)");
127
128 m_h1_dRoverR = new TH1F("h1dRoverR", "dR over helix radius", 1000, 0, 0.1);
130 m_h1_dRoverR->GetXaxis()->SetTitle("dR/R");
131
132 m_h1_distOVERdR = new TH1F("h1distOVERdR", "(hit radius - helix radius)/dR", 100, -5, 5);
134 m_h1_distOVERdR->GetXaxis()->SetTitle("(hit R - helix R)/dR");
135
136 m_h1_hitRadius_accepted = new TH1F("h1hitRadAccep", "hit radius for accepted hits", 100, 0, 500);
138 m_h1_hitRadius_accepted->GetXaxis()->SetTitle("hit radius (cm)");
139
140 m_h1_hitRadius_rejected = new TH1F("h1hitRadRejec", "hit radius for rejected hits", 100, 0, 500);
142 m_h1_hitRadius_rejected->GetXaxis()->SetTitle("hit radius (cm)");
143
144 m_h1_hitDistance_accepted = new TH1F("h1hitDistCentAccep", "hit distance from 0,0 for accepted hits", 100, 0, 15);
146 m_h1_hitDistance_accepted->GetXaxis()->SetTitle("hit distance (cm)");
147
148 m_h1_hitDistance_rejected = new TH1F("h1hitDistCentRejec", "hit distance from 0,0 for rejected hits", 100, 0, 15);
150 m_h1_hitDistance_rejected->GetXaxis()->SetTitle("hit distance (cm)");
151
152 m_h1_lapTime = new TH1F("h1LapTime", "lap time", 200, 0, 100);
154 m_h1_lapTime->GetXaxis()->SetTitle("time (ns)");
155
156 m_h1_timeDifference = (TH1F*)duplicateHistogram("h1TimeDiff", "Hit Time Difference",
158 m_h1_diffOVERlap = new TH1F("h1HitDiffOVERlap", "Hit Time Difference over Lap Time",
159 100, 0, 1.5);
161 m_h1_diffOVERlap->GetXaxis()->SetTitle("hit difference/lap");
162
163 m_h1_nGoodTrueHits = new TH1F("h1nTrueHitsGoods", "Number of True Hits for Accepted Tracks", 20, 0, 20);
165 m_h1_nGoodTrueHits->GetXaxis()->SetTitle("number of hits");
166
167 m_h1_nBadTrueHits = new TH1F("h1nTrueHitsBads", "Number of True Hits for Rejected Tracks", 10, 0, 10);
169 m_h1_nBadTrueHits->GetXaxis()->SetTitle("number of hits");
170
171 m_h1_nGood1dInfo = new TH1F("h1nGood1Dinfo", "Number of 1D Info for Accepted Tracks", 20, 0, 20);
173 m_h1_nGood1dInfo->GetXaxis()->SetTitle("number of hits");
174
175 m_h1_nBad1dInfo = new TH1F("h1nBad1Dinfo", "Number of 1D Info for Rejected Tracks", 20, 0, 20);
177 m_h1_nBad1dInfo->GetXaxis()->SetTitle("number of hits");
178
179 m_h1_firstRejectedHit = new TH1F("h1idealMCTCnHit", "idealMCTrackCands number of hits", 40, 0, 40);
181 m_h1_firstRejectedHit->GetXaxis()->SetTitle("# idealMCTrackCands hits");
182
183 m_h1_firstRejectedOVERMCHit = new TH1F("h1FirstRejOVERmc", "# idealMCTrackCands hits / # MCTrackCands hits", 100, 0, 1);
185 m_h1_firstRejectedOVERMCHit->GetXaxis()->SetTitle("# idealMCTrackCands hits / # MCTrackCands hits");
186
187 m_h1_MCTrackCandNhits = (TH1F*)duplicateHistogram("h1MCTrackCandNhits", "number of MCTrackCands hits", m_h1_firstRejectedHit,
189}
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
Definition: DataStore.h:72
TH1 * duplicateHistogram(const char *newname, const char *newtitle, TH1 *h, TList *histoList=nullptr)
Function to clone a histogram.
TH3F * createHistogram3D(const char *name, const char *title, Int_t nbinsX, Double_t minX, Double_t maxX, const char *titleX, Int_t nbinsY, Double_t minY, Double_t maxY, const char *titleY, Int_t nbinsZ, Double_t minZ, Double_t maxZ, const char *titleZ, TList *histoList=nullptr)
Create a 3D ROOT Histogram.
StoreArray< MCParticle > m_MCParticles
MCParticles StoreArray.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.

◆ isFirstLap()

bool isFirstLap ( double  FirstHitTime,
double  HitTime,
double  LapTime 
)
private

Function to check if a hitTime is within a given lapTime, under consideration of m_fraction and with respect to first hit.

Parameters
FirstHitTimetime of first hit
HitTimehit time
LapTimelap time
Returns
true if in first lap

Definition at line 558 of file MCTrackCandClassifierModule.cc.

559{
560 bool accepted = false;
561
562 B2DEBUG(21, "");
563 B2DEBUG(21, " lapTime: " << LapTime);
564 B2DEBUG(21, " FirstHitTime = " << FirstHitTime);
565 B2DEBUG(21, " HitTime = " << HitTime);
566 B2DEBUG(21, " difference = " << HitTime - FirstHitTime);
567
568 m_h1_lapTime->Fill(LapTime);
569 m_h1_timeDifference->Fill(HitTime - FirstHitTime);
570 m_h1_diffOVERlap->Fill((HitTime - FirstHitTime) / LapTime);
571
572 if (HitTime - FirstHitTime < m_fraction * LapTime)
573 accepted = true;
574
575 return accepted;
576}

◆ isInAnnulus()

bool isInAnnulus ( double  hitDistance,
double  R,
double  dR 
)
private

Function to check if hitDistance is within a given annulus.

Parameters
hitDistancedistance between two hits
Rradius for annulus
dRwidth of annulus
Returns
true if in annulus

Definition at line 541 of file MCTrackCandClassifierModule.cc.

542{
543 bool accepted = false;
544
545 B2DEBUG(21, "");
546 B2DEBUG(21, " ANNULUS defined between radii: " << R - dR << " and " << R + dR);
547 B2DEBUG(21, " hit distance = " << hitDistance);
548 B2DEBUG(21, " helix radius = " << R);
549 B2DEBUG(21, " dR = " << dR);
550
551 if ((hitDistance > R - dR) && (hitDistance < R + dR))
552 accepted = true;
553
554 return accepted;
555}

◆ isInSemiPlane()

bool isInSemiPlane ( double  semiPlane,
double  omega 
)
private

Function to check if a omega value is in a given semiPlane.

Parameters
semiPlaneslope of semiplane
omegaSigned curvature
Returns
true if in semiplane

Definition at line 523 of file MCTrackCandClassifierModule.cc.

524{
525 if (semiPlane * omega > 0)
526 return true;
527 else
528 return false;
529}

◆ semiPlane()

double semiPlane ( ROOT::Math::XYZVector  vertex,
ROOT::Math::XYZVector  center,
ROOT::Math::XYZVector  hit 
)
private

Function to get semiplane.

Parameters
vertexVertex position
centercenter positon
hithit position
Returns
difference in y-slope between hit and semiplane

Definition at line 502 of file MCTrackCandClassifierModule.cc.

503{
504 ROOT::Math::XYZVector err = center - vertex;
505
506 double semiPlane = err.Y() / err.X() * hit.X() + err.Y() / err.X() * vertex.x() - vertex.Y();
507
508 B2DEBUG(21, "");
509 B2DEBUG(21, " SEMI-PLANE defined by: y + " << err.Y() / err.X() << " x + " << err.Y() / err.X()*vertex.x() - vertex.Y() << " = 0");
510 B2DEBUG(21, " with: center(" << center.X() << "," << center.Y() << ")");
511 B2DEBUG(21, " decayV(" << vertex.X() << "," << vertex.Y() << ")");
512 B2DEBUG(21, " vector(" << err.X() << "," << err.Y() << ")");
513 B2DEBUG(21, " y SLOPE = " << semiPlane << " VS y HIT = " << hit.Y());
514 B2DEBUG(21, " HIT - SLOPE = " << - semiPlane + hit.Y());
515
516 if (vertex.X() < center.X())
517 return hit.Y() - semiPlane;
518 else
519 return semiPlane - hit.Y();
520}

◆ 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()

void terminate ( void  )
overridevirtual

Termination action.

Reimplemented from Module.

Definition at line 484 of file MCTrackCandClassifierModule.cc.

485{
488
489 if (m_rootFilePtr != nullptr) {
490 m_rootFilePtr->cd();
491
492 TIter nextH(m_histoList);
493 TObject* obj;
494 while ((obj = nextH()))
495 obj->Write();
496
497 m_rootFilePtr->Close();
498 }
499}
void addInefficiencyPlots(TList *graphList=nullptr)
Function to create inefficiency plots and add them to list.
void addEfficiencyPlots(TList *graphList=nullptr)
Function to create efficiency plots and add them to list.

◆ theDistance()

double theDistance ( ROOT::Math::XYZVector  center,
ROOT::Math::XYZVector  hit 
)
private

Get distance between two points.

Parameters
centercenter position
hithit position
Returns
Distance between the two hits

Definition at line 532 of file MCTrackCandClassifierModule.cc.

533{
534 double xSquared = TMath::Power(center.X() - hit.X(), 2);
535 double ySquared = TMath::Power(center.Y() - hit.Y(), 2);
536
537 return TMath::Sqrt(xSquared + ySquared);
538}

Member Data Documentation

◆ m_applyAnnulus

bool m_applyAnnulus
protected

Whether to require that the hit is in the expected annulus.

Definition at line 76 of file MCTrackCandClassifierModule.h.

◆ m_applyLap

bool m_applyLap
protected

Whether to require that the hit belongs to the first lap in the transverse plane.

Definition at line 80 of file MCTrackCandClassifierModule.h.

◆ m_applySemiplane

bool m_applySemiplane
protected

Wether to require that the hit is in the expected semiplane.

Definition at line 78 of file MCTrackCandClassifierModule.h.

◆ m_applyWedge

bool m_applyWedge
protected

Whether to require that the hit belong to the barrel part of the SVD.

Definition at line 82 of file MCTrackCandClassifierModule.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_fraction

double m_fraction
protected

Fraction of lap.

Definition at line 88 of file MCTrackCandClassifierModule.h.

◆ m_GenfitIdealMCTrackCands

StoreArray<genfit::TrackCand> m_GenfitIdealMCTrackCands
private

Ideal Genfit TrackCands StoreArray.

Definition at line 132 of file MCTrackCandClassifierModule.h.

◆ m_GenfitMCTrackCands

StoreArray<genfit::TrackCand> m_GenfitMCTrackCands
private

MC Genfit TrackCands StoreArray.

Definition at line 131 of file MCTrackCandClassifierModule.h.

◆ m_h1_diffOVERlap

TH1F* m_h1_diffOVERlap = nullptr
protected

Histogram.

Definition at line 119 of file MCTrackCandClassifierModule.h.

◆ m_h1_distOVERdR

TH1F* m_h1_distOVERdR = nullptr
protected

Histogram.

Definition at line 107 of file MCTrackCandClassifierModule.h.

◆ m_h1_dR

TH1F* m_h1_dR = nullptr
protected

Histogram.

Definition at line 105 of file MCTrackCandClassifierModule.h.

◆ m_h1_dRoverR

TH1F* m_h1_dRoverR = nullptr
protected

Histogram.

Definition at line 106 of file MCTrackCandClassifierModule.h.

◆ m_h1_firstRejectedHit

TH1F* m_h1_firstRejectedHit = nullptr
protected

Histogram.

Definition at line 114 of file MCTrackCandClassifierModule.h.

◆ m_h1_firstRejectedOVERMCHit

TH1F* m_h1_firstRejectedOVERMCHit = nullptr
protected

Histogram.

Definition at line 115 of file MCTrackCandClassifierModule.h.

◆ m_h1_hitDistance_accepted

TH1F* m_h1_hitDistance_accepted = nullptr
protected

Histogram.

Definition at line 110 of file MCTrackCandClassifierModule.h.

◆ m_h1_hitDistance_rejected

TH1F* m_h1_hitDistance_rejected = nullptr
protected

Histogram.

Definition at line 111 of file MCTrackCandClassifierModule.h.

◆ m_h1_hitRadius_accepted

TH1F* m_h1_hitRadius_accepted = nullptr
protected

Histogram.

Definition at line 108 of file MCTrackCandClassifierModule.h.

◆ m_h1_hitRadius_rejected

TH1F* m_h1_hitRadius_rejected = nullptr
protected

Histogram.

Definition at line 109 of file MCTrackCandClassifierModule.h.

◆ m_h1_lapTime

TH1F* m_h1_lapTime = nullptr
protected

Histogram.

Definition at line 117 of file MCTrackCandClassifierModule.h.

◆ m_h1_MCTrackCandNhits

TH1F* m_h1_MCTrackCandNhits = nullptr
protected

Histogram.

Definition at line 113 of file MCTrackCandClassifierModule.h.

◆ m_h1_nBad1dInfo

TH1F* m_h1_nBad1dInfo = nullptr
protected

Histogram.

Definition at line 124 of file MCTrackCandClassifierModule.h.

◆ m_h1_nBadTrueHits

TH1F* m_h1_nBadTrueHits = nullptr
protected

Histogram.

Definition at line 122 of file MCTrackCandClassifierModule.h.

◆ m_h1_nGood1dInfo

TH1F* m_h1_nGood1dInfo = nullptr
protected

Histogram.

Definition at line 123 of file MCTrackCandClassifierModule.h.

◆ m_h1_nGoodTrueHits

TH1F* m_h1_nGoodTrueHits = nullptr
protected

Histogram.

Definition at line 121 of file MCTrackCandClassifierModule.h.

◆ m_h1_thetaMS_PXD

TH1F* m_h1_thetaMS_PXD = nullptr
protected

Histogram.

Definition at line 104 of file MCTrackCandClassifierModule.h.

◆ m_h1_thetaMS_SVD

TH1F* m_h1_thetaMS_SVD = nullptr
protected

Histogram.

Definition at line 103 of file MCTrackCandClassifierModule.h.

◆ m_h1_timeDifference

TH1F* m_h1_timeDifference = nullptr
protected

Histogram.

Definition at line 118 of file MCTrackCandClassifierModule.h.

◆ m_h3_idealMCTrackCand

TH3F* m_h3_idealMCTrackCand = nullptr
protected

Histogram.

Definition at line 100 of file MCTrackCandClassifierModule.h.

◆ m_h3_MCParticle

TH3F* m_h3_MCParticle = nullptr
protected

Histogram.

Definition at line 99 of file MCTrackCandClassifierModule.h.

◆ m_h3_MCTrackCand

TH3F* m_h3_MCTrackCand = nullptr
protected

Histogram.

Definition at line 101 of file MCTrackCandClassifierModule.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 518 of file Module.h.

◆ m_histoList

TList* m_histoList = nullptr
protected

List of histograms.

Definition at line 98 of file MCTrackCandClassifierModule.h.

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 514 of file Module.h.

◆ m_magField

ROOT::Math::XYZVector m_magField
private

magnetic field needed set particle info

Definition at line 134 of file MCTrackCandClassifierModule.h.

◆ m_MCParticles

StoreArray<MCParticle> m_MCParticles
private

MCParticles StoreArray.

Definition at line 130 of file MCTrackCandClassifierModule.h.

◆ m_mcParticlesName

std::string m_mcParticlesName
protected

MCParticle list name.

Definition at line 68 of file MCTrackCandClassifierModule.h.

◆ m_mcTrackCandsColName

std::string m_mcTrackCandsColName
protected

TrackCand list name.

Definition at line 66 of file MCTrackCandClassifierModule.h.

◆ m_minHit

int m_minHit
protected

Minimum number of 1D Clusters to classify the MCTrackCand as ideal.

Definition at line 86 of file MCTrackCandClassifierModule.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_nSigma

int m_nSigma
protected

nSigma dR

Definition at line 72 of file MCTrackCandClassifierModule.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_PXDClusters

StoreArray<PXDCluster> m_PXDClusters
private

PXDClusters StoreArray.

Definition at line 128 of file MCTrackCandClassifierModule.h.

◆ m_removeBadHits

bool m_removeBadHits
protected

Whether to remove the clusters that do not satisfy the criteria from the idealMCTrackCands.

Definition at line 84 of file MCTrackCandClassifierModule.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 519 of file Module.h.

◆ m_rootFileName

std::string m_rootFileName
protected

root file name

Definition at line 70 of file MCTrackCandClassifierModule.h.

◆ m_rootFilePtr

TFile* m_rootFilePtr = nullptr
protected

Pointer to root file used for storing histograms.

Definition at line 96 of file MCTrackCandClassifierModule.h.

◆ m_SVDClusters

StoreArray<SVDCluster> m_SVDClusters
private

SVDClusters StoreArray.

Definition at line 129 of file MCTrackCandClassifierModule.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_usePXD

bool m_usePXD
protected

Whether to use PXD.

Definition at line 74 of file MCTrackCandClassifierModule.h.

◆ nBarrel

int nBarrel = 0
protected

Counter for hits on barrel sensors.

Definition at line 93 of file MCTrackCandClassifierModule.h.

◆ nWedge

int nWedge = 0
protected

Counter for hits on wedged sensors.

Definition at line 91 of file MCTrackCandClassifierModule.h.


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