CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CMTRawAnalyzer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 //
4 // Package: CMTRawAnalyzer
5 //
6 #include <fstream>
7 #include <iostream>
8 #include <cmath>
9 #include <iosfwd>
10 #include <bitset>
11 #include <memory>
12 
21 
63 #include "TFile.h"
64 #include "TTree.h"
65 #include "TH1.h"
66 #include "TH2.h"
67 #include "TF1.h"
68 
69 #define NUMADCS 256
70 double adc2fC_QIE10[NUMADCS] = {
71  // - - - - - - - range 0 - - - - - - - -
72  //subrange0
73  1.58,
74  4.73,
75  7.88,
76  11.0,
77  14.2,
78  17.3,
79  20.5,
80  23.6,
81  26.8,
82  29.9,
83  33.1,
84  36.2,
85  39.4,
86  42.5,
87  45.7,
88  48.8,
89  //subrange1
90  53.6,
91  60.1,
92  66.6,
93  73.0,
94  79.5,
95  86.0,
96  92.5,
97  98.9,
98  105,
99  112,
100  118,
101  125,
102  131,
103  138,
104  144,
105  151,
106  //subrange2
107  157,
108  164,
109  170,
110  177,
111  186,
112  199,
113  212,
114  225,
115  238,
116  251,
117  264,
118  277,
119  289,
120  302,
121  315,
122  328,
123  //subrange3
124  341,
125  354,
126  367,
127  380,
128  393,
129  406,
130  418,
131  431,
132  444,
133  464,
134  490,
135  516,
136  542,
137  568,
138  594,
139  620,
140 
141  // - - - - - - - range 1 - - - - - - - -
142  //subrange0
143  569,
144  594,
145  619,
146  645,
147  670,
148  695,
149  720,
150  745,
151  771,
152  796,
153  821,
154  846,
155  871,
156  897,
157  922,
158  947,
159  //subrange1
160  960,
161  1010,
162  1060,
163  1120,
164  1170,
165  1220,
166  1270,
167  1320,
168  1370,
169  1430,
170  1480,
171  1530,
172  1580,
173  1630,
174  1690,
175  1740,
176  //subrange2
177  1790,
178  1840,
179  1890,
180  1940,
181  2020,
182  2120,
183  2230,
184  2330,
185  2430,
186  2540,
187  2640,
188  2740,
189  2850,
190  2950,
191  3050,
192  3150,
193  //subrange3
194  3260,
195  3360,
196  3460,
197  3570,
198  3670,
199  3770,
200  3880,
201  3980,
202  4080,
203  4240,
204  4450,
205  4650,
206  4860,
207  5070,
208  5280,
209  5490,
210 
211  // - - - - - - - range 2 - - - - - - - -
212  //subrange0
213  5080,
214  5280,
215  5480,
216  5680,
217  5880,
218  6080,
219  6280,
220  6480,
221  6680,
222  6890,
223  7090,
224  7290,
225  7490,
226  7690,
227  7890,
228  8090,
229  //subrange1
230  8400,
231  8810,
232  9220,
233  9630,
234  10000,
235  10400,
236  10900,
237  11300,
238  11700,
239  12100,
240  12500,
241  12900,
242  13300,
243  13700,
244  14100,
245  14500,
246  //subrange2
247  15000,
248  15400,
249  15800,
250  16200,
251  16800,
252  17600,
253  18400,
254  19300,
255  20100,
256  20900,
257  21700,
258  22500,
259  23400,
260  24200,
261  25000,
262  25800,
263  //subrange3
264  26600,
265  27500,
266  28300,
267  29100,
268  29900,
269  30700,
270  31600,
271  32400,
272  33200,
273  34400,
274  36100,
275  37700,
276  39400,
277  41000,
278  42700,
279  44300,
280 
281  // - - - - - - - range 3 - - - - - - - - -
282  //subrange0
283  41100,
284  42700,
285  44300,
286  45900,
287  47600,
288  49200,
289  50800,
290  52500,
291  54100,
292  55700,
293  57400,
294  59000,
295  60600,
296  62200,
297  63900,
298  65500,
299  //subrange1
300  68000,
301  71300,
302  74700,
303  78000,
304  81400,
305  84700,
306  88000,
307  91400,
308  94700,
309  98100,
310  101000,
311  105000,
312  108000,
313  111000,
314  115000,
315  118000,
316  //subrange2
317  121000,
318  125000,
319  128000,
320  131000,
321  137000,
322  145000,
323  152000,
324  160000,
325  168000,
326  176000,
327  183000,
328  191000,
329  199000,
330  206000,
331  214000,
332  222000,
333  //subrange3
334  230000,
335  237000,
336  245000,
337  253000,
338  261000,
339  268000,
340  276000,
341  284000,
342  291000,
343  302000,
344  316000,
345  329000,
346  343000,
347  356000,
348  370000,
349  384000
350 
351 };
352 
353 //shunt1
354 double const adc2fC_QIE11_shunt1[NUMADCS] = {
355  1.89, 5.07, 8.25, 11.43, 14.61, 17.78, 20.96, 24.14, 27.32, 30.50, 33.68,
356  36.86, 40.04, 43.22, 46.40, 49.58, 54.35, 60.71, 67.07, 73.43, 79.79, 86.15,
357  92.51, 98.87, 105.2, 111.6, 117.9, 124.3, 130.7, 137.0, 143.4, 149.7, 156.1,
358  162.5, 168.8, 175.2, 184.7, 197.4, 210.2, 222.9, 235.6, 248.3, 261.0, 273.7,
359  286.5, 299.2, 311.9, 324.6, 337.3, 350.1, 362.8, 375.5, 388.2, 400.9, 413.6,
360  426.4, 439.1, 458.2, 483.6, 509.0, 534.5, 559.9, 585.3, 610.8, 558.9, 584.2,
361  609.5, 634.7, 660.0, 685.3, 710.6, 735.9, 761.2, 786.5, 811.8, 837.1, 862.4,
362  887.7, 913.0, 938.3, 976.2, 1026.8, 1077.4, 1128.0, 1178.6, 1229.1, 1279.7, 1330.3,
363  1380.9, 1431.5, 1482.1, 1532.7, 1583.3, 1633.8, 1684.4, 1735.0, 1785.6, 1836.2, 1886.8,
364  1937.4, 2013.2, 2114.4, 2215.6, 2316.8, 2417.9, 2519.1, 2620.3, 2721.5, 2822.6, 2923.8,
365  3025.0, 3126.2, 3227.3, 3328.5, 3429.7, 3530.9, 3632.0, 3733.2, 3834.4, 3935.5, 4036.7,
366  4188.5, 4390.8, 4593.2, 4795.5, 4997.9, 5200.2, 5402.6, 5057.5, 5262.3, 5467.1, 5671.8,
367  5876.6, 6081.4, 6286.2, 6491.0, 6695.8, 6900.6, 7105.3, 7310.1, 7514.9, 7719.7, 7924.5,
368  8129.3, 8436.4, 8846.0, 9255.6, 9665.1, 10074.7, 10484.3, 10893.9, 11303.4, 11713.0, 12122.6,
369  12532.1, 12941.7, 13351.3, 13760.8, 14170.4, 14580.0, 14989.5, 15399.1, 15808.7, 16218.2, 16832.6,
370  17651.7, 18470.9, 19290.0, 20109.2, 20928.3, 21747.4, 22566.6, 23385.7, 24204.8, 25024.0, 25843.1,
371  26662.3, 27481.4, 28300.5, 29119.7, 29938.8, 30757.9, 31577.1, 32396.2, 33215.4, 34444.1, 36082.3,
372  37720.6, 39358.9, 40997.2, 42635.4, 44273.7, 40908.7, 42542.6, 44176.5, 45810.4, 47444.3, 49078.3,
373  50712.2, 52346.1, 53980.0, 55613.9, 57247.8, 58881.8, 60515.7, 62149.6, 63783.5, 65417.4, 67868.3,
374  71136.1, 74404.0, 77671.8, 80939.7, 84207.5, 87475.3, 90743.2, 94011.0, 97278.8, 100546.7, 103814.5,
375  107082.3, 110350.2, 113618.0, 116885.8, 120153.7, 123421.5, 126689.3, 129957.2, 134858.9, 141394.6, 147930.3,
376  154465.9, 161001.6, 167537.3, 174072.9, 180608.6, 187144.3, 193679.9, 200215.6, 206751.3, 213287.0, 219822.6,
377  226358.3, 232894.0, 239429.6, 245965.3, 252501.0, 259036.6, 265572.3, 275375.8, 288447.2, 301518.5, 314589.8,
378  327661.2, 340732.5, 353803.8};
379 //shunt6
380 double const adc2fC_QIE11_shunt6[NUMADCS] = {
381  9.56, 28.24, 46.91, 65.59, 84.27, 102.9, 121.6, 140.3, 159.0, 177.7,
382  196.3, 215.0, 233.7, 252.4, 271.0, 289.7, 317.7, 355.1, 392.4, 429.8,
383  467.1, 504.5, 541.9, 579.2, 616.6, 653.9, 691.3, 728.6, 766.0, 803.3,
384  840.7, 878.0, 915.4, 952.8, 990.1, 1027.5, 1083.5, 1158.2, 1232.9, 1307.6,
385  1382.3, 1457.0, 1531.7, 1606.4, 1681.2, 1755.9, 1830.6, 1905.3, 1980.0, 2054.7,
386  2129.4, 2204.1, 2278.8, 2353.5, 2428.2, 2502.9, 2577.7, 2689.7, 2839.1, 2988.6,
387  3138.0, 3287.4, 3436.8, 3586.2, 3263.0, 3411.3, 3559.6, 3707.9, 3856.2, 4004.5,
388  4152.9, 4301.2, 4449.5, 4597.8, 4746.1, 4894.4, 5042.7, 5191.0, 5339.4, 5487.7,
389  5710.1, 6006.8, 6303.4, 6600.0, 6896.6, 7193.3, 7489.9, 7786.5, 8083.1, 8379.8,
390  8676.4, 8973.0, 9269.6, 9566.3, 9862.9, 10159.5, 10456.2, 10752.8, 11049.4, 11346.0,
391  11791.0, 12384.2, 12977.5, 13570.7, 14164.0, 14757.2, 15350.5, 15943.7, 16537.0, 17130.2,
392  17723.5, 18316.7, 18910.0, 19503.2, 20096.5, 20689.7, 21283.0, 21876.2, 22469.5, 23062.8,
393  23656.0, 24545.9, 25732.4, 26918.9, 28105.4, 29291.9, 30478.4, 31664.9, 29399.4, 30590.1,
394  31780.9, 32971.7, 34162.4, 35353.2, 36544.0, 37734.7, 38925.5, 40116.3, 41307.0, 42497.8,
395  43688.5, 44879.3, 46070.1, 47260.8, 49047.0, 51428.5, 53810.1, 56191.6, 58573.1, 60954.6,
396  63336.2, 65717.7, 68099.2, 70480.8, 72862.3, 75243.8, 77625.4, 80006.9, 82388.4, 84769.9,
397  87151.5, 89533.0, 91914.5, 94296.1, 97868.4, 102631.4, 107394.5, 112157.5, 116920.6, 121683.7,
398  126446.7, 131209.8, 135972.8, 140735.9, 145499.0, 150262.0, 155025.1, 159788.2, 164551.2, 169314.3,
399  174077.3, 178840.4, 183603.5, 188366.5, 193129.6, 200274.2, 209800.3, 219326.4, 228852.5, 238378.7,
400  247904.8, 257430.9, 237822.7, 247326.7, 256830.7, 266334.8, 275838.8, 285342.9, 294846.9, 304351.0,
401  313855.0, 323359.1, 332863.1, 342367.1, 351871.2, 361375.2, 370879.3, 380383.3, 394639.4, 413647.5,
402  432655.6, 451663.6, 470671.7, 489679.8, 508687.9, 527696.0, 546704.1, 565712.2, 584720.3, 603728.3,
403  622736.4, 641744.5, 660752.6, 679760.7, 698768.8, 717776.9, 736785.0, 755793.0, 784305.2, 822321.3,
404  860337.5, 898353.7, 936369.9, 974386.0, 1012402.2, 1050418.4, 1088434.6, 1126450.7, 1164466.9, 1202483.1,
405  1240499.3, 1278515.4, 1316531.6, 1354547.8, 1392564.0, 1430580.1, 1468596.3, 1506612.5, 1544628.7, 1601652.9,
406  1677685.3, 1753717.6, 1829750.0, 1905782.3, 1981814.7, 2057847.0};
407 // for HPD:
408 static const float adc2fC[128] = {
409  -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5,
410  12.5, 13.5, 15., 17., 19., 21., 23., 25., 27., 29.5, 32.5, 35.5, 38.5,
411  42., 46., 50., 54.5, 59.5, 64.5, 59.5, 64.5, 69.5, 74.5, 79.5, 84.5, 89.5,
412  94.5, 99.5, 104.5, 109.5, 114.5, 119.5, 124.5, 129.5, 137., 147., 157., 167., 177.,
413  187., 197., 209.5, 224.5, 239.5, 254.5, 272., 292., 312., 334.5, 359.5, 384.5, 359.5,
414  384.5, 409.5, 434.5, 459.5, 484.5, 509.5, 534.5, 559.5, 584.5, 609.5, 634.5, 659.5, 684.5,
415  709.5, 747., 797., 847., 897., 947., 997., 1047., 1109.5, 1184.5, 1259.5, 1334.5, 1422.,
416  1522., 1622., 1734.5, 1859.5, 1984.5, 1859.5, 1984.5, 2109.5, 2234.5, 2359.5, 2484.5, 2609.5, 2734.5,
417  2859.5, 2984.5, 3109.5, 3234.5, 3359.5, 3484.5, 3609.5, 3797., 4047., 4297., 4547., 4797., 5047.,
418  5297., 5609.5, 5984.5, 6359.5, 6734.5, 7172., 7672., 8172., 8734.5, 9359.5, 9984.5};
419 const int nsub = 4;
420 const int ndepth = 7;
421 const int neta = 82;
422 const int nphi = 72;
423 const float bphi = 72.;
424 const int zneta = 22;
425 const int znphi = 18;
426 const int npfit = 220;
427 const float anpfit = 220.; // for SiPM:
428 
429 //
430 class CMTRawAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
431 public:
432  explicit CMTRawAnalyzer(const edm::ParameterSet&);
433  ~CMTRawAnalyzer() override;
434  void beginJob() override;
435  void analyze(const edm::Event&, const edm::EventSetup&) override;
436  void endJob() override;
437  void beginRun(const edm::Run& r, const edm::EventSetup& iSetup) override;
438  void endRun(const edm::Run& r, const edm::EventSetup& iSetup) override;
439  virtual void fillMAP();
440 
441 private:
442  double phi12(double phi1, double en1, double phi2, double en2);
443  double dR(double eta1, double phi1, double eta2, double phi2);
444  double dPhiWsign(double phi1, double phi2);
445 
456 
484  bool useADCfC_;
488  double ratioHBMin_;
489  double ratioHBMax_;
490  double ratioHEMin_;
491  double ratioHEMax_;
492  double ratioHFMin_;
493  double ratioHFMax_;
494  double ratioHOMin_;
495  double ratioHOMax_;
521  //
546 
555 
564 
573 
584  double rmsHBMin_;
585  double rmsHBMax_;
586  double rmsHEMin_;
587  double rmsHEMax_;
588  double rmsHFMin_;
589  double rmsHFMax_;
590  double rmsHOMin_;
591  double rmsHOMax_;
593  double TSpeakHBMin_;
594  double TSpeakHBMax_;
595  double TSpeakHEMin_;
596  double TSpeakHEMax_;
597  double TSpeakHFMin_;
598  double TSpeakHFMax_;
599  double TSpeakHOMin_;
600  double TSpeakHOMax_;
601  double TSmeanHBMin_;
602  double TSmeanHBMax_;
603  double TSmeanHEMin_;
604  double TSmeanHEMax_;
605  double TSmeanHFMin_;
606  double TSmeanHFMax_;
607  double TSmeanHOMin_;
608  double TSmeanHOMax_;
609  int lsmin_;
610  int lsmax_;
661  int nevent;
662  int nevent50;
663  int nnnnnn;
669  int nnnnnn1;
670  int nnnnnn2;
671  int nnnnnn3;
672  int nnnnnn4;
673  int nnnnnn5;
674  int nnnnnn6;
754  TH1F* h_error1;
755  TH1F* h_error2;
756  TH1F* h_error3;
757  TH1F* h_amplError;
758  TH1F* h_amplFine;
760  TH1F* h_error1_HB;
761  TH1F* h_error2_HB;
762  TH1F* h_error3_HB;
763  TH1F* h_error4_HB;
764  TH1F* h_error5_HB;
765  TH1F* h_error6_HB;
766  TH1F* h_error7_HB;
773  TH1F* h_fiber0_HB;
774  TH1F* h_fiber1_HB;
775  TH1F* h_fiber2_HB;
778  TH1F* h_error1_HE;
779  TH1F* h_error2_HE;
780  TH1F* h_error3_HE;
781  TH1F* h_error4_HE;
782  TH1F* h_error5_HE;
783  TH1F* h_error6_HE;
784  TH1F* h_error7_HE;
794  TH1F* h_fiber0_HE;
795  TH1F* h_fiber1_HE;
796  TH1F* h_fiber2_HE;
799  TH1F* h_error1_HF;
800  TH1F* h_error2_HF;
801  TH1F* h_error3_HF;
802  TH1F* h_error4_HF;
803  TH1F* h_error5_HF;
804  TH1F* h_error6_HF;
805  TH1F* h_error7_HF;
812  TH1F* h_fiber0_HF;
813  TH1F* h_fiber1_HF;
814  TH1F* h_fiber2_HF;
817  TH1F* h_error1_HO;
818  TH1F* h_error2_HO;
819  TH1F* h_error3_HO;
820  TH1F* h_error4_HO;
821  TH1F* h_error5_HO;
822  TH1F* h_error6_HO;
823  TH1F* h_error7_HO;
827  TH1F* h_fiber0_HO;
828  TH1F* h_fiber1_HO;
829  TH1F* h_fiber2_HO;
881  TH1F* h_TSmaxA_HB;
899  TH1F* h_Ampl_HB;
938 
955 
978  TH1F* h_TSmaxA_HF;
996  TH1F* h_Ampl_HF;
1030  TH1F* h_Ampl_HO;
1206  TH1F* h_Ampl_HE;
1263  TH2F* h_map_HB;
1280  TH2F* h_map_HE;
1297  TH2F* h_map_HO;
1314  TH2F* h_map_HF;
1780  TH1F* h_gain_HB;
1789  TH1F* h_gain_HE;
1794  TH1F* h_gain_HF;
1799  TH1F* h_gain_HO;
2075  // phy-symmetry, phi-symmetry:
2076  // Reco:
2083  //HB:
2108  //HE:
2151  //HF:
2164 
2177 
2223 
2260  double caliba[ndepth][neta][nphi];
2261  double calibw[ndepth][neta][nphi];
2262  double calib0[ndepth][neta][nphi];
2263  double signal[ndepth][neta][nphi];
2264  double calib3[ndepth][neta][nphi];
2266  double calib2[ndepth][neta][nphi];
2276 
2277  // phi-symmetry monitoring for calibration group:
2283 
2287 
2291 
2292  float TS_data[100];
2293  float TS_cal[100];
2301  long int Nevent;
2302  int Run;
2303  int run0;
2306  long int orbitNum;
2307  int bcn;
2308  int lumi;
2309  int ls0;
2334  double maxxSUM1;
2335  double maxxSUM2;
2336  double maxxSUM3;
2337  double maxxSUM4;
2338  double maxxOCCUP1;
2339  double maxxOCCUP2;
2340  double maxxOCCUP3;
2341  double maxxOCCUP4;
2342  TTree* myTree;
2343  TFile* hOutputFile;
2344  std::ofstream MAPfile;
2346  // Get RBX number from 1-35 for Calibration box
2347  int getRBX(int& i, int& j, int& k);
2351  // upgrade:
2352  void fillDigiErrorsHFQIE10(QIE10DataFrame qie10df);
2353  void fillDigiErrorsQIE11(QIE11DataFrame qie11df);
2357  // upgrade:
2359  void fillDigiAmplitudeQIE11(QIE11DataFrame qie11df);
2362  int numOfTS;
2365  float alsmin;
2366  float blsmax;
2368 };
2369 
2370 //
2372 //
2374  if (verbosity > 0)
2375  std::cout << "============== endJob ===================================" << std::endl;
2376 
2377  std::cout << " --------------------------------------- " << std::endl;
2378  std::cout << " for Run = " << run0 << " with runcounter = " << runcounter << " #ev = " << eventcounter << std::endl;
2379  std::cout << " #LS = " << lscounterrun << " #LS10 = " << lscounterrun10 << " Last LS = " << ls0 << std::endl;
2380  std::cout << " --------------------------------------------- " << std::endl;
2381  h_nls_per_run->Fill(float(lscounterrun));
2382  h_nls_per_run10->Fill(float(lscounterrun10));
2383 
2385  std::cout << "===== full number of events = " << nevent << std::endl;
2386  std::cout << "===== possible max number of events in ntuple(each 50th recorded) = " << nevent50 << std::endl;
2387  std::cout << "===== but limited by maxNeventsInNtuple = " << maxNeventsInNtuple_ << std::endl;
2388  std::cout << "===== full number of events*HBHEdigis and qie11 = " << nnnnnnhbhe << " and " << nnnnnnhbheqie11
2389  << std::endl;
2390  std::cout << "===== full number of events*HBHEdigis = " << nnnnnn << std::endl;
2391  std::cout << "===== full number of events*HFdigis and qie10 = " << counterhf << " and " << counterhfqie10
2392  << std::endl;
2393  std::cout << "===== full number of events*HOdigis = " << counterho << std::endl;
2394 
2395  std::cout << "===== Start writing user histograms =====" << std::endl;
2398 }
2399 //
2400 
2401 //
2402 //
2405  usesResource(TFileService::kSharedResource);
2406  verbosity = iConfig.getUntrackedParameter<int>("Verbosity");
2407  MAPcreation = iConfig.getUntrackedParameter<int>("MapCreation");
2408  recordNtuples_ = iConfig.getUntrackedParameter<bool>("recordNtuples");
2409  maxNeventsInNtuple_ = iConfig.getParameter<int>("maxNeventsInNtuple");
2410  tok_calib_ = consumes<HcalCalibDigiCollection>(iConfig.getParameter<edm::InputTag>("hcalCalibDigiCollectionTag")); //
2411  tok_hbhe_ = consumes<HBHEDigiCollection>(iConfig.getParameter<edm::InputTag>("hbheDigiCollectionTag"));
2412  tok_ho_ = consumes<HODigiCollection>(iConfig.getParameter<edm::InputTag>("hoDigiCollectionTag"));
2413  tok_hf_ = consumes<HFDigiCollection>(iConfig.getParameter<edm::InputTag>("hfDigiCollectionTag")); //
2414  tok_qie11_ = consumes<QIE11DigiCollection>(iConfig.getParameter<edm::InputTag>("hbheQIE11DigiCollectionTag"));
2415  tok_qie10_ = consumes<QIE10DigiCollection>(iConfig.getParameter<edm::InputTag>("hbheQIE10DigiCollectionTag"));
2416  // phi-symmetry monitoring for calibration group:
2417  tok_hbheSignal_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputSignalTag"));
2418  tok_hbheNoise_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputNoiseTag"));
2419  tok_hfSignal_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputSignalTag"));
2420  tok_hfNoise_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputNoiseTag"));
2421  recordHistoes_ = iConfig.getUntrackedParameter<bool>("recordHistoes");
2422  studyRunDependenceHist_ = iConfig.getUntrackedParameter<bool>("studyRunDependenceHist");
2423  studyCapIDErrorsHist_ = iConfig.getUntrackedParameter<bool>("studyCapIDErrorsHist");
2424  studyRMSshapeHist_ = iConfig.getUntrackedParameter<bool>("studyRMSshapeHist");
2425  studyRatioShapeHist_ = iConfig.getUntrackedParameter<bool>("studyRatioShapeHist");
2426  studyTSmaxShapeHist_ = iConfig.getUntrackedParameter<bool>("studyTSmaxShapeHist");
2427  studyTSmeanShapeHist_ = iConfig.getUntrackedParameter<bool>("studyTSmeanShapeHist");
2428  studyDiffAmplHist_ = iConfig.getUntrackedParameter<bool>("studyDiffAmplHist");
2429  studyCalibCellsHist_ = iConfig.getUntrackedParameter<bool>("studyCalibCellsHist");
2430  studyADCAmplHist_ = iConfig.getUntrackedParameter<bool>("studyADCAmplHist");
2431  studyPedestalsHist_ = iConfig.getUntrackedParameter<bool>("studyPedestalsHist");
2432  studyPedestalCorrelations_ = iConfig.getUntrackedParameter<bool>("studyPedestalCorrelations");
2433  useADCmassive_ = iConfig.getUntrackedParameter<bool>("useADCmassive");
2434  useADCfC_ = iConfig.getUntrackedParameter<bool>("useADCfC");
2435  useADCcounts_ = iConfig.getUntrackedParameter<bool>("useADCcounts");
2436  usePedestalSubtraction_ = iConfig.getUntrackedParameter<bool>("usePedestalSubtraction");
2437  usecontinuousnumbering_ = iConfig.getUntrackedParameter<bool>("usecontinuousnumbering");
2438  flagLaserRaddam_ = iConfig.getParameter<int>("flagLaserRaddam");
2439  flagIterativeMethodCalibrationGroupDigi_ = iConfig.getParameter<int>("flagIterativeMethodCalibrationGroupDigi");
2440  flagIterativeMethodCalibrationGroupReco_ = iConfig.getParameter<int>("flagIterativeMethodCalibrationGroupReco");
2441  flagfitshunt1pedorledlowintensity_ = iConfig.getParameter<int>("flagfitshunt1pedorledlowintensity");
2442  flagabortgaprejected_ = iConfig.getParameter<int>("flagabortgaprejected");
2443  bcnrejectedlow_ = iConfig.getParameter<int>("bcnrejectedlow");
2444  bcnrejectedhigh_ = iConfig.getParameter<int>("bcnrejectedhigh");
2445  ratioHBMin_ = iConfig.getParameter<double>("ratioHBMin");
2446  ratioHBMax_ = iConfig.getParameter<double>("ratioHBMax");
2447  ratioHEMin_ = iConfig.getParameter<double>("ratioHEMin");
2448  ratioHEMax_ = iConfig.getParameter<double>("ratioHEMax");
2449  ratioHFMin_ = iConfig.getParameter<double>("ratioHFMin");
2450  ratioHFMax_ = iConfig.getParameter<double>("ratioHFMax");
2451  ratioHOMin_ = iConfig.getParameter<double>("ratioHOMin");
2452  ratioHOMax_ = iConfig.getParameter<double>("ratioHOMax");
2453  flagtodefinebadchannel_ = iConfig.getParameter<int>("flagtodefinebadchannel");
2454  howmanybinsonplots_ = iConfig.getParameter<int>("howmanybinsonplots");
2455  splashesUpperLimit_ = iConfig.getParameter<int>("splashesUpperLimit");
2456  flagtoaskrunsorls_ = iConfig.getParameter<int>("flagtoaskrunsorls");
2457  flagestimatornormalization_ = iConfig.getParameter<int>("flagestimatornormalization");
2458  flagcpuoptimization_ = iConfig.getParameter<int>("flagcpuoptimization");
2459  flagupgradeqie1011_ = iConfig.getParameter<int>("flagupgradeqie1011");
2460  flagsipmcorrection_ = iConfig.getParameter<int>("flagsipmcorrection");
2461  flaguseshunt_ = iConfig.getParameter<int>("flaguseshunt");
2462  lsdep_cut1_peak_HBdepth1_ = iConfig.getParameter<int>("lsdep_cut1_peak_HBdepth1");
2463  lsdep_cut1_peak_HBdepth2_ = iConfig.getParameter<int>("lsdep_cut1_peak_HBdepth2");
2464  lsdep_cut1_peak_HEdepth1_ = iConfig.getParameter<int>("lsdep_cut1_peak_HEdepth1");
2465  lsdep_cut1_peak_HEdepth2_ = iConfig.getParameter<int>("lsdep_cut1_peak_HEdepth2");
2466  lsdep_cut1_peak_HEdepth3_ = iConfig.getParameter<int>("lsdep_cut1_peak_HEdepth3");
2467  lsdep_cut1_peak_HFdepth1_ = iConfig.getParameter<int>("lsdep_cut1_peak_HFdepth1");
2468  lsdep_cut1_peak_HFdepth2_ = iConfig.getParameter<int>("lsdep_cut1_peak_HFdepth2");
2469  lsdep_cut1_peak_HOdepth4_ = iConfig.getParameter<int>("lsdep_cut1_peak_HOdepth4");
2470  lsdep_cut3_max_HBdepth1_ = iConfig.getParameter<int>("lsdep_cut3_max_HBdepth1");
2471  lsdep_cut3_max_HBdepth2_ = iConfig.getParameter<int>("lsdep_cut3_max_HBdepth2");
2472  lsdep_cut3_max_HEdepth1_ = iConfig.getParameter<int>("lsdep_cut3_max_HEdepth1");
2473  lsdep_cut3_max_HEdepth2_ = iConfig.getParameter<int>("lsdep_cut3_max_HEdepth2");
2474  lsdep_cut3_max_HEdepth3_ = iConfig.getParameter<int>("lsdep_cut3_max_HEdepth3");
2475  lsdep_cut3_max_HFdepth1_ = iConfig.getParameter<int>("lsdep_cut3_max_HFdepth1");
2476  lsdep_cut3_max_HFdepth2_ = iConfig.getParameter<int>("lsdep_cut3_max_HFdepth2");
2477  lsdep_cut3_max_HOdepth4_ = iConfig.getParameter<int>("lsdep_cut3_max_HOdepth4");
2478  lsdep_estimator1_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth1");
2479  lsdep_estimator1_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth2");
2480  lsdep_estimator1_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth1");
2481  lsdep_estimator1_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth2");
2482  lsdep_estimator1_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth3");
2483  lsdep_estimator1_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth1");
2484  lsdep_estimator1_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth2");
2485  lsdep_estimator1_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HOdepth4");
2486  lsdep_estimator1_HEdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth4");
2487  lsdep_estimator1_HEdepth5_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth5");
2488  lsdep_estimator1_HEdepth6_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth6");
2489  lsdep_estimator1_HEdepth7_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth7");
2490  lsdep_estimator1_HFdepth3_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth3");
2491  lsdep_estimator1_HFdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth4");
2492  lsdep_estimator1_HBdepth3_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth3");
2493  lsdep_estimator1_HBdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth4");
2494  lsdep_estimator2_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator2_HBdepth1");
2495  lsdep_estimator2_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator2_HBdepth2");
2496  lsdep_estimator2_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator2_HEdepth1");
2497  lsdep_estimator2_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator2_HEdepth2");
2498  lsdep_estimator2_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator2_HEdepth3");
2499  lsdep_estimator2_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator2_HFdepth1");
2500  lsdep_estimator2_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator2_HFdepth2");
2501  lsdep_estimator2_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator2_HOdepth4");
2502  lsdep_estimator3_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator3_HBdepth1");
2503  lsdep_estimator3_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator3_HBdepth2");
2504  lsdep_estimator3_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator3_HEdepth1");
2505  lsdep_estimator3_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator3_HEdepth2");
2506  lsdep_estimator3_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator3_HEdepth3");
2507  lsdep_estimator3_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator3_HFdepth1");
2508  lsdep_estimator3_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator3_HFdepth2");
2509  lsdep_estimator3_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator3_HOdepth4");
2510  lsdep_estimator4_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator4_HBdepth1");
2511  lsdep_estimator4_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator4_HBdepth2");
2512  lsdep_estimator4_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator4_HEdepth1");
2513  lsdep_estimator4_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator4_HEdepth2");
2514  lsdep_estimator4_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator4_HEdepth3");
2515  lsdep_estimator4_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator4_HFdepth1");
2516  lsdep_estimator4_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator4_HFdepth2");
2517  lsdep_estimator4_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator4_HOdepth4");
2518  lsdep_estimator5_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator5_HBdepth1");
2519  lsdep_estimator5_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator5_HBdepth2");
2520  lsdep_estimator5_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator5_HEdepth1");
2521  lsdep_estimator5_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator5_HEdepth2");
2522  lsdep_estimator5_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator5_HEdepth3");
2523  lsdep_estimator5_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator5_HFdepth1");
2524  lsdep_estimator5_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator5_HFdepth2");
2525  lsdep_estimator5_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator5_HOdepth4");
2526  forallestimators_amplitude_bigger_ = iConfig.getParameter<double>("forallestimators_amplitude_bigger");
2527  rmsHBMin_ = iConfig.getParameter<double>("rmsHBMin");
2528  rmsHBMax_ = iConfig.getParameter<double>("rmsHBMax");
2529  rmsHEMin_ = iConfig.getParameter<double>("rmsHEMin");
2530  rmsHEMax_ = iConfig.getParameter<double>("rmsHEMax");
2531  rmsHFMin_ = iConfig.getParameter<double>("rmsHFMin");
2532  rmsHFMax_ = iConfig.getParameter<double>("rmsHFMax");
2533  rmsHOMin_ = iConfig.getParameter<double>("rmsHOMin");
2534  rmsHOMax_ = iConfig.getParameter<double>("rmsHOMax");
2535  ADCAmplHBMin_ = iConfig.getParameter<double>("ADCAmplHBMin");
2536  ADCAmplHEMin_ = iConfig.getParameter<double>("ADCAmplHEMin");
2537  ADCAmplHOMin_ = iConfig.getParameter<double>("ADCAmplHOMin");
2538  ADCAmplHFMin_ = iConfig.getParameter<double>("ADCAmplHFMin");
2539  ADCAmplHBMax_ = iConfig.getParameter<double>("ADCAmplHBMax");
2540  ADCAmplHEMax_ = iConfig.getParameter<double>("ADCAmplHEMax");
2541  ADCAmplHOMax_ = iConfig.getParameter<double>("ADCAmplHOMax");
2542  ADCAmplHFMax_ = iConfig.getParameter<double>("ADCAmplHFMax");
2543  pedestalwHBMax_ = iConfig.getParameter<double>("pedestalwHBMax");
2544  pedestalwHEMax_ = iConfig.getParameter<double>("pedestalwHEMax");
2545  pedestalwHFMax_ = iConfig.getParameter<double>("pedestalwHFMax");
2546  pedestalwHOMax_ = iConfig.getParameter<double>("pedestalwHOMax");
2547  pedestalHBMax_ = iConfig.getParameter<double>("pedestalHBMax");
2548  pedestalHEMax_ = iConfig.getParameter<double>("pedestalHEMax");
2549  pedestalHFMax_ = iConfig.getParameter<double>("pedestalHFMax");
2550  pedestalHOMax_ = iConfig.getParameter<double>("pedestalHOMax");
2551  calibrADCHBMin_ = iConfig.getParameter<double>("calibrADCHBMin");
2552  calibrADCHEMin_ = iConfig.getParameter<double>("calibrADCHEMin");
2553  calibrADCHOMin_ = iConfig.getParameter<double>("calibrADCHOMin");
2554  calibrADCHFMin_ = iConfig.getParameter<double>("calibrADCHFMin");
2555  calibrADCHBMax_ = iConfig.getParameter<double>("calibrADCHBMax");
2556  calibrADCHEMax_ = iConfig.getParameter<double>("calibrADCHEMax");
2557  calibrADCHOMax_ = iConfig.getParameter<double>("calibrADCHOMax");
2558  calibrADCHFMax_ = iConfig.getParameter<double>("calibrADCHFMax");
2559  calibrRatioHBMin_ = iConfig.getParameter<double>("calibrRatioHBMin");
2560  calibrRatioHEMin_ = iConfig.getParameter<double>("calibrRatioHEMin");
2561  calibrRatioHOMin_ = iConfig.getParameter<double>("calibrRatioHOMin");
2562  calibrRatioHFMin_ = iConfig.getParameter<double>("calibrRatioHFMin");
2563  calibrRatioHBMax_ = iConfig.getParameter<double>("calibrRatioHBMax");
2564  calibrRatioHEMax_ = iConfig.getParameter<double>("calibrRatioHEMax");
2565  calibrRatioHOMax_ = iConfig.getParameter<double>("calibrRatioHOMax");
2566  calibrRatioHFMax_ = iConfig.getParameter<double>("calibrRatioHFMax");
2567  calibrTSmaxHBMin_ = iConfig.getParameter<double>("calibrTSmaxHBMin");
2568  calibrTSmaxHEMin_ = iConfig.getParameter<double>("calibrTSmaxHEMin");
2569  calibrTSmaxHOMin_ = iConfig.getParameter<double>("calibrTSmaxHOMin");
2570  calibrTSmaxHFMin_ = iConfig.getParameter<double>("calibrTSmaxHFMin");
2571  calibrTSmaxHBMax_ = iConfig.getParameter<double>("calibrTSmaxHBMax");
2572  calibrTSmaxHEMax_ = iConfig.getParameter<double>("calibrTSmaxHEMax");
2573  calibrTSmaxHOMax_ = iConfig.getParameter<double>("calibrTSmaxHOMax");
2574  calibrTSmaxHFMax_ = iConfig.getParameter<double>("calibrTSmaxHFMax");
2575  calibrTSmeanHBMin_ = iConfig.getParameter<double>("calibrTSmeanHBMin");
2576  calibrTSmeanHEMin_ = iConfig.getParameter<double>("calibrTSmeanHEMin");
2577  calibrTSmeanHOMin_ = iConfig.getParameter<double>("calibrTSmeanHOMin");
2578  calibrTSmeanHFMin_ = iConfig.getParameter<double>("calibrTSmeanHFMin");
2579  calibrTSmeanHBMax_ = iConfig.getParameter<double>("calibrTSmeanHBMax");
2580  calibrTSmeanHEMax_ = iConfig.getParameter<double>("calibrTSmeanHEMax");
2581  calibrTSmeanHOMax_ = iConfig.getParameter<double>("calibrTSmeanHOMax");
2582  calibrTSmeanHFMax_ = iConfig.getParameter<double>("calibrTSmeanHFMax");
2583  calibrWidthHBMin_ = iConfig.getParameter<double>("calibrWidthHBMin");
2584  calibrWidthHEMin_ = iConfig.getParameter<double>("calibrWidthHEMin");
2585  calibrWidthHOMin_ = iConfig.getParameter<double>("calibrWidthHOMin");
2586  calibrWidthHFMin_ = iConfig.getParameter<double>("calibrWidthHFMin");
2587  calibrWidthHBMax_ = iConfig.getParameter<double>("calibrWidthHBMax");
2588  calibrWidthHEMax_ = iConfig.getParameter<double>("calibrWidthHEMax");
2589  calibrWidthHOMax_ = iConfig.getParameter<double>("calibrWidthHOMax");
2590  calibrWidthHFMax_ = iConfig.getParameter<double>("calibrWidthHFMax");
2591  TSpeakHBMin_ = iConfig.getParameter<double>("TSpeakHBMin");
2592  TSpeakHBMax_ = iConfig.getParameter<double>("TSpeakHBMax");
2593  TSpeakHEMin_ = iConfig.getParameter<double>("TSpeakHEMin");
2594  TSpeakHEMax_ = iConfig.getParameter<double>("TSpeakHEMax");
2595  TSpeakHFMin_ = iConfig.getParameter<double>("TSpeakHFMin");
2596  TSpeakHFMax_ = iConfig.getParameter<double>("TSpeakHFMax");
2597  TSpeakHOMin_ = iConfig.getParameter<double>("TSpeakHOMin");
2598  TSpeakHOMax_ = iConfig.getParameter<double>("TSpeakHOMax");
2599  TSmeanHBMin_ = iConfig.getParameter<double>("TSmeanHBMin");
2600  TSmeanHBMax_ = iConfig.getParameter<double>("TSmeanHBMax");
2601  TSmeanHEMin_ = iConfig.getParameter<double>("TSmeanHEMin");
2602  TSmeanHEMax_ = iConfig.getParameter<double>("TSmeanHEMax");
2603  TSmeanHFMin_ = iConfig.getParameter<double>("TSmeanHFMin");
2604  TSmeanHFMax_ = iConfig.getParameter<double>("TSmeanHFMax");
2605  TSmeanHOMin_ = iConfig.getParameter<double>("TSmeanHOMin");
2606  TSmeanHOMax_ = iConfig.getParameter<double>("TSmeanHOMax");
2607  lsmin_ = iConfig.getParameter<int>("lsmin");
2608  lsmax_ = iConfig.getParameter<int>("lsmax");
2609  alsmin = lsmin_;
2610  blsmax = lsmax_;
2611  nlsminmax = lsmax_ - lsmin_ + 1;
2612  numOfLaserEv = 0;
2613  local_event = 0;
2614  numOfTS = 10;
2615  run0 = -1;
2616  runcounter = 0;
2617  eventcounter = 0;
2618  lumi = 0;
2619  ls0 = -1;
2620  lscounter = 0;
2621  lscounterM1 = 0;
2622  lscounter10 = 0;
2623  nevcounter = 0;
2624  lscounterrun = 0;
2625  lscounterrun10 = 0;
2626  nevcounter0 = 0;
2627  nevcounter00 = 0;
2628  for (int k0 = 0; k0 < nsub; k0++) {
2629  for (int k1 = 0; k1 < ndepth; k1++) {
2630  for (int k2 = 0; k2 < neta; k2++) {
2631  if (k0 == 1) {
2632  mapRADDAM_HED2[k1][k2] = 0.;
2633  mapRADDAM_HED20[k1][k2] = 0.;
2634  }
2635  for (int k3 = 0; k3 < nphi; k3++) {
2636  sumEstimator0[k0][k1][k2][k3] = 0.;
2637  sumEstimator1[k0][k1][k2][k3] = 0.;
2638  sumEstimator2[k0][k1][k2][k3] = 0.;
2639  sumEstimator3[k0][k1][k2][k3] = 0.;
2640  sumEstimator4[k0][k1][k2][k3] = 0.;
2641  sumEstimator5[k0][k1][k2][k3] = 0.;
2642  sumEstimator6[k0][k1][k2][k3] = 0.;
2643  sum0Estimator[k0][k1][k2][k3] = 0.;
2644  if (k0 == 1) {
2645  mapRADDAM_HE[k1][k2][k3] = 0.;
2646  mapRADDAM0_HE[k1][k2][k3] = 0;
2647  }
2648  }
2649  }
2650  }
2651  }
2668  maxxSUM1 = 0.;
2669  maxxSUM2 = 0.;
2670  maxxSUM3 = 0.;
2671  maxxSUM4 = 0.;
2672  maxxOCCUP1 = 0.;
2673  maxxOCCUP2 = 0.;
2674  maxxOCCUP3 = 0.;
2675  maxxOCCUP4 = 0.;
2676  testmetka = 0;
2677 }
2680  conditions = &iSetup.getData(tokDB_);
2681  topo = &iSetup.getData(tokTopo_);
2682  if (MAPcreation > 0) {
2683  if (flagupgradeqie1011_ == 1)
2684  fillMAP();
2685  MAPcreation = 0;
2686  }
2687  nevent++;
2688  nevent50 = nevent / 50;
2689  Run = iEvent.id().run();
2690  Nevent = iEvent.id().event(); // event number = global_event
2691  lumi = iEvent.luminosityBlock(); // lumi section
2692  bcn = iEvent.bunchCrossing();
2693  orbitNum = iEvent.orbitNumber();
2694  int outabortgap = 1;
2695  if (bcn >= bcnrejectedlow_ && bcn <= bcnrejectedhigh_)
2696  outabortgap = 0; // if(bcn>=3446 && bcn<=3564)
2697 
2698  if ((flagabortgaprejected_ == 1 && outabortgap == 1) || (flagabortgaprejected_ == 0 && outabortgap == 0) ||
2699  flagabortgaprejected_ == 2) {
2700  if (run0 != Run) {
2701  ++runcounter;
2702  if (runcounter != 1) {
2704  std::cout << " --------------------------------------- " << std::endl;
2705  std::cout << " for Run = " << run0 << " with runcounter = " << runcounter - 1 << " #ev = " << eventcounter
2706  << std::endl;
2707  std::cout << " #LS = " << lscounterrun << " #LS10 = " << lscounterrun10 << " Last LS = " << ls0 << std::endl;
2708  std::cout << " --------------------------------------------- " << std::endl;
2709  h_nls_per_run->Fill(float(lscounterrun));
2710  h_nls_per_run10->Fill(float(lscounterrun10));
2711  lscounterrun = 0;
2712  lscounterrun10 = 0;
2713  } // runcounter > 1
2714  std::cout << " ---------***********************------------- " << std::endl;
2715  std::cout << " New Run = " << Run << " runcounter = " << runcounter << std::endl;
2716  std::cout << " ------- " << std::endl;
2717  run0 = Run;
2718  eventcounter = 0;
2719  ls0 = -1;
2720  } // new run
2721  else {
2722  nevcounter00 = 0;
2723  } //else new run
2724  ++eventcounter;
2725  if (ls0 != lumi) {
2726  if (ls0 != -1) {
2727  h_nevents_per_eachLS->Fill(float(lscounter), float(nevcounter)); //
2729  } // ls0>-1
2730  lscounter++;
2731  lscounterrun++;
2733  lscounterM1 = lscounter - 1;
2734  } else {
2735  lscounterM1 = ls0;
2736  }
2737  if (ls0 != -1)
2738  h_nevents_per_eachRealLS->Fill(float(lscounterM1), float(nevcounter)); //
2739  h_lsnumber_per_eachLS->Fill(float(lscounter), float(lumi));
2740  if (nevcounter > 10.) {
2741  ++lscounter10;
2742  ++lscounterrun10;
2743  }
2744  h_nevents_per_LS->Fill(float(nevcounter));
2745  h_nevents_per_LSzoom->Fill(float(nevcounter));
2746  nevcounter = 0;
2747  ls0 = lumi;
2748  } // new lumi
2749  else {
2750  nevcounter0 = 0;
2751  } //else new lumi
2752  ++nevcounter; // #ev in LS
2754  if (flagtoaskrunsorls_ == 0) {
2757  }
2758  if (nevcounter0 != 0 || nevcounter > 99999) {
2759  if (nevcounter > 99999)
2760  nevcounter0 = 1;
2764  unsigned long int pcountall1 = 0;
2765  unsigned long int pcountall3 = 0;
2766  unsigned long int pcountall6 = 0;
2767  unsigned long int pcountall8 = 0;
2768  int pcountmin1 = 0;
2769  int pcountmin3 = 0;
2770  int pcountmin6 = 0;
2771  int pcountmin8 = 0;
2772  unsigned long int mcountall1 = 0;
2773  unsigned long int mcountall3 = 0;
2774  unsigned long int mcountall6 = 0;
2775  unsigned long int mcountall8 = 0;
2776  int mcountmin1 = 0;
2777  int mcountmin3 = 0;
2778  int mcountmin6 = 0;
2779  int mcountmin8 = 0;
2780  int pnnbins1 = 0;
2781  int pnnbins3 = 0;
2782  int pnnbins6 = 0;
2783  int pnnbins8 = 0;
2784  int pnnmin1 = 999999999;
2785  int pnnmin3 = 999999999;
2786  int pnnmin6 = 999999999;
2787  int pnnmin8 = 999999999;
2788  int mnnbins1 = 0;
2789  int mnnbins3 = 0;
2790  int mnnbins6 = 0;
2791  int mnnbins8 = 0;
2792  int mnnmin1 = 999999999;
2793  int mnnmin3 = 999999999;
2794  int mnnmin6 = 999999999;
2795  int mnnmin8 = 999999999;
2796  for (int k0 = 0; k0 < nsub; k0++) {
2797  for (int k1 = 0; k1 < ndepth; k1++) {
2798  for (int k3 = 0; k3 < nphi; k3++) {
2799  for (int k2 = 0; k2 < neta; k2++) {
2800  int ieta = k2 - 41;
2801  // ------------------------------------------------------------sumEstimator0
2802  if (sumEstimator0[k0][k1][k2][k3] != 0.) {
2803  // fill histoes:
2804  double bbbc = 0.;
2805  if (flagestimatornormalization_ == 0)
2806  bbbc = sumEstimator0[k0][k1][k2][k3] / nevcounter0;
2807  if (flagestimatornormalization_ == 1)
2808  bbbc = sumEstimator0[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
2809  double bbb1 = 1.;
2810  if (flagestimatornormalization_ == 2) {
2811  bbbc = sumEstimator0[k0][k1][k2][k3];
2812  bbb1 = sum0Estimator[k0][k1][k2][k3];
2813  }
2814 
2815  // HB:
2816  if (k0 == 0) {
2817  // HBdepth1
2818  if (k1 + 1 == 1) {
2819  h_sumPedestalLS1->Fill(bbbc / bbb1);
2820  h_2DsumPedestalLS1->Fill(double(ieta), double(k3), bbbc);
2821  h_2D0sumPedestalLS1->Fill(double(ieta), double(k3), bbb1);
2822  h_sumPedestalperLS1->Fill(float(lscounterM1), bbbc);
2823  h_sum0PedestalperLS1->Fill(float(lscounterM1), bbb1);
2824  }
2825  if (k1 + 1 == 2) {
2826  h_sumPedestalLS2->Fill(bbbc / bbb1);
2827  h_2DsumPedestalLS2->Fill(double(ieta), double(k3), bbbc);
2828  h_2D0sumPedestalLS2->Fill(double(ieta), double(k3), bbb1);
2829  h_sumPedestalperLS2->Fill(float(lscounterM1), bbbc);
2830  h_sum0PedestalperLS2->Fill(float(lscounterM1), bbb1);
2831  }
2832  }
2833  // HE:
2834  if (k0 == 1) {
2835  // HEdepth1
2836  if (k1 + 1 == 1) {
2837  h_sumPedestalLS3->Fill(bbbc / bbb1);
2838  h_2DsumPedestalLS3->Fill(double(ieta), double(k3), bbbc);
2839  h_2D0sumPedestalLS3->Fill(double(ieta), double(k3), bbb1);
2840  h_sumPedestalperLS3->Fill(float(lscounterM1), bbbc);
2841  h_sum0PedestalperLS3->Fill(float(lscounterM1), bbb1);
2842  }
2843  if (k1 + 1 == 2) {
2844  h_sumPedestalLS4->Fill(bbbc / bbb1);
2845  h_2DsumPedestalLS4->Fill(double(ieta), double(k3), bbbc);
2846  h_2D0sumPedestalLS4->Fill(double(ieta), double(k3), bbb1);
2847  h_sumPedestalperLS4->Fill(float(lscounterM1), bbbc);
2848  h_sum0PedestalperLS4->Fill(float(lscounterM1), bbb1);
2849  }
2850  if (k1 + 1 == 3) {
2851  h_sumPedestalLS5->Fill(bbbc / bbb1);
2852  h_2DsumPedestalLS5->Fill(double(ieta), double(k3), bbbc);
2853  h_2D0sumPedestalLS5->Fill(double(ieta), double(k3), bbb1);
2854  h_sumPedestalperLS5->Fill(float(lscounterM1), bbbc);
2855  h_sum0PedestalperLS5->Fill(float(lscounterM1), bbb1);
2856  }
2857  }
2858  // HF:
2859  if (k0 == 3) {
2860  // HFdepth1
2861  if (k1 + 1 == 1) {
2862  h_sumPedestalLS6->Fill(bbbc / bbb1);
2863  h_2DsumPedestalLS6->Fill(double(ieta), double(k3), bbbc);
2864  h_2D0sumPedestalLS6->Fill(double(ieta), double(k3), bbb1);
2865  h_sumPedestalperLS6->Fill(float(lscounterM1), bbbc);
2866  h_sum0PedestalperLS6->Fill(float(lscounterM1), bbb1);
2867  }
2868  if (k1 + 1 == 2) {
2869  h_sumPedestalLS7->Fill(bbbc / bbb1);
2870  h_2DsumPedestalLS7->Fill(double(ieta), double(k3), bbbc);
2871  h_2D0sumPedestalLS7->Fill(double(ieta), double(k3), bbb1);
2872  h_sumPedestalperLS7->Fill(float(lscounterM1), bbbc);
2873  h_sum0PedestalperLS7->Fill(float(lscounterM1), bbb1);
2874  }
2875  }
2876  // HO:
2877  if (k0 == 2) {
2878  // HOdepth4
2879  if (k1 + 1 == 4) {
2880  h_sumPedestalLS8->Fill(bbbc / bbb1);
2881  h_2DsumPedestalLS8->Fill(double(ieta), double(k3), bbbc);
2882  h_2D0sumPedestalLS8->Fill(double(ieta), double(k3), bbb1);
2883  h_sumPedestalperLS8->Fill(float(lscounterM1), bbbc);
2884  h_sum0PedestalperLS8->Fill(float(lscounterM1), bbb1);
2885  }
2886  }
2887  } //if(sumEstimator0[k0][k1][k2][k3] != 0.
2888 
2889  // ------------------------------------------------------------------------------------- sumEstimator1
2890  if (sumEstimator1[k0][k1][k2][k3] != 0.) {
2891  // fill histoes:
2892  double bbbc = 0.;
2893  if (flagestimatornormalization_ == 0)
2894  bbbc = sumEstimator1[k0][k1][k2][k3] / nevcounter0;
2895  if (flagestimatornormalization_ == 1)
2896  bbbc = sumEstimator1[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
2897  double bbb1 = 1.;
2898  if (flagestimatornormalization_ == 2) {
2899  bbbc = sumEstimator1[k0][k1][k2][k3];
2900  bbb1 = sum0Estimator[k0][k1][k2][k3];
2901  }
2902  //flag for ask type of Normalization for CMT estimators:
2903  //=0-normalizationOn#evOfLS; =1-averagedMeanChannelVariable; =2-averageVariable-normalizationOn#entriesInLS;
2904  //flagestimatornormalization = cms.int32(2), !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2905  // zhokin 18.10.2018 STUDY: CALL HFF2 (ID,NID,X,Y,W)
2906  if (lscounterM1 >= lsmin_ && lscounterM1 < lsmax_) {
2907  // INDEXIES:
2908  int kkkk2 = (k2 - 1) / 4;
2909  if (k2 == 0)
2910  kkkk2 = 1.;
2911  else
2912  kkkk2 += 2; //kkkk2= 1-22
2913  int kkkk3 = (k3) / 4 + 1; //kkkk3= 1-18
2914  // PACKING
2915  //kkkk2= 1-22 ;kkkk3= 1-18
2916  int ietaphi = 0;
2917  ietaphi = ((kkkk2)-1) * znphi + (kkkk3);
2918  // Outout is ietaphi = 1 - 396 ( # =396; in histo,booking is: 1 - 397 )
2919 
2920  double bbb3 = 0.;
2921  if (bbb1 != 0.)
2922  bbb3 = bbbc / bbb1;
2923  // very very wrong if below:
2924  // if(bbb3 != 0.) {
2925 
2926  if (k0 == 0) {
2927  h_2DsumADCAmplEtaPhiLs0->Fill(float(lscounterM1), float(ietaphi), bbbc); //HB
2928  h_2DsumADCAmplEtaPhiLs00->Fill(float(lscounterM1), float(ietaphi), bbb1); //HB
2929  }
2930  if (k0 == 1) {
2931  h_2DsumADCAmplEtaPhiLs1->Fill(float(lscounterM1), float(ietaphi), bbbc); //HE
2932  h_2DsumADCAmplEtaPhiLs10->Fill(float(lscounterM1), float(ietaphi), bbb1); //HE
2933  }
2934  if (k0 == 2) {
2935  h_2DsumADCAmplEtaPhiLs2->Fill(float(lscounterM1), float(ietaphi), bbbc); //HO
2936  h_2DsumADCAmplEtaPhiLs20->Fill(float(lscounterM1), float(ietaphi), bbb1); //HO
2937  }
2938  if (k0 == 3) {
2939  h_2DsumADCAmplEtaPhiLs3->Fill(float(lscounterM1), float(ietaphi), bbbc); //HF
2940  h_2DsumADCAmplEtaPhiLs30->Fill(float(lscounterM1), float(ietaphi), bbb1); //HF
2941  }
2942 
2943  h_sumADCAmplEtaPhiLs->Fill(bbb3);
2944  h_sumADCAmplEtaPhiLs_bbbc->Fill(bbbc);
2945  h_sumADCAmplEtaPhiLs_bbb1->Fill(bbb1);
2947  h_sumADCAmplEtaPhiLs_orbitNum->Fill(float(orbitNum), 1.);
2949  h_sumADCAmplEtaPhiLs_ietaphi->Fill(float(ietaphi));
2950 
2951  // }// bb3
2952  } // lscounterM1 >= lsmin_ && lscounterM1 < lsmax_
2953 
2954  // HB:
2955  if (k0 == 0) {
2956  // HBdepth1
2957  if (k1 + 1 == 1) {
2958  h_sumADCAmplLS1copy1->Fill(bbbc / bbb1);
2959  h_sumADCAmplLS1copy2->Fill(bbbc / bbb1);
2960  h_sumADCAmplLS1copy3->Fill(bbbc / bbb1);
2961  h_sumADCAmplLS1copy4->Fill(bbbc / bbb1);
2962  h_sumADCAmplLS1copy5->Fill(bbbc / bbb1);
2963  h_sumADCAmplLS1->Fill(bbbc / bbb1);
2964  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
2965  h_2DsumADCAmplLS1->Fill(double(ieta), double(k3), bbbc);
2966  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth1_)
2967  h_2DsumADCAmplLS1_LSselected->Fill(double(ieta), double(k3), bbbc);
2968 
2969  h_2D0sumADCAmplLS1->Fill(double(ieta), double(k3), bbb1);
2970 
2971  h_sumADCAmplperLS1->Fill(float(lscounterM1), bbbc);
2972  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
2973  h_sumCutADCAmplperLS1->Fill(float(lscounterM1), bbbc);
2974  h_sum0ADCAmplperLS1->Fill(float(lscounterM1), bbb1);
2975 
2976  if (ieta > 0) {
2977  if (k3 < 36) {
2978  h_sumADCAmplperLS1_P1->Fill(float(lscounterM1), bbbc);
2979  h_sum0ADCAmplperLS1_P1->Fill(float(lscounterM1), bbb1);
2980  } else {
2981  h_sumADCAmplperLS1_P2->Fill(float(lscounterM1), bbbc);
2982  h_sum0ADCAmplperLS1_P2->Fill(float(lscounterM1), bbb1);
2983  }
2985  if (bbbc / bbb1 > 25.) {
2986  pcountall1 += bbb1;
2987  pcountmin1 += bbb1;
2988  }
2990 
2991  } else {
2992  if (k3 < 36) {
2993  h_sumADCAmplperLS1_M1->Fill(float(lscounterM1), bbbc);
2994  h_sum0ADCAmplperLS1_M1->Fill(float(lscounterM1), bbb1);
2995  } else {
2996  h_sumADCAmplperLS1_M2->Fill(float(lscounterM1), bbbc);
2997  h_sum0ADCAmplperLS1_M2->Fill(float(lscounterM1), bbb1);
2998  }
3000  if (bbbc / bbb1 > 25.) {
3001  mcountall1 += bbb1;
3002  mcountmin1 += bbb1;
3003  }
3005  }
3006  }
3007  // HBdepth2
3008  if (k1 + 1 == 2) {
3009  h_sumADCAmplLS2->Fill(bbbc / bbb1);
3010  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
3011  h_2DsumADCAmplLS2->Fill(double(ieta), double(k3), bbbc);
3012  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth2_)
3013  h_2DsumADCAmplLS2_LSselected->Fill(double(ieta), double(k3), bbbc);
3014  h_2D0sumADCAmplLS2->Fill(double(ieta), double(k3), bbb1);
3015  h_sumADCAmplperLS2->Fill(float(lscounterM1), bbbc);
3016  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
3017  h_sumCutADCAmplperLS2->Fill(float(lscounterM1), bbbc);
3018  h_sum0ADCAmplperLS2->Fill(float(lscounterM1), bbb1);
3019  if (ieta > 0) {
3020  if (k3 < 36) {
3021  h_sumADCAmplperLS1_P1->Fill(float(lscounterM1), bbbc);
3022  h_sum0ADCAmplperLS1_P1->Fill(float(lscounterM1), bbb1);
3023  } else {
3024  h_sumADCAmplperLS1_P2->Fill(float(lscounterM1), bbbc);
3025  h_sum0ADCAmplperLS1_P2->Fill(float(lscounterM1), bbb1);
3026  }
3027  } else {
3028  if (k3 < 36) {
3029  h_sumADCAmplperLS1_M1->Fill(float(lscounterM1), bbbc);
3030  h_sum0ADCAmplperLS1_M1->Fill(float(lscounterM1), bbb1);
3031  } else {
3032  h_sumADCAmplperLS1_M2->Fill(float(lscounterM1), bbbc);
3033  h_sum0ADCAmplperLS1_M2->Fill(float(lscounterM1), bbb1);
3034  }
3035  }
3036  }
3037  // HBdepth3 upgrade
3038  if (k1 + 1 == 3) {
3039  h_sumADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
3040  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
3041  h_sumCutADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
3042  h_sum0ADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbb1);
3043 
3044  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
3045  h_2DsumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbbc);
3046  h_2D0sumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbb1);
3047  } //if(k1+1 ==3)
3048 
3049  // HBdepth4 upgrade
3050  if (k1 + 1 == 4) {
3051  h_sumADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
3052  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
3053  h_sumCutADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
3054  h_sum0ADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbb1);
3055 
3056  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
3057  h_2DsumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbbc);
3058  h_2D0sumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbb1);
3059  } //if(k1+1 ==4)
3060  }
3061 
3062  // HE:
3063  if (k0 == 1) {
3064  // HEdepth1
3065  if (k1 + 1 == 1) {
3066  h_sumADCAmplLS3->Fill(bbbc / bbb1);
3067  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
3068  h_2DsumADCAmplLS3->Fill(double(ieta), double(k3), bbbc);
3069  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth1_)
3070  h_2DsumADCAmplLS3_LSselected->Fill(double(ieta), double(k3), bbbc);
3071  h_2D0sumADCAmplLS3->Fill(double(ieta), double(k3), bbb1);
3072  h_sumADCAmplperLS3->Fill(float(lscounterM1), bbbc);
3073  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
3074  h_sumCutADCAmplperLS3->Fill(float(lscounterM1), bbbc);
3075  h_sum0ADCAmplperLS3->Fill(float(lscounterM1), bbb1);
3076  if (ieta > 0) {
3077  if (k3 < 36) {
3078  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3079  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3080  } else {
3081  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3082  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3083  }
3085  if (bbbc / bbb1 > 15. && k3 % 2 == 0) {
3086  pcountall3 += bbb1;
3087  pcountmin3 += bbb1;
3088  }
3090  } else {
3091  if (k3 < 36) {
3092  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3093  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3094  } else {
3095  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3096  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3097  }
3099  if (bbbc / bbb1 > 15. && k3 % 2 == 0) {
3100  mcountall3 += bbb1;
3101  mcountmin3 += bbb1;
3102  }
3104  }
3105  }
3106  // HEdepth2
3107  if (k1 + 1 == 2) {
3108  h_sumADCAmplLS4->Fill(bbbc / bbb1);
3109  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
3110  h_2DsumADCAmplLS4->Fill(double(ieta), double(k3), bbbc);
3111  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth2_)
3112  h_2DsumADCAmplLS4_LSselected->Fill(double(ieta), double(k3), bbbc);
3113  h_2D0sumADCAmplLS4->Fill(double(ieta), double(k3), bbb1);
3114  h_sumADCAmplperLS4->Fill(float(lscounterM1), bbbc);
3115  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
3116  h_sumCutADCAmplperLS4->Fill(float(lscounterM1), bbbc);
3117  h_sum0ADCAmplperLS4->Fill(float(lscounterM1), bbb1);
3118  if (ieta > 0) {
3119  if (k3 < 36) {
3120  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3121  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3122  } else {
3123  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3124  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3125  }
3126  } else {
3127  if (k3 < 36) {
3128  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3129  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3130  } else {
3131  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3132  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3133  }
3134  }
3135  }
3136  // HEdepth3
3137  if (k1 + 1 == 3) {
3138  h_sumADCAmplLS5->Fill(bbbc / bbb1);
3139  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
3140  h_2DsumADCAmplLS5->Fill(double(ieta), double(k3), bbbc);
3141  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth3_)
3142  h_2DsumADCAmplLS5_LSselected->Fill(double(ieta), double(k3), bbbc);
3143  h_2D0sumADCAmplLS5->Fill(double(ieta), double(k3), bbb1);
3144  h_sumADCAmplperLS5->Fill(float(lscounterM1), bbbc);
3145  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
3146  h_sumCutADCAmplperLS5->Fill(float(lscounterM1), bbbc);
3147  h_sum0ADCAmplperLS5->Fill(float(lscounterM1), bbb1);
3148  if (ieta > 0) {
3149  if (k3 < 36) {
3150  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3151  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3152  } else {
3153  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3154  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3155  }
3156  } else {
3157  if (k3 < 36) {
3158  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3159  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3160  } else {
3161  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3162  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3163  }
3164  }
3165  } //if(k1+1 ==3
3166  // HEdepth4 upgrade
3167  if (k1 + 1 == 4) {
3168  h_sumADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
3169  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
3170  h_sumCutADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
3171  h_sum0ADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbb1);
3172 
3173  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
3174  h_2DsumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbbc);
3175  h_2D0sumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbb1);
3176  } //if(k1+1 ==4)
3177 
3178  // HEdepth5 upgrade
3179  if (k1 + 1 == 5) {
3180  h_sumADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
3181  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
3182  h_sumCutADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
3183  h_sum0ADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbb1);
3184 
3185  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
3186  h_2DsumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbbc);
3187  h_2D0sumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbb1);
3188  } //if(k1+1 ==5)
3189 
3190  // HEdepth6 upgrade
3191  if (k1 + 1 == 6) {
3192  h_sumADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
3193  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
3194  h_sumCutADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
3195  h_sum0ADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbb1);
3196 
3197  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
3198  h_2DsumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbbc);
3199  h_2D0sumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbb1);
3200  } //if(k1+1 ==6)
3201 
3202  // HEdepth7 upgrade
3203  if (k1 + 1 == 7) {
3204  h_sumADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
3205  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
3206  h_sumCutADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
3207  h_sum0ADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbb1);
3208 
3209  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
3210  h_2DsumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbbc);
3211  h_2D0sumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbb1);
3212  } //if(k1+1 ==7)
3213  } //if(k0==1) =HE
3214  // HF:
3215  if (k0 == 3) {
3216  // HFdepth1
3217  if (k1 + 1 == 1) {
3218  h_sumADCAmplLS6->Fill(bbbc / bbb1);
3219  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
3220  h_2DsumADCAmplLS6->Fill(double(ieta), double(k3), bbbc);
3221  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth1_)
3222  h_2DsumADCAmplLS6_LSselected->Fill(double(ieta), double(k3), bbbc);
3223  h_2D0sumADCAmplLS6->Fill(double(ieta), double(k3), bbb1);
3224  h_sumADCAmplperLS6->Fill(float(lscounterM1), bbbc);
3225  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
3226  h_sumCutADCAmplperLS6->Fill(float(lscounterM1), bbbc);
3227  h_sum0ADCAmplperLS6->Fill(float(lscounterM1), bbb1);
3228 
3230  if (ieta > 0) {
3231  if (k3 < 36) {
3232  h_sumADCAmplperLS6_P1->Fill(float(lscounterM1), bbbc);
3233  h_sum0ADCAmplperLS6_P1->Fill(float(lscounterM1), bbb1);
3234  } else {
3235  h_sumADCAmplperLS6_P2->Fill(float(lscounterM1), bbbc);
3236  h_sum0ADCAmplperLS6_P2->Fill(float(lscounterM1), bbb1);
3237  }
3239  if (bbbc / bbb1 > 20.) {
3240  pcountall6 += bbb1;
3241  pcountmin6 += bbb1;
3242  }
3244 
3245  } else {
3246  if (k3 < 36) {
3247  h_sumADCAmplperLS6_M1->Fill(float(lscounterM1), bbbc);
3248  h_sum0ADCAmplperLS6_M1->Fill(float(lscounterM1), bbb1);
3249  } else {
3250  h_sumADCAmplperLS6_M2->Fill(float(lscounterM1), bbbc);
3251  h_sum0ADCAmplperLS6_M2->Fill(float(lscounterM1), bbb1);
3252  }
3254  if (bbbc / bbb1 > 20.) {
3255  mcountall6 += bbb1;
3256  mcountmin6 += bbb1;
3257  }
3259  }
3261  } //if(k1+1 ==1)
3262 
3263  // HFdepth2
3264  if (k1 + 1 == 2) {
3265  h_sumADCAmplLS7->Fill(bbbc / bbb1);
3266  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
3267  h_2DsumADCAmplLS7->Fill(double(ieta), double(k3), bbbc);
3268  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth2_)
3269  h_2DsumADCAmplLS7_LSselected->Fill(double(ieta), double(k3), bbbc);
3270  h_2D0sumADCAmplLS7->Fill(double(ieta), double(k3), bbb1);
3271  h_sumADCAmplperLS7->Fill(float(lscounterM1), bbbc);
3272  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
3273  h_sumCutADCAmplperLS7->Fill(float(lscounterM1), bbbc);
3274  h_sum0ADCAmplperLS7->Fill(float(lscounterM1), bbb1);
3275 
3276  if (ieta > 0) {
3277  if (k3 < 36) {
3278  h_sumADCAmplperLS6_P1->Fill(float(lscounterM1), bbbc);
3279  h_sum0ADCAmplperLS6_P1->Fill(float(lscounterM1), bbb1);
3280  } else {
3281  h_sumADCAmplperLS6_P2->Fill(float(lscounterM1), bbbc);
3282  h_sum0ADCAmplperLS6_P2->Fill(float(lscounterM1), bbb1);
3283  }
3284  } else {
3285  if (k3 < 36) {
3286  h_sumADCAmplperLS6_M1->Fill(float(lscounterM1), bbbc);
3287  h_sum0ADCAmplperLS6_M1->Fill(float(lscounterM1), bbb1);
3288  } else {
3289  h_sumADCAmplperLS6_M2->Fill(float(lscounterM1), bbbc);
3290  h_sum0ADCAmplperLS6_M2->Fill(float(lscounterM1), bbb1);
3291  }
3292  }
3293  } //if(k1+1 ==2)
3294 
3295  // HFdepth3 upgrade
3296  if (k1 + 1 == 3) {
3297  h_sumADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
3298  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
3299  h_sumCutADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
3300  h_sum0ADCAmplperLS6u->Fill(float(lscounterM1), bbb1);
3301 
3302  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
3303  h_2DsumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbbc);
3304  h_2D0sumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbb1);
3305  } //if(k1+1 ==3)
3306 
3307  // HFdepth4 upgrade
3308  if (k1 + 1 == 4) {
3309  h_sumADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
3310  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
3311  h_sumCutADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
3312  h_sum0ADCAmplperLS7u->Fill(float(lscounterM1), bbb1);
3313 
3314  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
3315  h_2DsumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbbc);
3316  h_2D0sumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbb1);
3317  } //if(k1+1 ==4)
3318 
3319  } //end HF
3320 
3321  // HO:
3322  if (k0 == 2) {
3323  // HOdepth4
3324  if (k1 + 1 == 4) {
3325  h_sumADCAmplLS8->Fill(bbbc / bbb1);
3326  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
3327  h_2DsumADCAmplLS8->Fill(double(ieta), double(k3), bbbc);
3328  if (bbbc / bbb1 > 2. * lsdep_estimator1_HOdepth4_)
3329  h_2DsumADCAmplLS8_LSselected->Fill(double(ieta), double(k3), bbbc);
3330  h_2D0sumADCAmplLS8->Fill(double(ieta), double(k3), bbb1);
3331  h_sumADCAmplperLS8->Fill(float(lscounterM1), bbbc);
3332  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
3333  h_sumCutADCAmplperLS8->Fill(float(lscounterM1), bbbc);
3334  h_sum0ADCAmplperLS8->Fill(float(lscounterM1), bbb1);
3335 
3337  if (ieta > 0) {
3338  if (k3 < 36) {
3339  h_sumADCAmplperLS8_P1->Fill(float(lscounterM1), bbbc);
3340  h_sum0ADCAmplperLS8_P1->Fill(float(lscounterM1), bbb1);
3341  } else {
3342  h_sumADCAmplperLS8_P2->Fill(float(lscounterM1), bbbc);
3343  h_sum0ADCAmplperLS8_P2->Fill(float(lscounterM1), bbb1);
3344  }
3346  if (bbbc / bbb1 > 80.) {
3347  pcountall8 += bbb1;
3348  pcountmin8 += bbb1;
3349  }
3351 
3352  } else {
3353  if (k3 < 36) {
3354  h_sumADCAmplperLS8_M1->Fill(float(lscounterM1), bbbc);
3355  h_sum0ADCAmplperLS8_M1->Fill(float(lscounterM1), bbb1);
3356  } else {
3357  h_sumADCAmplperLS8_M2->Fill(float(lscounterM1), bbbc);
3358  h_sum0ADCAmplperLS8_M2->Fill(float(lscounterM1), bbb1);
3359  }
3361  if (bbbc / bbb1 > 80.) {
3362  mcountall8 += bbb1;
3363  mcountmin8 += bbb1;
3364  }
3366  }
3368  }
3369  }
3370  } //if(sumEstimator1[k0][k1][k2][k3] != 0.
3371  // ------------------------------------------------------------------------------------------------------------------------sumEstimator2
3372  if (sumEstimator2[k0][k1][k2][k3] != 0.) {
3373  // fill histoes:
3374  double bbbc = 0.;
3375  if (flagestimatornormalization_ == 0)
3376  bbbc = sumEstimator2[k0][k1][k2][k3] / nevcounter0;
3377  if (flagestimatornormalization_ == 1)
3378  bbbc = sumEstimator2[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3379  double bbb1 = 1.;
3380  if (flagestimatornormalization_ == 2) {
3381  bbbc = sumEstimator2[k0][k1][k2][k3];
3382  bbb1 = sum0Estimator[k0][k1][k2][k3];
3383  }
3384 
3385  // HB:
3386  if (k0 == 0) {
3387  // HBdepth1
3388  if (k1 + 1 == 1) {
3389  h_sumTSmeanALS1->Fill(bbbc / bbb1);
3390  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
3391  h_2DsumTSmeanALS1->Fill(double(ieta), double(k3), bbbc);
3392  h_2D0sumTSmeanALS1->Fill(double(ieta), double(k3), bbb1);
3393  h_sumTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
3394  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
3395  h_sumCutTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
3396  h_sum0TSmeanAperLS1->Fill(float(lscounterM1), bbb1);
3397  if (bbbc / bbb1 > 2. * lsdep_estimator2_HBdepth1_)
3398  h_sumTSmeanAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3399  }
3400  if (k1 + 1 == 2) {
3401  h_sumTSmeanALS2->Fill(bbbc / bbb1);
3402  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
3403  h_2DsumTSmeanALS2->Fill(double(ieta), double(k3), bbbc);
3404  h_2D0sumTSmeanALS2->Fill(double(ieta), double(k3), bbb1);
3405  h_sumTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
3406  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
3407  h_sumCutTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
3408  h_sum0TSmeanAperLS2->Fill(float(lscounterM1), bbb1);
3409  }
3410  }
3411  // HE:
3412  if (k0 == 1) {
3413  // HBdepth1
3414  if (k1 + 1 == 1) {
3415  h_sumTSmeanALS3->Fill(bbbc / bbb1);
3416  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
3417  h_2DsumTSmeanALS3->Fill(double(ieta), double(k3), bbbc);
3418  h_2D0sumTSmeanALS3->Fill(double(ieta), double(k3), bbb1);
3419  h_sumTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
3420  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
3421  h_sumCutTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
3422  h_sum0TSmeanAperLS3->Fill(float(lscounterM1), bbb1);
3423  }
3424  if (k1 + 1 == 2) {
3425  h_sumTSmeanALS4->Fill(bbbc / bbb1);
3426  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
3427  h_2DsumTSmeanALS4->Fill(double(ieta), double(k3), bbbc);
3428  h_2D0sumTSmeanALS4->Fill(double(ieta), double(k3), bbb1);
3429  h_sumTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
3430  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
3431  h_sumCutTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
3432  h_sum0TSmeanAperLS4->Fill(float(lscounterM1), bbb1);
3433  }
3434  if (k1 + 1 == 3) {
3435  h_sumTSmeanALS5->Fill(bbbc / bbb1);
3436  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
3437  h_2DsumTSmeanALS5->Fill(double(ieta), double(k3), bbbc);
3438  h_2D0sumTSmeanALS5->Fill(double(ieta), double(k3), bbb1);
3439  h_sumTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
3440  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
3441  h_sumCutTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
3442  h_sum0TSmeanAperLS5->Fill(float(lscounterM1), bbb1);
3443  }
3444  }
3445  // HF:
3446  if (k0 == 3) {
3447  // HBdepth1
3448  if (k1 + 1 == 1) {
3449  h_sumTSmeanALS6->Fill(bbbc / bbb1);
3450  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
3451  h_2DsumTSmeanALS6->Fill(double(ieta), double(k3), bbbc);
3452  h_2D0sumTSmeanALS6->Fill(double(ieta), double(k3), bbb1);
3453  h_sumTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
3454  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
3455  h_sumCutTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
3456  h_sum0TSmeanAperLS6->Fill(float(lscounterM1), bbb1);
3457  }
3458  if (k1 + 1 == 2) {
3459  h_sumTSmeanALS7->Fill(bbbc / bbb1);
3460  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
3461  h_2DsumTSmeanALS7->Fill(double(ieta), double(k3), bbbc);
3462  h_2D0sumTSmeanALS7->Fill(double(ieta), double(k3), bbb1);
3463  h_sumTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
3464  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
3465  h_sumCutTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
3466  h_sum0TSmeanAperLS7->Fill(float(lscounterM1), bbb1);
3467  }
3468  }
3469  // HO:
3470  if (k0 == 2) {
3471  // HBdepth1
3472  if (k1 + 1 == 4) {
3473  h_sumTSmeanALS8->Fill(bbbc / bbb1);
3474  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
3475  h_2DsumTSmeanALS8->Fill(double(ieta), double(k3), bbbc);
3476  h_2D0sumTSmeanALS8->Fill(double(ieta), double(k3), bbb1);
3477  h_sumTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
3478  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
3479  h_sumCutTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
3480  h_sum0TSmeanAperLS8->Fill(float(lscounterM1), bbb1);
3481  }
3482  }
3483  } //if(sumEstimator2[k0][k1][k2][k3] != 0.
3484 
3485  // ------------------------------------------------------------------------------------------------------------------------sumEstimator3
3486  if (sumEstimator3[k0][k1][k2][k3] != 0.) {
3487  // fill histoes:
3488  double bbbc = 0.;
3489  if (flagestimatornormalization_ == 0)
3490  bbbc = sumEstimator3[k0][k1][k2][k3] / nevcounter0;
3491  if (flagestimatornormalization_ == 1)
3492  bbbc = sumEstimator3[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3493  double bbb1 = 1.;
3494  if (flagestimatornormalization_ == 2) {
3495  bbbc = sumEstimator3[k0][k1][k2][k3];
3496  bbb1 = sum0Estimator[k0][k1][k2][k3];
3497  }
3498 
3499  // HB:
3500  if (k0 == 0) {
3501  // HBdepth1
3502  if (k1 + 1 == 1) {
3503  h_sumTSmaxALS1->Fill(bbbc / bbb1);
3504  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
3505  h_2DsumTSmaxALS1->Fill(double(ieta), double(k3), bbbc);
3506  h_2D0sumTSmaxALS1->Fill(double(ieta), double(k3), bbb1);
3507  h_sumTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
3508  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
3509  h_sumCutTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
3510  h_sum0TSmaxAperLS1->Fill(float(lscounterM1), bbb1);
3511  if (bbbc / bbb1 > 2. * lsdep_estimator3_HBdepth1_)
3512  h_sumTSmaxAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3513  }
3514  if (k1 + 1 == 2) {
3515  h_sumTSmaxALS2->Fill(bbbc / bbb1);
3516  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
3517  h_2DsumTSmaxALS2->Fill(double(ieta), double(k3), bbbc);
3518  h_2D0sumTSmaxALS2->Fill(double(ieta), double(k3), bbb1);
3519  h_sumTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
3520  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
3521  h_sumCutTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
3522  h_sum0TSmaxAperLS2->Fill(float(lscounterM1), bbb1);
3523  }
3524  }
3525  // HE:
3526  if (k0 == 1) {
3527  // HBdepth1
3528  if (k1 + 1 == 1) {
3529  h_sumTSmaxALS3->Fill(bbbc / bbb1);
3530  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
3531  h_2DsumTSmaxALS3->Fill(double(ieta), double(k3), bbbc);
3532  h_2D0sumTSmaxALS3->Fill(double(ieta), double(k3), bbb1);
3533  h_sumTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
3534  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
3535  h_sumCutTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
3536  h_sum0TSmaxAperLS3->Fill(float(lscounterM1), bbb1);
3537  }
3538  if (k1 + 1 == 2) {
3539  h_sumTSmaxALS4->Fill(bbbc / bbb1);
3540  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
3541  h_2DsumTSmaxALS4->Fill(double(ieta), double(k3), bbbc);
3542  h_2D0sumTSmaxALS4->Fill(double(ieta), double(k3), bbb1);
3543  h_sumTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
3544  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
3545  h_sumCutTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
3546  h_sum0TSmaxAperLS4->Fill(float(lscounterM1), bbb1);
3547  }
3548  if (k1 + 1 == 3) {
3549  h_sumTSmaxALS5->Fill(bbbc / bbb1);
3550  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
3551  h_2DsumTSmaxALS5->Fill(double(ieta), double(k3), bbbc);
3552  h_2D0sumTSmaxALS5->Fill(double(ieta), double(k3), bbb1);
3553  h_sumTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
3554  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
3555  h_sumCutTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
3556  h_sum0TSmaxAperLS5->Fill(float(lscounterM1), bbb1);
3557  }
3558  }
3559  // HF:
3560  if (k0 == 3) {
3561  // HBdepth1
3562  if (k1 + 1 == 1) {
3563  h_sumTSmaxALS6->Fill(bbbc / bbb1);
3564  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
3565  h_2DsumTSmaxALS6->Fill(double(ieta), double(k3), bbbc);
3566  h_2D0sumTSmaxALS6->Fill(double(ieta), double(k3), bbb1);
3567  h_sumTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
3568  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
3569  h_sumCutTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
3570  h_sum0TSmaxAperLS6->Fill(float(lscounterM1), bbb1);
3571  }
3572  if (k1 + 1 == 2) {
3573  h_sumTSmaxALS7->Fill(bbbc / bbb1);
3574  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
3575  h_2DsumTSmaxALS7->Fill(double(ieta), double(k3), bbbc);
3576  h_2D0sumTSmaxALS7->Fill(double(ieta), double(k3), bbb1);
3577  h_sumTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
3578  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
3579  h_sumCutTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
3580  h_sum0TSmaxAperLS7->Fill(float(lscounterM1), bbb1);
3581  }
3582  }
3583  // HO:
3584  if (k0 == 2) {
3585  // HBdepth1
3586  if (k1 + 1 == 4) {
3587  h_sumTSmaxALS8->Fill(bbbc / bbb1);
3588  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
3589  h_2DsumTSmaxALS8->Fill(double(ieta), double(k3), bbbc);
3590  h_2D0sumTSmaxALS8->Fill(double(ieta), double(k3), bbb1);
3591  h_sumTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
3592  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
3593  h_sumCutTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
3594  h_sum0TSmaxAperLS8->Fill(float(lscounterM1), bbb1);
3595  }
3596  }
3597  } //if(sumEstimator3[k0][k1][k2][k3] != 0.
3598 
3599  // ------------------------------------------------------------------------------------------------------------------------sumEstimator4
3600  if (sumEstimator4[k0][k1][k2][k3] != 0.) {
3601  // fill histoes:
3602  double bbbc = 0.;
3603  if (flagestimatornormalization_ == 0)
3604  bbbc = sumEstimator4[k0][k1][k2][k3] / nevcounter0;
3605  if (flagestimatornormalization_ == 1)
3606  bbbc = sumEstimator4[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3607  double bbb1 = 1.;
3608  if (flagestimatornormalization_ == 2) {
3609  bbbc = sumEstimator4[k0][k1][k2][k3];
3610  bbb1 = sum0Estimator[k0][k1][k2][k3];
3611  }
3612 
3613  // HB:
3614  if (k0 == 0) {
3615  // HBdepth1
3616  if (k1 + 1 == 1) {
3617  h_sumAmplitudeLS1->Fill(bbbc / bbb1);
3618  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
3619  h_2DsumAmplitudeLS1->Fill(double(ieta), double(k3), bbbc);
3620  h_2D0sumAmplitudeLS1->Fill(double(ieta), double(k3), bbb1);
3621  h_sumAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
3622  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
3623  h_sumCutAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
3624  h_sum0AmplitudeperLS1->Fill(float(lscounterM1), bbb1);
3625  if (bbbc / bbb1 > 2. * lsdep_estimator4_HBdepth1_)
3626  h_sumAmplitudeperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3627  }
3628  if (k1 + 1 == 2) {
3629  h_sumAmplitudeLS2->Fill(bbbc / bbb1);
3630  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
3631  h_2DsumAmplitudeLS2->Fill(double(ieta), double(k3), bbbc);
3632  h_2D0sumAmplitudeLS2->Fill(double(ieta), double(k3), bbb1);
3633  h_sumAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
3634  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
3635  h_sumCutAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
3636  h_sum0AmplitudeperLS2->Fill(float(lscounterM1), bbb1);
3637  }
3638  }
3639  // HE:
3640  if (k0 == 1) {
3641  // HBdepth1
3642  if (k1 + 1 == 1) {
3643  h_sumAmplitudeLS3->Fill(bbbc / bbb1);
3644  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
3645  h_2DsumAmplitudeLS3->Fill(double(ieta), double(k3), bbbc);
3646  h_2D0sumAmplitudeLS3->Fill(double(ieta), double(k3), bbb1);
3647  h_sumAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
3648  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
3649  h_sumCutAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
3650  h_sum0AmplitudeperLS3->Fill(float(lscounterM1), bbb1);
3651  }
3652  if (k1 + 1 == 2) {
3653  h_sumAmplitudeLS4->Fill(bbbc / bbb1);
3654  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
3655  h_2DsumAmplitudeLS4->Fill(double(ieta), double(k3), bbbc);
3656  h_2D0sumAmplitudeLS4->Fill(double(ieta), double(k3), bbb1);
3657  h_sumAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
3658  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
3659  h_sumCutAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
3660  h_sum0AmplitudeperLS4->Fill(float(lscounterM1), bbb1);
3661  }
3662  if (k1 + 1 == 3) {
3663  h_sumAmplitudeLS5->Fill(bbbc / bbb1);
3664  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
3665  h_2DsumAmplitudeLS5->Fill(double(ieta), double(k3), bbbc);
3666  h_2D0sumAmplitudeLS5->Fill(double(ieta), double(k3), bbb1);
3667  h_sumAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
3668  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
3669  h_sumCutAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
3670  h_sum0AmplitudeperLS5->Fill(float(lscounterM1), bbb1);
3671  }
3672  }
3673  // HF:
3674  if (k0 == 3) {
3675  // HBdepth1
3676  if (k1 + 1 == 1) {
3677  h_sumAmplitudeLS6->Fill(bbbc / bbb1);
3678  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
3679  h_2DsumAmplitudeLS6->Fill(double(ieta), double(k3), bbbc);
3680  h_2D0sumAmplitudeLS6->Fill(double(ieta), double(k3), bbb1);
3681  h_sumAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
3682  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
3683  h_sumCutAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
3684  h_sum0AmplitudeperLS6->Fill(float(lscounterM1), bbb1);
3685  }
3686  if (k1 + 1 == 2) {
3687  h_sumAmplitudeLS7->Fill(bbbc / bbb1);
3688  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
3689  h_2DsumAmplitudeLS7->Fill(double(ieta), double(k3), bbbc);
3690  h_2D0sumAmplitudeLS7->Fill(double(ieta), double(k3), bbb1);
3691  h_sumAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
3692  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
3693  h_sumCutAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
3694  h_sum0AmplitudeperLS7->Fill(float(lscounterM1), bbb1);
3695  }
3696  }
3697  // HO:
3698  if (k0 == 2) {
3699  // HBdepth1
3700  if (k1 + 1 == 4) {
3701  h_sumAmplitudeLS8->Fill(bbbc / bbb1);
3702  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
3703  h_2DsumAmplitudeLS8->Fill(double(ieta), double(k3), bbbc);
3704  h_2D0sumAmplitudeLS8->Fill(double(ieta), double(k3), bbb1);
3705  h_sumAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
3706  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
3707  h_sumCutAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
3708  h_sum0AmplitudeperLS8->Fill(float(lscounterM1), bbb1);
3709  }
3710  }
3711  } //if(sumEstimator4[k0][k1][k2][k3] != 0.
3712  // ------------------------------------------------------------------------------------------------------------------------sumEstimator5
3713  if (sumEstimator5[k0][k1][k2][k3] != 0.) {
3714  // fill histoes:
3715  double bbbc = 0.;
3716  if (flagestimatornormalization_ == 0)
3717  bbbc = sumEstimator5[k0][k1][k2][k3] / nevcounter0;
3718  if (flagestimatornormalization_ == 1)
3719  bbbc = sumEstimator5[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3720  double bbb1 = 1.;
3721  if (flagestimatornormalization_ == 2) {
3722  bbbc = sumEstimator5[k0][k1][k2][k3];
3723  bbb1 = sum0Estimator[k0][k1][k2][k3];
3724  }
3725 
3726  // HB:
3727  if (k0 == 0) {
3728  // HBdepth1
3729  if (k1 + 1 == 1) {
3730  h_sumAmplLS1->Fill(bbbc / bbb1);
3731  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
3732  h_2DsumAmplLS1->Fill(double(ieta), double(k3), bbbc);
3733  h_2D0sumAmplLS1->Fill(double(ieta), double(k3), bbb1);
3734  h_sumAmplperLS1->Fill(float(lscounterM1), bbbc);
3735  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
3736  h_sumCutAmplperLS1->Fill(float(lscounterM1), bbbc);
3737  h_sum0AmplperLS1->Fill(float(lscounterM1), bbb1);
3738  if (bbbc / bbb1 > 2. * lsdep_estimator5_HBdepth1_)
3739  h_sumAmplperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3740  }
3741  if (k1 + 1 == 2) {
3742  h_sumAmplLS2->Fill(bbbc / bbb1);
3743  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
3744  h_2DsumAmplLS2->Fill(double(ieta), double(k3), bbbc);
3745  h_2D0sumAmplLS2->Fill(double(ieta), double(k3), bbb1);
3746  h_sumAmplperLS2->Fill(float(lscounterM1), bbbc);
3747  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
3748  h_sumCutAmplperLS2->Fill(float(lscounterM1), bbbc);
3749  h_sum0AmplperLS2->Fill(float(lscounterM1), bbb1);
3750  }
3751  }
3752  // HE:
3753  if (k0 == 1) {
3754  // HEdepth1
3755  if (k1 + 1 == 1) {
3756  h_sumAmplLS3->Fill(bbbc / bbb1);
3757  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
3758  h_2DsumAmplLS3->Fill(double(ieta), double(k3), bbbc);
3759  h_2D0sumAmplLS3->Fill(double(ieta), double(k3), bbb1);
3760  h_sumAmplperLS3->Fill(float(lscounterM1), bbbc);
3761  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
3762  h_sumCutAmplperLS3->Fill(float(lscounterM1), bbbc);
3763  h_sum0AmplperLS3->Fill(float(lscounterM1), bbb1);
3764  }
3765  if (k1 + 1 == 2) {
3766  h_sumAmplLS4->Fill(bbbc / bbb1);
3767  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
3768  h_2DsumAmplLS4->Fill(double(ieta), double(k3), bbbc);
3769  h_2D0sumAmplLS4->Fill(double(ieta), double(k3), bbb1);
3770  h_sumAmplperLS4->Fill(float(lscounterM1), bbbc);
3771  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
3772  h_sumCutAmplperLS4->Fill(float(lscounterM1), bbbc);
3773  h_sum0AmplperLS4->Fill(float(lscounterM1), bbb1);
3774  }
3775  if (k1 + 1 == 3) {
3776  h_sumAmplLS5->Fill(bbbc / bbb1);
3777  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
3778  h_2DsumAmplLS5->Fill(double(ieta), double(k3), bbbc);
3779  h_2D0sumAmplLS5->Fill(double(ieta), double(k3), bbb1);
3780  h_sumAmplperLS5->Fill(float(lscounterM1), bbbc);
3781  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
3782  h_sumCutAmplperLS5->Fill(float(lscounterM1), bbbc);
3783  h_sum0AmplperLS5->Fill(float(lscounterM1), bbb1);
3784  }
3785  }
3786  // HF:
3787  if (k0 == 3) {
3788  // HFdepth1
3789  if (k1 + 1 == 1) {
3790  h_sumAmplLS6->Fill(bbbc / bbb1);
3791  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
3792  h_2DsumAmplLS6->Fill(double(ieta), double(k3), bbbc);
3793  h_2D0sumAmplLS6->Fill(double(ieta), double(k3), bbb1);
3794  h_sumAmplperLS6->Fill(float(lscounterM1), bbbc);
3795  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
3796  h_sumCutAmplperLS6->Fill(float(lscounterM1), bbbc);
3797  h_sum0AmplperLS6->Fill(float(lscounterM1), bbb1);
3798  }
3799  if (k1 + 1 == 2) {
3800  h_sumAmplLS7->Fill(bbbc / bbb1);
3801  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
3802  h_2DsumAmplLS7->Fill(double(ieta), double(k3), bbbc);
3803  h_2D0sumAmplLS7->Fill(double(ieta), double(k3), bbb1);
3804  h_sumAmplperLS7->Fill(float(lscounterM1), bbbc);
3805  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
3806  h_sumCutAmplperLS7->Fill(float(lscounterM1), bbbc);
3807  h_sum0AmplperLS7->Fill(float(lscounterM1), bbb1);
3808  }
3809  }
3810  // HO:
3811  if (k0 == 2) {
3812  // HOdepth4
3813  if (k1 + 1 == 4) {
3814  h_sumAmplLS8->Fill(bbbc / bbb1);
3815  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
3816  h_2DsumAmplLS8->Fill(double(ieta), double(k3), bbbc);
3817  h_2D0sumAmplLS8->Fill(double(ieta), double(k3), bbb1);
3818  h_sumAmplperLS8->Fill(float(lscounterM1), bbbc);
3819  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
3820  h_sumCutAmplperLS8->Fill(float(lscounterM1), bbbc);
3821  h_sum0AmplperLS8->Fill(float(lscounterM1), bbb1);
3822  }
3823  }
3824  } //if(sumEstimator5[k0][k1][k2][k3] != 0.
3825  // ------------------------------------------------------------------------------------------------------------------------sumEstimator6 (Error-B)
3826  if (sumEstimator6[k0][k1][k2][k3] != 0.) {
3827  // fill histoes:
3828  double bbbc = 0.;
3829  if (flagestimatornormalization_ == 0)
3830  bbbc = sumEstimator6[k0][k1][k2][k3] / nevcounter0;
3831  if (flagestimatornormalization_ == 1)
3832  bbbc = sumEstimator6[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3833  double bbb1 = 1.;
3834  if (flagestimatornormalization_ == 2) {
3835  bbbc = sumEstimator6[k0][k1][k2][k3];
3836  bbb1 = sum0Estimator[k0][k1][k2][k3];
3837  }
3838 
3839  // HB:
3840  if (k0 == 0) {
3841  // HBdepth1
3842  if (k1 + 1 == 1) {
3843  h_sumErrorBLS1->Fill(bbbc / bbb1);
3844  h_2DsumErrorBLS1->Fill(double(ieta), double(k3), bbbc);
3845  h_2D0sumErrorBLS1->Fill(double(ieta), double(k3), bbb1);
3846  h_sumErrorBperLS1->Fill(float(lscounterM1), bbbc);
3847  h_sum0ErrorBperLS1->Fill(float(lscounterM1), bbb1);
3848  }
3849  if (k1 + 1 == 2) {
3850  h_sumErrorBLS2->Fill(bbbc / bbb1);
3851  h_2DsumErrorBLS2->Fill(double(ieta), double(k3), bbbc);
3852  h_2D0sumErrorBLS2->Fill(double(ieta), double(k3), bbb1);
3853  h_sumErrorBperLS2->Fill(float(lscounterM1), bbbc);
3854  h_sum0ErrorBperLS2->Fill(float(lscounterM1), bbb1);
3855  }
3856  }
3857  // HE:
3858  if (k0 == 1) {
3859  // HEdepth1
3860  if (k1 + 1 == 1) {
3861  h_sumErrorBLS3->Fill(bbbc / bbb1);
3862  h_2DsumErrorBLS3->Fill(double(ieta), double(k3), bbbc);
3863  h_2D0sumErrorBLS3->Fill(double(ieta), double(k3), bbb1);
3864  h_sumErrorBperLS3->Fill(float(lscounterM1), bbbc);
3865  h_sum0ErrorBperLS3->Fill(float(lscounterM1), bbb1);
3866  }
3867  if (k1 + 1 == 2) {
3868  h_sumErrorBLS4->Fill(bbbc / bbb1);
3869  h_2DsumErrorBLS4->Fill(double(ieta), double(k3), bbbc);
3870  h_2D0sumErrorBLS4->Fill(double(ieta), double(k3), bbb1);
3871  h_sumErrorBperLS4->Fill(float(lscounterM1), bbbc);
3872  h_sum0ErrorBperLS4->Fill(float(lscounterM1), bbb1);
3873  }
3874  if (k1 + 1 == 3) {
3875  h_sumErrorBLS5->Fill(bbbc / bbb1);
3876  h_2DsumErrorBLS5->Fill(double(ieta), double(k3), bbbc);
3877  h_2D0sumErrorBLS5->Fill(double(ieta), double(k3), bbb1);
3878  h_sumErrorBperLS5->Fill(float(lscounterM1), bbbc);
3879  h_sum0ErrorBperLS5->Fill(float(lscounterM1), bbb1);
3880  }
3881  }
3882  // HF:
3883  if (k0 == 3) {
3884  // HFdepth1
3885  if (k1 + 1 == 1) {
3886  h_sumErrorBLS6->Fill(bbbc / bbb1);
3887  h_2DsumErrorBLS6->Fill(double(ieta), double(k3), bbbc);
3888  h_2D0sumErrorBLS6->Fill(double(ieta), double(k3), bbb1);
3889  h_sumErrorBperLS6->Fill(float(lscounterM1), bbbc);
3890  h_sum0ErrorBperLS6->Fill(float(lscounterM1), bbb1);
3891  }
3892  if (k1 + 1 == 2) {
3893  h_sumErrorBLS7->Fill(bbbc / bbb1);
3894  h_2DsumErrorBLS7->Fill(double(ieta), double(k3), bbbc);
3895  h_2D0sumErrorBLS7->Fill(double(ieta), double(k3), bbb1);
3896  h_sumErrorBperLS7->Fill(float(lscounterM1), bbbc);
3897  h_sum0ErrorBperLS7->Fill(float(lscounterM1), bbb1);
3898  }
3899  }
3900  // HO:
3901  if (k0 == 2) {
3902  // HOdepth4
3903  if (k1 + 1 == 4) {
3904  h_sumErrorBLS8->Fill(bbbc / bbb1);
3905  h_2DsumErrorBLS8->Fill(double(ieta), double(k3), bbbc);
3906  h_2D0sumErrorBLS8->Fill(double(ieta), double(k3), bbb1);
3907  h_sumErrorBperLS8->Fill(float(lscounterM1), bbbc);
3908  h_sum0ErrorBperLS8->Fill(float(lscounterM1), bbb1);
3909  }
3910  }
3912  } //if(sumEstimator6[k0][k1][k2][k3] != 0.
3913  } //for k2
3914  // occupancy distributions for error-A:
3915  // HB
3916  if (k0 == 0 && k1 == 0) {
3917  if (pcountmin1 > 0) {
3918  if (pcountmin1 < pnnmin1)
3919  pnnmin1 = pcountmin1;
3920  pcountmin1 = 0;
3921  pnnbins1++;
3922  }
3923  if (mcountmin1 > 0) {
3924  if (mcountmin1 < mnnmin1)
3925  mnnmin1 = mcountmin1;
3926  mcountmin1 = 0;
3927  mnnbins1++;
3928  }
3929  } //
3930  // HE
3931  if (k0 == 1 && k1 == 0) {
3932  if (pcountmin3 > 0) {
3933  if (pcountmin3 < pnnmin3)
3934  pnnmin3 = pcountmin3;
3935  pcountmin3 = 0;
3936  pnnbins3++;
3937  }
3938  if (mcountmin3 > 0) {
3939  if (mcountmin3 < mnnmin3)
3940  mnnmin3 = mcountmin3;
3941  mcountmin3 = 0;
3942  mnnbins3++;
3943  }
3944  } //
3945  // HO
3946  if (k0 == 2 && k1 == 3) {
3947  if (pcountmin8 > 0) {
3948  if (pcountmin8 < pnnmin8)
3949  pnnmin8 = pcountmin8;
3950  pcountmin8 = 0;
3951  pnnbins8++;
3952  }
3953  if (mcountmin8 > 0) {
3954  if (mcountmin8 < mnnmin8)
3955  mnnmin8 = mcountmin8;
3956  mcountmin8 = 0;
3957  mnnbins8++;
3958  }
3959  } //
3960  // HF
3961  if (k0 == 3 && k1 == 0) {
3962  if (pcountmin6 > 0) {
3963  if (pcountmin6 < pnnmin6)
3964  pnnmin6 = pcountmin6;
3965  pcountmin6 = 0;
3966  pnnbins6++;
3967  }
3968  if (mcountmin6 > 0) {
3969  if (mcountmin6 < mnnmin6)
3970  mnnmin6 = mcountmin6;
3971  mcountmin6 = 0;
3972  mnnbins6++;
3973  }
3974  } //
3975 
3976  } //for k3
3977  } //for k1
3978  } //for k0
3982 
3983  // cout<<"=============================== lscounterM1 = "<< (float)lscounterM1 <<endl;
3984 
3985  float patiooccupancy1 = 0.;
3986  if (pcountall1 != 0)
3987  patiooccupancy1 = (float)pnnmin1 * mnnbins1 / pcountall1;
3988  h_RatioOccupancy_HBM->Fill(float(lscounterM1), patiooccupancy1);
3989  float matiooccupancy1 = 0.;
3990  if (mcountall1 != 0)
3991  matiooccupancy1 = (float)mnnmin1 * mnnbins1 / mcountall1;
3992  h_RatioOccupancy_HBP->Fill(float(lscounterM1), matiooccupancy1);
3993 
3994  float patiooccupancy3 = 0.;
3995  if (pcountall3 != 0)
3996  patiooccupancy3 = (float)pnnmin3 * mnnbins3 / pcountall3;
3997  h_RatioOccupancy_HEM->Fill(float(lscounterM1), patiooccupancy3);
3998  float matiooccupancy3 = 0.;
3999  if (mcountall3 != 0)
4000  matiooccupancy3 = (float)mnnmin3 * mnnbins3 / mcountall3;
4001  h_RatioOccupancy_HEP->Fill(float(lscounterM1), matiooccupancy3);
4002 
4003  float patiooccupancy6 = 0.;
4004  if (pcountall6 != 0)
4005  patiooccupancy6 = (float)pnnmin6 * mnnbins6 / pcountall6;
4006  h_RatioOccupancy_HFM->Fill(float(lscounterM1), patiooccupancy6);
4007  float matiooccupancy6 = 0.;
4008  if (mcountall6 != 0)
4009  matiooccupancy6 = (float)mnnmin6 * mnnbins6 / mcountall6;
4010  h_RatioOccupancy_HFP->Fill(float(lscounterM1), matiooccupancy6);
4011 
4012  float patiooccupancy8 = 0.;
4013  if (pcountall8 != 0)
4014  patiooccupancy8 = (float)pnnmin8 * mnnbins8 / pcountall8;
4015  h_RatioOccupancy_HOM->Fill(float(lscounterM1), patiooccupancy8);
4016  float matiooccupancy8 = 0.;
4017  if (mcountall8 != 0)
4018  matiooccupancy8 = (float)mnnmin8 * mnnbins8 / mcountall8;
4019  h_RatioOccupancy_HOP->Fill(float(lscounterM1), matiooccupancy8);
4020 
4021  for (int k0 = 0; k0 < nsub; k0++) {
4022  for (int k1 = 0; k1 < ndepth; k1++) {
4023  for (int k2 = 0; k2 < neta; k2++) {
4024  for (int k3 = 0; k3 < nphi; k3++) {
4025  // reset massives:
4026  sumEstimator0[k0][k1][k2][k3] = 0.;
4027  sumEstimator1[k0][k1][k2][k3] = 0.;
4028  sumEstimator2[k0][k1][k2][k3] = 0.;
4029  sumEstimator3[k0][k1][k2][k3] = 0.;
4030  sumEstimator4[k0][k1][k2][k3] = 0.;
4031  sumEstimator5[k0][k1][k2][k3] = 0.;
4032  sumEstimator6[k0][k1][k2][k3] = 0.;
4033  sum0Estimator[k0][k1][k2][k3] = 0.;
4034  } //for
4035  } //for
4036  } //for
4037  } //for
4038 
4039  //------------------------------------------------------ averSIGNAL
4048 
4053 
4054  //------------------------------------------------------
4063 
4068 
4069  //------------------------------------------------------ averNOSIGNAL
4078 
4083 
4084  //------------------------------------------------------
4093 
4098 
4099  //------------------------------------------------------ maxxSA and maxxOccupancy
4100  h_maxxSUMAmpl_HB->Fill(float(lscounterM1), maxxSUM1);
4101  h_maxxSUMAmpl_HE->Fill(float(lscounterM1), maxxSUM2);
4102  h_maxxSUMAmpl_HO->Fill(float(lscounterM1), maxxSUM3);
4103  h_maxxSUMAmpl_HF->Fill(float(lscounterM1), maxxSUM4);
4104  maxxSUM1 = 0.;
4105  maxxSUM2 = 0.;
4106  maxxSUM3 = 0.;
4107  maxxSUM4 = 0.;
4108  //------------------------------------------------------
4109  h_maxxOCCUP_HB->Fill(float(lscounterM1), maxxOCCUP1);
4110  h_maxxOCCUP_HE->Fill(float(lscounterM1), maxxOCCUP2);
4111  h_maxxOCCUP_HO->Fill(float(lscounterM1), maxxOCCUP3);
4112  h_maxxOCCUP_HF->Fill(float(lscounterM1), maxxOCCUP4);
4113  maxxOCCUP1 = 0.;
4114  maxxOCCUP2 = 0.;
4115  maxxOCCUP3 = 0.;
4116  maxxOCCUP4 = 0.;
4117 
4118  //------------------------------------------------------
4119  } //if(nevcounter0 != 0)
4120  // POINT1
4121 
4123  // for upgrade:
4124  for (int k1 = 0; k1 < ndepth; k1++) {
4125  for (int k2 = 0; k2 < neta; k2++) {
4126  for (int k3 = 0; k3 < nphi; k3++) {
4127  if (studyCalibCellsHist_) {
4128  signal[k1][k2][k3] = 0.;
4129  calibt[k1][k2][k3] = 0.;
4130  calibcapiderror[k1][k2][k3] = 0;
4131  caliba[k1][k2][k3] = 0.;
4132  calibw[k1][k2][k3] = 0.;
4133  calib0[k1][k2][k3] = 0.;
4134  signal3[k1][k2][k3] = 0.;
4135  calib3[k1][k2][k3] = 0.;
4136  calib2[k1][k2][k3] = 0.;
4137  }
4139  for (int k0 = 0; k0 < nsub; k0++) {
4140  badchannels[k0][k1][k2][k3] = 0;
4141  } //for
4142  } //if
4143 
4144  } //for
4145  } //for
4146  } //for
4147  for (int k0 = 0; k0 < nsub; k0++) {
4148  for (int k1 = 0; k1 < ndepth; k1++) {
4149  for (int k2 = 0; k2 < neta; k2++) {
4150  for (int k3 = 0; k3 < nphi; k3++) {
4151  amplitudechannel0[k0][k1][k2][k3] = 0.;
4152  amplitudechannel[k0][k1][k2][k3] = 0.;
4153  amplitudechannel2[k0][k1][k2][k3] = 0.;
4154 
4155  tocamplchannel[k0][k1][k2][k3] = 0.;
4156  maprphinorm[k0][k1][k2][k3] = 0.;
4157  // phi-symmetry monitoring for calibration group:
4158  // rec energy:
4159  recSignalEnergy0[k0][k1][k2][k3] = 0.;
4160  recSignalEnergy1[k0][k1][k2][k3] = 0.;
4161  recSignalEnergy2[k0][k1][k2][k3] = 0.;
4162  recNoiseEnergy0[k0][k1][k2][k3] = 0.;
4163  recNoiseEnergy1[k0][k1][k2][k3] = 0.;
4164  recNoiseEnergy2[k0][k1][k2][k3] = 0.;
4165 
4166  } //k3
4167  } //k2
4168  } //k1
4169  } //k0
4176  flagupgradeqie1011_ != 8) {
4178  iEvent.getByToken(tok_hf_, hf);
4179  bool gotHFDigis = true;
4180  if (!(iEvent.getByToken(tok_hf_, hf))) {
4181  gotHFDigis = false;
4182  } //this is a boolean set up to check if there are HFdigis in input root file
4183  if (!(hf.isValid())) {
4184  gotHFDigis = false;
4185  } //if it is not there, leave it false
4186  if (!gotHFDigis) {
4187  std::cout << " ****************************** =========================== No HFDigiCollection found "
4188  << std::endl;
4189  } else {
4191  for (HFDigiCollection::const_iterator digi = hf->begin(); digi != hf->end(); digi++) {
4192  eta = digi->id().ieta();
4193  phi = digi->id().iphi();
4194  depth = digi->id().depth();
4195  nTS = digi->size();
4197  counterhf++;
4200  fillDigiErrorsHF(digi);
4202  if (recordHistoes_)
4203  fillDigiAmplitudeHF(digi);
4206  int iphi = phi - 1;
4207  int ieta = eta;
4208  if (ieta > 0)
4209  ieta -= 1;
4210  if (nTS <= numOfTS)
4211  for (int i = 0; i < nTS; i++) {
4212  TS_data[i] = adc2fC[digi->sample(i).adc()];
4213  signal[3][ieta + 41][iphi] += TS_data[i];
4214  if (i > 1 && i < 6)
4215  signal3[3][ieta + 41][iphi] += TS_data[i];
4216  } // TS
4217  } // if(recordHistoes_ && studyCalibCellsHist_)
4218  } // for
4219  } // hf.isValid
4220  } // end flagupgrade
4221 
4224  // upgrade:
4225  if (flagupgradeqie1011_ != 1) {
4227  iEvent.getByToken(tok_qie10_, hfqie10);
4228  const QIE10DigiCollection& qie10dc =
4229  *(hfqie10);
4230  bool gotQIE10Digis = true;
4231  if (!(iEvent.getByToken(tok_qie10_, hfqie10))) {
4232  gotQIE10Digis = false;
4233  } //this is a boolean set up to check if there are HFdigis in input root file
4234  if (!(hfqie10.isValid())) {
4235  gotQIE10Digis = false;
4236  } //if it is not there, leave it false
4237  if (!gotQIE10Digis) {
4238  std::cout << " No QIE10DigiCollection collection is found " << std::endl;
4239  } else {
4241  double totalAmplitudeHF = 0.;
4242  for (unsigned int j = 0; j < qie10dc.size(); j++) {
4243  QIE10DataFrame qie10df = static_cast<QIE10DataFrame>(qie10dc[j]);
4244  DetId detid = qie10df.detid();
4245  HcalDetId hcaldetid = HcalDetId(detid);
4246  int eta = hcaldetid.ieta();
4247  int phi = hcaldetid.iphi();
4248  // int depth = hcaldetid.depth();
4249  // loop over the samples in the digi
4250  nTS = qie10df.samples();
4252  counterhfqie10++;
4255  fillDigiErrorsHFQIE10(qie10df);
4257  if (recordHistoes_)
4258  fillDigiAmplitudeHFQIE10(qie10df);
4260  // if(recordHistoes_ ) {
4262  int iphi = phi - 1;
4263  int ieta = eta;
4264  if (ieta > 0)
4265  ieta -= 1;
4266  double amplitudefullTSs = 0.;
4267  double nnnnnnTS = 0.;
4268  for (int i = 0; i < nTS; ++i) {
4269  // j - QIE channel
4270  // i - time sample (TS)
4271  int adc = qie10df[i].adc();
4272  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4273  // float charge = adc2fC_QIE10[ adc ];
4274  TS_data[i] = adc2fC_QIE10[adc];
4275  signal[3][ieta + 41][iphi] += TS_data[i];
4276  totalAmplitudeHF += TS_data[i];
4277  amplitudefullTSs += TS_data[i];
4278  nnnnnnTS++;
4279  if (i > 1 && i < 6)
4280  signal3[3][ieta + 41][iphi] += TS_data[i];
4281 
4282  } // TS
4283  h_numberofhitsHFtest->Fill(nnnnnnTS);
4284  h_AmplitudeHFtest->Fill(amplitudefullTSs);
4285  } // if(recordHistoes_ && studyCalibCellsHist_)
4286  } // for
4287  h_totalAmplitudeHF->Fill(totalAmplitudeHF);
4288  h_totalAmplitudeHFperEvent->Fill(float(eventcounter), totalAmplitudeHF);
4289  } // hfqie10.isValid
4290  } // end flagupgrade
4291  //end upgrade
4292  //
4293  //
4295  int qwert1 = 0;
4296  int qwert2 = 0;
4297  int qwert3 = 0;
4298  int qwert4 = 0;
4299  int qwert5 = 0;
4300  if (flagupgradeqie1011_ != 2 && flagupgradeqie1011_ != 3) {
4302  iEvent.getByToken(tok_hbhe_, hbhe);
4303  bool gotHBHEDigis = true;
4304  if (!(iEvent.getByToken(tok_hbhe_, hbhe)))
4305  gotHBHEDigis = false; //this is a boolean set up to check if there are HBHEgigis in input root file
4306  if (!(hbhe.isValid()))
4307  gotHBHEDigis = false; //if it is not there, leave it false
4308  if (!gotHBHEDigis) {
4309  std::cout << " No HBHEDigiCollection collection is found " << std::endl;
4310  } else {
4311  // unsigned int NHBHEDigiCollectionsize = hbhe->size();
4312  double totalAmplitudeHB = 0.;
4313  double totalAmplitudeHE = 0.;
4314  double nnnnnnTSHB = 0.;
4315  double nnnnnnTSHE = 0.;
4316 
4317  for (HBHEDigiCollection::const_iterator digi = hbhe->begin(); digi != hbhe->end(); digi++) {
4318  eta = digi->id().ieta();
4319  phi = digi->id().iphi();
4320  depth = digi->id().depth();
4321  nTS = digi->size();
4323  nnnnnnhbhe++;
4324  nnnnnn++;
4326  if (digi->id().subdet() == HcalBarrel && depth == 1 && qwert1 == 0) {
4327  nnnnnn1++;
4328  qwert1 = 1;
4329  }
4330  if (digi->id().subdet() == HcalBarrel && depth == 2 && qwert2 == 0) {
4331  nnnnnn2++;
4332  qwert2 = 1;
4333  }
4334  if (digi->id().subdet() == HcalEndcap && depth == 1 && qwert3 == 0) {
4335  nnnnnn3++;
4336  qwert3 = 1;
4337  }
4338  if (digi->id().subdet() == HcalEndcap && depth == 2 && qwert4 == 0) {
4339  nnnnnn4++;
4340  qwert4 = 1;
4341  }
4342  if (digi->id().subdet() == HcalEndcap && depth == 3 && qwert5 == 0) {
4343  nnnnnn5++;
4344  qwert5 = 1;
4345  }
4348  fillDigiErrors(digi);
4350  if (recordHistoes_)
4351  fillDigiAmplitude(digi);
4352 
4354  int iphi = phi - 1;
4355  int ieta = eta;
4356  if (ieta > 0)
4357  ieta -= 1;
4359  if (digi->id().subdet() == HcalBarrel) {
4360  double amplitudefullTSs = 0.;
4361  nnnnnnTSHB++;
4362  if (nTS <= numOfTS)
4363  for (int i = 0; i < nTS; i++) {
4364  TS_data[i] = adc2fC[digi->sample(i).adc()];
4365  signal[0][ieta + 41][iphi] += TS_data[i];
4366  amplitudefullTSs += TS_data[i];
4367  totalAmplitudeHB += TS_data[i];
4368  if (i > 1 && i < 6)
4369  signal3[0][ieta + 41][iphi] += TS_data[i];
4370  }
4371  h_AmplitudeHBtest->Fill(amplitudefullTSs);
4372  } // HB
4374  if (digi->id().subdet() == HcalEndcap) {
4375  double amplitudefullTSs = 0.;
4376  nnnnnnTSHE++;
4377  if (nTS <= numOfTS)
4378  for (int i = 0; i < nTS; i++) {
4379  TS_data[i] = adc2fC[digi->sample(i).adc()];
4380  signal[1][ieta + 41][iphi] += TS_data[i];
4381  totalAmplitudeHE += TS_data[i];
4382  amplitudefullTSs += TS_data[i];
4383  if (i > 1 && i < 6)
4384  signal3[1][ieta + 41][iphi] += TS_data[i];
4385  }
4386  h_AmplitudeHEtest->Fill(amplitudefullTSs);
4387  } // HE
4388 
4389  } //if(recordHistoes_ && studyCalibCellsHist_)
4391  } //if(recordNtuples_)
4392  } // for HBHE digis
4393  if (totalAmplitudeHB != 0.) {
4394  h_numberofhitsHBtest->Fill(nnnnnnTSHB);
4395  h_totalAmplitudeHB->Fill(totalAmplitudeHB);
4396  h_totalAmplitudeHBperEvent->Fill(float(eventcounter), totalAmplitudeHB);
4397  }
4398  if (totalAmplitudeHE != 0.) {
4399  h_numberofhitsHEtest->Fill(nnnnnnTSHE);
4400  h_totalAmplitudeHE->Fill(totalAmplitudeHE);
4401  h_totalAmplitudeHEperEvent->Fill(float(eventcounter), totalAmplitudeHE);
4402  }
4403  } //hbhe.isValid
4404  } // end flagupgrade
4405  //---------------------------------------------------------------
4407  // upgrade:
4410  iEvent.getByToken(tok_qie11_, heqie11);
4411  const QIE11DigiCollection& qie11dc =
4412  *(heqie11);
4413  bool gotQIE11Digis = true;
4414  if (!(iEvent.getByToken(tok_qie11_, heqie11)))
4415  gotQIE11Digis = false; //this is a boolean set up to check if there are QIE11gigis in input root file
4416  if (!(heqie11.isValid()))
4417  gotQIE11Digis = false; //if it is not there, leave it false
4418  if (!gotQIE11Digis) {
4419  std::cout << " No QIE11DigiCollection collection is found " << std::endl;
4420  } else {
4422  double totalAmplitudeHBQIE11 = 0.;
4423  double totalAmplitudeHEQIE11 = 0.;
4424  double nnnnnnTSHBQIE11 = 0.;
4425  double nnnnnnTSHEQIE11 = 0.;
4426  for (unsigned int j = 0; j < qie11dc.size(); j++) {
4427  QIE11DataFrame qie11df = static_cast<QIE11DataFrame>(qie11dc[j]);
4428  DetId detid = qie11df.detid();
4429  HcalDetId hcaldetid = HcalDetId(detid);
4430  int eta = hcaldetid.ieta();
4431  int phi = hcaldetid.iphi();
4432  int depth = hcaldetid.depth();
4433  if (depth == 0)
4434  return;
4435  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
4436  // loop over the samples in the digi
4437  nTS = qie11df.samples();
4439  nnnnnnhbheqie11++;
4440  nnnnnn++;
4442  fillDigiErrorsQIE11(qie11df);
4444  if (recordHistoes_)
4445  fillDigiAmplitudeQIE11(qie11df);
4448  if (sub == 1 && depth == 1 && qwert1 == 0) {
4449  nnnnnn1++;
4450  qwert1 = 1;
4451  }
4452  if (sub == 1 && depth == 2 && qwert2 == 0) {
4453  nnnnnn2++;
4454  qwert2 = 1;
4455  }
4456  if (sub == 2 && depth == 1 && qwert3 == 0) {
4457  nnnnnn3++;
4458  qwert3 = 1;
4459  }
4460  if (sub == 2 && depth == 2 && qwert4 == 0) {
4461  nnnnnn4++;
4462  qwert4 = 1;
4463  }
4464  if (sub == 2 && depth == 3 && qwert5 == 0) {
4465  nnnnnn5++;
4466  qwert5 = 1;
4467  }
4468 
4470  int iphi = phi - 1;
4471  int ieta = eta;
4472  if (ieta > 0)
4473  ieta -= 1;
4474  // HB:
4475  if (sub == 1) {
4476  double amplitudefullTSs1 = 0.;
4477  double amplitudefullTSs6 = 0.;
4478  nnnnnnTSHBQIE11++;
4479  for (int i = 0; i < nTS; ++i) {
4480  int adc = qie11df[i].adc();
4481  double charge1 = adc2fC_QIE11_shunt1[adc];
4482  double charge6 = adc2fC_QIE11_shunt6[adc];
4483  amplitudefullTSs1 += charge1;
4484  amplitudefullTSs6 += charge6;
4485  double charge = charge6;
4486  TS_data[i] = charge;
4487  signal[0][ieta + 41][iphi] += charge;
4488  if (i > 1 && i < 6)
4489  signal3[0][ieta + 41][iphi] += charge;
4490  totalAmplitudeHBQIE11 += charge;
4491  } //for
4492  h_AmplitudeHBtest1->Fill(amplitudefullTSs1, 1.);
4493  h_AmplitudeHBtest6->Fill(amplitudefullTSs6, 1.);
4494  } //HB end
4495  // HE:
4496  if (sub == 2) {
4497  double amplitudefullTSs1 = 0.;
4498  double amplitudefullTSs6 = 0.;
4499  nnnnnnTSHEQIE11++;
4500  for (int i = 0; i < nTS; i++) {
4501  int adc = qie11df[i].adc();
4502  double charge1 = adc2fC_QIE11_shunt1[adc];
4503  double charge6 = adc2fC_QIE11_shunt6[adc];
4504  amplitudefullTSs1 += charge1;
4505  amplitudefullTSs6 += charge6;
4506  double charge = charge6;
4507  TS_data[i] = charge;
4508  signal[1][ieta + 41][iphi] += charge;
4509  if (i > 1 && i < 6)
4510  signal3[1][ieta + 41][iphi] += charge;
4511  totalAmplitudeHEQIE11 += charge;
4512  } //for
4513  h_AmplitudeHEtest1->Fill(amplitudefullTSs1, 1.);
4514  h_AmplitudeHEtest6->Fill(amplitudefullTSs6, 1.);
4515 
4516  } //HE end
4517  } //if(recordHistoes_ && studyCalibCellsHist_)
4518  } // for QIE11 digis
4519 
4520  if (totalAmplitudeHBQIE11 != 0.) {
4521  h_numberofhitsHBtest->Fill(nnnnnnTSHBQIE11);
4522  h_totalAmplitudeHB->Fill(totalAmplitudeHBQIE11);
4523  h_totalAmplitudeHBperEvent->Fill(float(eventcounter), totalAmplitudeHBQIE11);
4524  }
4525  if (totalAmplitudeHEQIE11 != 0.) {
4526  h_numberofhitsHEtest->Fill(nnnnnnTSHEQIE11);
4527  h_totalAmplitudeHE->Fill(totalAmplitudeHEQIE11);
4528  h_totalAmplitudeHEperEvent->Fill(float(eventcounter), totalAmplitudeHEQIE11);
4529  }
4530  } //heqie11.isValid
4531  } // end flagupgrade
4532 
4535  iEvent.getByToken(tok_ho_, ho);
4536  bool gotHODigis = true;
4537  if (!(iEvent.getByToken(tok_ho_, ho)))
4538  gotHODigis = false; //this is a boolean set up to check if there are HOgigis in input root file
4539  if (!(ho.isValid()))
4540  gotHODigis = false; //if it is not there, leave it false
4541  if (!gotHODigis) {
4542  // if(!ho.isValid()) {
4543  std::cout << " No HO collection is found " << std::endl;
4544  } else {
4545  int qwert6 = 0;
4546  double totalAmplitudeHO = 0.;
4547  for (HODigiCollection::const_iterator digi = ho->begin(); digi != ho->end(); digi++) {
4548  eta = digi->id().ieta();
4549  phi = digi->id().iphi();
4550  depth = digi->id().depth();
4551  nTS = digi->size();
4553  counterho++;
4555  if (qwert6 == 0) {
4556  nnnnnn6++;
4557  qwert6 = 1;
4558  }
4561  fillDigiErrorsHO(digi);
4563  if (recordHistoes_)
4564  fillDigiAmplitudeHO(digi);
4567  int iphi = phi - 1;
4568  int ieta = eta;
4569  if (ieta > 0)
4570  ieta -= 1;
4571  double nnnnnnTS = 0.;
4572  double amplitudefullTSs = 0.;
4573  if (nTS <= numOfTS)
4574  for (int i = 0; i < nTS; i++) {
4575  TS_data[i] = adc2fC[digi->sample(i).adc()];
4576  amplitudefullTSs += TS_data[i];
4577  signal[2][ieta + 41][iphi] += TS_data[i];
4578  totalAmplitudeHO += TS_data[i];
4579  if (i > 1 && i < 6)
4580  signal3[2][ieta + 41][iphi] += TS_data[i];
4581  nnnnnnTS++;
4582  } //if for
4583  h_AmplitudeHOtest->Fill(amplitudefullTSs);
4584  h_numberofhitsHOtest->Fill(nnnnnnTS);
4585  } //if(recordHistoes_ && studyCalibCellsHist_)
4586  } //for HODigiCollection
4587 
4588  h_totalAmplitudeHO->Fill(totalAmplitudeHO);
4589  h_totalAmplitudeHOperEvent->Fill(float(eventcounter), totalAmplitudeHO);
4590  } //ho.isValid(
4591 
4593  // AZ 04.11.2019
4599  // HBHE: HBHERecHitCollection hbheNoise Noise
4601  iEvent.getByToken(tok_hbheNoise_, hbheNoise);
4602  bool gotHBHERecHitsNoise = true;
4603  if (!(iEvent.getByToken(tok_hbheNoise_, hbheNoise)))
4604  gotHBHERecHitsNoise =
4605  false; //this is a boolean set up to check if there are HBHERecHitsNoise in input root file
4606  if (!(hbheNoise.isValid()))
4607  gotHBHERecHitsNoise = false; //if it is not there, leave it false
4608  if (!gotHBHERecHitsNoise) {
4609  // if(!hbheNoise.isValid()) {
4610  std::cout << " No RecHits HBHENoise collection is found " << std::endl;
4611  } else {
4612  for (HBHERecHitCollection::const_iterator hbheItr = hbheNoise->begin(); hbheItr != hbheNoise->end();
4613  hbheItr++) {
4614  // Recalibration of energy
4615  float icalconst = 1.;
4616  // DetId mydetid = hbheItr->id().rawId();
4617  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4618  HBHERecHit aHit(hbheItr->id(), hbheItr->eraw() * icalconst, hbheItr->time());
4619  // HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
4620  double energyhit = aHit.energy();
4621  DetId id = (*hbheItr).detid();
4622  HcalDetId hid = HcalDetId(id);
4623  int sub = ((hid).rawId() >> 25) & 0x7;
4624 
4625  if (sub == 1)
4626  h_energyhitNoise_HB->Fill(energyhit, 1.);
4627  if (sub == 2)
4628  h_energyhitNoise_HE->Fill(energyhit, 1.);
4629  // if(fabs(energyhit) > 40. ) continue;
4630 
4631  //std::cout<<sub<<std::endl;
4632  if (hid.depth() == 1 && sub == 1 && hid.iphi() == 25) {
4633  if (verbosity == -9063)
4634  std::cout << " Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4635  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4636  }
4637  if (hid.depth() == 1 && sub == 2 && hid.iphi() == 25) {
4638  if (verbosity == -9063)
4639  std::cout << " Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4640  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4641  }
4642  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4643  if (ieta > 0)
4644  ieta -= 1; // -15 ... -1; 0... 14 for HB
4645  int iphi = hid.iphi() - 1;
4646  int mdepth = hid.depth();
4647  recNoiseEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4648  recNoiseEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4649  recNoiseEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4650  } // hbheNoise
4651  } //hbheNoise.isValid(
4653 
4654  // HF: HFRecHitCollection hfNoise Noise
4656  iEvent.getByToken(tok_hfNoise_, hfNoise);
4657  bool gotHFRecHitsNoise = true;
4658  if (!(iEvent.getByToken(tok_hfNoise_, hfNoise)))
4659  gotHFRecHitsNoise = false; //this is a boolean set up to check if there are HFRecHitsNoise in input root file
4660  if (!(hfNoise.isValid()))
4661  gotHFRecHitsNoise = false; //if it is not there, leave it false
4662  if (!gotHFRecHitsNoise) {
4663  // if(!hfNoise.isValid()) {
4664  std::cout << " No RecHits HFNoise collection is found " << std::endl;
4665  } else {
4666  for (HFRecHitCollection::const_iterator hfItr = hfNoise->begin(); hfItr != hfNoise->end(); hfItr++) {
4667  // Recalibration of energy
4668  float icalconst = 1.;
4669  // DetId mydetid = hfItr->id().rawId();
4670  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4671  HFRecHit aHit(hfItr->id(), hfItr->energy() * icalconst, hfItr->time());
4672  double energyhit = aHit.energy();
4673  DetId id = (*hfItr).detid();
4674  HcalDetId hid = HcalDetId(id);
4675  int sub = ((hid).rawId() >> 25) & 0x7;
4676 
4677  h_energyhitNoise_HF->Fill(energyhit, 1.);
4678  // if(fabs(energyhit) > 40. ) continue;
4679 
4680  //std::cout<<sub<<std::endl;
4681  if (hid.iphi() == 25) {
4682  if (verbosity == -9065)
4683  std::cout << "HF Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4684  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4685  }
4686  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4687  if (ieta > 0)
4688  ieta -= 1; // -15 ... -1; 0... 14 for HB
4689  int iphi = hid.iphi() - 1;
4690  int mdepth = hid.depth();
4691  recNoiseEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4692  recNoiseEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4693  recNoiseEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4694  } // hfNoise
4695  } //hfNoise.isValid(
4697 
4701  // HBHE: HBHERecHitCollection hbheSignal Signal
4703  iEvent.getByToken(tok_hbheSignal_, hbheSignal);
4704  bool gotHBHERecHitsSignal = true;
4705  if (!(iEvent.getByToken(tok_hbheSignal_, hbheSignal)))
4706  gotHBHERecHitsSignal =
4707  false; //this is a boolean set up to check if there are HBHERecHitsSignal in input root file
4708  if (!(hbheSignal.isValid()))
4709  gotHBHERecHitsSignal = false; //if it is not there, leave it false
4710  if (!gotHBHERecHitsSignal) {
4711  // if(!hbheSignal.isValid()) {
4712  std::cout << " No RecHits HBHESignal collection is found " << std::endl;
4713  } else {
4714  for (HBHERecHitCollection::const_iterator hbheItr = hbheSignal->begin(); hbheItr != hbheSignal->end();
4715  hbheItr++) {
4716  // Recalibration of energy
4717  float icalconst = 1.;
4718  // DetId mydetid = hbheItr->id().rawId();
4719  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4720  HBHERecHit aHit(hbheItr->id(), hbheItr->eraw() * icalconst, hbheItr->time());
4721  // HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
4722  double energyhit = aHit.energy();
4723  DetId id = (*hbheItr).detid();
4724  HcalDetId hid = HcalDetId(id);
4725  int sub = ((hid).rawId() >> 25) & 0x7;
4726 
4727  if (sub == 1)
4728  h_energyhitSignal_HB->Fill(energyhit, 1.);
4729  if (sub == 2)
4730  h_energyhitSignal_HE->Fill(energyhit, 1.);
4731 
4732  //std::cout<<sub<<std::endl;
4733  if (hid.depth() == 1 && sub == 1 && hid.iphi() == 25) {
4734  if (verbosity == -9062)
4735  std::cout << "HBHE Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4736  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4737  }
4738  if (hid.depth() == 1 && sub == 2 && hid.iphi() == 25) {
4739  if (verbosity == -9062)
4740  std::cout << "HBHE Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4741  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4742  }
4743  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4744  if (ieta > 0)
4745  ieta -= 1; // -15 ... -1; 0... 14 for HB
4746  int iphi = hid.iphi() - 1;
4747  int mdepth = hid.depth();
4748  recSignalEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4749  recSignalEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4750  recSignalEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4751  } // hbheSignal
4752  } //hbheSignal.isValid(
4754 
4755  // HF: HFRecHitCollection hfSignal Signal
4757  iEvent.getByToken(tok_hfSignal_, hfSignal);
4758  bool gotHFRecHitsSignal = true;
4759  if (!(iEvent.getByToken(tok_hfSignal_, hfSignal)))
4760  gotHFRecHitsSignal = false; //this is a boolean set up to check if there are HFRecHitsSignal in input root file
4761  if (!(hfSignal.isValid()))
4762  gotHFRecHitsSignal = false; //if it is not there, leave it false
4763  if (!gotHFRecHitsSignal) {
4764  // if(!hfSignal.isValid()) {
4765  std::cout << " No RecHits HFSignal collection is found " << std::endl;
4766  } else {
4767  for (HFRecHitCollection::const_iterator hfItr = hfSignal->begin(); hfItr != hfSignal->end(); hfItr++) {
4768  // Recalibration of energy
4769  float icalconst = 1.;
4770  // DetId mydetid = hfItr->id().rawId();
4771  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4772  HFRecHit aHit(hfItr->id(), hfItr->energy() * icalconst, hfItr->time());
4773  double energyhit = aHit.energy();
4774  DetId id = (*hfItr).detid();
4775  HcalDetId hid = HcalDetId(id);
4776  int sub = ((hid).rawId() >> 25) & 0x7;
4777 
4778  h_energyhitSignal_HF->Fill(energyhit, 1.);
4779  // if(fabs(energyhit) > 40. ) continue;
4780 
4781  //std::cout<<sub<<std::endl;
4782  if (hid.iphi() == 25) {
4783  if (verbosity == -9064)
4784  std::cout << "HF Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4785  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4786  }
4787  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4788  if (ieta > 0)
4789  ieta -= 1; // -15 ... -1; 0... 14 for HB
4790  int iphi = hid.iphi() - 1;
4791  int mdepth = hid.depth();
4792  recSignalEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4793  recSignalEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4794  recSignalEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4795  } // hfSignal
4796  } //hfSignal.isValid(
4798 
4800  // END of RecHits for phi-symmetry monitoring of calibration group
4801  } // flagIterativeMethodCalibrationGroupReco_ > 0
4803 
4805 
4817  // // // // // // // tocdefault tocampl tocamplchannel: calibration group, Iterative method, coding start 29.08.2019
4818  for (int k0 = 0; k0 < nsub; k0++) {
4819  // HE only, temporary
4820  if (k0 == 1) {
4821  for (int k1 = 0; k1 < ndepth; k1++) {
4822  // k2: 0-81
4823  for (int k2 = 0; k2 < neta; k2++) {
4824  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
4825  int k2plot = k2 - 41;
4826  int kkk = k2plot; //if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
4827  //preparation for PHI normalization:
4828  double sumoverphi = 0;
4829  int nsumoverphi = 0;
4830  for (int k3 = 0; k3 < nphi; k3++) {
4831  if (tocamplchannel[k0][k1][k2][k3] != 0) {
4832  sumoverphi += tocamplchannel[k0][k1][k2][k3];
4833  ++nsumoverphi;
4834  if (verbosity == -9504)
4835  std::cout << "==== nsumoverphi = " << nsumoverphi << " sumoverphi = " << sumoverphi
4836  << " k1 = " << k1 << " k2 = " << k2 << " kkk = " << kkk << " k3 = " << k3 << std::endl;
4837  } //if != 0
4838  } //k3
4839  // PHI normalization into new massive && filling plots:
4840  for (int k3 = 0; k3 < nphi; k3++) {
4841  if (nsumoverphi != 0) {
4842  maprphinorm[k0][k1][k2][k3] = tocamplchannel[k0][k1][k2][k3] / (sumoverphi / nsumoverphi);
4843  if (verbosity == -9504)
4844  std::cout << "nsumoverphi= " << nsumoverphi << " sumoverphi= " << sumoverphi << " k1= " << k1
4845  << " k2= " << k2 << " kkk= " << kkk << " k3= " << k3
4846  << " maprphinorm= " << maprphinorm[k0][k1][k2][k3] << std::endl;
4847  if (k1 == 0) {
4848  h_mapenophinorm_HE1->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4849  h_mapenophinorm2_HE1->Fill(
4850  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4851  h_maprphinorm_HE1->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4852  h_maprphinorm2_HE1->Fill(
4853  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4854  h_maprphinorm0_HE1->Fill(double(kkk), double(k3), 1.);
4855  }
4856  if (k1 == 1) {
4857  h_mapenophinorm_HE2->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4858  h_mapenophinorm2_HE2->Fill(
4859  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4860  h_maprphinorm_HE2->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4861  h_maprphinorm2_HE2->Fill(
4862  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4863  h_maprphinorm0_HE2->Fill(double(kkk), double(k3), 1.);
4864  }
4865  if (k1 == 2) {
4866  h_mapenophinorm_HE3->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4867  h_mapenophinorm2_HE3->Fill(
4868  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4869  h_maprphinorm_HE3->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4870  h_maprphinorm2_HE3->Fill(
4871  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4872  h_maprphinorm0_HE3->Fill(double(kkk), double(k3), 1.);
4873  }
4874  if (k1 == 3) {
4875  h_mapenophinorm_HE4->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4876  h_mapenophinorm2_HE4->Fill(
4877  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4878  h_maprphinorm_HE4->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4879  h_maprphinorm2_HE4->Fill(
4880  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4881  h_maprphinorm0_HE4->Fill(double(kkk), double(k3), 1.);
4882  }
4883  if (k1 == 4) {
4884  h_mapenophinorm_HE5->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4885  h_mapenophinorm2_HE5->Fill(
4886  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4887  h_maprphinorm_HE5->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4888  h_maprphinorm2_HE5->Fill(
4889  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4890  h_maprphinorm0_HE5->Fill(double(kkk), double(k3), 1.);
4891  }
4892  if (k1 == 5) {
4893  h_mapenophinorm_HE6->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4894  h_mapenophinorm2_HE6->Fill(
4895  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4896  h_maprphinorm_HE6->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4897  h_maprphinorm2_HE6->Fill(
4898  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4899  h_maprphinorm0_HE6->Fill(double(kkk), double(k3), 1.);
4900  }
4901  if (k1 == 6) {
4902  h_mapenophinorm_HE7->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4903  h_mapenophinorm2_HE7->Fill(
4904  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4905  h_maprphinorm_HE7->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4906  h_maprphinorm2_HE7->Fill(
4907  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4908  h_maprphinorm0_HE7->Fill(double(kkk), double(k3), 1.);
4909  }
4910  } //if nsumoverphi != 0
4911  } //k3
4912  } //k2
4913  } //k1
4914  } //if k0 == 1 HE
4915  } //k0
4916  // // // // // // // // // // // // // // // // // // // // // // // //
4917  // // // // // // // amplitudechannel amplitudechannel amplitudechannel: calibration group, Iterative method, coding start 11.11.2019
4918  for (int k0 = 0; k0 < nsub; k0++) {
4919  // HB:
4920  if (k0 == 0) {
4921  for (int k1 = 0; k1 < ndepth; k1++) {
4922  // k2: 0-81
4923  for (int k2 = 0; k2 < neta; k2++) {
4924  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
4925  int k2plot = k2 - 41;
4926  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
4927  for (int k3 = 0; k3 < nphi; k3++) {
4928  if (k1 == 0) {
4929  h_amplitudechannel0_HB1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4930  h_amplitudechannel1_HB1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4931  h_amplitudechannel2_HB1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4932  }
4933  if (k1 == 1) {
4934  h_amplitudechannel0_HB2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4935  h_amplitudechannel1_HB2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4936  h_amplitudechannel2_HB2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4937  }
4938  if (k1 == 2) {
4939  h_amplitudechannel0_HB3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4940  h_amplitudechannel1_HB3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4941  h_amplitudechannel2_HB3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4942  }
4943  if (k1 == 3) {
4944  h_amplitudechannel0_HB4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4945  h_amplitudechannel1_HB4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4946  h_amplitudechannel2_HB4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4947  }
4948  } //k3
4949  } //k2
4950  } //k1
4951  } //if k0 == 0 HB
4952 
4953  // HE:
4954  if (k0 == 1) {
4955  for (int k1 = 0; k1 < ndepth; k1++) {
4956  // k2: 0-81
4957  for (int k2 = 0; k2 < neta; k2++) {
4958  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
4959  int k2plot = k2 - 41;
4960  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
4961  for (int k3 = 0; k3 < nphi; k3++) {
4962  if (k1 == 0) {
4963  h_amplitudechannel0_HE1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4964  h_amplitudechannel1_HE1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4965  h_amplitudechannel2_HE1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4966  }
4967  if (k1 == 1) {
4968  h_amplitudechannel0_HE2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4969  h_amplitudechannel1_HE2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4970  h_amplitudechannel2_HE2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4971  }
4972  if (k1 == 2) {
4973  h_amplitudechannel0_HE3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4974  h_amplitudechannel1_HE3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4975  h_amplitudechannel2_HE3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4976  }
4977  if (k1 == 3) {
4978  h_amplitudechannel0_HE4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4979  h_amplitudechannel1_HE4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4980  h_amplitudechannel2_HE4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4981  }
4982  if (k1 == 4) {
4983  h_amplitudechannel0_HE5->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4984  h_amplitudechannel1_HE5->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4985  h_amplitudechannel2_HE5->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4986  }
4987  if (k1 == 5) {
4988  h_amplitudechannel0_HE6->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4989  h_amplitudechannel1_HE6->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4990  h_amplitudechannel2_HE6->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4991  }
4992  if (k1 == 6) {
4993  h_amplitudechannel0_HE7->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4994  h_amplitudechannel1_HE7->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4995  h_amplitudechannel2_HE7->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4996  }
4997  } //k3
4998  } //k2
4999  } //k1
5000  } //if k0 == 1 HE
5001 
5002  // HF: 4 depthes for Digis and only 2 - for Reco !!!
5003  if (k0 == 3) {
5004  for (int k1 = 0; k1 < ndepth; k1++) {
5005  // k2: 0-81
5006  for (int k2 = 0; k2 < neta; k2++) {
5007  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5008  int k2plot = k2 - 41;
5009  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5010  for (int k3 = 0; k3 < nphi; k3++) {
5011  if (k1 == 0) {
5012  h_amplitudechannel0_HF1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5013  h_amplitudechannel1_HF1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5014  h_amplitudechannel2_HF1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5015  }
5016  if (k1 == 1) {
5017  h_amplitudechannel0_HF2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5018  h_amplitudechannel1_HF2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5019  h_amplitudechannel2_HF2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5020  }
5021  if (k1 == 2) {
5022  h_amplitudechannel0_HF3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5023  h_amplitudechannel1_HF3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5024  h_amplitudechannel2_HF3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5025  }
5026  if (k1 == 3) {
5027  h_amplitudechannel0_HF4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5028  h_amplitudechannel1_HF4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5029  h_amplitudechannel2_HF4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5030  }
5031  } //k3
5032  } //k2
5033  } //k1
5034  } //if k0 == 3 HF
5035 
5036  } //k0
5037 
5038  } // if(flagIterativeMethodCalibrationGroupDigi
5039 
5049  //
5050  for (int k0 = 0; k0 < nsub; k0++) {
5051  // HB:
5052  if (k0 == 0) {
5053  for (int k1 = 0; k1 < ndepth; k1++) {
5054  // k2: 0-81
5055  for (int k2 = 0; k2 < neta; k2++) {
5056  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5057  int k2plot = k2 - 41;
5058  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5059  for (int k3 = 0; k3 < nphi; k3++) {
5060  if (k1 == 0) {
5061  h_recSignalEnergy0_HB1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5062  h_recSignalEnergy1_HB1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5063  h_recSignalEnergy2_HB1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5064  h_recNoiseEnergy0_HB1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5065  h_recNoiseEnergy1_HB1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5066  h_recNoiseEnergy2_HB1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5067  }
5068  if (k1 == 1) {
5069  h_recSignalEnergy0_HB2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5070  h_recSignalEnergy1_HB2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5071  h_recSignalEnergy2_HB2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5072  h_recNoiseEnergy0_HB2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5073  h_recNoiseEnergy1_HB2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5074  h_recNoiseEnergy2_HB2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5075  }
5076  if (k1 == 2) {
5077  h_recSignalEnergy0_HB3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5078  h_recSignalEnergy1_HB3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5079  h_recSignalEnergy2_HB3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5080  h_recNoiseEnergy0_HB3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5081  h_recNoiseEnergy1_HB3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5082  h_recNoiseEnergy2_HB3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5083  }
5084  if (k1 == 3) {
5085  h_recSignalEnergy0_HB4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5086  h_recSignalEnergy1_HB4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5087  h_recSignalEnergy2_HB4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5088  h_recNoiseEnergy0_HB4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5089  h_recNoiseEnergy1_HB4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5090  h_recNoiseEnergy2_HB4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5091  }
5092  } //k3
5093  } //k2
5094  } //k1
5095  } //if k0 == 0 HB
5096 
5097  // HE:
5098  if (k0 == 1) {
5099  for (int k1 = 0; k1 < ndepth; k1++) {
5100  // k2: 0-81
5101  for (int k2 = 0; k2 < neta; k2++) {
5102  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5103  int k2plot = k2 - 41;
5104  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5105  for (int k3 = 0; k3 < nphi; k3++) {
5106  if (k1 == 0) {
5107  h_recSignalEnergy0_HE1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5108  h_recSignalEnergy1_HE1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5109  h_recSignalEnergy2_HE1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5110  h_recNoiseEnergy0_HE1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5111  h_recNoiseEnergy1_HE1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5112  h_recNoiseEnergy2_HE1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5113  }
5114  if (k1 == 1) {
5115  h_recSignalEnergy0_HE2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5116  h_recSignalEnergy1_HE2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5117  h_recSignalEnergy2_HE2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5118  h_recNoiseEnergy0_HE2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5119  h_recNoiseEnergy1_HE2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5120  h_recNoiseEnergy2_HE2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5121  }
5122  if (k1 == 2) {
5123  h_recSignalEnergy0_HE3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5124  h_recSignalEnergy1_HE3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5125  h_recSignalEnergy2_HE3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5126  h_recNoiseEnergy0_HE3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5127  h_recNoiseEnergy1_HE3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5128  h_recNoiseEnergy2_HE3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5129  }
5130  if (k1 == 3) {
5131  h_recSignalEnergy0_HE4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5132  h_recSignalEnergy1_HE4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5133  h_recSignalEnergy2_HE4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5134  h_recNoiseEnergy0_HE4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5135  h_recNoiseEnergy1_HE4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5136  h_recNoiseEnergy2_HE4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5137  }
5138  if (k1 == 4) {
5139  h_recSignalEnergy0_HE5->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5140  h_recSignalEnergy1_HE5->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5141  h_recSignalEnergy2_HE5->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5142  h_recNoiseEnergy0_HE5->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5143  h_recNoiseEnergy1_HE5->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5144  h_recNoiseEnergy2_HE5->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5145  }
5146  if (k1 == 5) {
5147  h_recSignalEnergy0_HE6->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5148  h_recSignalEnergy1_HE6->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5149  h_recSignalEnergy2_HE6->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5150  h_recNoiseEnergy0_HE6->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5151  h_recNoiseEnergy1_HE6->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5152  h_recNoiseEnergy2_HE6->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5153  }
5154  if (k1 == 6) {
5155  h_recSignalEnergy0_HE7->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5156  h_recSignalEnergy1_HE7->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5157  h_recSignalEnergy2_HE7->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5158  h_recNoiseEnergy0_HE7->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5159  h_recNoiseEnergy1_HE7->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5160  h_recNoiseEnergy2_HE7->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5161  }
5162  } //k3
5163  } //k2
5164  } //k1
5165  } //if k0 == 1 HE
5166 
5167  // HF: 4 depthes for Digis and only 2 - for Reco !!! ('ve tried to enter 4 for reco since 31.10.2021 AZ)
5168  if (k0 == 3) {
5169  for (int k1 = 0; k1 < ndepth; k1++) {
5170  // k2: 0-81
5171  for (int k2 = 0; k2 < neta; k2++) {
5172  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5173  int k2plot = k2 - 41;
5174  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5175  for (int k3 = 0; k3 < nphi; k3++) {
5176  if (k1 == 0) {
5177  h_recSignalEnergy0_HF1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5178  h_recSignalEnergy1_HF1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5179  h_recSignalEnergy2_HF1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5180  h_recNoiseEnergy0_HF1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5181  h_recNoiseEnergy1_HF1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5182  h_recNoiseEnergy2_HF1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5183  }
5184  if (k1 == 1) {
5185  h_recSignalEnergy0_HF2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5186  h_recSignalEnergy1_HF2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5187  h_recSignalEnergy2_HF2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5188  h_recNoiseEnergy0_HF2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5189  h_recNoiseEnergy1_HF2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5190  h_recNoiseEnergy2_HF2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5191  }
5192  // AZ 31.10.2021: k1=3 and 4 added for HF recoSignal,recNoise
5193  if (k1 == 2) {
5194  h_recSignalEnergy0_HF3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5195  h_recSignalEnergy1_HF3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5196  h_recSignalEnergy2_HF3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5197  h_recNoiseEnergy0_HF3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5198  h_recNoiseEnergy1_HF3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5199  h_recNoiseEnergy2_HF3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5200  }
5201  if (k1 == 3) {
5202  h_recSignalEnergy0_HF4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5203  h_recSignalEnergy1_HF4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5204  h_recSignalEnergy2_HF4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5205  h_recNoiseEnergy0_HF4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5206  h_recNoiseEnergy1_HF4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5207  h_recNoiseEnergy2_HF4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5208  }
5209  } //k3
5210  } //k2
5211  } //k1
5212  } //if k0 == 3 HF
5213 
5214  } //k0
5215 
5216  } // if(flagIterativeMethodCalibrationGroupReco
5217 
5219 
5221  if (flagLaserRaddam_ > 1) {
5223  for (int k1 = 0; k1 < ndepth; k1++) {
5224  for (int k2 = 0; k2 < neta; k2++) {
5225  for (int k3 = 0; k3 < nphi; k3++) {
5226  if (mapRADDAM0_HE[k1][k2][k3] != 0) {
5227  // ---------------------------------------- D2 sum over phi before!!! any dividing:
5228  mapRADDAM_HED2[k1][k2] += mapRADDAM_HE[k1][k2][k3];
5229  // N phi sectors w/ digihits
5230  ++mapRADDAM_HED20[k1][k2];
5231  } //if
5232  } //for
5233  } //for
5234  } //for
5235 
5237  for (int k1 = 0; k1 < ndepth; k1++) {
5238  for (int k2 = 0; k2 < neta; k2++) {
5239  if (mapRADDAM_HED20[k1][k2] != 0) {
5240  // validation of channels at eta16:
5241  if (k1 == 2 && k2 == 25) {
5243  h_Eta16Depth3RADDAM_HED2->Fill(mapRADDAM_HED2[k1][k2] / mapRADDAM_HED20[k1][k2]);
5245  } else if (k1 == 2 && k2 == 56) {
5247  h_Eta16Depth3RADDAM_HED2P->Fill(mapRADDAM_HED2[k1][k2] / mapRADDAM_HED20[k1][k2]);
5249  } else {
5253  }
5255  mapRADDAM_HED2[k1][k2] /= mapRADDAM_HED20[k1][k2];
5256  } // if(mapRADDAM_HED20[k1][k2] != 0
5257  } //for
5258  } //for
5260  for (int k1 = 0; k1 < ndepth; k1++) {
5261  for (int k2 = 0; k2 < neta; k2++) {
5262  if (k1 == 2 && (k2 == 25 || k2 == 56)) {
5263  } else {
5264  // if(k2!=25 && k2!=56) {
5265  int k2plot = k2 - 41;
5266  int kkk = k2;
5267  if (k2plot > 0)
5268  kkk = k2 + 1;
5269  int kk2 = 25;
5270  if (k2plot > 0)
5271  kk2 = 56;
5272  if (mapRADDAM_HED2[k1][k2] != 0. && mapRADDAM_HED2[2][kk2] != 0) {
5273  mapRADDAM_HED2[k1][k2] /= mapRADDAM_HED2[2][kk2];
5274  // (d1 & eta 17-29) L1
5275  int LLLLLL111111 = 0;
5276  if ((k1 == 0 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 30))
5277  LLLLLL111111 = 1;
5278  // (d2 & eta 17-26) && (d3 & eta 27-28) L2
5279  int LLLLLL222222 = 0;
5280  if ((k1 == 1 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 27) ||
5281  (k1 == 2 && fabs(kkk - 41) > 26 && fabs(kkk - 41) < 29))
5282  LLLLLL222222 = 1;
5283  //
5284  if (LLLLLL111111 == 1) {
5285  h_sigLayer1RADDAM5_HED2->Fill(double(kkk - 41), mapRADDAM_HED2[k1][k2]);
5286  h_sigLayer1RADDAM6_HED2->Fill(double(kkk - 41), 1.);
5287  }
5288  if (LLLLLL222222 == 1) {
5289  h_sigLayer2RADDAM5_HED2->Fill(double(kkk - 41), mapRADDAM_HED2[k1][k2]);
5290  h_sigLayer2RADDAM6_HED2->Fill(double(kkk - 41), 1.);
5291  }
5292  } //if
5293  } // if(k2!=25 && k2!=56
5294  } //for
5295  } //for
5296 
5298 
5299  //------------------------------------------------------ aver per eta 16(depth=3-> k1=2, k2=16(15) :
5301  for (int k1 = 0; k1 < ndepth; k1++) {
5302  for (int k2 = 0; k2 < neta; k2++) {
5303  if (k1 == 2 && (k2 == 25 || k2 == 56)) {
5304  } else {
5305  int k2plot = k2 - 41;
5306  int kk2 = 25;
5307  if (k2plot > 0)
5308  kk2 = 56;
5309  int kkk = k2;
5310  if (k2plot > 0)
5311  kkk = k2 + 1;
5312  for (int k3 = 0; k3 < nphi; k3++) {
5313  if (mapRADDAM_HE[k1][k2][k3] != 0. && mapRADDAM_HE[2][kk2][k3] != 0) {
5314  mapRADDAM_HE[k1][k2][k3] /= mapRADDAM_HE[2][kk2][k3];
5315  int LLLLLL111111 = 0;
5316  if ((k1 == 0 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 30))
5317  LLLLLL111111 = 1;
5318  int LLLLLL222222 = 0;
5319  if ((k1 == 1 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 27) ||
5320  (k1 == 2 && fabs(kkk - 41) > 26 && fabs(kkk - 41) < 29))
5321  LLLLLL222222 = 1;
5322  if (LLLLLL111111 == 1) {
5323  h_sigLayer1RADDAM5_HE->Fill(double(kkk - 41), mapRADDAM_HE[k1][k2][k3]);
5324  h_sigLayer1RADDAM6_HE->Fill(double(kkk - 41), 1.);
5325  }
5326  if (LLLLLL222222 == 1) {
5327  h_sigLayer2RADDAM5_HE->Fill(double(kkk - 41), mapRADDAM_HE[k1][k2][k3]);
5328  h_sigLayer2RADDAM6_HE->Fill(double(kkk - 41), 1.);
5329  }
5330  } //if
5331  } //for
5332  } // if(k2!=25 && k2!=56
5333  } //for
5334  } //for
5335  //
5337  for (int k1 = 0; k1 < ndepth; k1++) {
5338  for (int k2 = 0; k2 < neta; k2++) {
5339  mapRADDAM_HED2[k1][k2] = 0.;
5340  mapRADDAM_HED20[k1][k2] = 0.;
5341  for (int k3 = 0; k3 < nphi; k3++) {
5342  mapRADDAM_HE[k1][k2][k3] = 0.;
5343  mapRADDAM0_HE[k1][k2][k3] = 0;
5344  } //for
5345  } //for
5346  } //for
5347 
5349  } // END TREATMENT : if(flagLaserRaddam_ == 1
5351 
5353  // // // // // // //sumamplitudes:
5354  int testcount1 = 0;
5355  int testcount2 = 0;
5356  int testcount3 = 0;
5358  for (int k0 = 0; k0 < nsub; k0++) {
5359  int sumofchannels = 0;
5360  double sumamplitudesubdet = 0.;
5361  int sumofchannels0 = 0;
5362  double sumamplitudesubdet0 = 0.;
5363  for (int k2 = 0; k2 < neta; k2++) {
5364  for (int k3 = 0; k3 < nphi; k3++) {
5365  if (amplitudechannel[k0][0][k2][k3] != 0. && amplitudechannel[k0][1][k2][k3] != 0.)
5366  testcount1++;
5367  if (amplitudechannel[k0][0][k2][k3] != 0. && amplitudechannel[k0][1][k2][k3] == 0.)
5368  testcount2++;
5369  if (amplitudechannel[k0][0][k2][k3] == 0. && amplitudechannel[k0][1][k2][k3] != 0.)
5370  testcount3++;
5371 
5372  // HB
5373  if (k0 == 0) {
5374  double sumamplitudechannel_HB = amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3];
5375  h_sumamplitudechannel_HB->Fill(sumamplitudechannel_HB);
5376  if (sumamplitudechannel_HB > 80.) {
5377  sumamplitudesubdet += sumamplitudechannel_HB;
5378  sumofchannels++;
5379  } else {
5380  if (sumamplitudechannel_HB > 0.) {
5381  sumamplitudesubdet0 += sumamplitudechannel_HB;
5382  sumofchannels0++;
5383  }
5384  }
5385  } //
5386 
5387  // HE
5388  if (k0 == 1) {
5389  double sumamplitudechannel_HE =
5390  amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3] + amplitudechannel[k0][2][k2][k3];
5391  h_sumamplitudechannel_HE->Fill(sumamplitudechannel_HE);
5392  if (sumamplitudechannel_HE > 200.) {
5393  sumamplitudesubdet += sumamplitudechannel_HE;
5394  sumofchannels++;
5395  } else {
5396  if (sumamplitudechannel_HE > 0.) {
5397  sumamplitudesubdet0 += sumamplitudechannel_HE;
5398  sumofchannels0++;
5399  }
5400  }
5401  } //
5402 
5403  // HO
5404  if (k0 == 2) {
5405  double sumamplitudechannel_HO = amplitudechannel[k0][3][k2][k3];
5406  h_sumamplitudechannel_HO->Fill(sumamplitudechannel_HO);
5407  if (sumamplitudechannel_HO > 1200.) {
5408  sumamplitudesubdet += sumamplitudechannel_HO;
5409  sumofchannels++;
5410  } else {
5411  if (sumamplitudechannel_HO > 0.) {
5412  sumamplitudesubdet0 += sumamplitudechannel_HO;
5413  sumofchannels0++;
5414  }
5415  }
5416  } //
5417  // HF
5418  if (k0 == 3) {
5419  double sumamplitudechannel_HF = amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3];
5420  h_sumamplitudechannel_HF->Fill(sumamplitudechannel_HF);
5421  if (sumamplitudechannel_HF > 600.) {
5422  sumamplitudesubdet += sumamplitudechannel_HF;
5423  sumofchannels++;
5424  } else {
5425  if (sumamplitudechannel_HF > 0.) {
5426  sumamplitudesubdet0 += sumamplitudechannel_HF;
5427  sumofchannels0++;
5428  }
5429  }
5430  } //
5431 
5432  } //k3
5433  } //k2
5434  // }//k1
5435  // SA of each sub-detector DONE. Then: summarize or find maximum throught events of LS
5436  if (k0 == 0) {
5437  h_eventamplitude_HB->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5438  h_eventoccupancy_HB->Fill((sumofchannels + sumofchannels0));
5439  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM1)
5440  maxxSUM1 = sumamplitudesubdet + sumamplitudesubdet0;
5441  if ((sumofchannels + sumofchannels0) > maxxOCCUP1)
5442  maxxOCCUP1 = sumofchannels + sumofchannels0;
5443  averSIGNALoccupancy_HB += sumofchannels;
5444  averSIGNALsumamplitude_HB += sumamplitudesubdet;
5445  averNOSIGNALoccupancy_HB += sumofchannels0;
5446  averNOSIGNALsumamplitude_HB += sumamplitudesubdet0;
5447  if ((sumamplitudesubdet + sumamplitudesubdet0) > 60000) {
5448  for (int k2 = 0; k2 < neta; k2++) {
5449  for (int k3 = 0; k3 < nphi; k3++) {
5450  int ieta = k2 - 41;
5452  if (amplitudechannel[k0][0][k2][k3] != 0.) {
5453  h_2DAtaildepth1_HB->Fill(double(ieta), double(k3), amplitudechannel[k0][0][k2][k3]);
5454  h_2D0Ataildepth1_HB->Fill(double(ieta), double(k3), 1.);
5455  }
5457  if (amplitudechannel[k0][1][k2][k3] != 0.) {
5458  h_2DAtaildepth2_HB->Fill(double(ieta), double(k3), amplitudechannel[k0][1][k2][k3]);
5459  h_2D0Ataildepth2_HB->Fill(double(ieta), double(k3), 1.);
5460  }
5461  } //for
5462  } //for
5463  } //>60000
5464  } //HB
5465  if (k0 == 1) {
5466  h_eventamplitude_HE->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5467  h_eventoccupancy_HE->Fill((sumofchannels + sumofchannels0));
5468  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM2)
5469  maxxSUM2 = sumamplitudesubdet + sumamplitudesubdet0;
5470  if ((sumofchannels + sumofchannels0) > maxxOCCUP2)
5471  maxxOCCUP2 = sumofchannels + sumofchannels0;
5472  averSIGNALoccupancy_HE += sumofchannels;
5473  averSIGNALsumamplitude_HE += sumamplitudesubdet;
5474  averNOSIGNALoccupancy_HE += sumofchannels0;
5475  averNOSIGNALsumamplitude_HE += sumamplitudesubdet0;
5476  } //HE
5477  if (k0 == 2) {
5478  h_eventamplitude_HO->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5479  h_eventoccupancy_HO->Fill((sumofchannels + sumofchannels0));
5480  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM3)
5481  maxxSUM3 = sumamplitudesubdet + sumamplitudesubdet0;
5482  if ((sumofchannels + sumofchannels0) > maxxOCCUP3)
5483  maxxOCCUP3 = sumofchannels + sumofchannels0;
5484  averSIGNALoccupancy_HO += sumofchannels;
5485  averSIGNALsumamplitude_HO += sumamplitudesubdet;
5486  averNOSIGNALoccupancy_HO += sumofchannels0;
5487  averNOSIGNALsumamplitude_HO += sumamplitudesubdet0;
5488  } //HO
5489  if (k0 == 3) {
5490  h_eventamplitude_HF->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5491  h_eventoccupancy_HF->Fill((sumofchannels + sumofchannels0));
5492  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM4)
5493  maxxSUM4 = sumamplitudesubdet + sumamplitudesubdet0;
5494  if ((sumofchannels + sumofchannels0) > maxxOCCUP4)
5495  maxxOCCUP4 = sumofchannels + sumofchannels0;
5496  averSIGNALoccupancy_HF += sumofchannels;
5497  averSIGNALsumamplitude_HF += sumamplitudesubdet;
5498  averNOSIGNALoccupancy_HF += sumofchannels0;
5499  averNOSIGNALsumamplitude_HF += sumamplitudesubdet0;
5500  } //HF
5501  } //k0
5502 
5506  int eeeeee;
5507  eeeeee = lscounterM1;
5508  if (flagtoaskrunsorls_ == 0)
5509  eeeeee = runcounter;
5510 
5512  for (int k0 = 0; k0 < nsub; k0++) {
5515  for (int k1 = 0; k1 < ndepth; k1++) {
5517  int nbadchannels = 0;
5518  for (int k2 = 0; k2 < neta; k2++) {
5519  for (int k3 = 0; k3 < nphi; k3++) {
5520  if (badchannels[k0][k1][k2][k3] != 0)
5521  ++nbadchannels;
5522  } //k3
5523  } //k2
5525  //HB
5526  if (k0 == 0) {
5527  if (k1 == 0) {
5528  h_nbadchannels_depth1_HB->Fill(float(nbadchannels));
5529  h_runnbadchannels_depth1_HB->Fill(float(eeeeee), float(nbadchannels));
5530  if (nbadchannels > lsdep_cut1_peak_HBdepth1_)
5531  h_runnbadchannelsC_depth1_HB->Fill(float(eeeeee), float(nbadchannels));
5532  if (nbadchannels != 0)
5533  h_runbadrate_depth1_HB->Fill(float(eeeeee), 1.);
5534  if (nbadchannels > lsdep_cut3_max_HBdepth1_)
5535  h_runbadrateC_depth1_HB->Fill(float(eeeeee), 1.);
5536  h_bcnnbadchannels_depth1_HB->Fill(float(bcn), float(nbadchannels));
5537  h_runbadrate0_depth1_HB->Fill(float(eeeeee), 1.);
5538  h_bcnbadrate0_depth1_HB->Fill(float(bcn), 1.);
5539  }
5540  if (k1 == 1) {
5541  h_nbadchannels_depth2_HB->Fill(float(nbadchannels));
5542  h_runnbadchannels_depth2_HB->Fill(float(eeeeee), float(nbadchannels));
5543  if (nbadchannels > lsdep_cut1_peak_HBdepth2_)
5544  h_runnbadchannelsC_depth2_HB->Fill(float(eeeeee), float(nbadchannels));
5545  if (nbadchannels != 0)
5546  h_runbadrate_depth2_HB->Fill(float(eeeeee), 1.);
5547  if (nbadchannels > lsdep_cut3_max_HBdepth2_)
5548  h_runbadrateC_depth2_HB->Fill(float(eeeeee), 1.);
5549  h_bcnnbadchannels_depth2_HB->Fill(float(bcn), float(nbadchannels));
5550  h_runbadrate0_depth2_HB->Fill(float(eeeeee), 1.);
5551  h_bcnbadrate0_depth2_HB->Fill(float(bcn), 1.);
5552  }
5553  }
5554  //HE
5555  if (k0 == 1) {
5556  if (k1 == 0) {
5557  h_nbadchannels_depth1_HE->Fill(float(nbadchannels));
5558  h_runnbadchannels_depth1_HE->Fill(float(eeeeee), float(nbadchannels));
5559  if (nbadchannels > lsdep_cut1_peak_HEdepth1_)
5560  h_runnbadchannelsC_depth1_HE->Fill(float(eeeeee), float(nbadchannels));
5561  if (nbadchannels != 0)
5562  h_runbadrate_depth1_HE->Fill(float(eeeeee), 1.);
5563  if (nbadchannels > lsdep_cut3_max_HEdepth1_)
5564  h_runbadrateC_depth1_HE->Fill(float(eeeeee), 1.);
5565  h_bcnnbadchannels_depth1_HE->Fill(float(bcn), float(nbadchannels));
5566  h_runbadrate0_depth1_HE->Fill(float(eeeeee), 1.);
5567  h_bcnbadrate0_depth1_HE->Fill(float(bcn), 1.);
5568  }
5569  if (k1 == 1) {
5570  h_nbadchannels_depth2_HE->Fill(float(nbadchannels));
5571  h_runnbadchannels_depth2_HE->Fill(float(eeeeee), float(nbadchannels));
5572  if (nbadchannels > lsdep_cut1_peak_HEdepth2_)
5573  h_runnbadchannelsC_depth2_HE->Fill(float(eeeeee), float(nbadchannels));
5574  if (nbadchannels != 0)
5575  h_runbadrate_depth2_HE->Fill(float(eeeeee), 1.);
5576  if (nbadchannels > lsdep_cut3_max_HEdepth2_)
5577  h_runbadrateC_depth2_HE->Fill(float(eeeeee), 1.);
5578  h_bcnnbadchannels_depth2_HE->Fill(float(bcn), float(nbadchannels));
5579  h_runbadrate0_depth2_HE->Fill(float(eeeeee), 1.);
5580  h_bcnbadrate0_depth2_HE->Fill(float(bcn), 1.);
5581  }
5582  if (k1 == 2) {
5583  h_nbadchannels_depth3_HE->Fill(float(nbadchannels));
5584  h_runnbadchannels_depth3_HE->Fill(float(eeeeee), float(nbadchannels));
5585  if (nbadchannels > lsdep_cut1_peak_HEdepth3_)
5586  h_runnbadchannelsC_depth3_HE->Fill(float(eeeeee), float(nbadchannels));
5587  if (nbadchannels != 0)
5588  h_runbadrate_depth3_HE->Fill(float(eeeeee), 1.);
5589  if (nbadchannels > lsdep_cut3_max_HEdepth3_)
5590  h_runbadrateC_depth3_HE->Fill(float(eeeeee), 1.);
5591  h_bcnnbadchannels_depth3_HE->Fill(float(bcn), float(nbadchannels));
5592  h_runbadrate0_depth3_HE->Fill(float(eeeeee), 1.);
5593  h_bcnbadrate0_depth3_HE->Fill(float(bcn), 1.);
5594  }
5595  }
5596  //HO
5597  if (k0 == 2) {
5598  if (k1 == 3) {
5599  h_nbadchannels_depth4_HO->Fill(float(nbadchannels));
5600  h_runnbadchannels_depth4_HO->Fill(float(eeeeee), float(nbadchannels));
5601  if (nbadchannels > lsdep_cut1_peak_HOdepth4_)
5602  h_runnbadchannelsC_depth4_HO->Fill(float(eeeeee), float(nbadchannels));
5603  if (nbadchannels != 0)
5604  h_runbadrate_depth4_HO->Fill(float(eeeeee), 1.);
5605  if (nbadchannels > lsdep_cut3_max_HOdepth4_)
5606  h_runbadrateC_depth4_HO->Fill(float(eeeeee), 1.);
5607  h_bcnnbadchannels_depth4_HO->Fill(float(bcn), float(nbadchannels));
5608  h_runbadrate0_depth4_HO->Fill(float(eeeeee), 1.);
5609  h_bcnbadrate0_depth4_HO->Fill(float(bcn), 1.);
5610  }
5611  }
5612  //HF
5613  if (k0 == 3) {
5614  if (k1 == 0) {
5615  h_nbadchannels_depth1_HF->Fill(float(nbadchannels));
5616  h_runnbadchannels_depth1_HF->Fill(float(eeeeee), float(nbadchannels));
5617  if (nbadchannels > lsdep_cut1_peak_HFdepth1_)
5618  h_runnbadchannelsC_depth1_HF->Fill(float(eeeeee), float(nbadchannels));
5619  if (nbadchannels != 0)
5620  h_runbadrate_depth1_HF->Fill(float(eeeeee), 1.);
5621  if (nbadchannels > lsdep_cut3_max_HFdepth1_)
5622  h_runbadrateC_depth1_HF->Fill(float(eeeeee), 1.);
5623  h_bcnnbadchannels_depth1_HF->Fill(float(bcn), float(nbadchannels));
5624  h_runbadrate0_depth1_HF->Fill(float(eeeeee), 1.);
5625  h_bcnbadrate0_depth1_HF->Fill(float(bcn), 1.);
5626  }
5627  if (k1 == 1) {
5628  h_nbadchannels_depth2_HF->Fill(float(nbadchannels));
5629  h_runnbadchannels_depth2_HF->Fill(float(eeeeee), float(nbadchannels));
5630  if (nbadchannels > lsdep_cut1_peak_HFdepth2_)
5631  h_runnbadchannelsC_depth2_HF->Fill(float(eeeeee), float(nbadchannels));
5632  if (nbadchannels != 0)
5633  h_runbadrate_depth2_HF->Fill(float(eeeeee), 1.);
5634  if (nbadchannels > lsdep_cut3_max_HFdepth2_)
5635  h_runbadrateC_depth2_HF->Fill(float(eeeeee), 1.);
5636  h_bcnnbadchannels_depth2_HF->Fill(float(bcn), float(nbadchannels));
5637  h_runbadrate0_depth2_HF->Fill(float(eeeeee), 1.);
5638  h_bcnbadrate0_depth2_HF->Fill(float(bcn), 1.);
5639  }
5640  }
5641 
5643  } //k1
5644  } //k0
5646  } //if(recordHistoes_&& studyRunDependenceHist_)
5647 
5650  iEvent.getByToken(tok_calib_, calib);
5651 
5652  bool gotCALIBDigis = true;
5653  if (!(iEvent.getByToken(tok_calib_, calib))) {
5654  gotCALIBDigis = false; //this is a boolean set up to check if there are CALIBgigis in input root file
5655  }
5656  if (!(calib.isValid())) {
5657  gotCALIBDigis = false; //if it is not there, leave it false
5658  }
5659  if (!gotCALIBDigis) {
5660  } else {
5661  for (HcalCalibDigiCollection::const_iterator digi = calib->begin(); digi != calib->end(); digi++) {
5662  int cal_det = digi->id().hcalSubdet(); // 1-HB,2-HE,3-HO,4-HF
5663  int cal_phi = digi->id().iphi();
5664  int cal_eta = digi->id().ieta();
5665  int cal_cbox = digi->id().cboxChannel();
5666 
5669  if (cal_det > 0 && cal_det < 5 && cal_cbox == 0) {
5670  int iphi = cal_phi - 1;
5671  int ieta = cal_eta;
5672  if (ieta > 0)
5673  ieta -= 1;
5674  nTS = digi->size();
5675  double max_signal = -100.;
5676  int ts_with_max_signal = -100;
5677  double timew = 0.;
5678 
5679  //
5680  if (nTS <= numOfTS)
5681  for (int i = 0; i < nTS; i++) {
5682  double ampldefault = adc2fC[digi->sample(i).adc() & 0xff];
5683  if (max_signal < ampldefault) {
5684  max_signal = ampldefault;
5685  ts_with_max_signal = i;
5686  }
5687  if (i > 1 && i < 6)
5688  calib3[cal_det - 1][ieta + 41][iphi] += ampldefault;
5689  calib0[cal_det - 1][ieta + 41][iphi] += ampldefault;
5690  timew += (i + 1) * ampldefault;
5691  } // for
5692  //
5693 
5694  double amplitude = calib0[cal_det - 1][ieta + 41][iphi];
5695  double aveamplitude = -100.;
5696  if (amplitude > 0 && timew > 0)
5697  aveamplitude = timew / amplitude; // average_TS +1
5698  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
5699  caliba[cal_det - 1][ieta + 41][iphi] = aveamplitude1;
5700 
5701  double rmsamp = 0.;
5702  for (int ii = 0; ii < nTS; ii++) {
5703  double ampldefault = adc2fC[digi->sample(ii).adc() & 0xff];
5704  double aaaaaa = (ii + 1) - aveamplitude;
5705  double aaaaaa2 = aaaaaa * aaaaaa;
5706  rmsamp += (aaaaaa2 * ampldefault); // fC
5707  } //for 2
5708  double rmsamplitude = -100.;
5709  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
5710  rmsamplitude = sqrt(rmsamp / amplitude);
5711  calibw[cal_det - 1][ieta + 41][iphi] = rmsamplitude;
5712  //
5713  calibt[cal_det - 1][ieta + 41][iphi] = ts_with_max_signal;
5714  //
5715 
5716  if (ts_with_max_signal > -1 && ts_with_max_signal < nTS)
5717  calib2[cal_det - 1][ieta + 41][iphi] = adc2fC[digi->sample(ts_with_max_signal).adc() & 0xff];
5718  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < nTS)
5719  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal + 1).adc() & 0xff];
5720  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < nTS)
5721  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal + 2).adc() & 0xff];
5722  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < nTS)
5723  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal - 1).adc() & 0xff];
5724  if (ts_with_max_signal - 2 > -1 && ts_with_max_signal - 2 < nTS)
5725  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal - 2).adc() & 0xff];
5726  //
5727  bool anycapid = true;
5728  bool anyer = false;
5729  bool anydv = true;
5730  int error1 = 0, error2 = 0, error3 = 0;
5731  int lastcapid = 0, capid = 0;
5732  for (int ii = 0; ii < (*digi).size(); ii++) {
5733  capid = (*digi)[ii].capid(); // capId (0-3, sequential)
5734  bool er = (*digi)[ii].er(); // error
5735  bool dv = (*digi)[ii].dv(); // valid data
5736  if (ii != 0 && ((lastcapid + 1) % 4) != capid)
5737  anycapid = false;
5738  lastcapid = capid;
5739  if (er)
5740  anyer = true;
5741  if (!dv)
5742  anydv = false;
5743  }
5744  if (!anycapid)
5745  error1 = 1;
5746  if (anyer)
5747  error2 = 1;
5748  if (!anydv)
5749  error3 = 1;
5750  if (error1 != 0 || error2 != 0 || error3 != 0)
5751  calibcapiderror[cal_det - 1][ieta + 41][iphi] = 100;
5752 
5753  } // if(cal_det>0 && cal_det<5
5754  } //if(recordHistoes_ && studyCalibCellsHist_)
5756 
5758  } //if(recordNtuples_) {
5759 
5760  } //for(HcalCalibDigiCollection
5761  } //if(calib.isValid(
5765  for (int k1 = 0; k1 < nsub; k1++) {
5766  for (int k2 = 0; k2 < neta; k2++) {
5767  for (int k3 = 0; k3 < nphi; k3++) {
5768  int k2plot = k2 - 41;
5769  if (flagcpuoptimization_ == 0) {
5771 
5772  if (signal[k1][k2][k3] > 0.) {
5773  if (k1 == 0) {
5774  h_FullSignal3D_HB->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5775  h_FullSignal3D0_HB->Fill(double(k2plot), double(k3), 1.);
5776  }
5777  if (k1 == 1) {
5778  h_FullSignal3D_HE->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5779  h_FullSignal3D0_HE->Fill(double(k2plot), double(k3), 1.);
5780  }
5781  if (k1 == 2) {
5782  h_FullSignal3D_HO->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5783  h_FullSignal3D0_HO->Fill(double(k2plot), double(k3), 1.);
5784  }
5785  if (k1 == 3) {
5786  h_FullSignal3D_HF->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5787  h_FullSignal3D0_HF->Fill(double(k2plot), double(k3), 1.);
5788  }
5789  }
5790 
5791  } // optimization
5793 
5795  // k2 = 0-81, k3= 0-71
5796  // return to real indexes in eta and phi ( k20 and k30)
5797  int k20 = k2 - 41; // k20 = -41 - 40
5798  if (k20 > 0 || k20 == 0)
5799  k20 += 1; // k20 = -41 - -1 and +1 - +41
5800  int k30 = k3 + 1; // k30= 1-nphi
5801 
5802  // find calibration indexes in eta and phi ( kk2 and kk3)
5803  int kk2 = 0, kk3 = 0;
5804  if (k1 == 0 || k1 == 1) {
5805  if (k20 > 0)
5806  kk2 = 1;
5807  else
5808  kk2 = -1;
5809  if (k30 == 71 || k30 == nphi || k30 == 1 || k30 == 2)
5810  kk3 = 71;
5811  else
5812  kk3 = ((k30 - 3) / 4) * 4 + 3;
5813  } else if (k1 == 2) {
5814  if (abs(k20) <= 4) {
5815  kk2 = 0;
5816  if (k30 == 71 || k30 == nphi || k30 == 1 || k30 == 2 || k30 == 3 || k30 == 4)
5817  kk3 = 71;
5818  else
5819  kk3 = ((k30 - 5) / 6) * 6 + 5;
5820  } else {
5821  if (abs(k20) > 4 && abs(k20) <= 10)
5822  kk2 = 1;
5823  if (abs(k20) > 10 && abs(k20) <= 15)
5824  kk2 = 2;
5825  if (k20 < 0)
5826  kk2 = -kk2;
5827  if (k30 == 71 || k30 == nphi || (k30 >= 1 && k30 <= 10))
5828  kk3 = 71;
5829  else
5830  kk3 = ((k30 - 11) / 12) * 12 + 11;
5831  }
5832  } else if (k1 == 3) {
5833  if (k20 > 0)
5834  kk2 = 1;
5835  else
5836  kk2 = -1;
5837  if (k30 >= 1 && k30 <= 18)
5838  kk3 = 1;
5839  if (k30 >= 19 && k30 <= 36)
5840  kk3 = 19;
5841  if (k30 >= 37 && k30 <= 54)
5842  kk3 = 37;
5843  if (k30 >= 55 && k30 <= nphi)
5844  kk3 = 55;
5845  }
5846  // return to indexes in massiv
5847  int kkk2 = kk2 + 41;
5848  if (kk2 > 0)
5849  kkk2 -= 1;
5850  int kkk3 = kk3;
5851  kkk3 -= 1;
5852 
5853  if (flagcpuoptimization_ == 0) {
5854  double GetRMSOverNormalizedSignal = -1.;
5855  if (signal[k1][k2][k3] > 0. && calib0[k1][kkk2][kkk3] > 0.) {
5856  GetRMSOverNormalizedSignal = signal[k1][k2][k3] / calib0[k1][kkk2][kkk3];
5857  if (k1 == 0) {
5858  h_mapGetRMSOverNormalizedSignal_HB->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5859  h_mapGetRMSOverNormalizedSignal0_HB->Fill(double(k2plot), double(k3), 1.);
5860  }
5861  if (k1 == 1) {
5862  h_mapGetRMSOverNormalizedSignal_HE->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5863  h_mapGetRMSOverNormalizedSignal0_HE->Fill(double(k2plot), double(k3), 1.);
5864  }
5865  if (k1 == 2) {
5866  h_mapGetRMSOverNormalizedSignal_HO->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5867  h_mapGetRMSOverNormalizedSignal0_HO->Fill(double(k2plot), double(k3), 1.);
5868  }
5869  if (k1 == 3) {
5870  h_mapGetRMSOverNormalizedSignal_HF->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5871  h_mapGetRMSOverNormalizedSignal0_HF->Fill(double(k2plot), double(k3), 1.);
5872  }
5873  }
5874  } //optimization
5876  if (signal[k1][k2][k3] > 0.) {
5877  // ADC
5878  double adc = 0.;
5879  if (calib0[k1][kkk2][kkk3] > 0.)
5880  adc = calib0[k1][kkk2][kkk3];
5881  // Ratio
5882  double ratio = 2.;
5883  if (calib0[k1][kkk2][kkk3] > 0.)
5884  ratio = calib2[k1][kkk2][kkk3] / calib0[k1][kkk2][kkk3];
5885  // TSmax
5886  float calibtsmax = calibt[k1][kkk2][kkk3];
5887  // TSmean
5888  float calibtsmean = caliba[k1][kkk2][kkk3];
5889  // Width
5890  float calibwidth = calibw[k1][kkk2][kkk3];
5891  // CapIdErrors
5892  float calibcap = -100.;
5893  calibcap = calibcapiderror[k1][kkk2][kkk3];
5894 
5895  // HB:
5896  if (k1 == 0) {
5897  // ADC
5898  h_ADCCalib_HB->Fill(adc, 1.);
5899  h_ADCCalib1_HB->Fill(adc, 1.);
5900  if (adc < calibrADCHBMin_ || adc > calibrADCHBMax_)
5901  h_mapADCCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5902  h_mapADCCalib_HB->Fill(double(k2plot), double(k3), adc);
5903  // Ratio
5904  h_RatioCalib_HB->Fill(ratio, 1.);
5905  if (ratio < calibrRatioHBMin_ || ratio > calibrRatioHBMax_)
5906  h_mapRatioCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5907  h_mapRatioCalib_HB->Fill(double(k2plot), double(k3), ratio);
5908  // TSmax
5909  if (calibtsmax > -0.5) {
5910  h_TSmaxCalib_HB->Fill(calibtsmax, 1.);
5911  if (calibtsmax < calibrTSmaxHBMin_ || calibtsmax > calibrTSmaxHBMax_)
5912  h_mapTSmaxCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5913  h_mapTSmaxCalib_HB->Fill(double(k2plot), double(k3), calibtsmax);
5914  }
5915  // TSmean
5916  if (calibtsmean > -0.5) {
5917  h_TSmeanCalib_HB->Fill(calibtsmean, 1.);
5918  if (calibtsmean < calibrTSmeanHBMin_ || calibtsmean > calibrTSmeanHBMax_)
5919  h_mapTSmeanCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5920  h_mapTSmeanCalib_HB->Fill(double(k2plot), double(k3), calibtsmean);
5921  }
5922  // Width
5923  if (calibwidth > -0.5) {
5924  h_WidthCalib_HB->Fill(calibwidth, 1.);
5925  if (calibwidth < calibrWidthHBMin_ || calibwidth > calibrWidthHBMax_)
5926  h_mapWidthCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5927  h_mapWidthCalib_HB->Fill(double(k2plot), double(k3), calibwidth);
5928  }
5929  // CapIdErrors
5930  if (calibcap > 0)
5931  h_mapCapCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5932  //
5933  h_map_HB->Fill(double(k2plot), double(k3), 1.);
5934  }
5935  // HE:
5936  if (k1 == 1) {
5937  // ADC
5938  h_ADCCalib_HE->Fill(adc, 1.);
5939  h_ADCCalib1_HE->Fill(adc, 1.);
5940  if (adc < calibrADCHEMin_ || adc > calibrADCHEMax_)
5941  h_mapADCCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5942  h_mapADCCalib_HE->Fill(double(k2plot), double(k3), adc);
5943  // Ratio
5944  h_RatioCalib_HE->Fill(ratio, 1.);
5945  if (ratio < calibrRatioHEMin_ || ratio > calibrRatioHEMax_)
5946  h_mapRatioCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5947  h_mapRatioCalib_HE->Fill(double(k2plot), double(k3), ratio);
5948  // TSmax
5949  if (calibtsmax > -0.5) {
5950  h_TSmaxCalib_HE->Fill(calibtsmax, 1.);
5951  if (calibtsmax < calibrTSmaxHEMin_ || calibtsmax > calibrTSmaxHEMax_)
5952  h_mapTSmaxCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5953  h_mapTSmaxCalib_HE->Fill(double(k2plot), double(k3), calibtsmax);
5954  }
5955  // TSmean
5956  if (calibtsmean > -0.5) {
5957  h_TSmeanCalib_HE->Fill(calibtsmean, 1.);
5958  if (calibtsmean < calibrTSmeanHEMin_ || calibtsmean > calibrTSmeanHEMax_)
5959  h_mapTSmeanCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5960  h_mapTSmeanCalib_HE->Fill(double(k2plot), double(k3), calibtsmean);
5961  }
5962  // Width
5963  if (calibwidth > -0.5) {
5964  h_WidthCalib_HE->Fill(calibwidth, 1.);
5965  if (calibwidth < calibrWidthHEMin_ || calibwidth > calibrWidthHEMax_)
5966  h_mapWidthCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5967  h_mapWidthCalib_HE->Fill(double(k2plot), double(k3), calibwidth);
5968  }
5969  // CapIdErrors
5970  if (calibcap > 0)
5971  h_mapCapCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5972  //
5973  h_map_HE->Fill(double(k2plot), double(k3), 1.);
5974  }
5975  // HO:
5976  if (k1 == 2) {
5977  // ADC
5978  h_ADCCalib_HO->Fill(adc, 1.);
5979  h_ADCCalib1_HO->Fill(adc, 1.);
5980  if (adc < calibrADCHOMin_ || adc > calibrADCHOMax_)
5981  h_mapADCCalib047_HO->Fill(double(k2plot), double(k3), 1.);
5982  h_mapADCCalib_HO->Fill(double(k2plot), double(k3), adc);
5983  // Ratio
5984  h_RatioCalib_HO->Fill(ratio, 1.);
5985  if (ratio < calibrRatioHOMin_ || ratio > calibrRatioHOMax_)
5986  h_mapRatioCalib047_HO->Fill(double(k2plot), double(k3), 1.);
5987  h_mapRatioCalib_HO->Fill(double(k2plot), double(k3), ratio);
5988  // TSmax
5989  if (calibtsmax > -0.5) {
5990  h_TSmaxCalib_HO->Fill(calibtsmax, 1.);
5991  if (calibtsmax < calibrTSmaxHOMin_ || calibtsmax > calibrTSmaxHOMax_)
5992  h_mapTSmaxCalib047_HO->Fill(double(k2plot), double(k3), 1.);
5993  h_mapTSmaxCalib_HO->Fill(double(k2plot), double(k3), calibtsmax);
5994  }
5995  // TSmean
5996  if (calibtsmean > -0.5) {
5997  h_TSmeanCalib_HO->Fill(calibtsmean, 1.);
5998  if (calibtsmean < calibrTSmeanHOMin_ || calibtsmean > calibrTSmeanHOMax_)
5999  h_mapTSmeanCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6000  h_mapTSmeanCalib_HO->Fill(double(k2plot), double(k3), calibtsmean);
6001  }
6002  // Width
6003  if (calibwidth > -0.5) {
6004  h_WidthCalib_HO->Fill(calibwidth, 1.);
6005  if (calibwidth < calibrWidthHOMin_ || calibwidth > calibrWidthHOMax_)
6006  h_mapWidthCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6007  h_mapWidthCalib_HO->Fill(double(k2plot), double(k3), calibwidth);
6008  }
6009  // CapIdErrors
6010  if (calibcap > 0)
6011  h_mapCapCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6012  //
6013  h_map_HO->Fill(double(k2plot), double(k3), 1.);
6014  }
6015  // HF:
6016  if (k1 == 3) {
6017  // ADC
6018  h_ADCCalib_HF->Fill(adc, 1.);
6019  h_ADCCalib1_HF->Fill(adc, 1.);
6020  if (adc < calibrADCHFMin_ || adc > calibrADCHFMax_)
6021  h_mapADCCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6022  h_mapADCCalib_HF->Fill(double(k2plot), double(k3), adc);
6023  // Ratio
6024  h_RatioCalib_HF->Fill(ratio, 1.);
6025  if (ratio < calibrRatioHFMin_ || ratio > calibrRatioHFMax_)
6026  h_mapRatioCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6027  h_mapRatioCalib_HF->Fill(double(k2plot), double(k3), ratio);
6028  // TSmax
6029  if (calibtsmax > -0.5) {
6030  h_TSmaxCalib_HF->Fill(calibtsmax, 1.);
6031  if (calibtsmax < calibrTSmaxHFMin_ || calibtsmax > calibrTSmaxHFMax_)
6032  h_mapTSmaxCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6033  h_mapTSmaxCalib_HF->Fill(double(k2plot), double(k3), calibtsmax);
6034  }
6035  // TSmean
6036  if (calibtsmean > -0.5) {
6037  h_TSmeanCalib_HF->Fill(calibtsmean, 1.);
6038  if (calibtsmean < calibrTSmeanHFMin_ || calibtsmean > calibrTSmeanHFMax_)
6039  h_mapTSmeanCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6040  h_mapTSmeanCalib_HF->Fill(double(k2plot), double(k3), calibtsmean);
6041  }
6042  // Width
6043  if (calibwidth > -0.5) {
6044  h_WidthCalib_HF->Fill(calibwidth, 1.);
6045  if (calibwidth < calibrWidthHFMin_ || calibwidth > calibrWidthHFMax_)
6046  h_mapWidthCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6047  h_mapWidthCalib_HF->Fill(double(k2plot), double(k3), calibwidth);
6048  }
6049  // CapIdErrors
6050  if (calibcap > 0)
6051  h_mapCapCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6052  //
6053  h_map_HF->Fill(double(k2plot), double(k3), 1.);
6054  }
6056  } // if(signal[k1][k2][k3]>0.)
6058  } // k3
6059  } // k2
6060  } // k1
6061 
6063 
6064  } //if(recordHistoes_&& studyCalibCellsHist_)
6065 
6068  myTree->Fill();
6069  // if(recordNtuples_ && nevent < maxNeventsInNtuple_) myTree->Fill();
6070 
6072  if (++local_event % 100 == 0) {
6073  if (verbosity == -22)
6074  std::cout << "run " << Run << " processing events " << local_event << " ok, "
6075  << ", lumi " << lumi << ", numOfLaserEv " << numOfLaserEv << std::endl;
6076  }
6077  } // bcn
6078 
6079  //EndAnalyzer
6080 }
6081 
6082 // ------------ method called once each job just before starting event loop -----------
6084  if (verbosity > 0)
6085  std::cout << "======================== beignJob START +++++++++++++++++++++++++++" << std::endl;
6086  nnnnnn = 0;
6087  nnnnnnhbhe = 0;
6088  nnnnnnhbheqie11 = 0;
6089  nevent = 0;
6090  nevent50 = 0;
6091  counterhf = 0;
6092  counterhfqie10 = 0;
6093  counterho = 0;
6094  nnnnnn1 = 0;
6095  nnnnnn2 = 0;
6096  nnnnnn3 = 0;
6097  nnnnnn4 = 0;
6098  nnnnnn5 = 0;
6099  nnnnnn6 = 0;
6101 
6102  if (recordHistoes_) {
6103  // ha2 = fs_->make<TH2F>("ha2"," ", neta, -41., 41., nphi, 0., bphi);
6104 
6105  h_errorGeneral = fs_->make<TH1F>("h_errorGeneral", " ", 5, 0., 5.);
6106  h_error1 = fs_->make<TH1F>("h_error1", " ", 5, 0., 5.);
6107  h_error2 = fs_->make<TH1F>("h_error2", " ", 5, 0., 5.);
6108  h_error3 = fs_->make<TH1F>("h_error3", " ", 5, 0., 5.);
6109  h_amplError = fs_->make<TH1F>("h_amplError", " ", 100, -2., 98.);
6110  h_amplFine = fs_->make<TH1F>("h_amplFine", " ", 100, -2., 98.);
6111 
6112  h_errorGeneral_HB = fs_->make<TH1F>("h_errorGeneral_HB", " ", 5, 0., 5.);
6113  h_error1_HB = fs_->make<TH1F>("h_error1_HB", " ", 5, 0., 5.);
6114  h_error2_HB = fs_->make<TH1F>("h_error2_HB", " ", 5, 0., 5.);
6115  h_error3_HB = fs_->make<TH1F>("h_error3_HB", " ", 5, 0., 5.);
6116  h_error4_HB = fs_->make<TH1F>("h_error4_HB", " ", 5, 0., 5.);
6117  h_error5_HB = fs_->make<TH1F>("h_error5_HB", " ", 5, 0., 5.);
6118  h_error6_HB = fs_->make<TH1F>("h_error6_HB", " ", 5, 0., 5.);
6119  h_error7_HB = fs_->make<TH1F>("h_error7_HB", " ", 5, 0., 5.);
6120  h_amplError_HB = fs_->make<TH1F>("h_amplError_HB", " ", 100, -2., 98.);
6121  h_amplFine_HB = fs_->make<TH1F>("h_amplFine_HB", " ", 100, -2., 98.);
6122  h_mapDepth1Error_HB = fs_->make<TH2F>("h_mapDepth1Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6123  h_mapDepth2Error_HB = fs_->make<TH2F>("h_mapDepth2Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6124  h_mapDepth3Error_HB = fs_->make<TH2F>("h_mapDepth3Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6125  h_mapDepth4Error_HB = fs_->make<TH2F>("h_mapDepth4Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6126  h_fiber0_HB = fs_->make<TH1F>("h_fiber0_HB", " ", 10, 0., 10.);
6127  h_fiber1_HB = fs_->make<TH1F>("h_fiber1_HB", " ", 10, 0., 10.);
6128  h_fiber2_HB = fs_->make<TH1F>("h_fiber2_HB", " ", 40, 0., 40.);
6129  h_repetedcapid_HB = fs_->make<TH1F>("h_repetedcapid_HB", " ", 5, 0., 5.);
6130 
6131  h_errorGeneral_HE = fs_->make<TH1F>("h_errorGeneral_HE", " ", 5, 0., 5.);
6132  h_error1_HE = fs_->make<TH1F>("h_error1_HE", " ", 5, 0., 5.);
6133  h_error2_HE = fs_->make<TH1F>("h_error2_HE", " ", 5, 0., 5.);
6134  h_error3_HE = fs_->make<TH1F>("h_error3_HE", " ", 5, 0., 5.);
6135  h_error4_HE = fs_->make<TH1F>("h_error4_HE", " ", 5, 0., 5.);
6136  h_error5_HE = fs_->make<TH1F>("h_error5_HE", " ", 5, 0., 5.);
6137  h_error6_HE = fs_->make<TH1F>("h_error6_HE", " ", 5, 0., 5.);
6138  h_error7_HE = fs_->make<TH1F>("h_error7_HE", " ", 5, 0., 5.);
6139  h_amplError_HE = fs_->make<TH1F>("h_amplError_HE", " ", 100, -2., 98.);
6140  h_amplFine_HE = fs_->make<TH1F>("h_amplFine_HE", " ", 100, -2., 98.);
6141  h_mapDepth1Error_HE = fs_->make<TH2F>("h_mapDepth1Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6142  h_mapDepth2Error_HE = fs_->make<TH2F>("h_mapDepth2Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6143  h_mapDepth3Error_HE = fs_->make<TH2F>("h_mapDepth3Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6144  h_mapDepth4Error_HE = fs_->make<TH2F>("h_mapDepth4Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6145  h_mapDepth5Error_HE = fs_->make<TH2F>("h_mapDepth5Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6146  h_mapDepth6Error_HE = fs_->make<TH2F>("h_mapDepth6Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6147  h_mapDepth7Error_HE = fs_->make<TH2F>("h_mapDepth7Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6148  h_fiber0_HE = fs_->make<TH1F>("h_fiber0_HE", " ", 10, 0., 10.);
6149  h_fiber1_HE = fs_->make<TH1F>("h_fiber1_HE", " ", 10, 0., 10.);
6150  h_fiber2_HE = fs_->make<TH1F>("h_fiber2_HE", " ", 40, 0., 40.);
6151  h_repetedcapid_HE = fs_->make<TH1F>("h_repetedcapid_HE", " ", 5, 0., 5.);
6152 
6153  h_errorGeneral_HF = fs_->make<TH1F>("h_errorGeneral_HF", " ", 5, 0., 5.);
6154  h_error1_HF = fs_->make<TH1F>("h_error1_HF", " ", 5, 0., 5.);
6155  h_error2_HF = fs_->make<TH1F>("h_error2_HF", " ", 5, 0., 5.);
6156  h_error3_HF = fs_->make<TH1F>("h_error3_HF", " ", 5, 0., 5.);
6157  h_error4_HF = fs_->make<TH1F>("h_error4_HF", " ", 5, 0., 5.);
6158  h_error5_HF = fs_->make<TH1F>("h_error5_HF", " ", 5, 0., 5.);
6159  h_error6_HF = fs_->make<TH1F>("h_error6_HF", " ", 5, 0., 5.);
6160  h_error7_HF = fs_->make<TH1F>("h_error7_HF", " ", 5, 0., 5.);
6161  h_amplError_HF = fs_->make<TH1F>("h_amplError_HF", " ", 100, -2., 98.);
6162  h_amplFine_HF = fs_->make<TH1F>("h_amplFine_HF", " ", 100, -2., 98.);
6163  h_mapDepth1Error_HF = fs_->make<TH2F>("h_mapDepth1Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6164  h_mapDepth2Error_HF = fs_->make<TH2F>("h_mapDepth2Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6165  h_mapDepth3Error_HF = fs_->make<TH2F>("h_mapDepth3Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6166  h_mapDepth4Error_HF = fs_->make<TH2F>("h_mapDepth4Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6167  h_fiber0_HF = fs_->make<TH1F>("h_fiber0_HF", " ", 10, 0., 10.);
6168  h_fiber1_HF = fs_->make<TH1F>("h_fiber1_HF", " ", 10, 0., 10.);
6169  h_fiber2_HF = fs_->make<TH1F>("h_fiber2_HF", " ", 40, 0., 40.);
6170  h_repetedcapid_HF = fs_->make<TH1F>("h_repetedcapid_HF", " ", 5, 0., 5.);
6171 
6172  h_errorGeneral_HO = fs_->make<TH1F>("h_errorGeneral_HO", " ", 5, 0., 5.);
6173  h_error1_HO = fs_->make<TH1F>("h_error1_HO", " ", 5, 0., 5.);
6174  h_error2_HO = fs_->make<TH1F>("h_error2_HO", " ", 5, 0., 5.);
6175  h_error3_HO = fs_->make<TH1F>("h_error3_HO", " ", 5, 0., 5.);
6176  h_error4_HO = fs_->make<TH1F>("h_error4_HO", " ", 5, 0., 5.);
6177  h_error5_HO = fs_->make<TH1F>("h_error5_HO", " ", 5, 0., 5.);
6178  h_error6_HO = fs_->make<TH1F>("h_error6_HO", " ", 5, 0., 5.);
6179  h_error7_HO = fs_->make<TH1F>("h_error7_HO", " ", 5, 0., 5.);
6180  h_amplError_HO = fs_->make<TH1F>("h_amplError_HO", " ", 100, -2., 98.);
6181  h_amplFine_HO = fs_->make<TH1F>("h_amplFine_HO", " ", 100, -2., 98.);
6182  h_mapDepth4Error_HO = fs_->make<TH2F>("h_mapDepth4Error_HO", " ", neta, -41., 41., nphi, 0., bphi);
6183  h_fiber0_HO = fs_->make<TH1F>("h_fiber0_HO", " ", 10, 0., 10.);
6184  h_fiber1_HO = fs_->make<TH1F>("h_fiber1_HO", " ", 10, 0., 10.);
6185  h_fiber2_HO = fs_->make<TH1F>("h_fiber2_HO", " ", 40, 0., 40.);
6186  h_repetedcapid_HO = fs_->make<TH1F>("h_repetedcapid_HO", " ", 5, 0., 5.);
6187 
6189 
6190  h_numberofhitsHBtest = fs_->make<TH1F>("h_numberofhitsHBtest", " ", 100, 0., 100.);
6191  h_AmplitudeHBtest = fs_->make<TH1F>("h_AmplitudeHBtest", " ", 100, 0., 10000.);
6192  h_AmplitudeHBtest1 = fs_->make<TH1F>("h_AmplitudeHBtest1", " ", 100, 0., 1000000.);
6193  h_AmplitudeHBtest6 = fs_->make<TH1F>("h_AmplitudeHBtest6", " ", 100, 0., 2000000.);
6194  h_totalAmplitudeHB = fs_->make<TH1F>("h_totalAmplitudeHB", " ", 100, 0., 3000000.);
6195  h_totalAmplitudeHBperEvent = fs_->make<TH1F>("h_totalAmplitudeHBperEvent", " ", 1000, 1., 1001.);
6196  // fullAmplitude:
6197  h_ADCAmpl345Zoom_HB = fs_->make<TH1F>("h_ADCAmpl345Zoom_HB", " ", 100, 0., 400.);
6198  h_ADCAmpl345Zoom1_HB = fs_->make<TH1F>("h_ADCAmpl345Zoom1_HB", " ", 100, 0., 100.);
6199  h_ADCAmpl345_HB = fs_->make<TH1F>("h_ADCAmpl345_HB", " ", 100, 10., 3000.);
6200 
6201  h_AmplitudeHBrest = fs_->make<TH1F>("h_AmplitudeHBrest", " ", 100, 0., 10000.);
6202  h_AmplitudeHBrest1 = fs_->make<TH1F>("h_AmplitudeHBrest1", " ", 100, 0., 1000000.);
6203  h_AmplitudeHBrest6 = fs_->make<TH1F>("h_AmplitudeHBrest6", " ", 100, 0., 2000000.);
6204 
6205  h_ADCAmpl345_HBCapIdError = fs_->make<TH1F>("h_ADCAmpl345_HBCapIdError", " ", 100, 10., 3000.);
6206  h_ADCAmpl345_HBCapIdNoError = fs_->make<TH1F>("h_ADCAmpl345_HBCapIdNoError", " ", 100, 10., 3000.);
6207  h_ADCAmpl_HBCapIdError = fs_->make<TH1F>("h_ADCAmpl_HBCapIdError", " ", 100, 10., 3000.);
6208  h_ADCAmpl_HBCapIdNoError = fs_->make<TH1F>("h_ADCAmpl_HBCapIdNoError", " ", 100, 10., 3000.);
6209 
6210  h_ADCAmplZoom_HB = fs_->make<TH1F>("h_ADCAmplZoom_HB", " ", 100, 0., 400.);
6211  h_ADCAmplZoom1_HB = fs_->make<TH1F>("h_ADCAmplZoom1_HB", " ", 100, -20., 80.);
6212  h_ADCAmpl_HB = fs_->make<TH1F>("h_ADCAmpl_HB", " ", 100, 10., 5000.);
6213  h_mapDepth1ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6214  h_mapDepth2ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6215  h_mapDepth3ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6216  h_mapDepth4ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6218  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6220  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6222  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6224  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6225  h_mapDepth1ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6226  h_mapDepth2ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6227  h_mapDepth3ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6228  h_mapDepth4ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6229  h_TSmeanA_HB = fs_->make<TH1F>("h_TSmeanA_HB", " ", 100, -1., 11.);
6230  h_mapDepth1TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6231  h_mapDepth2TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6232  h_mapDepth3TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6233  h_mapDepth4TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6234  h_mapDepth1TSmeanA_HB = fs_->make<TH2F>("h_mapDepth1TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6235  h_mapDepth2TSmeanA_HB = fs_->make<TH2F>("h_mapDepth2TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6236  h_mapDepth3TSmeanA_HB = fs_->make<TH2F>("h_mapDepth3TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6237  h_mapDepth4TSmeanA_HB = fs_->make<TH2F>("h_mapDepth4TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6238  h_TSmaxA_HB = fs_->make<TH1F>("h_TSmaxA_HB", " ", 100, -1., 11.);
6239  h_mapDepth1TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6240  h_mapDepth2TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6241  h_mapDepth3TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6242  h_mapDepth4TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6243  h_mapDepth1TSmaxA_HB = fs_->make<TH2F>("h_mapDepth1TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6244  h_mapDepth2TSmaxA_HB = fs_->make<TH2F>("h_mapDepth2TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6245  h_mapDepth3TSmaxA_HB = fs_->make<TH2F>("h_mapDepth3TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6246  h_mapDepth4TSmaxA_HB = fs_->make<TH2F>("h_mapDepth4TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6247  // RMS:
6248  h_Amplitude_HB = fs_->make<TH1F>("h_Amplitude_HB", " ", 100, 0., 5.);
6249  h_mapDepth1Amplitude225_HB = fs_->make<TH2F>("h_mapDepth1Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6250  h_mapDepth2Amplitude225_HB = fs_->make<TH2F>("h_mapDepth2Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6251  h_mapDepth3Amplitude225_HB = fs_->make<TH2F>("h_mapDepth3Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6252  h_mapDepth4Amplitude225_HB = fs_->make<TH2F>("h_mapDepth4Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6253  h_mapDepth1Amplitude_HB = fs_->make<TH2F>("h_mapDepth1Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6254  h_mapDepth2Amplitude_HB = fs_->make<TH2F>("h_mapDepth2Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6255  h_mapDepth3Amplitude_HB = fs_->make<TH2F>("h_mapDepth3Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6256  h_mapDepth4Amplitude_HB = fs_->make<TH2F>("h_mapDepth4Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6257  // Ratio:
6258  h_Ampl_HB = fs_->make<TH1F>("h_Ampl_HB", " ", 100, 0., 1.1);
6259  h_mapDepth1Ampl047_HB = fs_->make<TH2F>("h_mapDepth1Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6260  h_mapDepth2Ampl047_HB = fs_->make<TH2F>("h_mapDepth2Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6261  h_mapDepth3Ampl047_HB = fs_->make<TH2F>("h_mapDepth3Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6262  h_mapDepth4Ampl047_HB = fs_->make<TH2F>("h_mapDepth4Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6263  h_mapDepth1Ampl_HB = fs_->make<TH2F>("h_mapDepth1Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6264  h_mapDepth2Ampl_HB = fs_->make<TH2F>("h_mapDepth2Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6265  h_mapDepth3Ampl_HB = fs_->make<TH2F>("h_mapDepth3Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6266  h_mapDepth4Ampl_HB = fs_->make<TH2F>("h_mapDepth4Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6267  h_mapDepth1AmplE34_HB = fs_->make<TH2F>("h_mapDepth1AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6268  h_mapDepth2AmplE34_HB = fs_->make<TH2F>("h_mapDepth2AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6269  h_mapDepth3AmplE34_HB = fs_->make<TH2F>("h_mapDepth3AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6270  h_mapDepth4AmplE34_HB = fs_->make<TH2F>("h_mapDepth4AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6271  h_mapDepth1_HB = fs_->make<TH2F>("h_mapDepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
6272  h_mapDepth2_HB = fs_->make<TH2F>("h_mapDepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6273  h_mapDepth3_HB = fs_->make<TH2F>("h_mapDepth3_HB", " ", neta, -41., 41., nphi, 0., bphi);
6274  h_mapDepth4_HB = fs_->make<TH2F>("h_mapDepth4_HB", " ", neta, -41., 41., nphi, 0., bphi);
6275 
6276  h_mapDepth1TS2_HB = fs_->make<TH2F>("h_mapDepth1TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6277  h_mapDepth2TS2_HB = fs_->make<TH2F>("h_mapDepth2TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6278  h_mapDepth3TS2_HB = fs_->make<TH2F>("h_mapDepth3TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6279  h_mapDepth4TS2_HB = fs_->make<TH2F>("h_mapDepth4TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6280  h_mapDepth1TS2_HE = fs_->make<TH2F>("h_mapDepth1TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6281  h_mapDepth2TS2_HE = fs_->make<TH2F>("h_mapDepth2TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6282  h_mapDepth3TS2_HE = fs_->make<TH2F>("h_mapDepth3TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6283  h_mapDepth4TS2_HE = fs_->make<TH2F>("h_mapDepth4TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6284  h_mapDepth5TS2_HE = fs_->make<TH2F>("h_mapDepth5TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6285  h_mapDepth6TS2_HE = fs_->make<TH2F>("h_mapDepth6TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6286  h_mapDepth7TS2_HE = fs_->make<TH2F>("h_mapDepth7TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6287  h_recSignalEnergy0_HF3 = fs_->make<TH2F>("h_recSignalEnergy0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6288  h_recSignalEnergy1_HF3 = fs_->make<TH2F>("h_recSignalEnergy1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6289  h_recSignalEnergy2_HF3 = fs_->make<TH2F>("h_recSignalEnergy2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6290  h_recSignalEnergy0_HF4 = fs_->make<TH2F>("h_recSignalEnergy0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6291  h_recSignalEnergy1_HF4 = fs_->make<TH2F>("h_recSignalEnergy1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6292  h_recSignalEnergy2_HF4 = fs_->make<TH2F>("h_recSignalEnergy2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6293  h_recNoiseEnergy0_HF3 = fs_->make<TH2F>("h_recNoiseEnergy0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6294  h_recNoiseEnergy1_HF3 = fs_->make<TH2F>("h_recNoiseEnergy1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6295  h_recNoiseEnergy2_HF3 = fs_->make<TH2F>("h_recNoiseEnergy2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6296  h_recNoiseEnergy0_HF4 = fs_->make<TH2F>("h_recNoiseEnergy0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6297  h_recNoiseEnergy1_HF4 = fs_->make<TH2F>("h_recNoiseEnergy1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6298  h_recNoiseEnergy2_HF4 = fs_->make<TH2F>("h_recNoiseEnergy2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6299  h_mapDepth1TS1_HF = fs_->make<TH2F>("h_mapDepth1TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6300  h_mapDepth2TS1_HF = fs_->make<TH2F>("h_mapDepth2TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6301  h_mapDepth3TS1_HF = fs_->make<TH2F>("h_mapDepth3TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6302  h_mapDepth4TS1_HF = fs_->make<TH2F>("h_mapDepth4TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6303  h_mapDepth4TS012_HO = fs_->make<TH2F>("h_mapDepth4TS012_HO", " ", neta, -41., 41., nphi, 0., bphi);
6304 
6306 
6307  // stuff regarding summed(total) Amplitude vs iEvent (histo-name is h_totalAmplitudeHEperEvent)
6308  // to see from which event ALL channels are available(related to quality of the run)
6309  h_numberofhitsHEtest = fs_->make<TH1F>("h_numberofhitsHEtest", " ", 100, 0., 10000.);
6310  h_AmplitudeHEtest = fs_->make<TH1F>("h_AmplitudeHEtest", " ", 100, 0., 1000000.);
6311  h_AmplitudeHEtest1 = fs_->make<TH1F>("h_AmplitudeHEtest1", " ", 100, 0., 1000000.);
6312  h_AmplitudeHEtest6 = fs_->make<TH1F>("h_AmplitudeHEtest6", " ", 100, 0., 2000000.);
6313  h_totalAmplitudeHE = fs_->make<TH1F>("h_totalAmplitudeHE", " ", 100, 0., 10000000000.);
6314  h_totalAmplitudeHEperEvent = fs_->make<TH1F>("h_totalAmplitudeHEperEvent", " ", 1000, 1., 1001.);
6315 
6316  // Aijk Amplitude:
6317  h_ADCAmplZoom1_HE = fs_->make<TH1F>("h_ADCAmplZoom1_HE", " ", npfit, 0., anpfit); // for amplmaxts 1TS w/ max
6318  h_ADCAmpl345Zoom1_HE = fs_->make<TH1F>("h_ADCAmpl345Zoom1_HE", " ", npfit, 0., anpfit); // for ampl3ts 3TSs
6319  h_ADCAmpl345Zoom_HE = fs_->make<TH1F>("h_ADCAmpl345Zoom_HE", " ", npfit, 0., anpfit); // for ampl 4TSs
6321  fs_->make<TH1F>("h_amplitudeaveragedbydepthes_HE", " ", npfit, 0., anpfit); // for cross-check: A spectrum
6323  fs_->make<TH1F>("h_ndepthesperamplitudebins_HE", " ", 10, 0., 10.); // for cross-check: ndepthes
6324 
6325  // Ampl12 4TSs to work with "ped-Gsel0" or "led-low-intensity" to clarify gain diff peak2-peak1
6327  fs_->make<TH2F>("h_mapADCAmplfirstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6329  fs_->make<TH2F>("h_mapADCAmplfirstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6331  fs_->make<TH2F>("h_mapADCAmplsecondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6333  "h_mapADCAmplsecondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6334 
6336  fs_->make<TH2F>("h_mapADCAmpl11firstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6338  fs_->make<TH2F>("h_mapADCAmpl11firstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6340  fs_->make<TH2F>("h_mapADCAmpl11secondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6342  fs_->make<TH2F>("h_mapADCAmpl11secondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6343 
6345  fs_->make<TH2F>("h_mapADCAmpl12firstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6347  fs_->make<TH2F>("h_mapADCAmpl12firstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6349  fs_->make<TH2F>("h_mapADCAmpl12secondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6351  fs_->make<TH2F>("h_mapADCAmpl12secondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6352 
6353  // Ampl12 4TSs to work with "ped-Gsel0" or "led-low-intensity" to clarify gain diff peak2-peak1 fit results:
6354  h_gsmdifferencefit1_HE = fs_->make<TH1F>("h_gsmdifferencefit1_HE", " ", 80, 20., 60.);
6355  h_gsmdifferencefit2_HE = fs_->make<TH1F>("h_gsmdifferencefit2_HE", " ", 80, 20., 60.);
6356  h_gsmdifferencefit3_HE = fs_->make<TH1F>("h_gsmdifferencefit3_HE", " ", 80, 20., 60.);
6357  h_gsmdifferencefit4_HE = fs_->make<TH1F>("h_gsmdifferencefit4_HE", " ", 80, 20., 60.);
6358  h_gsmdifferencefit5_HE = fs_->make<TH1F>("h_gsmdifferencefit5_HE", " ", 80, 20., 60.);
6359  h_gsmdifferencefit6_HE = fs_->make<TH1F>("h_gsmdifferencefit6_HE", " ", 80, 20., 60.);
6360 
6361  // Aijk Amplitude:
6362  h_ADCAmpl_HE = fs_->make<TH1F>("h_ADCAmpl_HE", " ", 200, 0., 2000000.);
6363  h_ADCAmplrest_HE = fs_->make<TH1F>("h_ADCAmplrest_HE", " ", 100, 0., 500.);
6364  h_ADCAmplrest1_HE = fs_->make<TH1F>("h_ADCAmplrest1_HE", " ", 100, 0., 100.);
6365  h_ADCAmplrest6_HE = fs_->make<TH1F>("h_ADCAmplrest6_HE", " ", 100, 0., 10000.);
6366 
6367  h_ADCAmpl345_HE = fs_->make<TH1F>("h_ADCAmpl345_HE", " ", 70, 0., 700000.);
6368 
6369  // SiPM corrections:
6370  h_corrforxaMAIN_HE = fs_->make<TH1F>("h_corrforxaMAIN_HE", " ", 70, 0., 700000.);
6371  h_corrforxaMAIN0_HE = fs_->make<TH1F>("h_corrforxaMAIN0_HE", " ", 70, 0., 700000.);
6372  h_corrforxaADDI_HE = fs_->make<TH1F>("h_corrforxaADDI_HE", " ", 70, 0., 700000.);
6373  h_corrforxaADDI0_HE = fs_->make<TH1F>("h_corrforxaADDI0_HE", " ", 70, 0., 700000.);
6374 
6375  h_mapDepth1ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6376  h_mapDepth2ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6377  h_mapDepth3ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6378  h_mapDepth4ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6379  h_mapDepth5ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6380  h_mapDepth6ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6381  h_mapDepth7ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6383  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6385  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6387  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6389  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6391  fs_->make<TH2F>("h_mapDepth5ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6393  fs_->make<TH2F>("h_mapDepth6ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6395  fs_->make<TH2F>("h_mapDepth7ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6396 
6397  h_mapDepth1ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6398  h_mapDepth2ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6399  h_mapDepth3ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6400  h_mapDepth4ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6401  h_mapDepth5ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6402  h_mapDepth6ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6403  h_mapDepth7ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6404  h_mapDepth1ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth1ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6405  h_mapDepth2ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth2ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6406  h_mapDepth3ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth3ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6407 
6408  h_TSmeanA_HE = fs_->make<TH1F>("h_TSmeanA_HE", " ", 100, -2., 8.);
6409  h_mapDepth1TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6410  h_mapDepth2TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6411  h_mapDepth3TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6412  h_mapDepth4TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6413  h_mapDepth5TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth5TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6414  h_mapDepth6TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth6TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6415  h_mapDepth7TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth7TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6416  h_mapDepth1TSmeanA_HE = fs_->make<TH2F>("h_mapDepth1TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6417  h_mapDepth2TSmeanA_HE = fs_->make<TH2F>("h_mapDepth2TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6418  h_mapDepth3TSmeanA_HE = fs_->make<TH2F>("h_mapDepth3TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6419  h_mapDepth4TSmeanA_HE = fs_->make<TH2F>("h_mapDepth4TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6420  h_mapDepth5TSmeanA_HE = fs_->make<TH2F>("h_mapDepth5TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6421  h_mapDepth6TSmeanA_HE = fs_->make<TH2F>("h_mapDepth6TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6422  h_mapDepth7TSmeanA_HE = fs_->make<TH2F>("h_mapDepth7TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6423  h_TSmaxA_HE = fs_->make<TH1F>("h_TSmaxA_HE", " ", 100, -1., 11.);
6424  h_mapDepth1TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6425  h_mapDepth2TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6426  h_mapDepth3TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6427  h_mapDepth4TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6428  h_mapDepth5TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth5TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6429  h_mapDepth6TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth6TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6430  h_mapDepth7TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth7TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6431  h_mapDepth1TSmaxA_HE = fs_->make<TH2F>("h_mapDepth1TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6432  h_mapDepth2TSmaxA_HE = fs_->make<TH2F>("h_mapDepth2TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6433  h_mapDepth3TSmaxA_HE = fs_->make<TH2F>("h_mapDepth3TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6434  h_mapDepth4TSmaxA_HE = fs_->make<TH2F>("h_mapDepth4TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6435  h_mapDepth5TSmaxA_HE = fs_->make<TH2F>("h_mapDepth5TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6436  h_mapDepth6TSmaxA_HE = fs_->make<TH2F>("h_mapDepth6TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6437  h_mapDepth7TSmaxA_HE = fs_->make<TH2F>("h_mapDepth7TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6438  // RMS:
6439  h_Amplitude_HE = fs_->make<TH1F>("h_Amplitude_HE", " ", 100, 0., 5.5);
6440  h_mapDepth1Amplitude225_HE = fs_->make<TH2F>("h_mapDepth1Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6441  h_mapDepth2Amplitude225_HE = fs_->make<TH2F>("h_mapDepth2Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6442  h_mapDepth3Amplitude225_HE = fs_->make<TH2F>("h_mapDepth3Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6443  h_mapDepth4Amplitude225_HE = fs_->make<TH2F>("h_mapDepth4Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6444  h_mapDepth5Amplitude225_HE = fs_->make<TH2F>("h_mapDepth5Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6445  h_mapDepth6Amplitude225_HE = fs_->make<TH2F>("h_mapDepth6Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6446  h_mapDepth7Amplitude225_HE = fs_->make<TH2F>("h_mapDepth7Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6447  h_mapDepth1Amplitude_HE = fs_->make<TH2F>("h_mapDepth1Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6448  h_mapDepth2Amplitude_HE = fs_->make<TH2F>("h_mapDepth2Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6449  h_mapDepth3Amplitude_HE = fs_->make<TH2F>("h_mapDepth3Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6450  h_mapDepth4Amplitude_HE = fs_->make<TH2F>("h_mapDepth4Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6451  h_mapDepth5Amplitude_HE = fs_->make<TH2F>("h_mapDepth5Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6452  h_mapDepth6Amplitude_HE = fs_->make<TH2F>("h_mapDepth6Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6453  h_mapDepth7Amplitude_HE = fs_->make<TH2F>("h_mapDepth7Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6454 
6455  // Ratio:
6456  h_Ampl_HE = fs_->make<TH1F>("h_Ampl_HE", " ", 100, 0., 1.1);
6457  h_mapDepth1Ampl047_HE = fs_->make<TH2F>("h_mapDepth1Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6458  h_mapDepth2Ampl047_HE = fs_->make<TH2F>("h_mapDepth2Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6459  h_mapDepth3Ampl047_HE = fs_->make<TH2F>("h_mapDepth3Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6460  h_mapDepth4Ampl047_HE = fs_->make<TH2F>("h_mapDepth4Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6461  h_mapDepth5Ampl047_HE = fs_->make<TH2F>("h_mapDepth5Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6462  h_mapDepth6Ampl047_HE = fs_->make<TH2F>("h_mapDepth6Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6463  h_mapDepth7Ampl047_HE = fs_->make<TH2F>("h_mapDepth7Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6464  h_mapDepth1Ampl_HE = fs_->make<TH2F>("h_mapDepth1Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6465  h_mapDepth2Ampl_HE = fs_->make<TH2F>("h_mapDepth2Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6466  h_mapDepth3Ampl_HE = fs_->make<TH2F>("h_mapDepth3Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6467  h_mapDepth4Ampl_HE = fs_->make<TH2F>("h_mapDepth4Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6468  h_mapDepth5Ampl_HE = fs_->make<TH2F>("h_mapDepth5Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6469  h_mapDepth6Ampl_HE = fs_->make<TH2F>("h_mapDepth6Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6470  h_mapDepth7Ampl_HE = fs_->make<TH2F>("h_mapDepth7Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6471  h_mapDepth1AmplE34_HE = fs_->make<TH2F>("h_mapDepth1AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6472  h_mapDepth2AmplE34_HE = fs_->make<TH2F>("h_mapDepth2AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6473  h_mapDepth3AmplE34_HE = fs_->make<TH2F>("h_mapDepth3AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6474  h_mapDepth4AmplE34_HE = fs_->make<TH2F>("h_mapDepth4AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6475  h_mapDepth5AmplE34_HE = fs_->make<TH2F>("h_mapDepth5AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6476  h_mapDepth6AmplE34_HE = fs_->make<TH2F>("h_mapDepth6AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6477  h_mapDepth7AmplE34_HE = fs_->make<TH2F>("h_mapDepth7AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6478  h_mapDepth1_HE = fs_->make<TH2F>("h_mapDepth1_HE", " ", neta, -41., 41., nphi, 0., bphi);
6479  h_mapDepth2_HE = fs_->make<TH2F>("h_mapDepth2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6480  h_mapDepth3_HE = fs_->make<TH2F>("h_mapDepth3_HE", " ", neta, -41., 41., nphi, 0., bphi);
6481  h_mapDepth4_HE = fs_->make<TH2F>("h_mapDepth4_HE", " ", neta, -41., 41., nphi, 0., bphi);
6482  h_mapDepth5_HE = fs_->make<TH2F>("h_mapDepth5_HE", " ", neta, -41., 41., nphi, 0., bphi);
6483  h_mapDepth6_HE = fs_->make<TH2F>("h_mapDepth6_HE", " ", neta, -41., 41., nphi, 0., bphi);
6484  h_mapDepth7_HE = fs_->make<TH2F>("h_mapDepth7_HE", " ", neta, -41., 41., nphi, 0., bphi);
6486  h_mapenophinorm_HE1 = fs_->make<TH2F>("h_mapenophinorm_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6487  h_mapenophinorm_HE2 = fs_->make<TH2F>("h_mapenophinorm_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6488  h_mapenophinorm_HE3 = fs_->make<TH2F>("h_mapenophinorm_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6489  h_mapenophinorm_HE4 = fs_->make<TH2F>("h_mapenophinorm_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6490  h_mapenophinorm_HE5 = fs_->make<TH2F>("h_mapenophinorm_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6491  h_mapenophinorm_HE6 = fs_->make<TH2F>("h_mapenophinorm_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6492  h_mapenophinorm_HE7 = fs_->make<TH2F>("h_mapenophinorm_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6493  h_mapenophinorm2_HE1 = fs_->make<TH2F>("h_mapenophinorm2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6494  h_mapenophinorm2_HE2 = fs_->make<TH2F>("h_mapenophinorm2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6495  h_mapenophinorm2_HE3 = fs_->make<TH2F>("h_mapenophinorm2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6496  h_mapenophinorm2_HE4 = fs_->make<TH2F>("h_mapenophinorm2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6497  h_mapenophinorm2_HE5 = fs_->make<TH2F>("h_mapenophinorm2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6498  h_mapenophinorm2_HE6 = fs_->make<TH2F>("h_mapenophinorm2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6499  h_mapenophinorm2_HE7 = fs_->make<TH2F>("h_mapenophinorm2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6500 
6501  h_maprphinorm_HE1 = fs_->make<TH2F>("h_maprphinorm_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6502  h_maprphinorm_HE2 = fs_->make<TH2F>("h_maprphinorm_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6503  h_maprphinorm_HE3 = fs_->make<TH2F>("h_maprphinorm_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6504  h_maprphinorm_HE4 = fs_->make<TH2F>("h_maprphinorm_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6505  h_maprphinorm_HE5 = fs_->make<TH2F>("h_maprphinorm_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6506  h_maprphinorm_HE6 = fs_->make<TH2F>("h_maprphinorm_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6507  h_maprphinorm_HE7 = fs_->make<TH2F>("h_maprphinorm_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6508  h_maprphinorm2_HE1 = fs_->make<TH2F>("h_maprphinorm2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6509  h_maprphinorm2_HE2 = fs_->make<TH2F>("h_maprphinorm2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6510  h_maprphinorm2_HE3 = fs_->make<TH2F>("h_maprphinorm2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6511  h_maprphinorm2_HE4 = fs_->make<TH2F>("h_maprphinorm2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6512  h_maprphinorm2_HE5 = fs_->make<TH2F>("h_maprphinorm2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6513  h_maprphinorm2_HE6 = fs_->make<TH2F>("h_maprphinorm2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6514  h_maprphinorm2_HE7 = fs_->make<TH2F>("h_maprphinorm2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6515 
6516  h_maprphinorm0_HE1 = fs_->make<TH2F>("h_maprphinorm0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6517  h_maprphinorm0_HE2 = fs_->make<TH2F>("h_maprphinorm0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6518  h_maprphinorm0_HE3 = fs_->make<TH2F>("h_maprphinorm0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6519  h_maprphinorm0_HE4 = fs_->make<TH2F>("h_maprphinorm0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6520  h_maprphinorm0_HE5 = fs_->make<TH2F>("h_maprphinorm0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6521  h_maprphinorm0_HE6 = fs_->make<TH2F>("h_maprphinorm0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6522  h_maprphinorm0_HE7 = fs_->make<TH2F>("h_maprphinorm0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6523 
6524  //
6525  // Didi as done in Reco
6526  //HB:
6527  h_amplitudechannel0_HB1 = fs_->make<TH2F>("h_amplitudechannel0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6528  h_amplitudechannel1_HB1 = fs_->make<TH2F>("h_amplitudechannel1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6529  h_amplitudechannel2_HB1 = fs_->make<TH2F>("h_amplitudechannel2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6530  h_amplitudechannel0_HB2 = fs_->make<TH2F>("h_amplitudechannel0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6531  h_amplitudechannel1_HB2 = fs_->make<TH2F>("h_amplitudechannel1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6532  h_amplitudechannel2_HB2 = fs_->make<TH2F>("h_amplitudechannel2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6533  h_amplitudechannel0_HB3 = fs_->make<TH2F>("h_amplitudechannel0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6534  h_amplitudechannel1_HB3 = fs_->make<TH2F>("h_amplitudechannel1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6535  h_amplitudechannel2_HB3 = fs_->make<TH2F>("h_amplitudechannel2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6536  h_amplitudechannel0_HB4 = fs_->make<TH2F>("h_amplitudechannel0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6537  h_amplitudechannel1_HB4 = fs_->make<TH2F>("h_amplitudechannel1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6538  h_amplitudechannel2_HB4 = fs_->make<TH2F>("h_amplitudechannel2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6539  //HE:
6540  h_amplitudechannel0_HE1 = fs_->make<TH2F>("h_amplitudechannel0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6541  h_amplitudechannel1_HE1 = fs_->make<TH2F>("h_amplitudechannel1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6542  h_amplitudechannel2_HE1 = fs_->make<TH2F>("h_amplitudechannel2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6543  h_amplitudechannel0_HE2 = fs_->make<TH2F>("h_amplitudechannel0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6544  h_amplitudechannel1_HE2 = fs_->make<TH2F>("h_amplitudechannel1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6545  h_amplitudechannel2_HE2 = fs_->make<TH2F>("h_amplitudechannel2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6546  h_amplitudechannel0_HE3 = fs_->make<TH2F>("h_amplitudechannel0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6547  h_amplitudechannel1_HE3 = fs_->make<TH2F>("h_amplitudechannel1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6548  h_amplitudechannel2_HE3 = fs_->make<TH2F>("h_amplitudechannel2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6549  h_amplitudechannel0_HE4 = fs_->make<TH2F>("h_amplitudechannel0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6550  h_amplitudechannel1_HE4 = fs_->make<TH2F>("h_amplitudechannel1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6551  h_amplitudechannel2_HE4 = fs_->make<TH2F>("h_amplitudechannel2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6552  h_amplitudechannel0_HE5 = fs_->make<TH2F>("h_amplitudechannel0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6553  h_amplitudechannel1_HE5 = fs_->make<TH2F>("h_amplitudechannel1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6554  h_amplitudechannel2_HE5 = fs_->make<TH2F>("h_amplitudechannel2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6555  h_amplitudechannel0_HE6 = fs_->make<TH2F>("h_amplitudechannel0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6556  h_amplitudechannel1_HE6 = fs_->make<TH2F>("h_amplitudechannel1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6557  h_amplitudechannel2_HE6 = fs_->make<TH2F>("h_amplitudechannel2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6558  h_amplitudechannel0_HE7 = fs_->make<TH2F>("h_amplitudechannel0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6559  h_amplitudechannel1_HE7 = fs_->make<TH2F>("h_amplitudechannel1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6560  h_amplitudechannel2_HE7 = fs_->make<TH2F>("h_amplitudechannel2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6561  //HF:
6562  h_amplitudechannel0_HF1 = fs_->make<TH2F>("h_amplitudechannel0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6563  h_amplitudechannel1_HF1 = fs_->make<TH2F>("h_amplitudechannel1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6564  h_amplitudechannel2_HF1 = fs_->make<TH2F>("h_amplitudechannel2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6565  h_amplitudechannel0_HF2 = fs_->make<TH2F>("h_amplitudechannel0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6566  h_amplitudechannel1_HF2 = fs_->make<TH2F>("h_amplitudechannel1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6567  h_amplitudechannel2_HF2 = fs_->make<TH2F>("h_amplitudechannel2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6568  h_amplitudechannel0_HF3 = fs_->make<TH2F>("h_amplitudechannel0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6569  h_amplitudechannel1_HF3 = fs_->make<TH2F>("h_amplitudechannel1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6570  h_amplitudechannel2_HF3 = fs_->make<TH2F>("h_amplitudechannel2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6571  h_amplitudechannel0_HF4 = fs_->make<TH2F>("h_amplitudechannel0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6572  h_amplitudechannel1_HF4 = fs_->make<TH2F>("h_amplitudechannel1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6573  h_amplitudechannel2_HF4 = fs_->make<TH2F>("h_amplitudechannel2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6574 
6575  // Reco
6576  h_energyhitSignal_HB = fs_->make<TH1F>("h_energyhitSignal_HB", " ", npfit, 0., 0.); //
6577  h_energyhitSignal_HE = fs_->make<TH1F>("h_energyhitSignal_HE", " ", npfit, 0., 0.); //
6578  h_energyhitSignal_HF = fs_->make<TH1F>("h_energyhitSignal_HF", " ", npfit, 0., 0.); //
6579  h_energyhitNoise_HB = fs_->make<TH1F>("h_energyhitNoise_HB", " ", npfit, 0., 0.); //
6580  h_energyhitNoise_HE = fs_->make<TH1F>("h_energyhitNoise_HE", " ", npfit, 0., 0.); //
6581  h_energyhitNoise_HF = fs_->make<TH1F>("h_energyhitNoise_HF", " ", npfit, 0., 0.); //
6582 
6583  //HB:
6584  h_recSignalEnergy0_HB1 = fs_->make<TH2F>("h_recSignalEnergy0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6585  h_recSignalEnergy1_HB1 = fs_->make<TH2F>("h_recSignalEnergy1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6586  h_recSignalEnergy2_HB1 = fs_->make<TH2F>("h_recSignalEnergy2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6587  h_recSignalEnergy0_HB2 = fs_->make<TH2F>("h_recSignalEnergy0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6588  h_recSignalEnergy1_HB2 = fs_->make<TH2F>("h_recSignalEnergy1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6589  h_recSignalEnergy2_HB2 = fs_->make<TH2F>("h_recSignalEnergy2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6590  h_recSignalEnergy0_HB3 = fs_->make<TH2F>("h_recSignalEnergy0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6591  h_recSignalEnergy1_HB3 = fs_->make<TH2F>("h_recSignalEnergy1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6592  h_recSignalEnergy2_HB3 = fs_->make<TH2F>("h_recSignalEnergy2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6593  h_recSignalEnergy0_HB4 = fs_->make<TH2F>("h_recSignalEnergy0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6594  h_recSignalEnergy1_HB4 = fs_->make<TH2F>("h_recSignalEnergy1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6595  h_recSignalEnergy2_HB4 = fs_->make<TH2F>("h_recSignalEnergy2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6596 
6597  h_recNoiseEnergy0_HB1 = fs_->make<TH2F>("h_recNoiseEnergy0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6598  h_recNoiseEnergy1_HB1 = fs_->make<TH2F>("h_recNoiseEnergy1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6599  h_recNoiseEnergy2_HB1 = fs_->make<TH2F>("h_recNoiseEnergy2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6600  h_recNoiseEnergy0_HB2 = fs_->make<TH2F>("h_recNoiseEnergy0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6601  h_recNoiseEnergy1_HB2 = fs_->make<TH2F>("h_recNoiseEnergy1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6602  h_recNoiseEnergy2_HB2 = fs_->make<TH2F>("h_recNoiseEnergy2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6603  h_recNoiseEnergy0_HB3 = fs_->make<TH2F>("h_recNoiseEnergy0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6604  h_recNoiseEnergy1_HB3 = fs_->make<TH2F>("h_recNoiseEnergy1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6605  h_recNoiseEnergy2_HB3 = fs_->make<TH2F>("h_recNoiseEnergy2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6606  h_recNoiseEnergy0_HB4 = fs_->make<TH2F>("h_recNoiseEnergy0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6607  h_recNoiseEnergy1_HB4 = fs_->make<TH2F>("h_recNoiseEnergy1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6608  h_recNoiseEnergy2_HB4 = fs_->make<TH2F>("h_recNoiseEnergy2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6609 
6610  //HE:
6611  h_recSignalEnergy0_HE1 = fs_->make<TH2F>("h_recSignalEnergy0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6612  h_recSignalEnergy1_HE1 = fs_->make<TH2F>("h_recSignalEnergy1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6613  h_recSignalEnergy2_HE1 = fs_->make<TH2F>("h_recSignalEnergy2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6614  h_recSignalEnergy0_HE2 = fs_->make<TH2F>("h_recSignalEnergy0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6615  h_recSignalEnergy1_HE2 = fs_->make<TH2F>("h_recSignalEnergy1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6616  h_recSignalEnergy2_HE2 = fs_->make<TH2F>("h_recSignalEnergy2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6617  h_recSignalEnergy0_HE3 = fs_->make<TH2F>("h_recSignalEnergy0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6618  h_recSignalEnergy1_HE3 = fs_->make<TH2F>("h_recSignalEnergy1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6619  h_recSignalEnergy2_HE3 = fs_->make<TH2F>("h_recSignalEnergy2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6620  h_recSignalEnergy0_HE4 = fs_->make<TH2F>("h_recSignalEnergy0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6621  h_recSignalEnergy1_HE4 = fs_->make<TH2F>("h_recSignalEnergy1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6622  h_recSignalEnergy2_HE4 = fs_->make<TH2F>("h_recSignalEnergy2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6623  h_recSignalEnergy0_HE5 = fs_->make<TH2F>("h_recSignalEnergy0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6624  h_recSignalEnergy1_HE5 = fs_->make<TH2F>("h_recSignalEnergy1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6625  h_recSignalEnergy2_HE5 = fs_->make<TH2F>("h_recSignalEnergy2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6626  h_recSignalEnergy0_HE6 = fs_->make<TH2F>("h_recSignalEnergy0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6627  h_recSignalEnergy1_HE6 = fs_->make<TH2F>("h_recSignalEnergy1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6628  h_recSignalEnergy2_HE6 = fs_->make<TH2F>("h_recSignalEnergy2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6629  h_recSignalEnergy0_HE7 = fs_->make<TH2F>("h_recSignalEnergy0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6630  h_recSignalEnergy1_HE7 = fs_->make<TH2F>("h_recSignalEnergy1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6631  h_recSignalEnergy2_HE7 = fs_->make<TH2F>("h_recSignalEnergy2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6632 
6633  h_recNoiseEnergy0_HE1 = fs_->make<TH2F>("h_recNoiseEnergy0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6634  h_recNoiseEnergy1_HE1 = fs_->make<TH2F>("h_recNoiseEnergy1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6635  h_recNoiseEnergy2_HE1 = fs_->make<TH2F>("h_recNoiseEnergy2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6636  h_recNoiseEnergy0_HE2 = fs_->make<TH2F>("h_recNoiseEnergy0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6637  h_recNoiseEnergy1_HE2 = fs_->make<TH2F>("h_recNoiseEnergy1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6638  h_recNoiseEnergy2_HE2 = fs_->make<TH2F>("h_recNoiseEnergy2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6639  h_recNoiseEnergy0_HE3 = fs_->make<TH2F>("h_recNoiseEnergy0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6640  h_recNoiseEnergy1_HE3 = fs_->make<TH2F>("h_recNoiseEnergy1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6641  h_recNoiseEnergy2_HE3 = fs_->make<TH2F>("h_recNoiseEnergy2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6642  h_recNoiseEnergy0_HE4 = fs_->make<TH2F>("h_recNoiseEnergy0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6643  h_recNoiseEnergy1_HE4 = fs_->make<TH2F>("h_recNoiseEnergy1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6644  h_recNoiseEnergy2_HE4 = fs_->make<TH2F>("h_recNoiseEnergy2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6645  h_recNoiseEnergy0_HE5 = fs_->make<TH2F>("h_recNoiseEnergy0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6646  h_recNoiseEnergy1_HE5 = fs_->make<TH2F>("h_recNoiseEnergy1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6647  h_recNoiseEnergy2_HE5 = fs_->make<TH2F>("h_recNoiseEnergy2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6648  h_recNoiseEnergy0_HE6 = fs_->make<TH2F>("h_recNoiseEnergy0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6649  h_recNoiseEnergy1_HE6 = fs_->make<TH2F>("h_recNoiseEnergy1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6650  h_recNoiseEnergy2_HE6 = fs_->make<TH2F>("h_recNoiseEnergy2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6651  h_recNoiseEnergy0_HE7 = fs_->make<TH2F>("h_recNoiseEnergy0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6652  h_recNoiseEnergy1_HE7 = fs_->make<TH2F>("h_recNoiseEnergy1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6653  h_recNoiseEnergy2_HE7 = fs_->make<TH2F>("h_recNoiseEnergy2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6654 
6655  //HF:
6656  h_recSignalEnergy0_HF1 = fs_->make<TH2F>("h_recSignalEnergy0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6657  h_recSignalEnergy1_HF1 = fs_->make<TH2F>("h_recSignalEnergy1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6658  h_recSignalEnergy2_HF1 = fs_->make<TH2F>("h_recSignalEnergy2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6659  h_recSignalEnergy0_HF2 = fs_->make<TH2F>("h_recSignalEnergy0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6660  h_recSignalEnergy1_HF2 = fs_->make<TH2F>("h_recSignalEnergy1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6661  h_recSignalEnergy2_HF2 = fs_->make<TH2F>("h_recSignalEnergy2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6662 
6663  h_recNoiseEnergy0_HF1 = fs_->make<TH2F>("h_recNoiseEnergy0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6664  h_recNoiseEnergy1_HF1 = fs_->make<TH2F>("h_recNoiseEnergy1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6665  h_recNoiseEnergy2_HF1 = fs_->make<TH2F>("h_recNoiseEnergy2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6666  h_recNoiseEnergy0_HF2 = fs_->make<TH2F>("h_recNoiseEnergy0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6667  h_recNoiseEnergy1_HF2 = fs_->make<TH2F>("h_recNoiseEnergy1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6668  h_recNoiseEnergy2_HF2 = fs_->make<TH2F>("h_recNoiseEnergy2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6669 
6671  // RADDAM:
6672  // if(flagLaserRaddam_ == 1 ) {
6673  // }
6674  int min80 = -100.;
6675  int max80 = 9000.;
6676  // fill for each digi (=each event, each channel)
6677  h_mapDepth1RADDAM_HE = fs_->make<TH2F>("h_mapDepth1RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6678  h_mapDepth2RADDAM_HE = fs_->make<TH2F>("h_mapDepth2RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6679  h_mapDepth3RADDAM_HE = fs_->make<TH2F>("h_mapDepth3RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6680  h_mapDepth1RADDAM0_HE = fs_->make<TH2F>("h_mapDepth1RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6681  h_mapDepth2RADDAM0_HE = fs_->make<TH2F>("h_mapDepth2RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6682  h_mapDepth3RADDAM0_HE = fs_->make<TH2F>("h_mapDepth3RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6683 
6684  h_sigLayer1RADDAM_HE = fs_->make<TH1F>("h_sigLayer1RADDAM_HE", " ", neta, -41., 41.);
6685  h_sigLayer2RADDAM_HE = fs_->make<TH1F>("h_sigLayer2RADDAM_HE", " ", neta, -41., 41.);
6686  h_sigLayer1RADDAM0_HE = fs_->make<TH1F>("h_sigLayer1RADDAM0_HE", " ", neta, -41., 41.);
6687  h_sigLayer2RADDAM0_HE = fs_->make<TH1F>("h_sigLayer2RADDAM0_HE", " ", neta, -41., 41.);
6688  h_AamplitudewithPedSubtr_RADDAM_HE = fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HE", " ", 100, min80, max80);
6690  fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HEzoom0", " ", 100, min80, 4000.);
6692  fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HEzoom1", " ", 100, min80, 1000.);
6693  h_mapDepth3RADDAM16_HE = fs_->make<TH1F>("h_mapDepth3RADDAM16_HE", " ", 100, min80, max80);
6694  h_A_Depth1RADDAM_HE = fs_->make<TH1F>("h_A_Depth1RADDAM_HE", " ", 100, min80, max80);
6695  h_A_Depth2RADDAM_HE = fs_->make<TH1F>("h_A_Depth2RADDAM_HE", " ", 100, min80, max80);
6696  h_A_Depth3RADDAM_HE = fs_->make<TH1F>("h_A_Depth3RADDAM_HE", " ", 100, min80, max80);
6697  int min90 = 0.;
6698  int max90 = 5000.;
6699  h_sumphiEta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2", " ", 100, min90, 70. * max90);
6700  h_Eta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2", " ", 100, min90, max90);
6701  h_NphiForEta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2", " ", 100, 0, 100.);
6702  h_sumphiEta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2P", " ", 100, min90, 70. * max90);
6703  h_Eta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2P", " ", 100, min90, max90);
6704  h_NphiForEta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2P", " ", 100, 0, 100.);
6706  fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2ALL", " ", 100, min90, 70. * max90);
6707  h_Eta16Depth3RADDAM_HED2ALL = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2ALL", " ", 100, min90, max90);
6708  h_NphiForEta16Depth3RADDAM_HED2ALL = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2ALL", " ", 100, 0, 100.);
6709  h_sigLayer1RADDAM5_HE = fs_->make<TH1F>("h_sigLayer1RADDAM5_HE", " ", neta, -41., 41.);
6710  h_sigLayer2RADDAM5_HE = fs_->make<TH1F>("h_sigLayer2RADDAM5_HE", " ", neta, -41., 41.);
6711  h_sigLayer1RADDAM6_HE = fs_->make<TH1F>("h_sigLayer1RADDAM6_HE", " ", neta, -41., 41.);
6712  h_sigLayer2RADDAM6_HE = fs_->make<TH1F>("h_sigLayer2RADDAM6_HE", " ", neta, -41., 41.);
6713  h_sigLayer1RADDAM5_HED2 = fs_->make<TH1F>("h_sigLayer1RADDAM5_HED2", " ", neta, -41., 41.);
6714  h_sigLayer2RADDAM5_HED2 = fs_->make<TH1F>("h_sigLayer2RADDAM5_HED2", " ", neta, -41., 41.);
6715  h_sigLayer1RADDAM6_HED2 = fs_->make<TH1F>("h_sigLayer1RADDAM6_HED2", " ", neta, -41., 41.);
6716  h_sigLayer2RADDAM6_HED2 = fs_->make<TH1F>("h_sigLayer2RADDAM6_HED2", " ", neta, -41., 41.);
6717 
6718  h_numberofhitsHFtest = fs_->make<TH1F>("h_numberofhitsHFtest", " ", 100, 0., 30000.);
6719  h_AmplitudeHFtest = fs_->make<TH1F>("h_AmplitudeHFtest", " ", 100, 0., 300000.);
6720  h_totalAmplitudeHF = fs_->make<TH1F>("h_totalAmplitudeHF", " ", 100, 0., 100000000000.);
6721  h_totalAmplitudeHFperEvent = fs_->make<TH1F>("h_totalAmplitudeHFperEvent", " ", 1000, 1., 1001.);
6722  // fullAmplitude:
6723  h_ADCAmplZoom1_HF = fs_->make<TH1F>("h_ADCAmplZoom1_HF", " ", 100, 0., 1000000.);
6724  h_ADCAmpl_HF = fs_->make<TH1F>("h_ADCAmpl_HF", " ", 250, 0., 500000.);
6725  h_ADCAmplrest1_HF = fs_->make<TH1F>("h_ADCAmplrest1_HF", " ", 100, 0., 1000.);
6726  h_ADCAmplrest6_HF = fs_->make<TH1F>("h_ADCAmplrest6_HF", " ", 100, 0., 10000.);
6727 
6728  h_mapDepth1ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6729  h_mapDepth2ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6731  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6733  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6734  h_mapDepth1ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6735  h_mapDepth2ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6736  h_mapDepth3ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6737  h_mapDepth4ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6739  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6741  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6742  h_mapDepth3ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6743  h_mapDepth4ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6744  h_TSmeanA_HF = fs_->make<TH1F>("h_TSmeanA_HF", " ", 100, -1., 11.);
6745  h_mapDepth1TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6746  h_mapDepth2TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6747  h_mapDepth1TSmeanA_HF = fs_->make<TH2F>("h_mapDepth1TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6748  h_mapDepth2TSmeanA_HF = fs_->make<TH2F>("h_mapDepth2TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6749  h_mapDepth3TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6750  h_mapDepth4TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6751  h_mapDepth3TSmeanA_HF = fs_->make<TH2F>("h_mapDepth3TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6752  h_mapDepth4TSmeanA_HF = fs_->make<TH2F>("h_mapDepth4TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6753  h_Amplitude_HF = fs_->make<TH1F>("h_Amplitude_HF", " ", 100, 0., 5.);
6754  h_TSmaxA_HF = fs_->make<TH1F>("h_TSmaxA_HF", " ", 100, -1., 11.);
6755  h_mapDepth1TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6756  h_mapDepth2TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6757  h_mapDepth1TSmaxA_HF = fs_->make<TH2F>("h_mapDepth1TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6758  h_mapDepth2TSmaxA_HF = fs_->make<TH2F>("h_mapDepth2TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6759  h_mapDepth3TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6760  h_mapDepth4TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6761  h_mapDepth3TSmaxA_HF = fs_->make<TH2F>("h_mapDepth3TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6762  h_mapDepth4TSmaxA_HF = fs_->make<TH2F>("h_mapDepth4TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6763  h_Amplitude_HF = fs_->make<TH1F>("h_Amplitude_HF", " ", 100, 0., 5.);
6764  h_mapDepth1Amplitude225_HF = fs_->make<TH2F>("h_mapDepth1Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6765  h_mapDepth2Amplitude225_HF = fs_->make<TH2F>("h_mapDepth2Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6766  h_mapDepth1Amplitude_HF = fs_->make<TH2F>("h_mapDepth1Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6767  h_mapDepth2Amplitude_HF = fs_->make<TH2F>("h_mapDepth2Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6768  h_mapDepth3Amplitude225_HF = fs_->make<TH2F>("h_mapDepth3Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6769  h_mapDepth4Amplitude225_HF = fs_->make<TH2F>("h_mapDepth4Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6770  h_mapDepth3Amplitude_HF = fs_->make<TH2F>("h_mapDepth3Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6771  h_mapDepth4Amplitude_HF = fs_->make<TH2F>("h_mapDepth4Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6772  // Ratio:
6773  h_Ampl_HF = fs_->make<TH1F>("h_Ampl_HF", " ", 100, 0., 1.1);
6774  h_mapDepth1Ampl047_HF = fs_->make<TH2F>("h_mapDepth1Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6775  h_mapDepth2Ampl047_HF = fs_->make<TH2F>("h_mapDepth2Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6776  h_mapDepth1Ampl_HF = fs_->make<TH2F>("h_mapDepth1Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6777  h_mapDepth2Ampl_HF = fs_->make<TH2F>("h_mapDepth2Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6778  h_mapDepth1AmplE34_HF = fs_->make<TH2F>("h_mapDepth1AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6779  h_mapDepth2AmplE34_HF = fs_->make<TH2F>("h_mapDepth2AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6780  h_mapDepth1_HF = fs_->make<TH2F>("h_mapDepth1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6781  h_mapDepth2_HF = fs_->make<TH2F>("h_mapDepth2_HF", " ", neta, -41., 41., nphi, 0., bphi);
6782  h_mapDepth3Ampl047_HF = fs_->make<TH2F>("h_mapDepth3Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6783  h_mapDepth4Ampl047_HF = fs_->make<TH2F>("h_mapDepth4Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6784  h_mapDepth3Ampl_HF = fs_->make<TH2F>("h_mapDepth3Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6785  h_mapDepth4Ampl_HF = fs_->make<TH2F>("h_mapDepth4Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6786  h_mapDepth3AmplE34_HF = fs_->make<TH2F>("h_mapDepth3AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6787  h_mapDepth4AmplE34_HF = fs_->make<TH2F>("h_mapDepth4AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6788  h_mapDepth3_HF = fs_->make<TH2F>("h_mapDepth3_HF", " ", neta, -41., 41., nphi, 0., bphi);
6789  h_mapDepth4_HF = fs_->make<TH2F>("h_mapDepth4_HF", " ", neta, -41., 41., nphi, 0., bphi);
6790 
6792  h_numberofhitsHOtest = fs_->make<TH1F>("h_numberofhitsHOtest", " ", 100, 0., 30000.);
6793  h_AmplitudeHOtest = fs_->make<TH1F>("h_AmplitudeHOtest", " ", 100, 0., 300000.);
6794  h_totalAmplitudeHO = fs_->make<TH1F>("h_totalAmplitudeHO", " ", 100, 0., 100000000.);
6795  h_totalAmplitudeHOperEvent = fs_->make<TH1F>("h_totalAmplitudeHOperEvent", " ", 1000, 1., 1001.);
6796  // fullAmplitude:
6797  h_ADCAmpl_HO = fs_->make<TH1F>("h_ADCAmpl_HO", " ", 100, 0., 7000.);
6798  h_ADCAmplrest1_HO = fs_->make<TH1F>("h_ADCAmplrest1_HO", " ", 100, 0., 150.);
6799  h_ADCAmplrest6_HO = fs_->make<TH1F>("h_ADCAmplrest6_HO", " ", 100, 0., 500.);
6800 
6801  h_ADCAmplZoom1_HO = fs_->make<TH1F>("h_ADCAmplZoom1_HO", " ", 100, -20., 280.);
6802  h_ADCAmpl_HO_copy = fs_->make<TH1F>("h_ADCAmpl_HO_copy", " ", 100, 0., 30000.);
6803  h_mapDepth4ADCAmpl225_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6805  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HO", " ", neta, -41., 41., nphi, 0., bphi);
6806  h_mapDepth4ADCAmpl_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HO", " ", neta, -41., 41., nphi, 0., bphi);
6807  h_TSmeanA_HO = fs_->make<TH1F>("h_TSmeanA_HO", " ", 100, 0., 10.);
6808  h_mapDepth4TSmeanA225_HO = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6809  h_mapDepth4TSmeanA_HO = fs_->make<TH2F>("h_mapDepth4TSmeanA_HO", " ", neta, -41., 41., nphi, 0., bphi);
6810  h_TSmaxA_HO = fs_->make<TH1F>("h_TSmaxA_HO", " ", 100, 0., 10.);
6811  h_mapDepth4TSmaxA225_HO = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6812  h_mapDepth4TSmaxA_HO = fs_->make<TH2F>("h_mapDepth4TSmaxA_HO", " ", neta, -41., 41., nphi, 0., bphi);
6813  h_Amplitude_HO = fs_->make<TH1F>("h_Amplitude_HO", " ", 100, 0., 5.);
6814  h_mapDepth4Amplitude225_HO = fs_->make<TH2F>("h_mapDepth4Amplitude225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6815  h_mapDepth4Amplitude_HO = fs_->make<TH2F>("h_mapDepth4Amplitude_HO", " ", neta, -41., 41., nphi, 0., bphi);
6816  // Ratio:
6817  h_Ampl_HO = fs_->make<TH1F>("h_Ampl_HO", " ", 100, 0., 1.1);
6818  h_mapDepth4Ampl047_HO = fs_->make<TH2F>("h_mapDepth4Ampl047_HO", " ", neta, -41., 41., nphi, 0., bphi);
6819  h_mapDepth4Ampl_HO = fs_->make<TH2F>("h_mapDepth4Ampl_HO", " ", neta, -41., 41., nphi, 0., bphi);
6820  h_mapDepth4AmplE34_HO = fs_->make<TH2F>("h_mapDepth4AmplE34_HO", " ", neta, -41., 41., nphi, 0., bphi);
6821  h_mapDepth4_HO = fs_->make<TH2F>("h_mapDepth4_HO", " ", neta, -41., 41., nphi, 0., bphi);
6822 
6824  int baP = 4000;
6825  float baR = 0.;
6826  float baR2 = baP;
6827  h_bcnnbadchannels_depth1_HB = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HB", " ", baP, baR, baR2);
6828  h_bcnnbadchannels_depth2_HB = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HB", " ", baP, baR, baR2);
6829  h_bcnnbadchannels_depth1_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HE", " ", baP, baR, baR2);
6830  h_bcnnbadchannels_depth2_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HE", " ", baP, baR, baR2);
6831  h_bcnnbadchannels_depth3_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth3_HE", " ", baP, baR, baR2);
6832  h_bcnnbadchannels_depth4_HO = fs_->make<TH1F>("h_bcnnbadchannels_depth4_HO", " ", baP, baR, baR2);
6833  h_bcnnbadchannels_depth1_HF = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HF", " ", baP, baR, baR2);
6834  h_bcnnbadchannels_depth2_HF = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HF", " ", baP, baR, baR2);
6835  h_bcnbadrate0_depth1_HB = fs_->make<TH1F>("h_bcnbadrate0_depth1_HB", " ", baP, baR, baR2);
6836  h_bcnbadrate0_depth2_HB = fs_->make<TH1F>("h_bcnbadrate0_depth2_HB", " ", baP, baR, baR2);
6837  h_bcnbadrate0_depth1_HE = fs_->make<TH1F>("h_bcnbadrate0_depth1_HE", " ", baP, baR, baR2);
6838  h_bcnbadrate0_depth2_HE = fs_->make<TH1F>("h_bcnbadrate0_depth2_HE", " ", baP, baR, baR2);
6839  h_bcnbadrate0_depth3_HE = fs_->make<TH1F>("h_bcnbadrate0_depth3_HE", " ", baP, baR, baR2);
6840  h_bcnbadrate0_depth4_HO = fs_->make<TH1F>("h_bcnbadrate0_depth4_HO", " ", baP, baR, baR2);
6841  h_bcnbadrate0_depth1_HF = fs_->make<TH1F>("h_bcnbadrate0_depth1_HF", " ", baP, baR, baR2);
6842  h_bcnbadrate0_depth2_HF = fs_->make<TH1F>("h_bcnbadrate0_depth2_HF", " ", baP, baR, baR2);
6843 
6844  h_bcnvsamplitude_HB = fs_->make<TH1F>("h_bcnvsamplitude_HB", " ", baP, baR, baR2);
6845  h_bcnvsamplitude_HE = fs_->make<TH1F>("h_bcnvsamplitude_HE", " ", baP, baR, baR2);
6846  h_bcnvsamplitude_HF = fs_->make<TH1F>("h_bcnvsamplitude_HF", " ", baP, baR, baR2);
6847  h_bcnvsamplitude_HO = fs_->make<TH1F>("h_bcnvsamplitude_HO", " ", baP, baR, baR2);
6848  h_bcnvsamplitude0_HB = fs_->make<TH1F>("h_bcnvsamplitude0_HB", " ", baP, baR, baR2);
6849  h_bcnvsamplitude0_HE = fs_->make<TH1F>("h_bcnvsamplitude0_HE", " ", baP, baR, baR2);
6850  h_bcnvsamplitude0_HF = fs_->make<TH1F>("h_bcnvsamplitude0_HF", " ", baP, baR, baR2);
6851  h_bcnvsamplitude0_HO = fs_->make<TH1F>("h_bcnvsamplitude0_HO", " ", baP, baR, baR2);
6852 
6853  int zaP = 1000;
6854  float zaR = 10000000.;
6855  float zaR2 = 50000000.;
6856  h_orbitNumvsamplitude_HB = fs_->make<TH1F>("h_orbitNumvsamplitude_HB", " ", zaP, zaR, zaR2);
6857  h_orbitNumvsamplitude_HE = fs_->make<TH1F>("h_orbitNumvsamplitude_HE", " ", zaP, zaR, zaR2);
6858  h_orbitNumvsamplitude_HF = fs_->make<TH1F>("h_orbitNumvsamplitude_HF", " ", zaP, zaR, zaR2);
6859  h_orbitNumvsamplitude_HO = fs_->make<TH1F>("h_orbitNumvsamplitude_HO", " ", zaP, zaR, zaR2);
6860  h_orbitNumvsamplitude0_HB = fs_->make<TH1F>("h_orbitNumvsamplitude0_HB", " ", zaP, zaR, zaR2);
6861  h_orbitNumvsamplitude0_HE = fs_->make<TH1F>("h_orbitNumvsamplitude0_HE", " ", zaP, zaR, zaR2);
6862  h_orbitNumvsamplitude0_HF = fs_->make<TH1F>("h_orbitNumvsamplitude0_HF", " ", zaP, zaR, zaR2);
6863  h_orbitNumvsamplitude0_HO = fs_->make<TH1F>("h_orbitNumvsamplitude0_HO", " ", zaP, zaR, zaR2);
6864 
6865  h_2DsumADCAmplEtaPhiLs0 = fs_->make<TH2F>(
6866  "h_2DsumADCAmplEtaPhiLs0", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6867  h_2DsumADCAmplEtaPhiLs1 = fs_->make<TH2F>(
6868  "h_2DsumADCAmplEtaPhiLs1", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6869  h_2DsumADCAmplEtaPhiLs2 = fs_->make<TH2F>(
6870  "h_2DsumADCAmplEtaPhiLs2", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6871  h_2DsumADCAmplEtaPhiLs3 = fs_->make<TH2F>(
6872  "h_2DsumADCAmplEtaPhiLs3", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6873 
6875  "h_2DsumADCAmplEtaPhiLs00", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6877  "h_2DsumADCAmplEtaPhiLs10", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6879  "h_2DsumADCAmplEtaPhiLs20", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6881  "h_2DsumADCAmplEtaPhiLs30", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6882 
6883  h_sumADCAmplEtaPhiLs = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs", " ", 1000, 0., 14000.);
6884  h_sumADCAmplEtaPhiLs_bbbc = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_bbbc", " ", 1000, 0., 300000.);
6885  h_sumADCAmplEtaPhiLs_bbb1 = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_bbb1", " ", 100, 0., 3000.);
6886  h_sumADCAmplEtaPhiLs_lscounterM1 = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_lscounterM1", " ", 600, 1., 601.);
6887  h_sumADCAmplEtaPhiLs_ietaphi = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_ietaphi", " ", 400, 0., 400.);
6889  fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_lscounterM1orbitNum", " ", 600, 1., 601.);
6890  h_sumADCAmplEtaPhiLs_orbitNum = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_orbitNum", " ", 1000, 25000000., 40000000.);
6891 
6892  // for LS :
6893 
6894  // for LS binning:
6895  int bac = howmanybinsonplots_;
6896  // int bac= 15;
6897  float bac2 = bac + 1.;
6898  // bac, 1., bac2 );
6899 
6900  h_nbadchannels_depth1_HB = fs_->make<TH1F>("h_nbadchannels_depth1_HB", " ", 100, 1., 3001.);
6901  h_runnbadchannels_depth1_HB = fs_->make<TH1F>("h_runnbadchannels_depth1_HB", " ", bac, 1., bac2);
6902  h_runnbadchannelsC_depth1_HB = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HB", " ", bac, 1., bac2);
6903  h_runbadrate_depth1_HB = fs_->make<TH1F>("h_runbadrate_depth1_HB", " ", bac, 1., bac2);
6904  h_runbadrateC_depth1_HB = fs_->make<TH1F>("h_runbadrateC_depth1_HB", " ", bac, 1., bac2);
6905  h_runbadrate0_depth1_HB = fs_->make<TH1F>("h_runbadrate0_depth1_HB", " ", bac, 1., bac2);
6906 
6907  h_nbadchannels_depth2_HB = fs_->make<TH1F>("h_nbadchannels_depth2_HB", " ", 100, 1., 501.);
6908  h_runnbadchannels_depth2_HB = fs_->make<TH1F>("h_runnbadchannels_depth2_HB", " ", bac, 1., bac2);
6909  h_runnbadchannelsC_depth2_HB = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HB", " ", bac, 1., bac2);
6910  h_runbadrate_depth2_HB = fs_->make<TH1F>("h_runbadrate_depth2_HB", " ", bac, 1., bac2);
6911  h_runbadrateC_depth2_HB = fs_->make<TH1F>("h_runbadrateC_depth2_HB", " ", bac, 1., bac2);
6912  h_runbadrate0_depth2_HB = fs_->make<TH1F>("h_runbadrate0_depth2_HB", " ", bac, 1., bac2);
6913 
6914  h_nbadchannels_depth1_HE = fs_->make<TH1F>("h_nbadchannels_depth1_HE", " ", 100, 1., 3001.);
6915  h_runnbadchannels_depth1_HE = fs_->make<TH1F>("h_runnbadchannels_depth1_HE", " ", bac, 1., bac2);
6916  h_runnbadchannelsC_depth1_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HE", " ", bac, 1., bac2);
6917  h_runbadrate_depth1_HE = fs_->make<TH1F>("h_runbadrate_depth1_HE", " ", bac, 1., bac2);
6918  h_runbadrateC_depth1_HE = fs_->make<TH1F>("h_runbadrateC_depth1_HE", " ", bac, 1., bac2);
6919  h_runbadrate0_depth1_HE = fs_->make<TH1F>("h_runbadrate0_depth1_HE", " ", bac, 1., bac2);
6920 
6921  h_nbadchannels_depth2_HE = fs_->make<TH1F>("h_nbadchannels_depth2_HE", " ", 100, 1., 3001.);
6922  h_runnbadchannels_depth2_HE = fs_->make<TH1F>("h_runnbadchannels_depth2_HE", " ", bac, 1., bac2);
6923  h_runnbadchannelsC_depth2_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HE", " ", bac, 1., bac2);
6924  h_runbadrate_depth2_HE = fs_->make<TH1F>("h_runbadrate_depth2_HE", " ", bac, 1., bac2);
6925  h_runbadrateC_depth2_HE = fs_->make<TH1F>("h_runbadrateC_depth2_HE", " ", bac, 1., bac2);
6926  h_runbadrate0_depth2_HE = fs_->make<TH1F>("h_runbadrate0_depth2_HE", " ", bac, 1., bac2);
6927 
6928  h_nbadchannels_depth3_HE = fs_->make<TH1F>("h_nbadchannels_depth3_HE", " ", 100, 1., 501.);
6929  h_runnbadchannels_depth3_HE = fs_->make<TH1F>("h_runnbadchannels_depth3_HE", " ", bac, 1., bac2);
6930  h_runnbadchannelsC_depth3_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth3_HE", " ", bac, 1., bac2);
6931  h_runbadrate_depth3_HE = fs_->make<TH1F>("h_runbadrate_depth3_HE", " ", bac, 1., bac2);
6932  h_runbadrateC_depth3_HE = fs_->make<TH1F>("h_runbadrateC_depth3_HE", " ", bac, 1., bac2);
6933  h_runbadrate0_depth3_HE = fs_->make<TH1F>("h_runbadrate0_depth3_HE", " ", bac, 1., bac2);
6934 
6935  h_nbadchannels_depth1_HF = fs_->make<TH1F>("h_nbadchannels_depth1_HF", " ", 100, 1., 3001.);
6936  h_runnbadchannels_depth1_HF = fs_->make<TH1F>("h_runnbadchannels_depth1_HF", " ", bac, 1., bac2);
6937  h_runnbadchannelsC_depth1_HF = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HF", " ", bac, 1., bac2);
6938  h_runbadrate_depth1_HF = fs_->make<TH1F>("h_runbadrate_depth1_HF", " ", bac, 1., bac2);
6939  h_runbadrateC_depth1_HF = fs_->make<TH1F>("h_runbadrateC_depth1_HF", " ", bac, 1., bac2);
6940  h_runbadrate0_depth1_HF = fs_->make<TH1F>("h_runbadrate0_depth1_HF", " ", bac, 1., bac2);
6941 
6942  h_nbadchannels_depth2_HF = fs_->make<TH1F>("h_nbadchannels_depth2_HF", " ", 100, 1., 501.);
6943  h_runnbadchannels_depth2_HF = fs_->make<TH1F>("h_runnbadchannels_depth2_HF", " ", bac, 1., bac2);
6944  h_runnbadchannelsC_depth2_HF = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HF", " ", bac, 1., bac2);
6945  h_runbadrate_depth2_HF = fs_->make<TH1F>("h_runbadrate_depth2_HF", " ", bac, 1., bac2);
6946  h_runbadrateC_depth2_HF = fs_->make<TH1F>("h_runbadrateC_depth2_HF", " ", bac, 1., bac2);
6947  h_runbadrate0_depth2_HF = fs_->make<TH1F>("h_runbadrate0_depth2_HF", " ", bac, 1., bac2);
6948 
6949  h_nbadchannels_depth4_HO = fs_->make<TH1F>("h_nbadchannels_depth4_HO", " ", 100, 1., 3001.);
6950  h_runnbadchannels_depth4_HO = fs_->make<TH1F>("h_runnbadchannels_depth4_HO", " ", bac, 1., bac2);
6951  h_runnbadchannelsC_depth4_HO = fs_->make<TH1F>("h_runnbadchannelsC_depth4_HO", " ", bac, 1., bac2);
6952  h_runbadrate_depth4_HO = fs_->make<TH1F>("h_runbadrate_depth4_HO", " ", bac, 1., bac2);
6953  h_runbadrateC_depth4_HO = fs_->make<TH1F>("h_runbadrateC_depth4_HO", " ", bac, 1., bac2);
6954  h_runbadrate0_depth4_HO = fs_->make<TH1F>("h_runbadrate0_depth4_HO", " ", bac, 1., bac2);
6955 
6957  h_FullSignal3D_HB = fs_->make<TH2F>("h_FullSignal3D_HB", " ", neta, -41., 41., nphi, 0., bphi);
6958  h_FullSignal3D0_HB = fs_->make<TH2F>("h_FullSignal3D0_HB", " ", neta, -41., 41., nphi, 0., bphi);
6959  h_FullSignal3D_HE = fs_->make<TH2F>("h_FullSignal3D_HE", " ", neta, -41., 41., nphi, 0., bphi);
6960  h_FullSignal3D0_HE = fs_->make<TH2F>("h_FullSignal3D0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6961  h_FullSignal3D_HO = fs_->make<TH2F>("h_FullSignal3D_HO", " ", neta, -41., 41., nphi, 0., bphi);
6962  h_FullSignal3D0_HO = fs_->make<TH2F>("h_FullSignal3D0_HO", " ", neta, -41., 41., nphi, 0., bphi);
6963  h_FullSignal3D_HF = fs_->make<TH2F>("h_FullSignal3D_HF", " ", neta, -41., 41., nphi, 0., bphi);
6964  h_FullSignal3D0_HF = fs_->make<TH2F>("h_FullSignal3D0_HF", " ", neta, -41., 41., nphi, 0., bphi);
6965 
6967  h_ADCCalib_HB = fs_->make<TH1F>("h_ADCCalib_HB", " ", 100, 10., 10000.);
6968  h_ADCCalib1_HB = fs_->make<TH1F>("h_ADCCalib1_HB", " ", 100, 0.1, 100.1);
6969  h_mapADCCalib047_HB = fs_->make<TH2F>("h_mapADCCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6970  h_mapADCCalib_HB = fs_->make<TH2F>("h_mapADCCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6971  h_RatioCalib_HB = fs_->make<TH1F>("h_RatioCalib_HB", " ", 100, 0., 1.);
6972  h_mapRatioCalib047_HB = fs_->make<TH2F>("h_mapRatioCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6973  h_mapRatioCalib_HB = fs_->make<TH2F>("h_mapRatioCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6974  h_TSmaxCalib_HB = fs_->make<TH1F>("h_TSmaxCalib_HB", " ", 100, 0., 10.);
6975  h_mapTSmaxCalib047_HB = fs_->make<TH2F>("h_mapTSmaxCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6976  h_mapTSmaxCalib_HB = fs_->make<TH2F>("h_mapTSmaxCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6977  h_TSmeanCalib_HB = fs_->make<TH1F>("h_TSmeanCalib_HB", " ", 100, 0., 10.);
6978  h_mapTSmeanCalib047_HB = fs_->make<TH2F>("h_mapTSmeanCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6979  h_mapTSmeanCalib_HB = fs_->make<TH2F>("h_mapTSmeanCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6980  h_WidthCalib_HB = fs_->make<TH1F>("h_WidthCalib_HB", " ", 100, 0., 5.);
6981  h_mapWidthCalib047_HB = fs_->make<TH2F>("h_mapWidthCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6982  h_mapCapCalib047_HB = fs_->make<TH2F>("h_mapCapCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6983  h_mapWidthCalib_HB = fs_->make<TH2F>("h_mapWidthCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6984  h_map_HB = fs_->make<TH2F>("h_map_HB", " ", neta, -41., 41., nphi, 0., bphi);
6985  h_ADCCalib_HE = fs_->make<TH1F>("h_ADCCalib_HE", " ", 100, 10., 10000.);
6986  h_ADCCalib1_HE = fs_->make<TH1F>("h_ADCCalib1_HE", " ", 100, 0.1, 100.1);
6987  h_mapADCCalib047_HE = fs_->make<TH2F>("h_mapADCCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6988  h_mapADCCalib_HE = fs_->make<TH2F>("h_mapADCCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
6989  h_RatioCalib_HE = fs_->make<TH1F>("h_RatioCalib_HE", " ", 100, 0., 1.);
6990  h_mapRatioCalib047_HE = fs_->make<TH2F>("h_mapRatioCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6991  h_mapRatioCalib_HE = fs_->make<TH2F>("h_mapRatioCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
6992  h_TSmaxCalib_HE = fs_->make<TH1F>("h_TSmaxCalib_HE", " ", 100, 0., 10.);
6993  h_mapTSmaxCalib047_HE = fs_->make<TH2F>("h_mapTSmaxCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6994  h_mapTSmaxCalib_HE = fs_->make<TH2F>("h_mapTSmaxCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
6995  h_TSmeanCalib_HE = fs_->make<TH1F>("h_TSmeanCalib_HE", " ", 100, 0., 10.);
6996  h_mapTSmeanCalib047_HE = fs_->make<TH2F>("h_mapTSmeanCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6997  h_mapTSmeanCalib_HE = fs_->make<TH2F>("h_mapTSmeanCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
6998  h_WidthCalib_HE = fs_->make<TH1F>("h_WidthCalib_HE", " ", 100, 0., 5.);
6999  h_mapWidthCalib047_HE = fs_->make<TH2F>("h_mapWidthCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7000  h_mapCapCalib047_HE = fs_->make<TH2F>("h_mapCapCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7001  h_mapWidthCalib_HE = fs_->make<TH2F>("h_mapWidthCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7002  h_map_HE = fs_->make<TH2F>("h_map_HE", " ", neta, -41., 41., nphi, 0., bphi);
7003  h_ADCCalib_HO = fs_->make<TH1F>("h_ADCCalib_HO", " ", 100, 10., 10000.);
7004  h_ADCCalib1_HO = fs_->make<TH1F>("h_ADCCalib1_HO", " ", 100, 0.1, 100.1);
7005  h_mapADCCalib047_HO = fs_->make<TH2F>("h_mapADCCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7006  h_mapADCCalib_HO = fs_->make<TH2F>("h_mapADCCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7007  h_RatioCalib_HO = fs_->make<TH1F>("h_RatioCalib_HO", " ", 100, 0., 1.);
7008  h_mapRatioCalib047_HO = fs_->make<TH2F>("h_mapRatioCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7009  h_mapRatioCalib_HO = fs_->make<TH2F>("h_mapRatioCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7010  h_TSmaxCalib_HO = fs_->make<TH1F>("h_TSmaxCalib_HO", " ", 100, 0., 10.);
7011  h_mapTSmaxCalib047_HO = fs_->make<TH2F>("h_mapTSmaxCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7012  h_mapTSmaxCalib_HO = fs_->make<TH2F>("h_mapTSmaxCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7013  h_TSmeanCalib_HO = fs_->make<TH1F>("h_TSmeanCalib_HO", " ", 100, 0., 10.);
7014  h_mapTSmeanCalib047_HO = fs_->make<TH2F>("h_mapTSmeanCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7015  h_mapTSmeanCalib_HO = fs_->make<TH2F>("h_mapTSmeanCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7016  h_WidthCalib_HO = fs_->make<TH1F>("h_WidthCalib_HO", " ", 100, 0., 5.);
7017  h_mapWidthCalib047_HO = fs_->make<TH2F>("h_mapWidthCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7018  h_mapCapCalib047_HO = fs_->make<TH2F>("h_mapCapCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7019  h_mapWidthCalib_HO = fs_->make<TH2F>("h_mapWidthCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7020  h_map_HO = fs_->make<TH2F>("h_map_HO", " ", neta, -41., 41., nphi, 0., bphi);
7021  h_ADCCalib_HF = fs_->make<TH1F>("h_ADCCalib_HF", " ", 100, 10., 2000.);
7022  h_ADCCalib1_HF = fs_->make<TH1F>("h_ADCCalib1_HF", " ", 100, 0.1, 100.1);
7023  h_mapADCCalib047_HF = fs_->make<TH2F>("h_mapADCCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7024  h_mapADCCalib_HF = fs_->make<TH2F>("h_mapADCCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7025  h_RatioCalib_HF = fs_->make<TH1F>("h_RatioCalib_HF", " ", 100, 0., 1.);
7026  h_mapRatioCalib047_HF = fs_->make<TH2F>("h_mapRatioCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7027  h_mapRatioCalib_HF = fs_->make<TH2F>("h_mapRatioCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7028  h_TSmaxCalib_HF = fs_->make<TH1F>("h_TSmaxCalib_HF", " ", 100, 0., 10.);
7029  h_mapTSmaxCalib047_HF = fs_->make<TH2F>("h_mapTSmaxCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7030  h_mapTSmaxCalib_HF = fs_->make<TH2F>("h_mapTSmaxCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7031  h_TSmeanCalib_HF = fs_->make<TH1F>("h_TSmeanCalib_HF", " ", 100, 0., 10.);
7032  h_mapTSmeanCalib047_HF = fs_->make<TH2F>("h_mapTSmeanCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7033  h_mapTSmeanCalib_HF = fs_->make<TH2F>("h_mapTSmeanCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7034  h_WidthCalib_HF = fs_->make<TH1F>("h_WidthCalib_HF", " ", 100, 0., 5.);
7035  h_mapWidthCalib047_HF = fs_->make<TH2F>("h_mapWidthCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7036  h_mapCapCalib047_HF = fs_->make<TH2F>("h_mapCapCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7037  h_mapWidthCalib_HF = fs_->make<TH2F>("h_mapWidthCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7038  h_map_HF = fs_->make<TH2F>("h_map_HF", " ", neta, -41., 41., nphi, 0., bphi);
7039 
7040  h_nls_per_run = fs_->make<TH1F>("h_nls_per_run", " ", 100, 0., 800.);
7041  h_nls_per_run10 = fs_->make<TH1F>("h_nls_per_run10", " ", 100, 0., 60.);
7042  h_nevents_per_LS = fs_->make<TH1F>("h_nevents_per_LS", " ", 100, 0., 600.);
7043  h_nevents_per_LSzoom = fs_->make<TH1F>("h_nevents_per_LSzoom", " ", 50, 0., 50.);
7044  h_nevents_per_eachLS = fs_->make<TH1F>("h_nevents_per_eachLS", " ", bac, 1., bac2);
7045  h_nevents_per_eachRealLS = fs_->make<TH1F>("h_nevents_per_eachRealLS", " ", bac, 1., bac2);
7046  h_lsnumber_per_eachLS = fs_->make<TH1F>("h_lsnumber_per_eachLS", " ", bac, 1., bac2);
7047  //--------------------------------------------------
7048  // for estimator0:
7049  float pst1 = 30.;
7050  h_sumPedestalLS1 = fs_->make<TH1F>("h_sumPedestalLS1", " ", 100, 0., pst1);
7051  h_2DsumPedestalLS1 = fs_->make<TH2F>("h_2DsumPedestalLS1", " ", neta, -41., 41., nphi, 0., bphi);
7052  h_sumPedestalperLS1 = fs_->make<TH1F>("h_sumPedestalperLS1", " ", bac, 1., bac2);
7053  h_2D0sumPedestalLS1 = fs_->make<TH2F>("h_2D0sumPedestalLS1", " ", neta, -41., 41., nphi, 0., bphi);
7054  h_sum0PedestalperLS1 = fs_->make<TH1F>("h_sum0PedestalperLS1", " ", bac, 1., bac2);
7055 
7056  h_sumPedestalLS2 = fs_->make<TH1F>("h_sumPedestalLS2", " ", 100, 0., pst1);
7057  h_2DsumPedestalLS2 = fs_->make<TH2F>("h_2DsumPedestalLS2", " ", neta, -41., 41., nphi, 0., bphi);
7058  h_sumPedestalperLS2 = fs_->make<TH1F>("h_sumPedestalperLS2", " ", bac, 1., bac2);
7059  h_2D0sumPedestalLS2 = fs_->make<TH2F>("h_2D0sumPedestalLS2", " ", neta, -41., 41., nphi, 0., bphi);
7060  h_sum0PedestalperLS2 = fs_->make<TH1F>("h_sum0PedestalperLS2", " ", bac, 1., bac2);
7061 
7062  h_sumPedestalLS3 = fs_->make<TH1F>("h_sumPedestalLS3", " ", 100, 0., pst1);
7063  h_2DsumPedestalLS3 = fs_->make<TH2F>("h_2DsumPedestalLS3", " ", neta, -41., 41., nphi, 0., bphi);
7064  h_sumPedestalperLS3 = fs_->make<TH1F>("h_sumPedestalperLS3", " ", bac, 1., bac2);
7065  h_2D0sumPedestalLS3 = fs_->make<TH2F>("h_2D0sumPedestalLS3", " ", neta, -41., 41., nphi, 0., bphi);
7066  h_sum0PedestalperLS3 = fs_->make<TH1F>("h_sum0PedestalperLS3", " ", bac, 1., bac2);
7067 
7068  h_sumPedestalLS4 = fs_->make<TH1F>("h_sumPedestalLS4", " ", 100, 0., pst1);
7069  h_2DsumPedestalLS4 = fs_->make<TH2F>("h_2DsumPedestalLS4", " ", neta, -41., 41., nphi, 0., bphi);
7070  h_sumPedestalperLS4 = fs_->make<TH1F>("h_sumPedestalperLS4", " ", bac, 1., bac2);
7071  h_2D0sumPedestalLS4 = fs_->make<TH2F>("h_2D0sumPedestalLS4", " ", neta, -41., 41., nphi, 0., bphi);
7072  h_sum0PedestalperLS4 = fs_->make<TH1F>("h_sum0PedestalperLS4", " ", bac, 1., bac2);
7073 
7074  h_sumPedestalLS5 = fs_->make<TH1F>("h_sumPedestalLS5", " ", 100, 0., pst1);
7075  h_2DsumPedestalLS5 = fs_->make<TH2F>("h_2DsumPedestalLS5", " ", neta, -41., 41., nphi, 0., bphi);
7076  h_sumPedestalperLS5 = fs_->make<TH1F>("h_sumPedestalperLS5", " ", bac, 1., bac2);
7077  h_2D0sumPedestalLS5 = fs_->make<TH2F>("h_2D0sumPedestalLS5", " ", neta, -41., 41., nphi, 0., bphi);
7078  h_sum0PedestalperLS5 = fs_->make<TH1F>("h_sum0PedestalperLS5", " ", bac, 1., bac2);
7079 
7080  h_sumPedestalLS6 = fs_->make<TH1F>("h_sumPedestalLS6", " ", 100, 0., pst1);
7081  h_2DsumPedestalLS6 = fs_->make<TH2F>("h_2DsumPedestalLS6", " ", neta, -41., 41., nphi, 0., bphi);
7082  h_sumPedestalperLS6 = fs_->make<TH1F>("h_sumPedestalperLS6", " ", bac, 1., bac2);
7083  h_2D0sumPedestalLS6 = fs_->make<TH2F>("h_2D0sumPedestalLS6", " ", neta, -41., 41., nphi, 0., bphi);
7084  h_sum0PedestalperLS6 = fs_->make<TH1F>("h_sum0PedestalperLS6", " ", bac, 1., bac2);
7085 
7086  h_sumPedestalLS7 = fs_->make<TH1F>("h_sumPedestalLS7", " ", 100, 0., pst1);
7087  h_2DsumPedestalLS7 = fs_->make<TH2F>("h_2DsumPedestalLS7", " ", neta, -41., 41., nphi, 0., bphi);
7088  h_sumPedestalperLS7 = fs_->make<TH1F>("h_sumPedestalperLS7", " ", bac, 1., bac2);
7089  h_2D0sumPedestalLS7 = fs_->make<TH2F>("h_2D0sumPedestalLS7", " ", neta, -41., 41., nphi, 0., bphi);
7090  h_sum0PedestalperLS7 = fs_->make<TH1F>("h_sum0PedestalperLS7", " ", bac, 1., bac2);
7091 
7092  h_sumPedestalLS8 = fs_->make<TH1F>("h_sumPedestalLS8", " ", 100, 0., pst1);
7093  h_2DsumPedestalLS8 = fs_->make<TH2F>("h_2DsumPedestalLS8", " ", neta, -41., 41., nphi, 0., bphi);
7094  h_sumPedestalperLS8 = fs_->make<TH1F>("h_sumPedestalperLS8", " ", bac, 1., bac2);
7095  h_2D0sumPedestalLS8 = fs_->make<TH2F>("h_2D0sumPedestalLS8", " ", neta, -41., 41., nphi, 0., bphi);
7096  h_sum0PedestalperLS8 = fs_->make<TH1F>("h_sum0PedestalperLS8", " ", bac, 1., bac2);
7097 
7098  //--------------------------------------------------
7099  // for estimator1:
7100  h_sumADCAmplLS1copy1 = fs_->make<TH1F>("h_sumADCAmplLS1copy1", " ", 100, 0., 10000);
7101  h_sumADCAmplLS1copy2 = fs_->make<TH1F>("h_sumADCAmplLS1copy2", " ", 100, 0., 20000);
7102  h_sumADCAmplLS1copy3 = fs_->make<TH1F>("h_sumADCAmplLS1copy3", " ", 100, 0., 50000);
7103  h_sumADCAmplLS1copy4 = fs_->make<TH1F>("h_sumADCAmplLS1copy4", " ", 100, 0., 100000);
7104  h_sumADCAmplLS1copy5 = fs_->make<TH1F>("h_sumADCAmplLS1copy5", " ", 100, 0., 150000);
7105  h_sumADCAmplLS1 = fs_->make<TH1F>("h_sumADCAmplLS1", " ", 100, 0., lsdep_estimator1_HBdepth1_);
7106  h_2DsumADCAmplLS1 = fs_->make<TH2F>("h_2DsumADCAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7108  fs_->make<TH2F>("h_2DsumADCAmplLS1_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7109  h_sumADCAmplperLS1 = fs_->make<TH1F>("h_sumADCAmplperLS1", " ", bac, 1., bac2);
7110  h_sumCutADCAmplperLS1 = fs_->make<TH1F>("h_sumCutADCAmplperLS1", " ", bac, 1., bac2);
7111  h_2D0sumADCAmplLS1 = fs_->make<TH2F>("h_2D0sumADCAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7112  h_sum0ADCAmplperLS1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1", " ", bac, 1., bac2);
7113 
7114  h_sumADCAmplLS2 = fs_->make<TH1F>("h_sumADCAmplLS2", " ", 100, 0., lsdep_estimator1_HBdepth2_);
7115  h_2DsumADCAmplLS2 = fs_->make<TH2F>("h_2DsumADCAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7117  fs_->make<TH2F>("h_2DsumADCAmplLS2_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7118  h_sumADCAmplperLS2 = fs_->make<TH1F>("h_sumADCAmplperLS2", " ", bac, 1., bac2);
7119  h_sumCutADCAmplperLS2 = fs_->make<TH1F>("h_sumCutADCAmplperLS2", " ", bac, 1., bac2);
7120  h_2D0sumADCAmplLS2 = fs_->make<TH2F>("h_2D0sumADCAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7121  h_sum0ADCAmplperLS2 = fs_->make<TH1F>("h_sum0ADCAmplperLS2", " ", bac, 1., bac2);
7122 
7123  h_sumADCAmplLS3 = fs_->make<TH1F>("h_sumADCAmplLS3", " ", 100, 0., lsdep_estimator1_HEdepth1_);
7124  h_2DsumADCAmplLS3 = fs_->make<TH2F>("h_2DsumADCAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7126  fs_->make<TH2F>("h_2DsumADCAmplLS3_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7127  h_sumADCAmplperLS3 = fs_->make<TH1F>("h_sumADCAmplperLS3", " ", bac, 1., bac2);
7128  h_sumCutADCAmplperLS3 = fs_->make<TH1F>("h_sumCutADCAmplperLS3", " ", bac, 1., bac2);
7129  h_2D0sumADCAmplLS3 = fs_->make<TH2F>("h_2D0sumADCAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7130  h_sum0ADCAmplperLS3 = fs_->make<TH1F>("h_sum0ADCAmplperLS3", " ", bac, 1., bac2);
7131 
7132  h_sumADCAmplLS4 = fs_->make<TH1F>("h_sumADCAmplLS4", " ", 100, 0., lsdep_estimator1_HEdepth2_);
7133  h_2DsumADCAmplLS4 = fs_->make<TH2F>("h_2DsumADCAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7135  fs_->make<TH2F>("h_2DsumADCAmplLS4_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7136  h_sumADCAmplperLS4 = fs_->make<TH1F>("h_sumADCAmplperLS4", " ", bac, 1., bac2);
7137  h_sumCutADCAmplperLS4 = fs_->make<TH1F>("h_sumCutADCAmplperLS4", " ", bac, 1., bac2);
7138  h_2D0sumADCAmplLS4 = fs_->make<TH2F>("h_2D0sumADCAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7139  h_sum0ADCAmplperLS4 = fs_->make<TH1F>("h_sum0ADCAmplperLS4", " ", bac, 1., bac2);
7140 
7141  h_sumADCAmplLS5 = fs_->make<TH1F>("h_sumADCAmplLS5", " ", 100, 0., lsdep_estimator1_HEdepth3_);
7142  h_2DsumADCAmplLS5 = fs_->make<TH2F>("h_2DsumADCAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7144  fs_->make<TH2F>("h_2DsumADCAmplLS5_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7145  h_sumADCAmplperLS5 = fs_->make<TH1F>("h_sumADCAmplperLS5", " ", bac, 1., bac2);
7146  h_sumCutADCAmplperLS5 = fs_->make<TH1F>("h_sumCutADCAmplperLS5", " ", bac, 1., bac2);
7147  h_2D0sumADCAmplLS5 = fs_->make<TH2F>("h_2D0sumADCAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7148  h_sum0ADCAmplperLS5 = fs_->make<TH1F>("h_sum0ADCAmplperLS5", " ", bac, 1., bac2);
7149  // HE upgrade depth4
7150  h_sumADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7151  h_sumCutADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7152  h_sum0ADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7153 
7154  // HE upgrade depth5
7155  h_sumADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7156  h_sumCutADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7157  h_sum0ADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7158  // HE upgrade depth6
7159  h_sumADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7160  h_sumCutADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7161  h_sum0ADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7162  // HE upgrade depth7
7163  h_sumADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7164  h_sumCutADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7165  h_sum0ADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7166  // for HE gain stability vs LS:
7167  h_2DsumADCAmplLSdepth4HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HEu", " ", neta, -41., 41., nphi, 0., bphi);
7168  h_2D0sumADCAmplLSdepth4HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HEu", " ", neta, -41., 41., nphi, 0., bphi);
7169  h_2DsumADCAmplLSdepth5HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth5HEu", " ", neta, -41., 41., nphi, 0., bphi);
7170  h_2D0sumADCAmplLSdepth5HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth5HEu", " ", neta, -41., 41., nphi, 0., bphi);
7171  h_2DsumADCAmplLSdepth6HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth6HEu", " ", neta, -41., 41., nphi, 0., bphi);
7172  h_2D0sumADCAmplLSdepth6HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth6HEu", " ", neta, -41., 41., nphi, 0., bphi);
7173  h_2DsumADCAmplLSdepth7HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth7HEu", " ", neta, -41., 41., nphi, 0., bphi);
7174  h_2D0sumADCAmplLSdepth7HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth7HEu", " ", neta, -41., 41., nphi, 0., bphi);
7175  h_2DsumADCAmplLSdepth3HFu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth3HFu", " ", neta, -41., 41., nphi, 0., bphi);
7176  h_2D0sumADCAmplLSdepth3HFu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth3HFu", " ", neta, -41., 41., nphi, 0., bphi);
7177  h_2DsumADCAmplLSdepth4HFu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HFu", " ", neta, -41., 41., nphi, 0., bphi);
7178  h_2D0sumADCAmplLSdepth4HFu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HFu", " ", neta, -41., 41., nphi, 0., bphi);
7179 
7180  h_sumADCAmplLS6 = fs_->make<TH1F>("h_sumADCAmplLS6", " ", 100, 0., lsdep_estimator1_HFdepth1_);
7181  h_2DsumADCAmplLS6 = fs_->make<TH2F>("h_2DsumADCAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7183  fs_->make<TH2F>("h_2DsumADCAmplLS6_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7184  h_2D0sumADCAmplLS6 = fs_->make<TH2F>("h_2D0sumADCAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7185  h_sumADCAmplperLS6 = fs_->make<TH1F>("h_sumADCAmplperLS6", " ", bac, 1., bac2);
7186  h_sumCutADCAmplperLS6 = fs_->make<TH1F>("h_sumCutADCAmplperLS6", " ", bac, 1., bac2);
7187  h_sum0ADCAmplperLS6 = fs_->make<TH1F>("h_sum0ADCAmplperLS6", " ", bac, 1., bac2);
7188  // HF upgrade depth3
7189  h_sumADCAmplperLS6u = fs_->make<TH1F>("h_sumADCAmplperLS6u", " ", bac, 1., bac2);
7190  h_sumCutADCAmplperLS6u = fs_->make<TH1F>("h_sumCutADCAmplperLS6u", " ", bac, 1., bac2);
7191  h_sum0ADCAmplperLS6u = fs_->make<TH1F>("h_sum0ADCAmplperLS6u", " ", bac, 1., bac2);
7192 
7193  h_sumADCAmplLS7 = fs_->make<TH1F>("h_sumADCAmplLS7", " ", 100, 0., lsdep_estimator1_HFdepth2_);
7194  h_2DsumADCAmplLS7 = fs_->make<TH2F>("h_2DsumADCAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7196  fs_->make<TH2F>("h_2DsumADCAmplLS7_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7197  h_2D0sumADCAmplLS7 = fs_->make<TH2F>("h_2D0sumADCAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7198  h_sumADCAmplperLS7 = fs_->make<TH1F>("h_sumADCAmplperLS7", " ", bac, 1., bac2);
7199  h_sumCutADCAmplperLS7 = fs_->make<TH1F>("h_sumCutADCAmplperLS7", " ", bac, 1., bac2);
7200  h_sum0ADCAmplperLS7 = fs_->make<TH1F>("h_sum0ADCAmplperLS7", " ", bac, 1., bac2);
7201  // HF upgrade depth4
7202  h_sumADCAmplperLS7u = fs_->make<TH1F>("h_sumADCAmplperLS7u", " ", bac, 1., bac2);
7203  h_sumCutADCAmplperLS7u = fs_->make<TH1F>("h_sumCutADCAmplperLS7u", " ", bac, 1., bac2);
7204  h_sum0ADCAmplperLS7u = fs_->make<TH1F>("h_sum0ADCAmplperLS7u", " ", bac, 1., bac2);
7205 
7206  h_sumADCAmplLS8 = fs_->make<TH1F>("h_sumADCAmplLS8", " ", 100, 0., lsdep_estimator1_HOdepth4_);
7207  h_2DsumADCAmplLS8 = fs_->make<TH2F>("h_2DsumADCAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7209  fs_->make<TH2F>("h_2DsumADCAmplLS8_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7210  h_sumADCAmplperLS8 = fs_->make<TH1F>("h_sumADCAmplperLS8", " ", bac, 1., bac2);
7211  h_sumCutADCAmplperLS8 = fs_->make<TH1F>("h_sumCutADCAmplperLS8", " ", bac, 1., bac2);
7212  h_2D0sumADCAmplLS8 = fs_->make<TH2F>("h_2D0sumADCAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7213  h_sum0ADCAmplperLS8 = fs_->make<TH1F>("h_sum0ADCAmplperLS8", " ", bac, 1., bac2);
7214 
7215  // HB upgrade depth3
7216  h_sumADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sumADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7217  h_sumCutADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7218  h_sum0ADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7219  // HB upgrade depth4
7220  h_sumADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sumADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7221  h_sumCutADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7222  h_sum0ADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7223 
7224  // for HB gain stability vs LS:
7225  h_2DsumADCAmplLSdepth3HBu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth3HBu", " ", neta, -41., 41., nphi, 0., bphi);
7226  h_2D0sumADCAmplLSdepth3HBu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth3HBu", " ", neta, -41., 41., nphi, 0., bphi);
7227  h_2DsumADCAmplLSdepth4HBu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HBu", " ", neta, -41., 41., nphi, 0., bphi);
7228  h_2D0sumADCAmplLSdepth4HBu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HBu", " ", neta, -41., 41., nphi, 0., bphi);
7229 
7230  // error-A for HB( depth1 only)
7231  h_sumADCAmplperLS1_P1 = fs_->make<TH1F>("h_sumADCAmplperLS1_P1", " ", bac, 1., bac2);
7232  h_sum0ADCAmplperLS1_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_P1", " ", bac, 1., bac2);
7233  h_sumADCAmplperLS1_P2 = fs_->make<TH1F>("h_sumADCAmplperLS1_P2", " ", bac, 1., bac2);
7234  h_sum0ADCAmplperLS1_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_P2", " ", bac, 1., bac2);
7235  h_sumADCAmplperLS1_M1 = fs_->make<TH1F>("h_sumADCAmplperLS1_M1", " ", bac, 1., bac2);
7236  h_sum0ADCAmplperLS1_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_M1", " ", bac, 1., bac2);
7237  h_sumADCAmplperLS1_M2 = fs_->make<TH1F>("h_sumADCAmplperLS1_M2", " ", bac, 1., bac2);
7238  h_sum0ADCAmplperLS1_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_M2", " ", bac, 1., bac2);
7239 
7240  // error-A for HE( depth1 only)
7241  h_sumADCAmplperLS3_P1 = fs_->make<TH1F>("h_sumADCAmplperLS3_P1", " ", bac, 1., bac2);
7242  h_sum0ADCAmplperLS3_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_P1", " ", bac, 1., bac2);
7243  h_sumADCAmplperLS3_P2 = fs_->make<TH1F>("h_sumADCAmplperLS3_P2", " ", bac, 1., bac2);
7244  h_sum0ADCAmplperLS3_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_P2", " ", bac, 1., bac2);
7245  h_sumADCAmplperLS3_M1 = fs_->make<TH1F>("h_sumADCAmplperLS3_M1", " ", bac, 1., bac2);
7246  h_sum0ADCAmplperLS3_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_M1", " ", bac, 1., bac2);
7247  h_sumADCAmplperLS3_M2 = fs_->make<TH1F>("h_sumADCAmplperLS3_M2", " ", bac, 1., bac2);
7248  h_sum0ADCAmplperLS3_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_M2", " ", bac, 1., bac2);
7249 
7250  // error-A for HF( depth1 only)
7251  h_sumADCAmplperLS6_P1 = fs_->make<TH1F>("h_sumADCAmplperLS6_P1", " ", bac, 1., bac2);
7252  h_sum0ADCAmplperLS6_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_P1", " ", bac, 1., bac2);
7253  h_sumADCAmplperLS6_P2 = fs_->make<TH1F>("h_sumADCAmplperLS6_P2", " ", bac, 1., bac2);
7254  h_sum0ADCAmplperLS6_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_P2", " ", bac, 1., bac2);
7255  h_sumADCAmplperLS6_M1 = fs_->make<TH1F>("h_sumADCAmplperLS6_M1", " ", bac, 1., bac2);
7256  h_sum0ADCAmplperLS6_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_M1", " ", bac, 1., bac2);
7257  h_sumADCAmplperLS6_M2 = fs_->make<TH1F>("h_sumADCAmplperLS6_M2", " ", bac, 1., bac2);
7258  h_sum0ADCAmplperLS6_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_M2", " ", bac, 1., bac2);
7259 
7260  // error-A for HO( depth4 only)
7261  h_sumADCAmplperLS8_P1 = fs_->make<TH1F>("h_sumADCAmplperLS8_P1", " ", bac, 1., bac2);
7262  h_sum0ADCAmplperLS8_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_P1", " ", bac, 1., bac2);
7263  h_sumADCAmplperLS8_P2 = fs_->make<TH1F>("h_sumADCAmplperLS8_P2", " ", bac, 1., bac2);
7264  h_sum0ADCAmplperLS8_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_P2", " ", bac, 1., bac2);
7265  h_sumADCAmplperLS8_M1 = fs_->make<TH1F>("h_sumADCAmplperLS8_M1", " ", bac, 1., bac2);
7266  h_sum0ADCAmplperLS8_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_M1", " ", bac, 1., bac2);
7267  h_sumADCAmplperLS8_M2 = fs_->make<TH1F>("h_sumADCAmplperLS8_M2", " ", bac, 1., bac2);
7268  h_sum0ADCAmplperLS8_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_M2", " ", bac, 1., bac2);
7269 
7270  //--------------------------------------------------
7271  h_sumTSmeanALS1 = fs_->make<TH1F>("h_sumTSmeanALS1", " ", 100, 0., lsdep_estimator2_HBdepth1_);
7272  h_2DsumTSmeanALS1 = fs_->make<TH2F>("h_2DsumTSmeanALS1", " ", neta, -41., 41., nphi, 0., bphi);
7273  h_sumTSmeanAperLS1 = fs_->make<TH1F>("h_sumTSmeanAperLS1", " ", bac, 1., bac2);
7274  h_sumTSmeanAperLS1_LSselected = fs_->make<TH1F>("h_sumTSmeanAperLS1_LSselected", " ", bac, 1., bac2);
7275  h_sumCutTSmeanAperLS1 = fs_->make<TH1F>("h_sumCutTSmeanAperLS1", " ", bac, 1., bac2);
7276  h_2D0sumTSmeanALS1 = fs_->make<TH2F>("h_2D0sumTSmeanALS1", " ", neta, -41., 41., nphi, 0., bphi);
7277  h_sum0TSmeanAperLS1 = fs_->make<TH1F>("h_sum0TSmeanAperLS1", " ", bac, 1., bac2);
7278 
7279  h_sumTSmeanALS2 = fs_->make<TH1F>("h_sumTSmeanALS2", " ", 100, 0., lsdep_estimator2_HBdepth2_);
7280  h_2DsumTSmeanALS2 = fs_->make<TH2F>("h_2DsumTSmeanALS2", " ", neta, -41., 41., nphi, 0., bphi);
7281  h_sumTSmeanAperLS2 = fs_->make<TH1F>("h_sumTSmeanAperLS2", " ", bac, 1., bac2);
7282  h_sumCutTSmeanAperLS2 = fs_->make<TH1F>("h_sumCutTSmeanAperLS2", " ", bac, 1., bac2);
7283  h_2D0sumTSmeanALS2 = fs_->make<TH2F>("h_2D0sumTSmeanALS2", " ", neta, -41., 41., nphi, 0., bphi);
7284  h_sum0TSmeanAperLS2 = fs_->make<TH1F>("h_sum0TSmeanAperLS2", " ", bac, 1., bac2);
7285 
7286  h_sumTSmeanALS3 = fs_->make<TH1F>("h_sumTSmeanALS3", " ", 100, 0., lsdep_estimator2_HEdepth1_);
7287  h_2DsumTSmeanALS3 = fs_->make<TH2F>("h_2DsumTSmeanALS3", " ", neta, -41., 41., nphi, 0., bphi);
7288  h_sumTSmeanAperLS3 = fs_->make<TH1F>("h_sumTSmeanAperLS3", " ", bac, 1., bac2);
7289  h_sumCutTSmeanAperLS3 = fs_->make<TH1F>("h_sumCutTSmeanAperLS3", " ", bac, 1., bac2);
7290  h_2D0sumTSmeanALS3 = fs_->make<TH2F>("h_2D0sumTSmeanALS3", " ", neta, -41., 41., nphi, 0., bphi);
7291  h_sum0TSmeanAperLS3 = fs_->make<TH1F>("h_sum0TSmeanAperLS3", " ", bac, 1., bac2);
7292 
7293  h_sumTSmeanALS4 = fs_->make<TH1F>("h_sumTSmeanALS4", " ", 100, 0., lsdep_estimator2_HEdepth2_);
7294  h_2DsumTSmeanALS4 = fs_->make<TH2F>("h_2DsumTSmeanALS4", " ", neta, -41., 41., nphi, 0., bphi);
7295  h_sumTSmeanAperLS4 = fs_->make<TH1F>("h_sumTSmeanAperLS4", " ", bac, 1., bac2);
7296  h_sumCutTSmeanAperLS4 = fs_->make<TH1F>("h_sumCutTSmeanAperLS4", " ", bac, 1., bac2);
7297  h_2D0sumTSmeanALS4 = fs_->make<TH2F>("h_2D0sumTSmeanALS4", " ", neta, -41., 41., nphi, 0., bphi);
7298  h_sum0TSmeanAperLS4 = fs_->make<TH1F>("h_sum0TSmeanAperLS4", " ", bac, 1., bac2);
7299 
7300  h_sumTSmeanALS5 = fs_->make<TH1F>("h_sumTSmeanALS5", " ", 100, 0., lsdep_estimator2_HEdepth3_);
7301  h_2DsumTSmeanALS5 = fs_->make<TH2F>("h_2DsumTSmeanALS5", " ", neta, -41., 41., nphi, 0., bphi);
7302  h_sumTSmeanAperLS5 = fs_->make<TH1F>("h_sumTSmeanAperLS5", " ", bac, 1., bac2);
7303  h_sumCutTSmeanAperLS5 = fs_->make<TH1F>("h_sumCutTSmeanAperLS5", " ", bac, 1., bac2);
7304  h_2D0sumTSmeanALS5 = fs_->make<TH2F>("h_2D0sumTSmeanALS5", " ", neta, -41., 41., nphi, 0., bphi);
7305  h_sum0TSmeanAperLS5 = fs_->make<TH1F>("h_sum0TSmeanAperLS5", " ", bac, 1., bac2);
7306 
7307  h_sumTSmeanALS6 = fs_->make<TH1F>("h_sumTSmeanALS6", " ", 100, 0., lsdep_estimator2_HFdepth1_);
7308  h_2DsumTSmeanALS6 = fs_->make<TH2F>("h_2DsumTSmeanALS6", " ", neta, -41., 41., nphi, 0., bphi);
7309  h_sumTSmeanAperLS6 = fs_->make<TH1F>("h_sumTSmeanAperLS6", " ", bac, 1., bac2);
7310  h_sumCutTSmeanAperLS6 = fs_->make<TH1F>("h_sumCutTSmeanAperLS6", " ", bac, 1., bac2);
7311  h_2D0sumTSmeanALS6 = fs_->make<TH2F>("h_2D0sumTSmeanALS6", " ", neta, -41., 41., nphi, 0., bphi);
7312  h_sum0TSmeanAperLS6 = fs_->make<TH1F>("h_sum0TSmeanAperLS6", " ", bac, 1., bac2);
7313 
7314  h_sumTSmeanALS7 = fs_->make<TH1F>("h_sumTSmeanALS7", " ", 100, 0., lsdep_estimator2_HFdepth2_);
7315  h_2DsumTSmeanALS7 = fs_->make<TH2F>("h_2DsumTSmeanALS7", " ", neta, -41., 41., nphi, 0., bphi);
7316  h_sumTSmeanAperLS7 = fs_->make<TH1F>("h_sumTSmeanAperLS7", " ", bac, 1., bac2);
7317  h_sumCutTSmeanAperLS7 = fs_->make<TH1F>("h_sumCutTSmeanAperLS7", " ", bac, 1., bac2);
7318  h_2D0sumTSmeanALS7 = fs_->make<TH2F>("h_2D0sumTSmeanALS7", " ", neta, -41., 41., nphi, 0., bphi);
7319  h_sum0TSmeanAperLS7 = fs_->make<TH1F>("h_sum0TSmeanAperLS7", " ", bac, 1., bac2);
7320 
7321  h_sumTSmeanALS8 = fs_->make<TH1F>("h_sumTSmeanALS8", " ", 100, 0., lsdep_estimator2_HOdepth4_);
7322  h_2DsumTSmeanALS8 = fs_->make<TH2F>("h_2DsumTSmeanALS8", " ", neta, -41., 41., nphi, 0., bphi);
7323  h_sumTSmeanAperLS8 = fs_->make<TH1F>("h_sumTSmeanAperLS8", " ", bac, 1., bac2);
7324  h_sumCutTSmeanAperLS8 = fs_->make<TH1F>("h_sumCutTSmeanAperLS8", " ", bac, 1., bac2);
7325  h_2D0sumTSmeanALS8 = fs_->make<TH2F>("h_2D0sumTSmeanALS8", " ", neta, -41., 41., nphi, 0., bphi);
7326  h_sum0TSmeanAperLS8 = fs_->make<TH1F>("h_sum0TSmeanAperLS8", " ", bac, 1., bac2);
7327  //--------------------------------------------------
7328  // for estimator3:
7329  h_sumTSmaxALS1 = fs_->make<TH1F>("h_sumTSmaxALS1", " ", 100, 0., lsdep_estimator3_HBdepth1_);
7330  h_2DsumTSmaxALS1 = fs_->make<TH2F>("h_2DsumTSmaxALS1", " ", neta, -41., 41., nphi, 0., bphi);
7331  h_sumTSmaxAperLS1 = fs_->make<TH1F>("h_sumTSmaxAperLS1", " ", bac, 1., bac2);
7332  h_sumTSmaxAperLS1_LSselected = fs_->make<TH1F>("h_sumTSmaxAperLS1_LSselected", " ", bac, 1., bac2);
7333  h_sumCutTSmaxAperLS1 = fs_->make<TH1F>("h_sumCutTSmaxAperLS1", " ", bac, 1., bac2);
7334  h_2D0sumTSmaxALS1 = fs_->make<TH2F>("h_2D0sumTSmaxALS1", " ", neta, -41., 41., nphi, 0., bphi);
7335  h_sum0TSmaxAperLS1 = fs_->make<TH1F>("h_sum0TSmaxAperLS1", " ", bac, 1., bac2);
7336 
7337  h_sumTSmaxALS2 = fs_->make<TH1F>("h_sumTSmaxALS2", " ", 100, 0., lsdep_estimator3_HBdepth2_);
7338  h_2DsumTSmaxALS2 = fs_->make<TH2F>("h_2DsumTSmaxALS2", " ", neta, -41., 41., nphi, 0., bphi);
7339  h_sumTSmaxAperLS2 = fs_->make<TH1F>("h_sumTSmaxAperLS2", " ", bac, 1., bac2);
7340  h_sumCutTSmaxAperLS2 = fs_->make<TH1F>("h_sumCutTSmaxAperLS2", " ", bac, 1., bac2);
7341  h_2D0sumTSmaxALS2 = fs_->make<TH2F>("h_2D0sumTSmaxALS2", " ", neta, -41., 41., nphi, 0., bphi);
7342  h_sum0TSmaxAperLS2 = fs_->make<TH1F>("h_sum0TSmaxAperLS2", " ", bac, 1., bac2);
7343 
7344  h_sumTSmaxALS3 = fs_->make<TH1F>("h_sumTSmaxALS3", " ", 100, 0., lsdep_estimator3_HEdepth1_);
7345  h_2DsumTSmaxALS3 = fs_->make<TH2F>("h_2DsumTSmaxALS3", " ", neta, -41., 41., nphi, 0., bphi);
7346  h_sumTSmaxAperLS3 = fs_->make<TH1F>("h_sumTSmaxAperLS3", " ", bac, 1., bac2);
7347  h_sumCutTSmaxAperLS3 = fs_->make<TH1F>("h_sumCutTSmaxAperLS3", " ", bac, 1., bac2);
7348  h_2D0sumTSmaxALS3 = fs_->make<TH2F>("h_2D0sumTSmaxALS3", " ", neta, -41., 41., nphi, 0., bphi);
7349  h_sum0TSmaxAperLS3 = fs_->make<TH1F>("h_sum0TSmaxAperLS3", " ", bac, 1., bac2);
7350 
7351  h_sumTSmaxALS4 = fs_->make<TH1F>("h_sumTSmaxALS4", " ", 100, 0., lsdep_estimator3_HEdepth2_);
7352  h_2DsumTSmaxALS4 = fs_->make<TH2F>("h_2DsumTSmaxALS4", " ", neta, -41., 41., nphi, 0., bphi);
7353  h_sumTSmaxAperLS4 = fs_->make<TH1F>("h_sumTSmaxAperLS4", " ", bac, 1., bac2);
7354  h_sumCutTSmaxAperLS4 = fs_->make<TH1F>("h_sumCutTSmaxAperLS4", " ", bac, 1., bac2);
7355  h_2D0sumTSmaxALS4 = fs_->make<TH2F>("h_2D0sumTSmaxALS4", " ", neta, -41., 41., nphi, 0., bphi);
7356  h_sum0TSmaxAperLS4 = fs_->make<TH1F>("h_sum0TSmaxAperLS4", " ", bac, 1., bac2);
7357 
7358  h_sumTSmaxALS5 = fs_->make<TH1F>("h_sumTSmaxALS5", " ", 100, 0., lsdep_estimator3_HEdepth3_);
7359  h_2DsumTSmaxALS5 = fs_->make<TH2F>("h_2DsumTSmaxALS5", " ", neta, -41., 41., nphi, 0., bphi);
7360  h_sumTSmaxAperLS5 = fs_->make<TH1F>("h_sumTSmaxAperLS5", " ", bac, 1., bac2);
7361  h_sumCutTSmaxAperLS5 = fs_->make<TH1F>("h_sumCutTSmaxAperLS5", " ", bac, 1., bac2);
7362  h_2D0sumTSmaxALS5 = fs_->make<TH2F>("h_2D0sumTSmaxALS5", " ", neta, -41., 41., nphi, 0., bphi);
7363  h_sum0TSmaxAperLS5 = fs_->make<TH1F>("h_sum0TSmaxAperLS5", " ", bac, 1., bac2);
7364 
7365  h_sumTSmaxALS6 = fs_->make<TH1F>("h_sumTSmaxALS6", " ", 100, 0., lsdep_estimator3_HFdepth1_);
7366  h_2DsumTSmaxALS6 = fs_->make<TH2F>("h_2DsumTSmaxALS6", " ", neta, -41., 41., nphi, 0., bphi);
7367  h_sumTSmaxAperLS6 = fs_->make<TH1F>("h_sumTSmaxAperLS6", " ", bac, 1., bac2);
7368  h_sumCutTSmaxAperLS6 = fs_->make<TH1F>("h_sumCutTSmaxAperLS6", " ", bac, 1., bac2);
7369  h_2D0sumTSmaxALS6 = fs_->make<TH2F>("h_2D0sumTSmaxALS6", " ", neta, -41., 41., nphi, 0., bphi);
7370  h_sum0TSmaxAperLS6 = fs_->make<TH1F>("h_sum0TSmaxAperLS6", " ", bac, 1., bac2);
7371 
7372  h_sumTSmaxALS7 = fs_->make<TH1F>("h_sumTSmaxALS7", " ", 100, 0., lsdep_estimator3_HFdepth2_);
7373  h_2DsumTSmaxALS7 = fs_->make<TH2F>("h_2DsumTSmaxALS7", " ", neta, -41., 41., nphi, 0., bphi);
7374  h_sumTSmaxAperLS7 = fs_->make<TH1F>("h_sumTSmaxAperLS7", " ", bac, 1., bac2);
7375  h_sumCutTSmaxAperLS7 = fs_->make<TH1F>("h_sumCutTSmaxAperLS7", " ", bac, 1., bac2);
7376  h_2D0sumTSmaxALS7 = fs_->make<TH2F>("h_2D0sumTSmaxALS7", " ", neta, -41., 41., nphi, 0., bphi);
7377  h_sum0TSmaxAperLS7 = fs_->make<TH1F>("h_sum0TSmaxAperLS7", " ", bac, 1., bac2);
7378 
7379  h_sumTSmaxALS8 = fs_->make<TH1F>("h_sumTSmaxALS8", " ", 100, 0., lsdep_estimator3_HOdepth4_);
7380  h_2DsumTSmaxALS8 = fs_->make<TH2F>("h_2DsumTSmaxALS8", " ", neta, -41., 41., nphi, 0., bphi);
7381  h_sumTSmaxAperLS8 = fs_->make<TH1F>("h_sumTSmaxAperLS8", " ", bac, 1., bac2);
7382  h_sumCutTSmaxAperLS8 = fs_->make<TH1F>("h_sumCutTSmaxAperLS8", " ", bac, 1., bac2);
7383  h_2D0sumTSmaxALS8 = fs_->make<TH2F>("h_2D0sumTSmaxALS8", " ", neta, -41., 41., nphi, 0., bphi);
7384  h_sum0TSmaxAperLS8 = fs_->make<TH1F>("h_sum0TSmaxAperLS8", " ", bac, 1., bac2);
7385  //--------------------------------------------------
7386  // for estimator4:
7387  h_sumAmplitudeLS1 = fs_->make<TH1F>("h_sumAmplitudeLS1", " ", 100, 0.0, lsdep_estimator4_HBdepth1_);
7388  h_2DsumAmplitudeLS1 = fs_->make<TH2F>("h_2DsumAmplitudeLS1", " ", neta, -41., 41., nphi, 0., bphi);
7389  h_sumAmplitudeperLS1 = fs_->make<TH1F>("h_sumAmplitudeperLS1", " ", bac, 1., bac2);
7390  h_sumAmplitudeperLS1_LSselected = fs_->make<TH1F>("h_sumAmplitudeperLS1_LSselected", " ", bac, 1., bac2);
7391  h_sumCutAmplitudeperLS1 = fs_->make<TH1F>("h_sumCutAmplitudeperLS1", " ", bac, 1., bac2);
7392  h_2D0sumAmplitudeLS1 = fs_->make<TH2F>("h_2D0sumAmplitudeLS1", " ", neta, -41., 41., nphi, 0., bphi);
7393  h_sum0AmplitudeperLS1 = fs_->make<TH1F>("h_sum0AmplitudeperLS1", " ", bac, 1., bac2);
7394 
7395  h_sumAmplitudeLS2 = fs_->make<TH1F>("h_sumAmplitudeLS2", " ", 100, 0.0, lsdep_estimator4_HBdepth2_);
7396  h_2DsumAmplitudeLS2 = fs_->make<TH2F>("h_2DsumAmplitudeLS2", " ", neta, -41., 41., nphi, 0., bphi);
7397  h_sumAmplitudeperLS2 = fs_->make<TH1F>("h_sumAmplitudeperLS2", " ", bac, 1., bac2);
7398  h_sumCutAmplitudeperLS2 = fs_->make<TH1F>("h_sumCutAmplitudeperLS2", " ", bac, 1., bac2);
7399  h_2D0sumAmplitudeLS2 = fs_->make<TH2F>("h_2D0sumAmplitudeLS2", " ", neta, -41., 41., nphi, 0., bphi);
7400  h_sum0AmplitudeperLS2 = fs_->make<TH1F>("h_sum0AmplitudeperLS2", " ", bac, 1., bac2);
7401 
7402  h_sumAmplitudeLS3 = fs_->make<TH1F>("h_sumAmplitudeLS3", " ", 100, 0.0, lsdep_estimator4_HEdepth1_);
7403  h_2DsumAmplitudeLS3 = fs_->make<TH2F>("h_2DsumAmplitudeLS3", " ", neta, -41., 41., nphi, 0., bphi);
7404  h_sumAmplitudeperLS3 = fs_->make<TH1F>("h_sumAmplitudeperLS3", " ", bac, 1., bac2);
7405  h_sumCutAmplitudeperLS3 = fs_->make<TH1F>("h_sumCutAmplitudeperLS3", " ", bac, 1., bac2);
7406  h_2D0sumAmplitudeLS3 = fs_->make<TH2F>("h_2D0sumAmplitudeLS3", " ", neta, -41., 41., nphi, 0., bphi);
7407  h_sum0AmplitudeperLS3 = fs_->make<TH1F>("h_sum0AmplitudeperLS3", " ", bac, 1., bac2);
7408 
7409  h_sumAmplitudeLS4 = fs_->make<TH1F>("h_sumAmplitudeLS4", " ", 100, 0.0, lsdep_estimator4_HEdepth2_);
7410  h_2DsumAmplitudeLS4 = fs_->make<TH2F>("h_2DsumAmplitudeLS4", " ", neta, -41., 41., nphi, 0., bphi);
7411  h_sumAmplitudeperLS4 = fs_->make<TH1F>("h_sumAmplitudeperLS4", " ", bac, 1., bac2);
7412  h_sumCutAmplitudeperLS4 = fs_->make<TH1F>("h_sumCutAmplitudeperLS4", " ", bac, 1., bac2);
7413  h_2D0sumAmplitudeLS4 = fs_->make<TH2F>("h_2D0sumAmplitudeLS4", " ", neta, -41., 41., nphi, 0., bphi);
7414  h_sum0AmplitudeperLS4 = fs_->make<TH1F>("h_sum0AmplitudeperLS4", " ", bac, 1., bac2);
7415 
7416  h_sumAmplitudeLS5 = fs_->make<TH1F>("h_sumAmplitudeLS5", " ", 100, 0.0, lsdep_estimator4_HEdepth3_);
7417  h_2DsumAmplitudeLS5 = fs_->make<TH2F>("h_2DsumAmplitudeLS5", " ", neta, -41., 41., nphi, 0., bphi);
7418  h_sumAmplitudeperLS5 = fs_->make<TH1F>("h_sumAmplitudeperLS5", " ", bac, 1., bac2);
7419  h_sumCutAmplitudeperLS5 = fs_->make<TH1F>("h_sumCutAmplitudeperLS5", " ", bac, 1., bac2);
7420  h_2D0sumAmplitudeLS5 = fs_->make<TH2F>("h_2D0sumAmplitudeLS5", " ", neta, -41., 41., nphi, 0., bphi);
7421  h_sum0AmplitudeperLS5 = fs_->make<TH1F>("h_sum0AmplitudeperLS5", " ", bac, 1., bac2);
7422 
7423  h_sumAmplitudeLS6 = fs_->make<TH1F>("h_sumAmplitudeLS6", " ", 100, 0., lsdep_estimator4_HFdepth1_);
7424  h_2DsumAmplitudeLS6 = fs_->make<TH2F>("h_2DsumAmplitudeLS6", " ", neta, -41., 41., nphi, 0., bphi);
7425  h_sumAmplitudeperLS6 = fs_->make<TH1F>("h_sumAmplitudeperLS6", " ", bac, 1., bac2);
7426  h_sumCutAmplitudeperLS6 = fs_->make<TH1F>("h_sumCutAmplitudeperLS6", " ", bac, 1., bac2);
7427  h_2D0sumAmplitudeLS6 = fs_->make<TH2F>("h_2D0sumAmplitudeLS6", " ", neta, -41., 41., nphi, 0., bphi);
7428  h_sum0AmplitudeperLS6 = fs_->make<TH1F>("h_sum0AmplitudeperLS6", " ", bac, 1., bac2);
7429 
7430  h_sumAmplitudeLS7 = fs_->make<TH1F>("h_sumAmplitudeLS7", " ", 100, 0., lsdep_estimator4_HFdepth2_);
7431  h_2DsumAmplitudeLS7 = fs_->make<TH2F>("h_2DsumAmplitudeLS7", " ", neta, -41., 41., nphi, 0., bphi);
7432  h_sumAmplitudeperLS7 = fs_->make<TH1F>("h_sumAmplitudeperLS7", " ", bac, 1., bac2);
7433  h_sumCutAmplitudeperLS7 = fs_->make<TH1F>("h_sumCutAmplitudeperLS7", " ", bac, 1., bac2);
7434  h_2D0sumAmplitudeLS7 = fs_->make<TH2F>("h_2D0sumAmplitudeLS7", " ", neta, -41., 41., nphi, 0., bphi);
7435  h_sum0AmplitudeperLS7 = fs_->make<TH1F>("h_sum0AmplitudeperLS7", " ", bac, 1., bac2);
7436 
7437  h_sumAmplitudeLS8 = fs_->make<TH1F>("h_sumAmplitudeLS8", " ", 100, 0., lsdep_estimator4_HOdepth4_);
7438  h_2DsumAmplitudeLS8 = fs_->make<TH2F>("h_2DsumAmplitudeLS8", " ", neta, -41., 41., nphi, 0., bphi);
7439  h_sumAmplitudeperLS8 = fs_->make<TH1F>("h_sumAmplitudeperLS8", " ", bac, 1., bac2);
7440  h_sumCutAmplitudeperLS8 = fs_->make<TH1F>("h_sumCutAmplitudeperLS8", " ", bac, 1., bac2);
7441  h_2D0sumAmplitudeLS8 = fs_->make<TH2F>("h_2D0sumAmplitudeLS8", " ", neta, -41., 41., nphi, 0., bphi);
7442  h_sum0AmplitudeperLS8 = fs_->make<TH1F>("h_sum0AmplitudeperLS8", " ", bac, 1., bac2);
7443  //--------------------------------------------------
7444  // for estimator5:
7445  h_sumAmplLS1 = fs_->make<TH1F>("h_sumAmplLS1", " ", 100, 0.0, lsdep_estimator5_HBdepth1_);
7446  h_2DsumAmplLS1 = fs_->make<TH2F>("h_2DsumAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7447  h_sumAmplperLS1 = fs_->make<TH1F>("h_sumAmplperLS1", " ", bac, 1., bac2);
7448  h_sumAmplperLS1_LSselected = fs_->make<TH1F>("h_sumAmplperLS1_LSselected", " ", bac, 1., bac2);
7449  h_sumCutAmplperLS1 = fs_->make<TH1F>("h_sumCutAmplperLS1", " ", bac, 1., bac2);
7450  h_2D0sumAmplLS1 = fs_->make<TH2F>("h_2D0sumAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7451  h_sum0AmplperLS1 = fs_->make<TH1F>("h_sum0AmplperLS1", " ", bac, 1., bac2);
7452 
7453  h_sumAmplLS2 = fs_->make<TH1F>("h_sumAmplLS2", " ", 100, 0.0, lsdep_estimator5_HBdepth2_);
7454  h_2DsumAmplLS2 = fs_->make<TH2F>("h_2DsumAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7455  h_sumAmplperLS2 = fs_->make<TH1F>("h_sumAmplperLS2", " ", bac, 1., bac2);
7456  h_sumCutAmplperLS2 = fs_->make<TH1F>("h_sumCutAmplperLS2", " ", bac, 1., bac2);
7457  h_2D0sumAmplLS2 = fs_->make<TH2F>("h_2D0sumAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7458  h_sum0AmplperLS2 = fs_->make<TH1F>("h_sum0AmplperLS2", " ", bac, 1., bac2);
7459 
7460  h_sumAmplLS3 = fs_->make<TH1F>("h_sumAmplLS3", " ", 100, 0.0, lsdep_estimator5_HEdepth1_);
7461  h_2DsumAmplLS3 = fs_->make<TH2F>("h_2DsumAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7462  h_sumAmplperLS3 = fs_->make<TH1F>("h_sumAmplperLS3", " ", bac, 1., bac2);
7463  h_sumCutAmplperLS3 = fs_->make<TH1F>("h_sumCutAmplperLS3", " ", bac, 1., bac2);
7464  h_2D0sumAmplLS3 = fs_->make<TH2F>("h_2D0sumAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7465  h_sum0AmplperLS3 = fs_->make<TH1F>("h_sum0AmplperLS3", " ", bac, 1., bac2);
7466 
7467  h_sumAmplLS4 = fs_->make<TH1F>("h_sumAmplLS4", " ", 100, 0.0, lsdep_estimator5_HEdepth2_);
7468  h_2DsumAmplLS4 = fs_->make<TH2F>("h_2DsumAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7469  h_sumAmplperLS4 = fs_->make<TH1F>("h_sumAmplperLS4", " ", bac, 1., bac2);
7470  h_sumCutAmplperLS4 = fs_->make<TH1F>("h_sumCutAmplperLS4", " ", bac, 1., bac2);
7471  h_2D0sumAmplLS4 = fs_->make<TH2F>("h_2D0sumAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7472  h_sum0AmplperLS4 = fs_->make<TH1F>("h_sum0AmplperLS4", " ", bac, 1., bac2);
7473 
7474  h_sumAmplLS5 = fs_->make<TH1F>("h_sumAmplLS5", " ", 100, 0.0, lsdep_estimator5_HEdepth3_);
7475  h_2DsumAmplLS5 = fs_->make<TH2F>("h_2DsumAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7476  h_sumAmplperLS5 = fs_->make<TH1F>("h_sumAmplperLS5", " ", bac, 1., bac2);
7477  h_sumCutAmplperLS5 = fs_->make<TH1F>("h_sumCutAmplperLS5", " ", bac, 1., bac2);
7478  h_2D0sumAmplLS5 = fs_->make<TH2F>("h_2D0sumAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7479  h_sum0AmplperLS5 = fs_->make<TH1F>("h_sum0AmplperLS5", " ", bac, 1., bac2);
7480 
7481  h_sumAmplLS6 = fs_->make<TH1F>("h_sumAmplLS6", " ", 100, 0.0, lsdep_estimator5_HFdepth1_);
7482  h_2DsumAmplLS6 = fs_->make<TH2F>("h_2DsumAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7483  h_sumAmplperLS6 = fs_->make<TH1F>("h_sumAmplperLS6", " ", bac, 1., bac2);
7484  h_sumCutAmplperLS6 = fs_->make<TH1F>("h_sumCutAmplperLS6", " ", bac, 1., bac2);
7485  h_2D0sumAmplLS6 = fs_->make<TH2F>("h_2D0sumAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7486  h_sum0AmplperLS6 = fs_->make<TH1F>("h_sum0AmplperLS6", " ", bac, 1., bac2);
7487 
7488  h_RatioOccupancy_HBP = fs_->make<TH1F>("h_RatioOccupancy_HBP", " ", bac, 1., bac2);
7489  h_RatioOccupancy_HBM = fs_->make<TH1F>("h_RatioOccupancy_HBM", " ", bac, 1., bac2);
7490  h_RatioOccupancy_HEP = fs_->make<TH1F>("h_RatioOccupancy_HEP", " ", bac, 1., bac2);
7491  h_RatioOccupancy_HEM = fs_->make<TH1F>("h_RatioOccupancy_HEM", " ", bac, 1., bac2);
7492  h_RatioOccupancy_HOP = fs_->make<TH1F>("h_RatioOccupancy_HOP", " ", bac, 1., bac2);
7493  h_RatioOccupancy_HOM = fs_->make<TH1F>("h_RatioOccupancy_HOM", " ", bac, 1., bac2);
7494  h_RatioOccupancy_HFP = fs_->make<TH1F>("h_RatioOccupancy_HFP", " ", bac, 1., bac2);
7495  h_RatioOccupancy_HFM = fs_->make<TH1F>("h_RatioOccupancy_HFM", " ", bac, 1., bac2);
7496 
7497  h_sumAmplLS7 = fs_->make<TH1F>("h_sumAmplLS7", " ", 100, 0.0, lsdep_estimator5_HFdepth2_);
7498  h_2DsumAmplLS7 = fs_->make<TH2F>("h_2DsumAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7499  h_sumAmplperLS7 = fs_->make<TH1F>("h_sumAmplperLS7", " ", bac, 1., bac2);
7500  h_sumCutAmplperLS7 = fs_->make<TH1F>("h_sumCutAmplperLS7", " ", bac, 1., bac2);
7501  h_2D0sumAmplLS7 = fs_->make<TH2F>("h_2D0sumAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7502  h_sum0AmplperLS7 = fs_->make<TH1F>("h_sum0AmplperLS7", " ", bac, 1., bac2);
7503 
7504  h_sumAmplLS8 = fs_->make<TH1F>("h_sumAmplLS8", " ", 100, 0.0, lsdep_estimator5_HOdepth4_);
7505  h_2DsumAmplLS8 = fs_->make<TH2F>("h_2DsumAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7506  h_sumAmplperLS8 = fs_->make<TH1F>("h_sumAmplperLS8", " ", bac, 1., bac2);
7507  h_sumCutAmplperLS8 = fs_->make<TH1F>("h_sumCutAmplperLS8", " ", bac, 1., bac2);
7508  h_2D0sumAmplLS8 = fs_->make<TH2F>("h_2D0sumAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7509  h_sum0AmplperLS8 = fs_->make<TH1F>("h_sum0AmplperLS8", " ", bac, 1., bac2);
7510  //--------------------------------------------------
7511  // for estimator6:
7512  h_sumErrorBLS1 = fs_->make<TH1F>("h_sumErrorBLS1", " ", 10, 0., 10.);
7513  h_sumErrorBperLS1 = fs_->make<TH1F>("h_sumErrorBperLS1", " ", bac, 1., bac2);
7514  h_sum0ErrorBperLS1 = fs_->make<TH1F>("h_sum0ErrorBperLS1", " ", bac, 1., bac2);
7515  h_2D0sumErrorBLS1 = fs_->make<TH2F>("h_2D0sumErrorBLS1", " ", neta, -41., 41., nphi, 0., bphi);
7516  h_2DsumErrorBLS1 = fs_->make<TH2F>("h_2DsumErrorBLS1", " ", neta, -41., 41., nphi, 0., bphi);
7517  h_sumErrorBLS2 = fs_->make<TH1F>("h_sumErrorBLS2", " ", 10, 0., 10.);
7518  h_sumErrorBperLS2 = fs_->make<TH1F>("h_sumErrorBperLS2", " ", bac, 1., bac2);
7519  h_sum0ErrorBperLS2 = fs_->make<TH1F>("h_sum0ErrorBperLS2", " ", bac, 1., bac2);
7520  h_2D0sumErrorBLS2 = fs_->make<TH2F>("h_2D0sumErrorBLS2", " ", neta, -41., 41., nphi, 0., bphi);
7521  h_2DsumErrorBLS2 = fs_->make<TH2F>("h_2DsumErrorBLS2", " ", neta, -41., 41., nphi, 0., bphi);
7522 
7523  h_sumErrorBLS3 = fs_->make<TH1F>("h_sumErrorBLS3", " ", 10, 0., 10.);
7524  h_sumErrorBperLS3 = fs_->make<TH1F>("h_sumErrorBperLS3", " ", bac, 1., bac2);
7525  h_sum0ErrorBperLS3 = fs_->make<TH1F>("h_sum0ErrorBperLS3", " ", bac, 1., bac2);
7526  h_2D0sumErrorBLS3 = fs_->make<TH2F>("h_2D0sumErrorBLS3", " ", neta, -41., 41., nphi, 0., bphi);
7527  h_2DsumErrorBLS3 = fs_->make<TH2F>("h_2DsumErrorBLS3", " ", neta, -41., 41., nphi, 0., bphi);
7528  h_sumErrorBLS4 = fs_->make<TH1F>("h_sumErrorBLS4", " ", 10, 0., 10.);
7529  h_sumErrorBperLS4 = fs_->make<TH1F>("h_sumErrorBperLS4", " ", bac, 1., bac2);
7530  h_sum0ErrorBperLS4 = fs_->make<TH1F>("h_sum0ErrorBperLS4", " ", bac, 1., bac2);
7531  h_2D0sumErrorBLS4 = fs_->make<TH2F>("h_2D0sumErrorBLS4", " ", neta, -41., 41., nphi, 0., bphi);
7532  h_2DsumErrorBLS4 = fs_->make<TH2F>("h_2DsumErrorBLS4", " ", neta, -41., 41., nphi, 0., bphi);
7533  h_sumErrorBLS5 = fs_->make<TH1F>("h_sumErrorBLS5", " ", 10, 0., 10.);
7534  h_sumErrorBperLS5 = fs_->make<TH1F>("h_sumErrorBperLS5", " ", bac, 1., bac2);
7535  h_sum0ErrorBperLS5 = fs_->make<TH1F>("h_sum0ErrorBperLS5", " ", bac, 1., bac2);
7536  h_2D0sumErrorBLS5 = fs_->make<TH2F>("h_2D0sumErrorBLS5", " ", neta, -41., 41., nphi, 0., bphi);
7537  h_2DsumErrorBLS5 = fs_->make<TH2F>("h_2DsumErrorBLS5", " ", neta, -41., 41., nphi, 0., bphi);
7538 
7539  h_sumErrorBLS6 = fs_->make<TH1F>("h_sumErrorBLS6", " ", 10, 0., 10.);
7540  h_sumErrorBperLS6 = fs_->make<TH1F>("h_sumErrorBperLS6", " ", bac, 1., bac2);
7541  h_sum0ErrorBperLS6 = fs_->make<TH1F>("h_sum0ErrorBperLS6", " ", bac, 1., bac2);
7542  h_2D0sumErrorBLS6 = fs_->make<TH2F>("h_2D0sumErrorBLS6", " ", neta, -41., 41., nphi, 0., bphi);
7543  h_2DsumErrorBLS6 = fs_->make<TH2F>("h_2DsumErrorBLS6", " ", neta, -41., 41., nphi, 0., bphi);
7544  h_sumErrorBLS7 = fs_->make<TH1F>("h_sumErrorBLS7", " ", 10, 0., 10.);
7545  h_sumErrorBperLS7 = fs_->make<TH1F>("h_sumErrorBperLS7", " ", bac, 1., bac2);
7546  h_sum0ErrorBperLS7 = fs_->make<TH1F>("h_sum0ErrorBperLS7", " ", bac, 1., bac2);
7547  h_2D0sumErrorBLS7 = fs_->make<TH2F>("h_2D0sumErrorBLS7", " ", neta, -41., 41., nphi, 0., bphi);
7548  h_2DsumErrorBLS7 = fs_->make<TH2F>("h_2DsumErrorBLS7", " ", neta, -41., 41., nphi, 0., bphi);
7549 
7550  h_sumErrorBLS8 = fs_->make<TH1F>("h_sumErrorBLS8", " ", 10, 0., 10.);
7551  h_sumErrorBperLS8 = fs_->make<TH1F>("h_sumErrorBperLS8", " ", bac, 1., bac2);
7552  h_sum0ErrorBperLS8 = fs_->make<TH1F>("h_sum0ErrorBperLS8", " ", bac, 1., bac2);
7553  h_2D0sumErrorBLS8 = fs_->make<TH2F>("h_2D0sumErrorBLS8", " ", neta, -41., 41., nphi, 0., bphi);
7554  h_2DsumErrorBLS8 = fs_->make<TH2F>("h_2DsumErrorBLS8", " ", neta, -41., 41., nphi, 0., bphi);
7555 
7556  //--------------------------------------------------
7557  // for averSIGNALOCCUPANCY :
7558  h_averSIGNALoccupancy_HB = fs_->make<TH1F>("h_averSIGNALoccupancy_HB", " ", bac, 1., bac2);
7559  h_averSIGNALoccupancy_HE = fs_->make<TH1F>("h_averSIGNALoccupancy_HE", " ", bac, 1., bac2);
7560  h_averSIGNALoccupancy_HF = fs_->make<TH1F>("h_averSIGNALoccupancy_HF", " ", bac, 1., bac2);
7561  h_averSIGNALoccupancy_HO = fs_->make<TH1F>("h_averSIGNALoccupancy_HO", " ", bac, 1., bac2);
7562 
7563  // for averSIGNALsumamplitude :
7564  h_averSIGNALsumamplitude_HB = fs_->make<TH1F>("h_averSIGNALsumamplitude_HB", " ", bac, 1., bac2);
7565  h_averSIGNALsumamplitude_HE = fs_->make<TH1F>("h_averSIGNALsumamplitude_HE", " ", bac, 1., bac2);
7566  h_averSIGNALsumamplitude_HF = fs_->make<TH1F>("h_averSIGNALsumamplitude_HF", " ", bac, 1., bac2);
7567  h_averSIGNALsumamplitude_HO = fs_->make<TH1F>("h_averSIGNALsumamplitude_HO", " ", bac, 1., bac2);
7568 
7569  // for averNOSIGNALOCCUPANCY :
7570  h_averNOSIGNALoccupancy_HB = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HB", " ", bac, 1., bac2);
7571  h_averNOSIGNALoccupancy_HE = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HE", " ", bac, 1., bac2);
7572  h_averNOSIGNALoccupancy_HF = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HF", " ", bac, 1., bac2);
7573  h_averNOSIGNALoccupancy_HO = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HO", " ", bac, 1., bac2);
7574 
7575  // for averNOSIGNALsumamplitude :
7576  h_averNOSIGNALsumamplitude_HB = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HB", " ", bac, 1., bac2);
7577  h_averNOSIGNALsumamplitude_HE = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HE", " ", bac, 1., bac2);
7578  h_averNOSIGNALsumamplitude_HF = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HF", " ", bac, 1., bac2);
7579  h_averNOSIGNALsumamplitude_HO = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HO", " ", bac, 1., bac2);
7580 
7581  // for channel SUM over depthes Amplitudes for each sub-detector
7582  h_sumamplitudechannel_HB = fs_->make<TH1F>("h_sumamplitudechannel_HB", " ", 100, 0., 2000.);
7583  h_sumamplitudechannel_HE = fs_->make<TH1F>("h_sumamplitudechannel_HE", " ", 100, 0., 3000.);
7584  h_sumamplitudechannel_HF = fs_->make<TH1F>("h_sumamplitudechannel_HF", " ", 100, 0., 7000.);
7585  h_sumamplitudechannel_HO = fs_->make<TH1F>("h_sumamplitudechannel_HO", " ", 100, 0., 10000.);
7586 
7587  // for event Amplitudes for each sub-detector
7588  h_eventamplitude_HB = fs_->make<TH1F>("h_eventamplitude_HB", " ", 100, 0., 80000.);
7589  h_eventamplitude_HE = fs_->make<TH1F>("h_eventamplitude_HE", " ", 100, 0., 100000.);
7590  h_eventamplitude_HF = fs_->make<TH1F>("h_eventamplitude_HF", " ", 100, 0., 150000.);
7591  h_eventamplitude_HO = fs_->make<TH1F>("h_eventamplitude_HO", " ", 100, 0., 250000.);
7592 
7593  // for event Occupancy for each sub-detector
7594  h_eventoccupancy_HB = fs_->make<TH1F>("h_eventoccupancy_HB", " ", 100, 0., 3000.);
7595  h_eventoccupancy_HE = fs_->make<TH1F>("h_eventoccupancy_HE", " ", 100, 0., 2000.);
7596  h_eventoccupancy_HF = fs_->make<TH1F>("h_eventoccupancy_HF", " ", 100, 0., 1000.);
7597  h_eventoccupancy_HO = fs_->make<TH1F>("h_eventoccupancy_HO", " ", 100, 0., 2500.);
7598 
7599  // for maxxSUMAmplitude
7600  h_maxxSUMAmpl_HB = fs_->make<TH1F>("h_maxxSUMAmpl_HB", " ", bac, 1., bac2);
7601  h_maxxSUMAmpl_HE = fs_->make<TH1F>("h_maxxSUMAmpl_HE", " ", bac, 1., bac2);
7602  h_maxxSUMAmpl_HF = fs_->make<TH1F>("h_maxxSUMAmpl_HF", " ", bac, 1., bac2);
7603  h_maxxSUMAmpl_HO = fs_->make<TH1F>("h_maxxSUMAmpl_HO", " ", bac, 1., bac2);
7604 
7605  // for maxxOCCUP
7606  h_maxxOCCUP_HB = fs_->make<TH1F>("h_maxxOCCUP_HB", " ", bac, 1., bac2);
7607  h_maxxOCCUP_HE = fs_->make<TH1F>("h_maxxOCCUP_HE", " ", bac, 1., bac2);
7608  h_maxxOCCUP_HF = fs_->make<TH1F>("h_maxxOCCUP_HF", " ", bac, 1., bac2);
7609  h_maxxOCCUP_HO = fs_->make<TH1F>("h_maxxOCCUP_HO", " ", bac, 1., bac2);
7610  //--------------------------------------------------
7611  // pedestals
7612  h_pedestal0_HB = fs_->make<TH1F>("h_pedestal0_HB", " ", 100, 0., 10.);
7613  h_pedestal1_HB = fs_->make<TH1F>("h_pedestal1_HB", " ", 100, 0., 10.);
7614  h_pedestal2_HB = fs_->make<TH1F>("h_pedestal2_HB", " ", 100, 0., 10.);
7615  h_pedestal3_HB = fs_->make<TH1F>("h_pedestal3_HB", " ", 100, 0., 10.);
7616  h_pedestalaver4_HB = fs_->make<TH1F>("h_pedestalaver4_HB", " ", 100, 0., 10.);
7617  h_pedestalaver9_HB = fs_->make<TH1F>("h_pedestalaver9_HB", " ", 100, 0., 10.);
7618  h_pedestalw0_HB = fs_->make<TH1F>("h_pedestalw0_HB", " ", 100, 0., 2.5);
7619  h_pedestalw1_HB = fs_->make<TH1F>("h_pedestalw1_HB", " ", 100, 0., 2.5);
7620  h_pedestalw2_HB = fs_->make<TH1F>("h_pedestalw2_HB", " ", 100, 0., 2.5);
7621  h_pedestalw3_HB = fs_->make<TH1F>("h_pedestalw3_HB", " ", 100, 0., 2.5);
7622  h_pedestalwaver4_HB = fs_->make<TH1F>("h_pedestalwaver4_HB", " ", 100, 0., 2.5);
7623  h_pedestalwaver9_HB = fs_->make<TH1F>("h_pedestalwaver9_HB", " ", 100, 0., 2.5);
7624 
7625  h_pedestal0_HE = fs_->make<TH1F>("h_pedestal0_HE", " ", 100, 0., 10.);
7626  h_pedestal1_HE = fs_->make<TH1F>("h_pedestal1_HE", " ", 100, 0., 10.);
7627  h_pedestal2_HE = fs_->make<TH1F>("h_pedestal2_HE", " ", 100, 0., 10.);
7628  h_pedestal3_HE = fs_->make<TH1F>("h_pedestal3_HE", " ", 100, 0., 10.);
7629  h_pedestalaver4_HE = fs_->make<TH1F>("h_pedestalaver4_HE", " ", 100, 0., 10.);
7630  h_pedestalaver9_HE = fs_->make<TH1F>("h_pedestalaver9_HE", " ", 100, 0., 10.);
7631  h_pedestalw0_HE = fs_->make<TH1F>("h_pedestalw0_HE", " ", 100, 0., 2.5);
7632  h_pedestalw1_HE = fs_->make<TH1F>("h_pedestalw1_HE", " ", 100, 0., 2.5);
7633  h_pedestalw2_HE = fs_->make<TH1F>("h_pedestalw2_HE", " ", 100, 0., 2.5);
7634  h_pedestalw3_HE = fs_->make<TH1F>("h_pedestalw3_HE", " ", 100, 0., 2.5);
7635  h_pedestalwaver4_HE = fs_->make<TH1F>("h_pedestalwaver4_HE", " ", 100, 0., 2.5);
7636  h_pedestalwaver9_HE = fs_->make<TH1F>("h_pedestalwaver9_HE", " ", 100, 0., 2.5);
7637 
7638  h_pedestal0_HF = fs_->make<TH1F>("h_pedestal0_HF", " ", 100, 0., 20.);
7639  h_pedestal1_HF = fs_->make<TH1F>("h_pedestal1_HF", " ", 100, 0., 20.);
7640  h_pedestal2_HF = fs_->make<TH1F>("h_pedestal2_HF", " ", 100, 0., 20.);
7641  h_pedestal3_HF = fs_->make<TH1F>("h_pedestal3_HF", " ", 100, 0., 20.);
7642  h_pedestalaver4_HF = fs_->make<TH1F>("h_pedestalaver4_HF", " ", 100, 0., 20.);
7643  h_pedestalaver9_HF = fs_->make<TH1F>("h_pedestalaver9_HF", " ", 100, 0., 20.);
7644  h_pedestalw0_HF = fs_->make<TH1F>("h_pedestalw0_HF", " ", 100, 0., 2.5);
7645  h_pedestalw1_HF = fs_->make<TH1F>("h_pedestalw1_HF", " ", 100, 0., 2.5);
7646  h_pedestalw2_HF = fs_->make<TH1F>("h_pedestalw2_HF", " ", 100, 0., 2.5);
7647  h_pedestalw3_HF = fs_->make<TH1F>("h_pedestalw3_HF", " ", 100, 0., 2.5);
7648  h_pedestalwaver4_HF = fs_->make<TH1F>("h_pedestalwaver4_HF", " ", 100, 0., 2.5);
7649  h_pedestalwaver9_HF = fs_->make<TH1F>("h_pedestalwaver9_HF", " ", 100, 0., 2.5);
7650 
7651  h_pedestal0_HO = fs_->make<TH1F>("h_pedestal0_HO", " ", 100, 0., 20.);
7652  h_pedestal1_HO = fs_->make<TH1F>("h_pedestal1_HO", " ", 100, 0., 20.);
7653  h_pedestal2_HO = fs_->make<TH1F>("h_pedestal2_HO", " ", 100, 0., 20.);
7654  h_pedestal3_HO = fs_->make<TH1F>("h_pedestal3_HO", " ", 100, 0., 20.);
7655  h_pedestalaver4_HO = fs_->make<TH1F>("h_pedestalaver4_HO", " ", 100, 0., 20.);
7656  h_pedestalaver9_HO = fs_->make<TH1F>("h_pedestalaver9_HO", " ", 100, 0., 20.);
7657  h_pedestalw0_HO = fs_->make<TH1F>("h_pedestalw0_HO", " ", 100, 0., 2.5);
7658  h_pedestalw1_HO = fs_->make<TH1F>("h_pedestalw1_HO", " ", 100, 0., 2.5);
7659  h_pedestalw2_HO = fs_->make<TH1F>("h_pedestalw2_HO", " ", 100, 0., 2.5);
7660  h_pedestalw3_HO = fs_->make<TH1F>("h_pedestalw3_HO", " ", 100, 0., 2.5);
7661  h_pedestalwaver4_HO = fs_->make<TH1F>("h_pedestalwaver4_HO", " ", 100, 0., 2.5);
7662  h_pedestalwaver9_HO = fs_->make<TH1F>("h_pedestalwaver9_HO", " ", 100, 0., 2.5);
7663  //--------------------------------------------------
7664  h_mapDepth1pedestalw_HB = fs_->make<TH2F>("h_mapDepth1pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7665  h_mapDepth2pedestalw_HB = fs_->make<TH2F>("h_mapDepth2pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7666  h_mapDepth3pedestalw_HB = fs_->make<TH2F>("h_mapDepth3pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7667  h_mapDepth4pedestalw_HB = fs_->make<TH2F>("h_mapDepth4pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7668  h_mapDepth1pedestalw_HE = fs_->make<TH2F>("h_mapDepth1pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7669  h_mapDepth2pedestalw_HE = fs_->make<TH2F>("h_mapDepth2pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7670  h_mapDepth3pedestalw_HE = fs_->make<TH2F>("h_mapDepth3pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7671  h_mapDepth4pedestalw_HE = fs_->make<TH2F>("h_mapDepth4pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7672  h_mapDepth5pedestalw_HE = fs_->make<TH2F>("h_mapDepth5pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7673  h_mapDepth6pedestalw_HE = fs_->make<TH2F>("h_mapDepth6pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7674  h_mapDepth7pedestalw_HE = fs_->make<TH2F>("h_mapDepth7pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7675  h_mapDepth1pedestalw_HF = fs_->make<TH2F>("h_mapDepth1pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7676  h_mapDepth2pedestalw_HF = fs_->make<TH2F>("h_mapDepth2pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7677  h_mapDepth3pedestalw_HF = fs_->make<TH2F>("h_mapDepth3pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7678  h_mapDepth4pedestalw_HF = fs_->make<TH2F>("h_mapDepth4pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7679  h_mapDepth4pedestalw_HO = fs_->make<TH2F>("h_mapDepth4pedestalw_HO", " ", neta, -41., 41., nphi, 0., bphi);
7680 
7681  h_mapDepth1pedestal_HB = fs_->make<TH2F>("h_mapDepth1pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7682  h_mapDepth2pedestal_HB = fs_->make<TH2F>("h_mapDepth2pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7683  h_mapDepth3pedestal_HB = fs_->make<TH2F>("h_mapDepth3pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7684  h_mapDepth4pedestal_HB = fs_->make<TH2F>("h_mapDepth4pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7685  h_mapDepth1pedestal_HE = fs_->make<TH2F>("h_mapDepth1pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7686  h_mapDepth2pedestal_HE = fs_->make<TH2F>("h_mapDepth2pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7687  h_mapDepth3pedestal_HE = fs_->make<TH2F>("h_mapDepth3pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7688  h_mapDepth4pedestal_HE = fs_->make<TH2F>("h_mapDepth4pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7689  h_mapDepth5pedestal_HE = fs_->make<TH2F>("h_mapDepth5pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7690  h_mapDepth6pedestal_HE = fs_->make<TH2F>("h_mapDepth6pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7691  h_mapDepth7pedestal_HE = fs_->make<TH2F>("h_mapDepth7pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7692  h_mapDepth1pedestal_HF = fs_->make<TH2F>("h_mapDepth1pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7693  h_mapDepth2pedestal_HF = fs_->make<TH2F>("h_mapDepth2pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7694  h_mapDepth3pedestal_HF = fs_->make<TH2F>("h_mapDepth3pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7695  h_mapDepth4pedestal_HF = fs_->make<TH2F>("h_mapDepth4pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7696  h_mapDepth4pedestal_HO = fs_->make<TH2F>("h_mapDepth4pedestal_HO", " ", neta, -41., 41., nphi, 0., bphi);
7697  //--------------------------------------------------
7698  h_pedestal00_HB = fs_->make<TH1F>("h_pedestal00_HB", " ", 100, 0., 10.);
7699  h_gain_HB = fs_->make<TH1F>("h_gain_HB", " ", 100, 0., 1.);
7700  h_respcorr_HB = fs_->make<TH1F>("h_respcorr_HB", " ", 100, 0., 2.5);
7701  h_timecorr_HB = fs_->make<TH1F>("h_timecorr_HB", " ", 100, 0., 30.);
7702  h_lutcorr_HB = fs_->make<TH1F>("h_lutcorr_HB", " ", 100, 0., 10.);
7703  h_difpedestal0_HB = fs_->make<TH1F>("h_difpedestal0_HB", " ", 100, -3., 3.);
7704  h_difpedestal1_HB = fs_->make<TH1F>("h_difpedestal1_HB", " ", 100, -3., 3.);
7705  h_difpedestal2_HB = fs_->make<TH1F>("h_difpedestal2_HB", " ", 100, -3., 3.);
7706  h_difpedestal3_HB = fs_->make<TH1F>("h_difpedestal3_HB", " ", 100, -3., 3.);
7707 
7708  h_pedestal00_HE = fs_->make<TH1F>("h_pedestal00_HE", " ", 100, 0., 10.);
7709  h_gain_HE = fs_->make<TH1F>("h_gain_HE", " ", 100, 0., 1.);
7710  h_respcorr_HE = fs_->make<TH1F>("h_respcorr_HE", " ", 100, 0., 2.5);
7711  h_timecorr_HE = fs_->make<TH1F>("h_timecorr_HE", " ", 100, 0., 30.);
7712  h_lutcorr_HE = fs_->make<TH1F>("h_lutcorr_HE", " ", 100, 0., 10.);
7713 
7714  h_pedestal00_HF = fs_->make<TH1F>("h_pedestal00_HF", " ", 100, 0., 10.);
7715  h_gain_HF = fs_->make<TH1F>("h_gain_HF", " ", 100, 0., 1.);
7716  h_respcorr_HF = fs_->make<TH1F>("h_respcorr_HF", " ", 100, 0., 2.5);
7717  h_timecorr_HF = fs_->make<TH1F>("h_timecorr_HF", " ", 100, 0., 30.);
7718  h_lutcorr_HF = fs_->make<TH1F>("h_lutcorr_HF", " ", 100, 0., 10.);
7719 
7720  h_pedestal00_HO = fs_->make<TH1F>("h_pedestal00_HO", " ", 100, 0., 10.);
7721  h_gain_HO = fs_->make<TH1F>("h_gain_HO", " ", 100, 0., 1.);
7722  h_respcorr_HO = fs_->make<TH1F>("h_respcorr_HO", " ", 100, 0., 2.5);
7723  h_timecorr_HO = fs_->make<TH1F>("h_timecorr_HO", " ", 100, 0., 30.);
7724  h_lutcorr_HO = fs_->make<TH1F>("h_lutcorr_HO", " ", 100, 0., 10.);
7725  //--------------------------------------------------
7726  float est6 = 2500.;
7727  int ist6 = 30;
7728  int ist2 = 60;
7729  h2_pedvsampl_HB = fs_->make<TH2F>("h2_pedvsampl_HB", " ", ist2, 0., 7.0, ist2, 0., est6);
7730  h2_pedwvsampl_HB = fs_->make<TH2F>("h2_pedwvsampl_HB", " ", ist2, 0., 2.5, ist2, 0., est6);
7731  h_pedvsampl_HB = fs_->make<TH1F>("h_pedvsampl_HB", " ", ist6, 0., 7.0);
7732  h_pedwvsampl_HB = fs_->make<TH1F>("h_pedwvsampl_HB", " ", ist6, 0., 2.5);
7733  h_pedvsampl0_HB = fs_->make<TH1F>("h_pedvsampl0_HB", " ", ist6, 0., 7.);
7734  h_pedwvsampl0_HB = fs_->make<TH1F>("h_pedwvsampl0_HB", " ", ist6, 0., 2.5);
7735  h2_amplvsped_HB = fs_->make<TH2F>("h2_amplvsped_HB", " ", ist2, 0., est6, ist2, 0., 7.0);
7736  h2_amplvspedw_HB = fs_->make<TH2F>("h2_amplvspedw_HB", " ", ist2, 0., est6, ist2, 0., 2.5);
7737  h_amplvsped_HB = fs_->make<TH1F>("h_amplvsped_HB", " ", ist6, 0., est6);
7738  h_amplvspedw_HB = fs_->make<TH1F>("h_amplvspedw_HB", " ", ist6, 0., est6);
7739  h_amplvsped0_HB = fs_->make<TH1F>("h_amplvsped0_HB", " ", ist6, 0., est6);
7740 
7741  h2_pedvsampl_HE = fs_->make<TH2F>("h2_pedvsampl_HE", " ", ist2, 0., 7.0, ist2, 0., est6);
7742  h2_pedwvsampl_HE = fs_->make<TH2F>("h2_pedwvsampl_HE", " ", ist2, 0., 2.5, ist2, 0., est6);
7743  h_pedvsampl_HE = fs_->make<TH1F>("h_pedvsampl_HE", " ", ist6, 0., 7.0);
7744  h_pedwvsampl_HE = fs_->make<TH1F>("h_pedwvsampl_HE", " ", ist6, 0., 2.5);
7745  h_pedvsampl0_HE = fs_->make<TH1F>("h_pedvsampl0_HE", " ", ist6, 0., 7.);
7746  h_pedwvsampl0_HE = fs_->make<TH1F>("h_pedwvsampl0_HE", " ", ist6, 0., 2.5);
7747 
7748  h2_pedvsampl_HF = fs_->make<TH2F>("h2_pedvsampl_HF", " ", ist2, 0., 20.0, ist2, 0., est6);
7749  h2_pedwvsampl_HF = fs_->make<TH2F>("h2_pedwvsampl_HF", " ", ist2, 0., 2.0, ist2, 0., est6);
7750  h_pedvsampl_HF = fs_->make<TH1F>("h_pedvsampl_HF", " ", ist6, 0., 20.0);
7751  h_pedwvsampl_HF = fs_->make<TH1F>("h_pedwvsampl_HF", " ", ist6, 0., 2.0);
7752  h_pedvsampl0_HF = fs_->make<TH1F>("h_pedvsampl0_HF", " ", ist6, 0., 20.);
7753  h_pedwvsampl0_HF = fs_->make<TH1F>("h_pedwvsampl0_HF", " ", ist6, 0., 2.0);
7754 
7755  h2_pedvsampl_HO = fs_->make<TH2F>("h2_pedvsampl_HO", " ", ist2, 0., 20.0, ist2, 0., est6);
7756  h2_pedwvsampl_HO = fs_->make<TH2F>("h2_pedwvsampl_HO", " ", ist2, 0., 2.5, ist2, 0., est6);
7757  h_pedvsampl_HO = fs_->make<TH1F>("h_pedvsampl_HO", " ", ist6, 0., 20.0);
7758  h_pedwvsampl_HO = fs_->make<TH1F>("h_pedwvsampl_HO", " ", ist6, 0., 2.5);
7759  h_pedvsampl0_HO = fs_->make<TH1F>("h_pedvsampl0_HO", " ", ist6, 0., 20.);
7760  h_pedwvsampl0_HO = fs_->make<TH1F>("h_pedwvsampl0_HO", " ", ist6, 0., 2.5);
7761  //--------------------------------------------------
7762  h_mapDepth1Ped0_HB = fs_->make<TH2F>("h_mapDepth1Ped0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7763  h_mapDepth1Ped1_HB = fs_->make<TH2F>("h_mapDepth1Ped1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7764  h_mapDepth1Ped2_HB = fs_->make<TH2F>("h_mapDepth1Ped2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7765  h_mapDepth1Ped3_HB = fs_->make<TH2F>("h_mapDepth1Ped3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7766  h_mapDepth1Pedw0_HB = fs_->make<TH2F>("h_mapDepth1Pedw0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7767  h_mapDepth1Pedw1_HB = fs_->make<TH2F>("h_mapDepth1Pedw1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7768  h_mapDepth1Pedw2_HB = fs_->make<TH2F>("h_mapDepth1Pedw2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7769  h_mapDepth1Pedw3_HB = fs_->make<TH2F>("h_mapDepth1Pedw3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7770  h_mapDepth2Ped0_HB = fs_->make<TH2F>("h_mapDepth2Ped0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7771  h_mapDepth2Ped1_HB = fs_->make<TH2F>("h_mapDepth2Ped1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7772  h_mapDepth2Ped2_HB = fs_->make<TH2F>("h_mapDepth2Ped2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7773  h_mapDepth2Ped3_HB = fs_->make<TH2F>("h_mapDepth2Ped3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7774  h_mapDepth2Pedw0_HB = fs_->make<TH2F>("h_mapDepth2Pedw0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7775  h_mapDepth2Pedw1_HB = fs_->make<TH2F>("h_mapDepth2Pedw1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7776  h_mapDepth2Pedw2_HB = fs_->make<TH2F>("h_mapDepth2Pedw2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7777  h_mapDepth2Pedw3_HB = fs_->make<TH2F>("h_mapDepth2Pedw3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7778 
7779  h_mapDepth1Ped0_HE = fs_->make<TH2F>("h_mapDepth1Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7780  h_mapDepth1Ped1_HE = fs_->make<TH2F>("h_mapDepth1Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7781  h_mapDepth1Ped2_HE = fs_->make<TH2F>("h_mapDepth1Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7782  h_mapDepth1Ped3_HE = fs_->make<TH2F>("h_mapDepth1Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7783  h_mapDepth1Pedw0_HE = fs_->make<TH2F>("h_mapDepth1Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7784  h_mapDepth1Pedw1_HE = fs_->make<TH2F>("h_mapDepth1Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7785  h_mapDepth1Pedw2_HE = fs_->make<TH2F>("h_mapDepth1Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7786  h_mapDepth1Pedw3_HE = fs_->make<TH2F>("h_mapDepth1Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7787  h_mapDepth2Ped0_HE = fs_->make<TH2F>("h_mapDepth2Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7788  h_mapDepth2Ped1_HE = fs_->make<TH2F>("h_mapDepth2Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7789  h_mapDepth2Ped2_HE = fs_->make<TH2F>("h_mapDepth2Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7790  h_mapDepth2Ped3_HE = fs_->make<TH2F>("h_mapDepth2Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7791  h_mapDepth2Pedw0_HE = fs_->make<TH2F>("h_mapDepth2Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7792  h_mapDepth2Pedw1_HE = fs_->make<TH2F>("h_mapDepth2Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7793  h_mapDepth2Pedw2_HE = fs_->make<TH2F>("h_mapDepth2Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7794  h_mapDepth2Pedw3_HE = fs_->make<TH2F>("h_mapDepth2Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7795  h_mapDepth3Ped0_HE = fs_->make<TH2F>("h_mapDepth3Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7796  h_mapDepth3Ped1_HE = fs_->make<TH2F>("h_mapDepth3Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7797  h_mapDepth3Ped2_HE = fs_->make<TH2F>("h_mapDepth3Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7798  h_mapDepth3Ped3_HE = fs_->make<TH2F>("h_mapDepth3Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7799  h_mapDepth3Pedw0_HE = fs_->make<TH2F>("h_mapDepth3Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7800  h_mapDepth3Pedw1_HE = fs_->make<TH2F>("h_mapDepth3Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7801  h_mapDepth3Pedw2_HE = fs_->make<TH2F>("h_mapDepth3Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7802  h_mapDepth3Pedw3_HE = fs_->make<TH2F>("h_mapDepth3Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7803 
7804  h_mapDepth1Ped0_HF = fs_->make<TH2F>("h_mapDepth1Ped0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7805  h_mapDepth1Ped1_HF = fs_->make<TH2F>("h_mapDepth1Ped1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7806  h_mapDepth1Ped2_HF = fs_->make<TH2F>("h_mapDepth1Ped2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7807  h_mapDepth1Ped3_HF = fs_->make<TH2F>("h_mapDepth1Ped3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7808  h_mapDepth1Pedw0_HF = fs_->make<TH2F>("h_mapDepth1Pedw0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7809  h_mapDepth1Pedw1_HF = fs_->make<TH2F>("h_mapDepth1Pedw1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7810  h_mapDepth1Pedw2_HF = fs_->make<TH2F>("h_mapDepth1Pedw2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7811  h_mapDepth1Pedw3_HF = fs_->make<TH2F>("h_mapDepth1Pedw3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7812  h_mapDepth2Ped0_HF = fs_->make<TH2F>("h_mapDepth2Ped0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7813  h_mapDepth2Ped1_HF = fs_->make<TH2F>("h_mapDepth2Ped1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7814  h_mapDepth2Ped2_HF = fs_->make<TH2F>("h_mapDepth2Ped2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7815  h_mapDepth2Ped3_HF = fs_->make<TH2F>("h_mapDepth2Ped3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7816  h_mapDepth2Pedw0_HF = fs_->make<TH2F>("h_mapDepth2Pedw0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7817  h_mapDepth2Pedw1_HF = fs_->make<TH2F>("h_mapDepth2Pedw1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7818  h_mapDepth2Pedw2_HF = fs_->make<TH2F>("h_mapDepth2Pedw2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7819  h_mapDepth2Pedw3_HF = fs_->make<TH2F>("h_mapDepth2Pedw3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7820 
7821  h_mapDepth4Ped0_HO = fs_->make<TH2F>("h_mapDepth4Ped0_HO", " ", neta, -41., 41., nphi, 0., bphi);
7822  h_mapDepth4Ped1_HO = fs_->make<TH2F>("h_mapDepth4Ped1_HO", " ", neta, -41., 41., nphi, 0., bphi);
7823  h_mapDepth4Ped2_HO = fs_->make<TH2F>("h_mapDepth4Ped2_HO", " ", neta, -41., 41., nphi, 0., bphi);
7824  h_mapDepth4Ped3_HO = fs_->make<TH2F>("h_mapDepth4Ped3_HO", " ", neta, -41., 41., nphi, 0., bphi);
7825  h_mapDepth4Pedw0_HO = fs_->make<TH2F>("h_mapDepth4Pedw0_HO", " ", neta, -41., 41., nphi, 0., bphi);
7826  h_mapDepth4Pedw1_HO = fs_->make<TH2F>("h_mapDepth4Pedw1_HO", " ", neta, -41., 41., nphi, 0., bphi);
7827  h_mapDepth4Pedw2_HO = fs_->make<TH2F>("h_mapDepth4Pedw2_HO", " ", neta, -41., 41., nphi, 0., bphi);
7828  h_mapDepth4Pedw3_HO = fs_->make<TH2F>("h_mapDepth4Pedw3_HO", " ", neta, -41., 41., nphi, 0., bphi);
7829  //--------------------------------------------------
7830  h_mapDepth1ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7831  h_mapDepth2ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7832  h_mapDepth3ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7833  h_mapDepth4ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7834  h_mapDepth1ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7835  h_mapDepth2ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7836  h_mapDepth3ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7837  h_mapDepth4ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7838  h_mapDepth5ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7839  h_mapDepth6ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7840  h_mapDepth7ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7841  h_mapDepth1ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
7842  h_mapDepth2ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
7843  h_mapDepth3ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
7844 
7845  h_mapDepth1ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7846  h_mapDepth2ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7847  h_mapDepth3ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7848  h_mapDepth4ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7849 
7850  h_mapDepth4ADCAmpl12_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HO", " ", neta, -41., 41., nphi, 0., bphi);
7851 
7852  h_mapDepth1linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth1linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7853  h_mapDepth2linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth2linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7854  h_mapDepth3linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth3linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7855  //--------------------------------------------------
7857  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7859  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7861  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7863  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7865  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7867  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7869  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HO", " ", neta, -41., 41., nphi, 0., bphi);
7871  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HO", " ", neta, -41., 41., nphi, 0., bphi);
7872  //--------------------------------------------------
7873  h_shape_Ahigh_HB0 = fs_->make<TH1F>("h_shape_Ahigh_HB0", " ", 10, 0., 10.);
7874  h_shape0_Ahigh_HB0 = fs_->make<TH1F>("h_shape0_Ahigh_HB0", " ", 10, 0., 10.);
7875  h_shape_Alow_HB0 = fs_->make<TH1F>("h_shape_Alow_HB0", " ", 10, 0., 10.);
7876  h_shape0_Alow_HB0 = fs_->make<TH1F>("h_shape0_Alow_HB0", " ", 10, 0., 10.);
7877  h_shape_Ahigh_HB1 = fs_->make<TH1F>("h_shape_Ahigh_HB1", " ", 10, 0., 10.);
7878  h_shape0_Ahigh_HB1 = fs_->make<TH1F>("h_shape0_Ahigh_HB1", " ", 10, 0., 10.);
7879  h_shape_Alow_HB1 = fs_->make<TH1F>("h_shape_Alow_HB1", " ", 10, 0., 10.);
7880  h_shape0_Alow_HB1 = fs_->make<TH1F>("h_shape0_Alow_HB1", " ", 10, 0., 10.);
7881  h_shape_Ahigh_HB2 = fs_->make<TH1F>("h_shape_Ahigh_HB2", " ", 10, 0., 10.);
7882  h_shape0_Ahigh_HB2 = fs_->make<TH1F>("h_shape0_Ahigh_HB2", " ", 10, 0., 10.);
7883  h_shape_Alow_HB2 = fs_->make<TH1F>("h_shape_Alow_HB2", " ", 10, 0., 10.);
7884  h_shape0_Alow_HB2 = fs_->make<TH1F>("h_shape0_Alow_HB2", " ", 10, 0., 10.);
7885  h_shape_Ahigh_HB3 = fs_->make<TH1F>("h_shape_Ahigh_HB3", " ", 10, 0., 10.);
7886  h_shape0_Ahigh_HB3 = fs_->make<TH1F>("h_shape0_Ahigh_HB3", " ", 10, 0., 10.);
7887  h_shape_Alow_HB3 = fs_->make<TH1F>("h_shape_Alow_HB3", " ", 10, 0., 10.);
7888  h_shape0_Alow_HB3 = fs_->make<TH1F>("h_shape0_Alow_HB3", " ", 10, 0., 10.);
7889  //--------------------------------------------------
7890  h_shape_bad_channels_HB = fs_->make<TH1F>("h_shape_bad_channels_HB", " ", 10, 0., 10.);
7891  h_shape0_bad_channels_HB = fs_->make<TH1F>("h_shape0_bad_channels_HB", " ", 10, 0., 10.);
7892  h_shape_good_channels_HB = fs_->make<TH1F>("h_shape_good_channels_HB", " ", 10, 0., 10.);
7893  h_shape0_good_channels_HB = fs_->make<TH1F>("h_shape0_good_channels_HB", " ", 10, 0., 10.);
7894  h_shape_bad_channels_HE = fs_->make<TH1F>("h_shape_bad_channels_HE", " ", 10, 0., 10.);
7895  h_shape0_bad_channels_HE = fs_->make<TH1F>("h_shape0_bad_channels_HE", " ", 10, 0., 10.);
7896  h_shape_good_channels_HE = fs_->make<TH1F>("h_shape_good_channels_HE", " ", 10, 0., 10.);
7897  h_shape0_good_channels_HE = fs_->make<TH1F>("h_shape0_good_channels_HE", " ", 10, 0., 10.);
7898  h_shape_bad_channels_HF = fs_->make<TH1F>("h_shape_bad_channels_HF", " ", 10, 0., 10.);
7899  h_shape0_bad_channels_HF = fs_->make<TH1F>("h_shape0_bad_channels_HF", " ", 10, 0., 10.);
7900  h_shape_good_channels_HF = fs_->make<TH1F>("h_shape_good_channels_HF", " ", 10, 0., 10.);
7901  h_shape0_good_channels_HF = fs_->make<TH1F>("h_shape0_good_channels_HF", " ", 10, 0., 10.);
7902  h_shape_bad_channels_HO = fs_->make<TH1F>("h_shape_bad_channels_HO", " ", 10, 0., 10.);
7903  h_shape0_bad_channels_HO = fs_->make<TH1F>("h_shape0_bad_channels_HO", " ", 10, 0., 10.);
7904  h_shape_good_channels_HO = fs_->make<TH1F>("h_shape_good_channels_HO", " ", 10, 0., 10.);
7905  h_shape0_good_channels_HO = fs_->make<TH1F>("h_shape0_good_channels_HO", " ", 10, 0., 10.);
7906  //--------------------------------------------------
7907  // if(flagcpuoptimization_== 0 ) {
7908 
7909  int spl = 1000;
7910  float spls = 5000;
7911  h_sumamplitude_depth1_HB = fs_->make<TH1F>("h_sumamplitude_depth1_HB", " ", spl, 0., spls);
7912  h_sumamplitude_depth2_HB = fs_->make<TH1F>("h_sumamplitude_depth2_HB", " ", spl, 0., spls);
7913  h_sumamplitude_depth1_HE = fs_->make<TH1F>("h_sumamplitude_depth1_HE", " ", spl, 0., spls);
7914  h_sumamplitude_depth2_HE = fs_->make<TH1F>("h_sumamplitude_depth2_HE", " ", spl, 0., spls);
7915  h_sumamplitude_depth3_HE = fs_->make<TH1F>("h_sumamplitude_depth3_HE", " ", spl, 0., spls);
7916  h_sumamplitude_depth1_HF = fs_->make<TH1F>("h_sumamplitude_depth1_HF", " ", spl, 0., spls);
7917  h_sumamplitude_depth2_HF = fs_->make<TH1F>("h_sumamplitude_depth2_HF", " ", spl, 0., spls);
7918  h_sumamplitude_depth4_HO = fs_->make<TH1F>("h_sumamplitude_depth4_HO", " ", spl, 0., spls);
7919  int spl0 = 1000;
7920  float spls0 = 10000;
7921  h_sumamplitude_depth1_HB0 = fs_->make<TH1F>("h_sumamplitude_depth1_HB0", " ", spl0, 0., spls0);
7922  h_sumamplitude_depth2_HB0 = fs_->make<TH1F>("h_sumamplitude_depth2_HB0", " ", spl0, 0., spls0);
7923  h_sumamplitude_depth1_HE0 = fs_->make<TH1F>("h_sumamplitude_depth1_HE0", " ", spl0, 0., spls0);
7924  h_sumamplitude_depth2_HE0 = fs_->make<TH1F>("h_sumamplitude_depth2_HE0", " ", spl0, 0., spls0);
7925  h_sumamplitude_depth3_HE0 = fs_->make<TH1F>("h_sumamplitude_depth3_HE0", " ", spl0, 0., spls0);
7926  h_sumamplitude_depth1_HF0 = fs_->make<TH1F>("h_sumamplitude_depth1_HF0", " ", spl0, 0., spls0);
7927  h_sumamplitude_depth2_HF0 = fs_->make<TH1F>("h_sumamplitude_depth2_HF0", " ", spl0, 0., spls0);
7928  h_sumamplitude_depth4_HO0 = fs_->make<TH1F>("h_sumamplitude_depth4_HO0", " ", spl0, 0., spls0);
7929  int spl1 = 1000;
7930  float spls1 = 100000;
7931  h_sumamplitude_depth1_HB1 = fs_->make<TH1F>("h_sumamplitude_depth1_HB1", " ", spl1, 0., spls1);
7932  h_sumamplitude_depth2_HB1 = fs_->make<TH1F>("h_sumamplitude_depth2_HB1", " ", spl1, 0., spls1);
7933  h_sumamplitude_depth1_HE1 = fs_->make<TH1F>("h_sumamplitude_depth1_HE1", " ", spl1, 0., spls1);
7934  h_sumamplitude_depth2_HE1 = fs_->make<TH1F>("h_sumamplitude_depth2_HE1", " ", spl1, 0., spls1);
7935  h_sumamplitude_depth3_HE1 = fs_->make<TH1F>("h_sumamplitude_depth3_HE1", " ", spl1, 0., spls1);
7936  h_sumamplitude_depth1_HF1 = fs_->make<TH1F>("h_sumamplitude_depth1_HF1", " ", spl1, 0., spls1);
7937  h_sumamplitude_depth2_HF1 = fs_->make<TH1F>("h_sumamplitude_depth2_HF1", " ", spl1, 0., spls1);
7938  h_sumamplitude_depth4_HO1 = fs_->make<TH1F>("h_sumamplitude_depth4_HO1", " ", spl1, 0., spls1);
7939 
7940  h_Amplitude_forCapIdErrors_HB1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HB1", " ", 100, 0., 30000.);
7941  h_Amplitude_forCapIdErrors_HB2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HB2", " ", 100, 0., 30000.);
7942  h_Amplitude_forCapIdErrors_HE1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE1", " ", 100, 0., 30000.);
7943  h_Amplitude_forCapIdErrors_HE2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE2", " ", 100, 0., 30000.);
7944  h_Amplitude_forCapIdErrors_HE3 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE3", " ", 100, 0., 30000.);
7945  h_Amplitude_forCapIdErrors_HF1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HF1", " ", 100, 0., 30000.);
7946  h_Amplitude_forCapIdErrors_HF2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HF2", " ", 100, 0., 30000.);
7947  h_Amplitude_forCapIdErrors_HO4 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HO4", " ", 100, 0., 30000.);
7948 
7949  h_Amplitude_notCapIdErrors_HB1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HB1", " ", 100, 0., 30000.);
7950  h_Amplitude_notCapIdErrors_HB2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HB2", " ", 100, 0., 30000.);
7951  h_Amplitude_notCapIdErrors_HE1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE1", " ", 100, 0., 30000.);
7952  h_Amplitude_notCapIdErrors_HE2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE2", " ", 100, 0., 30000.);
7953  h_Amplitude_notCapIdErrors_HE3 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE3", " ", 100, 0., 30000.);
7954  h_Amplitude_notCapIdErrors_HF1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HF1", " ", 100, 0., 30000.);
7955  h_Amplitude_notCapIdErrors_HF2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HF2", " ", 100, 0., 30000.);
7956  h_Amplitude_notCapIdErrors_HO4 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HO4", " ", 100, 0., 30000.);
7957 
7958  h_2DAtaildepth1_HB = fs_->make<TH2F>("h_2DAtaildepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7959  h_2D0Ataildepth1_HB = fs_->make<TH2F>("h_2D0Ataildepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7960  h_2DAtaildepth2_HB = fs_->make<TH2F>("h_2DAtaildepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7961  h_2D0Ataildepth2_HB = fs_->make<TH2F>("h_2D0Ataildepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7962 
7964  } //if(recordHistoes_
7965  if (verbosity > 0)
7966  std::cout << "======================== booking DONE +++++++++++++++++++++++++++" << std::endl;
7968  if (recordNtuples_) {
7969  myTree = fs_->make<TTree>("Hcal", "Hcal Tree");
7970  myTree->Branch("Nevent", &Nevent, "Nevent/I");
7971  myTree->Branch("Run", &Run, "Run/I");
7972 
7973  } //if(recordNtuples_
7974  if (verbosity > 0)
7975  std::cout << "======================== beignJob finish +++++++++++++++++++++++++++" << std::endl;
7977 }
7978 
7981 // ------------ method called for each event ------------
7983  CaloSamples toolOriginal; // TS
7984  // double tool[100];
7985  if (verbosity == -22)
7986  std::cout << "************** in loop over Digis counter = " << nnnnnnhbhe << std::endl;
7987  HcalDetId cell(digiItr->id());
7988  int mdepth = cell.depth();
7989  int iphi = cell.iphi() - 1;
7990  int ieta = cell.ieta();
7991  if (ieta > 0)
7992  ieta -= 1;
7993  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
7994  // !!!!!!
7995  int errorGeneral = 0;
7996  int error1 = 0;
7997  int error2 = 0;
7998  int error3 = 0;
7999  int error4 = 0;
8000  int error5 = 0;
8001  int error6 = 0;
8002  int error7 = 0;
8003  // !!!!!!
8004  bool anycapid = true;
8005  bool anyer = false;
8006  bool anydv = true;
8007  // for help:
8008  int firstcapid = 0;
8009  int sumcapid = 0;
8010  int lastcapid = 0, capid = 0;
8011  int ERRORfiber = -10;
8012  int ERRORfiberChan = -10;
8013  int ERRORfiberAndChan = -10;
8014  int repetedcapid = 0;
8015  int TSsize = 10;
8016  TSsize = digiItr->size();
8017 
8019  for (int ii = 0; ii < TSsize; ii++) {
8020  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8021  bool er = (*digiItr)[ii].er(); // error
8022  bool dv = (*digiItr)[ii].dv(); // valid data
8023  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8024  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8025  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8026  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8027  anycapid = false;
8028  ERRORfiber = fiber;
8029  ERRORfiberChan = fiberChan;
8030  ERRORfiberAndChan = fiberAndChan;
8031  if (capid != lastcapid) {
8032  } else {
8033  repetedcapid = 1;
8034  }
8035  }
8036  lastcapid = capid;
8037 
8038  if (ii == 0)
8039  firstcapid = capid;
8040  sumcapid += capid;
8041 
8042  if (er) {
8043  anyer = true;
8044  ERRORfiber = fiber;
8045  ERRORfiberChan = fiberChan;
8046  ERRORfiberAndChan = fiberAndChan;
8047  }
8048  if (!dv) {
8049  anydv = false;
8050  ERRORfiber = fiber;
8051  ERRORfiberChan = fiberChan;
8052  ERRORfiberAndChan = fiberAndChan;
8053  }
8054 
8055  } // for
8056 
8058  if (firstcapid == 0 && !anycapid)
8059  errorGeneral = 1;
8060  if (firstcapid == 1 && !anycapid)
8061  errorGeneral = 2;
8062  if (firstcapid == 2 && !anycapid)
8063  errorGeneral = 3;
8064  if (firstcapid == 3 && !anycapid)
8065  errorGeneral = 4;
8066  if (!anycapid)
8067  error1 = 1;
8068  if (anyer)
8069  error2 = 1;
8070  if (!anydv)
8071  error3 = 1;
8072 
8073  if (!anycapid && anyer)
8074  error4 = 1;
8075  if (!anycapid && !anydv)
8076  error5 = 1;
8077  if (!anycapid && anyer && !anydv)
8078  error6 = 1;
8079  if (anyer && !anydv)
8080  error7 = 1;
8082  // Energy:
8083 
8084  double ampl = 0.;
8085  for (int ii = 0; ii < TSsize; ii++) {
8086  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8087  ampl += ampldefault; // fC
8088  }
8089 
8091  // Digis:
8092  // HB
8093  if (sub == 1) {
8094  h_errorGeneral_HB->Fill(double(errorGeneral), 1.);
8095  h_error1_HB->Fill(double(error1), 1.);
8096  h_error2_HB->Fill(double(error2), 1.);
8097  h_error3_HB->Fill(double(error3), 1.);
8098  h_error4_HB->Fill(double(error4), 1.);
8099  h_error5_HB->Fill(double(error5), 1.);
8100  h_error6_HB->Fill(double(error6), 1.);
8101  h_error7_HB->Fill(double(error7), 1.);
8102  h_repetedcapid_HB->Fill(double(repetedcapid), 1.);
8103 
8104  if (error1 != 0 || error2 != 0 || error3 != 0) {
8106  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8107  h_amplError_HB->Fill(ampl, 1.);
8108  if (mdepth == 1)
8109  h_mapDepth1Error_HB->Fill(double(ieta), double(iphi));
8110  if (mdepth == 2)
8111  h_mapDepth2Error_HB->Fill(double(ieta), double(iphi));
8112  h_fiber0_HB->Fill(double(ERRORfiber), 1.);
8113  h_fiber1_HB->Fill(double(ERRORfiberChan), 1.);
8114  h_fiber2_HB->Fill(double(ERRORfiberAndChan), 1.);
8115  } else {
8116  h_amplFine_HB->Fill(ampl, 1.);
8117  }
8118  }
8119  // HE
8120  if (sub == 2) {
8121  h_errorGeneral_HE->Fill(double(errorGeneral), 1.);
8122  h_error1_HE->Fill(double(error1), 1.);
8123  h_error2_HE->Fill(double(error2), 1.);
8124  h_error3_HE->Fill(double(error3), 1.);
8125  h_error4_HE->Fill(double(error4), 1.);
8126  h_error5_HE->Fill(double(error5), 1.);
8127  h_error6_HE->Fill(double(error6), 1.);
8128  h_error7_HE->Fill(double(error7), 1.);
8129  h_repetedcapid_HE->Fill(double(repetedcapid), 1.);
8130 
8131  if (error1 != 0 || error2 != 0 || error3 != 0) {
8133  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8134  h_amplError_HE->Fill(ampl, 1.);
8135  if (mdepth == 1)
8136  h_mapDepth1Error_HE->Fill(double(ieta), double(iphi));
8137  if (mdepth == 2)
8138  h_mapDepth2Error_HE->Fill(double(ieta), double(iphi));
8139  if (mdepth == 3)
8140  h_mapDepth3Error_HE->Fill(double(ieta), double(iphi));
8141  h_fiber0_HE->Fill(double(ERRORfiber), 1.);
8142  h_fiber1_HE->Fill(double(ERRORfiberChan), 1.);
8143  h_fiber2_HE->Fill(double(ERRORfiberAndChan), 1.);
8144  } else {
8145  h_amplFine_HE->Fill(ampl, 1.);
8146  }
8147  }
8148  // ha2->Fill(double(ieta), double(iphi));
8149 } //fillDigiErrors
8152 // ------------ method called for each event ------------
8154  CaloSamples toolOriginal; // TS
8155  // double tool[100];
8156  DetId detid = qie11df.detid();
8157  HcalDetId hcaldetid = HcalDetId(detid);
8158  int ieta = hcaldetid.ieta();
8159  if (ieta > 0)
8160  ieta -= 1;
8161  int iphi = hcaldetid.iphi() - 1;
8162  int mdepth = hcaldetid.depth();
8163  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8164  // !!!!!!
8165  int error1 = 0;
8166  // !!!!!!
8167  bool anycapid = true;
8168  // bool anyer = false;
8169  // bool anydv = true;
8170  // for help:
8171  int firstcapid = 0;
8172  int sumcapid = 0;
8173  int lastcapid = 0, capid = 0;
8174  int repetedcapid = 0;
8175  // loop over the samples in the digi
8176  nTS = qie11df.samples();
8178  for (int ii = 0; ii < nTS; ii++) {
8179  capid = qie11df[ii].capid(); // capId (0-3, sequential)
8180  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8181  anycapid = false;
8182  if (capid != lastcapid) {
8183  } else {
8184  repetedcapid = 1;
8185  }
8186  }
8187  lastcapid = capid;
8188  if (ii == 0)
8189  firstcapid = capid;
8190  sumcapid += capid;
8191  } // for
8193  if (!anycapid)
8194  error1 = 1;
8195  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8196  double ampl = 0.;
8197  for (int ii = 0; ii < nTS; ii++) {
8198  int adc = qie11df[ii].adc();
8199 
8200  double ampldefault = adc2fC_QIE11_shunt6[adc];
8201  if (flaguseshunt_ == 1)
8202  ampldefault = adc2fC_QIE11_shunt1[adc];
8203 
8204  ampl += ampldefault; //
8205  }
8207  // Digis:HBHE
8208  if (sub == 1) {
8209  h_error1_HB->Fill(double(error1), 1.);
8210  h_repetedcapid_HB->Fill(double(repetedcapid), 1.);
8211  if (error1 != 0) {
8212  // if(error1 !=0 || error2 !=0 || error3 !=0 ) {
8214  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8215  h_amplError_HB->Fill(ampl, 1.);
8216  if (mdepth == 1)
8217  h_mapDepth1Error_HB->Fill(double(ieta), double(iphi));
8218  if (mdepth == 2)
8219  h_mapDepth2Error_HB->Fill(double(ieta), double(iphi));
8220  if (mdepth == 3)
8221  h_mapDepth3Error_HB->Fill(double(ieta), double(iphi));
8222  if (mdepth == 4)
8223  h_mapDepth4Error_HB->Fill(double(ieta), double(iphi));
8224  h_errorGeneral_HB->Fill(double(firstcapid), 1.);
8225  } else {
8226  h_amplFine_HB->Fill(ampl, 1.);
8227  }
8228  }
8229  if (sub == 2) {
8230  h_error1_HE->Fill(double(error1), 1.);
8231  h_repetedcapid_HE->Fill(double(repetedcapid), 1.);
8232  if (error1 != 0) {
8233  // if(error1 !=0 || error2 !=0 || error3 !=0 ) {
8235  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8236  h_amplError_HE->Fill(ampl, 1.);
8237  if (mdepth == 1)
8238  h_mapDepth1Error_HE->Fill(double(ieta), double(iphi));
8239  if (mdepth == 2)
8240  h_mapDepth2Error_HE->Fill(double(ieta), double(iphi));
8241  if (mdepth == 3)
8242  h_mapDepth3Error_HE->Fill(double(ieta), double(iphi));
8243  if (mdepth == 4)
8244  h_mapDepth4Error_HE->Fill(double(ieta), double(iphi));
8245  if (mdepth == 5)
8246  h_mapDepth5Error_HE->Fill(double(ieta), double(iphi));
8247  if (mdepth == 6)
8248  h_mapDepth6Error_HE->Fill(double(ieta), double(iphi));
8249  if (mdepth == 7)
8250  h_mapDepth7Error_HE->Fill(double(ieta), double(iphi));
8251  h_errorGeneral_HE->Fill(double(firstcapid), 1.);
8252  } else {
8253  h_amplFine_HE->Fill(ampl, 1.);
8254  }
8255  }
8256 } //fillDigiErrorsQIE11
8258 // ------------ method called for each event ------------
8260  CaloSamples toolOriginal; // TS
8261  // double tool[100];
8262  HcalDetId cell(digiItr->id());
8263  int mdepth = cell.depth();
8264  int iphi = cell.iphi() - 1;
8265  int ieta = cell.ieta();
8266  if (ieta > 0)
8267  ieta -= 1;
8268  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8269  if (mdepth > 2)
8270  std::cout << " HF DIGI ?????????????? ERROR mdepth = " << mdepth << std::endl;
8271  // !!!!!!
8272  int errorGeneral = 0;
8273  int error1 = 0;
8274  int error2 = 0;
8275  int error3 = 0;
8276  int error4 = 0;
8277  int error5 = 0;
8278  int error6 = 0;
8279  int error7 = 0;
8280  // !!!!!!
8281  bool anycapid = true;
8282  bool anyer = false;
8283  bool anydv = true;
8284  // for help:
8285  int firstcapid = 0;
8286  int sumcapid = 0;
8287  int lastcapid = 0, capid = 0;
8288  int ERRORfiber = -10;
8289  int ERRORfiberChan = -10;
8290  int ERRORfiberAndChan = -10;
8291  int repetedcapid = 0;
8292 
8293  int TSsize = 10;
8294  TSsize = digiItr->size();
8296  for (int ii = 0; ii < TSsize; ii++) {
8297  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8298  bool er = (*digiItr)[ii].er(); // error
8299  bool dv = (*digiItr)[ii].dv(); // valid data
8300  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8301  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8302  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8303  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8304  anycapid = false;
8305  ERRORfiber = fiber;
8306  ERRORfiberChan = fiberChan;
8307  ERRORfiberAndChan = fiberAndChan;
8308  if (capid != lastcapid) {
8309  } else {
8310  repetedcapid = 1;
8311  }
8312  }
8313  lastcapid = capid;
8314  if (ii == 0)
8315  firstcapid = capid;
8316  sumcapid += capid;
8317  if (er) {
8318  anyer = true;
8319  ERRORfiber = fiber;
8320  ERRORfiberChan = fiberChan;
8321  ERRORfiberAndChan = fiberAndChan;
8322  }
8323  if (!dv) {
8324  anydv = false;
8325  ERRORfiber = fiber;
8326  ERRORfiberChan = fiberChan;
8327  ERRORfiberAndChan = fiberAndChan;
8328  }
8329  } // for
8331  if (firstcapid == 0 && !anycapid)
8332  errorGeneral = 1;
8333  if (firstcapid == 1 && !anycapid)
8334  errorGeneral = 2;
8335  if (firstcapid == 2 && !anycapid)
8336  errorGeneral = 3;
8337  if (firstcapid == 3 && !anycapid)
8338  errorGeneral = 4;
8339  if (!anycapid)
8340  error1 = 1;
8341  if (anyer)
8342  error2 = 1;
8343  if (!anydv)
8344  error3 = 1;
8345  if (!anycapid && anyer)
8346  error4 = 1;
8347  if (!anycapid && !anydv)
8348  error5 = 1;
8349  if (!anycapid && anyer && !anydv)
8350  error6 = 1;
8351  if (anyer && !anydv)
8352  error7 = 1;
8354  double ampl = 0.;
8355  for (int ii = 0; ii < TSsize; ii++) {
8356  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8357  ampl += ampldefault; // fC
8358  }
8360  // Digis: HF
8361  if (sub == 4) {
8362  h_errorGeneral_HF->Fill(double(errorGeneral), 1.);
8363  h_error1_HF->Fill(double(error1), 1.);
8364  h_error2_HF->Fill(double(error2), 1.);
8365  h_error3_HF->Fill(double(error3), 1.);
8366  h_error4_HF->Fill(double(error4), 1.);
8367  h_error5_HF->Fill(double(error5), 1.);
8368  h_error6_HF->Fill(double(error6), 1.);
8369  h_error7_HF->Fill(double(error7), 1.);
8370  h_repetedcapid_HF->Fill(double(repetedcapid), 1.);
8371  if (error1 != 0 || error2 != 0 || error3 != 0) {
8373  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8374  h_amplError_HF->Fill(ampl, 1.);
8375  if (mdepth == 1)
8376  h_mapDepth1Error_HF->Fill(double(ieta), double(iphi));
8377  if (mdepth == 2)
8378  h_mapDepth2Error_HF->Fill(double(ieta), double(iphi));
8379  h_fiber0_HF->Fill(double(ERRORfiber), 1.);
8380  h_fiber1_HF->Fill(double(ERRORfiberChan), 1.);
8381  h_fiber2_HF->Fill(double(ERRORfiberAndChan), 1.);
8382  } else {
8383  h_amplFine_HF->Fill(ampl, 1.);
8384  }
8385  }
8386 }
8391 // ------------ method called for each event ------------
8393  CaloSamples toolOriginal; // TS
8394  // double tool[100];
8395  DetId detid = qie10df.detid();
8396  HcalDetId hcaldetid = HcalDetId(detid);
8397  int ieta = hcaldetid.ieta();
8398  if (ieta > 0)
8399  ieta -= 1;
8400  int iphi = hcaldetid.iphi() - 1;
8401  int mdepth = hcaldetid.depth();
8402  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8403  // !!!!!!
8404  int error1 = 0;
8405  // !!!!!!
8406  bool anycapid = true;
8407  // bool anyer = false;
8408  // bool anydv = true;
8409  // for help:
8410  int firstcapid = 0;
8411  int sumcapid = 0;
8412  int lastcapid = 0, capid = 0;
8413  int repetedcapid = 0;
8414  // loop over the samples in the digi
8415  nTS = qie10df.samples();
8417  for (int ii = 0; ii < nTS; ii++) {
8418  capid = qie10df[ii].capid(); // capId (0-3, sequential)
8419  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8420  anycapid = false;
8421  if (capid != lastcapid) {
8422  } else {
8423  repetedcapid = 1;
8424  }
8425  }
8426  lastcapid = capid;
8427  if (ii == 0)
8428  firstcapid = capid;
8429  sumcapid += capid;
8430  } // for
8432  if (!anycapid)
8433  error1 = 1;
8434  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8435  double ampl = 0.;
8436  for (int ii = 0; ii < nTS; ii++) {
8437  int adc = qie10df[ii].adc();
8438  double ampldefault = adc2fC_QIE10[adc];
8439  ampl += ampldefault; //
8440  }
8442  // Digis:HF
8443  if (sub == 4) {
8444  h_error1_HF->Fill(double(error1), 1.);
8445  h_repetedcapid_HF->Fill(double(repetedcapid), 1.);
8446  if (error1 != 0) {
8447  // if(error1 !=0 || error2 !=0 || error3 !=0 ) {
8449  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8450  h_amplError_HF->Fill(ampl, 1.);
8451  if (mdepth == 1)
8452  h_mapDepth1Error_HF->Fill(double(ieta), double(iphi));
8453  if (mdepth == 2)
8454  h_mapDepth2Error_HF->Fill(double(ieta), double(iphi));
8455  if (mdepth == 3)
8456  h_mapDepth3Error_HF->Fill(double(ieta), double(iphi));
8457  if (mdepth == 4)
8458  h_mapDepth4Error_HF->Fill(double(ieta), double(iphi));
8459  h_errorGeneral_HF->Fill(double(firstcapid), 1.);
8460  } else {
8461  h_amplFine_HF->Fill(ampl, 1.);
8462  }
8463  }
8464 }
8466 // ------------ method called for each event ------------
8468  CaloSamples toolOriginal; // TS
8469  HcalDetId cell(digiItr->id());
8470  int mdepth = cell.depth();
8471  int iphi = cell.iphi() - 1;
8472  int ieta = cell.ieta();
8473  if (ieta > 0)
8474  ieta -= 1;
8475  int sub = cell.subdet(); // 1-HB, 2-HE, 3-HO, 4-HF
8476  int errorGeneral = 0;
8477  int error1 = 0;
8478  int error2 = 0;
8479  int error3 = 0;
8480  int error4 = 0;
8481  int error5 = 0;
8482  int error6 = 0;
8483  int error7 = 0;
8484  // !!!!!!
8485  bool anycapid = true;
8486  bool anyer = false;
8487  bool anydv = true;
8488  // for help:
8489  int firstcapid = 0;
8490  int sumcapid = 0;
8491  int lastcapid = 0, capid = 0;
8492  int ERRORfiber = -10;
8493  int ERRORfiberChan = -10;
8494  int ERRORfiberAndChan = -10;
8495  int repetedcapid = 0;
8496  for (int ii = 0; ii < (*digiItr).size(); ii++) {
8497  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8498  bool er = (*digiItr)[ii].er(); // error
8499  bool dv = (*digiItr)[ii].dv(); // valid data
8500  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8501  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8502  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8503  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8504  anycapid = false;
8505  ERRORfiber = fiber;
8506  ERRORfiberChan = fiberChan;
8507  ERRORfiberAndChan = fiberAndChan;
8508  if (capid != lastcapid) {
8509  } else {
8510  repetedcapid = 1;
8511  }
8512  }
8513  lastcapid = capid;
8514 
8515  if (ii == 0)
8516  firstcapid = capid;
8517  sumcapid += capid;
8518 
8519  if (er) {
8520  anyer = true;
8521  ERRORfiber = fiber;
8522  ERRORfiberChan = fiberChan;
8523  ERRORfiberAndChan = fiberAndChan;
8524  }
8525  if (!dv) {
8526  anydv = false;
8527  ERRORfiber = fiber;
8528  ERRORfiberChan = fiberChan;
8529  ERRORfiberAndChan = fiberAndChan;
8530  }
8531 
8532  } // for
8533 
8535  if (firstcapid == 0 && !anycapid)
8536  errorGeneral = 1;
8537  if (firstcapid == 1 && !anycapid)
8538  errorGeneral = 2;
8539  if (firstcapid == 2 && !anycapid)
8540  errorGeneral = 3;
8541  if (firstcapid == 3 && !anycapid)
8542  errorGeneral = 4;
8543  if (!anycapid)
8544  error1 = 1;
8545  if (anyer)
8546  error2 = 1;
8547  if (!anydv)
8548  error3 = 1;
8549 
8550  if (!anycapid && anyer)
8551  error4 = 1;
8552  if (!anycapid && !anydv)
8553  error5 = 1;
8554  if (!anycapid && anyer && !anydv)
8555  error6 = 1;
8556  if (anyer && !anydv)
8557  error7 = 1;
8559  // Energy:
8560  double ampl = 0.;
8561  for (int ii = 0; ii < (*digiItr).size(); ii++) {
8562  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8563  ampl += ampldefault; // fC
8564  }
8566  // Digis:
8567  // HO
8568  if (sub == 3) {
8569  h_errorGeneral_HO->Fill(double(errorGeneral), 1.);
8570  h_error1_HO->Fill(double(error1), 1.);
8571  h_error2_HO->Fill(double(error2), 1.);
8572  h_error3_HO->Fill(double(error3), 1.);
8573  h_error4_HO->Fill(double(error4), 1.);
8574  h_error5_HO->Fill(double(error5), 1.);
8575  h_error6_HO->Fill(double(error6), 1.);
8576  h_error7_HO->Fill(double(error7), 1.);
8577  h_repetedcapid_HO->Fill(double(repetedcapid), 1.);
8578 
8579  if (error1 != 0 || error2 != 0 || error3 != 0) {
8581  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8582  h_amplError_HO->Fill(ampl, 1.);
8583  if (mdepth == 4)
8584  h_mapDepth4Error_HO->Fill(double(ieta), double(iphi));
8585  // to be divided by h_mapDepth4_HO
8586 
8587  if (mdepth != 4)
8588  std::cout << " mdepth HO = " << mdepth << std::endl;
8589  h_fiber0_HO->Fill(double(ERRORfiber), 1.);
8590  h_fiber1_HO->Fill(double(ERRORfiberChan), 1.);
8591  h_fiber2_HO->Fill(double(ERRORfiberAndChan), 1.);
8592  } else {
8593  h_amplFine_HO->Fill(ampl, 1.);
8594  }
8595  }
8596 }
8599  CaloSamples toolOriginal; // TS
8600  double tool[100];
8601  double toolwithPedSubtr[100]; // TS
8602  double lintoolwithoutPedSubtr[100]; // TS
8603  HcalDetId cell(digiItr->id());
8604  int mdepth = cell.depth();
8605  int iphi = cell.iphi() - 1; // 0-71
8606  int ieta0 = cell.ieta(); //-41 +41 !=0
8607  int ieta = ieta0;
8608  if (ieta > 0)
8609  ieta -= 1; //-41 +41
8610  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8611  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
8612  const HcalGain* gain = conditions->getGain(cell);
8613  // const HcalGainWidth* gainWidth = conditions->getGainWidth(cell);
8614  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
8615  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
8616  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
8617  // HcalCalibrations calib = conditions->getHcalCalibrations(cell);
8618  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
8619  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
8620  HcalCoderDb coder(*channelCoder, *shape);
8621  if (useADCfC_)
8622  coder.adc2fC(*digiItr, toolOriginal);
8623  double pedestalaver9 = 0.;
8624  double pedestalaver4 = 0.;
8625  double pedestal0 = 0.;
8626  double pedestal1 = 0.;
8627  double pedestal2 = 0.;
8628  double pedestal3 = 0.;
8629  double pedestalwaver9 = 0.;
8630  double pedestalwaver4 = 0.;
8631  double pedestalw0 = 0.;
8632  double pedestalw1 = 0.;
8633  double pedestalw2 = 0.;
8634  double pedestalw3 = 0.;
8635  double difpedestal0 = 0.;
8636  double difpedestal1 = 0.;
8637  double difpedestal2 = 0.;
8638  double difpedestal3 = 0.;
8639 
8640  double amplitudewithPedSubtr1 = 0.;
8641  double amplitudewithPedSubtr2 = 0.;
8642  double amplitudewithPedSubtr3 = 0.;
8643  double amplitudewithPedSubtr4 = 0.;
8644  double amplitude = 0.;
8645  double absamplitude = 0.;
8646  double amplitude345 = 0.;
8647  double ampl = 0.;
8648  double linamplitudewithoutPedSubtr = 0.;
8649  double timew = 0.;
8650  double timeww = 0.;
8651  double max_signal = -100.;
8652  int ts_with_max_signal = -100;
8653  int c0 = 0;
8654  int c1 = 0;
8655  int c2 = 0;
8656  int c3 = 0;
8657  int c4 = 0;
8658  double errorBtype = 0.;
8659 
8660  int TSsize = 10; //HEHB for Run2
8661  TSsize = digiItr->size();
8662  if ((*digiItr).size() != 10)
8663  errorBtype = 1.;
8664  // ii = 0 to 9
8665  for (int ii = 0; ii < TSsize; ii++) {
8666  // for (int ii=0; ii<digiItr->size(); ii++) {
8667  double ampldefaultwithPedSubtr = 0.;
8668  double linampldefaultwithoutPedSubtr = 0.;
8669  double ampldefault = 0.;
8670  double ampldefault0 = 0.;
8671  double ampldefault1 = 0.;
8672  double ampldefault2 = 0.;
8673  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive ADCcounts
8674  if (useADCfC_)
8675  ampldefault1 = toolOriginal[ii]; //adcfC
8676  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts linearized
8677  if (useADCmassive_) {
8678  ampldefault = ampldefault0;
8679  }
8680  if (useADCfC_) {
8681  ampldefault = ampldefault1;
8682  }
8683  if (useADCcounts_) {
8684  ampldefault = ampldefault2;
8685  }
8686  ampldefaultwithPedSubtr = ampldefault0;
8687  linampldefaultwithoutPedSubtr = ampldefault2;
8688 
8689  int capid = ((*digiItr)[ii]).capid();
8690  // double pedestal = calib.pedestal(capid);
8691  double pedestalINI = pedestal00->getValue(capid);
8692  double pedestal = pedestal00->getValue(capid);
8693  double pedestalw = pedw->getSigma(capid, capid);
8694  ampldefaultwithPedSubtr -= pedestal; // pedestal subtraction
8696  ampldefault -= pedestal; // pedestal subtraction
8697  // ampldefault*= calib.respcorrgain(capid) ; // fC --> GeV
8698  tool[ii] = ampldefault;
8699  toolwithPedSubtr[ii] = ampldefaultwithPedSubtr;
8700  lintoolwithoutPedSubtr[ii] = linampldefaultwithoutPedSubtr;
8701 
8702  pedestalaver9 += pedestal;
8703  pedestalwaver9 += pedestalw * pedestalw;
8704 
8705  if (capid == 0 && c0 == 0) {
8706  c0++;
8707  c4++;
8708  pedestalaver4 += pedestal;
8709  pedestal0 = pedestal;
8710  pedestalw0 = pedestalw;
8711  pedestalwaver4 += pedestalw * pedestalw;
8712  difpedestal0 = pedestal - pedestalINI;
8713  }
8714 
8715  if (capid == 1 && c1 == 0) {
8716  c1++;
8717  c4++;
8718  pedestalaver4 += pedestal;
8719  pedestal1 = pedestal;
8720  pedestalw1 = pedestalw;
8721  pedestalwaver4 += pedestalw * pedestalw;
8722  difpedestal1 = pedestal - pedestalINI;
8723  }
8724  if (capid == 2 && c2 == 0) {
8725  c2++;
8726  c4++;
8727  pedestalaver4 += pedestal;
8728  pedestal2 = pedestal;
8729  pedestalw2 = pedestalw;
8730  pedestalwaver4 += pedestalw * pedestalw;
8731  difpedestal2 = pedestal - pedestalINI;
8732  }
8733  if (capid == 3 && c3 == 0) {
8734  c3++;
8735  c4++;
8736  pedestalaver4 += pedestal;
8737  pedestal3 = pedestal;
8738  pedestalw3 = pedestalw;
8739  pedestalwaver4 += pedestalw * pedestalw;
8740  difpedestal3 = pedestal - pedestalINI;
8741  }
8742 
8743  if (max_signal < ampldefault) {
8744  max_signal = ampldefault;
8745  ts_with_max_signal = ii;
8746  }
8748  // TS = 1 to 10: 1 2 3 4 5 6 7 8 9 10
8749  // ii = 0 to 9: 0 1 2 3 4 5 6 7 8 9
8750  // var.1 ----------------------
8751  // var.2 ----------------
8752  // var.3 ----------
8753  // var.4 -------
8754  //
8755  // TS = 2-9 for raddam only var.1
8756  if (ii > 0 && ii < 9)
8757  amplitudewithPedSubtr1 += ampldefaultwithPedSubtr; //
8758  // TS = 3-8 for raddam only var.2
8759  if (ii > 1 && ii < 8)
8760  amplitudewithPedSubtr2 += ampldefaultwithPedSubtr; //
8761  // TS = 4-7 for raddam only var.3
8762  if (ii > 2 && ii < 7)
8763  amplitudewithPedSubtr3 += ampldefaultwithPedSubtr; //
8764  // TS = 4-6 for raddam only var.4
8765  if (ii > 2 && ii < 6)
8766  amplitudewithPedSubtr4 += ampldefaultwithPedSubtr; //
8767  //
8768  amplitude += ampldefault; //
8769  absamplitude += abs(ampldefault); //
8770 
8771  if (ii == 3 || ii == 4 || ii == 5)
8772  amplitude345 += ampldefault;
8773  if (flagcpuoptimization_ == 0) {
8775  } //flagcpuoptimization
8776  timew += (ii + 1) * abs(ampldefault);
8777  timeww += (ii + 1) * ampldefault;
8778  } //for 1
8780  // sub=1||2 HBHE
8781  if (sub == 1 || sub == 2) {
8782  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HBHE
8783  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HBHE
8784  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HBHE
8785  }
8786  pedestalaver9 /= TSsize;
8787  pedestalaver4 /= c4;
8788  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
8789  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
8790  if (ts_with_max_signal > -1 && ts_with_max_signal < 10)
8791  ampl = tool[ts_with_max_signal];
8792  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < 10)
8793  ampl += tool[ts_with_max_signal + 2];
8794  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < 10)
8795  ampl += tool[ts_with_max_signal + 1];
8796  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < 10)
8797  ampl += tool[ts_with_max_signal - 1];
8798 
8800  if (ts_with_max_signal > -1 && ts_with_max_signal < 10)
8801  linamplitudewithoutPedSubtr = lintoolwithoutPedSubtr[ts_with_max_signal];
8802  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < 10)
8803  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal + 2];
8804  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < 10)
8805  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal + 1];
8806  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < 10)
8807  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal - 1];
8808 
8809  double ratio = 0.;
8810  if (amplitude != 0.)
8811  ratio = ampl / amplitude;
8812  if (ratio < 0. || ratio > 1.02)
8813  ratio = 0.;
8814  double aveamplitude = 0.;
8815  double aveamplitudew = 0.;
8816  if (absamplitude > 0 && timew > 0)
8817  aveamplitude = timew / absamplitude; // average_TS +1
8818  if (amplitude > 0 && timeww > 0)
8819  aveamplitudew = timeww / amplitude; // average_TS +1
8820  double rmsamp = 0.;
8821  // and CapIdErrors:
8822  int error = 0;
8823  bool anycapid = true;
8824  bool anyer = false;
8825  bool anydv = true;
8826  int lastcapid = 0;
8827  int capid = 0;
8828  for (int ii = 0; ii < TSsize; ii++) {
8829  double aaaaaa = (ii + 1) - aveamplitudew;
8830  double aaaaaa2 = aaaaaa * aaaaaa;
8831  double ampldefault = tool[ii];
8832  rmsamp += (aaaaaa2 * ampldefault); // fC
8833  capid = ((*digiItr)[ii]).capid();
8834  bool er = (*digiItr)[ii].er(); // error
8835  bool dv = (*digiItr)[ii].dv(); // valid data
8836  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8837  anycapid = false;
8838  }
8839  // std::cout << " ii = " << ii << " capid = " << capid << " ((lastcapid+1)%4) = " << ((lastcapid+1)%4) << std::endl;
8840  lastcapid = capid;
8841  if (er) {
8842  anyer = true;
8843  }
8844  if (!dv) {
8845  anydv = false;
8846  }
8847  } //for 2
8848  if (!anycapid || anyer || !anydv)
8849  error = 1;
8850 
8851  double rmsamplitude = 0.;
8852  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
8853  rmsamplitude = sqrt(rmsamp / amplitude);
8854  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
8855 
8856  // CapIdErrors end /////////////////////////////////////////////////////////
8857 
8858  // AZ 1.10.2015:
8859  if (error == 1) {
8860  if (sub == 1 && mdepth == 1)
8861  h_Amplitude_forCapIdErrors_HB1->Fill(amplitude, 1.);
8862  if (sub == 1 && mdepth == 2)
8863  h_Amplitude_forCapIdErrors_HB2->Fill(amplitude, 1.);
8864  if (sub == 2 && mdepth == 1)
8865  h_Amplitude_forCapIdErrors_HE1->Fill(amplitude, 1.);
8866  if (sub == 2 && mdepth == 2)
8867  h_Amplitude_forCapIdErrors_HE2->Fill(amplitude, 1.);
8868  if (sub == 2 && mdepth == 3)
8869  h_Amplitude_forCapIdErrors_HE3->Fill(amplitude, 1.);
8870  }
8871  if (error != 1) {
8872  if (sub == 1 && mdepth == 1)
8873  h_Amplitude_notCapIdErrors_HB1->Fill(amplitude, 1.);
8874  if (sub == 1 && mdepth == 2)
8875  h_Amplitude_notCapIdErrors_HB2->Fill(amplitude, 1.);
8876  if (sub == 2 && mdepth == 1)
8877  h_Amplitude_notCapIdErrors_HE1->Fill(amplitude, 1.);
8878  if (sub == 2 && mdepth == 2)
8879  h_Amplitude_notCapIdErrors_HE2->Fill(amplitude, 1.);
8880  if (sub == 2 && mdepth == 3)
8881  h_Amplitude_notCapIdErrors_HE3->Fill(amplitude, 1.);
8882  }
8883 
8884  for (int ii = 0; ii < TSsize; ii++) {
8885  // for (int ii=0; ii<10; ii++) {
8886  double ampldefault = tool[ii];
8888  if (sub == 1) {
8889  if (amplitude > 120) {
8890  h_shape_Ahigh_HB0->Fill(float(ii), ampldefault);
8891  h_shape0_Ahigh_HB0->Fill(float(ii), 1.);
8892  } else {
8893  h_shape_Alow_HB0->Fill(float(ii), ampldefault);
8894  h_shape0_Alow_HB0->Fill(float(ii), 1.);
8895  } //HB0
8897  if (pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
8898  pedestal3 < pedestalHBMax_) {
8899  h_shape_Ahigh_HB1->Fill(float(ii), ampldefault);
8900  h_shape0_Ahigh_HB1->Fill(float(ii), 1.);
8901  } else {
8902  h_shape_Alow_HB1->Fill(float(ii), ampldefault);
8903  h_shape0_Alow_HB1->Fill(float(ii), 1.);
8904  } //HB1
8905  if (error == 0) {
8906  h_shape_Ahigh_HB2->Fill(float(ii), ampldefault);
8907  h_shape0_Ahigh_HB2->Fill(float(ii), 1.);
8908  } else {
8909  h_shape_Alow_HB2->Fill(float(ii), ampldefault);
8910  h_shape0_Alow_HB2->Fill(float(ii), 1.);
8911  } //HB2
8913  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
8914  pedestalw3 < pedestalwHBMax_) {
8915  h_shape_Ahigh_HB3->Fill(float(ii), ampldefault);
8916  h_shape0_Ahigh_HB3->Fill(float(ii), 1.);
8917  } else {
8918  h_shape_Alow_HB3->Fill(float(ii), ampldefault);
8919  h_shape0_Alow_HB3->Fill(float(ii), 1.);
8920  } //HB3
8921 
8922  } // sub HB
8923 
8924  } //for 3 over TSs
8925 
8926  if (sub == 1) {
8927  // bad_channels with C,A,W,P,pW,
8928  if (error == 1 || amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_ || rmsamplitude < rmsHBMin_ ||
8929  rmsamplitude > rmsHBMax_ || pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ ||
8930  pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestalw0 < pedestalwHBMax_ ||
8931  pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ || pedestalw3 < pedestalwHBMax_) {
8932  for (int ii = 0; ii < TSsize; ii++) {
8933  double ampldefault = tool[ii];
8934  h_shape_bad_channels_HB->Fill(float(ii), ampldefault);
8935  h_shape0_bad_channels_HB->Fill(float(ii), 1.);
8936  }
8937  }
8938  // good_channels with C,A,W,P,pW
8939  else {
8940  for (int ii = 0; ii < TSsize; ii++) {
8941  double ampldefault = tool[ii];
8942  h_shape_good_channels_HB->Fill(float(ii), ampldefault);
8943  h_shape0_good_channels_HB->Fill(float(ii), 1.);
8944  }
8945  }
8946  } // sub HB
8947  if (sub == 2) {
8948  // bad_channels with C,A,W,P,pW,
8949  if (error == 1 || amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_ || rmsamplitude < rmsHEMin_ ||
8950  rmsamplitude > rmsHEMax_ || pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ ||
8951  pedestal2 < pedestalHEMax_ || pedestal3 < pedestalHEMax_ || pedestalw0 < pedestalwHEMax_ ||
8952  pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ || pedestalw3 < pedestalwHEMax_) {
8953  for (int ii = 0; ii < TSsize; ii++) {
8954  double ampldefault = tool[ii];
8955  h_shape_bad_channels_HE->Fill(float(ii), ampldefault);
8956  h_shape0_bad_channels_HE->Fill(float(ii), 1.);
8957  }
8958  }
8959  // good_channels with C,A,W,P,pW,
8960  else {
8961  for (int ii = 0; ii < TSsize; ii++) {
8962  double ampldefault = tool[ii];
8963  h_shape_good_channels_HE->Fill(float(ii), ampldefault);
8964  h_shape0_good_channels_HE->Fill(float(ii), 1.);
8965  }
8966  }
8967  } // sub HE
8968 
8970  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
8971  // for Error B-type
8972  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
8973  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
8974  // HB
8975  if (sub == 1) {
8977  // // // // // // // // // HB PedestalCorrelations :
8978  double mypedestal = pedestal0;
8979  double mypedestalw = pedestalw0;
8980  h2_pedvsampl_HB->Fill(mypedestal, amplitude);
8981  h2_pedwvsampl_HB->Fill(mypedestalw, amplitude);
8982  h_pedvsampl_HB->Fill(mypedestal, amplitude);
8983  h_pedwvsampl_HB->Fill(mypedestalw, amplitude);
8984  h_pedvsampl0_HB->Fill(mypedestal, 1.);
8985  h_pedwvsampl0_HB->Fill(mypedestalw, 1.);
8986 
8987  h2_amplvsped_HB->Fill(amplitude, mypedestal);
8988  h2_amplvspedw_HB->Fill(amplitude, mypedestalw);
8989  h_amplvsped_HB->Fill(amplitude, mypedestal);
8990  h_amplvspedw_HB->Fill(amplitude, mypedestalw);
8991  h_amplvsped0_HB->Fill(amplitude, 1.);
8992  } //
8993  // // // // // // // // // HB Pedestals:
8994  if (studyPedestalsHist_) {
8995  h_pedestal0_HB->Fill(pedestal0, 1.);
8996  h_pedestal1_HB->Fill(pedestal1, 1.);
8997  h_pedestal2_HB->Fill(pedestal2, 1.);
8998  h_pedestal3_HB->Fill(pedestal3, 1.);
8999  h_pedestalaver4_HB->Fill(pedestalaver4, 1.);
9000  h_pedestalaver9_HB->Fill(pedestalaver9, 1.);
9001  h_pedestalw0_HB->Fill(pedestalw0, 1.);
9002  h_pedestalw1_HB->Fill(pedestalw1, 1.);
9003  h_pedestalw2_HB->Fill(pedestalw2, 1.);
9004  h_pedestalw3_HB->Fill(pedestalw3, 1.);
9005  h_pedestalwaver4_HB->Fill(pedestalwaver4, 1.);
9006  h_pedestalwaver9_HB->Fill(pedestalwaver9, 1.);
9007  // for averaged values:
9008  if (mdepth == 1) {
9009  h_mapDepth1Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
9010  h_mapDepth1Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
9011  h_mapDepth1Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
9012  h_mapDepth1Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
9013  h_mapDepth1Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
9014  h_mapDepth1Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
9015  h_mapDepth1Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
9016  h_mapDepth1Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
9017  }
9018  if (mdepth == 2) {
9019  h_mapDepth2Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
9020  h_mapDepth2Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
9021  h_mapDepth2Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
9022  h_mapDepth2Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
9023  h_mapDepth2Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
9024  h_mapDepth2Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
9025  h_mapDepth2Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
9026  h_mapDepth2Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
9027  }
9028  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
9029  pedestalw3 < pedestalwHBMax_) {
9030  if (mdepth == 1)
9031  h_mapDepth1pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9032  if (mdepth == 2)
9033  h_mapDepth2pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9034  if (mdepth == 3)
9035  h_mapDepth3pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9036  if (mdepth == 4)
9037  h_mapDepth4pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9038  }
9039  if (pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
9040  pedestal3 < pedestalHBMax_) {
9041  if (mdepth == 1)
9042  h_mapDepth1pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9043  if (mdepth == 2)
9044  h_mapDepth2pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9045  if (mdepth == 3)
9046  h_mapDepth3pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9047  if (mdepth == 4)
9048  h_mapDepth4pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9049  }
9050  for (int ii = 0; ii < TSsize; ii++) {
9051  h_pedestal00_HB->Fill(pedestal00->getValue(ii), 1.);
9052  h_gain_HB->Fill(gain->getValue(ii), 1.);
9053  }
9054  h_respcorr_HB->Fill(respcorr->getValue(), 1.);
9055  h_timecorr_HB->Fill(timecorr->getValue(), 1.);
9056  h_lutcorr_HB->Fill(lutcorr->getValue(), 1.);
9057  h_difpedestal0_HB->Fill(difpedestal0, 1.);
9058  h_difpedestal1_HB->Fill(difpedestal1, 1.);
9059  h_difpedestal2_HB->Fill(difpedestal2, 1.);
9060  h_difpedestal3_HB->Fill(difpedestal3, 1.);
9061  } //
9062  // // // // // // // // // HB ADCAmpl:
9063  if (studyADCAmplHist_) {
9064  h_ADCAmpl345Zoom_HB->Fill(amplitude345, 1.);
9065  h_ADCAmpl345Zoom1_HB->Fill(amplitude345, 1.);
9066  h_ADCAmpl345_HB->Fill(amplitude345, 1.);
9067  if (error == 0) {
9068  h_ADCAmpl_HBCapIdNoError->Fill(amplitude, 1.);
9069  h_ADCAmpl345_HBCapIdNoError->Fill(amplitude345, 1.);
9070  }
9071  if (error == 1) {
9072  h_ADCAmpl_HBCapIdError->Fill(amplitude, 1.);
9073  h_ADCAmpl345_HBCapIdError->Fill(amplitude345, 1.);
9074  }
9075  h_ADCAmplZoom_HB->Fill(amplitude, 1.);
9076  h_ADCAmplZoom1_HB->Fill(amplitude, 1.);
9077  h_ADCAmpl_HB->Fill(amplitude, 1.);
9078 
9079  h_AmplitudeHBrest->Fill(amplitude, 1.);
9080  h_AmplitudeHBrest1->Fill(amplitude, 1.);
9081  h_AmplitudeHBrest6->Fill(amplitude, 1.);
9082 
9083  if (amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_) {
9085  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9086  if (mdepth == 1)
9087  h_mapDepth1ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
9088  if (mdepth == 2)
9089  h_mapDepth2ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
9090  } // if
9091  // if(amplitude >400.) averSIGNALoccupancy_HB += 1.;
9092  if (amplitude < 35.) {
9093  if (mdepth == 1)
9094  h_mapDepth1ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
9095  if (mdepth == 2)
9096  h_mapDepth2ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
9097  } // if
9098  // for averaged values:
9099  if (mdepth == 1)
9100  h_mapDepth1ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
9101  if (mdepth == 2)
9102  h_mapDepth2ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
9103  if (mdepth == 1)
9104  h_mapDepth1ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
9105  if (mdepth == 2)
9106  h_mapDepth2ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
9107  h_bcnvsamplitude_HB->Fill(float(bcn), amplitude);
9108  h_bcnvsamplitude0_HB->Fill(float(bcn), 1.);
9109  h_orbitNumvsamplitude_HB->Fill(float(orbitNum), amplitude);
9110  h_orbitNumvsamplitude0_HB->Fill(float(orbitNum), 1.);
9111  if (amplitude > forallestimators_amplitude_bigger_)
9112  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
9113  } //if(studyADCAmplHist_
9115 
9116  // // // // // // // // // HB TSmean:
9117  if (studyTSmeanShapeHist_) {
9118  h_TSmeanA_HB->Fill(aveamplitude1, 1.);
9119  if (aveamplitude1 < TSmeanHBMin_ || aveamplitude1 > TSmeanHBMax_) {
9121  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9122  if (mdepth == 1)
9123  h_mapDepth1TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
9124  if (mdepth == 2)
9125  h_mapDepth2TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
9126  } // if
9127  // for averaged values:
9128  if (mdepth == 1)
9129  h_mapDepth1TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
9130  if (mdepth == 2)
9131  h_mapDepth2TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
9132  if (amplitude > forallestimators_amplitude_bigger_)
9133  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
9134  } //if(studyTSmeanShapeHist_
9136 
9137  // // // // // // // // // HB TSmax:
9138  if (studyTSmaxShapeHist_) {
9139  h_TSmaxA_HB->Fill(float(ts_with_max_signal), 1.);
9140  if (ts_with_max_signal < TSpeakHBMin_ || ts_with_max_signal > TSpeakHBMax_) {
9142  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9143  if (mdepth == 1)
9144  h_mapDepth1TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
9145  if (mdepth == 2)
9146  h_mapDepth2TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
9147  } // if
9148  // for averaged values:
9149  if (mdepth == 1)
9150  h_mapDepth1TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9151  if (mdepth == 2)
9152  h_mapDepth2TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9153  if (amplitude > forallestimators_amplitude_bigger_)
9154  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
9155  } //if(studyTSmaxShapeHist_
9157 
9158  // // // // // // // // // HB RMS:
9159  if (studyRMSshapeHist_) {
9160  h_Amplitude_HB->Fill(rmsamplitude, 1.);
9161  if (rmsamplitude < rmsHBMin_ || rmsamplitude > rmsHBMax_) {
9163  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9164  if (mdepth == 1)
9165  h_mapDepth1Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
9166  if (mdepth == 2)
9167  h_mapDepth2Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
9168  } // if
9169  // for averaged values:
9170  if (mdepth == 1)
9171  h_mapDepth1Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
9172  if (mdepth == 2)
9173  h_mapDepth2Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
9174  if (amplitude > forallestimators_amplitude_bigger_)
9175  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
9176  } //if(studyRMSshapeHist_)
9178 
9179  // // // // // // // // // HB Ratio:
9180  if (studyRatioShapeHist_) {
9181  h_Ampl_HB->Fill(ratio, 1.);
9182  if (ratio < ratioHBMin_ || ratio > ratioHBMax_) {
9184  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9185  if (mdepth == 1)
9186  h_mapDepth1Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
9187  if (mdepth == 2)
9188  h_mapDepth2Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
9189  // //
9190  } //if(ratio
9191  // for averaged values:
9192  if (mdepth == 1)
9193  h_mapDepth1Ampl_HB->Fill(double(ieta), double(iphi), ratio);
9194  if (mdepth == 2)
9195  h_mapDepth2Ampl_HB->Fill(double(ieta), double(iphi), ratio);
9196  if (amplitude > forallestimators_amplitude_bigger_)
9197  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
9198  } //if(studyRatioShapeHist_)
9200 
9201  // // // // // // // // // HB DiffAmplitude:
9202  if (studyDiffAmplHist_) {
9203  if (mdepth == 1)
9204  h_mapDepth1AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
9205  if (mdepth == 2)
9206  h_mapDepth2AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
9207  } // if(studyDiffAmplHist_)
9208 
9210  if (mdepth == 1)
9211  h_mapDepth1_HB->Fill(double(ieta), double(iphi), 1.);
9212  if (mdepth == 2)
9213  h_mapDepth2_HB->Fill(double(ieta), double(iphi), 1.);
9214  } //if ( sub == 1 )
9215 
9216  // HE
9217  if (sub == 2) {
9218  // // // // // // // // // HE PedestalCorrelations :
9220  double mypedestal = pedestal0;
9221  double mypedestalw = pedestalw0;
9222  h2_pedvsampl_HE->Fill(mypedestal, amplitude);
9223  h2_pedwvsampl_HE->Fill(mypedestalw, amplitude);
9224  h_pedvsampl_HE->Fill(mypedestal, amplitude);
9225  h_pedwvsampl_HE->Fill(mypedestalw, amplitude);
9226  h_pedvsampl0_HE->Fill(mypedestal, 1.);
9227  h_pedwvsampl0_HE->Fill(mypedestalw, 1.);
9228  } //
9229  // // // // // // // // // HE Pedestals:
9230  if (studyPedestalsHist_) {
9231  h_pedestal0_HE->Fill(pedestal0, 1.);
9232  h_pedestal1_HE->Fill(pedestal1, 1.);
9233  h_pedestal2_HE->Fill(pedestal2, 1.);
9234  h_pedestal3_HE->Fill(pedestal3, 1.);
9235  h_pedestalaver4_HE->Fill(pedestalaver4, 1.);
9236  h_pedestalaver9_HE->Fill(pedestalaver9, 1.);
9237  h_pedestalw0_HE->Fill(pedestalw0, 1.);
9238  h_pedestalw1_HE->Fill(pedestalw1, 1.);
9239  h_pedestalw2_HE->Fill(pedestalw2, 1.);
9240  h_pedestalw3_HE->Fill(pedestalw3, 1.);
9241  h_pedestalwaver4_HE->Fill(pedestalwaver4, 1.);
9242  h_pedestalwaver9_HE->Fill(pedestalwaver9, 1.);
9243  // for averaged values:
9244  if (mdepth == 1) {
9245  h_mapDepth1Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9246  h_mapDepth1Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9247  h_mapDepth1Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9248  h_mapDepth1Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9249  h_mapDepth1Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9250  h_mapDepth1Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9251  h_mapDepth1Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9252  h_mapDepth1Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9253  }
9254  if (mdepth == 2) {
9255  h_mapDepth2Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9256  h_mapDepth2Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9257  h_mapDepth2Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9258  h_mapDepth2Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9259  h_mapDepth2Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9260  h_mapDepth2Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9261  h_mapDepth2Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9262  h_mapDepth2Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9263  }
9264  if (mdepth == 3) {
9265  h_mapDepth3Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9266  h_mapDepth3Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9267  h_mapDepth3Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9268  h_mapDepth3Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9269  h_mapDepth3Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9270  h_mapDepth3Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9271  h_mapDepth3Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9272  h_mapDepth3Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9273  }
9274  if (pedestalw0 < pedestalwHEMax_ || pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ ||
9275  pedestalw3 < pedestalwHEMax_) {
9276  if (mdepth == 1)
9277  h_mapDepth1pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9278  if (mdepth == 2)
9279  h_mapDepth2pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9280  if (mdepth == 3)
9281  h_mapDepth3pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9282  }
9283  if (pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ || pedestal2 < pedestalHEMax_ ||
9284  pedestal3 < pedestalHEMax_) {
9285  if (mdepth == 1)
9286  h_mapDepth1pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9287  if (mdepth == 2)
9288  h_mapDepth2pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9289  if (mdepth == 3)
9290  h_mapDepth3pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9291  }
9292  for (int ii = 0; ii < TSsize; ii++) {
9293  h_pedestal00_HE->Fill(pedestal00->getValue(ii), 1.);
9294  h_gain_HE->Fill(gain->getValue(ii), 1.);
9295  }
9296  h_respcorr_HE->Fill(respcorr->getValue(), 1.);
9297  h_timecorr_HE->Fill(timecorr->getValue(), 1.);
9298  h_lutcorr_HE->Fill(lutcorr->getValue(), 1.);
9299  } //
9300 
9301  // h_mapDepth1ADCAmpl12SiPM_HE
9302  // // // // // // // // // HE ADCAmpl:
9303  if (studyADCAmplHist_) {
9304  h_ADCAmpl345Zoom_HE->Fill(ampl, 1.);
9305  h_ADCAmpl345Zoom1_HE->Fill(amplitude345, 1.);
9306  h_ADCAmpl345_HE->Fill(amplitude345, 1.);
9307  h_ADCAmpl_HE->Fill(amplitude, 1.);
9308 
9309  h_ADCAmplrest_HE->Fill(amplitude, 1.);
9310  h_ADCAmplrest1_HE->Fill(amplitude, 1.);
9311  h_ADCAmplrest6_HE->Fill(amplitude, 1.);
9312 
9313  h_ADCAmplZoom1_HE->Fill(amplitude, 1.);
9314  if (amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_) {
9316  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9317  if (mdepth == 1)
9318  h_mapDepth1ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9319  if (mdepth == 2)
9320  h_mapDepth2ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9321  if (mdepth == 3)
9322  h_mapDepth3ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9323  } // if
9324  // if(amplitude > 700.) averSIGNALoccupancy_HE += 1.;
9325  if (amplitude < 500.) {
9326  if (mdepth == 1)
9327  h_mapDepth1ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9328  if (mdepth == 2)
9329  h_mapDepth2ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9330  if (mdepth == 3)
9331  h_mapDepth3ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9332  } // if
9333  // for averaged values:
9334  if (mdepth == 1)
9335  h_mapDepth1ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9336  if (mdepth == 2)
9337  h_mapDepth2ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9338  if (mdepth == 3)
9339  h_mapDepth3ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9340 
9341  if (mdepth == 1) {
9342  h_mapDepth1ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9343  h_mapDepth1linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9344  }
9345  if (mdepth == 2) {
9346  h_mapDepth2ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9347  h_mapDepth2linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9348  }
9349  if (mdepth == 3) {
9350  h_mapDepth3ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9351  h_mapDepth3linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9352  }
9353 
9356  h_bcnvsamplitude_HE->Fill(float(bcn), amplitude);
9357  h_bcnvsamplitude0_HE->Fill(float(bcn), 1.);
9358  h_orbitNumvsamplitude_HE->Fill(float(orbitNum), amplitude);
9359  h_orbitNumvsamplitude0_HE->Fill(float(orbitNum), 1.);
9360 
9362 
9363  if (amplitude > forallestimators_amplitude_bigger_)
9364  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
9365 
9366  } //if(studyADCAmplHist_
9368  // // // // // // // // // HE TSmean:
9369  if (studyTSmeanShapeHist_) {
9370  h_TSmeanA_HE->Fill(aveamplitude1, 1.);
9371  if (aveamplitude1 < TSmeanHEMin_ || aveamplitude1 > TSmeanHEMax_) {
9373  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9374  if (mdepth == 1)
9375  h_mapDepth1TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9376  if (mdepth == 2)
9377  h_mapDepth2TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9378  if (mdepth == 3)
9379  h_mapDepth3TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9380  } // if
9381  // for averaged values:
9382  if (mdepth == 1)
9383  h_mapDepth1TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9384  if (mdepth == 2)
9385  h_mapDepth2TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9386  if (mdepth == 3)
9387  h_mapDepth3TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9388  if (amplitude > forallestimators_amplitude_bigger_)
9389  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
9390  } //if(studyTSmeanShapeHist_) {
9392  // // // // // // // // // HE TSmax:
9393  if (studyTSmaxShapeHist_) {
9394  h_TSmaxA_HE->Fill(float(ts_with_max_signal), 1.);
9395  if (ts_with_max_signal < TSpeakHEMin_ || ts_with_max_signal > TSpeakHEMax_) {
9397  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9398  if (mdepth == 1)
9399  h_mapDepth1TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9400  if (mdepth == 2)
9401  h_mapDepth2TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9402  if (mdepth == 3)
9403  h_mapDepth3TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9404  } // if
9405  // for averaged values:
9406  if (mdepth == 1)
9407  h_mapDepth1TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9408  if (mdepth == 2)
9409  h_mapDepth2TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9410  if (mdepth == 3)
9411  h_mapDepth3TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9412  if (amplitude > forallestimators_amplitude_bigger_)
9413  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
9414  } //if(studyTSmaxShapeHist_) {
9416  // // // // // // // // // HE RMS:
9417  if (studyRMSshapeHist_) {
9418  h_Amplitude_HE->Fill(rmsamplitude, 1.);
9419  if (rmsamplitude < rmsHEMin_ || rmsamplitude > rmsHEMax_) {
9421  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9422  if (mdepth == 1)
9423  h_mapDepth1Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9424  if (mdepth == 2)
9425  h_mapDepth2Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9426  if (mdepth == 3)
9427  h_mapDepth3Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9428  }
9429  // for averaged values:
9430  if (mdepth == 1)
9431  h_mapDepth1Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9432  if (mdepth == 2)
9433  h_mapDepth2Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9434  if (mdepth == 3)
9435  h_mapDepth3Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9436  if (amplitude > forallestimators_amplitude_bigger_)
9437  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
9438  } //if(studyRMSshapeHist_)
9440 
9441  // // // // // // // // // HE Ratio:
9442  if (studyRatioShapeHist_) {
9443  h_Ampl_HE->Fill(ratio, 1.);
9444  if (ratio < ratioHEMin_ || ratio > ratioHEMax_) {
9446  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9447  if (mdepth == 1)
9448  h_mapDepth1Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9449  if (mdepth == 2)
9450  h_mapDepth2Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9451  if (mdepth == 3)
9452  h_mapDepth3Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9453  }
9454  // for averaged values:
9455  if (mdepth == 1)
9456  h_mapDepth1Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9457  if (mdepth == 2)
9458  h_mapDepth2Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9459  if (mdepth == 3)
9460  h_mapDepth3Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9461  if (amplitude > forallestimators_amplitude_bigger_)
9462  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
9463  } //if(studyRatioShapeHist_)
9465  // // // // // // // // // HE DiffAmplitude:
9466  if (studyDiffAmplHist_) {
9467  // gain stability:
9468  if (mdepth == 1)
9469  h_mapDepth1AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9470  if (mdepth == 2)
9471  h_mapDepth2AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9472  if (mdepth == 3)
9473  h_mapDepth3AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9474 
9475  } // if(studyDiffAmplHist_)
9476 
9477  // RADDAM filling:
9478  if (flagLaserRaddam_ > 0) {
9479  double amplitudewithPedSubtr = 0.;
9480 
9481  //for cut on A_channel:
9482  if (ts_with_max_signal > -1 && ts_with_max_signal < 10)
9483  amplitudewithPedSubtr = toolwithPedSubtr[ts_with_max_signal];
9484  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < 10)
9485  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal + 2];
9486  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < 10)
9487  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal + 1];
9488  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < 10)
9489  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal - 1];
9490 
9491  h_AamplitudewithPedSubtr_RADDAM_HE->Fill(amplitudewithPedSubtr);
9492  h_AamplitudewithPedSubtr_RADDAM_HEzoom0->Fill(amplitudewithPedSubtr);
9493  h_AamplitudewithPedSubtr_RADDAM_HEzoom1->Fill(amplitudewithPedSubtr);
9494 
9495  if (amplitudewithPedSubtr > 50.) {
9496  if (flagLaserRaddam_ > 1) {
9497  mapRADDAM_HE[mdepth - 1][ieta + 41][iphi] += amplitudewithPedSubtr;
9498  ++mapRADDAM0_HE[mdepth - 1][ieta + 41][iphi];
9499  }
9500 
9501  if (mdepth == 1) {
9502  h_mapDepth1RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9503  h_mapDepth1RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9504  h_A_Depth1RADDAM_HE->Fill(amplitudewithPedSubtr);
9505  }
9506  if (mdepth == 2) {
9507  h_mapDepth2RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9508  h_mapDepth2RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9509  h_A_Depth2RADDAM_HE->Fill(amplitudewithPedSubtr);
9510  }
9511  if (mdepth == 3) {
9512  h_mapDepth3RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9513  h_mapDepth3RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9514  h_A_Depth3RADDAM_HE->Fill(amplitudewithPedSubtr);
9515  }
9516 
9517  // (d1 & eta 17-29) L1
9518  int LLLLLL111111 = 0;
9519  if ((mdepth == 1 && fabs(ieta0) > 16 && fabs(ieta0) < 30))
9520  LLLLLL111111 = 1;
9521  // (d2 & eta 17-26) && (d3 & eta 27-28) L2
9522  int LLLLLL222222 = 0;
9523  if ((mdepth == 2 && fabs(ieta0) > 16 && fabs(ieta0) < 27) ||
9524  (mdepth == 3 && fabs(ieta0) > 26 && fabs(ieta0) < 29))
9525  LLLLLL222222 = 1;
9526  //
9527  if (LLLLLL111111 == 1) {
9528  //forStudy h_mapLayer1RADDAM_HE->Fill(fabs(double(ieta0)), amplitudewithPedSubtr); h_mapLayer1RADDAM0_HE->Fill(fabs(double(ieta0)), 1.); h_A_Layer1RADDAM_HE->Fill(amplitudewithPedSubtr);
9529  h_sigLayer1RADDAM_HE->Fill(double(ieta0), amplitudewithPedSubtr);
9530  h_sigLayer1RADDAM0_HE->Fill(double(ieta0), 1.);
9531  }
9532  if (LLLLLL222222 == 1) {
9533  //forStudy h_mapLayer2RADDAM_HE->Fill(fabs(double(ieta0)), amplitudewithPedSubtr); h_mapLayer2RADDAM0_HE->Fill(fabs(double(ieta0)), 1.); h_A_Layer2RADDAM_HE->Fill(amplitudewithPedSubtr);
9534  h_sigLayer2RADDAM_HE->Fill(double(ieta0), amplitudewithPedSubtr);
9535  h_sigLayer2RADDAM0_HE->Fill(double(ieta0), 1.);
9536  }
9537 
9538  //
9539  if (mdepth == 3 && fabs(ieta0) == 16) {
9540  h_mapDepth3RADDAM16_HE->Fill(amplitudewithPedSubtr);
9541  // forStudy h_mapDepth3RADDAM160_HE->Fill(1.);
9542  }
9543  //
9544  } //amplitude > 60.
9545  } // END RADDAM
9546 
9548  if (mdepth == 1)
9549  h_mapDepth1_HE->Fill(double(ieta), double(iphi), 1.);
9550  if (mdepth == 2)
9551  h_mapDepth2_HE->Fill(double(ieta), double(iphi), 1.);
9552  if (mdepth == 3)
9553  h_mapDepth3_HE->Fill(double(ieta), double(iphi), 1.);
9554  } //if ( sub == 2 )
9555  //
9556 } // fillDigiAmplitude
9560  CaloSamples toolOriginal; // TS
9561  double tool[100];
9562  DetId detid = qie11df.detid();
9563  HcalDetId hcaldetid = HcalDetId(detid);
9564  int ieta = hcaldetid.ieta();
9565  if (ieta > 0)
9566  ieta -= 1;
9567  int iphi = hcaldetid.iphi() - 1;
9568  int mdepth = hcaldetid.depth();
9569  int sub = hcaldetid.subdet(); // 1-HB, 2-HE QIE11DigiCollection
9570  nTS = qie11df.samples();
9572  if (mdepth == 0 || sub > 4)
9573  return;
9574  if (mdepth > 3 && flagupgradeqie1011_ == 3)
9575  return;
9576  if (mdepth > 3 && flagupgradeqie1011_ == 7)
9577  return;
9578  if (mdepth > 3 && flagupgradeqie1011_ == 8)
9579  return;
9580  if (mdepth > 3 && flagupgradeqie1011_ == 9)
9581  return;
9582 
9583  // for some CMSSW versions and GT this line uncommented, can help to run job
9584  //if(mdepth ==4 && sub==1 && (ieta == -16 || ieta == 15) ) return;// HB depth4 eta=-16, 15 since I did:if(ieta > 0) ieta -= 1;
9587  const HcalGain* gain = conditions->getGain(hcaldetid);
9588  // const HcalGainWidth* gainWidth = conditions->getGainWidth(hcaldetid);
9589  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(hcaldetid);
9590  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(hcaldetid);
9591  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(hcaldetid);
9592  const HcalQIECoder* channelCoder = conditions->getHcalCoder(hcaldetid);
9593  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(hcaldetid);
9594  const HcalPedestal* pedestal00 = conditions->getPedestal(hcaldetid);
9595  HcalCoderDb coder(*channelCoder, *shape);
9596  if (useADCfC_)
9597  coder.adc2fC(qie11df, toolOriginal);
9598  double pedestalaver9 = 0.;
9599  double pedestalaver4 = 0.;
9600  double pedestal0 = 0.;
9601  double pedestal1 = 0.;
9602  double pedestal2 = 0.;
9603  double pedestal3 = 0.;
9604  double pedestalwaver9 = 0.;
9605  double pedestalwaver4 = 0.;
9606  double pedestalw0 = 0.;
9607  double pedestalw1 = 0.;
9608  double pedestalw2 = 0.;
9609  double pedestalw3 = 0.;
9610  double difpedestal0 = 0.;
9611  double difpedestal1 = 0.;
9612  double difpedestal2 = 0.;
9613  double difpedestal3 = 0.;
9614 
9615  double amplitude = 0.;
9616  double amplitude0 = 0.;
9617  double absamplitude = 0.;
9618  double tocampl = 0.;
9619 
9620  double amplitude345 = 0.;
9621  double ampl = 0.;
9622  double ampl3ts = 0.;
9623  double amplmaxts = 0.;
9624  double timew = 0.;
9625  double timeww = 0.;
9626  double max_signal = -100.;
9627  int ts_with_max_signal = -100;
9628  int c0 = 0;
9629  int c1 = 0;
9630  int c2 = 0;
9631  int c3 = 0;
9632  int c4 = 0;
9633  double errorBtype = 0.;
9634 
9635  int TSsize = 8; // sub= 1 HB
9636  if (sub == 2)
9637  TSsize = 8; // sub = 2 HE
9638  if (nTS != TSsize)
9639  errorBtype = 1.;
9640  TSsize = nTS; //nTS = qie11df.samples();
9642  // double ADC_ped = 0.;
9643  int flagTS2 = 0;
9644  for (int ii = 0; ii < TSsize; ii++) {
9645  double ampldefault = 0.;
9646  double tocdefault = 0.;
9647  double ampldefault0 = 0.;
9648  double ampldefault1 = 0.;
9649  double ampldefault2 = 0.;
9650 
9651  ampldefault0 = adc2fC_QIE11_shunt6[qie11df[ii].adc()]; // massive !!!!!! (use for local runs as default shunt6)
9652  if (flaguseshunt_ == 1)
9653  ampldefault0 = adc2fC_QIE11_shunt1[qie11df[ii].adc()]; // massive !!!!!!
9654  if (useADCfC_)
9655  ampldefault1 = toolOriginal[ii]; //adcfC
9656  ampldefault2 = qie11df[ii].adc(); //ADCcounts
9657 
9658  if (useADCmassive_) {
9659  ampldefault = ampldefault0;
9660  } // !!!!!!
9661  if (useADCfC_) {
9662  ampldefault = ampldefault1;
9663  }
9664  if (useADCcounts_) {
9665  ampldefault = ampldefault2;
9666  }
9667  tocdefault = ampldefault;
9668 
9669  int capid = (qie11df[ii]).capid();
9670  double pedestal = pedestal00->getValue(capid);
9671  double pedestalw = pedw->getSigma(capid, capid);
9672  double pedestalINI = pedestal00->getValue(capid);
9673  tocdefault -= pedestal; // pedestal subtraction
9675  ampldefault -= pedestal; // pedestal subtraction
9676  tool[ii] = ampldefault;
9677  pedestalaver9 += pedestal;
9678  pedestalwaver9 += pedestalw * pedestalw;
9679 
9680  if (capid == 0 && c0 == 0) {
9681  c0++;
9682  c4++;
9683  pedestalaver4 += pedestal;
9684  pedestal0 = pedestal;
9685  pedestalw0 = pedestalw;
9686  pedestalwaver4 += pedestalw * pedestalw;
9687  difpedestal0 = pedestal - pedestalINI;
9688  }
9689 
9690  if (capid == 1 && c1 == 0) {
9691  c1++;
9692  c4++;
9693  pedestalaver4 += pedestal;
9694  pedestal1 = pedestal;
9695  pedestalw1 = pedestalw;
9696  pedestalwaver4 += pedestalw * pedestalw;
9697  difpedestal1 = pedestal - pedestalINI;
9698  }
9699  if (capid == 2 && c2 == 0) {
9700  c2++;
9701  c4++;
9702  pedestalaver4 += pedestal;
9703  pedestal2 = pedestal;
9704  pedestalw2 = pedestalw;
9705  pedestalwaver4 += pedestalw * pedestalw;
9706  difpedestal2 = pedestal - pedestalINI;
9707  }
9708  if (capid == 3 && c3 == 0) {
9709  c3++;
9710  c4++;
9711  pedestalaver4 += pedestal;
9712  pedestal3 = pedestal;
9713  pedestalw3 = pedestalw;
9714  pedestalwaver4 += pedestalw * pedestalw;
9715  difpedestal3 = pedestal - pedestalINI;
9716  }
9717 
9718  if (max_signal < ampldefault) {
9719  max_signal = ampldefault;
9720  ts_with_max_signal = ii;
9721  }
9722  amplitude += ampldefault; //
9723  absamplitude += abs(ampldefault); //
9724  tocampl += tocdefault; //
9725 
9726  if (ii == 1 || ii == 2 || ii == 3 || ii == 4 || ii == 5 || ii == 6 || ii == 7 || ii == 8)
9727  amplitude345 += ampldefault;
9728 
9729  if (flagcpuoptimization_ == 0) {
9730  } //flagcpuoptimization
9731 
9732  timew += (ii + 1) * abs(ampldefault);
9733  timeww += (ii + 1) * ampldefault;
9734 
9735  if (ii == 2 && ampldefault > 0.)
9736  flagTS2 = 1;
9737  } //for 1
9739  amplitude0 = amplitude;
9740 
9741  pedestalaver9 /= TSsize;
9742  pedestalaver4 /= c4;
9743  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
9744  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
9745 
9746  // ------------ to get signal in TS: -2 max +1 ------------
9747  if (ts_with_max_signal > -1 && ts_with_max_signal < 10) {
9748  ampl = tool[ts_with_max_signal];
9749  ampl3ts = tool[ts_with_max_signal];
9750  amplmaxts = tool[ts_with_max_signal];
9751  }
9752  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < 10) {
9753  ampl += tool[ts_with_max_signal - 1];
9754  ampl3ts += tool[ts_with_max_signal - 1];
9755  }
9756  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < 10) {
9757  ampl += tool[ts_with_max_signal + 1];
9758  ampl3ts += tool[ts_with_max_signal + 1];
9759  }
9760  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < 10) {
9761  ampl += tool[ts_with_max_signal + 2];
9762  }
9763  // HE charge correction for SiPMs:
9764  if (flagsipmcorrection_ != 0) {
9765  if (sub == 2) {
9766  double xa = amplitude / 40.;
9767  double xb = ampl / 40.;
9768  double xc = amplitude345 / 40.;
9769  double xd = ampl3ts / 40.;
9770  double xe = amplmaxts / 40.;
9771  double txa = tocampl / 40.;
9772  // ADDI case:
9773  if (((ieta == -16 || ieta == 15) && mdepth == 4) ||
9774  ((ieta == -17 || ieta == 16) && (mdepth == 2 || mdepth == 3)) ||
9775  ((ieta == -18 || ieta == 17) && mdepth == 5)) {
9776  double c0 = 1.000000;
9777  double b1 = 2.59096e-05;
9778  double a2 = 4.60721e-11;
9779  double corrforxa = a2 * xa * xa + b1 * xa + c0;
9780  double corrforxb = a2 * xb * xb + b1 * xb + c0;
9781  double corrforxc = a2 * xc * xc + b1 * xc + c0;
9782  double corrforxd = a2 * xd * xd + b1 * xd + c0;
9783  double corrforxe = a2 * xe * xe + b1 * xe + c0;
9784  double corrfortxa = a2 * txa * txa + b1 * txa + c0;
9785  h_corrforxaADDI_HE->Fill(amplitude, corrforxa);
9786  h_corrforxaADDI0_HE->Fill(amplitude, 1.);
9787  amplitude *= corrforxa;
9788  ampl *= corrforxb;
9789  amplitude345 *= corrforxc;
9790  ampl3ts *= corrforxd;
9791  amplmaxts *= corrforxe;
9792  tocampl *= corrfortxa;
9793  }
9794  // MAIN case:
9795  else {
9796  double c0 = 1.000000;
9797  double b1 = 2.71238e-05;
9798  double a2 = 1.32877e-10;
9799  double corrforxa = a2 * xa * xa + b1 * xa + c0;
9800  double corrforxb = a2 * xb * xb + b1 * xb + c0;
9801  double corrforxc = a2 * xc * xc + b1 * xc + c0;
9802  double corrforxd = a2 * xd * xd + b1 * xd + c0;
9803  double corrforxe = a2 * xe * xe + b1 * xe + c0;
9804  double corrfortxa = a2 * txa * txa + b1 * txa + c0;
9805  h_corrforxaMAIN_HE->Fill(amplitude, corrforxa);
9806  h_corrforxaMAIN0_HE->Fill(amplitude, 1.);
9807  amplitude *= corrforxa;
9808  ampl *= corrforxb;
9809  amplitude345 *= corrforxc;
9810  ampl3ts *= corrforxd;
9811  amplmaxts *= corrforxe;
9812  tocampl *= corrfortxa;
9813  }
9814  } // sub == 2 HE charge correction end
9815  } //flagsipmcorrection_
9817  // sub=1||2 HBHE
9818  if (sub == 1 || sub == 2) {
9819  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HBHE
9820  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HBHE
9821  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HBHE
9822  }
9823  tocamplchannel[sub - 1][mdepth - 1][ieta + 41][iphi] += tocampl; // 0-neta ; 0-71 HBHE
9824 
9825  double ratio = 0.;
9826  // if(amplallTS != 0.) ratio = ampl/amplallTS;
9827  if (amplitude != 0.)
9828  ratio = ampl / amplitude;
9829  if (ratio < 0. || ratio > 1.02)
9830  ratio = 0.;
9831  double aveamplitude = 0.;
9832  double aveamplitudew = 0.;
9833  if (absamplitude > 0 && timew > 0)
9834  aveamplitude = timew / absamplitude; // average_TS +1
9835  if (amplitude0 > 0 && timeww > 0)
9836  aveamplitudew = timeww / amplitude0; // average_TS +1
9837  double rmsamp = 0.;
9838  // and CapIdErrors:
9839  int error = 0;
9840  bool anycapid = true;
9841  int lastcapid = 0;
9842  int capid = 0;
9843  for (int ii = 0; ii < TSsize; ii++) {
9844  double aaaaaa = (ii + 1) - aveamplitudew;
9845  double aaaaaa2 = aaaaaa * aaaaaa;
9846  double ampldefault = tool[ii];
9847  rmsamp += (aaaaaa2 * ampldefault); // fC
9848  capid = (qie11df[ii]).capid();
9849  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
9850  anycapid = false;
9851  }
9852  lastcapid = capid;
9853  } //for 2
9854 
9855  if (!anycapid)
9856  error = 1;
9857  double rmsamplitude = 0.;
9858  if ((amplitude0 > 0 && rmsamp > 0) || (amplitude0 < 0 && rmsamp < 0))
9859  rmsamplitude = sqrt(rmsamp / amplitude0);
9860  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
9861  // CapIdErrors end /////////////////////////////////////////////////////////
9862 
9863  // AZ 1.10.2015:
9864  if (error == 1) {
9865  if (sub == 1 && mdepth == 1)
9866  h_Amplitude_forCapIdErrors_HB1->Fill(amplitude, 1.);
9867  if (sub == 1 && mdepth == 2)
9868  h_Amplitude_forCapIdErrors_HB2->Fill(amplitude, 1.);
9869  if (sub == 2 && mdepth == 1)
9870  h_Amplitude_forCapIdErrors_HE1->Fill(amplitude, 1.);
9871  if (sub == 2 && mdepth == 2)
9872  h_Amplitude_forCapIdErrors_HE2->Fill(amplitude, 1.);
9873  if (sub == 2 && mdepth == 3)
9874  h_Amplitude_forCapIdErrors_HE3->Fill(amplitude, 1.);
9875  }
9876  if (error != 1) {
9877  if (sub == 1 && mdepth == 1)
9878  h_Amplitude_notCapIdErrors_HB1->Fill(amplitude, 1.);
9879  if (sub == 1 && mdepth == 2)
9880  h_Amplitude_notCapIdErrors_HB2->Fill(amplitude, 1.);
9881  if (sub == 2 && mdepth == 1)
9882  h_Amplitude_notCapIdErrors_HE1->Fill(amplitude, 1.);
9883  if (sub == 2 && mdepth == 2)
9884  h_Amplitude_notCapIdErrors_HE2->Fill(amplitude, 1.);
9885  if (sub == 2 && mdepth == 3)
9886  h_Amplitude_notCapIdErrors_HE3->Fill(amplitude, 1.);
9887  }
9888 
9889  for (int ii = 0; ii < TSsize; ii++) {
9890  // for (int ii=0; ii<10; ii++) {
9891  double ampldefault = tool[ii];
9893  if (sub == 1) {
9894  if (amplitude0 > 120) {
9895  h_shape_Ahigh_HB0->Fill(float(ii), ampldefault);
9896  h_shape0_Ahigh_HB0->Fill(float(ii), 1.);
9897  } else {
9898  h_shape_Alow_HB0->Fill(float(ii), ampldefault);
9899  h_shape0_Alow_HB0->Fill(float(ii), 1.);
9900  } //HB0
9902  if (pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
9903  pedestal3 < pedestalHBMax_) {
9904  h_shape_Ahigh_HB1->Fill(float(ii), ampldefault);
9905  h_shape0_Ahigh_HB1->Fill(float(ii), 1.);
9906  } else {
9907  h_shape_Alow_HB1->Fill(float(ii), ampldefault);
9908  h_shape0_Alow_HB1->Fill(float(ii), 1.);
9909  } //HB1
9910  if (error == 0) {
9911  h_shape_Ahigh_HB2->Fill(float(ii), ampldefault);
9912  h_shape0_Ahigh_HB2->Fill(float(ii), 1.);
9913  } else {
9914  h_shape_Alow_HB2->Fill(float(ii), ampldefault);
9915  h_shape0_Alow_HB2->Fill(float(ii), 1.);
9916  } //HB2
9918  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
9919  pedestalw3 < pedestalwHBMax_) {
9920  h_shape_Ahigh_HB3->Fill(float(ii), ampldefault);
9921  h_shape0_Ahigh_HB3->Fill(float(ii), 1.);
9922  } else {
9923  h_shape_Alow_HB3->Fill(float(ii), ampldefault);
9924  h_shape0_Alow_HB3->Fill(float(ii), 1.);
9925  } //HB3
9926 
9927  } // sub HB
9928 
9929  } //for 3 over TSs
9930 
9931  if (sub == 1) {
9932  // bad_channels with C,A,W,P,pW,
9933  if (error == 1 || amplitude0 < ADCAmplHBMin_ || amplitude0 > ADCAmplHBMax_ || rmsamplitude < rmsHBMin_ ||
9934  rmsamplitude > rmsHBMax_ || pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ ||
9935  pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestalw0 < pedestalwHBMax_ ||
9936  pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ || pedestalw3 < pedestalwHBMax_) {
9937  for (int ii = 0; ii < TSsize; ii++) {
9938  double ampldefault = tool[ii];
9939  h_shape_bad_channels_HB->Fill(float(ii), ampldefault);
9940  h_shape0_bad_channels_HB->Fill(float(ii), 1.);
9941  }
9942  }
9943  // good_channels with C,A,W,P,pW
9944  else {
9945  for (int ii = 0; ii < TSsize; ii++) {
9946  double ampldefault = tool[ii];
9947  h_shape_good_channels_HB->Fill(float(ii), ampldefault);
9948  h_shape0_good_channels_HB->Fill(float(ii), 1.);
9949  }
9950  }
9951  } // sub HB
9952 
9953  // HE starts:
9954  if (sub == 2) {
9955  // shape bad_channels with C,A,W,P,pW,
9956  if (error == 1 || amplitude0 < ADCAmplHEMin_ || amplitude0 > ADCAmplHEMax_ || rmsamplitude < rmsHEMin_ ||
9957  rmsamplitude > rmsHEMax_ || pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ ||
9958  pedestal2 < pedestalHEMax_ || pedestal3 < pedestalHEMax_ || pedestalw0 < pedestalwHEMax_ ||
9959  pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ || pedestalw3 < pedestalwHEMax_) {
9960  for (int ii = 0; ii < TSsize; ii++) {
9961  double ampldefault = tool[ii];
9962  h_shape_bad_channels_HE->Fill(float(ii), ampldefault);
9963  h_shape0_bad_channels_HE->Fill(float(ii), 1.);
9964  }
9965  }
9966  // shape good_channels with C,A,W,P,pW,
9967  else {
9968  for (int ii = 0; ii < TSsize; ii++) {
9969  double ampldefault = tool[ii];
9970  h_shape_good_channels_HE->Fill(float(ii), ampldefault);
9971  h_shape0_good_channels_HE->Fill(float(ii), 1.);
9972  } // ii
9973  } // else for good channels
9974  } // sub HE
9976  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
9977  // for Error B-type
9978  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
9979  // sumEstimator0[sub-1][mdepth-1][ieta+41][iphi] += pedestalw0;//Sig_Pedestals
9980  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
9981  // HB
9982  if (sub == 1) {
9984  // // // // // // // // // HB PedestalCorrelations :
9985  double mypedestal = pedestal0;
9986  double mypedestalw = pedestalw0;
9987  h2_pedvsampl_HB->Fill(mypedestal, amplitude);
9988  h2_pedwvsampl_HB->Fill(mypedestalw, amplitude);
9989  h_pedvsampl_HB->Fill(mypedestal, amplitude);
9990  h_pedwvsampl_HB->Fill(mypedestalw, amplitude);
9991  h_pedvsampl0_HB->Fill(mypedestal, 1.);
9992  h_pedwvsampl0_HB->Fill(mypedestalw, 1.);
9993 
9994  h2_amplvsped_HB->Fill(amplitude, mypedestal);
9995  h2_amplvspedw_HB->Fill(amplitude, mypedestalw);
9996  h_amplvsped_HB->Fill(amplitude, mypedestal);
9997  h_amplvspedw_HB->Fill(amplitude, mypedestalw);
9998  h_amplvsped0_HB->Fill(amplitude, 1.);
9999  } //
10000  // // // // // // // // // HB Pedestals:
10001  if (studyPedestalsHist_) {
10002  h_pedestal0_HB->Fill(pedestal0, 1.);
10003  h_pedestal1_HB->Fill(pedestal1, 1.);
10004  h_pedestal2_HB->Fill(pedestal2, 1.);
10005  h_pedestal3_HB->Fill(pedestal3, 1.);
10006  h_pedestalaver4_HB->Fill(pedestalaver4, 1.);
10007  h_pedestalaver9_HB->Fill(pedestalaver9, 1.);
10008  h_pedestalw0_HB->Fill(pedestalw0, 1.);
10009  h_pedestalw1_HB->Fill(pedestalw1, 1.);
10010  h_pedestalw2_HB->Fill(pedestalw2, 1.);
10011  h_pedestalw3_HB->Fill(pedestalw3, 1.);
10012  h_pedestalwaver4_HB->Fill(pedestalwaver4, 1.);
10013  h_pedestalwaver9_HB->Fill(pedestalwaver9, 1.);
10014  // for averaged values:
10015  if (mdepth == 1) {
10016  h_mapDepth1Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
10017  h_mapDepth1Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
10018  h_mapDepth1Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
10019  h_mapDepth1Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
10020  h_mapDepth1Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
10021  h_mapDepth1Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
10022  h_mapDepth1Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
10023  h_mapDepth1Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
10024  }
10025  if (mdepth == 2) {
10026  h_mapDepth2Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
10027  h_mapDepth2Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
10028  h_mapDepth2Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
10029  h_mapDepth2Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
10030  h_mapDepth2Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
10031  h_mapDepth2Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
10032  h_mapDepth2Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
10033  h_mapDepth2Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
10034  }
10035  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
10036  pedestalw3 < pedestalwHBMax_) {
10037  if (mdepth == 1)
10038  h_mapDepth1pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10039  if (mdepth == 2)
10040  h_mapDepth2pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10041  if (mdepth == 3)
10042  h_mapDepth3pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10043  if (mdepth == 3)
10044  h_mapDepth4pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10045  }
10046  if (pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
10047  pedestal3 < pedestalHBMax_) {
10048  if (mdepth == 1)
10049  h_mapDepth1pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10050  if (mdepth == 2)
10051  h_mapDepth2pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10052  if (mdepth == 3)
10053  h_mapDepth3pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10054  if (mdepth == 4)
10055  h_mapDepth4pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10056  }
10057  for (int ii = 0; ii < TSsize; ii++) {
10058  h_pedestal00_HB->Fill(pedestal00->getValue(ii), 1.);
10059  h_gain_HB->Fill(gain->getValue(ii), 1.);
10060  }
10061  h_respcorr_HB->Fill(respcorr->getValue(), 1.);
10062  h_timecorr_HB->Fill(timecorr->getValue(), 1.);
10063  h_lutcorr_HB->Fill(lutcorr->getValue(), 1.);
10064  h_difpedestal0_HB->Fill(difpedestal0, 1.);
10065  h_difpedestal1_HB->Fill(difpedestal1, 1.);
10066  h_difpedestal2_HB->Fill(difpedestal2, 1.);
10067  h_difpedestal3_HB->Fill(difpedestal3, 1.);
10068  } //
10069  // // // // // // // // // HB ADCAmpl:
10070  if (studyADCAmplHist_) {
10071  h_ADCAmpl345Zoom_HB->Fill(amplitude345, 1.);
10072  h_ADCAmpl345Zoom1_HB->Fill(amplitude345, 1.);
10073  h_ADCAmpl345_HB->Fill(amplitude345, 1.);
10074  if (error == 0) {
10075  h_ADCAmpl_HBCapIdNoError->Fill(amplitude, 1.);
10076  h_ADCAmpl345_HBCapIdNoError->Fill(amplitude345, 1.);
10077  }
10078  if (error == 1) {
10079  h_ADCAmpl_HBCapIdError->Fill(amplitude, 1.);
10080  h_ADCAmpl345_HBCapIdError->Fill(amplitude345, 1.);
10081  }
10082  h_ADCAmplZoom_HB->Fill(amplitude, 1.);
10083  h_ADCAmplZoom1_HB->Fill(amplitude, 1.);
10084  h_ADCAmpl_HB->Fill(amplitude, 1.);
10085 
10086  h_AmplitudeHBrest->Fill(amplitude, 1.);
10087  h_AmplitudeHBrest1->Fill(amplitude, 1.);
10088  h_AmplitudeHBrest6->Fill(amplitude, 1.);
10089 
10090  if (amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_) {
10092  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10093  if (mdepth == 1)
10094  h_mapDepth1ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10095  if (mdepth == 2)
10096  h_mapDepth2ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10097  if (mdepth == 3)
10098  h_mapDepth3ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10099  if (mdepth == 4)
10100  h_mapDepth4ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10101  } // if
10102  // if(amplitude >400.) averSIGNALoccupancy_HB += 1.;
10103  if (amplitude < 35.) {
10104  if (mdepth == 1)
10105  h_mapDepth1ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10106  if (mdepth == 2)
10107  h_mapDepth2ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10108  if (mdepth == 3)
10109  h_mapDepth3ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10110  if (mdepth == 4)
10111  h_mapDepth4ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10112  } // if
10113  // for averaged values:
10114  if (mdepth == 1)
10115  h_mapDepth1ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10116  if (mdepth == 2)
10117  h_mapDepth2ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10118  if (mdepth == 3)
10119  h_mapDepth3ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10120  if (mdepth == 4)
10121  h_mapDepth4ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10122  if (mdepth == 1)
10123  h_mapDepth1ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10124  if (mdepth == 2)
10125  h_mapDepth2ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10126  if (mdepth == 3)
10127  h_mapDepth3ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10128  if (mdepth == 4)
10129  h_mapDepth4ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10132  h_bcnvsamplitude_HB->Fill(float(bcn), amplitude);
10133  h_bcnvsamplitude0_HB->Fill(float(bcn), 1.);
10134  h_orbitNumvsamplitude_HB->Fill(float(orbitNum), amplitude);
10135  h_orbitNumvsamplitude0_HB->Fill(float(orbitNum), 1.);
10136  if (amplitude > forallestimators_amplitude_bigger_)
10137  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
10138  } //if(studyADCAmplHist_
10140 
10141  // // // // // // // // // HB TSmean:
10142  if (studyTSmeanShapeHist_) {
10143  h_TSmeanA_HB->Fill(aveamplitude1, 1.);
10144  if (aveamplitude1 < TSmeanHBMin_ || aveamplitude1 > TSmeanHBMax_) {
10146  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10147  if (mdepth == 1)
10148  h_mapDepth1TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10149  if (mdepth == 2)
10150  h_mapDepth2TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10151  if (mdepth == 3)
10152  h_mapDepth3TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10153  if (mdepth == 4)
10154  h_mapDepth4TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10155  } // if
10156  // for averaged values:
10157  if (mdepth == 1)
10158  h_mapDepth1TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10159  if (mdepth == 2)
10160  h_mapDepth2TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10161  if (mdepth == 3)
10162  h_mapDepth3TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10163  if (mdepth == 4)
10164  h_mapDepth4TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10165  if (amplitude > forallestimators_amplitude_bigger_)
10166  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
10167  } //if(studyTSmeanShapeHist_
10169 
10170  // // // // // // // // // HB TSmax:
10171  if (studyTSmaxShapeHist_) {
10172  h_TSmaxA_HB->Fill(float(ts_with_max_signal), 1.);
10173  if (ts_with_max_signal < TSpeakHBMin_ || ts_with_max_signal > TSpeakHBMax_) {
10175  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10176  if (mdepth == 1)
10177  h_mapDepth1TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10178  if (mdepth == 2)
10179  h_mapDepth2TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10180  if (mdepth == 3)
10181  h_mapDepth3TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10182  if (mdepth == 4)
10183  h_mapDepth4TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10184  } // if
10185  // for averaged values:
10186  if (mdepth == 1)
10187  h_mapDepth1TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10188  if (mdepth == 2)
10189  h_mapDepth2TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10190  if (mdepth == 3)
10191  h_mapDepth3TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10192  if (mdepth == 4)
10193  h_mapDepth4TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10194  if (amplitude > forallestimators_amplitude_bigger_)
10195  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
10196  } //if(studyTSmaxShapeHist_
10198 
10199  // // // // // // // // // HB RMS:
10200  if (studyRMSshapeHist_) {
10201  h_Amplitude_HB->Fill(rmsamplitude, 1.);
10202  if (rmsamplitude < rmsHBMin_ || rmsamplitude > rmsHBMax_) {
10204  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10205  if (mdepth == 1)
10206  h_mapDepth1Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10207  if (mdepth == 2)
10208  h_mapDepth2Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10209  if (mdepth == 3)
10210  h_mapDepth3Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10211  if (mdepth == 4)
10212  h_mapDepth4Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10213  } // if
10214  // for averaged values:
10215  if (mdepth == 1)
10216  h_mapDepth1Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10217  if (mdepth == 2)
10218  h_mapDepth2Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10219  if (mdepth == 3)
10220  h_mapDepth3Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10221  if (mdepth == 4)
10222  h_mapDepth4Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10223  if (amplitude > forallestimators_amplitude_bigger_)
10224  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
10225  } //if(studyRMSshapeHist_)
10227 
10228  // // // // // // // // // HB Ratio:
10229  if (studyRatioShapeHist_) {
10230  h_Ampl_HB->Fill(ratio, 1.);
10231  if (ratio < ratioHBMin_ || ratio > ratioHBMax_) {
10233  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10234  if (mdepth == 1)
10235  h_mapDepth1Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10236  if (mdepth == 2)
10237  h_mapDepth2Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10238  if (mdepth == 3)
10239  h_mapDepth3Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10240  if (mdepth == 4)
10241  h_mapDepth4Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10242  // //
10243  } //if(ratio
10244  // for averaged values:
10245  if (mdepth == 1)
10246  h_mapDepth1Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10247  if (mdepth == 2)
10248  h_mapDepth2Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10249  if (mdepth == 3)
10250  h_mapDepth3Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10251  if (mdepth == 4)
10252  h_mapDepth4Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10253  if (amplitude > forallestimators_amplitude_bigger_)
10254  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
10255  } //if(studyRatioShapeHist_)
10257 
10258  // // // // // // // // // HB DiffAmplitude:
10259  if (studyDiffAmplHist_) {
10260  if (mdepth == 1)
10261  h_mapDepth1AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10262  if (mdepth == 2)
10263  h_mapDepth2AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10264  if (mdepth == 3)
10265  h_mapDepth3AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10266  if (mdepth == 4)
10267  h_mapDepth4AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10268  } // if(studyDiffAmplHist_)
10269 
10271  if (mdepth == 1)
10272  h_mapDepth1_HB->Fill(double(ieta), double(iphi), 1.);
10273  if (mdepth == 2)
10274  h_mapDepth2_HB->Fill(double(ieta), double(iphi), 1.);
10275  if (mdepth == 3)
10276  h_mapDepth3_HB->Fill(double(ieta), double(iphi), 1.);
10277  if (mdepth == 4)
10278  h_mapDepth4_HB->Fill(double(ieta), double(iphi), 1.);
10279 
10280  if (flagTS2 == 1) {
10281  if (mdepth == 1)
10282  h_mapDepth1TS2_HB->Fill(double(ieta), double(iphi), 1.);
10283  if (mdepth == 2)
10284  h_mapDepth2TS2_HB->Fill(double(ieta), double(iphi), 1.);
10285  if (mdepth == 3)
10286  h_mapDepth3TS2_HB->Fill(double(ieta), double(iphi), 1.);
10287  if (mdepth == 4)
10288  h_mapDepth4TS2_HB->Fill(double(ieta), double(iphi), 1.);
10289  } // select entries only in TS=2
10290 
10291  } //if ( sub == 1 )
10292 
10293  // HE QIE11
10294  if (sub == 2) {
10295  // // // // // // // // // HE QIE11 PedestalCorrelations :
10297  // double mypedestal = pedestalaver9;
10298  // double mypedestalw = pedestalwaver9;
10299  double mypedestal = pedestal0;
10300  double mypedestalw = pedestalw0;
10301  h2_pedvsampl_HE->Fill(mypedestal, amplitude);
10302  h2_pedwvsampl_HE->Fill(mypedestalw, amplitude);
10303  h_pedvsampl_HE->Fill(mypedestal, amplitude);
10304  h_pedwvsampl_HE->Fill(mypedestalw, amplitude);
10305  h_pedvsampl0_HE->Fill(mypedestal, 1.);
10306  h_pedwvsampl0_HE->Fill(mypedestalw, 1.);
10307  } //
10308  // // // // // // // // // HE QIE11 Pedestals:
10309  if (studyPedestalsHist_) {
10310  h_pedestal0_HE->Fill(pedestal0, 1.);
10311  h_pedestal1_HE->Fill(pedestal1, 1.);
10312  h_pedestal2_HE->Fill(pedestal2, 1.);
10313  h_pedestal3_HE->Fill(pedestal3, 1.);
10314  h_pedestalaver4_HE->Fill(pedestalaver4, 1.);
10315  h_pedestalaver9_HE->Fill(pedestalaver9, 1.);
10316  h_pedestalw0_HE->Fill(pedestalw0, 1.);
10317  h_pedestalw1_HE->Fill(pedestalw1, 1.);
10318  h_pedestalw2_HE->Fill(pedestalw2, 1.);
10319  h_pedestalw3_HE->Fill(pedestalw3, 1.);
10320  h_pedestalwaver4_HE->Fill(pedestalwaver4, 1.);
10321  h_pedestalwaver9_HE->Fill(pedestalwaver9, 1.);
10322  // for averaged values:
10323  if (mdepth == 1) {
10324  h_mapDepth1Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10325  h_mapDepth1Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10326  h_mapDepth1Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10327  h_mapDepth1Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10328  h_mapDepth1Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10329  h_mapDepth1Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10330  h_mapDepth1Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10331  h_mapDepth1Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10332  }
10333  if (mdepth == 2) {
10334  h_mapDepth2Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10335  h_mapDepth2Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10336  h_mapDepth2Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10337  h_mapDepth2Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10338  h_mapDepth2Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10339  h_mapDepth2Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10340  h_mapDepth2Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10341  h_mapDepth2Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10342  }
10343  if (mdepth == 3) {
10344  h_mapDepth3Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10345  h_mapDepth3Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10346  h_mapDepth3Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10347  h_mapDepth3Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10348  h_mapDepth3Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10349  h_mapDepth3Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10350  h_mapDepth3Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10351  h_mapDepth3Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10352  }
10353  if (pedestalw0 < pedestalwHEMax_ || pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ ||
10354  pedestalw3 < pedestalwHEMax_) {
10355  if (mdepth == 1)
10356  h_mapDepth1pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10357  if (mdepth == 2)
10358  h_mapDepth2pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10359  if (mdepth == 3)
10360  h_mapDepth3pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10361  if (mdepth == 4)
10362  h_mapDepth4pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10363  if (mdepth == 5)
10364  h_mapDepth5pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10365  if (mdepth == 6)
10366  h_mapDepth6pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10367  if (mdepth == 7)
10368  h_mapDepth7pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10369  }
10370  if (pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ || pedestal2 < pedestalHEMax_ ||
10371  pedestal3 < pedestalHEMax_) {
10372  if (mdepth == 1)
10373  h_mapDepth1pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10374  if (mdepth == 2)
10375  h_mapDepth2pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10376  if (mdepth == 3)
10377  h_mapDepth3pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10378  if (mdepth == 4)
10379  h_mapDepth4pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10380  if (mdepth == 5)
10381  h_mapDepth5pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10382  if (mdepth == 6)
10383  h_mapDepth6pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10384  if (mdepth == 7)
10385  h_mapDepth7pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10386  }
10387  for (int ii = 0; ii < TSsize; ii++) {
10388  h_pedestal00_HE->Fill(pedestal00->getValue(ii), 1.);
10389  h_gain_HE->Fill(gain->getValue(ii), 1.);
10390  }
10391  h_respcorr_HE->Fill(respcorr->getValue(), 1.);
10392  h_timecorr_HE->Fill(timecorr->getValue(), 1.);
10393  h_lutcorr_HE->Fill(lutcorr->getValue(), 1.);
10394  } //
10395  // // // // // // // // // HE QIE11 ADCAmpl:
10396  if (studyADCAmplHist_) {
10397  h_ADCAmpl345_HE->Fill(amplitude345, 1.);
10398  h_ADCAmpl_HE->Fill(amplitude, 1.);
10399  // if( ieta <0) h_ADCAmpl_HEM->Fill(amplitude,1.);
10400  // if( ieta >0) h_ADCAmpl_HEP->Fill(amplitude,1.);
10401  h_ADCAmplrest_HE->Fill(amplitude, 1.);
10402  h_ADCAmplrest1_HE->Fill(amplitude, 1.);
10403  h_ADCAmplrest6_HE->Fill(amplitude, 1.);
10404 
10405  if (amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_) {
10407  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10408  if (mdepth == 1)
10409  h_mapDepth1ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10410  if (mdepth == 2)
10411  h_mapDepth2ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10412  if (mdepth == 3)
10413  h_mapDepth3ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10414  if (mdepth == 4)
10415  h_mapDepth4ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10416  if (mdepth == 5)
10417  h_mapDepth5ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10418  if (mdepth == 6)
10419  h_mapDepth6ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10420  if (mdepth == 7)
10421  h_mapDepth7ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10422  } // if
10423  // if(amplitude > 700.) averSIGNALoccupancy_HE += 1.;
10424  if (amplitude < 500.) {
10425  if (mdepth == 1)
10426  h_mapDepth1ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10427  if (mdepth == 2)
10428  h_mapDepth2ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10429  if (mdepth == 3)
10430  h_mapDepth3ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10431  if (mdepth == 4)
10432  h_mapDepth4ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10433  if (mdepth == 5)
10434  h_mapDepth5ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10435  if (mdepth == 6)
10436  h_mapDepth6ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10437  if (mdepth == 7)
10438  h_mapDepth7ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10439  } // if
10440 
10441  h_ADCAmplZoom1_HE->Fill(amplitude, 1.); // for amplitude allTS
10442  h_ADCAmpl345Zoom1_HE->Fill(ampl3ts, 1.); // for ampl3ts 3TSs
10443  h_ADCAmpl345Zoom_HE->Fill(ampl, 1.); // for ampl 4TSs
10444 
10445  if (amplitude > 110 && amplitude < 150) {
10446  h_mapADCAmplfirstpeak_HE->Fill(double(ieta), double(iphi), amplitude);
10447  h_mapADCAmplfirstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10448  } else if (amplitude > 150 && amplitude < 190) {
10449  h_mapADCAmplsecondpeak_HE->Fill(double(ieta), double(iphi), amplitude);
10450  h_mapADCAmplsecondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10451  }
10452 
10453  if (ampl3ts > 70 && ampl3ts < 110) {
10454  h_mapADCAmpl11firstpeak_HE->Fill(double(ieta), double(iphi), ampl3ts);
10455  h_mapADCAmpl11firstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10456  } else if (ampl3ts > 110 && ampl3ts < 150) {
10457  h_mapADCAmpl11secondpeak_HE->Fill(double(ieta), double(iphi), ampl3ts);
10458  h_mapADCAmpl11secondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10459  }
10460  if (ampl > 87 && ampl < 127) {
10461  h_mapADCAmpl12firstpeak_HE->Fill(double(ieta), double(iphi), ampl);
10462  h_mapADCAmpl12firstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10463  } else if (ampl > 127 && ampl < 167) {
10464  h_mapADCAmpl12secondpeak_HE->Fill(double(ieta), double(iphi), ampl);
10465  h_mapADCAmpl12secondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10466  }
10467  // for averaged values of every channel:
10468  if (mdepth == 1)
10469  h_mapDepth1ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10470  if (mdepth == 2)
10471  h_mapDepth2ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10472  if (mdepth == 3)
10473  h_mapDepth3ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10474  if (mdepth == 4)
10475  h_mapDepth4ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10476  if (mdepth == 5)
10477  h_mapDepth5ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10478  if (mdepth == 6)
10479  h_mapDepth6ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10480  if (mdepth == 7)
10481  h_mapDepth7ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10482  if (mdepth == 1)
10483  h_mapDepth1ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10484  if (mdepth == 2)
10485  h_mapDepth2ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10486  if (mdepth == 3)
10487  h_mapDepth3ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10488  if (mdepth == 4)
10489  h_mapDepth4ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10490  if (mdepth == 5)
10491  h_mapDepth5ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10492  if (mdepth == 6)
10493  h_mapDepth6ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10494  if (mdepth == 7)
10495  h_mapDepth7ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10496  // for averaged values of SiPM channels only:
10497  if (mdepth == 1)
10498  h_mapDepth1ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10499  if (mdepth == 2)
10500  h_mapDepth2ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10501  if (mdepth == 3)
10502  h_mapDepth3ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10503  if (mdepth == 1)
10504  h_mapDepth1ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10505  if (mdepth == 2)
10506  h_mapDepth2ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10507  if (mdepth == 3)
10508  h_mapDepth3ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10509  //
10512  h_bcnvsamplitude_HE->Fill(float(bcn), amplitude);
10513  h_bcnvsamplitude0_HE->Fill(float(bcn), 1.);
10514  h_orbitNumvsamplitude_HE->Fill(float(orbitNum), amplitude);
10515  h_orbitNumvsamplitude0_HE->Fill(float(orbitNum), 1.);
10516  if (amplitude > forallestimators_amplitude_bigger_)
10517  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
10518  } //if(studyADCAmplHist_
10519  // // // // // // // // // HE QIE11 TSmean:
10520  if (studyTSmeanShapeHist_) {
10521  h_TSmeanA_HE->Fill(aveamplitude1, 1.);
10522  if (aveamplitude1 < TSmeanHEMin_ || aveamplitude1 > TSmeanHEMax_) {
10524  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10525  if (mdepth == 1)
10526  h_mapDepth1TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10527  if (mdepth == 2)
10528  h_mapDepth2TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10529  if (mdepth == 3)
10530  h_mapDepth3TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10531  if (mdepth == 4)
10532  h_mapDepth4TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10533  if (mdepth == 5)
10534  h_mapDepth5TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10535  if (mdepth == 6)
10536  h_mapDepth6TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10537  if (mdepth == 7)
10538  h_mapDepth7TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10539  } // if
10540  // for averaged values:
10541  if (mdepth == 1)
10542  h_mapDepth1TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10543  if (mdepth == 2)
10544  h_mapDepth2TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10545  if (mdepth == 3)
10546  h_mapDepth3TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10547  if (mdepth == 4)
10548  h_mapDepth4TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10549  if (mdepth == 5)
10550  h_mapDepth5TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10551  if (mdepth == 6)
10552  h_mapDepth6TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10553  if (mdepth == 7)
10554  h_mapDepth7TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10555  if (amplitude > forallestimators_amplitude_bigger_)
10556  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
10557  } //if(studyTSmeanShapeHist_) {
10559  // // // // // // // // // HE QIE11 TSmax:
10560  if (studyTSmaxShapeHist_) {
10561  h_TSmaxA_HE->Fill(float(ts_with_max_signal), 1.);
10562  if (ts_with_max_signal < TSpeakHEMin_ || ts_with_max_signal > TSpeakHEMax_) {
10564  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10565  if (mdepth == 1)
10566  h_mapDepth1TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10567  if (mdepth == 2)
10568  h_mapDepth2TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10569  if (mdepth == 3)
10570  h_mapDepth3TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10571  if (mdepth == 4)
10572  h_mapDepth4TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10573  if (mdepth == 5)
10574  h_mapDepth5TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10575  if (mdepth == 6)
10576  h_mapDepth6TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10577  if (mdepth == 7)
10578  h_mapDepth7TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10579  } // if
10580  // for averaged values:
10581  if (mdepth == 1)
10582  h_mapDepth1TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10583  if (mdepth == 2)
10584  h_mapDepth2TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10585  if (mdepth == 3)
10586  h_mapDepth3TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10587  if (mdepth == 4)
10588  h_mapDepth4TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10589  if (mdepth == 5)
10590  h_mapDepth5TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10591  if (mdepth == 6)
10592  h_mapDepth6TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10593  if (mdepth == 7)
10594  h_mapDepth7TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10595  if (amplitude > forallestimators_amplitude_bigger_)
10596  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
10597  } //if(studyTSmaxShapeHist_) {
10599  // // // // // // // // // HE QIE11 RMS:
10600  if (studyRMSshapeHist_) {
10601  h_Amplitude_HE->Fill(rmsamplitude, 1.);
10602  if (rmsamplitude < rmsHEMin_ || rmsamplitude > rmsHEMax_) {
10604  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10605  if (mdepth == 1)
10606  h_mapDepth1Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10607  if (mdepth == 2)
10608  h_mapDepth2Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10609  if (mdepth == 3)
10610  h_mapDepth3Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10611  if (mdepth == 4)
10612  h_mapDepth4Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10613  if (mdepth == 5)
10614  h_mapDepth5Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10615  if (mdepth == 6)
10616  h_mapDepth6Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10617  if (mdepth == 7)
10618  h_mapDepth7Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10619  }
10620  // for averaged values:
10621  if (mdepth == 1)
10622  h_mapDepth1Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10623  if (mdepth == 2)
10624  h_mapDepth2Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10625  if (mdepth == 3)
10626  h_mapDepth3Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10627  if (mdepth == 4)
10628  h_mapDepth4Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10629  if (mdepth == 5)
10630  h_mapDepth5Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10631  if (mdepth == 6)
10632  h_mapDepth6Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10633  if (mdepth == 7)
10634  h_mapDepth7Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10635  if (amplitude > forallestimators_amplitude_bigger_)
10636  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
10637  } //if(studyRMSshapeHist_)
10639 
10640  // // // // // // // // // HE QIE11 Ratio:
10641  if (studyRatioShapeHist_) {
10642  h_Ampl_HE->Fill(ratio, 1.);
10643  if (ratio < ratioHEMin_ || ratio > ratioHEMax_) {
10645  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10646  if (mdepth == 1)
10647  h_mapDepth1Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10648  if (mdepth == 2)
10649  h_mapDepth2Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10650  if (mdepth == 3)
10651  h_mapDepth3Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10652  if (mdepth == 4)
10653  h_mapDepth4Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10654  if (mdepth == 5)
10655  h_mapDepth5Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10656  if (mdepth == 6)
10657  h_mapDepth6Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10658  if (mdepth == 7)
10659  h_mapDepth7Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10660  }
10661  // for averaged values:
10662  if (mdepth == 1)
10663  h_mapDepth1Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10664  if (mdepth == 2)
10665  h_mapDepth2Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10666  if (mdepth == 3)
10667  h_mapDepth3Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10668  if (mdepth == 4)
10669  h_mapDepth4Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10670  if (mdepth == 5)
10671  h_mapDepth5Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10672  if (mdepth == 6)
10673  h_mapDepth6Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10674  if (mdepth == 7)
10675  h_mapDepth7Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10676  if (amplitude > forallestimators_amplitude_bigger_)
10677  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
10678  } //if(studyRatioShapeHist_)
10680  // // // // // // // // // HE QIE11 DiffAmplitude:
10681  if (studyDiffAmplHist_) {
10682  if (mdepth == 1)
10683  h_mapDepth1AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10684  if (mdepth == 2)
10685  h_mapDepth2AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10686  if (mdepth == 3)
10687  h_mapDepth3AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10688  if (mdepth == 4)
10689  h_mapDepth4AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10690  if (mdepth == 5)
10691  h_mapDepth5AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10692  if (mdepth == 6)
10693  h_mapDepth6AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10694  if (mdepth == 7)
10695  h_mapDepth7AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10696  } // if(studyDiffAmplHist_)
10698  if (mdepth == 1)
10699  h_mapDepth1_HE->Fill(double(ieta), double(iphi), 1.);
10700  if (mdepth == 2)
10701  h_mapDepth2_HE->Fill(double(ieta), double(iphi), 1.);
10702  if (mdepth == 3)
10703  h_mapDepth3_HE->Fill(double(ieta), double(iphi), 1.);
10704  if (mdepth == 4)
10705  h_mapDepth4_HE->Fill(double(ieta), double(iphi), 1.);
10706  if (mdepth == 5)
10707  h_mapDepth5_HE->Fill(double(ieta), double(iphi), 1.);
10708  if (mdepth == 6)
10709  h_mapDepth6_HE->Fill(double(ieta), double(iphi), 1.);
10710  if (mdepth == 7)
10711  h_mapDepth7_HE->Fill(double(ieta), double(iphi), 1.);
10712 
10713  if (flagTS2 == 1) {
10714  if (mdepth == 1)
10715  h_mapDepth1TS2_HE->Fill(double(ieta), double(iphi), 1.);
10716  if (mdepth == 2)
10717  h_mapDepth2TS2_HE->Fill(double(ieta), double(iphi), 1.);
10718  if (mdepth == 3)
10719  h_mapDepth3TS2_HE->Fill(double(ieta), double(iphi), 1.);
10720  if (mdepth == 4)
10721  h_mapDepth4TS2_HE->Fill(double(ieta), double(iphi), 1.);
10722  if (mdepth == 5)
10723  h_mapDepth5TS2_HE->Fill(double(ieta), double(iphi), 1.);
10724  if (mdepth == 6)
10725  h_mapDepth6TS2_HE->Fill(double(ieta), double(iphi), 1.);
10726  if (mdepth == 7)
10727  h_mapDepth7TS2_HE->Fill(double(ieta), double(iphi), 1.);
10728  } // select entries only in TS=2
10729 
10730  } //if ( sub == 2 )
10731  //
10732 }
10735  CaloSamples toolOriginal; // TS
10736  double tool[100];
10737  HcalDetId cell(digiItr->id());
10738  int mdepth = cell.depth();
10739  int iphi = cell.iphi() - 1; // 0-71
10740  int ieta = cell.ieta();
10741  if (ieta > 0)
10742  ieta -= 1; //-41 +41
10743  int sub = cell.subdet(); // (HFDigiCollection: 4-HF)
10744  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
10745  const HcalGain* gain = conditions->getGain(cell);
10746  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
10747  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
10748  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
10749  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
10750  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
10751  HcalCoderDb coder(*channelCoder, *shape);
10752  if (useADCfC_)
10753  coder.adc2fC(*digiItr, toolOriginal);
10754  double pedestalaver9 = 0.;
10755  double pedestalaver4 = 0.;
10756  double pedestal0 = 0.;
10757  double pedestal1 = 0.;
10758  double pedestal2 = 0.;
10759  double pedestal3 = 0.;
10760  double pedestalwaver9 = 0.;
10761  double pedestalwaver4 = 0.;
10762  double pedestalw0 = 0.;
10763  double pedestalw1 = 0.;
10764  double pedestalw2 = 0.;
10765  double pedestalw3 = 0.;
10766  double amplitude = 0.;
10767  double absamplitude = 0.;
10768  double ampl = 0.;
10769  double timew = 0.;
10770  double timeww = 0.;
10771  double max_signal = -100.;
10772  int ts_with_max_signal = -100;
10773  int c0 = 0;
10774  int c1 = 0;
10775  int c2 = 0;
10776  int c3 = 0;
10777  int c4 = 0;
10778  double errorBtype = 0.;
10779  int TSsize = 4; // HF for Run2
10780  if ((*digiItr).size() != TSsize)
10781  errorBtype = 1.;
10782  TSsize = digiItr->size();
10783  for (int ii = 0; ii < TSsize; ii++) {
10784  // for (int ii=0; ii<digiItr->size(); ii++) {
10785  double ampldefault = 0.;
10786  double ampldefault0 = 0.;
10787  double ampldefault1 = 0.;
10788  double ampldefault2 = 0.;
10789  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive
10790  if (useADCfC_)
10791  ampldefault1 = toolOriginal[ii]; //adcfC
10792  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts
10793  if (useADCmassive_) {
10794  ampldefault = ampldefault0;
10795  }
10796  if (useADCfC_) {
10797  ampldefault = ampldefault1;
10798  }
10799  if (useADCcounts_) {
10800  ampldefault = ampldefault2;
10801  }
10802 
10803  int capid = ((*digiItr)[ii]).capid();
10804  // double pedestal = calib.pedestal(capid);
10805  double pedestal = pedestal00->getValue(capid);
10806  double pedestalw = pedw->getSigma(capid, capid);
10808  ampldefault -= pedestal; // pedestal subtraction
10809 
10810  tool[ii] = ampldefault;
10811 
10812  pedestalaver9 += pedestal;
10813  pedestalwaver9 += pedestalw * pedestalw;
10814 
10815  if (capid == 0 && c0 == 0) {
10816  c0++;
10817  c4++;
10818  pedestalaver4 += pedestal;
10819  pedestal0 = pedestal;
10820  pedestalw0 = pedestalw;
10821  pedestalwaver4 += pedestalw * pedestalw;
10822  }
10823 
10824  if (capid == 1 && c1 == 0) {
10825  c1++;
10826  c4++;
10827  pedestalaver4 += pedestal;
10828  pedestal1 = pedestal;
10829  pedestalw1 = pedestalw;
10830  pedestalwaver4 += pedestalw * pedestalw;
10831  }
10832  if (capid == 2 && c2 == 0) {
10833  c2++;
10834  c4++;
10835  pedestalaver4 += pedestal;
10836  pedestal2 = pedestal;
10837  pedestalw2 = pedestalw;
10838  pedestalwaver4 += pedestalw * pedestalw;
10839  }
10840  if (capid == 3 && c3 == 0) {
10841  c3++;
10842  c4++;
10843  pedestalaver4 += pedestal;
10844  pedestal3 = pedestal;
10845  pedestalw3 = pedestalw;
10846  pedestalwaver4 += pedestalw * pedestalw;
10847  }
10848 
10849  if (max_signal < ampldefault) {
10850  max_signal = ampldefault;
10851  ts_with_max_signal = ii;
10852  }
10853  amplitude += ampldefault; //
10854  absamplitude += abs(ampldefault); //
10856 
10857  if (flagcpuoptimization_ == 0) {
10858  } // if(flagcpuoptimization_== 0
10859  timew += (ii + 1) * abs(ampldefault);
10860  timeww += (ii + 1) * ampldefault;
10861  } //for 1
10863  // sub=4 HF
10864  if (sub == 4) {
10865  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HF
10866  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HF
10867  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HF
10868  }
10869 
10870  pedestalaver9 /= TSsize;
10871  pedestalaver4 /= c4;
10872  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
10873  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
10874 
10875  // ------------ to get signal in TS: -2 max +1 ------------
10876  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
10877  ampl = tool[ts_with_max_signal];
10878  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
10879  ampl += tool[ts_with_max_signal + 2];
10880  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
10881  ampl += tool[ts_with_max_signal + 1];
10882  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
10883  ampl += tool[ts_with_max_signal - 1];
10884 
10885  double ratio = 0.;
10886  // if(amplallTS != 0.) ratio = ampl/amplallTS;
10887  if (amplitude != 0.)
10888  ratio = ampl / amplitude;
10889 
10890  if (ratio < 0. || ratio > 1.02)
10891  ratio = 0.;
10892 
10893  double aveamplitude = 0.;
10894  double aveamplitudew = 0.;
10895  if (absamplitude > 0 && timew > 0)
10896  aveamplitude = timew / absamplitude; // average_TS +1
10897  if (amplitude > 0 && timeww > 0)
10898  aveamplitudew = timeww / amplitude; // average_TS +1
10899 
10900  double rmsamp = 0.;
10901  // and CapIdErrors:
10902  int error = 0;
10903  bool anycapid = true;
10904  bool anyer = false;
10905  bool anydv = true;
10906  int lastcapid = 0;
10907  int capid = 0;
10908  for (int ii = 0; ii < TSsize; ii++) {
10909  double aaaaaa = (ii + 1) - aveamplitudew;
10910  double aaaaaa2 = aaaaaa * aaaaaa;
10911  double ampldefault = tool[ii];
10912  rmsamp += (aaaaaa2 * ampldefault); // fC
10913  capid = ((*digiItr)[ii]).capid();
10914  bool er = (*digiItr)[ii].er(); // error
10915  bool dv = (*digiItr)[ii].dv(); // valid data
10916  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
10917  anycapid = false;
10918  }
10919  // std::cout << " ii = " << ii << " capid = " << capid << " ((lastcapid+1)%4) = " << ((lastcapid+1)%4) << std::endl;
10920  lastcapid = capid;
10921  if (er) {
10922  anyer = true;
10923  }
10924  if (!dv) {
10925  anydv = false;
10926  }
10927  } //for 2
10928 
10929  if (!anycapid || anyer || !anydv)
10930  error = 1;
10931  double rmsamplitude = 0.;
10932  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
10933  rmsamplitude = sqrt(rmsamp / amplitude);
10934  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
10935  if (error == 1) {
10936  if (sub == 4 && mdepth == 1)
10937  h_Amplitude_forCapIdErrors_HF1->Fill(amplitude, 1.);
10938  if (sub == 4 && mdepth == 2)
10939  h_Amplitude_forCapIdErrors_HF2->Fill(amplitude, 1.);
10940  }
10941  if (error != 1) {
10942  if (sub == 4 && mdepth == 1)
10943  h_Amplitude_notCapIdErrors_HF1->Fill(amplitude, 1.);
10944  if (sub == 4 && mdepth == 2)
10945  h_Amplitude_notCapIdErrors_HF2->Fill(amplitude, 1.);
10946  }
10947 
10948  if (sub == 4) {
10949  // bad_channels with C,A,W,P,pW,
10950  if (error == 1 || amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_ || rmsamplitude < rmsHFMin_ ||
10951  rmsamplitude > rmsHFMax_ || pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ ||
10952  pedestal2 < pedestalHFMax_ || pedestal3 < pedestalHFMax_ || pedestalw0 < pedestalwHFMax_ ||
10953  pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ || pedestalw3 < pedestalwHFMax_
10954 
10955  ) {
10956  for (int ii = 0; ii < TSsize; ii++) {
10957  double ampldefault = tool[ii];
10958  h_shape_bad_channels_HF->Fill(float(ii), ampldefault);
10959  h_shape0_bad_channels_HF->Fill(float(ii), 1.);
10960  }
10961  }
10962  // good_channels with C,A,W,P,pW,
10963  else {
10964  for (int ii = 0; ii < TSsize; ii++) {
10965  double ampldefault = tool[ii];
10966  h_shape_good_channels_HF->Fill(float(ii), ampldefault);
10967  h_shape0_good_channels_HF->Fill(float(ii), 1.);
10968  }
10969  }
10970  } // sub HF
10972  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
10973  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
10974  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; // Pedestals
10975  // HF
10976  if (sub == 4) {
10977  // // // // // // // // // HF PedestalCorrelations :
10979  double mypedestal = pedestal0;
10980  double mypedestalw = pedestalw0;
10981  h2_pedvsampl_HF->Fill(mypedestal, amplitude);
10982  h2_pedwvsampl_HF->Fill(mypedestalw, amplitude);
10983  h_pedvsampl_HF->Fill(mypedestal, amplitude);
10984  h_pedwvsampl_HF->Fill(mypedestalw, amplitude);
10985  h_pedvsampl0_HF->Fill(mypedestal, 1.);
10986  h_pedwvsampl0_HF->Fill(mypedestalw, 1.);
10987  } //
10988  // // // // // // // // // HF Pedestals:
10989  if (studyPedestalsHist_) {
10990  h_pedestal0_HF->Fill(pedestal0, 1.);
10991  h_pedestal1_HF->Fill(pedestal1, 1.);
10992  h_pedestal2_HF->Fill(pedestal2, 1.);
10993  h_pedestal3_HF->Fill(pedestal3, 1.);
10994  h_pedestalaver4_HF->Fill(pedestalaver4, 1.);
10995  h_pedestalaver9_HF->Fill(pedestalaver9, 1.);
10996  h_pedestalw0_HF->Fill(pedestalw0, 1.);
10997  h_pedestalw1_HF->Fill(pedestalw1, 1.);
10998  h_pedestalw2_HF->Fill(pedestalw2, 1.);
10999  h_pedestalw3_HF->Fill(pedestalw3, 1.);
11000  h_pedestalwaver4_HF->Fill(pedestalwaver4, 1.);
11001  h_pedestalwaver9_HF->Fill(pedestalwaver9, 1.);
11002  // for averaged values:
11003  if (mdepth == 1) {
11004  h_mapDepth1Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11005  h_mapDepth1Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11006  h_mapDepth1Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11007  h_mapDepth1Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11008  h_mapDepth1Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11009  h_mapDepth1Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11010  h_mapDepth1Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11011  h_mapDepth1Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11012  }
11013  if (mdepth == 2) {
11014  h_mapDepth2Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11015  h_mapDepth2Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11016  h_mapDepth2Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11017  h_mapDepth2Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11018  h_mapDepth2Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11019  h_mapDepth2Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11020  h_mapDepth2Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11021  h_mapDepth2Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11022  }
11023 
11024  if (pedestalw0 < pedestalwHFMax_ || pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ ||
11025  pedestalw3 < pedestalwHFMax_) {
11026  if (mdepth == 1)
11027  h_mapDepth1pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11028  if (mdepth == 2)
11029  h_mapDepth2pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11030  }
11031 
11032  if (pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ || pedestal2 < pedestalHFMax_ ||
11033  pedestal3 < pedestalHFMax_) {
11034  if (mdepth == 1)
11035  h_mapDepth1pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11036  if (mdepth == 2)
11037  h_mapDepth2pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11038  }
11039 
11040  for (int ii = 0; ii < TSsize; ii++) {
11041  h_pedestal00_HF->Fill(pedestal00->getValue(ii), 1.);
11042  h_gain_HF->Fill(gain->getValue(ii), 1.);
11043  }
11044  h_respcorr_HF->Fill(respcorr->getValue(), 1.);
11045  h_timecorr_HF->Fill(timecorr->getValue(), 1.);
11046  h_lutcorr_HF->Fill(lutcorr->getValue(), 1.);
11047 
11048  } //
11049 
11050  // // // // // // // // // HF ADCAmpl:
11051  if (studyADCAmplHist_) {
11052  h_ADCAmpl_HF->Fill(amplitude, 1.);
11053  h_ADCAmplrest1_HF->Fill(amplitude, 1.);
11054  h_ADCAmplrest6_HF->Fill(amplitude, 1.);
11055 
11056  h_ADCAmplZoom1_HF->Fill(amplitude, 1.);
11057  if (amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_) {
11059  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11060  if (mdepth == 1)
11061  h_mapDepth1ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11062  if (mdepth == 2)
11063  h_mapDepth2ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11064  } // if
11065  // if(amplitude >1500.) averSIGNALoccupancy_HF += 1.;
11066  if (amplitude < 20.) {
11067  if (mdepth == 1)
11068  h_mapDepth1ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11069  if (mdepth == 2)
11070  h_mapDepth2ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11071  } // if
11072 
11073  // for averaged values:
11074  if (mdepth == 1)
11075  h_mapDepth1ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11076  if (mdepth == 2)
11077  h_mapDepth2ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11078  if (mdepth == 1)
11079  h_mapDepth1ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11080  if (mdepth == 2)
11081  h_mapDepth2ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11082 
11083  h_bcnvsamplitude_HF->Fill(float(bcn), amplitude);
11084  h_bcnvsamplitude0_HF->Fill(float(bcn), 1.);
11085  h_orbitNumvsamplitude_HF->Fill(float(orbitNum), amplitude);
11086  h_orbitNumvsamplitude0_HF->Fill(float(orbitNum), 1.);
11087  if (amplitude > forallestimators_amplitude_bigger_)
11088  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
11089  } //if(studyADCAmplHist_
11091 
11092  // // // // // // // // // HF TSmean:
11093  if (studyTSmeanShapeHist_) {
11094  h_TSmeanA_HF->Fill(aveamplitude1, 1.);
11095  if (aveamplitude1 < TSmeanHFMin_ || aveamplitude1 > TSmeanHFMax_) {
11097  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11098  if (mdepth == 1)
11099  h_mapDepth1TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11100  if (mdepth == 2)
11101  h_mapDepth2TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11102  } // if
11103  // for averaged values:
11104  if (mdepth == 1)
11105  h_mapDepth1TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11106  if (mdepth == 2)
11107  h_mapDepth2TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11108 
11109  if (amplitude > forallestimators_amplitude_bigger_)
11110  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
11111  } //if(studyTSmeanShapeHist_
11113  // // // // // // // // // HF TSmax:
11114  if (studyTSmaxShapeHist_) {
11115  h_TSmaxA_HF->Fill(float(ts_with_max_signal), 1.);
11116  if (ts_with_max_signal < TSpeakHFMin_ || ts_with_max_signal > TSpeakHFMax_) {
11118  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11119  if (mdepth == 1)
11120  h_mapDepth1TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11121  if (mdepth == 2)
11122  h_mapDepth2TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11123  } // if
11124  // for averaged values:
11125  if (mdepth == 1)
11126  h_mapDepth1TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11127  if (mdepth == 2)
11128  h_mapDepth2TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11129  if (amplitude > forallestimators_amplitude_bigger_)
11130  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
11131  } //if(studyTSmaxShapeHist_
11133  // // // // // // // // // HF RMS:
11134  if (studyRMSshapeHist_) {
11135  h_Amplitude_HF->Fill(rmsamplitude, 1.);
11136  if (rmsamplitude < rmsHFMin_ || rmsamplitude > rmsHFMax_) {
11138  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11139  if (mdepth == 1)
11140  h_mapDepth1Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11141  if (mdepth == 2)
11142  h_mapDepth2Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11143  } // if
11144  // for averaged values:
11145  if (mdepth == 1)
11146  h_mapDepth1Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11147  if (mdepth == 2)
11148  h_mapDepth2Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11149  if (amplitude > forallestimators_amplitude_bigger_)
11150  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
11151  } //if(studyRMSshapeHist_)
11153  // // // // // // // // // HF Ratio:
11154  if (studyRatioShapeHist_) {
11155  h_Ampl_HF->Fill(ratio, 1.);
11156  if (ratio < ratioHFMin_ || ratio > ratioHFMax_) {
11158  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11159  if (mdepth == 1)
11160  h_mapDepth1Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11161  if (mdepth == 2)
11162  h_mapDepth2Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11163  } //if(ratio
11164  // for averaged values:
11165  if (mdepth == 1)
11166  h_mapDepth1Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11167  if (mdepth == 2)
11168  h_mapDepth2Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11169 
11170  if (amplitude > forallestimators_amplitude_bigger_)
11171  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
11172  } //if(studyRatioShapeHist_)
11173 
11175  // // // // // // // // // HF DiffAmplitude:
11176  if (studyDiffAmplHist_) {
11177  if (mdepth == 1)
11178  h_mapDepth1AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11179  if (mdepth == 2)
11180  h_mapDepth2AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11181  } // if(studyDiffAmplHist_)
11182 
11184  if (mdepth == 1)
11185  h_mapDepth1_HF->Fill(double(ieta), double(iphi), 1.);
11186  if (mdepth == 2)
11187  h_mapDepth2_HF->Fill(double(ieta), double(iphi), 1.);
11188 
11189  } //if ( sub == 4 )
11190 
11191  //
11192 }
11193 
11196  CaloSamples toolOriginal; // TS
11197  double tool[100];
11198  DetId detid = qie10df.detid();
11199  HcalDetId hcaldetid = HcalDetId(detid);
11200  int ieta = hcaldetid.ieta();
11201  if (ieta > 0)
11202  ieta -= 1;
11203  int iphi = hcaldetid.iphi() - 1;
11204  int mdepth = hcaldetid.depth();
11205  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFQIE10DigiCollection: 4-HF)
11206  nTS = qie10df.samples(); // ----------------------------!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11207  /*
11208  # flag HBHE8 HBHE11 HF8 HF10 comments:
11209  # 0 + + + + all
11210  # 1 + - + - old
11211  # 2 - + - + new (2018)
11212  # 3 - + - + new w/o high depthes
11213  # 4 + - + + 2016fall
11214  # 5 + - + + 2016fall w/o high depthes
11215  # 6 + + - + 2017begin
11216  # 7 + + - + 2017begin w/o high depthes in HEonly
11217  # 8 + + - + 2017begin w/o high depthes
11218  # 9 + + + + all w/o high depthes
11219 */
11220  if (mdepth == 0 || sub != 4)
11221  return;
11222  if (mdepth > 2 && flagupgradeqie1011_ == 3)
11223  return;
11224  if (mdepth > 2 && flagupgradeqie1011_ == 5)
11225  return;
11226  if (mdepth > 2 && flagupgradeqie1011_ == 8)
11227  return;
11228  if (mdepth > 2 && flagupgradeqie1011_ == 9)
11229  return;
11231  const HcalPedestal* pedestal00 = conditions->getPedestal(hcaldetid);
11232  const HcalGain* gain = conditions->getGain(hcaldetid);
11233  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(hcaldetid);
11234  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(hcaldetid);
11235  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(hcaldetid);
11236  const HcalQIECoder* channelCoder = conditions->getHcalCoder(hcaldetid);
11237  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(hcaldetid);
11238  HcalCoderDb coder(*channelCoder, *shape);
11239  if (useADCfC_)
11240  coder.adc2fC(qie10df, toolOriginal);
11241  // double noiseADC = qie10df[0].adc();
11243  double pedestalaver9 = 0.;
11244  double pedestalaver4 = 0.;
11245  double pedestal0 = 0.;
11246  double pedestal1 = 0.;
11247  double pedestal2 = 0.;
11248  double pedestal3 = 0.;
11249  double pedestalwaver9 = 0.;
11250  double pedestalwaver4 = 0.;
11251  double pedestalw0 = 0.;
11252  double pedestalw1 = 0.;
11253  double pedestalw2 = 0.;
11254  double pedestalw3 = 0.;
11255  double amplitude = 0.;
11256  double absamplitude = 0.;
11257  double ampl = 0.;
11258  double timew = 0.;
11259  double timeww = 0.;
11260  double max_signal = -100.;
11261  int ts_with_max_signal = -100;
11262  int c0 = 0;
11263  int c1 = 0;
11264  int c2 = 0;
11265  int c3 = 0;
11266  int c4 = 0;
11267  double errorBtype = 0.;
11268 
11269  int TSsize = 3; // HF for Run3
11270  if (nTS != TSsize)
11271  errorBtype = 1.;
11272  TSsize = nTS; // ------------------------!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11273  int flagTS1 = 0;
11274  for (int ii = 0; ii < TSsize; ii++) {
11275  double ampldefault = 0.;
11276  double ampldefault0 = 0.;
11277  double ampldefault1 = 0.;
11278  double ampldefault2 = 0.;
11279  ampldefault0 = adc2fC_QIE10[qie10df[ii].adc()]; // massive
11280  if (useADCfC_)
11281  ampldefault1 = toolOriginal[ii]; //adcfC
11282  ampldefault2 = qie10df[ii].adc(); //ADCcounts
11283  if (useADCmassive_) {
11284  ampldefault = ampldefault0;
11285  }
11286  if (useADCfC_) {
11287  ampldefault = ampldefault1;
11288  }
11289  if (useADCcounts_) {
11290  ampldefault = ampldefault2;
11291  }
11292 
11293  int capid = (qie10df[ii]).capid();
11294  double pedestal = pedestal00->getValue(capid);
11295  double pedestalw = pedw->getSigma(capid, capid);
11296 
11298  ampldefault -= pedestal; // pedestal subtraction
11299 
11300  tool[ii] = ampldefault;
11301 
11302  pedestalaver9 += pedestal;
11303  pedestalwaver9 += pedestalw * pedestalw;
11304 
11305  if (capid == 0 && c0 == 0) {
11306  c0++;
11307  c4++;
11308  pedestalaver4 += pedestal;
11309  pedestal0 = pedestal;
11310  pedestalw0 = pedestalw;
11311  pedestalwaver4 += pedestalw * pedestalw;
11312  }
11313 
11314  if (capid == 1 && c1 == 0) {
11315  c1++;
11316  c4++;
11317  pedestalaver4 += pedestal;
11318  pedestal1 = pedestal;
11319  pedestalw1 = pedestalw;
11320  pedestalwaver4 += pedestalw * pedestalw;
11321  }
11322  if (capid == 2 && c2 == 0) {
11323  c2++;
11324  c4++;
11325  pedestalaver4 += pedestal;
11326  pedestal2 = pedestal;
11327  pedestalw2 = pedestalw;
11328  pedestalwaver4 += pedestalw * pedestalw;
11329  }
11330  if (capid == 3 && c3 == 0) {
11331  c3++;
11332  c4++;
11333  pedestalaver4 += pedestal;
11334  pedestal3 = pedestal;
11335  pedestalw3 = pedestalw;
11336  pedestalwaver4 += pedestalw * pedestalw;
11337  }
11338 
11339  if (max_signal < ampldefault) {
11340  max_signal = ampldefault;
11341  ts_with_max_signal = ii;
11342  }
11343  amplitude += ampldefault; //
11344  absamplitude += abs(ampldefault); //
11346  timew += (ii + 1) * abs(ampldefault);
11347  timeww += (ii + 1) * ampldefault;
11348  if (ii == 1 && ampldefault > 0.)
11349  flagTS1 = 1;
11350  } //for 1
11352  // sub=4 HF
11353  if (sub == 4) {
11354  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HF
11355  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HF
11356  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HF
11357  } // just in case against any violations
11358 
11359  pedestalaver9 /= TSsize;
11360  pedestalaver4 /= c4;
11361  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
11362  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
11363 
11364  // ------------ to get signal in TS: -2 max +1 ------------
11365  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
11366  ampl = tool[ts_with_max_signal];
11367  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
11368  ampl += tool[ts_with_max_signal + 2];
11369  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
11370  ampl += tool[ts_with_max_signal + 1];
11371  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
11372  ampl += tool[ts_with_max_signal - 1];
11373 
11374  double ratio = 0.;
11375  // if(amplallTS != 0.) ratio = ampl/amplallTS;
11376  if (amplitude != 0.)
11377  ratio = ampl / amplitude;
11378  if (ratio < 0. || ratio > 1.02)
11379  ratio = 0.;
11380  double aveamplitude = 0.;
11381  double aveamplitudew = 0.;
11382  if (absamplitude > 0 && timew > 0)
11383  aveamplitude = timew / absamplitude; // average_TS +1
11384  if (amplitude > 0 && timeww > 0)
11385  aveamplitudew = timeww / amplitude; // average_TS +1
11386 
11387  double rmsamp = 0.;
11388  int error = 0;
11389  bool anycapid = true;
11390  int lastcapid = 0;
11391  int capid = 0;
11392  for (int ii = 0; ii < TSsize; ii++) {
11393  double aaaaaa = (ii + 1) - aveamplitudew;
11394  double aaaaaa2 = aaaaaa * aaaaaa;
11395  double ampldefault = tool[ii];
11396  rmsamp += (aaaaaa2 * ampldefault); // fC
11397  capid = (qie10df[ii]).capid();
11398  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
11399  anycapid = false;
11400  }
11401  lastcapid = capid;
11402  } //for 2
11403 
11404  if (!anycapid)
11405  error = 1;
11406  double rmsamplitude = 0.;
11407  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
11408  rmsamplitude = sqrt(rmsamp / amplitude);
11409  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
11410 
11411  // CapIdErrors end /////////////////////////////////////////////////////////
11412  // AZ 1.10.2015:
11413  if (error == 1) {
11414  if (sub == 4 && mdepth == 1)
11415  h_Amplitude_forCapIdErrors_HF1->Fill(amplitude, 1.);
11416  if (sub == 4 && mdepth == 2)
11417  h_Amplitude_forCapIdErrors_HF2->Fill(amplitude, 1.);
11418  }
11419  if (error != 1) {
11420  if (sub == 4 && mdepth == 1)
11421  h_Amplitude_notCapIdErrors_HF1->Fill(amplitude, 1.);
11422  if (sub == 4 && mdepth == 2)
11423  h_Amplitude_notCapIdErrors_HF2->Fill(amplitude, 1.);
11424  }
11425 
11426  if (sub == 4) {
11427  // bad_channels with C,A,W,P,pW,
11428  if (error == 1 || amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_ || rmsamplitude < rmsHFMin_ ||
11429  rmsamplitude > rmsHFMax_ || pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ ||
11430  pedestal2 < pedestalHFMax_ || pedestal3 < pedestalHFMax_ || pedestalw0 < pedestalwHFMax_ ||
11431  pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ || pedestalw3 < pedestalwHFMax_
11432 
11433  ) {
11434  for (int ii = 0; ii < TSsize; ii++) {
11435  double ampldefault = tool[ii];
11436  h_shape_bad_channels_HF->Fill(float(ii), ampldefault);
11437  h_shape0_bad_channels_HF->Fill(float(ii), 1.);
11438  }
11439  }
11440  // good_channels with C,A,W,P,pW,
11441  else {
11442  for (int ii = 0; ii < TSsize; ii++) {
11443  double ampldefault = tool[ii];
11444  h_shape_good_channels_HF->Fill(float(ii), ampldefault);
11445  h_shape0_good_channels_HF->Fill(float(ii), 1.);
11446  }
11447  }
11448  } // sub HFQIE10
11450  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
11451  // for Error B-type
11452  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
11453  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; // Pedestals
11454  // HFQIE10
11455  if (sub == 4) {
11456  // // // // // // // // // HFQIE10 PedestalCorrelations :
11458  double mypedestal = pedestal0;
11459  double mypedestalw = pedestalw0;
11460  h2_pedvsampl_HF->Fill(mypedestal, amplitude);
11461  h2_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11462  h_pedvsampl_HF->Fill(mypedestal, amplitude);
11463  h_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11464  h_pedvsampl0_HF->Fill(mypedestal, 1.);
11465  h_pedwvsampl0_HF->Fill(mypedestalw, 1.);
11466  } //
11467  // // // // // // // // // HFQIE10 Pedestals:
11468  if (studyPedestalsHist_) {
11469  h_pedestal0_HF->Fill(pedestal0, 1.);
11470  h_pedestal1_HF->Fill(pedestal1, 1.);
11471  h_pedestal2_HF->Fill(pedestal2, 1.);
11472  h_pedestal3_HF->Fill(pedestal3, 1.);
11473  h_pedestalaver4_HF->Fill(pedestalaver4, 1.);
11474  h_pedestalaver9_HF->Fill(pedestalaver9, 1.);
11475  h_pedestalw0_HF->Fill(pedestalw0, 1.);
11476  h_pedestalw1_HF->Fill(pedestalw1, 1.);
11477  h_pedestalw2_HF->Fill(pedestalw2, 1.);
11478  h_pedestalw3_HF->Fill(pedestalw3, 1.);
11479  h_pedestalwaver4_HF->Fill(pedestalwaver4, 1.);
11480  h_pedestalwaver9_HF->Fill(pedestalwaver9, 1.);
11481  // for averaged values:
11482  if (mdepth == 1) {
11483  h_mapDepth1Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11484  h_mapDepth1Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11485  h_mapDepth1Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11486  h_mapDepth1Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11487  h_mapDepth1Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11488  h_mapDepth1Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11489  h_mapDepth1Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11490  h_mapDepth1Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11491  }
11492  if (mdepth == 2) {
11493  h_mapDepth2Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11494  h_mapDepth2Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11495  h_mapDepth2Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11496  h_mapDepth2Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11497  h_mapDepth2Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11498  h_mapDepth2Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11499  h_mapDepth2Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11500  h_mapDepth2Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11501  }
11502 
11503  if (pedestalw0 < pedestalwHFMax_ || pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ ||
11504  pedestalw3 < pedestalwHFMax_) {
11505  if (mdepth == 1)
11506  h_mapDepth1pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11507  if (mdepth == 2)
11508  h_mapDepth2pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11509  if (mdepth == 3)
11510  h_mapDepth3pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11511  if (mdepth == 4)
11512  h_mapDepth4pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11513  }
11514 
11515  if (pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ || pedestal2 < pedestalHFMax_ ||
11516  pedestal3 < pedestalHFMax_) {
11517  if (mdepth == 1)
11518  h_mapDepth1pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11519  if (mdepth == 2)
11520  h_mapDepth2pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11521  if (mdepth == 3)
11522  h_mapDepth3pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11523  if (mdepth == 4)
11524  h_mapDepth4pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11525  }
11526 
11527  for (int ii = 0; ii < TSsize; ii++) {
11528  h_pedestal00_HF->Fill(pedestal00->getValue(ii), 1.);
11529  h_gain_HF->Fill(gain->getValue(ii), 1.);
11530  }
11531  h_respcorr_HF->Fill(respcorr->getValue(), 1.);
11532  h_timecorr_HF->Fill(timecorr->getValue(), 1.);
11533  h_lutcorr_HF->Fill(lutcorr->getValue(), 1.);
11534 
11535  } //
11536 
11537  // // // // // // // // // HFQIE10 ADCAmpl:
11538  if (studyADCAmplHist_) {
11539  h_ADCAmpl_HF->Fill(amplitude, 1.);
11540  h_ADCAmplrest1_HF->Fill(amplitude, 1.);
11541  h_ADCAmplrest6_HF->Fill(amplitude, 1.);
11542 
11543  h_ADCAmplZoom1_HF->Fill(amplitude, 1.);
11544  if (amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_) {
11546  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11547  if (mdepth == 1)
11548  h_mapDepth1ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11549  if (mdepth == 2)
11550  h_mapDepth2ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11551  if (mdepth == 3)
11552  h_mapDepth3ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11553  if (mdepth == 4)
11554  h_mapDepth4ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11555  } // if
11556  // if(amplitude >1500.) averSIGNALoccupancy_HF += 1.;
11557  if (amplitude < 20.) {
11558  if (mdepth == 1)
11559  h_mapDepth1ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11560  if (mdepth == 2)
11561  h_mapDepth2ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11562  if (mdepth == 3)
11563  h_mapDepth3ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11564  if (mdepth == 4)
11565  h_mapDepth4ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11566  } // if
11567 
11568  // for averaged values:
11569  if (mdepth == 1)
11570  h_mapDepth1ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11571  if (mdepth == 2)
11572  h_mapDepth2ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11573  if (mdepth == 3)
11574  h_mapDepth3ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11575  if (mdepth == 4)
11576  h_mapDepth4ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11577  if (mdepth == 1)
11578  h_mapDepth1ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11579  if (mdepth == 2)
11580  h_mapDepth2ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11581  if (mdepth == 3)
11582  h_mapDepth3ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11583  if (mdepth == 4)
11584  h_mapDepth4ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11585 
11586  h_bcnvsamplitude_HF->Fill(float(bcn), amplitude);
11587  h_bcnvsamplitude0_HF->Fill(float(bcn), 1.);
11588  h_orbitNumvsamplitude_HF->Fill(float(orbitNum), amplitude);
11589  h_orbitNumvsamplitude0_HF->Fill(float(orbitNum), 1.);
11590  if (amplitude > forallestimators_amplitude_bigger_)
11591  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
11592  } //if(studyADCAmplHist_
11593  // // // // // // // // // HFQIE10 TSmean:
11594  if (studyTSmeanShapeHist_) {
11595  h_TSmeanA_HF->Fill(aveamplitude1, 1.);
11596  if (aveamplitude1 < TSmeanHFMin_ || aveamplitude1 > TSmeanHFMax_) {
11598  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11599  if (mdepth == 1)
11600  h_mapDepth1TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11601  if (mdepth == 2)
11602  h_mapDepth2TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11603  if (mdepth == 3)
11604  h_mapDepth3TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11605  if (mdepth == 4)
11606  h_mapDepth4TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11607  } // if
11608  // for averaged values:
11609  if (mdepth == 1)
11610  h_mapDepth1TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11611  if (mdepth == 2)
11612  h_mapDepth2TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11613  if (mdepth == 3)
11614  h_mapDepth3TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11615  if (mdepth == 4)
11616  h_mapDepth4TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11617 
11618  if (amplitude > forallestimators_amplitude_bigger_)
11619  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
11620  } //if(studyTSmeanShapeHist_
11622  // // // // // // // // // HFQIE10 TSmax:
11623  if (studyTSmaxShapeHist_) {
11624  h_TSmaxA_HF->Fill(float(ts_with_max_signal), 1.);
11625  if (ts_with_max_signal < TSpeakHFMin_ || ts_with_max_signal > TSpeakHFMax_) {
11627  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11628  if (mdepth == 1)
11629  h_mapDepth1TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11630  if (mdepth == 2)
11631  h_mapDepth2TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11632  if (mdepth == 3)
11633  h_mapDepth3TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11634  if (mdepth == 4)
11635  h_mapDepth4TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11636  } // if
11637  // for averaged values:
11638  if (mdepth == 1)
11639  h_mapDepth1TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11640  if (mdepth == 2)
11641  h_mapDepth2TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11642  if (mdepth == 3)
11643  h_mapDepth3TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11644  if (mdepth == 4)
11645  h_mapDepth4TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11646 
11647  if (amplitude > forallestimators_amplitude_bigger_)
11648  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
11649  } //if(studyTSmaxShapeHist_
11651  // // // // // // // // // HFQIE10 RMS:
11652  if (studyRMSshapeHist_) {
11653  h_Amplitude_HF->Fill(rmsamplitude, 1.);
11654  if (rmsamplitude < rmsHFMin_ || rmsamplitude > rmsHFMax_) {
11656  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11657  if (mdepth == 1)
11658  h_mapDepth1Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11659  if (mdepth == 2)
11660  h_mapDepth2Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11661  if (mdepth == 3)
11662  h_mapDepth3Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11663  if (mdepth == 4)
11664  h_mapDepth4Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11665  } // if
11666  // for averaged values:
11667 
11668  if (mdepth == 1)
11669  h_mapDepth1Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11670  if (mdepth == 2)
11671  h_mapDepth2Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11672  if (mdepth == 3)
11673  h_mapDepth3Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11674  if (mdepth == 4)
11675  h_mapDepth4Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11676  if (amplitude > forallestimators_amplitude_bigger_)
11677  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
11678  } //if(studyRMSshapeHist_)
11680  // // // // // // // // // HFQIE10 Ratio:
11681  if (studyRatioShapeHist_) {
11682  h_Ampl_HF->Fill(ratio, 1.);
11683  if (ratio < ratioHFMin_ || ratio > ratioHFMax_) {
11685  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11686  if (mdepth == 1)
11687  h_mapDepth1Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11688  if (mdepth == 2)
11689  h_mapDepth2Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11690  if (mdepth == 3)
11691  h_mapDepth3Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11692  if (mdepth == 4)
11693  h_mapDepth4Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11694  } //if(ratio
11695  // for averaged values:
11696  if (mdepth == 1)
11697  h_mapDepth1Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11698  if (mdepth == 2)
11699  h_mapDepth2Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11700  if (mdepth == 3)
11701  h_mapDepth3Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11702  if (mdepth == 4)
11703  h_mapDepth4Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11704 
11705  if (amplitude > forallestimators_amplitude_bigger_)
11706  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
11707  } //if(studyRatioShapeHist_)
11708 
11710  // // // // // // // // // HFQIE10 DiffAmplitude:
11711  if (studyDiffAmplHist_) {
11712  if (mdepth == 1)
11713  h_mapDepth1AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11714  if (mdepth == 2)
11715  h_mapDepth2AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11716  if (mdepth == 3)
11717  h_mapDepth3AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11718  if (mdepth == 4)
11719  h_mapDepth4AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11720  } // if(studyDiffAmplHist_)
11721 
11723  if (mdepth == 1)
11724  h_mapDepth1_HF->Fill(double(ieta), double(iphi), 1.);
11725  if (mdepth == 2)
11726  h_mapDepth2_HF->Fill(double(ieta), double(iphi), 1.);
11727  if (mdepth == 3)
11728  h_mapDepth3_HF->Fill(double(ieta), double(iphi), 1.);
11729  if (mdepth == 4)
11730  h_mapDepth4_HF->Fill(double(ieta), double(iphi), 1.);
11731 
11732  if (flagTS1 == 1) {
11733  if (mdepth == 1)
11734  h_mapDepth1TS1_HF->Fill(double(ieta), double(iphi), 1.);
11735  if (mdepth == 2)
11736  h_mapDepth2TS1_HF->Fill(double(ieta), double(iphi), 1.);
11737  if (mdepth == 3)
11738  h_mapDepth3TS1_HF->Fill(double(ieta), double(iphi), 1.);
11739  if (mdepth == 4)
11740  h_mapDepth4TS1_HF->Fill(double(ieta), double(iphi), 1.);
11741  } // for TS = 1
11742 
11743  } //if ( sub == 4 )
11744 
11745  //
11746 }
11747 
11750  CaloSamples toolOriginal; // TS
11751  double tool[100];
11752  HcalDetId cell(digiItr->id());
11753  int mdepth = cell.depth();
11754  int iphi = cell.iphi() - 1; // 0-71
11755  int ieta = cell.ieta();
11756  if (ieta > 0)
11757  ieta -= 1; //-41 +41
11758  int sub = cell.subdet(); // (HODigiCollection: 3-HO)
11759  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
11760  const HcalGain* gain = conditions->getGain(cell);
11761  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
11762  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
11763  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
11764  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
11765  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
11766  HcalCoderDb coder(*channelCoder, *shape);
11767  if (useADCfC_)
11768  coder.adc2fC(*digiItr, toolOriginal);
11769  double pedestalaver9 = 0.;
11770  double pedestalaver4 = 0.;
11771  double pedestal0 = 0.;
11772  double pedestal1 = 0.;
11773  double pedestal2 = 0.;
11774  double pedestal3 = 0.;
11775  double pedestalwaver9 = 0.;
11776  double pedestalwaver4 = 0.;
11777  double pedestalw0 = 0.;
11778  double pedestalw1 = 0.;
11779  double pedestalw2 = 0.;
11780  double pedestalw3 = 0.;
11781  double amplitude = 0.;
11782  double absamplitude = 0.;
11783  double ampl = 0.;
11784  double timew = 0.;
11785  double timeww = 0.;
11786  double max_signal = -100.;
11787  int ts_with_max_signal = -100;
11788  int c0 = 0;
11789  int c1 = 0;
11790  int c2 = 0;
11791  int c3 = 0;
11792  int c4 = 0;
11793  double errorBtype = 0.;
11794  int TSsize = 10; //HO
11795  if ((*digiItr).size() != TSsize)
11796  errorBtype = 1.;
11797  TSsize = digiItr->size();
11798  int flagTS012 = 0;
11799  for (int ii = 0; ii < TSsize; ii++) {
11800  double ampldefault = 0.;
11801  double ampldefault0 = 0.;
11802  double ampldefault1 = 0.;
11803  double ampldefault2 = 0.;
11804  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive
11805  if (useADCfC_)
11806  ampldefault1 = toolOriginal[ii]; //adcfC
11807  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts
11808  if (useADCmassive_) {
11809  ampldefault = ampldefault0;
11810  }
11811  if (useADCfC_) {
11812  ampldefault = ampldefault1;
11813  }
11814  if (useADCcounts_) {
11815  ampldefault = ampldefault2;
11816  }
11817  int capid = ((*digiItr)[ii]).capid();
11818  double pedestal = pedestal00->getValue(capid);
11819  double pedestalw = pedw->getSigma(capid, capid);
11821  ampldefault -= pedestal; // pedestal subtraction
11822  tool[ii] = ampldefault;
11823  pedestalaver9 += pedestal;
11824  pedestalwaver9 += pedestalw * pedestalw;
11825  if (capid == 0 && c0 == 0) {
11826  c0++;
11827  c4++;
11828  pedestalaver4 += pedestal;
11829  pedestal0 = pedestal;
11830  pedestalw0 = pedestalw;
11831  pedestalwaver4 += pedestalw * pedestalw;
11832  }
11833  if (capid == 1 && c1 == 0) {
11834  c1++;
11835  c4++;
11836  pedestalaver4 += pedestal;
11837  pedestal1 = pedestal;
11838  pedestalw1 = pedestalw;
11839  pedestalwaver4 += pedestalw * pedestalw;
11840  }
11841  if (capid == 2 && c2 == 0) {
11842  c2++;
11843  c4++;
11844  pedestalaver4 += pedestal;
11845  pedestal2 = pedestal;
11846  pedestalw2 = pedestalw;
11847  pedestalwaver4 += pedestalw * pedestalw;
11848  }
11849  if (capid == 3 && c3 == 0) {
11850  c3++;
11851  c4++;
11852  pedestalaver4 += pedestal;
11853  pedestal3 = pedestal;
11854  pedestalw3 = pedestalw;
11855  pedestalwaver4 += pedestalw * pedestalw;
11856  }
11857 
11858  if (max_signal < ampldefault) {
11859  max_signal = ampldefault;
11860  ts_with_max_signal = ii;
11861  }
11862  amplitude += ampldefault;
11863  absamplitude += abs(ampldefault);
11865  if (flagcpuoptimization_ == 0) {
11866  }
11867  timew += (ii + 1) * abs(ampldefault);
11868  timeww += (ii + 1) * ampldefault;
11869  if (ii < 3 && ampldefault > 0.)
11870  flagTS012 = 1;
11871  } //for 1
11872  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HO
11873 
11874  pedestalaver9 /= TSsize;
11875  pedestalaver4 /= c4;
11876  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
11877  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
11878  if (ts_with_max_signal > -1 && ts_with_max_signal < 10)
11879  ampl = tool[ts_with_max_signal];
11880  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < 10)
11881  ampl += tool[ts_with_max_signal + 2];
11882  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < 10)
11883  ampl += tool[ts_with_max_signal + 1];
11884  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < 10)
11885  ampl += tool[ts_with_max_signal - 1];
11886  double ratio = 0.;
11887  if (amplitude != 0.)
11888  ratio = ampl / amplitude;
11889  if (ratio < 0. || ratio > 1.04)
11890  ratio = 0.;
11891  double aveamplitude = 0.;
11892  double aveamplitudew = 0.;
11893  if (absamplitude > 0 && timew > 0)
11894  aveamplitude = timew / absamplitude; // average_TS +1
11895  if (amplitude > 0 && timeww > 0)
11896  aveamplitudew = timeww / amplitude; // average_TS +1
11897  double rmsamp = 0.;
11898  int error = 0;
11899  bool anycapid = true;
11900  bool anyer = false;
11901  bool anydv = true;
11902  int lastcapid = 0;
11903  int capid = 0;
11904  for (int ii = 0; ii < TSsize; ii++) {
11905  double aaaaaa = (ii + 1) - aveamplitudew;
11906  double aaaaaa2 = aaaaaa * aaaaaa;
11907  double ampldefault = tool[ii];
11908  rmsamp += (aaaaaa2 * ampldefault); // fC
11909  capid = ((*digiItr)[ii]).capid();
11910  bool er = (*digiItr)[ii].er(); // error
11911  bool dv = (*digiItr)[ii].dv(); // valid data
11912  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
11913  anycapid = false;
11914  }
11915  lastcapid = capid;
11916  if (er) {
11917  anyer = true;
11918  }
11919  if (!dv) {
11920  anydv = false;
11921  }
11922  } //for 2
11923 
11924  if (!anycapid || anyer || !anydv)
11925  error = 1;
11926  double rmsamplitude = 0.;
11927  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
11928  rmsamplitude = sqrt(rmsamp / amplitude);
11929  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
11930  if (error == 1) {
11931  if (sub == 3 && mdepth == 4)
11932  h_Amplitude_forCapIdErrors_HO4->Fill(amplitude, 1.);
11933  }
11934  if (error != 1) {
11935  if (sub == 3 && mdepth == 4)
11936  h_Amplitude_notCapIdErrors_HO4->Fill(amplitude, 1.);
11937  }
11938 
11939  if (sub == 3) {
11940  if (error == 1 || amplitude < ADCAmplHOMin_ || amplitude > ADCAmplHOMax_ || rmsamplitude < rmsHOMin_ ||
11941  rmsamplitude > rmsHOMax_ || pedestal0 < pedestalHOMax_ || pedestal1 < pedestalHOMax_ ||
11942  pedestal2 < pedestalHOMax_ || pedestal3 < pedestalHOMax_ || pedestalw0 < pedestalwHOMax_ ||
11943  pedestalw1 < pedestalwHOMax_ || pedestalw2 < pedestalwHOMax_ || pedestalw3 < pedestalwHOMax_
11944 
11945  ) {
11946  for (int ii = 0; ii < TSsize; ii++) {
11947  double ampldefault = tool[ii];
11948  h_shape_bad_channels_HO->Fill(float(ii), ampldefault);
11949  h_shape0_bad_channels_HO->Fill(float(ii), 1.);
11950  }
11951  } else {
11952  for (int ii = 0; ii < TSsize; ii++) {
11953  double ampldefault = tool[ii];
11954  h_shape_good_channels_HO->Fill(float(ii), ampldefault);
11955  h_shape0_good_channels_HO->Fill(float(ii), 1.);
11956  }
11957  }
11958  } // sub HO
11960  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
11961  // for Error B-type
11962  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
11963  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
11964  // HO
11965  if (sub == 3) {
11967  double mypedestal = pedestal0;
11968  double mypedestalw = pedestalw0;
11969  h2_pedvsampl_HO->Fill(mypedestal, amplitude);
11970  h2_pedwvsampl_HO->Fill(mypedestalw, amplitude);
11971  h_pedvsampl_HO->Fill(mypedestal, amplitude);
11972  h_pedwvsampl_HO->Fill(mypedestalw, amplitude);
11973  h_pedvsampl0_HO->Fill(mypedestal, 1.);
11974  h_pedwvsampl0_HO->Fill(mypedestalw, 1.);
11975  } //
11976  // // // // // // // // // HO Pedestals:
11977  if (studyPedestalsHist_) {
11978  h_pedestal0_HO->Fill(pedestal0, 1.);
11979  h_pedestal1_HO->Fill(pedestal1, 1.);
11980  h_pedestal2_HO->Fill(pedestal2, 1.);
11981  h_pedestal3_HO->Fill(pedestal3, 1.);
11982  h_pedestalaver4_HO->Fill(pedestalaver4, 1.);
11983  h_pedestalaver9_HO->Fill(pedestalaver9, 1.);
11984  h_pedestalw0_HO->Fill(pedestalw0, 1.);
11985  h_pedestalw1_HO->Fill(pedestalw1, 1.);
11986  h_pedestalw2_HO->Fill(pedestalw2, 1.);
11987  h_pedestalw3_HO->Fill(pedestalw3, 1.);
11988  h_pedestalwaver4_HO->Fill(pedestalwaver4, 1.);
11989  h_pedestalwaver9_HO->Fill(pedestalwaver9, 1.);
11990  // for averaged values:
11991  if (mdepth == 4) {
11992  h_mapDepth4Ped0_HO->Fill(double(ieta), double(iphi), pedestal0);
11993  h_mapDepth4Ped1_HO->Fill(double(ieta), double(iphi), pedestal1);
11994  h_mapDepth4Ped2_HO->Fill(double(ieta), double(iphi), pedestal2);
11995  h_mapDepth4Ped3_HO->Fill(double(ieta), double(iphi), pedestal3);
11996  h_mapDepth4Pedw0_HO->Fill(double(ieta), double(iphi), pedestalw0);
11997  h_mapDepth4Pedw1_HO->Fill(double(ieta), double(iphi), pedestalw1);
11998  h_mapDepth4Pedw2_HO->Fill(double(ieta), double(iphi), pedestalw2);
11999  h_mapDepth4Pedw3_HO->Fill(double(ieta), double(iphi), pedestalw3);
12000  }
12001  if (pedestalw0 < pedestalwHOMax_ || pedestalw1 < pedestalwHOMax_ || pedestalw2 < pedestalwHOMax_ ||
12002  pedestalw3 < pedestalwHOMax_) {
12003  if (mdepth == 4)
12004  h_mapDepth4pedestalw_HO->Fill(double(ieta), double(iphi), 1.);
12005  }
12006  if (pedestal0 < pedestalHOMax_ || pedestal1 < pedestalHOMax_ || pedestal2 < pedestalHOMax_ ||
12007  pedestal3 < pedestalHOMax_) {
12008  if (mdepth == 4)
12009  h_mapDepth4pedestal_HO->Fill(double(ieta), double(iphi), 1.);
12010  }
12011  for (int ii = 0; ii < TSsize; ii++) {
12012  h_pedestal00_HO->Fill(pedestal00->getValue(ii), 1.);
12013  h_gain_HO->Fill(gain->getValue(ii), 1.);
12014  }
12015  h_respcorr_HO->Fill(respcorr->getValue(), 1.);
12016  h_timecorr_HO->Fill(timecorr->getValue(), 1.);
12017  h_lutcorr_HO->Fill(lutcorr->getValue(), 1.);
12018  } //
12019  // // // // // // // // // HO ADCAmpl:
12020  if (studyADCAmplHist_) {
12021  h_ADCAmpl_HO->Fill(amplitude, 1.);
12022  h_ADCAmplrest1_HO->Fill(amplitude, 1.);
12023  h_ADCAmplrest6_HO->Fill(amplitude, 1.);
12024 
12025  h_ADCAmplZoom1_HO->Fill(amplitude, 1.);
12026  h_ADCAmpl_HO_copy->Fill(amplitude, 1.);
12027  if (amplitude < ADCAmplHOMin_ || amplitude > ADCAmplHOMax_) {
12029  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12030  if (mdepth == 4)
12031  h_mapDepth4ADCAmpl225_HO->Fill(double(ieta), double(iphi), 1.);
12032  } // if
12033  // if(amplitude >2000.) averSIGNALoccupancy_HO += 1.;
12034 
12035  if (amplitude < 100.) {
12036  if (mdepth == 4)
12037  h_mapDepth4ADCAmpl225Copy_HO->Fill(double(ieta), double(iphi), 1.);
12038  } // if
12039  // for averaged values:
12040  if (mdepth == 4)
12041  h_mapDepth4ADCAmpl_HO->Fill(double(ieta), double(iphi), amplitude);
12042  if (mdepth == 4)
12043  h_mapDepth4ADCAmpl12_HO->Fill(double(ieta), double(iphi), ampl);
12044 
12045  h_bcnvsamplitude_HO->Fill(float(bcn), amplitude);
12046  h_bcnvsamplitude0_HO->Fill(float(bcn), 1.);
12047 
12048  h_orbitNumvsamplitude_HO->Fill(float(orbitNum), amplitude);
12049  h_orbitNumvsamplitude0_HO->Fill(float(orbitNum), 1.);
12050  if (amplitude > forallestimators_amplitude_bigger_)
12051  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
12052  } //if(studyADCAmplHist_
12053  if (studyTSmeanShapeHist_) {
12054  h_TSmeanA_HO->Fill(aveamplitude1, 1.);
12055  if (aveamplitude1 < TSmeanHOMin_ || aveamplitude1 > TSmeanHOMax_) {
12057  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12058  if (mdepth == 4)
12059  h_mapDepth4TSmeanA225_HO->Fill(double(ieta), double(iphi), 1.);
12060  } // if
12061  if (mdepth == 4)
12062  h_mapDepth4TSmeanA_HO->Fill(double(ieta), double(iphi), aveamplitude1);
12063  if (amplitude > forallestimators_amplitude_bigger_)
12064  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
12065  } //if(studyTSmeanShapeHist_
12066  if (studyTSmaxShapeHist_) {
12067  h_TSmaxA_HO->Fill(float(ts_with_max_signal), 1.);
12068  if (ts_with_max_signal < TSpeakHOMin_ || ts_with_max_signal > TSpeakHOMax_) {
12070  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12071  if (mdepth == 4)
12072  h_mapDepth4TSmaxA225_HO->Fill(double(ieta), double(iphi), 1.);
12073  } // if
12074  // for averaged values:
12075  if (mdepth == 4)
12076  h_mapDepth4TSmaxA_HO->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
12077  if (amplitude > forallestimators_amplitude_bigger_)
12078  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
12079  } //if(studyTSmaxShapeHist_
12080  if (studyRMSshapeHist_) {
12081  h_Amplitude_HO->Fill(rmsamplitude, 1.);
12082  if (rmsamplitude < rmsHOMin_ || rmsamplitude > rmsHOMax_) {
12084  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12085  if (mdepth == 4)
12086  h_mapDepth4Amplitude225_HO->Fill(double(ieta), double(iphi), 1.);
12087  } // if
12088  if (mdepth == 4)
12089  h_mapDepth4Amplitude_HO->Fill(double(ieta), double(iphi), rmsamplitude);
12090  if (amplitude > forallestimators_amplitude_bigger_)
12091  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
12092  } //if(studyRMSshapeHist_)
12093  if (studyRatioShapeHist_) {
12094  h_Ampl_HO->Fill(ratio, 1.);
12095  if (ratio < ratioHOMin_ || ratio > ratioHOMax_) {
12097  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12098  if (mdepth == 4)
12099  h_mapDepth4Ampl047_HO->Fill(double(ieta), double(iphi), 1.);
12100  } //if(ratio
12101  if (mdepth == 4)
12102  h_mapDepth4Ampl_HO->Fill(double(ieta), double(iphi), ratio);
12103  if (amplitude > forallestimators_amplitude_bigger_)
12104  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
12105  } //if(studyRatioShapeHist_)
12106  if (studyDiffAmplHist_) {
12107  if (mdepth == 4)
12108  h_mapDepth4AmplE34_HO->Fill(double(ieta), double(iphi), amplitude);
12109  } // if(studyDiffAmplHist_)
12110  if (mdepth == 4) {
12111  h_mapDepth4_HO->Fill(double(ieta), double(iphi), 1.);
12112  if (flagTS012 == 1)
12113  h_mapDepth4TS012_HO->Fill(double(ieta), double(iphi), 1.);
12114  }
12115  } //if ( sub == 3 )
12116 }
12117 int CMTRawAnalyzer::getRBX(int& kdet, int& keta, int& kphi) {
12118  int cal_RBX = 0;
12119  if (kdet == 1 || kdet == 2) {
12120  if (kphi == 71)
12121  cal_RBX = 0;
12122  else
12123  cal_RBX = (kphi + 1) / 4;
12124  cal_RBX = cal_RBX + 18 * (keta + 1) / 2;
12125  }
12126  if (kdet == 4) {
12127  cal_RBX = (int)(kphi / 18) + 1;
12128  }
12129  if (kdet == 3) {
12130  if (keta == -2) {
12131  if (kphi == 71)
12132  cal_RBX = 0;
12133  else
12134  cal_RBX = kphi / 12 + 1;
12135  }
12136  if (keta == -1) {
12137  if (kphi == 71)
12138  cal_RBX = 6;
12139  else
12140  cal_RBX = kphi / 12 + 1 + 6;
12141  }
12142  if (keta == 0) {
12143  if (kphi == 71)
12144  cal_RBX = 12;
12145  else
12146  cal_RBX = kphi / 6 + 1 + 12;
12147  }
12148  if (keta == 1) {
12149  if (kphi == 71)
12150  cal_RBX = 24;
12151  else
12152  cal_RBX = kphi / 12 + 1 + 24;
12153  }
12154  if (keta == 2) {
12155  if (kphi == 71)
12156  cal_RBX = 30;
12157  else
12158  cal_RBX = kphi / 12 + 1 + 30;
12159  }
12160  }
12161  return cal_RBX;
12162 }
12163 void CMTRawAnalyzer::beginRun(const edm::Run& r, const edm::EventSetup& iSetup) {}
12164 void CMTRawAnalyzer::endRun(const edm::Run& r, const edm::EventSetup& iSetup) {
12166  } // if flag...
12168  lscounterM1 = lscounter - 1;
12169  } else {
12170  lscounterM1 = ls0;
12171  }
12172  if (ls0 != -1)
12173  h_nevents_per_eachRealLS->Fill(float(lscounterM1), float(nevcounter)); //
12174  h_nevents_per_LS->Fill(float(nevcounter));
12175  h_nevents_per_LSzoom->Fill(float(nevcounter));
12177  if (nevcounter0 != 0) {
12178  for (int k0 = 0; k0 < nsub; k0++) {
12179  for (int k1 = 0; k1 < ndepth; k1++) {
12180  for (int k2 = 0; k2 < neta; k2++) {
12181  for (int k3 = 0; k3 < nphi; k3++) {
12182  int ieta = k2 - 41;
12183  if (sumEstimator0[k0][k1][k2][k3] != 0.) {
12184  double bbbc = 0.;
12185  if (flagestimatornormalization_ == 0)
12186  bbbc = sumEstimator0[k0][k1][k2][k3] / nevcounter0;
12187  if (flagestimatornormalization_ == 1)
12188  bbbc = sumEstimator0[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12189  double bbb1 = 1.;
12190  if (flagestimatornormalization_ == 2) {
12191  bbbc = sumEstimator0[k0][k1][k2][k3];
12192  bbb1 = sum0Estimator[k0][k1][k2][k3];
12193  }
12194  if (k0 == 0) {
12195  if (k1 + 1 == 1) {
12196  h_sumPedestalLS1->Fill(bbbc / bbb1);
12197  h_2DsumPedestalLS1->Fill(double(ieta), double(k3), bbbc);
12198  h_2D0sumPedestalLS1->Fill(double(ieta), double(k3), bbb1);
12199  h_sumPedestalperLS1->Fill(float(lscounterM1), bbbc);
12200  h_sum0PedestalperLS1->Fill(float(lscounterM1), bbb1);
12201  }
12202  if (k1 + 1 == 2) {
12203  h_sumPedestalLS2->Fill(bbbc / bbb1);
12204  h_2DsumPedestalLS2->Fill(double(ieta), double(k3), bbbc);
12205  h_2D0sumPedestalLS2->Fill(double(ieta), double(k3), bbb1);
12206  h_sumPedestalperLS2->Fill(float(lscounterM1), bbbc);
12207  h_sum0PedestalperLS2->Fill(float(lscounterM1), bbb1);
12208  }
12209  }
12210  // HE:
12211  if (k0 == 1) {
12212  // HEdepth1
12213  if (k1 + 1 == 1) {
12214  h_sumPedestalLS3->Fill(bbbc / bbb1);
12215  h_2DsumPedestalLS3->Fill(double(ieta), double(k3), bbbc);
12216  h_2D0sumPedestalLS3->Fill(double(ieta), double(k3), bbb1);
12217  h_sumPedestalperLS3->Fill(float(lscounterM1), bbbc);
12218  h_sum0PedestalperLS3->Fill(float(lscounterM1), bbb1);
12219  }
12220  if (k1 + 1 == 2) {
12221  h_sumPedestalLS4->Fill(bbbc / bbb1);
12222  h_2DsumPedestalLS4->Fill(double(ieta), double(k3), bbbc);
12223  h_2D0sumPedestalLS4->Fill(double(ieta), double(k3), bbb1);
12224  h_sumPedestalperLS4->Fill(float(lscounterM1), bbbc);
12225  h_sum0PedestalperLS4->Fill(float(lscounterM1), bbb1);
12226  }
12227  if (k1 + 1 == 3) {
12228  h_sumPedestalLS5->Fill(bbbc / bbb1);
12229  h_2DsumPedestalLS5->Fill(double(ieta), double(k3), bbbc);
12230  h_2D0sumPedestalLS5->Fill(double(ieta), double(k3), bbb1);
12231  h_sumPedestalperLS5->Fill(float(lscounterM1), bbbc);
12232  h_sum0PedestalperLS5->Fill(float(lscounterM1), bbb1);
12233  }
12234  }
12235  // HF:
12236  if (k0 == 3) {
12237  // HFdepth1
12238  if (k1 + 1 == 1) {
12239  h_sumPedestalLS6->Fill(bbbc / bbb1);
12240  h_2DsumPedestalLS6->Fill(double(ieta), double(k3), bbbc);
12241  h_2D0sumPedestalLS6->Fill(double(ieta), double(k3), bbb1);
12242  h_sumPedestalperLS6->Fill(float(lscounterM1), bbbc);
12243  h_sum0PedestalperLS6->Fill(float(lscounterM1), bbb1);
12244  }
12245  if (k1 + 1 == 2) {
12246  h_sumPedestalLS7->Fill(bbbc / bbb1);
12247  h_2DsumPedestalLS7->Fill(double(ieta), double(k3), bbbc);
12248  h_2D0sumPedestalLS7->Fill(double(ieta), double(k3), bbb1);
12249  h_sumPedestalperLS7->Fill(float(lscounterM1), bbbc);
12250  h_sum0PedestalperLS7->Fill(float(lscounterM1), bbb1);
12251  }
12252  }
12253  // HO:
12254  if (k0 == 2) {
12255  // HOdepth1
12256  if (k1 + 1 == 4) {
12257  h_sumPedestalLS8->Fill(bbbc / bbb1);
12258  h_2DsumPedestalLS8->Fill(double(ieta), double(k3), bbbc);
12259  h_2D0sumPedestalLS8->Fill(double(ieta), double(k3), bbb1);
12260  h_sumPedestalperLS8->Fill(float(lscounterM1), bbbc);
12261  h_sum0PedestalperLS8->Fill(float(lscounterM1), bbb1);
12262  }
12263  }
12264  } //if(sumEstimator0[k0][k1][k2][k3] != 0.
12265  if (sumEstimator1[k0][k1][k2][k3] != 0.) {
12266  double bbbc = 0.;
12267  if (flagestimatornormalization_ == 0)
12268  bbbc = sumEstimator1[k0][k1][k2][k3] / nevcounter0;
12269  if (flagestimatornormalization_ == 1)
12270  bbbc = sumEstimator1[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12271  double bbb1 = 1.;
12272  if (flagestimatornormalization_ == 2) {
12273  bbbc = sumEstimator1[k0][k1][k2][k3];
12274  bbb1 = sum0Estimator[k0][k1][k2][k3];
12275  }
12276  if (lscounterM1 >= lsmin_ && lscounterM1 < lsmax_) {
12277  int kkkk2 = (k2 - 1) / 4;
12278  if (k2 == 0)
12279  kkkk2 = 1.;
12280  else
12281  kkkk2 += 2; //kkkk2= 1-22
12282  int kkkk3 = (k3) / 4 + 1; //kkkk3= 1-18
12283  int ietaphi = 0;
12284  ietaphi = ((kkkk2)-1) * znphi + (kkkk3);
12285  double bbb3 = 0.;
12286  if (bbb1 != 0.)
12287  bbb3 = bbbc / bbb1;
12288  if (k0 == 0) {
12289  h_2DsumADCAmplEtaPhiLs0->Fill(float(lscounterM1), float(ietaphi), bbbc); //HB
12290  h_2DsumADCAmplEtaPhiLs00->Fill(float(lscounterM1), float(ietaphi), bbb1); //HB
12291  }
12292  if (k0 == 1) {
12293  h_2DsumADCAmplEtaPhiLs1->Fill(float(lscounterM1), float(ietaphi), bbbc); //HE
12294  h_2DsumADCAmplEtaPhiLs10->Fill(float(lscounterM1), float(ietaphi), bbb1); //HE
12295  }
12296  if (k0 == 2) {
12297  h_2DsumADCAmplEtaPhiLs2->Fill(float(lscounterM1), float(ietaphi), bbbc); //HO
12298  h_2DsumADCAmplEtaPhiLs20->Fill(float(lscounterM1), float(ietaphi), bbb1); //HO
12299  }
12300  if (k0 == 3) {
12301  h_2DsumADCAmplEtaPhiLs3->Fill(float(lscounterM1), float(ietaphi), bbbc); //HF
12302  h_2DsumADCAmplEtaPhiLs30->Fill(float(lscounterM1), float(ietaphi), bbb1); //HF
12303  }
12304 
12305  h_sumADCAmplEtaPhiLs->Fill(bbb3);
12306  h_sumADCAmplEtaPhiLs_bbbc->Fill(bbbc);
12307  h_sumADCAmplEtaPhiLs_bbb1->Fill(bbb1);
12309  h_sumADCAmplEtaPhiLs_orbitNum->Fill(float(orbitNum), 1.);
12311  h_sumADCAmplEtaPhiLs_ietaphi->Fill(float(ietaphi));
12312  } // lscounterM1 >= lsmin_ && lscounterM1 < lsmax_
12313  if (k0 == 0) {
12314  if (k1 + 1 == 1) {
12315  h_sumADCAmplLS1copy1->Fill(bbbc / bbb1);
12316  h_sumADCAmplLS1copy2->Fill(bbbc / bbb1);
12317  h_sumADCAmplLS1copy3->Fill(bbbc / bbb1);
12318  h_sumADCAmplLS1copy4->Fill(bbbc / bbb1);
12319  h_sumADCAmplLS1copy5->Fill(bbbc / bbb1);
12320  h_sumADCAmplLS1->Fill(bbbc / bbb1);
12321  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
12322  h_2DsumADCAmplLS1->Fill(double(ieta), double(k3), bbbc);
12323  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth1_)
12324  h_2DsumADCAmplLS1_LSselected->Fill(double(ieta), double(k3), bbbc);
12325  h_2D0sumADCAmplLS1->Fill(double(ieta), double(k3), bbb1);
12326  h_sumADCAmplperLS1->Fill(float(lscounterM1), bbbc);
12327  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
12328  h_sumCutADCAmplperLS1->Fill(float(lscounterM1), bbbc);
12329  h_sum0ADCAmplperLS1->Fill(float(lscounterM1), bbb1);
12330  }
12331  if (k1 + 1 == 2) {
12332  h_sumADCAmplLS2->Fill(bbbc / bbb1);
12333  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
12334  h_2DsumADCAmplLS2->Fill(double(ieta), double(k3), bbbc);
12335  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth2_)
12336  h_2DsumADCAmplLS2_LSselected->Fill(double(ieta), double(k3), bbbc);
12337  h_2D0sumADCAmplLS2->Fill(double(ieta), double(k3), bbb1);
12338  h_sumADCAmplperLS2->Fill(float(lscounterM1), bbbc);
12339  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
12340  h_sumCutADCAmplperLS2->Fill(float(lscounterM1), bbbc);
12341  h_sum0ADCAmplperLS2->Fill(float(lscounterM1), bbb1);
12342  }
12343  if (k1 + 1 == 3) {
12344  h_sumADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
12345  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
12346  h_sumCutADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
12347  h_sum0ADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbb1);
12348 
12349  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
12350  h_2DsumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbbc);
12351  h_2D0sumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbb1);
12352  } //if(k1+1 ==3)
12353  if (k1 + 1 == 4) {
12354  h_sumADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
12355  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
12356  h_sumCutADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
12357  h_sum0ADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbb1);
12358 
12359  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
12360  h_2DsumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbbc);
12361  h_2D0sumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbb1);
12362  } //if(k1+1 ==4)
12363  }
12364  if (k0 == 1) {
12365  if (k1 + 1 == 1) {
12366  h_sumADCAmplLS3->Fill(bbbc / bbb1);
12367  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
12368  h_2DsumADCAmplLS3->Fill(double(ieta), double(k3), bbbc);
12369  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth1_)
12370  h_2DsumADCAmplLS3_LSselected->Fill(double(ieta), double(k3), bbbc);
12371  h_2D0sumADCAmplLS3->Fill(double(ieta), double(k3), bbb1);
12372  h_sumADCAmplperLS3->Fill(float(lscounterM1), bbbc);
12373  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
12374  h_sumCutADCAmplperLS3->Fill(float(lscounterM1), bbbc);
12375  h_sum0ADCAmplperLS3->Fill(float(lscounterM1), bbb1);
12376  }
12377  if (k1 + 1 == 2) {
12378  h_sumADCAmplLS4->Fill(bbbc / bbb1);
12379  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
12380  h_2DsumADCAmplLS4->Fill(double(ieta), double(k3), bbbc);
12381  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth2_)
12382  h_2DsumADCAmplLS4_LSselected->Fill(double(ieta), double(k3), bbbc);
12383  h_2D0sumADCAmplLS4->Fill(double(ieta), double(k3), bbb1);
12384  h_sumADCAmplperLS4->Fill(float(lscounterM1), bbbc);
12385  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
12386  h_sumCutADCAmplperLS4->Fill(float(lscounterM1), bbbc);
12387  h_sum0ADCAmplperLS4->Fill(float(lscounterM1), bbb1);
12388  }
12389  if (k1 + 1 == 3) {
12390  h_sumADCAmplLS5->Fill(bbbc / bbb1);
12391  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
12392  h_2DsumADCAmplLS5->Fill(double(ieta), double(k3), bbbc);
12393  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth3_)
12394  h_2DsumADCAmplLS5_LSselected->Fill(double(ieta), double(k3), bbbc);
12395  h_2D0sumADCAmplLS5->Fill(double(ieta), double(k3), bbb1);
12396  h_sumADCAmplperLS5->Fill(float(lscounterM1), bbbc);
12397  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
12398  h_sumCutADCAmplperLS5->Fill(float(lscounterM1), bbbc);
12399  h_sum0ADCAmplperLS5->Fill(float(lscounterM1), bbb1);
12400  }
12401  if (k1 + 1 == 4) {
12402  h_sumADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
12403  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
12404  h_sumCutADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
12405  h_sum0ADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbb1);
12406  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
12407  h_2DsumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbbc);
12408  h_2D0sumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbb1);
12409  } //if(k1+1 ==4)
12410  if (k1 + 1 == 5) {
12411  h_sumADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
12412  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
12413  h_sumCutADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
12414  h_sum0ADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbb1);
12415  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
12416  h_2DsumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbbc);
12417  h_2D0sumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbb1);
12418  } //if(k1+1 ==5)
12419 
12420  if (k1 + 1 == 6) {
12421  h_sumADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
12422  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
12423  h_sumCutADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
12424  h_sum0ADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbb1);
12425  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
12426  h_2DsumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbbc);
12427  h_2D0sumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbb1);
12428  } //if(k1+1 ==6)
12429  if (k1 + 1 == 7) {
12430  h_sumADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
12431  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
12432  h_sumCutADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
12433  h_sum0ADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbb1);
12434  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
12435  h_2DsumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbbc);
12436  h_2D0sumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbb1);
12437  } //if(k1+1 ==7)
12438 
12439  } // end HE
12440 
12441  if (k0 == 3) {
12442  if (k1 + 1 == 1) {
12443  h_sumADCAmplLS6->Fill(bbbc / bbb1);
12444  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
12445  h_2DsumADCAmplLS6->Fill(double(ieta), double(k3), bbbc);
12446  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth1_)
12447  h_2DsumADCAmplLS6_LSselected->Fill(double(ieta), double(k3), bbbc);
12448  h_2D0sumADCAmplLS6->Fill(double(ieta), double(k3), bbb1);
12449  h_sumADCAmplperLS6->Fill(float(lscounterM1), bbbc);
12450  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
12451  h_sumCutADCAmplperLS6->Fill(float(lscounterM1), bbbc);
12452  h_sum0ADCAmplperLS6->Fill(float(lscounterM1), bbb1);
12453  }
12454  if (k1 + 1 == 2) {
12455  h_sumADCAmplLS7->Fill(bbbc / bbb1);
12456  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
12457  h_2DsumADCAmplLS7->Fill(double(ieta), double(k3), bbbc);
12458  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth2_)
12459  h_2DsumADCAmplLS7_LSselected->Fill(double(ieta), double(k3), bbbc);
12460  h_2D0sumADCAmplLS7->Fill(double(ieta), double(k3), bbb1);
12461  h_sumADCAmplperLS7->Fill(float(lscounterM1), bbbc);
12462  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
12463  h_sumCutADCAmplperLS7->Fill(float(lscounterM1), bbbc);
12464  h_sum0ADCAmplperLS7->Fill(float(lscounterM1), bbb1);
12465  }
12466 
12467  if (k1 + 1 == 3) {
12468  h_sumADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
12469  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
12470  h_sumCutADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
12471  h_sum0ADCAmplperLS6u->Fill(float(lscounterM1), bbb1);
12472  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
12473  h_2DsumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbbc);
12474  h_2D0sumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbb1);
12475  } //if(k1+1 ==3)
12476  if (k1 + 1 == 4) {
12477  h_sumADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
12478  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
12479  h_sumCutADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
12480  h_sum0ADCAmplperLS7u->Fill(float(lscounterM1), bbb1);
12481  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
12482  h_2DsumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbbc);
12483  h_2D0sumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbb1);
12484  } //if(k1+1 ==4)
12485  }
12486  // HO:
12487  if (k0 == 2) {
12488  // HOdepth1
12489  if (k1 + 1 == 4) {
12490  h_sumADCAmplLS8->Fill(bbbc / bbb1);
12491  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
12492  h_2DsumADCAmplLS8->Fill(double(ieta), double(k3), bbbc);
12493  if (bbbc / bbb1 > 2. * lsdep_estimator1_HOdepth4_)
12494  h_2DsumADCAmplLS8_LSselected->Fill(double(ieta), double(k3), bbbc);
12495  h_2D0sumADCAmplLS8->Fill(double(ieta), double(k3), bbb1);
12496  h_sumADCAmplperLS8->Fill(float(lscounterM1), bbbc);
12497  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
12498  h_sumCutADCAmplperLS8->Fill(float(lscounterM1), bbbc);
12499  h_sum0ADCAmplperLS8->Fill(float(lscounterM1), bbb1);
12500  }
12501  }
12502  } //if(sumEstimator1[k0][k1][k2][k3] != 0.
12503  if (sumEstimator2[k0][k1][k2][k3] != 0.) {
12504  double bbbc = 0.;
12505  if (flagestimatornormalization_ == 0)
12506  bbbc = sumEstimator2[k0][k1][k2][k3] / nevcounter0;
12507  if (flagestimatornormalization_ == 1)
12508  bbbc = sumEstimator2[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12509  double bbb1 = 1.;
12510  if (flagestimatornormalization_ == 2) {
12511  bbbc = sumEstimator2[k0][k1][k2][k3];
12512  bbb1 = sum0Estimator[k0][k1][k2][k3];
12513  }
12514 
12515  // HB:
12516  if (k0 == 0) {
12517  // HBdepth1
12518  if (k1 + 1 == 1) {
12519  h_sumTSmeanALS1->Fill(bbbc / bbb1);
12520  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
12521  h_2DsumTSmeanALS1->Fill(double(ieta), double(k3), bbbc);
12522  h_2D0sumTSmeanALS1->Fill(double(ieta), double(k3), bbb1);
12523  h_sumTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
12524  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
12525  h_sumCutTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
12526  h_sum0TSmeanAperLS1->Fill(float(lscounterM1), bbb1);
12527  if (bbbc / bbb1 > 2. * lsdep_estimator2_HBdepth1_)
12528  h_sumTSmeanAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12529  }
12530  if (k1 + 1 == 2) {
12531  h_sumTSmeanALS2->Fill(bbbc / bbb1);
12532  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
12533  h_2DsumTSmeanALS2->Fill(double(ieta), double(k3), bbbc);
12534  h_2D0sumTSmeanALS2->Fill(double(ieta), double(k3), bbb1);
12535  h_sumTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
12536  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
12537  h_sumCutTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
12538  h_sum0TSmeanAperLS2->Fill(float(lscounterM1), bbb1);
12539  }
12540  }
12541  if (k0 == 1) {
12542  if (k1 + 1 == 1) {
12543  h_sumTSmeanALS3->Fill(bbbc / bbb1);
12544  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
12545  h_2DsumTSmeanALS3->Fill(double(ieta), double(k3), bbbc);
12546  h_2D0sumTSmeanALS3->Fill(double(ieta), double(k3), bbb1);
12547  h_sumTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
12548  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
12549  h_sumCutTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
12550  h_sum0TSmeanAperLS3->Fill(float(lscounterM1), bbb1);
12551  }
12552  if (k1 + 1 == 2) {
12553  h_sumTSmeanALS4->Fill(bbbc / bbb1);
12554  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
12555  h_2DsumTSmeanALS4->Fill(double(ieta), double(k3), bbbc);
12556  h_2D0sumTSmeanALS4->Fill(double(ieta), double(k3), bbb1);
12557  h_sumTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
12558  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
12559  h_sumCutTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
12560  h_sum0TSmeanAperLS4->Fill(float(lscounterM1), bbb1);
12561  }
12562  if (k1 + 1 == 3) {
12563  h_sumTSmeanALS5->Fill(bbbc / bbb1);
12564  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
12565  h_2DsumTSmeanALS5->Fill(double(ieta), double(k3), bbbc);
12566  h_2D0sumTSmeanALS5->Fill(double(ieta), double(k3), bbb1);
12567  h_sumTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
12568  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
12569  h_sumCutTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
12570  h_sum0TSmeanAperLS5->Fill(float(lscounterM1), bbb1);
12571  }
12572  }
12573  // HF:
12574  if (k0 == 3) {
12575  // HFdepth1
12576  if (k1 + 1 == 1) {
12577  h_sumTSmeanALS6->Fill(bbbc / bbb1);
12578  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
12579  h_2DsumTSmeanALS6->Fill(double(ieta), double(k3), bbbc);
12580  h_2D0sumTSmeanALS6->Fill(double(ieta), double(k3), bbb1);
12581  h_sumTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
12582  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
12583  h_sumCutTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
12584  h_sum0TSmeanAperLS6->Fill(float(lscounterM1), bbb1);
12585  }
12586  if (k1 + 1 == 2) {
12587  h_sumTSmeanALS7->Fill(bbbc / bbb1);
12588  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
12589  h_2DsumTSmeanALS7->Fill(double(ieta), double(k3), bbbc);
12590  h_2D0sumTSmeanALS7->Fill(double(ieta), double(k3), bbb1);
12591  h_sumTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
12592  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
12593  h_sumCutTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
12594  h_sum0TSmeanAperLS7->Fill(float(lscounterM1), bbb1);
12595  }
12596  }
12597  // HO:
12598  if (k0 == 2) {
12599  // HOdepth1
12600  if (k1 + 1 == 4) {
12601  h_sumTSmeanALS8->Fill(bbbc / bbb1);
12602  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
12603  h_2DsumTSmeanALS8->Fill(double(ieta), double(k3), bbbc);
12604  h_2D0sumTSmeanALS8->Fill(double(ieta), double(k3), bbb1);
12605  h_sumTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
12606  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
12607  h_sumCutTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
12608  h_sum0TSmeanAperLS8->Fill(float(lscounterM1), bbb1);
12609  }
12610  }
12611  } //if(sumEstimator2[k0][k1][k2][k3] != 0.
12612 
12613  // ------------------------------------------------------------------------------------------------------------------------sumEstimator3 Tx
12614  if (sumEstimator3[k0][k1][k2][k3] != 0.) {
12615  // fill histoes:
12616  double bbbc = 0.;
12617  if (flagestimatornormalization_ == 0)
12618  bbbc = sumEstimator3[k0][k1][k2][k3] / nevcounter0;
12619  if (flagestimatornormalization_ == 1)
12620  bbbc = sumEstimator3[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12621  double bbb1 = 1.;
12622  if (flagestimatornormalization_ == 2) {
12623  bbbc = sumEstimator3[k0][k1][k2][k3];
12624  bbb1 = sum0Estimator[k0][k1][k2][k3];
12625  }
12626 
12627  // HB:
12628  if (k0 == 0) {
12629  // HBdepth1
12630  if (k1 + 1 == 1) {
12631  h_sumTSmaxALS1->Fill(bbbc / bbb1);
12632  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
12633  h_2DsumTSmaxALS1->Fill(double(ieta), double(k3), bbbc);
12634  h_2D0sumTSmaxALS1->Fill(double(ieta), double(k3), bbb1);
12635  h_sumTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
12636  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
12637  h_sumCutTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
12638  h_sum0TSmaxAperLS1->Fill(float(lscounterM1), bbb1);
12639  if (bbbc / bbb1 > 2. * lsdep_estimator3_HBdepth1_)
12640  h_sumTSmaxAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12641  }
12642  if (k1 + 1 == 2) {
12643  h_sumTSmaxALS2->Fill(bbbc / bbb1);
12644  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
12645  h_2DsumTSmaxALS2->Fill(double(ieta), double(k3), bbbc);
12646  h_2D0sumTSmaxALS2->Fill(double(ieta), double(k3), bbb1);
12647  h_sumTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
12648  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
12649  h_sumCutTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
12650  h_sum0TSmaxAperLS2->Fill(float(lscounterM1), bbb1);
12651  }
12652  }
12653  // HE:
12654  if (k0 == 1) {
12655  // HEdepth1
12656  if (k1 + 1 == 1) {
12657  h_sumTSmaxALS3->Fill(bbbc / bbb1);
12658  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
12659  h_2DsumTSmaxALS3->Fill(double(ieta), double(k3), bbbc);
12660  h_2D0sumTSmaxALS3->Fill(double(ieta), double(k3), bbb1);
12661  h_sumTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
12662  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
12663  h_sumCutTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
12664  h_sum0TSmaxAperLS3->Fill(float(lscounterM1), bbb1);
12665  }
12666  if (k1 + 1 == 2) {
12667  h_sumTSmaxALS4->Fill(bbbc / bbb1);
12668  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
12669  h_2DsumTSmaxALS4->Fill(double(ieta), double(k3), bbbc);
12670  h_2D0sumTSmaxALS4->Fill(double(ieta), double(k3), bbb1);
12671  h_sumTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
12672  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
12673  h_sumCutTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
12674  h_sum0TSmaxAperLS4->Fill(float(lscounterM1), bbb1);
12675  }
12676  if (k1 + 1 == 3) {
12677  h_sumTSmaxALS5->Fill(bbbc / bbb1);
12678  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
12679  h_2DsumTSmaxALS5->Fill(double(ieta), double(k3), bbbc);
12680  h_2D0sumTSmaxALS5->Fill(double(ieta), double(k3), bbb1);
12681  h_sumTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
12682  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
12683  h_sumCutTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
12684  h_sum0TSmaxAperLS5->Fill(float(lscounterM1), bbb1);
12685  }
12686  }
12687  // HF:
12688  if (k0 == 3) {
12689  // HFdepth1
12690  if (k1 + 1 == 1) {
12691  h_sumTSmaxALS6->Fill(bbbc / bbb1);
12692  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
12693  h_2DsumTSmaxALS6->Fill(double(ieta), double(k3), bbbc);
12694  h_2D0sumTSmaxALS6->Fill(double(ieta), double(k3), bbb1);
12695  h_sumTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
12696  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
12697  h_sumCutTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
12698  h_sum0TSmaxAperLS6->Fill(float(lscounterM1), bbb1);
12699  }
12700  if (k1 + 1 == 2) {
12701  h_sumTSmaxALS7->Fill(bbbc / bbb1);
12702  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
12703  h_2DsumTSmaxALS7->Fill(double(ieta), double(k3), bbbc);
12704  h_2D0sumTSmaxALS7->Fill(double(ieta), double(k3), bbb1);
12705  h_sumTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
12706  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
12707  h_sumCutTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
12708  h_sum0TSmaxAperLS7->Fill(float(lscounterM1), bbb1);
12709  }
12710  }
12711  // HO:
12712  if (k0 == 2) {
12713  // HOdepth1
12714  if (k1 + 1 == 4) {
12715  h_sumTSmaxALS8->Fill(bbbc / bbb1);
12716  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
12717  h_2DsumTSmaxALS8->Fill(double(ieta), double(k3), bbbc);
12718  h_2D0sumTSmaxALS8->Fill(double(ieta), double(k3), bbb1);
12719  h_sumTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
12720  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
12721  h_sumCutTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
12722  h_sum0TSmaxAperLS8->Fill(float(lscounterM1), bbb1);
12723  }
12724  }
12725  } //if(sumEstimator3[k0][k1][k2][k3] != 0.
12726 
12727  // ------------------------------------------------------------------------------------------------------------------------sumEstimator4 W
12728  if (sumEstimator4[k0][k1][k2][k3] != 0.) {
12729  // fill histoes:
12730  double bbbc = 0.;
12731  if (flagestimatornormalization_ == 0)
12732  bbbc = sumEstimator4[k0][k1][k2][k3] / nevcounter0;
12733  if (flagestimatornormalization_ == 1)
12734  bbbc = sumEstimator4[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12735  double bbb1 = 1.;
12736  if (flagestimatornormalization_ == 2) {
12737  bbbc = sumEstimator4[k0][k1][k2][k3];
12738  bbb1 = sum0Estimator[k0][k1][k2][k3];
12739  }
12740 
12741  // HB:
12742  if (k0 == 0) {
12743  // HBdepth1
12744  if (k1 + 1 == 1) {
12745  h_sumAmplitudeLS1->Fill(bbbc / bbb1);
12746  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
12747  h_2DsumAmplitudeLS1->Fill(double(ieta), double(k3), bbbc);
12748  h_2D0sumAmplitudeLS1->Fill(double(ieta), double(k3), bbb1);
12749  h_sumAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
12750  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
12751  h_sumCutAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
12752  h_sum0AmplitudeperLS1->Fill(float(lscounterM1), bbb1);
12753  if (bbbc / bbb1 > 2. * lsdep_estimator4_HBdepth1_)
12754  h_sumAmplitudeperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12755  }
12756  if (k1 + 1 == 2) {
12757  h_sumAmplitudeLS2->Fill(bbbc / bbb1);
12758  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
12759  h_2DsumAmplitudeLS2->Fill(double(ieta), double(k3), bbbc);
12760  h_2D0sumAmplitudeLS2->Fill(double(ieta), double(k3), bbb1);
12761  h_sumAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
12762  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
12763  h_sumCutAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
12764  h_sum0AmplitudeperLS2->Fill(float(lscounterM1), bbb1);
12765  }
12766  }
12767  // HE:
12768  if (k0 == 1) {
12769  // HEdepth1
12770  if (k1 + 1 == 1) {
12771  h_sumAmplitudeLS3->Fill(bbbc / bbb1);
12772  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
12773  h_2DsumAmplitudeLS3->Fill(double(ieta), double(k3), bbbc);
12774  h_2D0sumAmplitudeLS3->Fill(double(ieta), double(k3), bbb1);
12775  h_sumAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
12776  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
12777  h_sumCutAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
12778  h_sum0AmplitudeperLS3->Fill(float(lscounterM1), bbb1);
12779  }
12780  if (k1 + 1 == 2) {
12781  h_sumAmplitudeLS4->Fill(bbbc / bbb1);
12782  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
12783  h_2DsumAmplitudeLS4->Fill(double(ieta), double(k3), bbbc);
12784  h_2D0sumAmplitudeLS4->Fill(double(ieta), double(k3), bbb1);
12785  h_sumAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
12786  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
12787  h_sumCutAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
12788  h_sum0AmplitudeperLS4->Fill(float(lscounterM1), bbb1);
12789  }
12790  if (k1 + 1 == 3) {
12791  h_sumAmplitudeLS5->Fill(bbbc / bbb1);
12792  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
12793  h_2DsumAmplitudeLS5->Fill(double(ieta), double(k3), bbbc);
12794  h_2D0sumAmplitudeLS5->Fill(double(ieta), double(k3), bbb1);
12795  h_sumAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
12796  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
12797  h_sumCutAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
12798  h_sum0AmplitudeperLS5->Fill(float(lscounterM1), bbb1);
12799  }
12800  }
12801  // HF:
12802  if (k0 == 3) {
12803  // HFdepth1
12804  if (k1 + 1 == 1) {
12805  h_sumAmplitudeLS6->Fill(bbbc / bbb1);
12806  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
12807  h_2DsumAmplitudeLS6->Fill(double(ieta), double(k3), bbbc);
12808  h_2D0sumAmplitudeLS6->Fill(double(ieta), double(k3), bbb1);
12809  h_sumAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
12810  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
12811  h_sumCutAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
12812  h_sum0AmplitudeperLS6->Fill(float(lscounterM1), bbb1);
12813  }
12814  if (k1 + 1 == 2) {
12815  h_sumAmplitudeLS7->Fill(bbbc / bbb1);
12816  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
12817  h_2DsumAmplitudeLS7->Fill(double(ieta), double(k3), bbbc);
12818  h_2D0sumAmplitudeLS7->Fill(double(ieta), double(k3), bbb1);
12819  h_sumAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
12820  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
12821  h_sumCutAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
12822  h_sum0AmplitudeperLS7->Fill(float(lscounterM1), bbb1);
12823  }
12824  }
12825  // HO:
12826  if (k0 == 2) {
12827  // HOdepth1
12828  if (k1 + 1 == 4) {
12829  h_sumAmplitudeLS8->Fill(bbbc / bbb1);
12830  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
12831  h_2DsumAmplitudeLS8->Fill(double(ieta), double(k3), bbbc);
12832  h_2D0sumAmplitudeLS8->Fill(double(ieta), double(k3), bbb1);
12833  h_sumAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
12834  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
12835  h_sumCutAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
12836  h_sum0AmplitudeperLS8->Fill(float(lscounterM1), bbb1);
12837  }
12838  }
12839  } //if(sumEstimator4[k0][k1][k2][k3] != 0.
12840 
12841  // ------------------------------------------------------------------------------------------------------------------------sumEstimator5 R
12842  if (sumEstimator5[k0][k1][k2][k3] != 0.) {
12843  // fill histoes:
12844  double bbbc = 0.;
12845  if (flagestimatornormalization_ == 0)
12846  bbbc = sumEstimator5[k0][k1][k2][k3] / nevcounter0;
12847  if (flagestimatornormalization_ == 1)
12848  bbbc = sumEstimator5[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12849  double bbb1 = 1.;
12850  if (flagestimatornormalization_ == 2) {
12851  bbbc = sumEstimator5[k0][k1][k2][k3];
12852  bbb1 = sum0Estimator[k0][k1][k2][k3];
12853  }
12854 
12855  // HB:
12856  if (k0 == 0) {
12857  // HBdepth1
12858  if (k1 + 1 == 1) {
12859  h_sumAmplLS1->Fill(bbbc / bbb1);
12860  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
12861  h_2DsumAmplLS1->Fill(double(ieta), double(k3), bbbc);
12862  h_2D0sumAmplLS1->Fill(double(ieta), double(k3), bbb1);
12863  h_sumAmplperLS1->Fill(float(lscounterM1), bbbc);
12864  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
12865  h_sumCutAmplperLS1->Fill(float(lscounterM1), bbbc);
12866  h_sum0AmplperLS1->Fill(float(lscounterM1), bbb1);
12867  if (bbbc / bbb1 > 2. * lsdep_estimator5_HBdepth1_)
12868  h_sumAmplperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12869  }
12870  if (k1 + 1 == 2) {
12871  h_sumAmplLS2->Fill(bbbc / bbb1);
12872  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
12873  h_2DsumAmplLS2->Fill(double(ieta), double(k3), bbbc);
12874  h_2D0sumAmplLS2->Fill(double(ieta), double(k3), bbb1);
12875  h_sumAmplperLS2->Fill(float(lscounterM1), bbbc);
12876  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
12877  h_sumCutAmplperLS2->Fill(float(lscounterM1), bbbc);
12878  h_sum0AmplperLS2->Fill(float(lscounterM1), bbb1);
12879  }
12880  }
12881  // HE:
12882  if (k0 == 1) {
12883  // HEdepth1
12884  if (k1 + 1 == 1) {
12885  h_sumAmplLS3->Fill(bbbc / bbb1);
12886  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
12887  h_2DsumAmplLS3->Fill(double(ieta), double(k3), bbbc);
12888  h_2D0sumAmplLS3->Fill(double(ieta), double(k3), bbb1);
12889  h_sumAmplperLS3->Fill(float(lscounterM1), bbbc);
12890  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
12891  h_sumCutAmplperLS3->Fill(float(lscounterM1), bbbc);
12892  h_sum0AmplperLS3->Fill(float(lscounterM1), bbb1);
12893  }
12894  if (k1 + 1 == 2) {
12895  h_sumAmplLS4->Fill(bbbc / bbb1);
12896  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
12897  h_2DsumAmplLS4->Fill(double(ieta), double(k3), bbbc);
12898  h_2D0sumAmplLS4->Fill(double(ieta), double(k3), bbb1);
12899  h_sumAmplperLS4->Fill(float(lscounterM1), bbbc);
12900  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
12901  h_sumCutAmplperLS4->Fill(float(lscounterM1), bbbc);
12902  h_sum0AmplperLS4->Fill(float(lscounterM1), bbb1);
12903  }
12904  if (k1 + 1 == 3) {
12905  h_sumAmplLS5->Fill(bbbc / bbb1);
12906  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
12907  h_2DsumAmplLS5->Fill(double(ieta), double(k3), bbbc);
12908  h_2D0sumAmplLS5->Fill(double(ieta), double(k3), bbb1);
12909  h_sumAmplperLS5->Fill(float(lscounterM1), bbbc);
12910  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
12911  h_sumCutAmplperLS5->Fill(float(lscounterM1), bbbc);
12912  h_sum0AmplperLS5->Fill(float(lscounterM1), bbb1);
12913  }
12914  }
12915  // HF:
12916  if (k0 == 3) {
12917  // HFdepth1
12918  if (k1 + 1 == 1) {
12919  h_sumAmplLS6->Fill(bbbc / bbb1);
12920  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
12921  h_2DsumAmplLS6->Fill(double(ieta), double(k3), bbbc);
12922  h_2D0sumAmplLS6->Fill(double(ieta), double(k3), bbb1);
12923  h_sumAmplperLS6->Fill(float(lscounterM1), bbbc);
12924  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
12925  h_sumCutAmplperLS6->Fill(float(lscounterM1), bbbc);
12926  h_sum0AmplperLS6->Fill(float(lscounterM1), bbb1);
12927  }
12928  if (k1 + 1 == 2) {
12929  h_sumAmplLS7->Fill(bbbc / bbb1);
12930  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
12931  h_2DsumAmplLS7->Fill(double(ieta), double(k3), bbbc);
12932  h_2D0sumAmplLS7->Fill(double(ieta), double(k3), bbb1);
12933  h_sumAmplperLS7->Fill(float(lscounterM1), bbbc);
12934  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
12935  h_sumCutAmplperLS7->Fill(float(lscounterM1), bbbc);
12936  h_sum0AmplperLS7->Fill(float(lscounterM1), bbb1);
12937  }
12938  }
12939  // HO:
12940  if (k0 == 2) {
12941  // HOdepth1
12942  if (k1 + 1 == 4) {
12943  h_sumAmplLS8->Fill(bbbc / bbb1);
12944  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
12945  h_2DsumAmplLS8->Fill(double(ieta), double(k3), bbbc);
12946  h_2D0sumAmplLS8->Fill(double(ieta), double(k3), bbb1);
12947  h_sumAmplperLS8->Fill(float(lscounterM1), bbbc);
12948  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
12949  h_sumCutAmplperLS8->Fill(float(lscounterM1), bbbc);
12950  h_sum0AmplperLS8->Fill(float(lscounterM1), bbb1);
12951  }
12952  }
12953  } //if(sumEstimator5[k0][k1][k2][k3] != 0.
12954  // ------------------------------------------------------------------------------------------------------------------------sumEstimator6 (Error-B)
12955  if (sumEstimator6[k0][k1][k2][k3] != 0.) {
12956  // fill histoes:
12957  double bbbc = 0.;
12958  if (flagestimatornormalization_ == 0)
12959  bbbc = sumEstimator6[k0][k1][k2][k3] / nevcounter0;
12960  if (flagestimatornormalization_ == 1)
12961  bbbc = sumEstimator6[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12962  double bbb1 = 1.;
12963  if (flagestimatornormalization_ == 2) {
12964  bbbc = sumEstimator6[k0][k1][k2][k3];
12965  bbb1 = sum0Estimator[k0][k1][k2][k3];
12966  }
12967 
12968  // HB:
12969  if (k0 == 0) {
12970  // HBdepth1
12971  if (k1 + 1 == 1) {
12972  h_sumErrorBLS1->Fill(bbbc / bbb1);
12973  h_2DsumErrorBLS1->Fill(double(ieta), double(k3), bbbc);
12974  h_2D0sumErrorBLS1->Fill(double(ieta), double(k3), bbb1);
12975  h_sumErrorBperLS1->Fill(float(lscounterM1), bbbc);
12976  h_sum0ErrorBperLS1->Fill(float(lscounterM1), bbb1);
12977  }
12978  if (k1 + 1 == 2) {
12979  h_sumErrorBLS2->Fill(bbbc / bbb1);
12980  h_2DsumErrorBLS2->Fill(double(ieta), double(k3), bbbc);
12981  h_2D0sumErrorBLS2->Fill(double(ieta), double(k3), bbb1);
12982  h_sumErrorBperLS2->Fill(float(lscounterM1), bbbc);
12983  h_sum0ErrorBperLS2->Fill(float(lscounterM1), bbb1);
12984  }
12985  }
12986  // HE:
12987  if (k0 == 1) {
12988  // HEdepth1
12989  if (k1 + 1 == 1) {
12990  h_sumErrorBLS3->Fill(bbbc / bbb1);
12991  h_2DsumErrorBLS3->Fill(double(ieta), double(k3), bbbc);
12992  h_2D0sumErrorBLS3->Fill(double(ieta), double(k3), bbb1);
12993  h_sumErrorBperLS3->Fill(float(lscounterM1), bbbc);
12994  h_sum0ErrorBperLS3->Fill(float(lscounterM1), bbb1);
12995  }
12996  if (k1 + 1 == 2) {
12997  h_sumErrorBLS4->Fill(bbbc / bbb1);
12998  h_2DsumErrorBLS4->Fill(double(ieta), double(k3), bbbc);
12999  h_2D0sumErrorBLS4->Fill(double(ieta), double(k3), bbb1);
13000  h_sumErrorBperLS4->Fill(float(lscounterM1), bbbc);
13001  h_sum0ErrorBperLS4->Fill(float(lscounterM1), bbb1);
13002  }
13003  if (k1 + 1 == 3) {
13004  h_sumErrorBLS5->Fill(bbbc / bbb1);
13005  h_2DsumErrorBLS5->Fill(double(ieta), double(k3), bbbc);
13006  h_2D0sumErrorBLS5->Fill(double(ieta), double(k3), bbb1);
13007  h_sumErrorBperLS5->Fill(float(lscounterM1), bbbc);
13008  h_sum0ErrorBperLS5->Fill(float(lscounterM1), bbb1);
13009  }
13010  }
13011  // HF:
13012  if (k0 == 3) {
13013  // HFdepth1
13014  if (k1 + 1 == 1) {
13015  h_sumErrorBLS6->Fill(bbbc / bbb1);
13016  h_2DsumErrorBLS6->Fill(double(ieta), double(k3), bbbc);
13017  h_2D0sumErrorBLS6->Fill(double(ieta), double(k3), bbb1);
13018  h_sumErrorBperLS6->Fill(float(lscounterM1), bbbc);
13019  h_sum0ErrorBperLS6->Fill(float(lscounterM1), bbb1);
13020  }
13021  if (k1 + 1 == 2) {
13022  h_sumErrorBLS7->Fill(bbbc / bbb1);
13023  h_2DsumErrorBLS7->Fill(double(ieta), double(k3), bbbc);
13024  h_2D0sumErrorBLS7->Fill(double(ieta), double(k3), bbb1);
13025  h_sumErrorBperLS7->Fill(float(lscounterM1), bbbc);
13026  h_sum0ErrorBperLS7->Fill(float(lscounterM1), bbb1);
13027  }
13028  }
13029  // HO:
13030  if (k0 == 2) {
13031  // HOdepth4
13032  if (k1 + 1 == 4) {
13033  h_sumErrorBLS8->Fill(bbbc / bbb1);
13034  h_2DsumErrorBLS8->Fill(double(ieta), double(k3), bbbc);
13035  h_2D0sumErrorBLS8->Fill(double(ieta), double(k3), bbb1);
13036  h_sumErrorBperLS8->Fill(float(lscounterM1), bbbc);
13037  h_sum0ErrorBperLS8->Fill(float(lscounterM1), bbb1);
13038  }
13039  }
13041  } //if(sumEstimator6[k0][k1][k2][k3] != 0.
13042 
13045  } //for
13046  } //for
13047  } //for
13048  } //for
13049 
13050  //------------------------------------------------------ averSIGNAL
13059 
13064 
13065  //------------------------------------------------------
13074 
13079 
13080  //------------------------------------------------------ averNOSIGNAL
13089 
13094 
13095  //------------------------------------------------------
13104 
13109 
13110  h_maxxSUMAmpl_HB->Fill(float(lscounterM1), maxxSUM1);
13111  h_maxxSUMAmpl_HE->Fill(float(lscounterM1), maxxSUM2);
13112  h_maxxSUMAmpl_HO->Fill(float(lscounterM1), maxxSUM3);
13113  h_maxxSUMAmpl_HF->Fill(float(lscounterM1), maxxSUM4);
13114  maxxSUM1 = 0.;
13115  maxxSUM2 = 0.;
13116  maxxSUM3 = 0.;
13117  maxxSUM4 = 0.;
13118  //------------------------------------------------------
13119  h_maxxOCCUP_HB->Fill(float(lscounterM1), maxxOCCUP1);
13120  h_maxxOCCUP_HE->Fill(float(lscounterM1), maxxOCCUP2);
13121  h_maxxOCCUP_HO->Fill(float(lscounterM1), maxxOCCUP3);
13122  h_maxxOCCUP_HF->Fill(float(lscounterM1), maxxOCCUP4);
13123  maxxOCCUP1 = 0.;
13124  maxxOCCUP2 = 0.;
13125  maxxOCCUP3 = 0.;
13126  maxxOCCUP4 = 0.;
13127 
13128  } //if( nevcounter0 != 0 )
13130 
13131  std::cout << " ==== Edn of run " << std::endl;
13132 }
13134 //
13136 //
13139  HcalLogicalMap lmap = gen.createMap(topo);
13140 
13141  // HcalElectronicsMap emap=lmap.generateHcalElectronicsMap();
13142 
13143  // const HcalElectronicsMap* emap=conditions->getHcalMapping();
13144  const HcalElectronicsMap* emap;
13145  emap = conditions->getHcalMapping();
13146 
13147  std::string subdet = "";
13148 
13149  MAPfile << "#define LogEleMapdb_h" << std::endl;
13150  MAPfile << "#include <algorithm>" << std::endl;
13151  MAPfile << "#include <iostream>" << std::endl;
13152  MAPfile << "#include <vector>" << std::endl;
13153  MAPfile << "#include <string>" << std::endl;
13154  MAPfile << "#include <sstream>" << std::endl;
13155  MAPfile << std::endl;
13156 
13157  MAPfile << "struct Cell {" << std::endl;
13158  MAPfile << " std::string subdet;" << std::endl;
13159  MAPfile << " int Eta;" << std::endl;
13160  MAPfile << " int Phi;" << std::endl;
13161  MAPfile << " int Depth;" << std::endl;
13162  MAPfile << " std::string RBX;" << std::endl;
13163  MAPfile << " int RM;" << std::endl;
13164  MAPfile << " int Pixel;" << std::endl;
13165  MAPfile << " int RMfiber;" << std::endl;
13166  MAPfile << " int FiberCh;" << std::endl;
13167  MAPfile << " int QIE;" << std::endl;
13168  MAPfile << " int ADC;" << std::endl;
13169  MAPfile << " int VMECardID;" << std::endl;
13170  MAPfile << " int dccID;" << std::endl;
13171  MAPfile << " int Spigot;" << std::endl;
13172  MAPfile << " int FiberIndex;" << std::endl;
13173  MAPfile << " int HtrSlot;" << std::endl;
13174  MAPfile << " int HtrTB;" << std::endl;
13175  MAPfile << std::endl;
13176 
13177  MAPfile << "// the function check, if \"par\" == \"val\" for this cell" << std::endl;
13178  MAPfile << " bool check(const std::string par, const int val) const " << std::endl;
13179  MAPfile << " {" << std::endl;
13180  MAPfile << " if (par == \"Eta\") return (val == Eta);" << std::endl;
13181  MAPfile << " else if (par == \"Phi\") return (val == Phi);" << std::endl;
13182  MAPfile << " else if (par == \"Depth\") return (val == Depth);" << std::endl;
13183  MAPfile << " else if (par == \"RM\") return (val == RM);" << std::endl;
13184  MAPfile << " else if (par == \"Pixel\") return (val == Pixel);" << std::endl;
13185  MAPfile << " else if (par == \"RMfiber\") return (val == RMfiber);" << std::endl;
13186  MAPfile << " else if (par == \"FiberCh\") return (val == FiberCh);" << std::endl;
13187  MAPfile << " else if (par == \"QIE\") return (val == QIE);" << std::endl;
13188  MAPfile << " else if (par == \"ADC\") return (val == ADC);" << std::endl;
13189  MAPfile << " else if (par == \"VMECardID\") return (val == VMECardID);" << std::endl;
13190  MAPfile << " else if (par == \"dccID\") return (val == dccID);" << std::endl;
13191  MAPfile << " else if (par == \"Spigot\") return (val == Spigot);" << std::endl;
13192  MAPfile << " else if (par == \"FiberIndex\") return (val == FiberIndex);" << std::endl;
13193  MAPfile << " else if (par == \"HtrSlot\") return (val == HtrSlot);" << std::endl;
13194  MAPfile << " else if (par == \"HtrTB\") return (val == HtrTB);" << std::endl;
13195  MAPfile << " else return false;" << std::endl;
13196  MAPfile << " }" << std::endl;
13197  MAPfile << std::endl;
13198 
13199  MAPfile << " bool check(const std::string par, const std::string val) const" << std::endl;
13200  MAPfile << " {" << std::endl;
13201  MAPfile << " if (par == \"subdet\") return (val == subdet);" << std::endl;
13202  MAPfile << " else if (par == \"RBX\") return (val == RBX);" << std::endl;
13203  MAPfile << " else return false;" << std::endl;
13204  MAPfile << " }" << std::endl;
13205 
13206  MAPfile << "};" << std::endl;
13207  MAPfile << std::endl;
13208 
13209  MAPfile << "const Cell AllCells[] = {" << std::endl;
13210  MAPfile << "//{ SD, Eta, Phi, Depth, RBX, RM, PIXEL, RMfiber, Fiber Ch., QIE, ADC, VMECrateId, dccid, spigot, "
13211  "fiberIndex, htrSlot, htrTopBottom }"
13212  << std::endl;
13213 
13214  // HB
13215 
13216  for (int eta = -16; eta < 0; eta++) {
13217  for (int phi = 1; phi <= nphi; phi++) {
13218  for (int depth = 1; depth <= 2; depth++) {
13219  HcalDetId* detid = nullptr;
13220  detid = new HcalDetId(HcalBarrel, eta, phi, depth);
13221  subdet = "HB";
13222  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13223  HcalElectronicsId emap_entry = emap->lookup(*detid);
13224  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13225  << detid->depth() << " ,";
13226  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13227  << lmap_entry.rmFiber() << " , ";
13228  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13229  << " , ";
13230  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13231  << " , " << emap_entry.fiberIndex() << " , ";
13232  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13233  MAPfile << "}," << std::endl;
13234  delete detid;
13235  } //Depth
13236  } //Phi
13237  } //Eta
13238  for (int eta = 1; eta <= 16; eta++) {
13239  for (int phi = 1; phi <= nphi; phi++) {
13240  for (int depth = 1; depth <= 2; depth++) {
13241  HcalDetId* detid = nullptr;
13242  detid = new HcalDetId(HcalBarrel, eta, phi, depth);
13243  subdet = "HB";
13244  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13245  HcalElectronicsId emap_entry = emap->lookup(*detid);
13246  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() - 1 << " , " << detid->iphi() - 1 << " , "
13247  << detid->depth() << " ,";
13248  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13249  << lmap_entry.rmFiber() << " , ";
13250  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13251  << " , ";
13252  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13253  << " , " << emap_entry.fiberIndex() << " , ";
13254  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13255  MAPfile << "}," << std::endl;
13256  delete detid;
13257  } //Depth
13258  } //Phi
13259  } //Eta
13260 
13261  // HE
13262  for (int eta = -20; eta <= -20; eta++) {
13263  for (int phi = nphi; phi <= nphi; phi++) {
13264  for (int depth = 1; depth <= 2; depth++) {
13265  HcalDetId* detid = nullptr;
13266  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13267  subdet = "HE";
13268  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13269  HcalElectronicsId emap_entry = emap->lookup(*detid);
13270  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13271  << detid->depth() << " ,";
13272  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13273  << lmap_entry.rmFiber() << " , ";
13274  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13275  << " , ";
13276  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13277  << " , " << emap_entry.fiberIndex() << " , ";
13278  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13279  MAPfile << "}," << std::endl;
13280  delete detid;
13281  } //Depth
13282  } //Phi
13283  } //Eta
13284 
13285  for (int eta = -19; eta <= -16; eta++) {
13286  for (int phi = nphi; phi <= nphi; phi++) {
13287  for (int depth = 1; depth <= 3; depth++) {
13288  HcalDetId* detid = nullptr;
13289  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13290  subdet = "HE";
13291  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13292  HcalElectronicsId emap_entry = emap->lookup(*detid);
13293  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13294  << detid->depth() << " ,";
13295  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13296  << lmap_entry.rmFiber() << " , ";
13297  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13298  << " , ";
13299  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13300  << " , " << emap_entry.fiberIndex() << " , ";
13301  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13302  MAPfile << "}," << std::endl;
13303  delete detid;
13304  } //Depth
13305  } //Phi
13306  } //Eta
13307  for (int eta = -29; eta <= -16; eta++) {
13308  for (int phi = 1; phi <= 71; phi++) {
13309  for (int depth = 1; depth <= 3; depth++) {
13310  HcalDetId* detid = nullptr;
13311  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13312  subdet = "HE";
13313  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13314  HcalElectronicsId emap_entry = emap->lookup(*detid);
13315  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13316  << detid->depth() << " ,";
13317  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13318  << lmap_entry.rmFiber() << " , ";
13319  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13320  << " , ";
13321  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13322  << " , " << emap_entry.fiberIndex() << " , ";
13323  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13324  MAPfile << "}," << std::endl;
13325  delete detid;
13326  } //Depth
13327  } //Phi
13328  } //Eta
13329  for (int eta = 16; eta <= 29; eta++) {
13330  for (int phi = 1; phi <= nphi; phi++) {
13331  for (int depth = 1; depth <= 3; depth++) {
13332  HcalDetId* detid = nullptr;
13333  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13334  subdet = "HE";
13335  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13336  HcalElectronicsId emap_entry = emap->lookup(*detid);
13337  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13338  << detid->depth() << " ,";
13339  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13340  << lmap_entry.rmFiber() << " , ";
13341  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13342  << " , ";
13343  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13344  << " , " << emap_entry.fiberIndex() << " , ";
13345  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13346  MAPfile << "}," << std::endl;
13347  delete detid;
13348  } //Depth
13349  } //Phi
13350  } //Eta
13351 
13352  // HF
13353 
13354  for (int eta = -41; eta <= -29; eta++) {
13355  for (int phi = 1; phi <= nphi; phi += 2) {
13356  for (int depth = 1; depth <= 2; depth++) {
13357  HcalDetId* detid = nullptr;
13358  detid = new HcalDetId(HcalForward, eta, phi, depth);
13359  subdet = "HF";
13360  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13361  HcalElectronicsId emap_entry = emap->lookup(*detid);
13362  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13363  << detid->depth() << " ,";
13364  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13365  << lmap_entry.rmFiber() << " , ";
13366  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13367  << " , ";
13368  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13369  << " , " << emap_entry.fiberIndex() << " , ";
13370  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13371  MAPfile << "}," << std::endl;
13372  delete detid;
13373  } //Depth
13374  } //Phi
13375  } //Eta
13376 
13377  for (int eta = 29; eta <= 41; eta++) {
13378  for (int phi = 1; phi <= nphi; phi += 2) {
13379  for (int depth = 1; depth <= 2; depth++) {
13380  HcalDetId* detid = nullptr;
13381  detid = new HcalDetId(HcalForward, eta, phi, depth);
13382  subdet = "HF";
13383  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13384  HcalElectronicsId emap_entry = emap->lookup(*detid);
13385  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13386  << detid->depth() << " ,";
13387  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13388  << lmap_entry.rmFiber() << " , ";
13389  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13390  << " , ";
13391  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13392  << " , " << emap_entry.fiberIndex() << " , ";
13393  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13394  MAPfile << "}," << std::endl;
13395  delete detid;
13396  } //Depth
13397  } //Phi
13398  } //Eta
13399 
13400  // HO
13401 
13402  for (int eta = -15; eta < 0; eta++) {
13403  for (int phi = 1; phi <= nphi; phi++) {
13404  for (int depth = 4; depth <= 4; depth++) {
13405  HcalDetId* detid = nullptr;
13406  detid = new HcalDetId(HcalOuter, eta, phi, depth);
13407  subdet = "HO";
13408  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13409  HcalElectronicsId emap_entry = emap->lookup(*detid);
13410  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13411  << detid->depth() << " ,";
13412  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13413  << lmap_entry.rmFiber() << " , ";
13414  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13415  << " , ";
13416  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13417  << " , " << emap_entry.fiberIndex() << " , ";
13418  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13419  MAPfile << "}," << std::endl;
13420  delete detid;
13421  } //Depth
13422  } //Phi
13423  } //Eta
13424 
13425  for (int eta = 1; eta <= 15; eta++) {
13426  for (int phi = 1; phi <= nphi; phi++) {
13427  for (int depth = 4; depth <= 4; depth++) {
13428  HcalDetId* detid = nullptr;
13429  detid = new HcalDetId(HcalOuter, eta, phi, depth);
13430  subdet = "HO";
13431  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13432  HcalElectronicsId emap_entry = emap->lookup(*detid);
13433  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() - 1 << " , " << detid->iphi() - 1 << " , "
13434  << detid->depth() << " ,";
13435  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13436  << lmap_entry.rmFiber() << " , ";
13437  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13438  << " , ";
13439  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13440  << " , " << emap_entry.fiberIndex() << " , ";
13441  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13442  MAPfile << "}," << std::endl;
13443  delete detid;
13444  } //Depth
13445  } //Phi
13446  } //Eta
13447  MAPfile << "};" << std::endl;
13448  MAPfile << std::endl;
13449 
13450  MAPfile << "// macro for array length calculation" << std::endl;
13451  MAPfile << "#define DIM(a) (sizeof(a)/sizeof(a[0]))" << std::endl;
13452  MAPfile << std::endl;
13453 
13454  MAPfile << "// class for cells array managing" << std::endl;
13455  MAPfile << "class CellDB {" << std::endl;
13456  MAPfile << "public:" << std::endl;
13457  MAPfile << " CellDB()" << std::endl;
13458  MAPfile << " : cells(AllCells, AllCells + DIM(AllCells))" << std::endl;
13459  MAPfile << "{}" << std::endl;
13460  MAPfile << std::endl;
13461 
13462  MAPfile << "// return i-th cell" << std::endl;
13463  MAPfile << "Cell operator [] (int i) const {return cells[i];}" << std::endl;
13464 
13465  MAPfile << "// number of cells in database" << std::endl;
13466  MAPfile << "int size() const {return cells.size();}" << std::endl;
13467  MAPfile << std::endl;
13468 
13469  MAPfile << "// select cells for which \"par\" == \"val\"" << std::endl;
13470  MAPfile << "template<typename T>" << std::endl;
13471  MAPfile << "CellDB find(const std::string par, const T val) const" << std::endl;
13472  MAPfile << "{" << std::endl;
13473  MAPfile << " std::vector<Cell> s;" << std::endl;
13474  MAPfile << " for (size_t i = 0; i < cells.size(); ++i)" << std::endl;
13475  MAPfile << " if (cells[i].check(par, val))" << std::endl;
13476  MAPfile << " s.push_back(cells[i]);" << std::endl;
13477  MAPfile << " return CellDB(s);" << std::endl;
13478  MAPfile << "} " << std::endl;
13479  MAPfile << std::endl;
13480  MAPfile << "private:" << std::endl;
13481  MAPfile << " CellDB( const std::vector<Cell> s)" << std::endl;
13482  MAPfile << " : cells(s)" << std::endl;
13483  MAPfile << "{}" << std::endl;
13484  MAPfile << "std::vector<Cell> cells;" << std::endl;
13485  MAPfile << "};" << std::endl;
13486  MAPfile.close();
13487  std::cout << "===== Finish writing Channel MAP =====" << std::endl;
13488 }
13489 
13490 double CMTRawAnalyzer::dR(double eta1, double phi1, double eta2, double phi2) {
13491  double deltaphi = phi1 - phi2;
13492  if (phi2 > phi1) {
13493  deltaphi = phi2 - phi1;
13494  }
13495  if (deltaphi > M_PI) {
13496  deltaphi = 2. * M_PI - deltaphi;
13497  }
13498  double deltaeta = eta2 - eta1;
13499  double tmp = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
13500  return tmp;
13501 }
13502 
13503 double CMTRawAnalyzer::phi12(double phi1, double en1, double phi2, double en2) {
13504  // weighted mean value of phi1 and phi2
13505 
13506  double a1 = phi1;
13507  double a2 = phi2;
13508 
13509  if (a1 > 0.5 * M_PI && a2 < 0.)
13510  a2 += 2 * M_PI;
13511  if (a2 > 0.5 * M_PI && a1 < 0.)
13512  a1 += 2 * M_PI;
13513  double tmp = (a1 * en1 + a2 * en2) / (en1 + en2);
13514  if (tmp > M_PI)
13515  tmp -= 2. * M_PI;
13516 
13517  return tmp;
13518 }
13519 
13520 double CMTRawAnalyzer::dPhiWsign(double phi1, double phi2) {
13521  // clockwise phi2 w.r.t phi1 means "+" phi distance
13522  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
13523 
13524  double a1 = phi1;
13525  double a2 = phi2;
13526  double tmp = a2 - a1;
13527  if (a1 * a2 < 0.) {
13528  if (a1 > 0.5 * M_PI)
13529  tmp += 2. * M_PI;
13530  if (a2 > 0.5 * M_PI)
13531  tmp -= 2. * M_PI;
13532  }
13533  return tmp;
13534 }
13535 
13538 //define this as a plug-in
TH2F * h_mapDepth4Pedw1_HO
TH2F * h_mapDepth4AmplE34_HO
double lsdep_estimator2_HEdepth3_
RunNumber_t run() const
Definition: EventID.h:38
constexpr float energy() const
Definition: CaloRecHit.h:29
TH1F * h_averSIGNALsumamplitude_HO
TH1F * h_runnbadchannels_depth1_HF
TH2F * h_recNoiseEnergy0_HF1
TH2F * h_2D0Ataildepth2_HB
TH1F * h_sumAmplitudeperLS8
int fiberChannel() const
double lsdep_estimator3_HFdepth1_
TH1F * h_nevents_per_LSzoom
TH1F * h_sum0PedestalperLS3
double amplitudechannel2[nsub][ndepth][neta][nphi]
static const std::string kSharedResource
Definition: TFileService.h:76
TH1F * h_sumCutADCAmplperLSdepth6HEu
TH1F * h_bcnnbadchannels_depth4_HO
TH2F * h_recNoiseEnergy1_HB1
TH2F * h_2DsumAmplitudeLS5
TH1F * h_RatioOccupancy_HFM
TH2F * h_mapDepth6Amplitude225_HE
TH2F * h_2DsumADCAmplEtaPhiLs3
TH2F * h_mapWidthCalib047_HE
TH1F * h_averSIGNALsumamplitude_HF
TH2F * h_recSignalEnergy1_HF3
bool studyRunDependenceHist_
const int nphi
TH2F * h_mapDepth4TSmeanA225_HE
TH2F * h_mapDepth1TSmaxA225_HE
TH1F * h_sum0ADCAmplperLS3_P1
double const adc2fC_QIE11_shunt6[256]
EventNumber_t event() const
Definition: EventID.h:40
TH2F * h_mapDepth3TSmaxA225_HE
TH1F * h_sum0ADCAmplperLS5
TH1F * h_sumADCAmplperLS7u
T getUntrackedParameter(std::string const &, T const &) const
TH1F * h_shape0_good_channels_HO
TH1F * h_bcnbadrate0_depth4_HO
double adc2fC_QIE10[256]
TH2F * h_mapDepth3ADCAmpl225Copy_HF
TH1F * h_bcnvsamplitude_HE
TH1F * h_RatioOccupancy_HOM
TH2F * h_amplitudechannel0_HE4
TH1F * h_sum0ADCAmplperLS8_M2
TH2F * h_mapDepth1linADCAmpl12_HE
TH2F * h_amplitudechannel1_HB4
TH2F * h_mapDepth2Amplitude_HB
double lsdep_estimator4_HEdepth3_
TH1F * h_runnbadchannels_depth4_HO
TH1F * h_RatioOccupancy_HOP
TH1F * h_runnbadchannels_depth1_HE
TH2F * h_mapDepth5TS2_HE
double calib3[ndepth][neta][nphi]
TH2F * h_mapDepth2Error_HB
TH2F * h_mapDepth2Ampl047_HE
edm::EDGetTokenT< QIE10DigiCollection > tok_qie10_
TH1F * h_runbadrate0_depth3_HE
TH2F * h_amplitudechannel0_HB4
TH1F * h_orbitNumvsamplitude_HF
TH2F * h_mapDepth1Error_HF
TH2F * h_mapDepth5TSmeanA_HE
TH2F * h_recNoiseEnergy1_HE5
TH1F * h_bcnvsamplitude0_HB
TH2F * h_recSignalEnergy1_HE5
TH2F * h_mapDepth2AmplE34_HE
TH2F * h_recSignalEnergy0_HF1
TH1F * h_ADCAmpl345Zoom_HB
TH2F * h_mapTSmeanCalib_HF
TH1F * h_averNOSIGNALsumamplitude_HO
TH1F * h_runbadrate0_depth4_HO
TH2F * h_mapDepth3TS2_HB
TH1F * h_bcnbadrate0_depth1_HF
TH2F * h_mapGetRMSOverNormalizedSignal0_HE
TH2F * h_amplitudechannel0_HE3
double calibrTSmaxHOMin_
TH2F * h_mapDepth5TSmaxA_HE
TH2F * h_mapDepth2TS1_HF
TH1F * h_ndepthesperamplitudebins_HE
const HcalDbService * conditions
TH1F * h_AmplitudeHEtest6
TH1F * h_pedestalwaver9_HE
TH2F * h_2DsumADCAmplLS1_LSselected
double calibrTSmaxHOMax_
int pixel() const
TH1F * h_sumADCAmplperLS8_P2
TH2F * h_mapDepth1Amplitude225_HE
TH1F * h_averNOSIGNALsumamplitude_HE
TH1F * h_sum0ADCAmplperLS6_M2
TH2F * h_mapDepth4ADCAmpl225_HB
double mapRADDAM_HE[ndepth][neta][nphi]
TH2F * h_recSignalEnergy1_HB4
TH2F * h_2DsumADCAmplLS8_LSselected
TH1F * h_sumADCAmplperLS6_P1
TH2F * h_mapDepth3Pedw2_HE
TH1F * h_AmplitudeHBrest1
double calibrRatioHBMin_
TH1F * h_sumamplitude_depth2_HE0
TH2F * h_mapCapCalib047_HE
TH1F * h_sumCutTSmeanAperLS4
double lsdep_estimator2_HBdepth1_
TH2F * h_mapDepth4TS2_HE
TH2F * h_mapTSmeanCalib047_HO
TH2F * h_amplitudechannel1_HF3
TH2F * h_mapDepth3Error_HB
TH1F * h_Amplitude_notCapIdErrors_HO4
TH2F * h_mapGetRMSOverNormalizedSignal_HF
TH1F * h_sumCutAmplitudeperLS1
TH2F * h_amplitudechannel1_HB2
double calib0[ndepth][neta][nphi]
TH2F * h_amplitudechannel0_HB3
TH1F * h_sumamplitudechannel_HB
edm::EDGetTokenT< HBHERecHitCollection > tok_hbheNoise_
TH2F * h_mapDepth4Pedw0_HO
double lsdep_estimator2_HOdepth4_
float calibt[ndepth][neta][nphi]
TH2F * h_mapDepth1TS2_HB
TH1F * h_sumamplitude_depth1_HE
TH1F * h_sumCutTSmaxAperLS1
TH1F * h_sumADCAmplperLSdepth4HBu
TH2F * h_mapDepth1Pedw2_HE
TH1F * h_sumCutADCAmplperLSdepth4HEu
TH2F * h_mapDepth3pedestalw_HB
TH2F * h_recNoiseEnergy2_HF1
TH1F * h_pedestalwaver4_HB
TH1F * h_ADCAmpl345Zoom1_HE
TH2F * h_recSignalEnergy0_HF4
double lsdep_estimator3_HBdepth2_
TH2F * h_recNoiseEnergy1_HB4
CMTRawAnalyzer(const edm::ParameterSet &)
TH2F * h_recSignalEnergy0_HE6
TH2F * h_amplitudechannel1_HF4
TH1F * h_averSIGNALoccupancy_HB
TH2F * h_mapDepth2TSmaxA225_HE
TH2F * h_mapDepth2Amplitude225_HF
TH1F * h_errorGeneral_HE
TH2F * h_mapDepth4Amplitude_HF
TH2F * h_mapDepth2Error_HF
void fillDigiAmplitudeHO(HODigiCollection::const_iterator &digiItr)
TH1F * h_sumADCAmplEtaPhiLs
TH2F * h_mapDepth4ADCAmpl12_HF
TH1F * h_runbadrate_depth2_HE
TH1F * h_Eta16Depth3RADDAM_HED2P
TH2F * h_amplitudechannel0_HE7
TH2F * h_mapDepth2Pedw3_HF
TH2F * h_mapDepth4ADCAmpl225Copy_HB
double averSIGNALsumamplitude_HO
TH2F * h_2DsumADCAmplLSdepth3HFu
void fillDigiErrors(HBHEDigiCollection::const_iterator &digiItr)
TH2F * h_recNoiseEnergy1_HE6
double lsdep_estimator3_HBdepth1_
TH1F * h_numberofhitsHEtest
double sum0Estimator[nsub][ndepth][neta][nphi]
TH2F * h_mapAiForLS_bad_HE
double calibrRatioHOMax_
TH1F * h_AmplitudeHEtest1
double lsdep_estimator1_HFdepth3_
TH2F * h_2DsumADCAmplLSdepth5HEu
TH1F * h_sumamplitude_depth4_HO
TH2F * h_2DsumAmplitudeLS1
TH1F * h_sum0ADCAmplperLS7u
TH1F * h_runnbadchannels_depth3_HE
TH2F * h_amplitudechannel2_HF1
TH2F * h_mapDepth1ADCAmpl12_HF
TH2F * h_mapDepth4TS2_HB
TH1F * h_AmplitudeHBrest6
TH2F * h_mapDepth4AmplE34_HE
TH2F * h_mapDepth3ADCAmpl12_HF
TH1F * h_sigLayer1RADDAM6_HED2
double calibrTSmaxHBMin_
double mapRADDAM_HED2[ndepth][neta]
TH2F * h_mapDepth1Pedw1_HE
TH2F * h_2D0sumPedestalLS1
TH2F * h_mapAiForLS_good_HE
TH2F * h_2DsumADCAmplLSdepth4HBu
TH2F * h_mapDepth2ADCAmpl225_HE
TH1F * h_bcnnbadchannels_depth2_HF
TH2F * h_mapDepth2ADCAmpl225_HB
TH2F * h_recSignalEnergy1_HE2
TH1F * h_A_Depth2RADDAM_HE
TH1F * h_sumPedestalperLS4
TH2F * h_mapADCCalib047_HE
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
TH2F * h_mapDepth4Pedw3_HO
TH1F * h_shape_good_channels_HE
TH1F * h_sumADCAmplperLS1_P1
TH1F * h_sum0AmplitudeperLS1
TH2F * h_amplitudechannel2_HE6
int calibcapiderror[ndepth][neta][nphi]
TH2F * h_mapDepth3TS2_HE
float getSigma(int fCapId1, int fCapId2) const
get correlation element for capId1/2 = 0..3
TH1F * h_sumphiEta16Depth3RADDAM_HED2
TH2F * h_2D0sumPedestalLS6
edm::InputTag inputTag_
TH2F * h_mapDepth1Error_HB
int flagIterativeMethodCalibrationGroupDigi_
double maprphinorm[nsub][ndepth][neta][nphi]
TH1F * h_gsmdifferencefit4_HE
TH2F * h_recSignalEnergy2_HB2
TH2F * h_mapDepth6ADCAmpl12_HE
TH2F * h_mapADCAmpl11firstpeak_HE
TH1F * h_eventoccupancy_HF
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TH2F * h_2DsumAmplitudeLS6
int mapRADDAM0_HE[ndepth][neta][nphi]
TH1F * h_runbadrate_depth1_HB
double lsdep_estimator3_HOdepth4_
double calibrTSmaxHEMax_
TH2F * h_recNoiseEnergy2_HE5
TH2F * h_recNoiseEnergy2_HE6
TH1F * h_gsmdifferencefit5_HE
TH2F * h_mapDepth2Amplitude225_HE
TH1F * h_Amplitude_notCapIdErrors_HB1
TH1F * h_runnbadchannelsC_depth1_HE
TH2F * h_recNoiseEnergy0_HF3
double amplitudechannel[nsub][ndepth][neta][nphi]
double averSIGNALoccupancy_HO
TH1F * h_Amplitude_forCapIdErrors_HB1
TH1F * h_runbadrateC_depth2_HB
TH2F * h_mapDepth3Error_HE
TH2F * h_mapCapCalib047_HO
double lsdep_estimator4_HFdepth2_
TH2F * h_mapCapCalib047_HB
TH1F * h_pedestalwaver4_HO
TH2F * h_mapDepth3Amplitude225_HB
TH2F * h_mapDepth4Amplitude225_HB
TH2F * h_recSignalEnergy1_HF2
TH2F * h_amplitudechannel0_HE2
TH2F * h_mapDepth2Pedw3_HE
TH1F * h_runnbadchannelsC_depth1_HF
double calibrWidthHEMin_
TH2F * h_mapDepth4Ampl047_HF
TH1F * h_sumamplitude_depth4_HO0
TH1F * h_shape0_bad_channels_HB
TH1F * h_AmplitudeHBtest
TH1F * h_RatioOccupancy_HEP
TH1F * h_Eta16Depth3RADDAM_HED2ALL
TH2F * h_amplitudechannel1_HE5
TH2F * h_mapDepth1TSmaxA_HF
TH2F * h_recNoiseEnergy0_HE6
TH1F * h_sigLayer1RADDAM6_HE
TH1F * h_shape0_good_channels_HB
double calibrTSmeanHOMax_
TH2F * h_2D0sumPedestalLS4
TH1F * h_sigLayer1RADDAM0_HE
TH2F * h_mapDepth7ADCAmpl_HE
TH2F * h_2DsumADCAmplEtaPhiLs0
double lsdep_estimator2_HEdepth1_
TH2F * h_mapDepth4ADCAmpl_HE
TH1F * h_sumamplitude_depth2_HB
TH1F * h_NphiForEta16Depth3RADDAM_HED2ALL
TH2F * h_2DsumAmplitudeLS4
TH2F * h_recNoiseEnergy1_HE3
TH2F * h_mapDepth4ADCAmpl12_HE
double phi12(double phi1, double en1, double phi2, double en2)
TH1F * h_energyhitNoise_HE
double lsdep_estimator1_HBdepth1_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
TH2F * h_mapDepth4Error_HB
std::vector< T >::const_iterator const_iterator
TH2F * h_2D0Ataildepth1_HB
TH1F * h_sum0ADCAmplperLSdepth5HEu
TH2F * h_mapDepth3ADCAmpl_HF
TH1F * h_gsmdifferencefit3_HE
const HcalQIEShape * shape
TH1F * h_sumamplitude_depth2_HE
double lsdep_estimator1_HFdepth4_
TH2F * h_mapDepth2linADCAmpl12_HE
int bunchCrossing() const
Definition: EventBase.h:64
TH2F * h_mapGetRMSOverNormalizedSignal0_HO
TH2F * h_mapDepth2TS2_HB
TH2F * h_recNoiseEnergy1_HF4
TH2F * h_mapDepth1Ampl047_HB
TH2F * h_mapDepth2Amplitude225_HB
TH2F * h_mapTSmeanCalib047_HB
TH2F * h_recNoiseEnergy0_HB4
TH2F * h_mapDepth4Amplitude_HO
TH2F * h_recNoiseEnergy0_HE2
edm::EDGetTokenT< HFRecHitCollection > tok_hfSignal_
TH2F * h_mapDepth1AmplE34_HF
TH2F * h_mapDepth4pedestal_HB
double recSignalEnergy2[nsub][ndepth][neta][nphi]
TH2F * h_recSignalEnergy1_HB2
TH2F * h_amplitudechannel2_HE7
TH2F * h_mapDepth3Ampl047_HE
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
TH2F * h_mapDepth1ADCAmpl225_HE
TH2F * h_mapDepth7ADCAmpl225_HE
double averSIGNALoccupancy_HB
TH2F * h_2D0sumAmplitudeLS2
TH1F * h_nbadchannels_depth3_HE
TH1F * h_sum0ADCAmplperLS6_P2
TH1F * h_Amplitude_forCapIdErrors_HE3
TH2F * h_mapDepth4TSmeanA225_HB
TH1F * h_sumamplitude_depth2_HB0
TH1F * h_sumAmplperLS1_LSselected
TH1F * h_corrforxaMAIN0_HE
TH2F * h_mapDepth2ADCAmpl_HF
TH1F * h_sumamplitude_depth1_HF1
TH2F * h_mapGetRMSOverNormalizedSignal_HE
double lsdep_estimator1_HEdepth4_
TH1F * h_Amplitude_forCapIdErrors_HF1
TH2F * h_2DsumAmplitudeLS3
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
TH1F * h_sum0PedestalperLS1
TH2F * h_mapDepth2TSmaxA_HB
TH1F * h_sum0ADCAmplperLSdepth3HBu
TH2F * h_mapDepth3Amplitude_HE
TH1F * h_ADCAmpl345Zoom_HE
TH2F * h_mapDepth5TSmeanA225_HE
TH2F * h_recNoiseEnergy0_HE7
TH2F * h_recNoiseEnergy2_HB1
TH2F * h_recNoiseEnergy0_HB2
TH2F * h_mapTSmaxCalib047_HB
TH1F * h_Amplitude_notCapIdErrors_HF2
TH1F * h_sumADCAmplperLS8_P1
TH2F * h_mapDepth1AmplE34_HB
TH2F * h_recSignalEnergy2_HE7
TH1F * h_sum0TSmeanAperLS7
double lsdep_estimator2_HEdepth2_
TH2F * h_mapDepth4Error_HO
double sumEstimator3[nsub][ndepth][neta][nphi]
TH2F * h_recSignalEnergy0_HE2
TH2F * h_mapDepth2ADCAmpl_HB
TH2F * h_mapDepth1TSmaxA225_HF
TH2F * h_recNoiseEnergy1_HB3
double lsdep_estimator4_HBdepth2_
TH2F * h_mapDepth7TSmeanA225_HE
double lsdep_estimator1_HEdepth3_
TH1F * h_AmplitudeHEtest
TH2F * h_mapDepth1ADCAmpl225_HF
TH1F * h_Amplitude_forCapIdErrors_HE1
TH2F * h_mapDepth4Amplitude225_HF
TH2F * h_mapDepth2pedestal_HB
double lsdep_estimator3_HEdepth2_
TH2F * h_mapGetRMSOverNormalizedSignal_HO
TH2F * h_mapDepth1Pedw3_HE
void fillDigiAmplitudeQIE11(QIE11DataFrame qie11df)
TH2F * h_2D0sumADCAmplLSdepth4HFu
double calibrTSmeanHFMin_
TH1F * h_sumamplitude_depth1_HB
TH1F * h_sumPedestalperLS1
TH1F * h_sumAmplitudeperLS1
constexpr int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
void fillDigiErrorsHF(HFDigiCollection::const_iterator &digiItr)
TH2F * h_mapDepth3ADCAmpl225_HB
TH1F * h_nbadchannels_depth2_HB
double lsdep_estimator5_HEdepth1_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbheSignal_
TH1F * h_shape_good_channels_HF
float getValue(int fCapId) const
get value for capId = 0..3
Definition: HcalGain.h:21
int ii
Definition: cuy.py:589
TH2F * h_mapDepth2Pedw1_HE
TH2F * h_amplitudechannel2_HF3
double lsdep_estimator1_HFdepth2_
TH2F * h_mapDepth4TSmaxA225_HF
TH2F * h_recNoiseEnergy1_HE1
TH1F * h_sigLayer2RADDAM6_HE
TH2F * h_recSignalEnergy2_HE6
TH2F * h_mapDepth4TSmeanA_HB
TH2F * h_mapDepth1RADDAM0_HE
TH2F * h_2DsumADCAmplLSdepth3HBu
TH2F * h_2D0sumADCAmplLSdepth6HEu
TH2F * h_recSignalEnergy1_HE1
TH1F * h_sum0ADCAmplperLS8_P2
TH1F * h_nbadchannels_depth1_HB
TH2F * h_recNoiseEnergy1_HB2
TH2F * h_mapDepth3Ampl_HB
TH1F * h_sum0ADCAmplperLS3_P2
TH2F * h_mapDepth4ADCAmpl_HB
TH1F * h_energyhitSignal_HB
TH1F * h_runnbadchannelsC_depth2_HE
TH1F * h_bcnvsamplitude_HB
TH2F * h_amplitudechannel0_HF2
TH2F * h_mapDepth5ADCAmpl225_HE
TH1F * h_sumADCAmplperLS3_M2
TH1F * h_sum0ADCAmplperLS1_P2
TH2F * h_mapDepth1TSmeanA225_HE
TH2F * h_recSignalEnergy1_HE3
int flagfitshunt1pedorledlowintensity_
TH2F * h_mapDepth2Pedw3_HB
TH1F * h_sumamplitude_depth3_HE
TH1F * h_sumCutTSmeanAperLS8
TH2F * h_mapDepth1TSmeanA_HB
TH2F * h_mapDepth4pedestal_HE
TH1F * h_Amplitude_forCapIdErrors_HB2
TH2F * h_mapDepth4Ampl047_HB
TH2F * h_mapDepth1ADCAmpl12_HE
TH2F * h_2DsumADCAmplEtaPhiLs1
TH2F * h_2DsumADCAmplLS4_LSselected
TH1F * h_nbadchannels_depth2_HE
TH1F * h_sumADCAmplLS1copy1
double dPhiWsign(double phi1, double phi2)
TH1F * h_sum0ADCAmplperLS3_M1
TH2F * h_recNoiseEnergy0_HB3
double tocamplchannel[nsub][ndepth][neta][nphi]
double calib2[ndepth][neta][nphi]
TH2F * h_mapDepth4ADCAmpl225_HF
TH1F * h_sum0PedestalperLS8
TH1F * h_sumADCAmplperLS6u
double calibrWidthHBMax_
TH1F * h_runbadrate_depth4_HO
double lsdep_estimator2_HFdepth2_
TH2F * h_mapDepth1Ampl_HB
double averNOSIGNALsumamplitude_HO
TH2F * h_mapDepth4Ampl047_HO
TH1F * h_Amplitude_notCapIdErrors_HE3
TH2F * h_mapDepth2Pedw1_HB
TH2F * h_mapDepth2Ampl047_HB
TH2F * h_mapDepth1TSmaxA_HB
std::string rbx() const
TH2F * h_mapDepth2pedestalw_HF
TH2F * h_mapADCAmpl11firstpeak0_HE
const int nsub
TH1F * h_sumCutAmplitudeperLS7
edm::Service< TFileService > fs_
TH2F * h_mapCapCalib047_HF
TH1F * h_sum0AmplitudeperLS2
TH1F * h_bcnvsamplitude0_HF
double lsdep_estimator1_HEdepth5_
double calibrTSmeanHEMax_
TH2F * h_mapDepth7ADCAmpl225Copy_HE
TH1F * h_sumCutTSmaxAperLS2
TH1F * h_sumCutTSmeanAperLS3
TH2F * h_mapDepth2ADCAmplSiPM_HE
TH2F * h_mapDepth3pedestal_HB
TH2F * h_amplitudechannel1_HB1
TH2F * h_mapDepth4ADCAmpl225Copy_HO
TH2F * h_mapenophinorm_HE2
TH2F * h_2DsumADCAmplLSdepth4HEu
TH1F * h_sum0PedestalperLS6
TH2F * h_mapDepth4pedestalw_HF
TH1F * h_sum0ADCAmplperLS3_M2
TH2F * h_amplitudechannel0_HB1
TH2F * h_recSignalEnergy2_HF2
TH1F * h_sumCutTSmeanAperLS7
TH2F * h_recSignalEnergy0_HF3
TH2F * h_amplitudechannel1_HE4
TH2F * h_recSignalEnergy1_HE7
double calibrWidthHEMax_
double calibrRatioHOMin_
TH1F * h_sumADCAmplperLS6_P2
TH2F * h_mapADCAmpl11secondpeak_HE
TH1F * h_nbadchannels_depth4_HO
TH2F * h_mapWidthCalib047_HB
TH2F * h_amplitudechannel2_HE5
TH1F * h_sumPedestalperLS3
TH1F * h_sumADCAmplLS1copy2
TH1F * h_sumCutADCAmplperLS5
TH1F * h_repetedcapid_HF
TH1F * h_runbadrate0_depth2_HB
double sumEstimator5[nsub][ndepth][neta][nphi]
TH1F * h_sumADCAmplperLSdepth6HEu
TH2F * h_recSignalEnergy2_HE3
TH1F * h_runbadrate_depth1_HF
TH2F * h_mapDepth4TSmaxA_HB
TH1F * h_sum0ADCAmplperLS6_M1
TH2F * h_mapDepth4Error_HE
TH1F * h_sumCutADCAmplperLSdepth7HEu
TH1F * h_pedestalwaver9_HF
TH2F * h_recSignalEnergy1_HE6
double lsdep_estimator2_HFdepth1_
edm::EDGetTokenT< HFRecHitCollection > tok_hfNoise_
bool getData(T &iHolder) const
Definition: EventSetup.h:128
TH2F * h_mapDepth1TSmeanA225_HF
TH2F * h_mapDepth5AmplE34_HE
double lsdep_estimator1_HBdepth3_
TH2F * h_mapAiForLS_good_HF
TH2F * h_mapDepth4TS1_HF
TH2F * h_map0AiForLS_bad_HB
TH2F * h_mapWidthCalib047_HO
void fillDigiErrorsQIE11(QIE11DataFrame qie11df)
TH1F * h_sigLayer1RADDAM5_HED2
double calibrWidthHOMin_
TH2F * h_mapDepth1ADCAmpl225_HB
TH2F * h_mapDepth2Error_HE
TH1F * h_sumamplitude_depth2_HF
TH2F * h_amplitudechannel2_HB4
TH2F * h_mapenophinorm2_HE1
const HcalPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
TH2F * h_mapDepth2TSmeanA225_HE
TH2F * h_mapDepth4TSmaxA_HO
TH1F * h_shape0_bad_channels_HF
TH2F * h_amplitudechannel0_HE6
constexpr DetId detid() const
Get the detector id.
TH2F * h_mapDepth1Pedw3_HB
TH1F * h_pedestalwaver9_HO
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
TH2F * h_mapDepth1TSmaxA_HE
TH2F * h_mapDepth3ADCAmpl12_HE
const HcalRespCorr * getHcalRespCorr(const HcalGenericDetId &fId) const
void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const override
Definition: HcalCoderDb.cc:73
TH2F * h_mapDepth4AmplE34_HB
TH2F * h_mapDepth1pedestal_HB
TH1F * h_Amplitude_forCapIdErrors_HE2
TH1F * h_bcnvsamplitude_HO
TH2F * h_mapDepth3TSmaxA225_HB
TH1F * h_sumamplitudechannel_HE
double averNOSIGNALoccupancy_HB
const int zneta
constexpr int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
TH2F * h_mapDepth4TSmeanA_HF
TH2F * h_mapADCAmplfirstpeak_HE
TH2F * h_mapDepth4ADCAmpl225Copy_HF
TH1F * h_sum0PedestalperLS4
TH2F * h_recNoiseEnergy0_HE5
TH2F * h_mapDepth7TSmeanA_HE
TH1F * h_nbadchannels_depth2_HF
TH1F * h_sum0AmplitudeperLS5
TH2F * h_mapDepth3ADCAmpl225_HF
TH2F * h_amplitudechannel0_HF4
const HcalLUTCorr * getHcalLUTCorr(const HcalGenericDetId &fId) const
TH1F * h_orbitNumvsamplitude0_HE
TH1F * h_sigLayer2RADDAM5_HED2
TH2F * h_recSignalEnergy0_HB2
TH1F * h_eventoccupancy_HB
const HcalTimeCorr * getHcalTimeCorr(const HcalGenericDetId &fId) const
TH2F * h_2D0sumAmplitudeLS1
TH1F * h_sumADCAmplperLS3_M1
TH2F * h_recSignalEnergy2_HE4
TH1F * h_shape0_good_channels_HE
TH2F * h_mapADCCalib047_HO
TH1F * h_eventoccupancy_HE
double lsdep_estimator1_HOdepth4_
int iEvent
Definition: GenABIO.cc:224
TH1F * h_sumADCAmplEtaPhiLs_ietaphi
double lsdep_estimator4_HOdepth4_
TH1F * h_mapDepth3RADDAM16_HE
TH1F * h_sum0ADCAmplperLSdepth4HBu
TH1F * h_shape_bad_channels_HO
TH1F * h_Amplitude_forCapIdErrors_HF2
TH1F * h_RatioOccupancy_HBP
double lsdep_estimator4_HBdepth1_
TH1F * h_sumCutADCAmplperLS6
TH2F * h_2D0sumPedestalLS8
TH2F * h_recSignalEnergy0_HB1
TH1F * h_runbadrateC_depth2_HE
TH2F * h_recSignalEnergy1_HE4
TH1F * h_sumADCAmplperLS8_M2
TH1F * h_sumamplitudechannel_HF
const int npfit
TH2F * h_mapDepth2ADCAmpl12SiPM_HE
TH2F * h_mapDepth1pedestalw_HB
TH2F * h_mapDepth2RADDAM_HE
double calibrRatioHEMin_
TH2F * h_mapDepth6pedestal_HE
TH2F * h_mapDepth3TSmeanA225_HF
TH2F * h_mapDepth4ADCAmpl12_HB
TH2F * h_2D0sumPedestalLS7
TH2F * h_mapDepth1Amplitude_HF
TH1F * h_sumADCAmplLS1copy5
const int neta
std::ofstream MAPfile
TH2F * h_2D0sumADCAmplLSdepth3HFu
const HcalTopology * topo
TH2F * h_amplitudechannel2_HF4
TH1F * h_runbadrateC_depth2_HF
double forallestimators_amplitude_bigger_
TH1F * h_sum0AmplitudeperLS8
TH2F * h_mapDepth5Ampl047_HE
TH1F * h_sum0AmplitudeperLS3
TH1F * h_ADCAmpl345Zoom1_HB
double lsdep_estimator5_HFdepth2_
TH1F * h_runbadrate_depth2_HF
TH2F * h_mapDepth3Amplitude_HB
TH1F * h_energyhitNoise_HB
TH1F * h_sumADCAmplperLS1_M1
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
TH1F * h_totalAmplitudeHEperEvent
TH2F * h_mapDepth3RADDAM_HE
TH2F * h_mapDepth3ADCAmpl225Copy_HE
TH1F * h_sumADCAmplperLSdepth3HBu
TH1F * h_energyhitSignal_HF
TH2F * h_mapDepth5pedestalw_HE
TH1F * h_runbadrateC_depth1_HF
TH2F * h_mapWidthCalib047_HF
TH2F * h_recSignalEnergy2_HE2
TH2F * h_amplitudechannel0_HE1
TH1F * h_runnbadchannelsC_depth2_HF
int getRBX(int &i, int &j, int &k)
TH1F * h_sumCutAmplitudeperLS8
TH2F * h_mapAiForLS_bad_HF
TH2F * h_mapDepth7Ampl047_HE
TH1F * h_sumCutTSmeanAperLS1
TH1F * h_sum0ADCAmplperLS1
TH1F * h_sumamplitude_depth2_HE1
TH1F * h_sumADCAmplperLS8_M1
TH2F * h_mapDepth2TSmaxA_HE
TH1F * h_bcnnbadchannels_depth1_HB
TH2F * h_mapDepth2Amplitude_HF
TH2F * h_mapDepth1Ampl_HF
TH2F * h_mapADCAmpl12secondpeak_HE
T sqrt(T t)
Definition: SSEVec.h:19
TH2F * h_mapDepth1TSmeanA225_HB
int rm() const
double calibrTSmaxHEMin_
double calibrRatioHFMax_
TH2F * h_recNoiseEnergy0_HE4
TH2F * h_amplitudechannel2_HB3
TH1F * h_runnbadchannels_depth2_HB
TH2F * h_mapDepth3Amplitude_HF
const edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tokTopo_
TH2F * h_mapDepth4Amplitude225_HO
TH1F * h_sumamplitude_depth1_HB0
constexpr int htrSlot() const
get the htr slot
TH1F * h_sumamplitude_depth3_HE1
TH1F * h_corrforxaADDI0_HE
TH2F * h_mapDepth5ADCAmpl12_HE
TH1F * h_eventamplitude_HO
double lsdep_estimator4_HFdepth1_
TH2F * h_mapDepth5ADCAmpl_HE
TH1F * h_AmplitudeHBrest
TH1F * h_sum0ADCAmplperLS8_P1
TH1F * h_totalAmplitudeHOperEvent
TH2F * h_mapDepth1Ampl047_HE
TH1F * h_sumCutADCAmplperLS2
TH2F * h_mapDepth3Pedw3_HE
TH2F * h_mapDepth4Ampl_HB
TH1F * h_errorGeneral_HB
TH1F * h_sumAmplitudeperLS6
TH1F * h_errorGeneral_HO
TH1F * h_AamplitudewithPedSubtr_RADDAM_HEzoom0
TH2F * h_mapDepth6Amplitude_HE
TH2F * h_mapenophinorm_HE5
TH2F * h_map0AiForLS_bad_HF
TH2F * h_recSignalEnergy2_HF3
TH1F * h_sumCutTSmeanAperLS5
TH1F * h_sum0ADCAmplperLS2
TH1F * h_shape_good_channels_HO
double averNOSIGNALsumamplitude_HB
TH2F * h_mapDepth1Pedw1_HB
bool usePedestalSubtraction_
TH2F * h_mapDepth2Pedw2_HF
TH2F * h_mapTSmeanCalib047_HF
TH1F * h_totalAmplitudeHO
TH1F * h_numberofhitsHFtest
TH2F * h_mapTSmaxCalib047_HE
TH1F * h_runbadrate0_depth1_HF
TH2F * h_mapDepth2Pedw0_HF
TH2F * h_amplitudechannel0_HF1
double calibrTSmeanHOMin_
TH1F * h_NphiForEta16Depth3RADDAM_HED2P
TH1F * h_sigLayer2RADDAM_HE
TH2F * h_mapDepth4ADCAmpl_HO
TH1F * h_sum0ADCAmplperLS6_P1
TH2F * h_recNoiseEnergy0_HB1
TH1F * h_AmplitudeHOtest
TH2F * h_amplitudechannel0_HF3
TH2F * h_mapDepth2ADCAmpl225Copy_HB
TH2F * h_mapDepth7pedestalw_HE
TH1F * h_sumCutADCAmplperLSdepth3HBu
TH2F * h_amplitudechannel1_HF1
TH1F * h_ADCAmpl_HBCapIdNoError
void analyze(const edm::Event &, const edm::EventSetup &) override
double caliba[ndepth][neta][nphi]
const float bphi
TH2F * h_2D0sumAmplitudeLS8
TH1F * h_sumCutADCAmplperLS3
double averNOSIGNALoccupancy_HE
TH2F * h_recSignalEnergy1_HB3
TH2F * h_recSignalEnergy0_HB3
TH2F * h_mapDepth6ADCAmpl225_HE
TH2F * h_recSignalEnergy1_HB1
TH2F * h_recNoiseEnergy1_HF1
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const float anpfit
TH2F * h_mapDepth7TS2_HE
TH1F * h_ADCAmplrest1_HF
TH1F * h_Amplitude_notCapIdErrors_HB2
TH1F * h_energyhitSignal_HE
TH1F * h_runbadrateC_depth1_HE
TH1F * h_orbitNumvsamplitude0_HF
double sumEstimator1[nsub][ndepth][neta][nphi]
TH2F * h_2DsumAmplitudeLS8
TH2F * h_mapDepth3Amplitude225_HF
TH2F * h_mapDepth3TSmeanA225_HE
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
static const float adc2fC[128]
TH1F * h_sumADCAmplperLS1_P2
TH2F * h_mapDepth2Ampl_HB
TH1F * h_runbadrate0_depth2_HF
TH2F * h_mapDepth2Amplitude_HE
constexpr int readoutVMECrateId() const
get the readout VME crate number
TH1F * h_sum0ADCAmplperLS6
double calibw[ndepth][neta][nphi]
TH1F * h_nevents_per_eachLS
TH2F * h_recSignalEnergy2_HF4
TH2F * h_recSignalEnergy0_HF2
edm::EDGetTokenT< QIE11DigiCollection > tok_qie11_
TH2F * h_2DsumADCAmplEtaPhiLs20
TH1F * h_ADCAmpl345_HBCapIdNoError
float getValue(int fCapId) const
get value for capId = 0..3
Definition: HcalPedestal.h:20
TH2F * h_amplitudechannel1_HE6
TH2F * h_amplitudechannel2_HE3
TH2F * h_mapDepth7Amplitude225_HE
TH2F * h_mapDepth3ADCAmpl12_HB
TH1F * h_sum0TSmeanAperLS6
const int znphi
double lsdep_estimator1_HBdepth2_
TH2F * h_2D0sumADCAmplLSdepth3HBu
TH1F * h_runbadrate_depth1_HE
TH1F * h_sumADCAmplperLS6_M1
TH2F * h_recNoiseEnergy2_HF3
constexpr int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
TH2F * h_amplitudechannel2_HE1
TH2F * h_mapDepth2TSmeanA225_HB
TH2F * h_mapDepth1ADCAmpl12_HB
TH2F * h_mapDepth1Pedw2_HF
double averNOSIGNALsumamplitude_HF
TH2F * h_mapDepth5Amplitude225_HE
TH2F * h_mapDepth2ADCAmpl12_HB
TH2F * h_map0AiForLS_good_HF
TH2F * h_mapenophinorm2_HE7
TH2F * h_mapDepth2TSmeanA225_HF
TH2F * h_mapDepth5TSmaxA225_HE
TH1F * h_averNOSIGNALoccupancy_HO
TH1F * h_runnbadchannelsC_depth2_HB
TH1F * h_sumphiEta16Depth3RADDAM_HED2ALL
TH2F * h_recNoiseEnergy2_HE7
TH1F * h_sum0ADCAmplperLS8
TH2F * h_mapenophinorm_HE1
TH1F * h_sumAmplitudeperLS1_LSselected
TH2F * h_mapDepth1Pedw0_HF
#define NUMADCS
int orbitNumber() const
Definition: EventBase.h:65
TH2F * h_mapDepth2TSmaxA_HF
TH1F * h_sumCutAmplitudeperLS3
double lsdep_estimator5_HBdepth2_
TH1F * h_sumamplitude_depth3_HE0
bool usecontinuousnumbering_
TH1F * h_AmplitudeHBtest1
TH2F * h_mapDepth3pedestalw_HE
TH1F * h_averNOSIGNALoccupancy_HB
TH1F * h_ADCAmpl_HBCapIdError
TH2F * h_2DsumADCAmplLS3_LSselected
TH1F * h_runnbadchannels_depth2_HE
TH1F * h_sumADCAmplperLSdepth5HEu
TH1F * h_averSIGNALoccupancy_HO
TH1F * h_totalAmplitudeHE
double calibrWidthHFMin_
TH2F * h_mapDepth7TSmaxA225_HE
TH2F * h_mapDepth6TS2_HE
TH1F * h_sumADCAmplLS1copy4
TH2F * h_mapDepth7pedestal_HE
TH1F * h_sumCutADCAmplperLS8
TH1F * h_lsnumber_per_eachLS
TH2F * h_mapADCCalib047_HF
double amplitudechannel0[nsub][ndepth][neta][nphi]
TH2F * h_recNoiseEnergy1_HF2
TH1F * h_Amplitude_forCapIdErrors_HO4
bool isValid() const
Definition: HandleBase.h:70
int flagestimatornormalization_
TH1F * h_orbitNumvsamplitude0_HO
TH2F * h_mapADCAmpl12firstpeak_HE
TH2F * h_mapADCAmplfirstpeak0_HE
TH1F * h_pedestalwaver4_HE
double recSignalEnergy0[nsub][ndepth][neta][nphi]
TH2F * h_recNoiseEnergy2_HE1
TH2F * h_recNoiseEnergy1_HF3
TH2F * h_mapDepth2TSmaxA225_HB
TH1F * h_sumAmplitudeperLS3
TH2F * h_mapDepth4TSmaxA225_HB
TH2F * h_mapDepth6TSmeanA_HE
TH1F * h_sumCutADCAmplperLS6u
TH2F * h_map0AiForLS_bad_HO
double recSignalEnergy1[nsub][ndepth][neta][nphi]
TH1F * h_sumADCAmplperLS1_M2
TH1F * h_sumTSmeanAperLS1_LSselected
double lsdep_estimator1_HBdepth4_
TH1F * h_sumADCAmplperLS3_P1
TH1F * h_sumADCAmplLS1copy3
TH2F * h_mapDepth2Pedw2_HB
TH1F * h_sum0ADCAmplperLSdepth7HEu
TH1F * h_runbadrate_depth3_HE
TH2F * h_mapAiForLS_good_HB
TH1F * h_runbadrate0_depth2_HE
double averNOSIGNALoccupancy_HO
TH1F * h_sigLayer1RADDAM_HE
TH2F * h_mapADCAmpl12secondpeak0_HE
TH1F * h_sumCutADCAmplperLSdepth4HBu
TH1F * h_sumPedestalperLS7
TH2F * h_mapDepth5Error_HE
TH1F * h_shape_bad_channels_HF
double recNoiseEnergy0[nsub][ndepth][neta][nphi]
TH2F * h_mapDepth4TS012_HO
TH1F * h_sum0ADCAmplperLS7
TH2F * h_mapDepth3ADCAmpl225_HE
HcalLogicalMap createMap(const HcalTopology *topo, unsigned int mapIOV=4)
TH2F * h_mapDepth4ADCAmpl12_HO
TH2F * h_mapDepth1AmplE34_HE
TH2F * h_mapAiForLS_good_HO
TH1F * h_bcnbadrate0_depth2_HF
#define M_PI
TH2F * h_mapDepth4AmplE34_HF
TH1F * h_sum0PedestalperLS5
TH2F * h_2D0sumAmplitudeLS5
TH2F * h_mapDepth2TSmaxA225_HF
TH2F * h_mapDepth3Ampl047_HB
TH1F * h_sumCutTSmeanAperLS2
TH1F * h_sumamplitude_depth2_HB1
TH2F * h_mapADCAmplsecondpeak_HE
TH2F * h_mapDepth3pedestalw_HF
float TS_data[100]
TH2F * h_mapDepth2TSmeanA_HE
TH1F * h_sumamplitude_depth1_HE1
double lsdep_estimator4_HEdepth2_
TH2F * h_amplitudechannel2_HB1
TH2F * h_mapDepth1ADCAmpl_HB
TH1F * h_bcnbadrate0_depth2_HB
TH2F * h_2DsumADCAmplEtaPhiLs10
TH2F * h_recSignalEnergy2_HB3
TH1F * h_runnbadchannelsC_depth3_HE
TH2F * h_mapDepth6pedestalw_HE
TH2F * h_mapDepth3TSmeanA_HB
const HcalFrontEndId getHcalFrontEndId(const DetId &)
double sumEstimator0[nsub][ndepth][neta][nphi]
TH2F * h_2DsumAmplitudeLS2
TH2F * h_amplitudechannel1_HE2
TH2F * h_map0AiForLS_good_HO
TH2F * h_2D0sumPedestalLS5
double lsdep_estimator5_HBdepth1_
TH2F * h_mapADCAmpl12firstpeak0_HE
TH2F * h_mapDepth1Error_HE
double sumEstimator2[nsub][ndepth][neta][nphi]
TH2F * h_mapTSmaxCalib047_HF
TH1F * h_sum0TSmeanAperLS4
TH2F * h_mapDepth3pedestal_HF
float getValue() const
Definition: HcalLUTCorr.h:22
TH2F * h_mapDepth3ADCAmpl_HB
TH2F * h_recSignalEnergy2_HF1
TH1F * h_sumADCAmplEtaPhiLs_bbbc
TH1F * h_pedestalwaver4_HF
TH2F * h_recNoiseEnergy2_HE3
TH2F * h_mapADCCalib047_HB
TH2F * h_mapDepth1Amplitude_HE
TH2F * h_mapDepth1ADCAmpl225Copy_HB
TH2F * h_mapDepth2AmplE34_HB
double lsdep_estimator3_HEdepth1_
Definition: DetId.h:17
constexpr int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
TH2F * h_mapDepth1Pedw0_HB
TH2F * h_2D0sumPedestalLS3
TH1F * h_sumAmplitudeperLS4
TH2F * h_2DsumADCAmplEtaPhiLs00
TH1F * h_energyhitNoise_HF
TH2F * h_mapDepth3Error_HF
TH2F * h_amplitudechannel2_HB2
TH2F * h_mapDepth3TSmaxA_HF
TH1F * h_runbadrate_depth2_HB
TH2F * h_2D0sumPedestalLS2
TH1F * h_Amplitude_notCapIdErrors_HE1
TH2F * h_mapADCAmpl11secondpeak0_HE
TH2F * h_recNoiseEnergy0_HE3
TH1F * h_sum0AmplitudeperLS4
constexpr int samples() const
total number of samples in the digi
TH2F * h_mapDepth4TSmaxA_HF
double lsdep_estimator5_HFdepth1_
TH2F * h_2DsumADCAmplEtaPhiLs2
TH2F * h_recNoiseEnergy2_HE4
TH2F * h_mapDepth1Pedw1_HF
TH1F * h_repetedcapid_HB
TH1F * h_eventamplitude_HB
TH1F * h_pedestalwaver9_HB
TH1F * h_sumamplitude_depth2_HF0
TH2F * h_recSignalEnergy0_HE4
~CMTRawAnalyzer() override
TH2F * h_mapenophinorm2_HE5
TH2F * h_mapDepth4Amplitude_HE
TH1F * h_sum0ADCAmplperLS3
TH2F * h_2D0sumAmplitudeLS6
void fillDigiAmplitudeHF(HFDigiCollection::const_iterator &digiItr)
TH2F * h_mapDepth3Amplitude225_HE
TH1F * h_sumamplitude_depth1_HF0
TH1F * h_sum0TSmeanAperLS3
TH1F * h_sumCutADCAmplperLS4
TH2F * h_map0AiForLS_bad_HE
TH1F * h_sumCutADCAmplperLS7u
double lsdep_estimator5_HOdepth4_
TH2F * h_recNoiseEnergy2_HF4
TH1F * h_sumAmplitudeperLS5
TH2F * h_recSignalEnergy0_HE1
TH2F * h_mapDepth2ADCAmpl225Copy_HE
TH2F * h_mapenophinorm_HE4
TH2F * h_mapDepth1Pedw3_HF
TH2F * h_mapDepth2TSmeanA_HB
TH2F * h_mapTSmeanCalib_HB
int flagIterativeMethodCalibrationGroupReco_
TH2F * h_mapDepth7AmplE34_HE
TH2F * h_amplitudechannel1_HB3
void beginRun(const edm::Run &r, const edm::EventSetup &iSetup) override
void beginJob() override
TH2F * h_mapenophinorm_HE6
TH1F * h_nbadchannels_depth1_HE
float getValue() const
Definition: HcalTimeCorr.h:19
TH2F * h_mapDepth3TSmeanA_HF
TH1F * h_sumPedestalperLS2
TH2F * h_mapTSmeanCalib047_HE
TH1F * h_sumTSmaxAperLS1_LSselected
TH1F * h_runbadrateC_depth4_HO
TH1F * h_sumamplitude_depth4_HO1
TH1F * h_runnbadchannels_depth1_HB
TH2F * h_mapDepth3Ampl047_HF
TH1F * h_runnbadchannelsC_depth1_HB
TH1F * h_sum0TSmeanAperLS2
TH2F * h_mapenophinorm_HE7
int adc() const
TH1F * h_bcnbadrate0_depth1_HE
TH1F * h_averNOSIGNALsumamplitude_HF
double sumEstimator6[nsub][ndepth][neta][nphi]
TH2F * h_2DsumADCAmplLS6_LSselected
double lsdep_estimator1_HEdepth6_
TH1F * h_sumCutTSmaxAperLS6
TH2F * h_mapDepth7Error_HE
TH2F * h_2D0sumADCAmplLSdepth4HBu
TH2F * h_recNoiseEnergy1_HE2
TH1F * h_sumCutTSmaxAperLS8
TH2F * h_mapDepth4TSmeanA_HO
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TH1F * h_averSIGNALsumamplitude_HE
TH2F * h_mapRatioCalib047_HF
TH2F * h_mapDepth1TS2_HE
double signal3[ndepth][neta][nphi]
TH1F * h_bcnbadrate0_depth1_HB
const HcalGain * getGain(const HcalGenericDetId &fId) const
TH2F * h_2D0sumAmplitudeLS7
TH1F * h_bcnnbadchannels_depth2_HB
TH2F * h_mapDepth1Pedw2_HB
TH1F * h_sumCutADCAmplperLS1
TH2F * h_mapDepth6TSmaxA225_HE
TH2F * h_mapDepth4pedestalw_HO
TH1F * h_Eta16Depth3RADDAM_HED2
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
TH1F * h_sumamplitude_depth1_HB1
TH2F * h_mapDepth2TSmeanA_HF
double averSIGNALoccupancy_HE
TH2F * h_amplitudechannel2_HF2
double lsdep_estimator1_HEdepth2_
TH2F * h_mapDepth6ADCAmpl_HE
TH2F * h_mapDepth5Amplitude_HE
TH2F * h_mapDepth3TSmaxA225_HF
TH2F * h_mapDepth4Error_HF
TH2F * h_mapDepth1ADCAmpl_HF
TH1F * h_sum0PedestalperLS7
TH1F * h_runnbadchannelsC_depth4_HO
double lsdep_estimator1_HFdepth1_
TH2F * h_mapDepth4pedestalw_HB
TH1F * h_sigLayer1RADDAM5_HE
TH2F * h_mapDepth4pedestalw_HE
int badchannels[nsub][ndepth][neta][nphi]
TH1F * h_sum0ADCAmplperLS1_P1
TH1F * h_eventoccupancy_HO
TH1F * h_orbitNumvsamplitude_HB
TH2F * h_amplitudechannel1_HE7
TH1F * h_shape0_good_channels_HF
TH2F * h_mapRatioCalib047_HO
TH2F * h_mapDepth1ADCAmpl12SiPM_HE
TH1F * h_sumphiEta16Depth3RADDAM_HED2P
constexpr int samples() const
total number of samples in the digi
TH2F * h_2D0sumADCAmplLSdepth5HEu
TH2F * h_mapDepth2pedestal_HF
TH2F * h_mapDepth7TSmaxA_HE
TH2F * h_mapDepth6ADCAmpl225Copy_HE
TH1F * h_repetedcapid_HO
TH1F * h_errorGeneral_HF
TH2F * h_mapDepth3TSmaxA_HB
TH1F * h_RatioOccupancy_HEM
TH1F * h_sumCutAmplitudeperLS6
TH1F * h_bcnnbadchannels_depth1_HF
TH2F * h_recNoiseEnergy2_HB3
TH2F * h_mapDepth1Amplitude225_HB
TH2F * h_2DsumADCAmplLS5_LSselected
TH1F * h_averNOSIGNALsumamplitude_HB
TH2F * h_mapDepth2Pedw2_HE
TH1F * h_sumCutTSmaxAperLS3
TH1F * h_sumPedestalperLS6
TH2F * h_recNoiseEnergy0_HF2
TH2F * h_mapDepth1pedestalw_HE
TH1F * h_bcnnbadchannels_depth1_HE
TH2F * h_2DsumADCAmplLSdepth6HEu
double averNOSIGNALoccupancy_HF
TH2F * h_mapTSmeanCalib_HE
TH2F * h_mapDepth1ADCAmpl225Copy_HE
TH1F * h_totalAmplitudeHF
TH1F * h_sum0TSmeanAperLS1
TH1F * h_averNOSIGNALoccupancy_HE
edm::EDGetTokenT< HFDigiCollection > tok_hf_
TH2F * h_mapDepth2ADCAmpl225_HF
TH1F * h_runbadrateC_depth3_HE
edm::EventID id() const
Definition: EventBase.h:59
TH2F * h_recSignalEnergy2_HB4
double calibrTSmaxHFMin_
double lsdep_estimator5_HEdepth2_
double signal[ndepth][neta][nphi]
TH1F * h_sumADCAmplEtaPhiLs_lscounterM1orbitNum
TH1F * h_RatioOccupancy_HFP
TH1F * h_totalAmplitudeHB
TH2F * h_mapenophinorm_HE3
double lsdep_estimator3_HFdepth2_
float getValue() const
Definition: HcalRespCorr.h:19
TH1F * h_shape_bad_channels_HE
TH2F * h_mapDepth4Ampl047_HE
TH2F * h_mapDepth1Pedw0_HE
TH1F * h_numberofhitsHBtest
TH1F * h_eventamplitude_HE
TH2F * h_mapGetRMSOverNormalizedSignal_HB
TH2F * h_mapDepth1Ampl047_HF
double lsdep_estimator1_HEdepth1_
TH2F * h_mapDepth6TSmeanA225_HE
TH1F * h_averSIGNALoccupancy_HF
TH1F * h_A_Depth3RADDAM_HE
TH1F * h_bcnvsamplitude_HF
TH2F * h_mapDepth3Pedw1_HE
TH2F * h_recSignalEnergy1_HF4
virtual void fillMAP()
TH2F * h_recNoiseEnergy0_HF4
TH1F * h_sigLayer2RADDAM6_HED2
TH1F * h_sumCutTSmeanAperLS6
TH2F * h_mapDepth4Pedw2_HO
TH2F * h_mapDepth6TSmaxA_HE
double calibrTSmeanHEMin_
TH2F * h_mapDepth2ADCAmpl12_HF
double calibrTSmeanHBMin_
TH2F * h_2D0sumAmplitudeLS3
TH2F * h_2DsumADCAmplLS7_LSselected
int mapRADDAM_HED20[ndepth][neta]
TH2F * h_mapDepth2pedestalw_HE
TH1F * h_RatioOccupancy_HBM
TH1F * h_sum0ADCAmplperLSdepth4HEu
long int gsmdepth1sipm[npfit][neta][nphi][ndepth]
TH2F * h_mapDepth2RADDAM0_HE
TH2F * h_mapDepth7Amplitude_HE
TH2F * h_mapDepth1pedestalw_HF
TH1F * h_ADCAmplZoom1_HF
TH1F * h_sumamplitude_depth1_HE0
TH2F * h_mapDepth1pedestal_HF
TH2F * h_mapDepth5pedestal_HE
void fillDigiErrorsHO(HODigiCollection::const_iterator &digiItr)
TH1F * h_A_Depth1RADDAM_HE
TH1F * h_averNOSIGNALoccupancy_HF
TH1F * h_sumamplitude_depth1_HF
TH1F * h_runbadrate0_depth1_HE
const HcalElectronicsMap * getHcalMapping() const
TH2F * h_mapenophinorm2_HE4
TH1F * h_sum0ADCAmplperLS8_M1
TH2F * h_2DsumADCAmplLS2_LSselected
TH2F * h_mapDepth3TSmeanA225_HB
TH2F * h_mapDepth4pedestal_HF
TH1F * h_sum0AmplitudeperLS6
double lsdep_estimator2_HBdepth2_
TH2F * h_mapDepth2pedestalw_HB
TH2F * h_2DsumADCAmplEtaPhiLs30
TH2F * h_mapDepth6Ampl047_HE
TH1F * h_sum0ADCAmplperLS6u
TH2F * h_mapDepth4ADCAmpl225_HE
double calibrTSmaxHBMax_
TH2F * h_recNoiseEnergy2_HB2
edm::EDGetTokenT< HODigiCollection > tok_ho_
TH2F * h_mapAiForLS_bad_HO
TH1F * h_bcnbadrate0_depth3_HE
TH1F * h_sumADCAmplEtaPhiLs_orbitNum
TH2F * h_mapDepth3TS1_HF
TH1F * h_AmplitudeHBtest6
TH2F * h_mapDepth4TSmaxA225_HE
TH2F * h_recNoiseEnergy2_HB4
TH2F * h_mapADCAmplsecondpeak0_HE
TH2F * h_mapDepth2ADCAmpl225Copy_HF
TH1F * h_gsmdifferencefit2_HE
TH1F * h_averSIGNALsumamplitude_HB
double calibrTSmaxHFMax_
TH1F * h_sumCutAmplitudeperLS2
TH2F * h_mapDepth2Ampl047_HF
TH1F * h_sum0ADCAmplperLS4
TH2F * h_mapDepth3ADCAmplSiPM_HE
TH1F * h_ADCAmpl345_HBCapIdError
void fillDigiErrorsHFQIE10(QIE10DataFrame qie10df)
TH1F * h_bcnnbadchannels_depth2_HE
void endRun(const edm::Run &r, const edm::EventSetup &iSetup) override
double calibrTSmeanHBMax_
TH2F * h_mapDepth2ADCAmpl_HE
TH1F * h_AmplitudeHFtest
TH2F * h_mapDepth3AmplE34_HF
TH2F * h_mapDepth4ADCAmpl225Copy_HE
TH2F * h_mapDepth2TS2_HE
TH1F * h_sumADCAmplEtaPhiLs_bbb1
TH2F * h_mapDepth1pedestal_HE
TH1F * h_sumAmplitudeperLS2
TH2F * h_amplitudechannel1_HE3
TH1F * h_AamplitudewithPedSubtr_RADDAM_HE
TH1F * h_bcnnbadchannels_depth3_HE
tuple cout
Definition: gather_cfg.py:144
TH2F * h_mapDepth1TSmeanA_HF
double lsdep_estimator3_HEdepth3_
TH1F * h_gsmdifferencefit6_HE
TH1F * h_ADCAmplrest6_HF
const int ndepth
double lsdep_estimator4_HEdepth1_
TH1F * h_repetedcapid_HE
TH1F * h_sumCutAmplitudeperLS5
TH1F * h_sum0ADCAmplperLS1_M2
TH1F * h_AamplitudewithPedSubtr_RADDAM_HEzoom1
double averNOSIGNALsumamplitude_HE
TH1F * h_sigLayer2RADDAM0_HE
TH1F * h_sumamplitudechannel_HO
TH1F * h_sumAmplitudeperLS7
TH2F * h_recSignalEnergy1_HF1
TH1F * h_sum0ADCAmplperLS1_M1
TH2F * h_mapDepth1TSmaxA225_HB
TH1F * h_orbitNumvsamplitude0_HB
TH2F * h_mapDepth2ADCAmpl12_HE
double recNoiseEnergy1[nsub][ndepth][neta][nphi]
TH2F * h_recNoiseEnergy1_HE7
double sumEstimator4[nsub][ndepth][neta][nphi]
double calibrRatioHBMax_
TH2F * h_mapDepth2Pedw0_HB
double calibrWidthHFMax_
double averSIGNALsumamplitude_HB
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
TH2F * h_amplitudechannel2_HE4
TH1F * h_sumCutTSmaxAperLS7
double averSIGNALsumamplitude_HF
TH2F * h_mapTSmeanCalib_HO
TH2F * h_mapDepth2AmplE34_HF
int rmFiber() const
void fillDigiAmplitudeHFQIE10(QIE10DataFrame qie10df)
TH1F * h_eventamplitude_HF
TH1F * h_sum0ADCAmplperLSdepth6HEu
TH2F * h_mapDepth3pedestal_HE
TH1F * h_numberofhitsHOtest
TH1F * h_sumamplitude_depth2_HF1
TH1F * h_totalAmplitudeHFperEvent
TH1F * h_orbitNumvsamplitude_HO
TH2F * h_mapDepth3ADCAmpl_HE
TH1F * h_totalAmplitudeHBperEvent
TH2F * h_2DsumAmplitudeLS7
TH2F * h_mapGetRMSOverNormalizedSignal0_HB
TH2F * h_mapDepth1ADCAmpl225Copy_HF
TH2F * h_recSignalEnergy2_HB1
TH2F * h_mapenophinorm2_HE3
TH2F * h_mapDepth1TS1_HF
TH2F * h_recSignalEnergy2_HE1
double lsdep_estimator5_HEdepth3_
TH2F * h_recSignalEnergy0_HB4
double const adc2fC_QIE11_shunt1[256]
int qieCard() const
TH1F * h_runbadrate0_depth1_HB
TH1F * h_sum0AmplitudeperLS7
TH2F * h_mapDepth4ADCAmpl_HF
TH2F * h_mapDepth3linADCAmpl12_HE
TH2F * h_recSignalEnergy0_HE5
tmp
align.sh
Definition: createJobs.py:716
TH1F * h_shape_good_channels_HB
TH2F * h_map0AiForLS_good_HE
double calibrRatioHEMax_
double calibrWidthHBMin_
TH2F * h_recSignalEnergy0_HE7
TH1F * h_nevents_per_eachRealLS
double lsdep_estimator1_HEdepth7_
const HcalPedestal * getPedestal(const HcalGenericDetId &fId) const
TH1F * h_amplitudeaveragedbydepthes_HE
TH1F * h_sumADCAmplperLS3_P2
TH2F * h_mapDepth4Amplitude_HB
TH2F * h_mapRatioCalib047_HB
TH2F * h_mapDepth1ADCAmpl_HE
TH1F * h_shape0_bad_channels_HE
TH1F * h_shape0_bad_channels_HO
TH2F * h_amplitudechannel1_HF2
TH2F * h_mapDepth2Pedw0_HE
TH2F * h_2D0sumADCAmplLSdepth7HEu
TH2F * h_mapDepth6Error_HE
TH1F * h_sumADCAmplperLSdepth4HEu
TH2F * h_2D0sumADCAmplLSdepth4HEu
TH1F * h_sumPedestalperLS5
TH2F * h_mapDepth1Amplitude225_HF
TH1F * h_sumCutTSmaxAperLS5
TH2F * h_mapDepth3ADCAmpl12SiPM_HE
TH2F * h_mapTSmaxCalib047_HO
TH1F * h_sigLayer2RADDAM5_HE
double calibrTSmeanHFMax_
TH2F * h_amplitudechannel0_HB2
TH2F * h_mapDepth4TSmeanA225_HF
TH2F * h_mapDepth4TSmaxA_HE
TH2F * h_mapGetRMSOverNormalizedSignal0_HF
double averSIGNALsumamplitude_HE
TH2F * h_mapDepth4ADCAmpl225_HO
TH2F * h_2DsumADCAmplLSdepth7HEu
TH2F * h_mapDepth3Pedw0_HE
Readout chain identification for Hcal.
TH1F * h_sumADCAmplperLS6_M2
TH1F * h_bcnvsamplitude0_HE
TH1F * h_sum0TSmeanAperLS5
TH1F * h_bcnbadrate0_depth2_HE
TH2F * h_mapAiForLS_bad_HB
TH2F * h_mapDepth2Pedw1_HF
TH2F * h_mapDepth1RADDAM_HE
TH1F * h_NphiForEta16Depth3RADDAM_HED2
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
TH2F * h_mapDepth4TSmeanA225_HO
TH2F * h_recNoiseEnergy2_HF2
TH1F * h_sumCutTSmaxAperLS4
TH2F * h_mapDepth4TSmaxA225_HO
TH1F * h_Amplitude_notCapIdErrors_HE2
TH2F * h_mapDepth5ADCAmpl225Copy_HE
TH2F * h_mapDepth7ADCAmpl12_HE
TH1F * h_gsmdifferencefit1_HE
TH2F * h_recNoiseEnergy0_HE1
TH2F * h_mapenophinorm2_HE2
double calibrWidthHOMax_
TH2F * h_mapDepth1ADCAmplSiPM_HE
TH1F * h_ADCAmplZoom1_HB
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
TH1F * h_sum0PedestalperLS2
TH2F * h_mapDepth3AmplE34_HB
TH2F * h_2D0sumAmplitudeLS4
TH1F * h_sumADCAmplEtaPhiLs_lscounterM1
TH2F * h_mapDepth6AmplE34_HE
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
TH1F * h_sum0TSmeanAperLS8
TH2F * h_mapDepth1TSmeanA_HE
TH2F * h_mapDepth3ADCAmpl225Copy_HB
TH2F * h_recNoiseEnergy1_HE4
TH2F * h_mapenophinorm2_HE6
TH1F * h_runbadrateC_depth1_HB
TH2F * h_amplitudechannel1_HE1
TH1F * h_shape_bad_channels_HB
double calibrRatioHFMin_
TH1F * h_Amplitude_notCapIdErrors_HF1
double averSIGNALoccupancy_HF
TH2F * h_mapDepth3AmplE34_HE
TH2F * h_recNoiseEnergy2_HE2
static constexpr float b1
TH2F * h_mapDepth3TSmeanA_HE
const edm::ESGetToken< HcalDbService, HcalDbRecord > tokDB_
TH2F * h_mapDepth4pedestal_HO
TH2F * h_mapDepth4TSmeanA_HE
Definition: Run.h:45
void endJob() override
TH2F * h_mapDepth1Amplitude_HB
double dR(double eta1, double phi1, double eta2, double phi2)
uint16_t *__restrict__ uint16_t const *__restrict__ adc
TH1F * h_sumPedestalperLS8
TH2F * h_mapDepth4Amplitude225_HE
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
TH2F * h_recSignalEnergy2_HE5
TH1F * h_orbitNumvsamplitude_HE
TH1F * h_sumADCAmplperLSdepth7HEu
double recNoiseEnergy2[nsub][ndepth][neta][nphi]
TH2F * h_mapDepth3RADDAM0_HE
TH2F * h_mapDepth2pedestal_HE
void fillDigiAmplitude(HBHEDigiCollection::const_iterator &digiItr)
TH2F * h_amplitudechannel0_HE5
TH1F * h_averSIGNALoccupancy_HE
TH1F * h_runnbadchannels_depth2_HF
TH2F * h_2DsumADCAmplLSdepth4HFu
TH1F * h_bcnvsamplitude0_HO
TH1F * h_sumCutADCAmplperLSdepth5HEu
TH1F * h_nbadchannels_depth1_HF
TH2F * h_recSignalEnergy0_HE3
TH2F * h_map0AiForLS_good_HB
TH2F * h_mapRatioCalib047_HE
TH2F * h_amplitudechannel2_HE2
TH2F * h_mapDepth3TSmaxA_HE
constexpr DetId detid() const
Get the detector id.
TH1F * h_sumCutADCAmplperLS7
TH1F * h_sumCutAmplitudeperLS4
bool studyPedestalCorrelations_