Belle II Software development
SVDROIDQMModule.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 ROIid;
29 class SVDIntercept;
30 class SVDShaperDigit;
31 class SVDRecoDigit;
32 class SVDCluster;
33
37
38 public:
39
42
43 void initialize() override;
45 void event() override;
47 void endRun() override;
49 private:
50
52 std::string m_SVDRecoDigitsName;
53 std::string m_SVDClustersName;
63 std::string m_ROIsName;
64 std::string m_InterceptsName;
66 TDirectory* m_InterDir;
67 TDirectory* m_ROIDir;
70 typedef std::pair< TH1*, std::function< void(TH1*, const SVDIntercept*) > > InterHistoAndFill;
72 std::unordered_multimap<Belle2::VxdID, InterHistoAndFill, std::function<size_t (const Belle2::VxdID&)> > hInterDictionary;
73
75 typedef std::pair< TH1*, std::function< void(TH1*, const ROIid*) > > ROIHistoAndFill;
77 std::unordered_multimap<Belle2::VxdID, ROIHistoAndFill, std::function<size_t (const Belle2::VxdID&)> > hROIDictionary;
78
81 TH1* hPtr;
82 std::function< void (const ROIid*, double&) > accumulate;
83 std::function< void (TH1*, double&) > fill;
84 double value;
85 };
87 std::unordered_multimap<Belle2::VxdID, ROIHistoAccumulateAndFill&, std::function<size_t (const Belle2::VxdID&) > >
89
91 void fillSensorROIHistos(const ROIid* roi);
92 void fillSensorInterHistos(const SVDIntercept* inter);
96 -1;
97 bool m_plotRecoDigits = false;
99 TH1F* hnROIs;
100 TH1F* hnInter;
101 TH1F* harea;
103 TH1F* hCellU;
104 TH1F* hCellV;
107 void defineHisto() override;
109 };//end class declaration
110
111
113} // end namespace Belle2
114
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Definition: ROIid.h:25
SVDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an SVD ...
Definition: SVDIntercept.h:22
Creates basic DQM for ROI creation on ExpressReco
std::unordered_multimap< Belle2::VxdID, ROIHistoAccumulateAndFill &, std::function< size_t(const Belle2::VxdID &) > > hROIDictionaryEvt
map of histograms to be filled once per event
int m_numModules
number of hardware modules
std::unordered_multimap< Belle2::VxdID, InterHistoAndFill, std::function< size_t(const Belle2::VxdID &)> > hInterDictionary
map of histograms to be filled once per intercept
std::pair< TH1 *, std::function< void(TH1 *, const SVDIntercept *) > > InterHistoAndFill
typedef: histograms to be filled once per intercept + filling function
std::string m_InterceptsName
Name of the SVDIntercept StoreArray.
StoreArray< SVDCluster > m_SVDClusters
svd cluster store array
bool m_plotRecoDigits
Produce plots for SVDRecoDigits when True.
VXD::GeoCache & m_geoCache
the geo cache instance
TH1F * hnROIs
number of ROIs
int n_events
number of events
void initialize() override
register histograms
TDirectory * m_ROIDir
ROI directory in the root file.
void fillSensorInterHistos(const SVDIntercept *inter)
fill histograms per sensor, filled once per intercept
void createHistosDictionaries()
create the dictionary
std::string m_SVDRecoDigitsName
reco digit list name
std::string m_SVDClustersName
cluster list name
void fillSensorROIHistos(const ROIid *roi)
fill histograms per sensor, filled once per ROI
void event() override
fill per-event histograms
void endRun() override
fill per-run histograms
SVDROIDQMModule()
Constructor defining the parameters.
int m_specificLayer
specific layer selected for which to produce the plots.
std::pair< TH1 *, std::function< void(TH1 *, const ROIid *) > > ROIHistoAndFill
typedef: histograms to be filled once per roi + filling function
TH1F * hredFactor
reduction factor
StoreArray< SVDShaperDigit > m_SVDShaperDigits
shaper digit store array
StoreArray< SVDRecoDigit > m_SVDRecoDigits
reco digit store array
std::string m_ROIsName
Name of the ROIid StoreArray.
TH1F * hnInter
number of intercpets
TDirectory * m_InterDir
intercepts directory in the root file
std::unordered_multimap< Belle2::VxdID, ROIHistoAndFill, std::function< size_t(const Belle2::VxdID &)> > hROIDictionary
map of histograms to be filled once per roi
TH1F * harea
ROis area.
StoreArray< SVDIntercept > m_Intercepts
SVDIntercept Store Arrays.
std::string m_SVDShaperDigitsName
shaper digit list name
void defineHisto() override
define histograms
StoreArray< ROIid > m_ROIs
ROis store array.
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
std::function< void(const ROIid *, double &) > accumulate
accumulate function
std::function< void(TH1 *, double &) > fill
fill function