CMS 3D CMS Logo

CMTRawAnalyzer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CMTRawAnalyzer
4 //
5 #include <fstream>
6 #include <iostream>
7 #include <cmath>
8 #include <iosfwd>
9 #include <bitset>
10 #include <memory>
60 #include "TFile.h"
61 #include "TTree.h"
62 #include "TH1.h"
63 #include "TH2.h"
64 #include "TF1.h"
65 
66 #define NUMADCS 256
67 double const adc2fC_QIE10[NUMADCS] = {
68  //subrange0
69  1.58,
70  4.73,
71  7.88,
72  11.0,
73  14.2,
74  17.3,
75  20.5,
76  23.6,
77  26.8,
78  29.9,
79  33.1,
80  36.2,
81  39.4,
82  42.5,
83  45.7,
84  48.8,
85  //subrange1
86  53.6,
87  60.1,
88  66.6,
89  73.0,
90  79.5,
91  86.0,
92  92.5,
93  98.9,
94  105,
95  112,
96  118,
97  125,
98  131,
99  138,
100  144,
101  151,
102  //subrange2
103  157,
104  164,
105  170,
106  177,
107  186,
108  199,
109  212,
110  225,
111  238,
112  251,
113  264,
114  277,
115  289,
116  302,
117  315,
118  328,
119  //subrange3
120  341,
121  354,
122  367,
123  380,
124  393,
125  406,
126  418,
127  431,
128  444,
129  464,
130  490,
131  516,
132  542,
133  568,
134  594,
135  620,
136 
137  // - - - - - - - range 1 - - - - - - - -
138  //subrange0
139  569,
140  594,
141  619,
142  645,
143  670,
144  695,
145  720,
146  745,
147  771,
148  796,
149  821,
150  846,
151  871,
152  897,
153  922,
154  947,
155  //subrange1
156  960,
157  1010,
158  1060,
159  1120,
160  1170,
161  1220,
162  1270,
163  1320,
164  1370,
165  1430,
166  1480,
167  1530,
168  1580,
169  1630,
170  1690,
171  1740,
172  //subrange2
173  1790,
174  1840,
175  1890,
176  1940,
177  2020,
178  2120,
179  2230,
180  2330,
181  2430,
182  2540,
183  2640,
184  2740,
185  2850,
186  2950,
187  3050,
188  3150,
189  //subrange3
190  3260,
191  3360,
192  3460,
193  3570,
194  3670,
195  3770,
196  3880,
197  3980,
198  4080,
199  4240,
200  4450,
201  4650,
202  4860,
203  5070,
204  5280,
205  5490,
206 
207  // - - - - - - - range 2 - - - - - - - -
208  //subrange0
209  5080,
210  5280,
211  5480,
212  5680,
213  5880,
214  6080,
215  6280,
216  6480,
217  6680,
218  6890,
219  7090,
220  7290,
221  7490,
222  7690,
223  7890,
224  8090,
225  //subrange1
226  8400,
227  8810,
228  9220,
229  9630,
230  10000,
231  10400,
232  10900,
233  11300,
234  11700,
235  12100,
236  12500,
237  12900,
238  13300,
239  13700,
240  14100,
241  14500,
242  //subrange2
243  15000,
244  15400,
245  15800,
246  16200,
247  16800,
248  17600,
249  18400,
250  19300,
251  20100,
252  20900,
253  21700,
254  22500,
255  23400,
256  24200,
257  25000,
258  25800,
259  //subrange3
260  26600,
261  27500,
262  28300,
263  29100,
264  29900,
265  30700,
266  31600,
267  32400,
268  33200,
269  34400,
270  36100,
271  37700,
272  39400,
273  41000,
274  42700,
275  44300,
276 
277  // - - - - - - - range 3 - - - - - - - - -
278  //subrange0
279  41100,
280  42700,
281  44300,
282  45900,
283  47600,
284  49200,
285  50800,
286  52500,
287  54100,
288  55700,
289  57400,
290  59000,
291  60600,
292  62200,
293  63900,
294  65500,
295  //subrange1
296  68000,
297  71300,
298  74700,
299  78000,
300  81400,
301  84700,
302  88000,
303  91400,
304  94700,
305  98100,
306  101000,
307  105000,
308  108000,
309  111000,
310  115000,
311  118000,
312  //subrange2
313  121000,
314  125000,
315  128000,
316  131000,
317  137000,
318  145000,
319  152000,
320  160000,
321  168000,
322  176000,
323  183000,
324  191000,
325  199000,
326  206000,
327  214000,
328  222000,
329  //subrange3
330  230000,
331  237000,
332  245000,
333  253000,
334  261000,
335  268000,
336  276000,
337  284000,
338  291000,
339  302000,
340  316000,
341  329000,
342  343000,
343  356000,
344  370000,
345  384000
346 
347 };
348 
349 //shunt1
350 double const adc2fC_QIE11_shunt1[NUMADCS] = {
351  1.89, 5.07, 8.25, 11.43, 14.61, 17.78, 20.96, 24.14, 27.32, 30.50, 33.68,
352  36.86, 40.04, 43.22, 46.40, 49.58, 54.35, 60.71, 67.07, 73.43, 79.79, 86.15,
353  92.51, 98.87, 105.2, 111.6, 117.9, 124.3, 130.7, 137.0, 143.4, 149.7, 156.1,
354  162.5, 168.8, 175.2, 184.7, 197.4, 210.2, 222.9, 235.6, 248.3, 261.0, 273.7,
355  286.5, 299.2, 311.9, 324.6, 337.3, 350.1, 362.8, 375.5, 388.2, 400.9, 413.6,
356  426.4, 439.1, 458.2, 483.6, 509.0, 534.5, 559.9, 585.3, 610.8, 558.9, 584.2,
357  609.5, 634.7, 660.0, 685.3, 710.6, 735.9, 761.2, 786.5, 811.8, 837.1, 862.4,
358  887.7, 913.0, 938.3, 976.2, 1026.8, 1077.4, 1128.0, 1178.6, 1229.1, 1279.7, 1330.3,
359  1380.9, 1431.5, 1482.1, 1532.7, 1583.3, 1633.8, 1684.4, 1735.0, 1785.6, 1836.2, 1886.8,
360  1937.4, 2013.2, 2114.4, 2215.6, 2316.8, 2417.9, 2519.1, 2620.3, 2721.5, 2822.6, 2923.8,
361  3025.0, 3126.2, 3227.3, 3328.5, 3429.7, 3530.9, 3632.0, 3733.2, 3834.4, 3935.5, 4036.7,
362  4188.5, 4390.8, 4593.2, 4795.5, 4997.9, 5200.2, 5402.6, 5057.5, 5262.3, 5467.1, 5671.8,
363  5876.6, 6081.4, 6286.2, 6491.0, 6695.8, 6900.6, 7105.3, 7310.1, 7514.9, 7719.7, 7924.5,
364  8129.3, 8436.4, 8846.0, 9255.6, 9665.1, 10074.7, 10484.3, 10893.9, 11303.4, 11713.0, 12122.6,
365  12532.1, 12941.7, 13351.3, 13760.8, 14170.4, 14580.0, 14989.5, 15399.1, 15808.7, 16218.2, 16832.6,
366  17651.7, 18470.9, 19290.0, 20109.2, 20928.3, 21747.4, 22566.6, 23385.7, 24204.8, 25024.0, 25843.1,
367  26662.3, 27481.4, 28300.5, 29119.7, 29938.8, 30757.9, 31577.1, 32396.2, 33215.4, 34444.1, 36082.3,
368  37720.6, 39358.9, 40997.2, 42635.4, 44273.7, 40908.7, 42542.6, 44176.5, 45810.4, 47444.3, 49078.3,
369  50712.2, 52346.1, 53980.0, 55613.9, 57247.8, 58881.8, 60515.7, 62149.6, 63783.5, 65417.4, 67868.3,
370  71136.1, 74404.0, 77671.8, 80939.7, 84207.5, 87475.3, 90743.2, 94011.0, 97278.8, 100546.7, 103814.5,
371  107082.3, 110350.2, 113618.0, 116885.8, 120153.7, 123421.5, 126689.3, 129957.2, 134858.9, 141394.6, 147930.3,
372  154465.9, 161001.6, 167537.3, 174072.9, 180608.6, 187144.3, 193679.9, 200215.6, 206751.3, 213287.0, 219822.6,
373  226358.3, 232894.0, 239429.6, 245965.3, 252501.0, 259036.6, 265572.3, 275375.8, 288447.2, 301518.5, 314589.8,
374  327661.2, 340732.5, 353803.8};
375 //shunt6
376 double const adc2fC_QIE11_shunt6[NUMADCS] = {
377  9.56, 28.24, 46.91, 65.59, 84.27, 102.9, 121.6, 140.3, 159.0, 177.7,
378  196.3, 215.0, 233.7, 252.4, 271.0, 289.7, 317.7, 355.1, 392.4, 429.8,
379  467.1, 504.5, 541.9, 579.2, 616.6, 653.9, 691.3, 728.6, 766.0, 803.3,
380  840.7, 878.0, 915.4, 952.8, 990.1, 1027.5, 1083.5, 1158.2, 1232.9, 1307.6,
381  1382.3, 1457.0, 1531.7, 1606.4, 1681.2, 1755.9, 1830.6, 1905.3, 1980.0, 2054.7,
382  2129.4, 2204.1, 2278.8, 2353.5, 2428.2, 2502.9, 2577.7, 2689.7, 2839.1, 2988.6,
383  3138.0, 3287.4, 3436.8, 3586.2, 3263.0, 3411.3, 3559.6, 3707.9, 3856.2, 4004.5,
384  4152.9, 4301.2, 4449.5, 4597.8, 4746.1, 4894.4, 5042.7, 5191.0, 5339.4, 5487.7,
385  5710.1, 6006.8, 6303.4, 6600.0, 6896.6, 7193.3, 7489.9, 7786.5, 8083.1, 8379.8,
386  8676.4, 8973.0, 9269.6, 9566.3, 9862.9, 10159.5, 10456.2, 10752.8, 11049.4, 11346.0,
387  11791.0, 12384.2, 12977.5, 13570.7, 14164.0, 14757.2, 15350.5, 15943.7, 16537.0, 17130.2,
388  17723.5, 18316.7, 18910.0, 19503.2, 20096.5, 20689.7, 21283.0, 21876.2, 22469.5, 23062.8,
389  23656.0, 24545.9, 25732.4, 26918.9, 28105.4, 29291.9, 30478.4, 31664.9, 29399.4, 30590.1,
390  31780.9, 32971.7, 34162.4, 35353.2, 36544.0, 37734.7, 38925.5, 40116.3, 41307.0, 42497.8,
391  43688.5, 44879.3, 46070.1, 47260.8, 49047.0, 51428.5, 53810.1, 56191.6, 58573.1, 60954.6,
392  63336.2, 65717.7, 68099.2, 70480.8, 72862.3, 75243.8, 77625.4, 80006.9, 82388.4, 84769.9,
393  87151.5, 89533.0, 91914.5, 94296.1, 97868.4, 102631.4, 107394.5, 112157.5, 116920.6, 121683.7,
394  126446.7, 131209.8, 135972.8, 140735.9, 145499.0, 150262.0, 155025.1, 159788.2, 164551.2, 169314.3,
395  174077.3, 178840.4, 183603.5, 188366.5, 193129.6, 200274.2, 209800.3, 219326.4, 228852.5, 238378.7,
396  247904.8, 257430.9, 237822.7, 247326.7, 256830.7, 266334.8, 275838.8, 285342.9, 294846.9, 304351.0,
397  313855.0, 323359.1, 332863.1, 342367.1, 351871.2, 361375.2, 370879.3, 380383.3, 394639.4, 413647.5,
398  432655.6, 451663.6, 470671.7, 489679.8, 508687.9, 527696.0, 546704.1, 565712.2, 584720.3, 603728.3,
399  622736.4, 641744.5, 660752.6, 679760.7, 698768.8, 717776.9, 736785.0, 755793.0, 784305.2, 822321.3,
400  860337.5, 898353.7, 936369.9, 974386.0, 1012402.2, 1050418.4, 1088434.6, 1126450.7, 1164466.9, 1202483.1,
401  1240499.3, 1278515.4, 1316531.6, 1354547.8, 1392564.0, 1430580.1, 1468596.3, 1506612.5, 1544628.7, 1601652.9,
402  1677685.3, 1753717.6, 1829750.0, 1905782.3, 1981814.7, 2057847.0};
403 // for HPD:
404 static const float adc2fC[128] = {
405  -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,
406  12.5, 13.5, 15., 17., 19., 21., 23., 25., 27., 29.5, 32.5, 35.5, 38.5,
407  42., 46., 50., 54.5, 59.5, 64.5, 59.5, 64.5, 69.5, 74.5, 79.5, 84.5, 89.5,
408  94.5, 99.5, 104.5, 109.5, 114.5, 119.5, 124.5, 129.5, 137., 147., 157., 167., 177.,
409  187., 197., 209.5, 224.5, 239.5, 254.5, 272., 292., 312., 334.5, 359.5, 384.5, 359.5,
410  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,
411  709.5, 747., 797., 847., 897., 947., 997., 1047., 1109.5, 1184.5, 1259.5, 1334.5, 1422.,
412  1522., 1622., 1734.5, 1859.5, 1984.5, 1859.5, 1984.5, 2109.5, 2234.5, 2359.5, 2484.5, 2609.5, 2734.5,
413  2859.5, 2984.5, 3109.5, 3234.5, 3359.5, 3484.5, 3609.5, 3797., 4047., 4297., 4547., 4797., 5047.,
414  5297., 5609.5, 5984.5, 6359.5, 6734.5, 7172., 7672., 8172., 8734.5, 9359.5, 9984.5};
415 const int nsub = 4;
416 const int ndepth = 7;
417 const int neta = 82;
418 const int nphi = 72;
419 const float bphi = 72.;
420 const int zneta = 22;
421 const int znphi = 18;
422 const int npfit = 220;
423 const float anpfit = 220.; // for SiPM:
424 
425 //
426 class CMTRawAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
427 public:
428  explicit CMTRawAnalyzer(const edm::ParameterSet&);
429  ~CMTRawAnalyzer() override;
430  void beginJob() override;
431  void analyze(const edm::Event&, const edm::EventSetup&) override;
432  void endJob() override;
433  void beginRun(const edm::Run& r, const edm::EventSetup& iSetup) override;
434  void endRun(const edm::Run& r, const edm::EventSetup& iSetup) override;
435  virtual void fillMAP();
436 
437 private:
438  double phi12(double phi1, double en1, double phi2, double en2);
439  double dR(double eta1, double phi1, double eta2, double phi2);
440  double dPhiWsign(double phi1, double phi2);
441 
452 
480  bool useADCfC_;
484  double ratioHBMin_;
485  double ratioHBMax_;
486  double ratioHEMin_;
487  double ratioHEMax_;
488  double ratioHFMin_;
489  double ratioHFMax_;
490  double ratioHOMin_;
491  double ratioHOMax_;
518  //
543 
552 
561 
570 
581  double rmsHBMin_;
582  double rmsHBMax_;
583  double rmsHEMin_;
584  double rmsHEMax_;
585  double rmsHFMin_;
586  double rmsHFMax_;
587  double rmsHOMin_;
588  double rmsHOMax_;
590  double TSpeakHBMin_;
591  double TSpeakHBMax_;
592  double TSpeakHEMin_;
593  double TSpeakHEMax_;
594  double TSpeakHFMin_;
595  double TSpeakHFMax_;
596  double TSpeakHOMin_;
597  double TSpeakHOMax_;
598  double TSmeanHBMin_;
599  double TSmeanHBMax_;
600  double TSmeanHEMin_;
601  double TSmeanHEMax_;
602  double TSmeanHFMin_;
603  double TSmeanHFMax_;
604  double TSmeanHOMin_;
605  double TSmeanHOMax_;
606  int lsmin_;
607  int lsmax_;
658  int nevent;
659  int nevent50;
660  int nnnnnn;
666  int nnnnnn1;
667  int nnnnnn2;
668  int nnnnnn3;
669  int nnnnnn4;
670  int nnnnnn5;
671  int nnnnnn6;
751  TH1F* h_error1;
752  TH1F* h_error2;
753  TH1F* h_error3;
754  TH1F* h_amplError;
755  TH1F* h_amplFine;
757  TH1F* h_error1_HB;
758  TH1F* h_error2_HB;
759  TH1F* h_error3_HB;
760  TH1F* h_error4_HB;
761  TH1F* h_error5_HB;
762  TH1F* h_error6_HB;
763  TH1F* h_error7_HB;
770  TH1F* h_fiber0_HB;
771  TH1F* h_fiber1_HB;
772  TH1F* h_fiber2_HB;
775  TH1F* h_error1_HE;
776  TH1F* h_error2_HE;
777  TH1F* h_error3_HE;
778  TH1F* h_error4_HE;
779  TH1F* h_error5_HE;
780  TH1F* h_error6_HE;
781  TH1F* h_error7_HE;
791  TH1F* h_fiber0_HE;
792  TH1F* h_fiber1_HE;
793  TH1F* h_fiber2_HE;
796  TH1F* h_error1_HF;
797  TH1F* h_error2_HF;
798  TH1F* h_error3_HF;
799  TH1F* h_error4_HF;
800  TH1F* h_error5_HF;
801  TH1F* h_error6_HF;
802  TH1F* h_error7_HF;
809  TH1F* h_fiber0_HF;
810  TH1F* h_fiber1_HF;
811  TH1F* h_fiber2_HF;
814  TH1F* h_error1_HO;
815  TH1F* h_error2_HO;
816  TH1F* h_error3_HO;
817  TH1F* h_error4_HO;
818  TH1F* h_error5_HO;
819  TH1F* h_error6_HO;
820  TH1F* h_error7_HO;
824  TH1F* h_fiber0_HO;
825  TH1F* h_fiber1_HO;
826  TH1F* h_fiber2_HO;
878  TH1F* h_TSmaxA_HB;
896  TH1F* h_Ampl_HB;
935 
952 
975  TH1F* h_TSmaxA_HF;
993  TH1F* h_Ampl_HF;
1027  TH1F* h_Ampl_HO;
1203  TH1F* h_Ampl_HE;
1260  TH2F* h_map_HB;
1277  TH2F* h_map_HE;
1294  TH2F* h_map_HO;
1311  TH2F* h_map_HF;
1777  TH1F* h_gain_HB;
1786  TH1F* h_gain_HE;
1791  TH1F* h_gain_HF;
1796  TH1F* h_gain_HO;
2072  // phy-symmetry, phi-symmetry:
2073  // Reco:
2080  //HB:
2105  //HE:
2148  //HF:
2161 
2174 
2220 
2267 
2270  double caliba[ndepth][neta][nphi];
2271  double calibw[ndepth][neta][nphi];
2272  double calib0[ndepth][neta][nphi];
2273  double signal[ndepth][neta][nphi];
2274  double calib3[ndepth][neta][nphi];
2276  double calib2[ndepth][neta][nphi];
2286 
2287  // phi-symmetry monitoring for calibration group:
2293 
2297 
2301 
2302  float TS_data[100];
2303  float TS_cal[100];
2311  long int Nevent;
2312  int Run;
2313  int run0;
2316  long int orbitNum;
2317  int bcn;
2318  int lumi;
2319  int ls0;
2344  double maxxSUM1;
2345  double maxxSUM2;
2346  double maxxSUM3;
2347  double maxxSUM4;
2348  double maxxOCCUP1;
2349  double maxxOCCUP2;
2350  double maxxOCCUP3;
2351  double maxxOCCUP4;
2352  TTree* myTree;
2353  TFile* hOutputFile;
2354  std::ofstream MAPfile;
2356  // Get RBX number from 1-35 for Calibration box
2357  int getRBX(int& i, int& j, int& k);
2361  // upgrade:
2362  void fillDigiErrorsHFQIE10(QIE10DataFrame qie10df);
2363  void fillDigiErrorsQIE11(QIE11DataFrame qie11df);
2367  // upgrade:
2369  void fillDigiAmplitudeQIE11(QIE11DataFrame qie11df);
2372  int numOfTS;
2375  float alsmin;
2376  float blsmax;
2378 };
2379 
2380 //
2382 //
2384  if (verbosity > 0)
2385  std::cout << "============== endJob ===================================" << std::endl;
2386 
2387  std::cout << " --------------------------------------- " << std::endl;
2388  std::cout << " for Run = " << run0 << " with runcounter = " << runcounter << " #ev = " << eventcounter << std::endl;
2389  std::cout << " #LS = " << lscounterrun << " #LS10 = " << lscounterrun10 << " Last LS = " << ls0 << std::endl;
2390  std::cout << " --------------------------------------------- " << std::endl;
2391  h_nls_per_run->Fill(float(lscounterrun));
2392  h_nls_per_run10->Fill(float(lscounterrun10));
2393 
2395  std::cout << "===== full number of events = " << nevent << std::endl;
2396  std::cout << "===== possible max number of events in ntuple(each 50th recorded) = " << nevent50 << std::endl;
2397  std::cout << "===== but limited by maxNeventsInNtuple = " << maxNeventsInNtuple_ << std::endl;
2398  std::cout << "===== full number of events*HBHEdigis and qie11 = " << nnnnnnhbhe << " and " << nnnnnnhbheqie11
2399  << std::endl;
2400  std::cout << "===== full number of events*HBHEdigis = " << nnnnnn << std::endl;
2401  std::cout << "===== full number of events*HFdigis and qie10 = " << counterhf << " and " << counterhfqie10
2402  << std::endl;
2403  std::cout << "===== full number of events*HOdigis = " << counterho << std::endl;
2404 
2405  std::cout << "===== Start writing user histograms =====" << std::endl;
2408 }
2409 //
2410 
2411 //
2412 //
2415  usesResource(TFileService::kSharedResource);
2416  verbosity = iConfig.getUntrackedParameter<int>("Verbosity");
2417  MAPcreation = iConfig.getUntrackedParameter<int>("MapCreation");
2418  recordNtuples_ = iConfig.getUntrackedParameter<bool>("recordNtuples");
2419  maxNeventsInNtuple_ = iConfig.getParameter<int>("maxNeventsInNtuple");
2420  tok_calib_ = consumes<HcalCalibDigiCollection>(iConfig.getParameter<edm::InputTag>("hcalCalibDigiCollectionTag")); //
2421  tok_hbhe_ = consumes<HBHEDigiCollection>(iConfig.getParameter<edm::InputTag>("hbheDigiCollectionTag"));
2422  tok_ho_ = consumes<HODigiCollection>(iConfig.getParameter<edm::InputTag>("hoDigiCollectionTag"));
2423  tok_hf_ = consumes<HFDigiCollection>(iConfig.getParameter<edm::InputTag>("hfDigiCollectionTag")); //
2424  tok_qie11_ = consumes<QIE11DigiCollection>(iConfig.getParameter<edm::InputTag>("hbheQIE11DigiCollectionTag"));
2425  tok_qie10_ = consumes<QIE10DigiCollection>(iConfig.getParameter<edm::InputTag>("hbheQIE10DigiCollectionTag"));
2426  // phi-symmetry monitoring for calibration group:
2427  tok_hbheSignal_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputSignalTag"));
2428  tok_hbheNoise_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputNoiseTag"));
2429  tok_hfSignal_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputSignalTag"));
2430  tok_hfNoise_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputNoiseTag"));
2431  recordHistoes_ = iConfig.getUntrackedParameter<bool>("recordHistoes");
2432  studyRunDependenceHist_ = iConfig.getUntrackedParameter<bool>("studyRunDependenceHist");
2433  studyCapIDErrorsHist_ = iConfig.getUntrackedParameter<bool>("studyCapIDErrorsHist");
2434  studyRMSshapeHist_ = iConfig.getUntrackedParameter<bool>("studyRMSshapeHist");
2435  studyRatioShapeHist_ = iConfig.getUntrackedParameter<bool>("studyRatioShapeHist");
2436  studyTSmaxShapeHist_ = iConfig.getUntrackedParameter<bool>("studyTSmaxShapeHist");
2437  studyTSmeanShapeHist_ = iConfig.getUntrackedParameter<bool>("studyTSmeanShapeHist");
2438  studyDiffAmplHist_ = iConfig.getUntrackedParameter<bool>("studyDiffAmplHist");
2439  studyCalibCellsHist_ = iConfig.getUntrackedParameter<bool>("studyCalibCellsHist");
2440  studyADCAmplHist_ = iConfig.getUntrackedParameter<bool>("studyADCAmplHist");
2441  studyPedestalsHist_ = iConfig.getUntrackedParameter<bool>("studyPedestalsHist");
2442  studyPedestalCorrelations_ = iConfig.getUntrackedParameter<bool>("studyPedestalCorrelations");
2443  useADCmassive_ = iConfig.getUntrackedParameter<bool>("useADCmassive");
2444  useADCfC_ = iConfig.getUntrackedParameter<bool>("useADCfC");
2445  useADCcounts_ = iConfig.getUntrackedParameter<bool>("useADCcounts");
2446  usePedestalSubtraction_ = iConfig.getUntrackedParameter<bool>("usePedestalSubtraction");
2447  usecontinuousnumbering_ = iConfig.getUntrackedParameter<bool>("usecontinuousnumbering");
2448  flagLaserRaddam_ = iConfig.getParameter<int>("flagLaserRaddam");
2449  flagToUseDigiCollectionsORNot_ = iConfig.getParameter<int>("flagToUseDigiCollectionsORNot");
2450  flagIterativeMethodCalibrationGroupDigi_ = iConfig.getParameter<int>("flagIterativeMethodCalibrationGroupDigi");
2451  flagIterativeMethodCalibrationGroupReco_ = iConfig.getParameter<int>("flagIterativeMethodCalibrationGroupReco");
2452  flagfitshunt1pedorledlowintensity_ = iConfig.getParameter<int>("flagfitshunt1pedorledlowintensity");
2453  flagabortgaprejected_ = iConfig.getParameter<int>("flagabortgaprejected");
2454  bcnrejectedlow_ = iConfig.getParameter<int>("bcnrejectedlow");
2455  bcnrejectedhigh_ = iConfig.getParameter<int>("bcnrejectedhigh");
2456  ratioHBMin_ = iConfig.getParameter<double>("ratioHBMin");
2457  ratioHBMax_ = iConfig.getParameter<double>("ratioHBMax");
2458  ratioHEMin_ = iConfig.getParameter<double>("ratioHEMin");
2459  ratioHEMax_ = iConfig.getParameter<double>("ratioHEMax");
2460  ratioHFMin_ = iConfig.getParameter<double>("ratioHFMin");
2461  ratioHFMax_ = iConfig.getParameter<double>("ratioHFMax");
2462  ratioHOMin_ = iConfig.getParameter<double>("ratioHOMin");
2463  ratioHOMax_ = iConfig.getParameter<double>("ratioHOMax");
2464  flagtodefinebadchannel_ = iConfig.getParameter<int>("flagtodefinebadchannel");
2465  howmanybinsonplots_ = iConfig.getParameter<int>("howmanybinsonplots");
2466  splashesUpperLimit_ = iConfig.getParameter<int>("splashesUpperLimit");
2467  flagtoaskrunsorls_ = iConfig.getParameter<int>("flagtoaskrunsorls");
2468  flagestimatornormalization_ = iConfig.getParameter<int>("flagestimatornormalization");
2469  flagcpuoptimization_ = iConfig.getParameter<int>("flagcpuoptimization");
2470  flagupgradeqie1011_ = iConfig.getParameter<int>("flagupgradeqie1011");
2471  flagsipmcorrection_ = iConfig.getParameter<int>("flagsipmcorrection");
2472  flaguseshunt_ = iConfig.getParameter<int>("flaguseshunt");
2473  lsdep_cut1_peak_HBdepth1_ = iConfig.getParameter<int>("lsdep_cut1_peak_HBdepth1");
2474  lsdep_cut1_peak_HBdepth2_ = iConfig.getParameter<int>("lsdep_cut1_peak_HBdepth2");
2475  lsdep_cut1_peak_HEdepth1_ = iConfig.getParameter<int>("lsdep_cut1_peak_HEdepth1");
2476  lsdep_cut1_peak_HEdepth2_ = iConfig.getParameter<int>("lsdep_cut1_peak_HEdepth2");
2477  lsdep_cut1_peak_HEdepth3_ = iConfig.getParameter<int>("lsdep_cut1_peak_HEdepth3");
2478  lsdep_cut1_peak_HFdepth1_ = iConfig.getParameter<int>("lsdep_cut1_peak_HFdepth1");
2479  lsdep_cut1_peak_HFdepth2_ = iConfig.getParameter<int>("lsdep_cut1_peak_HFdepth2");
2480  lsdep_cut1_peak_HOdepth4_ = iConfig.getParameter<int>("lsdep_cut1_peak_HOdepth4");
2481  lsdep_cut3_max_HBdepth1_ = iConfig.getParameter<int>("lsdep_cut3_max_HBdepth1");
2482  lsdep_cut3_max_HBdepth2_ = iConfig.getParameter<int>("lsdep_cut3_max_HBdepth2");
2483  lsdep_cut3_max_HEdepth1_ = iConfig.getParameter<int>("lsdep_cut3_max_HEdepth1");
2484  lsdep_cut3_max_HEdepth2_ = iConfig.getParameter<int>("lsdep_cut3_max_HEdepth2");
2485  lsdep_cut3_max_HEdepth3_ = iConfig.getParameter<int>("lsdep_cut3_max_HEdepth3");
2486  lsdep_cut3_max_HFdepth1_ = iConfig.getParameter<int>("lsdep_cut3_max_HFdepth1");
2487  lsdep_cut3_max_HFdepth2_ = iConfig.getParameter<int>("lsdep_cut3_max_HFdepth2");
2488  lsdep_cut3_max_HOdepth4_ = iConfig.getParameter<int>("lsdep_cut3_max_HOdepth4");
2489  lsdep_estimator1_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth1");
2490  lsdep_estimator1_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth2");
2491  lsdep_estimator1_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth1");
2492  lsdep_estimator1_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth2");
2493  lsdep_estimator1_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth3");
2494  lsdep_estimator1_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth1");
2495  lsdep_estimator1_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth2");
2496  lsdep_estimator1_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HOdepth4");
2497  lsdep_estimator1_HEdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth4");
2498  lsdep_estimator1_HEdepth5_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth5");
2499  lsdep_estimator1_HEdepth6_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth6");
2500  lsdep_estimator1_HEdepth7_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth7");
2501  lsdep_estimator1_HFdepth3_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth3");
2502  lsdep_estimator1_HFdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth4");
2503  lsdep_estimator1_HBdepth3_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth3");
2504  lsdep_estimator1_HBdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth4");
2505  lsdep_estimator2_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator2_HBdepth1");
2506  lsdep_estimator2_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator2_HBdepth2");
2507  lsdep_estimator2_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator2_HEdepth1");
2508  lsdep_estimator2_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator2_HEdepth2");
2509  lsdep_estimator2_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator2_HEdepth3");
2510  lsdep_estimator2_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator2_HFdepth1");
2511  lsdep_estimator2_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator2_HFdepth2");
2512  lsdep_estimator2_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator2_HOdepth4");
2513  lsdep_estimator3_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator3_HBdepth1");
2514  lsdep_estimator3_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator3_HBdepth2");
2515  lsdep_estimator3_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator3_HEdepth1");
2516  lsdep_estimator3_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator3_HEdepth2");
2517  lsdep_estimator3_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator3_HEdepth3");
2518  lsdep_estimator3_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator3_HFdepth1");
2519  lsdep_estimator3_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator3_HFdepth2");
2520  lsdep_estimator3_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator3_HOdepth4");
2521  lsdep_estimator4_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator4_HBdepth1");
2522  lsdep_estimator4_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator4_HBdepth2");
2523  lsdep_estimator4_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator4_HEdepth1");
2524  lsdep_estimator4_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator4_HEdepth2");
2525  lsdep_estimator4_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator4_HEdepth3");
2526  lsdep_estimator4_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator4_HFdepth1");
2527  lsdep_estimator4_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator4_HFdepth2");
2528  lsdep_estimator4_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator4_HOdepth4");
2529  lsdep_estimator5_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator5_HBdepth1");
2530  lsdep_estimator5_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator5_HBdepth2");
2531  lsdep_estimator5_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator5_HEdepth1");
2532  lsdep_estimator5_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator5_HEdepth2");
2533  lsdep_estimator5_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator5_HEdepth3");
2534  lsdep_estimator5_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator5_HFdepth1");
2535  lsdep_estimator5_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator5_HFdepth2");
2536  lsdep_estimator5_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator5_HOdepth4");
2537  forallestimators_amplitude_bigger_ = iConfig.getParameter<double>("forallestimators_amplitude_bigger");
2538  rmsHBMin_ = iConfig.getParameter<double>("rmsHBMin");
2539  rmsHBMax_ = iConfig.getParameter<double>("rmsHBMax");
2540  rmsHEMin_ = iConfig.getParameter<double>("rmsHEMin");
2541  rmsHEMax_ = iConfig.getParameter<double>("rmsHEMax");
2542  rmsHFMin_ = iConfig.getParameter<double>("rmsHFMin");
2543  rmsHFMax_ = iConfig.getParameter<double>("rmsHFMax");
2544  rmsHOMin_ = iConfig.getParameter<double>("rmsHOMin");
2545  rmsHOMax_ = iConfig.getParameter<double>("rmsHOMax");
2546  ADCAmplHBMin_ = iConfig.getParameter<double>("ADCAmplHBMin");
2547  ADCAmplHEMin_ = iConfig.getParameter<double>("ADCAmplHEMin");
2548  ADCAmplHOMin_ = iConfig.getParameter<double>("ADCAmplHOMin");
2549  ADCAmplHFMin_ = iConfig.getParameter<double>("ADCAmplHFMin");
2550  ADCAmplHBMax_ = iConfig.getParameter<double>("ADCAmplHBMax");
2551  ADCAmplHEMax_ = iConfig.getParameter<double>("ADCAmplHEMax");
2552  ADCAmplHOMax_ = iConfig.getParameter<double>("ADCAmplHOMax");
2553  ADCAmplHFMax_ = iConfig.getParameter<double>("ADCAmplHFMax");
2554  pedestalwHBMax_ = iConfig.getParameter<double>("pedestalwHBMax");
2555  pedestalwHEMax_ = iConfig.getParameter<double>("pedestalwHEMax");
2556  pedestalwHFMax_ = iConfig.getParameter<double>("pedestalwHFMax");
2557  pedestalwHOMax_ = iConfig.getParameter<double>("pedestalwHOMax");
2558  pedestalHBMax_ = iConfig.getParameter<double>("pedestalHBMax");
2559  pedestalHEMax_ = iConfig.getParameter<double>("pedestalHEMax");
2560  pedestalHFMax_ = iConfig.getParameter<double>("pedestalHFMax");
2561  pedestalHOMax_ = iConfig.getParameter<double>("pedestalHOMax");
2562  calibrADCHBMin_ = iConfig.getParameter<double>("calibrADCHBMin");
2563  calibrADCHEMin_ = iConfig.getParameter<double>("calibrADCHEMin");
2564  calibrADCHOMin_ = iConfig.getParameter<double>("calibrADCHOMin");
2565  calibrADCHFMin_ = iConfig.getParameter<double>("calibrADCHFMin");
2566  calibrADCHBMax_ = iConfig.getParameter<double>("calibrADCHBMax");
2567  calibrADCHEMax_ = iConfig.getParameter<double>("calibrADCHEMax");
2568  calibrADCHOMax_ = iConfig.getParameter<double>("calibrADCHOMax");
2569  calibrADCHFMax_ = iConfig.getParameter<double>("calibrADCHFMax");
2570  calibrRatioHBMin_ = iConfig.getParameter<double>("calibrRatioHBMin");
2571  calibrRatioHEMin_ = iConfig.getParameter<double>("calibrRatioHEMin");
2572  calibrRatioHOMin_ = iConfig.getParameter<double>("calibrRatioHOMin");
2573  calibrRatioHFMin_ = iConfig.getParameter<double>("calibrRatioHFMin");
2574  calibrRatioHBMax_ = iConfig.getParameter<double>("calibrRatioHBMax");
2575  calibrRatioHEMax_ = iConfig.getParameter<double>("calibrRatioHEMax");
2576  calibrRatioHOMax_ = iConfig.getParameter<double>("calibrRatioHOMax");
2577  calibrRatioHFMax_ = iConfig.getParameter<double>("calibrRatioHFMax");
2578  calibrTSmaxHBMin_ = iConfig.getParameter<double>("calibrTSmaxHBMin");
2579  calibrTSmaxHEMin_ = iConfig.getParameter<double>("calibrTSmaxHEMin");
2580  calibrTSmaxHOMin_ = iConfig.getParameter<double>("calibrTSmaxHOMin");
2581  calibrTSmaxHFMin_ = iConfig.getParameter<double>("calibrTSmaxHFMin");
2582  calibrTSmaxHBMax_ = iConfig.getParameter<double>("calibrTSmaxHBMax");
2583  calibrTSmaxHEMax_ = iConfig.getParameter<double>("calibrTSmaxHEMax");
2584  calibrTSmaxHOMax_ = iConfig.getParameter<double>("calibrTSmaxHOMax");
2585  calibrTSmaxHFMax_ = iConfig.getParameter<double>("calibrTSmaxHFMax");
2586  calibrTSmeanHBMin_ = iConfig.getParameter<double>("calibrTSmeanHBMin");
2587  calibrTSmeanHEMin_ = iConfig.getParameter<double>("calibrTSmeanHEMin");
2588  calibrTSmeanHOMin_ = iConfig.getParameter<double>("calibrTSmeanHOMin");
2589  calibrTSmeanHFMin_ = iConfig.getParameter<double>("calibrTSmeanHFMin");
2590  calibrTSmeanHBMax_ = iConfig.getParameter<double>("calibrTSmeanHBMax");
2591  calibrTSmeanHEMax_ = iConfig.getParameter<double>("calibrTSmeanHEMax");
2592  calibrTSmeanHOMax_ = iConfig.getParameter<double>("calibrTSmeanHOMax");
2593  calibrTSmeanHFMax_ = iConfig.getParameter<double>("calibrTSmeanHFMax");
2594  calibrWidthHBMin_ = iConfig.getParameter<double>("calibrWidthHBMin");
2595  calibrWidthHEMin_ = iConfig.getParameter<double>("calibrWidthHEMin");
2596  calibrWidthHOMin_ = iConfig.getParameter<double>("calibrWidthHOMin");
2597  calibrWidthHFMin_ = iConfig.getParameter<double>("calibrWidthHFMin");
2598  calibrWidthHBMax_ = iConfig.getParameter<double>("calibrWidthHBMax");
2599  calibrWidthHEMax_ = iConfig.getParameter<double>("calibrWidthHEMax");
2600  calibrWidthHOMax_ = iConfig.getParameter<double>("calibrWidthHOMax");
2601  calibrWidthHFMax_ = iConfig.getParameter<double>("calibrWidthHFMax");
2602  TSpeakHBMin_ = iConfig.getParameter<double>("TSpeakHBMin");
2603  TSpeakHBMax_ = iConfig.getParameter<double>("TSpeakHBMax");
2604  TSpeakHEMin_ = iConfig.getParameter<double>("TSpeakHEMin");
2605  TSpeakHEMax_ = iConfig.getParameter<double>("TSpeakHEMax");
2606  TSpeakHFMin_ = iConfig.getParameter<double>("TSpeakHFMin");
2607  TSpeakHFMax_ = iConfig.getParameter<double>("TSpeakHFMax");
2608  TSpeakHOMin_ = iConfig.getParameter<double>("TSpeakHOMin");
2609  TSpeakHOMax_ = iConfig.getParameter<double>("TSpeakHOMax");
2610  TSmeanHBMin_ = iConfig.getParameter<double>("TSmeanHBMin");
2611  TSmeanHBMax_ = iConfig.getParameter<double>("TSmeanHBMax");
2612  TSmeanHEMin_ = iConfig.getParameter<double>("TSmeanHEMin");
2613  TSmeanHEMax_ = iConfig.getParameter<double>("TSmeanHEMax");
2614  TSmeanHFMin_ = iConfig.getParameter<double>("TSmeanHFMin");
2615  TSmeanHFMax_ = iConfig.getParameter<double>("TSmeanHFMax");
2616  TSmeanHOMin_ = iConfig.getParameter<double>("TSmeanHOMin");
2617  TSmeanHOMax_ = iConfig.getParameter<double>("TSmeanHOMax");
2618  lsmin_ = iConfig.getParameter<int>("lsmin");
2619  lsmax_ = iConfig.getParameter<int>("lsmax");
2620  alsmin = lsmin_;
2621  blsmax = lsmax_;
2622  nlsminmax = lsmax_ - lsmin_ + 1;
2623  numOfLaserEv = 0;
2624  local_event = 0;
2625  numOfTS = 10;
2626  run0 = -1;
2627  runcounter = 0;
2628  eventcounter = 0;
2629  lumi = 0;
2630  ls0 = -1;
2631  lscounter = 0;
2632  lscounterM1 = 0;
2633  lscounter10 = 0;
2634  nevcounter = 0;
2635  lscounterrun = 0;
2636  lscounterrun10 = 0;
2637  nevcounter0 = 0;
2638  nevcounter00 = 0;
2639  for (int k0 = 0; k0 < nsub; k0++) {
2640  for (int k1 = 0; k1 < ndepth; k1++) {
2641  for (int k2 = 0; k2 < neta; k2++) {
2642  if (k0 == 1) {
2643  mapRADDAM_HED2[k1][k2] = 0.;
2644  mapRADDAM_HED20[k1][k2] = 0.;
2645  }
2646  for (int k3 = 0; k3 < nphi; k3++) {
2647  sumEstimator0[k0][k1][k2][k3] = 0.;
2648  sumEstimator1[k0][k1][k2][k3] = 0.;
2649  sumEstimator2[k0][k1][k2][k3] = 0.;
2650  sumEstimator3[k0][k1][k2][k3] = 0.;
2651  sumEstimator4[k0][k1][k2][k3] = 0.;
2652  sumEstimator5[k0][k1][k2][k3] = 0.;
2653  sumEstimator6[k0][k1][k2][k3] = 0.;
2654  sum0Estimator[k0][k1][k2][k3] = 0.;
2655  if (k0 == 1) {
2656  mapRADDAM_HE[k1][k2][k3] = 0.;
2657  mapRADDAM0_HE[k1][k2][k3] = 0;
2658  }
2659  }
2660  }
2661  }
2662  }
2679  maxxSUM1 = 0.;
2680  maxxSUM2 = 0.;
2681  maxxSUM3 = 0.;
2682  maxxSUM4 = 0.;
2683  maxxOCCUP1 = 0.;
2684  maxxOCCUP2 = 0.;
2685  maxxOCCUP3 = 0.;
2686  maxxOCCUP4 = 0.;
2687  testmetka = 0;
2688 }
2691  conditions = &iSetup.getData(tokDB_);
2692  topo = &iSetup.getData(tokTopo_);
2693  if (MAPcreation > 0) {
2694  if (flagupgradeqie1011_ == 1)
2695  fillMAP();
2696  MAPcreation = 0;
2697  }
2698  nevent++;
2699  nevent50 = nevent / 50;
2700  Run = iEvent.id().run();
2701  Nevent = iEvent.id().event(); // event number = global_event
2702  lumi = iEvent.luminosityBlock(); // lumi section
2703  bcn = iEvent.bunchCrossing();
2704  orbitNum = iEvent.orbitNumber();
2705  int outabortgap = 1;
2706  if (bcn >= bcnrejectedlow_ && bcn <= bcnrejectedhigh_)
2707  outabortgap = 0; // if(bcn>=3446 && bcn<=3564)
2708 
2709  if ((flagabortgaprejected_ == 1 && outabortgap == 1) || (flagabortgaprejected_ == 0 && outabortgap == 0) ||
2710  flagabortgaprejected_ == 2) {
2711  if (run0 != Run) {
2712  ++runcounter;
2713  if (runcounter != 1) {
2715  std::cout << " --------------------------------------- " << std::endl;
2716  std::cout << " for Run = " << run0 << " with runcounter = " << runcounter - 1 << " #ev = " << eventcounter
2717  << std::endl;
2718  std::cout << " #LS = " << lscounterrun << " #LS10 = " << lscounterrun10 << " Last LS = " << ls0 << std::endl;
2719  std::cout << " --------------------------------------------- " << std::endl;
2720  h_nls_per_run->Fill(float(lscounterrun));
2721  h_nls_per_run10->Fill(float(lscounterrun10));
2722  lscounterrun = 0;
2723  lscounterrun10 = 0;
2724  } // runcounter > 1
2725  std::cout << " ---------***********************------------- " << std::endl;
2726  std::cout << " New Run = " << Run << " runcounter = " << runcounter << std::endl;
2727  std::cout << " ------- " << std::endl;
2728  run0 = Run;
2729  eventcounter = 0;
2730  ls0 = -1;
2731  } // new run
2732  else {
2733  nevcounter00 = 0;
2734  } //else new run
2735  ++eventcounter;
2736  if (ls0 != lumi) {
2737  if (ls0 != -1) {
2738  h_nevents_per_eachLS->Fill(float(lscounter), float(nevcounter)); //
2740  } // ls0>-1
2741  lscounter++;
2742  lscounterrun++;
2744  lscounterM1 = lscounter - 1;
2745  } else {
2746  lscounterM1 = ls0;
2747  }
2748  if (ls0 != -1)
2749  h_nevents_per_eachRealLS->Fill(float(lscounterM1), float(nevcounter)); //
2750  h_lsnumber_per_eachLS->Fill(float(lscounter), float(lumi));
2751  if (nevcounter > 10.) {
2752  ++lscounter10;
2753  ++lscounterrun10;
2754  }
2755  h_nevents_per_LS->Fill(float(nevcounter));
2756  h_nevents_per_LSzoom->Fill(float(nevcounter));
2757  nevcounter = 0;
2758  ls0 = lumi;
2759  } // new lumi
2760  else {
2761  nevcounter0 = 0;
2762  } //else new lumi
2763  ++nevcounter; // #ev in LS
2765  if (flagtoaskrunsorls_ == 0) {
2768  }
2769  if (nevcounter0 != 0 || nevcounter > 99999) {
2770  if (nevcounter > 99999)
2771  nevcounter0 = 1;
2775  unsigned long int pcountall1 = 0;
2776  unsigned long int pcountall3 = 0;
2777  unsigned long int pcountall6 = 0;
2778  unsigned long int pcountall8 = 0;
2779  int pcountmin1 = 0;
2780  int pcountmin3 = 0;
2781  int pcountmin6 = 0;
2782  int pcountmin8 = 0;
2783  unsigned long int mcountall1 = 0;
2784  unsigned long int mcountall3 = 0;
2785  unsigned long int mcountall6 = 0;
2786  unsigned long int mcountall8 = 0;
2787  int mcountmin1 = 0;
2788  int mcountmin3 = 0;
2789  int mcountmin6 = 0;
2790  int mcountmin8 = 0;
2791  int pnnbins1 = 0;
2792  int pnnbins3 = 0;
2793  int pnnbins6 = 0;
2794  int pnnbins8 = 0;
2795  int pnnmin1 = 999999999;
2796  int pnnmin3 = 999999999;
2797  int pnnmin6 = 999999999;
2798  int pnnmin8 = 999999999;
2799  int mnnbins1 = 0;
2800  int mnnbins3 = 0;
2801  int mnnbins6 = 0;
2802  int mnnbins8 = 0;
2803  int mnnmin1 = 999999999;
2804  int mnnmin3 = 999999999;
2805  int mnnmin6 = 999999999;
2806  int mnnmin8 = 999999999;
2807  for (int k0 = 0; k0 < nsub; k0++) {
2808  for (int k1 = 0; k1 < ndepth; k1++) {
2809  for (int k3 = 0; k3 < nphi; k3++) {
2810  for (int k2 = 0; k2 < neta; k2++) {
2811  int ieta = k2 - 41;
2812  // ------------------------------------------------------------sumEstimator0
2813  if (sumEstimator0[k0][k1][k2][k3] != 0.) {
2814  // fill histoes:
2815  double bbbc = 0.;
2816  if (flagestimatornormalization_ == 0)
2817  bbbc = sumEstimator0[k0][k1][k2][k3] / nevcounter0;
2818  if (flagestimatornormalization_ == 1)
2819  bbbc = sumEstimator0[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
2820  double bbb1 = 1.;
2821  if (flagestimatornormalization_ == 2) {
2822  bbbc = sumEstimator0[k0][k1][k2][k3];
2823  bbb1 = sum0Estimator[k0][k1][k2][k3];
2824  }
2825 
2826  // HB:
2827  if (k0 == 0) {
2828  // HBdepth1
2829  if (k1 + 1 == 1) {
2830  h_sumPedestalLS1->Fill(bbbc / bbb1);
2831  h_2DsumPedestalLS1->Fill(double(ieta), double(k3), bbbc);
2832  h_2D0sumPedestalLS1->Fill(double(ieta), double(k3), bbb1);
2833  h_sumPedestalperLS1->Fill(float(lscounterM1), bbbc);
2834  h_sum0PedestalperLS1->Fill(float(lscounterM1), bbb1);
2835  }
2836  if (k1 + 1 == 2) {
2837  h_sumPedestalLS2->Fill(bbbc / bbb1);
2838  h_2DsumPedestalLS2->Fill(double(ieta), double(k3), bbbc);
2839  h_2D0sumPedestalLS2->Fill(double(ieta), double(k3), bbb1);
2840  h_sumPedestalperLS2->Fill(float(lscounterM1), bbbc);
2841  h_sum0PedestalperLS2->Fill(float(lscounterM1), bbb1);
2842  }
2843  }
2844  // HE:
2845  if (k0 == 1) {
2846  // HEdepth1
2847  if (k1 + 1 == 1) {
2848  h_sumPedestalLS3->Fill(bbbc / bbb1);
2849  h_2DsumPedestalLS3->Fill(double(ieta), double(k3), bbbc);
2850  h_2D0sumPedestalLS3->Fill(double(ieta), double(k3), bbb1);
2851  h_sumPedestalperLS3->Fill(float(lscounterM1), bbbc);
2852  h_sum0PedestalperLS3->Fill(float(lscounterM1), bbb1);
2853  }
2854  if (k1 + 1 == 2) {
2855  h_sumPedestalLS4->Fill(bbbc / bbb1);
2856  h_2DsumPedestalLS4->Fill(double(ieta), double(k3), bbbc);
2857  h_2D0sumPedestalLS4->Fill(double(ieta), double(k3), bbb1);
2858  h_sumPedestalperLS4->Fill(float(lscounterM1), bbbc);
2859  h_sum0PedestalperLS4->Fill(float(lscounterM1), bbb1);
2860  }
2861  if (k1 + 1 == 3) {
2862  h_sumPedestalLS5->Fill(bbbc / bbb1);
2863  h_2DsumPedestalLS5->Fill(double(ieta), double(k3), bbbc);
2864  h_2D0sumPedestalLS5->Fill(double(ieta), double(k3), bbb1);
2865  h_sumPedestalperLS5->Fill(float(lscounterM1), bbbc);
2866  h_sum0PedestalperLS5->Fill(float(lscounterM1), bbb1);
2867  }
2868  }
2869  // HF:
2870  if (k0 == 3) {
2871  // HFdepth1
2872  if (k1 + 1 == 1) {
2873  h_sumPedestalLS6->Fill(bbbc / bbb1);
2874  h_2DsumPedestalLS6->Fill(double(ieta), double(k3), bbbc);
2875  h_2D0sumPedestalLS6->Fill(double(ieta), double(k3), bbb1);
2876  h_sumPedestalperLS6->Fill(float(lscounterM1), bbbc);
2877  h_sum0PedestalperLS6->Fill(float(lscounterM1), bbb1);
2878  }
2879  if (k1 + 1 == 2) {
2880  h_sumPedestalLS7->Fill(bbbc / bbb1);
2881  h_2DsumPedestalLS7->Fill(double(ieta), double(k3), bbbc);
2882  h_2D0sumPedestalLS7->Fill(double(ieta), double(k3), bbb1);
2883  h_sumPedestalperLS7->Fill(float(lscounterM1), bbbc);
2884  h_sum0PedestalperLS7->Fill(float(lscounterM1), bbb1);
2885  }
2886  }
2887  // HO:
2888  if (k0 == 2) {
2889  // HOdepth4
2890  if (k1 + 1 == 4) {
2891  h_sumPedestalLS8->Fill(bbbc / bbb1);
2892  h_2DsumPedestalLS8->Fill(double(ieta), double(k3), bbbc);
2893  h_2D0sumPedestalLS8->Fill(double(ieta), double(k3), bbb1);
2894  h_sumPedestalperLS8->Fill(float(lscounterM1), bbbc);
2895  h_sum0PedestalperLS8->Fill(float(lscounterM1), bbb1);
2896  }
2897  }
2898  } //if(sumEstimator0[k0][k1][k2][k3] != 0.
2899 
2900  // ------------------------------------------------------------------------------------- sumEstimator1
2901  if (sumEstimator1[k0][k1][k2][k3] != 0.) {
2902  // fill histoes:
2903  double bbbc = 0.;
2904  if (flagestimatornormalization_ == 0)
2905  bbbc = sumEstimator1[k0][k1][k2][k3] / nevcounter0;
2906  if (flagestimatornormalization_ == 1)
2907  bbbc = sumEstimator1[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
2908  double bbb1 = 1.;
2909  if (flagestimatornormalization_ == 2) {
2910  bbbc = sumEstimator1[k0][k1][k2][k3];
2911  bbb1 = sum0Estimator[k0][k1][k2][k3];
2912  }
2913  //flag for ask type of Normalization for CMT estimators:
2914  //=0-normalizationOn#evOfLS; =1-averagedMeanChannelVariable; =2-averageVariable-normalizationOn#entriesInLS;
2915  //flagestimatornormalization = cms.int32(2), !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2916  // zhokin 18.10.2018 STUDY: CALL HFF2 (ID,NID,X,Y,W)
2917  if (lscounterM1 >= lsmin_ && lscounterM1 < lsmax_) {
2918  // INDEXIES:
2919  int kkkk2 = (k2 - 1) / 4;
2920  if (k2 == 0)
2921  kkkk2 = 1.;
2922  else
2923  kkkk2 += 2; //kkkk2= 1-22
2924  int kkkk3 = (k3) / 4 + 1; //kkkk3= 1-18
2925  // PACKING
2926  //kkkk2= 1-22 ;kkkk3= 1-18
2927  int ietaphi = 0;
2928  ietaphi = ((kkkk2)-1) * znphi + (kkkk3);
2929  // Outout is ietaphi = 1 - 396 ( # =396; in histo,booking is: 1 - 397 )
2930 
2931  double bbb3 = 0.;
2932  if (bbb1 != 0.)
2933  bbb3 = bbbc / bbb1;
2934  // very very wrong if below:
2935  // if(bbb3 != 0.) {
2936 
2937  if (k0 == 0) {
2938  h_2DsumADCAmplEtaPhiLs0->Fill(float(lscounterM1), float(ietaphi), bbbc); //HB
2939  h_2DsumADCAmplEtaPhiLs00->Fill(float(lscounterM1), float(ietaphi), bbb1); //HB
2940  }
2941  if (k0 == 1) {
2942  h_2DsumADCAmplEtaPhiLs1->Fill(float(lscounterM1), float(ietaphi), bbbc); //HE
2943  h_2DsumADCAmplEtaPhiLs10->Fill(float(lscounterM1), float(ietaphi), bbb1); //HE
2944  }
2945  if (k0 == 2) {
2946  h_2DsumADCAmplEtaPhiLs2->Fill(float(lscounterM1), float(ietaphi), bbbc); //HO
2947  h_2DsumADCAmplEtaPhiLs20->Fill(float(lscounterM1), float(ietaphi), bbb1); //HO
2948  }
2949  if (k0 == 3) {
2950  h_2DsumADCAmplEtaPhiLs3->Fill(float(lscounterM1), float(ietaphi), bbbc); //HF
2951  h_2DsumADCAmplEtaPhiLs30->Fill(float(lscounterM1), float(ietaphi), bbb1); //HF
2952  }
2953 
2954  h_sumADCAmplEtaPhiLs->Fill(bbb3);
2955  h_sumADCAmplEtaPhiLs_bbbc->Fill(bbbc);
2956  h_sumADCAmplEtaPhiLs_bbb1->Fill(bbb1);
2958  h_sumADCAmplEtaPhiLs_orbitNum->Fill(float(orbitNum), 1.);
2960  h_sumADCAmplEtaPhiLs_ietaphi->Fill(float(ietaphi));
2961 
2962  // }// bb3
2963  } // lscounterM1 >= lsmin_ && lscounterM1 < lsmax_
2964 
2965  // HB:
2966  if (k0 == 0) {
2967  // HBdepth1
2968  if (k1 + 1 == 1) {
2969  h_sumADCAmplLS1copy1->Fill(bbbc / bbb1);
2970  h_sumADCAmplLS1copy2->Fill(bbbc / bbb1);
2971  h_sumADCAmplLS1copy3->Fill(bbbc / bbb1);
2972  h_sumADCAmplLS1copy4->Fill(bbbc / bbb1);
2973  h_sumADCAmplLS1copy5->Fill(bbbc / bbb1);
2974  h_sumADCAmplLS1->Fill(bbbc / bbb1);
2975  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
2976  h_2DsumADCAmplLS1->Fill(double(ieta), double(k3), bbbc);
2977  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth1_)
2978  h_2DsumADCAmplLS1_LSselected->Fill(double(ieta), double(k3), bbbc);
2979 
2980  h_2D0sumADCAmplLS1->Fill(double(ieta), double(k3), bbb1);
2981 
2982  h_sumADCAmplperLS1->Fill(float(lscounterM1), bbbc);
2983  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
2984  h_sumCutADCAmplperLS1->Fill(float(lscounterM1), bbbc);
2985  h_sum0ADCAmplperLS1->Fill(float(lscounterM1), bbb1);
2986 
2987  if (ieta > 0) {
2988  if (k3 < 36) {
2989  h_sumADCAmplperLS1_P1->Fill(float(lscounterM1), bbbc);
2990  h_sum0ADCAmplperLS1_P1->Fill(float(lscounterM1), bbb1);
2991  } else {
2992  h_sumADCAmplperLS1_P2->Fill(float(lscounterM1), bbbc);
2993  h_sum0ADCAmplperLS1_P2->Fill(float(lscounterM1), bbb1);
2994  }
2996  if (bbbc / bbb1 > 25.) {
2997  pcountall1 += bbb1;
2998  pcountmin1 += bbb1;
2999  }
3001 
3002  } else {
3003  if (k3 < 36) {
3004  h_sumADCAmplperLS1_M1->Fill(float(lscounterM1), bbbc);
3005  h_sum0ADCAmplperLS1_M1->Fill(float(lscounterM1), bbb1);
3006  } else {
3007  h_sumADCAmplperLS1_M2->Fill(float(lscounterM1), bbbc);
3008  h_sum0ADCAmplperLS1_M2->Fill(float(lscounterM1), bbb1);
3009  }
3011  if (bbbc / bbb1 > 25.) {
3012  mcountall1 += bbb1;
3013  mcountmin1 += bbb1;
3014  }
3016  }
3017  }
3018  // HBdepth2
3019  if (k1 + 1 == 2) {
3020  h_sumADCAmplLS2->Fill(bbbc / bbb1);
3021  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
3022  h_2DsumADCAmplLS2->Fill(double(ieta), double(k3), bbbc);
3023  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth2_)
3024  h_2DsumADCAmplLS2_LSselected->Fill(double(ieta), double(k3), bbbc);
3025  h_2D0sumADCAmplLS2->Fill(double(ieta), double(k3), bbb1);
3026  h_sumADCAmplperLS2->Fill(float(lscounterM1), bbbc);
3027  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
3028  h_sumCutADCAmplperLS2->Fill(float(lscounterM1), bbbc);
3029  h_sum0ADCAmplperLS2->Fill(float(lscounterM1), bbb1);
3030  if (ieta > 0) {
3031  if (k3 < 36) {
3032  h_sumADCAmplperLS1_P1->Fill(float(lscounterM1), bbbc);
3033  h_sum0ADCAmplperLS1_P1->Fill(float(lscounterM1), bbb1);
3034  } else {
3035  h_sumADCAmplperLS1_P2->Fill(float(lscounterM1), bbbc);
3036  h_sum0ADCAmplperLS1_P2->Fill(float(lscounterM1), bbb1);
3037  }
3038  } else {
3039  if (k3 < 36) {
3040  h_sumADCAmplperLS1_M1->Fill(float(lscounterM1), bbbc);
3041  h_sum0ADCAmplperLS1_M1->Fill(float(lscounterM1), bbb1);
3042  } else {
3043  h_sumADCAmplperLS1_M2->Fill(float(lscounterM1), bbbc);
3044  h_sum0ADCAmplperLS1_M2->Fill(float(lscounterM1), bbb1);
3045  }
3046  }
3047  }
3048  // HBdepth3 upgrade
3049  if (k1 + 1 == 3) {
3050  h_sumADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
3051  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
3052  h_sumCutADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
3053  h_sum0ADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbb1);
3054 
3055  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
3056  h_2DsumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbbc);
3057  h_2D0sumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbb1);
3058  } //if(k1+1 ==3)
3059 
3060  // HBdepth4 upgrade
3061  if (k1 + 1 == 4) {
3062  h_sumADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
3063  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
3064  h_sumCutADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
3065  h_sum0ADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbb1);
3066 
3067  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
3068  h_2DsumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbbc);
3069  h_2D0sumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbb1);
3070  } //if(k1+1 ==4)
3071  }
3072 
3073  // HE:
3074  if (k0 == 1) {
3075  // HEdepth1
3076  if (k1 + 1 == 1) {
3077  h_sumADCAmplLS3->Fill(bbbc / bbb1);
3078  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
3079  h_2DsumADCAmplLS3->Fill(double(ieta), double(k3), bbbc);
3080  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth1_)
3081  h_2DsumADCAmplLS3_LSselected->Fill(double(ieta), double(k3), bbbc);
3082  h_2D0sumADCAmplLS3->Fill(double(ieta), double(k3), bbb1);
3083  h_sumADCAmplperLS3->Fill(float(lscounterM1), bbbc);
3084  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
3085  h_sumCutADCAmplperLS3->Fill(float(lscounterM1), bbbc);
3086  h_sum0ADCAmplperLS3->Fill(float(lscounterM1), bbb1);
3087  if (ieta > 0) {
3088  if (k3 < 36) {
3089  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3090  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3091  } else {
3092  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3093  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3094  }
3096  if (bbbc / bbb1 > 15. && k3 % 2 == 0) {
3097  pcountall3 += bbb1;
3098  pcountmin3 += bbb1;
3099  }
3101  } else {
3102  if (k3 < 36) {
3103  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3104  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3105  } else {
3106  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3107  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3108  }
3110  if (bbbc / bbb1 > 15. && k3 % 2 == 0) {
3111  mcountall3 += bbb1;
3112  mcountmin3 += bbb1;
3113  }
3115  }
3116  }
3117  // HEdepth2
3118  if (k1 + 1 == 2) {
3119  h_sumADCAmplLS4->Fill(bbbc / bbb1);
3120  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
3121  h_2DsumADCAmplLS4->Fill(double(ieta), double(k3), bbbc);
3122  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth2_)
3123  h_2DsumADCAmplLS4_LSselected->Fill(double(ieta), double(k3), bbbc);
3124  h_2D0sumADCAmplLS4->Fill(double(ieta), double(k3), bbb1);
3125  h_sumADCAmplperLS4->Fill(float(lscounterM1), bbbc);
3126  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
3127  h_sumCutADCAmplperLS4->Fill(float(lscounterM1), bbbc);
3128  h_sum0ADCAmplperLS4->Fill(float(lscounterM1), bbb1);
3129  if (ieta > 0) {
3130  if (k3 < 36) {
3131  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3132  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3133  } else {
3134  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3135  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3136  }
3137  } else {
3138  if (k3 < 36) {
3139  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3140  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3141  } else {
3142  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3143  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3144  }
3145  }
3146  }
3147  // HEdepth3
3148  if (k1 + 1 == 3) {
3149  h_sumADCAmplLS5->Fill(bbbc / bbb1);
3150  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
3151  h_2DsumADCAmplLS5->Fill(double(ieta), double(k3), bbbc);
3152  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth3_)
3153  h_2DsumADCAmplLS5_LSselected->Fill(double(ieta), double(k3), bbbc);
3154  h_2D0sumADCAmplLS5->Fill(double(ieta), double(k3), bbb1);
3155  h_sumADCAmplperLS5->Fill(float(lscounterM1), bbbc);
3156  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
3157  h_sumCutADCAmplperLS5->Fill(float(lscounterM1), bbbc);
3158  h_sum0ADCAmplperLS5->Fill(float(lscounterM1), bbb1);
3159  if (ieta > 0) {
3160  if (k3 < 36) {
3161  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3162  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3163  } else {
3164  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3165  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3166  }
3167  } else {
3168  if (k3 < 36) {
3169  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3170  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3171  } else {
3172  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3173  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3174  }
3175  }
3176  } //if(k1+1 ==3
3177  // HEdepth4 upgrade
3178  if (k1 + 1 == 4) {
3179  h_sumADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
3180  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
3181  h_sumCutADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
3182  h_sum0ADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbb1);
3183 
3184  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
3185  h_2DsumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbbc);
3186  h_2D0sumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbb1);
3187  } //if(k1+1 ==4)
3188 
3189  // HEdepth5 upgrade
3190  if (k1 + 1 == 5) {
3191  h_sumADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
3192  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
3193  h_sumCutADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
3194  h_sum0ADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbb1);
3195 
3196  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
3197  h_2DsumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbbc);
3198  h_2D0sumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbb1);
3199  } //if(k1+1 ==5)
3200 
3201  // HEdepth6 upgrade
3202  if (k1 + 1 == 6) {
3203  h_sumADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
3204  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
3205  h_sumCutADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
3206  h_sum0ADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbb1);
3207 
3208  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
3209  h_2DsumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbbc);
3210  h_2D0sumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbb1);
3211  } //if(k1+1 ==6)
3212 
3213  // HEdepth7 upgrade
3214  if (k1 + 1 == 7) {
3215  h_sumADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
3216  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
3217  h_sumCutADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
3218  h_sum0ADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbb1);
3219 
3220  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
3221  h_2DsumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbbc);
3222  h_2D0sumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbb1);
3223  } //if(k1+1 ==7)
3224  } //if(k0==1) =HE
3225  // HF:
3226  if (k0 == 3) {
3227  // HFdepth1
3228  if (k1 + 1 == 1) {
3229  h_sumADCAmplLS6->Fill(bbbc / bbb1);
3230  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
3231  h_2DsumADCAmplLS6->Fill(double(ieta), double(k3), bbbc);
3232  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth1_)
3233  h_2DsumADCAmplLS6_LSselected->Fill(double(ieta), double(k3), bbbc);
3234  h_2D0sumADCAmplLS6->Fill(double(ieta), double(k3), bbb1);
3235  h_sumADCAmplperLS6->Fill(float(lscounterM1), bbbc);
3236  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
3237  h_sumCutADCAmplperLS6->Fill(float(lscounterM1), bbbc);
3238  h_sum0ADCAmplperLS6->Fill(float(lscounterM1), bbb1);
3239 
3241  if (ieta > 0) {
3242  if (k3 < 36) {
3243  h_sumADCAmplperLS6_P1->Fill(float(lscounterM1), bbbc);
3244  h_sum0ADCAmplperLS6_P1->Fill(float(lscounterM1), bbb1);
3245  } else {
3246  h_sumADCAmplperLS6_P2->Fill(float(lscounterM1), bbbc);
3247  h_sum0ADCAmplperLS6_P2->Fill(float(lscounterM1), bbb1);
3248  }
3250  if (bbbc / bbb1 > 20.) {
3251  pcountall6 += bbb1;
3252  pcountmin6 += bbb1;
3253  }
3255 
3256  } else {
3257  if (k3 < 36) {
3258  h_sumADCAmplperLS6_M1->Fill(float(lscounterM1), bbbc);
3259  h_sum0ADCAmplperLS6_M1->Fill(float(lscounterM1), bbb1);
3260  } else {
3261  h_sumADCAmplperLS6_M2->Fill(float(lscounterM1), bbbc);
3262  h_sum0ADCAmplperLS6_M2->Fill(float(lscounterM1), bbb1);
3263  }
3265  if (bbbc / bbb1 > 20.) {
3266  mcountall6 += bbb1;
3267  mcountmin6 += bbb1;
3268  }
3270  }
3272  } //if(k1+1 ==1)
3273 
3274  // HFdepth2
3275  if (k1 + 1 == 2) {
3276  h_sumADCAmplLS7->Fill(bbbc / bbb1);
3277  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
3278  h_2DsumADCAmplLS7->Fill(double(ieta), double(k3), bbbc);
3279  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth2_)
3280  h_2DsumADCAmplLS7_LSselected->Fill(double(ieta), double(k3), bbbc);
3281  h_2D0sumADCAmplLS7->Fill(double(ieta), double(k3), bbb1);
3282  h_sumADCAmplperLS7->Fill(float(lscounterM1), bbbc);
3283  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
3284  h_sumCutADCAmplperLS7->Fill(float(lscounterM1), bbbc);
3285  h_sum0ADCAmplperLS7->Fill(float(lscounterM1), bbb1);
3286 
3287  if (ieta > 0) {
3288  if (k3 < 36) {
3289  h_sumADCAmplperLS6_P1->Fill(float(lscounterM1), bbbc);
3290  h_sum0ADCAmplperLS6_P1->Fill(float(lscounterM1), bbb1);
3291  } else {
3292  h_sumADCAmplperLS6_P2->Fill(float(lscounterM1), bbbc);
3293  h_sum0ADCAmplperLS6_P2->Fill(float(lscounterM1), bbb1);
3294  }
3295  } else {
3296  if (k3 < 36) {
3297  h_sumADCAmplperLS6_M1->Fill(float(lscounterM1), bbbc);
3298  h_sum0ADCAmplperLS6_M1->Fill(float(lscounterM1), bbb1);
3299  } else {
3300  h_sumADCAmplperLS6_M2->Fill(float(lscounterM1), bbbc);
3301  h_sum0ADCAmplperLS6_M2->Fill(float(lscounterM1), bbb1);
3302  }
3303  }
3304  } //if(k1+1 ==2)
3305 
3306  // HFdepth3 upgrade
3307  if (k1 + 1 == 3) {
3308  h_sumADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
3309  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
3310  h_sumCutADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
3311  h_sum0ADCAmplperLS6u->Fill(float(lscounterM1), bbb1);
3312 
3313  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
3314  h_2DsumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbbc);
3315  h_2D0sumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbb1);
3316  } //if(k1+1 ==3)
3317 
3318  // HFdepth4 upgrade
3319  if (k1 + 1 == 4) {
3320  h_sumADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
3321  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
3322  h_sumCutADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
3323  h_sum0ADCAmplperLS7u->Fill(float(lscounterM1), bbb1);
3324 
3325  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
3326  h_2DsumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbbc);
3327  h_2D0sumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbb1);
3328  } //if(k1+1 ==4)
3329 
3330  } //end HF
3331 
3332  // HO:
3333  if (k0 == 2) {
3334  // HOdepth4
3335  if (k1 + 1 == 4) {
3336  h_sumADCAmplLS8->Fill(bbbc / bbb1);
3337  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
3338  h_2DsumADCAmplLS8->Fill(double(ieta), double(k3), bbbc);
3339  if (bbbc / bbb1 > 2. * lsdep_estimator1_HOdepth4_)
3340  h_2DsumADCAmplLS8_LSselected->Fill(double(ieta), double(k3), bbbc);
3341  h_2D0sumADCAmplLS8->Fill(double(ieta), double(k3), bbb1);
3342  h_sumADCAmplperLS8->Fill(float(lscounterM1), bbbc);
3343  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
3344  h_sumCutADCAmplperLS8->Fill(float(lscounterM1), bbbc);
3345  h_sum0ADCAmplperLS8->Fill(float(lscounterM1), bbb1);
3346 
3348  if (ieta > 0) {
3349  if (k3 < 36) {
3350  h_sumADCAmplperLS8_P1->Fill(float(lscounterM1), bbbc);
3351  h_sum0ADCAmplperLS8_P1->Fill(float(lscounterM1), bbb1);
3352  } else {
3353  h_sumADCAmplperLS8_P2->Fill(float(lscounterM1), bbbc);
3354  h_sum0ADCAmplperLS8_P2->Fill(float(lscounterM1), bbb1);
3355  }
3357  if (bbbc / bbb1 > 80.) {
3358  pcountall8 += bbb1;
3359  pcountmin8 += bbb1;
3360  }
3362 
3363  } else {
3364  if (k3 < 36) {
3365  h_sumADCAmplperLS8_M1->Fill(float(lscounterM1), bbbc);
3366  h_sum0ADCAmplperLS8_M1->Fill(float(lscounterM1), bbb1);
3367  } else {
3368  h_sumADCAmplperLS8_M2->Fill(float(lscounterM1), bbbc);
3369  h_sum0ADCAmplperLS8_M2->Fill(float(lscounterM1), bbb1);
3370  }
3372  if (bbbc / bbb1 > 80.) {
3373  mcountall8 += bbb1;
3374  mcountmin8 += bbb1;
3375  }
3377  }
3379  }
3380  }
3381  } //if(sumEstimator1[k0][k1][k2][k3] != 0.
3382  // ------------------------------------------------------------------------------------------------------------------------sumEstimator2
3383  if (sumEstimator2[k0][k1][k2][k3] != 0.) {
3384  // fill histoes:
3385  double bbbc = 0.;
3386  if (flagestimatornormalization_ == 0)
3387  bbbc = sumEstimator2[k0][k1][k2][k3] / nevcounter0;
3388  if (flagestimatornormalization_ == 1)
3389  bbbc = sumEstimator2[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3390  double bbb1 = 1.;
3391  if (flagestimatornormalization_ == 2) {
3392  bbbc = sumEstimator2[k0][k1][k2][k3];
3393  bbb1 = sum0Estimator[k0][k1][k2][k3];
3394  }
3395 
3396  // HB:
3397  if (k0 == 0) {
3398  // HBdepth1
3399  if (k1 + 1 == 1) {
3400  h_sumTSmeanALS1->Fill(bbbc / bbb1);
3401  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
3402  h_2DsumTSmeanALS1->Fill(double(ieta), double(k3), bbbc);
3403  h_2D0sumTSmeanALS1->Fill(double(ieta), double(k3), bbb1);
3404  h_sumTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
3405  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
3406  h_sumCutTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
3407  h_sum0TSmeanAperLS1->Fill(float(lscounterM1), bbb1);
3408  if (bbbc / bbb1 > 2. * lsdep_estimator2_HBdepth1_)
3409  h_sumTSmeanAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3410  }
3411  if (k1 + 1 == 2) {
3412  h_sumTSmeanALS2->Fill(bbbc / bbb1);
3413  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
3414  h_2DsumTSmeanALS2->Fill(double(ieta), double(k3), bbbc);
3415  h_2D0sumTSmeanALS2->Fill(double(ieta), double(k3), bbb1);
3416  h_sumTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
3417  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
3418  h_sumCutTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
3419  h_sum0TSmeanAperLS2->Fill(float(lscounterM1), bbb1);
3420  }
3421  }
3422  // HE:
3423  if (k0 == 1) {
3424  // HBdepth1
3425  if (k1 + 1 == 1) {
3426  h_sumTSmeanALS3->Fill(bbbc / bbb1);
3427  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
3428  h_2DsumTSmeanALS3->Fill(double(ieta), double(k3), bbbc);
3429  h_2D0sumTSmeanALS3->Fill(double(ieta), double(k3), bbb1);
3430  h_sumTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
3431  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
3432  h_sumCutTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
3433  h_sum0TSmeanAperLS3->Fill(float(lscounterM1), bbb1);
3434  }
3435  if (k1 + 1 == 2) {
3436  h_sumTSmeanALS4->Fill(bbbc / bbb1);
3437  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
3438  h_2DsumTSmeanALS4->Fill(double(ieta), double(k3), bbbc);
3439  h_2D0sumTSmeanALS4->Fill(double(ieta), double(k3), bbb1);
3440  h_sumTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
3441  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
3442  h_sumCutTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
3443  h_sum0TSmeanAperLS4->Fill(float(lscounterM1), bbb1);
3444  }
3445  if (k1 + 1 == 3) {
3446  h_sumTSmeanALS5->Fill(bbbc / bbb1);
3447  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
3448  h_2DsumTSmeanALS5->Fill(double(ieta), double(k3), bbbc);
3449  h_2D0sumTSmeanALS5->Fill(double(ieta), double(k3), bbb1);
3450  h_sumTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
3451  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
3452  h_sumCutTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
3453  h_sum0TSmeanAperLS5->Fill(float(lscounterM1), bbb1);
3454  }
3455  }
3456  // HF:
3457  if (k0 == 3) {
3458  // HBdepth1
3459  if (k1 + 1 == 1) {
3460  h_sumTSmeanALS6->Fill(bbbc / bbb1);
3461  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
3462  h_2DsumTSmeanALS6->Fill(double(ieta), double(k3), bbbc);
3463  h_2D0sumTSmeanALS6->Fill(double(ieta), double(k3), bbb1);
3464  h_sumTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
3465  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
3466  h_sumCutTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
3467  h_sum0TSmeanAperLS6->Fill(float(lscounterM1), bbb1);
3468  }
3469  if (k1 + 1 == 2) {
3470  h_sumTSmeanALS7->Fill(bbbc / bbb1);
3471  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
3472  h_2DsumTSmeanALS7->Fill(double(ieta), double(k3), bbbc);
3473  h_2D0sumTSmeanALS7->Fill(double(ieta), double(k3), bbb1);
3474  h_sumTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
3475  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
3476  h_sumCutTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
3477  h_sum0TSmeanAperLS7->Fill(float(lscounterM1), bbb1);
3478  }
3479  }
3480  // HO:
3481  if (k0 == 2) {
3482  // HBdepth1
3483  if (k1 + 1 == 4) {
3484  h_sumTSmeanALS8->Fill(bbbc / bbb1);
3485  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
3486  h_2DsumTSmeanALS8->Fill(double(ieta), double(k3), bbbc);
3487  h_2D0sumTSmeanALS8->Fill(double(ieta), double(k3), bbb1);
3488  h_sumTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
3489  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
3490  h_sumCutTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
3491  h_sum0TSmeanAperLS8->Fill(float(lscounterM1), bbb1);
3492  }
3493  }
3494  } //if(sumEstimator2[k0][k1][k2][k3] != 0.
3495 
3496  // ------------------------------------------------------------------------------------------------------------------------sumEstimator3
3497  if (sumEstimator3[k0][k1][k2][k3] != 0.) {
3498  // fill histoes:
3499  double bbbc = 0.;
3500  if (flagestimatornormalization_ == 0)
3501  bbbc = sumEstimator3[k0][k1][k2][k3] / nevcounter0;
3502  if (flagestimatornormalization_ == 1)
3503  bbbc = sumEstimator3[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3504  double bbb1 = 1.;
3505  if (flagestimatornormalization_ == 2) {
3506  bbbc = sumEstimator3[k0][k1][k2][k3];
3507  bbb1 = sum0Estimator[k0][k1][k2][k3];
3508  }
3509 
3510  // HB:
3511  if (k0 == 0) {
3512  // HBdepth1
3513  if (k1 + 1 == 1) {
3514  h_sumTSmaxALS1->Fill(bbbc / bbb1);
3515  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
3516  h_2DsumTSmaxALS1->Fill(double(ieta), double(k3), bbbc);
3517  h_2D0sumTSmaxALS1->Fill(double(ieta), double(k3), bbb1);
3518  h_sumTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
3519  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
3520  h_sumCutTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
3521  h_sum0TSmaxAperLS1->Fill(float(lscounterM1), bbb1);
3522  if (bbbc / bbb1 > 2. * lsdep_estimator3_HBdepth1_)
3523  h_sumTSmaxAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3524  }
3525  if (k1 + 1 == 2) {
3526  h_sumTSmaxALS2->Fill(bbbc / bbb1);
3527  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
3528  h_2DsumTSmaxALS2->Fill(double(ieta), double(k3), bbbc);
3529  h_2D0sumTSmaxALS2->Fill(double(ieta), double(k3), bbb1);
3530  h_sumTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
3531  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
3532  h_sumCutTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
3533  h_sum0TSmaxAperLS2->Fill(float(lscounterM1), bbb1);
3534  }
3535  }
3536  // HE:
3537  if (k0 == 1) {
3538  // HBdepth1
3539  if (k1 + 1 == 1) {
3540  h_sumTSmaxALS3->Fill(bbbc / bbb1);
3541  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
3542  h_2DsumTSmaxALS3->Fill(double(ieta), double(k3), bbbc);
3543  h_2D0sumTSmaxALS3->Fill(double(ieta), double(k3), bbb1);
3544  h_sumTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
3545  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
3546  h_sumCutTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
3547  h_sum0TSmaxAperLS3->Fill(float(lscounterM1), bbb1);
3548  }
3549  if (k1 + 1 == 2) {
3550  h_sumTSmaxALS4->Fill(bbbc / bbb1);
3551  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
3552  h_2DsumTSmaxALS4->Fill(double(ieta), double(k3), bbbc);
3553  h_2D0sumTSmaxALS4->Fill(double(ieta), double(k3), bbb1);
3554  h_sumTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
3555  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
3556  h_sumCutTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
3557  h_sum0TSmaxAperLS4->Fill(float(lscounterM1), bbb1);
3558  }
3559  if (k1 + 1 == 3) {
3560  h_sumTSmaxALS5->Fill(bbbc / bbb1);
3561  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
3562  h_2DsumTSmaxALS5->Fill(double(ieta), double(k3), bbbc);
3563  h_2D0sumTSmaxALS5->Fill(double(ieta), double(k3), bbb1);
3564  h_sumTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
3565  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
3566  h_sumCutTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
3567  h_sum0TSmaxAperLS5->Fill(float(lscounterM1), bbb1);
3568  }
3569  }
3570  // HF:
3571  if (k0 == 3) {
3572  // HBdepth1
3573  if (k1 + 1 == 1) {
3574  h_sumTSmaxALS6->Fill(bbbc / bbb1);
3575  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
3576  h_2DsumTSmaxALS6->Fill(double(ieta), double(k3), bbbc);
3577  h_2D0sumTSmaxALS6->Fill(double(ieta), double(k3), bbb1);
3578  h_sumTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
3579  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
3580  h_sumCutTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
3581  h_sum0TSmaxAperLS6->Fill(float(lscounterM1), bbb1);
3582  }
3583  if (k1 + 1 == 2) {
3584  h_sumTSmaxALS7->Fill(bbbc / bbb1);
3585  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
3586  h_2DsumTSmaxALS7->Fill(double(ieta), double(k3), bbbc);
3587  h_2D0sumTSmaxALS7->Fill(double(ieta), double(k3), bbb1);
3588  h_sumTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
3589  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
3590  h_sumCutTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
3591  h_sum0TSmaxAperLS7->Fill(float(lscounterM1), bbb1);
3592  }
3593  }
3594  // HO:
3595  if (k0 == 2) {
3596  // HBdepth1
3597  if (k1 + 1 == 4) {
3598  h_sumTSmaxALS8->Fill(bbbc / bbb1);
3599  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
3600  h_2DsumTSmaxALS8->Fill(double(ieta), double(k3), bbbc);
3601  h_2D0sumTSmaxALS8->Fill(double(ieta), double(k3), bbb1);
3602  h_sumTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
3603  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
3604  h_sumCutTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
3605  h_sum0TSmaxAperLS8->Fill(float(lscounterM1), bbb1);
3606  }
3607  }
3608  } //if(sumEstimator3[k0][k1][k2][k3] != 0.
3609 
3610  // ------------------------------------------------------------------------------------------------------------------------sumEstimator4
3611  if (sumEstimator4[k0][k1][k2][k3] != 0.) {
3612  // fill histoes:
3613  double bbbc = 0.;
3614  if (flagestimatornormalization_ == 0)
3615  bbbc = sumEstimator4[k0][k1][k2][k3] / nevcounter0;
3616  if (flagestimatornormalization_ == 1)
3617  bbbc = sumEstimator4[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3618  double bbb1 = 1.;
3619  if (flagestimatornormalization_ == 2) {
3620  bbbc = sumEstimator4[k0][k1][k2][k3];
3621  bbb1 = sum0Estimator[k0][k1][k2][k3];
3622  }
3623 
3624  // HB:
3625  if (k0 == 0) {
3626  // HBdepth1
3627  if (k1 + 1 == 1) {
3628  h_sumAmplitudeLS1->Fill(bbbc / bbb1);
3629  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
3630  h_2DsumAmplitudeLS1->Fill(double(ieta), double(k3), bbbc);
3631  h_2D0sumAmplitudeLS1->Fill(double(ieta), double(k3), bbb1);
3632  h_sumAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
3633  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
3634  h_sumCutAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
3635  h_sum0AmplitudeperLS1->Fill(float(lscounterM1), bbb1);
3636  if (bbbc / bbb1 > 2. * lsdep_estimator4_HBdepth1_)
3637  h_sumAmplitudeperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3638  }
3639  if (k1 + 1 == 2) {
3640  h_sumAmplitudeLS2->Fill(bbbc / bbb1);
3641  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
3642  h_2DsumAmplitudeLS2->Fill(double(ieta), double(k3), bbbc);
3643  h_2D0sumAmplitudeLS2->Fill(double(ieta), double(k3), bbb1);
3644  h_sumAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
3645  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
3646  h_sumCutAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
3647  h_sum0AmplitudeperLS2->Fill(float(lscounterM1), bbb1);
3648  }
3649  }
3650  // HE:
3651  if (k0 == 1) {
3652  // HBdepth1
3653  if (k1 + 1 == 1) {
3654  h_sumAmplitudeLS3->Fill(bbbc / bbb1);
3655  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
3656  h_2DsumAmplitudeLS3->Fill(double(ieta), double(k3), bbbc);
3657  h_2D0sumAmplitudeLS3->Fill(double(ieta), double(k3), bbb1);
3658  h_sumAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
3659  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
3660  h_sumCutAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
3661  h_sum0AmplitudeperLS3->Fill(float(lscounterM1), bbb1);
3662  }
3663  if (k1 + 1 == 2) {
3664  h_sumAmplitudeLS4->Fill(bbbc / bbb1);
3665  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
3666  h_2DsumAmplitudeLS4->Fill(double(ieta), double(k3), bbbc);
3667  h_2D0sumAmplitudeLS4->Fill(double(ieta), double(k3), bbb1);
3668  h_sumAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
3669  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
3670  h_sumCutAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
3671  h_sum0AmplitudeperLS4->Fill(float(lscounterM1), bbb1);
3672  }
3673  if (k1 + 1 == 3) {
3674  h_sumAmplitudeLS5->Fill(bbbc / bbb1);
3675  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
3676  h_2DsumAmplitudeLS5->Fill(double(ieta), double(k3), bbbc);
3677  h_2D0sumAmplitudeLS5->Fill(double(ieta), double(k3), bbb1);
3678  h_sumAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
3679  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
3680  h_sumCutAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
3681  h_sum0AmplitudeperLS5->Fill(float(lscounterM1), bbb1);
3682  }
3683  }
3684  // HF:
3685  if (k0 == 3) {
3686  // HBdepth1
3687  if (k1 + 1 == 1) {
3688  h_sumAmplitudeLS6->Fill(bbbc / bbb1);
3689  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
3690  h_2DsumAmplitudeLS6->Fill(double(ieta), double(k3), bbbc);
3691  h_2D0sumAmplitudeLS6->Fill(double(ieta), double(k3), bbb1);
3692  h_sumAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
3693  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
3694  h_sumCutAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
3695  h_sum0AmplitudeperLS6->Fill(float(lscounterM1), bbb1);
3696  }
3697  if (k1 + 1 == 2) {
3698  h_sumAmplitudeLS7->Fill(bbbc / bbb1);
3699  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
3700  h_2DsumAmplitudeLS7->Fill(double(ieta), double(k3), bbbc);
3701  h_2D0sumAmplitudeLS7->Fill(double(ieta), double(k3), bbb1);
3702  h_sumAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
3703  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
3704  h_sumCutAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
3705  h_sum0AmplitudeperLS7->Fill(float(lscounterM1), bbb1);
3706  }
3707  }
3708  // HO:
3709  if (k0 == 2) {
3710  // HBdepth1
3711  if (k1 + 1 == 4) {
3712  h_sumAmplitudeLS8->Fill(bbbc / bbb1);
3713  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
3714  h_2DsumAmplitudeLS8->Fill(double(ieta), double(k3), bbbc);
3715  h_2D0sumAmplitudeLS8->Fill(double(ieta), double(k3), bbb1);
3716  h_sumAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
3717  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
3718  h_sumCutAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
3719  h_sum0AmplitudeperLS8->Fill(float(lscounterM1), bbb1);
3720  }
3721  }
3722  } //if(sumEstimator4[k0][k1][k2][k3] != 0.
3723  // ------------------------------------------------------------------------------------------------------------------------sumEstimator5
3724  if (sumEstimator5[k0][k1][k2][k3] != 0.) {
3725  // fill histoes:
3726  double bbbc = 0.;
3727  if (flagestimatornormalization_ == 0)
3728  bbbc = sumEstimator5[k0][k1][k2][k3] / nevcounter0;
3729  if (flagestimatornormalization_ == 1)
3730  bbbc = sumEstimator5[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3731  double bbb1 = 1.;
3732  if (flagestimatornormalization_ == 2) {
3733  bbbc = sumEstimator5[k0][k1][k2][k3];
3734  bbb1 = sum0Estimator[k0][k1][k2][k3];
3735  }
3736 
3737  // HB:
3738  if (k0 == 0) {
3739  // HBdepth1
3740  if (k1 + 1 == 1) {
3741  h_sumAmplLS1->Fill(bbbc / bbb1);
3742  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
3743  h_2DsumAmplLS1->Fill(double(ieta), double(k3), bbbc);
3744  h_2D0sumAmplLS1->Fill(double(ieta), double(k3), bbb1);
3745  h_sumAmplperLS1->Fill(float(lscounterM1), bbbc);
3746  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
3747  h_sumCutAmplperLS1->Fill(float(lscounterM1), bbbc);
3748  h_sum0AmplperLS1->Fill(float(lscounterM1), bbb1);
3749  if (bbbc / bbb1 > 2. * lsdep_estimator5_HBdepth1_)
3750  h_sumAmplperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3751  }
3752  if (k1 + 1 == 2) {
3753  h_sumAmplLS2->Fill(bbbc / bbb1);
3754  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
3755  h_2DsumAmplLS2->Fill(double(ieta), double(k3), bbbc);
3756  h_2D0sumAmplLS2->Fill(double(ieta), double(k3), bbb1);
3757  h_sumAmplperLS2->Fill(float(lscounterM1), bbbc);
3758  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
3759  h_sumCutAmplperLS2->Fill(float(lscounterM1), bbbc);
3760  h_sum0AmplperLS2->Fill(float(lscounterM1), bbb1);
3761  }
3762  }
3763  // HE:
3764  if (k0 == 1) {
3765  // HEdepth1
3766  if (k1 + 1 == 1) {
3767  h_sumAmplLS3->Fill(bbbc / bbb1);
3768  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
3769  h_2DsumAmplLS3->Fill(double(ieta), double(k3), bbbc);
3770  h_2D0sumAmplLS3->Fill(double(ieta), double(k3), bbb1);
3771  h_sumAmplperLS3->Fill(float(lscounterM1), bbbc);
3772  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
3773  h_sumCutAmplperLS3->Fill(float(lscounterM1), bbbc);
3774  h_sum0AmplperLS3->Fill(float(lscounterM1), bbb1);
3775  }
3776  if (k1 + 1 == 2) {
3777  h_sumAmplLS4->Fill(bbbc / bbb1);
3778  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
3779  h_2DsumAmplLS4->Fill(double(ieta), double(k3), bbbc);
3780  h_2D0sumAmplLS4->Fill(double(ieta), double(k3), bbb1);
3781  h_sumAmplperLS4->Fill(float(lscounterM1), bbbc);
3782  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
3783  h_sumCutAmplperLS4->Fill(float(lscounterM1), bbbc);
3784  h_sum0AmplperLS4->Fill(float(lscounterM1), bbb1);
3785  }
3786  if (k1 + 1 == 3) {
3787  h_sumAmplLS5->Fill(bbbc / bbb1);
3788  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
3789  h_2DsumAmplLS5->Fill(double(ieta), double(k3), bbbc);
3790  h_2D0sumAmplLS5->Fill(double(ieta), double(k3), bbb1);
3791  h_sumAmplperLS5->Fill(float(lscounterM1), bbbc);
3792  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
3793  h_sumCutAmplperLS5->Fill(float(lscounterM1), bbbc);
3794  h_sum0AmplperLS5->Fill(float(lscounterM1), bbb1);
3795  }
3796  }
3797  // HF:
3798  if (k0 == 3) {
3799  // HFdepth1
3800  if (k1 + 1 == 1) {
3801  h_sumAmplLS6->Fill(bbbc / bbb1);
3802  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
3803  h_2DsumAmplLS6->Fill(double(ieta), double(k3), bbbc);
3804  h_2D0sumAmplLS6->Fill(double(ieta), double(k3), bbb1);
3805  h_sumAmplperLS6->Fill(float(lscounterM1), bbbc);
3806  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
3807  h_sumCutAmplperLS6->Fill(float(lscounterM1), bbbc);
3808  h_sum0AmplperLS6->Fill(float(lscounterM1), bbb1);
3809  }
3810  if (k1 + 1 == 2) {
3811  h_sumAmplLS7->Fill(bbbc / bbb1);
3812  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
3813  h_2DsumAmplLS7->Fill(double(ieta), double(k3), bbbc);
3814  h_2D0sumAmplLS7->Fill(double(ieta), double(k3), bbb1);
3815  h_sumAmplperLS7->Fill(float(lscounterM1), bbbc);
3816  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
3817  h_sumCutAmplperLS7->Fill(float(lscounterM1), bbbc);
3818  h_sum0AmplperLS7->Fill(float(lscounterM1), bbb1);
3819  }
3820  }
3821  // HO:
3822  if (k0 == 2) {
3823  // HOdepth4
3824  if (k1 + 1 == 4) {
3825  h_sumAmplLS8->Fill(bbbc / bbb1);
3826  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
3827  h_2DsumAmplLS8->Fill(double(ieta), double(k3), bbbc);
3828  h_2D0sumAmplLS8->Fill(double(ieta), double(k3), bbb1);
3829  h_sumAmplperLS8->Fill(float(lscounterM1), bbbc);
3830  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
3831  h_sumCutAmplperLS8->Fill(float(lscounterM1), bbbc);
3832  h_sum0AmplperLS8->Fill(float(lscounterM1), bbb1);
3833  }
3834  }
3835  } //if(sumEstimator5[k0][k1][k2][k3] != 0.
3836  // ------------------------------------------------------------------------------------------------------------------------sumEstimator6 (Error-B)
3837  if (sumEstimator6[k0][k1][k2][k3] != 0.) {
3838  // fill histoes:
3839  double bbbc = 0.;
3840  if (flagestimatornormalization_ == 0)
3841  bbbc = sumEstimator6[k0][k1][k2][k3] / nevcounter0;
3842  if (flagestimatornormalization_ == 1)
3843  bbbc = sumEstimator6[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3844  double bbb1 = 1.;
3845  if (flagestimatornormalization_ == 2) {
3846  bbbc = sumEstimator6[k0][k1][k2][k3];
3847  bbb1 = sum0Estimator[k0][k1][k2][k3];
3848  }
3849 
3850  // HB:
3851  if (k0 == 0) {
3852  // HBdepth1
3853  if (k1 + 1 == 1) {
3854  h_sumErrorBLS1->Fill(bbbc / bbb1);
3855  h_2DsumErrorBLS1->Fill(double(ieta), double(k3), bbbc);
3856  h_2D0sumErrorBLS1->Fill(double(ieta), double(k3), bbb1);
3857  h_sumErrorBperLS1->Fill(float(lscounterM1), bbbc);
3858  h_sum0ErrorBperLS1->Fill(float(lscounterM1), bbb1);
3859  }
3860  if (k1 + 1 == 2) {
3861  h_sumErrorBLS2->Fill(bbbc / bbb1);
3862  h_2DsumErrorBLS2->Fill(double(ieta), double(k3), bbbc);
3863  h_2D0sumErrorBLS2->Fill(double(ieta), double(k3), bbb1);
3864  h_sumErrorBperLS2->Fill(float(lscounterM1), bbbc);
3865  h_sum0ErrorBperLS2->Fill(float(lscounterM1), bbb1);
3866  }
3867  }
3868  // HE:
3869  if (k0 == 1) {
3870  // HEdepth1
3871  if (k1 + 1 == 1) {
3872  h_sumErrorBLS3->Fill(bbbc / bbb1);
3873  h_2DsumErrorBLS3->Fill(double(ieta), double(k3), bbbc);
3874  h_2D0sumErrorBLS3->Fill(double(ieta), double(k3), bbb1);
3875  h_sumErrorBperLS3->Fill(float(lscounterM1), bbbc);
3876  h_sum0ErrorBperLS3->Fill(float(lscounterM1), bbb1);
3877  }
3878  if (k1 + 1 == 2) {
3879  h_sumErrorBLS4->Fill(bbbc / bbb1);
3880  h_2DsumErrorBLS4->Fill(double(ieta), double(k3), bbbc);
3881  h_2D0sumErrorBLS4->Fill(double(ieta), double(k3), bbb1);
3882  h_sumErrorBperLS4->Fill(float(lscounterM1), bbbc);
3883  h_sum0ErrorBperLS4->Fill(float(lscounterM1), bbb1);
3884  }
3885  if (k1 + 1 == 3) {
3886  h_sumErrorBLS5->Fill(bbbc / bbb1);
3887  h_2DsumErrorBLS5->Fill(double(ieta), double(k3), bbbc);
3888  h_2D0sumErrorBLS5->Fill(double(ieta), double(k3), bbb1);
3889  h_sumErrorBperLS5->Fill(float(lscounterM1), bbbc);
3890  h_sum0ErrorBperLS5->Fill(float(lscounterM1), bbb1);
3891  }
3892  }
3893  // HF:
3894  if (k0 == 3) {
3895  // HFdepth1
3896  if (k1 + 1 == 1) {
3897  h_sumErrorBLS6->Fill(bbbc / bbb1);
3898  h_2DsumErrorBLS6->Fill(double(ieta), double(k3), bbbc);
3899  h_2D0sumErrorBLS6->Fill(double(ieta), double(k3), bbb1);
3900  h_sumErrorBperLS6->Fill(float(lscounterM1), bbbc);
3901  h_sum0ErrorBperLS6->Fill(float(lscounterM1), bbb1);
3902  }
3903  if (k1 + 1 == 2) {
3904  h_sumErrorBLS7->Fill(bbbc / bbb1);
3905  h_2DsumErrorBLS7->Fill(double(ieta), double(k3), bbbc);
3906  h_2D0sumErrorBLS7->Fill(double(ieta), double(k3), bbb1);
3907  h_sumErrorBperLS7->Fill(float(lscounterM1), bbbc);
3908  h_sum0ErrorBperLS7->Fill(float(lscounterM1), bbb1);
3909  }
3910  }
3911  // HO:
3912  if (k0 == 2) {
3913  // HOdepth4
3914  if (k1 + 1 == 4) {
3915  h_sumErrorBLS8->Fill(bbbc / bbb1);
3916  h_2DsumErrorBLS8->Fill(double(ieta), double(k3), bbbc);
3917  h_2D0sumErrorBLS8->Fill(double(ieta), double(k3), bbb1);
3918  h_sumErrorBperLS8->Fill(float(lscounterM1), bbbc);
3919  h_sum0ErrorBperLS8->Fill(float(lscounterM1), bbb1);
3920  }
3921  }
3923  } //if(sumEstimator6[k0][k1][k2][k3] != 0.
3924  } //for k2
3925  // occupancy distributions for error-A:
3926  // HB
3927  if (k0 == 0 && k1 == 0) {
3928  if (pcountmin1 > 0) {
3929  if (pcountmin1 < pnnmin1)
3930  pnnmin1 = pcountmin1;
3931  pcountmin1 = 0;
3932  pnnbins1++;
3933  }
3934  if (mcountmin1 > 0) {
3935  if (mcountmin1 < mnnmin1)
3936  mnnmin1 = mcountmin1;
3937  mcountmin1 = 0;
3938  mnnbins1++;
3939  }
3940  } //
3941  // HE
3942  if (k0 == 1 && k1 == 0) {
3943  if (pcountmin3 > 0) {
3944  if (pcountmin3 < pnnmin3)
3945  pnnmin3 = pcountmin3;
3946  pcountmin3 = 0;
3947  pnnbins3++;
3948  }
3949  if (mcountmin3 > 0) {
3950  if (mcountmin3 < mnnmin3)
3951  mnnmin3 = mcountmin3;
3952  mcountmin3 = 0;
3953  mnnbins3++;
3954  }
3955  } //
3956  // HO
3957  if (k0 == 2 && k1 == 3) {
3958  if (pcountmin8 > 0) {
3959  if (pcountmin8 < pnnmin8)
3960  pnnmin8 = pcountmin8;
3961  pcountmin8 = 0;
3962  pnnbins8++;
3963  }
3964  if (mcountmin8 > 0) {
3965  if (mcountmin8 < mnnmin8)
3966  mnnmin8 = mcountmin8;
3967  mcountmin8 = 0;
3968  mnnbins8++;
3969  }
3970  } //
3971  // HF
3972  if (k0 == 3 && k1 == 0) {
3973  if (pcountmin6 > 0) {
3974  if (pcountmin6 < pnnmin6)
3975  pnnmin6 = pcountmin6;
3976  pcountmin6 = 0;
3977  pnnbins6++;
3978  }
3979  if (mcountmin6 > 0) {
3980  if (mcountmin6 < mnnmin6)
3981  mnnmin6 = mcountmin6;
3982  mcountmin6 = 0;
3983  mnnbins6++;
3984  }
3985  } //
3986 
3987  } //for k3
3988  } //for k1
3989  } //for k0
3993 
3994  // cout<<"=============================== lscounterM1 = "<< (float)lscounterM1 <<endl;
3995 
3996  float patiooccupancy1 = 0.;
3997  if (pcountall1 != 0)
3998  patiooccupancy1 = (float)pnnmin1 * mnnbins1 / pcountall1;
3999  h_RatioOccupancy_HBM->Fill(float(lscounterM1), patiooccupancy1);
4000  float matiooccupancy1 = 0.;
4001  if (mcountall1 != 0)
4002  matiooccupancy1 = (float)mnnmin1 * mnnbins1 / mcountall1;
4003  h_RatioOccupancy_HBP->Fill(float(lscounterM1), matiooccupancy1);
4004 
4005  float patiooccupancy3 = 0.;
4006  if (pcountall3 != 0)
4007  patiooccupancy3 = (float)pnnmin3 * mnnbins3 / pcountall3;
4008  h_RatioOccupancy_HEM->Fill(float(lscounterM1), patiooccupancy3);
4009  float matiooccupancy3 = 0.;
4010  if (mcountall3 != 0)
4011  matiooccupancy3 = (float)mnnmin3 * mnnbins3 / mcountall3;
4012  h_RatioOccupancy_HEP->Fill(float(lscounterM1), matiooccupancy3);
4013 
4014  float patiooccupancy6 = 0.;
4015  if (pcountall6 != 0)
4016  patiooccupancy6 = (float)pnnmin6 * mnnbins6 / pcountall6;
4017  h_RatioOccupancy_HFM->Fill(float(lscounterM1), patiooccupancy6);
4018  float matiooccupancy6 = 0.;
4019  if (mcountall6 != 0)
4020  matiooccupancy6 = (float)mnnmin6 * mnnbins6 / mcountall6;
4021  h_RatioOccupancy_HFP->Fill(float(lscounterM1), matiooccupancy6);
4022 
4023  float patiooccupancy8 = 0.;
4024  if (pcountall8 != 0)
4025  patiooccupancy8 = (float)pnnmin8 * mnnbins8 / pcountall8;
4026  h_RatioOccupancy_HOM->Fill(float(lscounterM1), patiooccupancy8);
4027  float matiooccupancy8 = 0.;
4028  if (mcountall8 != 0)
4029  matiooccupancy8 = (float)mnnmin8 * mnnbins8 / mcountall8;
4030  h_RatioOccupancy_HOP->Fill(float(lscounterM1), matiooccupancy8);
4031 
4032  for (int k0 = 0; k0 < nsub; k0++) {
4033  for (int k1 = 0; k1 < ndepth; k1++) {
4034  for (int k2 = 0; k2 < neta; k2++) {
4035  for (int k3 = 0; k3 < nphi; k3++) {
4036  // reset massives:
4037  sumEstimator0[k0][k1][k2][k3] = 0.;
4038  sumEstimator1[k0][k1][k2][k3] = 0.;
4039  sumEstimator2[k0][k1][k2][k3] = 0.;
4040  sumEstimator3[k0][k1][k2][k3] = 0.;
4041  sumEstimator4[k0][k1][k2][k3] = 0.;
4042  sumEstimator5[k0][k1][k2][k3] = 0.;
4043  sumEstimator6[k0][k1][k2][k3] = 0.;
4044  sum0Estimator[k0][k1][k2][k3] = 0.;
4045  } //for
4046  } //for
4047  } //for
4048  } //for
4049 
4050  //------------------------------------------------------ averSIGNAL
4059 
4064 
4065  //------------------------------------------------------
4074 
4079 
4080  //------------------------------------------------------ averNOSIGNAL
4089 
4094 
4095  //------------------------------------------------------
4104 
4109 
4110  //------------------------------------------------------ maxxSA and maxxOccupancy
4111  h_maxxSUMAmpl_HB->Fill(float(lscounterM1), maxxSUM1);
4112  h_maxxSUMAmpl_HE->Fill(float(lscounterM1), maxxSUM2);
4113  h_maxxSUMAmpl_HO->Fill(float(lscounterM1), maxxSUM3);
4114  h_maxxSUMAmpl_HF->Fill(float(lscounterM1), maxxSUM4);
4115  maxxSUM1 = 0.;
4116  maxxSUM2 = 0.;
4117  maxxSUM3 = 0.;
4118  maxxSUM4 = 0.;
4119  //------------------------------------------------------
4120  h_maxxOCCUP_HB->Fill(float(lscounterM1), maxxOCCUP1);
4121  h_maxxOCCUP_HE->Fill(float(lscounterM1), maxxOCCUP2);
4122  h_maxxOCCUP_HO->Fill(float(lscounterM1), maxxOCCUP3);
4123  h_maxxOCCUP_HF->Fill(float(lscounterM1), maxxOCCUP4);
4124  maxxOCCUP1 = 0.;
4125  maxxOCCUP2 = 0.;
4126  maxxOCCUP3 = 0.;
4127  maxxOCCUP4 = 0.;
4128 
4129  //------------------------------------------------------
4130  } //if(nevcounter0 != 0)
4131  // POINT1
4132 
4134  // for upgrade:
4135  for (int k1 = 0; k1 < ndepth; k1++) {
4136  for (int k2 = 0; k2 < neta; k2++) {
4137  for (int k3 = 0; k3 < nphi; k3++) {
4138  if (studyCalibCellsHist_) {
4139  signal[k1][k2][k3] = 0.;
4140  calibt[k1][k2][k3] = 0.;
4141  calibcapiderror[k1][k2][k3] = 0;
4142  caliba[k1][k2][k3] = 0.;
4143  calibw[k1][k2][k3] = 0.;
4144  calib0[k1][k2][k3] = 0.;
4145  signal3[k1][k2][k3] = 0.;
4146  calib3[k1][k2][k3] = 0.;
4147  calib2[k1][k2][k3] = 0.;
4148  }
4150  for (int k0 = 0; k0 < nsub; k0++) {
4151  badchannels[k0][k1][k2][k3] = 0;
4152  } //for
4153  } //if
4154 
4155  } //for
4156  } //for
4157  } //for
4158  for (int k0 = 0; k0 < nsub; k0++) {
4159  for (int k1 = 0; k1 < ndepth; k1++) {
4160  for (int k2 = 0; k2 < neta; k2++) {
4161  for (int k3 = 0; k3 < nphi; k3++) {
4162  amplitudechannel0[k0][k1][k2][k3] = 0.;
4163  amplitudechannel[k0][k1][k2][k3] = 0.;
4164  amplitudechannel2[k0][k1][k2][k3] = 0.;
4165 
4166  tocamplchannel[k0][k1][k2][k3] = 0.;
4167  maprphinorm[k0][k1][k2][k3] = 0.;
4168  // phi-symmetry monitoring for calibration group:
4169  // rec energy:
4170  recSignalEnergy0[k0][k1][k2][k3] = 0.;
4171  recSignalEnergy1[k0][k1][k2][k3] = 0.;
4172  recSignalEnergy2[k0][k1][k2][k3] = 0.;
4173  recNoiseEnergy0[k0][k1][k2][k3] = 0.;
4174  recNoiseEnergy1[k0][k1][k2][k3] = 0.;
4175  recNoiseEnergy2[k0][k1][k2][k3] = 0.;
4176 
4177  } //k3
4178  } //k2
4179  } //k1
4180  } //k0
4184 
4185  if (flagToUseDigiCollectionsORNot_ != 0) {
4189  if (flagupgradeqie1011_ != 2 && flagupgradeqie1011_ != 3 && flagupgradeqie1011_ != 6 &&
4192  iEvent.getByToken(tok_hf_, hf);
4193  bool gotHFDigis = true;
4194  if (!(iEvent.getByToken(tok_hf_, hf))) {
4195  gotHFDigis = false;
4196  } //this is a boolean set up to check if there are HFdigis in input root file
4197  if (!(hf.isValid())) {
4198  gotHFDigis = false;
4199  } //if it is not there, leave it false
4200  if (!gotHFDigis) {
4201  std::cout << " ****************************** =========================== No HFDigiCollection found "
4202  << std::endl;
4203  } else {
4205  for (HFDigiCollection::const_iterator digi = hf->begin(); digi != hf->end(); digi++) {
4206  eta = digi->id().ieta();
4207  phi = digi->id().iphi();
4208  depth = digi->id().depth();
4209  nTS = digi->size();
4211  counterhf++;
4214  fillDigiErrorsHF(digi);
4216  if (recordHistoes_)
4217  fillDigiAmplitudeHF(digi);
4220  int iphi = phi - 1;
4221  int ieta = eta;
4222  if (ieta > 0)
4223  ieta -= 1;
4224  if (nTS <= numOfTS)
4225  for (int i = 0; i < nTS; i++) {
4226  TS_data[i] = adc2fC[digi->sample(i).adc()];
4227  signal[3][ieta + 41][iphi] += TS_data[i];
4228  if (i > 1 && i < 6)
4229  signal3[3][ieta + 41][iphi] += TS_data[i];
4230  } // TS
4231  } // if(recordHistoes_ && studyCalibCellsHist_)
4232  } // for
4233  } // hf.isValid
4234  } // end flagupgrade
4235 
4238  // upgrade:
4239  if (flagupgradeqie1011_ != 1) {
4241  iEvent.getByToken(tok_qie10_, hfqie10);
4242  const QIE10DigiCollection& qie10dc =
4243  *(hfqie10);
4244  bool gotQIE10Digis = true;
4245  if (!(iEvent.getByToken(tok_qie10_, hfqie10))) {
4246  gotQIE10Digis = false;
4247  } //this is a boolean set up to check if there are HFdigis in input root file
4248  if (!(hfqie10.isValid())) {
4249  gotQIE10Digis = false;
4250  } //if it is not there, leave it false
4251  if (!gotQIE10Digis) {
4252  std::cout << " No QIE10DigiCollection collection is found " << std::endl;
4253  } else {
4255  double totalAmplitudeHF = 0.;
4256  for (unsigned int j = 0; j < qie10dc.size(); j++) {
4257  QIE10DataFrame qie10df = static_cast<QIE10DataFrame>(qie10dc[j]);
4258  DetId detid = qie10df.detid();
4259  HcalDetId hcaldetid = HcalDetId(detid);
4260  int eta = hcaldetid.ieta();
4261  int phi = hcaldetid.iphi();
4262  // int depth = hcaldetid.depth();
4263  // loop over the samples in the digi
4264  nTS = qie10df.samples();
4266  counterhfqie10++;
4269  fillDigiErrorsHFQIE10(qie10df);
4271  if (recordHistoes_)
4272  fillDigiAmplitudeHFQIE10(qie10df);
4274  // if(recordHistoes_ ) {
4276  int iphi = phi - 1;
4277  int ieta = eta;
4278  if (ieta > 0)
4279  ieta -= 1;
4280  double amplitudefullTSs = 0.;
4281  double nnnnnnTS = 0.;
4282  for (int i = 0; i < nTS; ++i) {
4283  // j - QIE channel
4284  // i - time sample (TS)
4285  int adc = qie10df[i].adc();
4286  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4287  // float charge = adc2fC_QIE10[ adc ];
4288  TS_data[i] = adc2fC_QIE10[adc];
4289  signal[3][ieta + 41][iphi] += TS_data[i];
4290  totalAmplitudeHF += TS_data[i];
4291  amplitudefullTSs += TS_data[i];
4292  nnnnnnTS++;
4293  if (i > 1 && i < 6)
4294  signal3[3][ieta + 41][iphi] += TS_data[i];
4295 
4296  } // TS
4297  h_numberofhitsHFtest->Fill(nnnnnnTS);
4298  h_AmplitudeHFtest->Fill(amplitudefullTSs);
4299  } // if(recordHistoes_ && studyCalibCellsHist_)
4300  } // for
4301  h_totalAmplitudeHF->Fill(totalAmplitudeHF);
4302  h_totalAmplitudeHFperEvent->Fill(float(eventcounter), totalAmplitudeHF);
4303  } // hfqie10.isValid
4304  } // end flagupgrade
4305  //end upgrade
4306  //
4307  //
4309  int qwert1 = 0;
4310  int qwert2 = 0;
4311  int qwert3 = 0;
4312  int qwert4 = 0;
4313  int qwert5 = 0;
4314  if (flagupgradeqie1011_ != 2 && flagupgradeqie1011_ != 3) {
4316  iEvent.getByToken(tok_hbhe_, hbhe);
4317  bool gotHBHEDigis = true;
4318  if (!(iEvent.getByToken(tok_hbhe_, hbhe)))
4319  gotHBHEDigis = false; //this is a boolean set up to check if there are HBHEgigis in input root file
4320  if (!(hbhe.isValid()))
4321  gotHBHEDigis = false; //if it is not there, leave it false
4322  if (!gotHBHEDigis) {
4323  std::cout << " No HBHEDigiCollection collection is found " << std::endl;
4324  } else {
4325  // unsigned int NHBHEDigiCollectionsize = hbhe->size();
4326  double totalAmplitudeHB = 0.;
4327  double totalAmplitudeHE = 0.;
4328  double nnnnnnTSHB = 0.;
4329  double nnnnnnTSHE = 0.;
4330 
4331  for (HBHEDigiCollection::const_iterator digi = hbhe->begin(); digi != hbhe->end(); digi++) {
4332  eta = digi->id().ieta();
4333  phi = digi->id().iphi();
4334  depth = digi->id().depth();
4335  nTS = digi->size();
4337  nnnnnnhbhe++;
4338  nnnnnn++;
4340  if (digi->id().subdet() == HcalBarrel && depth == 1 && qwert1 == 0) {
4341  nnnnnn1++;
4342  qwert1 = 1;
4343  }
4344  if (digi->id().subdet() == HcalBarrel && depth == 2 && qwert2 == 0) {
4345  nnnnnn2++;
4346  qwert2 = 1;
4347  }
4348  if (digi->id().subdet() == HcalEndcap && depth == 1 && qwert3 == 0) {
4349  nnnnnn3++;
4350  qwert3 = 1;
4351  }
4352  if (digi->id().subdet() == HcalEndcap && depth == 2 && qwert4 == 0) {
4353  nnnnnn4++;
4354  qwert4 = 1;
4355  }
4356  if (digi->id().subdet() == HcalEndcap && depth == 3 && qwert5 == 0) {
4357  nnnnnn5++;
4358  qwert5 = 1;
4359  }
4362  fillDigiErrors(digi);
4364  if (recordHistoes_)
4365  fillDigiAmplitude(digi);
4366 
4368  int iphi = phi - 1;
4369  int ieta = eta;
4370  if (ieta > 0)
4371  ieta -= 1;
4373  if (digi->id().subdet() == HcalBarrel) {
4374  double amplitudefullTSs = 0.;
4375  nnnnnnTSHB++;
4376  if (nTS <= numOfTS)
4377  for (int i = 0; i < nTS; i++) {
4378  TS_data[i] = adc2fC[digi->sample(i).adc()];
4379  signal[0][ieta + 41][iphi] += TS_data[i];
4380  amplitudefullTSs += TS_data[i];
4381  totalAmplitudeHB += TS_data[i];
4382  if (i > 1 && i < 6)
4383  signal3[0][ieta + 41][iphi] += TS_data[i];
4384  }
4385  h_AmplitudeHBtest->Fill(amplitudefullTSs);
4386  } // HB
4388  if (digi->id().subdet() == HcalEndcap) {
4389  double amplitudefullTSs = 0.;
4390  nnnnnnTSHE++;
4391  if (nTS <= numOfTS)
4392  for (int i = 0; i < nTS; i++) {
4393  TS_data[i] = adc2fC[digi->sample(i).adc()];
4394  signal[1][ieta + 41][iphi] += TS_data[i];
4395  totalAmplitudeHE += TS_data[i];
4396  amplitudefullTSs += TS_data[i];
4397  if (i > 1 && i < 6)
4398  signal3[1][ieta + 41][iphi] += TS_data[i];
4399  }
4400  h_AmplitudeHEtest->Fill(amplitudefullTSs);
4401  } // HE
4402 
4403  } //if(recordHistoes_ && studyCalibCellsHist_)
4405  } //if(recordNtuples_)
4406  } // for HBHE digis
4407  if (totalAmplitudeHB != 0.) {
4408  h_numberofhitsHBtest->Fill(nnnnnnTSHB);
4409  h_totalAmplitudeHB->Fill(totalAmplitudeHB);
4410  h_totalAmplitudeHBperEvent->Fill(float(eventcounter), totalAmplitudeHB);
4411  }
4412  if (totalAmplitudeHE != 0.) {
4413  h_numberofhitsHEtest->Fill(nnnnnnTSHE);
4414  h_totalAmplitudeHE->Fill(totalAmplitudeHE);
4415  h_totalAmplitudeHEperEvent->Fill(float(eventcounter), totalAmplitudeHE);
4416  }
4417  } //hbhe.isValid
4418  } // end flagupgrade
4419  //---------------------------------------------------------------
4421  // upgrade:
4422  if (flagupgradeqie1011_ != 1 && flagupgradeqie1011_ != 4 && flagupgradeqie1011_ != 5 &&
4423  flagupgradeqie1011_ != 10) {
4425  iEvent.getByToken(tok_qie11_, heqie11);
4426  const QIE11DigiCollection& qie11dc =
4427  *(heqie11);
4428  bool gotQIE11Digis = true;
4429  if (!(iEvent.getByToken(tok_qie11_, heqie11)))
4430  gotQIE11Digis = false; //this is a boolean set up to check if there are QIE11gigis in input root file
4431  if (!(heqie11.isValid()))
4432  gotQIE11Digis = false; //if it is not there, leave it false
4433  if (!gotQIE11Digis) {
4434  std::cout << " No QIE11DigiCollection collection is found " << std::endl;
4435  } else {
4437  double totalAmplitudeHBQIE11 = 0.;
4438  double totalAmplitudeHEQIE11 = 0.;
4439  double nnnnnnTSHBQIE11 = 0.;
4440  double nnnnnnTSHEQIE11 = 0.;
4441  for (unsigned int j = 0; j < qie11dc.size(); j++) {
4442  QIE11DataFrame qie11df = static_cast<QIE11DataFrame>(qie11dc[j]);
4443  DetId detid = qie11df.detid();
4444  HcalDetId hcaldetid = HcalDetId(detid);
4445  int eta = hcaldetid.ieta();
4446  int phi = hcaldetid.iphi();
4447  int depth = hcaldetid.depth();
4448  if (depth == 0)
4449  return;
4450  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
4451  // loop over the samples in the digi
4452  nTS = qie11df.samples();
4454  nnnnnnhbheqie11++;
4455  nnnnnn++;
4457  fillDigiErrorsQIE11(qie11df);
4459  if (recordHistoes_)
4460  fillDigiAmplitudeQIE11(qie11df);
4463  if (sub == 1 && depth == 1 && qwert1 == 0) {
4464  nnnnnn1++;
4465  qwert1 = 1;
4466  }
4467  if (sub == 1 && depth == 2 && qwert2 == 0) {
4468  nnnnnn2++;
4469  qwert2 = 1;
4470  }
4471  if (sub == 2 && depth == 1 && qwert3 == 0) {
4472  nnnnnn3++;
4473  qwert3 = 1;
4474  }
4475  if (sub == 2 && depth == 2 && qwert4 == 0) {
4476  nnnnnn4++;
4477  qwert4 = 1;
4478  }
4479  if (sub == 2 && depth == 3 && qwert5 == 0) {
4480  nnnnnn5++;
4481  qwert5 = 1;
4482  }
4483 
4485  int iphi = phi - 1;
4486  int ieta = eta;
4487  if (ieta > 0)
4488  ieta -= 1;
4489  // HB:
4490  if (sub == 1) {
4491  double amplitudefullTSs1 = 0.;
4492  double amplitudefullTSs6 = 0.;
4493  nnnnnnTSHBQIE11++;
4494  for (int i = 0; i < nTS; ++i) {
4495  int adc = qie11df[i].adc();
4496  double charge1 = adc2fC_QIE11_shunt1[adc];
4497  double charge6 = adc2fC_QIE11_shunt6[adc];
4498  amplitudefullTSs1 += charge1;
4499  amplitudefullTSs6 += charge6;
4500  double charge = charge6;
4501  TS_data[i] = charge;
4502  signal[0][ieta + 41][iphi] += charge;
4503  if (i > 1 && i < 6)
4504  signal3[0][ieta + 41][iphi] += charge;
4505  totalAmplitudeHBQIE11 += charge;
4506  } //for
4507  h_AmplitudeHBtest1->Fill(amplitudefullTSs1, 1.);
4508  h_AmplitudeHBtest6->Fill(amplitudefullTSs6, 1.);
4509  } //HB end
4510  // HE:
4511  if (sub == 2) {
4512  double amplitudefullTSs1 = 0.;
4513  double amplitudefullTSs6 = 0.;
4514  nnnnnnTSHEQIE11++;
4515  for (int i = 0; i < nTS; i++) {
4516  int adc = qie11df[i].adc();
4517  double charge1 = adc2fC_QIE11_shunt1[adc];
4518  double charge6 = adc2fC_QIE11_shunt6[adc];
4519  amplitudefullTSs1 += charge1;
4520  amplitudefullTSs6 += charge6;
4521  double charge = charge6;
4522  TS_data[i] = charge;
4523  signal[1][ieta + 41][iphi] += charge;
4524  if (i > 1 && i < 6)
4525  signal3[1][ieta + 41][iphi] += charge;
4526  totalAmplitudeHEQIE11 += charge;
4527  } //for
4528  h_AmplitudeHEtest1->Fill(amplitudefullTSs1, 1.);
4529  h_AmplitudeHEtest6->Fill(amplitudefullTSs6, 1.);
4530 
4531  } //HE end
4532  } //if(recordHistoes_ && studyCalibCellsHist_)
4533  } // for QIE11 digis
4534 
4535  if (totalAmplitudeHBQIE11 != 0.) {
4536  h_numberofhitsHBtest->Fill(nnnnnnTSHBQIE11);
4537  h_totalAmplitudeHB->Fill(totalAmplitudeHBQIE11);
4538  h_totalAmplitudeHBperEvent->Fill(float(eventcounter), totalAmplitudeHBQIE11);
4539  }
4540  if (totalAmplitudeHEQIE11 != 0.) {
4541  h_numberofhitsHEtest->Fill(nnnnnnTSHEQIE11);
4542  h_totalAmplitudeHE->Fill(totalAmplitudeHEQIE11);
4543  h_totalAmplitudeHEperEvent->Fill(float(eventcounter), totalAmplitudeHEQIE11);
4544  }
4545  } //heqie11.isValid
4546  } // end flagupgrade
4547 
4550  iEvent.getByToken(tok_ho_, ho);
4551  bool gotHODigis = true;
4552  if (!(iEvent.getByToken(tok_ho_, ho)))
4553  gotHODigis = false; //this is a boolean set up to check if there are HOgigis in input root file
4554  if (!(ho.isValid()))
4555  gotHODigis = false; //if it is not there, leave it false
4556  if (!gotHODigis) {
4557  // if(!ho.isValid()) {
4558  std::cout << " No HO collection is found " << std::endl;
4559  } else {
4560  int qwert6 = 0;
4561  double totalAmplitudeHO = 0.;
4562  for (HODigiCollection::const_iterator digi = ho->begin(); digi != ho->end(); digi++) {
4563  eta = digi->id().ieta();
4564  phi = digi->id().iphi();
4565  depth = digi->id().depth();
4566  nTS = digi->size();
4568  counterho++;
4570  if (qwert6 == 0) {
4571  nnnnnn6++;
4572  qwert6 = 1;
4573  }
4576  fillDigiErrorsHO(digi);
4578  if (recordHistoes_)
4579  fillDigiAmplitudeHO(digi);
4582  int iphi = phi - 1;
4583  int ieta = eta;
4584  if (ieta > 0)
4585  ieta -= 1;
4586  double nnnnnnTS = 0.;
4587  double amplitudefullTSs = 0.;
4588  if (nTS <= numOfTS)
4589  for (int i = 0; i < nTS; i++) {
4590  TS_data[i] = adc2fC[digi->sample(i).adc()];
4591  amplitudefullTSs += TS_data[i];
4592  signal[2][ieta + 41][iphi] += TS_data[i];
4593  totalAmplitudeHO += TS_data[i];
4594  if (i > 1 && i < 6)
4595  signal3[2][ieta + 41][iphi] += TS_data[i];
4596  nnnnnnTS++;
4597  } //if for
4598  h_AmplitudeHOtest->Fill(amplitudefullTSs);
4599  h_numberofhitsHOtest->Fill(nnnnnnTS);
4600  } //if(recordHistoes_ && studyCalibCellsHist_)
4601  } //for HODigiCollection
4602 
4603  h_totalAmplitudeHO->Fill(totalAmplitudeHO);
4604  h_totalAmplitudeHOperEvent->Fill(float(eventcounter), totalAmplitudeHO);
4605  } //ho.isValid(
4606  } // flagToUseDigiCollectionsORNot_
4607 
4609  // AZ 04.11.2019
4615  // HBHE: HBHERecHitCollection hbheNoise Noise
4617  iEvent.getByToken(tok_hbheNoise_, hbheNoise);
4618  bool gotHBHERecHitsNoise = true;
4619  if (!(iEvent.getByToken(tok_hbheNoise_, hbheNoise)))
4620  gotHBHERecHitsNoise =
4621  false; //this is a boolean set up to check if there are HBHERecHitsNoise in input root file
4622  if (!(hbheNoise.isValid()))
4623  gotHBHERecHitsNoise = false; //if it is not there, leave it false
4624  if (!gotHBHERecHitsNoise) {
4625  // if(!hbheNoise.isValid()) {
4626  std::cout << " No RecHits HBHENoise collection is found " << std::endl;
4627  } else {
4628  for (HBHERecHitCollection::const_iterator hbheItr = hbheNoise->begin(); hbheItr != hbheNoise->end();
4629  hbheItr++) {
4630  // Recalibration of energy
4631  float icalconst = 1.;
4632  // DetId mydetid = hbheItr->id().rawId();
4633  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4634  HBHERecHit aHit(hbheItr->id(), hbheItr->eraw() * icalconst, hbheItr->time());
4635  // HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
4636  double energyhit = aHit.energy();
4637  DetId id = (*hbheItr).detid();
4638  HcalDetId hid = HcalDetId(id);
4639  int sub = ((hid).rawId() >> 25) & 0x7;
4640 
4641  if (sub == 1)
4642  h_energyhitNoise_HB->Fill(energyhit, 1.);
4643  if (sub == 2)
4644  h_energyhitNoise_HE->Fill(energyhit, 1.);
4645  // if(fabs(energyhit) > 40. ) continue;
4646 
4647  //std::cout<<sub<<std::endl;
4648  if (hid.depth() == 1 && sub == 1 && hid.iphi() == 25) {
4649  if (verbosity < 0)
4650  std::cout << " Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4651  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4652  }
4653  if (hid.depth() == 1 && sub == 2 && hid.iphi() == 25) {
4654  if (verbosity < 0)
4655  std::cout << " Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4656  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4657  }
4658  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4659  if (ieta > 0)
4660  ieta -= 1; // -15 ... -1; 0... 14 for HB
4661  int iphi = hid.iphi() - 1;
4662  int mdepth = hid.depth();
4663  recNoiseEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4664  recNoiseEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4665  recNoiseEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4666  } // hbheNoise
4667  } //hbheNoise.isValid(
4669 
4670  // HF: HFRecHitCollection hfNoise Noise
4672  iEvent.getByToken(tok_hfNoise_, hfNoise);
4673  bool gotHFRecHitsNoise = true;
4674  if (!(iEvent.getByToken(tok_hfNoise_, hfNoise)))
4675  gotHFRecHitsNoise = false; //this is a boolean set up to check if there are HFRecHitsNoise in input root file
4676  if (!(hfNoise.isValid()))
4677  gotHFRecHitsNoise = false; //if it is not there, leave it false
4678  if (!gotHFRecHitsNoise) {
4679  // if(!hfNoise.isValid()) {
4680  std::cout << " No RecHits HFNoise collection is found " << std::endl;
4681  } else {
4682  for (HFRecHitCollection::const_iterator hfItr = hfNoise->begin(); hfItr != hfNoise->end(); hfItr++) {
4683  // Recalibration of energy
4684  float icalconst = 1.;
4685  // DetId mydetid = hfItr->id().rawId();
4686  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4687  HFRecHit aHit(hfItr->id(), hfItr->energy() * icalconst, hfItr->time());
4688  double energyhit = aHit.energy();
4689  DetId id = (*hfItr).detid();
4690  HcalDetId hid = HcalDetId(id);
4691  int sub = ((hid).rawId() >> 25) & 0x7;
4692 
4693  h_energyhitNoise_HF->Fill(energyhit, 1.);
4694  // if(fabs(energyhit) > 40. ) continue;
4695 
4696  //std::cout<<sub<<std::endl;
4697  if (hid.iphi() == 25) {
4698  if (verbosity < 0)
4699  std::cout << "HF Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4700  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4701  }
4702  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4703  if (ieta > 0)
4704  ieta -= 1; // -15 ... -1; 0... 14 for HB
4705  int iphi = hid.iphi() - 1;
4706  int mdepth = hid.depth();
4707  recNoiseEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4708  recNoiseEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4709  recNoiseEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4710  } // hfNoise
4711  } //hfNoise.isValid(
4713 
4717  // HBHE: HBHERecHitCollection hbheSignal Signal
4719  iEvent.getByToken(tok_hbheSignal_, hbheSignal);
4720  bool gotHBHERecHitsSignal = true;
4721  if (!(iEvent.getByToken(tok_hbheSignal_, hbheSignal)))
4722  gotHBHERecHitsSignal =
4723  false; //this is a boolean set up to check if there are HBHERecHitsSignal in input root file
4724  if (!(hbheSignal.isValid()))
4725  gotHBHERecHitsSignal = false; //if it is not there, leave it false
4726  if (!gotHBHERecHitsSignal) {
4727  // if(!hbheSignal.isValid()) {
4728  std::cout << " No RecHits HBHESignal collection is found " << std::endl;
4729  } else {
4730  for (HBHERecHitCollection::const_iterator hbheItr = hbheSignal->begin(); hbheItr != hbheSignal->end();
4731  hbheItr++) {
4732  // Recalibration of energy
4733  float icalconst = 1.;
4734  // DetId mydetid = hbheItr->id().rawId();
4735  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4736  HBHERecHit aHit(hbheItr->id(), hbheItr->eraw() * icalconst, hbheItr->time());
4737  // HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
4738  double energyhit = aHit.energy();
4739  DetId id = (*hbheItr).detid();
4740  HcalDetId hid = HcalDetId(id);
4741  int sub = ((hid).rawId() >> 25) & 0x7;
4742 
4743  if (sub == 1)
4744  h_energyhitSignal_HB->Fill(energyhit, 1.);
4745  if (sub == 2)
4746  h_energyhitSignal_HE->Fill(energyhit, 1.);
4747 
4748  //std::cout<<sub<<std::endl;
4749  if (hid.depth() == 1 && sub == 1 && hid.iphi() == 25) {
4750  if (verbosity < 0)
4751  std::cout << "HBHE Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4752  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4753  }
4754  if (hid.depth() == 1 && sub == 2 && hid.iphi() == 25) {
4755  if (verbosity < 0)
4756  std::cout << "HBHE Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4757  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4758  }
4759  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4760  if (ieta > 0)
4761  ieta -= 1; // -15 ... -1; 0... 14 for HB
4762  int iphi = hid.iphi() - 1;
4763  int mdepth = hid.depth();
4764  recSignalEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4765  recSignalEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4766  recSignalEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4767  } // hbheSignal
4768  } //hbheSignal.isValid(
4770 
4771  // HF: HFRecHitCollection hfSignal Signal
4773  iEvent.getByToken(tok_hfSignal_, hfSignal);
4774  bool gotHFRecHitsSignal = true;
4775  if (!(iEvent.getByToken(tok_hfSignal_, hfSignal)))
4776  gotHFRecHitsSignal = false; //this is a boolean set up to check if there are HFRecHitsSignal in input root file
4777  if (!(hfSignal.isValid()))
4778  gotHFRecHitsSignal = false; //if it is not there, leave it false
4779  if (!gotHFRecHitsSignal) {
4780  // if(!hfSignal.isValid()) {
4781  std::cout << " No RecHits HFSignal collection is found " << std::endl;
4782  } else {
4783  for (HFRecHitCollection::const_iterator hfItr = hfSignal->begin(); hfItr != hfSignal->end(); hfItr++) {
4784  // Recalibration of energy
4785  float icalconst = 1.;
4786  // DetId mydetid = hfItr->id().rawId();
4787  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4788  HFRecHit aHit(hfItr->id(), hfItr->energy() * icalconst, hfItr->time());
4789  double energyhit = aHit.energy();
4790  DetId id = (*hfItr).detid();
4791  HcalDetId hid = HcalDetId(id);
4792  int sub = ((hid).rawId() >> 25) & 0x7;
4793 
4794  h_energyhitSignal_HF->Fill(energyhit, 1.);
4795  // if(fabs(energyhit) > 40. ) continue;
4796 
4797  //std::cout<<sub<<std::endl;
4798  if (hid.iphi() == 25) {
4799  if (verbosity < 0)
4800  std::cout << "HF Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4801  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4802  }
4803  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4804  if (ieta > 0)
4805  ieta -= 1; // -15 ... -1; 0... 14 for HB
4806  int iphi = hid.iphi() - 1;
4807  int mdepth = hid.depth();
4808  recSignalEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4809  recSignalEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4810  recSignalEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4811  } // hfSignal
4812  } //hfSignal.isValid(
4814 
4816  // END of RecHits for phi-symmetry monitoring of calibration group
4817  } // flagIterativeMethodCalibrationGroupReco_ > 0
4819 
4821 
4833  // // // // // // // tocdefault tocampl tocamplchannel: calibration group, Iterative method, coding start 29.08.2019
4834  for (int k0 = 0; k0 < nsub; k0++) {
4835  // HE only, temporary
4836  if (k0 == 1) {
4837  for (int k1 = 0; k1 < ndepth; k1++) {
4838  // k2: 0-81
4839  for (int k2 = 0; k2 < neta; k2++) {
4840  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
4841  int k2plot = k2 - 41;
4842  int kkk = k2plot; //if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
4843  //preparation for PHI normalization:
4844  double sumoverphi = 0;
4845  int nsumoverphi = 0;
4846  for (int k3 = 0; k3 < nphi; k3++) {
4847  if (tocamplchannel[k0][k1][k2][k3] != 0) {
4848  sumoverphi += tocamplchannel[k0][k1][k2][k3];
4849  ++nsumoverphi;
4850  if (verbosity < 0)
4851  std::cout << "==== nsumoverphi = " << nsumoverphi << " sumoverphi = " << sumoverphi
4852  << " k1 = " << k1 << " k2 = " << k2 << " kkk = " << kkk << " k3 = " << k3 << std::endl;
4853  } //if != 0
4854  } //k3
4855  // PHI normalization into new massive && filling plots:
4856  for (int k3 = 0; k3 < nphi; k3++) {
4857  if (nsumoverphi != 0) {
4858  maprphinorm[k0][k1][k2][k3] = tocamplchannel[k0][k1][k2][k3] / (sumoverphi / nsumoverphi);
4859  if (verbosity < 0)
4860  std::cout << "nsumoverphi= " << nsumoverphi << " sumoverphi= " << sumoverphi << " k1= " << k1
4861  << " k2= " << k2 << " kkk= " << kkk << " k3= " << k3
4862  << " maprphinorm= " << maprphinorm[k0][k1][k2][k3] << std::endl;
4863  if (k1 == 0) {
4864  h_mapenophinorm_HE1->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4865  h_mapenophinorm2_HE1->Fill(
4866  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4867  h_maprphinorm_HE1->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4868  h_maprphinorm2_HE1->Fill(
4869  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4870  h_maprphinorm0_HE1->Fill(double(kkk), double(k3), 1.);
4871  }
4872  if (k1 == 1) {
4873  h_mapenophinorm_HE2->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4874  h_mapenophinorm2_HE2->Fill(
4875  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4876  h_maprphinorm_HE2->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4877  h_maprphinorm2_HE2->Fill(
4878  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4879  h_maprphinorm0_HE2->Fill(double(kkk), double(k3), 1.);
4880  }
4881  if (k1 == 2) {
4882  h_mapenophinorm_HE3->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4883  h_mapenophinorm2_HE3->Fill(
4884  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4885  h_maprphinorm_HE3->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4886  h_maprphinorm2_HE3->Fill(
4887  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4888  h_maprphinorm0_HE3->Fill(double(kkk), double(k3), 1.);
4889  }
4890  if (k1 == 3) {
4891  h_mapenophinorm_HE4->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4892  h_mapenophinorm2_HE4->Fill(
4893  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4894  h_maprphinorm_HE4->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4895  h_maprphinorm2_HE4->Fill(
4896  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4897  h_maprphinorm0_HE4->Fill(double(kkk), double(k3), 1.);
4898  }
4899  if (k1 == 4) {
4900  h_mapenophinorm_HE5->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4901  h_mapenophinorm2_HE5->Fill(
4902  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4903  h_maprphinorm_HE5->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4904  h_maprphinorm2_HE5->Fill(
4905  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4906  h_maprphinorm0_HE5->Fill(double(kkk), double(k3), 1.);
4907  }
4908  if (k1 == 5) {
4909  h_mapenophinorm_HE6->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4910  h_mapenophinorm2_HE6->Fill(
4911  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4912  h_maprphinorm_HE6->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4913  h_maprphinorm2_HE6->Fill(
4914  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4915  h_maprphinorm0_HE6->Fill(double(kkk), double(k3), 1.);
4916  }
4917  if (k1 == 6) {
4918  h_mapenophinorm_HE7->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4919  h_mapenophinorm2_HE7->Fill(
4920  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4921  h_maprphinorm_HE7->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4922  h_maprphinorm2_HE7->Fill(
4923  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4924  h_maprphinorm0_HE7->Fill(double(kkk), double(k3), 1.);
4925  }
4926  } //if nsumoverphi != 0
4927  } //k3
4928  } //k2
4929  } //k1
4930  } //if k0 == 1 HE
4931  } //k0
4932  // // // // // // // // // // // // // // // // // // // // // // // //
4933  // // // // // // // amplitudechannel amplitudechannel amplitudechannel: calibration group, Iterative method, coding start 11.11.2019
4934  for (int k0 = 0; k0 < nsub; k0++) {
4935  // HB:
4936  if (k0 == 0) {
4937  for (int k1 = 0; k1 < ndepth; k1++) {
4938  // k2: 0-81
4939  for (int k2 = 0; k2 < neta; k2++) {
4940  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
4941  int k2plot = k2 - 41;
4942  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
4943  for (int k3 = 0; k3 < nphi; k3++) {
4944  if (k1 == 0) {
4945  h_amplitudechannel0_HB1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4946  h_amplitudechannel1_HB1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4947  h_amplitudechannel2_HB1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4948  }
4949  if (k1 == 1) {
4950  h_amplitudechannel0_HB2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4951  h_amplitudechannel1_HB2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4952  h_amplitudechannel2_HB2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4953  }
4954  if (k1 == 2) {
4955  h_amplitudechannel0_HB3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4956  h_amplitudechannel1_HB3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4957  h_amplitudechannel2_HB3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4958  }
4959  if (k1 == 3) {
4960  h_amplitudechannel0_HB4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4961  h_amplitudechannel1_HB4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4962  h_amplitudechannel2_HB4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4963  }
4964  } //k3
4965  } //k2
4966  } //k1
4967  } //if k0 == 0 HB
4968 
4969  // HE:
4970  if (k0 == 1) {
4971  for (int k1 = 0; k1 < ndepth; k1++) {
4972  // k2: 0-81
4973  for (int k2 = 0; k2 < neta; k2++) {
4974  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
4975  int k2plot = k2 - 41;
4976  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
4977  for (int k3 = 0; k3 < nphi; k3++) {
4978  if (k1 == 0) {
4979  h_amplitudechannel0_HE1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4980  h_amplitudechannel1_HE1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4981  h_amplitudechannel2_HE1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4982  }
4983  if (k1 == 1) {
4984  h_amplitudechannel0_HE2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4985  h_amplitudechannel1_HE2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4986  h_amplitudechannel2_HE2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4987  }
4988  if (k1 == 2) {
4989  h_amplitudechannel0_HE3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4990  h_amplitudechannel1_HE3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4991  h_amplitudechannel2_HE3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4992  }
4993  if (k1 == 3) {
4994  h_amplitudechannel0_HE4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4995  h_amplitudechannel1_HE4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4996  h_amplitudechannel2_HE4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4997  }
4998  if (k1 == 4) {
4999  h_amplitudechannel0_HE5->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5000  h_amplitudechannel1_HE5->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5001  h_amplitudechannel2_HE5->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5002  }
5003  if (k1 == 5) {
5004  h_amplitudechannel0_HE6->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5005  h_amplitudechannel1_HE6->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5006  h_amplitudechannel2_HE6->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5007  }
5008  if (k1 == 6) {
5009  h_amplitudechannel0_HE7->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5010  h_amplitudechannel1_HE7->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5011  h_amplitudechannel2_HE7->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5012  }
5013  } //k3
5014  } //k2
5015  } //k1
5016  } //if k0 == 1 HE
5017 
5018  // HF: 4 depthes for Digis and only 2 - for Reco !!!
5019  if (k0 == 3) {
5020  for (int k1 = 0; k1 < ndepth; k1++) {
5021  // k2: 0-81
5022  for (int k2 = 0; k2 < neta; k2++) {
5023  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5024  int k2plot = k2 - 41;
5025  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5026  for (int k3 = 0; k3 < nphi; k3++) {
5027  if (k1 == 0) {
5028  h_amplitudechannel0_HF1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5029  h_amplitudechannel1_HF1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5030  h_amplitudechannel2_HF1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5031  }
5032  if (k1 == 1) {
5033  h_amplitudechannel0_HF2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5034  h_amplitudechannel1_HF2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5035  h_amplitudechannel2_HF2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5036  }
5037  if (k1 == 2) {
5038  h_amplitudechannel0_HF3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5039  h_amplitudechannel1_HF3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5040  h_amplitudechannel2_HF3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5041  }
5042  if (k1 == 3) {
5043  h_amplitudechannel0_HF4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5044  h_amplitudechannel1_HF4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5045  h_amplitudechannel2_HF4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5046  }
5047  } //k3
5048  } //k2
5049  } //k1
5050  } //if k0 == 3 HF
5051 
5052  } //k0
5053 
5054  } // if(flagIterativeMethodCalibrationGroupDigi
5055 
5065  //
5066  for (int k0 = 0; k0 < nsub; k0++) {
5067  // HB:
5068  if (k0 == 0) {
5069  for (int k1 = 0; k1 < ndepth; k1++) {
5070  // k2: 0-81
5071  for (int k2 = 0; k2 < neta; k2++) {
5072  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5073  int k2plot = k2 - 41;
5074  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5075  for (int k3 = 0; k3 < nphi; k3++) {
5076  if (k1 == 0) {
5077  h_recSignalEnergy0_HB1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5078  h_recSignalEnergy1_HB1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5079  h_recSignalEnergy2_HB1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5080  h_recNoiseEnergy0_HB1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5081  h_recNoiseEnergy1_HB1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5082  h_recNoiseEnergy2_HB1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5083  }
5084  if (k1 == 1) {
5085  h_recSignalEnergy0_HB2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5086  h_recSignalEnergy1_HB2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5087  h_recSignalEnergy2_HB2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5088  h_recNoiseEnergy0_HB2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5089  h_recNoiseEnergy1_HB2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5090  h_recNoiseEnergy2_HB2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5091  }
5092  if (k1 == 2) {
5093  h_recSignalEnergy0_HB3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5094  h_recSignalEnergy1_HB3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5095  h_recSignalEnergy2_HB3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5096  h_recNoiseEnergy0_HB3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5097  h_recNoiseEnergy1_HB3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5098  h_recNoiseEnergy2_HB3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5099  }
5100  if (k1 == 3) {
5101  h_recSignalEnergy0_HB4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5102  h_recSignalEnergy1_HB4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5103  h_recSignalEnergy2_HB4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5104  h_recNoiseEnergy0_HB4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5105  h_recNoiseEnergy1_HB4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5106  h_recNoiseEnergy2_HB4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5107  }
5108  } //k3
5109  } //k2
5110  } //k1
5111  } //if k0 == 0 HB
5112 
5113  // HE:
5114  if (k0 == 1) {
5115  for (int k1 = 0; k1 < ndepth; k1++) {
5116  // k2: 0-81
5117  for (int k2 = 0; k2 < neta; k2++) {
5118  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5119  int k2plot = k2 - 41;
5120  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5121  for (int k3 = 0; k3 < nphi; k3++) {
5122  if (k1 == 0) {
5123  h_recSignalEnergy0_HE1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5124  h_recSignalEnergy1_HE1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5125  h_recSignalEnergy2_HE1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5126  h_recNoiseEnergy0_HE1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5127  h_recNoiseEnergy1_HE1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5128  h_recNoiseEnergy2_HE1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5129  }
5130  if (k1 == 1) {
5131  h_recSignalEnergy0_HE2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5132  h_recSignalEnergy1_HE2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5133  h_recSignalEnergy2_HE2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5134  h_recNoiseEnergy0_HE2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5135  h_recNoiseEnergy1_HE2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5136  h_recNoiseEnergy2_HE2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5137  }
5138  if (k1 == 2) {
5139  h_recSignalEnergy0_HE3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5140  h_recSignalEnergy1_HE3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5141  h_recSignalEnergy2_HE3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5142  h_recNoiseEnergy0_HE3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5143  h_recNoiseEnergy1_HE3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5144  h_recNoiseEnergy2_HE3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5145  }
5146  if (k1 == 3) {
5147  h_recSignalEnergy0_HE4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5148  h_recSignalEnergy1_HE4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5149  h_recSignalEnergy2_HE4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5150  h_recNoiseEnergy0_HE4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5151  h_recNoiseEnergy1_HE4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5152  h_recNoiseEnergy2_HE4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5153  }
5154  if (k1 == 4) {
5155  h_recSignalEnergy0_HE5->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5156  h_recSignalEnergy1_HE5->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5157  h_recSignalEnergy2_HE5->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5158  h_recNoiseEnergy0_HE5->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5159  h_recNoiseEnergy1_HE5->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5160  h_recNoiseEnergy2_HE5->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5161  }
5162  if (k1 == 5) {
5163  h_recSignalEnergy0_HE6->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5164  h_recSignalEnergy1_HE6->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5165  h_recSignalEnergy2_HE6->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5166  h_recNoiseEnergy0_HE6->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5167  h_recNoiseEnergy1_HE6->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5168  h_recNoiseEnergy2_HE6->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5169  }
5170  if (k1 == 6) {
5171  h_recSignalEnergy0_HE7->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5172  h_recSignalEnergy1_HE7->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5173  h_recSignalEnergy2_HE7->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5174  h_recNoiseEnergy0_HE7->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5175  h_recNoiseEnergy1_HE7->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5176  h_recNoiseEnergy2_HE7->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5177  }
5178  } //k3
5179  } //k2
5180  } //k1
5181  } //if k0 == 1 HE
5182 
5183  // HF: 4 depthes for Digis and only 2 - for Reco !!! ('ve tried to enter 4 for reco since 31.10.2021 AZ)
5184  if (k0 == 3) {
5185  for (int k1 = 0; k1 < ndepth; k1++) {
5186  // k2: 0-81
5187  for (int k2 = 0; k2 < neta; k2++) {
5188  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5189  int k2plot = k2 - 41;
5190  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5191  for (int k3 = 0; k3 < nphi; k3++) {
5192  if (k1 == 0) {
5193  h_recSignalEnergy0_HF1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5194  h_recSignalEnergy1_HF1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5195  h_recSignalEnergy2_HF1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5196  h_recNoiseEnergy0_HF1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5197  h_recNoiseEnergy1_HF1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5198  h_recNoiseEnergy2_HF1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5199  }
5200  if (k1 == 1) {
5201  h_recSignalEnergy0_HF2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5202  h_recSignalEnergy1_HF2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5203  h_recSignalEnergy2_HF2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5204  h_recNoiseEnergy0_HF2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5205  h_recNoiseEnergy1_HF2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5206  h_recNoiseEnergy2_HF2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5207  }
5208  // AZ 31.10.2021: k1=3 and 4 added for HF recoSignal,recNoise
5209  if (k1 == 2) {
5210  h_recSignalEnergy0_HF3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5211  h_recSignalEnergy1_HF3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5212  h_recSignalEnergy2_HF3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5213  h_recNoiseEnergy0_HF3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5214  h_recNoiseEnergy1_HF3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5215  h_recNoiseEnergy2_HF3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5216  }
5217  if (k1 == 3) {
5218  h_recSignalEnergy0_HF4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5219  h_recSignalEnergy1_HF4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5220  h_recSignalEnergy2_HF4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5221  h_recNoiseEnergy0_HF4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5222  h_recNoiseEnergy1_HF4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5223  h_recNoiseEnergy2_HF4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5224  }
5225  } //k3
5226  } //k2
5227  } //k1
5228  } //if k0 == 3 HF
5229 
5230  } //k0
5231 
5232  } // if(flagIterativeMethodCalibrationGroupReco
5233 
5235 
5237  if (flagLaserRaddam_ > 1) {
5239  for (int k1 = 0; k1 < ndepth; k1++) {
5240  for (int k2 = 0; k2 < neta; k2++) {
5241  for (int k3 = 0; k3 < nphi; k3++) {
5242  if (mapRADDAM0_HE[k1][k2][k3] != 0) {
5243  // ---------------------------------------- D2 sum over phi before!!! any dividing:
5244  mapRADDAM_HED2[k1][k2] += mapRADDAM_HE[k1][k2][k3];
5245  // N phi sectors w/ digihits
5246  ++mapRADDAM_HED20[k1][k2];
5247  } //if
5248  } //for
5249  } //for
5250  } //for
5251 
5253  for (int k1 = 0; k1 < ndepth; k1++) {
5254  for (int k2 = 0; k2 < neta; k2++) {
5255  if (mapRADDAM_HED20[k1][k2] != 0) {
5256  // validation of channels at eta16:
5257  if (k1 == 2 && k2 == 25) {
5259  h_Eta16Depth3RADDAM_HED2->Fill(mapRADDAM_HED2[k1][k2] / mapRADDAM_HED20[k1][k2]);
5261  } else if (k1 == 2 && k2 == 56) {
5263  h_Eta16Depth3RADDAM_HED2P->Fill(mapRADDAM_HED2[k1][k2] / mapRADDAM_HED20[k1][k2]);
5265  } else {
5269  }
5271  mapRADDAM_HED2[k1][k2] /= mapRADDAM_HED20[k1][k2];
5272  } // if(mapRADDAM_HED20[k1][k2] != 0
5273  } //for
5274  } //for
5276  for (int k1 = 0; k1 < ndepth; k1++) {
5277  for (int k2 = 0; k2 < neta; k2++) {
5278  if (k1 == 2 && (k2 == 25 || k2 == 56)) {
5279  } else {
5280  // if(k2!=25 && k2!=56) {
5281  int k2plot = k2 - 41;
5282  int kkk = k2;
5283  if (k2plot > 0)
5284  kkk = k2 + 1;
5285  int kk2 = 25;
5286  if (k2plot > 0)
5287  kk2 = 56;
5288  if (mapRADDAM_HED2[k1][k2] != 0. && mapRADDAM_HED2[2][kk2] != 0) {
5289  mapRADDAM_HED2[k1][k2] /= mapRADDAM_HED2[2][kk2];
5290  // (d1 & eta 17-29) L1
5291  int LLLLLL111111 = 0;
5292  if ((k1 == 0 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 30))
5293  LLLLLL111111 = 1;
5294  // (d2 & eta 17-26) && (d3 & eta 27-28) L2
5295  int LLLLLL222222 = 0;
5296  if ((k1 == 1 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 27) ||
5297  (k1 == 2 && fabs(kkk - 41) > 26 && fabs(kkk - 41) < 29))
5298  LLLLLL222222 = 1;
5299  //
5300  if (LLLLLL111111 == 1) {
5301  h_sigLayer1RADDAM5_HED2->Fill(double(kkk - 41), mapRADDAM_HED2[k1][k2]);
5302  h_sigLayer1RADDAM6_HED2->Fill(double(kkk - 41), 1.);
5303  }
5304  if (LLLLLL222222 == 1) {
5305  h_sigLayer2RADDAM5_HED2->Fill(double(kkk - 41), mapRADDAM_HED2[k1][k2]);
5306  h_sigLayer2RADDAM6_HED2->Fill(double(kkk - 41), 1.);
5307  }
5308  } //if
5309  } // if(k2!=25 && k2!=56
5310  } //for
5311  } //for
5312 
5314 
5315  //------------------------------------------------------ aver per eta 16(depth=3-> k1=2, k2=16(15) :
5317  for (int k1 = 0; k1 < ndepth; k1++) {
5318  for (int k2 = 0; k2 < neta; k2++) {
5319  if (k1 == 2 && (k2 == 25 || k2 == 56)) {
5320  } else {
5321  int k2plot = k2 - 41;
5322  int kk2 = 25;
5323  if (k2plot > 0)
5324  kk2 = 56;
5325  int kkk = k2;
5326  if (k2plot > 0)
5327  kkk = k2 + 1;
5328  for (int k3 = 0; k3 < nphi; k3++) {
5329  if (mapRADDAM_HE[k1][k2][k3] != 0. && mapRADDAM_HE[2][kk2][k3] != 0) {
5330  mapRADDAM_HE[k1][k2][k3] /= mapRADDAM_HE[2][kk2][k3];
5331  int LLLLLL111111 = 0;
5332  if ((k1 == 0 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 30))
5333  LLLLLL111111 = 1;
5334  int LLLLLL222222 = 0;
5335  if ((k1 == 1 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 27) ||
5336  (k1 == 2 && fabs(kkk - 41) > 26 && fabs(kkk - 41) < 29))
5337  LLLLLL222222 = 1;
5338  if (LLLLLL111111 == 1) {
5339  h_sigLayer1RADDAM5_HE->Fill(double(kkk - 41), mapRADDAM_HE[k1][k2][k3]);
5340  h_sigLayer1RADDAM6_HE->Fill(double(kkk - 41), 1.);
5341  }
5342  if (LLLLLL222222 == 1) {
5343  h_sigLayer2RADDAM5_HE->Fill(double(kkk - 41), mapRADDAM_HE[k1][k2][k3]);
5344  h_sigLayer2RADDAM6_HE->Fill(double(kkk - 41), 1.);
5345  }
5346  } //if
5347  } //for
5348  } // if(k2!=25 && k2!=56
5349  } //for
5350  } //for
5351  //
5353  for (int k1 = 0; k1 < ndepth; k1++) {
5354  for (int k2 = 0; k2 < neta; k2++) {
5355  mapRADDAM_HED2[k1][k2] = 0.;
5356  mapRADDAM_HED20[k1][k2] = 0.;
5357  for (int k3 = 0; k3 < nphi; k3++) {
5358  mapRADDAM_HE[k1][k2][k3] = 0.;
5359  mapRADDAM0_HE[k1][k2][k3] = 0;
5360  } //for
5361  } //for
5362  } //for
5363 
5365  } // END TREATMENT : if(flagLaserRaddam_ == 1
5367 
5369  // // // // // // //sumamplitudes:
5370  int testcount1 = 0;
5371  int testcount2 = 0;
5372  int testcount3 = 0;
5374  for (int k0 = 0; k0 < nsub; k0++) {
5375  int sumofchannels = 0;
5376  double sumamplitudesubdet = 0.;
5377  int sumofchannels0 = 0;
5378  double sumamplitudesubdet0 = 0.;
5379  for (int k2 = 0; k2 < neta; k2++) {
5380  for (int k3 = 0; k3 < nphi; k3++) {
5381  if (amplitudechannel[k0][0][k2][k3] != 0. && amplitudechannel[k0][1][k2][k3] != 0.)
5382  testcount1++;
5383  if (amplitudechannel[k0][0][k2][k3] != 0. && amplitudechannel[k0][1][k2][k3] == 0.)
5384  testcount2++;
5385  if (amplitudechannel[k0][0][k2][k3] == 0. && amplitudechannel[k0][1][k2][k3] != 0.)
5386  testcount3++;
5387 
5388  // HB
5389  if (k0 == 0) {
5390  double sumamplitudechannel_HB = amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3];
5391  h_sumamplitudechannel_HB->Fill(sumamplitudechannel_HB);
5392  if (sumamplitudechannel_HB > 80.) {
5393  sumamplitudesubdet += sumamplitudechannel_HB;
5394  sumofchannels++;
5395  } else {
5396  if (sumamplitudechannel_HB > 0.) {
5397  sumamplitudesubdet0 += sumamplitudechannel_HB;
5398  sumofchannels0++;
5399  }
5400  }
5401  } //
5402 
5403  // HE
5404  if (k0 == 1) {
5405  double sumamplitudechannel_HE =
5406  amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3] + amplitudechannel[k0][2][k2][k3];
5407  h_sumamplitudechannel_HE->Fill(sumamplitudechannel_HE);
5408  if (sumamplitudechannel_HE > 200.) {
5409  sumamplitudesubdet += sumamplitudechannel_HE;
5410  sumofchannels++;
5411  } else {
5412  if (sumamplitudechannel_HE > 0.) {
5413  sumamplitudesubdet0 += sumamplitudechannel_HE;
5414  sumofchannels0++;
5415  }
5416  }
5417  } //
5418 
5419  // HO
5420  if (k0 == 2) {
5421  double sumamplitudechannel_HO = amplitudechannel[k0][3][k2][k3];
5422  h_sumamplitudechannel_HO->Fill(sumamplitudechannel_HO);
5423  if (sumamplitudechannel_HO > 1200.) {
5424  sumamplitudesubdet += sumamplitudechannel_HO;
5425  sumofchannels++;
5426  } else {
5427  if (sumamplitudechannel_HO > 0.) {
5428  sumamplitudesubdet0 += sumamplitudechannel_HO;
5429  sumofchannels0++;
5430  }
5431  }
5432  } //
5433  // HF
5434  if (k0 == 3) {
5435  double sumamplitudechannel_HF = amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3];
5436  h_sumamplitudechannel_HF->Fill(sumamplitudechannel_HF);
5437  if (sumamplitudechannel_HF > 600.) {
5438  sumamplitudesubdet += sumamplitudechannel_HF;
5439  sumofchannels++;
5440  } else {
5441  if (sumamplitudechannel_HF > 0.) {
5442  sumamplitudesubdet0 += sumamplitudechannel_HF;
5443  sumofchannels0++;
5444  }
5445  }
5446  } //
5447 
5448  } //k3
5449  } //k2
5450  // }//k1
5451  // SA of each sub-detector DONE. Then: summarize or find maximum throught events of LS
5452  if (k0 == 0) {
5453  h_eventamplitude_HB->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5454  h_eventoccupancy_HB->Fill((sumofchannels + sumofchannels0));
5455  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM1)
5456  maxxSUM1 = sumamplitudesubdet + sumamplitudesubdet0;
5457  if ((sumofchannels + sumofchannels0) > maxxOCCUP1)
5458  maxxOCCUP1 = sumofchannels + sumofchannels0;
5459  averSIGNALoccupancy_HB += sumofchannels;
5460  averSIGNALsumamplitude_HB += sumamplitudesubdet;
5461  averNOSIGNALoccupancy_HB += sumofchannels0;
5462  averNOSIGNALsumamplitude_HB += sumamplitudesubdet0;
5463  if ((sumamplitudesubdet + sumamplitudesubdet0) > 60000) {
5464  for (int k2 = 0; k2 < neta; k2++) {
5465  for (int k3 = 0; k3 < nphi; k3++) {
5466  int ieta = k2 - 41;
5468  if (amplitudechannel[k0][0][k2][k3] != 0.) {
5469  h_2DAtaildepth1_HB->Fill(double(ieta), double(k3), amplitudechannel[k0][0][k2][k3]);
5470  h_2D0Ataildepth1_HB->Fill(double(ieta), double(k3), 1.);
5471  }
5473  if (amplitudechannel[k0][1][k2][k3] != 0.) {
5474  h_2DAtaildepth2_HB->Fill(double(ieta), double(k3), amplitudechannel[k0][1][k2][k3]);
5475  h_2D0Ataildepth2_HB->Fill(double(ieta), double(k3), 1.);
5476  }
5477  } //for
5478  } //for
5479  } //>60000
5480  } //HB
5481  if (k0 == 1) {
5482  h_eventamplitude_HE->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5483  h_eventoccupancy_HE->Fill((sumofchannels + sumofchannels0));
5484  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM2)
5485  maxxSUM2 = sumamplitudesubdet + sumamplitudesubdet0;
5486  if ((sumofchannels + sumofchannels0) > maxxOCCUP2)
5487  maxxOCCUP2 = sumofchannels + sumofchannels0;
5488  averSIGNALoccupancy_HE += sumofchannels;
5489  averSIGNALsumamplitude_HE += sumamplitudesubdet;
5490  averNOSIGNALoccupancy_HE += sumofchannels0;
5491  averNOSIGNALsumamplitude_HE += sumamplitudesubdet0;
5492  } //HE
5493  if (k0 == 2) {
5494  h_eventamplitude_HO->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5495  h_eventoccupancy_HO->Fill((sumofchannels + sumofchannels0));
5496  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM3)
5497  maxxSUM3 = sumamplitudesubdet + sumamplitudesubdet0;
5498  if ((sumofchannels + sumofchannels0) > maxxOCCUP3)
5499  maxxOCCUP3 = sumofchannels + sumofchannels0;
5500  averSIGNALoccupancy_HO += sumofchannels;
5501  averSIGNALsumamplitude_HO += sumamplitudesubdet;
5502  averNOSIGNALoccupancy_HO += sumofchannels0;
5503  averNOSIGNALsumamplitude_HO += sumamplitudesubdet0;
5504  } //HO
5505  if (k0 == 3) {
5506  h_eventamplitude_HF->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5507  h_eventoccupancy_HF->Fill((sumofchannels + sumofchannels0));
5508  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM4)
5509  maxxSUM4 = sumamplitudesubdet + sumamplitudesubdet0;
5510  if ((sumofchannels + sumofchannels0) > maxxOCCUP4)
5511  maxxOCCUP4 = sumofchannels + sumofchannels0;
5512  averSIGNALoccupancy_HF += sumofchannels;
5513  averSIGNALsumamplitude_HF += sumamplitudesubdet;
5514  averNOSIGNALoccupancy_HF += sumofchannels0;
5515  averNOSIGNALsumamplitude_HF += sumamplitudesubdet0;
5516  } //HF
5517  } //k0
5518 
5522  int eeeeee;
5523  eeeeee = lscounterM1;
5524  if (flagtoaskrunsorls_ == 0)
5525  eeeeee = runcounter;
5526 
5528  for (int k0 = 0; k0 < nsub; k0++) {
5531  for (int k1 = 0; k1 < ndepth; k1++) {
5533  int nbadchannels = 0;
5534  for (int k2 = 0; k2 < neta; k2++) {
5535  for (int k3 = 0; k3 < nphi; k3++) {
5536  if (badchannels[k0][k1][k2][k3] != 0)
5537  ++nbadchannels;
5538  } //k3
5539  } //k2
5541  //HB
5542  if (k0 == 0) {
5543  if (k1 == 0) {
5544  h_nbadchannels_depth1_HB->Fill(float(nbadchannels));
5545  h_runnbadchannels_depth1_HB->Fill(float(eeeeee), float(nbadchannels));
5546  if (nbadchannels > lsdep_cut1_peak_HBdepth1_)
5547  h_runnbadchannelsC_depth1_HB->Fill(float(eeeeee), float(nbadchannels));
5548  if (nbadchannels != 0)
5549  h_runbadrate_depth1_HB->Fill(float(eeeeee), 1.);
5550  if (nbadchannels > lsdep_cut3_max_HBdepth1_)
5551  h_runbadrateC_depth1_HB->Fill(float(eeeeee), 1.);
5552  h_bcnnbadchannels_depth1_HB->Fill(float(bcn), float(nbadchannels));
5553  h_runbadrate0_depth1_HB->Fill(float(eeeeee), 1.);
5554  h_bcnbadrate0_depth1_HB->Fill(float(bcn), 1.);
5555  }
5556  if (k1 == 1) {
5557  h_nbadchannels_depth2_HB->Fill(float(nbadchannels));
5558  h_runnbadchannels_depth2_HB->Fill(float(eeeeee), float(nbadchannels));
5559  if (nbadchannels > lsdep_cut1_peak_HBdepth2_)
5560  h_runnbadchannelsC_depth2_HB->Fill(float(eeeeee), float(nbadchannels));
5561  if (nbadchannels != 0)
5562  h_runbadrate_depth2_HB->Fill(float(eeeeee), 1.);
5563  if (nbadchannels > lsdep_cut3_max_HBdepth2_)
5564  h_runbadrateC_depth2_HB->Fill(float(eeeeee), 1.);
5565  h_bcnnbadchannels_depth2_HB->Fill(float(bcn), float(nbadchannels));
5566  h_runbadrate0_depth2_HB->Fill(float(eeeeee), 1.);
5567  h_bcnbadrate0_depth2_HB->Fill(float(bcn), 1.);
5568  }
5569  }
5570  //HE
5571  if (k0 == 1) {
5572  if (k1 == 0) {
5573  h_nbadchannels_depth1_HE->Fill(float(nbadchannels));
5574  h_runnbadchannels_depth1_HE->Fill(float(eeeeee), float(nbadchannels));
5575  if (nbadchannels > lsdep_cut1_peak_HEdepth1_)
5576  h_runnbadchannelsC_depth1_HE->Fill(float(eeeeee), float(nbadchannels));
5577  if (nbadchannels != 0)
5578  h_runbadrate_depth1_HE->Fill(float(eeeeee), 1.);
5579  if (nbadchannels > lsdep_cut3_max_HEdepth1_)
5580  h_runbadrateC_depth1_HE->Fill(float(eeeeee), 1.);
5581  h_bcnnbadchannels_depth1_HE->Fill(float(bcn), float(nbadchannels));
5582  h_runbadrate0_depth1_HE->Fill(float(eeeeee), 1.);
5583  h_bcnbadrate0_depth1_HE->Fill(float(bcn), 1.);
5584  }
5585  if (k1 == 1) {
5586  h_nbadchannels_depth2_HE->Fill(float(nbadchannels));
5587  h_runnbadchannels_depth2_HE->Fill(float(eeeeee), float(nbadchannels));
5588  if (nbadchannels > lsdep_cut1_peak_HEdepth2_)
5589  h_runnbadchannelsC_depth2_HE->Fill(float(eeeeee), float(nbadchannels));
5590  if (nbadchannels != 0)
5591  h_runbadrate_depth2_HE->Fill(float(eeeeee), 1.);
5592  if (nbadchannels > lsdep_cut3_max_HEdepth2_)
5593  h_runbadrateC_depth2_HE->Fill(float(eeeeee), 1.);
5594  h_bcnnbadchannels_depth2_HE->Fill(float(bcn), float(nbadchannels));
5595  h_runbadrate0_depth2_HE->Fill(float(eeeeee), 1.);
5596  h_bcnbadrate0_depth2_HE->Fill(float(bcn), 1.);
5597  }
5598  if (k1 == 2) {
5599  h_nbadchannels_depth3_HE->Fill(float(nbadchannels));
5600  h_runnbadchannels_depth3_HE->Fill(float(eeeeee), float(nbadchannels));
5601  if (nbadchannels > lsdep_cut1_peak_HEdepth3_)
5602  h_runnbadchannelsC_depth3_HE->Fill(float(eeeeee), float(nbadchannels));
5603  if (nbadchannels != 0)
5604  h_runbadrate_depth3_HE->Fill(float(eeeeee), 1.);
5605  if (nbadchannels > lsdep_cut3_max_HEdepth3_)
5606  h_runbadrateC_depth3_HE->Fill(float(eeeeee), 1.);
5607  h_bcnnbadchannels_depth3_HE->Fill(float(bcn), float(nbadchannels));
5608  h_runbadrate0_depth3_HE->Fill(float(eeeeee), 1.);
5609  h_bcnbadrate0_depth3_HE->Fill(float(bcn), 1.);
5610  }
5611  }
5612  //HO
5613  if (k0 == 2) {
5614  if (k1 == 3) {
5615  h_nbadchannels_depth4_HO->Fill(float(nbadchannels));
5616  h_runnbadchannels_depth4_HO->Fill(float(eeeeee), float(nbadchannels));
5617  if (nbadchannels > lsdep_cut1_peak_HOdepth4_)
5618  h_runnbadchannelsC_depth4_HO->Fill(float(eeeeee), float(nbadchannels));
5619  if (nbadchannels != 0)
5620  h_runbadrate_depth4_HO->Fill(float(eeeeee), 1.);
5621  if (nbadchannels > lsdep_cut3_max_HOdepth4_)
5622  h_runbadrateC_depth4_HO->Fill(float(eeeeee), 1.);
5623  h_bcnnbadchannels_depth4_HO->Fill(float(bcn), float(nbadchannels));
5624  h_runbadrate0_depth4_HO->Fill(float(eeeeee), 1.);
5625  h_bcnbadrate0_depth4_HO->Fill(float(bcn), 1.);
5626  }
5627  }
5628  //HF
5629  if (k0 == 3) {
5630  if (k1 == 0) {
5631  h_nbadchannels_depth1_HF->Fill(float(nbadchannels));
5632  h_runnbadchannels_depth1_HF->Fill(float(eeeeee), float(nbadchannels));
5633  if (nbadchannels > lsdep_cut1_peak_HFdepth1_)
5634  h_runnbadchannelsC_depth1_HF->Fill(float(eeeeee), float(nbadchannels));
5635  if (nbadchannels != 0)
5636  h_runbadrate_depth1_HF->Fill(float(eeeeee), 1.);
5637  if (nbadchannels > lsdep_cut3_max_HFdepth1_)
5638  h_runbadrateC_depth1_HF->Fill(float(eeeeee), 1.);
5639  h_bcnnbadchannels_depth1_HF->Fill(float(bcn), float(nbadchannels));
5640  h_runbadrate0_depth1_HF->Fill(float(eeeeee), 1.);
5641  h_bcnbadrate0_depth1_HF->Fill(float(bcn), 1.);
5642  }
5643  if (k1 == 1) {
5644  h_nbadchannels_depth2_HF->Fill(float(nbadchannels));
5645  h_runnbadchannels_depth2_HF->Fill(float(eeeeee), float(nbadchannels));
5646  if (nbadchannels > lsdep_cut1_peak_HFdepth2_)
5647  h_runnbadchannelsC_depth2_HF->Fill(float(eeeeee), float(nbadchannels));
5648  if (nbadchannels != 0)
5649  h_runbadrate_depth2_HF->Fill(float(eeeeee), 1.);
5650  if (nbadchannels > lsdep_cut3_max_HFdepth2_)
5651  h_runbadrateC_depth2_HF->Fill(float(eeeeee), 1.);
5652  h_bcnnbadchannels_depth2_HF->Fill(float(bcn), float(nbadchannels));
5653  h_runbadrate0_depth2_HF->Fill(float(eeeeee), 1.);
5654  h_bcnbadrate0_depth2_HF->Fill(float(bcn), 1.);
5655  }
5656  }
5657 
5659  } //k1
5660  } //k0
5662  } //if(recordHistoes_&& studyRunDependenceHist_)
5663 
5666  iEvent.getByToken(tok_calib_, calib);
5667 
5668  bool gotCALIBDigis = true;
5669  if (!(iEvent.getByToken(tok_calib_, calib))) {
5670  gotCALIBDigis = false; //this is a boolean set up to check if there are CALIBgigis in input root file
5671  }
5672  if (!(calib.isValid())) {
5673  gotCALIBDigis = false; //if it is not there, leave it false
5674  }
5675  if (!gotCALIBDigis) {
5676  } else {
5677  for (HcalCalibDigiCollection::const_iterator digi = calib->begin(); digi != calib->end(); digi++) {
5678  int cal_det = digi->id().hcalSubdet(); // 1-HB,2-HE,3-HO,4-HF
5679  int cal_phi = digi->id().iphi();
5680  int cal_eta = digi->id().ieta();
5681  int cal_cbox = digi->id().cboxChannel();
5682 
5685  if (cal_det > 0 && cal_det < 5 && cal_cbox == 0) {
5686  int iphi = cal_phi - 1;
5687  int ieta = cal_eta;
5688  if (ieta > 0)
5689  ieta -= 1;
5690  nTS = digi->size();
5691  double max_signal = -100.;
5692  int ts_with_max_signal = -100;
5693  double timew = 0.;
5694 
5695  //
5696  if (nTS <= numOfTS)
5697  for (int i = 0; i < nTS; i++) {
5698  double ampldefault = adc2fC[digi->sample(i).adc() & 0xff];
5699  if (max_signal < ampldefault) {
5700  max_signal = ampldefault;
5701  ts_with_max_signal = i;
5702  }
5703  if (i > 1 && i < 6)
5704  calib3[cal_det - 1][ieta + 41][iphi] += ampldefault;
5705  calib0[cal_det - 1][ieta + 41][iphi] += ampldefault;
5706  timew += (i + 1) * ampldefault;
5707  } // for
5708  //
5709 
5710  double amplitude = calib0[cal_det - 1][ieta + 41][iphi];
5711  double aveamplitude = -100.;
5712  if (amplitude > 0 && timew > 0)
5713  aveamplitude = timew / amplitude; // average_TS +1
5714  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
5715  caliba[cal_det - 1][ieta + 41][iphi] = aveamplitude1;
5716 
5717  double rmsamp = 0.;
5718  for (int ii = 0; ii < nTS; ii++) {
5719  double ampldefault = adc2fC[digi->sample(ii).adc() & 0xff];
5720  double aaaaaa = (ii + 1) - aveamplitude;
5721  double aaaaaa2 = aaaaaa * aaaaaa;
5722  rmsamp += (aaaaaa2 * ampldefault); // fC
5723  } //for 2
5724  double rmsamplitude = -100.;
5725  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
5726  rmsamplitude = sqrt(rmsamp / amplitude);
5727  calibw[cal_det - 1][ieta + 41][iphi] = rmsamplitude;
5728  //
5729  calibt[cal_det - 1][ieta + 41][iphi] = ts_with_max_signal;
5730  //
5731 
5732  if (ts_with_max_signal > -1 && ts_with_max_signal < nTS)
5733  calib2[cal_det - 1][ieta + 41][iphi] = adc2fC[digi->sample(ts_with_max_signal).adc() & 0xff];
5734  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < nTS)
5735  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal + 1).adc() & 0xff];
5736  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < nTS)
5737  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal + 2).adc() & 0xff];
5738  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < nTS)
5739  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal - 1).adc() & 0xff];
5740  if (ts_with_max_signal - 2 > -1 && ts_with_max_signal - 2 < nTS)
5741  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal - 2).adc() & 0xff];
5742  //
5743  bool anycapid = true;
5744  bool anyer = false;
5745  bool anydv = true;
5746  int error1 = 0, error2 = 0, error3 = 0;
5747  int lastcapid = 0, capid = 0;
5748  for (int ii = 0; ii < (*digi).size(); ii++) {
5749  capid = (*digi)[ii].capid(); // capId (0-3, sequential)
5750  bool er = (*digi)[ii].er(); // error
5751  bool dv = (*digi)[ii].dv(); // valid data
5752  if (ii != 0 && ((lastcapid + 1) % 4) != capid)
5753  anycapid = false;
5754  lastcapid = capid;
5755  if (er)
5756  anyer = true;
5757  if (!dv)
5758  anydv = false;
5759  }
5760  if (!anycapid)
5761  error1 = 1;
5762  if (anyer)
5763  error2 = 1;
5764  if (!anydv)
5765  error3 = 1;
5766  if (error1 != 0 || error2 != 0 || error3 != 0)
5767  calibcapiderror[cal_det - 1][ieta + 41][iphi] = 100;
5768 
5769  } // if(cal_det>0 && cal_det<5
5770  } //if(recordHistoes_ && studyCalibCellsHist_)
5772 
5774  } //if(recordNtuples_) {
5775 
5776  } //for(HcalCalibDigiCollection
5777  } //if(calib.isValid(
5781  for (int k1 = 0; k1 < nsub; k1++) {
5782  for (int k2 = 0; k2 < neta; k2++) {
5783  for (int k3 = 0; k3 < nphi; k3++) {
5784  int k2plot = k2 - 41;
5785  if (flagcpuoptimization_ == 0) {
5787 
5788  if (signal[k1][k2][k3] > 0.) {
5789  if (k1 == 0) {
5790  h_FullSignal3D_HB->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5791  h_FullSignal3D0_HB->Fill(double(k2plot), double(k3), 1.);
5792  }
5793  if (k1 == 1) {
5794  h_FullSignal3D_HE->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5795  h_FullSignal3D0_HE->Fill(double(k2plot), double(k3), 1.);
5796  }
5797  if (k1 == 2) {
5798  h_FullSignal3D_HO->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5799  h_FullSignal3D0_HO->Fill(double(k2plot), double(k3), 1.);
5800  }
5801  if (k1 == 3) {
5802  h_FullSignal3D_HF->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5803  h_FullSignal3D0_HF->Fill(double(k2plot), double(k3), 1.);
5804  }
5805  }
5806 
5807  } // optimization
5809 
5811  // k2 = 0-81, k3= 0-71
5812  // return to real indexes in eta and phi ( k20 and k30)
5813  int k20 = k2 - 41; // k20 = -41 - 40
5814  if (k20 > 0 || k20 == 0)
5815  k20 += 1; // k20 = -41 - -1 and +1 - +41
5816  int k30 = k3 + 1; // k30= 1-nphi
5817 
5818  // find calibration indexes in eta and phi ( kk2 and kk3)
5819  int kk2 = 0, kk3 = 0;
5820  if (k1 == 0 || k1 == 1) {
5821  if (k20 > 0)
5822  kk2 = 1;
5823  else
5824  kk2 = -1;
5825  if (k30 == 71 || k30 == nphi || k30 == 1 || k30 == 2)
5826  kk3 = 71;
5827  else
5828  kk3 = ((k30 - 3) / 4) * 4 + 3;
5829  } else if (k1 == 2) {
5830  if (abs(k20) <= 4) {
5831  kk2 = 0;
5832  if (k30 == 71 || k30 == nphi || k30 == 1 || k30 == 2 || k30 == 3 || k30 == 4)
5833  kk3 = 71;
5834  else
5835  kk3 = ((k30 - 5) / 6) * 6 + 5;
5836  } else {
5837  if (abs(k20) > 4 && abs(k20) <= 10)
5838  kk2 = 1;
5839  if (abs(k20) > 10 && abs(k20) <= 15)
5840  kk2 = 2;
5841  if (k20 < 0)
5842  kk2 = -kk2;
5843  if (k30 == 71 || k30 == nphi || (k30 >= 1 && k30 <= 10))
5844  kk3 = 71;
5845  else
5846  kk3 = ((k30 - 11) / 12) * 12 + 11;
5847  }
5848  } else if (k1 == 3) {
5849  if (k20 > 0)
5850  kk2 = 1;
5851  else
5852  kk2 = -1;
5853  if (k30 >= 1 && k30 <= 18)
5854  kk3 = 1;
5855  if (k30 >= 19 && k30 <= 36)
5856  kk3 = 19;
5857  if (k30 >= 37 && k30 <= 54)
5858  kk3 = 37;
5859  if (k30 >= 55 && k30 <= nphi)
5860  kk3 = 55;
5861  }
5862  // return to indexes in massiv
5863  int kkk2 = kk2 + 41;
5864  if (kk2 > 0)
5865  kkk2 -= 1;
5866  int kkk3 = kk3;
5867  kkk3 -= 1;
5868 
5869  if (flagcpuoptimization_ == 0) {
5870  double GetRMSOverNormalizedSignal = -1.;
5871  if (signal[k1][k2][k3] > 0. && calib0[k1][kkk2][kkk3] > 0.) {
5872  GetRMSOverNormalizedSignal = signal[k1][k2][k3] / calib0[k1][kkk2][kkk3];
5873  if (k1 == 0) {
5874  h_mapGetRMSOverNormalizedSignal_HB->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5875  h_mapGetRMSOverNormalizedSignal0_HB->Fill(double(k2plot), double(k3), 1.);
5876  }
5877  if (k1 == 1) {
5878  h_mapGetRMSOverNormalizedSignal_HE->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5879  h_mapGetRMSOverNormalizedSignal0_HE->Fill(double(k2plot), double(k3), 1.);
5880  }
5881  if (k1 == 2) {
5882  h_mapGetRMSOverNormalizedSignal_HO->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5883  h_mapGetRMSOverNormalizedSignal0_HO->Fill(double(k2plot), double(k3), 1.);
5884  }
5885  if (k1 == 3) {
5886  h_mapGetRMSOverNormalizedSignal_HF->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5887  h_mapGetRMSOverNormalizedSignal0_HF->Fill(double(k2plot), double(k3), 1.);
5888  }
5889  }
5890  } //optimization
5892  if (signal[k1][k2][k3] > 0.) {
5893  // ADC
5894  double adc = 0.;
5895  if (calib0[k1][kkk2][kkk3] > 0.)
5896  adc = calib0[k1][kkk2][kkk3];
5897  // Ratio
5898  double ratio = 2.;
5899  if (calib0[k1][kkk2][kkk3] > 0.)
5900  ratio = calib2[k1][kkk2][kkk3] / calib0[k1][kkk2][kkk3];
5901  // TSmax
5902  float calibtsmax = calibt[k1][kkk2][kkk3];
5903  // TSmean
5904  float calibtsmean = caliba[k1][kkk2][kkk3];
5905  // Width
5906  float calibwidth = calibw[k1][kkk2][kkk3];
5907  // CapIdErrors
5908  float calibcap = -100.;
5909  calibcap = calibcapiderror[k1][kkk2][kkk3];
5910 
5911  // HB:
5912  if (k1 == 0) {
5913  // ADC
5914  h_ADCCalib_HB->Fill(adc, 1.);
5915  h_ADCCalib1_HB->Fill(adc, 1.);
5916  if (adc < calibrADCHBMin_ || adc > calibrADCHBMax_)
5917  h_mapADCCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5918  h_mapADCCalib_HB->Fill(double(k2plot), double(k3), adc);
5919  // Ratio
5920  h_RatioCalib_HB->Fill(ratio, 1.);
5921  if (ratio < calibrRatioHBMin_ || ratio > calibrRatioHBMax_)
5922  h_mapRatioCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5923  h_mapRatioCalib_HB->Fill(double(k2plot), double(k3), ratio);
5924  // TSmax
5925  if (calibtsmax > -0.5) {
5926  h_TSmaxCalib_HB->Fill(calibtsmax, 1.);
5927  if (calibtsmax < calibrTSmaxHBMin_ || calibtsmax > calibrTSmaxHBMax_)
5928  h_mapTSmaxCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5929  h_mapTSmaxCalib_HB->Fill(double(k2plot), double(k3), calibtsmax);
5930  }
5931  // TSmean
5932  if (calibtsmean > -0.5) {
5933  h_TSmeanCalib_HB->Fill(calibtsmean, 1.);
5934  if (calibtsmean < calibrTSmeanHBMin_ || calibtsmean > calibrTSmeanHBMax_)
5935  h_mapTSmeanCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5936  h_mapTSmeanCalib_HB->Fill(double(k2plot), double(k3), calibtsmean);
5937  }
5938  // Width
5939  if (calibwidth > -0.5) {
5940  h_WidthCalib_HB->Fill(calibwidth, 1.);
5941  if (calibwidth < calibrWidthHBMin_ || calibwidth > calibrWidthHBMax_)
5942  h_mapWidthCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5943  h_mapWidthCalib_HB->Fill(double(k2plot), double(k3), calibwidth);
5944  }
5945  // CapIdErrors
5946  if (calibcap > 0)
5947  h_mapCapCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5948  //
5949  h_map_HB->Fill(double(k2plot), double(k3), 1.);
5950  }
5951  // HE:
5952  if (k1 == 1) {
5953  // ADC
5954  h_ADCCalib_HE->Fill(adc, 1.);
5955  h_ADCCalib1_HE->Fill(adc, 1.);
5956  if (adc < calibrADCHEMin_ || adc > calibrADCHEMax_)
5957  h_mapADCCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5958  h_mapADCCalib_HE->Fill(double(k2plot), double(k3), adc);
5959  // Ratio
5960  h_RatioCalib_HE->Fill(ratio, 1.);
5961  if (ratio < calibrRatioHEMin_ || ratio > calibrRatioHEMax_)
5962  h_mapRatioCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5963  h_mapRatioCalib_HE->Fill(double(k2plot), double(k3), ratio);
5964  // TSmax
5965  if (calibtsmax > -0.5) {
5966  h_TSmaxCalib_HE->Fill(calibtsmax, 1.);
5967  if (calibtsmax < calibrTSmaxHEMin_ || calibtsmax > calibrTSmaxHEMax_)
5968  h_mapTSmaxCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5969  h_mapTSmaxCalib_HE->Fill(double(k2plot), double(k3), calibtsmax);
5970  }
5971  // TSmean
5972  if (calibtsmean > -0.5) {
5973  h_TSmeanCalib_HE->Fill(calibtsmean, 1.);
5974  if (calibtsmean < calibrTSmeanHEMin_ || calibtsmean > calibrTSmeanHEMax_)
5975  h_mapTSmeanCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5976  h_mapTSmeanCalib_HE->Fill(double(k2plot), double(k3), calibtsmean);
5977  }
5978  // Width
5979  if (calibwidth > -0.5) {
5980  h_WidthCalib_HE->Fill(calibwidth, 1.);
5981  if (calibwidth < calibrWidthHEMin_ || calibwidth > calibrWidthHEMax_)
5982  h_mapWidthCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5983  h_mapWidthCalib_HE->Fill(double(k2plot), double(k3), calibwidth);
5984  }
5985  // CapIdErrors
5986  if (calibcap > 0)
5987  h_mapCapCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5988  //
5989  h_map_HE->Fill(double(k2plot), double(k3), 1.);
5990  }
5991  // HO:
5992  if (k1 == 2) {
5993  // ADC
5994  h_ADCCalib_HO->Fill(adc, 1.);
5995  h_ADCCalib1_HO->Fill(adc, 1.);
5996  if (adc < calibrADCHOMin_ || adc > calibrADCHOMax_)
5997  h_mapADCCalib047_HO->Fill(double(k2plot), double(k3), 1.);
5998  h_mapADCCalib_HO->Fill(double(k2plot), double(k3), adc);
5999  // Ratio
6000  h_RatioCalib_HO->Fill(ratio, 1.);
6001  if (ratio < calibrRatioHOMin_ || ratio > calibrRatioHOMax_)
6002  h_mapRatioCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6003  h_mapRatioCalib_HO->Fill(double(k2plot), double(k3), ratio);
6004  // TSmax
6005  if (calibtsmax > -0.5) {
6006  h_TSmaxCalib_HO->Fill(calibtsmax, 1.);
6007  if (calibtsmax < calibrTSmaxHOMin_ || calibtsmax > calibrTSmaxHOMax_)
6008  h_mapTSmaxCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6009  h_mapTSmaxCalib_HO->Fill(double(k2plot), double(k3), calibtsmax);
6010  }
6011  // TSmean
6012  if (calibtsmean > -0.5) {
6013  h_TSmeanCalib_HO->Fill(calibtsmean, 1.);
6014  if (calibtsmean < calibrTSmeanHOMin_ || calibtsmean > calibrTSmeanHOMax_)
6015  h_mapTSmeanCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6016  h_mapTSmeanCalib_HO->Fill(double(k2plot), double(k3), calibtsmean);
6017  }
6018  // Width
6019  if (calibwidth > -0.5) {
6020  h_WidthCalib_HO->Fill(calibwidth, 1.);
6021  if (calibwidth < calibrWidthHOMin_ || calibwidth > calibrWidthHOMax_)
6022  h_mapWidthCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6023  h_mapWidthCalib_HO->Fill(double(k2plot), double(k3), calibwidth);
6024  }
6025  // CapIdErrors
6026  if (calibcap > 0)
6027  h_mapCapCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6028  //
6029  h_map_HO->Fill(double(k2plot), double(k3), 1.);
6030  }
6031  // HF:
6032  if (k1 == 3) {
6033  // ADC
6034  h_ADCCalib_HF->Fill(adc, 1.);
6035  h_ADCCalib1_HF->Fill(adc, 1.);
6036  if (adc < calibrADCHFMin_ || adc > calibrADCHFMax_)
6037  h_mapADCCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6038  h_mapADCCalib_HF->Fill(double(k2plot), double(k3), adc);
6039  // Ratio
6040  h_RatioCalib_HF->Fill(ratio, 1.);
6041  if (ratio < calibrRatioHFMin_ || ratio > calibrRatioHFMax_)
6042  h_mapRatioCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6043  h_mapRatioCalib_HF->Fill(double(k2plot), double(k3), ratio);
6044  // TSmax
6045  if (calibtsmax > -0.5) {
6046  h_TSmaxCalib_HF->Fill(calibtsmax, 1.);
6047  if (calibtsmax < calibrTSmaxHFMin_ || calibtsmax > calibrTSmaxHFMax_)
6048  h_mapTSmaxCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6049  h_mapTSmaxCalib_HF->Fill(double(k2plot), double(k3), calibtsmax);
6050  }
6051  // TSmean
6052  if (calibtsmean > -0.5) {
6053  h_TSmeanCalib_HF->Fill(calibtsmean, 1.);
6054  if (calibtsmean < calibrTSmeanHFMin_ || calibtsmean > calibrTSmeanHFMax_)
6055  h_mapTSmeanCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6056  h_mapTSmeanCalib_HF->Fill(double(k2plot), double(k3), calibtsmean);
6057  }
6058  // Width
6059  if (calibwidth > -0.5) {
6060  h_WidthCalib_HF->Fill(calibwidth, 1.);
6061  if (calibwidth < calibrWidthHFMin_ || calibwidth > calibrWidthHFMax_)
6062  h_mapWidthCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6063  h_mapWidthCalib_HF->Fill(double(k2plot), double(k3), calibwidth);
6064  }
6065  // CapIdErrors
6066  if (calibcap > 0)
6067  h_mapCapCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6068  //
6069  h_map_HF->Fill(double(k2plot), double(k3), 1.);
6070  }
6072  } // if(signal[k1][k2][k3]>0.)
6074  } // k3
6075  } // k2
6076  } // k1
6077 
6079 
6080  } //if(recordHistoes_&& studyCalibCellsHist_)
6081 
6084  myTree->Fill();
6085  // if(recordNtuples_ && nevent < maxNeventsInNtuple_) myTree->Fill();
6086 
6088  if (++local_event % 100 == 0) {
6089  if (verbosity < 0)
6090  std::cout << "run " << Run << " processing events " << local_event << " ok, "
6091  << ", lumi " << lumi << ", numOfLaserEv " << numOfLaserEv << std::endl;
6092  }
6093  } // bcn
6094 
6095  //EndAnalyzer
6096 }
6097 
6098 // ------------ method called once each job just before starting event loop -----------
6100  if (verbosity > 0)
6101  std::cout << "======================== beignJob START +++++++++++++++++++++++++++" << std::endl;
6102  nnnnnn = 0;
6103  nnnnnnhbhe = 0;
6104  nnnnnnhbheqie11 = 0;
6105  nevent = 0;
6106  nevent50 = 0;
6107  counterhf = 0;
6108  counterhfqie10 = 0;
6109  counterho = 0;
6110  nnnnnn1 = 0;
6111  nnnnnn2 = 0;
6112  nnnnnn3 = 0;
6113  nnnnnn4 = 0;
6114  nnnnnn5 = 0;
6115  nnnnnn6 = 0;
6117 
6118  if (recordHistoes_) {
6119  // ha2 = fs_->make<TH2F>("ha2"," ", neta, -41., 41., nphi, 0., bphi);
6120 
6121  h_errorGeneral = fs_->make<TH1F>("h_errorGeneral", " ", 5, 0., 5.);
6122  h_error1 = fs_->make<TH1F>("h_error1", " ", 5, 0., 5.);
6123  h_error2 = fs_->make<TH1F>("h_error2", " ", 5, 0., 5.);
6124  h_error3 = fs_->make<TH1F>("h_error3", " ", 5, 0., 5.);
6125  h_amplError = fs_->make<TH1F>("h_amplError", " ", 100, -2., 98.);
6126  h_amplFine = fs_->make<TH1F>("h_amplFine", " ", 100, -2., 98.);
6127 
6128  h_errorGeneral_HB = fs_->make<TH1F>("h_errorGeneral_HB", " ", 5, 0., 5.);
6129  h_error1_HB = fs_->make<TH1F>("h_error1_HB", " ", 5, 0., 5.);
6130  h_error2_HB = fs_->make<TH1F>("h_error2_HB", " ", 5, 0., 5.);
6131  h_error3_HB = fs_->make<TH1F>("h_error3_HB", " ", 5, 0., 5.);
6132  h_error4_HB = fs_->make<TH1F>("h_error4_HB", " ", 5, 0., 5.);
6133  h_error5_HB = fs_->make<TH1F>("h_error5_HB", " ", 5, 0., 5.);
6134  h_error6_HB = fs_->make<TH1F>("h_error6_HB", " ", 5, 0., 5.);
6135  h_error7_HB = fs_->make<TH1F>("h_error7_HB", " ", 5, 0., 5.);
6136  h_amplError_HB = fs_->make<TH1F>("h_amplError_HB", " ", 100, -2., 98.);
6137  h_amplFine_HB = fs_->make<TH1F>("h_amplFine_HB", " ", 100, -2., 98.);
6138  h_mapDepth1Error_HB = fs_->make<TH2F>("h_mapDepth1Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6139  h_mapDepth2Error_HB = fs_->make<TH2F>("h_mapDepth2Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6140  h_mapDepth3Error_HB = fs_->make<TH2F>("h_mapDepth3Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6141  h_mapDepth4Error_HB = fs_->make<TH2F>("h_mapDepth4Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6142  h_fiber0_HB = fs_->make<TH1F>("h_fiber0_HB", " ", 10, 0., 10.);
6143  h_fiber1_HB = fs_->make<TH1F>("h_fiber1_HB", " ", 10, 0., 10.);
6144  h_fiber2_HB = fs_->make<TH1F>("h_fiber2_HB", " ", 40, 0., 40.);
6145  h_repetedcapid_HB = fs_->make<TH1F>("h_repetedcapid_HB", " ", 5, 0., 5.);
6146 
6147  h_errorGeneral_HE = fs_->make<TH1F>("h_errorGeneral_HE", " ", 5, 0., 5.);
6148  h_error1_HE = fs_->make<TH1F>("h_error1_HE", " ", 5, 0., 5.);
6149  h_error2_HE = fs_->make<TH1F>("h_error2_HE", " ", 5, 0., 5.);
6150  h_error3_HE = fs_->make<TH1F>("h_error3_HE", " ", 5, 0., 5.);
6151  h_error4_HE = fs_->make<TH1F>("h_error4_HE", " ", 5, 0., 5.);
6152  h_error5_HE = fs_->make<TH1F>("h_error5_HE", " ", 5, 0., 5.);
6153  h_error6_HE = fs_->make<TH1F>("h_error6_HE", " ", 5, 0., 5.);
6154  h_error7_HE = fs_->make<TH1F>("h_error7_HE", " ", 5, 0., 5.);
6155  h_amplError_HE = fs_->make<TH1F>("h_amplError_HE", " ", 100, -2., 98.);
6156  h_amplFine_HE = fs_->make<TH1F>("h_amplFine_HE", " ", 100, -2., 98.);
6157  h_mapDepth1Error_HE = fs_->make<TH2F>("h_mapDepth1Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6158  h_mapDepth2Error_HE = fs_->make<TH2F>("h_mapDepth2Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6159  h_mapDepth3Error_HE = fs_->make<TH2F>("h_mapDepth3Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6160  h_mapDepth4Error_HE = fs_->make<TH2F>("h_mapDepth4Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6161  h_mapDepth5Error_HE = fs_->make<TH2F>("h_mapDepth5Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6162  h_mapDepth6Error_HE = fs_->make<TH2F>("h_mapDepth6Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6163  h_mapDepth7Error_HE = fs_->make<TH2F>("h_mapDepth7Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6164  h_fiber0_HE = fs_->make<TH1F>("h_fiber0_HE", " ", 10, 0., 10.);
6165  h_fiber1_HE = fs_->make<TH1F>("h_fiber1_HE", " ", 10, 0., 10.);
6166  h_fiber2_HE = fs_->make<TH1F>("h_fiber2_HE", " ", 40, 0., 40.);
6167  h_repetedcapid_HE = fs_->make<TH1F>("h_repetedcapid_HE", " ", 5, 0., 5.);
6168 
6169  h_errorGeneral_HF = fs_->make<TH1F>("h_errorGeneral_HF", " ", 5, 0., 5.);
6170  h_error1_HF = fs_->make<TH1F>("h_error1_HF", " ", 5, 0., 5.);
6171  h_error2_HF = fs_->make<TH1F>("h_error2_HF", " ", 5, 0., 5.);
6172  h_error3_HF = fs_->make<TH1F>("h_error3_HF", " ", 5, 0., 5.);
6173  h_error4_HF = fs_->make<TH1F>("h_error4_HF", " ", 5, 0., 5.);
6174  h_error5_HF = fs_->make<TH1F>("h_error5_HF", " ", 5, 0., 5.);
6175  h_error6_HF = fs_->make<TH1F>("h_error6_HF", " ", 5, 0., 5.);
6176  h_error7_HF = fs_->make<TH1F>("h_error7_HF", " ", 5, 0., 5.);
6177  h_amplError_HF = fs_->make<TH1F>("h_amplError_HF", " ", 100, -2., 98.);
6178  h_amplFine_HF = fs_->make<TH1F>("h_amplFine_HF", " ", 100, -2., 98.);
6179  h_mapDepth1Error_HF = fs_->make<TH2F>("h_mapDepth1Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6180  h_mapDepth2Error_HF = fs_->make<TH2F>("h_mapDepth2Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6181  h_mapDepth3Error_HF = fs_->make<TH2F>("h_mapDepth3Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6182  h_mapDepth4Error_HF = fs_->make<TH2F>("h_mapDepth4Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6183  h_fiber0_HF = fs_->make<TH1F>("h_fiber0_HF", " ", 10, 0., 10.);
6184  h_fiber1_HF = fs_->make<TH1F>("h_fiber1_HF", " ", 10, 0., 10.);
6185  h_fiber2_HF = fs_->make<TH1F>("h_fiber2_HF", " ", 40, 0., 40.);
6186  h_repetedcapid_HF = fs_->make<TH1F>("h_repetedcapid_HF", " ", 5, 0., 5.);
6187 
6188  h_errorGeneral_HO = fs_->make<TH1F>("h_errorGeneral_HO", " ", 5, 0., 5.);
6189  h_error1_HO = fs_->make<TH1F>("h_error1_HO", " ", 5, 0., 5.);
6190  h_error2_HO = fs_->make<TH1F>("h_error2_HO", " ", 5, 0., 5.);
6191  h_error3_HO = fs_->make<TH1F>("h_error3_HO", " ", 5, 0., 5.);
6192  h_error4_HO = fs_->make<TH1F>("h_error4_HO", " ", 5, 0., 5.);
6193  h_error5_HO = fs_->make<TH1F>("h_error5_HO", " ", 5, 0., 5.);
6194  h_error6_HO = fs_->make<TH1F>("h_error6_HO", " ", 5, 0., 5.);
6195  h_error7_HO = fs_->make<TH1F>("h_error7_HO", " ", 5, 0., 5.);
6196  h_amplError_HO = fs_->make<TH1F>("h_amplError_HO", " ", 100, -2., 98.);
6197  h_amplFine_HO = fs_->make<TH1F>("h_amplFine_HO", " ", 100, -2., 98.);
6198  h_mapDepth4Error_HO = fs_->make<TH2F>("h_mapDepth4Error_HO", " ", neta, -41., 41., nphi, 0., bphi);
6199  h_fiber0_HO = fs_->make<TH1F>("h_fiber0_HO", " ", 10, 0., 10.);
6200  h_fiber1_HO = fs_->make<TH1F>("h_fiber1_HO", " ", 10, 0., 10.);
6201  h_fiber2_HO = fs_->make<TH1F>("h_fiber2_HO", " ", 40, 0., 40.);
6202  h_repetedcapid_HO = fs_->make<TH1F>("h_repetedcapid_HO", " ", 5, 0., 5.);
6203 
6205 
6206  h_numberofhitsHBtest = fs_->make<TH1F>("h_numberofhitsHBtest", " ", 100, 0., 100.);
6207  h_AmplitudeHBtest = fs_->make<TH1F>("h_AmplitudeHBtest", " ", 100, 0., 10000.);
6208  h_AmplitudeHBtest1 = fs_->make<TH1F>("h_AmplitudeHBtest1", " ", 100, 0., 1000000.);
6209  h_AmplitudeHBtest6 = fs_->make<TH1F>("h_AmplitudeHBtest6", " ", 100, 0., 2000000.);
6210  h_totalAmplitudeHB = fs_->make<TH1F>("h_totalAmplitudeHB", " ", 100, 0., 3000000.);
6211  h_totalAmplitudeHBperEvent = fs_->make<TH1F>("h_totalAmplitudeHBperEvent", " ", 1000, 1., 1001.);
6212  // fullAmplitude:
6213  h_ADCAmpl345Zoom_HB = fs_->make<TH1F>("h_ADCAmpl345Zoom_HB", " ", 100, 0., 400.);
6214  h_ADCAmpl345Zoom1_HB = fs_->make<TH1F>("h_ADCAmpl345Zoom1_HB", " ", 100, 0., 100.);
6215  h_ADCAmpl345_HB = fs_->make<TH1F>("h_ADCAmpl345_HB", " ", 100, 10., 3000.);
6216 
6217  h_AmplitudeHBrest = fs_->make<TH1F>("h_AmplitudeHBrest", " ", 100, 0., 10000.);
6218  h_AmplitudeHBrest1 = fs_->make<TH1F>("h_AmplitudeHBrest1", " ", 100, 0., 1000000.);
6219  h_AmplitudeHBrest6 = fs_->make<TH1F>("h_AmplitudeHBrest6", " ", 100, 0., 2000000.);
6220 
6221  h_ADCAmpl345_HBCapIdError = fs_->make<TH1F>("h_ADCAmpl345_HBCapIdError", " ", 100, 10., 3000.);
6222  h_ADCAmpl345_HBCapIdNoError = fs_->make<TH1F>("h_ADCAmpl345_HBCapIdNoError", " ", 100, 10., 3000.);
6223  h_ADCAmpl_HBCapIdError = fs_->make<TH1F>("h_ADCAmpl_HBCapIdError", " ", 100, 10., 3000.);
6224  h_ADCAmpl_HBCapIdNoError = fs_->make<TH1F>("h_ADCAmpl_HBCapIdNoError", " ", 100, 10., 3000.);
6225 
6226  h_ADCAmplZoom_HB = fs_->make<TH1F>("h_ADCAmplZoom_HB", " ", 100, 0., 400.);
6227  h_ADCAmplZoom1_HB = fs_->make<TH1F>("h_ADCAmplZoom1_HB", " ", 100, -20., 80.);
6228  h_ADCAmpl_HB = fs_->make<TH1F>("h_ADCAmpl_HB", " ", 100, 10., 5000.);
6229  h_mapDepth1ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6230  h_mapDepth2ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6231  h_mapDepth3ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6232  h_mapDepth4ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6234  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6236  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6238  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6240  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6241  h_mapDepth1ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6242  h_mapDepth2ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6243  h_mapDepth3ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6244  h_mapDepth4ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6245  h_TSmeanA_HB = fs_->make<TH1F>("h_TSmeanA_HB", " ", 100, -1., 11.);
6246  h_mapDepth1TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6247  h_mapDepth2TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6248  h_mapDepth3TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6249  h_mapDepth4TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6250  h_mapDepth1TSmeanA_HB = fs_->make<TH2F>("h_mapDepth1TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6251  h_mapDepth2TSmeanA_HB = fs_->make<TH2F>("h_mapDepth2TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6252  h_mapDepth3TSmeanA_HB = fs_->make<TH2F>("h_mapDepth3TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6253  h_mapDepth4TSmeanA_HB = fs_->make<TH2F>("h_mapDepth4TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6254  h_TSmaxA_HB = fs_->make<TH1F>("h_TSmaxA_HB", " ", 100, -1., 11.);
6255  h_mapDepth1TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6256  h_mapDepth2TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6257  h_mapDepth3TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6258  h_mapDepth4TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6259  h_mapDepth1TSmaxA_HB = fs_->make<TH2F>("h_mapDepth1TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6260  h_mapDepth2TSmaxA_HB = fs_->make<TH2F>("h_mapDepth2TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6261  h_mapDepth3TSmaxA_HB = fs_->make<TH2F>("h_mapDepth3TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6262  h_mapDepth4TSmaxA_HB = fs_->make<TH2F>("h_mapDepth4TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6263  // RMS:
6264  h_Amplitude_HB = fs_->make<TH1F>("h_Amplitude_HB", " ", 100, 0., 5.);
6265  h_mapDepth1Amplitude225_HB = fs_->make<TH2F>("h_mapDepth1Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6266  h_mapDepth2Amplitude225_HB = fs_->make<TH2F>("h_mapDepth2Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6267  h_mapDepth3Amplitude225_HB = fs_->make<TH2F>("h_mapDepth3Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6268  h_mapDepth4Amplitude225_HB = fs_->make<TH2F>("h_mapDepth4Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6269  h_mapDepth1Amplitude_HB = fs_->make<TH2F>("h_mapDepth1Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6270  h_mapDepth2Amplitude_HB = fs_->make<TH2F>("h_mapDepth2Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6271  h_mapDepth3Amplitude_HB = fs_->make<TH2F>("h_mapDepth3Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6272  h_mapDepth4Amplitude_HB = fs_->make<TH2F>("h_mapDepth4Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6273  // Ratio:
6274  h_Ampl_HB = fs_->make<TH1F>("h_Ampl_HB", " ", 100, 0., 1.1);
6275  h_mapDepth1Ampl047_HB = fs_->make<TH2F>("h_mapDepth1Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6276  h_mapDepth2Ampl047_HB = fs_->make<TH2F>("h_mapDepth2Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6277  h_mapDepth3Ampl047_HB = fs_->make<TH2F>("h_mapDepth3Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6278  h_mapDepth4Ampl047_HB = fs_->make<TH2F>("h_mapDepth4Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6279  h_mapDepth1Ampl_HB = fs_->make<TH2F>("h_mapDepth1Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6280  h_mapDepth2Ampl_HB = fs_->make<TH2F>("h_mapDepth2Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6281  h_mapDepth3Ampl_HB = fs_->make<TH2F>("h_mapDepth3Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6282  h_mapDepth4Ampl_HB = fs_->make<TH2F>("h_mapDepth4Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6283  h_mapDepth1AmplE34_HB = fs_->make<TH2F>("h_mapDepth1AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6284  h_mapDepth2AmplE34_HB = fs_->make<TH2F>("h_mapDepth2AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6285  h_mapDepth3AmplE34_HB = fs_->make<TH2F>("h_mapDepth3AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6286  h_mapDepth4AmplE34_HB = fs_->make<TH2F>("h_mapDepth4AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6287  h_mapDepth1_HB = fs_->make<TH2F>("h_mapDepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
6288  h_mapDepth2_HB = fs_->make<TH2F>("h_mapDepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6289  h_mapDepth3_HB = fs_->make<TH2F>("h_mapDepth3_HB", " ", neta, -41., 41., nphi, 0., bphi);
6290  h_mapDepth4_HB = fs_->make<TH2F>("h_mapDepth4_HB", " ", neta, -41., 41., nphi, 0., bphi);
6291 
6292  h_mapDepth1TS2_HB = fs_->make<TH2F>("h_mapDepth1TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6293  h_mapDepth2TS2_HB = fs_->make<TH2F>("h_mapDepth2TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6294  h_mapDepth3TS2_HB = fs_->make<TH2F>("h_mapDepth3TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6295  h_mapDepth4TS2_HB = fs_->make<TH2F>("h_mapDepth4TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6296  h_mapDepth1TS2_HE = fs_->make<TH2F>("h_mapDepth1TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6297  h_mapDepth2TS2_HE = fs_->make<TH2F>("h_mapDepth2TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6298  h_mapDepth3TS2_HE = fs_->make<TH2F>("h_mapDepth3TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6299  h_mapDepth4TS2_HE = fs_->make<TH2F>("h_mapDepth4TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6300  h_mapDepth5TS2_HE = fs_->make<TH2F>("h_mapDepth5TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6301  h_mapDepth6TS2_HE = fs_->make<TH2F>("h_mapDepth6TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6302  h_mapDepth7TS2_HE = fs_->make<TH2F>("h_mapDepth7TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6303  h_recSignalEnergy0_HF3 = fs_->make<TH2F>("h_recSignalEnergy0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6304  h_recSignalEnergy1_HF3 = fs_->make<TH2F>("h_recSignalEnergy1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6305  h_recSignalEnergy2_HF3 = fs_->make<TH2F>("h_recSignalEnergy2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6306  h_recSignalEnergy0_HF4 = fs_->make<TH2F>("h_recSignalEnergy0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6307  h_recSignalEnergy1_HF4 = fs_->make<TH2F>("h_recSignalEnergy1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6308  h_recSignalEnergy2_HF4 = fs_->make<TH2F>("h_recSignalEnergy2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6309  h_recNoiseEnergy0_HF3 = fs_->make<TH2F>("h_recNoiseEnergy0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6310  h_recNoiseEnergy1_HF3 = fs_->make<TH2F>("h_recNoiseEnergy1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6311  h_recNoiseEnergy2_HF3 = fs_->make<TH2F>("h_recNoiseEnergy2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6312  h_recNoiseEnergy0_HF4 = fs_->make<TH2F>("h_recNoiseEnergy0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6313  h_recNoiseEnergy1_HF4 = fs_->make<TH2F>("h_recNoiseEnergy1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6314  h_recNoiseEnergy2_HF4 = fs_->make<TH2F>("h_recNoiseEnergy2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6315  h_mapDepth1TS1_HF = fs_->make<TH2F>("h_mapDepth1TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6316  h_mapDepth2TS1_HF = fs_->make<TH2F>("h_mapDepth2TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6317  h_mapDepth3TS1_HF = fs_->make<TH2F>("h_mapDepth3TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6318  h_mapDepth4TS1_HF = fs_->make<TH2F>("h_mapDepth4TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6319  h_mapDepth4TS012_HO = fs_->make<TH2F>("h_mapDepth4TS012_HO", " ", neta, -41., 41., nphi, 0., bphi);
6320 
6322 
6323  // stuff regarding summed(total) Amplitude vs iEvent (histo-name is h_totalAmplitudeHEperEvent)
6324  // to see from which event ALL channels are available(related to quality of the run)
6325  h_numberofhitsHEtest = fs_->make<TH1F>("h_numberofhitsHEtest", " ", 100, 0., 10000.);
6326  h_AmplitudeHEtest = fs_->make<TH1F>("h_AmplitudeHEtest", " ", 100, 0., 1000000.);
6327  h_AmplitudeHEtest1 = fs_->make<TH1F>("h_AmplitudeHEtest1", " ", 100, 0., 1000000.);
6328  h_AmplitudeHEtest6 = fs_->make<TH1F>("h_AmplitudeHEtest6", " ", 100, 0., 2000000.);
6329  h_totalAmplitudeHE = fs_->make<TH1F>("h_totalAmplitudeHE", " ", 100, 0., 10000000000.);
6330  h_totalAmplitudeHEperEvent = fs_->make<TH1F>("h_totalAmplitudeHEperEvent", " ", 1000, 1., 1001.);
6331 
6332  // Aijk Amplitude:
6333  h_ADCAmplZoom1_HE = fs_->make<TH1F>("h_ADCAmplZoom1_HE", " ", npfit, 0., anpfit); // for amplmaxts 1TS w/ max
6334  h_ADCAmpl345Zoom1_HE = fs_->make<TH1F>("h_ADCAmpl345Zoom1_HE", " ", npfit, 0., anpfit); // for ampl3ts 3TSs
6335  h_ADCAmpl345Zoom_HE = fs_->make<TH1F>("h_ADCAmpl345Zoom_HE", " ", npfit, 0., anpfit); // for ampl 4TSs
6337  fs_->make<TH1F>("h_amplitudeaveragedbydepthes_HE", " ", npfit, 0., anpfit); // for cross-check: A spectrum
6339  fs_->make<TH1F>("h_ndepthesperamplitudebins_HE", " ", 10, 0., 10.); // for cross-check: ndepthes
6340 
6341  // Ampl12 4TSs to work with "ped-Gsel0" or "led-low-intensity" to clarify gain diff peak2-peak1
6343  fs_->make<TH2F>("h_mapADCAmplfirstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6345  fs_->make<TH2F>("h_mapADCAmplfirstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6347  fs_->make<TH2F>("h_mapADCAmplsecondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6349  "h_mapADCAmplsecondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6350 
6352  fs_->make<TH2F>("h_mapADCAmpl11firstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6354  fs_->make<TH2F>("h_mapADCAmpl11firstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6356  fs_->make<TH2F>("h_mapADCAmpl11secondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6358  fs_->make<TH2F>("h_mapADCAmpl11secondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6359 
6361  fs_->make<TH2F>("h_mapADCAmpl12firstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6363  fs_->make<TH2F>("h_mapADCAmpl12firstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6365  fs_->make<TH2F>("h_mapADCAmpl12secondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6367  fs_->make<TH2F>("h_mapADCAmpl12secondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6368 
6369  // Ampl12 4TSs to work with "ped-Gsel0" or "led-low-intensity" to clarify gain diff peak2-peak1 fit results:
6370  h_gsmdifferencefit1_HE = fs_->make<TH1F>("h_gsmdifferencefit1_HE", " ", 80, 20., 60.);
6371  h_gsmdifferencefit2_HE = fs_->make<TH1F>("h_gsmdifferencefit2_HE", " ", 80, 20., 60.);
6372  h_gsmdifferencefit3_HE = fs_->make<TH1F>("h_gsmdifferencefit3_HE", " ", 80, 20., 60.);
6373  h_gsmdifferencefit4_HE = fs_->make<TH1F>("h_gsmdifferencefit4_HE", " ", 80, 20., 60.);
6374  h_gsmdifferencefit5_HE = fs_->make<TH1F>("h_gsmdifferencefit5_HE", " ", 80, 20., 60.);
6375  h_gsmdifferencefit6_HE = fs_->make<TH1F>("h_gsmdifferencefit6_HE", " ", 80, 20., 60.);
6376 
6377  // Aijk Amplitude:
6378  h_ADCAmpl_HE = fs_->make<TH1F>("h_ADCAmpl_HE", " ", 200, 0., 2000000.);
6379  h_ADCAmplrest_HE = fs_->make<TH1F>("h_ADCAmplrest_HE", " ", 100, 0., 500.);
6380  h_ADCAmplrest1_HE = fs_->make<TH1F>("h_ADCAmplrest1_HE", " ", 100, 0., 100.);
6381  h_ADCAmplrest6_HE = fs_->make<TH1F>("h_ADCAmplrest6_HE", " ", 100, 0., 10000.);
6382 
6383  h_ADCAmpl345_HE = fs_->make<TH1F>("h_ADCAmpl345_HE", " ", 70, 0., 700000.);
6384 
6385  // SiPM corrections:
6386  h_corrforxaMAIN_HE = fs_->make<TH1F>("h_corrforxaMAIN_HE", " ", 70, 0., 700000.);
6387  h_corrforxaMAIN0_HE = fs_->make<TH1F>("h_corrforxaMAIN0_HE", " ", 70, 0., 700000.);
6388  h_corrforxaADDI_HE = fs_->make<TH1F>("h_corrforxaADDI_HE", " ", 70, 0., 700000.);
6389  h_corrforxaADDI0_HE = fs_->make<TH1F>("h_corrforxaADDI0_HE", " ", 70, 0., 700000.);
6390 
6391  h_mapDepth1ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6392  h_mapDepth2ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6393  h_mapDepth3ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6394  h_mapDepth4ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6395  h_mapDepth5ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6396  h_mapDepth6ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6397  h_mapDepth7ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6399  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6401  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6403  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6405  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6407  fs_->make<TH2F>("h_mapDepth5ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6409  fs_->make<TH2F>("h_mapDepth6ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6411  fs_->make<TH2F>("h_mapDepth7ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6412 
6413  h_mapDepth1ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6414  h_mapDepth2ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6415  h_mapDepth3ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6416  h_mapDepth4ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6417  h_mapDepth5ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6418  h_mapDepth6ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6419  h_mapDepth7ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6420  h_mapDepth1ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth1ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6421  h_mapDepth2ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth2ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6422  h_mapDepth3ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth3ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6423 
6424  h_TSmeanA_HE = fs_->make<TH1F>("h_TSmeanA_HE", " ", 100, -2., 8.);
6425  h_mapDepth1TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6426  h_mapDepth2TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6427  h_mapDepth3TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6428  h_mapDepth4TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6429  h_mapDepth5TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth5TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6430  h_mapDepth6TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth6TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6431  h_mapDepth7TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth7TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6432  h_mapDepth1TSmeanA_HE = fs_->make<TH2F>("h_mapDepth1TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6433  h_mapDepth2TSmeanA_HE = fs_->make<TH2F>("h_mapDepth2TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6434  h_mapDepth3TSmeanA_HE = fs_->make<TH2F>("h_mapDepth3TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6435  h_mapDepth4TSmeanA_HE = fs_->make<TH2F>("h_mapDepth4TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6436  h_mapDepth5TSmeanA_HE = fs_->make<TH2F>("h_mapDepth5TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6437  h_mapDepth6TSmeanA_HE = fs_->make<TH2F>("h_mapDepth6TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6438  h_mapDepth7TSmeanA_HE = fs_->make<TH2F>("h_mapDepth7TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6439  h_TSmaxA_HE = fs_->make<TH1F>("h_TSmaxA_HE", " ", 100, -1., 11.);
6440  h_mapDepth1TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6441  h_mapDepth2TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6442  h_mapDepth3TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6443  h_mapDepth4TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6444  h_mapDepth5TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth5TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6445  h_mapDepth6TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth6TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6446  h_mapDepth7TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth7TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6447  h_mapDepth1TSmaxA_HE = fs_->make<TH2F>("h_mapDepth1TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6448  h_mapDepth2TSmaxA_HE = fs_->make<TH2F>("h_mapDepth2TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6449  h_mapDepth3TSmaxA_HE = fs_->make<TH2F>("h_mapDepth3TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6450  h_mapDepth4TSmaxA_HE = fs_->make<TH2F>("h_mapDepth4TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6451  h_mapDepth5TSmaxA_HE = fs_->make<TH2F>("h_mapDepth5TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6452  h_mapDepth6TSmaxA_HE = fs_->make<TH2F>("h_mapDepth6TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6453  h_mapDepth7TSmaxA_HE = fs_->make<TH2F>("h_mapDepth7TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6454  // RMS:
6455  h_Amplitude_HE = fs_->make<TH1F>("h_Amplitude_HE", " ", 100, 0., 5.5);
6456  h_mapDepth1Amplitude225_HE = fs_->make<TH2F>("h_mapDepth1Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6457  h_mapDepth2Amplitude225_HE = fs_->make<TH2F>("h_mapDepth2Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6458  h_mapDepth3Amplitude225_HE = fs_->make<TH2F>("h_mapDepth3Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6459  h_mapDepth4Amplitude225_HE = fs_->make<TH2F>("h_mapDepth4Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6460  h_mapDepth5Amplitude225_HE = fs_->make<TH2F>("h_mapDepth5Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6461  h_mapDepth6Amplitude225_HE = fs_->make<TH2F>("h_mapDepth6Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6462  h_mapDepth7Amplitude225_HE = fs_->make<TH2F>("h_mapDepth7Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6463  h_mapDepth1Amplitude_HE = fs_->make<TH2F>("h_mapDepth1Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6464  h_mapDepth2Amplitude_HE = fs_->make<TH2F>("h_mapDepth2Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6465  h_mapDepth3Amplitude_HE = fs_->make<TH2F>("h_mapDepth3Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6466  h_mapDepth4Amplitude_HE = fs_->make<TH2F>("h_mapDepth4Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6467  h_mapDepth5Amplitude_HE = fs_->make<TH2F>("h_mapDepth5Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6468  h_mapDepth6Amplitude_HE = fs_->make<TH2F>("h_mapDepth6Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6469  h_mapDepth7Amplitude_HE = fs_->make<TH2F>("h_mapDepth7Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6470 
6471  // Ratio:
6472  h_Ampl_HE = fs_->make<TH1F>("h_Ampl_HE", " ", 100, 0., 1.1);
6473  h_mapDepth1Ampl047_HE = fs_->make<TH2F>("h_mapDepth1Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6474  h_mapDepth2Ampl047_HE = fs_->make<TH2F>("h_mapDepth2Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6475  h_mapDepth3Ampl047_HE = fs_->make<TH2F>("h_mapDepth3Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6476  h_mapDepth4Ampl047_HE = fs_->make<TH2F>("h_mapDepth4Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6477  h_mapDepth5Ampl047_HE = fs_->make<TH2F>("h_mapDepth5Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6478  h_mapDepth6Ampl047_HE = fs_->make<TH2F>("h_mapDepth6Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6479  h_mapDepth7Ampl047_HE = fs_->make<TH2F>("h_mapDepth7Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6480  h_mapDepth1Ampl_HE = fs_->make<TH2F>("h_mapDepth1Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6481  h_mapDepth2Ampl_HE = fs_->make<TH2F>("h_mapDepth2Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6482  h_mapDepth3Ampl_HE = fs_->make<TH2F>("h_mapDepth3Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6483  h_mapDepth4Ampl_HE = fs_->make<TH2F>("h_mapDepth4Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6484  h_mapDepth5Ampl_HE = fs_->make<TH2F>("h_mapDepth5Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6485  h_mapDepth6Ampl_HE = fs_->make<TH2F>("h_mapDepth6Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6486  h_mapDepth7Ampl_HE = fs_->make<TH2F>("h_mapDepth7Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6487  h_mapDepth1AmplE34_HE = fs_->make<TH2F>("h_mapDepth1AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6488  h_mapDepth2AmplE34_HE = fs_->make<TH2F>("h_mapDepth2AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6489  h_mapDepth3AmplE34_HE = fs_->make<TH2F>("h_mapDepth3AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6490  h_mapDepth4AmplE34_HE = fs_->make<TH2F>("h_mapDepth4AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6491  h_mapDepth5AmplE34_HE = fs_->make<TH2F>("h_mapDepth5AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6492  h_mapDepth6AmplE34_HE = fs_->make<TH2F>("h_mapDepth6AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6493  h_mapDepth7AmplE34_HE = fs_->make<TH2F>("h_mapDepth7AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6494  h_mapDepth1_HE = fs_->make<TH2F>("h_mapDepth1_HE", " ", neta, -41., 41., nphi, 0., bphi);
6495  h_mapDepth2_HE = fs_->make<TH2F>("h_mapDepth2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6496  h_mapDepth3_HE = fs_->make<TH2F>("h_mapDepth3_HE", " ", neta, -41., 41., nphi, 0., bphi);
6497  h_mapDepth4_HE = fs_->make<TH2F>("h_mapDepth4_HE", " ", neta, -41., 41., nphi, 0., bphi);
6498  h_mapDepth5_HE = fs_->make<TH2F>("h_mapDepth5_HE", " ", neta, -41., 41., nphi, 0., bphi);
6499  h_mapDepth6_HE = fs_->make<TH2F>("h_mapDepth6_HE", " ", neta, -41., 41., nphi, 0., bphi);
6500  h_mapDepth7_HE = fs_->make<TH2F>("h_mapDepth7_HE", " ", neta, -41., 41., nphi, 0., bphi);
6502  h_mapenophinorm_HE1 = fs_->make<TH2F>("h_mapenophinorm_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6503  h_mapenophinorm_HE2 = fs_->make<TH2F>("h_mapenophinorm_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6504  h_mapenophinorm_HE3 = fs_->make<TH2F>("h_mapenophinorm_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6505  h_mapenophinorm_HE4 = fs_->make<TH2F>("h_mapenophinorm_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6506  h_mapenophinorm_HE5 = fs_->make<TH2F>("h_mapenophinorm_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6507  h_mapenophinorm_HE6 = fs_->make<TH2F>("h_mapenophinorm_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6508  h_mapenophinorm_HE7 = fs_->make<TH2F>("h_mapenophinorm_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6509  h_mapenophinorm2_HE1 = fs_->make<TH2F>("h_mapenophinorm2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6510  h_mapenophinorm2_HE2 = fs_->make<TH2F>("h_mapenophinorm2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6511  h_mapenophinorm2_HE3 = fs_->make<TH2F>("h_mapenophinorm2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6512  h_mapenophinorm2_HE4 = fs_->make<TH2F>("h_mapenophinorm2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6513  h_mapenophinorm2_HE5 = fs_->make<TH2F>("h_mapenophinorm2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6514  h_mapenophinorm2_HE6 = fs_->make<TH2F>("h_mapenophinorm2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6515  h_mapenophinorm2_HE7 = fs_->make<TH2F>("h_mapenophinorm2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6516 
6517  h_maprphinorm_HE1 = fs_->make<TH2F>("h_maprphinorm_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6518  h_maprphinorm_HE2 = fs_->make<TH2F>("h_maprphinorm_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6519  h_maprphinorm_HE3 = fs_->make<TH2F>("h_maprphinorm_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6520  h_maprphinorm_HE4 = fs_->make<TH2F>("h_maprphinorm_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6521  h_maprphinorm_HE5 = fs_->make<TH2F>("h_maprphinorm_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6522  h_maprphinorm_HE6 = fs_->make<TH2F>("h_maprphinorm_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6523  h_maprphinorm_HE7 = fs_->make<TH2F>("h_maprphinorm_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6524  h_maprphinorm2_HE1 = fs_->make<TH2F>("h_maprphinorm2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6525  h_maprphinorm2_HE2 = fs_->make<TH2F>("h_maprphinorm2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6526  h_maprphinorm2_HE3 = fs_->make<TH2F>("h_maprphinorm2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6527  h_maprphinorm2_HE4 = fs_->make<TH2F>("h_maprphinorm2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6528  h_maprphinorm2_HE5 = fs_->make<TH2F>("h_maprphinorm2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6529  h_maprphinorm2_HE6 = fs_->make<TH2F>("h_maprphinorm2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6530  h_maprphinorm2_HE7 = fs_->make<TH2F>("h_maprphinorm2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6531 
6532  h_maprphinorm0_HE1 = fs_->make<TH2F>("h_maprphinorm0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6533  h_maprphinorm0_HE2 = fs_->make<TH2F>("h_maprphinorm0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6534  h_maprphinorm0_HE3 = fs_->make<TH2F>("h_maprphinorm0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6535  h_maprphinorm0_HE4 = fs_->make<TH2F>("h_maprphinorm0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6536  h_maprphinorm0_HE5 = fs_->make<TH2F>("h_maprphinorm0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6537  h_maprphinorm0_HE6 = fs_->make<TH2F>("h_maprphinorm0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6538  h_maprphinorm0_HE7 = fs_->make<TH2F>("h_maprphinorm0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6539 
6540  //
6541  // Didi as done in Reco
6542  //HB:
6543  h_amplitudechannel0_HB1 = fs_->make<TH2F>("h_amplitudechannel0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6544  h_amplitudechannel1_HB1 = fs_->make<TH2F>("h_amplitudechannel1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6545  h_amplitudechannel2_HB1 = fs_->make<TH2F>("h_amplitudechannel2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6546  h_amplitudechannel0_HB2 = fs_->make<TH2F>("h_amplitudechannel0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6547  h_amplitudechannel1_HB2 = fs_->make<TH2F>("h_amplitudechannel1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6548  h_amplitudechannel2_HB2 = fs_->make<TH2F>("h_amplitudechannel2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6549  h_amplitudechannel0_HB3 = fs_->make<TH2F>("h_amplitudechannel0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6550  h_amplitudechannel1_HB3 = fs_->make<TH2F>("h_amplitudechannel1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6551  h_amplitudechannel2_HB3 = fs_->make<TH2F>("h_amplitudechannel2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6552  h_amplitudechannel0_HB4 = fs_->make<TH2F>("h_amplitudechannel0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6553  h_amplitudechannel1_HB4 = fs_->make<TH2F>("h_amplitudechannel1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6554  h_amplitudechannel2_HB4 = fs_->make<TH2F>("h_amplitudechannel2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6555  //HE:
6556  h_amplitudechannel0_HE1 = fs_->make<TH2F>("h_amplitudechannel0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6557  h_amplitudechannel1_HE1 = fs_->make<TH2F>("h_amplitudechannel1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6558  h_amplitudechannel2_HE1 = fs_->make<TH2F>("h_amplitudechannel2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6559  h_amplitudechannel0_HE2 = fs_->make<TH2F>("h_amplitudechannel0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6560  h_amplitudechannel1_HE2 = fs_->make<TH2F>("h_amplitudechannel1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6561  h_amplitudechannel2_HE2 = fs_->make<TH2F>("h_amplitudechannel2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6562  h_amplitudechannel0_HE3 = fs_->make<TH2F>("h_amplitudechannel0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6563  h_amplitudechannel1_HE3 = fs_->make<TH2F>("h_amplitudechannel1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6564  h_amplitudechannel2_HE3 = fs_->make<TH2F>("h_amplitudechannel2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6565  h_amplitudechannel0_HE4 = fs_->make<TH2F>("h_amplitudechannel0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6566  h_amplitudechannel1_HE4 = fs_->make<TH2F>("h_amplitudechannel1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6567  h_amplitudechannel2_HE4 = fs_->make<TH2F>("h_amplitudechannel2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6568  h_amplitudechannel0_HE5 = fs_->make<TH2F>("h_amplitudechannel0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6569  h_amplitudechannel1_HE5 = fs_->make<TH2F>("h_amplitudechannel1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6570  h_amplitudechannel2_HE5 = fs_->make<TH2F>("h_amplitudechannel2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6571  h_amplitudechannel0_HE6 = fs_->make<TH2F>("h_amplitudechannel0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6572  h_amplitudechannel1_HE6 = fs_->make<TH2F>("h_amplitudechannel1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6573  h_amplitudechannel2_HE6 = fs_->make<TH2F>("h_amplitudechannel2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6574  h_amplitudechannel0_HE7 = fs_->make<TH2F>("h_amplitudechannel0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6575  h_amplitudechannel1_HE7 = fs_->make<TH2F>("h_amplitudechannel1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6576  h_amplitudechannel2_HE7 = fs_->make<TH2F>("h_amplitudechannel2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6577  //HF:
6578  h_amplitudechannel0_HF1 = fs_->make<TH2F>("h_amplitudechannel0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6579  h_amplitudechannel1_HF1 = fs_->make<TH2F>("h_amplitudechannel1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6580  h_amplitudechannel2_HF1 = fs_->make<TH2F>("h_amplitudechannel2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6581  h_amplitudechannel0_HF2 = fs_->make<TH2F>("h_amplitudechannel0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6582  h_amplitudechannel1_HF2 = fs_->make<TH2F>("h_amplitudechannel1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6583  h_amplitudechannel2_HF2 = fs_->make<TH2F>("h_amplitudechannel2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6584  h_amplitudechannel0_HF3 = fs_->make<TH2F>("h_amplitudechannel0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6585  h_amplitudechannel1_HF3 = fs_->make<TH2F>("h_amplitudechannel1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6586  h_amplitudechannel2_HF3 = fs_->make<TH2F>("h_amplitudechannel2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6587  h_amplitudechannel0_HF4 = fs_->make<TH2F>("h_amplitudechannel0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6588  h_amplitudechannel1_HF4 = fs_->make<TH2F>("h_amplitudechannel1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6589  h_amplitudechannel2_HF4 = fs_->make<TH2F>("h_amplitudechannel2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6590 
6591  // Reco
6592  h_energyhitSignal_HB = fs_->make<TH1F>("h_energyhitSignal_HB", " ", npfit, -0.22, 0.22);
6593  h_energyhitSignal_HE = fs_->make<TH1F>("h_energyhitSignal_HE", " ", npfit, -0.22, 0.22);
6594  h_energyhitSignal_HF = fs_->make<TH1F>("h_energyhitSignal_HF", " ", npfit, -6.6, 6.6);
6595  h_energyhitNoise_HB = fs_->make<TH1F>("h_energyhitNoise_HB", " ", npfit, -0.22, 0.22);
6596  h_energyhitNoise_HE = fs_->make<TH1F>("h_energyhitNoise_HE", " ", npfit, -0.22, 0.22);
6597  h_energyhitNoise_HF = fs_->make<TH1F>("h_energyhitNoise_HF", " ", npfit, -4.4, 4.4);
6598 
6599  //HB:
6600  h_recSignalEnergy0_HB1 = fs_->make<TH2F>("h_recSignalEnergy0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6601  h_recSignalEnergy1_HB1 = fs_->make<TH2F>("h_recSignalEnergy1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6602  h_recSignalEnergy2_HB1 = fs_->make<TH2F>("h_recSignalEnergy2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6603  h_recSignalEnergy0_HB2 = fs_->make<TH2F>("h_recSignalEnergy0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6604  h_recSignalEnergy1_HB2 = fs_->make<TH2F>("h_recSignalEnergy1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6605  h_recSignalEnergy2_HB2 = fs_->make<TH2F>("h_recSignalEnergy2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6606  h_recSignalEnergy0_HB3 = fs_->make<TH2F>("h_recSignalEnergy0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6607  h_recSignalEnergy1_HB3 = fs_->make<TH2F>("h_recSignalEnergy1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6608  h_recSignalEnergy2_HB3 = fs_->make<TH2F>("h_recSignalEnergy2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6609  h_recSignalEnergy0_HB4 = fs_->make<TH2F>("h_recSignalEnergy0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6610  h_recSignalEnergy1_HB4 = fs_->make<TH2F>("h_recSignalEnergy1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6611  h_recSignalEnergy2_HB4 = fs_->make<TH2F>("h_recSignalEnergy2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6612 
6613  h_recNoiseEnergy0_HB1 = fs_->make<TH2F>("h_recNoiseEnergy0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6614  h_recNoiseEnergy1_HB1 = fs_->make<TH2F>("h_recNoiseEnergy1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6615  h_recNoiseEnergy2_HB1 = fs_->make<TH2F>("h_recNoiseEnergy2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6616  h_recNoiseEnergy0_HB2 = fs_->make<TH2F>("h_recNoiseEnergy0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6617  h_recNoiseEnergy1_HB2 = fs_->make<TH2F>("h_recNoiseEnergy1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6618  h_recNoiseEnergy2_HB2 = fs_->make<TH2F>("h_recNoiseEnergy2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6619  h_recNoiseEnergy0_HB3 = fs_->make<TH2F>("h_recNoiseEnergy0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6620  h_recNoiseEnergy1_HB3 = fs_->make<TH2F>("h_recNoiseEnergy1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6621  h_recNoiseEnergy2_HB3 = fs_->make<TH2F>("h_recNoiseEnergy2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6622  h_recNoiseEnergy0_HB4 = fs_->make<TH2F>("h_recNoiseEnergy0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6623  h_recNoiseEnergy1_HB4 = fs_->make<TH2F>("h_recNoiseEnergy1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6624  h_recNoiseEnergy2_HB4 = fs_->make<TH2F>("h_recNoiseEnergy2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6625 
6626  //HE:
6627  h_recSignalEnergy0_HE1 = fs_->make<TH2F>("h_recSignalEnergy0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6628  h_recSignalEnergy1_HE1 = fs_->make<TH2F>("h_recSignalEnergy1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6629  h_recSignalEnergy2_HE1 = fs_->make<TH2F>("h_recSignalEnergy2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6630  h_recSignalEnergy0_HE2 = fs_->make<TH2F>("h_recSignalEnergy0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6631  h_recSignalEnergy1_HE2 = fs_->make<TH2F>("h_recSignalEnergy1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6632  h_recSignalEnergy2_HE2 = fs_->make<TH2F>("h_recSignalEnergy2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6633  h_recSignalEnergy0_HE3 = fs_->make<TH2F>("h_recSignalEnergy0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6634  h_recSignalEnergy1_HE3 = fs_->make<TH2F>("h_recSignalEnergy1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6635  h_recSignalEnergy2_HE3 = fs_->make<TH2F>("h_recSignalEnergy2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6636  h_recSignalEnergy0_HE4 = fs_->make<TH2F>("h_recSignalEnergy0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6637  h_recSignalEnergy1_HE4 = fs_->make<TH2F>("h_recSignalEnergy1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6638  h_recSignalEnergy2_HE4 = fs_->make<TH2F>("h_recSignalEnergy2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6639  h_recSignalEnergy0_HE5 = fs_->make<TH2F>("h_recSignalEnergy0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6640  h_recSignalEnergy1_HE5 = fs_->make<TH2F>("h_recSignalEnergy1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6641  h_recSignalEnergy2_HE5 = fs_->make<TH2F>("h_recSignalEnergy2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6642  h_recSignalEnergy0_HE6 = fs_->make<TH2F>("h_recSignalEnergy0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6643  h_recSignalEnergy1_HE6 = fs_->make<TH2F>("h_recSignalEnergy1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6644  h_recSignalEnergy2_HE6 = fs_->make<TH2F>("h_recSignalEnergy2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6645  h_recSignalEnergy0_HE7 = fs_->make<TH2F>("h_recSignalEnergy0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6646  h_recSignalEnergy1_HE7 = fs_->make<TH2F>("h_recSignalEnergy1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6647  h_recSignalEnergy2_HE7 = fs_->make<TH2F>("h_recSignalEnergy2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6648 
6649  h_recNoiseEnergy0_HE1 = fs_->make<TH2F>("h_recNoiseEnergy0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6650  h_recNoiseEnergy1_HE1 = fs_->make<TH2F>("h_recNoiseEnergy1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6651  h_recNoiseEnergy2_HE1 = fs_->make<TH2F>("h_recNoiseEnergy2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6652  h_recNoiseEnergy0_HE2 = fs_->make<TH2F>("h_recNoiseEnergy0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6653  h_recNoiseEnergy1_HE2 = fs_->make<TH2F>("h_recNoiseEnergy1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6654  h_recNoiseEnergy2_HE2 = fs_->make<TH2F>("h_recNoiseEnergy2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6655  h_recNoiseEnergy0_HE3 = fs_->make<TH2F>("h_recNoiseEnergy0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6656  h_recNoiseEnergy1_HE3 = fs_->make<TH2F>("h_recNoiseEnergy1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6657  h_recNoiseEnergy2_HE3 = fs_->make<TH2F>("h_recNoiseEnergy2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6658  h_recNoiseEnergy0_HE4 = fs_->make<TH2F>("h_recNoiseEnergy0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6659  h_recNoiseEnergy1_HE4 = fs_->make<TH2F>("h_recNoiseEnergy1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6660  h_recNoiseEnergy2_HE4 = fs_->make<TH2F>("h_recNoiseEnergy2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6661  h_recNoiseEnergy0_HE5 = fs_->make<TH2F>("h_recNoiseEnergy0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6662  h_recNoiseEnergy1_HE5 = fs_->make<TH2F>("h_recNoiseEnergy1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6663  h_recNoiseEnergy2_HE5 = fs_->make<TH2F>("h_recNoiseEnergy2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6664  h_recNoiseEnergy0_HE6 = fs_->make<TH2F>("h_recNoiseEnergy0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6665  h_recNoiseEnergy1_HE6 = fs_->make<TH2F>("h_recNoiseEnergy1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6666  h_recNoiseEnergy2_HE6 = fs_->make<TH2F>("h_recNoiseEnergy2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6667  h_recNoiseEnergy0_HE7 = fs_->make<TH2F>("h_recNoiseEnergy0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6668  h_recNoiseEnergy1_HE7 = fs_->make<TH2F>("h_recNoiseEnergy1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6669  h_recNoiseEnergy2_HE7 = fs_->make<TH2F>("h_recNoiseEnergy2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6670 
6671  //HF:
6672  h_recSignalEnergy0_HF1 = fs_->make<TH2F>("h_recSignalEnergy0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6673  h_recSignalEnergy1_HF1 = fs_->make<TH2F>("h_recSignalEnergy1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6674  h_recSignalEnergy2_HF1 = fs_->make<TH2F>("h_recSignalEnergy2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6675  h_recSignalEnergy0_HF2 = fs_->make<TH2F>("h_recSignalEnergy0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6676  h_recSignalEnergy1_HF2 = fs_->make<TH2F>("h_recSignalEnergy1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6677  h_recSignalEnergy2_HF2 = fs_->make<TH2F>("h_recSignalEnergy2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6678 
6679  h_recNoiseEnergy0_HF1 = fs_->make<TH2F>("h_recNoiseEnergy0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6680  h_recNoiseEnergy1_HF1 = fs_->make<TH2F>("h_recNoiseEnergy1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6681  h_recNoiseEnergy2_HF1 = fs_->make<TH2F>("h_recNoiseEnergy2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6682  h_recNoiseEnergy0_HF2 = fs_->make<TH2F>("h_recNoiseEnergy0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6683  h_recNoiseEnergy1_HF2 = fs_->make<TH2F>("h_recNoiseEnergy1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6684  h_recNoiseEnergy2_HF2 = fs_->make<TH2F>("h_recNoiseEnergy2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6685 
6687  // RADDAM:
6688  // if(flagLaserRaddam_ == 1 ) {
6689  // }
6690  int min80 = -100.;
6691  int max80 = 9000.;
6692  // fill for each digi (=each event, each channel)
6693  h_mapDepth1RADDAM_HE = fs_->make<TH2F>("h_mapDepth1RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6694  h_mapDepth2RADDAM_HE = fs_->make<TH2F>("h_mapDepth2RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6695  h_mapDepth3RADDAM_HE = fs_->make<TH2F>("h_mapDepth3RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6696  h_mapDepth1RADDAM0_HE = fs_->make<TH2F>("h_mapDepth1RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6697  h_mapDepth2RADDAM0_HE = fs_->make<TH2F>("h_mapDepth2RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6698  h_mapDepth3RADDAM0_HE = fs_->make<TH2F>("h_mapDepth3RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6699 
6700  h_sigLayer1RADDAM_HE = fs_->make<TH1F>("h_sigLayer1RADDAM_HE", " ", neta, -41., 41.);
6701  h_sigLayer2RADDAM_HE = fs_->make<TH1F>("h_sigLayer2RADDAM_HE", " ", neta, -41., 41.);
6702  h_sigLayer1RADDAM0_HE = fs_->make<TH1F>("h_sigLayer1RADDAM0_HE", " ", neta, -41., 41.);
6703  h_sigLayer2RADDAM0_HE = fs_->make<TH1F>("h_sigLayer2RADDAM0_HE", " ", neta, -41., 41.);
6704  h_AamplitudewithPedSubtr_RADDAM_HE = fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HE", " ", 100, min80, max80);
6706  fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HEzoom0", " ", 100, min80, 4000.);
6708  fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HEzoom1", " ", 100, min80, 1000.);
6709  h_mapDepth3RADDAM16_HE = fs_->make<TH1F>("h_mapDepth3RADDAM16_HE", " ", 100, min80, max80);
6710  h_A_Depth1RADDAM_HE = fs_->make<TH1F>("h_A_Depth1RADDAM_HE", " ", 100, min80, max80);
6711  h_A_Depth2RADDAM_HE = fs_->make<TH1F>("h_A_Depth2RADDAM_HE", " ", 100, min80, max80);
6712  h_A_Depth3RADDAM_HE = fs_->make<TH1F>("h_A_Depth3RADDAM_HE", " ", 100, min80, max80);
6713  int min90 = 0.;
6714  int max90 = 5000.;
6715  h_sumphiEta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2", " ", 100, min90, 70. * max90);
6716  h_Eta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2", " ", 100, min90, max90);
6717  h_NphiForEta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2", " ", 100, 0, 100.);
6718  h_sumphiEta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2P", " ", 100, min90, 70. * max90);
6719  h_Eta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2P", " ", 100, min90, max90);
6720  h_NphiForEta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2P", " ", 100, 0, 100.);
6722  fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2ALL", " ", 100, min90, 70. * max90);
6723  h_Eta16Depth3RADDAM_HED2ALL = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2ALL", " ", 100, min90, max90);
6724  h_NphiForEta16Depth3RADDAM_HED2ALL = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2ALL", " ", 100, 0, 100.);
6725  h_sigLayer1RADDAM5_HE = fs_->make<TH1F>("h_sigLayer1RADDAM5_HE", " ", neta, -41., 41.);
6726  h_sigLayer2RADDAM5_HE = fs_->make<TH1F>("h_sigLayer2RADDAM5_HE", " ", neta, -41., 41.);
6727  h_sigLayer1RADDAM6_HE = fs_->make<TH1F>("h_sigLayer1RADDAM6_HE", " ", neta, -41., 41.);
6728  h_sigLayer2RADDAM6_HE = fs_->make<TH1F>("h_sigLayer2RADDAM6_HE", " ", neta, -41., 41.);
6729  h_sigLayer1RADDAM5_HED2 = fs_->make<TH1F>("h_sigLayer1RADDAM5_HED2", " ", neta, -41., 41.);
6730  h_sigLayer2RADDAM5_HED2 = fs_->make<TH1F>("h_sigLayer2RADDAM5_HED2", " ", neta, -41., 41.);
6731  h_sigLayer1RADDAM6_HED2 = fs_->make<TH1F>("h_sigLayer1RADDAM6_HED2", " ", neta, -41., 41.);
6732  h_sigLayer2RADDAM6_HED2 = fs_->make<TH1F>("h_sigLayer2RADDAM6_HED2", " ", neta, -41., 41.);
6733 
6734  h_numberofhitsHFtest = fs_->make<TH1F>("h_numberofhitsHFtest", " ", 100, 0., 30000.);
6735  h_AmplitudeHFtest = fs_->make<TH1F>("h_AmplitudeHFtest", " ", 100, 0., 300000.);
6736  h_totalAmplitudeHF = fs_->make<TH1F>("h_totalAmplitudeHF", " ", 100, 0., 100000000000.);
6737  h_totalAmplitudeHFperEvent = fs_->make<TH1F>("h_totalAmplitudeHFperEvent", " ", 1000, 1., 1001.);
6738  // fullAmplitude:
6739  h_ADCAmplZoom1_HF = fs_->make<TH1F>("h_ADCAmplZoom1_HF", " ", 100, 0., 1000000.);
6740  h_ADCAmpl_HF = fs_->make<TH1F>("h_ADCAmpl_HF", " ", 250, 0., 500000.);
6741  h_ADCAmplrest1_HF = fs_->make<TH1F>("h_ADCAmplrest1_HF", " ", 100, 0., 1000.);
6742  h_ADCAmplrest6_HF = fs_->make<TH1F>("h_ADCAmplrest6_HF", " ", 100, 0., 10000.);
6743 
6744  h_mapDepth1ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6745  h_mapDepth2ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6747  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6749  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6750  h_mapDepth1ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6751  h_mapDepth2ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6752  h_mapDepth3ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6753  h_mapDepth4ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6755  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6757  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6758  h_mapDepth3ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6759  h_mapDepth4ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6760  h_TSmeanA_HF = fs_->make<TH1F>("h_TSmeanA_HF", " ", 100, -1., 11.);
6761  h_mapDepth1TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6762  h_mapDepth2TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6763  h_mapDepth1TSmeanA_HF = fs_->make<TH2F>("h_mapDepth1TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6764  h_mapDepth2TSmeanA_HF = fs_->make<TH2F>("h_mapDepth2TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6765  h_mapDepth3TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6766  h_mapDepth4TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6767  h_mapDepth3TSmeanA_HF = fs_->make<TH2F>("h_mapDepth3TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6768  h_mapDepth4TSmeanA_HF = fs_->make<TH2F>("h_mapDepth4TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6769  h_Amplitude_HF = fs_->make<TH1F>("h_Amplitude_HF", " ", 100, 0., 5.);
6770  h_TSmaxA_HF = fs_->make<TH1F>("h_TSmaxA_HF", " ", 100, -1., 11.);
6771  h_mapDepth1TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6772  h_mapDepth2TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6773  h_mapDepth1TSmaxA_HF = fs_->make<TH2F>("h_mapDepth1TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6774  h_mapDepth2TSmaxA_HF = fs_->make<TH2F>("h_mapDepth2TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6775  h_mapDepth3TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6776  h_mapDepth4TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6777  h_mapDepth3TSmaxA_HF = fs_->make<TH2F>("h_mapDepth3TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6778  h_mapDepth4TSmaxA_HF = fs_->make<TH2F>("h_mapDepth4TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6779  h_Amplitude_HF = fs_->make<TH1F>("h_Amplitude_HF", " ", 100, 0., 5.);
6780  h_mapDepth1Amplitude225_HF = fs_->make<TH2F>("h_mapDepth1Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6781  h_mapDepth2Amplitude225_HF = fs_->make<TH2F>("h_mapDepth2Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6782  h_mapDepth1Amplitude_HF = fs_->make<TH2F>("h_mapDepth1Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6783  h_mapDepth2Amplitude_HF = fs_->make<TH2F>("h_mapDepth2Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6784  h_mapDepth3Amplitude225_HF = fs_->make<TH2F>("h_mapDepth3Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6785  h_mapDepth4Amplitude225_HF = fs_->make<TH2F>("h_mapDepth4Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6786  h_mapDepth3Amplitude_HF = fs_->make<TH2F>("h_mapDepth3Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6787  h_mapDepth4Amplitude_HF = fs_->make<TH2F>("h_mapDepth4Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6788  // Ratio:
6789  h_Ampl_HF = fs_->make<TH1F>("h_Ampl_HF", " ", 100, 0., 1.1);
6790  h_mapDepth1Ampl047_HF = fs_->make<TH2F>("h_mapDepth1Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6791  h_mapDepth2Ampl047_HF = fs_->make<TH2F>("h_mapDepth2Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6792  h_mapDepth1Ampl_HF = fs_->make<TH2F>("h_mapDepth1Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6793  h_mapDepth2Ampl_HF = fs_->make<TH2F>("h_mapDepth2Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6794  h_mapDepth1AmplE34_HF = fs_->make<TH2F>("h_mapDepth1AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6795  h_mapDepth2AmplE34_HF = fs_->make<TH2F>("h_mapDepth2AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6796  h_mapDepth1_HF = fs_->make<TH2F>("h_mapDepth1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6797  h_mapDepth2_HF = fs_->make<TH2F>("h_mapDepth2_HF", " ", neta, -41., 41., nphi, 0., bphi);
6798  h_mapDepth3Ampl047_HF = fs_->make<TH2F>("h_mapDepth3Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6799  h_mapDepth4Ampl047_HF = fs_->make<TH2F>("h_mapDepth4Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6800  h_mapDepth3Ampl_HF = fs_->make<TH2F>("h_mapDepth3Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6801  h_mapDepth4Ampl_HF = fs_->make<TH2F>("h_mapDepth4Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6802  h_mapDepth3AmplE34_HF = fs_->make<TH2F>("h_mapDepth3AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6803  h_mapDepth4AmplE34_HF = fs_->make<TH2F>("h_mapDepth4AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6804  h_mapDepth3_HF = fs_->make<TH2F>("h_mapDepth3_HF", " ", neta, -41., 41., nphi, 0., bphi);
6805  h_mapDepth4_HF = fs_->make<TH2F>("h_mapDepth4_HF", " ", neta, -41., 41., nphi, 0., bphi);
6806 
6808  h_numberofhitsHOtest = fs_->make<TH1F>("h_numberofhitsHOtest", " ", 100, 0., 30000.);
6809  h_AmplitudeHOtest = fs_->make<TH1F>("h_AmplitudeHOtest", " ", 100, 0., 300000.);
6810  h_totalAmplitudeHO = fs_->make<TH1F>("h_totalAmplitudeHO", " ", 100, 0., 100000000.);
6811  h_totalAmplitudeHOperEvent = fs_->make<TH1F>("h_totalAmplitudeHOperEvent", " ", 1000, 1., 1001.);
6812  // fullAmplitude:
6813  h_ADCAmpl_HO = fs_->make<TH1F>("h_ADCAmpl_HO", " ", 100, 0., 7000.);
6814  h_ADCAmplrest1_HO = fs_->make<TH1F>("h_ADCAmplrest1_HO", " ", 100, 0., 150.);
6815  h_ADCAmplrest6_HO = fs_->make<TH1F>("h_ADCAmplrest6_HO", " ", 100, 0., 500.);
6816 
6817  h_ADCAmplZoom1_HO = fs_->make<TH1F>("h_ADCAmplZoom1_HO", " ", 100, -20., 280.);
6818  h_ADCAmpl_HO_copy = fs_->make<TH1F>("h_ADCAmpl_HO_copy", " ", 100, 0., 30000.);
6819  h_mapDepth4ADCAmpl225_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6821  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HO", " ", neta, -41., 41., nphi, 0., bphi);
6822  h_mapDepth4ADCAmpl_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HO", " ", neta, -41., 41., nphi, 0., bphi);
6823  h_TSmeanA_HO = fs_->make<TH1F>("h_TSmeanA_HO", " ", 100, 0., 10.);
6824  h_mapDepth4TSmeanA225_HO = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6825  h_mapDepth4TSmeanA_HO = fs_->make<TH2F>("h_mapDepth4TSmeanA_HO", " ", neta, -41., 41., nphi, 0., bphi);
6826  h_TSmaxA_HO = fs_->make<TH1F>("h_TSmaxA_HO", " ", 100, 0., 10.);
6827  h_mapDepth4TSmaxA225_HO = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6828  h_mapDepth4TSmaxA_HO = fs_->make<TH2F>("h_mapDepth4TSmaxA_HO", " ", neta, -41., 41., nphi, 0., bphi);
6829  h_Amplitude_HO = fs_->make<TH1F>("h_Amplitude_HO", " ", 100, 0., 5.);
6830  h_mapDepth4Amplitude225_HO = fs_->make<TH2F>("h_mapDepth4Amplitude225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6831  h_mapDepth4Amplitude_HO = fs_->make<TH2F>("h_mapDepth4Amplitude_HO", " ", neta, -41., 41., nphi, 0., bphi);
6832  // Ratio:
6833  h_Ampl_HO = fs_->make<TH1F>("h_Ampl_HO", " ", 100, 0., 1.1);
6834  h_mapDepth4Ampl047_HO = fs_->make<TH2F>("h_mapDepth4Ampl047_HO", " ", neta, -41., 41., nphi, 0., bphi);
6835  h_mapDepth4Ampl_HO = fs_->make<TH2F>("h_mapDepth4Ampl_HO", " ", neta, -41., 41., nphi, 0., bphi);
6836  h_mapDepth4AmplE34_HO = fs_->make<TH2F>("h_mapDepth4AmplE34_HO", " ", neta, -41., 41., nphi, 0., bphi);
6837  h_mapDepth4_HO = fs_->make<TH2F>("h_mapDepth4_HO", " ", neta, -41., 41., nphi, 0., bphi);
6838 
6840  int baP = 4000;
6841  float baR = 0.;
6842  float baR2 = baP;
6843  h_bcnnbadchannels_depth1_HB = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HB", " ", baP, baR, baR2);
6844  h_bcnnbadchannels_depth2_HB = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HB", " ", baP, baR, baR2);
6845  h_bcnnbadchannels_depth1_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HE", " ", baP, baR, baR2);
6846  h_bcnnbadchannels_depth2_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HE", " ", baP, baR, baR2);
6847  h_bcnnbadchannels_depth3_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth3_HE", " ", baP, baR, baR2);
6848  h_bcnnbadchannels_depth4_HO = fs_->make<TH1F>("h_bcnnbadchannels_depth4_HO", " ", baP, baR, baR2);
6849  h_bcnnbadchannels_depth1_HF = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HF", " ", baP, baR, baR2);
6850  h_bcnnbadchannels_depth2_HF = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HF", " ", baP, baR, baR2);
6851  h_bcnbadrate0_depth1_HB = fs_->make<TH1F>("h_bcnbadrate0_depth1_HB", " ", baP, baR, baR2);
6852  h_bcnbadrate0_depth2_HB = fs_->make<TH1F>("h_bcnbadrate0_depth2_HB", " ", baP, baR, baR2);
6853  h_bcnbadrate0_depth1_HE = fs_->make<TH1F>("h_bcnbadrate0_depth1_HE", " ", baP, baR, baR2);
6854  h_bcnbadrate0_depth2_HE = fs_->make<TH1F>("h_bcnbadrate0_depth2_HE", " ", baP, baR, baR2);
6855  h_bcnbadrate0_depth3_HE = fs_->make<TH1F>("h_bcnbadrate0_depth3_HE", " ", baP, baR, baR2);
6856  h_bcnbadrate0_depth4_HO = fs_->make<TH1F>("h_bcnbadrate0_depth4_HO", " ", baP, baR, baR2);
6857  h_bcnbadrate0_depth1_HF = fs_->make<TH1F>("h_bcnbadrate0_depth1_HF", " ", baP, baR, baR2);
6858  h_bcnbadrate0_depth2_HF = fs_->make<TH1F>("h_bcnbadrate0_depth2_HF", " ", baP, baR, baR2);
6859 
6860  h_bcnvsamplitude_HB = fs_->make<TH1F>("h_bcnvsamplitude_HB", " ", baP, baR, baR2);
6861  h_bcnvsamplitude_HE = fs_->make<TH1F>("h_bcnvsamplitude_HE", " ", baP, baR, baR2);
6862  h_bcnvsamplitude_HF = fs_->make<TH1F>("h_bcnvsamplitude_HF", " ", baP, baR, baR2);
6863  h_bcnvsamplitude_HO = fs_->make<TH1F>("h_bcnvsamplitude_HO", " ", baP, baR, baR2);
6864  h_bcnvsamplitude0_HB = fs_->make<TH1F>("h_bcnvsamplitude0_HB", " ", baP, baR, baR2);
6865  h_bcnvsamplitude0_HE = fs_->make<TH1F>("h_bcnvsamplitude0_HE", " ", baP, baR, baR2);
6866  h_bcnvsamplitude0_HF = fs_->make<TH1F>("h_bcnvsamplitude0_HF", " ", baP, baR, baR2);
6867  h_bcnvsamplitude0_HO = fs_->make<TH1F>("h_bcnvsamplitude0_HO", " ", baP, baR, baR2);
6868 
6869  int zaP = 1000;
6870  float zaR = 10000000.;
6871  float zaR2 = 50000000.;
6872  h_orbitNumvsamplitude_HB = fs_->make<TH1F>("h_orbitNumvsamplitude_HB", " ", zaP, zaR, zaR2);
6873  h_orbitNumvsamplitude_HE = fs_->make<TH1F>("h_orbitNumvsamplitude_HE", " ", zaP, zaR, zaR2);
6874  h_orbitNumvsamplitude_HF = fs_->make<TH1F>("h_orbitNumvsamplitude_HF", " ", zaP, zaR, zaR2);
6875  h_orbitNumvsamplitude_HO = fs_->make<TH1F>("h_orbitNumvsamplitude_HO", " ", zaP, zaR, zaR2);
6876  h_orbitNumvsamplitude0_HB = fs_->make<TH1F>("h_orbitNumvsamplitude0_HB", " ", zaP, zaR, zaR2);
6877  h_orbitNumvsamplitude0_HE = fs_->make<TH1F>("h_orbitNumvsamplitude0_HE", " ", zaP, zaR, zaR2);
6878  h_orbitNumvsamplitude0_HF = fs_->make<TH1F>("h_orbitNumvsamplitude0_HF", " ", zaP, zaR, zaR2);
6879  h_orbitNumvsamplitude0_HO = fs_->make<TH1F>("h_orbitNumvsamplitude0_HO", " ", zaP, zaR, zaR2);
6880 
6881  h_2DsumADCAmplEtaPhiLs0 = fs_->make<TH2F>(
6882  "h_2DsumADCAmplEtaPhiLs0", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6883  h_2DsumADCAmplEtaPhiLs1 = fs_->make<TH2F>(
6884  "h_2DsumADCAmplEtaPhiLs1", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6885  h_2DsumADCAmplEtaPhiLs2 = fs_->make<TH2F>(
6886  "h_2DsumADCAmplEtaPhiLs2", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6887  h_2DsumADCAmplEtaPhiLs3 = fs_->make<TH2F>(
6888  "h_2DsumADCAmplEtaPhiLs3", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6889 
6891  "h_2DsumADCAmplEtaPhiLs00", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6893  "h_2DsumADCAmplEtaPhiLs10", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6895  "h_2DsumADCAmplEtaPhiLs20", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6897  "h_2DsumADCAmplEtaPhiLs30", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6898 
6899  h_sumADCAmplEtaPhiLs = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs", " ", 1000, 0., 14000.);
6900  h_sumADCAmplEtaPhiLs_bbbc = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_bbbc", " ", 1000, 0., 300000.);
6901  h_sumADCAmplEtaPhiLs_bbb1 = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_bbb1", " ", 100, 0., 3000.);
6902  h_sumADCAmplEtaPhiLs_lscounterM1 = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_lscounterM1", " ", 600, 1., 601.);
6903  h_sumADCAmplEtaPhiLs_ietaphi = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_ietaphi", " ", 400, 0., 400.);
6905  fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_lscounterM1orbitNum", " ", 600, 1., 601.);
6906  h_sumADCAmplEtaPhiLs_orbitNum = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_orbitNum", " ", 1000, 25000000., 40000000.);
6907 
6908  // for LS :
6909 
6910  // for LS binning:
6911  int bac = howmanybinsonplots_;
6912  // int bac= 15;
6913  float bac2 = bac + 1.;
6914  // bac, 1., bac2 );
6915 
6916  h_nbadchannels_depth1_HB = fs_->make<TH1F>("h_nbadchannels_depth1_HB", " ", 100, 1., 3001.);
6917  h_runnbadchannels_depth1_HB = fs_->make<TH1F>("h_runnbadchannels_depth1_HB", " ", bac, 1., bac2);
6918  h_runnbadchannelsC_depth1_HB = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HB", " ", bac, 1., bac2);
6919  h_runbadrate_depth1_HB = fs_->make<TH1F>("h_runbadrate_depth1_HB", " ", bac, 1., bac2);
6920  h_runbadrateC_depth1_HB = fs_->make<TH1F>("h_runbadrateC_depth1_HB", " ", bac, 1., bac2);
6921  h_runbadrate0_depth1_HB = fs_->make<TH1F>("h_runbadrate0_depth1_HB", " ", bac, 1., bac2);
6922 
6923  h_nbadchannels_depth2_HB = fs_->make<TH1F>("h_nbadchannels_depth2_HB", " ", 100, 1., 501.);
6924  h_runnbadchannels_depth2_HB = fs_->make<TH1F>("h_runnbadchannels_depth2_HB", " ", bac, 1., bac2);
6925  h_runnbadchannelsC_depth2_HB = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HB", " ", bac, 1., bac2);
6926  h_runbadrate_depth2_HB = fs_->make<TH1F>("h_runbadrate_depth2_HB", " ", bac, 1., bac2);
6927  h_runbadrateC_depth2_HB = fs_->make<TH1F>("h_runbadrateC_depth2_HB", " ", bac, 1., bac2);
6928  h_runbadrate0_depth2_HB = fs_->make<TH1F>("h_runbadrate0_depth2_HB", " ", bac, 1., bac2);
6929 
6930  h_nbadchannels_depth1_HE = fs_->make<TH1F>("h_nbadchannels_depth1_HE", " ", 100, 1., 3001.);
6931  h_runnbadchannels_depth1_HE = fs_->make<TH1F>("h_runnbadchannels_depth1_HE", " ", bac, 1., bac2);
6932  h_runnbadchannelsC_depth1_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HE", " ", bac, 1., bac2);
6933  h_runbadrate_depth1_HE = fs_->make<TH1F>("h_runbadrate_depth1_HE", " ", bac, 1., bac2);
6934  h_runbadrateC_depth1_HE = fs_->make<TH1F>("h_runbadrateC_depth1_HE", " ", bac, 1., bac2);
6935  h_runbadrate0_depth1_HE = fs_->make<TH1F>("h_runbadrate0_depth1_HE", " ", bac, 1., bac2);
6936 
6937  h_nbadchannels_depth2_HE = fs_->make<TH1F>("h_nbadchannels_depth2_HE", " ", 100, 1., 3001.);
6938  h_runnbadchannels_depth2_HE = fs_->make<TH1F>("h_runnbadchannels_depth2_HE", " ", bac, 1., bac2);
6939  h_runnbadchannelsC_depth2_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HE", " ", bac, 1., bac2);
6940  h_runbadrate_depth2_HE = fs_->make<TH1F>("h_runbadrate_depth2_HE", " ", bac, 1., bac2);
6941  h_runbadrateC_depth2_HE = fs_->make<TH1F>("h_runbadrateC_depth2_HE", " ", bac, 1., bac2);
6942  h_runbadrate0_depth2_HE = fs_->make<TH1F>("h_runbadrate0_depth2_HE", " ", bac, 1., bac2);
6943 
6944  h_nbadchannels_depth3_HE = fs_->make<TH1F>("h_nbadchannels_depth3_HE", " ", 100, 1., 501.);
6945  h_runnbadchannels_depth3_HE = fs_->make<TH1F>("h_runnbadchannels_depth3_HE", " ", bac, 1., bac2);
6946  h_runnbadchannelsC_depth3_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth3_HE", " ", bac, 1., bac2);
6947  h_runbadrate_depth3_HE = fs_->make<TH1F>("h_runbadrate_depth3_HE", " ", bac, 1., bac2);
6948  h_runbadrateC_depth3_HE = fs_->make<TH1F>("h_runbadrateC_depth3_HE", " ", bac, 1., bac2);
6949  h_runbadrate0_depth3_HE = fs_->make<TH1F>("h_runbadrate0_depth3_HE", " ", bac, 1., bac2);
6950 
6951  h_nbadchannels_depth1_HF = fs_->make<TH1F>("h_nbadchannels_depth1_HF", " ", 100, 1., 3001.);
6952  h_runnbadchannels_depth1_HF = fs_->make<TH1F>("h_runnbadchannels_depth1_HF", " ", bac, 1., bac2);
6953  h_runnbadchannelsC_depth1_HF = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HF", " ", bac, 1., bac2);
6954  h_runbadrate_depth1_HF = fs_->make<TH1F>("h_runbadrate_depth1_HF", " ", bac, 1., bac2);
6955  h_runbadrateC_depth1_HF = fs_->make<TH1F>("h_runbadrateC_depth1_HF", " ", bac, 1., bac2);
6956  h_runbadrate0_depth1_HF = fs_->make<TH1F>("h_runbadrate0_depth1_HF", " ", bac, 1., bac2);
6957 
6958  h_nbadchannels_depth2_HF = fs_->make<TH1F>("h_nbadchannels_depth2_HF", " ", 100, 1., 501.);
6959  h_runnbadchannels_depth2_HF = fs_->make<TH1F>("h_runnbadchannels_depth2_HF", " ", bac, 1., bac2);
6960  h_runnbadchannelsC_depth2_HF = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HF", " ", bac, 1., bac2);
6961  h_runbadrate_depth2_HF = fs_->make<TH1F>("h_runbadrate_depth2_HF", " ", bac, 1., bac2);
6962  h_runbadrateC_depth2_HF = fs_->make<TH1F>("h_runbadrateC_depth2_HF", " ", bac, 1., bac2);
6963  h_runbadrate0_depth2_HF = fs_->make<TH1F>("h_runbadrate0_depth2_HF", " ", bac, 1., bac2);
6964 
6965  h_nbadchannels_depth4_HO = fs_->make<TH1F>("h_nbadchannels_depth4_HO", " ", 100, 1., 3001.);
6966  h_runnbadchannels_depth4_HO = fs_->make<TH1F>("h_runnbadchannels_depth4_HO", " ", bac, 1., bac2);
6967  h_runnbadchannelsC_depth4_HO = fs_->make<TH1F>("h_runnbadchannelsC_depth4_HO", " ", bac, 1., bac2);
6968  h_runbadrate_depth4_HO = fs_->make<TH1F>("h_runbadrate_depth4_HO", " ", bac, 1., bac2);
6969  h_runbadrateC_depth4_HO = fs_->make<TH1F>("h_runbadrateC_depth4_HO", " ", bac, 1., bac2);
6970  h_runbadrate0_depth4_HO = fs_->make<TH1F>("h_runbadrate0_depth4_HO", " ", bac, 1., bac2);
6971 
6973  h_FullSignal3D_HB = fs_->make<TH2F>("h_FullSignal3D_HB", " ", neta, -41., 41., nphi, 0., bphi);
6974  h_FullSignal3D0_HB = fs_->make<TH2F>("h_FullSignal3D0_HB", " ", neta, -41., 41., nphi, 0., bphi);
6975  h_FullSignal3D_HE = fs_->make<TH2F>("h_FullSignal3D_HE", " ", neta, -41., 41., nphi, 0., bphi);
6976  h_FullSignal3D0_HE = fs_->make<TH2F>("h_FullSignal3D0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6977  h_FullSignal3D_HO = fs_->make<TH2F>("h_FullSignal3D_HO", " ", neta, -41., 41., nphi, 0., bphi);
6978  h_FullSignal3D0_HO = fs_->make<TH2F>("h_FullSignal3D0_HO", " ", neta, -41., 41., nphi, 0., bphi);
6979  h_FullSignal3D_HF = fs_->make<TH2F>("h_FullSignal3D_HF", " ", neta, -41., 41., nphi, 0., bphi);
6980  h_FullSignal3D0_HF = fs_->make<TH2F>("h_FullSignal3D0_HF", " ", neta, -41., 41., nphi, 0., bphi);
6981 
6983  h_ADCCalib_HB = fs_->make<TH1F>("h_ADCCalib_HB", " ", 100, 10., 10000.);
6984  h_ADCCalib1_HB = fs_->make<TH1F>("h_ADCCalib1_HB", " ", 100, 0.1, 100.1);
6985  h_mapADCCalib047_HB = fs_->make<TH2F>("h_mapADCCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6986  h_mapADCCalib_HB = fs_->make<TH2F>("h_mapADCCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6987  h_RatioCalib_HB = fs_->make<TH1F>("h_RatioCalib_HB", " ", 100, 0., 1.);
6988  h_mapRatioCalib047_HB = fs_->make<TH2F>("h_mapRatioCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6989  h_mapRatioCalib_HB = fs_->make<TH2F>("h_mapRatioCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6990  h_TSmaxCalib_HB = fs_->make<TH1F>("h_TSmaxCalib_HB", " ", 100, 0., 10.);
6991  h_mapTSmaxCalib047_HB = fs_->make<TH2F>("h_mapTSmaxCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6992  h_mapTSmaxCalib_HB = fs_->make<TH2F>("h_mapTSmaxCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6993  h_TSmeanCalib_HB = fs_->make<TH1F>("h_TSmeanCalib_HB", " ", 100, 0., 10.);
6994  h_mapTSmeanCalib047_HB = fs_->make<TH2F>("h_mapTSmeanCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6995  h_mapTSmeanCalib_HB = fs_->make<TH2F>("h_mapTSmeanCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6996  h_WidthCalib_HB = fs_->make<TH1F>("h_WidthCalib_HB", " ", 100, 0., 5.);
6997  h_mapWidthCalib047_HB = fs_->make<TH2F>("h_mapWidthCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6998  h_mapCapCalib047_HB = fs_->make<TH2F>("h_mapCapCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6999  h_mapWidthCalib_HB = fs_->make<TH2F>("h_mapWidthCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
7000  h_map_HB = fs_->make<TH2F>("h_map_HB", " ", neta, -41., 41., nphi, 0., bphi);
7001  h_ADCCalib_HE = fs_->make<TH1F>("h_ADCCalib_HE", " ", 100, 10., 10000.);
7002  h_ADCCalib1_HE = fs_->make<TH1F>("h_ADCCalib1_HE", " ", 100, 0.1, 100.1);
7003  h_mapADCCalib047_HE = fs_->make<TH2F>("h_mapADCCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7004  h_mapADCCalib_HE = fs_->make<TH2F>("h_mapADCCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7005  h_RatioCalib_HE = fs_->make<TH1F>("h_RatioCalib_HE", " ", 100, 0., 1.);
7006  h_mapRatioCalib047_HE = fs_->make<TH2F>("h_mapRatioCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7007  h_mapRatioCalib_HE = fs_->make<TH2F>("h_mapRatioCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7008  h_TSmaxCalib_HE = fs_->make<TH1F>("h_TSmaxCalib_HE", " ", 100, 0., 10.);
7009  h_mapTSmaxCalib047_HE = fs_->make<TH2F>("h_mapTSmaxCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7010  h_mapTSmaxCalib_HE = fs_->make<TH2F>("h_mapTSmaxCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7011  h_TSmeanCalib_HE = fs_->make<TH1F>("h_TSmeanCalib_HE", " ", 100, 0., 10.);
7012  h_mapTSmeanCalib047_HE = fs_->make<TH2F>("h_mapTSmeanCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7013  h_mapTSmeanCalib_HE = fs_->make<TH2F>("h_mapTSmeanCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7014  h_WidthCalib_HE = fs_->make<TH1F>("h_WidthCalib_HE", " ", 100, 0., 5.);
7015  h_mapWidthCalib047_HE = fs_->make<TH2F>("h_mapWidthCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7016  h_mapCapCalib047_HE = fs_->make<TH2F>("h_mapCapCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7017  h_mapWidthCalib_HE = fs_->make<TH2F>("h_mapWidthCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7018  h_map_HE = fs_->make<TH2F>("h_map_HE", " ", neta, -41., 41., nphi, 0., bphi);
7019  h_ADCCalib_HO = fs_->make<TH1F>("h_ADCCalib_HO", " ", 100, 10., 10000.);
7020  h_ADCCalib1_HO = fs_->make<TH1F>("h_ADCCalib1_HO", " ", 100, 0.1, 100.1);
7021  h_mapADCCalib047_HO = fs_->make<TH2F>("h_mapADCCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7022  h_mapADCCalib_HO = fs_->make<TH2F>("h_mapADCCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7023  h_RatioCalib_HO = fs_->make<TH1F>("h_RatioCalib_HO", " ", 100, 0., 1.);
7024  h_mapRatioCalib047_HO = fs_->make<TH2F>("h_mapRatioCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7025  h_mapRatioCalib_HO = fs_->make<TH2F>("h_mapRatioCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7026  h_TSmaxCalib_HO = fs_->make<TH1F>("h_TSmaxCalib_HO", " ", 100, 0., 10.);
7027  h_mapTSmaxCalib047_HO = fs_->make<TH2F>("h_mapTSmaxCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7028  h_mapTSmaxCalib_HO = fs_->make<TH2F>("h_mapTSmaxCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7029  h_TSmeanCalib_HO = fs_->make<TH1F>("h_TSmeanCalib_HO", " ", 100, 0., 10.);
7030  h_mapTSmeanCalib047_HO = fs_->make<TH2F>("h_mapTSmeanCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7031  h_mapTSmeanCalib_HO = fs_->make<TH2F>("h_mapTSmeanCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7032  h_WidthCalib_HO = fs_->make<TH1F>("h_WidthCalib_HO", " ", 100, 0., 5.);
7033  h_mapWidthCalib047_HO = fs_->make<TH2F>("h_mapWidthCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7034  h_mapCapCalib047_HO = fs_->make<TH2F>("h_mapCapCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7035  h_mapWidthCalib_HO = fs_->make<TH2F>("h_mapWidthCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7036  h_map_HO = fs_->make<TH2F>("h_map_HO", " ", neta, -41., 41., nphi, 0., bphi);
7037  h_ADCCalib_HF = fs_->make<TH1F>("h_ADCCalib_HF", " ", 100, 10., 2000.);
7038  h_ADCCalib1_HF = fs_->make<TH1F>("h_ADCCalib1_HF", " ", 100, 0.1, 100.1);
7039  h_mapADCCalib047_HF = fs_->make<TH2F>("h_mapADCCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7040  h_mapADCCalib_HF = fs_->make<TH2F>("h_mapADCCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7041  h_RatioCalib_HF = fs_->make<TH1F>("h_RatioCalib_HF", " ", 100, 0., 1.);
7042  h_mapRatioCalib047_HF = fs_->make<TH2F>("h_mapRatioCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7043  h_mapRatioCalib_HF = fs_->make<TH2F>("h_mapRatioCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7044  h_TSmaxCalib_HF = fs_->make<TH1F>("h_TSmaxCalib_HF", " ", 100, 0., 10.);
7045  h_mapTSmaxCalib047_HF = fs_->make<TH2F>("h_mapTSmaxCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7046  h_mapTSmaxCalib_HF = fs_->make<TH2F>("h_mapTSmaxCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7047  h_TSmeanCalib_HF = fs_->make<TH1F>("h_TSmeanCalib_HF", " ", 100, 0., 10.);
7048  h_mapTSmeanCalib047_HF = fs_->make<TH2F>("h_mapTSmeanCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7049  h_mapTSmeanCalib_HF = fs_->make<TH2F>("h_mapTSmeanCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7050  h_WidthCalib_HF = fs_->make<TH1F>("h_WidthCalib_HF", " ", 100, 0., 5.);
7051  h_mapWidthCalib047_HF = fs_->make<TH2F>("h_mapWidthCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7052  h_mapCapCalib047_HF = fs_->make<TH2F>("h_mapCapCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7053  h_mapWidthCalib_HF = fs_->make<TH2F>("h_mapWidthCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7054  h_map_HF = fs_->make<TH2F>("h_map_HF", " ", neta, -41., 41., nphi, 0., bphi);
7055 
7056  h_nls_per_run = fs_->make<TH1F>("h_nls_per_run", " ", 100, 0., 800.);
7057  h_nls_per_run10 = fs_->make<TH1F>("h_nls_per_run10", " ", 100, 0., 60.);
7058  h_nevents_per_LS = fs_->make<TH1F>("h_nevents_per_LS", " ", 100, 0., 600.);
7059  h_nevents_per_LSzoom = fs_->make<TH1F>("h_nevents_per_LSzoom", " ", 50, 0., 50.);
7060  h_nevents_per_eachLS = fs_->make<TH1F>("h_nevents_per_eachLS", " ", bac, 1., bac2);
7061  h_nevents_per_eachRealLS = fs_->make<TH1F>("h_nevents_per_eachRealLS", " ", bac, 1., bac2);
7062  h_lsnumber_per_eachLS = fs_->make<TH1F>("h_lsnumber_per_eachLS", " ", bac, 1., bac2);
7063  //--------------------------------------------------
7064  // for estimator0:
7065  float pst1 = 30.;
7066  h_sumPedestalLS1 = fs_->make<TH1F>("h_sumPedestalLS1", " ", 100, 0., pst1);
7067  h_2DsumPedestalLS1 = fs_->make<TH2F>("h_2DsumPedestalLS1", " ", neta, -41., 41., nphi, 0., bphi);
7068  h_sumPedestalperLS1 = fs_->make<TH1F>("h_sumPedestalperLS1", " ", bac, 1., bac2);
7069  h_2D0sumPedestalLS1 = fs_->make<TH2F>("h_2D0sumPedestalLS1", " ", neta, -41., 41., nphi, 0., bphi);
7070  h_sum0PedestalperLS1 = fs_->make<TH1F>("h_sum0PedestalperLS1", " ", bac, 1., bac2);
7071 
7072  h_sumPedestalLS2 = fs_->make<TH1F>("h_sumPedestalLS2", " ", 100, 0., pst1);
7073  h_2DsumPedestalLS2 = fs_->make<TH2F>("h_2DsumPedestalLS2", " ", neta, -41., 41., nphi, 0., bphi);
7074  h_sumPedestalperLS2 = fs_->make<TH1F>("h_sumPedestalperLS2", " ", bac, 1., bac2);
7075  h_2D0sumPedestalLS2 = fs_->make<TH2F>("h_2D0sumPedestalLS2", " ", neta, -41., 41., nphi, 0., bphi);
7076  h_sum0PedestalperLS2 = fs_->make<TH1F>("h_sum0PedestalperLS2", " ", bac, 1., bac2);
7077 
7078  h_sumPedestalLS3 = fs_->make<TH1F>("h_sumPedestalLS3", " ", 100, 0., pst1);
7079  h_2DsumPedestalLS3 = fs_->make<TH2F>("h_2DsumPedestalLS3", " ", neta, -41., 41., nphi, 0., bphi);
7080  h_sumPedestalperLS3 = fs_->make<TH1F>("h_sumPedestalperLS3", " ", bac, 1., bac2);
7081  h_2D0sumPedestalLS3 = fs_->make<TH2F>("h_2D0sumPedestalLS3", " ", neta, -41., 41., nphi, 0., bphi);
7082  h_sum0PedestalperLS3 = fs_->make<TH1F>("h_sum0PedestalperLS3", " ", bac, 1., bac2);
7083 
7084  h_sumPedestalLS4 = fs_->make<TH1F>("h_sumPedestalLS4", " ", 100, 0., pst1);
7085  h_2DsumPedestalLS4 = fs_->make<TH2F>("h_2DsumPedestalLS4", " ", neta, -41., 41., nphi, 0., bphi);
7086  h_sumPedestalperLS4 = fs_->make<TH1F>("h_sumPedestalperLS4", " ", bac, 1., bac2);
7087  h_2D0sumPedestalLS4 = fs_->make<TH2F>("h_2D0sumPedestalLS4", " ", neta, -41., 41., nphi, 0., bphi);
7088  h_sum0PedestalperLS4 = fs_->make<TH1F>("h_sum0PedestalperLS4", " ", bac, 1., bac2);
7089 
7090  h_sumPedestalLS5 = fs_->make<TH1F>("h_sumPedestalLS5", " ", 100, 0., pst1);
7091  h_2DsumPedestalLS5 = fs_->make<TH2F>("h_2DsumPedestalLS5", " ", neta, -41., 41., nphi, 0., bphi);
7092  h_sumPedestalperLS5 = fs_->make<TH1F>("h_sumPedestalperLS5", " ", bac, 1., bac2);
7093  h_2D0sumPedestalLS5 = fs_->make<TH2F>("h_2D0sumPedestalLS5", " ", neta, -41., 41., nphi, 0., bphi);
7094  h_sum0PedestalperLS5 = fs_->make<TH1F>("h_sum0PedestalperLS5", " ", bac, 1., bac2);
7095 
7096  h_sumPedestalLS6 = fs_->make<TH1F>("h_sumPedestalLS6", " ", 100, 0., pst1);
7097  h_2DsumPedestalLS6 = fs_->make<TH2F>("h_2DsumPedestalLS6", " ", neta, -41., 41., nphi, 0., bphi);
7098  h_sumPedestalperLS6 = fs_->make<TH1F>("h_sumPedestalperLS6", " ", bac, 1., bac2);
7099  h_2D0sumPedestalLS6 = fs_->make<TH2F>("h_2D0sumPedestalLS6", " ", neta, -41., 41., nphi, 0., bphi);
7100  h_sum0PedestalperLS6 = fs_->make<TH1F>("h_sum0PedestalperLS6", " ", bac, 1., bac2);
7101 
7102  h_sumPedestalLS7 = fs_->make<TH1F>("h_sumPedestalLS7", " ", 100, 0., pst1);
7103  h_2DsumPedestalLS7 = fs_->make<TH2F>("h_2DsumPedestalLS7", " ", neta, -41., 41., nphi, 0., bphi);
7104  h_sumPedestalperLS7 = fs_->make<TH1F>("h_sumPedestalperLS7", " ", bac, 1., bac2);
7105  h_2D0sumPedestalLS7 = fs_->make<TH2F>("h_2D0sumPedestalLS7", " ", neta, -41., 41., nphi, 0., bphi);
7106  h_sum0PedestalperLS7 = fs_->make<TH1F>("h_sum0PedestalperLS7", " ", bac, 1., bac2);
7107 
7108  h_sumPedestalLS8 = fs_->make<TH1F>("h_sumPedestalLS8", " ", 100, 0., pst1);
7109  h_2DsumPedestalLS8 = fs_->make<TH2F>("h_2DsumPedestalLS8", " ", neta, -41., 41., nphi, 0., bphi);
7110  h_sumPedestalperLS8 = fs_->make<TH1F>("h_sumPedestalperLS8", " ", bac, 1., bac2);
7111  h_2D0sumPedestalLS8 = fs_->make<TH2F>("h_2D0sumPedestalLS8", " ", neta, -41., 41., nphi, 0., bphi);
7112  h_sum0PedestalperLS8 = fs_->make<TH1F>("h_sum0PedestalperLS8", " ", bac, 1., bac2);
7113 
7114  //--------------------------------------------------
7115  // for estimator1:
7116  h_sumADCAmplLS1copy1 = fs_->make<TH1F>("h_sumADCAmplLS1copy1", " ", 100, 0., 10000);
7117  h_sumADCAmplLS1copy2 = fs_->make<TH1F>("h_sumADCAmplLS1copy2", " ", 100, 0., 20000);
7118  h_sumADCAmplLS1copy3 = fs_->make<TH1F>("h_sumADCAmplLS1copy3", " ", 100, 0., 50000);
7119  h_sumADCAmplLS1copy4 = fs_->make<TH1F>("h_sumADCAmplLS1copy4", " ", 100, 0., 100000);
7120  h_sumADCAmplLS1copy5 = fs_->make<TH1F>("h_sumADCAmplLS1copy5", " ", 100, 0., 150000);
7121  h_sumADCAmplLS1 = fs_->make<TH1F>("h_sumADCAmplLS1", " ", 100, 0., lsdep_estimator1_HBdepth1_);
7122  h_2DsumADCAmplLS1 = fs_->make<TH2F>("h_2DsumADCAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7124  fs_->make<TH2F>("h_2DsumADCAmplLS1_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7125  h_sumADCAmplperLS1 = fs_->make<TH1F>("h_sumADCAmplperLS1", " ", bac, 1., bac2);
7126  h_sumCutADCAmplperLS1 = fs_->make<TH1F>("h_sumCutADCAmplperLS1", " ", bac, 1., bac2);
7127  h_2D0sumADCAmplLS1 = fs_->make<TH2F>("h_2D0sumADCAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7128  h_sum0ADCAmplperLS1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1", " ", bac, 1., bac2);
7129 
7130  h_sumADCAmplLS2 = fs_->make<TH1F>("h_sumADCAmplLS2", " ", 100, 0., lsdep_estimator1_HBdepth2_);
7131  h_2DsumADCAmplLS2 = fs_->make<TH2F>("h_2DsumADCAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7133  fs_->make<TH2F>("h_2DsumADCAmplLS2_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7134  h_sumADCAmplperLS2 = fs_->make<TH1F>("h_sumADCAmplperLS2", " ", bac, 1., bac2);
7135  h_sumCutADCAmplperLS2 = fs_->make<TH1F>("h_sumCutADCAmplperLS2", " ", bac, 1., bac2);
7136  h_2D0sumADCAmplLS2 = fs_->make<TH2F>("h_2D0sumADCAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7137  h_sum0ADCAmplperLS2 = fs_->make<TH1F>("h_sum0ADCAmplperLS2", " ", bac, 1., bac2);
7138 
7139  h_sumADCAmplLS3 = fs_->make<TH1F>("h_sumADCAmplLS3", " ", 100, 0., lsdep_estimator1_HEdepth1_);
7140  h_2DsumADCAmplLS3 = fs_->make<TH2F>("h_2DsumADCAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7142  fs_->make<TH2F>("h_2DsumADCAmplLS3_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7143  h_sumADCAmplperLS3 = fs_->make<TH1F>("h_sumADCAmplperLS3", " ", bac, 1., bac2);
7144  h_sumCutADCAmplperLS3 = fs_->make<TH1F>("h_sumCutADCAmplperLS3", " ", bac, 1., bac2);
7145  h_2D0sumADCAmplLS3 = fs_->make<TH2F>("h_2D0sumADCAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7146  h_sum0ADCAmplperLS3 = fs_->make<TH1F>("h_sum0ADCAmplperLS3", " ", bac, 1., bac2);
7147 
7148  h_sumADCAmplLS4 = fs_->make<TH1F>("h_sumADCAmplLS4", " ", 100, 0., lsdep_estimator1_HEdepth2_);
7149  h_2DsumADCAmplLS4 = fs_->make<TH2F>("h_2DsumADCAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7151  fs_->make<TH2F>("h_2DsumADCAmplLS4_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7152  h_sumADCAmplperLS4 = fs_->make<TH1F>("h_sumADCAmplperLS4", " ", bac, 1., bac2);
7153  h_sumCutADCAmplperLS4 = fs_->make<TH1F>("h_sumCutADCAmplperLS4", " ", bac, 1., bac2);
7154  h_2D0sumADCAmplLS4 = fs_->make<TH2F>("h_2D0sumADCAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7155  h_sum0ADCAmplperLS4 = fs_->make<TH1F>("h_sum0ADCAmplperLS4", " ", bac, 1., bac2);
7156 
7157  h_sumADCAmplLS5 = fs_->make<TH1F>("h_sumADCAmplLS5", " ", 100, 0., lsdep_estimator1_HEdepth3_);
7158  h_2DsumADCAmplLS5 = fs_->make<TH2F>("h_2DsumADCAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7160  fs_->make<TH2F>("h_2DsumADCAmplLS5_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7161  h_sumADCAmplperLS5 = fs_->make<TH1F>("h_sumADCAmplperLS5", " ", bac, 1., bac2);
7162  h_sumCutADCAmplperLS5 = fs_->make<TH1F>("h_sumCutADCAmplperLS5", " ", bac, 1., bac2);
7163  h_2D0sumADCAmplLS5 = fs_->make<TH2F>("h_2D0sumADCAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7164  h_sum0ADCAmplperLS5 = fs_->make<TH1F>("h_sum0ADCAmplperLS5", " ", bac, 1., bac2);
7165  // HE upgrade depth4
7166  h_sumADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7167  h_sumCutADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7168  h_sum0ADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7169 
7170  // HE upgrade depth5
7171  h_sumADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7172  h_sumCutADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7173  h_sum0ADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7174  // HE upgrade depth6
7175  h_sumADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7176  h_sumCutADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7177  h_sum0ADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7178  // HE upgrade depth7
7179  h_sumADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7180  h_sumCutADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7181  h_sum0ADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7182  // for HE gain stability vs LS:
7183  h_2DsumADCAmplLSdepth4HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HEu", " ", neta, -41., 41., nphi, 0., bphi);
7184  h_2D0sumADCAmplLSdepth4HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HEu", " ", neta, -41., 41., nphi, 0., bphi);
7185  h_2DsumADCAmplLSdepth5HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth5HEu", " ", neta, -41., 41., nphi, 0., bphi);
7186  h_2D0sumADCAmplLSdepth5HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth5HEu", " ", neta, -41., 41., nphi, 0., bphi);
7187  h_2DsumADCAmplLSdepth6HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth6HEu", " ", neta, -41., 41., nphi, 0., bphi);
7188  h_2D0sumADCAmplLSdepth6HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth6HEu", " ", neta, -41., 41., nphi, 0., bphi);
7189  h_2DsumADCAmplLSdepth7HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth7HEu", " ", neta, -41., 41., nphi, 0., bphi);
7190  h_2D0sumADCAmplLSdepth7HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth7HEu", " ", neta, -41., 41., nphi, 0., bphi);
7191  h_2DsumADCAmplLSdepth3HFu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth3HFu", " ", neta, -41., 41., nphi, 0., bphi);
7192  h_2D0sumADCAmplLSdepth3HFu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth3HFu", " ", neta, -41., 41., nphi, 0., bphi);
7193  h_2DsumADCAmplLSdepth4HFu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HFu", " ", neta, -41., 41., nphi, 0., bphi);
7194  h_2D0sumADCAmplLSdepth4HFu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HFu", " ", neta, -41., 41., nphi, 0., bphi);
7195 
7196  h_sumADCAmplLS6 = fs_->make<TH1F>("h_sumADCAmplLS6", " ", 100, 0., lsdep_estimator1_HFdepth1_);
7197  h_2DsumADCAmplLS6 = fs_->make<TH2F>("h_2DsumADCAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7199  fs_->make<TH2F>("h_2DsumADCAmplLS6_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7200  h_2D0sumADCAmplLS6 = fs_->make<TH2F>("h_2D0sumADCAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7201  h_sumADCAmplperLS6 = fs_->make<TH1F>("h_sumADCAmplperLS6", " ", bac, 1., bac2);
7202  h_sumCutADCAmplperLS6 = fs_->make<TH1F>("h_sumCutADCAmplperLS6", " ", bac, 1., bac2);
7203  h_sum0ADCAmplperLS6 = fs_->make<TH1F>("h_sum0ADCAmplperLS6", " ", bac, 1., bac2);
7204  // HF upgrade depth3
7205  h_sumADCAmplperLS6u = fs_->make<TH1F>("h_sumADCAmplperLS6u", " ", bac, 1., bac2);
7206  h_sumCutADCAmplperLS6u = fs_->make<TH1F>("h_sumCutADCAmplperLS6u", " ", bac, 1., bac2);
7207  h_sum0ADCAmplperLS6u = fs_->make<TH1F>("h_sum0ADCAmplperLS6u", " ", bac, 1., bac2);
7208 
7209  h_sumADCAmplLS7 = fs_->make<TH1F>("h_sumADCAmplLS7", " ", 100, 0., lsdep_estimator1_HFdepth2_);
7210  h_2DsumADCAmplLS7 = fs_->make<TH2F>("h_2DsumADCAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7212  fs_->make<TH2F>("h_2DsumADCAmplLS7_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7213  h_2D0sumADCAmplLS7 = fs_->make<TH2F>("h_2D0sumADCAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7214  h_sumADCAmplperLS7 = fs_->make<TH1F>("h_sumADCAmplperLS7", " ", bac, 1., bac2);
7215  h_sumCutADCAmplperLS7 = fs_->make<TH1F>("h_sumCutADCAmplperLS7", " ", bac, 1., bac2);
7216  h_sum0ADCAmplperLS7 = fs_->make<TH1F>("h_sum0ADCAmplperLS7", " ", bac, 1., bac2);
7217  // HF upgrade depth4
7218  h_sumADCAmplperLS7u = fs_->make<TH1F>("h_sumADCAmplperLS7u", " ", bac, 1., bac2);
7219  h_sumCutADCAmplperLS7u = fs_->make<TH1F>("h_sumCutADCAmplperLS7u", " ", bac, 1., bac2);
7220  h_sum0ADCAmplperLS7u = fs_->make<TH1F>("h_sum0ADCAmplperLS7u", " ", bac, 1., bac2);
7221 
7222  h_sumADCAmplLS8 = fs_->make<TH1F>("h_sumADCAmplLS8", " ", 100, 0., lsdep_estimator1_HOdepth4_);
7223  h_2DsumADCAmplLS8 = fs_->make<TH2F>("h_2DsumADCAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7225  fs_->make<TH2F>("h_2DsumADCAmplLS8_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7226  h_sumADCAmplperLS8 = fs_->make<TH1F>("h_sumADCAmplperLS8", " ", bac, 1., bac2);
7227  h_sumCutADCAmplperLS8 = fs_->make<TH1F>("h_sumCutADCAmplperLS8", " ", bac, 1., bac2);
7228  h_2D0sumADCAmplLS8 = fs_->make<TH2F>("h_2D0sumADCAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7229  h_sum0ADCAmplperLS8 = fs_->make<TH1F>("h_sum0ADCAmplperLS8", " ", bac, 1., bac2);
7230 
7231  // HB upgrade depth3
7232  h_sumADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sumADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7233  h_sumCutADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7234  h_sum0ADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7235  // HB upgrade depth4
7236  h_sumADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sumADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7237  h_sumCutADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7238  h_sum0ADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7239 
7240  // for HB gain stability vs LS:
7241  h_2DsumADCAmplLSdepth3HBu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth3HBu", " ", neta, -41., 41., nphi, 0., bphi);
7242  h_2D0sumADCAmplLSdepth3HBu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth3HBu", " ", neta, -41., 41., nphi, 0., bphi);
7243  h_2DsumADCAmplLSdepth4HBu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HBu", " ", neta, -41., 41., nphi, 0., bphi);
7244  h_2D0sumADCAmplLSdepth4HBu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HBu", " ", neta, -41., 41., nphi, 0., bphi);
7245 
7246  // error-A for HB( depth1 only)
7247  h_sumADCAmplperLS1_P1 = fs_->make<TH1F>("h_sumADCAmplperLS1_P1", " ", bac, 1., bac2);
7248  h_sum0ADCAmplperLS1_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_P1", " ", bac, 1., bac2);
7249  h_sumADCAmplperLS1_P2 = fs_->make<TH1F>("h_sumADCAmplperLS1_P2", " ", bac, 1., bac2);
7250  h_sum0ADCAmplperLS1_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_P2", " ", bac, 1., bac2);
7251  h_sumADCAmplperLS1_M1 = fs_->make<TH1F>("h_sumADCAmplperLS1_M1", " ", bac, 1., bac2);
7252  h_sum0ADCAmplperLS1_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_M1", " ", bac, 1., bac2);
7253  h_sumADCAmplperLS1_M2 = fs_->make<TH1F>("h_sumADCAmplperLS1_M2", " ", bac, 1., bac2);
7254  h_sum0ADCAmplperLS1_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_M2", " ", bac, 1., bac2);
7255 
7256  // error-A for HE( depth1 only)
7257  h_sumADCAmplperLS3_P1 = fs_->make<TH1F>("h_sumADCAmplperLS3_P1", " ", bac, 1., bac2);
7258  h_sum0ADCAmplperLS3_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_P1", " ", bac, 1., bac2);
7259  h_sumADCAmplperLS3_P2 = fs_->make<TH1F>("h_sumADCAmplperLS3_P2", " ", bac, 1., bac2);
7260  h_sum0ADCAmplperLS3_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_P2", " ", bac, 1., bac2);
7261  h_sumADCAmplperLS3_M1 = fs_->make<TH1F>("h_sumADCAmplperLS3_M1", " ", bac, 1., bac2);
7262  h_sum0ADCAmplperLS3_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_M1", " ", bac, 1., bac2);
7263  h_sumADCAmplperLS3_M2 = fs_->make<TH1F>("h_sumADCAmplperLS3_M2", " ", bac, 1., bac2);
7264  h_sum0ADCAmplperLS3_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_M2", " ", bac, 1., bac2);
7265 
7266  // error-A for HF( depth1 only)
7267  h_sumADCAmplperLS6_P1 = fs_->make<TH1F>("h_sumADCAmplperLS6_P1", " ", bac, 1., bac2);
7268  h_sum0ADCAmplperLS6_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_P1", " ", bac, 1., bac2);
7269  h_sumADCAmplperLS6_P2 = fs_->make<TH1F>("h_sumADCAmplperLS6_P2", " ", bac, 1., bac2);
7270  h_sum0ADCAmplperLS6_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_P2", " ", bac, 1., bac2);
7271  h_sumADCAmplperLS6_M1 = fs_->make<TH1F>("h_sumADCAmplperLS6_M1", " ", bac, 1., bac2);
7272  h_sum0ADCAmplperLS6_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_M1", " ", bac, 1., bac2);
7273  h_sumADCAmplperLS6_M2 = fs_->make<TH1F>("h_sumADCAmplperLS6_M2", " ", bac, 1., bac2);
7274  h_sum0ADCAmplperLS6_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_M2", " ", bac, 1., bac2);
7275 
7276  // error-A for HO( depth4 only)
7277  h_sumADCAmplperLS8_P1 = fs_->make<TH1F>("h_sumADCAmplperLS8_P1", " ", bac, 1., bac2);
7278  h_sum0ADCAmplperLS8_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_P1", " ", bac, 1., bac2);
7279  h_sumADCAmplperLS8_P2 = fs_->make<TH1F>("h_sumADCAmplperLS8_P2", " ", bac, 1., bac2);
7280  h_sum0ADCAmplperLS8_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_P2", " ", bac, 1., bac2);
7281  h_sumADCAmplperLS8_M1 = fs_->make<TH1F>("h_sumADCAmplperLS8_M1", " ", bac, 1., bac2);
7282  h_sum0ADCAmplperLS8_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_M1", " ", bac, 1., bac2);
7283  h_sumADCAmplperLS8_M2 = fs_->make<TH1F>("h_sumADCAmplperLS8_M2", " ", bac, 1., bac2);
7284  h_sum0ADCAmplperLS8_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_M2", " ", bac, 1., bac2);
7285 
7286  //--------------------------------------------------
7287  h_sumTSmeanALS1 = fs_->make<TH1F>("h_sumTSmeanALS1", " ", 100, 0., lsdep_estimator2_HBdepth1_);
7288  h_2DsumTSmeanALS1 = fs_->make<TH2F>("h_2DsumTSmeanALS1", " ", neta, -41., 41., nphi, 0., bphi);
7289  h_sumTSmeanAperLS1 = fs_->make<TH1F>("h_sumTSmeanAperLS1", " ", bac, 1., bac2);
7290  h_sumTSmeanAperLS1_LSselected = fs_->make<TH1F>("h_sumTSmeanAperLS1_LSselected", " ", bac, 1., bac2);
7291  h_sumCutTSmeanAperLS1 = fs_->make<TH1F>("h_sumCutTSmeanAperLS1", " ", bac, 1., bac2);
7292  h_2D0sumTSmeanALS1 = fs_->make<TH2F>("h_2D0sumTSmeanALS1", " ", neta, -41., 41., nphi, 0., bphi);
7293  h_sum0TSmeanAperLS1 = fs_->make<TH1F>("h_sum0TSmeanAperLS1", " ", bac, 1., bac2);
7294 
7295  h_sumTSmeanALS2 = fs_->make<TH1F>("h_sumTSmeanALS2", " ", 100, 0., lsdep_estimator2_HBdepth2_);
7296  h_2DsumTSmeanALS2 = fs_->make<TH2F>("h_2DsumTSmeanALS2", " ", neta, -41., 41., nphi, 0., bphi);
7297  h_sumTSmeanAperLS2 = fs_->make<TH1F>("h_sumTSmeanAperLS2", " ", bac, 1., bac2);
7298  h_sumCutTSmeanAperLS2 = fs_->make<TH1F>("h_sumCutTSmeanAperLS2", " ", bac, 1., bac2);
7299  h_2D0sumTSmeanALS2 = fs_->make<TH2F>("h_2D0sumTSmeanALS2", " ", neta, -41., 41., nphi, 0., bphi);
7300  h_sum0TSmeanAperLS2 = fs_->make<TH1F>("h_sum0TSmeanAperLS2", " ", bac, 1., bac2);
7301 
7302  h_sumTSmeanALS3 = fs_->make<TH1F>("h_sumTSmeanALS3", " ", 100, 0., lsdep_estimator2_HEdepth1_);
7303  h_2DsumTSmeanALS3 = fs_->make<TH2F>("h_2DsumTSmeanALS3", " ", neta, -41., 41., nphi, 0., bphi);
7304  h_sumTSmeanAperLS3 = fs_->make<TH1F>("h_sumTSmeanAperLS3", " ", bac, 1., bac2);
7305  h_sumCutTSmeanAperLS3 = fs_->make<TH1F>("h_sumCutTSmeanAperLS3", " ", bac, 1., bac2);
7306  h_2D0sumTSmeanALS3 = fs_->make<TH2F>("h_2D0sumTSmeanALS3", " ", neta, -41., 41., nphi, 0., bphi);
7307  h_sum0TSmeanAperLS3 = fs_->make<TH1F>("h_sum0TSmeanAperLS3", " ", bac, 1., bac2);
7308 
7309  h_sumTSmeanALS4 = fs_->make<TH1F>("h_sumTSmeanALS4", " ", 100, 0., lsdep_estimator2_HEdepth2_);
7310  h_2DsumTSmeanALS4 = fs_->make<TH2F>("h_2DsumTSmeanALS4", " ", neta, -41., 41., nphi, 0., bphi);
7311  h_sumTSmeanAperLS4 = fs_->make<TH1F>("h_sumTSmeanAperLS4", " ", bac, 1., bac2);
7312  h_sumCutTSmeanAperLS4 = fs_->make<TH1F>("h_sumCutTSmeanAperLS4", " ", bac, 1., bac2);
7313  h_2D0sumTSmeanALS4 = fs_->make<TH2F>("h_2D0sumTSmeanALS4", " ", neta, -41., 41., nphi, 0., bphi);
7314  h_sum0TSmeanAperLS4 = fs_->make<TH1F>("h_sum0TSmeanAperLS4", " ", bac, 1., bac2);
7315 
7316  h_sumTSmeanALS5 = fs_->make<TH1F>("h_sumTSmeanALS5", " ", 100, 0., lsdep_estimator2_HEdepth3_);
7317  h_2DsumTSmeanALS5 = fs_->make<TH2F>("h_2DsumTSmeanALS5", " ", neta, -41., 41., nphi, 0., bphi);
7318  h_sumTSmeanAperLS5 = fs_->make<TH1F>("h_sumTSmeanAperLS5", " ", bac, 1., bac2);
7319  h_sumCutTSmeanAperLS5 = fs_->make<TH1F>("h_sumCutTSmeanAperLS5", " ", bac, 1., bac2);
7320  h_2D0sumTSmeanALS5 = fs_->make<TH2F>("h_2D0sumTSmeanALS5", " ", neta, -41., 41., nphi, 0., bphi);
7321  h_sum0TSmeanAperLS5 = fs_->make<TH1F>("h_sum0TSmeanAperLS5", " ", bac, 1., bac2);
7322 
7323  h_sumTSmeanALS6 = fs_->make<TH1F>("h_sumTSmeanALS6", " ", 100, 0., lsdep_estimator2_HFdepth1_);
7324  h_2DsumTSmeanALS6 = fs_->make<TH2F>("h_2DsumTSmeanALS6", " ", neta, -41., 41., nphi, 0., bphi);
7325  h_sumTSmeanAperLS6 = fs_->make<TH1F>("h_sumTSmeanAperLS6", " ", bac, 1., bac2);
7326  h_sumCutTSmeanAperLS6 = fs_->make<TH1F>("h_sumCutTSmeanAperLS6", " ", bac, 1., bac2);
7327  h_2D0sumTSmeanALS6 = fs_->make<TH2F>("h_2D0sumTSmeanALS6", " ", neta, -41., 41., nphi, 0., bphi);
7328  h_sum0TSmeanAperLS6 = fs_->make<TH1F>("h_sum0TSmeanAperLS6", " ", bac, 1., bac2);
7329 
7330  h_sumTSmeanALS7 = fs_->make<TH1F>("h_sumTSmeanALS7", " ", 100, 0., lsdep_estimator2_HFdepth2_);
7331  h_2DsumTSmeanALS7 = fs_->make<TH2F>("h_2DsumTSmeanALS7", " ", neta, -41., 41., nphi, 0., bphi);
7332  h_sumTSmeanAperLS7 = fs_->make<TH1F>("h_sumTSmeanAperLS7", " ", bac, 1., bac2);
7333  h_sumCutTSmeanAperLS7 = fs_->make<TH1F>("h_sumCutTSmeanAperLS7", " ", bac, 1., bac2);
7334  h_2D0sumTSmeanALS7 = fs_->make<TH2F>("h_2D0sumTSmeanALS7", " ", neta, -41., 41., nphi, 0., bphi);
7335  h_sum0TSmeanAperLS7 = fs_->make<TH1F>("h_sum0TSmeanAperLS7", " ", bac, 1., bac2);
7336 
7337  h_sumTSmeanALS8 = fs_->make<TH1F>("h_sumTSmeanALS8", " ", 100, 0., lsdep_estimator2_HOdepth4_);
7338  h_2DsumTSmeanALS8 = fs_->make<TH2F>("h_2DsumTSmeanALS8", " ", neta, -41., 41., nphi, 0., bphi);
7339  h_sumTSmeanAperLS8 = fs_->make<TH1F>("h_sumTSmeanAperLS8", " ", bac, 1., bac2);
7340  h_sumCutTSmeanAperLS8 = fs_->make<TH1F>("h_sumCutTSmeanAperLS8", " ", bac, 1., bac2);
7341  h_2D0sumTSmeanALS8 = fs_->make<TH2F>("h_2D0sumTSmeanALS8", " ", neta, -41., 41., nphi, 0., bphi);
7342  h_sum0TSmeanAperLS8 = fs_->make<TH1F>("h_sum0TSmeanAperLS8", " ", bac, 1., bac2);
7343  //--------------------------------------------------
7344  // for estimator3:
7345  h_sumTSmaxALS1 = fs_->make<TH1F>("h_sumTSmaxALS1", " ", 100, 0., lsdep_estimator3_HBdepth1_);
7346  h_2DsumTSmaxALS1 = fs_->make<TH2F>("h_2DsumTSmaxALS1", " ", neta, -41., 41., nphi, 0., bphi);
7347  h_sumTSmaxAperLS1 = fs_->make<TH1F>("h_sumTSmaxAperLS1", " ", bac, 1., bac2);
7348  h_sumTSmaxAperLS1_LSselected = fs_->make<TH1F>("h_sumTSmaxAperLS1_LSselected", " ", bac, 1., bac2);
7349  h_sumCutTSmaxAperLS1 = fs_->make<TH1F>("h_sumCutTSmaxAperLS1", " ", bac, 1., bac2);
7350  h_2D0sumTSmaxALS1 = fs_->make<TH2F>("h_2D0sumTSmaxALS1", " ", neta, -41., 41., nphi, 0., bphi);
7351  h_sum0TSmaxAperLS1 = fs_->make<TH1F>("h_sum0TSmaxAperLS1", " ", bac, 1., bac2);
7352 
7353  h_sumTSmaxALS2 = fs_->make<TH1F>("h_sumTSmaxALS2", " ", 100, 0., lsdep_estimator3_HBdepth2_);
7354  h_2DsumTSmaxALS2 = fs_->make<TH2F>("h_2DsumTSmaxALS2", " ", neta, -41., 41., nphi, 0., bphi);
7355  h_sumTSmaxAperLS2 = fs_->make<TH1F>("h_sumTSmaxAperLS2", " ", bac, 1., bac2);
7356  h_sumCutTSmaxAperLS2 = fs_->make<TH1F>("h_sumCutTSmaxAperLS2", " ", bac, 1., bac2);
7357  h_2D0sumTSmaxALS2 = fs_->make<TH2F>("h_2D0sumTSmaxALS2", " ", neta, -41., 41., nphi, 0., bphi);
7358  h_sum0TSmaxAperLS2 = fs_->make<TH1F>("h_sum0TSmaxAperLS2", " ", bac, 1., bac2);
7359 
7360  h_sumTSmaxALS3 = fs_->make<TH1F>("h_sumTSmaxALS3", " ", 100, 0., lsdep_estimator3_HEdepth1_);
7361  h_2DsumTSmaxALS3 = fs_->make<TH2F>("h_2DsumTSmaxALS3", " ", neta, -41., 41., nphi, 0., bphi);
7362  h_sumTSmaxAperLS3 = fs_->make<TH1F>("h_sumTSmaxAperLS3", " ", bac, 1., bac2);
7363  h_sumCutTSmaxAperLS3 = fs_->make<TH1F>("h_sumCutTSmaxAperLS3", " ", bac, 1., bac2);
7364  h_2D0sumTSmaxALS3 = fs_->make<TH2F>("h_2D0sumTSmaxALS3", " ", neta, -41., 41., nphi, 0., bphi);
7365  h_sum0TSmaxAperLS3 = fs_->make<TH1F>("h_sum0TSmaxAperLS3", " ", bac, 1., bac2);
7366 
7367  h_sumTSmaxALS4 = fs_->make<TH1F>("h_sumTSmaxALS4", " ", 100, 0., lsdep_estimator3_HEdepth2_);
7368  h_2DsumTSmaxALS4 = fs_->make<TH2F>("h_2DsumTSmaxALS4", " ", neta, -41., 41., nphi, 0., bphi);
7369  h_sumTSmaxAperLS4 = fs_->make<TH1F>("h_sumTSmaxAperLS4", " ", bac, 1., bac2);
7370  h_sumCutTSmaxAperLS4 = fs_->make<TH1F>("h_sumCutTSmaxAperLS4", " ", bac, 1., bac2);
7371  h_2D0sumTSmaxALS4 = fs_->make<TH2F>("h_2D0sumTSmaxALS4", " ", neta, -41., 41., nphi, 0., bphi);
7372  h_sum0TSmaxAperLS4 = fs_->make<TH1F>("h_sum0TSmaxAperLS4", " ", bac, 1., bac2);
7373 
7374  h_sumTSmaxALS5 = fs_->make<TH1F>("h_sumTSmaxALS5", " ", 100, 0., lsdep_estimator3_HEdepth3_);
7375  h_2DsumTSmaxALS5 = fs_->make<TH2F>("h_2DsumTSmaxALS5", " ", neta, -41., 41., nphi, 0., bphi);
7376  h_sumTSmaxAperLS5 = fs_->make<TH1F>("h_sumTSmaxAperLS5", " ", bac, 1., bac2);
7377  h_sumCutTSmaxAperLS5 = fs_->make<TH1F>("h_sumCutTSmaxAperLS5", " ", bac, 1., bac2);
7378  h_2D0sumTSmaxALS5 = fs_->make<TH2F>("h_2D0sumTSmaxALS5", " ", neta, -41., 41., nphi, 0., bphi);
7379  h_sum0TSmaxAperLS5 = fs_->make<TH1F>("h_sum0TSmaxAperLS5", " ", bac, 1., bac2);
7380 
7381  h_sumTSmaxALS6 = fs_->make<TH1F>("h_sumTSmaxALS6", " ", 100, 0., lsdep_estimator3_HFdepth1_);
7382  h_2DsumTSmaxALS6 = fs_->make<TH2F>("h_2DsumTSmaxALS6", " ", neta, -41., 41., nphi, 0., bphi);
7383  h_sumTSmaxAperLS6 = fs_->make<TH1F>("h_sumTSmaxAperLS6", " ", bac, 1., bac2);
7384  h_sumCutTSmaxAperLS6 = fs_->make<TH1F>("h_sumCutTSmaxAperLS6", " ", bac, 1., bac2);
7385  h_2D0sumTSmaxALS6 = fs_->make<TH2F>("h_2D0sumTSmaxALS6", " ", neta, -41., 41., nphi, 0., bphi);
7386  h_sum0TSmaxAperLS6 = fs_->make<TH1F>("h_sum0TSmaxAperLS6", " ", bac, 1., bac2);
7387 
7388  h_sumTSmaxALS7 = fs_->make<TH1F>("h_sumTSmaxALS7", " ", 100, 0., lsdep_estimator3_HFdepth2_);
7389  h_2DsumTSmaxALS7 = fs_->make<TH2F>("h_2DsumTSmaxALS7", " ", neta, -41., 41., nphi, 0., bphi);
7390  h_sumTSmaxAperLS7 = fs_->make<TH1F>("h_sumTSmaxAperLS7", " ", bac, 1., bac2);
7391  h_sumCutTSmaxAperLS7 = fs_->make<TH1F>("h_sumCutTSmaxAperLS7", " ", bac, 1., bac2);
7392  h_2D0sumTSmaxALS7 = fs_->make<TH2F>("h_2D0sumTSmaxALS7", " ", neta, -41., 41., nphi, 0., bphi);
7393  h_sum0TSmaxAperLS7 = fs_->make<TH1F>("h_sum0TSmaxAperLS7", " ", bac, 1., bac2);
7394 
7395  h_sumTSmaxALS8 = fs_->make<TH1F>("h_sumTSmaxALS8", " ", 100, 0., lsdep_estimator3_HOdepth4_);
7396  h_2DsumTSmaxALS8 = fs_->make<TH2F>("h_2DsumTSmaxALS8", " ", neta, -41., 41., nphi, 0., bphi);
7397  h_sumTSmaxAperLS8 = fs_->make<TH1F>("h_sumTSmaxAperLS8", " ", bac, 1., bac2);
7398  h_sumCutTSmaxAperLS8 = fs_->make<TH1F>("h_sumCutTSmaxAperLS8", " ", bac, 1., bac2);
7399  h_2D0sumTSmaxALS8 = fs_->make<TH2F>("h_2D0sumTSmaxALS8", " ", neta, -41., 41., nphi, 0., bphi);
7400  h_sum0TSmaxAperLS8 = fs_->make<TH1F>("h_sum0TSmaxAperLS8", " ", bac, 1., bac2);
7401  //--------------------------------------------------
7402  // for estimator4:
7403  h_sumAmplitudeLS1 = fs_->make<TH1F>("h_sumAmplitudeLS1", " ", 100, 0.0, lsdep_estimator4_HBdepth1_);
7404  h_2DsumAmplitudeLS1 = fs_->make<TH2F>("h_2DsumAmplitudeLS1", " ", neta, -41., 41., nphi, 0., bphi);
7405  h_sumAmplitudeperLS1 = fs_->make<TH1F>("h_sumAmplitudeperLS1", " ", bac, 1., bac2);
7406  h_sumAmplitudeperLS1_LSselected = fs_->make<TH1F>("h_sumAmplitudeperLS1_LSselected", " ", bac, 1., bac2);
7407  h_sumCutAmplitudeperLS1 = fs_->make<TH1F>("h_sumCutAmplitudeperLS1", " ", bac, 1., bac2);
7408  h_2D0sumAmplitudeLS1 = fs_->make<TH2F>("h_2D0sumAmplitudeLS1", " ", neta, -41., 41., nphi, 0., bphi);
7409  h_sum0AmplitudeperLS1 = fs_->make<TH1F>("h_sum0AmplitudeperLS1", " ", bac, 1., bac2);
7410 
7411  h_sumAmplitudeLS2 = fs_->make<TH1F>("h_sumAmplitudeLS2", " ", 100, 0.0, lsdep_estimator4_HBdepth2_);
7412  h_2DsumAmplitudeLS2 = fs_->make<TH2F>("h_2DsumAmplitudeLS2", " ", neta, -41., 41., nphi, 0., bphi);
7413  h_sumAmplitudeperLS2 = fs_->make<TH1F>("h_sumAmplitudeperLS2", " ", bac, 1., bac2);
7414  h_sumCutAmplitudeperLS2 = fs_->make<TH1F>("h_sumCutAmplitudeperLS2", " ", bac, 1., bac2);
7415  h_2D0sumAmplitudeLS2 = fs_->make<TH2F>("h_2D0sumAmplitudeLS2", " ", neta, -41., 41., nphi, 0., bphi);
7416  h_sum0AmplitudeperLS2 = fs_->make<TH1F>("h_sum0AmplitudeperLS2", " ", bac, 1., bac2);
7417 
7418  h_sumAmplitudeLS3 = fs_->make<TH1F>("h_sumAmplitudeLS3", " ", 100, 0.0, lsdep_estimator4_HEdepth1_);
7419  h_2DsumAmplitudeLS3 = fs_->make<TH2F>("h_2DsumAmplitudeLS3", " ", neta, -41., 41., nphi, 0., bphi);
7420  h_sumAmplitudeperLS3 = fs_->make<TH1F>("h_sumAmplitudeperLS3", " ", bac, 1., bac2);
7421  h_sumCutAmplitudeperLS3 = fs_->make<TH1F>("h_sumCutAmplitudeperLS3", " ", bac, 1., bac2);
7422  h_2D0sumAmplitudeLS3 = fs_->make<TH2F>("h_2D0sumAmplitudeLS3", " ", neta, -41., 41., nphi, 0., bphi);
7423  h_sum0AmplitudeperLS3 = fs_->make<TH1F>("h_sum0AmplitudeperLS3", " ", bac, 1., bac2);
7424 
7425  h_sumAmplitudeLS4 = fs_->make<TH1F>("h_sumAmplitudeLS4", " ", 100, 0.0, lsdep_estimator4_HEdepth2_);
7426  h_2DsumAmplitudeLS4 = fs_->make<TH2F>("h_2DsumAmplitudeLS4", " ", neta, -41., 41., nphi, 0., bphi);
7427  h_sumAmplitudeperLS4 = fs_->make<TH1F>("h_sumAmplitudeperLS4", " ", bac, 1., bac2);
7428  h_sumCutAmplitudeperLS4 = fs_->make<TH1F>("h_sumCutAmplitudeperLS4", " ", bac, 1., bac2);
7429  h_2D0sumAmplitudeLS4 = fs_->make<TH2F>("h_2D0sumAmplitudeLS4", " ", neta, -41., 41., nphi, 0., bphi);
7430  h_sum0AmplitudeperLS4 = fs_->make<TH1F>("h_sum0AmplitudeperLS4", " ", bac, 1., bac2);
7431 
7432  h_sumAmplitudeLS5 = fs_->make<TH1F>("h_sumAmplitudeLS5", " ", 100, 0.0, lsdep_estimator4_HEdepth3_);
7433  h_2DsumAmplitudeLS5 = fs_->make<TH2F>("h_2DsumAmplitudeLS5", " ", neta, -41., 41., nphi, 0., bphi);
7434  h_sumAmplitudeperLS5 = fs_->make<TH1F>("h_sumAmplitudeperLS5", " ", bac, 1., bac2);
7435  h_sumCutAmplitudeperLS5 = fs_->make<TH1F>("h_sumCutAmplitudeperLS5", " ", bac, 1., bac2);
7436  h_2D0sumAmplitudeLS5 = fs_->make<TH2F>("h_2D0sumAmplitudeLS5", " ", neta, -41., 41., nphi, 0., bphi);
7437  h_sum0AmplitudeperLS5 = fs_->make<TH1F>("h_sum0AmplitudeperLS5", " ", bac, 1., bac2);
7438 
7439  h_sumAmplitudeLS6 = fs_->make<TH1F>("h_sumAmplitudeLS6", " ", 100, 0., lsdep_estimator4_HFdepth1_);
7440  h_2DsumAmplitudeLS6 = fs_->make<TH2F>("h_2DsumAmplitudeLS6", " ", neta, -41., 41., nphi, 0., bphi);
7441  h_sumAmplitudeperLS6 = fs_->make<TH1F>("h_sumAmplitudeperLS6", " ", bac, 1., bac2);
7442  h_sumCutAmplitudeperLS6 = fs_->make<TH1F>("h_sumCutAmplitudeperLS6", " ", bac, 1., bac2);
7443  h_2D0sumAmplitudeLS6 = fs_->make<TH2F>("h_2D0sumAmplitudeLS6", " ", neta, -41., 41., nphi, 0., bphi);
7444  h_sum0AmplitudeperLS6 = fs_->make<TH1F>("h_sum0AmplitudeperLS6", " ", bac, 1., bac2);
7445 
7446  h_sumAmplitudeLS7 = fs_->make<TH1F>("h_sumAmplitudeLS7", " ", 100, 0., lsdep_estimator4_HFdepth2_);
7447  h_2DsumAmplitudeLS7 = fs_->make<TH2F>("h_2DsumAmplitudeLS7", " ", neta, -41., 41., nphi, 0., bphi);
7448  h_sumAmplitudeperLS7 = fs_->make<TH1F>("h_sumAmplitudeperLS7", " ", bac, 1., bac2);
7449  h_sumCutAmplitudeperLS7 = fs_->make<TH1F>("h_sumCutAmplitudeperLS7", " ", bac, 1., bac2);
7450  h_2D0sumAmplitudeLS7 = fs_->make<TH2F>("h_2D0sumAmplitudeLS7", " ", neta, -41., 41., nphi, 0., bphi);
7451  h_sum0AmplitudeperLS7 = fs_->make<TH1F>("h_sum0AmplitudeperLS7", " ", bac, 1., bac2);
7452 
7453  h_sumAmplitudeLS8 = fs_->make<TH1F>("h_sumAmplitudeLS8", " ", 100, 0., lsdep_estimator4_HOdepth4_);
7454  h_2DsumAmplitudeLS8 = fs_->make<TH2F>("h_2DsumAmplitudeLS8", " ", neta, -41., 41., nphi, 0., bphi);
7455  h_sumAmplitudeperLS8 = fs_->make<TH1F>("h_sumAmplitudeperLS8", " ", bac, 1., bac2);
7456  h_sumCutAmplitudeperLS8 = fs_->make<TH1F>("h_sumCutAmplitudeperLS8", " ", bac, 1., bac2);
7457  h_2D0sumAmplitudeLS8 = fs_->make<TH2F>("h_2D0sumAmplitudeLS8", " ", neta, -41., 41., nphi, 0., bphi);
7458  h_sum0AmplitudeperLS8 = fs_->make<TH1F>("h_sum0AmplitudeperLS8", " ", bac, 1., bac2);
7459  //--------------------------------------------------
7460  // for estimator5:
7461  h_sumAmplLS1 = fs_->make<TH1F>("h_sumAmplLS1", " ", 100, 0.0, lsdep_estimator5_HBdepth1_);
7462  h_2DsumAmplLS1 = fs_->make<TH2F>("h_2DsumAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7463  h_sumAmplperLS1 = fs_->make<TH1F>("h_sumAmplperLS1", " ", bac, 1., bac2);
7464  h_sumAmplperLS1_LSselected = fs_->make<TH1F>("h_sumAmplperLS1_LSselected", " ", bac, 1., bac2);
7465  h_sumCutAmplperLS1 = fs_->make<TH1F>("h_sumCutAmplperLS1", " ", bac, 1., bac2);
7466  h_2D0sumAmplLS1 = fs_->make<TH2F>("h_2D0sumAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7467  h_sum0AmplperLS1 = fs_->make<TH1F>("h_sum0AmplperLS1", " ", bac, 1., bac2);
7468 
7469  h_sumAmplLS2 = fs_->make<TH1F>("h_sumAmplLS2", " ", 100, 0.0, lsdep_estimator5_HBdepth2_);
7470  h_2DsumAmplLS2 = fs_->make<TH2F>("h_2DsumAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7471  h_sumAmplperLS2 = fs_->make<TH1F>("h_sumAmplperLS2", " ", bac, 1., bac2);
7472  h_sumCutAmplperLS2 = fs_->make<TH1F>("h_sumCutAmplperLS2", " ", bac, 1., bac2);
7473  h_2D0sumAmplLS2 = fs_->make<TH2F>("h_2D0sumAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7474  h_sum0AmplperLS2 = fs_->make<TH1F>("h_sum0AmplperLS2", " ", bac, 1., bac2);
7475 
7476  h_sumAmplLS3 = fs_->make<TH1F>("h_sumAmplLS3", " ", 100, 0.0, lsdep_estimator5_HEdepth1_);
7477  h_2DsumAmplLS3 = fs_->make<TH2F>("h_2DsumAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7478  h_sumAmplperLS3 = fs_->make<TH1F>("h_sumAmplperLS3", " ", bac, 1., bac2);
7479  h_sumCutAmplperLS3 = fs_->make<TH1F>("h_sumCutAmplperLS3", " ", bac, 1., bac2);
7480  h_2D0sumAmplLS3 = fs_->make<TH2F>("h_2D0sumAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7481  h_sum0AmplperLS3 = fs_->make<TH1F>("h_sum0AmplperLS3", " ", bac, 1., bac2);
7482 
7483  h_sumAmplLS4 = fs_->make<TH1F>("h_sumAmplLS4", " ", 100, 0.0, lsdep_estimator5_HEdepth2_);
7484  h_2DsumAmplLS4 = fs_->make<TH2F>("h_2DsumAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7485  h_sumAmplperLS4 = fs_->make<TH1F>("h_sumAmplperLS4", " ", bac, 1., bac2);
7486  h_sumCutAmplperLS4 = fs_->make<TH1F>("h_sumCutAmplperLS4", " ", bac, 1., bac2);
7487  h_2D0sumAmplLS4 = fs_->make<TH2F>("h_2D0sumAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7488  h_sum0AmplperLS4 = fs_->make<TH1F>("h_sum0AmplperLS4", " ", bac, 1., bac2);
7489 
7490  h_sumAmplLS5 = fs_->make<TH1F>("h_sumAmplLS5", " ", 100, 0.0, lsdep_estimator5_HEdepth3_);
7491  h_2DsumAmplLS5 = fs_->make<TH2F>("h_2DsumAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7492  h_sumAmplperLS5 = fs_->make<TH1F>("h_sumAmplperLS5", " ", bac, 1., bac2);
7493  h_sumCutAmplperLS5 = fs_->make<TH1F>("h_sumCutAmplperLS5", " ", bac, 1., bac2);
7494  h_2D0sumAmplLS5 = fs_->make<TH2F>("h_2D0sumAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7495  h_sum0AmplperLS5 = fs_->make<TH1F>("h_sum0AmplperLS5", " ", bac, 1., bac2);
7496 
7497  h_sumAmplLS6 = fs_->make<TH1F>("h_sumAmplLS6", " ", 100, 0.0, lsdep_estimator5_HFdepth1_);
7498  h_2DsumAmplLS6 = fs_->make<TH2F>("h_2DsumAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7499  h_sumAmplperLS6 = fs_->make<TH1F>("h_sumAmplperLS6", " ", bac, 1., bac2);
7500  h_sumCutAmplperLS6 = fs_->make<TH1F>("h_sumCutAmplperLS6", " ", bac, 1., bac2);
7501  h_2D0sumAmplLS6 = fs_->make<TH2F>("h_2D0sumAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7502  h_sum0AmplperLS6 = fs_->make<TH1F>("h_sum0AmplperLS6", " ", bac, 1., bac2);
7503 
7504  h_RatioOccupancy_HBP = fs_->make<TH1F>("h_RatioOccupancy_HBP", " ", bac, 1., bac2);
7505  h_RatioOccupancy_HBM = fs_->make<TH1F>("h_RatioOccupancy_HBM", " ", bac, 1., bac2);
7506  h_RatioOccupancy_HEP = fs_->make<TH1F>("h_RatioOccupancy_HEP", " ", bac, 1., bac2);
7507  h_RatioOccupancy_HEM = fs_->make<TH1F>("h_RatioOccupancy_HEM", " ", bac, 1., bac2);
7508  h_RatioOccupancy_HOP = fs_->make<TH1F>("h_RatioOccupancy_HOP", " ", bac, 1., bac2);
7509  h_RatioOccupancy_HOM = fs_->make<TH1F>("h_RatioOccupancy_HOM", " ", bac, 1., bac2);
7510  h_RatioOccupancy_HFP = fs_->make<TH1F>("h_RatioOccupancy_HFP", " ", bac, 1., bac2);
7511  h_RatioOccupancy_HFM = fs_->make<TH1F>("h_RatioOccupancy_HFM", " ", bac, 1., bac2);
7512 
7513  h_sumAmplLS7 = fs_->make<TH1F>("h_sumAmplLS7", " ", 100, 0.0, lsdep_estimator5_HFdepth2_);
7514  h_2DsumAmplLS7 = fs_->make<TH2F>("h_2DsumAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7515  h_sumAmplperLS7 = fs_->make<TH1F>("h_sumAmplperLS7", " ", bac, 1., bac2);
7516  h_sumCutAmplperLS7 = fs_->make<TH1F>("h_sumCutAmplperLS7", " ", bac, 1., bac2);
7517  h_2D0sumAmplLS7 = fs_->make<TH2F>("h_2D0sumAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7518  h_sum0AmplperLS7 = fs_->make<TH1F>("h_sum0AmplperLS7", " ", bac, 1., bac2);
7519 
7520  h_sumAmplLS8 = fs_->make<TH1F>("h_sumAmplLS8", " ", 100, 0.0, lsdep_estimator5_HOdepth4_);
7521  h_2DsumAmplLS8 = fs_->make<TH2F>("h_2DsumAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7522  h_sumAmplperLS8 = fs_->make<TH1F>("h_sumAmplperLS8", " ", bac, 1., bac2);
7523  h_sumCutAmplperLS8 = fs_->make<TH1F>("h_sumCutAmplperLS8", " ", bac, 1., bac2);
7524  h_2D0sumAmplLS8 = fs_->make<TH2F>("h_2D0sumAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7525  h_sum0AmplperLS8 = fs_->make<TH1F>("h_sum0AmplperLS8", " ", bac, 1., bac2);
7526  //--------------------------------------------------
7527  // for estimator6:
7528  h_sumErrorBLS1 = fs_->make<TH1F>("h_sumErrorBLS1", " ", 10, 0., 10.);
7529  h_sumErrorBperLS1 = fs_->make<TH1F>("h_sumErrorBperLS1", " ", bac, 1., bac2);
7530  h_sum0ErrorBperLS1 = fs_->make<TH1F>("h_sum0ErrorBperLS1", " ", bac, 1., bac2);
7531  h_2D0sumErrorBLS1 = fs_->make<TH2F>("h_2D0sumErrorBLS1", " ", neta, -41., 41., nphi, 0., bphi);
7532  h_2DsumErrorBLS1 = fs_->make<TH2F>("h_2DsumErrorBLS1", " ", neta, -41., 41., nphi, 0., bphi);
7533  h_sumErrorBLS2 = fs_->make<TH1F>("h_sumErrorBLS2", " ", 10, 0., 10.);
7534  h_sumErrorBperLS2 = fs_->make<TH1F>("h_sumErrorBperLS2", " ", bac, 1., bac2);
7535  h_sum0ErrorBperLS2 = fs_->make<TH1F>("h_sum0ErrorBperLS2", " ", bac, 1., bac2);
7536  h_2D0sumErrorBLS2 = fs_->make<TH2F>("h_2D0sumErrorBLS2", " ", neta, -41., 41., nphi, 0., bphi);
7537  h_2DsumErrorBLS2 = fs_->make<TH2F>("h_2DsumErrorBLS2", " ", neta, -41., 41., nphi, 0., bphi);
7538 
7539  h_sumErrorBLS3 = fs_->make<TH1F>("h_sumErrorBLS3", " ", 10, 0., 10.);
7540  h_sumErrorBperLS3 = fs_->make<TH1F>("h_sumErrorBperLS3", " ", bac, 1., bac2);
7541  h_sum0ErrorBperLS3 = fs_->make<TH1F>("h_sum0ErrorBperLS3", " ", bac, 1., bac2);
7542  h_2D0sumErrorBLS3 = fs_->make<TH2F>("h_2D0sumErrorBLS3", " ", neta, -41., 41., nphi, 0., bphi);
7543  h_2DsumErrorBLS3 = fs_->make<TH2F>("h_2DsumErrorBLS3", " ", neta, -41., 41., nphi, 0., bphi);
7544  h_sumErrorBLS4 = fs_->make<TH1F>("h_sumErrorBLS4", " ", 10, 0., 10.);
7545  h_sumErrorBperLS4 = fs_->make<TH1F>("h_sumErrorBperLS4", " ", bac, 1., bac2);
7546  h_sum0ErrorBperLS4 = fs_->make<TH1F>("h_sum0ErrorBperLS4", " ", bac, 1., bac2);
7547  h_2D0sumErrorBLS4 = fs_->make<TH2F>("h_2D0sumErrorBLS4", " ", neta, -41., 41., nphi, 0., bphi);
7548  h_2DsumErrorBLS4 = fs_->make<TH2F>("h_2DsumErrorBLS4", " ", neta, -41., 41., nphi, 0., bphi);
7549  h_sumErrorBLS5 = fs_->make<TH1F>("h_sumErrorBLS5", " ", 10, 0., 10.);
7550  h_sumErrorBperLS5 = fs_->make<TH1F>("h_sumErrorBperLS5", " ", bac, 1., bac2);
7551  h_sum0ErrorBperLS5 = fs_->make<TH1F>("h_sum0ErrorBperLS5", " ", bac, 1., bac2);
7552  h_2D0sumErrorBLS5 = fs_->make<TH2F>("h_2D0sumErrorBLS5", " ", neta, -41., 41., nphi, 0., bphi);
7553  h_2DsumErrorBLS5 = fs_->make<TH2F>("h_2DsumErrorBLS5", " ", neta, -41., 41., nphi, 0., bphi);
7554 
7555  h_sumErrorBLS6 = fs_->make<TH1F>("h_sumErrorBLS6", " ", 10, 0., 10.);
7556  h_sumErrorBperLS6 = fs_->make<TH1F>("h_sumErrorBperLS6", " ", bac, 1., bac2);
7557  h_sum0ErrorBperLS6 = fs_->make<TH1F>("h_sum0ErrorBperLS6", " ", bac, 1., bac2);
7558  h_2D0sumErrorBLS6 = fs_->make<TH2F>("h_2D0sumErrorBLS6", " ", neta, -41., 41., nphi, 0., bphi);
7559  h_2DsumErrorBLS6 = fs_->make<TH2F>("h_2DsumErrorBLS6", " ", neta, -41., 41., nphi, 0., bphi);
7560  h_sumErrorBLS7 = fs_->make<TH1F>("h_sumErrorBLS7", " ", 10, 0., 10.);
7561  h_sumErrorBperLS7 = fs_->make<TH1F>("h_sumErrorBperLS7", " ", bac, 1., bac2);
7562  h_sum0ErrorBperLS7 = fs_->make<TH1F>("h_sum0ErrorBperLS7", " ", bac, 1., bac2);
7563  h_2D0sumErrorBLS7 = fs_->make<TH2F>("h_2D0sumErrorBLS7", " ", neta, -41., 41., nphi, 0., bphi);
7564  h_2DsumErrorBLS7 = fs_->make<TH2F>("h_2DsumErrorBLS7", " ", neta, -41., 41., nphi, 0., bphi);
7565 
7566  h_sumErrorBLS8 = fs_->make<TH1F>("h_sumErrorBLS8", " ", 10, 0., 10.);
7567  h_sumErrorBperLS8 = fs_->make<TH1F>("h_sumErrorBperLS8", " ", bac, 1., bac2);
7568  h_sum0ErrorBperLS8 = fs_->make<TH1F>("h_sum0ErrorBperLS8", " ", bac, 1., bac2);
7569  h_2D0sumErrorBLS8 = fs_->make<TH2F>("h_2D0sumErrorBLS8", " ", neta, -41., 41., nphi, 0., bphi);
7570  h_2DsumErrorBLS8 = fs_->make<TH2F>("h_2DsumErrorBLS8", " ", neta, -41., 41., nphi, 0., bphi);
7571 
7572  //--------------------------------------------------
7573  // for averSIGNALOCCUPANCY :
7574  h_averSIGNALoccupancy_HB = fs_->make<TH1F>("h_averSIGNALoccupancy_HB", " ", bac, 1., bac2);
7575  h_averSIGNALoccupancy_HE = fs_->make<TH1F>("h_averSIGNALoccupancy_HE", " ", bac, 1., bac2);
7576  h_averSIGNALoccupancy_HF = fs_->make<TH1F>("h_averSIGNALoccupancy_HF", " ", bac, 1., bac2);
7577  h_averSIGNALoccupancy_HO = fs_->make<TH1F>("h_averSIGNALoccupancy_HO", " ", bac, 1., bac2);
7578 
7579  // for averSIGNALsumamplitude :
7580  h_averSIGNALsumamplitude_HB = fs_->make<TH1F>("h_averSIGNALsumamplitude_HB", " ", bac, 1., bac2);
7581  h_averSIGNALsumamplitude_HE = fs_->make<TH1F>("h_averSIGNALsumamplitude_HE", " ", bac, 1., bac2);
7582  h_averSIGNALsumamplitude_HF = fs_->make<TH1F>("h_averSIGNALsumamplitude_HF", " ", bac, 1., bac2);
7583  h_averSIGNALsumamplitude_HO = fs_->make<TH1F>("h_averSIGNALsumamplitude_HO", " ", bac, 1., bac2);
7584 
7585  // for averNOSIGNALOCCUPANCY :
7586  h_averNOSIGNALoccupancy_HB = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HB", " ", bac, 1., bac2);
7587  h_averNOSIGNALoccupancy_HE = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HE", " ", bac, 1., bac2);
7588  h_averNOSIGNALoccupancy_HF = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HF", " ", bac, 1., bac2);
7589  h_averNOSIGNALoccupancy_HO = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HO", " ", bac, 1., bac2);
7590 
7591  // for averNOSIGNALsumamplitude :
7592  h_averNOSIGNALsumamplitude_HB = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HB", " ", bac, 1., bac2);
7593  h_averNOSIGNALsumamplitude_HE = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HE", " ", bac, 1., bac2);
7594  h_averNOSIGNALsumamplitude_HF = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HF", " ", bac, 1., bac2);
7595  h_averNOSIGNALsumamplitude_HO = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HO", " ", bac, 1., bac2);
7596 
7597  // for channel SUM over depthes Amplitudes for each sub-detector
7598  h_sumamplitudechannel_HB = fs_->make<TH1F>("h_sumamplitudechannel_HB", " ", 100, 0., 2000.);
7599  h_sumamplitudechannel_HE = fs_->make<TH1F>("h_sumamplitudechannel_HE", " ", 100, 0., 3000.);
7600  h_sumamplitudechannel_HF = fs_->make<TH1F>("h_sumamplitudechannel_HF", " ", 100, 0., 7000.);
7601  h_sumamplitudechannel_HO = fs_->make<TH1F>("h_sumamplitudechannel_HO", " ", 100, 0., 10000.);
7602 
7603  // for event Amplitudes for each sub-detector
7604  h_eventamplitude_HB = fs_->make<TH1F>("h_eventamplitude_HB", " ", 100, 0., 80000.);
7605  h_eventamplitude_HE = fs_->make<TH1F>("h_eventamplitude_HE", " ", 100, 0., 100000.);
7606  h_eventamplitude_HF = fs_->make<TH1F>("h_eventamplitude_HF", " ", 100, 0., 150000.);
7607  h_eventamplitude_HO = fs_->make<TH1F>("h_eventamplitude_HO", " ", 100, 0., 250000.);
7608 
7609  // for event Occupancy for each sub-detector
7610  h_eventoccupancy_HB = fs_->make<TH1F>("h_eventoccupancy_HB", " ", 100, 0., 3000.);
7611  h_eventoccupancy_HE = fs_->make<TH1F>("h_eventoccupancy_HE", " ", 100, 0., 2000.);
7612  h_eventoccupancy_HF = fs_->make<TH1F>("h_eventoccupancy_HF", " ", 100, 0., 1000.);
7613  h_eventoccupancy_HO = fs_->make<TH1F>("h_eventoccupancy_HO", " ", 100, 0., 2500.);
7614 
7615  // for maxxSUMAmplitude
7616  h_maxxSUMAmpl_HB = fs_->make<TH1F>("h_maxxSUMAmpl_HB", " ", bac, 1., bac2);
7617  h_maxxSUMAmpl_HE = fs_->make<TH1F>("h_maxxSUMAmpl_HE", " ", bac, 1., bac2);
7618  h_maxxSUMAmpl_HF = fs_->make<TH1F>("h_maxxSUMAmpl_HF", " ", bac, 1., bac2);
7619  h_maxxSUMAmpl_HO = fs_->make<TH1F>("h_maxxSUMAmpl_HO", " ", bac, 1., bac2);
7620 
7621  // for maxxOCCUP
7622  h_maxxOCCUP_HB = fs_->make<TH1F>("h_maxxOCCUP_HB", " ", bac, 1., bac2);
7623  h_maxxOCCUP_HE = fs_->make<TH1F>("h_maxxOCCUP_HE", " ", bac, 1., bac2);
7624  h_maxxOCCUP_HF = fs_->make<TH1F>("h_maxxOCCUP_HF", " ", bac, 1., bac2);
7625  h_maxxOCCUP_HO = fs_->make<TH1F>("h_maxxOCCUP_HO", " ", bac, 1., bac2);
7626  //--------------------------------------------------
7627  // pedestals
7628  h_pedestal0_HB = fs_->make<TH1F>("h_pedestal0_HB", " ", 100, 0., 10.);
7629  h_pedestal1_HB = fs_->make<TH1F>("h_pedestal1_HB", " ", 100, 0., 10.);
7630  h_pedestal2_HB = fs_->make<TH1F>("h_pedestal2_HB", " ", 100, 0., 10.);
7631  h_pedestal3_HB = fs_->make<TH1F>("h_pedestal3_HB", " ", 100, 0., 10.);
7632  h_pedestalaver4_HB = fs_->make<TH1F>("h_pedestalaver4_HB", " ", 100, 0., 10.);
7633  h_pedestalaver9_HB = fs_->make<TH1F>("h_pedestalaver9_HB", " ", 100, 0., 10.);
7634  h_pedestalw0_HB = fs_->make<TH1F>("h_pedestalw0_HB", " ", 100, 0., 2.5);
7635  h_pedestalw1_HB = fs_->make<TH1F>("h_pedestalw1_HB", " ", 100, 0., 2.5);
7636  h_pedestalw2_HB = fs_->make<TH1F>("h_pedestalw2_HB", " ", 100, 0., 2.5);
7637  h_pedestalw3_HB = fs_->make<TH1F>("h_pedestalw3_HB", " ", 100, 0., 2.5);
7638  h_pedestalwaver4_HB = fs_->make<TH1F>("h_pedestalwaver4_HB", " ", 100, 0., 2.5);
7639  h_pedestalwaver9_HB = fs_->make<TH1F>("h_pedestalwaver9_HB", " ", 100, 0., 2.5);
7640 
7641  h_pedestal0_HE = fs_->make<TH1F>("h_pedestal0_HE", " ", 100, 0., 10.);
7642  h_pedestal1_HE = fs_->make<TH1F>("h_pedestal1_HE", " ", 100, 0., 10.);
7643  h_pedestal2_HE = fs_->make<TH1F>("h_pedestal2_HE", " ", 100, 0., 10.);
7644  h_pedestal3_HE = fs_->make<TH1F>("h_pedestal3_HE", " ", 100, 0., 10.);
7645  h_pedestalaver4_HE = fs_->make<TH1F>("h_pedestalaver4_HE", " ", 100, 0., 10.);
7646  h_pedestalaver9_HE = fs_->make<TH1F>("h_pedestalaver9_HE", " ", 100, 0., 10.);
7647  h_pedestalw0_HE = fs_->make<TH1F>("h_pedestalw0_HE", " ", 100, 0., 2.5);
7648  h_pedestalw1_HE = fs_->make<TH1F>("h_pedestalw1_HE", " ", 100, 0., 2.5);
7649  h_pedestalw2_HE = fs_->make<TH1F>("h_pedestalw2_HE", " ", 100, 0., 2.5);
7650  h_pedestalw3_HE = fs_->make<TH1F>("h_pedestalw3_HE", " ", 100, 0., 2.5);
7651  h_pedestalwaver4_HE = fs_->make<TH1F>("h_pedestalwaver4_HE", " ", 100, 0., 2.5);
7652  h_pedestalwaver9_HE = fs_->make<TH1F>("h_pedestalwaver9_HE", " ", 100, 0., 2.5);
7653 
7654  h_pedestal0_HF = fs_->make<TH1F>("h_pedestal0_HF", " ", 100, 0., 20.);
7655  h_pedestal1_HF = fs_->make<TH1F>("h_pedestal1_HF", " ", 100, 0., 20.);
7656  h_pedestal2_HF = fs_->make<TH1F>("h_pedestal2_HF", " ", 100, 0., 20.);
7657  h_pedestal3_HF = fs_->make<TH1F>("h_pedestal3_HF", " ", 100, 0., 20.);
7658  h_pedestalaver4_HF = fs_->make<TH1F>("h_pedestalaver4_HF", " ", 100, 0., 20.);
7659  h_pedestalaver9_HF = fs_->make<TH1F>("h_pedestalaver9_HF", " ", 100, 0., 20.);
7660  h_pedestalw0_HF = fs_->make<TH1F>("h_pedestalw0_HF", " ", 100, 0., 2.5);
7661  h_pedestalw1_HF = fs_->make<TH1F>("h_pedestalw1_HF", " ", 100, 0., 2.5);
7662  h_pedestalw2_HF = fs_->make<TH1F>("h_pedestalw2_HF", " ", 100, 0., 2.5);
7663  h_pedestalw3_HF = fs_->make<TH1F>("h_pedestalw3_HF", " ", 100, 0., 2.5);
7664  h_pedestalwaver4_HF = fs_->make<TH1F>("h_pedestalwaver4_HF", " ", 100, 0., 2.5);
7665  h_pedestalwaver9_HF = fs_->make<TH1F>("h_pedestalwaver9_HF", " ", 100, 0., 2.5);
7666 
7667  h_pedestal0_HO = fs_->make<TH1F>("h_pedestal0_HO", " ", 100, 0., 20.);
7668  h_pedestal1_HO = fs_->make<TH1F>("h_pedestal1_HO", " ", 100, 0., 20.);
7669  h_pedestal2_HO = fs_->make<TH1F>("h_pedestal2_HO", " ", 100, 0., 20.);
7670  h_pedestal3_HO = fs_->make<TH1F>("h_pedestal3_HO", " ", 100, 0., 20.);
7671  h_pedestalaver4_HO = fs_->make<TH1F>("h_pedestalaver4_HO", " ", 100, 0., 20.);
7672  h_pedestalaver9_HO = fs_->make<TH1F>("h_pedestalaver9_HO", " ", 100, 0., 20.);
7673  h_pedestalw0_HO = fs_->make<TH1F>("h_pedestalw0_HO", " ", 100, 0., 2.5);
7674  h_pedestalw1_HO = fs_->make<TH1F>("h_pedestalw1_HO", " ", 100, 0., 2.5);
7675  h_pedestalw2_HO = fs_->make<TH1F>("h_pedestalw2_HO", " ", 100, 0., 2.5);
7676  h_pedestalw3_HO = fs_->make<TH1F>("h_pedestalw3_HO", " ", 100, 0., 2.5);
7677  h_pedestalwaver4_HO = fs_->make<TH1F>("h_pedestalwaver4_HO", " ", 100, 0., 2.5);
7678  h_pedestalwaver9_HO = fs_->make<TH1F>("h_pedestalwaver9_HO", " ", 100, 0., 2.5);
7679  //--------------------------------------------------
7680  h_mapDepth1pedestalw_HB = fs_->make<TH2F>("h_mapDepth1pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7681  h_mapDepth2pedestalw_HB = fs_->make<TH2F>("h_mapDepth2pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7682  h_mapDepth3pedestalw_HB = fs_->make<TH2F>("h_mapDepth3pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7683  h_mapDepth4pedestalw_HB = fs_->make<TH2F>("h_mapDepth4pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7684  h_mapDepth1pedestalw_HE = fs_->make<TH2F>("h_mapDepth1pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7685  h_mapDepth2pedestalw_HE = fs_->make<TH2F>("h_mapDepth2pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7686  h_mapDepth3pedestalw_HE = fs_->make<TH2F>("h_mapDepth3pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7687  h_mapDepth4pedestalw_HE = fs_->make<TH2F>("h_mapDepth4pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7688  h_mapDepth5pedestalw_HE = fs_->make<TH2F>("h_mapDepth5pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7689  h_mapDepth6pedestalw_HE = fs_->make<TH2F>("h_mapDepth6pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7690  h_mapDepth7pedestalw_HE = fs_->make<TH2F>("h_mapDepth7pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7691  h_mapDepth1pedestalw_HF = fs_->make<TH2F>("h_mapDepth1pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7692  h_mapDepth2pedestalw_HF = fs_->make<TH2F>("h_mapDepth2pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7693  h_mapDepth3pedestalw_HF = fs_->make<TH2F>("h_mapDepth3pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7694  h_mapDepth4pedestalw_HF = fs_->make<TH2F>("h_mapDepth4pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7695  h_mapDepth4pedestalw_HO = fs_->make<TH2F>("h_mapDepth4pedestalw_HO", " ", neta, -41., 41., nphi, 0., bphi);
7696 
7697  h_mapDepth1pedestal_HB = fs_->make<TH2F>("h_mapDepth1pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7698  h_mapDepth2pedestal_HB = fs_->make<TH2F>("h_mapDepth2pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7699  h_mapDepth3pedestal_HB = fs_->make<TH2F>("h_mapDepth3pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7700  h_mapDepth4pedestal_HB = fs_->make<TH2F>("h_mapDepth4pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7701  h_mapDepth1pedestal_HE = fs_->make<TH2F>("h_mapDepth1pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7702  h_mapDepth2pedestal_HE = fs_->make<TH2F>("h_mapDepth2pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7703  h_mapDepth3pedestal_HE = fs_->make<TH2F>("h_mapDepth3pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7704  h_mapDepth4pedestal_HE = fs_->make<TH2F>("h_mapDepth4pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7705  h_mapDepth5pedestal_HE = fs_->make<TH2F>("h_mapDepth5pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7706  h_mapDepth6pedestal_HE = fs_->make<TH2F>("h_mapDepth6pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7707  h_mapDepth7pedestal_HE = fs_->make<TH2F>("h_mapDepth7pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7708  h_mapDepth1pedestal_HF = fs_->make<TH2F>("h_mapDepth1pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7709  h_mapDepth2pedestal_HF = fs_->make<TH2F>("h_mapDepth2pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7710  h_mapDepth3pedestal_HF = fs_->make<TH2F>("h_mapDepth3pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7711  h_mapDepth4pedestal_HF = fs_->make<TH2F>("h_mapDepth4pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7712  h_mapDepth4pedestal_HO = fs_->make<TH2F>("h_mapDepth4pedestal_HO", " ", neta, -41., 41., nphi, 0., bphi);
7713  //--------------------------------------------------
7714  h_pedestal00_HB = fs_->make<TH1F>("h_pedestal00_HB", " ", 100, 0., 10.);
7715  h_gain_HB = fs_->make<TH1F>("h_gain_HB", " ", 100, 0., 1.);
7716  h_respcorr_HB = fs_->make<TH1F>("h_respcorr_HB", " ", 100, 0., 2.5);
7717  h_timecorr_HB = fs_->make<TH1F>("h_timecorr_HB", " ", 100, 0., 30.);
7718  h_lutcorr_HB = fs_->make<TH1F>("h_lutcorr_HB", " ", 100, 0., 10.);
7719  h_difpedestal0_HB = fs_->make<TH1F>("h_difpedestal0_HB", " ", 100, -3., 3.);
7720  h_difpedestal1_HB = fs_->make<TH1F>("h_difpedestal1_HB", " ", 100, -3., 3.);
7721  h_difpedestal2_HB = fs_->make<TH1F>("h_difpedestal2_HB", " ", 100, -3., 3.);
7722  h_difpedestal3_HB = fs_->make<TH1F>("h_difpedestal3_HB", " ", 100, -3., 3.);
7723 
7724  h_pedestal00_HE = fs_->make<TH1F>("h_pedestal00_HE", " ", 100, 0., 10.);
7725  h_gain_HE = fs_->make<TH1F>("h_gain_HE", " ", 100, 0., 1.);
7726  h_respcorr_HE = fs_->make<TH1F>("h_respcorr_HE", " ", 100, 0., 2.5);
7727  h_timecorr_HE = fs_->make<TH1F>("h_timecorr_HE", " ", 100, 0., 30.);
7728  h_lutcorr_HE = fs_->make<TH1F>("h_lutcorr_HE", " ", 100, 0., 10.);
7729 
7730  h_pedestal00_HF = fs_->make<TH1F>("h_pedestal00_HF", " ", 100, 0., 10.);
7731  h_gain_HF = fs_->make<TH1F>("h_gain_HF", " ", 100, 0., 1.);
7732  h_respcorr_HF = fs_->make<TH1F>("h_respcorr_HF", " ", 100, 0., 2.5);
7733  h_timecorr_HF = fs_->make<TH1F>("h_timecorr_HF", " ", 100, 0., 30.);
7734  h_lutcorr_HF = fs_->make<TH1F>("h_lutcorr_HF", " ", 100, 0., 10.);
7735 
7736  h_pedestal00_HO = fs_->make<TH1F>("h_pedestal00_HO", " ", 100, 0., 10.);
7737  h_gain_HO = fs_->make<TH1F>("h_gain_HO", " ", 100, 0., 1.);
7738  h_respcorr_HO = fs_->make<TH1F>("h_respcorr_HO", " ", 100, 0., 2.5);
7739  h_timecorr_HO = fs_->make<TH1F>("h_timecorr_HO", " ", 100, 0., 30.);
7740  h_lutcorr_HO = fs_->make<TH1F>("h_lutcorr_HO", " ", 100, 0., 10.);
7741  //--------------------------------------------------
7742  h2_TSnVsAyear2023_HB = fs_->make<TH2F>("h2_TSnVsAyear2023_HB", " ", 100, 200., 30200., 100, 0., 175.);
7743  h2_TSnVsAyear2023_HE = fs_->make<TH2F>("h2_TSnVsAyear2023_HE", " ", 100, 200., 75200., 100, 0., 175.);
7744  h2_TSnVsAyear2023_HF = fs_->make<TH2F>("h2_TSnVsAyear2023_HF", " ", 100, 0., 2000., 100, 0., 50.);
7745  h2_TSnVsAyear2023_HO = fs_->make<TH2F>("h2_TSnVsAyear2023_HO", " ", 100, 0., 1000., 100, 0., 225.);
7746  //-----------------------------
7747  h1_TSnVsAyear2023_HB = fs_->make<TH1F>("h1_TSnVsAyear2023_HB", " ", 100, 200., 15200);
7748  h1_TSnVsAyear2023_HE = fs_->make<TH1F>("h1_TSnVsAyear2023_HE", " ", 100, 200., 25200);
7749  h1_TSnVsAyear2023_HF = fs_->make<TH1F>("h1_TSnVsAyear2023_HF", " ", 100, 0., 1500);
7750  h1_TSnVsAyear2023_HO = fs_->make<TH1F>("h1_TSnVsAyear2023_HO", " ", 100, 0., 750);
7751  h1_TSnVsAyear20230_HB = fs_->make<TH1F>("h1_TSnVsAyear20230_HB", " ", 100, 200., 15200);
7752  h1_TSnVsAyear20230_HE = fs_->make<TH1F>("h1_TSnVsAyear20230_HE", " ", 100, 200., 25200);
7753  h1_TSnVsAyear20230_HF = fs_->make<TH1F>("h1_TSnVsAyear20230_HF", " ", 100, 0., 1500);
7754  h1_TSnVsAyear20230_HO = fs_->make<TH1F>("h1_TSnVsAyear20230_HO", " ", 100, 0., 750);
7755  //--------------------------------------------------
7756  float est6 = 2500.;
7757  int ist6 = 30;
7758  int ist2 = 60;
7759  h2_pedvsampl_HB = fs_->make<TH2F>("h2_pedvsampl_HB", " ", ist2, 0., 7.0, ist2, 0., est6);
7760  h2_pedwvsampl_HB = fs_->make<TH2F>("h2_pedwvsampl_HB", " ", ist2, 0., 2.5, ist2, 0., est6);
7761  h_pedvsampl_HB = fs_->make<TH1F>("h_pedvsampl_HB", " ", ist6, 0., 7.0);
7762  h_pedwvsampl_HB = fs_->make<TH1F>("h_pedwvsampl_HB", " ", ist6, 0., 2.5);
7763  h_pedvsampl0_HB = fs_->make<TH1F>("h_pedvsampl0_HB", " ", ist6, 0., 7.);
7764  h_pedwvsampl0_HB = fs_->make<TH1F>("h_pedwvsampl0_HB", " ", ist6, 0., 2.5);
7765  h2_amplvsped_HB = fs_->make<TH2F>("h2_amplvsped_HB", " ", ist2, 0., est6, ist2, 0., 7.0);
7766  h2_amplvspedw_HB = fs_->make<TH2F>("h2_amplvspedw_HB", " ", ist2, 0., est6, ist2, 0., 2.5);
7767  h_amplvsped_HB = fs_->make<TH1F>("h_amplvsped_HB", " ", ist6, 0., est6);
7768  h_amplvspedw_HB = fs_->make<TH1F>("h_amplvspedw_HB", " ", ist6, 0., est6);
7769  h_amplvsped0_HB = fs_->make<TH1F>("h_amplvsped0_HB", " ", ist6, 0., est6);
7770 
7771  h2_pedvsampl_HE = fs_->make<TH2F>("h2_pedvsampl_HE", " ", ist2, 0., 7.0, ist2, 0., est6);
7772  h2_pedwvsampl_HE = fs_->make<TH2F>("h2_pedwvsampl_HE", " ", ist2, 0., 2.5, ist2, 0., est6);
7773  h_pedvsampl_HE = fs_->make<TH1F>("h_pedvsampl_HE", " ", ist6, 0., 7.0);
7774  h_pedwvsampl_HE = fs_->make<TH1F>("h_pedwvsampl_HE", " ", ist6, 0., 2.5);
7775  h_pedvsampl0_HE = fs_->make<TH1F>("h_pedvsampl0_HE", " ", ist6, 0., 7.);
7776  h_pedwvsampl0_HE = fs_->make<TH1F>("h_pedwvsampl0_HE", " ", ist6, 0., 2.5);
7777 
7778  h2_pedvsampl_HF = fs_->make<TH2F>("h2_pedvsampl_HF", " ", ist2, 0., 20.0, ist2, 0., est6);
7779  h2_pedwvsampl_HF = fs_->make<TH2F>("h2_pedwvsampl_HF", " ", ist2, 0., 2.0, ist2, 0., est6);
7780  h_pedvsampl_HF = fs_->make<TH1F>("h_pedvsampl_HF", " ", ist6, 0., 20.0);
7781  h_pedwvsampl_HF = fs_->make<TH1F>("h_pedwvsampl_HF", " ", ist6, 0., 2.0);
7782  h_pedvsampl0_HF = fs_->make<TH1F>("h_pedvsampl0_HF", " ", ist6, 0., 20.);
7783  h_pedwvsampl0_HF = fs_->make<TH1F>("h_pedwvsampl0_HF", " ", ist6, 0., 2.0);
7784 
7785  h2_pedvsampl_HO = fs_->make<TH2F>("h2_pedvsampl_HO", " ", ist2, 0., 20.0, ist2, 0., est6);
7786  h2_pedwvsampl_HO = fs_->make<TH2F>("h2_pedwvsampl_HO", " ", ist2, 0., 2.5, ist2, 0., est6);
7787  h_pedvsampl_HO = fs_->make<TH1F>("h_pedvsampl_HO", " ", ist6, 0., 20.0);
7788  h_pedwvsampl_HO = fs_->make<TH1F>("h_pedwvsampl_HO", " ", ist6, 0., 2.5);
7789  h_pedvsampl0_HO = fs_->make<TH1F>("h_pedvsampl0_HO", " ", ist6, 0., 20.);
7790  h_pedwvsampl0_HO = fs_->make<TH1F>("h_pedwvsampl0_HO", " ", ist6, 0., 2.5);
7791  //--------------------------------------------------
7792  h_mapDepth1Ped0_HB = fs_->make<TH2F>("h_mapDepth1Ped0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7793  h_mapDepth1Ped1_HB = fs_->make<TH2F>("h_mapDepth1Ped1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7794  h_mapDepth1Ped2_HB = fs_->make<TH2F>("h_mapDepth1Ped2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7795  h_mapDepth1Ped3_HB = fs_->make<TH2F>("h_mapDepth1Ped3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7796  h_mapDepth1Pedw0_HB = fs_->make<TH2F>("h_mapDepth1Pedw0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7797  h_mapDepth1Pedw1_HB = fs_->make<TH2F>("h_mapDepth1Pedw1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7798  h_mapDepth1Pedw2_HB = fs_->make<TH2F>("h_mapDepth1Pedw2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7799  h_mapDepth1Pedw3_HB = fs_->make<TH2F>("h_mapDepth1Pedw3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7800  h_mapDepth2Ped0_HB = fs_->make<TH2F>("h_mapDepth2Ped0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7801  h_mapDepth2Ped1_HB = fs_->make<TH2F>("h_mapDepth2Ped1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7802  h_mapDepth2Ped2_HB = fs_->make<TH2F>("h_mapDepth2Ped2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7803  h_mapDepth2Ped3_HB = fs_->make<TH2F>("h_mapDepth2Ped3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7804  h_mapDepth2Pedw0_HB = fs_->make<TH2F>("h_mapDepth2Pedw0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7805  h_mapDepth2Pedw1_HB = fs_->make<TH2F>("h_mapDepth2Pedw1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7806  h_mapDepth2Pedw2_HB = fs_->make<TH2F>("h_mapDepth2Pedw2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7807  h_mapDepth2Pedw3_HB = fs_->make<TH2F>("h_mapDepth2Pedw3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7808 
7809  h_mapDepth1Ped0_HE = fs_->make<TH2F>("h_mapDepth1Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7810  h_mapDepth1Ped1_HE = fs_->make<TH2F>("h_mapDepth1Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7811  h_mapDepth1Ped2_HE = fs_->make<TH2F>("h_mapDepth1Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7812  h_mapDepth1Ped3_HE = fs_->make<TH2F>("h_mapDepth1Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7813  h_mapDepth1Pedw0_HE = fs_->make<TH2F>("h_mapDepth1Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7814  h_mapDepth1Pedw1_HE = fs_->make<TH2F>("h_mapDepth1Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7815  h_mapDepth1Pedw2_HE = fs_->make<TH2F>("h_mapDepth1Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7816  h_mapDepth1Pedw3_HE = fs_->make<TH2F>("h_mapDepth1Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7817  h_mapDepth2Ped0_HE = fs_->make<TH2F>("h_mapDepth2Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7818  h_mapDepth2Ped1_HE = fs_->make<TH2F>("h_mapDepth2Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7819  h_mapDepth2Ped2_HE = fs_->make<TH2F>("h_mapDepth2Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7820  h_mapDepth2Ped3_HE = fs_->make<TH2F>("h_mapDepth2Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7821  h_mapDepth2Pedw0_HE = fs_->make<TH2F>("h_mapDepth2Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7822  h_mapDepth2Pedw1_HE = fs_->make<TH2F>("h_mapDepth2Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7823  h_mapDepth2Pedw2_HE = fs_->make<TH2F>("h_mapDepth2Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7824  h_mapDepth2Pedw3_HE = fs_->make<TH2F>("h_mapDepth2Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7825  h_mapDepth3Ped0_HE = fs_->make<TH2F>("h_mapDepth3Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7826  h_mapDepth3Ped1_HE = fs_->make<TH2F>("h_mapDepth3Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7827  h_mapDepth3Ped2_HE = fs_->make<TH2F>("h_mapDepth3Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7828  h_mapDepth3Ped3_HE = fs_->make<TH2F>("h_mapDepth3Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7829  h_mapDepth3Pedw0_HE = fs_->make<TH2F>("h_mapDepth3Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7830  h_mapDepth3Pedw1_HE = fs_->make<TH2F>("h_mapDepth3Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7831  h_mapDepth3Pedw2_HE = fs_->make<TH2F>("h_mapDepth3Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7832  h_mapDepth3Pedw3_HE = fs_->make<TH2F>("h_mapDepth3Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7833 
7834  h_mapDepth1Ped0_HF = fs_->make<TH2F>("h_mapDepth1Ped0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7835  h_mapDepth1Ped1_HF = fs_->make<TH2F>("h_mapDepth1Ped1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7836  h_mapDepth1Ped2_HF = fs_->make<TH2F>("h_mapDepth1Ped2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7837  h_mapDepth1Ped3_HF = fs_->make<TH2F>("h_mapDepth1Ped3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7838  h_mapDepth1Pedw0_HF = fs_->make<TH2F>("h_mapDepth1Pedw0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7839  h_mapDepth1Pedw1_HF = fs_->make<TH2F>("h_mapDepth1Pedw1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7840  h_mapDepth1Pedw2_HF = fs_->make<TH2F>("h_mapDepth1Pedw2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7841  h_mapDepth1Pedw3_HF = fs_->make<TH2F>("h_mapDepth1Pedw3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7842  h_mapDepth2Ped0_HF = fs_->make<TH2F>("h_mapDepth2Ped0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7843  h_mapDepth2Ped1_HF = fs_->make<TH2F>("h_mapDepth2Ped1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7844  h_mapDepth2Ped2_HF = fs_->make<TH2F>("h_mapDepth2Ped2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7845  h_mapDepth2Ped3_HF = fs_->make<TH2F>("h_mapDepth2Ped3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7846  h_mapDepth2Pedw0_HF = fs_->make<TH2F>("h_mapDepth2Pedw0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7847  h_mapDepth2Pedw1_HF = fs_->make<TH2F>("h_mapDepth2Pedw1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7848  h_mapDepth2Pedw2_HF = fs_->make<TH2F>("h_mapDepth2Pedw2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7849  h_mapDepth2Pedw3_HF = fs_->make<TH2F>("h_mapDepth2Pedw3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7850 
7851  h_mapDepth4Ped0_HO = fs_->make<TH2F>("h_mapDepth4Ped0_HO", " ", neta, -41., 41., nphi, 0., bphi);
7852  h_mapDepth4Ped1_HO = fs_->make<TH2F>("h_mapDepth4Ped1_HO", " ", neta, -41., 41., nphi, 0., bphi);
7853  h_mapDepth4Ped2_HO = fs_->make<TH2F>("h_mapDepth4Ped2_HO", " ", neta, -41., 41., nphi, 0., bphi);
7854  h_mapDepth4Ped3_HO = fs_->make<TH2F>("h_mapDepth4Ped3_HO", " ", neta, -41., 41., nphi, 0., bphi);
7855  h_mapDepth4Pedw0_HO = fs_->make<TH2F>("h_mapDepth4Pedw0_HO", " ", neta, -41., 41., nphi, 0., bphi);
7856  h_mapDepth4Pedw1_HO = fs_->make<TH2F>("h_mapDepth4Pedw1_HO", " ", neta, -41., 41., nphi, 0., bphi);
7857  h_mapDepth4Pedw2_HO = fs_->make<TH2F>("h_mapDepth4Pedw2_HO", " ", neta, -41., 41., nphi, 0., bphi);
7858  h_mapDepth4Pedw3_HO = fs_->make<TH2F>("h_mapDepth4Pedw3_HO", " ", neta, -41., 41., nphi, 0., bphi);
7859  //--------------------------------------------------
7860  h_mapDepth1ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7861  h_mapDepth2ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7862  h_mapDepth3ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7863  h_mapDepth4ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7864  h_mapDepth1ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7865  h_mapDepth2ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7866  h_mapDepth3ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7867  h_mapDepth4ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7868  h_mapDepth5ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7869  h_mapDepth6ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7870  h_mapDepth7ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7871  h_mapDepth1ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
7872  h_mapDepth2ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
7873  h_mapDepth3ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
7874 
7875  h_mapDepth1ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7876  h_mapDepth2ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7877  h_mapDepth3ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7878  h_mapDepth4ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7879 
7880  h_mapDepth4ADCAmpl12_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HO", " ", neta, -41., 41., nphi, 0., bphi);
7881 
7882  h_mapDepth1linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth1linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7883  h_mapDepth2linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth2linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7884  h_mapDepth3linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth3linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7885  //--------------------------------------------------
7887  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7889  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7891  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7893  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7895  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7897  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7899  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HO", " ", neta, -41., 41., nphi, 0., bphi);
7901  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HO", " ", neta, -41., 41., nphi, 0., bphi);
7902  //--------------------------------------------------
7903  h_shape_Ahigh_HB0 = fs_->make<TH1F>("h_shape_Ahigh_HB0", " ", 10, 0., 10.);
7904  h_shape0_Ahigh_HB0 = fs_->make<TH1F>("h_shape0_Ahigh_HB0", " ", 10, 0., 10.);
7905  h_shape_Alow_HB0 = fs_->make<TH1F>("h_shape_Alow_HB0", " ", 10, 0., 10.);
7906  h_shape0_Alow_HB0 = fs_->make<TH1F>("h_shape0_Alow_HB0", " ", 10, 0., 10.);
7907  h_shape_Ahigh_HB1 = fs_->make<TH1F>("h_shape_Ahigh_HB1", " ", 10, 0., 10.);
7908  h_shape0_Ahigh_HB1 = fs_->make<TH1F>("h_shape0_Ahigh_HB1", " ", 10, 0., 10.);
7909  h_shape_Alow_HB1 = fs_->make<TH1F>("h_shape_Alow_HB1", " ", 10, 0., 10.);
7910  h_shape0_Alow_HB1 = fs_->make<TH1F>("h_shape0_Alow_HB1", " ", 10, 0., 10.);
7911  h_shape_Ahigh_HB2 = fs_->make<TH1F>("h_shape_Ahigh_HB2", " ", 10, 0., 10.);
7912  h_shape0_Ahigh_HB2 = fs_->make<TH1F>("h_shape0_Ahigh_HB2", " ", 10, 0., 10.);
7913  h_shape_Alow_HB2 = fs_->make<TH1F>("h_shape_Alow_HB2", " ", 10, 0., 10.);
7914  h_shape0_Alow_HB2 = fs_->make<TH1F>("h_shape0_Alow_HB2", " ", 10, 0., 10.);
7915  h_shape_Ahigh_HB3 = fs_->make<TH1F>("h_shape_Ahigh_HB3", " ", 10, 0., 10.);
7916  h_shape0_Ahigh_HB3 = fs_->make<TH1F>("h_shape0_Ahigh_HB3", " ", 10, 0., 10.);
7917  h_shape_Alow_HB3 = fs_->make<TH1F>("h_shape_Alow_HB3", " ", 10, 0., 10.);
7918  h_shape0_Alow_HB3 = fs_->make<TH1F>("h_shape0_Alow_HB3", " ", 10, 0., 10.);
7919  //--------------------------------------------------
7920  h_shape_bad_channels_HB = fs_->make<TH1F>("h_shape_bad_channels_HB", " ", 10, 0., 10.);
7921  h_shape0_bad_channels_HB = fs_->make<TH1F>("h_shape0_bad_channels_HB", " ", 10, 0., 10.);
7922  h_shape_good_channels_HB = fs_->make<TH1F>("h_shape_good_channels_HB", " ", 10, 0., 10.);
7923  h_shape0_good_channels_HB = fs_->make<TH1F>("h_shape0_good_channels_HB", " ", 10, 0., 10.);
7924  h_shape_bad_channels_HE = fs_->make<TH1F>("h_shape_bad_channels_HE", " ", 10, 0., 10.);
7925  h_shape0_bad_channels_HE = fs_->make<TH1F>("h_shape0_bad_channels_HE", " ", 10, 0., 10.);
7926  h_shape_good_channels_HE = fs_->make<TH1F>("h_shape_good_channels_HE", " ", 10, 0., 10.);
7927  h_shape0_good_channels_HE = fs_->make<TH1F>("h_shape0_good_channels_HE", " ", 10, 0., 10.);
7928  h_shape_bad_channels_HF = fs_->make<TH1F>("h_shape_bad_channels_HF", " ", 10, 0., 10.);
7929  h_shape0_bad_channels_HF = fs_->make<TH1F>("h_shape0_bad_channels_HF", " ", 10, 0., 10.);
7930  h_shape_good_channels_HF = fs_->make<TH1F>("h_shape_good_channels_HF", " ", 10, 0., 10.);
7931  h_shape0_good_channels_HF = fs_->make<TH1F>("h_shape0_good_channels_HF", " ", 10, 0., 10.);
7932  h_shape_bad_channels_HO = fs_->make<TH1F>("h_shape_bad_channels_HO", " ", 10, 0., 10.);
7933  h_shape0_bad_channels_HO = fs_->make<TH1F>("h_shape0_bad_channels_HO", " ", 10, 0., 10.);
7934  h_shape_good_channels_HO = fs_->make<TH1F>("h_shape_good_channels_HO", " ", 10, 0., 10.);
7935  h_shape0_good_channels_HO = fs_->make<TH1F>("h_shape0_good_channels_HO", " ", 10, 0., 10.);
7936  //--------------------------------------------------
7937  // if(flagcpuoptimization_== 0 ) {
7938 
7939  int spl = 1000;
7940  float spls = 5000;
7941  h_sumamplitude_depth1_HB = fs_->make<TH1F>("h_sumamplitude_depth1_HB", " ", spl, 0., spls);
7942  h_sumamplitude_depth2_HB = fs_->make<TH1F>("h_sumamplitude_depth2_HB", " ", spl, 0., spls);
7943  h_sumamplitude_depth1_HE = fs_->make<TH1F>("h_sumamplitude_depth1_HE", " ", spl, 0., spls);
7944  h_sumamplitude_depth2_HE = fs_->make<TH1F>("h_sumamplitude_depth2_HE", " ", spl, 0., spls);
7945  h_sumamplitude_depth3_HE = fs_->make<TH1F>("h_sumamplitude_depth3_HE", " ", spl, 0., spls);
7946  h_sumamplitude_depth1_HF = fs_->make<TH1F>("h_sumamplitude_depth1_HF", " ", spl, 0., spls);
7947  h_sumamplitude_depth2_HF = fs_->make<TH1F>("h_sumamplitude_depth2_HF", " ", spl, 0., spls);
7948  h_sumamplitude_depth4_HO = fs_->make<TH1F>("h_sumamplitude_depth4_HO", " ", spl, 0., spls);
7949  int spl0 = 1000;
7950  float spls0 = 10000;
7951  h_sumamplitude_depth1_HB0 = fs_->make<TH1F>("h_sumamplitude_depth1_HB0", " ", spl0, 0., spls0);
7952  h_sumamplitude_depth2_HB0 = fs_->make<TH1F>("h_sumamplitude_depth2_HB0", " ", spl0, 0., spls0);
7953  h_sumamplitude_depth1_HE0 = fs_->make<TH1F>("h_sumamplitude_depth1_HE0", " ", spl0, 0., spls0);
7954  h_sumamplitude_depth2_HE0 = fs_->make<TH1F>("h_sumamplitude_depth2_HE0", " ", spl0, 0., spls0);
7955  h_sumamplitude_depth3_HE0 = fs_->make<TH1F>("h_sumamplitude_depth3_HE0", " ", spl0, 0., spls0);
7956  h_sumamplitude_depth1_HF0 = fs_->make<TH1F>("h_sumamplitude_depth1_HF0", " ", spl0, 0., spls0);
7957  h_sumamplitude_depth2_HF0 = fs_->make<TH1F>("h_sumamplitude_depth2_HF0", " ", spl0, 0., spls0);
7958  h_sumamplitude_depth4_HO0 = fs_->make<TH1F>("h_sumamplitude_depth4_HO0", " ", spl0, 0., spls0);
7959  int spl1 = 1000;
7960  float spls1 = 100000;
7961  h_sumamplitude_depth1_HB1 = fs_->make<TH1F>("h_sumamplitude_depth1_HB1", " ", spl1, 0., spls1);
7962  h_sumamplitude_depth2_HB1 = fs_->make<TH1F>("h_sumamplitude_depth2_HB1", " ", spl1, 0., spls1);
7963  h_sumamplitude_depth1_HE1 = fs_->make<TH1F>("h_sumamplitude_depth1_HE1", " ", spl1, 0., spls1);
7964  h_sumamplitude_depth2_HE1 = fs_->make<TH1F>("h_sumamplitude_depth2_HE1", " ", spl1, 0., spls1);
7965  h_sumamplitude_depth3_HE1 = fs_->make<TH1F>("h_sumamplitude_depth3_HE1", " ", spl1, 0., spls1);
7966  h_sumamplitude_depth1_HF1 = fs_->make<TH1F>("h_sumamplitude_depth1_HF1", " ", spl1, 0., spls1);
7967  h_sumamplitude_depth2_HF1 = fs_->make<TH1F>("h_sumamplitude_depth2_HF1", " ", spl1, 0., spls1);
7968  h_sumamplitude_depth4_HO1 = fs_->make<TH1F>("h_sumamplitude_depth4_HO1", " ", spl1, 0., spls1);
7969 
7970  h_Amplitude_forCapIdErrors_HB1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HB1", " ", 100, 0., 30000.);
7971  h_Amplitude_forCapIdErrors_HB2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HB2", " ", 100, 0., 30000.);
7972  h_Amplitude_forCapIdErrors_HE1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE1", " ", 100, 0., 30000.);
7973  h_Amplitude_forCapIdErrors_HE2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE2", " ", 100, 0., 30000.);
7974  h_Amplitude_forCapIdErrors_HE3 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE3", " ", 100, 0., 30000.);
7975  h_Amplitude_forCapIdErrors_HF1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HF1", " ", 100, 0., 30000.);
7976  h_Amplitude_forCapIdErrors_HF2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HF2", " ", 100, 0., 30000.);
7977  h_Amplitude_forCapIdErrors_HO4 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HO4", " ", 100, 0., 30000.);
7978 
7979  h_Amplitude_notCapIdErrors_HB1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HB1", " ", 100, 0., 30000.);
7980  h_Amplitude_notCapIdErrors_HB2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HB2", " ", 100, 0., 30000.);
7981  h_Amplitude_notCapIdErrors_HE1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE1", " ", 100, 0., 30000.);
7982  h_Amplitude_notCapIdErrors_HE2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE2", " ", 100, 0., 30000.);
7983  h_Amplitude_notCapIdErrors_HE3 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE3", " ", 100, 0., 30000.);
7984  h_Amplitude_notCapIdErrors_HF1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HF1", " ", 100, 0., 30000.);
7985  h_Amplitude_notCapIdErrors_HF2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HF2", " ", 100, 0., 30000.);
7986  h_Amplitude_notCapIdErrors_HO4 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HO4", " ", 100, 0., 30000.);
7987 
7988  h_2DAtaildepth1_HB = fs_->make<TH2F>("h_2DAtaildepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7989  h_2D0Ataildepth1_HB = fs_->make<TH2F>("h_2D0Ataildepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7990  h_2DAtaildepth2_HB = fs_->make<TH2F>("h_2DAtaildepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7991  h_2D0Ataildepth2_HB = fs_->make<TH2F>("h_2D0Ataildepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7992 
7994  } //if(recordHistoes_
7995  if (verbosity > 0)
7996  std::cout << "======================== booking DONE +++++++++++++++++++++++++++" << std::endl;
7998  if (recordNtuples_) {
7999  myTree = fs_->make<TTree>("Hcal", "Hcal Tree");
8000  myTree->Branch("Nevent", &Nevent, "Nevent/I");
8001  myTree->Branch("Run", &Run, "Run/I");
8002 
8003  } //if(recordNtuples_
8004  if (verbosity > 0)
8005  std::cout << "======================== beignJob finish +++++++++++++++++++++++++++" << std::endl;
8007 }
8008 
8011 // ------------ method called for each event ------------
8013  CaloSamples toolOriginal; // TS
8014  // double tool[100];
8015  if (verbosity < 0)
8016  std::cout << "************** in loop over Digis counter = " << nnnnnnhbhe << std::endl;
8017  HcalDetId cell(digiItr->id());
8018  int mdepth = cell.depth();
8019  int iphi = cell.iphi() - 1;
8020  int ieta = cell.ieta();
8021  if (ieta > 0)
8022  ieta -= 1;
8023  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8024  // !!!!!!
8025  int errorGeneral = 0;
8026  int error1 = 0;
8027  int error2 = 0;
8028  int error3 = 0;
8029  int error4 = 0;
8030  int error5 = 0;
8031  int error6 = 0;
8032  int error7 = 0;
8033  // !!!!!!
8034  bool anycapid = true;
8035  bool anyer = false;
8036  bool anydv = true;
8037  // for help:
8038  int firstcapid = 0;
8039  int lastcapid = 0, capid = 0;
8040  int ERRORfiber = -10;
8041  int ERRORfiberChan = -10;
8042  int ERRORfiberAndChan = -10;
8043  int repetedcapid = 0;
8044  int TSsize = 10;
8045  TSsize = digiItr->size();
8046 
8048  for (int ii = 0; ii < TSsize; ii++) {
8049  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8050  bool er = (*digiItr)[ii].er(); // error
8051  bool dv = (*digiItr)[ii].dv(); // valid data
8052  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8053  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8054  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8055  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8056  anycapid = false;
8057  ERRORfiber = fiber;
8058  ERRORfiberChan = fiberChan;
8059  ERRORfiberAndChan = fiberAndChan;
8060  if (capid != lastcapid) {
8061  } else {
8062  repetedcapid = 1;
8063  }
8064  }
8065  lastcapid = capid;
8066 
8067  if (ii == 0)
8068  firstcapid = capid;
8069 
8070  if (er) {
8071  anyer = true;
8072  ERRORfiber = fiber;
8073  ERRORfiberChan = fiberChan;
8074  ERRORfiberAndChan = fiberAndChan;
8075  }
8076  if (!dv) {
8077  anydv = false;
8078  ERRORfiber = fiber;
8079  ERRORfiberChan = fiberChan;
8080  ERRORfiberAndChan = fiberAndChan;
8081  }
8082 
8083  } // for
8084 
8086  if (firstcapid == 0 && !anycapid)
8087  errorGeneral = 1;
8088  if (firstcapid == 1 && !anycapid)
8089  errorGeneral = 2;
8090  if (firstcapid == 2 && !anycapid)
8091  errorGeneral = 3;
8092  if (firstcapid == 3 && !anycapid)
8093  errorGeneral = 4;
8094  if (!anycapid)
8095  error1 = 1;
8096  if (anyer)
8097  error2 = 1;
8098  if (!anydv)
8099  error3 = 1;
8100 
8101  if (!anycapid && anyer)
8102  error4 = 1;
8103  if (!anycapid && !anydv)
8104  error5 = 1;
8105  if (!anycapid && anyer && !anydv)
8106  error6 = 1;
8107  if (anyer && !anydv)
8108  error7 = 1;
8110  // Energy:
8111 
8112  double ampl = 0.;
8113  for (int ii = 0; ii < TSsize; ii++) {
8114  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8115  ampl += ampldefault; // fC
8116  }
8117 
8119  // Digis:
8120  // HB
8121  if (sub == 1) {
8122  h_errorGeneral_HB->Fill(double(errorGeneral), 1.);
8123  h_error1_HB->Fill(double(error1), 1.);
8124  h_error2_HB->Fill(double(error2), 1.);
8125  h_error3_HB->Fill(double(error3), 1.);
8126  h_error4_HB->Fill(double(error4), 1.);
8127  h_error5_HB->Fill(double(error5), 1.);
8128  h_error6_HB->Fill(double(error6), 1.);
8129  h_error7_HB->Fill(double(error7), 1.);
8130  h_repetedcapid_HB->Fill(double(repetedcapid), 1.);
8131 
8132  if (error1 != 0 || error2 != 0 || error3 != 0) {
8134  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8135  h_amplError_HB->Fill(ampl, 1.);
8136  if (mdepth == 1)
8137  h_mapDepth1Error_HB->Fill(double(ieta), double(iphi));
8138  if (mdepth == 2)
8139  h_mapDepth2Error_HB->Fill(double(ieta), double(iphi));
8140  h_fiber0_HB->Fill(double(ERRORfiber), 1.);
8141  h_fiber1_HB->Fill(double(ERRORfiberChan), 1.);
8142  h_fiber2_HB->Fill(double(ERRORfiberAndChan), 1.);
8143  } else {
8144  h_amplFine_HB->Fill(ampl, 1.);
8145  }
8146  }
8147  // HE
8148  if (sub == 2) {
8149  h_errorGeneral_HE->Fill(double(errorGeneral), 1.);
8150  h_error1_HE->Fill(double(error1), 1.);
8151  h_error2_HE->Fill(double(error2), 1.);
8152  h_error3_HE->Fill(double(error3), 1.);
8153  h_error4_HE->Fill(double(error4), 1.);
8154  h_error5_HE->Fill(double(error5), 1.);
8155  h_error6_HE->Fill(double(error6), 1.);
8156  h_error7_HE->Fill(double(error7), 1.);
8157  h_repetedcapid_HE->Fill(double(repetedcapid), 1.);
8158 
8159  if (error1 != 0 || error2 != 0 || error3 != 0) {
8161  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8162  h_amplError_HE->Fill(ampl, 1.);
8163  if (mdepth == 1)
8164  h_mapDepth1Error_HE->Fill(double(ieta), double(iphi));
8165  if (mdepth == 2)
8166  h_mapDepth2Error_HE->Fill(double(ieta), double(iphi));
8167  if (mdepth == 3)
8168  h_mapDepth3Error_HE->Fill(double(ieta), double(iphi));
8169  h_fiber0_HE->Fill(double(ERRORfiber), 1.);
8170  h_fiber1_HE->Fill(double(ERRORfiberChan), 1.);
8171  h_fiber2_HE->Fill(double(ERRORfiberAndChan), 1.);
8172  } else {
8173  h_amplFine_HE->Fill(ampl, 1.);
8174  }
8175  }
8176  // ha2->Fill(double(ieta), double(iphi));
8177 } //fillDigiErrors
8180 // ------------ method called for each event ------------
8182  CaloSamples toolOriginal; // TS
8183  // double tool[100];
8184  DetId detid = qie11df.detid();
8185  HcalDetId hcaldetid = HcalDetId(detid);
8186  int ieta = hcaldetid.ieta();
8187  if (ieta > 0)
8188  ieta -= 1;
8189  int iphi = hcaldetid.iphi() - 1;
8190  int mdepth = hcaldetid.depth();
8191  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8192  // !!!!!!
8193  int error1 = 0;
8194  // !!!!!!
8195  bool anycapid = true;
8196  // bool anyer = false;
8197  // bool anydv = true;
8198  // for help:
8199  int firstcapid = 0;
8200  int lastcapid = 0, capid = 0;
8201  int repetedcapid = 0;
8202  // loop over the samples in the digi
8203  nTS = qie11df.samples();
8205  for (int ii = 0; ii < nTS; ii++) {
8206  capid = qie11df[ii].capid(); // capId (0-3, sequential)
8207  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8208  anycapid = false;
8209  if (capid != lastcapid) {
8210  } else {
8211  repetedcapid = 1;
8212  }
8213  }
8214  lastcapid = capid;
8215  if (ii == 0)
8216  firstcapid = capid;
8217  } // for
8219  if (!anycapid)
8220  error1 = 1;
8221  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8222  double ampl = 0.;
8223  for (int ii = 0; ii < nTS; ii++) {
8224  int adc = qie11df[ii].adc();
8225 
8226  double ampldefault = adc2fC_QIE11_shunt6[adc];
8227  if (flaguseshunt_ == 1)
8228  ampldefault = adc2fC_QIE11_shunt1[adc];
8229 
8230  ampl += ampldefault; //
8231  }
8233  // Digis:HBHE
8234  if (sub == 1) {
8235  h_error1_HB->Fill(double(error1), 1.);
8236  h_repetedcapid_HB->Fill(double(repetedcapid), 1.);
8237  if (error1 != 0) {
8238  // if(error1 !=0 || error2 !=0 || error3 !=0 ) {
8240  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8241  h_amplError_HB->Fill(ampl, 1.);
8242  if (mdepth == 1)
8243  h_mapDepth1Error_HB->Fill(double(ieta), double(iphi));
8244  if (mdepth == 2)
8245  h_mapDepth2Error_HB->Fill(double(ieta), double(iphi));
8246  if (mdepth == 3)
8247  h_mapDepth3Error_HB->Fill(double(ieta), double(iphi));
8248  if (mdepth == 4)
8249  h_mapDepth4Error_HB->Fill(double(ieta), double(iphi));
8250  h_errorGeneral_HB->Fill(double(firstcapid), 1.);
8251  } else {
8252  h_amplFine_HB->Fill(ampl, 1.);
8253  }
8254  }
8255  if (sub == 2) {
8256  h_error1_HE->Fill(double(error1), 1.);
8257  h_repetedcapid_HE->Fill(double(repetedcapid), 1.);
8258  if (error1 != 0) {
8259  // if(error1 !=0 || error2 !=0 || error3 !=0 ) {
8261  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8262  h_amplError_HE->Fill(ampl, 1.);
8263  if (mdepth == 1)
8264  h_mapDepth1Error_HE->Fill(double(ieta), double(iphi));
8265  if (mdepth == 2)
8266  h_mapDepth2Error_HE->Fill(double(ieta), double(iphi));
8267  if (mdepth == 3)
8268  h_mapDepth3Error_HE->Fill(double(ieta), double(iphi));
8269  if (mdepth == 4)
8270  h_mapDepth4Error_HE->Fill(double(ieta), double(iphi));
8271  if (mdepth == 5)
8272  h_mapDepth5Error_HE->Fill(double(ieta), double(iphi));
8273  if (mdepth == 6)
8274  h_mapDepth6Error_HE->Fill(double(ieta), double(iphi));
8275  if (mdepth == 7)
8276  h_mapDepth7Error_HE->Fill(double(ieta), double(iphi));
8277  h_errorGeneral_HE->Fill(double(firstcapid), 1.);
8278  } else {
8279  h_amplFine_HE->Fill(ampl, 1.);
8280  }
8281  }
8282 } //fillDigiErrorsQIE11
8284 // ------------ method called for each event ------------
8286  CaloSamples toolOriginal; // TS
8287  // double tool[100];
8288  HcalDetId cell(digiItr->id());
8289  int mdepth = cell.depth();
8290  int iphi = cell.iphi() - 1;
8291  int ieta = cell.ieta();
8292  if (ieta > 0)
8293  ieta -= 1;
8294  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8295  if (mdepth > 2)
8296  std::cout << " HF DIGI ?????????????? ERROR mdepth = " << mdepth << std::endl;
8297  // !!!!!!
8298  int errorGeneral = 0;
8299  int error1 = 0;
8300  int error2 = 0;
8301  int error3 = 0;
8302  int error4 = 0;
8303  int error5 = 0;
8304  int error6 = 0;
8305  int error7 = 0;
8306  // !!!!!!
8307  bool anycapid = true;
8308  bool anyer = false;
8309  bool anydv = true;
8310  // for help:
8311  int firstcapid = 0;
8312  int lastcapid = 0, capid = 0;
8313  int ERRORfiber = -10;
8314  int ERRORfiberChan = -10;
8315  int ERRORfiberAndChan = -10;
8316  int repetedcapid = 0;
8317 
8318  int TSsize = 10;
8319  TSsize = digiItr->size();
8321  for (int ii = 0; ii < TSsize; ii++) {
8322  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8323  bool er = (*digiItr)[ii].er(); // error
8324  bool dv = (*digiItr)[ii].dv(); // valid data
8325  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8326  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8327  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8328  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8329  anycapid = false;
8330  ERRORfiber = fiber;
8331  ERRORfiberChan = fiberChan;
8332  ERRORfiberAndChan = fiberAndChan;
8333  if (capid != lastcapid) {
8334  } else {
8335  repetedcapid = 1;
8336  }
8337  }
8338  lastcapid = capid;
8339  if (ii == 0)
8340  firstcapid = capid;
8341  if (er) {
8342  anyer = true;
8343  ERRORfiber = fiber;
8344  ERRORfiberChan = fiberChan;
8345  ERRORfiberAndChan = fiberAndChan;
8346  }
8347  if (!dv) {
8348  anydv = false;
8349  ERRORfiber = fiber;
8350  ERRORfiberChan = fiberChan;
8351  ERRORfiberAndChan = fiberAndChan;
8352  }
8353  } // for
8355  if (firstcapid == 0 && !anycapid)
8356  errorGeneral = 1;
8357  if (firstcapid == 1 && !anycapid)
8358  errorGeneral = 2;
8359  if (firstcapid == 2 && !anycapid)
8360  errorGeneral = 3;
8361  if (firstcapid == 3 && !anycapid)
8362  errorGeneral = 4;
8363  if (!anycapid)
8364  error1 = 1;
8365  if (anyer)
8366  error2 = 1;
8367  if (!anydv)
8368  error3 = 1;
8369  if (!anycapid && anyer)
8370  error4 = 1;
8371  if (!anycapid && !anydv)
8372  error5 = 1;
8373  if (!anycapid && anyer && !anydv)
8374  error6 = 1;
8375  if (anyer && !anydv)
8376  error7 = 1;
8378  double ampl = 0.;
8379  for (int ii = 0; ii < TSsize; ii++) {
8380  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8381  ampl += ampldefault; // fC
8382  }
8384  // Digis: HF
8385  if (sub == 4) {
8386  h_errorGeneral_HF->Fill(double(errorGeneral), 1.);
8387  h_error1_HF->Fill(double(error1), 1.);
8388  h_error2_HF->Fill(double(error2), 1.);
8389  h_error3_HF->Fill(double(error3), 1.);
8390  h_error4_HF->Fill(double(error4), 1.);
8391  h_error5_HF->Fill(double(error5), 1.);
8392  h_error6_HF->Fill(double(error6), 1.);
8393  h_error7_HF->Fill(double(error7), 1.);
8394  h_repetedcapid_HF->Fill(double(repetedcapid), 1.);
8395  if (error1 != 0 || error2 != 0 || error3 != 0) {
8397  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8398  h_amplError_HF->Fill(ampl, 1.);
8399  if (mdepth == 1)
8400  h_mapDepth1Error_HF->Fill(double(ieta), double(iphi));
8401  if (mdepth == 2)
8402  h_mapDepth2Error_HF->Fill(double(ieta), double(iphi));
8403  h_fiber0_HF->Fill(double(ERRORfiber), 1.);
8404  h_fiber1_HF->Fill(double(ERRORfiberChan), 1.);
8405  h_fiber2_HF->Fill(double(ERRORfiberAndChan), 1.);
8406  } else {
8407  h_amplFine_HF->Fill(ampl, 1.);
8408  }
8409  }
8410 }
8415 // ------------ method called for each event ------------
8417  CaloSamples toolOriginal; // TS
8418  // double tool[100];
8419  DetId detid = qie10df.detid();
8420  HcalDetId hcaldetid = HcalDetId(detid);
8421  int ieta = hcaldetid.ieta();
8422  if (ieta > 0)
8423  ieta -= 1;
8424  int iphi = hcaldetid.iphi() - 1;
8425  int mdepth = hcaldetid.depth();
8426  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8427  // !!!!!!
8428  int error1 = 0;
8429  // !!!!!!
8430  bool anycapid = true;
8431  // bool anyer = false;
8432  // bool anydv = true;
8433  // for help:
8434  int firstcapid = 0;
8435  int lastcapid = 0, capid = 0;
8436  int repetedcapid = 0;
8437  // loop over the samples in the digi
8438  nTS = qie10df.samples();
8440  for (int ii = 0; ii < nTS; ii++) {
8441  capid = qie10df[ii].capid(); // capId (0-3, sequential)
8442  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8443  anycapid = false;
8444  if (capid != lastcapid) {
8445  } else {
8446  repetedcapid = 1;
8447  }
8448  }
8449  lastcapid = capid;
8450  if (ii == 0)
8451  firstcapid = capid;
8452  } // for
8454  if (!anycapid)
8455  error1 = 1;
8456  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8457  double ampl = 0.;
8458  for (int ii = 0; ii < nTS; ii++) {
8459  int adc = qie10df[ii].adc();
8460  double ampldefault = adc2fC_QIE10[adc];
8461  ampl += ampldefault; //
8462  }
8464  // Digis:HF
8465  if (sub == 4) {
8466  h_error1_HF->Fill(double(error1), 1.);
8467  h_repetedcapid_HF->Fill(double(repetedcapid), 1.);
8468  if (error1 != 0) {
8469  // if(error1 !=0 || error2 !=0 || error3 !=0 ) {
8471  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8472  h_amplError_HF->Fill(ampl, 1.);
8473  if (mdepth == 1)
8474  h_mapDepth1Error_HF->Fill(double(ieta), double(iphi));
8475  if (mdepth == 2)
8476  h_mapDepth2Error_HF->Fill(double(ieta), double(iphi));
8477  if (mdepth == 3)
8478  h_mapDepth3Error_HF->Fill(double(ieta), double(iphi));
8479  if (mdepth == 4)
8480  h_mapDepth4Error_HF->Fill(double(ieta), double(iphi));
8481  h_errorGeneral_HF->Fill(double(firstcapid), 1.);
8482  } else {
8483  h_amplFine_HF->Fill(ampl, 1.);
8484  }
8485  }
8486 }
8488 // ------------ method called for each event ------------
8490  CaloSamples toolOriginal; // TS
8491  HcalDetId cell(digiItr->id());
8492  int mdepth = cell.depth();
8493  int iphi = cell.iphi() - 1;
8494  int ieta = cell.ieta();
8495  if (ieta > 0)
8496  ieta -= 1;
8497  int sub = cell.subdet(); // 1-HB, 2-HE, 3-HO, 4-HF
8498  int errorGeneral = 0;
8499  int error1 = 0;
8500  int error2 = 0;
8501  int error3 = 0;
8502  int error4 = 0;
8503  int error5 = 0;
8504  int error6 = 0;
8505  int error7 = 0;
8506  // !!!!!!
8507  bool anycapid = true;
8508  bool anyer = false;
8509  bool anydv = true;
8510  // for help:
8511  int firstcapid = 0;
8512  int lastcapid = 0, capid = 0;
8513  int ERRORfiber = -10;
8514  int ERRORfiberChan = -10;
8515  int ERRORfiberAndChan = -10;
8516  int repetedcapid = 0;
8517  for (int ii = 0; ii < (*digiItr).size(); ii++) {
8518  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8519  bool er = (*digiItr)[ii].er(); // error
8520  bool dv = (*digiItr)[ii].dv(); // valid data
8521  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8522  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8523  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8524  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8525  anycapid = false;
8526  ERRORfiber = fiber;
8527  ERRORfiberChan = fiberChan;
8528  ERRORfiberAndChan = fiberAndChan;
8529  if (capid != lastcapid) {
8530  } else {
8531  repetedcapid = 1;
8532  }
8533  }
8534  lastcapid = capid;
8535 
8536  if (ii == 0)
8537  firstcapid = capid;
8538 
8539  if (er) {
8540  anyer = true;
8541  ERRORfiber = fiber;
8542  ERRORfiberChan = fiberChan;
8543  ERRORfiberAndChan = fiberAndChan;
8544  }
8545  if (!dv) {
8546  anydv = false;
8547  ERRORfiber = fiber;
8548  ERRORfiberChan = fiberChan;
8549  ERRORfiberAndChan = fiberAndChan;
8550  }
8551 
8552  } // for
8553 
8555  if (firstcapid == 0 && !anycapid)
8556  errorGeneral = 1;
8557  if (firstcapid == 1 && !anycapid)
8558  errorGeneral = 2;
8559  if (firstcapid == 2 && !anycapid)
8560  errorGeneral = 3;
8561  if (firstcapid == 3 && !anycapid)
8562  errorGeneral = 4;
8563  if (!anycapid)
8564  error1 = 1;
8565  if (anyer)
8566  error2 = 1;
8567  if (!anydv)
8568  error3 = 1;
8569 
8570  if (!anycapid && anyer)
8571  error4 = 1;
8572  if (!anycapid && !anydv)
8573  error5 = 1;
8574  if (!anycapid && anyer && !anydv)
8575  error6 = 1;
8576  if (anyer && !anydv)
8577  error7 = 1;
8579  // Energy:
8580  double ampl = 0.;
8581  for (int ii = 0; ii < (*digiItr).size(); ii++) {
8582  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8583  ampl += ampldefault; // fC
8584  }
8586  // Digis:
8587  // HO
8588  if (sub == 3) {
8589  h_errorGeneral_HO->Fill(double(errorGeneral), 1.);
8590  h_error1_HO->Fill(double(error1), 1.);
8591  h_error2_HO->Fill(double(error2), 1.);
8592  h_error3_HO->Fill(double(error3), 1.);
8593  h_error4_HO->Fill(double(error4), 1.);
8594  h_error5_HO->Fill(double(error5), 1.);
8595  h_error6_HO->Fill(double(error6), 1.);
8596  h_error7_HO->Fill(double(error7), 1.);
8597  h_repetedcapid_HO->Fill(double(repetedcapid), 1.);
8598 
8599  if (error1 != 0 || error2 != 0 || error3 != 0) {
8601  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8602  h_amplError_HO->Fill(ampl, 1.);
8603  if (mdepth == 4)
8604  h_mapDepth4Error_HO->Fill(double(ieta), double(iphi));
8605  // to be divided by h_mapDepth4_HO
8606 
8607  if (mdepth != 4)
8608  std::cout << " mdepth HO = " << mdepth << std::endl;
8609  h_fiber0_HO->Fill(double(ERRORfiber), 1.);
8610  h_fiber1_HO->Fill(double(ERRORfiberChan), 1.);
8611  h_fiber2_HO->Fill(double(ERRORfiberAndChan), 1.);
8612  } else {
8613  h_amplFine_HO->Fill(ampl, 1.);
8614  }
8615  }
8616 }
8619  CaloSamples toolOriginal; // TS
8620  double tool[100];
8621  double toolwithPedSubtr[100]; // TS
8622  double lintoolwithoutPedSubtr[100]; // TS
8623  HcalDetId cell(digiItr->id());
8624  int mdepth = cell.depth();
8625  int iphi = cell.iphi() - 1; // 0-71
8626  int ieta0 = cell.ieta(); //-41 +41 !=0
8627  int ieta = ieta0;
8628  if (ieta > 0)
8629  ieta -= 1; //-41 +41
8630  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8631  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
8632  const HcalGain* gain = conditions->getGain(cell);
8633  // const HcalGainWidth* gainWidth = conditions->getGainWidth(cell);
8634  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
8635  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
8636  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
8637  // HcalCalibrations calib = conditions->getHcalCalibrations(cell);
8638  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
8639  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
8640  HcalCoderDb coder(*channelCoder, *shape);
8641  if (useADCfC_)
8642  coder.adc2fC(*digiItr, toolOriginal);
8643  double pedestalaver9 = 0.;
8644  double pedestalaver4 = 0.;
8645  double pedestal0 = 0.;
8646  double pedestal1 = 0.;
8647  double pedestal2 = 0.;
8648  double pedestal3 = 0.;
8649  double pedestalwaver9 = 0.;
8650  double pedestalwaver4 = 0.;
8651  double pedestalw0 = 0.;
8652  double pedestalw1 = 0.;
8653  double pedestalw2 = 0.;
8654  double pedestalw3 = 0.;
8655  double difpedestal0 = 0.;
8656  double difpedestal1 = 0.;
8657  double difpedestal2 = 0.;
8658  double difpedestal3 = 0.;
8659 
8660  double amplitude = 0.;
8661  double absamplitude = 0.;
8662  double amplitude345 = 0.;
8663  double ampl = 0.;
8664  double linamplitudewithoutPedSubtr = 0.;
8665  double timew = 0.;
8666  double timeww = 0.;
8667  double max_signal = -100.;
8668  int ts_with_max_signal = -100;
8669  int c0 = 0;
8670  int c1 = 0;
8671  int c2 = 0;
8672  int c3 = 0;
8673  int c4 = 0;
8674  double errorBtype = 0.;
8675 
8676  int TSsize = 10; //HEHB for Run2
8677  TSsize = digiItr->size();
8678  if ((*digiItr).size() != 10)
8679  errorBtype = 1.;
8680  // ii = 0 to 9
8681  for (int ii = 0; ii < TSsize; ii++) {
8682  // for (int ii=0; ii<digiItr->size(); ii++) {
8683  double ampldefaultwithPedSubtr = 0.;
8684  double linampldefaultwithoutPedSubtr = 0.;
8685  double ampldefault = 0.;
8686  double ampldefault0 = 0.;
8687  double ampldefault1 = 0.;
8688  double ampldefault2 = 0.;
8689  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive ADCcounts
8690  if (useADCfC_)
8691  ampldefault1 = toolOriginal[ii]; //adcfC
8692  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts linearized
8693  if (useADCmassive_) {
8694  ampldefault = ampldefault0;
8695  }
8696  if (useADCfC_) {
8697  ampldefault = ampldefault1;
8698  }
8699  if (useADCcounts_) {
8700  ampldefault = ampldefault2;
8701  }
8702  ampldefaultwithPedSubtr = ampldefault0;
8703  linampldefaultwithoutPedSubtr = ampldefault2;
8704 
8705  int capid = ((*digiItr)[ii]).capid();
8706  // double pedestal = calib.pedestal(capid);
8707  double pedestalINI = pedestal00->getValue(capid);
8708  double pedestal = pedestal00->getValue(capid);
8709  double pedestalw = pedw->getSigma(capid, capid);
8710  ampldefaultwithPedSubtr -= pedestal; // pedestal subtraction
8712  ampldefault -= pedestal; // pedestal subtraction
8713  // ampldefault*= calib.respcorrgain(capid) ; // fC --> GeV
8714  tool[ii] = ampldefault;
8715  toolwithPedSubtr[ii] = ampldefaultwithPedSubtr;
8716  lintoolwithoutPedSubtr[ii] = linampldefaultwithoutPedSubtr;
8717 
8718  pedestalaver9 += pedestal;
8719  pedestalwaver9 += pedestalw * pedestalw;
8720 
8721  if (capid == 0 && c0 == 0) {
8722  c0++;
8723  c4++;
8724  pedestalaver4 += pedestal;
8725  pedestal0 = pedestal;
8726  pedestalw0 = pedestalw;
8727  pedestalwaver4 += pedestalw * pedestalw;
8728  difpedestal0 = pedestal - pedestalINI;
8729  }
8730 
8731  if (capid == 1 && c1 == 0) {
8732  c1++;
8733  c4++;
8734  pedestalaver4 += pedestal;
8735  pedestal1 = pedestal;
8736  pedestalw1 = pedestalw;
8737  pedestalwaver4 += pedestalw * pedestalw;
8738  difpedestal1 = pedestal - pedestalINI;
8739  }
8740  if (capid == 2 && c2 == 0) {
8741  c2++;
8742  c4++;
8743  pedestalaver4 += pedestal;
8744  pedestal2 = pedestal;
8745  pedestalw2 = pedestalw;
8746  pedestalwaver4 += pedestalw * pedestalw;
8747  difpedestal2 = pedestal - pedestalINI;
8748  }
8749  if (capid == 3 && c3 == 0) {
8750  c3++;
8751  c4++;
8752  pedestalaver4 += pedestal;
8753  pedestal3 = pedestal;
8754  pedestalw3 = pedestalw;
8755  pedestalwaver4 += pedestalw * pedestalw;
8756  difpedestal3 = pedestal - pedestalINI;
8757  }
8758 
8759  if (max_signal < ampldefault) {
8760  max_signal = ampldefault;
8761  ts_with_max_signal = ii;
8762  }
8764  // TS = 1 to 10: 1 2 3 4 5 6 7 8 9 10
8765  // ii = 0 to 9: 0 1 2 3 4 5 6 7 8 9
8766  // var.1 ----------------------
8767  // var.2 ----------------
8768  // var.3 ----------
8769  // var.4 -------
8770  //
8771  // TS = 2-9 for raddam only var.1
8772  // TS = 3-8 for raddam only var.2
8773  // TS = 4-7 for raddam only var.3
8774  // TS = 4-6 for raddam only var.4
8775  amplitude += ampldefault; //
8776  absamplitude += abs(ampldefault); //
8777 
8778  if (ii == 3 || ii == 4 || ii == 5)
8779  amplitude345 += ampldefault;
8780  if (flagcpuoptimization_ == 0) {
8782  } //flagcpuoptimization
8783  timew += (ii + 1) * abs(ampldefault);
8784  timeww += (ii + 1) * ampldefault;
8785  } //for 1
8787  // sub=1||2 HBHE
8788  if (sub == 1 || sub == 2) {
8789  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HBHE
8790  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HBHE
8791  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HBHE
8792  }
8793  pedestalaver9 /= TSsize;
8794  pedestalaver4 /= c4;
8795  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
8796  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
8797  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
8798  ampl = tool[ts_with_max_signal];
8799  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
8800  ampl += tool[ts_with_max_signal + 2];
8801  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
8802  ampl += tool[ts_with_max_signal + 1];
8803  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
8804  ampl += tool[ts_with_max_signal - 1];
8805 
8807  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
8808  linamplitudewithoutPedSubtr = lintoolwithoutPedSubtr[ts_with_max_signal];
8809  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
8810  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal + 2];
8811  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
8812  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal + 1];
8813  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
8814  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal - 1];
8815 
8816  double ratio = 0.;
8817  if (amplitude != 0.)
8818  ratio = ampl / amplitude;
8819  if (ratio < 0. || ratio > 1.02)
8820  ratio = 0.;
8821  double aveamplitude = 0.;
8822  double aveamplitudew = 0.;
8823  if (absamplitude > 0 && timew > 0)
8824  aveamplitude = timew / absamplitude; // average_TS +1
8825  if (amplitude > 0 && timeww > 0)
8826  aveamplitudew = timeww / amplitude; // average_TS +1
8827  double rmsamp = 0.;
8828  // and CapIdErrors:
8829  int error = 0;
8830  bool anycapid = true;
8831  bool anyer = false;
8832  bool anydv = true;
8833  int lastcapid = 0;
8834  int capid = 0;
8835  for (int ii = 0; ii < TSsize; ii++) {
8836  double aaaaaa = (ii + 1) - aveamplitudew;
8837  double aaaaaa2 = aaaaaa * aaaaaa;
8838  double ampldefault = tool[ii];
8839  rmsamp += (aaaaaa2 * ampldefault); // fC
8840  capid = ((*digiItr)[ii]).capid();
8841  bool er = (*digiItr)[ii].er(); // error
8842  bool dv = (*digiItr)[ii].dv(); // valid data
8843  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8844  anycapid = false;
8845  }
8846  // std::cout << " ii = " << ii << " capid = " << capid << " ((lastcapid+1)%4) = " << ((lastcapid+1)%4) << std::endl;
8847  lastcapid = capid;
8848  if (er) {
8849  anyer = true;
8850  }
8851  if (!dv) {
8852  anydv = false;
8853  }
8854  } //for 2
8855  if (!anycapid || anyer || !anydv)
8856  error = 1;
8857 
8858  double rmsamplitude = 0.;
8859  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
8860  rmsamplitude = sqrt(rmsamp / amplitude);
8861  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
8862 
8863  // CapIdErrors end /////////////////////////////////////////////////////////
8864 
8865  // AZ 1.10.2015:
8866  if (error == 1) {
8867  if (sub == 1 && mdepth == 1)
8869  if (sub == 1 && mdepth == 2)
8871  if (sub == 2 && mdepth == 1)
8873  if (sub == 2 && mdepth == 2)
8875  if (sub == 2 && mdepth == 3)
8877  }
8878  if (error != 1) {
8879  if (sub == 1 && mdepth == 1)
8881  if (sub == 1 && mdepth == 2)
8883  if (sub == 2 && mdepth == 1)
8885  if (sub == 2 && mdepth == 2)
8887  if (sub == 2 && mdepth == 3)
8889  }
8890 
8891  for (int ii = 0; ii < TSsize; ii++) {
8892  // for (int ii=0; ii<10; ii++) {
8893  double ampldefault = tool[ii];
8895  if (sub == 1) {
8896  if (amplitude > 120) {
8897  h_shape_Ahigh_HB0->Fill(float(ii), ampldefault);
8898  h_shape0_Ahigh_HB0->Fill(float(ii), 1.);
8899  } else {
8900  h_shape_Alow_HB0->Fill(float(ii), ampldefault);
8901  h_shape0_Alow_HB0->Fill(float(ii), 1.);
8902  } //HB0
8904  if (pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
8905  pedestal3 < pedestalHBMax_) {
8906  h_shape_Ahigh_HB1->Fill(float(ii), ampldefault);
8907  h_shape0_Ahigh_HB1->Fill(float(ii), 1.);
8908  } else {
8909  h_shape_Alow_HB1->Fill(float(ii), ampldefault);
8910  h_shape0_Alow_HB1->Fill(float(ii), 1.);
8911  } //HB1
8912  if (error == 0) {
8913  h_shape_Ahigh_HB2->Fill(float(ii), ampldefault);
8914  h_shape0_Ahigh_HB2->Fill(float(ii), 1.);
8915  } else {
8916  h_shape_Alow_HB2->Fill(float(ii), ampldefault);
8917  h_shape0_Alow_HB2->Fill(float(ii), 1.);
8918  } //HB2
8920  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
8921  pedestalw3 < pedestalwHBMax_) {
8922  h_shape_Ahigh_HB3->Fill(float(ii), ampldefault);
8923  h_shape0_Ahigh_HB3->Fill(float(ii), 1.);
8924  } else {
8925  h_shape_Alow_HB3->Fill(float(ii), ampldefault);
8926  h_shape0_Alow_HB3->Fill(float(ii), 1.);
8927  } //HB3
8928 
8929  } // sub HB
8930 
8931  } //for 3 over TSs
8932 
8933  if (sub == 1) {
8934  // bad_channels with C,A,W,P,pW,
8935  if (error == 1 || amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_ || rmsamplitude < rmsHBMin_ ||
8936  rmsamplitude > rmsHBMax_ || pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ ||
8937  pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestalw0 < pedestalwHBMax_ ||
8938  pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ || pedestalw3 < pedestalwHBMax_) {
8939  for (int ii = 0; ii < TSsize; ii++) {
8940  double ampldefault = tool[ii];
8941  h_shape_bad_channels_HB->Fill(float(ii), ampldefault);
8942  h_shape0_bad_channels_HB->Fill(float(ii), 1.);
8943  }
8944  }
8945  // good_channels with C,A,W,P,pW
8946  else {
8947  for (int ii = 0; ii < TSsize; ii++) {
8948  double ampldefault = tool[ii];
8949  h_shape_good_channels_HB->Fill(float(ii), ampldefault);
8950  h_shape0_good_channels_HB->Fill(float(ii), 1.);
8951  }
8952  }
8953  } // sub HB
8954  if (sub == 2) {
8955  // bad_channels with C,A,W,P,pW,
8956  if (error == 1 || amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_ || rmsamplitude < rmsHEMin_ ||
8957  rmsamplitude > rmsHEMax_ || pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ ||
8958  pedestal2 < pedestalHEMax_ || pedestal3 < pedestalHEMax_ || pedestalw0 < pedestalwHEMax_ ||
8959  pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ || pedestalw3 < pedestalwHEMax_) {
8960  for (int ii = 0; ii < TSsize; ii++) {
8961  double ampldefault = tool[ii];
8962  h_shape_bad_channels_HE->Fill(float(ii), ampldefault);
8963  h_shape0_bad_channels_HE->Fill(float(ii), 1.);
8964  }
8965  }
8966  // good_channels with C,A,W,P,pW,
8967  else {
8968  for (int ii = 0; ii < TSsize; ii++) {
8969  double ampldefault = tool[ii];
8970  h_shape_good_channels_HE->Fill(float(ii), ampldefault);
8971  h_shape0_good_channels_HE->Fill(float(ii), 1.);
8972  }
8973  }
8974  } // sub HE
8975 
8977  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
8978  // for Error B-type
8979  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
8980  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
8981  // HB
8982  if (sub == 1) {
8984  // // // // // // // // // HB PedestalCorrelations :
8985  double mypedestal = pedestal0;
8986  double mypedestalw = pedestalw0;
8987  h2_pedvsampl_HB->Fill(mypedestal, amplitude);
8988  h2_pedwvsampl_HB->Fill(mypedestalw, amplitude);
8989  h_pedvsampl_HB->Fill(mypedestal, amplitude);
8990  h_pedwvsampl_HB->Fill(mypedestalw, amplitude);
8991  h_pedvsampl0_HB->Fill(mypedestal, 1.);
8992  h_pedwvsampl0_HB->Fill(mypedestalw, 1.);
8993 
8994  h2_amplvsped_HB->Fill(amplitude, mypedestal);
8995  h2_amplvspedw_HB->Fill(amplitude, mypedestalw);
8996  h_amplvsped_HB->Fill(amplitude, mypedestal);
8997  h_amplvspedw_HB->Fill(amplitude, mypedestalw);
8998  h_amplvsped0_HB->Fill(amplitude, 1.);
8999  } //
9000  // // // // // // // // // HB Pedestals:
9001  if (studyPedestalsHist_) {
9002  h_pedestal0_HB->Fill(pedestal0, 1.);
9003  h_pedestal1_HB->Fill(pedestal1, 1.);
9004  h_pedestal2_HB->Fill(pedestal2, 1.);
9005  h_pedestal3_HB->Fill(pedestal3, 1.);
9006  h_pedestalaver4_HB->Fill(pedestalaver4, 1.);
9007  h_pedestalaver9_HB->Fill(pedestalaver9, 1.);
9008  h_pedestalw0_HB->Fill(pedestalw0, 1.);
9009  h_pedestalw1_HB->Fill(pedestalw1, 1.);
9010  h_pedestalw2_HB->Fill(pedestalw2, 1.);
9011  h_pedestalw3_HB->Fill(pedestalw3, 1.);
9012  h_pedestalwaver4_HB->Fill(pedestalwaver4, 1.);
9013  h_pedestalwaver9_HB->Fill(pedestalwaver9, 1.);
9014  // for averaged values:
9015  if (mdepth == 1) {
9016  h_mapDepth1Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
9017  h_mapDepth1Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
9018  h_mapDepth1Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
9019  h_mapDepth1Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
9020  h_mapDepth1Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
9021  h_mapDepth1Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
9022  h_mapDepth1Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
9023  h_mapDepth1Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
9024  }
9025  if (mdepth == 2) {
9026  h_mapDepth2Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
9027  h_mapDepth2Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
9028  h_mapDepth2Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
9029  h_mapDepth2Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
9030  h_mapDepth2Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
9031  h_mapDepth2Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
9032  h_mapDepth2Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
9033  h_mapDepth2Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
9034  }
9035  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
9036  pedestalw3 < pedestalwHBMax_) {
9037  if (mdepth == 1)
9038  h_mapDepth1pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9039  if (mdepth == 2)
9040  h_mapDepth2pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9041  if (mdepth == 3)
9042  h_mapDepth3pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9043  if (mdepth == 4)
9044  h_mapDepth4pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9045  }
9046  if (pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
9047  pedestal3 < pedestalHBMax_) {
9048  if (mdepth == 1)
9049  h_mapDepth1pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9050  if (mdepth == 2)
9051  h_mapDepth2pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9052  if (mdepth == 3)
9053  h_mapDepth3pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9054  if (mdepth == 4)
9055  h_mapDepth4pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9056  }
9057  for (int ii = 0; ii < TSsize; ii++) {
9058  h_pedestal00_HB->Fill(pedestal00->getValue(ii), 1.);
9059  h_gain_HB->Fill(gain->getValue(ii), 1.);
9060  }
9061  h_respcorr_HB->Fill(respcorr->getValue(), 1.);
9062  h_timecorr_HB->Fill(timecorr->getValue(), 1.);
9063  h_lutcorr_HB->Fill(lutcorr->getValue(), 1.);
9064  h_difpedestal0_HB->Fill(difpedestal0, 1.);
9065  h_difpedestal1_HB->Fill(difpedestal1, 1.);
9066  h_difpedestal2_HB->Fill(difpedestal2, 1.);
9067  h_difpedestal3_HB->Fill(difpedestal3, 1.);
9068  } //
9069  // // // // // // // // // HB ADCAmpl:
9070  if (studyADCAmplHist_) {
9071  h_ADCAmpl345Zoom_HB->Fill(amplitude345, 1.);
9072  h_ADCAmpl345Zoom1_HB->Fill(amplitude345, 1.);
9073  h_ADCAmpl345_HB->Fill(amplitude345, 1.);
9074  if (error == 0) {
9076  h_ADCAmpl345_HBCapIdNoError->Fill(amplitude345, 1.);
9077  }
9078  if (error == 1) {
9079  h_ADCAmpl_HBCapIdError->Fill(amplitude, 1.);
9080  h_ADCAmpl345_HBCapIdError->Fill(amplitude345, 1.);
9081  }
9082  h_ADCAmplZoom_HB->Fill(amplitude, 1.);
9083  h_ADCAmplZoom1_HB->Fill(amplitude, 1.);
9084  h_ADCAmpl_HB->Fill(amplitude, 1.);
9085 
9086  h_AmplitudeHBrest->Fill(amplitude, 1.);
9087  h_AmplitudeHBrest1->Fill(amplitude, 1.);
9088  h_AmplitudeHBrest6->Fill(amplitude, 1.);
9089 
9090  if (amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_) {
9092  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9093  if (mdepth == 1)
9094  h_mapDepth1ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
9095  if (mdepth == 2)
9096  h_mapDepth2ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
9097  } // if
9098  // if(amplitude >400.) averSIGNALoccupancy_HB += 1.;
9099  if (amplitude < 35.) {
9100  if (mdepth == 1)
9101  h_mapDepth1ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
9102  if (mdepth == 2)
9103  h_mapDepth2ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
9104  } // if
9105  // for averaged values:
9106  if (mdepth == 1)
9107  h_mapDepth1ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
9108  if (mdepth == 2)
9109  h_mapDepth2ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
9110  if (mdepth == 1)
9111  h_mapDepth1ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
9112  if (mdepth == 2)
9113  h_mapDepth2ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
9114  h_bcnvsamplitude_HB->Fill(float(bcn), amplitude);
9115  h_bcnvsamplitude0_HB->Fill(float(bcn), 1.);
9117  h_orbitNumvsamplitude0_HB->Fill(float(orbitNum), 1.);
9119  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
9120  } //if(studyADCAmplHist_
9122 
9123  // // // // // // // // // HB TSmean:
9124  if (studyTSmeanShapeHist_) {
9125  h_TSmeanA_HB->Fill(aveamplitude1, 1.);
9126  // h2_TSnVsAyear2023_HB->Fill(25.*aveamplitude1, amplitude);
9127  h2_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
9128  h1_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
9129  h1_TSnVsAyear20230_HB->Fill(amplitude, 1.);
9130  if (aveamplitude1 < TSmeanHBMin_ || aveamplitude1 > TSmeanHBMax_) {
9132  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9133  if (mdepth == 1)
9134  h_mapDepth1TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
9135  if (mdepth == 2)
9136  h_mapDepth2TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
9137  } // if
9138  // for averaged values:
9139  if (mdepth == 1)
9140  h_mapDepth1TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
9141  if (mdepth == 2)
9142  h_mapDepth2TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
9144  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
9145  } //if(studyTSmeanShapeHist_
9147 
9148  // // // // // // // // // HB TSmax:
9149  if (studyTSmaxShapeHist_) {
9150  h_TSmaxA_HB->Fill(float(ts_with_max_signal), 1.);
9151  if (ts_with_max_signal < TSpeakHBMin_ || ts_with_max_signal > TSpeakHBMax_) {
9153  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9154  if (mdepth == 1)
9155  h_mapDepth1TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
9156  if (mdepth == 2)
9157  h_mapDepth2TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
9158  } // if
9159  // for averaged values:
9160  if (mdepth == 1)
9161  h_mapDepth1TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9162  if (mdepth == 2)
9163  h_mapDepth2TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9165  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
9166  } //if(studyTSmaxShapeHist_
9168 
9169  // // // // // // // // // HB RMS:
9170  if (studyRMSshapeHist_) {
9171  h_Amplitude_HB->Fill(rmsamplitude, 1.);
9172  if (rmsamplitude < rmsHBMin_ || rmsamplitude > rmsHBMax_) {
9174  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9175  if (mdepth == 1)
9176  h_mapDepth1Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
9177  if (mdepth == 2)
9178  h_mapDepth2Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
9179  } // if
9180  // for averaged values:
9181  if (mdepth == 1)
9182  h_mapDepth1Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
9183  if (mdepth == 2)
9184  h_mapDepth2Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
9186  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
9187  } //if(studyRMSshapeHist_)
9189 
9190  // // // // // // // // // HB Ratio:
9191  if (studyRatioShapeHist_) {
9192  h_Ampl_HB->Fill(ratio, 1.);
9193  if (ratio < ratioHBMin_ || ratio > ratioHBMax_) {
9195  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9196  if (mdepth == 1)
9197  h_mapDepth1Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
9198  if (mdepth == 2)
9199  h_mapDepth2Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
9200  // //
9201  } //if(ratio
9202  // for averaged values:
9203  if (mdepth == 1)
9204  h_mapDepth1Ampl_HB->Fill(double(ieta), double(iphi), ratio);
9205  if (mdepth == 2)
9206  h_mapDepth2Ampl_HB->Fill(double(ieta), double(iphi), ratio);
9208  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
9209  } //if(studyRatioShapeHist_)
9211 
9212  // // // // // // // // // HB DiffAmplitude:
9213  if (studyDiffAmplHist_) {
9214  if (mdepth == 1)
9215  h_mapDepth1AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
9216  if (mdepth == 2)
9217  h_mapDepth2AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
9218  } // if(studyDiffAmplHist_)
9219 
9221  if (mdepth == 1)
9222  h_mapDepth1_HB->Fill(double(ieta), double(iphi), 1.);
9223  if (mdepth == 2)
9224  h_mapDepth2_HB->Fill(double(ieta), double(iphi), 1.);
9225  } //if ( sub == 1 )
9226 
9227  // HE
9228  if (sub == 2) {
9229  // // // // // // // // // HE PedestalCorrelations :
9231  double mypedestal = pedestal0;
9232  double mypedestalw = pedestalw0;
9233  h2_pedvsampl_HE->Fill(mypedestal, amplitude);
9234  h2_pedwvsampl_HE->Fill(mypedestalw, amplitude);
9235  h_pedvsampl_HE->Fill(mypedestal, amplitude);
9236  h_pedwvsampl_HE->Fill(mypedestalw, amplitude);
9237  h_pedvsampl0_HE->Fill(mypedestal, 1.);
9238  h_pedwvsampl0_HE->Fill(mypedestalw, 1.);
9239  } //
9240  // // // // // // // // // HE Pedestals:
9241  if (studyPedestalsHist_) {
9242  h_pedestal0_HE->Fill(pedestal0, 1.);
9243  h_pedestal1_HE->Fill(pedestal1, 1.);
9244  h_pedestal2_HE->Fill(pedestal2, 1.);
9245  h_pedestal3_HE->Fill(pedestal3, 1.);
9246  h_pedestalaver4_HE->Fill(pedestalaver4, 1.);
9247  h_pedestalaver9_HE->Fill(pedestalaver9, 1.);
9248  h_pedestalw0_HE->Fill(pedestalw0, 1.);
9249  h_pedestalw1_HE->Fill(pedestalw1, 1.);
9250  h_pedestalw2_HE->Fill(pedestalw2, 1.);
9251  h_pedestalw3_HE->Fill(pedestalw3, 1.);
9252  h_pedestalwaver4_HE->Fill(pedestalwaver4, 1.);
9253  h_pedestalwaver9_HE->Fill(pedestalwaver9, 1.);
9254  // for averaged values:
9255  if (mdepth == 1) {
9256  h_mapDepth1Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9257  h_mapDepth1Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9258  h_mapDepth1Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9259  h_mapDepth1Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9260  h_mapDepth1Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9261  h_mapDepth1Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9262  h_mapDepth1Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9263  h_mapDepth1Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9264  }
9265  if (mdepth == 2) {
9266  h_mapDepth2Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9267  h_mapDepth2Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9268  h_mapDepth2Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9269  h_mapDepth2Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9270  h_mapDepth2Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9271  h_mapDepth2Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9272  h_mapDepth2Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9273  h_mapDepth2Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9274  }
9275  if (mdepth == 3) {
9276  h_mapDepth3Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9277  h_mapDepth3Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9278  h_mapDepth3Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9279  h_mapDepth3Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9280  h_mapDepth3Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9281  h_mapDepth3Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9282  h_mapDepth3Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9283  h_mapDepth3Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9284  }
9285  if (pedestalw0 < pedestalwHEMax_ || pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ ||
9286  pedestalw3 < pedestalwHEMax_) {
9287  if (mdepth == 1)
9288  h_mapDepth1pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9289  if (mdepth == 2)
9290  h_mapDepth2pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9291  if (mdepth == 3)
9292  h_mapDepth3pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9293  }
9294  if (pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ || pedestal2 < pedestalHEMax_ ||
9295  pedestal3 < pedestalHEMax_) {
9296  if (mdepth == 1)
9297  h_mapDepth1pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9298  if (mdepth == 2)
9299  h_mapDepth2pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9300  if (mdepth == 3)
9301  h_mapDepth3pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9302  }
9303  for (int ii = 0; ii < TSsize; ii++) {
9304  h_pedestal00_HE->Fill(pedestal00->getValue(ii), 1.);
9305  h_gain_HE->Fill(gain->getValue(ii), 1.);
9306  }
9307  h_respcorr_HE->Fill(respcorr->getValue(), 1.);
9308  h_timecorr_HE->Fill(timecorr->getValue(), 1.);
9309  h_lutcorr_HE->Fill(lutcorr->getValue(), 1.);
9310  } //
9311 
9312  // h_mapDepth1ADCAmpl12SiPM_HE
9313  // // // // // // // // // HE ADCAmpl:
9314  if (studyADCAmplHist_) {
9315  h_ADCAmpl345Zoom_HE->Fill(ampl, 1.);
9316  h_ADCAmpl345Zoom1_HE->Fill(amplitude345, 1.);
9317  h_ADCAmpl345_HE->Fill(amplitude345, 1.);
9318  h_ADCAmpl_HE->Fill(amplitude, 1.);
9319 
9320  h_ADCAmplrest_HE->Fill(amplitude, 1.);
9321  h_ADCAmplrest1_HE->Fill(amplitude, 1.);
9322  h_ADCAmplrest6_HE->Fill(amplitude, 1.);
9323 
9324  h_ADCAmplZoom1_HE->Fill(amplitude, 1.);
9325  if (amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_) {
9327  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9328  if (mdepth == 1)
9329  h_mapDepth1ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9330  if (mdepth == 2)
9331  h_mapDepth2ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9332  if (mdepth == 3)
9333  h_mapDepth3ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9334  } // if
9335  // if(amplitude > 700.) averSIGNALoccupancy_HE += 1.;
9336  if (amplitude < 500.) {
9337  if (mdepth == 1)
9338  h_mapDepth1ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9339  if (mdepth == 2)
9340  h_mapDepth2ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9341  if (mdepth == 3)
9342  h_mapDepth3ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9343  } // if
9344  // for averaged values:
9345  if (mdepth == 1)
9346  h_mapDepth1ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9347  if (mdepth == 2)
9348  h_mapDepth2ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9349  if (mdepth == 3)
9350  h_mapDepth3ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9351 
9352  if (mdepth == 1) {
9353  h_mapDepth1ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9354  h_mapDepth1linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9355  }
9356  if (mdepth == 2) {
9357  h_mapDepth2ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9358  h_mapDepth2linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9359  }
9360  if (mdepth == 3) {
9361  h_mapDepth3ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9362  h_mapDepth3linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9363  }
9364 
9367  h_bcnvsamplitude_HE->Fill(float(bcn), amplitude);
9368  h_bcnvsamplitude0_HE->Fill(float(bcn), 1.);
9370  h_orbitNumvsamplitude0_HE->Fill(float(orbitNum), 1.);
9371 
9373 
9375  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
9376 
9377  } //if(studyADCAmplHist_
9379  // // // // // // // // // HE TSmean:
9380  if (studyTSmeanShapeHist_) {
9381  h_TSmeanA_HE->Fill(aveamplitude1, 1.);
9382  // h2_TSnVsAyear2023_HE->Fill(25.*aveamplitude1, amplitude);
9383  h2_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
9384  h1_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
9385  h1_TSnVsAyear20230_HE->Fill(amplitude, 1.);
9386  if (aveamplitude1 < TSmeanHEMin_ || aveamplitude1 > TSmeanHEMax_) {
9388  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9389  if (mdepth == 1)
9390  h_mapDepth1TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9391  if (mdepth == 2)
9392  h_mapDepth2TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9393  if (mdepth == 3)
9394  h_mapDepth3TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9395  } // if
9396  // for averaged values:
9397  if (mdepth == 1)
9398  h_mapDepth1TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9399  if (mdepth == 2)
9400  h_mapDepth2TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9401  if (mdepth == 3)
9402  h_mapDepth3TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9404  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
9405  } //if(studyTSmeanShapeHist_) {
9407  // // // // // // // // // HE TSmax:
9408  if (studyTSmaxShapeHist_) {
9409  h_TSmaxA_HE->Fill(float(ts_with_max_signal), 1.);
9410  if (ts_with_max_signal < TSpeakHEMin_ || ts_with_max_signal > TSpeakHEMax_) {
9412  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9413  if (mdepth == 1)
9414  h_mapDepth1TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9415  if (mdepth == 2)
9416  h_mapDepth2TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9417  if (mdepth == 3)
9418  h_mapDepth3TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9419  } // if
9420  // for averaged values:
9421  if (mdepth == 1)
9422  h_mapDepth1TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9423  if (mdepth == 2)
9424  h_mapDepth2TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9425  if (mdepth == 3)
9426  h_mapDepth3TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9428  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
9429  } //if(studyTSmaxShapeHist_) {
9431  // // // // // // // // // HE RMS:
9432  if (studyRMSshapeHist_) {
9433  h_Amplitude_HE->Fill(rmsamplitude, 1.);
9434  if (rmsamplitude < rmsHEMin_ || rmsamplitude > rmsHEMax_) {
9436  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9437  if (mdepth == 1)
9438  h_mapDepth1Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9439  if (mdepth == 2)
9440  h_mapDepth2Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9441  if (mdepth == 3)
9442  h_mapDepth3Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9443  }
9444  // for averaged values:
9445  if (mdepth == 1)
9446  h_mapDepth1Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9447  if (mdepth == 2)
9448  h_mapDepth2Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9449  if (mdepth == 3)
9450  h_mapDepth3Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9452  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
9453  } //if(studyRMSshapeHist_)
9455 
9456  // // // // // // // // // HE Ratio:
9457  if (studyRatioShapeHist_) {
9458  h_Ampl_HE->Fill(ratio, 1.);
9459  if (ratio < ratioHEMin_ || ratio > ratioHEMax_) {
9461  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9462  if (mdepth == 1)
9463  h_mapDepth1Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9464  if (mdepth == 2)
9465  h_mapDepth2Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9466  if (mdepth == 3)
9467  h_mapDepth3Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9468  }
9469  // for averaged values:
9470  if (mdepth == 1)
9471  h_mapDepth1Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9472  if (mdepth == 2)
9473  h_mapDepth2Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9474  if (mdepth == 3)
9475  h_mapDepth3Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9477  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
9478  } //if(studyRatioShapeHist_)
9480  // // // // // // // // // HE DiffAmplitude:
9481  if (studyDiffAmplHist_) {
9482  // gain stability:
9483  if (mdepth == 1)
9484  h_mapDepth1AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9485  if (mdepth == 2)
9486  h_mapDepth2AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9487  if (mdepth == 3)
9488  h_mapDepth3AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9489 
9490  } // if(studyDiffAmplHist_)
9491 
9492  // RADDAM filling:
9493  if (flagLaserRaddam_ > 0) {
9494  double amplitudewithPedSubtr = 0.;
9495 
9496  //for cut on A_channel:
9497  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
9498  amplitudewithPedSubtr = toolwithPedSubtr[ts_with_max_signal];
9499  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
9500  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal + 2];
9501  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
9502  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal + 1];
9503  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
9504  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal - 1];
9505 
9506  h_AamplitudewithPedSubtr_RADDAM_HE->Fill(amplitudewithPedSubtr);
9507  h_AamplitudewithPedSubtr_RADDAM_HEzoom0->Fill(amplitudewithPedSubtr);
9508  h_AamplitudewithPedSubtr_RADDAM_HEzoom1->Fill(amplitudewithPedSubtr);
9509 
9510  if (amplitudewithPedSubtr > 50.) {
9511  if (flagLaserRaddam_ > 1) {
9512  mapRADDAM_HE[mdepth - 1][ieta + 41][iphi] += amplitudewithPedSubtr;
9513  ++mapRADDAM0_HE[mdepth - 1][ieta + 41][iphi];
9514  }
9515 
9516  if (mdepth == 1) {
9517  h_mapDepth1RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9518  h_mapDepth1RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9519  h_A_Depth1RADDAM_HE->Fill(amplitudewithPedSubtr);
9520  }
9521  if (mdepth == 2) {
9522  h_mapDepth2RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9523  h_mapDepth2RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9524  h_A_Depth2RADDAM_HE->Fill(amplitudewithPedSubtr);
9525  }
9526  if (mdepth == 3) {
9527  h_mapDepth3RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9528  h_mapDepth3RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9529  h_A_Depth3RADDAM_HE->Fill(amplitudewithPedSubtr);
9530  }
9531 
9532  // (d1 & eta 17-29) L1
9533  int LLLLLL111111 = 0;
9534  if ((mdepth == 1 && fabs(ieta0) > 16 && fabs(ieta0) < 30))
9535  LLLLLL111111 = 1;
9536  // (d2 & eta 17-26) && (d3 & eta 27-28) L2
9537  int LLLLLL222222 = 0;
9538  if ((mdepth == 2 && fabs(ieta0) > 16 && fabs(ieta0) < 27) ||
9539  (mdepth == 3 && fabs(ieta0) > 26 && fabs(ieta0) < 29))
9540  LLLLLL222222 = 1;
9541  //
9542  if (LLLLLL111111 == 1) {
9543  //forStudy h_mapLayer1RADDAM_HE->Fill(fabs(double(ieta0)), amplitudewithPedSubtr); h_mapLayer1RADDAM0_HE->Fill(fabs(double(ieta0)), 1.); h_A_Layer1RADDAM_HE->Fill(amplitudewithPedSubtr);
9544  h_sigLayer1RADDAM_HE->Fill(double(ieta0), amplitudewithPedSubtr);
9545  h_sigLayer1RADDAM0_HE->Fill(double(ieta0), 1.);
9546  }
9547  if (LLLLLL222222 == 1) {
9548  //forStudy h_mapLayer2RADDAM_HE->Fill(fabs(double(ieta0)), amplitudewithPedSubtr); h_mapLayer2RADDAM0_HE->Fill(fabs(double(ieta0)), 1.); h_A_Layer2RADDAM_HE->Fill(amplitudewithPedSubtr);
9549  h_sigLayer2RADDAM_HE->Fill(double(ieta0), amplitudewithPedSubtr);
9550  h_sigLayer2RADDAM0_HE->Fill(double(ieta0), 1.);
9551  }
9552 
9553  //
9554  if (mdepth == 3 && fabs(ieta0) == 16) {
9555  h_mapDepth3RADDAM16_HE->Fill(amplitudewithPedSubtr);
9556  // forStudy h_mapDepth3RADDAM160_HE->Fill(1.);
9557  }
9558  //
9559  } //amplitude > 60.
9560  } // END RADDAM
9561 
9563  if (mdepth == 1)
9564  h_mapDepth1_HE->Fill(double(ieta), double(iphi), 1.);
9565  if (mdepth == 2)
9566  h_mapDepth2_HE->Fill(double(ieta), double(iphi), 1.);
9567  if (mdepth == 3)
9568  h_mapDepth3_HE->Fill(double(ieta), double(iphi), 1.);
9569  } //if ( sub == 2 )
9570  //
9571 } // fillDigiAmplitude
9575  CaloSamples toolOriginal; // TS
9576  double tool[100];
9577  DetId detid = qie11df.detid();
9578  HcalDetId hcaldetid = HcalDetId(detid);
9579  int ieta = hcaldetid.ieta();
9580  if (ieta > 0)
9581  ieta -= 1;
9582  int iphi = hcaldetid.iphi() - 1;
9583  int mdepth = hcaldetid.depth();
9584  int sub = hcaldetid.subdet(); // 1-HB, 2-HE QIE11DigiCollection
9585  nTS = qie11df.samples();
9587  if (mdepth == 0 || sub > 4)
9588  return;
9589  if (mdepth > 3 && flagupgradeqie1011_ == 3)
9590  return;
9591  if (mdepth > 3 && flagupgradeqie1011_ == 7)
9592  return;
9593  if (mdepth > 3 && flagupgradeqie1011_ == 8)
9594  return;
9595  if (mdepth > 3 && flagupgradeqie1011_ == 9)
9596  return;
9597 
9598  // for some CMSSW versions and GT this line uncommented, can help to run job
9599  //if(mdepth ==4 && sub==1 && (ieta == -16 || ieta == 15) ) return;// HB depth4 eta=-16, 15 since I did:if(ieta > 0) ieta -= 1;
9602  const HcalGain* gain = conditions->getGain(hcaldetid);
9603  // const HcalGainWidth* gainWidth = conditions->getGainWidth(hcaldetid);
9604  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(hcaldetid);
9605  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(hcaldetid);
9606  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(hcaldetid);
9607  const HcalQIECoder* channelCoder = conditions->getHcalCoder(hcaldetid);
9608  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(hcaldetid);
9609  const HcalPedestal* pedestal00 = conditions->getPedestal(hcaldetid);
9610  HcalCoderDb coder(*channelCoder, *shape);
9611  if (useADCfC_)
9612  coder.adc2fC(qie11df, toolOriginal);
9613  double pedestalaver9 = 0.;
9614  double pedestalaver4 = 0.;
9615  double pedestal0 = 0.;
9616  double pedestal1 = 0.;
9617  double pedestal2 = 0.;
9618  double pedestal3 = 0.;
9619  double pedestalwaver9 = 0.;
9620  double pedestalwaver4 = 0.;
9621  double pedestalw0 = 0.;
9622  double pedestalw1 = 0.;
9623  double pedestalw2 = 0.;
9624  double pedestalw3 = 0.;
9625  double difpedestal0 = 0.;
9626  double difpedestal1 = 0.;
9627  double difpedestal2 = 0.;
9628  double difpedestal3 = 0.;
9629 
9630  double amplitude = 0.;
9631  double amplitude0 = 0.;
9632  double absamplitude = 0.;
9633  double tocampl = 0.;
9634 
9635  double amplitude345 = 0.;
9636  double ampl = 0.;
9637  double ampl3ts = 0.;
9638  double timew = 0.;
9639  double timeww = 0.;
9640  double max_signal = -100.;
9641  int ts_with_max_signal = -100;
9642  int c0 = 0;
9643  int c1 = 0;
9644  int c2 = 0;
9645  int c3 = 0;
9646  int c4 = 0;
9647  double errorBtype = 0.;
9648 
9649  int TSsize = 8; // sub= 1 HB
9650  if (sub == 2)
9651  TSsize = 8; // sub = 2 HE
9652  if (nTS != TSsize)
9653  errorBtype = 1.;
9654  TSsize = nTS; //nTS = qie11df.samples();
9656  // double ADC_ped = 0.;
9657  int flagTS2 = 0;
9658  for (int ii = 0; ii < TSsize; ii++) {
9659  double ampldefault = 0.;
9660  double tocdefault = 0.;
9661  double ampldefault0 = 0.;
9662  double ampldefault1 = 0.;
9663  double ampldefault2 = 0.;
9664 
9665  ampldefault0 = adc2fC_QIE11_shunt6[qie11df[ii].adc()]; // massive !!!!!! (use for local runs as default shunt6)
9666  if (flaguseshunt_ == 1)
9667  ampldefault0 = adc2fC_QIE11_shunt1[qie11df[ii].adc()]; // massive !!!!!!
9668  if (useADCfC_)
9669  ampldefault1 = toolOriginal[ii]; //adcfC
9670  ampldefault2 = qie11df[ii].adc(); //ADCcounts
9671 
9672  if (useADCmassive_) {
9673  ampldefault = ampldefault0;
9674  } // !!!!!!
9675  if (useADCfC_) {
9676  ampldefault = ampldefault1;
9677  }
9678  if (useADCcounts_) {
9679  ampldefault = ampldefault2;
9680  }
9681  tocdefault = ampldefault;
9682 
9683  int capid = (qie11df[ii]).capid();
9684  double pedestal = pedestal00->getValue(capid);
9685  double pedestalw = pedw->getSigma(capid, capid);
9686  double pedestalINI = pedestal00->getValue(capid);
9687  tocdefault -= pedestal; // pedestal subtraction
9689  ampldefault -= pedestal; // pedestal subtraction
9690  tool[ii] = ampldefault;
9691  pedestalaver9 += pedestal;
9692  pedestalwaver9 += pedestalw * pedestalw;
9693 
9694  if (capid == 0 && c0 == 0) {
9695  c0++;
9696  c4++;
9697  pedestalaver4 += pedestal;
9698  pedestal0 = pedestal;
9699  pedestalw0 = pedestalw;
9700  pedestalwaver4 += pedestalw * pedestalw;
9701  difpedestal0 = pedestal - pedestalINI;
9702  }
9703 
9704  if (capid == 1 && c1 == 0) {
9705  c1++;
9706  c4++;
9707  pedestalaver4 += pedestal;
9708  pedestal1 = pedestal;
9709  pedestalw1 = pedestalw;
9710  pedestalwaver4 += pedestalw * pedestalw;
9711  difpedestal1 = pedestal - pedestalINI;
9712  }
9713  if (capid == 2 && c2 == 0) {
9714  c2++;
9715  c4++;
9716  pedestalaver4 += pedestal;
9717  pedestal2 = pedestal;
9718  pedestalw2 = pedestalw;
9719  pedestalwaver4 += pedestalw * pedestalw;
9720  difpedestal2 = pedestal - pedestalINI;
9721  }
9722  if (capid == 3 && c3 == 0) {
9723  c3++;
9724  c4++;
9725  pedestalaver4 += pedestal;
9726  pedestal3 = pedestal;
9727  pedestalw3 = pedestalw;
9728  pedestalwaver4 += pedestalw * pedestalw;
9729  difpedestal3 = pedestal - pedestalINI;
9730  }
9731 
9732  if (max_signal < ampldefault) {
9733  max_signal = ampldefault;
9734  ts_with_max_signal = ii;
9735  }
9736  amplitude += ampldefault; //
9737  absamplitude += abs(ampldefault); //
9738  tocampl += tocdefault; //
9739 
9740  if (ii == 1 || ii == 2 || ii == 3 || ii == 4 || ii == 5 || ii == 6 || ii == 7 || ii == 8)
9741  amplitude345 += ampldefault;
9742 
9743  if (flagcpuoptimization_ == 0) {
9744  } //flagcpuoptimization
9745 
9746  timew += (ii + 1) * abs(ampldefault);
9747  timeww += (ii + 1) * ampldefault;
9748 
9749  if (ii == 2 && ampldefault > 0.)
9750  flagTS2 = 1;
9751  } //for 1
9753  amplitude0 = amplitude;
9754 
9755  pedestalaver9 /= TSsize;
9756  pedestalaver4 /= c4;
9757  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
9758  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
9759 
9760  // ------------ to get signal in TS: -2 max +1 ------------
9761  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize) {
9762  ampl = tool[ts_with_max_signal];
9763  ampl3ts = tool[ts_with_max_signal];
9764  }
9765  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize) {
9766  ampl += tool[ts_with_max_signal - 1];
9767  ampl3ts += tool[ts_with_max_signal - 1];
9768  }
9769  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize) {
9770  ampl += tool[ts_with_max_signal + 1];
9771  ampl3ts += tool[ts_with_max_signal + 1];
9772  }
9773  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize) {
9774  ampl += tool[ts_with_max_signal + 2];
9775  }
9776  // HE charge correction for SiPMs:
9777  if (flagsipmcorrection_ != 0) {
9778  if (sub == 2) {
9779  double xa = amplitude / 40.;
9780  double xb = ampl / 40.;
9781  double xc = amplitude345 / 40.;
9782  double xd = ampl3ts / 40.;
9783  double txa = tocampl / 40.;
9784  // ADDI case:
9785  if (((ieta == -16 || ieta == 15) && mdepth == 4) ||
9786  ((ieta == -17 || ieta == 16) && (mdepth == 2 || mdepth == 3)) ||
9787  ((ieta == -18 || ieta == 17) && mdepth == 5)) {
9788  double c0 = 1.000000;
9789  double b1 = 2.59096e-05;
9790  double a2 = 4.60721e-11;
9791  double corrforxa = a2 * xa * xa + b1 * xa + c0;
9792  double corrforxb = a2 * xb * xb + b1 * xb + c0;
9793  double corrforxc = a2 * xc * xc + b1 * xc + c0;
9794  double corrforxd = a2 * xd * xd + b1 * xd + c0;
9795  double corrfortxa = a2 * txa * txa + b1 * txa + c0;
9796  h_corrforxaADDI_HE->Fill(amplitude, corrforxa);
9797  h_corrforxaADDI0_HE->Fill(amplitude, 1.);
9798  amplitude *= corrforxa;
9799  ampl *= corrforxb;
9800  amplitude345 *= corrforxc;
9801  ampl3ts *= corrforxd;
9802  tocampl *= corrfortxa;
9803  }
9804  // MAIN case:
9805  else {
9806  double c0 = 1.000000;
9807  double b1 = 2.71238e-05;
9808  double a2 = 1.32877e-10;
9809  double corrforxa = a2 * xa * xa + b1 * xa + c0;
9810  double corrforxb = a2 * xb * xb + b1 * xb + c0;
9811  double corrforxc = a2 * xc * xc + b1 * xc + c0;
9812  double corrforxd = a2 * xd * xd + b1 * xd + c0;
9813  double corrfortxa = a2 * txa * txa + b1 * txa + c0;
9814  h_corrforxaMAIN_HE->Fill(amplitude, corrforxa);
9815  h_corrforxaMAIN0_HE->Fill(amplitude, 1.);
9816  amplitude *= corrforxa;
9817  ampl *= corrforxb;
9818  amplitude345 *= corrforxc;
9819  ampl3ts *= corrforxd;
9820  tocampl *= corrfortxa;
9821  }
9822  } // sub == 2 HE charge correction end
9823  } //flagsipmcorrection_
9825  // sub=1||2 HBHE
9826  if (sub == 1 || sub == 2) {
9827  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HBHE
9828  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HBHE
9829  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HBHE
9830  }
9831  tocamplchannel[sub - 1][mdepth - 1][ieta + 41][iphi] += tocampl; // 0-neta ; 0-71 HBHE
9832 
9833  double ratio = 0.;
9834  // if(amplallTS != 0.) ratio = ampl/amplallTS;
9835  if (amplitude != 0.)
9836  ratio = ampl / amplitude;
9837  if (ratio < 0. || ratio > 1.02)
9838  ratio = 0.;
9839  double aveamplitude = 0.;
9840  double aveamplitudew = 0.;
9841  if (absamplitude > 0 && timew > 0)
9842  aveamplitude = timew / absamplitude; // average_TS +1
9843  if (amplitude0 > 0 && timeww > 0)
9844  aveamplitudew = timeww / amplitude0; // average_TS +1
9845  double rmsamp = 0.;
9846  // and CapIdErrors:
9847  int error = 0;
9848  bool anycapid = true;
9849  int lastcapid = 0;
9850  int capid = 0;
9851  for (int ii = 0; ii < TSsize; ii++) {
9852  double aaaaaa = (ii + 1) - aveamplitudew;
9853  double aaaaaa2 = aaaaaa * aaaaaa;
9854  double ampldefault = tool[ii];
9855  rmsamp += (aaaaaa2 * ampldefault); // fC
9856  capid = (qie11df[ii]).capid();
9857  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
9858  anycapid = false;
9859  }
9860  lastcapid = capid;
9861  } //for 2
9862 
9863  if (!anycapid)
9864  error = 1;
9865  double rmsamplitude = 0.;
9866  if ((amplitude0 > 0 && rmsamp > 0) || (amplitude0 < 0 && rmsamp < 0))
9867  rmsamplitude = sqrt(rmsamp / amplitude0);
9868  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
9869  // CapIdErrors end /////////////////////////////////////////////////////////
9870 
9871  // AZ 1.10.2015:
9872  if (error == 1) {
9873  if (sub == 1 && mdepth == 1)
9875  if (sub == 1 && mdepth == 2)
9877  if (sub == 2 && mdepth == 1)
9879  if (sub == 2 && mdepth == 2)
9881  if (sub == 2 && mdepth == 3)
9883  }
9884  if (error != 1) {
9885  if (sub == 1 && mdepth == 1)
9887  if (sub == 1 && mdepth == 2)
9889  if (sub == 2 && mdepth == 1)
9891  if (sub == 2 && mdepth == 2)
9893  if (sub == 2 && mdepth == 3)
9895  }
9896 
9897  for (int ii = 0; ii < TSsize; ii++) {
9898  // for (int ii=0; ii<10; ii++) {
9899  double ampldefault = tool[ii];
9901  if (sub == 1) {
9902  if (amplitude0 > 120) {
9903  h_shape_Ahigh_HB0->Fill(float(ii), ampldefault);
9904  h_shape0_Ahigh_HB0->Fill(float(ii), 1.);
9905  } else {
9906  h_shape_Alow_HB0->Fill(float(ii), ampldefault);
9907  h_shape0_Alow_HB0->Fill(float(ii), 1.);
9908  } //HB0
9910  if (pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
9911  pedestal3 < pedestalHBMax_) {
9912  h_shape_Ahigh_HB1->Fill(float(ii), ampldefault);
9913  h_shape0_Ahigh_HB1->Fill(float(ii), 1.);
9914  } else {
9915  h_shape_Alow_HB1->Fill(float(ii), ampldefault);
9916  h_shape0_Alow_HB1->Fill(float(ii), 1.);
9917  } //HB1
9918  if (error == 0) {
9919  h_shape_Ahigh_HB2->Fill(float(ii), ampldefault);
9920  h_shape0_Ahigh_HB2->Fill(float(ii), 1.);
9921  } else {
9922  h_shape_Alow_HB2->Fill(float(ii), ampldefault);
9923  h_shape0_Alow_HB2->Fill(float(ii), 1.);
9924  } //HB2
9926  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
9927  pedestalw3 < pedestalwHBMax_) {
9928  h_shape_Ahigh_HB3->Fill(float(ii), ampldefault);
9929  h_shape0_Ahigh_HB3->Fill(float(ii), 1.);
9930  } else {
9931  h_shape_Alow_HB3->Fill(float(ii), ampldefault);
9932  h_shape0_Alow_HB3->Fill(float(ii), 1.);
9933  } //HB3
9934 
9935  } // sub HB
9936 
9937  } //for 3 over TSs
9938 
9939  if (sub == 1) {
9940  // bad_channels with C,A,W,P,pW,
9941  if (error == 1 || amplitude0 < ADCAmplHBMin_ || amplitude0 > ADCAmplHBMax_ || rmsamplitude < rmsHBMin_ ||
9942  rmsamplitude > rmsHBMax_ || pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ ||
9943  pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestalw0 < pedestalwHBMax_ ||
9944  pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ || pedestalw3 < pedestalwHBMax_) {
9945  for (int ii = 0; ii < TSsize; ii++) {
9946  double ampldefault = tool[ii];
9947  h_shape_bad_channels_HB->Fill(float(ii), ampldefault);
9948  h_shape0_bad_channels_HB->Fill(float(ii), 1.);
9949  }
9950  }
9951  // good_channels with C,A,W,P,pW
9952  else {
9953  for (int ii = 0; ii < TSsize; ii++) {
9954  double ampldefault = tool[ii];
9955  h_shape_good_channels_HB->Fill(float(ii), ampldefault);
9956  h_shape0_good_channels_HB->Fill(float(ii), 1.);
9957  }
9958  }
9959  } // sub HB
9960 
9961  // HE starts:
9962  if (sub == 2) {
9963  // shape bad_channels with C,A,W,P,pW,
9964  if (error == 1 || amplitude0 < ADCAmplHEMin_ || amplitude0 > ADCAmplHEMax_ || rmsamplitude < rmsHEMin_ ||
9965  rmsamplitude > rmsHEMax_ || pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ ||
9966  pedestal2 < pedestalHEMax_ || pedestal3 < pedestalHEMax_ || pedestalw0 < pedestalwHEMax_ ||
9967  pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ || pedestalw3 < pedestalwHEMax_) {
9968  for (int ii = 0; ii < TSsize; ii++) {
9969  double ampldefault = tool[ii];
9970  h_shape_bad_channels_HE->Fill(float(ii), ampldefault);
9971  h_shape0_bad_channels_HE->Fill(float(ii), 1.);
9972  }
9973  }
9974  // shape good_channels with C,A,W,P,pW,
9975  else {
9976  for (int ii = 0; ii < TSsize; ii++) {
9977  double ampldefault = tool[ii];
9978  h_shape_good_channels_HE->Fill(float(ii), ampldefault);
9979  h_shape0_good_channels_HE->Fill(float(ii), 1.);
9980  } // ii
9981  } // else for good channels
9982  } // sub HE
9984  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
9985  // for Error B-type
9986  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
9987  // sumEstimator0[sub-1][mdepth-1][ieta+41][iphi] += pedestalw0;//Sig_Pedestals
9988  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
9989  // HB
9990  if (sub == 1) {
9992  // // // // // // // // // HB PedestalCorrelations :
9993  double mypedestal = pedestal0;
9994  double mypedestalw = pedestalw0;
9995  h2_pedvsampl_HB->Fill(mypedestal, amplitude);
9996  h2_pedwvsampl_HB->Fill(mypedestalw, amplitude);
9997  h_pedvsampl_HB->Fill(mypedestal, amplitude);
9998  h_pedwvsampl_HB->Fill(mypedestalw, amplitude);
9999  h_pedvsampl0_HB->Fill(mypedestal, 1.);
10000  h_pedwvsampl0_HB->Fill(mypedestalw, 1.);
10001 
10002  h2_amplvsped_HB->Fill(amplitude, mypedestal);
10003  h2_amplvspedw_HB->Fill(amplitude, mypedestalw);
10004  h_amplvsped_HB->Fill(amplitude, mypedestal);
10005  h_amplvspedw_HB->Fill(amplitude, mypedestalw);
10006  h_amplvsped0_HB->Fill(amplitude, 1.);
10007  } //
10008  // // // // // // // // // HB Pedestals:
10009  if (studyPedestalsHist_) {
10010  h_pedestal0_HB->Fill(pedestal0, 1.);
10011  h_pedestal1_HB->Fill(pedestal1, 1.);
10012  h_pedestal2_HB->Fill(pedestal2, 1.);
10013  h_pedestal3_HB->Fill(pedestal3, 1.);
10014  h_pedestalaver4_HB->Fill(pedestalaver4, 1.);
10015  h_pedestalaver9_HB->Fill(pedestalaver9, 1.);
10016  h_pedestalw0_HB->Fill(pedestalw0, 1.);
10017  h_pedestalw1_HB->Fill(pedestalw1, 1.);
10018  h_pedestalw2_HB->Fill(pedestalw2, 1.);
10019  h_pedestalw3_HB->Fill(pedestalw3, 1.);
10020  h_pedestalwaver4_HB->Fill(pedestalwaver4, 1.);
10021  h_pedestalwaver9_HB->Fill(pedestalwaver9, 1.);
10022  // for averaged values:
10023  if (mdepth == 1) {
10024  h_mapDepth1Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
10025  h_mapDepth1Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
10026  h_mapDepth1Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
10027  h_mapDepth1Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
10028  h_mapDepth1Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
10029  h_mapDepth1Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
10030  h_mapDepth1Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
10031  h_mapDepth1Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
10032  }
10033  if (mdepth == 2) {
10034  h_mapDepth2Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
10035  h_mapDepth2Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
10036  h_mapDepth2Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
10037  h_mapDepth2Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
10038  h_mapDepth2Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
10039  h_mapDepth2Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
10040  h_mapDepth2Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
10041  h_mapDepth2Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
10042  }
10043  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
10044  pedestalw3 < pedestalwHBMax_) {
10045  if (mdepth == 1)
10046  h_mapDepth1pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10047  if (mdepth == 2)
10048  h_mapDepth2pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10049  if (mdepth == 3)
10050  h_mapDepth3pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10051  if (mdepth == 3)
10052  h_mapDepth4pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10053  }
10054  if (pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
10055  pedestal3 < pedestalHBMax_) {
10056  if (mdepth == 1)
10057  h_mapDepth1pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10058  if (mdepth == 2)
10059  h_mapDepth2pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10060  if (mdepth == 3)
10061  h_mapDepth3pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10062  if (mdepth == 4)
10063  h_mapDepth4pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10064  }
10065  for (int ii = 0; ii < TSsize; ii++) {
10066  h_pedestal00_HB->Fill(pedestal00->getValue(ii), 1.);
10067  h_gain_HB->Fill(gain->getValue(ii), 1.);
10068  }
10069  h_respcorr_HB->Fill(respcorr->getValue(), 1.);
10070  h_timecorr_HB->Fill(timecorr->getValue(), 1.);
10071  h_lutcorr_HB->Fill(lutcorr->getValue(), 1.);
10072  h_difpedestal0_HB->Fill(difpedestal0, 1.);
10073  h_difpedestal1_HB->Fill(difpedestal1, 1.);
10074  h_difpedestal2_HB->Fill(difpedestal2, 1.);
10075  h_difpedestal3_HB->Fill(difpedestal3, 1.);
10076  } //
10077  // // // // // // // // // HB ADCAmpl:
10078  if (studyADCAmplHist_) {
10079  h_ADCAmpl345Zoom_HB->Fill(amplitude345, 1.);
10080  h_ADCAmpl345Zoom1_HB->Fill(amplitude345, 1.);
10081  h_ADCAmpl345_HB->Fill(amplitude345, 1.);
10082  if (error == 0) {
10084  h_ADCAmpl345_HBCapIdNoError->Fill(amplitude345, 1.);
10085  }
10086  if (error == 1) {
10087  h_ADCAmpl_HBCapIdError->Fill(amplitude, 1.);
10088  h_ADCAmpl345_HBCapIdError->Fill(amplitude345, 1.);
10089  }
10090  h_ADCAmplZoom_HB->Fill(amplitude, 1.);
10091  h_ADCAmplZoom1_HB->Fill(amplitude, 1.);
10092  h_ADCAmpl_HB->Fill(amplitude, 1.);
10093 
10094  h_AmplitudeHBrest->Fill(amplitude, 1.);
10095  h_AmplitudeHBrest1->Fill(amplitude, 1.);
10096  h_AmplitudeHBrest6->Fill(amplitude, 1.);
10097 
10098  if (amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_) {
10100  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10101  if (mdepth == 1)
10102  h_mapDepth1ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10103  if (mdepth == 2)
10104  h_mapDepth2ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10105  if (mdepth == 3)
10106  h_mapDepth3ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10107  if (mdepth == 4)
10108  h_mapDepth4ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10109  } // if
10110  // if(amplitude >400.) averSIGNALoccupancy_HB += 1.;
10111  if (amplitude < 35.) {
10112  if (mdepth == 1)
10113  h_mapDepth1ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10114  if (mdepth == 2)
10115  h_mapDepth2ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10116  if (mdepth == 3)
10117  h_mapDepth3ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10118  if (mdepth == 4)
10119  h_mapDepth4ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10120  } // if
10121  // for averaged values:
10122  if (mdepth == 1)
10123  h_mapDepth1ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10124  if (mdepth == 2)
10125  h_mapDepth2ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10126  if (mdepth == 3)
10127  h_mapDepth3ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10128  if (mdepth == 4)
10129  h_mapDepth4ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10130  if (mdepth == 1)
10131  h_mapDepth1ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10132  if (mdepth == 2)
10133  h_mapDepth2ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10134  if (mdepth == 3)
10135  h_mapDepth3ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10136  if (mdepth == 4)
10137  h_mapDepth4ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10140  h_bcnvsamplitude_HB->Fill(float(bcn), amplitude);
10141  h_bcnvsamplitude0_HB->Fill(float(bcn), 1.);
10143  h_orbitNumvsamplitude0_HB->Fill(float(orbitNum), 1.);
10145  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
10146  } //if(studyADCAmplHist_
10148 
10149  // // // // // // // // // HB TSmean:
10150  if (studyTSmeanShapeHist_) {
10151  h_TSmeanA_HB->Fill(aveamplitude1, 1.);
10152  // h2_TSnVsAyear2023_HB->Fill(25.*aveamplitude1, amplitude);
10153  h2_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
10154  h1_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
10155  h1_TSnVsAyear20230_HB->Fill(amplitude, 1.);
10156  if (aveamplitude1 < TSmeanHBMin_ || aveamplitude1 > TSmeanHBMax_) {
10158  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10159  if (mdepth == 1)
10160  h_mapDepth1TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10161  if (mdepth == 2)
10162  h_mapDepth2TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10163  if (mdepth == 3)
10164  h_mapDepth3TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10165  if (mdepth == 4)
10166  h_mapDepth4TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10167  } // if
10168  // for averaged values:
10169  if (mdepth == 1)
10170  h_mapDepth1TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10171  if (mdepth == 2)
10172  h_mapDepth2TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10173  if (mdepth == 3)
10174  h_mapDepth3TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10175  if (mdepth == 4)
10176  h_mapDepth4TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10178  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
10179  } //if(studyTSmeanShapeHist_
10181 
10182  // // // // // // // // // HB TSmax:
10183  if (studyTSmaxShapeHist_) {
10184  h_TSmaxA_HB->Fill(float(ts_with_max_signal), 1.);
10185  if (ts_with_max_signal < TSpeakHBMin_ || ts_with_max_signal > TSpeakHBMax_) {
10187  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10188  if (mdepth == 1)
10189  h_mapDepth1TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10190  if (mdepth == 2)
10191  h_mapDepth2TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10192  if (mdepth == 3)
10193  h_mapDepth3TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10194  if (mdepth == 4)
10195  h_mapDepth4TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10196  } // if
10197  // for averaged values:
10198  if (mdepth == 1)
10199  h_mapDepth1TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10200  if (mdepth == 2)
10201  h_mapDepth2TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10202  if (mdepth == 3)
10203  h_mapDepth3TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10204  if (mdepth == 4)
10205  h_mapDepth4TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10207  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
10208  } //if(studyTSmaxShapeHist_
10210 
10211  // // // // // // // // // HB RMS:
10212  if (studyRMSshapeHist_) {
10213  h_Amplitude_HB->Fill(rmsamplitude, 1.);
10214  if (rmsamplitude < rmsHBMin_ || rmsamplitude > rmsHBMax_) {
10216  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10217  if (mdepth == 1)
10218  h_mapDepth1Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10219  if (mdepth == 2)
10220  h_mapDepth2Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10221  if (mdepth == 3)
10222  h_mapDepth3Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10223  if (mdepth == 4)
10224  h_mapDepth4Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10225  } // if
10226  // for averaged values:
10227  if (mdepth == 1)
10228  h_mapDepth1Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10229  if (mdepth == 2)
10230  h_mapDepth2Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10231  if (mdepth == 3)
10232  h_mapDepth3Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10233  if (mdepth == 4)
10234  h_mapDepth4Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10236  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
10237  } //if(studyRMSshapeHist_)
10239 
10240  // // // // // // // // // HB Ratio:
10241  if (studyRatioShapeHist_) {
10242  h_Ampl_HB->Fill(ratio, 1.);
10243  if (ratio < ratioHBMin_ || ratio > ratioHBMax_) {
10245  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10246  if (mdepth == 1)
10247  h_mapDepth1Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10248  if (mdepth == 2)
10249  h_mapDepth2Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10250  if (mdepth == 3)
10251  h_mapDepth3Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10252  if (mdepth == 4)
10253  h_mapDepth4Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10254  // //
10255  } //if(ratio
10256  // for averaged values:
10257  if (mdepth == 1)
10258  h_mapDepth1Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10259  if (mdepth == 2)
10260  h_mapDepth2Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10261  if (mdepth == 3)
10262  h_mapDepth3Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10263  if (mdepth == 4)
10264  h_mapDepth4Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10266  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
10267  } //if(studyRatioShapeHist_)
10269 
10270  // // // // // // // // // HB DiffAmplitude:
10271  if (studyDiffAmplHist_) {
10272  if (mdepth == 1)
10273  h_mapDepth1AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10274  if (mdepth == 2)
10275  h_mapDepth2AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10276  if (mdepth == 3)
10277  h_mapDepth3AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10278  if (mdepth == 4)
10279  h_mapDepth4AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10280  } // if(studyDiffAmplHist_)
10281 
10283  if (mdepth == 1)
10284  h_mapDepth1_HB->Fill(double(ieta), double(iphi), 1.);
10285  if (mdepth == 2)
10286  h_mapDepth2_HB->Fill(double(ieta), double(iphi), 1.);
10287  if (mdepth == 3)
10288  h_mapDepth3_HB->Fill(double(ieta), double(iphi), 1.);
10289  if (mdepth == 4)
10290  h_mapDepth4_HB->Fill(double(ieta), double(iphi), 1.);
10291 
10292  if (flagTS2 == 1) {
10293  if (mdepth == 1)
10294  h_mapDepth1TS2_HB->Fill(double(ieta), double(iphi), 1.);
10295  if (mdepth == 2)
10296  h_mapDepth2TS2_HB->Fill(double(ieta), double(iphi), 1.);
10297  if (mdepth == 3)
10298  h_mapDepth3TS2_HB->Fill(double(ieta), double(iphi), 1.);
10299  if (mdepth == 4)
10300  h_mapDepth4TS2_HB->Fill(double(ieta), double(iphi), 1.);
10301  } // select entries only in TS=2
10302 
10303  } //if ( sub == 1 )
10304 
10305  // HE QIE11
10306  if (sub == 2) {
10307  // // // // // // // // // HE QIE11 PedestalCorrelations :
10309  // double mypedestal = pedestalaver9;
10310  // double mypedestalw = pedestalwaver9;
10311  double mypedestal = pedestal0;
10312  double mypedestalw = pedestalw0;
10313  h2_pedvsampl_HE->Fill(mypedestal, amplitude);
10314  h2_pedwvsampl_HE->Fill(mypedestalw, amplitude);
10315  h_pedvsampl_HE->Fill(mypedestal, amplitude);
10316  h_pedwvsampl_HE->Fill(mypedestalw, amplitude);
10317  h_pedvsampl0_HE->Fill(mypedestal, 1.);
10318  h_pedwvsampl0_HE->Fill(mypedestalw, 1.);
10319  } //
10320  // // // // // // // // // HE QIE11 Pedestals:
10321  if (studyPedestalsHist_) {
10322  h_pedestal0_HE->Fill(pedestal0, 1.);
10323  h_pedestal1_HE->Fill(pedestal1, 1.);
10324  h_pedestal2_HE->Fill(pedestal2, 1.);
10325  h_pedestal3_HE->Fill(pedestal3, 1.);
10326  h_pedestalaver4_HE->Fill(pedestalaver4, 1.);
10327  h_pedestalaver9_HE->Fill(pedestalaver9, 1.);
10328  h_pedestalw0_HE->Fill(pedestalw0, 1.);
10329  h_pedestalw1_HE->Fill(pedestalw1, 1.);
10330  h_pedestalw2_HE->Fill(pedestalw2, 1.);
10331  h_pedestalw3_HE->Fill(pedestalw3, 1.);
10332  h_pedestalwaver4_HE->Fill(pedestalwaver4, 1.);
10333  h_pedestalwaver9_HE->Fill(pedestalwaver9, 1.);
10334  // for averaged values:
10335  if (mdepth == 1) {
10336  h_mapDepth1Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10337  h_mapDepth1Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10338  h_mapDepth1Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10339  h_mapDepth1Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10340  h_mapDepth1Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10341  h_mapDepth1Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10342  h_mapDepth1Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10343  h_mapDepth1Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10344  }
10345  if (mdepth == 2) {
10346  h_mapDepth2Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10347  h_mapDepth2Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10348  h_mapDepth2Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10349  h_mapDepth2Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10350  h_mapDepth2Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10351  h_mapDepth2Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10352  h_mapDepth2Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10353  h_mapDepth2Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10354  }
10355  if (mdepth == 3) {
10356  h_mapDepth3Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10357  h_mapDepth3Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10358  h_mapDepth3Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10359  h_mapDepth3Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10360  h_mapDepth3Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10361  h_mapDepth3Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10362  h_mapDepth3Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10363  h_mapDepth3Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10364  }
10365  if (pedestalw0 < pedestalwHEMax_ || pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ ||
10366  pedestalw3 < pedestalwHEMax_) {
10367  if (mdepth == 1)
10368  h_mapDepth1pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10369  if (mdepth == 2)
10370  h_mapDepth2pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10371  if (mdepth == 3)
10372  h_mapDepth3pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10373  if (mdepth == 4)
10374  h_mapDepth4pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10375  if (mdepth == 5)
10376  h_mapDepth5pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10377  if (mdepth == 6)
10378  h_mapDepth6pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10379  if (mdepth == 7)
10380  h_mapDepth7pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10381  }
10382  if (pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ || pedestal2 < pedestalHEMax_ ||
10383  pedestal3 < pedestalHEMax_) {
10384  if (mdepth == 1)
10385  h_mapDepth1pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10386  if (mdepth == 2)
10387  h_mapDepth2pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10388  if (mdepth == 3)
10389  h_mapDepth3pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10390  if (mdepth == 4)
10391  h_mapDepth4pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10392  if (mdepth == 5)
10393  h_mapDepth5pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10394  if (mdepth == 6)
10395  h_mapDepth6pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10396  if (mdepth == 7)
10397  h_mapDepth7pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10398  }
10399  for (int ii = 0; ii < TSsize; ii++) {
10400  h_pedestal00_HE->Fill(pedestal00->getValue(ii), 1.);
10401  h_gain_HE->Fill(gain->getValue(ii), 1.);
10402  }
10403  h_respcorr_HE->Fill(respcorr->getValue(), 1.);
10404  h_timecorr_HE->Fill(timecorr->getValue(), 1.);
10405  h_lutcorr_HE->Fill(lutcorr->getValue(), 1.);
10406  } //
10407  // // // // // // // // // HE QIE11 ADCAmpl:
10408  if (studyADCAmplHist_) {
10409  h_ADCAmpl345_HE->Fill(amplitude345, 1.);
10410  h_ADCAmpl_HE->Fill(amplitude, 1.);
10411  // if( ieta <0) h_ADCAmpl_HEM->Fill(amplitude,1.);
10412  // if( ieta >0) h_ADCAmpl_HEP->Fill(amplitude,1.);
10413  h_ADCAmplrest_HE->Fill(amplitude, 1.);
10414  h_ADCAmplrest1_HE->Fill(amplitude, 1.);
10415  h_ADCAmplrest6_HE->Fill(amplitude, 1.);
10416 
10417  if (amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_) {
10419  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10420  if (mdepth == 1)
10421  h_mapDepth1ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10422  if (mdepth == 2)
10423  h_mapDepth2ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10424  if (mdepth == 3)
10425  h_mapDepth3ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10426  if (mdepth == 4)
10427  h_mapDepth4ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10428  if (mdepth == 5)
10429  h_mapDepth5ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10430  if (mdepth == 6)
10431  h_mapDepth6ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10432  if (mdepth == 7)
10433  h_mapDepth7ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10434  } // if
10435  // if(amplitude > 700.) averSIGNALoccupancy_HE += 1.;
10436  if (amplitude < 500.) {
10437  if (mdepth == 1)
10438  h_mapDepth1ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10439  if (mdepth == 2)
10440  h_mapDepth2ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10441  if (mdepth == 3)
10442  h_mapDepth3ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10443  if (mdepth == 4)
10444  h_mapDepth4ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10445  if (mdepth == 5)
10446  h_mapDepth5ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10447  if (mdepth == 6)
10448  h_mapDepth6ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10449  if (mdepth == 7)
10450  h_mapDepth7ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10451  } // if
10452 
10453  h_ADCAmplZoom1_HE->Fill(amplitude, 1.); // for amplitude allTS
10454  h_ADCAmpl345Zoom1_HE->Fill(ampl3ts, 1.); // for ampl3ts 3TSs
10455  h_ADCAmpl345Zoom_HE->Fill(ampl, 1.); // for ampl 4TSs
10456 
10457  if (amplitude > 110 && amplitude < 150) {
10458  h_mapADCAmplfirstpeak_HE->Fill(double(ieta), double(iphi), amplitude);
10459  h_mapADCAmplfirstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10460  } else if (amplitude > 150 && amplitude < 190) {
10461  h_mapADCAmplsecondpeak_HE->Fill(double(ieta), double(iphi), amplitude);
10462  h_mapADCAmplsecondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10463  }
10464 
10465  if (ampl3ts > 70 && ampl3ts < 110) {
10466  h_mapADCAmpl11firstpeak_HE->Fill(double(ieta), double(iphi), ampl3ts);
10467  h_mapADCAmpl11firstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10468  } else if (ampl3ts > 110 && ampl3ts < 150) {
10469  h_mapADCAmpl11secondpeak_HE->Fill(double(ieta), double(iphi), ampl3ts);
10470  h_mapADCAmpl11secondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10471  }
10472  if (ampl > 87 && ampl < 127) {
10473  h_mapADCAmpl12firstpeak_HE->Fill(double(ieta), double(iphi), ampl);
10474  h_mapADCAmpl12firstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10475  } else if (ampl > 127 && ampl < 167) {
10476  h_mapADCAmpl12secondpeak_HE->Fill(double(ieta), double(iphi), ampl);
10477  h_mapADCAmpl12secondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10478  }
10479  // for averaged values of every channel:
10480  if (mdepth == 1)
10481  h_mapDepth1ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10482  if (mdepth == 2)
10483  h_mapDepth2ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10484  if (mdepth == 3)
10485  h_mapDepth3ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10486  if (mdepth == 4)
10487  h_mapDepth4ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10488  if (mdepth == 5)
10489  h_mapDepth5ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10490  if (mdepth == 6)
10491  h_mapDepth6ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10492  if (mdepth == 7)
10493  h_mapDepth7ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10494  if (mdepth == 1)
10495  h_mapDepth1ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10496  if (mdepth == 2)
10497  h_mapDepth2ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10498  if (mdepth == 3)
10499  h_mapDepth3ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10500  if (mdepth == 4)
10501  h_mapDepth4ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10502  if (mdepth == 5)
10503  h_mapDepth5ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10504  if (mdepth == 6)
10505  h_mapDepth6ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10506  if (mdepth == 7)
10507  h_mapDepth7ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10508  // for averaged values of SiPM channels only:
10509  if (mdepth == 1)
10510  h_mapDepth1ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10511  if (mdepth == 2)
10512  h_mapDepth2ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10513  if (mdepth == 3)
10514  h_mapDepth3ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10515  if (mdepth == 1)
10516  h_mapDepth1ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10517  if (mdepth == 2)
10518  h_mapDepth2ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10519  if (mdepth == 3)
10520  h_mapDepth3ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10521  //
10524  h_bcnvsamplitude_HE->Fill(float(bcn), amplitude);
10525  h_bcnvsamplitude0_HE->Fill(float(bcn), 1.);
10527  h_orbitNumvsamplitude0_HE->Fill(float(orbitNum), 1.);
10529  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
10530  } //if(studyADCAmplHist_
10531  // // // // // // // // // HE QIE11 TSmean:
10532  if (studyTSmeanShapeHist_) {
10533  h_TSmeanA_HE->Fill(aveamplitude1, 1.);
10534  // h2_TSnVsAyear2023_HE->Fill(25.*aveamplitude1, amplitude);
10535  h2_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
10536  h1_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
10537  h1_TSnVsAyear20230_HE->Fill(amplitude, 1.);
10538  if (aveamplitude1 < TSmeanHEMin_ || aveamplitude1 > TSmeanHEMax_) {
10540  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10541  if (mdepth == 1)
10542  h_mapDepth1TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10543  if (mdepth == 2)
10544  h_mapDepth2TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10545  if (mdepth == 3)
10546  h_mapDepth3TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10547  if (mdepth == 4)
10548  h_mapDepth4TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10549  if (mdepth == 5)
10550  h_mapDepth5TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10551  if (mdepth == 6)
10552  h_mapDepth6TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10553  if (mdepth == 7)
10554  h_mapDepth7TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10555  } // if
10556  // for averaged values:
10557  if (mdepth == 1)
10558  h_mapDepth1TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10559  if (mdepth == 2)
10560  h_mapDepth2TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10561  if (mdepth == 3)
10562  h_mapDepth3TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10563  if (mdepth == 4)
10564  h_mapDepth4TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10565  if (mdepth == 5)
10566  h_mapDepth5TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10567  if (mdepth == 6)
10568  h_mapDepth6TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10569  if (mdepth == 7)
10570  h_mapDepth7TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10572  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
10573  } //if(studyTSmeanShapeHist_) {
10575  // // // // // // // // // HE QIE11 TSmax:
10576  if (studyTSmaxShapeHist_) {
10577  h_TSmaxA_HE->Fill(float(ts_with_max_signal), 1.);
10578  if (ts_with_max_signal < TSpeakHEMin_ || ts_with_max_signal > TSpeakHEMax_) {
10580  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10581  if (mdepth == 1)
10582  h_mapDepth1TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10583  if (mdepth == 2)
10584  h_mapDepth2TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10585  if (mdepth == 3)
10586  h_mapDepth3TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10587  if (mdepth == 4)
10588  h_mapDepth4TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10589  if (mdepth == 5)
10590  h_mapDepth5TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10591  if (mdepth == 6)
10592  h_mapDepth6TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10593  if (mdepth == 7)
10594  h_mapDepth7TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10595  } // if
10596  // for averaged values:
10597  if (mdepth == 1)
10598  h_mapDepth1TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10599  if (mdepth == 2)
10600  h_mapDepth2TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10601  if (mdepth == 3)
10602  h_mapDepth3TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10603  if (mdepth == 4)
10604  h_mapDepth4TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10605  if (mdepth == 5)
10606  h_mapDepth5TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10607  if (mdepth == 6)
10608  h_mapDepth6TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10609  if (mdepth == 7)
10610  h_mapDepth7TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10612  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
10613  } //if(studyTSmaxShapeHist_) {
10615  // // // // // // // // // HE QIE11 RMS:
10616  if (studyRMSshapeHist_) {
10617  h_Amplitude_HE->Fill(rmsamplitude, 1.);
10618  if (rmsamplitude < rmsHEMin_ || rmsamplitude > rmsHEMax_) {
10620  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10621  if (mdepth == 1)
10622  h_mapDepth1Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10623  if (mdepth == 2)
10624  h_mapDepth2Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10625  if (mdepth == 3)
10626  h_mapDepth3Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10627  if (mdepth == 4)
10628  h_mapDepth4Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10629  if (mdepth == 5)
10630  h_mapDepth5Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10631  if (mdepth == 6)
10632  h_mapDepth6Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10633  if (mdepth == 7)
10634  h_mapDepth7Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10635  }
10636  // for averaged values:
10637  if (mdepth == 1)
10638  h_mapDepth1Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10639  if (mdepth == 2)
10640  h_mapDepth2Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10641  if (mdepth == 3)
10642  h_mapDepth3Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10643  if (mdepth == 4)
10644  h_mapDepth4Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10645  if (mdepth == 5)
10646  h_mapDepth5Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10647  if (mdepth == 6)
10648  h_mapDepth6Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10649  if (mdepth == 7)
10650  h_mapDepth7Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10652  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
10653  } //if(studyRMSshapeHist_)
10655 
10656  // // // // // // // // // HE QIE11 Ratio:
10657  if (studyRatioShapeHist_) {
10658  h_Ampl_HE->Fill(ratio, 1.);
10659  if (ratio < ratioHEMin_ || ratio > ratioHEMax_) {
10661  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10662  if (mdepth == 1)
10663  h_mapDepth1Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10664  if (mdepth == 2)
10665  h_mapDepth2Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10666  if (mdepth == 3)
10667  h_mapDepth3Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10668  if (mdepth == 4)
10669  h_mapDepth4Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10670  if (mdepth == 5)
10671  h_mapDepth5Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10672  if (mdepth == 6)
10673  h_mapDepth6Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10674  if (mdepth == 7)
10675  h_mapDepth7Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10676  }
10677  // for averaged values:
10678  if (mdepth == 1)
10679  h_mapDepth1Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10680  if (mdepth == 2)
10681  h_mapDepth2Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10682  if (mdepth == 3)
10683  h_mapDepth3Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10684  if (mdepth == 4)
10685  h_mapDepth4Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10686  if (mdepth == 5)
10687  h_mapDepth5Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10688  if (mdepth == 6)
10689  h_mapDepth6Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10690  if (mdepth == 7)
10691  h_mapDepth7Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10693  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
10694  } //if(studyRatioShapeHist_)
10696  // // // // // // // // // HE QIE11 DiffAmplitude:
10697  if (studyDiffAmplHist_) {
10698  if (mdepth == 1)
10699  h_mapDepth1AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10700  if (mdepth == 2)
10701  h_mapDepth2AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10702  if (mdepth == 3)
10703  h_mapDepth3AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10704  if (mdepth == 4)
10705  h_mapDepth4AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10706  if (mdepth == 5)
10707  h_mapDepth5AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10708  if (mdepth == 6)
10709  h_mapDepth6AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10710  if (mdepth == 7)
10711  h_mapDepth7AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10712  } // if(studyDiffAmplHist_)
10714  if (mdepth == 1)
10715  h_mapDepth1_HE->Fill(double(ieta), double(iphi), 1.);
10716  if (mdepth == 2)
10717  h_mapDepth2_HE->Fill(double(ieta), double(iphi), 1.);
10718  if (mdepth == 3)
10719  h_mapDepth3_HE->Fill(double(ieta), double(iphi), 1.);
10720  if (mdepth == 4)
10721  h_mapDepth4_HE->Fill(double(ieta), double(iphi), 1.);
10722  if (mdepth == 5)
10723  h_mapDepth5_HE->Fill(double(ieta), double(iphi), 1.);
10724  if (mdepth == 6)
10725  h_mapDepth6_HE->Fill(double(ieta), double(iphi), 1.);
10726  if (mdepth == 7)
10727  h_mapDepth7_HE->Fill(double(ieta), double(iphi), 1.);
10728 
10729  if (flagTS2 == 1) {
10730  if (mdepth == 1)
10731  h_mapDepth1TS2_HE->Fill(double(ieta), double(iphi), 1.);
10732  if (mdepth == 2)
10733  h_mapDepth2TS2_HE->Fill(double(ieta), double(iphi), 1.);
10734  if (mdepth == 3)
10735  h_mapDepth3TS2_HE->Fill(double(ieta), double(iphi), 1.);
10736  if (mdepth == 4)
10737  h_mapDepth4TS2_HE->Fill(double(ieta), double(iphi), 1.);
10738  if (mdepth == 5)
10739  h_mapDepth5TS2_HE->Fill(double(ieta), double(iphi), 1.);
10740  if (mdepth == 6)
10741  h_mapDepth6TS2_HE->Fill(double(ieta), double(iphi), 1.);
10742  if (mdepth == 7)
10743  h_mapDepth7TS2_HE->Fill(double(ieta), double(iphi), 1.);
10744  } // select entries only in TS=2
10745 
10746  } //if ( sub == 2 )
10747  //
10748 }
10751  CaloSamples toolOriginal; // TS
10752  double tool[100];
10753  HcalDetId cell(digiItr->id());
10754  int mdepth = cell.depth();
10755  int iphi = cell.iphi() - 1; // 0-71
10756  int ieta = cell.ieta();
10757  if (ieta > 0)
10758  ieta -= 1; //-41 +41
10759  int sub = cell.subdet(); // (HFDigiCollection: 4-HF)
10760  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
10761  const HcalGain* gain = conditions->getGain(cell);
10762  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
10763  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
10764  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
10765  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
10766  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
10767  HcalCoderDb coder(*channelCoder, *shape);
10768  if (useADCfC_)
10769  coder.adc2fC(*digiItr, toolOriginal);
10770  double pedestalaver9 = 0.;
10771  double pedestalaver4 = 0.;
10772  double pedestal0 = 0.;
10773  double pedestal1 = 0.;
10774  double pedestal2 = 0.;
10775  double pedestal3 = 0.;
10776  double pedestalwaver9 = 0.;
10777  double pedestalwaver4 = 0.;
10778  double pedestalw0 = 0.;
10779  double pedestalw1 = 0.;
10780  double pedestalw2 = 0.;
10781  double pedestalw3 = 0.;
10782  double amplitude = 0.;
10783  double absamplitude = 0.;
10784  double ampl = 0.;
10785  double timew = 0.;
10786  double timeww = 0.;
10787  double max_signal = -100.;
10788  int ts_with_max_signal = -100;
10789  int c0 = 0;
10790  int c1 = 0;
10791  int c2 = 0;
10792  int c3 = 0;
10793  int c4 = 0;
10794  double errorBtype = 0.;
10795  int TSsize = 4; // HF for Run2
10796  if ((*digiItr).size() != TSsize)
10797  errorBtype = 1.;
10798  TSsize = digiItr->size();
10799  for (int ii = 0; ii < TSsize; ii++) {
10800  // for (int ii=0; ii<digiItr->size(); ii++) {
10801  double ampldefault = 0.;
10802  double ampldefault0 = 0.;
10803  double ampldefault1 = 0.;
10804  double ampldefault2 = 0.;
10805  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive
10806  if (useADCfC_)
10807  ampldefault1 = toolOriginal[ii]; //adcfC
10808  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts
10809  if (useADCmassive_) {
10810  ampldefault = ampldefault0;
10811  }
10812  if (useADCfC_) {
10813  ampldefault = ampldefault1;
10814  }
10815  if (useADCcounts_) {
10816  ampldefault = ampldefault2;
10817  }
10818 
10819  int capid = ((*digiItr)[ii]).capid();
10820  // double pedestal = calib.pedestal(capid);
10821  double pedestal = pedestal00->getValue(capid);
10822  double pedestalw = pedw->getSigma(capid, capid);
10824  ampldefault -= pedestal; // pedestal subtraction
10825 
10826  tool[ii] = ampldefault;
10827 
10828  pedestalaver9 += pedestal;
10829  pedestalwaver9 += pedestalw * pedestalw;
10830 
10831  if (capid == 0 && c0 == 0) {
10832  c0++;
10833  c4++;
10834  pedestalaver4 += pedestal;
10835  pedestal0 = pedestal;
10836  pedestalw0 = pedestalw;
10837  pedestalwaver4 += pedestalw * pedestalw;
10838  }
10839 
10840  if (capid == 1 && c1 == 0) {
10841  c1++;
10842  c4++;
10843  pedestalaver4 += pedestal;
10844  pedestal1 = pedestal;
10845  pedestalw1 = pedestalw;
10846  pedestalwaver4 += pedestalw * pedestalw;
10847  }
10848  if (capid == 2 && c2 == 0) {
10849  c2++;
10850  c4++;
10851  pedestalaver4 += pedestal;
10852  pedestal2 = pedestal;
10853  pedestalw2 = pedestalw;
10854  pedestalwaver4 += pedestalw * pedestalw;
10855  }
10856  if (capid == 3 && c3 == 0) {
10857  c3++;
10858  c4++;
10859  pedestalaver4 += pedestal;
10860  pedestal3 = pedestal;
10861  pedestalw3 = pedestalw;
10862  pedestalwaver4 += pedestalw * pedestalw;
10863  }
10864 
10865  if (max_signal < ampldefault) {
10866  max_signal = ampldefault;
10867  ts_with_max_signal = ii;
10868  }
10869  amplitude += ampldefault; //
10870  absamplitude += abs(ampldefault); //
10872 
10873  if (flagcpuoptimization_ == 0) {
10874  } // if(flagcpuoptimization_== 0
10875  timew += (ii + 1) * abs(ampldefault);
10876  timeww += (ii + 1) * ampldefault;
10877  } //for 1
10879  // sub=4 HF
10880  if (sub == 4) {
10881  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HF
10882  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HF
10883  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HF
10884  }
10885 
10886  pedestalaver9 /= TSsize;
10887  pedestalaver4 /= c4;
10888  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
10889  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
10890 
10891  // ------------ to get signal in TS: -2 max +1 ------------
10892  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
10893  ampl = tool[ts_with_max_signal];
10894  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
10895  ampl += tool[ts_with_max_signal + 2];
10896  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
10897  ampl += tool[ts_with_max_signal + 1];
10898  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
10899  ampl += tool[ts_with_max_signal - 1];
10900 
10901  double ratio = 0.;
10902  // if(amplallTS != 0.) ratio = ampl/amplallTS;
10903  if (amplitude != 0.)
10904  ratio = ampl / amplitude;
10905 
10906  if (ratio < 0. || ratio > 1.02)
10907  ratio = 0.;
10908 
10909  double aveamplitude = 0.;
10910  double aveamplitudew = 0.;
10911  if (absamplitude > 0 && timew > 0)
10912  aveamplitude = timew / absamplitude; // average_TS +1
10913  if (amplitude > 0 && timeww > 0)
10914  aveamplitudew = timeww / amplitude; // average_TS +1
10915 
10916  double rmsamp = 0.;
10917  // and CapIdErrors:
10918  int error = 0;
10919  bool anycapid = true;
10920  bool anyer = false;
10921  bool anydv = true;
10922  int lastcapid = 0;
10923  int capid = 0;
10924  for (int ii = 0; ii < TSsize; ii++) {
10925  double aaaaaa = (ii + 1) - aveamplitudew;
10926  double aaaaaa2 = aaaaaa * aaaaaa;
10927  double ampldefault = tool[ii];
10928  rmsamp += (aaaaaa2 * ampldefault); // fC
10929  capid = ((*digiItr)[ii]).capid();
10930  bool er = (*digiItr)[ii].er(); // error
10931  bool dv = (*digiItr)[ii].dv(); // valid data
10932  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
10933  anycapid = false;
10934  }
10935  // std::cout << " ii = " << ii << " capid = " << capid << " ((lastcapid+1)%4) = " << ((lastcapid+1)%4) << std::endl;
10936  lastcapid = capid;
10937  if (er) {
10938  anyer = true;
10939  }
10940  if (!dv) {
10941  anydv = false;
10942  }
10943  } //for 2
10944 
10945  if (!anycapid || anyer || !anydv)
10946  error = 1;
10947  double rmsamplitude = 0.;
10948  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
10949  rmsamplitude = sqrt(rmsamp / amplitude);
10950  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
10951  if (error == 1) {
10952  if (sub == 4 && mdepth == 1)
10954  if (sub == 4 && mdepth == 2)
10956  }
10957  if (error != 1) {
10958  if (sub == 4 && mdepth == 1)
10960  if (sub == 4 && mdepth == 2)
10962  }
10963 
10964  if (sub == 4) {
10965  // bad_channels with C,A,W,P,pW,
10966  if (error == 1 || amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_ || rmsamplitude < rmsHFMin_ ||
10967  rmsamplitude > rmsHFMax_ || pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ ||
10968  pedestal2 < pedestalHFMax_ || pedestal3 < pedestalHFMax_ || pedestalw0 < pedestalwHFMax_ ||
10969  pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ || pedestalw3 < pedestalwHFMax_
10970 
10971  ) {
10972  for (int ii = 0; ii < TSsize; ii++) {
10973  double ampldefault = tool[ii];
10974  h_shape_bad_channels_HF->Fill(float(ii), ampldefault);
10975  h_shape0_bad_channels_HF->Fill(float(ii), 1.);
10976  }
10977  }
10978  // good_channels with C,A,W,P,pW,
10979  else {
10980  for (int ii = 0; ii < TSsize; ii++) {
10981  double ampldefault = tool[ii];
10982  h_shape_good_channels_HF->Fill(float(ii), ampldefault);
10983  h_shape0_good_channels_HF->Fill(float(ii), 1.);
10984  }
10985  }
10986  } // sub HF
10988  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
10989  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
10990  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; // Pedestals
10991  // HF
10992  if (sub == 4) {
10993  // // // // // // // // // HF PedestalCorrelations :
10995  double mypedestal = pedestal0;
10996  double mypedestalw = pedestalw0;
10997  h2_pedvsampl_HF->Fill(mypedestal, amplitude);
10998  h2_pedwvsampl_HF->Fill(mypedestalw, amplitude);
10999  h_pedvsampl_HF->Fill(mypedestal, amplitude);
11000  h_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11001  h_pedvsampl0_HF->Fill(mypedestal, 1.);
11002  h_pedwvsampl0_HF->Fill(mypedestalw, 1.);
11003  } //
11004  // // // // // // // // // HF Pedestals:
11005  if (studyPedestalsHist_) {
11006  h_pedestal0_HF->Fill(pedestal0, 1.);
11007  h_pedestal1_HF->Fill(pedestal1, 1.);
11008  h_pedestal2_HF->Fill(pedestal2, 1.);
11009  h_pedestal3_HF->Fill(pedestal3, 1.);
11010  h_pedestalaver4_HF->Fill(pedestalaver4, 1.);
11011  h_pedestalaver9_HF->Fill(pedestalaver9, 1.);
11012  h_pedestalw0_HF->Fill(pedestalw0, 1.);
11013  h_pedestalw1_HF->Fill(pedestalw1, 1.);
11014  h_pedestalw2_HF->Fill(pedestalw2, 1.);
11015  h_pedestalw3_HF->Fill(pedestalw3, 1.);
11016  h_pedestalwaver4_HF->Fill(pedestalwaver4, 1.);
11017  h_pedestalwaver9_HF->Fill(pedestalwaver9, 1.);
11018  // for averaged values:
11019  if (mdepth == 1) {
11020  h_mapDepth1Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11021  h_mapDepth1Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11022  h_mapDepth1Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11023  h_mapDepth1Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11024  h_mapDepth1Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11025  h_mapDepth1Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11026  h_mapDepth1Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11027  h_mapDepth1Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11028  }
11029  if (mdepth == 2) {
11030  h_mapDepth2Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11031  h_mapDepth2Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11032  h_mapDepth2Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11033  h_mapDepth2Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11034  h_mapDepth2Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11035  h_mapDepth2Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11036  h_mapDepth2Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11037  h_mapDepth2Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11038  }
11039 
11040  if (pedestalw0 < pedestalwHFMax_ || pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ ||
11041  pedestalw3 < pedestalwHFMax_) {
11042  if (mdepth == 1)
11043  h_mapDepth1pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11044  if (mdepth == 2)
11045  h_mapDepth2pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11046  }
11047 
11048  if (pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ || pedestal2 < pedestalHFMax_ ||
11049  pedestal3 < pedestalHFMax_) {
11050  if (mdepth == 1)
11051  h_mapDepth1pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11052  if (mdepth == 2)
11053  h_mapDepth2pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11054  }
11055 
11056  for (int ii = 0; ii < TSsize; ii++) {
11057  h_pedestal00_HF->Fill(pedestal00->getValue(ii), 1.);
11058  h_gain_HF->Fill(gain->getValue(ii), 1.);
11059  }
11060  h_respcorr_HF->Fill(respcorr->getValue(), 1.);
11061  h_timecorr_HF->Fill(timecorr->getValue(), 1.);
11062  h_lutcorr_HF->Fill(lutcorr->getValue(), 1.);
11063 
11064  } //
11065 
11066  // // // // // // // // // HF ADCAmpl:
11067  if (studyADCAmplHist_) {
11068  h_ADCAmpl_HF->Fill(amplitude, 1.);
11069  h_ADCAmplrest1_HF->Fill(amplitude, 1.);
11070  h_ADCAmplrest6_HF->Fill(amplitude, 1.);
11071 
11072  h_ADCAmplZoom1_HF->Fill(amplitude, 1.);
11073  if (amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_) {
11075  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11076  if (mdepth == 1)
11077  h_mapDepth1ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11078  if (mdepth == 2)
11079  h_mapDepth2ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11080  } // if
11081  // if(amplitude >1500.) averSIGNALoccupancy_HF += 1.;
11082  if (amplitude < 20.) {
11083  if (mdepth == 1)
11084  h_mapDepth1ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11085  if (mdepth == 2)
11086  h_mapDepth2ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11087  } // if
11088 
11089  // for averaged values:
11090  if (mdepth == 1)
11091  h_mapDepth1ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11092  if (mdepth == 2)
11093  h_mapDepth2ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11094  if (mdepth == 1)
11095  h_mapDepth1ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11096  if (mdepth == 2)
11097  h_mapDepth2ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11098 
11099  h_bcnvsamplitude_HF->Fill(float(bcn), amplitude);
11100  h_bcnvsamplitude0_HF->Fill(float(bcn), 1.);
11102  h_orbitNumvsamplitude0_HF->Fill(float(orbitNum), 1.);
11104  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
11105  } //if(studyADCAmplHist_
11107 
11108  // // // // // // // // // HF TSmean:
11109  if (studyTSmeanShapeHist_) {
11110  h_TSmeanA_HF->Fill(aveamplitude1, 1.);
11111  // h2_TSnVsAyear2023_HF->Fill(25.*aveamplitude1, amplitude);
11112  h2_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
11113  h1_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
11114  h1_TSnVsAyear20230_HF->Fill(amplitude, 1.);
11115  if (aveamplitude1 < TSmeanHFMin_ || aveamplitude1 > TSmeanHFMax_) {
11117  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11118  if (mdepth == 1)
11119  h_mapDepth1TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11120  if (mdepth == 2)
11121  h_mapDepth2TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11122  } // if
11123  // for averaged values:
11124  if (mdepth == 1)
11125  h_mapDepth1TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11126  if (mdepth == 2)
11127  h_mapDepth2TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11128 
11130  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
11131  } //if(studyTSmeanShapeHist_
11133  // // // // // // // // // HF TSmax:
11134  if (studyTSmaxShapeHist_) {
11135  h_TSmaxA_HF->Fill(float(ts_with_max_signal), 1.);
11136  if (ts_with_max_signal < TSpeakHFMin_ || ts_with_max_signal > TSpeakHFMax_) {
11138  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11139  if (mdepth == 1)
11140  h_mapDepth1TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11141  if (mdepth == 2)
11142  h_mapDepth2TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11143  } // if
11144  // for averaged values:
11145  if (mdepth == 1)
11146  h_mapDepth1TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11147  if (mdepth == 2)
11148  h_mapDepth2TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11150  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
11151  } //if(studyTSmaxShapeHist_
11153  // // // // // // // // // HF RMS:
11154  if (studyRMSshapeHist_) {
11155  h_Amplitude_HF->Fill(rmsamplitude, 1.);
11156  if (rmsamplitude < rmsHFMin_ || rmsamplitude > rmsHFMax_) {
11158  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11159  if (mdepth == 1)
11160  h_mapDepth1Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11161  if (mdepth == 2)
11162  h_mapDepth2Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11163  } // if
11164  // for averaged values:
11165  if (mdepth == 1)
11166  h_mapDepth1Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11167  if (mdepth == 2)
11168  h_mapDepth2Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11170  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
11171  } //if(studyRMSshapeHist_)
11173  // // // // // // // // // HF Ratio:
11174  if (studyRatioShapeHist_) {
11175  h_Ampl_HF->Fill(ratio, 1.);
11176  if (ratio < ratioHFMin_ || ratio > ratioHFMax_) {
11178  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11179  if (mdepth == 1)
11180  h_mapDepth1Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11181  if (mdepth == 2)
11182  h_mapDepth2Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11183  } //if(ratio
11184  // for averaged values:
11185  if (mdepth == 1)
11186  h_mapDepth1Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11187  if (mdepth == 2)
11188  h_mapDepth2Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11189 
11191  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
11192  } //if(studyRatioShapeHist_)
11193 
11195  // // // // // // // // // HF DiffAmplitude:
11196  if (studyDiffAmplHist_) {
11197  if (mdepth == 1)
11198  h_mapDepth1AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11199  if (mdepth == 2)
11200  h_mapDepth2AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11201  } // if(studyDiffAmplHist_)
11202 
11204  if (mdepth == 1)
11205  h_mapDepth1_HF->Fill(double(ieta), double(iphi), 1.);
11206  if (mdepth == 2)
11207  h_mapDepth2_HF->Fill(double(ieta), double(iphi), 1.);
11208 
11209  } //if ( sub == 4 )
11210 
11211  //
11212 }
11213 
11216  CaloSamples toolOriginal; // TS
11217  double tool[100];
11218  DetId detid = qie10df.detid();
11219  HcalDetId hcaldetid = HcalDetId(detid);
11220  int ieta = hcaldetid.ieta();
11221  if (ieta > 0)
11222  ieta -= 1;
11223  int iphi = hcaldetid.iphi() - 1;
11224  int mdepth = hcaldetid.depth();
11225  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFQIE10DigiCollection: 4-HF)
11226  nTS = qie10df.samples(); // ----------------------------!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11227  /*
11228  # flag HBHE8 HBHE11 HF8 HF10 comments:
11229  # 0 + + + + all
11230  # 1 + - + - old
11231  # 2 - + - + new (2018)
11232  # 3 - + - + new w/o high depthes
11233  # 4 + - + + 2016fall
11234  # 5 + - + + 2016fall w/o high depthes
11235  # 6 + + - + 2017begin
11236  # 7 + + - + 2017begin w/o high depthes in HEonly
11237  # 8 + + - + 2017begin w/o high depthes
11238  # 9 + + + + all w/o high depthes
11239 */
11240  if (mdepth == 0 || sub != 4)
11241  return;
11242  if (mdepth > 2 && flagupgradeqie1011_ == 3)
11243  return;
11244  if (mdepth > 2 && flagupgradeqie1011_ == 5)
11245  return;
11246  if (mdepth > 2 && flagupgradeqie1011_ == 8)
11247  return;
11248  if (mdepth > 2 && flagupgradeqie1011_ == 9)
11249  return;
11251  const HcalPedestal* pedestal00 = conditions->getPedestal(hcaldetid);
11252  const HcalGain* gain = conditions->getGain(hcaldetid);
11253  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(hcaldetid);
11254  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(hcaldetid);
11255  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(hcaldetid);
11256  const HcalQIECoder* channelCoder = conditions->getHcalCoder(hcaldetid);
11257  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(hcaldetid);
11258  HcalCoderDb coder(*channelCoder, *shape);
11259  if (useADCfC_)
11260  coder.adc2fC(qie10df, toolOriginal);
11261  // double noiseADC = qie10df[0].adc();
11263  double pedestalaver9 = 0.;
11264  double pedestalaver4 = 0.;
11265  double pedestal0 = 0.;
11266  double pedestal1 = 0.;
11267  double pedestal2 = 0.;
11268  double pedestal3 = 0.;
11269  double pedestalwaver9 = 0.;
11270  double pedestalwaver4 = 0.;
11271  double pedestalw0 = 0.;
11272  double pedestalw1 = 0.;
11273  double pedestalw2 = 0.;
11274  double pedestalw3 = 0.;
11275  double amplitude = 0.;
11276  double absamplitude = 0.;
11277  double ampl = 0.;
11278  double timew = 0.;
11279  double timeww = 0.;
11280  double max_signal = -100.;
11281  int ts_with_max_signal = -100;
11282  int c0 = 0;
11283  int c1 = 0;
11284  int c2 = 0;
11285  int c3 = 0;
11286  int c4 = 0;
11287  double errorBtype = 0.;
11288 
11289  int TSsize = 3; // HF for Run3
11290  if (nTS != TSsize)
11291  errorBtype = 1.;
11292  TSsize = nTS; // ------------------------!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11293  int flagTS1 = 0;
11294  for (int ii = 0; ii < TSsize; ii++) {
11295  double ampldefault = 0.;
11296  double ampldefault0 = 0.;
11297  double ampldefault1 = 0.;
11298  double ampldefault2 = 0.;
11299  ampldefault0 = adc2fC_QIE10[qie10df[ii].adc()]; // massive
11300  if (useADCfC_)
11301  ampldefault1 = toolOriginal[ii]; //adcfC
11302  ampldefault2 = qie10df[ii].adc(); //ADCcounts
11303  if (useADCmassive_) {
11304  ampldefault = ampldefault0;
11305  }
11306  if (useADCfC_) {
11307  ampldefault = ampldefault1;
11308  }
11309  if (useADCcounts_) {
11310  ampldefault = ampldefault2;
11311  }
11312 
11313  int capid = (qie10df[ii]).capid();
11314  double pedestal = pedestal00->getValue(capid);
11315  double pedestalw = pedw->getSigma(capid, capid);
11316 
11318  ampldefault -= pedestal; // pedestal subtraction
11319 
11320  tool[ii] = ampldefault;
11321 
11322  pedestalaver9 += pedestal;
11323  pedestalwaver9 += pedestalw * pedestalw;
11324 
11325  if (capid == 0 && c0 == 0) {
11326  c0++;
11327  c4++;
11328  pedestalaver4 += pedestal;
11329  pedestal0 = pedestal;
11330  pedestalw0 = pedestalw;
11331  pedestalwaver4 += pedestalw * pedestalw;
11332  }
11333 
11334  if (capid == 1 && c1 == 0) {
11335  c1++;
11336  c4++;
11337  pedestalaver4 += pedestal;
11338  pedestal1 = pedestal;
11339  pedestalw1 = pedestalw;
11340  pedestalwaver4 += pedestalw * pedestalw;
11341  }
11342  if (capid == 2 && c2 == 0) {
11343  c2++;
11344  c4++;
11345  pedestalaver4 += pedestal;
11346  pedestal2 = pedestal;
11347  pedestalw2 = pedestalw;
11348  pedestalwaver4 += pedestalw * pedestalw;
11349  }
11350  if (capid == 3 && c3 == 0) {
11351  c3++;
11352  c4++;
11353  pedestalaver4 += pedestal;
11354  pedestal3 = pedestal;
11355  pedestalw3 = pedestalw;
11356  pedestalwaver4 += pedestalw * pedestalw;
11357  }
11358 
11359  if (max_signal < ampldefault) {
11360  max_signal = ampldefault;
11361  ts_with_max_signal = ii;
11362  }
11363  amplitude += ampldefault; //
11364  absamplitude += abs(ampldefault); //
11366  timew += (ii + 1) * abs(ampldefault);
11367  timeww += (ii + 1) * ampldefault;
11368  if (ii == 1 && ampldefault > 0.)
11369  flagTS1 = 1;
11370  } //for 1
11372  // sub=4 HF
11373  if (sub == 4) {
11374  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HF
11375  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HF
11376  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HF
11377  } // just in case against any violations
11378 
11379  pedestalaver9 /= TSsize;
11380  pedestalaver4 /= c4;
11381  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
11382  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
11383 
11384  // ------------ to get signal in TS: -2 max +1 ------------
11385  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
11386  ampl = tool[ts_with_max_signal];
11387  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
11388  ampl += tool[ts_with_max_signal + 2];
11389  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
11390  ampl += tool[ts_with_max_signal + 1];
11391  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
11392  ampl += tool[ts_with_max_signal - 1];
11393 
11394  double ratio = 0.;
11395  // if(amplallTS != 0.) ratio = ampl/amplallTS;
11396  if (amplitude != 0.)
11397  ratio = ampl / amplitude;
11398  if (ratio < 0. || ratio > 1.02)
11399  ratio = 0.;
11400  double aveamplitude = 0.;
11401  double aveamplitudew = 0.;
11402  if (absamplitude > 0 && timew > 0)
11403  aveamplitude = timew / absamplitude; // average_TS +1
11404  if (amplitude > 0 && timeww > 0)
11405  aveamplitudew = timeww / amplitude; // average_TS +1
11406 
11407  double rmsamp = 0.;
11408  int error = 0;
11409  bool anycapid = true;
11410  int lastcapid = 0;
11411  int capid = 0;
11412  for (int ii = 0; ii < TSsize; ii++) {
11413  double aaaaaa = (ii + 1) - aveamplitudew;
11414  double aaaaaa2 = aaaaaa * aaaaaa;
11415  double ampldefault = tool[ii];
11416  rmsamp += (aaaaaa2 * ampldefault); // fC
11417  capid = (qie10df[ii]).capid();
11418  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
11419  anycapid = false;
11420  }
11421  lastcapid = capid;
11422  } //for 2
11423 
11424  if (!anycapid)
11425  error = 1;
11426  double rmsamplitude = 0.;
11427  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
11428  rmsamplitude = sqrt(rmsamp / amplitude);
11429  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
11430 
11431  // CapIdErrors end /////////////////////////////////////////////////////////
11432  // AZ 1.10.2015:
11433  if (error == 1) {
11434  if (sub == 4 && mdepth == 1)
11436  if (sub == 4 && mdepth == 2)
11438  }
11439  if (error != 1) {
11440  if (sub == 4 && mdepth == 1)
11442  if (sub == 4 && mdepth == 2)
11444  }
11445 
11446  if (sub == 4) {
11447  // bad_channels with C,A,W,P,pW,
11448  if (error == 1 || amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_ || rmsamplitude < rmsHFMin_ ||
11449  rmsamplitude > rmsHFMax_ || pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ ||
11450  pedestal2 < pedestalHFMax_ || pedestal3 < pedestalHFMax_ || pedestalw0 < pedestalwHFMax_ ||
11451  pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ || pedestalw3 < pedestalwHFMax_
11452 
11453  ) {
11454  for (int ii = 0; ii < TSsize; ii++) {
11455  double ampldefault = tool[ii];
11456  h_shape_bad_channels_HF->Fill(float(ii), ampldefault);
11457  h_shape0_bad_channels_HF->Fill(float(ii), 1.);
11458  }
11459  }
11460  // good_channels with C,A,W,P,pW,
11461  else {
11462  for (int ii = 0; ii < TSsize; ii++) {
11463  double ampldefault = tool[ii];
11464  h_shape_good_channels_HF->Fill(float(ii), ampldefault);
11465  h_shape0_good_channels_HF->Fill(float(ii), 1.);
11466  }
11467  }
11468  } // sub HFQIE10
11470  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
11471  // for Error B-type
11472  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
11473  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; // Pedestals
11474  // HFQIE10
11475  if (sub == 4) {
11476  // // // // // // // // // HFQIE10 PedestalCorrelations :
11478  double mypedestal = pedestal0;
11479  double mypedestalw = pedestalw0;
11480  h2_pedvsampl_HF->Fill(mypedestal, amplitude);
11481  h2_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11482  h_pedvsampl_HF->Fill(mypedestal, amplitude);
11483  h_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11484  h_pedvsampl0_HF->Fill(mypedestal, 1.);
11485  h_pedwvsampl0_HF->Fill(mypedestalw, 1.);
11486  } //
11487  // // // // // // // // // HFQIE10 Pedestals:
11488  if (studyPedestalsHist_) {
11489  h_pedestal0_HF->Fill(pedestal0, 1.);
11490  h_pedestal1_HF->Fill(pedestal1, 1.);
11491  h_pedestal2_HF->Fill(pedestal2, 1.);
11492  h_pedestal3_HF->Fill(pedestal3, 1.);
11493  h_pedestalaver4_HF->Fill(pedestalaver4, 1.);
11494  h_pedestalaver9_HF->Fill(pedestalaver9, 1.);
11495  h_pedestalw0_HF->Fill(pedestalw0, 1.);
11496  h_pedestalw1_HF->Fill(pedestalw1, 1.);
11497  h_pedestalw2_HF->Fill(pedestalw2, 1.);
11498  h_pedestalw3_HF->Fill(pedestalw3, 1.);
11499  h_pedestalwaver4_HF->Fill(pedestalwaver4, 1.);
11500  h_pedestalwaver9_HF->Fill(pedestalwaver9, 1.);
11501  // for averaged values:
11502  if (mdepth == 1) {
11503  h_mapDepth1Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11504  h_mapDepth1Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11505  h_mapDepth1Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11506  h_mapDepth1Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11507  h_mapDepth1Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11508  h_mapDepth1Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11509  h_mapDepth1Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11510  h_mapDepth1Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11511  }
11512  if (mdepth == 2) {
11513  h_mapDepth2Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11514  h_mapDepth2Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11515  h_mapDepth2Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11516  h_mapDepth2Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11517  h_mapDepth2Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11518  h_mapDepth2Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11519  h_mapDepth2Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11520  h_mapDepth2Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11521  }
11522 
11523  if (pedestalw0 < pedestalwHFMax_ || pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ ||
11524  pedestalw3 < pedestalwHFMax_) {
11525  if (mdepth == 1)
11526  h_mapDepth1pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11527  if (mdepth == 2)
11528  h_mapDepth2pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11529  if (mdepth == 3)
11530  h_mapDepth3pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11531  if (mdepth == 4)
11532  h_mapDepth4pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11533  }
11534 
11535  if (pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ || pedestal2 < pedestalHFMax_ ||
11536  pedestal3 < pedestalHFMax_) {
11537  if (mdepth == 1)
11538  h_mapDepth1pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11539  if (mdepth == 2)
11540  h_mapDepth2pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11541  if (mdepth == 3)
11542  h_mapDepth3pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11543  if (mdepth == 4)
11544  h_mapDepth4pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11545  }
11546 
11547  for (int ii = 0; ii < TSsize; ii++) {
11548  h_pedestal00_HF->Fill(pedestal00->getValue(ii), 1.);
11549  h_gain_HF->Fill(gain->getValue(ii), 1.);
11550  }
11551  h_respcorr_HF->Fill(respcorr->getValue(), 1.);
11552  h_timecorr_HF->Fill(timecorr->getValue(), 1.);
11553  h_lutcorr_HF->Fill(lutcorr->getValue(), 1.);
11554 
11555  } //
11556 
11557  // // // // // // // // // HFQIE10 ADCAmpl:
11558  if (studyADCAmplHist_) {
11559  h_ADCAmpl_HF->Fill(amplitude, 1.);
11560  h_ADCAmplrest1_HF->Fill(amplitude, 1.);
11561  h_ADCAmplrest6_HF->Fill(amplitude, 1.);
11562 
11563  h_ADCAmplZoom1_HF->Fill(amplitude, 1.);
11564  if (amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_) {
11566  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11567  if (mdepth == 1)
11568  h_mapDepth1ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11569  if (mdepth == 2)
11570  h_mapDepth2ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11571  if (mdepth == 3)
11572  h_mapDepth3ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11573  if (mdepth == 4)
11574  h_mapDepth4ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11575  } // if
11576  // if(amplitude >1500.) averSIGNALoccupancy_HF += 1.;
11577  if (amplitude < 20.) {
11578  if (mdepth == 1)
11579  h_mapDepth1ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11580  if (mdepth == 2)
11581  h_mapDepth2ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11582  if (mdepth == 3)
11583  h_mapDepth3ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11584  if (mdepth == 4)
11585  h_mapDepth4ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11586  } // if
11587 
11588  // for averaged values:
11589  if (mdepth == 1)
11590  h_mapDepth1ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11591  if (mdepth == 2)
11592  h_mapDepth2ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11593  if (mdepth == 3)
11594  h_mapDepth3ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11595  if (mdepth == 4)
11596  h_mapDepth4ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11597  if (mdepth == 1)
11598  h_mapDepth1ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11599  if (mdepth == 2)
11600  h_mapDepth2ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11601  if (mdepth == 3)
11602  h_mapDepth3ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11603  if (mdepth == 4)
11604  h_mapDepth4ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11605 
11606  h_bcnvsamplitude_HF->Fill(float(bcn), amplitude);
11607  h_bcnvsamplitude0_HF->Fill(float(bcn), 1.);
11609  h_orbitNumvsamplitude0_HF->Fill(float(orbitNum), 1.);
11611  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
11612  } //if(studyADCAmplHist_
11613  // // // // // // // // // HFQIE10 TSmean:
11614  if (studyTSmeanShapeHist_) {
11615  h_TSmeanA_HF->Fill(aveamplitude1, 1.);
11616  // h2_TSnVsAyear2023_HF->Fill(25.*aveamplitude1, amplitude);
11617  h2_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
11618  h1_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
11619  h1_TSnVsAyear20230_HF->Fill(amplitude, 1.);
11620  if (aveamplitude1 < TSmeanHFMin_ || aveamplitude1 > TSmeanHFMax_) {
11622  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11623  if (mdepth == 1)
11624  h_mapDepth1TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11625  if (mdepth == 2)
11626  h_mapDepth2TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11627  if (mdepth == 3)
11628  h_mapDepth3TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11629  if (mdepth == 4)
11630  h_mapDepth4TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11631  } // if
11632  // for averaged values:
11633  if (mdepth == 1)
11634  h_mapDepth1TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11635  if (mdepth == 2)
11636  h_mapDepth2TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11637  if (mdepth == 3)
11638  h_mapDepth3TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11639  if (mdepth == 4)
11640  h_mapDepth4TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11641 
11643  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
11644  } //if(studyTSmeanShapeHist_
11646  // // // // // // // // // HFQIE10 TSmax:
11647  if (studyTSmaxShapeHist_) {
11648  h_TSmaxA_HF->Fill(float(ts_with_max_signal), 1.);
11649  if (ts_with_max_signal < TSpeakHFMin_ || ts_with_max_signal > TSpeakHFMax_) {
11651  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11652  if (mdepth == 1)
11653  h_mapDepth1TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11654  if (mdepth == 2)
11655  h_mapDepth2TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11656  if (mdepth == 3)
11657  h_mapDepth3TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11658  if (mdepth == 4)
11659  h_mapDepth4TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11660  } // if
11661  // for averaged values:
11662  if (mdepth == 1)
11663  h_mapDepth1TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11664  if (mdepth == 2)
11665  h_mapDepth2TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11666  if (mdepth == 3)
11667  h_mapDepth3TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11668  if (mdepth == 4)
11669  h_mapDepth4TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11670 
11672  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
11673  } //if(studyTSmaxShapeHist_
11675  // // // // // // // // // HFQIE10 RMS:
11676  if (studyRMSshapeHist_) {
11677  h_Amplitude_HF->Fill(rmsamplitude, 1.);
11678  if (rmsamplitude < rmsHFMin_ || rmsamplitude > rmsHFMax_) {
11680  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11681  if (mdepth == 1)
11682  h_mapDepth1Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11683  if (mdepth == 2)
11684  h_mapDepth2Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11685  if (mdepth == 3)
11686  h_mapDepth3Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11687  if (mdepth == 4)
11688  h_mapDepth4Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11689  } // if
11690  // for averaged values:
11691 
11692  if (mdepth == 1)
11693  h_mapDepth1Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11694  if (mdepth == 2)
11695  h_mapDepth2Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11696  if (mdepth == 3)
11697  h_mapDepth3Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11698  if (mdepth == 4)
11699  h_mapDepth4Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11701  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
11702  } //if(studyRMSshapeHist_)
11704  // // // // // // // // // HFQIE10 Ratio:
11705  if (studyRatioShapeHist_) {
11706  h_Ampl_HF->Fill(ratio, 1.);
11707  if (ratio < ratioHFMin_ || ratio > ratioHFMax_) {
11709  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11710  if (mdepth == 1)
11711  h_mapDepth1Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11712  if (mdepth == 2)
11713  h_mapDepth2Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11714  if (mdepth == 3)
11715  h_mapDepth3Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11716  if (mdepth == 4)
11717  h_mapDepth4Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11718  } //if(ratio
11719  // for averaged values:
11720  if (mdepth == 1)
11721  h_mapDepth1Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11722  if (mdepth == 2)
11723  h_mapDepth2Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11724  if (mdepth == 3)
11725  h_mapDepth3Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11726  if (mdepth == 4)
11727  h_mapDepth4Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11728 
11730  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
11731  } //if(studyRatioShapeHist_)
11732 
11734  // // // // // // // // // HFQIE10 DiffAmplitude:
11735  if (studyDiffAmplHist_) {
11736  if (mdepth == 1)
11737  h_mapDepth1AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11738  if (mdepth == 2)
11739  h_mapDepth2AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11740  if (mdepth == 3)
11741  h_mapDepth3AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11742  if (mdepth == 4)
11743  h_mapDepth4AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11744  } // if(studyDiffAmplHist_)
11745 
11747  if (mdepth == 1)
11748  h_mapDepth1_HF->Fill(double(ieta), double(iphi), 1.);
11749  if (mdepth == 2)
11750  h_mapDepth2_HF->Fill(double(ieta), double(iphi), 1.);
11751  if (mdepth == 3)
11752  h_mapDepth3_HF->Fill(double(ieta), double(iphi), 1.);
11753  if (mdepth == 4)
11754  h_mapDepth4_HF->Fill(double(ieta), double(iphi), 1.);
11755 
11756  if (flagTS1 == 1) {
11757  if (mdepth == 1)
11758  h_mapDepth1TS1_HF->Fill(double(ieta), double(iphi), 1.);
11759  if (mdepth == 2)
11760  h_mapDepth2TS1_HF->Fill(double(ieta), double(iphi), 1.);
11761  if (mdepth == 3)
11762  h_mapDepth3TS1_HF->Fill(double(ieta), double(iphi), 1.);
11763  if (mdepth == 4)
11764  h_mapDepth4TS1_HF->Fill(double(ieta), double(iphi), 1.);
11765  } // for TS = 1
11766 
11767  } //if ( sub == 4 )
11768 
11769  //
11770 }
11771 
11774  CaloSamples toolOriginal; // TS
11775  double tool[100];
11776  HcalDetId cell(digiItr->id());
11777  int mdepth = cell.depth();
11778  int iphi = cell.iphi() - 1; // 0-71
11779  int ieta = cell.ieta();
11780  if (ieta > 0)
11781  ieta -= 1; //-41 +41
11782  int sub = cell.subdet(); // (HODigiCollection: 3-HO)
11783  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
11784  const HcalGain* gain = conditions->getGain(cell);
11785  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
11786  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
11787  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
11788  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
11789  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
11790  HcalCoderDb coder(*channelCoder, *shape);
11791  if (useADCfC_)
11792  coder.adc2fC(*digiItr, toolOriginal);
11793  double pedestalaver9 = 0.;
11794  double pedestalaver4 = 0.;
11795  double pedestal0 = 0.;
11796  double pedestal1 = 0.;
11797  double pedestal2 = 0.;
11798  double pedestal3 = 0.;
11799  double pedestalwaver9 = 0.;
11800  double pedestalwaver4 = 0.;
11801  double pedestalw0 = 0.;
11802  double pedestalw1 = 0.;
11803  double pedestalw2 = 0.;
11804  double pedestalw3 = 0.;
11805  double amplitude = 0.;
11806  double absamplitude = 0.;
11807  double ampl = 0.;
11808  double timew = 0.;
11809  double timeww = 0.;
11810  double max_signal = -100.;
11811  int ts_with_max_signal = -100;
11812  int c0 = 0;
11813  int c1 = 0;
11814  int c2 = 0;
11815  int c3 = 0;
11816  int c4 = 0;
11817  double errorBtype = 0.;
11818  int TSsize = 10; //HO
11819  if ((*digiItr).size() != TSsize)
11820  errorBtype = 1.;
11821  TSsize = digiItr->size();
11822  int flagTS012 = 0;
11823  for (int ii = 0; ii < TSsize; ii++) {
11824  double ampldefault = 0.;
11825  double ampldefault0 = 0.;
11826  double ampldefault1 = 0.;
11827  double ampldefault2 = 0.;
11828  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive
11829  if (useADCfC_)
11830  ampldefault1 = toolOriginal[ii]; //adcfC
11831  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts
11832  if (useADCmassive_) {
11833  ampldefault = ampldefault0;
11834  }
11835  if (useADCfC_) {
11836  ampldefault = ampldefault1;
11837  }
11838  if (useADCcounts_) {
11839  ampldefault = ampldefault2;
11840  }
11841  int capid = ((*digiItr)[ii]).capid();
11842  double pedestal = pedestal00->getValue(capid);
11843  double pedestalw = pedw->getSigma(capid, capid);
11845  ampldefault -= pedestal; // pedestal subtraction
11846  tool[ii] = ampldefault;
11847  pedestalaver9 += pedestal;
11848  pedestalwaver9 += pedestalw * pedestalw;
11849  if (capid == 0 && c0 == 0) {
11850  c0++;
11851  c4++;
11852  pedestalaver4 += pedestal;
11853  pedestal0 = pedestal;
11854  pedestalw0 = pedestalw;
11855  pedestalwaver4 += pedestalw * pedestalw;
11856  }
11857  if (capid == 1 && c1 == 0) {
11858  c1++;
11859  c4++;
11860  pedestalaver4 += pedestal;
11861  pedestal1 = pedestal;
11862  pedestalw1 = pedestalw;
11863  pedestalwaver4 += pedestalw * pedestalw;
11864  }
11865  if (capid == 2 && c2 == 0) {
11866  c2++;
11867  c4++;
11868  pedestalaver4 += pedestal;
11869  pedestal2 = pedestal;
11870  pedestalw2 = pedestalw;
11871  pedestalwaver4 += pedestalw * pedestalw;
11872  }
11873  if (capid == 3 && c3 == 0) {
11874  c3++;
11875  c4++;
11876  pedestalaver4 += pedestal;
11877  pedestal3 = pedestal;
11878  pedestalw3 = pedestalw;
11879  pedestalwaver4 += pedestalw * pedestalw;
11880  }
11881 
11882  if (max_signal < ampldefault) {
11883  max_signal = ampldefault;
11884  ts_with_max_signal = ii;
11885  }
11886  amplitude += ampldefault;
11887  absamplitude += abs(ampldefault);
11889  if (flagcpuoptimization_ == 0) {
11890  }
11891  timew += (ii + 1) * abs(ampldefault);
11892  timeww += (ii + 1) * ampldefault;
11893  if (ii < 3 && ampldefault > 0.)
11894  flagTS012 = 1;
11895  } //for 1
11896  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HO
11897 
11898  pedestalaver9 /= TSsize;
11899  pedestalaver4 /= c4;
11900  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
11901  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
11902  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
11903  ampl = tool[ts_with_max_signal];
11904  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
11905  ampl += tool[ts_with_max_signal + 2];
11906  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
11907  ampl += tool[ts_with_max_signal + 1];
11908  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
11909  ampl += tool[ts_with_max_signal - 1];
11910  double ratio = 0.;
11911  if (amplitude != 0.)
11912  ratio = ampl / amplitude;
11913  if (ratio < 0. || ratio > 1.04)
11914  ratio = 0.;
11915  double aveamplitude = 0.;
11916  double aveamplitudew = 0.;
11917  if (absamplitude > 0 && timew > 0)
11918  aveamplitude = timew / absamplitude; // average_TS +1
11919  if (amplitude > 0 && timeww > 0)
11920  aveamplitudew = timeww / amplitude; // average_TS +1
11921  double rmsamp = 0.;
11922  int error = 0;
11923  bool anycapid = true;
11924  bool anyer = false;
11925  bool anydv = true;
11926  int lastcapid = 0;
11927  int capid = 0;
11928  for (int ii = 0; ii < TSsize; ii++) {
11929  double aaaaaa = (ii + 1) - aveamplitudew;
11930  double aaaaaa2 = aaaaaa * aaaaaa;
11931  double ampldefault = tool[ii];
11932  rmsamp += (aaaaaa2 * ampldefault); // fC
11933  capid = ((*digiItr)[ii]).capid();
11934  bool er = (*digiItr)[ii].er(); // error
11935  bool dv = (*digiItr)[ii].dv(); // valid data
11936  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
11937  anycapid = false;
11938  }
11939  lastcapid = capid;
11940  if (er) {
11941  anyer = true;
11942  }
11943  if (!dv) {
11944  anydv = false;
11945  }
11946  } //for 2
11947 
11948  if (!anycapid || anyer || !anydv)
11949  error = 1;
11950  double rmsamplitude = 0.;
11951  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
11952  rmsamplitude = sqrt(rmsamp / amplitude);
11953  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
11954  if (error == 1) {
11955  if (sub == 3 && mdepth == 4)
11957  }
11958  if (error != 1) {
11959  if (sub == 3 && mdepth == 4)
11961  }
11962 
11963  if (sub == 3) {
11964  if (error == 1 || amplitude < ADCAmplHOMin_ || amplitude > ADCAmplHOMax_ || rmsamplitude < rmsHOMin_ ||
11965  rmsamplitude > rmsHOMax_ || pedestal0 < pedestalHOMax_ || pedestal1 < pedestalHOMax_ ||
11966  pedestal2 < pedestalHOMax_ || pedestal3 < pedestalHOMax_ || pedestalw0 < pedestalwHOMax_ ||
11967  pedestalw1 < pedestalwHOMax_ || pedestalw2 < pedestalwHOMax_ || pedestalw3 < pedestalwHOMax_
11968 
11969  ) {
11970  for (int ii = 0; ii < TSsize; ii++) {
11971  double ampldefault = tool[ii];
11972  h_shape_bad_channels_HO->Fill(float(ii), ampldefault);
11973  h_shape0_bad_channels_HO->Fill(float(ii), 1.);
11974  }
11975  } else {
11976  for (int ii = 0; ii < TSsize; ii++) {
11977  double ampldefault = tool[ii];
11978  h_shape_good_channels_HO->Fill(float(ii), ampldefault);
11979  h_shape0_good_channels_HO->Fill(float(ii), 1.);
11980  }
11981  }
11982  } // sub HO
11984  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
11985  // for Error B-type
11986  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
11987  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
11988  // HO
11989  if (sub == 3) {
11991  double mypedestal = pedestal0;
11992  double mypedestalw = pedestalw0;
11993  h2_pedvsampl_HO->Fill(mypedestal, amplitude);
11994  h2_pedwvsampl_HO->Fill(mypedestalw, amplitude);
11995  h_pedvsampl_HO->Fill(mypedestal, amplitude);
11996  h_pedwvsampl_HO->Fill(mypedestalw, amplitude);
11997  h_pedvsampl0_HO->Fill(mypedestal, 1.);
11998  h_pedwvsampl0_HO->Fill(mypedestalw, 1.);
11999  } //
12000  // // // // // // // // // HO Pedestals:
12001  if (studyPedestalsHist_) {
12002  h_pedestal0_HO->Fill(pedestal0, 1.);
12003  h_pedestal1_HO->Fill(pedestal1, 1.);
12004  h_pedestal2_HO->Fill(pedestal2, 1.);
12005  h_pedestal3_HO->Fill(pedestal3, 1.);
12006  h_pedestalaver4_HO->Fill(pedestalaver4, 1.);
12007  h_pedestalaver9_HO->Fill(pedestalaver9, 1.);
12008  h_pedestalw0_HO->Fill(pedestalw0, 1.);
12009  h_pedestalw1_HO->Fill(pedestalw1, 1.);
12010  h_pedestalw2_HO->Fill(pedestalw2, 1.);
12011  h_pedestalw3_HO->Fill(pedestalw3, 1.);
12012  h_pedestalwaver4_HO->Fill(pedestalwaver4, 1.);
12013  h_pedestalwaver9_HO->Fill(pedestalwaver9, 1.);
12014  // for averaged values:
12015  if (mdepth == 4) {
12016  h_mapDepth4Ped0_HO->Fill(double(ieta), double(iphi), pedestal0);
12017  h_mapDepth4Ped1_HO->Fill(double(ieta), double(iphi), pedestal1);
12018  h_mapDepth4Ped2_HO->Fill(double(ieta), double(iphi), pedestal2);
12019  h_mapDepth4Ped3_HO->Fill(double(ieta), double(iphi), pedestal3);
12020  h_mapDepth4Pedw0_HO->Fill(double(ieta), double(iphi), pedestalw0);
12021  h_mapDepth4Pedw1_HO->Fill(double(ieta), double(iphi), pedestalw1);
12022  h_mapDepth4Pedw2_HO->Fill(double(ieta), double(iphi), pedestalw2);
12023  h_mapDepth4Pedw3_HO->Fill(double(ieta), double(iphi), pedestalw3);
12024  }
12025  if (pedestalw0 < pedestalwHOMax_ || pedestalw1 < pedestalwHOMax_ || pedestalw2 < pedestalwHOMax_ ||
12026  pedestalw3 < pedestalwHOMax_) {
12027  if (mdepth == 4)
12028  h_mapDepth4pedestalw_HO->Fill(double(ieta), double(iphi), 1.);
12029  }
12030  if (pedestal0 < pedestalHOMax_ || pedestal1 < pedestalHOMax_ || pedestal2 < pedestalHOMax_ ||
12031  pedestal3 < pedestalHOMax_) {
12032  if (mdepth == 4)
12033  h_mapDepth4pedestal_HO->Fill(double(ieta), double(iphi), 1.);
12034  }
12035  for (int ii = 0; ii < TSsize; ii++) {
12036  h_pedestal00_HO->Fill(pedestal00->getValue(ii), 1.);
12037  h_gain_HO->Fill(gain->getValue(ii), 1.);
12038  }
12039  h_respcorr_HO->Fill(respcorr->getValue(), 1.);
12040  h_timecorr_HO->Fill(timecorr->getValue(), 1.);
12041  h_lutcorr_HO->Fill(lutcorr->getValue(), 1.);
12042  } //
12043  // // // // // // // // // HO ADCAmpl:
12044  if (studyADCAmplHist_) {
12045  h_ADCAmpl_HO->Fill(amplitude, 1.);
12046  h_ADCAmplrest1_HO->Fill(amplitude, 1.);
12047  h_ADCAmplrest6_HO->Fill(amplitude, 1.);
12048 
12049  h_ADCAmplZoom1_HO->Fill(amplitude, 1.);
12050  h_ADCAmpl_HO_copy->Fill(amplitude, 1.);
12051  if (amplitude < ADCAmplHOMin_ || amplitude > ADCAmplHOMax_) {
12053  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12054  if (mdepth == 4)
12055  h_mapDepth4ADCAmpl225_HO->Fill(double(ieta), double(iphi), 1.);
12056  } // if
12057  // if(amplitude >2000.) averSIGNALoccupancy_HO += 1.;
12058 
12059  if (amplitude < 100.) {
12060  if (mdepth == 4)
12061  h_mapDepth4ADCAmpl225Copy_HO->Fill(double(ieta), double(iphi), 1.);
12062  } // if
12063  // for averaged values:
12064  if (mdepth == 4)
12065  h_mapDepth4ADCAmpl_HO->Fill(double(ieta), double(iphi), amplitude);
12066  if (mdepth == 4)
12067  h_mapDepth4ADCAmpl12_HO->Fill(double(ieta), double(iphi), ampl);
12068 
12069  h_bcnvsamplitude_HO->Fill(float(bcn), amplitude);
12070  h_bcnvsamplitude0_HO->Fill(float(bcn), 1.);
12071 
12073  h_orbitNumvsamplitude0_HO->Fill(float(orbitNum), 1.);
12075  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
12076  } //if(studyADCAmplHist_
12077  if (studyTSmeanShapeHist_) {
12078  h_TSmeanA_HO->Fill(aveamplitude1, 1.);
12079  // h2_TSnVsAyear2023_HO->Fill(25.*aveamplitude1, amplitude);
12080  h2_TSnVsAyear2023_HO->Fill(amplitude, 25. * aveamplitude1);
12081  h1_TSnVsAyear2023_HO->Fill(amplitude, 25. * aveamplitude1);
12082  h1_TSnVsAyear20230_HO->Fill(amplitude, 1.);
12083  if (aveamplitude1 < TSmeanHOMin_ || aveamplitude1 > TSmeanHOMax_) {
12085  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12086  if (mdepth == 4)
12087  h_mapDepth4TSmeanA225_HO->Fill(double(ieta), double(iphi), 1.);
12088  } // if
12089  if (mdepth == 4)
12090  h_mapDepth4TSmeanA_HO->Fill(double(ieta), double(iphi), aveamplitude1);
12092  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
12093  } //if(studyTSmeanShapeHist_
12094  if (studyTSmaxShapeHist_) {
12095  h_TSmaxA_HO->Fill(float(ts_with_max_signal), 1.);
12096  if (ts_with_max_signal < TSpeakHOMin_ || ts_with_max_signal > TSpeakHOMax_) {
12098  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12099  if (mdepth == 4)
12100  h_mapDepth4TSmaxA225_HO->Fill(double(ieta), double(iphi), 1.);
12101  } // if
12102  // for averaged values:
12103  if (mdepth == 4)
12104  h_mapDepth4TSmaxA_HO->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
12106  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
12107  } //if(studyTSmaxShapeHist_
12108  if (studyRMSshapeHist_) {
12109  h_Amplitude_HO->Fill(rmsamplitude, 1.);
12110  if (rmsamplitude < rmsHOMin_ || rmsamplitude > rmsHOMax_) {
12112  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12113  if (mdepth == 4)
12114  h_mapDepth4Amplitude225_HO->Fill(double(ieta), double(iphi), 1.);
12115  } // if
12116  if (mdepth == 4)
12117  h_mapDepth4Amplitude_HO->Fill(double(ieta), double(iphi), rmsamplitude);
12119  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
12120  } //if(studyRMSshapeHist_)
12121  if (studyRatioShapeHist_) {
12122  h_Ampl_HO->Fill(ratio, 1.);
12123  if (ratio < ratioHOMin_ || ratio > ratioHOMax_) {
12125  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12126  if (mdepth == 4)
12127  h_mapDepth4Ampl047_HO->Fill(double(ieta), double(iphi), 1.);
12128  } //if(ratio
12129  if (mdepth == 4)
12130  h_mapDepth4Ampl_HO->Fill(double(ieta), double(iphi), ratio);
12132  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
12133  } //if(studyRatioShapeHist_)
12134  if (studyDiffAmplHist_) {
12135  if (mdepth == 4)
12136  h_mapDepth4AmplE34_HO->Fill(double(ieta), double(iphi), amplitude);
12137  } // if(studyDiffAmplHist_)
12138  if (mdepth == 4) {
12139  h_mapDepth4_HO->Fill(double(ieta), double(iphi), 1.);
12140  if (flagTS012 == 1)
12141  h_mapDepth4TS012_HO->Fill(double(ieta), double(iphi), 1.);
12142  }
12143  } //if ( sub == 3 )
12144 }
12145 int CMTRawAnalyzer::getRBX(int& kdet, int& keta, int& kphi) {
12146  int cal_RBX = 0;
12147  if (kdet == 1 || kdet == 2) {
12148  if (kphi == 71)
12149  cal_RBX = 0;
12150  else
12151  cal_RBX = (kphi + 1) / 4;
12152  cal_RBX = cal_RBX + 18 * (keta + 1) / 2;
12153  }
12154  if (kdet == 4) {
12155  cal_RBX = (int)(kphi / 18) + 1;
12156  }
12157  if (kdet == 3) {
12158  if (keta == -2) {
12159  if (kphi == 71)
12160  cal_RBX = 0;
12161  else
12162  cal_RBX = kphi / 12 + 1;
12163  }
12164  if (keta == -1) {
12165  if (kphi == 71)
12166  cal_RBX = 6;
12167  else
12168  cal_RBX = kphi / 12 + 1 + 6;
12169  }
12170  if (keta == 0) {
12171  if (kphi == 71)
12172  cal_RBX = 12;
12173  else
12174  cal_RBX = kphi / 6 + 1 + 12;
12175  }
12176  if (keta == 1) {
12177  if (kphi == 71)
12178  cal_RBX = 24;
12179  else
12180  cal_RBX = kphi / 12 + 1 + 24;
12181  }
12182  if (keta == 2) {
12183  if (kphi == 71)
12184  cal_RBX = 30;
12185  else
12186  cal_RBX = kphi / 12 + 1 + 30;
12187  }
12188  }
12189  return cal_RBX;
12190 }
12191 void CMTRawAnalyzer::beginRun(const edm::Run& r, const edm::EventSetup& iSetup) {}
12192 void CMTRawAnalyzer::endRun(const edm::Run& r, const edm::EventSetup& iSetup) {
12194  } // if flag...
12196  lscounterM1 = lscounter - 1;
12197  } else {
12198  lscounterM1 = ls0;
12199  }
12200  if (ls0 != -1)
12201  h_nevents_per_eachRealLS->Fill(float(lscounterM1), float(nevcounter)); //
12202  h_nevents_per_LS->Fill(float(nevcounter));
12203  h_nevents_per_LSzoom->Fill(float(nevcounter));
12205  if (nevcounter0 != 0) {
12206  for (int k0 = 0; k0 < nsub; k0++) {
12207  for (int k1 = 0; k1 < ndepth; k1++) {
12208  for (int k2 = 0; k2 < neta; k2++) {
12209  for (int k3 = 0; k3 < nphi; k3++) {
12210  int ieta = k2 - 41;
12211  if (sumEstimator0[k0][k1][k2][k3] != 0.) {
12212  double bbbc = 0.;
12213  if (flagestimatornormalization_ == 0)
12214  bbbc = sumEstimator0[k0][k1][k2][k3] / nevcounter0;
12215  if (flagestimatornormalization_ == 1)
12216  bbbc = sumEstimator0[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12217  double bbb1 = 1.;
12218  if (flagestimatornormalization_ == 2) {
12219  bbbc = sumEstimator0[k0][k1][k2][k3];
12220  bbb1 = sum0Estimator[k0][k1][k2][k3];
12221  }
12222  if (k0 == 0) {
12223  if (k1 + 1 == 1) {
12224  h_sumPedestalLS1->Fill(bbbc / bbb1);
12225  h_2DsumPedestalLS1->Fill(double(ieta), double(k3), bbbc);
12226  h_2D0sumPedestalLS1->Fill(double(ieta), double(k3), bbb1);
12227  h_sumPedestalperLS1->Fill(float(lscounterM1), bbbc);
12228  h_sum0PedestalperLS1->Fill(float(lscounterM1), bbb1);
12229  }
12230  if (k1 + 1 == 2) {
12231  h_sumPedestalLS2->Fill(bbbc / bbb1);
12232  h_2DsumPedestalLS2->Fill(double(ieta), double(k3), bbbc);
12233  h_2D0sumPedestalLS2->Fill(double(ieta), double(k3), bbb1);
12234  h_sumPedestalperLS2->Fill(float(lscounterM1), bbbc);
12235  h_sum0PedestalperLS2->Fill(float(lscounterM1), bbb1);
12236  }
12237  }
12238  // HE:
12239  if (k0 == 1) {
12240  // HEdepth1
12241  if (k1 + 1 == 1) {
12242  h_sumPedestalLS3->Fill(bbbc / bbb1);
12243  h_2DsumPedestalLS3->Fill(double(ieta), double(k3), bbbc);
12244  h_2D0sumPedestalLS3->Fill(double(ieta), double(k3), bbb1);
12245  h_sumPedestalperLS3->Fill(float(lscounterM1), bbbc);
12246  h_sum0PedestalperLS3->Fill(float(lscounterM1), bbb1);
12247  }
12248  if (k1 + 1 == 2) {
12249  h_sumPedestalLS4->Fill(bbbc / bbb1);
12250  h_2DsumPedestalLS4->Fill(double(ieta), double(k3), bbbc);
12251  h_2D0sumPedestalLS4->Fill(double(ieta), double(k3), bbb1);
12252  h_sumPedestalperLS4->Fill(float(lscounterM1), bbbc);
12253  h_sum0PedestalperLS4->Fill(float(lscounterM1), bbb1);
12254  }
12255  if (k1 + 1 == 3) {
12256  h_sumPedestalLS5->Fill(bbbc / bbb1);
12257  h_2DsumPedestalLS5->Fill(double(ieta), double(k3), bbbc);
12258  h_2D0sumPedestalLS5->Fill(double(ieta), double(k3), bbb1);
12259  h_sumPedestalperLS5->Fill(float(lscounterM1), bbbc);
12260  h_sum0PedestalperLS5->Fill(float(lscounterM1), bbb1);
12261  }
12262  }
12263  // HF:
12264  if (k0 == 3) {
12265  // HFdepth1
12266  if (k1 + 1 == 1) {
12267  h_sumPedestalLS6->Fill(bbbc / bbb1);
12268  h_2DsumPedestalLS6->Fill(double(ieta), double(k3), bbbc);
12269  h_2D0sumPedestalLS6->Fill(double(ieta), double(k3), bbb1);
12270  h_sumPedestalperLS6->Fill(float(lscounterM1), bbbc);
12271  h_sum0PedestalperLS6->Fill(float(lscounterM1), bbb1);
12272  }
12273  if (k1 + 1 == 2) {
12274  h_sumPedestalLS7->Fill(bbbc / bbb1);
12275  h_2DsumPedestalLS7->Fill(double(ieta), double(k3), bbbc);
12276  h_2D0sumPedestalLS7->Fill(double(ieta), double(k3), bbb1);
12277  h_sumPedestalperLS7->Fill(float(lscounterM1), bbbc);
12278  h_sum0PedestalperLS7->Fill(float(lscounterM1), bbb1);
12279  }
12280  }
12281  // HO:
12282  if (k0 == 2) {
12283  // HOdepth1
12284  if (k1 + 1 == 4) {
12285  h_sumPedestalLS8->Fill(bbbc / bbb1);
12286  h_2DsumPedestalLS8->Fill(double(ieta), double(k3), bbbc);
12287  h_2D0sumPedestalLS8->Fill(double(ieta), double(k3), bbb1);
12288  h_sumPedestalperLS8->Fill(float(lscounterM1), bbbc);
12289  h_sum0PedestalperLS8->Fill(float(lscounterM1), bbb1);
12290  }
12291  }
12292  } //if(sumEstimator0[k0][k1][k2][k3] != 0.
12293  if (sumEstimator1[k0][k1][k2][k3] != 0.) {
12294  double bbbc = 0.;
12295  if (flagestimatornormalization_ == 0)
12296  bbbc = sumEstimator1[k0][k1][k2][k3] / nevcounter0;
12297  if (flagestimatornormalization_ == 1)
12298  bbbc = sumEstimator1[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12299  double bbb1 = 1.;
12300  if (flagestimatornormalization_ == 2) {
12301  bbbc = sumEstimator1[k0][k1][k2][k3];
12302  bbb1 = sum0Estimator[k0][k1][k2][k3];
12303  }
12304  if (lscounterM1 >= lsmin_ && lscounterM1 < lsmax_) {
12305  int kkkk2 = (k2 - 1) / 4;
12306  if (k2 == 0)
12307  kkkk2 = 1.;
12308  else
12309  kkkk2 += 2; //kkkk2= 1-22
12310  int kkkk3 = (k3) / 4 + 1; //kkkk3= 1-18
12311  int ietaphi = 0;
12312  ietaphi = ((kkkk2)-1) * znphi + (kkkk3);
12313  double bbb3 = 0.;
12314  if (bbb1 != 0.)
12315  bbb3 = bbbc / bbb1;
12316  if (k0 == 0) {
12317  h_2DsumADCAmplEtaPhiLs0->Fill(float(lscounterM1), float(ietaphi), bbbc); //HB
12318  h_2DsumADCAmplEtaPhiLs00->Fill(float(lscounterM1), float(ietaphi), bbb1); //HB
12319  }
12320  if (k0 == 1) {
12321  h_2DsumADCAmplEtaPhiLs1->Fill(float(lscounterM1), float(ietaphi), bbbc); //HE
12322  h_2DsumADCAmplEtaPhiLs10->Fill(float(lscounterM1), float(ietaphi), bbb1); //HE
12323  }
12324  if (k0 == 2) {
12325  h_2DsumADCAmplEtaPhiLs2->Fill(float(lscounterM1), float(ietaphi), bbbc); //HO
12326  h_2DsumADCAmplEtaPhiLs20->Fill(float(lscounterM1), float(ietaphi), bbb1); //HO
12327  }
12328  if (k0 == 3) {
12329  h_2DsumADCAmplEtaPhiLs3->Fill(float(lscounterM1), float(ietaphi), bbbc); //HF
12330  h_2DsumADCAmplEtaPhiLs30->Fill(float(lscounterM1), float(ietaphi), bbb1); //HF
12331  }
12332 
12333  h_sumADCAmplEtaPhiLs->Fill(bbb3);
12334  h_sumADCAmplEtaPhiLs_bbbc->Fill(bbbc);
12335  h_sumADCAmplEtaPhiLs_bbb1->Fill(bbb1);
12337  h_sumADCAmplEtaPhiLs_orbitNum->Fill(float(orbitNum), 1.);
12339  h_sumADCAmplEtaPhiLs_ietaphi->Fill(float(ietaphi));
12340  } // lscounterM1 >= lsmin_ && lscounterM1 < lsmax_
12341  if (k0 == 0) {
12342  if (k1 + 1 == 1) {
12343  h_sumADCAmplLS1copy1->Fill(bbbc / bbb1);
12344  h_sumADCAmplLS1copy2->Fill(bbbc / bbb1);
12345  h_sumADCAmplLS1copy3->Fill(bbbc / bbb1);
12346  h_sumADCAmplLS1copy4->Fill(bbbc / bbb1);
12347  h_sumADCAmplLS1copy5->Fill(bbbc / bbb1);
12348  h_sumADCAmplLS1->Fill(bbbc / bbb1);
12349  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
12350  h_2DsumADCAmplLS1->Fill(double(ieta), double(k3), bbbc);
12351  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth1_)
12352  h_2DsumADCAmplLS1_LSselected->Fill(double(ieta), double(k3), bbbc);
12353  h_2D0sumADCAmplLS1->Fill(double(ieta), double(k3), bbb1);
12354  h_sumADCAmplperLS1->Fill(float(lscounterM1), bbbc);
12355  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
12356  h_sumCutADCAmplperLS1->Fill(float(lscounterM1), bbbc);
12357  h_sum0ADCAmplperLS1->Fill(float(lscounterM1), bbb1);
12358  }
12359  if (k1 + 1 == 2) {
12360  h_sumADCAmplLS2->Fill(bbbc / bbb1);
12361  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
12362  h_2DsumADCAmplLS2->Fill(double(ieta), double(k3), bbbc);
12363  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth2_)
12364  h_2DsumADCAmplLS2_LSselected->Fill(double(ieta), double(k3), bbbc);
12365  h_2D0sumADCAmplLS2->Fill(double(ieta), double(k3), bbb1);
12366  h_sumADCAmplperLS2->Fill(float(lscounterM1), bbbc);
12367  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
12368  h_sumCutADCAmplperLS2->Fill(float(lscounterM1), bbbc);
12369  h_sum0ADCAmplperLS2->Fill(float(lscounterM1), bbb1);
12370  }
12371  if (k1 + 1 == 3) {
12372  h_sumADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
12373  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
12374  h_sumCutADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
12375  h_sum0ADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbb1);
12376 
12377  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
12378  h_2DsumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbbc);
12379  h_2D0sumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbb1);
12380  } //if(k1+1 ==3)
12381  if (k1 + 1 == 4) {
12382  h_sumADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
12383  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
12384  h_sumCutADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
12385  h_sum0ADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbb1);
12386 
12387  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
12388  h_2DsumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbbc);
12389  h_2D0sumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbb1);
12390  } //if(k1+1 ==4)
12391  }
12392  if (k0 == 1) {
12393  if (k1 + 1 == 1) {
12394  h_sumADCAmplLS3->Fill(bbbc / bbb1);
12395  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
12396  h_2DsumADCAmplLS3->Fill(double(ieta), double(k3), bbbc);
12397  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth1_)
12398  h_2DsumADCAmplLS3_LSselected->Fill(double(ieta), double(k3), bbbc);
12399  h_2D0sumADCAmplLS3->Fill(double(ieta), double(k3), bbb1);
12400  h_sumADCAmplperLS3->Fill(float(lscounterM1), bbbc);
12401  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
12402  h_sumCutADCAmplperLS3->Fill(float(lscounterM1), bbbc);
12403  h_sum0ADCAmplperLS3->Fill(float(lscounterM1), bbb1);
12404  }
12405  if (k1 + 1 == 2) {
12406  h_sumADCAmplLS4->Fill(bbbc / bbb1);
12407  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
12408  h_2DsumADCAmplLS4->Fill(double(ieta), double(k3), bbbc);
12409  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth2_)
12410  h_2DsumADCAmplLS4_LSselected->Fill(double(ieta), double(k3), bbbc);
12411  h_2D0sumADCAmplLS4->Fill(double(ieta), double(k3), bbb1);
12412  h_sumADCAmplperLS4->Fill(float(lscounterM1), bbbc);
12413  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
12414  h_sumCutADCAmplperLS4->Fill(float(lscounterM1), bbbc);
12415  h_sum0ADCAmplperLS4->Fill(float(lscounterM1), bbb1);
12416  }
12417  if (k1 + 1 == 3) {
12418  h_sumADCAmplLS5->Fill(bbbc / bbb1);
12419  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
12420  h_2DsumADCAmplLS5->Fill(double(ieta), double(k3), bbbc);
12421  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth3_)
12422  h_2DsumADCAmplLS5_LSselected->Fill(double(ieta), double(k3), bbbc);
12423  h_2D0sumADCAmplLS5->Fill(double(ieta), double(k3), bbb1);
12424  h_sumADCAmplperLS5->Fill(float(lscounterM1), bbbc);
12425  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
12426  h_sumCutADCAmplperLS5->Fill(float(lscounterM1), bbbc);
12427  h_sum0ADCAmplperLS5->Fill(float(lscounterM1), bbb1);
12428  }
12429  if (k1 + 1 == 4) {
12430  h_sumADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
12431  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
12432  h_sumCutADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
12433  h_sum0ADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbb1);
12434  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
12435  h_2DsumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbbc);
12436  h_2D0sumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbb1);
12437  } //if(k1+1 ==4)
12438  if (k1 + 1 == 5) {
12439  h_sumADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
12440  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
12441  h_sumCutADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
12442  h_sum0ADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbb1);
12443  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
12444  h_2DsumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbbc);
12445  h_2D0sumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbb1);
12446  } //if(k1+1 ==5)
12447 
12448  if (k1 + 1 == 6) {
12449  h_sumADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
12450  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
12451  h_sumCutADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
12452  h_sum0ADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbb1);
12453  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
12454  h_2DsumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbbc);
12455  h_2D0sumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbb1);
12456  } //if(k1+1 ==6)
12457  if (k1 + 1 == 7) {
12458  h_sumADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
12459  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
12460  h_sumCutADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
12461  h_sum0ADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbb1);
12462  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
12463  h_2DsumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbbc);
12464  h_2D0sumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbb1);
12465  } //if(k1+1 ==7)
12466 
12467  } // end HE
12468 
12469  if (k0 == 3) {
12470  if (k1 + 1 == 1) {
12471  h_sumADCAmplLS6->Fill(bbbc / bbb1);
12472  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
12473  h_2DsumADCAmplLS6->Fill(double(ieta), double(k3), bbbc);
12474  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth1_)
12475  h_2DsumADCAmplLS6_LSselected->Fill(double(ieta), double(k3), bbbc);
12476  h_2D0sumADCAmplLS6->Fill(double(ieta), double(k3), bbb1);
12477  h_sumADCAmplperLS6->Fill(float(lscounterM1), bbbc);
12478  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
12479  h_sumCutADCAmplperLS6->Fill(float(lscounterM1), bbbc);
12480  h_sum0ADCAmplperLS6->Fill(float(lscounterM1), bbb1);
12481  }
12482  if (k1 + 1 == 2) {
12483  h_sumADCAmplLS7->Fill(bbbc / bbb1);
12484  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
12485  h_2DsumADCAmplLS7->Fill(double(ieta), double(k3), bbbc);
12486  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth2_)
12487  h_2DsumADCAmplLS7_LSselected->Fill(double(ieta), double(k3), bbbc);
12488  h_2D0sumADCAmplLS7->Fill(double(ieta), double(k3), bbb1);
12489  h_sumADCAmplperLS7->Fill(float(lscounterM1), bbbc);
12490  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
12491  h_sumCutADCAmplperLS7->Fill(float(lscounterM1), bbbc);
12492  h_sum0ADCAmplperLS7->Fill(float(lscounterM1), bbb1);
12493  }
12494 
12495  if (k1 + 1 == 3) {
12496  h_sumADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
12497  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
12498  h_sumCutADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
12499  h_sum0ADCAmplperLS6u->Fill(float(lscounterM1), bbb1);
12500  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
12501  h_2DsumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbbc);
12502  h_2D0sumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbb1);
12503  } //if(k1+1 ==3)
12504  if (k1 + 1 == 4) {
12505  h_sumADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
12506  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
12507  h_sumCutADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
12508  h_sum0ADCAmplperLS7u->Fill(float(lscounterM1), bbb1);
12509  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
12510  h_2DsumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbbc);
12511  h_2D0sumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbb1);
12512  } //if(k1+1 ==4)
12513  }
12514  // HO:
12515  if (k0 == 2) {
12516  // HOdepth1
12517  if (k1 + 1 == 4) {
12518  h_sumADCAmplLS8->Fill(bbbc / bbb1);
12519  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
12520  h_2DsumADCAmplLS8->Fill(double(ieta), double(k3), bbbc);
12521  if (bbbc / bbb1 > 2. * lsdep_estimator1_HOdepth4_)
12522  h_2DsumADCAmplLS8_LSselected->Fill(double(ieta), double(k3), bbbc);
12523  h_2D0sumADCAmplLS8->Fill(double(ieta), double(k3), bbb1);
12524  h_sumADCAmplperLS8->Fill(float(lscounterM1), bbbc);
12525  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
12526  h_sumCutADCAmplperLS8->Fill(float(lscounterM1), bbbc);
12527  h_sum0ADCAmplperLS8->Fill(float(lscounterM1), bbb1);
12528  }
12529  }
12530  } //if(sumEstimator1[k0][k1][k2][k3] != 0.
12531  if (sumEstimator2[k0][k1][k2][k3] != 0.) {
12532  double bbbc = 0.;
12533  if (flagestimatornormalization_ == 0)
12534  bbbc = sumEstimator2[k0][k1][k2][k3] / nevcounter0;
12535  if (flagestimatornormalization_ == 1)
12536  bbbc = sumEstimator2[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12537  double bbb1 = 1.;
12538  if (flagestimatornormalization_ == 2) {
12539  bbbc = sumEstimator2[k0][k1][k2][k3];
12540  bbb1 = sum0Estimator[k0][k1][k2][k3];
12541  }
12542 
12543  // HB:
12544  if (k0 == 0) {
12545  // HBdepth1
12546  if (k1 + 1 == 1) {
12547  h_sumTSmeanALS1->Fill(bbbc / bbb1);
12548  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
12549  h_2DsumTSmeanALS1->Fill(double(ieta), double(k3), bbbc);
12550  h_2D0sumTSmeanALS1->Fill(double(ieta), double(k3), bbb1);
12551  h_sumTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
12552  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
12553  h_sumCutTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
12554  h_sum0TSmeanAperLS1->Fill(float(lscounterM1), bbb1);
12555  if (bbbc / bbb1 > 2. * lsdep_estimator2_HBdepth1_)
12556  h_sumTSmeanAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12557  }
12558  if (k1 + 1 == 2) {
12559  h_sumTSmeanALS2->Fill(bbbc / bbb1);
12560  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
12561  h_2DsumTSmeanALS2->Fill(double(ieta), double(k3), bbbc);
12562  h_2D0sumTSmeanALS2->Fill(double(ieta), double(k3), bbb1);
12563  h_sumTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
12564  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
12565  h_sumCutTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
12566  h_sum0TSmeanAperLS2->Fill(float(lscounterM1), bbb1);
12567  }
12568  }
12569  if (k0 == 1) {
12570  if (k1 + 1 == 1) {
12571  h_sumTSmeanALS3->Fill(bbbc / bbb1);
12572  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
12573  h_2DsumTSmeanALS3->Fill(double(ieta), double(k3), bbbc);
12574  h_2D0sumTSmeanALS3->Fill(double(ieta), double(k3), bbb1);
12575  h_sumTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
12576  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
12577  h_sumCutTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
12578  h_sum0TSmeanAperLS3->Fill(float(lscounterM1), bbb1);
12579  }
12580  if (k1 + 1 == 2) {
12581  h_sumTSmeanALS4->Fill(bbbc / bbb1);
12582  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
12583  h_2DsumTSmeanALS4->Fill(double(ieta), double(k3), bbbc);
12584  h_2D0sumTSmeanALS4->Fill(double(ieta), double(k3), bbb1);
12585  h_sumTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
12586  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
12587  h_sumCutTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
12588  h_sum0TSmeanAperLS4->Fill(float(lscounterM1), bbb1);
12589  }
12590  if (k1 + 1 == 3) {
12591  h_sumTSmeanALS5->Fill(bbbc / bbb1);
12592  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
12593  h_2DsumTSmeanALS5->Fill(double(ieta), double(k3), bbbc);
12594  h_2D0sumTSmeanALS5->Fill(double(ieta), double(k3), bbb1);
12595  h_sumTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
12596  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
12597  h_sumCutTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
12598  h_sum0TSmeanAperLS5->Fill(float(lscounterM1), bbb1);
12599  }
12600  }
12601  // HF:
12602  if (k0 == 3) {
12603  // HFdepth1
12604  if (k1 + 1 == 1) {
12605  h_sumTSmeanALS6->Fill(bbbc / bbb1);
12606  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
12607  h_2DsumTSmeanALS6->Fill(double(ieta), double(k3), bbbc);
12608  h_2D0sumTSmeanALS6->Fill(double(ieta), double(k3), bbb1);
12609  h_sumTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
12610  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
12611  h_sumCutTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
12612  h_sum0TSmeanAperLS6->Fill(float(lscounterM1), bbb1);
12613  }
12614  if (k1 + 1 == 2) {
12615  h_sumTSmeanALS7->Fill(bbbc / bbb1);
12616  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
12617  h_2DsumTSmeanALS7->Fill(double(ieta), double(k3), bbbc);
12618  h_2D0sumTSmeanALS7->Fill(double(ieta), double(k3), bbb1);
12619  h_sumTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
12620  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
12621  h_sumCutTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
12622  h_sum0TSmeanAperLS7->Fill(float(lscounterM1), bbb1);
12623  }
12624  }
12625  // HO:
12626  if (k0 == 2) {
12627  // HOdepth1
12628  if (k1 + 1 == 4) {
12629  h_sumTSmeanALS8->Fill(bbbc / bbb1);
12630  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
12631  h_2DsumTSmeanALS8->Fill(double(ieta), double(k3), bbbc);
12632  h_2D0sumTSmeanALS8->Fill(double(ieta), double(k3), bbb1);
12633  h_sumTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
12634  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
12635  h_sumCutTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
12636  h_sum0TSmeanAperLS8->Fill(float(lscounterM1), bbb1);
12637  }
12638  }
12639  } //if(sumEstimator2[k0][k1][k2][k3] != 0.
12640 
12641  // ------------------------------------------------------------------------------------------------------------------------sumEstimator3 Tx
12642  if (sumEstimator3[k0][k1][k2][k3] != 0.) {
12643  // fill histoes:
12644  double bbbc = 0.;
12645  if (flagestimatornormalization_ == 0)
12646  bbbc = sumEstimator3[k0][k1][k2][k3] / nevcounter0;
12647  if (flagestimatornormalization_ == 1)
12648  bbbc = sumEstimator3[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12649  double bbb1 = 1.;
12650  if (flagestimatornormalization_ == 2) {
12651  bbbc = sumEstimator3[k0][k1][k2][k3];
12652  bbb1 = sum0Estimator[k0][k1][k2][k3];
12653  }
12654 
12655  // HB:
12656  if (k0 == 0) {
12657  // HBdepth1
12658  if (k1 + 1 == 1) {
12659  h_sumTSmaxALS1->Fill(bbbc / bbb1);
12660  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
12661  h_2DsumTSmaxALS1->Fill(double(ieta), double(k3), bbbc);
12662  h_2D0sumTSmaxALS1->Fill(double(ieta), double(k3), bbb1);
12663  h_sumTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
12664  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
12665  h_sumCutTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
12666  h_sum0TSmaxAperLS1->Fill(float(lscounterM1), bbb1);
12667  if (bbbc / bbb1 > 2. * lsdep_estimator3_HBdepth1_)
12668  h_sumTSmaxAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12669  }
12670  if (k1 + 1 == 2) {
12671  h_sumTSmaxALS2->Fill(bbbc / bbb1);
12672  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
12673  h_2DsumTSmaxALS2->Fill(double(ieta), double(k3), bbbc);
12674  h_2D0sumTSmaxALS2->Fill(double(ieta), double(k3), bbb1);
12675  h_sumTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
12676  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
12677  h_sumCutTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
12678  h_sum0TSmaxAperLS2->Fill(float(lscounterM1), bbb1);
12679  }
12680  }
12681  // HE:
12682  if (k0 == 1) {
12683  // HEdepth1
12684  if (k1 + 1 == 1) {
12685  h_sumTSmaxALS3->Fill(bbbc / bbb1);
12686  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
12687  h_2DsumTSmaxALS3->Fill(double(ieta), double(k3), bbbc);
12688  h_2D0sumTSmaxALS3->Fill(double(ieta), double(k3), bbb1);
12689  h_sumTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
12690  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
12691  h_sumCutTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
12692  h_sum0TSmaxAperLS3->Fill(float(lscounterM1), bbb1);
12693  }
12694  if (k1 + 1 == 2) {
12695  h_sumTSmaxALS4->Fill(bbbc / bbb1);
12696  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
12697  h_2DsumTSmaxALS4->Fill(double(ieta), double(k3), bbbc);
12698  h_2D0sumTSmaxALS4->Fill(double(ieta), double(k3), bbb1);
12699  h_sumTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
12700  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
12701  h_sumCutTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
12702  h_sum0TSmaxAperLS4->Fill(float(lscounterM1), bbb1);
12703  }
12704  if (k1 + 1 == 3) {
12705  h_sumTSmaxALS5->Fill(bbbc / bbb1);
12706  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
12707  h_2DsumTSmaxALS5->Fill(double(ieta), double(k3), bbbc);
12708  h_2D0sumTSmaxALS5->Fill(double(ieta), double(k3), bbb1);
12709  h_sumTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
12710  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
12711  h_sumCutTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
12712  h_sum0TSmaxAperLS5->Fill(float(lscounterM1), bbb1);
12713  }
12714  }
12715  // HF:
12716  if (k0 == 3) {
12717  // HFdepth1
12718  if (k1 + 1 == 1) {
12719  h_sumTSmaxALS6->Fill(bbbc / bbb1);
12720  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
12721  h_2DsumTSmaxALS6->Fill(double(ieta), double(k3), bbbc);
12722  h_2D0sumTSmaxALS6->Fill(double(ieta), double(k3), bbb1);
12723  h_sumTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
12724  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
12725  h_sumCutTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
12726  h_sum0TSmaxAperLS6->Fill(float(lscounterM1), bbb1);
12727  }
12728  if (k1 + 1 == 2) {
12729  h_sumTSmaxALS7->Fill(bbbc / bbb1);
12730  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
12731  h_2DsumTSmaxALS7->Fill(double(ieta), double(k3), bbbc);
12732  h_2D0sumTSmaxALS7->Fill(double(ieta), double(k3), bbb1);
12733  h_sumTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
12734  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
12735  h_sumCutTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
12736  h_sum0TSmaxAperLS7->Fill(float(lscounterM1), bbb1);
12737  }
12738  }
12739  // HO:
12740  if (k0 == 2) {
12741  // HOdepth1
12742  if (k1 + 1 == 4) {
12743  h_sumTSmaxALS8->Fill(bbbc / bbb1);
12744  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
12745  h_2DsumTSmaxALS8->Fill(double(ieta), double(k3), bbbc);
12746  h_2D0sumTSmaxALS8->Fill(double(ieta), double(k3), bbb1);
12747  h_sumTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
12748  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
12749  h_sumCutTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
12750  h_sum0TSmaxAperLS8->Fill(float(lscounterM1), bbb1);
12751  }
12752  }
12753  } //if(sumEstimator3[k0][k1][k2][k3] != 0.
12754 
12755  // ------------------------------------------------------------------------------------------------------------------------sumEstimator4 W
12756  if (sumEstimator4[k0][k1][k2][k3] != 0.) {
12757  // fill histoes:
12758  double bbbc = 0.;
12759  if (flagestimatornormalization_ == 0)
12760  bbbc = sumEstimator4[k0][k1][k2][k3] / nevcounter0;
12761  if (flagestimatornormalization_ == 1)
12762  bbbc = sumEstimator4[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12763  double bbb1 = 1.;
12764  if (flagestimatornormalization_ == 2) {
12765  bbbc = sumEstimator4[k0][k1][k2][k3];
12766  bbb1 = sum0Estimator[k0][k1][k2][k3];
12767  }
12768 
12769  // HB:
12770  if (k0 == 0) {
12771  // HBdepth1
12772  if (k1 + 1 == 1) {
12773  h_sumAmplitudeLS1->Fill(bbbc / bbb1);
12774  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
12775  h_2DsumAmplitudeLS1->Fill(double(ieta), double(k3), bbbc);
12776  h_2D0sumAmplitudeLS1->Fill(double(ieta), double(k3), bbb1);
12777  h_sumAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
12778  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
12779  h_sumCutAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
12780  h_sum0AmplitudeperLS1->Fill(float(lscounterM1), bbb1);
12781  if (bbbc / bbb1 > 2. * lsdep_estimator4_HBdepth1_)
12782  h_sumAmplitudeperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12783  }
12784  if (k1 + 1 == 2) {
12785  h_sumAmplitudeLS2->Fill(bbbc / bbb1);
12786  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
12787  h_2DsumAmplitudeLS2->Fill(double(ieta), double(k3), bbbc);
12788  h_2D0sumAmplitudeLS2->Fill(double(ieta), double(k3), bbb1);
12789  h_sumAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
12790  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
12791  h_sumCutAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
12792  h_sum0AmplitudeperLS2->Fill(float(lscounterM1), bbb1);
12793  }
12794  }
12795  // HE:
12796  if (k0 == 1) {
12797  // HEdepth1
12798  if (k1 + 1 == 1) {
12799  h_sumAmplitudeLS3->Fill(bbbc / bbb1);
12800  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
12801  h_2DsumAmplitudeLS3->Fill(double(ieta), double(k3), bbbc);
12802  h_2D0sumAmplitudeLS3->Fill(double(ieta), double(k3), bbb1);
12803  h_sumAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
12804  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
12805  h_sumCutAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
12806  h_sum0AmplitudeperLS3->Fill(float(lscounterM1), bbb1);
12807  }
12808  if (k1 + 1 == 2) {
12809  h_sumAmplitudeLS4->Fill(bbbc / bbb1);
12810  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
12811  h_2DsumAmplitudeLS4->Fill(double(ieta), double(k3), bbbc);
12812  h_2D0sumAmplitudeLS4->Fill(double(ieta), double(k3), bbb1);
12813  h_sumAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
12814  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
12815  h_sumCutAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
12816  h_sum0AmplitudeperLS4->Fill(float(lscounterM1), bbb1);
12817  }
12818  if (k1 + 1 == 3) {
12819  h_sumAmplitudeLS5->Fill(bbbc / bbb1);
12820  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
12821  h_2DsumAmplitudeLS5->Fill(double(ieta), double(k3), bbbc);
12822  h_2D0sumAmplitudeLS5->Fill(double(ieta), double(k3), bbb1);
12823  h_sumAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
12824  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
12825  h_sumCutAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
12826  h_sum0AmplitudeperLS5->Fill(float(lscounterM1), bbb1);
12827  }
12828  }
12829  // HF:
12830  if (k0 == 3) {
12831  // HFdepth1
12832  if (k1 + 1 == 1) {
12833  h_sumAmplitudeLS6->Fill(bbbc / bbb1);
12834  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
12835  h_2DsumAmplitudeLS6->Fill(double(ieta), double(k3), bbbc);
12836  h_2D0sumAmplitudeLS6->Fill(double(ieta), double(k3), bbb1);
12837  h_sumAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
12838  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
12839  h_sumCutAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
12840  h_sum0AmplitudeperLS6->Fill(float(lscounterM1), bbb1);
12841  }
12842  if (k1 + 1 == 2) {
12843  h_sumAmplitudeLS7->Fill(bbbc / bbb1);
12844  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
12845  h_2DsumAmplitudeLS7->Fill(double(ieta), double(k3), bbbc);
12846  h_2D0sumAmplitudeLS7->Fill(double(ieta), double(k3), bbb1);
12847  h_sumAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
12848  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
12849  h_sumCutAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
12850  h_sum0AmplitudeperLS7->Fill(float(lscounterM1), bbb1);
12851  }
12852  }
12853  // HO:
12854  if (k0 == 2) {
12855  // HOdepth1
12856  if (k1 + 1 == 4) {
12857  h_sumAmplitudeLS8->Fill(bbbc / bbb1);
12858  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
12859  h_2DsumAmplitudeLS8->Fill(double(ieta), double(k3), bbbc);
12860  h_2D0sumAmplitudeLS8->Fill(double(ieta), double(k3), bbb1);
12861  h_sumAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
12862  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
12863  h_sumCutAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
12864  h_sum0AmplitudeperLS8->Fill(float(lscounterM1), bbb1);
12865  }
12866  }
12867  } //if(sumEstimator4[k0][k1][k2][k3] != 0.
12868 
12869  // ------------------------------------------------------------------------------------------------------------------------sumEstimator5 R
12870  if (sumEstimator5[k0][k1][k2][k3] != 0.) {
12871  // fill histoes:
12872  double bbbc = 0.;
12873  if (flagestimatornormalization_ == 0)
12874  bbbc = sumEstimator5[k0][k1][k2][k3] / nevcounter0;
12875  if (flagestimatornormalization_ == 1)
12876  bbbc = sumEstimator5[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12877  double bbb1 = 1.;
12878  if (flagestimatornormalization_ == 2) {
12879  bbbc = sumEstimator5[k0][k1][k2][k3];
12880  bbb1 = sum0Estimator[k0][k1][k2][k3];
12881  }
12882 
12883  // HB:
12884  if (k0 == 0) {
12885  // HBdepth1
12886  if (k1 + 1 == 1) {
12887  h_sumAmplLS1->Fill(bbbc / bbb1);
12888  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
12889  h_2DsumAmplLS1->Fill(double(ieta), double(k3), bbbc);
12890  h_2D0sumAmplLS1->Fill(double(ieta), double(k3), bbb1);
12891  h_sumAmplperLS1->Fill(float(lscounterM1), bbbc);
12892  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
12893  h_sumCutAmplperLS1->Fill(float(lscounterM1), bbbc);
12894  h_sum0AmplperLS1->Fill(float(lscounterM1), bbb1);
12895  if (bbbc / bbb1 > 2. * lsdep_estimator5_HBdepth1_)
12896  h_sumAmplperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12897  }
12898  if (k1 + 1 == 2) {
12899  h_sumAmplLS2->Fill(bbbc / bbb1);
12900  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
12901  h_2DsumAmplLS2->Fill(double(ieta), double(k3), bbbc);
12902  h_2D0sumAmplLS2->Fill(double(ieta), double(k3), bbb1);
12903  h_sumAmplperLS2->Fill(float(lscounterM1), bbbc);
12904  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
12905  h_sumCutAmplperLS2->Fill(float(lscounterM1), bbbc);
12906  h_sum0AmplperLS2->Fill(float(lscounterM1), bbb1);
12907  }
12908  }
12909  // HE:
12910  if (k0 == 1) {
12911  // HEdepth1
12912  if (k1 + 1 == 1) {
12913  h_sumAmplLS3->Fill(bbbc / bbb1);
12914  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
12915  h_2DsumAmplLS3->Fill(double(ieta), double(k3), bbbc);
12916  h_2D0sumAmplLS3->Fill(double(ieta), double(k3), bbb1);
12917  h_sumAmplperLS3->Fill(float(lscounterM1), bbbc);
12918  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
12919  h_sumCutAmplperLS3->Fill(float(lscounterM1), bbbc);
12920  h_sum0AmplperLS3->Fill(float(lscounterM1), bbb1);
12921  }
12922  if (k1 + 1 == 2) {
12923  h_sumAmplLS4->Fill(bbbc / bbb1);
12924  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
12925  h_2DsumAmplLS4->Fill(double(ieta), double(k3), bbbc);
12926  h_2D0sumAmplLS4->Fill(double(ieta), double(k3), bbb1);
12927  h_sumAmplperLS4->Fill(float(lscounterM1), bbbc);
12928  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
12929  h_sumCutAmplperLS4->Fill(float(lscounterM1), bbbc);
12930  h_sum0AmplperLS4->Fill(float(lscounterM1), bbb1);
12931  }
12932  if (k1 + 1 == 3) {
12933  h_sumAmplLS5->Fill(bbbc / bbb1);
12934  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
12935  h_2DsumAmplLS5->Fill(double(ieta), double(k3), bbbc);
12936  h_2D0sumAmplLS5->Fill(double(ieta), double(k3), bbb1);
12937  h_sumAmplperLS5->Fill(float(lscounterM1), bbbc);
12938  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
12939  h_sumCutAmplperLS5->Fill(float(lscounterM1), bbbc);
12940  h_sum0AmplperLS5->Fill(float(lscounterM1), bbb1);
12941  }
12942  }
12943  // HF:
12944  if (k0 == 3) {
12945  // HFdepth1
12946  if (k1 + 1 == 1) {
12947  h_sumAmplLS6->Fill(bbbc / bbb1);
12948  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
12949  h_2DsumAmplLS6->Fill(double(ieta), double(k3), bbbc);
12950  h_2D0sumAmplLS6->Fill(double(ieta), double(k3), bbb1);
12951  h_sumAmplperLS6->Fill(float(lscounterM1), bbbc);
12952  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
12953  h_sumCutAmplperLS6->Fill(float(lscounterM1), bbbc);
12954  h_sum0AmplperLS6->Fill(float(lscounterM1), bbb1);
12955  }
12956  if (k1 + 1 == 2) {
12957  h_sumAmplLS7->Fill(bbbc / bbb1);
12958  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
12959  h_2DsumAmplLS7->Fill(double(ieta), double(k3), bbbc);
12960  h_2D0sumAmplLS7->Fill(double(ieta), double(k3), bbb1);
12961  h_sumAmplperLS7->Fill(float(lscounterM1), bbbc);
12962  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
12963  h_sumCutAmplperLS7->Fill(float(lscounterM1), bbbc);
12964  h_sum0AmplperLS7->Fill(float(lscounterM1), bbb1);
12965  }
12966  }
12967  // HO:
12968  if (k0 == 2) {
12969  // HOdepth1
12970  if (k1 + 1 == 4) {
12971  h_sumAmplLS8->Fill(bbbc / bbb1);
12972  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
12973  h_2DsumAmplLS8->Fill(double(ieta), double(k3), bbbc);
12974  h_2D0sumAmplLS8->Fill(double(ieta), double(k3), bbb1);
12975  h_sumAmplperLS8->Fill(float(lscounterM1), bbbc);
12976  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
12977  h_sumCutAmplperLS8->Fill(float(lscounterM1), bbbc);
12978  h_sum0AmplperLS8->Fill(float(lscounterM1), bbb1);
12979  }
12980  }
12981  } //if(sumEstimator5[k0][k1][k2][k3] != 0.
12982  // ------------------------------------------------------------------------------------------------------------------------sumEstimator6 (Error-B)
12983  if (sumEstimator6[k0][k1][k2][k3] != 0.) {
12984  // fill histoes:
12985  double bbbc = 0.;
12986  if (flagestimatornormalization_ == 0)
12987  bbbc = sumEstimator6[k0][k1][k2][k3] / nevcounter0;
12988  if (flagestimatornormalization_ == 1)
12989  bbbc = sumEstimator6[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12990  double bbb1 = 1.;
12991  if (flagestimatornormalization_ == 2) {
12992  bbbc = sumEstimator6[k0][k1][k2][k3];
12993  bbb1 = sum0Estimator[k0][k1][k2][k3];
12994  }
12995 
12996  // HB:
12997  if (k0 == 0) {
12998  // HBdepth1
12999  if (k1 + 1 == 1) {
13000  h_sumErrorBLS1->Fill(bbbc / bbb1);
13001  h_2DsumErrorBLS1->Fill(double(ieta), double(k3), bbbc);
13002  h_2D0sumErrorBLS1->Fill(double(ieta), double(k3), bbb1);
13003  h_sumErrorBperLS1->Fill(float(lscounterM1), bbbc);
13004  h_sum0ErrorBperLS1->Fill(float(lscounterM1), bbb1);
13005  }
13006  if (k1 + 1 == 2) {
13007  h_sumErrorBLS2->Fill(bbbc / bbb1);
13008  h_2DsumErrorBLS2->Fill(double(ieta), double(k3), bbbc);
13009  h_2D0sumErrorBLS2->Fill(double(ieta), double(k3), bbb1);
13010  h_sumErrorBperLS2->Fill(float(lscounterM1), bbbc);
13011  h_sum0ErrorBperLS2->Fill(float(lscounterM1), bbb1);
13012  }
13013  }
13014  // HE:
13015  if (k0 == 1) {
13016  // HEdepth1
13017  if (k1 + 1 == 1) {
13018  h_sumErrorBLS3->Fill(bbbc / bbb1);
13019  h_2DsumErrorBLS3->Fill(double(ieta), double(k3), bbbc);
13020  h_2D0sumErrorBLS3->Fill(double(ieta), double(k3), bbb1);
13021  h_sumErrorBperLS3->Fill(float(lscounterM1), bbbc);
13022  h_sum0ErrorBperLS3->Fill(float(lscounterM1), bbb1);
13023  }
13024  if (k1 + 1 == 2) {
13025  h_sumErrorBLS4->Fill(bbbc / bbb1);
13026  h_2DsumErrorBLS4->Fill(double(ieta), double(k3), bbbc);
13027  h_2D0sumErrorBLS4->Fill(double(ieta), double(k3), bbb1);
13028  h_sumErrorBperLS4->Fill(float(lscounterM1), bbbc);
13029  h_sum0ErrorBperLS4->Fill(float(lscounterM1), bbb1);
13030  }
13031  if (k1 + 1 == 3) {
13032  h_sumErrorBLS5->Fill(bbbc / bbb1);
13033  h_2DsumErrorBLS5->Fill(double(ieta), double(k3), bbbc);
13034  h_2D0sumErrorBLS5->Fill(double(ieta), double(k3), bbb1);
13035  h_sumErrorBperLS5->Fill(float(lscounterM1), bbbc);
13036  h_sum0ErrorBperLS5->Fill(float(lscounterM1), bbb1);
13037  }
13038  }
13039  // HF:
13040  if (k0 == 3) {
13041  // HFdepth1
13042  if (k1 + 1 == 1) {
13043  h_sumErrorBLS6->Fill(bbbc / bbb1);
13044  h_2DsumErrorBLS6->Fill(double(ieta), double(k3), bbbc);
13045  h_2D0sumErrorBLS6->Fill(double(ieta), double(k3), bbb1);
13046  h_sumErrorBperLS6->Fill(float(lscounterM1), bbbc);
13047  h_sum0ErrorBperLS6->Fill(float(lscounterM1), bbb1);
13048  }
13049  if (k1 + 1 == 2) {
13050  h_sumErrorBLS7->Fill(bbbc / bbb1);
13051  h_2DsumErrorBLS7->Fill(double(ieta), double(k3), bbbc);
13052  h_2D0sumErrorBLS7->Fill(double(ieta), double(k3), bbb1);
13053  h_sumErrorBperLS7->Fill(float(lscounterM1), bbbc);
13054  h_sum0ErrorBperLS7->Fill(float(lscounterM1), bbb1);
13055  }
13056  }
13057  // HO:
13058  if (k0 == 2) {
13059  // HOdepth4
13060  if (k1 + 1 == 4) {
13061  h_sumErrorBLS8->Fill(bbbc / bbb1);
13062  h_2DsumErrorBLS8->Fill(double(ieta), double(k3), bbbc);
13063  h_2D0sumErrorBLS8->Fill(double(ieta), double(k3), bbb1);
13064  h_sumErrorBperLS8->Fill(float(lscounterM1), bbbc);
13065  h_sum0ErrorBperLS8->Fill(float(lscounterM1), bbb1);
13066  }
13067  }
13069  } //if(sumEstimator6[k0][k1][k2][k3] != 0.
13070 
13073  } //for
13074  } //for
13075  } //for
13076  } //for
13077 
13078  //------------------------------------------------------ averSIGNAL
13087 
13092 
13093  //------------------------------------------------------
13102 
13107 
13108  //------------------------------------------------------ averNOSIGNAL
13117 
13122 
13123  //------------------------------------------------------
13132 
13137 
13138  h_maxxSUMAmpl_HB->Fill(float(lscounterM1), maxxSUM1);
13139  h_maxxSUMAmpl_HE->Fill(float(lscounterM1), maxxSUM2);
13140  h_maxxSUMAmpl_HO->Fill(float(lscounterM1), maxxSUM3);
13141  h_maxxSUMAmpl_HF->Fill(float(lscounterM1), maxxSUM4);
13142  maxxSUM1 = 0.;
13143  maxxSUM2 = 0.;
13144  maxxSUM3 = 0.;
13145  maxxSUM4 = 0.;
13146  //------------------------------------------------------
13147  h_maxxOCCUP_HB->Fill(float(lscounterM1), maxxOCCUP1);
13148  h_maxxOCCUP_HE->Fill(float(lscounterM1), maxxOCCUP2);
13149  h_maxxOCCUP_HO->Fill(float(lscounterM1), maxxOCCUP3);
13150  h_maxxOCCUP_HF->Fill(float(lscounterM1), maxxOCCUP4);
13151  maxxOCCUP1 = 0.;
13152  maxxOCCUP2 = 0.;
13153  maxxOCCUP3 = 0.;
13154  maxxOCCUP4 = 0.;
13155 
13156  } //if( nevcounter0 != 0 )
13158 
13159  std::cout << " ==== Edn of run " << std::endl;
13160 }
13162 //
13164 //
13167  HcalLogicalMap lmap = gen.createMap(topo);
13168 
13169  // HcalElectronicsMap emap=lmap.generateHcalElectronicsMap();
13170 
13171  // const HcalElectronicsMap* emap=conditions->getHcalMapping();
13172  const HcalElectronicsMap* emap;
13173  emap = conditions->getHcalMapping();
13174 
13175  std::string subdet = "";
13176 
13177  MAPfile << "#define LogEleMapdb_h" << std::endl;
13178  MAPfile << "#include <algorithm>" << std::endl;
13179  MAPfile << "#include <iostream>" << std::endl;
13180  MAPfile << "#include <vector>" << std::endl;
13181  MAPfile << "#include <string>" << std::endl;
13182  MAPfile << "#include <sstream>" << std::endl;
13183  MAPfile << std::endl;
13184 
13185  MAPfile << "struct Cell {" << std::endl;
13186  MAPfile << " std::string subdet;" << std::endl;
13187  MAPfile << " int Eta;" << std::endl;
13188  MAPfile << " int Phi;" << std::endl;
13189  MAPfile << " int Depth;" << std::endl;
13190  MAPfile << " std::string RBX;" << std::endl;
13191  MAPfile << " int RM;" << std::endl;
13192  MAPfile << " int Pixel;" << std::endl;
13193  MAPfile << " int RMfiber;" << std::endl;
13194  MAPfile << " int FiberCh;" << std::endl;
13195  MAPfile << " int QIE;" << std::endl;
13196  MAPfile << " int ADC;" << std::endl;
13197  MAPfile << " int VMECardID;" << std::endl;
13198  MAPfile << " int dccID;" << std::endl;
13199  MAPfile << " int Spigot;" << std::endl;
13200  MAPfile << " int FiberIndex;" << std::endl;
13201  MAPfile << " int HtrSlot;" << std::endl;
13202  MAPfile << " int HtrTB;" << std::endl;
13203  MAPfile << std::endl;
13204 
13205  MAPfile << "// the function check, if \"par\" == \"val\" for this cell" << std::endl;
13206  MAPfile << " bool check(const std::string par, const int val) const " << std::endl;
13207  MAPfile << " {" << std::endl;
13208  MAPfile << " if (par == \"Eta\") return (val == Eta);" << std::endl;
13209  MAPfile << " else if (par == \"Phi\") return (val == Phi);" << std::endl;
13210  MAPfile << " else if (par == \"Depth\") return (val == Depth);" << std::endl;
13211  MAPfile << " else if (par == \"RM\") return (val == RM);" << std::endl;
13212  MAPfile << " else if (par == \"Pixel\") return (val == Pixel);" << std::endl;
13213  MAPfile << " else if (par == \"RMfiber\") return (val == RMfiber);" << std::endl;
13214  MAPfile << " else if (par == \"FiberCh\") return (val == FiberCh);" << std::endl;
13215  MAPfile << " else if (par == \"QIE\") return (val == QIE);" << std::endl;
13216  MAPfile << " else if (par == \"ADC\") return (val == ADC);" << std::endl;
13217  MAPfile << " else if (par == \"VMECardID\") return (val == VMECardID);" << std::endl;
13218  MAPfile << " else if (par == \"dccID\") return (val == dccID);" << std::endl;
13219  MAPfile << " else if (par == \"Spigot\") return (val == Spigot);" << std::endl;
13220  MAPfile << " else if (par == \"FiberIndex\") return (val == FiberIndex);" << std::endl;
13221  MAPfile << " else if (par == \"HtrSlot\") return (val == HtrSlot);" << std::endl;
13222  MAPfile << " else if (par == \"HtrTB\") return (val == HtrTB);" << std::endl;
13223  MAPfile << " else return false;" << std::endl;
13224  MAPfile << " }" << std::endl;
13225  MAPfile << std::endl;
13226 
13227  MAPfile << " bool check(const std::string par, const std::string val) const" << std::endl;
13228  MAPfile << " {" << std::endl;
13229  MAPfile << " if (par == \"subdet\") return (val == subdet);" << std::endl;
13230  MAPfile << " else if (par == \"RBX\") return (val == RBX);" << std::endl;
13231  MAPfile << " else return false;" << std::endl;
13232  MAPfile << " }" << std::endl;
13233 
13234  MAPfile << "};" << std::endl;
13235  MAPfile << std::endl;
13236 
13237  MAPfile << "const Cell AllCells[] = {" << std::endl;
13238  MAPfile << "//{ SD, Eta, Phi, Depth, RBX, RM, PIXEL, RMfiber, Fiber Ch., QIE, ADC, VMECrateId, dccid, spigot, "
13239  "fiberIndex, htrSlot, htrTopBottom }"
13240  << std::endl;
13241 
13242  // HB
13243 
13244  for (int eta = -16; eta < 0; eta++) {
13245  for (int phi = 1; phi <= nphi; phi++) {
13246  for (int depth = 1; depth <= 2; depth++) {
13247  HcalDetId* detid = nullptr;
13248  detid = new HcalDetId(HcalBarrel, eta, phi, depth);
13249  subdet = "HB";
13250  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13251  HcalElectronicsId emap_entry = emap->lookup(*detid);
13252  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13253  << detid->depth() << " ,";
13254  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13255  << lmap_entry.rmFiber() << " , ";
13256  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13257  << " , ";
13258  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13259  << " , " << emap_entry.fiberIndex() << " , ";
13260  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13261  MAPfile << "}," << std::endl;
13262  delete detid;
13263  } //Depth
13264  } //Phi
13265  } //Eta
13266  for (int eta = 1; eta <= 16; eta++) {
13267  for (int phi = 1; phi <= nphi; phi++) {
13268  for (int depth = 1; depth <= 2; depth++) {
13269  HcalDetId* detid = nullptr;
13270  detid = new HcalDetId(HcalBarrel, eta, phi, depth);
13271  subdet = "HB";
13272  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13273  HcalElectronicsId emap_entry = emap->lookup(*detid);
13274  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() - 1 << " , " << detid->iphi() - 1 << " , "
13275  << detid->depth() << " ,";
13276  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13277  << lmap_entry.rmFiber() << " , ";
13278  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13279  << " , ";
13280  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13281  << " , " << emap_entry.fiberIndex() << " , ";
13282  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13283  MAPfile << "}," << std::endl;
13284  delete detid;
13285  } //Depth
13286  } //Phi
13287  } //Eta
13288 
13289  // HE
13290  for (int eta = -20; eta <= -20; eta++) {
13291  for (int phi = nphi; phi <= nphi; phi++) {
13292  for (int depth = 1; depth <= 2; depth++) {
13293  HcalDetId* detid = nullptr;
13294  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13295  subdet = "HE";
13296  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13297  HcalElectronicsId emap_entry = emap->lookup(*detid);
13298  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13299  << detid->depth() << " ,";
13300  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13301  << lmap_entry.rmFiber() << " , ";
13302  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13303  << " , ";
13304  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13305  << " , " << emap_entry.fiberIndex() << " , ";
13306  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13307  MAPfile << "}," << std::endl;
13308  delete detid;
13309  } //Depth
13310  } //Phi
13311  } //Eta
13312 
13313  for (int eta = -19; eta <= -16; eta++) {
13314  for (int phi = nphi; phi <= nphi; phi++) {
13315  for (int depth = 1; depth <= 3; depth++) {
13316  HcalDetId* detid = nullptr;
13317  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13318  subdet = "HE";
13319  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13320  HcalElectronicsId emap_entry = emap->lookup(*detid);
13321  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13322  << detid->depth() << " ,";
13323  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13324  << lmap_entry.rmFiber() << " , ";
13325  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13326  << " , ";
13327  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13328  << " , " << emap_entry.fiberIndex() << " , ";
13329  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13330  MAPfile << "}," << std::endl;
13331  delete detid;
13332  } //Depth
13333  } //Phi
13334  } //Eta
13335  for (int eta = -29; eta <= -16; eta++) {
13336  for (int phi = 1; phi <= 71; phi++) {
13337  for (int depth = 1; depth <= 3; depth++) {
13338  HcalDetId* detid = nullptr;
13339  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13340  subdet = "HE";
13341  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13342  HcalElectronicsId emap_entry = emap->lookup(*detid);
13343  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13344  << detid->depth() << " ,";
13345  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13346  << lmap_entry.rmFiber() << " , ";
13347  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13348  << " , ";
13349  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13350  << " , " << emap_entry.fiberIndex() << " , ";
13351  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13352  MAPfile << "}," << std::endl;
13353  delete detid;
13354  } //Depth
13355  } //Phi
13356  } //Eta
13357  for (int eta = 16; eta <= 29; eta++) {
13358  for (int phi = 1; phi <= nphi; phi++) {
13359  for (int depth = 1; depth <= 3; depth++) {
13360  HcalDetId* detid = nullptr;
13361  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13362  subdet = "HE";
13363  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13364  HcalElectronicsId emap_entry = emap->lookup(*detid);
13365  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13366  << detid->depth() << " ,";
13367  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13368  << lmap_entry.rmFiber() << " , ";
13369  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13370  << " , ";
13371  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13372  << " , " << emap_entry.fiberIndex() << " , ";
13373  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13374  MAPfile << "}," << std::endl;
13375  delete detid;
13376  } //Depth
13377  } //Phi
13378  } //Eta
13379 
13380  // HF
13381 
13382  for (int eta = -41; eta <= -29; eta++) {
13383  for (int phi = 1; phi <= nphi; phi += 2) {
13384  for (int depth = 1; depth <= 2; depth++) {
13385  HcalDetId* detid = nullptr;
13386  detid = new HcalDetId(HcalForward, eta, phi, depth);
13387  subdet = "HF";
13388  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13389  HcalElectronicsId emap_entry = emap->lookup(*detid);
13390  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13391  << detid->depth() << " ,";
13392  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13393  << lmap_entry.rmFiber() << " , ";
13394  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13395  << " , ";
13396  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13397  << " , " << emap_entry.fiberIndex() << " , ";
13398  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13399  MAPfile << "}," << std::endl;
13400  delete detid;
13401  } //Depth
13402  } //Phi
13403  } //Eta
13404 
13405  for (int eta = 29; eta <= 41; eta++) {
13406  for (int phi = 1; phi <= nphi; phi += 2) {
13407  for (int depth = 1; depth <= 2; depth++) {
13408  HcalDetId* detid = nullptr;
13409  detid = new HcalDetId(HcalForward, eta, phi, depth);
13410  subdet = "HF";
13411  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13412  HcalElectronicsId emap_entry = emap->lookup(*detid);
13413  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13414  << detid->depth() << " ,";
13415  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13416  << lmap_entry.rmFiber() << " , ";
13417  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13418  << " , ";
13419  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13420  << " , " << emap_entry.fiberIndex() << " , ";
13421  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13422  MAPfile << "}," << std::endl;
13423  delete detid;
13424  } //Depth
13425  } //Phi
13426  } //Eta
13427 
13428  // HO
13429 
13430  for (int eta = -15; eta < 0; eta++) {
13431  for (int phi = 1; phi <= nphi; phi++) {
13432  for (int depth = 4; depth <= 4; depth++) {
13433  HcalDetId* detid = nullptr;
13434  detid = new HcalDetId(HcalOuter, eta, phi, depth);
13435  subdet = "HO";
13436  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13437  HcalElectronicsId emap_entry = emap->lookup(*detid);
13438  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13439  << detid->depth() << " ,";
13440  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13441  << lmap_entry.rmFiber() << " , ";
13442  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13443  << " , ";
13444  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13445  << " , " << emap_entry.fiberIndex() << " , ";
13446  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13447  MAPfile << "}," << std::endl;
13448  delete detid;
13449  } //Depth
13450  } //Phi
13451  } //Eta
13452 
13453  for (int eta = 1; eta <= 15; eta++) {
13454  for (int phi = 1; phi <= nphi; phi++) {
13455  for (int depth = 4; depth <= 4; depth++) {
13456  HcalDetId* detid = nullptr;
13457  detid = new HcalDetId(HcalOuter, eta, phi, depth);
13458  subdet = "HO";
13459  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13460  HcalElectronicsId emap_entry = emap->lookup(*detid);
13461  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() - 1 << " , " << detid->iphi() - 1 << " , "
13462  << detid->depth() << " ,";
13463  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13464  << lmap_entry.rmFiber() << " , ";
13465  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13466  << " , ";
13467  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13468  << " , " << emap_entry.fiberIndex() << " , ";
13469  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13470  MAPfile << "}," << std::endl;
13471  delete detid;
13472  } //Depth
13473  } //Phi
13474  } //Eta
13475  MAPfile << "};" << std::endl;
13476  MAPfile << std::endl;
13477 
13478  MAPfile << "// macro for array length calculation" << std::endl;
13479  MAPfile << "#define DIM(a) (sizeof(a)/sizeof(a[0]))" << std::endl;
13480  MAPfile << std::endl;
13481 
13482  MAPfile << "// class for cells array managing" << std::endl;
13483  MAPfile << "class CellDB {" << std::endl;
13484  MAPfile << "public:" << std::endl;
13485  MAPfile << " CellDB()" << std::endl;
13486  MAPfile << " : cells(AllCells, AllCells + DIM(AllCells))" << std::endl;
13487  MAPfile << "{}" << std::endl;
13488  MAPfile << std::endl;
13489 
13490  MAPfile << "// return i-th cell" << std::endl;
13491  MAPfile << "Cell operator [] (int i) const {return cells[i];}" << std::endl;
13492 
13493  MAPfile << "// number of cells in database" << std::endl;
13494  MAPfile << "int size() const {return cells.size();}" << std::endl;
13495  MAPfile << std::endl;
13496 
13497  MAPfile << "// select cells for which \"par\" == \"val\"" << std::endl;
13498  MAPfile << "template<typename T>" << std::endl;
13499  MAPfile << "CellDB find(const std::string par, const T val) const" << std::endl;
13500  MAPfile << "{" << std::endl;
13501  MAPfile << " std::vector<Cell> s;" << std::endl;
13502  MAPfile << " for (size_t i = 0; i < cells.size(); ++i)" << std::endl;
13503  MAPfile << " if (cells[i].check(par, val))" << std::endl;
13504  MAPfile << " s.push_back(cells[i]);" << std::endl;
13505  MAPfile << " return CellDB(s);" << std::endl;
13506  MAPfile << "} " << std::endl;
13507  MAPfile << std::endl;
13508  MAPfile << "private:" << std::endl;
13509  MAPfile << " CellDB( const std::vector<Cell> s)" << std::endl;
13510  MAPfile << " : cells(s)" << std::endl;
13511  MAPfile << "{}" << std::endl;
13512  MAPfile << "std::vector<Cell> cells;" << std::endl;
13513  MAPfile << "};" << std::endl;
13514  MAPfile.close();
13515  std::cout << "===== Finish writing Channel MAP =====" << std::endl;
13516 }
13517 
13518 double CMTRawAnalyzer::dR(double eta1, double phi1, double eta2, double phi2) {
13519  double deltaphi = phi1 - phi2;
13520  if (phi2 > phi1) {
13521  deltaphi = phi2 - phi1;
13522  }
13523  if (deltaphi > M_PI) {
13524  deltaphi = 2. * M_PI - deltaphi;
13525  }
13526  double deltaeta = eta2 - eta1;
13527  double tmp = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
13528  return tmp;
13529 }
13530 
13531 double CMTRawAnalyzer::phi12(double phi1, double en1, double phi2, double en2) {
13532  // weighted mean value of phi1 and phi2
13533 
13534  double a1 = phi1;
13535  double a2 = phi2;
13536 
13537  if (a1 > 0.5 * M_PI && a2 < 0.)
13538  a2 += 2 * M_PI;
13539  if (a2 > 0.5 * M_PI && a1 < 0.)
13540  a1 += 2 * M_PI;
13541  double tmp = (a1 * en1 + a2 * en2) / (en1 + en2);
13542  if (tmp > M_PI)
13543  tmp -= 2. * M_PI;
13544 
13545  return tmp;
13546 }
13547 
13548 double CMTRawAnalyzer::dPhiWsign(double phi1, double phi2) {
13549  // clockwise phi2 w.r.t phi1 means "+" phi distance
13550  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
13551 
13552  double a1 = phi1;
13553  double a2 = phi2;
13554  double tmp = a2 - a1;
13555  if (a1 * a2 < 0.) {
13556  if (a1 > 0.5 * M_PI)
13557  tmp += 2. * M_PI;
13558  if (a2 > 0.5 * M_PI)
13559  tmp -= 2. * M_PI;
13560  }
13561  return tmp;
13562 }
13563 
13566 //define this as a plug-in
TH2F * h_mapDepth4Pedw1_HO
TH2F * h_mapDepth4AmplE34_HO
double lsdep_estimator2_HEdepth3_
TH1F * h_averSIGNALsumamplitude_HO
TH1F * h_runnbadchannels_depth1_HF
TH2F * h_recNoiseEnergy0_HF1
TH2F * h_2D0Ataildepth2_HB
TH1F * h_sumAmplitudeperLS8
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]
TH2F * h_mapDepth3TSmaxA225_HE
TH1F * h_sum0ADCAmplperLS5
TH1F * h_sumADCAmplperLS7u
TH1F * h_shape0_good_channels_HO
TH1F * h_bcnbadrate0_depth4_HO
constexpr DetId detid() const
Get the detector id.
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
constexpr int readoutVMECrateId() const
get the readout VME crate number
weight_default_t b1[25]
Definition: b1.h:9
TH2F * h_mapDepth2Ampl047_HE
edm::EDGetTokenT< QIE10DigiCollection > tok_qie10_
TH1F * h_runbadrate0_depth3_HE
TH2F * h_amplitudechannel0_HB4
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
TH1F * h_orbitNumvsamplitude_HF
int rm() const
TH2F * h_mapDepth1Error_HF
TH2F * h_mapDepth5TSmeanA_HE
int fiberChannel() const
TH2F * h_recNoiseEnergy1_HE5
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
TH1F * h_bcnvsamplitude0_HB
TH2F * h2_TSnVsAyear2023_HO
int flagToUseDigiCollectionsORNot_
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
const HcalPedestal * getPedestal(const HcalGenericDetId &fId) const
double calibrTSmaxHOMax_
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 * h1_TSnVsAyear2023_HF
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
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
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 &)
float getValue() const
Definition: HcalLUTCorr.h:22
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
int qieCard() const
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
float getValue(int fCapId) const
get value for capId = 0..3
Definition: HcalPedestal.h:20
TH1F * h_sumPedestalperLS4
TH2F * h_mapADCCalib047_HE
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
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
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
TH2F * h2_TSnVsAyear2023_HE
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
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
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
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
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
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]
const HcalElectronicsMap * getHcalMapping() const
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
constexpr int htrSlot() const
get the htr slot
TH1F * h_sumPedestalperLS1
TH1F * h_sumAmplitudeperLS1
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
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
const HcalPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
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 * h1_TSnVsAyear20230_HB
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
constexpr DetId detid() const
Get the detector id.
TH2F * h_mapDepth2Ampl047_HB
TH2F * h_mapDepth1TSmaxA_HB
TH2F * h_mapDepth2Ampl_HF
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
constexpr float energy() const
Definition: CaloRecHit.h:29
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
T getUntrackedParameter(std::string const &, T const &) const
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_
TH2F * h_mapDepth1TSmeanA225_HF
TH1F * h1_TSnVsAyear20230_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
TH2F * h_mapDepth2TSmeanA225_HE
TH2F * h_mapDepth4TSmaxA_HO
TH1F * h_shape0_bad_channels_HF
TH2F * h_amplitudechannel0_HE6
TH2F * h_mapDepth1Pedw3_HB
TH1F * h_pedestalwaver9_HO
TH2F * h_mapDepth1TSmaxA_HE
TH2F * h_mapDepth3ADCAmpl12_HE
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
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
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
TH1F * h_orbitNumvsamplitude0_HE
TH1F * h_sigLayer2RADDAM5_HED2
TH2F * h_recSignalEnergy0_HB2
TH1F * h_eventoccupancy_HB
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
TH1F * h_totalAmplitudeHEperEvent
TH2F * h_mapDepth3RADDAM_HE
TH2F * h_mapDepth3ADCAmpl225Copy_HE
TH1F * h_sumADCAmplperLSdepth3HBu
const HcalRespCorr * getHcalRespCorr(const HcalGenericDetId &fId) const
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
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...
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
TH2F * h_mapDepth2Amplitude_HF
TH2F * h_mapDepth1Ampl_HF
TH2F * h_mapADCAmpl12secondpeak_HE
T sqrt(T t)
Definition: SSEVec.h:19
TH2F * h_mapDepth1TSmeanA225_HB
double calibrTSmaxHEMin_
double calibrRatioHFMax_
TH2F * h_recNoiseEnergy0_HE4
TH2F * h_amplitudechannel2_HB3
TH1F * h_runnbadchannels_depth2_HB
TH2F * h_mapDepth3Amplitude_HF
TH1F * h1_TSnVsAyear2023_HB
const edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tokTopo_
TH2F * h_mapDepth4Amplitude225_HO
TH1F * h_sumamplitude_depth1_HB0
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
int pixel() const
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
TH1F * h1_TSnVsAyear20230_HE
TH2F * h_mapTSmeanCalib047_HF
TH1F * h_totalAmplitudeHO
float getValue() const
Definition: HcalTimeCorr.h:19
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]
std::string rbx() const
double const adc2fC_QIE10[256]
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
static const float adc2fC[128]
TH1F * h_sumADCAmplperLS1_P2
TH2F * h_mapDepth2Ampl_HB
TH1F * h_runbadrate0_depth2_HF
TH2F * h_mapDepth2Amplitude_HE
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
TH2F * h_amplitudechannel1_HE6
TH2F * h_amplitudechannel2_HE3
TH2F * h_mapDepth7Amplitude225_HE
TH2F * h_mapDepth3ADCAmpl12_HB
TH1F * h_sum0TSmeanAperLS6
const int znphi
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
double lsdep_estimator1_HBdepth2_
TH2F * h_2D0sumADCAmplLSdepth3HBu
TH1F * h_runbadrate_depth1_HE
TH1F * h_sumADCAmplperLS6_M1
TH2F * h_recNoiseEnergy2_HF3
const HcalLUTCorr * getHcalLUTCorr(const HcalGenericDetId &fId) const
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
const_iterator begin() const
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
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
float getSigma(int fCapId1, int fCapId2) const
get correlation element for capId1/2 = 0..3
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
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
def gen(fragment, howMuch)
Production test section ####.
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
TH2F * h_mapDepth4ADCAmpl12_HO
ii
Definition: cuy.py:589
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
const_iterator end() const
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
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
TH2F * h_mapDepth1Pedw0_HB
TH2F * h_2D0sumPedestalLS3
TH1F * h_sumAmplitudeperLS4
TH2F * h_2DsumADCAmplEtaPhiLs00
TH1F * h_energyhitNoise_HF
constexpr int samples() const
total number of samples in the digi
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
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
float getValue() const
Definition: HcalRespCorr.h:19
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
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
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
const HcalGain * getGain(const HcalGenericDetId &fId) const
TH2F * h_2D0sumADCAmplLSdepth4HBu
TH2F * h_recNoiseEnergy1_HE2
TH1F * h_sumCutTSmaxAperLS8
TH2F * h_mapDepth4TSmeanA_HO
constexpr int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
TH1F * h_averSIGNALsumamplitude_HE
TH2F * h_mapRatioCalib047_HF
TH2F * h_mapDepth1TS2_HE
double signal3[ndepth][neta][nphi]
TH1F * h_bcnbadrate0_depth1_HB
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
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
TH2F * h2_TSnVsAyear2023_HF
TH1F * h_sumphiEta16Depth3RADDAM_HED2P
TH2F * h_2D0sumADCAmplLSdepth5HEu
int rmFiber() const
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
bool isValid() const
Definition: HandleBase.h:70
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
TH2F * h2_TSnVsAyear2023_HB
TH1F * h_averNOSIGNALoccupancy_HE
edm::EDGetTokenT< HFDigiCollection > tok_hf_
TH2F * h_mapDepth2ADCAmpl225_HF
TH1F * h_runbadrateC_depth3_HE
TH2F * h_recSignalEnergy2_HB4
double calibrTSmaxHFMin_
double lsdep_estimator5_HEdepth2_
double signal[ndepth][neta][nphi]
TH1F * h_sumADCAmplEtaPhiLs_lscounterM1orbitNum
constexpr int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
TH1F * h_RatioOccupancy_HFP
TH1F * h_totalAmplitudeHB
TH2F * h_mapenophinorm_HE3
double lsdep_estimator3_HFdepth2_
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()
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
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
constexpr int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
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
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
TH1F * h1_TSnVsAyear2023_HO
TH2F * h_mapDepth2ADCAmpl225Copy_HF
TH1F * h_gsmdifferencefit2_HE
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
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
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_
TH1F * h1_TSnVsAyear2023_HE
double averSIGNALsumamplitude_HB
TH2F * h_amplitudechannel2_HE4
TH1F * h_sumCutTSmaxAperLS7
double averSIGNALsumamplitude_HF
TH2F * h_mapTSmeanCalib_HO
TH2F * h_mapDepth2AmplE34_HF
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
int adc() const
TH2F * h_recSignalEnergy2_HE1
double lsdep_estimator5_HEdepth3_
TH2F * h_recSignalEnergy0_HB4
double const adc2fC_QIE11_shunt1[256]
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_
TH1F * h_amplitudeaveragedbydepthes_HE
TH1F * h_sumADCAmplperLS3_P2
TH1F * h1_TSnVsAyear20230_HO
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
const HcalTimeCorr * getHcalTimeCorr(const HcalGenericDetId &fId) const
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
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
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
TH1F * h_gsmdifferencefit1_HE
TH2F * h_recNoiseEnergy0_HE1
TH2F * h_mapenophinorm2_HE2
double calibrWidthHOMax_
TH2F * h_mapDepth1ADCAmplSiPM_HE
TH1F * h_ADCAmplZoom1_HB
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_
constexpr int samples() const
total number of samples in the digi
TH1F * h_Amplitude_notCapIdErrors_HF1
double averSIGNALoccupancy_HF
TH2F * h_mapDepth3AmplE34_HE
TH2F * h_recNoiseEnergy2_HE2
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
TH1F * h_sumCutADCAmplperLS7
TH1F * h_sumCutAmplitudeperLS4
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
bool studyPedestalCorrelations_