Belle II Software release-09-00-00
ROIDQMModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <framework/core/HistoModule.h>
12#include <framework/datastore/StoreArray.h>
13
14#include <vxd/geometry/GeoCache.h>
15
16#include <TH1.h>
17#include <TH1F.h>
18
19#include <unordered_map>
20#include <utility>
21#include <functional>
22
23namespace Belle2 {
28 class PXDDigit;
29 class ROIid;
30 class PXDIntercept;
31
39 class ROIDQMModule : public HistoModule {
40
41 public:
42
44
45 private:
50 std::string m_PXDDigitsName;
54 std::string m_ROIsName;
55 std::string m_InterceptsName;
57 TDirectory* m_InterDir;
58 TDirectory* m_ROIDir;
61 typedef std::pair< TH1*, std::function< void(TH1*, const PXDIntercept*) > > InterHistoAndFill;
63 std::unordered_multimap<Belle2::VxdID, InterHistoAndFill, std::function<size_t (const Belle2::VxdID&)> > m_hInterDictionary;
64
66 typedef std::pair< TH1*, std::function< void(TH1*, const ROIid*) > > ROIHistoAndFill;
68 std::unordered_multimap<Belle2::VxdID, ROIHistoAndFill, std::function<size_t (const Belle2::VxdID&)> > m_hROIDictionary;
69
72 TH1* hPtr;
73 std::function< void (const ROIid*, double&) > accumulate;
74 std::function< void (TH1*, double&) > fill;
75 double value;
76 };
78 std::unordered_multimap<Belle2::VxdID, ROIHistoAccumulateAndFill&, std::function<size_t (const Belle2::VxdID&) > >
80
82 void fillSensorROIHistos(const ROIid* roi);
83 void fillSensorInterHistos(const PXDIntercept* inter);
87 TH1F* m_hnROIs;
88 TH1F* m_hnInter;
89 TH1F* m_harea;
95 void initialize(void) override final;
96
100 void event(void) override final;
101
105 void terminate(void) override final;
106
107 void defineHisto() override final;
109 };//end class declaration
110
112} // end namespace Belle2
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
Definition: PXDIntercept.h:22
The HLT ROI DQM module.
Definition: ROIDQMModule.h:39
void terminate(void) override final
This method is called at the end of the event processing.
int m_numModules
number of modules
Definition: ROIDQMModule.h:85
StoreArray< PXDIntercept > m_pxdIntercept
the PXDIntercepts dataobjects collection
Definition: ROIDQMModule.h:48
std::string m_InterceptsName
Name of the PXDIntercept StoreArray.
Definition: ROIDQMModule.h:55
VXD::GeoCache & m_aGeometry
the geometry
Definition: ROIDQMModule.h:52
TDirectory * m_ROIDir
ROI directory in the root file.
Definition: ROIDQMModule.h:58
void fillSensorInterHistos(const PXDIntercept *inter)
fill histograms per sensor, filled once per intercept
void createHistosDictionaries()
create the dictionary
void initialize(void) override final
Initializer.
Definition: ROIDQMModule.cc:84
void fillSensorROIHistos(const ROIid *roi)
fill histograms per sensor, filled once per ROI
std::unordered_multimap< Belle2::VxdID, ROIHistoAndFill, std::function< size_t(const Belle2::VxdID &)> > m_hROIDictionary
map of histograms to be filled once per roi
Definition: ROIDQMModule.h:68
void defineHisto() override final
define histograms
Definition: ROIDQMModule.cc:58
std::pair< TH1 *, std::function< void(TH1 *, const PXDIntercept *) > > InterHistoAndFill
typedef: histograms to be filled once per intercept + filling function
Definition: ROIDQMModule.h:61
TH1F * m_harea
ROis area.
Definition: ROIDQMModule.h:89
std::pair< TH1 *, std::function< void(TH1 *, const ROIid *) > > ROIHistoAndFill
typedef: histograms to be filled once per roi + filling function
Definition: ROIDQMModule.h:66
TH1F * m_hnROIs
number of ROIs
Definition: ROIDQMModule.h:87
std::string m_ROIsName
Name of the ROIid StoreArray.
Definition: ROIDQMModule.h:54
StoreArray< ROIid > m_roiIDs
the ROIids dataobjects collection
Definition: ROIDQMModule.h:47
TH1F * m_hredFactor
reduction factor
Definition: ROIDQMModule.h:90
std::unordered_multimap< Belle2::VxdID, InterHistoAndFill, std::function< size_t(const Belle2::VxdID &)> > m_hInterDictionary
map of histograms to be filled once per intercept
Definition: ROIDQMModule.h:63
TDirectory * m_InterDir
intercepts directory in the root file
Definition: ROIDQMModule.h:57
std::string m_PXDDigitsName
digit list name
Definition: ROIDQMModule.h:50
std::unordered_multimap< Belle2::VxdID, ROIHistoAccumulateAndFill &, std::function< size_t(const Belle2::VxdID &) > > m_hROIDictionaryEvt
map of histograms to be filled once per event
Definition: ROIDQMModule.h:79
TH1F * m_hnInter
number of intercpets
Definition: ROIDQMModule.h:88
StoreArray< PXDDigit > m_pxdDigits
the PXDDigits dataobjects collection
Definition: ROIDQMModule.h:46
void event(void) override final
This method is called for each event.
Definition: ROIDQMModule.cc:94
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Definition: ROIid.h:25
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:39
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Abstract base class for different kinds of events.
struct: histograms to be filled once per event + filling fucntion + accumulate function
Definition: ROIDQMModule.h:71
std::function< void(const ROIid *, double &) > accumulate
accumulate function
Definition: ROIDQMModule.h:73
std::function< void(TH1 *, double &) > fill
fill function
Definition: ROIDQMModule.h:74