CMS 3D CMS Logo

SiPixelActionExecutor.h
Go to the documentation of this file.
1 #ifndef _SiPixelActionExecutor_h_
2 #define _SiPixelActionExecutor_h_
3 
15 #include <fstream>
16 #include <map>
17 #include <string>
18 #include <vector>
19 
20 // For Tracker Map
22 #define PI_12 0.261799
23 #define PI 3.141592
24 #define PI_2 1.570796
25 
26 // Number of HalfCylinders in Endcap or number of Shells in Barrel, which is bigger
27 #define NLev1 4
28 // Number of Disks in Endcap or number of Layers in Barrel, which is bigger
29 #define NLev2 3
30 // Number of Blades in Endcap or number of Ladders in Barrel, which is bigger
31 #define NLev3 22
32 // Number of Modules - different for Endcap and Barrel, which is bigger
33 #define NLev4 7
34 
35 #define NCyl 4
36 #define NDisk 2
37 #define NBlade 12
38 #define NModuleE 7
39 
40 #define NShell 4
41 #define NLayer 3
42 #define NModuleB 4
43 
44 #define NPoints 5
45 
46 // End for Tracker Map
47 
49 public:
52 
53  SiPixelActionExecutor(bool offlineXMLfile, bool Tier0Flag);
55 
56  void createSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isUpgrade);
57  void bookDeviations(DQMStore::IBooker &iBooker, bool isUpgrade);
58  void bookEfficiency(DQMStore::IBooker &iBooker, bool isUpgrade);
59  void createEfficiency(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isUpgrade);
60  void fillEfficiency(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel, bool isUpgrade);
62  void bookOccupancyPlots(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool hiRes, bool isbarrel);
63  void bookOccupancyPlots(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool hiRes);
64  void createOccupancy(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter);
66  void normaliseAvDigiOccVsLumi(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int lumisec);
67  bool readConfiguration(int &tkmap_freq,
68  int &sum_barrel_freq,
69  int &sum_endcap_freq,
70  int &sum_grandbarrel_freq,
71  int &sum_grandendcap_freq,
72  int &message_limit,
73  int &source_type,
74  int &calib_type);
75  bool readConfiguration(int &tkmap_freq, int &summary_freq);
76  void readConfiguration();
77  int getLadder(const std::string &dname);
78  int getBlade(const std::string &dname);
79 
80 private:
81  MonitorElement *getSummaryME(DQMStore::IBooker &iBooker,
82  DQMStore::IGetter &iGetter,
83  std::string me_name,
84  bool isUpgrade);
85  MonitorElement *getFEDSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name);
86  void GetBladeSubdirs(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector<std::string> &blade_subdirs);
87  void fillSummary(DQMStore::IBooker &iBooker,
88  DQMStore::IGetter &iGetter,
90  std::vector<std::string> &me_names,
91  bool isbarrel,
92  bool isUpgrade);
94  DQMStore::IGetter &iGetter,
96  std::vector<std::string> &me_names);
98  DQMStore::IGetter &iGetter,
99  std::vector<std::string> &me_names,
100  bool isUpgrade);
102  DQMStore::IGetter &iGetter,
103  std::vector<std::string> &me_names,
104  bool isUpgrade);
105  void getGrandSummaryME(DQMStore::IBooker &iBooker,
106  DQMStore::IGetter &iGetter,
107  int nbin,
108  std::string &me_name,
109  std::vector<MonitorElement *> &mes);
110 
111  void fillOccupancy(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel);
112 
116 
117  std::vector<std::string> summaryMENames;
118  std::vector<std::string> tkMapMENames;
119 
123  int ndet_;
126 
127  MonitorElement *OccupancyMap;
128  MonitorElement *PixelOccupancyMap;
129  MonitorElement *HitEfficiency_L1;
130  MonitorElement *HitEfficiency_L2;
131  MonitorElement *HitEfficiency_L3;
132  MonitorElement *HitEfficiency_L4;
133  MonitorElement *HitEfficiency_Dp1;
134  MonitorElement *HitEfficiency_Dp2;
135  MonitorElement *HitEfficiency_Dp3;
136  MonitorElement *HitEfficiency_Dm1;
137  MonitorElement *HitEfficiency_Dm2;
138  MonitorElement *HitEfficiency_Dm3;
139  MonitorElement *HitEfficiencySummary;
140  MonitorElement *DEV_adc_Barrel;
141  MonitorElement *DEV_ndigis_Barrel;
142  MonitorElement *DEV_charge_Barrel;
143  MonitorElement *DEV_nclusters_Barrel;
144  MonitorElement *DEV_size_Barrel;
145  MonitorElement *DEV_adc_Endcap;
146  MonitorElement *DEV_ndigis_Endcap;
147  MonitorElement *DEV_charge_Endcap;
148  MonitorElement *DEV_nclusters_Endcap;
149  MonitorElement *DEV_size_Endcap;
150 
151  TH2F *temp_H;
152  TH2F *temp_1x2;
153  TH2F *temp_1x5;
154  TH2F *temp_2x3;
155  TH2F *temp_2x4;
156  TH2F *temp_2x5;
157 };
158 #endif
void normaliseAvDigiOccVsLumi(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int lumisec)
MonitorElement * PixelOccupancyMap
MonitorElement * HitEfficiency_Dp3
void createEfficiency(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isUpgrade)
void getGrandSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
MonitorElement * HitEfficiency_L4
void bookOccupancyPlots(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool hiRes, bool isbarrel)
MonitorElement * DEV_size_Barrel
MonitorElement * HitEfficiency_L3
SiPixelConfigParser * configParser_
MonitorElement * DEV_nclusters_Barrel
void fillGrandEndcapSummaryHistos(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &me_names, bool isUpgrade)
MonitorElement * HitEfficiency_Dm2
MonitorElement * HitEfficiency_L2
int getBlade(const std::string &dname)
void normaliseAvDigiOcc(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
void fillEfficiency(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel, bool isUpgrade)
std::vector< std::string > summaryMENames
SiPixelConfigWriter * configWriter_
std::vector< std::string > tkMapMENames
edm::ESHandle< SiPixelFedCablingMap > theCablingMap
void bookDeviations(DQMStore::IBooker &iBooker, bool isUpgrade)
void createSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isUpgrade)
MonitorElement * DEV_adc_Endcap
void fillFEDErrorSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string dir_name, std::vector< std::string > &me_names)
dqm::legacy::MonitorElement MonitorElement
MonitorElement * DEV_charge_Endcap
int getLadder(const std::string &dname)
MonitorElement * getSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name, bool isUpgrade)
void fillOccupancy(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel)
MonitorElement * getFEDSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name)
SiPixelActionExecutor(bool offlineXMLfile, bool Tier0Flag)
MonitorElement * DEV_charge_Barrel
MonitorElement * HitEfficiency_Dm3
MonitorElement * HitEfficiency_L1
MonitorElement * DEV_nclusters_Endcap
MonitorElement * HitEfficiency_Dp1
dqm::legacy::DQMStore DQMStore
MonitorElement * DEV_size_Endcap
MonitorElement * HitEfficiencySummary
void fillEfficiencySummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
void createOccupancy(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
MonitorElement * HitEfficiency_Dp2
void fillGrandBarrelSummaryHistos(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &me_names, bool isUpgrade)
void fillSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel, bool isUpgrade)
MonitorElement * DEV_ndigis_Endcap
void GetBladeSubdirs(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &blade_subdirs)
MonitorElement * HitEfficiency_Dm1
MonitorElement * DEV_ndigis_Barrel
void bookEfficiency(DQMStore::IBooker &iBooker, bool isUpgrade)
MonitorElement * DEV_adc_Barrel