ATLAS Offline Software
OccupancyMapMaker.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef PIXELCONDITIONSALGS_OCCUPANCYMAPMAKER_H
6 #define PIXELCONDITIONSALGS_OCCUPANCYMAPMAKER_H
7 
9 #include "GaudiKernel/ServiceHandle.h"
10 
12 
13 #include <string>
14 #include <sstream>
15 #include <vector>
16 #include <fstream>
17 #include <utility> // pair
18 
19 class ITHistSvc;
20 class PixelID;
21 class TH2D;
22 class TH2C;
23 class TH1D;
24 
26  public:
27  OccupancyMapMaker (const std::string& name, ISvcLocator* pSvcLocator);
29 
33 
34  private:
35  std::string getDCSIDFromPosition(int bec, int layer, int modPhi, int modEta);
36 
37  std::vector<std::string> &splitter(const std::string &str, char delim, std::vector<std::string> &elems);
38 
39  std::vector<std::string> splitter(const std::string &str, char delim);
41 
42  const std::string histoSuffix(const int bec, const int layer);
43 
44  private:
46 
47  ToolHandle<IInDetConditionsTool> m_pixelConditionsTool
48  {this, "PixelConditionsSummaryTool", "PixelConditionsSummaryTool", "Tool to retrieve Pixel Conditions summary"};
49 
51 
52  // vector of modulename and vector(barrel/endcap, layer, phi, eta)
53  std::vector< std::pair< std::string, std::vector<int> > > m_pixelMapping;
54 
55  std::string m_pixelRDOKey;
56  std::vector<int> m_moduleHashList;
57 
58  double m_nEvents;
59  // double m_occupancyCut;
60 
63  std::vector<TH2D*> m_hitMaps;
64  std::vector<TH2C*> m_noiseMaps;
65  std::vector<TH1D*> m_LBdependence;
66  std::vector<TH1D*> m_BCIDdependence;
67  std::vector<TH1D*> m_TOTdistributions;
68 
71  TH2D *m_overlayedIBLDCNoiseMap; // Planar Double Chip
72  TH2D *m_overlayedIBLSCNoiseMap; // 3D Single Chip
73  //TH2D* m_overlayedDBMNoiseMap; // DBM
74 
75  // cuts ....
76  double m_disk1ACut; // disk-1, A-side
77  double m_disk2ACut; // disk-2, A-side
78  double m_disk3ACut; // disk-3, A-side
79  double m_disk1CCut; // disk-1, C-side
80  double m_disk2CCut; // disk-2, C-side
81  double m_disk3CCut; // disk-3, C-side
82  double m_iblCut; // IBL
83  double m_bLayerCut; // B-Layer
84  double m_layer1Cut; // Layer 1
85  double m_layer2Cut; // Layer 2
86  double m_dbmCut; // DBM
87 
88  int m_hist_lbMax; // max number of LB
89 
92 
93  // int m_maxLVL1A;
94 
96 
97  unsigned int m_nBCReadout;
98 
99  unsigned int m_evt_lbMin; // lower limit for LB to be taken into account
100  unsigned int m_evt_lbMax; // upper limit for LB to be taken into account
101 
103 
104  std::string m_mapFile;
105 };
106 
107 #endif // PIXELCONDITIONSALGS_OCCUPANCYMAPMAKERH_
OccupancyMapMaker::m_hitMaps
std::vector< TH2D * > m_hitMaps
Definition: OccupancyMapMaker.h:63
OccupancyMapMaker::m_tHistSvc
ServiceHandle< ITHistSvc > m_tHistSvc
Definition: OccupancyMapMaker.h:45
IInDetConditionsTool.h
OccupancyMapMaker::m_LBdependence
std::vector< TH1D * > m_LBdependence
Definition: OccupancyMapMaker.h:65
ParticleGun_SamplingFraction.bec
int bec
Definition: ParticleGun_SamplingFraction.py:89
OccupancyMapMaker::execute
StatusCode execute()
Definition: OccupancyMapMaker.cxx:299
OccupancyMapMaker::m_occupancyPerBC
bool m_occupancyPerBC
Definition: OccupancyMapMaker.h:95
OccupancyMapMaker::finalize
StatusCode finalize()
Definition: OccupancyMapMaker.cxx:380
OccupancyMapMaker::m_longPixelMultiplier
double m_longPixelMultiplier
Definition: OccupancyMapMaker.h:90
OccupancyMapMaker::m_pixelMapping
std::vector< std::pair< std::string, std::vector< int > > > m_pixelMapping
Definition: OccupancyMapMaker.h:53
OccupancyMapMaker::m_evt_lbMin
unsigned int m_evt_lbMin
Definition: OccupancyMapMaker.h:99
OccupancyMapMaker::m_disk3CCut
double m_disk3CCut
Definition: OccupancyMapMaker.h:81
OccupancyMapMaker::m_TOTdistributions
std::vector< TH1D * > m_TOTdistributions
Definition: OccupancyMapMaker.h:67
OccupancyMapMaker::m_disk2ACut
double m_disk2ACut
Definition: OccupancyMapMaker.h:77
OccupancyMapMaker::m_noiseMaps
std::vector< TH2C * > m_noiseMaps
Definition: OccupancyMapMaker.h:64
AthAlgorithm.h
OccupancyMapMaker::initialize
StatusCode initialize()
Definition: OccupancyMapMaker.cxx:91
OccupancyMapMaker::getDCSIDFromPosition
std::string getDCSIDFromPosition(int bec, int layer, int modPhi, int modEta)
Definition: OccupancyMapMaker.cxx:111
OccupancyMapMaker::m_disk3ACut
double m_disk3ACut
Definition: OccupancyMapMaker.h:78
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
OccupancyMapMaker::m_overlayedPixelNoiseMap
TH2D * m_overlayedPixelNoiseMap
Definition: OccupancyMapMaker.h:70
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
OccupancyMapMaker::m_disk1CCut
double m_disk1CCut
Definition: OccupancyMapMaker.h:79
OccupancyMapMaker::m_nEventsLBHist
TH1D * m_nEventsLBHist
Definition: OccupancyMapMaker.h:62
OccupancyMapMaker::m_nBCReadout
unsigned int m_nBCReadout
Definition: OccupancyMapMaker.h:97
OccupancyMapMaker::~OccupancyMapMaker
~OccupancyMapMaker()
Definition: OccupancyMapMaker.cxx:89
OccupancyMapMaker::registerHistograms
StatusCode registerHistograms()
Definition: OccupancyMapMaker.cxx:164
AthAlgorithm
Definition: AthAlgorithm.h:47
OccupancyMapMaker::m_nEvents
double m_nEvents
Definition: OccupancyMapMaker.h:58
OccupancyMapMaker::m_iblCut
double m_iblCut
Definition: OccupancyMapMaker.h:82
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
OccupancyMapMaker::m_disabledModules
TH1D * m_disabledModules
Definition: OccupancyMapMaker.h:69
OccupancyMapMaker::m_mapFile
std::string m_mapFile
Definition: OccupancyMapMaker.h:104
OccupancyMapMaker::m_hist_lbMax
int m_hist_lbMax
Definition: OccupancyMapMaker.h:88
OccupancyMapMaker::m_nEventsHist
TH1D * m_nEventsHist
Definition: OccupancyMapMaker.h:61
OccupancyMapMaker
Definition: OccupancyMapMaker.h:25
OccupancyMapMaker::m_disk1ACut
double m_disk1ACut
Definition: OccupancyMapMaker.h:76
OccupancyMapMaker::m_calculateNoiseMaps
bool m_calculateNoiseMaps
Definition: OccupancyMapMaker.h:102
OccupancyMapMaker::m_disk2CCut
double m_disk2CCut
Definition: OccupancyMapMaker.h:80
OccupancyMapMaker::m_layer2Cut
double m_layer2Cut
Definition: OccupancyMapMaker.h:85
OccupancyMapMaker::m_overlayedIBLDCNoiseMap
TH2D * m_overlayedIBLDCNoiseMap
Definition: OccupancyMapMaker.h:71
OccupancyMapMaker::splitter
std::vector< std::string > & splitter(const std::string &str, char delim, std::vector< std::string > &elems)
Definition: OccupancyMapMaker.cxx:146
OccupancyMapMaker::m_bLayerCut
double m_bLayerCut
Definition: OccupancyMapMaker.h:83
OccupancyMapMaker::m_dbmCut
double m_dbmCut
Definition: OccupancyMapMaker.h:86
str
Definition: BTagTrackIpAccessor.cxx:11
OccupancyMapMaker::OccupancyMapMaker
OccupancyMapMaker(const std::string &name, ISvcLocator *pSvcLocator)
Definition: OccupancyMapMaker.cxx:33
OccupancyMapMaker::m_pixelConditionsTool
ToolHandle< IInDetConditionsTool > m_pixelConditionsTool
Definition: OccupancyMapMaker.h:48
OccupancyMapMaker::m_overlayedIBLSCNoiseMap
TH2D * m_overlayedIBLSCNoiseMap
Definition: OccupancyMapMaker.h:72
OccupancyMapMaker::m_layer1Cut
double m_layer1Cut
Definition: OccupancyMapMaker.h:84
PixelID
Definition: PixelID.h:67
OccupancyMapMaker::m_pixelRDOKey
std::string m_pixelRDOKey
Definition: OccupancyMapMaker.h:55
OccupancyMapMaker::m_pixelID
const PixelID * m_pixelID
Definition: OccupancyMapMaker.h:50
OccupancyMapMaker::m_evt_lbMax
unsigned int m_evt_lbMax
Definition: OccupancyMapMaker.h:100
OccupancyMapMaker::histoSuffix
const std::string histoSuffix(const int bec, const int layer)
Definition: OccupancyMapMaker.cxx:127
OccupancyMapMaker::m_BCIDdependence
std::vector< TH1D * > m_BCIDdependence
Definition: OccupancyMapMaker.h:66
OccupancyMapMaker::m_moduleHashList
std::vector< int > m_moduleHashList
Definition: OccupancyMapMaker.h:56
OccupancyMapMaker::m_gangedPixelMultiplier
double m_gangedPixelMultiplier
Definition: OccupancyMapMaker.h:91
ServiceHandle< ITHistSvc >