Belle II Software  release-08-01-10
TrackingHLTDQMModule Class Reference

Tracking HLT DQM. More...

#include <TrackingHLTDQMModule.h>

Inheritance diagram for TrackingHLTDQMModule:
Collaboration diagram for TrackingHLTDQMModule:

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

 TrackingHLTDQMModule ()
 Constructor.
 
 ~TrackingHLTDQMModule ()
 Destructor.
 
void initialize () override
 Module functions.
 
void event () override
 fill of the histograms happens here
 
virtual void defineHisto () override
 Histogram definitions such as TH1(), TH2(), TNtuple(), TTree().... More...
 
virtual void beginRun () override
 Called when entering a new run.
 
void runningOnHLT ()
 function called when the module is run on HLT
 
virtual TH1F * Create (std::string name, std::string title, int nbinsx, double xlow, double xup, std::string xTitle, std::string yTitle)
 Function to create TH1F and add it to the vector of histograms (m_histograms). More...
 
virtual TH2F * Create (std::string name, std::string title, int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup, std::string xTitle, std::string yTitle, std::string zTitle)
 Same as above but for TH2F.
 
virtual TH1F ** CreateLayers (boost::format nameTemplate, boost::format titleTemplate, int nbinsx, double xlow, double xup, std::string xTitle, std::string yTitle)
 Function to create array of TH1F histograms, one for each layer. More...
 
virtual TH2F ** CreateLayers (boost::format nameTemplate, boost::format titleTemplate, int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup, std::string xTitle, std::string yTitle, std::string zTitle)
 Same as above but for TH2F.
 
virtual TH1F ** CreateSensors (boost::format nameTemplate, boost::format titleTemplate, int nbinsx, double xlow, double xup, std::string xTitle, std::string yTitle)
 Function to create array of TH1F histograms, one for each sensor. More...
 
virtual TH2F ** CreateSensors (boost::format nameTemplate, boost::format titleTemplate, int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup, std::string xTitle, std::string yTitle, std::string zTitle)
 Same as above but for TH2F.
 
virtual void endRun () override
 Function to process end_run record.
 
virtual void terminate () override
 Function to terminate module.
 
virtual std::vector< std::string > getFileNames (bool outputFiles)
 Return a list of output filenames for this modules. More...
 
const std::string & getName () const
 Returns the name of the module. More...
 
const std::string & getType () const
 Returns the type of the module (i.e. More...
 
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. More...
 
void setPropertyFlags (unsigned int propertyFlags)
 Sets the flags for the module properties. More...
 
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. More...
 
void if_value (const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 Add a condition to the module. More...
 
void if_false (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to add a condition to the module. More...
 
void if_true (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to set the condition of the module. More...
 
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. More...
 
std::shared_ptr< PathgetConditionPath () const
 Returns the path of the last true condition (if there is at least one, else reaturn a null pointer). More...
 
Module::EAfterConditionPath getAfterConditionPath () const
 What to do after the conditional path is finished. More...
 
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. More...
 
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. More...
 
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. More...
 
std::shared_ptr< PathElementclone () const override
 Create an independent copy of this module. More...
 
std::shared_ptr< boost::python::list > getParamInfoListPython () const
 Returns a python list of all parameters. More...
 
Fill- functions

All the following Fill- functions are used by DQMEventProcessorBase or derived classes to fill histograms.

They are supposed not to contain any computations need for more than one of them. All computations should be moved to the DQMEventProcessorBase or derived classes.

virtual void FillTrackIndexes (int iTrack, int iTrackVXD, int iTrackCDC, int iTrackVXDCDC)
 Fill histograms with track indexes.
 
virtual void FillHitNumbers (int nPXD, int nSVD, int nCDC)
 Fill histograms with numbers of hits.
 
virtual void FillMomentumAngles (const TrackFitResult *tfr)
 Fill histograms with track momentum Pt. More...
 
virtual void FillMomentumCoordinates (const TrackFitResult *tfr)
 Fill histograms with track momentum Pt. More...
 
virtual void FillHelixParametersAndCorrelations (const TrackFitResult *tfr)
 Fill histograms with helix parameters and their correlations.
 
virtual void FillTrackFitStatus (const genfit::FitStatus *tfs)
 Fill histograms which require FitStatus.
 
virtual void FillTRClusterCorrelations (float phi_deg, float phiPrev_deg, float theta_deg, float thetaPrev_deg, int correlationIndex)
 Fill histograms with correlations between neighbor layers.
 
virtual void FillTRClusterHitmap (float phi_deg, float theta_deg, int layerIndex)
 Fill cluster hitmap in IP angle range.
 
virtual void FillUBResidualsPXD (const B2Vector3D &residual_um)
 Fill histograms with unbiased residuals in PXD sensors.
 
virtual void FillUBResidualsSVD (const B2Vector3D &residual_um)
 Fill histograms with unbiased residuals in SVD sensors.
 
virtual void FillHalfShellsPXD (const B2Vector3D &globalResidual_um, bool isNotYang)
 Fill histograms with unbiased residuals for half-shells for PXD sensors.
 
virtual void FillHalfShellsSVD (const B2Vector3D &globalResidual_um, bool isNotMat)
 Fill histograms with unbiased residuals for half-shells for SVD sensors.
 
virtual void FillUB1DResidualsSensor (const B2Vector3D &residual_um, int sensorIndex)
 Fill 1D histograms with unbiased residuals for individual sensors.
 
virtual void FillUB2DResidualsSensor (const B2Vector3D &residual_um, int sensorIndex)
 Fill 2D histograms with unbiased residuals for individual sensors.
 

Static Public Member Functions

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

Protected Member Functions

virtual void DefineAbortFlagsHistograms ()
 All the following Define- functions should be used in the defineHisto() function to define histograms. More...
 
void ProcessHistogramParameterChange (const std::string &name, const std::string &parameter, const std::string &value)
 Process one change in histogram parameters. More...
 
void EditHistogramParameter (TH1 *histogram, const std::string &parameter, std::string value)
 On given histogram sets given parameter to given value. More...
 
virtual void def_initialize ()
 Wrappers to make the methods without "def_" prefix callable from Python. More...
 
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. More...
 
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. More...
 
void setType (const std::string &type)
 Set the module type. More...
 
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. More...
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description)
 Adds a new enforced parameter to the module. More...
 
void setReturnValue (int value)
 Sets the return value for this module as integer. More...
 
void setReturnValue (bool value)
 Sets the return value for this module as bool. More...
 
void setParamList (const ModuleParamList &params)
 Replace existing parameter list.
 
virtual void DefineTracks ()
 All the following Define- functions should be used in the defineHisto() function to define histograms. More...
 
virtual void DefineHits ()
 Define histograms with numbers of hits.
 
virtual void DefineMomentumAngles ()
 Define histograms with track momentum Pt. More...
 
virtual void DefineMomentumCoordinates ()
 Define histograms with track momentum Pt. More...
 
virtual void DefineHelixParametersAndCorrelations ()
 Define histograms with helix parameters and their correlations.
 
virtual void DefineTrackFitStatus ()
 Define histograms which require FitStatus.
 
virtual void DefineTRClusters ()
 Define histograms with correlations between neighbor layers and cluster hitmap in IP angle range. More...
 
virtual void DefineUBResidualsVXD ()
 Define histograms with unbiased residuals in PXD and SVD sensors.
 
virtual void DefineHalfShellsVXD ()
 Define histograms with unbiased residuals for half-shells for PXD and SVD sensors.
 
virtual void Define1DSensors ()
 Define 1D histograms with unbiased residuals for individual sensors.
 
virtual void Define2DSensors ()
 Define 2D histograms with unbiased residuals for individual sensors.
 

Static Protected Member Functions

static std::string SensorNameDescription (VxdID sensorID)
 Creates string description of the sensor from given sensor ID to be used in a histogram name. More...
 
static std::string SensorTitleDescription (VxdID sensorID)
 Creates string description of the sensor from given sensor ID to be used in a histogram title. More...
 
static void ComputeMean (TH1F *output, TH2F *input, bool onX=true)
 Creates a graph of means by given axis from given TH2F histogram. More...
 

Protected Attributes

StoreArray< RawFTSWm_rawTTD
 Input array for DAQ Status.
 
StoreObjPtr< EventLevelTrackingInfom_eventLevelTrackingInfo
 Acccess to the EventLevelTrackingInfo object in the datastore.
 
TH1F * m_trackingErrorFlags = nullptr
 Monitors the Error flags set by the tracking code. More...
 
TH2F * m_abortVStimeHER = nullptr
 abort rate as a function of time after injection and time within a beam cycle - HER
 
TH2F * m_allVStimeHER = nullptr
 number of events as a function of time after injection and time within a beam cycle - HER
 
TH2F * m_abortVStimeLER = nullptr
 abort rate as a function of time after injection and time within a beam cycle - LER
 
TH2F * m_allVStimeLER = nullptr
 number of events as a function of time after injection and time within a beam cycle - LER
 
std::vector< TH1 * > m_histograms
 All histograms created via the Create- functions are automatically added to this set. More...
 
bool histogramsDefined = false
 True if the defineHisto() was called. More...
 
bool m_hltDQM = false
 True if the DQM module is run on HLT.
 
std::vector< std::tuple< std::string, std::string, std::string > > m_histogramParameterChanges
 Used for changing parameters of histograms via the ProcessHistogramParameterChange function. More...
 
std::string m_tracksStoreArrayName
 StoreArray name where Tracks are written.
 
std::string m_recoTracksStoreArrayName
 StoreArray name where RecoTracks are written.
 
TH1F * m_PValue = nullptr
 p Value
 
TH1F * m_Chi2 = nullptr
 Chi2.
 
TH1F * m_NDF = nullptr
 NDF.
 
TH1F * m_Chi2NDF = nullptr
 Chi2 / NDF.
 
TH2F * m_UBResidualsPXD = nullptr
 Unbiased residuals for PXD u vs v.
 
TH2F * m_UBResidualsSVD = nullptr
 Unbiased residuals for SVD u vs v.
 
TH2F ** m_UBResidualsSensor = nullptr
 Unbiased residuals for PXD and SVD u vs v per sensor.
 
TH1F * m_UBResidualsPXDU = nullptr
 Unbiased residuals for PXD u.
 
TH1F * m_UBResidualsSVDU = nullptr
 Unbiased residuals for SVD u.
 
TH1F ** m_UBResidualsSensorU = nullptr
 Unbiased residuals for PXD and SVD u per sensor.
 
TH1F * m_UBResidualsPXDV = nullptr
 Unbiased residuals for PXD v.
 
TH1F * m_UBResidualsSVDV = nullptr
 Unbiased residuals for SVD v.
 
TH1F * m_UBResidualsPXDX_Yin = nullptr
 half-shells More...
 
TH1F * m_UBResidualsPXDX_Yang = nullptr
 Unbiased residuals in X for PXD for Yang.
 
TH1F * m_UBResidualsSVDX_Pat = nullptr
 Unbiased residuals in X for PXD for Pat.
 
TH1F * m_UBResidualsSVDX_Mat = nullptr
 Unbiased residuals in X for PXD for Mat.
 
TH1F * m_UBResidualsPXDY_Yin = nullptr
 Unbiased residuals in Y for PXD for Yin.
 
TH1F * m_UBResidualsPXDY_Yang = nullptr
 Unbiased residuals in Y for PXD for Yang.
 
TH1F * m_UBResidualsSVDY_Pat = nullptr
 Unbiased residuals in Y for PXD for Pat.
 
TH1F * m_UBResidualsSVDY_Mat = nullptr
 Unbiased residuals in Y for PXD for Mat.
 
TH1F * m_UBResidualsPXDZ_Yin = nullptr
 Unbiased residuals in Z for PXD for Yin.
 
TH1F * m_UBResidualsPXDZ_Yang = nullptr
 Unbiased residuals in Z for PXD for Yang.
 
TH1F * m_UBResidualsSVDZ_Pat = nullptr
 Unbiased residuals in Z for PXD for Pat.
 
TH1F * m_UBResidualsSVDZ_Mat = nullptr
 Unbiased residuals in Z for PXD for Mat.
 
TH1F ** m_UBResidualsSensorV = nullptr
 Unbiased residuals for PXD and SVD v per sensor.
 
TH2F ** m_TRClusterHitmap = nullptr
 Track related clusters - hitmap in IP angle range.
 
TH2F ** m_TRClusterCorrelationsPhi = nullptr
 Track related clusters - neighbor correlations in Phi.
 
TH2F ** m_TRClusterCorrelationsTheta = nullptr
 Track related clusters - neighbor corelations in Theta.
 
TH1F * m_MomPhi = nullptr
 Track momentum Pt.Phi.
 
TH1F * m_MomTheta = nullptr
 Track momentum Pt.Theta.
 
TH1F * m_MomCosTheta = nullptr
 Track momentum Pt.CosTheta.
 
TH1F * m_MomX = nullptr
 Track momentum Pt.X.
 
TH1F * m_MomY = nullptr
 Track momentum Pt.Y.
 
TH1F * m_MomZ = nullptr
 Track momentum Pt.Z.
 
TH1F * m_MomPt = nullptr
 Track momentum Pt.
 
TH1F * m_Mom = nullptr
 Track momentum Magnitude.
 
TH1F * m_D0 = nullptr
 d0 - the signed distance to the IP in the r-phi plane
 
TH2F * m_PhiD0 = nullptr
 d0 vs Phi - the signed distance to the IP in the r-phi plane
 
TH1F * m_Z0 = nullptr
 z0 - the z0 coordinate of the perigee (beam spot position)
 
TH2F * m_D0Z0 = nullptr
 z0 vs d0 - signed distance to the IP in r-phi vs. More...
 
TH1F * m_Phi = nullptr
 Phi - the angle of the transverse momentum in the r-phi plane, with CDF naming convention.
 
TH1F * m_TanLambda = nullptr
 TanLambda - the slope of the track in the r-z plane.
 
TH1F * m_Omega = nullptr
 Omega - the curvature of the track. More...
 
TH1F * m_HitsPXD = nullptr
 Number of hits on PXD.
 
TH1F * m_HitsSVD = nullptr
 Number of hits on SVD.
 
TH1F * m_HitsCDC = nullptr
 Number of hits on CDC.
 
TH1F * m_Hits = nullptr
 Number of all hits in tracks.
 
TH1F * m_TracksVXD = nullptr
 Number of tracks only with VXD.
 
TH1F * m_TracksCDC = nullptr
 Number of tracks only with CDC.
 
TH1F * m_TracksVXDCDC = nullptr
 Number of full tracks with VXD+CDC.
 
TH1F * m_Tracks = nullptr
 Number of all finding tracks.
 

Static Protected Attributes

static constexpr double c_revolutionTime = 5120.0 / 508.0
 Beam revolution time in microseconds (approximated). More...
 
static constexpr double c_noInjectionTime = 30e3
 Defines the range of the x axis of the 2D time histogram.
 
static constexpr double c_globalClock = 127.0
 Approximated global clock frequency in MHz. More...
 

Private Member Functions

bool checkVariableForNANOrINF (const double var)
 Check a variable for whether or not it is NAN or INF.
 
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. More...
 
void setParamPythonDict (const boost::python::dict &dictionary)
 Implements a method for reading the parameter values from a boost::python dictionary. More...
 

Private Attributes

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

Tracking HLT DQM.

Definition at line 28 of file TrackingHLTDQMModule.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.

Member Function Documentation

◆ 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.

◆ ComputeMean()

void ComputeMean ( TH1F *  output,
TH2F *  input,
bool  onX = true 
)
staticprotectedinherited

Creates a graph of means by given axis from given TH2F histogram.

Parameters
output- value of every bin of this histogram is set to be the mean of all bins from input with the same x (or y) coordinate.
input- any TH2F histogram which NBinsX (or NBinsY) has the same value as the NBinsX of the input.
onX- if true, use "x" and "NBinsX" options in the statements above. If false, use "y" and "NBinsY" instead.

Definition at line 618 of file DQMHistoModuleBase.cc.

◆ Create()

TH1F * Create ( std::string  name,
std::string  title,
int  nbinsx,
double  xlow,
double  xup,
std::string  xTitle,
std::string  yTitle 
)
virtualinherited

Function to create TH1F and add it to the vector of histograms (m_histograms).

All histograms in the module should be created via this function (or following Create- functions).

Reimplemented in AlignDQMModule.

Definition at line 96 of file DQMHistoModuleBase.cc.

◆ CreateLayers()

TH1F ** CreateLayers ( boost::format  nameTemplate,
boost::format  titleTemplate,
int  nbinsx,
double  xlow,
double  xup,
std::string  xTitle,
std::string  yTitle 
)
virtualinherited

Function to create array of TH1F histograms, one for each layer.

Parameters
nameTemplate- format() of string with exactly one %1% which is then replaced by the layer number and then used as a name for the histogram.
titleTemplate- same as nameTemplate but for title.
nbinsx- number of bins.
xlow- range x-axis (low boundary).
xup- range x-axis (high boundary).
xTitle- title x-axis.
yTitle- title y-axis

Definition at line 132 of file DQMHistoModuleBase.cc.

◆ CreateSensors()

TH1F ** CreateSensors ( boost::format  nameTemplate,
boost::format  titleTemplate,
int  nbinsx,
double  xlow,
double  xup,
std::string  xTitle,
std::string  yTitle 
)
virtualinherited

Function to create array of TH1F histograms, one for each sensor.

Parameters
nameTemplate- format() of string with exactly one %1% which is then replaced by the output of the SensorNameDescription function and then used as a name for the histogram.
titleTemplate- same as nameTemplate but for title and with the SensorTitleDescription function.
nbinsx- number of bins.
xlow- range x-axis (low boundary).
xup- range x-axis (high boundary).
xTitle- title x-axis.
yTitle- title y-axis

Definition at line 170 of file DQMHistoModuleBase.cc.

◆ 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.

◆ 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.

◆ DefineAbortFlagsHistograms()

void DefineAbortFlagsHistograms ( )
protectedvirtual

All the following Define- functions should be used in the defineHisto() function to define histograms.

The convention is that every Define- function is responsible for creating its own TDirectory (if it's needed). In any case the function must then return to the original gDirectory. For the creation of histograms the THFFactory or the Create- functions should be used.

Definition at line 128 of file TrackingHLTDQMModule.cc.

129 {
130  // only monitor if any flag was set so only 2 bins needed
131  const char* flagTitle =
132  "Tracking error summary. Mean = errors/event (should be 0 or very close to 0); Error occured yes or no; Number of events";
133 
134  m_trackingErrorFlags = Create("NumberTrackingErrorFlags", flagTitle, 2, -0.5, 1.5, "", "");
135 
136  m_trackingErrorFlags->GetXaxis()->SetBinLabel(1, "No Error");
137  m_trackingErrorFlags->GetXaxis()->SetBinLabel(2, "Error occured");
138 
139  //tracking abort VS time after HER/LER injection and time within a beam cycle
140  m_abortVStimeHER = new TH2F(
141  "TrkAbortVsTimeHER",
142  "Number of Events with Tracking Aborts vs HER injection;Time since last injection [#mus];Time in beam cycle [#mus];Events / bin",
143  100, 0, c_noInjectionTime, 50, 0, c_revolutionTime);
144 
145  m_abortVStimeLER = new TH2F(
146  "TrkAbortVsTimeLER",
147  "Number of Events with Tracking Aborts vs LER injection;Time since last injection [#mus];Time in beam cycle [#mus];Events / bin",
148  100, 0, c_noInjectionTime, 50, 0, c_revolutionTime);
149 
150  //tracking all VS time after HER/LER injection and time within a beam cycle
151  m_allVStimeHER = new TH2F(
152  "allEvtsVsTimeHER",
153  "Number Of Events vs HER injection;Time since last injection [#mus];Time in beam cycle [#mus];Events / bin",
154  100, 0, c_noInjectionTime, 50, 0, c_revolutionTime);
155 
156  m_allVStimeLER = new TH2F(
157  "allEvtsVsTimeLER",
158  "Number of Events vs LER injection;Time since last injection [#mus];Time in beam cycle [#mus];Events / bin",
159  100, 0, c_noInjectionTime, 50, 0, c_revolutionTime);
160 
161 }
virtual TH1F * Create(std::string name, std::string title, int nbinsx, double xlow, double xup, std::string xTitle, std::string yTitle)
Function to create TH1F and add it to the vector of histograms (m_histograms).
TH1F * m_trackingErrorFlags
Monitors the Error flags set by the tracking code.
TH2F * m_allVStimeLER
number of events as a function of time after injection and time within a beam cycle - LER
static constexpr double c_revolutionTime
Beam revolution time in microseconds (approximated).
TH2F * m_abortVStimeLER
abort rate as a function of time after injection and time within a beam cycle - LER
TH2F * m_allVStimeHER
number of events as a function of time after injection and time within a beam cycle - HER
TH2F * m_abortVStimeHER
abort rate as a function of time after injection and time within a beam cycle - HER
static constexpr double c_noInjectionTime
Defines the range of the x axis of the 2D time histogram.

◆ defineHisto()

void defineHisto ( )
overridevirtual

Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....

are supposed to be placed in this function. Also at the end function all m_histogramParameterChanges should be processed via the ProcessHistogramParameterChange function.

Reimplemented from DQMHistoModuleBase.

Definition at line 49 of file TrackingHLTDQMModule.cc.

◆ DefineMomentumAngles()

void DefineMomentumAngles ( )
protectedvirtualinherited

Define histograms with track momentum Pt.

angles.

Definition at line 208 of file DQMHistoModuleBase.cc.

◆ DefineMomentumCoordinates()

void DefineMomentumCoordinates ( )
protectedvirtualinherited

Define histograms with track momentum Pt.

coordinates.

Definition at line 294 of file DQMHistoModuleBase.cc.

◆ DefineTracks()

void DefineTracks ( )
protectedvirtualinherited

All the following Define- functions should be used in the defineHisto() function to define histograms.

The convention is that every Define- function is responsible for creating its own TDirectory (if it's needed). In any case the function must then return to the original gDirectory. For the creation of histograms the THFFactory or the Create- functions should be used. Define histograms with track indexes.

Definition at line 327 of file DQMHistoModuleBase.cc.

◆ DefineTRClusters()

void DefineTRClusters ( )
protectedvirtualinherited

Define histograms with correlations between neighbor layers and cluster hitmap in IP angle range.

Track related clusters - hitmap in IP angle range

Track related clusters - neighbor corelations in Phi

Track related clusters - neighbor corelations in Theta

Definition at line 370 of file DQMHistoModuleBase.cc.

◆ EditHistogramParameter()

void EditHistogramParameter ( TH1 *  histogram,
const std::string &  parameter,
std::string  value 
)
protectedinherited

On given histogram sets given parameter to given value.

Used in the function above.

Definition at line 665 of file DQMHistoModuleBase.cc.

◆ 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.

◆ FillMomentumAngles()

void FillMomentumAngles ( const TrackFitResult tfr)
virtualinherited

Fill histograms with track momentum Pt.

angles.

Definition at line 461 of file DQMHistoModuleBase.cc.

◆ FillMomentumCoordinates()

void FillMomentumCoordinates ( const TrackFitResult tfr)
virtualinherited

Fill histograms with track momentum Pt.

coordinates.

Definition at line 479 of file DQMHistoModuleBase.cc.

◆ 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.

◆ 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.

◆ 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 RootOutputModule, StorageRootOutputModule, and RootInputModule.

Definition at line 134 of file Module.h.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ ProcessHistogramParameterChange()

void ProcessHistogramParameterChange ( const std::string &  name,
const std::string &  parameter,
const std::string &  value 
)
protectedinherited

Process one change in histogram parameters.

Should be applied to all items from m_histogramParameterChanges at the end of the defineHisto() function.

Parameters
name- name of the histogram whose parameter we want to change.
parameter- name of the parameter we want to change. Possible values are: name, title, nbinsx, xlow, xup, xTitle, yTitle (for both TH1F and TH2F) and nbinsy, ylow, yup, zTitle (only for TH2F).
value- new value we wish the parameter of the histogram to have. Int and double values are parsed from string so they must be given correctly.

Definition at line 639 of file DQMHistoModuleBase.cc.

◆ SensorNameDescription()

std::string SensorNameDescription ( VxdID  sensorID)
staticprotectedinherited

Creates string description of the sensor from given sensor ID to be used in a histogram name.

Its used in the CreateSensors functions.

Definition at line 121 of file DQMHistoModuleBase.cc.

◆ SensorTitleDescription()

std::string SensorTitleDescription ( VxdID  sensorID)
staticprotectedinherited

Creates string description of the sensor from given sensor ID to be used in a histogram title.

Its used in the CreateSensors functions.

Definition at line 126 of file DQMHistoModuleBase.cc.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

Member Data Documentation

◆ c_globalClock

constexpr double c_globalClock = 127.0
staticconstexprprotected

Approximated global clock frequency in MHz.

Used to convert TTD timing to us.

The exact frequency could be obtained as HardwareClockSettings::getGlobalClockFrequency() * 1e3 but this would produce inconsistent histograms since I am forced to use an approximated accelerator RF (508 MHz) for the beam revolution period.

See also
c_revolutionTime

Definition at line 100 of file TrackingHLTDQMModule.h.

◆ c_revolutionTime

constexpr double c_revolutionTime = 5120.0 / 508.0
staticconstexprprotected

Beam revolution time in microseconds (approximated).

The exact time could be obtained as 5120 / HardwareClockSettings::getAcceleratorRF() * 1e3 but this would run after defineHisto() if used in initialize(). Since defineHisto() uses this value, using a run-independent approximated constant value is the only way.

Definition at line 83 of file TrackingHLTDQMModule.h.

◆ histogramsDefined

bool histogramsDefined = false
protectedinherited

True if the defineHisto() was called.

If false, the event() function does nothing.

Definition at line 191 of file DQMHistoModuleBase.h.

◆ m_D0Z0

TH2F* m_D0Z0 = nullptr
protectedinherited

z0 vs d0 - signed distance to the IP in r-phi vs.

z0 of the perigee (to see primary vertex shifts along R or z)

Definition at line 287 of file DQMHistoModuleBase.h.

◆ m_histogramParameterChanges

std::vector<std::tuple<std::string, std::string, std::string> > m_histogramParameterChanges
protectedinherited

Used for changing parameters of histograms via the ProcessHistogramParameterChange function.


Definition at line 196 of file DQMHistoModuleBase.h.

◆ m_histograms

std::vector<TH1*> m_histograms
protectedinherited

All histograms created via the Create- functions are automatically added to this set.

Its used to easy call Reset() on all histograms in beginRun() and also for changing parameters of histograms via the ProcessHistogramParameterChange function.

Definition at line 189 of file DQMHistoModuleBase.h.

◆ m_Omega

TH1F* m_Omega = nullptr
protectedinherited

Omega - the curvature of the track.

It's sign is defined by the charge of the particle

Definition at line 293 of file DQMHistoModuleBase.h.

◆ m_trackingErrorFlags

TH1F* m_trackingErrorFlags = nullptr
protected

Monitors the Error flags set by the tracking code.

As of the time of implementation there only were two flags: VXDTF2AbortionFlag, i.e. how often the VXDTF2 did abort the event and did not produce tracks, and UnspecifiedTrackFindingFailure. The histogram records if any flag was set.

Definition at line 61 of file TrackingHLTDQMModule.h.

◆ m_UBResidualsPXDX_Yin

TH1F* m_UBResidualsPXDX_Yin = nullptr
protectedinherited

half-shells

Unbiased residuals in X for PXD for Yin

Definition at line 229 of file DQMHistoModuleBase.h.


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