Belle II Software  release-08-01-10
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 <svd/dataobjects/SVDShaperDigit.h>
17 #include <svd/dataobjects/SVDRecoDigit.h>
18 #include <svd/dataobjects/SVDCluster.h>
19 #include <tracking/dataobjects/ROIid.h>
20 #include <tracking/dataobjects/SVDIntercept.h>
21 
22 #include <unordered_map>
23 #include <utility>
24 #include <functional>
25 #include <TH1.h>
26 #include <TH1F.h>
27 
28 namespace Belle2 {
39  class SVDROIDQMModule : public HistoModule {
40 
41  public:
42 
45 
46  void initialize() override;
48  void event() override;
50  void endRun() override;
52  private:
53 
54  std::string m_SVDShaperDigitsName;
55  std::string m_SVDRecoDigitsName;
56  std::string m_SVDClustersName;
66  std::string m_ROIsName;
67  std::string m_InterceptsName;
69  TDirectory* m_InterDir;
70  TDirectory* m_ROIDir;
73  typedef std::pair< TH1*, std::function< void(TH1*, const SVDIntercept*) > > InterHistoAndFill;
75  std::unordered_multimap<Belle2::VxdID, InterHistoAndFill, std::function<size_t (const Belle2::VxdID&)> > hInterDictionary;
76 
78  typedef std::pair< TH1*, std::function< void(TH1*, const ROIid*) > > ROIHistoAndFill;
80  std::unordered_multimap<Belle2::VxdID, ROIHistoAndFill, std::function<size_t (const Belle2::VxdID&)> > hROIDictionary;
81 
84  TH1* hPtr;
85  std::function< void (const ROIid*, double&) > accumulate;
86  std::function< void (TH1*, double&) > fill;
87  double value;
88  };
90  std::unordered_multimap<Belle2::VxdID, ROIHistoAccumulateAndFill&, std::function<size_t (const Belle2::VxdID&) > >
92 
94  void fillSensorROIHistos(const ROIid* roi);
95  void fillSensorInterHistos(const SVDIntercept* inter);
99  -1;
100  bool m_plotRecoDigits = false;
102  TH1F* hnROIs;
103  TH1F* hnInter;
104  TH1F* harea;
105  TH1F* hredFactor;
106  TH1F* hCellU;
107  TH1F* hCellV;
108  int n_events;
110  void defineHisto() override;
112  };//end class declaration
113 
114 
116 } // end namespace Belle2
117 
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