CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelActionExecutor.h
Go to the documentation of this file.
1 #ifndef _SiPixelActionExecutor_h_
2 #define _SiPixelActionExecutor_h_
3 
17 #include <fstream>
18 #include <map>
19 #include <vector>
20 #include <string>
21 
22 // For Tracker Map
24 #define PI_12 0.261799
25 #define PI 3.141592
26 #define PI_2 1.570796
27 
28 #define NLev1 4 // Number of HalfCylinders in Endcap or number of Shells in Barrel, which is bigger
29 #define NLev2 3 // Number of Disks in Endcap or number of Layers in Barrel, which is bigger
30 #define NLev3 22 // Number of Blades in Endcap or number of Ladders in Barrel, which is bigger
31 #define NLev4 7 // Number of Modules - different for Endcap and Barrel, which is bigger
32 
33 #define NCyl 4
34 #define NDisk 2
35 #define NBlade 12
36 #define NModuleE 7
37 
38 #define NShell 4
39 #define NLayer 3
40 //#define NLadders LayNum * 6 + 4 // where LayNum is number of interesting Layer => 10, 16, 22
41 #define NModuleB 4
42 
43 #define NPoints 5
44 
45 // End for Tracker Map
46 
48 
49  public:
50 
51  SiPixelActionExecutor( bool offlineXMLfile,
52  bool Tier0Flag);
54 
55  void createSummary( DQMStore * bei,
56  bool isUpgrade);
57  void bookDeviations( DQMStore * bei,
58  bool isUpgrade);
59  void bookEfficiency( DQMStore * bei,
60  bool isUpgrade);
61  void createEfficiency( DQMStore * bei,
62  bool isUpgrade);
63  void fillEfficiency( DQMStore * bei,
64  bool isbarrel,
65  bool isUpgrade);
66  void bookOccupancyPlots( DQMStore * bei,
67  bool hiRes,
68  bool isbarrel);
69  void bookOccupancyPlots( DQMStore * bei,
70  bool hiRes);
71  void createOccupancy( DQMStore * bei);
72  void setupQTests( DQMStore * bei);
73  void checkQTestResults( DQMStore * bei);
74  void createTkMap( DQMStore * bei,
75  std::string mEName,
76  std::string theTKType);
77  bool readConfiguration( int & tkmap_freq,
78  int & sum_barrel_freq,
79  int & sum_endcap_freq,
80  int & sum_grandbarrel_freq,
81  int & sum_grandendcap_freq,
82  int & message_limit,
83  int & source_type,
84  int & calib_type);
85  bool readConfiguration( int & tkmap_freq,
86  int & summary_freq);
87  void readConfiguration( );
88  void createLayout( DQMStore * bei);
89  void fillLayout( DQMStore * bei);
90  int getTkMapMENames( std::vector<std::string> & names);
91  void dumpModIds( DQMStore * bei,
92  edm::EventSetup const & eSetup);
93  void dumpBarrelModIds( DQMStore * bei,
94  edm::EventSetup const & eSetup);
95  void dumpEndcapModIds( DQMStore * bei,
96  edm::EventSetup const & eSetup);
97  void dumpRefValues( DQMStore * bei,
98  edm::EventSetup const & eSetup);
99  void dumpBarrelRefValues( DQMStore * bei,
100  edm::EventSetup const & eSetup);
101  void dumpEndcapRefValues( DQMStore * bei,
102  edm::EventSetup const & eSetup);
104  void bookTrackerMaps(DQMStore* bei, std::string name);
105 
106 
107 private:
108 
109 
111  std::string me_name,
112  bool isUpgrade);
114  std::string me_name);
115  void GetBladeSubdirs(DQMStore* bei, std::vector<std::string>& blade_subdirs);
116  void fillSummary( DQMStore * bei,
118  std::vector<std::string> & me_names,
119  bool isbarrel,
120  bool isUpgrade);
121  void fillDeviations( DQMStore * bei);
122  void fillFEDErrorSummary( DQMStore * bei,
123  std::string dir_name,
124  std::vector<std::string> & me_names);
126  std::vector<std::string> & me_names,
127  bool isUpgrade);
129  std::vector<std::string> & me_names,
130  bool isUpgrade);
131  void getGrandSummaryME( DQMStore * bei,
132  int nbin,
133  std::string & me_name,
134  std::vector<MonitorElement*> & mes);
135 
136  void fillOccupancy( DQMStore * bei,
137  bool isbarrel);
138 
142 
143  std::vector<std::string> summaryMENames;
144  std::vector<std::string> tkMapMENames;
145 
149  int ndet_;
152 
154 
177 
178 
179  int createMap(Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore* bei, funcType ff, bool isBarrel);
180  void getData(Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore* bei, funcType ff, Int_t i, Int_t j, Int_t k, Int_t l);
181  void prephistosB(MonitorElement* me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max);
182  void prephistosE(MonitorElement* me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max);
183  Double_t mapMax(const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel);
184  Double_t mapMin(const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel);
185 
186  TH2F * temp_H;
187  TH2F * temp_1x2;
188  TH2F * temp_1x5;
189  TH2F * temp_2x3;
190  TH2F * temp_2x4;
191  TH2F * temp_2x5;
192 
193 };
194 #endif
void dumpRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
void bookDeviations(DQMStore *bei, bool isUpgrade)
MonitorElement * PixelOccupancyMap
void getData(Double_t map[][3][22][7], std::string type, DQMStore *bei, funcType ff, Int_t i, Int_t j, Int_t k, Int_t l)
void dumpBarrelRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
void fillGrandBarrelSummaryHistos(DQMStore *bei, std::vector< std::string > &me_names, bool isUpgrade)
MonitorElement * HitEfficiency_Dp3
static const HistoName names[]
Double_t mapMin(const Double_t map[][3][22][7], bool isBarrel)
void fillOccupancy(DQMStore *bei, bool isbarrel)
void createTkMap(DQMStore *bei, std::string mEName, std::string theTKType)
MonitorElement * HitEfficiency_L4
#define NCyl
MonitorElement * DEV_size_Barrel
MonitorElement * HitEfficiency_L3
void createMaps(DQMStore *bei, std::string type, std::string name, funcType ff)
void bookOccupancyPlots(DQMStore *bei, bool hiRes, bool isbarrel)
SiPixelConfigParser * configParser_
void createEfficiency(DQMStore *bei, bool isUpgrade)
MonitorElement * DEV_nclusters_Barrel
MonitorElement * HitEfficiency_Dm2
MonitorElement * HitEfficiency_L2
void dumpBarrelModIds(DQMStore *bei, edm::EventSetup const &eSetup)
int createMap(Double_t map[][3][22][7], std::string type, DQMStore *bei, funcType ff, bool isBarrel)
MonitorElement * getSummaryME(DQMStore *bei, std::string me_name, bool isUpgrade)
void bookTrackerMaps(DQMStore *bei, std::string name)
void fillEfficiency(DQMStore *bei, bool isbarrel, bool isUpgrade)
Double_t mapMax(const Double_t map[][3][22][7], bool isBarrel)
void fillSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel, bool isUpgrade)
void fillLayout(DQMStore *bei)
void setupQTests(DQMStore *bei)
std::vector< std::string > summaryMENames
SiPixelConfigWriter * configWriter_
std::vector< std::string > tkMapMENames
void createOccupancy(DQMStore *bei)
void bookEfficiency(DQMStore *bei, bool isUpgrade)
edm::ESHandle< SiPixelFedCablingMap > theCablingMap
MonitorElement * DEV_adc_Endcap
void fillDeviations(DQMStore *bei)
void createLayout(DQMStore *bei)
MonitorElement * DEV_charge_Endcap
int j
Definition: DBlmapReader.cc:9
void fillGrandEndcapSummaryHistos(DQMStore *bei, std::vector< std::string > &me_names, bool isUpgrade)
void createSummary(DQMStore *bei, bool isUpgrade)
T min(T a, T b)
Definition: MathUtil.h:58
int getTkMapMENames(std::vector< std::string > &names)
void dumpEndcapModIds(DQMStore *bei, edm::EventSetup const &eSetup)
int k[5][pyjets_maxn]
SiPixelActionExecutor(bool offlineXMLfile, bool Tier0Flag)
MonitorElement * DEV_charge_Barrel
MonitorElement * HitEfficiency_Dm3
#define NLev3
#define NLev2
void dumpEndcapRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
void GetBladeSubdirs(DQMStore *bei, std::vector< std::string > &blade_subdirs)
MonitorElement * HitEfficiency_L1
MonitorElement * DEV_nclusters_Endcap
MonitorElement * HitEfficiency_Dp1
MonitorElement * DEV_size_Endcap
void prephistosE(MonitorElement *me[4], DQMStore *bei, const Double_t map[][3][22][7], std::string name, Double_t min, Double_t max)
MonitorElement * getFEDSummaryME(DQMStore *bei, std::string me_name)
MonitorElement * HitEfficiency_Dp2
void getGrandSummaryME(DQMStore *bei, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
void prephistosB(MonitorElement *me[4], DQMStore *bei, const Double_t map[][3][22][7], std::string name, Double_t min, Double_t max)
MonitorElement * DEV_ndigis_Endcap
MonitorElement * HitEfficiency_Dm1
void checkQTestResults(DQMStore *bei)
MonitorElement * DEV_ndigis_Barrel
MonitorElement * DEV_adc_Barrel
void dumpModIds(DQMStore *bei, edm::EventSetup const &eSetup)
void fillFEDErrorSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names)
#define NLev4