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  void bookDeviations( DQMStore * bei);
57  void bookEfficiency( DQMStore * bei);
58  void createEfficiency( DQMStore * bei);
59  void fillEfficiency( DQMStore * bei,
60  bool isbarrel);
61  void bookOccupancyPlots( DQMStore * bei,
62  bool hiRes,
63  bool isbarrel);
64  void bookOccupancyPlots( DQMStore * bei,
65  bool hiRes);
66  void createOccupancy( DQMStore * bei);
67  void setupQTests( DQMStore * bei);
68  void checkQTestResults( DQMStore * bei);
69  void createTkMap( DQMStore * bei,
70  std::string mEName,
71  std::string theTKType);
72  bool readConfiguration( int & tkmap_freq,
73  int & sum_barrel_freq,
74  int & sum_endcap_freq,
75  int & sum_grandbarrel_freq,
76  int & sum_grandendcap_freq,
77  int & message_limit,
78  int & source_type,
79  int & calib_type);
80  bool readConfiguration( int & tkmap_freq,
81  int & summary_freq);
82  void readConfiguration( );
83  void createLayout( DQMStore * bei);
84  void fillLayout( DQMStore * bei);
85  int getTkMapMENames( std::vector<std::string> & names);
86  void dumpModIds( DQMStore * bei,
87  edm::EventSetup const & eSetup);
88  void dumpBarrelModIds( DQMStore * bei,
89  edm::EventSetup const & eSetup);
90  void dumpEndcapModIds( DQMStore * bei,
91  edm::EventSetup const & eSetup);
92  void dumpRefValues( DQMStore * bei,
93  edm::EventSetup const & eSetup);
94  void dumpBarrelRefValues( DQMStore * bei,
95  edm::EventSetup const & eSetup);
96  void dumpEndcapRefValues( DQMStore * bei,
97  edm::EventSetup const & eSetup);
98  void createMaps(DQMStore* bei, std::string type, std::string name, funcType ff);
99  void bookTrackerMaps(DQMStore* bei, std::string name);
100 
101 
102 private:
103 
104 
106  std::string me_name);
108  std::string me_name);
109  void GetBladeSubdirs(DQMStore* bei, std::vector<std::string>& blade_subdirs);
110  void fillSummary( DQMStore * bei,
111  std::string dir_name,
112  std::vector<std::string> & me_names,
113  bool isbarrel);
114  void fillDeviations( DQMStore * bei);
115  void fillFEDErrorSummary( DQMStore * bei,
116  std::string dir_name,
117  std::vector<std::string> & me_names);
119  std::vector<std::string> & me_names);
121  std::vector<std::string> & me_names);
122  void getGrandSummaryME( DQMStore * bei,
123  int nbin,
124  std::string & me_name,
125  std::vector<MonitorElement*> & mes);
126 
127  void fillOccupancy( DQMStore * bei,
128  bool isbarrel);
129 
133 
134  std::vector<std::string> summaryMENames;
135  std::vector<std::string> tkMapMENames;
136 
140  int ndet_;
143 
145 
165 
166 
167  int createMap(Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore* bei, funcType ff, bool isBarrel);
168  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);
169  void prephistosB(MonitorElement* me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max);
170  void prephistosE(MonitorElement* me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max);
171  Double_t mapMax(const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel);
172  Double_t mapMin(const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel);
173 
174  TH2F * temp_H;
175  TH2F * temp_1x2;
176  TH2F * temp_1x5;
177  TH2F * temp_2x3;
178  TH2F * temp_2x4;
179  TH2F * temp_2x5;
180 
181 };
182 #endif
void dumpRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
type
Definition: HCALResponse.h:22
int i
Definition: DBlmapReader.cc:9
MonitorElement * PixelOccupancyMap
void createEfficiency(DQMStore *bei)
void dumpBarrelRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
void fillOccupancy(DQMStore *bei, bool isbarrel)
void createTkMap(DQMStore *bei, std::string mEName, std::string theTKType)
#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_
MonitorElement * DEV_nclusters_Barrel
#define min(a, b)
Definition: mlp_lapack.h:161
void fillEfficiency(DQMStore *bei, bool isbarrel)
MonitorElement * HitEfficiency_Dm2
MonitorElement * HitEfficiency_L2
void dumpBarrelModIds(DQMStore *bei, edm::EventSetup const &eSetup)
void bookTrackerMaps(DQMStore *bei, std::string name)
void fillLayout(DQMStore *bei)
dictionary map
Definition: Association.py:196
void setupQTests(DQMStore *bei)
void bookDeviations(DQMStore *bei)
MonitorElement * getSummaryME(DQMStore *bei, std::string me_name)
std::vector< std::string > summaryMENames
SiPixelConfigWriter * configWriter_
void prephistosE(MonitorElement *me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max)
std::vector< std::string > tkMapMENames
void createOccupancy(DQMStore *bei)
const T & max(const T &a, const T &b)
edm::ESHandle< SiPixelFedCablingMap > theCablingMap
MonitorElement * DEV_adc_Endcap
void fillDeviations(DQMStore *bei)
void fillSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel)
void createLayout(DQMStore *bei)
MonitorElement * DEV_charge_Endcap
Double_t mapMin(const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel)
int j
Definition: DBlmapReader.cc:9
int getTkMapMENames(std::vector< std::string > &names)
void dumpEndcapModIds(DQMStore *bei, edm::EventSetup const &eSetup)
int k[5][pyjets_maxn]
int createMap(Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore *bei, funcType ff, bool isBarrel)
SiPixelActionExecutor(bool offlineXMLfile, bool Tier0Flag)
MonitorElement * DEV_charge_Barrel
#define NLev3
#define NLev2
void bookEfficiency(DQMStore *bei)
void dumpEndcapRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
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)
void GetBladeSubdirs(DQMStore *bei, std::vector< std::string > &blade_subdirs)
MonitorElement * HitEfficiency_L1
MonitorElement * DEV_nclusters_Endcap
MonitorElement * HitEfficiency_Dp1
Double_t mapMax(const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel)
void fillGrandEndcapSummaryHistos(DQMStore *bei, std::vector< std::string > &me_names)
MonitorElement * DEV_size_Endcap
void fillGrandBarrelSummaryHistos(DQMStore *bei, std::vector< std::string > &me_names)
void prephistosB(MonitorElement *me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], 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)
MonitorElement * DEV_ndigis_Endcap
MonitorElement * HitEfficiency_Dm1
void checkQTestResults(DQMStore *bei)
static const HistoName names[]
MonitorElement * DEV_ndigis_Barrel
MonitorElement * DEV_adc_Barrel
void createSummary(DQMStore *bei)
void dumpModIds(DQMStore *bei, edm::EventSetup const &eSetup)
void fillFEDErrorSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names)
#define NLev4