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;
763  TH1F* h_error1_HB;
764  TH1F* h_error2_HB;
765  TH1F* h_error3_HB;
766  TH1F* h_error4_HB;
767  TH1F* h_error5_HB;
768  TH1F* h_error6_HB;
769  TH1F* h_error7_HB;
776  TH1F* h_fiber0_HB;
777  TH1F* h_fiber1_HB;
778  TH1F* h_fiber2_HB;
787  TH1F* h_error1_HE;
788  TH1F* h_error2_HE;
789  TH1F* h_error3_HE;
790  TH1F* h_error4_HE;
791  TH1F* h_error5_HE;
792  TH1F* h_error6_HE;
793  TH1F* h_error7_HE;
803  TH1F* h_fiber0_HE;
804  TH1F* h_fiber1_HE;
805  TH1F* h_fiber2_HE;
808  TH1F* h_error1_HF;
809  TH1F* h_error2_HF;
810  TH1F* h_error3_HF;
811  TH1F* h_error4_HF;
812  TH1F* h_error5_HF;
813  TH1F* h_error6_HF;
814  TH1F* h_error7_HF;
821  TH1F* h_fiber0_HF;
822  TH1F* h_fiber1_HF;
823  TH1F* h_fiber2_HF;
826  TH1F* h_error1_HO;
827  TH1F* h_error2_HO;
828  TH1F* h_error3_HO;
829  TH1F* h_error4_HO;
830  TH1F* h_error5_HO;
831  TH1F* h_error6_HO;
832  TH1F* h_error7_HO;
836  TH1F* h_fiber0_HO;
837  TH1F* h_fiber1_HO;
838  TH1F* h_fiber2_HO;
890  TH1F* h_TSmaxA_HB;
908  TH1F* h_Ampl_HB;
947 
964 
987  TH1F* h_TSmaxA_HF;
1005  TH1F* h_Ampl_HF;
1039  TH1F* h_Ampl_HO;
1045  //-----------------------------------
1070  //-----------------------------------
1113  //-----------------------------------
1120  //-----------------------------------
1145  //-----------------------------------
1154  //-----------------------------------
1163  //-----------------------------------
1180  //-----------------------------------
1271  TH1F* h_Ampl_HE;
1328  TH2F* h_map_HB;
1345  TH2F* h_map_HE;
1362  TH2F* h_map_HO;
1379  TH2F* h_map_HF;
1845  TH1F* h_gain_HB;
1854  TH1F* h_gain_HE;
1859  TH1F* h_gain_HF;
1864  TH1F* h_gain_HO;
2140  // phy-symmetry, phi-symmetry:
2141  // Reco:
2148  //HB:
2173  //HE:
2216  //HF:
2229 
2242 
2288 
2335 
2338  double caliba[ndepth][neta][nphi];
2339  double calibw[ndepth][neta][nphi];
2340  double calib0[ndepth][neta][nphi];
2341  double signal[ndepth][neta][nphi];
2342  double calib3[ndepth][neta][nphi];
2344  double calib2[ndepth][neta][nphi];
2354 
2355  // phi-symmetry monitoring for calibration group:
2361 
2365 
2369 
2370  float TS_data[100];
2371  float TS_cal[100];
2379  long int Nevent;
2380  int Run;
2381  int run0;
2384  long int orbitNum;
2385  int bcn;
2386  int lumi;
2387  int ls0;
2412  double maxxSUM1;
2413  double maxxSUM2;
2414  double maxxSUM3;
2415  double maxxSUM4;
2416  double maxxOCCUP1;
2417  double maxxOCCUP2;
2418  double maxxOCCUP3;
2419  double maxxOCCUP4;
2420  TTree* myTree;
2421  TFile* hOutputFile;
2422  std::ofstream MAPfile;
2424  // Get RBX number from 1-35 for Calibration box
2425  int getRBX(int& i, int& j, int& k);
2429  // upgrade:
2430  void fillDigiErrorsHFQIE10(QIE10DataFrame qie10df);
2431  void fillDigiErrorsQIE11(QIE11DataFrame qie11df);
2435  // upgrade:
2437  void fillDigiAmplitudeQIE11(QIE11DataFrame qie11df);
2440  int numOfTS;
2443  float alsmin;
2444  float blsmax;
2446 };
2447 
2448 //
2450 //
2452  if (verbosity > 0)
2453  std::cout << "============== endJob ===================================" << std::endl;
2454 
2455  std::cout << " --------------------------------------- " << std::endl;
2456  std::cout << " for Run = " << run0 << " with runcounter = " << runcounter << " #ev = " << eventcounter << std::endl;
2457  std::cout << " #LS = " << lscounterrun << " #LS10 = " << lscounterrun10 << " Last LS = " << ls0 << std::endl;
2458  std::cout << " --------------------------------------------- " << std::endl;
2459  h_nls_per_run->Fill(float(lscounterrun));
2460  h_nls_per_run10->Fill(float(lscounterrun10));
2461 
2463  std::cout << "===== full number of events = " << nevent << std::endl;
2464  std::cout << "===== possible max number of events in ntuple(each 50th recorded) = " << nevent50 << std::endl;
2465  std::cout << "===== but limited by maxNeventsInNtuple = " << maxNeventsInNtuple_ << std::endl;
2466  std::cout << "===== full number of events*HBHEdigis and qie11 = " << nnnnnnhbhe << " and " << nnnnnnhbheqie11
2467  << std::endl;
2468  std::cout << "===== full number of events*HBHEdigis = " << nnnnnn << std::endl;
2469  std::cout << "===== full number of events*HFdigis and qie10 = " << counterhf << " and " << counterhfqie10
2470  << std::endl;
2471  std::cout << "===== full number of events*HOdigis = " << counterho << std::endl;
2472 
2473  std::cout << "===== Start writing user histograms =====" << std::endl;
2476 }
2477 //
2478 
2479 //
2480 //
2483  usesResource(TFileService::kSharedResource);
2484  verbosity = iConfig.getUntrackedParameter<int>("Verbosity");
2485  MAPcreation = iConfig.getUntrackedParameter<int>("MapCreation");
2486  recordNtuples_ = iConfig.getUntrackedParameter<bool>("recordNtuples");
2487  maxNeventsInNtuple_ = iConfig.getParameter<int>("maxNeventsInNtuple");
2488  tok_calib_ = consumes<HcalCalibDigiCollection>(iConfig.getParameter<edm::InputTag>("hcalCalibDigiCollectionTag")); //
2489  tok_hbhe_ = consumes<HBHEDigiCollection>(iConfig.getParameter<edm::InputTag>("hbheDigiCollectionTag"));
2490  tok_ho_ = consumes<HODigiCollection>(iConfig.getParameter<edm::InputTag>("hoDigiCollectionTag"));
2491  tok_hf_ = consumes<HFDigiCollection>(iConfig.getParameter<edm::InputTag>("hfDigiCollectionTag")); //
2492  tok_qie11_ = consumes<QIE11DigiCollection>(iConfig.getParameter<edm::InputTag>("hbheQIE11DigiCollectionTag"));
2493  tok_qie10_ = consumes<QIE10DigiCollection>(iConfig.getParameter<edm::InputTag>("hbheQIE10DigiCollectionTag"));
2494  // phi-symmetry monitoring for calibration group:
2495  tok_hbheSignal_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputSignalTag"));
2496  tok_hbheNoise_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInputNoiseTag"));
2497  tok_hfSignal_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputSignalTag"));
2498  tok_hfNoise_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInputNoiseTag"));
2499  recordHistoes_ = iConfig.getUntrackedParameter<bool>("recordHistoes");
2500  studyRunDependenceHist_ = iConfig.getUntrackedParameter<bool>("studyRunDependenceHist");
2501  studyCapIDErrorsHist_ = iConfig.getUntrackedParameter<bool>("studyCapIDErrorsHist");
2502  studyRMSshapeHist_ = iConfig.getUntrackedParameter<bool>("studyRMSshapeHist");
2503  studyRatioShapeHist_ = iConfig.getUntrackedParameter<bool>("studyRatioShapeHist");
2504  studyTSmaxShapeHist_ = iConfig.getUntrackedParameter<bool>("studyTSmaxShapeHist");
2505  studyTSmeanShapeHist_ = iConfig.getUntrackedParameter<bool>("studyTSmeanShapeHist");
2506  studyDiffAmplHist_ = iConfig.getUntrackedParameter<bool>("studyDiffAmplHist");
2507  studyCalibCellsHist_ = iConfig.getUntrackedParameter<bool>("studyCalibCellsHist");
2508  studyADCAmplHist_ = iConfig.getUntrackedParameter<bool>("studyADCAmplHist");
2509  studyPedestalsHist_ = iConfig.getUntrackedParameter<bool>("studyPedestalsHist");
2510  studyPedestalCorrelations_ = iConfig.getUntrackedParameter<bool>("studyPedestalCorrelations");
2511  useADCmassive_ = iConfig.getUntrackedParameter<bool>("useADCmassive");
2512  useADCfC_ = iConfig.getUntrackedParameter<bool>("useADCfC");
2513  useADCcounts_ = iConfig.getUntrackedParameter<bool>("useADCcounts");
2514  usePedestalSubtraction_ = iConfig.getUntrackedParameter<bool>("usePedestalSubtraction");
2515  usecontinuousnumbering_ = iConfig.getUntrackedParameter<bool>("usecontinuousnumbering");
2516  flagLaserRaddam_ = iConfig.getParameter<int>("flagLaserRaddam");
2517  flagToUseDigiCollectionsORNot_ = iConfig.getParameter<int>("flagToUseDigiCollectionsORNot");
2518  flagIterativeMethodCalibrationGroupDigi_ = iConfig.getParameter<int>("flagIterativeMethodCalibrationGroupDigi");
2519  flagIterativeMethodCalibrationGroupReco_ = iConfig.getParameter<int>("flagIterativeMethodCalibrationGroupReco");
2520  flagfitshunt1pedorledlowintensity_ = iConfig.getParameter<int>("flagfitshunt1pedorledlowintensity");
2521  flagabortgaprejected_ = iConfig.getParameter<int>("flagabortgaprejected");
2522  bcnrejectedlow_ = iConfig.getParameter<int>("bcnrejectedlow");
2523  bcnrejectedhigh_ = iConfig.getParameter<int>("bcnrejectedhigh");
2524  ratioHBMin_ = iConfig.getParameter<double>("ratioHBMin");
2525  ratioHBMax_ = iConfig.getParameter<double>("ratioHBMax");
2526  ratioHEMin_ = iConfig.getParameter<double>("ratioHEMin");
2527  ratioHEMax_ = iConfig.getParameter<double>("ratioHEMax");
2528  ratioHFMin_ = iConfig.getParameter<double>("ratioHFMin");
2529  ratioHFMax_ = iConfig.getParameter<double>("ratioHFMax");
2530  ratioHOMin_ = iConfig.getParameter<double>("ratioHOMin");
2531  ratioHOMax_ = iConfig.getParameter<double>("ratioHOMax");
2532  flagtodefinebadchannel_ = iConfig.getParameter<int>("flagtodefinebadchannel");
2533  howmanybinsonplots_ = iConfig.getParameter<int>("howmanybinsonplots");
2534  splashesUpperLimit_ = iConfig.getParameter<int>("splashesUpperLimit");
2535  flagtoaskrunsorls_ = iConfig.getParameter<int>("flagtoaskrunsorls");
2536  flagestimatornormalization_ = iConfig.getParameter<int>("flagestimatornormalization");
2537  flagcpuoptimization_ = iConfig.getParameter<int>("flagcpuoptimization");
2538  flagupgradeqie1011_ = iConfig.getParameter<int>("flagupgradeqie1011");
2539  flagsipmcorrection_ = iConfig.getParameter<int>("flagsipmcorrection");
2540  flaguseshunt_ = iConfig.getParameter<int>("flaguseshunt");
2541  lsdep_cut1_peak_HBdepth1_ = iConfig.getParameter<int>("lsdep_cut1_peak_HBdepth1");
2542  lsdep_cut1_peak_HBdepth2_ = iConfig.getParameter<int>("lsdep_cut1_peak_HBdepth2");
2543  lsdep_cut1_peak_HEdepth1_ = iConfig.getParameter<int>("lsdep_cut1_peak_HEdepth1");
2544  lsdep_cut1_peak_HEdepth2_ = iConfig.getParameter<int>("lsdep_cut1_peak_HEdepth2");
2545  lsdep_cut1_peak_HEdepth3_ = iConfig.getParameter<int>("lsdep_cut1_peak_HEdepth3");
2546  lsdep_cut1_peak_HFdepth1_ = iConfig.getParameter<int>("lsdep_cut1_peak_HFdepth1");
2547  lsdep_cut1_peak_HFdepth2_ = iConfig.getParameter<int>("lsdep_cut1_peak_HFdepth2");
2548  lsdep_cut1_peak_HOdepth4_ = iConfig.getParameter<int>("lsdep_cut1_peak_HOdepth4");
2549  lsdep_cut3_max_HBdepth1_ = iConfig.getParameter<int>("lsdep_cut3_max_HBdepth1");
2550  lsdep_cut3_max_HBdepth2_ = iConfig.getParameter<int>("lsdep_cut3_max_HBdepth2");
2551  lsdep_cut3_max_HEdepth1_ = iConfig.getParameter<int>("lsdep_cut3_max_HEdepth1");
2552  lsdep_cut3_max_HEdepth2_ = iConfig.getParameter<int>("lsdep_cut3_max_HEdepth2");
2553  lsdep_cut3_max_HEdepth3_ = iConfig.getParameter<int>("lsdep_cut3_max_HEdepth3");
2554  lsdep_cut3_max_HFdepth1_ = iConfig.getParameter<int>("lsdep_cut3_max_HFdepth1");
2555  lsdep_cut3_max_HFdepth2_ = iConfig.getParameter<int>("lsdep_cut3_max_HFdepth2");
2556  lsdep_cut3_max_HOdepth4_ = iConfig.getParameter<int>("lsdep_cut3_max_HOdepth4");
2557  lsdep_estimator1_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth1");
2558  lsdep_estimator1_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth2");
2559  lsdep_estimator1_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth1");
2560  lsdep_estimator1_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth2");
2561  lsdep_estimator1_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth3");
2562  lsdep_estimator1_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth1");
2563  lsdep_estimator1_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth2");
2564  lsdep_estimator1_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HOdepth4");
2565  lsdep_estimator1_HEdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth4");
2566  lsdep_estimator1_HEdepth5_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth5");
2567  lsdep_estimator1_HEdepth6_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth6");
2568  lsdep_estimator1_HEdepth7_ = iConfig.getParameter<double>("lsdep_estimator1_HEdepth7");
2569  lsdep_estimator1_HFdepth3_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth3");
2570  lsdep_estimator1_HFdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HFdepth4");
2571  lsdep_estimator1_HBdepth3_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth3");
2572  lsdep_estimator1_HBdepth4_ = iConfig.getParameter<double>("lsdep_estimator1_HBdepth4");
2573  lsdep_estimator2_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator2_HBdepth1");
2574  lsdep_estimator2_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator2_HBdepth2");
2575  lsdep_estimator2_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator2_HEdepth1");
2576  lsdep_estimator2_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator2_HEdepth2");
2577  lsdep_estimator2_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator2_HEdepth3");
2578  lsdep_estimator2_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator2_HFdepth1");
2579  lsdep_estimator2_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator2_HFdepth2");
2580  lsdep_estimator2_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator2_HOdepth4");
2581  lsdep_estimator3_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator3_HBdepth1");
2582  lsdep_estimator3_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator3_HBdepth2");
2583  lsdep_estimator3_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator3_HEdepth1");
2584  lsdep_estimator3_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator3_HEdepth2");
2585  lsdep_estimator3_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator3_HEdepth3");
2586  lsdep_estimator3_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator3_HFdepth1");
2587  lsdep_estimator3_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator3_HFdepth2");
2588  lsdep_estimator3_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator3_HOdepth4");
2589  lsdep_estimator4_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator4_HBdepth1");
2590  lsdep_estimator4_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator4_HBdepth2");
2591  lsdep_estimator4_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator4_HEdepth1");
2592  lsdep_estimator4_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator4_HEdepth2");
2593  lsdep_estimator4_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator4_HEdepth3");
2594  lsdep_estimator4_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator4_HFdepth1");
2595  lsdep_estimator4_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator4_HFdepth2");
2596  lsdep_estimator4_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator4_HOdepth4");
2597  lsdep_estimator5_HBdepth1_ = iConfig.getParameter<double>("lsdep_estimator5_HBdepth1");
2598  lsdep_estimator5_HBdepth2_ = iConfig.getParameter<double>("lsdep_estimator5_HBdepth2");
2599  lsdep_estimator5_HEdepth1_ = iConfig.getParameter<double>("lsdep_estimator5_HEdepth1");
2600  lsdep_estimator5_HEdepth2_ = iConfig.getParameter<double>("lsdep_estimator5_HEdepth2");
2601  lsdep_estimator5_HEdepth3_ = iConfig.getParameter<double>("lsdep_estimator5_HEdepth3");
2602  lsdep_estimator5_HFdepth1_ = iConfig.getParameter<double>("lsdep_estimator5_HFdepth1");
2603  lsdep_estimator5_HFdepth2_ = iConfig.getParameter<double>("lsdep_estimator5_HFdepth2");
2604  lsdep_estimator5_HOdepth4_ = iConfig.getParameter<double>("lsdep_estimator5_HOdepth4");
2605  forallestimators_amplitude_bigger_ = iConfig.getParameter<double>("forallestimators_amplitude_bigger");
2606  rmsHBMin_ = iConfig.getParameter<double>("rmsHBMin");
2607  rmsHBMax_ = iConfig.getParameter<double>("rmsHBMax");
2608  rmsHEMin_ = iConfig.getParameter<double>("rmsHEMin");
2609  rmsHEMax_ = iConfig.getParameter<double>("rmsHEMax");
2610  rmsHFMin_ = iConfig.getParameter<double>("rmsHFMin");
2611  rmsHFMax_ = iConfig.getParameter<double>("rmsHFMax");
2612  rmsHOMin_ = iConfig.getParameter<double>("rmsHOMin");
2613  rmsHOMax_ = iConfig.getParameter<double>("rmsHOMax");
2614  ADCAmplHBMin_ = iConfig.getParameter<double>("ADCAmplHBMin");
2615  ADCAmplHEMin_ = iConfig.getParameter<double>("ADCAmplHEMin");
2616  ADCAmplHOMin_ = iConfig.getParameter<double>("ADCAmplHOMin");
2617  ADCAmplHFMin_ = iConfig.getParameter<double>("ADCAmplHFMin");
2618  ADCAmplHBMax_ = iConfig.getParameter<double>("ADCAmplHBMax");
2619  ADCAmplHEMax_ = iConfig.getParameter<double>("ADCAmplHEMax");
2620  ADCAmplHOMax_ = iConfig.getParameter<double>("ADCAmplHOMax");
2621  ADCAmplHFMax_ = iConfig.getParameter<double>("ADCAmplHFMax");
2622  pedestalwHBMax_ = iConfig.getParameter<double>("pedestalwHBMax");
2623  pedestalwHEMax_ = iConfig.getParameter<double>("pedestalwHEMax");
2624  pedestalwHFMax_ = iConfig.getParameter<double>("pedestalwHFMax");
2625  pedestalwHOMax_ = iConfig.getParameter<double>("pedestalwHOMax");
2626  pedestalHBMax_ = iConfig.getParameter<double>("pedestalHBMax");
2627  pedestalHEMax_ = iConfig.getParameter<double>("pedestalHEMax");
2628  pedestalHFMax_ = iConfig.getParameter<double>("pedestalHFMax");
2629  pedestalHOMax_ = iConfig.getParameter<double>("pedestalHOMax");
2630  calibrADCHBMin_ = iConfig.getParameter<double>("calibrADCHBMin");
2631  calibrADCHEMin_ = iConfig.getParameter<double>("calibrADCHEMin");
2632  calibrADCHOMin_ = iConfig.getParameter<double>("calibrADCHOMin");
2633  calibrADCHFMin_ = iConfig.getParameter<double>("calibrADCHFMin");
2634  calibrADCHBMax_ = iConfig.getParameter<double>("calibrADCHBMax");
2635  calibrADCHEMax_ = iConfig.getParameter<double>("calibrADCHEMax");
2636  calibrADCHOMax_ = iConfig.getParameter<double>("calibrADCHOMax");
2637  calibrADCHFMax_ = iConfig.getParameter<double>("calibrADCHFMax");
2638  calibrRatioHBMin_ = iConfig.getParameter<double>("calibrRatioHBMin");
2639  calibrRatioHEMin_ = iConfig.getParameter<double>("calibrRatioHEMin");
2640  calibrRatioHOMin_ = iConfig.getParameter<double>("calibrRatioHOMin");
2641  calibrRatioHFMin_ = iConfig.getParameter<double>("calibrRatioHFMin");
2642  calibrRatioHBMax_ = iConfig.getParameter<double>("calibrRatioHBMax");
2643  calibrRatioHEMax_ = iConfig.getParameter<double>("calibrRatioHEMax");
2644  calibrRatioHOMax_ = iConfig.getParameter<double>("calibrRatioHOMax");
2645  calibrRatioHFMax_ = iConfig.getParameter<double>("calibrRatioHFMax");
2646  calibrTSmaxHBMin_ = iConfig.getParameter<double>("calibrTSmaxHBMin");
2647  calibrTSmaxHEMin_ = iConfig.getParameter<double>("calibrTSmaxHEMin");
2648  calibrTSmaxHOMin_ = iConfig.getParameter<double>("calibrTSmaxHOMin");
2649  calibrTSmaxHFMin_ = iConfig.getParameter<double>("calibrTSmaxHFMin");
2650  calibrTSmaxHBMax_ = iConfig.getParameter<double>("calibrTSmaxHBMax");
2651  calibrTSmaxHEMax_ = iConfig.getParameter<double>("calibrTSmaxHEMax");
2652  calibrTSmaxHOMax_ = iConfig.getParameter<double>("calibrTSmaxHOMax");
2653  calibrTSmaxHFMax_ = iConfig.getParameter<double>("calibrTSmaxHFMax");
2654  calibrTSmeanHBMin_ = iConfig.getParameter<double>("calibrTSmeanHBMin");
2655  calibrTSmeanHEMin_ = iConfig.getParameter<double>("calibrTSmeanHEMin");
2656  calibrTSmeanHOMin_ = iConfig.getParameter<double>("calibrTSmeanHOMin");
2657  calibrTSmeanHFMin_ = iConfig.getParameter<double>("calibrTSmeanHFMin");
2658  calibrTSmeanHBMax_ = iConfig.getParameter<double>("calibrTSmeanHBMax");
2659  calibrTSmeanHEMax_ = iConfig.getParameter<double>("calibrTSmeanHEMax");
2660  calibrTSmeanHOMax_ = iConfig.getParameter<double>("calibrTSmeanHOMax");
2661  calibrTSmeanHFMax_ = iConfig.getParameter<double>("calibrTSmeanHFMax");
2662  calibrWidthHBMin_ = iConfig.getParameter<double>("calibrWidthHBMin");
2663  calibrWidthHEMin_ = iConfig.getParameter<double>("calibrWidthHEMin");
2664  calibrWidthHOMin_ = iConfig.getParameter<double>("calibrWidthHOMin");
2665  calibrWidthHFMin_ = iConfig.getParameter<double>("calibrWidthHFMin");
2666  calibrWidthHBMax_ = iConfig.getParameter<double>("calibrWidthHBMax");
2667  calibrWidthHEMax_ = iConfig.getParameter<double>("calibrWidthHEMax");
2668  calibrWidthHOMax_ = iConfig.getParameter<double>("calibrWidthHOMax");
2669  calibrWidthHFMax_ = iConfig.getParameter<double>("calibrWidthHFMax");
2670  TSpeakHBMin_ = iConfig.getParameter<double>("TSpeakHBMin");
2671  TSpeakHBMax_ = iConfig.getParameter<double>("TSpeakHBMax");
2672  TSpeakHEMin_ = iConfig.getParameter<double>("TSpeakHEMin");
2673  TSpeakHEMax_ = iConfig.getParameter<double>("TSpeakHEMax");
2674  TSpeakHFMin_ = iConfig.getParameter<double>("TSpeakHFMin");
2675  TSpeakHFMax_ = iConfig.getParameter<double>("TSpeakHFMax");
2676  TSpeakHOMin_ = iConfig.getParameter<double>("TSpeakHOMin");
2677  TSpeakHOMax_ = iConfig.getParameter<double>("TSpeakHOMax");
2678  TSmeanHBMin_ = iConfig.getParameter<double>("TSmeanHBMin");
2679  TSmeanHBMax_ = iConfig.getParameter<double>("TSmeanHBMax");
2680  TSmeanHEMin_ = iConfig.getParameter<double>("TSmeanHEMin");
2681  TSmeanHEMax_ = iConfig.getParameter<double>("TSmeanHEMax");
2682  TSmeanHFMin_ = iConfig.getParameter<double>("TSmeanHFMin");
2683  TSmeanHFMax_ = iConfig.getParameter<double>("TSmeanHFMax");
2684  TSmeanHOMin_ = iConfig.getParameter<double>("TSmeanHOMin");
2685  TSmeanHOMax_ = iConfig.getParameter<double>("TSmeanHOMax");
2686  lsmin_ = iConfig.getParameter<int>("lsmin");
2687  lsmax_ = iConfig.getParameter<int>("lsmax");
2688  alsmin = lsmin_;
2689  blsmax = lsmax_;
2690  nlsminmax = lsmax_ - lsmin_ + 1;
2691  numOfLaserEv = 0;
2692  local_event = 0;
2693  numOfTS = 10;
2694  run0 = -1;
2695  runcounter = 0;
2696  eventcounter = 0;
2697  lumi = 0;
2698  ls0 = -1;
2699  lscounter = 0;
2700  lscounterM1 = 0;
2701  lscounter10 = 0;
2702  nevcounter = 0;
2703  lscounterrun = 0;
2704  lscounterrun10 = 0;
2705  nevcounter0 = 0;
2706  nevcounter00 = 0;
2707  for (int k0 = 0; k0 < nsub; k0++) {
2708  for (int k1 = 0; k1 < ndepth; k1++) {
2709  for (int k2 = 0; k2 < neta; k2++) {
2710  if (k0 == 1) {
2711  mapRADDAM_HED2[k1][k2] = 0.;
2712  mapRADDAM_HED20[k1][k2] = 0.;
2713  }
2714  for (int k3 = 0; k3 < nphi; k3++) {
2715  sumEstimator0[k0][k1][k2][k3] = 0.;
2716  sumEstimator1[k0][k1][k2][k3] = 0.;
2717  sumEstimator2[k0][k1][k2][k3] = 0.;
2718  sumEstimator3[k0][k1][k2][k3] = 0.;
2719  sumEstimator4[k0][k1][k2][k3] = 0.;
2720  sumEstimator5[k0][k1][k2][k3] = 0.;
2721  sumEstimator6[k0][k1][k2][k3] = 0.;
2722  sum0Estimator[k0][k1][k2][k3] = 0.;
2723  if (k0 == 1) {
2724  mapRADDAM_HE[k1][k2][k3] = 0.;
2725  mapRADDAM0_HE[k1][k2][k3] = 0;
2726  }
2727  }
2728  }
2729  }
2730  }
2747  maxxSUM1 = 0.;
2748  maxxSUM2 = 0.;
2749  maxxSUM3 = 0.;
2750  maxxSUM4 = 0.;
2751  maxxOCCUP1 = 0.;
2752  maxxOCCUP2 = 0.;
2753  maxxOCCUP3 = 0.;
2754  maxxOCCUP4 = 0.;
2755  testmetka = 0;
2756 }
2759  conditions = &iSetup.getData(tokDB_);
2760  topo = &iSetup.getData(tokTopo_);
2761  if (MAPcreation > 0) {
2762  if (flagupgradeqie1011_ == 1)
2763  fillMAP();
2764  MAPcreation = 0;
2765  }
2766  nevent++;
2767  nevent50 = nevent / 50;
2768  Run = iEvent.id().run();
2769  Nevent = iEvent.id().event(); // event number = global_event
2770  lumi = iEvent.luminosityBlock(); // lumi section
2771  bcn = iEvent.bunchCrossing();
2772  orbitNum = iEvent.orbitNumber();
2773  int outabortgap = 1;
2774  if (bcn >= bcnrejectedlow_ && bcn <= bcnrejectedhigh_)
2775  outabortgap = 0; // if(bcn>=3446 && bcn<=3564)
2776 
2777  if ((flagabortgaprejected_ == 1 && outabortgap == 1) || (flagabortgaprejected_ == 0 && outabortgap == 0) ||
2778  flagabortgaprejected_ == 2) {
2779  if (run0 != Run) {
2780  ++runcounter;
2781  if (runcounter != 1) {
2783  std::cout << " --------------------------------------- " << std::endl;
2784  std::cout << " for Run = " << run0 << " with runcounter = " << runcounter - 1 << " #ev = " << eventcounter
2785  << std::endl;
2786  std::cout << " #LS = " << lscounterrun << " #LS10 = " << lscounterrun10 << " Last LS = " << ls0 << std::endl;
2787  std::cout << " --------------------------------------------- " << std::endl;
2788  h_nls_per_run->Fill(float(lscounterrun));
2789  h_nls_per_run10->Fill(float(lscounterrun10));
2790  lscounterrun = 0;
2791  lscounterrun10 = 0;
2792  } // runcounter > 1
2793  std::cout << " ---------***********************------------- " << std::endl;
2794  std::cout << " New Run = " << Run << " runcounter = " << runcounter << std::endl;
2795  std::cout << " ------- " << std::endl;
2796  run0 = Run;
2797  eventcounter = 0;
2798  ls0 = -1;
2799  } // new run
2800  else {
2801  nevcounter00 = 0;
2802  } //else new run
2803  ++eventcounter;
2804  if (ls0 != lumi) {
2805  if (ls0 != -1) {
2806  h_nevents_per_eachLS->Fill(float(lscounter), float(nevcounter)); //
2808  } // ls0>-1
2809  lscounter++;
2810  lscounterrun++;
2812  lscounterM1 = lscounter - 1;
2813  } else {
2814  lscounterM1 = ls0;
2815  }
2816  if (ls0 != -1)
2817  h_nevents_per_eachRealLS->Fill(float(lscounterM1), float(nevcounter)); //
2818  h_lsnumber_per_eachLS->Fill(float(lscounter), float(lumi));
2819  if (nevcounter > 10.) {
2820  ++lscounter10;
2821  ++lscounterrun10;
2822  }
2823  h_nevents_per_LS->Fill(float(nevcounter));
2824  h_nevents_per_LSzoom->Fill(float(nevcounter));
2825  nevcounter = 0;
2826  ls0 = lumi;
2827  } // new lumi
2828  else {
2829  nevcounter0 = 0;
2830  } //else new lumi
2831  ++nevcounter; // #ev in LS
2833  if (flagtoaskrunsorls_ == 0) {
2836  }
2837  if (nevcounter0 != 0 || nevcounter > 99999) {
2838  if (nevcounter > 99999)
2839  nevcounter0 = 1;
2843  unsigned long int pcountall1 = 0;
2844  unsigned long int pcountall3 = 0;
2845  unsigned long int pcountall6 = 0;
2846  unsigned long int pcountall8 = 0;
2847  int pcountmin1 = 0;
2848  int pcountmin3 = 0;
2849  int pcountmin6 = 0;
2850  int pcountmin8 = 0;
2851  unsigned long int mcountall1 = 0;
2852  unsigned long int mcountall3 = 0;
2853  unsigned long int mcountall6 = 0;
2854  unsigned long int mcountall8 = 0;
2855  int mcountmin1 = 0;
2856  int mcountmin3 = 0;
2857  int mcountmin6 = 0;
2858  int mcountmin8 = 0;
2859  int pnnmin1 = 999999999;
2860  int pnnmin3 = 999999999;
2861  int pnnmin6 = 999999999;
2862  int pnnmin8 = 999999999;
2863  int mnnbins1 = 0;
2864  int mnnbins3 = 0;
2865  int mnnbins6 = 0;
2866  int mnnbins8 = 0;
2867  int mnnmin1 = 999999999;
2868  int mnnmin3 = 999999999;
2869  int mnnmin6 = 999999999;
2870  int mnnmin8 = 999999999;
2871  for (int k0 = 0; k0 < nsub; k0++) {
2872  for (int k1 = 0; k1 < ndepth; k1++) {
2873  for (int k3 = 0; k3 < nphi; k3++) {
2874  for (int k2 = 0; k2 < neta; k2++) {
2875  int ieta = k2 - 41;
2876  // ------------------------------------------------------------sumEstimator0
2877  if (sumEstimator0[k0][k1][k2][k3] != 0.) {
2878  // fill histoes:
2879  double bbbc = 0.;
2880  if (flagestimatornormalization_ == 0)
2881  bbbc = sumEstimator0[k0][k1][k2][k3] / nevcounter0;
2882  if (flagestimatornormalization_ == 1)
2883  bbbc = sumEstimator0[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
2884  double bbb1 = 1.;
2885  if (flagestimatornormalization_ == 2) {
2886  bbbc = sumEstimator0[k0][k1][k2][k3];
2887  bbb1 = sum0Estimator[k0][k1][k2][k3];
2888  }
2889 
2890  // HB:
2891  if (k0 == 0) {
2892  // HBdepth1
2893  if (k1 + 1 == 1) {
2894  h_sumPedestalLS1->Fill(bbbc / bbb1);
2895  h_2DsumPedestalLS1->Fill(double(ieta), double(k3), bbbc);
2896  h_2D0sumPedestalLS1->Fill(double(ieta), double(k3), bbb1);
2897  h_sumPedestalperLS1->Fill(float(lscounterM1), bbbc);
2898  h_sum0PedestalperLS1->Fill(float(lscounterM1), bbb1);
2899  }
2900  if (k1 + 1 == 2) {
2901  h_sumPedestalLS2->Fill(bbbc / bbb1);
2902  h_2DsumPedestalLS2->Fill(double(ieta), double(k3), bbbc);
2903  h_2D0sumPedestalLS2->Fill(double(ieta), double(k3), bbb1);
2904  h_sumPedestalperLS2->Fill(float(lscounterM1), bbbc);
2905  h_sum0PedestalperLS2->Fill(float(lscounterM1), bbb1);
2906  }
2907  }
2908  // HE:
2909  if (k0 == 1) {
2910  // HEdepth1
2911  if (k1 + 1 == 1) {
2912  h_sumPedestalLS3->Fill(bbbc / bbb1);
2913  h_2DsumPedestalLS3->Fill(double(ieta), double(k3), bbbc);
2914  h_2D0sumPedestalLS3->Fill(double(ieta), double(k3), bbb1);
2915  h_sumPedestalperLS3->Fill(float(lscounterM1), bbbc);
2916  h_sum0PedestalperLS3->Fill(float(lscounterM1), bbb1);
2917  }
2918  if (k1 + 1 == 2) {
2919  h_sumPedestalLS4->Fill(bbbc / bbb1);
2920  h_2DsumPedestalLS4->Fill(double(ieta), double(k3), bbbc);
2921  h_2D0sumPedestalLS4->Fill(double(ieta), double(k3), bbb1);
2922  h_sumPedestalperLS4->Fill(float(lscounterM1), bbbc);
2923  h_sum0PedestalperLS4->Fill(float(lscounterM1), bbb1);
2924  }
2925  if (k1 + 1 == 3) {
2926  h_sumPedestalLS5->Fill(bbbc / bbb1);
2927  h_2DsumPedestalLS5->Fill(double(ieta), double(k3), bbbc);
2928  h_2D0sumPedestalLS5->Fill(double(ieta), double(k3), bbb1);
2929  h_sumPedestalperLS5->Fill(float(lscounterM1), bbbc);
2930  h_sum0PedestalperLS5->Fill(float(lscounterM1), bbb1);
2931  }
2932  }
2933  // HF:
2934  if (k0 == 3) {
2935  // HFdepth1
2936  if (k1 + 1 == 1) {
2937  h_sumPedestalLS6->Fill(bbbc / bbb1);
2938  h_2DsumPedestalLS6->Fill(double(ieta), double(k3), bbbc);
2939  h_2D0sumPedestalLS6->Fill(double(ieta), double(k3), bbb1);
2940  h_sumPedestalperLS6->Fill(float(lscounterM1), bbbc);
2941  h_sum0PedestalperLS6->Fill(float(lscounterM1), bbb1);
2942  }
2943  if (k1 + 1 == 2) {
2944  h_sumPedestalLS7->Fill(bbbc / bbb1);
2945  h_2DsumPedestalLS7->Fill(double(ieta), double(k3), bbbc);
2946  h_2D0sumPedestalLS7->Fill(double(ieta), double(k3), bbb1);
2947  h_sumPedestalperLS7->Fill(float(lscounterM1), bbbc);
2948  h_sum0PedestalperLS7->Fill(float(lscounterM1), bbb1);
2949  }
2950  }
2951  // HO:
2952  if (k0 == 2) {
2953  // HOdepth4
2954  if (k1 + 1 == 4) {
2955  h_sumPedestalLS8->Fill(bbbc / bbb1);
2956  h_2DsumPedestalLS8->Fill(double(ieta), double(k3), bbbc);
2957  h_2D0sumPedestalLS8->Fill(double(ieta), double(k3), bbb1);
2958  h_sumPedestalperLS8->Fill(float(lscounterM1), bbbc);
2959  h_sum0PedestalperLS8->Fill(float(lscounterM1), bbb1);
2960  }
2961  }
2962  } //if(sumEstimator0[k0][k1][k2][k3] != 0.
2963 
2964  // ------------------------------------------------------------------------------------- sumEstimator1
2965  if (sumEstimator1[k0][k1][k2][k3] != 0.) {
2966  // fill histoes:
2967  double bbbc = 0.;
2968  if (flagestimatornormalization_ == 0)
2969  bbbc = sumEstimator1[k0][k1][k2][k3] / nevcounter0;
2970  if (flagestimatornormalization_ == 1)
2971  bbbc = sumEstimator1[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
2972  double bbb1 = 1.;
2973  if (flagestimatornormalization_ == 2) {
2974  bbbc = sumEstimator1[k0][k1][k2][k3];
2975  bbb1 = sum0Estimator[k0][k1][k2][k3];
2976  }
2977  //flag for ask type of Normalization for CMT estimators:
2978  //=0-normalizationOn#evOfLS; =1-averagedMeanChannelVariable; =2-averageVariable-normalizationOn#entriesInLS;
2979  //flagestimatornormalization = cms.int32(2), !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2980  // zhokin 18.10.2018 STUDY: CALL HFF2 (ID,NID,X,Y,W)
2981  if (lscounterM1 >= lsmin_ && lscounterM1 < lsmax_) {
2982  // INDEXIES:
2983  int kkkk2 = (k2 - 1) / 4;
2984  if (k2 == 0)
2985  kkkk2 = 1.;
2986  else
2987  kkkk2 += 2; //kkkk2= 1-22
2988  int kkkk3 = (k3) / 4 + 1; //kkkk3= 1-18
2989  // PACKING
2990  //kkkk2= 1-22 ;kkkk3= 1-18
2991  int ietaphi = 0;
2992  ietaphi = ((kkkk2)-1) * znphi + (kkkk3);
2993  // Outout is ietaphi = 1 - 396 ( # =396; in histo,booking is: 1 - 397 )
2994 
2995  double bbb3 = 0.;
2996  if (bbb1 != 0.)
2997  bbb3 = bbbc / bbb1;
2998  // very very wrong if below:
2999  // if(bbb3 != 0.) {
3000 
3001  if (k0 == 0) {
3002  h_2DsumADCAmplEtaPhiLs0->Fill(float(lscounterM1), float(ietaphi), bbbc); //HB
3003  h_2DsumADCAmplEtaPhiLs00->Fill(float(lscounterM1), float(ietaphi), bbb1); //HB
3004  }
3005  if (k0 == 1) {
3006  h_2DsumADCAmplEtaPhiLs1->Fill(float(lscounterM1), float(ietaphi), bbbc); //HE
3007  h_2DsumADCAmplEtaPhiLs10->Fill(float(lscounterM1), float(ietaphi), bbb1); //HE
3008  }
3009  if (k0 == 2) {
3010  h_2DsumADCAmplEtaPhiLs2->Fill(float(lscounterM1), float(ietaphi), bbbc); //HO
3011  h_2DsumADCAmplEtaPhiLs20->Fill(float(lscounterM1), float(ietaphi), bbb1); //HO
3012  }
3013  if (k0 == 3) {
3014  h_2DsumADCAmplEtaPhiLs3->Fill(float(lscounterM1), float(ietaphi), bbbc); //HF
3015  h_2DsumADCAmplEtaPhiLs30->Fill(float(lscounterM1), float(ietaphi), bbb1); //HF
3016  }
3017 
3018  h_sumADCAmplEtaPhiLs->Fill(bbb3);
3019  h_sumADCAmplEtaPhiLs_bbbc->Fill(bbbc);
3020  h_sumADCAmplEtaPhiLs_bbb1->Fill(bbb1);
3022  h_sumADCAmplEtaPhiLs_orbitNum->Fill(float(orbitNum), 1.);
3024  h_sumADCAmplEtaPhiLs_ietaphi->Fill(float(ietaphi));
3025 
3026  // }// bb3
3027  } // lscounterM1 >= lsmin_ && lscounterM1 < lsmax_
3028 
3029  // HB:
3030  if (k0 == 0) {
3031  // HBdepth1
3032  if (k1 + 1 == 1) {
3033  h_sumADCAmplLS1copy1->Fill(bbbc / bbb1);
3034  h_sumADCAmplLS1copy2->Fill(bbbc / bbb1);
3035  h_sumADCAmplLS1copy3->Fill(bbbc / bbb1);
3036  h_sumADCAmplLS1copy4->Fill(bbbc / bbb1);
3037  h_sumADCAmplLS1copy5->Fill(bbbc / bbb1);
3038  h_sumADCAmplLS1->Fill(bbbc / bbb1);
3039  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
3040  h_2DsumADCAmplLS1->Fill(double(ieta), double(k3), bbbc);
3041  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth1_)
3042  h_2DsumADCAmplLS1_LSselected->Fill(double(ieta), double(k3), bbbc);
3043 
3044  h_2D0sumADCAmplLS1->Fill(double(ieta), double(k3), bbb1);
3045 
3046  h_sumADCAmplperLS1->Fill(float(lscounterM1), bbbc);
3047  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
3048  h_sumCutADCAmplperLS1->Fill(float(lscounterM1), bbbc);
3049  h_sum0ADCAmplperLS1->Fill(float(lscounterM1), bbb1);
3050 
3051  if (ieta > 0) {
3052  if (k3 < 36) {
3053  h_sumADCAmplperLS1_P1->Fill(float(lscounterM1), bbbc);
3054  h_sum0ADCAmplperLS1_P1->Fill(float(lscounterM1), bbb1);
3055  } else {
3056  h_sumADCAmplperLS1_P2->Fill(float(lscounterM1), bbbc);
3057  h_sum0ADCAmplperLS1_P2->Fill(float(lscounterM1), bbb1);
3058  }
3060  if (bbbc / bbb1 > 25.) {
3061  pcountall1 += bbb1;
3062  pcountmin1 += bbb1;
3063  }
3065 
3066  } else {
3067  if (k3 < 36) {
3068  h_sumADCAmplperLS1_M1->Fill(float(lscounterM1), bbbc);
3069  h_sum0ADCAmplperLS1_M1->Fill(float(lscounterM1), bbb1);
3070  } else {
3071  h_sumADCAmplperLS1_M2->Fill(float(lscounterM1), bbbc);
3072  h_sum0ADCAmplperLS1_M2->Fill(float(lscounterM1), bbb1);
3073  }
3075  if (bbbc / bbb1 > 25.) {
3076  mcountall1 += bbb1;
3077  mcountmin1 += bbb1;
3078  }
3080  }
3081  }
3082  // HBdepth2
3083  if (k1 + 1 == 2) {
3084  h_sumADCAmplLS2->Fill(bbbc / bbb1);
3085  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
3086  h_2DsumADCAmplLS2->Fill(double(ieta), double(k3), bbbc);
3087  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth2_)
3088  h_2DsumADCAmplLS2_LSselected->Fill(double(ieta), double(k3), bbbc);
3089  h_2D0sumADCAmplLS2->Fill(double(ieta), double(k3), bbb1);
3090  h_sumADCAmplperLS2->Fill(float(lscounterM1), bbbc);
3091  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
3092  h_sumCutADCAmplperLS2->Fill(float(lscounterM1), bbbc);
3093  h_sum0ADCAmplperLS2->Fill(float(lscounterM1), bbb1);
3094  if (ieta > 0) {
3095  if (k3 < 36) {
3096  h_sumADCAmplperLS1_P1->Fill(float(lscounterM1), bbbc);
3097  h_sum0ADCAmplperLS1_P1->Fill(float(lscounterM1), bbb1);
3098  } else {
3099  h_sumADCAmplperLS1_P2->Fill(float(lscounterM1), bbbc);
3100  h_sum0ADCAmplperLS1_P2->Fill(float(lscounterM1), bbb1);
3101  }
3102  } else {
3103  if (k3 < 36) {
3104  h_sumADCAmplperLS1_M1->Fill(float(lscounterM1), bbbc);
3105  h_sum0ADCAmplperLS1_M1->Fill(float(lscounterM1), bbb1);
3106  } else {
3107  h_sumADCAmplperLS1_M2->Fill(float(lscounterM1), bbbc);
3108  h_sum0ADCAmplperLS1_M2->Fill(float(lscounterM1), bbb1);
3109  }
3110  }
3111  }
3112  // HBdepth3 upgrade
3113  if (k1 + 1 == 3) {
3114  h_sumADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
3115  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
3116  h_sumCutADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
3117  h_sum0ADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbb1);
3118 
3119  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
3120  h_2DsumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbbc);
3121  h_2D0sumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbb1);
3122  } //if(k1+1 ==3)
3123 
3124  // HBdepth4 upgrade
3125  if (k1 + 1 == 4) {
3126  h_sumADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
3127  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
3128  h_sumCutADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
3129  h_sum0ADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbb1);
3130 
3131  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
3132  h_2DsumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbbc);
3133  h_2D0sumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbb1);
3134  } //if(k1+1 ==4)
3135  }
3136 
3137  // HE:
3138  if (k0 == 1) {
3139  // HEdepth1
3140  if (k1 + 1 == 1) {
3141  h_sumADCAmplLS3->Fill(bbbc / bbb1);
3142  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
3143  h_2DsumADCAmplLS3->Fill(double(ieta), double(k3), bbbc);
3144  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth1_)
3145  h_2DsumADCAmplLS3_LSselected->Fill(double(ieta), double(k3), bbbc);
3146  h_2D0sumADCAmplLS3->Fill(double(ieta), double(k3), bbb1);
3147  h_sumADCAmplperLS3->Fill(float(lscounterM1), bbbc);
3148  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
3149  h_sumCutADCAmplperLS3->Fill(float(lscounterM1), bbbc);
3150  h_sum0ADCAmplperLS3->Fill(float(lscounterM1), bbb1);
3151  if (ieta > 0) {
3152  if (k3 < 36) {
3153  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3154  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3155  } else {
3156  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3157  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3158  }
3160  if (bbbc / bbb1 > 15. && k3 % 2 == 0) {
3161  pcountall3 += bbb1;
3162  pcountmin3 += bbb1;
3163  }
3165  } else {
3166  if (k3 < 36) {
3167  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3168  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3169  } else {
3170  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3171  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3172  }
3174  if (bbbc / bbb1 > 15. && k3 % 2 == 0) {
3175  mcountall3 += bbb1;
3176  mcountmin3 += bbb1;
3177  }
3179  }
3180  }
3181  // HEdepth2
3182  if (k1 + 1 == 2) {
3183  h_sumADCAmplLS4->Fill(bbbc / bbb1);
3184  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
3185  h_2DsumADCAmplLS4->Fill(double(ieta), double(k3), bbbc);
3186  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth2_)
3187  h_2DsumADCAmplLS4_LSselected->Fill(double(ieta), double(k3), bbbc);
3188  h_2D0sumADCAmplLS4->Fill(double(ieta), double(k3), bbb1);
3189  h_sumADCAmplperLS4->Fill(float(lscounterM1), bbbc);
3190  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
3191  h_sumCutADCAmplperLS4->Fill(float(lscounterM1), bbbc);
3192  h_sum0ADCAmplperLS4->Fill(float(lscounterM1), bbb1);
3193  if (ieta > 0) {
3194  if (k3 < 36) {
3195  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3196  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3197  } else {
3198  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3199  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3200  }
3201  } else {
3202  if (k3 < 36) {
3203  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3204  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3205  } else {
3206  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3207  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3208  }
3209  }
3210  }
3211  // HEdepth3
3212  if (k1 + 1 == 3) {
3213  h_sumADCAmplLS5->Fill(bbbc / bbb1);
3214  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
3215  h_2DsumADCAmplLS5->Fill(double(ieta), double(k3), bbbc);
3216  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth3_)
3217  h_2DsumADCAmplLS5_LSselected->Fill(double(ieta), double(k3), bbbc);
3218  h_2D0sumADCAmplLS5->Fill(double(ieta), double(k3), bbb1);
3219  h_sumADCAmplperLS5->Fill(float(lscounterM1), bbbc);
3220  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
3221  h_sumCutADCAmplperLS5->Fill(float(lscounterM1), bbbc);
3222  h_sum0ADCAmplperLS5->Fill(float(lscounterM1), bbb1);
3223  if (ieta > 0) {
3224  if (k3 < 36) {
3225  h_sumADCAmplperLS3_P1->Fill(float(lscounterM1), bbbc);
3226  h_sum0ADCAmplperLS3_P1->Fill(float(lscounterM1), bbb1);
3227  } else {
3228  h_sumADCAmplperLS3_P2->Fill(float(lscounterM1), bbbc);
3229  h_sum0ADCAmplperLS3_P2->Fill(float(lscounterM1), bbb1);
3230  }
3231  } else {
3232  if (k3 < 36) {
3233  h_sumADCAmplperLS3_M1->Fill(float(lscounterM1), bbbc);
3234  h_sum0ADCAmplperLS3_M1->Fill(float(lscounterM1), bbb1);
3235  } else {
3236  h_sumADCAmplperLS3_M2->Fill(float(lscounterM1), bbbc);
3237  h_sum0ADCAmplperLS3_M2->Fill(float(lscounterM1), bbb1);
3238  }
3239  }
3240  } //if(k1+1 ==3
3241  // HEdepth4 upgrade
3242  if (k1 + 1 == 4) {
3243  h_sumADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
3244  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
3245  h_sumCutADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
3246  h_sum0ADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbb1);
3247 
3248  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
3249  h_2DsumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbbc);
3250  h_2D0sumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbb1);
3251  } //if(k1+1 ==4)
3252 
3253  // HEdepth5 upgrade
3254  if (k1 + 1 == 5) {
3255  h_sumADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
3256  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
3257  h_sumCutADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
3258  h_sum0ADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbb1);
3259 
3260  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
3261  h_2DsumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbbc);
3262  h_2D0sumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbb1);
3263  } //if(k1+1 ==5)
3264 
3265  // HEdepth6 upgrade
3266  if (k1 + 1 == 6) {
3267  h_sumADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
3268  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
3269  h_sumCutADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
3270  h_sum0ADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbb1);
3271 
3272  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
3273  h_2DsumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbbc);
3274  h_2D0sumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbb1);
3275  } //if(k1+1 ==6)
3276 
3277  // HEdepth7 upgrade
3278  if (k1 + 1 == 7) {
3279  h_sumADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
3280  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
3281  h_sumCutADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
3282  h_sum0ADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbb1);
3283 
3284  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
3285  h_2DsumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbbc);
3286  h_2D0sumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbb1);
3287  } //if(k1+1 ==7)
3288  } //if(k0==1) =HE
3289  // HF:
3290  if (k0 == 3) {
3291  // HFdepth1
3292  if (k1 + 1 == 1) {
3293  h_sumADCAmplLS6->Fill(bbbc / bbb1);
3294  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
3295  h_2DsumADCAmplLS6->Fill(double(ieta), double(k3), bbbc);
3296  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth1_)
3297  h_2DsumADCAmplLS6_LSselected->Fill(double(ieta), double(k3), bbbc);
3298  h_2D0sumADCAmplLS6->Fill(double(ieta), double(k3), bbb1);
3299  h_sumADCAmplperLS6->Fill(float(lscounterM1), bbbc);
3300  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
3301  h_sumCutADCAmplperLS6->Fill(float(lscounterM1), bbbc);
3302  h_sum0ADCAmplperLS6->Fill(float(lscounterM1), bbb1);
3303 
3305  if (ieta > 0) {
3306  if (k3 < 36) {
3307  h_sumADCAmplperLS6_P1->Fill(float(lscounterM1), bbbc);
3308  h_sum0ADCAmplperLS6_P1->Fill(float(lscounterM1), bbb1);
3309  } else {
3310  h_sumADCAmplperLS6_P2->Fill(float(lscounterM1), bbbc);
3311  h_sum0ADCAmplperLS6_P2->Fill(float(lscounterM1), bbb1);
3312  }
3314  if (bbbc / bbb1 > 20.) {
3315  pcountall6 += bbb1;
3316  pcountmin6 += bbb1;
3317  }
3319 
3320  } else {
3321  if (k3 < 36) {
3322  h_sumADCAmplperLS6_M1->Fill(float(lscounterM1), bbbc);
3323  h_sum0ADCAmplperLS6_M1->Fill(float(lscounterM1), bbb1);
3324  } else {
3325  h_sumADCAmplperLS6_M2->Fill(float(lscounterM1), bbbc);
3326  h_sum0ADCAmplperLS6_M2->Fill(float(lscounterM1), bbb1);
3327  }
3329  if (bbbc / bbb1 > 20.) {
3330  mcountall6 += bbb1;
3331  mcountmin6 += bbb1;
3332  }
3334  }
3336  } //if(k1+1 ==1)
3337 
3338  // HFdepth2
3339  if (k1 + 1 == 2) {
3340  h_sumADCAmplLS7->Fill(bbbc / bbb1);
3341  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
3342  h_2DsumADCAmplLS7->Fill(double(ieta), double(k3), bbbc);
3343  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth2_)
3344  h_2DsumADCAmplLS7_LSselected->Fill(double(ieta), double(k3), bbbc);
3345  h_2D0sumADCAmplLS7->Fill(double(ieta), double(k3), bbb1);
3346  h_sumADCAmplperLS7->Fill(float(lscounterM1), bbbc);
3347  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
3348  h_sumCutADCAmplperLS7->Fill(float(lscounterM1), bbbc);
3349  h_sum0ADCAmplperLS7->Fill(float(lscounterM1), bbb1);
3350 
3351  if (ieta > 0) {
3352  if (k3 < 36) {
3353  h_sumADCAmplperLS6_P1->Fill(float(lscounterM1), bbbc);
3354  h_sum0ADCAmplperLS6_P1->Fill(float(lscounterM1), bbb1);
3355  } else {
3356  h_sumADCAmplperLS6_P2->Fill(float(lscounterM1), bbbc);
3357  h_sum0ADCAmplperLS6_P2->Fill(float(lscounterM1), bbb1);
3358  }
3359  } else {
3360  if (k3 < 36) {
3361  h_sumADCAmplperLS6_M1->Fill(float(lscounterM1), bbbc);
3362  h_sum0ADCAmplperLS6_M1->Fill(float(lscounterM1), bbb1);
3363  } else {
3364  h_sumADCAmplperLS6_M2->Fill(float(lscounterM1), bbbc);
3365  h_sum0ADCAmplperLS6_M2->Fill(float(lscounterM1), bbb1);
3366  }
3367  }
3368  } //if(k1+1 ==2)
3369 
3370  // HFdepth3 upgrade
3371  if (k1 + 1 == 3) {
3372  h_sumADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
3373  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
3374  h_sumCutADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
3375  h_sum0ADCAmplperLS6u->Fill(float(lscounterM1), bbb1);
3376 
3377  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
3378  h_2DsumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbbc);
3379  h_2D0sumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbb1);
3380  } //if(k1+1 ==3)
3381 
3382  // HFdepth4 upgrade
3383  if (k1 + 1 == 4) {
3384  h_sumADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
3385  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
3386  h_sumCutADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
3387  h_sum0ADCAmplperLS7u->Fill(float(lscounterM1), bbb1);
3388 
3389  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
3390  h_2DsumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbbc);
3391  h_2D0sumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbb1);
3392  } //if(k1+1 ==4)
3393 
3394  } //end HF
3395 
3396  // HO:
3397  if (k0 == 2) {
3398  // HOdepth4
3399  if (k1 + 1 == 4) {
3400  h_sumADCAmplLS8->Fill(bbbc / bbb1);
3401  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
3402  h_2DsumADCAmplLS8->Fill(double(ieta), double(k3), bbbc);
3403  if (bbbc / bbb1 > 2. * lsdep_estimator1_HOdepth4_)
3404  h_2DsumADCAmplLS8_LSselected->Fill(double(ieta), double(k3), bbbc);
3405  h_2D0sumADCAmplLS8->Fill(double(ieta), double(k3), bbb1);
3406  h_sumADCAmplperLS8->Fill(float(lscounterM1), bbbc);
3407  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
3408  h_sumCutADCAmplperLS8->Fill(float(lscounterM1), bbbc);
3409  h_sum0ADCAmplperLS8->Fill(float(lscounterM1), bbb1);
3410 
3412  if (ieta > 0) {
3413  if (k3 < 36) {
3414  h_sumADCAmplperLS8_P1->Fill(float(lscounterM1), bbbc);
3415  h_sum0ADCAmplperLS8_P1->Fill(float(lscounterM1), bbb1);
3416  } else {
3417  h_sumADCAmplperLS8_P2->Fill(float(lscounterM1), bbbc);
3418  h_sum0ADCAmplperLS8_P2->Fill(float(lscounterM1), bbb1);
3419  }
3421  if (bbbc / bbb1 > 80.) {
3422  pcountall8 += bbb1;
3423  pcountmin8 += bbb1;
3424  }
3426 
3427  } else {
3428  if (k3 < 36) {
3429  h_sumADCAmplperLS8_M1->Fill(float(lscounterM1), bbbc);
3430  h_sum0ADCAmplperLS8_M1->Fill(float(lscounterM1), bbb1);
3431  } else {
3432  h_sumADCAmplperLS8_M2->Fill(float(lscounterM1), bbbc);
3433  h_sum0ADCAmplperLS8_M2->Fill(float(lscounterM1), bbb1);
3434  }
3436  if (bbbc / bbb1 > 80.) {
3437  mcountall8 += bbb1;
3438  mcountmin8 += bbb1;
3439  }
3441  }
3443  }
3444  }
3445  } //if(sumEstimator1[k0][k1][k2][k3] != 0.
3446  // ------------------------------------------------------------------------------------------------------------------------sumEstimator2
3447  if (sumEstimator2[k0][k1][k2][k3] != 0.) {
3448  // fill histoes:
3449  double bbbc = 0.;
3450  if (flagestimatornormalization_ == 0)
3451  bbbc = sumEstimator2[k0][k1][k2][k3] / nevcounter0;
3452  if (flagestimatornormalization_ == 1)
3453  bbbc = sumEstimator2[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3454  double bbb1 = 1.;
3455  if (flagestimatornormalization_ == 2) {
3456  bbbc = sumEstimator2[k0][k1][k2][k3];
3457  bbb1 = sum0Estimator[k0][k1][k2][k3];
3458  }
3459 
3460  // HB:
3461  if (k0 == 0) {
3462  // HBdepth1
3463  if (k1 + 1 == 1) {
3464  h_sumTSmeanALS1->Fill(bbbc / bbb1);
3465  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
3466  h_2DsumTSmeanALS1->Fill(double(ieta), double(k3), bbbc);
3467  h_2D0sumTSmeanALS1->Fill(double(ieta), double(k3), bbb1);
3468  h_sumTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
3469  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
3470  h_sumCutTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
3471  h_sum0TSmeanAperLS1->Fill(float(lscounterM1), bbb1);
3472  if (bbbc / bbb1 > 2. * lsdep_estimator2_HBdepth1_)
3473  h_sumTSmeanAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3474  }
3475  if (k1 + 1 == 2) {
3476  h_sumTSmeanALS2->Fill(bbbc / bbb1);
3477  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
3478  h_2DsumTSmeanALS2->Fill(double(ieta), double(k3), bbbc);
3479  h_2D0sumTSmeanALS2->Fill(double(ieta), double(k3), bbb1);
3480  h_sumTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
3481  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
3482  h_sumCutTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
3483  h_sum0TSmeanAperLS2->Fill(float(lscounterM1), bbb1);
3484  }
3485  }
3486  // HE:
3487  if (k0 == 1) {
3488  // HBdepth1
3489  if (k1 + 1 == 1) {
3490  h_sumTSmeanALS3->Fill(bbbc / bbb1);
3491  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
3492  h_2DsumTSmeanALS3->Fill(double(ieta), double(k3), bbbc);
3493  h_2D0sumTSmeanALS3->Fill(double(ieta), double(k3), bbb1);
3494  h_sumTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
3495  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
3496  h_sumCutTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
3497  h_sum0TSmeanAperLS3->Fill(float(lscounterM1), bbb1);
3498  }
3499  if (k1 + 1 == 2) {
3500  h_sumTSmeanALS4->Fill(bbbc / bbb1);
3501  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
3502  h_2DsumTSmeanALS4->Fill(double(ieta), double(k3), bbbc);
3503  h_2D0sumTSmeanALS4->Fill(double(ieta), double(k3), bbb1);
3504  h_sumTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
3505  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
3506  h_sumCutTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
3507  h_sum0TSmeanAperLS4->Fill(float(lscounterM1), bbb1);
3508  }
3509  if (k1 + 1 == 3) {
3510  h_sumTSmeanALS5->Fill(bbbc / bbb1);
3511  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
3512  h_2DsumTSmeanALS5->Fill(double(ieta), double(k3), bbbc);
3513  h_2D0sumTSmeanALS5->Fill(double(ieta), double(k3), bbb1);
3514  h_sumTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
3515  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
3516  h_sumCutTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
3517  h_sum0TSmeanAperLS5->Fill(float(lscounterM1), bbb1);
3518  }
3519  }
3520  // HF:
3521  if (k0 == 3) {
3522  // HBdepth1
3523  if (k1 + 1 == 1) {
3524  h_sumTSmeanALS6->Fill(bbbc / bbb1);
3525  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
3526  h_2DsumTSmeanALS6->Fill(double(ieta), double(k3), bbbc);
3527  h_2D0sumTSmeanALS6->Fill(double(ieta), double(k3), bbb1);
3528  h_sumTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
3529  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
3530  h_sumCutTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
3531  h_sum0TSmeanAperLS6->Fill(float(lscounterM1), bbb1);
3532  }
3533  if (k1 + 1 == 2) {
3534  h_sumTSmeanALS7->Fill(bbbc / bbb1);
3535  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
3536  h_2DsumTSmeanALS7->Fill(double(ieta), double(k3), bbbc);
3537  h_2D0sumTSmeanALS7->Fill(double(ieta), double(k3), bbb1);
3538  h_sumTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
3539  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
3540  h_sumCutTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
3541  h_sum0TSmeanAperLS7->Fill(float(lscounterM1), bbb1);
3542  }
3543  }
3544  // HO:
3545  if (k0 == 2) {
3546  // HBdepth1
3547  if (k1 + 1 == 4) {
3548  h_sumTSmeanALS8->Fill(bbbc / bbb1);
3549  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
3550  h_2DsumTSmeanALS8->Fill(double(ieta), double(k3), bbbc);
3551  h_2D0sumTSmeanALS8->Fill(double(ieta), double(k3), bbb1);
3552  h_sumTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
3553  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
3554  h_sumCutTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
3555  h_sum0TSmeanAperLS8->Fill(float(lscounterM1), bbb1);
3556  }
3557  }
3558  } //if(sumEstimator2[k0][k1][k2][k3] != 0.
3559 
3560  // ------------------------------------------------------------------------------------------------------------------------sumEstimator3
3561  if (sumEstimator3[k0][k1][k2][k3] != 0.) {
3562  // fill histoes:
3563  double bbbc = 0.;
3564  if (flagestimatornormalization_ == 0)
3565  bbbc = sumEstimator3[k0][k1][k2][k3] / nevcounter0;
3566  if (flagestimatornormalization_ == 1)
3567  bbbc = sumEstimator3[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3568  double bbb1 = 1.;
3569  if (flagestimatornormalization_ == 2) {
3570  bbbc = sumEstimator3[k0][k1][k2][k3];
3571  bbb1 = sum0Estimator[k0][k1][k2][k3];
3572  }
3573 
3574  // HB:
3575  if (k0 == 0) {
3576  // HBdepth1
3577  if (k1 + 1 == 1) {
3578  h_sumTSmaxALS1->Fill(bbbc / bbb1);
3579  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
3580  h_2DsumTSmaxALS1->Fill(double(ieta), double(k3), bbbc);
3581  h_2D0sumTSmaxALS1->Fill(double(ieta), double(k3), bbb1);
3582  h_sumTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
3583  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
3584  h_sumCutTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
3585  h_sum0TSmaxAperLS1->Fill(float(lscounterM1), bbb1);
3586  if (bbbc / bbb1 > 2. * lsdep_estimator3_HBdepth1_)
3587  h_sumTSmaxAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3588  }
3589  if (k1 + 1 == 2) {
3590  h_sumTSmaxALS2->Fill(bbbc / bbb1);
3591  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
3592  h_2DsumTSmaxALS2->Fill(double(ieta), double(k3), bbbc);
3593  h_2D0sumTSmaxALS2->Fill(double(ieta), double(k3), bbb1);
3594  h_sumTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
3595  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
3596  h_sumCutTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
3597  h_sum0TSmaxAperLS2->Fill(float(lscounterM1), bbb1);
3598  }
3599  }
3600  // HE:
3601  if (k0 == 1) {
3602  // HBdepth1
3603  if (k1 + 1 == 1) {
3604  h_sumTSmaxALS3->Fill(bbbc / bbb1);
3605  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
3606  h_2DsumTSmaxALS3->Fill(double(ieta), double(k3), bbbc);
3607  h_2D0sumTSmaxALS3->Fill(double(ieta), double(k3), bbb1);
3608  h_sumTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
3609  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
3610  h_sumCutTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
3611  h_sum0TSmaxAperLS3->Fill(float(lscounterM1), bbb1);
3612  }
3613  if (k1 + 1 == 2) {
3614  h_sumTSmaxALS4->Fill(bbbc / bbb1);
3615  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
3616  h_2DsumTSmaxALS4->Fill(double(ieta), double(k3), bbbc);
3617  h_2D0sumTSmaxALS4->Fill(double(ieta), double(k3), bbb1);
3618  h_sumTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
3619  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
3620  h_sumCutTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
3621  h_sum0TSmaxAperLS4->Fill(float(lscounterM1), bbb1);
3622  }
3623  if (k1 + 1 == 3) {
3624  h_sumTSmaxALS5->Fill(bbbc / bbb1);
3625  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
3626  h_2DsumTSmaxALS5->Fill(double(ieta), double(k3), bbbc);
3627  h_2D0sumTSmaxALS5->Fill(double(ieta), double(k3), bbb1);
3628  h_sumTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
3629  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
3630  h_sumCutTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
3631  h_sum0TSmaxAperLS5->Fill(float(lscounterM1), bbb1);
3632  }
3633  }
3634  // HF:
3635  if (k0 == 3) {
3636  // HBdepth1
3637  if (k1 + 1 == 1) {
3638  h_sumTSmaxALS6->Fill(bbbc / bbb1);
3639  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
3640  h_2DsumTSmaxALS6->Fill(double(ieta), double(k3), bbbc);
3641  h_2D0sumTSmaxALS6->Fill(double(ieta), double(k3), bbb1);
3642  h_sumTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
3643  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
3644  h_sumCutTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
3645  h_sum0TSmaxAperLS6->Fill(float(lscounterM1), bbb1);
3646  }
3647  if (k1 + 1 == 2) {
3648  h_sumTSmaxALS7->Fill(bbbc / bbb1);
3649  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
3650  h_2DsumTSmaxALS7->Fill(double(ieta), double(k3), bbbc);
3651  h_2D0sumTSmaxALS7->Fill(double(ieta), double(k3), bbb1);
3652  h_sumTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
3653  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
3654  h_sumCutTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
3655  h_sum0TSmaxAperLS7->Fill(float(lscounterM1), bbb1);
3656  }
3657  }
3658  // HO:
3659  if (k0 == 2) {
3660  // HBdepth1
3661  if (k1 + 1 == 4) {
3662  h_sumTSmaxALS8->Fill(bbbc / bbb1);
3663  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
3664  h_2DsumTSmaxALS8->Fill(double(ieta), double(k3), bbbc);
3665  h_2D0sumTSmaxALS8->Fill(double(ieta), double(k3), bbb1);
3666  h_sumTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
3667  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
3668  h_sumCutTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
3669  h_sum0TSmaxAperLS8->Fill(float(lscounterM1), bbb1);
3670  }
3671  }
3672  } //if(sumEstimator3[k0][k1][k2][k3] != 0.
3673 
3674  // ------------------------------------------------------------------------------------------------------------------------sumEstimator4
3675  if (sumEstimator4[k0][k1][k2][k3] != 0.) {
3676  // fill histoes:
3677  double bbbc = 0.;
3678  if (flagestimatornormalization_ == 0)
3679  bbbc = sumEstimator4[k0][k1][k2][k3] / nevcounter0;
3680  if (flagestimatornormalization_ == 1)
3681  bbbc = sumEstimator4[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3682  double bbb1 = 1.;
3683  if (flagestimatornormalization_ == 2) {
3684  bbbc = sumEstimator4[k0][k1][k2][k3];
3685  bbb1 = sum0Estimator[k0][k1][k2][k3];
3686  }
3687 
3688  // HB:
3689  if (k0 == 0) {
3690  // HBdepth1
3691  if (k1 + 1 == 1) {
3692  h_sumAmplitudeLS1->Fill(bbbc / bbb1);
3693  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
3694  h_2DsumAmplitudeLS1->Fill(double(ieta), double(k3), bbbc);
3695  h_2D0sumAmplitudeLS1->Fill(double(ieta), double(k3), bbb1);
3696  h_sumAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
3697  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
3698  h_sumCutAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
3699  h_sum0AmplitudeperLS1->Fill(float(lscounterM1), bbb1);
3700  if (bbbc / bbb1 > 2. * lsdep_estimator4_HBdepth1_)
3701  h_sumAmplitudeperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3702  }
3703  if (k1 + 1 == 2) {
3704  h_sumAmplitudeLS2->Fill(bbbc / bbb1);
3705  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
3706  h_2DsumAmplitudeLS2->Fill(double(ieta), double(k3), bbbc);
3707  h_2D0sumAmplitudeLS2->Fill(double(ieta), double(k3), bbb1);
3708  h_sumAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
3709  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
3710  h_sumCutAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
3711  h_sum0AmplitudeperLS2->Fill(float(lscounterM1), bbb1);
3712  }
3713  }
3714  // HE:
3715  if (k0 == 1) {
3716  // HBdepth1
3717  if (k1 + 1 == 1) {
3718  h_sumAmplitudeLS3->Fill(bbbc / bbb1);
3719  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
3720  h_2DsumAmplitudeLS3->Fill(double(ieta), double(k3), bbbc);
3721  h_2D0sumAmplitudeLS3->Fill(double(ieta), double(k3), bbb1);
3722  h_sumAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
3723  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
3724  h_sumCutAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
3725  h_sum0AmplitudeperLS3->Fill(float(lscounterM1), bbb1);
3726  }
3727  if (k1 + 1 == 2) {
3728  h_sumAmplitudeLS4->Fill(bbbc / bbb1);
3729  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
3730  h_2DsumAmplitudeLS4->Fill(double(ieta), double(k3), bbbc);
3731  h_2D0sumAmplitudeLS4->Fill(double(ieta), double(k3), bbb1);
3732  h_sumAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
3733  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
3734  h_sumCutAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
3735  h_sum0AmplitudeperLS4->Fill(float(lscounterM1), bbb1);
3736  }
3737  if (k1 + 1 == 3) {
3738  h_sumAmplitudeLS5->Fill(bbbc / bbb1);
3739  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
3740  h_2DsumAmplitudeLS5->Fill(double(ieta), double(k3), bbbc);
3741  h_2D0sumAmplitudeLS5->Fill(double(ieta), double(k3), bbb1);
3742  h_sumAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
3743  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
3744  h_sumCutAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
3745  h_sum0AmplitudeperLS5->Fill(float(lscounterM1), bbb1);
3746  }
3747  }
3748  // HF:
3749  if (k0 == 3) {
3750  // HBdepth1
3751  if (k1 + 1 == 1) {
3752  h_sumAmplitudeLS6->Fill(bbbc / bbb1);
3753  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
3754  h_2DsumAmplitudeLS6->Fill(double(ieta), double(k3), bbbc);
3755  h_2D0sumAmplitudeLS6->Fill(double(ieta), double(k3), bbb1);
3756  h_sumAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
3757  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
3758  h_sumCutAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
3759  h_sum0AmplitudeperLS6->Fill(float(lscounterM1), bbb1);
3760  }
3761  if (k1 + 1 == 2) {
3762  h_sumAmplitudeLS7->Fill(bbbc / bbb1);
3763  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
3764  h_2DsumAmplitudeLS7->Fill(double(ieta), double(k3), bbbc);
3765  h_2D0sumAmplitudeLS7->Fill(double(ieta), double(k3), bbb1);
3766  h_sumAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
3767  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
3768  h_sumCutAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
3769  h_sum0AmplitudeperLS7->Fill(float(lscounterM1), bbb1);
3770  }
3771  }
3772  // HO:
3773  if (k0 == 2) {
3774  // HBdepth1
3775  if (k1 + 1 == 4) {
3776  h_sumAmplitudeLS8->Fill(bbbc / bbb1);
3777  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
3778  h_2DsumAmplitudeLS8->Fill(double(ieta), double(k3), bbbc);
3779  h_2D0sumAmplitudeLS8->Fill(double(ieta), double(k3), bbb1);
3780  h_sumAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
3781  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
3782  h_sumCutAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
3783  h_sum0AmplitudeperLS8->Fill(float(lscounterM1), bbb1);
3784  }
3785  }
3786  } //if(sumEstimator4[k0][k1][k2][k3] != 0.
3787  // ------------------------------------------------------------------------------------------------------------------------sumEstimator5
3788  if (sumEstimator5[k0][k1][k2][k3] != 0.) {
3789  // fill histoes:
3790  double bbbc = 0.;
3791  if (flagestimatornormalization_ == 0)
3792  bbbc = sumEstimator5[k0][k1][k2][k3] / nevcounter0;
3793  if (flagestimatornormalization_ == 1)
3794  bbbc = sumEstimator5[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3795  double bbb1 = 1.;
3796  if (flagestimatornormalization_ == 2) {
3797  bbbc = sumEstimator5[k0][k1][k2][k3];
3798  bbb1 = sum0Estimator[k0][k1][k2][k3];
3799  }
3800 
3801  // HB:
3802  if (k0 == 0) {
3803  // HBdepth1
3804  if (k1 + 1 == 1) {
3805  h_sumAmplLS1->Fill(bbbc / bbb1);
3806  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
3807  h_2DsumAmplLS1->Fill(double(ieta), double(k3), bbbc);
3808  h_2D0sumAmplLS1->Fill(double(ieta), double(k3), bbb1);
3809  h_sumAmplperLS1->Fill(float(lscounterM1), bbbc);
3810  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
3811  h_sumCutAmplperLS1->Fill(float(lscounterM1), bbbc);
3812  h_sum0AmplperLS1->Fill(float(lscounterM1), bbb1);
3813  if (bbbc / bbb1 > 2. * lsdep_estimator5_HBdepth1_)
3814  h_sumAmplperLS1_LSselected->Fill(float(lscounterM1), bbbc);
3815  }
3816  if (k1 + 1 == 2) {
3817  h_sumAmplLS2->Fill(bbbc / bbb1);
3818  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
3819  h_2DsumAmplLS2->Fill(double(ieta), double(k3), bbbc);
3820  h_2D0sumAmplLS2->Fill(double(ieta), double(k3), bbb1);
3821  h_sumAmplperLS2->Fill(float(lscounterM1), bbbc);
3822  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
3823  h_sumCutAmplperLS2->Fill(float(lscounterM1), bbbc);
3824  h_sum0AmplperLS2->Fill(float(lscounterM1), bbb1);
3825  }
3826  }
3827  // HE:
3828  if (k0 == 1) {
3829  // HEdepth1
3830  if (k1 + 1 == 1) {
3831  h_sumAmplLS3->Fill(bbbc / bbb1);
3832  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
3833  h_2DsumAmplLS3->Fill(double(ieta), double(k3), bbbc);
3834  h_2D0sumAmplLS3->Fill(double(ieta), double(k3), bbb1);
3835  h_sumAmplperLS3->Fill(float(lscounterM1), bbbc);
3836  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
3837  h_sumCutAmplperLS3->Fill(float(lscounterM1), bbbc);
3838  h_sum0AmplperLS3->Fill(float(lscounterM1), bbb1);
3839  }
3840  if (k1 + 1 == 2) {
3841  h_sumAmplLS4->Fill(bbbc / bbb1);
3842  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
3843  h_2DsumAmplLS4->Fill(double(ieta), double(k3), bbbc);
3844  h_2D0sumAmplLS4->Fill(double(ieta), double(k3), bbb1);
3845  h_sumAmplperLS4->Fill(float(lscounterM1), bbbc);
3846  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
3847  h_sumCutAmplperLS4->Fill(float(lscounterM1), bbbc);
3848  h_sum0AmplperLS4->Fill(float(lscounterM1), bbb1);
3849  }
3850  if (k1 + 1 == 3) {
3851  h_sumAmplLS5->Fill(bbbc / bbb1);
3852  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
3853  h_2DsumAmplLS5->Fill(double(ieta), double(k3), bbbc);
3854  h_2D0sumAmplLS5->Fill(double(ieta), double(k3), bbb1);
3855  h_sumAmplperLS5->Fill(float(lscounterM1), bbbc);
3856  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
3857  h_sumCutAmplperLS5->Fill(float(lscounterM1), bbbc);
3858  h_sum0AmplperLS5->Fill(float(lscounterM1), bbb1);
3859  }
3860  }
3861  // HF:
3862  if (k0 == 3) {
3863  // HFdepth1
3864  if (k1 + 1 == 1) {
3865  h_sumAmplLS6->Fill(bbbc / bbb1);
3866  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
3867  h_2DsumAmplLS6->Fill(double(ieta), double(k3), bbbc);
3868  h_2D0sumAmplLS6->Fill(double(ieta), double(k3), bbb1);
3869  h_sumAmplperLS6->Fill(float(lscounterM1), bbbc);
3870  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
3871  h_sumCutAmplperLS6->Fill(float(lscounterM1), bbbc);
3872  h_sum0AmplperLS6->Fill(float(lscounterM1), bbb1);
3873  }
3874  if (k1 + 1 == 2) {
3875  h_sumAmplLS7->Fill(bbbc / bbb1);
3876  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
3877  h_2DsumAmplLS7->Fill(double(ieta), double(k3), bbbc);
3878  h_2D0sumAmplLS7->Fill(double(ieta), double(k3), bbb1);
3879  h_sumAmplperLS7->Fill(float(lscounterM1), bbbc);
3880  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
3881  h_sumCutAmplperLS7->Fill(float(lscounterM1), bbbc);
3882  h_sum0AmplperLS7->Fill(float(lscounterM1), bbb1);
3883  }
3884  }
3885  // HO:
3886  if (k0 == 2) {
3887  // HOdepth4
3888  if (k1 + 1 == 4) {
3889  h_sumAmplLS8->Fill(bbbc / bbb1);
3890  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
3891  h_2DsumAmplLS8->Fill(double(ieta), double(k3), bbbc);
3892  h_2D0sumAmplLS8->Fill(double(ieta), double(k3), bbb1);
3893  h_sumAmplperLS8->Fill(float(lscounterM1), bbbc);
3894  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
3895  h_sumCutAmplperLS8->Fill(float(lscounterM1), bbbc);
3896  h_sum0AmplperLS8->Fill(float(lscounterM1), bbb1);
3897  }
3898  }
3899  } //if(sumEstimator5[k0][k1][k2][k3] != 0.
3900  // ------------------------------------------------------------------------------------------------------------------------sumEstimator6 (Error-B)
3901  if (sumEstimator6[k0][k1][k2][k3] != 0.) {
3902  // fill histoes:
3903  double bbbc = 0.;
3904  if (flagestimatornormalization_ == 0)
3905  bbbc = sumEstimator6[k0][k1][k2][k3] / nevcounter0;
3906  if (flagestimatornormalization_ == 1)
3907  bbbc = sumEstimator6[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
3908  double bbb1 = 1.;
3909  if (flagestimatornormalization_ == 2) {
3910  bbbc = sumEstimator6[k0][k1][k2][k3];
3911  bbb1 = sum0Estimator[k0][k1][k2][k3];
3912  }
3913 
3914  // HB:
3915  if (k0 == 0) {
3916  // HBdepth1
3917  if (k1 + 1 == 1) {
3918  h_sumErrorBLS1->Fill(bbbc / bbb1);
3919  h_2DsumErrorBLS1->Fill(double(ieta), double(k3), bbbc);
3920  h_2D0sumErrorBLS1->Fill(double(ieta), double(k3), bbb1);
3921  h_sumErrorBperLS1->Fill(float(lscounterM1), bbbc);
3922  h_sum0ErrorBperLS1->Fill(float(lscounterM1), bbb1);
3923  }
3924  if (k1 + 1 == 2) {
3925  h_sumErrorBLS2->Fill(bbbc / bbb1);
3926  h_2DsumErrorBLS2->Fill(double(ieta), double(k3), bbbc);
3927  h_2D0sumErrorBLS2->Fill(double(ieta), double(k3), bbb1);
3928  h_sumErrorBperLS2->Fill(float(lscounterM1), bbbc);
3929  h_sum0ErrorBperLS2->Fill(float(lscounterM1), bbb1);
3930  }
3931  }
3932  // HE:
3933  if (k0 == 1) {
3934  // HEdepth1
3935  if (k1 + 1 == 1) {
3936  h_sumErrorBLS3->Fill(bbbc / bbb1);
3937  h_2DsumErrorBLS3->Fill(double(ieta), double(k3), bbbc);
3938  h_2D0sumErrorBLS3->Fill(double(ieta), double(k3), bbb1);
3939  h_sumErrorBperLS3->Fill(float(lscounterM1), bbbc);
3940  h_sum0ErrorBperLS3->Fill(float(lscounterM1), bbb1);
3941  }
3942  if (k1 + 1 == 2) {
3943  h_sumErrorBLS4->Fill(bbbc / bbb1);
3944  h_2DsumErrorBLS4->Fill(double(ieta), double(k3), bbbc);
3945  h_2D0sumErrorBLS4->Fill(double(ieta), double(k3), bbb1);
3946  h_sumErrorBperLS4->Fill(float(lscounterM1), bbbc);
3947  h_sum0ErrorBperLS4->Fill(float(lscounterM1), bbb1);
3948  }
3949  if (k1 + 1 == 3) {
3950  h_sumErrorBLS5->Fill(bbbc / bbb1);
3951  h_2DsumErrorBLS5->Fill(double(ieta), double(k3), bbbc);
3952  h_2D0sumErrorBLS5->Fill(double(ieta), double(k3), bbb1);
3953  h_sumErrorBperLS5->Fill(float(lscounterM1), bbbc);
3954  h_sum0ErrorBperLS5->Fill(float(lscounterM1), bbb1);
3955  }
3956  }
3957  // HF:
3958  if (k0 == 3) {
3959  // HFdepth1
3960  if (k1 + 1 == 1) {
3961  h_sumErrorBLS6->Fill(bbbc / bbb1);
3962  h_2DsumErrorBLS6->Fill(double(ieta), double(k3), bbbc);
3963  h_2D0sumErrorBLS6->Fill(double(ieta), double(k3), bbb1);
3964  h_sumErrorBperLS6->Fill(float(lscounterM1), bbbc);
3965  h_sum0ErrorBperLS6->Fill(float(lscounterM1), bbb1);
3966  }
3967  if (k1 + 1 == 2) {
3968  h_sumErrorBLS7->Fill(bbbc / bbb1);
3969  h_2DsumErrorBLS7->Fill(double(ieta), double(k3), bbbc);
3970  h_2D0sumErrorBLS7->Fill(double(ieta), double(k3), bbb1);
3971  h_sumErrorBperLS7->Fill(float(lscounterM1), bbbc);
3972  h_sum0ErrorBperLS7->Fill(float(lscounterM1), bbb1);
3973  }
3974  }
3975  // HO:
3976  if (k0 == 2) {
3977  // HOdepth4
3978  if (k1 + 1 == 4) {
3979  h_sumErrorBLS8->Fill(bbbc / bbb1);
3980  h_2DsumErrorBLS8->Fill(double(ieta), double(k3), bbbc);
3981  h_2D0sumErrorBLS8->Fill(double(ieta), double(k3), bbb1);
3982  h_sumErrorBperLS8->Fill(float(lscounterM1), bbbc);
3983  h_sum0ErrorBperLS8->Fill(float(lscounterM1), bbb1);
3984  }
3985  }
3987  } //if(sumEstimator6[k0][k1][k2][k3] != 0.
3988  } //for k2
3989  // occupancy distributions for error-A:
3990  // HB
3991  if (k0 == 0 && k1 == 0) {
3992  if (pcountmin1 > 0) {
3993  if (pcountmin1 < pnnmin1)
3994  pnnmin1 = pcountmin1;
3995  pcountmin1 = 0;
3996  }
3997  if (mcountmin1 > 0) {
3998  if (mcountmin1 < mnnmin1)
3999  mnnmin1 = mcountmin1;
4000  mcountmin1 = 0;
4001  mnnbins1++;
4002  }
4003  } //
4004  // HE
4005  if (k0 == 1 && k1 == 0) {
4006  if (pcountmin3 > 0) {
4007  if (pcountmin3 < pnnmin3)
4008  pnnmin3 = pcountmin3;
4009  pcountmin3 = 0;
4010  }
4011  if (mcountmin3 > 0) {
4012  if (mcountmin3 < mnnmin3)
4013  mnnmin3 = mcountmin3;
4014  mcountmin3 = 0;
4015  mnnbins3++;
4016  }
4017  } //
4018  // HO
4019  if (k0 == 2 && k1 == 3) {
4020  if (pcountmin8 > 0) {
4021  if (pcountmin8 < pnnmin8)
4022  pnnmin8 = pcountmin8;
4023  pcountmin8 = 0;
4024  }
4025  if (mcountmin8 > 0) {
4026  if (mcountmin8 < mnnmin8)
4027  mnnmin8 = mcountmin8;
4028  mcountmin8 = 0;
4029  mnnbins8++;
4030  }
4031  } //
4032  // HF
4033  if (k0 == 3 && k1 == 0) {
4034  if (pcountmin6 > 0) {
4035  if (pcountmin6 < pnnmin6)
4036  pnnmin6 = pcountmin6;
4037  pcountmin6 = 0;
4038  }
4039  if (mcountmin6 > 0) {
4040  if (mcountmin6 < mnnmin6)
4041  mnnmin6 = mcountmin6;
4042  mcountmin6 = 0;
4043  mnnbins6++;
4044  }
4045  } //
4046 
4047  } //for k3
4048  } //for k1
4049  } //for k0
4053 
4054  // cout<<"=============================== lscounterM1 = "<< (float)lscounterM1 <<endl;
4055 
4056  float patiooccupancy1 = 0.;
4057  if (pcountall1 != 0)
4058  patiooccupancy1 = (float)pnnmin1 * mnnbins1 / pcountall1;
4059  h_RatioOccupancy_HBM->Fill(float(lscounterM1), patiooccupancy1);
4060  float matiooccupancy1 = 0.;
4061  if (mcountall1 != 0)
4062  matiooccupancy1 = (float)mnnmin1 * mnnbins1 / mcountall1;
4063  h_RatioOccupancy_HBP->Fill(float(lscounterM1), matiooccupancy1);
4064 
4065  float patiooccupancy3 = 0.;
4066  if (pcountall3 != 0)
4067  patiooccupancy3 = (float)pnnmin3 * mnnbins3 / pcountall3;
4068  h_RatioOccupancy_HEM->Fill(float(lscounterM1), patiooccupancy3);
4069  float matiooccupancy3 = 0.;
4070  if (mcountall3 != 0)
4071  matiooccupancy3 = (float)mnnmin3 * mnnbins3 / mcountall3;
4072  h_RatioOccupancy_HEP->Fill(float(lscounterM1), matiooccupancy3);
4073 
4074  float patiooccupancy6 = 0.;
4075  if (pcountall6 != 0)
4076  patiooccupancy6 = (float)pnnmin6 * mnnbins6 / pcountall6;
4077  h_RatioOccupancy_HFM->Fill(float(lscounterM1), patiooccupancy6);
4078  float matiooccupancy6 = 0.;
4079  if (mcountall6 != 0)
4080  matiooccupancy6 = (float)mnnmin6 * mnnbins6 / mcountall6;
4081  h_RatioOccupancy_HFP->Fill(float(lscounterM1), matiooccupancy6);
4082 
4083  float patiooccupancy8 = 0.;
4084  if (pcountall8 != 0)
4085  patiooccupancy8 = (float)pnnmin8 * mnnbins8 / pcountall8;
4086  h_RatioOccupancy_HOM->Fill(float(lscounterM1), patiooccupancy8);
4087  float matiooccupancy8 = 0.;
4088  if (mcountall8 != 0)
4089  matiooccupancy8 = (float)mnnmin8 * mnnbins8 / mcountall8;
4090  h_RatioOccupancy_HOP->Fill(float(lscounterM1), matiooccupancy8);
4091 
4092  for (int k0 = 0; k0 < nsub; k0++) {
4093  for (int k1 = 0; k1 < ndepth; k1++) {
4094  for (int k2 = 0; k2 < neta; k2++) {
4095  for (int k3 = 0; k3 < nphi; k3++) {
4096  // reset massives:
4097  sumEstimator0[k0][k1][k2][k3] = 0.;
4098  sumEstimator1[k0][k1][k2][k3] = 0.;
4099  sumEstimator2[k0][k1][k2][k3] = 0.;
4100  sumEstimator3[k0][k1][k2][k3] = 0.;
4101  sumEstimator4[k0][k1][k2][k3] = 0.;
4102  sumEstimator5[k0][k1][k2][k3] = 0.;
4103  sumEstimator6[k0][k1][k2][k3] = 0.;
4104  sum0Estimator[k0][k1][k2][k3] = 0.;
4105  } //for
4106  } //for
4107  } //for
4108  } //for
4109 
4110  //------------------------------------------------------ averSIGNAL
4119 
4124 
4125  //------------------------------------------------------
4134 
4139 
4140  //------------------------------------------------------ averNOSIGNAL
4149 
4154 
4155  //------------------------------------------------------
4164 
4169 
4170  //------------------------------------------------------ maxxSA and maxxOccupancy
4171  h_maxxSUMAmpl_HB->Fill(float(lscounterM1), maxxSUM1);
4172  h_maxxSUMAmpl_HE->Fill(float(lscounterM1), maxxSUM2);
4173  h_maxxSUMAmpl_HO->Fill(float(lscounterM1), maxxSUM3);
4174  h_maxxSUMAmpl_HF->Fill(float(lscounterM1), maxxSUM4);
4175  maxxSUM1 = 0.;
4176  maxxSUM2 = 0.;
4177  maxxSUM3 = 0.;
4178  maxxSUM4 = 0.;
4179  //------------------------------------------------------
4180  h_maxxOCCUP_HB->Fill(float(lscounterM1), maxxOCCUP1);
4181  h_maxxOCCUP_HE->Fill(float(lscounterM1), maxxOCCUP2);
4182  h_maxxOCCUP_HO->Fill(float(lscounterM1), maxxOCCUP3);
4183  h_maxxOCCUP_HF->Fill(float(lscounterM1), maxxOCCUP4);
4184  maxxOCCUP1 = 0.;
4185  maxxOCCUP2 = 0.;
4186  maxxOCCUP3 = 0.;
4187  maxxOCCUP4 = 0.;
4188 
4189  //------------------------------------------------------
4190  } //if(nevcounter0 != 0)
4191  // POINT1
4192 
4194  // for upgrade:
4195  for (int k1 = 0; k1 < ndepth; k1++) {
4196  for (int k2 = 0; k2 < neta; k2++) {
4197  for (int k3 = 0; k3 < nphi; k3++) {
4198  if (studyCalibCellsHist_) {
4199  signal[k1][k2][k3] = 0.;
4200  calibt[k1][k2][k3] = 0.;
4201  calibcapiderror[k1][k2][k3] = 0;
4202  caliba[k1][k2][k3] = 0.;
4203  calibw[k1][k2][k3] = 0.;
4204  calib0[k1][k2][k3] = 0.;
4205  signal3[k1][k2][k3] = 0.;
4206  calib3[k1][k2][k3] = 0.;
4207  calib2[k1][k2][k3] = 0.;
4208  }
4210  for (int k0 = 0; k0 < nsub; k0++) {
4211  badchannels[k0][k1][k2][k3] = 0;
4212  } //for
4213  } //if
4214 
4215  } //for
4216  } //for
4217  } //for
4218  for (int k0 = 0; k0 < nsub; k0++) {
4219  for (int k1 = 0; k1 < ndepth; k1++) {
4220  for (int k2 = 0; k2 < neta; k2++) {
4221  for (int k3 = 0; k3 < nphi; k3++) {
4222  amplitudechannel0[k0][k1][k2][k3] = 0.;
4223  amplitudechannel[k0][k1][k2][k3] = 0.;
4224  amplitudechannel2[k0][k1][k2][k3] = 0.;
4225 
4226  tocamplchannel[k0][k1][k2][k3] = 0.;
4227  maprphinorm[k0][k1][k2][k3] = 0.;
4228  // phi-symmetry monitoring for calibration group:
4229  // rec energy:
4230  recSignalEnergy0[k0][k1][k2][k3] = 0.;
4231  recSignalEnergy1[k0][k1][k2][k3] = 0.;
4232  recSignalEnergy2[k0][k1][k2][k3] = 0.;
4233  recNoiseEnergy0[k0][k1][k2][k3] = 0.;
4234  recNoiseEnergy1[k0][k1][k2][k3] = 0.;
4235  recNoiseEnergy2[k0][k1][k2][k3] = 0.;
4236 
4237  } //k3
4238  } //k2
4239  } //k1
4240  } //k0
4244 
4245  if (flagToUseDigiCollectionsORNot_ != 0) {
4249  if (flagupgradeqie1011_ != 2 && flagupgradeqie1011_ != 3 && flagupgradeqie1011_ != 6 &&
4252  iEvent.getByToken(tok_hf_, hf);
4253  bool gotHFDigis = true;
4254  if (!(iEvent.getByToken(tok_hf_, hf))) {
4255  gotHFDigis = false;
4256  } //this is a boolean set up to check if there are HFdigis in input root file
4257  if (!(hf.isValid())) {
4258  gotHFDigis = false;
4259  } //if it is not there, leave it false
4260  if (!gotHFDigis) {
4261  std::cout << " ****************************** =========================== No HFDigiCollection found "
4262  << std::endl;
4263  } else {
4265  for (HFDigiCollection::const_iterator digi = hf->begin(); digi != hf->end(); digi++) {
4266  eta = digi->id().ieta();
4267  phi = digi->id().iphi();
4268  depth = digi->id().depth();
4269  nTS = digi->size();
4271  counterhf++;
4274  fillDigiErrorsHF(digi);
4276  if (recordHistoes_)
4277  fillDigiAmplitudeHF(digi);
4280  int iphi = phi - 1;
4281  int ieta = eta;
4282  if (ieta > 0)
4283  ieta -= 1;
4284  if (nTS <= numOfTS)
4285  for (int i = 0; i < nTS; i++) {
4286  TS_data[i] = adc2fC[digi->sample(i).adc()];
4287  signal[3][ieta + 41][iphi] += TS_data[i];
4288  if (i > 1 && i < 6)
4289  signal3[3][ieta + 41][iphi] += TS_data[i];
4290  } // TS
4291  } // if(recordHistoes_ && studyCalibCellsHist_)
4292  } // for
4293  } // hf.isValid
4294  } // end flagupgrade
4295 
4298  // upgrade:
4299  if (flagupgradeqie1011_ != 1) {
4301  iEvent.getByToken(tok_qie10_, hfqie10);
4302  const QIE10DigiCollection& qie10dc =
4303  *(hfqie10);
4304  bool gotQIE10Digis = true;
4305  if (!(iEvent.getByToken(tok_qie10_, hfqie10))) {
4306  gotQIE10Digis = false;
4307  } //this is a boolean set up to check if there are HFdigis in input root file
4308  if (!(hfqie10.isValid())) {
4309  gotQIE10Digis = false;
4310  } //if it is not there, leave it false
4311  if (!gotQIE10Digis) {
4312  std::cout << " No QIE10DigiCollection collection is found " << std::endl;
4313  } else {
4315  double totalAmplitudeHF = 0.;
4316  for (unsigned int j = 0; j < qie10dc.size(); j++) {
4317  QIE10DataFrame qie10df = static_cast<QIE10DataFrame>(qie10dc[j]);
4318  DetId detid = qie10df.detid();
4319  HcalDetId hcaldetid = HcalDetId(detid);
4320  int eta = hcaldetid.ieta();
4321  int phi = hcaldetid.iphi();
4322  // int depth = hcaldetid.depth();
4323  // loop over the samples in the digi
4324  nTS = qie10df.samples();
4326  counterhfqie10++;
4329  fillDigiErrorsHFQIE10(qie10df);
4331  if (recordHistoes_)
4332  fillDigiAmplitudeHFQIE10(qie10df);
4334  // if(recordHistoes_ ) {
4336  int iphi = phi - 1;
4337  int ieta = eta;
4338  if (ieta > 0)
4339  ieta -= 1;
4340  double amplitudefullTSs = 0.;
4341  double nnnnnnTS = 0.;
4342  for (int i = 0; i < nTS; ++i) {
4343  // j - QIE channel
4344  // i - time sample (TS)
4345  int adc = qie10df[i].adc();
4346  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4347  // float charge = adc2fC_QIE10[ adc ];
4348  TS_data[i] = adc2fC_QIE10[adc];
4349  signal[3][ieta + 41][iphi] += TS_data[i];
4350  totalAmplitudeHF += TS_data[i];
4351  amplitudefullTSs += TS_data[i];
4352  nnnnnnTS++;
4353  if (i > 1 && i < 6)
4354  signal3[3][ieta + 41][iphi] += TS_data[i];
4355 
4356  } // TS
4357  h_numberofhitsHFtest->Fill(nnnnnnTS);
4358  h_AmplitudeHFtest->Fill(amplitudefullTSs);
4359  } // if(recordHistoes_ && studyCalibCellsHist_)
4360  } // for
4361  h_totalAmplitudeHF->Fill(totalAmplitudeHF);
4362  h_totalAmplitudeHFperEvent->Fill(float(eventcounter), totalAmplitudeHF);
4363  } // hfqie10.isValid
4364  } // end flagupgrade
4365  //end upgrade
4366  //
4367  //
4369  int qwert1 = 0;
4370  int qwert2 = 0;
4371  int qwert3 = 0;
4372  int qwert4 = 0;
4373  int qwert5 = 0;
4374  if (flagupgradeqie1011_ != 2 && flagupgradeqie1011_ != 3) {
4376  iEvent.getByToken(tok_hbhe_, hbhe);
4377  bool gotHBHEDigis = true;
4378  if (!(iEvent.getByToken(tok_hbhe_, hbhe)))
4379  gotHBHEDigis = false; //this is a boolean set up to check if there are HBHEgigis in input root file
4380  if (!(hbhe.isValid()))
4381  gotHBHEDigis = false; //if it is not there, leave it false
4382  if (!gotHBHEDigis) {
4383  std::cout << " No HBHEDigiCollection collection is found " << std::endl;
4384  } else {
4385  // unsigned int NHBHEDigiCollectionsize = hbhe->size();
4386  double totalAmplitudeHB = 0.;
4387  double totalAmplitudeHE = 0.;
4388  double nnnnnnTSHB = 0.;
4389  double nnnnnnTSHE = 0.;
4390 
4391  for (HBHEDigiCollection::const_iterator digi = hbhe->begin(); digi != hbhe->end(); digi++) {
4392  eta = digi->id().ieta();
4393  phi = digi->id().iphi();
4394  depth = digi->id().depth();
4395  nTS = digi->size();
4397  nnnnnnhbhe++;
4398  nnnnnn++;
4400  if (digi->id().subdet() == HcalBarrel && depth == 1 && qwert1 == 0) {
4401  nnnnnn1++;
4402  qwert1 = 1;
4403  }
4404  if (digi->id().subdet() == HcalBarrel && depth == 2 && qwert2 == 0) {
4405  nnnnnn2++;
4406  qwert2 = 1;
4407  }
4408  if (digi->id().subdet() == HcalEndcap && depth == 1 && qwert3 == 0) {
4409  nnnnnn3++;
4410  qwert3 = 1;
4411  }
4412  if (digi->id().subdet() == HcalEndcap && depth == 2 && qwert4 == 0) {
4413  nnnnnn4++;
4414  qwert4 = 1;
4415  }
4416  if (digi->id().subdet() == HcalEndcap && depth == 3 && qwert5 == 0) {
4417  nnnnnn5++;
4418  qwert5 = 1;
4419  }
4422  fillDigiErrors(digi);
4424  if (recordHistoes_)
4425  fillDigiAmplitude(digi);
4426 
4428  int iphi = phi - 1;
4429  int ieta = eta;
4430  if (ieta > 0)
4431  ieta -= 1;
4433  if (digi->id().subdet() == HcalBarrel) {
4434  double amplitudefullTSs = 0.;
4435  nnnnnnTSHB++;
4436  if (nTS <= numOfTS)
4437  for (int i = 0; i < nTS; i++) {
4438  TS_data[i] = adc2fC[digi->sample(i).adc()];
4439  signal[0][ieta + 41][iphi] += TS_data[i];
4440  amplitudefullTSs += TS_data[i];
4441  totalAmplitudeHB += TS_data[i];
4442  if (i > 1 && i < 6)
4443  signal3[0][ieta + 41][iphi] += TS_data[i];
4444  }
4445  h_AmplitudeHBtest->Fill(amplitudefullTSs);
4446  } // HB
4448  if (digi->id().subdet() == HcalEndcap) {
4449  double amplitudefullTSs = 0.;
4450  nnnnnnTSHE++;
4451  if (nTS <= numOfTS)
4452  for (int i = 0; i < nTS; i++) {
4453  TS_data[i] = adc2fC[digi->sample(i).adc()];
4454  signal[1][ieta + 41][iphi] += TS_data[i];
4455  totalAmplitudeHE += TS_data[i];
4456  amplitudefullTSs += TS_data[i];
4457  if (i > 1 && i < 6)
4458  signal3[1][ieta + 41][iphi] += TS_data[i];
4459  }
4460  h_AmplitudeHEtest->Fill(amplitudefullTSs);
4461  } // HE
4462 
4463  } //if(recordHistoes_ && studyCalibCellsHist_)
4465  } //if(recordNtuples_)
4466  } // for HBHE digis
4467  if (totalAmplitudeHB != 0.) {
4468  h_numberofhitsHBtest->Fill(nnnnnnTSHB);
4469  h_totalAmplitudeHB->Fill(totalAmplitudeHB);
4470  h_totalAmplitudeHBperEvent->Fill(float(eventcounter), totalAmplitudeHB);
4471  }
4472  if (totalAmplitudeHE != 0.) {
4473  h_numberofhitsHEtest->Fill(nnnnnnTSHE);
4474  h_totalAmplitudeHE->Fill(totalAmplitudeHE);
4475  h_totalAmplitudeHEperEvent->Fill(float(eventcounter), totalAmplitudeHE);
4476  }
4477  } //hbhe.isValid
4478  } // end flagupgrade
4479  //---------------------------------------------------------------
4481  // upgrade:
4482  if (flagupgradeqie1011_ != 1 && flagupgradeqie1011_ != 4 && flagupgradeqie1011_ != 5 &&
4483  flagupgradeqie1011_ != 10) {
4485  iEvent.getByToken(tok_qie11_, heqie11);
4486  const QIE11DigiCollection& qie11dc =
4487  *(heqie11);
4488  bool gotQIE11Digis = true;
4489  if (!(iEvent.getByToken(tok_qie11_, heqie11)))
4490  gotQIE11Digis = false; //this is a boolean set up to check if there are QIE11gigis in input root file
4491  if (!(heqie11.isValid()))
4492  gotQIE11Digis = false; //if it is not there, leave it false
4493  if (!gotQIE11Digis) {
4494  std::cout << " No QIE11DigiCollection collection is found " << std::endl;
4495  } else {
4497  double totalAmplitudeHBQIE11 = 0.;
4498  double totalAmplitudeHEQIE11 = 0.;
4499  double nnnnnnTSHBQIE11 = 0.;
4500  double nnnnnnTSHEQIE11 = 0.;
4501  for (unsigned int j = 0; j < qie11dc.size(); j++) {
4502  QIE11DataFrame qie11df = static_cast<QIE11DataFrame>(qie11dc[j]);
4503  DetId detid = qie11df.detid();
4504  HcalDetId hcaldetid = HcalDetId(detid);
4505  int eta = hcaldetid.ieta();
4506  int phi = hcaldetid.iphi();
4507  int depth = hcaldetid.depth();
4508  if (depth == 0)
4509  return;
4510  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
4511  // loop over the samples in the digi
4512  nTS = qie11df.samples();
4514  nnnnnnhbheqie11++;
4515  nnnnnn++;
4517  fillDigiErrorsQIE11(qie11df);
4519  if (recordHistoes_)
4520  fillDigiAmplitudeQIE11(qie11df);
4523  if (sub == 1 && depth == 1 && qwert1 == 0) {
4524  nnnnnn1++;
4525  qwert1 = 1;
4526  }
4527  if (sub == 1 && depth == 2 && qwert2 == 0) {
4528  nnnnnn2++;
4529  qwert2 = 1;
4530  }
4531  if (sub == 2 && depth == 1 && qwert3 == 0) {
4532  nnnnnn3++;
4533  qwert3 = 1;
4534  }
4535  if (sub == 2 && depth == 2 && qwert4 == 0) {
4536  nnnnnn4++;
4537  qwert4 = 1;
4538  }
4539  if (sub == 2 && depth == 3 && qwert5 == 0) {
4540  nnnnnn5++;
4541  qwert5 = 1;
4542  }
4543 
4545  int iphi = phi - 1;
4546  int ieta = eta;
4547  if (ieta > 0)
4548  ieta -= 1;
4549  // HB:
4550  if (sub == 1) {
4551  double amplitudefullTSs1 = 0.;
4552  double amplitudefullTSs6 = 0.;
4553  nnnnnnTSHBQIE11++;
4554  for (int i = 0; i < nTS; ++i) {
4555  int adc = qie11df[i].adc();
4556  double charge1 = adc2fC_QIE11_shunt1[adc];
4557  double charge6 = adc2fC_QIE11_shunt6[adc];
4558  amplitudefullTSs1 += charge1;
4559  amplitudefullTSs6 += charge6;
4560  double charge = charge6;
4561  TS_data[i] = charge;
4562  signal[0][ieta + 41][iphi] += charge;
4563  if (i > 1 && i < 6)
4564  signal3[0][ieta + 41][iphi] += charge;
4565  totalAmplitudeHBQIE11 += charge;
4566  } //for
4567  h_AmplitudeHBtest1->Fill(amplitudefullTSs1, 1.);
4568  h_AmplitudeHBtest6->Fill(amplitudefullTSs6, 1.);
4569  } //HB end
4570  // HE:
4571  if (sub == 2) {
4572  double amplitudefullTSs1 = 0.;
4573  double amplitudefullTSs6 = 0.;
4574  nnnnnnTSHEQIE11++;
4575  for (int i = 0; i < nTS; i++) {
4576  int adc = qie11df[i].adc();
4577  double charge1 = adc2fC_QIE11_shunt1[adc];
4578  double charge6 = adc2fC_QIE11_shunt6[adc];
4579  amplitudefullTSs1 += charge1;
4580  amplitudefullTSs6 += charge6;
4581  double charge = charge6;
4582  TS_data[i] = charge;
4583  signal[1][ieta + 41][iphi] += charge;
4584  if (i > 1 && i < 6)
4585  signal3[1][ieta + 41][iphi] += charge;
4586  totalAmplitudeHEQIE11 += charge;
4587  } //for
4588  h_AmplitudeHEtest1->Fill(amplitudefullTSs1, 1.);
4589  h_AmplitudeHEtest6->Fill(amplitudefullTSs6, 1.);
4590 
4591  } //HE end
4592  } //if(recordHistoes_ && studyCalibCellsHist_)
4593  } // for QIE11 digis
4594 
4595  if (totalAmplitudeHBQIE11 != 0.) {
4596  h_numberofhitsHBtest->Fill(nnnnnnTSHBQIE11);
4597  h_totalAmplitudeHB->Fill(totalAmplitudeHBQIE11);
4598  h_totalAmplitudeHBperEvent->Fill(float(eventcounter), totalAmplitudeHBQIE11);
4599  }
4600  if (totalAmplitudeHEQIE11 != 0.) {
4601  h_numberofhitsHEtest->Fill(nnnnnnTSHEQIE11);
4602  h_totalAmplitudeHE->Fill(totalAmplitudeHEQIE11);
4603  h_totalAmplitudeHEperEvent->Fill(float(eventcounter), totalAmplitudeHEQIE11);
4604  }
4605  } //heqie11.isValid
4606  } // end flagupgrade
4607 
4610  iEvent.getByToken(tok_ho_, ho);
4611  bool gotHODigis = true;
4612  if (!(iEvent.getByToken(tok_ho_, ho)))
4613  gotHODigis = false; //this is a boolean set up to check if there are HOgigis in input root file
4614  if (!(ho.isValid()))
4615  gotHODigis = false; //if it is not there, leave it false
4616  if (!gotHODigis) {
4617  // if(!ho.isValid()) {
4618  std::cout << " No HO collection is found " << std::endl;
4619  } else {
4620  int qwert6 = 0;
4621  double totalAmplitudeHO = 0.;
4622  for (HODigiCollection::const_iterator digi = ho->begin(); digi != ho->end(); digi++) {
4623  eta = digi->id().ieta();
4624  phi = digi->id().iphi();
4625  depth = digi->id().depth();
4626  nTS = digi->size();
4628  counterho++;
4630  if (qwert6 == 0) {
4631  nnnnnn6++;
4632  qwert6 = 1;
4633  }
4636  fillDigiErrorsHO(digi);
4638  if (recordHistoes_)
4639  fillDigiAmplitudeHO(digi);
4642  int iphi = phi - 1;
4643  int ieta = eta;
4644  if (ieta > 0)
4645  ieta -= 1;
4646  double nnnnnnTS = 0.;
4647  double amplitudefullTSs = 0.;
4648  if (nTS <= numOfTS)
4649  for (int i = 0; i < nTS; i++) {
4650  TS_data[i] = adc2fC[digi->sample(i).adc()];
4651  amplitudefullTSs += TS_data[i];
4652  signal[2][ieta + 41][iphi] += TS_data[i];
4653  totalAmplitudeHO += TS_data[i];
4654  if (i > 1 && i < 6)
4655  signal3[2][ieta + 41][iphi] += TS_data[i];
4656  nnnnnnTS++;
4657  } //if for
4658  h_AmplitudeHOtest->Fill(amplitudefullTSs);
4659  h_numberofhitsHOtest->Fill(nnnnnnTS);
4660  } //if(recordHistoes_ && studyCalibCellsHist_)
4661  } //for HODigiCollection
4662 
4663  h_totalAmplitudeHO->Fill(totalAmplitudeHO);
4664  h_totalAmplitudeHOperEvent->Fill(float(eventcounter), totalAmplitudeHO);
4665  } //ho.isValid(
4666  } // flagToUseDigiCollectionsORNot_
4667 
4669  // AZ 04.11.2019
4675  // HBHE: HBHERecHitCollection hbheNoise Noise
4677  iEvent.getByToken(tok_hbheNoise_, hbheNoise);
4678  bool gotHBHERecHitsNoise = true;
4679  if (!(iEvent.getByToken(tok_hbheNoise_, hbheNoise)))
4680  gotHBHERecHitsNoise =
4681  false; //this is a boolean set up to check if there are HBHERecHitsNoise in input root file
4682  if (!(hbheNoise.isValid()))
4683  gotHBHERecHitsNoise = false; //if it is not there, leave it false
4684  if (!gotHBHERecHitsNoise) {
4685  // if(!hbheNoise.isValid()) {
4686  std::cout << " No RecHits HBHENoise collection is found " << std::endl;
4687  } else {
4688  for (HBHERecHitCollection::const_iterator hbheItr = hbheNoise->begin(); hbheItr != hbheNoise->end();
4689  hbheItr++) {
4690  // Recalibration of energy
4691  float icalconst = 1.;
4692  // DetId mydetid = hbheItr->id().rawId();
4693  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4694  HBHERecHit aHit(hbheItr->id(), hbheItr->eraw() * icalconst, hbheItr->time());
4695  // HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
4696  double energyhit = aHit.energy();
4697  DetId id = (*hbheItr).detid();
4698  HcalDetId hid = HcalDetId(id);
4699  int sub = ((hid).rawId() >> 25) & 0x7;
4700 
4701  if (sub == 1)
4702  h_energyhitNoise_HB->Fill(energyhit, 1.);
4703  if (sub == 2)
4704  h_energyhitNoise_HE->Fill(energyhit, 1.);
4705  // if(fabs(energyhit) > 40. ) continue;
4706 
4707  //std::cout<<sub<<std::endl;
4708  if (hid.depth() == 1 && sub == 1 && hid.iphi() == 25) {
4709  if (verbosity < 0)
4710  std::cout << " Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4711  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4712  }
4713  if (hid.depth() == 1 && sub == 2 && hid.iphi() == 25) {
4714  if (verbosity < 0)
4715  std::cout << " Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4716  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4717  }
4718  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4719  if (ieta > 0)
4720  ieta -= 1; // -15 ... -1; 0... 14 for HB
4721  int iphi = hid.iphi() - 1;
4722  int mdepth = hid.depth();
4723  recNoiseEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4724  recNoiseEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4725  recNoiseEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4726  } // hbheNoise
4727  } //hbheNoise.isValid(
4729 
4730  // HF: HFRecHitCollection hfNoise Noise
4732  iEvent.getByToken(tok_hfNoise_, hfNoise);
4733  bool gotHFRecHitsNoise = true;
4734  if (!(iEvent.getByToken(tok_hfNoise_, hfNoise)))
4735  gotHFRecHitsNoise = false; //this is a boolean set up to check if there are HFRecHitsNoise in input root file
4736  if (!(hfNoise.isValid()))
4737  gotHFRecHitsNoise = false; //if it is not there, leave it false
4738  if (!gotHFRecHitsNoise) {
4739  // if(!hfNoise.isValid()) {
4740  std::cout << " No RecHits HFNoise collection is found " << std::endl;
4741  } else {
4742  for (HFRecHitCollection::const_iterator hfItr = hfNoise->begin(); hfItr != hfNoise->end(); hfItr++) {
4743  // Recalibration of energy
4744  float icalconst = 1.;
4745  // DetId mydetid = hfItr->id().rawId();
4746  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4747  HFRecHit aHit(hfItr->id(), hfItr->energy() * icalconst, hfItr->time());
4748  double energyhit = aHit.energy();
4749  DetId id = (*hfItr).detid();
4750  HcalDetId hid = HcalDetId(id);
4751  int sub = ((hid).rawId() >> 25) & 0x7;
4752 
4753  h_energyhitNoise_HF->Fill(energyhit, 1.);
4754  // if(fabs(energyhit) > 40. ) continue;
4755 
4756  //std::cout<<sub<<std::endl;
4757  if (hid.iphi() == 25) {
4758  if (verbosity < 0)
4759  std::cout << "HF Noise,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4760  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4761  }
4762  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4763  if (ieta > 0)
4764  ieta -= 1; // -15 ... -1; 0... 14 for HB
4765  int iphi = hid.iphi() - 1;
4766  int mdepth = hid.depth();
4767  recNoiseEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4768  recNoiseEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4769  recNoiseEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4770  } // hfNoise
4771  } //hfNoise.isValid(
4773 
4777  // HBHE: HBHERecHitCollection hbheSignal Signal
4779  iEvent.getByToken(tok_hbheSignal_, hbheSignal);
4780  bool gotHBHERecHitsSignal = true;
4781  if (!(iEvent.getByToken(tok_hbheSignal_, hbheSignal)))
4782  gotHBHERecHitsSignal =
4783  false; //this is a boolean set up to check if there are HBHERecHitsSignal in input root file
4784  if (!(hbheSignal.isValid()))
4785  gotHBHERecHitsSignal = false; //if it is not there, leave it false
4786  if (!gotHBHERecHitsSignal) {
4787  // if(!hbheSignal.isValid()) {
4788  std::cout << " No RecHits HBHESignal collection is found " << std::endl;
4789  } else {
4790  for (HBHERecHitCollection::const_iterator hbheItr = hbheSignal->begin(); hbheItr != hbheSignal->end();
4791  hbheItr++) {
4792  // Recalibration of energy
4793  float icalconst = 1.;
4794  // DetId mydetid = hbheItr->id().rawId();
4795  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4796  HBHERecHit aHit(hbheItr->id(), hbheItr->eraw() * icalconst, hbheItr->time());
4797  // HBHERecHit aHit(hbheItr->id(), hbheItr->energy() * icalconst, hbheItr->time());
4798  double energyhit = aHit.energy();
4799  DetId id = (*hbheItr).detid();
4800  HcalDetId hid = HcalDetId(id);
4801  int sub = ((hid).rawId() >> 25) & 0x7;
4802 
4803  if (sub == 1)
4804  h_energyhitSignal_HB->Fill(energyhit, 1.);
4805  if (sub == 2)
4806  h_energyhitSignal_HE->Fill(energyhit, 1.);
4807 
4808  //std::cout<<sub<<std::endl;
4809  if (hid.depth() == 1 && sub == 1 && hid.iphi() == 25) {
4810  if (verbosity < 0)
4811  std::cout << "HBHE Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4812  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4813  }
4814  if (hid.depth() == 1 && sub == 2 && hid.iphi() == 25) {
4815  if (verbosity < 0)
4816  std::cout << "HBHE Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4817  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4818  }
4819  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4820  if (ieta > 0)
4821  ieta -= 1; // -15 ... -1; 0... 14 for HB
4822  int iphi = hid.iphi() - 1;
4823  int mdepth = hid.depth();
4824  recSignalEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4825  recSignalEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4826  recSignalEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4827  } // hbheSignal
4828  } //hbheSignal.isValid(
4830 
4831  // HF: HFRecHitCollection hfSignal Signal
4833  iEvent.getByToken(tok_hfSignal_, hfSignal);
4834  bool gotHFRecHitsSignal = true;
4835  if (!(iEvent.getByToken(tok_hfSignal_, hfSignal)))
4836  gotHFRecHitsSignal = false; //this is a boolean set up to check if there are HFRecHitsSignal in input root file
4837  if (!(hfSignal.isValid()))
4838  gotHFRecHitsSignal = false; //if it is not there, leave it false
4839  if (!gotHFRecHitsSignal) {
4840  // if(!hfSignal.isValid()) {
4841  std::cout << " No RecHits HFSignal collection is found " << std::endl;
4842  } else {
4843  for (HFRecHitCollection::const_iterator hfItr = hfSignal->begin(); hfItr != hfSignal->end(); hfItr++) {
4844  // Recalibration of energy
4845  float icalconst = 1.;
4846  // DetId mydetid = hfItr->id().rawId();
4847  // if( theRecalib ) icalconst=myRecalib->getValues(mydetid)->getValue();
4848  HFRecHit aHit(hfItr->id(), hfItr->energy() * icalconst, hfItr->time());
4849  double energyhit = aHit.energy();
4850  DetId id = (*hfItr).detid();
4851  HcalDetId hid = HcalDetId(id);
4852  int sub = ((hid).rawId() >> 25) & 0x7;
4853 
4854  h_energyhitSignal_HF->Fill(energyhit, 1.);
4855  // if(fabs(energyhit) > 40. ) continue;
4856 
4857  //std::cout<<sub<<std::endl;
4858  if (hid.iphi() == 25) {
4859  if (verbosity < 0)
4860  std::cout << "HF Signal,sub = " << sub << " mdepth = " << hid.depth() << " ieta= " << hid.ieta()
4861  << " iphi= " << hid.iphi() << " energyhit= " << energyhit << std::endl;
4862  }
4863  int ieta = hid.ieta(); // -15 ... -1; 1... 15 for HB
4864  if (ieta > 0)
4865  ieta -= 1; // -15 ... -1; 0... 14 for HB
4866  int iphi = hid.iphi() - 1;
4867  int mdepth = hid.depth();
4868  recSignalEnergy0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
4869  recSignalEnergy1[sub - 1][mdepth - 1][ieta + 41][iphi] += energyhit;
4870  recSignalEnergy2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(energyhit, 2);
4871  } // hfSignal
4872  } //hfSignal.isValid(
4874 
4876  // END of RecHits for phi-symmetry monitoring of calibration group
4877  } // flagIterativeMethodCalibrationGroupReco_ > 0
4879 
4881 
4893  // // // // // // // tocdefault tocampl tocamplchannel: calibration group, Iterative method, coding start 29.08.2019
4894  for (int k0 = 0; k0 < nsub; k0++) {
4895  // HE only, temporary
4896  if (k0 == 1) {
4897  for (int k1 = 0; k1 < ndepth; k1++) {
4898  // k2: 0-81
4899  for (int k2 = 0; k2 < neta; k2++) {
4900  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
4901  int k2plot = k2 - 41;
4902  int kkk = k2plot; //if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
4903  //preparation for PHI normalization:
4904  double sumoverphi = 0;
4905  int nsumoverphi = 0;
4906  for (int k3 = 0; k3 < nphi; k3++) {
4907  if (tocamplchannel[k0][k1][k2][k3] != 0) {
4908  sumoverphi += tocamplchannel[k0][k1][k2][k3];
4909  ++nsumoverphi;
4910  if (verbosity < 0)
4911  std::cout << "==== nsumoverphi = " << nsumoverphi << " sumoverphi = " << sumoverphi
4912  << " k1 = " << k1 << " k2 = " << k2 << " kkk = " << kkk << " k3 = " << k3 << std::endl;
4913  } //if != 0
4914  } //k3
4915  // PHI normalization into new massive && filling plots:
4916  for (int k3 = 0; k3 < nphi; k3++) {
4917  if (nsumoverphi != 0) {
4918  maprphinorm[k0][k1][k2][k3] = tocamplchannel[k0][k1][k2][k3] / (sumoverphi / nsumoverphi);
4919  if (verbosity < 0)
4920  std::cout << "nsumoverphi= " << nsumoverphi << " sumoverphi= " << sumoverphi << " k1= " << k1
4921  << " k2= " << k2 << " kkk= " << kkk << " k3= " << k3
4922  << " maprphinorm= " << maprphinorm[k0][k1][k2][k3] << std::endl;
4923  if (k1 == 0) {
4924  h_mapenophinorm_HE1->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4925  h_mapenophinorm2_HE1->Fill(
4926  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4927  h_maprphinorm_HE1->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4928  h_maprphinorm2_HE1->Fill(
4929  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4930  h_maprphinorm0_HE1->Fill(double(kkk), double(k3), 1.);
4931  }
4932  if (k1 == 1) {
4933  h_mapenophinorm_HE2->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4934  h_mapenophinorm2_HE2->Fill(
4935  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4936  h_maprphinorm_HE2->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4937  h_maprphinorm2_HE2->Fill(
4938  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4939  h_maprphinorm0_HE2->Fill(double(kkk), double(k3), 1.);
4940  }
4941  if (k1 == 2) {
4942  h_mapenophinorm_HE3->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4943  h_mapenophinorm2_HE3->Fill(
4944  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4945  h_maprphinorm_HE3->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4946  h_maprphinorm2_HE3->Fill(
4947  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4948  h_maprphinorm0_HE3->Fill(double(kkk), double(k3), 1.);
4949  }
4950  if (k1 == 3) {
4951  h_mapenophinorm_HE4->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4952  h_mapenophinorm2_HE4->Fill(
4953  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4954  h_maprphinorm_HE4->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4955  h_maprphinorm2_HE4->Fill(
4956  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4957  h_maprphinorm0_HE4->Fill(double(kkk), double(k3), 1.);
4958  }
4959  if (k1 == 4) {
4960  h_mapenophinorm_HE5->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4961  h_mapenophinorm2_HE5->Fill(
4962  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4963  h_maprphinorm_HE5->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4964  h_maprphinorm2_HE5->Fill(
4965  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4966  h_maprphinorm0_HE5->Fill(double(kkk), double(k3), 1.);
4967  }
4968  if (k1 == 5) {
4969  h_mapenophinorm_HE6->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4970  h_mapenophinorm2_HE6->Fill(
4971  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4972  h_maprphinorm_HE6->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4973  h_maprphinorm2_HE6->Fill(
4974  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4975  h_maprphinorm0_HE6->Fill(double(kkk), double(k3), 1.);
4976  }
4977  if (k1 == 6) {
4978  h_mapenophinorm_HE7->Fill(double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3]);
4979  h_mapenophinorm2_HE7->Fill(
4980  double(kkk), double(k3), tocamplchannel[k0][k1][k2][k3] * tocamplchannel[k0][k1][k2][k3]);
4981  h_maprphinorm_HE7->Fill(double(kkk), double(k3), maprphinorm[k0][k1][k2][k3]);
4982  h_maprphinorm2_HE7->Fill(
4983  double(kkk), double(k3), maprphinorm[k0][k1][k2][k3] * maprphinorm[k0][k1][k2][k3]);
4984  h_maprphinorm0_HE7->Fill(double(kkk), double(k3), 1.);
4985  }
4986  } //if nsumoverphi != 0
4987  } //k3
4988  } //k2
4989  } //k1
4990  } //if k0 == 1 HE
4991  } //k0
4992  // // // // // // // // // // // // // // // // // // // // // // // //
4993  // // // // // // // amplitudechannel amplitudechannel amplitudechannel: calibration group, Iterative method, coding start 11.11.2019
4994  for (int k0 = 0; k0 < nsub; k0++) {
4995  // HB:
4996  if (k0 == 0) {
4997  for (int k1 = 0; k1 < ndepth; k1++) {
4998  // k2: 0-81
4999  for (int k2 = 0; k2 < neta; k2++) {
5000  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5001  int k2plot = k2 - 41;
5002  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5003  for (int k3 = 0; k3 < nphi; k3++) {
5004  if (k1 == 0) {
5005  h_amplitudechannel0_HB1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5006  h_amplitudechannel1_HB1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5007  h_amplitudechannel2_HB1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5008  }
5009  if (k1 == 1) {
5010  h_amplitudechannel0_HB2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5011  h_amplitudechannel1_HB2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5012  h_amplitudechannel2_HB2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5013  }
5014  if (k1 == 2) {
5015  h_amplitudechannel0_HB3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5016  h_amplitudechannel1_HB3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5017  h_amplitudechannel2_HB3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5018  }
5019  if (k1 == 3) {
5020  h_amplitudechannel0_HB4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5021  h_amplitudechannel1_HB4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5022  h_amplitudechannel2_HB4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5023  }
5024  } //k3
5025  } //k2
5026  } //k1
5027  } //if k0 == 0 HB
5028 
5029  // HE:
5030  if (k0 == 1) {
5031  for (int k1 = 0; k1 < ndepth; k1++) {
5032  // k2: 0-81
5033  for (int k2 = 0; k2 < neta; k2++) {
5034  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5035  int k2plot = k2 - 41;
5036  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5037  for (int k3 = 0; k3 < nphi; k3++) {
5038  if (k1 == 0) {
5039  h_amplitudechannel0_HE1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5040  h_amplitudechannel1_HE1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5041  h_amplitudechannel2_HE1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5042  }
5043  if (k1 == 1) {
5044  h_amplitudechannel0_HE2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5045  h_amplitudechannel1_HE2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5046  h_amplitudechannel2_HE2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5047  }
5048  if (k1 == 2) {
5049  h_amplitudechannel0_HE3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5050  h_amplitudechannel1_HE3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5051  h_amplitudechannel2_HE3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5052  }
5053  if (k1 == 3) {
5054  h_amplitudechannel0_HE4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5055  h_amplitudechannel1_HE4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5056  h_amplitudechannel2_HE4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5057  }
5058  if (k1 == 4) {
5059  h_amplitudechannel0_HE5->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5060  h_amplitudechannel1_HE5->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5061  h_amplitudechannel2_HE5->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5062  }
5063  if (k1 == 5) {
5064  h_amplitudechannel0_HE6->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5065  h_amplitudechannel1_HE6->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5066  h_amplitudechannel2_HE6->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5067  }
5068  if (k1 == 6) {
5069  h_amplitudechannel0_HE7->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5070  h_amplitudechannel1_HE7->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5071  h_amplitudechannel2_HE7->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5072  }
5073  } //k3
5074  } //k2
5075  } //k1
5076  } //if k0 == 1 HE
5077 
5078  // HF: 4 depthes for Digis and only 2 - for Reco !!!
5079  if (k0 == 3) {
5080  for (int k1 = 0; k1 < ndepth; k1++) {
5081  // k2: 0-81
5082  for (int k2 = 0; k2 < neta; k2++) {
5083  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5084  int k2plot = k2 - 41;
5085  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5086  for (int k3 = 0; k3 < nphi; k3++) {
5087  if (k1 == 0) {
5088  h_amplitudechannel0_HF1->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5089  h_amplitudechannel1_HF1->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5090  h_amplitudechannel2_HF1->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5091  }
5092  if (k1 == 1) {
5093  h_amplitudechannel0_HF2->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5094  h_amplitudechannel1_HF2->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5095  h_amplitudechannel2_HF2->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5096  }
5097  if (k1 == 2) {
5098  h_amplitudechannel0_HF3->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5099  h_amplitudechannel1_HF3->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5100  h_amplitudechannel2_HF3->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5101  }
5102  if (k1 == 3) {
5103  h_amplitudechannel0_HF4->Fill(double(kkk), double(k3), amplitudechannel0[k0][k1][k2][k3]);
5104  h_amplitudechannel1_HF4->Fill(double(kkk), double(k3), amplitudechannel[k0][k1][k2][k3]);
5105  h_amplitudechannel2_HF4->Fill(double(kkk), double(k3), amplitudechannel2[k0][k1][k2][k3]);
5106  }
5107  } //k3
5108  } //k2
5109  } //k1
5110  } //if k0 == 3 HF
5111 
5112  } //k0
5113 
5114  } // if(flagIterativeMethodCalibrationGroupDigi
5115 
5125  //
5126  for (int k0 = 0; k0 < nsub; k0++) {
5127  // HB:
5128  if (k0 == 0) {
5129  for (int k1 = 0; k1 < ndepth; k1++) {
5130  // k2: 0-81
5131  for (int k2 = 0; k2 < neta; k2++) {
5132  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5133  int k2plot = k2 - 41;
5134  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5135  for (int k3 = 0; k3 < nphi; k3++) {
5136  if (k1 == 0) {
5137  h_recSignalEnergy0_HB1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5138  h_recSignalEnergy1_HB1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5139  h_recSignalEnergy2_HB1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5140  h_recNoiseEnergy0_HB1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5141  h_recNoiseEnergy1_HB1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5142  h_recNoiseEnergy2_HB1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5143  }
5144  if (k1 == 1) {
5145  h_recSignalEnergy0_HB2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5146  h_recSignalEnergy1_HB2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5147  h_recSignalEnergy2_HB2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5148  h_recNoiseEnergy0_HB2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5149  h_recNoiseEnergy1_HB2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5150  h_recNoiseEnergy2_HB2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5151  }
5152  if (k1 == 2) {
5153  h_recSignalEnergy0_HB3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5154  h_recSignalEnergy1_HB3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5155  h_recSignalEnergy2_HB3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5156  h_recNoiseEnergy0_HB3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5157  h_recNoiseEnergy1_HB3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5158  h_recNoiseEnergy2_HB3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5159  }
5160  if (k1 == 3) {
5161  h_recSignalEnergy0_HB4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5162  h_recSignalEnergy1_HB4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5163  h_recSignalEnergy2_HB4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5164  h_recNoiseEnergy0_HB4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5165  h_recNoiseEnergy1_HB4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5166  h_recNoiseEnergy2_HB4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5167  }
5168  } //k3
5169  } //k2
5170  } //k1
5171  } //if k0 == 0 HB
5172 
5173  // HE:
5174  if (k0 == 1) {
5175  for (int k1 = 0; k1 < ndepth; k1++) {
5176  // k2: 0-81
5177  for (int k2 = 0; k2 < neta; k2++) {
5178  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5179  int k2plot = k2 - 41;
5180  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5181  for (int k3 = 0; k3 < nphi; k3++) {
5182  if (k1 == 0) {
5183  h_recSignalEnergy0_HE1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5184  h_recSignalEnergy1_HE1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5185  h_recSignalEnergy2_HE1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5186  h_recNoiseEnergy0_HE1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5187  h_recNoiseEnergy1_HE1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5188  h_recNoiseEnergy2_HE1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5189  }
5190  if (k1 == 1) {
5191  h_recSignalEnergy0_HE2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5192  h_recSignalEnergy1_HE2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5193  h_recSignalEnergy2_HE2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5194  h_recNoiseEnergy0_HE2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5195  h_recNoiseEnergy1_HE2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5196  h_recNoiseEnergy2_HE2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5197  }
5198  if (k1 == 2) {
5199  h_recSignalEnergy0_HE3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5200  h_recSignalEnergy1_HE3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5201  h_recSignalEnergy2_HE3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5202  h_recNoiseEnergy0_HE3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5203  h_recNoiseEnergy1_HE3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5204  h_recNoiseEnergy2_HE3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5205  }
5206  if (k1 == 3) {
5207  h_recSignalEnergy0_HE4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5208  h_recSignalEnergy1_HE4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5209  h_recSignalEnergy2_HE4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5210  h_recNoiseEnergy0_HE4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5211  h_recNoiseEnergy1_HE4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5212  h_recNoiseEnergy2_HE4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5213  }
5214  if (k1 == 4) {
5215  h_recSignalEnergy0_HE5->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5216  h_recSignalEnergy1_HE5->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5217  h_recSignalEnergy2_HE5->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5218  h_recNoiseEnergy0_HE5->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5219  h_recNoiseEnergy1_HE5->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5220  h_recNoiseEnergy2_HE5->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5221  }
5222  if (k1 == 5) {
5223  h_recSignalEnergy0_HE6->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5224  h_recSignalEnergy1_HE6->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5225  h_recSignalEnergy2_HE6->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5226  h_recNoiseEnergy0_HE6->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5227  h_recNoiseEnergy1_HE6->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5228  h_recNoiseEnergy2_HE6->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5229  }
5230  if (k1 == 6) {
5231  h_recSignalEnergy0_HE7->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5232  h_recSignalEnergy1_HE7->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5233  h_recSignalEnergy2_HE7->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5234  h_recNoiseEnergy0_HE7->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5235  h_recNoiseEnergy1_HE7->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5236  h_recNoiseEnergy2_HE7->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5237  }
5238  } //k3
5239  } //k2
5240  } //k1
5241  } //if k0 == 1 HE
5242 
5243  // HF: 4 depthes for Digis and only 2 - for Reco !!! ('ve tried to enter 4 for reco since 31.10.2021 AZ)
5244  if (k0 == 3) {
5245  for (int k1 = 0; k1 < ndepth; k1++) {
5246  // k2: 0-81
5247  for (int k2 = 0; k2 < neta; k2++) {
5248  // int k2plot = k2-41;int kkk = k2; if(k2plot >0 ) kkk=k2+1; //-41 +41 !=0
5249  int k2plot = k2 - 41;
5250  int kkk = k2plot; // if(k2plot >=0 ) kkk=k2plot+1; //-41 +40 !=0
5251  for (int k3 = 0; k3 < nphi; k3++) {
5252  if (k1 == 0) {
5253  h_recSignalEnergy0_HF1->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5254  h_recSignalEnergy1_HF1->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5255  h_recSignalEnergy2_HF1->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5256  h_recNoiseEnergy0_HF1->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5257  h_recNoiseEnergy1_HF1->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5258  h_recNoiseEnergy2_HF1->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5259  }
5260  if (k1 == 1) {
5261  h_recSignalEnergy0_HF2->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5262  h_recSignalEnergy1_HF2->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5263  h_recSignalEnergy2_HF2->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5264  h_recNoiseEnergy0_HF2->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5265  h_recNoiseEnergy1_HF2->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5266  h_recNoiseEnergy2_HF2->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5267  }
5268  // AZ 31.10.2021: k1=3 and 4 added for HF recoSignal,recNoise
5269  if (k1 == 2) {
5270  h_recSignalEnergy0_HF3->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5271  h_recSignalEnergy1_HF3->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5272  h_recSignalEnergy2_HF3->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5273  h_recNoiseEnergy0_HF3->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5274  h_recNoiseEnergy1_HF3->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5275  h_recNoiseEnergy2_HF3->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5276  }
5277  if (k1 == 3) {
5278  h_recSignalEnergy0_HF4->Fill(double(kkk), double(k3), recSignalEnergy0[k0][k1][k2][k3]);
5279  h_recSignalEnergy1_HF4->Fill(double(kkk), double(k3), recSignalEnergy1[k0][k1][k2][k3]);
5280  h_recSignalEnergy2_HF4->Fill(double(kkk), double(k3), recSignalEnergy2[k0][k1][k2][k3]);
5281  h_recNoiseEnergy0_HF4->Fill(double(kkk), double(k3), recNoiseEnergy0[k0][k1][k2][k3]);
5282  h_recNoiseEnergy1_HF4->Fill(double(kkk), double(k3), recNoiseEnergy1[k0][k1][k2][k3]);
5283  h_recNoiseEnergy2_HF4->Fill(double(kkk), double(k3), recNoiseEnergy2[k0][k1][k2][k3]);
5284  }
5285  } //k3
5286  } //k2
5287  } //k1
5288  } //if k0 == 3 HF
5289 
5290  } //k0
5291 
5292  } // if(flagIterativeMethodCalibrationGroupReco
5293 
5295 
5297  if (flagLaserRaddam_ > 1) {
5299  for (int k1 = 0; k1 < ndepth; k1++) {
5300  for (int k2 = 0; k2 < neta; k2++) {
5301  for (int k3 = 0; k3 < nphi; k3++) {
5302  if (mapRADDAM0_HE[k1][k2][k3] != 0) {
5303  // ---------------------------------------- D2 sum over phi before!!! any dividing:
5304  mapRADDAM_HED2[k1][k2] += mapRADDAM_HE[k1][k2][k3];
5305  // N phi sectors w/ digihits
5306  ++mapRADDAM_HED20[k1][k2];
5307  } //if
5308  } //for
5309  } //for
5310  } //for
5311 
5313  for (int k1 = 0; k1 < ndepth; k1++) {
5314  for (int k2 = 0; k2 < neta; k2++) {
5315  if (mapRADDAM_HED20[k1][k2] != 0) {
5316  // validation of channels at eta16:
5317  if (k1 == 2 && k2 == 25) {
5319  h_Eta16Depth3RADDAM_HED2->Fill(mapRADDAM_HED2[k1][k2] / mapRADDAM_HED20[k1][k2]);
5321  } else if (k1 == 2 && k2 == 56) {
5323  h_Eta16Depth3RADDAM_HED2P->Fill(mapRADDAM_HED2[k1][k2] / mapRADDAM_HED20[k1][k2]);
5325  } else {
5329  }
5331  mapRADDAM_HED2[k1][k2] /= mapRADDAM_HED20[k1][k2];
5332  } // if(mapRADDAM_HED20[k1][k2] != 0
5333  } //for
5334  } //for
5336  for (int k1 = 0; k1 < ndepth; k1++) {
5337  for (int k2 = 0; k2 < neta; k2++) {
5338  if (k1 == 2 && (k2 == 25 || k2 == 56)) {
5339  } else {
5340  // if(k2!=25 && k2!=56) {
5341  int k2plot = k2 - 41;
5342  int kkk = k2;
5343  if (k2plot > 0)
5344  kkk = k2 + 1;
5345  int kk2 = 25;
5346  if (k2plot > 0)
5347  kk2 = 56;
5348  if (mapRADDAM_HED2[k1][k2] != 0. && mapRADDAM_HED2[2][kk2] != 0) {
5349  mapRADDAM_HED2[k1][k2] /= mapRADDAM_HED2[2][kk2];
5350  // (d1 & eta 17-29) L1
5351  int LLLLLL111111 = 0;
5352  if ((k1 == 0 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 30))
5353  LLLLLL111111 = 1;
5354  // (d2 & eta 17-26) && (d3 & eta 27-28) L2
5355  int LLLLLL222222 = 0;
5356  if ((k1 == 1 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 27) ||
5357  (k1 == 2 && fabs(kkk - 41) > 26 && fabs(kkk - 41) < 29))
5358  LLLLLL222222 = 1;
5359  //
5360  if (LLLLLL111111 == 1) {
5361  h_sigLayer1RADDAM5_HED2->Fill(double(kkk - 41), mapRADDAM_HED2[k1][k2]);
5362  h_sigLayer1RADDAM6_HED2->Fill(double(kkk - 41), 1.);
5363  }
5364  if (LLLLLL222222 == 1) {
5365  h_sigLayer2RADDAM5_HED2->Fill(double(kkk - 41), mapRADDAM_HED2[k1][k2]);
5366  h_sigLayer2RADDAM6_HED2->Fill(double(kkk - 41), 1.);
5367  }
5368  } //if
5369  } // if(k2!=25 && k2!=56
5370  } //for
5371  } //for
5372 
5374 
5375  //------------------------------------------------------ aver per eta 16(depth=3-> k1=2, k2=16(15) :
5377  for (int k1 = 0; k1 < ndepth; k1++) {
5378  for (int k2 = 0; k2 < neta; k2++) {
5379  if (k1 == 2 && (k2 == 25 || k2 == 56)) {
5380  } else {
5381  int k2plot = k2 - 41;
5382  int kk2 = 25;
5383  if (k2plot > 0)
5384  kk2 = 56;
5385  int kkk = k2;
5386  if (k2plot > 0)
5387  kkk = k2 + 1;
5388  for (int k3 = 0; k3 < nphi; k3++) {
5389  if (mapRADDAM_HE[k1][k2][k3] != 0. && mapRADDAM_HE[2][kk2][k3] != 0) {
5390  mapRADDAM_HE[k1][k2][k3] /= mapRADDAM_HE[2][kk2][k3];
5391  int LLLLLL111111 = 0;
5392  if ((k1 == 0 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 30))
5393  LLLLLL111111 = 1;
5394  int LLLLLL222222 = 0;
5395  if ((k1 == 1 && fabs(kkk - 41) > 16 && fabs(kkk - 41) < 27) ||
5396  (k1 == 2 && fabs(kkk - 41) > 26 && fabs(kkk - 41) < 29))
5397  LLLLLL222222 = 1;
5398  if (LLLLLL111111 == 1) {
5399  h_sigLayer1RADDAM5_HE->Fill(double(kkk - 41), mapRADDAM_HE[k1][k2][k3]);
5400  h_sigLayer1RADDAM6_HE->Fill(double(kkk - 41), 1.);
5401  }
5402  if (LLLLLL222222 == 1) {
5403  h_sigLayer2RADDAM5_HE->Fill(double(kkk - 41), mapRADDAM_HE[k1][k2][k3]);
5404  h_sigLayer2RADDAM6_HE->Fill(double(kkk - 41), 1.);
5405  }
5406  } //if
5407  } //for
5408  } // if(k2!=25 && k2!=56
5409  } //for
5410  } //for
5411  //
5413  for (int k1 = 0; k1 < ndepth; k1++) {
5414  for (int k2 = 0; k2 < neta; k2++) {
5415  mapRADDAM_HED2[k1][k2] = 0.;
5416  mapRADDAM_HED20[k1][k2] = 0.;
5417  for (int k3 = 0; k3 < nphi; k3++) {
5418  mapRADDAM_HE[k1][k2][k3] = 0.;
5419  mapRADDAM0_HE[k1][k2][k3] = 0;
5420  } //for
5421  } //for
5422  } //for
5423 
5425  } // END TREATMENT : if(flagLaserRaddam_ == 1
5427 
5429  // // // // // // //sumamplitudes:
5431  for (int k0 = 0; k0 < nsub; k0++) {
5432  int sumofchannels = 0;
5433  double sumamplitudesubdet = 0.;
5434  int sumofchannels0 = 0;
5435  double sumamplitudesubdet0 = 0.;
5436  for (int k2 = 0; k2 < neta; k2++) {
5437  for (int k3 = 0; k3 < nphi; k3++) {
5438  // HB
5439  if (k0 == 0) {
5440  double sumamplitudechannel_HB = amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3];
5441  h_sumamplitudechannel_HB->Fill(sumamplitudechannel_HB);
5442  if (sumamplitudechannel_HB > 80.) {
5443  sumamplitudesubdet += sumamplitudechannel_HB;
5444  sumofchannels++;
5445  } else {
5446  if (sumamplitudechannel_HB > 0.) {
5447  sumamplitudesubdet0 += sumamplitudechannel_HB;
5448  sumofchannels0++;
5449  }
5450  }
5451  } //
5452 
5453  // HE
5454  if (k0 == 1) {
5455  double sumamplitudechannel_HE =
5456  amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3] + amplitudechannel[k0][2][k2][k3];
5457  h_sumamplitudechannel_HE->Fill(sumamplitudechannel_HE);
5458  if (sumamplitudechannel_HE > 200.) {
5459  sumamplitudesubdet += sumamplitudechannel_HE;
5460  sumofchannels++;
5461  } else {
5462  if (sumamplitudechannel_HE > 0.) {
5463  sumamplitudesubdet0 += sumamplitudechannel_HE;
5464  sumofchannels0++;
5465  }
5466  }
5467  } //
5468 
5469  // HO
5470  if (k0 == 2) {
5471  double sumamplitudechannel_HO = amplitudechannel[k0][3][k2][k3];
5472  h_sumamplitudechannel_HO->Fill(sumamplitudechannel_HO);
5473  if (sumamplitudechannel_HO > 1200.) {
5474  sumamplitudesubdet += sumamplitudechannel_HO;
5475  sumofchannels++;
5476  } else {
5477  if (sumamplitudechannel_HO > 0.) {
5478  sumamplitudesubdet0 += sumamplitudechannel_HO;
5479  sumofchannels0++;
5480  }
5481  }
5482  } //
5483  // HF
5484  if (k0 == 3) {
5485  double sumamplitudechannel_HF = amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3];
5486  h_sumamplitudechannel_HF->Fill(sumamplitudechannel_HF);
5487  if (sumamplitudechannel_HF > 600.) {
5488  sumamplitudesubdet += sumamplitudechannel_HF;
5489  sumofchannels++;
5490  } else {
5491  if (sumamplitudechannel_HF > 0.) {
5492  sumamplitudesubdet0 += sumamplitudechannel_HF;
5493  sumofchannels0++;
5494  }
5495  }
5496  } //
5497 
5498  } //k3
5499  } //k2
5500  // }//k1
5501  // SA of each sub-detector DONE. Then: summarize or find maximum throught events of LS
5502  if (k0 == 0) {
5503  h_eventamplitude_HB->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5504  h_eventoccupancy_HB->Fill((sumofchannels + sumofchannels0));
5505  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM1)
5506  maxxSUM1 = sumamplitudesubdet + sumamplitudesubdet0;
5507  if ((sumofchannels + sumofchannels0) > maxxOCCUP1)
5508  maxxOCCUP1 = sumofchannels + sumofchannels0;
5509  averSIGNALoccupancy_HB += sumofchannels;
5510  averSIGNALsumamplitude_HB += sumamplitudesubdet;
5511  averNOSIGNALoccupancy_HB += sumofchannels0;
5512  averNOSIGNALsumamplitude_HB += sumamplitudesubdet0;
5513  if ((sumamplitudesubdet + sumamplitudesubdet0) > 60000) {
5514  for (int k2 = 0; k2 < neta; k2++) {
5515  for (int k3 = 0; k3 < nphi; k3++) {
5516  int ieta = k2 - 41;
5518  if (amplitudechannel[k0][0][k2][k3] != 0.) {
5519  h_2DAtaildepth1_HB->Fill(double(ieta), double(k3), amplitudechannel[k0][0][k2][k3]);
5520  h_2D0Ataildepth1_HB->Fill(double(ieta), double(k3), 1.);
5521  }
5523  if (amplitudechannel[k0][1][k2][k3] != 0.) {
5524  h_2DAtaildepth2_HB->Fill(double(ieta), double(k3), amplitudechannel[k0][1][k2][k3]);
5525  h_2D0Ataildepth2_HB->Fill(double(ieta), double(k3), 1.);
5526  }
5527  } //for
5528  } //for
5529  } //>60000
5530  } //HB
5531  if (k0 == 1) {
5532  h_eventamplitude_HE->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5533  h_eventoccupancy_HE->Fill((sumofchannels + sumofchannels0));
5534  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM2)
5535  maxxSUM2 = sumamplitudesubdet + sumamplitudesubdet0;
5536  if ((sumofchannels + sumofchannels0) > maxxOCCUP2)
5537  maxxOCCUP2 = sumofchannels + sumofchannels0;
5538  averSIGNALoccupancy_HE += sumofchannels;
5539  averSIGNALsumamplitude_HE += sumamplitudesubdet;
5540  averNOSIGNALoccupancy_HE += sumofchannels0;
5541  averNOSIGNALsumamplitude_HE += sumamplitudesubdet0;
5542  } //HE
5543  if (k0 == 2) {
5544  h_eventamplitude_HO->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5545  h_eventoccupancy_HO->Fill((sumofchannels + sumofchannels0));
5546  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM3)
5547  maxxSUM3 = sumamplitudesubdet + sumamplitudesubdet0;
5548  if ((sumofchannels + sumofchannels0) > maxxOCCUP3)
5549  maxxOCCUP3 = sumofchannels + sumofchannels0;
5550  averSIGNALoccupancy_HO += sumofchannels;
5551  averSIGNALsumamplitude_HO += sumamplitudesubdet;
5552  averNOSIGNALoccupancy_HO += sumofchannels0;
5553  averNOSIGNALsumamplitude_HO += sumamplitudesubdet0;
5554  } //HO
5555  if (k0 == 3) {
5556  h_eventamplitude_HF->Fill((sumamplitudesubdet + sumamplitudesubdet0));
5557  h_eventoccupancy_HF->Fill((sumofchannels + sumofchannels0));
5558  if ((sumamplitudesubdet + sumamplitudesubdet0) > maxxSUM4)
5559  maxxSUM4 = sumamplitudesubdet + sumamplitudesubdet0;
5560  if ((sumofchannels + sumofchannels0) > maxxOCCUP4)
5561  maxxOCCUP4 = sumofchannels + sumofchannels0;
5562  averSIGNALoccupancy_HF += sumofchannels;
5563  averSIGNALsumamplitude_HF += sumamplitudesubdet;
5564  averNOSIGNALoccupancy_HF += sumofchannels0;
5565  averNOSIGNALsumamplitude_HF += sumamplitudesubdet0;
5566  } //HF
5567  } //k0
5568 
5572  int eeeeee;
5573  eeeeee = lscounterM1;
5574  if (flagtoaskrunsorls_ == 0)
5575  eeeeee = runcounter;
5576 
5578  for (int k0 = 0; k0 < nsub; k0++) {
5581  for (int k1 = 0; k1 < ndepth; k1++) {
5583  int nbadchannels = 0;
5584  for (int k2 = 0; k2 < neta; k2++) {
5585  for (int k3 = 0; k3 < nphi; k3++) {
5586  if (badchannels[k0][k1][k2][k3] != 0)
5587  ++nbadchannels;
5588  } //k3
5589  } //k2
5591  //HB
5592  if (k0 == 0) {
5593  if (k1 == 0) {
5594  h_nbadchannels_depth1_HB->Fill(float(nbadchannels));
5595  h_runnbadchannels_depth1_HB->Fill(float(eeeeee), float(nbadchannels));
5596  if (nbadchannels > lsdep_cut1_peak_HBdepth1_)
5597  h_runnbadchannelsC_depth1_HB->Fill(float(eeeeee), float(nbadchannels));
5598  if (nbadchannels != 0)
5599  h_runbadrate_depth1_HB->Fill(float(eeeeee), 1.);
5600  if (nbadchannels > lsdep_cut3_max_HBdepth1_)
5601  h_runbadrateC_depth1_HB->Fill(float(eeeeee), 1.);
5602  h_bcnnbadchannels_depth1_HB->Fill(float(bcn), float(nbadchannels));
5603  h_runbadrate0_depth1_HB->Fill(float(eeeeee), 1.);
5604  h_bcnbadrate0_depth1_HB->Fill(float(bcn), 1.);
5605  }
5606  if (k1 == 1) {
5607  h_nbadchannels_depth2_HB->Fill(float(nbadchannels));
5608  h_runnbadchannels_depth2_HB->Fill(float(eeeeee), float(nbadchannels));
5609  if (nbadchannels > lsdep_cut1_peak_HBdepth2_)
5610  h_runnbadchannelsC_depth2_HB->Fill(float(eeeeee), float(nbadchannels));
5611  if (nbadchannels != 0)
5612  h_runbadrate_depth2_HB->Fill(float(eeeeee), 1.);
5613  if (nbadchannels > lsdep_cut3_max_HBdepth2_)
5614  h_runbadrateC_depth2_HB->Fill(float(eeeeee), 1.);
5615  h_bcnnbadchannels_depth2_HB->Fill(float(bcn), float(nbadchannels));
5616  h_runbadrate0_depth2_HB->Fill(float(eeeeee), 1.);
5617  h_bcnbadrate0_depth2_HB->Fill(float(bcn), 1.);
5618  }
5619  if (k1 == 2) {
5620  h_nbadchannels_depth3_HB->Fill(float(nbadchannels));
5621  h_runnbadchannels_depth3_HB->Fill(float(eeeeee), float(nbadchannels));
5622  if (nbadchannels > 0.)
5623  h_runnbadchannelsC_depth3_HB->Fill(float(eeeeee), float(nbadchannels));
5624  if (nbadchannels != 0)
5625  h_runbadrate_depth3_HB->Fill(float(eeeeee), 1.);
5626  if (nbadchannels > 0.)
5627  h_runbadrateC_depth3_HB->Fill(float(eeeeee), 1.);
5628  h_runbadrate0_depth3_HB->Fill(float(eeeeee), 1.);
5629  }
5630  if (k1 == 3) {
5631  h_nbadchannels_depth4_HB->Fill(float(nbadchannels));
5632  h_runnbadchannels_depth4_HB->Fill(float(eeeeee), float(nbadchannels));
5633  if (nbadchannels > 0.)
5634  h_runnbadchannelsC_depth4_HB->Fill(float(eeeeee), float(nbadchannels));
5635  if (nbadchannels != 0)
5636  h_runbadrate_depth4_HB->Fill(float(eeeeee), 1.);
5637  if (nbadchannels > 0.)
5638  h_runbadrateC_depth4_HB->Fill(float(eeeeee), 1.);
5639  h_runbadrate0_depth4_HB->Fill(float(eeeeee), 1.);
5640  }
5641  }
5642  //HE
5643  if (k0 == 1) {
5644  if (k1 == 0) {
5645  h_nbadchannels_depth1_HE->Fill(float(nbadchannels));
5646  h_runnbadchannels_depth1_HE->Fill(float(eeeeee), float(nbadchannels));
5647  if (nbadchannels > lsdep_cut1_peak_HEdepth1_)
5648  h_runnbadchannelsC_depth1_HE->Fill(float(eeeeee), float(nbadchannels));
5649  if (nbadchannels != 0)
5650  h_runbadrate_depth1_HE->Fill(float(eeeeee), 1.);
5651  if (nbadchannels > lsdep_cut3_max_HEdepth1_)
5652  h_runbadrateC_depth1_HE->Fill(float(eeeeee), 1.);
5653  h_bcnnbadchannels_depth1_HE->Fill(float(bcn), float(nbadchannels));
5654  h_runbadrate0_depth1_HE->Fill(float(eeeeee), 1.);
5655  h_bcnbadrate0_depth1_HE->Fill(float(bcn), 1.);
5656  }
5657  if (k1 == 1) {
5658  h_nbadchannels_depth2_HE->Fill(float(nbadchannels));
5659  h_runnbadchannels_depth2_HE->Fill(float(eeeeee), float(nbadchannels));
5660  if (nbadchannels > lsdep_cut1_peak_HEdepth2_)
5661  h_runnbadchannelsC_depth2_HE->Fill(float(eeeeee), float(nbadchannels));
5662  if (nbadchannels != 0)
5663  h_runbadrate_depth2_HE->Fill(float(eeeeee), 1.);
5664  if (nbadchannels > lsdep_cut3_max_HEdepth2_)
5665  h_runbadrateC_depth2_HE->Fill(float(eeeeee), 1.);
5666  h_bcnnbadchannels_depth2_HE->Fill(float(bcn), float(nbadchannels));
5667  h_runbadrate0_depth2_HE->Fill(float(eeeeee), 1.);
5668  h_bcnbadrate0_depth2_HE->Fill(float(bcn), 1.);
5669  }
5670  if (k1 == 2) {
5671  h_nbadchannels_depth3_HE->Fill(float(nbadchannels));
5672  h_runnbadchannels_depth3_HE->Fill(float(eeeeee), float(nbadchannels));
5673  if (nbadchannels > lsdep_cut1_peak_HEdepth3_)
5674  h_runnbadchannelsC_depth3_HE->Fill(float(eeeeee), float(nbadchannels));
5675  if (nbadchannels != 0)
5676  h_runbadrate_depth3_HE->Fill(float(eeeeee), 1.);
5677  if (nbadchannels > lsdep_cut3_max_HEdepth3_)
5678  h_runbadrateC_depth3_HE->Fill(float(eeeeee), 1.);
5679  h_bcnnbadchannels_depth3_HE->Fill(float(bcn), float(nbadchannels));
5680  h_runbadrate0_depth3_HE->Fill(float(eeeeee), 1.);
5681  h_bcnbadrate0_depth3_HE->Fill(float(bcn), 1.);
5682  }
5683  if (k1 == 3) {
5684  h_nbadchannels_depth4_HE->Fill(float(nbadchannels));
5685  h_runnbadchannels_depth4_HE->Fill(float(eeeeee), float(nbadchannels));
5686  if (nbadchannels > 0.)
5687  h_runnbadchannelsC_depth4_HE->Fill(float(eeeeee), float(nbadchannels));
5688  if (nbadchannels != 0)
5689  h_runbadrate_depth4_HE->Fill(float(eeeeee), 1.);
5690  if (nbadchannels > 0.)
5691  h_runbadrateC_depth4_HE->Fill(float(eeeeee), 1.);
5692  h_runbadrate0_depth4_HE->Fill(float(eeeeee), 1.);
5693  }
5694  if (k1 == 4) {
5695  h_nbadchannels_depth5_HE->Fill(float(nbadchannels));
5696  h_runnbadchannels_depth5_HE->Fill(float(eeeeee), float(nbadchannels));
5697  if (nbadchannels > 0.)
5698  h_runnbadchannelsC_depth5_HE->Fill(float(eeeeee), float(nbadchannels));
5699  if (nbadchannels != 0)
5700  h_runbadrate_depth5_HE->Fill(float(eeeeee), 1.);
5701  if (nbadchannels > 0.)
5702  h_runbadrateC_depth5_HE->Fill(float(eeeeee), 1.);
5703  h_runbadrate0_depth5_HE->Fill(float(eeeeee), 1.);
5704  }
5705  if (k1 == 5) {
5706  h_nbadchannels_depth6_HE->Fill(float(nbadchannels));
5707  h_runnbadchannels_depth6_HE->Fill(float(eeeeee), float(nbadchannels));
5708  if (nbadchannels > 0.)
5709  h_runnbadchannelsC_depth6_HE->Fill(float(eeeeee), float(nbadchannels));
5710  if (nbadchannels != 0)
5711  h_runbadrate_depth6_HE->Fill(float(eeeeee), 1.);
5712  if (nbadchannels > 0.)
5713  h_runbadrateC_depth6_HE->Fill(float(eeeeee), 1.);
5714  h_runbadrate0_depth6_HE->Fill(float(eeeeee), 1.);
5715  }
5716  if (k1 == 6) {
5717  h_nbadchannels_depth7_HE->Fill(float(nbadchannels));
5718  h_runnbadchannels_depth7_HE->Fill(float(eeeeee), float(nbadchannels));
5719  if (nbadchannels > 0.)
5720  h_runnbadchannelsC_depth7_HE->Fill(float(eeeeee), float(nbadchannels));
5721  if (nbadchannels != 0)
5722  h_runbadrate_depth7_HE->Fill(float(eeeeee), 1.);
5723  if (nbadchannels > 0.)
5724  h_runbadrateC_depth7_HE->Fill(float(eeeeee), 1.);
5725  h_runbadrate0_depth7_HE->Fill(float(eeeeee), 1.);
5726  }
5727  }
5728  //HO
5729  if (k0 == 2) {
5730  if (k1 == 3) {
5731  h_nbadchannels_depth4_HO->Fill(float(nbadchannels));
5732  h_runnbadchannels_depth4_HO->Fill(float(eeeeee), float(nbadchannels));
5733  if (nbadchannels > lsdep_cut1_peak_HOdepth4_)
5734  h_runnbadchannelsC_depth4_HO->Fill(float(eeeeee), float(nbadchannels));
5735  if (nbadchannels != 0)
5736  h_runbadrate_depth4_HO->Fill(float(eeeeee), 1.);
5737  if (nbadchannels > lsdep_cut3_max_HOdepth4_)
5738  h_runbadrateC_depth4_HO->Fill(float(eeeeee), 1.);
5739  h_bcnnbadchannels_depth4_HO->Fill(float(bcn), float(nbadchannels));
5740  h_runbadrate0_depth4_HO->Fill(float(eeeeee), 1.);
5741  h_bcnbadrate0_depth4_HO->Fill(float(bcn), 1.);
5742  }
5743  }
5744  //HF
5745  if (k0 == 3) {
5746  if (k1 == 0) {
5747  h_nbadchannels_depth1_HF->Fill(float(nbadchannels));
5748  h_runnbadchannels_depth1_HF->Fill(float(eeeeee), float(nbadchannels));
5749  if (nbadchannels > lsdep_cut1_peak_HFdepth1_)
5750  h_runnbadchannelsC_depth1_HF->Fill(float(eeeeee), float(nbadchannels));
5751  if (nbadchannels != 0)
5752  h_runbadrate_depth1_HF->Fill(float(eeeeee), 1.);
5753  if (nbadchannels > lsdep_cut3_max_HFdepth1_)
5754  h_runbadrateC_depth1_HF->Fill(float(eeeeee), 1.);
5755  h_bcnnbadchannels_depth1_HF->Fill(float(bcn), float(nbadchannels));
5756  h_runbadrate0_depth1_HF->Fill(float(eeeeee), 1.);
5757  h_bcnbadrate0_depth1_HF->Fill(float(bcn), 1.);
5758  }
5759  if (k1 == 1) {
5760  h_nbadchannels_depth2_HF->Fill(float(nbadchannels));
5761  h_runnbadchannels_depth2_HF->Fill(float(eeeeee), float(nbadchannels));
5762  if (nbadchannels > lsdep_cut1_peak_HFdepth2_)
5763  h_runnbadchannelsC_depth2_HF->Fill(float(eeeeee), float(nbadchannels));
5764  if (nbadchannels != 0)
5765  h_runbadrate_depth2_HF->Fill(float(eeeeee), 1.);
5766  if (nbadchannels > lsdep_cut3_max_HFdepth2_)
5767  h_runbadrateC_depth2_HF->Fill(float(eeeeee), 1.);
5768  h_bcnnbadchannels_depth2_HF->Fill(float(bcn), float(nbadchannels));
5769  h_runbadrate0_depth2_HF->Fill(float(eeeeee), 1.);
5770  h_bcnbadrate0_depth2_HF->Fill(float(bcn), 1.);
5771  }
5772  if (k1 == 2) {
5773  h_nbadchannels_depth3_HF->Fill(float(nbadchannels));
5774  h_runnbadchannels_depth3_HF->Fill(float(eeeeee), float(nbadchannels));
5775  if (nbadchannels > 0.)
5776  h_runnbadchannelsC_depth3_HF->Fill(float(eeeeee), float(nbadchannels));
5777  if (nbadchannels != 0)
5778  h_runbadrate_depth3_HF->Fill(float(eeeeee), 1.);
5779  if (nbadchannels > 0.)
5780  h_runbadrateC_depth3_HF->Fill(float(eeeeee), 1.);
5781  h_runbadrate0_depth3_HF->Fill(float(eeeeee), 1.);
5782  }
5783  if (k1 == 3) {
5784  h_nbadchannels_depth4_HF->Fill(float(nbadchannels));
5785  h_runnbadchannels_depth4_HF->Fill(float(eeeeee), float(nbadchannels));
5786  if (nbadchannels > 0.)
5787  h_runnbadchannelsC_depth4_HF->Fill(float(eeeeee), float(nbadchannels));
5788  if (nbadchannels != 0)
5789  h_runbadrate_depth4_HF->Fill(float(eeeeee), 1.);
5790  if (nbadchannels > 0.)
5791  h_runbadrateC_depth4_HF->Fill(float(eeeeee), 1.);
5792  h_runbadrate0_depth4_HF->Fill(float(eeeeee), 1.);
5793  }
5794  }
5795 
5797  } //k1
5798  } //k0
5800  } //if(recordHistoes_&& studyRunDependenceHist_)
5801 
5804  iEvent.getByToken(tok_calib_, calib);
5805 
5806  bool gotCALIBDigis = true;
5807  if (!(iEvent.getByToken(tok_calib_, calib))) {
5808  gotCALIBDigis = false; //this is a boolean set up to check if there are CALIBgigis in input root file
5809  }
5810  if (!(calib.isValid())) {
5811  gotCALIBDigis = false; //if it is not there, leave it false
5812  }
5813  if (!gotCALIBDigis) {
5814  } else {
5815  for (HcalCalibDigiCollection::const_iterator digi = calib->begin(); digi != calib->end(); digi++) {
5816  int cal_det = digi->id().hcalSubdet(); // 1-HB,2-HE,3-HO,4-HF
5817  int cal_phi = digi->id().iphi();
5818  int cal_eta = digi->id().ieta();
5819  int cal_cbox = digi->id().cboxChannel();
5820 
5823  if (cal_det > 0 && cal_det < 5 && cal_cbox == 0) {
5824  int iphi = cal_phi - 1;
5825  int ieta = cal_eta;
5826  if (ieta > 0)
5827  ieta -= 1;
5828  nTS = digi->size();
5829  double max_signal = -100.;
5830  int ts_with_max_signal = -100;
5831  double timew = 0.;
5832 
5833  //
5834  if (nTS <= numOfTS)
5835  for (int i = 0; i < nTS; i++) {
5836  double ampldefault = adc2fC[digi->sample(i).adc() & 0xff];
5837  if (max_signal < ampldefault) {
5838  max_signal = ampldefault;
5839  ts_with_max_signal = i;
5840  }
5841  if (i > 1 && i < 6)
5842  calib3[cal_det - 1][ieta + 41][iphi] += ampldefault;
5843  calib0[cal_det - 1][ieta + 41][iphi] += ampldefault;
5844  timew += (i + 1) * ampldefault;
5845  } // for
5846  //
5847 
5848  double amplitude = calib0[cal_det - 1][ieta + 41][iphi];
5849  double aveamplitude = -100.;
5850  if (amplitude > 0 && timew > 0)
5851  aveamplitude = timew / amplitude; // average_TS +1
5852  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
5853  caliba[cal_det - 1][ieta + 41][iphi] = aveamplitude1;
5854 
5855  double rmsamp = 0.;
5856  for (int ii = 0; ii < nTS; ii++) {
5857  double ampldefault = adc2fC[digi->sample(ii).adc() & 0xff];
5858  double aaaaaa = (ii + 1) - aveamplitude;
5859  double aaaaaa2 = aaaaaa * aaaaaa;
5860  rmsamp += (aaaaaa2 * ampldefault); // fC
5861  } //for 2
5862  double rmsamplitude = -100.;
5863  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
5864  rmsamplitude = sqrt(rmsamp / amplitude);
5865  calibw[cal_det - 1][ieta + 41][iphi] = rmsamplitude;
5866  //
5867  calibt[cal_det - 1][ieta + 41][iphi] = ts_with_max_signal;
5868  //
5869 
5870  if (ts_with_max_signal > -1 && ts_with_max_signal < nTS)
5871  calib2[cal_det - 1][ieta + 41][iphi] = adc2fC[digi->sample(ts_with_max_signal).adc() & 0xff];
5872  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < nTS)
5873  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal + 1).adc() & 0xff];
5874  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < nTS)
5875  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal + 2).adc() & 0xff];
5876  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < nTS)
5877  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal - 1).adc() & 0xff];
5878  if (ts_with_max_signal - 2 > -1 && ts_with_max_signal - 2 < nTS)
5879  calib2[cal_det - 1][ieta + 41][iphi] += adc2fC[digi->sample(ts_with_max_signal - 2).adc() & 0xff];
5880  //
5881  bool anycapid = true;
5882  bool anyer = false;
5883  bool anydv = true;
5884  int error1 = 0, error2 = 0, error3 = 0;
5885  int lastcapid = 0, capid = 0;
5886  for (int ii = 0; ii < (*digi).size(); ii++) {
5887  capid = (*digi)[ii].capid(); // capId (0-3, sequential)
5888  bool er = (*digi)[ii].er(); // error
5889  bool dv = (*digi)[ii].dv(); // valid data
5890  if (ii != 0 && ((lastcapid + 1) % 4) != capid)
5891  anycapid = false;
5892  lastcapid = capid;
5893  if (er)
5894  anyer = true;
5895  if (!dv)
5896  anydv = false;
5897  }
5898  if (!anycapid)
5899  error1 = 1;
5900  if (anyer)
5901  error2 = 1;
5902  if (!anydv)
5903  error3 = 1;
5904  if (error1 != 0 || error2 != 0 || error3 != 0)
5905  calibcapiderror[cal_det - 1][ieta + 41][iphi] = 100;
5906 
5907  } // if(cal_det>0 && cal_det<5
5908  } //if(recordHistoes_ && studyCalibCellsHist_)
5910 
5912  } //if(recordNtuples_) {
5913 
5914  } //for(HcalCalibDigiCollection
5915  } //if(calib.isValid(
5919  for (int k1 = 0; k1 < nsub; k1++) {
5920  for (int k2 = 0; k2 < neta; k2++) {
5921  for (int k3 = 0; k3 < nphi; k3++) {
5922  int k2plot = k2 - 41;
5923  if (flagcpuoptimization_ == 0) {
5925 
5926  if (signal[k1][k2][k3] > 0.) {
5927  if (k1 == 0) {
5928  h_FullSignal3D_HB->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5929  h_FullSignal3D0_HB->Fill(double(k2plot), double(k3), 1.);
5930  }
5931  if (k1 == 1) {
5932  h_FullSignal3D_HE->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5933  h_FullSignal3D0_HE->Fill(double(k2plot), double(k3), 1.);
5934  }
5935  if (k1 == 2) {
5936  h_FullSignal3D_HO->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5937  h_FullSignal3D0_HO->Fill(double(k2plot), double(k3), 1.);
5938  }
5939  if (k1 == 3) {
5940  h_FullSignal3D_HF->Fill(double(k2plot), double(k3), signal[k1][k2][k3]);
5941  h_FullSignal3D0_HF->Fill(double(k2plot), double(k3), 1.);
5942  }
5943  }
5944 
5945  } // optimization
5947 
5949  // k2 = 0-81, k3= 0-71
5950  // return to real indexes in eta and phi ( k20 and k30)
5951  int k20 = k2 - 41; // k20 = -41 - 40
5952  if (k20 > 0 || k20 == 0)
5953  k20 += 1; // k20 = -41 - -1 and +1 - +41
5954  int k30 = k3 + 1; // k30= 1-nphi
5955 
5956  // find calibration indexes in eta and phi ( kk2 and kk3)
5957  int kk2 = 0, kk3 = 0;
5958  if (k1 == 0 || k1 == 1) {
5959  if (k20 > 0)
5960  kk2 = 1;
5961  else
5962  kk2 = -1;
5963  if (k30 == 71 || k30 == nphi || k30 == 1 || k30 == 2)
5964  kk3 = 71;
5965  else
5966  kk3 = ((k30 - 3) / 4) * 4 + 3;
5967  } else if (k1 == 2) {
5968  if (abs(k20) <= 4) {
5969  kk2 = 0;
5970  if (k30 == 71 || k30 == nphi || k30 == 1 || k30 == 2 || k30 == 3 || k30 == 4)
5971  kk3 = 71;
5972  else
5973  kk3 = ((k30 - 5) / 6) * 6 + 5;
5974  } else {
5975  if (abs(k20) > 4 && abs(k20) <= 10)
5976  kk2 = 1;
5977  if (abs(k20) > 10 && abs(k20) <= 15)
5978  kk2 = 2;
5979  if (k20 < 0)
5980  kk2 = -kk2;
5981  if (k30 == 71 || k30 == nphi || (k30 >= 1 && k30 <= 10))
5982  kk3 = 71;
5983  else
5984  kk3 = ((k30 - 11) / 12) * 12 + 11;
5985  }
5986  } else if (k1 == 3) {
5987  if (k20 > 0)
5988  kk2 = 1;
5989  else
5990  kk2 = -1;
5991  if (k30 >= 1 && k30 <= 18)
5992  kk3 = 1;
5993  if (k30 >= 19 && k30 <= 36)
5994  kk3 = 19;
5995  if (k30 >= 37 && k30 <= 54)
5996  kk3 = 37;
5997  if (k30 >= 55 && k30 <= nphi)
5998  kk3 = 55;
5999  }
6000  // return to indexes in massiv
6001  int kkk2 = kk2 + 41;
6002  if (kk2 > 0)
6003  kkk2 -= 1;
6004  int kkk3 = kk3;
6005  kkk3 -= 1;
6006 
6007  if (flagcpuoptimization_ == 0) {
6008  double GetRMSOverNormalizedSignal = -1.;
6009  if (signal[k1][k2][k3] > 0. && calib0[k1][kkk2][kkk3] > 0.) {
6010  GetRMSOverNormalizedSignal = signal[k1][k2][k3] / calib0[k1][kkk2][kkk3];
6011  if (k1 == 0) {
6012  h_mapGetRMSOverNormalizedSignal_HB->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
6013  h_mapGetRMSOverNormalizedSignal0_HB->Fill(double(k2plot), double(k3), 1.);
6014  }
6015  if (k1 == 1) {
6016  h_mapGetRMSOverNormalizedSignal_HE->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
6017  h_mapGetRMSOverNormalizedSignal0_HE->Fill(double(k2plot), double(k3), 1.);
6018  }
6019  if (k1 == 2) {
6020  h_mapGetRMSOverNormalizedSignal_HO->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
6021  h_mapGetRMSOverNormalizedSignal0_HO->Fill(double(k2plot), double(k3), 1.);
6022  }
6023  if (k1 == 3) {
6024  h_mapGetRMSOverNormalizedSignal_HF->Fill(double(k2plot), double(k3), GetRMSOverNormalizedSignal);
6025  h_mapGetRMSOverNormalizedSignal0_HF->Fill(double(k2plot), double(k3), 1.);
6026  }
6027  }
6028  } //optimization
6030  if (signal[k1][k2][k3] > 0.) {
6031  // ADC
6032  double adc = 0.;
6033  if (calib0[k1][kkk2][kkk3] > 0.)
6034  adc = calib0[k1][kkk2][kkk3];
6035  // Ratio
6036  double ratio = 2.;
6037  if (calib0[k1][kkk2][kkk3] > 0.)
6038  ratio = calib2[k1][kkk2][kkk3] / calib0[k1][kkk2][kkk3];
6039  // TSmax
6040  float calibtsmax = calibt[k1][kkk2][kkk3];
6041  // TSmean
6042  float calibtsmean = caliba[k1][kkk2][kkk3];
6043  // Width
6044  float calibwidth = calibw[k1][kkk2][kkk3];
6045  // CapIdErrors
6046  float calibcap = -100.;
6047  calibcap = calibcapiderror[k1][kkk2][kkk3];
6048 
6049  // HB:
6050  if (k1 == 0) {
6051  // ADC
6052  h_ADCCalib_HB->Fill(adc, 1.);
6053  h_ADCCalib1_HB->Fill(adc, 1.);
6054  if (adc < calibrADCHBMin_ || adc > calibrADCHBMax_)
6055  h_mapADCCalib047_HB->Fill(double(k2plot), double(k3), 1.);
6056  h_mapADCCalib_HB->Fill(double(k2plot), double(k3), adc);
6057  // Ratio
6058  h_RatioCalib_HB->Fill(ratio, 1.);
6059  if (ratio < calibrRatioHBMin_ || ratio > calibrRatioHBMax_)
6060  h_mapRatioCalib047_HB->Fill(double(k2plot), double(k3), 1.);
6061  h_mapRatioCalib_HB->Fill(double(k2plot), double(k3), ratio);
6062  // TSmax
6063  if (calibtsmax > -0.5) {
6064  h_TSmaxCalib_HB->Fill(calibtsmax, 1.);
6065  if (calibtsmax < calibrTSmaxHBMin_ || calibtsmax > calibrTSmaxHBMax_)
6066  h_mapTSmaxCalib047_HB->Fill(double(k2plot), double(k3), 1.);
6067  h_mapTSmaxCalib_HB->Fill(double(k2plot), double(k3), calibtsmax);
6068  }
6069  // TSmean
6070  if (calibtsmean > -0.5) {
6071  h_TSmeanCalib_HB->Fill(calibtsmean, 1.);
6072  if (calibtsmean < calibrTSmeanHBMin_ || calibtsmean > calibrTSmeanHBMax_)
6073  h_mapTSmeanCalib047_HB->Fill(double(k2plot), double(k3), 1.);
6074  h_mapTSmeanCalib_HB->Fill(double(k2plot), double(k3), calibtsmean);
6075  }
6076  // Width
6077  if (calibwidth > -0.5) {
6078  h_WidthCalib_HB->Fill(calibwidth, 1.);
6079  if (calibwidth < calibrWidthHBMin_ || calibwidth > calibrWidthHBMax_)
6080  h_mapWidthCalib047_HB->Fill(double(k2plot), double(k3), 1.);
6081  h_mapWidthCalib_HB->Fill(double(k2plot), double(k3), calibwidth);
6082  }
6083  // CapIdErrors
6084  if (calibcap > 0)
6085  h_mapCapCalib047_HB->Fill(double(k2plot), double(k3), 1.);
6086  //
6087  h_map_HB->Fill(double(k2plot), double(k3), 1.);
6088  }
6089  // HE:
6090  if (k1 == 1) {
6091  // ADC
6092  h_ADCCalib_HE->Fill(adc, 1.);
6093  h_ADCCalib1_HE->Fill(adc, 1.);
6094  if (adc < calibrADCHEMin_ || adc > calibrADCHEMax_)
6095  h_mapADCCalib047_HE->Fill(double(k2plot), double(k3), 1.);
6096  h_mapADCCalib_HE->Fill(double(k2plot), double(k3), adc);
6097  // Ratio
6098  h_RatioCalib_HE->Fill(ratio, 1.);
6099  if (ratio < calibrRatioHEMin_ || ratio > calibrRatioHEMax_)
6100  h_mapRatioCalib047_HE->Fill(double(k2plot), double(k3), 1.);
6101  h_mapRatioCalib_HE->Fill(double(k2plot), double(k3), ratio);
6102  // TSmax
6103  if (calibtsmax > -0.5) {
6104  h_TSmaxCalib_HE->Fill(calibtsmax, 1.);
6105  if (calibtsmax < calibrTSmaxHEMin_ || calibtsmax > calibrTSmaxHEMax_)
6106  h_mapTSmaxCalib047_HE->Fill(double(k2plot), double(k3), 1.);
6107  h_mapTSmaxCalib_HE->Fill(double(k2plot), double(k3), calibtsmax);
6108  }
6109  // TSmean
6110  if (calibtsmean > -0.5) {
6111  h_TSmeanCalib_HE->Fill(calibtsmean, 1.);
6112  if (calibtsmean < calibrTSmeanHEMin_ || calibtsmean > calibrTSmeanHEMax_)
6113  h_mapTSmeanCalib047_HE->Fill(double(k2plot), double(k3), 1.);
6114  h_mapTSmeanCalib_HE->Fill(double(k2plot), double(k3), calibtsmean);
6115  }
6116  // Width
6117  if (calibwidth > -0.5) {
6118  h_WidthCalib_HE->Fill(calibwidth, 1.);
6119  if (calibwidth < calibrWidthHEMin_ || calibwidth > calibrWidthHEMax_)
6120  h_mapWidthCalib047_HE->Fill(double(k2plot), double(k3), 1.);
6121  h_mapWidthCalib_HE->Fill(double(k2plot), double(k3), calibwidth);
6122  }
6123  // CapIdErrors
6124  if (calibcap > 0)
6125  h_mapCapCalib047_HE->Fill(double(k2plot), double(k3), 1.);
6126  //
6127  h_map_HE->Fill(double(k2plot), double(k3), 1.);
6128  }
6129  // HO:
6130  if (k1 == 2) {
6131  // ADC
6132  h_ADCCalib_HO->Fill(adc, 1.);
6133  h_ADCCalib1_HO->Fill(adc, 1.);
6134  if (adc < calibrADCHOMin_ || adc > calibrADCHOMax_)
6135  h_mapADCCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6136  h_mapADCCalib_HO->Fill(double(k2plot), double(k3), adc);
6137  // Ratio
6138  h_RatioCalib_HO->Fill(ratio, 1.);
6139  if (ratio < calibrRatioHOMin_ || ratio > calibrRatioHOMax_)
6140  h_mapRatioCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6141  h_mapRatioCalib_HO->Fill(double(k2plot), double(k3), ratio);
6142  // TSmax
6143  if (calibtsmax > -0.5) {
6144  h_TSmaxCalib_HO->Fill(calibtsmax, 1.);
6145  if (calibtsmax < calibrTSmaxHOMin_ || calibtsmax > calibrTSmaxHOMax_)
6146  h_mapTSmaxCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6147  h_mapTSmaxCalib_HO->Fill(double(k2plot), double(k3), calibtsmax);
6148  }
6149  // TSmean
6150  if (calibtsmean > -0.5) {
6151  h_TSmeanCalib_HO->Fill(calibtsmean, 1.);
6152  if (calibtsmean < calibrTSmeanHOMin_ || calibtsmean > calibrTSmeanHOMax_)
6153  h_mapTSmeanCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6154  h_mapTSmeanCalib_HO->Fill(double(k2plot), double(k3), calibtsmean);
6155  }
6156  // Width
6157  if (calibwidth > -0.5) {
6158  h_WidthCalib_HO->Fill(calibwidth, 1.);
6159  if (calibwidth < calibrWidthHOMin_ || calibwidth > calibrWidthHOMax_)
6160  h_mapWidthCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6161  h_mapWidthCalib_HO->Fill(double(k2plot), double(k3), calibwidth);
6162  }
6163  // CapIdErrors
6164  if (calibcap > 0)
6165  h_mapCapCalib047_HO->Fill(double(k2plot), double(k3), 1.);
6166  //
6167  h_map_HO->Fill(double(k2plot), double(k3), 1.);
6168  }
6169  // HF:
6170  if (k1 == 3) {
6171  // ADC
6172  h_ADCCalib_HF->Fill(adc, 1.);
6173  h_ADCCalib1_HF->Fill(adc, 1.);
6174  if (adc < calibrADCHFMin_ || adc > calibrADCHFMax_)
6175  h_mapADCCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6176  h_mapADCCalib_HF->Fill(double(k2plot), double(k3), adc);
6177  // Ratio
6178  h_RatioCalib_HF->Fill(ratio, 1.);
6179  if (ratio < calibrRatioHFMin_ || ratio > calibrRatioHFMax_)
6180  h_mapRatioCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6181  h_mapRatioCalib_HF->Fill(double(k2plot), double(k3), ratio);
6182  // TSmax
6183  if (calibtsmax > -0.5) {
6184  h_TSmaxCalib_HF->Fill(calibtsmax, 1.);
6185  if (calibtsmax < calibrTSmaxHFMin_ || calibtsmax > calibrTSmaxHFMax_)
6186  h_mapTSmaxCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6187  h_mapTSmaxCalib_HF->Fill(double(k2plot), double(k3), calibtsmax);
6188  }
6189  // TSmean
6190  if (calibtsmean > -0.5) {
6191  h_TSmeanCalib_HF->Fill(calibtsmean, 1.);
6192  if (calibtsmean < calibrTSmeanHFMin_ || calibtsmean > calibrTSmeanHFMax_)
6193  h_mapTSmeanCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6194  h_mapTSmeanCalib_HF->Fill(double(k2plot), double(k3), calibtsmean);
6195  }
6196  // Width
6197  if (calibwidth > -0.5) {
6198  h_WidthCalib_HF->Fill(calibwidth, 1.);
6199  if (calibwidth < calibrWidthHFMin_ || calibwidth > calibrWidthHFMax_)
6200  h_mapWidthCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6201  h_mapWidthCalib_HF->Fill(double(k2plot), double(k3), calibwidth);
6202  }
6203  // CapIdErrors
6204  if (calibcap > 0)
6205  h_mapCapCalib047_HF->Fill(double(k2plot), double(k3), 1.);
6206  //
6207  h_map_HF->Fill(double(k2plot), double(k3), 1.);
6208  }
6210  } // if(signal[k1][k2][k3]>0.)
6212  } // k3
6213  } // k2
6214  } // k1
6215 
6217 
6218  } //if(recordHistoes_&& studyCalibCellsHist_)
6219 
6222  myTree->Fill();
6223  // if(recordNtuples_ && nevent < maxNeventsInNtuple_) myTree->Fill();
6224 
6226  if (++local_event % 100 == 0) {
6227  if (verbosity < 0)
6228  std::cout << "run " << Run << " processing events " << local_event << " ok, "
6229  << ", lumi " << lumi << ", numOfLaserEv " << numOfLaserEv << std::endl;
6230  }
6231  } // bcn
6232 
6233  //EndAnalyzer
6234 }
6235 
6236 // ------------ method called once each job just before starting event loop -----------
6238  if (verbosity > 0)
6239  std::cout << "======================== beignJob START +++++++++++++++++++++++++++" << std::endl;
6240  nnnnnn = 0;
6241  nnnnnnhbhe = 0;
6242  nnnnnnhbheqie11 = 0;
6243  nevent = 0;
6244  nevent50 = 0;
6245  counterhf = 0;
6246  counterhfqie10 = 0;
6247  counterho = 0;
6248  nnnnnn1 = 0;
6249  nnnnnn2 = 0;
6250  nnnnnn3 = 0;
6251  nnnnnn4 = 0;
6252  nnnnnn5 = 0;
6253  nnnnnn6 = 0;
6255 
6256  if (recordHistoes_) {
6257  // ha2 = fs_->make<TH2F>("ha2"," ", neta, -41., 41., nphi, 0., bphi);
6258 
6259  h_errorGeneral = fs_->make<TH1F>("h_errorGeneral", " ", 5, 0., 5.);
6260  h_error1 = fs_->make<TH1F>("h_error1", " ", 5, 0., 5.);
6261  h_error2 = fs_->make<TH1F>("h_error2", " ", 5, 0., 5.);
6262  h_error3 = fs_->make<TH1F>("h_error3", " ", 5, 0., 5.);
6263  h_amplError = fs_->make<TH1F>("h_amplError", " ", 100, -2., 98.);
6264  h_amplFine = fs_->make<TH1F>("h_amplFine", " ", 100, -2., 98.);
6265 
6266  h_errorGeneral_HB = fs_->make<TH1F>("h_errorGeneral_HB", " ", 5, 0., 5.);
6267  h_nadccounts8_HB = fs_->make<TH1F>("h_nadccounts8_HB", " ", 257, 0., 256.);
6268  h_nadccounts6_HB = fs_->make<TH1F>("h_nadccounts6_HB", " ", 257, 0., 256.);
6269  h_nadccounts4_HB = fs_->make<TH1F>("h_nadccounts4_HB", " ", 257, 0., 256.);
6270  h_nadccounts3_HB = fs_->make<TH1F>("h_nadccounts3_HB", " ", 257, 0., 256.);
6271  h_nadccounts2_HB = fs_->make<TH1F>("h_nadccounts2_HB", " ", 257, 0., 256.);
6272  h_nadccounts0_HB = fs_->make<TH1F>("h_nadccounts0_HB", " ", 257, 0., 256.);
6273  h_error1_HB = fs_->make<TH1F>("h_error1_HB", " ", 5, 0., 5.);
6274  h_error2_HB = fs_->make<TH1F>("h_error2_HB", " ", 5, 0., 5.);
6275  h_error3_HB = fs_->make<TH1F>("h_error3_HB", " ", 5, 0., 5.);
6276  h_error4_HB = fs_->make<TH1F>("h_error4_HB", " ", 5, 0., 5.);
6277  h_error5_HB = fs_->make<TH1F>("h_error5_HB", " ", 5, 0., 5.);
6278  h_error6_HB = fs_->make<TH1F>("h_error6_HB", " ", 5, 0., 5.);
6279  h_error7_HB = fs_->make<TH1F>("h_error7_HB", " ", 5, 0., 5.);
6280  h_amplError_HB = fs_->make<TH1F>("h_amplError_HB", " ", 100, -2., 98.);
6281  h_amplFine_HB = fs_->make<TH1F>("h_amplFine_HB", " ", 100, -2., 98.);
6282  h_mapDepth1Error_HB = fs_->make<TH2F>("h_mapDepth1Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6283  h_mapDepth2Error_HB = fs_->make<TH2F>("h_mapDepth2Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6284  h_mapDepth3Error_HB = fs_->make<TH2F>("h_mapDepth3Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6285  h_mapDepth4Error_HB = fs_->make<TH2F>("h_mapDepth4Error_HB", " ", neta, -41., 41., nphi, 0., bphi);
6286  h_fiber0_HB = fs_->make<TH1F>("h_fiber0_HB", " ", 10, 0., 10.);
6287  h_fiber1_HB = fs_->make<TH1F>("h_fiber1_HB", " ", 10, 0., 10.);
6288  h_fiber2_HB = fs_->make<TH1F>("h_fiber2_HB", " ", 40, 0., 40.);
6289  h_repetedcapid_HB = fs_->make<TH1F>("h_repetedcapid_HB", " ", 5, 0., 5.);
6290 
6291  h_errorGeneral_HE = fs_->make<TH1F>("h_errorGeneral_HE", " ", 5, 0., 5.);
6292  h_nadccounts8_HE = fs_->make<TH1F>("h_nadccounts8_HE", " ", 257, 0., 256.);
6293  h_nadccounts6_HE = fs_->make<TH1F>("h_nadccounts6_HE", " ", 257, 0., 256.);
6294  h_nadccounts4_HE = fs_->make<TH1F>("h_nadccounts4_HE", " ", 257, 0., 256.);
6295  h_nadccounts3_HE = fs_->make<TH1F>("h_nadccounts3_HE", " ", 257, 0., 256.);
6296  h_nadccounts2_HE = fs_->make<TH1F>("h_nadccounts2_HE", " ", 257, 0., 256.);
6297  h_nadccounts0_HE = fs_->make<TH1F>("h_nadccounts0_HE", " ", 257, 0., 256.);
6298  h_error1_HE = fs_->make<TH1F>("h_error1_HE", " ", 5, 0., 5.);
6299  h_error2_HE = fs_->make<TH1F>("h_error2_HE", " ", 5, 0., 5.);
6300  h_error3_HE = fs_->make<TH1F>("h_error3_HE", " ", 5, 0., 5.);
6301  h_error4_HE = fs_->make<TH1F>("h_error4_HE", " ", 5, 0., 5.);
6302  h_error5_HE = fs_->make<TH1F>("h_error5_HE", " ", 5, 0., 5.);
6303  h_error6_HE = fs_->make<TH1F>("h_error6_HE", " ", 5, 0., 5.);
6304  h_error7_HE = fs_->make<TH1F>("h_error7_HE", " ", 5, 0., 5.);
6305  h_amplError_HE = fs_->make<TH1F>("h_amplError_HE", " ", 100, -2., 98.);
6306  h_amplFine_HE = fs_->make<TH1F>("h_amplFine_HE", " ", 100, -2., 98.);
6307  h_mapDepth1Error_HE = fs_->make<TH2F>("h_mapDepth1Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6308  h_mapDepth2Error_HE = fs_->make<TH2F>("h_mapDepth2Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6309  h_mapDepth3Error_HE = fs_->make<TH2F>("h_mapDepth3Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6310  h_mapDepth4Error_HE = fs_->make<TH2F>("h_mapDepth4Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6311  h_mapDepth5Error_HE = fs_->make<TH2F>("h_mapDepth5Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6312  h_mapDepth6Error_HE = fs_->make<TH2F>("h_mapDepth6Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6313  h_mapDepth7Error_HE = fs_->make<TH2F>("h_mapDepth7Error_HE", " ", neta, -41., 41., nphi, 0., bphi);
6314  h_fiber0_HE = fs_->make<TH1F>("h_fiber0_HE", " ", 10, 0., 10.);
6315  h_fiber1_HE = fs_->make<TH1F>("h_fiber1_HE", " ", 10, 0., 10.);
6316  h_fiber2_HE = fs_->make<TH1F>("h_fiber2_HE", " ", 40, 0., 40.);
6317  h_repetedcapid_HE = fs_->make<TH1F>("h_repetedcapid_HE", " ", 5, 0., 5.);
6318 
6319  h_errorGeneral_HF = fs_->make<TH1F>("h_errorGeneral_HF", " ", 5, 0., 5.);
6320  h_error1_HF = fs_->make<TH1F>("h_error1_HF", " ", 5, 0., 5.);
6321  h_error2_HF = fs_->make<TH1F>("h_error2_HF", " ", 5, 0., 5.);
6322  h_error3_HF = fs_->make<TH1F>("h_error3_HF", " ", 5, 0., 5.);
6323  h_error4_HF = fs_->make<TH1F>("h_error4_HF", " ", 5, 0., 5.);
6324  h_error5_HF = fs_->make<TH1F>("h_error5_HF", " ", 5, 0., 5.);
6325  h_error6_HF = fs_->make<TH1F>("h_error6_HF", " ", 5, 0., 5.);
6326  h_error7_HF = fs_->make<TH1F>("h_error7_HF", " ", 5, 0., 5.);
6327  h_amplError_HF = fs_->make<TH1F>("h_amplError_HF", " ", 100, -2., 98.);
6328  h_amplFine_HF = fs_->make<TH1F>("h_amplFine_HF", " ", 100, -2., 98.);
6329  h_mapDepth1Error_HF = fs_->make<TH2F>("h_mapDepth1Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6330  h_mapDepth2Error_HF = fs_->make<TH2F>("h_mapDepth2Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6331  h_mapDepth3Error_HF = fs_->make<TH2F>("h_mapDepth3Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6332  h_mapDepth4Error_HF = fs_->make<TH2F>("h_mapDepth4Error_HF", " ", neta, -41., 41., nphi, 0., bphi);
6333  h_fiber0_HF = fs_->make<TH1F>("h_fiber0_HF", " ", 10, 0., 10.);
6334  h_fiber1_HF = fs_->make<TH1F>("h_fiber1_HF", " ", 10, 0., 10.);
6335  h_fiber2_HF = fs_->make<TH1F>("h_fiber2_HF", " ", 40, 0., 40.);
6336  h_repetedcapid_HF = fs_->make<TH1F>("h_repetedcapid_HF", " ", 5, 0., 5.);
6337 
6338  h_errorGeneral_HO = fs_->make<TH1F>("h_errorGeneral_HO", " ", 5, 0., 5.);
6339  h_error1_HO = fs_->make<TH1F>("h_error1_HO", " ", 5, 0., 5.);
6340  h_error2_HO = fs_->make<TH1F>("h_error2_HO", " ", 5, 0., 5.);
6341  h_error3_HO = fs_->make<TH1F>("h_error3_HO", " ", 5, 0., 5.);
6342  h_error4_HO = fs_->make<TH1F>("h_error4_HO", " ", 5, 0., 5.);
6343  h_error5_HO = fs_->make<TH1F>("h_error5_HO", " ", 5, 0., 5.);
6344  h_error6_HO = fs_->make<TH1F>("h_error6_HO", " ", 5, 0., 5.);
6345  h_error7_HO = fs_->make<TH1F>("h_error7_HO", " ", 5, 0., 5.);
6346  h_amplError_HO = fs_->make<TH1F>("h_amplError_HO", " ", 100, -2., 98.);
6347  h_amplFine_HO = fs_->make<TH1F>("h_amplFine_HO", " ", 100, -2., 98.);
6348  h_mapDepth4Error_HO = fs_->make<TH2F>("h_mapDepth4Error_HO", " ", neta, -41., 41., nphi, 0., bphi);
6349  h_fiber0_HO = fs_->make<TH1F>("h_fiber0_HO", " ", 10, 0., 10.);
6350  h_fiber1_HO = fs_->make<TH1F>("h_fiber1_HO", " ", 10, 0., 10.);
6351  h_fiber2_HO = fs_->make<TH1F>("h_fiber2_HO", " ", 40, 0., 40.);
6352  h_repetedcapid_HO = fs_->make<TH1F>("h_repetedcapid_HO", " ", 5, 0., 5.);
6353 
6355 
6356  h_numberofhitsHBtest = fs_->make<TH1F>("h_numberofhitsHBtest", " ", 100, 0., 100.);
6357  h_AmplitudeHBtest = fs_->make<TH1F>("h_AmplitudeHBtest", " ", 100, 0., 10000.);
6358  h_AmplitudeHBtest1 = fs_->make<TH1F>("h_AmplitudeHBtest1", " ", 100, 0., 1000000.);
6359  h_AmplitudeHBtest6 = fs_->make<TH1F>("h_AmplitudeHBtest6", " ", 100, 0., 2000000.);
6360  h_totalAmplitudeHB = fs_->make<TH1F>("h_totalAmplitudeHB", " ", 100, 0., 3000000.);
6361  h_totalAmplitudeHBperEvent = fs_->make<TH1F>("h_totalAmplitudeHBperEvent", " ", 1000, 1., 1001.);
6362  // fullAmplitude:
6363  h_ADCAmpl345Zoom_HB = fs_->make<TH1F>("h_ADCAmpl345Zoom_HB", " ", 100, 0., 400.);
6364  h_ADCAmpl345Zoom1_HB = fs_->make<TH1F>("h_ADCAmpl345Zoom1_HB", " ", 100, 0., 100.);
6365  h_ADCAmpl345_HB = fs_->make<TH1F>("h_ADCAmpl345_HB", " ", 100, 10., 3000.);
6366 
6367  h_AmplitudeHBrest = fs_->make<TH1F>("h_AmplitudeHBrest", " ", 100, 0., 10000.);
6368  h_AmplitudeHBrest1 = fs_->make<TH1F>("h_AmplitudeHBrest1", " ", 100, 0., 1000000.);
6369  h_AmplitudeHBrest6 = fs_->make<TH1F>("h_AmplitudeHBrest6", " ", 100, 0., 2000000.);
6370 
6371  h_ADCAmpl345_HBCapIdError = fs_->make<TH1F>("h_ADCAmpl345_HBCapIdError", " ", 100, 10., 3000.);
6372  h_ADCAmpl345_HBCapIdNoError = fs_->make<TH1F>("h_ADCAmpl345_HBCapIdNoError", " ", 100, 10., 3000.);
6373  h_ADCAmpl_HBCapIdError = fs_->make<TH1F>("h_ADCAmpl_HBCapIdError", " ", 100, 10., 3000.);
6374  h_ADCAmpl_HBCapIdNoError = fs_->make<TH1F>("h_ADCAmpl_HBCapIdNoError", " ", 100, 10., 3000.);
6375 
6376  h_ADCAmplZoom_HB = fs_->make<TH1F>("h_ADCAmplZoom_HB", " ", 100, 0., 400.);
6377  h_ADCAmplZoom1_HB = fs_->make<TH1F>("h_ADCAmplZoom1_HB", " ", 100, -20., 80.);
6378  h_ADCAmpl_HB = fs_->make<TH1F>("h_ADCAmpl_HB", " ", 100, 10., 5000.);
6379  h_mapDepth1ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6380  h_mapDepth2ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6381  h_mapDepth3ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6382  h_mapDepth4ADCAmpl225_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6384  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6386  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6388  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6390  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HB", " ", neta, -41., 41., nphi, 0., bphi);
6391  h_mapDepth1ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6392  h_mapDepth2ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6393  h_mapDepth3ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6394  h_mapDepth4ADCAmpl_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6395  h_TSmeanA_HB = fs_->make<TH1F>("h_TSmeanA_HB", " ", 100, -1., 11.);
6396  h_mapDepth1TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6397  h_mapDepth2TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6398  h_mapDepth3TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6399  h_mapDepth4TSmeanA225_HB = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6400  h_mapDepth1TSmeanA_HB = fs_->make<TH2F>("h_mapDepth1TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6401  h_mapDepth2TSmeanA_HB = fs_->make<TH2F>("h_mapDepth2TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6402  h_mapDepth3TSmeanA_HB = fs_->make<TH2F>("h_mapDepth3TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6403  h_mapDepth4TSmeanA_HB = fs_->make<TH2F>("h_mapDepth4TSmeanA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6404  h_TSmaxA_HB = fs_->make<TH1F>("h_TSmaxA_HB", " ", 100, -1., 11.);
6405  h_mapDepth1TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6406  h_mapDepth2TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6407  h_mapDepth3TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6408  h_mapDepth4TSmaxA225_HB = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6409  h_mapDepth1TSmaxA_HB = fs_->make<TH2F>("h_mapDepth1TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6410  h_mapDepth2TSmaxA_HB = fs_->make<TH2F>("h_mapDepth2TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6411  h_mapDepth3TSmaxA_HB = fs_->make<TH2F>("h_mapDepth3TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6412  h_mapDepth4TSmaxA_HB = fs_->make<TH2F>("h_mapDepth4TSmaxA_HB", " ", neta, -41., 41., nphi, 0., bphi);
6413  // RMS:
6414  h_Amplitude_HB = fs_->make<TH1F>("h_Amplitude_HB", " ", 100, 0., 5.);
6415  h_mapDepth1Amplitude225_HB = fs_->make<TH2F>("h_mapDepth1Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6416  h_mapDepth2Amplitude225_HB = fs_->make<TH2F>("h_mapDepth2Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6417  h_mapDepth3Amplitude225_HB = fs_->make<TH2F>("h_mapDepth3Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6418  h_mapDepth4Amplitude225_HB = fs_->make<TH2F>("h_mapDepth4Amplitude225_HB", " ", neta, -41., 41., nphi, 0., bphi);
6419  h_mapDepth1Amplitude_HB = fs_->make<TH2F>("h_mapDepth1Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6420  h_mapDepth2Amplitude_HB = fs_->make<TH2F>("h_mapDepth2Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6421  h_mapDepth3Amplitude_HB = fs_->make<TH2F>("h_mapDepth3Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6422  h_mapDepth4Amplitude_HB = fs_->make<TH2F>("h_mapDepth4Amplitude_HB", " ", neta, -41., 41., nphi, 0., bphi);
6423  // Ratio:
6424  h_Ampl_HB = fs_->make<TH1F>("h_Ampl_HB", " ", 100, 0., 1.1);
6425  h_mapDepth1Ampl047_HB = fs_->make<TH2F>("h_mapDepth1Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6426  h_mapDepth2Ampl047_HB = fs_->make<TH2F>("h_mapDepth2Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6427  h_mapDepth3Ampl047_HB = fs_->make<TH2F>("h_mapDepth3Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6428  h_mapDepth4Ampl047_HB = fs_->make<TH2F>("h_mapDepth4Ampl047_HB", " ", neta, -41., 41., nphi, 0., bphi);
6429  h_mapDepth1Ampl_HB = fs_->make<TH2F>("h_mapDepth1Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6430  h_mapDepth2Ampl_HB = fs_->make<TH2F>("h_mapDepth2Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6431  h_mapDepth3Ampl_HB = fs_->make<TH2F>("h_mapDepth3Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6432  h_mapDepth4Ampl_HB = fs_->make<TH2F>("h_mapDepth4Ampl_HB", " ", neta, -41., 41., nphi, 0., bphi);
6433  h_mapDepth1AmplE34_HB = fs_->make<TH2F>("h_mapDepth1AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6434  h_mapDepth2AmplE34_HB = fs_->make<TH2F>("h_mapDepth2AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6435  h_mapDepth3AmplE34_HB = fs_->make<TH2F>("h_mapDepth3AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6436  h_mapDepth4AmplE34_HB = fs_->make<TH2F>("h_mapDepth4AmplE34_HB", " ", neta, -41., 41., nphi, 0., bphi);
6437  h_mapDepth1_HB = fs_->make<TH2F>("h_mapDepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
6438  h_mapDepth2_HB = fs_->make<TH2F>("h_mapDepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6439  h_mapDepth3_HB = fs_->make<TH2F>("h_mapDepth3_HB", " ", neta, -41., 41., nphi, 0., bphi);
6440  h_mapDepth4_HB = fs_->make<TH2F>("h_mapDepth4_HB", " ", neta, -41., 41., nphi, 0., bphi);
6441 
6442  h_mapDepth1TS2_HB = fs_->make<TH2F>("h_mapDepth1TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6443  h_mapDepth2TS2_HB = fs_->make<TH2F>("h_mapDepth2TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6444  h_mapDepth3TS2_HB = fs_->make<TH2F>("h_mapDepth3TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6445  h_mapDepth4TS2_HB = fs_->make<TH2F>("h_mapDepth4TS2_HB", " ", neta, -41., 41., nphi, 0., bphi);
6446  h_mapDepth1TS2_HE = fs_->make<TH2F>("h_mapDepth1TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6447  h_mapDepth2TS2_HE = fs_->make<TH2F>("h_mapDepth2TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6448  h_mapDepth3TS2_HE = fs_->make<TH2F>("h_mapDepth3TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6449  h_mapDepth4TS2_HE = fs_->make<TH2F>("h_mapDepth4TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6450  h_mapDepth5TS2_HE = fs_->make<TH2F>("h_mapDepth5TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6451  h_mapDepth6TS2_HE = fs_->make<TH2F>("h_mapDepth6TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6452  h_mapDepth7TS2_HE = fs_->make<TH2F>("h_mapDepth7TS2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6453  h_recSignalEnergy0_HF3 = fs_->make<TH2F>("h_recSignalEnergy0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6454  h_recSignalEnergy1_HF3 = fs_->make<TH2F>("h_recSignalEnergy1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6455  h_recSignalEnergy2_HF3 = fs_->make<TH2F>("h_recSignalEnergy2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6456  h_recSignalEnergy0_HF4 = fs_->make<TH2F>("h_recSignalEnergy0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6457  h_recSignalEnergy1_HF4 = fs_->make<TH2F>("h_recSignalEnergy1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6458  h_recSignalEnergy2_HF4 = fs_->make<TH2F>("h_recSignalEnergy2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6459  h_recNoiseEnergy0_HF3 = fs_->make<TH2F>("h_recNoiseEnergy0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6460  h_recNoiseEnergy1_HF3 = fs_->make<TH2F>("h_recNoiseEnergy1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6461  h_recNoiseEnergy2_HF3 = fs_->make<TH2F>("h_recNoiseEnergy2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6462  h_recNoiseEnergy0_HF4 = fs_->make<TH2F>("h_recNoiseEnergy0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6463  h_recNoiseEnergy1_HF4 = fs_->make<TH2F>("h_recNoiseEnergy1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6464  h_recNoiseEnergy2_HF4 = fs_->make<TH2F>("h_recNoiseEnergy2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6465  h_mapDepth1TS1_HF = fs_->make<TH2F>("h_mapDepth1TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6466  h_mapDepth2TS1_HF = fs_->make<TH2F>("h_mapDepth2TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6467  h_mapDepth3TS1_HF = fs_->make<TH2F>("h_mapDepth3TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6468  h_mapDepth4TS1_HF = fs_->make<TH2F>("h_mapDepth4TS1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6469  h_mapDepth4TS012_HO = fs_->make<TH2F>("h_mapDepth4TS012_HO", " ", neta, -41., 41., nphi, 0., bphi);
6470 
6472 
6473  // stuff regarding summed(total) Amplitude vs iEvent (histo-name is h_totalAmplitudeHEperEvent)
6474  // to see from which event ALL channels are available(related to quality of the run)
6475  h_numberofhitsHEtest = fs_->make<TH1F>("h_numberofhitsHEtest", " ", 100, 0., 10000.);
6476  h_AmplitudeHEtest = fs_->make<TH1F>("h_AmplitudeHEtest", " ", 100, 0., 1000000.);
6477  h_AmplitudeHEtest1 = fs_->make<TH1F>("h_AmplitudeHEtest1", " ", 100, 0., 1000000.);
6478  h_AmplitudeHEtest6 = fs_->make<TH1F>("h_AmplitudeHEtest6", " ", 100, 0., 2000000.);
6479  h_totalAmplitudeHE = fs_->make<TH1F>("h_totalAmplitudeHE", " ", 100, 0., 10000000000.);
6480  h_totalAmplitudeHEperEvent = fs_->make<TH1F>("h_totalAmplitudeHEperEvent", " ", 1000, 1., 1001.);
6481 
6482  // Aijk Amplitude:
6483  h_ADCAmplZoom1_HE = fs_->make<TH1F>("h_ADCAmplZoom1_HE", " ", npfit, 0., anpfit); // for amplmaxts 1TS w/ max
6484  h_ADCAmpl345Zoom1_HE = fs_->make<TH1F>("h_ADCAmpl345Zoom1_HE", " ", npfit, 0., anpfit); // for ampl3ts 3TSs
6485  h_ADCAmpl345Zoom_HE = fs_->make<TH1F>("h_ADCAmpl345Zoom_HE", " ", npfit, 0., anpfit); // for ampl 4TSs
6487  fs_->make<TH1F>("h_amplitudeaveragedbydepthes_HE", " ", npfit, 0., anpfit); // for cross-check: A spectrum
6489  fs_->make<TH1F>("h_ndepthesperamplitudebins_HE", " ", 10, 0., 10.); // for cross-check: ndepthes
6490 
6491  // Ampl12 4TSs to work with "ped-Gsel0" or "led-low-intensity" to clarify gain diff peak2-peak1
6493  fs_->make<TH2F>("h_mapADCAmplfirstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6495  fs_->make<TH2F>("h_mapADCAmplfirstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6497  fs_->make<TH2F>("h_mapADCAmplsecondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6499  "h_mapADCAmplsecondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for amplmaxts 1TS w/ max
6500 
6502  fs_->make<TH2F>("h_mapADCAmpl11firstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6504  fs_->make<TH2F>("h_mapADCAmpl11firstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6506  fs_->make<TH2F>("h_mapADCAmpl11secondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6508  fs_->make<TH2F>("h_mapADCAmpl11secondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl3ts 3TSs
6509 
6511  fs_->make<TH2F>("h_mapADCAmpl12firstpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6513  fs_->make<TH2F>("h_mapADCAmpl12firstpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6515  fs_->make<TH2F>("h_mapADCAmpl12secondpeak_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6517  fs_->make<TH2F>("h_mapADCAmpl12secondpeak0_HE", " ", neta, -41., 41., nphi, 0., bphi); // for ampl 4TSs
6518 
6519  // Ampl12 4TSs to work with "ped-Gsel0" or "led-low-intensity" to clarify gain diff peak2-peak1 fit results:
6520  h_gsmdifferencefit1_HE = fs_->make<TH1F>("h_gsmdifferencefit1_HE", " ", 80, 20., 60.);
6521  h_gsmdifferencefit2_HE = fs_->make<TH1F>("h_gsmdifferencefit2_HE", " ", 80, 20., 60.);
6522  h_gsmdifferencefit3_HE = fs_->make<TH1F>("h_gsmdifferencefit3_HE", " ", 80, 20., 60.);
6523  h_gsmdifferencefit4_HE = fs_->make<TH1F>("h_gsmdifferencefit4_HE", " ", 80, 20., 60.);
6524  h_gsmdifferencefit5_HE = fs_->make<TH1F>("h_gsmdifferencefit5_HE", " ", 80, 20., 60.);
6525  h_gsmdifferencefit6_HE = fs_->make<TH1F>("h_gsmdifferencefit6_HE", " ", 80, 20., 60.);
6526 
6527  // Aijk Amplitude:
6528  h_ADCAmpl_HE = fs_->make<TH1F>("h_ADCAmpl_HE", " ", 200, 0., 2000000.);
6529  h_ADCAmplrest_HE = fs_->make<TH1F>("h_ADCAmplrest_HE", " ", 100, 0., 500.);
6530  h_ADCAmplrest1_HE = fs_->make<TH1F>("h_ADCAmplrest1_HE", " ", 100, 0., 100.);
6531  h_ADCAmplrest6_HE = fs_->make<TH1F>("h_ADCAmplrest6_HE", " ", 100, 0., 10000.);
6532 
6533  h_ADCAmpl345_HE = fs_->make<TH1F>("h_ADCAmpl345_HE", " ", 70, 0., 700000.);
6534 
6535  // SiPM corrections:
6536  h_corrforxaMAIN_HE = fs_->make<TH1F>("h_corrforxaMAIN_HE", " ", 70, 0., 700000.);
6537  h_corrforxaMAIN0_HE = fs_->make<TH1F>("h_corrforxaMAIN0_HE", " ", 70, 0., 700000.);
6538  h_corrforxaADDI_HE = fs_->make<TH1F>("h_corrforxaADDI_HE", " ", 70, 0., 700000.);
6539  h_corrforxaADDI0_HE = fs_->make<TH1F>("h_corrforxaADDI0_HE", " ", 70, 0., 700000.);
6540 
6541  h_mapDepth1ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6542  h_mapDepth2ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6543  h_mapDepth3ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6544  h_mapDepth4ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6545  h_mapDepth5ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6546  h_mapDepth6ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6547  h_mapDepth7ADCAmpl225_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6549  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6551  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6553  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6555  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6557  fs_->make<TH2F>("h_mapDepth5ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6559  fs_->make<TH2F>("h_mapDepth6ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6561  fs_->make<TH2F>("h_mapDepth7ADCAmpl225Copy_HE", " ", neta, -41., 41., nphi, 0., bphi);
6562 
6563  h_mapDepth1ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6564  h_mapDepth2ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6565  h_mapDepth3ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6566  h_mapDepth4ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6567  h_mapDepth5ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6568  h_mapDepth6ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6569  h_mapDepth7ADCAmpl_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6570  h_mapDepth1ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth1ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6571  h_mapDepth2ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth2ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6572  h_mapDepth3ADCAmplSiPM_HE = fs_->make<TH2F>("h_mapDepth3ADCAmplSiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6573 
6574  h_TSmeanA_HE = fs_->make<TH1F>("h_TSmeanA_HE", " ", 100, -2., 8.);
6575  h_mapDepth1TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6576  h_mapDepth2TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6577  h_mapDepth3TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6578  h_mapDepth4TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6579  h_mapDepth5TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth5TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6580  h_mapDepth6TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth6TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6581  h_mapDepth7TSmeanA225_HE = fs_->make<TH2F>("h_mapDepth7TSmeanA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6582  h_mapDepth1TSmeanA_HE = fs_->make<TH2F>("h_mapDepth1TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6583  h_mapDepth2TSmeanA_HE = fs_->make<TH2F>("h_mapDepth2TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6584  h_mapDepth3TSmeanA_HE = fs_->make<TH2F>("h_mapDepth3TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6585  h_mapDepth4TSmeanA_HE = fs_->make<TH2F>("h_mapDepth4TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6586  h_mapDepth5TSmeanA_HE = fs_->make<TH2F>("h_mapDepth5TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6587  h_mapDepth6TSmeanA_HE = fs_->make<TH2F>("h_mapDepth6TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6588  h_mapDepth7TSmeanA_HE = fs_->make<TH2F>("h_mapDepth7TSmeanA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6589  h_TSmaxA_HE = fs_->make<TH1F>("h_TSmaxA_HE", " ", 100, -1., 11.);
6590  h_mapDepth1TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6591  h_mapDepth2TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6592  h_mapDepth3TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6593  h_mapDepth4TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6594  h_mapDepth5TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth5TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6595  h_mapDepth6TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth6TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6596  h_mapDepth7TSmaxA225_HE = fs_->make<TH2F>("h_mapDepth7TSmaxA225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6597  h_mapDepth1TSmaxA_HE = fs_->make<TH2F>("h_mapDepth1TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6598  h_mapDepth2TSmaxA_HE = fs_->make<TH2F>("h_mapDepth2TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6599  h_mapDepth3TSmaxA_HE = fs_->make<TH2F>("h_mapDepth3TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6600  h_mapDepth4TSmaxA_HE = fs_->make<TH2F>("h_mapDepth4TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6601  h_mapDepth5TSmaxA_HE = fs_->make<TH2F>("h_mapDepth5TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6602  h_mapDepth6TSmaxA_HE = fs_->make<TH2F>("h_mapDepth6TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6603  h_mapDepth7TSmaxA_HE = fs_->make<TH2F>("h_mapDepth7TSmaxA_HE", " ", neta, -41., 41., nphi, 0., bphi);
6604  // RMS:
6605  h_Amplitude_HE = fs_->make<TH1F>("h_Amplitude_HE", " ", 100, 0., 5.5);
6606  h_mapDepth1Amplitude225_HE = fs_->make<TH2F>("h_mapDepth1Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6607  h_mapDepth2Amplitude225_HE = fs_->make<TH2F>("h_mapDepth2Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6608  h_mapDepth3Amplitude225_HE = fs_->make<TH2F>("h_mapDepth3Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6609  h_mapDepth4Amplitude225_HE = fs_->make<TH2F>("h_mapDepth4Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6610  h_mapDepth5Amplitude225_HE = fs_->make<TH2F>("h_mapDepth5Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6611  h_mapDepth6Amplitude225_HE = fs_->make<TH2F>("h_mapDepth6Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6612  h_mapDepth7Amplitude225_HE = fs_->make<TH2F>("h_mapDepth7Amplitude225_HE", " ", neta, -41., 41., nphi, 0., bphi);
6613  h_mapDepth1Amplitude_HE = fs_->make<TH2F>("h_mapDepth1Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6614  h_mapDepth2Amplitude_HE = fs_->make<TH2F>("h_mapDepth2Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6615  h_mapDepth3Amplitude_HE = fs_->make<TH2F>("h_mapDepth3Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6616  h_mapDepth4Amplitude_HE = fs_->make<TH2F>("h_mapDepth4Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6617  h_mapDepth5Amplitude_HE = fs_->make<TH2F>("h_mapDepth5Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6618  h_mapDepth6Amplitude_HE = fs_->make<TH2F>("h_mapDepth6Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6619  h_mapDepth7Amplitude_HE = fs_->make<TH2F>("h_mapDepth7Amplitude_HE", " ", neta, -41., 41., nphi, 0., bphi);
6620 
6621  // Ratio:
6622  h_Ampl_HE = fs_->make<TH1F>("h_Ampl_HE", " ", 100, 0., 1.1);
6623  h_mapDepth1Ampl047_HE = fs_->make<TH2F>("h_mapDepth1Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6624  h_mapDepth2Ampl047_HE = fs_->make<TH2F>("h_mapDepth2Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6625  h_mapDepth3Ampl047_HE = fs_->make<TH2F>("h_mapDepth3Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6626  h_mapDepth4Ampl047_HE = fs_->make<TH2F>("h_mapDepth4Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6627  h_mapDepth5Ampl047_HE = fs_->make<TH2F>("h_mapDepth5Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6628  h_mapDepth6Ampl047_HE = fs_->make<TH2F>("h_mapDepth6Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6629  h_mapDepth7Ampl047_HE = fs_->make<TH2F>("h_mapDepth7Ampl047_HE", " ", neta, -41., 41., nphi, 0., bphi);
6630  h_mapDepth1Ampl_HE = fs_->make<TH2F>("h_mapDepth1Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6631  h_mapDepth2Ampl_HE = fs_->make<TH2F>("h_mapDepth2Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6632  h_mapDepth3Ampl_HE = fs_->make<TH2F>("h_mapDepth3Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6633  h_mapDepth4Ampl_HE = fs_->make<TH2F>("h_mapDepth4Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6634  h_mapDepth5Ampl_HE = fs_->make<TH2F>("h_mapDepth5Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6635  h_mapDepth6Ampl_HE = fs_->make<TH2F>("h_mapDepth6Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6636  h_mapDepth7Ampl_HE = fs_->make<TH2F>("h_mapDepth7Ampl_HE", " ", neta, -41., 41., nphi, 0., bphi);
6637  h_mapDepth1AmplE34_HE = fs_->make<TH2F>("h_mapDepth1AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6638  h_mapDepth2AmplE34_HE = fs_->make<TH2F>("h_mapDepth2AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6639  h_mapDepth3AmplE34_HE = fs_->make<TH2F>("h_mapDepth3AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6640  h_mapDepth4AmplE34_HE = fs_->make<TH2F>("h_mapDepth4AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6641  h_mapDepth5AmplE34_HE = fs_->make<TH2F>("h_mapDepth5AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6642  h_mapDepth6AmplE34_HE = fs_->make<TH2F>("h_mapDepth6AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6643  h_mapDepth7AmplE34_HE = fs_->make<TH2F>("h_mapDepth7AmplE34_HE", " ", neta, -41., 41., nphi, 0., bphi);
6644  h_mapDepth1_HE = fs_->make<TH2F>("h_mapDepth1_HE", " ", neta, -41., 41., nphi, 0., bphi);
6645  h_mapDepth2_HE = fs_->make<TH2F>("h_mapDepth2_HE", " ", neta, -41., 41., nphi, 0., bphi);
6646  h_mapDepth3_HE = fs_->make<TH2F>("h_mapDepth3_HE", " ", neta, -41., 41., nphi, 0., bphi);
6647  h_mapDepth4_HE = fs_->make<TH2F>("h_mapDepth4_HE", " ", neta, -41., 41., nphi, 0., bphi);
6648  h_mapDepth5_HE = fs_->make<TH2F>("h_mapDepth5_HE", " ", neta, -41., 41., nphi, 0., bphi);
6649  h_mapDepth6_HE = fs_->make<TH2F>("h_mapDepth6_HE", " ", neta, -41., 41., nphi, 0., bphi);
6650  h_mapDepth7_HE = fs_->make<TH2F>("h_mapDepth7_HE", " ", neta, -41., 41., nphi, 0., bphi);
6652  h_mapenophinorm_HE1 = fs_->make<TH2F>("h_mapenophinorm_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6653  h_mapenophinorm_HE2 = fs_->make<TH2F>("h_mapenophinorm_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6654  h_mapenophinorm_HE3 = fs_->make<TH2F>("h_mapenophinorm_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6655  h_mapenophinorm_HE4 = fs_->make<TH2F>("h_mapenophinorm_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6656  h_mapenophinorm_HE5 = fs_->make<TH2F>("h_mapenophinorm_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6657  h_mapenophinorm_HE6 = fs_->make<TH2F>("h_mapenophinorm_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6658  h_mapenophinorm_HE7 = fs_->make<TH2F>("h_mapenophinorm_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6659  h_mapenophinorm2_HE1 = fs_->make<TH2F>("h_mapenophinorm2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6660  h_mapenophinorm2_HE2 = fs_->make<TH2F>("h_mapenophinorm2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6661  h_mapenophinorm2_HE3 = fs_->make<TH2F>("h_mapenophinorm2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6662  h_mapenophinorm2_HE4 = fs_->make<TH2F>("h_mapenophinorm2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6663  h_mapenophinorm2_HE5 = fs_->make<TH2F>("h_mapenophinorm2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6664  h_mapenophinorm2_HE6 = fs_->make<TH2F>("h_mapenophinorm2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6665  h_mapenophinorm2_HE7 = fs_->make<TH2F>("h_mapenophinorm2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6666 
6667  h_maprphinorm_HE1 = fs_->make<TH2F>("h_maprphinorm_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6668  h_maprphinorm_HE2 = fs_->make<TH2F>("h_maprphinorm_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6669  h_maprphinorm_HE3 = fs_->make<TH2F>("h_maprphinorm_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6670  h_maprphinorm_HE4 = fs_->make<TH2F>("h_maprphinorm_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6671  h_maprphinorm_HE5 = fs_->make<TH2F>("h_maprphinorm_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6672  h_maprphinorm_HE6 = fs_->make<TH2F>("h_maprphinorm_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6673  h_maprphinorm_HE7 = fs_->make<TH2F>("h_maprphinorm_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6674  h_maprphinorm2_HE1 = fs_->make<TH2F>("h_maprphinorm2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6675  h_maprphinorm2_HE2 = fs_->make<TH2F>("h_maprphinorm2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6676  h_maprphinorm2_HE3 = fs_->make<TH2F>("h_maprphinorm2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6677  h_maprphinorm2_HE4 = fs_->make<TH2F>("h_maprphinorm2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6678  h_maprphinorm2_HE5 = fs_->make<TH2F>("h_maprphinorm2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6679  h_maprphinorm2_HE6 = fs_->make<TH2F>("h_maprphinorm2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6680  h_maprphinorm2_HE7 = fs_->make<TH2F>("h_maprphinorm2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6681 
6682  h_maprphinorm0_HE1 = fs_->make<TH2F>("h_maprphinorm0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6683  h_maprphinorm0_HE2 = fs_->make<TH2F>("h_maprphinorm0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6684  h_maprphinorm0_HE3 = fs_->make<TH2F>("h_maprphinorm0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6685  h_maprphinorm0_HE4 = fs_->make<TH2F>("h_maprphinorm0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6686  h_maprphinorm0_HE5 = fs_->make<TH2F>("h_maprphinorm0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6687  h_maprphinorm0_HE6 = fs_->make<TH2F>("h_maprphinorm0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6688  h_maprphinorm0_HE7 = fs_->make<TH2F>("h_maprphinorm0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6689 
6690  //
6691  // Didi as done in Reco
6692  //HB:
6693  h_amplitudechannel0_HB1 = fs_->make<TH2F>("h_amplitudechannel0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6694  h_amplitudechannel1_HB1 = fs_->make<TH2F>("h_amplitudechannel1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6695  h_amplitudechannel2_HB1 = fs_->make<TH2F>("h_amplitudechannel2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6696  h_amplitudechannel0_HB2 = fs_->make<TH2F>("h_amplitudechannel0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6697  h_amplitudechannel1_HB2 = fs_->make<TH2F>("h_amplitudechannel1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6698  h_amplitudechannel2_HB2 = fs_->make<TH2F>("h_amplitudechannel2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6699  h_amplitudechannel0_HB3 = fs_->make<TH2F>("h_amplitudechannel0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6700  h_amplitudechannel1_HB3 = fs_->make<TH2F>("h_amplitudechannel1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6701  h_amplitudechannel2_HB3 = fs_->make<TH2F>("h_amplitudechannel2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6702  h_amplitudechannel0_HB4 = fs_->make<TH2F>("h_amplitudechannel0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6703  h_amplitudechannel1_HB4 = fs_->make<TH2F>("h_amplitudechannel1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6704  h_amplitudechannel2_HB4 = fs_->make<TH2F>("h_amplitudechannel2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6705  //HE:
6706  h_amplitudechannel0_HE1 = fs_->make<TH2F>("h_amplitudechannel0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6707  h_amplitudechannel1_HE1 = fs_->make<TH2F>("h_amplitudechannel1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6708  h_amplitudechannel2_HE1 = fs_->make<TH2F>("h_amplitudechannel2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6709  h_amplitudechannel0_HE2 = fs_->make<TH2F>("h_amplitudechannel0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6710  h_amplitudechannel1_HE2 = fs_->make<TH2F>("h_amplitudechannel1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6711  h_amplitudechannel2_HE2 = fs_->make<TH2F>("h_amplitudechannel2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6712  h_amplitudechannel0_HE3 = fs_->make<TH2F>("h_amplitudechannel0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6713  h_amplitudechannel1_HE3 = fs_->make<TH2F>("h_amplitudechannel1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6714  h_amplitudechannel2_HE3 = fs_->make<TH2F>("h_amplitudechannel2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6715  h_amplitudechannel0_HE4 = fs_->make<TH2F>("h_amplitudechannel0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6716  h_amplitudechannel1_HE4 = fs_->make<TH2F>("h_amplitudechannel1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6717  h_amplitudechannel2_HE4 = fs_->make<TH2F>("h_amplitudechannel2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6718  h_amplitudechannel0_HE5 = fs_->make<TH2F>("h_amplitudechannel0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6719  h_amplitudechannel1_HE5 = fs_->make<TH2F>("h_amplitudechannel1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6720  h_amplitudechannel2_HE5 = fs_->make<TH2F>("h_amplitudechannel2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6721  h_amplitudechannel0_HE6 = fs_->make<TH2F>("h_amplitudechannel0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6722  h_amplitudechannel1_HE6 = fs_->make<TH2F>("h_amplitudechannel1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6723  h_amplitudechannel2_HE6 = fs_->make<TH2F>("h_amplitudechannel2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6724  h_amplitudechannel0_HE7 = fs_->make<TH2F>("h_amplitudechannel0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6725  h_amplitudechannel1_HE7 = fs_->make<TH2F>("h_amplitudechannel1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6726  h_amplitudechannel2_HE7 = fs_->make<TH2F>("h_amplitudechannel2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6727  //HF:
6728  h_amplitudechannel0_HF1 = fs_->make<TH2F>("h_amplitudechannel0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6729  h_amplitudechannel1_HF1 = fs_->make<TH2F>("h_amplitudechannel1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6730  h_amplitudechannel2_HF1 = fs_->make<TH2F>("h_amplitudechannel2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6731  h_amplitudechannel0_HF2 = fs_->make<TH2F>("h_amplitudechannel0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6732  h_amplitudechannel1_HF2 = fs_->make<TH2F>("h_amplitudechannel1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6733  h_amplitudechannel2_HF2 = fs_->make<TH2F>("h_amplitudechannel2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6734  h_amplitudechannel0_HF3 = fs_->make<TH2F>("h_amplitudechannel0_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6735  h_amplitudechannel1_HF3 = fs_->make<TH2F>("h_amplitudechannel1_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6736  h_amplitudechannel2_HF3 = fs_->make<TH2F>("h_amplitudechannel2_HF3", " ", neta, -41., 41., nphi, 0., bphi);
6737  h_amplitudechannel0_HF4 = fs_->make<TH2F>("h_amplitudechannel0_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6738  h_amplitudechannel1_HF4 = fs_->make<TH2F>("h_amplitudechannel1_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6739  h_amplitudechannel2_HF4 = fs_->make<TH2F>("h_amplitudechannel2_HF4", " ", neta, -41., 41., nphi, 0., bphi);
6740 
6741  // Reco
6742  h_energyhitSignal_HB = fs_->make<TH1F>("h_energyhitSignal_HB", " ", npfit, -0.22, 0.22);
6743  h_energyhitSignal_HE = fs_->make<TH1F>("h_energyhitSignal_HE", " ", npfit, -0.22, 0.22);
6744  h_energyhitSignal_HF = fs_->make<TH1F>("h_energyhitSignal_HF", " ", npfit, -6.6, 6.6);
6745  h_energyhitNoise_HB = fs_->make<TH1F>("h_energyhitNoise_HB", " ", npfit, -0.22, 0.22);
6746  h_energyhitNoise_HE = fs_->make<TH1F>("h_energyhitNoise_HE", " ", npfit, -0.22, 0.22);
6747  h_energyhitNoise_HF = fs_->make<TH1F>("h_energyhitNoise_HF", " ", npfit, -4.4, 4.4);
6748 
6749  //HB:
6750  h_recSignalEnergy0_HB1 = fs_->make<TH2F>("h_recSignalEnergy0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6751  h_recSignalEnergy1_HB1 = fs_->make<TH2F>("h_recSignalEnergy1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6752  h_recSignalEnergy2_HB1 = fs_->make<TH2F>("h_recSignalEnergy2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6753  h_recSignalEnergy0_HB2 = fs_->make<TH2F>("h_recSignalEnergy0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6754  h_recSignalEnergy1_HB2 = fs_->make<TH2F>("h_recSignalEnergy1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6755  h_recSignalEnergy2_HB2 = fs_->make<TH2F>("h_recSignalEnergy2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6756  h_recSignalEnergy0_HB3 = fs_->make<TH2F>("h_recSignalEnergy0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6757  h_recSignalEnergy1_HB3 = fs_->make<TH2F>("h_recSignalEnergy1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6758  h_recSignalEnergy2_HB3 = fs_->make<TH2F>("h_recSignalEnergy2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6759  h_recSignalEnergy0_HB4 = fs_->make<TH2F>("h_recSignalEnergy0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6760  h_recSignalEnergy1_HB4 = fs_->make<TH2F>("h_recSignalEnergy1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6761  h_recSignalEnergy2_HB4 = fs_->make<TH2F>("h_recSignalEnergy2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6762 
6763  h_recNoiseEnergy0_HB1 = fs_->make<TH2F>("h_recNoiseEnergy0_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6764  h_recNoiseEnergy1_HB1 = fs_->make<TH2F>("h_recNoiseEnergy1_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6765  h_recNoiseEnergy2_HB1 = fs_->make<TH2F>("h_recNoiseEnergy2_HB1", " ", neta, -41., 41., nphi, 0., bphi);
6766  h_recNoiseEnergy0_HB2 = fs_->make<TH2F>("h_recNoiseEnergy0_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6767  h_recNoiseEnergy1_HB2 = fs_->make<TH2F>("h_recNoiseEnergy1_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6768  h_recNoiseEnergy2_HB2 = fs_->make<TH2F>("h_recNoiseEnergy2_HB2", " ", neta, -41., 41., nphi, 0., bphi);
6769  h_recNoiseEnergy0_HB3 = fs_->make<TH2F>("h_recNoiseEnergy0_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6770  h_recNoiseEnergy1_HB3 = fs_->make<TH2F>("h_recNoiseEnergy1_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6771  h_recNoiseEnergy2_HB3 = fs_->make<TH2F>("h_recNoiseEnergy2_HB3", " ", neta, -41., 41., nphi, 0., bphi);
6772  h_recNoiseEnergy0_HB4 = fs_->make<TH2F>("h_recNoiseEnergy0_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6773  h_recNoiseEnergy1_HB4 = fs_->make<TH2F>("h_recNoiseEnergy1_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6774  h_recNoiseEnergy2_HB4 = fs_->make<TH2F>("h_recNoiseEnergy2_HB4", " ", neta, -41., 41., nphi, 0., bphi);
6775 
6776  //HE:
6777  h_recSignalEnergy0_HE1 = fs_->make<TH2F>("h_recSignalEnergy0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6778  h_recSignalEnergy1_HE1 = fs_->make<TH2F>("h_recSignalEnergy1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6779  h_recSignalEnergy2_HE1 = fs_->make<TH2F>("h_recSignalEnergy2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6780  h_recSignalEnergy0_HE2 = fs_->make<TH2F>("h_recSignalEnergy0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6781  h_recSignalEnergy1_HE2 = fs_->make<TH2F>("h_recSignalEnergy1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6782  h_recSignalEnergy2_HE2 = fs_->make<TH2F>("h_recSignalEnergy2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6783  h_recSignalEnergy0_HE3 = fs_->make<TH2F>("h_recSignalEnergy0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6784  h_recSignalEnergy1_HE3 = fs_->make<TH2F>("h_recSignalEnergy1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6785  h_recSignalEnergy2_HE3 = fs_->make<TH2F>("h_recSignalEnergy2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6786  h_recSignalEnergy0_HE4 = fs_->make<TH2F>("h_recSignalEnergy0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6787  h_recSignalEnergy1_HE4 = fs_->make<TH2F>("h_recSignalEnergy1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6788  h_recSignalEnergy2_HE4 = fs_->make<TH2F>("h_recSignalEnergy2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6789  h_recSignalEnergy0_HE5 = fs_->make<TH2F>("h_recSignalEnergy0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6790  h_recSignalEnergy1_HE5 = fs_->make<TH2F>("h_recSignalEnergy1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6791  h_recSignalEnergy2_HE5 = fs_->make<TH2F>("h_recSignalEnergy2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6792  h_recSignalEnergy0_HE6 = fs_->make<TH2F>("h_recSignalEnergy0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6793  h_recSignalEnergy1_HE6 = fs_->make<TH2F>("h_recSignalEnergy1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6794  h_recSignalEnergy2_HE6 = fs_->make<TH2F>("h_recSignalEnergy2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6795  h_recSignalEnergy0_HE7 = fs_->make<TH2F>("h_recSignalEnergy0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6796  h_recSignalEnergy1_HE7 = fs_->make<TH2F>("h_recSignalEnergy1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6797  h_recSignalEnergy2_HE7 = fs_->make<TH2F>("h_recSignalEnergy2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6798 
6799  h_recNoiseEnergy0_HE1 = fs_->make<TH2F>("h_recNoiseEnergy0_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6800  h_recNoiseEnergy1_HE1 = fs_->make<TH2F>("h_recNoiseEnergy1_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6801  h_recNoiseEnergy2_HE1 = fs_->make<TH2F>("h_recNoiseEnergy2_HE1", " ", neta, -41., 41., nphi, 0., bphi);
6802  h_recNoiseEnergy0_HE2 = fs_->make<TH2F>("h_recNoiseEnergy0_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6803  h_recNoiseEnergy1_HE2 = fs_->make<TH2F>("h_recNoiseEnergy1_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6804  h_recNoiseEnergy2_HE2 = fs_->make<TH2F>("h_recNoiseEnergy2_HE2", " ", neta, -41., 41., nphi, 0., bphi);
6805  h_recNoiseEnergy0_HE3 = fs_->make<TH2F>("h_recNoiseEnergy0_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6806  h_recNoiseEnergy1_HE3 = fs_->make<TH2F>("h_recNoiseEnergy1_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6807  h_recNoiseEnergy2_HE3 = fs_->make<TH2F>("h_recNoiseEnergy2_HE3", " ", neta, -41., 41., nphi, 0., bphi);
6808  h_recNoiseEnergy0_HE4 = fs_->make<TH2F>("h_recNoiseEnergy0_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6809  h_recNoiseEnergy1_HE4 = fs_->make<TH2F>("h_recNoiseEnergy1_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6810  h_recNoiseEnergy2_HE4 = fs_->make<TH2F>("h_recNoiseEnergy2_HE4", " ", neta, -41., 41., nphi, 0., bphi);
6811  h_recNoiseEnergy0_HE5 = fs_->make<TH2F>("h_recNoiseEnergy0_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6812  h_recNoiseEnergy1_HE5 = fs_->make<TH2F>("h_recNoiseEnergy1_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6813  h_recNoiseEnergy2_HE5 = fs_->make<TH2F>("h_recNoiseEnergy2_HE5", " ", neta, -41., 41., nphi, 0., bphi);
6814  h_recNoiseEnergy0_HE6 = fs_->make<TH2F>("h_recNoiseEnergy0_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6815  h_recNoiseEnergy1_HE6 = fs_->make<TH2F>("h_recNoiseEnergy1_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6816  h_recNoiseEnergy2_HE6 = fs_->make<TH2F>("h_recNoiseEnergy2_HE6", " ", neta, -41., 41., nphi, 0., bphi);
6817  h_recNoiseEnergy0_HE7 = fs_->make<TH2F>("h_recNoiseEnergy0_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6818  h_recNoiseEnergy1_HE7 = fs_->make<TH2F>("h_recNoiseEnergy1_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6819  h_recNoiseEnergy2_HE7 = fs_->make<TH2F>("h_recNoiseEnergy2_HE7", " ", neta, -41., 41., nphi, 0., bphi);
6820 
6821  //HF:
6822  h_recSignalEnergy0_HF1 = fs_->make<TH2F>("h_recSignalEnergy0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6823  h_recSignalEnergy1_HF1 = fs_->make<TH2F>("h_recSignalEnergy1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6824  h_recSignalEnergy2_HF1 = fs_->make<TH2F>("h_recSignalEnergy2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6825  h_recSignalEnergy0_HF2 = fs_->make<TH2F>("h_recSignalEnergy0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6826  h_recSignalEnergy1_HF2 = fs_->make<TH2F>("h_recSignalEnergy1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6827  h_recSignalEnergy2_HF2 = fs_->make<TH2F>("h_recSignalEnergy2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6828 
6829  h_recNoiseEnergy0_HF1 = fs_->make<TH2F>("h_recNoiseEnergy0_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6830  h_recNoiseEnergy1_HF1 = fs_->make<TH2F>("h_recNoiseEnergy1_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6831  h_recNoiseEnergy2_HF1 = fs_->make<TH2F>("h_recNoiseEnergy2_HF1", " ", neta, -41., 41., nphi, 0., bphi);
6832  h_recNoiseEnergy0_HF2 = fs_->make<TH2F>("h_recNoiseEnergy0_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6833  h_recNoiseEnergy1_HF2 = fs_->make<TH2F>("h_recNoiseEnergy1_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6834  h_recNoiseEnergy2_HF2 = fs_->make<TH2F>("h_recNoiseEnergy2_HF2", " ", neta, -41., 41., nphi, 0., bphi);
6835 
6837  // RADDAM:
6838  // if(flagLaserRaddam_ == 1 ) {
6839  // }
6840  int min80 = -100.;
6841  int max80 = 9000.;
6842  // fill for each digi (=each event, each channel)
6843  h_mapDepth1RADDAM_HE = fs_->make<TH2F>("h_mapDepth1RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6844  h_mapDepth2RADDAM_HE = fs_->make<TH2F>("h_mapDepth2RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6845  h_mapDepth3RADDAM_HE = fs_->make<TH2F>("h_mapDepth3RADDAM_HE", " ", neta, -41., 41., nphi, 0., bphi);
6846  h_mapDepth1RADDAM0_HE = fs_->make<TH2F>("h_mapDepth1RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6847  h_mapDepth2RADDAM0_HE = fs_->make<TH2F>("h_mapDepth2RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6848  h_mapDepth3RADDAM0_HE = fs_->make<TH2F>("h_mapDepth3RADDAM0_HE", " ", neta, -41., 41., nphi, 0., bphi);
6849 
6850  h_sigLayer1RADDAM_HE = fs_->make<TH1F>("h_sigLayer1RADDAM_HE", " ", neta, -41., 41.);
6851  h_sigLayer2RADDAM_HE = fs_->make<TH1F>("h_sigLayer2RADDAM_HE", " ", neta, -41., 41.);
6852  h_sigLayer1RADDAM0_HE = fs_->make<TH1F>("h_sigLayer1RADDAM0_HE", " ", neta, -41., 41.);
6853  h_sigLayer2RADDAM0_HE = fs_->make<TH1F>("h_sigLayer2RADDAM0_HE", " ", neta, -41., 41.);
6854  h_AamplitudewithPedSubtr_RADDAM_HE = fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HE", " ", 100, min80, max80);
6856  fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HEzoom0", " ", 100, min80, 4000.);
6858  fs_->make<TH1F>("h_AamplitudewithPedSubtr_RADDAM_HEzoom1", " ", 100, min80, 1000.);
6859  h_mapDepth3RADDAM16_HE = fs_->make<TH1F>("h_mapDepth3RADDAM16_HE", " ", 100, min80, max80);
6860  h_A_Depth1RADDAM_HE = fs_->make<TH1F>("h_A_Depth1RADDAM_HE", " ", 100, min80, max80);
6861  h_A_Depth2RADDAM_HE = fs_->make<TH1F>("h_A_Depth2RADDAM_HE", " ", 100, min80, max80);
6862  h_A_Depth3RADDAM_HE = fs_->make<TH1F>("h_A_Depth3RADDAM_HE", " ", 100, min80, max80);
6863  int min90 = 0.;
6864  int max90 = 5000.;
6865  h_sumphiEta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2", " ", 100, min90, 70. * max90);
6866  h_Eta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2", " ", 100, min90, max90);
6867  h_NphiForEta16Depth3RADDAM_HED2 = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2", " ", 100, 0, 100.);
6868  h_sumphiEta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2P", " ", 100, min90, 70. * max90);
6869  h_Eta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2P", " ", 100, min90, max90);
6870  h_NphiForEta16Depth3RADDAM_HED2P = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2P", " ", 100, 0, 100.);
6872  fs_->make<TH1F>("h_sumphiEta16Depth3RADDAM_HED2ALL", " ", 100, min90, 70. * max90);
6873  h_Eta16Depth3RADDAM_HED2ALL = fs_->make<TH1F>("h_Eta16Depth3RADDAM_HED2ALL", " ", 100, min90, max90);
6874  h_NphiForEta16Depth3RADDAM_HED2ALL = fs_->make<TH1F>("h_NphiForEta16Depth3RADDAM_HED2ALL", " ", 100, 0, 100.);
6875  h_sigLayer1RADDAM5_HE = fs_->make<TH1F>("h_sigLayer1RADDAM5_HE", " ", neta, -41., 41.);
6876  h_sigLayer2RADDAM5_HE = fs_->make<TH1F>("h_sigLayer2RADDAM5_HE", " ", neta, -41., 41.);
6877  h_sigLayer1RADDAM6_HE = fs_->make<TH1F>("h_sigLayer1RADDAM6_HE", " ", neta, -41., 41.);
6878  h_sigLayer2RADDAM6_HE = fs_->make<TH1F>("h_sigLayer2RADDAM6_HE", " ", neta, -41., 41.);
6879  h_sigLayer1RADDAM5_HED2 = fs_->make<TH1F>("h_sigLayer1RADDAM5_HED2", " ", neta, -41., 41.);
6880  h_sigLayer2RADDAM5_HED2 = fs_->make<TH1F>("h_sigLayer2RADDAM5_HED2", " ", neta, -41., 41.);
6881  h_sigLayer1RADDAM6_HED2 = fs_->make<TH1F>("h_sigLayer1RADDAM6_HED2", " ", neta, -41., 41.);
6882  h_sigLayer2RADDAM6_HED2 = fs_->make<TH1F>("h_sigLayer2RADDAM6_HED2", " ", neta, -41., 41.);
6883 
6884  h_numberofhitsHFtest = fs_->make<TH1F>("h_numberofhitsHFtest", " ", 100, 0., 30000.);
6885  h_AmplitudeHFtest = fs_->make<TH1F>("h_AmplitudeHFtest", " ", 100, 0., 300000.);
6886  h_totalAmplitudeHF = fs_->make<TH1F>("h_totalAmplitudeHF", " ", 100, 0., 100000000000.);
6887  h_totalAmplitudeHFperEvent = fs_->make<TH1F>("h_totalAmplitudeHFperEvent", " ", 1000, 1., 1001.);
6888  // fullAmplitude:
6889  h_ADCAmplZoom1_HF = fs_->make<TH1F>("h_ADCAmplZoom1_HF", " ", 100, 0., 1000000.);
6890  h_ADCAmpl_HF = fs_->make<TH1F>("h_ADCAmpl_HF", " ", 250, 0., 500000.);
6891  h_ADCAmplrest1_HF = fs_->make<TH1F>("h_ADCAmplrest1_HF", " ", 100, 0., 1000.);
6892  h_ADCAmplrest6_HF = fs_->make<TH1F>("h_ADCAmplrest6_HF", " ", 100, 0., 10000.);
6893 
6894  h_mapDepth1ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6895  h_mapDepth2ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6897  fs_->make<TH2F>("h_mapDepth1ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6899  fs_->make<TH2F>("h_mapDepth2ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6900  h_mapDepth1ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6901  h_mapDepth2ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6902  h_mapDepth3ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6903  h_mapDepth4ADCAmpl225_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6905  fs_->make<TH2F>("h_mapDepth3ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6907  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HF", " ", neta, -41., 41., nphi, 0., bphi);
6908  h_mapDepth3ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6909  h_mapDepth4ADCAmpl_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6910  h_TSmeanA_HF = fs_->make<TH1F>("h_TSmeanA_HF", " ", 100, -1., 11.);
6911  h_mapDepth1TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth1TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6912  h_mapDepth2TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth2TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6913  h_mapDepth1TSmeanA_HF = fs_->make<TH2F>("h_mapDepth1TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6914  h_mapDepth2TSmeanA_HF = fs_->make<TH2F>("h_mapDepth2TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6915  h_mapDepth3TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth3TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6916  h_mapDepth4TSmeanA225_HF = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6917  h_mapDepth3TSmeanA_HF = fs_->make<TH2F>("h_mapDepth3TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6918  h_mapDepth4TSmeanA_HF = fs_->make<TH2F>("h_mapDepth4TSmeanA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6919  h_Amplitude_HF = fs_->make<TH1F>("h_Amplitude_HF", " ", 100, 0., 5.);
6920  h_TSmaxA_HF = fs_->make<TH1F>("h_TSmaxA_HF", " ", 100, -1., 11.);
6921  h_mapDepth1TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth1TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6922  h_mapDepth2TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth2TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6923  h_mapDepth1TSmaxA_HF = fs_->make<TH2F>("h_mapDepth1TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6924  h_mapDepth2TSmaxA_HF = fs_->make<TH2F>("h_mapDepth2TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6925  h_mapDepth3TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth3TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6926  h_mapDepth4TSmaxA225_HF = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6927  h_mapDepth3TSmaxA_HF = fs_->make<TH2F>("h_mapDepth3TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6928  h_mapDepth4TSmaxA_HF = fs_->make<TH2F>("h_mapDepth4TSmaxA_HF", " ", neta, -41., 41., nphi, 0., bphi);
6929  h_Amplitude_HF = fs_->make<TH1F>("h_Amplitude_HF", " ", 100, 0., 5.);
6930  h_mapDepth1Amplitude225_HF = fs_->make<TH2F>("h_mapDepth1Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6931  h_mapDepth2Amplitude225_HF = fs_->make<TH2F>("h_mapDepth2Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6932  h_mapDepth1Amplitude_HF = fs_->make<TH2F>("h_mapDepth1Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6933  h_mapDepth2Amplitude_HF = fs_->make<TH2F>("h_mapDepth2Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6934  h_mapDepth3Amplitude225_HF = fs_->make<TH2F>("h_mapDepth3Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6935  h_mapDepth4Amplitude225_HF = fs_->make<TH2F>("h_mapDepth4Amplitude225_HF", " ", neta, -41., 41., nphi, 0., bphi);
6936  h_mapDepth3Amplitude_HF = fs_->make<TH2F>("h_mapDepth3Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6937  h_mapDepth4Amplitude_HF = fs_->make<TH2F>("h_mapDepth4Amplitude_HF", " ", neta, -41., 41., nphi, 0., bphi);
6938  // Ratio:
6939  h_Ampl_HF = fs_->make<TH1F>("h_Ampl_HF", " ", 100, 0., 1.1);
6940  h_mapDepth1Ampl047_HF = fs_->make<TH2F>("h_mapDepth1Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6941  h_mapDepth2Ampl047_HF = fs_->make<TH2F>("h_mapDepth2Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6942  h_mapDepth1Ampl_HF = fs_->make<TH2F>("h_mapDepth1Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6943  h_mapDepth2Ampl_HF = fs_->make<TH2F>("h_mapDepth2Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6944  h_mapDepth1AmplE34_HF = fs_->make<TH2F>("h_mapDepth1AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6945  h_mapDepth2AmplE34_HF = fs_->make<TH2F>("h_mapDepth2AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6946  h_mapDepth1_HF = fs_->make<TH2F>("h_mapDepth1_HF", " ", neta, -41., 41., nphi, 0., bphi);
6947  h_mapDepth2_HF = fs_->make<TH2F>("h_mapDepth2_HF", " ", neta, -41., 41., nphi, 0., bphi);
6948  h_mapDepth3Ampl047_HF = fs_->make<TH2F>("h_mapDepth3Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6949  h_mapDepth4Ampl047_HF = fs_->make<TH2F>("h_mapDepth4Ampl047_HF", " ", neta, -41., 41., nphi, 0., bphi);
6950  h_mapDepth3Ampl_HF = fs_->make<TH2F>("h_mapDepth3Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6951  h_mapDepth4Ampl_HF = fs_->make<TH2F>("h_mapDepth4Ampl_HF", " ", neta, -41., 41., nphi, 0., bphi);
6952  h_mapDepth3AmplE34_HF = fs_->make<TH2F>("h_mapDepth3AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6953  h_mapDepth4AmplE34_HF = fs_->make<TH2F>("h_mapDepth4AmplE34_HF", " ", neta, -41., 41., nphi, 0., bphi);
6954  h_mapDepth3_HF = fs_->make<TH2F>("h_mapDepth3_HF", " ", neta, -41., 41., nphi, 0., bphi);
6955  h_mapDepth4_HF = fs_->make<TH2F>("h_mapDepth4_HF", " ", neta, -41., 41., nphi, 0., bphi);
6956 
6958  h_numberofhitsHOtest = fs_->make<TH1F>("h_numberofhitsHOtest", " ", 100, 0., 30000.);
6959  h_AmplitudeHOtest = fs_->make<TH1F>("h_AmplitudeHOtest", " ", 100, 0., 300000.);
6960  h_totalAmplitudeHO = fs_->make<TH1F>("h_totalAmplitudeHO", " ", 100, 0., 100000000.);
6961  h_totalAmplitudeHOperEvent = fs_->make<TH1F>("h_totalAmplitudeHOperEvent", " ", 1000, 1., 1001.);
6962  // fullAmplitude:
6963  h_ADCAmpl_HO = fs_->make<TH1F>("h_ADCAmpl_HO", " ", 100, 0., 7000.);
6964  h_ADCAmplrest1_HO = fs_->make<TH1F>("h_ADCAmplrest1_HO", " ", 100, 0., 150.);
6965  h_ADCAmplrest6_HO = fs_->make<TH1F>("h_ADCAmplrest6_HO", " ", 100, 0., 500.);
6966 
6967  h_ADCAmplZoom1_HO = fs_->make<TH1F>("h_ADCAmplZoom1_HO", " ", 100, -20., 280.);
6968  h_ADCAmpl_HO_copy = fs_->make<TH1F>("h_ADCAmpl_HO_copy", " ", 100, 0., 30000.);
6969  h_mapDepth4ADCAmpl225_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6971  fs_->make<TH2F>("h_mapDepth4ADCAmpl225Copy_HO", " ", neta, -41., 41., nphi, 0., bphi);
6972  h_mapDepth4ADCAmpl_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl_HO", " ", neta, -41., 41., nphi, 0., bphi);
6973  h_TSmeanA_HO = fs_->make<TH1F>("h_TSmeanA_HO", " ", 100, 0., 10.);
6974  h_mapDepth4TSmeanA225_HO = fs_->make<TH2F>("h_mapDepth4TSmeanA225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6975  h_mapDepth4TSmeanA_HO = fs_->make<TH2F>("h_mapDepth4TSmeanA_HO", " ", neta, -41., 41., nphi, 0., bphi);
6976  h_TSmaxA_HO = fs_->make<TH1F>("h_TSmaxA_HO", " ", 100, 0., 10.);
6977  h_mapDepth4TSmaxA225_HO = fs_->make<TH2F>("h_mapDepth4TSmaxA225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6978  h_mapDepth4TSmaxA_HO = fs_->make<TH2F>("h_mapDepth4TSmaxA_HO", " ", neta, -41., 41., nphi, 0., bphi);
6979  h_Amplitude_HO = fs_->make<TH1F>("h_Amplitude_HO", " ", 100, 0., 5.);
6980  h_mapDepth4Amplitude225_HO = fs_->make<TH2F>("h_mapDepth4Amplitude225_HO", " ", neta, -41., 41., nphi, 0., bphi);
6981  h_mapDepth4Amplitude_HO = fs_->make<TH2F>("h_mapDepth4Amplitude_HO", " ", neta, -41., 41., nphi, 0., bphi);
6982  // Ratio:
6983  h_Ampl_HO = fs_->make<TH1F>("h_Ampl_HO", " ", 100, 0., 1.1);
6984  h_mapDepth4Ampl047_HO = fs_->make<TH2F>("h_mapDepth4Ampl047_HO", " ", neta, -41., 41., nphi, 0., bphi);
6985  h_mapDepth4Ampl_HO = fs_->make<TH2F>("h_mapDepth4Ampl_HO", " ", neta, -41., 41., nphi, 0., bphi);
6986  h_mapDepth4AmplE34_HO = fs_->make<TH2F>("h_mapDepth4AmplE34_HO", " ", neta, -41., 41., nphi, 0., bphi);
6987  h_mapDepth4_HO = fs_->make<TH2F>("h_mapDepth4_HO", " ", neta, -41., 41., nphi, 0., bphi);
6988 
6990  int baP = 4000;
6991  float baR = 0.;
6992  float baR2 = baP;
6993  h_bcnnbadchannels_depth1_HB = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HB", " ", baP, baR, baR2);
6994  h_bcnnbadchannels_depth2_HB = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HB", " ", baP, baR, baR2);
6995  h_bcnnbadchannels_depth1_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HE", " ", baP, baR, baR2);
6996  h_bcnnbadchannels_depth2_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HE", " ", baP, baR, baR2);
6997  h_bcnnbadchannels_depth3_HE = fs_->make<TH1F>("h_bcnnbadchannels_depth3_HE", " ", baP, baR, baR2);
6998  h_bcnnbadchannels_depth4_HO = fs_->make<TH1F>("h_bcnnbadchannels_depth4_HO", " ", baP, baR, baR2);
6999  h_bcnnbadchannels_depth1_HF = fs_->make<TH1F>("h_bcnnbadchannels_depth1_HF", " ", baP, baR, baR2);
7000  h_bcnnbadchannels_depth2_HF = fs_->make<TH1F>("h_bcnnbadchannels_depth2_HF", " ", baP, baR, baR2);
7001  h_bcnbadrate0_depth1_HB = fs_->make<TH1F>("h_bcnbadrate0_depth1_HB", " ", baP, baR, baR2);
7002  h_bcnbadrate0_depth2_HB = fs_->make<TH1F>("h_bcnbadrate0_depth2_HB", " ", baP, baR, baR2);
7003  h_bcnbadrate0_depth1_HE = fs_->make<TH1F>("h_bcnbadrate0_depth1_HE", " ", baP, baR, baR2);
7004  h_bcnbadrate0_depth2_HE = fs_->make<TH1F>("h_bcnbadrate0_depth2_HE", " ", baP, baR, baR2);
7005  h_bcnbadrate0_depth3_HE = fs_->make<TH1F>("h_bcnbadrate0_depth3_HE", " ", baP, baR, baR2);
7006  h_bcnbadrate0_depth4_HO = fs_->make<TH1F>("h_bcnbadrate0_depth4_HO", " ", baP, baR, baR2);
7007  h_bcnbadrate0_depth1_HF = fs_->make<TH1F>("h_bcnbadrate0_depth1_HF", " ", baP, baR, baR2);
7008  h_bcnbadrate0_depth2_HF = fs_->make<TH1F>("h_bcnbadrate0_depth2_HF", " ", baP, baR, baR2);
7009 
7010  h_bcnvsamplitude_HB = fs_->make<TH1F>("h_bcnvsamplitude_HB", " ", baP, baR, baR2);
7011  h_bcnvsamplitude_HE = fs_->make<TH1F>("h_bcnvsamplitude_HE", " ", baP, baR, baR2);
7012  h_bcnvsamplitude_HF = fs_->make<TH1F>("h_bcnvsamplitude_HF", " ", baP, baR, baR2);
7013  h_bcnvsamplitude_HO = fs_->make<TH1F>("h_bcnvsamplitude_HO", " ", baP, baR, baR2);
7014  h_bcnvsamplitude0_HB = fs_->make<TH1F>("h_bcnvsamplitude0_HB", " ", baP, baR, baR2);
7015  h_bcnvsamplitude0_HE = fs_->make<TH1F>("h_bcnvsamplitude0_HE", " ", baP, baR, baR2);
7016  h_bcnvsamplitude0_HF = fs_->make<TH1F>("h_bcnvsamplitude0_HF", " ", baP, baR, baR2);
7017  h_bcnvsamplitude0_HO = fs_->make<TH1F>("h_bcnvsamplitude0_HO", " ", baP, baR, baR2);
7018 
7019  int zaP = 1000;
7020  float zaR = 10000000.;
7021  float zaR2 = 50000000.;
7022  h_orbitNumvsamplitude_HB = fs_->make<TH1F>("h_orbitNumvsamplitude_HB", " ", zaP, zaR, zaR2);
7023  h_orbitNumvsamplitude_HE = fs_->make<TH1F>("h_orbitNumvsamplitude_HE", " ", zaP, zaR, zaR2);
7024  h_orbitNumvsamplitude_HF = fs_->make<TH1F>("h_orbitNumvsamplitude_HF", " ", zaP, zaR, zaR2);
7025  h_orbitNumvsamplitude_HO = fs_->make<TH1F>("h_orbitNumvsamplitude_HO", " ", zaP, zaR, zaR2);
7026  h_orbitNumvsamplitude0_HB = fs_->make<TH1F>("h_orbitNumvsamplitude0_HB", " ", zaP, zaR, zaR2);
7027  h_orbitNumvsamplitude0_HE = fs_->make<TH1F>("h_orbitNumvsamplitude0_HE", " ", zaP, zaR, zaR2);
7028  h_orbitNumvsamplitude0_HF = fs_->make<TH1F>("h_orbitNumvsamplitude0_HF", " ", zaP, zaR, zaR2);
7029  h_orbitNumvsamplitude0_HO = fs_->make<TH1F>("h_orbitNumvsamplitude0_HO", " ", zaP, zaR, zaR2);
7030 
7031  h_2DsumADCAmplEtaPhiLs0 = fs_->make<TH2F>(
7032  "h_2DsumADCAmplEtaPhiLs0", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
7033  h_2DsumADCAmplEtaPhiLs1 = fs_->make<TH2F>(
7034  "h_2DsumADCAmplEtaPhiLs1", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
7035  h_2DsumADCAmplEtaPhiLs2 = fs_->make<TH2F>(
7036  "h_2DsumADCAmplEtaPhiLs2", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
7037  h_2DsumADCAmplEtaPhiLs3 = fs_->make<TH2F>(
7038  "h_2DsumADCAmplEtaPhiLs3", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
7039 
7041  "h_2DsumADCAmplEtaPhiLs00", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
7043  "h_2DsumADCAmplEtaPhiLs10", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
7045  "h_2DsumADCAmplEtaPhiLs20", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
7047  "h_2DsumADCAmplEtaPhiLs30", " ", nlsminmax, alsmin, blsmax, znphi * zneta, 1., znphi * zneta + 1.);
7048 
7049  h_sumADCAmplEtaPhiLs = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs", " ", 1000, 0., 14000.);
7050  h_sumADCAmplEtaPhiLs_bbbc = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_bbbc", " ", 1000, 0., 300000.);
7051  h_sumADCAmplEtaPhiLs_bbb1 = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_bbb1", " ", 100, 0., 3000.);
7052  h_sumADCAmplEtaPhiLs_lscounterM1 = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_lscounterM1", " ", 600, 1., 601.);
7053  h_sumADCAmplEtaPhiLs_ietaphi = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_ietaphi", " ", 400, 0., 400.);
7055  fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_lscounterM1orbitNum", " ", 600, 1., 601.);
7056  h_sumADCAmplEtaPhiLs_orbitNum = fs_->make<TH1F>("h_sumADCAmplEtaPhiLs_orbitNum", " ", 1000, 25000000., 40000000.);
7057 
7058  // for LS :
7059 
7060  // for LS binning:
7061  int bac = howmanybinsonplots_;
7062  // int bac= 15;
7063  float bac2 = bac + 1.;
7064  // bac, 1., bac2 );
7065 
7066  h_nbadchannels_depth1_HB = fs_->make<TH1F>("h_nbadchannels_depth1_HB", " ", 30, 1., 31.);
7067  h_runnbadchannels_depth1_HB = fs_->make<TH1F>("h_runnbadchannels_depth1_HB", " ", bac, 1., bac2);
7068  h_runnbadchannelsC_depth1_HB = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HB", " ", bac, 1., bac2);
7069  h_runbadrate_depth1_HB = fs_->make<TH1F>("h_runbadrate_depth1_HB", " ", bac, 1., bac2);
7070  h_runbadrateC_depth1_HB = fs_->make<TH1F>("h_runbadrateC_depth1_HB", " ", bac, 1., bac2);
7071  h_runbadrate0_depth1_HB = fs_->make<TH1F>("h_runbadrate0_depth1_HB", " ", bac, 1., bac2);
7072 
7073  h_nbadchannels_depth2_HB = fs_->make<TH1F>("h_nbadchannels_depth2_HB", " ", 30, 1., 31.);
7074  h_runnbadchannels_depth2_HB = fs_->make<TH1F>("h_runnbadchannels_depth2_HB", " ", bac, 1., bac2);
7075  h_runnbadchannelsC_depth2_HB = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HB", " ", bac, 1., bac2);
7076  h_runbadrate_depth2_HB = fs_->make<TH1F>("h_runbadrate_depth2_HB", " ", bac, 1., bac2);
7077  h_runbadrateC_depth2_HB = fs_->make<TH1F>("h_runbadrateC_depth2_HB", " ", bac, 1., bac2);
7078  h_runbadrate0_depth2_HB = fs_->make<TH1F>("h_runbadrate0_depth2_HB", " ", bac, 1., bac2);
7079 
7080  h_nbadchannels_depth3_HB = fs_->make<TH1F>("h_nbadchannels_depth3_HB", " ", 30, 1., 31.);
7081  h_runnbadchannels_depth3_HB = fs_->make<TH1F>("h_runnbadchannels_depth3_HB", " ", bac, 1., bac2);
7082  h_runnbadchannelsC_depth3_HB = fs_->make<TH1F>("h_runnbadchannelsC_depth3_HB", " ", bac, 1., bac2);
7083  h_runbadrate_depth3_HB = fs_->make<TH1F>("h_runbadrate_depth3_HB", " ", bac, 1., bac2);
7084  h_runbadrateC_depth3_HB = fs_->make<TH1F>("h_runbadrateC_depth3_HB", " ", bac, 1., bac2);
7085  h_runbadrate0_depth3_HB = fs_->make<TH1F>("h_runbadrate0_depth3_HB", " ", bac, 1., bac2);
7086 
7087  h_nbadchannels_depth4_HB = fs_->make<TH1F>("h_nbadchannels_depth4_HB", " ", 30, 1., 31.);
7088  h_runnbadchannels_depth4_HB = fs_->make<TH1F>("h_runnbadchannels_depth4_HB", " ", bac, 1., bac2);
7089  h_runnbadchannelsC_depth4_HB = fs_->make<TH1F>("h_runnbadchannelsC_depth4_HB", " ", bac, 1., bac2);
7090  h_runbadrate_depth4_HB = fs_->make<TH1F>("h_runbadrate_depth4_HB", " ", bac, 1., bac2);
7091  h_runbadrateC_depth4_HB = fs_->make<TH1F>("h_runbadrateC_depth4_HB", " ", bac, 1., bac2);
7092  h_runbadrate0_depth4_HB = fs_->make<TH1F>("h_runbadrate0_depth4_HB", " ", bac, 1., bac2);
7093 
7094  h_nbadchannels_depth1_HE = fs_->make<TH1F>("h_nbadchannels_depth1_HE", " ", 30, 1., 31.);
7095  h_runnbadchannels_depth1_HE = fs_->make<TH1F>("h_runnbadchannels_depth1_HE", " ", bac, 1., bac2);
7096  h_runnbadchannelsC_depth1_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HE", " ", bac, 1., bac2);
7097  h_runbadrate_depth1_HE = fs_->make<TH1F>("h_runbadrate_depth1_HE", " ", bac, 1., bac2);
7098  h_runbadrateC_depth1_HE = fs_->make<TH1F>("h_runbadrateC_depth1_HE", " ", bac, 1., bac2);
7099  h_runbadrate0_depth1_HE = fs_->make<TH1F>("h_runbadrate0_depth1_HE", " ", bac, 1., bac2);
7100 
7101  h_nbadchannels_depth2_HE = fs_->make<TH1F>("h_nbadchannels_depth2_HE", " ", 30, 1., 31.);
7102  h_runnbadchannels_depth2_HE = fs_->make<TH1F>("h_runnbadchannels_depth2_HE", " ", bac, 1., bac2);
7103  h_runnbadchannelsC_depth2_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HE", " ", bac, 1., bac2);
7104  h_runbadrate_depth2_HE = fs_->make<TH1F>("h_runbadrate_depth2_HE", " ", bac, 1., bac2);
7105  h_runbadrateC_depth2_HE = fs_->make<TH1F>("h_runbadrateC_depth2_HE", " ", bac, 1., bac2);
7106  h_runbadrate0_depth2_HE = fs_->make<TH1F>("h_runbadrate0_depth2_HE", " ", bac, 1., bac2);
7107 
7108  h_nbadchannels_depth3_HE = fs_->make<TH1F>("h_nbadchannels_depth3_HE", " ", 30, 1., 31.);
7109  h_runnbadchannels_depth3_HE = fs_->make<TH1F>("h_runnbadchannels_depth3_HE", " ", bac, 1., bac2);
7110  h_runnbadchannelsC_depth3_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth3_HE", " ", bac, 1., bac2);
7111  h_runbadrate_depth3_HE = fs_->make<TH1F>("h_runbadrate_depth3_HE", " ", bac, 1., bac2);
7112  h_runbadrateC_depth3_HE = fs_->make<TH1F>("h_runbadrateC_depth3_HE", " ", bac, 1., bac2);
7113  h_runbadrate0_depth3_HE = fs_->make<TH1F>("h_runbadrate0_depth3_HE", " ", bac, 1., bac2);
7114 
7115  h_nbadchannels_depth4_HE = fs_->make<TH1F>("h_nbadchannels_depth4_HE", " ", 30, 1., 31.);
7116  h_runnbadchannels_depth4_HE = fs_->make<TH1F>("h_runnbadchannels_depth4_HE", " ", bac, 1., bac2);
7117  h_runnbadchannelsC_depth4_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth4_HE", " ", bac, 1., bac2);
7118  h_runbadrate_depth4_HE = fs_->make<TH1F>("h_runbadrate_depth4_HE", " ", bac, 1., bac2);
7119  h_runbadrateC_depth4_HE = fs_->make<TH1F>("h_runbadrateC_depth4_HE", " ", bac, 1., bac2);
7120  h_runbadrate0_depth4_HE = fs_->make<TH1F>("h_runbadrate0_depth4_HE", " ", bac, 1., bac2);
7121 
7122  h_nbadchannels_depth5_HE = fs_->make<TH1F>("h_nbadchannels_depth5_HE", " ", 30, 1., 31.);
7123  h_runnbadchannels_depth5_HE = fs_->make<TH1F>("h_runnbadchannels_depth5_HE", " ", bac, 1., bac2);
7124  h_runnbadchannelsC_depth5_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth5_HE", " ", bac, 1., bac2);
7125  h_runbadrate_depth5_HE = fs_->make<TH1F>("h_runbadrate_depth5_HE", " ", bac, 1., bac2);
7126  h_runbadrateC_depth5_HE = fs_->make<TH1F>("h_runbadrateC_depth5_HE", " ", bac, 1., bac2);
7127  h_runbadrate0_depth5_HE = fs_->make<TH1F>("h_runbadrate0_depth5_HE", " ", bac, 1., bac2);
7128 
7129  h_nbadchannels_depth6_HE = fs_->make<TH1F>("h_nbadchannels_depth6_HE", " ", 30, 1., 31.);
7130  h_runnbadchannels_depth6_HE = fs_->make<TH1F>("h_runnbadchannels_depth6_HE", " ", bac, 1., bac2);
7131  h_runnbadchannelsC_depth6_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth6_HE", " ", bac, 1., bac2);
7132  h_runbadrate_depth6_HE = fs_->make<TH1F>("h_runbadrate_depth6_HE", " ", bac, 1., bac2);
7133  h_runbadrateC_depth6_HE = fs_->make<TH1F>("h_runbadrateC_depth6_HE", " ", bac, 1., bac2);
7134  h_runbadrate0_depth6_HE = fs_->make<TH1F>("h_runbadrate0_depth6_HE", " ", bac, 1., bac2);
7135 
7136  h_nbadchannels_depth7_HE = fs_->make<TH1F>("h_nbadchannels_depth7_HE", " ", 30, 1., 31.);
7137  h_runnbadchannels_depth7_HE = fs_->make<TH1F>("h_runnbadchannels_depth7_HE", " ", bac, 1., bac2);
7138  h_runnbadchannelsC_depth7_HE = fs_->make<TH1F>("h_runnbadchannelsC_depth7_HE", " ", bac, 1., bac2);
7139  h_runbadrate_depth7_HE = fs_->make<TH1F>("h_runbadrate_depth7_HE", " ", bac, 1., bac2);
7140  h_runbadrateC_depth7_HE = fs_->make<TH1F>("h_runbadrateC_depth7_HE", " ", bac, 1., bac2);
7141  h_runbadrate0_depth7_HE = fs_->make<TH1F>("h_runbadrate0_depth7_HE", " ", bac, 1., bac2);
7142 
7143  h_nbadchannels_depth1_HF = fs_->make<TH1F>("h_nbadchannels_depth1_HF", " ", 30, 1., 31.);
7144  h_runnbadchannels_depth1_HF = fs_->make<TH1F>("h_runnbadchannels_depth1_HF", " ", bac, 1., bac2);
7145  h_runnbadchannelsC_depth1_HF = fs_->make<TH1F>("h_runnbadchannelsC_depth1_HF", " ", bac, 1., bac2);
7146  h_runbadrate_depth1_HF = fs_->make<TH1F>("h_runbadrate_depth1_HF", " ", bac, 1., bac2);
7147  h_runbadrateC_depth1_HF = fs_->make<TH1F>("h_runbadrateC_depth1_HF", " ", bac, 1., bac2);
7148  h_runbadrate0_depth1_HF = fs_->make<TH1F>("h_runbadrate0_depth1_HF", " ", bac, 1., bac2);
7149 
7150  h_nbadchannels_depth2_HF = fs_->make<TH1F>("h_nbadchannels_depth2_HF", " ", 30, 1., 31.);
7151  h_runnbadchannels_depth2_HF = fs_->make<TH1F>("h_runnbadchannels_depth2_HF", " ", bac, 1., bac2);
7152  h_runnbadchannelsC_depth2_HF = fs_->make<TH1F>("h_runnbadchannelsC_depth2_HF", " ", bac, 1., bac2);
7153  h_runbadrate_depth2_HF = fs_->make<TH1F>("h_runbadrate_depth2_HF", " ", bac, 1., bac2);
7154  h_runbadrateC_depth2_HF = fs_->make<TH1F>("h_runbadrateC_depth2_HF", " ", bac, 1., bac2);
7155  h_runbadrate0_depth2_HF = fs_->make<TH1F>("h_runbadrate0_depth2_HF", " ", bac, 1., bac2);
7156 
7157  h_nbadchannels_depth3_HF = fs_->make<TH1F>("h_nbadchannels_depth3_HF", " ", 30, 1., 31.);
7158  h_runnbadchannels_depth3_HF = fs_->make<TH1F>("h_runnbadchannels_depth3_HF", " ", bac, 1., bac2);
7159  h_runnbadchannelsC_depth3_HF = fs_->make<TH1F>("h_runnbadchannelsC_depth3_HF", " ", bac, 1., bac2);
7160  h_runbadrate_depth3_HF = fs_->make<TH1F>("h_runbadrate_depth3_HF", " ", bac, 1., bac2);
7161  h_runbadrateC_depth3_HF = fs_->make<TH1F>("h_runbadrateC_depth3_HF", " ", bac, 1., bac2);
7162  h_runbadrate0_depth3_HF = fs_->make<TH1F>("h_runbadrate0_depth3_HF", " ", bac, 1., bac2);
7163 
7164  h_nbadchannels_depth4_HF = fs_->make<TH1F>("h_nbadchannels_depth4_HF", " ", 30, 1., 31.);
7165  h_runnbadchannels_depth4_HF = fs_->make<TH1F>("h_runnbadchannels_depth4_HF", " ", bac, 1., bac2);
7166  h_runnbadchannelsC_depth4_HF = fs_->make<TH1F>("h_runnbadchannelsC_depth4_HF", " ", bac, 1., bac2);
7167  h_runbadrate_depth4_HF = fs_->make<TH1F>("h_runbadrate_depth4_HF", " ", bac, 1., bac2);
7168  h_runbadrateC_depth4_HF = fs_->make<TH1F>("h_runbadrateC_depth4_HF", " ", bac, 1., bac2);
7169  h_runbadrate0_depth4_HF = fs_->make<TH1F>("h_runbadrate0_depth4_HF", " ", bac, 1., bac2);
7170 
7171  h_nbadchannels_depth4_HO = fs_->make<TH1F>("h_nbadchannels_depth4_HO", " ", 30, 1., 31.);
7172  h_runnbadchannels_depth4_HO = fs_->make<TH1F>("h_runnbadchannels_depth4_HO", " ", bac, 1., bac2);
7173  h_runnbadchannelsC_depth4_HO = fs_->make<TH1F>("h_runnbadchannelsC_depth4_HO", " ", bac, 1., bac2);
7174  h_runbadrate_depth4_HO = fs_->make<TH1F>("h_runbadrate_depth4_HO", " ", bac, 1., bac2);
7175  h_runbadrateC_depth4_HO = fs_->make<TH1F>("h_runbadrateC_depth4_HO", " ", bac, 1., bac2);
7176  h_runbadrate0_depth4_HO = fs_->make<TH1F>("h_runbadrate0_depth4_HO", " ", bac, 1., bac2);
7177 
7179  h_FullSignal3D_HB = fs_->make<TH2F>("h_FullSignal3D_HB", " ", neta, -41., 41., nphi, 0., bphi);
7180  h_FullSignal3D0_HB = fs_->make<TH2F>("h_FullSignal3D0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7181  h_FullSignal3D_HE = fs_->make<TH2F>("h_FullSignal3D_HE", " ", neta, -41., 41., nphi, 0., bphi);
7182  h_FullSignal3D0_HE = fs_->make<TH2F>("h_FullSignal3D0_HE", " ", neta, -41., 41., nphi, 0., bphi);
7183  h_FullSignal3D_HO = fs_->make<TH2F>("h_FullSignal3D_HO", " ", neta, -41., 41., nphi, 0., bphi);
7184  h_FullSignal3D0_HO = fs_->make<TH2F>("h_FullSignal3D0_HO", " ", neta, -41., 41., nphi, 0., bphi);
7185  h_FullSignal3D_HF = fs_->make<TH2F>("h_FullSignal3D_HF", " ", neta, -41., 41., nphi, 0., bphi);
7186  h_FullSignal3D0_HF = fs_->make<TH2F>("h_FullSignal3D0_HF", " ", neta, -41., 41., nphi, 0., bphi);
7187 
7189  h_ADCCalib_HB = fs_->make<TH1F>("h_ADCCalib_HB", " ", 100, 10., 10000.);
7190  h_ADCCalib1_HB = fs_->make<TH1F>("h_ADCCalib1_HB", " ", 100, 0.1, 100.1);
7191  h_mapADCCalib047_HB = fs_->make<TH2F>("h_mapADCCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
7192  h_mapADCCalib_HB = fs_->make<TH2F>("h_mapADCCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
7193  h_RatioCalib_HB = fs_->make<TH1F>("h_RatioCalib_HB", " ", 100, 0., 1.);
7194  h_mapRatioCalib047_HB = fs_->make<TH2F>("h_mapRatioCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
7195  h_mapRatioCalib_HB = fs_->make<TH2F>("h_mapRatioCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
7196  h_TSmaxCalib_HB = fs_->make<TH1F>("h_TSmaxCalib_HB", " ", 100, 0., 10.);
7197  h_mapTSmaxCalib047_HB = fs_->make<TH2F>("h_mapTSmaxCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
7198  h_mapTSmaxCalib_HB = fs_->make<TH2F>("h_mapTSmaxCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
7199  h_TSmeanCalib_HB = fs_->make<TH1F>("h_TSmeanCalib_HB", " ", 100, 0., 10.);
7200  h_mapTSmeanCalib047_HB = fs_->make<TH2F>("h_mapTSmeanCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
7201  h_mapTSmeanCalib_HB = fs_->make<TH2F>("h_mapTSmeanCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
7202  h_WidthCalib_HB = fs_->make<TH1F>("h_WidthCalib_HB", " ", 100, 0., 5.);
7203  h_mapWidthCalib047_HB = fs_->make<TH2F>("h_mapWidthCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
7204  h_mapCapCalib047_HB = fs_->make<TH2F>("h_mapCapCalib047_HB", " ", neta, -41., 41., nphi, 0., bphi);
7205  h_mapWidthCalib_HB = fs_->make<TH2F>("h_mapWidthCalib_HB", " ", neta, -41., 41., nphi, 0., bphi);
7206  h_map_HB = fs_->make<TH2F>("h_map_HB", " ", neta, -41., 41., nphi, 0., bphi);
7207  h_ADCCalib_HE = fs_->make<TH1F>("h_ADCCalib_HE", " ", 100, 10., 10000.);
7208  h_ADCCalib1_HE = fs_->make<TH1F>("h_ADCCalib1_HE", " ", 100, 0.1, 100.1);
7209  h_mapADCCalib047_HE = fs_->make<TH2F>("h_mapADCCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7210  h_mapADCCalib_HE = fs_->make<TH2F>("h_mapADCCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7211  h_RatioCalib_HE = fs_->make<TH1F>("h_RatioCalib_HE", " ", 100, 0., 1.);
7212  h_mapRatioCalib047_HE = fs_->make<TH2F>("h_mapRatioCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7213  h_mapRatioCalib_HE = fs_->make<TH2F>("h_mapRatioCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7214  h_TSmaxCalib_HE = fs_->make<TH1F>("h_TSmaxCalib_HE", " ", 100, 0., 10.);
7215  h_mapTSmaxCalib047_HE = fs_->make<TH2F>("h_mapTSmaxCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7216  h_mapTSmaxCalib_HE = fs_->make<TH2F>("h_mapTSmaxCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7217  h_TSmeanCalib_HE = fs_->make<TH1F>("h_TSmeanCalib_HE", " ", 100, 0., 10.);
7218  h_mapTSmeanCalib047_HE = fs_->make<TH2F>("h_mapTSmeanCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7219  h_mapTSmeanCalib_HE = fs_->make<TH2F>("h_mapTSmeanCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7220  h_WidthCalib_HE = fs_->make<TH1F>("h_WidthCalib_HE", " ", 100, 0., 5.);
7221  h_mapWidthCalib047_HE = fs_->make<TH2F>("h_mapWidthCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7222  h_mapCapCalib047_HE = fs_->make<TH2F>("h_mapCapCalib047_HE", " ", neta, -41., 41., nphi, 0., bphi);
7223  h_mapWidthCalib_HE = fs_->make<TH2F>("h_mapWidthCalib_HE", " ", neta, -41., 41., nphi, 0., bphi);
7224  h_map_HE = fs_->make<TH2F>("h_map_HE", " ", neta, -41., 41., nphi, 0., bphi);
7225  h_ADCCalib_HO = fs_->make<TH1F>("h_ADCCalib_HO", " ", 100, 10., 10000.);
7226  h_ADCCalib1_HO = fs_->make<TH1F>("h_ADCCalib1_HO", " ", 100, 0.1, 100.1);
7227  h_mapADCCalib047_HO = fs_->make<TH2F>("h_mapADCCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7228  h_mapADCCalib_HO = fs_->make<TH2F>("h_mapADCCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7229  h_RatioCalib_HO = fs_->make<TH1F>("h_RatioCalib_HO", " ", 100, 0., 1.);
7230  h_mapRatioCalib047_HO = fs_->make<TH2F>("h_mapRatioCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7231  h_mapRatioCalib_HO = fs_->make<TH2F>("h_mapRatioCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7232  h_TSmaxCalib_HO = fs_->make<TH1F>("h_TSmaxCalib_HO", " ", 100, 0., 10.);
7233  h_mapTSmaxCalib047_HO = fs_->make<TH2F>("h_mapTSmaxCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7234  h_mapTSmaxCalib_HO = fs_->make<TH2F>("h_mapTSmaxCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7235  h_TSmeanCalib_HO = fs_->make<TH1F>("h_TSmeanCalib_HO", " ", 100, 0., 10.);
7236  h_mapTSmeanCalib047_HO = fs_->make<TH2F>("h_mapTSmeanCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7237  h_mapTSmeanCalib_HO = fs_->make<TH2F>("h_mapTSmeanCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7238  h_WidthCalib_HO = fs_->make<TH1F>("h_WidthCalib_HO", " ", 100, 0., 5.);
7239  h_mapWidthCalib047_HO = fs_->make<TH2F>("h_mapWidthCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7240  h_mapCapCalib047_HO = fs_->make<TH2F>("h_mapCapCalib047_HO", " ", neta, -41., 41., nphi, 0., bphi);
7241  h_mapWidthCalib_HO = fs_->make<TH2F>("h_mapWidthCalib_HO", " ", neta, -41., 41., nphi, 0., bphi);
7242  h_map_HO = fs_->make<TH2F>("h_map_HO", " ", neta, -41., 41., nphi, 0., bphi);
7243  h_ADCCalib_HF = fs_->make<TH1F>("h_ADCCalib_HF", " ", 100, 10., 2000.);
7244  h_ADCCalib1_HF = fs_->make<TH1F>("h_ADCCalib1_HF", " ", 100, 0.1, 100.1);
7245  h_mapADCCalib047_HF = fs_->make<TH2F>("h_mapADCCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7246  h_mapADCCalib_HF = fs_->make<TH2F>("h_mapADCCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7247  h_RatioCalib_HF = fs_->make<TH1F>("h_RatioCalib_HF", " ", 100, 0., 1.);
7248  h_mapRatioCalib047_HF = fs_->make<TH2F>("h_mapRatioCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7249  h_mapRatioCalib_HF = fs_->make<TH2F>("h_mapRatioCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7250  h_TSmaxCalib_HF = fs_->make<TH1F>("h_TSmaxCalib_HF", " ", 100, 0., 10.);
7251  h_mapTSmaxCalib047_HF = fs_->make<TH2F>("h_mapTSmaxCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7252  h_mapTSmaxCalib_HF = fs_->make<TH2F>("h_mapTSmaxCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7253  h_TSmeanCalib_HF = fs_->make<TH1F>("h_TSmeanCalib_HF", " ", 100, 0., 10.);
7254  h_mapTSmeanCalib047_HF = fs_->make<TH2F>("h_mapTSmeanCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7255  h_mapTSmeanCalib_HF = fs_->make<TH2F>("h_mapTSmeanCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7256  h_WidthCalib_HF = fs_->make<TH1F>("h_WidthCalib_HF", " ", 100, 0., 5.);
7257  h_mapWidthCalib047_HF = fs_->make<TH2F>("h_mapWidthCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7258  h_mapCapCalib047_HF = fs_->make<TH2F>("h_mapCapCalib047_HF", " ", neta, -41., 41., nphi, 0., bphi);
7259  h_mapWidthCalib_HF = fs_->make<TH2F>("h_mapWidthCalib_HF", " ", neta, -41., 41., nphi, 0., bphi);
7260  h_map_HF = fs_->make<TH2F>("h_map_HF", " ", neta, -41., 41., nphi, 0., bphi);
7261 
7262  h_nls_per_run = fs_->make<TH1F>("h_nls_per_run", " ", 100, 0., 800.);
7263  h_nls_per_run10 = fs_->make<TH1F>("h_nls_per_run10", " ", 100, 0., 60.);
7264  h_nevents_per_LS = fs_->make<TH1F>("h_nevents_per_LS", " ", 100, 0., 600.);
7265  h_nevents_per_LSzoom = fs_->make<TH1F>("h_nevents_per_LSzoom", " ", 50, 0., 50.);
7266  h_nevents_per_eachLS = fs_->make<TH1F>("h_nevents_per_eachLS", " ", bac, 1., bac2);
7267  h_nevents_per_eachRealLS = fs_->make<TH1F>("h_nevents_per_eachRealLS", " ", bac, 1., bac2);
7268  h_lsnumber_per_eachLS = fs_->make<TH1F>("h_lsnumber_per_eachLS", " ", bac, 1., bac2);
7269  //--------------------------------------------------
7270  // for estimator0:
7271  float pst1 = 30.;
7272  h_sumPedestalLS1 = fs_->make<TH1F>("h_sumPedestalLS1", " ", 100, 0., pst1);
7273  h_2DsumPedestalLS1 = fs_->make<TH2F>("h_2DsumPedestalLS1", " ", neta, -41., 41., nphi, 0., bphi);
7274  h_sumPedestalperLS1 = fs_->make<TH1F>("h_sumPedestalperLS1", " ", bac, 1., bac2);
7275  h_2D0sumPedestalLS1 = fs_->make<TH2F>("h_2D0sumPedestalLS1", " ", neta, -41., 41., nphi, 0., bphi);
7276  h_sum0PedestalperLS1 = fs_->make<TH1F>("h_sum0PedestalperLS1", " ", bac, 1., bac2);
7277 
7278  h_sumPedestalLS2 = fs_->make<TH1F>("h_sumPedestalLS2", " ", 100, 0., pst1);
7279  h_2DsumPedestalLS2 = fs_->make<TH2F>("h_2DsumPedestalLS2", " ", neta, -41., 41., nphi, 0., bphi);
7280  h_sumPedestalperLS2 = fs_->make<TH1F>("h_sumPedestalperLS2", " ", bac, 1., bac2);
7281  h_2D0sumPedestalLS2 = fs_->make<TH2F>("h_2D0sumPedestalLS2", " ", neta, -41., 41., nphi, 0., bphi);
7282  h_sum0PedestalperLS2 = fs_->make<TH1F>("h_sum0PedestalperLS2", " ", bac, 1., bac2);
7283 
7284  h_sumPedestalLS3 = fs_->make<TH1F>("h_sumPedestalLS3", " ", 100, 0., pst1);
7285  h_2DsumPedestalLS3 = fs_->make<TH2F>("h_2DsumPedestalLS3", " ", neta, -41., 41., nphi, 0., bphi);
7286  h_sumPedestalperLS3 = fs_->make<TH1F>("h_sumPedestalperLS3", " ", bac, 1., bac2);
7287  h_2D0sumPedestalLS3 = fs_->make<TH2F>("h_2D0sumPedestalLS3", " ", neta, -41., 41., nphi, 0., bphi);
7288  h_sum0PedestalperLS3 = fs_->make<TH1F>("h_sum0PedestalperLS3", " ", bac, 1., bac2);
7289 
7290  h_sumPedestalLS4 = fs_->make<TH1F>("h_sumPedestalLS4", " ", 100, 0., pst1);
7291  h_2DsumPedestalLS4 = fs_->make<TH2F>("h_2DsumPedestalLS4", " ", neta, -41., 41., nphi, 0., bphi);
7292  h_sumPedestalperLS4 = fs_->make<TH1F>("h_sumPedestalperLS4", " ", bac, 1., bac2);
7293  h_2D0sumPedestalLS4 = fs_->make<TH2F>("h_2D0sumPedestalLS4", " ", neta, -41., 41., nphi, 0., bphi);
7294  h_sum0PedestalperLS4 = fs_->make<TH1F>("h_sum0PedestalperLS4", " ", bac, 1., bac2);
7295 
7296  h_sumPedestalLS5 = fs_->make<TH1F>("h_sumPedestalLS5", " ", 100, 0., pst1);
7297  h_2DsumPedestalLS5 = fs_->make<TH2F>("h_2DsumPedestalLS5", " ", neta, -41., 41., nphi, 0., bphi);
7298  h_sumPedestalperLS5 = fs_->make<TH1F>("h_sumPedestalperLS5", " ", bac, 1., bac2);
7299  h_2D0sumPedestalLS5 = fs_->make<TH2F>("h_2D0sumPedestalLS5", " ", neta, -41., 41., nphi, 0., bphi);
7300  h_sum0PedestalperLS5 = fs_->make<TH1F>("h_sum0PedestalperLS5", " ", bac, 1., bac2);
7301 
7302  h_sumPedestalLS6 = fs_->make<TH1F>("h_sumPedestalLS6", " ", 100, 0., pst1);
7303  h_2DsumPedestalLS6 = fs_->make<TH2F>("h_2DsumPedestalLS6", " ", neta, -41., 41., nphi, 0., bphi);
7304  h_sumPedestalperLS6 = fs_->make<TH1F>("h_sumPedestalperLS6", " ", bac, 1., bac2);
7305  h_2D0sumPedestalLS6 = fs_->make<TH2F>("h_2D0sumPedestalLS6", " ", neta, -41., 41., nphi, 0., bphi);
7306  h_sum0PedestalperLS6 = fs_->make<TH1F>("h_sum0PedestalperLS6", " ", bac, 1., bac2);
7307 
7308  h_sumPedestalLS7 = fs_->make<TH1F>("h_sumPedestalLS7", " ", 100, 0., pst1);
7309  h_2DsumPedestalLS7 = fs_->make<TH2F>("h_2DsumPedestalLS7", " ", neta, -41., 41., nphi, 0., bphi);
7310  h_sumPedestalperLS7 = fs_->make<TH1F>("h_sumPedestalperLS7", " ", bac, 1., bac2);
7311  h_2D0sumPedestalLS7 = fs_->make<TH2F>("h_2D0sumPedestalLS7", " ", neta, -41., 41., nphi, 0., bphi);
7312  h_sum0PedestalperLS7 = fs_->make<TH1F>("h_sum0PedestalperLS7", " ", bac, 1., bac2);
7313 
7314  h_sumPedestalLS8 = fs_->make<TH1F>("h_sumPedestalLS8", " ", 100, 0., pst1);
7315  h_2DsumPedestalLS8 = fs_->make<TH2F>("h_2DsumPedestalLS8", " ", neta, -41., 41., nphi, 0., bphi);
7316  h_sumPedestalperLS8 = fs_->make<TH1F>("h_sumPedestalperLS8", " ", bac, 1., bac2);
7317  h_2D0sumPedestalLS8 = fs_->make<TH2F>("h_2D0sumPedestalLS8", " ", neta, -41., 41., nphi, 0., bphi);
7318  h_sum0PedestalperLS8 = fs_->make<TH1F>("h_sum0PedestalperLS8", " ", bac, 1., bac2);
7319 
7320  //--------------------------------------------------
7321  // for estimator1:
7322  h_sumADCAmplLS1copy1 = fs_->make<TH1F>("h_sumADCAmplLS1copy1", " ", 100, 0., 10000);
7323  h_sumADCAmplLS1copy2 = fs_->make<TH1F>("h_sumADCAmplLS1copy2", " ", 100, 0., 20000);
7324  h_sumADCAmplLS1copy3 = fs_->make<TH1F>("h_sumADCAmplLS1copy3", " ", 100, 0., 50000);
7325  h_sumADCAmplLS1copy4 = fs_->make<TH1F>("h_sumADCAmplLS1copy4", " ", 100, 0., 100000);
7326  h_sumADCAmplLS1copy5 = fs_->make<TH1F>("h_sumADCAmplLS1copy5", " ", 100, 0., 150000);
7327  h_sumADCAmplLS1 = fs_->make<TH1F>("h_sumADCAmplLS1", " ", 100, 0., lsdep_estimator1_HBdepth1_);
7328  h_2DsumADCAmplLS1 = fs_->make<TH2F>("h_2DsumADCAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7330  fs_->make<TH2F>("h_2DsumADCAmplLS1_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7331  h_sumADCAmplperLS1 = fs_->make<TH1F>("h_sumADCAmplperLS1", " ", bac, 1., bac2);
7332  h_sumCutADCAmplperLS1 = fs_->make<TH1F>("h_sumCutADCAmplperLS1", " ", bac, 1., bac2);
7333  h_2D0sumADCAmplLS1 = fs_->make<TH2F>("h_2D0sumADCAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7334  h_sum0ADCAmplperLS1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1", " ", bac, 1., bac2);
7335 
7336  h_sumADCAmplLS2 = fs_->make<TH1F>("h_sumADCAmplLS2", " ", 100, 0., lsdep_estimator1_HBdepth2_);
7337  h_2DsumADCAmplLS2 = fs_->make<TH2F>("h_2DsumADCAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7339  fs_->make<TH2F>("h_2DsumADCAmplLS2_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7340  h_sumADCAmplperLS2 = fs_->make<TH1F>("h_sumADCAmplperLS2", " ", bac, 1., bac2);
7341  h_sumCutADCAmplperLS2 = fs_->make<TH1F>("h_sumCutADCAmplperLS2", " ", bac, 1., bac2);
7342  h_2D0sumADCAmplLS2 = fs_->make<TH2F>("h_2D0sumADCAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7343  h_sum0ADCAmplperLS2 = fs_->make<TH1F>("h_sum0ADCAmplperLS2", " ", bac, 1., bac2);
7344 
7345  h_sumADCAmplLS3 = fs_->make<TH1F>("h_sumADCAmplLS3", " ", 100, 0., lsdep_estimator1_HEdepth1_);
7346  h_2DsumADCAmplLS3 = fs_->make<TH2F>("h_2DsumADCAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7348  fs_->make<TH2F>("h_2DsumADCAmplLS3_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7349  h_sumADCAmplperLS3 = fs_->make<TH1F>("h_sumADCAmplperLS3", " ", bac, 1., bac2);
7350  h_sumCutADCAmplperLS3 = fs_->make<TH1F>("h_sumCutADCAmplperLS3", " ", bac, 1., bac2);
7351  h_2D0sumADCAmplLS3 = fs_->make<TH2F>("h_2D0sumADCAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7352  h_sum0ADCAmplperLS3 = fs_->make<TH1F>("h_sum0ADCAmplperLS3", " ", bac, 1., bac2);
7353 
7354  h_sumADCAmplLS4 = fs_->make<TH1F>("h_sumADCAmplLS4", " ", 100, 0., lsdep_estimator1_HEdepth2_);
7355  h_2DsumADCAmplLS4 = fs_->make<TH2F>("h_2DsumADCAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7357  fs_->make<TH2F>("h_2DsumADCAmplLS4_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7358  h_sumADCAmplperLS4 = fs_->make<TH1F>("h_sumADCAmplperLS4", " ", bac, 1., bac2);
7359  h_sumCutADCAmplperLS4 = fs_->make<TH1F>("h_sumCutADCAmplperLS4", " ", bac, 1., bac2);
7360  h_2D0sumADCAmplLS4 = fs_->make<TH2F>("h_2D0sumADCAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7361  h_sum0ADCAmplperLS4 = fs_->make<TH1F>("h_sum0ADCAmplperLS4", " ", bac, 1., bac2);
7362 
7363  h_sumADCAmplLS5 = fs_->make<TH1F>("h_sumADCAmplLS5", " ", 100, 0., lsdep_estimator1_HEdepth3_);
7364  h_2DsumADCAmplLS5 = fs_->make<TH2F>("h_2DsumADCAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7366  fs_->make<TH2F>("h_2DsumADCAmplLS5_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7367  h_sumADCAmplperLS5 = fs_->make<TH1F>("h_sumADCAmplperLS5", " ", bac, 1., bac2);
7368  h_sumCutADCAmplperLS5 = fs_->make<TH1F>("h_sumCutADCAmplperLS5", " ", bac, 1., bac2);
7369  h_2D0sumADCAmplLS5 = fs_->make<TH2F>("h_2D0sumADCAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7370  h_sum0ADCAmplperLS5 = fs_->make<TH1F>("h_sum0ADCAmplperLS5", " ", bac, 1., bac2);
7371  // HE upgrade depth4
7372  h_sumADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7373  h_sumCutADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7374  h_sum0ADCAmplperLSdepth4HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth4HEu", " ", bac, 1., bac2);
7375 
7376  // HE upgrade depth5
7377  h_sumADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7378  h_sumCutADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7379  h_sum0ADCAmplperLSdepth5HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth5HEu", " ", bac, 1., bac2);
7380  // HE upgrade depth6
7381  h_sumADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7382  h_sumCutADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7383  h_sum0ADCAmplperLSdepth6HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth6HEu", " ", bac, 1., bac2);
7384  // HE upgrade depth7
7385  h_sumADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sumADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7386  h_sumCutADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7387  h_sum0ADCAmplperLSdepth7HEu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth7HEu", " ", bac, 1., bac2);
7388  // for HE gain stability vs LS:
7389  h_2DsumADCAmplLSdepth4HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HEu", " ", neta, -41., 41., nphi, 0., bphi);
7390  h_2D0sumADCAmplLSdepth4HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HEu", " ", neta, -41., 41., nphi, 0., bphi);
7391  h_2DsumADCAmplLSdepth5HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth5HEu", " ", neta, -41., 41., nphi, 0., bphi);
7392  h_2D0sumADCAmplLSdepth5HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth5HEu", " ", neta, -41., 41., nphi, 0., bphi);
7393  h_2DsumADCAmplLSdepth6HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth6HEu", " ", neta, -41., 41., nphi, 0., bphi);
7394  h_2D0sumADCAmplLSdepth6HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth6HEu", " ", neta, -41., 41., nphi, 0., bphi);
7395  h_2DsumADCAmplLSdepth7HEu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth7HEu", " ", neta, -41., 41., nphi, 0., bphi);
7396  h_2D0sumADCAmplLSdepth7HEu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth7HEu", " ", neta, -41., 41., nphi, 0., bphi);
7397  h_2DsumADCAmplLSdepth3HFu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth3HFu", " ", neta, -41., 41., nphi, 0., bphi);
7398  h_2D0sumADCAmplLSdepth3HFu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth3HFu", " ", neta, -41., 41., nphi, 0., bphi);
7399  h_2DsumADCAmplLSdepth4HFu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HFu", " ", neta, -41., 41., nphi, 0., bphi);
7400  h_2D0sumADCAmplLSdepth4HFu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HFu", " ", neta, -41., 41., nphi, 0., bphi);
7401 
7402  h_sumADCAmplLS6 = fs_->make<TH1F>("h_sumADCAmplLS6", " ", 100, 0., lsdep_estimator1_HFdepth1_);
7403  h_2DsumADCAmplLS6 = fs_->make<TH2F>("h_2DsumADCAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7405  fs_->make<TH2F>("h_2DsumADCAmplLS6_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7406  h_2D0sumADCAmplLS6 = fs_->make<TH2F>("h_2D0sumADCAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7407  h_sumADCAmplperLS6 = fs_->make<TH1F>("h_sumADCAmplperLS6", " ", bac, 1., bac2);
7408  h_sumCutADCAmplperLS6 = fs_->make<TH1F>("h_sumCutADCAmplperLS6", " ", bac, 1., bac2);
7409  h_sum0ADCAmplperLS6 = fs_->make<TH1F>("h_sum0ADCAmplperLS6", " ", bac, 1., bac2);
7410  // HF upgrade depth3
7411  h_sumADCAmplperLS6u = fs_->make<TH1F>("h_sumADCAmplperLS6u", " ", bac, 1., bac2);
7412  h_sumCutADCAmplperLS6u = fs_->make<TH1F>("h_sumCutADCAmplperLS6u", " ", bac, 1., bac2);
7413  h_sum0ADCAmplperLS6u = fs_->make<TH1F>("h_sum0ADCAmplperLS6u", " ", bac, 1., bac2);
7414 
7415  h_sumADCAmplLS7 = fs_->make<TH1F>("h_sumADCAmplLS7", " ", 100, 0., lsdep_estimator1_HFdepth2_);
7416  h_2DsumADCAmplLS7 = fs_->make<TH2F>("h_2DsumADCAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7418  fs_->make<TH2F>("h_2DsumADCAmplLS7_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7419  h_2D0sumADCAmplLS7 = fs_->make<TH2F>("h_2D0sumADCAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7420  h_sumADCAmplperLS7 = fs_->make<TH1F>("h_sumADCAmplperLS7", " ", bac, 1., bac2);
7421  h_sumCutADCAmplperLS7 = fs_->make<TH1F>("h_sumCutADCAmplperLS7", " ", bac, 1., bac2);
7422  h_sum0ADCAmplperLS7 = fs_->make<TH1F>("h_sum0ADCAmplperLS7", " ", bac, 1., bac2);
7423  // HF upgrade depth4
7424  h_sumADCAmplperLS7u = fs_->make<TH1F>("h_sumADCAmplperLS7u", " ", bac, 1., bac2);
7425  h_sumCutADCAmplperLS7u = fs_->make<TH1F>("h_sumCutADCAmplperLS7u", " ", bac, 1., bac2);
7426  h_sum0ADCAmplperLS7u = fs_->make<TH1F>("h_sum0ADCAmplperLS7u", " ", bac, 1., bac2);
7427 
7428  h_sumADCAmplLS8 = fs_->make<TH1F>("h_sumADCAmplLS8", " ", 100, 0., lsdep_estimator1_HOdepth4_);
7429  h_2DsumADCAmplLS8 = fs_->make<TH2F>("h_2DsumADCAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7431  fs_->make<TH2F>("h_2DsumADCAmplLS8_LSselected", " ", neta, -41., 41., nphi, 0., bphi);
7432  h_sumADCAmplperLS8 = fs_->make<TH1F>("h_sumADCAmplperLS8", " ", bac, 1., bac2);
7433  h_sumCutADCAmplperLS8 = fs_->make<TH1F>("h_sumCutADCAmplperLS8", " ", bac, 1., bac2);
7434  h_2D0sumADCAmplLS8 = fs_->make<TH2F>("h_2D0sumADCAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7435  h_sum0ADCAmplperLS8 = fs_->make<TH1F>("h_sum0ADCAmplperLS8", " ", bac, 1., bac2);
7436 
7437  // HB upgrade depth3
7438  h_sumADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sumADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7439  h_sumCutADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7440  h_sum0ADCAmplperLSdepth3HBu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth3HBu", " ", bac, 1., bac2);
7441  // HB upgrade depth4
7442  h_sumADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sumADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7443  h_sumCutADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sumCutADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7444  h_sum0ADCAmplperLSdepth4HBu = fs_->make<TH1F>("h_sum0ADCAmplperLSdepth4HBu", " ", bac, 1., bac2);
7445 
7446  // for HB gain stability vs LS:
7447  h_2DsumADCAmplLSdepth3HBu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth3HBu", " ", neta, -41., 41., nphi, 0., bphi);
7448  h_2D0sumADCAmplLSdepth3HBu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth3HBu", " ", neta, -41., 41., nphi, 0., bphi);
7449  h_2DsumADCAmplLSdepth4HBu = fs_->make<TH2F>("h_2DsumADCAmplLSdepth4HBu", " ", neta, -41., 41., nphi, 0., bphi);
7450  h_2D0sumADCAmplLSdepth4HBu = fs_->make<TH2F>("h_2D0sumADCAmplLSdepth4HBu", " ", neta, -41., 41., nphi, 0., bphi);
7451 
7452  // error-A for HB( depth1 only)
7453  h_sumADCAmplperLS1_P1 = fs_->make<TH1F>("h_sumADCAmplperLS1_P1", " ", bac, 1., bac2);
7454  h_sum0ADCAmplperLS1_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_P1", " ", bac, 1., bac2);
7455  h_sumADCAmplperLS1_P2 = fs_->make<TH1F>("h_sumADCAmplperLS1_P2", " ", bac, 1., bac2);
7456  h_sum0ADCAmplperLS1_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_P2", " ", bac, 1., bac2);
7457  h_sumADCAmplperLS1_M1 = fs_->make<TH1F>("h_sumADCAmplperLS1_M1", " ", bac, 1., bac2);
7458  h_sum0ADCAmplperLS1_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_M1", " ", bac, 1., bac2);
7459  h_sumADCAmplperLS1_M2 = fs_->make<TH1F>("h_sumADCAmplperLS1_M2", " ", bac, 1., bac2);
7460  h_sum0ADCAmplperLS1_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS1_M2", " ", bac, 1., bac2);
7461 
7462  // error-A for HE( depth1 only)
7463  h_sumADCAmplperLS3_P1 = fs_->make<TH1F>("h_sumADCAmplperLS3_P1", " ", bac, 1., bac2);
7464  h_sum0ADCAmplperLS3_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_P1", " ", bac, 1., bac2);
7465  h_sumADCAmplperLS3_P2 = fs_->make<TH1F>("h_sumADCAmplperLS3_P2", " ", bac, 1., bac2);
7466  h_sum0ADCAmplperLS3_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_P2", " ", bac, 1., bac2);
7467  h_sumADCAmplperLS3_M1 = fs_->make<TH1F>("h_sumADCAmplperLS3_M1", " ", bac, 1., bac2);
7468  h_sum0ADCAmplperLS3_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_M1", " ", bac, 1., bac2);
7469  h_sumADCAmplperLS3_M2 = fs_->make<TH1F>("h_sumADCAmplperLS3_M2", " ", bac, 1., bac2);
7470  h_sum0ADCAmplperLS3_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS3_M2", " ", bac, 1., bac2);
7471 
7472  // error-A for HF( depth1 only)
7473  h_sumADCAmplperLS6_P1 = fs_->make<TH1F>("h_sumADCAmplperLS6_P1", " ", bac, 1., bac2);
7474  h_sum0ADCAmplperLS6_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_P1", " ", bac, 1., bac2);
7475  h_sumADCAmplperLS6_P2 = fs_->make<TH1F>("h_sumADCAmplperLS6_P2", " ", bac, 1., bac2);
7476  h_sum0ADCAmplperLS6_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_P2", " ", bac, 1., bac2);
7477  h_sumADCAmplperLS6_M1 = fs_->make<TH1F>("h_sumADCAmplperLS6_M1", " ", bac, 1., bac2);
7478  h_sum0ADCAmplperLS6_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_M1", " ", bac, 1., bac2);
7479  h_sumADCAmplperLS6_M2 = fs_->make<TH1F>("h_sumADCAmplperLS6_M2", " ", bac, 1., bac2);
7480  h_sum0ADCAmplperLS6_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS6_M2", " ", bac, 1., bac2);
7481 
7482  // error-A for HO( depth4 only)
7483  h_sumADCAmplperLS8_P1 = fs_->make<TH1F>("h_sumADCAmplperLS8_P1", " ", bac, 1., bac2);
7484  h_sum0ADCAmplperLS8_P1 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_P1", " ", bac, 1., bac2);
7485  h_sumADCAmplperLS8_P2 = fs_->make<TH1F>("h_sumADCAmplperLS8_P2", " ", bac, 1., bac2);
7486  h_sum0ADCAmplperLS8_P2 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_P2", " ", bac, 1., bac2);
7487  h_sumADCAmplperLS8_M1 = fs_->make<TH1F>("h_sumADCAmplperLS8_M1", " ", bac, 1., bac2);
7488  h_sum0ADCAmplperLS8_M1 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_M1", " ", bac, 1., bac2);
7489  h_sumADCAmplperLS8_M2 = fs_->make<TH1F>("h_sumADCAmplperLS8_M2", " ", bac, 1., bac2);
7490  h_sum0ADCAmplperLS8_M2 = fs_->make<TH1F>("h_sum0ADCAmplperLS8_M2", " ", bac, 1., bac2);
7491 
7492  //--------------------------------------------------
7493  h_sumTSmeanALS1 = fs_->make<TH1F>("h_sumTSmeanALS1", " ", 100, 0., lsdep_estimator2_HBdepth1_);
7494  h_2DsumTSmeanALS1 = fs_->make<TH2F>("h_2DsumTSmeanALS1", " ", neta, -41., 41., nphi, 0., bphi);
7495  h_sumTSmeanAperLS1 = fs_->make<TH1F>("h_sumTSmeanAperLS1", " ", bac, 1., bac2);
7496  h_sumTSmeanAperLS1_LSselected = fs_->make<TH1F>("h_sumTSmeanAperLS1_LSselected", " ", bac, 1., bac2);
7497  h_sumCutTSmeanAperLS1 = fs_->make<TH1F>("h_sumCutTSmeanAperLS1", " ", bac, 1., bac2);
7498  h_2D0sumTSmeanALS1 = fs_->make<TH2F>("h_2D0sumTSmeanALS1", " ", neta, -41., 41., nphi, 0., bphi);
7499  h_sum0TSmeanAperLS1 = fs_->make<TH1F>("h_sum0TSmeanAperLS1", " ", bac, 1., bac2);
7500 
7501  h_sumTSmeanALS2 = fs_->make<TH1F>("h_sumTSmeanALS2", " ", 100, 0., lsdep_estimator2_HBdepth2_);
7502  h_2DsumTSmeanALS2 = fs_->make<TH2F>("h_2DsumTSmeanALS2", " ", neta, -41., 41., nphi, 0., bphi);
7503  h_sumTSmeanAperLS2 = fs_->make<TH1F>("h_sumTSmeanAperLS2", " ", bac, 1., bac2);
7504  h_sumCutTSmeanAperLS2 = fs_->make<TH1F>("h_sumCutTSmeanAperLS2", " ", bac, 1., bac2);
7505  h_2D0sumTSmeanALS2 = fs_->make<TH2F>("h_2D0sumTSmeanALS2", " ", neta, -41., 41., nphi, 0., bphi);
7506  h_sum0TSmeanAperLS2 = fs_->make<TH1F>("h_sum0TSmeanAperLS2", " ", bac, 1., bac2);
7507 
7508  h_sumTSmeanALS3 = fs_->make<TH1F>("h_sumTSmeanALS3", " ", 100, 0., lsdep_estimator2_HEdepth1_);
7509  h_2DsumTSmeanALS3 = fs_->make<TH2F>("h_2DsumTSmeanALS3", " ", neta, -41., 41., nphi, 0., bphi);
7510  h_sumTSmeanAperLS3 = fs_->make<TH1F>("h_sumTSmeanAperLS3", " ", bac, 1., bac2);
7511  h_sumCutTSmeanAperLS3 = fs_->make<TH1F>("h_sumCutTSmeanAperLS3", " ", bac, 1., bac2);
7512  h_2D0sumTSmeanALS3 = fs_->make<TH2F>("h_2D0sumTSmeanALS3", " ", neta, -41., 41., nphi, 0., bphi);
7513  h_sum0TSmeanAperLS3 = fs_->make<TH1F>("h_sum0TSmeanAperLS3", " ", bac, 1., bac2);
7514 
7515  h_sumTSmeanALS4 = fs_->make<TH1F>("h_sumTSmeanALS4", " ", 100, 0., lsdep_estimator2_HEdepth2_);
7516  h_2DsumTSmeanALS4 = fs_->make<TH2F>("h_2DsumTSmeanALS4", " ", neta, -41., 41., nphi, 0., bphi);
7517  h_sumTSmeanAperLS4 = fs_->make<TH1F>("h_sumTSmeanAperLS4", " ", bac, 1., bac2);
7518  h_sumCutTSmeanAperLS4 = fs_->make<TH1F>("h_sumCutTSmeanAperLS4", " ", bac, 1., bac2);
7519  h_2D0sumTSmeanALS4 = fs_->make<TH2F>("h_2D0sumTSmeanALS4", " ", neta, -41., 41., nphi, 0., bphi);
7520  h_sum0TSmeanAperLS4 = fs_->make<TH1F>("h_sum0TSmeanAperLS4", " ", bac, 1., bac2);
7521 
7522  h_sumTSmeanALS5 = fs_->make<TH1F>("h_sumTSmeanALS5", " ", 100, 0., lsdep_estimator2_HEdepth3_);
7523  h_2DsumTSmeanALS5 = fs_->make<TH2F>("h_2DsumTSmeanALS5", " ", neta, -41., 41., nphi, 0., bphi);
7524  h_sumTSmeanAperLS5 = fs_->make<TH1F>("h_sumTSmeanAperLS5", " ", bac, 1., bac2);
7525  h_sumCutTSmeanAperLS5 = fs_->make<TH1F>("h_sumCutTSmeanAperLS5", " ", bac, 1., bac2);
7526  h_2D0sumTSmeanALS5 = fs_->make<TH2F>("h_2D0sumTSmeanALS5", " ", neta, -41., 41., nphi, 0., bphi);
7527  h_sum0TSmeanAperLS5 = fs_->make<TH1F>("h_sum0TSmeanAperLS5", " ", bac, 1., bac2);
7528 
7529  h_sumTSmeanALS6 = fs_->make<TH1F>("h_sumTSmeanALS6", " ", 100, 0., lsdep_estimator2_HFdepth1_);
7530  h_2DsumTSmeanALS6 = fs_->make<TH2F>("h_2DsumTSmeanALS6", " ", neta, -41., 41., nphi, 0., bphi);
7531  h_sumTSmeanAperLS6 = fs_->make<TH1F>("h_sumTSmeanAperLS6", " ", bac, 1., bac2);
7532  h_sumCutTSmeanAperLS6 = fs_->make<TH1F>("h_sumCutTSmeanAperLS6", " ", bac, 1., bac2);
7533  h_2D0sumTSmeanALS6 = fs_->make<TH2F>("h_2D0sumTSmeanALS6", " ", neta, -41., 41., nphi, 0., bphi);
7534  h_sum0TSmeanAperLS6 = fs_->make<TH1F>("h_sum0TSmeanAperLS6", " ", bac, 1., bac2);
7535 
7536  h_sumTSmeanALS7 = fs_->make<TH1F>("h_sumTSmeanALS7", " ", 100, 0., lsdep_estimator2_HFdepth2_);
7537  h_2DsumTSmeanALS7 = fs_->make<TH2F>("h_2DsumTSmeanALS7", " ", neta, -41., 41., nphi, 0., bphi);
7538  h_sumTSmeanAperLS7 = fs_->make<TH1F>("h_sumTSmeanAperLS7", " ", bac, 1., bac2);
7539  h_sumCutTSmeanAperLS7 = fs_->make<TH1F>("h_sumCutTSmeanAperLS7", " ", bac, 1., bac2);
7540  h_2D0sumTSmeanALS7 = fs_->make<TH2F>("h_2D0sumTSmeanALS7", " ", neta, -41., 41., nphi, 0., bphi);
7541  h_sum0TSmeanAperLS7 = fs_->make<TH1F>("h_sum0TSmeanAperLS7", " ", bac, 1., bac2);
7542 
7543  h_sumTSmeanALS8 = fs_->make<TH1F>("h_sumTSmeanALS8", " ", 100, 0., lsdep_estimator2_HOdepth4_);
7544  h_2DsumTSmeanALS8 = fs_->make<TH2F>("h_2DsumTSmeanALS8", " ", neta, -41., 41., nphi, 0., bphi);
7545  h_sumTSmeanAperLS8 = fs_->make<TH1F>("h_sumTSmeanAperLS8", " ", bac, 1., bac2);
7546  h_sumCutTSmeanAperLS8 = fs_->make<TH1F>("h_sumCutTSmeanAperLS8", " ", bac, 1., bac2);
7547  h_2D0sumTSmeanALS8 = fs_->make<TH2F>("h_2D0sumTSmeanALS8", " ", neta, -41., 41., nphi, 0., bphi);
7548  h_sum0TSmeanAperLS8 = fs_->make<TH1F>("h_sum0TSmeanAperLS8", " ", bac, 1., bac2);
7549  //--------------------------------------------------
7550  // for estimator3:
7551  h_sumTSmaxALS1 = fs_->make<TH1F>("h_sumTSmaxALS1", " ", 100, 0., lsdep_estimator3_HBdepth1_);
7552  h_2DsumTSmaxALS1 = fs_->make<TH2F>("h_2DsumTSmaxALS1", " ", neta, -41., 41., nphi, 0., bphi);
7553  h_sumTSmaxAperLS1 = fs_->make<TH1F>("h_sumTSmaxAperLS1", " ", bac, 1., bac2);
7554  h_sumTSmaxAperLS1_LSselected = fs_->make<TH1F>("h_sumTSmaxAperLS1_LSselected", " ", bac, 1., bac2);
7555  h_sumCutTSmaxAperLS1 = fs_->make<TH1F>("h_sumCutTSmaxAperLS1", " ", bac, 1., bac2);
7556  h_2D0sumTSmaxALS1 = fs_->make<TH2F>("h_2D0sumTSmaxALS1", " ", neta, -41., 41., nphi, 0., bphi);
7557  h_sum0TSmaxAperLS1 = fs_->make<TH1F>("h_sum0TSmaxAperLS1", " ", bac, 1., bac2);
7558 
7559  h_sumTSmaxALS2 = fs_->make<TH1F>("h_sumTSmaxALS2", " ", 100, 0., lsdep_estimator3_HBdepth2_);
7560  h_2DsumTSmaxALS2 = fs_->make<TH2F>("h_2DsumTSmaxALS2", " ", neta, -41., 41., nphi, 0., bphi);
7561  h_sumTSmaxAperLS2 = fs_->make<TH1F>("h_sumTSmaxAperLS2", " ", bac, 1., bac2);
7562  h_sumCutTSmaxAperLS2 = fs_->make<TH1F>("h_sumCutTSmaxAperLS2", " ", bac, 1., bac2);
7563  h_2D0sumTSmaxALS2 = fs_->make<TH2F>("h_2D0sumTSmaxALS2", " ", neta, -41., 41., nphi, 0., bphi);
7564  h_sum0TSmaxAperLS2 = fs_->make<TH1F>("h_sum0TSmaxAperLS2", " ", bac, 1., bac2);
7565 
7566  h_sumTSmaxALS3 = fs_->make<TH1F>("h_sumTSmaxALS3", " ", 100, 0., lsdep_estimator3_HEdepth1_);
7567  h_2DsumTSmaxALS3 = fs_->make<TH2F>("h_2DsumTSmaxALS3", " ", neta, -41., 41., nphi, 0., bphi);
7568  h_sumTSmaxAperLS3 = fs_->make<TH1F>("h_sumTSmaxAperLS3", " ", bac, 1., bac2);
7569  h_sumCutTSmaxAperLS3 = fs_->make<TH1F>("h_sumCutTSmaxAperLS3", " ", bac, 1., bac2);
7570  h_2D0sumTSmaxALS3 = fs_->make<TH2F>("h_2D0sumTSmaxALS3", " ", neta, -41., 41., nphi, 0., bphi);
7571  h_sum0TSmaxAperLS3 = fs_->make<TH1F>("h_sum0TSmaxAperLS3", " ", bac, 1., bac2);
7572 
7573  h_sumTSmaxALS4 = fs_->make<TH1F>("h_sumTSmaxALS4", " ", 100, 0., lsdep_estimator3_HEdepth2_);
7574  h_2DsumTSmaxALS4 = fs_->make<TH2F>("h_2DsumTSmaxALS4", " ", neta, -41., 41., nphi, 0., bphi);
7575  h_sumTSmaxAperLS4 = fs_->make<TH1F>("h_sumTSmaxAperLS4", " ", bac, 1., bac2);
7576  h_sumCutTSmaxAperLS4 = fs_->make<TH1F>("h_sumCutTSmaxAperLS4", " ", bac, 1., bac2);
7577  h_2D0sumTSmaxALS4 = fs_->make<TH2F>("h_2D0sumTSmaxALS4", " ", neta, -41., 41., nphi, 0., bphi);
7578  h_sum0TSmaxAperLS4 = fs_->make<TH1F>("h_sum0TSmaxAperLS4", " ", bac, 1., bac2);
7579 
7580  h_sumTSmaxALS5 = fs_->make<TH1F>("h_sumTSmaxALS5", " ", 100, 0., lsdep_estimator3_HEdepth3_);
7581  h_2DsumTSmaxALS5 = fs_->make<TH2F>("h_2DsumTSmaxALS5", " ", neta, -41., 41., nphi, 0., bphi);
7582  h_sumTSmaxAperLS5 = fs_->make<TH1F>("h_sumTSmaxAperLS5", " ", bac, 1., bac2);
7583  h_sumCutTSmaxAperLS5 = fs_->make<TH1F>("h_sumCutTSmaxAperLS5", " ", bac, 1., bac2);
7584  h_2D0sumTSmaxALS5 = fs_->make<TH2F>("h_2D0sumTSmaxALS5", " ", neta, -41., 41., nphi, 0., bphi);
7585  h_sum0TSmaxAperLS5 = fs_->make<TH1F>("h_sum0TSmaxAperLS5", " ", bac, 1., bac2);
7586 
7587  h_sumTSmaxALS6 = fs_->make<TH1F>("h_sumTSmaxALS6", " ", 100, 0., lsdep_estimator3_HFdepth1_);
7588  h_2DsumTSmaxALS6 = fs_->make<TH2F>("h_2DsumTSmaxALS6", " ", neta, -41., 41., nphi, 0., bphi);
7589  h_sumTSmaxAperLS6 = fs_->make<TH1F>("h_sumTSmaxAperLS6", " ", bac, 1., bac2);
7590  h_sumCutTSmaxAperLS6 = fs_->make<TH1F>("h_sumCutTSmaxAperLS6", " ", bac, 1., bac2);
7591  h_2D0sumTSmaxALS6 = fs_->make<TH2F>("h_2D0sumTSmaxALS6", " ", neta, -41., 41., nphi, 0., bphi);
7592  h_sum0TSmaxAperLS6 = fs_->make<TH1F>("h_sum0TSmaxAperLS6", " ", bac, 1., bac2);
7593 
7594  h_sumTSmaxALS7 = fs_->make<TH1F>("h_sumTSmaxALS7", " ", 100, 0., lsdep_estimator3_HFdepth2_);
7595  h_2DsumTSmaxALS7 = fs_->make<TH2F>("h_2DsumTSmaxALS7", " ", neta, -41., 41., nphi, 0., bphi);
7596  h_sumTSmaxAperLS7 = fs_->make<TH1F>("h_sumTSmaxAperLS7", " ", bac, 1., bac2);
7597  h_sumCutTSmaxAperLS7 = fs_->make<TH1F>("h_sumCutTSmaxAperLS7", " ", bac, 1., bac2);
7598  h_2D0sumTSmaxALS7 = fs_->make<TH2F>("h_2D0sumTSmaxALS7", " ", neta, -41., 41., nphi, 0., bphi);
7599  h_sum0TSmaxAperLS7 = fs_->make<TH1F>("h_sum0TSmaxAperLS7", " ", bac, 1., bac2);
7600 
7601  h_sumTSmaxALS8 = fs_->make<TH1F>("h_sumTSmaxALS8", " ", 100, 0., lsdep_estimator3_HOdepth4_);
7602  h_2DsumTSmaxALS8 = fs_->make<TH2F>("h_2DsumTSmaxALS8", " ", neta, -41., 41., nphi, 0., bphi);
7603  h_sumTSmaxAperLS8 = fs_->make<TH1F>("h_sumTSmaxAperLS8", " ", bac, 1., bac2);
7604  h_sumCutTSmaxAperLS8 = fs_->make<TH1F>("h_sumCutTSmaxAperLS8", " ", bac, 1., bac2);
7605  h_2D0sumTSmaxALS8 = fs_->make<TH2F>("h_2D0sumTSmaxALS8", " ", neta, -41., 41., nphi, 0., bphi);
7606  h_sum0TSmaxAperLS8 = fs_->make<TH1F>("h_sum0TSmaxAperLS8", " ", bac, 1., bac2);
7607  //--------------------------------------------------
7608  // for estimator4:
7609  h_sumAmplitudeLS1 = fs_->make<TH1F>("h_sumAmplitudeLS1", " ", 100, 0.0, lsdep_estimator4_HBdepth1_);
7610  h_2DsumAmplitudeLS1 = fs_->make<TH2F>("h_2DsumAmplitudeLS1", " ", neta, -41., 41., nphi, 0., bphi);
7611  h_sumAmplitudeperLS1 = fs_->make<TH1F>("h_sumAmplitudeperLS1", " ", bac, 1., bac2);
7612  h_sumAmplitudeperLS1_LSselected = fs_->make<TH1F>("h_sumAmplitudeperLS1_LSselected", " ", bac, 1., bac2);
7613  h_sumCutAmplitudeperLS1 = fs_->make<TH1F>("h_sumCutAmplitudeperLS1", " ", bac, 1., bac2);
7614  h_2D0sumAmplitudeLS1 = fs_->make<TH2F>("h_2D0sumAmplitudeLS1", " ", neta, -41., 41., nphi, 0., bphi);
7615  h_sum0AmplitudeperLS1 = fs_->make<TH1F>("h_sum0AmplitudeperLS1", " ", bac, 1., bac2);
7616 
7617  h_sumAmplitudeLS2 = fs_->make<TH1F>("h_sumAmplitudeLS2", " ", 100, 0.0, lsdep_estimator4_HBdepth2_);
7618  h_2DsumAmplitudeLS2 = fs_->make<TH2F>("h_2DsumAmplitudeLS2", " ", neta, -41., 41., nphi, 0., bphi);
7619  h_sumAmplitudeperLS2 = fs_->make<TH1F>("h_sumAmplitudeperLS2", " ", bac, 1., bac2);
7620  h_sumCutAmplitudeperLS2 = fs_->make<TH1F>("h_sumCutAmplitudeperLS2", " ", bac, 1., bac2);
7621  h_2D0sumAmplitudeLS2 = fs_->make<TH2F>("h_2D0sumAmplitudeLS2", " ", neta, -41., 41., nphi, 0., bphi);
7622  h_sum0AmplitudeperLS2 = fs_->make<TH1F>("h_sum0AmplitudeperLS2", " ", bac, 1., bac2);
7623 
7624  h_sumAmplitudeLS3 = fs_->make<TH1F>("h_sumAmplitudeLS3", " ", 100, 0.0, lsdep_estimator4_HEdepth1_);
7625  h_2DsumAmplitudeLS3 = fs_->make<TH2F>("h_2DsumAmplitudeLS3", " ", neta, -41., 41., nphi, 0., bphi);
7626  h_sumAmplitudeperLS3 = fs_->make<TH1F>("h_sumAmplitudeperLS3", " ", bac, 1., bac2);
7627  h_sumCutAmplitudeperLS3 = fs_->make<TH1F>("h_sumCutAmplitudeperLS3", " ", bac, 1., bac2);
7628  h_2D0sumAmplitudeLS3 = fs_->make<TH2F>("h_2D0sumAmplitudeLS3", " ", neta, -41., 41., nphi, 0., bphi);
7629  h_sum0AmplitudeperLS3 = fs_->make<TH1F>("h_sum0AmplitudeperLS3", " ", bac, 1., bac2);
7630 
7631  h_sumAmplitudeLS4 = fs_->make<TH1F>("h_sumAmplitudeLS4", " ", 100, 0.0, lsdep_estimator4_HEdepth2_);
7632  h_2DsumAmplitudeLS4 = fs_->make<TH2F>("h_2DsumAmplitudeLS4", " ", neta, -41., 41., nphi, 0., bphi);
7633  h_sumAmplitudeperLS4 = fs_->make<TH1F>("h_sumAmplitudeperLS4", " ", bac, 1., bac2);
7634  h_sumCutAmplitudeperLS4 = fs_->make<TH1F>("h_sumCutAmplitudeperLS4", " ", bac, 1., bac2);
7635  h_2D0sumAmplitudeLS4 = fs_->make<TH2F>("h_2D0sumAmplitudeLS4", " ", neta, -41., 41., nphi, 0., bphi);
7636  h_sum0AmplitudeperLS4 = fs_->make<TH1F>("h_sum0AmplitudeperLS4", " ", bac, 1., bac2);
7637 
7638  h_sumAmplitudeLS5 = fs_->make<TH1F>("h_sumAmplitudeLS5", " ", 100, 0.0, lsdep_estimator4_HEdepth3_);
7639  h_2DsumAmplitudeLS5 = fs_->make<TH2F>("h_2DsumAmplitudeLS5", " ", neta, -41., 41., nphi, 0., bphi);
7640  h_sumAmplitudeperLS5 = fs_->make<TH1F>("h_sumAmplitudeperLS5", " ", bac, 1., bac2);
7641  h_sumCutAmplitudeperLS5 = fs_->make<TH1F>("h_sumCutAmplitudeperLS5", " ", bac, 1., bac2);
7642  h_2D0sumAmplitudeLS5 = fs_->make<TH2F>("h_2D0sumAmplitudeLS5", " ", neta, -41., 41., nphi, 0., bphi);
7643  h_sum0AmplitudeperLS5 = fs_->make<TH1F>("h_sum0AmplitudeperLS5", " ", bac, 1., bac2);
7644 
7645  h_sumAmplitudeLS6 = fs_->make<TH1F>("h_sumAmplitudeLS6", " ", 100, 0., lsdep_estimator4_HFdepth1_);
7646  h_2DsumAmplitudeLS6 = fs_->make<TH2F>("h_2DsumAmplitudeLS6", " ", neta, -41., 41., nphi, 0., bphi);
7647  h_sumAmplitudeperLS6 = fs_->make<TH1F>("h_sumAmplitudeperLS6", " ", bac, 1., bac2);
7648  h_sumCutAmplitudeperLS6 = fs_->make<TH1F>("h_sumCutAmplitudeperLS6", " ", bac, 1., bac2);
7649  h_2D0sumAmplitudeLS6 = fs_->make<TH2F>("h_2D0sumAmplitudeLS6", " ", neta, -41., 41., nphi, 0., bphi);
7650  h_sum0AmplitudeperLS6 = fs_->make<TH1F>("h_sum0AmplitudeperLS6", " ", bac, 1., bac2);
7651 
7652  h_sumAmplitudeLS7 = fs_->make<TH1F>("h_sumAmplitudeLS7", " ", 100, 0., lsdep_estimator4_HFdepth2_);
7653  h_2DsumAmplitudeLS7 = fs_->make<TH2F>("h_2DsumAmplitudeLS7", " ", neta, -41., 41., nphi, 0., bphi);
7654  h_sumAmplitudeperLS7 = fs_->make<TH1F>("h_sumAmplitudeperLS7", " ", bac, 1., bac2);
7655  h_sumCutAmplitudeperLS7 = fs_->make<TH1F>("h_sumCutAmplitudeperLS7", " ", bac, 1., bac2);
7656  h_2D0sumAmplitudeLS7 = fs_->make<TH2F>("h_2D0sumAmplitudeLS7", " ", neta, -41., 41., nphi, 0., bphi);
7657  h_sum0AmplitudeperLS7 = fs_->make<TH1F>("h_sum0AmplitudeperLS7", " ", bac, 1., bac2);
7658 
7659  h_sumAmplitudeLS8 = fs_->make<TH1F>("h_sumAmplitudeLS8", " ", 100, 0., lsdep_estimator4_HOdepth4_);
7660  h_2DsumAmplitudeLS8 = fs_->make<TH2F>("h_2DsumAmplitudeLS8", " ", neta, -41., 41., nphi, 0., bphi);
7661  h_sumAmplitudeperLS8 = fs_->make<TH1F>("h_sumAmplitudeperLS8", " ", bac, 1., bac2);
7662  h_sumCutAmplitudeperLS8 = fs_->make<TH1F>("h_sumCutAmplitudeperLS8", " ", bac, 1., bac2);
7663  h_2D0sumAmplitudeLS8 = fs_->make<TH2F>("h_2D0sumAmplitudeLS8", " ", neta, -41., 41., nphi, 0., bphi);
7664  h_sum0AmplitudeperLS8 = fs_->make<TH1F>("h_sum0AmplitudeperLS8", " ", bac, 1., bac2);
7665  //--------------------------------------------------
7666  // for estimator5:
7667  h_sumAmplLS1 = fs_->make<TH1F>("h_sumAmplLS1", " ", 100, 0.0, lsdep_estimator5_HBdepth1_);
7668  h_2DsumAmplLS1 = fs_->make<TH2F>("h_2DsumAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7669  h_sumAmplperLS1 = fs_->make<TH1F>("h_sumAmplperLS1", " ", bac, 1., bac2);
7670  h_sumAmplperLS1_LSselected = fs_->make<TH1F>("h_sumAmplperLS1_LSselected", " ", bac, 1., bac2);
7671  h_sumCutAmplperLS1 = fs_->make<TH1F>("h_sumCutAmplperLS1", " ", bac, 1., bac2);
7672  h_2D0sumAmplLS1 = fs_->make<TH2F>("h_2D0sumAmplLS1", " ", neta, -41., 41., nphi, 0., bphi);
7673  h_sum0AmplperLS1 = fs_->make<TH1F>("h_sum0AmplperLS1", " ", bac, 1., bac2);
7674 
7675  h_sumAmplLS2 = fs_->make<TH1F>("h_sumAmplLS2", " ", 100, 0.0, lsdep_estimator5_HBdepth2_);
7676  h_2DsumAmplLS2 = fs_->make<TH2F>("h_2DsumAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7677  h_sumAmplperLS2 = fs_->make<TH1F>("h_sumAmplperLS2", " ", bac, 1., bac2);
7678  h_sumCutAmplperLS2 = fs_->make<TH1F>("h_sumCutAmplperLS2", " ", bac, 1., bac2);
7679  h_2D0sumAmplLS2 = fs_->make<TH2F>("h_2D0sumAmplLS2", " ", neta, -41., 41., nphi, 0., bphi);
7680  h_sum0AmplperLS2 = fs_->make<TH1F>("h_sum0AmplperLS2", " ", bac, 1., bac2);
7681 
7682  h_sumAmplLS3 = fs_->make<TH1F>("h_sumAmplLS3", " ", 100, 0.0, lsdep_estimator5_HEdepth1_);
7683  h_2DsumAmplLS3 = fs_->make<TH2F>("h_2DsumAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7684  h_sumAmplperLS3 = fs_->make<TH1F>("h_sumAmplperLS3", " ", bac, 1., bac2);
7685  h_sumCutAmplperLS3 = fs_->make<TH1F>("h_sumCutAmplperLS3", " ", bac, 1., bac2);
7686  h_2D0sumAmplLS3 = fs_->make<TH2F>("h_2D0sumAmplLS3", " ", neta, -41., 41., nphi, 0., bphi);
7687  h_sum0AmplperLS3 = fs_->make<TH1F>("h_sum0AmplperLS3", " ", bac, 1., bac2);
7688 
7689  h_sumAmplLS4 = fs_->make<TH1F>("h_sumAmplLS4", " ", 100, 0.0, lsdep_estimator5_HEdepth2_);
7690  h_2DsumAmplLS4 = fs_->make<TH2F>("h_2DsumAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7691  h_sumAmplperLS4 = fs_->make<TH1F>("h_sumAmplperLS4", " ", bac, 1., bac2);
7692  h_sumCutAmplperLS4 = fs_->make<TH1F>("h_sumCutAmplperLS4", " ", bac, 1., bac2);
7693  h_2D0sumAmplLS4 = fs_->make<TH2F>("h_2D0sumAmplLS4", " ", neta, -41., 41., nphi, 0., bphi);
7694  h_sum0AmplperLS4 = fs_->make<TH1F>("h_sum0AmplperLS4", " ", bac, 1., bac2);
7695 
7696  h_sumAmplLS5 = fs_->make<TH1F>("h_sumAmplLS5", " ", 100, 0.0, lsdep_estimator5_HEdepth3_);
7697  h_2DsumAmplLS5 = fs_->make<TH2F>("h_2DsumAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7698  h_sumAmplperLS5 = fs_->make<TH1F>("h_sumAmplperLS5", " ", bac, 1., bac2);
7699  h_sumCutAmplperLS5 = fs_->make<TH1F>("h_sumCutAmplperLS5", " ", bac, 1., bac2);
7700  h_2D0sumAmplLS5 = fs_->make<TH2F>("h_2D0sumAmplLS5", " ", neta, -41., 41., nphi, 0., bphi);
7701  h_sum0AmplperLS5 = fs_->make<TH1F>("h_sum0AmplperLS5", " ", bac, 1., bac2);
7702 
7703  h_sumAmplLS6 = fs_->make<TH1F>("h_sumAmplLS6", " ", 100, 0.0, lsdep_estimator5_HFdepth1_);
7704  h_2DsumAmplLS6 = fs_->make<TH2F>("h_2DsumAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7705  h_sumAmplperLS6 = fs_->make<TH1F>("h_sumAmplperLS6", " ", bac, 1., bac2);
7706  h_sumCutAmplperLS6 = fs_->make<TH1F>("h_sumCutAmplperLS6", " ", bac, 1., bac2);
7707  h_2D0sumAmplLS6 = fs_->make<TH2F>("h_2D0sumAmplLS6", " ", neta, -41., 41., nphi, 0., bphi);
7708  h_sum0AmplperLS6 = fs_->make<TH1F>("h_sum0AmplperLS6", " ", bac, 1., bac2);
7709 
7710  h_RatioOccupancy_HBP = fs_->make<TH1F>("h_RatioOccupancy_HBP", " ", bac, 1., bac2);
7711  h_RatioOccupancy_HBM = fs_->make<TH1F>("h_RatioOccupancy_HBM", " ", bac, 1., bac2);
7712  h_RatioOccupancy_HEP = fs_->make<TH1F>("h_RatioOccupancy_HEP", " ", bac, 1., bac2);
7713  h_RatioOccupancy_HEM = fs_->make<TH1F>("h_RatioOccupancy_HEM", " ", bac, 1., bac2);
7714  h_RatioOccupancy_HOP = fs_->make<TH1F>("h_RatioOccupancy_HOP", " ", bac, 1., bac2);
7715  h_RatioOccupancy_HOM = fs_->make<TH1F>("h_RatioOccupancy_HOM", " ", bac, 1., bac2);
7716  h_RatioOccupancy_HFP = fs_->make<TH1F>("h_RatioOccupancy_HFP", " ", bac, 1., bac2);
7717  h_RatioOccupancy_HFM = fs_->make<TH1F>("h_RatioOccupancy_HFM", " ", bac, 1., bac2);
7718 
7719  h_sumAmplLS7 = fs_->make<TH1F>("h_sumAmplLS7", " ", 100, 0.0, lsdep_estimator5_HFdepth2_);
7720  h_2DsumAmplLS7 = fs_->make<TH2F>("h_2DsumAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7721  h_sumAmplperLS7 = fs_->make<TH1F>("h_sumAmplperLS7", " ", bac, 1., bac2);
7722  h_sumCutAmplperLS7 = fs_->make<TH1F>("h_sumCutAmplperLS7", " ", bac, 1., bac2);
7723  h_2D0sumAmplLS7 = fs_->make<TH2F>("h_2D0sumAmplLS7", " ", neta, -41., 41., nphi, 0., bphi);
7724  h_sum0AmplperLS7 = fs_->make<TH1F>("h_sum0AmplperLS7", " ", bac, 1., bac2);
7725 
7726  h_sumAmplLS8 = fs_->make<TH1F>("h_sumAmplLS8", " ", 100, 0.0, lsdep_estimator5_HOdepth4_);
7727  h_2DsumAmplLS8 = fs_->make<TH2F>("h_2DsumAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7728  h_sumAmplperLS8 = fs_->make<TH1F>("h_sumAmplperLS8", " ", bac, 1., bac2);
7729  h_sumCutAmplperLS8 = fs_->make<TH1F>("h_sumCutAmplperLS8", " ", bac, 1., bac2);
7730  h_2D0sumAmplLS8 = fs_->make<TH2F>("h_2D0sumAmplLS8", " ", neta, -41., 41., nphi, 0., bphi);
7731  h_sum0AmplperLS8 = fs_->make<TH1F>("h_sum0AmplperLS8", " ", bac, 1., bac2);
7732  //--------------------------------------------------
7733  // for estimator6:
7734  h_sumErrorBLS1 = fs_->make<TH1F>("h_sumErrorBLS1", " ", 10, 0., 10.);
7735  h_sumErrorBperLS1 = fs_->make<TH1F>("h_sumErrorBperLS1", " ", bac, 1., bac2);
7736  h_sum0ErrorBperLS1 = fs_->make<TH1F>("h_sum0ErrorBperLS1", " ", bac, 1., bac2);
7737  h_2D0sumErrorBLS1 = fs_->make<TH2F>("h_2D0sumErrorBLS1", " ", neta, -41., 41., nphi, 0., bphi);
7738  h_2DsumErrorBLS1 = fs_->make<TH2F>("h_2DsumErrorBLS1", " ", neta, -41., 41., nphi, 0., bphi);
7739  h_sumErrorBLS2 = fs_->make<TH1F>("h_sumErrorBLS2", " ", 10, 0., 10.);
7740  h_sumErrorBperLS2 = fs_->make<TH1F>("h_sumErrorBperLS2", " ", bac, 1., bac2);
7741  h_sum0ErrorBperLS2 = fs_->make<TH1F>("h_sum0ErrorBperLS2", " ", bac, 1., bac2);
7742  h_2D0sumErrorBLS2 = fs_->make<TH2F>("h_2D0sumErrorBLS2", " ", neta, -41., 41., nphi, 0., bphi);
7743  h_2DsumErrorBLS2 = fs_->make<TH2F>("h_2DsumErrorBLS2", " ", neta, -41., 41., nphi, 0., bphi);
7744 
7745  h_sumErrorBLS3 = fs_->make<TH1F>("h_sumErrorBLS3", " ", 10, 0., 10.);
7746  h_sumErrorBperLS3 = fs_->make<TH1F>("h_sumErrorBperLS3", " ", bac, 1., bac2);
7747  h_sum0ErrorBperLS3 = fs_->make<TH1F>("h_sum0ErrorBperLS3", " ", bac, 1., bac2);
7748  h_2D0sumErrorBLS3 = fs_->make<TH2F>("h_2D0sumErrorBLS3", " ", neta, -41., 41., nphi, 0., bphi);
7749  h_2DsumErrorBLS3 = fs_->make<TH2F>("h_2DsumErrorBLS3", " ", neta, -41., 41., nphi, 0., bphi);
7750  h_sumErrorBLS4 = fs_->make<TH1F>("h_sumErrorBLS4", " ", 10, 0., 10.);
7751  h_sumErrorBperLS4 = fs_->make<TH1F>("h_sumErrorBperLS4", " ", bac, 1., bac2);
7752  h_sum0ErrorBperLS4 = fs_->make<TH1F>("h_sum0ErrorBperLS4", " ", bac, 1., bac2);
7753  h_2D0sumErrorBLS4 = fs_->make<TH2F>("h_2D0sumErrorBLS4", " ", neta, -41., 41., nphi, 0., bphi);
7754  h_2DsumErrorBLS4 = fs_->make<TH2F>("h_2DsumErrorBLS4", " ", neta, -41., 41., nphi, 0., bphi);
7755  h_sumErrorBLS5 = fs_->make<TH1F>("h_sumErrorBLS5", " ", 10, 0., 10.);
7756  h_sumErrorBperLS5 = fs_->make<TH1F>("h_sumErrorBperLS5", " ", bac, 1., bac2);
7757  h_sum0ErrorBperLS5 = fs_->make<TH1F>("h_sum0ErrorBperLS5", " ", bac, 1., bac2);
7758  h_2D0sumErrorBLS5 = fs_->make<TH2F>("h_2D0sumErrorBLS5", " ", neta, -41., 41., nphi, 0., bphi);
7759  h_2DsumErrorBLS5 = fs_->make<TH2F>("h_2DsumErrorBLS5", " ", neta, -41., 41., nphi, 0., bphi);
7760 
7761  h_sumErrorBLS6 = fs_->make<TH1F>("h_sumErrorBLS6", " ", 10, 0., 10.);
7762  h_sumErrorBperLS6 = fs_->make<TH1F>("h_sumErrorBperLS6", " ", bac, 1., bac2);
7763  h_sum0ErrorBperLS6 = fs_->make<TH1F>("h_sum0ErrorBperLS6", " ", bac, 1., bac2);
7764  h_2D0sumErrorBLS6 = fs_->make<TH2F>("h_2D0sumErrorBLS6", " ", neta, -41., 41., nphi, 0., bphi);
7765  h_2DsumErrorBLS6 = fs_->make<TH2F>("h_2DsumErrorBLS6", " ", neta, -41., 41., nphi, 0., bphi);
7766  h_sumErrorBLS7 = fs_->make<TH1F>("h_sumErrorBLS7", " ", 10, 0., 10.);
7767  h_sumErrorBperLS7 = fs_->make<TH1F>("h_sumErrorBperLS7", " ", bac, 1., bac2);
7768  h_sum0ErrorBperLS7 = fs_->make<TH1F>("h_sum0ErrorBperLS7", " ", bac, 1., bac2);
7769  h_2D0sumErrorBLS7 = fs_->make<TH2F>("h_2D0sumErrorBLS7", " ", neta, -41., 41., nphi, 0., bphi);
7770  h_2DsumErrorBLS7 = fs_->make<TH2F>("h_2DsumErrorBLS7", " ", neta, -41., 41., nphi, 0., bphi);
7771 
7772  h_sumErrorBLS8 = fs_->make<TH1F>("h_sumErrorBLS8", " ", 10, 0., 10.);
7773  h_sumErrorBperLS8 = fs_->make<TH1F>("h_sumErrorBperLS8", " ", bac, 1., bac2);
7774  h_sum0ErrorBperLS8 = fs_->make<TH1F>("h_sum0ErrorBperLS8", " ", bac, 1., bac2);
7775  h_2D0sumErrorBLS8 = fs_->make<TH2F>("h_2D0sumErrorBLS8", " ", neta, -41., 41., nphi, 0., bphi);
7776  h_2DsumErrorBLS8 = fs_->make<TH2F>("h_2DsumErrorBLS8", " ", neta, -41., 41., nphi, 0., bphi);
7777 
7778  //--------------------------------------------------
7779  // for averSIGNALOCCUPANCY :
7780  h_averSIGNALoccupancy_HB = fs_->make<TH1F>("h_averSIGNALoccupancy_HB", " ", bac, 1., bac2);
7781  h_averSIGNALoccupancy_HE = fs_->make<TH1F>("h_averSIGNALoccupancy_HE", " ", bac, 1., bac2);
7782  h_averSIGNALoccupancy_HF = fs_->make<TH1F>("h_averSIGNALoccupancy_HF", " ", bac, 1., bac2);
7783  h_averSIGNALoccupancy_HO = fs_->make<TH1F>("h_averSIGNALoccupancy_HO", " ", bac, 1., bac2);
7784 
7785  // for averSIGNALsumamplitude :
7786  h_averSIGNALsumamplitude_HB = fs_->make<TH1F>("h_averSIGNALsumamplitude_HB", " ", bac, 1., bac2);
7787  h_averSIGNALsumamplitude_HE = fs_->make<TH1F>("h_averSIGNALsumamplitude_HE", " ", bac, 1., bac2);
7788  h_averSIGNALsumamplitude_HF = fs_->make<TH1F>("h_averSIGNALsumamplitude_HF", " ", bac, 1., bac2);
7789  h_averSIGNALsumamplitude_HO = fs_->make<TH1F>("h_averSIGNALsumamplitude_HO", " ", bac, 1., bac2);
7790 
7791  // for averNOSIGNALOCCUPANCY :
7792  h_averNOSIGNALoccupancy_HB = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HB", " ", bac, 1., bac2);
7793  h_averNOSIGNALoccupancy_HE = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HE", " ", bac, 1., bac2);
7794  h_averNOSIGNALoccupancy_HF = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HF", " ", bac, 1., bac2);
7795  h_averNOSIGNALoccupancy_HO = fs_->make<TH1F>("h_averNOSIGNALoccupancy_HO", " ", bac, 1., bac2);
7796 
7797  // for averNOSIGNALsumamplitude :
7798  h_averNOSIGNALsumamplitude_HB = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HB", " ", bac, 1., bac2);
7799  h_averNOSIGNALsumamplitude_HE = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HE", " ", bac, 1., bac2);
7800  h_averNOSIGNALsumamplitude_HF = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HF", " ", bac, 1., bac2);
7801  h_averNOSIGNALsumamplitude_HO = fs_->make<TH1F>("h_averNOSIGNALsumamplitude_HO", " ", bac, 1., bac2);
7802 
7803  // for channel SUM over depthes Amplitudes for each sub-detector
7804  h_sumamplitudechannel_HB = fs_->make<TH1F>("h_sumamplitudechannel_HB", " ", 100, 0., 10000.);
7805  h_sumamplitudechannel_HE = fs_->make<TH1F>("h_sumamplitudechannel_HE", " ", 100, 0., 10000.);
7806  h_sumamplitudechannel_HF = fs_->make<TH1F>("h_sumamplitudechannel_HF", " ", 100, 0., 10000.);
7807  h_sumamplitudechannel_HO = fs_->make<TH1F>("h_sumamplitudechannel_HO", " ", 100, 0., 10000.);
7808 
7809  // for event Amplitudes for each sub-detector
7810  h_eventamplitude_HB = fs_->make<TH1F>("h_eventamplitude_HB", " ", 100, 0., 300000.);
7811  h_eventamplitude_HE = fs_->make<TH1F>("h_eventamplitude_HE", " ", 100, 0., 300000.);
7812  h_eventamplitude_HF = fs_->make<TH1F>("h_eventamplitude_HF", " ", 100, 0., 300000.);
7813  h_eventamplitude_HO = fs_->make<TH1F>("h_eventamplitude_HO", " ", 100, 0., 250000.);
7814 
7815  // for event Occupancy for each sub-detector
7816  h_eventoccupancy_HB = fs_->make<TH1F>("h_eventoccupancy_HB", " ", 100, 0., 3000.);
7817  h_eventoccupancy_HE = fs_->make<TH1F>("h_eventoccupancy_HE", " ", 100, 0., 2000.);
7818  h_eventoccupancy_HF = fs_->make<TH1F>("h_eventoccupancy_HF", " ", 100, 0., 1000.);
7819  h_eventoccupancy_HO = fs_->make<TH1F>("h_eventoccupancy_HO", " ", 100, 0., 2500.);
7820 
7821  // for maxxSUMAmplitude
7822  h_maxxSUMAmpl_HB = fs_->make<TH1F>("h_maxxSUMAmpl_HB", " ", bac, 1., bac2);
7823  h_maxxSUMAmpl_HE = fs_->make<TH1F>("h_maxxSUMAmpl_HE", " ", bac, 1., bac2);
7824  h_maxxSUMAmpl_HF = fs_->make<TH1F>("h_maxxSUMAmpl_HF", " ", bac, 1., bac2);
7825  h_maxxSUMAmpl_HO = fs_->make<TH1F>("h_maxxSUMAmpl_HO", " ", bac, 1., bac2);
7826 
7827  // for maxxOCCUP
7828  h_maxxOCCUP_HB = fs_->make<TH1F>("h_maxxOCCUP_HB", " ", bac, 1., bac2);
7829  h_maxxOCCUP_HE = fs_->make<TH1F>("h_maxxOCCUP_HE", " ", bac, 1., bac2);
7830  h_maxxOCCUP_HF = fs_->make<TH1F>("h_maxxOCCUP_HF", " ", bac, 1., bac2);
7831  h_maxxOCCUP_HO = fs_->make<TH1F>("h_maxxOCCUP_HO", " ", bac, 1., bac2);
7832  //--------------------------------------------------
7833  // pedestals
7834  h_pedestal0_HB = fs_->make<TH1F>("h_pedestal0_HB", " ", 100, 0., 10.);
7835  h_pedestal1_HB = fs_->make<TH1F>("h_pedestal1_HB", " ", 100, 0., 10.);
7836  h_pedestal2_HB = fs_->make<TH1F>("h_pedestal2_HB", " ", 100, 0., 10.);
7837  h_pedestal3_HB = fs_->make<TH1F>("h_pedestal3_HB", " ", 100, 0., 10.);
7838  h_pedestalaver4_HB = fs_->make<TH1F>("h_pedestalaver4_HB", " ", 100, 0., 10.);
7839  h_pedestalaver9_HB = fs_->make<TH1F>("h_pedestalaver9_HB", " ", 100, 0., 10.);
7840  h_pedestalw0_HB = fs_->make<TH1F>("h_pedestalw0_HB", " ", 100, 0., 2.5);
7841  h_pedestalw1_HB = fs_->make<TH1F>("h_pedestalw1_HB", " ", 100, 0., 2.5);
7842  h_pedestalw2_HB = fs_->make<TH1F>("h_pedestalw2_HB", " ", 100, 0., 2.5);
7843  h_pedestalw3_HB = fs_->make<TH1F>("h_pedestalw3_HB", " ", 100, 0., 2.5);
7844  h_pedestalwaver4_HB = fs_->make<TH1F>("h_pedestalwaver4_HB", " ", 100, 0., 2.5);
7845  h_pedestalwaver9_HB = fs_->make<TH1F>("h_pedestalwaver9_HB", " ", 100, 0., 2.5);
7846 
7847  h_pedestal0_HE = fs_->make<TH1F>("h_pedestal0_HE", " ", 100, 0., 10.);
7848  h_pedestal1_HE = fs_->make<TH1F>("h_pedestal1_HE", " ", 100, 0., 10.);
7849  h_pedestal2_HE = fs_->make<TH1F>("h_pedestal2_HE", " ", 100, 0., 10.);
7850  h_pedestal3_HE = fs_->make<TH1F>("h_pedestal3_HE", " ", 100, 0., 10.);
7851  h_pedestalaver4_HE = fs_->make<TH1F>("h_pedestalaver4_HE", " ", 100, 0., 10.);
7852  h_pedestalaver9_HE = fs_->make<TH1F>("h_pedestalaver9_HE", " ", 100, 0., 10.);
7853  h_pedestalw0_HE = fs_->make<TH1F>("h_pedestalw0_HE", " ", 100, 0., 2.5);
7854  h_pedestalw1_HE = fs_->make<TH1F>("h_pedestalw1_HE", " ", 100, 0., 2.5);
7855  h_pedestalw2_HE = fs_->make<TH1F>("h_pedestalw2_HE", " ", 100, 0., 2.5);
7856  h_pedestalw3_HE = fs_->make<TH1F>("h_pedestalw3_HE", " ", 100, 0., 2.5);
7857  h_pedestalwaver4_HE = fs_->make<TH1F>("h_pedestalwaver4_HE", " ", 100, 0., 2.5);
7858  h_pedestalwaver9_HE = fs_->make<TH1F>("h_pedestalwaver9_HE", " ", 100, 0., 2.5);
7859 
7860  h_pedestal0_HF = fs_->make<TH1F>("h_pedestal0_HF", " ", 100, 0., 20.);
7861  h_pedestal1_HF = fs_->make<TH1F>("h_pedestal1_HF", " ", 100, 0., 20.);
7862  h_pedestal2_HF = fs_->make<TH1F>("h_pedestal2_HF", " ", 100, 0., 20.);
7863  h_pedestal3_HF = fs_->make<TH1F>("h_pedestal3_HF", " ", 100, 0., 20.);
7864  h_pedestalaver4_HF = fs_->make<TH1F>("h_pedestalaver4_HF", " ", 100, 0., 20.);
7865  h_pedestalaver9_HF = fs_->make<TH1F>("h_pedestalaver9_HF", " ", 100, 0., 20.);
7866  h_pedestalw0_HF = fs_->make<TH1F>("h_pedestalw0_HF", " ", 100, 0., 2.5);
7867  h_pedestalw1_HF = fs_->make<TH1F>("h_pedestalw1_HF", " ", 100, 0., 2.5);
7868  h_pedestalw2_HF = fs_->make<TH1F>("h_pedestalw2_HF", " ", 100, 0., 2.5);
7869  h_pedestalw3_HF = fs_->make<TH1F>("h_pedestalw3_HF", " ", 100, 0., 2.5);
7870  h_pedestalwaver4_HF = fs_->make<TH1F>("h_pedestalwaver4_HF", " ", 100, 0., 2.5);
7871  h_pedestalwaver9_HF = fs_->make<TH1F>("h_pedestalwaver9_HF", " ", 100, 0., 2.5);
7872 
7873  h_pedestal0_HO = fs_->make<TH1F>("h_pedestal0_HO", " ", 100, 0., 20.);
7874  h_pedestal1_HO = fs_->make<TH1F>("h_pedestal1_HO", " ", 100, 0., 20.);
7875  h_pedestal2_HO = fs_->make<TH1F>("h_pedestal2_HO", " ", 100, 0., 20.);
7876  h_pedestal3_HO = fs_->make<TH1F>("h_pedestal3_HO", " ", 100, 0., 20.);
7877  h_pedestalaver4_HO = fs_->make<TH1F>("h_pedestalaver4_HO", " ", 100, 0., 20.);
7878  h_pedestalaver9_HO = fs_->make<TH1F>("h_pedestalaver9_HO", " ", 100, 0., 20.);
7879  h_pedestalw0_HO = fs_->make<TH1F>("h_pedestalw0_HO", " ", 100, 0., 2.5);
7880  h_pedestalw1_HO = fs_->make<TH1F>("h_pedestalw1_HO", " ", 100, 0., 2.5);
7881  h_pedestalw2_HO = fs_->make<TH1F>("h_pedestalw2_HO", " ", 100, 0., 2.5);
7882  h_pedestalw3_HO = fs_->make<TH1F>("h_pedestalw3_HO", " ", 100, 0., 2.5);
7883  h_pedestalwaver4_HO = fs_->make<TH1F>("h_pedestalwaver4_HO", " ", 100, 0., 2.5);
7884  h_pedestalwaver9_HO = fs_->make<TH1F>("h_pedestalwaver9_HO", " ", 100, 0., 2.5);
7885  //--------------------------------------------------
7886  h_mapDepth1pedestalw_HB = fs_->make<TH2F>("h_mapDepth1pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7887  h_mapDepth2pedestalw_HB = fs_->make<TH2F>("h_mapDepth2pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7888  h_mapDepth3pedestalw_HB = fs_->make<TH2F>("h_mapDepth3pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7889  h_mapDepth4pedestalw_HB = fs_->make<TH2F>("h_mapDepth4pedestalw_HB", " ", neta, -41., 41., nphi, 0., bphi);
7890  h_mapDepth1pedestalw_HE = fs_->make<TH2F>("h_mapDepth1pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7891  h_mapDepth2pedestalw_HE = fs_->make<TH2F>("h_mapDepth2pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7892  h_mapDepth3pedestalw_HE = fs_->make<TH2F>("h_mapDepth3pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7893  h_mapDepth4pedestalw_HE = fs_->make<TH2F>("h_mapDepth4pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7894  h_mapDepth5pedestalw_HE = fs_->make<TH2F>("h_mapDepth5pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7895  h_mapDepth6pedestalw_HE = fs_->make<TH2F>("h_mapDepth6pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7896  h_mapDepth7pedestalw_HE = fs_->make<TH2F>("h_mapDepth7pedestalw_HE", " ", neta, -41., 41., nphi, 0., bphi);
7897  h_mapDepth1pedestalw_HF = fs_->make<TH2F>("h_mapDepth1pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7898  h_mapDepth2pedestalw_HF = fs_->make<TH2F>("h_mapDepth2pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7899  h_mapDepth3pedestalw_HF = fs_->make<TH2F>("h_mapDepth3pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7900  h_mapDepth4pedestalw_HF = fs_->make<TH2F>("h_mapDepth4pedestalw_HF", " ", neta, -41., 41., nphi, 0., bphi);
7901  h_mapDepth4pedestalw_HO = fs_->make<TH2F>("h_mapDepth4pedestalw_HO", " ", neta, -41., 41., nphi, 0., bphi);
7902 
7903  h_mapDepth1pedestal_HB = fs_->make<TH2F>("h_mapDepth1pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7904  h_mapDepth2pedestal_HB = fs_->make<TH2F>("h_mapDepth2pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7905  h_mapDepth3pedestal_HB = fs_->make<TH2F>("h_mapDepth3pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7906  h_mapDepth4pedestal_HB = fs_->make<TH2F>("h_mapDepth4pedestal_HB", " ", neta, -41., 41., nphi, 0., bphi);
7907  h_mapDepth1pedestal_HE = fs_->make<TH2F>("h_mapDepth1pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7908  h_mapDepth2pedestal_HE = fs_->make<TH2F>("h_mapDepth2pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7909  h_mapDepth3pedestal_HE = fs_->make<TH2F>("h_mapDepth3pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7910  h_mapDepth4pedestal_HE = fs_->make<TH2F>("h_mapDepth4pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7911  h_mapDepth5pedestal_HE = fs_->make<TH2F>("h_mapDepth5pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7912  h_mapDepth6pedestal_HE = fs_->make<TH2F>("h_mapDepth6pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7913  h_mapDepth7pedestal_HE = fs_->make<TH2F>("h_mapDepth7pedestal_HE", " ", neta, -41., 41., nphi, 0., bphi);
7914  h_mapDepth1pedestal_HF = fs_->make<TH2F>("h_mapDepth1pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7915  h_mapDepth2pedestal_HF = fs_->make<TH2F>("h_mapDepth2pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7916  h_mapDepth3pedestal_HF = fs_->make<TH2F>("h_mapDepth3pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7917  h_mapDepth4pedestal_HF = fs_->make<TH2F>("h_mapDepth4pedestal_HF", " ", neta, -41., 41., nphi, 0., bphi);
7918  h_mapDepth4pedestal_HO = fs_->make<TH2F>("h_mapDepth4pedestal_HO", " ", neta, -41., 41., nphi, 0., bphi);
7919  //--------------------------------------------------
7920  h_pedestal00_HB = fs_->make<TH1F>("h_pedestal00_HB", " ", 100, 0., 10.);
7921  h_gain_HB = fs_->make<TH1F>("h_gain_HB", " ", 100, 0., 1.);
7922  h_respcorr_HB = fs_->make<TH1F>("h_respcorr_HB", " ", 100, 0., 2.5);
7923  h_timecorr_HB = fs_->make<TH1F>("h_timecorr_HB", " ", 100, 0., 30.);
7924  h_lutcorr_HB = fs_->make<TH1F>("h_lutcorr_HB", " ", 100, 0., 10.);
7925  h_difpedestal0_HB = fs_->make<TH1F>("h_difpedestal0_HB", " ", 100, -3., 3.);
7926  h_difpedestal1_HB = fs_->make<TH1F>("h_difpedestal1_HB", " ", 100, -3., 3.);
7927  h_difpedestal2_HB = fs_->make<TH1F>("h_difpedestal2_HB", " ", 100, -3., 3.);
7928  h_difpedestal3_HB = fs_->make<TH1F>("h_difpedestal3_HB", " ", 100, -3., 3.);
7929 
7930  h_pedestal00_HE = fs_->make<TH1F>("h_pedestal00_HE", " ", 100, 0., 10.);
7931  h_gain_HE = fs_->make<TH1F>("h_gain_HE", " ", 100, 0., 1.);
7932  h_respcorr_HE = fs_->make<TH1F>("h_respcorr_HE", " ", 100, 0., 2.5);
7933  h_timecorr_HE = fs_->make<TH1F>("h_timecorr_HE", " ", 100, 0., 30.);
7934  h_lutcorr_HE = fs_->make<TH1F>("h_lutcorr_HE", " ", 100, 0., 10.);
7935 
7936  h_pedestal00_HF = fs_->make<TH1F>("h_pedestal00_HF", " ", 100, 0., 10.);
7937  h_gain_HF = fs_->make<TH1F>("h_gain_HF", " ", 100, 0., 1.);
7938  h_respcorr_HF = fs_->make<TH1F>("h_respcorr_HF", " ", 100, 0., 2.5);
7939  h_timecorr_HF = fs_->make<TH1F>("h_timecorr_HF", " ", 100, 0., 30.);
7940  h_lutcorr_HF = fs_->make<TH1F>("h_lutcorr_HF", " ", 100, 0., 10.);
7941 
7942  h_pedestal00_HO = fs_->make<TH1F>("h_pedestal00_HO", " ", 100, 0., 10.);
7943  h_gain_HO = fs_->make<TH1F>("h_gain_HO", " ", 100, 0., 1.);
7944  h_respcorr_HO = fs_->make<TH1F>("h_respcorr_HO", " ", 100, 0., 2.5);
7945  h_timecorr_HO = fs_->make<TH1F>("h_timecorr_HO", " ", 100, 0., 30.);
7946  h_lutcorr_HO = fs_->make<TH1F>("h_lutcorr_HO", " ", 100, 0., 10.);
7947  //--------------------------------------------------
7948  h2_TSnVsAyear2023_HB = fs_->make<TH2F>("h2_TSnVsAyear2023_HB", " ", 100, 200., 30200., 100, 0., 175.);
7949  h2_TSnVsAyear2023_HE = fs_->make<TH2F>("h2_TSnVsAyear2023_HE", " ", 100, 200., 75200., 100, 0., 175.);
7950  h2_TSnVsAyear2023_HF = fs_->make<TH2F>("h2_TSnVsAyear2023_HF", " ", 100, 0., 2000., 100, 0., 50.);
7951  h2_TSnVsAyear2023_HO = fs_->make<TH2F>("h2_TSnVsAyear2023_HO", " ", 100, 0., 1000., 100, 0., 225.);
7952  //-----------------------------
7953  h1_TSnVsAyear2023_HB = fs_->make<TH1F>("h1_TSnVsAyear2023_HB", " ", 100, 200., 15200);
7954  h1_TSnVsAyear2023_HE = fs_->make<TH1F>("h1_TSnVsAyear2023_HE", " ", 100, 200., 25200);
7955  h1_TSnVsAyear2023_HF = fs_->make<TH1F>("h1_TSnVsAyear2023_HF", " ", 100, 0., 1500);
7956  h1_TSnVsAyear2023_HO = fs_->make<TH1F>("h1_TSnVsAyear2023_HO", " ", 100, 0., 750);
7957  h1_TSnVsAyear20230_HB = fs_->make<TH1F>("h1_TSnVsAyear20230_HB", " ", 100, 200., 15200);
7958  h1_TSnVsAyear20230_HE = fs_->make<TH1F>("h1_TSnVsAyear20230_HE", " ", 100, 200., 25200);
7959  h1_TSnVsAyear20230_HF = fs_->make<TH1F>("h1_TSnVsAyear20230_HF", " ", 100, 0., 1500);
7960  h1_TSnVsAyear20230_HO = fs_->make<TH1F>("h1_TSnVsAyear20230_HO", " ", 100, 0., 750);
7961  //--------------------------------------------------
7962  float est6 = 2500.;
7963  int ist6 = 30;
7964  int ist2 = 60;
7965  h2_pedvsampl_HB = fs_->make<TH2F>("h2_pedvsampl_HB", " ", ist2, 0., 7.0, ist2, 0., est6);
7966  h2_pedwvsampl_HB = fs_->make<TH2F>("h2_pedwvsampl_HB", " ", ist2, 0., 2.5, ist2, 0., est6);
7967  h_pedvsampl_HB = fs_->make<TH1F>("h_pedvsampl_HB", " ", ist6, 0., 7.0);
7968  h_pedwvsampl_HB = fs_->make<TH1F>("h_pedwvsampl_HB", " ", ist6, 0., 2.5);
7969  h_pedvsampl0_HB = fs_->make<TH1F>("h_pedvsampl0_HB", " ", ist6, 0., 7.);
7970  h_pedwvsampl0_HB = fs_->make<TH1F>("h_pedwvsampl0_HB", " ", ist6, 0., 2.5);
7971  h2_amplvsped_HB = fs_->make<TH2F>("h2_amplvsped_HB", " ", ist2, 0., est6, ist2, 0., 7.0);
7972  h2_amplvspedw_HB = fs_->make<TH2F>("h2_amplvspedw_HB", " ", ist2, 0., est6, ist2, 0., 2.5);
7973  h_amplvsped_HB = fs_->make<TH1F>("h_amplvsped_HB", " ", ist6, 0., est6);
7974  h_amplvspedw_HB = fs_->make<TH1F>("h_amplvspedw_HB", " ", ist6, 0., est6);
7975  h_amplvsped0_HB = fs_->make<TH1F>("h_amplvsped0_HB", " ", ist6, 0., est6);
7976 
7977  h2_pedvsampl_HE = fs_->make<TH2F>("h2_pedvsampl_HE", " ", ist2, 0., 7.0, ist2, 0., est6);
7978  h2_pedwvsampl_HE = fs_->make<TH2F>("h2_pedwvsampl_HE", " ", ist2, 0., 2.5, ist2, 0., est6);
7979  h_pedvsampl_HE = fs_->make<TH1F>("h_pedvsampl_HE", " ", ist6, 0., 7.0);
7980  h_pedwvsampl_HE = fs_->make<TH1F>("h_pedwvsampl_HE", " ", ist6, 0., 2.5);
7981  h_pedvsampl0_HE = fs_->make<TH1F>("h_pedvsampl0_HE", " ", ist6, 0., 7.);
7982  h_pedwvsampl0_HE = fs_->make<TH1F>("h_pedwvsampl0_HE", " ", ist6, 0., 2.5);
7983 
7984  h2_pedvsampl_HF = fs_->make<TH2F>("h2_pedvsampl_HF", " ", ist2, 0., 20.0, ist2, 0., est6);
7985  h2_pedwvsampl_HF = fs_->make<TH2F>("h2_pedwvsampl_HF", " ", ist2, 0., 2.0, ist2, 0., est6);
7986  h_pedvsampl_HF = fs_->make<TH1F>("h_pedvsampl_HF", " ", ist6, 0., 20.0);
7987  h_pedwvsampl_HF = fs_->make<TH1F>("h_pedwvsampl_HF", " ", ist6, 0., 2.0);
7988  h_pedvsampl0_HF = fs_->make<TH1F>("h_pedvsampl0_HF", " ", ist6, 0., 20.);
7989  h_pedwvsampl0_HF = fs_->make<TH1F>("h_pedwvsampl0_HF", " ", ist6, 0., 2.0);
7990 
7991  h2_pedvsampl_HO = fs_->make<TH2F>("h2_pedvsampl_HO", " ", ist2, 0., 20.0, ist2, 0., est6);
7992  h2_pedwvsampl_HO = fs_->make<TH2F>("h2_pedwvsampl_HO", " ", ist2, 0., 2.5, ist2, 0., est6);
7993  h_pedvsampl_HO = fs_->make<TH1F>("h_pedvsampl_HO", " ", ist6, 0., 20.0);
7994  h_pedwvsampl_HO = fs_->make<TH1F>("h_pedwvsampl_HO", " ", ist6, 0., 2.5);
7995  h_pedvsampl0_HO = fs_->make<TH1F>("h_pedvsampl0_HO", " ", ist6, 0., 20.);
7996  h_pedwvsampl0_HO = fs_->make<TH1F>("h_pedwvsampl0_HO", " ", ist6, 0., 2.5);
7997  //--------------------------------------------------
7998  h_mapDepth1Ped0_HB = fs_->make<TH2F>("h_mapDepth1Ped0_HB", " ", neta, -41., 41., nphi, 0., bphi);
7999  h_mapDepth1Ped1_HB = fs_->make<TH2F>("h_mapDepth1Ped1_HB", " ", neta, -41., 41., nphi, 0., bphi);
8000  h_mapDepth1Ped2_HB = fs_->make<TH2F>("h_mapDepth1Ped2_HB", " ", neta, -41., 41., nphi, 0., bphi);
8001  h_mapDepth1Ped3_HB = fs_->make<TH2F>("h_mapDepth1Ped3_HB", " ", neta, -41., 41., nphi, 0., bphi);
8002  h_mapDepth1Pedw0_HB = fs_->make<TH2F>("h_mapDepth1Pedw0_HB", " ", neta, -41., 41., nphi, 0., bphi);
8003  h_mapDepth1Pedw1_HB = fs_->make<TH2F>("h_mapDepth1Pedw1_HB", " ", neta, -41., 41., nphi, 0., bphi);
8004  h_mapDepth1Pedw2_HB = fs_->make<TH2F>("h_mapDepth1Pedw2_HB", " ", neta, -41., 41., nphi, 0., bphi);
8005  h_mapDepth1Pedw3_HB = fs_->make<TH2F>("h_mapDepth1Pedw3_HB", " ", neta, -41., 41., nphi, 0., bphi);
8006  h_mapDepth2Ped0_HB = fs_->make<TH2F>("h_mapDepth2Ped0_HB", " ", neta, -41., 41., nphi, 0., bphi);
8007  h_mapDepth2Ped1_HB = fs_->make<TH2F>("h_mapDepth2Ped1_HB", " ", neta, -41., 41., nphi, 0., bphi);
8008  h_mapDepth2Ped2_HB = fs_->make<TH2F>("h_mapDepth2Ped2_HB", " ", neta, -41., 41., nphi, 0., bphi);
8009  h_mapDepth2Ped3_HB = fs_->make<TH2F>("h_mapDepth2Ped3_HB", " ", neta, -41., 41., nphi, 0., bphi);
8010  h_mapDepth2Pedw0_HB = fs_->make<TH2F>("h_mapDepth2Pedw0_HB", " ", neta, -41., 41., nphi, 0., bphi);
8011  h_mapDepth2Pedw1_HB = fs_->make<TH2F>("h_mapDepth2Pedw1_HB", " ", neta, -41., 41., nphi, 0., bphi);
8012  h_mapDepth2Pedw2_HB = fs_->make<TH2F>("h_mapDepth2Pedw2_HB", " ", neta, -41., 41., nphi, 0., bphi);
8013  h_mapDepth2Pedw3_HB = fs_->make<TH2F>("h_mapDepth2Pedw3_HB", " ", neta, -41., 41., nphi, 0., bphi);
8014 
8015  h_mapDepth1Ped0_HE = fs_->make<TH2F>("h_mapDepth1Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
8016  h_mapDepth1Ped1_HE = fs_->make<TH2F>("h_mapDepth1Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
8017  h_mapDepth1Ped2_HE = fs_->make<TH2F>("h_mapDepth1Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
8018  h_mapDepth1Ped3_HE = fs_->make<TH2F>("h_mapDepth1Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
8019  h_mapDepth1Pedw0_HE = fs_->make<TH2F>("h_mapDepth1Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
8020  h_mapDepth1Pedw1_HE = fs_->make<TH2F>("h_mapDepth1Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
8021  h_mapDepth1Pedw2_HE = fs_->make<TH2F>("h_mapDepth1Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
8022  h_mapDepth1Pedw3_HE = fs_->make<TH2F>("h_mapDepth1Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
8023  h_mapDepth2Ped0_HE = fs_->make<TH2F>("h_mapDepth2Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
8024  h_mapDepth2Ped1_HE = fs_->make<TH2F>("h_mapDepth2Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
8025  h_mapDepth2Ped2_HE = fs_->make<TH2F>("h_mapDepth2Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
8026  h_mapDepth2Ped3_HE = fs_->make<TH2F>("h_mapDepth2Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
8027  h_mapDepth2Pedw0_HE = fs_->make<TH2F>("h_mapDepth2Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
8028  h_mapDepth2Pedw1_HE = fs_->make<TH2F>("h_mapDepth2Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
8029  h_mapDepth2Pedw2_HE = fs_->make<TH2F>("h_mapDepth2Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
8030  h_mapDepth2Pedw3_HE = fs_->make<TH2F>("h_mapDepth2Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
8031  h_mapDepth3Ped0_HE = fs_->make<TH2F>("h_mapDepth3Ped0_HE", " ", neta, -41., 41., nphi, 0., bphi);
8032  h_mapDepth3Ped1_HE = fs_->make<TH2F>("h_mapDepth3Ped1_HE", " ", neta, -41., 41., nphi, 0., bphi);
8033  h_mapDepth3Ped2_HE = fs_->make<TH2F>("h_mapDepth3Ped2_HE", " ", neta, -41., 41., nphi, 0., bphi);
8034  h_mapDepth3Ped3_HE = fs_->make<TH2F>("h_mapDepth3Ped3_HE", " ", neta, -41., 41., nphi, 0., bphi);
8035  h_mapDepth3Pedw0_HE = fs_->make<TH2F>("h_mapDepth3Pedw0_HE", " ", neta, -41., 41., nphi, 0., bphi);
8036  h_mapDepth3Pedw1_HE = fs_->make<TH2F>("h_mapDepth3Pedw1_HE", " ", neta, -41., 41., nphi, 0., bphi);
8037  h_mapDepth3Pedw2_HE = fs_->make<TH2F>("h_mapDepth3Pedw2_HE", " ", neta, -41., 41., nphi, 0., bphi);
8038  h_mapDepth3Pedw3_HE = fs_->make<TH2F>("h_mapDepth3Pedw3_HE", " ", neta, -41., 41., nphi, 0., bphi);
8039 
8040  h_mapDepth1Ped0_HF = fs_->make<TH2F>("h_mapDepth1Ped0_HF", " ", neta, -41., 41., nphi, 0., bphi);
8041  h_mapDepth1Ped1_HF = fs_->make<TH2F>("h_mapDepth1Ped1_HF", " ", neta, -41., 41., nphi, 0., bphi);
8042  h_mapDepth1Ped2_HF = fs_->make<TH2F>("h_mapDepth1Ped2_HF", " ", neta, -41., 41., nphi, 0., bphi);
8043  h_mapDepth1Ped3_HF = fs_->make<TH2F>("h_mapDepth1Ped3_HF", " ", neta, -41., 41., nphi, 0., bphi);
8044  h_mapDepth1Pedw0_HF = fs_->make<TH2F>("h_mapDepth1Pedw0_HF", " ", neta, -41., 41., nphi, 0., bphi);
8045  h_mapDepth1Pedw1_HF = fs_->make<TH2F>("h_mapDepth1Pedw1_HF", " ", neta, -41., 41., nphi, 0., bphi);
8046  h_mapDepth1Pedw2_HF = fs_->make<TH2F>("h_mapDepth1Pedw2_HF", " ", neta, -41., 41., nphi, 0., bphi);
8047  h_mapDepth1Pedw3_HF = fs_->make<TH2F>("h_mapDepth1Pedw3_HF", " ", neta, -41., 41., nphi, 0., bphi);
8048  h_mapDepth2Ped0_HF = fs_->make<TH2F>("h_mapDepth2Ped0_HF", " ", neta, -41., 41., nphi, 0., bphi);
8049  h_mapDepth2Ped1_HF = fs_->make<TH2F>("h_mapDepth2Ped1_HF", " ", neta, -41., 41., nphi, 0., bphi);
8050  h_mapDepth2Ped2_HF = fs_->make<TH2F>("h_mapDepth2Ped2_HF", " ", neta, -41., 41., nphi, 0., bphi);
8051  h_mapDepth2Ped3_HF = fs_->make<TH2F>("h_mapDepth2Ped3_HF", " ", neta, -41., 41., nphi, 0., bphi);
8052  h_mapDepth2Pedw0_HF = fs_->make<TH2F>("h_mapDepth2Pedw0_HF", " ", neta, -41., 41., nphi, 0., bphi);
8053  h_mapDepth2Pedw1_HF = fs_->make<TH2F>("h_mapDepth2Pedw1_HF", " ", neta, -41., 41., nphi, 0., bphi);
8054  h_mapDepth2Pedw2_HF = fs_->make<TH2F>("h_mapDepth2Pedw2_HF", " ", neta, -41., 41., nphi, 0., bphi);
8055  h_mapDepth2Pedw3_HF = fs_->make<TH2F>("h_mapDepth2Pedw3_HF", " ", neta, -41., 41., nphi, 0., bphi);
8056 
8057  h_mapDepth4Ped0_HO = fs_->make<TH2F>("h_mapDepth4Ped0_HO", " ", neta, -41., 41., nphi, 0., bphi);
8058  h_mapDepth4Ped1_HO = fs_->make<TH2F>("h_mapDepth4Ped1_HO", " ", neta, -41., 41., nphi, 0., bphi);
8059  h_mapDepth4Ped2_HO = fs_->make<TH2F>("h_mapDepth4Ped2_HO", " ", neta, -41., 41., nphi, 0., bphi);
8060  h_mapDepth4Ped3_HO = fs_->make<TH2F>("h_mapDepth4Ped3_HO", " ", neta, -41., 41., nphi, 0., bphi);
8061  h_mapDepth4Pedw0_HO = fs_->make<TH2F>("h_mapDepth4Pedw0_HO", " ", neta, -41., 41., nphi, 0., bphi);
8062  h_mapDepth4Pedw1_HO = fs_->make<TH2F>("h_mapDepth4Pedw1_HO", " ", neta, -41., 41., nphi, 0., bphi);
8063  h_mapDepth4Pedw2_HO = fs_->make<TH2F>("h_mapDepth4Pedw2_HO", " ", neta, -41., 41., nphi, 0., bphi);
8064  h_mapDepth4Pedw3_HO = fs_->make<TH2F>("h_mapDepth4Pedw3_HO", " ", neta, -41., 41., nphi, 0., bphi);
8065  //--------------------------------------------------
8066  h_mapDepth1ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
8067  h_mapDepth2ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
8068  h_mapDepth3ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
8069  h_mapDepth4ADCAmpl12_HB = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HB", " ", neta, -41., 41., nphi, 0., bphi);
8070  h_mapDepth1ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
8071  h_mapDepth2ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
8072  h_mapDepth3ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
8073  h_mapDepth4ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
8074  h_mapDepth5ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth5ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
8075  h_mapDepth6ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth6ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
8076  h_mapDepth7ADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth7ADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
8077  h_mapDepth1ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth1ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
8078  h_mapDepth2ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth2ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
8079  h_mapDepth3ADCAmpl12SiPM_HE = fs_->make<TH2F>("h_mapDepth3ADCAmpl12SiPM_HE", " ", neta, -41., 41., nphi, 0., bphi);
8080 
8081  h_mapDepth1ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth1ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
8082  h_mapDepth2ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth2ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
8083  h_mapDepth3ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth3ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
8084  h_mapDepth4ADCAmpl12_HF = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HF", " ", neta, -41., 41., nphi, 0., bphi);
8085 
8086  h_mapDepth4ADCAmpl12_HO = fs_->make<TH2F>("h_mapDepth4ADCAmpl12_HO", " ", neta, -41., 41., nphi, 0., bphi);
8087 
8088  h_mapDepth1linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth1linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
8089  h_mapDepth2linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth2linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
8090  h_mapDepth3linADCAmpl12_HE = fs_->make<TH2F>("h_mapDepth3linADCAmpl12_HE", " ", neta, -41., 41., nphi, 0., bphi);
8091  //--------------------------------------------------
8093  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HB", " ", neta, -41., 41., nphi, 0., bphi);
8095  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HB", " ", neta, -41., 41., nphi, 0., bphi);
8097  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HE", " ", neta, -41., 41., nphi, 0., bphi);
8099  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HE", " ", neta, -41., 41., nphi, 0., bphi);
8101  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HF", " ", neta, -41., 41., nphi, 0., bphi);
8103  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HF", " ", neta, -41., 41., nphi, 0., bphi);
8105  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal_HO", " ", neta, -41., 41., nphi, 0., bphi);
8107  fs_->make<TH2F>("h_mapGetRMSOverNormalizedSignal0_HO", " ", neta, -41., 41., nphi, 0., bphi);
8108  //--------------------------------------------------
8109  h_shape_Ahigh_HB0 = fs_->make<TH1F>("h_shape_Ahigh_HB0", " ", 10, 0., 10.);
8110  h_shape0_Ahigh_HB0 = fs_->make<TH1F>("h_shape0_Ahigh_HB0", " ", 10, 0., 10.);
8111  h_shape_Alow_HB0 = fs_->make<TH1F>("h_shape_Alow_HB0", " ", 10, 0., 10.);
8112  h_shape0_Alow_HB0 = fs_->make<TH1F>("h_shape0_Alow_HB0", " ", 10, 0., 10.);
8113  h_shape_Ahigh_HB1 = fs_->make<TH1F>("h_shape_Ahigh_HB1", " ", 10, 0., 10.);
8114  h_shape0_Ahigh_HB1 = fs_->make<TH1F>("h_shape0_Ahigh_HB1", " ", 10, 0., 10.);
8115  h_shape_Alow_HB1 = fs_->make<TH1F>("h_shape_Alow_HB1", " ", 10, 0., 10.);
8116  h_shape0_Alow_HB1 = fs_->make<TH1F>("h_shape0_Alow_HB1", " ", 10, 0., 10.);
8117  h_shape_Ahigh_HB2 = fs_->make<TH1F>("h_shape_Ahigh_HB2", " ", 10, 0., 10.);
8118  h_shape0_Ahigh_HB2 = fs_->make<TH1F>("h_shape0_Ahigh_HB2", " ", 10, 0., 10.);
8119  h_shape_Alow_HB2 = fs_->make<TH1F>("h_shape_Alow_HB2", " ", 10, 0., 10.);
8120  h_shape0_Alow_HB2 = fs_->make<TH1F>("h_shape0_Alow_HB2", " ", 10, 0., 10.);
8121  h_shape_Ahigh_HB3 = fs_->make<TH1F>("h_shape_Ahigh_HB3", " ", 10, 0., 10.);
8122  h_shape0_Ahigh_HB3 = fs_->make<TH1F>("h_shape0_Ahigh_HB3", " ", 10, 0., 10.);
8123  h_shape_Alow_HB3 = fs_->make<TH1F>("h_shape_Alow_HB3", " ", 10, 0., 10.);
8124  h_shape0_Alow_HB3 = fs_->make<TH1F>("h_shape0_Alow_HB3", " ", 10, 0., 10.);
8125  //--------------------------------------------------
8126  h_shape_bad_channels_HB = fs_->make<TH1F>("h_shape_bad_channels_HB", " ", 10, 0., 10.);
8127  h_shape0_bad_channels_HB = fs_->make<TH1F>("h_shape0_bad_channels_HB", " ", 10, 0., 10.);
8128  h_shape_good_channels_HB = fs_->make<TH1F>("h_shape_good_channels_HB", " ", 10, 0., 10.);
8129  h_shape0_good_channels_HB = fs_->make<TH1F>("h_shape0_good_channels_HB", " ", 10, 0., 10.);
8130  h_shape_bad_channels_HE = fs_->make<TH1F>("h_shape_bad_channels_HE", " ", 10, 0., 10.);
8131  h_shape0_bad_channels_HE = fs_->make<TH1F>("h_shape0_bad_channels_HE", " ", 10, 0., 10.);
8132  h_shape_good_channels_HE = fs_->make<TH1F>("h_shape_good_channels_HE", " ", 10, 0., 10.);
8133  h_shape0_good_channels_HE = fs_->make<TH1F>("h_shape0_good_channels_HE", " ", 10, 0., 10.);
8134  h_shape_bad_channels_HF = fs_->make<TH1F>("h_shape_bad_channels_HF", " ", 10, 0., 10.);
8135  h_shape0_bad_channels_HF = fs_->make<TH1F>("h_shape0_bad_channels_HF", " ", 10, 0., 10.);
8136  h_shape_good_channels_HF = fs_->make<TH1F>("h_shape_good_channels_HF", " ", 10, 0., 10.);
8137  h_shape0_good_channels_HF = fs_->make<TH1F>("h_shape0_good_channels_HF", " ", 10, 0., 10.);
8138  h_shape_bad_channels_HO = fs_->make<TH1F>("h_shape_bad_channels_HO", " ", 10, 0., 10.);
8139  h_shape0_bad_channels_HO = fs_->make<TH1F>("h_shape0_bad_channels_HO", " ", 10, 0., 10.);
8140  h_shape_good_channels_HO = fs_->make<TH1F>("h_shape_good_channels_HO", " ", 10, 0., 10.);
8141  h_shape0_good_channels_HO = fs_->make<TH1F>("h_shape0_good_channels_HO", " ", 10, 0., 10.);
8142  //--------------------------------------------------
8143  // if(flagcpuoptimization_== 0 ) {
8144 
8145  int spl = 1000;
8146  float spls = 5000;
8147  h_sumamplitude_depth1_HB = fs_->make<TH1F>("h_sumamplitude_depth1_HB", " ", spl, 0., spls);
8148  h_sumamplitude_depth2_HB = fs_->make<TH1F>("h_sumamplitude_depth2_HB", " ", spl, 0., spls);
8149  h_sumamplitude_depth1_HE = fs_->make<TH1F>("h_sumamplitude_depth1_HE", " ", spl, 0., spls);
8150  h_sumamplitude_depth2_HE = fs_->make<TH1F>("h_sumamplitude_depth2_HE", " ", spl, 0., spls);
8151  h_sumamplitude_depth3_HE = fs_->make<TH1F>("h_sumamplitude_depth3_HE", " ", spl, 0., spls);
8152  h_sumamplitude_depth1_HF = fs_->make<TH1F>("h_sumamplitude_depth1_HF", " ", spl, 0., spls);
8153  h_sumamplitude_depth2_HF = fs_->make<TH1F>("h_sumamplitude_depth2_HF", " ", spl, 0., spls);
8154  h_sumamplitude_depth4_HO = fs_->make<TH1F>("h_sumamplitude_depth4_HO", " ", spl, 0., spls);
8155  int spl0 = 1000;
8156  float spls0 = 10000;
8157  h_sumamplitude_depth1_HB0 = fs_->make<TH1F>("h_sumamplitude_depth1_HB0", " ", spl0, 0., spls0);
8158  h_sumamplitude_depth2_HB0 = fs_->make<TH1F>("h_sumamplitude_depth2_HB0", " ", spl0, 0., spls0);
8159  h_sumamplitude_depth1_HE0 = fs_->make<TH1F>("h_sumamplitude_depth1_HE0", " ", spl0, 0., spls0);
8160  h_sumamplitude_depth2_HE0 = fs_->make<TH1F>("h_sumamplitude_depth2_HE0", " ", spl0, 0., spls0);
8161  h_sumamplitude_depth3_HE0 = fs_->make<TH1F>("h_sumamplitude_depth3_HE0", " ", spl0, 0., spls0);
8162  h_sumamplitude_depth1_HF0 = fs_->make<TH1F>("h_sumamplitude_depth1_HF0", " ", spl0, 0., spls0);
8163  h_sumamplitude_depth2_HF0 = fs_->make<TH1F>("h_sumamplitude_depth2_HF0", " ", spl0, 0., spls0);
8164  h_sumamplitude_depth4_HO0 = fs_->make<TH1F>("h_sumamplitude_depth4_HO0", " ", spl0, 0., spls0);
8165  int spl1 = 1000;
8166  float spls1 = 100000;
8167  h_sumamplitude_depth1_HB1 = fs_->make<TH1F>("h_sumamplitude_depth1_HB1", " ", spl1, 0., spls1);
8168  h_sumamplitude_depth2_HB1 = fs_->make<TH1F>("h_sumamplitude_depth2_HB1", " ", spl1, 0., spls1);
8169  h_sumamplitude_depth1_HE1 = fs_->make<TH1F>("h_sumamplitude_depth1_HE1", " ", spl1, 0., spls1);
8170  h_sumamplitude_depth2_HE1 = fs_->make<TH1F>("h_sumamplitude_depth2_HE1", " ", spl1, 0., spls1);
8171  h_sumamplitude_depth3_HE1 = fs_->make<TH1F>("h_sumamplitude_depth3_HE1", " ", spl1, 0., spls1);
8172  h_sumamplitude_depth1_HF1 = fs_->make<TH1F>("h_sumamplitude_depth1_HF1", " ", spl1, 0., spls1);
8173  h_sumamplitude_depth2_HF1 = fs_->make<TH1F>("h_sumamplitude_depth2_HF1", " ", spl1, 0., spls1);
8174  h_sumamplitude_depth4_HO1 = fs_->make<TH1F>("h_sumamplitude_depth4_HO1", " ", spl1, 0., spls1);
8175 
8176  h_Amplitude_forCapIdErrors_HB1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HB1", " ", 100, 0., 30000.);
8177  h_Amplitude_forCapIdErrors_HB2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HB2", " ", 100, 0., 30000.);
8178  h_Amplitude_forCapIdErrors_HE1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE1", " ", 100, 0., 30000.);
8179  h_Amplitude_forCapIdErrors_HE2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE2", " ", 100, 0., 30000.);
8180  h_Amplitude_forCapIdErrors_HE3 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HE3", " ", 100, 0., 30000.);
8181  h_Amplitude_forCapIdErrors_HF1 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HF1", " ", 100, 0., 30000.);
8182  h_Amplitude_forCapIdErrors_HF2 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HF2", " ", 100, 0., 30000.);
8183  h_Amplitude_forCapIdErrors_HO4 = fs_->make<TH1F>("h_Amplitude_forCapIdErrors_HO4", " ", 100, 0., 30000.);
8184 
8185  h_Amplitude_notCapIdErrors_HB1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HB1", " ", 100, 0., 30000.);
8186  h_Amplitude_notCapIdErrors_HB2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HB2", " ", 100, 0., 30000.);
8187  h_Amplitude_notCapIdErrors_HE1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE1", " ", 100, 0., 30000.);
8188  h_Amplitude_notCapIdErrors_HE2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE2", " ", 100, 0., 30000.);
8189  h_Amplitude_notCapIdErrors_HE3 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HE3", " ", 100, 0., 30000.);
8190  h_Amplitude_notCapIdErrors_HF1 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HF1", " ", 100, 0., 30000.);
8191  h_Amplitude_notCapIdErrors_HF2 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HF2", " ", 100, 0., 30000.);
8192  h_Amplitude_notCapIdErrors_HO4 = fs_->make<TH1F>("h_Amplitude_notCapIdErrors_HO4", " ", 100, 0., 30000.);
8193 
8194  h_2DAtaildepth1_HB = fs_->make<TH2F>("h_2DAtaildepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
8195  h_2D0Ataildepth1_HB = fs_->make<TH2F>("h_2D0Ataildepth1_HB", " ", neta, -41., 41., nphi, 0., bphi);
8196  h_2DAtaildepth2_HB = fs_->make<TH2F>("h_2DAtaildepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
8197  h_2D0Ataildepth2_HB = fs_->make<TH2F>("h_2D0Ataildepth2_HB", " ", neta, -41., 41., nphi, 0., bphi);
8198 
8200  } //if(recordHistoes_
8201  if (verbosity > 0)
8202  std::cout << "======================== booking DONE +++++++++++++++++++++++++++" << std::endl;
8204  if (recordNtuples_) {
8205  myTree = fs_->make<TTree>("Hcal", "Hcal Tree");
8206  myTree->Branch("Nevent", &Nevent, "Nevent/I");
8207  myTree->Branch("Run", &Run, "Run/I");
8208 
8209  } //if(recordNtuples_
8210  if (verbosity > 0)
8211  std::cout << "======================== beignJob finish +++++++++++++++++++++++++++" << std::endl;
8213 }
8214 
8217 // ------------ method called for each event ------------
8219  CaloSamples toolOriginal; // TS
8220  // double tool[100];
8221  if (verbosity < 0)
8222  std::cout << "************** in loop over Digis counter = " << nnnnnnhbhe << std::endl;
8223  HcalDetId cell(digiItr->id());
8224  int mdepth = cell.depth();
8225  int iphi = cell.iphi() - 1;
8226  int ieta = cell.ieta();
8227  if (ieta > 0)
8228  ieta -= 1;
8229  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8230  // !!!!!!
8231  int errorGeneral = 0;
8232  int error1 = 0;
8233  int error2 = 0;
8234  int error3 = 0;
8235  int error4 = 0;
8236  int error5 = 0;
8237  int error6 = 0;
8238  int error7 = 0;
8239  // !!!!!!
8240  bool anycapid = true;
8241  bool anyer = false;
8242  bool anydv = true;
8243  // for help:
8244  int firstcapid = 0;
8245  int lastcapid = 0, capid = 0;
8246  int ERRORfiber = -10;
8247  int ERRORfiberChan = -10;
8248  int ERRORfiberAndChan = -10;
8249  int repetedcapid = 0;
8250  int TSsize = 10;
8251  TSsize = digiItr->size();
8252 
8254  for (int ii = 0; ii < TSsize; ii++) {
8255  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8256  bool er = (*digiItr)[ii].er(); // error
8257  bool dv = (*digiItr)[ii].dv(); // valid data
8258  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8259  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8260  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8261  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8262  anycapid = false;
8263  ERRORfiber = fiber;
8264  ERRORfiberChan = fiberChan;
8265  ERRORfiberAndChan = fiberAndChan;
8266  if (capid != lastcapid) {
8267  } else {
8268  repetedcapid = 1;
8269  }
8270  }
8271  lastcapid = capid;
8272 
8273  if (ii == 0)
8274  firstcapid = capid;
8275 
8276  if (er) {
8277  anyer = true;
8278  ERRORfiber = fiber;
8279  ERRORfiberChan = fiberChan;
8280  ERRORfiberAndChan = fiberAndChan;
8281  }
8282  if (!dv) {
8283  anydv = false;
8284  ERRORfiber = fiber;
8285  ERRORfiberChan = fiberChan;
8286  ERRORfiberAndChan = fiberAndChan;
8287  }
8288 
8289  } // for
8290 
8292  if (firstcapid == 0 && !anycapid)
8293  errorGeneral = 1;
8294  if (firstcapid == 1 && !anycapid)
8295  errorGeneral = 2;
8296  if (firstcapid == 2 && !anycapid)
8297  errorGeneral = 3;
8298  if (firstcapid == 3 && !anycapid)
8299  errorGeneral = 4;
8300  if (!anycapid)
8301  error1 = 1;
8302  if (anyer)
8303  error2 = 1;
8304  if (!anydv)
8305  error3 = 1;
8306 
8307  if (!anycapid && anyer)
8308  error4 = 1;
8309  if (!anycapid && !anydv)
8310  error5 = 1;
8311  if (!anycapid && anyer && !anydv)
8312  error6 = 1;
8313  if (anyer && !anydv)
8314  error7 = 1;
8316  // Energy:
8317 
8318  double ampl = 0.;
8319  for (int ii = 0; ii < TSsize; ii++) {
8320  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8321  ampl += ampldefault; // fC
8322  }
8323 
8325  // Digis:
8326  // HB
8327  if (sub == 1) {
8328  h_errorGeneral_HB->Fill(double(errorGeneral), 1.);
8329  h_error1_HB->Fill(double(error1), 1.);
8330  h_error2_HB->Fill(double(error2), 1.);
8331  h_error3_HB->Fill(double(error3), 1.);
8332  h_error4_HB->Fill(double(error4), 1.);
8333  h_error5_HB->Fill(double(error5), 1.);
8334  h_error6_HB->Fill(double(error6), 1.);
8335  h_error7_HB->Fill(double(error7), 1.);
8336  h_repetedcapid_HB->Fill(double(repetedcapid), 1.);
8337 
8338  if (error1 != 0 || error2 != 0 || error3 != 0) {
8340  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8341  h_amplError_HB->Fill(ampl, 1.);
8342  if (mdepth == 1)
8343  h_mapDepth1Error_HB->Fill(double(ieta), double(iphi));
8344  if (mdepth == 2)
8345  h_mapDepth2Error_HB->Fill(double(ieta), double(iphi));
8346  h_fiber0_HB->Fill(double(ERRORfiber), 1.);
8347  h_fiber1_HB->Fill(double(ERRORfiberChan), 1.);
8348  h_fiber2_HB->Fill(double(ERRORfiberAndChan), 1.);
8349  } else {
8350  h_amplFine_HB->Fill(ampl, 1.);
8351  }
8352  }
8353  // HE
8354  if (sub == 2) {
8355  h_errorGeneral_HE->Fill(double(errorGeneral), 1.);
8356  h_error1_HE->Fill(double(error1), 1.);
8357  h_error2_HE->Fill(double(error2), 1.);
8358  h_error3_HE->Fill(double(error3), 1.);
8359  h_error4_HE->Fill(double(error4), 1.);
8360  h_error5_HE->Fill(double(error5), 1.);
8361  h_error6_HE->Fill(double(error6), 1.);
8362  h_error7_HE->Fill(double(error7), 1.);
8363  h_repetedcapid_HE->Fill(double(repetedcapid), 1.);
8364 
8365  if (error1 != 0 || error2 != 0 || error3 != 0) {
8367  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8368  h_amplError_HE->Fill(ampl, 1.);
8369  if (mdepth == 1)
8370  h_mapDepth1Error_HE->Fill(double(ieta), double(iphi));
8371  if (mdepth == 2)
8372  h_mapDepth2Error_HE->Fill(double(ieta), double(iphi));
8373  if (mdepth == 3)
8374  h_mapDepth3Error_HE->Fill(double(ieta), double(iphi));
8375  h_fiber0_HE->Fill(double(ERRORfiber), 1.);
8376  h_fiber1_HE->Fill(double(ERRORfiberChan), 1.);
8377  h_fiber2_HE->Fill(double(ERRORfiberAndChan), 1.);
8378  } else {
8379  h_amplFine_HE->Fill(ampl, 1.);
8380  }
8381  }
8382  // ha2->Fill(double(ieta), double(iphi));
8383 } //fillDigiErrors
8386 // ------------ method called for each event ------------
8388  CaloSamples toolOriginal; // TS
8389  // double tool[100];
8390  DetId detid = qie11df.detid();
8391  HcalDetId hcaldetid = HcalDetId(detid);
8392  int ieta = hcaldetid.ieta();
8393  if (ieta > 0)
8394  ieta -= 1;
8395  int iphi = hcaldetid.iphi() - 1;
8396  int mdepth = hcaldetid.depth();
8397  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8398  int ampts[10];
8399  int icapid[10];
8400  for (int ii = 0; ii < 10; ii++) {
8401  ampts[ii] = 0.;
8402  icapid[ii] = 0.;
8403  }
8404  bool sticking = false;
8405  int error1 = 0;
8406  bool anycapid = true;
8407  bool anyer = false;
8408  bool anydv = true;
8409  int error2 = 0, error3 = 0;
8410  // for help:
8411  int firstcapid = 0;
8412  int lastcapid = 0, capid = 0;
8413  int repetedcapid = 0;
8414  // loop over the samples in the digi
8415  nTS = qie11df.samples();
8417  if (mdepth == 0 || sub > 4)
8418  return;
8419  if (mdepth > 3 && flagupgradeqie1011_ == 3)
8420  return;
8421  if (mdepth > 3 && flagupgradeqie1011_ == 7)
8422  return;
8423  if (mdepth > 3 && flagupgradeqie1011_ == 8)
8424  return;
8425  if (mdepth > 3 && flagupgradeqie1011_ == 9)
8426  return;
8428  for (int ii = 0; ii < nTS; ii++) {
8429  capid = qie11df[ii].capid(); // capId (0-3, sequential)
8430  bool er = false;
8431  bool dv = true;
8432  icapid[ii] = capid;
8433  // valid data
8434  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8435  anycapid = false;
8436  if (capid != lastcapid) {
8437  } else {
8438  repetedcapid = 1;
8439  }
8440  }
8441  lastcapid = capid;
8442  if (er)
8443  anyer = true;
8444  if (!dv)
8445  anydv = false;
8446  if (ii == 0)
8447  firstcapid = capid;
8448  } // for
8449  if (!anycapid)
8450  error1 = 1;
8451  if (anyer)
8452  error2 = 1;
8453  if (!anydv)
8454  error3 = 1;
8455  double ampl = 0.;
8456  for (int ii = 0; ii < nTS; ii++) {
8457  int adc = qie11df[ii].adc();
8458  ampts[ii] = adc;
8459  if (sub == 1) {
8460  h_nadccounts0_HB->Fill(float(ampts[ii]), 1.);
8461  }
8462  if (sub == 2) {
8463  h_nadccounts0_HE->Fill(float(ampts[ii]), 1.);
8464  }
8465  double ampldefault = adc2fC_QIE11_shunt6[adc];
8466  if (flaguseshunt_ == 1)
8467  ampldefault = adc2fC_QIE11_shunt1[adc];
8468  ampl += ampldefault; //
8469  }
8470  if (sub == 1 || sub == 2) {
8471  if (verbosity == 111111 && (ampts[0] == ampts[1]) && (ampts[1] == ampts[2]) && (ampts[2] == ampts[3]) &&
8472  (ampts[3] == ampts[4]) && (ampts[4] == ampts[5]) && (ampts[5] == ampts[6]) && (ampts[6] == ampts[7])) {
8473  std::cout << " HBHE DIGI A,fC = " << ampl << " sub = " << sub << " mdepth = " << mdepth << " nTS = " << nTS
8474  << std::endl;
8475  std::cout << " Ai,adc counts: " << std::endl;
8476  std::cout << " A1 = " << ampts[0] << " A2 = " << ampts[1] << " A3 = " << ampts[2] << " A4 = " << ampts[3]
8477  << std::endl;
8478  std::cout << " A5 = " << ampts[4] << " A6 = " << ampts[5] << " A7 = " << ampts[6] << " A8 = " << ampts[7]
8479  << std::endl;
8480  std::cout << " icapid: " << std::endl;
8481  std::cout << " icapid1 = " << icapid[0] << " icapid2 = " << icapid[1] << " icapid3 = " << icapid[2]
8482  << " icapid4 = " << icapid[3] << std::endl;
8483  std::cout << " icapid5 = " << icapid[4] << " icapid6 = " << icapid[5] << " icapid7 = " << icapid[6]
8484  << " icapid8 = " << icapid[7] << std::endl;
8485  }
8486  if (verbosity == 222222 && (ampts[3] > 95 && (ampts[3] == ampts[4]) && (ampts[4] == ampts[5]))) {
8487  std::cout << " HBHE DIGI A,fC = " << ampl << " sub = " << sub << " mdepth = " << mdepth << " nTS = " << nTS
8488  << std::endl;
8489  std::cout << " Ai,adc counts: " << std::endl;
8490  std::cout << " A1 = " << ampts[0] << " A2 = " << ampts[1] << " A3 = " << ampts[2] << " A4 = " << ampts[3]
8491  << std::endl;
8492  std::cout << " A5 = " << ampts[4] << " A6 = " << ampts[5] << " A7 = " << ampts[6] << " A8 = " << ampts[7]
8493  << std::endl;
8494  std::cout << " icapid: " << std::endl;
8495  std::cout << " icapid1 = " << icapid[0] << " icapid2 = " << icapid[1] << " icapid3 = " << icapid[2]
8496  << " icapid4 = " << icapid[3] << std::endl;
8497  std::cout << " icapid5 = " << icapid[4] << " icapid6 = " << icapid[5] << " icapid7 = " << icapid[6]
8498  << " icapid8 = " << icapid[7] << std::endl;
8499  }
8500  if (verbosity == 333333 && (ampts[0] > 14 && ampts[0] == ampts[1]) && (ampts[1] == ampts[2]) &&
8501  (ampts[2] == ampts[3]) && (ampts[3] == ampts[4]) && (ampts[4] == ampts[5]) && (ampts[5] == ampts[6]) &&
8502  (ampts[6] == ampts[7])) {
8503  std::cout << " HBHE DIGI A,fC = " << ampl << " sub = " << sub << " mdepth = " << mdepth << " nTS = " << nTS
8504  << std::endl;
8505  std::cout << " Ai,adc counts: " << std::endl;
8506  std::cout << " A1 = " << ampts[0] << " A2 = " << ampts[1] << " A3 = " << ampts[2] << " A4 = " << ampts[3]
8507  << std::endl;
8508  std::cout << " A5 = " << ampts[4] << " A6 = " << ampts[5] << " A7 = " << ampts[6] << " A8 = " << ampts[7]
8509  << std::endl;
8510  std::cout << " icapid: " << std::endl;
8511  std::cout << " icapid1 = " << icapid[0] << " icapid2 = " << icapid[1] << " icapid3 = " << icapid[2]
8512  << " icapid4 = " << icapid[3] << std::endl;
8513  std::cout << " icapid5 = " << icapid[4] << " icapid6 = " << icapid[5] << " icapid7 = " << icapid[6]
8514  << " icapid8 = " << icapid[7] << std::endl;
8515  }
8516  if ((ampts[0] == ampts[1]) && (ampts[1] == ampts[2]) && (ampts[2] == ampts[3]) && (ampts[3] == ampts[4]) &&
8517  (ampts[4] == ampts[5]) && (ampts[5] == ampts[6]) && (ampts[6] == ampts[7])) {
8518  if (sub == 1) {
8519  h_nadccounts8_HB->Fill(float(ampts[0]), 1.);
8520  }
8521  if (sub == 2) {
8522  h_nadccounts8_HE->Fill(float(ampts[0]), 1.);
8523  }
8524  if (ampts[4] > 139)
8525  sticking = true;
8526  } // nadccounts8
8527  if (((ampts[0] == ampts[1]) && (ampts[1] == ampts[2]) && (ampts[2] == ampts[3]) && (ampts[3] == ampts[4]) &&
8528  (ampts[4] == ampts[5])) ||
8529  ((ampts[1] == ampts[2]) && (ampts[2] == ampts[3]) && (ampts[3] == ampts[4]) && (ampts[4] == ampts[5]) &&
8530  (ampts[5] == ampts[6])) ||
8531  ((ampts[2] == ampts[3]) && (ampts[3] == ampts[4]) && (ampts[4] == ampts[5]) && (ampts[5] == ampts[6]) &&
8532  (ampts[6] == ampts[7]))) {
8533  if (sub == 1) {
8534  h_nadccounts6_HB->Fill(float(ampts[3]), 1.);
8535  }
8536  if (sub == 2) {
8537  h_nadccounts6_HE->Fill(float(ampts[3]), 1.);
8538  }
8539  } // nadccounts6
8540  if (((ampts[0] == ampts[1]) && (ampts[1] == ampts[2]) && (ampts[2] == ampts[3])) ||
8541  ((ampts[1] == ampts[2]) && (ampts[2] == ampts[3]) && (ampts[3] == ampts[4])) ||
8542  ((ampts[2] == ampts[3]) && (ampts[3] == ampts[4]) && (ampts[4] == ampts[5])) ||
8543  ((ampts[3] == ampts[4]) && (ampts[4] == ampts[5]) && (ampts[5] == ampts[6]))) {
8544  if (sub == 1) {
8545  h_nadccounts4_HB->Fill(float(ampts[3]), 1.);
8546  }
8547  if (sub == 2) {
8548  h_nadccounts4_HE->Fill(float(ampts[3]), 1.);
8549  }
8550  } // nadccounts4
8551  if (((ampts[4] == ampts[5]) && (ampts[5] == ampts[6]) && (ampts[6] == ampts[7]))) {
8552  if (sub == 1) {
8553  h_nadccounts4_HB->Fill(float(ampts[4]), 1.);
8554  }
8555  if (sub == 2) {
8556  h_nadccounts4_HE->Fill(float(ampts[4]), 1.);
8557  }
8558  } // nadccounts4
8559  if (((ampts[0] == ampts[1]) && (ampts[1] == ampts[2])) || ((ampts[1] == ampts[2]) && (ampts[2] == ampts[3])) ||
8560  ((ampts[2] == ampts[3]) && (ampts[3] == ampts[4]))) {
8561  if (sub == 1) {
8562  h_nadccounts3_HB->Fill(float(ampts[2]), 1.);
8563  }
8564  if (sub == 2) {
8565  h_nadccounts3_HE->Fill(float(ampts[2]), 1.);
8566  }
8567  } // nadccounts3
8568  if (((ampts[3] == ampts[4]) && (ampts[4] == ampts[5])) || ((ampts[4] == ampts[5]) && (ampts[5] == ampts[6])) ||
8569  ((ampts[5] == ampts[6]) && (ampts[6] == ampts[7]))) {
8570  if (sub == 1) {
8571  h_nadccounts3_HB->Fill(float(ampts[5]), 1.);
8572  }
8573  if (sub == 2) {
8574  h_nadccounts3_HE->Fill(float(ampts[5]), 1.);
8575  }
8576  } // nadccounts3
8577  if (ampts[0] == ampts[1]) {
8578  if (sub == 1) {
8579  h_nadccounts2_HB->Fill(float(ampts[1]), 1.);
8580  }
8581  if (sub == 2) {
8582  h_nadccounts2_HE->Fill(float(ampts[1]), 1.);
8583  }
8584  } // nadccounts2
8585  if (ampts[1] == ampts[2]) {
8586  if (sub == 1) {
8587  h_nadccounts2_HB->Fill(float(ampts[2]), 1.);
8588  }
8589  if (sub == 2) {
8590  h_nadccounts2_HE->Fill(float(ampts[2]), 1.);
8591  }
8592  } // nadccounts2
8593  if (ampts[2] == ampts[3]) {
8594  if (sub == 1) {
8595  h_nadccounts2_HB->Fill(float(ampts[3]), 1.);
8596  }
8597  if (sub == 2) {
8598  h_nadccounts2_HE->Fill(float(ampts[3]), 1.);
8599  }
8600  } // nadccounts2
8601  if (ampts[3] == ampts[4]) {
8602  if (sub == 1) {
8603  h_nadccounts2_HB->Fill(float(ampts[4]), 1.);
8604  }
8605  if (sub == 2) {
8606  h_nadccounts2_HE->Fill(float(ampts[4]), 1.);
8607  }
8608  } // nadccounts2
8609  if (ampts[4] == ampts[5]) {
8610  if (sub == 1) {
8611  h_nadccounts2_HB->Fill(float(ampts[5]), 1.);
8612  }
8613  if (sub == 2) {
8614  h_nadccounts2_HE->Fill(float(ampts[5]), 1.);
8615  }
8616  } // nadccounts2
8617  if (ampts[5] == ampts[6]) {
8618  if (sub == 1) {
8619  h_nadccounts2_HB->Fill(float(ampts[6]), 1.);
8620  }
8621  if (sub == 2) {
8622  h_nadccounts2_HE->Fill(float(ampts[6]), 1.);
8623  }
8624  } // nadccounts2
8625  if (ampts[6] == ampts[7]) {
8626  if (sub == 1) {
8627  h_nadccounts2_HB->Fill(float(ampts[7]), 1.);
8628  }
8629  if (sub == 2) {
8630  h_nadccounts2_HE->Fill(float(ampts[7]), 1.);
8631  }
8632  } // nadccounts2
8633  } // sub
8634  if (sticking) {
8635  error1 = 1;
8636  if (verbosity == 444444) {
8637  std::cout << " A>139, sticking = " << sticking << " sub = " << sub << " ampts0 = " << ampts[0]
8638  << " ampts1 = " << ampts[1] << " ampts2 = " << ampts[2] << " ampts3 = " << ampts[3]
8639  << " ampts4 = " << ampts[4] << " ampts5 = " << ampts[5] << " ampts6 = " << ampts[6]
8640  << " ampts7 = " << ampts[7] << std::endl;
8641  std::cout << " icapid0 = " << icapid[0] << " icapid1 = " << icapid[1] << " icapid2 = " << icapid[2]
8642  << " icapid3 = " << icapid[3] << " icapid4 = " << icapid[4] << " icapid5 = " << icapid[5]
8643  << " icapid6 = " << icapid[6] << " icapid7 = " << icapid[7] << std::endl;
8644  }
8645  }
8647  // Digis:HBHE
8648  if (sub == 1) {
8649  h_error1_HB->Fill(double(error1), 1.);
8650  h_repetedcapid_HB->Fill(double(repetedcapid), 1.);
8651  // if (error1 != 0) {
8652  if (error1 != 0 || error2 != 0 || error3 != 0) {
8654  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8655  h_amplError_HB->Fill(ampl, 1.);
8656  if (mdepth == 1)
8657  h_mapDepth1Error_HB->Fill(double(ieta), double(iphi));
8658  if (mdepth == 2)
8659  h_mapDepth2Error_HB->Fill(double(ieta), double(iphi));
8660  if (mdepth == 3)
8661  h_mapDepth3Error_HB->Fill(double(ieta), double(iphi));
8662  if (mdepth == 4)
8663  h_mapDepth4Error_HB->Fill(double(ieta), double(iphi));
8664  h_errorGeneral_HB->Fill(double(firstcapid), 1.);
8665  } else {
8666  h_amplFine_HB->Fill(ampl, 1.);
8667  }
8668  }
8669  if (sub == 2) {
8670  h_error1_HE->Fill(double(error1), 1.);
8671  h_repetedcapid_HE->Fill(double(repetedcapid), 1.);
8672  // if (error1 != 0) {
8673  if (error1 != 0 || error2 != 0 || error3 != 0) {
8675  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8676  h_amplError_HE->Fill(ampl, 1.);
8677  if (mdepth == 1)
8678  h_mapDepth1Error_HE->Fill(double(ieta), double(iphi));
8679  if (mdepth == 2)
8680  h_mapDepth2Error_HE->Fill(double(ieta), double(iphi));
8681  if (mdepth == 3)
8682  h_mapDepth3Error_HE->Fill(double(ieta), double(iphi));
8683  if (mdepth == 4)
8684  h_mapDepth4Error_HE->Fill(double(ieta), double(iphi));
8685  if (mdepth == 5)
8686  h_mapDepth5Error_HE->Fill(double(ieta), double(iphi));
8687  if (mdepth == 6)
8688  h_mapDepth6Error_HE->Fill(double(ieta), double(iphi));
8689  if (mdepth == 7)
8690  h_mapDepth7Error_HE->Fill(double(ieta), double(iphi));
8691  h_errorGeneral_HE->Fill(double(firstcapid), 1.);
8692  } else {
8693  h_amplFine_HE->Fill(ampl, 1.);
8694  }
8695  }
8696 } //fillDigiErrorsQIE11
8698 // ------------ method called for each event ------------
8700  CaloSamples toolOriginal; // TS
8701  // double tool[100];
8702  HcalDetId cell(digiItr->id());
8703  int mdepth = cell.depth();
8704  int iphi = cell.iphi() - 1;
8705  int ieta = cell.ieta();
8706  if (ieta > 0)
8707  ieta -= 1;
8708  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8709  if (mdepth > 2)
8710  std::cout << " HF DIGI ?????????????? ERROR mdepth = " << mdepth << std::endl;
8711  // !!!!!!
8712  int errorGeneral = 0;
8713  int error1 = 0;
8714  int error2 = 0;
8715  int error3 = 0;
8716  int error4 = 0;
8717  int error5 = 0;
8718  int error6 = 0;
8719  int error7 = 0;
8720  // !!!!!!
8721  bool anycapid = true;
8722  bool anyer = false;
8723  bool anydv = true;
8724  // for help:
8725  int firstcapid = 0;
8726  int lastcapid = 0, capid = 0;
8727  int ERRORfiber = -10;
8728  int ERRORfiberChan = -10;
8729  int ERRORfiberAndChan = -10;
8730  int repetedcapid = 0;
8731 
8732  int TSsize = 10;
8733  TSsize = digiItr->size();
8735  for (int ii = 0; ii < TSsize; ii++) {
8736  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8737  bool er = (*digiItr)[ii].er(); // error
8738  bool dv = (*digiItr)[ii].dv(); // valid data
8739  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8740  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8741  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8742  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8743  anycapid = false;
8744  ERRORfiber = fiber;
8745  ERRORfiberChan = fiberChan;
8746  ERRORfiberAndChan = fiberAndChan;
8747  if (capid != lastcapid) {
8748  } else {
8749  repetedcapid = 1;
8750  }
8751  }
8752  lastcapid = capid;
8753  if (ii == 0)
8754  firstcapid = capid;
8755  if (er) {
8756  anyer = true;
8757  ERRORfiber = fiber;
8758  ERRORfiberChan = fiberChan;
8759  ERRORfiberAndChan = fiberAndChan;
8760  }
8761  if (!dv) {
8762  anydv = false;
8763  ERRORfiber = fiber;
8764  ERRORfiberChan = fiberChan;
8765  ERRORfiberAndChan = fiberAndChan;
8766  }
8767  } // for
8769  if (firstcapid == 0 && !anycapid)
8770  errorGeneral = 1;
8771  if (firstcapid == 1 && !anycapid)
8772  errorGeneral = 2;
8773  if (firstcapid == 2 && !anycapid)
8774  errorGeneral = 3;
8775  if (firstcapid == 3 && !anycapid)
8776  errorGeneral = 4;
8777  if (!anycapid)
8778  error1 = 1;
8779  if (anyer)
8780  error2 = 1;
8781  if (!anydv)
8782  error3 = 1;
8783  if (!anycapid && anyer)
8784  error4 = 1;
8785  if (!anycapid && !anydv)
8786  error5 = 1;
8787  if (!anycapid && anyer && !anydv)
8788  error6 = 1;
8789  if (anyer && !anydv)
8790  error7 = 1;
8792  double ampl = 0.;
8793  for (int ii = 0; ii < TSsize; ii++) {
8794  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8795  ampl += ampldefault; // fC
8796  }
8798  // Digis: HF
8799  if (sub == 4) {
8800  h_errorGeneral_HF->Fill(double(errorGeneral), 1.);
8801  h_error1_HF->Fill(double(error1), 1.);
8802  h_error2_HF->Fill(double(error2), 1.);
8803  h_error3_HF->Fill(double(error3), 1.);
8804  h_error4_HF->Fill(double(error4), 1.);
8805  h_error5_HF->Fill(double(error5), 1.);
8806  h_error6_HF->Fill(double(error6), 1.);
8807  h_error7_HF->Fill(double(error7), 1.);
8808  h_repetedcapid_HF->Fill(double(repetedcapid), 1.);
8809  if (error1 != 0 || error2 != 0 || error3 != 0) {
8811  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8812  h_amplError_HF->Fill(ampl, 1.);
8813  if (mdepth == 1)
8814  h_mapDepth1Error_HF->Fill(double(ieta), double(iphi));
8815  if (mdepth == 2)
8816  h_mapDepth2Error_HF->Fill(double(ieta), double(iphi));
8817  h_fiber0_HF->Fill(double(ERRORfiber), 1.);
8818  h_fiber1_HF->Fill(double(ERRORfiberChan), 1.);
8819  h_fiber2_HF->Fill(double(ERRORfiberAndChan), 1.);
8820  } else {
8821  h_amplFine_HF->Fill(ampl, 1.);
8822  }
8823  }
8824 }
8829 // ------------ method called for each event ------------
8831  CaloSamples toolOriginal; // TS
8832  // double tool[100];
8833  DetId detid = qie10df.detid();
8834  HcalDetId hcaldetid = HcalDetId(detid);
8835  int ieta = hcaldetid.ieta();
8836  if (ieta > 0)
8837  ieta -= 1;
8838  int iphi = hcaldetid.iphi() - 1;
8839  int mdepth = hcaldetid.depth();
8840  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
8841  // !!!!!!
8842  int error1 = 0;
8843  // !!!!!!
8844  bool anycapid = true;
8845  // bool anyer = false;
8846  // bool anydv = true;
8847  // for help:
8848  int firstcapid = 0;
8849  int lastcapid = 0, capid = 0;
8850  int repetedcapid = 0;
8851  // loop over the samples in the digi
8852  nTS = qie10df.samples();
8854  for (int ii = 0; ii < nTS; ii++) {
8855  capid = qie10df[ii].capid(); // capId (0-3, sequential)
8856  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8857  anycapid = false;
8858  if (capid != lastcapid) {
8859  } else {
8860  repetedcapid = 1;
8861  }
8862  }
8863  lastcapid = capid;
8864  if (ii == 0)
8865  firstcapid = capid;
8866  } // for
8868  if (!anycapid)
8869  error1 = 1;
8870  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8871  double ampl = 0.;
8872  for (int ii = 0; ii < nTS; ii++) {
8873  int adc = qie10df[ii].adc();
8874  double ampldefault = adc2fC_QIE10[adc];
8875  ampl += ampldefault; //
8876  }
8878  // Digis:HF
8879  if (sub == 4) {
8880  h_error1_HF->Fill(double(error1), 1.);
8881  h_repetedcapid_HF->Fill(double(repetedcapid), 1.);
8882  if (error1 != 0) {
8883  // if(error1 !=0 || error2 !=0 || error3 !=0 ) {
8885  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
8886  h_amplError_HF->Fill(ampl, 1.);
8887  if (mdepth == 1)
8888  h_mapDepth1Error_HF->Fill(double(ieta), double(iphi));
8889  if (mdepth == 2)
8890  h_mapDepth2Error_HF->Fill(double(ieta), double(iphi));
8891  if (mdepth == 3)
8892  h_mapDepth3Error_HF->Fill(double(ieta), double(iphi));
8893  if (mdepth == 4)
8894  h_mapDepth4Error_HF->Fill(double(ieta), double(iphi));
8895  h_errorGeneral_HF->Fill(double(firstcapid), 1.);
8896  } else {
8897  h_amplFine_HF->Fill(ampl, 1.);
8898  }
8899  }
8900 }
8902 // ------------ method called for each event ------------
8904  CaloSamples toolOriginal; // TS
8905  HcalDetId cell(digiItr->id());
8906  int mdepth = cell.depth();
8907  int iphi = cell.iphi() - 1;
8908  int ieta = cell.ieta();
8909  if (ieta > 0)
8910  ieta -= 1;
8911  int sub = cell.subdet(); // 1-HB, 2-HE, 3-HO, 4-HF
8912  int errorGeneral = 0;
8913  int error1 = 0;
8914  int error2 = 0;
8915  int error3 = 0;
8916  int error4 = 0;
8917  int error5 = 0;
8918  int error6 = 0;
8919  int error7 = 0;
8920  // !!!!!!
8921  bool anycapid = true;
8922  bool anyer = false;
8923  bool anydv = true;
8924  // for help:
8925  int firstcapid = 0;
8926  int lastcapid = 0, capid = 0;
8927  int ERRORfiber = -10;
8928  int ERRORfiberChan = -10;
8929  int ERRORfiberAndChan = -10;
8930  int repetedcapid = 0;
8931  for (int ii = 0; ii < (*digiItr).size(); ii++) {
8932  capid = (*digiItr)[ii].capid(); // capId (0-3, sequential)
8933  bool er = (*digiItr)[ii].er(); // error
8934  bool dv = (*digiItr)[ii].dv(); // valid data
8935  int fiber = (*digiItr)[ii].fiber(); // get the fiber number
8936  int fiberChan = (*digiItr)[ii].fiberChan(); // get the fiber channel number
8937  int fiberAndChan = (*digiItr)[ii].fiberAndChan(); // get the id channel
8938  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
8939  anycapid = false;
8940  ERRORfiber = fiber;
8941  ERRORfiberChan = fiberChan;
8942  ERRORfiberAndChan = fiberAndChan;
8943  if (capid != lastcapid) {
8944  } else {
8945  repetedcapid = 1;
8946  }
8947  }
8948  lastcapid = capid;
8949 
8950  if (ii == 0)
8951  firstcapid = capid;
8952 
8953  if (er) {
8954  anyer = true;
8955  ERRORfiber = fiber;
8956  ERRORfiberChan = fiberChan;
8957  ERRORfiberAndChan = fiberAndChan;
8958  }
8959  if (!dv) {
8960  anydv = false;
8961  ERRORfiber = fiber;
8962  ERRORfiberChan = fiberChan;
8963  ERRORfiberAndChan = fiberAndChan;
8964  }
8965 
8966  } // for
8967 
8969  if (firstcapid == 0 && !anycapid)
8970  errorGeneral = 1;
8971  if (firstcapid == 1 && !anycapid)
8972  errorGeneral = 2;
8973  if (firstcapid == 2 && !anycapid)
8974  errorGeneral = 3;
8975  if (firstcapid == 3 && !anycapid)
8976  errorGeneral = 4;
8977  if (!anycapid)
8978  error1 = 1;
8979  if (anyer)
8980  error2 = 1;
8981  if (!anydv)
8982  error3 = 1;
8983 
8984  if (!anycapid && anyer)
8985  error4 = 1;
8986  if (!anycapid && !anydv)
8987  error5 = 1;
8988  if (!anycapid && anyer && !anydv)
8989  error6 = 1;
8990  if (anyer && !anydv)
8991  error7 = 1;
8993  // Energy:
8994  double ampl = 0.;
8995  for (int ii = 0; ii < (*digiItr).size(); ii++) {
8996  double ampldefault = adc2fC[digiItr->sample(ii).adc()];
8997  ampl += ampldefault; // fC
8998  }
9000  // Digis:
9001  // HO
9002  if (sub == 3) {
9003  h_errorGeneral_HO->Fill(double(errorGeneral), 1.);
9004  h_error1_HO->Fill(double(error1), 1.);
9005  h_error2_HO->Fill(double(error2), 1.);
9006  h_error3_HO->Fill(double(error3), 1.);
9007  h_error4_HO->Fill(double(error4), 1.);
9008  h_error5_HO->Fill(double(error5), 1.);
9009  h_error6_HO->Fill(double(error6), 1.);
9010  h_error7_HO->Fill(double(error7), 1.);
9011  h_repetedcapid_HO->Fill(double(repetedcapid), 1.);
9012 
9013  if (error1 != 0 || error2 != 0 || error3 != 0) {
9015  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9016  h_amplError_HO->Fill(ampl, 1.);
9017  if (mdepth == 4)
9018  h_mapDepth4Error_HO->Fill(double(ieta), double(iphi));
9019  // to be divided by h_mapDepth4_HO
9020 
9021  if (mdepth != 4)
9022  std::cout << " mdepth HO = " << mdepth << std::endl;
9023  h_fiber0_HO->Fill(double(ERRORfiber), 1.);
9024  h_fiber1_HO->Fill(double(ERRORfiberChan), 1.);
9025  h_fiber2_HO->Fill(double(ERRORfiberAndChan), 1.);
9026  } else {
9027  h_amplFine_HO->Fill(ampl, 1.);
9028  }
9029  }
9030 }
9033  CaloSamples toolOriginal; // TS
9034  double tool[100];
9035  double toolwithPedSubtr[100]; // TS
9036  double lintoolwithoutPedSubtr[100]; // TS
9037  HcalDetId cell(digiItr->id());
9038  int mdepth = cell.depth();
9039  int iphi = cell.iphi() - 1; // 0-71
9040  int ieta0 = cell.ieta(); //-41 +41 !=0
9041  int ieta = ieta0;
9042  if (ieta > 0)
9043  ieta -= 1; //-41 +41
9044  int sub = cell.subdet(); // 1-HB, 2-HE (HFDigiCollection: 4-HF)
9045  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
9046  const HcalGain* gain = conditions->getGain(cell);
9047  // const HcalGainWidth* gainWidth = conditions->getGainWidth(cell);
9048  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
9049  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
9050  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
9051  // HcalCalibrations calib = conditions->getHcalCalibrations(cell);
9052  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
9053  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
9054  HcalCoderDb coder(*channelCoder, *shape);
9055  if (useADCfC_)
9056  coder.adc2fC(*digiItr, toolOriginal);
9057  double pedestalaver9 = 0.;
9058  double pedestalaver4 = 0.;
9059  double pedestal0 = 0.;
9060  double pedestal1 = 0.;
9061  double pedestal2 = 0.;
9062  double pedestal3 = 0.;
9063  double pedestalwaver9 = 0.;
9064  double pedestalwaver4 = 0.;
9065  double pedestalw0 = 0.;
9066  double pedestalw1 = 0.;
9067  double pedestalw2 = 0.;
9068  double pedestalw3 = 0.;
9069  double difpedestal0 = 0.;
9070  double difpedestal1 = 0.;
9071  double difpedestal2 = 0.;
9072  double difpedestal3 = 0.;
9073 
9074  double amplitude = 0.;
9075  double absamplitude = 0.;
9076  double amplitude345 = 0.;
9077  double ampl = 0.;
9078  double linamplitudewithoutPedSubtr = 0.;
9079  double timew = 0.;
9080  double timeww = 0.;
9081  double max_signal = -100.;
9082  int ts_with_max_signal = -100;
9083  int c0 = 0;
9084  int c1 = 0;
9085  int c2 = 0;
9086  int c3 = 0;
9087  int c4 = 0;
9088  double errorBtype = 0.;
9089 
9090  int TSsize = 10; //HEHB for Run2
9091  TSsize = digiItr->size();
9092  if ((*digiItr).size() != 10)
9093  errorBtype = 1.;
9094  // ii = 0 to 9
9095  for (int ii = 0; ii < TSsize; ii++) {
9096  // for (int ii=0; ii<digiItr->size(); ii++) {
9097  double ampldefaultwithPedSubtr = 0.;
9098  double linampldefaultwithoutPedSubtr = 0.;
9099  double ampldefault = 0.;
9100  double ampldefault0 = 0.;
9101  double ampldefault1 = 0.;
9102  double ampldefault2 = 0.;
9103  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive ADCcounts
9104  if (useADCfC_)
9105  ampldefault1 = toolOriginal[ii]; //adcfC
9106  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts linearized
9107  if (useADCmassive_) {
9108  ampldefault = ampldefault0;
9109  }
9110  if (useADCfC_) {
9111  ampldefault = ampldefault1;
9112  }
9113  if (useADCcounts_) {
9114  ampldefault = ampldefault2;
9115  }
9116  ampldefaultwithPedSubtr = ampldefault0;
9117  linampldefaultwithoutPedSubtr = ampldefault2;
9118 
9119  int capid = ((*digiItr)[ii]).capid();
9120  // double pedestal = calib.pedestal(capid);
9121  double pedestalINI = pedestal00->getValue(capid);
9122  double pedestal = pedestal00->getValue(capid);
9123  double pedestalw = pedw->getSigma(capid, capid);
9124  ampldefaultwithPedSubtr -= pedestal; // pedestal subtraction
9126  ampldefault -= pedestal; // pedestal subtraction
9127  // ampldefault*= calib.respcorrgain(capid) ; // fC --> GeV
9128  tool[ii] = ampldefault;
9129  toolwithPedSubtr[ii] = ampldefaultwithPedSubtr;
9130  lintoolwithoutPedSubtr[ii] = linampldefaultwithoutPedSubtr;
9131 
9132  pedestalaver9 += pedestal;
9133  pedestalwaver9 += pedestalw * pedestalw;
9134 
9135  if (capid == 0 && c0 == 0) {
9136  c0++;
9137  c4++;
9138  pedestalaver4 += pedestal;
9139  pedestal0 = pedestal;
9140  pedestalw0 = pedestalw;
9141  pedestalwaver4 += pedestalw * pedestalw;
9142  difpedestal0 = pedestal - pedestalINI;
9143  }
9144 
9145  if (capid == 1 && c1 == 0) {
9146  c1++;
9147  c4++;
9148  pedestalaver4 += pedestal;
9149  pedestal1 = pedestal;
9150  pedestalw1 = pedestalw;
9151  pedestalwaver4 += pedestalw * pedestalw;
9152  difpedestal1 = pedestal - pedestalINI;
9153  }
9154  if (capid == 2 && c2 == 0) {
9155  c2++;
9156  c4++;
9157  pedestalaver4 += pedestal;
9158  pedestal2 = pedestal;
9159  pedestalw2 = pedestalw;
9160  pedestalwaver4 += pedestalw * pedestalw;
9161  difpedestal2 = pedestal - pedestalINI;
9162  }
9163  if (capid == 3 && c3 == 0) {
9164  c3++;
9165  c4++;
9166  pedestalaver4 += pedestal;
9167  pedestal3 = pedestal;
9168  pedestalw3 = pedestalw;
9169  pedestalwaver4 += pedestalw * pedestalw;
9170  difpedestal3 = pedestal - pedestalINI;
9171  }
9172 
9173  if (max_signal < ampldefault) {
9174  max_signal = ampldefault;
9175  ts_with_max_signal = ii;
9176  }
9178  // TS = 1 to 10: 1 2 3 4 5 6 7 8 9 10
9179  // ii = 0 to 9: 0 1 2 3 4 5 6 7 8 9
9180  // var.1 ----------------------
9181  // var.2 ----------------
9182  // var.3 ----------
9183  // var.4 -------
9184  //
9185  // TS = 2-9 for raddam only var.1
9186  // TS = 3-8 for raddam only var.2
9187  // TS = 4-7 for raddam only var.3
9188  // TS = 4-6 for raddam only var.4
9189  amplitude += ampldefault; //
9190  absamplitude += abs(ampldefault); //
9191 
9192  if (ii == 3 || ii == 4 || ii == 5)
9193  amplitude345 += ampldefault;
9194  if (flagcpuoptimization_ == 0) {
9196  } //flagcpuoptimization
9197  timew += (ii + 1) * abs(ampldefault);
9198  timeww += (ii + 1) * ampldefault;
9199  } //for 1
9201  // sub=1||2 HBHE
9202  if (sub == 1 || sub == 2) {
9203  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HBHE
9204  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HBHE
9205  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HBHE
9206  }
9207  pedestalaver9 /= TSsize;
9208  pedestalaver4 /= c4;
9209  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
9210  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
9211  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
9212  ampl = tool[ts_with_max_signal];
9213  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
9214  ampl += tool[ts_with_max_signal + 2];
9215  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
9216  ampl += tool[ts_with_max_signal + 1];
9217  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
9218  ampl += tool[ts_with_max_signal - 1];
9219 
9221  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
9222  linamplitudewithoutPedSubtr = lintoolwithoutPedSubtr[ts_with_max_signal];
9223  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
9224  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal + 2];
9225  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
9226  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal + 1];
9227  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
9228  linamplitudewithoutPedSubtr += lintoolwithoutPedSubtr[ts_with_max_signal - 1];
9229 
9230  double ratio = 0.;
9231  if (amplitude != 0.)
9232  ratio = ampl / amplitude;
9233  if (ratio < 0. || ratio > 1.02)
9234  ratio = 0.;
9235  double aveamplitude = 0.;
9236  double aveamplitudew = 0.;
9237  if (absamplitude > 0 && timew > 0)
9238  aveamplitude = timew / absamplitude; // average_TS +1
9239  if (amplitude > 0 && timeww > 0)
9240  aveamplitudew = timeww / amplitude; // average_TS +1
9241  double rmsamp = 0.;
9242  // and CapIdErrors:
9243  int error = 0;
9244  bool anycapid = true;
9245  bool anyer = false;
9246  bool anydv = true;
9247  int lastcapid = 0;
9248  int capid = 0;
9249  for (int ii = 0; ii < TSsize; ii++) {
9250  double aaaaaa = (ii + 1) - aveamplitudew;
9251  double aaaaaa2 = aaaaaa * aaaaaa;
9252  double ampldefault = tool[ii];
9253  rmsamp += (aaaaaa2 * ampldefault); // fC
9254  capid = ((*digiItr)[ii]).capid();
9255  bool er = (*digiItr)[ii].er(); // error
9256  bool dv = (*digiItr)[ii].dv(); // valid data
9257  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
9258  anycapid = false;
9259  }
9260  // std::cout << " ii = " << ii << " capid = " << capid << " ((lastcapid+1)%4) = " << ((lastcapid+1)%4) << std::endl;
9261  lastcapid = capid;
9262  if (er) {
9263  anyer = true;
9264  }
9265  if (!dv) {
9266  anydv = false;
9267  }
9268  } //for 2
9269  if (!anycapid || anyer || !anydv)
9270  error = 1;
9271 
9272  double rmsamplitude = 0.;
9273  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
9274  rmsamplitude = sqrt(rmsamp / amplitude);
9275  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
9276 
9277  // CapIdErrors end /////////////////////////////////////////////////////////
9278 
9279  // AZ 1.10.2015:
9280  if (error == 1) {
9281  if (sub == 1 && mdepth == 1)
9283  if (sub == 1 && mdepth == 2)
9285  if (sub == 2 && mdepth == 1)
9287  if (sub == 2 && mdepth == 2)
9289  if (sub == 2 && mdepth == 3)
9291  }
9292  if (error != 1) {
9293  if (sub == 1 && mdepth == 1)
9295  if (sub == 1 && mdepth == 2)
9297  if (sub == 2 && mdepth == 1)
9299  if (sub == 2 && mdepth == 2)
9301  if (sub == 2 && mdepth == 3)
9303  }
9304 
9305  for (int ii = 0; ii < TSsize; ii++) {
9306  // for (int ii=0; ii<10; ii++) {
9307  double ampldefault = tool[ii];
9309  if (sub == 1) {
9310  if (amplitude > 120) {
9311  h_shape_Ahigh_HB0->Fill(float(ii), ampldefault);
9312  h_shape0_Ahigh_HB0->Fill(float(ii), 1.);
9313  } else {
9314  h_shape_Alow_HB0->Fill(float(ii), ampldefault);
9315  h_shape0_Alow_HB0->Fill(float(ii), 1.);
9316  } //HB0
9318  if (pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
9319  pedestal3 < pedestalHBMax_) {
9320  h_shape_Ahigh_HB1->Fill(float(ii), ampldefault);
9321  h_shape0_Ahigh_HB1->Fill(float(ii), 1.);
9322  } else {
9323  h_shape_Alow_HB1->Fill(float(ii), ampldefault);
9324  h_shape0_Alow_HB1->Fill(float(ii), 1.);
9325  } //HB1
9326  if (error == 0) {
9327  h_shape_Ahigh_HB2->Fill(float(ii), ampldefault);
9328  h_shape0_Ahigh_HB2->Fill(float(ii), 1.);
9329  } else {
9330  h_shape_Alow_HB2->Fill(float(ii), ampldefault);
9331  h_shape0_Alow_HB2->Fill(float(ii), 1.);
9332  } //HB2
9334  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
9335  pedestalw3 < pedestalwHBMax_) {
9336  h_shape_Ahigh_HB3->Fill(float(ii), ampldefault);
9337  h_shape0_Ahigh_HB3->Fill(float(ii), 1.);
9338  } else {
9339  h_shape_Alow_HB3->Fill(float(ii), ampldefault);
9340  h_shape0_Alow_HB3->Fill(float(ii), 1.);
9341  } //HB3
9342 
9343  } // sub HB
9344 
9345  } //for 3 over TSs
9346 
9347  if (sub == 1) {
9348  // bad_channels with C,A,W,P,pW,
9349  if (error == 1 || amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_ || rmsamplitude < rmsHBMin_ ||
9350  rmsamplitude > rmsHBMax_ || pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ ||
9351  pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestalw0 < pedestalwHBMax_ ||
9352  pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ || pedestalw3 < pedestalwHBMax_) {
9353  for (int ii = 0; ii < TSsize; ii++) {
9354  double ampldefault = tool[ii];
9355  h_shape_bad_channels_HB->Fill(float(ii), ampldefault);
9356  h_shape0_bad_channels_HB->Fill(float(ii), 1.);
9357  }
9358  }
9359  // good_channels with C,A,W,P,pW
9360  else {
9361  for (int ii = 0; ii < TSsize; ii++) {
9362  double ampldefault = tool[ii];
9363  h_shape_good_channels_HB->Fill(float(ii), ampldefault);
9364  h_shape0_good_channels_HB->Fill(float(ii), 1.);
9365  }
9366  }
9367  } // sub HB
9368  if (sub == 2) {
9369  // bad_channels with C,A,W,P,pW,
9370  if (error == 1 || amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_ || rmsamplitude < rmsHEMin_ ||
9371  rmsamplitude > rmsHEMax_ || pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ ||
9372  pedestal2 < pedestalHEMax_ || pedestal3 < pedestalHEMax_ || pedestalw0 < pedestalwHEMax_ ||
9373  pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ || pedestalw3 < pedestalwHEMax_) {
9374  for (int ii = 0; ii < TSsize; ii++) {
9375  double ampldefault = tool[ii];
9376  h_shape_bad_channels_HE->Fill(float(ii), ampldefault);
9377  h_shape0_bad_channels_HE->Fill(float(ii), 1.);
9378  }
9379  }
9380  // good_channels with C,A,W,P,pW,
9381  else {
9382  for (int ii = 0; ii < TSsize; ii++) {
9383  double ampldefault = tool[ii];
9384  h_shape_good_channels_HE->Fill(float(ii), ampldefault);
9385  h_shape0_good_channels_HE->Fill(float(ii), 1.);
9386  }
9387  }
9388  } // sub HE
9389 
9391  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
9392  // for Error B-type
9393  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
9394  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
9395  // HB
9396  if (sub == 1) {
9398  // // // // // // // // // HB PedestalCorrelations :
9399  double mypedestal = pedestal0;
9400  double mypedestalw = pedestalw0;
9401  h2_pedvsampl_HB->Fill(mypedestal, amplitude);
9402  h2_pedwvsampl_HB->Fill(mypedestalw, amplitude);
9403  h_pedvsampl_HB->Fill(mypedestal, amplitude);
9404  h_pedwvsampl_HB->Fill(mypedestalw, amplitude);
9405  h_pedvsampl0_HB->Fill(mypedestal, 1.);
9406  h_pedwvsampl0_HB->Fill(mypedestalw, 1.);
9407 
9408  h2_amplvsped_HB->Fill(amplitude, mypedestal);
9409  h2_amplvspedw_HB->Fill(amplitude, mypedestalw);
9410  h_amplvsped_HB->Fill(amplitude, mypedestal);
9411  h_amplvspedw_HB->Fill(amplitude, mypedestalw);
9412  h_amplvsped0_HB->Fill(amplitude, 1.);
9413  } //
9414  // // // // // // // // // HB Pedestals:
9415  if (studyPedestalsHist_) {
9416  h_pedestal0_HB->Fill(pedestal0, 1.);
9417  h_pedestal1_HB->Fill(pedestal1, 1.);
9418  h_pedestal2_HB->Fill(pedestal2, 1.);
9419  h_pedestal3_HB->Fill(pedestal3, 1.);
9420  h_pedestalaver4_HB->Fill(pedestalaver4, 1.);
9421  h_pedestalaver9_HB->Fill(pedestalaver9, 1.);
9422  h_pedestalw0_HB->Fill(pedestalw0, 1.);
9423  h_pedestalw1_HB->Fill(pedestalw1, 1.);
9424  h_pedestalw2_HB->Fill(pedestalw2, 1.);
9425  h_pedestalw3_HB->Fill(pedestalw3, 1.);
9426  h_pedestalwaver4_HB->Fill(pedestalwaver4, 1.);
9427  h_pedestalwaver9_HB->Fill(pedestalwaver9, 1.);
9428  // for averaged values:
9429  if (mdepth == 1) {
9430  h_mapDepth1Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
9431  h_mapDepth1Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
9432  h_mapDepth1Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
9433  h_mapDepth1Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
9434  h_mapDepth1Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
9435  h_mapDepth1Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
9436  h_mapDepth1Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
9437  h_mapDepth1Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
9438  }
9439  if (mdepth == 2) {
9440  h_mapDepth2Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
9441  h_mapDepth2Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
9442  h_mapDepth2Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
9443  h_mapDepth2Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
9444  h_mapDepth2Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
9445  h_mapDepth2Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
9446  h_mapDepth2Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
9447  h_mapDepth2Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
9448  }
9449  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
9450  pedestalw3 < pedestalwHBMax_) {
9451  if (mdepth == 1)
9452  h_mapDepth1pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9453  if (mdepth == 2)
9454  h_mapDepth2pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9455  if (mdepth == 3)
9456  h_mapDepth3pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9457  if (mdepth == 4)
9458  h_mapDepth4pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
9459  }
9460  if (pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
9461  pedestal3 < pedestalHBMax_) {
9462  if (mdepth == 1)
9463  h_mapDepth1pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9464  if (mdepth == 2)
9465  h_mapDepth2pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9466  if (mdepth == 3)
9467  h_mapDepth3pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9468  if (mdepth == 4)
9469  h_mapDepth4pedestal_HB->Fill(double(ieta), double(iphi), 1.);
9470  }
9471  for (int ii = 0; ii < TSsize; ii++) {
9472  h_pedestal00_HB->Fill(pedestal00->getValue(ii), 1.);
9473  h_gain_HB->Fill(gain->getValue(ii), 1.);
9474  }
9475  h_respcorr_HB->Fill(respcorr->getValue(), 1.);
9476  h_timecorr_HB->Fill(timecorr->getValue(), 1.);
9477  h_lutcorr_HB->Fill(lutcorr->getValue(), 1.);
9478  h_difpedestal0_HB->Fill(difpedestal0, 1.);
9479  h_difpedestal1_HB->Fill(difpedestal1, 1.);
9480  h_difpedestal2_HB->Fill(difpedestal2, 1.);
9481  h_difpedestal3_HB->Fill(difpedestal3, 1.);
9482  } //
9483  // // // // // // // // // HB ADCAmpl:
9484  if (studyADCAmplHist_) {
9485  h_ADCAmpl345Zoom_HB->Fill(amplitude345, 1.);
9486  h_ADCAmpl345Zoom1_HB->Fill(amplitude345, 1.);
9487  h_ADCAmpl345_HB->Fill(amplitude345, 1.);
9488  if (error == 0) {
9490  h_ADCAmpl345_HBCapIdNoError->Fill(amplitude345, 1.);
9491  }
9492  if (error == 1) {
9493  h_ADCAmpl_HBCapIdError->Fill(amplitude, 1.);
9494  h_ADCAmpl345_HBCapIdError->Fill(amplitude345, 1.);
9495  }
9496  h_ADCAmplZoom_HB->Fill(amplitude, 1.);
9497  h_ADCAmplZoom1_HB->Fill(amplitude, 1.);
9498  h_ADCAmpl_HB->Fill(amplitude, 1.);
9499 
9500  h_AmplitudeHBrest->Fill(amplitude, 1.);
9501  h_AmplitudeHBrest1->Fill(amplitude, 1.);
9502  h_AmplitudeHBrest6->Fill(amplitude, 1.);
9503 
9504  if (amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_) {
9506  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9507  if (mdepth == 1)
9508  h_mapDepth1ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
9509  if (mdepth == 2)
9510  h_mapDepth2ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
9511  } // if
9512  // if(amplitude >400.) averSIGNALoccupancy_HB += 1.;
9513  if (amplitude < 35.) {
9514  if (mdepth == 1)
9515  h_mapDepth1ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
9516  if (mdepth == 2)
9517  h_mapDepth2ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
9518  } // if
9519  // for averaged values:
9520  if (mdepth == 1)
9521  h_mapDepth1ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
9522  if (mdepth == 2)
9523  h_mapDepth2ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
9524  if (mdepth == 1)
9525  h_mapDepth1ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
9526  if (mdepth == 2)
9527  h_mapDepth2ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
9528  h_bcnvsamplitude_HB->Fill(float(bcn), amplitude);
9529  h_bcnvsamplitude0_HB->Fill(float(bcn), 1.);
9531  h_orbitNumvsamplitude0_HB->Fill(float(orbitNum), 1.);
9533  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
9534  } //if(studyADCAmplHist_
9536 
9537  // // // // // // // // // HB TSmean:
9538  if (studyTSmeanShapeHist_) {
9539  h_TSmeanA_HB->Fill(aveamplitude1, 1.);
9540  // h2_TSnVsAyear2023_HB->Fill(25.*aveamplitude1, amplitude);
9541  h2_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
9542  h1_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
9543  h1_TSnVsAyear20230_HB->Fill(amplitude, 1.);
9544  if (aveamplitude1 < TSmeanHBMin_ || aveamplitude1 > TSmeanHBMax_) {
9546  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9547  if (mdepth == 1)
9548  h_mapDepth1TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
9549  if (mdepth == 2)
9550  h_mapDepth2TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
9551  } // if
9552  // for averaged values:
9553  if (mdepth == 1)
9554  h_mapDepth1TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
9555  if (mdepth == 2)
9556  h_mapDepth2TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
9558  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
9559  } //if(studyTSmeanShapeHist_
9561 
9562  // // // // // // // // // HB TSmax:
9563  if (studyTSmaxShapeHist_) {
9564  h_TSmaxA_HB->Fill(float(ts_with_max_signal), 1.);
9565  if (ts_with_max_signal < TSpeakHBMin_ || ts_with_max_signal > TSpeakHBMax_) {
9567  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9568  if (mdepth == 1)
9569  h_mapDepth1TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
9570  if (mdepth == 2)
9571  h_mapDepth2TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
9572  } // if
9573  // for averaged values:
9574  if (mdepth == 1)
9575  h_mapDepth1TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9576  if (mdepth == 2)
9577  h_mapDepth2TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9579  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
9580  } //if(studyTSmaxShapeHist_
9582 
9583  // // // // // // // // // HB RMS:
9584  if (studyRMSshapeHist_) {
9585  h_Amplitude_HB->Fill(rmsamplitude, 1.);
9586  if (rmsamplitude < rmsHBMin_ || rmsamplitude > rmsHBMax_) {
9588  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9589  if (mdepth == 1)
9590  h_mapDepth1Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
9591  if (mdepth == 2)
9592  h_mapDepth2Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
9593  } // if
9594  // for averaged values:
9595  if (mdepth == 1)
9596  h_mapDepth1Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
9597  if (mdepth == 2)
9598  h_mapDepth2Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
9600  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
9601  } //if(studyRMSshapeHist_)
9603 
9604  // // // // // // // // // HB Ratio:
9605  if (studyRatioShapeHist_) {
9606  h_Ampl_HB->Fill(ratio, 1.);
9607  if (ratio < ratioHBMin_ || ratio > ratioHBMax_) {
9609  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9610  if (mdepth == 1)
9611  h_mapDepth1Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
9612  if (mdepth == 2)
9613  h_mapDepth2Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
9614  // //
9615  } //if(ratio
9616  // for averaged values:
9617  if (mdepth == 1)
9618  h_mapDepth1Ampl_HB->Fill(double(ieta), double(iphi), ratio);
9619  if (mdepth == 2)
9620  h_mapDepth2Ampl_HB->Fill(double(ieta), double(iphi), ratio);
9622  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
9623  } //if(studyRatioShapeHist_)
9625 
9626  // // // // // // // // // HB DiffAmplitude:
9627  if (studyDiffAmplHist_) {
9628  if (mdepth == 1)
9629  h_mapDepth1AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
9630  if (mdepth == 2)
9631  h_mapDepth2AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
9632  } // if(studyDiffAmplHist_)
9633 
9635  if (mdepth == 1)
9636  h_mapDepth1_HB->Fill(double(ieta), double(iphi), 1.);
9637  if (mdepth == 2)
9638  h_mapDepth2_HB->Fill(double(ieta), double(iphi), 1.);
9639  } //if ( sub == 1 )
9640 
9641  // HE
9642  if (sub == 2) {
9643  // // // // // // // // // HE PedestalCorrelations :
9645  double mypedestal = pedestal0;
9646  double mypedestalw = pedestalw0;
9647  h2_pedvsampl_HE->Fill(mypedestal, amplitude);
9648  h2_pedwvsampl_HE->Fill(mypedestalw, amplitude);
9649  h_pedvsampl_HE->Fill(mypedestal, amplitude);
9650  h_pedwvsampl_HE->Fill(mypedestalw, amplitude);
9651  h_pedvsampl0_HE->Fill(mypedestal, 1.);
9652  h_pedwvsampl0_HE->Fill(mypedestalw, 1.);
9653  } //
9654  // // // // // // // // // HE Pedestals:
9655  if (studyPedestalsHist_) {
9656  h_pedestal0_HE->Fill(pedestal0, 1.);
9657  h_pedestal1_HE->Fill(pedestal1, 1.);
9658  h_pedestal2_HE->Fill(pedestal2, 1.);
9659  h_pedestal3_HE->Fill(pedestal3, 1.);
9660  h_pedestalaver4_HE->Fill(pedestalaver4, 1.);
9661  h_pedestalaver9_HE->Fill(pedestalaver9, 1.);
9662  h_pedestalw0_HE->Fill(pedestalw0, 1.);
9663  h_pedestalw1_HE->Fill(pedestalw1, 1.);
9664  h_pedestalw2_HE->Fill(pedestalw2, 1.);
9665  h_pedestalw3_HE->Fill(pedestalw3, 1.);
9666  h_pedestalwaver4_HE->Fill(pedestalwaver4, 1.);
9667  h_pedestalwaver9_HE->Fill(pedestalwaver9, 1.);
9668  // for averaged values:
9669  if (mdepth == 1) {
9670  h_mapDepth1Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9671  h_mapDepth1Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9672  h_mapDepth1Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9673  h_mapDepth1Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9674  h_mapDepth1Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9675  h_mapDepth1Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9676  h_mapDepth1Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9677  h_mapDepth1Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9678  }
9679  if (mdepth == 2) {
9680  h_mapDepth2Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9681  h_mapDepth2Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9682  h_mapDepth2Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9683  h_mapDepth2Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9684  h_mapDepth2Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9685  h_mapDepth2Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9686  h_mapDepth2Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9687  h_mapDepth2Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9688  }
9689  if (mdepth == 3) {
9690  h_mapDepth3Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
9691  h_mapDepth3Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
9692  h_mapDepth3Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
9693  h_mapDepth3Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
9694  h_mapDepth3Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
9695  h_mapDepth3Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
9696  h_mapDepth3Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
9697  h_mapDepth3Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
9698  }
9699  if (pedestalw0 < pedestalwHEMax_ || pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ ||
9700  pedestalw3 < pedestalwHEMax_) {
9701  if (mdepth == 1)
9702  h_mapDepth1pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9703  if (mdepth == 2)
9704  h_mapDepth2pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9705  if (mdepth == 3)
9706  h_mapDepth3pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
9707  }
9708  if (pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ || pedestal2 < pedestalHEMax_ ||
9709  pedestal3 < pedestalHEMax_) {
9710  if (mdepth == 1)
9711  h_mapDepth1pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9712  if (mdepth == 2)
9713  h_mapDepth2pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9714  if (mdepth == 3)
9715  h_mapDepth3pedestal_HE->Fill(double(ieta), double(iphi), 1.);
9716  }
9717  for (int ii = 0; ii < TSsize; ii++) {
9718  h_pedestal00_HE->Fill(pedestal00->getValue(ii), 1.);
9719  h_gain_HE->Fill(gain->getValue(ii), 1.);
9720  }
9721  h_respcorr_HE->Fill(respcorr->getValue(), 1.);
9722  h_timecorr_HE->Fill(timecorr->getValue(), 1.);
9723  h_lutcorr_HE->Fill(lutcorr->getValue(), 1.);
9724  } //
9725 
9726  // h_mapDepth1ADCAmpl12SiPM_HE
9727  // // // // // // // // // HE ADCAmpl:
9728  if (studyADCAmplHist_) {
9729  h_ADCAmpl345Zoom_HE->Fill(ampl, 1.);
9730  h_ADCAmpl345Zoom1_HE->Fill(amplitude345, 1.);
9731  h_ADCAmpl345_HE->Fill(amplitude345, 1.);
9732  h_ADCAmpl_HE->Fill(amplitude, 1.);
9733 
9734  h_ADCAmplrest_HE->Fill(amplitude, 1.);
9735  h_ADCAmplrest1_HE->Fill(amplitude, 1.);
9736  h_ADCAmplrest6_HE->Fill(amplitude, 1.);
9737 
9738  h_ADCAmplZoom1_HE->Fill(amplitude, 1.);
9739  if (amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_) {
9741  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9742  if (mdepth == 1)
9743  h_mapDepth1ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9744  if (mdepth == 2)
9745  h_mapDepth2ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9746  if (mdepth == 3)
9747  h_mapDepth3ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
9748  } // if
9749  // if(amplitude > 700.) averSIGNALoccupancy_HE += 1.;
9750  if (amplitude < 500.) {
9751  if (mdepth == 1)
9752  h_mapDepth1ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9753  if (mdepth == 2)
9754  h_mapDepth2ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9755  if (mdepth == 3)
9756  h_mapDepth3ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
9757  } // if
9758  // for averaged values:
9759  if (mdepth == 1)
9760  h_mapDepth1ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9761  if (mdepth == 2)
9762  h_mapDepth2ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9763  if (mdepth == 3)
9764  h_mapDepth3ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
9765 
9766  if (mdepth == 1) {
9767  h_mapDepth1ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9768  h_mapDepth1linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9769  }
9770  if (mdepth == 2) {
9771  h_mapDepth2ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9772  h_mapDepth2linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9773  }
9774  if (mdepth == 3) {
9775  h_mapDepth3ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
9776  h_mapDepth3linADCAmpl12_HE->Fill(double(ieta), double(iphi), linamplitudewithoutPedSubtr);
9777  }
9778 
9781  h_bcnvsamplitude_HE->Fill(float(bcn), amplitude);
9782  h_bcnvsamplitude0_HE->Fill(float(bcn), 1.);
9784  h_orbitNumvsamplitude0_HE->Fill(float(orbitNum), 1.);
9785 
9787 
9789  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
9790 
9791  } //if(studyADCAmplHist_
9793  // // // // // // // // // HE TSmean:
9794  if (studyTSmeanShapeHist_) {
9795  h_TSmeanA_HE->Fill(aveamplitude1, 1.);
9796  // h2_TSnVsAyear2023_HE->Fill(25.*aveamplitude1, amplitude);
9797  h2_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
9798  h1_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
9799  h1_TSnVsAyear20230_HE->Fill(amplitude, 1.);
9800  if (aveamplitude1 < TSmeanHEMin_ || aveamplitude1 > TSmeanHEMax_) {
9802  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9803  if (mdepth == 1)
9804  h_mapDepth1TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9805  if (mdepth == 2)
9806  h_mapDepth2TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9807  if (mdepth == 3)
9808  h_mapDepth3TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
9809  } // if
9810  // for averaged values:
9811  if (mdepth == 1)
9812  h_mapDepth1TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9813  if (mdepth == 2)
9814  h_mapDepth2TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9815  if (mdepth == 3)
9816  h_mapDepth3TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
9818  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
9819  } //if(studyTSmeanShapeHist_) {
9821  // // // // // // // // // HE TSmax:
9822  if (studyTSmaxShapeHist_) {
9823  h_TSmaxA_HE->Fill(float(ts_with_max_signal), 1.);
9824  if (ts_with_max_signal < TSpeakHEMin_ || ts_with_max_signal > TSpeakHEMax_) {
9826  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9827  if (mdepth == 1)
9828  h_mapDepth1TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9829  if (mdepth == 2)
9830  h_mapDepth2TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9831  if (mdepth == 3)
9832  h_mapDepth3TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
9833  } // if
9834  // for averaged values:
9835  if (mdepth == 1)
9836  h_mapDepth1TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9837  if (mdepth == 2)
9838  h_mapDepth2TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9839  if (mdepth == 3)
9840  h_mapDepth3TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
9842  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
9843  } //if(studyTSmaxShapeHist_) {
9845  // // // // // // // // // HE RMS:
9846  if (studyRMSshapeHist_) {
9847  h_Amplitude_HE->Fill(rmsamplitude, 1.);
9848  if (rmsamplitude < rmsHEMin_ || rmsamplitude > rmsHEMax_) {
9850  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9851  if (mdepth == 1)
9852  h_mapDepth1Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9853  if (mdepth == 2)
9854  h_mapDepth2Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9855  if (mdepth == 3)
9856  h_mapDepth3Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
9857  }
9858  // for averaged values:
9859  if (mdepth == 1)
9860  h_mapDepth1Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9861  if (mdepth == 2)
9862  h_mapDepth2Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9863  if (mdepth == 3)
9864  h_mapDepth3Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
9866  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
9867  } //if(studyRMSshapeHist_)
9869 
9870  // // // // // // // // // HE Ratio:
9871  if (studyRatioShapeHist_) {
9872  h_Ampl_HE->Fill(ratio, 1.);
9873  if (ratio < ratioHEMin_ || ratio > ratioHEMax_) {
9875  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
9876  if (mdepth == 1)
9877  h_mapDepth1Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9878  if (mdepth == 2)
9879  h_mapDepth2Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9880  if (mdepth == 3)
9881  h_mapDepth3Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
9882  }
9883  // for averaged values:
9884  if (mdepth == 1)
9885  h_mapDepth1Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9886  if (mdepth == 2)
9887  h_mapDepth2Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9888  if (mdepth == 3)
9889  h_mapDepth3Ampl_HE->Fill(double(ieta), double(iphi), ratio);
9891  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
9892  } //if(studyRatioShapeHist_)
9894  // // // // // // // // // HE DiffAmplitude:
9895  if (studyDiffAmplHist_) {
9896  // gain stability:
9897  if (mdepth == 1)
9898  h_mapDepth1AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9899  if (mdepth == 2)
9900  h_mapDepth2AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9901  if (mdepth == 3)
9902  h_mapDepth3AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
9903 
9904  } // if(studyDiffAmplHist_)
9905 
9906  // RADDAM filling:
9907  if (flagLaserRaddam_ > 0) {
9908  double amplitudewithPedSubtr = 0.;
9909 
9910  //for cut on A_channel:
9911  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
9912  amplitudewithPedSubtr = toolwithPedSubtr[ts_with_max_signal];
9913  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
9914  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal + 2];
9915  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
9916  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal + 1];
9917  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
9918  amplitudewithPedSubtr += toolwithPedSubtr[ts_with_max_signal - 1];
9919 
9920  h_AamplitudewithPedSubtr_RADDAM_HE->Fill(amplitudewithPedSubtr);
9921  h_AamplitudewithPedSubtr_RADDAM_HEzoom0->Fill(amplitudewithPedSubtr);
9922  h_AamplitudewithPedSubtr_RADDAM_HEzoom1->Fill(amplitudewithPedSubtr);
9923 
9924  if (amplitudewithPedSubtr > 50.) {
9925  if (flagLaserRaddam_ > 1) {
9926  mapRADDAM_HE[mdepth - 1][ieta + 41][iphi] += amplitudewithPedSubtr;
9927  ++mapRADDAM0_HE[mdepth - 1][ieta + 41][iphi];
9928  }
9929 
9930  if (mdepth == 1) {
9931  h_mapDepth1RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9932  h_mapDepth1RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9933  h_A_Depth1RADDAM_HE->Fill(amplitudewithPedSubtr);
9934  }
9935  if (mdepth == 2) {
9936  h_mapDepth2RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9937  h_mapDepth2RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9938  h_A_Depth2RADDAM_HE->Fill(amplitudewithPedSubtr);
9939  }
9940  if (mdepth == 3) {
9941  h_mapDepth3RADDAM_HE->Fill(double(ieta), double(iphi), amplitudewithPedSubtr);
9942  h_mapDepth3RADDAM0_HE->Fill(double(ieta), double(iphi), 1.);
9943  h_A_Depth3RADDAM_HE->Fill(amplitudewithPedSubtr);
9944  }
9945 
9946  // (d1 & eta 17-29) L1
9947  int LLLLLL111111 = 0;
9948  if ((mdepth == 1 && fabs(ieta0) > 16 && fabs(ieta0) < 30))
9949  LLLLLL111111 = 1;
9950  // (d2 & eta 17-26) && (d3 & eta 27-28) L2
9951  int LLLLLL222222 = 0;
9952  if ((mdepth == 2 && fabs(ieta0) > 16 && fabs(ieta0) < 27) ||
9953  (mdepth == 3 && fabs(ieta0) > 26 && fabs(ieta0) < 29))
9954  LLLLLL222222 = 1;
9955  //
9956  if (LLLLLL111111 == 1) {
9957  //forStudy h_mapLayer1RADDAM_HE->Fill(fabs(double(ieta0)), amplitudewithPedSubtr); h_mapLayer1RADDAM0_HE->Fill(fabs(double(ieta0)), 1.); h_A_Layer1RADDAM_HE->Fill(amplitudewithPedSubtr);
9958  h_sigLayer1RADDAM_HE->Fill(double(ieta0), amplitudewithPedSubtr);
9959  h_sigLayer1RADDAM0_HE->Fill(double(ieta0), 1.);
9960  }
9961  if (LLLLLL222222 == 1) {
9962  //forStudy h_mapLayer2RADDAM_HE->Fill(fabs(double(ieta0)), amplitudewithPedSubtr); h_mapLayer2RADDAM0_HE->Fill(fabs(double(ieta0)), 1.); h_A_Layer2RADDAM_HE->Fill(amplitudewithPedSubtr);
9963  h_sigLayer2RADDAM_HE->Fill(double(ieta0), amplitudewithPedSubtr);
9964  h_sigLayer2RADDAM0_HE->Fill(double(ieta0), 1.);
9965  }
9966 
9967  //
9968  if (mdepth == 3 && fabs(ieta0) == 16) {
9969  h_mapDepth3RADDAM16_HE->Fill(amplitudewithPedSubtr);
9970  // forStudy h_mapDepth3RADDAM160_HE->Fill(1.);
9971  }
9972  //
9973  } //amplitude > 60.
9974  } // END RADDAM
9975 
9977  if (mdepth == 1)
9978  h_mapDepth1_HE->Fill(double(ieta), double(iphi), 1.);
9979  if (mdepth == 2)
9980  h_mapDepth2_HE->Fill(double(ieta), double(iphi), 1.);
9981  if (mdepth == 3)
9982  h_mapDepth3_HE->Fill(double(ieta), double(iphi), 1.);
9983  } //if ( sub == 2 )
9984  //
9985 } // fillDigiAmplitude
9989  CaloSamples toolOriginal; // TS
9990  double tool[100];
9991  DetId detid = qie11df.detid();
9992  HcalDetId hcaldetid = HcalDetId(detid);
9993  int ieta = hcaldetid.ieta();
9994  if (ieta > 0)
9995  ieta -= 1;
9996  int iphi = hcaldetid.iphi() - 1;
9997  int mdepth = hcaldetid.depth();
9998  int sub = hcaldetid.subdet(); // 1-HB, 2-HE QIE11DigiCollection
9999  nTS = qie11df.samples();
10001  if (mdepth == 0 || sub > 4)
10002  return;
10003  if (mdepth > 3 && flagupgradeqie1011_ == 3)
10004  return;
10005  if (mdepth > 3 && flagupgradeqie1011_ == 7)
10006  return;
10007  if (mdepth > 3 && flagupgradeqie1011_ == 8)
10008  return;
10009  if (mdepth > 3 && flagupgradeqie1011_ == 9)
10010  return;
10011 
10012  // for some CMSSW versions and GT this line uncommented, can help to run job
10013  //if(mdepth ==4 && sub==1 && (ieta == -16 || ieta == 15) ) return;// HB depth4 eta=-16, 15 since I did:if(ieta > 0) ieta -= 1;
10016  const HcalGain* gain = conditions->getGain(hcaldetid);
10017  // const HcalGainWidth* gainWidth = conditions->getGainWidth(hcaldetid);
10018  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(hcaldetid);
10019  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(hcaldetid);
10020  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(hcaldetid);
10021  const HcalQIECoder* channelCoder = conditions->getHcalCoder(hcaldetid);
10022  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(hcaldetid);
10023  const HcalPedestal* pedestal00 = conditions->getPedestal(hcaldetid);
10024  HcalCoderDb coder(*channelCoder, *shape);
10025  if (useADCfC_)
10026  coder.adc2fC(qie11df, toolOriginal);
10027  double pedestalaver9 = 0.;
10028  double pedestalaver4 = 0.;
10029  double pedestal0 = 0.;
10030  double pedestal1 = 0.;
10031  double pedestal2 = 0.;
10032  double pedestal3 = 0.;
10033  double pedestalwaver9 = 0.;
10034  double pedestalwaver4 = 0.;
10035  double pedestalw0 = 0.;
10036  double pedestalw1 = 0.;
10037  double pedestalw2 = 0.;
10038  double pedestalw3 = 0.;
10039  double difpedestal0 = 0.;
10040  double difpedestal1 = 0.;
10041  double difpedestal2 = 0.;
10042  double difpedestal3 = 0.;
10043 
10044  double amplitude = 0.;
10045  double amplitude0 = 0.;
10046  double absamplitude = 0.;
10047  double tocampl = 0.;
10048 
10049  double amplitude345 = 0.;
10050  double ampl = 0.;
10051  double ampl3ts = 0.;
10052  double timew = 0.;
10053  double timeww = 0.;
10054  double max_signal = -100.;
10055  int ts_with_max_signal = -100;
10056  int c0 = 0;
10057  int c1 = 0;
10058  int c2 = 0;
10059  int c3 = 0;
10060  int c4 = 0;
10061  double errorBtype = 0.;
10062 
10063  int TSsize = 8; // sub= 1 HB
10064  if (sub == 2)
10065  TSsize = 8; // sub = 2 HE
10066  if (nTS != TSsize)
10067  errorBtype = 1.;
10068  TSsize = nTS; //nTS = qie11df.samples();
10070  // double ADC_ped = 0.;
10071  int flagTS2 = 0;
10072  for (int ii = 0; ii < TSsize; ii++) {
10073  double ampldefault = 0.;
10074  double tocdefault = 0.;
10075  double ampldefault0 = 0.;
10076  double ampldefault1 = 0.;
10077  double ampldefault2 = 0.;
10078 
10079  ampldefault0 = adc2fC_QIE11_shunt6[qie11df[ii].adc()]; // massive !!!!!! (use for local runs as default shunt6)
10080  if (flaguseshunt_ == 1)
10081  ampldefault0 = adc2fC_QIE11_shunt1[qie11df[ii].adc()]; // massive !!!!!!
10082  if (useADCfC_)
10083  ampldefault1 = toolOriginal[ii]; //adcfC
10084  ampldefault2 = qie11df[ii].adc(); //ADCcounts
10085 
10086  if (useADCmassive_) {
10087  ampldefault = ampldefault0;
10088  } // !!!!!!
10089  if (useADCfC_) {
10090  ampldefault = ampldefault1;
10091  }
10092  if (useADCcounts_) {
10093  ampldefault = ampldefault2;
10094  }
10095  tocdefault = ampldefault;
10096 
10097  int capid = (qie11df[ii]).capid();
10098  double pedestal = pedestal00->getValue(capid);
10099  double pedestalw = pedw->getSigma(capid, capid);
10100  double pedestalINI = pedestal00->getValue(capid);
10101  tocdefault -= pedestal; // pedestal subtraction
10103  ampldefault -= pedestal; // pedestal subtraction
10104  tool[ii] = ampldefault;
10105  pedestalaver9 += pedestal;
10106  pedestalwaver9 += pedestalw * pedestalw;
10107 
10108  if (capid == 0 && c0 == 0) {
10109  c0++;
10110  c4++;
10111  pedestalaver4 += pedestal;
10112  pedestal0 = pedestal;
10113  pedestalw0 = pedestalw;
10114  pedestalwaver4 += pedestalw * pedestalw;
10115  difpedestal0 = pedestal - pedestalINI;
10116  }
10117 
10118  if (capid == 1 && c1 == 0) {
10119  c1++;
10120  c4++;
10121  pedestalaver4 += pedestal;
10122  pedestal1 = pedestal;
10123  pedestalw1 = pedestalw;
10124  pedestalwaver4 += pedestalw * pedestalw;
10125  difpedestal1 = pedestal - pedestalINI;
10126  }
10127  if (capid == 2 && c2 == 0) {
10128  c2++;
10129  c4++;
10130  pedestalaver4 += pedestal;
10131  pedestal2 = pedestal;
10132  pedestalw2 = pedestalw;
10133  pedestalwaver4 += pedestalw * pedestalw;
10134  difpedestal2 = pedestal - pedestalINI;
10135  }
10136  if (capid == 3 && c3 == 0) {
10137  c3++;
10138  c4++;
10139  pedestalaver4 += pedestal;
10140  pedestal3 = pedestal;
10141  pedestalw3 = pedestalw;
10142  pedestalwaver4 += pedestalw * pedestalw;
10143  difpedestal3 = pedestal - pedestalINI;
10144  }
10145 
10146  if (max_signal < ampldefault) {
10147  max_signal = ampldefault;
10148  ts_with_max_signal = ii;
10149  }
10150  amplitude += ampldefault; //
10151  absamplitude += abs(ampldefault); //
10152  tocampl += tocdefault; //
10153 
10154  if (ii == 1 || ii == 2 || ii == 3 || ii == 4 || ii == 5 || ii == 6 || ii == 7 || ii == 8)
10155  amplitude345 += ampldefault;
10156 
10157  if (flagcpuoptimization_ == 0) {
10158  } //flagcpuoptimization
10159 
10160  timew += (ii + 1) * abs(ampldefault);
10161  timeww += (ii + 1) * ampldefault;
10162 
10163  if (ii == 2 && ampldefault > 0.)
10164  flagTS2 = 1;
10165  } //for 1
10167  amplitude0 = amplitude;
10168 
10169  pedestalaver9 /= TSsize;
10170  pedestalaver4 /= c4;
10171  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
10172  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
10173 
10174  // ------------ to get signal in TS: -2 max +1 ------------
10175  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize) {
10176  ampl = tool[ts_with_max_signal];
10177  ampl3ts = tool[ts_with_max_signal];
10178  }
10179  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize) {
10180  ampl += tool[ts_with_max_signal - 1];
10181  ampl3ts += tool[ts_with_max_signal - 1];
10182  }
10183  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize) {
10184  ampl += tool[ts_with_max_signal + 1];
10185  ampl3ts += tool[ts_with_max_signal + 1];
10186  }
10187  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize) {
10188  ampl += tool[ts_with_max_signal + 2];
10189  }
10190  // HE charge correction for SiPMs:
10191  if (flagsipmcorrection_ != 0) {
10192  if (sub == 2) {
10193  double xa = amplitude / 40.;
10194  double xb = ampl / 40.;
10195  double xc = amplitude345 / 40.;
10196  double xd = ampl3ts / 40.;
10197  double txa = tocampl / 40.;
10198  // ADDI case:
10199  if (((ieta == -16 || ieta == 15) && mdepth == 4) ||
10200  ((ieta == -17 || ieta == 16) && (mdepth == 2 || mdepth == 3)) ||
10201  ((ieta == -18 || ieta == 17) && mdepth == 5)) {
10202  double c0 = 1.000000;
10203  double b1 = 2.59096e-05;
10204  double a2 = 4.60721e-11;
10205  double corrforxa = a2 * xa * xa + b1 * xa + c0;
10206  double corrforxb = a2 * xb * xb + b1 * xb + c0;
10207  double corrforxc = a2 * xc * xc + b1 * xc + c0;
10208  double corrforxd = a2 * xd * xd + b1 * xd + c0;
10209  double corrfortxa = a2 * txa * txa + b1 * txa + c0;
10210  h_corrforxaADDI_HE->Fill(amplitude, corrforxa);
10211  h_corrforxaADDI0_HE->Fill(amplitude, 1.);
10212  amplitude *= corrforxa;
10213  ampl *= corrforxb;
10214  amplitude345 *= corrforxc;
10215  ampl3ts *= corrforxd;
10216  tocampl *= corrfortxa;
10217  }
10218  // MAIN case:
10219  else {
10220  double c0 = 1.000000;
10221  double b1 = 2.71238e-05;
10222  double a2 = 1.32877e-10;
10223  double corrforxa = a2 * xa * xa + b1 * xa + c0;
10224  double corrforxb = a2 * xb * xb + b1 * xb + c0;
10225  double corrforxc = a2 * xc * xc + b1 * xc + c0;
10226  double corrforxd = a2 * xd * xd + b1 * xd + c0;
10227  double corrfortxa = a2 * txa * txa + b1 * txa + c0;
10228  h_corrforxaMAIN_HE->Fill(amplitude, corrforxa);
10229  h_corrforxaMAIN0_HE->Fill(amplitude, 1.);
10230  amplitude *= corrforxa;
10231  ampl *= corrforxb;
10232  amplitude345 *= corrforxc;
10233  ampl3ts *= corrforxd;
10234  tocampl *= corrfortxa;
10235  }
10236  } // sub == 2 HE charge correction end
10237  } //flagsipmcorrection_
10239  // sub=1||2 HBHE
10240  if (sub == 1 || sub == 2) {
10241  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HBHE
10242  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HBHE
10243  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HBHE
10244  }
10245  tocamplchannel[sub - 1][mdepth - 1][ieta + 41][iphi] += tocampl; // 0-neta ; 0-71 HBHE
10246 
10247  double ratio = 0.;
10248  // if(amplallTS != 0.) ratio = ampl/amplallTS;
10249  if (amplitude != 0.)
10250  ratio = ampl / amplitude;
10251  if (ratio < 0. || ratio > 1.02)
10252  ratio = 0.;
10253  double aveamplitude = 0.;
10254  double aveamplitudew = 0.;
10255  if (absamplitude > 0 && timew > 0)
10256  aveamplitude = timew / absamplitude; // average_TS +1
10257  if (amplitude0 > 0 && timeww > 0)
10258  aveamplitudew = timeww / amplitude0; // average_TS +1
10259  double rmsamp = 0.;
10260  // and CapIdErrors:
10261  int error = 0;
10262  bool anycapid = true;
10263  int lastcapid = 0;
10264  int capid = 0;
10265  for (int ii = 0; ii < TSsize; ii++) {
10266  double aaaaaa = (ii + 1) - aveamplitudew;
10267  double aaaaaa2 = aaaaaa * aaaaaa;
10268  double ampldefault = tool[ii];
10269  rmsamp += (aaaaaa2 * ampldefault); // fC
10270  capid = (qie11df[ii]).capid();
10271  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
10272  anycapid = false;
10273  }
10274  lastcapid = capid;
10275  } //for 2
10276 
10277  if (!anycapid)
10278  error = 1;
10279  double rmsamplitude = 0.;
10280  if ((amplitude0 > 0 && rmsamp > 0) || (amplitude0 < 0 && rmsamp < 0))
10281  rmsamplitude = sqrt(rmsamp / amplitude0);
10282  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9
10283  // CapIdErrors end /////////////////////////////////////////////////////////
10284 
10285  // AZ 1.10.2015:
10286  if (error == 1) {
10287  if (sub == 1 && mdepth == 1)
10289  if (sub == 1 && mdepth == 2)
10291  if (sub == 2 && mdepth == 1)
10293  if (sub == 2 && mdepth == 2)
10295  if (sub == 2 && mdepth == 3)
10297  }
10298  if (error != 1) {
10299  if (sub == 1 && mdepth == 1)
10301  if (sub == 1 && mdepth == 2)
10303  if (sub == 2 && mdepth == 1)
10305  if (sub == 2 && mdepth == 2)
10307  if (sub == 2 && mdepth == 3)
10309  }
10310 
10311  for (int ii = 0; ii < TSsize; ii++) {
10312  // for (int ii=0; ii<10; ii++) {
10313  double ampldefault = tool[ii];
10315  if (sub == 1) {
10316  if (amplitude0 > 120) {
10317  h_shape_Ahigh_HB0->Fill(float(ii), ampldefault);
10318  h_shape0_Ahigh_HB0->Fill(float(ii), 1.);
10319  } else {
10320  h_shape_Alow_HB0->Fill(float(ii), ampldefault);
10321  h_shape0_Alow_HB0->Fill(float(ii), 1.);
10322  } //HB0
10324  if (pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
10325  pedestal3 < pedestalHBMax_) {
10326  h_shape_Ahigh_HB1->Fill(float(ii), ampldefault);
10327  h_shape0_Ahigh_HB1->Fill(float(ii), 1.);
10328  } else {
10329  h_shape_Alow_HB1->Fill(float(ii), ampldefault);
10330  h_shape0_Alow_HB1->Fill(float(ii), 1.);
10331  } //HB1
10332  if (error == 0) {
10333  h_shape_Ahigh_HB2->Fill(float(ii), ampldefault);
10334  h_shape0_Ahigh_HB2->Fill(float(ii), 1.);
10335  } else {
10336  h_shape_Alow_HB2->Fill(float(ii), ampldefault);
10337  h_shape0_Alow_HB2->Fill(float(ii), 1.);
10338  } //HB2
10340  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
10341  pedestalw3 < pedestalwHBMax_) {
10342  h_shape_Ahigh_HB3->Fill(float(ii), ampldefault);
10343  h_shape0_Ahigh_HB3->Fill(float(ii), 1.);
10344  } else {
10345  h_shape_Alow_HB3->Fill(float(ii), ampldefault);
10346  h_shape0_Alow_HB3->Fill(float(ii), 1.);
10347  } //HB3
10348 
10349  } // sub HB
10350 
10351  } //for 3 over TSs
10352 
10353  if (sub == 1) {
10354  // bad_channels with C,A,W,P,pW,
10355  if (error == 1 || amplitude0 < ADCAmplHBMin_ || amplitude0 > ADCAmplHBMax_ || rmsamplitude < rmsHBMin_ ||
10356  rmsamplitude > rmsHBMax_ || pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ ||
10357  pedestal2 < pedestalHBMax_ || pedestal3 < pedestalHBMax_ || pedestalw0 < pedestalwHBMax_ ||
10358  pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ || pedestalw3 < pedestalwHBMax_) {
10359  for (int ii = 0; ii < TSsize; ii++) {
10360  double ampldefault = tool[ii];
10361  h_shape_bad_channels_HB->Fill(float(ii), ampldefault);
10362  h_shape0_bad_channels_HB->Fill(float(ii), 1.);
10363  }
10364  }
10365  // good_channels with C,A,W,P,pW
10366  else {
10367  for (int ii = 0; ii < TSsize; ii++) {
10368  double ampldefault = tool[ii];
10369  h_shape_good_channels_HB->Fill(float(ii), ampldefault);
10370  h_shape0_good_channels_HB->Fill(float(ii), 1.);
10371  }
10372  }
10373  } // sub HB
10374 
10375  // HE starts:
10376  if (sub == 2) {
10377  // shape bad_channels with C,A,W,P,pW,
10378  if (error == 1 || amplitude0 < ADCAmplHEMin_ || amplitude0 > ADCAmplHEMax_ || rmsamplitude < rmsHEMin_ ||
10379  rmsamplitude > rmsHEMax_ || pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ ||
10380  pedestal2 < pedestalHEMax_ || pedestal3 < pedestalHEMax_ || pedestalw0 < pedestalwHEMax_ ||
10381  pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ || pedestalw3 < pedestalwHEMax_) {
10382  for (int ii = 0; ii < TSsize; ii++) {
10383  double ampldefault = tool[ii];
10384  h_shape_bad_channels_HE->Fill(float(ii), ampldefault);
10385  h_shape0_bad_channels_HE->Fill(float(ii), 1.);
10386  }
10387  }
10388  // shape good_channels with C,A,W,P,pW,
10389  else {
10390  for (int ii = 0; ii < TSsize; ii++) {
10391  double ampldefault = tool[ii];
10392  h_shape_good_channels_HE->Fill(float(ii), ampldefault);
10393  h_shape0_good_channels_HE->Fill(float(ii), 1.);
10394  } // ii
10395  } // else for good channels
10396  } // sub HE
10398  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
10399  // for Error B-type
10400  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
10401  // sumEstimator0[sub-1][mdepth-1][ieta+41][iphi] += pedestalw0;//Sig_Pedestals
10402  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
10403  // HB
10404  if (sub == 1) {
10406  // // // // // // // // // HB PedestalCorrelations :
10407  double mypedestal = pedestal0;
10408  double mypedestalw = pedestalw0;
10409  h2_pedvsampl_HB->Fill(mypedestal, amplitude);
10410  h2_pedwvsampl_HB->Fill(mypedestalw, amplitude);
10411  h_pedvsampl_HB->Fill(mypedestal, amplitude);
10412  h_pedwvsampl_HB->Fill(mypedestalw, amplitude);
10413  h_pedvsampl0_HB->Fill(mypedestal, 1.);
10414  h_pedwvsampl0_HB->Fill(mypedestalw, 1.);
10415 
10416  h2_amplvsped_HB->Fill(amplitude, mypedestal);
10417  h2_amplvspedw_HB->Fill(amplitude, mypedestalw);
10418  h_amplvsped_HB->Fill(amplitude, mypedestal);
10419  h_amplvspedw_HB->Fill(amplitude, mypedestalw);
10420  h_amplvsped0_HB->Fill(amplitude, 1.);
10421  } //
10422  // // // // // // // // // HB Pedestals:
10423  if (studyPedestalsHist_) {
10424  h_pedestal0_HB->Fill(pedestal0, 1.);
10425  h_pedestal1_HB->Fill(pedestal1, 1.);
10426  h_pedestal2_HB->Fill(pedestal2, 1.);
10427  h_pedestal3_HB->Fill(pedestal3, 1.);
10428  h_pedestalaver4_HB->Fill(pedestalaver4, 1.);
10429  h_pedestalaver9_HB->Fill(pedestalaver9, 1.);
10430  h_pedestalw0_HB->Fill(pedestalw0, 1.);
10431  h_pedestalw1_HB->Fill(pedestalw1, 1.);
10432  h_pedestalw2_HB->Fill(pedestalw2, 1.);
10433  h_pedestalw3_HB->Fill(pedestalw3, 1.);
10434  h_pedestalwaver4_HB->Fill(pedestalwaver4, 1.);
10435  h_pedestalwaver9_HB->Fill(pedestalwaver9, 1.);
10436  // for averaged values:
10437  if (mdepth == 1) {
10438  h_mapDepth1Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
10439  h_mapDepth1Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
10440  h_mapDepth1Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
10441  h_mapDepth1Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
10442  h_mapDepth1Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
10443  h_mapDepth1Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
10444  h_mapDepth1Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
10445  h_mapDepth1Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
10446  }
10447  if (mdepth == 2) {
10448  h_mapDepth2Ped0_HB->Fill(double(ieta), double(iphi), pedestal0);
10449  h_mapDepth2Ped1_HB->Fill(double(ieta), double(iphi), pedestal1);
10450  h_mapDepth2Ped2_HB->Fill(double(ieta), double(iphi), pedestal2);
10451  h_mapDepth2Ped3_HB->Fill(double(ieta), double(iphi), pedestal3);
10452  h_mapDepth2Pedw0_HB->Fill(double(ieta), double(iphi), pedestalw0);
10453  h_mapDepth2Pedw1_HB->Fill(double(ieta), double(iphi), pedestalw1);
10454  h_mapDepth2Pedw2_HB->Fill(double(ieta), double(iphi), pedestalw2);
10455  h_mapDepth2Pedw3_HB->Fill(double(ieta), double(iphi), pedestalw3);
10456  }
10457  if (pedestalw0 < pedestalwHBMax_ || pedestalw1 < pedestalwHBMax_ || pedestalw2 < pedestalwHBMax_ ||
10458  pedestalw3 < pedestalwHBMax_) {
10459  if (mdepth == 1)
10460  h_mapDepth1pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10461  if (mdepth == 2)
10462  h_mapDepth2pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10463  if (mdepth == 3)
10464  h_mapDepth3pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10465  if (mdepth == 3)
10466  h_mapDepth4pedestalw_HB->Fill(double(ieta), double(iphi), 1.);
10467  }
10468  if (pedestal0 < pedestalHBMax_ || pedestal1 < pedestalHBMax_ || pedestal2 < pedestalHBMax_ ||
10469  pedestal3 < pedestalHBMax_) {
10470  if (mdepth == 1)
10471  h_mapDepth1pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10472  if (mdepth == 2)
10473  h_mapDepth2pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10474  if (mdepth == 3)
10475  h_mapDepth3pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10476  if (mdepth == 4)
10477  h_mapDepth4pedestal_HB->Fill(double(ieta), double(iphi), 1.);
10478  }
10479  for (int ii = 0; ii < TSsize; ii++) {
10480  h_pedestal00_HB->Fill(pedestal00->getValue(ii), 1.);
10481  h_gain_HB->Fill(gain->getValue(ii), 1.);
10482  }
10483  h_respcorr_HB->Fill(respcorr->getValue(), 1.);
10484  h_timecorr_HB->Fill(timecorr->getValue(), 1.);
10485  h_lutcorr_HB->Fill(lutcorr->getValue(), 1.);
10486  h_difpedestal0_HB->Fill(difpedestal0, 1.);
10487  h_difpedestal1_HB->Fill(difpedestal1, 1.);
10488  h_difpedestal2_HB->Fill(difpedestal2, 1.);
10489  h_difpedestal3_HB->Fill(difpedestal3, 1.);
10490  } //
10491  // // // // // // // // // HB ADCAmpl:
10492  if (studyADCAmplHist_) {
10493  h_ADCAmpl345Zoom_HB->Fill(amplitude345, 1.);
10494  h_ADCAmpl345Zoom1_HB->Fill(amplitude345, 1.);
10495  h_ADCAmpl345_HB->Fill(amplitude345, 1.);
10496  if (error == 0) {
10498  h_ADCAmpl345_HBCapIdNoError->Fill(amplitude345, 1.);
10499  }
10500  if (error == 1) {
10501  h_ADCAmpl_HBCapIdError->Fill(amplitude, 1.);
10502  h_ADCAmpl345_HBCapIdError->Fill(amplitude345, 1.);
10503  }
10504  h_ADCAmplZoom_HB->Fill(amplitude, 1.);
10505  h_ADCAmplZoom1_HB->Fill(amplitude, 1.);
10506  h_ADCAmpl_HB->Fill(amplitude, 1.);
10507 
10508  h_AmplitudeHBrest->Fill(amplitude, 1.);
10509  h_AmplitudeHBrest1->Fill(amplitude, 1.);
10510  h_AmplitudeHBrest6->Fill(amplitude, 1.);
10511 
10512  if (amplitude < ADCAmplHBMin_ || amplitude > ADCAmplHBMax_) {
10514  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10515  if (mdepth == 1)
10516  h_mapDepth1ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10517  if (mdepth == 2)
10518  h_mapDepth2ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10519  if (mdepth == 3)
10520  h_mapDepth3ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10521  if (mdepth == 4)
10522  h_mapDepth4ADCAmpl225_HB->Fill(double(ieta), double(iphi), 1.);
10523  } // if
10524  // if(amplitude >400.) averSIGNALoccupancy_HB += 1.;
10525  if (amplitude < 35.) {
10526  if (mdepth == 1)
10527  h_mapDepth1ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10528  if (mdepth == 2)
10529  h_mapDepth2ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10530  if (mdepth == 3)
10531  h_mapDepth3ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10532  if (mdepth == 4)
10533  h_mapDepth4ADCAmpl225Copy_HB->Fill(double(ieta), double(iphi), 1.);
10534  } // if
10535  // for averaged values:
10536  if (mdepth == 1)
10537  h_mapDepth1ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10538  if (mdepth == 2)
10539  h_mapDepth2ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10540  if (mdepth == 3)
10541  h_mapDepth3ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10542  if (mdepth == 4)
10543  h_mapDepth4ADCAmpl_HB->Fill(double(ieta), double(iphi), amplitude);
10544  if (mdepth == 1)
10545  h_mapDepth1ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10546  if (mdepth == 2)
10547  h_mapDepth2ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10548  if (mdepth == 3)
10549  h_mapDepth3ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10550  if (mdepth == 4)
10551  h_mapDepth4ADCAmpl12_HB->Fill(double(ieta), double(iphi), ampl);
10554  h_bcnvsamplitude_HB->Fill(float(bcn), amplitude);
10555  h_bcnvsamplitude0_HB->Fill(float(bcn), 1.);
10557  h_orbitNumvsamplitude0_HB->Fill(float(orbitNum), 1.);
10559  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
10560  } //if(studyADCAmplHist_
10562 
10563  // // // // // // // // // HB TSmean:
10564  if (studyTSmeanShapeHist_) {
10565  h_TSmeanA_HB->Fill(aveamplitude1, 1.);
10566  // h2_TSnVsAyear2023_HB->Fill(25.*aveamplitude1, amplitude);
10567  h2_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
10568  h1_TSnVsAyear2023_HB->Fill(amplitude, 25. * aveamplitude1);
10569  h1_TSnVsAyear20230_HB->Fill(amplitude, 1.);
10570  if (aveamplitude1 < TSmeanHBMin_ || aveamplitude1 > TSmeanHBMax_) {
10572  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10573  if (mdepth == 1)
10574  h_mapDepth1TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10575  if (mdepth == 2)
10576  h_mapDepth2TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10577  if (mdepth == 3)
10578  h_mapDepth3TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10579  if (mdepth == 4)
10580  h_mapDepth4TSmeanA225_HB->Fill(double(ieta), double(iphi), 1.);
10581  } // if
10582  // for averaged values:
10583  if (mdepth == 1)
10584  h_mapDepth1TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10585  if (mdepth == 2)
10586  h_mapDepth2TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10587  if (mdepth == 3)
10588  h_mapDepth3TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10589  if (mdepth == 4)
10590  h_mapDepth4TSmeanA_HB->Fill(double(ieta), double(iphi), aveamplitude1);
10592  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
10593  } //if(studyTSmeanShapeHist_
10595 
10596  // // // // // // // // // HB TSmax:
10597  if (studyTSmaxShapeHist_) {
10598  h_TSmaxA_HB->Fill(float(ts_with_max_signal), 1.);
10599  if (ts_with_max_signal < TSpeakHBMin_ || ts_with_max_signal > TSpeakHBMax_) {
10601  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10602  if (mdepth == 1)
10603  h_mapDepth1TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10604  if (mdepth == 2)
10605  h_mapDepth2TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10606  if (mdepth == 3)
10607  h_mapDepth3TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10608  if (mdepth == 4)
10609  h_mapDepth4TSmaxA225_HB->Fill(double(ieta), double(iphi), 1.);
10610  } // if
10611  // for averaged values:
10612  if (mdepth == 1)
10613  h_mapDepth1TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10614  if (mdepth == 2)
10615  h_mapDepth2TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10616  if (mdepth == 3)
10617  h_mapDepth3TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10618  if (mdepth == 4)
10619  h_mapDepth4TSmaxA_HB->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
10621  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
10622  } //if(studyTSmaxShapeHist_
10624 
10625  // // // // // // // // // HB RMS:
10626  if (studyRMSshapeHist_) {
10627  h_Amplitude_HB->Fill(rmsamplitude, 1.);
10628  if (rmsamplitude < rmsHBMin_ || rmsamplitude > rmsHBMax_) {
10630  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10631  if (mdepth == 1)
10632  h_mapDepth1Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10633  if (mdepth == 2)
10634  h_mapDepth2Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10635  if (mdepth == 3)
10636  h_mapDepth3Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10637  if (mdepth == 4)
10638  h_mapDepth4Amplitude225_HB->Fill(double(ieta), double(iphi), 1.);
10639  } // if
10640  // for averaged values:
10641  if (mdepth == 1)
10642  h_mapDepth1Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10643  if (mdepth == 2)
10644  h_mapDepth2Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10645  if (mdepth == 3)
10646  h_mapDepth3Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10647  if (mdepth == 4)
10648  h_mapDepth4Amplitude_HB->Fill(double(ieta), double(iphi), rmsamplitude);
10650  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
10651  } //if(studyRMSshapeHist_)
10653 
10654  // // // // // // // // // HB Ratio:
10655  if (studyRatioShapeHist_) {
10656  h_Ampl_HB->Fill(ratio, 1.);
10657  if (ratio < ratioHBMin_ || ratio > ratioHBMax_) {
10659  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10660  if (mdepth == 1)
10661  h_mapDepth1Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10662  if (mdepth == 2)
10663  h_mapDepth2Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10664  if (mdepth == 3)
10665  h_mapDepth3Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10666  if (mdepth == 4)
10667  h_mapDepth4Ampl047_HB->Fill(double(ieta), double(iphi), 1.);
10668  // //
10669  } //if(ratio
10670  // for averaged values:
10671  if (mdepth == 1)
10672  h_mapDepth1Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10673  if (mdepth == 2)
10674  h_mapDepth2Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10675  if (mdepth == 3)
10676  h_mapDepth3Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10677  if (mdepth == 4)
10678  h_mapDepth4Ampl_HB->Fill(double(ieta), double(iphi), ratio);
10680  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
10681  } //if(studyRatioShapeHist_)
10683 
10684  // // // // // // // // // HB DiffAmplitude:
10685  if (studyDiffAmplHist_) {
10686  if (mdepth == 1)
10687  h_mapDepth1AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10688  if (mdepth == 2)
10689  h_mapDepth2AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10690  if (mdepth == 3)
10691  h_mapDepth3AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10692  if (mdepth == 4)
10693  h_mapDepth4AmplE34_HB->Fill(double(ieta), double(iphi), amplitude);
10694  } // if(studyDiffAmplHist_)
10695 
10697  if (mdepth == 1)
10698  h_mapDepth1_HB->Fill(double(ieta), double(iphi), 1.);
10699  if (mdepth == 2)
10700  h_mapDepth2_HB->Fill(double(ieta), double(iphi), 1.);
10701  if (mdepth == 3)
10702  h_mapDepth3_HB->Fill(double(ieta), double(iphi), 1.);
10703  if (mdepth == 4)
10704  h_mapDepth4_HB->Fill(double(ieta), double(iphi), 1.);
10705 
10706  if (flagTS2 == 1) {
10707  if (mdepth == 1)
10708  h_mapDepth1TS2_HB->Fill(double(ieta), double(iphi), 1.);
10709  if (mdepth == 2)
10710  h_mapDepth2TS2_HB->Fill(double(ieta), double(iphi), 1.);
10711  if (mdepth == 3)
10712  h_mapDepth3TS2_HB->Fill(double(ieta), double(iphi), 1.);
10713  if (mdepth == 4)
10714  h_mapDepth4TS2_HB->Fill(double(ieta), double(iphi), 1.);
10715  } // select entries only in TS=2
10716 
10717  } //if ( sub == 1 )
10718 
10719  // HE QIE11
10720  if (sub == 2) {
10721  // // // // // // // // // HE QIE11 PedestalCorrelations :
10723  // double mypedestal = pedestalaver9;
10724  // double mypedestalw = pedestalwaver9;
10725  double mypedestal = pedestal0;
10726  double mypedestalw = pedestalw0;
10727  h2_pedvsampl_HE->Fill(mypedestal, amplitude);
10728  h2_pedwvsampl_HE->Fill(mypedestalw, amplitude);
10729  h_pedvsampl_HE->Fill(mypedestal, amplitude);
10730  h_pedwvsampl_HE->Fill(mypedestalw, amplitude);
10731  h_pedvsampl0_HE->Fill(mypedestal, 1.);
10732  h_pedwvsampl0_HE->Fill(mypedestalw, 1.);
10733  } //
10734  // // // // // // // // // HE QIE11 Pedestals:
10735  if (studyPedestalsHist_) {
10736  h_pedestal0_HE->Fill(pedestal0, 1.);
10737  h_pedestal1_HE->Fill(pedestal1, 1.);
10738  h_pedestal2_HE->Fill(pedestal2, 1.);
10739  h_pedestal3_HE->Fill(pedestal3, 1.);
10740  h_pedestalaver4_HE->Fill(pedestalaver4, 1.);
10741  h_pedestalaver9_HE->Fill(pedestalaver9, 1.);
10742  h_pedestalw0_HE->Fill(pedestalw0, 1.);
10743  h_pedestalw1_HE->Fill(pedestalw1, 1.);
10744  h_pedestalw2_HE->Fill(pedestalw2, 1.);
10745  h_pedestalw3_HE->Fill(pedestalw3, 1.);
10746  h_pedestalwaver4_HE->Fill(pedestalwaver4, 1.);
10747  h_pedestalwaver9_HE->Fill(pedestalwaver9, 1.);
10748  // for averaged values:
10749  if (mdepth == 1) {
10750  h_mapDepth1Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10751  h_mapDepth1Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10752  h_mapDepth1Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10753  h_mapDepth1Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10754  h_mapDepth1Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10755  h_mapDepth1Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10756  h_mapDepth1Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10757  h_mapDepth1Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10758  }
10759  if (mdepth == 2) {
10760  h_mapDepth2Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10761  h_mapDepth2Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10762  h_mapDepth2Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10763  h_mapDepth2Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10764  h_mapDepth2Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10765  h_mapDepth2Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10766  h_mapDepth2Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10767  h_mapDepth2Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10768  }
10769  if (mdepth == 3) {
10770  h_mapDepth3Ped0_HE->Fill(double(ieta), double(iphi), pedestal0);
10771  h_mapDepth3Ped1_HE->Fill(double(ieta), double(iphi), pedestal1);
10772  h_mapDepth3Ped2_HE->Fill(double(ieta), double(iphi), pedestal2);
10773  h_mapDepth3Ped3_HE->Fill(double(ieta), double(iphi), pedestal3);
10774  h_mapDepth3Pedw0_HE->Fill(double(ieta), double(iphi), pedestalw0);
10775  h_mapDepth3Pedw1_HE->Fill(double(ieta), double(iphi), pedestalw1);
10776  h_mapDepth3Pedw2_HE->Fill(double(ieta), double(iphi), pedestalw2);
10777  h_mapDepth3Pedw3_HE->Fill(double(ieta), double(iphi), pedestalw3);
10778  }
10779  if (pedestalw0 < pedestalwHEMax_ || pedestalw1 < pedestalwHEMax_ || pedestalw2 < pedestalwHEMax_ ||
10780  pedestalw3 < pedestalwHEMax_) {
10781  if (mdepth == 1)
10782  h_mapDepth1pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10783  if (mdepth == 2)
10784  h_mapDepth2pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10785  if (mdepth == 3)
10786  h_mapDepth3pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10787  if (mdepth == 4)
10788  h_mapDepth4pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10789  if (mdepth == 5)
10790  h_mapDepth5pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10791  if (mdepth == 6)
10792  h_mapDepth6pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10793  if (mdepth == 7)
10794  h_mapDepth7pedestalw_HE->Fill(double(ieta), double(iphi), 1.);
10795  }
10796  if (pedestal0 < pedestalHEMax_ || pedestal1 < pedestalHEMax_ || pedestal2 < pedestalHEMax_ ||
10797  pedestal3 < pedestalHEMax_) {
10798  if (mdepth == 1)
10799  h_mapDepth1pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10800  if (mdepth == 2)
10801  h_mapDepth2pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10802  if (mdepth == 3)
10803  h_mapDepth3pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10804  if (mdepth == 4)
10805  h_mapDepth4pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10806  if (mdepth == 5)
10807  h_mapDepth5pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10808  if (mdepth == 6)
10809  h_mapDepth6pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10810  if (mdepth == 7)
10811  h_mapDepth7pedestal_HE->Fill(double(ieta), double(iphi), 1.);
10812  }
10813  for (int ii = 0; ii < TSsize; ii++) {
10814  h_pedestal00_HE->Fill(pedestal00->getValue(ii), 1.);
10815  h_gain_HE->Fill(gain->getValue(ii), 1.);
10816  }
10817  h_respcorr_HE->Fill(respcorr->getValue(), 1.);
10818  h_timecorr_HE->Fill(timecorr->getValue(), 1.);
10819  h_lutcorr_HE->Fill(lutcorr->getValue(), 1.);
10820  } //
10821  // // // // // // // // // HE QIE11 ADCAmpl:
10822  if (studyADCAmplHist_) {
10823  h_ADCAmpl345_HE->Fill(amplitude345, 1.);
10824  h_ADCAmpl_HE->Fill(amplitude, 1.);
10825  // if( ieta <0) h_ADCAmpl_HEM->Fill(amplitude,1.);
10826  // if( ieta >0) h_ADCAmpl_HEP->Fill(amplitude,1.);
10827  h_ADCAmplrest_HE->Fill(amplitude, 1.);
10828  h_ADCAmplrest1_HE->Fill(amplitude, 1.);
10829  h_ADCAmplrest6_HE->Fill(amplitude, 1.);
10830 
10831  if (amplitude < ADCAmplHEMin_ || amplitude > ADCAmplHEMax_) {
10833  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10834  if (mdepth == 1)
10835  h_mapDepth1ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10836  if (mdepth == 2)
10837  h_mapDepth2ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10838  if (mdepth == 3)
10839  h_mapDepth3ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10840  if (mdepth == 4)
10841  h_mapDepth4ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10842  if (mdepth == 5)
10843  h_mapDepth5ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10844  if (mdepth == 6)
10845  h_mapDepth6ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10846  if (mdepth == 7)
10847  h_mapDepth7ADCAmpl225_HE->Fill(double(ieta), double(iphi), 1.);
10848  } // if
10849  // if(amplitude > 700.) averSIGNALoccupancy_HE += 1.;
10850  if (amplitude < 500.) {
10851  if (mdepth == 1)
10852  h_mapDepth1ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10853  if (mdepth == 2)
10854  h_mapDepth2ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10855  if (mdepth == 3)
10856  h_mapDepth3ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10857  if (mdepth == 4)
10858  h_mapDepth4ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10859  if (mdepth == 5)
10860  h_mapDepth5ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10861  if (mdepth == 6)
10862  h_mapDepth6ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10863  if (mdepth == 7)
10864  h_mapDepth7ADCAmpl225Copy_HE->Fill(double(ieta), double(iphi), 1.);
10865  } // if
10866 
10867  h_ADCAmplZoom1_HE->Fill(amplitude, 1.); // for amplitude allTS
10868  h_ADCAmpl345Zoom1_HE->Fill(ampl3ts, 1.); // for ampl3ts 3TSs
10869  h_ADCAmpl345Zoom_HE->Fill(ampl, 1.); // for ampl 4TSs
10870 
10871  if (amplitude > 110 && amplitude < 150) {
10872  h_mapADCAmplfirstpeak_HE->Fill(double(ieta), double(iphi), amplitude);
10873  h_mapADCAmplfirstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10874  } else if (amplitude > 150 && amplitude < 190) {
10875  h_mapADCAmplsecondpeak_HE->Fill(double(ieta), double(iphi), amplitude);
10876  h_mapADCAmplsecondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10877  }
10878 
10879  if (ampl3ts > 70 && ampl3ts < 110) {
10880  h_mapADCAmpl11firstpeak_HE->Fill(double(ieta), double(iphi), ampl3ts);
10881  h_mapADCAmpl11firstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10882  } else if (ampl3ts > 110 && ampl3ts < 150) {
10883  h_mapADCAmpl11secondpeak_HE->Fill(double(ieta), double(iphi), ampl3ts);
10884  h_mapADCAmpl11secondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10885  }
10886  if (ampl > 87 && ampl < 127) {
10887  h_mapADCAmpl12firstpeak_HE->Fill(double(ieta), double(iphi), ampl);
10888  h_mapADCAmpl12firstpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10889  } else if (ampl > 127 && ampl < 167) {
10890  h_mapADCAmpl12secondpeak_HE->Fill(double(ieta), double(iphi), ampl);
10891  h_mapADCAmpl12secondpeak0_HE->Fill(double(ieta), double(iphi), 1.);
10892  }
10893  // for averaged values of every channel:
10894  if (mdepth == 1)
10895  h_mapDepth1ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10896  if (mdepth == 2)
10897  h_mapDepth2ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10898  if (mdepth == 3)
10899  h_mapDepth3ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10900  if (mdepth == 4)
10901  h_mapDepth4ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10902  if (mdepth == 5)
10903  h_mapDepth5ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10904  if (mdepth == 6)
10905  h_mapDepth6ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10906  if (mdepth == 7)
10907  h_mapDepth7ADCAmpl_HE->Fill(double(ieta), double(iphi), amplitude);
10908  if (mdepth == 1)
10909  h_mapDepth1ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10910  if (mdepth == 2)
10911  h_mapDepth2ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10912  if (mdepth == 3)
10913  h_mapDepth3ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10914  if (mdepth == 4)
10915  h_mapDepth4ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10916  if (mdepth == 5)
10917  h_mapDepth5ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10918  if (mdepth == 6)
10919  h_mapDepth6ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10920  if (mdepth == 7)
10921  h_mapDepth7ADCAmpl12_HE->Fill(double(ieta), double(iphi), ampl);
10922  // for averaged values of SiPM channels only:
10923  if (mdepth == 1)
10924  h_mapDepth1ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10925  if (mdepth == 2)
10926  h_mapDepth2ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10927  if (mdepth == 3)
10928  h_mapDepth3ADCAmplSiPM_HE->Fill(double(ieta), double(iphi), amplitude);
10929  if (mdepth == 1)
10930  h_mapDepth1ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10931  if (mdepth == 2)
10932  h_mapDepth2ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10933  if (mdepth == 3)
10934  h_mapDepth3ADCAmpl12SiPM_HE->Fill(double(ieta), double(iphi), ampl);
10935  //
10938  h_bcnvsamplitude_HE->Fill(float(bcn), amplitude);
10939  h_bcnvsamplitude0_HE->Fill(float(bcn), 1.);
10941  h_orbitNumvsamplitude0_HE->Fill(float(orbitNum), 1.);
10943  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
10944  } //if(studyADCAmplHist_
10945  // // // // // // // // // HE QIE11 TSmean:
10946  if (studyTSmeanShapeHist_) {
10947  h_TSmeanA_HE->Fill(aveamplitude1, 1.);
10948  // h2_TSnVsAyear2023_HE->Fill(25.*aveamplitude1, amplitude);
10949  h2_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
10950  h1_TSnVsAyear2023_HE->Fill(amplitude, 25. * aveamplitude1);
10951  h1_TSnVsAyear20230_HE->Fill(amplitude, 1.);
10952  if (aveamplitude1 < TSmeanHEMin_ || aveamplitude1 > TSmeanHEMax_) {
10954  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10955  if (mdepth == 1)
10956  h_mapDepth1TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10957  if (mdepth == 2)
10958  h_mapDepth2TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10959  if (mdepth == 3)
10960  h_mapDepth3TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10961  if (mdepth == 4)
10962  h_mapDepth4TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10963  if (mdepth == 5)
10964  h_mapDepth5TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10965  if (mdepth == 6)
10966  h_mapDepth6TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10967  if (mdepth == 7)
10968  h_mapDepth7TSmeanA225_HE->Fill(double(ieta), double(iphi), 1.);
10969  } // if
10970  // for averaged values:
10971  if (mdepth == 1)
10972  h_mapDepth1TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10973  if (mdepth == 2)
10974  h_mapDepth2TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10975  if (mdepth == 3)
10976  h_mapDepth3TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10977  if (mdepth == 4)
10978  h_mapDepth4TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10979  if (mdepth == 5)
10980  h_mapDepth5TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10981  if (mdepth == 6)
10982  h_mapDepth6TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10983  if (mdepth == 7)
10984  h_mapDepth7TSmeanA_HE->Fill(double(ieta), double(iphi), aveamplitude1);
10986  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
10987  } //if(studyTSmeanShapeHist_) {
10989  // // // // // // // // // HE QIE11 TSmax:
10990  if (studyTSmaxShapeHist_) {
10991  h_TSmaxA_HE->Fill(float(ts_with_max_signal), 1.);
10992  if (ts_with_max_signal < TSpeakHEMin_ || ts_with_max_signal > TSpeakHEMax_) {
10994  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
10995  if (mdepth == 1)
10996  h_mapDepth1TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10997  if (mdepth == 2)
10998  h_mapDepth2TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
10999  if (mdepth == 3)
11000  h_mapDepth3TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
11001  if (mdepth == 4)
11002  h_mapDepth4TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
11003  if (mdepth == 5)
11004  h_mapDepth5TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
11005  if (mdepth == 6)
11006  h_mapDepth6TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
11007  if (mdepth == 7)
11008  h_mapDepth7TSmaxA225_HE->Fill(double(ieta), double(iphi), 1.);
11009  } // if
11010  // for averaged values:
11011  if (mdepth == 1)
11012  h_mapDepth1TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11013  if (mdepth == 2)
11014  h_mapDepth2TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11015  if (mdepth == 3)
11016  h_mapDepth3TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11017  if (mdepth == 4)
11018  h_mapDepth4TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11019  if (mdepth == 5)
11020  h_mapDepth5TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11021  if (mdepth == 6)
11022  h_mapDepth6TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11023  if (mdepth == 7)
11024  h_mapDepth7TSmaxA_HE->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11026  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
11027  } //if(studyTSmaxShapeHist_) {
11029  // // // // // // // // // HE QIE11 RMS:
11030  if (studyRMSshapeHist_) {
11031  h_Amplitude_HE->Fill(rmsamplitude, 1.);
11032  if (rmsamplitude < rmsHEMin_ || rmsamplitude > rmsHEMax_) {
11034  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11035  if (mdepth == 1)
11036  h_mapDepth1Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
11037  if (mdepth == 2)
11038  h_mapDepth2Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
11039  if (mdepth == 3)
11040  h_mapDepth3Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
11041  if (mdepth == 4)
11042  h_mapDepth4Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
11043  if (mdepth == 5)
11044  h_mapDepth5Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
11045  if (mdepth == 6)
11046  h_mapDepth6Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
11047  if (mdepth == 7)
11048  h_mapDepth7Amplitude225_HE->Fill(double(ieta), double(iphi), 1.);
11049  }
11050  // for averaged values:
11051  if (mdepth == 1)
11052  h_mapDepth1Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
11053  if (mdepth == 2)
11054  h_mapDepth2Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
11055  if (mdepth == 3)
11056  h_mapDepth3Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
11057  if (mdepth == 4)
11058  h_mapDepth4Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
11059  if (mdepth == 5)
11060  h_mapDepth5Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
11061  if (mdepth == 6)
11062  h_mapDepth6Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
11063  if (mdepth == 7)
11064  h_mapDepth7Amplitude_HE->Fill(double(ieta), double(iphi), rmsamplitude);
11066  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
11067  } //if(studyRMSshapeHist_)
11069 
11070  // // // // // // // // // HE QIE11 Ratio:
11071  if (studyRatioShapeHist_) {
11072  h_Ampl_HE->Fill(ratio, 1.);
11073  if (ratio < ratioHEMin_ || ratio > ratioHEMax_) {
11075  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11076  if (mdepth == 1)
11077  h_mapDepth1Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
11078  if (mdepth == 2)
11079  h_mapDepth2Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
11080  if (mdepth == 3)
11081  h_mapDepth3Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
11082  if (mdepth == 4)
11083  h_mapDepth4Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
11084  if (mdepth == 5)
11085  h_mapDepth5Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
11086  if (mdepth == 6)
11087  h_mapDepth6Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
11088  if (mdepth == 7)
11089  h_mapDepth7Ampl047_HE->Fill(double(ieta), double(iphi), 1.);
11090  }
11091  // for averaged values:
11092  if (mdepth == 1)
11093  h_mapDepth1Ampl_HE->Fill(double(ieta), double(iphi), ratio);
11094  if (mdepth == 2)
11095  h_mapDepth2Ampl_HE->Fill(double(ieta), double(iphi), ratio);
11096  if (mdepth == 3)
11097  h_mapDepth3Ampl_HE->Fill(double(ieta), double(iphi), ratio);
11098  if (mdepth == 4)
11099  h_mapDepth4Ampl_HE->Fill(double(ieta), double(iphi), ratio);
11100  if (mdepth == 5)
11101  h_mapDepth5Ampl_HE->Fill(double(ieta), double(iphi), ratio);
11102  if (mdepth == 6)
11103  h_mapDepth6Ampl_HE->Fill(double(ieta), double(iphi), ratio);
11104  if (mdepth == 7)
11105  h_mapDepth7Ampl_HE->Fill(double(ieta), double(iphi), ratio);
11107  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
11108  } //if(studyRatioShapeHist_)
11110  // // // // // // // // // HE QIE11 DiffAmplitude:
11111  if (studyDiffAmplHist_) {
11112  if (mdepth == 1)
11113  h_mapDepth1AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
11114  if (mdepth == 2)
11115  h_mapDepth2AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
11116  if (mdepth == 3)
11117  h_mapDepth3AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
11118  if (mdepth == 4)
11119  h_mapDepth4AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
11120  if (mdepth == 5)
11121  h_mapDepth5AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
11122  if (mdepth == 6)
11123  h_mapDepth6AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
11124  if (mdepth == 7)
11125  h_mapDepth7AmplE34_HE->Fill(double(ieta), double(iphi), amplitude);
11126  } // if(studyDiffAmplHist_)
11128  if (mdepth == 1)
11129  h_mapDepth1_HE->Fill(double(ieta), double(iphi), 1.);
11130  if (mdepth == 2)
11131  h_mapDepth2_HE->Fill(double(ieta), double(iphi), 1.);
11132  if (mdepth == 3)
11133  h_mapDepth3_HE->Fill(double(ieta), double(iphi), 1.);
11134  if (mdepth == 4)
11135  h_mapDepth4_HE->Fill(double(ieta), double(iphi), 1.);
11136  if (mdepth == 5)
11137  h_mapDepth5_HE->Fill(double(ieta), double(iphi), 1.);
11138  if (mdepth == 6)
11139  h_mapDepth6_HE->Fill(double(ieta), double(iphi), 1.);
11140  if (mdepth == 7)
11141  h_mapDepth7_HE->Fill(double(ieta), double(iphi), 1.);
11142 
11143  if (flagTS2 == 1) {
11144  if (mdepth == 1)
11145  h_mapDepth1TS2_HE->Fill(double(ieta), double(iphi), 1.);
11146  if (mdepth == 2)
11147  h_mapDepth2TS2_HE->Fill(double(ieta), double(iphi), 1.);
11148  if (mdepth == 3)
11149  h_mapDepth3TS2_HE->Fill(double(ieta), double(iphi), 1.);
11150  if (mdepth == 4)
11151  h_mapDepth4TS2_HE->Fill(double(ieta), double(iphi), 1.);
11152  if (mdepth == 5)
11153  h_mapDepth5TS2_HE->Fill(double(ieta), double(iphi), 1.);
11154  if (mdepth == 6)
11155  h_mapDepth6TS2_HE->Fill(double(ieta), double(iphi), 1.);
11156  if (mdepth == 7)
11157  h_mapDepth7TS2_HE->Fill(double(ieta), double(iphi), 1.);
11158  } // select entries only in TS=2
11159 
11160  } //if ( sub == 2 )
11161  //
11162 }
11165  CaloSamples toolOriginal; // TS
11166  double tool[100];
11167  HcalDetId cell(digiItr->id());
11168  int mdepth = cell.depth();
11169  int iphi = cell.iphi() - 1; // 0-71
11170  int ieta = cell.ieta();
11171  if (ieta > 0)
11172  ieta -= 1; //-41 +41
11173  int sub = cell.subdet(); // (HFDigiCollection: 4-HF)
11174  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
11175  const HcalGain* gain = conditions->getGain(cell);
11176  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
11177  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
11178  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
11179  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
11180  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
11181  HcalCoderDb coder(*channelCoder, *shape);
11182  if (useADCfC_)
11183  coder.adc2fC(*digiItr, toolOriginal);
11184  double pedestalaver9 = 0.;
11185  double pedestalaver4 = 0.;
11186  double pedestal0 = 0.;
11187  double pedestal1 = 0.;
11188  double pedestal2 = 0.;
11189  double pedestal3 = 0.;
11190  double pedestalwaver9 = 0.;
11191  double pedestalwaver4 = 0.;
11192  double pedestalw0 = 0.;
11193  double pedestalw1 = 0.;
11194  double pedestalw2 = 0.;
11195  double pedestalw3 = 0.;
11196  double amplitude = 0.;
11197  double absamplitude = 0.;
11198  double ampl = 0.;
11199  double timew = 0.;
11200  double timeww = 0.;
11201  double max_signal = -100.;
11202  int ts_with_max_signal = -100;
11203  int c0 = 0;
11204  int c1 = 0;
11205  int c2 = 0;
11206  int c3 = 0;
11207  int c4 = 0;
11208  double errorBtype = 0.;
11209  int TSsize = 4; // HF for Run2
11210  if ((*digiItr).size() != TSsize)
11211  errorBtype = 1.;
11212  TSsize = digiItr->size();
11213  for (int ii = 0; ii < TSsize; ii++) {
11214  // for (int ii=0; ii<digiItr->size(); ii++) {
11215  double ampldefault = 0.;
11216  double ampldefault0 = 0.;
11217  double ampldefault1 = 0.;
11218  double ampldefault2 = 0.;
11219  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive
11220  if (useADCfC_)
11221  ampldefault1 = toolOriginal[ii]; //adcfC
11222  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts
11223  if (useADCmassive_) {
11224  ampldefault = ampldefault0;
11225  }
11226  if (useADCfC_) {
11227  ampldefault = ampldefault1;
11228  }
11229  if (useADCcounts_) {
11230  ampldefault = ampldefault2;
11231  }
11232 
11233  int capid = ((*digiItr)[ii]).capid();
11234  // double pedestal = calib.pedestal(capid);
11235  double pedestal = pedestal00->getValue(capid);
11236  double pedestalw = pedw->getSigma(capid, capid);
11238  ampldefault -= pedestal; // pedestal subtraction
11239 
11240  tool[ii] = ampldefault;
11241 
11242  pedestalaver9 += pedestal;
11243  pedestalwaver9 += pedestalw * pedestalw;
11244 
11245  if (capid == 0 && c0 == 0) {
11246  c0++;
11247  c4++;
11248  pedestalaver4 += pedestal;
11249  pedestal0 = pedestal;
11250  pedestalw0 = pedestalw;
11251  pedestalwaver4 += pedestalw * pedestalw;
11252  }
11253 
11254  if (capid == 1 && c1 == 0) {
11255  c1++;
11256  c4++;
11257  pedestalaver4 += pedestal;
11258  pedestal1 = pedestal;
11259  pedestalw1 = pedestalw;
11260  pedestalwaver4 += pedestalw * pedestalw;
11261  }
11262  if (capid == 2 && c2 == 0) {
11263  c2++;
11264  c4++;
11265  pedestalaver4 += pedestal;
11266  pedestal2 = pedestal;
11267  pedestalw2 = pedestalw;
11268  pedestalwaver4 += pedestalw * pedestalw;
11269  }
11270  if (capid == 3 && c3 == 0) {
11271  c3++;
11272  c4++;
11273  pedestalaver4 += pedestal;
11274  pedestal3 = pedestal;
11275  pedestalw3 = pedestalw;
11276  pedestalwaver4 += pedestalw * pedestalw;
11277  }
11278 
11279  if (max_signal < ampldefault) {
11280  max_signal = ampldefault;
11281  ts_with_max_signal = ii;
11282  }
11283  amplitude += ampldefault; //
11284  absamplitude += abs(ampldefault); //
11286 
11287  if (flagcpuoptimization_ == 0) {
11288  } // if(flagcpuoptimization_== 0
11289  timew += (ii + 1) * abs(ampldefault);
11290  timeww += (ii + 1) * ampldefault;
11291  } //for 1
11293  // sub=4 HF
11294  if (sub == 4) {
11295  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HF
11296  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HF
11297  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HF
11298  }
11299 
11300  pedestalaver9 /= TSsize;
11301  pedestalaver4 /= c4;
11302  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
11303  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
11304 
11305  // ------------ to get signal in TS: -2 max +1 ------------
11306  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
11307  ampl = tool[ts_with_max_signal];
11308  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
11309  ampl += tool[ts_with_max_signal + 2];
11310  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
11311  ampl += tool[ts_with_max_signal + 1];
11312  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
11313  ampl += tool[ts_with_max_signal - 1];
11314 
11315  double ratio = 0.;
11316  // if(amplallTS != 0.) ratio = ampl/amplallTS;
11317  if (amplitude != 0.)
11318  ratio = ampl / amplitude;
11319 
11320  if (ratio < 0. || ratio > 1.02)
11321  ratio = 0.;
11322 
11323  double aveamplitude = 0.;
11324  double aveamplitudew = 0.;
11325  if (absamplitude > 0 && timew > 0)
11326  aveamplitude = timew / absamplitude; // average_TS +1
11327  if (amplitude > 0 && timeww > 0)
11328  aveamplitudew = timeww / amplitude; // average_TS +1
11329 
11330  double rmsamp = 0.;
11331  // and CapIdErrors:
11332  int error = 0;
11333  bool anycapid = true;
11334  bool anyer = false;
11335  bool anydv = true;
11336  int lastcapid = 0;
11337  int capid = 0;
11338  for (int ii = 0; ii < TSsize; ii++) {
11339  double aaaaaa = (ii + 1) - aveamplitudew;
11340  double aaaaaa2 = aaaaaa * aaaaaa;
11341  double ampldefault = tool[ii];
11342  rmsamp += (aaaaaa2 * ampldefault); // fC
11343  capid = ((*digiItr)[ii]).capid();
11344  bool er = (*digiItr)[ii].er(); // error
11345  bool dv = (*digiItr)[ii].dv(); // valid data
11346  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
11347  anycapid = false;
11348  }
11349  // std::cout << " ii = " << ii << " capid = " << capid << " ((lastcapid+1)%4) = " << ((lastcapid+1)%4) << std::endl;
11350  lastcapid = capid;
11351  if (er) {
11352  anyer = true;
11353  }
11354  if (!dv) {
11355  anydv = false;
11356  }
11357  } //for 2
11358 
11359  if (!anycapid || anyer || !anydv)
11360  error = 1;
11361  double rmsamplitude = 0.;
11362  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
11363  rmsamplitude = sqrt(rmsamp / amplitude);
11364  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
11365  if (error == 1) {
11366  if (sub == 4 && mdepth == 1)
11368  if (sub == 4 && mdepth == 2)
11370  }
11371  if (error != 1) {
11372  if (sub == 4 && mdepth == 1)
11374  if (sub == 4 && mdepth == 2)
11376  }
11377 
11378  if (sub == 4) {
11379  // bad_channels with C,A,W,P,pW,
11380  if (error == 1 || amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_ || rmsamplitude < rmsHFMin_ ||
11381  rmsamplitude > rmsHFMax_ || pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ ||
11382  pedestal2 < pedestalHFMax_ || pedestal3 < pedestalHFMax_ || pedestalw0 < pedestalwHFMax_ ||
11383  pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ || pedestalw3 < pedestalwHFMax_
11384 
11385  ) {
11386  for (int ii = 0; ii < TSsize; ii++) {
11387  double ampldefault = tool[ii];
11388  h_shape_bad_channels_HF->Fill(float(ii), ampldefault);
11389  h_shape0_bad_channels_HF->Fill(float(ii), 1.);
11390  }
11391  }
11392  // good_channels with C,A,W,P,pW,
11393  else {
11394  for (int ii = 0; ii < TSsize; ii++) {
11395  double ampldefault = tool[ii];
11396  h_shape_good_channels_HF->Fill(float(ii), ampldefault);
11397  h_shape0_good_channels_HF->Fill(float(ii), 1.);
11398  }
11399  }
11400  } // sub HF
11402  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
11403  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
11404  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; // Pedestals
11405  // HF
11406  if (sub == 4) {
11407  // // // // // // // // // HF PedestalCorrelations :
11409  double mypedestal = pedestal0;
11410  double mypedestalw = pedestalw0;
11411  h2_pedvsampl_HF->Fill(mypedestal, amplitude);
11412  h2_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11413  h_pedvsampl_HF->Fill(mypedestal, amplitude);
11414  h_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11415  h_pedvsampl0_HF->Fill(mypedestal, 1.);
11416  h_pedwvsampl0_HF->Fill(mypedestalw, 1.);
11417  } //
11418  // // // // // // // // // HF Pedestals:
11419  if (studyPedestalsHist_) {
11420  h_pedestal0_HF->Fill(pedestal0, 1.);
11421  h_pedestal1_HF->Fill(pedestal1, 1.);
11422  h_pedestal2_HF->Fill(pedestal2, 1.);
11423  h_pedestal3_HF->Fill(pedestal3, 1.);
11424  h_pedestalaver4_HF->Fill(pedestalaver4, 1.);
11425  h_pedestalaver9_HF->Fill(pedestalaver9, 1.);
11426  h_pedestalw0_HF->Fill(pedestalw0, 1.);
11427  h_pedestalw1_HF->Fill(pedestalw1, 1.);
11428  h_pedestalw2_HF->Fill(pedestalw2, 1.);
11429  h_pedestalw3_HF->Fill(pedestalw3, 1.);
11430  h_pedestalwaver4_HF->Fill(pedestalwaver4, 1.);
11431  h_pedestalwaver9_HF->Fill(pedestalwaver9, 1.);
11432  // for averaged values:
11433  if (mdepth == 1) {
11434  h_mapDepth1Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11435  h_mapDepth1Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11436  h_mapDepth1Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11437  h_mapDepth1Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11438  h_mapDepth1Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11439  h_mapDepth1Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11440  h_mapDepth1Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11441  h_mapDepth1Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11442  }
11443  if (mdepth == 2) {
11444  h_mapDepth2Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11445  h_mapDepth2Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11446  h_mapDepth2Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11447  h_mapDepth2Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11448  h_mapDepth2Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11449  h_mapDepth2Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11450  h_mapDepth2Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11451  h_mapDepth2Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11452  }
11453 
11454  if (pedestalw0 < pedestalwHFMax_ || pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ ||
11455  pedestalw3 < pedestalwHFMax_) {
11456  if (mdepth == 1)
11457  h_mapDepth1pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11458  if (mdepth == 2)
11459  h_mapDepth2pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11460  }
11461 
11462  if (pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ || pedestal2 < pedestalHFMax_ ||
11463  pedestal3 < pedestalHFMax_) {
11464  if (mdepth == 1)
11465  h_mapDepth1pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11466  if (mdepth == 2)
11467  h_mapDepth2pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11468  }
11469 
11470  for (int ii = 0; ii < TSsize; ii++) {
11471  h_pedestal00_HF->Fill(pedestal00->getValue(ii), 1.);
11472  h_gain_HF->Fill(gain->getValue(ii), 1.);
11473  }
11474  h_respcorr_HF->Fill(respcorr->getValue(), 1.);
11475  h_timecorr_HF->Fill(timecorr->getValue(), 1.);
11476  h_lutcorr_HF->Fill(lutcorr->getValue(), 1.);
11477 
11478  } //
11479 
11480  // // // // // // // // // HF ADCAmpl:
11481  if (studyADCAmplHist_) {
11482  h_ADCAmpl_HF->Fill(amplitude, 1.);
11483  h_ADCAmplrest1_HF->Fill(amplitude, 1.);
11484  h_ADCAmplrest6_HF->Fill(amplitude, 1.);
11485 
11486  h_ADCAmplZoom1_HF->Fill(amplitude, 1.);
11487  if (amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_) {
11489  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11490  if (mdepth == 1)
11491  h_mapDepth1ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11492  if (mdepth == 2)
11493  h_mapDepth2ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11494  } // if
11495  // if(amplitude >1500.) averSIGNALoccupancy_HF += 1.;
11496  if (amplitude < 20.) {
11497  if (mdepth == 1)
11498  h_mapDepth1ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11499  if (mdepth == 2)
11500  h_mapDepth2ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11501  } // if
11502 
11503  // for averaged values:
11504  if (mdepth == 1)
11505  h_mapDepth1ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11506  if (mdepth == 2)
11507  h_mapDepth2ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
11508  if (mdepth == 1)
11509  h_mapDepth1ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11510  if (mdepth == 2)
11511  h_mapDepth2ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
11512 
11513  h_bcnvsamplitude_HF->Fill(float(bcn), amplitude);
11514  h_bcnvsamplitude0_HF->Fill(float(bcn), 1.);
11516  h_orbitNumvsamplitude0_HF->Fill(float(orbitNum), 1.);
11518  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
11519  } //if(studyADCAmplHist_
11521 
11522  // // // // // // // // // HF TSmean:
11523  if (studyTSmeanShapeHist_) {
11524  h_TSmeanA_HF->Fill(aveamplitude1, 1.);
11525  // h2_TSnVsAyear2023_HF->Fill(25.*aveamplitude1, amplitude);
11526  h2_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
11527  h1_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
11528  h1_TSnVsAyear20230_HF->Fill(amplitude, 1.);
11529  if (aveamplitude1 < TSmeanHFMin_ || aveamplitude1 > TSmeanHFMax_) {
11531  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11532  if (mdepth == 1)
11533  h_mapDepth1TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11534  if (mdepth == 2)
11535  h_mapDepth2TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
11536  } // if
11537  // for averaged values:
11538  if (mdepth == 1)
11539  h_mapDepth1TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11540  if (mdepth == 2)
11541  h_mapDepth2TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
11542 
11544  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
11545  } //if(studyTSmeanShapeHist_
11547  // // // // // // // // // HF TSmax:
11548  if (studyTSmaxShapeHist_) {
11549  h_TSmaxA_HF->Fill(float(ts_with_max_signal), 1.);
11550  if (ts_with_max_signal < TSpeakHFMin_ || ts_with_max_signal > TSpeakHFMax_) {
11552  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11553  if (mdepth == 1)
11554  h_mapDepth1TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11555  if (mdepth == 2)
11556  h_mapDepth2TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
11557  } // if
11558  // for averaged values:
11559  if (mdepth == 1)
11560  h_mapDepth1TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11561  if (mdepth == 2)
11562  h_mapDepth2TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
11564  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
11565  } //if(studyTSmaxShapeHist_
11567  // // // // // // // // // HF RMS:
11568  if (studyRMSshapeHist_) {
11569  h_Amplitude_HF->Fill(rmsamplitude, 1.);
11570  if (rmsamplitude < rmsHFMin_ || rmsamplitude > rmsHFMax_) {
11572  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11573  if (mdepth == 1)
11574  h_mapDepth1Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11575  if (mdepth == 2)
11576  h_mapDepth2Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
11577  } // if
11578  // for averaged values:
11579  if (mdepth == 1)
11580  h_mapDepth1Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11581  if (mdepth == 2)
11582  h_mapDepth2Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
11584  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
11585  } //if(studyRMSshapeHist_)
11587  // // // // // // // // // HF Ratio:
11588  if (studyRatioShapeHist_) {
11589  h_Ampl_HF->Fill(ratio, 1.);
11590  if (ratio < ratioHFMin_ || ratio > ratioHFMax_) {
11592  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11593  if (mdepth == 1)
11594  h_mapDepth1Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11595  if (mdepth == 2)
11596  h_mapDepth2Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
11597  } //if(ratio
11598  // for averaged values:
11599  if (mdepth == 1)
11600  h_mapDepth1Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11601  if (mdepth == 2)
11602  h_mapDepth2Ampl_HF->Fill(double(ieta), double(iphi), ratio);
11603 
11605  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
11606  } //if(studyRatioShapeHist_)
11607 
11609  // // // // // // // // // HF DiffAmplitude:
11610  if (studyDiffAmplHist_) {
11611  if (mdepth == 1)
11612  h_mapDepth1AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11613  if (mdepth == 2)
11614  h_mapDepth2AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
11615  } // if(studyDiffAmplHist_)
11616 
11618  if (mdepth == 1)
11619  h_mapDepth1_HF->Fill(double(ieta), double(iphi), 1.);
11620  if (mdepth == 2)
11621  h_mapDepth2_HF->Fill(double(ieta), double(iphi), 1.);
11622 
11623  } //if ( sub == 4 )
11624 
11625  //
11626 }
11627 
11630  CaloSamples toolOriginal; // TS
11631  double tool[100];
11632  DetId detid = qie10df.detid();
11633  HcalDetId hcaldetid = HcalDetId(detid);
11634  int ieta = hcaldetid.ieta();
11635  if (ieta > 0)
11636  ieta -= 1;
11637  int iphi = hcaldetid.iphi() - 1;
11638  int mdepth = hcaldetid.depth();
11639  int sub = hcaldetid.subdet(); // 1-HB, 2-HE (HFQIE10DigiCollection: 4-HF)
11640  nTS = qie10df.samples(); // ----------------------------!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11641  /*
11642  # flag HBHE8 HBHE11 HF8 HF10 comments:
11643  # 0 + + + + all
11644  # 1 + - + - old
11645  # 2 - + - + new (2018)
11646  # 3 - + - + new w/o high depthes
11647  # 4 + - + + 2016fall
11648  # 5 + - + + 2016fall w/o high depthes
11649  # 6 + + - + 2017begin
11650  # 7 + + - + 2017begin w/o high depthes in HEonly
11651  # 8 + + - + 2017begin w/o high depthes
11652  # 9 + + + + all w/o high depthes
11653 */
11654  if (mdepth == 0 || sub != 4)
11655  return;
11656  if (mdepth > 2 && flagupgradeqie1011_ == 3)
11657  return;
11658  if (mdepth > 2 && flagupgradeqie1011_ == 5)
11659  return;
11660  if (mdepth > 2 && flagupgradeqie1011_ == 8)
11661  return;
11662  if (mdepth > 2 && flagupgradeqie1011_ == 9)
11663  return;
11665  const HcalPedestal* pedestal00 = conditions->getPedestal(hcaldetid);
11666  const HcalGain* gain = conditions->getGain(hcaldetid);
11667  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(hcaldetid);
11668  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(hcaldetid);
11669  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(hcaldetid);
11670  const HcalQIECoder* channelCoder = conditions->getHcalCoder(hcaldetid);
11671  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(hcaldetid);
11672  HcalCoderDb coder(*channelCoder, *shape);
11673  if (useADCfC_)
11674  coder.adc2fC(qie10df, toolOriginal);
11675  // double noiseADC = qie10df[0].adc();
11677  double pedestalaver9 = 0.;
11678  double pedestalaver4 = 0.;
11679  double pedestal0 = 0.;
11680  double pedestal1 = 0.;
11681  double pedestal2 = 0.;
11682  double pedestal3 = 0.;
11683  double pedestalwaver9 = 0.;
11684  double pedestalwaver4 = 0.;
11685  double pedestalw0 = 0.;
11686  double pedestalw1 = 0.;
11687  double pedestalw2 = 0.;
11688  double pedestalw3 = 0.;
11689  double amplitude = 0.;
11690  double absamplitude = 0.;
11691  double ampl = 0.;
11692  double timew = 0.;
11693  double timeww = 0.;
11694  double max_signal = -100.;
11695  int ts_with_max_signal = -100;
11696  int c0 = 0;
11697  int c1 = 0;
11698  int c2 = 0;
11699  int c3 = 0;
11700  int c4 = 0;
11701  double errorBtype = 0.;
11702 
11703  int TSsize = 3; // HF for Run3
11704  if (nTS != TSsize)
11705  errorBtype = 1.;
11706  TSsize = nTS; // ------------------------!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11707  int flagTS1 = 0;
11708  for (int ii = 0; ii < TSsize; ii++) {
11709  double ampldefault = 0.;
11710  double ampldefault0 = 0.;
11711  double ampldefault1 = 0.;
11712  double ampldefault2 = 0.;
11713  ampldefault0 = adc2fC_QIE10[qie10df[ii].adc()]; // massive
11714  if (useADCfC_)
11715  ampldefault1 = toolOriginal[ii]; //adcfC
11716  ampldefault2 = qie10df[ii].adc(); //ADCcounts
11717  if (useADCmassive_) {
11718  ampldefault = ampldefault0;
11719  }
11720  if (useADCfC_) {
11721  ampldefault = ampldefault1;
11722  }
11723  if (useADCcounts_) {
11724  ampldefault = ampldefault2;
11725  }
11726 
11727  int capid = (qie10df[ii]).capid();
11728  double pedestal = pedestal00->getValue(capid);
11729  double pedestalw = pedw->getSigma(capid, capid);
11730 
11732  ampldefault -= pedestal; // pedestal subtraction
11733 
11734  tool[ii] = ampldefault;
11735 
11736  pedestalaver9 += pedestal;
11737  pedestalwaver9 += pedestalw * pedestalw;
11738 
11739  if (capid == 0 && c0 == 0) {
11740  c0++;
11741  c4++;
11742  pedestalaver4 += pedestal;
11743  pedestal0 = pedestal;
11744  pedestalw0 = pedestalw;
11745  pedestalwaver4 += pedestalw * pedestalw;
11746  }
11747 
11748  if (capid == 1 && c1 == 0) {
11749  c1++;
11750  c4++;
11751  pedestalaver4 += pedestal;
11752  pedestal1 = pedestal;
11753  pedestalw1 = pedestalw;
11754  pedestalwaver4 += pedestalw * pedestalw;
11755  }
11756  if (capid == 2 && c2 == 0) {
11757  c2++;
11758  c4++;
11759  pedestalaver4 += pedestal;
11760  pedestal2 = pedestal;
11761  pedestalw2 = pedestalw;
11762  pedestalwaver4 += pedestalw * pedestalw;
11763  }
11764  if (capid == 3 && c3 == 0) {
11765  c3++;
11766  c4++;
11767  pedestalaver4 += pedestal;
11768  pedestal3 = pedestal;
11769  pedestalw3 = pedestalw;
11770  pedestalwaver4 += pedestalw * pedestalw;
11771  }
11772 
11773  if (max_signal < ampldefault) {
11774  max_signal = ampldefault;
11775  ts_with_max_signal = ii;
11776  }
11777  amplitude += ampldefault; //
11778  absamplitude += abs(ampldefault); //
11780  timew += (ii + 1) * abs(ampldefault);
11781  timeww += (ii + 1) * ampldefault;
11782  if (ii == 1 && ampldefault > 0.)
11783  flagTS1 = 1;
11784  } //for 1
11786  // sub=4 HF
11787  if (sub == 4) {
11788  amplitudechannel0[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.; // 0-neta ; 0-71 HF
11789  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HF
11790  amplitudechannel2[sub - 1][mdepth - 1][ieta + 41][iphi] += pow(amplitude, 2); // 0-neta ; 0-71 HF
11791  } // just in case against any violations
11792 
11793  pedestalaver9 /= TSsize;
11794  pedestalaver4 /= c4;
11795  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
11796  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
11797 
11798  // ------------ to get signal in TS: -2 max +1 ------------
11799  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
11800  ampl = tool[ts_with_max_signal];
11801  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
11802  ampl += tool[ts_with_max_signal + 2];
11803  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
11804  ampl += tool[ts_with_max_signal + 1];
11805  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
11806  ampl += tool[ts_with_max_signal - 1];
11807 
11808  double ratio = 0.;
11809  // if(amplallTS != 0.) ratio = ampl/amplallTS;
11810  if (amplitude != 0.)
11811  ratio = ampl / amplitude;
11812  if (ratio < 0. || ratio > 1.02)
11813  ratio = 0.;
11814  double aveamplitude = 0.;
11815  double aveamplitudew = 0.;
11816  if (absamplitude > 0 && timew > 0)
11817  aveamplitude = timew / absamplitude; // average_TS +1
11818  if (amplitude > 0 && timeww > 0)
11819  aveamplitudew = timeww / amplitude; // average_TS +1
11820 
11821  double rmsamp = 0.;
11822  int error = 0;
11823  bool anycapid = true;
11824  int lastcapid = 0;
11825  int capid = 0;
11826  for (int ii = 0; ii < TSsize; ii++) {
11827  double aaaaaa = (ii + 1) - aveamplitudew;
11828  double aaaaaa2 = aaaaaa * aaaaaa;
11829  double ampldefault = tool[ii];
11830  rmsamp += (aaaaaa2 * ampldefault); // fC
11831  capid = (qie10df[ii]).capid();
11832  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
11833  anycapid = false;
11834  }
11835  lastcapid = capid;
11836  } //for 2
11837 
11838  if (!anycapid)
11839  error = 1;
11840  double rmsamplitude = 0.;
11841  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
11842  rmsamplitude = sqrt(rmsamp / amplitude);
11843  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
11844 
11845  // CapIdErrors end /////////////////////////////////////////////////////////
11846  // AZ 1.10.2015:
11847  if (error == 1) {
11848  if (sub == 4 && mdepth == 1)
11850  if (sub == 4 && mdepth == 2)
11852  }
11853  if (error != 1) {
11854  if (sub == 4 && mdepth == 1)
11856  if (sub == 4 && mdepth == 2)
11858  }
11859 
11860  if (sub == 4) {
11861  // bad_channels with C,A,W,P,pW,
11862  if (error == 1 || amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_ || rmsamplitude < rmsHFMin_ ||
11863  rmsamplitude > rmsHFMax_ || pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ ||
11864  pedestal2 < pedestalHFMax_ || pedestal3 < pedestalHFMax_ || pedestalw0 < pedestalwHFMax_ ||
11865  pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ || pedestalw3 < pedestalwHFMax_
11866 
11867  ) {
11868  for (int ii = 0; ii < TSsize; ii++) {
11869  double ampldefault = tool[ii];
11870  h_shape_bad_channels_HF->Fill(float(ii), ampldefault);
11871  h_shape0_bad_channels_HF->Fill(float(ii), 1.);
11872  }
11873  }
11874  // good_channels with C,A,W,P,pW,
11875  else {
11876  for (int ii = 0; ii < TSsize; ii++) {
11877  double ampldefault = tool[ii];
11878  h_shape_good_channels_HF->Fill(float(ii), ampldefault);
11879  h_shape0_good_channels_HF->Fill(float(ii), 1.);
11880  }
11881  }
11882  } // sub HFQIE10
11884  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
11885  // for Error B-type
11886  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
11887  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; // Pedestals
11888  // HFQIE10
11889  if (sub == 4) {
11890  // // // // // // // // // HFQIE10 PedestalCorrelations :
11892  double mypedestal = pedestal0;
11893  double mypedestalw = pedestalw0;
11894  h2_pedvsampl_HF->Fill(mypedestal, amplitude);
11895  h2_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11896  h_pedvsampl_HF->Fill(mypedestal, amplitude);
11897  h_pedwvsampl_HF->Fill(mypedestalw, amplitude);
11898  h_pedvsampl0_HF->Fill(mypedestal, 1.);
11899  h_pedwvsampl0_HF->Fill(mypedestalw, 1.);
11900  } //
11901  // // // // // // // // // HFQIE10 Pedestals:
11902  if (studyPedestalsHist_) {
11903  h_pedestal0_HF->Fill(pedestal0, 1.);
11904  h_pedestal1_HF->Fill(pedestal1, 1.);
11905  h_pedestal2_HF->Fill(pedestal2, 1.);
11906  h_pedestal3_HF->Fill(pedestal3, 1.);
11907  h_pedestalaver4_HF->Fill(pedestalaver4, 1.);
11908  h_pedestalaver9_HF->Fill(pedestalaver9, 1.);
11909  h_pedestalw0_HF->Fill(pedestalw0, 1.);
11910  h_pedestalw1_HF->Fill(pedestalw1, 1.);
11911  h_pedestalw2_HF->Fill(pedestalw2, 1.);
11912  h_pedestalw3_HF->Fill(pedestalw3, 1.);
11913  h_pedestalwaver4_HF->Fill(pedestalwaver4, 1.);
11914  h_pedestalwaver9_HF->Fill(pedestalwaver9, 1.);
11915  // for averaged values:
11916  if (mdepth == 1) {
11917  h_mapDepth1Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11918  h_mapDepth1Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11919  h_mapDepth1Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11920  h_mapDepth1Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11921  h_mapDepth1Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11922  h_mapDepth1Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11923  h_mapDepth1Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11924  h_mapDepth1Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11925  }
11926  if (mdepth == 2) {
11927  h_mapDepth2Ped0_HF->Fill(double(ieta), double(iphi), pedestal0);
11928  h_mapDepth2Ped1_HF->Fill(double(ieta), double(iphi), pedestal1);
11929  h_mapDepth2Ped2_HF->Fill(double(ieta), double(iphi), pedestal2);
11930  h_mapDepth2Ped3_HF->Fill(double(ieta), double(iphi), pedestal3);
11931  h_mapDepth2Pedw0_HF->Fill(double(ieta), double(iphi), pedestalw0);
11932  h_mapDepth2Pedw1_HF->Fill(double(ieta), double(iphi), pedestalw1);
11933  h_mapDepth2Pedw2_HF->Fill(double(ieta), double(iphi), pedestalw2);
11934  h_mapDepth2Pedw3_HF->Fill(double(ieta), double(iphi), pedestalw3);
11935  }
11936 
11937  if (pedestalw0 < pedestalwHFMax_ || pedestalw1 < pedestalwHFMax_ || pedestalw2 < pedestalwHFMax_ ||
11938  pedestalw3 < pedestalwHFMax_) {
11939  if (mdepth == 1)
11940  h_mapDepth1pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11941  if (mdepth == 2)
11942  h_mapDepth2pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11943  if (mdepth == 3)
11944  h_mapDepth3pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11945  if (mdepth == 4)
11946  h_mapDepth4pedestalw_HF->Fill(double(ieta), double(iphi), 1.);
11947  }
11948 
11949  if (pedestal0 < pedestalHFMax_ || pedestal1 < pedestalHFMax_ || pedestal2 < pedestalHFMax_ ||
11950  pedestal3 < pedestalHFMax_) {
11951  if (mdepth == 1)
11952  h_mapDepth1pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11953  if (mdepth == 2)
11954  h_mapDepth2pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11955  if (mdepth == 3)
11956  h_mapDepth3pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11957  if (mdepth == 4)
11958  h_mapDepth4pedestal_HF->Fill(double(ieta), double(iphi), 1.);
11959  }
11960 
11961  for (int ii = 0; ii < TSsize; ii++) {
11962  h_pedestal00_HF->Fill(pedestal00->getValue(ii), 1.);
11963  h_gain_HF->Fill(gain->getValue(ii), 1.);
11964  }
11965  h_respcorr_HF->Fill(respcorr->getValue(), 1.);
11966  h_timecorr_HF->Fill(timecorr->getValue(), 1.);
11967  h_lutcorr_HF->Fill(lutcorr->getValue(), 1.);
11968 
11969  } //
11970 
11971  // // // // // // // // // HFQIE10 ADCAmpl:
11972  if (studyADCAmplHist_) {
11973  h_ADCAmpl_HF->Fill(amplitude, 1.);
11974  h_ADCAmplrest1_HF->Fill(amplitude, 1.);
11975  h_ADCAmplrest6_HF->Fill(amplitude, 1.);
11976 
11977  h_ADCAmplZoom1_HF->Fill(amplitude, 1.);
11978  if (amplitude < ADCAmplHFMin_ || amplitude > ADCAmplHFMax_) {
11980  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
11981  if (mdepth == 1)
11982  h_mapDepth1ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11983  if (mdepth == 2)
11984  h_mapDepth2ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11985  if (mdepth == 3)
11986  h_mapDepth3ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11987  if (mdepth == 4)
11988  h_mapDepth4ADCAmpl225_HF->Fill(double(ieta), double(iphi), 1.);
11989  } // if
11990  // if(amplitude >1500.) averSIGNALoccupancy_HF += 1.;
11991  if (amplitude < 20.) {
11992  if (mdepth == 1)
11993  h_mapDepth1ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11994  if (mdepth == 2)
11995  h_mapDepth2ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11996  if (mdepth == 3)
11997  h_mapDepth3ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
11998  if (mdepth == 4)
11999  h_mapDepth4ADCAmpl225Copy_HF->Fill(double(ieta), double(iphi), 1.);
12000  } // if
12001 
12002  // for averaged values:
12003  if (mdepth == 1)
12004  h_mapDepth1ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
12005  if (mdepth == 2)
12006  h_mapDepth2ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
12007  if (mdepth == 3)
12008  h_mapDepth3ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
12009  if (mdepth == 4)
12010  h_mapDepth4ADCAmpl_HF->Fill(double(ieta), double(iphi), amplitude);
12011  if (mdepth == 1)
12012  h_mapDepth1ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
12013  if (mdepth == 2)
12014  h_mapDepth2ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
12015  if (mdepth == 3)
12016  h_mapDepth3ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
12017  if (mdepth == 4)
12018  h_mapDepth4ADCAmpl12_HF->Fill(double(ieta), double(iphi), ampl);
12019 
12020  h_bcnvsamplitude_HF->Fill(float(bcn), amplitude);
12021  h_bcnvsamplitude0_HF->Fill(float(bcn), 1.);
12023  h_orbitNumvsamplitude0_HF->Fill(float(orbitNum), 1.);
12025  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
12026  } //if(studyADCAmplHist_
12027  // // // // // // // // // HFQIE10 TSmean:
12028  if (studyTSmeanShapeHist_) {
12029  h_TSmeanA_HF->Fill(aveamplitude1, 1.);
12030  // h2_TSnVsAyear2023_HF->Fill(25.*aveamplitude1, amplitude);
12031  h2_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
12032  h1_TSnVsAyear2023_HF->Fill(amplitude, 25. * aveamplitude1);
12033  h1_TSnVsAyear20230_HF->Fill(amplitude, 1.);
12034  if (aveamplitude1 < TSmeanHFMin_ || aveamplitude1 > TSmeanHFMax_) {
12036  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12037  if (mdepth == 1)
12038  h_mapDepth1TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
12039  if (mdepth == 2)
12040  h_mapDepth2TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
12041  if (mdepth == 3)
12042  h_mapDepth3TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
12043  if (mdepth == 4)
12044  h_mapDepth4TSmeanA225_HF->Fill(double(ieta), double(iphi), 1.);
12045  } // if
12046  // for averaged values:
12047  if (mdepth == 1)
12048  h_mapDepth1TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
12049  if (mdepth == 2)
12050  h_mapDepth2TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
12051  if (mdepth == 3)
12052  h_mapDepth3TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
12053  if (mdepth == 4)
12054  h_mapDepth4TSmeanA_HF->Fill(double(ieta), double(iphi), aveamplitude1);
12055 
12057  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
12058  } //if(studyTSmeanShapeHist_
12060  // // // // // // // // // HFQIE10 TSmax:
12061  if (studyTSmaxShapeHist_) {
12062  h_TSmaxA_HF->Fill(float(ts_with_max_signal), 1.);
12063  if (ts_with_max_signal < TSpeakHFMin_ || ts_with_max_signal > TSpeakHFMax_) {
12065  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12066  if (mdepth == 1)
12067  h_mapDepth1TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
12068  if (mdepth == 2)
12069  h_mapDepth2TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
12070  if (mdepth == 3)
12071  h_mapDepth3TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
12072  if (mdepth == 4)
12073  h_mapDepth4TSmaxA225_HF->Fill(double(ieta), double(iphi), 1.);
12074  } // if
12075  // for averaged values:
12076  if (mdepth == 1)
12077  h_mapDepth1TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
12078  if (mdepth == 2)
12079  h_mapDepth2TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
12080  if (mdepth == 3)
12081  h_mapDepth3TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
12082  if (mdepth == 4)
12083  h_mapDepth4TSmaxA_HF->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
12084 
12086  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
12087  } //if(studyTSmaxShapeHist_
12089  // // // // // // // // // HFQIE10 RMS:
12090  if (studyRMSshapeHist_) {
12091  h_Amplitude_HF->Fill(rmsamplitude, 1.);
12092  if (rmsamplitude < rmsHFMin_ || rmsamplitude > rmsHFMax_) {
12094  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12095  if (mdepth == 1)
12096  h_mapDepth1Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
12097  if (mdepth == 2)
12098  h_mapDepth2Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
12099  if (mdepth == 3)
12100  h_mapDepth3Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
12101  if (mdepth == 4)
12102  h_mapDepth4Amplitude225_HF->Fill(double(ieta), double(iphi), 1.);
12103  } // if
12104  // for averaged values:
12105 
12106  if (mdepth == 1)
12107  h_mapDepth1Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
12108  if (mdepth == 2)
12109  h_mapDepth2Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
12110  if (mdepth == 3)
12111  h_mapDepth3Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
12112  if (mdepth == 4)
12113  h_mapDepth4Amplitude_HF->Fill(double(ieta), double(iphi), rmsamplitude);
12115  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
12116  } //if(studyRMSshapeHist_)
12118  // // // // // // // // // HFQIE10 Ratio:
12119  if (studyRatioShapeHist_) {
12120  h_Ampl_HF->Fill(ratio, 1.);
12121  if (ratio < ratioHFMin_ || ratio > ratioHFMax_) {
12123  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12124  if (mdepth == 1)
12125  h_mapDepth1Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
12126  if (mdepth == 2)
12127  h_mapDepth2Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
12128  if (mdepth == 3)
12129  h_mapDepth3Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
12130  if (mdepth == 4)
12131  h_mapDepth4Ampl047_HF->Fill(double(ieta), double(iphi), 1.);
12132  } //if(ratio
12133  // for averaged values:
12134  if (mdepth == 1)
12135  h_mapDepth1Ampl_HF->Fill(double(ieta), double(iphi), ratio);
12136  if (mdepth == 2)
12137  h_mapDepth2Ampl_HF->Fill(double(ieta), double(iphi), ratio);
12138  if (mdepth == 3)
12139  h_mapDepth3Ampl_HF->Fill(double(ieta), double(iphi), ratio);
12140  if (mdepth == 4)
12141  h_mapDepth4Ampl_HF->Fill(double(ieta), double(iphi), ratio);
12142 
12144  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
12145  } //if(studyRatioShapeHist_)
12146 
12148  // // // // // // // // // HFQIE10 DiffAmplitude:
12149  if (studyDiffAmplHist_) {
12150  if (mdepth == 1)
12151  h_mapDepth1AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
12152  if (mdepth == 2)
12153  h_mapDepth2AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
12154  if (mdepth == 3)
12155  h_mapDepth3AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
12156  if (mdepth == 4)
12157  h_mapDepth4AmplE34_HF->Fill(double(ieta), double(iphi), amplitude);
12158  } // if(studyDiffAmplHist_)
12159 
12161  if (mdepth == 1)
12162  h_mapDepth1_HF->Fill(double(ieta), double(iphi), 1.);
12163  if (mdepth == 2)
12164  h_mapDepth2_HF->Fill(double(ieta), double(iphi), 1.);
12165  if (mdepth == 3)
12166  h_mapDepth3_HF->Fill(double(ieta), double(iphi), 1.);
12167  if (mdepth == 4)
12168  h_mapDepth4_HF->Fill(double(ieta), double(iphi), 1.);
12169 
12170  if (flagTS1 == 1) {
12171  if (mdepth == 1)
12172  h_mapDepth1TS1_HF->Fill(double(ieta), double(iphi), 1.);
12173  if (mdepth == 2)
12174  h_mapDepth2TS1_HF->Fill(double(ieta), double(iphi), 1.);
12175  if (mdepth == 3)
12176  h_mapDepth3TS1_HF->Fill(double(ieta), double(iphi), 1.);
12177  if (mdepth == 4)
12178  h_mapDepth4TS1_HF->Fill(double(ieta), double(iphi), 1.);
12179  } // for TS = 1
12180 
12181  } //if ( sub == 4 )
12182 
12183  //
12184 }
12185 
12188  CaloSamples toolOriginal; // TS
12189  double tool[100];
12190  HcalDetId cell(digiItr->id());
12191  int mdepth = cell.depth();
12192  int iphi = cell.iphi() - 1; // 0-71
12193  int ieta = cell.ieta();
12194  if (ieta > 0)
12195  ieta -= 1; //-41 +41
12196  int sub = cell.subdet(); // (HODigiCollection: 3-HO)
12197  const HcalPedestal* pedestal00 = conditions->getPedestal(cell);
12198  const HcalGain* gain = conditions->getGain(cell);
12199  const HcalRespCorr* respcorr = conditions->getHcalRespCorr(cell);
12200  const HcalTimeCorr* timecorr = conditions->getHcalTimeCorr(cell);
12201  const HcalLUTCorr* lutcorr = conditions->getHcalLUTCorr(cell);
12202  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
12203  const HcalPedestalWidth* pedw = conditions->getPedestalWidth(cell);
12204  HcalCoderDb coder(*channelCoder, *shape);
12205  if (useADCfC_)
12206  coder.adc2fC(*digiItr, toolOriginal);
12207  double pedestalaver9 = 0.;
12208  double pedestalaver4 = 0.;
12209  double pedestal0 = 0.;
12210  double pedestal1 = 0.;
12211  double pedestal2 = 0.;
12212  double pedestal3 = 0.;
12213  double pedestalwaver9 = 0.;
12214  double pedestalwaver4 = 0.;
12215  double pedestalw0 = 0.;
12216  double pedestalw1 = 0.;
12217  double pedestalw2 = 0.;
12218  double pedestalw3 = 0.;
12219  double amplitude = 0.;
12220  double absamplitude = 0.;
12221  double ampl = 0.;
12222  double timew = 0.;
12223  double timeww = 0.;
12224  double max_signal = -100.;
12225  int ts_with_max_signal = -100;
12226  int c0 = 0;
12227  int c1 = 0;
12228  int c2 = 0;
12229  int c3 = 0;
12230  int c4 = 0;
12231  double errorBtype = 0.;
12232  int TSsize = 10; //HO
12233  if ((*digiItr).size() != TSsize)
12234  errorBtype = 1.;
12235  TSsize = digiItr->size();
12236  int flagTS012 = 0;
12237  for (int ii = 0; ii < TSsize; ii++) {
12238  double ampldefault = 0.;
12239  double ampldefault0 = 0.;
12240  double ampldefault1 = 0.;
12241  double ampldefault2 = 0.;
12242  ampldefault0 = adc2fC[digiItr->sample(ii).adc()]; // massive
12243  if (useADCfC_)
12244  ampldefault1 = toolOriginal[ii]; //adcfC
12245  ampldefault2 = (*digiItr)[ii].adc(); //ADCcounts
12246  if (useADCmassive_) {
12247  ampldefault = ampldefault0;
12248  }
12249  if (useADCfC_) {
12250  ampldefault = ampldefault1;
12251  }
12252  if (useADCcounts_) {
12253  ampldefault = ampldefault2;
12254  }
12255  int capid = ((*digiItr)[ii]).capid();
12256  double pedestal = pedestal00->getValue(capid);
12257  double pedestalw = pedw->getSigma(capid, capid);
12259  ampldefault -= pedestal; // pedestal subtraction
12260  tool[ii] = ampldefault;
12261  pedestalaver9 += pedestal;
12262  pedestalwaver9 += pedestalw * pedestalw;
12263  if (capid == 0 && c0 == 0) {
12264  c0++;
12265  c4++;
12266  pedestalaver4 += pedestal;
12267  pedestal0 = pedestal;
12268  pedestalw0 = pedestalw;
12269  pedestalwaver4 += pedestalw * pedestalw;
12270  }
12271  if (capid == 1 && c1 == 0) {
12272  c1++;
12273  c4++;
12274  pedestalaver4 += pedestal;
12275  pedestal1 = pedestal;
12276  pedestalw1 = pedestalw;
12277  pedestalwaver4 += pedestalw * pedestalw;
12278  }
12279  if (capid == 2 && c2 == 0) {
12280  c2++;
12281  c4++;
12282  pedestalaver4 += pedestal;
12283  pedestal2 = pedestal;
12284  pedestalw2 = pedestalw;
12285  pedestalwaver4 += pedestalw * pedestalw;
12286  }
12287  if (capid == 3 && c3 == 0) {
12288  c3++;
12289  c4++;
12290  pedestalaver4 += pedestal;
12291  pedestal3 = pedestal;
12292  pedestalw3 = pedestalw;
12293  pedestalwaver4 += pedestalw * pedestalw;
12294  }
12295 
12296  if (max_signal < ampldefault) {
12297  max_signal = ampldefault;
12298  ts_with_max_signal = ii;
12299  }
12300  amplitude += ampldefault;
12301  absamplitude += abs(ampldefault);
12303  if (flagcpuoptimization_ == 0) {
12304  }
12305  timew += (ii + 1) * abs(ampldefault);
12306  timeww += (ii + 1) * ampldefault;
12307  if (ii < 3 && ampldefault > 0.)
12308  flagTS012 = 1;
12309  } //for 1
12310  amplitudechannel[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude; // 0-neta ; 0-71 HO
12311 
12312  pedestalaver9 /= TSsize;
12313  pedestalaver4 /= c4;
12314  pedestalwaver9 = sqrt(pedestalwaver9 / TSsize);
12315  pedestalwaver4 = sqrt(pedestalwaver4 / c4);
12316  if (ts_with_max_signal > -1 && ts_with_max_signal < TSsize)
12317  ampl = tool[ts_with_max_signal];
12318  if (ts_with_max_signal + 2 > -1 && ts_with_max_signal + 2 < TSsize)
12319  ampl += tool[ts_with_max_signal + 2];
12320  if (ts_with_max_signal + 1 > -1 && ts_with_max_signal + 1 < TSsize)
12321  ampl += tool[ts_with_max_signal + 1];
12322  if (ts_with_max_signal - 1 > -1 && ts_with_max_signal - 1 < TSsize)
12323  ampl += tool[ts_with_max_signal - 1];
12324  double ratio = 0.;
12325  if (amplitude != 0.)
12326  ratio = ampl / amplitude;
12327  if (ratio < 0. || ratio > 1.04)
12328  ratio = 0.;
12329  double aveamplitude = 0.;
12330  double aveamplitudew = 0.;
12331  if (absamplitude > 0 && timew > 0)
12332  aveamplitude = timew / absamplitude; // average_TS +1
12333  if (amplitude > 0 && timeww > 0)
12334  aveamplitudew = timeww / amplitude; // average_TS +1
12335  double rmsamp = 0.;
12336  int error = 0;
12337  bool anycapid = true;
12338  bool anyer = false;
12339  bool anydv = true;
12340  int lastcapid = 0;
12341  int capid = 0;
12342  for (int ii = 0; ii < TSsize; ii++) {
12343  double aaaaaa = (ii + 1) - aveamplitudew;
12344  double aaaaaa2 = aaaaaa * aaaaaa;
12345  double ampldefault = tool[ii];
12346  rmsamp += (aaaaaa2 * ampldefault); // fC
12347  capid = ((*digiItr)[ii]).capid();
12348  bool er = (*digiItr)[ii].er(); // error
12349  bool dv = (*digiItr)[ii].dv(); // valid data
12350  if (ii != 0 && ((lastcapid + 1) % 4) != capid) {
12351  anycapid = false;
12352  }
12353  lastcapid = capid;
12354  if (er) {
12355  anyer = true;
12356  }
12357  if (!dv) {
12358  anydv = false;
12359  }
12360  } //for 2
12361 
12362  if (!anycapid || anyer || !anydv)
12363  error = 1;
12364  double rmsamplitude = 0.;
12365  if ((amplitude > 0 && rmsamp > 0) || (amplitude < 0 && rmsamp < 0))
12366  rmsamplitude = sqrt(rmsamp / amplitude);
12367  double aveamplitude1 = aveamplitude - 1; // means iTS=0-9, so bad is iTS=0 and 9
12368  if (error == 1) {
12369  if (sub == 3 && mdepth == 4)
12371  }
12372  if (error != 1) {
12373  if (sub == 3 && mdepth == 4)
12375  }
12376 
12377  if (sub == 3) {
12378  if (error == 1 || amplitude < ADCAmplHOMin_ || amplitude > ADCAmplHOMax_ || rmsamplitude < rmsHOMin_ ||
12379  rmsamplitude > rmsHOMax_ || pedestal0 < pedestalHOMax_ || pedestal1 < pedestalHOMax_ ||
12380  pedestal2 < pedestalHOMax_ || pedestal3 < pedestalHOMax_ || pedestalw0 < pedestalwHOMax_ ||
12381  pedestalw1 < pedestalwHOMax_ || pedestalw2 < pedestalwHOMax_ || pedestalw3 < pedestalwHOMax_
12382 
12383  ) {
12384  for (int ii = 0; ii < TSsize; ii++) {
12385  double ampldefault = tool[ii];
12386  h_shape_bad_channels_HO->Fill(float(ii), ampldefault);
12387  h_shape0_bad_channels_HO->Fill(float(ii), 1.);
12388  }
12389  } else {
12390  for (int ii = 0; ii < TSsize; ii++) {
12391  double ampldefault = tool[ii];
12392  h_shape_good_channels_HO->Fill(float(ii), ampldefault);
12393  h_shape0_good_channels_HO->Fill(float(ii), 1.);
12394  }
12395  }
12396  } // sub HO
12398  sum0Estimator[sub - 1][mdepth - 1][ieta + 41][iphi] += 1.;
12399  // for Error B-type
12400  sumEstimator6[sub - 1][mdepth - 1][ieta + 41][iphi] += errorBtype;
12401  sumEstimator0[sub - 1][mdepth - 1][ieta + 41][iphi] += pedestal0; //Pedestals
12402  // HO
12403  if (sub == 3) {
12405  double mypedestal = pedestal0;
12406  double mypedestalw = pedestalw0;
12407  h2_pedvsampl_HO->Fill(mypedestal, amplitude);
12408  h2_pedwvsampl_HO->Fill(mypedestalw, amplitude);
12409  h_pedvsampl_HO->Fill(mypedestal, amplitude);
12410  h_pedwvsampl_HO->Fill(mypedestalw, amplitude);
12411  h_pedvsampl0_HO->Fill(mypedestal, 1.);
12412  h_pedwvsampl0_HO->Fill(mypedestalw, 1.);
12413  } //
12414  // // // // // // // // // HO Pedestals:
12415  if (studyPedestalsHist_) {
12416  h_pedestal0_HO->Fill(pedestal0, 1.);
12417  h_pedestal1_HO->Fill(pedestal1, 1.);
12418  h_pedestal2_HO->Fill(pedestal2, 1.);
12419  h_pedestal3_HO->Fill(pedestal3, 1.);
12420  h_pedestalaver4_HO->Fill(pedestalaver4, 1.);
12421  h_pedestalaver9_HO->Fill(pedestalaver9, 1.);
12422  h_pedestalw0_HO->Fill(pedestalw0, 1.);
12423  h_pedestalw1_HO->Fill(pedestalw1, 1.);
12424  h_pedestalw2_HO->Fill(pedestalw2, 1.);
12425  h_pedestalw3_HO->Fill(pedestalw3, 1.);
12426  h_pedestalwaver4_HO->Fill(pedestalwaver4, 1.);
12427  h_pedestalwaver9_HO->Fill(pedestalwaver9, 1.);
12428  // for averaged values:
12429  if (mdepth == 4) {
12430  h_mapDepth4Ped0_HO->Fill(double(ieta), double(iphi), pedestal0);
12431  h_mapDepth4Ped1_HO->Fill(double(ieta), double(iphi), pedestal1);
12432  h_mapDepth4Ped2_HO->Fill(double(ieta), double(iphi), pedestal2);
12433  h_mapDepth4Ped3_HO->Fill(double(ieta), double(iphi), pedestal3);
12434  h_mapDepth4Pedw0_HO->Fill(double(ieta), double(iphi), pedestalw0);
12435  h_mapDepth4Pedw1_HO->Fill(double(ieta), double(iphi), pedestalw1);
12436  h_mapDepth4Pedw2_HO->Fill(double(ieta), double(iphi), pedestalw2);
12437  h_mapDepth4Pedw3_HO->Fill(double(ieta), double(iphi), pedestalw3);
12438  }
12439  if (pedestalw0 < pedestalwHOMax_ || pedestalw1 < pedestalwHOMax_ || pedestalw2 < pedestalwHOMax_ ||
12440  pedestalw3 < pedestalwHOMax_) {
12441  if (mdepth == 4)
12442  h_mapDepth4pedestalw_HO->Fill(double(ieta), double(iphi), 1.);
12443  }
12444  if (pedestal0 < pedestalHOMax_ || pedestal1 < pedestalHOMax_ || pedestal2 < pedestalHOMax_ ||
12445  pedestal3 < pedestalHOMax_) {
12446  if (mdepth == 4)
12447  h_mapDepth4pedestal_HO->Fill(double(ieta), double(iphi), 1.);
12448  }
12449  for (int ii = 0; ii < TSsize; ii++) {
12450  h_pedestal00_HO->Fill(pedestal00->getValue(ii), 1.);
12451  h_gain_HO->Fill(gain->getValue(ii), 1.);
12452  }
12453  h_respcorr_HO->Fill(respcorr->getValue(), 1.);
12454  h_timecorr_HO->Fill(timecorr->getValue(), 1.);
12455  h_lutcorr_HO->Fill(lutcorr->getValue(), 1.);
12456  } //
12457  // // // // // // // // // HO ADCAmpl:
12458  if (studyADCAmplHist_) {
12459  h_ADCAmpl_HO->Fill(amplitude, 1.);
12460  h_ADCAmplrest1_HO->Fill(amplitude, 1.);
12461  h_ADCAmplrest6_HO->Fill(amplitude, 1.);
12462 
12463  h_ADCAmplZoom1_HO->Fill(amplitude, 1.);
12464  h_ADCAmpl_HO_copy->Fill(amplitude, 1.);
12465  if (amplitude < ADCAmplHOMin_ || amplitude > ADCAmplHOMax_) {
12467  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12468  if (mdepth == 4)
12469  h_mapDepth4ADCAmpl225_HO->Fill(double(ieta), double(iphi), 1.);
12470  } // if
12471  // if(amplitude >2000.) averSIGNALoccupancy_HO += 1.;
12472 
12473  if (amplitude < 100.) {
12474  if (mdepth == 4)
12475  h_mapDepth4ADCAmpl225Copy_HO->Fill(double(ieta), double(iphi), 1.);
12476  } // if
12477  // for averaged values:
12478  if (mdepth == 4)
12479  h_mapDepth4ADCAmpl_HO->Fill(double(ieta), double(iphi), amplitude);
12480  if (mdepth == 4)
12481  h_mapDepth4ADCAmpl12_HO->Fill(double(ieta), double(iphi), ampl);
12482 
12483  h_bcnvsamplitude_HO->Fill(float(bcn), amplitude);
12484  h_bcnvsamplitude0_HO->Fill(float(bcn), 1.);
12485 
12487  h_orbitNumvsamplitude0_HO->Fill(float(orbitNum), 1.);
12489  sumEstimator1[sub - 1][mdepth - 1][ieta + 41][iphi] += amplitude;
12490  } //if(studyADCAmplHist_
12491  if (studyTSmeanShapeHist_) {
12492  h_TSmeanA_HO->Fill(aveamplitude1, 1.);
12493  // h2_TSnVsAyear2023_HO->Fill(25.*aveamplitude1, amplitude);
12494  h2_TSnVsAyear2023_HO->Fill(amplitude, 25. * aveamplitude1);
12495  h1_TSnVsAyear2023_HO->Fill(amplitude, 25. * aveamplitude1);
12496  h1_TSnVsAyear20230_HO->Fill(amplitude, 1.);
12497  if (aveamplitude1 < TSmeanHOMin_ || aveamplitude1 > TSmeanHOMax_) {
12499  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12500  if (mdepth == 4)
12501  h_mapDepth4TSmeanA225_HO->Fill(double(ieta), double(iphi), 1.);
12502  } // if
12503  if (mdepth == 4)
12504  h_mapDepth4TSmeanA_HO->Fill(double(ieta), double(iphi), aveamplitude1);
12506  sumEstimator2[sub - 1][mdepth - 1][ieta + 41][iphi] += aveamplitude1;
12507  } //if(studyTSmeanShapeHist_
12508  if (studyTSmaxShapeHist_) {
12509  h_TSmaxA_HO->Fill(float(ts_with_max_signal), 1.);
12510  if (ts_with_max_signal < TSpeakHOMin_ || ts_with_max_signal > TSpeakHOMax_) {
12512  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12513  if (mdepth == 4)
12514  h_mapDepth4TSmaxA225_HO->Fill(double(ieta), double(iphi), 1.);
12515  } // if
12516  // for averaged values:
12517  if (mdepth == 4)
12518  h_mapDepth4TSmaxA_HO->Fill(double(ieta), double(iphi), float(ts_with_max_signal));
12520  sumEstimator3[sub - 1][mdepth - 1][ieta + 41][iphi] += float(ts_with_max_signal);
12521  } //if(studyTSmaxShapeHist_
12522  if (studyRMSshapeHist_) {
12523  h_Amplitude_HO->Fill(rmsamplitude, 1.);
12524  if (rmsamplitude < rmsHOMin_ || rmsamplitude > rmsHOMax_) {
12526  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12527  if (mdepth == 4)
12528  h_mapDepth4Amplitude225_HO->Fill(double(ieta), double(iphi), 1.);
12529  } // if
12530  if (mdepth == 4)
12531  h_mapDepth4Amplitude_HO->Fill(double(ieta), double(iphi), rmsamplitude);
12533  sumEstimator4[sub - 1][mdepth - 1][ieta + 41][iphi] += rmsamplitude;
12534  } //if(studyRMSshapeHist_)
12535  if (studyRatioShapeHist_) {
12536  h_Ampl_HO->Fill(ratio, 1.);
12537  if (ratio < ratioHOMin_ || ratio > ratioHOMax_) {
12539  ++badchannels[sub - 1][mdepth - 1][ieta + 41][iphi]; // 0-neta ; 0-71
12540  if (mdepth == 4)
12541  h_mapDepth4Ampl047_HO->Fill(double(ieta), double(iphi), 1.);
12542  } //if(ratio
12543  if (mdepth == 4)
12544  h_mapDepth4Ampl_HO->Fill(double(ieta), double(iphi), ratio);
12546  sumEstimator5[sub - 1][mdepth - 1][ieta + 41][iphi] += ratio;
12547  } //if(studyRatioShapeHist_)
12548  if (studyDiffAmplHist_) {
12549  if (mdepth == 4)
12550  h_mapDepth4AmplE34_HO->Fill(double(ieta), double(iphi), amplitude);
12551  } // if(studyDiffAmplHist_)
12552  if (mdepth == 4) {
12553  h_mapDepth4_HO->Fill(double(ieta), double(iphi), 1.);
12554  if (flagTS012 == 1)
12555  h_mapDepth4TS012_HO->Fill(double(ieta), double(iphi), 1.);
12556  }
12557  } //if ( sub == 3 )
12558 }
12559 int CMTRawAnalyzer::getRBX(int& kdet, int& keta, int& kphi) {
12560  int cal_RBX = 0;
12561  if (kdet == 1 || kdet == 2) {
12562  if (kphi == 71)
12563  cal_RBX = 0;
12564  else
12565  cal_RBX = (kphi + 1) / 4;
12566  cal_RBX = cal_RBX + 18 * (keta + 1) / 2;
12567  }
12568  if (kdet == 4) {
12569  cal_RBX = (int)(kphi / 18) + 1;
12570  }
12571  if (kdet == 3) {
12572  if (keta == -2) {
12573  if (kphi == 71)
12574  cal_RBX = 0;
12575  else
12576  cal_RBX = kphi / 12 + 1;
12577  }
12578  if (keta == -1) {
12579  if (kphi == 71)
12580  cal_RBX = 6;
12581  else
12582  cal_RBX = kphi / 12 + 1 + 6;
12583  }
12584  if (keta == 0) {
12585  if (kphi == 71)
12586  cal_RBX = 12;
12587  else
12588  cal_RBX = kphi / 6 + 1 + 12;
12589  }
12590  if (keta == 1) {
12591  if (kphi == 71)
12592  cal_RBX = 24;
12593  else
12594  cal_RBX = kphi / 12 + 1 + 24;
12595  }
12596  if (keta == 2) {
12597  if (kphi == 71)
12598  cal_RBX = 30;
12599  else
12600  cal_RBX = kphi / 12 + 1 + 30;
12601  }
12602  }
12603  return cal_RBX;
12604 }
12605 void CMTRawAnalyzer::beginRun(const edm::Run& r, const edm::EventSetup& iSetup) {}
12606 void CMTRawAnalyzer::endRun(const edm::Run& r, const edm::EventSetup& iSetup) {
12608  } // if flag...
12610  lscounterM1 = lscounter - 1;
12611  } else {
12612  lscounterM1 = ls0;
12613  }
12614  if (ls0 != -1)
12615  h_nevents_per_eachRealLS->Fill(float(lscounterM1), float(nevcounter)); //
12616  h_nevents_per_LS->Fill(float(nevcounter));
12617  h_nevents_per_LSzoom->Fill(float(nevcounter));
12619  if (nevcounter0 != 0) {
12620  for (int k0 = 0; k0 < nsub; k0++) {
12621  for (int k1 = 0; k1 < ndepth; k1++) {
12622  for (int k2 = 0; k2 < neta; k2++) {
12623  for (int k3 = 0; k3 < nphi; k3++) {
12624  int ieta = k2 - 41;
12625  if (sumEstimator0[k0][k1][k2][k3] != 0.) {
12626  double bbbc = 0.;
12627  if (flagestimatornormalization_ == 0)
12628  bbbc = sumEstimator0[k0][k1][k2][k3] / nevcounter0;
12629  if (flagestimatornormalization_ == 1)
12630  bbbc = sumEstimator0[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12631  double bbb1 = 1.;
12632  if (flagestimatornormalization_ == 2) {
12633  bbbc = sumEstimator0[k0][k1][k2][k3];
12634  bbb1 = sum0Estimator[k0][k1][k2][k3];
12635  }
12636  if (k0 == 0) {
12637  if (k1 + 1 == 1) {
12638  h_sumPedestalLS1->Fill(bbbc / bbb1);
12639  h_2DsumPedestalLS1->Fill(double(ieta), double(k3), bbbc);
12640  h_2D0sumPedestalLS1->Fill(double(ieta), double(k3), bbb1);
12641  h_sumPedestalperLS1->Fill(float(lscounterM1), bbbc);
12642  h_sum0PedestalperLS1->Fill(float(lscounterM1), bbb1);
12643  }
12644  if (k1 + 1 == 2) {
12645  h_sumPedestalLS2->Fill(bbbc / bbb1);
12646  h_2DsumPedestalLS2->Fill(double(ieta), double(k3), bbbc);
12647  h_2D0sumPedestalLS2->Fill(double(ieta), double(k3), bbb1);
12648  h_sumPedestalperLS2->Fill(float(lscounterM1), bbbc);
12649  h_sum0PedestalperLS2->Fill(float(lscounterM1), bbb1);
12650  }
12651  }
12652  // HE:
12653  if (k0 == 1) {
12654  // HEdepth1
12655  if (k1 + 1 == 1) {
12656  h_sumPedestalLS3->Fill(bbbc / bbb1);
12657  h_2DsumPedestalLS3->Fill(double(ieta), double(k3), bbbc);
12658  h_2D0sumPedestalLS3->Fill(double(ieta), double(k3), bbb1);
12659  h_sumPedestalperLS3->Fill(float(lscounterM1), bbbc);
12660  h_sum0PedestalperLS3->Fill(float(lscounterM1), bbb1);
12661  }
12662  if (k1 + 1 == 2) {
12663  h_sumPedestalLS4->Fill(bbbc / bbb1);
12664  h_2DsumPedestalLS4->Fill(double(ieta), double(k3), bbbc);
12665  h_2D0sumPedestalLS4->Fill(double(ieta), double(k3), bbb1);
12666  h_sumPedestalperLS4->Fill(float(lscounterM1), bbbc);
12667  h_sum0PedestalperLS4->Fill(float(lscounterM1), bbb1);
12668  }
12669  if (k1 + 1 == 3) {
12670  h_sumPedestalLS5->Fill(bbbc / bbb1);
12671  h_2DsumPedestalLS5->Fill(double(ieta), double(k3), bbbc);
12672  h_2D0sumPedestalLS5->Fill(double(ieta), double(k3), bbb1);
12673  h_sumPedestalperLS5->Fill(float(lscounterM1), bbbc);
12674  h_sum0PedestalperLS5->Fill(float(lscounterM1), bbb1);
12675  }
12676  }
12677  // HF:
12678  if (k0 == 3) {
12679  // HFdepth1
12680  if (k1 + 1 == 1) {
12681  h_sumPedestalLS6->Fill(bbbc / bbb1);
12682  h_2DsumPedestalLS6->Fill(double(ieta), double(k3), bbbc);
12683  h_2D0sumPedestalLS6->Fill(double(ieta), double(k3), bbb1);
12684  h_sumPedestalperLS6->Fill(float(lscounterM1), bbbc);
12685  h_sum0PedestalperLS6->Fill(float(lscounterM1), bbb1);
12686  }
12687  if (k1 + 1 == 2) {
12688  h_sumPedestalLS7->Fill(bbbc / bbb1);
12689  h_2DsumPedestalLS7->Fill(double(ieta), double(k3), bbbc);
12690  h_2D0sumPedestalLS7->Fill(double(ieta), double(k3), bbb1);
12691  h_sumPedestalperLS7->Fill(float(lscounterM1), bbbc);
12692  h_sum0PedestalperLS7->Fill(float(lscounterM1), bbb1);
12693  }
12694  }
12695  // HO:
12696  if (k0 == 2) {
12697  // HOdepth1
12698  if (k1 + 1 == 4) {
12699  h_sumPedestalLS8->Fill(bbbc / bbb1);
12700  h_2DsumPedestalLS8->Fill(double(ieta), double(k3), bbbc);
12701  h_2D0sumPedestalLS8->Fill(double(ieta), double(k3), bbb1);
12702  h_sumPedestalperLS8->Fill(float(lscounterM1), bbbc);
12703  h_sum0PedestalperLS8->Fill(float(lscounterM1), bbb1);
12704  }
12705  }
12706  } //if(sumEstimator0[k0][k1][k2][k3] != 0.
12707  if (sumEstimator1[k0][k1][k2][k3] != 0.) {
12708  double bbbc = 0.;
12709  if (flagestimatornormalization_ == 0)
12710  bbbc = sumEstimator1[k0][k1][k2][k3] / nevcounter0;
12711  if (flagestimatornormalization_ == 1)
12712  bbbc = sumEstimator1[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12713  double bbb1 = 1.;
12714  if (flagestimatornormalization_ == 2) {
12715  bbbc = sumEstimator1[k0][k1][k2][k3];
12716  bbb1 = sum0Estimator[k0][k1][k2][k3];
12717  }
12718  if (lscounterM1 >= lsmin_ && lscounterM1 < lsmax_) {
12719  int kkkk2 = (k2 - 1) / 4;
12720  if (k2 == 0)
12721  kkkk2 = 1.;
12722  else
12723  kkkk2 += 2; //kkkk2= 1-22
12724  int kkkk3 = (k3) / 4 + 1; //kkkk3= 1-18
12725  int ietaphi = 0;
12726  ietaphi = ((kkkk2)-1) * znphi + (kkkk3);
12727  double bbb3 = 0.;
12728  if (bbb1 != 0.)
12729  bbb3 = bbbc / bbb1;
12730  if (k0 == 0) {
12731  h_2DsumADCAmplEtaPhiLs0->Fill(float(lscounterM1), float(ietaphi), bbbc); //HB
12732  h_2DsumADCAmplEtaPhiLs00->Fill(float(lscounterM1), float(ietaphi), bbb1); //HB
12733  }
12734  if (k0 == 1) {
12735  h_2DsumADCAmplEtaPhiLs1->Fill(float(lscounterM1), float(ietaphi), bbbc); //HE
12736  h_2DsumADCAmplEtaPhiLs10->Fill(float(lscounterM1), float(ietaphi), bbb1); //HE
12737  }
12738  if (k0 == 2) {
12739  h_2DsumADCAmplEtaPhiLs2->Fill(float(lscounterM1), float(ietaphi), bbbc); //HO
12740  h_2DsumADCAmplEtaPhiLs20->Fill(float(lscounterM1), float(ietaphi), bbb1); //HO
12741  }
12742  if (k0 == 3) {
12743  h_2DsumADCAmplEtaPhiLs3->Fill(float(lscounterM1), float(ietaphi), bbbc); //HF
12744  h_2DsumADCAmplEtaPhiLs30->Fill(float(lscounterM1), float(ietaphi), bbb1); //HF
12745  }
12746 
12747  h_sumADCAmplEtaPhiLs->Fill(bbb3);
12748  h_sumADCAmplEtaPhiLs_bbbc->Fill(bbbc);
12749  h_sumADCAmplEtaPhiLs_bbb1->Fill(bbb1);
12751  h_sumADCAmplEtaPhiLs_orbitNum->Fill(float(orbitNum), 1.);
12753  h_sumADCAmplEtaPhiLs_ietaphi->Fill(float(ietaphi));
12754  } // lscounterM1 >= lsmin_ && lscounterM1 < lsmax_
12755  if (k0 == 0) {
12756  if (k1 + 1 == 1) {
12757  h_sumADCAmplLS1copy1->Fill(bbbc / bbb1);
12758  h_sumADCAmplLS1copy2->Fill(bbbc / bbb1);
12759  h_sumADCAmplLS1copy3->Fill(bbbc / bbb1);
12760  h_sumADCAmplLS1copy4->Fill(bbbc / bbb1);
12761  h_sumADCAmplLS1copy5->Fill(bbbc / bbb1);
12762  h_sumADCAmplLS1->Fill(bbbc / bbb1);
12763  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
12764  h_2DsumADCAmplLS1->Fill(double(ieta), double(k3), bbbc);
12765  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth1_)
12766  h_2DsumADCAmplLS1_LSselected->Fill(double(ieta), double(k3), bbbc);
12767  h_2D0sumADCAmplLS1->Fill(double(ieta), double(k3), bbb1);
12768  h_sumADCAmplperLS1->Fill(float(lscounterM1), bbbc);
12769  if (bbbc / bbb1 > lsdep_estimator1_HBdepth1_)
12770  h_sumCutADCAmplperLS1->Fill(float(lscounterM1), bbbc);
12771  h_sum0ADCAmplperLS1->Fill(float(lscounterM1), bbb1);
12772  }
12773  if (k1 + 1 == 2) {
12774  h_sumADCAmplLS2->Fill(bbbc / bbb1);
12775  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
12776  h_2DsumADCAmplLS2->Fill(double(ieta), double(k3), bbbc);
12777  if (bbbc / bbb1 > 2. * lsdep_estimator1_HBdepth2_)
12778  h_2DsumADCAmplLS2_LSselected->Fill(double(ieta), double(k3), bbbc);
12779  h_2D0sumADCAmplLS2->Fill(double(ieta), double(k3), bbb1);
12780  h_sumADCAmplperLS2->Fill(float(lscounterM1), bbbc);
12781  if (bbbc / bbb1 > lsdep_estimator1_HBdepth2_)
12782  h_sumCutADCAmplperLS2->Fill(float(lscounterM1), bbbc);
12783  h_sum0ADCAmplperLS2->Fill(float(lscounterM1), bbb1);
12784  }
12785  if (k1 + 1 == 3) {
12786  h_sumADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
12787  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
12788  h_sumCutADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbbc);
12789  h_sum0ADCAmplperLSdepth3HBu->Fill(float(lscounterM1), bbb1);
12790 
12791  if (bbbc / bbb1 > lsdep_estimator1_HBdepth3_)
12792  h_2DsumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbbc);
12793  h_2D0sumADCAmplLSdepth3HBu->Fill(double(ieta), double(k3), bbb1);
12794  } //if(k1+1 ==3)
12795  if (k1 + 1 == 4) {
12796  h_sumADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
12797  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
12798  h_sumCutADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbbc);
12799  h_sum0ADCAmplperLSdepth4HBu->Fill(float(lscounterM1), bbb1);
12800 
12801  if (bbbc / bbb1 > lsdep_estimator1_HBdepth4_)
12802  h_2DsumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbbc);
12803  h_2D0sumADCAmplLSdepth4HBu->Fill(double(ieta), double(k3), bbb1);
12804  } //if(k1+1 ==4)
12805  }
12806  if (k0 == 1) {
12807  if (k1 + 1 == 1) {
12808  h_sumADCAmplLS3->Fill(bbbc / bbb1);
12809  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
12810  h_2DsumADCAmplLS3->Fill(double(ieta), double(k3), bbbc);
12811  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth1_)
12812  h_2DsumADCAmplLS3_LSselected->Fill(double(ieta), double(k3), bbbc);
12813  h_2D0sumADCAmplLS3->Fill(double(ieta), double(k3), bbb1);
12814  h_sumADCAmplperLS3->Fill(float(lscounterM1), bbbc);
12815  if (bbbc / bbb1 > lsdep_estimator1_HEdepth1_)
12816  h_sumCutADCAmplperLS3->Fill(float(lscounterM1), bbbc);
12817  h_sum0ADCAmplperLS3->Fill(float(lscounterM1), bbb1);
12818  }
12819  if (k1 + 1 == 2) {
12820  h_sumADCAmplLS4->Fill(bbbc / bbb1);
12821  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
12822  h_2DsumADCAmplLS4->Fill(double(ieta), double(k3), bbbc);
12823  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth2_)
12824  h_2DsumADCAmplLS4_LSselected->Fill(double(ieta), double(k3), bbbc);
12825  h_2D0sumADCAmplLS4->Fill(double(ieta), double(k3), bbb1);
12826  h_sumADCAmplperLS4->Fill(float(lscounterM1), bbbc);
12827  if (bbbc / bbb1 > lsdep_estimator1_HEdepth2_)
12828  h_sumCutADCAmplperLS4->Fill(float(lscounterM1), bbbc);
12829  h_sum0ADCAmplperLS4->Fill(float(lscounterM1), bbb1);
12830  }
12831  if (k1 + 1 == 3) {
12832  h_sumADCAmplLS5->Fill(bbbc / bbb1);
12833  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
12834  h_2DsumADCAmplLS5->Fill(double(ieta), double(k3), bbbc);
12835  if (bbbc / bbb1 > 2. * lsdep_estimator1_HEdepth3_)
12836  h_2DsumADCAmplLS5_LSselected->Fill(double(ieta), double(k3), bbbc);
12837  h_2D0sumADCAmplLS5->Fill(double(ieta), double(k3), bbb1);
12838  h_sumADCAmplperLS5->Fill(float(lscounterM1), bbbc);
12839  if (bbbc / bbb1 > lsdep_estimator1_HEdepth3_)
12840  h_sumCutADCAmplperLS5->Fill(float(lscounterM1), bbbc);
12841  h_sum0ADCAmplperLS5->Fill(float(lscounterM1), bbb1);
12842  }
12843  if (k1 + 1 == 4) {
12844  h_sumADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
12845  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
12846  h_sumCutADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbbc);
12847  h_sum0ADCAmplperLSdepth4HEu->Fill(float(lscounterM1), bbb1);
12848  if (bbbc / bbb1 > lsdep_estimator1_HEdepth4_)
12849  h_2DsumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbbc);
12850  h_2D0sumADCAmplLSdepth4HEu->Fill(double(ieta), double(k3), bbb1);
12851  } //if(k1+1 ==4)
12852  if (k1 + 1 == 5) {
12853  h_sumADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
12854  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
12855  h_sumCutADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbbc);
12856  h_sum0ADCAmplperLSdepth5HEu->Fill(float(lscounterM1), bbb1);
12857  if (bbbc / bbb1 > lsdep_estimator1_HEdepth5_)
12858  h_2DsumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbbc);
12859  h_2D0sumADCAmplLSdepth5HEu->Fill(double(ieta), double(k3), bbb1);
12860  } //if(k1+1 ==5)
12861 
12862  if (k1 + 1 == 6) {
12863  h_sumADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
12864  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
12865  h_sumCutADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbbc);
12866  h_sum0ADCAmplperLSdepth6HEu->Fill(float(lscounterM1), bbb1);
12867  if (bbbc / bbb1 > lsdep_estimator1_HEdepth6_)
12868  h_2DsumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbbc);
12869  h_2D0sumADCAmplLSdepth6HEu->Fill(double(ieta), double(k3), bbb1);
12870  } //if(k1+1 ==6)
12871  if (k1 + 1 == 7) {
12872  h_sumADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
12873  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
12874  h_sumCutADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbbc);
12875  h_sum0ADCAmplperLSdepth7HEu->Fill(float(lscounterM1), bbb1);
12876  if (bbbc / bbb1 > lsdep_estimator1_HEdepth7_)
12877  h_2DsumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbbc);
12878  h_2D0sumADCAmplLSdepth7HEu->Fill(double(ieta), double(k3), bbb1);
12879  } //if(k1+1 ==7)
12880 
12881  } // end HE
12882 
12883  if (k0 == 3) {
12884  if (k1 + 1 == 1) {
12885  h_sumADCAmplLS6->Fill(bbbc / bbb1);
12886  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
12887  h_2DsumADCAmplLS6->Fill(double(ieta), double(k3), bbbc);
12888  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth1_)
12889  h_2DsumADCAmplLS6_LSselected->Fill(double(ieta), double(k3), bbbc);
12890  h_2D0sumADCAmplLS6->Fill(double(ieta), double(k3), bbb1);
12891  h_sumADCAmplperLS6->Fill(float(lscounterM1), bbbc);
12892  if (bbbc / bbb1 > lsdep_estimator1_HFdepth1_)
12893  h_sumCutADCAmplperLS6->Fill(float(lscounterM1), bbbc);
12894  h_sum0ADCAmplperLS6->Fill(float(lscounterM1), bbb1);
12895  }
12896  if (k1 + 1 == 2) {
12897  h_sumADCAmplLS7->Fill(bbbc / bbb1);
12898  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
12899  h_2DsumADCAmplLS7->Fill(double(ieta), double(k3), bbbc);
12900  if (bbbc / bbb1 > 2. * lsdep_estimator1_HFdepth2_)
12901  h_2DsumADCAmplLS7_LSselected->Fill(double(ieta), double(k3), bbbc);
12902  h_2D0sumADCAmplLS7->Fill(double(ieta), double(k3), bbb1);
12903  h_sumADCAmplperLS7->Fill(float(lscounterM1), bbbc);
12904  if (bbbc / bbb1 > lsdep_estimator1_HFdepth2_)
12905  h_sumCutADCAmplperLS7->Fill(float(lscounterM1), bbbc);
12906  h_sum0ADCAmplperLS7->Fill(float(lscounterM1), bbb1);
12907  }
12908 
12909  if (k1 + 1 == 3) {
12910  h_sumADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
12911  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
12912  h_sumCutADCAmplperLS6u->Fill(float(lscounterM1), bbbc);
12913  h_sum0ADCAmplperLS6u->Fill(float(lscounterM1), bbb1);
12914  if (bbbc / bbb1 > lsdep_estimator1_HFdepth3_)
12915  h_2DsumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbbc);
12916  h_2D0sumADCAmplLSdepth3HFu->Fill(double(ieta), double(k3), bbb1);
12917  } //if(k1+1 ==3)
12918  if (k1 + 1 == 4) {
12919  h_sumADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
12920  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
12921  h_sumCutADCAmplperLS7u->Fill(float(lscounterM1), bbbc);
12922  h_sum0ADCAmplperLS7u->Fill(float(lscounterM1), bbb1);
12923  if (bbbc / bbb1 > lsdep_estimator1_HFdepth4_)
12924  h_2DsumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbbc);
12925  h_2D0sumADCAmplLSdepth4HFu->Fill(double(ieta), double(k3), bbb1);
12926  } //if(k1+1 ==4)
12927  }
12928  // HO:
12929  if (k0 == 2) {
12930  // HOdepth1
12931  if (k1 + 1 == 4) {
12932  h_sumADCAmplLS8->Fill(bbbc / bbb1);
12933  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
12934  h_2DsumADCAmplLS8->Fill(double(ieta), double(k3), bbbc);
12935  if (bbbc / bbb1 > 2. * lsdep_estimator1_HOdepth4_)
12936  h_2DsumADCAmplLS8_LSselected->Fill(double(ieta), double(k3), bbbc);
12937  h_2D0sumADCAmplLS8->Fill(double(ieta), double(k3), bbb1);
12938  h_sumADCAmplperLS8->Fill(float(lscounterM1), bbbc);
12939  if (bbbc / bbb1 > lsdep_estimator1_HOdepth4_)
12940  h_sumCutADCAmplperLS8->Fill(float(lscounterM1), bbbc);
12941  h_sum0ADCAmplperLS8->Fill(float(lscounterM1), bbb1);
12942  }
12943  }
12944  } //if(sumEstimator1[k0][k1][k2][k3] != 0.
12945  if (sumEstimator2[k0][k1][k2][k3] != 0.) {
12946  double bbbc = 0.;
12947  if (flagestimatornormalization_ == 0)
12948  bbbc = sumEstimator2[k0][k1][k2][k3] / nevcounter0;
12949  if (flagestimatornormalization_ == 1)
12950  bbbc = sumEstimator2[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
12951  double bbb1 = 1.;
12952  if (flagestimatornormalization_ == 2) {
12953  bbbc = sumEstimator2[k0][k1][k2][k3];
12954  bbb1 = sum0Estimator[k0][k1][k2][k3];
12955  }
12956 
12957  // HB:
12958  if (k0 == 0) {
12959  // HBdepth1
12960  if (k1 + 1 == 1) {
12961  h_sumTSmeanALS1->Fill(bbbc / bbb1);
12962  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
12963  h_2DsumTSmeanALS1->Fill(double(ieta), double(k3), bbbc);
12964  h_2D0sumTSmeanALS1->Fill(double(ieta), double(k3), bbb1);
12965  h_sumTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
12966  if (bbbc / bbb1 > lsdep_estimator2_HBdepth1_)
12967  h_sumCutTSmeanAperLS1->Fill(float(lscounterM1), bbbc);
12968  h_sum0TSmeanAperLS1->Fill(float(lscounterM1), bbb1);
12969  if (bbbc / bbb1 > 2. * lsdep_estimator2_HBdepth1_)
12970  h_sumTSmeanAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
12971  }
12972  if (k1 + 1 == 2) {
12973  h_sumTSmeanALS2->Fill(bbbc / bbb1);
12974  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
12975  h_2DsumTSmeanALS2->Fill(double(ieta), double(k3), bbbc);
12976  h_2D0sumTSmeanALS2->Fill(double(ieta), double(k3), bbb1);
12977  h_sumTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
12978  if (bbbc / bbb1 > lsdep_estimator2_HBdepth2_)
12979  h_sumCutTSmeanAperLS2->Fill(float(lscounterM1), bbbc);
12980  h_sum0TSmeanAperLS2->Fill(float(lscounterM1), bbb1);
12981  }
12982  }
12983  if (k0 == 1) {
12984  if (k1 + 1 == 1) {
12985  h_sumTSmeanALS3->Fill(bbbc / bbb1);
12986  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
12987  h_2DsumTSmeanALS3->Fill(double(ieta), double(k3), bbbc);
12988  h_2D0sumTSmeanALS3->Fill(double(ieta), double(k3), bbb1);
12989  h_sumTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
12990  if (bbbc / bbb1 > lsdep_estimator2_HEdepth1_)
12991  h_sumCutTSmeanAperLS3->Fill(float(lscounterM1), bbbc);
12992  h_sum0TSmeanAperLS3->Fill(float(lscounterM1), bbb1);
12993  }
12994  if (k1 + 1 == 2) {
12995  h_sumTSmeanALS4->Fill(bbbc / bbb1);
12996  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
12997  h_2DsumTSmeanALS4->Fill(double(ieta), double(k3), bbbc);
12998  h_2D0sumTSmeanALS4->Fill(double(ieta), double(k3), bbb1);
12999  h_sumTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
13000  if (bbbc / bbb1 > lsdep_estimator2_HEdepth2_)
13001  h_sumCutTSmeanAperLS4->Fill(float(lscounterM1), bbbc);
13002  h_sum0TSmeanAperLS4->Fill(float(lscounterM1), bbb1);
13003  }
13004  if (k1 + 1 == 3) {
13005  h_sumTSmeanALS5->Fill(bbbc / bbb1);
13006  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
13007  h_2DsumTSmeanALS5->Fill(double(ieta), double(k3), bbbc);
13008  h_2D0sumTSmeanALS5->Fill(double(ieta), double(k3), bbb1);
13009  h_sumTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
13010  if (bbbc / bbb1 > lsdep_estimator2_HEdepth3_)
13011  h_sumCutTSmeanAperLS5->Fill(float(lscounterM1), bbbc);
13012  h_sum0TSmeanAperLS5->Fill(float(lscounterM1), bbb1);
13013  }
13014  }
13015  // HF:
13016  if (k0 == 3) {
13017  // HFdepth1
13018  if (k1 + 1 == 1) {
13019  h_sumTSmeanALS6->Fill(bbbc / bbb1);
13020  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
13021  h_2DsumTSmeanALS6->Fill(double(ieta), double(k3), bbbc);
13022  h_2D0sumTSmeanALS6->Fill(double(ieta), double(k3), bbb1);
13023  h_sumTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
13024  if (bbbc / bbb1 > lsdep_estimator2_HFdepth1_)
13025  h_sumCutTSmeanAperLS6->Fill(float(lscounterM1), bbbc);
13026  h_sum0TSmeanAperLS6->Fill(float(lscounterM1), bbb1);
13027  }
13028  if (k1 + 1 == 2) {
13029  h_sumTSmeanALS7->Fill(bbbc / bbb1);
13030  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
13031  h_2DsumTSmeanALS7->Fill(double(ieta), double(k3), bbbc);
13032  h_2D0sumTSmeanALS7->Fill(double(ieta), double(k3), bbb1);
13033  h_sumTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
13034  if (bbbc / bbb1 > lsdep_estimator2_HFdepth2_)
13035  h_sumCutTSmeanAperLS7->Fill(float(lscounterM1), bbbc);
13036  h_sum0TSmeanAperLS7->Fill(float(lscounterM1), bbb1);
13037  }
13038  }
13039  // HO:
13040  if (k0 == 2) {
13041  // HOdepth1
13042  if (k1 + 1 == 4) {
13043  h_sumTSmeanALS8->Fill(bbbc / bbb1);
13044  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
13045  h_2DsumTSmeanALS8->Fill(double(ieta), double(k3), bbbc);
13046  h_2D0sumTSmeanALS8->Fill(double(ieta), double(k3), bbb1);
13047  h_sumTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
13048  if (bbbc / bbb1 > lsdep_estimator2_HOdepth4_)
13049  h_sumCutTSmeanAperLS8->Fill(float(lscounterM1), bbbc);
13050  h_sum0TSmeanAperLS8->Fill(float(lscounterM1), bbb1);
13051  }
13052  }
13053  } //if(sumEstimator2[k0][k1][k2][k3] != 0.
13054 
13055  // ------------------------------------------------------------------------------------------------------------------------sumEstimator3 Tx
13056  if (sumEstimator3[k0][k1][k2][k3] != 0.) {
13057  // fill histoes:
13058  double bbbc = 0.;
13059  if (flagestimatornormalization_ == 0)
13060  bbbc = sumEstimator3[k0][k1][k2][k3] / nevcounter0;
13061  if (flagestimatornormalization_ == 1)
13062  bbbc = sumEstimator3[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
13063  double bbb1 = 1.;
13064  if (flagestimatornormalization_ == 2) {
13065  bbbc = sumEstimator3[k0][k1][k2][k3];
13066  bbb1 = sum0Estimator[k0][k1][k2][k3];
13067  }
13068 
13069  // HB:
13070  if (k0 == 0) {
13071  // HBdepth1
13072  if (k1 + 1 == 1) {
13073  h_sumTSmaxALS1->Fill(bbbc / bbb1);
13074  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
13075  h_2DsumTSmaxALS1->Fill(double(ieta), double(k3), bbbc);
13076  h_2D0sumTSmaxALS1->Fill(double(ieta), double(k3), bbb1);
13077  h_sumTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
13078  if (bbbc / bbb1 > lsdep_estimator3_HBdepth1_)
13079  h_sumCutTSmaxAperLS1->Fill(float(lscounterM1), bbbc);
13080  h_sum0TSmaxAperLS1->Fill(float(lscounterM1), bbb1);
13081  if (bbbc / bbb1 > 2. * lsdep_estimator3_HBdepth1_)
13082  h_sumTSmaxAperLS1_LSselected->Fill(float(lscounterM1), bbbc);
13083  }
13084  if (k1 + 1 == 2) {
13085  h_sumTSmaxALS2->Fill(bbbc / bbb1);
13086  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
13087  h_2DsumTSmaxALS2->Fill(double(ieta), double(k3), bbbc);
13088  h_2D0sumTSmaxALS2->Fill(double(ieta), double(k3), bbb1);
13089  h_sumTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
13090  if (bbbc / bbb1 > lsdep_estimator3_HBdepth2_)
13091  h_sumCutTSmaxAperLS2->Fill(float(lscounterM1), bbbc);
13092  h_sum0TSmaxAperLS2->Fill(float(lscounterM1), bbb1);
13093  }
13094  }
13095  // HE:
13096  if (k0 == 1) {
13097  // HEdepth1
13098  if (k1 + 1 == 1) {
13099  h_sumTSmaxALS3->Fill(bbbc / bbb1);
13100  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
13101  h_2DsumTSmaxALS3->Fill(double(ieta), double(k3), bbbc);
13102  h_2D0sumTSmaxALS3->Fill(double(ieta), double(k3), bbb1);
13103  h_sumTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
13104  if (bbbc / bbb1 > lsdep_estimator3_HEdepth1_)
13105  h_sumCutTSmaxAperLS3->Fill(float(lscounterM1), bbbc);
13106  h_sum0TSmaxAperLS3->Fill(float(lscounterM1), bbb1);
13107  }
13108  if (k1 + 1 == 2) {
13109  h_sumTSmaxALS4->Fill(bbbc / bbb1);
13110  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
13111  h_2DsumTSmaxALS4->Fill(double(ieta), double(k3), bbbc);
13112  h_2D0sumTSmaxALS4->Fill(double(ieta), double(k3), bbb1);
13113  h_sumTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
13114  if (bbbc / bbb1 > lsdep_estimator3_HEdepth2_)
13115  h_sumCutTSmaxAperLS4->Fill(float(lscounterM1), bbbc);
13116  h_sum0TSmaxAperLS4->Fill(float(lscounterM1), bbb1);
13117  }
13118  if (k1 + 1 == 3) {
13119  h_sumTSmaxALS5->Fill(bbbc / bbb1);
13120  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
13121  h_2DsumTSmaxALS5->Fill(double(ieta), double(k3), bbbc);
13122  h_2D0sumTSmaxALS5->Fill(double(ieta), double(k3), bbb1);
13123  h_sumTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
13124  if (bbbc / bbb1 > lsdep_estimator3_HEdepth3_)
13125  h_sumCutTSmaxAperLS5->Fill(float(lscounterM1), bbbc);
13126  h_sum0TSmaxAperLS5->Fill(float(lscounterM1), bbb1);
13127  }
13128  }
13129  // HF:
13130  if (k0 == 3) {
13131  // HFdepth1
13132  if (k1 + 1 == 1) {
13133  h_sumTSmaxALS6->Fill(bbbc / bbb1);
13134  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
13135  h_2DsumTSmaxALS6->Fill(double(ieta), double(k3), bbbc);
13136  h_2D0sumTSmaxALS6->Fill(double(ieta), double(k3), bbb1);
13137  h_sumTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
13138  if (bbbc / bbb1 > lsdep_estimator3_HFdepth1_)
13139  h_sumCutTSmaxAperLS6->Fill(float(lscounterM1), bbbc);
13140  h_sum0TSmaxAperLS6->Fill(float(lscounterM1), bbb1);
13141  }
13142  if (k1 + 1 == 2) {
13143  h_sumTSmaxALS7->Fill(bbbc / bbb1);
13144  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
13145  h_2DsumTSmaxALS7->Fill(double(ieta), double(k3), bbbc);
13146  h_2D0sumTSmaxALS7->Fill(double(ieta), double(k3), bbb1);
13147  h_sumTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
13148  if (bbbc / bbb1 > lsdep_estimator3_HFdepth2_)
13149  h_sumCutTSmaxAperLS7->Fill(float(lscounterM1), bbbc);
13150  h_sum0TSmaxAperLS7->Fill(float(lscounterM1), bbb1);
13151  }
13152  }
13153  // HO:
13154  if (k0 == 2) {
13155  // HOdepth1
13156  if (k1 + 1 == 4) {
13157  h_sumTSmaxALS8->Fill(bbbc / bbb1);
13158  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
13159  h_2DsumTSmaxALS8->Fill(double(ieta), double(k3), bbbc);
13160  h_2D0sumTSmaxALS8->Fill(double(ieta), double(k3), bbb1);
13161  h_sumTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
13162  if (bbbc / bbb1 > lsdep_estimator3_HOdepth4_)
13163  h_sumCutTSmaxAperLS8->Fill(float(lscounterM1), bbbc);
13164  h_sum0TSmaxAperLS8->Fill(float(lscounterM1), bbb1);
13165  }
13166  }
13167  } //if(sumEstimator3[k0][k1][k2][k3] != 0.
13168 
13169  // ------------------------------------------------------------------------------------------------------------------------sumEstimator4 W
13170  if (sumEstimator4[k0][k1][k2][k3] != 0.) {
13171  // fill histoes:
13172  double bbbc = 0.;
13173  if (flagestimatornormalization_ == 0)
13174  bbbc = sumEstimator4[k0][k1][k2][k3] / nevcounter0;
13175  if (flagestimatornormalization_ == 1)
13176  bbbc = sumEstimator4[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
13177  double bbb1 = 1.;
13178  if (flagestimatornormalization_ == 2) {
13179  bbbc = sumEstimator4[k0][k1][k2][k3];
13180  bbb1 = sum0Estimator[k0][k1][k2][k3];
13181  }
13182 
13183  // HB:
13184  if (k0 == 0) {
13185  // HBdepth1
13186  if (k1 + 1 == 1) {
13187  h_sumAmplitudeLS1->Fill(bbbc / bbb1);
13188  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
13189  h_2DsumAmplitudeLS1->Fill(double(ieta), double(k3), bbbc);
13190  h_2D0sumAmplitudeLS1->Fill(double(ieta), double(k3), bbb1);
13191  h_sumAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
13192  if (bbbc / bbb1 > lsdep_estimator4_HBdepth1_)
13193  h_sumCutAmplitudeperLS1->Fill(float(lscounterM1), bbbc);
13194  h_sum0AmplitudeperLS1->Fill(float(lscounterM1), bbb1);
13195  if (bbbc / bbb1 > 2. * lsdep_estimator4_HBdepth1_)
13196  h_sumAmplitudeperLS1_LSselected->Fill(float(lscounterM1), bbbc);
13197  }
13198  if (k1 + 1 == 2) {
13199  h_sumAmplitudeLS2->Fill(bbbc / bbb1);
13200  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
13201  h_2DsumAmplitudeLS2->Fill(double(ieta), double(k3), bbbc);
13202  h_2D0sumAmplitudeLS2->Fill(double(ieta), double(k3), bbb1);
13203  h_sumAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
13204  if (bbbc / bbb1 > lsdep_estimator4_HBdepth2_)
13205  h_sumCutAmplitudeperLS2->Fill(float(lscounterM1), bbbc);
13206  h_sum0AmplitudeperLS2->Fill(float(lscounterM1), bbb1);
13207  }
13208  }
13209  // HE:
13210  if (k0 == 1) {
13211  // HEdepth1
13212  if (k1 + 1 == 1) {
13213  h_sumAmplitudeLS3->Fill(bbbc / bbb1);
13214  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
13215  h_2DsumAmplitudeLS3->Fill(double(ieta), double(k3), bbbc);
13216  h_2D0sumAmplitudeLS3->Fill(double(ieta), double(k3), bbb1);
13217  h_sumAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
13218  if (bbbc / bbb1 > lsdep_estimator4_HEdepth1_)
13219  h_sumCutAmplitudeperLS3->Fill(float(lscounterM1), bbbc);
13220  h_sum0AmplitudeperLS3->Fill(float(lscounterM1), bbb1);
13221  }
13222  if (k1 + 1 == 2) {
13223  h_sumAmplitudeLS4->Fill(bbbc / bbb1);
13224  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
13225  h_2DsumAmplitudeLS4->Fill(double(ieta), double(k3), bbbc);
13226  h_2D0sumAmplitudeLS4->Fill(double(ieta), double(k3), bbb1);
13227  h_sumAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
13228  if (bbbc / bbb1 > lsdep_estimator4_HEdepth2_)
13229  h_sumCutAmplitudeperLS4->Fill(float(lscounterM1), bbbc);
13230  h_sum0AmplitudeperLS4->Fill(float(lscounterM1), bbb1);
13231  }
13232  if (k1 + 1 == 3) {
13233  h_sumAmplitudeLS5->Fill(bbbc / bbb1);
13234  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
13235  h_2DsumAmplitudeLS5->Fill(double(ieta), double(k3), bbbc);
13236  h_2D0sumAmplitudeLS5->Fill(double(ieta), double(k3), bbb1);
13237  h_sumAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
13238  if (bbbc / bbb1 > lsdep_estimator4_HEdepth3_)
13239  h_sumCutAmplitudeperLS5->Fill(float(lscounterM1), bbbc);
13240  h_sum0AmplitudeperLS5->Fill(float(lscounterM1), bbb1);
13241  }
13242  }
13243  // HF:
13244  if (k0 == 3) {
13245  // HFdepth1
13246  if (k1 + 1 == 1) {
13247  h_sumAmplitudeLS6->Fill(bbbc / bbb1);
13248  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
13249  h_2DsumAmplitudeLS6->Fill(double(ieta), double(k3), bbbc);
13250  h_2D0sumAmplitudeLS6->Fill(double(ieta), double(k3), bbb1);
13251  h_sumAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
13252  if (bbbc / bbb1 > lsdep_estimator4_HFdepth1_)
13253  h_sumCutAmplitudeperLS6->Fill(float(lscounterM1), bbbc);
13254  h_sum0AmplitudeperLS6->Fill(float(lscounterM1), bbb1);
13255  }
13256  if (k1 + 1 == 2) {
13257  h_sumAmplitudeLS7->Fill(bbbc / bbb1);
13258  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
13259  h_2DsumAmplitudeLS7->Fill(double(ieta), double(k3), bbbc);
13260  h_2D0sumAmplitudeLS7->Fill(double(ieta), double(k3), bbb1);
13261  h_sumAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
13262  if (bbbc / bbb1 > lsdep_estimator4_HFdepth2_)
13263  h_sumCutAmplitudeperLS7->Fill(float(lscounterM1), bbbc);
13264  h_sum0AmplitudeperLS7->Fill(float(lscounterM1), bbb1);
13265  }
13266  }
13267  // HO:
13268  if (k0 == 2) {
13269  // HOdepth1
13270  if (k1 + 1 == 4) {
13271  h_sumAmplitudeLS8->Fill(bbbc / bbb1);
13272  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
13273  h_2DsumAmplitudeLS8->Fill(double(ieta), double(k3), bbbc);
13274  h_2D0sumAmplitudeLS8->Fill(double(ieta), double(k3), bbb1);
13275  h_sumAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
13276  if (bbbc / bbb1 > lsdep_estimator4_HOdepth4_)
13277  h_sumCutAmplitudeperLS8->Fill(float(lscounterM1), bbbc);
13278  h_sum0AmplitudeperLS8->Fill(float(lscounterM1), bbb1);
13279  }
13280  }
13281  } //if(sumEstimator4[k0][k1][k2][k3] != 0.
13282 
13283  // ------------------------------------------------------------------------------------------------------------------------sumEstimator5 R
13284  if (sumEstimator5[k0][k1][k2][k3] != 0.) {
13285  // fill histoes:
13286  double bbbc = 0.;
13287  if (flagestimatornormalization_ == 0)
13288  bbbc = sumEstimator5[k0][k1][k2][k3] / nevcounter0;
13289  if (flagestimatornormalization_ == 1)
13290  bbbc = sumEstimator5[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
13291  double bbb1 = 1.;
13292  if (flagestimatornormalization_ == 2) {
13293  bbbc = sumEstimator5[k0][k1][k2][k3];
13294  bbb1 = sum0Estimator[k0][k1][k2][k3];
13295  }
13296 
13297  // HB:
13298  if (k0 == 0) {
13299  // HBdepth1
13300  if (k1 + 1 == 1) {
13301  h_sumAmplLS1->Fill(bbbc / bbb1);
13302  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
13303  h_2DsumAmplLS1->Fill(double(ieta), double(k3), bbbc);
13304  h_2D0sumAmplLS1->Fill(double(ieta), double(k3), bbb1);
13305  h_sumAmplperLS1->Fill(float(lscounterM1), bbbc);
13306  if (bbbc / bbb1 > lsdep_estimator5_HBdepth1_)
13307  h_sumCutAmplperLS1->Fill(float(lscounterM1), bbbc);
13308  h_sum0AmplperLS1->Fill(float(lscounterM1), bbb1);
13309  if (bbbc / bbb1 > 2. * lsdep_estimator5_HBdepth1_)
13310  h_sumAmplperLS1_LSselected->Fill(float(lscounterM1), bbbc);
13311  }
13312  if (k1 + 1 == 2) {
13313  h_sumAmplLS2->Fill(bbbc / bbb1);
13314  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
13315  h_2DsumAmplLS2->Fill(double(ieta), double(k3), bbbc);
13316  h_2D0sumAmplLS2->Fill(double(ieta), double(k3), bbb1);
13317  h_sumAmplperLS2->Fill(float(lscounterM1), bbbc);
13318  if (bbbc / bbb1 > lsdep_estimator5_HBdepth2_)
13319  h_sumCutAmplperLS2->Fill(float(lscounterM1), bbbc);
13320  h_sum0AmplperLS2->Fill(float(lscounterM1), bbb1);
13321  }
13322  }
13323  // HE:
13324  if (k0 == 1) {
13325  // HEdepth1
13326  if (k1 + 1 == 1) {
13327  h_sumAmplLS3->Fill(bbbc / bbb1);
13328  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
13329  h_2DsumAmplLS3->Fill(double(ieta), double(k3), bbbc);
13330  h_2D0sumAmplLS3->Fill(double(ieta), double(k3), bbb1);
13331  h_sumAmplperLS3->Fill(float(lscounterM1), bbbc);
13332  if (bbbc / bbb1 > lsdep_estimator5_HEdepth1_)
13333  h_sumCutAmplperLS3->Fill(float(lscounterM1), bbbc);
13334  h_sum0AmplperLS3->Fill(float(lscounterM1), bbb1);
13335  }
13336  if (k1 + 1 == 2) {
13337  h_sumAmplLS4->Fill(bbbc / bbb1);
13338  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
13339  h_2DsumAmplLS4->Fill(double(ieta), double(k3), bbbc);
13340  h_2D0sumAmplLS4->Fill(double(ieta), double(k3), bbb1);
13341  h_sumAmplperLS4->Fill(float(lscounterM1), bbbc);
13342  if (bbbc / bbb1 > lsdep_estimator5_HEdepth2_)
13343  h_sumCutAmplperLS4->Fill(float(lscounterM1), bbbc);
13344  h_sum0AmplperLS4->Fill(float(lscounterM1), bbb1);
13345  }
13346  if (k1 + 1 == 3) {
13347  h_sumAmplLS5->Fill(bbbc / bbb1);
13348  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
13349  h_2DsumAmplLS5->Fill(double(ieta), double(k3), bbbc);
13350  h_2D0sumAmplLS5->Fill(double(ieta), double(k3), bbb1);
13351  h_sumAmplperLS5->Fill(float(lscounterM1), bbbc);
13352  if (bbbc / bbb1 > lsdep_estimator5_HEdepth3_)
13353  h_sumCutAmplperLS5->Fill(float(lscounterM1), bbbc);
13354  h_sum0AmplperLS5->Fill(float(lscounterM1), bbb1);
13355  }
13356  }
13357  // HF:
13358  if (k0 == 3) {
13359  // HFdepth1
13360  if (k1 + 1 == 1) {
13361  h_sumAmplLS6->Fill(bbbc / bbb1);
13362  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
13363  h_2DsumAmplLS6->Fill(double(ieta), double(k3), bbbc);
13364  h_2D0sumAmplLS6->Fill(double(ieta), double(k3), bbb1);
13365  h_sumAmplperLS6->Fill(float(lscounterM1), bbbc);
13366  if (bbbc / bbb1 > lsdep_estimator5_HFdepth1_)
13367  h_sumCutAmplperLS6->Fill(float(lscounterM1), bbbc);
13368  h_sum0AmplperLS6->Fill(float(lscounterM1), bbb1);
13369  }
13370  if (k1 + 1 == 2) {
13371  h_sumAmplLS7->Fill(bbbc / bbb1);
13372  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
13373  h_2DsumAmplLS7->Fill(double(ieta), double(k3), bbbc);
13374  h_2D0sumAmplLS7->Fill(double(ieta), double(k3), bbb1);
13375  h_sumAmplperLS7->Fill(float(lscounterM1), bbbc);
13376  if (bbbc / bbb1 > lsdep_estimator5_HFdepth2_)
13377  h_sumCutAmplperLS7->Fill(float(lscounterM1), bbbc);
13378  h_sum0AmplperLS7->Fill(float(lscounterM1), bbb1);
13379  }
13380  }
13381  // HO:
13382  if (k0 == 2) {
13383  // HOdepth1
13384  if (k1 + 1 == 4) {
13385  h_sumAmplLS8->Fill(bbbc / bbb1);
13386  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
13387  h_2DsumAmplLS8->Fill(double(ieta), double(k3), bbbc);
13388  h_2D0sumAmplLS8->Fill(double(ieta), double(k3), bbb1);
13389  h_sumAmplperLS8->Fill(float(lscounterM1), bbbc);
13390  if (bbbc / bbb1 > lsdep_estimator5_HOdepth4_)
13391  h_sumCutAmplperLS8->Fill(float(lscounterM1), bbbc);
13392  h_sum0AmplperLS8->Fill(float(lscounterM1), bbb1);
13393  }
13394  }
13395  } //if(sumEstimator5[k0][k1][k2][k3] != 0.
13396  // ------------------------------------------------------------------------------------------------------------------------sumEstimator6 (Error-B)
13397  if (sumEstimator6[k0][k1][k2][k3] != 0.) {
13398  // fill histoes:
13399  double bbbc = 0.;
13400  if (flagestimatornormalization_ == 0)
13401  bbbc = sumEstimator6[k0][k1][k2][k3] / nevcounter0;
13402  if (flagestimatornormalization_ == 1)
13403  bbbc = sumEstimator6[k0][k1][k2][k3] / sum0Estimator[k0][k1][k2][k3];
13404  double bbb1 = 1.;
13405  if (flagestimatornormalization_ == 2) {
13406  bbbc = sumEstimator6[k0][k1][k2][k3];
13407  bbb1 = sum0Estimator[k0][k1][k2][k3];
13408  }
13409 
13410  // HB:
13411  if (k0 == 0) {
13412  // HBdepth1
13413  if (k1 + 1 == 1) {
13414  h_sumErrorBLS1->Fill(bbbc / bbb1);
13415  h_2DsumErrorBLS1->Fill(double(ieta), double(k3), bbbc);
13416  h_2D0sumErrorBLS1->Fill(double(ieta), double(k3), bbb1);
13417  h_sumErrorBperLS1->Fill(float(lscounterM1), bbbc);
13418  h_sum0ErrorBperLS1->Fill(float(lscounterM1), bbb1);
13419  }
13420  if (k1 + 1 == 2) {
13421  h_sumErrorBLS2->Fill(bbbc / bbb1);
13422  h_2DsumErrorBLS2->Fill(double(ieta), double(k3), bbbc);
13423  h_2D0sumErrorBLS2->Fill(double(ieta), double(k3), bbb1);
13424  h_sumErrorBperLS2->Fill(float(lscounterM1), bbbc);
13425  h_sum0ErrorBperLS2->Fill(float(lscounterM1), bbb1);
13426  }
13427  }
13428  // HE:
13429  if (k0 == 1) {
13430  // HEdepth1
13431  if (k1 + 1 == 1) {
13432  h_sumErrorBLS3->Fill(bbbc / bbb1);
13433  h_2DsumErrorBLS3->Fill(double(ieta), double(k3), bbbc);
13434  h_2D0sumErrorBLS3->Fill(double(ieta), double(k3), bbb1);
13435  h_sumErrorBperLS3->Fill(float(lscounterM1), bbbc);
13436  h_sum0ErrorBperLS3->Fill(float(lscounterM1), bbb1);
13437  }
13438  if (k1 + 1 == 2) {
13439  h_sumErrorBLS4->Fill(bbbc / bbb1);
13440  h_2DsumErrorBLS4->Fill(double(ieta), double(k3), bbbc);
13441  h_2D0sumErrorBLS4->Fill(double(ieta), double(k3), bbb1);
13442  h_sumErrorBperLS4->Fill(float(lscounterM1), bbbc);
13443  h_sum0ErrorBperLS4->Fill(float(lscounterM1), bbb1);
13444  }
13445  if (k1 + 1 == 3) {
13446  h_sumErrorBLS5->Fill(bbbc / bbb1);
13447  h_2DsumErrorBLS5->Fill(double(ieta), double(k3), bbbc);
13448  h_2D0sumErrorBLS5->Fill(double(ieta), double(k3), bbb1);
13449  h_sumErrorBperLS5->Fill(float(lscounterM1), bbbc);
13450  h_sum0ErrorBperLS5->Fill(float(lscounterM1), bbb1);
13451  }
13452  }
13453  // HF:
13454  if (k0 == 3) {
13455  // HFdepth1
13456  if (k1 + 1 == 1) {
13457  h_sumErrorBLS6->Fill(bbbc / bbb1);
13458  h_2DsumErrorBLS6->Fill(double(ieta), double(k3), bbbc);
13459  h_2D0sumErrorBLS6->Fill(double(ieta), double(k3), bbb1);
13460  h_sumErrorBperLS6->Fill(float(lscounterM1), bbbc);
13461  h_sum0ErrorBperLS6->Fill(float(lscounterM1), bbb1);
13462  }
13463  if (k1 + 1 == 2) {
13464  h_sumErrorBLS7->Fill(bbbc / bbb1);
13465  h_2DsumErrorBLS7->Fill(double(ieta), double(k3), bbbc);
13466  h_2D0sumErrorBLS7->Fill(double(ieta), double(k3), bbb1);
13467  h_sumErrorBperLS7->Fill(float(lscounterM1), bbbc);
13468  h_sum0ErrorBperLS7->Fill(float(lscounterM1), bbb1);
13469  }
13470  }
13471  // HO:
13472  if (k0 == 2) {
13473  // HOdepth4
13474  if (k1 + 1 == 4) {
13475  h_sumErrorBLS8->Fill(bbbc / bbb1);
13476  h_2DsumErrorBLS8->Fill(double(ieta), double(k3), bbbc);
13477  h_2D0sumErrorBLS8->Fill(double(ieta), double(k3), bbb1);
13478  h_sumErrorBperLS8->Fill(float(lscounterM1), bbbc);
13479  h_sum0ErrorBperLS8->Fill(float(lscounterM1), bbb1);
13480  }
13481  }
13483  } //if(sumEstimator6[k0][k1][k2][k3] != 0.
13484 
13487  } //for
13488  } //for
13489  } //for
13490  } //for
13491 
13492  //------------------------------------------------------ averSIGNAL
13501 
13506 
13507  //------------------------------------------------------
13516 
13521 
13522  //------------------------------------------------------ averNOSIGNAL
13531 
13536 
13537  //------------------------------------------------------
13546 
13551 
13552  h_maxxSUMAmpl_HB->Fill(float(lscounterM1), maxxSUM1);
13553  h_maxxSUMAmpl_HE->Fill(float(lscounterM1), maxxSUM2);
13554  h_maxxSUMAmpl_HO->Fill(float(lscounterM1), maxxSUM3);
13555  h_maxxSUMAmpl_HF->Fill(float(lscounterM1), maxxSUM4);
13556  maxxSUM1 = 0.;
13557  maxxSUM2 = 0.;
13558  maxxSUM3 = 0.;
13559  maxxSUM4 = 0.;
13560  //------------------------------------------------------
13561  h_maxxOCCUP_HB->Fill(float(lscounterM1), maxxOCCUP1);
13562  h_maxxOCCUP_HE->Fill(float(lscounterM1), maxxOCCUP2);
13563  h_maxxOCCUP_HO->Fill(float(lscounterM1), maxxOCCUP3);
13564  h_maxxOCCUP_HF->Fill(float(lscounterM1), maxxOCCUP4);
13565  maxxOCCUP1 = 0.;
13566  maxxOCCUP2 = 0.;
13567  maxxOCCUP3 = 0.;
13568  maxxOCCUP4 = 0.;
13569 
13570  } //if( nevcounter0 != 0 )
13572 
13573  std::cout << " ==== Edn of run " << std::endl;
13574 }
13576 //
13578 //
13581  HcalLogicalMap lmap = gen.createMap(topo);
13582 
13583  // HcalElectronicsMap emap=lmap.generateHcalElectronicsMap();
13584 
13585  // const HcalElectronicsMap* emap=conditions->getHcalMapping();
13586  const HcalElectronicsMap* emap;
13587  emap = conditions->getHcalMapping();
13588 
13589  std::string subdet = "";
13590 
13591  MAPfile << "#define LogEleMapdb_h" << std::endl;
13592  MAPfile << "#include <algorithm>" << std::endl;
13593  MAPfile << "#include <iostream>" << std::endl;
13594  MAPfile << "#include <vector>" << std::endl;
13595  MAPfile << "#include <string>" << std::endl;
13596  MAPfile << "#include <sstream>" << std::endl;
13597  MAPfile << std::endl;
13598 
13599  MAPfile << "struct Cell {" << std::endl;
13600  MAPfile << " std::string subdet;" << std::endl;
13601  MAPfile << " int Eta;" << std::endl;
13602  MAPfile << " int Phi;" << std::endl;
13603  MAPfile << " int Depth;" << std::endl;
13604  MAPfile << " std::string RBX;" << std::endl;
13605  MAPfile << " int RM;" << std::endl;
13606  MAPfile << " int Pixel;" << std::endl;
13607  MAPfile << " int RMfiber;" << std::endl;
13608  MAPfile << " int FiberCh;" << std::endl;
13609  MAPfile << " int QIE;" << std::endl;
13610  MAPfile << " int ADC;" << std::endl;
13611  MAPfile << " int VMECardID;" << std::endl;
13612  MAPfile << " int dccID;" << std::endl;
13613  MAPfile << " int Spigot;" << std::endl;
13614  MAPfile << " int FiberIndex;" << std::endl;
13615  MAPfile << " int HtrSlot;" << std::endl;
13616  MAPfile << " int HtrTB;" << std::endl;
13617  MAPfile << std::endl;
13618 
13619  MAPfile << "// the function check, if \"par\" == \"val\" for this cell" << std::endl;
13620  MAPfile << " bool check(const std::string par, const int val) const " << std::endl;
13621  MAPfile << " {" << std::endl;
13622  MAPfile << " if (par == \"Eta\") return (val == Eta);" << std::endl;
13623  MAPfile << " else if (par == \"Phi\") return (val == Phi);" << std::endl;
13624  MAPfile << " else if (par == \"Depth\") return (val == Depth);" << std::endl;
13625  MAPfile << " else if (par == \"RM\") return (val == RM);" << std::endl;
13626  MAPfile << " else if (par == \"Pixel\") return (val == Pixel);" << std::endl;
13627  MAPfile << " else if (par == \"RMfiber\") return (val == RMfiber);" << std::endl;
13628  MAPfile << " else if (par == \"FiberCh\") return (val == FiberCh);" << std::endl;
13629  MAPfile << " else if (par == \"QIE\") return (val == QIE);" << std::endl;
13630  MAPfile << " else if (par == \"ADC\") return (val == ADC);" << std::endl;
13631  MAPfile << " else if (par == \"VMECardID\") return (val == VMECardID);" << std::endl;
13632  MAPfile << " else if (par == \"dccID\") return (val == dccID);" << std::endl;
13633  MAPfile << " else if (par == \"Spigot\") return (val == Spigot);" << std::endl;
13634  MAPfile << " else if (par == \"FiberIndex\") return (val == FiberIndex);" << std::endl;
13635  MAPfile << " else if (par == \"HtrSlot\") return (val == HtrSlot);" << std::endl;
13636  MAPfile << " else if (par == \"HtrTB\") return (val == HtrTB);" << std::endl;
13637  MAPfile << " else return false;" << std::endl;
13638  MAPfile << " }" << std::endl;
13639  MAPfile << std::endl;
13640 
13641  MAPfile << " bool check(const std::string par, const std::string val) const" << std::endl;
13642  MAPfile << " {" << std::endl;
13643  MAPfile << " if (par == \"subdet\") return (val == subdet);" << std::endl;
13644  MAPfile << " else if (par == \"RBX\") return (val == RBX);" << std::endl;
13645  MAPfile << " else return false;" << std::endl;
13646  MAPfile << " }" << std::endl;
13647 
13648  MAPfile << "};" << std::endl;
13649  MAPfile << std::endl;
13650 
13651  MAPfile << "const Cell AllCells[] = {" << std::endl;
13652  MAPfile << "//{ SD, Eta, Phi, Depth, RBX, RM, PIXEL, RMfiber, Fiber Ch., QIE, ADC, VMECrateId, dccid, spigot, "
13653  "fiberIndex, htrSlot, htrTopBottom }"
13654  << std::endl;
13655 
13656  // HB
13657 
13658  for (int eta = -16; eta < 0; eta++) {
13659  for (int phi = 1; phi <= nphi; phi++) {
13660  for (int depth = 1; depth <= 2; depth++) {
13661  HcalDetId* detid = nullptr;
13662  detid = new HcalDetId(HcalBarrel, eta, phi, depth);
13663  subdet = "HB";
13664  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13665  HcalElectronicsId emap_entry = emap->lookup(*detid);
13666  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13667  << detid->depth() << " ,";
13668  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13669  << lmap_entry.rmFiber() << " , ";
13670  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13671  << " , ";
13672  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13673  << " , " << emap_entry.fiberIndex() << " , ";
13674  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13675  MAPfile << "}," << std::endl;
13676  delete detid;
13677  } //Depth
13678  } //Phi
13679  } //Eta
13680  for (int eta = 1; eta <= 16; eta++) {
13681  for (int phi = 1; phi <= nphi; phi++) {
13682  for (int depth = 1; depth <= 2; depth++) {
13683  HcalDetId* detid = nullptr;
13684  detid = new HcalDetId(HcalBarrel, eta, phi, depth);
13685  subdet = "HB";
13686  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13687  HcalElectronicsId emap_entry = emap->lookup(*detid);
13688  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() - 1 << " , " << detid->iphi() - 1 << " , "
13689  << detid->depth() << " ,";
13690  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13691  << lmap_entry.rmFiber() << " , ";
13692  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13693  << " , ";
13694  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13695  << " , " << emap_entry.fiberIndex() << " , ";
13696  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13697  MAPfile << "}," << std::endl;
13698  delete detid;
13699  } //Depth
13700  } //Phi
13701  } //Eta
13702 
13703  // HE
13704  for (int eta = -20; eta <= -20; eta++) {
13705  for (int phi = nphi; phi <= nphi; phi++) {
13706  for (int depth = 1; depth <= 2; depth++) {
13707  HcalDetId* detid = nullptr;
13708  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13709  subdet = "HE";
13710  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13711  HcalElectronicsId emap_entry = emap->lookup(*detid);
13712  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13713  << detid->depth() << " ,";
13714  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13715  << lmap_entry.rmFiber() << " , ";
13716  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13717  << " , ";
13718  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13719  << " , " << emap_entry.fiberIndex() << " , ";
13720  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13721  MAPfile << "}," << std::endl;
13722  delete detid;
13723  } //Depth
13724  } //Phi
13725  } //Eta
13726 
13727  for (int eta = -19; eta <= -16; eta++) {
13728  for (int phi = nphi; phi <= nphi; phi++) {
13729  for (int depth = 1; depth <= 3; depth++) {
13730  HcalDetId* detid = nullptr;
13731  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13732  subdet = "HE";
13733  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13734  HcalElectronicsId emap_entry = emap->lookup(*detid);
13735  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13736  << detid->depth() << " ,";
13737  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13738  << lmap_entry.rmFiber() << " , ";
13739  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13740  << " , ";
13741  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13742  << " , " << emap_entry.fiberIndex() << " , ";
13743  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13744  MAPfile << "}," << std::endl;
13745  delete detid;
13746  } //Depth
13747  } //Phi
13748  } //Eta
13749  for (int eta = -29; eta <= -16; eta++) {
13750  for (int phi = 1; phi <= 71; phi++) {
13751  for (int depth = 1; depth <= 3; depth++) {
13752  HcalDetId* detid = nullptr;
13753  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13754  subdet = "HE";
13755  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13756  HcalElectronicsId emap_entry = emap->lookup(*detid);
13757  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13758  << detid->depth() << " ,";
13759  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13760  << lmap_entry.rmFiber() << " , ";
13761  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13762  << " , ";
13763  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13764  << " , " << emap_entry.fiberIndex() << " , ";
13765  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13766  MAPfile << "}," << std::endl;
13767  delete detid;
13768  } //Depth
13769  } //Phi
13770  } //Eta
13771  for (int eta = 16; eta <= 29; eta++) {
13772  for (int phi = 1; phi <= nphi; phi++) {
13773  for (int depth = 1; depth <= 3; depth++) {
13774  HcalDetId* detid = nullptr;
13775  detid = new HcalDetId(HcalEndcap, eta, phi, depth);
13776  subdet = "HE";
13777  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13778  HcalElectronicsId emap_entry = emap->lookup(*detid);
13779  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13780  << detid->depth() << " ,";
13781  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13782  << lmap_entry.rmFiber() << " , ";
13783  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13784  << " , ";
13785  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13786  << " , " << emap_entry.fiberIndex() << " , ";
13787  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13788  MAPfile << "}," << std::endl;
13789  delete detid;
13790  } //Depth
13791  } //Phi
13792  } //Eta
13793 
13794  // HF
13795 
13796  for (int eta = -41; eta <= -29; eta++) {
13797  for (int phi = 1; phi <= nphi; phi += 2) {
13798  for (int depth = 1; depth <= 2; depth++) {
13799  HcalDetId* detid = nullptr;
13800  detid = new HcalDetId(HcalForward, eta, phi, depth);
13801  subdet = "HF";
13802  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13803  HcalElectronicsId emap_entry = emap->lookup(*detid);
13804  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13805  << detid->depth() << " ,";
13806  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13807  << lmap_entry.rmFiber() << " , ";
13808  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13809  << " , ";
13810  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13811  << " , " << emap_entry.fiberIndex() << " , ";
13812  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13813  MAPfile << "}," << std::endl;
13814  delete detid;
13815  } //Depth
13816  } //Phi
13817  } //Eta
13818 
13819  for (int eta = 29; eta <= 41; eta++) {
13820  for (int phi = 1; phi <= nphi; phi += 2) {
13821  for (int depth = 1; depth <= 2; depth++) {
13822  HcalDetId* detid = nullptr;
13823  detid = new HcalDetId(HcalForward, eta, phi, depth);
13824  subdet = "HF";
13825  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13826  HcalElectronicsId emap_entry = emap->lookup(*detid);
13827  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13828  << detid->depth() << " ,";
13829  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13830  << lmap_entry.rmFiber() << " , ";
13831  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13832  << " , ";
13833  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13834  << " , " << emap_entry.fiberIndex() << " , ";
13835  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13836  MAPfile << "}," << std::endl;
13837  delete detid;
13838  } //Depth
13839  } //Phi
13840  } //Eta
13841 
13842  // HO
13843 
13844  for (int eta = -15; eta < 0; eta++) {
13845  for (int phi = 1; phi <= nphi; phi++) {
13846  for (int depth = 4; depth <= 4; depth++) {
13847  HcalDetId* detid = nullptr;
13848  detid = new HcalDetId(HcalOuter, eta, phi, depth);
13849  subdet = "HO";
13850  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13851  HcalElectronicsId emap_entry = emap->lookup(*detid);
13852  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() << " , " << detid->iphi() - 1 << " , "
13853  << detid->depth() << " ,";
13854  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13855  << lmap_entry.rmFiber() << " , ";
13856  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13857  << " , ";
13858  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13859  << " , " << emap_entry.fiberIndex() << " , ";
13860  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13861  MAPfile << "}," << std::endl;
13862  delete detid;
13863  } //Depth
13864  } //Phi
13865  } //Eta
13866 
13867  for (int eta = 1; eta <= 15; eta++) {
13868  for (int phi = 1; phi <= nphi; phi++) {
13869  for (int depth = 4; depth <= 4; depth++) {
13870  HcalDetId* detid = nullptr;
13871  detid = new HcalDetId(HcalOuter, eta, phi, depth);
13872  subdet = "HO";
13873  HcalFrontEndId lmap_entry = lmap.getHcalFrontEndId(*detid);
13874  HcalElectronicsId emap_entry = emap->lookup(*detid);
13875  MAPfile << " {\"" << subdet << "\" , " << detid->ieta() - 1 << " , " << detid->iphi() - 1 << " , "
13876  << detid->depth() << " ,";
13877  MAPfile << "\"" << lmap_entry.rbx() << "\" , " << lmap_entry.rm() << " , " << lmap_entry.pixel() << " , "
13878  << lmap_entry.rmFiber() << " , ";
13879  MAPfile << lmap_entry.fiberChannel() << " , " << lmap_entry.qieCard() << " , " << lmap_entry.adc()
13880  << " , ";
13881  MAPfile << emap_entry.readoutVMECrateId() << " , " << emap_entry.dccid() << " , " << emap_entry.spigot()
13882  << " , " << emap_entry.fiberIndex() << " , ";
13883  MAPfile << emap_entry.htrSlot() << " , " << emap_entry.htrTopBottom();
13884  MAPfile << "}," << std::endl;
13885  delete detid;
13886  } //Depth
13887  } //Phi
13888  } //Eta
13889  MAPfile << "};" << std::endl;
13890  MAPfile << std::endl;
13891 
13892  MAPfile << "// macro for array length calculation" << std::endl;
13893  MAPfile << "#define DIM(a) (sizeof(a)/sizeof(a[0]))" << std::endl;
13894  MAPfile << std::endl;
13895 
13896  MAPfile << "// class for cells array managing" << std::endl;
13897  MAPfile << "class CellDB {" << std::endl;
13898  MAPfile << "public:" << std::endl;
13899  MAPfile << " CellDB()" << std::endl;
13900  MAPfile << " : cells(AllCells, AllCells + DIM(AllCells))" << std::endl;
13901  MAPfile << "{}" << std::endl;
13902  MAPfile << std::endl;
13903 
13904  MAPfile << "// return i-th cell" << std::endl;
13905  MAPfile << "Cell operator [] (int i) const {return cells[i];}" << std::endl;
13906 
13907  MAPfile << "// number of cells in database" << std::endl;
13908  MAPfile << "int size() const {return cells.size();}" << std::endl;
13909  MAPfile << std::endl;
13910 
13911  MAPfile << "// select cells for which \"par\" == \"val\"" << std::endl;
13912  MAPfile << "template<typename T>" << std::endl;
13913  MAPfile << "CellDB find(const std::string par, const T val) const" << std::endl;
13914  MAPfile << "{" << std::endl;
13915  MAPfile << " std::vector<Cell> s;" << std::endl;
13916  MAPfile << " for (size_t i = 0; i < cells.size(); ++i)" << std::endl;
13917  MAPfile << " if (cells[i].check(par, val))" << std::endl;
13918  MAPfile << " s.push_back(cells[i]);" << std::endl;
13919  MAPfile << " return CellDB(s);" << std::endl;
13920  MAPfile << "} " << std::endl;
13921  MAPfile << std::endl;
13922  MAPfile << "private:" << std::endl;
13923  MAPfile << " CellDB( const std::vector<Cell> s)" << std::endl;
13924  MAPfile << " : cells(s)" << std::endl;
13925  MAPfile << "{}" << std::endl;
13926  MAPfile << "std::vector<Cell> cells;" << std::endl;
13927  MAPfile << "};" << std::endl;
13928  MAPfile.close();
13929  std::cout << "===== Finish writing Channel MAP =====" << std::endl;
13930 }
13931 
13932 double CMTRawAnalyzer::dR(double eta1, double phi1, double eta2, double phi2) {
13933  double deltaphi = phi1 - phi2;
13934  if (phi2 > phi1) {
13935  deltaphi = phi2 - phi1;
13936  }
13937  if (deltaphi > M_PI) {
13938  deltaphi = 2. * M_PI - deltaphi;
13939  }
13940  double deltaeta = eta2 - eta1;
13941  double tmp = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
13942  return tmp;
13943 }
13944 
13945 double CMTRawAnalyzer::phi12(double phi1, double en1, double phi2, double en2) {
13946  // weighted mean value of phi1 and phi2
13947 
13948  double a1 = phi1;
13949  double a2 = phi2;
13950 
13951  if (a1 > 0.5 * M_PI && a2 < 0.)
13952  a2 += 2 * M_PI;
13953  if (a2 > 0.5 * M_PI && a1 < 0.)
13954  a1 += 2 * M_PI;
13955  double tmp = (a1 * en1 + a2 * en2) / (en1 + en2);
13956  if (tmp > M_PI)
13957  tmp -= 2. * M_PI;
13958 
13959  return tmp;
13960 }
13961 
13962 double CMTRawAnalyzer::dPhiWsign(double phi1, double phi2) {
13963  // clockwise phi2 w.r.t phi1 means "+" phi distance
13964  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
13965 
13966  double a1 = phi1;
13967  double a2 = phi2;
13968  double tmp = a2 - a1;
13969  if (a1 * a2 < 0.) {
13970  if (a1 > 0.5 * M_PI)
13971  tmp += 2. * M_PI;
13972  if (a2 > 0.5 * M_PI)
13973  tmp -= 2. * M_PI;
13974  }
13975  return tmp;
13976 }
13977 
13980 //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_runbadrate0_depth4_HF
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]
TH1F * h_runbadrate0_depth3_HF
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
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_
TH1F * h_runnbadchannels_depth6_HE
TH2F * h_recSignalEnergy1_HE5
constexpr int32_t htrSlot() const
get the htr slot
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
TH1F * h_nbadchannels_depth6_HE
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
TH1F * h_runbadrate_depth3_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
TH1F * h_nbadchannels_depth3_HB
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
TH1F * h_runnbadchannels_depth4_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
TH1F * h_runbadrate_depth4_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_runnbadchannels_depth5_HE
TH1F * h_gsmdifferencefit3_HE
const HcalQIEShape * shape
TH1F * h_sumamplitude_depth2_HE
double lsdep_estimator1_HFdepth4_
TH2F * h_mapDepth2linADCAmpl12_HE
TH2F * h_mapGetRMSOverNormalizedSignal0_HO
TH2F * h_mapDepth2TS2_HB
TH2F * h_recNoiseEnergy1_HF4
TH2F * h_mapDepth1Ampl047_HB
TH2F * h_mapDepth2Amplitude225_HB
TH2F * h_mapTSmeanCalib047_HB
TH2F * h_recNoiseEnergy0_HB4
TH2F * h_mapDepth4Amplitude_HO
TH2F * h_recNoiseEnergy0_HE2
edm::EDGetTokenT< HFRecHitCollection > tok_hfSignal_
TH2F * h_mapDepth1AmplE34_HF
TH2F * h_mapDepth4pedestal_HB
double recSignalEnergy2[nsub][ndepth][neta][nphi]
TH2F * h_recSignalEnergy1_HB2
TH2F * h_amplitudechannel2_HE7
TH2F * h_mapDepth3Ampl047_HE
TH2F * h_mapDepth1ADCAmpl225_HE
TH2F * h_mapDepth7ADCAmpl225_HE
double averSIGNALoccupancy_HB
TH2F * h_2D0sumAmplitudeLS2
TH1F * h_nbadchannels_depth3_HE
TH1F * h_sum0ADCAmplperLS6_P2
TH1F * h_Amplitude_forCapIdErrors_HE3
TH2F * h_mapDepth4TSmeanA225_HB
TH1F * h_sumamplitude_depth2_HB0
TH1F * h_sumAmplperLS1_LSselected
TH1F * h_corrforxaMAIN0_HE
TH2F * h_mapDepth2ADCAmpl_HF
TH1F * h_sumamplitude_depth1_HF1
TH2F * h_mapGetRMSOverNormalizedSignal_HE
double lsdep_estimator1_HEdepth4_
constexpr int32_t htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
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
TH1F * h_runbadrate_depth7_HE
TH1F * h_runnbadchannelsC_depth7_HE
TH2F * h_mapDepth1ADCAmpl225_HF
TH1F * h_nbadchannels_depth4_HB
TH1F * h_Amplitude_forCapIdErrors_HE1
TH2F * h_mapDepth4Amplitude225_HF
TH2F * h_mapDepth2pedestal_HB
double lsdep_estimator3_HEdepth2_
TH2F * h_mapGetRMSOverNormalizedSignal_HO
TH2F * h_mapDepth1Pedw3_HE
void fillDigiAmplitudeQIE11(QIE11DataFrame qie11df)
TH2F * h_2D0sumADCAmplLSdepth4HFu
double calibrTSmeanHFMin_
TH1F * h_sumamplitude_depth1_HB
TH1F * h_sumPedestalperLS1
TH1F * h_sumAmplitudeperLS1
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
TH1F * h_runbadrateC_depth7_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_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
TH1F * h_nbadchannels_depth3_HF
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
TH1F * h_runnbadchannelsC_depth5_HE
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
constexpr int32_t readoutVMECrateId() const
get the readout VME crate number
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
TH1F * h_runnbadchannelsC_depth4_HF
TH2F * h_mapDepth7TSmeanA_HE
TH1F * h_nbadchannels_depth2_HF
TH1F * h_sum0AmplitudeperLS5
TH2F * h_mapDepth3ADCAmpl225_HF
TH2F * h_amplitudechannel0_HF4
TH1F * h_runbadrate_depth5_HE
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
TH1F * h_runnbadchannels_depth4_HE
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
TH1F * h_runbadrate_depth4_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
TH1F * h_runbadrate0_depth5_HE
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)
constexpr int32_t spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
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 ieta() const
get the cell ieta
Definition: HcalDetId.h:155
TH2F * h_mapDepth2Amplitude_HF
TH2F * h_mapADCAmpl12secondpeak_HE
T sqrt(T t)
Definition: SSEVec.h:23
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
TH1F * h_runbadrate0_depth4_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
TH1F * h_nbadchannels_depth5_HE
TH2F * h_recSignalEnergy1_HB1
TH2F * h_recNoiseEnergy1_HF1
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH1F * h_runnbadchannelsC_depth4_HE
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
TH1F * h_runnbadchannels_depth3_HB
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
TH1F * h_runbadrateC_depth3_HF
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
TH1F * h_runbadrateC_depth5_HE
double recSignalEnergy0[nsub][ndepth][neta][nphi]
TH2F * h_recNoiseEnergy2_HE1
def gen(fragment, howMuch)
Event to runs.
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
TH1F * h_runnbadchannelsC_depth3_HB
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
TH1F * h_nbadchannels_depth4_HE
TH2F * h_mapDepth3ADCAmpl225_HE
TH2F * h_mapDepth4ADCAmpl12_HO
ii
Definition: cuy.py:589
TH1F * h_runbadrate_depth3_HB
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
TH1F * h_runnbadchannelsC_depth6_HE
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
TH1F * h_runbadrate0_depth4_HE
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
TH1F * h_runbadrate_depth4_HF
double sumEstimator2[nsub][ndepth][neta][nphi]
TH2F * h_mapTSmaxCalib047_HF
TH1F * h_runbadrate0_depth3_HB
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
TH1F * h_runbadrateC_depth4_HF
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
TH1F * h_runbadrate_depth6_HE
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
TH1F * h_runbadrate0_depth7_HE
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
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
constexpr int32_t fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
TH1F * h_bcnnbadchannels_depth2_HB
TH2F * h_mapDepth1Pedw2_HB
TH1F * h_runbadrate0_depth6_HE
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_runnbadchannelsC_depth3_HF
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
TH1F * h_runnbadchannels_depth3_HF
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
TH1F * h_sumamplitude_depth1_HE0
TH2F * h_mapDepth1pedestal_HF
TH2F * h_mapDepth5pedestal_HE
TH1F * h_runnbadchannelsC_depth4_HB
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
TH1F * h_runbadrateC_depth4_HB
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_nbadchannels_depth7_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_runbadrateC_depth4_HE
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
TH1F * h_runnbadchannels_depth4_HF
TH1F * h_nbadchannels_depth4_HF
TH2F * h_mapDepth3Pedw0_HE
Readout chain identification for Hcal.
TH1F * h_sumADCAmplperLS6_M2
TH1F * h_bcnvsamplitude0_HE
TH1F * h_sum0TSmeanAperLS5
TH1F * h_bcnbadrate0_depth2_HE
TH2F * h_mapAiForLS_bad_HB
TH2F * h_mapDepth2Pedw1_HF
TH2F * h_mapDepth1RADDAM_HE
TH1F * h_NphiForEta16Depth3RADDAM_HED2
TH2F * h_mapDepth4TSmeanA225_HO
TH2F * h_recNoiseEnergy2_HF2
TH1F * h_sumCutTSmaxAperLS4
TH2F * h_mapDepth4TSmaxA225_HO
TH1F * h_Amplitude_notCapIdErrors_HE2
TH2F * h_mapDepth5ADCAmpl225Copy_HE
TH2F * h_mapDepth7ADCAmpl12_HE
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
TH1F * h_gsmdifferencefit1_HE
TH2F * h_recNoiseEnergy0_HE1
TH2F * h_mapenophinorm2_HE2
double calibrWidthHOMax_
TH2F * h_mapDepth1ADCAmplSiPM_HE
TH1F * h_ADCAmplZoom1_HB
TH1F * h_sum0PedestalperLS2
TH2F * h_mapDepth3AmplE34_HB
TH2F * h_2D0sumAmplitudeLS4
TH1F * h_sumADCAmplEtaPhiLs_lscounterM1
TH2F * h_mapDepth6AmplE34_HE
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
TH1F * h_sum0TSmeanAperLS8
TH1F * h_runnbadchannels_depth7_HE
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
constexpr int32_t dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
TH2F * h_recNoiseEnergy2_HE2
TH1F * h_runbadrateC_depth6_HE
static constexpr float b1
TH2F * h_mapDepth3TSmeanA_HE
const edm::ESGetToken< HcalDbService, HcalDbRecord > tokDB_
TH2F * h_mapDepth4pedestal_HO
TH2F * h_mapDepth4TSmeanA_HE
Definition: Run.h:45
void endJob() override
TH2F * h_mapDepth1Amplitude_HB
double dR(double eta1, double phi1, double eta2, double phi2)
uint16_t *__restrict__ uint16_t const *__restrict__ adc
TH1F * h_sumPedestalperLS8
TH2F * h_mapDepth4Amplitude225_HE
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
TH2F * h_recSignalEnergy2_HE5
TH1F * h_orbitNumvsamplitude_HE
TH1F * h_sumADCAmplperLSdepth7HEu
double recNoiseEnergy2[nsub][ndepth][neta][nphi]
TH2F * h_mapDepth3RADDAM0_HE
TH2F * h_mapDepth2pedestal_HE
void fillDigiAmplitude(HBHEDigiCollection::const_iterator &digiItr)
TH2F * h_amplitudechannel0_HE5
TH1F * h_averSIGNALoccupancy_HE
TH1F * h_runnbadchannels_depth2_HF
TH2F * h_2DsumADCAmplLSdepth4HFu
TH1F * h_bcnvsamplitude0_HO
TH1F * h_sumCutADCAmplperLSdepth5HEu
TH1F * h_nbadchannels_depth1_HF
TH2F * h_recSignalEnergy0_HE3
TH2F * h_map0AiForLS_good_HB
TH2F * h_mapRatioCalib047_HE
TH2F * h_amplitudechannel2_HE2
TH2F * h_mapDepth3TSmaxA_HE
TH1F * h_runbadrateC_depth3_HB
TH1F * h_sumCutADCAmplperLS7
TH1F * h_sumCutAmplitudeperLS4
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
bool studyPedestalCorrelations_