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 pnnmin1 = 999999999;
2792  int pnnmin3 = 999999999;
2793  int pnnmin6 = 999999999;
2794  int pnnmin8 = 999999999;
2795  int mnnbins1 = 0;
2796  int mnnbins3 = 0;
2797  int mnnbins6 = 0;
2798  int mnnbins8 = 0;
2799  int mnnmin1 = 999999999;
2800  int mnnmin3 = 999999999;
2801  int mnnmin6 = 999999999;
2802  int mnnmin8 = 999999999;
2803  for (int k0 = 0; k0 < nsub; k0++) {
2804  for (int k1 = 0; k1 < ndepth; k1++) {
2805  for (int k3 = 0; k3 < nphi; k3++) {
2806  for (int k2 = 0; k2 < neta; k2++) {
2807  int ieta = k2 - 41;
2808  // ------------------------------------------------------------sumEstimator0
2809  if (sumEstimator0[k0][k1][k2][k3] != 0.) {
2810  // fill histoes:
2811  double bbbc = 0.;
2812  if (flagestimatornormalization_ == 0)
2813  bbbc = sumEstimator0[k0][k1][k2][k3] / nevcounter0;
2814  if (flagestimatornormalization_ == 1)
2815  bbbc = sumEstimator0[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
2816  double bbb1 = 1.;
2817  if (flagestimatornormalization_ == 2) {
2818  bbbc = sumEstimator0[k0][k1][k2][k3];
2819  bbb1 = sum0Estimator[k0][k1][k2][k3];
2820  }
2821 
2822  // HB:
2823  if (k0 == 0) {
2824  // HBdepth1
2825  if (k1 + 1 == 1) {
2826  h_sumPedestalLS1->Fill(bbbc / bbb1);
2827  h_2DsumPedestalLS1->Fill(double(ieta), double(k3), bbbc);
2828  h_2D0sumPedestalLS1->Fill(double(ieta), double(k3), bbb1);
2829  h_sumPedestalperLS1->Fill(float(lscounterM1), bbbc);
2830  h_sum0PedestalperLS1->Fill(float(lscounterM1), bbb1);
2831  }
2832  if (k1 + 1 == 2) {
2833  h_sumPedestalLS2->Fill(bbbc / bbb1);
2834  h_2DsumPedestalLS2->Fill(double(ieta), double(k3), bbbc);
2835  h_2D0sumPedestalLS2->Fill(double(ieta), double(k3), bbb1);
2836  h_sumPedestalperLS2->Fill(float(lscounterM1), bbbc);
2837  h_sum0PedestalperLS2->Fill(float(lscounterM1), bbb1);
2838  }
2839  }
2840  // HE:
2841  if (k0 == 1) {
2842  // HEdepth1
2843  if (k1 + 1 == 1) {
2844  h_sumPedestalLS3->Fill(bbbc / bbb1);
2845  h_2DsumPedestalLS3->Fill(double(ieta), double(k3), bbbc);
2846  h_2D0sumPedestalLS3->Fill(double(ieta), double(k3), bbb1);
2847  h_sumPedestalperLS3->Fill(float(lscounterM1), bbbc);
2848  h_sum0PedestalperLS3->Fill(float(lscounterM1), bbb1);
2849  }
2850  if (k1 + 1 == 2) {
2851  h_sumPedestalLS4->Fill(bbbc / bbb1);
2852  h_2DsumPedestalLS4->Fill(double(ieta), double(k3), bbbc);
2853  h_2D0sumPedestalLS4->Fill(double(ieta), double(k3), bbb1);
2854  h_sumPedestalperLS4->Fill(float(lscounterM1), bbbc);
2855  h_sum0PedestalperLS4->Fill(float(lscounterM1), bbb1);
2856  }
2857  if (k1 + 1 == 3) {
2858  h_sumPedestalLS5->Fill(bbbc / bbb1);
2859  h_2DsumPedestalLS5->Fill(double(ieta), double(k3), bbbc);
2860  h_2D0sumPedestalLS5->Fill(double(ieta), double(k3), bbb1);
2861  h_sumPedestalperLS5->Fill(float(lscounterM1), bbbc);
2862  h_sum0PedestalperLS5->Fill(float(lscounterM1), bbb1);
2863  }
2864  }
2865  // HF:
2866  if (k0 == 3) {
2867  // HFdepth1
2868  if (k1 + 1 == 1) {
2869  h_sumPedestalLS6->Fill(bbbc / bbb1);
2870  h_2DsumPedestalLS6->Fill(double(ieta), double(k3), bbbc);
2871  h_2D0sumPedestalLS6->Fill(double(ieta), double(k3), bbb1);
2872  h_sumPedestalperLS6->Fill(float(lscounterM1), bbbc);
2873  h_sum0PedestalperLS6->Fill(float(lscounterM1), bbb1);
2874  }
2875  if (k1 + 1 == 2) {
2876  h_sumPedestalLS7->Fill(bbbc / bbb1);
2877  h_2DsumPedestalLS7->Fill(double(ieta), double(k3), bbbc);
2878  h_2D0sumPedestalLS7->Fill(double(ieta), double(k3), bbb1);
2879  h_sumPedestalperLS7->Fill(float(lscounterM1), bbbc);
2880  h_sum0PedestalperLS7->Fill(float(lscounterM1), bbb1);
2881  }
2882  }
2883  // HO:
2884  if (k0 == 2) {
2885  // HOdepth4
2886  if (k1 + 1 == 4) {
2887  h_sumPedestalLS8->Fill(bbbc / bbb1);
2888  h_2DsumPedestalLS8->Fill(double(ieta), double(k3), bbbc);
2889  h_2D0sumPedestalLS8->Fill(double(ieta), double(k3), bbb1);
2890  h_sumPedestalperLS8->Fill(float(lscounterM1), bbbc);
2891  h_sum0PedestalperLS8->Fill(float(lscounterM1), bbb1);
2892  }
2893  }
2894  } //if(sumEstimator0[k0][k1][k2][k3] != 0.
2895 
2896  // ------------------------------------------------------------------------------------- sumEstimator1
2897  if (sumEstimator1[k0][k1][k2][k3] != 0.) {
2898  // fill histoes:
2899  double bbbc = 0.;
2900  if (flagestimatornormalization_ == 0)
2901  bbbc = sumEstimator1[k0][k1][k2][k3] / nevcounter0;
2902  if (flagestimatornormalization_ == 1)
2903  bbbc = sumEstimator1[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
2904  double bbb1 = 1.;
2905  if (flagestimatornormalization_ == 2) {
2906  bbbc = sumEstimator1[k0][k1][k2][k3];
2907  bbb1 = sum0Estimator[k0][k1][k2][k3];
2908  }
2909  //flag for ask type of Normalization for CMT estimators:
2910  //=0-normalizationOn#evOfLS; =1-averagedMeanChannelVariable; =2-averageVariable-normalizationOn#entriesInLS;
2911  //flagestimatornormalization = cms.int32(2), !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2912  // zhokin 18.10.2018 STUDY: CALL HFF2 (ID,NID,X,Y,W)
2913  if (lscounterM1 >= lsmin_ && lscounterM1 < lsmax_) {
2914  // INDEXIES:
2915  int kkkk2 = (k2 - 1) / 4;
2916  if (k2 == 0)
2917  kkkk2 = 1.;
2918  else
2919  kkkk2 += 2; //kkkk2= 1-22
2920  int kkkk3 = (k3) / 4 + 1; //kkkk3= 1-18
2921  // PACKING
2922  //kkkk2= 1-22 ;kkkk3= 1-18
2923  int ietaphi = 0;
2924  ietaphi = ((kkkk2)-1) * znphi + (kkkk3);
2925  // Outout is ietaphi = 1 - 396 ( # =396; in histo,booking is: 1 - 397 )
2926 
2927  double bbb3 = 0.;
2928  if (bbb1 != 0.)
2929  bbb3 = bbbc / bbb1;
2930  // very very wrong if below:
2931  // if(bbb3 != 0.) {
2932 
2933  if (k0 == 0) {
2934  h_2DsumADCAmplEtaPhiLs0->Fill(float(lscounterM1), float(ietaphi), bbbc); //HB
2935  h_2DsumADCAmplEtaPhiLs00->Fill(float(lscounterM1), float(ietaphi), bbb1); //HB
2936  }
2937  if (k0 == 1) {
2938  h_2DsumADCAmplEtaPhiLs1->Fill(float(lscounterM1), float(ietaphi), bbbc); //HE
2939  h_2DsumADCAmplEtaPhiLs10->Fill(float(lscounterM1), float(ietaphi), bbb1); //HE
2940  }
2941  if (k0 == 2) {
2942  h_2DsumADCAmplEtaPhiLs2->Fill(float(lscounterM1), float(ietaphi), bbbc); //HO
2943  h_2DsumADCAmplEtaPhiLs20->Fill(float(lscounterM1), float(ietaphi), bbb1); //HO
2944  }
2945  if (k0 == 3) {
2946  h_2DsumADCAmplEtaPhiLs3->Fill(float(lscounterM1), float(ietaphi), bbbc); //HF
2947  h_2DsumADCAmplEtaPhiLs30->Fill(float(lscounterM1), float(ietaphi), bbb1); //HF
2948  }
2949 
2950  h_sumADCAmplEtaPhiLs->Fill(bbb3);
2951  h_sumADCAmplEtaPhiLs_bbbc->Fill(bbbc);
2952  h_sumADCAmplEtaPhiLs_bbb1->Fill(bbb1);
2954  h_sumADCAmplEtaPhiLs_orbitNum->Fill(float(orbitNum), 1.);
2956  h_sumADCAmplEtaPhiLs_ietaphi->Fill(float(ietaphi));
2957 
2958  // }// bb3
2959  } // lscounterM1 >= lsmin_ && lscounterM1 < lsmax_
2960 
2961  // HB:
2962  if (k0 == 0) {
2963  // HBdepth1
2964  if (k1 + 1 == 1) {
2965  h_sumADCAmplLS1copy1->Fill(bbbc / bbb1);
2966  h_sumADCAmplLS1copy2->Fill(bbbc / bbb1);
2967  h_sumADCAmplLS1copy3->Fill(bbbc / bbb1);
2968  h_sumADCAmplLS1copy4->Fill(bbbc / bbb1);
2969  h_sumADCAmplLS1copy5->Fill(bbbc / bbb1);
2970  h_sumADCAmplLS1->Fill(bbbc / bbb1);
2971  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
2972  h_2DsumADCAmplLS1->Fill(double(ieta), double(k3), bbbc);
2973  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth1_)
2974  h_2DsumADCAmplLS1_LSselected->Fill(double(ieta), double(k3), bbbc);
2975 
2976  h_2D0sumADCAmplLS1->Fill(double(ieta), double(k3), bbb1);
2977 
2978  h_sumADCAmplperLS1->Fill(float(lscounterM1), bbbc);
2979  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
2980  h_sumCutADCAmplperLS1->Fill(float(lscounterM1), bbbc);
2981  h_sum0ADCAmplperLS1->Fill(float(lscounterM1), bbb1);
2982 
2983  if (ieta > 0) {
2984  if (k3 < 36) {
2985  h_sumADCAmplperLS1_P1->Fill(float(lscounterM1), bbbc);
2986  h_sum0ADCAmplperLS1_P1->Fill(float(lscounterM1), bbb1);
2987  } else {
2988  h_sumADCAmplperLS1_P2->Fill(float(lscounterM1), bbbc);
2989  h_sum0ADCAmplperLS1_P2->Fill(float(lscounterM1), bbb1);
2990  }
2992  if (bbbc / bbb1 > 25.) {
2993  pcountall1 += bbb1;
2994  pcountmin1 += bbb1;
2995  }
2997 
2998  } else {
2999  if (k3 < 36) {
3000  h_sumADCAmplperLS1_M1->Fill(float(lscounterM1), bbbc);
3001  h_sum0ADCAmplperLS1_M1->Fill(float(lscounterM1), bbb1);
3002  } else {
3003  h_sumADCAmplperLS1_M2->Fill(float(lscounterM1), bbbc);
3004  h_sum0ADCAmplperLS1_M2->Fill(float(lscounterM1), bbb1);
3005  }
3007  if (bbbc / bbb1 > 25.) {
3008  mcountall1 += bbb1;
3009  mcountmin1 += bbb1;
3010  }
3012  }
3013  }
3014  // HBdepth2
3015  if (k1 + 1 == 2) {
3016  h_sumADCAmplLS2->Fill(bbbc / bbb1);
3017  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
3018  h_2DsumADCAmplLS2->Fill(double(ieta), double(k3), bbbc);
3019  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth2_)
3020  h_2DsumADCAmplLS2_LSselected->Fill(double(ieta), double(k3), bbbc);
3021  h_2D0sumADCAmplLS2->Fill(double(ieta), double(k3), bbb1);
3022  h_sumADCAmplperLS2->Fill(float(lscounterM1), bbbc);
3023  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
3024  h_sumCutADCAmplperLS2->Fill(float(lscounterM1), bbbc);
3025  h_sum0ADCAmplperLS2->Fill(float(lscounterM1), bbb1);
3026  if (ieta > 0) {
3027  if (k3 < 36) {
3028  h_sumADCAmplperLS1_P1->Fill(float(lscounterM1), bbbc);
3029  h_sum0ADCAmplperLS1_P1->Fill(float(lscounterM1), bbb1);
3030  } else {
3031  h_sumADCAmplperLS1_P2->Fill(float(lscounterM1), bbbc);
3032  h_sum0ADCAmplperLS1_P2->Fill(float(lscounterM1), bbb1);
3033  }
3034  } else {
3035  if (k3 < 36) {
3036  h_sumADCAmplperLS1_M1->Fill(float(lscounterM1), bbbc);
3037  h_sum0ADCAmplperLS1_M1->Fill(float(lscounterM1), bbb1);
3038  } else {
3039  h_sumADCAmplperLS1_M2->Fill(float(lscounterM1), bbbc);
3040  h_sum0ADCAmplperLS1_M2->Fill(float(lscounterM1), bbb1);
3041  }
3042  }
3043  }
3044  // HBdepth3 upgrade
3045  if (k1 + 1 == 3) {
3046  h_sumADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
3047  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
3048  h_sumCutADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
3049  h_sum0ADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbb1);
3050 
3051  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
3052  h_2DsumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbbc);
3053  h_2D0sumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbb1);
3054  } //if(k1+1 ==3)
3055 
3056  // HBdepth4 upgrade
3057  if (k1 + 1 == 4) {
3058  h_sumADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
3059  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
3060  h_sumCutADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
3061  h_sum0ADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbb1);
3062 
3063  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
3064  h_2DsumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbbc);
3065  h_2D0sumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbb1);
3066  } //if(k1+1 ==4)
3067  }
3068 
3069  // HE:
3070  if (k0 == 1) {
3071  // HEdepth1
3072  if (k1 + 1 == 1) {
3073  h_sumADCAmplLS3->Fill(bbbc / bbb1);
3074  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
3075  h_2DsumADCAmplLS3->Fill(double(ieta), double(k3), bbbc);
3076  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth1_)
3077  h_2DsumADCAmplLS3_LSselected->Fill(double(ieta), double(k3), bbbc);
3078  h_2D0sumADCAmplLS3->Fill(double(ieta), double(k3), bbb1);
3079  h_sumADCAmplperLS3->Fill(float(lscounterM1), bbbc);
3080  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
3081  h_sumCutADCAmplperLS3->Fill(float(lscounterM1), bbbc);
3082  h_sum0ADCAmplperLS3->Fill(float(lscounterM1), bbb1);
3083  if (ieta > 0) {
3084  if (k3 < 36) {
3085  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3086  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3087  } else {
3088  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3089  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3090  }
3092  if (bbbc / bbb1 > 15. && k3 % 2 == 0) {
3093  pcountall3 += bbb1;
3094  pcountmin3 += bbb1;
3095  }
3097  } else {
3098  if (k3 < 36) {
3099  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3100  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3101  } else {
3102  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3103  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3104  }
3106  if (bbbc / bbb1 > 15. && k3 % 2 == 0) {
3107  mcountall3 += bbb1;
3108  mcountmin3 += bbb1;
3109  }
3111  }
3112  }
3113  // HEdepth2
3114  if (k1 + 1 == 2) {
3115  h_sumADCAmplLS4->Fill(bbbc / bbb1);
3116  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
3117  h_2DsumADCAmplLS4->Fill(double(ieta), double(k3), bbbc);
3118  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth2_)
3119  h_2DsumADCAmplLS4_LSselected->Fill(double(ieta), double(k3), bbbc);
3120  h_2D0sumADCAmplLS4->Fill(double(ieta), double(k3), bbb1);
3121  h_sumADCAmplperLS4->Fill(float(lscounterM1), bbbc);
3122  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
3123  h_sumCutADCAmplperLS4->Fill(float(lscounterM1), bbbc);
3124  h_sum0ADCAmplperLS4->Fill(float(lscounterM1), bbb1);
3125  if (ieta > 0) {
3126  if (k3 < 36) {
3127  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3128  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3129  } else {
3130  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3131  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3132  }
3133  } else {
3134  if (k3 < 36) {
3135  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3136  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3137  } else {
3138  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3139  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3140  }
3141  }
3142  }
3143  // HEdepth3
3144  if (k1 + 1 == 3) {
3145  h_sumADCAmplLS5->Fill(bbbc / bbb1);
3146  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
3147  h_2DsumADCAmplLS5->Fill(double(ieta), double(k3), bbbc);
3148  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth3_)
3149  h_2DsumADCAmplLS5_LSselected->Fill(double(ieta), double(k3), bbbc);
3150  h_2D0sumADCAmplLS5->Fill(double(ieta), double(k3), bbb1);
3151  h_sumADCAmplperLS5->Fill(float(lscounterM1), bbbc);
3152  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
3153  h_sumCutADCAmplperLS5->Fill(float(lscounterM1), bbbc);
3154  h_sum0ADCAmplperLS5->Fill(float(lscounterM1), bbb1);
3155  if (ieta > 0) {
3156  if (k3 < 36) {
3157  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3158  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3159  } else {
3160  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3161  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3162  }
3163  } else {
3164  if (k3 < 36) {
3165  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3166  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3167  } else {
3168  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3169  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3170  }
3171  }
3172  } //if(k1+1 ==3
3173  // HEdepth4 upgrade
3174  if (k1 + 1 == 4) {
3175  h_sumADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
3176  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
3177  h_sumCutADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
3178  h_sum0ADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbb1);
3179 
3180  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
3181  h_2DsumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbbc);
3182  h_2D0sumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbb1);
3183  } //if(k1+1 ==4)
3184 
3185  // HEdepth5 upgrade
3186  if (k1 + 1 == 5) {
3187  h_sumADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
3188  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
3189  h_sumCutADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
3190  h_sum0ADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbb1);
3191 
3192  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
3193  h_2DsumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbbc);
3194  h_2D0sumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbb1);
3195  } //if(k1+1 ==5)
3196 
3197  // HEdepth6 upgrade
3198  if (k1 + 1 == 6) {
3199  h_sumADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
3200  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
3201  h_sumCutADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
3202  h_sum0ADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbb1);
3203 
3204  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
3205  h_2DsumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbbc);
3206  h_2D0sumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbb1);
3207  } //if(k1+1 ==6)
3208 
3209  // HEdepth7 upgrade
3210  if (k1 + 1 == 7) {
3211  h_sumADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
3212  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
3213  h_sumCutADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
3214  h_sum0ADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbb1);
3215 
3216  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
3217  h_2DsumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbbc);
3218  h_2D0sumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbb1);
3219  } //if(k1+1 ==7)
3220  } //if(k0==1) =HE
3221  // HF:
3222  if (k0 == 3) {
3223  // HFdepth1
3224  if (k1 + 1 == 1) {
3225  h_sumADCAmplLS6->Fill(bbbc / bbb1);
3226  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
3227  h_2DsumADCAmplLS6->Fill(double(ieta), double(k3), bbbc);
3228  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth1_)
3229  h_2DsumADCAmplLS6_LSselected->Fill(double(ieta), double(k3), bbbc);
3230  h_2D0sumADCAmplLS6->Fill(double(ieta), double(k3), bbb1);
3231  h_sumADCAmplperLS6->Fill(float(lscounterM1), bbbc);
3232  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
3233  h_sumCutADCAmplperLS6->Fill(float(lscounterM1), bbbc);
3234  h_sum0ADCAmplperLS6->Fill(float(lscounterM1), bbb1);
3235 
3237  if (ieta > 0) {
3238  if (k3 < 36) {
3239  h_sumADCAmplperLS6_P1->Fill(float(lscounterM1), bbbc);
3240  h_sum0ADCAmplperLS6_P1->Fill(float(lscounterM1), bbb1);
3241  } else {
3242  h_sumADCAmplperLS6_P2->Fill(float(lscounterM1), bbbc);
3243  h_sum0ADCAmplperLS6_P2->Fill(float(lscounterM1), bbb1);
3244  }
3246  if (bbbc / bbb1 > 20.) {
3247  pcountall6 += bbb1;
3248  pcountmin6 += bbb1;
3249  }
3251 
3252  } else {
3253  if (k3 < 36) {
3254  h_sumADCAmplperLS6_M1->Fill(float(lscounterM1), bbbc);
3255  h_sum0ADCAmplperLS6_M1->Fill(float(lscounterM1), bbb1);
3256  } else {
3257  h_sumADCAmplperLS6_M2->Fill(float(lscounterM1), bbbc);
3258  h_sum0ADCAmplperLS6_M2->Fill(float(lscounterM1), bbb1);
3259  }
3261  if (bbbc / bbb1 > 20.) {
3262  mcountall6 += bbb1;
3263  mcountmin6 += bbb1;
3264  }
3266  }
3268  } //if(k1+1 ==1)
3269 
3270  // HFdepth2
3271  if (k1 + 1 == 2) {
3272  h_sumADCAmplLS7->Fill(bbbc / bbb1);
3273  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
3274  h_2DsumADCAmplLS7->Fill(double(ieta), double(k3), bbbc);
3275  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth2_)
3276  h_2DsumADCAmplLS7_LSselected->Fill(double(ieta), double(k3), bbbc);
3277  h_2D0sumADCAmplLS7->Fill(double(ieta), double(k3), bbb1);
3278  h_sumADCAmplperLS7->Fill(float(lscounterM1), bbbc);
3279  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
3280  h_sumCutADCAmplperLS7->Fill(float(lscounterM1), bbbc);
3281  h_sum0ADCAmplperLS7->Fill(float(lscounterM1), bbb1);
3282 
3283  if (ieta > 0) {
3284  if (k3 < 36) {
3285  h_sumADCAmplperLS6_P1->Fill(float(lscounterM1), bbbc);
3286  h_sum0ADCAmplperLS6_P1->Fill(float(lscounterM1), bbb1);
3287  } else {
3288  h_sumADCAmplperLS6_P2->Fill(float(lscounterM1), bbbc);
3289  h_sum0ADCAmplperLS6_P2->Fill(float(lscounterM1), bbb1);
3290  }
3291  } else {
3292  if (k3 < 36) {
3293  h_sumADCAmplperLS6_M1->Fill(float(lscounterM1), bbbc);
3294  h_sum0ADCAmplperLS6_M1->Fill(float(lscounterM1), bbb1);
3295  } else {
3296  h_sumADCAmplperLS6_M2->Fill(float(lscounterM1), bbbc);
3297  h_sum0ADCAmplperLS6_M2->Fill(float(lscounterM1), bbb1);
3298  }
3299  }
3300  } //if(k1+1 ==2)
3301 
3302  // HFdepth3 upgrade
3303  if (k1 + 1 == 3) {
3304  h_sumADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
3305  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
3306  h_sumCutADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
3307  h_sum0ADCAmplperLS6u->Fill(float(lscounterM1), bbb1);
3308 
3309  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
3310  h_2DsumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbbc);
3311  h_2D0sumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbb1);
3312  } //if(k1+1 ==3)
3313 
3314  // HFdepth4 upgrade
3315  if (k1 + 1 == 4) {
3316  h_sumADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
3317  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
3318  h_sumCutADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
3319  h_sum0ADCAmplperLS7u->Fill(float(lscounterM1), bbb1);
3320 
3321  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
3322  h_2DsumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbbc);
3323  h_2D0sumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbb1);
3324  } //if(k1+1 ==4)
3325 
3326  } //end HF
3327 
3328  // HO:
3329  if (k0 == 2) {
3330  // HOdepth4
3331  if (k1 + 1 == 4) {
3332  h_sumADCAmplLS8->Fill(bbbc / bbb1);
3333  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
3334  h_2DsumADCAmplLS8->Fill(double(ieta), double(k3), bbbc);
3335  if (bbbc / bbb1 > 2. * lsdep_estimator1_HOdepth4_)
3336  h_2DsumADCAmplLS8_LSselected->Fill(double(ieta), double(k3), bbbc);
3337  h_2D0sumADCAmplLS8->Fill(double(ieta), double(k3), bbb1);
3338  h_sumADCAmplperLS8->Fill(float(lscounterM1), bbbc);
3339  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
3340  h_sumCutADCAmplperLS8->Fill(float(lscounterM1), bbbc);
3341  h_sum0ADCAmplperLS8->Fill(float(lscounterM1), bbb1);
3342 
3344  if (ieta > 0) {
3345  if (k3 < 36) {
3346  h_sumADCAmplperLS8_P1->Fill(float(lscounterM1), bbbc);
3347  h_sum0ADCAmplperLS8_P1->Fill(float(lscounterM1), bbb1);
3348  } else {
3349  h_sumADCAmplperLS8_P2->Fill(float(lscounterM1), bbbc);
3350  h_sum0ADCAmplperLS8_P2->Fill(float(lscounterM1), bbb1);
3351  }
3353  if (bbbc / bbb1 > 80.) {
3354  pcountall8 += bbb1;
3355  pcountmin8 += bbb1;
3356  }
3358 
3359  } else {
3360  if (k3 < 36) {
3361  h_sumADCAmplperLS8_M1->Fill(float(lscounterM1), bbbc);
3362  h_sum0ADCAmplperLS8_M1->Fill(float(lscounterM1), bbb1);
3363  } else {
3364  h_sumADCAmplperLS8_M2->Fill(float(lscounterM1), bbbc);
3365  h_sum0ADCAmplperLS8_M2->Fill(float(lscounterM1), bbb1);
3366  }
3368  if (bbbc / bbb1 > 80.) {
3369  mcountall8 += bbb1;
3370  mcountmin8 += bbb1;
3371  }
3373  }
3375  }
3376  }
3377  } //if(sumEstimator1[k0][k1][k2][k3] != 0.
3378  // ------------------------------------------------------------------------------------------------------------------------sumEstimator2
3379  if (sumEstimator2[k0][k1][k2][k3] != 0.) {
3380  // fill histoes:
3381  double bbbc = 0.;
3382  if (flagestimatornormalization_ == 0)
3383  bbbc = sumEstimator2[k0][k1][k2][k3] / nevcounter0;
3384  if (flagestimatornormalization_ == 1)
3385  bbbc = sumEstimator2[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3386  double bbb1 = 1.;
3387  if (flagestimatornormalization_ == 2) {
3388  bbbc = sumEstimator2[k0][k1][k2][k3];
3389  bbb1 = sum0Estimator[k0][k1][k2][k3];
3390  }
3391 
3392  // HB:
3393  if (k0 == 0) {
3394  // HBdepth1
3395  if (k1 + 1 == 1) {
3396  h_sumTSmeanALS1->Fill(bbbc / bbb1);
3397  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
3398  h_2DsumTSmeanALS1->Fill(double(ieta), double(k3), bbbc);
3399  h_2D0sumTSmeanALS1->Fill(double(ieta), double(k3), bbb1);
3400  h_sumTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
3401  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
3402  h_sumCutTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
3403  h_sum0TSmeanAperLS1->Fill(float(lscounterM1), bbb1);
3404  if (bbbc / bbb1 > 2. * lsdep_estimator2_HBdepth1_)
3405  h_sumTSmeanAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3406  }
3407  if (k1 + 1 == 2) {
3408  h_sumTSmeanALS2->Fill(bbbc / bbb1);
3409  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
3410  h_2DsumTSmeanALS2->Fill(double(ieta), double(k3), bbbc);
3411  h_2D0sumTSmeanALS2->Fill(double(ieta), double(k3), bbb1);
3412  h_sumTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
3413  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
3414  h_sumCutTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
3415  h_sum0TSmeanAperLS2->Fill(float(lscounterM1), bbb1);
3416  }
3417  }
3418  // HE:
3419  if (k0 == 1) {
3420  // HBdepth1
3421  if (k1 + 1 == 1) {
3422  h_sumTSmeanALS3->Fill(bbbc / bbb1);
3423  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
3424  h_2DsumTSmeanALS3->Fill(double(ieta), double(k3), bbbc);
3425  h_2D0sumTSmeanALS3->Fill(double(ieta), double(k3), bbb1);
3426  h_sumTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
3427  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
3428  h_sumCutTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
3429  h_sum0TSmeanAperLS3->Fill(float(lscounterM1), bbb1);
3430  }
3431  if (k1 + 1 == 2) {
3432  h_sumTSmeanALS4->Fill(bbbc / bbb1);
3433  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
3434  h_2DsumTSmeanALS4->Fill(double(ieta), double(k3), bbbc);
3435  h_2D0sumTSmeanALS4->Fill(double(ieta), double(k3), bbb1);
3436  h_sumTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
3437  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
3438  h_sumCutTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
3439  h_sum0TSmeanAperLS4->Fill(float(lscounterM1), bbb1);
3440  }
3441  if (k1 + 1 == 3) {
3442  h_sumTSmeanALS5->Fill(bbbc / bbb1);
3443  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
3444  h_2DsumTSmeanALS5->Fill(double(ieta), double(k3), bbbc);
3445  h_2D0sumTSmeanALS5->Fill(double(ieta), double(k3), bbb1);
3446  h_sumTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
3447  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
3448  h_sumCutTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
3449  h_sum0TSmeanAperLS5->Fill(float(lscounterM1), bbb1);
3450  }
3451  }
3452  // HF:
3453  if (k0 == 3) {
3454  // HBdepth1
3455  if (k1 + 1 == 1) {
3456  h_sumTSmeanALS6->Fill(bbbc / bbb1);
3457  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
3458  h_2DsumTSmeanALS6->Fill(double(ieta), double(k3), bbbc);
3459  h_2D0sumTSmeanALS6->Fill(double(ieta), double(k3), bbb1);
3460  h_sumTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
3461  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
3462  h_sumCutTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
3463  h_sum0TSmeanAperLS6->Fill(float(lscounterM1), bbb1);
3464  }
3465  if (k1 + 1 == 2) {
3466  h_sumTSmeanALS7->Fill(bbbc / bbb1);
3467  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
3468  h_2DsumTSmeanALS7->Fill(double(ieta), double(k3), bbbc);
3469  h_2D0sumTSmeanALS7->Fill(double(ieta), double(k3), bbb1);
3470  h_sumTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
3471  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
3472  h_sumCutTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
3473  h_sum0TSmeanAperLS7->Fill(float(lscounterM1), bbb1);
3474  }
3475  }
3476  // HO:
3477  if (k0 == 2) {
3478  // HBdepth1
3479  if (k1 + 1 == 4) {
3480  h_sumTSmeanALS8->Fill(bbbc / bbb1);
3481  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
3482  h_2DsumTSmeanALS8->Fill(double(ieta), double(k3), bbbc);
3483  h_2D0sumTSmeanALS8->Fill(double(ieta), double(k3), bbb1);
3484  h_sumTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
3485  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
3486  h_sumCutTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
3487  h_sum0TSmeanAperLS8->Fill(float(lscounterM1), bbb1);
3488  }
3489  }
3490  } //if(sumEstimator2[k0][k1][k2][k3] != 0.
3491 
3492  // ------------------------------------------------------------------------------------------------------------------------sumEstimator3
3493  if (sumEstimator3[k0][k1][k2][k3] != 0.) {
3494  // fill histoes:
3495  double bbbc = 0.;
3496  if (flagestimatornormalization_ == 0)
3497  bbbc = sumEstimator3[k0][k1][k2][k3] / nevcounter0;
3498  if (flagestimatornormalization_ == 1)
3499  bbbc = sumEstimator3[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3500  double bbb1 = 1.;
3501  if (flagestimatornormalization_ == 2) {
3502  bbbc = sumEstimator3[k0][k1][k2][k3];
3503  bbb1 = sum0Estimator[k0][k1][k2][k3];
3504  }
3505 
3506  // HB:
3507  if (k0 == 0) {
3508  // HBdepth1
3509  if (k1 + 1 == 1) {
3510  h_sumTSmaxALS1->Fill(bbbc / bbb1);
3511  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
3512  h_2DsumTSmaxALS1->Fill(double(ieta), double(k3), bbbc);
3513  h_2D0sumTSmaxALS1->Fill(double(ieta), double(k3), bbb1);
3514  h_sumTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
3515  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
3516  h_sumCutTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
3517  h_sum0TSmaxAperLS1->Fill(float(lscounterM1), bbb1);
3518  if (bbbc / bbb1 > 2. * lsdep_estimator3_HBdepth1_)
3519  h_sumTSmaxAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3520  }
3521  if (k1 + 1 == 2) {
3522  h_sumTSmaxALS2->Fill(bbbc / bbb1);
3523  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
3524  h_2DsumTSmaxALS2->Fill(double(ieta), double(k3), bbbc);
3525  h_2D0sumTSmaxALS2->Fill(double(ieta), double(k3), bbb1);
3526  h_sumTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
3527  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
3528  h_sumCutTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
3529  h_sum0TSmaxAperLS2->Fill(float(lscounterM1), bbb1);
3530  }
3531  }
3532  // HE:
3533  if (k0 == 1) {
3534  // HBdepth1
3535  if (k1 + 1 == 1) {
3536  h_sumTSmaxALS3->Fill(bbbc / bbb1);
3537  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
3538  h_2DsumTSmaxALS3->Fill(double(ieta), double(k3), bbbc);
3539  h_2D0sumTSmaxALS3->Fill(double(ieta), double(k3), bbb1);
3540  h_sumTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
3541  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
3542  h_sumCutTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
3543  h_sum0TSmaxAperLS3->Fill(float(lscounterM1), bbb1);
3544  }
3545  if (k1 + 1 == 2) {
3546  h_sumTSmaxALS4->Fill(bbbc / bbb1);
3547  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
3548  h_2DsumTSmaxALS4->Fill(double(ieta), double(k3), bbbc);
3549  h_2D0sumTSmaxALS4->Fill(double(ieta), double(k3), bbb1);
3550  h_sumTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
3551  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
3552  h_sumCutTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
3553  h_sum0TSmaxAperLS4->Fill(float(lscounterM1), bbb1);
3554  }
3555  if (k1 + 1 == 3) {
3556  h_sumTSmaxALS5->Fill(bbbc / bbb1);
3557  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
3558  h_2DsumTSmaxALS5->Fill(double(ieta), double(k3), bbbc);
3559  h_2D0sumTSmaxALS5->Fill(double(ieta), double(k3), bbb1);
3560  h_sumTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
3561  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
3562  h_sumCutTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
3563  h_sum0TSmaxAperLS5->Fill(float(lscounterM1), bbb1);
3564  }
3565  }
3566  // HF:
3567  if (k0 == 3) {
3568  // HBdepth1
3569  if (k1 + 1 == 1) {
3570  h_sumTSmaxALS6->Fill(bbbc / bbb1);
3571  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
3572  h_2DsumTSmaxALS6->Fill(double(ieta), double(k3), bbbc);
3573  h_2D0sumTSmaxALS6->Fill(double(ieta), double(k3), bbb1);
3574  h_sumTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
3575  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
3576  h_sumCutTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
3577  h_sum0TSmaxAperLS6->Fill(float(lscounterM1), bbb1);
3578  }
3579  if (k1 + 1 == 2) {
3580  h_sumTSmaxALS7->Fill(bbbc / bbb1);
3581  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
3582  h_2DsumTSmaxALS7->Fill(double(ieta), double(k3), bbbc);
3583  h_2D0sumTSmaxALS7->Fill(double(ieta), double(k3), bbb1);
3584  h_sumTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
3585  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
3586  h_sumCutTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
3587  h_sum0TSmaxAperLS7->Fill(float(lscounterM1), bbb1);
3588  }
3589  }
3590  // HO:
3591  if (k0 == 2) {
3592  // HBdepth1
3593  if (k1 + 1 == 4) {
3594  h_sumTSmaxALS8->Fill(bbbc / bbb1);
3595  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
3596  h_2DsumTSmaxALS8->Fill(double(ieta), double(k3), bbbc);
3597  h_2D0sumTSmaxALS8->Fill(double(ieta), double(k3), bbb1);
3598  h_sumTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
3599  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
3600  h_sumCutTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
3601  h_sum0TSmaxAperLS8->Fill(float(lscounterM1), bbb1);
3602  }
3603  }
3604  } //if(sumEstimator3[k0][k1][k2][k3] != 0.
3605 
3606  // ------------------------------------------------------------------------------------------------------------------------sumEstimator4
3607  if (sumEstimator4[k0][k1][k2][k3] != 0.) {
3608  // fill histoes:
3609  double bbbc = 0.;
3610  if (flagestimatornormalization_ == 0)
3611  bbbc = sumEstimator4[k0][k1][k2][k3] / nevcounter0;
3612  if (flagestimatornormalization_ == 1)
3613  bbbc = sumEstimator4[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3614  double bbb1 = 1.;
3615  if (flagestimatornormalization_ == 2) {
3616  bbbc = sumEstimator4[k0][k1][k2][k3];
3617  bbb1 = sum0Estimator[k0][k1][k2][k3];
3618  }
3619 
3620  // HB:
3621  if (k0 == 0) {
3622  // HBdepth1
3623  if (k1 + 1 == 1) {
3624  h_sumAmplitudeLS1->Fill(bbbc / bbb1);
3625  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
3626  h_2DsumAmplitudeLS1->Fill(double(ieta), double(k3), bbbc);
3627  h_2D0sumAmplitudeLS1->Fill(double(ieta), double(k3), bbb1);
3628  h_sumAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
3629  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
3630  h_sumCutAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
3631  h_sum0AmplitudeperLS1->Fill(float(lscounterM1), bbb1);
3632  if (bbbc / bbb1 > 2. * lsdep_estimator4_HBdepth1_)
3633  h_sumAmplitudeperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3634  }
3635  if (k1 + 1 == 2) {
3636  h_sumAmplitudeLS2->Fill(bbbc / bbb1);
3637  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
3638  h_2DsumAmplitudeLS2->Fill(double(ieta), double(k3), bbbc);
3639  h_2D0sumAmplitudeLS2->Fill(double(ieta), double(k3), bbb1);
3640  h_sumAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
3641  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
3642  h_sumCutAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
3643  h_sum0AmplitudeperLS2->Fill(float(lscounterM1), bbb1);
3644  }
3645  }
3646  // HE:
3647  if (k0 == 1) {
3648  // HBdepth1
3649  if (k1 + 1 == 1) {
3650  h_sumAmplitudeLS3->Fill(bbbc / bbb1);
3651  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
3652  h_2DsumAmplitudeLS3->Fill(double(ieta), double(k3), bbbc);
3653  h_2D0sumAmplitudeLS3->Fill(double(ieta), double(k3), bbb1);
3654  h_sumAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
3655  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
3656  h_sumCutAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
3657  h_sum0AmplitudeperLS3->Fill(float(lscounterM1), bbb1);
3658  }
3659  if (k1 + 1 == 2) {
3660  h_sumAmplitudeLS4->Fill(bbbc / bbb1);
3661  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
3662  h_2DsumAmplitudeLS4->Fill(double(ieta), double(k3), bbbc);
3663  h_2D0sumAmplitudeLS4->Fill(double(ieta), double(k3), bbb1);
3664  h_sumAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
3665  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
3666  h_sumCutAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
3667  h_sum0AmplitudeperLS4->Fill(float(lscounterM1), bbb1);
3668  }
3669  if (k1 + 1 == 3) {
3670  h_sumAmplitudeLS5->Fill(bbbc / bbb1);
3671  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
3672  h_2DsumAmplitudeLS5->Fill(double(ieta), double(k3), bbbc);
3673  h_2D0sumAmplitudeLS5->Fill(double(ieta), double(k3), bbb1);
3674  h_sumAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
3675  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
3676  h_sumCutAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
3677  h_sum0AmplitudeperLS5->Fill(float(lscounterM1), bbb1);
3678  }
3679  }
3680  // HF:
3681  if (k0 == 3) {
3682  // HBdepth1
3683  if (k1 + 1 == 1) {
3684  h_sumAmplitudeLS6->Fill(bbbc / bbb1);
3685  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
3686  h_2DsumAmplitudeLS6->Fill(double(ieta), double(k3), bbbc);
3687  h_2D0sumAmplitudeLS6->Fill(double(ieta), double(k3), bbb1);
3688  h_sumAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
3689  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
3690  h_sumCutAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
3691  h_sum0AmplitudeperLS6->Fill(float(lscounterM1), bbb1);
3692  }
3693  if (k1 + 1 == 2) {
3694  h_sumAmplitudeLS7->Fill(bbbc / bbb1);
3695  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
3696  h_2DsumAmplitudeLS7->Fill(double(ieta), double(k3), bbbc);
3697  h_2D0sumAmplitudeLS7->Fill(double(ieta), double(k3), bbb1);
3698  h_sumAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
3699  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
3700  h_sumCutAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
3701  h_sum0AmplitudeperLS7->Fill(float(lscounterM1), bbb1);
3702  }
3703  }
3704  // HO:
3705  if (k0 == 2) {
3706  // HBdepth1
3707  if (k1 + 1 == 4) {
3708  h_sumAmplitudeLS8->Fill(bbbc / bbb1);
3709  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
3710  h_2DsumAmplitudeLS8->Fill(double(ieta), double(k3), bbbc);
3711  h_2D0sumAmplitudeLS8->Fill(double(ieta), double(k3), bbb1);
3712  h_sumAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
3713  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
3714  h_sumCutAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
3715  h_sum0AmplitudeperLS8->Fill(float(lscounterM1), bbb1);
3716  }
3717  }
3718  } //if(sumEstimator4[k0][k1][k2][k3] != 0.
3719  // ------------------------------------------------------------------------------------------------------------------------sumEstimator5
3720  if (sumEstimator5[k0][k1][k2][k3] != 0.) {
3721  // fill histoes:
3722  double bbbc = 0.;
3723  if (flagestimatornormalization_ == 0)
3724  bbbc = sumEstimator5[k0][k1][k2][k3] / nevcounter0;
3725  if (flagestimatornormalization_ == 1)
3726  bbbc = sumEstimator5[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3727  double bbb1 = 1.;
3728  if (flagestimatornormalization_ == 2) {
3729  bbbc = sumEstimator5[k0][k1][k2][k3];
3730  bbb1 = sum0Estimator[k0][k1][k2][k3];
3731  }
3732 
3733  // HB:
3734  if (k0 == 0) {
3735  // HBdepth1
3736  if (k1 + 1 == 1) {
3737  h_sumAmplLS1->Fill(bbbc / bbb1);
3738  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
3739  h_2DsumAmplLS1->Fill(double(ieta), double(k3), bbbc);
3740  h_2D0sumAmplLS1->Fill(double(ieta), double(k3), bbb1);
3741  h_sumAmplperLS1->Fill(float(lscounterM1), bbbc);
3742  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
3743  h_sumCutAmplperLS1->Fill(float(lscounterM1), bbbc);
3744  h_sum0AmplperLS1->Fill(float(lscounterM1), bbb1);
3745  if (bbbc / bbb1 > 2. * lsdep_estimator5_HBdepth1_)
3746  h_sumAmplperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3747  }
3748  if (k1 + 1 == 2) {
3749  h_sumAmplLS2->Fill(bbbc / bbb1);
3750  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
3751  h_2DsumAmplLS2->Fill(double(ieta), double(k3), bbbc);
3752  h_2D0sumAmplLS2->Fill(double(ieta), double(k3), bbb1);
3753  h_sumAmplperLS2->Fill(float(lscounterM1), bbbc);
3754  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
3755  h_sumCutAmplperLS2->Fill(float(lscounterM1), bbbc);
3756  h_sum0AmplperLS2->Fill(float(lscounterM1), bbb1);
3757  }
3758  }
3759  // HE:
3760  if (k0 == 1) {
3761  // HEdepth1
3762  if (k1 + 1 == 1) {
3763  h_sumAmplLS3->Fill(bbbc / bbb1);
3764  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
3765  h_2DsumAmplLS3->Fill(double(ieta), double(k3), bbbc);
3766  h_2D0sumAmplLS3->Fill(double(ieta), double(k3), bbb1);
3767  h_sumAmplperLS3->Fill(float(lscounterM1), bbbc);
3768  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
3769  h_sumCutAmplperLS3->Fill(float(lscounterM1), bbbc);
3770  h_sum0AmplperLS3->Fill(float(lscounterM1), bbb1);
3771  }
3772  if (k1 + 1 == 2) {
3773  h_sumAmplLS4->Fill(bbbc / bbb1);
3774  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
3775  h_2DsumAmplLS4->Fill(double(ieta), double(k3), bbbc);
3776  h_2D0sumAmplLS4->Fill(double(ieta), double(k3), bbb1);
3777  h_sumAmplperLS4->Fill(float(lscounterM1), bbbc);
3778  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
3779  h_sumCutAmplperLS4->Fill(float(lscounterM1), bbbc);
3780  h_sum0AmplperLS4->Fill(float(lscounterM1), bbb1);
3781  }
3782  if (k1 + 1 == 3) {
3783  h_sumAmplLS5->Fill(bbbc / bbb1);
3784  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
3785  h_2DsumAmplLS5->Fill(double(ieta), double(k3), bbbc);
3786  h_2D0sumAmplLS5->Fill(double(ieta), double(k3), bbb1);
3787  h_sumAmplperLS5->Fill(float(lscounterM1), bbbc);
3788  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
3789  h_sumCutAmplperLS5->Fill(float(lscounterM1), bbbc);
3790  h_sum0AmplperLS5->Fill(float(lscounterM1), bbb1);
3791  }
3792  }
3793  // HF:
3794  if (k0 == 3) {
3795  // HFdepth1
3796  if (k1 + 1 == 1) {
3797  h_sumAmplLS6->Fill(bbbc / bbb1);
3798  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
3799  h_2DsumAmplLS6->Fill(double(ieta), double(k3), bbbc);
3800  h_2D0sumAmplLS6->Fill(double(ieta), double(k3), bbb1);
3801  h_sumAmplperLS6->Fill(float(lscounterM1), bbbc);
3802  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
3803  h_sumCutAmplperLS6->Fill(float(lscounterM1), bbbc);
3804  h_sum0AmplperLS6->Fill(float(lscounterM1), bbb1);
3805  }
3806  if (k1 + 1 == 2) {
3807  h_sumAmplLS7->Fill(bbbc / bbb1);
3808  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
3809  h_2DsumAmplLS7->Fill(double(ieta), double(k3), bbbc);
3810  h_2D0sumAmplLS7->Fill(double(ieta), double(k3), bbb1);
3811  h_sumAmplperLS7->Fill(float(lscounterM1), bbbc);
3812  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
3813  h_sumCutAmplperLS7->Fill(float(lscounterM1), bbbc);
3814  h_sum0AmplperLS7->Fill(float(lscounterM1), bbb1);
3815  }
3816  }
3817  // HO:
3818  if (k0 == 2) {
3819  // HOdepth4
3820  if (k1 + 1 == 4) {
3821  h_sumAmplLS8->Fill(bbbc / bbb1);
3822  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
3823  h_2DsumAmplLS8->Fill(double(ieta), double(k3), bbbc);
3824  h_2D0sumAmplLS8->Fill(double(ieta), double(k3), bbb1);
3825  h_sumAmplperLS8->Fill(float(lscounterM1), bbbc);
3826  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
3827  h_sumCutAmplperLS8->Fill(float(lscounterM1), bbbc);
3828  h_sum0AmplperLS8->Fill(float(lscounterM1), bbb1);
3829  }
3830  }
3831  } //if(sumEstimator5[k0][k1][k2][k3] != 0.
3832  // ------------------------------------------------------------------------------------------------------------------------sumEstimator6 (Error-B)
3833  if (sumEstimator6[k0][k1][k2][k3] != 0.) {
3834  // fill histoes:
3835  double bbbc = 0.;
3836  if (flagestimatornormalization_ == 0)
3837  bbbc = sumEstimator6[k0][k1][k2][k3] / nevcounter0;
3838  if (flagestimatornormalization_ == 1)
3839  bbbc = sumEstimator6[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3840  double bbb1 = 1.;
3841  if (flagestimatornormalization_ == 2) {
3842  bbbc = sumEstimator6[k0][k1][k2][k3];
3843  bbb1 = sum0Estimator[k0][k1][k2][k3];
3844  }
3845 
3846  // HB:
3847  if (k0 == 0) {
3848  // HBdepth1
3849  if (k1 + 1 == 1) {
3850  h_sumErrorBLS1->Fill(bbbc / bbb1);
3851  h_2DsumErrorBLS1->Fill(double(ieta), double(k3), bbbc);
3852  h_2D0sumErrorBLS1->Fill(double(ieta), double(k3), bbb1);
3853  h_sumErrorBperLS1->Fill(float(lscounterM1), bbbc);
3854  h_sum0ErrorBperLS1->Fill(float(lscounterM1), bbb1);
3855  }
3856  if (k1 + 1 == 2) {
3857  h_sumErrorBLS2->Fill(bbbc / bbb1);
3858  h_2DsumErrorBLS2->Fill(double(ieta), double(k3), bbbc);
3859  h_2D0sumErrorBLS2->Fill(double(ieta), double(k3), bbb1);
3860  h_sumErrorBperLS2->Fill(float(lscounterM1), bbbc);
3861  h_sum0ErrorBperLS2->Fill(float(lscounterM1), bbb1);
3862  }
3863  }
3864  // HE:
3865  if (k0 == 1) {
3866  // HEdepth1
3867  if (k1 + 1 == 1) {
3868  h_sumErrorBLS3->Fill(bbbc / bbb1);
3869  h_2DsumErrorBLS3->Fill(double(ieta), double(k3), bbbc);
3870  h_2D0sumErrorBLS3->Fill(double(ieta), double(k3), bbb1);
3871  h_sumErrorBperLS3->Fill(float(lscounterM1), bbbc);
3872  h_sum0ErrorBperLS3->Fill(float(lscounterM1), bbb1);
3873  }
3874  if (k1 + 1 == 2) {
3875  h_sumErrorBLS4->Fill(bbbc / bbb1);
3876  h_2DsumErrorBLS4->Fill(double(ieta), double(k3), bbbc);
3877  h_2D0sumErrorBLS4->Fill(double(ieta), double(k3), bbb1);
3878  h_sumErrorBperLS4->Fill(float(lscounterM1), bbbc);
3879  h_sum0ErrorBperLS4->Fill(float(lscounterM1), bbb1);
3880  }
3881  if (k1 + 1 == 3) {
3882  h_sumErrorBLS5->Fill(bbbc / bbb1);
3883  h_2DsumErrorBLS5->Fill(double(ieta), double(k3), bbbc);
3884  h_2D0sumErrorBLS5->Fill(double(ieta), double(k3), bbb1);
3885  h_sumErrorBperLS5->Fill(float(lscounterM1), bbbc);
3886  h_sum0ErrorBperLS5->Fill(float(lscounterM1), bbb1);
3887  }
3888  }
3889  // HF:
3890  if (k0 == 3) {
3891  // HFdepth1
3892  if (k1 + 1 == 1) {
3893  h_sumErrorBLS6->Fill(bbbc / bbb1);
3894  h_2DsumErrorBLS6->Fill(double(ieta), double(k3), bbbc);
3895  h_2D0sumErrorBLS6->Fill(double(ieta), double(k3), bbb1);
3896  h_sumErrorBperLS6->Fill(float(lscounterM1), bbbc);
3897  h_sum0ErrorBperLS6->Fill(float(lscounterM1), bbb1);
3898  }
3899  if (k1 + 1 == 2) {
3900  h_sumErrorBLS7->Fill(bbbc / bbb1);
3901  h_2DsumErrorBLS7->Fill(double(ieta), double(k3), bbbc);
3902  h_2D0sumErrorBLS7->Fill(double(ieta), double(k3), bbb1);
3903  h_sumErrorBperLS7->Fill(float(lscounterM1), bbbc);
3904  h_sum0ErrorBperLS7->Fill(float(lscounterM1), bbb1);
3905  }
3906  }
3907  // HO:
3908  if (k0 == 2) {
3909  // HOdepth4
3910  if (k1 + 1 == 4) {
3911  h_sumErrorBLS8->Fill(bbbc / bbb1);
3912  h_2DsumErrorBLS8->Fill(double(ieta), double(k3), bbbc);
3913  h_2D0sumErrorBLS8->Fill(double(ieta), double(k3), bbb1);
3914  h_sumErrorBperLS8->Fill(float(lscounterM1), bbbc);
3915  h_sum0ErrorBperLS8->Fill(float(lscounterM1), bbb1);
3916  }
3917  }
3919  } //if(sumEstimator6[k0][k1][k2][k3] != 0.
3920  } //for k2
3921  // occupancy distributions for error-A:
3922  // HB
3923  if (k0 == 0 && k1 == 0) {
3924  if (pcountmin1 > 0) {
3925  if (pcountmin1 < pnnmin1)
3926  pnnmin1 = pcountmin1;
3927  pcountmin1 = 0;
3928  }
3929  if (mcountmin1 > 0) {
3930  if (mcountmin1 < mnnmin1)
3931  mnnmin1 = mcountmin1;
3932  mcountmin1 = 0;
3933  mnnbins1++;
3934  }
3935  } //
3936  // HE
3937  if (k0 == 1 && k1 == 0) {
3938  if (pcountmin3 > 0) {
3939  if (pcountmin3 < pnnmin3)
3940  pnnmin3 = pcountmin3;
3941  pcountmin3 = 0;
3942  }
3943  if (mcountmin3 > 0) {
3944  if (mcountmin3 < mnnmin3)
3945  mnnmin3 = mcountmin3;
3946  mcountmin3 = 0;
3947  mnnbins3++;
3948  }
3949  } //
3950  // HO
3951  if (k0 == 2 && k1 == 3) {
3952  if (pcountmin8 > 0) {
3953  if (pcountmin8 < pnnmin8)
3954  pnnmin8 = pcountmin8;
3955  pcountmin8 = 0;
3956  }
3957  if (mcountmin8 > 0) {
3958  if (mcountmin8 < mnnmin8)
3959  mnnmin8 = mcountmin8;
3960  mcountmin8 = 0;
3961  mnnbins8++;
3962  }
3963  } //
3964  // HF
3965  if (k0 == 3 && k1 == 0) {
3966  if (pcountmin6 > 0) {
3967  if (pcountmin6 < pnnmin6)
3968  pnnmin6 = pcountmin6;
3969  pcountmin6 = 0;
3970  }
3971  if (mcountmin6 > 0) {
3972  if (mcountmin6 < mnnmin6)
3973  mnnmin6 = mcountmin6;
3974  mcountmin6 = 0;
3975  mnnbins6++;
3976  }
3977  } //
3978 
3979  } //for k3
3980  } //for k1
3981  } //for k0
3985 
3986  // cout<<"=============================== lscounterM1 = "<< (float)lscounterM1 <<endl;
3987 
3988  float patiooccupancy1 = 0.;
3989  if (pcountall1 != 0)
3990  patiooccupancy1 = (float)pnnmin1 * mnnbins1 / pcountall1;
3991  h_RatioOccupancy_HBM->Fill(float(lscounterM1), patiooccupancy1);
3992  float matiooccupancy1 = 0.;
3993  if (mcountall1 != 0)
3994  matiooccupancy1 = (float)mnnmin1 * mnnbins1 / mcountall1;
3995  h_RatioOccupancy_HBP->Fill(float(lscounterM1), matiooccupancy1);
3996 
3997  float patiooccupancy3 = 0.;
3998  if (pcountall3 != 0)
3999  patiooccupancy3 = (float)pnnmin3 * mnnbins3 / pcountall3;
4000  h_RatioOccupancy_HEM->Fill(float(lscounterM1), patiooccupancy3);
4001  float matiooccupancy3 = 0.;
4002  if (mcountall3 != 0)
4003  matiooccupancy3 = (float)mnnmin3 * mnnbins3 / mcountall3;
4004  h_RatioOccupancy_HEP->Fill(float(lscounterM1), matiooccupancy3);
4005 
4006  float patiooccupancy6 = 0.;
4007  if (pcountall6 != 0)
4008  patiooccupancy6 = (float)pnnmin6 * mnnbins6 / pcountall6;
4009  h_RatioOccupancy_HFM->Fill(float(lscounterM1), patiooccupancy6);
4010  float matiooccupancy6 = 0.;
4011  if (mcountall6 != 0)
4012  matiooccupancy6 = (float)mnnmin6 * mnnbins6 / mcountall6;
4013  h_RatioOccupancy_HFP->Fill(float(lscounterM1), matiooccupancy6);
4014 
4015  float patiooccupancy8 = 0.;
4016  if (pcountall8 != 0)
4017  patiooccupancy8 = (float)pnnmin8 * mnnbins8 / pcountall8;
4018  h_RatioOccupancy_HOM->Fill(float(lscounterM1), patiooccupancy8);
4019  float matiooccupancy8 = 0.;
4020  if (mcountall8 != 0)
4021  matiooccupancy8 = (float)mnnmin8 * mnnbins8 / mcountall8;
4022  h_RatioOccupancy_HOP->Fill(float(lscounterM1), matiooccupancy8);
4023 
4024  for (int k0 = 0; k0 < nsub; k0++) {
4025  for (int k1 = 0; k1 < ndepth; k1++) {
4026  for (int k2 = 0; k2 < neta; k2++) {
4027  for (int k3 = 0; k3 < nphi; k3++) {
4028  // reset massives:
4029  sumEstimator0[k0][k1][k2][k3] = 0.;
4030  sumEstimator1[k0][k1][k2][k3] = 0.;
4031  sumEstimator2[k0][k1][k2][k3] = 0.;
4032  sumEstimator3[k0][k1][k2][k3] = 0.;
4033  sumEstimator4[k0][k1][k2][k3] = 0.;
4034  sumEstimator5[k0][k1][k2][k3] = 0.;
4035  sumEstimator6[k0][k1][k2][k3] = 0.;
4036  sum0Estimator[k0][k1][k2][k3] = 0.;
4037  } //for
4038  } //for
4039  } //for
4040  } //for
4041 
4042  //------------------------------------------------------ averSIGNAL
4051 
4056 
4057  //------------------------------------------------------
4066 
4071 
4072  //------------------------------------------------------ averNOSIGNAL
4081 
4086 
4087  //------------------------------------------------------
4096 
4101 
4102  //------------------------------------------------------ maxxSA and maxxOccupancy
4103  h_maxxSUMAmpl_HB->Fill(float(lscounterM1), maxxSUM1);
4104  h_maxxSUMAmpl_HE->Fill(float(lscounterM1), maxxSUM2);
4105  h_maxxSUMAmpl_HO->Fill(float(lscounterM1), maxxSUM3);
4106  h_maxxSUMAmpl_HF->Fill(float(lscounterM1), maxxSUM4);
4107  maxxSUM1 = 0.;
4108  maxxSUM2 = 0.;
4109  maxxSUM3 = 0.;
4110  maxxSUM4 = 0.;
4111  //------------------------------------------------------
4112  h_maxxOCCUP_HB->Fill(float(lscounterM1), maxxOCCUP1);
4113  h_maxxOCCUP_HE->Fill(float(lscounterM1), maxxOCCUP2);
4114  h_maxxOCCUP_HO->Fill(float(lscounterM1), maxxOCCUP3);
4115  h_maxxOCCUP_HF->Fill(float(lscounterM1), maxxOCCUP4);
4116  maxxOCCUP1 = 0.;
4117  maxxOCCUP2 = 0.;
4118  maxxOCCUP3 = 0.;
4119  maxxOCCUP4 = 0.;
4120 
4121  //------------------------------------------------------
4122  } //if(nevcounter0 != 0)
4123  // POINT1
4124 
4126  // for upgrade:
4127  for (int k1 = 0; k1 < ndepth; k1++) {
4128  for (int k2 = 0; k2 < neta; k2++) {
4129  for (int k3 = 0; k3 < nphi; k3++) {
4130  if (studyCalibCellsHist_) {
4131  signal[k1][k2][k3] = 0.;
4132  calibt[k1][k2][k3] = 0.;
4133  calibcapiderror[k1][k2][k3] = 0;
4134  caliba[k1][k2][k3] = 0.;
4135  calibw[k1][k2][k3] = 0.;
4136  calib0[k1][k2][k3] = 0.;
4137  signal3[k1][k2][k3] = 0.;
4138  calib3[k1][k2][k3] = 0.;
4139  calib2[k1][k2][k3] = 0.;
4140  }
4142  for (int k0 = 0; k0 < nsub; k0++) {
4143  badchannels[k0][k1][k2][k3] = 0;
4144  } //for
4145  } //if
4146 
4147  } //for
4148  } //for
4149  } //for
4150  for (int k0 = 0; k0 < nsub; k0++) {
4151  for (int k1 = 0; k1 < ndepth; k1++) {
4152  for (int k2 = 0; k2 < neta; k2++) {
4153  for (int k3 = 0; k3 < nphi; k3++) {
4154  amplitudechannel0[k0][k1][k2][k3] = 0.;
4155  amplitudechannel[k0][k1][k2][k3] = 0.;
4156  amplitudechannel2[k0][k1][k2][k3] = 0.;
4157 
4158  tocamplchannel[k0][k1][k2][k3] = 0.;
4159  maprphinorm[k0][k1][k2][k3] = 0.;
4160  // phi-symmetry monitoring for calibration group:
4161  // rec energy:
4162  recSignalEnergy0[k0][k1][k2][k3] = 0.;
4163  recSignalEnergy1[k0][k1][k2][k3] = 0.;
4164  recSignalEnergy2[k0][k1][k2][k3] = 0.;
4165  recNoiseEnergy0[k0][k1][k2][k3] = 0.;
4166  recNoiseEnergy1[k0][k1][k2][k3] = 0.;
4167  recNoiseEnergy2[k0][k1][k2][k3] = 0.;
4168 
4169  } //k3
4170  } //k2
4171  } //k1
4172  } //k0
4176 
4177  if (flagToUseDigiCollectionsORNot_ != 0) {
4181  if (flagupgradeqie1011_ != 2 && flagupgradeqie1011_ != 3 && flagupgradeqie1011_ != 6 &&
4184  iEvent.getByToken(tok_hf_, hf);
4185  bool gotHFDigis = true;
4186  if (!(iEvent.getByToken(tok_hf_, hf))) {
4187  gotHFDigis = false;
4188  } //this is a boolean set up to check if there are HFdigis in input root file
4189  if (!(hf.isValid())) {
4190  gotHFDigis = false;
4191  } //if it is not there, leave it false
4192  if (!gotHFDigis) {
4193  std::cout << " ****************************** =========================== No HFDigiCollection found "
4194  << std::endl;
4195  } else {
4197  for (HFDigiCollection::const_iterator digi = hf->begin(); digi != hf->end(); digi++) {
4198  eta = digi->id().ieta();
4199  phi = digi->id().iphi();
4200  depth = digi->id().depth();
4201  nTS = digi->size();
4203  counterhf++;
4206  fillDigiErrorsHF(digi);
4208  if (recordHistoes_)
4209  fillDigiAmplitudeHF(digi);
4212  int iphi = phi - 1;
4213  int ieta = eta;
4214  if (ieta > 0)
4215  ieta -= 1;
4216  if (nTS <= numOfTS)
4217  for (int i = 0; i < nTS; i++) {
4218  TS_data[i] = adc2fC[digi->sample(i).adc()];
4219  signal[3][ieta + 41][iphi] += TS_data[i];
4220  if (i > 1 && i < 6)
4221  signal3[3][ieta + 41][iphi] += TS_data[i];
4222  } // TS
4223  } // if(recordHistoes_ && studyCalibCellsHist_)
4224  } // for
4225  } // hf.isValid
4226  } // end flagupgrade
4227 
4230  // upgrade:
4231  if (flagupgradeqie1011_ != 1) {
4233  iEvent.getByToken(tok_qie10_, hfqie10);
4234  const QIE10DigiCollection& qie10dc =
4235  *(hfqie10);
4236  bool gotQIE10Digis = true;
4237  if (!(iEvent.getByToken(tok_qie10_, hfqie10))) {
4238  gotQIE10Digis = false;
4239  } //this is a boolean set up to check if there are HFdigis in input root file
4240  if (!(hfqie10.isValid())) {
4241  gotQIE10Digis = false;
4242  } //if it is not there, leave it false
4243  if (!gotQIE10Digis) {
4244  std::cout << " No QIE10DigiCollection collection is found " << std::endl;
4245  } else {
4247  double totalAmplitudeHF = 0.;
4248  for (unsigned int j = 0; j < qie10dc.size(); j++) {
4249  QIE10DataFrame qie10df = static_cast<QIE10DataFrame>(qie10dc[j]);
4250  DetId detid = qie10df.detid();
4251  HcalDetId hcaldetid = HcalDetId(detid);
4252  int eta = hcaldetid.ieta();
4253  int phi = hcaldetid.iphi();
4254  // int depth = hcaldetid.depth();
4255  // loop over the samples in the digi
4256  nTS = qie10df.samples();
4258  counterhfqie10++;
4261  fillDigiErrorsHFQIE10(qie10df);
4263  if (recordHistoes_)
4264  fillDigiAmplitudeHFQIE10(qie10df);
4266  // if(recordHistoes_ ) {
4268  int iphi = phi - 1;
4269  int ieta = eta;
4270  if (ieta > 0)
4271  ieta -= 1;
4272  double amplitudefullTSs = 0.;
4273  double nnnnnnTS = 0.;
4274  for (int i = 0; i < nTS; ++i) {
4275  // j - QIE channel
4276  // i - time sample (TS)
4277  int adc = qie10df[i].adc();
4278  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4279  // float charge = adc2fC_QIE10[ adc ];
4280  TS_data[i] = adc2fC_QIE10[adc];
4281  signal[3][ieta + 41][iphi] += TS_data[i];
4282  totalAmplitudeHF += TS_data[i];
4283  amplitudefullTSs += TS_data[i];
4284  nnnnnnTS++;
4285  if (i > 1 && i < 6)
4286  signal3[3][ieta + 41][iphi] += TS_data[i];
4287 
4288  } // TS
4289  h_numberofhitsHFtest->Fill(nnnnnnTS);
4290  h_AmplitudeHFtest->Fill(amplitudefullTSs);
4291  } // if(recordHistoes_ && studyCalibCellsHist_)
4292  } // for
4293  h_totalAmplitudeHF->Fill(totalAmplitudeHF);
4294  h_totalAmplitudeHFperEvent->Fill(float(eventcounter), totalAmplitudeHF);
4295  } // hfqie10.isValid
4296  } // end flagupgrade
4297  //end upgrade
4298  //
4299  //
4301  int qwert1 = 0;
4302  int qwert2 = 0;
4303  int qwert3 = 0;
4304  int qwert4 = 0;
4305  int qwert5 = 0;
4306  if (flagupgradeqie1011_ != 2 && flagupgradeqie1011_ != 3) {
4308  iEvent.getByToken(tok_hbhe_, hbhe);
4309  bool gotHBHEDigis = true;
4310  if (!(iEvent.getByToken(tok_hbhe_, hbhe)))
4311  gotHBHEDigis = false; //this is a boolean set up to check if there are HBHEgigis in input root file
4312  if (!(hbhe.isValid()))
4313  gotHBHEDigis = false; //if it is not there, leave it false
4314  if (!gotHBHEDigis) {
4315  std::cout << " No HBHEDigiCollection collection is found " << std::endl;
4316  } else {
4317  // unsigned int NHBHEDigiCollectionsize = hbhe->size();
4318  double totalAmplitudeHB = 0.;
4319  double totalAmplitudeHE = 0.;
4320  double nnnnnnTSHB = 0.;
4321  double nnnnnnTSHE = 0.;
4322 
4323  for (HBHEDigiCollection::const_iterator digi = hbhe->begin(); digi != hbhe->end(); digi++) {
4324  eta = digi->id().ieta();
4325  phi = digi->id().iphi();
4326  depth = digi->id().depth();
4327  nTS = digi->size();
4329  nnnnnnhbhe++;
4330  nnnnnn++;
4332  if (digi->id().subdet() == HcalBarrel && depth == 1 && qwert1 == 0) {
4333  nnnnnn1++;
4334  qwert1 = 1;
4335  }
4336  if (digi->id().subdet() == HcalBarrel && depth == 2 && qwert2 == 0) {
4337  nnnnnn2++;
4338  qwert2 = 1;
4339  }
4340  if (digi->id().subdet() == HcalEndcap && depth == 1 && qwert3 == 0) {
4341  nnnnnn3++;
4342  qwert3 = 1;
4343  }
4344  if (digi->id().subdet() == HcalEndcap && depth == 2 && qwert4 == 0) {
4345  nnnnnn4++;
4346  qwert4 = 1;
4347  }
4348  if (digi->id().subdet() == HcalEndcap && depth == 3 && qwert5 == 0) {
4349  nnnnnn5++;
4350  qwert5 = 1;
4351  }
4354  fillDigiErrors(digi);
4356  if (recordHistoes_)
4357  fillDigiAmplitude(digi);
4358 
4360  int iphi = phi - 1;
4361  int ieta = eta;
4362  if (ieta > 0)
4363  ieta -= 1;
4365  if (digi->id().subdet() == HcalBarrel) {
4366  double amplitudefullTSs = 0.;
4367  nnnnnnTSHB++;
4368  if (nTS <= numOfTS)
4369  for (int i = 0; i < nTS; i++) {
4370  TS_data[i] = adc2fC[digi->sample(i).adc()];
4371  signal[0][ieta + 41][iphi] += TS_data[i];
4372  amplitudefullTSs += TS_data[i];
4373  totalAmplitudeHB += TS_data[i];
4374  if (i > 1 && i < 6)
4375  signal3[0][ieta + 41][iphi] += TS_data[i];
4376  }
4377  h_AmplitudeHBtest->Fill(amplitudefullTSs);
4378  } // HB
4380  if (digi->id().subdet() == HcalEndcap) {
4381  double amplitudefullTSs = 0.;
4382  nnnnnnTSHE++;
4383  if (nTS <= numOfTS)
4384  for (int i = 0; i < nTS; i++) {
4385  TS_data[i] = adc2fC[digi->sample(i).adc()];
4386  signal[1][ieta + 41][iphi] += TS_data[i];
4387  totalAmplitudeHE += TS_data[i];
4388  amplitudefullTSs += TS_data[i];
4389  if (i > 1 && i < 6)
4390  signal3[1][ieta + 41][iphi] += TS_data[i];
4391  }
4392  h_AmplitudeHEtest->Fill(amplitudefullTSs);
4393  } // HE
4394 
4395  } //if(recordHistoes_ && studyCalibCellsHist_)
4397  } //if(recordNtuples_)
4398  } // for HBHE digis
4399  if (totalAmplitudeHB != 0.) {
4400  h_numberofhitsHBtest->Fill(nnnnnnTSHB);
4401  h_totalAmplitudeHB->Fill(totalAmplitudeHB);
4402  h_totalAmplitudeHBperEvent->Fill(float(eventcounter), totalAmplitudeHB);
4403  }
4404  if (totalAmplitudeHE != 0.) {
4405  h_numberofhitsHEtest->Fill(nnnnnnTSHE);
4406  h_totalAmplitudeHE->Fill(totalAmplitudeHE);
4407  h_totalAmplitudeHEperEvent->Fill(float(eventcounter), totalAmplitudeHE);
4408  }
4409  } //hbhe.isValid
4410  } // end flagupgrade
4411  //---------------------------------------------------------------
4413  // upgrade:
4414  if (flagupgradeqie1011_ != 1 && flagupgradeqie1011_ != 4 && flagupgradeqie1011_ != 5 &&
4415  flagupgradeqie1011_ != 10) {
4417  iEvent.getByToken(tok_qie11_, heqie11);
4418  const QIE11DigiCollection& qie11dc =
4419  *(heqie11);
4420  bool gotQIE11Digis = true;
4421  if (!(iEvent.getByToken(tok_qie11_, heqie11)))
4422  gotQIE11Digis = false; //this is a boolean set up to check if there are QIE11gigis in input root file
4423  if (!(heqie11.isValid()))
4424  gotQIE11Digis = false; //if it is not there, leave it false
4425  if (!gotQIE11Digis) {
4426  std::cout << " No QIE11DigiCollection collection is found " << std::endl;
4427  } else {
4429  double totalAmplitudeHBQIE11 = 0.;
4430  double totalAmplitudeHEQIE11 = 0.;
4431  double nnnnnnTSHBQIE11 = 0.;
4432  double nnnnnnTSHEQIE11 = 0.;
4433  for (unsigned int j = 0; j < qie11dc.size(); j++) {
4434  QIE11DataFrame qie11df = static_cast<QIE11DataFrame>(qie11dc[j]);
4435  DetId detid = qie11df.detid();
4436  HcalDetId hcaldetid = HcalDetId(detid);
4437  int eta = hcaldetid.ieta();
4438  int phi = hcaldetid.iphi();
4439  int depth = hcaldetid.depth();
4440  if (depth == 0)
4441  return;
4442  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
4443  // loop over the samples in the digi
4444  nTS = qie11df.samples();
4446  nnnnnnhbheqie11++;
4447  nnnnnn++;
4449  fillDigiErrorsQIE11(qie11df);
4451  if (recordHistoes_)
4452  fillDigiAmplitudeQIE11(qie11df);
4455  if (sub == 1 && depth == 1 && qwert1 == 0) {
4456  nnnnnn1++;
4457  qwert1 = 1;
4458  }
4459  if (sub == 1 && depth == 2 && qwert2 == 0) {
4460  nnnnnn2++;
4461  qwert2 = 1;
4462  }
4463  if (sub == 2 && depth == 1 && qwert3 == 0) {
4464  nnnnnn3++;
4465  qwert3 = 1;
4466  }
4467  if (sub == 2 && depth == 2 && qwert4 == 0) {
4468  nnnnnn4++;
4469  qwert4 = 1;
4470  }
4471  if (sub == 2 && depth == 3 && qwert5 == 0) {
4472  nnnnnn5++;
4473  qwert5 = 1;
4474  }
4475 
4477  int iphi = phi - 1;
4478  int ieta = eta;
4479  if (ieta > 0)
4480  ieta -= 1;
4481  // HB:
4482  if (sub == 1) {
4483  double amplitudefullTSs1 = 0.;
4484  double amplitudefullTSs6 = 0.;
4485  nnnnnnTSHBQIE11++;
4486  for (int i = 0; i < nTS; ++i) {
4487  int adc = qie11df[i].adc();
4488  double charge1 = adc2fC_QIE11_shunt1[adc];
4489  double charge6 = adc2fC_QIE11_shunt6[adc];
4490  amplitudefullTSs1 += charge1;
4491  amplitudefullTSs6 += charge6;
4492  double charge = charge6;
4493  TS_data[i] = charge;
4494  signal[0][ieta + 41][iphi] += charge;
4495  if (i > 1 && i < 6)
4496  signal3[0][ieta + 41][iphi] += charge;
4497  totalAmplitudeHBQIE11 += charge;
4498  } //for
4499  h_AmplitudeHBtest1->Fill(amplitudefullTSs1, 1.);
4500  h_AmplitudeHBtest6->Fill(amplitudefullTSs6, 1.);
4501  } //HB end
4502  // HE:
4503  if (sub == 2) {
4504  double amplitudefullTSs1 = 0.;
4505  double amplitudefullTSs6 = 0.;
4506  nnnnnnTSHEQIE11++;
4507  for (int i = 0; i < nTS; i++) {
4508  int adc = qie11df[i].adc();
4509  double charge1 = adc2fC_QIE11_shunt1[adc];
4510  double charge6 = adc2fC_QIE11_shunt6[adc];
4511  amplitudefullTSs1 += charge1;
4512  amplitudefullTSs6 += charge6;
4513  double charge = charge6;
4514  TS_data[i] = charge;
4515  signal[1][ieta + 41][iphi] += charge;
4516  if (i > 1 && i < 6)
4517  signal3[1][ieta + 41][iphi] += charge;
4518  totalAmplitudeHEQIE11 += charge;
4519  } //for
4520  h_AmplitudeHEtest1->Fill(amplitudefullTSs1, 1.);
4521  h_AmplitudeHEtest6->Fill(amplitudefullTSs6, 1.);
4522 
4523  } //HE end
4524  } //if(recordHistoes_ && studyCalibCellsHist_)
4525  } // for QIE11 digis
4526 
4527  if (totalAmplitudeHBQIE11 != 0.) {
4528  h_numberofhitsHBtest->Fill(nnnnnnTSHBQIE11);
4529  h_totalAmplitudeHB->Fill(totalAmplitudeHBQIE11);
4530  h_totalAmplitudeHBperEvent->Fill(float(eventcounter), totalAmplitudeHBQIE11);
4531  }
4532  if (totalAmplitudeHEQIE11 != 0.) {
4533  h_numberofhitsHEtest->Fill(nnnnnnTSHEQIE11);
4534  h_totalAmplitudeHE->Fill(totalAmplitudeHEQIE11);
4535  h_totalAmplitudeHEperEvent->Fill(float(eventcounter), totalAmplitudeHEQIE11);
4536  }
4537  } //heqie11.isValid
4538  } // end flagupgrade
4539 
4542  iEvent.getByToken(tok_ho_, ho);
4543  bool gotHODigis = true;
4544  if (!(iEvent.getByToken(tok_ho_, ho)))
4545  gotHODigis = false; //this is a boolean set up to check if there are HOgigis in input root file
4546  if (!(ho.isValid()))
4547  gotHODigis = false; //if it is not there, leave it false
4548  if (!gotHODigis) {
4549  // if(!ho.isValid()) {
4550  std::cout << " No HO collection is found " << std::endl;
4551  } else {
4552  int qwert6 = 0;
4553  double totalAmplitudeHO = 0.;
4554  for (HODigiCollection::const_iterator digi = ho->begin(); digi != ho->end(); digi++) {
4555  eta = digi->id().ieta();
4556  phi = digi->id().iphi();
4557  depth = digi->id().depth();
4558  nTS = digi->size();
4560  counterho++;
4562  if (qwert6 == 0) {
4563  nnnnnn6++;
4564  qwert6 = 1;
4565  }
4568  fillDigiErrorsHO(digi);
4570  if (recordHistoes_)
4571  fillDigiAmplitudeHO(digi);
4574  int iphi = phi - 1;
4575  int ieta = eta;
4576  if (ieta > 0)
4577  ieta -= 1;
4578  double nnnnnnTS = 0.;
4579  double amplitudefullTSs = 0.;
4580  if (nTS <= numOfTS)
4581  for (int i = 0; i < nTS; i++) {
4582  TS_data[i] = adc2fC[digi->sample(i).adc()];
4583  amplitudefullTSs += TS_data[i];
4584  signal[2][ieta + 41][iphi] += TS_data[i];
4585  totalAmplitudeHO += TS_data[i];
4586  if (i > 1 && i < 6)
4587  signal3[2][ieta + 41][iphi] += TS_data[i];
4588  nnnnnnTS++;
4589  } //if for
4590  h_AmplitudeHOtest->Fill(amplitudefullTSs);
4591  h_numberofhitsHOtest->Fill(nnnnnnTS);
4592  } //if(recordHistoes_ && studyCalibCellsHist_)
4593  } //for HODigiCollection
4594 
4595  h_totalAmplitudeHO->Fill(totalAmplitudeHO);
4596  h_totalAmplitudeHOperEvent->Fill(float(eventcounter), totalAmplitudeHO);
4597  } //ho.isValid(
4598  } // flagToUseDigiCollectionsORNot_
4599 
4601  // AZ 04.11.2019
4607  // HBHE: HBHERecHitCollection hbheNoise Noise
4609  iEvent.getByToken(tok_hbheNoise_, hbheNoise);
4610  bool gotHBHERecHitsNoise = true;
4611  if (!(iEvent.getByToken(tok_hbheNoise_, hbheNoise)))
4612  gotHBHERecHitsNoise =
4613  false; //this is a boolean set up to check if there are HBHERecHitsNoise in input root file
4614  if (!(hbheNoise.isValid()))
4615  gotHBHERecHitsNoise = false; //if it is not there, leave it false
4616  if (!gotHBHERecHitsNoise) {
4617  // if(!hbheNoise.isValid()) {
4618  std::cout << " No RecHits HBHENoise collection is found " << std::endl;
4619  } else {
4620  for (HBHERecHitCollection::const_iterator hbheItr = hbheNoise->begin(); hbheItr != hbheNoise->end();
4621  hbheItr++) {
4622  // Recalibration of energy
4623  float icalconst = 1.;
4624  // DetId mydetid = hbheItr->id().rawId();
4625  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4626  HBHERecHit aHit(hbheItr->id(), hbheItr->eraw() * icalconst, hbheItr->time());
4627  // HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
4628  double energyhit = aHit.energy();
4629  DetId id = (*hbheItr).detid();
4630  HcalDetId hid = HcalDetId(id);
4631  int sub = ((hid).rawId() >> 25) & 0x7;
4632 
4633  if (sub == 1)
4634  h_energyhitNoise_HB->Fill(energyhit, 1.);
4635  if (sub == 2)
4636  h_energyhitNoise_HE->Fill(energyhit, 1.);
4637  // if(fabs(energyhit) > 40. ) continue;
4638 
4639  //std::cout<<sub<<std::endl;
4640  if (hid.depth() == 1 && sub == 1 && hid.iphi() == 25) {
4641  if (verbosity < 0)
4642  std::cout << " Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4643  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4644  }
4645  if (hid.depth() == 1 && sub == 2 && hid.iphi() == 25) {
4646  if (verbosity < 0)
4647  std::cout << " Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4648  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4649  }
4650  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4651  if (ieta > 0)
4652  ieta -= 1; // -15 ... -1; 0... 14 for HB
4653  int iphi = hid.iphi() - 1;
4654  int mdepth = hid.depth();
4655  recNoiseEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4656  recNoiseEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4657  recNoiseEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4658  } // hbheNoise
4659  } //hbheNoise.isValid(
4661 
4662  // HF: HFRecHitCollection hfNoise Noise
4664  iEvent.getByToken(tok_hfNoise_, hfNoise);
4665  bool gotHFRecHitsNoise = true;
4666  if (!(iEvent.getByToken(tok_hfNoise_, hfNoise)))
4667  gotHFRecHitsNoise = false; //this is a boolean set up to check if there are HFRecHitsNoise in input root file
4668  if (!(hfNoise.isValid()))
4669  gotHFRecHitsNoise = false; //if it is not there, leave it false
4670  if (!gotHFRecHitsNoise) {
4671  // if(!hfNoise.isValid()) {
4672  std::cout << " No RecHits HFNoise collection is found " << std::endl;
4673  } else {
4674  for (HFRecHitCollection::const_iterator hfItr = hfNoise->begin(); hfItr != hfNoise->end(); hfItr++) {
4675  // Recalibration of energy
4676  float icalconst = 1.;
4677  // DetId mydetid = hfItr->id().rawId();
4678  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4679  HFRecHit aHit(hfItr->id(), hfItr->energy() * icalconst, hfItr->time());
4680  double energyhit = aHit.energy();
4681  DetId id = (*hfItr).detid();
4682  HcalDetId hid = HcalDetId(id);
4683  int sub = ((hid).rawId() >> 25) & 0x7;
4684 
4685  h_energyhitNoise_HF->Fill(energyhit, 1.);
4686  // if(fabs(energyhit) > 40. ) continue;
4687 
4688  //std::cout<<sub<<std::endl;
4689  if (hid.iphi() == 25) {
4690  if (verbosity < 0)
4691  std::cout << "HF Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4692  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4693  }
4694  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4695  if (ieta > 0)
4696  ieta -= 1; // -15 ... -1; 0... 14 for HB
4697  int iphi = hid.iphi() - 1;
4698  int mdepth = hid.depth();
4699  recNoiseEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4700  recNoiseEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4701  recNoiseEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4702  } // hfNoise
4703  } //hfNoise.isValid(
4705 
4709  // HBHE: HBHERecHitCollection hbheSignal Signal
4711  iEvent.getByToken(tok_hbheSignal_, hbheSignal);
4712  bool gotHBHERecHitsSignal = true;
4713  if (!(iEvent.getByToken(tok_hbheSignal_, hbheSignal)))
4714  gotHBHERecHitsSignal =
4715  false; //this is a boolean set up to check if there are HBHERecHitsSignal in input root file
4716  if (!(hbheSignal.isValid()))
4717  gotHBHERecHitsSignal = false; //if it is not there, leave it false
4718  if (!gotHBHERecHitsSignal) {
4719  // if(!hbheSignal.isValid()) {
4720  std::cout << " No RecHits HBHESignal collection is found " << std::endl;
4721  } else {
4722  for (HBHERecHitCollection::const_iterator hbheItr = hbheSignal->begin(); hbheItr != hbheSignal->end();
4723  hbheItr++) {
4724  // Recalibration of energy
4725  float icalconst = 1.;
4726  // DetId mydetid = hbheItr->id().rawId();
4727  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4728  HBHERecHit aHit(hbheItr->id(), hbheItr->eraw() * icalconst, hbheItr->time());
4729  // HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
4730  double energyhit = aHit.energy();
4731  DetId id = (*hbheItr).detid();
4732  HcalDetId hid = HcalDetId(id);
4733  int sub = ((hid).rawId() >> 25) & 0x7;
4734 
4735  if (sub == 1)
4736  h_energyhitSignal_HB->Fill(energyhit, 1.);
4737  if (sub == 2)
4738  h_energyhitSignal_HE->Fill(energyhit, 1.);
4739 
4740  //std::cout<<sub<<std::endl;
4741  if (hid.depth() == 1 && sub == 1 && hid.iphi() == 25) {
4742  if (verbosity < 0)
4743  std::cout << "HBHE Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4744  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4745  }
4746  if (hid.depth() == 1 && sub == 2 && hid.iphi() == 25) {
4747  if (verbosity < 0)
4748  std::cout << "HBHE Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4749  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4750  }
4751  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4752  if (ieta > 0)
4753  ieta -= 1; // -15 ... -1; 0... 14 for HB
4754  int iphi = hid.iphi() - 1;
4755  int mdepth = hid.depth();
4756  recSignalEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4757  recSignalEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4758  recSignalEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4759  } // hbheSignal
4760  } //hbheSignal.isValid(
4762 
4763  // HF: HFRecHitCollection hfSignal Signal
4765  iEvent.getByToken(tok_hfSignal_, hfSignal);
4766  bool gotHFRecHitsSignal = true;
4767  if (!(iEvent.getByToken(tok_hfSignal_, hfSignal)))
4768  gotHFRecHitsSignal = false; //this is a boolean set up to check if there are HFRecHitsSignal in input root file
4769  if (!(hfSignal.isValid()))
4770  gotHFRecHitsSignal = false; //if it is not there, leave it false
4771  if (!gotHFRecHitsSignal) {
4772  // if(!hfSignal.isValid()) {
4773  std::cout << " No RecHits HFSignal collection is found " << std::endl;
4774  } else {
4775  for (HFRecHitCollection::const_iterator hfItr = hfSignal->begin(); hfItr != hfSignal->end(); hfItr++) {
4776  // Recalibration of energy
4777  float icalconst = 1.;
4778  // DetId mydetid = hfItr->id().rawId();
4779  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4780  HFRecHit aHit(hfItr->id(), hfItr->energy() * icalconst, hfItr->time());
4781  double energyhit = aHit.energy();
4782  DetId id = (*hfItr).detid();
4783  HcalDetId hid = HcalDetId(id);
4784  int sub = ((hid).rawId() >> 25) & 0x7;
4785 
4786  h_energyhitSignal_HF->Fill(energyhit, 1.);
4787  // if(fabs(energyhit) > 40. ) continue;
4788 
4789  //std::cout<<sub<<std::endl;
4790  if (hid.iphi() == 25) {
4791  if (verbosity < 0)
4792  std::cout << "HF Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4793  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4794  }
4795  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4796  if (ieta > 0)
4797  ieta -= 1; // -15 ... -1; 0... 14 for HB
4798  int iphi = hid.iphi() - 1;
4799  int mdepth = hid.depth();
4800  recSignalEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4801  recSignalEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4802  recSignalEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4803  } // hfSignal
4804  } //hfSignal.isValid(
4806 
4808  // END of RecHits for phi-symmetry monitoring of calibration group
4809  } // flagIterativeMethodCalibrationGroupReco_ > 0
4811 
4813 
4825  // // // // // // // tocdefault tocampl tocamplchannel: calibration group, Iterative method, coding start 29.08.2019
4826  for (int k0 = 0; k0 < nsub; k0++) {
4827  // HE only, temporary
4828  if (k0 == 1) {
4829  for (int k1 = 0; k1 < ndepth; k1++) {
4830  // k2: 0-81
4831  for (int k2 = 0; k2 < neta; k2++) {
4832  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
4833  int k2plot = k2 - 41;
4834  int kkk = k2plot; //if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
4835  //preparation for PHI normalization:
4836  double sumoverphi = 0;
4837  int nsumoverphi = 0;
4838  for (int k3 = 0; k3 < nphi; k3++) {
4839  if (tocamplchannel[k0][k1][k2][k3] != 0) {
4840  sumoverphi += tocamplchannel[k0][k1][k2][k3];
4841  ++nsumoverphi;
4842  if (verbosity < 0)
4843  std::cout << "==== nsumoverphi = " << nsumoverphi << " sumoverphi = " << sumoverphi
4844  << " k1 = " << k1 << " k2 = " << k2 << " kkk = " << kkk << " k3 = " << k3 << std::endl;
4845  } //if != 0
4846  } //k3
4847  // PHI normalization into new massive && filling plots:
4848  for (int k3 = 0; k3 < nphi; k3++) {
4849  if (nsumoverphi != 0) {
4850  maprphinorm[k0][k1][k2][k3] = tocamplchannel[k0][k1][k2][k3] / (sumoverphi / nsumoverphi);
4851  if (verbosity < 0)
4852  std::cout << "nsumoverphi= " << nsumoverphi << " sumoverphi= " << sumoverphi << " k1= " << k1
4853  << " k2= " << k2 << " kkk= " << kkk << " k3= " << k3
4854  << " maprphinorm= " << maprphinorm[k0][k1][k2][k3] << std::endl;
4855  if (k1 == 0) {
4856  h_mapenophinorm_HE1->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4857  h_mapenophinorm2_HE1->Fill(
4858  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4859  h_maprphinorm_HE1->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4860  h_maprphinorm2_HE1->Fill(
4861  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4862  h_maprphinorm0_HE1->Fill(double(kkk), double(k3), 1.);
4863  }
4864  if (k1 == 1) {
4865  h_mapenophinorm_HE2->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4866  h_mapenophinorm2_HE2->Fill(
4867  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4868  h_maprphinorm_HE2->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4869  h_maprphinorm2_HE2->Fill(
4870  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4871  h_maprphinorm0_HE2->Fill(double(kkk), double(k3), 1.);
4872  }
4873  if (k1 == 2) {
4874  h_mapenophinorm_HE3->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4875  h_mapenophinorm2_HE3->Fill(
4876  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4877  h_maprphinorm_HE3->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4878  h_maprphinorm2_HE3->Fill(
4879  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4880  h_maprphinorm0_HE3->Fill(double(kkk), double(k3), 1.);
4881  }
4882  if (k1 == 3) {
4883  h_mapenophinorm_HE4->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4884  h_mapenophinorm2_HE4->Fill(
4885  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4886  h_maprphinorm_HE4->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4887  h_maprphinorm2_HE4->Fill(
4888  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4889  h_maprphinorm0_HE4->Fill(double(kkk), double(k3), 1.);
4890  }
4891  if (k1 == 4) {
4892  h_mapenophinorm_HE5->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4893  h_mapenophinorm2_HE5->Fill(
4894  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4895  h_maprphinorm_HE5->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4896  h_maprphinorm2_HE5->Fill(
4897  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4898  h_maprphinorm0_HE5->Fill(double(kkk), double(k3), 1.);
4899  }
4900  if (k1 == 5) {
4901  h_mapenophinorm_HE6->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4902  h_mapenophinorm2_HE6->Fill(
4903  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4904  h_maprphinorm_HE6->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4905  h_maprphinorm2_HE6->Fill(
4906  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4907  h_maprphinorm0_HE6->Fill(double(kkk), double(k3), 1.);
4908  }
4909  if (k1 == 6) {
4910  h_mapenophinorm_HE7->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4911  h_mapenophinorm2_HE7->Fill(
4912  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4913  h_maprphinorm_HE7->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4914  h_maprphinorm2_HE7->Fill(
4915  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4916  h_maprphinorm0_HE7->Fill(double(kkk), double(k3), 1.);
4917  }
4918  } //if nsumoverphi != 0
4919  } //k3
4920  } //k2
4921  } //k1
4922  } //if k0 == 1 HE
4923  } //k0
4924  // // // // // // // // // // // // // // // // // // // // // // // //
4925  // // // // // // // amplitudechannel amplitudechannel amplitudechannel: calibration group, Iterative method, coding start 11.11.2019
4926  for (int k0 = 0; k0 < nsub; k0++) {
4927  // HB:
4928  if (k0 == 0) {
4929  for (int k1 = 0; k1 < ndepth; k1++) {
4930  // k2: 0-81
4931  for (int k2 = 0; k2 < neta; k2++) {
4932  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
4933  int k2plot = k2 - 41;
4934  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
4935  for (int k3 = 0; k3 < nphi; k3++) {
4936  if (k1 == 0) {
4937  h_amplitudechannel0_HB1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4938  h_amplitudechannel1_HB1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4939  h_amplitudechannel2_HB1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4940  }
4941  if (k1 == 1) {
4942  h_amplitudechannel0_HB2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4943  h_amplitudechannel1_HB2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4944  h_amplitudechannel2_HB2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4945  }
4946  if (k1 == 2) {
4947  h_amplitudechannel0_HB3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4948  h_amplitudechannel1_HB3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4949  h_amplitudechannel2_HB3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4950  }
4951  if (k1 == 3) {
4952  h_amplitudechannel0_HB4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4953  h_amplitudechannel1_HB4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4954  h_amplitudechannel2_HB4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4955  }
4956  } //k3
4957  } //k2
4958  } //k1
4959  } //if k0 == 0 HB
4960 
4961  // HE:
4962  if (k0 == 1) {
4963  for (int k1 = 0; k1 < ndepth; k1++) {
4964  // k2: 0-81
4965  for (int k2 = 0; k2 < neta; k2++) {
4966  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
4967  int k2plot = k2 - 41;
4968  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
4969  for (int k3 = 0; k3 < nphi; k3++) {
4970  if (k1 == 0) {
4971  h_amplitudechannel0_HE1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4972  h_amplitudechannel1_HE1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4973  h_amplitudechannel2_HE1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4974  }
4975  if (k1 == 1) {
4976  h_amplitudechannel0_HE2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4977  h_amplitudechannel1_HE2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4978  h_amplitudechannel2_HE2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4979  }
4980  if (k1 == 2) {
4981  h_amplitudechannel0_HE3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4982  h_amplitudechannel1_HE3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4983  h_amplitudechannel2_HE3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4984  }
4985  if (k1 == 3) {
4986  h_amplitudechannel0_HE4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4987  h_amplitudechannel1_HE4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4988  h_amplitudechannel2_HE4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4989  }
4990  if (k1 == 4) {
4991  h_amplitudechannel0_HE5->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4992  h_amplitudechannel1_HE5->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4993  h_amplitudechannel2_HE5->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4994  }
4995  if (k1 == 5) {
4996  h_amplitudechannel0_HE6->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
4997  h_amplitudechannel1_HE6->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
4998  h_amplitudechannel2_HE6->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
4999  }
5000  if (k1 == 6) {
5001  h_amplitudechannel0_HE7->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5002  h_amplitudechannel1_HE7->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5003  h_amplitudechannel2_HE7->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5004  }
5005  } //k3
5006  } //k2
5007  } //k1
5008  } //if k0 == 1 HE
5009 
5010  // HF: 4 depthes for Digis and only 2 - for Reco !!!
5011  if (k0 == 3) {
5012  for (int k1 = 0; k1 < ndepth; k1++) {
5013  // k2: 0-81
5014  for (int k2 = 0; k2 < neta; k2++) {
5015  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5016  int k2plot = k2 - 41;
5017  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5018  for (int k3 = 0; k3 < nphi; k3++) {
5019  if (k1 == 0) {
5020  h_amplitudechannel0_HF1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5021  h_amplitudechannel1_HF1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5022  h_amplitudechannel2_HF1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5023  }
5024  if (k1 == 1) {
5025  h_amplitudechannel0_HF2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5026  h_amplitudechannel1_HF2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5027  h_amplitudechannel2_HF2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5028  }
5029  if (k1 == 2) {
5030  h_amplitudechannel0_HF3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5031  h_amplitudechannel1_HF3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5032  h_amplitudechannel2_HF3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5033  }
5034  if (k1 == 3) {
5035  h_amplitudechannel0_HF4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5036  h_amplitudechannel1_HF4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5037  h_amplitudechannel2_HF4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5038  }
5039  } //k3
5040  } //k2
5041  } //k1
5042  } //if k0 == 3 HF
5043 
5044  } //k0
5045 
5046  } // if(flagIterativeMethodCalibrationGroupDigi
5047 
5057  //
5058  for (int k0 = 0; k0 < nsub; k0++) {
5059  // HB:
5060  if (k0 == 0) {
5061  for (int k1 = 0; k1 < ndepth; k1++) {
5062  // k2: 0-81
5063  for (int k2 = 0; k2 < neta; k2++) {
5064  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5065  int k2plot = k2 - 41;
5066  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5067  for (int k3 = 0; k3 < nphi; k3++) {
5068  if (k1 == 0) {
5069  h_recSignalEnergy0_HB1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5070  h_recSignalEnergy1_HB1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5071  h_recSignalEnergy2_HB1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5072  h_recNoiseEnergy0_HB1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5073  h_recNoiseEnergy1_HB1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5074  h_recNoiseEnergy2_HB1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5075  }
5076  if (k1 == 1) {
5077  h_recSignalEnergy0_HB2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5078  h_recSignalEnergy1_HB2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5079  h_recSignalEnergy2_HB2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5080  h_recNoiseEnergy0_HB2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5081  h_recNoiseEnergy1_HB2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5082  h_recNoiseEnergy2_HB2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5083  }
5084  if (k1 == 2) {
5085  h_recSignalEnergy0_HB3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5086  h_recSignalEnergy1_HB3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5087  h_recSignalEnergy2_HB3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5088  h_recNoiseEnergy0_HB3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5089  h_recNoiseEnergy1_HB3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5090  h_recNoiseEnergy2_HB3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5091  }
5092  if (k1 == 3) {
5093  h_recSignalEnergy0_HB4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5094  h_recSignalEnergy1_HB4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5095  h_recSignalEnergy2_HB4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5096  h_recNoiseEnergy0_HB4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5097  h_recNoiseEnergy1_HB4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5098  h_recNoiseEnergy2_HB4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5099  }
5100  } //k3
5101  } //k2
5102  } //k1
5103  } //if k0 == 0 HB
5104 
5105  // HE:
5106  if (k0 == 1) {
5107  for (int k1 = 0; k1 < ndepth; k1++) {
5108  // k2: 0-81
5109  for (int k2 = 0; k2 < neta; k2++) {
5110  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5111  int k2plot = k2 - 41;
5112  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5113  for (int k3 = 0; k3 < nphi; k3++) {
5114  if (k1 == 0) {
5115  h_recSignalEnergy0_HE1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5116  h_recSignalEnergy1_HE1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5117  h_recSignalEnergy2_HE1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5118  h_recNoiseEnergy0_HE1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5119  h_recNoiseEnergy1_HE1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5120  h_recNoiseEnergy2_HE1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5121  }
5122  if (k1 == 1) {
5123  h_recSignalEnergy0_HE2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5124  h_recSignalEnergy1_HE2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5125  h_recSignalEnergy2_HE2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5126  h_recNoiseEnergy0_HE2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5127  h_recNoiseEnergy1_HE2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5128  h_recNoiseEnergy2_HE2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5129  }
5130  if (k1 == 2) {
5131  h_recSignalEnergy0_HE3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5132  h_recSignalEnergy1_HE3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5133  h_recSignalEnergy2_HE3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5134  h_recNoiseEnergy0_HE3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5135  h_recNoiseEnergy1_HE3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5136  h_recNoiseEnergy2_HE3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5137  }
5138  if (k1 == 3) {
5139  h_recSignalEnergy0_HE4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5140  h_recSignalEnergy1_HE4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5141  h_recSignalEnergy2_HE4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5142  h_recNoiseEnergy0_HE4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5143  h_recNoiseEnergy1_HE4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5144  h_recNoiseEnergy2_HE4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5145  }
5146  if (k1 == 4) {
5147  h_recSignalEnergy0_HE5->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5148  h_recSignalEnergy1_HE5->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5149  h_recSignalEnergy2_HE5->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5150  h_recNoiseEnergy0_HE5->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5151  h_recNoiseEnergy1_HE5->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5152  h_recNoiseEnergy2_HE5->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5153  }
5154  if (k1 == 5) {
5155  h_recSignalEnergy0_HE6->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5156  h_recSignalEnergy1_HE6->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5157  h_recSignalEnergy2_HE6->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5158  h_recNoiseEnergy0_HE6->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5159  h_recNoiseEnergy1_HE6->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5160  h_recNoiseEnergy2_HE6->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5161  }
5162  if (k1 == 6) {
5163  h_recSignalEnergy0_HE7->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5164  h_recSignalEnergy1_HE7->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5165  h_recSignalEnergy2_HE7->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5166  h_recNoiseEnergy0_HE7->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5167  h_recNoiseEnergy1_HE7->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5168  h_recNoiseEnergy2_HE7->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5169  }
5170  } //k3
5171  } //k2
5172  } //k1
5173  } //if k0 == 1 HE
5174 
5175  // HF: 4 depthes for Digis and only 2 - for Reco !!! ('ve tried to enter 4 for reco since 31.10.2021 AZ)
5176  if (k0 == 3) {
5177  for (int k1 = 0; k1 < ndepth; k1++) {
5178  // k2: 0-81
5179  for (int k2 = 0; k2 < neta; k2++) {
5180  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5181  int k2plot = k2 - 41;
5182  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5183  for (int k3 = 0; k3 < nphi; k3++) {
5184  if (k1 == 0) {
5185  h_recSignalEnergy0_HF1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5186  h_recSignalEnergy1_HF1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5187  h_recSignalEnergy2_HF1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5188  h_recNoiseEnergy0_HF1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5189  h_recNoiseEnergy1_HF1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5190  h_recNoiseEnergy2_HF1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5191  }
5192  if (k1 == 1) {
5193  h_recSignalEnergy0_HF2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5194  h_recSignalEnergy1_HF2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5195  h_recSignalEnergy2_HF2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5196  h_recNoiseEnergy0_HF2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5197  h_recNoiseEnergy1_HF2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5198  h_recNoiseEnergy2_HF2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5199  }
5200  // AZ 31.10.2021: k1=3 and 4 added for HF recoSignal,recNoise
5201  if (k1 == 2) {
5202  h_recSignalEnergy0_HF3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5203  h_recSignalEnergy1_HF3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5204  h_recSignalEnergy2_HF3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5205  h_recNoiseEnergy0_HF3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5206  h_recNoiseEnergy1_HF3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5207  h_recNoiseEnergy2_HF3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5208  }
5209  if (k1 == 3) {
5210  h_recSignalEnergy0_HF4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5211  h_recSignalEnergy1_HF4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5212  h_recSignalEnergy2_HF4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5213  h_recNoiseEnergy0_HF4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5214  h_recNoiseEnergy1_HF4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5215  h_recNoiseEnergy2_HF4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5216  }
5217  } //k3
5218  } //k2
5219  } //k1
5220  } //if k0 == 3 HF
5221 
5222  } //k0
5223 
5224  } // if(flagIterativeMethodCalibrationGroupReco
5225 
5227 
5229  if (flagLaserRaddam_ > 1) {
5231  for (int k1 = 0; k1 < ndepth; k1++) {
5232  for (int k2 = 0; k2 < neta; k2++) {
5233  for (int k3 = 0; k3 < nphi; k3++) {
5234  if (mapRADDAM0_HE[k1][k2][k3] != 0) {
5235  // ---------------------------------------- D2 sum over phi before!!! any dividing:
5236  mapRADDAM_HED2[k1][k2] += mapRADDAM_HE[k1][k2][k3];
5237  // N phi sectors w/ digihits
5238  ++mapRADDAM_HED20[k1][k2];
5239  } //if
5240  } //for
5241  } //for
5242  } //for
5243 
5245  for (int k1 = 0; k1 < ndepth; k1++) {
5246  for (int k2 = 0; k2 < neta; k2++) {
5247  if (mapRADDAM_HED20[k1][k2] != 0) {
5248  // validation of channels at eta16:
5249  if (k1 == 2 && k2 == 25) {
5251  h_Eta16Depth3RADDAM_HED2->Fill(mapRADDAM_HED2[k1][k2] / mapRADDAM_HED20[k1][k2]);
5253  } else if (k1 == 2 && k2 == 56) {
5255  h_Eta16Depth3RADDAM_HED2P->Fill(mapRADDAM_HED2[k1][k2] / mapRADDAM_HED20[k1][k2]);
5257  } else {
5261  }
5263  mapRADDAM_HED2[k1][k2] /= mapRADDAM_HED20[k1][k2];
5264  } // if(mapRADDAM_HED20[k1][k2] != 0
5265  } //for
5266  } //for
5268  for (int k1 = 0; k1 < ndepth; k1++) {
5269  for (int k2 = 0; k2 < neta; k2++) {
5270  if (k1 == 2 && (k2 == 25 || k2 == 56)) {
5271  } else {
5272  // if(k2!=25 && k2!=56) {
5273  int k2plot = k2 - 41;
5274  int kkk = k2;
5275  if (k2plot > 0)
5276  kkk = k2 + 1;
5277  int kk2 = 25;
5278  if (k2plot > 0)
5279  kk2 = 56;
5280  if (mapRADDAM_HED2[k1][k2] != 0. && mapRADDAM_HED2[2][kk2] != 0) {
5281  mapRADDAM_HED2[k1][k2] /= mapRADDAM_HED2[2][kk2];
5282  // (d1 & eta 17-29) L1
5283  int LLLLLL111111 = 0;
5284  if ((k1 == 0 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 30))
5285  LLLLLL111111 = 1;
5286  // (d2 & eta 17-26) && (d3 & eta 27-28) L2
5287  int LLLLLL222222 = 0;
5288  if ((k1 == 1 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 27) ||
5289  (k1 == 2 && fabs(kkk - 41) > 26 && fabs(kkk - 41) < 29))
5290  LLLLLL222222 = 1;
5291  //
5292  if (LLLLLL111111 == 1) {
5293  h_sigLayer1RADDAM5_HED2->Fill(double(kkk - 41), mapRADDAM_HED2[k1][k2]);
5294  h_sigLayer1RADDAM6_HED2->Fill(double(kkk - 41), 1.);
5295  }
5296  if (LLLLLL222222 == 1) {
5297  h_sigLayer2RADDAM5_HED2->Fill(double(kkk - 41), mapRADDAM_HED2[k1][k2]);
5298  h_sigLayer2RADDAM6_HED2->Fill(double(kkk - 41), 1.);
5299  }
5300  } //if
5301  } // if(k2!=25 && k2!=56
5302  } //for
5303  } //for
5304 
5306 
5307  //------------------------------------------------------ aver per eta 16(depth=3-> k1=2, k2=16(15) :
5309  for (int k1 = 0; k1 < ndepth; k1++) {
5310  for (int k2 = 0; k2 < neta; k2++) {
5311  if (k1 == 2 && (k2 == 25 || k2 == 56)) {
5312  } else {
5313  int k2plot = k2 - 41;
5314  int kk2 = 25;
5315  if (k2plot > 0)
5316  kk2 = 56;
5317  int kkk = k2;
5318  if (k2plot > 0)
5319  kkk = k2 + 1;
5320  for (int k3 = 0; k3 < nphi; k3++) {
5321  if (mapRADDAM_HE[k1][k2][k3] != 0. && mapRADDAM_HE[2][kk2][k3] != 0) {
5322  mapRADDAM_HE[k1][k2][k3] /= mapRADDAM_HE[2][kk2][k3];
5323  int LLLLLL111111 = 0;
5324  if ((k1 == 0 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 30))
5325  LLLLLL111111 = 1;
5326  int LLLLLL222222 = 0;
5327  if ((k1 == 1 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 27) ||
5328  (k1 == 2 && fabs(kkk - 41) > 26 && fabs(kkk - 41) < 29))
5329  LLLLLL222222 = 1;
5330  if (LLLLLL111111 == 1) {
5331  h_sigLayer1RADDAM5_HE->Fill(double(kkk - 41), mapRADDAM_HE[k1][k2][k3]);
5332  h_sigLayer1RADDAM6_HE->Fill(double(kkk - 41), 1.);
5333  }
5334  if (LLLLLL222222 == 1) {
5335  h_sigLayer2RADDAM5_HE->Fill(double(kkk - 41), mapRADDAM_HE[k1][k2][k3]);
5336  h_sigLayer2RADDAM6_HE->Fill(double(kkk - 41), 1.);
5337  }
5338  } //if
5339  } //for
5340  } // if(k2!=25 && k2!=56
5341  } //for
5342  } //for
5343  //
5345  for (int k1 = 0; k1 < ndepth; k1++) {
5346  for (int k2 = 0; k2 < neta; k2++) {
5347  mapRADDAM_HED2[k1][k2] = 0.;
5348  mapRADDAM_HED20[k1][k2] = 0.;
5349  for (int k3 = 0; k3 < nphi; k3++) {
5350  mapRADDAM_HE[k1][k2][k3] = 0.;
5351  mapRADDAM0_HE[k1][k2][k3] = 0;
5352  } //for
5353  } //for
5354  } //for
5355 
5357  } // END TREATMENT : if(flagLaserRaddam_ == 1
5359 
5361  // // // // // // //sumamplitudes:
5363  for (int k0 = 0; k0 < nsub; k0++) {
5364  int sumofchannels = 0;
5365  double sumamplitudesubdet = 0.;
5366  int sumofchannels0 = 0;
5367  double sumamplitudesubdet0 = 0.;
5368  for (int k2 = 0; k2 < neta; k2++) {
5369  for (int k3 = 0; k3 < nphi; k3++) {
5370  // HB
5371  if (k0 == 0) {
5372  double sumamplitudechannel_HB = amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3];
5373  h_sumamplitudechannel_HB->Fill(sumamplitudechannel_HB);
5374  if (sumamplitudechannel_HB > 80.) {
5375  sumamplitudesubdet += sumamplitudechannel_HB;
5376  sumofchannels++;
5377  } else {
5378  if (sumamplitudechannel_HB > 0.) {
5379  sumamplitudesubdet0 += sumamplitudechannel_HB;
5380  sumofchannels0++;
5381  }
5382  }
5383  } //
5384 
5385  // HE
5386  if (k0 == 1) {
5387  double sumamplitudechannel_HE =
5388  amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3] + amplitudechannel[k0][2][k2][k3];
5389  h_sumamplitudechannel_HE->Fill(sumamplitudechannel_HE);
5390  if (sumamplitudechannel_HE > 200.) {
5391  sumamplitudesubdet += sumamplitudechannel_HE;
5392  sumofchannels++;
5393  } else {
5394  if (sumamplitudechannel_HE > 0.) {
5395  sumamplitudesubdet0 += sumamplitudechannel_HE;
5396  sumofchannels0++;
5397  }
5398  }
5399  } //
5400 
5401  // HO
5402  if (k0 == 2) {
5403  double sumamplitudechannel_HO = amplitudechannel[k0][3][k2][k3];
5404  h_sumamplitudechannel_HO->Fill(sumamplitudechannel_HO);
5405  if (sumamplitudechannel_HO > 1200.) {
5406  sumamplitudesubdet += sumamplitudechannel_HO;
5407  sumofchannels++;
5408  } else {
5409  if (sumamplitudechannel_HO > 0.) {
5410  sumamplitudesubdet0 += sumamplitudechannel_HO;
5411  sumofchannels0++;
5412  }
5413  }
5414  } //
5415  // HF
5416  if (k0 == 3) {
5417  double sumamplitudechannel_HF = amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3];
5418  h_sumamplitudechannel_HF->Fill(sumamplitudechannel_HF);
5419  if (sumamplitudechannel_HF > 600.) {
5420  sumamplitudesubdet += sumamplitudechannel_HF;
5421  sumofchannels++;
5422  } else {
5423  if (sumamplitudechannel_HF > 0.) {
5424  sumamplitudesubdet0 += sumamplitudechannel_HF;
5425  sumofchannels0++;
5426  }
5427  }
5428  } //
5429 
5430  } //k3
5431  } //k2
5432  // }//k1
5433  // SA of each sub-detector DONE. Then: summarize or find maximum throught events of LS
5434  if (k0 == 0) {
5435  h_eventamplitude_HB->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5436  h_eventoccupancy_HB->Fill((sumofchannels + sumofchannels0));
5437  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM1)
5438  maxxSUM1 = sumamplitudesubdet + sumamplitudesubdet0;
5439  if ((sumofchannels + sumofchannels0) > maxxOCCUP1)
5440  maxxOCCUP1 = sumofchannels + sumofchannels0;
5441  averSIGNALoccupancy_HB += sumofchannels;
5442  averSIGNALsumamplitude_HB += sumamplitudesubdet;
5443  averNOSIGNALoccupancy_HB += sumofchannels0;
5444  averNOSIGNALsumamplitude_HB += sumamplitudesubdet0;
5445  if ((sumamplitudesubdet + sumamplitudesubdet0) > 60000) {
5446  for (int k2 = 0; k2 < neta; k2++) {
5447  for (int k3 = 0; k3 < nphi; k3++) {
5448  int ieta = k2 - 41;
5450  if (amplitudechannel[k0][0][k2][k3] != 0.) {
5451  h_2DAtaildepth1_HB->Fill(double(ieta), double(k3), amplitudechannel[k0][0][k2][k3]);
5452  h_2D0Ataildepth1_HB->Fill(double(ieta), double(k3), 1.);
5453  }
5455  if (amplitudechannel[k0][1][k2][k3] != 0.) {
5456  h_2DAtaildepth2_HB->Fill(double(ieta), double(k3), amplitudechannel[k0][1][k2][k3]);
5457  h_2D0Ataildepth2_HB->Fill(double(ieta), double(k3), 1.);
5458  }
5459  } //for
5460  } //for
5461  } //>60000
5462  } //HB
5463  if (k0 == 1) {
5464  h_eventamplitude_HE->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5465  h_eventoccupancy_HE->Fill((sumofchannels + sumofchannels0));
5466  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM2)
5467  maxxSUM2 = sumamplitudesubdet + sumamplitudesubdet0;
5468  if ((sumofchannels + sumofchannels0) > maxxOCCUP2)
5469  maxxOCCUP2 = sumofchannels + sumofchannels0;
5470  averSIGNALoccupancy_HE += sumofchannels;
5471  averSIGNALsumamplitude_HE += sumamplitudesubdet;
5472  averNOSIGNALoccupancy_HE += sumofchannels0;
5473  averNOSIGNALsumamplitude_HE += sumamplitudesubdet0;
5474  } //HE
5475  if (k0 == 2) {
5476  h_eventamplitude_HO->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5477  h_eventoccupancy_HO->Fill((sumofchannels + sumofchannels0));
5478  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM3)
5479  maxxSUM3 = sumamplitudesubdet + sumamplitudesubdet0;
5480  if ((sumofchannels + sumofchannels0) > maxxOCCUP3)
5481  maxxOCCUP3 = sumofchannels + sumofchannels0;
5482  averSIGNALoccupancy_HO += sumofchannels;
5483  averSIGNALsumamplitude_HO += sumamplitudesubdet;
5484  averNOSIGNALoccupancy_HO += sumofchannels0;
5485  averNOSIGNALsumamplitude_HO += sumamplitudesubdet0;
5486  } //HO
5487  if (k0 == 3) {
5488  h_eventamplitude_HF->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5489  h_eventoccupancy_HF->Fill((sumofchannels + sumofchannels0));
5490  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM4)
5491  maxxSUM4 = sumamplitudesubdet + sumamplitudesubdet0;
5492  if ((sumofchannels + sumofchannels0) > maxxOCCUP4)
5493  maxxOCCUP4 = sumofchannels + sumofchannels0;
5494  averSIGNALoccupancy_HF += sumofchannels;
5495  averSIGNALsumamplitude_HF += sumamplitudesubdet;
5496  averNOSIGNALoccupancy_HF += sumofchannels0;
5497  averNOSIGNALsumamplitude_HF += sumamplitudesubdet0;
5498  } //HF
5499  } //k0
5500 
5504  int eeeeee;
5505  eeeeee = lscounterM1;
5506  if (flagtoaskrunsorls_ == 0)
5507  eeeeee = runcounter;
5508 
5510  for (int k0 = 0; k0 < nsub; k0++) {
5513  for (int k1 = 0; k1 < ndepth; k1++) {
5515  int nbadchannels = 0;
5516  for (int k2 = 0; k2 < neta; k2++) {
5517  for (int k3 = 0; k3 < nphi; k3++) {
5518  if (badchannels[k0][k1][k2][k3] != 0)
5519  ++nbadchannels;
5520  } //k3
5521  } //k2
5523  //HB
5524  if (k0 == 0) {
5525  if (k1 == 0) {
5526  h_nbadchannels_depth1_HB->Fill(float(nbadchannels));
5527  h_runnbadchannels_depth1_HB->Fill(float(eeeeee), float(nbadchannels));
5528  if (nbadchannels > lsdep_cut1_peak_HBdepth1_)
5529  h_runnbadchannelsC_depth1_HB->Fill(float(eeeeee), float(nbadchannels));
5530  if (nbadchannels != 0)
5531  h_runbadrate_depth1_HB->Fill(float(eeeeee), 1.);
5532  if (nbadchannels > lsdep_cut3_max_HBdepth1_)
5533  h_runbadrateC_depth1_HB->Fill(float(eeeeee), 1.);
5534  h_bcnnbadchannels_depth1_HB->Fill(float(bcn), float(nbadchannels));
5535  h_runbadrate0_depth1_HB->Fill(float(eeeeee), 1.);
5536  h_bcnbadrate0_depth1_HB->Fill(float(bcn), 1.);
5537  }
5538  if (k1 == 1) {
5539  h_nbadchannels_depth2_HB->Fill(float(nbadchannels));
5540  h_runnbadchannels_depth2_HB->Fill(float(eeeeee), float(nbadchannels));
5541  if (nbadchannels > lsdep_cut1_peak_HBdepth2_)
5542  h_runnbadchannelsC_depth2_HB->Fill(float(eeeeee), float(nbadchannels));
5543  if (nbadchannels != 0)
5544  h_runbadrate_depth2_HB->Fill(float(eeeeee), 1.);
5545  if (nbadchannels > lsdep_cut3_max_HBdepth2_)
5546  h_runbadrateC_depth2_HB->Fill(float(eeeeee), 1.);
5547  h_bcnnbadchannels_depth2_HB->Fill(float(bcn), float(nbadchannels));
5548  h_runbadrate0_depth2_HB->Fill(float(eeeeee), 1.);
5549  h_bcnbadrate0_depth2_HB->Fill(float(bcn), 1.);
5550  }
5551  }
5552  //HE
5553  if (k0 == 1) {
5554  if (k1 == 0) {
5555  h_nbadchannels_depth1_HE->Fill(float(nbadchannels));
5556  h_runnbadchannels_depth1_HE->Fill(float(eeeeee), float(nbadchannels));
5557  if (nbadchannels > lsdep_cut1_peak_HEdepth1_)
5558  h_runnbadchannelsC_depth1_HE->Fill(float(eeeeee), float(nbadchannels));
5559  if (nbadchannels != 0)
5560  h_runbadrate_depth1_HE->Fill(float(eeeeee), 1.);
5561  if (nbadchannels > lsdep_cut3_max_HEdepth1_)
5562  h_runbadrateC_depth1_HE->Fill(float(eeeeee), 1.);
5563  h_bcnnbadchannels_depth1_HE->Fill(float(bcn), float(nbadchannels));
5564  h_runbadrate0_depth1_HE->Fill(float(eeeeee), 1.);
5565  h_bcnbadrate0_depth1_HE->Fill(float(bcn), 1.);
5566  }
5567  if (k1 == 1) {
5568  h_nbadchannels_depth2_HE->Fill(float(nbadchannels));
5569  h_runnbadchannels_depth2_HE->Fill(float(eeeeee), float(nbadchannels));
5570  if (nbadchannels > lsdep_cut1_peak_HEdepth2_)
5571  h_runnbadchannelsC_depth2_HE->Fill(float(eeeeee), float(nbadchannels));
5572  if (nbadchannels != 0)
5573  h_runbadrate_depth2_HE->Fill(float(eeeeee), 1.);
5574  if (nbadchannels > lsdep_cut3_max_HEdepth2_)
5575  h_runbadrateC_depth2_HE->Fill(float(eeeeee), 1.);
5576  h_bcnnbadchannels_depth2_HE->Fill(float(bcn), float(nbadchannels));
5577  h_runbadrate0_depth2_HE->Fill(float(eeeeee), 1.);
5578  h_bcnbadrate0_depth2_HE->Fill(float(bcn), 1.);
5579  }
5580  if (k1 == 2) {
5581  h_nbadchannels_depth3_HE->Fill(float(nbadchannels));
5582  h_runnbadchannels_depth3_HE->Fill(float(eeeeee), float(nbadchannels));
5583  if (nbadchannels > lsdep_cut1_peak_HEdepth3_)
5584  h_runnbadchannelsC_depth3_HE->Fill(float(eeeeee), float(nbadchannels));
5585  if (nbadchannels != 0)
5586  h_runbadrate_depth3_HE->Fill(float(eeeeee), 1.);
5587  if (nbadchannels > lsdep_cut3_max_HEdepth3_)
5588  h_runbadrateC_depth3_HE->Fill(float(eeeeee), 1.);
5589  h_bcnnbadchannels_depth3_HE->Fill(float(bcn), float(nbadchannels));
5590  h_runbadrate0_depth3_HE->Fill(float(eeeeee), 1.);
5591  h_bcnbadrate0_depth3_HE->Fill(float(bcn), 1.);
5592  }
5593  }
5594  //HO
5595  if (k0 == 2) {
5596  if (k1 == 3) {
5597  h_nbadchannels_depth4_HO->Fill(float(nbadchannels));
5598  h_runnbadchannels_depth4_HO->Fill(float(eeeeee), float(nbadchannels));
5599  if (nbadchannels > lsdep_cut1_peak_HOdepth4_)
5600  h_runnbadchannelsC_depth4_HO->Fill(float(eeeeee), float(nbadchannels));
5601  if (nbadchannels != 0)
5602  h_runbadrate_depth4_HO->Fill(float(eeeeee), 1.);
5603  if (nbadchannels > lsdep_cut3_max_HOdepth4_)
5604  h_runbadrateC_depth4_HO->Fill(float(eeeeee), 1.);
5605  h_bcnnbadchannels_depth4_HO->Fill(float(bcn), float(nbadchannels));
5606  h_runbadrate0_depth4_HO->Fill(float(eeeeee), 1.);
5607  h_bcnbadrate0_depth4_HO->Fill(float(bcn), 1.);
5608  }
5609  }
5610  //HF
5611  if (k0 == 3) {
5612  if (k1 == 0) {
5613  h_nbadchannels_depth1_HF->Fill(float(nbadchannels));
5614  h_runnbadchannels_depth1_HF->Fill(float(eeeeee), float(nbadchannels));
5615  if (nbadchannels > lsdep_cut1_peak_HFdepth1_)
5616  h_runnbadchannelsC_depth1_HF->Fill(float(eeeeee), float(nbadchannels));
5617  if (nbadchannels != 0)
5618  h_runbadrate_depth1_HF->Fill(float(eeeeee), 1.);
5619  if (nbadchannels > lsdep_cut3_max_HFdepth1_)
5620  h_runbadrateC_depth1_HF->Fill(float(eeeeee), 1.);
5621  h_bcnnbadchannels_depth1_HF->Fill(float(bcn), float(nbadchannels));
5622  h_runbadrate0_depth1_HF->Fill(float(eeeeee), 1.);
5623  h_bcnbadrate0_depth1_HF->Fill(float(bcn), 1.);
5624  }
5625  if (k1 == 1) {
5626  h_nbadchannels_depth2_HF->Fill(float(nbadchannels));
5627  h_runnbadchannels_depth2_HF->Fill(float(eeeeee), float(nbadchannels));
5628  if (nbadchannels > lsdep_cut1_peak_HFdepth2_)
5629  h_runnbadchannelsC_depth2_HF->Fill(float(eeeeee), float(nbadchannels));
5630  if (nbadchannels != 0)
5631  h_runbadrate_depth2_HF->Fill(float(eeeeee), 1.);
5632  if (nbadchannels > lsdep_cut3_max_HFdepth2_)
5633  h_runbadrateC_depth2_HF->Fill(float(eeeeee), 1.);
5634  h_bcnnbadchannels_depth2_HF->Fill(float(bcn), float(nbadchannels));
5635  h_runbadrate0_depth2_HF->Fill(float(eeeeee), 1.);
5636  h_bcnbadrate0_depth2_HF->Fill(float(bcn), 1.);
5637  }
5638  }
5639 
5641  } //k1
5642  } //k0
5644  } //if(recordHistoes_&& studyRunDependenceHist_)
5645 
5648  iEvent.getByToken(tok_calib_, calib);
5649 
5650  bool gotCALIBDigis = true;
5651  if (!(iEvent.getByToken(tok_calib_, calib))) {
5652  gotCALIBDigis = false; //this is a boolean set up to check if there are CALIBgigis in input root file
5653  }
5654  if (!(calib.isValid())) {
5655  gotCALIBDigis = false; //if it is not there, leave it false
5656  }
5657  if (!gotCALIBDigis) {
5658  } else {
5659  for (HcalCalibDigiCollection::const_iterator digi = calib->begin(); digi != calib->end(); digi++) {
5660  int cal_det = digi->id().hcalSubdet(); // 1-HB,2-HE,3-HO,4-HF
5661  int cal_phi = digi->id().iphi();
5662  int cal_eta = digi->id().ieta();
5663  int cal_cbox = digi->id().cboxChannel();
5664 
5667  if (cal_det > 0 && cal_det < 5 && cal_cbox == 0) {
5668  int iphi = cal_phi - 1;
5669  int ieta = cal_eta;
5670  if (ieta > 0)
5671  ieta -= 1;
5672  nTS = digi->size();
5673  double max_signal = -100.;
5674  int ts_with_max_signal = -100;
5675  double timew = 0.;
5676 
5677  //
5678  if (nTS <= numOfTS)
5679  for (int i = 0; i < nTS; i++) {
5680  double ampldefault = adc2fC[digi->sample(i).adc() & 0xff];
5681  if (max_signal < ampldefault) {
5682  max_signal = ampldefault;
5683  ts_with_max_signal = i;
5684  }
5685  if (i > 1 && i < 6)
5686  calib3[cal_det - 1][ieta + 41][iphi] += ampldefault;
5687  calib0[cal_det - 1][ieta + 41][iphi] += ampldefault;
5688  timew += (i + 1) * ampldefault;
5689  } // for
5690  //
5691 
5692  double amplitude = calib0[cal_det - 1][ieta + 41][iphi];
5693  double aveamplitude = -100.;
5694  if (amplitude > 0 && timew > 0)
5695  aveamplitude = timew / amplitude; // average_TS +1
5696  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
5697  caliba[cal_det - 1][ieta + 41][iphi] = aveamplitude1;
5698 
5699  double rmsamp = 0.;
5700  for (int ii = 0; ii < nTS; ii++) {
5701  double ampldefault = adc2fC[digi->sample(ii).adc() & 0xff];
5702  double aaaaaa = (ii + 1) - aveamplitude;
5703  double aaaaaa2 = aaaaaa * aaaaaa;
5704  rmsamp += (aaaaaa2 * ampldefault); // fC
5705  } //for 2
5706  double rmsamplitude = -100.;
5707  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
5708  rmsamplitude = sqrt(rmsamp / amplitude);
5709  calibw[cal_det - 1][ieta + 41][iphi] = rmsamplitude;
5710  //
5711  calibt[cal_det - 1][ieta + 41][iphi] = ts_with_max_signal;
5712  //
5713 
5714  if (ts_with_max_signal > -1 && ts_with_max_signal < nTS)
5715  calib2[cal_det - 1][ieta + 41][iphi] = adc2fC[digi->sample(ts_with_max_signal).adc() & 0xff];
5716  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < nTS)
5717  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal + 1).adc() & 0xff];
5718  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < nTS)
5719  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal + 2).adc() & 0xff];
5720  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < nTS)
5721  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal - 1).adc() & 0xff];
5722  if (ts_with_max_signal - 2 > -1 && ts_with_max_signal - 2 < nTS)
5723  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal - 2).adc() & 0xff];
5724  //
5725  bool anycapid = true;
5726  bool anyer = false;
5727  bool anydv = true;
5728  int error1 = 0, error2 = 0, error3 = 0;
5729  int lastcapid = 0, capid = 0;
5730  for (int ii = 0; ii < (*digi).size(); ii++) {
5731  capid = (*digi)[ii].capid(); // capId (0-3, sequential)
5732  bool er = (*digi)[ii].er(); // error
5733  bool dv = (*digi)[ii].dv(); // valid data
5734  if (ii != 0 && ((lastcapid + 1) % 4) != capid)
5735  anycapid = false;
5736  lastcapid = capid;
5737  if (er)
5738  anyer = true;
5739  if (!dv)
5740  anydv = false;
5741  }
5742  if (!anycapid)
5743  error1 = 1;
5744  if (anyer)
5745  error2 = 1;
5746  if (!anydv)
5747  error3 = 1;
5748  if (error1 != 0 || error2 != 0 || error3 != 0)
5749  calibcapiderror[cal_det - 1][ieta + 41][iphi] = 100;
5750 
5751  } // if(cal_det>0 && cal_det<5
5752  } //if(recordHistoes_ && studyCalibCellsHist_)
5754 
5756  } //if(recordNtuples_) {
5757 
5758  } //for(HcalCalibDigiCollection
5759  } //if(calib.isValid(
5763  for (int k1 = 0; k1 < nsub; k1++) {
5764  for (int k2 = 0; k2 < neta; k2++) {
5765  for (int k3 = 0; k3 < nphi; k3++) {
5766  int k2plot = k2 - 41;
5767  if (flagcpuoptimization_ == 0) {
5769 
5770  if (signal[k1][k2][k3] > 0.) {
5771  if (k1 == 0) {
5772  h_FullSignal3D_HB->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5773  h_FullSignal3D0_HB->Fill(double(k2plot), double(k3), 1.);
5774  }
5775  if (k1 == 1) {
5776  h_FullSignal3D_HE->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5777  h_FullSignal3D0_HE->Fill(double(k2plot), double(k3), 1.);
5778  }
5779  if (k1 == 2) {
5780  h_FullSignal3D_HO->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5781  h_FullSignal3D0_HO->Fill(double(k2plot), double(k3), 1.);
5782  }
5783  if (k1 == 3) {
5784  h_FullSignal3D_HF->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5785  h_FullSignal3D0_HF->Fill(double(k2plot), double(k3), 1.);
5786  }
5787  }
5788 
5789  } // optimization
5791 
5793  // k2 = 0-81, k3= 0-71
5794  // return to real indexes in eta and phi ( k20 and k30)
5795  int k20 = k2 - 41; // k20 = -41 - 40
5796  if (k20 > 0 || k20 == 0)
5797  k20 += 1; // k20 = -41 - -1 and +1 - +41
5798  int k30 = k3 + 1; // k30= 1-nphi
5799 
5800  // find calibration indexes in eta and phi ( kk2 and kk3)
5801  int kk2 = 0, kk3 = 0;
5802  if (k1 == 0 || k1 == 1) {
5803  if (k20 > 0)
5804  kk2 = 1;
5805  else
5806  kk2 = -1;
5807  if (k30 == 71 || k30 == nphi || k30 == 1 || k30 == 2)
5808  kk3 = 71;
5809  else
5810  kk3 = ((k30 - 3) / 4) * 4 + 3;
5811  } else if (k1 == 2) {
5812  if (abs(k20) <= 4) {
5813  kk2 = 0;
5814  if (k30 == 71 || k30 == nphi || k30 == 1 || k30 == 2 || k30 == 3 || k30 == 4)
5815  kk3 = 71;
5816  else
5817  kk3 = ((k30 - 5) / 6) * 6 + 5;
5818  } else {
5819  if (abs(k20) > 4 && abs(k20) <= 10)
5820  kk2 = 1;
5821  if (abs(k20) > 10 && abs(k20) <= 15)
5822  kk2 = 2;
5823  if (k20 < 0)
5824  kk2 = -kk2;
5825  if (k30 == 71 || k30 == nphi || (k30 >= 1 && k30 <= 10))
5826  kk3 = 71;
5827  else
5828  kk3 = ((k30 - 11) / 12) * 12 + 11;
5829  }
5830  } else if (k1 == 3) {
5831  if (k20 > 0)
5832  kk2 = 1;
5833  else
5834  kk2 = -1;
5835  if (k30 >= 1 && k30 <= 18)
5836  kk3 = 1;
5837  if (k30 >= 19 && k30 <= 36)
5838  kk3 = 19;
5839  if (k30 >= 37 && k30 <= 54)
5840  kk3 = 37;
5841  if (k30 >= 55 && k30 <= nphi)
5842  kk3 = 55;
5843  }
5844  // return to indexes in massiv
5845  int kkk2 = kk2 + 41;
5846  if (kk2 > 0)
5847  kkk2 -= 1;
5848  int kkk3 = kk3;
5849  kkk3 -= 1;
5850 
5851  if (flagcpuoptimization_ == 0) {
5852  double GetRMSOverNormalizedSignal = -1.;
5853  if (signal[k1][k2][k3] > 0. && calib0[k1][kkk2][kkk3] > 0.) {
5854  GetRMSOverNormalizedSignal = signal[k1][k2][k3] / calib0[k1][kkk2][kkk3];
5855  if (k1 == 0) {
5856  h_mapGetRMSOverNormalizedSignal_HB->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5857  h_mapGetRMSOverNormalizedSignal0_HB->Fill(double(k2plot), double(k3), 1.);
5858  }
5859  if (k1 == 1) {
5860  h_mapGetRMSOverNormalizedSignal_HE->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5861  h_mapGetRMSOverNormalizedSignal0_HE->Fill(double(k2plot), double(k3), 1.);
5862  }
5863  if (k1 == 2) {
5864  h_mapGetRMSOverNormalizedSignal_HO->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5865  h_mapGetRMSOverNormalizedSignal0_HO->Fill(double(k2plot), double(k3), 1.);
5866  }
5867  if (k1 == 3) {
5868  h_mapGetRMSOverNormalizedSignal_HF->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
5869  h_mapGetRMSOverNormalizedSignal0_HF->Fill(double(k2plot), double(k3), 1.);
5870  }
5871  }
5872  } //optimization
5874  if (signal[k1][k2][k3] > 0.) {
5875  // ADC
5876  double adc = 0.;
5877  if (calib0[k1][kkk2][kkk3] > 0.)
5878  adc = calib0[k1][kkk2][kkk3];
5879  // Ratio
5880  double ratio = 2.;
5881  if (calib0[k1][kkk2][kkk3] > 0.)
5882  ratio = calib2[k1][kkk2][kkk3] / calib0[k1][kkk2][kkk3];
5883  // TSmax
5884  float calibtsmax = calibt[k1][kkk2][kkk3];
5885  // TSmean
5886  float calibtsmean = caliba[k1][kkk2][kkk3];
5887  // Width
5888  float calibwidth = calibw[k1][kkk2][kkk3];
5889  // CapIdErrors
5890  float calibcap = -100.;
5891  calibcap = calibcapiderror[k1][kkk2][kkk3];
5892 
5893  // HB:
5894  if (k1 == 0) {
5895  // ADC
5896  h_ADCCalib_HB->Fill(adc, 1.);
5897  h_ADCCalib1_HB->Fill(adc, 1.);
5898  if (adc < calibrADCHBMin_ || adc > calibrADCHBMax_)
5899  h_mapADCCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5900  h_mapADCCalib_HB->Fill(double(k2plot), double(k3), adc);
5901  // Ratio
5902  h_RatioCalib_HB->Fill(ratio, 1.);
5903  if (ratio < calibrRatioHBMin_ || ratio > calibrRatioHBMax_)
5904  h_mapRatioCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5905  h_mapRatioCalib_HB->Fill(double(k2plot), double(k3), ratio);
5906  // TSmax
5907  if (calibtsmax > -0.5) {
5908  h_TSmaxCalib_HB->Fill(calibtsmax, 1.);
5909  if (calibtsmax < calibrTSmaxHBMin_ || calibtsmax > calibrTSmaxHBMax_)
5910  h_mapTSmaxCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5911  h_mapTSmaxCalib_HB->Fill(double(k2plot), double(k3), calibtsmax);
5912  }
5913  // TSmean
5914  if (calibtsmean > -0.5) {
5915  h_TSmeanCalib_HB->Fill(calibtsmean, 1.);
5916  if (calibtsmean < calibrTSmeanHBMin_ || calibtsmean > calibrTSmeanHBMax_)
5917  h_mapTSmeanCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5918  h_mapTSmeanCalib_HB->Fill(double(k2plot), double(k3), calibtsmean);
5919  }
5920  // Width
5921  if (calibwidth > -0.5) {
5922  h_WidthCalib_HB->Fill(calibwidth, 1.);
5923  if (calibwidth < calibrWidthHBMin_ || calibwidth > calibrWidthHBMax_)
5924  h_mapWidthCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5925  h_mapWidthCalib_HB->Fill(double(k2plot), double(k3), calibwidth);
5926  }
5927  // CapIdErrors
5928  if (calibcap > 0)
5929  h_mapCapCalib047_HB->Fill(double(k2plot), double(k3), 1.);
5930  //
5931  h_map_HB->Fill(double(k2plot), double(k3), 1.);
5932  }
5933  // HE:
5934  if (k1 == 1) {
5935  // ADC
5936  h_ADCCalib_HE->Fill(adc, 1.);
5937  h_ADCCalib1_HE->Fill(adc, 1.);
5938  if (adc < calibrADCHEMin_ || adc > calibrADCHEMax_)
5939  h_mapADCCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5940  h_mapADCCalib_HE->Fill(double(k2plot), double(k3), adc);
5941  // Ratio
5942  h_RatioCalib_HE->Fill(ratio, 1.);
5943  if (ratio < calibrRatioHEMin_ || ratio > calibrRatioHEMax_)
5944  h_mapRatioCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5945  h_mapRatioCalib_HE->Fill(double(k2plot), double(k3), ratio);
5946  // TSmax
5947  if (calibtsmax > -0.5) {
5948  h_TSmaxCalib_HE->Fill(calibtsmax, 1.);
5949  if (calibtsmax < calibrTSmaxHEMin_ || calibtsmax > calibrTSmaxHEMax_)
5950  h_mapTSmaxCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5951  h_mapTSmaxCalib_HE->Fill(double(k2plot), double(k3), calibtsmax);
5952  }
5953  // TSmean
5954  if (calibtsmean > -0.5) {
5955  h_TSmeanCalib_HE->Fill(calibtsmean, 1.);
5956  if (calibtsmean < calibrTSmeanHEMin_ || calibtsmean > calibrTSmeanHEMax_)
5957  h_mapTSmeanCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5958  h_mapTSmeanCalib_HE->Fill(double(k2plot), double(k3), calibtsmean);
5959  }
5960  // Width
5961  if (calibwidth > -0.5) {
5962  h_WidthCalib_HE->Fill(calibwidth, 1.);
5963  if (calibwidth < calibrWidthHEMin_ || calibwidth > calibrWidthHEMax_)
5964  h_mapWidthCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5965  h_mapWidthCalib_HE->Fill(double(k2plot), double(k3), calibwidth);
5966  }
5967  // CapIdErrors
5968  if (calibcap > 0)
5969  h_mapCapCalib047_HE->Fill(double(k2plot), double(k3), 1.);
5970  //
5971  h_map_HE->Fill(double(k2plot), double(k3), 1.);
5972  }
5973  // HO:
5974  if (k1 == 2) {
5975  // ADC
5976  h_ADCCalib_HO->Fill(adc, 1.);
5977  h_ADCCalib1_HO->Fill(adc, 1.);
5978  if (adc < calibrADCHOMin_ || adc > calibrADCHOMax_)
5979  h_mapADCCalib047_HO->Fill(double(k2plot), double(k3), 1.);
5980  h_mapADCCalib_HO->Fill(double(k2plot), double(k3), adc);
5981  // Ratio
5982  h_RatioCalib_HO->Fill(ratio, 1.);
5983  if (ratio < calibrRatioHOMin_ || ratio > calibrRatioHOMax_)
5984  h_mapRatioCalib047_HO->Fill(double(k2plot), double(k3), 1.);
5985  h_mapRatioCalib_HO->Fill(double(k2plot), double(k3), ratio);
5986  // TSmax
5987  if (calibtsmax > -0.5) {
5988  h_TSmaxCalib_HO->Fill(calibtsmax, 1.);
5989  if (calibtsmax < calibrTSmaxHOMin_ || calibtsmax > calibrTSmaxHOMax_)
5990  h_mapTSmaxCalib047_HO->Fill(double(k2plot), double(k3), 1.);
5991  h_mapTSmaxCalib_HO->Fill(double(k2plot), double(k3), calibtsmax);
5992  }
5993  // TSmean
5994  if (calibtsmean > -0.5) {
5995  h_TSmeanCalib_HO->Fill(calibtsmean, 1.);
5996  if (calibtsmean < calibrTSmeanHOMin_ || calibtsmean > calibrTSmeanHOMax_)
5997  h_mapTSmeanCalib047_HO->Fill(double(k2plot), double(k3), 1.);
5998  h_mapTSmeanCalib_HO->Fill(double(k2plot), double(k3), calibtsmean);
5999  }
6000  // Width
6001  if (calibwidth > -0.5) {
6002  h_WidthCalib_HO->Fill(calibwidth, 1.);
6003  if (calibwidth < calibrWidthHOMin_ || calibwidth > calibrWidthHOMax_)
6004  h_mapWidthCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6005  h_mapWidthCalib_HO->Fill(double(k2plot), double(k3), calibwidth);
6006  }
6007  // CapIdErrors
6008  if (calibcap > 0)
6009  h_mapCapCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6010  //
6011  h_map_HO->Fill(double(k2plot), double(k3), 1.);
6012  }
6013  // HF:
6014  if (k1 == 3) {
6015  // ADC
6016  h_ADCCalib_HF->Fill(adc, 1.);
6017  h_ADCCalib1_HF->Fill(adc, 1.);
6018  if (adc < calibrADCHFMin_ || adc > calibrADCHFMax_)
6019  h_mapADCCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6020  h_mapADCCalib_HF->Fill(double(k2plot), double(k3), adc);
6021  // Ratio
6022  h_RatioCalib_HF->Fill(ratio, 1.);
6023  if (ratio < calibrRatioHFMin_ || ratio > calibrRatioHFMax_)
6024  h_mapRatioCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6025  h_mapRatioCalib_HF->Fill(double(k2plot), double(k3), ratio);
6026  // TSmax
6027  if (calibtsmax > -0.5) {
6028  h_TSmaxCalib_HF->Fill(calibtsmax, 1.);
6029  if (calibtsmax < calibrTSmaxHFMin_ || calibtsmax > calibrTSmaxHFMax_)
6030  h_mapTSmaxCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6031  h_mapTSmaxCalib_HF->Fill(double(k2plot), double(k3), calibtsmax);
6032  }
6033  // TSmean
6034  if (calibtsmean > -0.5) {
6035  h_TSmeanCalib_HF->Fill(calibtsmean, 1.);
6036  if (calibtsmean < calibrTSmeanHFMin_ || calibtsmean > calibrTSmeanHFMax_)
6037  h_mapTSmeanCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6038  h_mapTSmeanCalib_HF->Fill(double(k2plot), double(k3), calibtsmean);
6039  }
6040  // Width
6041  if (calibwidth > -0.5) {
6042  h_WidthCalib_HF->Fill(calibwidth, 1.);
6043  if (calibwidth < calibrWidthHFMin_ || calibwidth > calibrWidthHFMax_)
6044  h_mapWidthCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6045  h_mapWidthCalib_HF->Fill(double(k2plot), double(k3), calibwidth);
6046  }
6047  // CapIdErrors
6048  if (calibcap > 0)
6049  h_mapCapCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6050  //
6051  h_map_HF->Fill(double(k2plot), double(k3), 1.);
6052  }
6054  } // if(signal[k1][k2][k3]>0.)
6056  } // k3
6057  } // k2
6058  } // k1
6059 
6061 
6062  } //if(recordHistoes_&& studyCalibCellsHist_)
6063 
6066  myTree->Fill();
6067  // if(recordNtuples_ && nevent < maxNeventsInNtuple_) myTree->Fill();
6068 
6070  if (++local_event % 100 == 0) {
6071  if (verbosity < 0)
6072  std::cout << "run " << Run << " processing events " << local_event << " ok, "
6073  << ", lumi " << lumi << ", numOfLaserEv " << numOfLaserEv << std::endl;
6074  }
6075  } // bcn
6076 
6077  //EndAnalyzer
6078 }
6079 
6080 // ------------ method called once each job just before starting event loop -----------
6082  if (verbosity > 0)
6083  std::cout << "======================== beignJob START +++++++++++++++++++++++++++" << std::endl;
6084  nnnnnn = 0;
6085  nnnnnnhbhe = 0;
6086  nnnnnnhbheqie11 = 0;
6087  nevent = 0;
6088  nevent50 = 0;
6089  counterhf = 0;
6090  counterhfqie10 = 0;
6091  counterho = 0;
6092  nnnnnn1 = 0;
6093  nnnnnn2 = 0;
6094  nnnnnn3 = 0;
6095  nnnnnn4 = 0;
6096  nnnnnn5 = 0;
6097  nnnnnn6 = 0;
6099 
6100  if (recordHistoes_) {
6101  // ha2 = fs_->make<TH2F>("ha2"," ", neta, -41., 41., nphi, 0., bphi);
6102 
6103  h_errorGeneral = fs_->make<TH1F>("h_errorGeneral", " ", 5, 0., 5.);
6104  h_error1 = fs_->make<TH1F>("h_error1", " ", 5, 0., 5.);
6105  h_error2 = fs_->make<TH1F>("h_error2", " ", 5, 0., 5.);
6106  h_error3 = fs_->make<TH1F>("h_error3", " ", 5, 0., 5.);
6107  h_amplError = fs_->make<TH1F>("h_amplError", " ", 100, -2., 98.);
6108  h_amplFine = fs_->make<TH1F>("h_amplFine", " ", 100, -2., 98.);
6109 
6110  h_errorGeneral_HB = fs_->make<TH1F>("h_errorGeneral_HB", " ", 5, 0., 5.);
6111  h_error1_HB = fs_->make<TH1F>("h_error1_HB", " ", 5, 0., 5.);
6112  h_error2_HB = fs_->make<TH1F>("h_error2_HB", " ", 5, 0., 5.);
6113  h_error3_HB = fs_->make<TH1F>("h_error3_HB", " ", 5, 0., 5.);
6114  h_error4_HB = fs_->make<TH1F>("h_error4_HB", " ", 5, 0., 5.);
6115  h_error5_HB = fs_->make<TH1F>("h_error5_HB", " ", 5, 0., 5.);
6116  h_error6_HB = fs_->make<TH1F>("h_error6_HB", " ", 5, 0., 5.);
6117  h_error7_HB = fs_->make<TH1F>("h_error7_HB", " ", 5, 0., 5.);
6118  h_amplError_HB = fs_->make<TH1F>("h_amplError_HB", " ", 100, -2., 98.);
6119  h_amplFine_HB = fs_->make<TH1F>("h_amplFine_HB", " ", 100, -2., 98.);
6120  h_mapDepth1Error_HB = fs_->make<TH2F>("h_mapDepth1Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6121  h_mapDepth2Error_HB = fs_->make<TH2F>("h_mapDepth2Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6122  h_mapDepth3Error_HB = fs_->make<TH2F>("h_mapDepth3Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6123  h_mapDepth4Error_HB = fs_->make<TH2F>("h_mapDepth4Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6124  h_fiber0_HB = fs_->make<TH1F>("h_fiber0_HB", " ", 10, 0., 10.);
6125  h_fiber1_HB = fs_->make<TH1F>("h_fiber1_HB", " ", 10, 0., 10.);
6126  h_fiber2_HB = fs_->make<TH1F>("h_fiber2_HB", " ", 40, 0., 40.);
6127  h_repetedcapid_HB = fs_->make<TH1F>("h_repetedcapid_HB", " ", 5, 0., 5.);
6128 
6129  h_errorGeneral_HE = fs_->make<TH1F>("h_errorGeneral_HE", " ", 5, 0., 5.);
6130  h_error1_HE = fs_->make<TH1F>("h_error1_HE", " ", 5, 0., 5.);
6131  h_error2_HE = fs_->make<TH1F>("h_error2_HE", " ", 5, 0., 5.);
6132  h_error3_HE = fs_->make<TH1F>("h_error3_HE", " ", 5, 0., 5.);
6133  h_error4_HE = fs_->make<TH1F>("h_error4_HE", " ", 5, 0., 5.);
6134  h_error5_HE = fs_->make<TH1F>("h_error5_HE", " ", 5, 0., 5.);
6135  h_error6_HE = fs_->make<TH1F>("h_error6_HE", " ", 5, 0., 5.);
6136  h_error7_HE = fs_->make<TH1F>("h_error7_HE", " ", 5, 0., 5.);
6137  h_amplError_HE = fs_->make<TH1F>("h_amplError_HE", " ", 100, -2., 98.);
6138  h_amplFine_HE = fs_->make<TH1F>("h_amplFine_HE", " ", 100, -2., 98.);
6139  h_mapDepth1Error_HE = fs_->make<TH2F>("h_mapDepth1Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6140  h_mapDepth2Error_HE = fs_->make<TH2F>("h_mapDepth2Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6141  h_mapDepth3Error_HE = fs_->make<TH2F>("h_mapDepth3Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6142  h_mapDepth4Error_HE = fs_->make<TH2F>("h_mapDepth4Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6143  h_mapDepth5Error_HE = fs_->make<TH2F>("h_mapDepth5Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6144  h_mapDepth6Error_HE = fs_->make<TH2F>("h_mapDepth6Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6145  h_mapDepth7Error_HE = fs_->make<TH2F>("h_mapDepth7Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6146  h_fiber0_HE = fs_->make<TH1F>("h_fiber0_HE", " ", 10, 0., 10.);
6147  h_fiber1_HE = fs_->make<TH1F>("h_fiber1_HE", " ", 10, 0., 10.);
6148  h_fiber2_HE = fs_->make<TH1F>("h_fiber2_HE", " ", 40, 0., 40.);
6149  h_repetedcapid_HE = fs_->make<TH1F>("h_repetedcapid_HE", " ", 5, 0., 5.);
6150 
6151  h_errorGeneral_HF = fs_->make<TH1F>("h_errorGeneral_HF", " ", 5, 0., 5.);
6152  h_error1_HF = fs_->make<TH1F>("h_error1_HF", " ", 5, 0., 5.);
6153  h_error2_HF = fs_->make<TH1F>("h_error2_HF", " ", 5, 0., 5.);
6154  h_error3_HF = fs_->make<TH1F>("h_error3_HF", " ", 5, 0., 5.);
6155  h_error4_HF = fs_->make<TH1F>("h_error4_HF", " ", 5, 0., 5.);
6156  h_error5_HF = fs_->make<TH1F>("h_error5_HF", " ", 5, 0., 5.);
6157  h_error6_HF = fs_->make<TH1F>("h_error6_HF", " ", 5, 0., 5.);
6158  h_error7_HF = fs_->make<TH1F>("h_error7_HF", " ", 5, 0., 5.);
6159  h_amplError_HF = fs_->make<TH1F>("h_amplError_HF", " ", 100, -2., 98.);
6160  h_amplFine_HF = fs_->make<TH1F>("h_amplFine_HF", " ", 100, -2., 98.);
6161  h_mapDepth1Error_HF = fs_->make<TH2F>("h_mapDepth1Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6162  h_mapDepth2Error_HF = fs_->make<TH2F>("h_mapDepth2Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6163  h_mapDepth3Error_HF = fs_->make<TH2F>("h_mapDepth3Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6164  h_mapDepth4Error_HF = fs_->make<TH2F>("h_mapDepth4Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6165  h_fiber0_HF = fs_->make<TH1F>("h_fiber0_HF", " ", 10, 0., 10.);
6166  h_fiber1_HF = fs_->make<TH1F>("h_fiber1_HF", " ", 10, 0., 10.);
6167  h_fiber2_HF = fs_->make<TH1F>("h_fiber2_HF", " ", 40, 0., 40.);
6168  h_repetedcapid_HF = fs_->make<TH1F>("h_repetedcapid_HF", " ", 5, 0., 5.);
6169 
6170  h_errorGeneral_HO = fs_->make<TH1F>("h_errorGeneral_HO", " ", 5, 0., 5.);
6171  h_error1_HO = fs_->make<TH1F>("h_error1_HO", " ", 5, 0., 5.);
6172  h_error2_HO = fs_->make<TH1F>("h_error2_HO", " ", 5, 0., 5.);
6173  h_error3_HO = fs_->make<TH1F>("h_error3_HO", " ", 5, 0., 5.);
6174  h_error4_HO = fs_->make<TH1F>("h_error4_HO", " ", 5, 0., 5.);
6175  h_error5_HO = fs_->make<TH1F>("h_error5_HO", " ", 5, 0., 5.);
6176  h_error6_HO = fs_->make<TH1F>("h_error6_HO", " ", 5, 0., 5.);
6177  h_error7_HO = fs_->make<TH1F>("h_error7_HO", " ", 5, 0., 5.);
6178  h_amplError_HO = fs_->make<TH1F>("h_amplError_HO", " ", 100, -2., 98.);
6179  h_amplFine_HO = fs_->make<TH1F>("h_amplFine_HO", " ", 100, -2., 98.);
6180  h_mapDepth4Error_HO = fs_->make<TH2F>("h_mapDepth4Error_HO", " ", neta, -41., 41., nphi, 0., bphi);
6181  h_fiber0_HO = fs_->make<TH1F>("h_fiber0_HO", " ", 10, 0., 10.);
6182  h_fiber1_HO = fs_->make<TH1F>("h_fiber1_HO", " ", 10, 0., 10.);
6183  h_fiber2_HO = fs_->make<TH1F>("h_fiber2_HO", " ", 40, 0., 40.);
6184  h_repetedcapid_HO = fs_->make<TH1F>("h_repetedcapid_HO", " ", 5, 0., 5.);
6185 
6187 
6188  h_numberofhitsHBtest = fs_->make<TH1F>("h_numberofhitsHBtest", " ", 100, 0., 100.);
6189  h_AmplitudeHBtest = fs_->make<TH1F>("h_AmplitudeHBtest", " ", 100, 0., 10000.);
6190  h_AmplitudeHBtest1 = fs_->make<TH1F>("h_AmplitudeHBtest1", " ", 100, 0., 1000000.);
6191  h_AmplitudeHBtest6 = fs_->make<TH1F>("h_AmplitudeHBtest6", " ", 100, 0., 2000000.);
6192  h_totalAmplitudeHB = fs_->make<TH1F>("h_totalAmplitudeHB", " ", 100, 0., 3000000.);
6193  h_totalAmplitudeHBperEvent = fs_->make<TH1F>("h_totalAmplitudeHBperEvent", " ", 1000, 1., 1001.);
6194  // fullAmplitude:
6195  h_ADCAmpl345Zoom_HB = fs_->make<TH1F>("h_ADCAmpl345Zoom_HB", " ", 100, 0., 400.);
6196  h_ADCAmpl345Zoom1_HB = fs_->make<TH1F>("h_ADCAmpl345Zoom1_HB", " ", 100, 0., 100.);
6197  h_ADCAmpl345_HB = fs_->make<TH1F>("h_ADCAmpl345_HB", " ", 100, 10., 3000.);
6198 
6199  h_AmplitudeHBrest = fs_->make<TH1F>("h_AmplitudeHBrest", " ", 100, 0., 10000.);
6200  h_AmplitudeHBrest1 = fs_->make<TH1F>("h_AmplitudeHBrest1", " ", 100, 0., 1000000.);
6201  h_AmplitudeHBrest6 = fs_->make<TH1F>("h_AmplitudeHBrest6", " ", 100, 0., 2000000.);
6202 
6203  h_ADCAmpl345_HBCapIdError = fs_->make<TH1F>("h_ADCAmpl345_HBCapIdError", " ", 100, 10., 3000.);
6204  h_ADCAmpl345_HBCapIdNoError = fs_->make<TH1F>("h_ADCAmpl345_HBCapIdNoError", " ", 100, 10., 3000.);
6205  h_ADCAmpl_HBCapIdError = fs_->make<TH1F>("h_ADCAmpl_HBCapIdError", " ", 100, 10., 3000.);
6206  h_ADCAmpl_HBCapIdNoError = fs_->make<TH1F>("h_ADCAmpl_HBCapIdNoError", " ", 100, 10., 3000.);
6207 
6208  h_ADCAmplZoom_HB = fs_->make<TH1F>("h_ADCAmplZoom_HB", " ", 100, 0., 400.);
6209  h_ADCAmplZoom1_HB = fs_->make<TH1F>("h_ADCAmplZoom1_HB", " ", 100, -20., 80.);
6210  h_ADCAmpl_HB = fs_->make<TH1F>("h_ADCAmpl_HB", " ", 100, 10., 5000.);
6211  h_mapDepth1ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6212  h_mapDepth2ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6213  h_mapDepth3ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6214  h_mapDepth4ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6216  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6218  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6220  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6222  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6223  h_mapDepth1ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6224  h_mapDepth2ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6225  h_mapDepth3ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6226  h_mapDepth4ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6227  h_TSmeanA_HB = fs_->make<TH1F>("h_TSmeanA_HB", " ", 100, -1., 11.);
6228  h_mapDepth1TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6229  h_mapDepth2TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6230  h_mapDepth3TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6231  h_mapDepth4TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6232  h_mapDepth1TSmeanA_HB = fs_->make<TH2F>("h_mapDepth1TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6233  h_mapDepth2TSmeanA_HB = fs_->make<TH2F>("h_mapDepth2TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6234  h_mapDepth3TSmeanA_HB = fs_->make<TH2F>("h_mapDepth3TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6235  h_mapDepth4TSmeanA_HB = fs_->make<TH2F>("h_mapDepth4TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6236  h_TSmaxA_HB = fs_->make<TH1F>("h_TSmaxA_HB", " ", 100, -1., 11.);
6237  h_mapDepth1TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6238  h_mapDepth2TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6239  h_mapDepth3TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6240  h_mapDepth4TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6241  h_mapDepth1TSmaxA_HB = fs_->make<TH2F>("h_mapDepth1TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6242  h_mapDepth2TSmaxA_HB = fs_->make<TH2F>("h_mapDepth2TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6243  h_mapDepth3TSmaxA_HB = fs_->make<TH2F>("h_mapDepth3TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6244  h_mapDepth4TSmaxA_HB = fs_->make<TH2F>("h_mapDepth4TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6245  // RMS:
6246  h_Amplitude_HB = fs_->make<TH1F>("h_Amplitude_HB", " ", 100, 0., 5.);
6247  h_mapDepth1Amplitude225_HB = fs_->make<TH2F>("h_mapDepth1Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6248  h_mapDepth2Amplitude225_HB = fs_->make<TH2F>("h_mapDepth2Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6249  h_mapDepth3Amplitude225_HB = fs_->make<TH2F>("h_mapDepth3Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6250  h_mapDepth4Amplitude225_HB = fs_->make<TH2F>("h_mapDepth4Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6251  h_mapDepth1Amplitude_HB = fs_->make<TH2F>("h_mapDepth1Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6252  h_mapDepth2Amplitude_HB = fs_->make<TH2F>("h_mapDepth2Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6253  h_mapDepth3Amplitude_HB = fs_->make<TH2F>("h_mapDepth3Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6254  h_mapDepth4Amplitude_HB = fs_->make<TH2F>("h_mapDepth4Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6255  // Ratio:
6256  h_Ampl_HB = fs_->make<TH1F>("h_Ampl_HB", " ", 100, 0., 1.1);
6257  h_mapDepth1Ampl047_HB = fs_->make<TH2F>("h_mapDepth1Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6258  h_mapDepth2Ampl047_HB = fs_->make<TH2F>("h_mapDepth2Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6259  h_mapDepth3Ampl047_HB = fs_->make<TH2F>("h_mapDepth3Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6260  h_mapDepth4Ampl047_HB = fs_->make<TH2F>("h_mapDepth4Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6261  h_mapDepth1Ampl_HB = fs_->make<TH2F>("h_mapDepth1Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6262  h_mapDepth2Ampl_HB = fs_->make<TH2F>("h_mapDepth2Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6263  h_mapDepth3Ampl_HB = fs_->make<TH2F>("h_mapDepth3Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6264  h_mapDepth4Ampl_HB = fs_->make<TH2F>("h_mapDepth4Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6265  h_mapDepth1AmplE34_HB = fs_->make<TH2F>("h_mapDepth1AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6266  h_mapDepth2AmplE34_HB = fs_->make<TH2F>("h_mapDepth2AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6267  h_mapDepth3AmplE34_HB = fs_->make<TH2F>("h_mapDepth3AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6268  h_mapDepth4AmplE34_HB = fs_->make<TH2F>("h_mapDepth4AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6269  h_mapDepth1_HB = fs_->make<TH2F>("h_mapDepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
6270  h_mapDepth2_HB = fs_->make<TH2F>("h_mapDepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6271  h_mapDepth3_HB = fs_->make<TH2F>("h_mapDepth3_HB", " ", neta, -41., 41., nphi, 0., bphi);
6272  h_mapDepth4_HB = fs_->make<TH2F>("h_mapDepth4_HB", " ", neta, -41., 41., nphi, 0., bphi);
6273 
6274  h_mapDepth1TS2_HB = fs_->make<TH2F>("h_mapDepth1TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6275  h_mapDepth2TS2_HB = fs_->make<TH2F>("h_mapDepth2TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6276  h_mapDepth3TS2_HB = fs_->make<TH2F>("h_mapDepth3TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6277  h_mapDepth4TS2_HB = fs_->make<TH2F>("h_mapDepth4TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6278  h_mapDepth1TS2_HE = fs_->make<TH2F>("h_mapDepth1TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6279  h_mapDepth2TS2_HE = fs_->make<TH2F>("h_mapDepth2TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6280  h_mapDepth3TS2_HE = fs_->make<TH2F>("h_mapDepth3TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6281  h_mapDepth4TS2_HE = fs_->make<TH2F>("h_mapDepth4TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6282  h_mapDepth5TS2_HE = fs_->make<TH2F>("h_mapDepth5TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6283  h_mapDepth6TS2_HE = fs_->make<TH2F>("h_mapDepth6TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6284  h_mapDepth7TS2_HE = fs_->make<TH2F>("h_mapDepth7TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6285  h_recSignalEnergy0_HF3 = fs_->make<TH2F>("h_recSignalEnergy0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6286  h_recSignalEnergy1_HF3 = fs_->make<TH2F>("h_recSignalEnergy1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6287  h_recSignalEnergy2_HF3 = fs_->make<TH2F>("h_recSignalEnergy2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6288  h_recSignalEnergy0_HF4 = fs_->make<TH2F>("h_recSignalEnergy0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6289  h_recSignalEnergy1_HF4 = fs_->make<TH2F>("h_recSignalEnergy1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6290  h_recSignalEnergy2_HF4 = fs_->make<TH2F>("h_recSignalEnergy2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6291  h_recNoiseEnergy0_HF3 = fs_->make<TH2F>("h_recNoiseEnergy0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6292  h_recNoiseEnergy1_HF3 = fs_->make<TH2F>("h_recNoiseEnergy1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6293  h_recNoiseEnergy2_HF3 = fs_->make<TH2F>("h_recNoiseEnergy2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6294  h_recNoiseEnergy0_HF4 = fs_->make<TH2F>("h_recNoiseEnergy0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6295  h_recNoiseEnergy1_HF4 = fs_->make<TH2F>("h_recNoiseEnergy1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6296  h_recNoiseEnergy2_HF4 = fs_->make<TH2F>("h_recNoiseEnergy2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6297  h_mapDepth1TS1_HF = fs_->make<TH2F>("h_mapDepth1TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6298  h_mapDepth2TS1_HF = fs_->make<TH2F>("h_mapDepth2TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6299  h_mapDepth3TS1_HF = fs_->make<TH2F>("h_mapDepth3TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6300  h_mapDepth4TS1_HF = fs_->make<TH2F>("h_mapDepth4TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6301  h_mapDepth4TS012_HO = fs_->make<TH2F>("h_mapDepth4TS012_HO", " ", neta, -41., 41., nphi, 0., bphi);
6302 
6304 
6305  // stuff regarding summed(total) Amplitude vs iEvent (histo-name is h_totalAmplitudeHEperEvent)
6306  // to see from which event ALL channels are available(related to quality of the run)
6307  h_numberofhitsHEtest = fs_->make<TH1F>("h_numberofhitsHEtest", " ", 100, 0., 10000.);
6308  h_AmplitudeHEtest = fs_->make<TH1F>("h_AmplitudeHEtest", " ", 100, 0., 1000000.);
6309  h_AmplitudeHEtest1 = fs_->make<TH1F>("h_AmplitudeHEtest1", " ", 100, 0., 1000000.);
6310  h_AmplitudeHEtest6 = fs_->make<TH1F>("h_AmplitudeHEtest6", " ", 100, 0., 2000000.);
6311  h_totalAmplitudeHE = fs_->make<TH1F>("h_totalAmplitudeHE", " ", 100, 0., 10000000000.);
6312  h_totalAmplitudeHEperEvent = fs_->make<TH1F>("h_totalAmplitudeHEperEvent", " ", 1000, 1., 1001.);
6313 
6314  // Aijk Amplitude:
6315  h_ADCAmplZoom1_HE = fs_->make<TH1F>("h_ADCAmplZoom1_HE", " ", npfit, 0., anpfit); // for amplmaxts 1TS w/ max
6316  h_ADCAmpl345Zoom1_HE = fs_->make<TH1F>("h_ADCAmpl345Zoom1_HE", " ", npfit, 0., anpfit); // for ampl3ts 3TSs
6317  h_ADCAmpl345Zoom_HE = fs_->make<TH1F>("h_ADCAmpl345Zoom_HE", " ", npfit, 0., anpfit); // for ampl 4TSs
6319  fs_->make<TH1F>("h_amplitudeaveragedbydepthes_HE", " ", npfit, 0., anpfit); // for cross-check: A spectrum
6321  fs_->make<TH1F>("h_ndepthesperamplitudebins_HE", " ", 10, 0., 10.); // for cross-check: ndepthes
6322 
6323  // Ampl12 4TSs to work with "ped-Gsel0" or "led-low-intensity" to clarify gain diff peak2-peak1
6325  fs_->make<TH2F>("h_mapADCAmplfirstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6327  fs_->make<TH2F>("h_mapADCAmplfirstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6329  fs_->make<TH2F>("h_mapADCAmplsecondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6331  "h_mapADCAmplsecondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6332 
6334  fs_->make<TH2F>("h_mapADCAmpl11firstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6336  fs_->make<TH2F>("h_mapADCAmpl11firstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6338  fs_->make<TH2F>("h_mapADCAmpl11secondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6340  fs_->make<TH2F>("h_mapADCAmpl11secondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6341 
6343  fs_->make<TH2F>("h_mapADCAmpl12firstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6345  fs_->make<TH2F>("h_mapADCAmpl12firstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6347  fs_->make<TH2F>("h_mapADCAmpl12secondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6349  fs_->make<TH2F>("h_mapADCAmpl12secondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6350 
6351  // Ampl12 4TSs to work with "ped-Gsel0" or "led-low-intensity" to clarify gain diff peak2-peak1 fit results:
6352  h_gsmdifferencefit1_HE = fs_->make<TH1F>("h_gsmdifferencefit1_HE", " ", 80, 20., 60.);
6353  h_gsmdifferencefit2_HE = fs_->make<TH1F>("h_gsmdifferencefit2_HE", " ", 80, 20., 60.);
6354  h_gsmdifferencefit3_HE = fs_->make<TH1F>("h_gsmdifferencefit3_HE", " ", 80, 20., 60.);
6355  h_gsmdifferencefit4_HE = fs_->make<TH1F>("h_gsmdifferencefit4_HE", " ", 80, 20., 60.);
6356  h_gsmdifferencefit5_HE = fs_->make<TH1F>("h_gsmdifferencefit5_HE", " ", 80, 20., 60.);
6357  h_gsmdifferencefit6_HE = fs_->make<TH1F>("h_gsmdifferencefit6_HE", " ", 80, 20., 60.);
6358 
6359  // Aijk Amplitude:
6360  h_ADCAmpl_HE = fs_->make<TH1F>("h_ADCAmpl_HE", " ", 200, 0., 2000000.);
6361  h_ADCAmplrest_HE = fs_->make<TH1F>("h_ADCAmplrest_HE", " ", 100, 0., 500.);
6362  h_ADCAmplrest1_HE = fs_->make<TH1F>("h_ADCAmplrest1_HE", " ", 100, 0., 100.);
6363  h_ADCAmplrest6_HE = fs_->make<TH1F>("h_ADCAmplrest6_HE", " ", 100, 0., 10000.);
6364 
6365  h_ADCAmpl345_HE = fs_->make<TH1F>("h_ADCAmpl345_HE", " ", 70, 0., 700000.);
6366 
6367  // SiPM corrections:
6368  h_corrforxaMAIN_HE = fs_->make<TH1F>("h_corrforxaMAIN_HE", " ", 70, 0., 700000.);
6369  h_corrforxaMAIN0_HE = fs_->make<TH1F>("h_corrforxaMAIN0_HE", " ", 70, 0., 700000.);
6370  h_corrforxaADDI_HE = fs_->make<TH1F>("h_corrforxaADDI_HE", " ", 70, 0., 700000.);
6371  h_corrforxaADDI0_HE = fs_->make<TH1F>("h_corrforxaADDI0_HE", " ", 70, 0., 700000.);
6372 
6373  h_mapDepth1ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6374  h_mapDepth2ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6375  h_mapDepth3ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6376  h_mapDepth4ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6377  h_mapDepth5ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6378  h_mapDepth6ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6379  h_mapDepth7ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6381  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6383  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6385  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6387  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6389  fs_->make<TH2F>("h_mapDepth5ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6391  fs_->make<TH2F>("h_mapDepth6ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6393  fs_->make<TH2F>("h_mapDepth7ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6394 
6395  h_mapDepth1ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6396  h_mapDepth2ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6397  h_mapDepth3ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6398  h_mapDepth4ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6399  h_mapDepth5ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6400  h_mapDepth6ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6401  h_mapDepth7ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6402  h_mapDepth1ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth1ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6403  h_mapDepth2ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth2ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6404  h_mapDepth3ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth3ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6405 
6406  h_TSmeanA_HE = fs_->make<TH1F>("h_TSmeanA_HE", " ", 100, -2., 8.);
6407  h_mapDepth1TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6408  h_mapDepth2TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6409  h_mapDepth3TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6410  h_mapDepth4TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6411  h_mapDepth5TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth5TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6412  h_mapDepth6TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth6TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6413  h_mapDepth7TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth7TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6414  h_mapDepth1TSmeanA_HE = fs_->make<TH2F>("h_mapDepth1TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6415  h_mapDepth2TSmeanA_HE = fs_->make<TH2F>("h_mapDepth2TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6416  h_mapDepth3TSmeanA_HE = fs_->make<TH2F>("h_mapDepth3TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6417  h_mapDepth4TSmeanA_HE = fs_->make<TH2F>("h_mapDepth4TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6418  h_mapDepth5TSmeanA_HE = fs_->make<TH2F>("h_mapDepth5TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6419  h_mapDepth6TSmeanA_HE = fs_->make<TH2F>("h_mapDepth6TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6420  h_mapDepth7TSmeanA_HE = fs_->make<TH2F>("h_mapDepth7TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6421  h_TSmaxA_HE = fs_->make<TH1F>("h_TSmaxA_HE", " ", 100, -1., 11.);
6422  h_mapDepth1TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6423  h_mapDepth2TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6424  h_mapDepth3TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6425  h_mapDepth4TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6426  h_mapDepth5TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth5TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6427  h_mapDepth6TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth6TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6428  h_mapDepth7TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth7TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6429  h_mapDepth1TSmaxA_HE = fs_->make<TH2F>("h_mapDepth1TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6430  h_mapDepth2TSmaxA_HE = fs_->make<TH2F>("h_mapDepth2TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6431  h_mapDepth3TSmaxA_HE = fs_->make<TH2F>("h_mapDepth3TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6432  h_mapDepth4TSmaxA_HE = fs_->make<TH2F>("h_mapDepth4TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6433  h_mapDepth5TSmaxA_HE = fs_->make<TH2F>("h_mapDepth5TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6434  h_mapDepth6TSmaxA_HE = fs_->make<TH2F>("h_mapDepth6TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6435  h_mapDepth7TSmaxA_HE = fs_->make<TH2F>("h_mapDepth7TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6436  // RMS:
6437  h_Amplitude_HE = fs_->make<TH1F>("h_Amplitude_HE", " ", 100, 0., 5.5);
6438  h_mapDepth1Amplitude225_HE = fs_->make<TH2F>("h_mapDepth1Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6439  h_mapDepth2Amplitude225_HE = fs_->make<TH2F>("h_mapDepth2Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6440  h_mapDepth3Amplitude225_HE = fs_->make<TH2F>("h_mapDepth3Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6441  h_mapDepth4Amplitude225_HE = fs_->make<TH2F>("h_mapDepth4Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6442  h_mapDepth5Amplitude225_HE = fs_->make<TH2F>("h_mapDepth5Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6443  h_mapDepth6Amplitude225_HE = fs_->make<TH2F>("h_mapDepth6Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6444  h_mapDepth7Amplitude225_HE = fs_->make<TH2F>("h_mapDepth7Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6445  h_mapDepth1Amplitude_HE = fs_->make<TH2F>("h_mapDepth1Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6446  h_mapDepth2Amplitude_HE = fs_->make<TH2F>("h_mapDepth2Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6447  h_mapDepth3Amplitude_HE = fs_->make<TH2F>("h_mapDepth3Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6448  h_mapDepth4Amplitude_HE = fs_->make<TH2F>("h_mapDepth4Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6449  h_mapDepth5Amplitude_HE = fs_->make<TH2F>("h_mapDepth5Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6450  h_mapDepth6Amplitude_HE = fs_->make<TH2F>("h_mapDepth6Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6451  h_mapDepth7Amplitude_HE = fs_->make<TH2F>("h_mapDepth7Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6452 
6453  // Ratio:
6454  h_Ampl_HE = fs_->make<TH1F>("h_Ampl_HE", " ", 100, 0., 1.1);
6455  h_mapDepth1Ampl047_HE = fs_->make<TH2F>("h_mapDepth1Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6456  h_mapDepth2Ampl047_HE = fs_->make<TH2F>("h_mapDepth2Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6457  h_mapDepth3Ampl047_HE = fs_->make<TH2F>("h_mapDepth3Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6458  h_mapDepth4Ampl047_HE = fs_->make<TH2F>("h_mapDepth4Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6459  h_mapDepth5Ampl047_HE = fs_->make<TH2F>("h_mapDepth5Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6460  h_mapDepth6Ampl047_HE = fs_->make<TH2F>("h_mapDepth6Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6461  h_mapDepth7Ampl047_HE = fs_->make<TH2F>("h_mapDepth7Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6462  h_mapDepth1Ampl_HE = fs_->make<TH2F>("h_mapDepth1Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6463  h_mapDepth2Ampl_HE = fs_->make<TH2F>("h_mapDepth2Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6464  h_mapDepth3Ampl_HE = fs_->make<TH2F>("h_mapDepth3Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6465  h_mapDepth4Ampl_HE = fs_->make<TH2F>("h_mapDepth4Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6466  h_mapDepth5Ampl_HE = fs_->make<TH2F>("h_mapDepth5Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6467  h_mapDepth6Ampl_HE = fs_->make<TH2F>("h_mapDepth6Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6468  h_mapDepth7Ampl_HE = fs_->make<TH2F>("h_mapDepth7Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6469  h_mapDepth1AmplE34_HE = fs_->make<TH2F>("h_mapDepth1AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6470  h_mapDepth2AmplE34_HE = fs_->make<TH2F>("h_mapDepth2AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6471  h_mapDepth3AmplE34_HE = fs_->make<TH2F>("h_mapDepth3AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6472  h_mapDepth4AmplE34_HE = fs_->make<TH2F>("h_mapDepth4AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6473  h_mapDepth5AmplE34_HE = fs_->make<TH2F>("h_mapDepth5AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6474  h_mapDepth6AmplE34_HE = fs_->make<TH2F>("h_mapDepth6AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6475  h_mapDepth7AmplE34_HE = fs_->make<TH2F>("h_mapDepth7AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6476  h_mapDepth1_HE = fs_->make<TH2F>("h_mapDepth1_HE", " ", neta, -41., 41., nphi, 0., bphi);
6477  h_mapDepth2_HE = fs_->make<TH2F>("h_mapDepth2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6478  h_mapDepth3_HE = fs_->make<TH2F>("h_mapDepth3_HE", " ", neta, -41., 41., nphi, 0., bphi);
6479  h_mapDepth4_HE = fs_->make<TH2F>("h_mapDepth4_HE", " ", neta, -41., 41., nphi, 0., bphi);
6480  h_mapDepth5_HE = fs_->make<TH2F>("h_mapDepth5_HE", " ", neta, -41., 41., nphi, 0., bphi);
6481  h_mapDepth6_HE = fs_->make<TH2F>("h_mapDepth6_HE", " ", neta, -41., 41., nphi, 0., bphi);
6482  h_mapDepth7_HE = fs_->make<TH2F>("h_mapDepth7_HE", " ", neta, -41., 41., nphi, 0., bphi);
6484  h_mapenophinorm_HE1 = fs_->make<TH2F>("h_mapenophinorm_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6485  h_mapenophinorm_HE2 = fs_->make<TH2F>("h_mapenophinorm_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6486  h_mapenophinorm_HE3 = fs_->make<TH2F>("h_mapenophinorm_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6487  h_mapenophinorm_HE4 = fs_->make<TH2F>("h_mapenophinorm_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6488  h_mapenophinorm_HE5 = fs_->make<TH2F>("h_mapenophinorm_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6489  h_mapenophinorm_HE6 = fs_->make<TH2F>("h_mapenophinorm_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6490  h_mapenophinorm_HE7 = fs_->make<TH2F>("h_mapenophinorm_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6491  h_mapenophinorm2_HE1 = fs_->make<TH2F>("h_mapenophinorm2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6492  h_mapenophinorm2_HE2 = fs_->make<TH2F>("h_mapenophinorm2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6493  h_mapenophinorm2_HE3 = fs_->make<TH2F>("h_mapenophinorm2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6494  h_mapenophinorm2_HE4 = fs_->make<TH2F>("h_mapenophinorm2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6495  h_mapenophinorm2_HE5 = fs_->make<TH2F>("h_mapenophinorm2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6496  h_mapenophinorm2_HE6 = fs_->make<TH2F>("h_mapenophinorm2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6497  h_mapenophinorm2_HE7 = fs_->make<TH2F>("h_mapenophinorm2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6498 
6499  h_maprphinorm_HE1 = fs_->make<TH2F>("h_maprphinorm_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6500  h_maprphinorm_HE2 = fs_->make<TH2F>("h_maprphinorm_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6501  h_maprphinorm_HE3 = fs_->make<TH2F>("h_maprphinorm_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6502  h_maprphinorm_HE4 = fs_->make<TH2F>("h_maprphinorm_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6503  h_maprphinorm_HE5 = fs_->make<TH2F>("h_maprphinorm_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6504  h_maprphinorm_HE6 = fs_->make<TH2F>("h_maprphinorm_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6505  h_maprphinorm_HE7 = fs_->make<TH2F>("h_maprphinorm_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6506  h_maprphinorm2_HE1 = fs_->make<TH2F>("h_maprphinorm2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6507  h_maprphinorm2_HE2 = fs_->make<TH2F>("h_maprphinorm2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6508  h_maprphinorm2_HE3 = fs_->make<TH2F>("h_maprphinorm2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6509  h_maprphinorm2_HE4 = fs_->make<TH2F>("h_maprphinorm2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6510  h_maprphinorm2_HE5 = fs_->make<TH2F>("h_maprphinorm2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6511  h_maprphinorm2_HE6 = fs_->make<TH2F>("h_maprphinorm2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6512  h_maprphinorm2_HE7 = fs_->make<TH2F>("h_maprphinorm2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6513 
6514  h_maprphinorm0_HE1 = fs_->make<TH2F>("h_maprphinorm0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6515  h_maprphinorm0_HE2 = fs_->make<TH2F>("h_maprphinorm0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6516  h_maprphinorm0_HE3 = fs_->make<TH2F>("h_maprphinorm0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6517  h_maprphinorm0_HE4 = fs_->make<TH2F>("h_maprphinorm0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6518  h_maprphinorm0_HE5 = fs_->make<TH2F>("h_maprphinorm0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6519  h_maprphinorm0_HE6 = fs_->make<TH2F>("h_maprphinorm0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6520  h_maprphinorm0_HE7 = fs_->make<TH2F>("h_maprphinorm0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6521 
6522  //
6523  // Didi as done in Reco
6524  //HB:
6525  h_amplitudechannel0_HB1 = fs_->make<TH2F>("h_amplitudechannel0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6526  h_amplitudechannel1_HB1 = fs_->make<TH2F>("h_amplitudechannel1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6527  h_amplitudechannel2_HB1 = fs_->make<TH2F>("h_amplitudechannel2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6528  h_amplitudechannel0_HB2 = fs_->make<TH2F>("h_amplitudechannel0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6529  h_amplitudechannel1_HB2 = fs_->make<TH2F>("h_amplitudechannel1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6530  h_amplitudechannel2_HB2 = fs_->make<TH2F>("h_amplitudechannel2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6531  h_amplitudechannel0_HB3 = fs_->make<TH2F>("h_amplitudechannel0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6532  h_amplitudechannel1_HB3 = fs_->make<TH2F>("h_amplitudechannel1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6533  h_amplitudechannel2_HB3 = fs_->make<TH2F>("h_amplitudechannel2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6534  h_amplitudechannel0_HB4 = fs_->make<TH2F>("h_amplitudechannel0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6535  h_amplitudechannel1_HB4 = fs_->make<TH2F>("h_amplitudechannel1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6536  h_amplitudechannel2_HB4 = fs_->make<TH2F>("h_amplitudechannel2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6537  //HE:
6538  h_amplitudechannel0_HE1 = fs_->make<TH2F>("h_amplitudechannel0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6539  h_amplitudechannel1_HE1 = fs_->make<TH2F>("h_amplitudechannel1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6540  h_amplitudechannel2_HE1 = fs_->make<TH2F>("h_amplitudechannel2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6541  h_amplitudechannel0_HE2 = fs_->make<TH2F>("h_amplitudechannel0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6542  h_amplitudechannel1_HE2 = fs_->make<TH2F>("h_amplitudechannel1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6543  h_amplitudechannel2_HE2 = fs_->make<TH2F>("h_amplitudechannel2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6544  h_amplitudechannel0_HE3 = fs_->make<TH2F>("h_amplitudechannel0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6545  h_amplitudechannel1_HE3 = fs_->make<TH2F>("h_amplitudechannel1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6546  h_amplitudechannel2_HE3 = fs_->make<TH2F>("h_amplitudechannel2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6547  h_amplitudechannel0_HE4 = fs_->make<TH2F>("h_amplitudechannel0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6548  h_amplitudechannel1_HE4 = fs_->make<TH2F>("h_amplitudechannel1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6549  h_amplitudechannel2_HE4 = fs_->make<TH2F>("h_amplitudechannel2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6550  h_amplitudechannel0_HE5 = fs_->make<TH2F>("h_amplitudechannel0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6551  h_amplitudechannel1_HE5 = fs_->make<TH2F>("h_amplitudechannel1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6552  h_amplitudechannel2_HE5 = fs_->make<TH2F>("h_amplitudechannel2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6553  h_amplitudechannel0_HE6 = fs_->make<TH2F>("h_amplitudechannel0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6554  h_amplitudechannel1_HE6 = fs_->make<TH2F>("h_amplitudechannel1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6555  h_amplitudechannel2_HE6 = fs_->make<TH2F>("h_amplitudechannel2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6556  h_amplitudechannel0_HE7 = fs_->make<TH2F>("h_amplitudechannel0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6557  h_amplitudechannel1_HE7 = fs_->make<TH2F>("h_amplitudechannel1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6558  h_amplitudechannel2_HE7 = fs_->make<TH2F>("h_amplitudechannel2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6559  //HF:
6560  h_amplitudechannel0_HF1 = fs_->make<TH2F>("h_amplitudechannel0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6561  h_amplitudechannel1_HF1 = fs_->make<TH2F>("h_amplitudechannel1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6562  h_amplitudechannel2_HF1 = fs_->make<TH2F>("h_amplitudechannel2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6563  h_amplitudechannel0_HF2 = fs_->make<TH2F>("h_amplitudechannel0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6564  h_amplitudechannel1_HF2 = fs_->make<TH2F>("h_amplitudechannel1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6565  h_amplitudechannel2_HF2 = fs_->make<TH2F>("h_amplitudechannel2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6566  h_amplitudechannel0_HF3 = fs_->make<TH2F>("h_amplitudechannel0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6567  h_amplitudechannel1_HF3 = fs_->make<TH2F>("h_amplitudechannel1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6568  h_amplitudechannel2_HF3 = fs_->make<TH2F>("h_amplitudechannel2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6569  h_amplitudechannel0_HF4 = fs_->make<TH2F>("h_amplitudechannel0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6570  h_amplitudechannel1_HF4 = fs_->make<TH2F>("h_amplitudechannel1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6571  h_amplitudechannel2_HF4 = fs_->make<TH2F>("h_amplitudechannel2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6572 
6573  // Reco
6574  h_energyhitSignal_HB = fs_->make<TH1F>("h_energyhitSignal_HB", " ", npfit, -0.22, 0.22);
6575  h_energyhitSignal_HE = fs_->make<TH1F>("h_energyhitSignal_HE", " ", npfit, -0.22, 0.22);
6576  h_energyhitSignal_HF = fs_->make<TH1F>("h_energyhitSignal_HF", " ", npfit, -6.6, 6.6);
6577  h_energyhitNoise_HB = fs_->make<TH1F>("h_energyhitNoise_HB", " ", npfit, -0.22, 0.22);
6578  h_energyhitNoise_HE = fs_->make<TH1F>("h_energyhitNoise_HE", " ", npfit, -0.22, 0.22);
6579  h_energyhitNoise_HF = fs_->make<TH1F>("h_energyhitNoise_HF", " ", npfit, -4.4, 4.4);
6580 
6581  //HB:
6582  h_recSignalEnergy0_HB1 = fs_->make<TH2F>("h_recSignalEnergy0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6583  h_recSignalEnergy1_HB1 = fs_->make<TH2F>("h_recSignalEnergy1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6584  h_recSignalEnergy2_HB1 = fs_->make<TH2F>("h_recSignalEnergy2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6585  h_recSignalEnergy0_HB2 = fs_->make<TH2F>("h_recSignalEnergy0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6586  h_recSignalEnergy1_HB2 = fs_->make<TH2F>("h_recSignalEnergy1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6587  h_recSignalEnergy2_HB2 = fs_->make<TH2F>("h_recSignalEnergy2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6588  h_recSignalEnergy0_HB3 = fs_->make<TH2F>("h_recSignalEnergy0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6589  h_recSignalEnergy1_HB3 = fs_->make<TH2F>("h_recSignalEnergy1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6590  h_recSignalEnergy2_HB3 = fs_->make<TH2F>("h_recSignalEnergy2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6591  h_recSignalEnergy0_HB4 = fs_->make<TH2F>("h_recSignalEnergy0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6592  h_recSignalEnergy1_HB4 = fs_->make<TH2F>("h_recSignalEnergy1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6593  h_recSignalEnergy2_HB4 = fs_->make<TH2F>("h_recSignalEnergy2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6594 
6595  h_recNoiseEnergy0_HB1 = fs_->make<TH2F>("h_recNoiseEnergy0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6596  h_recNoiseEnergy1_HB1 = fs_->make<TH2F>("h_recNoiseEnergy1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6597  h_recNoiseEnergy2_HB1 = fs_->make<TH2F>("h_recNoiseEnergy2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6598  h_recNoiseEnergy0_HB2 = fs_->make<TH2F>("h_recNoiseEnergy0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6599  h_recNoiseEnergy1_HB2 = fs_->make<TH2F>("h_recNoiseEnergy1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6600  h_recNoiseEnergy2_HB2 = fs_->make<TH2F>("h_recNoiseEnergy2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6601  h_recNoiseEnergy0_HB3 = fs_->make<TH2F>("h_recNoiseEnergy0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6602  h_recNoiseEnergy1_HB3 = fs_->make<TH2F>("h_recNoiseEnergy1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6603  h_recNoiseEnergy2_HB3 = fs_->make<TH2F>("h_recNoiseEnergy2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6604  h_recNoiseEnergy0_HB4 = fs_->make<TH2F>("h_recNoiseEnergy0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6605  h_recNoiseEnergy1_HB4 = fs_->make<TH2F>("h_recNoiseEnergy1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6606  h_recNoiseEnergy2_HB4 = fs_->make<TH2F>("h_recNoiseEnergy2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6607 
6608  //HE:
6609  h_recSignalEnergy0_HE1 = fs_->make<TH2F>("h_recSignalEnergy0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6610  h_recSignalEnergy1_HE1 = fs_->make<TH2F>("h_recSignalEnergy1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6611  h_recSignalEnergy2_HE1 = fs_->make<TH2F>("h_recSignalEnergy2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6612  h_recSignalEnergy0_HE2 = fs_->make<TH2F>("h_recSignalEnergy0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6613  h_recSignalEnergy1_HE2 = fs_->make<TH2F>("h_recSignalEnergy1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6614  h_recSignalEnergy2_HE2 = fs_->make<TH2F>("h_recSignalEnergy2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6615  h_recSignalEnergy0_HE3 = fs_->make<TH2F>("h_recSignalEnergy0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6616  h_recSignalEnergy1_HE3 = fs_->make<TH2F>("h_recSignalEnergy1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6617  h_recSignalEnergy2_HE3 = fs_->make<TH2F>("h_recSignalEnergy2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6618  h_recSignalEnergy0_HE4 = fs_->make<TH2F>("h_recSignalEnergy0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6619  h_recSignalEnergy1_HE4 = fs_->make<TH2F>("h_recSignalEnergy1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6620  h_recSignalEnergy2_HE4 = fs_->make<TH2F>("h_recSignalEnergy2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6621  h_recSignalEnergy0_HE5 = fs_->make<TH2F>("h_recSignalEnergy0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6622  h_recSignalEnergy1_HE5 = fs_->make<TH2F>("h_recSignalEnergy1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6623  h_recSignalEnergy2_HE5 = fs_->make<TH2F>("h_recSignalEnergy2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6624  h_recSignalEnergy0_HE6 = fs_->make<TH2F>("h_recSignalEnergy0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6625  h_recSignalEnergy1_HE6 = fs_->make<TH2F>("h_recSignalEnergy1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6626  h_recSignalEnergy2_HE6 = fs_->make<TH2F>("h_recSignalEnergy2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6627  h_recSignalEnergy0_HE7 = fs_->make<TH2F>("h_recSignalEnergy0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6628  h_recSignalEnergy1_HE7 = fs_->make<TH2F>("h_recSignalEnergy1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6629  h_recSignalEnergy2_HE7 = fs_->make<TH2F>("h_recSignalEnergy2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6630 
6631  h_recNoiseEnergy0_HE1 = fs_->make<TH2F>("h_recNoiseEnergy0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6632  h_recNoiseEnergy1_HE1 = fs_->make<TH2F>("h_recNoiseEnergy1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6633  h_recNoiseEnergy2_HE1 = fs_->make<TH2F>("h_recNoiseEnergy2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6634  h_recNoiseEnergy0_HE2 = fs_->make<TH2F>("h_recNoiseEnergy0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6635  h_recNoiseEnergy1_HE2 = fs_->make<TH2F>("h_recNoiseEnergy1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6636  h_recNoiseEnergy2_HE2 = fs_->make<TH2F>("h_recNoiseEnergy2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6637  h_recNoiseEnergy0_HE3 = fs_->make<TH2F>("h_recNoiseEnergy0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6638  h_recNoiseEnergy1_HE3 = fs_->make<TH2F>("h_recNoiseEnergy1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6639  h_recNoiseEnergy2_HE3 = fs_->make<TH2F>("h_recNoiseEnergy2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6640  h_recNoiseEnergy0_HE4 = fs_->make<TH2F>("h_recNoiseEnergy0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6641  h_recNoiseEnergy1_HE4 = fs_->make<TH2F>("h_recNoiseEnergy1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6642  h_recNoiseEnergy2_HE4 = fs_->make<TH2F>("h_recNoiseEnergy2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6643  h_recNoiseEnergy0_HE5 = fs_->make<TH2F>("h_recNoiseEnergy0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6644  h_recNoiseEnergy1_HE5 = fs_->make<TH2F>("h_recNoiseEnergy1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6645  h_recNoiseEnergy2_HE5 = fs_->make<TH2F>("h_recNoiseEnergy2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6646  h_recNoiseEnergy0_HE6 = fs_->make<TH2F>("h_recNoiseEnergy0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6647  h_recNoiseEnergy1_HE6 = fs_->make<TH2F>("h_recNoiseEnergy1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6648  h_recNoiseEnergy2_HE6 = fs_->make<TH2F>("h_recNoiseEnergy2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6649  h_recNoiseEnergy0_HE7 = fs_->make<TH2F>("h_recNoiseEnergy0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6650  h_recNoiseEnergy1_HE7 = fs_->make<TH2F>("h_recNoiseEnergy1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6651  h_recNoiseEnergy2_HE7 = fs_->make<TH2F>("h_recNoiseEnergy2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6652 
6653  //HF:
6654  h_recSignalEnergy0_HF1 = fs_->make<TH2F>("h_recSignalEnergy0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6655  h_recSignalEnergy1_HF1 = fs_->make<TH2F>("h_recSignalEnergy1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6656  h_recSignalEnergy2_HF1 = fs_->make<TH2F>("h_recSignalEnergy2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6657  h_recSignalEnergy0_HF2 = fs_->make<TH2F>("h_recSignalEnergy0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6658  h_recSignalEnergy1_HF2 = fs_->make<TH2F>("h_recSignalEnergy1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6659  h_recSignalEnergy2_HF2 = fs_->make<TH2F>("h_recSignalEnergy2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6660 
6661  h_recNoiseEnergy0_HF1 = fs_->make<TH2F>("h_recNoiseEnergy0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6662  h_recNoiseEnergy1_HF1 = fs_->make<TH2F>("h_recNoiseEnergy1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6663  h_recNoiseEnergy2_HF1 = fs_->make<TH2F>("h_recNoiseEnergy2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6664  h_recNoiseEnergy0_HF2 = fs_->make<TH2F>("h_recNoiseEnergy0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6665  h_recNoiseEnergy1_HF2 = fs_->make<TH2F>("h_recNoiseEnergy1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6666  h_recNoiseEnergy2_HF2 = fs_->make<TH2F>("h_recNoiseEnergy2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6667 
6669  // RADDAM:
6670  // if(flagLaserRaddam_ == 1 ) {
6671  // }
6672  int min80 = -100.;
6673  int max80 = 9000.;
6674  // fill for each digi (=each event, each channel)
6675  h_mapDepth1RADDAM_HE = fs_->make<TH2F>("h_mapDepth1RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6676  h_mapDepth2RADDAM_HE = fs_->make<TH2F>("h_mapDepth2RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6677  h_mapDepth3RADDAM_HE = fs_->make<TH2F>("h_mapDepth3RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6678  h_mapDepth1RADDAM0_HE = fs_->make<TH2F>("h_mapDepth1RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6679  h_mapDepth2RADDAM0_HE = fs_->make<TH2F>("h_mapDepth2RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6680  h_mapDepth3RADDAM0_HE = fs_->make<TH2F>("h_mapDepth3RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6681 
6682  h_sigLayer1RADDAM_HE = fs_->make<TH1F>("h_sigLayer1RADDAM_HE", " ", neta, -41., 41.);
6683  h_sigLayer2RADDAM_HE = fs_->make<TH1F>("h_sigLayer2RADDAM_HE", " ", neta, -41., 41.);
6684  h_sigLayer1RADDAM0_HE = fs_->make<TH1F>("h_sigLayer1RADDAM0_HE", " ", neta, -41., 41.);
6685  h_sigLayer2RADDAM0_HE = fs_->make<TH1F>("h_sigLayer2RADDAM0_HE", " ", neta, -41., 41.);
6686  h_AamplitudewithPedSubtr_RADDAM_HE = fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HE", " ", 100, min80, max80);
6688  fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HEzoom0", " ", 100, min80, 4000.);
6690  fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HEzoom1", " ", 100, min80, 1000.);
6691  h_mapDepth3RADDAM16_HE = fs_->make<TH1F>("h_mapDepth3RADDAM16_HE", " ", 100, min80, max80);
6692  h_A_Depth1RADDAM_HE = fs_->make<TH1F>("h_A_Depth1RADDAM_HE", " ", 100, min80, max80);
6693  h_A_Depth2RADDAM_HE = fs_->make<TH1F>("h_A_Depth2RADDAM_HE", " ", 100, min80, max80);
6694  h_A_Depth3RADDAM_HE = fs_->make<TH1F>("h_A_Depth3RADDAM_HE", " ", 100, min80, max80);
6695  int min90 = 0.;
6696  int max90 = 5000.;
6697  h_sumphiEta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2", " ", 100, min90, 70. * max90);
6698  h_Eta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2", " ", 100, min90, max90);
6699  h_NphiForEta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2", " ", 100, 0, 100.);
6700  h_sumphiEta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2P", " ", 100, min90, 70. * max90);
6701  h_Eta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2P", " ", 100, min90, max90);
6702  h_NphiForEta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2P", " ", 100, 0, 100.);
6704  fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2ALL", " ", 100, min90, 70. * max90);
6705  h_Eta16Depth3RADDAM_HED2ALL = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2ALL", " ", 100, min90, max90);
6706  h_NphiForEta16Depth3RADDAM_HED2ALL = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2ALL", " ", 100, 0, 100.);
6707  h_sigLayer1RADDAM5_HE = fs_->make<TH1F>("h_sigLayer1RADDAM5_HE", " ", neta, -41., 41.);
6708  h_sigLayer2RADDAM5_HE = fs_->make<TH1F>("h_sigLayer2RADDAM5_HE", " ", neta, -41., 41.);
6709  h_sigLayer1RADDAM6_HE = fs_->make<TH1F>("h_sigLayer1RADDAM6_HE", " ", neta, -41., 41.);
6710  h_sigLayer2RADDAM6_HE = fs_->make<TH1F>("h_sigLayer2RADDAM6_HE", " ", neta, -41., 41.);
6711  h_sigLayer1RADDAM5_HED2 = fs_->make<TH1F>("h_sigLayer1RADDAM5_HED2", " ", neta, -41., 41.);
6712  h_sigLayer2RADDAM5_HED2 = fs_->make<TH1F>("h_sigLayer2RADDAM5_HED2", " ", neta, -41., 41.);
6713  h_sigLayer1RADDAM6_HED2 = fs_->make<TH1F>("h_sigLayer1RADDAM6_HED2", " ", neta, -41., 41.);
6714  h_sigLayer2RADDAM6_HED2 = fs_->make<TH1F>("h_sigLayer2RADDAM6_HED2", " ", neta, -41., 41.);
6715 
6716  h_numberofhitsHFtest = fs_->make<TH1F>("h_numberofhitsHFtest", " ", 100, 0., 30000.);
6717  h_AmplitudeHFtest = fs_->make<TH1F>("h_AmplitudeHFtest", " ", 100, 0., 300000.);
6718  h_totalAmplitudeHF = fs_->make<TH1F>("h_totalAmplitudeHF", " ", 100, 0., 100000000000.);
6719  h_totalAmplitudeHFperEvent = fs_->make<TH1F>("h_totalAmplitudeHFperEvent", " ", 1000, 1., 1001.);
6720  // fullAmplitude:
6721  h_ADCAmplZoom1_HF = fs_->make<TH1F>("h_ADCAmplZoom1_HF", " ", 100, 0., 1000000.);
6722  h_ADCAmpl_HF = fs_->make<TH1F>("h_ADCAmpl_HF", " ", 250, 0., 500000.);
6723  h_ADCAmplrest1_HF = fs_->make<TH1F>("h_ADCAmplrest1_HF", " ", 100, 0., 1000.);
6724  h_ADCAmplrest6_HF = fs_->make<TH1F>("h_ADCAmplrest6_HF", " ", 100, 0., 10000.);
6725 
6726  h_mapDepth1ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6727  h_mapDepth2ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6729  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6731  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6732  h_mapDepth1ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6733  h_mapDepth2ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6734  h_mapDepth3ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6735  h_mapDepth4ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6737  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6739  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6740  h_mapDepth3ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6741  h_mapDepth4ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6742  h_TSmeanA_HF = fs_->make<TH1F>("h_TSmeanA_HF", " ", 100, -1., 11.);
6743  h_mapDepth1TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6744  h_mapDepth2TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6745  h_mapDepth1TSmeanA_HF = fs_->make<TH2F>("h_mapDepth1TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6746  h_mapDepth2TSmeanA_HF = fs_->make<TH2F>("h_mapDepth2TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6747  h_mapDepth3TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6748  h_mapDepth4TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6749  h_mapDepth3TSmeanA_HF = fs_->make<TH2F>("h_mapDepth3TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6750  h_mapDepth4TSmeanA_HF = fs_->make<TH2F>("h_mapDepth4TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6751  h_Amplitude_HF = fs_->make<TH1F>("h_Amplitude_HF", " ", 100, 0., 5.);
6752  h_TSmaxA_HF = fs_->make<TH1F>("h_TSmaxA_HF", " ", 100, -1., 11.);
6753  h_mapDepth1TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6754  h_mapDepth2TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6755  h_mapDepth1TSmaxA_HF = fs_->make<TH2F>("h_mapDepth1TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6756  h_mapDepth2TSmaxA_HF = fs_->make<TH2F>("h_mapDepth2TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6757  h_mapDepth3TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6758  h_mapDepth4TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6759  h_mapDepth3TSmaxA_HF = fs_->make<TH2F>("h_mapDepth3TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6760  h_mapDepth4TSmaxA_HF = fs_->make<TH2F>("h_mapDepth4TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6761  h_Amplitude_HF = fs_->make<TH1F>("h_Amplitude_HF", " ", 100, 0., 5.);
6762  h_mapDepth1Amplitude225_HF = fs_->make<TH2F>("h_mapDepth1Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6763  h_mapDepth2Amplitude225_HF = fs_->make<TH2F>("h_mapDepth2Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6764  h_mapDepth1Amplitude_HF = fs_->make<TH2F>("h_mapDepth1Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6765  h_mapDepth2Amplitude_HF = fs_->make<TH2F>("h_mapDepth2Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6766  h_mapDepth3Amplitude225_HF = fs_->make<TH2F>("h_mapDepth3Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6767  h_mapDepth4Amplitude225_HF = fs_->make<TH2F>("h_mapDepth4Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6768  h_mapDepth3Amplitude_HF = fs_->make<TH2F>("h_mapDepth3Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6769  h_mapDepth4Amplitude_HF = fs_->make<TH2F>("h_mapDepth4Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6770  // Ratio:
6771  h_Ampl_HF = fs_->make<TH1F>("h_Ampl_HF", " ", 100, 0., 1.1);
6772  h_mapDepth1Ampl047_HF = fs_->make<TH2F>("h_mapDepth1Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6773  h_mapDepth2Ampl047_HF = fs_->make<TH2F>("h_mapDepth2Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6774  h_mapDepth1Ampl_HF = fs_->make<TH2F>("h_mapDepth1Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6775  h_mapDepth2Ampl_HF = fs_->make<TH2F>("h_mapDepth2Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6776  h_mapDepth1AmplE34_HF = fs_->make<TH2F>("h_mapDepth1AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6777  h_mapDepth2AmplE34_HF = fs_->make<TH2F>("h_mapDepth2AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6778  h_mapDepth1_HF = fs_->make<TH2F>("h_mapDepth1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6779  h_mapDepth2_HF = fs_->make<TH2F>("h_mapDepth2_HF", " ", neta, -41., 41., nphi, 0., bphi);
6780  h_mapDepth3Ampl047_HF = fs_->make<TH2F>("h_mapDepth3Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6781  h_mapDepth4Ampl047_HF = fs_->make<TH2F>("h_mapDepth4Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6782  h_mapDepth3Ampl_HF = fs_->make<TH2F>("h_mapDepth3Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6783  h_mapDepth4Ampl_HF = fs_->make<TH2F>("h_mapDepth4Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6784  h_mapDepth3AmplE34_HF = fs_->make<TH2F>("h_mapDepth3AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6785  h_mapDepth4AmplE34_HF = fs_->make<TH2F>("h_mapDepth4AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6786  h_mapDepth3_HF = fs_->make<TH2F>("h_mapDepth3_HF", " ", neta, -41., 41., nphi, 0., bphi);
6787  h_mapDepth4_HF = fs_->make<TH2F>("h_mapDepth4_HF", " ", neta, -41., 41., nphi, 0., bphi);
6788 
6790  h_numberofhitsHOtest = fs_->make<TH1F>("h_numberofhitsHOtest", " ", 100, 0., 30000.);
6791  h_AmplitudeHOtest = fs_->make<TH1F>("h_AmplitudeHOtest", " ", 100, 0., 300000.);
6792  h_totalAmplitudeHO = fs_->make<TH1F>("h_totalAmplitudeHO", " ", 100, 0., 100000000.);
6793  h_totalAmplitudeHOperEvent = fs_->make<TH1F>("h_totalAmplitudeHOperEvent", " ", 1000, 1., 1001.);
6794  // fullAmplitude:
6795  h_ADCAmpl_HO = fs_->make<TH1F>("h_ADCAmpl_HO", " ", 100, 0., 7000.);
6796  h_ADCAmplrest1_HO = fs_->make<TH1F>("h_ADCAmplrest1_HO", " ", 100, 0., 150.);
6797  h_ADCAmplrest6_HO = fs_->make<TH1F>("h_ADCAmplrest6_HO", " ", 100, 0., 500.);
6798 
6799  h_ADCAmplZoom1_HO = fs_->make<TH1F>("h_ADCAmplZoom1_HO", " ", 100, -20., 280.);
6800  h_ADCAmpl_HO_copy = fs_->make<TH1F>("h_ADCAmpl_HO_copy", " ", 100, 0., 30000.);
6801  h_mapDepth4ADCAmpl225_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6803  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HO", " ", neta, -41., 41., nphi, 0., bphi);
6804  h_mapDepth4ADCAmpl_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HO", " ", neta, -41., 41., nphi, 0., bphi);
6805  h_TSmeanA_HO = fs_->make<TH1F>("h_TSmeanA_HO", " ", 100, 0., 10.);
6806  h_mapDepth4TSmeanA225_HO = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6807  h_mapDepth4TSmeanA_HO = fs_->make<TH2F>("h_mapDepth4TSmeanA_HO", " ", neta, -41., 41., nphi, 0., bphi);
6808  h_TSmaxA_HO = fs_->make<TH1F>("h_TSmaxA_HO", " ", 100, 0., 10.);
6809  h_mapDepth4TSmaxA225_HO = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6810  h_mapDepth4TSmaxA_HO = fs_->make<TH2F>("h_mapDepth4TSmaxA_HO", " ", neta, -41., 41., nphi, 0., bphi);
6811  h_Amplitude_HO = fs_->make<TH1F>("h_Amplitude_HO", " ", 100, 0., 5.);
6812  h_mapDepth4Amplitude225_HO = fs_->make<TH2F>("h_mapDepth4Amplitude225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6813  h_mapDepth4Amplitude_HO = fs_->make<TH2F>("h_mapDepth4Amplitude_HO", " ", neta, -41., 41., nphi, 0., bphi);
6814  // Ratio:
6815  h_Ampl_HO = fs_->make<TH1F>("h_Ampl_HO", " ", 100, 0., 1.1);
6816  h_mapDepth4Ampl047_HO = fs_->make<TH2F>("h_mapDepth4Ampl047_HO", " ", neta, -41., 41., nphi, 0., bphi);
6817  h_mapDepth4Ampl_HO = fs_->make<TH2F>("h_mapDepth4Ampl_HO", " ", neta, -41., 41., nphi, 0., bphi);
6818  h_mapDepth4AmplE34_HO = fs_->make<TH2F>("h_mapDepth4AmplE34_HO", " ", neta, -41., 41., nphi, 0., bphi);
6819  h_mapDepth4_HO = fs_->make<TH2F>("h_mapDepth4_HO", " ", neta, -41., 41., nphi, 0., bphi);
6820 
6822  int baP = 4000;
6823  float baR = 0.;
6824  float baR2 = baP;
6825  h_bcnnbadchannels_depth1_HB = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HB", " ", baP, baR, baR2);
6826  h_bcnnbadchannels_depth2_HB = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HB", " ", baP, baR, baR2);
6827  h_bcnnbadchannels_depth1_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HE", " ", baP, baR, baR2);
6828  h_bcnnbadchannels_depth2_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HE", " ", baP, baR, baR2);
6829  h_bcnnbadchannels_depth3_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth3_HE", " ", baP, baR, baR2);
6830  h_bcnnbadchannels_depth4_HO = fs_->make<TH1F>("h_bcnnbadchannels_depth4_HO", " ", baP, baR, baR2);
6831  h_bcnnbadchannels_depth1_HF = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HF", " ", baP, baR, baR2);
6832  h_bcnnbadchannels_depth2_HF = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HF", " ", baP, baR, baR2);
6833  h_bcnbadrate0_depth1_HB = fs_->make<TH1F>("h_bcnbadrate0_depth1_HB", " ", baP, baR, baR2);
6834  h_bcnbadrate0_depth2_HB = fs_->make<TH1F>("h_bcnbadrate0_depth2_HB", " ", baP, baR, baR2);
6835  h_bcnbadrate0_depth1_HE = fs_->make<TH1F>("h_bcnbadrate0_depth1_HE", " ", baP, baR, baR2);
6836  h_bcnbadrate0_depth2_HE = fs_->make<TH1F>("h_bcnbadrate0_depth2_HE", " ", baP, baR, baR2);
6837  h_bcnbadrate0_depth3_HE = fs_->make<TH1F>("h_bcnbadrate0_depth3_HE", " ", baP, baR, baR2);
6838  h_bcnbadrate0_depth4_HO = fs_->make<TH1F>("h_bcnbadrate0_depth4_HO", " ", baP, baR, baR2);
6839  h_bcnbadrate0_depth1_HF = fs_->make<TH1F>("h_bcnbadrate0_depth1_HF", " ", baP, baR, baR2);
6840  h_bcnbadrate0_depth2_HF = fs_->make<TH1F>("h_bcnbadrate0_depth2_HF", " ", baP, baR, baR2);
6841 
6842  h_bcnvsamplitude_HB = fs_->make<TH1F>("h_bcnvsamplitude_HB", " ", baP, baR, baR2);
6843  h_bcnvsamplitude_HE = fs_->make<TH1F>("h_bcnvsamplitude_HE", " ", baP, baR, baR2);
6844  h_bcnvsamplitude_HF = fs_->make<TH1F>("h_bcnvsamplitude_HF", " ", baP, baR, baR2);
6845  h_bcnvsamplitude_HO = fs_->make<TH1F>("h_bcnvsamplitude_HO", " ", baP, baR, baR2);
6846  h_bcnvsamplitude0_HB = fs_->make<TH1F>("h_bcnvsamplitude0_HB", " ", baP, baR, baR2);
6847  h_bcnvsamplitude0_HE = fs_->make<TH1F>("h_bcnvsamplitude0_HE", " ", baP, baR, baR2);
6848  h_bcnvsamplitude0_HF = fs_->make<TH1F>("h_bcnvsamplitude0_HF", " ", baP, baR, baR2);
6849  h_bcnvsamplitude0_HO = fs_->make<TH1F>("h_bcnvsamplitude0_HO", " ", baP, baR, baR2);
6850 
6851  int zaP = 1000;
6852  float zaR = 10000000.;
6853  float zaR2 = 50000000.;
6854  h_orbitNumvsamplitude_HB = fs_->make<TH1F>("h_orbitNumvsamplitude_HB", " ", zaP, zaR, zaR2);
6855  h_orbitNumvsamplitude_HE = fs_->make<TH1F>("h_orbitNumvsamplitude_HE", " ", zaP, zaR, zaR2);
6856  h_orbitNumvsamplitude_HF = fs_->make<TH1F>("h_orbitNumvsamplitude_HF", " ", zaP, zaR, zaR2);
6857  h_orbitNumvsamplitude_HO = fs_->make<TH1F>("h_orbitNumvsamplitude_HO", " ", zaP, zaR, zaR2);
6858  h_orbitNumvsamplitude0_HB = fs_->make<TH1F>("h_orbitNumvsamplitude0_HB", " ", zaP, zaR, zaR2);
6859  h_orbitNumvsamplitude0_HE = fs_->make<TH1F>("h_orbitNumvsamplitude0_HE", " ", zaP, zaR, zaR2);
6860  h_orbitNumvsamplitude0_HF = fs_->make<TH1F>("h_orbitNumvsamplitude0_HF", " ", zaP, zaR, zaR2);
6861  h_orbitNumvsamplitude0_HO = fs_->make<TH1F>("h_orbitNumvsamplitude0_HO", " ", zaP, zaR, zaR2);
6862 
6863  h_2DsumADCAmplEtaPhiLs0 = fs_->make<TH2F>(
6864  "h_2DsumADCAmplEtaPhiLs0", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6865  h_2DsumADCAmplEtaPhiLs1 = fs_->make<TH2F>(
6866  "h_2DsumADCAmplEtaPhiLs1", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6867  h_2DsumADCAmplEtaPhiLs2 = fs_->make<TH2F>(
6868  "h_2DsumADCAmplEtaPhiLs2", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6869  h_2DsumADCAmplEtaPhiLs3 = fs_->make<TH2F>(
6870  "h_2DsumADCAmplEtaPhiLs3", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6871 
6873  "h_2DsumADCAmplEtaPhiLs00", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6875  "h_2DsumADCAmplEtaPhiLs10", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6877  "h_2DsumADCAmplEtaPhiLs20", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6879  "h_2DsumADCAmplEtaPhiLs30", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
6880 
6881  h_sumADCAmplEtaPhiLs = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs", " ", 1000, 0., 14000.);
6882  h_sumADCAmplEtaPhiLs_bbbc = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_bbbc", " ", 1000, 0., 300000.);
6883  h_sumADCAmplEtaPhiLs_bbb1 = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_bbb1", " ", 100, 0., 3000.);
6884  h_sumADCAmplEtaPhiLs_lscounterM1 = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_lscounterM1", " ", 600, 1., 601.);
6885  h_sumADCAmplEtaPhiLs_ietaphi = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_ietaphi", " ", 400, 0., 400.);
6887  fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_lscounterM1orbitNum", " ", 600, 1., 601.);
6888  h_sumADCAmplEtaPhiLs_orbitNum = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_orbitNum", " ", 1000, 25000000., 40000000.);
6889 
6890  // for LS :
6891 
6892  // for LS binning:
6893  int bac = howmanybinsonplots_;
6894  // int bac= 15;
6895  float bac2 = bac + 1.;
6896  // bac, 1., bac2 );
6897 
6898  h_nbadchannels_depth1_HB = fs_->make<TH1F>("h_nbadchannels_depth1_HB", " ", 100, 1., 3001.);
6899  h_runnbadchannels_depth1_HB = fs_->make<TH1F>("h_runnbadchannels_depth1_HB", " ", bac, 1., bac2);
6900  h_runnbadchannelsC_depth1_HB = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HB", " ", bac, 1., bac2);
6901  h_runbadrate_depth1_HB = fs_->make<TH1F>("h_runbadrate_depth1_HB", " ", bac, 1., bac2);
6902  h_runbadrateC_depth1_HB = fs_->make<TH1F>("h_runbadrateC_depth1_HB", " ", bac, 1., bac2);
6903  h_runbadrate0_depth1_HB = fs_->make<TH1F>("h_runbadrate0_depth1_HB", " ", bac, 1., bac2);
6904 
6905  h_nbadchannels_depth2_HB = fs_->make<TH1F>("h_nbadchannels_depth2_HB", " ", 100, 1., 501.);
6906  h_runnbadchannels_depth2_HB = fs_->make<TH1F>("h_runnbadchannels_depth2_HB", " ", bac, 1., bac2);
6907  h_runnbadchannelsC_depth2_HB = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HB", " ", bac, 1., bac2);
6908  h_runbadrate_depth2_HB = fs_->make<TH1F>("h_runbadrate_depth2_HB", " ", bac, 1., bac2);
6909  h_runbadrateC_depth2_HB = fs_->make<TH1F>("h_runbadrateC_depth2_HB", " ", bac, 1., bac2);
6910  h_runbadrate0_depth2_HB = fs_->make<TH1F>("h_runbadrate0_depth2_HB", " ", bac, 1., bac2);
6911 
6912  h_nbadchannels_depth1_HE = fs_->make<TH1F>("h_nbadchannels_depth1_HE", " ", 100, 1., 3001.);
6913  h_runnbadchannels_depth1_HE = fs_->make<TH1F>("h_runnbadchannels_depth1_HE", " ", bac, 1., bac2);
6914  h_runnbadchannelsC_depth1_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HE", " ", bac, 1., bac2);
6915  h_runbadrate_depth1_HE = fs_->make<TH1F>("h_runbadrate_depth1_HE", " ", bac, 1., bac2);
6916  h_runbadrateC_depth1_HE = fs_->make<TH1F>("h_runbadrateC_depth1_HE", " ", bac, 1., bac2);
6917  h_runbadrate0_depth1_HE = fs_->make<TH1F>("h_runbadrate0_depth1_HE", " ", bac, 1., bac2);
6918 
6919  h_nbadchannels_depth2_HE = fs_->make<TH1F>("h_nbadchannels_depth2_HE", " ", 100, 1., 3001.);
6920  h_runnbadchannels_depth2_HE = fs_->make<TH1F>("h_runnbadchannels_depth2_HE", " ", bac, 1., bac2);
6921  h_runnbadchannelsC_depth2_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HE", " ", bac, 1., bac2);
6922  h_runbadrate_depth2_HE = fs_->make<TH1F>("h_runbadrate_depth2_HE", " ", bac, 1., bac2);
6923  h_runbadrateC_depth2_HE = fs_->make<TH1F>("h_runbadrateC_depth2_HE", " ", bac, 1., bac2);
6924  h_runbadrate0_depth2_HE = fs_->make<TH1F>("h_runbadrate0_depth2_HE", " ", bac, 1., bac2);
6925 
6926  h_nbadchannels_depth3_HE = fs_->make<TH1F>("h_nbadchannels_depth3_HE", " ", 100, 1., 501.);
6927  h_runnbadchannels_depth3_HE = fs_->make<TH1F>("h_runnbadchannels_depth3_HE", " ", bac, 1., bac2);
6928  h_runnbadchannelsC_depth3_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth3_HE", " ", bac, 1., bac2);
6929  h_runbadrate_depth3_HE = fs_->make<TH1F>("h_runbadrate_depth3_HE", " ", bac, 1., bac2);
6930  h_runbadrateC_depth3_HE = fs_->make<TH1F>("h_runbadrateC_depth3_HE", " ", bac, 1., bac2);
6931  h_runbadrate0_depth3_HE = fs_->make<TH1F>("h_runbadrate0_depth3_HE", " ", bac, 1., bac2);
6932 
6933  h_nbadchannels_depth1_HF = fs_->make<TH1F>("h_nbadchannels_depth1_HF", " ", 100, 1., 3001.);
6934  h_runnbadchannels_depth1_HF = fs_->make<TH1F>("h_runnbadchannels_depth1_HF", " ", bac, 1., bac2);
6935  h_runnbadchannelsC_depth1_HF = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HF", " ", bac, 1., bac2);
6936  h_runbadrate_depth1_HF = fs_->make<TH1F>("h_runbadrate_depth1_HF", " ", bac, 1., bac2);
6937  h_runbadrateC_depth1_HF = fs_->make<TH1F>("h_runbadrateC_depth1_HF", " ", bac, 1., bac2);
6938  h_runbadrate0_depth1_HF = fs_->make<TH1F>("h_runbadrate0_depth1_HF", " ", bac, 1., bac2);
6939 
6940  h_nbadchannels_depth2_HF = fs_->make<TH1F>("h_nbadchannels_depth2_HF", " ", 100, 1., 501.);
6941  h_runnbadchannels_depth2_HF = fs_->make<TH1F>("h_runnbadchannels_depth2_HF", " ", bac, 1., bac2);
6942  h_runnbadchannelsC_depth2_HF = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HF", " ", bac, 1., bac2);
6943  h_runbadrate_depth2_HF = fs_->make<TH1F>("h_runbadrate_depth2_HF", " ", bac, 1., bac2);
6944  h_runbadrateC_depth2_HF = fs_->make<TH1F>("h_runbadrateC_depth2_HF", " ", bac, 1., bac2);
6945  h_runbadrate0_depth2_HF = fs_->make<TH1F>("h_runbadrate0_depth2_HF", " ", bac, 1., bac2);
6946 
6947  h_nbadchannels_depth4_HO = fs_->make<TH1F>("h_nbadchannels_depth4_HO", " ", 100, 1., 3001.);
6948  h_runnbadchannels_depth4_HO = fs_->make<TH1F>("h_runnbadchannels_depth4_HO", " ", bac, 1., bac2);
6949  h_runnbadchannelsC_depth4_HO = fs_->make<TH1F>("h_runnbadchannelsC_depth4_HO", " ", bac, 1., bac2);
6950  h_runbadrate_depth4_HO = fs_->make<TH1F>("h_runbadrate_depth4_HO", " ", bac, 1., bac2);
6951  h_runbadrateC_depth4_HO = fs_->make<TH1F>("h_runbadrateC_depth4_HO", " ", bac, 1., bac2);
6952  h_runbadrate0_depth4_HO = fs_->make<TH1F>("h_runbadrate0_depth4_HO", " ", bac, 1., bac2);
6953 
6955  h_FullSignal3D_HB = fs_->make<TH2F>("h_FullSignal3D_HB", " ", neta, -41., 41., nphi, 0., bphi);
6956  h_FullSignal3D0_HB = fs_->make<TH2F>("h_FullSignal3D0_HB", " ", neta, -41., 41., nphi, 0., bphi);
6957  h_FullSignal3D_HE = fs_->make<TH2F>("h_FullSignal3D_HE", " ", neta, -41., 41., nphi, 0., bphi);
6958  h_FullSignal3D0_HE = fs_->make<TH2F>("h_FullSignal3D0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6959  h_FullSignal3D_HO = fs_->make<TH2F>("h_FullSignal3D_HO", " ", neta, -41., 41., nphi, 0., bphi);
6960  h_FullSignal3D0_HO = fs_->make<TH2F>("h_FullSignal3D0_HO", " ", neta, -41., 41., nphi, 0., bphi);
6961  h_FullSignal3D_HF = fs_->make<TH2F>("h_FullSignal3D_HF", " ", neta, -41., 41., nphi, 0., bphi);
6962  h_FullSignal3D0_HF = fs_->make<TH2F>("h_FullSignal3D0_HF", " ", neta, -41., 41., nphi, 0., bphi);
6963 
6965  h_ADCCalib_HB = fs_->make<TH1F>("h_ADCCalib_HB", " ", 100, 10., 10000.);
6966  h_ADCCalib1_HB = fs_->make<TH1F>("h_ADCCalib1_HB", " ", 100, 0.1, 100.1);
6967  h_mapADCCalib047_HB = fs_->make<TH2F>("h_mapADCCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6968  h_mapADCCalib_HB = fs_->make<TH2F>("h_mapADCCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6969  h_RatioCalib_HB = fs_->make<TH1F>("h_RatioCalib_HB", " ", 100, 0., 1.);
6970  h_mapRatioCalib047_HB = fs_->make<TH2F>("h_mapRatioCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6971  h_mapRatioCalib_HB = fs_->make<TH2F>("h_mapRatioCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6972  h_TSmaxCalib_HB = fs_->make<TH1F>("h_TSmaxCalib_HB", " ", 100, 0., 10.);
6973  h_mapTSmaxCalib047_HB = fs_->make<TH2F>("h_mapTSmaxCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6974  h_mapTSmaxCalib_HB = fs_->make<TH2F>("h_mapTSmaxCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6975  h_TSmeanCalib_HB = fs_->make<TH1F>("h_TSmeanCalib_HB", " ", 100, 0., 10.);
6976  h_mapTSmeanCalib047_HB = fs_->make<TH2F>("h_mapTSmeanCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6977  h_mapTSmeanCalib_HB = fs_->make<TH2F>("h_mapTSmeanCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6978  h_WidthCalib_HB = fs_->make<TH1F>("h_WidthCalib_HB", " ", 100, 0., 5.);
6979  h_mapWidthCalib047_HB = fs_->make<TH2F>("h_mapWidthCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6980  h_mapCapCalib047_HB = fs_->make<TH2F>("h_mapCapCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6981  h_mapWidthCalib_HB = fs_->make<TH2F>("h_mapWidthCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
6982  h_map_HB = fs_->make<TH2F>("h_map_HB", " ", neta, -41., 41., nphi, 0., bphi);
6983  h_ADCCalib_HE = fs_->make<TH1F>("h_ADCCalib_HE", " ", 100, 10., 10000.);
6984  h_ADCCalib1_HE = fs_->make<TH1F>("h_ADCCalib1_HE", " ", 100, 0.1, 100.1);
6985  h_mapADCCalib047_HE = fs_->make<TH2F>("h_mapADCCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6986  h_mapADCCalib_HE = fs_->make<TH2F>("h_mapADCCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
6987  h_RatioCalib_HE = fs_->make<TH1F>("h_RatioCalib_HE", " ", 100, 0., 1.);
6988  h_mapRatioCalib047_HE = fs_->make<TH2F>("h_mapRatioCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6989  h_mapRatioCalib_HE = fs_->make<TH2F>("h_mapRatioCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
6990  h_TSmaxCalib_HE = fs_->make<TH1F>("h_TSmaxCalib_HE", " ", 100, 0., 10.);
6991  h_mapTSmaxCalib047_HE = fs_->make<TH2F>("h_mapTSmaxCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6992  h_mapTSmaxCalib_HE = fs_->make<TH2F>("h_mapTSmaxCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
6993  h_TSmeanCalib_HE = fs_->make<TH1F>("h_TSmeanCalib_HE", " ", 100, 0., 10.);
6994  h_mapTSmeanCalib047_HE = fs_->make<TH2F>("h_mapTSmeanCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6995  h_mapTSmeanCalib_HE = fs_->make<TH2F>("h_mapTSmeanCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
6996  h_WidthCalib_HE = fs_->make<TH1F>("h_WidthCalib_HE", " ", 100, 0., 5.);
6997  h_mapWidthCalib047_HE = fs_->make<TH2F>("h_mapWidthCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6998  h_mapCapCalib047_HE = fs_->make<TH2F>("h_mapCapCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6999  h_mapWidthCalib_HE = fs_->make<TH2F>("h_mapWidthCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7000  h_map_HE = fs_->make<TH2F>("h_map_HE", " ", neta, -41., 41., nphi, 0., bphi);
7001  h_ADCCalib_HO = fs_->make<TH1F>("h_ADCCalib_HO", " ", 100, 10., 10000.);
7002  h_ADCCalib1_HO = fs_->make<TH1F>("h_ADCCalib1_HO", " ", 100, 0.1, 100.1);
7003  h_mapADCCalib047_HO = fs_->make<TH2F>("h_mapADCCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7004  h_mapADCCalib_HO = fs_->make<TH2F>("h_mapADCCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7005  h_RatioCalib_HO = fs_->make<TH1F>("h_RatioCalib_HO", " ", 100, 0., 1.);
7006  h_mapRatioCalib047_HO = fs_->make<TH2F>("h_mapRatioCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7007  h_mapRatioCalib_HO = fs_->make<TH2F>("h_mapRatioCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7008  h_TSmaxCalib_HO = fs_->make<TH1F>("h_TSmaxCalib_HO", " ", 100, 0., 10.);
7009  h_mapTSmaxCalib047_HO = fs_->make<TH2F>("h_mapTSmaxCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7010  h_mapTSmaxCalib_HO = fs_->make<TH2F>("h_mapTSmaxCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7011  h_TSmeanCalib_HO = fs_->make<TH1F>("h_TSmeanCalib_HO", " ", 100, 0., 10.);
7012  h_mapTSmeanCalib047_HO = fs_->make<TH2F>("h_mapTSmeanCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7013  h_mapTSmeanCalib_HO = fs_->make<TH2F>("h_mapTSmeanCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7014  h_WidthCalib_HO = fs_->make<TH1F>("h_WidthCalib_HO", " ", 100, 0., 5.);
7015  h_mapWidthCalib047_HO = fs_->make<TH2F>("h_mapWidthCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7016  h_mapCapCalib047_HO = fs_->make<TH2F>("h_mapCapCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7017  h_mapWidthCalib_HO = fs_->make<TH2F>("h_mapWidthCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7018  h_map_HO = fs_->make<TH2F>("h_map_HO", " ", neta, -41., 41., nphi, 0., bphi);
7019  h_ADCCalib_HF = fs_->make<TH1F>("h_ADCCalib_HF", " ", 100, 10., 2000.);
7020  h_ADCCalib1_HF = fs_->make<TH1F>("h_ADCCalib1_HF", " ", 100, 0.1, 100.1);
7021  h_mapADCCalib047_HF = fs_->make<TH2F>("h_mapADCCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7022  h_mapADCCalib_HF = fs_->make<TH2F>("h_mapADCCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7023  h_RatioCalib_HF = fs_->make<TH1F>("h_RatioCalib_HF", " ", 100, 0., 1.);
7024  h_mapRatioCalib047_HF = fs_->make<TH2F>("h_mapRatioCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7025  h_mapRatioCalib_HF = fs_->make<TH2F>("h_mapRatioCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7026  h_TSmaxCalib_HF = fs_->make<TH1F>("h_TSmaxCalib_HF", " ", 100, 0., 10.);
7027  h_mapTSmaxCalib047_HF = fs_->make<TH2F>("h_mapTSmaxCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7028  h_mapTSmaxCalib_HF = fs_->make<TH2F>("h_mapTSmaxCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7029  h_TSmeanCalib_HF = fs_->make<TH1F>("h_TSmeanCalib_HF", " ", 100, 0., 10.);
7030  h_mapTSmeanCalib047_HF = fs_->make<TH2F>("h_mapTSmeanCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7031  h_mapTSmeanCalib_HF = fs_->make<TH2F>("h_mapTSmeanCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7032  h_WidthCalib_HF = fs_->make<TH1F>("h_WidthCalib_HF", " ", 100, 0., 5.);
7033  h_mapWidthCalib047_HF = fs_->make<TH2F>("h_mapWidthCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7034  h_mapCapCalib047_HF = fs_->make<TH2F>("h_mapCapCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7035  h_mapWidthCalib_HF = fs_->make<TH2F>("h_mapWidthCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7036  h_map_HF = fs_->make<TH2F>("h_map_HF", " ", neta, -41., 41., nphi, 0., bphi);
7037 
7038  h_nls_per_run = fs_->make<TH1F>("h_nls_per_run", " ", 100, 0., 800.);
7039  h_nls_per_run10 = fs_->make<TH1F>("h_nls_per_run10", " ", 100, 0., 60.);
7040  h_nevents_per_LS = fs_->make<TH1F>("h_nevents_per_LS", " ", 100, 0., 600.);
7041  h_nevents_per_LSzoom = fs_->make<TH1F>("h_nevents_per_LSzoom", " ", 50, 0., 50.);
7042  h_nevents_per_eachLS = fs_->make<TH1F>("h_nevents_per_eachLS", " ", bac, 1., bac2);
7043  h_nevents_per_eachRealLS = fs_->make<TH1F>("h_nevents_per_eachRealLS", " ", bac, 1., bac2);
7044  h_lsnumber_per_eachLS = fs_->make<TH1F>("h_lsnumber_per_eachLS", " ", bac, 1., bac2);
7045  //--------------------------------------------------
7046  // for estimator0:
7047  float pst1 = 30.;
7048  h_sumPedestalLS1 = fs_->make<TH1F>("h_sumPedestalLS1", " ", 100, 0., pst1);
7049  h_2DsumPedestalLS1 = fs_->make<TH2F>("h_2DsumPedestalLS1", " ", neta, -41., 41., nphi, 0., bphi);
7050  h_sumPedestalperLS1 = fs_->make<TH1F>("h_sumPedestalperLS1", " ", bac, 1., bac2);
7051  h_2D0sumPedestalLS1 = fs_->make<TH2F>("h_2D0sumPedestalLS1", " ", neta, -41., 41., nphi, 0., bphi);
7052  h_sum0PedestalperLS1 = fs_->make<TH1F>("h_sum0PedestalperLS1", " ", bac, 1., bac2);
7053 
7054  h_sumPedestalLS2 = fs_->make<TH1F>("h_sumPedestalLS2", " ", 100, 0., pst1);
7055  h_2DsumPedestalLS2 = fs_->make<TH2F>("h_2DsumPedestalLS2", " ", neta, -41., 41., nphi, 0., bphi);
7056  h_sumPedestalperLS2 = fs_->make<TH1F>("h_sumPedestalperLS2", " ", bac, 1., bac2);
7057  h_2D0sumPedestalLS2 = fs_->make<TH2F>("h_2D0sumPedestalLS2", " ", neta, -41., 41., nphi, 0., bphi);
7058  h_sum0PedestalperLS2 = fs_->make<TH1F>("h_sum0PedestalperLS2", " ", bac, 1., bac2);
7059 
7060  h_sumPedestalLS3 = fs_->make<TH1F>("h_sumPedestalLS3", " ", 100, 0., pst1);
7061  h_2DsumPedestalLS3 = fs_->make<TH2F>("h_2DsumPedestalLS3", " ", neta, -41., 41., nphi, 0., bphi);
7062  h_sumPedestalperLS3 = fs_->make<TH1F>("h_sumPedestalperLS3", " ", bac, 1., bac2);
7063  h_2D0sumPedestalLS3 = fs_->make<TH2F>("h_2D0sumPedestalLS3", " ", neta, -41., 41., nphi, 0., bphi);
7064  h_sum0PedestalperLS3 = fs_->make<TH1F>("h_sum0PedestalperLS3", " ", bac, 1., bac2);
7065 
7066  h_sumPedestalLS4 = fs_->make<TH1F>("h_sumPedestalLS4", " ", 100, 0., pst1);
7067  h_2DsumPedestalLS4 = fs_->make<TH2F>("h_2DsumPedestalLS4", " ", neta, -41., 41., nphi, 0., bphi);
7068  h_sumPedestalperLS4 = fs_->make<TH1F>("h_sumPedestalperLS4", " ", bac, 1., bac2);
7069  h_2D0sumPedestalLS4 = fs_->make<TH2F>("h_2D0sumPedestalLS4", " ", neta, -41., 41., nphi, 0., bphi);
7070  h_sum0PedestalperLS4 = fs_->make<TH1F>("h_sum0PedestalperLS4", " ", bac, 1., bac2);
7071 
7072  h_sumPedestalLS5 = fs_->make<TH1F>("h_sumPedestalLS5", " ", 100, 0., pst1);
7073  h_2DsumPedestalLS5 = fs_->make<TH2F>("h_2DsumPedestalLS5", " ", neta, -41., 41., nphi, 0., bphi);
7074  h_sumPedestalperLS5 = fs_->make<TH1F>("h_sumPedestalperLS5", " ", bac, 1., bac2);
7075  h_2D0sumPedestalLS5 = fs_->make<TH2F>("h_2D0sumPedestalLS5", " ", neta, -41., 41., nphi, 0., bphi);
7076  h_sum0PedestalperLS5 = fs_->make<TH1F>("h_sum0PedestalperLS5", " ", bac, 1., bac2);
7077 
7078  h_sumPedestalLS6 = fs_->make<TH1F>("h_sumPedestalLS6", " ", 100, 0., pst1);
7079  h_2DsumPedestalLS6 = fs_->make<TH2F>("h_2DsumPedestalLS6", " ", neta, -41., 41., nphi, 0., bphi);
7080  h_sumPedestalperLS6 = fs_->make<TH1F>("h_sumPedestalperLS6", " ", bac, 1., bac2);
7081  h_2D0sumPedestalLS6 = fs_->make<TH2F>("h_2D0sumPedestalLS6", " ", neta, -41., 41., nphi, 0., bphi);
7082  h_sum0PedestalperLS6 = fs_->make<TH1F>("h_sum0PedestalperLS6", " ", bac, 1., bac2);
7083 
7084  h_sumPedestalLS7 = fs_->make<TH1F>("h_sumPedestalLS7", " ", 100, 0., pst1);
7085  h_2DsumPedestalLS7 = fs_->make<TH2F>("h_2DsumPedestalLS7", " ", neta, -41., 41., nphi, 0., bphi);
7086  h_sumPedestalperLS7 = fs_->make<TH1F>("h_sumPedestalperLS7", " ", bac, 1., bac2);
7087  h_2D0sumPedestalLS7 = fs_->make<TH2F>("h_2D0sumPedestalLS7", " ", neta, -41., 41., nphi, 0., bphi);
7088  h_sum0PedestalperLS7 = fs_->make<TH1F>("h_sum0PedestalperLS7", " ", bac, 1., bac2);
7089 
7090  h_sumPedestalLS8 = fs_->make<TH1F>("h_sumPedestalLS8", " ", 100, 0., pst1);
7091  h_2DsumPedestalLS8 = fs_->make<TH2F>("h_2DsumPedestalLS8", " ", neta, -41., 41., nphi, 0., bphi);
7092  h_sumPedestalperLS8 = fs_->make<TH1F>("h_sumPedestalperLS8", " ", bac, 1., bac2);
7093  h_2D0sumPedestalLS8 = fs_->make<TH2F>("h_2D0sumPedestalLS8", " ", neta, -41., 41., nphi, 0., bphi);
7094  h_sum0PedestalperLS8 = fs_->make<TH1F>("h_sum0PedestalperLS8", " ", bac, 1., bac2);
7095 
7096  //--------------------------------------------------
7097  // for estimator1:
7098  h_sumADCAmplLS1copy1 = fs_->make<TH1F>("h_sumADCAmplLS1copy1", " ", 100, 0., 10000);
7099  h_sumADCAmplLS1copy2 = fs_->make<TH1F>("h_sumADCAmplLS1copy2", " ", 100, 0., 20000);
7100  h_sumADCAmplLS1copy3 = fs_->make<TH1F>("h_sumADCAmplLS1copy3", " ", 100, 0., 50000);
7101  h_sumADCAmplLS1copy4 = fs_->make<TH1F>("h_sumADCAmplLS1copy4", " ", 100, 0., 100000);
7102  h_sumADCAmplLS1copy5 = fs_->make<TH1F>("h_sumADCAmplLS1copy5", " ", 100, 0., 150000);
7103  h_sumADCAmplLS1 = fs_->make<TH1F>("h_sumADCAmplLS1", " ", 100, 0., lsdep_estimator1_HBdepth1_);
7104  h_2DsumADCAmplLS1 = fs_->make<TH2F>("h_2DsumADCAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7106  fs_->make<TH2F>("h_2DsumADCAmplLS1_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7107  h_sumADCAmplperLS1 = fs_->make<TH1F>("h_sumADCAmplperLS1", " ", bac, 1., bac2);
7108  h_sumCutADCAmplperLS1 = fs_->make<TH1F>("h_sumCutADCAmplperLS1", " ", bac, 1., bac2);
7109  h_2D0sumADCAmplLS1 = fs_->make<TH2F>("h_2D0sumADCAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7110  h_sum0ADCAmplperLS1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1", " ", bac, 1., bac2);
7111 
7112  h_sumADCAmplLS2 = fs_->make<TH1F>("h_sumADCAmplLS2", " ", 100, 0., lsdep_estimator1_HBdepth2_);
7113  h_2DsumADCAmplLS2 = fs_->make<TH2F>("h_2DsumADCAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7115  fs_->make<TH2F>("h_2DsumADCAmplLS2_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7116  h_sumADCAmplperLS2 = fs_->make<TH1F>("h_sumADCAmplperLS2", " ", bac, 1., bac2);
7117  h_sumCutADCAmplperLS2 = fs_->make<TH1F>("h_sumCutADCAmplperLS2", " ", bac, 1., bac2);
7118  h_2D0sumADCAmplLS2 = fs_->make<TH2F>("h_2D0sumADCAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7119  h_sum0ADCAmplperLS2 = fs_->make<TH1F>("h_sum0ADCAmplperLS2", " ", bac, 1., bac2);
7120 
7121  h_sumADCAmplLS3 = fs_->make<TH1F>("h_sumADCAmplLS3", " ", 100, 0., lsdep_estimator1_HEdepth1_);
7122  h_2DsumADCAmplLS3 = fs_->make<TH2F>("h_2DsumADCAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7124  fs_->make<TH2F>("h_2DsumADCAmplLS3_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7125  h_sumADCAmplperLS3 = fs_->make<TH1F>("h_sumADCAmplperLS3", " ", bac, 1., bac2);
7126  h_sumCutADCAmplperLS3 = fs_->make<TH1F>("h_sumCutADCAmplperLS3", " ", bac, 1., bac2);
7127  h_2D0sumADCAmplLS3 = fs_->make<TH2F>("h_2D0sumADCAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7128  h_sum0ADCAmplperLS3 = fs_->make<TH1F>("h_sum0ADCAmplperLS3", " ", bac, 1., bac2);
7129 
7130  h_sumADCAmplLS4 = fs_->make<TH1F>("h_sumADCAmplLS4", " ", 100, 0., lsdep_estimator1_HEdepth2_);
7131  h_2DsumADCAmplLS4 = fs_->make<TH2F>("h_2DsumADCAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7133  fs_->make<TH2F>("h_2DsumADCAmplLS4_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7134  h_sumADCAmplperLS4 = fs_->make<TH1F>("h_sumADCAmplperLS4", " ", bac, 1., bac2);
7135  h_sumCutADCAmplperLS4 = fs_->make<TH1F>("h_sumCutADCAmplperLS4", " ", bac, 1., bac2);
7136  h_2D0sumADCAmplLS4 = fs_->make<TH2F>("h_2D0sumADCAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7137  h_sum0ADCAmplperLS4 = fs_->make<TH1F>("h_sum0ADCAmplperLS4", " ", bac, 1., bac2);
7138 
7139  h_sumADCAmplLS5 = fs_->make<TH1F>("h_sumADCAmplLS5", " ", 100, 0., lsdep_estimator1_HEdepth3_);
7140  h_2DsumADCAmplLS5 = fs_->make<TH2F>("h_2DsumADCAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7142  fs_->make<TH2F>("h_2DsumADCAmplLS5_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7143  h_sumADCAmplperLS5 = fs_->make<TH1F>("h_sumADCAmplperLS5", " ", bac, 1., bac2);
7144  h_sumCutADCAmplperLS5 = fs_->make<TH1F>("h_sumCutADCAmplperLS5", " ", bac, 1., bac2);
7145  h_2D0sumADCAmplLS5 = fs_->make<TH2F>("h_2D0sumADCAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7146  h_sum0ADCAmplperLS5 = fs_->make<TH1F>("h_sum0ADCAmplperLS5", " ", bac, 1., bac2);
7147  // HE upgrade depth4
7148  h_sumADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7149  h_sumCutADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7150  h_sum0ADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7151 
7152  // HE upgrade depth5
7153  h_sumADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7154  h_sumCutADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7155  h_sum0ADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7156  // HE upgrade depth6
7157  h_sumADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7158  h_sumCutADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7159  h_sum0ADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7160  // HE upgrade depth7
7161  h_sumADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7162  h_sumCutADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7163  h_sum0ADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7164  // for HE gain stability vs LS:
7165  h_2DsumADCAmplLSdepth4HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HEu", " ", neta, -41., 41., nphi, 0., bphi);
7166  h_2D0sumADCAmplLSdepth4HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HEu", " ", neta, -41., 41., nphi, 0., bphi);
7167  h_2DsumADCAmplLSdepth5HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth5HEu", " ", neta, -41., 41., nphi, 0., bphi);
7168  h_2D0sumADCAmplLSdepth5HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth5HEu", " ", neta, -41., 41., nphi, 0., bphi);
7169  h_2DsumADCAmplLSdepth6HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth6HEu", " ", neta, -41., 41., nphi, 0., bphi);
7170  h_2D0sumADCAmplLSdepth6HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth6HEu", " ", neta, -41., 41., nphi, 0., bphi);
7171  h_2DsumADCAmplLSdepth7HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth7HEu", " ", neta, -41., 41., nphi, 0., bphi);
7172  h_2D0sumADCAmplLSdepth7HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth7HEu", " ", neta, -41., 41., nphi, 0., bphi);
7173  h_2DsumADCAmplLSdepth3HFu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth3HFu", " ", neta, -41., 41., nphi, 0., bphi);
7174  h_2D0sumADCAmplLSdepth3HFu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth3HFu", " ", neta, -41., 41., nphi, 0., bphi);
7175  h_2DsumADCAmplLSdepth4HFu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HFu", " ", neta, -41., 41., nphi, 0., bphi);
7176  h_2D0sumADCAmplLSdepth4HFu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HFu", " ", neta, -41., 41., nphi, 0., bphi);
7177 
7178  h_sumADCAmplLS6 = fs_->make<TH1F>("h_sumADCAmplLS6", " ", 100, 0., lsdep_estimator1_HFdepth1_);
7179  h_2DsumADCAmplLS6 = fs_->make<TH2F>("h_2DsumADCAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7181  fs_->make<TH2F>("h_2DsumADCAmplLS6_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7182  h_2D0sumADCAmplLS6 = fs_->make<TH2F>("h_2D0sumADCAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7183  h_sumADCAmplperLS6 = fs_->make<TH1F>("h_sumADCAmplperLS6", " ", bac, 1., bac2);
7184  h_sumCutADCAmplperLS6 = fs_->make<TH1F>("h_sumCutADCAmplperLS6", " ", bac, 1., bac2);
7185  h_sum0ADCAmplperLS6 = fs_->make<TH1F>("h_sum0ADCAmplperLS6", " ", bac, 1., bac2);
7186  // HF upgrade depth3
7187  h_sumADCAmplperLS6u = fs_->make<TH1F>("h_sumADCAmplperLS6u", " ", bac, 1., bac2);
7188  h_sumCutADCAmplperLS6u = fs_->make<TH1F>("h_sumCutADCAmplperLS6u", " ", bac, 1., bac2);
7189  h_sum0ADCAmplperLS6u = fs_->make<TH1F>("h_sum0ADCAmplperLS6u", " ", bac, 1., bac2);
7190 
7191  h_sumADCAmplLS7 = fs_->make<TH1F>("h_sumADCAmplLS7", " ", 100, 0., lsdep_estimator1_HFdepth2_);
7192  h_2DsumADCAmplLS7 = fs_->make<TH2F>("h_2DsumADCAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7194  fs_->make<TH2F>("h_2DsumADCAmplLS7_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7195  h_2D0sumADCAmplLS7 = fs_->make<TH2F>("h_2D0sumADCAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7196  h_sumADCAmplperLS7 = fs_->make<TH1F>("h_sumADCAmplperLS7", " ", bac, 1., bac2);
7197  h_sumCutADCAmplperLS7 = fs_->make<TH1F>("h_sumCutADCAmplperLS7", " ", bac, 1., bac2);
7198  h_sum0ADCAmplperLS7 = fs_->make<TH1F>("h_sum0ADCAmplperLS7", " ", bac, 1., bac2);
7199  // HF upgrade depth4
7200  h_sumADCAmplperLS7u = fs_->make<TH1F>("h_sumADCAmplperLS7u", " ", bac, 1., bac2);
7201  h_sumCutADCAmplperLS7u = fs_->make<TH1F>("h_sumCutADCAmplperLS7u", " ", bac, 1., bac2);
7202  h_sum0ADCAmplperLS7u = fs_->make<TH1F>("h_sum0ADCAmplperLS7u", " ", bac, 1., bac2);
7203 
7204  h_sumADCAmplLS8 = fs_->make<TH1F>("h_sumADCAmplLS8", " ", 100, 0., lsdep_estimator1_HOdepth4_);
7205  h_2DsumADCAmplLS8 = fs_->make<TH2F>("h_2DsumADCAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7207  fs_->make<TH2F>("h_2DsumADCAmplLS8_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7208  h_sumADCAmplperLS8 = fs_->make<TH1F>("h_sumADCAmplperLS8", " ", bac, 1., bac2);
7209  h_sumCutADCAmplperLS8 = fs_->make<TH1F>("h_sumCutADCAmplperLS8", " ", bac, 1., bac2);
7210  h_2D0sumADCAmplLS8 = fs_->make<TH2F>("h_2D0sumADCAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7211  h_sum0ADCAmplperLS8 = fs_->make<TH1F>("h_sum0ADCAmplperLS8", " ", bac, 1., bac2);
7212 
7213  // HB upgrade depth3
7214  h_sumADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sumADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7215  h_sumCutADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7216  h_sum0ADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7217  // HB upgrade depth4
7218  h_sumADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sumADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7219  h_sumCutADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7220  h_sum0ADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7221 
7222  // for HB gain stability vs LS:
7223  h_2DsumADCAmplLSdepth3HBu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth3HBu", " ", neta, -41., 41., nphi, 0., bphi);
7224  h_2D0sumADCAmplLSdepth3HBu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth3HBu", " ", neta, -41., 41., nphi, 0., bphi);
7225  h_2DsumADCAmplLSdepth4HBu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HBu", " ", neta, -41., 41., nphi, 0., bphi);
7226  h_2D0sumADCAmplLSdepth4HBu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HBu", " ", neta, -41., 41., nphi, 0., bphi);
7227 
7228  // error-A for HB( depth1 only)
7229  h_sumADCAmplperLS1_P1 = fs_->make<TH1F>("h_sumADCAmplperLS1_P1", " ", bac, 1., bac2);
7230  h_sum0ADCAmplperLS1_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_P1", " ", bac, 1., bac2);
7231  h_sumADCAmplperLS1_P2 = fs_->make<TH1F>("h_sumADCAmplperLS1_P2", " ", bac, 1., bac2);
7232  h_sum0ADCAmplperLS1_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_P2", " ", bac, 1., bac2);
7233  h_sumADCAmplperLS1_M1 = fs_->make<TH1F>("h_sumADCAmplperLS1_M1", " ", bac, 1., bac2);
7234  h_sum0ADCAmplperLS1_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_M1", " ", bac, 1., bac2);
7235  h_sumADCAmplperLS1_M2 = fs_->make<TH1F>("h_sumADCAmplperLS1_M2", " ", bac, 1., bac2);
7236  h_sum0ADCAmplperLS1_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_M2", " ", bac, 1., bac2);
7237 
7238  // error-A for HE( depth1 only)
7239  h_sumADCAmplperLS3_P1 = fs_->make<TH1F>("h_sumADCAmplperLS3_P1", " ", bac, 1., bac2);
7240  h_sum0ADCAmplperLS3_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_P1", " ", bac, 1., bac2);
7241  h_sumADCAmplperLS3_P2 = fs_->make<TH1F>("h_sumADCAmplperLS3_P2", " ", bac, 1., bac2);
7242  h_sum0ADCAmplperLS3_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_P2", " ", bac, 1., bac2);
7243  h_sumADCAmplperLS3_M1 = fs_->make<TH1F>("h_sumADCAmplperLS3_M1", " ", bac, 1., bac2);
7244  h_sum0ADCAmplperLS3_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_M1", " ", bac, 1., bac2);
7245  h_sumADCAmplperLS3_M2 = fs_->make<TH1F>("h_sumADCAmplperLS3_M2", " ", bac, 1., bac2);
7246  h_sum0ADCAmplperLS3_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_M2", " ", bac, 1., bac2);
7247 
7248  // error-A for HF( depth1 only)
7249  h_sumADCAmplperLS6_P1 = fs_->make<TH1F>("h_sumADCAmplperLS6_P1", " ", bac, 1., bac2);
7250  h_sum0ADCAmplperLS6_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_P1", " ", bac, 1., bac2);
7251  h_sumADCAmplperLS6_P2 = fs_->make<TH1F>("h_sumADCAmplperLS6_P2", " ", bac, 1., bac2);
7252  h_sum0ADCAmplperLS6_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_P2", " ", bac, 1., bac2);
7253  h_sumADCAmplperLS6_M1 = fs_->make<TH1F>("h_sumADCAmplperLS6_M1", " ", bac, 1., bac2);
7254  h_sum0ADCAmplperLS6_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_M1", " ", bac, 1., bac2);
7255  h_sumADCAmplperLS6_M2 = fs_->make<TH1F>("h_sumADCAmplperLS6_M2", " ", bac, 1., bac2);
7256  h_sum0ADCAmplperLS6_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_M2", " ", bac, 1., bac2);
7257 
7258  // error-A for HO( depth4 only)
7259  h_sumADCAmplperLS8_P1 = fs_->make<TH1F>("h_sumADCAmplperLS8_P1", " ", bac, 1., bac2);
7260  h_sum0ADCAmplperLS8_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_P1", " ", bac, 1., bac2);
7261  h_sumADCAmplperLS8_P2 = fs_->make<TH1F>("h_sumADCAmplperLS8_P2", " ", bac, 1., bac2);
7262  h_sum0ADCAmplperLS8_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_P2", " ", bac, 1., bac2);
7263  h_sumADCAmplperLS8_M1 = fs_->make<TH1F>("h_sumADCAmplperLS8_M1", " ", bac, 1., bac2);
7264  h_sum0ADCAmplperLS8_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_M1", " ", bac, 1., bac2);
7265  h_sumADCAmplperLS8_M2 = fs_->make<TH1F>("h_sumADCAmplperLS8_M2", " ", bac, 1., bac2);
7266  h_sum0ADCAmplperLS8_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_M2", " ", bac, 1., bac2);
7267 
7268  //--------------------------------------------------
7269  h_sumTSmeanALS1 = fs_->make<TH1F>("h_sumTSmeanALS1", " ", 100, 0., lsdep_estimator2_HBdepth1_);
7270  h_2DsumTSmeanALS1 = fs_->make<TH2F>("h_2DsumTSmeanALS1", " ", neta, -41., 41., nphi, 0., bphi);
7271  h_sumTSmeanAperLS1 = fs_->make<TH1F>("h_sumTSmeanAperLS1", " ", bac, 1., bac2);
7272  h_sumTSmeanAperLS1_LSselected = fs_->make<TH1F>("h_sumTSmeanAperLS1_LSselected", " ", bac, 1., bac2);
7273  h_sumCutTSmeanAperLS1 = fs_->make<TH1F>("h_sumCutTSmeanAperLS1", " ", bac, 1., bac2);
7274  h_2D0sumTSmeanALS1 = fs_->make<TH2F>("h_2D0sumTSmeanALS1", " ", neta, -41., 41., nphi, 0., bphi);
7275  h_sum0TSmeanAperLS1 = fs_->make<TH1F>("h_sum0TSmeanAperLS1", " ", bac, 1., bac2);
7276 
7277  h_sumTSmeanALS2 = fs_->make<TH1F>("h_sumTSmeanALS2", " ", 100, 0., lsdep_estimator2_HBdepth2_);
7278  h_2DsumTSmeanALS2 = fs_->make<TH2F>("h_2DsumTSmeanALS2", " ", neta, -41., 41., nphi, 0., bphi);
7279  h_sumTSmeanAperLS2 = fs_->make<TH1F>("h_sumTSmeanAperLS2", " ", bac, 1., bac2);
7280  h_sumCutTSmeanAperLS2 = fs_->make<TH1F>("h_sumCutTSmeanAperLS2", " ", bac, 1., bac2);
7281  h_2D0sumTSmeanALS2 = fs_->make<TH2F>("h_2D0sumTSmeanALS2", " ", neta, -41., 41., nphi, 0., bphi);
7282  h_sum0TSmeanAperLS2 = fs_->make<TH1F>("h_sum0TSmeanAperLS2", " ", bac, 1., bac2);
7283 
7284  h_sumTSmeanALS3 = fs_->make<TH1F>("h_sumTSmeanALS3", " ", 100, 0., lsdep_estimator2_HEdepth1_);
7285  h_2DsumTSmeanALS3 = fs_->make<TH2F>("h_2DsumTSmeanALS3", " ", neta, -41., 41., nphi, 0., bphi);
7286  h_sumTSmeanAperLS3 = fs_->make<TH1F>("h_sumTSmeanAperLS3", " ", bac, 1., bac2);
7287  h_sumCutTSmeanAperLS3 = fs_->make<TH1F>("h_sumCutTSmeanAperLS3", " ", bac, 1., bac2);
7288  h_2D0sumTSmeanALS3 = fs_->make<TH2F>("h_2D0sumTSmeanALS3", " ", neta, -41., 41., nphi, 0., bphi);
7289  h_sum0TSmeanAperLS3 = fs_->make<TH1F>("h_sum0TSmeanAperLS3", " ", bac, 1., bac2);
7290 
7291  h_sumTSmeanALS4 = fs_->make<TH1F>("h_sumTSmeanALS4", " ", 100, 0., lsdep_estimator2_HEdepth2_);
7292  h_2DsumTSmeanALS4 = fs_->make<TH2F>("h_2DsumTSmeanALS4", " ", neta, -41., 41., nphi, 0., bphi);
7293  h_sumTSmeanAperLS4 = fs_->make<TH1F>("h_sumTSmeanAperLS4", " ", bac, 1., bac2);
7294  h_sumCutTSmeanAperLS4 = fs_->make<TH1F>("h_sumCutTSmeanAperLS4", " ", bac, 1., bac2);
7295  h_2D0sumTSmeanALS4 = fs_->make<TH2F>("h_2D0sumTSmeanALS4", " ", neta, -41., 41., nphi, 0., bphi);
7296  h_sum0TSmeanAperLS4 = fs_->make<TH1F>("h_sum0TSmeanAperLS4", " ", bac, 1., bac2);
7297 
7298  h_sumTSmeanALS5 = fs_->make<TH1F>("h_sumTSmeanALS5", " ", 100, 0., lsdep_estimator2_HEdepth3_);
7299  h_2DsumTSmeanALS5 = fs_->make<TH2F>("h_2DsumTSmeanALS5", " ", neta, -41., 41., nphi, 0., bphi);
7300  h_sumTSmeanAperLS5 = fs_->make<TH1F>("h_sumTSmeanAperLS5", " ", bac, 1., bac2);
7301  h_sumCutTSmeanAperLS5 = fs_->make<TH1F>("h_sumCutTSmeanAperLS5", " ", bac, 1., bac2);
7302  h_2D0sumTSmeanALS5 = fs_->make<TH2F>("h_2D0sumTSmeanALS5", " ", neta, -41., 41., nphi, 0., bphi);
7303  h_sum0TSmeanAperLS5 = fs_->make<TH1F>("h_sum0TSmeanAperLS5", " ", bac, 1., bac2);
7304 
7305  h_sumTSmeanALS6 = fs_->make<TH1F>("h_sumTSmeanALS6", " ", 100, 0., lsdep_estimator2_HFdepth1_);
7306  h_2DsumTSmeanALS6 = fs_->make<TH2F>("h_2DsumTSmeanALS6", " ", neta, -41., 41., nphi, 0., bphi);
7307  h_sumTSmeanAperLS6 = fs_->make<TH1F>("h_sumTSmeanAperLS6", " ", bac, 1., bac2);
7308  h_sumCutTSmeanAperLS6 = fs_->make<TH1F>("h_sumCutTSmeanAperLS6", " ", bac, 1., bac2);
7309  h_2D0sumTSmeanALS6 = fs_->make<TH2F>("h_2D0sumTSmeanALS6", " ", neta, -41., 41., nphi, 0., bphi);
7310  h_sum0TSmeanAperLS6 = fs_->make<TH1F>("h_sum0TSmeanAperLS6", " ", bac, 1., bac2);
7311 
7312  h_sumTSmeanALS7 = fs_->make<TH1F>("h_sumTSmeanALS7", " ", 100, 0., lsdep_estimator2_HFdepth2_);
7313  h_2DsumTSmeanALS7 = fs_->make<TH2F>("h_2DsumTSmeanALS7", " ", neta, -41., 41., nphi, 0., bphi);
7314  h_sumTSmeanAperLS7 = fs_->make<TH1F>("h_sumTSmeanAperLS7", " ", bac, 1., bac2);
7315  h_sumCutTSmeanAperLS7 = fs_->make<TH1F>("h_sumCutTSmeanAperLS7", " ", bac, 1., bac2);
7316  h_2D0sumTSmeanALS7 = fs_->make<TH2F>("h_2D0sumTSmeanALS7", " ", neta, -41., 41., nphi, 0., bphi);
7317  h_sum0TSmeanAperLS7 = fs_->make<TH1F>("h_sum0TSmeanAperLS7", " ", bac, 1., bac2);
7318 
7319  h_sumTSmeanALS8 = fs_->make<TH1F>("h_sumTSmeanALS8", " ", 100, 0., lsdep_estimator2_HOdepth4_);
7320  h_2DsumTSmeanALS8 = fs_->make<TH2F>("h_2DsumTSmeanALS8", " ", neta, -41., 41., nphi, 0., bphi);
7321  h_sumTSmeanAperLS8 = fs_->make<TH1F>("h_sumTSmeanAperLS8", " ", bac, 1., bac2);
7322  h_sumCutTSmeanAperLS8 = fs_->make<TH1F>("h_sumCutTSmeanAperLS8", " ", bac, 1., bac2);
7323  h_2D0sumTSmeanALS8 = fs_->make<TH2F>("h_2D0sumTSmeanALS8", " ", neta, -41., 41., nphi, 0., bphi);
7324  h_sum0TSmeanAperLS8 = fs_->make<TH1F>("h_sum0TSmeanAperLS8", " ", bac, 1., bac2);
7325  //--------------------------------------------------
7326  // for estimator3:
7327  h_sumTSmaxALS1 = fs_->make<TH1F>("h_sumTSmaxALS1", " ", 100, 0., lsdep_estimator3_HBdepth1_);
7328  h_2DsumTSmaxALS1 = fs_->make<TH2F>("h_2DsumTSmaxALS1", " ", neta, -41., 41., nphi, 0., bphi);
7329  h_sumTSmaxAperLS1 = fs_->make<TH1F>("h_sumTSmaxAperLS1", " ", bac, 1., bac2);
7330  h_sumTSmaxAperLS1_LSselected = fs_->make<TH1F>("h_sumTSmaxAperLS1_LSselected", " ", bac, 1., bac2);
7331  h_sumCutTSmaxAperLS1 = fs_->make<TH1F>("h_sumCutTSmaxAperLS1", " ", bac, 1., bac2);
7332  h_2D0sumTSmaxALS1 = fs_->make<TH2F>("h_2D0sumTSmaxALS1", " ", neta, -41., 41., nphi, 0., bphi);
7333  h_sum0TSmaxAperLS1 = fs_->make<TH1F>("h_sum0TSmaxAperLS1", " ", bac, 1., bac2);
7334 
7335  h_sumTSmaxALS2 = fs_->make<TH1F>("h_sumTSmaxALS2", " ", 100, 0., lsdep_estimator3_HBdepth2_);
7336  h_2DsumTSmaxALS2 = fs_->make<TH2F>("h_2DsumTSmaxALS2", " ", neta, -41., 41., nphi, 0., bphi);
7337  h_sumTSmaxAperLS2 = fs_->make<TH1F>("h_sumTSmaxAperLS2", " ", bac, 1., bac2);
7338  h_sumCutTSmaxAperLS2 = fs_->make<TH1F>("h_sumCutTSmaxAperLS2", " ", bac, 1., bac2);
7339  h_2D0sumTSmaxALS2 = fs_->make<TH2F>("h_2D0sumTSmaxALS2", " ", neta, -41., 41., nphi, 0., bphi);
7340  h_sum0TSmaxAperLS2 = fs_->make<TH1F>("h_sum0TSmaxAperLS2", " ", bac, 1., bac2);
7341 
7342  h_sumTSmaxALS3 = fs_->make<TH1F>("h_sumTSmaxALS3", " ", 100, 0., lsdep_estimator3_HEdepth1_);
7343  h_2DsumTSmaxALS3 = fs_->make<TH2F>("h_2DsumTSmaxALS3", " ", neta, -41., 41., nphi, 0., bphi);
7344  h_sumTSmaxAperLS3 = fs_->make<TH1F>("h_sumTSmaxAperLS3", " ", bac, 1., bac2);
7345  h_sumCutTSmaxAperLS3 = fs_->make<TH1F>("h_sumCutTSmaxAperLS3", " ", bac, 1., bac2);
7346  h_2D0sumTSmaxALS3 = fs_->make<TH2F>("h_2D0sumTSmaxALS3", " ", neta, -41., 41., nphi, 0., bphi);
7347  h_sum0TSmaxAperLS3 = fs_->make<TH1F>("h_sum0TSmaxAperLS3", " ", bac, 1., bac2);
7348 
7349  h_sumTSmaxALS4 = fs_->make<TH1F>("h_sumTSmaxALS4", " ", 100, 0., lsdep_estimator3_HEdepth2_);
7350  h_2DsumTSmaxALS4 = fs_->make<TH2F>("h_2DsumTSmaxALS4", " ", neta, -41., 41., nphi, 0., bphi);
7351  h_sumTSmaxAperLS4 = fs_->make<TH1F>("h_sumTSmaxAperLS4", " ", bac, 1., bac2);
7352  h_sumCutTSmaxAperLS4 = fs_->make<TH1F>("h_sumCutTSmaxAperLS4", " ", bac, 1., bac2);
7353  h_2D0sumTSmaxALS4 = fs_->make<TH2F>("h_2D0sumTSmaxALS4", " ", neta, -41., 41., nphi, 0., bphi);
7354  h_sum0TSmaxAperLS4 = fs_->make<TH1F>("h_sum0TSmaxAperLS4", " ", bac, 1., bac2);
7355 
7356  h_sumTSmaxALS5 = fs_->make<TH1F>("h_sumTSmaxALS5", " ", 100, 0., lsdep_estimator3_HEdepth3_);
7357  h_2DsumTSmaxALS5 = fs_->make<TH2F>("h_2DsumTSmaxALS5", " ", neta, -41., 41., nphi, 0., bphi);
7358  h_sumTSmaxAperLS5 = fs_->make<TH1F>("h_sumTSmaxAperLS5", " ", bac, 1., bac2);
7359  h_sumCutTSmaxAperLS5 = fs_->make<TH1F>("h_sumCutTSmaxAperLS5", " ", bac, 1., bac2);
7360  h_2D0sumTSmaxALS5 = fs_->make<TH2F>("h_2D0sumTSmaxALS5", " ", neta, -41., 41., nphi, 0., bphi);
7361  h_sum0TSmaxAperLS5 = fs_->make<TH1F>("h_sum0TSmaxAperLS5", " ", bac, 1., bac2);
7362 
7363  h_sumTSmaxALS6 = fs_->make<TH1F>("h_sumTSmaxALS6", " ", 100, 0., lsdep_estimator3_HFdepth1_);
7364  h_2DsumTSmaxALS6 = fs_->make<TH2F>("h_2DsumTSmaxALS6", " ", neta, -41., 41., nphi, 0., bphi);
7365  h_sumTSmaxAperLS6 = fs_->make<TH1F>("h_sumTSmaxAperLS6", " ", bac, 1., bac2);
7366  h_sumCutTSmaxAperLS6 = fs_->make<TH1F>("h_sumCutTSmaxAperLS6", " ", bac, 1., bac2);
7367  h_2D0sumTSmaxALS6 = fs_->make<TH2F>("h_2D0sumTSmaxALS6", " ", neta, -41., 41., nphi, 0., bphi);
7368  h_sum0TSmaxAperLS6 = fs_->make<TH1F>("h_sum0TSmaxAperLS6", " ", bac, 1., bac2);
7369 
7370  h_sumTSmaxALS7 = fs_->make<TH1F>("h_sumTSmaxALS7", " ", 100, 0., lsdep_estimator3_HFdepth2_);
7371  h_2DsumTSmaxALS7 = fs_->make<TH2F>("h_2DsumTSmaxALS7", " ", neta, -41., 41., nphi, 0., bphi);
7372  h_sumTSmaxAperLS7 = fs_->make<TH1F>("h_sumTSmaxAperLS7", " ", bac, 1., bac2);
7373  h_sumCutTSmaxAperLS7 = fs_->make<TH1F>("h_sumCutTSmaxAperLS7", " ", bac, 1., bac2);
7374  h_2D0sumTSmaxALS7 = fs_->make<TH2F>("h_2D0sumTSmaxALS7", " ", neta, -41., 41., nphi, 0., bphi);
7375  h_sum0TSmaxAperLS7 = fs_->make<TH1F>("h_sum0TSmaxAperLS7", " ", bac, 1., bac2);
7376 
7377  h_sumTSmaxALS8 = fs_->make<TH1F>("h_sumTSmaxALS8", " ", 100, 0., lsdep_estimator3_HOdepth4_);
7378  h_2DsumTSmaxALS8 = fs_->make<TH2F>("h_2DsumTSmaxALS8", " ", neta, -41., 41., nphi, 0., bphi);
7379  h_sumTSmaxAperLS8 = fs_->make<TH1F>("h_sumTSmaxAperLS8", " ", bac, 1., bac2);
7380  h_sumCutTSmaxAperLS8 = fs_->make<TH1F>("h_sumCutTSmaxAperLS8", " ", bac, 1., bac2);
7381  h_2D0sumTSmaxALS8 = fs_->make<TH2F>("h_2D0sumTSmaxALS8", " ", neta, -41., 41., nphi, 0., bphi);
7382  h_sum0TSmaxAperLS8 = fs_->make<TH1F>("h_sum0TSmaxAperLS8", " ", bac, 1., bac2);
7383  //--------------------------------------------------
7384  // for estimator4:
7385  h_sumAmplitudeLS1 = fs_->make<TH1F>("h_sumAmplitudeLS1", " ", 100, 0.0, lsdep_estimator4_HBdepth1_);
7386  h_2DsumAmplitudeLS1 = fs_->make<TH2F>("h_2DsumAmplitudeLS1", " ", neta, -41., 41., nphi, 0., bphi);
7387  h_sumAmplitudeperLS1 = fs_->make<TH1F>("h_sumAmplitudeperLS1", " ", bac, 1., bac2);
7388  h_sumAmplitudeperLS1_LSselected = fs_->make<TH1F>("h_sumAmplitudeperLS1_LSselected", " ", bac, 1., bac2);
7389  h_sumCutAmplitudeperLS1 = fs_->make<TH1F>("h_sumCutAmplitudeperLS1", " ", bac, 1., bac2);
7390  h_2D0sumAmplitudeLS1 = fs_->make<TH2F>("h_2D0sumAmplitudeLS1", " ", neta, -41., 41., nphi, 0., bphi);
7391  h_sum0AmplitudeperLS1 = fs_->make<TH1F>("h_sum0AmplitudeperLS1", " ", bac, 1., bac2);
7392 
7393  h_sumAmplitudeLS2 = fs_->make<TH1F>("h_sumAmplitudeLS2", " ", 100, 0.0, lsdep_estimator4_HBdepth2_);
7394  h_2DsumAmplitudeLS2 = fs_->make<TH2F>("h_2DsumAmplitudeLS2", " ", neta, -41., 41., nphi, 0., bphi);
7395  h_sumAmplitudeperLS2 = fs_->make<TH1F>("h_sumAmplitudeperLS2", " ", bac, 1., bac2);
7396  h_sumCutAmplitudeperLS2 = fs_->make<TH1F>("h_sumCutAmplitudeperLS2", " ", bac, 1., bac2);
7397  h_2D0sumAmplitudeLS2 = fs_->make<TH2F>("h_2D0sumAmplitudeLS2", " ", neta, -41., 41., nphi, 0., bphi);
7398  h_sum0AmplitudeperLS2 = fs_->make<TH1F>("h_sum0AmplitudeperLS2", " ", bac, 1., bac2);
7399 
7400  h_sumAmplitudeLS3 = fs_->make<TH1F>("h_sumAmplitudeLS3", " ", 100, 0.0, lsdep_estimator4_HEdepth1_);
7401  h_2DsumAmplitudeLS3 = fs_->make<TH2F>("h_2DsumAmplitudeLS3", " ", neta, -41., 41., nphi, 0., bphi);
7402  h_sumAmplitudeperLS3 = fs_->make<TH1F>("h_sumAmplitudeperLS3", " ", bac, 1., bac2);
7403  h_sumCutAmplitudeperLS3 = fs_->make<TH1F>("h_sumCutAmplitudeperLS3", " ", bac, 1., bac2);
7404  h_2D0sumAmplitudeLS3 = fs_->make<TH2F>("h_2D0sumAmplitudeLS3", " ", neta, -41., 41., nphi, 0., bphi);
7405  h_sum0AmplitudeperLS3 = fs_->make<TH1F>("h_sum0AmplitudeperLS3", " ", bac, 1., bac2);
7406 
7407  h_sumAmplitudeLS4 = fs_->make<TH1F>("h_sumAmplitudeLS4", " ", 100, 0.0, lsdep_estimator4_HEdepth2_);
7408  h_2DsumAmplitudeLS4 = fs_->make<TH2F>("h_2DsumAmplitudeLS4", " ", neta, -41., 41., nphi, 0., bphi);
7409  h_sumAmplitudeperLS4 = fs_->make<TH1F>("h_sumAmplitudeperLS4", " ", bac, 1., bac2);
7410  h_sumCutAmplitudeperLS4 = fs_->make<TH1F>("h_sumCutAmplitudeperLS4", " ", bac, 1., bac2);
7411  h_2D0sumAmplitudeLS4 = fs_->make<TH2F>("h_2D0sumAmplitudeLS4", " ", neta, -41., 41., nphi, 0., bphi);
7412  h_sum0AmplitudeperLS4 = fs_->make<TH1F>("h_sum0AmplitudeperLS4", " ", bac, 1., bac2);
7413 
7414  h_sumAmplitudeLS5 = fs_->make<TH1F>("h_sumAmplitudeLS5", " ", 100, 0.0, lsdep_estimator4_HEdepth3_);
7415  h_2DsumAmplitudeLS5 = fs_->make<TH2F>("h_2DsumAmplitudeLS5", " ", neta, -41., 41., nphi, 0., bphi);
7416  h_sumAmplitudeperLS5 = fs_->make<TH1F>("h_sumAmplitudeperLS5", " ", bac, 1., bac2);
7417  h_sumCutAmplitudeperLS5 = fs_->make<TH1F>("h_sumCutAmplitudeperLS5", " ", bac, 1., bac2);
7418  h_2D0sumAmplitudeLS5 = fs_->make<TH2F>("h_2D0sumAmplitudeLS5", " ", neta, -41., 41., nphi, 0., bphi);
7419  h_sum0AmplitudeperLS5 = fs_->make<TH1F>("h_sum0AmplitudeperLS5", " ", bac, 1., bac2);
7420 
7421  h_sumAmplitudeLS6 = fs_->make<TH1F>("h_sumAmplitudeLS6", " ", 100, 0., lsdep_estimator4_HFdepth1_);
7422  h_2DsumAmplitudeLS6 = fs_->make<TH2F>("h_2DsumAmplitudeLS6", " ", neta, -41., 41., nphi, 0., bphi);
7423  h_sumAmplitudeperLS6 = fs_->make<TH1F>("h_sumAmplitudeperLS6", " ", bac, 1., bac2);
7424  h_sumCutAmplitudeperLS6 = fs_->make<TH1F>("h_sumCutAmplitudeperLS6", " ", bac, 1., bac2);
7425  h_2D0sumAmplitudeLS6 = fs_->make<TH2F>("h_2D0sumAmplitudeLS6", " ", neta, -41., 41., nphi, 0., bphi);
7426  h_sum0AmplitudeperLS6 = fs_->make<TH1F>("h_sum0AmplitudeperLS6", " ", bac, 1., bac2);
7427 
7428  h_sumAmplitudeLS7 = fs_->make<TH1F>("h_sumAmplitudeLS7", " ", 100, 0., lsdep_estimator4_HFdepth2_);
7429  h_2DsumAmplitudeLS7 = fs_->make<TH2F>("h_2DsumAmplitudeLS7", " ", neta, -41., 41., nphi, 0., bphi);
7430  h_sumAmplitudeperLS7 = fs_->make<TH1F>("h_sumAmplitudeperLS7", " ", bac, 1., bac2);
7431  h_sumCutAmplitudeperLS7 = fs_->make<TH1F>("h_sumCutAmplitudeperLS7", " ", bac, 1., bac2);
7432  h_2D0sumAmplitudeLS7 = fs_->make<TH2F>("h_2D0sumAmplitudeLS7", " ", neta, -41., 41., nphi, 0., bphi);
7433  h_sum0AmplitudeperLS7 = fs_->make<TH1F>("h_sum0AmplitudeperLS7", " ", bac, 1., bac2);
7434 
7435  h_sumAmplitudeLS8 = fs_->make<TH1F>("h_sumAmplitudeLS8", " ", 100, 0., lsdep_estimator4_HOdepth4_);
7436  h_2DsumAmplitudeLS8 = fs_->make<TH2F>("h_2DsumAmplitudeLS8", " ", neta, -41., 41., nphi, 0., bphi);
7437  h_sumAmplitudeperLS8 = fs_->make<TH1F>("h_sumAmplitudeperLS8", " ", bac, 1., bac2);
7438  h_sumCutAmplitudeperLS8 = fs_->make<TH1F>("h_sumCutAmplitudeperLS8", " ", bac, 1., bac2);
7439  h_2D0sumAmplitudeLS8 = fs_->make<TH2F>("h_2D0sumAmplitudeLS8", " ", neta, -41., 41., nphi, 0., bphi);
7440  h_sum0AmplitudeperLS8 = fs_->make<TH1F>("h_sum0AmplitudeperLS8", " ", bac, 1., bac2);
7441  //--------------------------------------------------
7442  // for estimator5:
7443  h_sumAmplLS1 = fs_->make<TH1F>("h_sumAmplLS1", " ", 100, 0.0, lsdep_estimator5_HBdepth1_);
7444  h_2DsumAmplLS1 = fs_->make<TH2F>("h_2DsumAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7445  h_sumAmplperLS1 = fs_->make<TH1F>("h_sumAmplperLS1", " ", bac, 1., bac2);
7446  h_sumAmplperLS1_LSselected = fs_->make<TH1F>("h_sumAmplperLS1_LSselected", " ", bac, 1., bac2);
7447  h_sumCutAmplperLS1 = fs_->make<TH1F>("h_sumCutAmplperLS1", " ", bac, 1., bac2);
7448  h_2D0sumAmplLS1 = fs_->make<TH2F>("h_2D0sumAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7449  h_sum0AmplperLS1 = fs_->make<TH1F>("h_sum0AmplperLS1", " ", bac, 1., bac2);
7450 
7451  h_sumAmplLS2 = fs_->make<TH1F>("h_sumAmplLS2", " ", 100, 0.0, lsdep_estimator5_HBdepth2_);
7452  h_2DsumAmplLS2 = fs_->make<TH2F>("h_2DsumAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7453  h_sumAmplperLS2 = fs_->make<TH1F>("h_sumAmplperLS2", " ", bac, 1., bac2);
7454  h_sumCutAmplperLS2 = fs_->make<TH1F>("h_sumCutAmplperLS2", " ", bac, 1., bac2);
7455  h_2D0sumAmplLS2 = fs_->make<TH2F>("h_2D0sumAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7456  h_sum0AmplperLS2 = fs_->make<TH1F>("h_sum0AmplperLS2", " ", bac, 1., bac2);
7457 
7458  h_sumAmplLS3 = fs_->make<TH1F>("h_sumAmplLS3", " ", 100, 0.0, lsdep_estimator5_HEdepth1_);
7459  h_2DsumAmplLS3 = fs_->make<TH2F>("h_2DsumAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7460  h_sumAmplperLS3 = fs_->make<TH1F>("h_sumAmplperLS3", " ", bac, 1., bac2);
7461  h_sumCutAmplperLS3 = fs_->make<TH1F>("h_sumCutAmplperLS3", " ", bac, 1., bac2);
7462  h_2D0sumAmplLS3 = fs_->make<TH2F>("h_2D0sumAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7463  h_sum0AmplperLS3 = fs_->make<TH1F>("h_sum0AmplperLS3", " ", bac, 1., bac2);
7464 
7465  h_sumAmplLS4 = fs_->make<TH1F>("h_sumAmplLS4", " ", 100, 0.0, lsdep_estimator5_HEdepth2_);
7466  h_2DsumAmplLS4 = fs_->make<TH2F>("h_2DsumAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7467  h_sumAmplperLS4 = fs_->make<TH1F>("h_sumAmplperLS4", " ", bac, 1., bac2);
7468  h_sumCutAmplperLS4 = fs_->make<TH1F>("h_sumCutAmplperLS4", " ", bac, 1., bac2);
7469  h_2D0sumAmplLS4 = fs_->make<TH2F>("h_2D0sumAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7470  h_sum0AmplperLS4 = fs_->make<TH1F>("h_sum0AmplperLS4", " ", bac, 1., bac2);
7471 
7472  h_sumAmplLS5 = fs_->make<TH1F>("h_sumAmplLS5", " ", 100, 0.0, lsdep_estimator5_HEdepth3_);
7473  h_2DsumAmplLS5 = fs_->make<TH2F>("h_2DsumAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7474  h_sumAmplperLS5 = fs_->make<TH1F>("h_sumAmplperLS5", " ", bac, 1., bac2);
7475  h_sumCutAmplperLS5 = fs_->make<TH1F>("h_sumCutAmplperLS5", " ", bac, 1., bac2);
7476  h_2D0sumAmplLS5 = fs_->make<TH2F>("h_2D0sumAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7477  h_sum0AmplperLS5 = fs_->make<TH1F>("h_sum0AmplperLS5", " ", bac, 1., bac2);
7478 
7479  h_sumAmplLS6 = fs_->make<TH1F>("h_sumAmplLS6", " ", 100, 0.0, lsdep_estimator5_HFdepth1_);
7480  h_2DsumAmplLS6 = fs_->make<TH2F>("h_2DsumAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7481  h_sumAmplperLS6 = fs_->make<TH1F>("h_sumAmplperLS6", " ", bac, 1., bac2);
7482  h_sumCutAmplperLS6 = fs_->make<TH1F>("h_sumCutAmplperLS6", " ", bac, 1., bac2);
7483  h_2D0sumAmplLS6 = fs_->make<TH2F>("h_2D0sumAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7484  h_sum0AmplperLS6 = fs_->make<TH1F>("h_sum0AmplperLS6", " ", bac, 1., bac2);
7485 
7486  h_RatioOccupancy_HBP = fs_->make<TH1F>("h_RatioOccupancy_HBP", " ", bac, 1., bac2);
7487  h_RatioOccupancy_HBM = fs_->make<TH1F>("h_RatioOccupancy_HBM", " ", bac, 1., bac2);
7488  h_RatioOccupancy_HEP = fs_->make<TH1F>("h_RatioOccupancy_HEP", " ", bac, 1., bac2);
7489  h_RatioOccupancy_HEM = fs_->make<TH1F>("h_RatioOccupancy_HEM", " ", bac, 1., bac2);
7490  h_RatioOccupancy_HOP = fs_->make<TH1F>("h_RatioOccupancy_HOP", " ", bac, 1., bac2);
7491  h_RatioOccupancy_HOM = fs_->make<TH1F>("h_RatioOccupancy_HOM", " ", bac, 1., bac2);
7492  h_RatioOccupancy_HFP = fs_->make<TH1F>("h_RatioOccupancy_HFP", " ", bac, 1., bac2);
7493  h_RatioOccupancy_HFM = fs_->make<TH1F>("h_RatioOccupancy_HFM", " ", bac, 1., bac2);
7494 
7495  h_sumAmplLS7 = fs_->make<TH1F>("h_sumAmplLS7", " ", 100, 0.0, lsdep_estimator5_HFdepth2_);
7496  h_2DsumAmplLS7 = fs_->make<TH2F>("h_2DsumAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7497  h_sumAmplperLS7 = fs_->make<TH1F>("h_sumAmplperLS7", " ", bac, 1., bac2);
7498  h_sumCutAmplperLS7 = fs_->make<TH1F>("h_sumCutAmplperLS7", " ", bac, 1., bac2);
7499  h_2D0sumAmplLS7 = fs_->make<TH2F>("h_2D0sumAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7500  h_sum0AmplperLS7 = fs_->make<TH1F>("h_sum0AmplperLS7", " ", bac, 1., bac2);
7501 
7502  h_sumAmplLS8 = fs_->make<TH1F>("h_sumAmplLS8", " ", 100, 0.0, lsdep_estimator5_HOdepth4_);
7503  h_2DsumAmplLS8 = fs_->make<TH2F>("h_2DsumAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7504  h_sumAmplperLS8 = fs_->make<TH1F>("h_sumAmplperLS8", " ", bac, 1., bac2);
7505  h_sumCutAmplperLS8 = fs_->make<TH1F>("h_sumCutAmplperLS8", " ", bac, 1., bac2);
7506  h_2D0sumAmplLS8 = fs_->make<TH2F>("h_2D0sumAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7507  h_sum0AmplperLS8 = fs_->make<TH1F>("h_sum0AmplperLS8", " ", bac, 1., bac2);
7508  //--------------------------------------------------
7509  // for estimator6:
7510  h_sumErrorBLS1 = fs_->make<TH1F>("h_sumErrorBLS1", " ", 10, 0., 10.);
7511  h_sumErrorBperLS1 = fs_->make<TH1F>("h_sumErrorBperLS1", " ", bac, 1., bac2);
7512  h_sum0ErrorBperLS1 = fs_->make<TH1F>("h_sum0ErrorBperLS1", " ", bac, 1., bac2);
7513  h_2D0sumErrorBLS1 = fs_->make<TH2F>("h_2D0sumErrorBLS1", " ", neta, -41., 41., nphi, 0., bphi);
7514  h_2DsumErrorBLS1 = fs_->make<TH2F>("h_2DsumErrorBLS1", " ", neta, -41., 41., nphi, 0., bphi);
7515  h_sumErrorBLS2 = fs_->make<TH1F>("h_sumErrorBLS2", " ", 10, 0., 10.);
7516  h_sumErrorBperLS2 = fs_->make<TH1F>("h_sumErrorBperLS2", " ", bac, 1., bac2);
7517  h_sum0ErrorBperLS2 = fs_->make<TH1F>("h_sum0ErrorBperLS2", " ", bac, 1., bac2);
7518  h_2D0sumErrorBLS2 = fs_->make<TH2F>("h_2D0sumErrorBLS2", " ", neta, -41., 41., nphi, 0., bphi);
7519  h_2DsumErrorBLS2 = fs_->make<TH2F>("h_2DsumErrorBLS2", " ", neta, -41., 41., nphi, 0., bphi);
7520 
7521  h_sumErrorBLS3 = fs_->make<TH1F>("h_sumErrorBLS3", " ", 10, 0., 10.);
7522  h_sumErrorBperLS3 = fs_->make<TH1F>("h_sumErrorBperLS3", " ", bac, 1., bac2);
7523  h_sum0ErrorBperLS3 = fs_->make<TH1F>("h_sum0ErrorBperLS3", " ", bac, 1., bac2);
7524  h_2D0sumErrorBLS3 = fs_->make<TH2F>("h_2D0sumErrorBLS3", " ", neta, -41., 41., nphi, 0., bphi);
7525  h_2DsumErrorBLS3 = fs_->make<TH2F>("h_2DsumErrorBLS3", " ", neta, -41., 41., nphi, 0., bphi);
7526  h_sumErrorBLS4 = fs_->make<TH1F>("h_sumErrorBLS4", " ", 10, 0., 10.);
7527  h_sumErrorBperLS4 = fs_->make<TH1F>("h_sumErrorBperLS4", " ", bac, 1., bac2);
7528  h_sum0ErrorBperLS4 = fs_->make<TH1F>("h_sum0ErrorBperLS4", " ", bac, 1., bac2);
7529  h_2D0sumErrorBLS4 = fs_->make<TH2F>("h_2D0sumErrorBLS4", " ", neta, -41., 41., nphi, 0., bphi);
7530  h_2DsumErrorBLS4 = fs_->make<TH2F>("h_2DsumErrorBLS4", " ", neta, -41., 41., nphi, 0., bphi);
7531  h_sumErrorBLS5 = fs_->make<TH1F>("h_sumErrorBLS5", " ", 10, 0., 10.);
7532  h_sumErrorBperLS5 = fs_->make<TH1F>("h_sumErrorBperLS5", " ", bac, 1., bac2);
7533  h_sum0ErrorBperLS5 = fs_->make<TH1F>("h_sum0ErrorBperLS5", " ", bac, 1., bac2);
7534  h_2D0sumErrorBLS5 = fs_->make<TH2F>("h_2D0sumErrorBLS5", " ", neta, -41., 41., nphi, 0., bphi);
7535  h_2DsumErrorBLS5 = fs_->make<TH2F>("h_2DsumErrorBLS5", " ", neta, -41., 41., nphi, 0., bphi);
7536 
7537  h_sumErrorBLS6 = fs_->make<TH1F>("h_sumErrorBLS6", " ", 10, 0., 10.);
7538  h_sumErrorBperLS6 = fs_->make<TH1F>("h_sumErrorBperLS6", " ", bac, 1., bac2);
7539  h_sum0ErrorBperLS6 = fs_->make<TH1F>("h_sum0ErrorBperLS6", " ", bac, 1., bac2);
7540  h_2D0sumErrorBLS6 = fs_->make<TH2F>("h_2D0sumErrorBLS6", " ", neta, -41., 41., nphi, 0., bphi);
7541  h_2DsumErrorBLS6 = fs_->make<TH2F>("h_2DsumErrorBLS6", " ", neta, -41., 41., nphi, 0., bphi);
7542  h_sumErrorBLS7 = fs_->make<TH1F>("h_sumErrorBLS7", " ", 10, 0., 10.);
7543  h_sumErrorBperLS7 = fs_->make<TH1F>("h_sumErrorBperLS7", " ", bac, 1., bac2);
7544  h_sum0ErrorBperLS7 = fs_->make<TH1F>("h_sum0ErrorBperLS7", " ", bac, 1., bac2);
7545  h_2D0sumErrorBLS7 = fs_->make<TH2F>("h_2D0sumErrorBLS7", " ", neta, -41., 41., nphi, 0., bphi);
7546  h_2DsumErrorBLS7 = fs_->make<TH2F>("h_2DsumErrorBLS7", " ", neta, -41., 41., nphi, 0., bphi);
7547 
7548  h_sumErrorBLS8 = fs_->make<TH1F>("h_sumErrorBLS8", " ", 10, 0., 10.);
7549  h_sumErrorBperLS8 = fs_->make<TH1F>("h_sumErrorBperLS8", " ", bac, 1., bac2);
7550  h_sum0ErrorBperLS8 = fs_->make<TH1F>("h_sum0ErrorBperLS8", " ", bac, 1., bac2);
7551  h_2D0sumErrorBLS8 = fs_->make<TH2F>("h_2D0sumErrorBLS8", " ", neta, -41., 41., nphi, 0., bphi);
7552  h_2DsumErrorBLS8 = fs_->make<TH2F>("h_2DsumErrorBLS8", " ", neta, -41., 41., nphi, 0., bphi);
7553 
7554  //--------------------------------------------------
7555  // for averSIGNALOCCUPANCY :
7556  h_averSIGNALoccupancy_HB = fs_->make<TH1F>("h_averSIGNALoccupancy_HB", " ", bac, 1., bac2);
7557  h_averSIGNALoccupancy_HE = fs_->make<TH1F>("h_averSIGNALoccupancy_HE", " ", bac, 1., bac2);
7558  h_averSIGNALoccupancy_HF = fs_->make<TH1F>("h_averSIGNALoccupancy_HF", " ", bac, 1., bac2);
7559  h_averSIGNALoccupancy_HO = fs_->make<TH1F>("h_averSIGNALoccupancy_HO", " ", bac, 1., bac2);
7560 
7561  // for averSIGNALsumamplitude :
7562  h_averSIGNALsumamplitude_HB = fs_->make<TH1F>("h_averSIGNALsumamplitude_HB", " ", bac, 1., bac2);
7563  h_averSIGNALsumamplitude_HE = fs_->make<TH1F>("h_averSIGNALsumamplitude_HE", " ", bac, 1., bac2);
7564  h_averSIGNALsumamplitude_HF = fs_->make<TH1F>("h_averSIGNALsumamplitude_HF", " ", bac, 1., bac2);
7565  h_averSIGNALsumamplitude_HO = fs_->make<TH1F>("h_averSIGNALsumamplitude_HO", " ", bac, 1., bac2);
7566 
7567  // for averNOSIGNALOCCUPANCY :
7568  h_averNOSIGNALoccupancy_HB = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HB", " ", bac, 1., bac2);
7569  h_averNOSIGNALoccupancy_HE = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HE", " ", bac, 1., bac2);
7570  h_averNOSIGNALoccupancy_HF = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HF", " ", bac, 1., bac2);
7571  h_averNOSIGNALoccupancy_HO = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HO", " ", bac, 1., bac2);
7572 
7573  // for averNOSIGNALsumamplitude :
7574  h_averNOSIGNALsumamplitude_HB = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HB", " ", bac, 1., bac2);
7575  h_averNOSIGNALsumamplitude_HE = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HE", " ", bac, 1., bac2);
7576  h_averNOSIGNALsumamplitude_HF = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HF", " ", bac, 1., bac2);
7577  h_averNOSIGNALsumamplitude_HO = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HO", " ", bac, 1., bac2);
7578 
7579  // for channel SUM over depthes Amplitudes for each sub-detector
7580  h_sumamplitudechannel_HB = fs_->make<TH1F>("h_sumamplitudechannel_HB", " ", 100, 0., 2000.);
7581  h_sumamplitudechannel_HE = fs_->make<TH1F>("h_sumamplitudechannel_HE", " ", 100, 0., 3000.);
7582  h_sumamplitudechannel_HF = fs_->make<TH1F>("h_sumamplitudechannel_HF", " ", 100, 0., 7000.);
7583  h_sumamplitudechannel_HO = fs_->make<TH1F>("h_sumamplitudechannel_HO", " ", 100, 0., 10000.);
7584 
7585  // for event Amplitudes for each sub-detector
7586  h_eventamplitude_HB = fs_->make<TH1F>("h_eventamplitude_HB", " ", 100, 0., 80000.);
7587  h_eventamplitude_HE = fs_->make<TH1F>("h_eventamplitude_HE", " ", 100, 0., 100000.);
7588  h_eventamplitude_HF = fs_->make<TH1F>("h_eventamplitude_HF", " ", 100, 0., 150000.);
7589  h_eventamplitude_HO = fs_->make<TH1F>("h_eventamplitude_HO", " ", 100, 0., 250000.);
7590 
7591  // for event Occupancy for each sub-detector
7592  h_eventoccupancy_HB = fs_->make<TH1F>("h_eventoccupancy_HB", " ", 100, 0., 3000.);
7593  h_eventoccupancy_HE = fs_->make<TH1F>("h_eventoccupancy_HE", " ", 100, 0., 2000.);
7594  h_eventoccupancy_HF = fs_->make<TH1F>("h_eventoccupancy_HF", " ", 100, 0., 1000.);
7595  h_eventoccupancy_HO = fs_->make<TH1F>("h_eventoccupancy_HO", " ", 100, 0., 2500.);
7596 
7597  // for maxxSUMAmplitude
7598  h_maxxSUMAmpl_HB = fs_->make<TH1F>("h_maxxSUMAmpl_HB", " ", bac, 1., bac2);
7599  h_maxxSUMAmpl_HE = fs_->make<TH1F>("h_maxxSUMAmpl_HE", " ", bac, 1., bac2);
7600  h_maxxSUMAmpl_HF = fs_->make<TH1F>("h_maxxSUMAmpl_HF", " ", bac, 1., bac2);
7601  h_maxxSUMAmpl_HO = fs_->make<TH1F>("h_maxxSUMAmpl_HO", " ", bac, 1., bac2);
7602 
7603  // for maxxOCCUP
7604  h_maxxOCCUP_HB = fs_->make<TH1F>("h_maxxOCCUP_HB", " ", bac, 1., bac2);
7605  h_maxxOCCUP_HE = fs_->make<TH1F>("h_maxxOCCUP_HE", " ", bac, 1., bac2);
7606  h_maxxOCCUP_HF = fs_->make<TH1F>("h_maxxOCCUP_HF", " ", bac, 1., bac2);
7607  h_maxxOCCUP_HO = fs_->make<TH1F>("h_maxxOCCUP_HO", " ", bac, 1., bac2);
7608  //--------------------------------------------------
7609  // pedestals
7610  h_pedestal0_HB = fs_->make<TH1F>("h_pedestal0_HB", " ", 100, 0., 10.);
7611  h_pedestal1_HB = fs_->make<TH1F>("h_pedestal1_HB", " ", 100, 0., 10.);
7612  h_pedestal2_HB = fs_->make<TH1F>("h_pedestal2_HB", " ", 100, 0., 10.);
7613  h_pedestal3_HB = fs_->make<TH1F>("h_pedestal3_HB", " ", 100, 0., 10.);
7614  h_pedestalaver4_HB = fs_->make<TH1F>("h_pedestalaver4_HB", " ", 100, 0., 10.);
7615  h_pedestalaver9_HB = fs_->make<TH1F>("h_pedestalaver9_HB", " ", 100, 0., 10.);
7616  h_pedestalw0_HB = fs_->make<TH1F>("h_pedestalw0_HB", " ", 100, 0., 2.5);
7617  h_pedestalw1_HB = fs_->make<TH1F>("h_pedestalw1_HB", " ", 100, 0., 2.5);
7618  h_pedestalw2_HB = fs_->make<TH1F>("h_pedestalw2_HB", " ", 100, 0., 2.5);
7619  h_pedestalw3_HB = fs_->make<TH1F>("h_pedestalw3_HB", " ", 100, 0., 2.5);
7620  h_pedestalwaver4_HB = fs_->make<TH1F>("h_pedestalwaver4_HB", " ", 100, 0., 2.5);
7621  h_pedestalwaver9_HB = fs_->make<TH1F>("h_pedestalwaver9_HB", " ", 100, 0., 2.5);
7622 
7623  h_pedestal0_HE = fs_->make<TH1F>("h_pedestal0_HE", " ", 100, 0., 10.);
7624  h_pedestal1_HE = fs_->make<TH1F>("h_pedestal1_HE", " ", 100, 0., 10.);
7625  h_pedestal2_HE = fs_->make<TH1F>("h_pedestal2_HE", " ", 100, 0., 10.);
7626  h_pedestal3_HE = fs_->make<TH1F>("h_pedestal3_HE", " ", 100, 0., 10.);
7627  h_pedestalaver4_HE = fs_->make<TH1F>("h_pedestalaver4_HE", " ", 100, 0., 10.);
7628  h_pedestalaver9_HE = fs_->make<TH1F>("h_pedestalaver9_HE", " ", 100, 0., 10.);
7629  h_pedestalw0_HE = fs_->make<TH1F>("h_pedestalw0_HE", " ", 100, 0., 2.5);
7630  h_pedestalw1_HE = fs_->make<TH1F>("h_pedestalw1_HE", " ", 100, 0., 2.5);
7631  h_pedestalw2_HE = fs_->make<TH1F>("h_pedestalw2_HE", " ", 100, 0., 2.5);
7632  h_pedestalw3_HE = fs_->make<TH1F>("h_pedestalw3_HE", " ", 100, 0., 2.5);
7633  h_pedestalwaver4_HE = fs_->make<TH1F>("h_pedestalwaver4_HE", " ", 100, 0., 2.5);
7634  h_pedestalwaver9_HE = fs_->make<TH1F>("h_pedestalwaver9_HE", " ", 100, 0., 2.5);
7635 
7636  h_pedestal0_HF = fs_->make<TH1F>("h_pedestal0_HF", " ", 100, 0., 20.);
7637  h_pedestal1_HF = fs_->make<TH1F>("h_pedestal1_HF", " ", 100, 0., 20.);
7638  h_pedestal2_HF = fs_->make<TH1F>("h_pedestal2_HF", " ", 100, 0., 20.);
7639  h_pedestal3_HF = fs_->make<TH1F>("h_pedestal3_HF", " ", 100, 0., 20.);
7640  h_pedestalaver4_HF = fs_->make<TH1F>("h_pedestalaver4_HF", " ", 100, 0., 20.);
7641  h_pedestalaver9_HF = fs_->make<TH1F>("h_pedestalaver9_HF", " ", 100, 0., 20.);
7642  h_pedestalw0_HF = fs_->make<TH1F>("h_pedestalw0_HF", " ", 100, 0., 2.5);
7643  h_pedestalw1_HF = fs_->make<TH1F>("h_pedestalw1_HF", " ", 100, 0., 2.5);
7644  h_pedestalw2_HF = fs_->make<TH1F>("h_pedestalw2_HF", " ", 100, 0., 2.5);
7645  h_pedestalw3_HF = fs_->make<TH1F>("h_pedestalw3_HF", " ", 100, 0., 2.5);
7646  h_pedestalwaver4_HF = fs_->make<TH1F>("h_pedestalwaver4_HF", " ", 100, 0., 2.5);
7647  h_pedestalwaver9_HF = fs_->make<TH1F>("h_pedestalwaver9_HF", " ", 100, 0., 2.5);
7648 
7649  h_pedestal0_HO = fs_->make<TH1F>("h_pedestal0_HO", " ", 100, 0., 20.);
7650  h_pedestal1_HO = fs_->make<TH1F>("h_pedestal1_HO", " ", 100, 0., 20.);
7651  h_pedestal2_HO = fs_->make<TH1F>("h_pedestal2_HO", " ", 100, 0., 20.);
7652  h_pedestal3_HO = fs_->make<TH1F>("h_pedestal3_HO", " ", 100, 0., 20.);
7653  h_pedestalaver4_HO = fs_->make<TH1F>("h_pedestalaver4_HO", " ", 100, 0., 20.);
7654  h_pedestalaver9_HO = fs_->make<TH1F>("h_pedestalaver9_HO", " ", 100, 0., 20.);
7655  h_pedestalw0_HO = fs_->make<TH1F>("h_pedestalw0_HO", " ", 100, 0., 2.5);
7656  h_pedestalw1_HO = fs_->make<TH1F>("h_pedestalw1_HO", " ", 100, 0., 2.5);
7657  h_pedestalw2_HO = fs_->make<TH1F>("h_pedestalw2_HO", " ", 100, 0., 2.5);
7658  h_pedestalw3_HO = fs_->make<TH1F>("h_pedestalw3_HO", " ", 100, 0., 2.5);
7659  h_pedestalwaver4_HO = fs_->make<TH1F>("h_pedestalwaver4_HO", " ", 100, 0., 2.5);
7660  h_pedestalwaver9_HO = fs_->make<TH1F>("h_pedestalwaver9_HO", " ", 100, 0., 2.5);
7661  //--------------------------------------------------
7662  h_mapDepth1pedestalw_HB = fs_->make<TH2F>("h_mapDepth1pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7663  h_mapDepth2pedestalw_HB = fs_->make<TH2F>("h_mapDepth2pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7664  h_mapDepth3pedestalw_HB = fs_->make<TH2F>("h_mapDepth3pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7665  h_mapDepth4pedestalw_HB = fs_->make<TH2F>("h_mapDepth4pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7666  h_mapDepth1pedestalw_HE = fs_->make<TH2F>("h_mapDepth1pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7667  h_mapDepth2pedestalw_HE = fs_->make<TH2F>("h_mapDepth2pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7668  h_mapDepth3pedestalw_HE = fs_->make<TH2F>("h_mapDepth3pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7669  h_mapDepth4pedestalw_HE = fs_->make<TH2F>("h_mapDepth4pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7670  h_mapDepth5pedestalw_HE = fs_->make<TH2F>("h_mapDepth5pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7671  h_mapDepth6pedestalw_HE = fs_->make<TH2F>("h_mapDepth6pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7672  h_mapDepth7pedestalw_HE = fs_->make<TH2F>("h_mapDepth7pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7673  h_mapDepth1pedestalw_HF = fs_->make<TH2F>("h_mapDepth1pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7674  h_mapDepth2pedestalw_HF = fs_->make<TH2F>("h_mapDepth2pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7675  h_mapDepth3pedestalw_HF = fs_->make<TH2F>("h_mapDepth3pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7676  h_mapDepth4pedestalw_HF = fs_->make<TH2F>("h_mapDepth4pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7677  h_mapDepth4pedestalw_HO = fs_->make<TH2F>("h_mapDepth4pedestalw_HO", " ", neta, -41., 41., nphi, 0., bphi);
7678 
7679  h_mapDepth1pedestal_HB = fs_->make<TH2F>("h_mapDepth1pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7680  h_mapDepth2pedestal_HB = fs_->make<TH2F>("h_mapDepth2pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7681  h_mapDepth3pedestal_HB = fs_->make<TH2F>("h_mapDepth3pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7682  h_mapDepth4pedestal_HB = fs_->make<TH2F>("h_mapDepth4pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7683  h_mapDepth1pedestal_HE = fs_->make<TH2F>("h_mapDepth1pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7684  h_mapDepth2pedestal_HE = fs_->make<TH2F>("h_mapDepth2pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7685  h_mapDepth3pedestal_HE = fs_->make<TH2F>("h_mapDepth3pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7686  h_mapDepth4pedestal_HE = fs_->make<TH2F>("h_mapDepth4pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7687  h_mapDepth5pedestal_HE = fs_->make<TH2F>("h_mapDepth5pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7688  h_mapDepth6pedestal_HE = fs_->make<TH2F>("h_mapDepth6pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7689  h_mapDepth7pedestal_HE = fs_->make<TH2F>("h_mapDepth7pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7690  h_mapDepth1pedestal_HF = fs_->make<TH2F>("h_mapDepth1pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7691  h_mapDepth2pedestal_HF = fs_->make<TH2F>("h_mapDepth2pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7692  h_mapDepth3pedestal_HF = fs_->make<TH2F>("h_mapDepth3pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7693  h_mapDepth4pedestal_HF = fs_->make<TH2F>("h_mapDepth4pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7694  h_mapDepth4pedestal_HO = fs_->make<TH2F>("h_mapDepth4pedestal_HO", " ", neta, -41., 41., nphi, 0., bphi);
7695  //--------------------------------------------------
7696  h_pedestal00_HB = fs_->make<TH1F>("h_pedestal00_HB", " ", 100, 0., 10.);
7697  h_gain_HB = fs_->make<TH1F>("h_gain_HB", " ", 100, 0., 1.);
7698  h_respcorr_HB = fs_->make<TH1F>("h_respcorr_HB", " ", 100, 0., 2.5);
7699  h_timecorr_HB = fs_->make<TH1F>("h_timecorr_HB", " ", 100, 0., 30.);
7700  h_lutcorr_HB = fs_->make<TH1F>("h_lutcorr_HB", " ", 100, 0., 10.);
7701  h_difpedestal0_HB = fs_->make<TH1F>("h_difpedestal0_HB", " ", 100, -3., 3.);
7702  h_difpedestal1_HB = fs_->make<TH1F>("h_difpedestal1_HB", " ", 100, -3., 3.);
7703  h_difpedestal2_HB = fs_->make<TH1F>("h_difpedestal2_HB", " ", 100, -3., 3.);
7704  h_difpedestal3_HB = fs_->make<TH1F>("h_difpedestal3_HB", " ", 100, -3., 3.);
7705 
7706  h_pedestal00_HE = fs_->make<TH1F>("h_pedestal00_HE", " ", 100, 0., 10.);
7707  h_gain_HE = fs_->make<TH1F>("h_gain_HE", " ", 100, 0., 1.);
7708  h_respcorr_HE = fs_->make<TH1F>("h_respcorr_HE", " ", 100, 0., 2.5);
7709  h_timecorr_HE = fs_->make<TH1F>("h_timecorr_HE", " ", 100, 0., 30.);
7710  h_lutcorr_HE = fs_->make<TH1F>("h_lutcorr_HE", " ", 100, 0., 10.);
7711 
7712  h_pedestal00_HF = fs_->make<TH1F>("h_pedestal00_HF", " ", 100, 0., 10.);
7713  h_gain_HF = fs_->make<TH1F>("h_gain_HF", " ", 100, 0., 1.);
7714  h_respcorr_HF = fs_->make<TH1F>("h_respcorr_HF", " ", 100, 0., 2.5);
7715  h_timecorr_HF = fs_->make<TH1F>("h_timecorr_HF", " ", 100, 0., 30.);
7716  h_lutcorr_HF = fs_->make<TH1F>("h_lutcorr_HF", " ", 100, 0., 10.);
7717 
7718  h_pedestal00_HO = fs_->make<TH1F>("h_pedestal00_HO", " ", 100, 0., 10.);
7719  h_gain_HO = fs_->make<TH1F>("h_gain_HO", " ", 100, 0., 1.);
7720  h_respcorr_HO = fs_->make<TH1F>("h_respcorr_HO", " ", 100, 0., 2.5);
7721  h_timecorr_HO = fs_->make<TH1F>("h_timecorr_HO", " ", 100, 0., 30.);
7722  h_lutcorr_HO = fs_->make<TH1F>("h_lutcorr_HO", " ", 100, 0., 10.);
7723  //--------------------------------------------------
7724  h2_TSnVsAyear2023_HB = fs_->make<TH2F>("h2_TSnVsAyear2023_HB", " ", 100, 200., 30200., 100, 0., 175.);
7725  h2_TSnVsAyear2023_HE = fs_->make<TH2F>("h2_TSnVsAyear2023_HE", " ", 100, 200., 75200., 100, 0., 175.);
7726  h2_TSnVsAyear2023_HF = fs_->make<TH2F>("h2_TSnVsAyear2023_HF", " ", 100, 0., 2000., 100, 0., 50.);
7727  h2_TSnVsAyear2023_HO = fs_->make<TH2F>("h2_TSnVsAyear2023_HO", " ", 100, 0., 1000., 100, 0., 225.);
7728  //-----------------------------
7729  h1_TSnVsAyear2023_HB = fs_->make<TH1F>("h1_TSnVsAyear2023_HB", " ", 100, 200., 15200);
7730  h1_TSnVsAyear2023_HE = fs_->make<TH1F>("h1_TSnVsAyear2023_HE", " ", 100, 200., 25200);
7731  h1_TSnVsAyear2023_HF = fs_->make<TH1F>("h1_TSnVsAyear2023_HF", " ", 100, 0., 1500);
7732  h1_TSnVsAyear2023_HO = fs_->make<TH1F>("h1_TSnVsAyear2023_HO", " ", 100, 0., 750);
7733  h1_TSnVsAyear20230_HB = fs_->make<TH1F>("h1_TSnVsAyear20230_HB", " ", 100, 200., 15200);
7734  h1_TSnVsAyear20230_HE = fs_->make<TH1F>("h1_TSnVsAyear20230_HE", " ", 100, 200., 25200);
7735  h1_TSnVsAyear20230_HF = fs_->make<TH1F>("h1_TSnVsAyear20230_HF", " ", 100, 0., 1500);
7736  h1_TSnVsAyear20230_HO = fs_->make<TH1F>("h1_TSnVsAyear20230_HO", " ", 100, 0., 750);
7737  //--------------------------------------------------
7738  float est6 = 2500.;
7739  int ist6 = 30;
7740  int ist2 = 60;
7741  h2_pedvsampl_HB = fs_->make<TH2F>("h2_pedvsampl_HB", " ", ist2, 0., 7.0, ist2, 0., est6);
7742  h2_pedwvsampl_HB = fs_->make<TH2F>("h2_pedwvsampl_HB", " ", ist2, 0., 2.5, ist2, 0., est6);
7743  h_pedvsampl_HB = fs_->make<TH1F>("h_pedvsampl_HB", " ", ist6, 0., 7.0);
7744  h_pedwvsampl_HB = fs_->make<TH1F>("h_pedwvsampl_HB", " ", ist6, 0., 2.5);
7745  h_pedvsampl0_HB = fs_->make<TH1F>("h_pedvsampl0_HB", " ", ist6, 0., 7.);
7746  h_pedwvsampl0_HB = fs_->make<TH1F>("h_pedwvsampl0_HB", " ", ist6, 0., 2.5);
7747  h2_amplvsped_HB = fs_->make<TH2F>("h2_amplvsped_HB", " ", ist2, 0., est6, ist2, 0., 7.0);
7748  h2_amplvspedw_HB = fs_->make<TH2F>("h2_amplvspedw_HB", " ", ist2, 0., est6, ist2, 0., 2.5);
7749  h_amplvsped_HB = fs_->make<TH1F>("h_amplvsped_HB", " ", ist6, 0., est6);
7750  h_amplvspedw_HB = fs_->make<TH1F>("h_amplvspedw_HB", " ", ist6, 0., est6);
7751  h_amplvsped0_HB = fs_->make<TH1F>("h_amplvsped0_HB", " ", ist6, 0., est6);
7752 
7753  h2_pedvsampl_HE = fs_->make<TH2F>("h2_pedvsampl_HE", " ", ist2, 0., 7.0, ist2, 0., est6);
7754  h2_pedwvsampl_HE = fs_->make<TH2F>("h2_pedwvsampl_HE", " ", ist2, 0., 2.5, ist2, 0., est6);
7755  h_pedvsampl_HE = fs_->make<TH1F>("h_pedvsampl_HE", " ", ist6, 0., 7.0);
7756  h_pedwvsampl_HE = fs_->make<TH1F>("h_pedwvsampl_HE", " ", ist6, 0., 2.5);
7757  h_pedvsampl0_HE = fs_->make<TH1F>("h_pedvsampl0_HE", " ", ist6, 0., 7.);
7758  h_pedwvsampl0_HE = fs_->make<TH1F>("h_pedwvsampl0_HE", " ", ist6, 0., 2.5);
7759 
7760  h2_pedvsampl_HF = fs_->make<TH2F>("h2_pedvsampl_HF", " ", ist2, 0., 20.0, ist2, 0., est6);
7761  h2_pedwvsampl_HF = fs_->make<TH2F>("h2_pedwvsampl_HF", " ", ist2, 0., 2.0, ist2, 0., est6);
7762  h_pedvsampl_HF = fs_->make<TH1F>("h_pedvsampl_HF", " ", ist6, 0., 20.0);
7763  h_pedwvsampl_HF = fs_->make<TH1F>("h_pedwvsampl_HF", " ", ist6, 0., 2.0);
7764  h_pedvsampl0_HF = fs_->make<TH1F>("h_pedvsampl0_HF", " ", ist6, 0., 20.);
7765  h_pedwvsampl0_HF = fs_->make<TH1F>("h_pedwvsampl0_HF", " ", ist6, 0., 2.0);
7766 
7767  h2_pedvsampl_HO = fs_->make<TH2F>("h2_pedvsampl_HO", " ", ist2, 0., 20.0, ist2, 0., est6);
7768  h2_pedwvsampl_HO = fs_->make<TH2F>("h2_pedwvsampl_HO", " ", ist2, 0., 2.5, ist2, 0., est6);
7769  h_pedvsampl_HO = fs_->make<TH1F>("h_pedvsampl_HO", " ", ist6, 0., 20.0);
7770  h_pedwvsampl_HO = fs_->make<TH1F>("h_pedwvsampl_HO", " ", ist6, 0., 2.5);
7771  h_pedvsampl0_HO = fs_->make<TH1F>("h_pedvsampl0_HO", " ", ist6, 0., 20.);
7772  h_pedwvsampl0_HO = fs_->make<TH1F>("h_pedwvsampl0_HO", " ", ist6, 0., 2.5);
7773  //--------------------------------------------------
7774  h_mapDepth1Ped0_HB = fs_->make<TH2F>("h_mapDepth1Ped0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7775  h_mapDepth1Ped1_HB = fs_->make<TH2F>("h_mapDepth1Ped1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7776  h_mapDepth1Ped2_HB = fs_->make<TH2F>("h_mapDepth1Ped2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7777  h_mapDepth1Ped3_HB = fs_->make<TH2F>("h_mapDepth1Ped3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7778  h_mapDepth1Pedw0_HB = fs_->make<TH2F>("h_mapDepth1Pedw0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7779  h_mapDepth1Pedw1_HB = fs_->make<TH2F>("h_mapDepth1Pedw1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7780  h_mapDepth1Pedw2_HB = fs_->make<TH2F>("h_mapDepth1Pedw2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7781  h_mapDepth1Pedw3_HB = fs_->make<TH2F>("h_mapDepth1Pedw3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7782  h_mapDepth2Ped0_HB = fs_->make<TH2F>("h_mapDepth2Ped0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7783  h_mapDepth2Ped1_HB = fs_->make<TH2F>("h_mapDepth2Ped1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7784  h_mapDepth2Ped2_HB = fs_->make<TH2F>("h_mapDepth2Ped2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7785  h_mapDepth2Ped3_HB = fs_->make<TH2F>("h_mapDepth2Ped3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7786  h_mapDepth2Pedw0_HB = fs_->make<TH2F>("h_mapDepth2Pedw0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7787  h_mapDepth2Pedw1_HB = fs_->make<TH2F>("h_mapDepth2Pedw1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7788  h_mapDepth2Pedw2_HB = fs_->make<TH2F>("h_mapDepth2Pedw2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7789  h_mapDepth2Pedw3_HB = fs_->make<TH2F>("h_mapDepth2Pedw3_HB", " ", neta, -41., 41., nphi, 0., bphi);
7790 
7791  h_mapDepth1Ped0_HE = fs_->make<TH2F>("h_mapDepth1Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7792  h_mapDepth1Ped1_HE = fs_->make<TH2F>("h_mapDepth1Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7793  h_mapDepth1Ped2_HE = fs_->make<TH2F>("h_mapDepth1Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7794  h_mapDepth1Ped3_HE = fs_->make<TH2F>("h_mapDepth1Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7795  h_mapDepth1Pedw0_HE = fs_->make<TH2F>("h_mapDepth1Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7796  h_mapDepth1Pedw1_HE = fs_->make<TH2F>("h_mapDepth1Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7797  h_mapDepth1Pedw2_HE = fs_->make<TH2F>("h_mapDepth1Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7798  h_mapDepth1Pedw3_HE = fs_->make<TH2F>("h_mapDepth1Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7799  h_mapDepth2Ped0_HE = fs_->make<TH2F>("h_mapDepth2Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7800  h_mapDepth2Ped1_HE = fs_->make<TH2F>("h_mapDepth2Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7801  h_mapDepth2Ped2_HE = fs_->make<TH2F>("h_mapDepth2Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7802  h_mapDepth2Ped3_HE = fs_->make<TH2F>("h_mapDepth2Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7803  h_mapDepth2Pedw0_HE = fs_->make<TH2F>("h_mapDepth2Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7804  h_mapDepth2Pedw1_HE = fs_->make<TH2F>("h_mapDepth2Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7805  h_mapDepth2Pedw2_HE = fs_->make<TH2F>("h_mapDepth2Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7806  h_mapDepth2Pedw3_HE = fs_->make<TH2F>("h_mapDepth2Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7807  h_mapDepth3Ped0_HE = fs_->make<TH2F>("h_mapDepth3Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7808  h_mapDepth3Ped1_HE = fs_->make<TH2F>("h_mapDepth3Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7809  h_mapDepth3Ped2_HE = fs_->make<TH2F>("h_mapDepth3Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7810  h_mapDepth3Ped3_HE = fs_->make<TH2F>("h_mapDepth3Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7811  h_mapDepth3Pedw0_HE = fs_->make<TH2F>("h_mapDepth3Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7812  h_mapDepth3Pedw1_HE = fs_->make<TH2F>("h_mapDepth3Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
7813  h_mapDepth3Pedw2_HE = fs_->make<TH2F>("h_mapDepth3Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
7814  h_mapDepth3Pedw3_HE = fs_->make<TH2F>("h_mapDepth3Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
7815 
7816  h_mapDepth1Ped0_HF = fs_->make<TH2F>("h_mapDepth1Ped0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7817  h_mapDepth1Ped1_HF = fs_->make<TH2F>("h_mapDepth1Ped1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7818  h_mapDepth1Ped2_HF = fs_->make<TH2F>("h_mapDepth1Ped2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7819  h_mapDepth1Ped3_HF = fs_->make<TH2F>("h_mapDepth1Ped3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7820  h_mapDepth1Pedw0_HF = fs_->make<TH2F>("h_mapDepth1Pedw0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7821  h_mapDepth1Pedw1_HF = fs_->make<TH2F>("h_mapDepth1Pedw1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7822  h_mapDepth1Pedw2_HF = fs_->make<TH2F>("h_mapDepth1Pedw2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7823  h_mapDepth1Pedw3_HF = fs_->make<TH2F>("h_mapDepth1Pedw3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7824  h_mapDepth2Ped0_HF = fs_->make<TH2F>("h_mapDepth2Ped0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7825  h_mapDepth2Ped1_HF = fs_->make<TH2F>("h_mapDepth2Ped1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7826  h_mapDepth2Ped2_HF = fs_->make<TH2F>("h_mapDepth2Ped2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7827  h_mapDepth2Ped3_HF = fs_->make<TH2F>("h_mapDepth2Ped3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7828  h_mapDepth2Pedw0_HF = fs_->make<TH2F>("h_mapDepth2Pedw0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7829  h_mapDepth2Pedw1_HF = fs_->make<TH2F>("h_mapDepth2Pedw1_HF", " ", neta, -41., 41., nphi, 0., bphi);
7830  h_mapDepth2Pedw2_HF = fs_->make<TH2F>("h_mapDepth2Pedw2_HF", " ", neta, -41., 41., nphi, 0., bphi);
7831  h_mapDepth2Pedw3_HF = fs_->make<TH2F>("h_mapDepth2Pedw3_HF", " ", neta, -41., 41., nphi, 0., bphi);
7832 
7833  h_mapDepth4Ped0_HO = fs_->make<TH2F>("h_mapDepth4Ped0_HO", " ", neta, -41., 41., nphi, 0., bphi);
7834  h_mapDepth4Ped1_HO = fs_->make<TH2F>("h_mapDepth4Ped1_HO", " ", neta, -41., 41., nphi, 0., bphi);
7835  h_mapDepth4Ped2_HO = fs_->make<TH2F>("h_mapDepth4Ped2_HO", " ", neta, -41., 41., nphi, 0., bphi);
7836  h_mapDepth4Ped3_HO = fs_->make<TH2F>("h_mapDepth4Ped3_HO", " ", neta, -41., 41., nphi, 0., bphi);
7837  h_mapDepth4Pedw0_HO = fs_->make<TH2F>("h_mapDepth4Pedw0_HO", " ", neta, -41., 41., nphi, 0., bphi);
7838  h_mapDepth4Pedw1_HO = fs_->make<TH2F>("h_mapDepth4Pedw1_HO", " ", neta, -41., 41., nphi, 0., bphi);
7839  h_mapDepth4Pedw2_HO = fs_->make<TH2F>("h_mapDepth4Pedw2_HO", " ", neta, -41., 41., nphi, 0., bphi);
7840  h_mapDepth4Pedw3_HO = fs_->make<TH2F>("h_mapDepth4Pedw3_HO", " ", neta, -41., 41., nphi, 0., bphi);
7841  //--------------------------------------------------
7842  h_mapDepth1ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7843  h_mapDepth2ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7844  h_mapDepth3ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7845  h_mapDepth4ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
7846  h_mapDepth1ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7847  h_mapDepth2ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7848  h_mapDepth3ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7849  h_mapDepth4ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7850  h_mapDepth5ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7851  h_mapDepth6ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7852  h_mapDepth7ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7853  h_mapDepth1ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
7854  h_mapDepth2ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
7855  h_mapDepth3ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
7856 
7857  h_mapDepth1ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7858  h_mapDepth2ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7859  h_mapDepth3ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7860  h_mapDepth4ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
7861 
7862  h_mapDepth4ADCAmpl12_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HO", " ", neta, -41., 41., nphi, 0., bphi);
7863 
7864  h_mapDepth1linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth1linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7865  h_mapDepth2linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth2linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7866  h_mapDepth3linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth3linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
7867  //--------------------------------------------------
7869  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7871  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7873  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7875  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7877  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7879  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7881  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HO", " ", neta, -41., 41., nphi, 0., bphi);
7883  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HO", " ", neta, -41., 41., nphi, 0., bphi);
7884  //--------------------------------------------------
7885  h_shape_Ahigh_HB0 = fs_->make<TH1F>("h_shape_Ahigh_HB0", " ", 10, 0., 10.);
7886  h_shape0_Ahigh_HB0 = fs_->make<TH1F>("h_shape0_Ahigh_HB0", " ", 10, 0., 10.);
7887  h_shape_Alow_HB0 = fs_->make<TH1F>("h_shape_Alow_HB0", " ", 10, 0., 10.);
7888  h_shape0_Alow_HB0 = fs_->make<TH1F>("h_shape0_Alow_HB0", " ", 10, 0., 10.);
7889  h_shape_Ahigh_HB1 = fs_->make<TH1F>("h_shape_Ahigh_HB1", " ", 10, 0., 10.);
7890  h_shape0_Ahigh_HB1 = fs_->make<TH1F>("h_shape0_Ahigh_HB1", " ", 10, 0., 10.);
7891  h_shape_Alow_HB1 = fs_->make<TH1F>("h_shape_Alow_HB1", " ", 10, 0., 10.);
7892  h_shape0_Alow_HB1 = fs_->make<TH1F>("h_shape0_Alow_HB1", " ", 10, 0., 10.);
7893  h_shape_Ahigh_HB2 = fs_->make<TH1F>("h_shape_Ahigh_HB2", " ", 10, 0., 10.);
7894  h_shape0_Ahigh_HB2 = fs_->make<TH1F>("h_shape0_Ahigh_HB2", " ", 10, 0., 10.);
7895  h_shape_Alow_HB2 = fs_->make<TH1F>("h_shape_Alow_HB2", " ", 10, 0., 10.);
7896  h_shape0_Alow_HB2 = fs_->make<TH1F>("h_shape0_Alow_HB2", " ", 10, 0., 10.);
7897  h_shape_Ahigh_HB3 = fs_->make<TH1F>("h_shape_Ahigh_HB3", " ", 10, 0., 10.);
7898  h_shape0_Ahigh_HB3 = fs_->make<TH1F>("h_shape0_Ahigh_HB3", " ", 10, 0., 10.);
7899  h_shape_Alow_HB3 = fs_->make<TH1F>("h_shape_Alow_HB3", " ", 10, 0., 10.);
7900  h_shape0_Alow_HB3 = fs_->make<TH1F>("h_shape0_Alow_HB3", " ", 10, 0., 10.);
7901  //--------------------------------------------------
7902  h_shape_bad_channels_HB = fs_->make<TH1F>("h_shape_bad_channels_HB", " ", 10, 0., 10.);
7903  h_shape0_bad_channels_HB = fs_->make<TH1F>("h_shape0_bad_channels_HB", " ", 10, 0., 10.);
7904  h_shape_good_channels_HB = fs_->make<TH1F>("h_shape_good_channels_HB", " ", 10, 0., 10.);
7905  h_shape0_good_channels_HB = fs_->make<TH1F>("h_shape0_good_channels_HB", " ", 10, 0., 10.);
7906  h_shape_bad_channels_HE = fs_->make<TH1F>("h_shape_bad_channels_HE", " ", 10, 0., 10.);
7907  h_shape0_bad_channels_HE = fs_->make<TH1F>("h_shape0_bad_channels_HE", " ", 10, 0., 10.);
7908  h_shape_good_channels_HE = fs_->make<TH1F>("h_shape_good_channels_HE", " ", 10, 0., 10.);
7909  h_shape0_good_channels_HE = fs_->make<TH1F>("h_shape0_good_channels_HE", " ", 10, 0., 10.);
7910  h_shape_bad_channels_HF = fs_->make<TH1F>("h_shape_bad_channels_HF", " ", 10, 0., 10.);
7911  h_shape0_bad_channels_HF = fs_->make<TH1F>("h_shape0_bad_channels_HF", " ", 10, 0., 10.);
7912  h_shape_good_channels_HF = fs_->make<TH1F>("h_shape_good_channels_HF", " ", 10, 0., 10.);
7913  h_shape0_good_channels_HF = fs_->make<TH1F>("h_shape0_good_channels_HF", " ", 10, 0., 10.);
7914  h_shape_bad_channels_HO = fs_->make<TH1F>("h_shape_bad_channels_HO", " ", 10, 0., 10.);
7915  h_shape0_bad_channels_HO = fs_->make<TH1F>("h_shape0_bad_channels_HO", " ", 10, 0., 10.);
7916  h_shape_good_channels_HO = fs_->make<TH1F>("h_shape_good_channels_HO", " ", 10, 0., 10.);
7917  h_shape0_good_channels_HO = fs_->make<TH1F>("h_shape0_good_channels_HO", " ", 10, 0., 10.);
7918  //--------------------------------------------------
7919  // if(flagcpuoptimization_== 0 ) {
7920 
7921  int spl = 1000;
7922  float spls = 5000;
7923  h_sumamplitude_depth1_HB = fs_->make<TH1F>("h_sumamplitude_depth1_HB", " ", spl, 0., spls);
7924  h_sumamplitude_depth2_HB = fs_->make<TH1F>("h_sumamplitude_depth2_HB", " ", spl, 0., spls);
7925  h_sumamplitude_depth1_HE = fs_->make<TH1F>("h_sumamplitude_depth1_HE", " ", spl, 0., spls);
7926  h_sumamplitude_depth2_HE = fs_->make<TH1F>("h_sumamplitude_depth2_HE", " ", spl, 0., spls);
7927  h_sumamplitude_depth3_HE = fs_->make<TH1F>("h_sumamplitude_depth3_HE", " ", spl, 0., spls);
7928  h_sumamplitude_depth1_HF = fs_->make<TH1F>("h_sumamplitude_depth1_HF", " ", spl, 0., spls);
7929  h_sumamplitude_depth2_HF = fs_->make<TH1F>("h_sumamplitude_depth2_HF", " ", spl, 0., spls);
7930  h_sumamplitude_depth4_HO = fs_->make<TH1F>("h_sumamplitude_depth4_HO", " ", spl, 0., spls);
7931  int spl0 = 1000;
7932  float spls0 = 10000;
7933  h_sumamplitude_depth1_HB0 = fs_->make<TH1F>("h_sumamplitude_depth1_HB0", " ", spl0, 0., spls0);
7934  h_sumamplitude_depth2_HB0 = fs_->make<TH1F>("h_sumamplitude_depth2_HB0", " ", spl0, 0., spls0);
7935  h_sumamplitude_depth1_HE0 = fs_->make<TH1F>("h_sumamplitude_depth1_HE0", " ", spl0, 0., spls0);
7936  h_sumamplitude_depth2_HE0 = fs_->make<TH1F>("h_sumamplitude_depth2_HE0", " ", spl0, 0., spls0);
7937  h_sumamplitude_depth3_HE0 = fs_->make<TH1F>("h_sumamplitude_depth3_HE0", " ", spl0, 0., spls0);
7938  h_sumamplitude_depth1_HF0 = fs_->make<TH1F>("h_sumamplitude_depth1_HF0", " ", spl0, 0., spls0);
7939  h_sumamplitude_depth2_HF0 = fs_->make<TH1F>("h_sumamplitude_depth2_HF0", " ", spl0, 0., spls0);
7940  h_sumamplitude_depth4_HO0 = fs_->make<TH1F>("h_sumamplitude_depth4_HO0", " ", spl0, 0., spls0);
7941  int spl1 = 1000;
7942  float spls1 = 100000;
7943  h_sumamplitude_depth1_HB1 = fs_->make<TH1F>("h_sumamplitude_depth1_HB1", " ", spl1, 0., spls1);
7944  h_sumamplitude_depth2_HB1 = fs_->make<TH1F>("h_sumamplitude_depth2_HB1", " ", spl1, 0., spls1);
7945  h_sumamplitude_depth1_HE1 = fs_->make<TH1F>("h_sumamplitude_depth1_HE1", " ", spl1, 0., spls1);
7946  h_sumamplitude_depth2_HE1 = fs_->make<TH1F>("h_sumamplitude_depth2_HE1", " ", spl1, 0., spls1);
7947  h_sumamplitude_depth3_HE1 = fs_->make<TH1F>("h_sumamplitude_depth3_HE1", " ", spl1, 0., spls1);
7948  h_sumamplitude_depth1_HF1 = fs_->make<TH1F>("h_sumamplitude_depth1_HF1", " ", spl1, 0., spls1);
7949  h_sumamplitude_depth2_HF1 = fs_->make<TH1F>("h_sumamplitude_depth2_HF1", " ", spl1, 0., spls1);
7950  h_sumamplitude_depth4_HO1 = fs_->make<TH1F>("h_sumamplitude_depth4_HO1", " ", spl1, 0., spls1);
7951 
7952  h_Amplitude_forCapIdErrors_HB1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HB1", " ", 100, 0., 30000.);
7953  h_Amplitude_forCapIdErrors_HB2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HB2", " ", 100, 0., 30000.);
7954  h_Amplitude_forCapIdErrors_HE1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE1", " ", 100, 0., 30000.);
7955  h_Amplitude_forCapIdErrors_HE2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE2", " ", 100, 0., 30000.);
7956  h_Amplitude_forCapIdErrors_HE3 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE3", " ", 100, 0., 30000.);
7957  h_Amplitude_forCapIdErrors_HF1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HF1", " ", 100, 0., 30000.);
7958  h_Amplitude_forCapIdErrors_HF2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HF2", " ", 100, 0., 30000.);
7959  h_Amplitude_forCapIdErrors_HO4 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HO4", " ", 100, 0., 30000.);
7960 
7961  h_Amplitude_notCapIdErrors_HB1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HB1", " ", 100, 0., 30000.);
7962  h_Amplitude_notCapIdErrors_HB2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HB2", " ", 100, 0., 30000.);
7963  h_Amplitude_notCapIdErrors_HE1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE1", " ", 100, 0., 30000.);
7964  h_Amplitude_notCapIdErrors_HE2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE2", " ", 100, 0., 30000.);
7965  h_Amplitude_notCapIdErrors_HE3 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE3", " ", 100, 0., 30000.);
7966  h_Amplitude_notCapIdErrors_HF1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HF1", " ", 100, 0., 30000.);
7967  h_Amplitude_notCapIdErrors_HF2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HF2", " ", 100, 0., 30000.);
7968  h_Amplitude_notCapIdErrors_HO4 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HO4", " ", 100, 0., 30000.);
7969 
7970  h_2DAtaildepth1_HB = fs_->make<TH2F>("h_2DAtaildepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7971  h_2D0Ataildepth1_HB = fs_->make<TH2F>("h_2D0Ataildepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
7972  h_2DAtaildepth2_HB = fs_->make<TH2F>("h_2DAtaildepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7973  h_2D0Ataildepth2_HB = fs_->make<TH2F>("h_2D0Ataildepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
7974 
7976  } //if(recordHistoes_
7977  if (verbosity > 0)
7978  std::cout << "======================== booking DONE +++++++++++++++++++++++++++" << std::endl;
7980  if (recordNtuples_) {
7981  myTree = fs_->make<TTree>("Hcal", "Hcal Tree");
7982  myTree->Branch("Nevent", &Nevent, "Nevent/I");
7983  myTree->Branch("Run", &Run, "Run/I");
7984 
7985  } //if(recordNtuples_
7986  if (verbosity > 0)
7987  std::cout << "======================== beignJob finish +++++++++++++++++++++++++++" << std::endl;
7989 }
7990 
7993 // ------------ method called for each event ------------
7995  CaloSamples toolOriginal; // TS
7996  // double tool[100];
7997  if (verbosity < 0)
7998  std::cout << "************** in loop over Digis counter = " << nnnnnnhbhe << std::endl;
7999  HcalDetId cell(digiItr->id());
8000  int mdepth = cell.depth();
8001  int iphi = cell.iphi() - 1;
8002  int ieta = cell.ieta();
8003  if (ieta > 0)
8004  ieta -= 1;
8005  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8006  // !!!!!!
8007  int errorGeneral = 0;
8008  int error1 = 0;
8009  int error2 = 0;
8010  int error3 = 0;
8011  int error4 = 0;
8012  int error5 = 0;
8013  int error6 = 0;
8014  int error7 = 0;
8015  // !!!!!!
8016  bool anycapid = true;
8017  bool anyer = false;
8018  bool anydv = true;
8019  // for help:
8020  int firstcapid = 0;
8021  int lastcapid = 0, capid = 0;
8022  int ERRORfiber = -10;
8023  int ERRORfiberChan = -10;
8024  int ERRORfiberAndChan = -10;
8025  int repetedcapid = 0;
8026  int TSsize = 10;
8027  TSsize = digiItr->size();
8028 
8030  for (int ii = 0; ii < TSsize; ii++) {
8031  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8032  bool er = (*digiItr)[ii].er(); // error
8033  bool dv = (*digiItr)[ii].dv(); // valid data
8034  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8035  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8036  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8037  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8038  anycapid = false;
8039  ERRORfiber = fiber;
8040  ERRORfiberChan = fiberChan;
8041  ERRORfiberAndChan = fiberAndChan;
8042  if (capid != lastcapid) {
8043  } else {
8044  repetedcapid = 1;
8045  }
8046  }
8047  lastcapid = capid;
8048 
8049  if (ii == 0)
8050  firstcapid = capid;
8051 
8052  if (er) {
8053  anyer = true;
8054  ERRORfiber = fiber;
8055  ERRORfiberChan = fiberChan;
8056  ERRORfiberAndChan = fiberAndChan;
8057  }
8058  if (!dv) {
8059  anydv = false;
8060  ERRORfiber = fiber;
8061  ERRORfiberChan = fiberChan;
8062  ERRORfiberAndChan = fiberAndChan;
8063  }
8064 
8065  } // for
8066 
8068  if (firstcapid == 0 && !anycapid)
8069  errorGeneral = 1;
8070  if (firstcapid == 1 && !anycapid)
8071  errorGeneral = 2;
8072  if (firstcapid == 2 && !anycapid)
8073  errorGeneral = 3;
8074  if (firstcapid == 3 && !anycapid)
8075  errorGeneral = 4;
8076  if (!anycapid)
8077  error1 = 1;
8078  if (anyer)
8079  error2 = 1;
8080  if (!anydv)
8081  error3 = 1;
8082 
8083  if (!anycapid && anyer)
8084  error4 = 1;
8085  if (!anycapid && !anydv)
8086  error5 = 1;
8087  if (!anycapid && anyer && !anydv)
8088  error6 = 1;
8089  if (anyer && !anydv)
8090  error7 = 1;
8092  // Energy:
8093 
8094  double ampl = 0.;
8095  for (int ii = 0; ii < TSsize; ii++) {
8096  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8097  ampl += ampldefault; // fC
8098  }
8099 
8101  // Digis:
8102  // HB
8103  if (sub == 1) {
8104  h_errorGeneral_HB->Fill(double(errorGeneral), 1.);
8105  h_error1_HB->Fill(double(error1), 1.);
8106  h_error2_HB->Fill(double(error2), 1.);
8107  h_error3_HB->Fill(double(error3), 1.);
8108  h_error4_HB->Fill(double(error4), 1.);
8109  h_error5_HB->Fill(double(error5), 1.);
8110  h_error6_HB->Fill(double(error6), 1.);
8111  h_error7_HB->Fill(double(error7), 1.);
8112  h_repetedcapid_HB->Fill(double(repetedcapid), 1.);
8113 
8114  if (error1 != 0 || error2 != 0 || error3 != 0) {
8116  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8117  h_amplError_HB->Fill(ampl, 1.);
8118  if (mdepth == 1)
8119  h_mapDepth1Error_HB->Fill(double(ieta), double(iphi));
8120  if (mdepth == 2)
8121  h_mapDepth2Error_HB->Fill(double(ieta), double(iphi));
8122  h_fiber0_HB->Fill(double(ERRORfiber), 1.);
8123  h_fiber1_HB->Fill(double(ERRORfiberChan), 1.);
8124  h_fiber2_HB->Fill(double(ERRORfiberAndChan), 1.);
8125  } else {
8126  h_amplFine_HB->Fill(ampl, 1.);
8127  }
8128  }
8129  // HE
8130  if (sub == 2) {
8131  h_errorGeneral_HE->Fill(double(errorGeneral), 1.);
8132  h_error1_HE->Fill(double(error1), 1.);
8133  h_error2_HE->Fill(double(error2), 1.);
8134  h_error3_HE->Fill(double(error3), 1.);
8135  h_error4_HE->Fill(double(error4), 1.);
8136  h_error5_HE->Fill(double(error5), 1.);
8137  h_error6_HE->Fill(double(error6), 1.);
8138  h_error7_HE->Fill(double(error7), 1.);
8139  h_repetedcapid_HE->Fill(double(repetedcapid), 1.);
8140 
8141  if (error1 != 0 || error2 != 0 || error3 != 0) {
8143  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8144  h_amplError_HE->Fill(ampl, 1.);
8145  if (mdepth == 1)
8146  h_mapDepth1Error_HE->Fill(double(ieta), double(iphi));
8147  if (mdepth == 2)
8148  h_mapDepth2Error_HE->Fill(double(ieta), double(iphi));
8149  if (mdepth == 3)
8150  h_mapDepth3Error_HE->Fill(double(ieta), double(iphi));
8151  h_fiber0_HE->Fill(double(ERRORfiber), 1.);
8152  h_fiber1_HE->Fill(double(ERRORfiberChan), 1.);
8153  h_fiber2_HE->Fill(double(ERRORfiberAndChan), 1.);
8154  } else {
8155  h_amplFine_HE->Fill(ampl, 1.);
8156  }
8157  }
8158  // ha2->Fill(double(ieta), double(iphi));
8159 } //fillDigiErrors
8162 // ------------ method called for each event ------------
8164  CaloSamples toolOriginal; // TS
8165  // double tool[100];
8166  DetId detid = qie11df.detid();
8167  HcalDetId hcaldetid = HcalDetId(detid);
8168  int ieta = hcaldetid.ieta();
8169  if (ieta > 0)
8170  ieta -= 1;
8171  int iphi = hcaldetid.iphi() - 1;
8172  int mdepth = hcaldetid.depth();
8173  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8174  // !!!!!!
8175  int error1 = 0;
8176  // !!!!!!
8177  bool anycapid = true;
8178  // bool anyer = false;
8179  // bool anydv = true;
8180  // for help:
8181  int firstcapid = 0;
8182  int lastcapid = 0, capid = 0;
8183  int repetedcapid = 0;
8184  // loop over the samples in the digi
8185  nTS = qie11df.samples();
8187  for (int ii = 0; ii < nTS; ii++) {
8188  capid = qie11df[ii].capid(); // capId (0-3, sequential)
8189  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8190  anycapid = false;
8191  if (capid != lastcapid) {
8192  } else {
8193  repetedcapid = 1;
8194  }
8195  }
8196  lastcapid = capid;
8197  if (ii == 0)
8198  firstcapid = capid;
8199  } // for
8201  if (!anycapid)
8202  error1 = 1;
8203  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8204  double ampl = 0.;
8205  for (int ii = 0; ii < nTS; ii++) {
8206  int adc = qie11df[ii].adc();
8207 
8208  double ampldefault = adc2fC_QIE11_shunt6[adc];
8209  if (flaguseshunt_ == 1)
8210  ampldefault = adc2fC_QIE11_shunt1[adc];
8211 
8212  ampl += ampldefault; //
8213  }
8215  // Digis:HBHE
8216  if (sub == 1) {
8217  h_error1_HB->Fill(double(error1), 1.);
8218  h_repetedcapid_HB->Fill(double(repetedcapid), 1.);
8219  if (error1 != 0) {
8220  // if(error1 !=0 || error2 !=0 || error3 !=0 ) {
8222  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8223  h_amplError_HB->Fill(ampl, 1.);
8224  if (mdepth == 1)
8225  h_mapDepth1Error_HB->Fill(double(ieta), double(iphi));
8226  if (mdepth == 2)
8227  h_mapDepth2Error_HB->Fill(double(ieta), double(iphi));
8228  if (mdepth == 3)
8229  h_mapDepth3Error_HB->Fill(double(ieta), double(iphi));
8230  if (mdepth == 4)
8231  h_mapDepth4Error_HB->Fill(double(ieta), double(iphi));
8232  h_errorGeneral_HB->Fill(double(firstcapid), 1.);
8233  } else {
8234  h_amplFine_HB->Fill(ampl, 1.);
8235  }
8236  }
8237  if (sub == 2) {
8238  h_error1_HE->Fill(double(error1), 1.);
8239  h_repetedcapid_HE->Fill(double(repetedcapid), 1.);
8240  if (error1 != 0) {
8241  // if(error1 !=0 || error2 !=0 || error3 !=0 ) {
8243  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8244  h_amplError_HE->Fill(ampl, 1.);
8245  if (mdepth == 1)
8246  h_mapDepth1Error_HE->Fill(double(ieta), double(iphi));
8247  if (mdepth == 2)
8248  h_mapDepth2Error_HE->Fill(double(ieta), double(iphi));
8249  if (mdepth == 3)
8250  h_mapDepth3Error_HE->Fill(double(ieta), double(iphi));
8251  if (mdepth == 4)
8252  h_mapDepth4Error_HE->Fill(double(ieta), double(iphi));
8253  if (mdepth == 5)
8254  h_mapDepth5Error_HE->Fill(double(ieta), double(iphi));
8255  if (mdepth == 6)
8256  h_mapDepth6Error_HE->Fill(double(ieta), double(iphi));
8257  if (mdepth == 7)
8258  h_mapDepth7Error_HE->Fill(double(ieta), double(iphi));
8259  h_errorGeneral_HE->Fill(double(firstcapid), 1.);
8260  } else {
8261  h_amplFine_HE->Fill(ampl, 1.);
8262  }
8263  }
8264 } //fillDigiErrorsQIE11
8266 // ------------ method called for each event ------------
8268  CaloSamples toolOriginal; // TS
8269  // double tool[100];
8270  HcalDetId cell(digiItr->id());
8271  int mdepth = cell.depth();
8272  int iphi = cell.iphi() - 1;
8273  int ieta = cell.ieta();
8274  if (ieta > 0)
8275  ieta -= 1;
8276  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8277  if (mdepth > 2)
8278  std::cout << " HF DIGI ?????????????? ERROR mdepth = " << mdepth << std::endl;
8279  // !!!!!!
8280  int errorGeneral = 0;
8281  int error1 = 0;
8282  int error2 = 0;
8283  int error3 = 0;
8284  int error4 = 0;
8285  int error5 = 0;
8286  int error6 = 0;
8287  int error7 = 0;
8288  // !!!!!!
8289  bool anycapid = true;
8290  bool anyer = false;
8291  bool anydv = true;
8292  // for help:
8293  int firstcapid = 0;
8294  int lastcapid = 0, capid = 0;
8295  int ERRORfiber = -10;
8296  int ERRORfiberChan = -10;
8297  int ERRORfiberAndChan = -10;
8298  int repetedcapid = 0;
8299 
8300  int TSsize = 10;
8301  TSsize = digiItr->size();
8303  for (int ii = 0; ii < TSsize; ii++) {
8304  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8305  bool er = (*digiItr)[ii].er(); // error
8306  bool dv = (*digiItr)[ii].dv(); // valid data
8307  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8308  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8309  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8310  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8311  anycapid = false;
8312  ERRORfiber = fiber;
8313  ERRORfiberChan = fiberChan;
8314  ERRORfiberAndChan = fiberAndChan;
8315  if (capid != lastcapid) {
8316  } else {
8317  repetedcapid = 1;
8318  }
8319  }
8320  lastcapid = capid;
8321  if (ii == 0)
8322  firstcapid = capid;
8323  if (er) {
8324  anyer = true;
8325  ERRORfiber = fiber;
8326  ERRORfiberChan = fiberChan;
8327  ERRORfiberAndChan = fiberAndChan;
8328  }
8329  if (!dv) {
8330  anydv = false;
8331  ERRORfiber = fiber;
8332  ERRORfiberChan = fiberChan;
8333  ERRORfiberAndChan = fiberAndChan;
8334  }
8335  } // for
8337  if (firstcapid == 0 && !anycapid)
8338  errorGeneral = 1;
8339  if (firstcapid == 1 && !anycapid)
8340  errorGeneral = 2;
8341  if (firstcapid == 2 && !anycapid)
8342  errorGeneral = 3;
8343  if (firstcapid == 3 && !anycapid)
8344  errorGeneral = 4;
8345  if (!anycapid)
8346  error1 = 1;
8347  if (anyer)
8348  error2 = 1;
8349  if (!anydv)
8350  error3 = 1;
8351  if (!anycapid && anyer)
8352  error4 = 1;
8353  if (!anycapid && !anydv)
8354  error5 = 1;
8355  if (!anycapid && anyer && !anydv)
8356  error6 = 1;
8357  if (anyer && !anydv)
8358  error7 = 1;
8360  double ampl = 0.;
8361  for (int ii = 0; ii < TSsize; ii++) {
8362  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8363  ampl += ampldefault; // fC
8364  }
8366  // Digis: HF
8367  if (sub == 4) {
8368  h_errorGeneral_HF->Fill(double(errorGeneral), 1.);
8369  h_error1_HF->Fill(double(error1), 1.);
8370  h_error2_HF->Fill(double(error2), 1.);
8371  h_error3_HF->Fill(double(error3), 1.);
8372  h_error4_HF->Fill(double(error4), 1.);
8373  h_error5_HF->Fill(double(error5), 1.);
8374  h_error6_HF->Fill(double(error6), 1.);
8375  h_error7_HF->Fill(double(error7), 1.);
8376  h_repetedcapid_HF->Fill(double(repetedcapid), 1.);
8377  if (error1 != 0 || error2 != 0 || error3 != 0) {
8379  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8380  h_amplError_HF->Fill(ampl, 1.);
8381  if (mdepth == 1)
8382  h_mapDepth1Error_HF->Fill(double(ieta), double(iphi));
8383  if (mdepth == 2)
8384  h_mapDepth2Error_HF->Fill(double(ieta), double(iphi));
8385  h_fiber0_HF->Fill(double(ERRORfiber), 1.);
8386  h_fiber1_HF->Fill(double(ERRORfiberChan), 1.);
8387  h_fiber2_HF->Fill(double(ERRORfiberAndChan), 1.);
8388  } else {
8389  h_amplFine_HF->Fill(ampl, 1.);
8390  }
8391  }
8392 }
8397 // ------------ method called for each event ------------
8399  CaloSamples toolOriginal; // TS
8400  // double tool[100];
8401  DetId detid = qie10df.detid();
8402  HcalDetId hcaldetid = HcalDetId(detid);
8403  int ieta = hcaldetid.ieta();
8404  if (ieta > 0)
8405  ieta -= 1;
8406  int iphi = hcaldetid.iphi() - 1;
8407  int mdepth = hcaldetid.depth();
8408  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8409  // !!!!!!
8410  int error1 = 0;
8411  // !!!!!!
8412  bool anycapid = true;
8413  // bool anyer = false;
8414  // bool anydv = true;
8415  // for help:
8416  int firstcapid = 0;
8417  int lastcapid = 0, capid = 0;
8418  int repetedcapid = 0;
8419  // loop over the samples in the digi
8420  nTS = qie10df.samples();
8422  for (int ii = 0; ii < nTS; ii++) {
8423  capid = qie10df[ii].capid(); // capId (0-3, sequential)
8424  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8425  anycapid = false;
8426  if (capid != lastcapid) {
8427  } else {
8428  repetedcapid = 1;
8429  }
8430  }
8431  lastcapid = capid;
8432  if (ii == 0)
8433  firstcapid = capid;
8434  } // for
8436  if (!anycapid)
8437  error1 = 1;
8438  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8439  double ampl = 0.;
8440  for (int ii = 0; ii < nTS; ii++) {
8441  int adc = qie10df[ii].adc();
8442  double ampldefault = adc2fC_QIE10[adc];
8443  ampl += ampldefault; //
8444  }
8446  // Digis:HF
8447  if (sub == 4) {
8448  h_error1_HF->Fill(double(error1), 1.);
8449  h_repetedcapid_HF->Fill(double(repetedcapid), 1.);
8450  if (error1 != 0) {
8451  // if(error1 !=0 || error2 !=0 || error3 !=0 ) {
8453  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8454  h_amplError_HF->Fill(ampl, 1.);
8455  if (mdepth == 1)
8456  h_mapDepth1Error_HF->Fill(double(ieta), double(iphi));
8457  if (mdepth == 2)
8458  h_mapDepth2Error_HF->Fill(double(ieta), double(iphi));
8459  if (mdepth == 3)
8460  h_mapDepth3Error_HF->Fill(double(ieta), double(iphi));
8461  if (mdepth == 4)
8462  h_mapDepth4Error_HF->Fill(double(ieta), double(iphi));
8463  h_errorGeneral_HF->Fill(double(firstcapid), 1.);
8464  } else {
8465  h_amplFine_HF->Fill(ampl, 1.);
8466  }
8467  }
8468 }
8470 // ------------ method called for each event ------------
8472  CaloSamples toolOriginal; // TS
8473  HcalDetId cell(digiItr->id());
8474  int mdepth = cell.depth();
8475  int iphi = cell.iphi() - 1;
8476  int ieta = cell.ieta();
8477  if (ieta > 0)
8478  ieta -= 1;
8479  int sub = cell.subdet(); // 1-HB, 2-HE, 3-HO, 4-HF
8480  int errorGeneral = 0;
8481  int error1 = 0;
8482  int error2 = 0;
8483  int error3 = 0;
8484  int error4 = 0;
8485  int error5 = 0;
8486  int error6 = 0;
8487  int error7 = 0;
8488  // !!!!!!
8489  bool anycapid = true;
8490  bool anyer = false;
8491  bool anydv = true;
8492  // for help:
8493  int firstcapid = 0;
8494  int lastcapid = 0, capid = 0;
8495  int ERRORfiber = -10;
8496  int ERRORfiberChan = -10;
8497  int ERRORfiberAndChan = -10;
8498  int repetedcapid = 0;
8499  for (int ii = 0; ii < (*digiItr).size(); ii++) {
8500  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8501  bool er = (*digiItr)[ii].er(); // error
8502  bool dv = (*digiItr)[ii].dv(); // valid data
8503  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8504  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8505  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8506  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8507  anycapid = false;
8508  ERRORfiber = fiber;
8509  ERRORfiberChan = fiberChan;
8510  ERRORfiberAndChan = fiberAndChan;
8511  if (capid != lastcapid) {
8512  } else {
8513  repetedcapid = 1;
8514  }
8515  }
8516  lastcapid = capid;
8517 
8518  if (ii == 0)
8519  firstcapid = capid;
8520 
8521  if (er) {
8522  anyer = true;
8523  ERRORfiber = fiber;
8524  ERRORfiberChan = fiberChan;
8525  ERRORfiberAndChan = fiberAndChan;
8526  }
8527  if (!dv) {
8528  anydv = false;
8529  ERRORfiber = fiber;
8530  ERRORfiberChan = fiberChan;
8531  ERRORfiberAndChan = fiberAndChan;
8532  }
8533 
8534  } // for
8535 
8537  if (firstcapid == 0 && !anycapid)
8538  errorGeneral = 1;
8539  if (firstcapid == 1 && !anycapid)
8540  errorGeneral = 2;
8541  if (firstcapid == 2 && !anycapid)
8542  errorGeneral = 3;
8543  if (firstcapid == 3 && !anycapid)
8544  errorGeneral = 4;
8545  if (!anycapid)
8546  error1 = 1;
8547  if (anyer)
8548  error2 = 1;
8549  if (!anydv)
8550  error3 = 1;
8551 
8552  if (!anycapid && anyer)
8553  error4 = 1;
8554  if (!anycapid && !anydv)
8555  error5 = 1;
8556  if (!anycapid && anyer && !anydv)
8557  error6 = 1;
8558  if (anyer && !anydv)
8559  error7 = 1;
8561  // Energy:
8562  double ampl = 0.;
8563  for (int ii = 0; ii < (*digiItr).size(); ii++) {
8564  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8565  ampl += ampldefault; // fC
8566  }
8568  // Digis:
8569  // HO
8570  if (sub == 3) {
8571  h_errorGeneral_HO->Fill(double(errorGeneral), 1.);
8572  h_error1_HO->Fill(double(error1), 1.);
8573  h_error2_HO->Fill(double(error2), 1.);
8574  h_error3_HO->Fill(double(error3), 1.);
8575  h_error4_HO->Fill(double(error4), 1.);
8576  h_error5_HO->Fill(double(error5), 1.);
8577  h_error6_HO->Fill(double(error6), 1.);
8578  h_error7_HO->Fill(double(error7), 1.);
8579  h_repetedcapid_HO->Fill(double(repetedcapid), 1.);
8580 
8581  if (error1 != 0 || error2 != 0 || error3 != 0) {
8583  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8584  h_amplError_HO->Fill(ampl, 1.);
8585  if (mdepth == 4)
8586  h_mapDepth4Error_HO->Fill(double(ieta), double(iphi));
8587  // to be divided by h_mapDepth4_HO
8588 
8589  if (mdepth != 4)
8590  std::cout << " mdepth HO = " << mdepth << std::endl;
8591  h_fiber0_HO->Fill(double(ERRORfiber), 1.);
8592  h_fiber1_HO->Fill(double(ERRORfiberChan), 1.);
8593  h_fiber2_HO->Fill(double(ERRORfiberAndChan), 1.);
8594  } else {
8595  h_amplFine_HO->Fill(ampl, 1.);
8596  }
8597  }
8598 }
8601  CaloSamples toolOriginal; // TS
8602  double tool[100];
8603  double toolwithPedSubtr[100]; // TS
8604  double lintoolwithoutPedSubtr[100]; // TS
8605  HcalDetId cell(digiItr->id());
8606  int mdepth = cell.depth();
8607  int iphi = cell.iphi() - 1; // 0-71
8608  int ieta0 = cell.ieta(); //-41 +41 !=0
8609  int ieta = ieta0;
8610  if (ieta > 0)
8611  ieta -= 1; //-41 +41
8612  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8613  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
8614  const HcalGain* gain = conditions->getGain(cell);
8615  // const HcalGainWidth* gainWidth = conditions->getGainWidth(cell);
8616  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
8617  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
8618  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
8619  // HcalCalibrations calib = conditions->getHcalCalibrations(cell);
8620  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
8621  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
8622  HcalCoderDb coder(*channelCoder, *shape);
8623  if (useADCfC_)
8624  coder.adc2fC(*digiItr, toolOriginal);
8625  double pedestalaver9 = 0.;
8626  double pedestalaver4 = 0.;
8627  double pedestal0 = 0.;
8628  double pedestal1 = 0.;
8629  double pedestal2 = 0.;
8630  double pedestal3 = 0.;
8631  double pedestalwaver9 = 0.;
8632  double pedestalwaver4 = 0.;
8633  double pedestalw0 = 0.;
8634  double pedestalw1 = 0.;
8635  double pedestalw2 = 0.;
8636  double pedestalw3 = 0.;
8637  double difpedestal0 = 0.;
8638  double difpedestal1 = 0.;
8639  double difpedestal2 = 0.;
8640  double difpedestal3 = 0.;
8641 
8642  double amplitude = 0.;
8643  double absamplitude = 0.;
8644  double amplitude345 = 0.;
8645  double ampl = 0.;
8646  double linamplitudewithoutPedSubtr = 0.;
8647  double timew = 0.;
8648  double timeww = 0.;
8649  double max_signal = -100.;
8650  int ts_with_max_signal = -100;
8651  int c0 = 0;
8652  int c1 = 0;
8653  int c2 = 0;
8654  int c3 = 0;
8655  int c4 = 0;
8656  double errorBtype = 0.;
8657 
8658  int TSsize = 10; //HEHB for Run2
8659  TSsize = digiItr->size();
8660  if ((*digiItr).size() != 10)
8661  errorBtype = 1.;
8662  // ii = 0 to 9
8663  for (int ii = 0; ii < TSsize; ii++) {
8664  // for (int ii=0; ii<digiItr->size(); ii++) {
8665  double ampldefaultwithPedSubtr = 0.;
8666  double linampldefaultwithoutPedSubtr = 0.;
8667  double ampldefault = 0.;
8668  double ampldefault0 = 0.;
8669  double ampldefault1 = 0.;
8670  double ampldefault2 = 0.;
8671  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive ADCcounts
8672  if (useADCfC_)
8673  ampldefault1 = toolOriginal[ii]; //adcfC
8674  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts linearized
8675  if (useADCmassive_) {
8676  ampldefault = ampldefault0;
8677  }
8678  if (useADCfC_) {
8679  ampldefault = ampldefault1;
8680  }
8681  if (useADCcounts_) {
8682  ampldefault = ampldefault2;
8683  }
8684  ampldefaultwithPedSubtr = ampldefault0;
8685  linampldefaultwithoutPedSubtr = ampldefault2;
8686 
8687  int capid = ((*digiItr)[ii]).capid();
8688  // double pedestal = calib.pedestal(capid);
8689  double pedestalINI = pedestal00->getValue(capid);
8690  double pedestal = pedestal00->getValue(capid);
8691  double pedestalw = pedw->getSigma(capid, capid);
8692  ampldefaultwithPedSubtr -= pedestal; // pedestal subtraction
8694  ampldefault -= pedestal; // pedestal subtraction
8695  // ampldefault*= calib.respcorrgain(capid) ; // fC --> GeV
8696  tool[ii] = ampldefault;
8697  toolwithPedSubtr[ii] = ampldefaultwithPedSubtr;
8698  lintoolwithoutPedSubtr[ii] = linampldefaultwithoutPedSubtr;
8699 
8700  pedestalaver9 += pedestal;
8701  pedestalwaver9 += pedestalw * pedestalw;
8702 
8703  if (capid == 0 && c0 == 0) {
8704  c0++;
8705  c4++;
8706  pedestalaver4 += pedestal;
8707  pedestal0 = pedestal;
8708  pedestalw0 = pedestalw;
8709  pedestalwaver4 += pedestalw * pedestalw;
8710  difpedestal0 = pedestal - pedestalINI;
8711  }
8712 
8713  if (capid == 1 && c1 == 0) {
8714  c1++;
8715  c4++;
8716  pedestalaver4 += pedestal;
8717  pedestal1 = pedestal;
8718  pedestalw1 = pedestalw;
8719  pedestalwaver4 += pedestalw * pedestalw;
8720  difpedestal1 = pedestal - pedestalINI;
8721  }
8722  if (capid == 2 && c2 == 0) {
8723  c2++;
8724  c4++;
8725  pedestalaver4 += pedestal;
8726  pedestal2 = pedestal;
8727  pedestalw2 = pedestalw;
8728  pedestalwaver4 += pedestalw * pedestalw;
8729  difpedestal2 = pedestal - pedestalINI;
8730  }
8731  if (capid == 3 && c3 == 0) {
8732  c3++;
8733  c4++;
8734  pedestalaver4 += pedestal;
8735  pedestal3 = pedestal;
8736  pedestalw3 = pedestalw;
8737  pedestalwaver4 += pedestalw * pedestalw;
8738  difpedestal3 = pedestal - pedestalINI;
8739  }
8740 
8741  if (max_signal < ampldefault) {
8742  max_signal = ampldefault;
8743  ts_with_max_signal = ii;
8744  }
8746  // TS = 1 to 10: 1 2 3 4 5 6 7 8 9 10
8747  // ii = 0 to 9: 0 1 2 3 4 5 6 7 8 9
8748  // var.1 ----------------------
8749  // var.2 ----------------
8750  // var.3 ----------
8751  // var.4 -------
8752  //
8753  // TS = 2-9 for raddam only var.1
8754  // TS = 3-8 for raddam only var.2
8755  // TS = 4-7 for raddam only var.3
8756  // TS = 4-6 for raddam only var.4
8757  amplitude += ampldefault; //
8758  absamplitude += abs(ampldefault); //
8759 
8760  if (ii == 3 || ii == 4 || ii == 5)
8761  amplitude345 += ampldefault;
8762  if (flagcpuoptimization_ == 0) {
8764  } //flagcpuoptimization
8765  timew += (ii + 1) * abs(ampldefault);
8766  timeww += (ii + 1) * ampldefault;
8767  } //for 1
8769  // sub=1||2 HBHE
8770  if (sub == 1 || sub == 2) {
8771  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HBHE
8772  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HBHE
8773  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HBHE
8774  }
8775  pedestalaver9 /= TSsize;
8776  pedestalaver4 /= c4;
8777  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
8778  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
8779  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
8780  ampl = tool[ts_with_max_signal];
8781  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
8782  ampl += tool[ts_with_max_signal + 2];
8783  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
8784  ampl += tool[ts_with_max_signal + 1];
8785  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
8786  ampl += tool[ts_with_max_signal - 1];
8787 
8789  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
8790  linamplitudewithoutPedSubtr = lintoolwithoutPedSubtr[ts_with_max_signal];
8791  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
8792  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal + 2];
8793  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
8794  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal + 1];
8795  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
8796  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal - 1];
8797 
8798  double ratio = 0.;
8799  if (amplitude != 0.)
8800  ratio = ampl / amplitude;
8801  if (ratio < 0. || ratio > 1.02)
8802  ratio = 0.;
8803  double aveamplitude = 0.;
8804  double aveamplitudew = 0.;
8805  if (absamplitude > 0 && timew > 0)
8806  aveamplitude = timew / absamplitude; // average_TS +1
8807  if (amplitude > 0 && timeww > 0)
8808  aveamplitudew = timeww / amplitude; // average_TS +1
8809  double rmsamp = 0.;
8810  // and CapIdErrors:
8811  int error = 0;
8812  bool anycapid = true;
8813  bool anyer = false;
8814  bool anydv = true;
8815  int lastcapid = 0;
8816  int capid = 0;
8817  for (int ii = 0; ii < TSsize; ii++) {
8818  double aaaaaa = (ii + 1) - aveamplitudew;
8819  double aaaaaa2 = aaaaaa * aaaaaa;
8820  double ampldefault = tool[ii];
8821  rmsamp += (aaaaaa2 * ampldefault); // fC
8822  capid = ((*digiItr)[ii]).capid();
8823  bool er = (*digiItr)[ii].er(); // error
8824  bool dv = (*digiItr)[ii].dv(); // valid data
8825  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8826  anycapid = false;
8827  }
8828  // std::cout << " ii = " << ii << " capid = " << capid << " ((lastcapid+1)%4) = " << ((lastcapid+1)%4) << std::endl;
8829  lastcapid = capid;
8830  if (er) {
8831  anyer = true;
8832  }
8833  if (!dv) {
8834  anydv = false;
8835  }
8836  } //for 2
8837  if (!anycapid || anyer || !anydv)
8838  error = 1;
8839 
8840  double rmsamplitude = 0.;
8841  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
8842  rmsamplitude = sqrt(rmsamp / amplitude);
8843  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
8844 
8845  // CapIdErrors end /////////////////////////////////////////////////////////
8846 
8847  // AZ 1.10.2015:
8848  if (error == 1) {
8849  if (sub == 1 && mdepth == 1)
8851  if (sub == 1 && mdepth == 2)
8853  if (sub == 2 && mdepth == 1)
8855  if (sub == 2 && mdepth == 2)
8857  if (sub == 2 && mdepth == 3)
8859  }
8860  if (error != 1) {
8861  if (sub == 1 && mdepth == 1)
8863  if (sub == 1 && mdepth == 2)
8865  if (sub == 2 && mdepth == 1)
8867  if (sub == 2 && mdepth == 2)
8869  if (sub == 2 && mdepth == 3)
8871  }
8872 
8873  for (int ii = 0; ii < TSsize; ii++) {
8874  // for (int ii=0; ii<10; ii++) {
8875  double ampldefault = tool[ii];
8877  if (sub == 1) {
8878  if (amplitude > 120) {
8879  h_shape_Ahigh_HB0->Fill(float(ii), ampldefault);
8880  h_shape0_Ahigh_HB0->Fill(float(ii), 1.);
8881  } else {
8882  h_shape_Alow_HB0->Fill(float(ii), ampldefault);
8883  h_shape0_Alow_HB0->Fill(float(ii), 1.);
8884  } //HB0
8886  if (pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
8887  pedestal3 < pedestalHBMax_) {
8888  h_shape_Ahigh_HB1->Fill(float(ii), ampldefault);
8889  h_shape0_Ahigh_HB1->Fill(float(ii), 1.);
8890  } else {
8891  h_shape_Alow_HB1->Fill(float(ii), ampldefault);
8892  h_shape0_Alow_HB1->Fill(float(ii), 1.);
8893  } //HB1
8894  if (error == 0) {
8895  h_shape_Ahigh_HB2->Fill(float(ii), ampldefault);
8896  h_shape0_Ahigh_HB2->Fill(float(ii), 1.);
8897  } else {
8898  h_shape_Alow_HB2->Fill(float(ii), ampldefault);
8899  h_shape0_Alow_HB2->Fill(float(ii), 1.);
8900  } //HB2
8902  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
8903  pedestalw3 < pedestalwHBMax_) {
8904  h_shape_Ahigh_HB3->Fill(float(ii), ampldefault);
8905  h_shape0_Ahigh_HB3->Fill(float(ii), 1.);
8906  } else {
8907  h_shape_Alow_HB3->Fill(float(ii), ampldefault);
8908  h_shape0_Alow_HB3->Fill(float(ii), 1.);
8909  } //HB3
8910 
8911  } // sub HB
8912 
8913  } //for 3 over TSs
8914 
8915  if (sub == 1) {
8916  // bad_channels with C,A,W,P,pW,
8917  if (error == 1 || amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_ || rmsamplitude < rmsHBMin_ ||
8918  rmsamplitude > rmsHBMax_ || pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ ||
8919  pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestalw0 < pedestalwHBMax_ ||
8920  pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ || pedestalw3 < pedestalwHBMax_) {
8921  for (int ii = 0; ii < TSsize; ii++) {
8922  double ampldefault = tool[ii];
8923  h_shape_bad_channels_HB->Fill(float(ii), ampldefault);
8924  h_shape0_bad_channels_HB->Fill(float(ii), 1.);
8925  }
8926  }
8927  // good_channels with C,A,W,P,pW
8928  else {
8929  for (int ii = 0; ii < TSsize; ii++) {
8930  double ampldefault = tool[ii];
8931  h_shape_good_channels_HB->Fill(float(ii), ampldefault);
8932  h_shape0_good_channels_HB->Fill(float(ii), 1.);
8933  }
8934  }
8935  } // sub HB
8936  if (sub == 2) {
8937  // bad_channels with C,A,W,P,pW,
8938  if (error == 1 || amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_ || rmsamplitude < rmsHEMin_ ||
8939  rmsamplitude > rmsHEMax_ || pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ ||
8940  pedestal2 < pedestalHEMax_ || pedestal3 < pedestalHEMax_ || pedestalw0 < pedestalwHEMax_ ||
8941  pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ || pedestalw3 < pedestalwHEMax_) {
8942  for (int ii = 0; ii < TSsize; ii++) {
8943  double ampldefault = tool[ii];
8944  h_shape_bad_channels_HE->Fill(float(ii), ampldefault);
8945  h_shape0_bad_channels_HE->Fill(float(ii), 1.);
8946  }
8947  }
8948  // good_channels with C,A,W,P,pW,
8949  else {
8950  for (int ii = 0; ii < TSsize; ii++) {
8951  double ampldefault = tool[ii];
8952  h_shape_good_channels_HE->Fill(float(ii), ampldefault);
8953  h_shape0_good_channels_HE->Fill(float(ii), 1.);
8954  }
8955  }
8956  } // sub HE
8957 
8959  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
8960  // for Error B-type
8961  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
8962  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
8963  // HB
8964  if (sub == 1) {
8966  // // // // // // // // // HB PedestalCorrelations :
8967  double mypedestal = pedestal0;
8968  double mypedestalw = pedestalw0;
8969  h2_pedvsampl_HB->Fill(mypedestal, amplitude);
8970  h2_pedwvsampl_HB->Fill(mypedestalw, amplitude);
8971  h_pedvsampl_HB->Fill(mypedestal, amplitude);
8972  h_pedwvsampl_HB->Fill(mypedestalw, amplitude);
8973  h_pedvsampl0_HB->Fill(mypedestal, 1.);
8974  h_pedwvsampl0_HB->Fill(mypedestalw, 1.);
8975 
8976  h2_amplvsped_HB->Fill(amplitude, mypedestal);
8977  h2_amplvspedw_HB->Fill(amplitude, mypedestalw);
8978  h_amplvsped_HB->Fill(amplitude, mypedestal);
8979  h_amplvspedw_HB->Fill(amplitude, mypedestalw);
8980  h_amplvsped0_HB->Fill(amplitude, 1.);
8981  } //
8982  // // // // // // // // // HB Pedestals:
8983  if (studyPedestalsHist_) {
8984  h_pedestal0_HB->Fill(pedestal0, 1.);
8985  h_pedestal1_HB->Fill(pedestal1, 1.);
8986  h_pedestal2_HB->Fill(pedestal2, 1.);
8987  h_pedestal3_HB->Fill(pedestal3, 1.);
8988  h_pedestalaver4_HB->Fill(pedestalaver4, 1.);
8989  h_pedestalaver9_HB->Fill(pedestalaver9, 1.);
8990  h_pedestalw0_HB->Fill(pedestalw0, 1.);
8991  h_pedestalw1_HB->Fill(pedestalw1, 1.);
8992  h_pedestalw2_HB->Fill(pedestalw2, 1.);
8993  h_pedestalw3_HB->Fill(pedestalw3, 1.);
8994  h_pedestalwaver4_HB->Fill(pedestalwaver4, 1.);
8995  h_pedestalwaver9_HB->Fill(pedestalwaver9, 1.);
8996  // for averaged values:
8997  if (mdepth == 1) {
8998  h_mapDepth1Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
8999  h_mapDepth1Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
9000  h_mapDepth1Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
9001  h_mapDepth1Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
9002  h_mapDepth1Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
9003  h_mapDepth1Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
9004  h_mapDepth1Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
9005  h_mapDepth1Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
9006  }
9007  if (mdepth == 2) {
9008  h_mapDepth2Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
9009  h_mapDepth2Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
9010  h_mapDepth2Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
9011  h_mapDepth2Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
9012  h_mapDepth2Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
9013  h_mapDepth2Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
9014  h_mapDepth2Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
9015  h_mapDepth2Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
9016  }
9017  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
9018  pedestalw3 < pedestalwHBMax_) {
9019  if (mdepth == 1)
9020  h_mapDepth1pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9021  if (mdepth == 2)
9022  h_mapDepth2pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9023  if (mdepth == 3)
9024  h_mapDepth3pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9025  if (mdepth == 4)
9026  h_mapDepth4pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9027  }
9028  if (pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
9029  pedestal3 < pedestalHBMax_) {
9030  if (mdepth == 1)
9031  h_mapDepth1pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9032  if (mdepth == 2)
9033  h_mapDepth2pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9034  if (mdepth == 3)
9035  h_mapDepth3pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9036  if (mdepth == 4)
9037  h_mapDepth4pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9038  }
9039  for (int ii = 0; ii < TSsize; ii++) {
9040  h_pedestal00_HB->Fill(pedestal00->getValue(ii), 1.);
9041  h_gain_HB->Fill(gain->getValue(ii), 1.);
9042  }
9043  h_respcorr_HB->Fill(respcorr->getValue(), 1.);
9044  h_timecorr_HB->Fill(timecorr->getValue(), 1.);
9045  h_lutcorr_HB->Fill(lutcorr->getValue(), 1.);
9046  h_difpedestal0_HB->Fill(difpedestal0, 1.);
9047  h_difpedestal1_HB->Fill(difpedestal1, 1.);
9048  h_difpedestal2_HB->Fill(difpedestal2, 1.);
9049  h_difpedestal3_HB->Fill(difpedestal3, 1.);
9050  } //
9051  // // // // // // // // // HB ADCAmpl:
9052  if (studyADCAmplHist_) {
9053  h_ADCAmpl345Zoom_HB->Fill(amplitude345, 1.);
9054  h_ADCAmpl345Zoom1_HB->Fill(amplitude345, 1.);
9055  h_ADCAmpl345_HB->Fill(amplitude345, 1.);
9056  if (error == 0) {
9058  h_ADCAmpl345_HBCapIdNoError->Fill(amplitude345, 1.);
9059  }
9060  if (error == 1) {
9061  h_ADCAmpl_HBCapIdError->Fill(amplitude, 1.);
9062  h_ADCAmpl345_HBCapIdError->Fill(amplitude345, 1.);
9063  }
9064  h_ADCAmplZoom_HB->Fill(amplitude, 1.);
9065  h_ADCAmplZoom1_HB->Fill(amplitude, 1.);
9066  h_ADCAmpl_HB->Fill(amplitude, 1.);
9067 
9068  h_AmplitudeHBrest->Fill(amplitude, 1.);
9069  h_AmplitudeHBrest1->Fill(amplitude, 1.);
9070  h_AmplitudeHBrest6->Fill(amplitude, 1.);
9071 
9072  if (amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_) {
9074  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9075  if (mdepth == 1)
9076  h_mapDepth1ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
9077  if (mdepth == 2)
9078  h_mapDepth2ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
9079  } // if
9080  // if(amplitude >400.) averSIGNALoccupancy_HB += 1.;
9081  if (amplitude < 35.) {
9082  if (mdepth == 1)
9083  h_mapDepth1ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
9084  if (mdepth == 2)
9085  h_mapDepth2ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
9086  } // if
9087  // for averaged values:
9088  if (mdepth == 1)
9089  h_mapDepth1ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
9090  if (mdepth == 2)
9091  h_mapDepth2ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
9092  if (mdepth == 1)
9093  h_mapDepth1ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
9094  if (mdepth == 2)
9095  h_mapDepth2ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
9096  h_bcnvsamplitude_HB->Fill(float(bcn), amplitude);
9097  h_bcnvsamplitude0_HB->Fill(float(bcn), 1.);
9099  h_orbitNumvsamplitude0_HB->Fill(float(orbitNum), 1.);
9101  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
9102  } //if(studyADCAmplHist_
9104 
9105  // // // // // // // // // HB TSmean:
9106  if (studyTSmeanShapeHist_) {
9107  h_TSmeanA_HB->Fill(aveamplitude1, 1.);
9108  // h2_TSnVsAyear2023_HB->Fill(25.*aveamplitude1, amplitude);
9109  h2_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
9110  h1_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
9111  h1_TSnVsAyear20230_HB->Fill(amplitude, 1.);
9112  if (aveamplitude1 < TSmeanHBMin_ || aveamplitude1 > TSmeanHBMax_) {
9114  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9115  if (mdepth == 1)
9116  h_mapDepth1TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
9117  if (mdepth == 2)
9118  h_mapDepth2TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
9119  } // if
9120  // for averaged values:
9121  if (mdepth == 1)
9122  h_mapDepth1TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
9123  if (mdepth == 2)
9124  h_mapDepth2TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
9126  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
9127  } //if(studyTSmeanShapeHist_
9129 
9130  // // // // // // // // // HB TSmax:
9131  if (studyTSmaxShapeHist_) {
9132  h_TSmaxA_HB->Fill(float(ts_with_max_signal), 1.);
9133  if (ts_with_max_signal < TSpeakHBMin_ || ts_with_max_signal > TSpeakHBMax_) {
9135  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9136  if (mdepth == 1)
9137  h_mapDepth1TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
9138  if (mdepth == 2)
9139  h_mapDepth2TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
9140  } // if
9141  // for averaged values:
9142  if (mdepth == 1)
9143  h_mapDepth1TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9144  if (mdepth == 2)
9145  h_mapDepth2TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9147  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
9148  } //if(studyTSmaxShapeHist_
9150 
9151  // // // // // // // // // HB RMS:
9152  if (studyRMSshapeHist_) {
9153  h_Amplitude_HB->Fill(rmsamplitude, 1.);
9154  if (rmsamplitude < rmsHBMin_ || rmsamplitude > rmsHBMax_) {
9156  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9157  if (mdepth == 1)
9158  h_mapDepth1Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
9159  if (mdepth == 2)
9160  h_mapDepth2Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
9161  } // if
9162  // for averaged values:
9163  if (mdepth == 1)
9164  h_mapDepth1Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
9165  if (mdepth == 2)
9166  h_mapDepth2Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
9168  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
9169  } //if(studyRMSshapeHist_)
9171 
9172  // // // // // // // // // HB Ratio:
9173  if (studyRatioShapeHist_) {
9174  h_Ampl_HB->Fill(ratio, 1.);
9175  if (ratio < ratioHBMin_ || ratio > ratioHBMax_) {
9177  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9178  if (mdepth == 1)
9179  h_mapDepth1Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
9180  if (mdepth == 2)
9181  h_mapDepth2Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
9182  // //
9183  } //if(ratio
9184  // for averaged values:
9185  if (mdepth == 1)
9186  h_mapDepth1Ampl_HB->Fill(double(ieta), double(iphi), ratio);
9187  if (mdepth == 2)
9188  h_mapDepth2Ampl_HB->Fill(double(ieta), double(iphi), ratio);
9190  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
9191  } //if(studyRatioShapeHist_)
9193 
9194  // // // // // // // // // HB DiffAmplitude:
9195  if (studyDiffAmplHist_) {
9196  if (mdepth == 1)
9197  h_mapDepth1AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
9198  if (mdepth == 2)
9199  h_mapDepth2AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
9200  } // if(studyDiffAmplHist_)
9201 
9203  if (mdepth == 1)
9204  h_mapDepth1_HB->Fill(double(ieta), double(iphi), 1.);
9205  if (mdepth == 2)
9206  h_mapDepth2_HB->Fill(double(ieta), double(iphi), 1.);
9207  } //if ( sub == 1 )
9208 
9209  // HE
9210  if (sub == 2) {
9211  // // // // // // // // // HE PedestalCorrelations :
9213  double mypedestal = pedestal0;
9214  double mypedestalw = pedestalw0;
9215  h2_pedvsampl_HE->Fill(mypedestal, amplitude);
9216  h2_pedwvsampl_HE->Fill(mypedestalw, amplitude);
9217  h_pedvsampl_HE->Fill(mypedestal, amplitude);
9218  h_pedwvsampl_HE->Fill(mypedestalw, amplitude);
9219  h_pedvsampl0_HE->Fill(mypedestal, 1.);
9220  h_pedwvsampl0_HE->Fill(mypedestalw, 1.);
9221  } //
9222  // // // // // // // // // HE Pedestals:
9223  if (studyPedestalsHist_) {
9224  h_pedestal0_HE->Fill(pedestal0, 1.);
9225  h_pedestal1_HE->Fill(pedestal1, 1.);
9226  h_pedestal2_HE->Fill(pedestal2, 1.);
9227  h_pedestal3_HE->Fill(pedestal3, 1.);
9228  h_pedestalaver4_HE->Fill(pedestalaver4, 1.);
9229  h_pedestalaver9_HE->Fill(pedestalaver9, 1.);
9230  h_pedestalw0_HE->Fill(pedestalw0, 1.);
9231  h_pedestalw1_HE->Fill(pedestalw1, 1.);
9232  h_pedestalw2_HE->Fill(pedestalw2, 1.);
9233  h_pedestalw3_HE->Fill(pedestalw3, 1.);
9234  h_pedestalwaver4_HE->Fill(pedestalwaver4, 1.);
9235  h_pedestalwaver9_HE->Fill(pedestalwaver9, 1.);
9236  // for averaged values:
9237  if (mdepth == 1) {
9238  h_mapDepth1Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9239  h_mapDepth1Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9240  h_mapDepth1Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9241  h_mapDepth1Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9242  h_mapDepth1Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9243  h_mapDepth1Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9244  h_mapDepth1Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9245  h_mapDepth1Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9246  }
9247  if (mdepth == 2) {
9248  h_mapDepth2Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9249  h_mapDepth2Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9250  h_mapDepth2Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9251  h_mapDepth2Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9252  h_mapDepth2Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9253  h_mapDepth2Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9254  h_mapDepth2Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9255  h_mapDepth2Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9256  }
9257  if (mdepth == 3) {
9258  h_mapDepth3Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9259  h_mapDepth3Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9260  h_mapDepth3Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9261  h_mapDepth3Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9262  h_mapDepth3Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9263  h_mapDepth3Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9264  h_mapDepth3Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9265  h_mapDepth3Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9266  }
9267  if (pedestalw0 < pedestalwHEMax_ || pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ ||
9268  pedestalw3 < pedestalwHEMax_) {
9269  if (mdepth == 1)
9270  h_mapDepth1pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9271  if (mdepth == 2)
9272  h_mapDepth2pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9273  if (mdepth == 3)
9274  h_mapDepth3pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9275  }
9276  if (pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ || pedestal2 < pedestalHEMax_ ||
9277  pedestal3 < pedestalHEMax_) {
9278  if (mdepth == 1)
9279  h_mapDepth1pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9280  if (mdepth == 2)
9281  h_mapDepth2pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9282  if (mdepth == 3)
9283  h_mapDepth3pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9284  }
9285  for (int ii = 0; ii < TSsize; ii++) {
9286  h_pedestal00_HE->Fill(pedestal00->getValue(ii), 1.);
9287  h_gain_HE->Fill(gain->getValue(ii), 1.);
9288  }
9289  h_respcorr_HE->Fill(respcorr->getValue(), 1.);
9290  h_timecorr_HE->Fill(timecorr->getValue(), 1.);
9291  h_lutcorr_HE->Fill(lutcorr->getValue(), 1.);
9292  } //
9293 
9294  // h_mapDepth1ADCAmpl12SiPM_HE
9295  // // // // // // // // // HE ADCAmpl:
9296  if (studyADCAmplHist_) {
9297  h_ADCAmpl345Zoom_HE->Fill(ampl, 1.);
9298  h_ADCAmpl345Zoom1_HE->Fill(amplitude345, 1.);
9299  h_ADCAmpl345_HE->Fill(amplitude345, 1.);
9300  h_ADCAmpl_HE->Fill(amplitude, 1.);
9301 
9302  h_ADCAmplrest_HE->Fill(amplitude, 1.);
9303  h_ADCAmplrest1_HE->Fill(amplitude, 1.);
9304  h_ADCAmplrest6_HE->Fill(amplitude, 1.);
9305 
9306  h_ADCAmplZoom1_HE->Fill(amplitude, 1.);
9307  if (amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_) {
9309  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9310  if (mdepth == 1)
9311  h_mapDepth1ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9312  if (mdepth == 2)
9313  h_mapDepth2ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9314  if (mdepth == 3)
9315  h_mapDepth3ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9316  } // if
9317  // if(amplitude > 700.) averSIGNALoccupancy_HE += 1.;
9318  if (amplitude < 500.) {
9319  if (mdepth == 1)
9320  h_mapDepth1ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9321  if (mdepth == 2)
9322  h_mapDepth2ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9323  if (mdepth == 3)
9324  h_mapDepth3ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9325  } // if
9326  // for averaged values:
9327  if (mdepth == 1)
9328  h_mapDepth1ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9329  if (mdepth == 2)
9330  h_mapDepth2ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9331  if (mdepth == 3)
9332  h_mapDepth3ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9333 
9334  if (mdepth == 1) {
9335  h_mapDepth1ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9336  h_mapDepth1linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9337  }
9338  if (mdepth == 2) {
9339  h_mapDepth2ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9340  h_mapDepth2linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9341  }
9342  if (mdepth == 3) {
9343  h_mapDepth3ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9344  h_mapDepth3linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9345  }
9346 
9349  h_bcnvsamplitude_HE->Fill(float(bcn), amplitude);
9350  h_bcnvsamplitude0_HE->Fill(float(bcn), 1.);
9352  h_orbitNumvsamplitude0_HE->Fill(float(orbitNum), 1.);
9353 
9355 
9357  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
9358 
9359  } //if(studyADCAmplHist_
9361  // // // // // // // // // HE TSmean:
9362  if (studyTSmeanShapeHist_) {
9363  h_TSmeanA_HE->Fill(aveamplitude1, 1.);
9364  // h2_TSnVsAyear2023_HE->Fill(25.*aveamplitude1, amplitude);
9365  h2_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
9366  h1_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
9367  h1_TSnVsAyear20230_HE->Fill(amplitude, 1.);
9368  if (aveamplitude1 < TSmeanHEMin_ || aveamplitude1 > TSmeanHEMax_) {
9370  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9371  if (mdepth == 1)
9372  h_mapDepth1TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9373  if (mdepth == 2)
9374  h_mapDepth2TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9375  if (mdepth == 3)
9376  h_mapDepth3TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9377  } // if
9378  // for averaged values:
9379  if (mdepth == 1)
9380  h_mapDepth1TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9381  if (mdepth == 2)
9382  h_mapDepth2TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9383  if (mdepth == 3)
9384  h_mapDepth3TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9386  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
9387  } //if(studyTSmeanShapeHist_) {
9389  // // // // // // // // // HE TSmax:
9390  if (studyTSmaxShapeHist_) {
9391  h_TSmaxA_HE->Fill(float(ts_with_max_signal), 1.);
9392  if (ts_with_max_signal < TSpeakHEMin_ || ts_with_max_signal > TSpeakHEMax_) {
9394  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9395  if (mdepth == 1)
9396  h_mapDepth1TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9397  if (mdepth == 2)
9398  h_mapDepth2TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9399  if (mdepth == 3)
9400  h_mapDepth3TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9401  } // if
9402  // for averaged values:
9403  if (mdepth == 1)
9404  h_mapDepth1TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9405  if (mdepth == 2)
9406  h_mapDepth2TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9407  if (mdepth == 3)
9408  h_mapDepth3TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9410  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
9411  } //if(studyTSmaxShapeHist_) {
9413  // // // // // // // // // HE RMS:
9414  if (studyRMSshapeHist_) {
9415  h_Amplitude_HE->Fill(rmsamplitude, 1.);
9416  if (rmsamplitude < rmsHEMin_ || rmsamplitude > rmsHEMax_) {
9418  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9419  if (mdepth == 1)
9420  h_mapDepth1Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9421  if (mdepth == 2)
9422  h_mapDepth2Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9423  if (mdepth == 3)
9424  h_mapDepth3Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9425  }
9426  // for averaged values:
9427  if (mdepth == 1)
9428  h_mapDepth1Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9429  if (mdepth == 2)
9430  h_mapDepth2Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9431  if (mdepth == 3)
9432  h_mapDepth3Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9434  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
9435  } //if(studyRMSshapeHist_)
9437 
9438  // // // // // // // // // HE Ratio:
9439  if (studyRatioShapeHist_) {
9440  h_Ampl_HE->Fill(ratio, 1.);
9441  if (ratio < ratioHEMin_ || ratio > ratioHEMax_) {
9443  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9444  if (mdepth == 1)
9445  h_mapDepth1Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9446  if (mdepth == 2)
9447  h_mapDepth2Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9448  if (mdepth == 3)
9449  h_mapDepth3Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9450  }
9451  // for averaged values:
9452  if (mdepth == 1)
9453  h_mapDepth1Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9454  if (mdepth == 2)
9455  h_mapDepth2Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9456  if (mdepth == 3)
9457  h_mapDepth3Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9459  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
9460  } //if(studyRatioShapeHist_)
9462  // // // // // // // // // HE DiffAmplitude:
9463  if (studyDiffAmplHist_) {
9464  // gain stability:
9465  if (mdepth == 1)
9466  h_mapDepth1AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9467  if (mdepth == 2)
9468  h_mapDepth2AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9469  if (mdepth == 3)
9470  h_mapDepth3AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9471 
9472  } // if(studyDiffAmplHist_)
9473 
9474  // RADDAM filling:
9475  if (flagLaserRaddam_ > 0) {
9476  double amplitudewithPedSubtr = 0.;
9477 
9478  //for cut on A_channel:
9479  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
9480  amplitudewithPedSubtr = toolwithPedSubtr[ts_with_max_signal];
9481  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
9482  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal + 2];
9483  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
9484  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal + 1];
9485  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
9486  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal - 1];
9487 
9488  h_AamplitudewithPedSubtr_RADDAM_HE->Fill(amplitudewithPedSubtr);
9489  h_AamplitudewithPedSubtr_RADDAM_HEzoom0->Fill(amplitudewithPedSubtr);
9490  h_AamplitudewithPedSubtr_RADDAM_HEzoom1->Fill(amplitudewithPedSubtr);
9491 
9492  if (amplitudewithPedSubtr > 50.) {
9493  if (flagLaserRaddam_ > 1) {
9494  mapRADDAM_HE[mdepth - 1][ieta + 41][iphi] += amplitudewithPedSubtr;
9495  ++mapRADDAM0_HE[mdepth - 1][ieta + 41][iphi];
9496  }
9497 
9498  if (mdepth == 1) {
9499  h_mapDepth1RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9500  h_mapDepth1RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9501  h_A_Depth1RADDAM_HE->Fill(amplitudewithPedSubtr);
9502  }
9503  if (mdepth == 2) {
9504  h_mapDepth2RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9505  h_mapDepth2RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9506  h_A_Depth2RADDAM_HE->Fill(amplitudewithPedSubtr);
9507  }
9508  if (mdepth == 3) {
9509  h_mapDepth3RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9510  h_mapDepth3RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9511  h_A_Depth3RADDAM_HE->Fill(amplitudewithPedSubtr);
9512  }
9513 
9514  // (d1 & eta 17-29) L1
9515  int LLLLLL111111 = 0;
9516  if ((mdepth == 1 && fabs(ieta0) > 16 && fabs(ieta0) < 30))
9517  LLLLLL111111 = 1;
9518  // (d2 & eta 17-26) && (d3 & eta 27-28) L2
9519  int LLLLLL222222 = 0;
9520  if ((mdepth == 2 && fabs(ieta0) > 16 && fabs(ieta0) < 27) ||
9521  (mdepth == 3 && fabs(ieta0) > 26 && fabs(ieta0) < 29))
9522  LLLLLL222222 = 1;
9523  //
9524  if (LLLLLL111111 == 1) {
9525  //forStudy h_mapLayer1RADDAM_HE->Fill(fabs(double(ieta0)), amplitudewithPedSubtr); h_mapLayer1RADDAM0_HE->Fill(fabs(double(ieta0)), 1.); h_A_Layer1RADDAM_HE->Fill(amplitudewithPedSubtr);
9526  h_sigLayer1RADDAM_HE->Fill(double(ieta0), amplitudewithPedSubtr);
9527  h_sigLayer1RADDAM0_HE->Fill(double(ieta0), 1.);
9528  }
9529  if (LLLLLL222222 == 1) {
9530  //forStudy h_mapLayer2RADDAM_HE->Fill(fabs(double(ieta0)), amplitudewithPedSubtr); h_mapLayer2RADDAM0_HE->Fill(fabs(double(ieta0)), 1.); h_A_Layer2RADDAM_HE->Fill(amplitudewithPedSubtr);
9531  h_sigLayer2RADDAM_HE->Fill(double(ieta0), amplitudewithPedSubtr);
9532  h_sigLayer2RADDAM0_HE->Fill(double(ieta0), 1.);
9533  }
9534 
9535  //
9536  if (mdepth == 3 && fabs(ieta0) == 16) {
9537  h_mapDepth3RADDAM16_HE->Fill(amplitudewithPedSubtr);
9538  // forStudy h_mapDepth3RADDAM160_HE->Fill(1.);
9539  }
9540  //
9541  } //amplitude > 60.
9542  } // END RADDAM
9543 
9545  if (mdepth == 1)
9546  h_mapDepth1_HE->Fill(double(ieta), double(iphi), 1.);
9547  if (mdepth == 2)
9548  h_mapDepth2_HE->Fill(double(ieta), double(iphi), 1.);
9549  if (mdepth == 3)
9550  h_mapDepth3_HE->Fill(double(ieta), double(iphi), 1.);
9551  } //if ( sub == 2 )
9552  //
9553 } // fillDigiAmplitude
9557  CaloSamples toolOriginal; // TS
9558  double tool[100];
9559  DetId detid = qie11df.detid();
9560  HcalDetId hcaldetid = HcalDetId(detid);
9561  int ieta = hcaldetid.ieta();
9562  if (ieta > 0)
9563  ieta -= 1;
9564  int iphi = hcaldetid.iphi() - 1;
9565  int mdepth = hcaldetid.depth();
9566  int sub = hcaldetid.subdet(); // 1-HB, 2-HE QIE11DigiCollection
9567  nTS = qie11df.samples();
9569  if (mdepth == 0 || sub > 4)
9570  return;
9571  if (mdepth > 3 && flagupgradeqie1011_ == 3)
9572  return;
9573  if (mdepth > 3 && flagupgradeqie1011_ == 7)
9574  return;
9575  if (mdepth > 3 && flagupgradeqie1011_ == 8)
9576  return;
9577  if (mdepth > 3 && flagupgradeqie1011_ == 9)
9578  return;
9579 
9580  // for some CMSSW versions and GT this line uncommented, can help to run job
9581  //if(mdepth ==4 && sub==1 && (ieta == -16 || ieta == 15) ) return;// HB depth4 eta=-16, 15 since I did:if(ieta > 0) ieta -= 1;
9584  const HcalGain* gain = conditions->getGain(hcaldetid);
9585  // const HcalGainWidth* gainWidth = conditions->getGainWidth(hcaldetid);
9586  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(hcaldetid);
9587  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(hcaldetid);
9588  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(hcaldetid);
9589  const HcalQIECoder* channelCoder = conditions->getHcalCoder(hcaldetid);
9590  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(hcaldetid);
9591  const HcalPedestal* pedestal00 = conditions->getPedestal(hcaldetid);
9592  HcalCoderDb coder(*channelCoder, *shape);
9593  if (useADCfC_)
9594  coder.adc2fC(qie11df, toolOriginal);
9595  double pedestalaver9 = 0.;
9596  double pedestalaver4 = 0.;
9597  double pedestal0 = 0.;
9598  double pedestal1 = 0.;
9599  double pedestal2 = 0.;
9600  double pedestal3 = 0.;
9601  double pedestalwaver9 = 0.;
9602  double pedestalwaver4 = 0.;
9603  double pedestalw0 = 0.;
9604  double pedestalw1 = 0.;
9605  double pedestalw2 = 0.;
9606  double pedestalw3 = 0.;
9607  double difpedestal0 = 0.;
9608  double difpedestal1 = 0.;
9609  double difpedestal2 = 0.;
9610  double difpedestal3 = 0.;
9611 
9612  double amplitude = 0.;
9613  double amplitude0 = 0.;
9614  double absamplitude = 0.;
9615  double tocampl = 0.;
9616 
9617  double amplitude345 = 0.;
9618  double ampl = 0.;
9619  double ampl3ts = 0.;
9620  double timew = 0.;
9621  double timeww = 0.;
9622  double max_signal = -100.;
9623  int ts_with_max_signal = -100;
9624  int c0 = 0;
9625  int c1 = 0;
9626  int c2 = 0;
9627  int c3 = 0;
9628  int c4 = 0;
9629  double errorBtype = 0.;
9630 
9631  int TSsize = 8; // sub= 1 HB
9632  if (sub == 2)
9633  TSsize = 8; // sub = 2 HE
9634  if (nTS != TSsize)
9635  errorBtype = 1.;
9636  TSsize = nTS; //nTS = qie11df.samples();
9638  // double ADC_ped = 0.;
9639  int flagTS2 = 0;
9640  for (int ii = 0; ii < TSsize; ii++) {
9641  double ampldefault = 0.;
9642  double tocdefault = 0.;
9643  double ampldefault0 = 0.;
9644  double ampldefault1 = 0.;
9645  double ampldefault2 = 0.;
9646 
9647  ampldefault0 = adc2fC_QIE11_shunt6[qie11df[ii].adc()]; // massive !!!!!! (use for local runs as default shunt6)
9648  if (flaguseshunt_ == 1)
9649  ampldefault0 = adc2fC_QIE11_shunt1[qie11df[ii].adc()]; // massive !!!!!!
9650  if (useADCfC_)
9651  ampldefault1 = toolOriginal[ii]; //adcfC
9652  ampldefault2 = qie11df[ii].adc(); //ADCcounts
9653 
9654  if (useADCmassive_) {
9655  ampldefault = ampldefault0;
9656  } // !!!!!!
9657  if (useADCfC_) {
9658  ampldefault = ampldefault1;
9659  }
9660  if (useADCcounts_) {
9661  ampldefault = ampldefault2;
9662  }
9663  tocdefault = ampldefault;
9664 
9665  int capid = (qie11df[ii]).capid();
9666  double pedestal = pedestal00->getValue(capid);
9667  double pedestalw = pedw->getSigma(capid, capid);
9668  double pedestalINI = pedestal00->getValue(capid);
9669  tocdefault -= pedestal; // pedestal subtraction
9671  ampldefault -= pedestal; // pedestal subtraction
9672  tool[ii] = ampldefault;
9673  pedestalaver9 += pedestal;
9674  pedestalwaver9 += pedestalw * pedestalw;
9675 
9676  if (capid == 0 && c0 == 0) {
9677  c0++;
9678  c4++;
9679  pedestalaver4 += pedestal;
9680  pedestal0 = pedestal;
9681  pedestalw0 = pedestalw;
9682  pedestalwaver4 += pedestalw * pedestalw;
9683  difpedestal0 = pedestal - pedestalINI;
9684  }
9685 
9686  if (capid == 1 && c1 == 0) {
9687  c1++;
9688  c4++;
9689  pedestalaver4 += pedestal;
9690  pedestal1 = pedestal;
9691  pedestalw1 = pedestalw;
9692  pedestalwaver4 += pedestalw * pedestalw;
9693  difpedestal1 = pedestal - pedestalINI;
9694  }
9695  if (capid == 2 && c2 == 0) {
9696  c2++;
9697  c4++;
9698  pedestalaver4 += pedestal;
9699  pedestal2 = pedestal;
9700  pedestalw2 = pedestalw;
9701  pedestalwaver4 += pedestalw * pedestalw;
9702  difpedestal2 = pedestal - pedestalINI;
9703  }
9704  if (capid == 3 && c3 == 0) {
9705  c3++;
9706  c4++;
9707  pedestalaver4 += pedestal;
9708  pedestal3 = pedestal;
9709  pedestalw3 = pedestalw;
9710  pedestalwaver4 += pedestalw * pedestalw;
9711  difpedestal3 = pedestal - pedestalINI;
9712  }
9713 
9714  if (max_signal < ampldefault) {
9715  max_signal = ampldefault;
9716  ts_with_max_signal = ii;
9717  }
9718  amplitude += ampldefault; //
9719  absamplitude += abs(ampldefault); //
9720  tocampl += tocdefault; //
9721 
9722  if (ii == 1 || ii == 2 || ii == 3 || ii == 4 || ii == 5 || ii == 6 || ii == 7 || ii == 8)
9723  amplitude345 += ampldefault;
9724 
9725  if (flagcpuoptimization_ == 0) {
9726  } //flagcpuoptimization
9727 
9728  timew += (ii + 1) * abs(ampldefault);
9729  timeww += (ii + 1) * ampldefault;
9730 
9731  if (ii == 2 && ampldefault > 0.)
9732  flagTS2 = 1;
9733  } //for 1
9735  amplitude0 = amplitude;
9736 
9737  pedestalaver9 /= TSsize;
9738  pedestalaver4 /= c4;
9739  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
9740  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
9741 
9742  // ------------ to get signal in TS: -2 max +1 ------------
9743  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize) {
9744  ampl = tool[ts_with_max_signal];
9745  ampl3ts = tool[ts_with_max_signal];
9746  }
9747  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize) {
9748  ampl += tool[ts_with_max_signal - 1];
9749  ampl3ts += tool[ts_with_max_signal - 1];
9750  }
9751  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize) {
9752  ampl += tool[ts_with_max_signal + 1];
9753  ampl3ts += tool[ts_with_max_signal + 1];
9754  }
9755  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize) {
9756  ampl += tool[ts_with_max_signal + 2];
9757  }
9758  // HE charge correction for SiPMs:
9759  if (flagsipmcorrection_ != 0) {
9760  if (sub == 2) {
9761  double xa = amplitude / 40.;
9762  double xb = ampl / 40.;
9763  double xc = amplitude345 / 40.;
9764  double xd = ampl3ts / 40.;
9765  double txa = tocampl / 40.;
9766  // ADDI case:
9767  if (((ieta == -16 || ieta == 15) && mdepth == 4) ||
9768  ((ieta == -17 || ieta == 16) && (mdepth == 2 || mdepth == 3)) ||
9769  ((ieta == -18 || ieta == 17) && mdepth == 5)) {
9770  double c0 = 1.000000;
9771  double b1 = 2.59096e-05;
9772  double a2 = 4.60721e-11;
9773  double corrforxa = a2 * xa * xa + b1 * xa + c0;
9774  double corrforxb = a2 * xb * xb + b1 * xb + c0;
9775  double corrforxc = a2 * xc * xc + b1 * xc + c0;
9776  double corrforxd = a2 * xd * xd + b1 * xd + c0;
9777  double corrfortxa = a2 * txa * txa + b1 * txa + c0;
9778  h_corrforxaADDI_HE->Fill(amplitude, corrforxa);
9779  h_corrforxaADDI0_HE->Fill(amplitude, 1.);
9780  amplitude *= corrforxa;
9781  ampl *= corrforxb;
9782  amplitude345 *= corrforxc;
9783  ampl3ts *= corrforxd;
9784  tocampl *= corrfortxa;
9785  }
9786  // MAIN case:
9787  else {
9788  double c0 = 1.000000;
9789  double b1 = 2.71238e-05;
9790  double a2 = 1.32877e-10;
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_corrforxaMAIN_HE->Fill(amplitude, corrforxa);
9797  h_corrforxaMAIN0_HE->Fill(amplitude, 1.);
9798  amplitude *= corrforxa;
9799  ampl *= corrforxb;
9800  amplitude345 *= corrforxc;
9801  ampl3ts *= corrforxd;
9802  tocampl *= corrfortxa;
9803  }
9804  } // sub == 2 HE charge correction end
9805  } //flagsipmcorrection_
9807  // sub=1||2 HBHE
9808  if (sub == 1 || sub == 2) {
9809  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HBHE
9810  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HBHE
9811  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HBHE
9812  }
9813  tocamplchannel[sub - 1][mdepth - 1][ieta + 41][iphi] += tocampl; // 0-neta ; 0-71 HBHE
9814 
9815  double ratio = 0.;
9816  // if(amplallTS != 0.) ratio = ampl/amplallTS;
9817  if (amplitude != 0.)
9818  ratio = ampl / amplitude;
9819  if (ratio < 0. || ratio > 1.02)
9820  ratio = 0.;
9821  double aveamplitude = 0.;
9822  double aveamplitudew = 0.;
9823  if (absamplitude > 0 && timew > 0)
9824  aveamplitude = timew / absamplitude; // average_TS +1
9825  if (amplitude0 > 0 && timeww > 0)
9826  aveamplitudew = timeww / amplitude0; // average_TS +1
9827  double rmsamp = 0.;
9828  // and CapIdErrors:
9829  int error = 0;
9830  bool anycapid = true;
9831  int lastcapid = 0;
9832  int capid = 0;
9833  for (int ii = 0; ii < TSsize; ii++) {
9834  double aaaaaa = (ii + 1) - aveamplitudew;
9835  double aaaaaa2 = aaaaaa * aaaaaa;
9836  double ampldefault = tool[ii];
9837  rmsamp += (aaaaaa2 * ampldefault); // fC
9838  capid = (qie11df[ii]).capid();
9839  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
9840  anycapid = false;
9841  }
9842  lastcapid = capid;
9843  } //for 2
9844 
9845  if (!anycapid)
9846  error = 1;
9847  double rmsamplitude = 0.;
9848  if ((amplitude0 > 0 && rmsamp > 0) || (amplitude0 < 0 && rmsamp < 0))
9849  rmsamplitude = sqrt(rmsamp / amplitude0);
9850  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
9851  // CapIdErrors end /////////////////////////////////////////////////////////
9852 
9853  // AZ 1.10.2015:
9854  if (error == 1) {
9855  if (sub == 1 && mdepth == 1)
9857  if (sub == 1 && mdepth == 2)
9859  if (sub == 2 && mdepth == 1)
9861  if (sub == 2 && mdepth == 2)
9863  if (sub == 2 && mdepth == 3)
9865  }
9866  if (error != 1) {
9867  if (sub == 1 && mdepth == 1)
9869  if (sub == 1 && mdepth == 2)
9871  if (sub == 2 && mdepth == 1)
9873  if (sub == 2 && mdepth == 2)
9875  if (sub == 2 && mdepth == 3)
9877  }
9878 
9879  for (int ii = 0; ii < TSsize; ii++) {
9880  // for (int ii=0; ii<10; ii++) {
9881  double ampldefault = tool[ii];
9883  if (sub == 1) {
9884  if (amplitude0 > 120) {
9885  h_shape_Ahigh_HB0->Fill(float(ii), ampldefault);
9886  h_shape0_Ahigh_HB0->Fill(float(ii), 1.);
9887  } else {
9888  h_shape_Alow_HB0->Fill(float(ii), ampldefault);
9889  h_shape0_Alow_HB0->Fill(float(ii), 1.);
9890  } //HB0
9892  if (pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
9893  pedestal3 < pedestalHBMax_) {
9894  h_shape_Ahigh_HB1->Fill(float(ii), ampldefault);
9895  h_shape0_Ahigh_HB1->Fill(float(ii), 1.);
9896  } else {
9897  h_shape_Alow_HB1->Fill(float(ii), ampldefault);
9898  h_shape0_Alow_HB1->Fill(float(ii), 1.);
9899  } //HB1
9900  if (error == 0) {
9901  h_shape_Ahigh_HB2->Fill(float(ii), ampldefault);
9902  h_shape0_Ahigh_HB2->Fill(float(ii), 1.);
9903  } else {
9904  h_shape_Alow_HB2->Fill(float(ii), ampldefault);
9905  h_shape0_Alow_HB2->Fill(float(ii), 1.);
9906  } //HB2
9908  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
9909  pedestalw3 < pedestalwHBMax_) {
9910  h_shape_Ahigh_HB3->Fill(float(ii), ampldefault);
9911  h_shape0_Ahigh_HB3->Fill(float(ii), 1.);
9912  } else {
9913  h_shape_Alow_HB3->Fill(float(ii), ampldefault);
9914  h_shape0_Alow_HB3->Fill(float(ii), 1.);
9915  } //HB3
9916 
9917  } // sub HB
9918 
9919  } //for 3 over TSs
9920 
9921  if (sub == 1) {
9922  // bad_channels with C,A,W,P,pW,
9923  if (error == 1 || amplitude0 < ADCAmplHBMin_ || amplitude0 > ADCAmplHBMax_ || rmsamplitude < rmsHBMin_ ||
9924  rmsamplitude > rmsHBMax_ || pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ ||
9925  pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestalw0 < pedestalwHBMax_ ||
9926  pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ || pedestalw3 < pedestalwHBMax_) {
9927  for (int ii = 0; ii < TSsize; ii++) {
9928  double ampldefault = tool[ii];
9929  h_shape_bad_channels_HB->Fill(float(ii), ampldefault);
9930  h_shape0_bad_channels_HB->Fill(float(ii), 1.);
9931  }
9932  }
9933  // good_channels with C,A,W,P,pW
9934  else {
9935  for (int ii = 0; ii < TSsize; ii++) {
9936  double ampldefault = tool[ii];
9937  h_shape_good_channels_HB->Fill(float(ii), ampldefault);
9938  h_shape0_good_channels_HB->Fill(float(ii), 1.);
9939  }
9940  }
9941  } // sub HB
9942 
9943  // HE starts:
9944  if (sub == 2) {
9945  // shape bad_channels with C,A,W,P,pW,
9946  if (error == 1 || amplitude0 < ADCAmplHEMin_ || amplitude0 > ADCAmplHEMax_ || rmsamplitude < rmsHEMin_ ||
9947  rmsamplitude > rmsHEMax_ || pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ ||
9948  pedestal2 < pedestalHEMax_ || pedestal3 < pedestalHEMax_ || pedestalw0 < pedestalwHEMax_ ||
9949  pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ || pedestalw3 < pedestalwHEMax_) {
9950  for (int ii = 0; ii < TSsize; ii++) {
9951  double ampldefault = tool[ii];
9952  h_shape_bad_channels_HE->Fill(float(ii), ampldefault);
9953  h_shape0_bad_channels_HE->Fill(float(ii), 1.);
9954  }
9955  }
9956  // shape good_channels with C,A,W,P,pW,
9957  else {
9958  for (int ii = 0; ii < TSsize; ii++) {
9959  double ampldefault = tool[ii];
9960  h_shape_good_channels_HE->Fill(float(ii), ampldefault);
9961  h_shape0_good_channels_HE->Fill(float(ii), 1.);
9962  } // ii
9963  } // else for good channels
9964  } // sub HE
9966  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
9967  // for Error B-type
9968  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
9969  // sumEstimator0[sub-1][mdepth-1][ieta+41][iphi] += pedestalw0;//Sig_Pedestals
9970  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
9971  // HB
9972  if (sub == 1) {
9974  // // // // // // // // // HB PedestalCorrelations :
9975  double mypedestal = pedestal0;
9976  double mypedestalw = pedestalw0;
9977  h2_pedvsampl_HB->Fill(mypedestal, amplitude);
9978  h2_pedwvsampl_HB->Fill(mypedestalw, amplitude);
9979  h_pedvsampl_HB->Fill(mypedestal, amplitude);
9980  h_pedwvsampl_HB->Fill(mypedestalw, amplitude);
9981  h_pedvsampl0_HB->Fill(mypedestal, 1.);
9982  h_pedwvsampl0_HB->Fill(mypedestalw, 1.);
9983 
9984  h2_amplvsped_HB->Fill(amplitude, mypedestal);
9985  h2_amplvspedw_HB->Fill(amplitude, mypedestalw);
9986  h_amplvsped_HB->Fill(amplitude, mypedestal);
9987  h_amplvspedw_HB->Fill(amplitude, mypedestalw);
9988  h_amplvsped0_HB->Fill(amplitude, 1.);
9989  } //
9990  // // // // // // // // // HB Pedestals:
9991  if (studyPedestalsHist_) {
9992  h_pedestal0_HB->Fill(pedestal0, 1.);
9993  h_pedestal1_HB->Fill(pedestal1, 1.);
9994  h_pedestal2_HB->Fill(pedestal2, 1.);
9995  h_pedestal3_HB->Fill(pedestal3, 1.);
9996  h_pedestalaver4_HB->Fill(pedestalaver4, 1.);
9997  h_pedestalaver9_HB->Fill(pedestalaver9, 1.);
9998  h_pedestalw0_HB->Fill(pedestalw0, 1.);
9999  h_pedestalw1_HB->Fill(pedestalw1, 1.);
10000  h_pedestalw2_HB->Fill(pedestalw2, 1.);
10001  h_pedestalw3_HB->Fill(pedestalw3, 1.);
10002  h_pedestalwaver4_HB->Fill(pedestalwaver4, 1.);
10003  h_pedestalwaver9_HB->Fill(pedestalwaver9, 1.);
10004  // for averaged values:
10005  if (mdepth == 1) {
10006  h_mapDepth1Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
10007  h_mapDepth1Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
10008  h_mapDepth1Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
10009  h_mapDepth1Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
10010  h_mapDepth1Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
10011  h_mapDepth1Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
10012  h_mapDepth1Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
10013  h_mapDepth1Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
10014  }
10015  if (mdepth == 2) {
10016  h_mapDepth2Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
10017  h_mapDepth2Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
10018  h_mapDepth2Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
10019  h_mapDepth2Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
10020  h_mapDepth2Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
10021  h_mapDepth2Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
10022  h_mapDepth2Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
10023  h_mapDepth2Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
10024  }
10025  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
10026  pedestalw3 < pedestalwHBMax_) {
10027  if (mdepth == 1)
10028  h_mapDepth1pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10029  if (mdepth == 2)
10030  h_mapDepth2pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10031  if (mdepth == 3)
10032  h_mapDepth3pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10033  if (mdepth == 3)
10034  h_mapDepth4pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10035  }
10036  if (pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
10037  pedestal3 < pedestalHBMax_) {
10038  if (mdepth == 1)
10039  h_mapDepth1pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10040  if (mdepth == 2)
10041  h_mapDepth2pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10042  if (mdepth == 3)
10043  h_mapDepth3pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10044  if (mdepth == 4)
10045  h_mapDepth4pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10046  }
10047  for (int ii = 0; ii < TSsize; ii++) {
10048  h_pedestal00_HB->Fill(pedestal00->getValue(ii), 1.);
10049  h_gain_HB->Fill(gain->getValue(ii), 1.);
10050  }
10051  h_respcorr_HB->Fill(respcorr->getValue(), 1.);
10052  h_timecorr_HB->Fill(timecorr->getValue(), 1.);
10053  h_lutcorr_HB->Fill(lutcorr->getValue(), 1.);
10054  h_difpedestal0_HB->Fill(difpedestal0, 1.);
10055  h_difpedestal1_HB->Fill(difpedestal1, 1.);
10056  h_difpedestal2_HB->Fill(difpedestal2, 1.);
10057  h_difpedestal3_HB->Fill(difpedestal3, 1.);
10058  } //
10059  // // // // // // // // // HB ADCAmpl:
10060  if (studyADCAmplHist_) {
10061  h_ADCAmpl345Zoom_HB->Fill(amplitude345, 1.);
10062  h_ADCAmpl345Zoom1_HB->Fill(amplitude345, 1.);
10063  h_ADCAmpl345_HB->Fill(amplitude345, 1.);
10064  if (error == 0) {
10066  h_ADCAmpl345_HBCapIdNoError->Fill(amplitude345, 1.);
10067  }
10068  if (error == 1) {
10069  h_ADCAmpl_HBCapIdError->Fill(amplitude, 1.);
10070  h_ADCAmpl345_HBCapIdError->Fill(amplitude345, 1.);
10071  }
10072  h_ADCAmplZoom_HB->Fill(amplitude, 1.);
10073  h_ADCAmplZoom1_HB->Fill(amplitude, 1.);
10074  h_ADCAmpl_HB->Fill(amplitude, 1.);
10075 
10076  h_AmplitudeHBrest->Fill(amplitude, 1.);
10077  h_AmplitudeHBrest1->Fill(amplitude, 1.);
10078  h_AmplitudeHBrest6->Fill(amplitude, 1.);
10079 
10080  if (amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_) {
10082  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10083  if (mdepth == 1)
10084  h_mapDepth1ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10085  if (mdepth == 2)
10086  h_mapDepth2ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10087  if (mdepth == 3)
10088  h_mapDepth3ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10089  if (mdepth == 4)
10090  h_mapDepth4ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10091  } // if
10092  // if(amplitude >400.) averSIGNALoccupancy_HB += 1.;
10093  if (amplitude < 35.) {
10094  if (mdepth == 1)
10095  h_mapDepth1ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10096  if (mdepth == 2)
10097  h_mapDepth2ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10098  if (mdepth == 3)
10099  h_mapDepth3ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10100  if (mdepth == 4)
10101  h_mapDepth4ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10102  } // if
10103  // for averaged values:
10104  if (mdepth == 1)
10105  h_mapDepth1ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10106  if (mdepth == 2)
10107  h_mapDepth2ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10108  if (mdepth == 3)
10109  h_mapDepth3ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10110  if (mdepth == 4)
10111  h_mapDepth4ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10112  if (mdepth == 1)
10113  h_mapDepth1ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10114  if (mdepth == 2)
10115  h_mapDepth2ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10116  if (mdepth == 3)
10117  h_mapDepth3ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10118  if (mdepth == 4)
10119  h_mapDepth4ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10122  h_bcnvsamplitude_HB->Fill(float(bcn), amplitude);
10123  h_bcnvsamplitude0_HB->Fill(float(bcn), 1.);
10125  h_orbitNumvsamplitude0_HB->Fill(float(orbitNum), 1.);
10127  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
10128  } //if(studyADCAmplHist_
10130 
10131  // // // // // // // // // HB TSmean:
10132  if (studyTSmeanShapeHist_) {
10133  h_TSmeanA_HB->Fill(aveamplitude1, 1.);
10134  // h2_TSnVsAyear2023_HB->Fill(25.*aveamplitude1, amplitude);
10135  h2_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
10136  h1_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
10137  h1_TSnVsAyear20230_HB->Fill(amplitude, 1.);
10138  if (aveamplitude1 < TSmeanHBMin_ || aveamplitude1 > TSmeanHBMax_) {
10140  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10141  if (mdepth == 1)
10142  h_mapDepth1TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10143  if (mdepth == 2)
10144  h_mapDepth2TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10145  if (mdepth == 3)
10146  h_mapDepth3TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10147  if (mdepth == 4)
10148  h_mapDepth4TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10149  } // if
10150  // for averaged values:
10151  if (mdepth == 1)
10152  h_mapDepth1TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10153  if (mdepth == 2)
10154  h_mapDepth2TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10155  if (mdepth == 3)
10156  h_mapDepth3TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10157  if (mdepth == 4)
10158  h_mapDepth4TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10160  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
10161  } //if(studyTSmeanShapeHist_
10163 
10164  // // // // // // // // // HB TSmax:
10165  if (studyTSmaxShapeHist_) {
10166  h_TSmaxA_HB->Fill(float(ts_with_max_signal), 1.);
10167  if (ts_with_max_signal < TSpeakHBMin_ || ts_with_max_signal > TSpeakHBMax_) {
10169  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10170  if (mdepth == 1)
10171  h_mapDepth1TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10172  if (mdepth == 2)
10173  h_mapDepth2TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10174  if (mdepth == 3)
10175  h_mapDepth3TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10176  if (mdepth == 4)
10177  h_mapDepth4TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10178  } // if
10179  // for averaged values:
10180  if (mdepth == 1)
10181  h_mapDepth1TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10182  if (mdepth == 2)
10183  h_mapDepth2TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10184  if (mdepth == 3)
10185  h_mapDepth3TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10186  if (mdepth == 4)
10187  h_mapDepth4TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10189  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
10190  } //if(studyTSmaxShapeHist_
10192 
10193  // // // // // // // // // HB RMS:
10194  if (studyRMSshapeHist_) {
10195  h_Amplitude_HB->Fill(rmsamplitude, 1.);
10196  if (rmsamplitude < rmsHBMin_ || rmsamplitude > rmsHBMax_) {
10198  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10199  if (mdepth == 1)
10200  h_mapDepth1Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10201  if (mdepth == 2)
10202  h_mapDepth2Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10203  if (mdepth == 3)
10204  h_mapDepth3Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10205  if (mdepth == 4)
10206  h_mapDepth4Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10207  } // if
10208  // for averaged values:
10209  if (mdepth == 1)
10210  h_mapDepth1Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10211  if (mdepth == 2)
10212  h_mapDepth2Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10213  if (mdepth == 3)
10214  h_mapDepth3Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10215  if (mdepth == 4)
10216  h_mapDepth4Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10218  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
10219  } //if(studyRMSshapeHist_)
10221 
10222  // // // // // // // // // HB Ratio:
10223  if (studyRatioShapeHist_) {
10224  h_Ampl_HB->Fill(ratio, 1.);
10225  if (ratio < ratioHBMin_ || ratio > ratioHBMax_) {
10227  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10228  if (mdepth == 1)
10229  h_mapDepth1Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10230  if (mdepth == 2)
10231  h_mapDepth2Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10232  if (mdepth == 3)
10233  h_mapDepth3Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10234  if (mdepth == 4)
10235  h_mapDepth4Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10236  // //
10237  } //if(ratio
10238  // for averaged values:
10239  if (mdepth == 1)
10240  h_mapDepth1Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10241  if (mdepth == 2)
10242  h_mapDepth2Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10243  if (mdepth == 3)
10244  h_mapDepth3Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10245  if (mdepth == 4)
10246  h_mapDepth4Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10248  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
10249  } //if(studyRatioShapeHist_)
10251 
10252  // // // // // // // // // HB DiffAmplitude:
10253  if (studyDiffAmplHist_) {
10254  if (mdepth == 1)
10255  h_mapDepth1AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10256  if (mdepth == 2)
10257  h_mapDepth2AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10258  if (mdepth == 3)
10259  h_mapDepth3AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10260  if (mdepth == 4)
10261  h_mapDepth4AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10262  } // if(studyDiffAmplHist_)
10263 
10265  if (mdepth == 1)
10266  h_mapDepth1_HB->Fill(double(ieta), double(iphi), 1.);
10267  if (mdepth == 2)
10268  h_mapDepth2_HB->Fill(double(ieta), double(iphi), 1.);
10269  if (mdepth == 3)
10270  h_mapDepth3_HB->Fill(double(ieta), double(iphi), 1.);
10271  if (mdepth == 4)
10272  h_mapDepth4_HB->Fill(double(ieta), double(iphi), 1.);
10273 
10274  if (flagTS2 == 1) {
10275  if (mdepth == 1)
10276  h_mapDepth1TS2_HB->Fill(double(ieta), double(iphi), 1.);
10277  if (mdepth == 2)
10278  h_mapDepth2TS2_HB->Fill(double(ieta), double(iphi), 1.);
10279  if (mdepth == 3)
10280  h_mapDepth3TS2_HB->Fill(double(ieta), double(iphi), 1.);
10281  if (mdepth == 4)
10282  h_mapDepth4TS2_HB->Fill(double(ieta), double(iphi), 1.);
10283  } // select entries only in TS=2
10284 
10285  } //if ( sub == 1 )
10286 
10287  // HE QIE11
10288  if (sub == 2) {
10289  // // // // // // // // // HE QIE11 PedestalCorrelations :
10291  // double mypedestal = pedestalaver9;
10292  // double mypedestalw = pedestalwaver9;
10293  double mypedestal = pedestal0;
10294  double mypedestalw = pedestalw0;
10295  h2_pedvsampl_HE->Fill(mypedestal, amplitude);
10296  h2_pedwvsampl_HE->Fill(mypedestalw, amplitude);
10297  h_pedvsampl_HE->Fill(mypedestal, amplitude);
10298  h_pedwvsampl_HE->Fill(mypedestalw, amplitude);
10299  h_pedvsampl0_HE->Fill(mypedestal, 1.);
10300  h_pedwvsampl0_HE->Fill(mypedestalw, 1.);
10301  } //
10302  // // // // // // // // // HE QIE11 Pedestals:
10303  if (studyPedestalsHist_) {
10304  h_pedestal0_HE->Fill(pedestal0, 1.);
10305  h_pedestal1_HE->Fill(pedestal1, 1.);
10306  h_pedestal2_HE->Fill(pedestal2, 1.);
10307  h_pedestal3_HE->Fill(pedestal3, 1.);
10308  h_pedestalaver4_HE->Fill(pedestalaver4, 1.);
10309  h_pedestalaver9_HE->Fill(pedestalaver9, 1.);
10310  h_pedestalw0_HE->Fill(pedestalw0, 1.);
10311  h_pedestalw1_HE->Fill(pedestalw1, 1.);
10312  h_pedestalw2_HE->Fill(pedestalw2, 1.);
10313  h_pedestalw3_HE->Fill(pedestalw3, 1.);
10314  h_pedestalwaver4_HE->Fill(pedestalwaver4, 1.);
10315  h_pedestalwaver9_HE->Fill(pedestalwaver9, 1.);
10316  // for averaged values:
10317  if (mdepth == 1) {
10318  h_mapDepth1Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10319  h_mapDepth1Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10320  h_mapDepth1Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10321  h_mapDepth1Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10322  h_mapDepth1Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10323  h_mapDepth1Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10324  h_mapDepth1Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10325  h_mapDepth1Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10326  }
10327  if (mdepth == 2) {
10328  h_mapDepth2Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10329  h_mapDepth2Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10330  h_mapDepth2Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10331  h_mapDepth2Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10332  h_mapDepth2Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10333  h_mapDepth2Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10334  h_mapDepth2Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10335  h_mapDepth2Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10336  }
10337  if (mdepth == 3) {
10338  h_mapDepth3Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10339  h_mapDepth3Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10340  h_mapDepth3Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10341  h_mapDepth3Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10342  h_mapDepth3Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10343  h_mapDepth3Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10344  h_mapDepth3Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10345  h_mapDepth3Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10346  }
10347  if (pedestalw0 < pedestalwHEMax_ || pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ ||
10348  pedestalw3 < pedestalwHEMax_) {
10349  if (mdepth == 1)
10350  h_mapDepth1pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10351  if (mdepth == 2)
10352  h_mapDepth2pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10353  if (mdepth == 3)
10354  h_mapDepth3pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10355  if (mdepth == 4)
10356  h_mapDepth4pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10357  if (mdepth == 5)
10358  h_mapDepth5pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10359  if (mdepth == 6)
10360  h_mapDepth6pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10361  if (mdepth == 7)
10362  h_mapDepth7pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10363  }
10364  if (pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ || pedestal2 < pedestalHEMax_ ||
10365  pedestal3 < pedestalHEMax_) {
10366  if (mdepth == 1)
10367  h_mapDepth1pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10368  if (mdepth == 2)
10369  h_mapDepth2pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10370  if (mdepth == 3)
10371  h_mapDepth3pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10372  if (mdepth == 4)
10373  h_mapDepth4pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10374  if (mdepth == 5)
10375  h_mapDepth5pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10376  if (mdepth == 6)
10377  h_mapDepth6pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10378  if (mdepth == 7)
10379  h_mapDepth7pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10380  }
10381  for (int ii = 0; ii < TSsize; ii++) {
10382  h_pedestal00_HE->Fill(pedestal00->getValue(ii), 1.);
10383  h_gain_HE->Fill(gain->getValue(ii), 1.);
10384  }
10385  h_respcorr_HE->Fill(respcorr->getValue(), 1.);
10386  h_timecorr_HE->Fill(timecorr->getValue(), 1.);
10387  h_lutcorr_HE->Fill(lutcorr->getValue(), 1.);
10388  } //
10389  // // // // // // // // // HE QIE11 ADCAmpl:
10390  if (studyADCAmplHist_) {
10391  h_ADCAmpl345_HE->Fill(amplitude345, 1.);
10392  h_ADCAmpl_HE->Fill(amplitude, 1.);
10393  // if( ieta <0) h_ADCAmpl_HEM->Fill(amplitude,1.);
10394  // if( ieta >0) h_ADCAmpl_HEP->Fill(amplitude,1.);
10395  h_ADCAmplrest_HE->Fill(amplitude, 1.);
10396  h_ADCAmplrest1_HE->Fill(amplitude, 1.);
10397  h_ADCAmplrest6_HE->Fill(amplitude, 1.);
10398 
10399  if (amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_) {
10401  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10402  if (mdepth == 1)
10403  h_mapDepth1ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10404  if (mdepth == 2)
10405  h_mapDepth2ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10406  if (mdepth == 3)
10407  h_mapDepth3ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10408  if (mdepth == 4)
10409  h_mapDepth4ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10410  if (mdepth == 5)
10411  h_mapDepth5ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10412  if (mdepth == 6)
10413  h_mapDepth6ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10414  if (mdepth == 7)
10415  h_mapDepth7ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10416  } // if
10417  // if(amplitude > 700.) averSIGNALoccupancy_HE += 1.;
10418  if (amplitude < 500.) {
10419  if (mdepth == 1)
10420  h_mapDepth1ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10421  if (mdepth == 2)
10422  h_mapDepth2ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10423  if (mdepth == 3)
10424  h_mapDepth3ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10425  if (mdepth == 4)
10426  h_mapDepth4ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10427  if (mdepth == 5)
10428  h_mapDepth5ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10429  if (mdepth == 6)
10430  h_mapDepth6ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10431  if (mdepth == 7)
10432  h_mapDepth7ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10433  } // if
10434 
10435  h_ADCAmplZoom1_HE->Fill(amplitude, 1.); // for amplitude allTS
10436  h_ADCAmpl345Zoom1_HE->Fill(ampl3ts, 1.); // for ampl3ts 3TSs
10437  h_ADCAmpl345Zoom_HE->Fill(ampl, 1.); // for ampl 4TSs
10438 
10439  if (amplitude > 110 && amplitude < 150) {
10440  h_mapADCAmplfirstpeak_HE->Fill(double(ieta), double(iphi), amplitude);
10441  h_mapADCAmplfirstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10442  } else if (amplitude > 150 && amplitude < 190) {
10443  h_mapADCAmplsecondpeak_HE->Fill(double(ieta), double(iphi), amplitude);
10444  h_mapADCAmplsecondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10445  }
10446 
10447  if (ampl3ts > 70 && ampl3ts < 110) {
10448  h_mapADCAmpl11firstpeak_HE->Fill(double(ieta), double(iphi), ampl3ts);
10449  h_mapADCAmpl11firstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10450  } else if (ampl3ts > 110 && ampl3ts < 150) {
10451  h_mapADCAmpl11secondpeak_HE->Fill(double(ieta), double(iphi), ampl3ts);
10452  h_mapADCAmpl11secondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10453  }
10454  if (ampl > 87 && ampl < 127) {
10455  h_mapADCAmpl12firstpeak_HE->Fill(double(ieta), double(iphi), ampl);
10456  h_mapADCAmpl12firstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10457  } else if (ampl > 127 && ampl < 167) {
10458  h_mapADCAmpl12secondpeak_HE->Fill(double(ieta), double(iphi), ampl);
10459  h_mapADCAmpl12secondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10460  }
10461  // for averaged values of every channel:
10462  if (mdepth == 1)
10463  h_mapDepth1ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10464  if (mdepth == 2)
10465  h_mapDepth2ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10466  if (mdepth == 3)
10467  h_mapDepth3ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10468  if (mdepth == 4)
10469  h_mapDepth4ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10470  if (mdepth == 5)
10471  h_mapDepth5ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10472  if (mdepth == 6)
10473  h_mapDepth6ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10474  if (mdepth == 7)
10475  h_mapDepth7ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10476  if (mdepth == 1)
10477  h_mapDepth1ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10478  if (mdepth == 2)
10479  h_mapDepth2ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10480  if (mdepth == 3)
10481  h_mapDepth3ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10482  if (mdepth == 4)
10483  h_mapDepth4ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10484  if (mdepth == 5)
10485  h_mapDepth5ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10486  if (mdepth == 6)
10487  h_mapDepth6ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10488  if (mdepth == 7)
10489  h_mapDepth7ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10490  // for averaged values of SiPM channels only:
10491  if (mdepth == 1)
10492  h_mapDepth1ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10493  if (mdepth == 2)
10494  h_mapDepth2ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10495  if (mdepth == 3)
10496  h_mapDepth3ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10497  if (mdepth == 1)
10498  h_mapDepth1ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10499  if (mdepth == 2)
10500  h_mapDepth2ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10501  if (mdepth == 3)
10502  h_mapDepth3ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10503  //
10506  h_bcnvsamplitude_HE->Fill(float(bcn), amplitude);
10507  h_bcnvsamplitude0_HE->Fill(float(bcn), 1.);
10509  h_orbitNumvsamplitude0_HE->Fill(float(orbitNum), 1.);
10511  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
10512  } //if(studyADCAmplHist_
10513  // // // // // // // // // HE QIE11 TSmean:
10514  if (studyTSmeanShapeHist_) {
10515  h_TSmeanA_HE->Fill(aveamplitude1, 1.);
10516  // h2_TSnVsAyear2023_HE->Fill(25.*aveamplitude1, amplitude);
10517  h2_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
10518  h1_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
10519  h1_TSnVsAyear20230_HE->Fill(amplitude, 1.);
10520  if (aveamplitude1 < TSmeanHEMin_ || aveamplitude1 > TSmeanHEMax_) {
10522  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10523  if (mdepth == 1)
10524  h_mapDepth1TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10525  if (mdepth == 2)
10526  h_mapDepth2TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10527  if (mdepth == 3)
10528  h_mapDepth3TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10529  if (mdepth == 4)
10530  h_mapDepth4TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10531  if (mdepth == 5)
10532  h_mapDepth5TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10533  if (mdepth == 6)
10534  h_mapDepth6TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10535  if (mdepth == 7)
10536  h_mapDepth7TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10537  } // if
10538  // for averaged values:
10539  if (mdepth == 1)
10540  h_mapDepth1TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10541  if (mdepth == 2)
10542  h_mapDepth2TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10543  if (mdepth == 3)
10544  h_mapDepth3TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10545  if (mdepth == 4)
10546  h_mapDepth4TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10547  if (mdepth == 5)
10548  h_mapDepth5TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10549  if (mdepth == 6)
10550  h_mapDepth6TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10551  if (mdepth == 7)
10552  h_mapDepth7TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10554  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
10555  } //if(studyTSmeanShapeHist_) {
10557  // // // // // // // // // HE QIE11 TSmax:
10558  if (studyTSmaxShapeHist_) {
10559  h_TSmaxA_HE->Fill(float(ts_with_max_signal), 1.);
10560  if (ts_with_max_signal < TSpeakHEMin_ || ts_with_max_signal > TSpeakHEMax_) {
10562  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10563  if (mdepth == 1)
10564  h_mapDepth1TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10565  if (mdepth == 2)
10566  h_mapDepth2TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10567  if (mdepth == 3)
10568  h_mapDepth3TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10569  if (mdepth == 4)
10570  h_mapDepth4TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10571  if (mdepth == 5)
10572  h_mapDepth5TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10573  if (mdepth == 6)
10574  h_mapDepth6TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10575  if (mdepth == 7)
10576  h_mapDepth7TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10577  } // if
10578  // for averaged values:
10579  if (mdepth == 1)
10580  h_mapDepth1TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10581  if (mdepth == 2)
10582  h_mapDepth2TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10583  if (mdepth == 3)
10584  h_mapDepth3TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10585  if (mdepth == 4)
10586  h_mapDepth4TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10587  if (mdepth == 5)
10588  h_mapDepth5TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10589  if (mdepth == 6)
10590  h_mapDepth6TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10591  if (mdepth == 7)
10592  h_mapDepth7TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10594  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
10595  } //if(studyTSmaxShapeHist_) {
10597  // // // // // // // // // HE QIE11 RMS:
10598  if (studyRMSshapeHist_) {
10599  h_Amplitude_HE->Fill(rmsamplitude, 1.);
10600  if (rmsamplitude < rmsHEMin_ || rmsamplitude > rmsHEMax_) {
10602  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10603  if (mdepth == 1)
10604  h_mapDepth1Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10605  if (mdepth == 2)
10606  h_mapDepth2Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10607  if (mdepth == 3)
10608  h_mapDepth3Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10609  if (mdepth == 4)
10610  h_mapDepth4Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10611  if (mdepth == 5)
10612  h_mapDepth5Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10613  if (mdepth == 6)
10614  h_mapDepth6Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10615  if (mdepth == 7)
10616  h_mapDepth7Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
10617  }
10618  // for averaged values:
10619  if (mdepth == 1)
10620  h_mapDepth1Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10621  if (mdepth == 2)
10622  h_mapDepth2Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10623  if (mdepth == 3)
10624  h_mapDepth3Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10625  if (mdepth == 4)
10626  h_mapDepth4Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10627  if (mdepth == 5)
10628  h_mapDepth5Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10629  if (mdepth == 6)
10630  h_mapDepth6Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10631  if (mdepth == 7)
10632  h_mapDepth7Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
10634  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
10635  } //if(studyRMSshapeHist_)
10637 
10638  // // // // // // // // // HE QIE11 Ratio:
10639  if (studyRatioShapeHist_) {
10640  h_Ampl_HE->Fill(ratio, 1.);
10641  if (ratio < ratioHEMin_ || ratio > ratioHEMax_) {
10643  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10644  if (mdepth == 1)
10645  h_mapDepth1Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10646  if (mdepth == 2)
10647  h_mapDepth2Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10648  if (mdepth == 3)
10649  h_mapDepth3Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10650  if (mdepth == 4)
10651  h_mapDepth4Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10652  if (mdepth == 5)
10653  h_mapDepth5Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10654  if (mdepth == 6)
10655  h_mapDepth6Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10656  if (mdepth == 7)
10657  h_mapDepth7Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
10658  }
10659  // for averaged values:
10660  if (mdepth == 1)
10661  h_mapDepth1Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10662  if (mdepth == 2)
10663  h_mapDepth2Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10664  if (mdepth == 3)
10665  h_mapDepth3Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10666  if (mdepth == 4)
10667  h_mapDepth4Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10668  if (mdepth == 5)
10669  h_mapDepth5Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10670  if (mdepth == 6)
10671  h_mapDepth6Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10672  if (mdepth == 7)
10673  h_mapDepth7Ampl_HE->Fill(double(ieta), double(iphi), ratio);
10675  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
10676  } //if(studyRatioShapeHist_)
10678  // // // // // // // // // HE QIE11 DiffAmplitude:
10679  if (studyDiffAmplHist_) {
10680  if (mdepth == 1)
10681  h_mapDepth1AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10682  if (mdepth == 2)
10683  h_mapDepth2AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10684  if (mdepth == 3)
10685  h_mapDepth3AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10686  if (mdepth == 4)
10687  h_mapDepth4AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10688  if (mdepth == 5)
10689  h_mapDepth5AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10690  if (mdepth == 6)
10691  h_mapDepth6AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10692  if (mdepth == 7)
10693  h_mapDepth7AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
10694  } // if(studyDiffAmplHist_)
10696  if (mdepth == 1)
10697  h_mapDepth1_HE->Fill(double(ieta), double(iphi), 1.);
10698  if (mdepth == 2)
10699  h_mapDepth2_HE->Fill(double(ieta), double(iphi), 1.);
10700  if (mdepth == 3)
10701  h_mapDepth3_HE->Fill(double(ieta), double(iphi), 1.);
10702  if (mdepth == 4)
10703  h_mapDepth4_HE->Fill(double(ieta), double(iphi), 1.);
10704  if (mdepth == 5)
10705  h_mapDepth5_HE->Fill(double(ieta), double(iphi), 1.);
10706  if (mdepth == 6)
10707  h_mapDepth6_HE->Fill(double(ieta), double(iphi), 1.);
10708  if (mdepth == 7)
10709  h_mapDepth7_HE->Fill(double(ieta), double(iphi), 1.);
10710 
10711  if (flagTS2 == 1) {
10712  if (mdepth == 1)
10713  h_mapDepth1TS2_HE->Fill(double(ieta), double(iphi), 1.);
10714  if (mdepth == 2)
10715  h_mapDepth2TS2_HE->Fill(double(ieta), double(iphi), 1.);
10716  if (mdepth == 3)
10717  h_mapDepth3TS2_HE->Fill(double(ieta), double(iphi), 1.);
10718  if (mdepth == 4)
10719  h_mapDepth4TS2_HE->Fill(double(ieta), double(iphi), 1.);
10720  if (mdepth == 5)
10721  h_mapDepth5TS2_HE->Fill(double(ieta), double(iphi), 1.);
10722  if (mdepth == 6)
10723  h_mapDepth6TS2_HE->Fill(double(ieta), double(iphi), 1.);
10724  if (mdepth == 7)
10725  h_mapDepth7TS2_HE->Fill(double(ieta), double(iphi), 1.);
10726  } // select entries only in TS=2
10727 
10728  } //if ( sub == 2 )
10729  //
10730 }
10733  CaloSamples toolOriginal; // TS
10734  double tool[100];
10735  HcalDetId cell(digiItr->id());
10736  int mdepth = cell.depth();
10737  int iphi = cell.iphi() - 1; // 0-71
10738  int ieta = cell.ieta();
10739  if (ieta > 0)
10740  ieta -= 1; //-41 +41
10741  int sub = cell.subdet(); // (HFDigiCollection: 4-HF)
10742  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
10743  const HcalGain* gain = conditions->getGain(cell);
10744  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
10745  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
10746  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
10747  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
10748  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
10749  HcalCoderDb coder(*channelCoder, *shape);
10750  if (useADCfC_)
10751  coder.adc2fC(*digiItr, toolOriginal);
10752  double pedestalaver9 = 0.;
10753  double pedestalaver4 = 0.;
10754  double pedestal0 = 0.;
10755  double pedestal1 = 0.;
10756  double pedestal2 = 0.;
10757  double pedestal3 = 0.;
10758  double pedestalwaver9 = 0.;
10759  double pedestalwaver4 = 0.;
10760  double pedestalw0 = 0.;
10761  double pedestalw1 = 0.;
10762  double pedestalw2 = 0.;
10763  double pedestalw3 = 0.;
10764  double amplitude = 0.;
10765  double absamplitude = 0.;
10766  double ampl = 0.;
10767  double timew = 0.;
10768  double timeww = 0.;
10769  double max_signal = -100.;
10770  int ts_with_max_signal = -100;
10771  int c0 = 0;
10772  int c1 = 0;
10773  int c2 = 0;
10774  int c3 = 0;
10775  int c4 = 0;
10776  double errorBtype = 0.;
10777  int TSsize = 4; // HF for Run2
10778  if ((*digiItr).size() != TSsize)
10779  errorBtype = 1.;
10780  TSsize = digiItr->size();
10781  for (int ii = 0; ii < TSsize; ii++) {
10782  // for (int ii=0; ii<digiItr->size(); ii++) {
10783  double ampldefault = 0.;
10784  double ampldefault0 = 0.;
10785  double ampldefault1 = 0.;
10786  double ampldefault2 = 0.;
10787  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive
10788  if (useADCfC_)
10789  ampldefault1 = toolOriginal[ii]; //adcfC
10790  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts
10791  if (useADCmassive_) {
10792  ampldefault = ampldefault0;
10793  }
10794  if (useADCfC_) {
10795  ampldefault = ampldefault1;
10796  }
10797  if (useADCcounts_) {
10798  ampldefault = ampldefault2;
10799  }
10800 
10801  int capid = ((*digiItr)[ii]).capid();
10802  // double pedestal = calib.pedestal(capid);
10803  double pedestal = pedestal00->getValue(capid);
10804  double pedestalw = pedw->getSigma(capid, capid);
10806  ampldefault -= pedestal; // pedestal subtraction
10807 
10808  tool[ii] = ampldefault;
10809 
10810  pedestalaver9 += pedestal;
10811  pedestalwaver9 += pedestalw * pedestalw;
10812 
10813  if (capid == 0 && c0 == 0) {
10814  c0++;
10815  c4++;
10816  pedestalaver4 += pedestal;
10817  pedestal0 = pedestal;
10818  pedestalw0 = pedestalw;
10819  pedestalwaver4 += pedestalw * pedestalw;
10820  }
10821 
10822  if (capid == 1 && c1 == 0) {
10823  c1++;
10824  c4++;
10825  pedestalaver4 += pedestal;
10826  pedestal1 = pedestal;
10827  pedestalw1 = pedestalw;
10828  pedestalwaver4 += pedestalw * pedestalw;
10829  }
10830  if (capid == 2 && c2 == 0) {
10831  c2++;
10832  c4++;
10833  pedestalaver4 += pedestal;
10834  pedestal2 = pedestal;
10835  pedestalw2 = pedestalw;
10836  pedestalwaver4 += pedestalw * pedestalw;
10837  }
10838  if (capid == 3 && c3 == 0) {
10839  c3++;
10840  c4++;
10841  pedestalaver4 += pedestal;
10842  pedestal3 = pedestal;
10843  pedestalw3 = pedestalw;
10844  pedestalwaver4 += pedestalw * pedestalw;
10845  }
10846 
10847  if (max_signal < ampldefault) {
10848  max_signal = ampldefault;
10849  ts_with_max_signal = ii;
10850  }
10851  amplitude += ampldefault; //
10852  absamplitude += abs(ampldefault); //
10854 
10855  if (flagcpuoptimization_ == 0) {
10856  } // if(flagcpuoptimization_== 0
10857  timew += (ii + 1) * abs(ampldefault);
10858  timeww += (ii + 1) * ampldefault;
10859  } //for 1
10861  // sub=4 HF
10862  if (sub == 4) {
10863  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HF
10864  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HF
10865  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HF
10866  }
10867 
10868  pedestalaver9 /= TSsize;
10869  pedestalaver4 /= c4;
10870  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
10871  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
10872 
10873  // ------------ to get signal in TS: -2 max +1 ------------
10874  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
10875  ampl = tool[ts_with_max_signal];
10876  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
10877  ampl += tool[ts_with_max_signal + 2];
10878  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
10879  ampl += tool[ts_with_max_signal + 1];
10880  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
10881  ampl += tool[ts_with_max_signal - 1];
10882 
10883  double ratio = 0.;
10884  // if(amplallTS != 0.) ratio = ampl/amplallTS;
10885  if (amplitude != 0.)
10886  ratio = ampl / amplitude;
10887 
10888  if (ratio < 0. || ratio > 1.02)
10889  ratio = 0.;
10890 
10891  double aveamplitude = 0.;
10892  double aveamplitudew = 0.;
10893  if (absamplitude > 0 && timew > 0)
10894  aveamplitude = timew / absamplitude; // average_TS +1
10895  if (amplitude > 0 && timeww > 0)
10896  aveamplitudew = timeww / amplitude; // average_TS +1
10897 
10898  double rmsamp = 0.;
10899  // and CapIdErrors:
10900  int error = 0;
10901  bool anycapid = true;
10902  bool anyer = false;
10903  bool anydv = true;
10904  int lastcapid = 0;
10905  int capid = 0;
10906  for (int ii = 0; ii < TSsize; ii++) {
10907  double aaaaaa = (ii + 1) - aveamplitudew;
10908  double aaaaaa2 = aaaaaa * aaaaaa;
10909  double ampldefault = tool[ii];
10910  rmsamp += (aaaaaa2 * ampldefault); // fC
10911  capid = ((*digiItr)[ii]).capid();
10912  bool er = (*digiItr)[ii].er(); // error
10913  bool dv = (*digiItr)[ii].dv(); // valid data
10914  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
10915  anycapid = false;
10916  }
10917  // std::cout << " ii = " << ii << " capid = " << capid << " ((lastcapid+1)%4) = " << ((lastcapid+1)%4) << std::endl;
10918  lastcapid = capid;
10919  if (er) {
10920  anyer = true;
10921  }
10922  if (!dv) {
10923  anydv = false;
10924  }
10925  } //for 2
10926 
10927  if (!anycapid || anyer || !anydv)
10928  error = 1;
10929  double rmsamplitude = 0.;
10930  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
10931  rmsamplitude = sqrt(rmsamp / amplitude);
10932  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
10933  if (error == 1) {
10934  if (sub == 4 && mdepth == 1)
10936  if (sub == 4 && mdepth == 2)
10938  }
10939  if (error != 1) {
10940  if (sub == 4 && mdepth == 1)
10942  if (sub == 4 && mdepth == 2)
10944  }
10945 
10946  if (sub == 4) {
10947  // bad_channels with C,A,W,P,pW,
10948  if (error == 1 || amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_ || rmsamplitude < rmsHFMin_ ||
10949  rmsamplitude > rmsHFMax_ || pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ ||
10950  pedestal2 < pedestalHFMax_ || pedestal3 < pedestalHFMax_ || pedestalw0 < pedestalwHFMax_ ||
10951  pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ || pedestalw3 < pedestalwHFMax_
10952 
10953  ) {
10954  for (int ii = 0; ii < TSsize; ii++) {
10955  double ampldefault = tool[ii];
10956  h_shape_bad_channels_HF->Fill(float(ii), ampldefault);
10957  h_shape0_bad_channels_HF->Fill(float(ii), 1.);
10958  }
10959  }
10960  // good_channels with C,A,W,P,pW,
10961  else {
10962  for (int ii = 0; ii < TSsize; ii++) {
10963  double ampldefault = tool[ii];
10964  h_shape_good_channels_HF->Fill(float(ii), ampldefault);
10965  h_shape0_good_channels_HF->Fill(float(ii), 1.);
10966  }
10967  }
10968  } // sub HF
10970  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
10971  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
10972  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; // Pedestals
10973  // HF
10974  if (sub == 4) {
10975  // // // // // // // // // HF PedestalCorrelations :
10977  double mypedestal = pedestal0;
10978  double mypedestalw = pedestalw0;
10979  h2_pedvsampl_HF->Fill(mypedestal, amplitude);
10980  h2_pedwvsampl_HF->Fill(mypedestalw, amplitude);
10981  h_pedvsampl_HF->Fill(mypedestal, amplitude);
10982  h_pedwvsampl_HF->Fill(mypedestalw, amplitude);
10983  h_pedvsampl0_HF->Fill(mypedestal, 1.);
10984  h_pedwvsampl0_HF->Fill(mypedestalw, 1.);
10985  } //
10986  // // // // // // // // // HF Pedestals:
10987  if (studyPedestalsHist_) {
10988  h_pedestal0_HF->Fill(pedestal0, 1.);
10989  h_pedestal1_HF->Fill(pedestal1, 1.);
10990  h_pedestal2_HF->Fill(pedestal2, 1.);
10991  h_pedestal3_HF->Fill(pedestal3, 1.);
10992  h_pedestalaver4_HF->Fill(pedestalaver4, 1.);
10993  h_pedestalaver9_HF->Fill(pedestalaver9, 1.);
10994  h_pedestalw0_HF->Fill(pedestalw0, 1.);
10995  h_pedestalw1_HF->Fill(pedestalw1, 1.);
10996  h_pedestalw2_HF->Fill(pedestalw2, 1.);
10997  h_pedestalw3_HF->Fill(pedestalw3, 1.);
10998  h_pedestalwaver4_HF->Fill(pedestalwaver4, 1.);
10999  h_pedestalwaver9_HF->Fill(pedestalwaver9, 1.);
11000  // for averaged values:
11001  if (mdepth == 1) {
11002  h_mapDepth1Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11003  h_mapDepth1Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11004  h_mapDepth1Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11005  h_mapDepth1Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11006  h_mapDepth1Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11007  h_mapDepth1Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11008  h_mapDepth1Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11009  h_mapDepth1Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11010  }
11011  if (mdepth == 2) {
11012  h_mapDepth2Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11013  h_mapDepth2Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11014  h_mapDepth2Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11015  h_mapDepth2Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11016  h_mapDepth2Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11017  h_mapDepth2Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11018  h_mapDepth2Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11019  h_mapDepth2Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11020  }
11021 
11022  if (pedestalw0 < pedestalwHFMax_ || pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ ||
11023  pedestalw3 < pedestalwHFMax_) {
11024  if (mdepth == 1)
11025  h_mapDepth1pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11026  if (mdepth == 2)
11027  h_mapDepth2pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11028  }
11029 
11030  if (pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ || pedestal2 < pedestalHFMax_ ||
11031  pedestal3 < pedestalHFMax_) {
11032  if (mdepth == 1)
11033  h_mapDepth1pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11034  if (mdepth == 2)
11035  h_mapDepth2pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11036  }
11037 
11038  for (int ii = 0; ii < TSsize; ii++) {
11039  h_pedestal00_HF->Fill(pedestal00->getValue(ii), 1.);
11040  h_gain_HF->Fill(gain->getValue(ii), 1.);
11041  }
11042  h_respcorr_HF->Fill(respcorr->getValue(), 1.);
11043  h_timecorr_HF->Fill(timecorr->getValue(), 1.);
11044  h_lutcorr_HF->Fill(lutcorr->getValue(), 1.);
11045 
11046  } //
11047 
11048  // // // // // // // // // HF ADCAmpl:
11049  if (studyADCAmplHist_) {
11050  h_ADCAmpl_HF->Fill(amplitude, 1.);
11051  h_ADCAmplrest1_HF->Fill(amplitude, 1.);
11052  h_ADCAmplrest6_HF->Fill(amplitude, 1.);
11053 
11054  h_ADCAmplZoom1_HF->Fill(amplitude, 1.);
11055  if (amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_) {
11057  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11058  if (mdepth == 1)
11059  h_mapDepth1ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11060  if (mdepth == 2)
11061  h_mapDepth2ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11062  } // if
11063  // if(amplitude >1500.) averSIGNALoccupancy_HF += 1.;
11064  if (amplitude < 20.) {
11065  if (mdepth == 1)
11066  h_mapDepth1ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11067  if (mdepth == 2)
11068  h_mapDepth2ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11069  } // if
11070 
11071  // for averaged values:
11072  if (mdepth == 1)
11073  h_mapDepth1ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11074  if (mdepth == 2)
11075  h_mapDepth2ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11076  if (mdepth == 1)
11077  h_mapDepth1ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11078  if (mdepth == 2)
11079  h_mapDepth2ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11080 
11081  h_bcnvsamplitude_HF->Fill(float(bcn), amplitude);
11082  h_bcnvsamplitude0_HF->Fill(float(bcn), 1.);
11084  h_orbitNumvsamplitude0_HF->Fill(float(orbitNum), 1.);
11086  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
11087  } //if(studyADCAmplHist_
11089 
11090  // // // // // // // // // HF TSmean:
11091  if (studyTSmeanShapeHist_) {
11092  h_TSmeanA_HF->Fill(aveamplitude1, 1.);
11093  // h2_TSnVsAyear2023_HF->Fill(25.*aveamplitude1, amplitude);
11094  h2_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
11095  h1_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
11096  h1_TSnVsAyear20230_HF->Fill(amplitude, 1.);
11097  if (aveamplitude1 < TSmeanHFMin_ || aveamplitude1 > TSmeanHFMax_) {
11099  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11100  if (mdepth == 1)
11101  h_mapDepth1TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11102  if (mdepth == 2)
11103  h_mapDepth2TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11104  } // if
11105  // for averaged values:
11106  if (mdepth == 1)
11107  h_mapDepth1TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11108  if (mdepth == 2)
11109  h_mapDepth2TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11110 
11112  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
11113  } //if(studyTSmeanShapeHist_
11115  // // // // // // // // // HF TSmax:
11116  if (studyTSmaxShapeHist_) {
11117  h_TSmaxA_HF->Fill(float(ts_with_max_signal), 1.);
11118  if (ts_with_max_signal < TSpeakHFMin_ || ts_with_max_signal > TSpeakHFMax_) {
11120  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11121  if (mdepth == 1)
11122  h_mapDepth1TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11123  if (mdepth == 2)
11124  h_mapDepth2TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11125  } // if
11126  // for averaged values:
11127  if (mdepth == 1)
11128  h_mapDepth1TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11129  if (mdepth == 2)
11130  h_mapDepth2TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11132  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
11133  } //if(studyTSmaxShapeHist_
11135  // // // // // // // // // HF RMS:
11136  if (studyRMSshapeHist_) {
11137  h_Amplitude_HF->Fill(rmsamplitude, 1.);
11138  if (rmsamplitude < rmsHFMin_ || rmsamplitude > rmsHFMax_) {
11140  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11141  if (mdepth == 1)
11142  h_mapDepth1Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11143  if (mdepth == 2)
11144  h_mapDepth2Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11145  } // if
11146  // for averaged values:
11147  if (mdepth == 1)
11148  h_mapDepth1Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11149  if (mdepth == 2)
11150  h_mapDepth2Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11152  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
11153  } //if(studyRMSshapeHist_)
11155  // // // // // // // // // HF Ratio:
11156  if (studyRatioShapeHist_) {
11157  h_Ampl_HF->Fill(ratio, 1.);
11158  if (ratio < ratioHFMin_ || ratio > ratioHFMax_) {
11160  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11161  if (mdepth == 1)
11162  h_mapDepth1Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11163  if (mdepth == 2)
11164  h_mapDepth2Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11165  } //if(ratio
11166  // for averaged values:
11167  if (mdepth == 1)
11168  h_mapDepth1Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11169  if (mdepth == 2)
11170  h_mapDepth2Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11171 
11173  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
11174  } //if(studyRatioShapeHist_)
11175 
11177  // // // // // // // // // HF DiffAmplitude:
11178  if (studyDiffAmplHist_) {
11179  if (mdepth == 1)
11180  h_mapDepth1AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11181  if (mdepth == 2)
11182  h_mapDepth2AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11183  } // if(studyDiffAmplHist_)
11184 
11186  if (mdepth == 1)
11187  h_mapDepth1_HF->Fill(double(ieta), double(iphi), 1.);
11188  if (mdepth == 2)
11189  h_mapDepth2_HF->Fill(double(ieta), double(iphi), 1.);
11190 
11191  } //if ( sub == 4 )
11192 
11193  //
11194 }
11195 
11198  CaloSamples toolOriginal; // TS
11199  double tool[100];
11200  DetId detid = qie10df.detid();
11201  HcalDetId hcaldetid = HcalDetId(detid);
11202  int ieta = hcaldetid.ieta();
11203  if (ieta > 0)
11204  ieta -= 1;
11205  int iphi = hcaldetid.iphi() - 1;
11206  int mdepth = hcaldetid.depth();
11207  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFQIE10DigiCollection: 4-HF)
11208  nTS = qie10df.samples(); // ----------------------------!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11209  /*
11210  # flag HBHE8 HBHE11 HF8 HF10 comments:
11211  # 0 + + + + all
11212  # 1 + - + - old
11213  # 2 - + - + new (2018)
11214  # 3 - + - + new w/o high depthes
11215  # 4 + - + + 2016fall
11216  # 5 + - + + 2016fall w/o high depthes
11217  # 6 + + - + 2017begin
11218  # 7 + + - + 2017begin w/o high depthes in HEonly
11219  # 8 + + - + 2017begin w/o high depthes
11220  # 9 + + + + all w/o high depthes
11221 */
11222  if (mdepth == 0 || sub != 4)
11223  return;
11224  if (mdepth > 2 && flagupgradeqie1011_ == 3)
11225  return;
11226  if (mdepth > 2 && flagupgradeqie1011_ == 5)
11227  return;
11228  if (mdepth > 2 && flagupgradeqie1011_ == 8)
11229  return;
11230  if (mdepth > 2 && flagupgradeqie1011_ == 9)
11231  return;
11233  const HcalPedestal* pedestal00 = conditions->getPedestal(hcaldetid);
11234  const HcalGain* gain = conditions->getGain(hcaldetid);
11235  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(hcaldetid);
11236  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(hcaldetid);
11237  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(hcaldetid);
11238  const HcalQIECoder* channelCoder = conditions->getHcalCoder(hcaldetid);
11239  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(hcaldetid);
11240  HcalCoderDb coder(*channelCoder, *shape);
11241  if (useADCfC_)
11242  coder.adc2fC(qie10df, toolOriginal);
11243  // double noiseADC = qie10df[0].adc();
11245  double pedestalaver9 = 0.;
11246  double pedestalaver4 = 0.;
11247  double pedestal0 = 0.;
11248  double pedestal1 = 0.;
11249  double pedestal2 = 0.;
11250  double pedestal3 = 0.;
11251  double pedestalwaver9 = 0.;
11252  double pedestalwaver4 = 0.;
11253  double pedestalw0 = 0.;
11254  double pedestalw1 = 0.;
11255  double pedestalw2 = 0.;
11256  double pedestalw3 = 0.;
11257  double amplitude = 0.;
11258  double absamplitude = 0.;
11259  double ampl = 0.;
11260  double timew = 0.;
11261  double timeww = 0.;
11262  double max_signal = -100.;
11263  int ts_with_max_signal = -100;
11264  int c0 = 0;
11265  int c1 = 0;
11266  int c2 = 0;
11267  int c3 = 0;
11268  int c4 = 0;
11269  double errorBtype = 0.;
11270 
11271  int TSsize = 3; // HF for Run3
11272  if (nTS != TSsize)
11273  errorBtype = 1.;
11274  TSsize = nTS; // ------------------------!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11275  int flagTS1 = 0;
11276  for (int ii = 0; ii < TSsize; ii++) {
11277  double ampldefault = 0.;
11278  double ampldefault0 = 0.;
11279  double ampldefault1 = 0.;
11280  double ampldefault2 = 0.;
11281  ampldefault0 = adc2fC_QIE10[qie10df[ii].adc()]; // massive
11282  if (useADCfC_)
11283  ampldefault1 = toolOriginal[ii]; //adcfC
11284  ampldefault2 = qie10df[ii].adc(); //ADCcounts
11285  if (useADCmassive_) {
11286  ampldefault = ampldefault0;
11287  }
11288  if (useADCfC_) {
11289  ampldefault = ampldefault1;
11290  }
11291  if (useADCcounts_) {
11292  ampldefault = ampldefault2;
11293  }
11294 
11295  int capid = (qie10df[ii]).capid();
11296  double pedestal = pedestal00->getValue(capid);
11297  double pedestalw = pedw->getSigma(capid, capid);
11298 
11300  ampldefault -= pedestal; // pedestal subtraction
11301 
11302  tool[ii] = ampldefault;
11303 
11304  pedestalaver9 += pedestal;
11305  pedestalwaver9 += pedestalw * pedestalw;
11306 
11307  if (capid == 0 && c0 == 0) {
11308  c0++;
11309  c4++;
11310  pedestalaver4 += pedestal;
11311  pedestal0 = pedestal;
11312  pedestalw0 = pedestalw;
11313  pedestalwaver4 += pedestalw * pedestalw;
11314  }
11315 
11316  if (capid == 1 && c1 == 0) {
11317  c1++;
11318  c4++;
11319  pedestalaver4 += pedestal;
11320  pedestal1 = pedestal;
11321  pedestalw1 = pedestalw;
11322  pedestalwaver4 += pedestalw * pedestalw;
11323  }
11324  if (capid == 2 && c2 == 0) {
11325  c2++;
11326  c4++;
11327  pedestalaver4 += pedestal;
11328  pedestal2 = pedestal;
11329  pedestalw2 = pedestalw;
11330  pedestalwaver4 += pedestalw * pedestalw;
11331  }
11332  if (capid == 3 && c3 == 0) {
11333  c3++;
11334  c4++;
11335  pedestalaver4 += pedestal;
11336  pedestal3 = pedestal;
11337  pedestalw3 = pedestalw;
11338  pedestalwaver4 += pedestalw * pedestalw;
11339  }
11340 
11341  if (max_signal < ampldefault) {
11342  max_signal = ampldefault;
11343  ts_with_max_signal = ii;
11344  }
11345  amplitude += ampldefault; //
11346  absamplitude += abs(ampldefault); //
11348  timew += (ii + 1) * abs(ampldefault);
11349  timeww += (ii + 1) * ampldefault;
11350  if (ii == 1 && ampldefault > 0.)
11351  flagTS1 = 1;
11352  } //for 1
11354  // sub=4 HF
11355  if (sub == 4) {
11356  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HF
11357  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HF
11358  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HF
11359  } // just in case against any violations
11360 
11361  pedestalaver9 /= TSsize;
11362  pedestalaver4 /= c4;
11363  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
11364  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
11365 
11366  // ------------ to get signal in TS: -2 max +1 ------------
11367  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
11368  ampl = tool[ts_with_max_signal];
11369  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
11370  ampl += tool[ts_with_max_signal + 2];
11371  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
11372  ampl += tool[ts_with_max_signal + 1];
11373  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
11374  ampl += tool[ts_with_max_signal - 1];
11375 
11376  double ratio = 0.;
11377  // if(amplallTS != 0.) ratio = ampl/amplallTS;
11378  if (amplitude != 0.)
11379  ratio = ampl / amplitude;
11380  if (ratio < 0. || ratio > 1.02)
11381  ratio = 0.;
11382  double aveamplitude = 0.;
11383  double aveamplitudew = 0.;
11384  if (absamplitude > 0 && timew > 0)
11385  aveamplitude = timew / absamplitude; // average_TS +1
11386  if (amplitude > 0 && timeww > 0)
11387  aveamplitudew = timeww / amplitude; // average_TS +1
11388 
11389  double rmsamp = 0.;
11390  int error = 0;
11391  bool anycapid = true;
11392  int lastcapid = 0;
11393  int capid = 0;
11394  for (int ii = 0; ii < TSsize; ii++) {
11395  double aaaaaa = (ii + 1) - aveamplitudew;
11396  double aaaaaa2 = aaaaaa * aaaaaa;
11397  double ampldefault = tool[ii];
11398  rmsamp += (aaaaaa2 * ampldefault); // fC
11399  capid = (qie10df[ii]).capid();
11400  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
11401  anycapid = false;
11402  }
11403  lastcapid = capid;
11404  } //for 2
11405 
11406  if (!anycapid)
11407  error = 1;
11408  double rmsamplitude = 0.;
11409  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
11410  rmsamplitude = sqrt(rmsamp / amplitude);
11411  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
11412 
11413  // CapIdErrors end /////////////////////////////////////////////////////////
11414  // AZ 1.10.2015:
11415  if (error == 1) {
11416  if (sub == 4 && mdepth == 1)
11418  if (sub == 4 && mdepth == 2)
11420  }
11421  if (error != 1) {
11422  if (sub == 4 && mdepth == 1)
11424  if (sub == 4 && mdepth == 2)
11426  }
11427 
11428  if (sub == 4) {
11429  // bad_channels with C,A,W,P,pW,
11430  if (error == 1 || amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_ || rmsamplitude < rmsHFMin_ ||
11431  rmsamplitude > rmsHFMax_ || pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ ||
11432  pedestal2 < pedestalHFMax_ || pedestal3 < pedestalHFMax_ || pedestalw0 < pedestalwHFMax_ ||
11433  pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ || pedestalw3 < pedestalwHFMax_
11434 
11435  ) {
11436  for (int ii = 0; ii < TSsize; ii++) {
11437  double ampldefault = tool[ii];
11438  h_shape_bad_channels_HF->Fill(float(ii), ampldefault);
11439  h_shape0_bad_channels_HF->Fill(float(ii), 1.);
11440  }
11441  }
11442  // good_channels with C,A,W,P,pW,
11443  else {
11444  for (int ii = 0; ii < TSsize; ii++) {
11445  double ampldefault = tool[ii];
11446  h_shape_good_channels_HF->Fill(float(ii), ampldefault);
11447  h_shape0_good_channels_HF->Fill(float(ii), 1.);
11448  }
11449  }
11450  } // sub HFQIE10
11452  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
11453  // for Error B-type
11454  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
11455  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; // Pedestals
11456  // HFQIE10
11457  if (sub == 4) {
11458  // // // // // // // // // HFQIE10 PedestalCorrelations :
11460  double mypedestal = pedestal0;
11461  double mypedestalw = pedestalw0;
11462  h2_pedvsampl_HF->Fill(mypedestal, amplitude);
11463  h2_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11464  h_pedvsampl_HF->Fill(mypedestal, amplitude);
11465  h_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11466  h_pedvsampl0_HF->Fill(mypedestal, 1.);
11467  h_pedwvsampl0_HF->Fill(mypedestalw, 1.);
11468  } //
11469  // // // // // // // // // HFQIE10 Pedestals:
11470  if (studyPedestalsHist_) {
11471  h_pedestal0_HF->Fill(pedestal0, 1.);
11472  h_pedestal1_HF->Fill(pedestal1, 1.);
11473  h_pedestal2_HF->Fill(pedestal2, 1.);
11474  h_pedestal3_HF->Fill(pedestal3, 1.);
11475  h_pedestalaver4_HF->Fill(pedestalaver4, 1.);
11476  h_pedestalaver9_HF->Fill(pedestalaver9, 1.);
11477  h_pedestalw0_HF->Fill(pedestalw0, 1.);
11478  h_pedestalw1_HF->Fill(pedestalw1, 1.);
11479  h_pedestalw2_HF->Fill(pedestalw2, 1.);
11480  h_pedestalw3_HF->Fill(pedestalw3, 1.);
11481  h_pedestalwaver4_HF->Fill(pedestalwaver4, 1.);
11482  h_pedestalwaver9_HF->Fill(pedestalwaver9, 1.);
11483  // for averaged values:
11484  if (mdepth == 1) {
11485  h_mapDepth1Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11486  h_mapDepth1Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11487  h_mapDepth1Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11488  h_mapDepth1Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11489  h_mapDepth1Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11490  h_mapDepth1Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11491  h_mapDepth1Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11492  h_mapDepth1Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11493  }
11494  if (mdepth == 2) {
11495  h_mapDepth2Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11496  h_mapDepth2Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11497  h_mapDepth2Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11498  h_mapDepth2Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11499  h_mapDepth2Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11500  h_mapDepth2Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11501  h_mapDepth2Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11502  h_mapDepth2Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11503  }
11504 
11505  if (pedestalw0 < pedestalwHFMax_ || pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ ||
11506  pedestalw3 < pedestalwHFMax_) {
11507  if (mdepth == 1)
11508  h_mapDepth1pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11509  if (mdepth == 2)
11510  h_mapDepth2pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11511  if (mdepth == 3)
11512  h_mapDepth3pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11513  if (mdepth == 4)
11514  h_mapDepth4pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11515  }
11516 
11517  if (pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ || pedestal2 < pedestalHFMax_ ||
11518  pedestal3 < pedestalHFMax_) {
11519  if (mdepth == 1)
11520  h_mapDepth1pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11521  if (mdepth == 2)
11522  h_mapDepth2pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11523  if (mdepth == 3)
11524  h_mapDepth3pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11525  if (mdepth == 4)
11526  h_mapDepth4pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11527  }
11528 
11529  for (int ii = 0; ii < TSsize; ii++) {
11530  h_pedestal00_HF->Fill(pedestal00->getValue(ii), 1.);
11531  h_gain_HF->Fill(gain->getValue(ii), 1.);
11532  }
11533  h_respcorr_HF->Fill(respcorr->getValue(), 1.);
11534  h_timecorr_HF->Fill(timecorr->getValue(), 1.);
11535  h_lutcorr_HF->Fill(lutcorr->getValue(), 1.);
11536 
11537  } //
11538 
11539  // // // // // // // // // HFQIE10 ADCAmpl:
11540  if (studyADCAmplHist_) {
11541  h_ADCAmpl_HF->Fill(amplitude, 1.);
11542  h_ADCAmplrest1_HF->Fill(amplitude, 1.);
11543  h_ADCAmplrest6_HF->Fill(amplitude, 1.);
11544 
11545  h_ADCAmplZoom1_HF->Fill(amplitude, 1.);
11546  if (amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_) {
11548  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11549  if (mdepth == 1)
11550  h_mapDepth1ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11551  if (mdepth == 2)
11552  h_mapDepth2ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11553  if (mdepth == 3)
11554  h_mapDepth3ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11555  if (mdepth == 4)
11556  h_mapDepth4ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11557  } // if
11558  // if(amplitude >1500.) averSIGNALoccupancy_HF += 1.;
11559  if (amplitude < 20.) {
11560  if (mdepth == 1)
11561  h_mapDepth1ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11562  if (mdepth == 2)
11563  h_mapDepth2ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11564  if (mdepth == 3)
11565  h_mapDepth3ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11566  if (mdepth == 4)
11567  h_mapDepth4ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11568  } // if
11569 
11570  // for averaged values:
11571  if (mdepth == 1)
11572  h_mapDepth1ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11573  if (mdepth == 2)
11574  h_mapDepth2ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11575  if (mdepth == 3)
11576  h_mapDepth3ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11577  if (mdepth == 4)
11578  h_mapDepth4ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11579  if (mdepth == 1)
11580  h_mapDepth1ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11581  if (mdepth == 2)
11582  h_mapDepth2ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11583  if (mdepth == 3)
11584  h_mapDepth3ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11585  if (mdepth == 4)
11586  h_mapDepth4ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11587 
11588  h_bcnvsamplitude_HF->Fill(float(bcn), amplitude);
11589  h_bcnvsamplitude0_HF->Fill(float(bcn), 1.);
11591  h_orbitNumvsamplitude0_HF->Fill(float(orbitNum), 1.);
11593  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
11594  } //if(studyADCAmplHist_
11595  // // // // // // // // // HFQIE10 TSmean:
11596  if (studyTSmeanShapeHist_) {
11597  h_TSmeanA_HF->Fill(aveamplitude1, 1.);
11598  // h2_TSnVsAyear2023_HF->Fill(25.*aveamplitude1, amplitude);
11599  h2_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
11600  h1_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
11601  h1_TSnVsAyear20230_HF->Fill(amplitude, 1.);
11602  if (aveamplitude1 < TSmeanHFMin_ || aveamplitude1 > TSmeanHFMax_) {
11604  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11605  if (mdepth == 1)
11606  h_mapDepth1TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11607  if (mdepth == 2)
11608  h_mapDepth2TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11609  if (mdepth == 3)
11610  h_mapDepth3TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11611  if (mdepth == 4)
11612  h_mapDepth4TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11613  } // if
11614  // for averaged values:
11615  if (mdepth == 1)
11616  h_mapDepth1TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11617  if (mdepth == 2)
11618  h_mapDepth2TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11619  if (mdepth == 3)
11620  h_mapDepth3TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11621  if (mdepth == 4)
11622  h_mapDepth4TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11623 
11625  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
11626  } //if(studyTSmeanShapeHist_
11628  // // // // // // // // // HFQIE10 TSmax:
11629  if (studyTSmaxShapeHist_) {
11630  h_TSmaxA_HF->Fill(float(ts_with_max_signal), 1.);
11631  if (ts_with_max_signal < TSpeakHFMin_ || ts_with_max_signal > TSpeakHFMax_) {
11633  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11634  if (mdepth == 1)
11635  h_mapDepth1TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11636  if (mdepth == 2)
11637  h_mapDepth2TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11638  if (mdepth == 3)
11639  h_mapDepth3TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11640  if (mdepth == 4)
11641  h_mapDepth4TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11642  } // if
11643  // for averaged values:
11644  if (mdepth == 1)
11645  h_mapDepth1TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11646  if (mdepth == 2)
11647  h_mapDepth2TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11648  if (mdepth == 3)
11649  h_mapDepth3TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11650  if (mdepth == 4)
11651  h_mapDepth4TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11652 
11654  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
11655  } //if(studyTSmaxShapeHist_
11657  // // // // // // // // // HFQIE10 RMS:
11658  if (studyRMSshapeHist_) {
11659  h_Amplitude_HF->Fill(rmsamplitude, 1.);
11660  if (rmsamplitude < rmsHFMin_ || rmsamplitude > rmsHFMax_) {
11662  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11663  if (mdepth == 1)
11664  h_mapDepth1Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11665  if (mdepth == 2)
11666  h_mapDepth2Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11667  if (mdepth == 3)
11668  h_mapDepth3Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11669  if (mdepth == 4)
11670  h_mapDepth4Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11671  } // if
11672  // for averaged values:
11673 
11674  if (mdepth == 1)
11675  h_mapDepth1Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11676  if (mdepth == 2)
11677  h_mapDepth2Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11678  if (mdepth == 3)
11679  h_mapDepth3Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11680  if (mdepth == 4)
11681  h_mapDepth4Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11683  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
11684  } //if(studyRMSshapeHist_)
11686  // // // // // // // // // HFQIE10 Ratio:
11687  if (studyRatioShapeHist_) {
11688  h_Ampl_HF->Fill(ratio, 1.);
11689  if (ratio < ratioHFMin_ || ratio > ratioHFMax_) {
11691  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11692  if (mdepth == 1)
11693  h_mapDepth1Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11694  if (mdepth == 2)
11695  h_mapDepth2Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11696  if (mdepth == 3)
11697  h_mapDepth3Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11698  if (mdepth == 4)
11699  h_mapDepth4Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11700  } //if(ratio
11701  // for averaged values:
11702  if (mdepth == 1)
11703  h_mapDepth1Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11704  if (mdepth == 2)
11705  h_mapDepth2Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11706  if (mdepth == 3)
11707  h_mapDepth3Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11708  if (mdepth == 4)
11709  h_mapDepth4Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11710 
11712  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
11713  } //if(studyRatioShapeHist_)
11714 
11716  // // // // // // // // // HFQIE10 DiffAmplitude:
11717  if (studyDiffAmplHist_) {
11718  if (mdepth == 1)
11719  h_mapDepth1AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11720  if (mdepth == 2)
11721  h_mapDepth2AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11722  if (mdepth == 3)
11723  h_mapDepth3AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11724  if (mdepth == 4)
11725  h_mapDepth4AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11726  } // if(studyDiffAmplHist_)
11727 
11729  if (mdepth == 1)
11730  h_mapDepth1_HF->Fill(double(ieta), double(iphi), 1.);
11731  if (mdepth == 2)
11732  h_mapDepth2_HF->Fill(double(ieta), double(iphi), 1.);
11733  if (mdepth == 3)
11734  h_mapDepth3_HF->Fill(double(ieta), double(iphi), 1.);
11735  if (mdepth == 4)
11736  h_mapDepth4_HF->Fill(double(ieta), double(iphi), 1.);
11737 
11738  if (flagTS1 == 1) {
11739  if (mdepth == 1)
11740  h_mapDepth1TS1_HF->Fill(double(ieta), double(iphi), 1.);
11741  if (mdepth == 2)
11742  h_mapDepth2TS1_HF->Fill(double(ieta), double(iphi), 1.);
11743  if (mdepth == 3)
11744  h_mapDepth3TS1_HF->Fill(double(ieta), double(iphi), 1.);
11745  if (mdepth == 4)
11746  h_mapDepth4TS1_HF->Fill(double(ieta), double(iphi), 1.);
11747  } // for TS = 1
11748 
11749  } //if ( sub == 4 )
11750 
11751  //
11752 }
11753 
11756  CaloSamples toolOriginal; // TS
11757  double tool[100];
11758  HcalDetId cell(digiItr->id());
11759  int mdepth = cell.depth();
11760  int iphi = cell.iphi() - 1; // 0-71
11761  int ieta = cell.ieta();
11762  if (ieta > 0)
11763  ieta -= 1; //-41 +41
11764  int sub = cell.subdet(); // (HODigiCollection: 3-HO)
11765  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
11766  const HcalGain* gain = conditions->getGain(cell);
11767  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
11768  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
11769  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
11770  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
11771  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
11772  HcalCoderDb coder(*channelCoder, *shape);
11773  if (useADCfC_)
11774  coder.adc2fC(*digiItr, toolOriginal);
11775  double pedestalaver9 = 0.;
11776  double pedestalaver4 = 0.;
11777  double pedestal0 = 0.;
11778  double pedestal1 = 0.;
11779  double pedestal2 = 0.;
11780  double pedestal3 = 0.;
11781  double pedestalwaver9 = 0.;
11782  double pedestalwaver4 = 0.;
11783  double pedestalw0 = 0.;
11784  double pedestalw1 = 0.;
11785  double pedestalw2 = 0.;
11786  double pedestalw3 = 0.;
11787  double amplitude = 0.;
11788  double absamplitude = 0.;
11789  double ampl = 0.;
11790  double timew = 0.;
11791  double timeww = 0.;
11792  double max_signal = -100.;
11793  int ts_with_max_signal = -100;
11794  int c0 = 0;
11795  int c1 = 0;
11796  int c2 = 0;
11797  int c3 = 0;
11798  int c4 = 0;
11799  double errorBtype = 0.;
11800  int TSsize = 10; //HO
11801  if ((*digiItr).size() != TSsize)
11802  errorBtype = 1.;
11803  TSsize = digiItr->size();
11804  int flagTS012 = 0;
11805  for (int ii = 0; ii < TSsize; ii++) {
11806  double ampldefault = 0.;
11807  double ampldefault0 = 0.;
11808  double ampldefault1 = 0.;
11809  double ampldefault2 = 0.;
11810  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive
11811  if (useADCfC_)
11812  ampldefault1 = toolOriginal[ii]; //adcfC
11813  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts
11814  if (useADCmassive_) {
11815  ampldefault = ampldefault0;
11816  }
11817  if (useADCfC_) {
11818  ampldefault = ampldefault1;
11819  }
11820  if (useADCcounts_) {
11821  ampldefault = ampldefault2;
11822  }
11823  int capid = ((*digiItr)[ii]).capid();
11824  double pedestal = pedestal00->getValue(capid);
11825  double pedestalw = pedw->getSigma(capid, capid);
11827  ampldefault -= pedestal; // pedestal subtraction
11828  tool[ii] = ampldefault;
11829  pedestalaver9 += pedestal;
11830  pedestalwaver9 += pedestalw * pedestalw;
11831  if (capid == 0 && c0 == 0) {
11832  c0++;
11833  c4++;
11834  pedestalaver4 += pedestal;
11835  pedestal0 = pedestal;
11836  pedestalw0 = pedestalw;
11837  pedestalwaver4 += pedestalw * pedestalw;
11838  }
11839  if (capid == 1 && c1 == 0) {
11840  c1++;
11841  c4++;
11842  pedestalaver4 += pedestal;
11843  pedestal1 = pedestal;
11844  pedestalw1 = pedestalw;
11845  pedestalwaver4 += pedestalw * pedestalw;
11846  }
11847  if (capid == 2 && c2 == 0) {
11848  c2++;
11849  c4++;
11850  pedestalaver4 += pedestal;
11851  pedestal2 = pedestal;
11852  pedestalw2 = pedestalw;
11853  pedestalwaver4 += pedestalw * pedestalw;
11854  }
11855  if (capid == 3 && c3 == 0) {
11856  c3++;
11857  c4++;
11858  pedestalaver4 += pedestal;
11859  pedestal3 = pedestal;
11860  pedestalw3 = pedestalw;
11861  pedestalwaver4 += pedestalw * pedestalw;
11862  }
11863 
11864  if (max_signal < ampldefault) {
11865  max_signal = ampldefault;
11866  ts_with_max_signal = ii;
11867  }
11868  amplitude += ampldefault;
11869  absamplitude += abs(ampldefault);
11871  if (flagcpuoptimization_ == 0) {
11872  }
11873  timew += (ii + 1) * abs(ampldefault);
11874  timeww += (ii + 1) * ampldefault;
11875  if (ii < 3 && ampldefault > 0.)
11876  flagTS012 = 1;
11877  } //for 1
11878  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HO
11879 
11880  pedestalaver9 /= TSsize;
11881  pedestalaver4 /= c4;
11882  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
11883  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
11884  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
11885  ampl = tool[ts_with_max_signal];
11886  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
11887  ampl += tool[ts_with_max_signal + 2];
11888  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
11889  ampl += tool[ts_with_max_signal + 1];
11890  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
11891  ampl += tool[ts_with_max_signal - 1];
11892  double ratio = 0.;
11893  if (amplitude != 0.)
11894  ratio = ampl / amplitude;
11895  if (ratio < 0. || ratio > 1.04)
11896  ratio = 0.;
11897  double aveamplitude = 0.;
11898  double aveamplitudew = 0.;
11899  if (absamplitude > 0 && timew > 0)
11900  aveamplitude = timew / absamplitude; // average_TS +1
11901  if (amplitude > 0 && timeww > 0)
11902  aveamplitudew = timeww / amplitude; // average_TS +1
11903  double rmsamp = 0.;
11904  int error = 0;
11905  bool anycapid = true;
11906  bool anyer = false;
11907  bool anydv = true;
11908  int lastcapid = 0;
11909  int capid = 0;
11910  for (int ii = 0; ii < TSsize; ii++) {
11911  double aaaaaa = (ii + 1) - aveamplitudew;
11912  double aaaaaa2 = aaaaaa * aaaaaa;
11913  double ampldefault = tool[ii];
11914  rmsamp += (aaaaaa2 * ampldefault); // fC
11915  capid = ((*digiItr)[ii]).capid();
11916  bool er = (*digiItr)[ii].er(); // error
11917  bool dv = (*digiItr)[ii].dv(); // valid data
11918  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
11919  anycapid = false;
11920  }
11921  lastcapid = capid;
11922  if (er) {
11923  anyer = true;
11924  }
11925  if (!dv) {
11926  anydv = false;
11927  }
11928  } //for 2
11929 
11930  if (!anycapid || anyer || !anydv)
11931  error = 1;
11932  double rmsamplitude = 0.;
11933  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
11934  rmsamplitude = sqrt(rmsamp / amplitude);
11935  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
11936  if (error == 1) {
11937  if (sub == 3 && mdepth == 4)
11939  }
11940  if (error != 1) {
11941  if (sub == 3 && mdepth == 4)
11943  }
11944 
11945  if (sub == 3) {
11946  if (error == 1 || amplitude < ADCAmplHOMin_ || amplitude > ADCAmplHOMax_ || rmsamplitude < rmsHOMin_ ||
11947  rmsamplitude > rmsHOMax_ || pedestal0 < pedestalHOMax_ || pedestal1 < pedestalHOMax_ ||
11948  pedestal2 < pedestalHOMax_ || pedestal3 < pedestalHOMax_ || pedestalw0 < pedestalwHOMax_ ||
11949  pedestalw1 < pedestalwHOMax_ || pedestalw2 < pedestalwHOMax_ || pedestalw3 < pedestalwHOMax_
11950 
11951  ) {
11952  for (int ii = 0; ii < TSsize; ii++) {
11953  double ampldefault = tool[ii];
11954  h_shape_bad_channels_HO->Fill(float(ii), ampldefault);
11955  h_shape0_bad_channels_HO->Fill(float(ii), 1.);
11956  }
11957  } else {
11958  for (int ii = 0; ii < TSsize; ii++) {
11959  double ampldefault = tool[ii];
11960  h_shape_good_channels_HO->Fill(float(ii), ampldefault);
11961  h_shape0_good_channels_HO->Fill(float(ii), 1.);
11962  }
11963  }
11964  } // sub HO
11966  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
11967  // for Error B-type
11968  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
11969  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
11970  // HO
11971  if (sub == 3) {
11973  double mypedestal = pedestal0;
11974  double mypedestalw = pedestalw0;
11975  h2_pedvsampl_HO->Fill(mypedestal, amplitude);
11976  h2_pedwvsampl_HO->Fill(mypedestalw, amplitude);
11977  h_pedvsampl_HO->Fill(mypedestal, amplitude);
11978  h_pedwvsampl_HO->Fill(mypedestalw, amplitude);
11979  h_pedvsampl0_HO->Fill(mypedestal, 1.);
11980  h_pedwvsampl0_HO->Fill(mypedestalw, 1.);
11981  } //
11982  // // // // // // // // // HO Pedestals:
11983  if (studyPedestalsHist_) {
11984  h_pedestal0_HO->Fill(pedestal0, 1.);
11985  h_pedestal1_HO->Fill(pedestal1, 1.);
11986  h_pedestal2_HO->Fill(pedestal2, 1.);
11987  h_pedestal3_HO->Fill(pedestal3, 1.);
11988  h_pedestalaver4_HO->Fill(pedestalaver4, 1.);
11989  h_pedestalaver9_HO->Fill(pedestalaver9, 1.);
11990  h_pedestalw0_HO->Fill(pedestalw0, 1.);
11991  h_pedestalw1_HO->Fill(pedestalw1, 1.);
11992  h_pedestalw2_HO->Fill(pedestalw2, 1.);
11993  h_pedestalw3_HO->Fill(pedestalw3, 1.);
11994  h_pedestalwaver4_HO->Fill(pedestalwaver4, 1.);
11995  h_pedestalwaver9_HO->Fill(pedestalwaver9, 1.);
11996  // for averaged values:
11997  if (mdepth == 4) {
11998  h_mapDepth4Ped0_HO->Fill(double(ieta), double(iphi), pedestal0);
11999  h_mapDepth4Ped1_HO->Fill(double(ieta), double(iphi), pedestal1);
12000  h_mapDepth4Ped2_HO->Fill(double(ieta), double(iphi), pedestal2);
12001  h_mapDepth4Ped3_HO->Fill(double(ieta), double(iphi), pedestal3);
12002  h_mapDepth4Pedw0_HO->Fill(double(ieta), double(iphi), pedestalw0);
12003  h_mapDepth4Pedw1_HO->Fill(double(ieta), double(iphi), pedestalw1);
12004  h_mapDepth4Pedw2_HO->Fill(double(ieta), double(iphi), pedestalw2);
12005  h_mapDepth4Pedw3_HO->Fill(double(ieta), double(iphi), pedestalw3);
12006  }
12007  if (pedestalw0 < pedestalwHOMax_ || pedestalw1 < pedestalwHOMax_ || pedestalw2 < pedestalwHOMax_ ||
12008  pedestalw3 < pedestalwHOMax_) {
12009  if (mdepth == 4)
12010  h_mapDepth4pedestalw_HO->Fill(double(ieta), double(iphi), 1.);
12011  }
12012  if (pedestal0 < pedestalHOMax_ || pedestal1 < pedestalHOMax_ || pedestal2 < pedestalHOMax_ ||
12013  pedestal3 < pedestalHOMax_) {
12014  if (mdepth == 4)
12015  h_mapDepth4pedestal_HO->Fill(double(ieta), double(iphi), 1.);
12016  }
12017  for (int ii = 0; ii < TSsize; ii++) {
12018  h_pedestal00_HO->Fill(pedestal00->getValue(ii), 1.);
12019  h_gain_HO->Fill(gain->getValue(ii), 1.);
12020  }
12021  h_respcorr_HO->Fill(respcorr->getValue(), 1.);
12022  h_timecorr_HO->Fill(timecorr->getValue(), 1.);
12023  h_lutcorr_HO->Fill(lutcorr->getValue(), 1.);
12024  } //
12025  // // // // // // // // // HO ADCAmpl:
12026  if (studyADCAmplHist_) {
12027  h_ADCAmpl_HO->Fill(amplitude, 1.);
12028  h_ADCAmplrest1_HO->Fill(amplitude, 1.);
12029  h_ADCAmplrest6_HO->Fill(amplitude, 1.);
12030 
12031  h_ADCAmplZoom1_HO->Fill(amplitude, 1.);
12032  h_ADCAmpl_HO_copy->Fill(amplitude, 1.);
12033  if (amplitude < ADCAmplHOMin_ || amplitude > ADCAmplHOMax_) {
12035  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12036  if (mdepth == 4)
12037  h_mapDepth4ADCAmpl225_HO->Fill(double(ieta), double(iphi), 1.);
12038  } // if
12039  // if(amplitude >2000.) averSIGNALoccupancy_HO += 1.;
12040 
12041  if (amplitude < 100.) {
12042  if (mdepth == 4)
12043  h_mapDepth4ADCAmpl225Copy_HO->Fill(double(ieta), double(iphi), 1.);
12044  } // if
12045  // for averaged values:
12046  if (mdepth == 4)
12047  h_mapDepth4ADCAmpl_HO->Fill(double(ieta), double(iphi), amplitude);
12048  if (mdepth == 4)
12049  h_mapDepth4ADCAmpl12_HO->Fill(double(ieta), double(iphi), ampl);
12050 
12051  h_bcnvsamplitude_HO->Fill(float(bcn), amplitude);
12052  h_bcnvsamplitude0_HO->Fill(float(bcn), 1.);
12053 
12055  h_orbitNumvsamplitude0_HO->Fill(float(orbitNum), 1.);
12057  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
12058  } //if(studyADCAmplHist_
12059  if (studyTSmeanShapeHist_) {
12060  h_TSmeanA_HO->Fill(aveamplitude1, 1.);
12061  // h2_TSnVsAyear2023_HO->Fill(25.*aveamplitude1, amplitude);
12062  h2_TSnVsAyear2023_HO->Fill(amplitude, 25. * aveamplitude1);
12063  h1_TSnVsAyear2023_HO->Fill(amplitude, 25. * aveamplitude1);
12064  h1_TSnVsAyear20230_HO->Fill(amplitude, 1.);
12065  if (aveamplitude1 < TSmeanHOMin_ || aveamplitude1 > TSmeanHOMax_) {
12067  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12068  if (mdepth == 4)
12069  h_mapDepth4TSmeanA225_HO->Fill(double(ieta), double(iphi), 1.);
12070  } // if
12071  if (mdepth == 4)
12072  h_mapDepth4TSmeanA_HO->Fill(double(ieta), double(iphi), aveamplitude1);
12074  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
12075  } //if(studyTSmeanShapeHist_
12076  if (studyTSmaxShapeHist_) {
12077  h_TSmaxA_HO->Fill(float(ts_with_max_signal), 1.);
12078  if (ts_with_max_signal < TSpeakHOMin_ || ts_with_max_signal > TSpeakHOMax_) {
12080  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12081  if (mdepth == 4)
12082  h_mapDepth4TSmaxA225_HO->Fill(double(ieta), double(iphi), 1.);
12083  } // if
12084  // for averaged values:
12085  if (mdepth == 4)
12086  h_mapDepth4TSmaxA_HO->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
12088  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
12089  } //if(studyTSmaxShapeHist_
12090  if (studyRMSshapeHist_) {
12091  h_Amplitude_HO->Fill(rmsamplitude, 1.);
12092  if (rmsamplitude < rmsHOMin_ || rmsamplitude > rmsHOMax_) {
12094  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12095  if (mdepth == 4)
12096  h_mapDepth4Amplitude225_HO->Fill(double(ieta), double(iphi), 1.);
12097  } // if
12098  if (mdepth == 4)
12099  h_mapDepth4Amplitude_HO->Fill(double(ieta), double(iphi), rmsamplitude);
12101  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
12102  } //if(studyRMSshapeHist_)
12103  if (studyRatioShapeHist_) {
12104  h_Ampl_HO->Fill(ratio, 1.);
12105  if (ratio < ratioHOMin_ || ratio > ratioHOMax_) {
12107  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12108  if (mdepth == 4)
12109  h_mapDepth4Ampl047_HO->Fill(double(ieta), double(iphi), 1.);
12110  } //if(ratio
12111  if (mdepth == 4)
12112  h_mapDepth4Ampl_HO->Fill(double(ieta), double(iphi), ratio);
12114  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
12115  } //if(studyRatioShapeHist_)
12116  if (studyDiffAmplHist_) {
12117  if (mdepth == 4)
12118  h_mapDepth4AmplE34_HO->Fill(double(ieta), double(iphi), amplitude);
12119  } // if(studyDiffAmplHist_)
12120  if (mdepth == 4) {
12121  h_mapDepth4_HO->Fill(double(ieta), double(iphi), 1.);
12122  if (flagTS012 == 1)
12123  h_mapDepth4TS012_HO->Fill(double(ieta), double(iphi), 1.);
12124  }
12125  } //if ( sub == 3 )
12126 }
12127 int CMTRawAnalyzer::getRBX(int& kdet, int& keta, int& kphi) {
12128  int cal_RBX = 0;
12129  if (kdet == 1 || kdet == 2) {
12130  if (kphi == 71)
12131  cal_RBX = 0;
12132  else
12133  cal_RBX = (kphi + 1) / 4;
12134  cal_RBX = cal_RBX + 18 * (keta + 1) / 2;
12135  }
12136  if (kdet == 4) {
12137  cal_RBX = (int)(kphi / 18) + 1;
12138  }
12139  if (kdet == 3) {
12140  if (keta == -2) {
12141  if (kphi == 71)
12142  cal_RBX = 0;
12143  else
12144  cal_RBX = kphi / 12 + 1;
12145  }
12146  if (keta == -1) {
12147  if (kphi == 71)
12148  cal_RBX = 6;
12149  else
12150  cal_RBX = kphi / 12 + 1 + 6;
12151  }
12152  if (keta == 0) {
12153  if (kphi == 71)
12154  cal_RBX = 12;
12155  else
12156  cal_RBX = kphi / 6 + 1 + 12;
12157  }
12158  if (keta == 1) {
12159  if (kphi == 71)
12160  cal_RBX = 24;
12161  else
12162  cal_RBX = kphi / 12 + 1 + 24;
12163  }
12164  if (keta == 2) {
12165  if (kphi == 71)
12166  cal_RBX = 30;
12167  else
12168  cal_RBX = kphi / 12 + 1 + 30;
12169  }
12170  }
12171  return cal_RBX;
12172 }
12173 void CMTRawAnalyzer::beginRun(const edm::Run& r, const edm::EventSetup& iSetup) {}
12174 void CMTRawAnalyzer::endRun(const edm::Run& r, const edm::EventSetup& iSetup) {
12176  } // if flag...
12178  lscounterM1 = lscounter - 1;
12179  } else {
12180  lscounterM1 = ls0;
12181  }
12182  if (ls0 != -1)
12183  h_nevents_per_eachRealLS->Fill(float(lscounterM1), float(nevcounter)); //
12184  h_nevents_per_LS->Fill(float(nevcounter));
12185  h_nevents_per_LSzoom->Fill(float(nevcounter));
12187  if (nevcounter0 != 0) {
12188  for (int k0 = 0; k0 < nsub; k0++) {
12189  for (int k1 = 0; k1 < ndepth; k1++) {
12190  for (int k2 = 0; k2 < neta; k2++) {
12191  for (int k3 = 0; k3 < nphi; k3++) {
12192  int ieta = k2 - 41;
12193  if (sumEstimator0[k0][k1][k2][k3] != 0.) {
12194  double bbbc = 0.;
12195  if (flagestimatornormalization_ == 0)
12196  bbbc = sumEstimator0[k0][k1][k2][k3] / nevcounter0;
12197  if (flagestimatornormalization_ == 1)
12198  bbbc = sumEstimator0[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12199  double bbb1 = 1.;
12200  if (flagestimatornormalization_ == 2) {
12201  bbbc = sumEstimator0[k0][k1][k2][k3];
12202  bbb1 = sum0Estimator[k0][k1][k2][k3];
12203  }
12204  if (k0 == 0) {
12205  if (k1 + 1 == 1) {
12206  h_sumPedestalLS1->Fill(bbbc / bbb1);
12207  h_2DsumPedestalLS1->Fill(double(ieta), double(k3), bbbc);
12208  h_2D0sumPedestalLS1->Fill(double(ieta), double(k3), bbb1);
12209  h_sumPedestalperLS1->Fill(float(lscounterM1), bbbc);
12210  h_sum0PedestalperLS1->Fill(float(lscounterM1), bbb1);
12211  }
12212  if (k1 + 1 == 2) {
12213  h_sumPedestalLS2->Fill(bbbc / bbb1);
12214  h_2DsumPedestalLS2->Fill(double(ieta), double(k3), bbbc);
12215  h_2D0sumPedestalLS2->Fill(double(ieta), double(k3), bbb1);
12216  h_sumPedestalperLS2->Fill(float(lscounterM1), bbbc);
12217  h_sum0PedestalperLS2->Fill(float(lscounterM1), bbb1);
12218  }
12219  }
12220  // HE:
12221  if (k0 == 1) {
12222  // HEdepth1
12223  if (k1 + 1 == 1) {
12224  h_sumPedestalLS3->Fill(bbbc / bbb1);
12225  h_2DsumPedestalLS3->Fill(double(ieta), double(k3), bbbc);
12226  h_2D0sumPedestalLS3->Fill(double(ieta), double(k3), bbb1);
12227  h_sumPedestalperLS3->Fill(float(lscounterM1), bbbc);
12228  h_sum0PedestalperLS3->Fill(float(lscounterM1), bbb1);
12229  }
12230  if (k1 + 1 == 2) {
12231  h_sumPedestalLS4->Fill(bbbc / bbb1);
12232  h_2DsumPedestalLS4->Fill(double(ieta), double(k3), bbbc);
12233  h_2D0sumPedestalLS4->Fill(double(ieta), double(k3), bbb1);
12234  h_sumPedestalperLS4->Fill(float(lscounterM1), bbbc);
12235  h_sum0PedestalperLS4->Fill(float(lscounterM1), bbb1);
12236  }
12237  if (k1 + 1 == 3) {
12238  h_sumPedestalLS5->Fill(bbbc / bbb1);
12239  h_2DsumPedestalLS5->Fill(double(ieta), double(k3), bbbc);
12240  h_2D0sumPedestalLS5->Fill(double(ieta), double(k3), bbb1);
12241  h_sumPedestalperLS5->Fill(float(lscounterM1), bbbc);
12242  h_sum0PedestalperLS5->Fill(float(lscounterM1), bbb1);
12243  }
12244  }
12245  // HF:
12246  if (k0 == 3) {
12247  // HFdepth1
12248  if (k1 + 1 == 1) {
12249  h_sumPedestalLS6->Fill(bbbc / bbb1);
12250  h_2DsumPedestalLS6->Fill(double(ieta), double(k3), bbbc);
12251  h_2D0sumPedestalLS6->Fill(double(ieta), double(k3), bbb1);
12252  h_sumPedestalperLS6->Fill(float(lscounterM1), bbbc);
12253  h_sum0PedestalperLS6->Fill(float(lscounterM1), bbb1);
12254  }
12255  if (k1 + 1 == 2) {
12256  h_sumPedestalLS7->Fill(bbbc / bbb1);
12257  h_2DsumPedestalLS7->Fill(double(ieta), double(k3), bbbc);
12258  h_2D0sumPedestalLS7->Fill(double(ieta), double(k3), bbb1);
12259  h_sumPedestalperLS7->Fill(float(lscounterM1), bbbc);
12260  h_sum0PedestalperLS7->Fill(float(lscounterM1), bbb1);
12261  }
12262  }
12263  // HO:
12264  if (k0 == 2) {
12265  // HOdepth1
12266  if (k1 + 1 == 4) {
12267  h_sumPedestalLS8->Fill(bbbc / bbb1);
12268  h_2DsumPedestalLS8->Fill(double(ieta), double(k3), bbbc);
12269  h_2D0sumPedestalLS8->Fill(double(ieta), double(k3), bbb1);
12270  h_sumPedestalperLS8->Fill(float(lscounterM1), bbbc);
12271  h_sum0PedestalperLS8->Fill(float(lscounterM1), bbb1);
12272  }
12273  }
12274  } //if(sumEstimator0[k0][k1][k2][k3] != 0.
12275  if (sumEstimator1[k0][k1][k2][k3] != 0.) {
12276  double bbbc = 0.;
12277  if (flagestimatornormalization_ == 0)
12278  bbbc = sumEstimator1[k0][k1][k2][k3] / nevcounter0;
12279  if (flagestimatornormalization_ == 1)
12280  bbbc = sumEstimator1[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12281  double bbb1 = 1.;
12282  if (flagestimatornormalization_ == 2) {
12283  bbbc = sumEstimator1[k0][k1][k2][k3];
12284  bbb1 = sum0Estimator[k0][k1][k2][k3];
12285  }
12286  if (lscounterM1 >= lsmin_ && lscounterM1 < lsmax_) {
12287  int kkkk2 = (k2 - 1) / 4;
12288  if (k2 == 0)
12289  kkkk2 = 1.;
12290  else
12291  kkkk2 += 2; //kkkk2= 1-22
12292  int kkkk3 = (k3) / 4 + 1; //kkkk3= 1-18
12293  int ietaphi = 0;
12294  ietaphi = ((kkkk2)-1) * znphi + (kkkk3);
12295  double bbb3 = 0.;
12296  if (bbb1 != 0.)
12297  bbb3 = bbbc / bbb1;
12298  if (k0 == 0) {
12299  h_2DsumADCAmplEtaPhiLs0->Fill(float(lscounterM1), float(ietaphi), bbbc); //HB
12300  h_2DsumADCAmplEtaPhiLs00->Fill(float(lscounterM1), float(ietaphi), bbb1); //HB
12301  }
12302  if (k0 == 1) {
12303  h_2DsumADCAmplEtaPhiLs1->Fill(float(lscounterM1), float(ietaphi), bbbc); //HE
12304  h_2DsumADCAmplEtaPhiLs10->Fill(float(lscounterM1), float(ietaphi), bbb1); //HE
12305  }
12306  if (k0 == 2) {
12307  h_2DsumADCAmplEtaPhiLs2->Fill(float(lscounterM1), float(ietaphi), bbbc); //HO
12308  h_2DsumADCAmplEtaPhiLs20->Fill(float(lscounterM1), float(ietaphi), bbb1); //HO
12309  }
12310  if (k0 == 3) {
12311  h_2DsumADCAmplEtaPhiLs3->Fill(float(lscounterM1), float(ietaphi), bbbc); //HF
12312  h_2DsumADCAmplEtaPhiLs30->Fill(float(lscounterM1), float(ietaphi), bbb1); //HF
12313  }
12314 
12315  h_sumADCAmplEtaPhiLs->Fill(bbb3);
12316  h_sumADCAmplEtaPhiLs_bbbc->Fill(bbbc);
12317  h_sumADCAmplEtaPhiLs_bbb1->Fill(bbb1);
12319  h_sumADCAmplEtaPhiLs_orbitNum->Fill(float(orbitNum), 1.);
12321  h_sumADCAmplEtaPhiLs_ietaphi->Fill(float(ietaphi));
12322  } // lscounterM1 >= lsmin_ && lscounterM1 < lsmax_
12323  if (k0 == 0) {
12324  if (k1 + 1 == 1) {
12325  h_sumADCAmplLS1copy1->Fill(bbbc / bbb1);
12326  h_sumADCAmplLS1copy2->Fill(bbbc / bbb1);
12327  h_sumADCAmplLS1copy3->Fill(bbbc / bbb1);
12328  h_sumADCAmplLS1copy4->Fill(bbbc / bbb1);
12329  h_sumADCAmplLS1copy5->Fill(bbbc / bbb1);
12330  h_sumADCAmplLS1->Fill(bbbc / bbb1);
12331  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
12332  h_2DsumADCAmplLS1->Fill(double(ieta), double(k3), bbbc);
12333  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth1_)
12334  h_2DsumADCAmplLS1_LSselected->Fill(double(ieta), double(k3), bbbc);
12335  h_2D0sumADCAmplLS1->Fill(double(ieta), double(k3), bbb1);
12336  h_sumADCAmplperLS1->Fill(float(lscounterM1), bbbc);
12337  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
12338  h_sumCutADCAmplperLS1->Fill(float(lscounterM1), bbbc);
12339  h_sum0ADCAmplperLS1->Fill(float(lscounterM1), bbb1);
12340  }
12341  if (k1 + 1 == 2) {
12342  h_sumADCAmplLS2->Fill(bbbc / bbb1);
12343  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
12344  h_2DsumADCAmplLS2->Fill(double(ieta), double(k3), bbbc);
12345  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth2_)
12346  h_2DsumADCAmplLS2_LSselected->Fill(double(ieta), double(k3), bbbc);
12347  h_2D0sumADCAmplLS2->Fill(double(ieta), double(k3), bbb1);
12348  h_sumADCAmplperLS2->Fill(float(lscounterM1), bbbc);
12349  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
12350  h_sumCutADCAmplperLS2->Fill(float(lscounterM1), bbbc);
12351  h_sum0ADCAmplperLS2->Fill(float(lscounterM1), bbb1);
12352  }
12353  if (k1 + 1 == 3) {
12354  h_sumADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
12355  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
12356  h_sumCutADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
12357  h_sum0ADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbb1);
12358 
12359  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
12360  h_2DsumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbbc);
12361  h_2D0sumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbb1);
12362  } //if(k1+1 ==3)
12363  if (k1 + 1 == 4) {
12364  h_sumADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
12365  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
12366  h_sumCutADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
12367  h_sum0ADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbb1);
12368 
12369  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
12370  h_2DsumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbbc);
12371  h_2D0sumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbb1);
12372  } //if(k1+1 ==4)
12373  }
12374  if (k0 == 1) {
12375  if (k1 + 1 == 1) {
12376  h_sumADCAmplLS3->Fill(bbbc / bbb1);
12377  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
12378  h_2DsumADCAmplLS3->Fill(double(ieta), double(k3), bbbc);
12379  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth1_)
12380  h_2DsumADCAmplLS3_LSselected->Fill(double(ieta), double(k3), bbbc);
12381  h_2D0sumADCAmplLS3->Fill(double(ieta), double(k3), bbb1);
12382  h_sumADCAmplperLS3->Fill(float(lscounterM1), bbbc);
12383  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
12384  h_sumCutADCAmplperLS3->Fill(float(lscounterM1), bbbc);
12385  h_sum0ADCAmplperLS3->Fill(float(lscounterM1), bbb1);
12386  }
12387  if (k1 + 1 == 2) {
12388  h_sumADCAmplLS4->Fill(bbbc / bbb1);
12389  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
12390  h_2DsumADCAmplLS4->Fill(double(ieta), double(k3), bbbc);
12391  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth2_)
12392  h_2DsumADCAmplLS4_LSselected->Fill(double(ieta), double(k3), bbbc);
12393  h_2D0sumADCAmplLS4->Fill(double(ieta), double(k3), bbb1);
12394  h_sumADCAmplperLS4->Fill(float(lscounterM1), bbbc);
12395  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
12396  h_sumCutADCAmplperLS4->Fill(float(lscounterM1), bbbc);
12397  h_sum0ADCAmplperLS4->Fill(float(lscounterM1), bbb1);
12398  }
12399  if (k1 + 1 == 3) {
12400  h_sumADCAmplLS5->Fill(bbbc / bbb1);
12401  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
12402  h_2DsumADCAmplLS5->Fill(double(ieta), double(k3), bbbc);
12403  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth3_)
12404  h_2DsumADCAmplLS5_LSselected->Fill(double(ieta), double(k3), bbbc);
12405  h_2D0sumADCAmplLS5->Fill(double(ieta), double(k3), bbb1);
12406  h_sumADCAmplperLS5->Fill(float(lscounterM1), bbbc);
12407  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
12408  h_sumCutADCAmplperLS5->Fill(float(lscounterM1), bbbc);
12409  h_sum0ADCAmplperLS5->Fill(float(lscounterM1), bbb1);
12410  }
12411  if (k1 + 1 == 4) {
12412  h_sumADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
12413  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
12414  h_sumCutADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
12415  h_sum0ADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbb1);
12416  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
12417  h_2DsumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbbc);
12418  h_2D0sumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbb1);
12419  } //if(k1+1 ==4)
12420  if (k1 + 1 == 5) {
12421  h_sumADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
12422  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
12423  h_sumCutADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
12424  h_sum0ADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbb1);
12425  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
12426  h_2DsumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbbc);
12427  h_2D0sumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbb1);
12428  } //if(k1+1 ==5)
12429 
12430  if (k1 + 1 == 6) {
12431  h_sumADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
12432  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
12433  h_sumCutADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
12434  h_sum0ADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbb1);
12435  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
12436  h_2DsumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbbc);
12437  h_2D0sumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbb1);
12438  } //if(k1+1 ==6)
12439  if (k1 + 1 == 7) {
12440  h_sumADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
12441  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
12442  h_sumCutADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
12443  h_sum0ADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbb1);
12444  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
12445  h_2DsumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbbc);
12446  h_2D0sumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbb1);
12447  } //if(k1+1 ==7)
12448 
12449  } // end HE
12450 
12451  if (k0 == 3) {
12452  if (k1 + 1 == 1) {
12453  h_sumADCAmplLS6->Fill(bbbc / bbb1);
12454  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
12455  h_2DsumADCAmplLS6->Fill(double(ieta), double(k3), bbbc);
12456  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth1_)
12457  h_2DsumADCAmplLS6_LSselected->Fill(double(ieta), double(k3), bbbc);
12458  h_2D0sumADCAmplLS6->Fill(double(ieta), double(k3), bbb1);
12459  h_sumADCAmplperLS6->Fill(float(lscounterM1), bbbc);
12460  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
12461  h_sumCutADCAmplperLS6->Fill(float(lscounterM1), bbbc);
12462  h_sum0ADCAmplperLS6->Fill(float(lscounterM1), bbb1);
12463  }
12464  if (k1 + 1 == 2) {
12465  h_sumADCAmplLS7->Fill(bbbc / bbb1);
12466  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
12467  h_2DsumADCAmplLS7->Fill(double(ieta), double(k3), bbbc);
12468  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth2_)
12469  h_2DsumADCAmplLS7_LSselected->Fill(double(ieta), double(k3), bbbc);
12470  h_2D0sumADCAmplLS7->Fill(double(ieta), double(k3), bbb1);
12471  h_sumADCAmplperLS7->Fill(float(lscounterM1), bbbc);
12472  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
12473  h_sumCutADCAmplperLS7->Fill(float(lscounterM1), bbbc);
12474  h_sum0ADCAmplperLS7->Fill(float(lscounterM1), bbb1);
12475  }
12476 
12477  if (k1 + 1 == 3) {
12478  h_sumADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
12479  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
12480  h_sumCutADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
12481  h_sum0ADCAmplperLS6u->Fill(float(lscounterM1), bbb1);
12482  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
12483  h_2DsumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbbc);
12484  h_2D0sumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbb1);
12485  } //if(k1+1 ==3)
12486  if (k1 + 1 == 4) {
12487  h_sumADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
12488  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
12489  h_sumCutADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
12490  h_sum0ADCAmplperLS7u->Fill(float(lscounterM1), bbb1);
12491  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
12492  h_2DsumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbbc);
12493  h_2D0sumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbb1);
12494  } //if(k1+1 ==4)
12495  }
12496  // HO:
12497  if (k0 == 2) {
12498  // HOdepth1
12499  if (k1 + 1 == 4) {
12500  h_sumADCAmplLS8->Fill(bbbc / bbb1);
12501  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
12502  h_2DsumADCAmplLS8->Fill(double(ieta), double(k3), bbbc);
12503  if (bbbc / bbb1 > 2. * lsdep_estimator1_HOdepth4_)
12504  h_2DsumADCAmplLS8_LSselected->Fill(double(ieta), double(k3), bbbc);
12505  h_2D0sumADCAmplLS8->Fill(double(ieta), double(k3), bbb1);
12506  h_sumADCAmplperLS8->Fill(float(lscounterM1), bbbc);
12507  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
12508  h_sumCutADCAmplperLS8->Fill(float(lscounterM1), bbbc);
12509  h_sum0ADCAmplperLS8->Fill(float(lscounterM1), bbb1);
12510  }
12511  }
12512  } //if(sumEstimator1[k0][k1][k2][k3] != 0.
12513  if (sumEstimator2[k0][k1][k2][k3] != 0.) {
12514  double bbbc = 0.;
12515  if (flagestimatornormalization_ == 0)
12516  bbbc = sumEstimator2[k0][k1][k2][k3] / nevcounter0;
12517  if (flagestimatornormalization_ == 1)
12518  bbbc = sumEstimator2[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12519  double bbb1 = 1.;
12520  if (flagestimatornormalization_ == 2) {
12521  bbbc = sumEstimator2[k0][k1][k2][k3];
12522  bbb1 = sum0Estimator[k0][k1][k2][k3];
12523  }
12524 
12525  // HB:
12526  if (k0 == 0) {
12527  // HBdepth1
12528  if (k1 + 1 == 1) {
12529  h_sumTSmeanALS1->Fill(bbbc / bbb1);
12530  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
12531  h_2DsumTSmeanALS1->Fill(double(ieta), double(k3), bbbc);
12532  h_2D0sumTSmeanALS1->Fill(double(ieta), double(k3), bbb1);
12533  h_sumTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
12534  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
12535  h_sumCutTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
12536  h_sum0TSmeanAperLS1->Fill(float(lscounterM1), bbb1);
12537  if (bbbc / bbb1 > 2. * lsdep_estimator2_HBdepth1_)
12538  h_sumTSmeanAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12539  }
12540  if (k1 + 1 == 2) {
12541  h_sumTSmeanALS2->Fill(bbbc / bbb1);
12542  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
12543  h_2DsumTSmeanALS2->Fill(double(ieta), double(k3), bbbc);
12544  h_2D0sumTSmeanALS2->Fill(double(ieta), double(k3), bbb1);
12545  h_sumTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
12546  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
12547  h_sumCutTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
12548  h_sum0TSmeanAperLS2->Fill(float(lscounterM1), bbb1);
12549  }
12550  }
12551  if (k0 == 1) {
12552  if (k1 + 1 == 1) {
12553  h_sumTSmeanALS3->Fill(bbbc / bbb1);
12554  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
12555  h_2DsumTSmeanALS3->Fill(double(ieta), double(k3), bbbc);
12556  h_2D0sumTSmeanALS3->Fill(double(ieta), double(k3), bbb1);
12557  h_sumTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
12558  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
12559  h_sumCutTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
12560  h_sum0TSmeanAperLS3->Fill(float(lscounterM1), bbb1);
12561  }
12562  if (k1 + 1 == 2) {
12563  h_sumTSmeanALS4->Fill(bbbc / bbb1);
12564  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
12565  h_2DsumTSmeanALS4->Fill(double(ieta), double(k3), bbbc);
12566  h_2D0sumTSmeanALS4->Fill(double(ieta), double(k3), bbb1);
12567  h_sumTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
12568  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
12569  h_sumCutTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
12570  h_sum0TSmeanAperLS4->Fill(float(lscounterM1), bbb1);
12571  }
12572  if (k1 + 1 == 3) {
12573  h_sumTSmeanALS5->Fill(bbbc / bbb1);
12574  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
12575  h_2DsumTSmeanALS5->Fill(double(ieta), double(k3), bbbc);
12576  h_2D0sumTSmeanALS5->Fill(double(ieta), double(k3), bbb1);
12577  h_sumTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
12578  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
12579  h_sumCutTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
12580  h_sum0TSmeanAperLS5->Fill(float(lscounterM1), bbb1);
12581  }
12582  }
12583  // HF:
12584  if (k0 == 3) {
12585  // HFdepth1
12586  if (k1 + 1 == 1) {
12587  h_sumTSmeanALS6->Fill(bbbc / bbb1);
12588  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
12589  h_2DsumTSmeanALS6->Fill(double(ieta), double(k3), bbbc);
12590  h_2D0sumTSmeanALS6->Fill(double(ieta), double(k3), bbb1);
12591  h_sumTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
12592  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
12593  h_sumCutTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
12594  h_sum0TSmeanAperLS6->Fill(float(lscounterM1), bbb1);
12595  }
12596  if (k1 + 1 == 2) {
12597  h_sumTSmeanALS7->Fill(bbbc / bbb1);
12598  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
12599  h_2DsumTSmeanALS7->Fill(double(ieta), double(k3), bbbc);
12600  h_2D0sumTSmeanALS7->Fill(double(ieta), double(k3), bbb1);
12601  h_sumTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
12602  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
12603  h_sumCutTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
12604  h_sum0TSmeanAperLS7->Fill(float(lscounterM1), bbb1);
12605  }
12606  }
12607  // HO:
12608  if (k0 == 2) {
12609  // HOdepth1
12610  if (k1 + 1 == 4) {
12611  h_sumTSmeanALS8->Fill(bbbc / bbb1);
12612  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
12613  h_2DsumTSmeanALS8->Fill(double(ieta), double(k3), bbbc);
12614  h_2D0sumTSmeanALS8->Fill(double(ieta), double(k3), bbb1);
12615  h_sumTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
12616  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
12617  h_sumCutTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
12618  h_sum0TSmeanAperLS8->Fill(float(lscounterM1), bbb1);
12619  }
12620  }
12621  } //if(sumEstimator2[k0][k1][k2][k3] != 0.
12622 
12623  // ------------------------------------------------------------------------------------------------------------------------sumEstimator3 Tx
12624  if (sumEstimator3[k0][k1][k2][k3] != 0.) {
12625  // fill histoes:
12626  double bbbc = 0.;
12627  if (flagestimatornormalization_ == 0)
12628  bbbc = sumEstimator3[k0][k1][k2][k3] / nevcounter0;
12629  if (flagestimatornormalization_ == 1)
12630  bbbc = sumEstimator3[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12631  double bbb1 = 1.;
12632  if (flagestimatornormalization_ == 2) {
12633  bbbc = sumEstimator3[k0][k1][k2][k3];
12634  bbb1 = sum0Estimator[k0][k1][k2][k3];
12635  }
12636 
12637  // HB:
12638  if (k0 == 0) {
12639  // HBdepth1
12640  if (k1 + 1 == 1) {
12641  h_sumTSmaxALS1->Fill(bbbc / bbb1);
12642  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
12643  h_2DsumTSmaxALS1->Fill(double(ieta), double(k3), bbbc);
12644  h_2D0sumTSmaxALS1->Fill(double(ieta), double(k3), bbb1);
12645  h_sumTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
12646  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
12647  h_sumCutTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
12648  h_sum0TSmaxAperLS1->Fill(float(lscounterM1), bbb1);
12649  if (bbbc / bbb1 > 2. * lsdep_estimator3_HBdepth1_)
12650  h_sumTSmaxAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12651  }
12652  if (k1 + 1 == 2) {
12653  h_sumTSmaxALS2->Fill(bbbc / bbb1);
12654  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
12655  h_2DsumTSmaxALS2->Fill(double(ieta), double(k3), bbbc);
12656  h_2D0sumTSmaxALS2->Fill(double(ieta), double(k3), bbb1);
12657  h_sumTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
12658  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
12659  h_sumCutTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
12660  h_sum0TSmaxAperLS2->Fill(float(lscounterM1), bbb1);
12661  }
12662  }
12663  // HE:
12664  if (k0 == 1) {
12665  // HEdepth1
12666  if (k1 + 1 == 1) {
12667  h_sumTSmaxALS3->Fill(bbbc / bbb1);
12668  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
12669  h_2DsumTSmaxALS3->Fill(double(ieta), double(k3), bbbc);
12670  h_2D0sumTSmaxALS3->Fill(double(ieta), double(k3), bbb1);
12671  h_sumTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
12672  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
12673  h_sumCutTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
12674  h_sum0TSmaxAperLS3->Fill(float(lscounterM1), bbb1);
12675  }
12676  if (k1 + 1 == 2) {
12677  h_sumTSmaxALS4->Fill(bbbc / bbb1);
12678  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
12679  h_2DsumTSmaxALS4->Fill(double(ieta), double(k3), bbbc);
12680  h_2D0sumTSmaxALS4->Fill(double(ieta), double(k3), bbb1);
12681  h_sumTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
12682  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
12683  h_sumCutTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
12684  h_sum0TSmaxAperLS4->Fill(float(lscounterM1), bbb1);
12685  }
12686  if (k1 + 1 == 3) {
12687  h_sumTSmaxALS5->Fill(bbbc / bbb1);
12688  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
12689  h_2DsumTSmaxALS5->Fill(double(ieta), double(k3), bbbc);
12690  h_2D0sumTSmaxALS5->Fill(double(ieta), double(k3), bbb1);
12691  h_sumTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
12692  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
12693  h_sumCutTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
12694  h_sum0TSmaxAperLS5->Fill(float(lscounterM1), bbb1);
12695  }
12696  }
12697  // HF:
12698  if (k0 == 3) {
12699  // HFdepth1
12700  if (k1 + 1 == 1) {
12701  h_sumTSmaxALS6->Fill(bbbc / bbb1);
12702  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
12703  h_2DsumTSmaxALS6->Fill(double(ieta), double(k3), bbbc);
12704  h_2D0sumTSmaxALS6->Fill(double(ieta), double(k3), bbb1);
12705  h_sumTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
12706  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
12707  h_sumCutTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
12708  h_sum0TSmaxAperLS6->Fill(float(lscounterM1), bbb1);
12709  }
12710  if (k1 + 1 == 2) {
12711  h_sumTSmaxALS7->Fill(bbbc / bbb1);
12712  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
12713  h_2DsumTSmaxALS7->Fill(double(ieta), double(k3), bbbc);
12714  h_2D0sumTSmaxALS7->Fill(double(ieta), double(k3), bbb1);
12715  h_sumTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
12716  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
12717  h_sumCutTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
12718  h_sum0TSmaxAperLS7->Fill(float(lscounterM1), bbb1);
12719  }
12720  }
12721  // HO:
12722  if (k0 == 2) {
12723  // HOdepth1
12724  if (k1 + 1 == 4) {
12725  h_sumTSmaxALS8->Fill(bbbc / bbb1);
12726  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
12727  h_2DsumTSmaxALS8->Fill(double(ieta), double(k3), bbbc);
12728  h_2D0sumTSmaxALS8->Fill(double(ieta), double(k3), bbb1);
12729  h_sumTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
12730  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
12731  h_sumCutTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
12732  h_sum0TSmaxAperLS8->Fill(float(lscounterM1), bbb1);
12733  }
12734  }
12735  } //if(sumEstimator3[k0][k1][k2][k3] != 0.
12736 
12737  // ------------------------------------------------------------------------------------------------------------------------sumEstimator4 W
12738  if (sumEstimator4[k0][k1][k2][k3] != 0.) {
12739  // fill histoes:
12740  double bbbc = 0.;
12741  if (flagestimatornormalization_ == 0)
12742  bbbc = sumEstimator4[k0][k1][k2][k3] / nevcounter0;
12743  if (flagestimatornormalization_ == 1)
12744  bbbc = sumEstimator4[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12745  double bbb1 = 1.;
12746  if (flagestimatornormalization_ == 2) {
12747  bbbc = sumEstimator4[k0][k1][k2][k3];
12748  bbb1 = sum0Estimator[k0][k1][k2][k3];
12749  }
12750 
12751  // HB:
12752  if (k0 == 0) {
12753  // HBdepth1
12754  if (k1 + 1 == 1) {
12755  h_sumAmplitudeLS1->Fill(bbbc / bbb1);
12756  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
12757  h_2DsumAmplitudeLS1->Fill(double(ieta), double(k3), bbbc);
12758  h_2D0sumAmplitudeLS1->Fill(double(ieta), double(k3), bbb1);
12759  h_sumAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
12760  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
12761  h_sumCutAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
12762  h_sum0AmplitudeperLS1->Fill(float(lscounterM1), bbb1);
12763  if (bbbc / bbb1 > 2. * lsdep_estimator4_HBdepth1_)
12764  h_sumAmplitudeperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12765  }
12766  if (k1 + 1 == 2) {
12767  h_sumAmplitudeLS2->Fill(bbbc / bbb1);
12768  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
12769  h_2DsumAmplitudeLS2->Fill(double(ieta), double(k3), bbbc);
12770  h_2D0sumAmplitudeLS2->Fill(double(ieta), double(k3), bbb1);
12771  h_sumAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
12772  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
12773  h_sumCutAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
12774  h_sum0AmplitudeperLS2->Fill(float(lscounterM1), bbb1);
12775  }
12776  }
12777  // HE:
12778  if (k0 == 1) {
12779  // HEdepth1
12780  if (k1 + 1 == 1) {
12781  h_sumAmplitudeLS3->Fill(bbbc / bbb1);
12782  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
12783  h_2DsumAmplitudeLS3->Fill(double(ieta), double(k3), bbbc);
12784  h_2D0sumAmplitudeLS3->Fill(double(ieta), double(k3), bbb1);
12785  h_sumAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
12786  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
12787  h_sumCutAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
12788  h_sum0AmplitudeperLS3->Fill(float(lscounterM1), bbb1);
12789  }
12790  if (k1 + 1 == 2) {
12791  h_sumAmplitudeLS4->Fill(bbbc / bbb1);
12792  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
12793  h_2DsumAmplitudeLS4->Fill(double(ieta), double(k3), bbbc);
12794  h_2D0sumAmplitudeLS4->Fill(double(ieta), double(k3), bbb1);
12795  h_sumAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
12796  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
12797  h_sumCutAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
12798  h_sum0AmplitudeperLS4->Fill(float(lscounterM1), bbb1);
12799  }
12800  if (k1 + 1 == 3) {
12801  h_sumAmplitudeLS5->Fill(bbbc / bbb1);
12802  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
12803  h_2DsumAmplitudeLS5->Fill(double(ieta), double(k3), bbbc);
12804  h_2D0sumAmplitudeLS5->Fill(double(ieta), double(k3), bbb1);
12805  h_sumAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
12806  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
12807  h_sumCutAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
12808  h_sum0AmplitudeperLS5->Fill(float(lscounterM1), bbb1);
12809  }
12810  }
12811  // HF:
12812  if (k0 == 3) {
12813  // HFdepth1
12814  if (k1 + 1 == 1) {
12815  h_sumAmplitudeLS6->Fill(bbbc / bbb1);
12816  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
12817  h_2DsumAmplitudeLS6->Fill(double(ieta), double(k3), bbbc);
12818  h_2D0sumAmplitudeLS6->Fill(double(ieta), double(k3), bbb1);
12819  h_sumAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
12820  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
12821  h_sumCutAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
12822  h_sum0AmplitudeperLS6->Fill(float(lscounterM1), bbb1);
12823  }
12824  if (k1 + 1 == 2) {
12825  h_sumAmplitudeLS7->Fill(bbbc / bbb1);
12826  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
12827  h_2DsumAmplitudeLS7->Fill(double(ieta), double(k3), bbbc);
12828  h_2D0sumAmplitudeLS7->Fill(double(ieta), double(k3), bbb1);
12829  h_sumAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
12830  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
12831  h_sumCutAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
12832  h_sum0AmplitudeperLS7->Fill(float(lscounterM1), bbb1);
12833  }
12834  }
12835  // HO:
12836  if (k0 == 2) {
12837  // HOdepth1
12838  if (k1 + 1 == 4) {
12839  h_sumAmplitudeLS8->Fill(bbbc / bbb1);
12840  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
12841  h_2DsumAmplitudeLS8->Fill(double(ieta), double(k3), bbbc);
12842  h_2D0sumAmplitudeLS8->Fill(double(ieta), double(k3), bbb1);
12843  h_sumAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
12844  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
12845  h_sumCutAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
12846  h_sum0AmplitudeperLS8->Fill(float(lscounterM1), bbb1);
12847  }
12848  }
12849  } //if(sumEstimator4[k0][k1][k2][k3] != 0.
12850 
12851  // ------------------------------------------------------------------------------------------------------------------------sumEstimator5 R
12852  if (sumEstimator5[k0][k1][k2][k3] != 0.) {
12853  // fill histoes:
12854  double bbbc = 0.;
12855  if (flagestimatornormalization_ == 0)
12856  bbbc = sumEstimator5[k0][k1][k2][k3] / nevcounter0;
12857  if (flagestimatornormalization_ == 1)
12858  bbbc = sumEstimator5[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12859  double bbb1 = 1.;
12860  if (flagestimatornormalization_ == 2) {
12861  bbbc = sumEstimator5[k0][k1][k2][k3];
12862  bbb1 = sum0Estimator[k0][k1][k2][k3];
12863  }
12864 
12865  // HB:
12866  if (k0 == 0) {
12867  // HBdepth1
12868  if (k1 + 1 == 1) {
12869  h_sumAmplLS1->Fill(bbbc / bbb1);
12870  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
12871  h_2DsumAmplLS1->Fill(double(ieta), double(k3), bbbc);
12872  h_2D0sumAmplLS1->Fill(double(ieta), double(k3), bbb1);
12873  h_sumAmplperLS1->Fill(float(lscounterM1), bbbc);
12874  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
12875  h_sumCutAmplperLS1->Fill(float(lscounterM1), bbbc);
12876  h_sum0AmplperLS1->Fill(float(lscounterM1), bbb1);
12877  if (bbbc / bbb1 > 2. * lsdep_estimator5_HBdepth1_)
12878  h_sumAmplperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12879  }
12880  if (k1 + 1 == 2) {
12881  h_sumAmplLS2->Fill(bbbc / bbb1);
12882  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
12883  h_2DsumAmplLS2->Fill(double(ieta), double(k3), bbbc);
12884  h_2D0sumAmplLS2->Fill(double(ieta), double(k3), bbb1);
12885  h_sumAmplperLS2->Fill(float(lscounterM1), bbbc);
12886  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
12887  h_sumCutAmplperLS2->Fill(float(lscounterM1), bbbc);
12888  h_sum0AmplperLS2->Fill(float(lscounterM1), bbb1);
12889  }
12890  }
12891  // HE:
12892  if (k0 == 1) {
12893  // HEdepth1
12894  if (k1 + 1 == 1) {
12895  h_sumAmplLS3->Fill(bbbc / bbb1);
12896  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
12897  h_2DsumAmplLS3->Fill(double(ieta), double(k3), bbbc);
12898  h_2D0sumAmplLS3->Fill(double(ieta), double(k3), bbb1);
12899  h_sumAmplperLS3->Fill(float(lscounterM1), bbbc);
12900  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
12901  h_sumCutAmplperLS3->Fill(float(lscounterM1), bbbc);
12902  h_sum0AmplperLS3->Fill(float(lscounterM1), bbb1);
12903  }
12904  if (k1 + 1 == 2) {
12905  h_sumAmplLS4->Fill(bbbc / bbb1);
12906  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
12907  h_2DsumAmplLS4->Fill(double(ieta), double(k3), bbbc);
12908  h_2D0sumAmplLS4->Fill(double(ieta), double(k3), bbb1);
12909  h_sumAmplperLS4->Fill(float(lscounterM1), bbbc);
12910  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
12911  h_sumCutAmplperLS4->Fill(float(lscounterM1), bbbc);
12912  h_sum0AmplperLS4->Fill(float(lscounterM1), bbb1);
12913  }
12914  if (k1 + 1 == 3) {
12915  h_sumAmplLS5->Fill(bbbc / bbb1);
12916  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
12917  h_2DsumAmplLS5->Fill(double(ieta), double(k3), bbbc);
12918  h_2D0sumAmplLS5->Fill(double(ieta), double(k3), bbb1);
12919  h_sumAmplperLS5->Fill(float(lscounterM1), bbbc);
12920  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
12921  h_sumCutAmplperLS5->Fill(float(lscounterM1), bbbc);
12922  h_sum0AmplperLS5->Fill(float(lscounterM1), bbb1);
12923  }
12924  }
12925  // HF:
12926  if (k0 == 3) {
12927  // HFdepth1
12928  if (k1 + 1 == 1) {
12929  h_sumAmplLS6->Fill(bbbc / bbb1);
12930  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
12931  h_2DsumAmplLS6->Fill(double(ieta), double(k3), bbbc);
12932  h_2D0sumAmplLS6->Fill(double(ieta), double(k3), bbb1);
12933  h_sumAmplperLS6->Fill(float(lscounterM1), bbbc);
12934  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
12935  h_sumCutAmplperLS6->Fill(float(lscounterM1), bbbc);
12936  h_sum0AmplperLS6->Fill(float(lscounterM1), bbb1);
12937  }
12938  if (k1 + 1 == 2) {
12939  h_sumAmplLS7->Fill(bbbc / bbb1);
12940  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
12941  h_2DsumAmplLS7->Fill(double(ieta), double(k3), bbbc);
12942  h_2D0sumAmplLS7->Fill(double(ieta), double(k3), bbb1);
12943  h_sumAmplperLS7->Fill(float(lscounterM1), bbbc);
12944  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
12945  h_sumCutAmplperLS7->Fill(float(lscounterM1), bbbc);
12946  h_sum0AmplperLS7->Fill(float(lscounterM1), bbb1);
12947  }
12948  }
12949  // HO:
12950  if (k0 == 2) {
12951  // HOdepth1
12952  if (k1 + 1 == 4) {
12953  h_sumAmplLS8->Fill(bbbc / bbb1);
12954  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
12955  h_2DsumAmplLS8->Fill(double(ieta), double(k3), bbbc);
12956  h_2D0sumAmplLS8->Fill(double(ieta), double(k3), bbb1);
12957  h_sumAmplperLS8->Fill(float(lscounterM1), bbbc);
12958  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
12959  h_sumCutAmplperLS8->Fill(float(lscounterM1), bbbc);
12960  h_sum0AmplperLS8->Fill(float(lscounterM1), bbb1);
12961  }
12962  }
12963  } //if(sumEstimator5[k0][k1][k2][k3] != 0.
12964  // ------------------------------------------------------------------------------------------------------------------------sumEstimator6 (Error-B)
12965  if (sumEstimator6[k0][k1][k2][k3] != 0.) {
12966  // fill histoes:
12967  double bbbc = 0.;
12968  if (flagestimatornormalization_ == 0)
12969  bbbc = sumEstimator6[k0][k1][k2][k3] / nevcounter0;
12970  if (flagestimatornormalization_ == 1)
12971  bbbc = sumEstimator6[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12972  double bbb1 = 1.;
12973  if (flagestimatornormalization_ == 2) {
12974  bbbc = sumEstimator6[k0][k1][k2][k3];
12975  bbb1 = sum0Estimator[k0][k1][k2][k3];
12976  }
12977 
12978  // HB:
12979  if (k0 == 0) {
12980  // HBdepth1
12981  if (k1 + 1 == 1) {
12982  h_sumErrorBLS1->Fill(bbbc / bbb1);
12983  h_2DsumErrorBLS1->Fill(double(ieta), double(k3), bbbc);
12984  h_2D0sumErrorBLS1->Fill(double(ieta), double(k3), bbb1);
12985  h_sumErrorBperLS1->Fill(float(lscounterM1), bbbc);
12986  h_sum0ErrorBperLS1->Fill(float(lscounterM1), bbb1);
12987  }
12988  if (k1 + 1 == 2) {
12989  h_sumErrorBLS2->Fill(bbbc / bbb1);
12990  h_2DsumErrorBLS2->Fill(double(ieta), double(k3), bbbc);
12991  h_2D0sumErrorBLS2->Fill(double(ieta), double(k3), bbb1);
12992  h_sumErrorBperLS2->Fill(float(lscounterM1), bbbc);
12993  h_sum0ErrorBperLS2->Fill(float(lscounterM1), bbb1);
12994  }
12995  }
12996  // HE:
12997  if (k0 == 1) {
12998  // HEdepth1
12999  if (k1 + 1 == 1) {
13000  h_sumErrorBLS3->Fill(bbbc / bbb1);
13001  h_2DsumErrorBLS3->Fill(double(ieta), double(k3), bbbc);
13002  h_2D0sumErrorBLS3->Fill(double(ieta), double(k3), bbb1);
13003  h_sumErrorBperLS3->Fill(float(lscounterM1), bbbc);
13004  h_sum0ErrorBperLS3->Fill(float(lscounterM1), bbb1);
13005  }
13006  if (k1 + 1 == 2) {
13007  h_sumErrorBLS4->Fill(bbbc / bbb1);
13008  h_2DsumErrorBLS4->Fill(double(ieta), double(k3), bbbc);
13009  h_2D0sumErrorBLS4->Fill(double(ieta), double(k3), bbb1);
13010  h_sumErrorBperLS4->Fill(float(lscounterM1), bbbc);
13011  h_sum0ErrorBperLS4->Fill(float(lscounterM1), bbb1);
13012  }
13013  if (k1 + 1 == 3) {
13014  h_sumErrorBLS5->Fill(bbbc / bbb1);
13015  h_2DsumErrorBLS5->Fill(double(ieta), double(k3), bbbc);
13016  h_2D0sumErrorBLS5->Fill(double(ieta), double(k3), bbb1);
13017  h_sumErrorBperLS5->Fill(float(lscounterM1), bbbc);
13018  h_sum0ErrorBperLS5->Fill(float(lscounterM1), bbb1);
13019  }
13020  }
13021  // HF:
13022  if (k0 == 3) {
13023  // HFdepth1
13024  if (k1 + 1 == 1) {
13025  h_sumErrorBLS6->Fill(bbbc / bbb1);
13026  h_2DsumErrorBLS6->Fill(double(ieta), double(k3), bbbc);
13027  h_2D0sumErrorBLS6->Fill(double(ieta), double(k3), bbb1);
13028  h_sumErrorBperLS6->Fill(float(lscounterM1), bbbc);
13029  h_sum0ErrorBperLS6->Fill(float(lscounterM1), bbb1);
13030  }
13031  if (k1 + 1 == 2) {
13032  h_sumErrorBLS7->Fill(bbbc / bbb1);
13033  h_2DsumErrorBLS7->Fill(double(ieta), double(k3), bbbc);
13034  h_2D0sumErrorBLS7->Fill(double(ieta), double(k3), bbb1);
13035  h_sumErrorBperLS7->Fill(float(lscounterM1), bbbc);
13036  h_sum0ErrorBperLS7->Fill(float(lscounterM1), bbb1);
13037  }
13038  }
13039  // HO:
13040  if (k0 == 2) {
13041  // HOdepth4
13042  if (k1 + 1 == 4) {
13043  h_sumErrorBLS8->Fill(bbbc / bbb1);
13044  h_2DsumErrorBLS8->Fill(double(ieta), double(k3), bbbc);
13045  h_2D0sumErrorBLS8->Fill(double(ieta), double(k3), bbb1);
13046  h_sumErrorBperLS8->Fill(float(lscounterM1), bbbc);
13047  h_sum0ErrorBperLS8->Fill(float(lscounterM1), bbb1);
13048  }
13049  }
13051  } //if(sumEstimator6[k0][k1][k2][k3] != 0.
13052 
13055  } //for
13056  } //for
13057  } //for
13058  } //for
13059 
13060  //------------------------------------------------------ averSIGNAL
13069 
13074 
13075  //------------------------------------------------------
13084 
13089 
13090  //------------------------------------------------------ averNOSIGNAL
13099 
13104 
13105  //------------------------------------------------------
13114 
13119 
13120  h_maxxSUMAmpl_HB->Fill(float(lscounterM1), maxxSUM1);
13121  h_maxxSUMAmpl_HE->Fill(float(lscounterM1), maxxSUM2);
13122  h_maxxSUMAmpl_HO->Fill(float(lscounterM1), maxxSUM3);
13123  h_maxxSUMAmpl_HF->Fill(float(lscounterM1), maxxSUM4);
13124  maxxSUM1 = 0.;
13125  maxxSUM2 = 0.;
13126  maxxSUM3 = 0.;
13127  maxxSUM4 = 0.;
13128  //------------------------------------------------------
13129  h_maxxOCCUP_HB->Fill(float(lscounterM1), maxxOCCUP1);
13130  h_maxxOCCUP_HE->Fill(float(lscounterM1), maxxOCCUP2);
13131  h_maxxOCCUP_HO->Fill(float(lscounterM1), maxxOCCUP3);
13132  h_maxxOCCUP_HF->Fill(float(lscounterM1), maxxOCCUP4);
13133  maxxOCCUP1 = 0.;
13134  maxxOCCUP2 = 0.;
13135  maxxOCCUP3 = 0.;
13136  maxxOCCUP4 = 0.;
13137 
13138  } //if( nevcounter0 != 0 )
13140 
13141  std::cout << " ==== Edn of run " << std::endl;
13142 }
13144 //
13146 //
13149  HcalLogicalMap lmap = gen.createMap(topo);
13150 
13151  // HcalElectronicsMap emap=lmap.generateHcalElectronicsMap();
13152 
13153  // const HcalElectronicsMap* emap=conditions->getHcalMapping();
13154  const HcalElectronicsMap* emap;
13155  emap = conditions->getHcalMapping();
13156 
13157  std::string subdet = "";
13158 
13159  MAPfile << "#define LogEleMapdb_h" << std::endl;
13160  MAPfile << "#include <algorithm>" << std::endl;
13161  MAPfile << "#include <iostream>" << std::endl;
13162  MAPfile << "#include <vector>" << std::endl;
13163  MAPfile << "#include <string>" << std::endl;
13164  MAPfile << "#include <sstream>" << std::endl;
13165  MAPfile << std::endl;
13166 
13167  MAPfile << "struct Cell {" << std::endl;
13168  MAPfile << " std::string subdet;" << std::endl;
13169  MAPfile << " int Eta;" << std::endl;
13170  MAPfile << " int Phi;" << std::endl;
13171  MAPfile << " int Depth;" << std::endl;
13172  MAPfile << " std::string RBX;" << std::endl;
13173  MAPfile << " int RM;" << std::endl;
13174  MAPfile << " int Pixel;" << std::endl;
13175  MAPfile << " int RMfiber;" << std::endl;
13176  MAPfile << " int FiberCh;" << std::endl;
13177  MAPfile << " int QIE;" << std::endl;
13178  MAPfile << " int ADC;" << std::endl;
13179  MAPfile << " int VMECardID;" << std::endl;
13180  MAPfile << " int dccID;" << std::endl;
13181  MAPfile << " int Spigot;" << std::endl;
13182  MAPfile << " int FiberIndex;" << std::endl;
13183  MAPfile << " int HtrSlot;" << std::endl;
13184  MAPfile << " int HtrTB;" << std::endl;
13185  MAPfile << std::endl;
13186 
13187  MAPfile << "// the function check, if \"par\" == \"val\" for this cell" << std::endl;
13188  MAPfile << " bool check(const std::string par, const int val) const " << std::endl;
13189  MAPfile << " {" << std::endl;
13190  MAPfile << " if (par == \"Eta\") return (val == Eta);" << std::endl;
13191  MAPfile << " else if (par == \"Phi\") return (val == Phi);" << std::endl;
13192  MAPfile << " else if (par == \"Depth\") return (val == Depth);" << std::endl;
13193  MAPfile << " else if (par == \"RM\") return (val == RM);" << std::endl;
13194  MAPfile << " else if (par == \"Pixel\") return (val == Pixel);" << std::endl;
13195  MAPfile << " else if (par == \"RMfiber\") return (val == RMfiber);" << std::endl;
13196  MAPfile << " else if (par == \"FiberCh\") return (val == FiberCh);" << std::endl;
13197  MAPfile << " else if (par == \"QIE\") return (val == QIE);" << std::endl;
13198  MAPfile << " else if (par == \"ADC\") return (val == ADC);" << std::endl;
13199  MAPfile << " else if (par == \"VMECardID\") return (val == VMECardID);" << std::endl;
13200  MAPfile << " else if (par == \"dccID\") return (val == dccID);" << std::endl;
13201  MAPfile << " else if (par == \"Spigot\") return (val == Spigot);" << std::endl;
13202  MAPfile << " else if (par == \"FiberIndex\") return (val == FiberIndex);" << std::endl;
13203  MAPfile << " else if (par == \"HtrSlot\") return (val == HtrSlot);" << std::endl;
13204  MAPfile << " else if (par == \"HtrTB\") return (val == HtrTB);" << std::endl;
13205  MAPfile << " else return false;" << std::endl;
13206  MAPfile << " }" << std::endl;
13207  MAPfile << std::endl;
13208 
13209  MAPfile << " bool check(const std::string par, const std::string val) const" << std::endl;
13210  MAPfile << " {" << std::endl;
13211  MAPfile << " if (par == \"subdet\") return (val == subdet);" << std::endl;
13212  MAPfile << " else if (par == \"RBX\") return (val == RBX);" << std::endl;
13213  MAPfile << " else return false;" << std::endl;
13214  MAPfile << " }" << std::endl;
13215 
13216  MAPfile << "};" << std::endl;
13217  MAPfile << std::endl;
13218 
13219  MAPfile << "const Cell AllCells[] = {" << std::endl;
13220  MAPfile << "//{ SD, Eta, Phi, Depth, RBX, RM, PIXEL, RMfiber, Fiber Ch., QIE, ADC, VMECrateId, dccid, spigot, "
13221  "fiberIndex, htrSlot, htrTopBottom }"
13222  << std::endl;
13223 
13224  // HB
13225 
13226  for (int eta = -16; eta < 0; eta++) {
13227  for (int phi = 1; phi <= nphi; phi++) {
13228  for (int depth = 1; depth <= 2; depth++) {
13229  HcalDetId* detid = nullptr;
13230  detid = new HcalDetId(HcalBarrel, eta, phi, depth);
13231  subdet = "HB";
13232  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13233  HcalElectronicsId emap_entry = emap->lookup(*detid);
13234  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13235  << detid->depth() << " ,";
13236  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13237  << lmap_entry.rmFiber() << " , ";
13238  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13239  << " , ";
13240  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13241  << " , " << emap_entry.fiberIndex() << " , ";
13242  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13243  MAPfile << "}," << std::endl;
13244  delete detid;
13245  } //Depth
13246  } //Phi
13247  } //Eta
13248  for (int eta = 1; eta <= 16; eta++) {
13249  for (int phi = 1; phi <= nphi; phi++) {
13250  for (int depth = 1; depth <= 2; depth++) {
13251  HcalDetId* detid = nullptr;
13252  detid = new HcalDetId(HcalBarrel, eta, phi, depth);
13253  subdet = "HB";
13254  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13255  HcalElectronicsId emap_entry = emap->lookup(*detid);
13256  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() - 1 << " , " << detid->iphi() - 1 << " , "
13257  << detid->depth() << " ,";
13258  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13259  << lmap_entry.rmFiber() << " , ";
13260  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13261  << " , ";
13262  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13263  << " , " << emap_entry.fiberIndex() << " , ";
13264  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13265  MAPfile << "}," << std::endl;
13266  delete detid;
13267  } //Depth
13268  } //Phi
13269  } //Eta
13270 
13271  // HE
13272  for (int eta = -20; eta <= -20; eta++) {
13273  for (int phi = nphi; phi <= nphi; phi++) {
13274  for (int depth = 1; depth <= 2; depth++) {
13275  HcalDetId* detid = nullptr;
13276  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13277  subdet = "HE";
13278  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13279  HcalElectronicsId emap_entry = emap->lookup(*detid);
13280  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13281  << detid->depth() << " ,";
13282  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13283  << lmap_entry.rmFiber() << " , ";
13284  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13285  << " , ";
13286  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13287  << " , " << emap_entry.fiberIndex() << " , ";
13288  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13289  MAPfile << "}," << std::endl;
13290  delete detid;
13291  } //Depth
13292  } //Phi
13293  } //Eta
13294 
13295  for (int eta = -19; eta <= -16; eta++) {
13296  for (int phi = nphi; phi <= nphi; phi++) {
13297  for (int depth = 1; depth <= 3; depth++) {
13298  HcalDetId* detid = nullptr;
13299  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13300  subdet = "HE";
13301  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13302  HcalElectronicsId emap_entry = emap->lookup(*detid);
13303  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13304  << detid->depth() << " ,";
13305  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13306  << lmap_entry.rmFiber() << " , ";
13307  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13308  << " , ";
13309  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13310  << " , " << emap_entry.fiberIndex() << " , ";
13311  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13312  MAPfile << "}," << std::endl;
13313  delete detid;
13314  } //Depth
13315  } //Phi
13316  } //Eta
13317  for (int eta = -29; eta <= -16; eta++) {
13318  for (int phi = 1; phi <= 71; phi++) {
13319  for (int depth = 1; depth <= 3; depth++) {
13320  HcalDetId* detid = nullptr;
13321  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13322  subdet = "HE";
13323  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13324  HcalElectronicsId emap_entry = emap->lookup(*detid);
13325  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13326  << detid->depth() << " ,";
13327  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13328  << lmap_entry.rmFiber() << " , ";
13329  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13330  << " , ";
13331  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13332  << " , " << emap_entry.fiberIndex() << " , ";
13333  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13334  MAPfile << "}," << std::endl;
13335  delete detid;
13336  } //Depth
13337  } //Phi
13338  } //Eta
13339  for (int eta = 16; eta <= 29; eta++) {
13340  for (int phi = 1; phi <= nphi; phi++) {
13341  for (int depth = 1; depth <= 3; depth++) {
13342  HcalDetId* detid = nullptr;
13343  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13344  subdet = "HE";
13345  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13346  HcalElectronicsId emap_entry = emap->lookup(*detid);
13347  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13348  << detid->depth() << " ,";
13349  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13350  << lmap_entry.rmFiber() << " , ";
13351  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13352  << " , ";
13353  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13354  << " , " << emap_entry.fiberIndex() << " , ";
13355  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13356  MAPfile << "}," << std::endl;
13357  delete detid;
13358  } //Depth
13359  } //Phi
13360  } //Eta
13361 
13362  // HF
13363 
13364  for (int eta = -41; eta <= -29; eta++) {
13365  for (int phi = 1; phi <= nphi; phi += 2) {
13366  for (int depth = 1; depth <= 2; depth++) {
13367  HcalDetId* detid = nullptr;
13368  detid = new HcalDetId(HcalForward, eta, phi, depth);
13369  subdet = "HF";
13370  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13371  HcalElectronicsId emap_entry = emap->lookup(*detid);
13372  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13373  << detid->depth() << " ,";
13374  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13375  << lmap_entry.rmFiber() << " , ";
13376  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13377  << " , ";
13378  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13379  << " , " << emap_entry.fiberIndex() << " , ";
13380  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13381  MAPfile << "}," << std::endl;
13382  delete detid;
13383  } //Depth
13384  } //Phi
13385  } //Eta
13386 
13387  for (int eta = 29; eta <= 41; eta++) {
13388  for (int phi = 1; phi <= nphi; phi += 2) {
13389  for (int depth = 1; depth <= 2; depth++) {
13390  HcalDetId* detid = nullptr;
13391  detid = new HcalDetId(HcalForward, eta, phi, depth);
13392  subdet = "HF";
13393  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13394  HcalElectronicsId emap_entry = emap->lookup(*detid);
13395  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13396  << detid->depth() << " ,";
13397  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13398  << lmap_entry.rmFiber() << " , ";
13399  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13400  << " , ";
13401  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13402  << " , " << emap_entry.fiberIndex() << " , ";
13403  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13404  MAPfile << "}," << std::endl;
13405  delete detid;
13406  } //Depth
13407  } //Phi
13408  } //Eta
13409 
13410  // HO
13411 
13412  for (int eta = -15; eta < 0; eta++) {
13413  for (int phi = 1; phi <= nphi; phi++) {
13414  for (int depth = 4; depth <= 4; depth++) {
13415  HcalDetId* detid = nullptr;
13416  detid = new HcalDetId(HcalOuter, eta, phi, depth);
13417  subdet = "HO";
13418  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13419  HcalElectronicsId emap_entry = emap->lookup(*detid);
13420  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13421  << detid->depth() << " ,";
13422  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13423  << lmap_entry.rmFiber() << " , ";
13424  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13425  << " , ";
13426  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13427  << " , " << emap_entry.fiberIndex() << " , ";
13428  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13429  MAPfile << "}," << std::endl;
13430  delete detid;
13431  } //Depth
13432  } //Phi
13433  } //Eta
13434 
13435  for (int eta = 1; eta <= 15; eta++) {
13436  for (int phi = 1; phi <= nphi; phi++) {
13437  for (int depth = 4; depth <= 4; depth++) {
13438  HcalDetId* detid = nullptr;
13439  detid = new HcalDetId(HcalOuter, eta, phi, depth);
13440  subdet = "HO";
13441  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13442  HcalElectronicsId emap_entry = emap->lookup(*detid);
13443  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() - 1 << " , " << detid->iphi() - 1 << " , "
13444  << detid->depth() << " ,";
13445  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13446  << lmap_entry.rmFiber() << " , ";
13447  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13448  << " , ";
13449  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13450  << " , " << emap_entry.fiberIndex() << " , ";
13451  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13452  MAPfile << "}," << std::endl;
13453  delete detid;
13454  } //Depth
13455  } //Phi
13456  } //Eta
13457  MAPfile << "};" << std::endl;
13458  MAPfile << std::endl;
13459 
13460  MAPfile << "// macro for array length calculation" << std::endl;
13461  MAPfile << "#define DIM(a) (sizeof(a)/sizeof(a[0]))" << std::endl;
13462  MAPfile << std::endl;
13463 
13464  MAPfile << "// class for cells array managing" << std::endl;
13465  MAPfile << "class CellDB {" << std::endl;
13466  MAPfile << "public:" << std::endl;
13467  MAPfile << " CellDB()" << std::endl;
13468  MAPfile << " : cells(AllCells, AllCells + DIM(AllCells))" << std::endl;
13469  MAPfile << "{}" << std::endl;
13470  MAPfile << std::endl;
13471 
13472  MAPfile << "// return i-th cell" << std::endl;
13473  MAPfile << "Cell operator [] (int i) const {return cells[i];}" << std::endl;
13474 
13475  MAPfile << "// number of cells in database" << std::endl;
13476  MAPfile << "int size() const {return cells.size();}" << std::endl;
13477  MAPfile << std::endl;
13478 
13479  MAPfile << "// select cells for which \"par\" == \"val\"" << std::endl;
13480  MAPfile << "template<typename T>" << std::endl;
13481  MAPfile << "CellDB find(const std::string par, const T val) const" << std::endl;
13482  MAPfile << "{" << std::endl;
13483  MAPfile << " std::vector<Cell> s;" << std::endl;
13484  MAPfile << " for (size_t i = 0; i < cells.size(); ++i)" << std::endl;
13485  MAPfile << " if (cells[i].check(par, val))" << std::endl;
13486  MAPfile << " s.push_back(cells[i]);" << std::endl;
13487  MAPfile << " return CellDB(s);" << std::endl;
13488  MAPfile << "} " << std::endl;
13489  MAPfile << std::endl;
13490  MAPfile << "private:" << std::endl;
13491  MAPfile << " CellDB( const std::vector<Cell> s)" << std::endl;
13492  MAPfile << " : cells(s)" << std::endl;
13493  MAPfile << "{}" << std::endl;
13494  MAPfile << "std::vector<Cell> cells;" << std::endl;
13495  MAPfile << "};" << std::endl;
13496  MAPfile.close();
13497  std::cout << "===== Finish writing Channel MAP =====" << std::endl;
13498 }
13499 
13500 double CMTRawAnalyzer::dR(double eta1, double phi1, double eta2, double phi2) {
13501  double deltaphi = phi1 - phi2;
13502  if (phi2 > phi1) {
13503  deltaphi = phi2 - phi1;
13504  }
13505  if (deltaphi > M_PI) {
13506  deltaphi = 2. * M_PI - deltaphi;
13507  }
13508  double deltaeta = eta2 - eta1;
13509  double tmp = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
13510  return tmp;
13511 }
13512 
13513 double CMTRawAnalyzer::phi12(double phi1, double en1, double phi2, double en2) {
13514  // weighted mean value of phi1 and phi2
13515 
13516  double a1 = phi1;
13517  double a2 = phi2;
13518 
13519  if (a1 > 0.5 * M_PI && a2 < 0.)
13520  a2 += 2 * M_PI;
13521  if (a2 > 0.5 * M_PI && a1 < 0.)
13522  a1 += 2 * M_PI;
13523  double tmp = (a1 * en1 + a2 * en2) / (en1 + en2);
13524  if (tmp > M_PI)
13525  tmp -= 2. * M_PI;
13526 
13527  return tmp;
13528 }
13529 
13530 double CMTRawAnalyzer::dPhiWsign(double phi1, double phi2) {
13531  // clockwise phi2 w.r.t phi1 means "+" phi distance
13532  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
13533 
13534  double a1 = phi1;
13535  double a2 = phi2;
13536  double tmp = a2 - a1;
13537  if (a1 * a2 < 0.) {
13538  if (a1 > 0.5 * M_PI)
13539  tmp += 2. * M_PI;
13540  if (a2 > 0.5 * M_PI)
13541  tmp -= 2. * M_PI;
13542  }
13543  return tmp;
13544 }
13545 
13548 //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
constexpr int pow(int x)
Definition: conifer.h:24
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
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_