CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CastorHIMonitor.cc
Go to the documentation of this file.
4 
5 //***************************************************//
6 //********** CastorHIMonitor: *******************//
7 //********** Author: Dmytro Volyanskyy ************//
8 //********** Date : 14.10.2010 (first version) ******//
9 //***************************************************//
12 
13 //==================================================================//
14 //======================= Constructor ==============================//
15 //==================================================================//
17  doPerChannel_ = true;
18  // occThresh_ = 1;
19  ievt_ = 0;
20  module = -99;
21  sector = -99;
22  energy = -99;
23  time = -99;
24  EtotalEM =-99;
25  EtotalHAD =-99;
26  EtotalCASTOR =-99;
27 
28 }
29 
30 //==================================================================//
31 //======================= Destructor ==============================//
32 //==================================================================//
34 }
35 
37 }
38 
39 
40 //==========================================================//
41 //========================= setup ==========================//
42 //==========================================================//
43 
45 
47  baseFolder_ = rootFolder_+"CastorHIMonitor/EnergyUnits";
48 
49  if(fVerbosity>0) std::cout << "CastorHIMonitor::setup (start)" << std::endl;
50 
51  if ( ps.getUntrackedParameter<bool>("RecHitsPerChannel", false) ){
52  doPerChannel_ = true;
53  }
54 
55  ievt_=0; EtotalEM =0; EtotalHAD =0; EtotalCASTOR =0;
56 
57 
59  for (int mod=0; mod<14; mod++) {
60  for (int sec=0; sec<16; sec++){
61  energyInEachChannel[mod][sec] = 0;
62  energyTotalChannel[mod][sec] = 0;
63  }
64  }
65 
67  for (int sec=0; sec<16; sec++){
68  energyHADsector[sec] = 0;
69  energySectors[sec] = 0;
70  energyTotalSector[sec] =0;
71  }
72 
73  if ( m_dbe !=NULL ) {
75 
76 
78 
79 
83 
85  meEtotalCASTOR = m_dbe->book1D("CASTOR Absolute RecHit Energy per event","CASTOR Absolute RecHit Energy per event",400,0,2000);
86 
88  meEtotalSector = m_dbe->book1D("CASTOR Total RecHit Energy in phi-sectors per run","Total RecHit Energy in phi-sectors per run",16,0,16);
89 
91  meEtotalEM = m_dbe->book1D("CASTOR Total EM RecHit Energy per event","Total EM RecHit Energy per event",300,0,1500);
92 
94  meEtotalHAD = m_dbe->book1D("CASTOR Total HAD RecHit Energy per event","Total HAD RecHit Energy per event",300,0,1500);
95 
97  meEtotalEMvsHAD = m_dbe->book1D("CASTOR Total Energy ratio EM to HAD per event","Total Energy ratio EM to HAD per event",50,0,5);
98 
99 
101 meEsector1 = m_dbe->book1D("RecHit Energy in phi-sector1 vs z-module","RecHit Energy in phi-sector1 vs z-module",14,0,14);
102 meEsector2 = m_dbe->book1D("RecHit Energy in phi-sector2 vs z-module","RecHit Energy in phi-sector2 vs z-module",14,0,14);
103 meEsector3 = m_dbe->book1D("RecHit Energy in phi-sector3 vs z-module","RecHit Energy in phi-sector3 vs z-module",14,0,14);
104 meEsector4 = m_dbe->book1D("RecHit Energy in phi-sector4 vs z-module","RecHit Energy in phi-sector4 vs z-module",14,0,14);
105 meEsector5 = m_dbe->book1D("RecHit Energy in phi-sector5 vs z-module","RecHit Energy in phi-sector5 vs z-module",14,0,14);
106 meEsector6 = m_dbe->book1D("RecHit Energy in phi-sector6 vs z-module","RecHit Energy in phi-sector6 vs z-module",14,0,14);
107 meEsector7 = m_dbe->book1D("RecHit Energy in phi-sector7 vs z-module","RecHit Energy in phi-sector7 vs z-module",14,0,14);
108 meEsector8 = m_dbe->book1D("RecHit Energy in phi-sector8 vs z-module","RecHit Energy in phi-sector8 vs z-module",14,0,14);
109 meEsector9 = m_dbe->book1D("RecHit Energy in phi-sector9 vs z-module","RecHit Energy in phi-sector9 vs z-module",14,0,14);
110 meEsector10 = m_dbe->book1D("RecHit Energy in phi-sector10 vs z-module","RecHit Energy in phi-sector10 vs z-module",14,0,14);
111 meEsector11 = m_dbe->book1D("RecHit Energy in phi-sector11 vs z-module","RecHit Energy in phi-sector11 vs z-module",14,0,14);
112 meEsector12 = m_dbe->book1D("RecHit Energy in phi-sector12 vs z-module","RecHit Energy in phi-sector12 vs z-module",14,0,14);
113 meEsector13 = m_dbe->book1D("RecHit Energy in phi-sector13 vs z-module","RecHit Energy in phi-sector13 vs z-module",14,0,14);
114 meEsector14 = m_dbe->book1D("RecHit Energy in phi-sector14 vs z-module","RecHit Energy in phi-sector14 vs z-module",14,0,14);
115 meEsector15 = m_dbe->book1D("RecHit Energy in phi-sector15 vs z-module","RecHit Energy in phi-sector15 vs z-module",14,0,14);
116 meEsector16 = m_dbe->book1D("RecHit Energy in phi-sector16 vs z-module","RecHit Energy in phi-sector16 vs z-module",14,0,14);
117 
118 
119 
120  m_dbe->setCurrentFolder(baseFolder_+"/furtherPlots");
121 
123 meEVT_ = m_dbe->bookInt("HI Event Number");
124 
126 meEmodule1 = m_dbe->book1D("RecHit Energy in z-module1 vs phi-sector","RecHit Energy in z-module1 vs phi-sector",16,0,16);
127 meEmodule2 = m_dbe->book1D("RecHit Energy in z-module2 vs phi-sector","RecHit Energy in z-module2 vs phi-sector",16,0,16);
128 meEmodule3 = m_dbe->book1D("RecHit Energy in z-module3 vs phi-sector","RecHit Energy in z-module3 vs phi-sector",16,0,16);
129 meEmodule4 = m_dbe->book1D("RecHit Energy in z-module4 vs phi-sector","RecHit Energy in z-module4 vs phi-sector",16,0,16);
130 meEmodule5 = m_dbe->book1D("RecHit Energy in z-module5 vs phi-sector","RecHit Energy in z-module5 vs phi-sector",16,0,16);
131 meEmodule6 = m_dbe->book1D("RecHit Energy in z-module6 vs phi-sector","RecHit Energy in z-module6 vs phi-sector",16,0,16);
132 meEmodule7 = m_dbe->book1D("RecHit Energy in z-module7 vs phi-sector","RecHit Energy in z-module7 vs phi-sector",16,0,16);
133 meEmodule8 = m_dbe->book1D("RecHit Energy in z-module8 vs phi-sector","RecHit Energy in z-module8 vs phi-sector",16,0,16);
134 meEmodule9 = m_dbe->book1D("RecHit Energy in z-module9 vs phi-sector","RecHit Energy in z-module9 vs phi-sector",16,0,16);
135 meEmodule10 = m_dbe->book1D("RecHit Energy in z-module10 vs phi-sector","RecHit Energy in z-module10 vs phi-sector",16,0,16);
136 meEmodule11 = m_dbe->book1D("RecHit Energy in z-module11 vs phi-sector","RecHit Energy in z-module11 vs phi-sector",16,0,16);
137 meEmodule12 = m_dbe->book1D("RecHit Energy in z-module12 vs phi-sector","RecHit Energy in z-module12 vs phi-sector",16,0,16);
138 meEmodule13 = m_dbe->book1D("RecHit Energy in z-module13 vs phi-sector","RecHit Energy in z-module13 vs phi-sector",16,0,16);
139 meEmodule14 = m_dbe->book1D("RecHit Energy in z-module14 vs phi-sector","RecHit Energy in z-module14 vs phi-sector",16,0,16);
140 
141  double EmaxSector=800;
142  double NbinsSector=200;
143 
145 meEsectorEM1 = m_dbe->book1D("RecHit Energy in EM phi-sector1","RecHit Energy in EM phi-sector1",NbinsSector,0,EmaxSector);
146 meEsectorEM2 = m_dbe->book1D("RecHit Energy in EM phi-sector2","RecHit Energy in EM phi-sector2",NbinsSector,0,EmaxSector);
147 meEsectorEM3 = m_dbe->book1D("RecHit Energy in EM phi-sector3","RecHit Energy in EM phi-sector3",NbinsSector,0,EmaxSector);
148 meEsectorEM4 = m_dbe->book1D("RecHit Energy in EM phi-sector4","RecHit Energy in EM phi-sector4",NbinsSector,0,EmaxSector);
149 meEsectorEM5 = m_dbe->book1D("RecHit Energy in EM phi-sector5","RecHit Energy in EM phi-sector5",NbinsSector,0,EmaxSector);
150 meEsectorEM6 = m_dbe->book1D("RecHit Energy in EM phi-sector6","RecHit Energy in EM phi-sector6",NbinsSector,0,EmaxSector);
151 meEsectorEM7 = m_dbe->book1D("RecHit Energy in EM phi-sector7","RecHit Energy in EM phi-sector7",NbinsSector,0,EmaxSector);
152 meEsectorEM8 = m_dbe->book1D("RecHit Energy in EM phi-sector8","RecHit Energy in EM phi-sector8",NbinsSector,0,EmaxSector);
153 meEsectorEM9 = m_dbe->book1D("RecHit Energy in EM phi-sector9","RecHit Energy in EM phi-sector9",NbinsSector,0,EmaxSector);
154 meEsectorEM10 = m_dbe->book1D("RecHit Energy in EM phi-sector10","RecHit Energy in EM phi-sector10",NbinsSector,0,EmaxSector);
155 meEsectorEM11 = m_dbe->book1D("RecHit Energy in EM phi-sector11","RecHit Energy in EM phi-sector11",NbinsSector,0,EmaxSector);
156 meEsectorEM12 = m_dbe->book1D("RecHit Energy in EM phi-sector12","RecHit Energy in EM phi-sector12",NbinsSector,0,EmaxSector);
157 meEsectorEM13 = m_dbe->book1D("RecHit Energy in EM phi-sector13","RecHit Energy in EM phi-sector13",NbinsSector,0,EmaxSector);
158 meEsectorEM14 = m_dbe->book1D("RecHit Energy in EM phi-sector14","RecHit Energy in EM phi-sector14",NbinsSector,0,EmaxSector);
159 meEsectorEM15 = m_dbe->book1D("RecHit Energy in EM phi-sector15","RecHit Energy in EM phi-sector15",NbinsSector,0,EmaxSector);
160 meEsectorEM16 = m_dbe->book1D("RecHit Energy in EM phi-sector16","RecHit Energy in EM phi-sector16",NbinsSector,0,EmaxSector);
161 
163 meEsectorHAD1 = m_dbe->book1D("RecHit Energy in HAD phi-sector1","RecHit Energy in HAD phi-sector1",NbinsSector,0,EmaxSector);
164 meEsectorHAD2 = m_dbe->book1D("RecHit Energy in HAD phi-sector2","RecHit Energy in HAD phi-sector2",NbinsSector,0,EmaxSector);
165 meEsectorHAD3 = m_dbe->book1D("RecHit Energy in HAD phi-sector3","RecHit Energy in HAD phi-sector3",NbinsSector,0,EmaxSector);
166 meEsectorHAD4 = m_dbe->book1D("RecHit Energy in HAD phi-sector4","RecHit Energy in HAD phi-sector4",NbinsSector,0,EmaxSector);
167 meEsectorHAD5 = m_dbe->book1D("RecHit Energy in HAD phi-sector5","RecHit Energy in HAD phi-sector5",NbinsSector,0,EmaxSector);
168 meEsectorHAD6 = m_dbe->book1D("RecHit Energy in HAD phi-sector6","RecHit Energy in HAD phi-sector6",NbinsSector,0,EmaxSector);
169 meEsectorHAD7 = m_dbe->book1D("RecHit Energy in HAD phi-sector7","RecHit Energy in HAD phi-sector7",NbinsSector,0,EmaxSector);
170 meEsectorHAD8 = m_dbe->book1D("RecHit Energy in HAD phi-sector8","RecHit Energy in HAD phi-sector8",NbinsSector,0,EmaxSector);
171 meEsectorHAD9 = m_dbe->book1D("RecHit Energy in HAD phi-sector9","RecHit Energy in HAD phi-sector9",NbinsSector,0,EmaxSector);
172 meEsectorHAD10 = m_dbe->book1D("RecHit Energy in HAD phi-sector10","RecHit Energy in HAD phi-sector10",NbinsSector,0,EmaxSector);
173 meEsectorHAD11 = m_dbe->book1D("RecHit Energy in HAD phi-sector11","RecHit Energy in HAD phi-sector11",NbinsSector,0,EmaxSector);
174 meEsectorHAD12 = m_dbe->book1D("RecHit Energy in HAD phi-sector12","RecHit Energy in HAD phi-sector12",NbinsSector,0,EmaxSector);
175 meEsectorHAD13 = m_dbe->book1D("RecHit Energy in HAD phi-sector13","RecHit Energy in HAD phi-sector13",NbinsSector,0,EmaxSector);
176 meEsectorHAD14 = m_dbe->book1D("RecHit Energy in HAD phi-sector14","RecHit Energy in HAD phi-sector14",NbinsSector,0,EmaxSector);
177 meEsectorHAD15 = m_dbe->book1D("RecHit Energy in HAD phi-sector15","RecHit Energy in HAD phi-sector15",NbinsSector,0,EmaxSector);
178 meEsectorHAD16 = m_dbe->book1D("RecHit Energy in HAD phi-sector16","RecHit Energy in HAD phi-sector16",NbinsSector,0,EmaxSector);
179 
180 
182 meEsectorEMvsHAD1 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector1","Ratio E_EM to E_HAD phi-sector1",50,0,5);
183 meEsectorEMvsHAD2 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector2","Ratio E_EM to E_HAD phi-sector2",50,0,5);
184 meEsectorEMvsHAD3 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector3","Ratio E_EM to E_HAD phi-sector3",50,0,5);
185 meEsectorEMvsHAD4 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector4","Ratio E_EM to E_HAD phi-sector4",50,0,5);
186 meEsectorEMvsHAD5 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector5","Ratio E_EM to E_HAD phi-sector5",50,0,5);
187 meEsectorEMvsHAD6 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector6","Ratio E_EM to E_HAD phi-sector6",50,0,5);
188 meEsectorEMvsHAD7 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector7","Ratio E_EM to E_HAD phi-sector7",50,0,5);
189 meEsectorEMvsHAD8 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector8","Ratio E_EM to E_HAD phi-sector8",50,0,5);
190 meEsectorEMvsHAD9 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector9","Ratio E_EM to E_HAD phi-sector9",50,0,5);
191 meEsectorEMvsHAD10 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector10","Ratio E_EM to E_HAD phi-sector10",50,0,5);
192 meEsectorEMvsHAD11 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector11","Ratio E_EM to E_HAD phi-sector11",50,0,5);
193 meEsectorEMvsHAD12 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector12","Ratio E_EM to E_HAD phi-sector12",50,0,5);
194 meEsectorEMvsHAD13 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector13","Ratio E_EM to E_HAD phi-sector13",50,0,5);
195 meEsectorEMvsHAD14 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector14","Ratio E_EM to E_HAD phi-sector14",50,0,5);
196 meEsectorEMvsHAD15 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector15","Ratio E_EM to E_HAD phi-sector15",50,0,5);
197 meEsectorEMvsHAD16 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector16","Ratio E_EM to E_HAD phi-sector16",50,0,5);
198 
199 
200 
201 
202  /*
203 
207 
208  m_dbe->setCurrentFolder(rootFolder_+"CastorHIMonitor/Charge_fC");
209 
211  meChargeTotalCASTOR = m_dbe->book1D("CASTOR Total Charge per event","CASTOR Total Charge per event",100,0,400);
212 
214  meChargeTotalSector = m_dbe->book1D("Total Charge in phi-sectors per event","Total Charge in phi-sectors per event",16,0,16);
215 
217  meChargeTotalEM = m_dbe->book1D("Total EM Charge per event","Total EM Charge per event",100,0,400);
218 
220  meChargeTotalHAD = m_dbe->book1D("Total HAD Charge per event","Total HAD Charge per event",100,0,400);
221 
223  meChargeTotalEMvsHAD = m_dbe->book1D("Total Charge ratio EM to HAD per event","Total Charge ratio EM to HAD per event",50,0,5);
224 
226 meChargeSector1 = m_dbe->book1D("Charge in phi-sector1 vs z-module","Charge in phi-sector1 vs z-module",14,0,14);
227 meChargeSector2 = m_dbe->book1D("Charge in phi-sector2 vs z-module","Charge in phi-sector2 vs z-module",14,0,14);
228 meChargeSector3 = m_dbe->book1D("Charge in phi-sector3 vs z-module","Charge in phi-sector3 vs z-module",14,0,14);
229 meChargeSector4 = m_dbe->book1D("Charge in phi-sector4 vs z-module","Charge in phi-sector4 vs z-module",14,0,14);
230 meChargeSector5 = m_dbe->book1D("Charge in phi-sector5 vs z-module","Charge in phi-sector5 vs z-module",14,0,14);
231 meChargeSector6 = m_dbe->book1D("Charge in phi-sector6 vs z-module","Charge in phi-sector6 vs z-module",14,0,14);
232 meChargeSector7 = m_dbe->book1D("Charge in phi-sector7 vs z-module","Charge in phi-sector7 vs z-module",14,0,14);
233 meChargeSector8 = m_dbe->book1D("Charge in phi-sector8 vs z-module","Charge in phi-sector8 vs z-module",14,0,14);
234 meChargeSector9 = m_dbe->book1D("Charge in phi-sector9 vs z-module","Charge in phi-sector9 vs z-module",14,0,14);
235 meChargeSector10 = m_dbe->book1D("Charge in phi-sector10 vs z-module","Charge in phi-sector10 vs z-module",14,0,14);
236 meChargeSector11 = m_dbe->book1D("Charge in phi-sector11 vs z-module","Charge in phi-sector11 vs z-module",14,0,14);
237 meChargeSector12 = m_dbe->book1D("Charge in phi-sector12 vs z-module","Charge in phi-sector12 vs z-module",14,0,14);
238 meChargeSector13 = m_dbe->book1D("Charge in phi-sector13 vs z-module","Charge in phi-sector13 vs z-module",14,0,14);
239 meChargeSector14 = m_dbe->book1D("Charge in phi-sector14 vs z-module","Charge in phi-sector14 vs z-module",14,0,14);
240 meChargeSector15 = m_dbe->book1D("Charge in phi-sector15 vs z-module","Charge in phi-sector15 vs z-module",14,0,14);
241 meChargeSector16 = m_dbe->book1D("Charge in phi-sector16 vs z-module","Charge in phi-sector16 vs z-module",14,0,14);
242 
243  m_dbe->setCurrentFolder(rootFolder_+"CastorHIMonitor/Charge_fC/furtherPlots");
244 
246 meChargeModule1 = m_dbe->book1D("Charge in z-module1 vs phi-sector","Charge in z-module1 vs phi-sector",16,0,16);
247 meChargeModule2 = m_dbe->book1D("Charge in z-module2 vs phi-sector","Charge in z-module2 vs phi-sector",16,0,16);
248 meChargeModule3 = m_dbe->book1D("Charge in z-module3 vs phi-sector","Charge in z-module3 vs phi-sector",16,0,16);
249 meChargeModule4 = m_dbe->book1D("Charge in z-module4 vs phi-sector","Charge in z-module4 vs phi-sector",16,0,16);
250 meChargeModule5 = m_dbe->book1D("Charge in z-module5 vs phi-sector","Charge in z-module5 vs phi-sector",16,0,16);
251 meChargeModule6 = m_dbe->book1D("Charge in z-module6 vs phi-sector","Charge in z-module6 vs phi-sector",16,0,16);
252 meChargeModule7 = m_dbe->book1D("Charge in z-module7 vs phi-sector","Charge in z-module7 vs phi-sector",16,0,16);
253 meChargeModule8 = m_dbe->book1D("Charge in z-module8 vs phi-sector","Charge in z-module8 vs phi-sector",16,0,16);
254 meChargeModule9 = m_dbe->book1D("Charge in z-module9 vs phi-sector","Charge in z-module9 vs phi-sector",16,0,16);
255 meChargeModule10 = m_dbe->book1D("Charge in z-module10 vs phi-sector","Charge in z-module10 vs phi-sector",16,0,16);
256 meChargeModule11 = m_dbe->book1D("Charge in z-module11 vs phi-sector","Charge in z-module11 vs phi-sector",16,0,16);
257 meChargeModule12 = m_dbe->book1D("Charge in z-module12 vs phi-sector","Charge in z-module12 vs phi-sector",16,0,16);
258 meChargeModule13 = m_dbe->book1D("Charge in z-module13 vs phi-sector","Charge in z-module13 vs phi-sector",16,0,16);
259 meChargeModule14 = m_dbe->book1D("Charge in z-module14 vs phi-sector","Charge in z-module14 vs phi-sector",16,0,16);
260 
261 
263 meChargeSectorEM1 = m_dbe->book1D("Charge in EM phi-sector1","Charge in EM phi-sector1",50,0,200);
264 meChargeSectorEM2 = m_dbe->book1D("Charge in EM phi-sector2","Charge in EM phi-sector2",50,0,200);
265 meChargeSectorEM3 = m_dbe->book1D("Charge in EM phi-sector3","Charge in EM phi-sector3",50,0,200);
266 meChargeSectorEM4 = m_dbe->book1D("Charge in EM phi-sector4","Charge in EM phi-sector4",50,0,200);
267 meChargeSectorEM5 = m_dbe->book1D("Charge in EM phi-sector5","Charge in EM phi-sector5",50,0,200);
268 meChargeSectorEM6 = m_dbe->book1D("Charge in EM phi-sector6","Charge in EM phi-sector6",50,0,200);
269 meChargeSectorEM7 = m_dbe->book1D("Charge in EM phi-sector7","Charge in EM phi-sector7",50,0,200);
270 meChargeSectorEM8 = m_dbe->book1D("Charge in EM phi-sector8","Charge in EM phi-sector8",50,0,200);
271 meChargeSectorEM9 = m_dbe->book1D("Charge in EM phi-sector9","Charge in EM phi-sector9",50,0,200);
272 meChargeSectorEM10 = m_dbe->book1D("Charge in EM phi-sector10","Charge in EM phi-sector10",50,0,200);
273 meChargeSectorEM11 = m_dbe->book1D("Charge in EM phi-sector11","Charge in EM phi-sector11",50,0,200);
274 meChargeSectorEM12 = m_dbe->book1D("Charge in EM phi-sector12","Charge in EM phi-sector12",50,0,200);
275 meChargeSectorEM13 = m_dbe->book1D("Charge in EM phi-sector13","Charge in EM phi-sector13",50,0,200);
276 meChargeSectorEM14 = m_dbe->book1D("Charge in EM phi-sector14","Charge in EM phi-sector14",50,0,200);
277 meChargeSectorEM15 = m_dbe->book1D("Charge in EM phi-sector15","Charge in EM phi-sector15",50,0,200);
278 meChargeSectorEM16 = m_dbe->book1D("Charge in EM phi-sector16","Charge in EM phi-sector16",50,0,200);
279 
281 meChargeSectorHAD1 = m_dbe->book1D("Charge in HAD phi-sector1","Charge in HAD phi-sector1",50,0,200);
282 meChargeSectorHAD2 = m_dbe->book1D("Charge in HAD phi-sector2","Charge in HAD phi-sector2",50,0,200);
283 meChargeSectorHAD3 = m_dbe->book1D("Charge in HAD phi-sector3","Charge in HAD phi-sector3",50,0,200);
284 meChargeSectorHAD4 = m_dbe->book1D("Charge in HAD phi-sector4","Charge in HAD phi-sector4",50,0,200);
285 meChargeSectorHAD5 = m_dbe->book1D("Charge in HAD phi-sector5","Charge in HAD phi-sector5",50,0,200);
286 meChargeSectorHAD6 = m_dbe->book1D("Charge in HAD phi-sector6","Charge in HAD phi-sector6",50,0,200);
287 meChargeSectorHAD7 = m_dbe->book1D("Charge in HAD phi-sector7","Charge in HAD phi-sector7",50,0,200);
288 meChargeSectorHAD8 = m_dbe->book1D("Charge in HAD phi-sector8","Charge in HAD phi-sector8",50,0,200);
289 meChargeSectorHAD9 = m_dbe->book1D("Charge in HAD phi-sector9","Charge in HAD phi-sector9",50,0,200);
290 meChargeSectorHAD10 = m_dbe->book1D("Charge in HAD phi-sector10","Charge in HAD phi-sector10",50,0,200);
291 meChargeSectorHAD11 = m_dbe->book1D("Charge in HAD phi-sector11","Charge in HAD phi-sector11",50,0,200);
292 meChargeSectorHAD12 = m_dbe->book1D("Charge in HAD phi-sector12","Charge in HAD phi-sector12",50,0,200);
293 meChargeSectorHAD13 = m_dbe->book1D("Charge in HAD phi-sector13","Charge in HAD phi-sector13",50,0,200);
294 meChargeSectorHAD14 = m_dbe->book1D("Charge in HAD phi-sector14","Charge in HAD phi-sector14",50,0,200);
295 meChargeSectorHAD15 = m_dbe->book1D("Charge in HAD phi-sector15","Charge in HAD phi-sector15",50,0,200);
296 meChargeSectorHAD16 = m_dbe->book1D("Charge in HAD phi-sector16","Charge in HAD phi-sector16",50,0,200);
297 
298 
299 
301 meChargeSectorEMvsHAD1 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector1","Ratio E_EM to E_HAD phi-sector1",50,0,5);
302 meChargeSectorEMvsHAD2 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector2","Ratio E_EM to E_HAD phi-sector2",50,0,5);
303 meChargeSectorEMvsHAD3 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector3","Ratio E_EM to E_HAD phi-sector3",50,0,5);
304 meChargeSectorEMvsHAD4 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector4","Ratio E_EM to E_HAD phi-sector4",50,0,5);
305 meChargeSectorEMvsHAD5 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector5","Ratio E_EM to E_HAD phi-sector5",50,0,5);
306 meChargeSectorEMvsHAD6 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector6","Ratio E_EM to E_HAD phi-sector6",50,0,5);
307 meChargeSectorEMvsHAD7 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector7","Ratio E_EM to E_HAD phi-sector7",50,0,5);
308 meChargeSectorEMvsHAD8 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector8","Ratio E_EM to E_HAD phi-sector8",50,0,5);
309 meChargeSectorEMvsHAD9 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector9","Ratio E_EM to E_HAD phi-sector9",50,0,5);
310 meChargeSectorEMvsHAD10 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector10","Ratio E_EM to E_HAD phi-sector10",50,0,5);
311 meChargeSectorEMvsHAD11 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector11","Ratio E_EM to E_HAD phi-sector11",50,0,5);
312 meChargeSectorEMvsHAD12 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector12","Ratio E_EM to E_HAD phi-sector12",50,0,5);
313 meChargeSectorEMvsHAD13 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector13","Ratio E_EM to E_HAD phi-sector13",50,0,5);
314 meChargeSectorEMvsHAD14 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector14","Ratio E_EM to E_HAD phi-sector14",50,0,5);
315 meChargeSectorEMvsHAD15 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector15","Ratio E_EM to E_HAD phi-sector15",50,0,5);
316 meChargeSectorEMvsHAD16 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector16","Ratio E_EM to E_HAD phi-sector16",50,0,5);
317 
318 
319 
320  */
321 
322 
323 
324 
325 
326 
327 
328  }//-- end of if
329 
330  else{
331  if(fVerbosity>0) std::cout << "CastorHIMonitor::setup - NO DQMStore service" << std::endl;
332  }
333 
334  if(fVerbosity>0) std::cout << "CastorHIMonitor::setup (end)" << std::endl;
335 
336  return;
337 }
338 
339 
340 
341 
342 
343 
344 //==========================================================//
345 //================== processEvent ==========================//
346 //==========================================================//
347 
348 
350 
351  if(fVerbosity>0) std::cout << "==>CastorHIMonitor::processEvent !!!"<< std::endl;
352 
353  if(!m_dbe) {
354  if(fVerbosity>0) std::cout <<"CastorHIMonitor::processEvent => DQMStore is not instantiated !!!"<<std::endl;
355  return;
356  }
357 
359  meEVT_->Fill(ievt_);
360 
362  EtotalEM =0; EtotalHAD =0; EtotalCASTOR =0;
363 
365  for (int mod=0; mod<14; mod++) {
366  for (int sec=0; sec<16; sec++) {
367  energyInEachChannel[mod][sec] = 0;
368  }
369  }
370 
372  for (int sec=0; sec<16; sec++)
373  energyHADsector[sec] = 0;
374 
375 
376 
379  if (showTiming) { cpu_timer.reset(); cpu_timer.start(); }
380 
381  //********************************************************//
382  //************ working with RecHits *********************//
383  //*******************************************************//
384 
385  if(castorHits.size()>0)
386  {
387 
388  if(fVerbosity>0) std::cout << "==>CastorHIMonitor::processEvent: castorHits.size()>0 !!!" << std::endl;
389 
391  for (CASTORiter=castorHits.begin(); CASTORiter!=castorHits.end(); ++CASTORiter) {
392 
394  HcalCastorDetId id(CASTORiter->detid().rawId());
396  module = (int)id.module();
397  sector = (int)id.sector();
398  //zside = (int)id.zside();
400  energy = CASTORiter->energy();
401  time = CASTORiter->time();
402 
403  if(fVerbosity>0)
404  std::cout<<"CastorHIMonitor==> module:"<< module << " sector:"<< sector << " energy:" << energy<<std::endl;
405 
407  if (energy<0) energy=0;
408 
410  energyInEachChannel[module-1][sector-1] = energy;
411 
413  energyTotalChannel[module-1][sector-1] += energy;
414 
415 
416  }
417  //-- end of the loop over all hits
418 
419 
420  //-----------------------------------//
421  //------- fill energy in sectors ----//
422  //-- energy distribution in depth --//
423  //----------------------------------//
424  for (int mod=0; mod<14;mod++){
426  meEsector2->Fill(mod,energyInEachChannel[mod][1]);
427  meEsector3->Fill(mod,energyInEachChannel[mod][2]);
428  meEsector4->Fill(mod,energyInEachChannel[mod][3]);
429  meEsector5->Fill(mod,energyInEachChannel[mod][4]);
430  meEsector6->Fill(mod,energyInEachChannel[mod][5]);
431  meEsector7->Fill(mod,energyInEachChannel[mod][6]);
432  meEsector8->Fill(mod,energyInEachChannel[mod][7]);
433  meEsector9->Fill(mod,energyInEachChannel[mod][8]);
434  meEsector10->Fill(mod,energyInEachChannel[mod][9]);
435  meEsector11->Fill(mod,energyInEachChannel[mod][10]);
436  meEsector12->Fill(mod,energyInEachChannel[mod][11]);
437  meEsector13->Fill(mod,energyInEachChannel[mod][12]);
438  meEsector14->Fill(mod,energyInEachChannel[mod][13]);
439  meEsector15->Fill(mod,energyInEachChannel[mod][14]);
440  meEsector16->Fill(mod,energyInEachChannel[mod][15]);
441  }
442 
443 
444  //------------------------------------------//
445  //-- fill energy in modules --//
446  //-- energy distribution in each of the rings vs phi-sector --//
447  //---------------------------//
448  for (int sec=0; sec<16;sec++){
449  meEmodule1->Fill(sec,energyInEachChannel[0][sec]);
450  meEmodule2->Fill(sec,energyInEachChannel[1][sec]);
451  meEmodule3->Fill(sec,energyInEachChannel[2][sec]);
452  meEmodule4->Fill(sec,energyInEachChannel[3][sec]);
453  meEmodule5->Fill(sec,energyInEachChannel[4][sec]);
454  meEmodule6->Fill(sec,energyInEachChannel[5][sec]);
455  meEmodule7->Fill(sec,energyInEachChannel[6][sec]);
456  meEmodule8->Fill(sec,energyInEachChannel[7][sec]);
457  meEmodule9->Fill(sec,energyInEachChannel[8][sec]);
458  meEmodule10->Fill(sec,energyInEachChannel[9][sec]);
459  meEmodule11->Fill(sec,energyInEachChannel[10][sec]);
460  meEmodule12->Fill(sec,energyInEachChannel[11][sec]);
461  meEmodule13->Fill(sec,energyInEachChannel[12][sec]);
462  meEmodule14->Fill(sec,energyInEachChannel[13][sec]);
463  }
464 
465 
466 
467  //-------------------------------//
468  //-- fill energy in EM sectors --//
469  //-------------------------------//
486 
487 
488 
489  //-------------------------------//
490  //-- fill energy in HAD sectors --//
491  //-------------------------------//
492 
493  for(int sec=0; sec<16;sec++){
494 
500  }
501 
518 
519  //-----------------------------------------//
520  //-- fill energy ratio EM/HAD in sectors --//
521  //------------------------------------------//
538 
539 
540  //------------------------------------------//
541  //-- fill the total EM energy per event --//
542  //------------------------------------------//
543 
545  for(int mod=0; mod<2;mod++)
546  for(int sec=0; sec<16;sec++)
548 
549 
551 
552  //--------------------------------------------//
553  //-- fill the total HAD energy per event --//
554  //-------------------------------------------//
555 
557  for(int mod=2; mod<14;mod++)
558  for(int sec=0; sec<16;sec++)
560 
561 
563 
564  //----------------------------------------------------//
565  //-- fill the total energy ratio EM/HAD per event --//
566  //----------------------------------------------------//
567 
569 
570  //----------------------------------------------------//
571  //-- fill the total energy in CASTOR per event --//
572  //----------------------------------------------------//
573  for(int mod=0; mod<14;mod++)
574  for(int sec=0; sec<16;sec++)
576 
578 
579 
580  //-------------------------------------------------------//
581  //-- fill the total energy in CASTOR sectors per run --//
582  //------------------------------------------------------//
583 
584  for(int sec=0; sec<16;sec++){
585 
590  energyTotalChannel[9][sec]+energyTotalChannel[10][sec]+energyTotalChannel[11][sec]+
591  energyTotalChannel[12][sec]+energyTotalChannel[13][sec];
592  }
593 
594  for(int sec=0; sec<16;sec++)
596 
597 
598 
599  } //-- end of working with RecHits
600 
601  else { if(fVerbosity>0) std::cout<<"CastorHIMonitor::processEvent NO Castor RecHits !!!"<<std::endl; }
602 
603 
604 
605  //********************************************************//
606  //************ working with Digis ***********************//
607  //*******************************************************//
608 
609 
610 
611  if(castorDigis.size()>0) {
612 
614 
615  }
616 
617 
618 
619 
620 
621  else { if(fVerbosity>0) std::cout<<"CastorHIMonitor::processEvent NO Castor Digis !!!"<<std::endl; }
622 
623 
624  if (showTiming) {
625  cpu_timer.stop(); std::cout << " TIMER::CastorRecHit -> " << cpu_timer.cpuTime() << std::endl;
627  }
628 
629  ievt_++;
630 
631  return;
632 
633 }
634 
635 
MonitorElement * meEsectorEM2
float energySectors[16]
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meEsectorEMvsHAD15
edm::CPUTimer cpu_timer
MonitorElement * meEsectorHAD10
MonitorElement * meEmodule3
void processEvent(const CastorRecHitCollection &castorHits, const CastorDigiCollection &cast, const CastorDbService &cond)
MonitorElement * meEsectorEMvsHAD7
virtual void setup(const edm::ParameterSet &ps, DQMStore *dbe)
MonitorElement * meEmodule8
MonitorElement * meEsectorEM6
void start()
Definition: CPUTimer.cc:74
MonitorElement * meEsectorEMvsHAD16
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
MonitorElement * meEsector14
MonitorElement * meEsectorHAD16
MonitorElement * meEsector15
MonitorElement * meEsector4
MonitorElement * meEsector5
MonitorElement * meEsectorHAD1
MonitorElement * meEsectorHAD3
MonitorElement * meEsectorEM3
MonitorElement * meEsectorEMvsHAD1
MonitorElement * meEsectorEM9
MonitorElement * meEmodule10
float energyTotalChannel[14][16]
MonitorElement * meEtotalEM
std::vector< T >::const_iterator const_iterator
void reset()
Definition: CPUTimer.cc:107
#define NULL
Definition: scimark2.h:8
MonitorElement * meEsectorEMvsHAD11
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
MonitorElement * meEmodule14
MonitorElement * meEsector10
MonitorElement * meEsectorEM8
MonitorElement * meEmodule7
MonitorElement * meEsectorEMvsHAD12
float energyTotalSector[16]
MonitorElement * meEmodule13
MonitorElement * meEsectorEM16
void Fill(long long x)
MonitorElement * meEsectorEMvsHAD9
MonitorElement * meEsectorEMvsHAD3
MonitorElement * meEsector12
MonitorElement * meEsectorEM11
MonitorElement * meEsectorHAD14
MonitorElement * meEsector8
MonitorElement * meEsectorHAD4
std::string baseFolder_
MonitorElement * meEsector2
MonitorElement * meEsectorHAD2
MonitorElement * meEsectorEM12
MonitorElement * meEmodule4
MonitorElement * meEsectorHAD15
MonitorElement * meEmodule1
MonitorElement * meEsectorEMvsHAD5
list mod
Load physics model.
MonitorElement * meEsector11
MonitorElement * meEsectorEM13
Times stop()
Definition: CPUTimer.cc:94
float energyHADsector[16]
MonitorElement * meEsectorEMvsHAD13
MonitorElement * meEsectorHAD8
MonitorElement * meEmodule6
const_iterator end() const
MonitorElement * meEsector16
MonitorElement * meEsectorEM5
double cpuTime() const
Definition: CPUTimer.cc:157
MonitorElement * meEmodule2
MonitorElement * meEsector6
MonitorElement * meEmodule11
MonitorElement * meEsectorHAD7
MonitorElement * meEsectorEMvsHAD6
MonitorElement * meEVT_
float energyInEachChannel[14][16]
MonitorElement * meEmodule12
MonitorElement * meEmodule5
MonitorElement * meEsectorEM4
MonitorElement * meEsectorEMvsHAD8
MonitorElement * meEsectorHAD13
MonitorElement * meEsectorEM7
size_type size() const
MonitorElement * meEtotalSector
MonitorElement * meEsectorHAD12
MonitorElement * meEsectorEM15
std::string rootFolder_
MonitorElement * meEsectorEMvsHAD10
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meEsector3
MonitorElement * meEsectorEMvsHAD4
MonitorElement * meEsectorEMvsHAD2
MonitorElement * meEsectorHAD5
MonitorElement * meEtotalCASTOR
MonitorElement * meEsector1
MonitorElement * meEtotalHAD
MonitorElement * meEmodule9
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:624
MonitorElement * meEsector9
MonitorElement * meEsectorEM14
Definition: vlib.h:209
MonitorElement * meEtotalEMvsHAD
MonitorElement * meEsector13
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
MonitorElement * meEsectorEMvsHAD14
const_iterator begin() const
MonitorElement * meEsectorHAD6
MonitorElement * meEsectorEM1
MonitorElement * meEsectorHAD11
MonitorElement * meEsectorHAD9
MonitorElement * meEsectorEM10
MonitorElement * meEsector7