Belle II Software development
SVDDQMClustersOnTrackModule Class Reference

SVD DQM Module for Clusters related to Tracks. More...

#include <SVDDQMClustersOnTrackModule.h>

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

 SVDDQMClustersOnTrackModule ()
 Constructor.
 
 SVDDQMClustersOnTrackModule (const SVDDQMClustersOnTrackModule &)=delete
 Copy constructor (disabled)
 
SVDDQMClustersOnTrackModuleoperator= (const SVDDQMClustersOnTrackModule &)=delete
 Operator = (disabled)
 
void initialize () override final
 Module function initialize.
 
void terminate () override final
 Module function terminate.
 
void beginRun () override final
 Module function beginRun.
 
void event () override final
 Module function event.
 
void defineHisto () override final
 Contains the Histogram definitions

 
virtual void endRun () override
 Function to process end_run record.
 
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.
 

Private Member Functions

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

Private Attributes

bool m_desynchSVDTime = false
 if TRUE: svdTime back in SVD time reference
 
std::string m_svdShaperDigitsName
 SVDShaperDigits data object name.
 
std::string m_svdRecoDigitsName
 SVDRecoDigits data object name.
 
std::string m_svdClustersName
 SVDClusters data object name.
 
std::string m_svdEventInfoName
 SVDEventInfo data object name.
 
StoreObjPtr< SVDEventInfom_svdEventInfo
 SVDEventInfo data object.
 
StoreObjPtr< EventT0m_eventT0
 EventT0 data object.
 
StoreArray< Trackm_tracks
 StoreArray of the Tracks.
 
StoreObjPtr< SoftwareTriggerResultm_resultStoreObjectPointer
 Store Object for reading the trigger decision.
 
bool m_skipRejectedEvents = true
 if true skip events rejected by HLT (default)
 
int m_tb = -1
 choose one trigger bin, or none if the value is -1
 
TList * m_histoList = nullptr
 list of cumulative histograms
 
int m_expNumber = 0
 experiment number
 
int m_runNumber = 0
 run number
 
std::string m_histogramDirectoryName
 Name of the histogram directory in ROOT file.
 
TH1F ** m_clsTrkCharge = nullptr
 charge of clusters related to tracks per ladder
 
TH1F ** m_clsTrkSNR = nullptr
 SNR of clusters related to tracks per ladder.
 
TH1F ** m_clsTrkChargeL3 = nullptr
 charge of clusters related to tracks per layer 3
 
TH1F ** m_clsTrkSNRL3 = nullptr
 SNR of clusters related to tracks per layer 3.
 
TH1F * m_clsTrkChargeU3 = nullptr
 u charge of clusters related to tracks for layer 3 sensors
 
TH1F * m_clsTrkChargeV3 = nullptr
 v charge of clusters related to tracks for layer 3 sensors
 
TH1F * m_clsTrkChargeU456 = nullptr
 u charge of clusters related to tracks for layer 4,5,6 sensors
 
TH1F * m_clsTrkChargeV456 = nullptr
 v charge of clusters related to tracks for layer 4,5,6 sensors
 
TH1F * m_clsTrkSNRU3 = nullptr
 u SNR of clusters related to tracks for layer 3 sensors
 
TH1F * m_clsTrkSNRV3 = nullptr
 v SNR of clusters related to tracks for layer 3 sensors
 
TH1F * m_clsTrkSNRU456 = nullptr
 u SNR of clusters related to tracks for layer 4,5,6 sensors
 
TH1F * m_clsTrkSNRV456 = nullptr
 v SNR of clusters related to tracks for layer 4,5,6 sensors
 
TH1F * m_stripMaxBinUAll = nullptr
 u MaxBin of strips related to tracks for all sensors
 
TH1F * m_stripMaxBinVAll = nullptr
 v MaxBin of strips related to tracks for all sensors
 
TH2F * m_clsTrkTimeUEvtT0 = nullptr
 u Time of clusters related to tracks vs EventT0
 
TH2F * m_clsTrkTimeVEvtT0 = nullptr
 v Time of clusters related to tracks vs EventT0
 
TH1F * m_clsTrkTimeU3 = nullptr
 u Time of clusters related to tracks for layer 3 sensors
 
TH1F * m_clsTrkTimeV3 = nullptr
 v Time of clusters related to tracks for layer 3 sensors
 
TH1F * m_cls3TrkTimeU3 = nullptr
 u Time of clusters related to tracks for layer 3 sensors for 3 samples
 
TH1F * m_cls3TrkTimeV3 = nullptr
 v Time of clusters related to tracks for layer 3 sensors for 3 sampes
 
TH1F * m_cls6TrkTimeU3 = nullptr
 u Time of clusters related to tracks for layer 3 sensors for 3 samples
 
TH1F * m_cls6TrkTimeV3 = nullptr
 v Time of clusters related to tracks for layer 3 sensors for 3 sampes
 
TH1F * m_clsTrkTimeU456 = nullptr
 u Time of clusters related to tracks for layer 4,5,6 sensors
 
TH1F * m_clsTrkTimeV456 = nullptr
 v Time of clusters related to tracks for layer 4,5,6 sensors
 
TH1F * m_cls3TrkTimeU456 = nullptr
 u Time of clusters related to tracks for layer 4,5,6 sensors for 3 samples
 
TH1F * m_cls3TrkTimeV456 = nullptr
 v Time of clusters related to tracks for layer 4,5,6 sensors for 3 samples
 
TH1F * m_cls6TrkTimeU456 = nullptr
 u Time of clusters related to tracks for layer 4,5,6 sensors for 6 samples
 
TH1F * m_cls6TrkTimeV456 = nullptr
 v Time of clusters related to tracks for layer 4,5,6 sensors for 6 samples
 
std::map< std::pair< int, int >, int > m_ladderMap
 map of ladder index
 
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

SVD DQM Module for Clusters related to Tracks.

Definition at line 30 of file SVDDQMClustersOnTrackModule.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

◆ SVDDQMClustersOnTrackModule()

Constructor.

Definition at line 38 of file SVDDQMClustersOnTrackModule.cc.

38 : HistoModule()
39{
40 //Set module properties
41 setDescription("SVD DQM module for clusters related to tracks.");
42
43 setPropertyFlags(c_ParallelProcessingCertified); // specify this flag if you need parallel processing
44 addParam("skipHLTRejectedEvents", m_skipRejectedEvents, "If True, skip events rejected by HLT.", bool(true));
45 addParam("TriggerBin", m_tb, "select events for a specific trigger bin, if -1 then no selection is applied (default)", int(-1));
46 addParam("histogramDirectoryName", m_histogramDirectoryName, "Name of the directory where histograms will be placed.",
47 std::string("SVDClsTrk"));
48 addParam("desynchronizeSVDTime", m_desynchSVDTime,
49 "if True, svd time back in SVD time reference", bool(false));
50 addParam("EventInfo", m_svdEventInfoName, "SVDEventInfo StoreArray name.", std::string(""));
51 addParam("Clusters", m_svdClustersName, "SVDCluster StoreArray name.", std::string(""));
52 addParam("RecoDigits", m_svdRecoDigitsName, "SVDRecoDigits StoreArray name.", std::string(""));
53 addParam("ShaperDigits", m_svdShaperDigitsName, "SVDShaperDigits StoreArray name.", std::string(""));
54
55 m_histoList = new TList();
56
57 m_ladderMap = {
58 {{3, 1}, 0}, {{3, 2}, 1},
59 {{4, 1}, 2}, {{4, 2}, 3}, {{4, 3}, 4},
60 {{5, 1}, 5}, {{5, 2}, 6}, {{5, 3}, 7}, {{5, 4}, 8},
61 {{6, 1}, 9}, {{6, 2}, 10}, {{6, 3}, 11}, {{6, 4}, 12}, {{6, 5}, 13}
62 };
63}
HistoModule()
Constructor.
Definition: HistoModule.h:32
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
std::string m_svdClustersName
SVDClusters data object name.
std::string m_svdShaperDigitsName
SVDShaperDigits data object name.
bool m_skipRejectedEvents
if true skip events rejected by HLT (default)
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
int m_tb
choose one trigger bin, or none if the value is -1
TList * m_histoList
list of cumulative histograms
std::string m_svdRecoDigitsName
SVDRecoDigits data object name.
std::string m_svdEventInfoName
SVDEventInfo data object name.
bool m_desynchSVDTime
if TRUE: svdTime back in SVD time reference
std::map< std::pair< int, int >, int > m_ladderMap
map of ladder index
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

◆ ~SVDDQMClustersOnTrackModule()

Definition at line 66 of file SVDDQMClustersOnTrackModule.cc.

67{
68}

Member Function Documentation

◆ beginRun()

void beginRun ( void  )
finaloverridevirtual

Module function beginRun.

Reimplemented from HistoModule.

Definition at line 350 of file SVDDQMClustersOnTrackModule.cc.

351{
352 auto gTools = VXD::GeoCache::getInstance().getGeoTools();
353 if (gTools->getNumberOfSVDLayers() == 0) return;
354
355 // Add experiment and run number to the title of selected histograms (CR shifter plots)
356 StoreObjPtr<EventMetaData> evtMetaData;
357 m_expNumber = evtMetaData->getExperiment();
358 m_runNumber = evtMetaData->getRun();
359 TString runID = TString::Format(" ~ Exp%d Run%d", m_expNumber, m_runNumber);
360
361 //reset histograms
362 TObject* obj;
363 TIter nextH(m_histoList);
364 while ((obj = nextH()))
365 if (obj->InheritsFrom("TH1")) {
366 ((TH1F*)obj)->Reset();
367
368 TString tmp = (TString)obj->GetTitle();
369 Int_t pos = tmp.Last('~');
370 if (pos == -1) pos = tmp.Length() + 2;
371
372 TString title = tmp(0, pos - 2);
373 ((TH1F*)obj)->SetTitle(title + runID);
374 }
375}
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
const GeoTools * getGeoTools()
Return a raw pointer to a GeoTools object.
Definition: GeoCache.h:142

◆ clone()

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

Create an independent copy of this module.

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

Implements PathElement.

Definition at line 179 of file Module.cc.

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

◆ def_beginRun()

virtual void def_beginRun ( )
inlineprotectedvirtualinherited

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

Reimplemented in PyModule.

Definition at line 426 of file Module.h.

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

◆ def_endRun()

virtual void def_endRun ( )
inlineprotectedvirtualinherited

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

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

Reimplemented in PyModule.

Definition at line 439 of file Module.h.

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

◆ def_event()

virtual void def_event ( )
inlineprotectedvirtualinherited

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

Reimplemented in PyModule.

Definition at line 432 of file Module.h.

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

◆ def_initialize()

virtual void def_initialize ( )
inlineprotectedvirtualinherited

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

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

Reimplemented in PyModule.

Definition at line 420 of file Module.h.

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

◆ def_terminate()

virtual void def_terminate ( )
inlineprotectedvirtualinherited

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

Reimplemented in PyModule.

Definition at line 445 of file Module.h.

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

◆ defineHisto()

void defineHisto ( )
finaloverridevirtual

Contains the Histogram definitions

Reimplemented from HistoModule.

Definition at line 74 of file SVDDQMClustersOnTrackModule.cc.

75{
77 if (gTools->getNumberOfLayers() == 0) {
78 B2FATAL("Missing geometry for VXD, check steering file.");
79 }
80 if (gTools->getNumberOfSVDLayers() == 0) {
81 B2WARNING("Missing geometry for SVD, SVD-DQM is skipped.");
82 return;
83 }
84
85 // Create a separate histogram directories and cd into it.
86 TDirectory* oldDir = gDirectory;
87 if (m_histogramDirectoryName != "") {
88 oldDir->mkdir(m_histogramDirectoryName.c_str());// do not use return value with ->cd(), its ZERO if dir already exists
89 oldDir->cd(m_histogramDirectoryName.c_str());
90 }
91
92 int ChargeBins = 80;
93 float ChargeMax = 160;
94 int SNRBins = 50;
95 float SNRMax = 100;
96 int TimeBins = 300;
97 float TimeMin = -150;
98 float TimeMax = 150;
99
100 int MaxBinBins = 6;
101 int MaxBinMax = 6;
102
103 TString refFrame = "in FTSW reference";
105 refFrame = "in SVD reference";
106
107
108 //----------------------------------------------------------------
109 // Charge of clusters for L3/L456 sensors
110 //----------------------------------------------------------------
111 TString name = "SVDTRK_ClusterChargeU3";
112 TString title = "SVD U-Cluster-on-Track Charge for layer 3 sensors";
113 m_clsTrkChargeU3 = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
114 m_clsTrkChargeU3->GetXaxis()->SetTitle("cluster charge [ke-]");
115 m_clsTrkChargeU3->GetYaxis()->SetTitle("count");
117 name = "SVDTRK_ClusterChargeV3";
118 title = "SVD V-Cluster-on-Track Charge for layer 3 sensors";
119 m_clsTrkChargeV3 = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
120 m_clsTrkChargeV3->GetXaxis()->SetTitle("cluster charge [ke-]");
121 m_clsTrkChargeV3->GetYaxis()->SetTitle("count");
123
124 name = "SVDTRK_ClusterChargeU456";
125 title = "SVD U-Cluster-on-Track Charge for layers 4,5,6 sensors";
126 m_clsTrkChargeU456 = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
127 m_clsTrkChargeU456->GetXaxis()->SetTitle("cluster charge [ke-]");
128 m_clsTrkChargeU456->GetYaxis()->SetTitle("count");
130
131 name = "SVDTRK_ClusterChargeV456";
132 title = "SVD V-Cluster-on-Track Charge for layers 4,5,6 sensors";
133 m_clsTrkChargeV456 = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
134 m_clsTrkChargeV456->GetXaxis()->SetTitle("cluster charge [ke-]");
135 m_clsTrkChargeV456->GetYaxis()->SetTitle("count");
137
138 m_clsTrkChargeL3 = new TH1F*[4];
139 m_clsTrkSNRL3 = new TH1F*[4];
140
141 int ind = 0;
142 for (int ladder = 1; ladder <= 2; ++ladder) {
143 for (int sensor = 1; sensor <= 2; ++sensor) {
144
145 name = Form("SVDTRK_ClusterCharge_L3.%d.%d", ladder, sensor);
146 title = Form("SVD Cluster-on-Track Charge for L3.%d.%d", ladder, sensor);
147 m_clsTrkChargeL3[ind] = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
148 m_clsTrkChargeL3[ind]->GetXaxis()->SetTitle("cluster charge [ke-]");
149 m_clsTrkChargeL3[ind]->GetYaxis()->SetTitle("count");
150 m_histoList->Add(m_clsTrkChargeL3[ind]);
151
152 name = Form("SVDTRK_ClusterSNR_L3.%d.%d", ladder, sensor);
153 title = Form("SVD Cluster-on-Track SNR for L3.%d.%d", ladder, sensor);
154 m_clsTrkSNRL3[ind] = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
155 m_clsTrkSNRL3[ind]->GetXaxis()->SetTitle("cluster SNR");
156 m_clsTrkSNRL3[ind]->GetYaxis()->SetTitle("count");
157 m_histoList->Add(m_clsTrkSNRL3[ind]);
158 ind++;
159 }
160 }
161
162 m_clsTrkCharge = new TH1F*[m_ladderMap.size()];
163 m_clsTrkSNR = new TH1F*[m_ladderMap.size()];
164
165 for (const auto& it : m_ladderMap) {
166 std::pair<int, int> p = it.first;
167 int layer = p.first;
168 int sensor = p.second;
169 int idx = it.second;
170 name = Form("SVDTRK_ClusterCharge_L%d.x.%d", layer, sensor);
171 title = Form("SVD Cluster-on-Track Charge for L%d.x.%d", layer, sensor);
172 m_clsTrkCharge[idx] = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
173 m_clsTrkCharge[idx]->GetXaxis()->SetTitle("cluster charge [ke-]");
174 m_clsTrkCharge[idx]->GetYaxis()->SetTitle("count");
175 m_histoList->Add(m_clsTrkCharge[idx]);
176
177 //printf("name %s layer %d sensor %d index %d\n", name.Data(), layer, sensor, idx);
178 name = Form("SVDTRK_ClusterSNR_L%d.x.%d", layer, sensor);
179 title = Form("SVD Cluster-on-Track SNR for L%d.x.%d", layer, sensor);
180 m_clsTrkSNR[idx] = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
181 m_clsTrkSNR[idx]->GetXaxis()->SetTitle("cluster SNR");
182 m_clsTrkSNR[idx]->GetYaxis()->SetTitle("count");
183 m_histoList->Add(m_clsTrkSNR[idx]);
184 }
185
186 //----------------------------------------------------------------
187 // SNR of clusters for L3/L456 sensors
188 //----------------------------------------------------------------
189 name = "SVDTRK_ClusterSNRU3";
190 title = "SVD U-Cluster-on-Track SNR for layer 3 sensors";
191 m_clsTrkSNRU3 = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
192 m_clsTrkSNRU3->GetXaxis()->SetTitle("cluster SNR");
193 m_clsTrkSNRU3->GetYaxis()->SetTitle("count");
195 name = "SVDTRK_ClusterSNRV3";
196 title = "SVD V-Cluster-on-Track SNR for layer 3 sensors";
197 m_clsTrkSNRV3 = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
198 m_clsTrkSNRV3->GetXaxis()->SetTitle("cluster SNR");
199 m_clsTrkSNRV3->GetYaxis()->SetTitle("count");
201
202 name = "SVDTRK_ClusterSNRU456";
203 title = "SVD U-Cluster-on-Track SNR for layers 4,5,6 sensors";
204 m_clsTrkSNRU456 = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
205 m_clsTrkSNRU456->GetXaxis()->SetTitle("cluster SNR");
206 m_clsTrkSNRU456->GetYaxis()->SetTitle("count");
208 name = "SVDTRK_ClusterSNRV456";
209 title = "SVD V-Cluster-on-Track SNR for layers 4,5,6 sensors";
210 m_clsTrkSNRV456 = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
211 m_clsTrkSNRV456->GetXaxis()->SetTitle("cluster SNR");
212 m_clsTrkSNRV456->GetYaxis()->SetTitle("count");
214
215 //----------------------------------------------------------------
216 // Time of clusters for L3/L456 sensors
217 //----------------------------------------------------------------
218 name = "SVDTRK_ClusterTimeU3";
219 title = Form("SVD U-Cluster-on-Track Time %s for layer 3 sensors", refFrame.Data());
220 m_clsTrkTimeU3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
221 m_clsTrkTimeU3->GetXaxis()->SetTitle("cluster time (ns)");
222 m_clsTrkTimeU3->GetYaxis()->SetTitle("count");
224 name = "SVDTRK_ClusterTimeV3";
225 title = Form("SVD V-Cluster-on-Track Time %s for layer 3 sensors", refFrame.Data());
226 m_clsTrkTimeV3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
227 m_clsTrkTimeV3->GetXaxis()->SetTitle("cluster time (ns)");
228 m_clsTrkTimeV3->GetYaxis()->SetTitle("count");
230
231 name = "SVDTRK_Cluster3TimeU3";
232 title = Form("SVD U-Cluster-on-Track Time %s for layer 3 sensors for 3 samples", refFrame.Data());
233 m_cls3TrkTimeU3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
234 m_cls3TrkTimeU3->GetXaxis()->SetTitle("cluster time (ns)");
235 m_cls3TrkTimeU3->GetYaxis()->SetTitle("count");
237 name = "SVDTRK_Cluster3TimeV3";
238 title = Form("SVD V-Cluster-on-Track Time %s for layer 3 sensors for 3 samples", refFrame.Data());
239 m_cls3TrkTimeV3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
240 m_cls3TrkTimeV3->GetXaxis()->SetTitle("cluster time (ns)");
241 m_cls3TrkTimeV3->GetYaxis()->SetTitle("count");
243
244 name = "SVDTRK_Cluster6TimeU3";
245 title = Form("SVD U-Cluster-on-Track Time %s for layer 3 sensors for 6 samples", refFrame.Data());
246 m_cls6TrkTimeU3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
247 m_cls6TrkTimeU3->GetXaxis()->SetTitle("cluster time (ns)");
248 m_cls6TrkTimeU3->GetYaxis()->SetTitle("count");
250 name = "SVDTRK_Cluster6TimeV3";
251 title = Form("SVD V-Cluster-on-Track Time %s for layer 3 sensors for 6 samples", refFrame.Data());
252 m_cls6TrkTimeV3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
253 m_cls6TrkTimeV3->GetXaxis()->SetTitle("cluster time (ns)");
254 m_cls6TrkTimeV3->GetYaxis()->SetTitle("count");
256
257
258 name = "SVDTRK_ClusterTimeU456";
259 title = Form("SVD U-Cluster-on-Track Time %s for layers 4,5,6 sensors", refFrame.Data());
260 m_clsTrkTimeU456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
261 m_clsTrkTimeU456->GetXaxis()->SetTitle("cluster time (ns)");
262 m_clsTrkTimeU456->GetYaxis()->SetTitle("count");
264 name = "SVDTRK_ClusterTimeV456";
265 title = Form("SVD V-Cluster-on-Track Time %s for layers 4,5,6 sensors", refFrame.Data());
266 m_clsTrkTimeV456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
267 m_clsTrkTimeV456->GetXaxis()->SetTitle("cluster time (ns)");
268 m_clsTrkTimeV456->GetYaxis()->SetTitle("count");
270
271 name = "SVDTRK_Cluster3TimeU456";
272 title = Form("SVD U-Cluster-on-Track Time %s for layers 4,5,6 sensors for 3 samples", refFrame.Data());
273 m_cls3TrkTimeU456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
274 m_cls3TrkTimeU456->GetXaxis()->SetTitle("cluster time (ns)");
275 m_cls3TrkTimeU456->GetYaxis()->SetTitle("count");
277 name = "SVDTRK_Cluster3TimeV456";
278 title = Form("SVD V-Cluster-on-Track Time %s for layers 4,5,6 sensors for 3 samples", refFrame.Data());
279 m_cls3TrkTimeV456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
280 m_cls3TrkTimeV456->GetXaxis()->SetTitle("cluster time (ns)");
281 m_cls3TrkTimeV456->GetYaxis()->SetTitle("count");
283
284 name = "SVDTRK_Cluster6TimeU456";
285 title = Form("SVD U-Cluster-on-Track Time %s for layers 4,5,6 sensors for 6 samples", refFrame.Data());
286 m_cls6TrkTimeU456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
287 m_cls6TrkTimeU456->GetXaxis()->SetTitle("cluster time (ns)");
288 m_cls6TrkTimeU456->GetYaxis()->SetTitle("count");
290 name = "SVDTRK_Cluster6TimeV456";
291 title = Form("SVD V-Cluster-on-Track Time %s for layers 4,5,6 sensors for 6 samples", refFrame.Data());
292 m_cls6TrkTimeV456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
293 m_cls6TrkTimeV456->GetXaxis()->SetTitle("cluster time (ns)");
294 m_cls6TrkTimeV456->GetYaxis()->SetTitle("count");
296
297 //----------------------------------------------------------------
298 // EventT0 vs Time of clusters for U and V sides
299 //----------------------------------------------------------------
300 name = "SVDTRK_ClusterTimeUvsEventT0";
301 title = Form("SVD U-Cluster-on-Track Time vs EventT0 %s for layer 3 sensors", refFrame.Data());
302 m_clsTrkTimeUEvtT0 = new TH2F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax, 100, -50, 50);
303 m_clsTrkTimeUEvtT0->GetXaxis()->SetTitle("clusters time (ns)");
304 m_clsTrkTimeUEvtT0->GetYaxis()->SetTitle("EventT0 (ns)");
306 name = "SVDTRK_ClusterTimeVvsEventT0";
307 title = Form("SVD V-Cluster-on-Track Time vs EventT0 %s for layer 3 sensors", refFrame.Data());
308 m_clsTrkTimeVEvtT0 = new TH2F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax, 100, -50, 50);
309 m_clsTrkTimeVEvtT0->GetXaxis()->SetTitle("cluster time (ns)");
310 m_clsTrkTimeVEvtT0->GetYaxis()->SetTitle("EventT0 (ns)");
312
313 //----------------------------------------------------------------
314 // MaxBin of strips for all sensors (offline ZS)
315 //----------------------------------------------------------------
316 name = "SVDTRK_StripMaxBinUAll";
317 title = "SVD U-Strip-on-Track MaxBin for all sensors";
318 m_stripMaxBinUAll = new TH1F(name.Data(), title.Data(), MaxBinBins, 0, MaxBinMax);
319 m_stripMaxBinUAll->GetXaxis()->SetTitle("max bin");
320 m_stripMaxBinUAll->GetYaxis()->SetTitle("count");
322 name = "SVDTRK_StripMaxBinVAll";
323 title = "SVD V-Strip-on-Track MaxBin for all sensors";
324 m_stripMaxBinVAll = new TH1F(name.Data(), title.Data(), MaxBinBins, 0, MaxBinMax);
325 m_stripMaxBinVAll->GetXaxis()->SetTitle("max bin");
326 m_stripMaxBinVAll->GetYaxis()->SetTitle("count");
328
329
330 oldDir->cd();
331}
TH1F * m_cls6TrkTimeV456
v Time of clusters related to tracks for layer 4,5,6 sensors for 6 samples
TH1F ** m_clsTrkSNRL3
SNR of clusters related to tracks per layer 3.
TH1F * m_cls6TrkTimeU3
u Time of clusters related to tracks for layer 3 sensors for 3 samples
TH1F ** m_clsTrkChargeL3
charge of clusters related to tracks per layer 3
TH1F ** m_clsTrkCharge
charge of clusters related to tracks per ladder
TH1F * m_clsTrkSNRV456
v SNR of clusters related to tracks for layer 4,5,6 sensors
TH1F * m_cls3TrkTimeU456
u Time of clusters related to tracks for layer 4,5,6 sensors for 3 samples
TH1F * m_clsTrkTimeU3
u Time of clusters related to tracks for layer 3 sensors
TH1F * m_cls3TrkTimeV456
v Time of clusters related to tracks for layer 4,5,6 sensors for 3 samples
TH1F * m_clsTrkChargeV3
v charge of clusters related to tracks for layer 3 sensors
TH1F * m_clsTrkSNRU456
u SNR of clusters related to tracks for layer 4,5,6 sensors
TH1F * m_clsTrkSNRV3
v SNR of clusters related to tracks for layer 3 sensors
TH1F * m_cls6TrkTimeU456
u Time of clusters related to tracks for layer 4,5,6 sensors for 6 samples
TH2F * m_clsTrkTimeUEvtT0
u Time of clusters related to tracks vs EventT0
TH1F * m_clsTrkChargeU456
u charge of clusters related to tracks for layer 4,5,6 sensors
TH1F * m_cls3TrkTimeV3
v Time of clusters related to tracks for layer 3 sensors for 3 sampes
TH1F * m_clsTrkTimeV3
v Time of clusters related to tracks for layer 3 sensors
TH1F * m_stripMaxBinUAll
u MaxBin of strips related to tracks for all sensors
TH1F * m_cls6TrkTimeV3
v Time of clusters related to tracks for layer 3 sensors for 3 sampes
TH1F * m_cls3TrkTimeU3
u Time of clusters related to tracks for layer 3 sensors for 3 samples
TH1F * m_clsTrkSNRU3
u SNR of clusters related to tracks for layer 3 sensors
TH1F * m_clsTrkChargeU3
u charge of clusters related to tracks for layer 3 sensors
TH1F * m_stripMaxBinVAll
v MaxBin of strips related to tracks for all sensors
TH1F * m_clsTrkTimeU456
u Time of clusters related to tracks for layer 4,5,6 sensors
TH1F ** m_clsTrkSNR
SNR of clusters related to tracks per ladder.
TH2F * m_clsTrkTimeVEvtT0
v Time of clusters related to tracks vs EventT0
TH1F * m_clsTrkChargeV456
v charge of clusters related to tracks for layer 4,5,6 sensors
TH1F * m_clsTrkTimeV456
v Time of clusters related to tracks for layer 4,5,6 sensors

◆ endRun()

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

Module function event.

Reimplemented from HistoModule.

Definition at line 377 of file SVDDQMClustersOnTrackModule.cc.

378{
379
380 if (!m_tracks.isValid()) {
381 B2WARNING("Missing Tracks StoreArray. Skipping SVDDQMClustersOnTrack");
382 return;
383 }
384
385 if (!m_svdEventInfo.isValid())
386 m_tb = -1;
387 else {
388 if (m_tb != -1)
389 if (m_svdEventInfo->getModeByte().getTriggerBin() != m_tb)
390 return;
391 }
392
393 int nSamples = 0;
394 if (m_svdEventInfo.isValid())
395 nSamples = m_svdEventInfo->getNSamples();
396 else
397 return;
398
399 // get EventT0 if present and valid
400 double eventT0 = -1000;
401 if (m_eventT0.isOptional())
402 if (m_eventT0.isValid())
403 if (m_eventT0->hasEventT0())
404 eventT0 = m_eventT0->getEventT0();
405
406 // if svd time in SVD time reference is shown, eventT0 is also synchronized with SVD reference frame, firstFrame = 0
407 if (m_desynchSVDTime && m_svdEventInfo.isValid())
408 eventT0 = eventT0 - m_svdEventInfo->getSVD2FTSWTimeShift(0);
409
410 //check HLT decision and increase number of events only if the event has been accepted
411
414 if (!eventAccepted) return;
415 }
416
417 auto gTools = VXD::GeoCache::getInstance().getGeoTools();
418 if (gTools->getNumberOfSVDLayers() == 0) return;
419
420
421 for (const Track& track : m_tracks) {
422
423 const TrackFitResult* tfr = track.getTrackFitResultWithClosestMass(Const::pion);
424 if (not tfr) continue;
425
426 const RecoTrack* recoTrack = track.getRelated<RecoTrack>();
427 if (not recoTrack) continue;
428
429 for (const SVDCluster& svdCluster : recoTrack->getRelationsWith<SVDCluster>(m_svdClustersName)) {
430
431 int iLayer = svdCluster.getSensorID().getLayerNumber();
432 int iLadder = svdCluster.getSensorID().getLadderNumber();
433 int iSensor = svdCluster.getSensorID().getSensorNumber();
434
435 if (iLayer == 3) {
436 int ind = -1;
437 if (iLadder == 1 && iSensor == 1) {
438 ind = 0;
439 } else if (iLadder == 1 && iSensor == 2) {
440 ind = 1;
441 } else if (iLadder == 2 && iSensor == 1) {
442 ind = 2;
443 } else if (iLadder == 2 && iSensor == 2) {
444 ind = 3;
445 }
446
447 if (ind != -1) {
448 if (m_clsTrkChargeL3[ind] != nullptr) m_clsTrkChargeL3[ind]->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
449 if (m_clsTrkSNRL3[ind] != nullptr) m_clsTrkSNRL3[ind]->Fill(svdCluster.getSNR());
450 }
451
452 }
453
454 std::pair<int, int> p(iLayer, iSensor);
455 int idx = m_ladderMap[p];
456
457 if (m_clsTrkCharge[idx] != nullptr) m_clsTrkCharge[idx]->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
458 if (m_clsTrkSNR[idx] != nullptr) m_clsTrkSNR[idx]->Fill(svdCluster.getSNR());
459
460 float time = svdCluster.getClsTime();
461 if (m_desynchSVDTime && m_svdEventInfo.isValid())
462 time = time - m_svdEventInfo->getSVD2FTSWTimeShift(svdCluster.getFirstFrame());
463
464 if (svdCluster.isUCluster()) {
465
466 m_clsTrkTimeUEvtT0->Fill(time, eventT0);
467
468 if (iLayer == 3) {
469 if (m_clsTrkChargeU3 != nullptr) m_clsTrkChargeU3->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
470 if (m_clsTrkSNRU3 != nullptr) m_clsTrkSNRU3->Fill(svdCluster.getSNR());
471 if (m_clsTrkTimeU3 != nullptr) m_clsTrkTimeU3->Fill(time);
472
473 if (nSamples == 3) {
474 if (m_cls3TrkTimeU3 != nullptr) m_cls3TrkTimeU3->Fill(time);
475 } else {
476 if (m_cls6TrkTimeU3 != nullptr) m_cls6TrkTimeU3->Fill(time);
477 }
478 } else {
479 if (m_clsTrkChargeU456 != nullptr) m_clsTrkChargeU456->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
480 if (m_clsTrkSNRU456 != nullptr) m_clsTrkSNRU456->Fill(svdCluster.getSNR());
481 if (m_clsTrkTimeU456 != nullptr) m_clsTrkTimeU456->Fill(time);
482
483 if (nSamples == 3) {
484 if (m_cls3TrkTimeU456 != nullptr) m_cls3TrkTimeU456->Fill(time);
485 } else {
486 if (m_cls6TrkTimeU456 != nullptr) m_cls6TrkTimeU456->Fill(time);
487 }
488 }
489
490 for (const SVDRecoDigit& recoDigit : svdCluster.getRelationsTo<SVDRecoDigit>(m_svdRecoDigitsName)) {
491
493 if (m_stripMaxBinUAll != nullptr and shaper != nullptr) m_stripMaxBinUAll->Fill(shaper->getMaxTimeBin());
494 }
495
496
497 } else {
498
499 m_clsTrkTimeVEvtT0->Fill(time, eventT0);
500
501 if (iLayer == 3) {
502 if (m_clsTrkChargeV3 != nullptr) m_clsTrkChargeV3->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
503 if (m_clsTrkSNRV3 != nullptr) m_clsTrkSNRV3->Fill(svdCluster.getSNR());
504 if (m_clsTrkTimeV3 != nullptr) m_clsTrkTimeV3->Fill(time);
505 if (nSamples == 3) {
506 if (m_cls3TrkTimeV3 != nullptr) m_cls3TrkTimeV3->Fill(time);
507 } else {
508 if (m_cls6TrkTimeV3 != nullptr) m_cls6TrkTimeV3->Fill(time);
509 }
510 } else {
511 if (m_clsTrkChargeV456 != nullptr) m_clsTrkChargeV456->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
512 if (m_clsTrkSNRV456 != nullptr) m_clsTrkSNRV456->Fill(svdCluster.getSNR());
513 if (m_clsTrkTimeV456 != nullptr) m_clsTrkTimeV456->Fill(time);
514 if (nSamples == 3) {
515 if (m_cls3TrkTimeV456 != nullptr) m_cls3TrkTimeV456->Fill(time);
516 } else {
517 if (m_cls6TrkTimeV456 != nullptr) m_cls6TrkTimeV456->Fill(time);
518 }
519 }
520
521 for (const SVDRecoDigit& recoDigit : svdCluster.getRelationsTo<SVDRecoDigit>(m_svdRecoDigitsName)) {
522
524 if (m_stripMaxBinVAll != nullptr and shaper != nullptr) m_stripMaxBinVAll->Fill(shaper->getMaxTimeBin());
525 }
526
527 }
528
529 }
530 }
531}
static const ChargedStable pion
charged pion particle
Definition: Const.h:661
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.
RelationVector< TO > getRelationsTo(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from this object to another store array.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:29
StoreObjPtr< EventT0 > m_eventT0
EventT0 data object.
StoreObjPtr< SVDEventInfo > m_svdEventInfo
SVDEventInfo data object.
StoreArray< Track > m_tracks
StoreArray of the Tracks.
StoreObjPtr< SoftwareTriggerResult > m_resultStoreObjectPointer
Store Object for reading the trigger decision.
The SVD RecoDigit class.
Definition: SVDRecoDigit.h:43
The SVD ShaperDigit class.
int getMaxTimeBin() const
Get the max bin.
static bool getFinalTriggerDecision(const SoftwareTriggerResult &result, bool forgetTotalResult=false)
Calculate the final cut decision using all "total_results" of all sub triggers in the software trigge...
Values of the result of a track fit with a given particle hypothesis.
Class that bundles various TrackFitResults.
Definition: Track.h:25

◆ exposePythonAPI()

void exposePythonAPI ( )
staticinherited

Exposes methods of the Module class to Python.

Definition at line 325 of file Module.cc.

326{
327 // to avoid confusion between std::arg and boost::python::arg we want a shorthand namespace as well
328 namespace bp = boost::python;
329
330 docstring_options options(true, true, false); //userdef, py sigs, c++ sigs
331
332 void (Module::*setReturnValueInt)(int) = &Module::setReturnValue;
333
334 enum_<Module::EAfterConditionPath>("AfterConditionPath",
335 R"(Determines execution behaviour after a conditional path has been executed:
336
337.. attribute:: END
338
339 End processing of this path after the conditional path. (this is the default for if_value() etc.)
340
341.. attribute:: CONTINUE
342
343 After the conditional path, resume execution after this module.)")
344 .value("END", Module::EAfterConditionPath::c_End)
345 .value("CONTINUE", Module::EAfterConditionPath::c_Continue)
346 ;
347
348 /* Do not change the names of >, <, ... we use them to serialize conditional pathes */
349 enum_<Belle2::ModuleCondition::EConditionOperators>("ConditionOperator")
356 ;
357
358 enum_<Module::EModulePropFlags>("ModulePropFlags",
359 R"(Flags to indicate certain low-level features of modules, see :func:`Module.set_property_flags()`, :func:`Module.has_properties()`. Most useful flags are:
360
361.. attribute:: PARALLELPROCESSINGCERTIFIED
362
363 This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)
364
365.. attribute:: HISTOGRAMMANAGER
366
367 This module is used to manage histograms accumulated by other modules
368
369.. attribute:: TERMINATEINALLPROCESSES
370
371 When using parallel processing, call this module's terminate() function in all processes. This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.
372)")
373 .value("INPUT", Module::EModulePropFlags::c_Input)
374 .value("OUTPUT", Module::EModulePropFlags::c_Output)
375 .value("PARALLELPROCESSINGCERTIFIED", Module::EModulePropFlags::c_ParallelProcessingCertified)
376 .value("HISTOGRAMMANAGER", Module::EModulePropFlags::c_HistogramManager)
377 .value("INTERNALSERIALIZER", Module::EModulePropFlags::c_InternalSerializer)
378 .value("TERMINATEINALLPROCESSES", Module::EModulePropFlags::c_TerminateInAllProcesses)
379 ;
380
381 //Python class definition
382 class_<Module, PyModule> module("Module", R"(
383Base class for Modules.
384
385A module is the smallest building block of the framework.
386A typical event processing chain consists of a Path containing
387modules. By inheriting from this base class, various types of
388modules can be created. To use a module, please refer to
389:func:`Path.add_module()`. A list of modules is available by running
390``basf2 -m`` or ``basf2 -m package``, detailed information on parameters is
391given by e.g. ``basf2 -m RootInput``.
392
393The 'Module Development' section in the manual provides detailed information
394on how to create modules, setting parameters, or using return values/conditions:
395https://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  )
finaloverridevirtual

Module function initialize.

Reimplemented from HistoModule.

Definition at line 334 of file SVDDQMClustersOnTrackModule.cc.

335{
336 // Register histograms (calls back defineHisto)
337 REG_HISTOGRAM
338
339 auto gTools = VXD::GeoCache::getInstance().getGeoTools();
340 if (gTools->getNumberOfSVDLayers() != 0) {
341
343 m_eventT0.isOptional();
344 m_tracks.isOptional();
345 m_resultStoreObjectPointer.isOptional();
346
347 }
348}

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

Module function terminate.

Reimplemented from HistoModule.

Definition at line 534 of file SVDDQMClustersOnTrackModule.cc.

535{
536
537 delete m_histoList;
538
539}

Member Data Documentation

◆ m_cls3TrkTimeU3

TH1F* m_cls3TrkTimeU3 = nullptr
private

u Time of clusters related to tracks for layer 3 sensors for 3 samples

Definition at line 134 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls3TrkTimeU456

TH1F* m_cls3TrkTimeU456 = nullptr
private

u Time of clusters related to tracks for layer 4,5,6 sensors for 3 samples

Definition at line 149 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls3TrkTimeV3

TH1F* m_cls3TrkTimeV3 = nullptr
private

v Time of clusters related to tracks for layer 3 sensors for 3 sampes

Definition at line 136 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls3TrkTimeV456

TH1F* m_cls3TrkTimeV456 = nullptr
private

v Time of clusters related to tracks for layer 4,5,6 sensors for 3 samples

Definition at line 151 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls6TrkTimeU3

TH1F* m_cls6TrkTimeU3 = nullptr
private

u Time of clusters related to tracks for layer 3 sensors for 3 samples

Definition at line 139 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls6TrkTimeU456

TH1F* m_cls6TrkTimeU456 = nullptr
private

u Time of clusters related to tracks for layer 4,5,6 sensors for 6 samples

Definition at line 154 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls6TrkTimeV3

TH1F* m_cls6TrkTimeV3 = nullptr
private

v Time of clusters related to tracks for layer 3 sensors for 3 sampes

Definition at line 141 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls6TrkTimeV456

TH1F* m_cls6TrkTimeV456 = nullptr
private

v Time of clusters related to tracks for layer 4,5,6 sensors for 6 samples

Definition at line 156 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkCharge

TH1F** m_clsTrkCharge = nullptr
private

charge of clusters related to tracks per ladder

Definition at line 90 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkChargeL3

TH1F** m_clsTrkChargeL3 = nullptr
private

charge of clusters related to tracks per layer 3

Definition at line 96 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkChargeU3

TH1F* m_clsTrkChargeU3 = nullptr
private

u charge of clusters related to tracks for layer 3 sensors

Definition at line 102 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkChargeU456

TH1F* m_clsTrkChargeU456 = nullptr
private

u charge of clusters related to tracks for layer 4,5,6 sensors

Definition at line 106 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkChargeV3

TH1F* m_clsTrkChargeV3 = nullptr
private

v charge of clusters related to tracks for layer 3 sensors

Definition at line 104 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkChargeV456

TH1F* m_clsTrkChargeV456 = nullptr
private

v charge of clusters related to tracks for layer 4,5,6 sensors

Definition at line 108 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkSNR

TH1F** m_clsTrkSNR = nullptr
private

SNR of clusters related to tracks per ladder.

Definition at line 93 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkSNRL3

TH1F** m_clsTrkSNRL3 = nullptr
private

SNR of clusters related to tracks per layer 3.

Definition at line 99 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkSNRU3

TH1F* m_clsTrkSNRU3 = nullptr
private

u SNR of clusters related to tracks for layer 3 sensors

Definition at line 111 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkSNRU456

TH1F* m_clsTrkSNRU456 = nullptr
private

u SNR of clusters related to tracks for layer 4,5,6 sensors

Definition at line 115 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkSNRV3

TH1F* m_clsTrkSNRV3 = nullptr
private

v SNR of clusters related to tracks for layer 3 sensors

Definition at line 113 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkSNRV456

TH1F* m_clsTrkSNRV456 = nullptr
private

v SNR of clusters related to tracks for layer 4,5,6 sensors

Definition at line 117 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkTimeU3

TH1F* m_clsTrkTimeU3 = nullptr
private

u Time of clusters related to tracks for layer 3 sensors

Definition at line 129 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkTimeU456

TH1F* m_clsTrkTimeU456 = nullptr
private

u Time of clusters related to tracks for layer 4,5,6 sensors

Definition at line 144 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkTimeUEvtT0

TH2F* m_clsTrkTimeUEvtT0 = nullptr
private

u Time of clusters related to tracks vs EventT0

Definition at line 125 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkTimeV3

TH1F* m_clsTrkTimeV3 = nullptr
private

v Time of clusters related to tracks for layer 3 sensors

Definition at line 131 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkTimeV456

TH1F* m_clsTrkTimeV456 = nullptr
private

v Time of clusters related to tracks for layer 4,5,6 sensors

Definition at line 146 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkTimeVEvtT0

TH2F* m_clsTrkTimeVEvtT0 = nullptr
private

v Time of clusters related to tracks vs EventT0

Definition at line 127 of file SVDDQMClustersOnTrackModule.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_desynchSVDTime

bool m_desynchSVDTime = false
private

if TRUE: svdTime back in SVD time reference

Definition at line 58 of file SVDDQMClustersOnTrackModule.h.

◆ m_eventT0

StoreObjPtr<EventT0> m_eventT0
private

EventT0 data object.

Definition at line 65 of file SVDDQMClustersOnTrackModule.h.

◆ m_expNumber

int m_expNumber = 0
private

experiment number

Definition at line 82 of file SVDDQMClustersOnTrackModule.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 518 of file Module.h.

◆ m_histogramDirectoryName

std::string m_histogramDirectoryName
private

Name of the histogram directory in ROOT file.

Definition at line 87 of file SVDDQMClustersOnTrackModule.h.

◆ m_histoList

TList* m_histoList = nullptr
private

list of cumulative histograms

Definition at line 79 of file SVDDQMClustersOnTrackModule.h.

◆ m_ladderMap

std::map<std::pair<int, int>, int> m_ladderMap
private

map of ladder index

Definition at line 159 of file SVDDQMClustersOnTrackModule.h.

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 514 of file Module.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_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_resultStoreObjectPointer

StoreObjPtr<SoftwareTriggerResult> m_resultStoreObjectPointer
private

Store Object for reading the trigger decision.

Definition at line 71 of file SVDDQMClustersOnTrackModule.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 519 of file Module.h.

◆ m_runNumber

int m_runNumber = 0
private

run number

Definition at line 84 of file SVDDQMClustersOnTrackModule.h.

◆ m_skipRejectedEvents

bool m_skipRejectedEvents = true
private

if true skip events rejected by HLT (default)

Definition at line 74 of file SVDDQMClustersOnTrackModule.h.

◆ m_stripMaxBinUAll

TH1F* m_stripMaxBinUAll = nullptr
private

u MaxBin of strips related to tracks for all sensors

Definition at line 120 of file SVDDQMClustersOnTrackModule.h.

◆ m_stripMaxBinVAll

TH1F* m_stripMaxBinVAll = nullptr
private

v MaxBin of strips related to tracks for all sensors

Definition at line 122 of file SVDDQMClustersOnTrackModule.h.

◆ m_svdClustersName

std::string m_svdClustersName
private

SVDClusters data object name.

Definition at line 62 of file SVDDQMClustersOnTrackModule.h.

◆ m_svdEventInfo

StoreObjPtr<SVDEventInfo> m_svdEventInfo
private

SVDEventInfo data object.

Definition at line 64 of file SVDDQMClustersOnTrackModule.h.

◆ m_svdEventInfoName

std::string m_svdEventInfoName
private

SVDEventInfo data object name.

Definition at line 63 of file SVDDQMClustersOnTrackModule.h.

◆ m_svdRecoDigitsName

std::string m_svdRecoDigitsName
private

SVDRecoDigits data object name.

Definition at line 61 of file SVDDQMClustersOnTrackModule.h.

◆ m_svdShaperDigitsName

std::string m_svdShaperDigitsName
private

SVDShaperDigits data object name.

Definition at line 60 of file SVDDQMClustersOnTrackModule.h.

◆ m_tb

int m_tb = -1
private

choose one trigger bin, or none if the value is -1

Definition at line 76 of file SVDDQMClustersOnTrackModule.h.

◆ m_tracks

StoreArray<Track> m_tracks
private

StoreArray of the Tracks.

Definition at line 68 of file SVDDQMClustersOnTrackModule.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.


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