Belle II Software  release-05-02-19
SVDChannelMappingModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Giulia Casarosa, Eugenio Paoloni *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef svdchannelmappingModule_H
12 #define svdchannelmappingModule_H
13 
14 #include <framework/core/Module.h>
15 #include <framework/datastore/StoreArray.h>
16 
17 #include <vxd/geometry/GeoCache.h>
18 
19 #include <tracking/dataobjects/SVDIntercept.h>
20 #include <svd/dataobjects/SVDCluster.h>
21 #include <svd/dataobjects/SVDShaperDigit.h>
22 
23 #include <unordered_map>
24 #include <utility>
25 #include <functional>
26 #include <TH1.h>
27 #include <TFile.h>
28 
29 namespace Belle2 {
41  class SVDChannelMappingModule : public Module {
42 
43  public:
44 
47 
49  void initialize() override;
51  void event() override;
53  void terminate() override;
54 
55  std::string m_SVDShaperDigitsName;
56  std::string m_SVDClustersName;
58  /* user-defined parameters */
59  std::string m_rootFileName;
60  /* ROOT file related parameters */
61  TFile* m_rootFilePtr = nullptr;
62  TList* m_histoList_digits = nullptr;
63  TList* m_histoList_clusters = nullptr;
65  private:
66 
73  std::string m_InterceptsName;
76  typedef std::pair< TH1*, std::function< void(TH1*, const SVDIntercept*) > > InterHistoAndFill;
78  std::unordered_multimap<Belle2::VxdID, InterHistoAndFill, std::function<size_t (const Belle2::VxdID&)> > hInterDictionary;
79 
81  void fillSensorInterHistos(const SVDIntercept* inter);
84  int n_events;
87  };//end class declaration
88 
89 
91 } // end namespace Belle2
92 
93 #endif // SVDCHANNELMAPPINGtModule_H
Belle2::SVDChannelMappingModule::m_rootFileName
std::string m_rootFileName
root file name
Definition: SVDChannelMappingModule.h:67
Belle2::SVDChannelMappingModule::createHistosDictionaries
void createHistosDictionaries()
create the dictionary
Definition: SVDChannelMappingModule.cc:81
Belle2::SVDIntercept
SVDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an SVD ...
Definition: SVDIntercept.h:32
Belle2::SVDChannelMappingModule::m_clusters
StoreArray< SVDCluster > m_clusters
SVDClusters StoreArray.
Definition: SVDChannelMappingModule.h:76
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::SVDChannelMappingModule::m_histoList_digits
TList * m_histoList_digits
list of histograms for the strips
Definition: SVDChannelMappingModule.h:70
Belle2::SVDChannelMappingModule::m_histoList_clusters
TList * m_histoList_clusters
list of histograms for the clusters
Definition: SVDChannelMappingModule.h:71
Belle2::SVDChannelMappingModule::m_rootFilePtr
TFile * m_rootFilePtr
pointer at root file used for storing histograms
Definition: SVDChannelMappingModule.h:69
Belle2::SVDChannelMappingModule::m_aGeometry
VXD::GeoCache & m_aGeometry
the geometry
Definition: SVDChannelMappingModule.h:79
Belle2::SVDChannelMappingModule::terminate
void terminate() override
temrinate
Definition: SVDChannelMappingModule.cc:511
Belle2::SVDChannelMappingModule::InterHistoAndFill
std::pair< TH1 *, std::function< void(TH1 *, const SVDIntercept *) > > InterHistoAndFill
typedef: histograms to be filled once per intercept + filling function
Definition: SVDChannelMappingModule.h:84
Belle2::SVDChannelMappingModule::n_events
int n_events
number of events
Definition: SVDChannelMappingModule.h:92
Belle2::SVDChannelMappingModule::m_InterceptsName
std::string m_InterceptsName
Name of the SVDIntercept StoreArray.
Definition: SVDChannelMappingModule.h:81
Belle2::SVDChannelMappingModule::initialize
void initialize() override
initialize
Definition: SVDChannelMappingModule.cc:52
Belle2::VXD::GeoCache::getInstance
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:215
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVDChannelMappingModule::m_Intercepts
StoreArray< SVDIntercept > m_Intercepts
SVDintercept StoreArray.
Definition: SVDChannelMappingModule.h:75
Belle2::SVDChannelMappingModule::m_SVDClustersName
std::string m_SVDClustersName
reco digit list name
Definition: SVDChannelMappingModule.h:64
Belle2::VXD::GeoCache
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:41
Belle2::SVDChannelMappingModule::fillSensorInterHistos
void fillSensorInterHistos(const SVDIntercept *inter)
fill histograms per sensor, filled once per intercept
Definition: SVDChannelMappingModule.cc:499
Belle2::SVDChannelMappingModule::SVDChannelMappingModule
SVDChannelMappingModule()
Constructor defining the parameters.
Definition: SVDChannelMappingModule.cc:28
Belle2::SVDChannelMappingModule::hInterDictionary
std::unordered_multimap< Belle2::VxdID, InterHistoAndFill, std::function< size_t(const Belle2::VxdID &)> > hInterDictionary
map of histograms to be filled once per intercept
Definition: SVDChannelMappingModule.h:86
Belle2::SVDChannelMappingModule::m_shapers
StoreArray< SVDShaperDigit > m_shapers
SVDSHaperDigits StoreArray.
Definition: SVDChannelMappingModule.h:77
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::SVDChannelMappingModule::m_SVDShaperDigitsName
std::string m_SVDShaperDigitsName
shaper digit list name
Definition: SVDChannelMappingModule.h:63
Belle2::SVDChannelMappingModule::event
void event() override
event
Definition: SVDChannelMappingModule.cc:70