Belle II Software  release-06-02-00
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/SVDIntercept.h>
20 
21 #include <unordered_map>
22 #include <utility>
23 #include <functional>
24 #include <TH1.h>
25 #include <TH1F.h>
26 
27 namespace Belle2 {
38  class SVDROIDQMModule : public HistoModule {
39 
40  public:
41 
44 
45  void initialize() override;
47  void event() override;
49  void endRun() override;
51  private:
52 
53  std::string m_SVDShaperDigitsName;
54  std::string m_SVDRecoDigitsName;
55  std::string m_SVDClustersName;
64  std::string m_InterceptsName;
66  TDirectory* m_InterDir;
69  typedef std::pair< TH1*, std::function< void(TH1*, const SVDIntercept*) > > InterHistoAndFill;
71  std::unordered_multimap<Belle2::VxdID, InterHistoAndFill, std::function<size_t (const Belle2::VxdID&)> > hInterDictionary;
72 
74  void fillSensorInterHistos(const SVDIntercept* inter);
78  -1;
79  bool m_plotRecoDigits = false;
81  TH1F* hnInter;
82  TH1F* harea;
83  TH1F* hredFactor;
84  TH1F* hCellU;
85  TH1F* hCellV;
86  int n_events;
88  void defineHisto() override;
90  };//end class declaration
91 
92 
94 } // end namespace Belle2
95 
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
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
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
int n_events
number of events
void initialize() override
register histograms
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 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.
TH1F * hredFactor
reduction factor
StoreArray< SVDShaperDigit > m_SVDShaperDigits
shaper digit store array
StoreArray< SVDRecoDigit > m_SVDRecoDigits
reco digit store array
TH1F * hnInter
number of intercpets
TDirectory * m_InterDir
intercepts directory in the root file
TH1F * harea
ROis area.
StoreArray< SVDIntercept > m_Intercepts
SVDIntercept Store Arrays.
std::string m_SVDShaperDigitsName
shaper digit list name
void defineHisto() override
define histograms
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:213
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Abstract base class for different kinds of events.