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
 
bool m_3Samples = false
 if true enable 3 samples histograms analysis
 
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_cls3SampleTrkTimeU3 = nullptr
 u Time of clusters related to tracks for layer 3 sensors for 3 samples
 
TH1F * m_cls3SampleTrkTimeV3 = nullptr
 v Time of clusters related to tracks for layer 3 sensors for 3 sampes
 
TH1F * m_cls6SampleTrkTimeU3 = nullptr
 u Time of clusters related to tracks for layer 3 sensors for 3 samples
 
TH1F * m_cls6SampleTrkTimeV3 = 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_cls3SampleTrkTimeU456 = nullptr
 u Time of clusters related to tracks for layer 4,5,6 sensors for 3 samples
 
TH1F * m_cls3SampleTrkTimeV456 = nullptr
 v Time of clusters related to tracks for layer 4,5,6 sensors for 3 samples
 
TH1F * m_cls6SampleTrkTimeU456 = nullptr
 u Time of clusters related to tracks for layer 4,5,6 sensors for 6 samples
 
TH1F * m_cls6SampleTrkTimeV456 = 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 addParam("samples3", m_3Samples, "if True 3 samples histograms analysis is performed", bool(false));
55
56 m_histoList = new TList();
57
58 m_ladderMap = {
59 {{3, 1}, 0}, {{3, 2}, 1},
60 {{4, 1}, 2}, {{4, 2}, 3}, {{4, 3}, 4},
61 {{5, 1}, 5}, {{5, 2}, 6}, {{5, 3}, 7}, {{5, 4}, 8},
62 {{6, 1}, 9}, {{6, 2}, 10}, {{6, 3}, 11}, {{6, 4}, 12}, {{6, 5}, 13}
63 };
64}
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
bool m_3Samples
if true enable 3 samples histograms analysis
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 67 of file SVDDQMClustersOnTrackModule.cc.

68{
69}

Member Function Documentation

◆ beginRun()

void beginRun ( void  )
finaloverridevirtual

Module function beginRun.

Reimplemented from HistoModule.

Definition at line 354 of file SVDDQMClustersOnTrackModule.cc.

355{
356 auto gTools = VXD::GeoCache::getInstance().getGeoTools();
357 if (gTools->getNumberOfSVDLayers() == 0) return;
358
359 // Add experiment and run number to the title of selected histograms (CR shifter plots)
360 StoreObjPtr<EventMetaData> evtMetaData;
361 m_expNumber = evtMetaData->getExperiment();
362 m_runNumber = evtMetaData->getRun();
363 TString runID = TString::Format(" ~ Exp%d Run%d", m_expNumber, m_runNumber);
364
365 //reset histograms
366 TObject* obj;
367 TIter nextH(m_histoList);
368 while ((obj = nextH()))
369 if (obj->InheritsFrom("TH1")) {
370 ((TH1F*)obj)->Reset();
371
372 TString tmp = (TString)obj->GetTitle();
373 Int_t pos = tmp.Last('~');
374 if (pos == -1) pos = tmp.Length() + 2;
375
376 TString title = tmp(0, pos - 2);
377 ((TH1F*)obj)->SetTitle(title + runID);
378 }
379}
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 75 of file SVDDQMClustersOnTrackModule.cc.

76{
78 if (gTools->getNumberOfLayers() == 0) {
79 B2FATAL("Missing geometry for VXD, check steering file.");
80 }
81 if (gTools->getNumberOfSVDLayers() == 0) {
82 B2WARNING("Missing geometry for SVD, SVD-DQM is skipped.");
83 return;
84 }
85
86 // Create a separate histogram directories and cd into it.
87 TDirectory* oldDir = gDirectory;
88 if (m_histogramDirectoryName != "") {
89 oldDir->mkdir(m_histogramDirectoryName.c_str());// do not use return value with ->cd(), its ZERO if dir already exists
90 oldDir->cd(m_histogramDirectoryName.c_str());
91 }
92
93 int ChargeBins = 80;
94 float ChargeMax = 160;
95 int SNRBins = 50;
96 float SNRMax = 100;
97 int TimeBins = 300;
98 float TimeMin = -150;
99 float TimeMax = 150;
100
101 int MaxBinBins = 6;
102 int MaxBinMax = 6;
103
104 TString refFrame = "in FTSW reference";
106 refFrame = "in SVD reference";
107
108
109 //----------------------------------------------------------------
110 // Charge of clusters for L3/L456 sensors
111 //----------------------------------------------------------------
112 TString name = "SVDTRK_ClusterChargeU3";
113 TString title = "SVD U-Cluster-on-Track Charge for layer 3 sensors";
114 m_clsTrkChargeU3 = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
115 m_clsTrkChargeU3->GetXaxis()->SetTitle("cluster charge [ke-]");
116 m_clsTrkChargeU3->GetYaxis()->SetTitle("count");
118 name = "SVDTRK_ClusterChargeV3";
119 title = "SVD V-Cluster-on-Track Charge for layer 3 sensors";
120 m_clsTrkChargeV3 = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
121 m_clsTrkChargeV3->GetXaxis()->SetTitle("cluster charge [ke-]");
122 m_clsTrkChargeV3->GetYaxis()->SetTitle("count");
124
125 name = "SVDTRK_ClusterChargeU456";
126 title = "SVD U-Cluster-on-Track Charge for layers 4,5,6 sensors";
127 m_clsTrkChargeU456 = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
128 m_clsTrkChargeU456->GetXaxis()->SetTitle("cluster charge [ke-]");
129 m_clsTrkChargeU456->GetYaxis()->SetTitle("count");
131
132 name = "SVDTRK_ClusterChargeV456";
133 title = "SVD V-Cluster-on-Track Charge for layers 4,5,6 sensors";
134 m_clsTrkChargeV456 = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
135 m_clsTrkChargeV456->GetXaxis()->SetTitle("cluster charge [ke-]");
136 m_clsTrkChargeV456->GetYaxis()->SetTitle("count");
138
139 m_clsTrkChargeL3 = new TH1F*[4];
140 m_clsTrkSNRL3 = new TH1F*[4];
141
142 int ind = 0;
143 for (int ladder = 1; ladder <= 2; ++ladder) {
144 for (int sensor = 1; sensor <= 2; ++sensor) {
145
146 name = Form("SVDTRK_ClusterCharge_L3.%d.%d", ladder, sensor);
147 title = Form("SVD Cluster-on-Track Charge for L3.%d.%d", ladder, sensor);
148 m_clsTrkChargeL3[ind] = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
149 m_clsTrkChargeL3[ind]->GetXaxis()->SetTitle("cluster charge [ke-]");
150 m_clsTrkChargeL3[ind]->GetYaxis()->SetTitle("count");
151 m_histoList->Add(m_clsTrkChargeL3[ind]);
152
153 name = Form("SVDTRK_ClusterSNR_L3.%d.%d", ladder, sensor);
154 title = Form("SVD Cluster-on-Track SNR for L3.%d.%d", ladder, sensor);
155 m_clsTrkSNRL3[ind] = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
156 m_clsTrkSNRL3[ind]->GetXaxis()->SetTitle("cluster SNR");
157 m_clsTrkSNRL3[ind]->GetYaxis()->SetTitle("count");
158 m_histoList->Add(m_clsTrkSNRL3[ind]);
159 ind++;
160 }
161 }
162
163 m_clsTrkCharge = new TH1F*[m_ladderMap.size()];
164 m_clsTrkSNR = new TH1F*[m_ladderMap.size()];
165
166 for (const auto& it : m_ladderMap) {
167 std::pair<int, int> p = it.first;
168 int layer = p.first;
169 int sensor = p.second;
170 int idx = it.second;
171 name = Form("SVDTRK_ClusterCharge_L%d.x.%d", layer, sensor);
172 title = Form("SVD Cluster-on-Track Charge for L%d.x.%d", layer, sensor);
173 m_clsTrkCharge[idx] = new TH1F(name.Data(), title.Data(), ChargeBins, 0, ChargeMax);
174 m_clsTrkCharge[idx]->GetXaxis()->SetTitle("cluster charge [ke-]");
175 m_clsTrkCharge[idx]->GetYaxis()->SetTitle("count");
176 m_histoList->Add(m_clsTrkCharge[idx]);
177
178 //printf("name %s layer %d sensor %d index %d\n", name.Data(), layer, sensor, idx);
179 name = Form("SVDTRK_ClusterSNR_L%d.x.%d", layer, sensor);
180 title = Form("SVD Cluster-on-Track SNR for L%d.x.%d", layer, sensor);
181 m_clsTrkSNR[idx] = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
182 m_clsTrkSNR[idx]->GetXaxis()->SetTitle("cluster SNR");
183 m_clsTrkSNR[idx]->GetYaxis()->SetTitle("count");
184 m_histoList->Add(m_clsTrkSNR[idx]);
185 }
186
187 //----------------------------------------------------------------
188 // SNR of clusters for L3/L456 sensors
189 //----------------------------------------------------------------
190 name = "SVDTRK_ClusterSNRU3";
191 title = "SVD U-Cluster-on-Track SNR for layer 3 sensors";
192 m_clsTrkSNRU3 = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
193 m_clsTrkSNRU3->GetXaxis()->SetTitle("cluster SNR");
194 m_clsTrkSNRU3->GetYaxis()->SetTitle("count");
196 name = "SVDTRK_ClusterSNRV3";
197 title = "SVD V-Cluster-on-Track SNR for layer 3 sensors";
198 m_clsTrkSNRV3 = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
199 m_clsTrkSNRV3->GetXaxis()->SetTitle("cluster SNR");
200 m_clsTrkSNRV3->GetYaxis()->SetTitle("count");
202
203 name = "SVDTRK_ClusterSNRU456";
204 title = "SVD U-Cluster-on-Track SNR for layers 4,5,6 sensors";
205 m_clsTrkSNRU456 = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
206 m_clsTrkSNRU456->GetXaxis()->SetTitle("cluster SNR");
207 m_clsTrkSNRU456->GetYaxis()->SetTitle("count");
209 name = "SVDTRK_ClusterSNRV456";
210 title = "SVD V-Cluster-on-Track SNR for layers 4,5,6 sensors";
211 m_clsTrkSNRV456 = new TH1F(name.Data(), title.Data(), SNRBins, 0, SNRMax);
212 m_clsTrkSNRV456->GetXaxis()->SetTitle("cluster SNR");
213 m_clsTrkSNRV456->GetYaxis()->SetTitle("count");
215
216 //----------------------------------------------------------------
217 // Time of clusters for L3/L456 sensors
218 //----------------------------------------------------------------
219 name = "SVDTRK_ClusterTimeU3";
220 title = Form("SVD U-Cluster-on-Track Time %s for layer 3 sensors", refFrame.Data());
221 m_clsTrkTimeU3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
222 m_clsTrkTimeU3->GetXaxis()->SetTitle("cluster time (ns)");
223 m_clsTrkTimeU3->GetYaxis()->SetTitle("count");
225 name = "SVDTRK_ClusterTimeV3";
226 title = Form("SVD V-Cluster-on-Track Time %s for layer 3 sensors", refFrame.Data());
227 m_clsTrkTimeV3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
228 m_clsTrkTimeV3->GetXaxis()->SetTitle("cluster time (ns)");
229 m_clsTrkTimeV3->GetYaxis()->SetTitle("count");
231
232 if (m_3Samples) {
233 name = "SVDTRK_Cluster3SampleTimeU3";
234 title = Form("SVD U-Cluster-on-Track Time %s for layer 3 sensors for 3 samples", refFrame.Data());
235 m_cls3SampleTrkTimeU3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
236 m_cls3SampleTrkTimeU3->GetXaxis()->SetTitle("cluster time (ns)");
237 m_cls3SampleTrkTimeU3->GetYaxis()->SetTitle("count");
239 name = "SVDTRK_Cluster3SampleTimeV3";
240 title = Form("SVD V-Cluster-on-Track Time %s for layer 3 sensors for 3 samples", refFrame.Data());
241 m_cls3SampleTrkTimeV3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
242 m_cls3SampleTrkTimeV3->GetXaxis()->SetTitle("cluster time (ns)");
243 m_cls3SampleTrkTimeV3->GetYaxis()->SetTitle("count");
245
246 name = "SVDTRK_Cluster6SampleTimeU3";
247 title = Form("SVD U-Cluster-on-Track Time %s for layer 3 sensors for 6 samples", refFrame.Data());
248 m_cls6SampleTrkTimeU3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
249 m_cls6SampleTrkTimeU3->GetXaxis()->SetTitle("cluster time (ns)");
250 m_cls6SampleTrkTimeU3->GetYaxis()->SetTitle("count");
252 name = "SVDTRK_Cluster6SampleTimeV3";
253 title = Form("SVD V-Cluster-on-Track Time %s for layer 3 sensors for 6 samples", refFrame.Data());
254 m_cls6SampleTrkTimeV3 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
255 m_cls6SampleTrkTimeV3->GetXaxis()->SetTitle("cluster time (ns)");
256 m_cls6SampleTrkTimeV3->GetYaxis()->SetTitle("count");
258 }
259
260 name = "SVDTRK_ClusterTimeU456";
261 title = Form("SVD U-Cluster-on-Track Time %s for layers 4,5,6 sensors", refFrame.Data());
262 m_clsTrkTimeU456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
263 m_clsTrkTimeU456->GetXaxis()->SetTitle("cluster time (ns)");
264 m_clsTrkTimeU456->GetYaxis()->SetTitle("count");
266 name = "SVDTRK_ClusterTimeV456";
267 title = Form("SVD V-Cluster-on-Track Time %s for layers 4,5,6 sensors", refFrame.Data());
268 m_clsTrkTimeV456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
269 m_clsTrkTimeV456->GetXaxis()->SetTitle("cluster time (ns)");
270 m_clsTrkTimeV456->GetYaxis()->SetTitle("count");
272
273 if (m_3Samples) {
274 name = "SVDTRK_Cluster3SampleTimeU456";
275 title = Form("SVD U-Cluster-on-Track Time %s for layers 4,5,6 sensors for 3 samples", refFrame.Data());
276 m_cls3SampleTrkTimeU456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
277 m_cls3SampleTrkTimeU456->GetXaxis()->SetTitle("cluster time (ns)");
278 m_cls3SampleTrkTimeU456->GetYaxis()->SetTitle("count");
280 name = "SVDTRK_Cluster3SampleTimeV456";
281 title = Form("SVD V-Cluster-on-Track Time %s for layers 4,5,6 sensors for 3 samples", refFrame.Data());
282 m_cls3SampleTrkTimeV456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
283 m_cls3SampleTrkTimeV456->GetXaxis()->SetTitle("cluster time (ns)");
284 m_cls3SampleTrkTimeV456->GetYaxis()->SetTitle("count");
286
287 name = "SVDTRK_Cluster6SampleTimeU456";
288 title = Form("SVD U-Cluster-on-Track Time %s for layers 4,5,6 sensors for 6 samples", refFrame.Data());
289 m_cls6SampleTrkTimeU456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
290 m_cls6SampleTrkTimeU456->GetXaxis()->SetTitle("cluster time (ns)");
291 m_cls6SampleTrkTimeU456->GetYaxis()->SetTitle("count");
293 name = "SVDTRK_Cluster6SampleTimeV456";
294 title = Form("SVD V-Cluster-on-Track Time %s for layers 4,5,6 sensors for 6 samples", refFrame.Data());
295 m_cls6SampleTrkTimeV456 = new TH1F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax);
296 m_cls6SampleTrkTimeV456->GetXaxis()->SetTitle("cluster time (ns)");
297 m_cls6SampleTrkTimeV456->GetYaxis()->SetTitle("count");
299 }
300
301 //----------------------------------------------------------------
302 // EventT0 vs Time of clusters for U and V sides
303 //----------------------------------------------------------------
304 name = "SVDTRK_ClusterTimeUvsEventT0";
305 title = Form("SVD U-Cluster-on-Track Time vs EventT0 %s for layer 3 sensors", refFrame.Data());
306 m_clsTrkTimeUEvtT0 = new TH2F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax, 100, -50, 50);
307 m_clsTrkTimeUEvtT0->GetXaxis()->SetTitle("clusters time (ns)");
308 m_clsTrkTimeUEvtT0->GetYaxis()->SetTitle("EventT0 (ns)");
310 name = "SVDTRK_ClusterTimeVvsEventT0";
311 title = Form("SVD V-Cluster-on-Track Time vs EventT0 %s for layer 3 sensors", refFrame.Data());
312 m_clsTrkTimeVEvtT0 = new TH2F(name.Data(), title.Data(), TimeBins, TimeMin, TimeMax, 100, -50, 50);
313 m_clsTrkTimeVEvtT0->GetXaxis()->SetTitle("cluster time (ns)");
314 m_clsTrkTimeVEvtT0->GetYaxis()->SetTitle("EventT0 (ns)");
316
317 //----------------------------------------------------------------
318 // MaxBin of strips for all sensors (offline ZS)
319 //----------------------------------------------------------------
320 name = "SVDTRK_StripMaxBinUAll";
321 title = "SVD U-Strip-on-Track MaxBin for all sensors";
322 m_stripMaxBinUAll = new TH1F(name.Data(), title.Data(), MaxBinBins, 0, MaxBinMax);
323 m_stripMaxBinUAll->GetXaxis()->SetTitle("max bin");
324 m_stripMaxBinUAll->GetYaxis()->SetTitle("count");
326 name = "SVDTRK_StripMaxBinVAll";
327 title = "SVD V-Strip-on-Track MaxBin for all sensors";
328 m_stripMaxBinVAll = new TH1F(name.Data(), title.Data(), MaxBinBins, 0, MaxBinMax);
329 m_stripMaxBinVAll->GetXaxis()->SetTitle("max bin");
330 m_stripMaxBinVAll->GetYaxis()->SetTitle("count");
332
333
334 oldDir->cd();
335}
TH1F ** m_clsTrkSNRL3
SNR of clusters related to tracks per layer 3.
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_clsTrkTimeU3
u Time of clusters related to tracks for layer 3 sensors
TH1F * m_cls3SampleTrkTimeV3
v Time of clusters related to tracks for layer 3 sensors for 3 sampes
TH1F * m_cls3SampleTrkTimeU456
u 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_cls6SampleTrkTimeU3
u Time of clusters related to tracks for layer 3 sensors for 3 samples
TH1F * m_cls6SampleTrkTimeV456
v 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_cls6SampleTrkTimeV3
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_cls3SampleTrkTimeU3
u Time of clusters related to tracks for layer 3 sensors for 3 samples
TH1F * m_stripMaxBinUAll
u MaxBin of strips related to tracks for all sensors
TH1F * m_cls6SampleTrkTimeU456
u Time of clusters related to tracks for layer 4,5,6 sensors for 6 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_cls3SampleTrkTimeV456
v Time of clusters related to tracks for layer 4,5,6 sensors for 3 samples
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 381 of file SVDDQMClustersOnTrackModule.cc.

382{
383
384 if (!m_tracks.isValid()) {
385 B2WARNING("Missing Tracks StoreArray. Skipping SVDDQMClustersOnTrack");
386 return;
387 }
388
389 if (!m_svdEventInfo.isValid())
390 m_tb = -1;
391 else {
392 if (m_tb != -1)
393 if (m_svdEventInfo->getModeByte().getTriggerBin() != m_tb)
394 return;
395 }
396
397 int nSamples = 0;
398 if (m_svdEventInfo.isValid())
399 nSamples = m_svdEventInfo->getNSamples();
400 else
401 return;
402
403 // get EventT0 if present and valid
404 double eventT0 = -1000;
405 if (m_eventT0.isOptional())
406 if (m_eventT0.isValid())
407 if (m_eventT0->hasEventT0())
408 eventT0 = m_eventT0->getEventT0();
409
410 // if svd time in SVD time reference is shown, eventT0 is also synchronized with SVD reference frame, firstFrame = 0
411 if (m_desynchSVDTime && m_svdEventInfo.isValid())
412 eventT0 = eventT0 - m_svdEventInfo->getSVD2FTSWTimeShift(0);
413
414 //check HLT decision and increase number of events only if the event has been accepted
415
418 if (!eventAccepted) return;
419 }
420
421 auto gTools = VXD::GeoCache::getInstance().getGeoTools();
422 if (gTools->getNumberOfSVDLayers() == 0) return;
423
424
425 for (const Track& track : m_tracks) {
426
427 const TrackFitResult* tfr = track.getTrackFitResultWithClosestMass(Const::pion);
428 if (not tfr) continue;
429
430 const RecoTrack* recoTrack = track.getRelated<RecoTrack>();
431 if (not recoTrack) continue;
432
433 for (const SVDCluster& svdCluster : recoTrack->getRelationsWith<SVDCluster>(m_svdClustersName)) {
434
435 int iLayer = svdCluster.getSensorID().getLayerNumber();
436 int iLadder = svdCluster.getSensorID().getLadderNumber();
437 int iSensor = svdCluster.getSensorID().getSensorNumber();
438
439 if (iLayer == 3) {
440 int ind = -1;
441 if (iLadder == 1 && iSensor == 1) {
442 ind = 0;
443 } else if (iLadder == 1 && iSensor == 2) {
444 ind = 1;
445 } else if (iLadder == 2 && iSensor == 1) {
446 ind = 2;
447 } else if (iLadder == 2 && iSensor == 2) {
448 ind = 3;
449 }
450
451 if (ind != -1) {
452 if (m_clsTrkChargeL3[ind] != nullptr) m_clsTrkChargeL3[ind]->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
453 if (m_clsTrkSNRL3[ind] != nullptr) m_clsTrkSNRL3[ind]->Fill(svdCluster.getSNR());
454 }
455
456 }
457
458 std::pair<int, int> p(iLayer, iSensor);
459 int idx = m_ladderMap[p];
460
461 if (m_clsTrkCharge[idx] != nullptr) m_clsTrkCharge[idx]->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
462 if (m_clsTrkSNR[idx] != nullptr) m_clsTrkSNR[idx]->Fill(svdCluster.getSNR());
463
464 float time = svdCluster.getClsTime();
465 if (m_desynchSVDTime && m_svdEventInfo.isValid())
466 time = time - m_svdEventInfo->getSVD2FTSWTimeShift(svdCluster.getFirstFrame());
467
468 if (svdCluster.isUCluster()) {
469
470 m_clsTrkTimeUEvtT0->Fill(time, eventT0);
471
472 if (iLayer == 3) {
473 if (m_clsTrkChargeU3 != nullptr) m_clsTrkChargeU3->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
474 if (m_clsTrkSNRU3 != nullptr) m_clsTrkSNRU3->Fill(svdCluster.getSNR());
475 if (m_clsTrkTimeU3 != nullptr) m_clsTrkTimeU3->Fill(time);
476
477 if (m_3Samples) {
478 if (nSamples == 3) {
479 if (m_cls3SampleTrkTimeU3 != nullptr) m_cls3SampleTrkTimeU3->Fill(time);
480 } else {
481 if (m_cls6SampleTrkTimeU3 != nullptr) m_cls6SampleTrkTimeU3->Fill(time);
482 }
483 }
484 } else {
485 if (m_clsTrkChargeU456 != nullptr) m_clsTrkChargeU456->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
486 if (m_clsTrkSNRU456 != nullptr) m_clsTrkSNRU456->Fill(svdCluster.getSNR());
487 if (m_clsTrkTimeU456 != nullptr) m_clsTrkTimeU456->Fill(time);
488
489 if (m_3Samples) {
490 if (nSamples == 3) {
491 if (m_cls3SampleTrkTimeU456 != nullptr) m_cls3SampleTrkTimeU456->Fill(time);
492 } else {
493 if (m_cls6SampleTrkTimeU456 != nullptr) m_cls6SampleTrkTimeU456->Fill(time);
494 }
495 }
496 }
497
498 for (const SVDRecoDigit& recoDigit : svdCluster.getRelationsTo<SVDRecoDigit>(m_svdRecoDigitsName)) {
499
501 if (m_stripMaxBinUAll != nullptr and shaper != nullptr) m_stripMaxBinUAll->Fill(shaper->getMaxTimeBin());
502 }
503
504
505 } else {
506
507 m_clsTrkTimeVEvtT0->Fill(time, eventT0);
508
509 if (iLayer == 3) {
510 if (m_clsTrkChargeV3 != nullptr) m_clsTrkChargeV3->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
511 if (m_clsTrkSNRV3 != nullptr) m_clsTrkSNRV3->Fill(svdCluster.getSNR());
512 if (m_clsTrkTimeV3 != nullptr) m_clsTrkTimeV3->Fill(time);
513 if (m_3Samples) {
514 if (nSamples == 3) {
515 if (m_cls3SampleTrkTimeV3 != nullptr) m_cls3SampleTrkTimeV3->Fill(time);
516 } else {
517 if (m_cls6SampleTrkTimeV3 != nullptr) m_cls6SampleTrkTimeV3->Fill(time);
518 }
519 }
520 } else {
521 if (m_clsTrkChargeV456 != nullptr) m_clsTrkChargeV456->Fill(svdCluster.getCharge() / 1000.0); // in kelectrons
522 if (m_clsTrkSNRV456 != nullptr) m_clsTrkSNRV456->Fill(svdCluster.getSNR());
523 if (m_clsTrkTimeV456 != nullptr) m_clsTrkTimeV456->Fill(time);
524 if (m_3Samples) {
525 if (nSamples == 3) {
526 if (m_cls3SampleTrkTimeV456 != nullptr) m_cls3SampleTrkTimeV456->Fill(time);
527 } else {
528 if (m_cls6SampleTrkTimeV456 != nullptr) m_cls6SampleTrkTimeV456->Fill(time);
529 }
530 }
531 }
532
533 for (const SVDRecoDigit& recoDigit : svdCluster.getRelationsTo<SVDRecoDigit>(m_svdRecoDigitsName)) {
534
536 if (m_stripMaxBinVAll != nullptr and shaper != nullptr) m_stripMaxBinVAll->Fill(shaper->getMaxTimeBin());
537 }
538
539 }
540
541 }
542 }
543}
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://xwiki.desy.de/xwiki/rest/p/f4fa4/#HModuleDevelopment
396
397)");
398 module
399 .def("__str__", &Module::getPathString)
400 .def("name", &Module::getName, return_value_policy<copy_const_reference>(),
401 "Returns the name of the module. Can be changed via :func:`set_name() <Module.set_name()>`, use :func:`type() <Module.type()>` for identifying a particular module class.")
402 .def("type", &Module::getType, return_value_policy<copy_const_reference>(),
403 "Returns the type of the module (i.e. class name minus 'Module')")
404 .def("set_name", &Module::setName, args("name"), R"(
405Set custom name, e.g. to distinguish multiple modules of the same type.
406
407>>> path.add_module('EventInfoSetter')
408>>> ro = path.add_module('RootOutput', branchNames=['EventMetaData'])
409>>> ro.set_name('RootOutput_metadata_only')
410>>> print(path)
411[EventInfoSetter -> RootOutput_metadata_only]
412
413)")
414 .def("description", &Module::getDescription, return_value_policy<copy_const_reference>(),
415 "Returns the description of this module.")
416 .def("package", &Module::getPackage, return_value_policy<copy_const_reference>(),
417 "Returns the package this module belongs to.")
418 .def("available_params", &_getParamInfoListPython,
419 "Return list of all module parameters as `ModuleParamInfo` instances")
420 .def("has_properties", &Module::hasProperties, (bp::arg("properties")),
421 R"DOCSTRING(Allows to check if the module has the given properties out of `ModulePropFlags` set.
422
423>>> if module.has_properties(ModulePropFlags.PARALLELPROCESSINGCERTIFIED):
424>>> ...
425
426Parameters:
427 properties (int): bitmask of `ModulePropFlags` to check for.
428)DOCSTRING")
429 .def("set_property_flags", &Module::setPropertyFlags, args("property_mask"),
430 "Set module properties in the form of an OR combination of `ModulePropFlags`.");
431 {
432 // python signature is too crowded, make ourselves
433 docstring_options subOptions(true, false, false); //userdef, py sigs, c++ sigs
434 module
435 .def("if_value", &Module::if_value,
436 (bp::arg("expression"), bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
437 R"DOCSTRING(if_value(expression, condition_path, after_condition_path=AfterConditionPath.END)
438
439Sets a conditional sub path which will be executed after this
440module if the return value set in the module passes the given ``expression``.
441
442Modules can define a return value (int or bool) using ``setReturnValue()``,
443which can be used in the steering file to split the Path based on this value, for example
444
445>>> module_with_condition.if_value("<1", another_path)
446
447In case the return value of the ``module_with_condition`` for a given event is
448less than 1, the execution will be diverted into ``another_path`` for this event.
449
450You could for example set a special return value if an error occurs, and divert
451the execution into a path containing :b2:mod:`RootOutput` if it is found;
452saving only the data producing/produced by the error.
453
454After a conditional path has executed, basf2 will by default stop processing
455the path for this event. This behaviour can be changed by setting the
456``after_condition_path`` argument.
457
458Parameters:
459 expression (str): Expression to determine if the conditional path should be executed.
460 This should be one of the comparison operators ``<``, ``>``, ``<=``,
461 ``>=``, ``==``, or ``!=`` followed by a numerical value for the return value
462 condition_path (Path): path to execute in case the expression is fulfilled
463 after_condition_path (AfterConditionPath): What to do once the ``condition_path`` has been executed.
464)DOCSTRING")
465 .def("if_false", &Module::if_false,
466 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
467 R"DOC(if_false(condition_path, after_condition_path=AfterConditionPath.END)
468
469Sets a conditional sub path which will be executed after this module if
470the return value of the module evaluates to False. This is equivalent to
471calling `if_value` with ``expression=\"<1\"``)DOC")
472 .def("if_true", &Module::if_true,
473 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
474 R"DOC(if_true(condition_path, after_condition_path=AfterConditionPath.END)
475
476Sets a conditional sub path which will be executed after this module if
477the return value of the module evaluates to True. It is equivalent to
478calling `if_value` with ``expression=\">=1\"``)DOC");
479 }
480 module
481 .def("has_condition", &Module::hasCondition,
482 "Return true if a conditional path has been set for this module "
483 "using `if_value`, `if_true` or `if_false`")
484 .def("get_all_condition_paths", &_getAllConditionPathsPython,
485 "Return a list of all conditional paths set for this module using "
486 "`if_value`, `if_true` or `if_false`")
487 .def("get_all_conditions", &_getAllConditionsPython,
488 "Return a list of all conditional path expressions set for this module using "
489 "`if_value`, `if_true` or `if_false`")
490 .add_property("logging", make_function(&Module::getLogConfig, return_value_policy<reference_existing_object>()),
@ c_GE
Greater or equal than: ">=".
@ c_SE
Smaller or equal than: "<=".
@ c_GT
Greater than: ">"
@ c_NE
Not equal: "!=".
@ c_EQ
Equal: "=" or "=="
@ c_ST
Smaller than: "<"
Base class for Modules.
Definition: Module.h:72
LogConfig & getLogConfig()
Returns the log system configuration.
Definition: Module.h:225
void if_value(const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
Add a condition to the module.
Definition: Module.cc:79
void if_true(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to set the condition of the module.
Definition: Module.cc:90
void setReturnValue(int value)
Sets the return value for this module as integer.
Definition: Module.cc:220
void setLogConfig(const LogConfig &logConfig)
Set the log system configuration.
Definition: Module.h:230
const std::string & getDescription() const
Returns the description of the module.
Definition: Module.h:202
void if_false(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to add a condition to the module.
Definition: Module.cc:85
bool hasCondition() const
Returns true if at least one condition was set for the module.
Definition: Module.h:311
const std::string & getPackage() const
Returns the package this module is in.
Definition: Module.h:197
void setName(const std::string &name)
Set the name of the module.
Definition: Module.h:214
bool hasProperties(unsigned int propertyFlags) const
Returns true if all specified property flags are available in this module.
Definition: Module.cc:160
std::string getPathString() const override
return the module name.
Definition: Module.cc:192

◆ getAfterConditionPath()

Module::EAfterConditionPath getAfterConditionPath ( ) const
inherited

What to do after the conditional path is finished.

(defaults to c_End if no condition is set)

Definition at line 133 of file Module.cc.

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

◆ getAllConditionPaths()

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

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

Definition at line 150 of file Module.cc.

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

◆ getAllConditions()

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

Return all set conditions for this module.

Definition at line 324 of file Module.h.

325 {
326 return m_conditions;
327 }

◆ getCondition()

const ModuleCondition * getCondition ( ) const
inlineinherited

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

Definition at line 314 of file Module.h.

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

◆ getConditionPath()

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

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


Definition at line 113 of file Module.cc.

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

◆ getDescription()

const std::string & getDescription ( ) const
inlineinherited

Returns the description of the module.

Definition at line 202 of file Module.h.

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

◆ getFileNames()

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

Return a list of output filenames for this modules.

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

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

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

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

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

Reimplemented in RootInputModule, StorageRootOutputModule, and RootOutputModule.

Definition at line 134 of file Module.h.

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

◆ getLogConfig()

LogConfig & getLogConfig ( )
inlineinherited

Returns the log system configuration.

Definition at line 225 of file Module.h.

225{return m_logConfig;}

◆ getModules()

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

no submodules, return empty list

Implements PathElement.

Definition at line 506 of file Module.h.

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

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns the name of the module.

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

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

Definition at line 187 of file Module.h.

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

◆ getPackage()

const std::string & getPackage ( ) const
inlineinherited

Returns the package this module is in.

Definition at line 197 of file Module.h.

197{return m_package;}

◆ getParamInfoListPython()

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

Returns a python list of all parameters.

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

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

Definition at line 279 of file Module.cc.

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

◆ getParamList()

const ModuleParamList & getParamList ( ) const
inlineinherited

Return module param list.

Definition at line 363 of file Module.h.

363{ return m_moduleParamList; }

◆ getPathString()

std::string getPathString ( ) const
overrideprivatevirtualinherited

return the module name.

Implements PathElement.

Definition at line 192 of file Module.cc.

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

◆ getReturnValue()

int getReturnValue ( ) const
inlineinherited

Return the return value set by this module.

This value is only meaningful if hasReturnValue() is true

Definition at line 381 of file Module.h.

381{ return m_returnValue; }

◆ getType()

const std::string & getType ( ) const
inherited

Returns the type of the module (i.e.

class name minus 'Module')

Definition at line 41 of file Module.cc.

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

◆ hasCondition()

bool hasCondition ( ) const
inlineinherited

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

Definition at line 311 of file Module.h.

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

◆ hasProperties()

bool hasProperties ( unsigned int  propertyFlags) const
inherited

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

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

Definition at line 160 of file Module.cc.

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

◆ hasReturnValue()

bool hasReturnValue ( ) const
inlineinherited

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

Definition at line 378 of file Module.h.

378{ return m_hasReturnValue; }

◆ hasUnsetForcedParams()

bool hasUnsetForcedParams ( ) const
inherited

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

Definition at line 166 of file Module.cc.

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

◆ if_false()

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

A simplified version to add a condition to the module.

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

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

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

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

Definition at line 85 of file Module.cc.

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

◆ if_true()

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

A simplified version to set the condition of the module.

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

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

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

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

Definition at line 90 of file Module.cc.

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

◆ if_value()

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

Add a condition to the module.

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

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

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

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

Definition at line 79 of file Module.cc.

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

◆ initialize()

void initialize ( void  )
finaloverridevirtual

Module function initialize.

Reimplemented from HistoModule.

Definition at line 338 of file SVDDQMClustersOnTrackModule.cc.

339{
340 // Register histograms (calls back defineHisto)
341 REG_HISTOGRAM
342
343 auto gTools = VXD::GeoCache::getInstance().getGeoTools();
344 if (gTools->getNumberOfSVDLayers() != 0) {
345
347 m_eventT0.isOptional();
348 m_tracks.isOptional();
349 m_resultStoreObjectPointer.isOptional();
350
351 }
352}

◆ 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 546 of file SVDDQMClustersOnTrackModule.cc.

547{
548
549 delete m_histoList;
550
551}

Member Data Documentation

◆ m_3Samples

bool m_3Samples = false
private

if true enable 3 samples histograms analysis

Definition at line 61 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls3SampleTrkTimeU3

TH1F* m_cls3SampleTrkTimeU3 = nullptr
private

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

Definition at line 137 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls3SampleTrkTimeU456

TH1F* m_cls3SampleTrkTimeU456 = nullptr
private

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

Definition at line 152 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls3SampleTrkTimeV3

TH1F* m_cls3SampleTrkTimeV3 = nullptr
private

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

Definition at line 139 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls3SampleTrkTimeV456

TH1F* m_cls3SampleTrkTimeV456 = nullptr
private

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

Definition at line 154 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls6SampleTrkTimeU3

TH1F* m_cls6SampleTrkTimeU3 = nullptr
private

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

Definition at line 142 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls6SampleTrkTimeU456

TH1F* m_cls6SampleTrkTimeU456 = nullptr
private

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

Definition at line 157 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls6SampleTrkTimeV3

TH1F* m_cls6SampleTrkTimeV3 = nullptr
private

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

Definition at line 144 of file SVDDQMClustersOnTrackModule.h.

◆ m_cls6SampleTrkTimeV456

TH1F* m_cls6SampleTrkTimeV456 = nullptr
private

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

Definition at line 159 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkCharge

TH1F** m_clsTrkCharge = nullptr
private

charge of clusters related to tracks per ladder

Definition at line 93 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkChargeL3

TH1F** m_clsTrkChargeL3 = nullptr
private

charge of clusters related to tracks per layer 3

Definition at line 99 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 105 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 109 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 107 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 111 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkSNR

TH1F** m_clsTrkSNR = nullptr
private

SNR of clusters related to tracks per ladder.

Definition at line 96 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkSNRL3

TH1F** m_clsTrkSNRL3 = nullptr
private

SNR of clusters related to tracks per layer 3.

Definition at line 102 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 114 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 118 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 116 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 120 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 132 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 147 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkTimeUEvtT0

TH2F* m_clsTrkTimeUEvtT0 = nullptr
private

u Time of clusters related to tracks vs EventT0

Definition at line 128 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 134 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 149 of file SVDDQMClustersOnTrackModule.h.

◆ m_clsTrkTimeVEvtT0

TH2F* m_clsTrkTimeVEvtT0 = nullptr
private

v Time of clusters related to tracks vs EventT0

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

◆ m_expNumber

int m_expNumber = 0
private

experiment number

Definition at line 85 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 90 of file SVDDQMClustersOnTrackModule.h.

◆ m_histoList

TList* m_histoList = nullptr
private

list of cumulative histograms

Definition at line 82 of file SVDDQMClustersOnTrackModule.h.

◆ m_ladderMap

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

map of ladder index

Definition at line 162 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 74 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 87 of file SVDDQMClustersOnTrackModule.h.

◆ m_skipRejectedEvents

bool m_skipRejectedEvents = true
private

if true skip events rejected by HLT (default)

Definition at line 77 of file SVDDQMClustersOnTrackModule.h.

◆ m_stripMaxBinUAll

TH1F* m_stripMaxBinUAll = nullptr
private

u MaxBin of strips related to tracks for all sensors

Definition at line 123 of file SVDDQMClustersOnTrackModule.h.

◆ m_stripMaxBinVAll

TH1F* m_stripMaxBinVAll = nullptr
private

v MaxBin of strips related to tracks for all sensors

Definition at line 125 of file SVDDQMClustersOnTrackModule.h.

◆ m_svdClustersName

std::string m_svdClustersName
private

SVDClusters data object name.

Definition at line 65 of file SVDDQMClustersOnTrackModule.h.

◆ m_svdEventInfo

StoreObjPtr<SVDEventInfo> m_svdEventInfo
private

SVDEventInfo data object.

Definition at line 67 of file SVDDQMClustersOnTrackModule.h.

◆ m_svdEventInfoName

std::string m_svdEventInfoName
private

SVDEventInfo data object name.

Definition at line 66 of file SVDDQMClustersOnTrackModule.h.

◆ m_svdRecoDigitsName

std::string m_svdRecoDigitsName
private

SVDRecoDigits data object name.

Definition at line 64 of file SVDDQMClustersOnTrackModule.h.

◆ m_svdShaperDigitsName

std::string m_svdShaperDigitsName
private

SVDShaperDigits data object name.

Definition at line 63 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 79 of file SVDDQMClustersOnTrackModule.h.

◆ m_tracks

StoreArray<Track> m_tracks
private

StoreArray of the Tracks.

Definition at line 71 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: