CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
RemoteMonitoringMAPTEST.cc File Reference
#include "LogEleMapdb.h"
#include <iostream>
#include <fstream>
#include "TH1.h"
#include "TH2.h"
#include "TCanvas.h"
#include "TROOT.h"
#include <TMath.h>
#include "TStyle.h"
#include "TSystem.h"
#include "TLegend.h"
#include "TText.h"
#include "TAxis.h"
#include "TFile.h"
#include "TLine.h"
#include "TGraph.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Prepare maps of good/bad channels:

Definition at line 34 of file RemoteMonitoringMAPTEST.cc.

References funct::abs(), gather_cfg::cout, EcalCondDB::db, g4TestOverlap_cfg::Depth, CellDB::find(), alignmentValidation::fname, mps_fire::i, dqmiolumiharvest::j, isotrackApplyRegressor::k, ndepth, neta, nphi, nsub, colinearityKinematic::Phi, cond::runnumber, SiStripCommissioningClient_cfg::runtype, CellDB::size(), str, AlCaHLTBitMon_QueryRunRegistry::string, and ctpps_dqm_sourceclient-live_cfg::test.

34  {
35  gROOT->Reset();
36  gROOT->SetStyle("Plain");
37  gStyle->SetOptStat(0);
38  gStyle->SetOptTitle(1);
39  // ok change
40  if (argc < 3)
41  return 1;
42  char fname[300];
43  char refname[300];
44  char runtypeC[300];
45  sprintf(fname, "%s", argv[1]);
46  sprintf(refname, "%s", argv[2]);
47  sprintf(runtypeC, "%s", argv[3]);
48  std::cout << fname << " " << refname << " " << runtypeC << std::endl;
49  // ok change
50 
51  //======================================================================
52  // Connect the input files, parameters and get the 2-d histogram in memory
53  // TFile *hfile= new TFile("GlobalHist.root", "READ");
54  string promt = (string)fname;
55  string runtype = (string)runtypeC;
56  string runnumber = "";
57  for (unsigned int i = promt.size() - 11; i < promt.size() - 5; i++)
58  runnumber += fname[i];
59  string refrunnumber = "";
60  promt = (string)refname;
61  for (unsigned int i = promt.size() - 11; i < promt.size() - 5; i++)
62  refrunnumber += refname[i];
63 
64  TFile *hfile = new TFile(fname, "READ");
65  TFile *hreffile = new TFile(refname, "READ");
66  double MIN_M[7][5];
67  double MAX_M[7][5];
68  double MIN_C[7][5];
69  double MAX_C[7][5];
70  double porog[5];
71  double Pedest[2][5];
72 
73  if (runtype == "LED") {
74  //CUTS: [test][subdetector] ADC amplitude Am Width for Wm Ratio cut for Rm TS mean for TNm TS max for TXm
75  double MIN_M_LED[7][5] = {{0., 0., 0., 0., 0.},
76  {0., 0., 0., 0., 0.},
77  {0, 100., 70., 40., 40.},
78  {0, 0.7, 0.7, 0.1, 0.1},
79  {0, 0.7, 0.6, 0.40, 0.45},
80  {0, 2.5, 1.0, 1.0, 1.0},
81  {0, 1.5, 1.5, 0.5, 0.5}};
82  double MAX_M_LED[7][5] = {{0., 0., 0., 0., 0.},
83  {0., 0., 0., 0., 0.},
84  {0, 3000, 500000, 3000, 150000},
85  {0, 2.5, 2.5, 2.8, 2.6},
86  {0, 0.94, 0.95, 1.04, 1.02},
87  {0, 5.5, 5.2, 4.8, 4.2},
88  {0, 6.5, 6.5, 8.5, 8.5}};
89  double MIN_C_LED[7][5] = {{0., 0., 0., 0., 0.},
90  {0., 0., 0., 0., 0.},
91  {0, 1000., 1000., 1000., 100.},
92  {0, 1.3, 1.3, 0.7, 0.3},
93  {0, 0.76, 0.76, 0.85, 0.5},
94  {0, 2.4, 2.4, 1.5, 3.5},
95  {0, 1.5, 1.5, 1.5, 3.5}};
96  double MAX_C_LED[7][5] = {{0., 0., 0., 0., 0.},
97  {0., 0., 0., 0., 0.},
98  {0, 1E20, 1E20, 1E20, 1E20},
99  {0, 1.9, 1.9, 1.65, 1.5},
100  {0, 0.94, 0.94, 0.99, 0.8},
101  {0, 3.7, 3.7, 2.7, 4.5},
102  {0, 2.5, 2.5, 2.5, 4.5}};
103  double porog_LED[5] = {0., 2., 2., 2., 2.}; // Cut for GS test in pro cents
104  double Pedest_LED[2][5] = {{0., 0.1, 0.6, 0.1, 0.8},
105  {0., 0.1, 0.1, 0.1, 0.4}}; //Cuts for Pedestal and pedestal Width
106  for (int i = 0; i <= 6; i++)
107  for (int j = 0; j <= 4; j++) {
108  MIN_M[i][j] = MIN_M_LED[i][j];
109  MAX_M[i][j] = MAX_M_LED[i][j];
110  MIN_C[i][j] = MIN_C_LED[i][j];
111  MAX_C[i][j] = MAX_C_LED[i][j];
112  }
113  for (int i = 0; i <= 4; i++) {
114  porog[i] = porog_LED[i];
115  Pedest[0][i] = Pedest_LED[0][i];
116  Pedest[1][i] = Pedest_LED[1][i];
117  }
118  }
119 
120  if (runtype == "LASER") {
121  //CUTS: [test][subdetector] ADC amplitude Am Width for Wm Ratio cut for Rm TS mean for TNm TS max for TXm
122  double MIN_M_LASER[7][5] = {{0., 0., 0., 0., 0.},
123  {0., 0., 0., 0., 0.},
124  {0, 40., 40., 100., 40.},
125  {0, 0.3, 0.9, 0.2, 0.2},
126  {0, 0.5, 0.55, 0.55, 0.60},
127  {0, 5.0, 2.5, 1.1, 5.5},
128  {0, 1.5, 1.5, 1.5, 1.5}};
129  double MAX_M_LASER[7][5] = {{0., 0., 0., 0., 0.},
130  {0., 0., 0., 0., 0.},
131  {0, 3500, 350000, 3500, 150000},
132  {0, 2.5, 3.6, 2.6, 2.1},
133  {0, 1.00, 1.00, 1.04, 1.02},
134  {0, 7.5, 6.5, 4.4, 8.5},
135  {0, 8.5, 8.5, 6.5, 8.5}};
136  double MIN_C_LASER[7][5] = {{0., 0., 0., 0., 0.},
137  {0., 0., 0., 0., 0.},
138  {0, 1000., 1000., 1000., 100.},
139  {0, 1.3, 1.3, 0.7, 0.3},
140  {0, 0.76, 0.76, 0.85, 0.5},
141  {0, 2.4, 2.4, 1.5, 3.5},
142  {0, 1.5, 1.5, 1.5, 3.5}};
143  double MAX_C_LASER[7][5] = {{0., 0., 0., 0., 0.},
144  {0., 0., 0., 0., 0.},
145  {0, 1E20, 1E20, 1E20, 1E20},
146  {0, 1.9, 1.9, 1.65, 1.5},
147  {0, 0.94, 0.94, 1.0, 0.8},
148  {0, 3.7, 3.7, 2.7, 4.5},
149  {0, 2.5, 2.5, 2.5, 4.5}};
150  double porog_LASER[5] = {0., 2., 2., 2., 2.}; // Cut for GS test in pro cents
151  // double porog_LASER[5] = {0., 200., 200., 100., 100.}; // Cut for GS test in pro cents
152  double Pedest_LASER[2][5] = {{0., 0.1, 0.6, 0.1, 0.8},
153  {0., 0.1, 0.1, 0.1, 0.4}}; //Cuts for Pedestal and pedestal Width
154  for (int i = 0; i <= 6; i++)
155  for (int j = 0; j <= 4; j++) {
156  MIN_M[i][j] = MIN_M_LASER[i][j];
157  MAX_M[i][j] = MAX_M_LASER[i][j];
158  MIN_C[i][j] = MIN_C_LASER[i][j];
159  MAX_C[i][j] = MAX_C_LASER[i][j];
160  }
161  for (int i = 0; i <= 4; i++) {
162  porog[i] = porog_LASER[i];
163  Pedest[0][i] = Pedest_LASER[0][i];
164  Pedest[1][i] = Pedest_LASER[1][i];
165  }
166  }
167  if (runtype == "PEDESTAL") {
168  //CUTS: [test][subdetector] ADC amplitude Am Width for Wm Ratio cut for Rm TS mean for TNm TS max for TXm
169  double MIN_M_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
170  {0., 0., 0., 0., 0.},
171  {0, 10., 10., 200., 5.},
172  {0, 2.7, 2.7, 2.7, 0.2},
173  {0, 0.31, 0.31, 0.05, 0.15},
174  {0, 4.5, 4.5, 4.5, 2.0},
175  {0, 0.5, 0.5, 0.5, 0.5}};
176  double MAX_M_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
177  {0., 0., 0., 0., 0.},
178  {0, 2500., 250000., 2500., 150000.},
179  {0, 3.0, 3.0, 5.0, 3.0},
180  {0, 0.95, 0.95, 1.00, 0.98},
181  {0, 4.6, 4.6, 4.6, 7.0},
182  {0, 9.5, 9.5, 8.5, 8.5}};
183  double MIN_C_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
184  {0., 0., 0., 0., 0.},
185  {0, 1000., 1000., 1000., 100.},
186  {0, 1.3, 1.3, 0.7, 0.3},
187  {0, 0.76, 0.76, 0.85, 0.5},
188  {0, 2.4, 2.4, 1.5, 3.5},
189  {0, 1.5, 1.5, 1.5, 3.5}};
190  double MAX_C_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
191  {0., 0., 0., 0., 0.},
192  {0, 1E20, 1E20, 1E20, 1E20},
193  {0, 1.9, 1.9, 1.65, 1.5},
194  {0, 0.94, 0.94, 1.0, 0.8},
195  {0, 3.7, 3.7, 2.7, 4.5},
196  {0, 2.5, 2.5, 2.5, 4.5}};
197  double porog_PEDESTAL[5] = {0., 2., 2., 2., 2.}; // Cut for GS test in pro cents
198  // double porog_PEDESTAL[5] = {0., 200., 200., 100., 100.}; // Cut for GS test in pro cents
199  double Pedest_PEDESTAL[2][5] = {{0., 0.1, 0.6, 0.1, 0.8},
200  {0., 0.1, 0.1, 0.1, 0.4}}; //Cuts for Pedestal and pedestal Width
201  for (int i = 0; i <= 6; i++)
202  for (int j = 0; j <= 4; j++) {
203  MIN_M[i][j] = MIN_M_PEDESTAL[i][j];
204  MAX_M[i][j] = MAX_M_PEDESTAL[i][j];
205  MIN_C[i][j] = MIN_C_PEDESTAL[i][j];
206  MAX_C[i][j] = MAX_C_PEDESTAL[i][j];
207  }
208  for (int i = 0; i <= 4; i++) {
209  porog[i] = porog_PEDESTAL[i];
210  Pedest[0][i] = Pedest_PEDESTAL[0][i];
211  Pedest[1][i] = Pedest_PEDESTAL[1][i];
212  }
213  }
214 
215  //======================================================================
216 
217  cout << endl;
218  cout << MIN_M[2][1] << endl;
219 
220  //======================================================================
221  // Prepare histograms and plot them to .png files
222 
223  //TCanvas *cHB = new TCanvas("cHB","cHB",1000,500);
224  TCanvas *cHB = new TCanvas("cHB", "cHB", 1000, 1000);
225  //TCanvas *cHE = new TCanvas("cHE","cHE",1500,500);
226  TCanvas *cHE = new TCanvas("cHE", "cHE", 1500, 1500);
227  //TCanvas *cONE = new TCanvas("cONE","cONE",500,500);
228  TCanvas *cONE = new TCanvas("cONE", "cONE", 1500, 500);
229  TCanvas *cPED = new TCanvas("cPED", "cPED", 1000, 500);
230  //TCanvas *cHF = new TCanvas("cHF","cHF",1000,1000);
231  TCanvas *cHF = new TCanvas("cHF", "cHF", 1000, 1000);
232 
233  // Phi-symmetry for Calibration Group:
234 
235  TCanvas *c1x0 = new TCanvas("c1x0", "c1x0", 300, 10, 800, 700);
236 
237  TCanvas *c1x1 = new TCanvas("c1x1", "c1x1", 100, 10, 600, 700);
238 
239  TCanvas *c2x1 = new TCanvas("c2x1", "c2x1", 200, 300, 1600, 800);
240 
241  TCanvas *c3x5 = new TCanvas("c3x5", "c3x5", 1000, 1500);
242  //
243 
244  char *str = (char *)alloca(10000);
245 
246  // before upgrade 2017:
247  // depth: HB depth1,2; HE depth1,2,3; HO depth4; HF depth1,2
248  // 5 depthes: 0(empty), 1,2,3,4
249 
250  // upgrade 2017:
251  // depth: HB depth1,2; HE depth1,2,3,4,5,6,7; HO depth4; HF depth1,2,3,4
252  // 8 depthes: 0(empty), 1,2,3,4,5,6,7
253 
254  // upgrade 2021:
255  // depth: HB depth1,2,3,4; HE depth1,2,3,4,5,6,7; HO depth4; HF depth1,2,3,4
256  // 10 depthes: 0(empty), 1,2,3,4,5,6,7,8,9
257 
258  // Int_t ALLDEPTH = 5;
259  // Int_t ALLDEPTH = 8;
260  Int_t ALLDEPTH = 10;
261 
262  int k_min[5] = {0, 1, 1, 4, 1}; // minimum depth for each subdet
263  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
264  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
265  int k_max[5] = {0, 4, 7, 4, 4}; // maximum depth for each subdet
266 
267  TH2F *Map_Ampl[33][5][ALLDEPTH]; // 2D histogramm for test,subdet,depth
268  TH2F *Map_SUB[5][ALLDEPTH]; // 2d histogramm for subdet, depth
269  TH1F *HistAmplDepth[22][5][ALLDEPTH]; // 1d histogramm for test,subdet, depth
270  TH1F *HistAmpl[22][5]; // 1d histogramm for test,subdet
271  TH2F *Map_SUBTS[5][ALLDEPTH]; // 2d histogramm for subdet, depth in different TSs
272 
273  TH1F *HistPed[3][5][4]; // 1d histogramm for test,subdet, CapID
274  TH2F *Map_Ped[3][5]; // 2d histogramm for test,subdet -> test 33
275  TH1F *hist_GoodTSshape[5]; // 1d histogramm for TS shape subdet -> test 41
276  TH1F *hist_GoodTSshape0[5]; // 1d histogramm for TS shape subdet -> test 41
277  TH1F *hist_BadTSshape[5]; // 1d histogramm for TS shape subdet -> test 41
278  TH1F *hist_BadTSshape0[5]; // 1d histogramm for TS shape subdet -> test 41
279  TH1F *hist_ADC_All[5]; // 1d histogramm for TS shape subdet -> test 42
280  TH1F *hist_ADC_DS[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 42
281  TH1F *hist_SumADC[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 43
282  TH1F *hist_SumADC0[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 43
283  TH1F *hist_SumADC1[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 43
284 
285  Map_SUB[1][1] = (TH2F *)hfile->Get("h_mapDepth1_HB");
286  Map_SUB[1][2] = (TH2F *)hfile->Get("h_mapDepth2_HB");
287  Map_SUB[2][1] = (TH2F *)hfile->Get("h_mapDepth1_HE");
288  Map_SUB[2][2] = (TH2F *)hfile->Get("h_mapDepth2_HE");
289  Map_SUB[2][3] = (TH2F *)hfile->Get("h_mapDepth3_HE");
290  Map_SUB[3][4] = (TH2F *)hfile->Get("h_mapDepth4_HO");
291  Map_SUB[4][1] = (TH2F *)hfile->Get("h_mapDepth1_HF");
292  Map_SUB[4][2] = (TH2F *)hfile->Get("h_mapDepth2_HF");
293 
294  Map_SUB[1][3] = (TH2F *)hfile->Get("h_mapDepth3_HB");
295  Map_SUB[1][4] = (TH2F *)hfile->Get("h_mapDepth4_HB");
296  Map_SUB[2][4] = (TH2F *)hfile->Get("h_mapDepth4_HE");
297  Map_SUB[2][5] = (TH2F *)hfile->Get("h_mapDepth5_HE");
298  Map_SUB[2][6] = (TH2F *)hfile->Get("h_mapDepth6_HE");
299  Map_SUB[2][7] = (TH2F *)hfile->Get("h_mapDepth7_HE");
300  Map_SUB[4][3] = (TH2F *)hfile->Get("h_mapDepth3_HF");
301  Map_SUB[4][4] = (TH2F *)hfile->Get("h_mapDepth4_HF");
302 
303  //+++++++++++++++++++++++++++++
304  //Test 0 Entries
305  //+++++++++++++++++++++++++++++
306 
307  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
308  // if (sub==1) cHB->Divide(2,1);
309  if (sub == 1)
310  cHB->Divide(2, 2);
311  // if (sub==2) cHE->Divide(3,1);
312  if (sub == 2)
313  cHE->Divide(3, 3);
314  if (sub == 3)
315  cONE->Divide(1, 1);
316  // if (sub==4) cHF->Divide(2,1);
317  if (sub == 4)
318  cHF->Divide(2, 2);
319  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
320  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
321  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
322  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
323  if (sub == 1)
324  cHB->cd(k);
325  if (sub == 2)
326  cHE->cd(k);
327  if (sub == 3)
328  cONE->cd(k - 3);
329  if (sub == 4)
330  cHF->cd(k);
331  gPad->SetGridy();
332  gPad->SetGridx();
333  gPad->SetLogz();
334  if (sub == 1)
335  sprintf(str, "HB, Depth%d \b", k);
336  if (sub == 2)
337  sprintf(str, "HE, Depth%d \b", k);
338  if (sub == 3)
339  sprintf(str, "HO, Depth%d \b", k);
340  if (sub == 4)
341  sprintf(str, "HF, Depth%d \b", k);
342  Map_SUB[sub][k]->SetTitle(str);
343  Map_SUB[sub][k]->SetXTitle("#eta \b");
344  Map_SUB[sub][k]->SetYTitle("#phi \b");
345  Map_SUB[sub][k]->SetZTitle("Number of events \b");
346  if (sub == 3)
347  Map_SUB[sub][k]->SetTitleOffset(0.8, "Z");
348  Map_SUB[sub][k]->Draw("COLZ");
349  Map_SUB[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
350  // Map_SUB[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
351  if (sub == 1) {
352  cHB->Modified();
353  cHB->Update();
354  }
355  if (sub == 2) {
356  cHE->Modified();
357  cHE->Update();
358  }
359  if (sub == 3) {
360  cONE->Modified();
361  cONE->Update();
362  }
363  if (sub == 4) {
364  cHF->Modified();
365  cHF->Update();
366  }
367  } //end depth
368 
369  if (sub == 1) {
370  cHB->Print("MapRateEntryHB.png");
371  cHB->Clear();
372  }
373  if (sub == 2) {
374  cHE->Print("MapRateEntryHE.png");
375  cHE->Clear();
376  }
377  if (sub == 3) {
378  cONE->Print("MapRateEntryHO.png");
379  cONE->Clear();
380  }
381  if (sub == 4) {
382  cHF->Print("MapRateEntryHF.png");
383  cHF->Clear();
384  }
385  } // end sub
386 
387  //+++++++++++++++++++++++++++++
388  //Test 1 (Cm) Rate of Cap ID errors
389  //+++++++++++++++++++++++++++++
390 
391  Map_Ampl[1][1][1] = (TH2F *)hfile->Get("h_mapDepth1Error_HB");
392  Map_Ampl[1][1][2] = (TH2F *)hfile->Get("h_mapDepth2Error_HB");
393  Map_Ampl[1][2][1] = (TH2F *)hfile->Get("h_mapDepth1Error_HE");
394  Map_Ampl[1][2][2] = (TH2F *)hfile->Get("h_mapDepth2Error_HE");
395  Map_Ampl[1][2][3] = (TH2F *)hfile->Get("h_mapDepth3Error_HE");
396  Map_Ampl[1][3][4] = (TH2F *)hfile->Get("h_mapDepth4Error_HO");
397  Map_Ampl[1][4][1] = (TH2F *)hfile->Get("h_mapDepth1Error_HF");
398  Map_Ampl[1][4][2] = (TH2F *)hfile->Get("h_mapDepth2Error_HF");
399 
400  Map_Ampl[1][1][3] = (TH2F *)hfile->Get("h_mapDepth3Error_HB");
401  Map_Ampl[1][1][4] = (TH2F *)hfile->Get("h_mapDepth4Error_HB");
402  Map_Ampl[1][2][4] = (TH2F *)hfile->Get("h_mapDepth4Error_HE");
403  Map_Ampl[1][2][5] = (TH2F *)hfile->Get("h_mapDepth5Error_HE");
404  Map_Ampl[1][2][6] = (TH2F *)hfile->Get("h_mapDepth6Error_HE");
405  Map_Ampl[1][2][7] = (TH2F *)hfile->Get("h_mapDepth7Error_HE");
406  Map_Ampl[1][4][3] = (TH2F *)hfile->Get("h_mapDepth3Error_HF");
407  Map_Ampl[1][4][4] = (TH2F *)hfile->Get("h_mapDepth4Error_HF");
408 
409  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
410  // if (sub==1) cHB->Divide(2,1);
411  if (sub == 1)
412  cHB->Divide(2, 2);
413  // if (sub==2) cHE->Divide(3,1);
414  if (sub == 2)
415  cHE->Divide(3, 3);
416  if (sub == 3)
417  cONE->Divide(1, 1);
418  // if (sub==4) cHF->Divide(2,1);
419  if (sub == 4)
420  cHF->Divide(2, 2);
421  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
422  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
423  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
424  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
425  if (sub == 1)
426  cHB->cd(k);
427  if (sub == 2)
428  cHE->cd(k);
429  if (sub == 3)
430  cONE->cd(k - 3);
431  if (sub == 4)
432  cHF->cd(k);
433  Map_Ampl[1][sub][k]->Divide(Map_Ampl[1][sub][k], Map_SUB[sub][k], 1, 1, "B");
434  gPad->SetGridy();
435  gPad->SetGridx();
436  gPad->SetLogz();
437  if (sub == 1)
438  sprintf(str, "HB, Depth%d \b", k);
439  if (sub == 2)
440  sprintf(str, "HE, Depth%d \b", k);
441  if (sub == 3)
442  sprintf(str, "HO, Depth%d \b", k);
443  if (sub == 4)
444  sprintf(str, "HF, Depth%d \b", k);
445  Map_Ampl[1][sub][k]->SetTitle(str);
446  Map_Ampl[1][sub][k]->SetXTitle("#eta \b");
447  Map_Ampl[1][sub][k]->SetYTitle("#phi \b");
448  Map_Ampl[1][sub][k]->SetZTitle("Rate \b");
449  if (sub == 3)
450  Map_Ampl[1][sub][k]->SetTitleOffset(0.8, "Z");
451  Map_Ampl[1][sub][k]->Draw("COLZ");
452  Map_Ampl[1][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
453  Map_Ampl[1][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
454  if (sub == 1) {
455  cHB->Modified();
456  cHB->Update();
457  }
458  if (sub == 2) {
459  cHE->Modified();
460  cHE->Update();
461  }
462  if (sub == 3) {
463  cONE->Modified();
464  cONE->Update();
465  }
466  if (sub == 4) {
467  cHF->Modified();
468  cHF->Update();
469  }
470  } //end depth
471 
472  if (sub == 1) {
473  cHB->Print("MapRateCapIDHB.png");
474  cHB->Clear();
475  }
476  if (sub == 2) {
477  cHE->Print("MapRateCapIDHE.png");
478  cHE->Clear();
479  }
480  if (sub == 3) {
481  cONE->Print("MapRateCapIDHO.png");
482  cONE->Clear();
483  }
484  if (sub == 4) {
485  cHF->Print("MapRateCapIDHF.png");
486  cHF->Clear();
487  }
488  } // end sub
489 
490  //+++++++++++++++++++++++++++++
491  //Test 2 (Am) ADC amplitude
492  //+++++++++++++++++++++++++++++
493 
494  Map_Ampl[2][1][1] = (TH2F *)hfile->Get("h_mapDepth1ADCAmpl225_HB");
495  Map_Ampl[2][1][2] = (TH2F *)hfile->Get("h_mapDepth2ADCAmpl225_HB");
496  Map_Ampl[2][2][1] = (TH2F *)hfile->Get("h_mapDepth1ADCAmpl225_HE");
497  Map_Ampl[2][2][2] = (TH2F *)hfile->Get("h_mapDepth2ADCAmpl225_HE");
498  Map_Ampl[2][2][3] = (TH2F *)hfile->Get("h_mapDepth3ADCAmpl225_HE");
499  Map_Ampl[2][3][4] = (TH2F *)hfile->Get("h_mapDepth4ADCAmpl225_HO");
500  Map_Ampl[2][4][1] = (TH2F *)hfile->Get("h_mapDepth1ADCAmpl225_HF");
501  Map_Ampl[2][4][2] = (TH2F *)hfile->Get("h_mapDepth2ADCAmpl225_HF");
502 
503  Map_Ampl[2][1][3] = (TH2F *)hfile->Get("h_mapDepth3ADCAmpl225_HB");
504  Map_Ampl[2][1][4] = (TH2F *)hfile->Get("h_mapDepth4ADCAmpl225_HB");
505  Map_Ampl[2][2][4] = (TH2F *)hfile->Get("h_mapDepth4ADCAmpl225_HE");
506  Map_Ampl[2][2][5] = (TH2F *)hfile->Get("h_mapDepth5ADCAmpl225_HE");
507  Map_Ampl[2][2][6] = (TH2F *)hfile->Get("h_mapDepth6ADCAmpl225_HE");
508  Map_Ampl[2][2][7] = (TH2F *)hfile->Get("h_mapDepth7ADCAmpl225_HE");
509  Map_Ampl[2][4][3] = (TH2F *)hfile->Get("h_mapDepth3ADCAmpl225_HF");
510  Map_Ampl[2][4][4] = (TH2F *)hfile->Get("h_mapDepth4ADCAmpl225_HF");
511 
512  HistAmpl[2][1] = (TH1F *)hfile->Get("h_ADCAmpl_HB");
513  HistAmpl[2][2] = (TH1F *)hfile->Get("h_ADCAmpl_HE");
514  HistAmpl[2][3] = (TH1F *)hfile->Get("h_ADCAmpl_HO");
515  HistAmpl[2][4] = (TH1F *)hfile->Get("h_ADCAmpl_HF");
516 
517  //+++++++++++++++++++++++++++++
518  //Test 3 (Wm) Rate of RMS
519  //+++++++++++++++++++++++++++++
520 
521  Map_Ampl[3][1][1] = (TH2F *)hfile->Get("h_mapDepth1Amplitude225_HB");
522  Map_Ampl[3][1][2] = (TH2F *)hfile->Get("h_mapDepth2Amplitude225_HB");
523  Map_Ampl[3][2][1] = (TH2F *)hfile->Get("h_mapDepth1Amplitude225_HE");
524  Map_Ampl[3][2][2] = (TH2F *)hfile->Get("h_mapDepth2Amplitude225_HE");
525  Map_Ampl[3][2][3] = (TH2F *)hfile->Get("h_mapDepth3Amplitude225_HE");
526  Map_Ampl[3][3][4] = (TH2F *)hfile->Get("h_mapDepth4Amplitude225_HO");
527  Map_Ampl[3][4][1] = (TH2F *)hfile->Get("h_mapDepth1Amplitude225_HF");
528  Map_Ampl[3][4][2] = (TH2F *)hfile->Get("h_mapDepth2Amplitude225_HF");
529 
530  Map_Ampl[3][1][3] = (TH2F *)hfile->Get("h_mapDepth3Amplitude225_HB");
531  Map_Ampl[3][1][4] = (TH2F *)hfile->Get("h_mapDepth4Amplitude225_HB");
532  Map_Ampl[3][2][4] = (TH2F *)hfile->Get("h_mapDepth4Amplitude225_HE");
533  Map_Ampl[3][2][5] = (TH2F *)hfile->Get("h_mapDepth5Amplitude225_HE");
534  Map_Ampl[3][2][6] = (TH2F *)hfile->Get("h_mapDepth6Amplitude225_HE");
535  Map_Ampl[3][2][7] = (TH2F *)hfile->Get("h_mapDepth7Amplitude225_HE");
536  Map_Ampl[3][4][3] = (TH2F *)hfile->Get("h_mapDepth3Amplitude225_HF");
537  Map_Ampl[3][4][4] = (TH2F *)hfile->Get("h_mapDepth4Amplitude225_HF");
538 
539  HistAmpl[3][1] = (TH1F *)hfile->Get("h_Amplitude_HB");
540  HistAmpl[3][2] = (TH1F *)hfile->Get("h_Amplitude_HE");
541  HistAmpl[3][3] = (TH1F *)hfile->Get("h_Amplitude_HO");
542  HistAmpl[3][4] = (TH1F *)hfile->Get("h_Amplitude_HF");
543 
544  //+++++++++++++++++++++++++++++
545  //Test 4 (Rm) Rate of ratio 4 near max TS/ All TS
546  //+++++++++++++++++++++++++++++
547 
548  Map_Ampl[4][1][1] = (TH2F *)hfile->Get("h_mapDepth1Ampl047_HB");
549  Map_Ampl[4][1][2] = (TH2F *)hfile->Get("h_mapDepth2Ampl047_HB");
550  Map_Ampl[4][2][1] = (TH2F *)hfile->Get("h_mapDepth1Ampl047_HE");
551  Map_Ampl[4][2][2] = (TH2F *)hfile->Get("h_mapDepth2Ampl047_HE");
552  Map_Ampl[4][2][3] = (TH2F *)hfile->Get("h_mapDepth3Ampl047_HE");
553  Map_Ampl[4][3][4] = (TH2F *)hfile->Get("h_mapDepth4Ampl047_HO");
554  Map_Ampl[4][4][1] = (TH2F *)hfile->Get("h_mapDepth1Ampl047_HF");
555  Map_Ampl[4][4][2] = (TH2F *)hfile->Get("h_mapDepth2Ampl047_HF");
556 
557  Map_Ampl[4][1][3] = (TH2F *)hfile->Get("h_mapDepth3Ampl047_HB");
558  Map_Ampl[4][1][4] = (TH2F *)hfile->Get("h_mapDepth4Ampl047_HB");
559  Map_Ampl[4][2][4] = (TH2F *)hfile->Get("h_mapDepth4Ampl047_HE");
560  Map_Ampl[4][2][5] = (TH2F *)hfile->Get("h_mapDepth5Ampl047_HE");
561  Map_Ampl[4][2][6] = (TH2F *)hfile->Get("h_mapDepth6Ampl047_HE");
562  Map_Ampl[4][2][7] = (TH2F *)hfile->Get("h_mapDepth7Ampl047_HE");
563  Map_Ampl[4][4][3] = (TH2F *)hfile->Get("h_mapDepth3Ampl047_HF");
564  Map_Ampl[4][4][4] = (TH2F *)hfile->Get("h_mapDepth4Ampl047_HF");
565 
566  HistAmpl[4][1] = (TH1F *)hfile->Get("h_Ampl_HB");
567  HistAmpl[4][2] = (TH1F *)hfile->Get("h_Ampl_HE");
568  HistAmpl[4][3] = (TH1F *)hfile->Get("h_Ampl_HO");
569  HistAmpl[4][4] = (TH1F *)hfile->Get("h_Ampl_HF");
570 
571  //+++++++++++++++++++++++++++++
572  //Test 5 (TNm) Mean position in 1-8 TS range
573  //+++++++++++++++++++++++++++++
574 
575  Map_Ampl[5][1][1] = (TH2F *)hfile->Get("h_mapDepth1TSmeanA225_HB");
576  Map_Ampl[5][1][2] = (TH2F *)hfile->Get("h_mapDepth2TSmeanA225_HB");
577  Map_Ampl[5][2][1] = (TH2F *)hfile->Get("h_mapDepth1TSmeanA225_HE");
578  Map_Ampl[5][2][2] = (TH2F *)hfile->Get("h_mapDepth2TSmeanA225_HE");
579  Map_Ampl[5][2][3] = (TH2F *)hfile->Get("h_mapDepth3TSmeanA225_HE");
580  Map_Ampl[5][3][4] = (TH2F *)hfile->Get("h_mapDepth4TSmeanA225_HO");
581  Map_Ampl[5][4][1] = (TH2F *)hfile->Get("h_mapDepth1TSmeanA225_HF");
582  Map_Ampl[5][4][2] = (TH2F *)hfile->Get("h_mapDepth2TSmeanA225_HF");
583 
584  Map_Ampl[5][1][3] = (TH2F *)hfile->Get("h_mapDepth3TSmeanA225_HB");
585  Map_Ampl[5][1][4] = (TH2F *)hfile->Get("h_mapDepth4TSmeanA225_HB");
586  Map_Ampl[5][2][4] = (TH2F *)hfile->Get("h_mapDepth4TSmeanA225_HE");
587  Map_Ampl[5][2][5] = (TH2F *)hfile->Get("h_mapDepth5TSmeanA225_HE");
588  Map_Ampl[5][2][6] = (TH2F *)hfile->Get("h_mapDepth6TSmeanA225_HE");
589  Map_Ampl[5][2][7] = (TH2F *)hfile->Get("h_mapDepth7TSmeanA225_HE");
590  Map_Ampl[5][4][3] = (TH2F *)hfile->Get("h_mapDepth3TSmeanA225_HF");
591  Map_Ampl[5][4][4] = (TH2F *)hfile->Get("h_mapDepth4TSmeanA225_HF");
592 
593  HistAmpl[5][1] = (TH1F *)hfile->Get("h_TSmeanA_HB");
594  HistAmpl[5][2] = (TH1F *)hfile->Get("h_TSmeanA_HE");
595  HistAmpl[5][3] = (TH1F *)hfile->Get("h_TSmeanA_HO");
596  HistAmpl[5][4] = (TH1F *)hfile->Get("h_TSmeanA_HF");
597 
598  //+++++++++++++++++++++++++++++
599  //Test 6 (TXm) Maximum position in 1-8 TS range
600  //+++++++++++++++++++++++++++++
601 
602  Map_Ampl[6][1][1] = (TH2F *)hfile->Get("h_mapDepth1TSmaxA225_HB");
603  Map_Ampl[6][1][2] = (TH2F *)hfile->Get("h_mapDepth2TSmaxA225_HB");
604  Map_Ampl[6][2][1] = (TH2F *)hfile->Get("h_mapDepth1TSmaxA225_HE");
605  Map_Ampl[6][2][2] = (TH2F *)hfile->Get("h_mapDepth2TSmaxA225_HE");
606  Map_Ampl[6][2][3] = (TH2F *)hfile->Get("h_mapDepth3TSmaxA225_HE");
607  Map_Ampl[6][3][4] = (TH2F *)hfile->Get("h_mapDepth4TSmaxA225_HO");
608  Map_Ampl[6][4][1] = (TH2F *)hfile->Get("h_mapDepth1TSmaxA225_HF");
609  Map_Ampl[6][4][2] = (TH2F *)hfile->Get("h_mapDepth2TSmaxA225_HF");
610 
611  Map_Ampl[6][1][3] = (TH2F *)hfile->Get("h_mapDepth3TSmaxA225_HB");
612  Map_Ampl[6][1][4] = (TH2F *)hfile->Get("h_mapDepth4TSmaxA225_HB");
613  Map_Ampl[6][2][4] = (TH2F *)hfile->Get("h_mapDepth4TSmaxA225_HE");
614  Map_Ampl[6][2][5] = (TH2F *)hfile->Get("h_mapDepth5TSmaxA225_HE");
615  Map_Ampl[6][2][6] = (TH2F *)hfile->Get("h_mapDepth6TSmaxA225_HE");
616  Map_Ampl[6][2][7] = (TH2F *)hfile->Get("h_mapDepth7TSmaxA225_HE");
617  Map_Ampl[6][4][3] = (TH2F *)hfile->Get("h_mapDepth3TSmaxA225_HF");
618  Map_Ampl[6][4][4] = (TH2F *)hfile->Get("h_mapDepth4TSmaxA225_HF");
619 
620  HistAmpl[6][1] = (TH1F *)hfile->Get("h_TSmaxA_HB");
621  HistAmpl[6][2] = (TH1F *)hfile->Get("h_TSmaxA_HE");
622  HistAmpl[6][3] = (TH1F *)hfile->Get("h_TSmaxA_HO");
623  HistAmpl[6][4] = (TH1F *)hfile->Get("h_TSmaxA_HF");
624 
625  for (int test = 2; test <= 6; test++) { //Test: 2-Am, 3-Wm, 4-Rm, 5-TNm, 6-TXm,
626  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
627  // if (sub==1) cHB->Divide(2,1);
628  if (sub == 1)
629  cHB->Divide(2, 2);
630  // if (sub==2) cHE->Divide(3,1);
631  if (sub == 2)
632  cHE->Divide(3, 3);
633  if (sub == 3)
634  cONE->Divide(1, 1);
635  // if (sub==4) cHF->Divide(2,1);
636  if (sub == 4)
637  cHF->Divide(2, 2);
638  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
639  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
640  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
641  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
642  if (sub == 1)
643  cHB->cd(k);
644  if (sub == 2)
645  cHE->cd(k);
646  if (sub == 3)
647  cONE->cd(k - 3);
648  if (sub == 4)
649  cHF->cd(k);
650  Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_SUB[sub][k], 1, 1, "B");
651  gPad->SetGridy();
652  gPad->SetGridx();
653  gPad->SetLogz();
654  if (sub == 1)
655  sprintf(str, "HB, Depth%d \b", k);
656  if (sub == 2)
657  sprintf(str, "HE, Depth%d \b", k);
658  if (sub == 3)
659  sprintf(str, "HO, Depth%d \b", k);
660  if (sub == 4)
661  sprintf(str, "HF, Depth%d \b", k);
662  Map_Ampl[test][sub][k]->SetTitle(str);
663  Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
664  Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
665  Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
666  if (sub == 3)
667  Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
668  Map_Ampl[test][sub][k]->Draw("COLZ");
669  Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
670  Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
671  if (sub == 1) {
672  cHB->Modified();
673  cHB->Update();
674  }
675  if (sub == 2) {
676  cHE->Modified();
677  cHE->Update();
678  }
679  if (sub == 3) {
680  cONE->Modified();
681  cONE->Update();
682  }
683  if (sub == 4) {
684  cHF->Modified();
685  cHF->Update();
686  }
687  } //end depth
688  if (test == 2) {
689  if (sub == 1) {
690  cHB->Print("MapRateAmplHB.png");
691  cHB->Clear();
692  }
693  if (sub == 2) {
694  cHE->Print("MapRateAmplHE.png");
695  cHE->Clear();
696  }
697  if (sub == 3) {
698  cONE->Print("MapRateAmplHO.png");
699  cONE->Clear();
700  }
701  if (sub == 4) {
702  cHF->Print("MapRateAmplHF.png");
703  cHF->Clear();
704  }
705  }
706  if (test == 3) {
707  if (sub == 1) {
708  cHB->Print("MapRateRMSHB.png");
709  cHB->Clear();
710  }
711  if (sub == 2) {
712  cHE->Print("MapRateRMSHE.png");
713  cHE->Clear();
714  }
715  if (sub == 3) {
716  cONE->Print("MapRateRMSHO.png");
717  cONE->Clear();
718  }
719  if (sub == 4) {
720  cHF->Print("MapRateRMSHF.png");
721  cHF->Clear();
722  }
723  }
724  if (test == 4) {
725  if (sub == 1) {
726  cHB->Print("MapRate43TStoAllTSHB.png");
727  cHB->Clear();
728  }
729  if (sub == 2) {
730  cHE->Print("MapRate43TStoAllTSHE.png");
731  cHE->Clear();
732  }
733  if (sub == 3) {
734  cONE->Print("MapRate43TStoAllTSHO.png");
735  cONE->Clear();
736  }
737  if (sub == 4) {
738  cHF->Print("MapRate43TStoAllTSHF.png");
739  cHF->Clear();
740  }
741  }
742  if (test == 5) {
743  if (sub == 1) {
744  cHB->Print("MapRateMeanPosHB.png");
745  cHB->Clear();
746  }
747  if (sub == 2) {
748  cHE->Print("MapRateMeanPosHE.png");
749  cHE->Clear();
750  }
751  if (sub == 3) {
752  cONE->Print("MapRateMeanPosHO.png");
753  cONE->Clear();
754  }
755  if (sub == 4) {
756  cHF->Print("MapRateMeanPosHF.png");
757  cHF->Clear();
758  }
759  }
760  if (test == 6) {
761  if (sub == 1) {
762  cHB->Print("MapRateMaxPosHB.png");
763  cHB->Clear();
764  }
765  if (sub == 2) {
766  cHE->Print("MapRateMaxPosHE.png");
767  cHE->Clear();
768  }
769  if (sub == 3) {
770  cONE->Print("MapRateMaxPosHO.png");
771  cONE->Clear();
772  }
773  if (sub == 4) {
774  cHF->Print("MapRateMaxPosHF.png");
775  cHF->Clear();
776  }
777  }
778 
779  // cONE->Divide(1,1);
780  cONE->Divide(3, 1);
781  if (test == 2 && sub == 2) {
782  cONE->cd(2);
783  TH1F *kjkjkhj2 = (TH1F *)hfile->Get("h_AmplitudeHEtest1");
784  kjkjkhj2->Draw("");
785  kjkjkhj2->SetTitle("HE, All Depth: shunt1");
786  cONE->cd(3);
787  TH1F *kjkjkhj3 = (TH1F *)hfile->Get("h_AmplitudeHEtest6");
788  kjkjkhj3->Draw("");
789  kjkjkhj3->SetTitle("HE, All Depth: shunt6");
790  }
791  if (test == 2 && sub == 1) {
792  cONE->cd(2);
793  TH1F *kjkjkhb2 = (TH1F *)hfile->Get("h_AmplitudeHBtest1");
794  kjkjkhb2->Draw("");
795  kjkjkhb2->SetTitle("HB, All Depth: shunt1");
796  cONE->cd(3);
797  TH1F *kjkjkhb3 = (TH1F *)hfile->Get("h_AmplitudeHBtest6");
798  kjkjkhb3->Draw("");
799  kjkjkhb3->SetTitle("HB, All Depth: shunt6");
800  }
801  cONE->cd(1);
802  gPad->SetGridy();
803  gPad->SetGridx();
804  gPad->SetLogy();
805  if (sub == 1)
806  HistAmpl[test][sub]->SetTitle("HB, All Depth: shunt6");
807  if (sub == 2)
808  HistAmpl[test][sub]->SetTitle("HE, All Depth: shunt6");
809  if (sub == 3)
810  HistAmpl[test][sub]->SetTitle("HO, All Depth");
811  if (sub == 4)
812  HistAmpl[test][sub]->SetTitle("HF, All Depth");
813  if (test == 2)
814  HistAmpl[test][sub]->SetXTitle("ADC Amlitude in each event & cell \b");
815  if (test == 3)
816  HistAmpl[test][sub]->SetXTitle("RMS in each event & cell \b");
817  if (test == 4)
818  HistAmpl[test][sub]->SetXTitle("Ratio in each event & cell \b");
819  if (test == 5)
820  HistAmpl[test][sub]->SetXTitle("Mean TS position in each event & cell \b");
821  if (test == 6)
822  HistAmpl[test][sub]->SetXTitle("Max TS position in each event & cell \b");
823  HistAmpl[test][sub]->SetYTitle("Number of cell-events \b");
824  HistAmpl[test][sub]->SetLineColor(4);
825  HistAmpl[test][sub]->SetLineWidth(2);
826  HistAmpl[test][sub]->SetTitleOffset(1.4, "Y");
827  HistAmpl[test][sub]->Draw("");
828  // // HistAmpl[test][sub]->GetYaxis()->SetRangeUser(1., 100.);
829  // if (test==2) {gPad->SetLogx(); HistAmpl[test][sub]->GetXaxis()->SetRangeUser(1., 10000.);}
830  if (test == 2) {
831  gPad->SetLogx();
832  }
833  if (test == 3)
834  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 5.); // width
835  if (test == 4)
836  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 1.); // R
837  if (test == 5)
838  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.); //Tn
839  if (test == 6)
840  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.); //Tx
841  cONE->Modified();
842  cONE->Update();
843  double min_x[] = {MIN_M[test][sub], MIN_M[test][sub]};
844  double min_y[] = {0., 100000000.};
845  TGraph *MIN = new TGraph(2, min_x, min_y);
846  MIN->SetLineStyle(2);
847  MIN->SetLineColor(2);
848  MIN->SetLineWidth(2 + 100 * 100);
849  MIN->SetFillStyle(3005);
850  MIN->SetFillColor(2);
851  MIN->Draw("L");
852  double max_x[] = {MAX_M[test][sub], MAX_M[test][sub]};
853  double max_y[] = {0., 100000000.};
854  TGraph *MAX = new TGraph(2, max_x, max_y);
855  MAX->SetLineStyle(2);
856  MAX->SetLineColor(2);
857  MAX->SetLineWidth(-2 - 100 * 100);
858  MAX->SetFillStyle(3004);
859  MAX->SetFillColor(2);
860  MAX->Draw("L");
861  if (test == 2) {
862  if (sub == 1) {
863  cONE->Print("HistAmplHB.png");
864  cONE->Clear();
865  }
866  if (sub == 2) {
867  cONE->Print("HistAmplHE.png");
868  cONE->Clear();
869  }
870  if (sub == 3) {
871  cONE->Print("HistAmplHO.png");
872  cONE->Clear();
873  }
874  if (sub == 4) {
875  cONE->Print("HistAmplHF.png");
876  cONE->Clear();
877  }
878  }
879  if (test == 3) {
880  if (sub == 1) {
881  cONE->Print("HistRMSHB.png");
882  cONE->Clear();
883  }
884  if (sub == 2) {
885  cONE->Print("HistRMSHE.png");
886  cONE->Clear();
887  }
888  if (sub == 3) {
889  cONE->Print("HistRMSHO.png");
890  cONE->Clear();
891  }
892  if (sub == 4) {
893  cONE->Print("HistRMSHF.png");
894  cONE->Clear();
895  }
896  }
897  if (test == 4) {
898  if (sub == 1) {
899  cONE->Print("Hist43TStoAllTSHB.png");
900  cONE->Clear();
901  }
902  if (sub == 2) {
903  cONE->Print("Hist43TStoAllTSHE.png");
904  cONE->Clear();
905  }
906  if (sub == 3) {
907  cONE->Print("Hist43TStoAllTSHO.png");
908  cONE->Clear();
909  }
910  if (sub == 4) {
911  cONE->Print("Hist43TStoAllTSHF.png");
912  cONE->Clear();
913  }
914  }
915  if (test == 5) {
916  if (sub == 1) {
917  cONE->Print("HistMeanPosHB.png");
918  cONE->Clear();
919  }
920  if (sub == 2) {
921  cONE->Print("HistMeanPosHE.png");
922  cONE->Clear();
923  }
924  if (sub == 3) {
925  cONE->Print("HistMeanPosHO.png");
926  cONE->Clear();
927  }
928  if (sub == 4) {
929  cONE->Print("HistMeanPosHF.png");
930  cONE->Clear();
931  }
932  }
933  if (test == 6) {
934  if (sub == 1) {
935  cONE->Print("HistMaxPosHB.png");
936  cONE->Clear();
937  }
938  if (sub == 2) {
939  cONE->Print("HistMaxPosHE.png");
940  cONE->Clear();
941  }
942  if (sub == 3) {
943  cONE->Print("HistMaxPosHO.png");
944  cONE->Clear();
945  }
946  if (sub == 4) {
947  cONE->Print("HistMaxPosHF.png");
948  cONE->Clear();
949  }
950  }
951  } // end sub
952  } //end test
953 
954  TH2F *Map_Calib[5][5]; // 2d histogramm for subdet, depth
955 
956  Map_Calib[1][1] = (TH2F *)hfile->Get("h_map_HB");
957  Map_Calib[1][2] = (TH2F *)hfile->Get("h_map_HB");
958  Map_Calib[2][1] = (TH2F *)hfile->Get("h_map_HE");
959  Map_Calib[2][2] = (TH2F *)hfile->Get("h_map_HE");
960  Map_Calib[2][3] = (TH2F *)hfile->Get("h_map_HE");
961  Map_Calib[3][4] = (TH2F *)hfile->Get("h_map_HO");
962  Map_Calib[4][1] = (TH2F *)hfile->Get("h_map_HF");
963  Map_Calib[4][2] = (TH2F *)hfile->Get("h_map_HF");
964 
965  //+++++++++++++++++++++++++++++
966  //Test 0 Entries
967  //+++++++++++++++++++++++++++++
968 
969  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
970  // if (sub==1) cHB->Divide(2,1);
971  // if (sub==2) cHE->Divide(3,1);
972  cONE->Divide(1, 1);
973  // if (sub==4) cHB->Divide(2,1);
974  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
975  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
976  // for (int k=k_min[sub];k<=k_max[sub];k++) { //Depth
977  int k = 1;
978  cONE->cd(k);
979  // if (sub==1) cHB->cd(k);
980  // if (sub==2) cHE->cd(k);
981  if (sub == 3)
982  k = 4;
983  // if (sub==4) cHB->cd(k);
984  gPad->SetGridy();
985  gPad->SetGridx();
986  gPad->SetLogz();
987  if (sub == 1)
988  sprintf(str, "HB");
989  if (sub == 2)
990  sprintf(str, "HE");
991  if (sub == 3)
992  sprintf(str, "HO");
993  if (sub == 4)
994  sprintf(str, "HF");
995  Map_Calib[sub][k]->SetTitle(str);
996  Map_Calib[sub][k]->SetXTitle("#eta \b");
997  Map_Calib[sub][k]->SetYTitle("#phi \b");
998  Map_Calib[sub][k]->SetZTitle("Number of events\b");
999  if (sub == 3)
1000  Map_Calib[sub][k]->SetTitleOffset(0.8, "Z");
1001  Map_Calib[sub][k]->Draw("COLZ");
1002  Map_Calib[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1003  // Map_Calib[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
1004  // if (sub==1) {cHB->Modified(); cHB->Update();}
1005  // if (sub==2) {cHE->Modified(); cHE->Update();}
1006  cONE->Modified();
1007  cONE->Update();
1008  // if (sub==4) {cHB->Modified(); cHB->Update();}
1009  // }//end depth
1010 
1011  if (sub == 1) {
1012  cONE->Print("MapRateCalibEntryHB.png");
1013  cONE->Clear();
1014  }
1015  if (sub == 2) {
1016  cONE->Print("MapRateCalibEntryHE.png");
1017  cONE->Clear();
1018  }
1019  if (sub == 3) {
1020  cONE->Print("MapRateCalibEntryHO.png");
1021  cONE->Clear();
1022  }
1023  if (sub == 4) {
1024  cONE->Print("MapRateCalibEntryHF.png");
1025  cONE->Clear();
1026  }
1027  } // end sub
1028 
1029  //+++++++++++++++++++++++++++++
1030  //Test 11 (Cc) Rate of Cap ID errors for calibration channels
1031  //+++++++++++++++++++++++++++++
1032 
1033  Map_Ampl[11][1][1] = (TH2F *)hfile->Get("h_mapCapCalib047_HB");
1034  Map_Ampl[11][1][2] = (TH2F *)hfile->Get("h_mapCapCalib047_HB");
1035  Map_Ampl[11][2][1] = (TH2F *)hfile->Get("h_mapCapCalib047_HE");
1036  Map_Ampl[11][2][2] = (TH2F *)hfile->Get("h_mapCapCalib047_HE");
1037  Map_Ampl[11][2][3] = (TH2F *)hfile->Get("h_mapCapCalib047_HE");
1038  Map_Ampl[11][3][4] = (TH2F *)hfile->Get("h_mapCapCalib047_HO");
1039  Map_Ampl[11][4][1] = (TH2F *)hfile->Get("h_mapCapCalib047_HF");
1040  Map_Ampl[11][4][2] = (TH2F *)hfile->Get("h_mapCapCalib047_HF");
1041 
1042  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
1043  // if (sub==1) cHB->Divide(2,1);
1044  // if (sub==2) cHE->Divide(3,1);
1045  cONE->Divide(1, 1);
1046  // if (sub==4) cHB->Divide(2,1);
1047  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1048  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1049  // for (int k=k_min[sub];k<=k_max[sub];k++) { //Depth
1050  int k = 1;
1051  cONE->cd(k);
1052  // if (sub==1) cHB->cd(k);
1053  // if (sub==2) cHE->cd(k);
1054  if (sub == 3)
1055  k = 4;
1056  // if (sub==4) cHB->cd(k);
1057  Map_Ampl[11][sub][k]->Divide(Map_Ampl[11][sub][k], Map_Calib[sub][k], 1, 1, "B");
1058  gPad->SetGridy();
1059  gPad->SetGridx();
1060  gPad->SetLogz();
1061  if (sub == 1)
1062  sprintf(str, "HB");
1063  if (sub == 2)
1064  sprintf(str, "HE");
1065  if (sub == 3)
1066  sprintf(str, "HO");
1067  if (sub == 4)
1068  sprintf(str, "HF");
1069  Map_Ampl[11][sub][k]->SetTitle(str);
1070  Map_Ampl[11][sub][k]->SetXTitle("#eta \b");
1071  Map_Ampl[11][sub][k]->SetYTitle("#phi \b");
1072  Map_Ampl[11][sub][k]->SetZTitle("Rate \b");
1073  Map_Ampl[11][sub][k]->SetTitleOffset(0.75, "Z");
1074  Map_Ampl[11][sub][k]->Draw("COLZ");
1075  Map_Ampl[11][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1076  Map_Ampl[11][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
1077  // if (sub==1) {cHB->Modified(); cHB->Update();}
1078  // if (sub==2) {cHE->Modified(); cHE->Update();}
1079  cONE->Modified();
1080  cONE->Update();
1081  // if (sub==4) {cHB->Modified(); cHB->Update();}
1082  // }//end depth
1083 
1084  if (sub == 1) {
1085  cONE->Print("MapRateCapCalibHB.png");
1086  cONE->Clear();
1087  }
1088  if (sub == 2) {
1089  cONE->Print("MapRateCapCalibHE.png");
1090  cONE->Clear();
1091  }
1092  if (sub == 3) {
1093  cONE->Print("MapRateCapCalibHO.png");
1094  cONE->Clear();
1095  }
1096  if (sub == 4) {
1097  cONE->Print("MapRateCapCalibHF.png");
1098  cONE->Clear();
1099  }
1100  } // end sub
1101 
1102  //+++++++++++++++++++++++++++++
1103  //Test 12 (Ac) ADC amplitude for calibration chanels
1104  //+++++++++++++++++++++++++++++
1105 
1106  Map_Ampl[12][1][1] = (TH2F *)hfile->Get("h_mapADCCalib047_HB");
1107  Map_Ampl[12][1][2] = (TH2F *)hfile->Get("h_mapADCCalib047_HB");
1108  Map_Ampl[12][2][1] = (TH2F *)hfile->Get("h_mapADCCalib047_HE");
1109  Map_Ampl[12][2][2] = (TH2F *)hfile->Get("h_mapADCCalib047_HE");
1110  Map_Ampl[12][2][3] = (TH2F *)hfile->Get("h_mapADCCalib047_HE");
1111  Map_Ampl[12][3][4] = (TH2F *)hfile->Get("h_mapADCCalib047_HO");
1112  Map_Ampl[12][4][1] = (TH2F *)hfile->Get("h_mapADCCalib047_HF");
1113  Map_Ampl[12][4][2] = (TH2F *)hfile->Get("h_mapADCCalib047_HF");
1114 
1115  HistAmpl[12][1] = (TH1F *)hfile->Get("h_ADCCalib_HB");
1116  HistAmpl[12][2] = (TH1F *)hfile->Get("h_ADCCalib_HE");
1117  HistAmpl[12][3] = (TH1F *)hfile->Get("h_ADCCalib_HO");
1118  HistAmpl[12][4] = (TH1F *)hfile->Get("h_ADCCalib_HF");
1119 
1120  //+++++++++++++++++++++++++++++
1121  //Test 13 (Wc) Rate of RMS
1122  //+++++++++++++++++++++++++++++
1123 
1124  Map_Ampl[13][1][1] = (TH2F *)hfile->Get("h_mapWidthCalib047_HB");
1125  Map_Ampl[13][1][2] = (TH2F *)hfile->Get("h_mapWidthCalib047_HB");
1126  Map_Ampl[13][2][1] = (TH2F *)hfile->Get("h_mapWidthCalib047_HE");
1127  Map_Ampl[13][2][2] = (TH2F *)hfile->Get("h_mapWidthCalib047_HE");
1128  Map_Ampl[13][2][3] = (TH2F *)hfile->Get("h_mapWidthCalib047_HE");
1129  Map_Ampl[13][3][4] = (TH2F *)hfile->Get("h_mapWidthCalib047_HO");
1130  Map_Ampl[13][4][1] = (TH2F *)hfile->Get("h_mapWidthCalib047_HF");
1131  Map_Ampl[13][4][2] = (TH2F *)hfile->Get("h_mapWidthCalib047_HF");
1132 
1133  HistAmpl[13][1] = (TH1F *)hfile->Get("h_WidthCalib_HB");
1134  HistAmpl[13][2] = (TH1F *)hfile->Get("h_WidthCalib_HE");
1135  HistAmpl[13][3] = (TH1F *)hfile->Get("h_WidthCalib_HO");
1136  HistAmpl[13][4] = (TH1F *)hfile->Get("h_WidthCalib_HF");
1137 
1138  //+++++++++++++++++++++++++++++
1139  //Test 14 (Rc) Rate of ratio 4 near max TS/ All TS
1140  //+++++++++++++++++++++++++++++
1141 
1142  Map_Ampl[14][1][1] = (TH2F *)hfile->Get("h_mapRatioCalib047_HB");
1143  Map_Ampl[14][1][2] = (TH2F *)hfile->Get("h_mapRatioCalib047_HB");
1144  Map_Ampl[14][2][1] = (TH2F *)hfile->Get("h_mapRatioCalib047_HE");
1145  Map_Ampl[14][2][2] = (TH2F *)hfile->Get("h_mapRatioCalib047_HE");
1146  Map_Ampl[14][2][3] = (TH2F *)hfile->Get("h_mapRatioCalib047_HE");
1147  Map_Ampl[14][3][4] = (TH2F *)hfile->Get("h_mapRatioCalib047_HO");
1148  Map_Ampl[14][4][1] = (TH2F *)hfile->Get("h_mapRatioCalib047_HF");
1149  Map_Ampl[14][4][2] = (TH2F *)hfile->Get("h_mapRatioCalib047_HF");
1150 
1151  HistAmpl[14][1] = (TH1F *)hfile->Get("h_RatioCalib_HB");
1152  HistAmpl[14][2] = (TH1F *)hfile->Get("h_RatioCalib_HE");
1153  HistAmpl[14][3] = (TH1F *)hfile->Get("h_RatioCalib_HO");
1154  HistAmpl[14][4] = (TH1F *)hfile->Get("h_RatioCalib_HF");
1155 
1156  //+++++++++++++++++++++++++++++
1157  //Test 15 (TNc) Mean position in 1-8 TS range
1158  //+++++++++++++++++++++++++++++
1159 
1160  Map_Ampl[15][1][1] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HB");
1161  Map_Ampl[15][1][2] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HB");
1162  Map_Ampl[15][2][1] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HE");
1163  Map_Ampl[15][2][2] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HE");
1164  Map_Ampl[15][2][3] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HE");
1165  Map_Ampl[15][3][4] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HO");
1166  Map_Ampl[15][4][1] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HF");
1167  Map_Ampl[15][4][2] = (TH2F *)hfile->Get("h_mapTSmeanCalib047_HF");
1168 
1169  HistAmpl[15][1] = (TH1F *)hfile->Get("h_TSmeanCalib_HB");
1170  HistAmpl[15][2] = (TH1F *)hfile->Get("h_TSmeanCalib_HE");
1171  HistAmpl[15][3] = (TH1F *)hfile->Get("h_TSmeanCalib_HO");
1172  HistAmpl[15][4] = (TH1F *)hfile->Get("h_TSmeanCalib_HF");
1173 
1174  //+++++++++++++++++++++++++++++
1175  //Test 16 (TXc) Maximum position in 1-8 TS range
1176  //+++++++++++++++++++++++++++++
1177 
1178  Map_Ampl[16][1][1] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HB");
1179  Map_Ampl[16][1][2] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HB");
1180  Map_Ampl[16][2][1] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HE");
1181  Map_Ampl[16][2][2] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HE");
1182  Map_Ampl[16][2][3] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HE");
1183  Map_Ampl[16][3][4] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HO");
1184  Map_Ampl[16][4][1] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HF");
1185  Map_Ampl[16][4][2] = (TH2F *)hfile->Get("h_mapTSmaxCalib047_HF");
1186 
1187  HistAmpl[16][1] = (TH1F *)hfile->Get("h_TSmaxCalib_HB");
1188  HistAmpl[16][2] = (TH1F *)hfile->Get("h_TSmaxCalib_HE");
1189  HistAmpl[16][3] = (TH1F *)hfile->Get("h_TSmaxCalib_HO");
1190  HistAmpl[16][4] = (TH1F *)hfile->Get("h_TSmaxCalib_HF");
1191 
1192  for (int test = 12; test <= 16; test++) { //Test: 2-Am, 3-Wm, 4-Rm, 5-TNm, 6-TXm,
1193  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
1194  if (sub == 1)
1195  cONE->Divide(1, 1); //cHB->Divide(2,1);
1196  if (sub == 2)
1197  cONE->Divide(1, 1); //cHE->Divide(3,1);
1198  if (sub == 3)
1199  cONE->Divide(1, 1);
1200  if (sub == 4)
1201  cONE->Divide(1, 1); //cHB->Divide(2,1);
1202  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1203  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1204  // for (int k=k_min[sub];k<=k_max[sub];k++) { //Depth
1205  int k = 1;
1206  if (sub == 1) {
1207  k = 1;
1208  cONE->cd(k);
1209  } //cHB->cd(k); }
1210  if (sub == 2) {
1211  k = 1;
1212  cONE->cd(k);
1213  } //cHE->cd(k); }
1214  if (sub == 3) {
1215  k = 4;
1216  cONE->cd(k - 3);
1217  }
1218  if (sub == 4) {
1219  k = 1;
1220  cONE->cd(k);
1221  } //cHB->cd(k); }
1222  Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_Calib[sub][k], 1, 1, "B");
1223  gPad->SetGridy();
1224  gPad->SetGridx();
1225  gPad->SetLogz();
1226  if (sub == 1)
1227  sprintf(str, "HB");
1228  if (sub == 2)
1229  sprintf(str, "HE");
1230  if (sub == 3)
1231  sprintf(str, "HO");
1232  if (sub == 4)
1233  sprintf(str, "HF");
1234  Map_Ampl[test][sub][k]->SetTitle(str);
1235  Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
1236  Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
1237  Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
1238  Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
1239  Map_Ampl[test][sub][k]->Draw("COLZ");
1240  Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1241  Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.00001, 1.);
1242  // if (sub==1) {cHB->Modified(); cHB->Update();}
1243  // if (sub==2) {cHE->Modified(); cHE->Update();}
1244  cONE->Modified();
1245  cONE->Update();
1246  // if (sub==4) {cHB->Modified(); cHB->Update();}
1247  // }//end depth
1248  if (test == 12) {
1249  if (sub == 1) {
1250  cONE->Print("MapRateAmplCalibHB.png");
1251  cONE->Clear();
1252  }
1253  if (sub == 2) {
1254  cONE->Print("MapRateAmplCalibHE.png");
1255  cONE->Clear();
1256  }
1257  if (sub == 3) {
1258  cONE->Print("MapRateAmplCalibHO.png");
1259  cONE->Clear();
1260  }
1261  if (sub == 4) {
1262  cONE->Print("MapRateAmplCalibHF.png");
1263  cONE->Clear();
1264  }
1265  }
1266  if (test == 13) {
1267  if (sub == 1) {
1268  cONE->Print("MapRateRMSCalibHB.png");
1269  cONE->Clear();
1270  }
1271  if (sub == 2) {
1272  cONE->Print("MapRateRMSCalibHE.png");
1273  cONE->Clear();
1274  }
1275  if (sub == 3) {
1276  cONE->Print("MapRateRMSCalibHO.png");
1277  cONE->Clear();
1278  }
1279  if (sub == 4) {
1280  cONE->Print("MapRateRMSCalibHF.png");
1281  cONE->Clear();
1282  }
1283  }
1284  if (test == 14) {
1285  if (sub == 1) {
1286  cONE->Print("MapRate43TStoAllTSCalibHB.png");
1287  cONE->Clear();
1288  }
1289  if (sub == 2) {
1290  cONE->Print("MapRate43TStoAllTSCalibHE.png");
1291  cONE->Clear();
1292  }
1293  if (sub == 3) {
1294  cONE->Print("MapRate43TStoAllTSCalibHO.png");
1295  cONE->Clear();
1296  }
1297  if (sub == 4) {
1298  cONE->Print("MapRate43TStoAllTSCalibHF.png");
1299  cONE->Clear();
1300  }
1301  }
1302  if (test == 15) {
1303  if (sub == 1) {
1304  cONE->Print("MapRateMeanPosCalibHB.png");
1305  cONE->Clear();
1306  }
1307  if (sub == 2) {
1308  cONE->Print("MapRateMeanPosCalibHE.png");
1309  cONE->Clear();
1310  }
1311  if (sub == 3) {
1312  cONE->Print("MapRateMeanPosCalibHO.png");
1313  cONE->Clear();
1314  }
1315  if (sub == 4) {
1316  cONE->Print("MapRateMeanPosCalibHF.png");
1317  cONE->Clear();
1318  }
1319  }
1320  if (test == 16) {
1321  if (sub == 1) {
1322  cONE->Print("MapRateMaxPosCalibHB.png");
1323  cONE->Clear();
1324  }
1325  if (sub == 2) {
1326  cONE->Print("MapRateMaxPosCalibHE.png");
1327  cONE->Clear();
1328  }
1329  if (sub == 3) {
1330  cONE->Print("MapRateMaxPosCalibHO.png");
1331  cONE->Clear();
1332  }
1333  if (sub == 4) {
1334  cONE->Print("MapRateMaxPosCalibHF.png");
1335  cONE->Clear();
1336  }
1337  }
1338 
1339  cONE->Divide(1, 1);
1340  cONE->cd(1);
1341  gPad->SetGridy();
1342  gPad->SetGridx();
1343  gPad->SetLogy();
1344  if (sub == 1)
1345  HistAmpl[test][sub]->SetTitle("HB, All Depth");
1346  if (sub == 2)
1347  HistAmpl[test][sub]->SetTitle("HE, All Depth");
1348  if (sub == 3)
1349  HistAmpl[test][sub]->SetTitle("HO, All Depth");
1350  if (sub == 4)
1351  HistAmpl[test][sub]->SetTitle("HF, All Depth");
1352  if (test == 12)
1353  HistAmpl[test][sub]->SetXTitle("ADC Amlitude in each event & cell \b");
1354  if (test == 13)
1355  HistAmpl[test][sub]->SetXTitle("Amplitude RMS in each event & cell \b");
1356  if (test == 14)
1357  HistAmpl[test][sub]->SetXTitle("Ratio in each event & cell \b");
1358  if (test == 15)
1359  HistAmpl[test][sub]->SetXTitle("Mean TS position in each event & cell \b");
1360  if (test == 16)
1361  HistAmpl[test][sub]->SetXTitle("Max TS position in each event & cell \b");
1362  HistAmpl[test][sub]->SetYTitle("Number of cell-events \b");
1363  HistAmpl[test][sub]->SetLineColor(4);
1364  HistAmpl[test][sub]->SetLineWidth(2);
1365  HistAmpl[test][sub]->SetTitleOffset(1.4, "Y");
1366  HistAmpl[test][sub]->Draw("");
1367  // HistAmpl[test][sub]->GetYaxis()->SetRangeUser(1., 100.);
1368  if (test == 12) {
1369  gPad->SetLogx();
1370  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(1., 10000.);
1371  }
1372  if (test == 13)
1373  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 5.);
1374  if (test == 14)
1375  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 1.);
1376  if (test == 15)
1377  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.);
1378  if (test == 16)
1379  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.);
1380  cONE->Modified();
1381  cONE->Update();
1382  double min_x[] = {MIN_C[test - 10][sub], MIN_C[test - 10][sub]};
1383  double min_y[] = {0., 100000000.};
1384  TGraph *MIN = new TGraph(2, min_x, min_y);
1385  MIN->SetLineStyle(2);
1386  MIN->SetLineColor(2);
1387  MIN->SetLineWidth(2 + 100 * 100);
1388  MIN->SetFillStyle(3005);
1389  MIN->SetFillColor(2);
1390  MIN->Draw("L");
1391  double max_x[] = {MAX_C[test - 10][sub], MAX_C[test - 10][sub]};
1392  double max_y[] = {0., 100000000.};
1393  TGraph *MAX = new TGraph(2, max_x, max_y);
1394  MAX->SetLineStyle(2);
1395  MAX->SetLineColor(2);
1396  MAX->SetLineWidth(-2 - 100 * 100);
1397  MAX->SetFillStyle(3004);
1398  MAX->SetFillColor(2);
1399  MAX->Draw("L");
1400  if (test == 12) {
1401  if (sub == 1) {
1402  cONE->Print("HistAmplCalibHB.png");
1403  cONE->Clear();
1404  }
1405  if (sub == 2) {
1406  cONE->Print("HistAmplCalibHE.png");
1407  cONE->Clear();
1408  }
1409  if (sub == 3) {
1410  cONE->Print("HistAmplCalibHO.png");
1411  cONE->Clear();
1412  }
1413  if (sub == 4) {
1414  cONE->Print("HistAmplCalibHF.png");
1415  cONE->Clear();
1416  }
1417  }
1418  if (test == 13) {
1419  if (sub == 1) {
1420  cONE->Print("HistRMSCalibHB.png");
1421  cONE->Clear();
1422  }
1423  if (sub == 2) {
1424  cONE->Print("HistRMSCalibHE.png");
1425  cONE->Clear();
1426  }
1427  if (sub == 3) {
1428  cONE->Print("HistRMSCalibHO.png");
1429  cONE->Clear();
1430  }
1431  if (sub == 4) {
1432  cONE->Print("HistRMSCalibHF.png");
1433  cONE->Clear();
1434  }
1435  }
1436  if (test == 14) {
1437  if (sub == 1) {
1438  cONE->Print("Hist43TStoAllTSCalibHB.png");
1439  cONE->Clear();
1440  }
1441  if (sub == 2) {
1442  cONE->Print("Hist43TStoAllTSCalibHE.png");
1443  cONE->Clear();
1444  }
1445  if (sub == 3) {
1446  cONE->Print("Hist43TStoAllTSCalibHO.png");
1447  cONE->Clear();
1448  }
1449  if (sub == 4) {
1450  cONE->Print("Hist43TStoAllTSCalibHF.png");
1451  cONE->Clear();
1452  }
1453  }
1454  if (test == 15) {
1455  if (sub == 1) {
1456  cONE->Print("HistMeanPosCalibHB.png");
1457  cONE->Clear();
1458  }
1459  if (sub == 2) {
1460  cONE->Print("HistMeanPosCalibHE.png");
1461  cONE->Clear();
1462  }
1463  if (sub == 3) {
1464  cONE->Print("HistMeanPosCalibHO.png");
1465  cONE->Clear();
1466  }
1467  if (sub == 4) {
1468  cONE->Print("HistMeanPosCalibHF.png");
1469  cONE->Clear();
1470  }
1471  }
1472  if (test == 16) {
1473  if (sub == 1) {
1474  cONE->Print("HistMaxPosCalibHB.png");
1475  cONE->Clear();
1476  }
1477  if (sub == 2) {
1478  cONE->Print("HistMaxPosCalibHE.png");
1479  cONE->Clear();
1480  }
1481  if (sub == 3) {
1482  cONE->Print("HistMaxPosCalibHO.png");
1483  cONE->Clear();
1484  }
1485  if (sub == 4) {
1486  cONE->Print("HistMaxPosCalibHF.png");
1487  cONE->Clear();
1488  }
1489  }
1490  } // end sub
1491  } //end test
1492 
1493  //+++++++++++++++++++++++++++++
1494  //Test 21 (GS) Amplitude drift
1495  //+++++++++++++++++++++++++++++
1496 
1497  Map_Ampl[21][1][1] = (TH2F *)hfile->Get("h_mapDepth1AmplE34_HB");
1498  Map_Ampl[21][1][2] = (TH2F *)hfile->Get("h_mapDepth2AmplE34_HB");
1499  Map_Ampl[21][1][3] = (TH2F *)hfile->Get("h_mapDepth3AmplE34_HB");
1500  Map_Ampl[21][1][4] = (TH2F *)hfile->Get("h_mapDepth4AmplE34_HB");
1501  Map_Ampl[21][2][1] = (TH2F *)hfile->Get("h_mapDepth1AmplE34_HE");
1502  Map_Ampl[21][2][2] = (TH2F *)hfile->Get("h_mapDepth2AmplE34_HE");
1503  Map_Ampl[21][2][3] = (TH2F *)hfile->Get("h_mapDepth3AmplE34_HE");
1504  Map_Ampl[21][2][4] = (TH2F *)hfile->Get("h_mapDepth4AmplE34_HE");
1505  Map_Ampl[21][2][5] = (TH2F *)hfile->Get("h_mapDepth5AmplE34_HE");
1506  Map_Ampl[21][2][6] = (TH2F *)hfile->Get("h_mapDepth6AmplE34_HE");
1507  Map_Ampl[21][2][7] = (TH2F *)hfile->Get("h_mapDepth7AmplE34_HE");
1508  Map_Ampl[21][3][4] = (TH2F *)hfile->Get("h_mapDepth4AmplE34_HO");
1509  Map_Ampl[21][4][1] = (TH2F *)hfile->Get("h_mapDepth1AmplE34_HF");
1510  Map_Ampl[21][4][2] = (TH2F *)hfile->Get("h_mapDepth2AmplE34_HF");
1511  Map_Ampl[21][4][3] = (TH2F *)hfile->Get("h_mapDepth3AmplE34_HF");
1512  Map_Ampl[21][4][4] = (TH2F *)hfile->Get("h_mapDepth4AmplE34_HF");
1513 
1514  TH2F *Map_RefAmpl[5][ALLDEPTH]; // 2D histogramm for subdet, depth
1515  TH2F *Map_RefSUB[5][ALLDEPTH]; // 2d histogramm for subdet, depth
1516 
1517  Map_RefAmpl[1][1] = (TH2F *)hreffile->Get("h_mapDepth1AmplE34_HB");
1518  Map_RefAmpl[1][2] = (TH2F *)hreffile->Get("h_mapDepth2AmplE34_HB");
1519  Map_RefAmpl[1][3] = (TH2F *)hreffile->Get("h_mapDepth3AmplE34_HB");
1520  Map_RefAmpl[1][4] = (TH2F *)hreffile->Get("h_mapDepth4AmplE34_HB");
1521  Map_RefAmpl[2][1] = (TH2F *)hreffile->Get("h_mapDepth1AmplE34_HE");
1522  Map_RefAmpl[2][2] = (TH2F *)hreffile->Get("h_mapDepth2AmplE34_HE");
1523  Map_RefAmpl[2][3] = (TH2F *)hreffile->Get("h_mapDepth3AmplE34_HE");
1524  Map_RefAmpl[2][4] = (TH2F *)hreffile->Get("h_mapDepth4AmplE34_HE");
1525  Map_RefAmpl[2][5] = (TH2F *)hreffile->Get("h_mapDepth5AmplE34_HE");
1526  Map_RefAmpl[2][6] = (TH2F *)hreffile->Get("h_mapDepth6AmplE34_HE");
1527  Map_RefAmpl[2][7] = (TH2F *)hreffile->Get("h_mapDepth7AmplE34_HE");
1528  Map_RefAmpl[3][4] = (TH2F *)hreffile->Get("h_mapDepth4AmplE34_HO");
1529  Map_RefAmpl[4][1] = (TH2F *)hreffile->Get("h_mapDepth1AmplE34_HF");
1530  Map_RefAmpl[4][2] = (TH2F *)hreffile->Get("h_mapDepth2AmplE34_HF");
1531  Map_RefAmpl[4][3] = (TH2F *)hreffile->Get("h_mapDepth3AmplE34_HF");
1532  Map_RefAmpl[4][4] = (TH2F *)hreffile->Get("h_mapDepth4AmplE34_HF");
1533 
1534  Map_RefSUB[1][1] = (TH2F *)hreffile->Get("h_mapDepth1_HB");
1535  Map_RefSUB[1][2] = (TH2F *)hreffile->Get("h_mapDepth2_HB");
1536  Map_RefSUB[1][3] = (TH2F *)hreffile->Get("h_mapDepth3_HB");
1537  Map_RefSUB[1][4] = (TH2F *)hreffile->Get("h_mapDepth4_HB");
1538  Map_RefSUB[2][1] = (TH2F *)hreffile->Get("h_mapDepth1_HE");
1539  Map_RefSUB[2][2] = (TH2F *)hreffile->Get("h_mapDepth2_HE");
1540  Map_RefSUB[2][3] = (TH2F *)hreffile->Get("h_mapDepth3_HE");
1541  Map_RefSUB[2][4] = (TH2F *)hreffile->Get("h_mapDepth4_HE");
1542  Map_RefSUB[2][5] = (TH2F *)hreffile->Get("h_mapDepth5_HE");
1543  Map_RefSUB[2][6] = (TH2F *)hreffile->Get("h_mapDepth6_HE");
1544  Map_RefSUB[2][7] = (TH2F *)hreffile->Get("h_mapDepth7_HE");
1545  Map_RefSUB[3][4] = (TH2F *)hreffile->Get("h_mapDepth4_HO");
1546  Map_RefSUB[4][1] = (TH2F *)hreffile->Get("h_mapDepth1_HF");
1547  Map_RefSUB[4][2] = (TH2F *)hreffile->Get("h_mapDepth2_HF");
1548  Map_RefSUB[4][3] = (TH2F *)hreffile->Get("h_mapDepth3_HF");
1549  Map_RefSUB[4][4] = (TH2F *)hreffile->Get("h_mapDepth4_HF");
1550 
1551  HistAmplDepth[21][1][1] = new TH1F("diffAmpl_Depth1_HB", "", 100, -10., 10.);
1552  HistAmplDepth[21][1][2] = new TH1F("diffAmpl_Depth2_HB", "", 100, -10., 10.);
1553  HistAmplDepth[21][1][3] = new TH1F("diffAmpl_Depth3_HB", "", 100, -10., 10.);
1554  HistAmplDepth[21][1][4] = new TH1F("diffAmpl_Depth4_HB", "", 100, -10., 10.);
1555  HistAmplDepth[21][2][1] = new TH1F("diffAmpl_Depth1_HE", "", 100, -10., 10.);
1556  HistAmplDepth[21][2][2] = new TH1F("diffAmpl_Depth2_HE", "", 100, -10., 10.);
1557  HistAmplDepth[21][2][3] = new TH1F("diffAmpl_Depth3_HE", "", 100, -10., 10.);
1558  HistAmplDepth[21][2][4] = new TH1F("diffAmpl_Depth4_HE", "", 100, -10., 10.);
1559  HistAmplDepth[21][2][5] = new TH1F("diffAmpl_Depth5_HE", "", 100, -10., 10.);
1560  HistAmplDepth[21][2][6] = new TH1F("diffAmpl_Depth6_HE", "", 100, -10., 10.);
1561  HistAmplDepth[21][2][7] = new TH1F("diffAmpl_Depth7_HE", "", 100, -10., 10.);
1562  HistAmplDepth[21][3][4] = new TH1F("diffAmpl_Depth4_HO", "", 100, -10., 10.);
1563  HistAmplDepth[21][4][1] = new TH1F("diffAmpl_Depth1_HF", "", 100, -10., 10.);
1564  HistAmplDepth[21][4][2] = new TH1F("diffAmpl_Depth2_HF", "", 100, -10., 10.);
1565  HistAmplDepth[21][4][3] = new TH1F("diffAmpl_Depth3_HF", "", 100, -10., 10.);
1566  HistAmplDepth[21][4][4] = new TH1F("diffAmpl_Depth4_HF", "", 100, -10., 10.);
1567 
1568  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
1569  // if (sub==1) cHB->Divide(2,1);
1570  if (sub == 1)
1571  cHB->Divide(2, 2);
1572  // if (sub==2) cHE->Divide(3,1);
1573  if (sub == 2)
1574  cHE->Divide(3, 3);
1575  if (sub == 3)
1576  cONE->Divide(1, 1);
1577  // if (sub==4) cHF->Divide(2,1);
1578  if (sub == 4)
1579  cHF->Divide(2, 2);
1580  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1581  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1582  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
1583  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1584  if (sub == 1)
1585  cHB->cd(k);
1586  if (sub == 2)
1587  cHE->cd(k);
1588  if (sub == 3)
1589  cONE->cd(k - 3);
1590  if (sub == 4)
1591  cHF->cd(k);
1592  Map_Ampl[21][sub][k]->Divide(Map_Ampl[21][sub][k], Map_SUB[sub][k], 1, 1, "B");
1593  gPad->SetGridy();
1594  gPad->SetGridx();
1595  gPad->SetLogz();
1596  if (sub == 1)
1597  sprintf(str, "HB, Depth%d \b", k);
1598  if (sub == 2)
1599  sprintf(str, "HE, Depth%d \b", k);
1600  if (sub == 3)
1601  sprintf(str, "HO, Depth%d \b", k);
1602  if (sub == 4)
1603  sprintf(str, "HF, Depth%d \b", k);
1604  Map_Ampl[21][sub][k]->SetTitle(str);
1605  Map_Ampl[21][sub][k]->SetXTitle("#eta \b");
1606  Map_Ampl[21][sub][k]->SetYTitle("#phi \b");
1607  Map_Ampl[21][sub][k]->SetZTitle("Response \b");
1608  Map_Ampl[21][sub][k]->SetTitleOffset(1.1, "Z");
1609  Map_Ampl[21][sub][k]->Draw("COLZ");
1610  Map_Ampl[21][sub][k]->GetYaxis()->SetRangeUser(0, 71.);
1611  // Map_Ampl[21][sub][k]->GetZaxis()->SetRangeUser(1., 10.);
1612  if (sub == 1) {
1613  cHB->Modified();
1614  cHB->Update();
1615  }
1616  if (sub == 2) {
1617  cHE->Modified();
1618  cHE->Update();
1619  }
1620  if (sub == 3) {
1621  cONE->Modified();
1622  cONE->Update();
1623  }
1624  if (sub == 4) {
1625  cHF->Modified();
1626  cHF->Update();
1627  }
1628  } //end depth
1629  if (sub == 1) {
1630  cHB->Print("MapRateAmpl1HB.png");
1631  cHB->Clear();
1632  }
1633  if (sub == 2) {
1634  cHE->Print("MapRateAmpl1HE.png");
1635  cHE->Clear();
1636  }
1637  if (sub == 3) {
1638  cONE->Print("MapRateAmpl1HO.png");
1639  cONE->Clear();
1640  }
1641  if (sub == 4) {
1642  cHF->Print("MapRateAmpl1HF.png");
1643  cHF->Clear();
1644  }
1645 
1646  // if (sub==1) cHB->Divide(2,1);
1647  if (sub == 1)
1648  cHB->Divide(2, 2);
1649  // if (sub==2) cHE->Divide(3,1);
1650  if (sub == 2)
1651  cHE->Divide(3, 3);
1652  if (sub == 3)
1653  cONE->Divide(1, 1);
1654  // if (sub==4) cHF->Divide(2,1);
1655  if (sub == 4)
1656  cHF->Divide(2, 2);
1657 
1658  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1659  if (sub == 1)
1660  cHB->cd(k);
1661  if (sub == 2)
1662  cHE->cd(k);
1663  if (sub == 3)
1664  cONE->cd(k - 3);
1665  if (sub == 4)
1666  cHF->cd(k);
1667  Map_RefAmpl[sub][k]->Divide(Map_RefAmpl[sub][k], Map_RefSUB[sub][k], 1, 1, "B");
1668  gPad->SetGridy();
1669  gPad->SetGridx();
1670  gPad->SetLogz();
1671  if (sub == 1)
1672  sprintf(str, "HB, Depth%d \b", k);
1673  if (sub == 2)
1674  sprintf(str, "HE, Depth%d \b", k);
1675  if (sub == 3)
1676  sprintf(str, "HO, Depth%d \b", k);
1677  if (sub == 4)
1678  sprintf(str, "HF, Depth%d \b", k);
1679  Map_RefAmpl[sub][k]->SetTitle(str);
1680  Map_RefAmpl[sub][k]->SetXTitle("#eta \b");
1681  Map_RefAmpl[sub][k]->SetYTitle("#phi \b");
1682  Map_RefAmpl[sub][k]->SetZTitle("Response\b");
1683  Map_RefAmpl[sub][k]->SetTitleOffset(1.1, "Z");
1684  Map_RefAmpl[sub][k]->Draw("COLZ");
1685  Map_RefAmpl[sub][k]->GetYaxis()->SetRangeUser(0, 71.);
1686  // Map_RefAmpl[21][sub][k]->GetZaxis()->SetRangeUser(1., 10.);
1687  if (sub == 1) {
1688  cHB->Modified();
1689  cHB->Update();
1690  }
1691  if (sub == 2) {
1692  cHE->Modified();
1693  cHE->Update();
1694  }
1695  if (sub == 3) {
1696  cONE->Modified();
1697  cONE->Update();
1698  }
1699  if (sub == 4) {
1700  cHF->Modified();
1701  cHF->Update();
1702  }
1703  } //end depth
1704  if (sub == 1) {
1705  cHB->Print("MapRateAmpl2HB.png");
1706  cHB->Clear();
1707  }
1708  if (sub == 2) {
1709  cHE->Print("MapRateAmpl2HE.png");
1710  cHE->Clear();
1711  }
1712  if (sub == 3) {
1713  cONE->Print("MapRateAmpl2HO.png");
1714  cONE->Clear();
1715  }
1716  if (sub == 4) {
1717  cHF->Print("MapRateAmpl2HF.png");
1718  cHF->Clear();
1719  }
1720 
1721  // if (sub==1) cHB->Divide(2,1);
1722  if (sub == 1)
1723  cHB->Divide(2, 2);
1724  // if (sub==2) cHE->Divide(3,1);
1725  if (sub == 2)
1726  cHE->Divide(3, 3);
1727  if (sub == 3)
1728  cONE->Divide(1, 1);
1729  // if (sub==4) cHF->Divide(2,1);
1730  if (sub == 4)
1731  cHF->Divide(2, 2);
1732 
1733  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1734  if (sub == 1)
1735  cHB->cd(k);
1736  if (sub == 2)
1737  cHE->cd(k);
1738  if (sub == 3)
1739  cONE->cd(k - 3);
1740  if (sub == 4)
1741  cHF->cd(k);
1742  TH2F *TTT = new TH2F("Map", "Map", 82, -41, 40, 72, 0, 71);
1743  for (int x = 1; x <= Map_Ampl[21][sub][k]->GetXaxis()->GetNbins(); x++) {
1744  for (int y = 1; y <= Map_Ampl[21][sub][k]->GetYaxis()->GetNbins(); y++) {
1745  if (Map_Ampl[21][sub][k]->GetBinContent(x, y) != 0 && Map_RefAmpl[sub][k]->GetBinContent(x, y) != 0) {
1746  double ccc1 = Map_Ampl[21][sub][k]->GetBinContent(x, y) - Map_RefAmpl[sub][k]->GetBinContent(x, y);
1747  ccc1 = 100. * ccc1 / Map_Ampl[21][sub][k]->GetBinContent(x, y); // in %
1748  HistAmplDepth[21][sub][k]->Fill(ccc1);
1749  Map_Ampl[21][sub][k]->SetBinContent(x, y, fabs(ccc1));
1750  if (fabs(ccc1) > porog[sub])
1751  TTT->SetBinContent(x, y, fabs(ccc1));
1752  else
1753  TTT->SetBinContent(x, y, 0);
1754  }
1755  } //end y
1756  } //esnd x
1757  gPad->SetGridy();
1758  gPad->SetGridx();
1759  // gPad->SetLogz();
1760  if (sub == 1)
1761  sprintf(str, "HB, Depth%d \b", k);
1762  if (sub == 2)
1763  sprintf(str, "HE, Depth%d \b", k);
1764  if (sub == 3)
1765  sprintf(str, "HO, Depth%d \b", k);
1766  if (sub == 4)
1767  sprintf(str, "HF, Depth%d \b", k);
1768  TTT->SetTitle(str);
1769  TTT->SetXTitle("#eta \b");
1770  TTT->SetYTitle("#phi \b");
1771  TTT->SetZTitle("Relative difference, % \b");
1772  TTT->SetTitleOffset(0.9, "Z");
1773  TTT->Draw("COLZ");
1774  TTT->GetYaxis()->SetRangeUser(0, 71.);
1775  TTT->GetZaxis()->SetRangeUser(0, 10.);
1776  if (sub == 1) {
1777  cHB->Modified();
1778  cHB->Update();
1779  }
1780  if (sub == 2) {
1781  cHE->Modified();
1782  cHE->Update();
1783  }
1784  if (sub == 3) {
1785  cONE->Modified();
1786  cONE->Update();
1787  }
1788  if (sub == 4) {
1789  cHF->Modified();
1790  cHF->Update();
1791  }
1792  } //end depth
1793 
1794  if (sub == 1) {
1795  cHB->Print("MapRateAmplDriftHB.png");
1796  cHB->Clear();
1797  }
1798  if (sub == 2) {
1799  cHE->Print("MapRateAmplDriftHE.png");
1800  cHE->Clear();
1801  }
1802  if (sub == 3) {
1803  cONE->Print("MapRateAmplDriftHO.png");
1804  cONE->Clear();
1805  }
1806  if (sub == 4) {
1807  cHF->Print("MapRateAmplDriftHF.png");
1808  cHF->Clear();
1809  }
1811 
1812  // if (sub==1) cHB->Divide(2,1);
1813  if (sub == 1)
1814  cHB->Divide(2, 2);
1815  // if (sub==2) cHE->Divide(3,1);
1816  if (sub == 2)
1817  cHE->Divide(3, 3);
1818  if (sub == 3)
1819  cONE->Divide(1, 1);
1820  // if (sub==4) cHF->Divide(2,1);
1821  if (sub == 4)
1822  cHF->Divide(2, 2);
1823 
1824  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1825  if (sub == 1)
1826  cHB->cd(k);
1827  if (sub == 2)
1828  cHE->cd(k);
1829  if (sub == 3)
1830  cONE->cd(k - 3);
1831  if (sub == 4)
1832  cHF->cd(k);
1833  gPad->SetGridy();
1834  gPad->SetGridx();
1835  gPad->SetLogy();
1836  if (sub == 1)
1837  sprintf(str, "HB, Depth%d \b", k);
1838  if (sub == 2)
1839  sprintf(str, "HE, Depth%d \b", k);
1840  if (sub == 3)
1841  sprintf(str, "HO, Depth%d \b", k);
1842  if (sub == 4)
1843  sprintf(str, "HF, Depth%d \b", k);
1844  HistAmplDepth[21][sub][k]->SetTitle(str);
1845  HistAmplDepth[21][sub][k]->SetYTitle("Number of cell-events \b");
1846  HistAmplDepth[21][sub][k]->SetXTitle("Per cent \b");
1847  HistAmplDepth[21][sub][k]->SetLineColor(4);
1848  HistAmplDepth[21][sub][k]->SetLineWidth(2);
1849  HistAmplDepth[21][sub][k]->SetTitleOffset(1.4, "Y");
1850  HistAmplDepth[21][sub][k]->Draw();
1851  // HistAmplDepth[21][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1852  HistAmplDepth[21][sub][k]->GetXaxis()->SetRangeUser(-10., 10.);
1853  if (sub == 1) {
1854  cHB->Modified();
1855  cHB->Update();
1856  }
1857  if (sub == 2) {
1858  cHE->Modified();
1859  cHE->Update();
1860  }
1861  if (sub == 3) {
1862  cONE->Modified();
1863  cONE->Update();
1864  }
1865  if (sub == 4) {
1866  cHF->Modified();
1867  cHF->Update();
1868  }
1869  double min_x[] = {-1 * porog[sub], -1 * porog[sub]};
1870  double min_y[] = {0., 100000000.};
1871  TGraph *MIN = new TGraph(2, min_x, min_y);
1872  MIN->SetLineStyle(2);
1873  MIN->SetLineColor(2);
1874  MIN->SetLineWidth(2 + 100 * 100);
1875  MIN->SetFillStyle(3005);
1876  MIN->SetFillColor(2);
1877  MIN->Draw("L");
1878  double max_x[] = {porog[sub], porog[sub]};
1879  double max_y[] = {0., 100000000.};
1880  TGraph *MAX = new TGraph(2, max_x, max_y);
1881  MAX->SetLineStyle(2);
1882  MAX->SetLineColor(2);
1883  MAX->SetLineWidth(-2 - 100 * 100);
1884  MAX->SetFillStyle(3004);
1885  MAX->SetFillColor(2);
1886  MAX->Draw("L");
1887  } // end depth
1888  if (sub == 1) {
1889  cHB->Print("HistAmplDriftDepthHB.png");
1890  cHB->Clear();
1891  }
1892  if (sub == 2) {
1893  cHE->Print("HistAmplDriftDepthHE.png");
1894  cHE->Clear();
1895  }
1896  if (sub == 3) {
1897  cONE->Print("HistAmplDriftDepthHO.png");
1898  cONE->Clear();
1899  }
1900  if (sub == 4) {
1901  cHF->Print("HistAmplDriftDepthHF.png");
1902  cHF->Clear();
1903  }
1904  } //end sub
1905 
1906  //+++++++++++++++++++++++++++++++++++
1907  //Test 31, 32 Pedestal, pedestalWidths
1908  //++++++++++++++++++++++++++++++++++++
1909 
1910  Map_Ampl[31][1][1] = (TH2F *)hfile->Get("h_mapDepth1pedestal_HB");
1911  Map_Ampl[31][1][2] = (TH2F *)hfile->Get("h_mapDepth2pedestal_HB");
1912  Map_Ampl[31][1][3] = (TH2F *)hfile->Get("h_mapDepth3pedestal_HB");
1913  Map_Ampl[31][1][4] = (TH2F *)hfile->Get("h_mapDepth4pedestal_HB");
1914  Map_Ampl[31][2][1] = (TH2F *)hfile->Get("h_mapDepth1pedestal_HE");
1915  Map_Ampl[31][2][2] = (TH2F *)hfile->Get("h_mapDepth2pedestal_HE");
1916  Map_Ampl[31][2][3] = (TH2F *)hfile->Get("h_mapDepth3pedestal_HE");
1917  Map_Ampl[31][2][4] = (TH2F *)hfile->Get("h_mapDepth4pedestal_HE");
1918  Map_Ampl[31][2][5] = (TH2F *)hfile->Get("h_mapDepth5pedestal_HE");
1919  Map_Ampl[31][2][6] = (TH2F *)hfile->Get("h_mapDepth6pedestal_HE");
1920  Map_Ampl[31][2][7] = (TH2F *)hfile->Get("h_mapDepth7pedestal_HE");
1921  Map_Ampl[31][3][4] = (TH2F *)hfile->Get("h_mapDepth4pedestal_HO");
1922  Map_Ampl[31][4][1] = (TH2F *)hfile->Get("h_mapDepth1pedestal_HF");
1923  Map_Ampl[31][4][2] = (TH2F *)hfile->Get("h_mapDepth2pedestal_HF");
1924  Map_Ampl[31][4][3] = (TH2F *)hfile->Get("h_mapDepth3pedestal_HF");
1925  Map_Ampl[31][4][4] = (TH2F *)hfile->Get("h_mapDepth4pedestal_HF");
1926 
1927  Map_Ampl[32][1][1] = (TH2F *)hfile->Get("h_mapDepth1pedestalw_HB");
1928  Map_Ampl[32][1][2] = (TH2F *)hfile->Get("h_mapDepth2pedestalw_HB");
1929  Map_Ampl[32][1][3] = (TH2F *)hfile->Get("h_mapDepth3pedestalw_HB");
1930  Map_Ampl[32][1][4] = (TH2F *)hfile->Get("h_mapDepth4pedestalw_HB");
1931  Map_Ampl[32][2][1] = (TH2F *)hfile->Get("h_mapDepth1pedestalw_HE");
1932  Map_Ampl[32][2][2] = (TH2F *)hfile->Get("h_mapDepth2pedestalw_HE");
1933  Map_Ampl[32][2][3] = (TH2F *)hfile->Get("h_mapDepth3pedestalw_HE");
1934  Map_Ampl[32][2][4] = (TH2F *)hfile->Get("h_mapDepth4pedestalw_HE");
1935  Map_Ampl[32][2][5] = (TH2F *)hfile->Get("h_mapDepth5pedestalw_HE");
1936  Map_Ampl[32][2][6] = (TH2F *)hfile->Get("h_mapDepth6pedestalw_HE");
1937  Map_Ampl[32][2][7] = (TH2F *)hfile->Get("h_mapDepth7pedestalw_HE");
1938  Map_Ampl[32][3][4] = (TH2F *)hfile->Get("h_mapDepth4pedestalw_HO");
1939  Map_Ampl[32][4][1] = (TH2F *)hfile->Get("h_mapDepth1pedestalw_HF");
1940  Map_Ampl[32][4][2] = (TH2F *)hfile->Get("h_mapDepth2pedestalw_HF");
1941  Map_Ampl[32][4][3] = (TH2F *)hfile->Get("h_mapDepth3pedestalw_HF");
1942  Map_Ampl[32][4][4] = (TH2F *)hfile->Get("h_mapDepth4pedestalw_HF");
1943 
1944  HistPed[1][1][0] = (TH1F *)hfile->Get("h_pedestal0_HB");
1945  HistPed[1][1][1] = (TH1F *)hfile->Get("h_pedestal1_HB");
1946  HistPed[1][1][2] = (TH1F *)hfile->Get("h_pedestal2_HB");
1947  HistPed[1][1][3] = (TH1F *)hfile->Get("h_pedestal3_HB");
1948  HistPed[2][1][0] = (TH1F *)hfile->Get("h_pedestalw0_HB");
1949  HistPed[2][1][1] = (TH1F *)hfile->Get("h_pedestalw1_HB");
1950  HistPed[2][1][2] = (TH1F *)hfile->Get("h_pedestalw2_HB");
1951  HistPed[2][1][3] = (TH1F *)hfile->Get("h_pedestalw3_HB");
1952 
1953  HistPed[1][2][0] = (TH1F *)hfile->Get("h_pedestal0_HE");
1954  HistPed[1][2][1] = (TH1F *)hfile->Get("h_pedestal1_HE");
1955  HistPed[1][2][2] = (TH1F *)hfile->Get("h_pedestal2_HE");
1956  HistPed[1][2][3] = (TH1F *)hfile->Get("h_pedestal3_HE");
1957  HistPed[2][2][0] = (TH1F *)hfile->Get("h_pedestalw0_HE");
1958  HistPed[2][2][1] = (TH1F *)hfile->Get("h_pedestalw1_HE");
1959  HistPed[2][2][2] = (TH1F *)hfile->Get("h_pedestalw2_HE");
1960  HistPed[2][2][3] = (TH1F *)hfile->Get("h_pedestalw3_HE");
1961 
1962  HistPed[1][3][0] = (TH1F *)hfile->Get("h_pedestal0_HO");
1963  HistPed[1][3][1] = (TH1F *)hfile->Get("h_pedestal1_HO");
1964  HistPed[1][3][2] = (TH1F *)hfile->Get("h_pedestal2_HO");
1965  HistPed[1][3][3] = (TH1F *)hfile->Get("h_pedestal3_HO");
1966  HistPed[2][3][0] = (TH1F *)hfile->Get("h_pedestalw0_HO");
1967  HistPed[2][3][1] = (TH1F *)hfile->Get("h_pedestalw1_HO");
1968  HistPed[2][3][2] = (TH1F *)hfile->Get("h_pedestalw2_HO");
1969  HistPed[2][3][3] = (TH1F *)hfile->Get("h_pedestalw3_HO");
1970 
1971  HistPed[1][4][0] = (TH1F *)hfile->Get("h_pedestal0_HF");
1972  HistPed[1][4][1] = (TH1F *)hfile->Get("h_pedestal1_HF");
1973  HistPed[1][4][2] = (TH1F *)hfile->Get("h_pedestal2_HF");
1974  HistPed[1][4][3] = (TH1F *)hfile->Get("h_pedestal3_HF");
1975  HistPed[2][4][0] = (TH1F *)hfile->Get("h_pedestalw0_HF");
1976  HistPed[2][4][1] = (TH1F *)hfile->Get("h_pedestalw1_HF");
1977  HistPed[2][4][2] = (TH1F *)hfile->Get("h_pedestalw2_HF");
1978  HistPed[2][4][3] = (TH1F *)hfile->Get("h_pedestalw3_HF");
1979 
1980  for (int test = 31; test <= 32; test++) { //Test: 31-Pedestals, 32-pedestal Widths,
1981  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
1982  // if (sub==1) cHB->Divide(2,1);
1983  if (sub == 1)
1984  cHB->Divide(2, 2);
1985  // if (sub==2) cHE->Divide(3,1);
1986  if (sub == 2)
1987  cHE->Divide(3, 3);
1988  if (sub == 3)
1989  cONE->Divide(1, 1);
1990  // if (sub==4) cHF->Divide(2,1);
1991  if (sub == 4)
1992  cHF->Divide(2, 2);
1993  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1994  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1995  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
1996  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depths
1997  if (sub == 1)
1998  cHB->cd(k);
1999  if (sub == 2)
2000  cHE->cd(k);
2001  if (sub == 3)
2002  cONE->cd(k - 3);
2003  if (sub == 4)
2004  cHF->cd(k);
2005  Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_SUB[sub][k], 1, 1, "B");
2006  gPad->SetGridy();
2007  gPad->SetGridx();
2008  gPad->SetLogz();
2009  if (sub == 1)
2010  sprintf(str, "HB, Depth%d \b", k);
2011  if (sub == 2)
2012  sprintf(str, "HE, Depth%d \b", k);
2013  if (sub == 3)
2014  sprintf(str, "HO, Depth%d \b", k);
2015  if (sub == 4)
2016  sprintf(str, "HF, Depth%d \b", k);
2017  Map_Ampl[test][sub][k]->SetTitle(str);
2018  Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
2019  Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
2020  Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
2021  if (sub == 3)
2022  Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
2023  Map_Ampl[test][sub][k]->Draw("COLZ");
2024  Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2025  Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2026  if (sub == 1) {
2027  cHB->Modified();
2028  cHB->Update();
2029  }
2030  if (sub == 2) {
2031  cHE->Modified();
2032  cHE->Update();
2033  }
2034  if (sub == 3) {
2035  cONE->Modified();
2036  cONE->Update();
2037  }
2038  if (sub == 4) {
2039  cHF->Modified();
2040  cHF->Update();
2041  }
2042  } //end depth
2043  if (test == 31) {
2044  if (sub == 1) {
2045  cHB->Print("MapRatePedHB.png");
2046  cHB->Clear();
2047  }
2048  if (sub == 2) {
2049  cHE->Print("MapRatePedHE.png");
2050  cHE->Clear();
2051  }
2052  if (sub == 3) {
2053  cONE->Print("MapRatePedHO.png");
2054  cONE->Clear();
2055  }
2056  if (sub == 4) {
2057  cHF->Print("MapRatePedHF.png");
2058  cHF->Clear();
2059  }
2060  }
2061  if (test == 32) {
2062  if (sub == 1) {
2063  cHB->Print("MapRatePedWidthsHB.png");
2064  cHB->Clear();
2065  }
2066  if (sub == 2) {
2067  cHE->Print("MapRatePedWidthsHE.png");
2068  cHE->Clear();
2069  }
2070  if (sub == 3) {
2071  cONE->Print("MapRatePedWidthsHO.png");
2072  cONE->Clear();
2073  }
2074  if (sub == 4) {
2075  cHF->Print("MapRatePedWidthsHF.png");
2076  cHF->Clear();
2077  }
2078  }
2079 
2081 
2082  cPED->Divide(2, 2);
2083  for (int cap = 0; cap <= 3; cap++) {
2084  cPED->cd(cap + 1);
2085  gPad->SetGridy();
2086  gPad->SetGridx();
2087  gPad->SetLogy();
2088 
2089  if (sub == 1)
2090  sprintf(str, "HB, Cap%d, all depth\b", cap);
2091  if (sub == 2)
2092  sprintf(str, "HE, Cap%d, all depth\b", cap);
2093  if (sub == 3)
2094  sprintf(str, "HO, Cap%d, all depth\b", cap);
2095  if (sub == 4)
2096  sprintf(str, "HF, Cap%d, all depth\b", cap);
2097 
2098  HistPed[test - 30][sub][cap]->SetTitle(str);
2099 
2100  if (test == 31)
2101  HistPed[test - 30][sub][cap]->SetXTitle("Pedestals in each event & cell \b");
2102  if (test == 32)
2103  HistPed[test - 30][sub][cap]->SetXTitle("Pedestal Widths in each event & cell \b");
2104 
2105  HistPed[test - 30][sub][cap]->SetYTitle("Number of channel-events \b");
2106  HistPed[test - 30][sub][cap]->SetLineColor(4);
2107  HistPed[test - 30][sub][cap]->SetLineWidth(2);
2108  HistPed[test - 30][sub][cap]->SetTitleOffset(1.4, "Y");
2109  HistPed[test - 30][sub][cap]->Draw("");
2110  // HistPed[test-30][sub][cap]->GetYaxis()->SetRangeUser(1., 100.);
2111  // if (test==31) {gPad->SetLogx(); HistPed[test-30][sub][cap]->GetXaxis()->SetRangeUser(1., 10000.);}
2112  // if (test==32) HistPed[test-30][sub][cap]->GetXaxis()->SetRangeUser(0., 5.);
2113 
2114  cPED->Modified();
2115  cPED->Update();
2116  double min_x[] = {Pedest[test - 31][sub], Pedest[test - 31][sub]};
2117  double min_y[] = {0., 100000000.};
2118  TGraph *MIN = new TGraph(2, min_x, min_y);
2119  MIN->SetLineStyle(2);
2120  MIN->SetLineColor(2);
2121  MIN->SetLineWidth(2 + 100 * 100);
2122  MIN->SetFillStyle(3005);
2123  MIN->SetFillColor(2);
2124  MIN->Draw("L");
2125  }
2126  if (test == 31) {
2127  if (sub == 1) {
2128  cPED->Print("HistPedestalsHB.png");
2129  cPED->Clear();
2130  }
2131  if (sub == 2) {
2132  cPED->Print("HistPedestalsHE.png");
2133  cPED->Clear();
2134  }
2135  if (sub == 3) {
2136  cPED->Print("HistPedestalsHO.png");
2137  cPED->Clear();
2138  }
2139  if (sub == 4) {
2140  cPED->Print("HistPedestalsHF.png");
2141  cPED->Clear();
2142  }
2143  }
2144  if (test == 32) {
2145  if (sub == 1) {
2146  cPED->Print("HistPedestalWidthsHB.png");
2147  cPED->Clear();
2148  }
2149  if (sub == 2) {
2150  cPED->Print("HistPedestalWidthsHE.png");
2151  cPED->Clear();
2152  }
2153  if (sub == 3) {
2154  cPED->Print("HistPedestalWidthsHO.png");
2155  cPED->Clear();
2156  }
2157  if (sub == 4) {
2158  cPED->Print("HistPedestalWidthsHF.png");
2159  cPED->Clear();
2160  }
2161  }
2162  } // end sub
2163  } //end test 31,32
2164 
2165  //+++++++++++++++++++++++++++++++++++
2166  //Test 33 Correlation of Pedestal, pedestalWidths Vs fullAmplitude
2167  //++++++++++++++++++++++++++++++++++++
2168 
2169  cPED->Clear();
2170  Map_Ped[1][1] = (TH2F *)hfile->Get("h2_pedvsampl_HB");
2171  Map_Ped[1][2] = (TH2F *)hfile->Get("h2_pedvsampl_HE");
2172  Map_Ped[1][3] = (TH2F *)hfile->Get("h2_pedvsampl_HO");
2173  Map_Ped[1][4] = (TH2F *)hfile->Get("h2_pedvsampl_HF");
2174  Map_Ped[2][1] = (TH2F *)hfile->Get("h2_pedwvsampl_HB");
2175  Map_Ped[2][2] = (TH2F *)hfile->Get("h2_pedwvsampl_HE");
2176  Map_Ped[2][3] = (TH2F *)hfile->Get("h2_pedwvsampl_HO");
2177  Map_Ped[2][4] = (TH2F *)hfile->Get("h2_pedwvsampl_HF");
2178  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2179  cPED->Divide(2, 1);
2180  for (int test = 1; test <= 2; test++) {
2181  cPED->cd(test);
2182  gPad->SetGridy();
2183  gPad->SetGridx();
2184  gPad->SetLogz();
2185  if (test == 1)
2186  Map_Ped[test][sub]->SetXTitle("Pedestal, fC \b");
2187  if (test == 2)
2188  Map_Ped[test][sub]->SetXTitle("pedestal Width, fC \b");
2189  Map_Ped[test][sub]->SetYTitle("Amplitude, fC \b");
2190  Map_Ped[test][sub]->SetZTitle("entries \b");
2191  if (test == 1)
2192  sprintf(str, "Cap0 Pedestal vs Amplitude \b");
2193  if (test == 2)
2194  sprintf(str, "Cap0 pedestalWidth vs Amplitude \b");
2195  Map_Ped[test][sub]->SetTitle(str);
2196  Map_Ped[test][sub]->Draw("COLZ");
2197  // Map_Ped[test][sub]->GetYaxis()->SetRangeUser(0, 72.);
2198  // Map_Ped[test][sub]->GetZaxis()->SetRangeUser(0.0001, 1.);
2199  cPED->Modified();
2200  cPED->Update();
2201  } // test 1,2
2202  if (sub == 1) {
2203  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHB.png");
2204  cPED->Clear();
2205  }
2206  if (sub == 2) {
2207  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHE.png");
2208  cPED->Clear();
2209  }
2210  if (sub == 3) {
2211  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHO.png");
2212  cPED->Clear();
2213  }
2214  if (sub == 4) {
2215  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHF.png");
2216  cPED->Clear();
2217  }
2218  } // end sub
2219 
2220  //+++++++++++++++++++++++++++++++++++
2221  //Test 41 Time Slices shape for good and bad channels
2222  //++++++++++++++++++++++++++++++++++++
2223 
2224  cONE->Clear();
2225  hist_GoodTSshape[1] = (TH1F *)hfile->Get("h_shape_good_channels_HB");
2226  hist_GoodTSshape[2] = (TH1F *)hfile->Get("h_shape_good_channels_HE");
2227  hist_GoodTSshape[3] = (TH1F *)hfile->Get("h_shape_good_channels_HO");
2228  hist_GoodTSshape[4] = (TH1F *)hfile->Get("h_shape_good_channels_HF");
2229 
2230  hist_GoodTSshape0[1] = (TH1F *)hfile->Get("h_shape0_good_channels_HB");
2231  hist_GoodTSshape0[2] = (TH1F *)hfile->Get("h_shape0_good_channels_HE");
2232  hist_GoodTSshape0[3] = (TH1F *)hfile->Get("h_shape0_good_channels_HO");
2233  hist_GoodTSshape0[4] = (TH1F *)hfile->Get("h_shape0_good_channels_HF");
2234 
2235  hist_BadTSshape[1] = (TH1F *)hfile->Get("h_shape_bad_channels_HB");
2236  hist_BadTSshape[2] = (TH1F *)hfile->Get("h_shape_bad_channels_HE");
2237  hist_BadTSshape[3] = (TH1F *)hfile->Get("h_shape_bad_channels_HO");
2238  hist_BadTSshape[4] = (TH1F *)hfile->Get("h_shape_bad_channels_HF");
2239 
2240  hist_BadTSshape0[1] = (TH1F *)hfile->Get("h_shape0_bad_channels_HB");
2241  hist_BadTSshape0[2] = (TH1F *)hfile->Get("h_shape0_bad_channels_HE");
2242  hist_BadTSshape0[3] = (TH1F *)hfile->Get("h_shape0_bad_channels_HO");
2243  hist_BadTSshape0[4] = (TH1F *)hfile->Get("h_shape0_bad_channels_HF");
2244 
2245  cONE->cd(1);
2246 
2247  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2248 
2249  gPad->SetGridy();
2250  gPad->SetGridx();
2251  gPad->SetLogz();
2252  hist_GoodTSshape[sub]->Divide(hist_GoodTSshape[sub], hist_GoodTSshape0[sub], 1, 1, "B");
2253  hist_GoodTSshape[sub]->SetXTitle("Time slice \b");
2254  hist_GoodTSshape[sub]->SetYTitle("ADC counts \b");
2255  sprintf(str, "Mean ADC Shape \b");
2256  hist_GoodTSshape[sub]->SetTitle(str);
2257  hist_GoodTSshape[sub]->Draw("");
2258  // hist_GoodTSshape[sub]->GetYaxis()->SetRangeUser(0, 72.);
2259  // hist_GoodTSshape[sub]->GetZaxis()->SetRangeUser(0.0001, 1.);
2260  cONE->Modified();
2261  cONE->Update();
2262  if (sub == 1) {
2263  cONE->Print("HistGoodTSshapesHB.png");
2264  cONE->Clear();
2265  }
2266  if (sub == 2) {
2267  cONE->Print("HistGoodTSshapesHE.png");
2268  cONE->Clear();
2269  }
2270  if (sub == 3) {
2271  cONE->Print("HistGoodTSshapesHO.png");
2272  cONE->Clear();
2273  }
2274  if (sub == 4) {
2275  cONE->Print("HistGoodTSshapesHF.png");
2276  cONE->Clear();
2277  }
2278  } // end sub
2279 
2280  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2281 
2282  gPad->SetGridy();
2283  gPad->SetGridx();
2284  gPad->SetLogz();
2285  hist_BadTSshape[sub]->Divide(hist_BadTSshape[sub], hist_BadTSshape0[sub], 1, 1, "B");
2286  hist_BadTSshape[sub]->SetXTitle("Time slice \b");
2287  hist_BadTSshape[sub]->SetYTitle("ADC counts \b");
2288  sprintf(str, "Mean ADC Shape \b");
2289  hist_BadTSshape[sub]->SetTitle(str);
2290  hist_BadTSshape[sub]->Draw("");
2291  // hist_BadTSshape[sub]->GetYaxis()->SetRangeUser(0, 72.);
2292  // hist_BadTSshape[sub]->GetZaxis()->SetRangeUser(0.0001, 1.);
2293  cONE->Modified();
2294  cONE->Update();
2295  if (sub == 1) {
2296  cONE->Print("HistBadTSshapesHB.png");
2297  cONE->Clear();
2298  }
2299  if (sub == 2) {
2300  cONE->Print("HistBadTSshapesHE.png");
2301  cONE->Clear();
2302  }
2303  if (sub == 3) {
2304  cONE->Print("HistBadTSshapesHO.png");
2305  cONE->Clear();
2306  }
2307  if (sub == 4) {
2308  cONE->Print("HistBadTSshapesHF.png");
2309  cONE->Clear();
2310  }
2311  } // end sub
2312 
2313  //+++++++++++++++++++++++++++++
2314  // Entries in different TSs:
2315  //+++++++++++++++++++++++++++++
2316  Map_SUBTS[1][1] = (TH2F *)hfile->Get("h_mapDepth1TS2_HB");
2317  Map_SUBTS[1][2] = (TH2F *)hfile->Get("h_mapDepth2TS2_HB");
2318  Map_SUBTS[1][3] = (TH2F *)hfile->Get("h_mapDepth3TS2_HB");
2319  Map_SUBTS[1][4] = (TH2F *)hfile->Get("h_mapDepth4TS2_HB");
2320 
2321  Map_SUBTS[2][1] = (TH2F *)hfile->Get("h_mapDepth1TS2_HE");
2322  Map_SUBTS[2][2] = (TH2F *)hfile->Get("h_mapDepth2TS2_HE");
2323  Map_SUBTS[2][3] = (TH2F *)hfile->Get("h_mapDepth3TS2_HE");
2324  Map_SUBTS[2][4] = (TH2F *)hfile->Get("h_mapDepth4TS2_HE");
2325  Map_SUBTS[2][5] = (TH2F *)hfile->Get("h_mapDepth5TS2_HE");
2326  Map_SUBTS[2][6] = (TH2F *)hfile->Get("h_mapDepth6TS2_HE");
2327  Map_SUBTS[2][7] = (TH2F *)hfile->Get("h_mapDepth7TS2_HE");
2328 
2329  Map_SUBTS[3][4] = (TH2F *)hfile->Get("h_mapDepth4TS012_HO");
2330 
2331  Map_SUBTS[4][1] = (TH2F *)hfile->Get("h_mapDepth1TS1_HF");
2332  Map_SUBTS[4][2] = (TH2F *)hfile->Get("h_mapDepth2TS1_HF");
2333  Map_SUBTS[4][3] = (TH2F *)hfile->Get("h_mapDepth3TS1_HF");
2334  Map_SUBTS[4][4] = (TH2F *)hfile->Get("h_mapDepth4TS1_HF");
2335 
2337  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
2338  // if (sub==1) cHB->Divide(2,1);
2339  if (sub == 1)
2340  cHB->Divide(2, 2);
2341  // if (sub==2) cHE->Divide(3,1);
2342  if (sub == 2)
2343  cHE->Divide(3, 3);
2344  if (sub == 3)
2345  cONE->Divide(1, 1);
2346  // if (sub==4) cHF->Divide(2,1);
2347  if (sub == 4)
2348  cHF->Divide(2, 2);
2349  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2350  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2351  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
2352  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
2353  if (sub == 1)
2354  cHB->cd(k);
2355  if (sub == 2)
2356  cHE->cd(k);
2357  if (sub == 3)
2358  cONE->cd(k - 3);
2359  if (sub == 4)
2360  cHF->cd(k);
2361  Map_SUBTS[sub][k]->Divide(Map_SUBTS[sub][k], Map_SUB[sub][k], 1, 1, "B");
2362  gPad->SetGridy();
2363  gPad->SetGridx();
2364  gPad->SetLogz();
2365  if (sub == 1)
2366  sprintf(str, "HB, Depth%d \b", k);
2367  if (sub == 2)
2368  sprintf(str, "HE, Depth%d \b", k);
2369  if (sub == 3)
2370  sprintf(str, "HO, Depth%d \b", k);
2371  if (sub == 4)
2372  sprintf(str, "HF, Depth%d \b", k);
2373  Map_SUBTS[sub][k]->SetTitle(str);
2374  Map_SUBTS[sub][k]->SetXTitle("#eta \b");
2375  Map_SUBTS[sub][k]->SetYTitle("#phi \b");
2376  Map_SUBTS[sub][k]->SetZTitle("Rate \b");
2377  if (sub == 3)
2378  Map_SUBTS[sub][k]->SetTitleOffset(0.8, "Z");
2379  Map_SUBTS[sub][k]->Draw("COLZ");
2380  Map_SUBTS[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2381  Map_SUBTS[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2382  if (sub == 1) {
2383  cHB->Modified();
2384  cHB->Update();
2385  }
2386  if (sub == 2) {
2387  cHE->Modified();
2388  cHE->Update();
2389  }
2390  if (sub == 3) {
2391  cONE->Modified();
2392  cONE->Update();
2393  }
2394  if (sub == 4) {
2395  cHF->Modified();
2396  cHF->Update();
2397  }
2398  } //end depth
2399 
2400  if (sub == 1) {
2401  cHB->Print("Hist_mapDepthAllTS2_HB.png");
2402  cHB->Clear();
2403  }
2404  if (sub == 2) {
2405  cHE->Print("Hist_mapDepthAllTS2_HE.png");
2406  cHE->Clear();
2407  }
2408  if (sub == 3) {
2409  cONE->Print("Hist_mapDepthAllTS012_HO.png");
2410  cONE->Clear();
2411  }
2412  if (sub == 4) {
2413  cHF->Print("Hist_mapDepthAllTS1_HF.png");
2414  cHF->Clear();
2415  }
2416  } // end sub
2417 
2419 
2420  /*
2421  //+++++++++++++++++++++++++++++++++++
2422 //Test 42 ADC in TS distributions
2423 //++++++++++++++++++++++++++++++++++++
2424 
2425 std::cout<<" We are here to print ADC "<<std::endl;
2426 
2427  hist_ADC_All[1] = (TH1F*)hfile->Get("h_ADC_HB");
2428  hist_ADC_All[2] = (TH1F*)hfile->Get("h_ADC_HE");
2429  hist_ADC_All[3] = (TH1F*)hfile->Get("h_ADC_HO");
2430  hist_ADC_All[4] = (TH1F*)hfile->Get("h_ADC_HF");
2431 
2432 
2433  hist_ADC_DS[1][1] = (TH1F*)hfile->Get("h_ADC_HBdepth1");
2434  hist_ADC_DS[1][2] = (TH1F*)hfile->Get("h_ADC_HBdepth2");
2435  hist_ADC_DS[2][1] = (TH1F*)hfile->Get("h_ADC_HEdepth1");
2436  hist_ADC_DS[2][2] = (TH1F*)hfile->Get("h_ADC_HEdepth2");
2437  hist_ADC_DS[2][3] = (TH1F*)hfile->Get("h_ADC_HEdepth3");
2438  hist_ADC_DS[3][4] = (TH1F*)hfile->Get("h_ADC_HOdepth4");
2439  hist_ADC_DS[4][1] = (TH1F*)hfile->Get("h_ADC_HFdepth1");
2440  hist_ADC_DS[4][2] = (TH1F*)hfile->Get("h_ADC_HFdepth2");
2441 
2442 
2443  cONE->Clear();
2444  cONE->Divide(1,1);
2445  cONE->cd(1);
2446 
2447  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2448  gPad->SetGridy();
2449  gPad->SetGridx();
2450  gPad->SetLogy();
2451  hist_ADC_All[sub]->SetXTitle("ADC counts \b");
2452  hist_ADC_All[sub]->SetYTitle("Number of channels-events \b");
2453  if (sub==1) sprintf(str,"ADC counts Distribution HB\b");
2454  if (sub==2) sprintf(str,"ADC counts Distribution HE\b");
2455  if (sub==3) sprintf(str,"ADC counts Distribution HO\b");
2456  if (sub==4) sprintf(str,"ADC counts Distribution HF\b");
2457  hist_ADC_All[sub]->SetTitle(str);
2458  hist_ADC_All[sub]->Draw("");
2459  // hist_ADC_All[sub]->GetYaxis()->SetRangeUser(0, 72.);
2460  hist_ADC_All[sub]->GetXaxis()->SetRangeUser(0.000, 1000.);
2461  cONE->Modified(); cONE->Update();
2462  if (sub==1) {cONE->Print("Hist_ADC_HB_All.png"); cONE->Clear();}
2463  if (sub==2) {cONE->Print("Hist_ADC_HE_All.png"); cONE->Clear();}
2464  if (sub==3) {cONE->Print("Hist_ADC_HO_All.png"); cONE->Clear();}
2465  if (sub==4) {cONE->Print("Hist_ADC_HF_All.png"); cONE->Clear();}
2466  }// end sub
2467 
2468 
2469  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2470  if (sub==1) cHB->Divide(2,1);
2471  if (sub==2) cHE->Divide(3,1);
2472  if (sub==3) cONE->Divide(1,1);
2473  if (sub==4) cHB->Divide(2,1);
2474  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2475  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2476  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2477  if (sub==1) cHB->cd(k);
2478  if (sub==2) cHE->cd(k);
2479  if (sub==3) cONE->cd(k-3);
2480  if (sub==4) cHB->cd(k);
2481  gPad->SetGridy();
2482  gPad->SetGridx();
2483  gPad->SetLogy();
2484  hist_ADC_DS[sub][k]->SetXTitle("ADC counts \b");
2485  hist_ADC_DS[sub][k]->SetYTitle("Number of channels-events \b");
2486  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2487  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2488  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2489  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2490  hist_ADC_DS[sub][k]->SetTitle(str);
2491  hist_ADC_DS[sub][k]->Draw("");
2492  // hist_ADC_DS[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2493  hist_ADC_DS[sub][k]->GetXaxis()->SetRangeUser(0.000, 1000.);
2494  if (sub==1) {cHB->Modified(); cHB->Update();}
2495  if (sub==2) {cHE->Modified(); cHE->Update();}
2496  if (sub==3) {cONE->Modified();cONE->Update();}
2497  if (sub==4) {cHB->Modified(); cHB->Update();}
2498  }//end depth
2499  if (sub==1) {cHB->Print("Hist_ADC_HB_DS.png"); cHB->Clear();}
2500  if (sub==2) {cHE->Print("Hist_ADC_HE_DS.png"); cHE->Clear();}
2501  if (sub==3) {cONE->Print("Hist_ADC_HO_DS.png"); cONE->Clear();}
2502  if (sub==4) {cHB->Print("Hist_ADC_HF_DS.png"); cHB->Clear();}
2503  }// end sub
2504 
2505 
2506  //+++++++++++++++++++++++++++++++++++
2507 //Test 43 Sum ADC in TS distributions
2508 //++++++++++++++++++++++++++++++++++++
2509 
2510  hist_SumADC[1][1] = (TH1F*)hfile->Get("h_sumamplitude_depth1_HB");
2511  hist_SumADC[1][2] = (TH1F*)hfile->Get("h_sumamplitude_depth2_HB");
2512  hist_SumADC[2][1] = (TH1F*)hfile->Get("h_sumamplitude_depth1_HE");
2513  hist_SumADC[2][2] = (TH1F*)hfile->Get("h_sumamplitude_depth2_HE");
2514  hist_SumADC[2][3] = (TH1F*)hfile->Get("h_sumamplitude_depth3_HE");
2515  hist_SumADC[3][4] = (TH1F*)hfile->Get("h_sumamplitude_depth4_HO");
2516  hist_SumADC[4][1] = (TH1F*)hfile->Get("h_sumamplitude_depth1_HF");
2517  hist_SumADC[4][2] = (TH1F*)hfile->Get("h_sumamplitude_depth2_HF");
2518 
2519  hist_SumADC0[1][1] = (TH1F*)hfile->Get("h_sumamplitude_depth1_HB0");
2520  hist_SumADC0[1][2] = (TH1F*)hfile->Get("h_sumamplitude_depth2_HB0");
2521  hist_SumADC0[2][1] = (TH1F*)hfile->Get("h_sumamplitude_depth1_HE0");
2522  hist_SumADC0[2][2] = (TH1F*)hfile->Get("h_sumamplitude_depth2_HE0");
2523  hist_SumADC0[2][3] = (TH1F*)hfile->Get("h_sumamplitude_depth3_HE0");
2524  hist_SumADC0[3][4] = (TH1F*)hfile->Get("h_sumamplitude_depth4_HO0");
2525  hist_SumADC0[4][1] = (TH1F*)hfile->Get("h_sumamplitude_depth1_HF0");
2526  hist_SumADC0[4][2] = (TH1F*)hfile->Get("h_sumamplitude_depth2_HF0");
2527 
2528  hist_SumADC1[1][1] = (TH1F*)hfile->Get("h_sumamplitude_depth1_HB1");
2529  hist_SumADC1[1][2] = (TH1F*)hfile->Get("h_sumamplitude_depth2_HB1");
2530  hist_SumADC1[2][1] = (TH1F*)hfile->Get("h_sumamplitude_depth1_HE1");
2531  hist_SumADC1[2][2] = (TH1F*)hfile->Get("h_sumamplitude_depth2_HE1");
2532  hist_SumADC1[2][3] = (TH1F*)hfile->Get("h_sumamplitude_depth3_HE1");
2533  hist_SumADC1[3][4] = (TH1F*)hfile->Get("h_sumamplitude_depth4_HO1");
2534  hist_SumADC1[4][1] = (TH1F*)hfile->Get("h_sumamplitude_depth1_HF1");
2535  hist_SumADC1[4][2] = (TH1F*)hfile->Get("h_sumamplitude_depth2_HF1");
2536 
2537  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2538  if (sub==1) cHB->Divide(2,1);
2539  if (sub==2) cHE->Divide(3,1);
2540  if (sub==3) cONE->Divide(1,1);
2541  if (sub==4) cHB->Divide(2,1);
2542  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2543  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2544  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2545  if (sub==1) cHB->cd(k);
2546  if (sub==2) cHE->cd(k);
2547  if (sub==3) cONE->cd(k-3);
2548  if (sub==4) cHB->cd(k);
2549  gPad->SetGridy();
2550  gPad->SetGridx();
2551  gPad->SetLogy();
2552  hist_SumADC[sub][k]->SetXTitle("ADC sum \b");
2553  hist_SumADC[sub][k]->SetYTitle("Number of channels-events \b");
2554  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2555  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2556  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2557  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2558  hist_SumADC[sub][k]->SetTitle(str);
2559  hist_SumADC[sub][k]->Draw("");
2560  // hist_SumADC[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2561  // hist_SumADC[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2562  if (sub==1) {cHB->Modified(); cHB->Update();}
2563  if (sub==2) {cHE->Modified(); cHE->Update();}
2564  if (sub==3) {cONE->Modified();cONE->Update();}
2565  if (sub==4) {cHB->Modified(); cHB->Update();}
2566  }//end depth
2567  if (sub==1) {cHB->Print("Hist_SumADC_HB.png"); cHB->Clear();}
2568  if (sub==2) {cHE->Print("Hist_SumADC_HE.png"); cHE->Clear();}
2569  if (sub==3) {cONE->Print("Hist_SumADC_HO.png"); cONE->Clear();}
2570  if (sub==4) {cHB->Print("Hist_SumADC_HF.png"); cHB->Clear();}
2571  }// end sub
2572 
2573 
2574  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2575  if (sub==1) cHB->Divide(2,1);
2576  if (sub==2) cHE->Divide(3,1);
2577  if (sub==3) cONE->Divide(1,1);
2578  if (sub==4) cHB->Divide(2,1);
2579  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2580  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2581  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2582  if (sub==1) cHB->cd(k);
2583  if (sub==2) cHE->cd(k);
2584  if (sub==3) cONE->cd(k-3);
2585  if (sub==4) cHB->cd(k);
2586  gPad->SetGridy();
2587  gPad->SetGridx();
2588  gPad->SetLogy();
2589  hist_SumADC0[sub][k]->SetXTitle("ADC sum \b");
2590  hist_SumADC0[sub][k]->SetYTitle("Number of channels-events \b");
2591  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2592  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2593  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2594  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2595  hist_SumADC0[sub][k]->SetTitle(str);
2596  hist_SumADC0[sub][k]->Draw("");
2597  // hist_SumADC0[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2598  // hist_SumADC0[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2599  if (sub==1) {cHB->Modified(); cHB->Update();}
2600  if (sub==2) {cHE->Modified(); cHE->Update();}
2601  if (sub==3) {cONE->Modified();cONE->Update();}
2602  if (sub==4) {cHB->Modified(); cHB->Update();}
2603  }//end depth
2604  if (sub==1) {cHB->Print("Hist_SumADC_HB0.png"); cHB->Clear();}
2605  if (sub==2) {cHE->Print("Hist_SumADC_HE0.png"); cHE->Clear();}
2606  if (sub==3) {cONE->Print("Hist_SumADC_HO0.png"); cONE->Clear();}
2607  if (sub==4) {cHB->Print("Hist_SumADC_HF0.png"); cHB->Clear();}
2608  }// end sub
2609 
2610  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2611  if (sub==1) cHB->Divide(2,1);
2612  if (sub==2) cHE->Divide(3,1);
2613  if (sub==3) cONE->Divide(1,1);
2614  if (sub==4) cHB->Divide(2,1);
2615  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2616  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2617  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2618  if (sub==1) cHB->cd(k);
2619  if (sub==2) cHE->cd(k);
2620  if (sub==3) cONE->cd(k-3);
2621  if (sub==4) cHB->cd(k);
2622  gPad->SetGridy();
2623  gPad->SetGridx();
2624  gPad->SetLogy();
2625  hist_SumADC1[sub][k]->SetXTitle("ADC sum \b");
2626  hist_SumADC1[sub][k]->SetYTitle("Number of channels-events \b");
2627  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2628  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2629  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2630  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2631  hist_SumADC1[sub][k]->SetTitle(str);
2632  hist_SumADC1[sub][k]->Draw("");
2633  // hist_SumADC1[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2634  // hist_SumADC1[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2635  if (sub==1) {cHB->Modified(); cHB->Update();}
2636  if (sub==2) {cHE->Modified(); cHE->Update();}
2637  if (sub==3) {cONE->Modified();cONE->Update();}
2638  if (sub==4) {cHB->Modified(); cHB->Update();}
2639  }//end depth
2640  if (sub==1) {cHB->Print("Hist_SumADC_HB1.png"); cHB->Clear();}
2641  if (sub==2) {cHE->Print("Hist_SumADC_HE1.png"); cHE->Clear();}
2642  if (sub==3) {cONE->Print("Hist_SumADC_HO1.png"); cONE->Clear();}
2643  if (sub==4) {cHB->Print("Hist_SumADC_HF1.png"); cHB->Clear();}
2644  }// end sub
2645 
2646 */
2647 
2653 
2654  /*
2655  depth=5 all
2656  i=1-82 in initial histo
2657  j=i-1 in massives
2658 
2659  j= 13 23 (11) 12 25 (!!!)
2660  j-41 in histo
2661  -28 -18 (11) -29 -16
2662 
2663  j= 59 69 (11) 57 70 (!!!)
2664  j-41 in histo
2665  18 28 (11) 16 29
2666  */
2667 
2668  const int nsub = 4;
2669  const int neta = 82;
2670  const int nphi = 72;
2671  int njeta = neta;
2672  int njphi = nphi;
2673  //const int ndepth = 7;
2674  int ndepth;
2678 
2683 
2687  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
2688  //ndepth = k_max[5];
2689  ndepth = 4;
2690  double adigiHB[ndepth][njeta][njphi];
2691  double digivarianceHB[ndepth][njeta][njphi];
2692  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Digi HB
2693  TH2F *amplitudechannel1HB1 = (TH2F *)hfile->Get("h_amplitudechannel1_HB1");
2694  TH2F *amplitudechannel0HB1 = (TH2F *)hfile->Get("h_amplitudechannel0_HB1");
2695  TH2F *amplitudechannelHB1 = (TH2F *)amplitudechannel1HB1->Clone("amplitudechannelHB1");
2696  amplitudechannelHB1->Divide(amplitudechannel1HB1, amplitudechannel0HB1, 1, 1, "B");
2697  TH2F *amplitudechannel1HB2 = (TH2F *)hfile->Get("h_amplitudechannel1_HB2");
2698  TH2F *amplitudechannel0HB2 = (TH2F *)hfile->Get("h_amplitudechannel0_HB2");
2699  TH2F *amplitudechannelHB2 = (TH2F *)amplitudechannel1HB2->Clone("amplitudechannelHB2");
2700  amplitudechannelHB2->Divide(amplitudechannel1HB2, amplitudechannel0HB2, 1, 1, "B");
2701  TH2F *amplitudechannel1HB3 = (TH2F *)hfile->Get("h_amplitudechannel1_HB3");
2702  TH2F *amplitudechannel0HB3 = (TH2F *)hfile->Get("h_amplitudechannel0_HB3");
2703  TH2F *amplitudechannelHB3 = (TH2F *)amplitudechannel1HB3->Clone("amplitudechannelHB3");
2704  amplitudechannelHB3->Divide(amplitudechannel1HB3, amplitudechannel0HB3, 1, 1, "B");
2705  TH2F *amplitudechannel1HB4 = (TH2F *)hfile->Get("h_amplitudechannel1_HB4");
2706  TH2F *amplitudechannel0HB4 = (TH2F *)hfile->Get("h_amplitudechannel0_HB4");
2707  TH2F *amplitudechannelHB4 = (TH2F *)amplitudechannel1HB4->Clone("amplitudechannelHB4");
2708  amplitudechannelHB4->Divide(amplitudechannel1HB4, amplitudechannel0HB4, 1, 1, "B");
2709  for (int jeta = 0; jeta < njeta; jeta++) {
2710  //====================================================================== PHI normalization & put R into massive adigiHB
2711  //preparation for PHI normalization:
2712  double sumdigiHB0 = 0;
2713  int nsumdigiHB0 = 0;
2714  double sumdigiHB1 = 0;
2715  int nsumdigiHB1 = 0;
2716  double sumdigiHB2 = 0;
2717  int nsumdigiHB2 = 0;
2718  double sumdigiHB3 = 0;
2719  int nsumdigiHB3 = 0;
2720  for (int jphi = 0; jphi < njphi; jphi++) {
2721  adigiHB[0][jeta][jphi] = amplitudechannelHB1->GetBinContent(jeta + 1, jphi + 1);
2722  adigiHB[1][jeta][jphi] = amplitudechannelHB2->GetBinContent(jeta + 1, jphi + 1);
2723  adigiHB[2][jeta][jphi] = amplitudechannelHB3->GetBinContent(jeta + 1, jphi + 1);
2724  adigiHB[3][jeta][jphi] = amplitudechannelHB4->GetBinContent(jeta + 1, jphi + 1);
2725  if (adigiHB[0][jeta][jphi] > 0.) {
2726  sumdigiHB0 += adigiHB[0][jeta][jphi];
2727  ++nsumdigiHB0;
2728  }
2729  if (adigiHB[1][jeta][jphi] > 0.) {
2730  sumdigiHB1 += adigiHB[1][jeta][jphi];
2731  ++nsumdigiHB1;
2732  }
2733  if (adigiHB[2][jeta][jphi] > 0.) {
2734  sumdigiHB2 += adigiHB[2][jeta][jphi];
2735  ++nsumdigiHB2;
2736  }
2737  if (adigiHB[3][jeta][jphi] > 0.) {
2738  sumdigiHB3 += adigiHB[3][jeta][jphi];
2739  ++nsumdigiHB3;
2740  }
2741  } // phi
2742  // PHI normalization:
2743  for (int jphi = 0; jphi < njphi; jphi++) {
2744  if (adigiHB[0][jeta][jphi] > 0.)
2745  adigiHB[0][jeta][jphi] /= (sumdigiHB0 / nsumdigiHB0);
2746  if (adigiHB[1][jeta][jphi] > 0.)
2747  adigiHB[1][jeta][jphi] /= (sumdigiHB1 / nsumdigiHB1);
2748  if (adigiHB[2][jeta][jphi] > 0.)
2749  adigiHB[2][jeta][jphi] /= (sumdigiHB2 / nsumdigiHB2);
2750  if (adigiHB[3][jeta][jphi] > 0.)
2751  adigiHB[3][jeta][jphi] /= (sumdigiHB3 / nsumdigiHB3);
2752  } // phi
2753  } //eta
2754  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
2755  //======================================================================
2756  //======================================================================
2757  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
2758  c1x0->Clear();
2760  c1x0->Divide(1, 1);
2761  c1x0->cd(1);
2762  TH2F *GefzRdigiHB42D = new TH2F("GefzRdigiHB42D", "", neta, -41., 41., nphi, 0., 72.);
2763  TH2F *GefzRdigiHB42D0 = new TH2F("GefzRdigiHB42D0", "", neta, -41., 41., nphi, 0., 72.);
2764  TH2F *GefzRdigiHB42DF = (TH2F *)GefzRdigiHB42D0->Clone("GefzRdigiHB42DF");
2765  for (int i = 0; i < ndepth; i++) {
2766  for (int jeta = 0; jeta < neta; jeta++) {
2767  for (int jphi = 0; jphi < nphi; jphi++) {
2768  double ccc1 = adigiHB[i][jeta][jphi];
2769  int k2plot = jeta - 41;
2770  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
2771  if (ccc1 != 0.) {
2772  GefzRdigiHB42D->Fill(kkk, jphi, ccc1);
2773  GefzRdigiHB42D0->Fill(kkk, jphi, 1.);
2774  }
2775  }
2776  }
2777  }
2778  GefzRdigiHB42DF->Divide(GefzRdigiHB42D, GefzRdigiHB42D0, 1, 1, "B"); // average A
2779  gPad->SetGridy();
2780  gPad->SetGridx(); // gPad->SetLogz();
2781  GefzRdigiHB42DF->SetMarkerStyle(20);
2782  GefzRdigiHB42DF->SetMarkerSize(0.4);
2783  GefzRdigiHB42DF->GetZaxis()->SetLabelSize(0.08);
2784  GefzRdigiHB42DF->SetXTitle("<R>_depth #eta \b");
2785  GefzRdigiHB42DF->SetYTitle(" #phi \b");
2786  GefzRdigiHB42DF->SetZTitle("<R>_depth \b");
2787  GefzRdigiHB42DF->SetMarkerColor(2);
2788  GefzRdigiHB42DF->SetLineColor(
2789  0); // GefzRdigiHB42DF->SetMaximum(1.000); // GefzRdigiHB42DF->SetMinimum(1.0);
2790  GefzRdigiHB42DF->Draw("COLZ");
2792  c1x0->Update();
2793  c1x0->Print("RdigiGeneralD2PhiSymmetryHB.png");
2794  c1x0->Clear();
2795  // clean-up
2796  if (GefzRdigiHB42D)
2797  delete GefzRdigiHB42D;
2798  if (GefzRdigiHB42D0)
2799  delete GefzRdigiHB42D0;
2800  if (GefzRdigiHB42DF)
2801  delete GefzRdigiHB42DF;
2802  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
2803  //======================================================================
2804  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
2805  c1x1->Clear();
2807  c1x1->Divide(1, 1);
2808  c1x1->cd(1);
2809  TH1F *GefzRdigiHB41D = new TH1F("GefzRdigiHB41D", "", nphi, 0., 72.);
2810  TH1F *GefzRdigiHB41D0 = new TH1F("GefzRdigiHB41D0", "", nphi, 0., 72.);
2811  TH1F *GefzRdigiHB41DF = (TH1F *)GefzRdigiHB41D0->Clone("GefzRdigiHB41DF");
2812  for (int jphi = 0; jphi < nphi; jphi++) {
2813  for (int jeta = 0; jeta < neta; jeta++) {
2814  for (int i = 0; i < ndepth; i++) {
2815  double ccc1 = adigiHB[i][jeta][jphi];
2816  if (ccc1 != 0.) {
2817  GefzRdigiHB41D->Fill(jphi, ccc1);
2818  GefzRdigiHB41D0->Fill(jphi, 1.);
2819  }
2820  }
2821  }
2822  }
2823  GefzRdigiHB41DF->Divide(GefzRdigiHB41D, GefzRdigiHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
2824  GefzRdigiHB41D0->Sumw2();
2825  // for (int jphi=1;jphi<73;jphi++) {GefzRdigiHB41DF->SetBinError(jphi,0.01);}
2826  gPad->SetGridy();
2827  gPad->SetGridx(); // gPad->SetLogz();
2828  GefzRdigiHB41DF->SetMarkerStyle(20);
2829  GefzRdigiHB41DF->SetMarkerSize(1.4);
2830  GefzRdigiHB41DF->GetZaxis()->SetLabelSize(0.08);
2831  GefzRdigiHB41DF->SetXTitle("#phi \b");
2832  GefzRdigiHB41DF->SetYTitle(" <R> \b");
2833  GefzRdigiHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
2834  GefzRdigiHB41DF->SetMarkerColor(4);
2835  GefzRdigiHB41DF->SetLineColor(
2836  4); // GefzRdigiHB41DF->SetMinimum(0.8); // GefzRdigiHB41DF->SetMaximum(1.000);
2837  GefzRdigiHB41DF->Draw("Error");
2839  c1x1->Update();
2840  c1x1->Print("RdigiGeneralD1PhiSymmetryHB.png");
2841  c1x1->Clear();
2842  // clean-up
2843  if (GefzRdigiHB41D)
2844  delete GefzRdigiHB41D;
2845  if (GefzRdigiHB41D0)
2846  delete GefzRdigiHB41D0;
2847  if (GefzRdigiHB41DF)
2848  delete GefzRdigiHB41DF;
2849  //========================================================================================== 4
2850  //======================================================================
2851  //======================================================================1D plot: R vs phi , different eta, depth=1
2852  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
2853  c3x5->Clear();
2855  c3x5->Divide(4, 4);
2856  c3x5->cd(1);
2857  int kcountHBpositivedirectionDigi1 = 1;
2858  TH1F *h2CeffHBpositivedirectionDigi1 = new TH1F("h2CeffHBpositivedirectionDigi1", "", nphi, 0., 72.);
2859  for (int jeta = 0; jeta < njeta; jeta++) {
2860  // positivedirectionDigi:
2861  if (jeta - 41 >= 0) {
2862  // for (int i=0;i<ndepth;i++) {
2863  // depth=1
2864  for (int i = 0; i < 1; i++) {
2865  TH1F *HBpositivedirectionDigi1 = (TH1F *)h2CeffHBpositivedirectionDigi1->Clone("twod1");
2866  float ccctest = 0; // to avoid empty massive elements
2867  for (int jphi = 0; jphi < nphi; jphi++) {
2868  double ccc1 = adigiHB[i][jeta][jphi];
2869  if (ccc1 != 0.) {
2870  HBpositivedirectionDigi1->Fill(jphi, ccc1);
2871  ccctest = 1.; //HBpositivedirectionDigi1->SetBinError(i,0.01);
2872  }
2873  } // for jphi
2874  if (ccctest > 0.) {
2875  // cout<<"444 kcountHBpositivedirectionDigi1 = "<<kcountHBpositivedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
2876  c3x5->cd(kcountHBpositivedirectionDigi1);
2877  HBpositivedirectionDigi1->SetMarkerStyle(20);
2878  HBpositivedirectionDigi1->SetMarkerSize(0.4);
2879  HBpositivedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
2880  HBpositivedirectionDigi1->SetXTitle("HBpositivedirectionDigi1 \b");
2881  HBpositivedirectionDigi1->SetMarkerColor(2);
2882  HBpositivedirectionDigi1->SetLineColor(0);
2883  gPad->SetGridy();
2884  gPad->SetGridx();
2885  // gPad->SetLogy();
2886  if (kcountHBpositivedirectionDigi1 == 1)
2887  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
2888  if (kcountHBpositivedirectionDigi1 == 2)
2889  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
2890  if (kcountHBpositivedirectionDigi1 == 3)
2891  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
2892  if (kcountHBpositivedirectionDigi1 == 4)
2893  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
2894  if (kcountHBpositivedirectionDigi1 == 5)
2895  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
2896  if (kcountHBpositivedirectionDigi1 == 6)
2897  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
2898  if (kcountHBpositivedirectionDigi1 == 7)
2899  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
2900  if (kcountHBpositivedirectionDigi1 == 8)
2901  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
2902  if (kcountHBpositivedirectionDigi1 == 9)
2903  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
2904  if (kcountHBpositivedirectionDigi1 == 10)
2905  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
2906  if (kcountHBpositivedirectionDigi1 == 11)
2907  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
2908  if (kcountHBpositivedirectionDigi1 == 12)
2909  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
2910  if (kcountHBpositivedirectionDigi1 == 13)
2911  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
2912  if (kcountHBpositivedirectionDigi1 == 14)
2913  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
2914  if (kcountHBpositivedirectionDigi1 == 15)
2915  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
2916  if (kcountHBpositivedirectionDigi1 == 16)
2917  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
2918  HBpositivedirectionDigi1->Draw("Error");
2919  kcountHBpositivedirectionDigi1++;
2920  if (kcountHBpositivedirectionDigi1 > 16)
2921  break; //
2922  } //ccctest>0
2923 
2924  } // for i
2925  } //if(jeta-41 >= 0)
2926  } //for jeta
2928  c3x5->Update();
2929  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
2930  c3x5->Clear();
2931  // clean-up
2932  if (h2CeffHBpositivedirectionDigi1)
2933  delete h2CeffHBpositivedirectionDigi1;
2934 
2935  //========================================================================================== 5
2936  //======================================================================
2937  //======================================================================1D plot: R vs phi , different eta, depth=2
2938  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
2939  c3x5->Clear();
2941  c3x5->Divide(4, 4);
2942  c3x5->cd(1);
2943  int kcountHBpositivedirectionDigi2 = 1;
2944  TH1F *h2CeffHBpositivedirectionDigi2 = new TH1F("h2CeffHBpositivedirectionDigi2", "", nphi, 0., 72.);
2945  for (int jeta = 0; jeta < njeta; jeta++) {
2946  // positivedirectionDigi:
2947  if (jeta - 41 >= 0) {
2948  // for (int i=0;i<ndepth;i++) {
2949  // depth=2
2950  for (int i = 1; i < 2; i++) {
2951  TH1F *HBpositivedirectionDigi2 = (TH1F *)h2CeffHBpositivedirectionDigi2->Clone("twod1");
2952  float ccctest = 0; // to avoid empty massive elements
2953  for (int jphi = 0; jphi < nphi; jphi++) {
2954  double ccc1 = adigiHB[i][jeta][jphi];
2955  if (ccc1 != 0.) {
2956  HBpositivedirectionDigi2->Fill(jphi, ccc1);
2957  ccctest = 1.; //HBpositivedirectionDigi2->SetBinError(i,0.01);
2958  }
2959  } // for jphi
2960  if (ccctest > 0.) {
2961  //cout<<"555 kcountHBpositivedirectionDigi2 = "<<kcountHBpositivedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
2962  c3x5->cd(kcountHBpositivedirectionDigi2);
2963  HBpositivedirectionDigi2->SetMarkerStyle(20);
2964  HBpositivedirectionDigi2->SetMarkerSize(0.4);
2965  HBpositivedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
2966  HBpositivedirectionDigi2->SetXTitle("HBpositivedirectionDigi2 \b");
2967  HBpositivedirectionDigi2->SetMarkerColor(2);
2968  HBpositivedirectionDigi2->SetLineColor(0);
2969  gPad->SetGridy();
2970  gPad->SetGridx();
2971  // gPad->SetLogy();
2972  if (kcountHBpositivedirectionDigi2 == 1)
2973  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
2974  if (kcountHBpositivedirectionDigi2 == 2)
2975  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
2976  if (kcountHBpositivedirectionDigi2 == 3)
2977  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
2978  if (kcountHBpositivedirectionDigi2 == 4)
2979  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
2980  if (kcountHBpositivedirectionDigi2 == 5)
2981  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
2982  if (kcountHBpositivedirectionDigi2 == 6)
2983  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
2984  if (kcountHBpositivedirectionDigi2 == 7)
2985  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
2986  if (kcountHBpositivedirectionDigi2 == 8)
2987  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
2988  if (kcountHBpositivedirectionDigi2 == 9)
2989  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
2990  if (kcountHBpositivedirectionDigi2 == 10)
2991  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
2992  if (kcountHBpositivedirectionDigi2 == 11)
2993  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
2994  if (kcountHBpositivedirectionDigi2 == 12)
2995  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
2996  if (kcountHBpositivedirectionDigi2 == 13)
2997  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
2998  if (kcountHBpositivedirectionDigi2 == 14)
2999  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
3000  if (kcountHBpositivedirectionDigi2 == 15)
3001  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
3002  if (kcountHBpositivedirectionDigi2 == 16)
3003  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
3004  HBpositivedirectionDigi2->Draw("Error");
3005  kcountHBpositivedirectionDigi2++;
3006  if (kcountHBpositivedirectionDigi2 > 16)
3007  break; // 4x6 = 24
3008  } //ccctest>0
3009 
3010  } // for i
3011  } //if(jeta-41 >= 0)
3012  } //for jeta
3014  c3x5->Update();
3015  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
3016  c3x5->Clear();
3017  // clean-up
3018  if (h2CeffHBpositivedirectionDigi2)
3019  delete h2CeffHBpositivedirectionDigi2;
3020  //========================================================================================== 6
3021  //======================================================================
3022  //======================================================================1D plot: R vs phi , different eta, depth=3
3023  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
3024  c3x5->Clear();
3026  c3x5->Divide(4, 4);
3027  c3x5->cd(1);
3028  int kcountHBpositivedirectionDigi3 = 1;
3029  TH1F *h2CeffHBpositivedirectionDigi3 = new TH1F("h2CeffHBpositivedirectionDigi3", "", nphi, 0., 72.);
3030  for (int jeta = 0; jeta < njeta; jeta++) {
3031  // positivedirectionDigi:
3032  if (jeta - 41 >= 0) {
3033  // for (int i=0;i<ndepth;i++) {
3034  // depth=3
3035  for (int i = 2; i < 3; i++) {
3036  TH1F *HBpositivedirectionDigi3 = (TH1F *)h2CeffHBpositivedirectionDigi3->Clone("twod1");
3037  float ccctest = 0; // to avoid empty massive elements
3038  for (int jphi = 0; jphi < nphi; jphi++) {
3039  double ccc1 = adigiHB[i][jeta][jphi];
3040  if (ccc1 != 0.) {
3041  HBpositivedirectionDigi3->Fill(jphi, ccc1);
3042  ccctest = 1.; //HBpositivedirectionDigi3->SetBinError(i,0.01);
3043  }
3044  } // for jphi
3045  if (ccctest > 0.) {
3046  //cout<<"666 kcountHBpositivedirectionDigi3 = "<<kcountHBpositivedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
3047  c3x5->cd(kcountHBpositivedirectionDigi3);
3048  HBpositivedirectionDigi3->SetMarkerStyle(20);
3049  HBpositivedirectionDigi3->SetMarkerSize(0.4);
3050  HBpositivedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
3051  HBpositivedirectionDigi3->SetXTitle("HBpositivedirectionDigi3 \b");
3052  HBpositivedirectionDigi3->SetMarkerColor(2);
3053  HBpositivedirectionDigi3->SetLineColor(0);
3054  gPad->SetGridy();
3055  gPad->SetGridx();
3056  // gPad->SetLogy();
3057  if (kcountHBpositivedirectionDigi3 == 1)
3058  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
3059  if (kcountHBpositivedirectionDigi3 == 2)
3060  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
3061  if (kcountHBpositivedirectionDigi3 == 3)
3062  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
3063  if (kcountHBpositivedirectionDigi3 == 4)
3064  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
3065  if (kcountHBpositivedirectionDigi3 == 5)
3066  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
3067  if (kcountHBpositivedirectionDigi3 == 6)
3068  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
3069  if (kcountHBpositivedirectionDigi3 == 7)
3070  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
3071  if (kcountHBpositivedirectionDigi3 == 8)
3072  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
3073  if (kcountHBpositivedirectionDigi3 == 9)
3074  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
3075  if (kcountHBpositivedirectionDigi3 == 10)
3076  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
3077  if (kcountHBpositivedirectionDigi3 == 11)
3078  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
3079  if (kcountHBpositivedirectionDigi3 == 12)
3080  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
3081  if (kcountHBpositivedirectionDigi3 == 13)
3082  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
3083  if (kcountHBpositivedirectionDigi3 == 14)
3084  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
3085  if (kcountHBpositivedirectionDigi3 == 15)
3086  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
3087  if (kcountHBpositivedirectionDigi3 == 16)
3088  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
3089  HBpositivedirectionDigi3->Draw("Error");
3090  kcountHBpositivedirectionDigi3++;
3091  if (kcountHBpositivedirectionDigi3 > 16)
3092  break; // 4x6 = 24
3093  } //ccctest>0
3094 
3095  } // for i
3096  } //if(jeta-41 >= 0)
3097  } //for jeta
3099  c3x5->Update();
3100  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
3101  c3x5->Clear();
3102  // clean-up
3103  if (h2CeffHBpositivedirectionDigi3)
3104  delete h2CeffHBpositivedirectionDigi3;
3105  //========================================================================================== 7
3106  //======================================================================
3107  //======================================================================1D plot: R vs phi , different eta, depth=4
3108  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
3109  c3x5->Clear();
3111  c3x5->Divide(4, 4);
3112  c3x5->cd(1);
3113  int kcountHBpositivedirectionDigi4 = 1;
3114  TH1F *h2CeffHBpositivedirectionDigi4 = new TH1F("h2CeffHBpositivedirectionDigi4", "", nphi, 0., 72.);
3115 
3116  for (int jeta = 0; jeta < njeta; jeta++) {
3117  // positivedirectionDigi:
3118  if (jeta - 41 >= 0) {
3119  // for (int i=0;i<ndepth;i++) {
3120  // depth=4
3121  for (int i = 3; i < 4; i++) {
3122  TH1F *HBpositivedirectionDigi4 = (TH1F *)h2CeffHBpositivedirectionDigi4->Clone("twod1");
3123 
3124  float ccctest = 0; // to avoid empty massive elements
3125  for (int jphi = 0; jphi < nphi; jphi++) {
3126  double ccc1 = adigiHB[i][jeta][jphi];
3127  if (ccc1 != 0.) {
3128  HBpositivedirectionDigi4->Fill(jphi, ccc1);
3129  ccctest = 1.; //HBpositivedirectionDigi4->SetBinError(i,0.01);
3130  }
3131  } // for jphi
3132  if (ccctest > 0.) {
3133  //cout<<"777 kcountHBpositivedirectionDigi4 = "<<kcountHBpositivedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
3134  c3x5->cd(kcountHBpositivedirectionDigi4);
3135  HBpositivedirectionDigi4->SetMarkerStyle(20);
3136  HBpositivedirectionDigi4->SetMarkerSize(0.4);
3137  HBpositivedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
3138  HBpositivedirectionDigi4->SetXTitle("HBpositivedirectionDigi4 \b");
3139  HBpositivedirectionDigi4->SetMarkerColor(2);
3140  HBpositivedirectionDigi4->SetLineColor(0);
3141  gPad->SetGridy();
3142  gPad->SetGridx();
3143  // gPad->SetLogy();
3144  if (kcountHBpositivedirectionDigi4 == 1)
3145  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
3146  if (kcountHBpositivedirectionDigi4 == 2)
3147  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
3148  if (kcountHBpositivedirectionDigi4 == 3)
3149  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
3150  if (kcountHBpositivedirectionDigi4 == 4)
3151  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
3152  if (kcountHBpositivedirectionDigi4 == 5)
3153  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
3154  if (kcountHBpositivedirectionDigi4 == 6)
3155  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
3156  if (kcountHBpositivedirectionDigi4 == 7)
3157  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
3158  if (kcountHBpositivedirectionDigi4 == 8)
3159  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
3160  if (kcountHBpositivedirectionDigi4 == 9)
3161  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
3162  if (kcountHBpositivedirectionDigi4 == 10)
3163  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
3164  if (kcountHBpositivedirectionDigi4 == 11)
3165  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
3166  if (kcountHBpositivedirectionDigi4 == 12)
3167  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
3168  if (kcountHBpositivedirectionDigi4 == 13)
3169  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
3170  if (kcountHBpositivedirectionDigi4 == 14)
3171  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
3172  if (kcountHBpositivedirectionDigi4 == 15)
3173  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
3174  if (kcountHBpositivedirectionDigi4 == 16)
3175  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
3176  HBpositivedirectionDigi4->Draw("Error");
3177  kcountHBpositivedirectionDigi4++;
3178  if (kcountHBpositivedirectionDigi4 > 16)
3179  break; // 4x6 = 24
3180  } //ccctest>0
3181 
3182  } // for i
3183  } //if(jeta-41 >= 0)
3184  } //for jeta
3186  c3x5->Update();
3187  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
3188  c3x5->Clear();
3189  // clean-up
3190  if (h2CeffHBpositivedirectionDigi4)
3191  delete h2CeffHBpositivedirectionDigi4;
3192 
3193  //========================================================================================== 1114
3194  //======================================================================
3195  //======================================================================1D plot: R vs phi , different eta, depth=1
3196  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
3197  c3x5->Clear();
3199  c3x5->Divide(4, 4);
3200  c3x5->cd(1);
3201  int kcountHBnegativedirectionDigi1 = 1;
3202  TH1F *h2CeffHBnegativedirectionDigi1 = new TH1F("h2CeffHBnegativedirectionDigi1", "", nphi, 0., 72.);
3203  for (int jeta = 0; jeta < njeta; jeta++) {
3204  // negativedirectionDigi:
3205  if (jeta - 41 < 0) {
3206  // for (int i=0;i<ndepth;i++) {
3207  // depth=1
3208  for (int i = 0; i < 1; i++) {
3209  TH1F *HBnegativedirectionDigi1 = (TH1F *)h2CeffHBnegativedirectionDigi1->Clone("twod1");
3210  float ccctest = 0; // to avoid empty massive elements
3211  for (int jphi = 0; jphi < nphi; jphi++) {
3212  double ccc1 = adigiHB[i][jeta][jphi];
3213  if (ccc1 != 0.) {
3214  HBnegativedirectionDigi1->Fill(jphi, ccc1);
3215  ccctest = 1.; //HBnegativedirectionDigi1->SetBinError(i,0.01);
3216  }
3217  } // for jphi
3218  if (ccctest > 0.) {
3219  // cout<<"444 kcountHBnegativedirectionDigi1 = "<<kcountHBnegativedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
3220  c3x5->cd(kcountHBnegativedirectionDigi1);
3221  HBnegativedirectionDigi1->SetMarkerStyle(20);
3222  HBnegativedirectionDigi1->SetMarkerSize(0.4);
3223  HBnegativedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
3224  HBnegativedirectionDigi1->SetXTitle("HBnegativedirectionDigi1 \b");
3225  HBnegativedirectionDigi1->SetMarkerColor(2);
3226  HBnegativedirectionDigi1->SetLineColor(0);
3227  gPad->SetGridy();
3228  gPad->SetGridx();
3229  // gPad->SetLogy();
3230  if (kcountHBnegativedirectionDigi1 == 1)
3231  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
3232  if (kcountHBnegativedirectionDigi1 == 2)
3233  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
3234  if (kcountHBnegativedirectionDigi1 == 3)
3235  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
3236  if (kcountHBnegativedirectionDigi1 == 4)
3237  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
3238  if (kcountHBnegativedirectionDigi1 == 5)
3239  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
3240  if (kcountHBnegativedirectionDigi1 == 6)
3241  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
3242  if (kcountHBnegativedirectionDigi1 == 7)
3243  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
3244  if (kcountHBnegativedirectionDigi1 == 8)
3245  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
3246  if (kcountHBnegativedirectionDigi1 == 9)
3247  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
3248  if (kcountHBnegativedirectionDigi1 == 10)
3249  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
3250  if (kcountHBnegativedirectionDigi1 == 11)
3251  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
3252  if (kcountHBnegativedirectionDigi1 == 12)
3253  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
3254  if (kcountHBnegativedirectionDigi1 == 13)
3255  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
3256  if (kcountHBnegativedirectionDigi1 == 14)
3257  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
3258  if (kcountHBnegativedirectionDigi1 == 15)
3259  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
3260  if (kcountHBnegativedirectionDigi1 == 16)
3261  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
3262  HBnegativedirectionDigi1->Draw("Error");
3263  kcountHBnegativedirectionDigi1++;
3264  if (kcountHBnegativedirectionDigi1 > 16)
3265  break; //
3266  } //ccctest>0
3267 
3268  } // for i
3269  } //if(jeta-41 < 0 )
3270  } //for jeta
3272  c3x5->Update();
3273  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
3274  c3x5->Clear();
3275  // clean-up
3276  if (h2CeffHBnegativedirectionDigi1)
3277  delete h2CeffHBnegativedirectionDigi1;
3278 
3279  //========================================================================================== 1115
3280  //======================================================================
3281  //======================================================================1D plot: R vs phi , different eta, depth=2
3282  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
3283  c3x5->Clear();
3285  c3x5->Divide(4, 4);
3286  c3x5->cd(1);
3287  int kcountHBnegativedirectionDigi2 = 1;
3288  TH1F *h2CeffHBnegativedirectionDigi2 = new TH1F("h2CeffHBnegativedirectionDigi2", "", nphi, 0., 72.);
3289  for (int jeta = 0; jeta < njeta; jeta++) {
3290  // negativedirectionDigi:
3291  if (jeta - 41 < 0) {
3292  // for (int i=0;i<ndepth;i++) {
3293  // depth=2
3294  for (int i = 1; i < 2; i++) {
3295  TH1F *HBnegativedirectionDigi2 = (TH1F *)h2CeffHBnegativedirectionDigi2->Clone("twod1");
3296  float ccctest = 0; // to avoid empty massive elements
3297  for (int jphi = 0; jphi < nphi; jphi++) {
3298  double ccc1 = adigiHB[i][jeta][jphi];
3299  if (ccc1 != 0.) {
3300  HBnegativedirectionDigi2->Fill(jphi, ccc1);
3301  ccctest = 1.; //HBnegativedirectionDigi2->SetBinError(i,0.01);
3302  }
3303  } // for jphi
3304  if (ccctest > 0.) {
3305  //cout<<"555 kcountHBnegativedirectionDigi2 = "<<kcountHBnegativedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
3306  c3x5->cd(kcountHBnegativedirectionDigi2);
3307  HBnegativedirectionDigi2->SetMarkerStyle(20);
3308  HBnegativedirectionDigi2->SetMarkerSize(0.4);
3309  HBnegativedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
3310  HBnegativedirectionDigi2->SetXTitle("HBnegativedirectionDigi2 \b");
3311  HBnegativedirectionDigi2->SetMarkerColor(2);
3312  HBnegativedirectionDigi2->SetLineColor(0);
3313  gPad->SetGridy();
3314  gPad->SetGridx();
3315  // gPad->SetLogy();
3316  if (kcountHBnegativedirectionDigi2 == 1)
3317  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
3318  if (kcountHBnegativedirectionDigi2 == 2)
3319  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
3320  if (kcountHBnegativedirectionDigi2 == 3)
3321  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
3322  if (kcountHBnegativedirectionDigi2 == 4)
3323  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
3324  if (kcountHBnegativedirectionDigi2 == 5)
3325  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
3326  if (kcountHBnegativedirectionDigi2 == 6)
3327  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
3328  if (kcountHBnegativedirectionDigi2 == 7)
3329  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
3330  if (kcountHBnegativedirectionDigi2 == 8)
3331  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
3332  if (kcountHBnegativedirectionDigi2 == 9)
3333  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
3334  if (kcountHBnegativedirectionDigi2 == 10)
3335  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
3336  if (kcountHBnegativedirectionDigi2 == 11)
3337  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
3338  if (kcountHBnegativedirectionDigi2 == 12)
3339  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
3340  if (kcountHBnegativedirectionDigi2 == 13)
3341  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
3342  if (kcountHBnegativedirectionDigi2 == 14)
3343  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
3344  if (kcountHBnegativedirectionDigi2 == 15)
3345  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
3346  if (kcountHBnegativedirectionDigi2 == 16)
3347  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
3348  HBnegativedirectionDigi2->Draw("Error");
3349  kcountHBnegativedirectionDigi2++;
3350  if (kcountHBnegativedirectionDigi2 > 16)
3351  break; // 4x6 = 24
3352  } //ccctest>0
3353 
3354  } // for i
3355  } //if(jeta-41 < 0 )
3356  } //for jeta
3358  c3x5->Update();
3359  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
3360  c3x5->Clear();
3361  // clean-up
3362  if (h2CeffHBnegativedirectionDigi2)
3363  delete h2CeffHBnegativedirectionDigi2;
3364  //========================================================================================== 1116
3365  //======================================================================
3366  //======================================================================1D plot: R vs phi , different eta, depth=3
3367  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
3368  c3x5->Clear();
3370  c3x5->Divide(4, 4);
3371  c3x5->cd(1);
3372  int kcountHBnegativedirectionDigi3 = 1;
3373  TH1F *h2CeffHBnegativedirectionDigi3 = new TH1F("h2CeffHBnegativedirectionDigi3", "", nphi, 0., 72.);
3374  for (int jeta = 0; jeta < njeta; jeta++) {
3375  // negativedirectionDigi:
3376  if (jeta - 41 < 0) {
3377  // for (int i=0;i<ndepth;i++) {
3378  // depth=3
3379  for (int i = 2; i < 3; i++) {
3380  TH1F *HBnegativedirectionDigi3 = (TH1F *)h2CeffHBnegativedirectionDigi3->Clone("twod1");
3381  float ccctest = 0; // to avoid empty massive elements
3382  for (int jphi = 0; jphi < nphi; jphi++) {
3383  double ccc1 = adigiHB[i][jeta][jphi];
3384  if (ccc1 != 0.) {
3385  HBnegativedirectionDigi3->Fill(jphi, ccc1);
3386  ccctest = 1.; //HBnegativedirectionDigi3->SetBinError(i,0.01);
3387  }
3388  } // for jphi
3389  if (ccctest > 0.) {
3390  //cout<<"666 kcountHBnegativedirectionDigi3 = "<<kcountHBnegativedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
3391  c3x5->cd(kcountHBnegativedirectionDigi3);
3392  HBnegativedirectionDigi3->SetMarkerStyle(20);
3393  HBnegativedirectionDigi3->SetMarkerSize(0.4);
3394  HBnegativedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
3395  HBnegativedirectionDigi3->SetXTitle("HBnegativedirectionDigi3 \b");
3396  HBnegativedirectionDigi3->SetMarkerColor(2);
3397  HBnegativedirectionDigi3->SetLineColor(0);
3398  gPad->SetGridy();
3399  gPad->SetGridx();
3400  // gPad->SetLogy();
3401  if (kcountHBnegativedirectionDigi3 == 1)
3402  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
3403  if (kcountHBnegativedirectionDigi3 == 2)
3404  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
3405  if (kcountHBnegativedirectionDigi3 == 3)
3406  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
3407  if (kcountHBnegativedirectionDigi3 == 4)
3408  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
3409  if (kcountHBnegativedirectionDigi3 == 5)
3410  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
3411  if (kcountHBnegativedirectionDigi3 == 6)
3412  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
3413  if (kcountHBnegativedirectionDigi3 == 7)
3414  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
3415  if (kcountHBnegativedirectionDigi3 == 8)
3416  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
3417  if (kcountHBnegativedirectionDigi3 == 9)
3418  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
3419  if (kcountHBnegativedirectionDigi3 == 10)
3420  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
3421  if (kcountHBnegativedirectionDigi3 == 11)
3422  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
3423  if (kcountHBnegativedirectionDigi3 == 12)
3424  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
3425  if (kcountHBnegativedirectionDigi3 == 13)
3426  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
3427  if (kcountHBnegativedirectionDigi3 == 14)
3428  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
3429  if (kcountHBnegativedirectionDigi3 == 15)
3430  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
3431  if (kcountHBnegativedirectionDigi3 == 16)
3432  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
3433 
3434  HBnegativedirectionDigi3->Draw("Error");
3435  kcountHBnegativedirectionDigi3++;
3436  if (kcountHBnegativedirectionDigi3 > 16)
3437  break; // 4x6 = 24
3438  } //ccctest>0
3439 
3440  } // for i
3441  } //if(jeta-41 < 0 )
3442  } //for jeta
3444  c3x5->Update();
3445  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
3446  c3x5->Clear();
3447  // clean-up
3448  if (h2CeffHBnegativedirectionDigi3)
3449  delete h2CeffHBnegativedirectionDigi3;
3450  //========================================================================================== 1117
3451  //======================================================================
3452  //======================================================================1D plot: R vs phi , different eta, depth=4
3453  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
3454  c3x5->Clear();
3456  c3x5->Divide(4, 4);
3457  c3x5->cd(1);
3458  int kcountHBnegativedirectionDigi4 = 1;
3459  TH1F *h2CeffHBnegativedirectionDigi4 = new TH1F("h2CeffHBnegativedirectionDigi4", "", nphi, 0., 72.);
3460 
3461  for (int jeta = 0; jeta < njeta; jeta++) {
3462  // negativedirectionDigi:
3463  if (jeta - 41 < 0) {
3464  // for (int i=0;i<ndepth;i++) {
3465  // depth=4
3466  for (int i = 3; i < 4; i++) {
3467  TH1F *HBnegativedirectionDigi4 = (TH1F *)h2CeffHBnegativedirectionDigi4->Clone("twod1");
3468 
3469  float ccctest = 0; // to avoid empty massive elements
3470  for (int jphi = 0; jphi < nphi; jphi++) {
3471  double ccc1 = adigiHB[i][jeta][jphi];
3472  if (ccc1 != 0.) {
3473  HBnegativedirectionDigi4->Fill(jphi, ccc1);
3474  ccctest = 1.; //HBnegativedirectionDigi4->SetBinError(i,0.01);
3475  }
3476  } // for jphi
3477  if (ccctest > 0.) {
3478  //cout<<"777 kcountHBnegativedirectionDigi4 = "<<kcountHBnegativedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
3479  c3x5->cd(kcountHBnegativedirectionDigi4);
3480  HBnegativedirectionDigi4->SetMarkerStyle(20);
3481  HBnegativedirectionDigi4->SetMarkerSize(0.4);
3482  HBnegativedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
3483  HBnegativedirectionDigi4->SetXTitle("HBnegativedirectionDigi4 \b");
3484  HBnegativedirectionDigi4->SetMarkerColor(2);
3485  HBnegativedirectionDigi4->SetLineColor(0);
3486  gPad->SetGridy();
3487  gPad->SetGridx();
3488  // gPad->SetLogy();
3489  if (kcountHBnegativedirectionDigi4 == 1)
3490  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
3491  if (kcountHBnegativedirectionDigi4 == 2)
3492  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
3493  if (kcountHBnegativedirectionDigi4 == 3)
3494  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
3495  if (kcountHBnegativedirectionDigi4 == 4)
3496  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
3497  if (kcountHBnegativedirectionDigi4 == 5)
3498  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
3499  if (kcountHBnegativedirectionDigi4 == 6)
3500  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
3501  if (kcountHBnegativedirectionDigi4 == 7)
3502  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
3503  if (kcountHBnegativedirectionDigi4 == 8)
3504  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
3505  if (kcountHBnegativedirectionDigi4 == 9)
3506  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
3507  if (kcountHBnegativedirectionDigi4 == 10)
3508  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
3509  if (kcountHBnegativedirectionDigi4 == 11)
3510  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
3511  if (kcountHBnegativedirectionDigi4 == 12)
3512  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
3513  if (kcountHBnegativedirectionDigi4 == 13)
3514  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
3515  if (kcountHBnegativedirectionDigi4 == 14)
3516  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
3517  if (kcountHBnegativedirectionDigi4 == 15)
3518  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
3519  if (kcountHBnegativedirectionDigi4 == 16)
3520  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
3521  HBnegativedirectionDigi4->Draw("Error");
3522  kcountHBnegativedirectionDigi4++;
3523  if (kcountHBnegativedirectionDigi4 > 16)
3524  break; // 4x6 = 24
3525  } //ccctest>0
3526 
3527  } // for i
3528  } //if(jeta-41 < 0 )
3529  } //for jeta
3531  c3x5->Update();
3532  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
3533  c3x5->Clear();
3534  // clean-up
3535  if (h2CeffHBnegativedirectionDigi4)
3536  delete h2CeffHBnegativedirectionDigi4;
3537 
3538  //======================================================================================================================
3539  //======================================================================================================================
3540  //======================================================================================================================
3541  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
3542 
3543  //cout<<" Start Vaiance: preparation *****" <<endl;
3544  TH2F *digiVariance1HB1 = (TH2F *)hfile->Get("h_amplitudechannel2_HB1");
3545  TH2F *digiVariance0HB1 = (TH2F *)hfile->Get("h_amplitudechannel0_HB1");
3546  TH2F *digiVarianceHB1 = (TH2F *)digiVariance1HB1->Clone("digiVarianceHB1");
3547  digiVarianceHB1->Divide(digiVariance1HB1, digiVariance0HB1, 1, 1, "B");
3548  TH2F *digiVariance1HB2 = (TH2F *)hfile->Get("h_amplitudechannel2_HB2");
3549  TH2F *digiVariance0HB2 = (TH2F *)hfile->Get("h_amplitudechannel0_HB2");
3550  TH2F *digiVarianceHB2 = (TH2F *)digiVariance1HB2->Clone("digiVarianceHB2");
3551  digiVarianceHB2->Divide(digiVariance1HB2, digiVariance0HB2, 1, 1, "B");
3552  TH2F *digiVariance1HB3 = (TH2F *)hfile->Get("h_amplitudechannel2_HB3");
3553  TH2F *digiVariance0HB3 = (TH2F *)hfile->Get("h_amplitudechannel0_HB3");
3554  TH2F *digiVarianceHB3 = (TH2F *)digiVariance1HB3->Clone("digiVarianceHB3");
3555  digiVarianceHB3->Divide(digiVariance1HB3, digiVariance0HB3, 1, 1, "B");
3556  TH2F *digiVariance1HB4 = (TH2F *)hfile->Get("h_amplitudechannel2_HB4");
3557  TH2F *digiVariance0HB4 = (TH2F *)hfile->Get("h_amplitudechannel0_HB4");
3558  TH2F *digiVarianceHB4 = (TH2F *)digiVariance1HB4->Clone("digiVarianceHB4");
3559  digiVarianceHB4->Divide(digiVariance1HB4, digiVariance0HB4, 1, 1, "B");
3560  //cout<<" Vaiance: preparation DONE *****" <<endl;
3561  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive digivarianceHB
3562  // = sum(R*R)/N - (sum(R)/N)**2
3563  for (int jeta = 0; jeta < njeta; jeta++) {
3564  //preparation for PHI normalization:
3565  double sumdigiHB0 = 0;
3566  int nsumdigiHB0 = 0;
3567  double sumdigiHB1 = 0;
3568  int nsumdigiHB1 = 0;
3569  double sumdigiHB2 = 0;
3570  int nsumdigiHB2 = 0;
3571  double sumdigiHB3 = 0;
3572  int nsumdigiHB3 = 0;
3573  for (int jphi = 0; jphi < njphi; jphi++) {
3574  digivarianceHB[0][jeta][jphi] = digiVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
3575  digivarianceHB[1][jeta][jphi] = digiVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
3576  digivarianceHB[2][jeta][jphi] = digiVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
3577  digivarianceHB[3][jeta][jphi] = digiVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
3578  if (digivarianceHB[0][jeta][jphi] > 0.) {
3579  sumdigiHB0 += digivarianceHB[0][jeta][jphi];
3580  ++nsumdigiHB0;
3581  }
3582  if (digivarianceHB[1][jeta][jphi] > 0.) {
3583  sumdigiHB1 += digivarianceHB[1][jeta][jphi];
3584  ++nsumdigiHB1;
3585  }
3586  if (digivarianceHB[2][jeta][jphi] > 0.) {
3587  sumdigiHB2 += digivarianceHB[2][jeta][jphi];
3588  ++nsumdigiHB2;
3589  }
3590  if (digivarianceHB[3][jeta][jphi] > 0.) {
3591  sumdigiHB3 += digivarianceHB[3][jeta][jphi];
3592  ++nsumdigiHB3;
3593  }
3594  } // phi
3595  // PHI normalization :
3596  for (int jphi = 0; jphi < njphi; jphi++) {
3597  if (digivarianceHB[0][jeta][jphi] > 0.)
3598  digivarianceHB[0][jeta][jphi] /= (sumdigiHB0 / nsumdigiHB0);
3599  if (digivarianceHB[1][jeta][jphi] > 0.)
3600  digivarianceHB[1][jeta][jphi] /= (sumdigiHB1 / nsumdigiHB1);
3601  if (digivarianceHB[2][jeta][jphi] > 0.)
3602  digivarianceHB[2][jeta][jphi] /= (sumdigiHB2 / nsumdigiHB2);
3603  if (digivarianceHB[3][jeta][jphi] > 0.)
3604  digivarianceHB[3][jeta][jphi] /= (sumdigiHB3 / nsumdigiHB3);
3605  } // phi
3606  // digivarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
3607  for (int jphi = 0; jphi < njphi; jphi++) {
3608  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
3609  digivarianceHB[0][jeta][jphi] -= adigiHB[0][jeta][jphi] * adigiHB[0][jeta][jphi];
3610  digivarianceHB[0][jeta][jphi] = fabs(digivarianceHB[0][jeta][jphi]);
3611  digivarianceHB[1][jeta][jphi] -= adigiHB[1][jeta][jphi] * adigiHB[1][jeta][jphi];
3612  digivarianceHB[1][jeta][jphi] = fabs(digivarianceHB[1][jeta][jphi]);
3613  digivarianceHB[2][jeta][jphi] -= adigiHB[2][jeta][jphi] * adigiHB[2][jeta][jphi];
3614  digivarianceHB[2][jeta][jphi] = fabs(digivarianceHB[2][jeta][jphi]);
3615  digivarianceHB[3][jeta][jphi] -= adigiHB[3][jeta][jphi] * adigiHB[3][jeta][jphi];
3616  digivarianceHB[3][jeta][jphi] = fabs(digivarianceHB[3][jeta][jphi]);
3617  }
3618  }
3619  //cout<<" Vaiance: DONE*****" <<endl;
3620  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
3621  //======================================================================
3622  //======================================================================
3623  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
3624  c1x1->Clear();
3626  c1x0->Divide(1, 1);
3627  c1x0->cd(1);
3628  TH2F *DefzDdigiHB42D = new TH2F("DefzDdigiHB42D", "", neta, -41., 41., nphi, 0., 72.);
3629  TH2F *DefzDdigiHB42D0 = new TH2F("DefzDdigiHB42D0", "", neta, -41., 41., nphi, 0., 72.);
3630  TH2F *DefzDdigiHB42DF = (TH2F *)DefzDdigiHB42D0->Clone("DefzDdigiHB42DF");
3631  for (int i = 0; i < ndepth; i++) {
3632  for (int jeta = 0; jeta < neta; jeta++) {
3633  for (int jphi = 0; jphi < nphi; jphi++) {
3634  double ccc1 = digivarianceHB[i][jeta][jphi];
3635  int k2plot = jeta - 41;
3636  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
3637  if (adigiHB[i][jeta][jphi] > 0.) {
3638  DefzDdigiHB42D->Fill(kkk, jphi, ccc1);
3639  DefzDdigiHB42D0->Fill(kkk, jphi, 1.);
3640  }
3641  }
3642  }
3643  }
3644  DefzDdigiHB42DF->Divide(DefzDdigiHB42D, DefzDdigiHB42D0, 1, 1, "B"); // average A
3645  // DefzDdigiHB1->Sumw2();
3646  gPad->SetGridy();
3647  gPad->SetGridx(); // gPad->SetLogz();
3648  DefzDdigiHB42DF->SetMarkerStyle(20);
3649  DefzDdigiHB42DF->SetMarkerSize(0.4);
3650  DefzDdigiHB42DF->GetZaxis()->SetLabelSize(0.08);
3651  DefzDdigiHB42DF->SetXTitle("<D>_depth #eta \b");
3652  DefzDdigiHB42DF->SetYTitle(" #phi \b");
3653  DefzDdigiHB42DF->SetZTitle("<D>_depth \b");
3654  DefzDdigiHB42DF->SetMarkerColor(2);
3655  DefzDdigiHB42DF->SetLineColor(
3656  0); // DefzDdigiHB42DF->SetMaximum(1.000); // DefzDdigiHB42DF->SetMinimum(1.0);
3657  DefzDdigiHB42DF->Draw("COLZ");
3659  c1x0->Update();
3660  c1x0->Print("DdigiGeneralD2PhiSymmetryHB.png");
3661  c1x0->Clear();
3662  // clean-up
3663  if (DefzDdigiHB42D)
3664  delete DefzDdigiHB42D;
3665  if (DefzDdigiHB42D0)
3666  delete DefzDdigiHB42D0;
3667  if (DefzDdigiHB42DF)
3668  delete DefzDdigiHB42DF;
3669  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
3670  //======================================================================
3671  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
3672  c1x1->Clear();
3674  c1x1->Divide(1, 1);
3675  c1x1->cd(1);
3676  TH1F *DefzDdigiHB41D = new TH1F("DefzDdigiHB41D", "", nphi, 0., 72.);
3677  TH1F *DefzDdigiHB41D0 = new TH1F("DefzDdigiHB41D0", "", nphi, 0., 72.);
3678  TH1F *DefzDdigiHB41DF = (TH1F *)DefzDdigiHB41D0->Clone("DefzDdigiHB41DF");
3679 
3680  for (int jphi = 0; jphi < nphi; jphi++) {
3681  for (int jeta = 0; jeta < neta; jeta++) {
3682  for (int i = 0; i < ndepth; i++) {
3683  double ccc1 = digivarianceHB[i][jeta][jphi];
3684  if (adigiHB[i][jeta][jphi] > 0.) {
3685  DefzDdigiHB41D->Fill(jphi, ccc1);
3686  DefzDdigiHB41D0->Fill(jphi, 1.);
3687  }
3688  }
3689  }
3690  }
3691  // DefzDdigiHB41D->Sumw2();DefzDdigiHB41D0->Sumw2();
3692 
3693  DefzDdigiHB41DF->Divide(DefzDdigiHB41D, DefzDdigiHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
3694  DefzDdigiHB41D0->Sumw2();
3695  // for (int jphi=1;jphi<73;jphi++) {DefzDdigiHB41DF->SetBinError(jphi,0.01);}
3696  gPad->SetGridy();
3697  gPad->SetGridx(); // gPad->SetLogz();
3698  DefzDdigiHB41DF->SetMarkerStyle(20);
3699  DefzDdigiHB41DF->SetMarkerSize(1.4);
3700  DefzDdigiHB41DF->GetZaxis()->SetLabelSize(0.08);
3701  DefzDdigiHB41DF->SetXTitle("#phi \b");
3702  DefzDdigiHB41DF->SetYTitle(" <D> \b");
3703  DefzDdigiHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
3704  DefzDdigiHB41DF->SetMarkerColor(4);
3705  DefzDdigiHB41DF->SetLineColor(4); // DefzDdigiHB41DF->SetMinimum(0.8); DefzDdigiHB41DF->SetMinimum(-0.015);
3706  DefzDdigiHB41DF->Draw("Error");
3708  c1x1->Update();
3709  c1x1->Print("DdigiGeneralD1PhiSymmetryHB.png");
3710  c1x1->Clear();
3711  // clean-up
3712  if (DefzDdigiHB41D)
3713  delete DefzDdigiHB41D;
3714  if (DefzDdigiHB41D0)
3715  delete DefzDdigiHB41D0;
3716  if (DefzDdigiHB41DF)
3717  delete DefzDdigiHB41DF;
3718 
3719  //========================================================================================== 14
3720  //======================================================================
3721  //======================================================================1D plot: D vs phi , different eta, depth=1
3722  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
3723  c3x5->Clear();
3725  c3x5->Divide(4, 4);
3726  c3x5->cd(1);
3727  int kcountHBpositivedirectionDigiD1 = 1;
3728  TH1F *h2CeffHBpositivedirectionDigiD1 = new TH1F("h2CeffHBpositivedirectionDigiD1", "", nphi, 0., 72.);
3729 
3730  for (int jeta = 0; jeta < njeta; jeta++) {
3731  // positivedirectionDigiD:
3732  if (jeta - 41 >= 0) {
3733  // for (int i=0;i<ndepth;i++) {
3734  // depth=1
3735  for (int i = 0; i < 1; i++) {
3736  TH1F *HBpositivedirectionDigiD1 = (TH1F *)h2CeffHBpositivedirectionDigiD1->Clone("twod1");
3737 
3738  float ccctest = 0; // to avoid empty massive elements
3739  for (int jphi = 0; jphi < nphi; jphi++) {
3740  double ccc1 = digivarianceHB[i][jeta][jphi];
3741  if (adigiHB[i][jeta][jphi] > 0.) {
3742  HBpositivedirectionDigiD1->Fill(jphi, ccc1);
3743  ccctest = 1.; //HBpositivedirectionDigiD1->SetBinError(i,0.01);
3744  }
3745  } // for jphi
3746  if (ccctest > 0.) {
3747  //cout<<"1414 kcountHBpositivedirectionDigiD1 = "<<kcountHBpositivedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
3748  c3x5->cd(kcountHBpositivedirectionDigiD1);
3749  HBpositivedirectionDigiD1->SetMarkerStyle(20);
3750  HBpositivedirectionDigiD1->SetMarkerSize(0.4);
3751  HBpositivedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
3752  HBpositivedirectionDigiD1->SetXTitle("HBpositivedirectionDigiD1 \b");
3753  HBpositivedirectionDigiD1->SetMarkerColor(2);
3754  HBpositivedirectionDigiD1->SetLineColor(0);
3755  gPad->SetGridy();
3756  gPad->SetGridx();
3757  // gPad->SetLogy();
3758  if (kcountHBpositivedirectionDigiD1 == 1)
3759  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
3760  if (kcountHBpositivedirectionDigiD1 == 2)
3761  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
3762  if (kcountHBpositivedirectionDigiD1 == 3)
3763  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
3764  if (kcountHBpositivedirectionDigiD1 == 4)
3765  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
3766  if (kcountHBpositivedirectionDigiD1 == 5)
3767  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
3768  if (kcountHBpositivedirectionDigiD1 == 6)
3769  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
3770  if (kcountHBpositivedirectionDigiD1 == 7)
3771  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
3772  if (kcountHBpositivedirectionDigiD1 == 8)
3773  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
3774  if (kcountHBpositivedirectionDigiD1 == 9)
3775  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
3776  if (kcountHBpositivedirectionDigiD1 == 10)
3777  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
3778  if (kcountHBpositivedirectionDigiD1 == 11)
3779  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
3780  if (kcountHBpositivedirectionDigiD1 == 12)
3781  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
3782  if (kcountHBpositivedirectionDigiD1 == 13)
3783  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
3784  if (kcountHBpositivedirectionDigiD1 == 14)
3785  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
3786  if (kcountHBpositivedirectionDigiD1 == 15)
3787  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
3788  if (kcountHBpositivedirectionDigiD1 == 16)
3789  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
3790  HBpositivedirectionDigiD1->Draw("Error");
3791  kcountHBpositivedirectionDigiD1++;
3792  if (kcountHBpositivedirectionDigiD1 > 16)
3793  break; // 4x6 = 24
3794  } //ccctest>0
3795 
3796  } // for i
3797  } //if(jeta-41 >= 0)
3798  } //for jeta
3800  c3x5->Update();
3801  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
3802  c3x5->Clear();
3803  // clean-up
3804  if (h2CeffHBpositivedirectionDigiD1)
3805  delete h2CeffHBpositivedirectionDigiD1;
3806  //========================================================================================== 15
3807  //======================================================================
3808  //======================================================================1D plot: D vs phi , different eta, depth=2
3809  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
3810  c3x5->Clear();
3811  c3x5->Divide(4, 4);
3812  c3x5->cd(1);
3813  int kcountHBpositivedirectionDigiD2 = 1;
3814  TH1F *h2CeffHBpositivedirectionDigiD2 = new TH1F("h2CeffHBpositivedirectionDigiD2", "", nphi, 0., 72.);
3815 
3816  for (int jeta = 0; jeta < njeta; jeta++) {
3817  // positivedirectionDigiD:
3818  if (jeta - 41 >= 0) {
3819  // for (int i=0;i<ndepth;i++) {
3820  // depth=2
3821  for (int i = 1; i < 2; i++) {
3822  TH1F *HBpositivedirectionDigiD2 = (TH1F *)h2CeffHBpositivedirectionDigiD2->Clone("twod1");
3823 
3824  float ccctest = 0; // to avoid empty massive elements
3825  for (int jphi = 0; jphi < nphi; jphi++) {
3826  double ccc1 = digivarianceHB[i][jeta][jphi];
3827  if (adigiHB[i][jeta][jphi] > 0.) {
3828  HBpositivedirectionDigiD2->Fill(jphi, ccc1);
3829  ccctest = 1.; //HBpositivedirectionDigiD2->SetBinError(i,0.01);
3830  }
3831  } // for jphi
3832  if (ccctest > 0.) {
3833  //cout<<"1515 kcountHBpositivedirectionDigiD2 = "<<kcountHBpositivedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
3834  c3x5->cd(kcountHBpositivedirectionDigiD2);
3835  HBpositivedirectionDigiD2->SetMarkerStyle(20);
3836  HBpositivedirectionDigiD2->SetMarkerSize(0.4);
3837  HBpositivedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
3838  HBpositivedirectionDigiD2->SetXTitle("HBpositivedirectionDigiD2 \b");
3839  HBpositivedirectionDigiD2->SetMarkerColor(2);
3840  HBpositivedirectionDigiD2->SetLineColor(0);
3841  gPad->SetGridy();
3842  gPad->SetGridx();
3843  // gPad->SetLogy();
3844  if (kcountHBpositivedirectionDigiD2 == 1)
3845  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
3846  if (kcountHBpositivedirectionDigiD2 == 2)
3847  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
3848  if (kcountHBpositivedirectionDigiD2 == 3)
3849  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
3850  if (kcountHBpositivedirectionDigiD2 == 4)
3851  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
3852  if (kcountHBpositivedirectionDigiD2 == 5)
3853  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
3854  if (kcountHBpositivedirectionDigiD2 == 6)
3855  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
3856  if (kcountHBpositivedirectionDigiD2 == 7)
3857  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
3858  if (kcountHBpositivedirectionDigiD2 == 8)
3859  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
3860  if (kcountHBpositivedirectionDigiD2 == 9)
3861  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
3862  if (kcountHBpositivedirectionDigiD2 == 10)
3863  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
3864  if (kcountHBpositivedirectionDigiD2 == 11)
3865  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
3866  if (kcountHBpositivedirectionDigiD2 == 12)
3867  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
3868  if (kcountHBpositivedirectionDigiD2 == 13)
3869  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
3870  if (kcountHBpositivedirectionDigiD2 == 14)
3871  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
3872  if (kcountHBpositivedirectionDigiD2 == 15)
3873  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
3874  if (kcountHBpositivedirectionDigiD2 == 16)
3875  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
3876  HBpositivedirectionDigiD2->Draw("Error");
3877  kcountHBpositivedirectionDigiD2++;
3878  if (kcountHBpositivedirectionDigiD2 > 16)
3879  break; // 4x6 = 24
3880  } //ccctest>0
3881 
3882  } // for i
3883  } //if(jeta-41 >= 0)
3884  } //for jeta
3886  c3x5->Update();
3887  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
3888  c3x5->Clear();
3889  // clean-up
3890  if (h2CeffHBpositivedirectionDigiD2)
3891  delete h2CeffHBpositivedirectionDigiD2;
3892  //========================================================================================== 16
3893  //======================================================================
3894  //======================================================================1D plot: D vs phi , different eta, depth=3
3895  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
3896  c3x5->Clear();
3897  c3x5->Divide(4, 4);
3898  c3x5->cd(1);
3899  int kcountHBpositivedirectionDigiD3 = 1;
3900  TH1F *h2CeffHBpositivedirectionDigiD3 = new TH1F("h2CeffHBpositivedirectionDigiD3", "", nphi, 0., 72.);
3901 
3902  for (int jeta = 0; jeta < njeta; jeta++) {
3903  // positivedirectionDigiD:
3904  if (jeta - 41 >= 0) {
3905  // for (int i=0;i<ndepth;i++) {
3906  // depth=3
3907  for (int i = 2; i < 3; i++) {
3908  TH1F *HBpositivedirectionDigiD3 = (TH1F *)h2CeffHBpositivedirectionDigiD3->Clone("twod1");
3909 
3910  float ccctest = 0; // to avoid empty massive elements
3911  for (int jphi = 0; jphi < nphi; jphi++) {
3912  double ccc1 = digivarianceHB[i][jeta][jphi];
3913  if (adigiHB[i][jeta][jphi] > 0.) {
3914  HBpositivedirectionDigiD3->Fill(jphi, ccc1);
3915  ccctest = 1.; //HBpositivedirectionDigiD3->SetBinError(i,0.01);
3916  }
3917  } // for jphi
3918  if (ccctest > 0.) {
3919  //cout<<"1616 kcountHBpositivedirectionDigiD3 = "<<kcountHBpositivedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
3920  c3x5->cd(kcountHBpositivedirectionDigiD3);
3921  HBpositivedirectionDigiD3->SetMarkerStyle(20);
3922  HBpositivedirectionDigiD3->SetMarkerSize(0.4);
3923  HBpositivedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
3924  HBpositivedirectionDigiD3->SetXTitle("HBpositivedirectionDigiD3 \b");
3925  HBpositivedirectionDigiD3->SetMarkerColor(2);
3926  HBpositivedirectionDigiD3->SetLineColor(0);
3927  gPad->SetGridy();
3928  gPad->SetGridx();
3929  // gPad->SetLogy();
3930  if (kcountHBpositivedirectionDigiD3 == 1)
3931  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
3932  if (kcountHBpositivedirectionDigiD3 == 2)
3933  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
3934  if (kcountHBpositivedirectionDigiD3 == 3)
3935  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
3936  if (kcountHBpositivedirectionDigiD3 == 4)
3937  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
3938  if (kcountHBpositivedirectionDigiD3 == 5)
3939  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
3940  if (kcountHBpositivedirectionDigiD3 == 6)
3941  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
3942  if (kcountHBpositivedirectionDigiD3 == 7)
3943  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
3944  if (kcountHBpositivedirectionDigiD3 == 8)
3945  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
3946  if (kcountHBpositivedirectionDigiD3 == 9)
3947  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
3948  if (kcountHBpositivedirectionDigiD3 == 10)
3949  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
3950  if (kcountHBpositivedirectionDigiD3 == 11)
3951  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
3952  if (kcountHBpositivedirectionDigiD3 == 12)
3953  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
3954  if (kcountHBpositivedirectionDigiD3 == 13)
3955  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
3956  if (kcountHBpositivedirectionDigiD3 == 14)
3957  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
3958  if (kcountHBpositivedirectionDigiD3 == 15)
3959  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
3960  if (kcountHBpositivedirectionDigiD3 == 16)
3961  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
3962  HBpositivedirectionDigiD3->Draw("Error");
3963  kcountHBpositivedirectionDigiD3++;
3964  if (kcountHBpositivedirectionDigiD3 > 16)
3965  break; // 4x6 = 24
3966  } //ccctest>0
3967 
3968  } // for i
3969  } //if(jeta-41 >= 0)
3970  } //for jeta
3972  c3x5->Update();
3973  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
3974  c3x5->Clear();
3975  // clean-up
3976  if (h2CeffHBpositivedirectionDigiD3)
3977  delete h2CeffHBpositivedirectionDigiD3;
3978  //========================================================================================== 17
3979  //======================================================================
3980  //======================================================================1D plot: D vs phi , different eta, depth=4
3981  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
3982  c3x5->Clear();
3983  c3x5->Divide(4, 4);
3984  c3x5->cd(1);
3985  int kcountHBpositivedirectionDigiD4 = 1;
3986  TH1F *h2CeffHBpositivedirectionDigiD4 = new TH1F("h2CeffHBpositivedirectionDigiD4", "", nphi, 0., 72.);
3987 
3988  for (int jeta = 0; jeta < njeta; jeta++) {
3989  // positivedirectionDigiD:
3990  if (jeta - 41 >= 0) {
3991  // for (int i=0;i<ndepth;i++) {
3992  // depth=4
3993  for (int i = 3; i < 4; i++) {
3994  TH1F *HBpositivedirectionDigiD4 = (TH1F *)h2CeffHBpositivedirectionDigiD4->Clone("twod1");
3995 
3996  float ccctest = 0; // to avoid empty massive elements
3997  for (int jphi = 0; jphi < nphi; jphi++) {
3998  double ccc1 = digivarianceHB[i][jeta][jphi];
3999  if (adigiHB[i][jeta][jphi] > 0.) {
4000  HBpositivedirectionDigiD4->Fill(jphi, ccc1);
4001  ccctest = 1.; //HBpositivedirectionDigiD4->SetBinError(i,0.01);
4002  }
4003  } // for jphi
4004  if (ccctest > 0.) {
4005  //cout<<"1717 kcountHBpositivedirectionDigiD4 = "<<kcountHBpositivedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
4006  c3x5->cd(kcountHBpositivedirectionDigiD4);
4007  HBpositivedirectionDigiD4->SetMarkerStyle(20);
4008  HBpositivedirectionDigiD4->SetMarkerSize(0.4);
4009  HBpositivedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
4010  HBpositivedirectionDigiD4->SetXTitle("HBpositivedirectionDigiD4 \b");
4011  HBpositivedirectionDigiD4->SetMarkerColor(2);
4012  HBpositivedirectionDigiD4->SetLineColor(0);
4013  gPad->SetGridy();
4014  gPad->SetGridx();
4015  // gPad->SetLogy();
4016  if (kcountHBpositivedirectionDigiD4 == 1)
4017  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
4018  if (kcountHBpositivedirectionDigiD4 == 2)
4019  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
4020  if (kcountHBpositivedirectionDigiD4 == 3)
4021  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
4022  if (kcountHBpositivedirectionDigiD4 == 4)
4023  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
4024  if (kcountHBpositivedirectionDigiD4 == 5)
4025  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
4026  if (kcountHBpositivedirectionDigiD4 == 6)
4027  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
4028  if (kcountHBpositivedirectionDigiD4 == 7)
4029  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
4030  if (kcountHBpositivedirectionDigiD4 == 8)
4031  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
4032  if (kcountHBpositivedirectionDigiD4 == 9)
4033  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
4034  if (kcountHBpositivedirectionDigiD4 == 10)
4035  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
4036  if (kcountHBpositivedirectionDigiD4 == 11)
4037  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
4038  if (kcountHBpositivedirectionDigiD4 == 12)
4039  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
4040  if (kcountHBpositivedirectionDigiD4 == 13)
4041  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
4042  if (kcountHBpositivedirectionDigiD4 == 14)
4043  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
4044  if (kcountHBpositivedirectionDigiD4 == 15)
4045  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
4046  if (kcountHBpositivedirectionDigiD4 == 16)
4047  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
4048  HBpositivedirectionDigiD4->Draw("Error");
4049  kcountHBpositivedirectionDigiD4++;
4050  if (kcountHBpositivedirectionDigiD4 > 16)
4051  break; // 4x6 = 24
4052  } //ccctest>0
4053 
4054  } // for i
4055  } //if(jeta-41 >= 0)
4056  } //for jeta
4058  c3x5->Update();
4059  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
4060  c3x5->Clear();
4061  // clean-up
4062  if (h2CeffHBpositivedirectionDigiD4)
4063  delete h2CeffHBpositivedirectionDigiD4;
4064 
4065  //========================================================================================== 22214
4066  //======================================================================
4067  //======================================================================1D plot: D vs phi , different eta, depth=1
4068  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
4069  c3x5->Clear();
4071  c3x5->Divide(4, 4);
4072  c3x5->cd(1);
4073  int kcountHBnegativedirectionDigiD1 = 1;
4074  TH1F *h2CeffHBnegativedirectionDigiD1 = new TH1F("h2CeffHBnegativedirectionDigiD1", "", nphi, 0., 72.);
4075 
4076  for (int jeta = 0; jeta < njeta; jeta++) {
4077  // negativedirectionDigiD:
4078  if (jeta - 41 < 0) {
4079  // for (int i=0;i<ndepth;i++) {
4080  // depth=1
4081  for (int i = 0; i < 1; i++) {
4082  TH1F *HBnegativedirectionDigiD1 = (TH1F *)h2CeffHBnegativedirectionDigiD1->Clone("twod1");
4083 
4084  float ccctest = 0; // to avoid empty massive elements
4085  for (int jphi = 0; jphi < nphi; jphi++) {
4086  double ccc1 = digivarianceHB[i][jeta][jphi];
4087  if (adigiHB[i][jeta][jphi] > 0.) {
4088  HBnegativedirectionDigiD1->Fill(jphi, ccc1);
4089  ccctest = 1.; //HBnegativedirectionDigiD1->SetBinError(i,0.01);
4090  }
4091  } // for jphi
4092  if (ccctest > 0.) {
4093  //cout<<"1414 kcountHBnegativedirectionDigiD1 = "<<kcountHBnegativedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
4094  c3x5->cd(kcountHBnegativedirectionDigiD1);
4095  HBnegativedirectionDigiD1->SetMarkerStyle(20);
4096  HBnegativedirectionDigiD1->SetMarkerSize(0.4);
4097  HBnegativedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
4098  HBnegativedirectionDigiD1->SetXTitle("HBnegativedirectionDigiD1 \b");
4099  HBnegativedirectionDigiD1->SetMarkerColor(2);
4100  HBnegativedirectionDigiD1->SetLineColor(0);
4101  gPad->SetGridy();
4102  gPad->SetGridx();
4103  // gPad->SetLogy();
4104  if (kcountHBnegativedirectionDigiD1 == 1)
4105  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-16; depth = 1 \b");
4106  if (kcountHBnegativedirectionDigiD1 == 2)
4107  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-15; depth = 1 \b");
4108  if (kcountHBnegativedirectionDigiD1 == 3)
4109  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-14; depth = 1 \b");
4110  if (kcountHBnegativedirectionDigiD1 == 4)
4111  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-13; depth = 1 \b");
4112  if (kcountHBnegativedirectionDigiD1 == 5)
4113  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-12; depth = 1 \b");
4114  if (kcountHBnegativedirectionDigiD1 == 6)
4115  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-11; depth = 1 \b");
4116  if (kcountHBnegativedirectionDigiD1 == 7)
4117  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-10; depth = 1 \b");
4118  if (kcountHBnegativedirectionDigiD1 == 8)
4119  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-9; depth = 1 \b");
4120  if (kcountHBnegativedirectionDigiD1 == 9)
4121  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-8; depth = 1 \b");
4122  if (kcountHBnegativedirectionDigiD1 == 10)
4123  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-7; depth = 1 \b");
4124  if (kcountHBnegativedirectionDigiD1 == 11)
4125  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-6; depth = 1 \b");
4126  if (kcountHBnegativedirectionDigiD1 == 12)
4127  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-5; depth = 1 \b");
4128  if (kcountHBnegativedirectionDigiD1 == 13)
4129  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-4; depth = 1 \b");
4130  if (kcountHBnegativedirectionDigiD1 == 14)
4131  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-3; depth = 1 \b");
4132  if (kcountHBnegativedirectionDigiD1 == 15)
4133  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-2; depth = 1 \b");
4134  if (kcountHBnegativedirectionDigiD1 == 16)
4135  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-1; depth = 1 \b");
4136  HBnegativedirectionDigiD1->Draw("Error");
4137  kcountHBnegativedirectionDigiD1++;
4138  if (kcountHBnegativedirectionDigiD1 > 16)
4139  break; // 4x6 = 24
4140  } //ccctest>0
4141 
4142  } // for i
4143  } //if(jeta-41 < 0)
4144  } //for jeta
4146  c3x5->Update();
4147  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
4148  c3x5->Clear();
4149  // clean-up
4150  if (h2CeffHBnegativedirectionDigiD1)
4151  delete h2CeffHBnegativedirectionDigiD1;
4152  //========================================================================================== 22215
4153  //======================================================================
4154  //======================================================================1D plot: D vs phi , different eta, depth=2
4155  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
4156  c3x5->Clear();
4157  c3x5->Divide(4, 4);
4158  c3x5->cd(1);
4159  int kcountHBnegativedirectionDigiD2 = 1;
4160  TH1F *h2CeffHBnegativedirectionDigiD2 = new TH1F("h2CeffHBnegativedirectionDigiD2", "", nphi, 0., 72.);
4161 
4162  for (int jeta = 0; jeta < njeta; jeta++) {
4163  // negativedirectionDigiD:
4164  if (jeta - 41 < 0) {
4165  // for (int i=0;i<ndepth;i++) {
4166  // depth=2
4167  for (int i = 1; i < 2; i++) {
4168  TH1F *HBnegativedirectionDigiD2 = (TH1F *)h2CeffHBnegativedirectionDigiD2->Clone("twod1");
4169 
4170  float ccctest = 0; // to avoid empty massive elements
4171  for (int jphi = 0; jphi < nphi; jphi++) {
4172  double ccc1 = digivarianceHB[i][jeta][jphi];
4173  if (adigiHB[i][jeta][jphi] > 0.) {
4174  HBnegativedirectionDigiD2->Fill(jphi, ccc1);
4175  ccctest = 1.; //HBnegativedirectionDigiD2->SetBinError(i,0.01);
4176  }
4177  } // for jphi
4178  if (ccctest > 0.) {
4179  //cout<<"1515 kcountHBnegativedirectionDigiD2 = "<<kcountHBnegativedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
4180  c3x5->cd(kcountHBnegativedirectionDigiD2);
4181  HBnegativedirectionDigiD2->SetMarkerStyle(20);
4182  HBnegativedirectionDigiD2->SetMarkerSize(0.4);
4183  HBnegativedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
4184  HBnegativedirectionDigiD2->SetXTitle("HBnegativedirectionDigiD2 \b");
4185  HBnegativedirectionDigiD2->SetMarkerColor(2);
4186  HBnegativedirectionDigiD2->SetLineColor(0);
4187  gPad->SetGridy();
4188  gPad->SetGridx();
4189  // gPad->SetLogy();
4190  if (kcountHBnegativedirectionDigiD2 == 1)
4191  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
4192  if (kcountHBnegativedirectionDigiD2 == 2)
4193  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
4194  if (kcountHBnegativedirectionDigiD2 == 3)
4195  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
4196  if (kcountHBnegativedirectionDigiD2 == 4)
4197  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
4198  if (kcountHBnegativedirectionDigiD2 == 5)
4199  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
4200  if (kcountHBnegativedirectionDigiD2 == 6)
4201  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
4202  if (kcountHBnegativedirectionDigiD2 == 7)
4203  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
4204  if (kcountHBnegativedirectionDigiD2 == 8)
4205  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-9; depth = 2 \b");
4206  if (kcountHBnegativedirectionDigiD2 == 9)
4207  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-8; depth = 2 \b");
4208  if (kcountHBnegativedirectionDigiD2 == 10)
4209  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-7; depth = 2 \b");
4210  if (kcountHBnegativedirectionDigiD2 == 11)
4211  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-6; depth = 2 \b");
4212  if (kcountHBnegativedirectionDigiD2 == 12)
4213  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-5; depth = 2 \b");
4214  if (kcountHBnegativedirectionDigiD2 == 13)
4215  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-4; depth = 2 \b");
4216  if (kcountHBnegativedirectionDigiD2 == 14)
4217  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-3; depth = 2 \b");
4218  if (kcountHBnegativedirectionDigiD2 == 15)
4219  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-2; depth = 2 \b");
4220  if (kcountHBnegativedirectionDigiD2 == 16)
4221  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-1; depth = 2 \b");
4222  HBnegativedirectionDigiD2->Draw("Error");
4223  kcountHBnegativedirectionDigiD2++;
4224  if (kcountHBnegativedirectionDigiD2 > 16)
4225  break; // 4x6 = 24
4226  } //ccctest>0
4227 
4228  } // for i
4229  } //if(jeta-41 < 0)
4230  } //for jeta
4232  c3x5->Update();
4233  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
4234  c3x5->Clear();
4235  // clean-up
4236  if (h2CeffHBnegativedirectionDigiD2)
4237  delete h2CeffHBnegativedirectionDigiD2;
4238  //========================================================================================== 22216
4239  //======================================================================
4240  //======================================================================1D plot: D vs phi , different eta, depth=3
4241  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
4242  c3x5->Clear();
4243  c3x5->Divide(4, 4);
4244  c3x5->cd(1);
4245  int kcountHBnegativedirectionDigiD3 = 1;
4246  TH1F *h2CeffHBnegativedirectionDigiD3 = new TH1F("h2CeffHBnegativedirectionDigiD3", "", nphi, 0., 72.);
4247 
4248  for (int jeta = 0; jeta < njeta; jeta++) {
4249  // negativedirectionDigiD:
4250  if (jeta - 41 < 0) {
4251  // for (int i=0;i<ndepth;i++) {
4252  // depth=3
4253  for (int i = 2; i < 3; i++) {
4254  TH1F *HBnegativedirectionDigiD3 = (TH1F *)h2CeffHBnegativedirectionDigiD3->Clone("twod1");
4255 
4256  float ccctest = 0; // to avoid empty massive elements
4257  for (int jphi = 0; jphi < nphi; jphi++) {
4258  double ccc1 = digivarianceHB[i][jeta][jphi];
4259  if (adigiHB[i][jeta][jphi] > 0.) {
4260  HBnegativedirectionDigiD3->Fill(jphi, ccc1);
4261  ccctest = 1.; //HBnegativedirectionDigiD3->SetBinError(i,0.01);
4262  }
4263  } // for jphi
4264  if (ccctest > 0.) {
4265  //cout<<"1616 kcountHBnegativedirectionDigiD3 = "<<kcountHBnegativedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
4266  c3x5->cd(kcountHBnegativedirectionDigiD3);
4267  HBnegativedirectionDigiD3->SetMarkerStyle(20);
4268  HBnegativedirectionDigiD3->SetMarkerSize(0.4);
4269  HBnegativedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
4270  HBnegativedirectionDigiD3->SetXTitle("HBnegativedirectionDigiD3 \b");
4271  HBnegativedirectionDigiD3->SetMarkerColor(2);
4272  HBnegativedirectionDigiD3->SetLineColor(0);
4273  gPad->SetGridy();
4274  gPad->SetGridx();
4275  // gPad->SetLogy();
4276  if (kcountHBnegativedirectionDigiD3 == 1)
4277  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
4278  if (kcountHBnegativedirectionDigiD3 == 2)
4279  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
4280  if (kcountHBnegativedirectionDigiD3 == 3)
4281  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
4282  if (kcountHBnegativedirectionDigiD3 == 4)
4283  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
4284  if (kcountHBnegativedirectionDigiD3 == 5)
4285  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
4286  if (kcountHBnegativedirectionDigiD3 == 6)
4287  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
4288  if (kcountHBnegativedirectionDigiD3 == 7)
4289  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
4290  if (kcountHBnegativedirectionDigiD3 == 8)
4291  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-9; depth = 3 \b");
4292  if (kcountHBnegativedirectionDigiD3 == 9)
4293  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-8; depth = 3 \b");
4294  if (kcountHBnegativedirectionDigiD3 == 10)
4295  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-7; depth = 3 \b");
4296  if (kcountHBnegativedirectionDigiD3 == 11)
4297  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-6; depth = 3 \b");
4298  if (kcountHBnegativedirectionDigiD3 == 12)
4299  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-5; depth = 3 \b");
4300  if (kcountHBnegativedirectionDigiD3 == 13)
4301  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-4; depth = 3 \b");
4302  if (kcountHBnegativedirectionDigiD3 == 14)
4303  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-3; depth = 3 \b");
4304  if (kcountHBnegativedirectionDigiD3 == 15)
4305  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-2; depth = 3 \b");
4306  if (kcountHBnegativedirectionDigiD3 == 16)
4307  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-1; depth = 3 \b");
4308  HBnegativedirectionDigiD3->Draw("Error");
4309  kcountHBnegativedirectionDigiD3++;
4310  if (kcountHBnegativedirectionDigiD3 > 16)
4311  break; // 4x6 = 24
4312  } //ccctest>0
4313 
4314  } // for i
4315  } //if(jeta-41 < 0)
4316  } //for jeta
4318  c3x5->Update();
4319  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
4320  c3x5->Clear();
4321  // clean-up
4322  if (h2CeffHBnegativedirectionDigiD3)
4323  delete h2CeffHBnegativedirectionDigiD3;
4324  //========================================================================================== 22217
4325  //======================================================================
4326  //======================================================================1D plot: D vs phi , different eta, depth=4
4327  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
4328  c3x5->Clear();
4329  c3x5->Divide(4, 4);
4330  c3x5->cd(1);
4331  int kcountHBnegativedirectionDigiD4 = 1;
4332  TH1F *h2CeffHBnegativedirectionDigiD4 = new TH1F("h2CeffHBnegativedirectionDigiD4", "", nphi, 0., 72.);
4333 
4334  for (int jeta = 0; jeta < njeta; jeta++) {
4335  // negativedirectionDigiD:
4336  if (jeta - 41 < 0) {
4337  // for (int i=0;i<ndepth;i++) {
4338  // depth=4
4339  for (int i = 3; i < 4; i++) {
4340  TH1F *HBnegativedirectionDigiD4 = (TH1F *)h2CeffHBnegativedirectionDigiD4->Clone("twod1");
4341 
4342  float ccctest = 0; // to avoid empty massive elements
4343  for (int jphi = 0; jphi < nphi; jphi++) {
4344  double ccc1 = digivarianceHB[i][jeta][jphi];
4345  if (adigiHB[i][jeta][jphi] > 0.) {
4346  HBnegativedirectionDigiD4->Fill(jphi, ccc1);
4347  ccctest = 1.; //HBnegativedirectionDigiD4->SetBinError(i,0.01);
4348  }
4349  } // for jphi
4350  if (ccctest > 0.) {
4351  //cout<<"1717 kcountHBnegativedirectionDigiD4 = "<<kcountHBnegativedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
4352  c3x5->cd(kcountHBnegativedirectionDigiD4);
4353  HBnegativedirectionDigiD4->SetMarkerStyle(20);
4354  HBnegativedirectionDigiD4->SetMarkerSize(0.4);
4355  HBnegativedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
4356  HBnegativedirectionDigiD4->SetXTitle("HBnegativedirectionDigiD4 \b");
4357  HBnegativedirectionDigiD4->SetMarkerColor(2);
4358  HBnegativedirectionDigiD4->SetLineColor(0);
4359  gPad->SetGridy();
4360  gPad->SetGridx();
4361  // gPad->SetLogy();
4362  if (kcountHBnegativedirectionDigiD4 == 1)
4363  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
4364  if (kcountHBnegativedirectionDigiD4 == 2)
4365  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
4366  if (kcountHBnegativedirectionDigiD4 == 3)
4367  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
4368  if (kcountHBnegativedirectionDigiD4 == 4)
4369  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
4370  if (kcountHBnegativedirectionDigiD4 == 5)
4371  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
4372  if (kcountHBnegativedirectionDigiD4 == 6)
4373  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
4374  if (kcountHBnegativedirectionDigiD4 == 7)
4375  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
4376  if (kcountHBnegativedirectionDigiD4 == 8)
4377  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-9; depth = 4 \b");
4378  if (kcountHBnegativedirectionDigiD4 == 9)
4379  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-8; depth = 4 \b");
4380  if (kcountHBnegativedirectionDigiD4 == 10)
4381  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-7; depth = 4 \b");
4382  if (kcountHBnegativedirectionDigiD4 == 11)
4383  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-6; depth = 4 \b");
4384  if (kcountHBnegativedirectionDigiD4 == 12)
4385  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-5; depth = 4 \b");
4386  if (kcountHBnegativedirectionDigiD4 == 13)
4387  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-4; depth = 4 \b");
4388  if (kcountHBnegativedirectionDigiD4 == 14)
4389  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-3; depth = 4 \b");
4390  if (kcountHBnegativedirectionDigiD4 == 15)
4391  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-2; depth = 4 \b");
4392  if (kcountHBnegativedirectionDigiD4 == 16)
4393  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-1; depth = 4 \b");
4394  HBnegativedirectionDigiD4->Draw("Error");
4395  kcountHBnegativedirectionDigiD4++;
4396  if (kcountHBnegativedirectionDigiD4 > 16)
4397  break; // 4x6 = 24
4398  } //ccctest>0
4399 
4400  } // for i
4401  } //if(jeta-41 < 0)
4402  } //for jeta
4404  c3x5->Update();
4405  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
4406  c3x5->Clear();
4407  // clean-up
4408  if (h2CeffHBnegativedirectionDigiD4)
4409  delete h2CeffHBnegativedirectionDigiD4;
4410 
4411  //===================================================================== END of Digi HB for phi-symmetry
4412  //===================================================================== END of Digi HB for phi-symmetry
4413  //===================================================================== END of Digi HB for phi-symmetry
4414 
4418  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
4419  //ndepth = k_max[3];
4420  ndepth = 7;
4421  // const int ndepth = 7;
4422  double adigihe[ndepth][njeta][njphi];
4423  double digivariancehe[ndepth][njeta][njphi];
4424  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Digi HE
4425  TH2F *amplitudechannel1HE1 = (TH2F *)hfile->Get("h_amplitudechannel1_HE1");
4426  TH2F *amplitudechannel0HE1 = (TH2F *)hfile->Get("h_amplitudechannel0_HE1");
4427  TH2F *amplitudechannelHE1 = (TH2F *)amplitudechannel1HE1->Clone("amplitudechannelHE1");
4428  amplitudechannelHE1->Divide(amplitudechannel1HE1, amplitudechannel0HE1, 1, 1, "B");
4429  TH2F *amplitudechannel1HE2 = (TH2F *)hfile->Get("h_amplitudechannel1_HE2");
4430  TH2F *amplitudechannel0HE2 = (TH2F *)hfile->Get("h_amplitudechannel0_HE2");
4431  TH2F *amplitudechannelHE2 = (TH2F *)amplitudechannel1HE2->Clone("amplitudechannelHE2");
4432  amplitudechannelHE2->Divide(amplitudechannel1HE2, amplitudechannel0HE2, 1, 1, "B");
4433  TH2F *amplitudechannel1HE3 = (TH2F *)hfile->Get("h_amplitudechannel1_HE3");
4434  TH2F *amplitudechannel0HE3 = (TH2F *)hfile->Get("h_amplitudechannel0_HE3");
4435  TH2F *amplitudechannelHE3 = (TH2F *)amplitudechannel1HE3->Clone("amplitudechannelHE3");
4436  amplitudechannelHE3->Divide(amplitudechannel1HE3, amplitudechannel0HE3, 1, 1, "B");
4437  TH2F *amplitudechannel1HE4 = (TH2F *)hfile->Get("h_amplitudechannel1_HE4");
4438  TH2F *amplitudechannel0HE4 = (TH2F *)hfile->Get("h_amplitudechannel0_HE4");
4439  TH2F *amplitudechannelHE4 = (TH2F *)amplitudechannel1HE4->Clone("amplitudechannelHE4");
4440  amplitudechannelHE4->Divide(amplitudechannel1HE4, amplitudechannel0HE4, 1, 1, "B");
4441  TH2F *amplitudechannel1HE5 = (TH2F *)hfile->Get("h_amplitudechannel1_HE5");
4442  TH2F *amplitudechannel0HE5 = (TH2F *)hfile->Get("h_amplitudechannel0_HE5");
4443  TH2F *amplitudechannelHE5 = (TH2F *)amplitudechannel1HE5->Clone("amplitudechannelHE5");
4444  amplitudechannelHE5->Divide(amplitudechannel1HE5, amplitudechannel0HE5, 1, 1, "B");
4445  TH2F *amplitudechannel1HE6 = (TH2F *)hfile->Get("h_amplitudechannel1_HE6");
4446  TH2F *amplitudechannel0HE6 = (TH2F *)hfile->Get("h_amplitudechannel0_HE6");
4447  TH2F *amplitudechannelHE6 = (TH2F *)amplitudechannel1HE6->Clone("amplitudechannelHE6");
4448  amplitudechannelHE6->Divide(amplitudechannel1HE6, amplitudechannel0HE6, 1, 1, "B");
4449  TH2F *amplitudechannel1HE7 = (TH2F *)hfile->Get("h_amplitudechannel1_HE7");
4450  TH2F *amplitudechannel0HE7 = (TH2F *)hfile->Get("h_amplitudechannel0_HE7");
4451  TH2F *amplitudechannelHE7 = (TH2F *)amplitudechannel1HE7->Clone("amplitudechannelHE7");
4452  amplitudechannelHE7->Divide(amplitudechannel1HE7, amplitudechannel0HE7, 1, 1, "B");
4453  for (int jeta = 0; jeta < njeta; jeta++) {
4454  //====================================================================== PHI normalization & put R into massive adigihe
4455  //preparation for PHI normalization:
4456  double sumdigiHE0 = 0;
4457  int nsumdigiHE0 = 0;
4458  double sumdigiHE1 = 0;
4459  int nsumdigiHE1 = 0;
4460  double sumdigiHE2 = 0;
4461  int nsumdigiHE2 = 0;
4462  double sumdigiHE3 = 0;
4463  int nsumdigiHE3 = 0;
4464  double sumdigiHE4 = 0;
4465  int nsumdigiHE4 = 0;
4466  double sumdigiHE5 = 0;
4467  int nsumdigiHE5 = 0;
4468  double sumdigiHE6 = 0;
4469  int nsumdigiHE6 = 0;
4470  for (int jphi = 0; jphi < njphi; jphi++) {
4471  adigihe[0][jeta][jphi] = amplitudechannelHE1->GetBinContent(jeta + 1, jphi + 1);
4472  adigihe[1][jeta][jphi] = amplitudechannelHE2->GetBinContent(jeta + 1, jphi + 1);
4473  adigihe[2][jeta][jphi] = amplitudechannelHE3->GetBinContent(jeta + 1, jphi + 1);
4474  adigihe[3][jeta][jphi] = amplitudechannelHE4->GetBinContent(jeta + 1, jphi + 1);
4475  adigihe[4][jeta][jphi] = amplitudechannelHE5->GetBinContent(jeta + 1, jphi + 1);
4476  adigihe[5][jeta][jphi] = amplitudechannelHE6->GetBinContent(jeta + 1, jphi + 1);
4477  adigihe[6][jeta][jphi] = amplitudechannelHE7->GetBinContent(jeta + 1, jphi + 1);
4478  if (adigihe[0][jeta][jphi] > 0.) {
4479  sumdigiHE0 += adigihe[0][jeta][jphi];
4480  ++nsumdigiHE0;
4481  }
4482  if (adigihe[1][jeta][jphi] > 0.) {
4483  sumdigiHE1 += adigihe[1][jeta][jphi];
4484  ++nsumdigiHE1;
4485  }
4486  if (adigihe[2][jeta][jphi] > 0.) {
4487  sumdigiHE2 += adigihe[2][jeta][jphi];
4488  ++nsumdigiHE2;
4489  }
4490  if (adigihe[3][jeta][jphi] > 0.) {
4491  sumdigiHE3 += adigihe[3][jeta][jphi];
4492  ++nsumdigiHE3;
4493  }
4494  if (adigihe[4][jeta][jphi] > 0.) {
4495  sumdigiHE4 += adigihe[4][jeta][jphi];
4496  ++nsumdigiHE4;
4497  }
4498  if (adigihe[5][jeta][jphi] > 0.) {
4499  sumdigiHE5 += adigihe[5][jeta][jphi];
4500  ++nsumdigiHE5;
4501  }
4502  if (adigihe[6][jeta][jphi] > 0.) {
4503  sumdigiHE6 += adigihe[6][jeta][jphi];
4504  ++nsumdigiHE6;
4505  }
4506  } // phi
4507  // PHI normalization:
4508  for (int jphi = 0; jphi < njphi; jphi++) {
4509  if (adigihe[0][jeta][jphi] > 0.)
4510  adigihe[0][jeta][jphi] /= (sumdigiHE0 / nsumdigiHE0);
4511  if (adigihe[1][jeta][jphi] > 0.)
4512  adigihe[1][jeta][jphi] /= (sumdigiHE1 / nsumdigiHE1);
4513  if (adigihe[2][jeta][jphi] > 0.)
4514  adigihe[2][jeta][jphi] /= (sumdigiHE2 / nsumdigiHE2);
4515  if (adigihe[3][jeta][jphi] > 0.)
4516  adigihe[3][jeta][jphi] /= (sumdigiHE3 / nsumdigiHE3);
4517  if (adigihe[4][jeta][jphi] > 0.)
4518  adigihe[4][jeta][jphi] /= (sumdigiHE4 / nsumdigiHE4);
4519  if (adigihe[5][jeta][jphi] > 0.)
4520  adigihe[5][jeta][jphi] /= (sumdigiHE5 / nsumdigiHE5);
4521  if (adigihe[6][jeta][jphi] > 0.)
4522  adigihe[6][jeta][jphi] /= (sumdigiHE6 / nsumdigiHE6);
4523  } // phi
4524  } //eta
4525  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
4526  //======================================================================
4527  //======================================================================
4528  //cout<<" R2D-eta/phi-plot: R, averaged over depthes *****" <<endl;
4529  c1x0->Clear();
4531  c1x0->Divide(1, 1);
4532  c1x0->cd(1);
4533  TH2F *GefzRdigiHE42D = new TH2F("GefzRdigiHE42D", "", neta, -41., 41., nphi, 0., 72.);
4534  TH2F *GefzRdigiHE42D0 = new TH2F("GefzRdigiHE42D0", "", neta, -41., 41., nphi, 0., 72.);
4535  TH2F *GefzRdigiHE42DF = (TH2F *)GefzRdigiHE42D0->Clone("GefzRdigiHE42DF");
4536  for (int i = 0; i < ndepth; i++) {
4537  for (int jeta = 0; jeta < neta; jeta++) {
4538  for (int jphi = 0; jphi < nphi; jphi++) {
4539  double ccc1 = adigihe[i][jeta][jphi];
4540  int k2plot = jeta - 41;
4541  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
4542  if (ccc1 != 0.) {
4543  GefzRdigiHE42D->Fill(kkk, jphi, ccc1);
4544  GefzRdigiHE42D0->Fill(kkk, jphi, 1.);
4545  }
4546  }
4547  }
4548  }
4549  GefzRdigiHE42DF->Divide(GefzRdigiHE42D, GefzRdigiHE42D0, 1, 1, "B"); // average A
4550  gPad->SetGridy();
4551  gPad->SetGridx(); // gPad->SetLogz();
4552  GefzRdigiHE42DF->SetMarkerStyle(20);
4553  GefzRdigiHE42DF->SetMarkerSize(0.4);
4554  GefzRdigiHE42DF->GetZaxis()->SetLabelSize(0.08);
4555  GefzRdigiHE42DF->SetXTitle("<R>_depth #eta \b");
4556  GefzRdigiHE42DF->SetYTitle(" #phi \b");
4557  GefzRdigiHE42DF->SetZTitle("<R>_depth \b");
4558  GefzRdigiHE42DF->SetMarkerColor(2);
4559  GefzRdigiHE42DF->SetLineColor(
4560  0); // GefzRdigiHE42DF->SetMaximum(1.000); // GefzRdigiHE42DF->SetMinimum(1.0);
4561  GefzRdigiHE42DF->Draw("COLZ");
4563  c1x0->Update();
4564  c1x0->Print("RdigiGeneralD2PhiSymmetryHE.png");
4565  c1x0->Clear();
4566  // clean-up
4567  if (GefzRdigiHE42D)
4568  delete GefzRdigiHE42D;
4569  if (GefzRdigiHE42D0)
4570  delete GefzRdigiHE42D0;
4571  if (GefzRdigiHE42DF)
4572  delete GefzRdigiHE42DF;
4573  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
4574  //======================================================================
4575  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
4576  c1x1->Clear();
4578  c1x1->Divide(1, 1);
4579  c1x1->cd(1);
4580  TH1F *GefzRdigiHE41D = new TH1F("GefzRdigiHE41D", "", nphi, 0., 72.);
4581  TH1F *GefzRdigiHE41D0 = new TH1F("GefzRdigiHE41D0", "", nphi, 0., 72.);
4582  TH1F *GefzRdigiHE41DF = (TH1F *)GefzRdigiHE41D0->Clone("GefzRdigiHE41DF");
4583  for (int jphi = 0; jphi < nphi; jphi++) {
4584  for (int jeta = 0; jeta < neta; jeta++) {
4585  for (int i = 0; i < ndepth; i++) {
4586  double ccc1 = adigihe[i][jeta][jphi];
4587  if (ccc1 != 0.) {
4588  GefzRdigiHE41D->Fill(jphi, ccc1);
4589  GefzRdigiHE41D0->Fill(jphi, 1.);
4590  }
4591  }
4592  }
4593  }
4594  GefzRdigiHE41DF->Divide(GefzRdigiHE41D, GefzRdigiHE41D0, 1, 1, "B"); // R averaged over depthes & eta
4595  GefzRdigiHE41D0->Sumw2();
4596  // for (int jphi=1;jphi<73;jphi++) {GefzRdigiHE41DF->SetBinError(jphi,0.01);}
4597  gPad->SetGridy();
4598  gPad->SetGridx(); // gPad->SetLogz();
4599  GefzRdigiHE41DF->SetMarkerStyle(20);
4600  GefzRdigiHE41DF->SetMarkerSize(1.4);
4601  GefzRdigiHE41DF->GetZaxis()->SetLabelSize(0.08);
4602  GefzRdigiHE41DF->SetXTitle("#phi \b");
4603  GefzRdigiHE41DF->SetYTitle(" <R> \b");
4604  GefzRdigiHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
4605  GefzRdigiHE41DF->SetMarkerColor(4);
4606  GefzRdigiHE41DF->SetLineColor(
4607  4); // GefzRdigiHE41DF->SetMinimum(0.8); // GefzRdigiHE41DF->SetMaximum(1.000);
4608  GefzRdigiHE41DF->Draw("Error");
4610  c1x1->Update();
4611  c1x1->Print("RdigiGeneralD1PhiSymmetryHE.png");
4612  c1x1->Clear();
4613  // clean-up
4614  if (GefzRdigiHE41D)
4615  delete GefzRdigiHE41D;
4616  if (GefzRdigiHE41D0)
4617  delete GefzRdigiHE41D0;
4618  if (GefzRdigiHE41DF)
4619  delete GefzRdigiHE41DF;
4620 
4621  //========================================================================================== 4
4622  //======================================================================
4623  //======================================================================1D plot: R vs phi , different eta, depth=1
4624  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
4625  c3x5->Clear();
4627  c3x5->Divide(3, 5);
4628  c3x5->cd(1);
4629  int kcountHEpositivedirectionDigi1 = 1;
4630  TH1F *h2CeffHEpositivedirectionDigi1 = new TH1F("h2CeffHEpositivedirectionDigi1", "", nphi, 0., 72.);
4631  for (int jeta = 0; jeta < njeta; jeta++) {
4632  // positivedirectionDigi:
4633  if (jeta - 41 >= 0) {
4634  // for (int i=0;i<ndepth;i++) {
4635  // depth=1
4636  for (int i = 0; i < 1; i++) {
4637  TH1F *HEpositivedirectionDigi1 = (TH1F *)h2CeffHEpositivedirectionDigi1->Clone("twod1");
4638  float ccctest = 0; // to avoid empty massive elements
4639  for (int jphi = 0; jphi < nphi; jphi++) {
4640  double ccc1 = adigihe[i][jeta][jphi];
4641  if (ccc1 != 0.) {
4642  HEpositivedirectionDigi1->Fill(jphi, ccc1);
4643  ccctest = 1.; //HEpositivedirectionDigi1->SetBinError(i,0.01);
4644  }
4645  } // for jphi
4646  if (ccctest > 0.) {
4647  // cout<<"444 kcountHEpositivedirectionDigi1 = "<<kcountHEpositivedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
4648  c3x5->cd(kcountHEpositivedirectionDigi1);
4649  HEpositivedirectionDigi1->SetMarkerStyle(20);
4650  HEpositivedirectionDigi1->SetMarkerSize(0.4);
4651  HEpositivedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
4652  HEpositivedirectionDigi1->SetXTitle("HEpositivedirectionDigi1 \b");
4653  HEpositivedirectionDigi1->SetMarkerColor(2);
4654  HEpositivedirectionDigi1->SetLineColor(0);
4655  gPad->SetGridy();
4656  gPad->SetGridx();
4657  // gPad->SetLogy();
4658  if (kcountHEpositivedirectionDigi1 == 1)
4659  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
4660  if (kcountHEpositivedirectionDigi1 == 2)
4661  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
4662  if (kcountHEpositivedirectionDigi1 == 3)
4663  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
4664  if (kcountHEpositivedirectionDigi1 == 4)
4665  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
4666  if (kcountHEpositivedirectionDigi1 == 5)
4667  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
4668  if (kcountHEpositivedirectionDigi1 == 6)
4669  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
4670  if (kcountHEpositivedirectionDigi1 == 7)
4671  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
4672  if (kcountHEpositivedirectionDigi1 == 8)
4673  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
4674  if (kcountHEpositivedirectionDigi1 == 9)
4675  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
4676  if (kcountHEpositivedirectionDigi1 == 10)
4677  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
4678  if (kcountHEpositivedirectionDigi1 == 11)
4679  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
4680  if (kcountHEpositivedirectionDigi1 == 12)
4681  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
4682  HEpositivedirectionDigi1->Draw("Error");
4683  kcountHEpositivedirectionDigi1++;
4684  if (kcountHEpositivedirectionDigi1 > 12)
4685  break; // 4x6 = 24
4686  } //ccctest>0
4687 
4688  } // for i
4689  } //if(jeta-41 >= 0)
4690  } //for jeta
4692  c3x5->Update();
4693  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
4694  c3x5->Clear();
4695  // clean-up
4696  if (h2CeffHEpositivedirectionDigi1)
4697  delete h2CeffHEpositivedirectionDigi1;
4698 
4699  //========================================================================================== 5
4700  //======================================================================
4701  //======================================================================1D plot: R vs phi , different eta, depth=2
4702  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
4703  c3x5->Clear();
4705  c3x5->Divide(3, 5);
4706  c3x5->cd(1);
4707  int kcountHEpositivedirectionDigi2 = 1;
4708  TH1F *h2CeffHEpositivedirectionDigi2 = new TH1F("h2CeffHEpositivedirectionDigi2", "", nphi, 0., 72.);
4709  for (int jeta = 0; jeta < njeta; jeta++) {
4710  // positivedirectionDigi:
4711  if (jeta - 41 >= 0) {
4712  // for (int i=0;i<ndepth;i++) {
4713  // depth=2
4714  for (int i = 1; i < 2; i++) {
4715  TH1F *HEpositivedirectionDigi2 = (TH1F *)h2CeffHEpositivedirectionDigi2->Clone("twod1");
4716  float ccctest = 0; // to avoid empty massive elements
4717  for (int jphi = 0; jphi < nphi; jphi++) {
4718  double ccc1 = adigihe[i][jeta][jphi];
4719  if (ccc1 != 0.) {
4720  HEpositivedirectionDigi2->Fill(jphi, ccc1);
4721  ccctest = 1.; //HEpositivedirectionDigi2->SetBinError(i,0.01);
4722  }
4723  } // for jphi
4724  if (ccctest > 0.) {
4725  //cout<<"555 kcountHEpositivedirectionDigi2 = "<<kcountHEpositivedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
4726  c3x5->cd(kcountHEpositivedirectionDigi2);
4727  HEpositivedirectionDigi2->SetMarkerStyle(20);
4728  HEpositivedirectionDigi2->SetMarkerSize(0.4);
4729  HEpositivedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
4730  HEpositivedirectionDigi2->SetXTitle("HEpositivedirectionDigi2 \b");
4731  HEpositivedirectionDigi2->SetMarkerColor(2);
4732  HEpositivedirectionDigi2->SetLineColor(0);
4733  gPad->SetGridy();
4734  gPad->SetGridx();
4735  // gPad->SetLogy();
4736  if (kcountHEpositivedirectionDigi2 == 1)
4737  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
4738  if (kcountHEpositivedirectionDigi2 == 2)
4739  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
4740  if (kcountHEpositivedirectionDigi2 == 3)
4741  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
4742  if (kcountHEpositivedirectionDigi2 == 4)
4743  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
4744  if (kcountHEpositivedirectionDigi2 == 5)
4745  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
4746  if (kcountHEpositivedirectionDigi2 == 6)
4747  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
4748  if (kcountHEpositivedirectionDigi2 == 7)
4749  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
4750  if (kcountHEpositivedirectionDigi2 == 8)
4751  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
4752  if (kcountHEpositivedirectionDigi2 == 9)
4753  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
4754  if (kcountHEpositivedirectionDigi2 == 10)
4755  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
4756  if (kcountHEpositivedirectionDigi2 == 11)
4757  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
4758  if (kcountHEpositivedirectionDigi2 == 12)
4759  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
4760  if (kcountHEpositivedirectionDigi2 == 13)
4761  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
4762  HEpositivedirectionDigi2->Draw("Error");
4763  kcountHEpositivedirectionDigi2++;
4764  if (kcountHEpositivedirectionDigi2 > 13)
4765  break; // 4x6 = 24
4766  } //ccctest>0
4767 
4768  } // for i
4769  } //if(jeta-41 >= 0)
4770  } //for jeta
4772  c3x5->Update();
4773  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
4774  c3x5->Clear();
4775  // clean-up
4776  if (h2CeffHEpositivedirectionDigi2)
4777  delete h2CeffHEpositivedirectionDigi2;
4778  //========================================================================================== 6
4779  //======================================================================
4780  //======================================================================1D plot: R vs phi , different eta, depth=3
4781  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
4782  c3x5->Clear();
4784  c3x5->Divide(3, 5);
4785  c3x5->cd(1);
4786  int kcountHEpositivedirectionDigi3 = 1;
4787  TH1F *h2CeffHEpositivedirectionDigi3 = new TH1F("h2CeffHEpositivedirectionDigi3", "", nphi, 0., 72.);
4788  for (int jeta = 0; jeta < njeta; jeta++) {
4789  // positivedirectionDigi:
4790  if (jeta - 41 >= 0) {
4791  // for (int i=0;i<ndepth;i++) {
4792  // depth=3
4793  for (int i = 2; i < 3; i++) {
4794  TH1F *HEpositivedirectionDigi3 = (TH1F *)h2CeffHEpositivedirectionDigi3->Clone("twod1");
4795  float ccctest = 0; // to avoid empty massive elements
4796  for (int jphi = 0; jphi < nphi; jphi++) {
4797  double ccc1 = adigihe[i][jeta][jphi];
4798  if (ccc1 != 0.) {
4799  HEpositivedirectionDigi3->Fill(jphi, ccc1);
4800  ccctest = 1.; //HEpositivedirectionDigi3->SetBinError(i,0.01);
4801  }
4802  } // for jphi
4803  if (ccctest > 0.) {
4804  //cout<<"666 kcountHEpositivedirectionDigi3 = "<<kcountHEpositivedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
4805  c3x5->cd(kcountHEpositivedirectionDigi3);
4806  HEpositivedirectionDigi3->SetMarkerStyle(20);
4807  HEpositivedirectionDigi3->SetMarkerSize(0.4);
4808  HEpositivedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
4809  HEpositivedirectionDigi3->SetXTitle("HEpositivedirectionDigi3 \b");
4810  HEpositivedirectionDigi3->SetMarkerColor(2);
4811  HEpositivedirectionDigi3->SetLineColor(0);
4812  gPad->SetGridy();
4813  gPad->SetGridx();
4814  // gPad->SetLogy();
4815  if (kcountHEpositivedirectionDigi3 == 1)
4816  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
4817  if (kcountHEpositivedirectionDigi3 == 2)
4818  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
4819  if (kcountHEpositivedirectionDigi3 == 3)
4820  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
4821  if (kcountHEpositivedirectionDigi3 == 4)
4822  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
4823  if (kcountHEpositivedirectionDigi3 == 5)
4824  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
4825  if (kcountHEpositivedirectionDigi3 == 6)
4826  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
4827  if (kcountHEpositivedirectionDigi3 == 7)
4828  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
4829  if (kcountHEpositivedirectionDigi3 == 8)
4830  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
4831  if (kcountHEpositivedirectionDigi3 == 9)
4832  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
4833  if (kcountHEpositivedirectionDigi3 == 10)
4834  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
4835  if (kcountHEpositivedirectionDigi3 == 11)
4836  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
4837  if (kcountHEpositivedirectionDigi3 == 12)
4838  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
4839  if (kcountHEpositivedirectionDigi3 == 13)
4840  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
4841  HEpositivedirectionDigi3->Draw("Error");
4842  kcountHEpositivedirectionDigi3++;
4843  if (kcountHEpositivedirectionDigi3 > 13)
4844  break; // 4x6 = 24
4845  } //ccctest>0
4846 
4847  } // for i
4848  } //if(jeta-41 >= 0)
4849  } //for jeta
4851  c3x5->Update();
4852  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
4853  c3x5->Clear();
4854  // clean-up
4855  if (h2CeffHEpositivedirectionDigi3)
4856  delete h2CeffHEpositivedirectionDigi3;
4857  //========================================================================================== 7
4858  //======================================================================
4859  //======================================================================1D plot: R vs phi , different eta, depth=4
4860  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
4861  c3x5->Clear();
4863  c3x5->Divide(3, 5);
4864  c3x5->cd(1);
4865  int kcountHEpositivedirectionDigi4 = 1;
4866  TH1F *h2CeffHEpositivedirectionDigi4 = new TH1F("h2CeffHEpositivedirectionDigi4", "", nphi, 0., 72.);
4867 
4868  for (int jeta = 0; jeta < njeta; jeta++) {
4869  // positivedirectionDigi:
4870  if (jeta - 41 >= 0) {
4871  // for (int i=0;i<ndepth;i++) {
4872  // depth=4
4873  for (int i = 3; i < 4; i++) {
4874  TH1F *HEpositivedirectionDigi4 = (TH1F *)h2CeffHEpositivedirectionDigi4->Clone("twod1");
4875 
4876  float ccctest = 0; // to avoid empty massive elements
4877  for (int jphi = 0; jphi < nphi; jphi++) {
4878  double ccc1 = adigihe[i][jeta][jphi];
4879  if (ccc1 != 0.) {
4880  HEpositivedirectionDigi4->Fill(jphi, ccc1);
4881  ccctest = 1.; //HEpositivedirectionDigi4->SetBinError(i,0.01);
4882  }
4883  } // for jphi
4884  if (ccctest > 0.) {
4885  //cout<<"777 kcountHEpositivedirectionDigi4 = "<<kcountHEpositivedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
4886  c3x5->cd(kcountHEpositivedirectionDigi4);
4887  HEpositivedirectionDigi4->SetMarkerStyle(20);
4888  HEpositivedirectionDigi4->SetMarkerSize(0.4);
4889  HEpositivedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
4890  HEpositivedirectionDigi4->SetXTitle("HEpositivedirectionDigi4 \b");
4891  HEpositivedirectionDigi4->SetMarkerColor(2);
4892  HEpositivedirectionDigi4->SetLineColor(0);
4893  gPad->SetGridy();
4894  gPad->SetGridx();
4895  // gPad->SetLogy();
4896  if (kcountHEpositivedirectionDigi4 == 1)
4897  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
4898  if (kcountHEpositivedirectionDigi4 == 2)
4899  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
4900  if (kcountHEpositivedirectionDigi4 == 3)
4901  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
4902  if (kcountHEpositivedirectionDigi4 == 4)
4903  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
4904  if (kcountHEpositivedirectionDigi4 == 5)
4905  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
4906  if (kcountHEpositivedirectionDigi4 == 6)
4907  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
4908  if (kcountHEpositivedirectionDigi4 == 7)
4909  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
4910  if (kcountHEpositivedirectionDigi4 == 8)
4911  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
4912  if (kcountHEpositivedirectionDigi4 == 9)
4913  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
4914  if (kcountHEpositivedirectionDigi4 == 10)
4915  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
4916  if (kcountHEpositivedirectionDigi4 == 11)
4917  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
4918  if (kcountHEpositivedirectionDigi4 == 12)
4919  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
4920  HEpositivedirectionDigi4->Draw("Error");
4921  kcountHEpositivedirectionDigi4++;
4922  if (kcountHEpositivedirectionDigi4 > 12)
4923  break; // 4x6 = 24
4924  } //ccctest>0
4925 
4926  } // for i
4927  } //if(jeta-41 >= 0)
4928  } //for jeta
4930  c3x5->Update();
4931  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
4932  c3x5->Clear();
4933  // clean-up
4934  if (h2CeffHEpositivedirectionDigi4)
4935  delete h2CeffHEpositivedirectionDigi4;
4936  //========================================================================================== 8
4937  //======================================================================
4938  //======================================================================1D plot: R vs phi , different eta, depth=5
4939  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
4940  c3x5->Clear();
4942  c3x5->Divide(3, 5);
4943  c3x5->cd(1);
4944  int kcountHEpositivedirectionDigi5 = 1;
4945  TH1F *h2CeffHEpositivedirectionDigi5 = new TH1F("h2CeffHEpositivedirectionDigi5", "", nphi, 0., 72.);
4946 
4947  for (int jeta = 0; jeta < njeta; jeta++) {
4948  // positivedirectionDigi:
4949  if (jeta - 41 >= 0) {
4950  // for (int i=0;i<ndepth;i++) {
4951  // depth=5
4952  for (int i = 4; i < 5; i++) {
4953  TH1F *HEpositivedirectionDigi5 = (TH1F *)h2CeffHEpositivedirectionDigi5->Clone("twod1");
4954 
4955  float ccctest = 0; // to avoid empty massive elements
4956  for (int jphi = 0; jphi < nphi; jphi++) {
4957  // cout<<"888 initial kcountHEpositivedirectionDigi5 = "<<kcountHEpositivedirectionDigi5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" adigihe[i][jeta][jphi]= "<< adigihe[i][jeta][jphi] <<" depth= "<< i <<endl;
4958 
4959  double ccc1 = adigihe[i][jeta][jphi];
4960  if (ccc1 != 0.) {
4961  HEpositivedirectionDigi5->Fill(jphi, ccc1);
4962  ccctest = 1.; //HEpositivedirectionDigi5->SetBinError(i,0.01);
4963  }
4964  } // for jphi
4965  if (ccctest > 0.) {
4966  //cout<<"888 kcountHEpositivedirectionDigi5 = "<<kcountHEpositivedirectionDigi5 <<" jeta-41= "<< jeta-41 <<endl;
4967  c3x5->cd(kcountHEpositivedirectionDigi5);
4968  HEpositivedirectionDigi5->SetMarkerStyle(20);
4969  HEpositivedirectionDigi5->SetMarkerSize(0.4);
4970  HEpositivedirectionDigi5->GetYaxis()->SetLabelSize(0.04);
4971  HEpositivedirectionDigi5->SetXTitle("HEpositivedirectionDigi5 \b");
4972  HEpositivedirectionDigi5->SetMarkerColor(2);
4973  HEpositivedirectionDigi5->SetLineColor(0);
4974  gPad->SetGridy();
4975  gPad->SetGridx();
4976  // gPad->SetLogy();
4977  if (kcountHEpositivedirectionDigi5 == 1)
4978  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
4979  if (kcountHEpositivedirectionDigi5 == 2)
4980  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
4981  if (kcountHEpositivedirectionDigi5 == 3)
4982  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
4983  if (kcountHEpositivedirectionDigi5 == 4)
4984  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
4985  if (kcountHEpositivedirectionDigi5 == 5)
4986  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
4987  if (kcountHEpositivedirectionDigi5 == 6)
4988  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
4989  if (kcountHEpositivedirectionDigi5 == 7)
4990  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
4991  if (kcountHEpositivedirectionDigi5 == 8)
4992  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
4993  if (kcountHEpositivedirectionDigi5 == 9)
4994  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
4995  if (kcountHEpositivedirectionDigi5 == 10)
4996  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
4997  if (kcountHEpositivedirectionDigi5 == 11)
4998  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
4999  HEpositivedirectionDigi5->Draw("Error");
5000  kcountHEpositivedirectionDigi5++;
5001  if (kcountHEpositivedirectionDigi5 > 11)
5002  break; // 4x6 = 24
5003  } //ccctest>0
5004 
5005  } // for i
5006  } //if(jeta-41 >= 0)
5007  } //for jeta
5009  c3x5->Update();
5010  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
5011  c3x5->Clear();
5012  // clean-up
5013  if (h2CeffHEpositivedirectionDigi5)
5014  delete h2CeffHEpositivedirectionDigi5;
5015  //========================================================================================== 9
5016  //======================================================================
5017  //======================================================================1D plot: R vs phi , different eta, depth=6
5018  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
5019  c3x5->Clear();
5021  c3x5->Divide(3, 5);
5022  c3x5->cd(1);
5023  int kcountHEpositivedirectionDigi6 = 1;
5024  TH1F *h2CeffHEpositivedirectionDigi6 = new TH1F("h2CeffHEpositivedirectionDigi6", "", nphi, 0., 72.);
5025 
5026  for (int jeta = 0; jeta < njeta; jeta++) {
5027  // positivedirectionDigi:
5028  if (jeta - 41 >= 0) {
5029  // for (int i=0;i<ndepth;i++) {
5030  // depth=6
5031  for (int i = 5; i < 6; i++) {
5032  TH1F *HEpositivedirectionDigi6 = (TH1F *)h2CeffHEpositivedirectionDigi6->Clone("twod1");
5033 
5034  float ccctest = 0; // to avoid empty massive elements
5035  for (int jphi = 0; jphi < nphi; jphi++) {
5036  double ccc1 = adigihe[i][jeta][jphi];
5037  if (ccc1 != 0.) {
5038  HEpositivedirectionDigi6->Fill(jphi, ccc1);
5039  ccctest = 1.; //HEpositivedirectionDigi6->SetBinError(i,0.01);
5040  }
5041  } // for jphi
5042  if (ccctest > 0.) {
5043  //cout<<"999 kcountHEpositivedirectionDigi6 = "<<kcountHEpositivedirectionDigi6 <<" jeta-41= "<< jeta-41 <<endl;
5044  c3x5->cd(kcountHEpositivedirectionDigi6);
5045  HEpositivedirectionDigi6->SetMarkerStyle(20);
5046  HEpositivedirectionDigi6->SetMarkerSize(0.4);
5047  HEpositivedirectionDigi6->GetYaxis()->SetLabelSize(0.04);
5048  HEpositivedirectionDigi6->SetXTitle("HEpositivedirectionDigi6 \b");
5049  HEpositivedirectionDigi6->SetMarkerColor(2);
5050  HEpositivedirectionDigi6->SetLineColor(0);
5051  gPad->SetGridy();
5052  gPad->SetGridx();
5053  // gPad->SetLogy();
5054  if (kcountHEpositivedirectionDigi6 == 1)
5055  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
5056  if (kcountHEpositivedirectionDigi6 == 2)
5057  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
5058  if (kcountHEpositivedirectionDigi6 == 3)
5059  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
5060  if (kcountHEpositivedirectionDigi6 == 4)
5061  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
5062  if (kcountHEpositivedirectionDigi6 == 5)
5063  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
5064  if (kcountHEpositivedirectionDigi6 == 6)
5065  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
5066  if (kcountHEpositivedirectionDigi6 == 7)
5067  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
5068  if (kcountHEpositivedirectionDigi6 == 8)
5069  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
5070  if (kcountHEpositivedirectionDigi6 == 9)
5071  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
5072  if (kcountHEpositivedirectionDigi6 == 10)
5073  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
5074  HEpositivedirectionDigi6->Draw("Error");
5075  kcountHEpositivedirectionDigi6++;
5076  if (kcountHEpositivedirectionDigi6 > 10)
5077  break; // 4x6 = 24
5078  } //ccctest>0
5079 
5080  } // for i
5081  } //if(jeta-41 >= 0)
5082  } //for jeta
5084  c3x5->Update();
5085  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
5086  c3x5->Clear();
5087  // clean-up
5088  if (h2CeffHEpositivedirectionDigi6)
5089  delete h2CeffHEpositivedirectionDigi6;
5090  //========================================================================================== 10
5091  //======================================================================
5092  //======================================================================1D plot: R vs phi , different eta, depth=7
5093  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
5094  c3x5->Clear();
5096  c3x5->Divide(3, 5);
5097  c3x5->cd(1);
5098  int kcountHEpositivedirectionDigi7 = 1;
5099  TH1F *h2CeffHEpositivedirectionDigi7 = new TH1F("h2CeffHEpositivedirectionDigi7", "", nphi, 0., 72.);
5100 
5101  for (int jeta = 0; jeta < njeta; jeta++) {
5102  // positivedirectionDigi:
5103  if (jeta - 41 >= 0) {
5104  // for (int i=0;i<ndepth;i++) {
5105  // depth=7
5106  for (int i = 6; i < 7; i++) {
5107  TH1F *HEpositivedirectionDigi7 = (TH1F *)h2CeffHEpositivedirectionDigi7->Clone("twod1");
5108 
5109  float ccctest = 0; // to avoid empty massive elements
5110  for (int jphi = 0; jphi < nphi; jphi++) {
5111  double ccc1 = adigihe[i][jeta][jphi];
5112  if (ccc1 != 0.) {
5113  HEpositivedirectionDigi7->Fill(jphi, ccc1);
5114  ccctest = 1.; //HEpositivedirectionDigi7->SetBinError(i,0.01);
5115  }
5116  } // for jphi
5117  if (ccctest > 0.) {
5118  //cout<<"1010 kcountHEpositivedirectionDigi7 = "<<kcountHEpositivedirectionDigi7 <<" jeta-41= "<< jeta-41 <<endl;
5119  c3x5->cd(kcountHEpositivedirectionDigi7);
5120  HEpositivedirectionDigi7->SetMarkerStyle(20);
5121  HEpositivedirectionDigi7->SetMarkerSize(0.4);
5122  HEpositivedirectionDigi7->GetYaxis()->SetLabelSize(0.04);
5123  HEpositivedirectionDigi7->SetXTitle("HEpositivedirectionDigi7 \b");
5124  HEpositivedirectionDigi7->SetMarkerColor(2);
5125  HEpositivedirectionDigi7->SetLineColor(0);
5126  gPad->SetGridy();
5127  gPad->SetGridx();
5128  // gPad->SetLogy();
5129  if (kcountHEpositivedirectionDigi7 == 1)
5130  HEpositivedirectionDigi7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
5131  if (kcountHEpositivedirectionDigi7 == 2)
5132  HEpositivedirectionDigi7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
5133  if (kcountHEpositivedirectionDigi7 == 3)
5134  HEpositivedirectionDigi7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
5135  HEpositivedirectionDigi7->Draw("Error");
5136  kcountHEpositivedirectionDigi7++;
5137  if (kcountHEpositivedirectionDigi7 > 3)
5138  break; //
5139  } //ccctest>0
5140 
5141  } // for i
5142  } //if(jeta-41 >= 0)
5143  } //for jeta
5145  c3x5->Update();
5146  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
5147  c3x5->Clear();
5148  // clean-up
5149  if (h2CeffHEpositivedirectionDigi7)
5150  delete h2CeffHEpositivedirectionDigi7;
5151 
5153  //========================================================================================== 1114
5154  //======================================================================
5155  //======================================================================1D plot: R vs phi , different eta, depth=1
5156  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
5157  c3x5->Clear();
5159  c3x5->Divide(3, 5);
5160  c3x5->cd(1);
5161  int kcountHEnegativedirectionDigi1 = 1;
5162  TH1F *h2CeffHEnegativedirectionDigi1 = new TH1F("h2CeffHEnegativedirectionDigi1", "", nphi, 0., 72.);
5163  for (int jeta = 0; jeta < njeta; jeta++) {
5164  // negativedirectionDigi:
5165  if (jeta - 41 < 0) {
5166  // for (int i=0;i<ndepth;i++) {
5167  // depth=1
5168  for (int i = 0; i < 1; i++) {
5169  TH1F *HEnegativedirectionDigi1 = (TH1F *)h2CeffHEnegativedirectionDigi1->Clone("twod1");
5170  float ccctest = 0; // to avoid empty massive elements
5171  for (int jphi = 0; jphi < nphi; jphi++) {
5172  double ccc1 = adigihe[i][jeta][jphi];
5173  if (ccc1 != 0.) {
5174  HEnegativedirectionDigi1->Fill(jphi, ccc1);
5175  ccctest = 1.; //HEnegativedirectionDigi1->SetBinError(i,0.01);
5176  }
5177  } // for jphi
5178  if (ccctest > 0.) {
5179  // cout<<"444 kcountHEnegativedirectionDigi1 = "<<kcountHEnegativedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
5180  c3x5->cd(kcountHEnegativedirectionDigi1);
5181  HEnegativedirectionDigi1->SetMarkerStyle(20);
5182  HEnegativedirectionDigi1->SetMarkerSize(0.4);
5183  HEnegativedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
5184  HEnegativedirectionDigi1->SetXTitle("HEnegativedirectionDigi1 \b");
5185  HEnegativedirectionDigi1->SetMarkerColor(2);
5186  HEnegativedirectionDigi1->SetLineColor(0);
5187  gPad->SetGridy();
5188  gPad->SetGridx();
5189  // gPad->SetLogy();
5190  if (kcountHEnegativedirectionDigi1 == 1)
5191  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
5192  if (kcountHEnegativedirectionDigi1 == 2)
5193  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
5194  if (kcountHEnegativedirectionDigi1 == 3)
5195  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
5196  if (kcountHEnegativedirectionDigi1 == 4)
5197  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
5198  if (kcountHEnegativedirectionDigi1 == 5)
5199  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
5200  if (kcountHEnegativedirectionDigi1 == 6)
5201  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
5202  if (kcountHEnegativedirectionDigi1 == 7)
5203  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
5204  if (kcountHEnegativedirectionDigi1 == 8)
5205  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
5206  if (kcountHEnegativedirectionDigi1 == 9)
5207  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
5208  if (kcountHEnegativedirectionDigi1 == 10)
5209  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
5210  if (kcountHEnegativedirectionDigi1 == 11)
5211  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
5212  if (kcountHEnegativedirectionDigi1 == 12)
5213  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
5214  HEnegativedirectionDigi1->Draw("Error");
5215  kcountHEnegativedirectionDigi1++;
5216  if (kcountHEnegativedirectionDigi1 > 12)
5217  break; // 4x6 = 24
5218  } //ccctest>0
5219 
5220  } // for i
5221  } //if(jeta-41 < 0)
5222  } //for jeta
5224  c3x5->Update();
5225  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
5226  c3x5->Clear();
5227  // clean-up
5228  if (h2CeffHEnegativedirectionDigi1)
5229  delete h2CeffHEnegativedirectionDigi1;
5230 
5231  //========================================================================================== 1115
5232  //======================================================================
5233  //======================================================================1D plot: R vs phi , different eta, depth=2
5234  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
5235  c3x5->Clear();
5237  c3x5->Divide(3, 5);
5238  c3x5->cd(1);
5239  int kcountHEnegativedirectionDigi2 = 1;
5240  TH1F *h2CeffHEnegativedirectionDigi2 = new TH1F("h2CeffHEnegativedirectionDigi2", "", nphi, 0., 72.);
5241  for (int jeta = 0; jeta < njeta; jeta++) {
5242  // negativedirectionDigi:
5243  if (jeta - 41 < 0) {
5244  // for (int i=0;i<ndepth;i++) {
5245  // depth=2
5246  for (int i = 1; i < 2; i++) {
5247  TH1F *HEnegativedirectionDigi2 = (TH1F *)h2CeffHEnegativedirectionDigi2->Clone("twod1");
5248  float ccctest = 0; // to avoid empty massive elements
5249  for (int jphi = 0; jphi < nphi; jphi++) {
5250  double ccc1 = adigihe[i][jeta][jphi];
5251  if (ccc1 != 0.) {
5252  HEnegativedirectionDigi2->Fill(jphi, ccc1);
5253  ccctest = 1.; //HEnegativedirectionDigi2->SetBinError(i,0.01);
5254  }
5255  } // for jphi
5256  if (ccctest > 0.) {
5257  //cout<<"555 kcountHEnegativedirectionDigi2 = "<<kcountHEnegativedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
5258  c3x5->cd(kcountHEnegativedirectionDigi2);
5259  HEnegativedirectionDigi2->SetMarkerStyle(20);
5260  HEnegativedirectionDigi2->SetMarkerSize(0.4);
5261  HEnegativedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
5262  HEnegativedirectionDigi2->SetXTitle("HEnegativedirectionDigi2 \b");
5263  HEnegativedirectionDigi2->SetMarkerColor(2);
5264  HEnegativedirectionDigi2->SetLineColor(0);
5265  gPad->SetGridy();
5266  gPad->SetGridx();
5267  // gPad->SetLogy();
5268  if (kcountHEnegativedirectionDigi2 == 1)
5269  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
5270  if (kcountHEnegativedirectionDigi2 == 2)
5271  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
5272  if (kcountHEnegativedirectionDigi2 == 3)
5273  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
5274  if (kcountHEnegativedirectionDigi2 == 4)
5275  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
5276  if (kcountHEnegativedirectionDigi2 == 5)
5277  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
5278  if (kcountHEnegativedirectionDigi2 == 6)
5279  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
5280  if (kcountHEnegativedirectionDigi2 == 7)
5281  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
5282  if (kcountHEnegativedirectionDigi2 == 8)
5283  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
5284  if (kcountHEnegativedirectionDigi2 == 9)
5285  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
5286  if (kcountHEnegativedirectionDigi2 == 10)
5287  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
5288  if (kcountHEnegativedirectionDigi2 == 11)
5289  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
5290  if (kcountHEnegativedirectionDigi2 == 12)
5291  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
5292  if (kcountHEnegativedirectionDigi2 == 13)
5293  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
5294  HEnegativedirectionDigi2->Draw("Error");
5295  kcountHEnegativedirectionDigi2++;
5296  if (kcountHEnegativedirectionDigi2 > 13)
5297  break; // 4x6 = 24
5298  } //ccctest>0
5299 
5300  } // for i
5301  } //if(jeta-41 < 0)
5302  } //for jeta
5304  c3x5->Update();
5305  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
5306  c3x5->Clear();
5307  // clean-up
5308  if (h2CeffHEnegativedirectionDigi2)
5309  delete h2CeffHEnegativedirectionDigi2;
5310  //========================================================================================== 1116
5311  //======================================================================
5312  //======================================================================1D plot: R vs phi , different eta, depth=3
5313  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
5314  c3x5->Clear();
5316  c3x5->Divide(3, 5);
5317  c3x5->cd(1);
5318  int kcountHEnegativedirectionDigi3 = 1;
5319  TH1F *h2CeffHEnegativedirectionDigi3 = new TH1F("h2CeffHEnegativedirectionDigi3", "", nphi, 0., 72.);
5320  for (int jeta = 0; jeta < njeta; jeta++) {
5321  // negativedirectionDigi:
5322  if (jeta - 41 < 0) {
5323  // for (int i=0;i<ndepth;i++) {
5324  // depth=3
5325  for (int i = 2; i < 3; i++) {
5326  TH1F *HEnegativedirectionDigi3 = (TH1F *)h2CeffHEnegativedirectionDigi3->Clone("twod1");
5327  float ccctest = 0; // to avoid empty massive elements
5328  for (int jphi = 0; jphi < nphi; jphi++) {
5329  double ccc1 = adigihe[i][jeta][jphi];
5330  if (ccc1 != 0.) {
5331  HEnegativedirectionDigi3->Fill(jphi, ccc1);
5332  ccctest = 1.; //HEnegativedirectionDigi3->SetBinError(i,0.01);
5333  }
5334  } // for jphi
5335  if (ccctest > 0.) {
5336  //cout<<"666 kcountHEnegativedirectionDigi3 = "<<kcountHEnegativedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
5337  c3x5->cd(kcountHEnegativedirectionDigi3);
5338  HEnegativedirectionDigi3->SetMarkerStyle(20);
5339  HEnegativedirectionDigi3->SetMarkerSize(0.4);
5340  HEnegativedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
5341  HEnegativedirectionDigi3->SetXTitle("HEnegativedirectionDigi3 \b");
5342  HEnegativedirectionDigi3->SetMarkerColor(2);
5343  HEnegativedirectionDigi3->SetLineColor(0);
5344  gPad->SetGridy();
5345  gPad->SetGridx();
5346  // gPad->SetLogy();
5347  if (kcountHEnegativedirectionDigi3 == 1)
5348  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
5349  if (kcountHEnegativedirectionDigi3 == 2)
5350  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
5351  if (kcountHEnegativedirectionDigi3 == 3)
5352  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
5353  if (kcountHEnegativedirectionDigi3 == 4)
5354  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
5355  if (kcountHEnegativedirectionDigi3 == 5)
5356  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
5357  if (kcountHEnegativedirectionDigi3 == 6)
5358  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
5359  if (kcountHEnegativedirectionDigi3 == 7)
5360  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
5361  if (kcountHEnegativedirectionDigi3 == 8)
5362  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
5363  if (kcountHEnegativedirectionDigi3 == 9)
5364  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
5365  if (kcountHEnegativedirectionDigi3 == 10)
5366  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
5367  if (kcountHEnegativedirectionDigi3 == 11)
5368  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
5369  if (kcountHEnegativedirectionDigi3 == 12)
5370  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
5371  if (kcountHEnegativedirectionDigi3 == 13)
5372  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
5373  HEnegativedirectionDigi3->Draw("Error");
5374  kcountHEnegativedirectionDigi3++;
5375  if (kcountHEnegativedirectionDigi3 > 13)
5376  break; // 4x6 = 24
5377  } //ccctest>0
5378 
5379  } // for i
5380  } //if(jeta-41 < 0)
5381  } //for jeta
5383  c3x5->Update();
5384  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
5385  c3x5->Clear();
5386  // clean-up
5387  if (h2CeffHEnegativedirectionDigi3)
5388  delete h2CeffHEnegativedirectionDigi3;
5389  //========================================================================================== 1117
5390  //======================================================================
5391  //======================================================================1D plot: R vs phi , different eta, depth=4
5392  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
5393  c3x5->Clear();
5395  c3x5->Divide(3, 5);
5396  c3x5->cd(1);
5397  int kcountHEnegativedirectionDigi4 = 1;
5398  TH1F *h2CeffHEnegativedirectionDigi4 = new TH1F("h2CeffHEnegativedirectionDigi4", "", nphi, 0., 72.);
5399 
5400  for (int jeta = 0; jeta < njeta; jeta++) {
5401  // negativedirectionDigi:
5402  if (jeta - 41 < 0) {
5403  // for (int i=0;i<ndepth;i++) {
5404  // depth=4
5405  for (int i = 3; i < 4; i++) {
5406  TH1F *HEnegativedirectionDigi4 = (TH1F *)h2CeffHEnegativedirectionDigi4->Clone("twod1");
5407 
5408  float ccctest = 0; // to avoid empty massive elements
5409  for (int jphi = 0; jphi < nphi; jphi++) {
5410  double ccc1 = adigihe[i][jeta][jphi];
5411  if (ccc1 != 0.) {
5412  HEnegativedirectionDigi4->Fill(jphi, ccc1);
5413  ccctest = 1.; //HEnegativedirectionDigi4->SetBinError(i,0.01);
5414  }
5415  } // for jphi
5416  if (ccctest > 0.) {
5417  //cout<<"777 kcountHEnegativedirectionDigi4 = "<<kcountHEnegativedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
5418  c3x5->cd(kcountHEnegativedirectionDigi4);
5419  HEnegativedirectionDigi4->SetMarkerStyle(20);
5420  HEnegativedirectionDigi4->SetMarkerSize(0.4);
5421  HEnegativedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
5422  HEnegativedirectionDigi4->SetXTitle("HEnegativedirectionDigi4 \b");
5423  HEnegativedirectionDigi4->SetMarkerColor(2);
5424  HEnegativedirectionDigi4->SetLineColor(0);
5425  gPad->SetGridy();
5426  gPad->SetGridx();
5427  // gPad->SetLogy();
5428  if (kcountHEnegativedirectionDigi4 == 1)
5429  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
5430  if (kcountHEnegativedirectionDigi4 == 2)
5431  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
5432  if (kcountHEnegativedirectionDigi4 == 3)
5433  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
5434  if (kcountHEnegativedirectionDigi4 == 4)
5435  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
5436  if (kcountHEnegativedirectionDigi4 == 5)
5437  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
5438  if (kcountHEnegativedirectionDigi4 == 6)
5439  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
5440  if (kcountHEnegativedirectionDigi4 == 7)
5441  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
5442  if (kcountHEnegativedirectionDigi4 == 8)
5443  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
5444  if (kcountHEnegativedirectionDigi4 == 9)
5445  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
5446  if (kcountHEnegativedirectionDigi4 == 10)
5447  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
5448  if (kcountHEnegativedirectionDigi4 == 11)
5449  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
5450  if (kcountHEnegativedirectionDigi4 == 12)
5451  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
5452  HEnegativedirectionDigi4->Draw("Error");
5453  kcountHEnegativedirectionDigi4++;
5454  if (kcountHEnegativedirectionDigi4 > 12)
5455  break; // 4x6 = 24
5456  } //ccctest>0
5457 
5458  } // for i
5459  } //if(jeta-41 < 0)
5460  } //for jeta
5462  c3x5->Update();
5463  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
5464  c3x5->Clear();
5465  // clean-up
5466  if (h2CeffHEnegativedirectionDigi4)
5467  delete h2CeffHEnegativedirectionDigi4;
5468  //========================================================================================== 1118
5469  //======================================================================
5470  //======================================================================1D plot: R vs phi , different eta, depth=5
5471  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
5472  c3x5->Clear();
5474  c3x5->Divide(3, 5);
5475  c3x5->cd(1);
5476  int kcountHEnegativedirectionDigi5 = 1;
5477  TH1F *h2CeffHEnegativedirectionDigi5 = new TH1F("h2CeffHEnegativedirectionDigi5", "", nphi, 0., 72.);
5478 
5479  for (int jeta = 0; jeta < njeta; jeta++) {
5480  // negativedirectionDigi:
5481  if (jeta - 41 < 0) {
5482  // for (int i=0;i<ndepth;i++) {
5483  // depth=5
5484  for (int i = 4; i < 5; i++) {
5485  TH1F *HEnegativedirectionDigi5 = (TH1F *)h2CeffHEnegativedirectionDigi5->Clone("twod1");
5486 
5487  float ccctest = 0; // to avoid empty massive elements
5488  for (int jphi = 0; jphi < nphi; jphi++) {
5489  // cout<<"888 initial kcountHEnegativedirectionDigi5 = "<<kcountHEnegativedirectionDigi5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" adigihe[i][jeta][jphi]= "<< adigihe[i][jeta][jphi] <<" depth= "<< i <<endl;
5490 
5491  double ccc1 = adigihe[i][jeta][jphi];
5492  if (ccc1 != 0.) {
5493  HEnegativedirectionDigi5->Fill(jphi, ccc1);
5494  ccctest = 1.; //HEnegativedirectionDigi5->SetBinError(i,0.01);
5495  }
5496  } // for jphi
5497  if (ccctest > 0.) {
5498  //cout<<"888 kcountHEnegativedirectionDigi5 = "<<kcountHEnegativedirectionDigi5 <<" jeta-41= "<< jeta-41 <<endl;
5499  c3x5->cd(kcountHEnegativedirectionDigi5);
5500  HEnegativedirectionDigi5->SetMarkerStyle(20);
5501  HEnegativedirectionDigi5->SetMarkerSize(0.4);
5502  HEnegativedirectionDigi5->GetYaxis()->SetLabelSize(0.04);
5503  HEnegativedirectionDigi5->SetXTitle("HEnegativedirectionDigi5 \b");
5504  HEnegativedirectionDigi5->SetMarkerColor(2);
5505  HEnegativedirectionDigi5->SetLineColor(0);
5506  gPad->SetGridy();
5507  gPad->SetGridx();
5508  // gPad->SetLogy();
5509  if (kcountHEnegativedirectionDigi5 == 1)
5510  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
5511  if (kcountHEnegativedirectionDigi5 == 2)
5512  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
5513  if (kcountHEnegativedirectionDigi5 == 3)
5514  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
5515  if (kcountHEnegativedirectionDigi5 == 4)
5516  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
5517  if (kcountHEnegativedirectionDigi5 == 5)
5518  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
5519  if (kcountHEnegativedirectionDigi5 == 6)
5520  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
5521  if (kcountHEnegativedirectionDigi5 == 7)
5522  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
5523  if (kcountHEnegativedirectionDigi5 == 8)
5524  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
5525  if (kcountHEnegativedirectionDigi5 == 9)
5526  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
5527  if (kcountHEnegativedirectionDigi5 == 10)
5528  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
5529  if (kcountHEnegativedirectionDigi5 == 11)
5530  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
5531  HEnegativedirectionDigi5->Draw("Error");
5532  kcountHEnegativedirectionDigi5++;
5533  if (kcountHEnegativedirectionDigi5 > 11)
5534  break; // 4x6 = 24
5535  } //ccctest>0
5536 
5537  } // for i
5538  } //if(jeta-41 < 0)
5539  } //for jeta
5541  c3x5->Update();
5542  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
5543  c3x5->Clear();
5544  // clean-up
5545  if (h2CeffHEnegativedirectionDigi5)
5546  delete h2CeffHEnegativedirectionDigi5;
5547  //========================================================================================== 1119
5548  //======================================================================
5549  //======================================================================1D plot: R vs phi , different eta, depth=6
5550  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
5551  c3x5->Clear();
5553  c3x5->Divide(3, 5);
5554  c3x5->cd(1);
5555  int kcountHEnegativedirectionDigi6 = 1;
5556  TH1F *h2CeffHEnegativedirectionDigi6 = new TH1F("h2CeffHEnegativedirectionDigi6", "", nphi, 0., 72.);
5557 
5558  for (int jeta = 0; jeta < njeta; jeta++) {
5559  // negativedirectionDigi:
5560  if (jeta - 41 < 0) {
5561  // for (int i=0;i<ndepth;i++) {
5562  // depth=6
5563  for (int i = 5; i < 6; i++) {
5564  TH1F *HEnegativedirectionDigi6 = (TH1F *)h2CeffHEnegativedirectionDigi6->Clone("twod1");
5565 
5566  float ccctest = 0; // to avoid empty massive elements
5567  for (int jphi = 0; jphi < nphi; jphi++) {
5568  double ccc1 = adigihe[i][jeta][jphi];
5569  if (ccc1 != 0.) {
5570  HEnegativedirectionDigi6->Fill(jphi, ccc1);
5571  ccctest = 1.; //HEnegativedirectionDigi6->SetBinError(i,0.01);
5572  }
5573  } // for jphi
5574  if (ccctest > 0.) {
5575  //cout<<"999 kcountHEnegativedirectionDigi6 = "<<kcountHEnegativedirectionDigi6 <<" jeta-41= "<< jeta-41 <<endl;
5576  c3x5->cd(kcountHEnegativedirectionDigi6);
5577  HEnegativedirectionDigi6->SetMarkerStyle(20);
5578  HEnegativedirectionDigi6->SetMarkerSize(0.4);
5579  HEnegativedirectionDigi6->GetYaxis()->SetLabelSize(0.04);
5580  HEnegativedirectionDigi6->SetXTitle("HEnegativedirectionDigi6 \b");
5581  HEnegativedirectionDigi6->SetMarkerColor(2);
5582  HEnegativedirectionDigi6->SetLineColor(0);
5583  gPad->SetGridy();
5584  gPad->SetGridx();
5585  // gPad->SetLogy();
5586  if (kcountHEnegativedirectionDigi6 == 1)
5587  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
5588  if (kcountHEnegativedirectionDigi6 == 2)
5589  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
5590  if (kcountHEnegativedirectionDigi6 == 3)
5591  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
5592  if (kcountHEnegativedirectionDigi6 == 4)
5593  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
5594  if (kcountHEnegativedirectionDigi6 == 5)
5595  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
5596  if (kcountHEnegativedirectionDigi6 == 6)
5597  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
5598  if (kcountHEnegativedirectionDigi6 == 7)
5599  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
5600  if (kcountHEnegativedirectionDigi6 == 8)
5601  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
5602  if (kcountHEnegativedirectionDigi6 == 9)
5603  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
5604  if (kcountHEnegativedirectionDigi6 == 10)
5605  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
5606  HEnegativedirectionDigi6->Draw("Error");
5607  kcountHEnegativedirectionDigi6++;
5608  if (kcountHEnegativedirectionDigi6 > 10)
5609  break; // 4x6 = 24
5610  } //ccctest>0
5611 
5612  } // for i
5613  } //if(jeta-41 < 0)
5614  } //for jeta
5616  c3x5->Update();
5617  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
5618  c3x5->Clear();
5619  // clean-up
5620  if (h2CeffHEnegativedirectionDigi6)
5621  delete h2CeffHEnegativedirectionDigi6;
5622  //========================================================================================== 11110
5623  //======================================================================
5624  //======================================================================1D plot: R vs phi , different eta, depth=7
5625  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
5626  c3x5->Clear();
5628  c3x5->Divide(3, 5);
5629  c3x5->cd(1);
5630  int kcountHEnegativedirectionDigi7 = 1;
5631  TH1F *h2CeffHEnegativedirectionDigi7 = new TH1F("h2CeffHEnegativedirectionDigi7", "", nphi, 0., 72.);
5632 
5633  for (int jeta = 0; jeta < njeta; jeta++) {
5634  // negativedirectionDigi:
5635  if (jeta - 41 < 0) {
5636  // for (int i=0;i<ndepth;i++) {
5637  // depth=7
5638  for (int i = 6; i < 7; i++) {
5639  TH1F *HEnegativedirectionDigi7 = (TH1F *)h2CeffHEnegativedirectionDigi7->Clone("twod1");
5640 
5641  float ccctest = 0; // to avoid empty massive elements
5642  for (int jphi = 0; jphi < nphi; jphi++) {
5643  double ccc1 = adigihe[i][jeta][jphi];
5644  if (ccc1 != 0.) {
5645  HEnegativedirectionDigi7->Fill(jphi, ccc1);
5646  ccctest = 1.; //HEnegativedirectionDigi7->SetBinError(i,0.01);
5647  }
5648  } // for jphi
5649  if (ccctest > 0.) {
5650  //cout<<"1010 kcountHEnegativedirectionDigi7 = "<<kcountHEnegativedirectionDigi7 <<" jeta-41= "<< jeta-41 <<endl;
5651  c3x5->cd(kcountHEnegativedirectionDigi7);
5652  HEnegativedirectionDigi7->SetMarkerStyle(20);
5653  HEnegativedirectionDigi7->SetMarkerSize(0.4);
5654  HEnegativedirectionDigi7->GetYaxis()->SetLabelSize(0.04);
5655  HEnegativedirectionDigi7->SetXTitle("HEnegativedirectionDigi7 \b");
5656  HEnegativedirectionDigi7->SetMarkerColor(2);
5657  HEnegativedirectionDigi7->SetLineColor(0);
5658  gPad->SetGridy();
5659  gPad->SetGridx();
5660  // gPad->SetLogy();
5661  if (kcountHEnegativedirectionDigi7 == 1)
5662  HEnegativedirectionDigi7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
5663  if (kcountHEnegativedirectionDigi7 == 2)
5664  HEnegativedirectionDigi7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
5665  if (kcountHEnegativedirectionDigi7 == 3)
5666  HEnegativedirectionDigi7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
5667  HEnegativedirectionDigi7->Draw("Error");
5668  kcountHEnegativedirectionDigi7++;
5669  if (kcountHEnegativedirectionDigi7 > 3)
5670  break; // 4x6 = 24
5671  } //ccctest>0
5672 
5673  } // for i
5674  } //if(jeta-41 < 0)
5675  } //for jeta
5677  c3x5->Update();
5678  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
5679  c3x5->Clear();
5680  // clean-up
5681  if (h2CeffHEnegativedirectionDigi7)
5682  delete h2CeffHEnegativedirectionDigi7;
5683 
5685 
5686  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
5687 
5688  //cout<<" Start Vaiance: preparation *****" <<endl;
5689  TH2F *digiVariance1HE1 = (TH2F *)hfile->Get("h_amplitudechannel2_HE1");
5690  TH2F *digiVariance0HE1 = (TH2F *)hfile->Get("h_amplitudechannel0_HE1");
5691  TH2F *digiVarianceHE1 = (TH2F *)digiVariance1HE1->Clone("digiVarianceHE1");
5692  digiVarianceHE1->Divide(digiVariance1HE1, digiVariance0HE1, 1, 1, "B");
5693  TH2F *digiVariance1HE2 = (TH2F *)hfile->Get("h_amplitudechannel2_HE2");
5694  TH2F *digiVariance0HE2 = (TH2F *)hfile->Get("h_amplitudechannel0_HE2");
5695  TH2F *digiVarianceHE2 = (TH2F *)digiVariance1HE2->Clone("digiVarianceHE2");
5696  digiVarianceHE2->Divide(digiVariance1HE2, digiVariance0HE2, 1, 1, "B");
5697  TH2F *digiVariance1HE3 = (TH2F *)hfile->Get("h_amplitudechannel2_HE3");
5698  TH2F *digiVariance0HE3 = (TH2F *)hfile->Get("h_amplitudechannel0_HE3");
5699  TH2F *digiVarianceHE3 = (TH2F *)digiVariance1HE3->Clone("digiVarianceHE3");
5700  digiVarianceHE3->Divide(digiVariance1HE3, digiVariance0HE3, 1, 1, "B");
5701  TH2F *digiVariance1HE4 = (TH2F *)hfile->Get("h_amplitudechannel2_HE4");
5702  TH2F *digiVariance0HE4 = (TH2F *)hfile->Get("h_amplitudechannel0_HE4");
5703  TH2F *digiVarianceHE4 = (TH2F *)digiVariance1HE4->Clone("digiVarianceHE4");
5704  digiVarianceHE4->Divide(digiVariance1HE4, digiVariance0HE4, 1, 1, "B");
5705  TH2F *digiVariance1HE5 = (TH2F *)hfile->Get("h_amplitudechannel2_HE5");
5706  TH2F *digiVariance0HE5 = (TH2F *)hfile->Get("h_amplitudechannel0_HE5");
5707  TH2F *digiVarianceHE5 = (TH2F *)digiVariance1HE5->Clone("digiVarianceHE5");
5708  digiVarianceHE5->Divide(digiVariance1HE5, digiVariance0HE5, 1, 1, "B");
5709  TH2F *digiVariance1HE6 = (TH2F *)hfile->Get("h_amplitudechannel2_HE6");
5710  TH2F *digiVariance0HE6 = (TH2F *)hfile->Get("h_amplitudechannel0_HE6");
5711  TH2F *digiVarianceHE6 = (TH2F *)digiVariance1HE6->Clone("digiVarianceHE6");
5712  digiVarianceHE6->Divide(digiVariance1HE6, digiVariance0HE6, 1, 1, "B");
5713  TH2F *digiVariance1HE7 = (TH2F *)hfile->Get("h_amplitudechannel2_HE7");
5714  TH2F *digiVariance0HE7 = (TH2F *)hfile->Get("h_amplitudechannel0_HE7");
5715  TH2F *digiVarianceHE7 = (TH2F *)digiVariance1HE7->Clone("digiVarianceHE7");
5716  digiVarianceHE7->Divide(digiVariance1HE7, digiVariance0HE7, 1, 1, "B");
5717  //cout<<" Vaiance: preparation DONE *****" <<endl;
5718  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive digivariancehe
5719  // = sum(R*R)/N - (sum(R)/N)**2
5720  for (int jeta = 0; jeta < njeta; jeta++) {
5721  //preparation for PHI normalization:
5722  double sumdigiHE0 = 0;
5723  int nsumdigiHE0 = 0;
5724  double sumdigiHE1 = 0;
5725  int nsumdigiHE1 = 0;
5726  double sumdigiHE2 = 0;
5727  int nsumdigiHE2 = 0;
5728  double sumdigiHE3 = 0;
5729  int nsumdigiHE3 = 0;
5730  double sumdigiHE4 = 0;
5731  int nsumdigiHE4 = 0;
5732  double sumdigiHE5 = 0;
5733  int nsumdigiHE5 = 0;
5734  double sumdigiHE6 = 0;
5735  int nsumdigiHE6 = 0;
5736  for (int jphi = 0; jphi < njphi; jphi++) {
5737  digivariancehe[0][jeta][jphi] = digiVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
5738  digivariancehe[1][jeta][jphi] = digiVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
5739  digivariancehe[2][jeta][jphi] = digiVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
5740  digivariancehe[3][jeta][jphi] = digiVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
5741  digivariancehe[4][jeta][jphi] = digiVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
5742  digivariancehe[5][jeta][jphi] = digiVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
5743  digivariancehe[6][jeta][jphi] = digiVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
5744  if (digivariancehe[0][jeta][jphi] > 0.) {
5745  sumdigiHE0 += digivariancehe[0][jeta][jphi];
5746  ++nsumdigiHE0;
5747  }
5748  if (digivariancehe[1][jeta][jphi] > 0.) {
5749  sumdigiHE1 += digivariancehe[1][jeta][jphi];
5750  ++nsumdigiHE1;
5751  }
5752  if (digivariancehe[2][jeta][jphi] > 0.) {
5753  sumdigiHE2 += digivariancehe[2][jeta][jphi];
5754  ++nsumdigiHE2;
5755  }
5756  if (digivariancehe[3][jeta][jphi] > 0.) {
5757  sumdigiHE3 += digivariancehe[3][jeta][jphi];
5758  ++nsumdigiHE3;
5759  }
5760  if (digivariancehe[4][jeta][jphi] > 0.) {
5761  sumdigiHE4 += digivariancehe[4][jeta][jphi];
5762  ++nsumdigiHE4;
5763  }
5764  if (digivariancehe[5][jeta][jphi] > 0.) {
5765  sumdigiHE5 += digivariancehe[5][jeta][jphi];
5766  ++nsumdigiHE5;
5767  }
5768  if (digivariancehe[6][jeta][jphi] > 0.) {
5769  sumdigiHE6 += digivariancehe[6][jeta][jphi];
5770  ++nsumdigiHE6;
5771  }
5772  } // phi
5773  // PHI normalization :
5774  for (int jphi = 0; jphi < njphi; jphi++) {
5775  if (digivariancehe[0][jeta][jphi] > 0.)
5776  digivariancehe[0][jeta][jphi] /= (sumdigiHE0 / nsumdigiHE0);
5777  if (digivariancehe[1][jeta][jphi] > 0.)
5778  digivariancehe[1][jeta][jphi] /= (sumdigiHE1 / nsumdigiHE1);
5779  if (digivariancehe[2][jeta][jphi] > 0.)
5780  digivariancehe[2][jeta][jphi] /= (sumdigiHE2 / nsumdigiHE2);
5781  if (digivariancehe[3][jeta][jphi] > 0.)
5782  digivariancehe[3][jeta][jphi] /= (sumdigiHE3 / nsumdigiHE3);
5783  if (digivariancehe[4][jeta][jphi] > 0.)
5784  digivariancehe[4][jeta][jphi] /= (sumdigiHE4 / nsumdigiHE4);
5785  if (digivariancehe[5][jeta][jphi] > 0.)
5786  digivariancehe[5][jeta][jphi] /= (sumdigiHE5 / nsumdigiHE5);
5787  if (digivariancehe[6][jeta][jphi] > 0.)
5788  digivariancehe[6][jeta][jphi] /= (sumdigiHE6 / nsumdigiHE6);
5789  } // phi
5790  // digivariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
5791  for (int jphi = 0; jphi < njphi; jphi++) {
5792  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
5793  digivariancehe[0][jeta][jphi] -= adigihe[0][jeta][jphi] * adigihe[0][jeta][jphi];
5794  digivariancehe[0][jeta][jphi] = fabs(digivariancehe[0][jeta][jphi]);
5795  digivariancehe[1][jeta][jphi] -= adigihe[1][jeta][jphi] * adigihe[1][jeta][jphi];
5796  digivariancehe[1][jeta][jphi] = fabs(digivariancehe[1][jeta][jphi]);
5797  digivariancehe[2][jeta][jphi] -= adigihe[2][jeta][jphi] * adigihe[2][jeta][jphi];
5798  digivariancehe[2][jeta][jphi] = fabs(digivariancehe[2][jeta][jphi]);
5799  digivariancehe[3][jeta][jphi] -= adigihe[3][jeta][jphi] * adigihe[3][jeta][jphi];
5800  digivariancehe[3][jeta][jphi] = fabs(digivariancehe[3][jeta][jphi]);
5801  digivariancehe[4][jeta][jphi] -= adigihe[4][jeta][jphi] * adigihe[4][jeta][jphi];
5802  digivariancehe[4][jeta][jphi] = fabs(digivariancehe[4][jeta][jphi]);
5803  digivariancehe[5][jeta][jphi] -= adigihe[5][jeta][jphi] * adigihe[5][jeta][jphi];
5804  digivariancehe[5][jeta][jphi] = fabs(digivariancehe[5][jeta][jphi]);
5805  digivariancehe[6][jeta][jphi] -= adigihe[6][jeta][jphi] * adigihe[6][jeta][jphi];
5806  digivariancehe[6][jeta][jphi] = fabs(digivariancehe[6][jeta][jphi]);
5807  }
5808  }
5809  //cout<<" Vaiance: DONE*****" <<endl;
5810  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
5811  //======================================================================
5812  //======================================================================
5813  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
5814  c1x1->Clear();
5816  c1x0->Divide(1, 1);
5817  c1x0->cd(1);
5818  TH2F *DefzDdigiHE42D = new TH2F("DefzDdigiHE42D", "", neta, -41., 41., nphi, 0., 72.);
5819  TH2F *DefzDdigiHE42D0 = new TH2F("DefzDdigiHE42D0", "", neta, -41., 41., nphi, 0., 72.);
5820  TH2F *DefzDdigiHE42DF = (TH2F *)DefzDdigiHE42D0->Clone("DefzDdigiHE42DF");
5821  for (int i = 0; i < ndepth; i++) {
5822  for (int jeta = 0; jeta < neta; jeta++) {
5823  for (int jphi = 0; jphi < nphi; jphi++) {
5824  double ccc1 = digivariancehe[i][jeta][jphi];
5825  int k2plot = jeta - 41;
5826  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
5827  if (adigihe[i][jeta][jphi] > 0.) {
5828  DefzDdigiHE42D->Fill(kkk, jphi, ccc1);
5829  DefzDdigiHE42D0->Fill(kkk, jphi, 1.);
5830  }
5831  }
5832  }
5833  }
5834  DefzDdigiHE42DF->Divide(DefzDdigiHE42D, DefzDdigiHE42D0, 1, 1, "B"); // average A
5835  // DefzDdigiHE1->Sumw2();
5836  gPad->SetGridy();
5837  gPad->SetGridx(); // gPad->SetLogz();
5838  DefzDdigiHE42DF->SetMarkerStyle(20);
5839  DefzDdigiHE42DF->SetMarkerSize(0.4);
5840  DefzDdigiHE42DF->GetZaxis()->SetLabelSize(0.08);
5841  DefzDdigiHE42DF->SetXTitle("<D>_depth #eta \b");
5842  DefzDdigiHE42DF->SetYTitle(" #phi \b");
5843  DefzDdigiHE42DF->SetZTitle("<D>_depth \b");
5844  DefzDdigiHE42DF->SetMarkerColor(2);
5845  DefzDdigiHE42DF->SetLineColor(
5846  0); // DefzDdigiHE42DF->SetMaximum(1.000); // DefzDdigiHE42DF->SetMinimum(1.0);
5847  DefzDdigiHE42DF->Draw("COLZ");
5849  c1x0->Update();
5850  c1x0->Print("DdigiGeneralD2PhiSymmetryHE.png");
5851  c1x0->Clear();
5852  // clean-up
5853  if (DefzDdigiHE42D)
5854  delete DefzDdigiHE42D;
5855  if (DefzDdigiHE42D0)
5856  delete DefzDdigiHE42D0;
5857  if (DefzDdigiHE42DF)
5858  delete DefzDdigiHE42DF;
5859  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
5860  //======================================================================
5861  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
5862  c1x1->Clear();
5864  c1x1->Divide(1, 1);
5865  c1x1->cd(1);
5866  TH1F *DefzDdigiHE41D = new TH1F("DefzDdigiHE41D", "", nphi, 0., 72.);
5867  TH1F *DefzDdigiHE41D0 = new TH1F("DefzDdigiHE41D0", "", nphi, 0., 72.);
5868  TH1F *DefzDdigiHE41DF = (TH1F *)DefzDdigiHE41D0->Clone("DefzDdigiHE41DF");
5869 
5870  for (int jphi = 0; jphi < nphi; jphi++) {
5871  for (int jeta = 0; jeta < neta; jeta++) {
5872  for (int i = 0; i < ndepth; i++) {
5873  double ccc1 = digivariancehe[i][jeta][jphi];
5874  if (adigihe[i][jeta][jphi] > 0.) {
5875  DefzDdigiHE41D->Fill(jphi, ccc1);
5876  DefzDdigiHE41D0->Fill(jphi, 1.);
5877  }
5878  }
5879  }
5880  }
5881  // DefzDdigiHE41D->Sumw2();DefzDdigiHE41D0->Sumw2();
5882 
5883  DefzDdigiHE41DF->Divide(DefzDdigiHE41D, DefzDdigiHE41D0, 1, 1, "B"); // R averaged over depthes & eta
5884  DefzDdigiHE41D0->Sumw2();
5885  // for (int jphi=1;jphi<73;jphi++) {DefzDdigiHE41DF->SetBinError(jphi,0.01);}
5886  gPad->SetGridy();
5887  gPad->SetGridx(); // gPad->SetLogz();
5888  DefzDdigiHE41DF->SetMarkerStyle(20);
5889  DefzDdigiHE41DF->SetMarkerSize(1.4);
5890  DefzDdigiHE41DF->GetZaxis()->SetLabelSize(0.08);
5891  DefzDdigiHE41DF->SetXTitle("#phi \b");
5892  DefzDdigiHE41DF->SetYTitle(" <D> \b");
5893  DefzDdigiHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
5894  DefzDdigiHE41DF->SetMarkerColor(4);
5895  DefzDdigiHE41DF->SetLineColor(4); // DefzDdigiHE41DF->SetMinimum(0.8); DefzDdigiHE41DF->SetMinimum(-0.015);
5896  DefzDdigiHE41DF->Draw("Error");
5898  c1x1->Update();
5899  c1x1->Print("DdigiGeneralD1PhiSymmetryHE.png");
5900  c1x1->Clear();
5901  // clean-up
5902  if (DefzDdigiHE41D)
5903  delete DefzDdigiHE41D;
5904  if (DefzDdigiHE41D0)
5905  delete DefzDdigiHE41D0;
5906  if (DefzDdigiHE41DF)
5907  delete DefzDdigiHE41DF;
5908  //========================================================================================== 14
5909  //======================================================================
5910  //======================================================================1D plot: D vs phi , different eta, depth=1
5911  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
5912  c3x5->Clear();
5914  c3x5->Divide(3, 5);
5915  c3x5->cd(1);
5916  int kcountHEpositivedirectionDigiD1 = 1;
5917  TH1F *h2CeffHEpositivedirectionDigiD1 = new TH1F("h2CeffHEpositivedirectionDigiD1", "", nphi, 0., 72.);
5918 
5919  for (int jeta = 0; jeta < njeta; jeta++) {
5920  // positivedirectionDigiD:
5921  if (jeta - 41 >= 0) {
5922  // for (int i=0;i<ndepth;i++) {
5923  // depth=1
5924  for (int i = 0; i < 1; i++) {
5925  TH1F *HEpositivedirectionDigiD1 = (TH1F *)h2CeffHEpositivedirectionDigiD1->Clone("twod1");
5926 
5927  float ccctest = 0; // to avoid empty massive elements
5928  for (int jphi = 0; jphi < nphi; jphi++) {
5929  double ccc1 = digivariancehe[i][jeta][jphi];
5930  if (adigihe[i][jeta][jphi] > 0.) {
5931  HEpositivedirectionDigiD1->Fill(jphi, ccc1);
5932  ccctest = 1.; //HEpositivedirectionDigiD1->SetBinError(i,0.01);
5933  }
5934  } // for jphi
5935  if (ccctest > 0.) {
5936  //cout<<"1414 kcountHEpositivedirectionDigiD1 = "<<kcountHEpositivedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
5937  c3x5->cd(kcountHEpositivedirectionDigiD1);
5938  HEpositivedirectionDigiD1->SetMarkerStyle(20);
5939  HEpositivedirectionDigiD1->SetMarkerSize(0.4);
5940  HEpositivedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
5941  HEpositivedirectionDigiD1->SetXTitle("HEpositivedirectionDigiD1 \b");
5942  HEpositivedirectionDigiD1->SetMarkerColor(2);
5943  HEpositivedirectionDigiD1->SetLineColor(0);
5944  gPad->SetGridy();
5945  gPad->SetGridx();
5946  // gPad->SetLogy();
5947  if (kcountHEpositivedirectionDigiD1 == 1)
5948  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
5949  if (kcountHEpositivedirectionDigiD1 == 2)
5950  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
5951  if (kcountHEpositivedirectionDigiD1 == 3)
5952  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
5953  if (kcountHEpositivedirectionDigiD1 == 4)
5954  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
5955  if (kcountHEpositivedirectionDigiD1 == 5)
5956  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
5957  if (kcountHEpositivedirectionDigiD1 == 6)
5958  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
5959  if (kcountHEpositivedirectionDigiD1 == 7)
5960  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
5961  if (kcountHEpositivedirectionDigiD1 == 8)
5962  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
5963  if (kcountHEpositivedirectionDigiD1 == 9)
5964  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
5965  if (kcountHEpositivedirectionDigiD1 == 10)
5966  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
5967  if (kcountHEpositivedirectionDigiD1 == 11)
5968  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
5969  if (kcountHEpositivedirectionDigiD1 == 12)
5970  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
5971  HEpositivedirectionDigiD1->Draw("Error");
5972  kcountHEpositivedirectionDigiD1++;
5973  if (kcountHEpositivedirectionDigiD1 > 12)
5974  break; // 4x6 = 24
5975  } //ccctest>0
5976 
5977  } // for i
5978  } //if(jeta-41 >= 0)
5979  } //for jeta
5981  c3x5->Update();
5982  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
5983  c3x5->Clear();
5984  // clean-up
5985  if (h2CeffHEpositivedirectionDigiD1)
5986  delete h2CeffHEpositivedirectionDigiD1;
5987  //========================================================================================== 15
5988  //======================================================================
5989  //======================================================================1D plot: D vs phi , different eta, depth=2
5990  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
5991  c3x5->Clear();
5992  c3x5->Divide(3, 5);
5993  c3x5->cd(1);
5994  int kcountHEpositivedirectionDigiD2 = 1;
5995  TH1F *h2CeffHEpositivedirectionDigiD2 = new TH1F("h2CeffHEpositivedirectionDigiD2", "", nphi, 0., 72.);
5996 
5997  for (int jeta = 0; jeta < njeta; jeta++) {
5998  // positivedirectionDigiD:
5999  if (jeta - 41 >= 0) {
6000  // for (int i=0;i<ndepth;i++) {
6001  // depth=2
6002  for (int i = 1; i < 2; i++) {
6003  TH1F *HEpositivedirectionDigiD2 = (TH1F *)h2CeffHEpositivedirectionDigiD2->Clone("twod1");
6004 
6005  float ccctest = 0; // to avoid empty massive elements
6006  for (int jphi = 0; jphi < nphi; jphi++) {
6007  double ccc1 = digivariancehe[i][jeta][jphi];
6008  if (adigihe[i][jeta][jphi] > 0.) {
6009  HEpositivedirectionDigiD2->Fill(jphi, ccc1);
6010  ccctest = 1.; //HEpositivedirectionDigiD2->SetBinError(i,0.01);
6011  }
6012  } // for jphi
6013  if (ccctest > 0.) {
6014  //cout<<"1515 kcountHEpositivedirectionDigiD2 = "<<kcountHEpositivedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
6015  c3x5->cd(kcountHEpositivedirectionDigiD2);
6016  HEpositivedirectionDigiD2->SetMarkerStyle(20);
6017  HEpositivedirectionDigiD2->SetMarkerSize(0.4);
6018  HEpositivedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
6019  HEpositivedirectionDigiD2->SetXTitle("HEpositivedirectionDigiD2 \b");
6020  HEpositivedirectionDigiD2->SetMarkerColor(2);
6021  HEpositivedirectionDigiD2->SetLineColor(0);
6022  gPad->SetGridy();
6023  gPad->SetGridx();
6024  // gPad->SetLogy();
6025  if (kcountHEpositivedirectionDigiD2 == 1)
6026  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
6027  if (kcountHEpositivedirectionDigiD2 == 2)
6028  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
6029  if (kcountHEpositivedirectionDigiD2 == 3)
6030  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
6031  if (kcountHEpositivedirectionDigiD2 == 4)
6032  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
6033  if (kcountHEpositivedirectionDigiD2 == 5)
6034  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
6035  if (kcountHEpositivedirectionDigiD2 == 6)
6036  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
6037  if (kcountHEpositivedirectionDigiD2 == 7)
6038  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
6039  if (kcountHEpositivedirectionDigiD2 == 8)
6040  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
6041  if (kcountHEpositivedirectionDigiD2 == 9)
6042  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
6043  if (kcountHEpositivedirectionDigiD2 == 10)
6044  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
6045  if (kcountHEpositivedirectionDigiD2 == 11)
6046  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
6047  if (kcountHEpositivedirectionDigiD2 == 12)
6048  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
6049  if (kcountHEpositivedirectionDigiD2 == 13)
6050  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
6051  HEpositivedirectionDigiD2->Draw("Error");
6052  kcountHEpositivedirectionDigiD2++;
6053  if (kcountHEpositivedirectionDigiD2 > 13)
6054  break; // 4x6 = 24
6055  } //ccctest>0
6056 
6057  } // for i
6058  } //if(jeta-41 >= 0)
6059  } //for jeta
6061  c3x5->Update();
6062  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
6063  c3x5->Clear();
6064  // clean-up
6065  if (h2CeffHEpositivedirectionDigiD2)
6066  delete h2CeffHEpositivedirectionDigiD2;
6067  //========================================================================================== 16
6068  //======================================================================
6069  //======================================================================1D plot: D vs phi , different eta, depth=3
6070  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
6071  c3x5->Clear();
6072  c3x5->Divide(3, 5);
6073  c3x5->cd(1);
6074  int kcountHEpositivedirectionDigiD3 = 1;
6075  TH1F *h2CeffHEpositivedirectionDigiD3 = new TH1F("h2CeffHEpositivedirectionDigiD3", "", nphi, 0., 72.);
6076 
6077  for (int jeta = 0; jeta < njeta; jeta++) {
6078  // positivedirectionDigiD:
6079  if (jeta - 41 >= 0) {
6080  // for (int i=0;i<ndepth;i++) {
6081  // depth=3
6082  for (int i = 2; i < 3; i++) {
6083  TH1F *HEpositivedirectionDigiD3 = (TH1F *)h2CeffHEpositivedirectionDigiD3->Clone("twod1");
6084 
6085  float ccctest = 0; // to avoid empty massive elements
6086  for (int jphi = 0; jphi < nphi; jphi++) {
6087  double ccc1 = digivariancehe[i][jeta][jphi];
6088  if (adigihe[i][jeta][jphi] > 0.) {
6089  HEpositivedirectionDigiD3->Fill(jphi, ccc1);
6090  ccctest = 1.; //HEpositivedirectionDigiD3->SetBinError(i,0.01);
6091  }
6092  } // for jphi
6093  if (ccctest > 0.) {
6094  //cout<<"1616 kcountHEpositivedirectionDigiD3 = "<<kcountHEpositivedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
6095  c3x5->cd(kcountHEpositivedirectionDigiD3);
6096  HEpositivedirectionDigiD3->SetMarkerStyle(20);
6097  HEpositivedirectionDigiD3->SetMarkerSize(0.4);
6098  HEpositivedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
6099  HEpositivedirectionDigiD3->SetXTitle("HEpositivedirectionDigiD3 \b");
6100  HEpositivedirectionDigiD3->SetMarkerColor(2);
6101  HEpositivedirectionDigiD3->SetLineColor(0);
6102  gPad->SetGridy();
6103  gPad->SetGridx();
6104  // gPad->SetLogy();
6105  if (kcountHEpositivedirectionDigiD3 == 1)
6106  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
6107  if (kcountHEpositivedirectionDigiD3 == 2)
6108  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
6109  if (kcountHEpositivedirectionDigiD3 == 3)
6110  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
6111  if (kcountHEpositivedirectionDigiD3 == 4)
6112  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
6113  if (kcountHEpositivedirectionDigiD3 == 5)
6114  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
6115  if (kcountHEpositivedirectionDigiD3 == 6)
6116  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
6117  if (kcountHEpositivedirectionDigiD3 == 7)
6118  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
6119  if (kcountHEpositivedirectionDigiD3 == 8)
6120  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
6121  if (kcountHEpositivedirectionDigiD3 == 9)
6122  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
6123  if (kcountHEpositivedirectionDigiD3 == 10)
6124  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
6125  if (kcountHEpositivedirectionDigiD3 == 11)
6126  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
6127  if (kcountHEpositivedirectionDigiD3 == 12)
6128  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
6129  if (kcountHEpositivedirectionDigiD3 == 13)
6130  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
6131  HEpositivedirectionDigiD3->Draw("Error");
6132  kcountHEpositivedirectionDigiD3++;
6133  if (kcountHEpositivedirectionDigiD3 > 13)
6134  break; // 4x6 = 24
6135  } //ccctest>0
6136 
6137  } // for i
6138  } //if(jeta-41 >= 0)
6139  } //for jeta
6141  c3x5->Update();
6142  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
6143  c3x5->Clear();
6144  // clean-up
6145  if (h2CeffHEpositivedirectionDigiD3)
6146  delete h2CeffHEpositivedirectionDigiD3;
6147  //========================================================================================== 17
6148  //======================================================================
6149  //======================================================================1D plot: D vs phi , different eta, depth=4
6150  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
6151  c3x5->Clear();
6152  c3x5->Divide(3, 5);
6153  c3x5->cd(1);
6154  int kcountHEpositivedirectionDigiD4 = 1;
6155  TH1F *h2CeffHEpositivedirectionDigiD4 = new TH1F("h2CeffHEpositivedirectionDigiD4", "", nphi, 0., 72.);
6156 
6157  for (int jeta = 0; jeta < njeta; jeta++) {
6158  // positivedirectionDigiD:
6159  if (jeta - 41 >= 0) {
6160  // for (int i=0;i<ndepth;i++) {
6161  // depth=4
6162  for (int i = 3; i < 4; i++) {
6163  TH1F *HEpositivedirectionDigiD4 = (TH1F *)h2CeffHEpositivedirectionDigiD4->Clone("twod1");
6164 
6165  float ccctest = 0; // to avoid empty massive elements
6166  for (int jphi = 0; jphi < nphi; jphi++) {
6167  double ccc1 = digivariancehe[i][jeta][jphi];
6168  if (adigihe[i][jeta][jphi] > 0.) {
6169  HEpositivedirectionDigiD4->Fill(jphi, ccc1);
6170  ccctest = 1.; //HEpositivedirectionDigiD4->SetBinError(i,0.01);
6171  }
6172  } // for jphi
6173  if (ccctest > 0.) {
6174  //cout<<"1717 kcountHEpositivedirectionDigiD4 = "<<kcountHEpositivedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
6175  c3x5->cd(kcountHEpositivedirectionDigiD4);
6176  HEpositivedirectionDigiD4->SetMarkerStyle(20);
6177  HEpositivedirectionDigiD4->SetMarkerSize(0.4);
6178  HEpositivedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
6179  HEpositivedirectionDigiD4->SetXTitle("HEpositivedirectionDigiD4 \b");
6180  HEpositivedirectionDigiD4->SetMarkerColor(2);
6181  HEpositivedirectionDigiD4->SetLineColor(0);
6182  gPad->SetGridy();
6183  gPad->SetGridx();
6184  // gPad->SetLogy();
6185  if (kcountHEpositivedirectionDigiD4 == 1)
6186  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
6187  if (kcountHEpositivedirectionDigiD4 == 2)
6188  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
6189  if (kcountHEpositivedirectionDigiD4 == 3)
6190  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
6191  if (kcountHEpositivedirectionDigiD4 == 4)
6192  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
6193  if (kcountHEpositivedirectionDigiD4 == 5)
6194  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
6195  if (kcountHEpositivedirectionDigiD4 == 6)
6196  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
6197  if (kcountHEpositivedirectionDigiD4 == 7)
6198  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
6199  if (kcountHEpositivedirectionDigiD4 == 8)
6200  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
6201  if (kcountHEpositivedirectionDigiD4 == 9)
6202  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
6203  if (kcountHEpositivedirectionDigiD4 == 10)
6204  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
6205  if (kcountHEpositivedirectionDigiD4 == 11)
6206  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
6207  if (kcountHEpositivedirectionDigiD4 == 12)
6208  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
6209  HEpositivedirectionDigiD4->Draw("Error");
6210  kcountHEpositivedirectionDigiD4++;
6211  if (kcountHEpositivedirectionDigiD4 > 12)
6212  break; // 4x6 = 24
6213  } //ccctest>0
6214 
6215  } // for i
6216  } //if(jeta-41 >= 0)
6217  } //for jeta
6219  c3x5->Update();
6220  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
6221  c3x5->Clear();
6222  // clean-up
6223  if (h2CeffHEpositivedirectionDigiD4)
6224  delete h2CeffHEpositivedirectionDigiD4;
6225  //========================================================================================== 18
6226  //======================================================================
6227  //======================================================================1D plot: D vs phi , different eta, depth=5
6228  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
6229  c3x5->Clear();
6230  c3x5->Divide(3, 5);
6231  c3x5->cd(1);
6232  int kcountHEpositivedirectionDigiD5 = 1;
6233  TH1F *h2CeffHEpositivedirectionDigiD5 = new TH1F("h2CeffHEpositivedirectionDigiD5", "", nphi, 0., 72.);
6234 
6235  for (int jeta = 0; jeta < njeta; jeta++) {
6236  // positivedirectionDigiD:
6237  if (jeta - 41 >= 0) {
6238  // for (int i=0;i<ndepth;i++) {
6239  // depth=5
6240  for (int i = 4; i < 5; i++) {
6241  TH1F *HEpositivedirectionDigiD5 = (TH1F *)h2CeffHEpositivedirectionDigiD5->Clone("twod1");
6242 
6243  float ccctest = 0; // to avoid empty massive elements
6244  for (int jphi = 0; jphi < nphi; jphi++) {
6245  double ccc1 = digivariancehe[i][jeta][jphi];
6246  if (adigihe[i][jeta][jphi] > 0.) {
6247  HEpositivedirectionDigiD5->Fill(jphi, ccc1);
6248  ccctest = 1.; //HEpositivedirectionDigiD5->SetBinError(i,0.01);
6249  }
6250  } // for jphi
6251  if (ccctest > 0.) {
6252  //cout<<"1818 kcountHEpositivedirectionDigiD5 = "<<kcountHEpositivedirectionDigiD5 <<" jeta-41= "<< jeta-41 <<endl;
6253  c3x5->cd(kcountHEpositivedirectionDigiD5);
6254  HEpositivedirectionDigiD5->SetMarkerStyle(20);
6255  HEpositivedirectionDigiD5->SetMarkerSize(0.4);
6256  HEpositivedirectionDigiD5->GetYaxis()->SetLabelSize(0.04);
6257  HEpositivedirectionDigiD5->SetXTitle("HEpositivedirectionDigiD5 \b");
6258  HEpositivedirectionDigiD5->SetMarkerColor(2);
6259  HEpositivedirectionDigiD5->SetLineColor(0);
6260  gPad->SetGridy();
6261  gPad->SetGridx();
6262  // gPad->SetLogy();
6263  if (kcountHEpositivedirectionDigiD5 == 1)
6264  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
6265  if (kcountHEpositivedirectionDigiD5 == 2)
6266  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
6267  if (kcountHEpositivedirectionDigiD5 == 3)
6268  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
6269  if (kcountHEpositivedirectionDigiD5 == 4)
6270  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
6271  if (kcountHEpositivedirectionDigiD5 == 5)
6272  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
6273  if (kcountHEpositivedirectionDigiD5 == 6)
6274  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
6275  if (kcountHEpositivedirectionDigiD5 == 7)
6276  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
6277  if (kcountHEpositivedirectionDigiD5 == 8)
6278  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
6279  if (kcountHEpositivedirectionDigiD5 == 9)
6280  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
6281  if (kcountHEpositivedirectionDigiD5 == 10)
6282  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
6283  if (kcountHEpositivedirectionDigiD5 == 11)
6284  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
6285  HEpositivedirectionDigiD5->Draw("Error");
6286  kcountHEpositivedirectionDigiD5++;
6287  if (kcountHEpositivedirectionDigiD5 > 11)
6288  break; // 4x6 = 24
6289  } //ccctest>0
6290 
6291  } // for i
6292  } //if(jeta-41 >= 0)
6293  } //for jeta
6295  c3x5->Update();
6296  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
6297  c3x5->Clear();
6298  // clean-up
6299  if (h2CeffHEpositivedirectionDigiD5)
6300  delete h2CeffHEpositivedirectionDigiD5;
6301  //========================================================================================== 19
6302  //======================================================================
6303  //======================================================================1D plot: D vs phi , different eta, depth=6
6304  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
6305  c3x5->Clear();
6306  c3x5->Divide(3, 5);
6307  c3x5->cd(1);
6308  int kcountHEpositivedirectionDigiD6 = 1;
6309  TH1F *h2CeffHEpositivedirectionDigiD6 = new TH1F("h2CeffHEpositivedirectionDigiD6", "", nphi, 0., 72.);
6310 
6311  for (int jeta = 0; jeta < njeta; jeta++) {
6312  // positivedirectionDigiD:
6313  if (jeta - 41 >= 0) {
6314  // for (int i=0;i<ndepth;i++) {
6315  // depth=6
6316  for (int i = 5; i < 6; i++) {
6317  TH1F *HEpositivedirectionDigiD6 = (TH1F *)h2CeffHEpositivedirectionDigiD6->Clone("twod1");
6318 
6319  float ccctest = 0; // to avoid empty massive elements
6320  for (int jphi = 0; jphi < nphi; jphi++) {
6321  double ccc1 = digivariancehe[i][jeta][jphi];
6322  if (adigihe[i][jeta][jphi] > 0.) {
6323  HEpositivedirectionDigiD6->Fill(jphi, ccc1);
6324  ccctest = 1.; //HEpositivedirectionDigiD6->SetBinError(i,0.01);
6325  }
6326  } // for jphi
6327  if (ccctest > 0.) {
6328  //cout<<"1919 kcountHEpositivedirectionDigiD6 = "<<kcountHEpositivedirectionDigiD6 <<" jeta-41= "<< jeta-41 <<endl;
6329  c3x5->cd(kcountHEpositivedirectionDigiD6);
6330  HEpositivedirectionDigiD6->SetMarkerStyle(20);
6331  HEpositivedirectionDigiD6->SetMarkerSize(0.4);
6332  HEpositivedirectionDigiD6->GetYaxis()->SetLabelSize(0.04);
6333  HEpositivedirectionDigiD6->SetXTitle("HEpositivedirectionDigiD6 \b");
6334  HEpositivedirectionDigiD6->SetMarkerColor(2);
6335  HEpositivedirectionDigiD6->SetLineColor(0);
6336  gPad->SetGridy();
6337  gPad->SetGridx();
6338  // gPad->SetLogy();
6339  if (kcountHEpositivedirectionDigiD6 == 1)
6340  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
6341  if (kcountHEpositivedirectionDigiD6 == 2)
6342  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
6343  if (kcountHEpositivedirectionDigiD6 == 3)
6344  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
6345  if (kcountHEpositivedirectionDigiD6 == 4)
6346  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
6347  if (kcountHEpositivedirectionDigiD6 == 5)
6348  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
6349  if (kcountHEpositivedirectionDigiD6 == 6)
6350  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
6351  if (kcountHEpositivedirectionDigiD6 == 7)
6352  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
6353  if (kcountHEpositivedirectionDigiD6 == 8)
6354  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
6355  if (kcountHEpositivedirectionDigiD6 == 9)
6356  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
6357  if (kcountHEpositivedirectionDigiD6 == 10)
6358  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
6359  HEpositivedirectionDigiD6->Draw("Error");
6360  kcountHEpositivedirectionDigiD6++;
6361  if (kcountHEpositivedirectionDigiD6 > 10)
6362  break; // 4x6 = 24
6363  } //ccctest>0
6364 
6365  } // for i
6366  } //if(jeta-41 >= 0)
6367  } //for jeta
6369  c3x5->Update();
6370  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
6371  c3x5->Clear();
6372  // clean-up
6373  if (h2CeffHEpositivedirectionDigiD6)
6374  delete h2CeffHEpositivedirectionDigiD6;
6375  //========================================================================================== 20
6376  //======================================================================
6377  //======================================================================1D plot: D vs phi , different eta, depth=7
6378  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
6379  c3x5->Clear();
6380  c3x5->Divide(3, 5);
6381  c3x5->cd(1);
6382  int kcountHEpositivedirectionDigiD7 = 1;
6383  TH1F *h2CeffHEpositivedirectionDigiD7 = new TH1F("h2CeffHEpositivedirectionDigiD7", "", nphi, 0., 72.);
6384 
6385  for (int jeta = 0; jeta < njeta; jeta++) {
6386  // positivedirectionDigiD:
6387  if (jeta - 41 >= 0) {
6388  // for (int i=0;i<ndepth;i++) {
6389  // depth=7
6390  for (int i = 6; i < 7; i++) {
6391  TH1F *HEpositivedirectionDigiD7 = (TH1F *)h2CeffHEpositivedirectionDigiD7->Clone("twod1");
6392 
6393  float ccctest = 0; // to avoid empty massive elements
6394  for (int jphi = 0; jphi < nphi; jphi++) {
6395  double ccc1 = digivariancehe[i][jeta][jphi];
6396  if (adigihe[i][jeta][jphi] > 0.) {
6397  HEpositivedirectionDigiD7->Fill(jphi, ccc1);
6398  ccctest = 1.; //HEpositivedirectionDigiD7->SetBinError(i,0.01);
6399  }
6400  } // for jphi
6401  if (ccctest != 0.) {
6402  //cout<<"2020 kcountHEpositivedirectionDigiD7 = "<<kcountHEpositivedirectionDigiD7 <<" jeta-41= "<< jeta-41 <<endl;
6403  c3x5->cd(kcountHEpositivedirectionDigiD7);
6404  HEpositivedirectionDigiD7->SetMarkerStyle(20);
6405  HEpositivedirectionDigiD7->SetMarkerSize(0.4);
6406  HEpositivedirectionDigiD7->GetYaxis()->SetLabelSize(0.04);
6407  HEpositivedirectionDigiD7->SetXTitle("HEpositivedirectionDigiD7 \b");
6408  HEpositivedirectionDigiD7->SetMarkerColor(2);
6409  HEpositivedirectionDigiD7->SetLineColor(0);
6410  gPad->SetGridy();
6411  gPad->SetGridx();
6412  // gPad->SetLogy();
6413  if (kcountHEpositivedirectionDigiD7 == 1)
6414  HEpositivedirectionDigiD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
6415  if (kcountHEpositivedirectionDigiD7 == 2)
6416  HEpositivedirectionDigiD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
6417  if (kcountHEpositivedirectionDigiD7 == 3)
6418  HEpositivedirectionDigiD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
6419  HEpositivedirectionDigiD7->Draw("Error");
6420  kcountHEpositivedirectionDigiD7++;
6421  if (kcountHEpositivedirectionDigiD7 > 3)
6422  break; // 4x6 = 24
6423  } //ccctest>0
6424 
6425  } // for i
6426  } //if(jeta-41 >= 0)
6427  } //for jeta
6429  c3x5->Update();
6430  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
6431  c3x5->Clear();
6432  // clean-up
6433  if (h2CeffHEpositivedirectionDigiD7)
6434  delete h2CeffHEpositivedirectionDigiD7;
6435 
6436  //========================================================================================== 22222214
6437  //======================================================================
6438  //======================================================================1D plot: D vs phi , different eta, depth=1
6439  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
6440  c3x5->Clear();
6442  c3x5->Divide(3, 5);
6443  c3x5->cd(1);
6444  int kcountHEnegativedirectionDigiD1 = 1;
6445  TH1F *h2CeffHEnegativedirectionDigiD1 = new TH1F("h2CeffHEnegativedirectionDigiD1", "", nphi, 0., 72.);
6446 
6447  for (int jeta = 0; jeta < njeta; jeta++) {
6448  // negativedirectionDigiD:
6449  if (jeta - 41 < 0) {
6450  // for (int i=0;i<ndepth;i++) {
6451  // depth=1
6452  for (int i = 0; i < 1; i++) {
6453  TH1F *HEnegativedirectionDigiD1 = (TH1F *)h2CeffHEnegativedirectionDigiD1->Clone("twod1");
6454 
6455  float ccctest = 0; // to avoid empty massive elements
6456  for (int jphi = 0; jphi < nphi; jphi++) {
6457  double ccc1 = digivariancehe[i][jeta][jphi];
6458  if (adigihe[i][jeta][jphi] > 0.) {
6459  HEnegativedirectionDigiD1->Fill(jphi, ccc1);
6460  ccctest = 1.; //HEnegativedirectionDigiD1->SetBinError(i,0.01);
6461  }
6462  } // for jphi
6463  if (ccctest > 0.) {
6464  //cout<<"1414 kcountHEnegativedirectionDigiD1 = "<<kcountHEnegativedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
6465  c3x5->cd(kcountHEnegativedirectionDigiD1);
6466  HEnegativedirectionDigiD1->SetMarkerStyle(20);
6467  HEnegativedirectionDigiD1->SetMarkerSize(0.4);
6468  HEnegativedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
6469  HEnegativedirectionDigiD1->SetXTitle("HEnegativedirectionDigiD1 \b");
6470  HEnegativedirectionDigiD1->SetMarkerColor(2);
6471  HEnegativedirectionDigiD1->SetLineColor(0);
6472  gPad->SetGridy();
6473  gPad->SetGridx();
6474  // gPad->SetLogy();
6475  if (kcountHEnegativedirectionDigiD1 == 1)
6476  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
6477  if (kcountHEnegativedirectionDigiD1 == 2)
6478  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
6479  if (kcountHEnegativedirectionDigiD1 == 3)
6480  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
6481  if (kcountHEnegativedirectionDigiD1 == 4)
6482  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
6483  if (kcountHEnegativedirectionDigiD1 == 5)
6484  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
6485  if (kcountHEnegativedirectionDigiD1 == 6)
6486  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
6487  if (kcountHEnegativedirectionDigiD1 == 7)
6488  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
6489  if (kcountHEnegativedirectionDigiD1 == 8)
6490  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
6491  if (kcountHEnegativedirectionDigiD1 == 9)
6492  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
6493  if (kcountHEnegativedirectionDigiD1 == 10)
6494  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
6495  if (kcountHEnegativedirectionDigiD1 == 11)
6496  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
6497  if (kcountHEnegativedirectionDigiD1 == 12)
6498  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
6499  HEnegativedirectionDigiD1->Draw("Error");
6500  kcountHEnegativedirectionDigiD1++;
6501  if (kcountHEnegativedirectionDigiD1 > 12)
6502  break; // 4x6 = 24
6503  } //ccctest>0
6504 
6505  } // for i
6506  } //if(jeta-41 < 0)
6507  } //for jeta
6509  c3x5->Update();
6510  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
6511  c3x5->Clear();
6512  // clean-up
6513  if (h2CeffHEnegativedirectionDigiD1)
6514  delete h2CeffHEnegativedirectionDigiD1;
6515  //========================================================================================== 22222215
6516  //======================================================================
6517  //======================================================================1D plot: D vs phi , different eta, depth=2
6518  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
6519  c3x5->Clear();
6520  c3x5->Divide(3, 5);
6521  c3x5->cd(1);
6522  int kcountHEnegativedirectionDigiD2 = 1;
6523  TH1F *h2CeffHEnegativedirectionDigiD2 = new TH1F("h2CeffHEnegativedirectionDigiD2", "", nphi, 0., 72.);
6524 
6525  for (int jeta = 0; jeta < njeta; jeta++) {
6526  // negativedirectionDigiD:
6527  if (jeta - 41 < 0) {
6528  // for (int i=0;i<ndepth;i++) {
6529  // depth=2
6530  for (int i = 1; i < 2; i++) {
6531  TH1F *HEnegativedirectionDigiD2 = (TH1F *)h2CeffHEnegativedirectionDigiD2->Clone("twod1");
6532 
6533  float ccctest = 0; // to avoid empty massive elements
6534  for (int jphi = 0; jphi < nphi; jphi++) {
6535  double ccc1 = digivariancehe[i][jeta][jphi];
6536  if (adigihe[i][jeta][jphi] > 0.) {
6537  HEnegativedirectionDigiD2->Fill(jphi, ccc1);
6538  ccctest = 1.; //HEnegativedirectionDigiD2->SetBinError(i,0.01);
6539  }
6540  } // for jphi
6541  if (ccctest > 0.) {
6542  //cout<<"1515 kcountHEnegativedirectionDigiD2 = "<<kcountHEnegativedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
6543  c3x5->cd(kcountHEnegativedirectionDigiD2);
6544  HEnegativedirectionDigiD2->SetMarkerStyle(20);
6545  HEnegativedirectionDigiD2->SetMarkerSize(0.4);
6546  HEnegativedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
6547  HEnegativedirectionDigiD2->SetXTitle("HEnegativedirectionDigiD2 \b");
6548  HEnegativedirectionDigiD2->SetMarkerColor(2);
6549  HEnegativedirectionDigiD2->SetLineColor(0);
6550  gPad->SetGridy();
6551  gPad->SetGridx();
6552  // gPad->SetLogy();
6553  if (kcountHEnegativedirectionDigiD2 == 1)
6554  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
6555  if (kcountHEnegativedirectionDigiD2 == 2)
6556  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
6557  if (kcountHEnegativedirectionDigiD2 == 3)
6558  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
6559  if (kcountHEnegativedirectionDigiD2 == 4)
6560  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
6561  if (kcountHEnegativedirectionDigiD2 == 5)
6562  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
6563  if (kcountHEnegativedirectionDigiD2 == 6)
6564  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
6565  if (kcountHEnegativedirectionDigiD2 == 7)
6566  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
6567  if (kcountHEnegativedirectionDigiD2 == 8)
6568  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
6569  if (kcountHEnegativedirectionDigiD2 == 9)
6570  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
6571  if (kcountHEnegativedirectionDigiD2 == 10)
6572  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
6573  if (kcountHEnegativedirectionDigiD2 == 11)
6574  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
6575  if (kcountHEnegativedirectionDigiD2 == 12)
6576  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
6577  if (kcountHEnegativedirectionDigiD2 == 13)
6578  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
6579  HEnegativedirectionDigiD2->Draw("Error");
6580  kcountHEnegativedirectionDigiD2++;
6581  if (kcountHEnegativedirectionDigiD2 > 13)
6582  break; // 4x6 = 24
6583  } //ccctest>0
6584 
6585  } // for i
6586  } //if(jeta-41 < 0)
6587  } //for jeta
6589  c3x5->Update();
6590  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
6591  c3x5->Clear();
6592  // clean-up
6593  if (h2CeffHEnegativedirectionDigiD2)
6594  delete h2CeffHEnegativedirectionDigiD2;
6595  //========================================================================================== 22222216
6596  //======================================================================
6597  //======================================================================1D plot: D vs phi , different eta, depth=3
6598  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
6599  c3x5->Clear();
6600  c3x5->Divide(3, 5);
6601  c3x5->cd(1);
6602  int kcountHEnegativedirectionDigiD3 = 1;
6603  TH1F *h2CeffHEnegativedirectionDigiD3 = new TH1F("h2CeffHEnegativedirectionDigiD3", "", nphi, 0., 72.);
6604 
6605  for (int jeta = 0; jeta < njeta; jeta++) {
6606  // negativedirectionDigiD:
6607  if (jeta - 41 < 0) {
6608  // for (int i=0;i<ndepth;i++) {
6609  // depth=3
6610  for (int i = 2; i < 3; i++) {
6611  TH1F *HEnegativedirectionDigiD3 = (TH1F *)h2CeffHEnegativedirectionDigiD3->Clone("twod1");
6612 
6613  float ccctest = 0; // to avoid empty massive elements
6614  for (int jphi = 0; jphi < nphi; jphi++) {
6615  double ccc1 = digivariancehe[i][jeta][jphi];
6616  if (adigihe[i][jeta][jphi] > 0.) {
6617  HEnegativedirectionDigiD3->Fill(jphi, ccc1);
6618  ccctest = 1.; //HEnegativedirectionDigiD3->SetBinError(i,0.01);
6619  }
6620  } // for jphi
6621  if (ccctest > 0.) {
6622  //cout<<"1616 kcountHEnegativedirectionDigiD3 = "<<kcountHEnegativedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
6623  c3x5->cd(kcountHEnegativedirectionDigiD3);
6624  HEnegativedirectionDigiD3->SetMarkerStyle(20);
6625  HEnegativedirectionDigiD3->SetMarkerSize(0.4);
6626  HEnegativedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
6627  HEnegativedirectionDigiD3->SetXTitle("HEnegativedirectionDigiD3 \b");
6628  HEnegativedirectionDigiD3->SetMarkerColor(2);
6629  HEnegativedirectionDigiD3->SetLineColor(0);
6630  gPad->SetGridy();
6631  gPad->SetGridx();
6632  // gPad->SetLogy();
6633  if (kcountHEnegativedirectionDigiD3 == 1)
6634  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
6635  if (kcountHEnegativedirectionDigiD3 == 2)
6636  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
6637  if (kcountHEnegativedirectionDigiD3 == 3)
6638  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
6639  if (kcountHEnegativedirectionDigiD3 == 4)
6640  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
6641  if (kcountHEnegativedirectionDigiD3 == 5)
6642  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
6643  if (kcountHEnegativedirectionDigiD3 == 6)
6644  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
6645  if (kcountHEnegativedirectionDigiD3 == 7)
6646  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
6647  if (kcountHEnegativedirectionDigiD3 == 8)
6648  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
6649  if (kcountHEnegativedirectionDigiD3 == 9)
6650  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
6651  if (kcountHEnegativedirectionDigiD3 == 10)
6652  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
6653  if (kcountHEnegativedirectionDigiD3 == 11)
6654  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
6655  if (kcountHEnegativedirectionDigiD3 == 12)
6656  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
6657  if (kcountHEnegativedirectionDigiD3 == 13)
6658  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
6659  HEnegativedirectionDigiD3->Draw("Error");
6660  kcountHEnegativedirectionDigiD3++;
6661  if (kcountHEnegativedirectionDigiD3 > 13)
6662  break; // 4x6 = 24
6663  } //ccctest>0
6664 
6665  } // for i
6666  } //if(jeta-41 < 0)
6667  } //for jeta
6669  c3x5->Update();
6670  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
6671  c3x5->Clear();
6672  // clean-up
6673  if (h2CeffHEnegativedirectionDigiD3)
6674  delete h2CeffHEnegativedirectionDigiD3;
6675  //========================================================================================== 22222217
6676  //======================================================================
6677  //======================================================================1D plot: D vs phi , different eta, depth=4
6678  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
6679  c3x5->Clear();
6680  c3x5->Divide(3, 5);
6681  c3x5->cd(1);
6682  int kcountHEnegativedirectionDigiD4 = 1;
6683  TH1F *h2CeffHEnegativedirectionDigiD4 = new TH1F("h2CeffHEnegativedirectionDigiD4", "", nphi, 0., 72.);
6684 
6685  for (int jeta = 0; jeta < njeta; jeta++) {
6686  // negativedirectionDigiD:
6687  if (jeta - 41 < 0) {
6688  // for (int i=0;i<ndepth;i++) {
6689  // depth=4
6690  for (int i = 3; i < 4; i++) {
6691  TH1F *HEnegativedirectionDigiD4 = (TH1F *)h2CeffHEnegativedirectionDigiD4->Clone("twod1");
6692 
6693  float ccctest = 0; // to avoid empty massive elements
6694  for (int jphi = 0; jphi < nphi; jphi++) {
6695  double ccc1 = digivariancehe[i][jeta][jphi];
6696  if (adigihe[i][jeta][jphi] > 0.) {
6697  HEnegativedirectionDigiD4->Fill(jphi, ccc1);
6698  ccctest = 1.; //HEnegativedirectionDigiD4->SetBinError(i,0.01);
6699  }
6700  } // for jphi
6701  if (ccctest > 0.) {
6702  //cout<<"1717 kcountHEnegativedirectionDigiD4 = "<<kcountHEnegativedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
6703  c3x5->cd(kcountHEnegativedirectionDigiD4);
6704  HEnegativedirectionDigiD4->SetMarkerStyle(20);
6705  HEnegativedirectionDigiD4->SetMarkerSize(0.4);
6706  HEnegativedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
6707  HEnegativedirectionDigiD4->SetXTitle("HEnegativedirectionDigiD4 \b");
6708  HEnegativedirectionDigiD4->SetMarkerColor(2);
6709  HEnegativedirectionDigiD4->SetLineColor(0);
6710  gPad->SetGridy();
6711  gPad->SetGridx();
6712  // gPad->SetLogy();
6713  if (kcountHEnegativedirectionDigiD4 == 1)
6714  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
6715  if (kcountHEnegativedirectionDigiD4 == 2)
6716  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
6717  if (kcountHEnegativedirectionDigiD4 == 3)
6718  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
6719  if (kcountHEnegativedirectionDigiD4 == 4)
6720  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
6721  if (kcountHEnegativedirectionDigiD4 == 5)
6722  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
6723  if (kcountHEnegativedirectionDigiD4 == 6)
6724  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
6725  if (kcountHEnegativedirectionDigiD4 == 7)
6726  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
6727  if (kcountHEnegativedirectionDigiD4 == 8)
6728  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
6729  if (kcountHEnegativedirectionDigiD4 == 9)
6730  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
6731  if (kcountHEnegativedirectionDigiD4 == 10)
6732  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
6733  if (kcountHEnegativedirectionDigiD4 == 11)
6734  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
6735  if (kcountHEnegativedirectionDigiD4 == 12)
6736  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
6737  HEnegativedirectionDigiD4->Draw("Error");
6738  kcountHEnegativedirectionDigiD4++;
6739  if (kcountHEnegativedirectionDigiD4 > 12)
6740  break; // 4x6 = 24
6741  } //ccctest>0
6742 
6743  } // for i
6744  } //if(jeta-41 < 0)
6745  } //for jeta
6747  c3x5->Update();
6748  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
6749  c3x5->Clear();
6750  // clean-up
6751  if (h2CeffHEnegativedirectionDigiD4)
6752  delete h2CeffHEnegativedirectionDigiD4;
6753  //========================================================================================== 22222218
6754  //======================================================================
6755  //======================================================================1D plot: D vs phi , different eta, depth=5
6756  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
6757  c3x5->Clear();
6758  c3x5->Divide(3, 5);
6759  c3x5->cd(1);
6760  int kcountHEnegativedirectionDigiD5 = 1;
6761  TH1F *h2CeffHEnegativedirectionDigiD5 = new TH1F("h2CeffHEnegativedirectionDigiD5", "", nphi, 0., 72.);
6762 
6763  for (int jeta = 0; jeta < njeta; jeta++) {
6764  // negativedirectionDigiD:
6765  if (jeta - 41 < 0) {
6766  // for (int i=0;i<ndepth;i++) {
6767  // depth=5
6768  for (int i = 4; i < 5; i++) {
6769  TH1F *HEnegativedirectionDigiD5 = (TH1F *)h2CeffHEnegativedirectionDigiD5->Clone("twod1");
6770 
6771  float ccctest = 0; // to avoid empty massive elements
6772  for (int jphi = 0; jphi < nphi; jphi++) {
6773  double ccc1 = digivariancehe[i][jeta][jphi];
6774  if (adigihe[i][jeta][jphi] > 0.) {
6775  HEnegativedirectionDigiD5->Fill(jphi, ccc1);
6776  ccctest = 1.; //HEnegativedirectionDigiD5->SetBinError(i,0.01);
6777  }
6778  } // for jphi
6779  if (ccctest > 0.) {
6780  //cout<<"1818 kcountHEnegativedirectionDigiD5 = "<<kcountHEnegativedirectionDigiD5 <<" jeta-41= "<< jeta-41 <<endl;
6781  c3x5->cd(kcountHEnegativedirectionDigiD5);
6782  HEnegativedirectionDigiD5->SetMarkerStyle(20);
6783  HEnegativedirectionDigiD5->SetMarkerSize(0.4);
6784  HEnegativedirectionDigiD5->GetYaxis()->SetLabelSize(0.04);
6785  HEnegativedirectionDigiD5->SetXTitle("HEnegativedirectionDigiD5 \b");
6786  HEnegativedirectionDigiD5->SetMarkerColor(2);
6787  HEnegativedirectionDigiD5->SetLineColor(0);
6788  gPad->SetGridy();
6789  gPad->SetGridx();
6790  // gPad->SetLogy();
6791  if (kcountHEnegativedirectionDigiD5 == 1)
6792  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
6793  if (kcountHEnegativedirectionDigiD5 == 2)
6794  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
6795  if (kcountHEnegativedirectionDigiD5 == 3)
6796  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
6797  if (kcountHEnegativedirectionDigiD5 == 4)
6798  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
6799  if (kcountHEnegativedirectionDigiD5 == 5)
6800  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
6801  if (kcountHEnegativedirectionDigiD5 == 6)
6802  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
6803  if (kcountHEnegativedirectionDigiD5 == 7)
6804  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
6805  if (kcountHEnegativedirectionDigiD5 == 8)
6806  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
6807  if (kcountHEnegativedirectionDigiD5 == 9)
6808  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
6809  if (kcountHEnegativedirectionDigiD5 == 10)
6810  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
6811  if (kcountHEnegativedirectionDigiD5 == 11)
6812  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
6813  HEnegativedirectionDigiD5->Draw("Error");
6814  kcountHEnegativedirectionDigiD5++;
6815  if (kcountHEnegativedirectionDigiD5 > 11)
6816  break; // 4x6 = 24
6817  } //ccctest>0
6818 
6819  } // for i
6820  } //if(jeta-41 < 0)
6821  } //for jeta
6823  c3x5->Update();
6824  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
6825  c3x5->Clear();
6826  // clean-up
6827  if (h2CeffHEnegativedirectionDigiD5)
6828  delete h2CeffHEnegativedirectionDigiD5;
6829  //========================================================================================== 22222219
6830  //======================================================================
6831  //======================================================================1D plot: D vs phi , different eta, depth=6
6832  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
6833  c3x5->Clear();
6834  c3x5->Divide(3, 5);
6835  c3x5->cd(1);
6836  int kcountHEnegativedirectionDigiD6 = 1;
6837  TH1F *h2CeffHEnegativedirectionDigiD6 = new TH1F("h2CeffHEnegativedirectionDigiD6", "", nphi, 0., 72.);
6838 
6839  for (int jeta = 0; jeta < njeta; jeta++) {
6840  // negativedirectionDigiD:
6841  if (jeta - 41 < 0) {
6842  // for (int i=0;i<ndepth;i++) {
6843  // depth=6
6844  for (int i = 5; i < 6; i++) {
6845  TH1F *HEnegativedirectionDigiD6 = (TH1F *)h2CeffHEnegativedirectionDigiD6->Clone("twod1");
6846 
6847  float ccctest = 0; // to avoid empty massive elements
6848  for (int jphi = 0; jphi < nphi; jphi++) {
6849  double ccc1 = digivariancehe[i][jeta][jphi];
6850  if (adigihe[i][jeta][jphi] > 0.) {
6851  HEnegativedirectionDigiD6->Fill(jphi, ccc1);
6852  ccctest = 1.; //HEnegativedirectionDigiD6->SetBinError(i,0.01);
6853  }
6854  } // for jphi
6855  if (ccctest > 0.) {
6856  //cout<<"1919 kcountHEnegativedirectionDigiD6 = "<<kcountHEnegativedirectionDigiD6 <<" jeta-41= "<< jeta-41 <<endl;
6857  c3x5->cd(kcountHEnegativedirectionDigiD6);
6858  HEnegativedirectionDigiD6->SetMarkerStyle(20);
6859  HEnegativedirectionDigiD6->SetMarkerSize(0.4);
6860  HEnegativedirectionDigiD6->GetYaxis()->SetLabelSize(0.04);
6861  HEnegativedirectionDigiD6->SetXTitle("HEnegativedirectionDigiD6 \b");
6862  HEnegativedirectionDigiD6->SetMarkerColor(2);
6863  HEnegativedirectionDigiD6->SetLineColor(0);
6864  gPad->SetGridy();
6865  gPad->SetGridx();
6866  // gPad->SetLogy();
6867  if (kcountHEnegativedirectionDigiD6 == 1)
6868  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
6869  if (kcountHEnegativedirectionDigiD6 == 2)
6870  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
6871  if (kcountHEnegativedirectionDigiD6 == 3)
6872  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
6873  if (kcountHEnegativedirectionDigiD6 == 4)
6874  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
6875  if (kcountHEnegativedirectionDigiD6 == 5)
6876  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
6877  if (kcountHEnegativedirectionDigiD6 == 6)
6878  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
6879  if (kcountHEnegativedirectionDigiD6 == 7)
6880  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
6881  if (kcountHEnegativedirectionDigiD6 == 8)
6882  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
6883  if (kcountHEnegativedirectionDigiD6 == 9)
6884  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
6885  if (kcountHEnegativedirectionDigiD6 == 10)
6886  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
6887  HEnegativedirectionDigiD6->Draw("Error");
6888  kcountHEnegativedirectionDigiD6++;
6889  if (kcountHEnegativedirectionDigiD6 > 10)
6890  break; // 4x6 = 24
6891  } //ccctest>0
6892 
6893  } // for i
6894  } //if(jeta-41 < 0)
6895  } //for jeta
6897  c3x5->Update();
6898  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
6899  c3x5->Clear();
6900  // clean-up
6901  if (h2CeffHEnegativedirectionDigiD6)
6902  delete h2CeffHEnegativedirectionDigiD6;
6903  //========================================================================================== 22222220
6904  //======================================================================
6905  //======================================================================1D plot: D vs phi , different eta, depth=7
6906  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
6907  c3x5->Clear();
6908  c3x5->Divide(3, 5);
6909  c3x5->cd(1);
6910  int kcountHEnegativedirectionDigiD7 = 1;
6911  TH1F *h2CeffHEnegativedirectionDigiD7 = new TH1F("h2CeffHEnegativedirectionDigiD7", "", nphi, 0., 72.);
6912 
6913  for (int jeta = 0; jeta < njeta; jeta++) {
6914  // negativedirectionDigiD:
6915  if (jeta - 41 < 0) {
6916  // for (int i=0;i<ndepth;i++) {
6917  // depth=7
6918  for (int i = 6; i < 7; i++) {
6919  TH1F *HEnegativedirectionDigiD7 = (TH1F *)h2CeffHEnegativedirectionDigiD7->Clone("twod1");
6920 
6921  float ccctest = 0; // to avoid empty massive elements
6922  for (int jphi = 0; jphi < nphi; jphi++) {
6923  double ccc1 = digivariancehe[i][jeta][jphi];
6924  if (adigihe[i][jeta][jphi] > 0.) {
6925  HEnegativedirectionDigiD7->Fill(jphi, ccc1);
6926  ccctest = 1.; //HEnegativedirectionDigiD7->SetBinError(i,0.01);
6927  }
6928  } // for jphi
6929  if (ccctest != 0.) {
6930  //cout<<"2020 kcountHEnegativedirectionDigiD7 = "<<kcountHEnegativedirectionDigiD7 <<" jeta-41= "<< jeta-41 <<endl;
6931  c3x5->cd(kcountHEnegativedirectionDigiD7);
6932  HEnegativedirectionDigiD7->SetMarkerStyle(20);
6933  HEnegativedirectionDigiD7->SetMarkerSize(0.4);
6934  HEnegativedirectionDigiD7->GetYaxis()->SetLabelSize(0.04);
6935  HEnegativedirectionDigiD7->SetXTitle("HEnegativedirectionDigiD7 \b");
6936  HEnegativedirectionDigiD7->SetMarkerColor(2);
6937  HEnegativedirectionDigiD7->SetLineColor(0);
6938  gPad->SetGridy();
6939  gPad->SetGridx();
6940  // gPad->SetLogy();
6941  if (kcountHEnegativedirectionDigiD7 == 1)
6942  HEnegativedirectionDigiD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
6943  if (kcountHEnegativedirectionDigiD7 == 2)
6944  HEnegativedirectionDigiD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
6945  if (kcountHEnegativedirectionDigiD7 == 3)
6946  HEnegativedirectionDigiD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
6947  HEnegativedirectionDigiD7->Draw("Error");
6948  kcountHEnegativedirectionDigiD7++;
6949  if (kcountHEnegativedirectionDigiD7 > 3)
6950  break; // 4x6 = 24
6951  } //ccctest>0
6952 
6953  } // for i
6954  } //if(jeta-41 < 0)
6955  } //for jeta
6957  c3x5->Update();
6958  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
6959  c3x5->Clear();
6960  // clean-up
6961  if (h2CeffHEnegativedirectionDigiD7)
6962  delete h2CeffHEnegativedirectionDigiD7;
6963  //===================================================================== END of Digi HE for phi-symmetry
6964  //===================================================================== END of Digi HE for phi-symmetry
6965  //===================================================================== END of Digi HE for phi-symmetry
6966 
6970  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
6971  //ndepth = k_max[5];
6972  ndepth = 4;
6973  double adigiHF[ndepth][njeta][njphi];
6974  double digivarianceHF[ndepth][njeta][njphi];
6975  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Digi HF
6976  TH2F *amplitudechannel1HF1 = (TH2F *)hfile->Get("h_amplitudechannel1_HF1");
6977  TH2F *amplitudechannel0HF1 = (TH2F *)hfile->Get("h_amplitudechannel0_HF1");
6978  TH2F *amplitudechannelHF1 = (TH2F *)amplitudechannel1HF1->Clone("amplitudechannelHF1");
6979  amplitudechannelHF1->Divide(amplitudechannel1HF1, amplitudechannel0HF1, 1, 1, "B");
6980  TH2F *amplitudechannel1HF2 = (TH2F *)hfile->Get("h_amplitudechannel1_HF2");
6981  TH2F *amplitudechannel0HF2 = (TH2F *)hfile->Get("h_amplitudechannel0_HF2");
6982  TH2F *amplitudechannelHF2 = (TH2F *)amplitudechannel1HF2->Clone("amplitudechannelHF2");
6983  amplitudechannelHF2->Divide(amplitudechannel1HF2, amplitudechannel0HF2, 1, 1, "B");
6984  TH2F *amplitudechannel1HF3 = (TH2F *)hfile->Get("h_amplitudechannel1_HF3");
6985  TH2F *amplitudechannel0HF3 = (TH2F *)hfile->Get("h_amplitudechannel0_HF3");
6986  TH2F *amplitudechannelHF3 = (TH2F *)amplitudechannel1HF3->Clone("amplitudechannelHF3");
6987  amplitudechannelHF3->Divide(amplitudechannel1HF3, amplitudechannel0HF3, 1, 1, "B");
6988  TH2F *amplitudechannel1HF4 = (TH2F *)hfile->Get("h_amplitudechannel1_HF4");
6989  TH2F *amplitudechannel0HF4 = (TH2F *)hfile->Get("h_amplitudechannel0_HF4");
6990  TH2F *amplitudechannelHF4 = (TH2F *)amplitudechannel1HF4->Clone("amplitudechannelHF4");
6991  amplitudechannelHF4->Divide(amplitudechannel1HF4, amplitudechannel0HF4, 1, 1, "B");
6992  for (int jeta = 0; jeta < njeta; jeta++) {
6993  //====================================================================== PHI normalization & put R into massive adigiHF
6994  //preparation for PHI normalization:
6995  double sumdigiHF0 = 0;
6996  int nsumdigiHF0 = 0;
6997  double sumdigiHF1 = 0;
6998  int nsumdigiHF1 = 0;
6999  double sumdigiHF2 = 0;
7000  int nsumdigiHF2 = 0;
7001  double sumdigiHF3 = 0;
7002  int nsumdigiHF3 = 0;
7003  for (int jphi = 0; jphi < njphi; jphi++) {
7004  adigiHF[0][jeta][jphi] = amplitudechannelHF1->GetBinContent(jeta + 1, jphi + 1);
7005  adigiHF[1][jeta][jphi] = amplitudechannelHF2->GetBinContent(jeta + 1, jphi + 1);
7006  adigiHF[2][jeta][jphi] = amplitudechannelHF3->GetBinContent(jeta + 1, jphi + 1);
7007  adigiHF[3][jeta][jphi] = amplitudechannelHF4->GetBinContent(jeta + 1, jphi + 1);
7008  if (adigiHF[0][jeta][jphi] > 0.) {
7009  sumdigiHF0 += adigiHF[0][jeta][jphi];
7010  ++nsumdigiHF0;
7011  }
7012  if (adigiHF[1][jeta][jphi] > 0.) {
7013  sumdigiHF1 += adigiHF[1][jeta][jphi];
7014  ++nsumdigiHF1;
7015  }
7016  if (adigiHF[2][jeta][jphi] > 0.) {
7017  sumdigiHF2 += adigiHF[2][jeta][jphi];
7018  ++nsumdigiHF2;
7019  }
7020  if (adigiHF[3][jeta][jphi] > 0.) {
7021  sumdigiHF3 += adigiHF[3][jeta][jphi];
7022  ++nsumdigiHF3;
7023  }
7024  } // phi
7025  // PHI normalization:
7026  for (int jphi = 0; jphi < njphi; jphi++) {
7027  if (adigiHF[0][jeta][jphi] > 0.)
7028  adigiHF[0][jeta][jphi] /= (sumdigiHF0 / nsumdigiHF0);
7029  if (adigiHF[1][jeta][jphi] > 0.)
7030  adigiHF[1][jeta][jphi] /= (sumdigiHF1 / nsumdigiHF1);
7031  if (adigiHF[2][jeta][jphi] > 0.)
7032  adigiHF[2][jeta][jphi] /= (sumdigiHF2 / nsumdigiHF2);
7033  if (adigiHF[3][jeta][jphi] > 0.)
7034  adigiHF[3][jeta][jphi] /= (sumdigiHF3 / nsumdigiHF3);
7035  } // phi
7036  } //eta
7037  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
7038  //======================================================================
7039  //======================================================================
7040  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
7041  c1x0->Clear();
7043  c1x0->Divide(1, 1);
7044  c1x0->cd(1);
7045  TH2F *GefzRdigiHF42D = new TH2F("GefzRdigiHF42D", "", neta, -41., 41., nphi, 0., 72.);
7046  TH2F *GefzRdigiHF42D0 = new TH2F("GefzRdigiHF42D0", "", neta, -41., 41., nphi, 0., 72.);
7047  TH2F *GefzRdigiHF42DF = (TH2F *)GefzRdigiHF42D0->Clone("GefzRdigiHF42DF");
7048  for (int i = 0; i < ndepth; i++) {
7049  for (int jeta = 0; jeta < neta; jeta++) {
7050  for (int jphi = 0; jphi < nphi; jphi++) {
7051  double ccc1 = adigiHF[i][jeta][jphi];
7052  int k2plot = jeta - 41;
7053  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
7054  if (ccc1 != 0.) {
7055  GefzRdigiHF42D->Fill(kkk, jphi, ccc1);
7056  GefzRdigiHF42D0->Fill(kkk, jphi, 1.);
7057  }
7058  }
7059  }
7060  }
7061  GefzRdigiHF42DF->Divide(GefzRdigiHF42D, GefzRdigiHF42D0, 1, 1, "B"); // average A
7062  gPad->SetGridy();
7063  gPad->SetGridx(); // gPad->SetLogz();
7064  GefzRdigiHF42DF->SetMarkerStyle(20);
7065  GefzRdigiHF42DF->SetMarkerSize(0.4);
7066  GefzRdigiHF42DF->GetZaxis()->SetLabelSize(0.08);
7067  GefzRdigiHF42DF->SetXTitle("<R>_depth #eta \b");
7068  GefzRdigiHF42DF->SetYTitle(" #phi \b");
7069  GefzRdigiHF42DF->SetZTitle("<R>_depth \b");
7070  GefzRdigiHF42DF->SetMarkerColor(2);
7071  GefzRdigiHF42DF->SetLineColor(
7072  0); // GefzRdigiHF42DF->SetMaximum(1.000); // GefzRdigiHF42DF->SetMinimum(1.0);
7073  GefzRdigiHF42DF->Draw("COLZ");
7075  c1x0->Update();
7076  c1x0->Print("RdigiGeneralD2PhiSymmetryHF.png");
7077  c1x0->Clear();
7078  // clean-up
7079  if (GefzRdigiHF42D)
7080  delete GefzRdigiHF42D;
7081  if (GefzRdigiHF42D0)
7082  delete GefzRdigiHF42D0;
7083  if (GefzRdigiHF42DF)
7084  delete GefzRdigiHF42DF;
7085  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
7086  //======================================================================
7087  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
7088  c1x1->Clear();
7090  c1x1->Divide(1, 1);
7091  c1x1->cd(1);
7092  TH1F *GefzRdigiHF41D = new TH1F("GefzRdigiHF41D", "", nphi, 0., 72.);
7093  TH1F *GefzRdigiHF41D0 = new TH1F("GefzRdigiHF41D0", "", nphi, 0., 72.);
7094  TH1F *GefzRdigiHF41DF = (TH1F *)GefzRdigiHF41D0->Clone("GefzRdigiHF41DF");
7095  for (int jphi = 0; jphi < nphi; jphi++) {
7096  for (int jeta = 0; jeta < neta; jeta++) {
7097  for (int i = 0; i < ndepth; i++) {
7098  double ccc1 = adigiHF[i][jeta][jphi];
7099  if (ccc1 != 0.) {
7100  GefzRdigiHF41D->Fill(jphi, ccc1);
7101  GefzRdigiHF41D0->Fill(jphi, 1.);
7102  }
7103  }
7104  }
7105  }
7106  GefzRdigiHF41DF->Divide(GefzRdigiHF41D, GefzRdigiHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
7107  GefzRdigiHF41D0->Sumw2();
7108  // for (int jphi=1;jphi<73;jphi++) {GefzRdigiHF41DF->SetBinError(jphi,0.01);}
7109  gPad->SetGridy();
7110  gPad->SetGridx(); // gPad->SetLogz();
7111  GefzRdigiHF41DF->SetMarkerStyle(20);
7112  GefzRdigiHF41DF->SetMarkerSize(1.4);
7113  GefzRdigiHF41DF->GetZaxis()->SetLabelSize(0.08);
7114  GefzRdigiHF41DF->SetXTitle("#phi \b");
7115  GefzRdigiHF41DF->SetYTitle(" <R> \b");
7116  GefzRdigiHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
7117  GefzRdigiHF41DF->SetMarkerColor(4);
7118  GefzRdigiHF41DF->SetLineColor(
7119  4); // GefzRdigiHF41DF->SetMinimum(0.8); // GefzRdigiHF41DF->SetMaximum(1.000);
7120  GefzRdigiHF41DF->Draw("Error");
7122  c1x1->Update();
7123  c1x1->Print("RdigiGeneralD1PhiSymmetryHF.png");
7124  c1x1->Clear();
7125  // clean-up
7126  if (GefzRdigiHF41D)
7127  delete GefzRdigiHF41D;
7128  if (GefzRdigiHF41D0)
7129  delete GefzRdigiHF41D0;
7130  if (GefzRdigiHF41DF)
7131  delete GefzRdigiHF41DF;
7132  //========================================================================================== 4
7133  //======================================================================
7134  //======================================================================1D plot: R vs phi , different eta, depth=1
7135  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
7136  c3x5->Clear();
7138  c3x5->Divide(3, 5);
7139  c3x5->cd(1);
7140  int kcountHFpositivedirectionDigi1 = 1;
7141  TH1F *h2CeffHFpositivedirectionDigi1 = new TH1F("h2CeffHFpositivedirectionDigi1", "", nphi, 0., 72.);
7142  for (int jeta = 0; jeta < njeta; jeta++) {
7143  // positivedirectionDigi:
7144  if (jeta - 41 >= 0) {
7145  // for (int i=0;i<ndepth;i++) {
7146  // depth=1
7147  for (int i = 0; i < 1; i++) {
7148  TH1F *HFpositivedirectionDigi1 = (TH1F *)h2CeffHFpositivedirectionDigi1->Clone("twod1");
7149  float ccctest = 0; // to avoid empty massive elements
7150  for (int jphi = 0; jphi < nphi; jphi++) {
7151  double ccc1 = adigiHF[i][jeta][jphi];
7152  if (ccc1 != 0.) {
7153  HFpositivedirectionDigi1->Fill(jphi, ccc1);
7154  ccctest = 1.; //HFpositivedirectionDigi1->SetBinError(i,0.01);
7155  }
7156  } // for jphi
7157  if (ccctest > 0.) {
7158  // cout<<"444 kcountHFpositivedirectionDigi1 = "<<kcountHFpositivedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
7159  c3x5->cd(kcountHFpositivedirectionDigi1);
7160  HFpositivedirectionDigi1->SetMarkerStyle(20);
7161  HFpositivedirectionDigi1->SetMarkerSize(0.4);
7162  HFpositivedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
7163  HFpositivedirectionDigi1->SetXTitle("HFpositivedirectionDigi1 \b");
7164  HFpositivedirectionDigi1->SetMarkerColor(2);
7165  HFpositivedirectionDigi1->SetLineColor(0);
7166  gPad->SetGridy();
7167  gPad->SetGridx();
7168  // gPad->SetLogy();
7169  if (kcountHFpositivedirectionDigi1 == 1)
7170  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
7171  if (kcountHFpositivedirectionDigi1 == 2)
7172  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
7173  if (kcountHFpositivedirectionDigi1 == 3)
7174  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
7175  if (kcountHFpositivedirectionDigi1 == 4)
7176  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
7177  if (kcountHFpositivedirectionDigi1 == 5)
7178  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
7179  if (kcountHFpositivedirectionDigi1 == 6)
7180  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
7181  if (kcountHFpositivedirectionDigi1 == 7)
7182  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
7183  if (kcountHFpositivedirectionDigi1 == 8)
7184  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
7185  if (kcountHFpositivedirectionDigi1 == 9)
7186  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
7187  if (kcountHFpositivedirectionDigi1 == 10)
7188  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
7189  if (kcountHFpositivedirectionDigi1 == 11)
7190  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
7191  if (kcountHFpositivedirectionDigi1 == 12)
7192  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
7193  if (kcountHFpositivedirectionDigi1 == 13)
7194  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
7195  HFpositivedirectionDigi1->Draw("Error");
7196  kcountHFpositivedirectionDigi1++;
7197  if (kcountHFpositivedirectionDigi1 > 13)
7198  break; //
7199  } //ccctest>0
7200 
7201  } // for i
7202  } //if(jeta-41 >= 0)
7203  } //for jeta
7205  c3x5->Update();
7206  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
7207  c3x5->Clear();
7208  // clean-up
7209  if (h2CeffHFpositivedirectionDigi1)
7210  delete h2CeffHFpositivedirectionDigi1;
7211 
7212  //========================================================================================== 5
7213  //======================================================================
7214  //======================================================================1D plot: R vs phi , different eta, depth=2
7215  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
7216  c3x5->Clear();
7218  c3x5->Divide(3, 5);
7219  c3x5->cd(1);
7220  int kcountHFpositivedirectionDigi2 = 1;
7221  TH1F *h2CeffHFpositivedirectionDigi2 = new TH1F("h2CeffHFpositivedirectionDigi2", "", nphi, 0., 72.);
7222  for (int jeta = 0; jeta < njeta; jeta++) {
7223  // positivedirectionDigi:
7224  if (jeta - 41 >= 0) {
7225  // for (int i=0;i<ndepth;i++) {
7226  // depth=2
7227  for (int i = 1; i < 2; i++) {
7228  TH1F *HFpositivedirectionDigi2 = (TH1F *)h2CeffHFpositivedirectionDigi2->Clone("twod1");
7229  float ccctest = 0; // to avoid empty massive elements
7230  for (int jphi = 0; jphi < nphi; jphi++) {
7231  double ccc1 = adigiHF[i][jeta][jphi];
7232  if (ccc1 != 0.) {
7233  HFpositivedirectionDigi2->Fill(jphi, ccc1);
7234  ccctest = 1.; //HFpositivedirectionDigi2->SetBinError(i,0.01);
7235  }
7236  } // for jphi
7237  if (ccctest > 0.) {
7238  //cout<<"555 kcountHFpositivedirectionDigi2 = "<<kcountHFpositivedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
7239  c3x5->cd(kcountHFpositivedirectionDigi2);
7240  HFpositivedirectionDigi2->SetMarkerStyle(20);
7241  HFpositivedirectionDigi2->SetMarkerSize(0.4);
7242  HFpositivedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
7243  HFpositivedirectionDigi2->SetXTitle("HFpositivedirectionDigi2 \b");
7244  HFpositivedirectionDigi2->SetMarkerColor(2);
7245  HFpositivedirectionDigi2->SetLineColor(0);
7246  gPad->SetGridy();
7247  gPad->SetGridx();
7248  // gPad->SetLogy();
7249  if (kcountHFpositivedirectionDigi2 == 1)
7250  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
7251  if (kcountHFpositivedirectionDigi2 == 2)
7252  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
7253  if (kcountHFpositivedirectionDigi2 == 3)
7254  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
7255  if (kcountHFpositivedirectionDigi2 == 4)
7256  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
7257  if (kcountHFpositivedirectionDigi2 == 5)
7258  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
7259  if (kcountHFpositivedirectionDigi2 == 6)
7260  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
7261  if (kcountHFpositivedirectionDigi2 == 7)
7262  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
7263  if (kcountHFpositivedirectionDigi2 == 8)
7264  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
7265  if (kcountHFpositivedirectionDigi2 == 9)
7266  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
7267  if (kcountHFpositivedirectionDigi2 == 10)
7268  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
7269  if (kcountHFpositivedirectionDigi2 == 11)
7270  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
7271  if (kcountHFpositivedirectionDigi2 == 12)
7272  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
7273  if (kcountHFpositivedirectionDigi2 == 13)
7274  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
7275  HFpositivedirectionDigi2->Draw("Error");
7276  kcountHFpositivedirectionDigi2++;
7277  if (kcountHFpositivedirectionDigi2 > 13)
7278  break; // 4x6 = 24
7279  } //ccctest>0
7280 
7281  } // for i
7282  } //if(jeta-41 >= 0)
7283  } //for jeta
7285  c3x5->Update();
7286  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
7287  c3x5->Clear();
7288  // clean-up
7289  if (h2CeffHFpositivedirectionDigi2)
7290  delete h2CeffHFpositivedirectionDigi2;
7291  //========================================================================================== 6
7292  //======================================================================
7293  //======================================================================1D plot: R vs phi , different eta, depth=3
7294  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
7295  c3x5->Clear();
7297  c3x5->Divide(3, 5);
7298  c3x5->cd(1);
7299  int kcountHFpositivedirectionDigi3 = 1;
7300  TH1F *h2CeffHFpositivedirectionDigi3 = new TH1F("h2CeffHFpositivedirectionDigi3", "", nphi, 0., 72.);
7301  for (int jeta = 0; jeta < njeta; jeta++) {
7302  // positivedirectionDigi:
7303  if (jeta - 41 >= 0) {
7304  // for (int i=0;i<ndepth;i++) {
7305  // depth=3
7306  for (int i = 2; i < 3; i++) {
7307  TH1F *HFpositivedirectionDigi3 = (TH1F *)h2CeffHFpositivedirectionDigi3->Clone("twod1");
7308  float ccctest = 0; // to avoid empty massive elements
7309  for (int jphi = 0; jphi < nphi; jphi++) {
7310  double ccc1 = adigiHF[i][jeta][jphi];
7311  if (ccc1 != 0.) {
7312  HFpositivedirectionDigi3->Fill(jphi, ccc1);
7313  ccctest = 1.; //HFpositivedirectionDigi3->SetBinError(i,0.01);
7314  }
7315  } // for jphi
7316  if (ccctest > 0.) {
7317  //cout<<"666 kcountHFpositivedirectionDigi3 = "<<kcountHFpositivedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
7318  c3x5->cd(kcountHFpositivedirectionDigi3);
7319  HFpositivedirectionDigi3->SetMarkerStyle(20);
7320  HFpositivedirectionDigi3->SetMarkerSize(0.4);
7321  HFpositivedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
7322  HFpositivedirectionDigi3->SetXTitle("HFpositivedirectionDigi3 \b");
7323  HFpositivedirectionDigi3->SetMarkerColor(2);
7324  HFpositivedirectionDigi3->SetLineColor(0);
7325  gPad->SetGridy();
7326  gPad->SetGridx();
7327  // gPad->SetLogy();
7328  if (kcountHFpositivedirectionDigi3 == 1)
7329  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 28; depth = 3 \b");
7330  if (kcountHFpositivedirectionDigi3 == 2)
7331  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 29; depth = 3 \b");
7332  if (kcountHFpositivedirectionDigi3 == 3)
7333  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 30; depth = 3 \b");
7334  if (kcountHFpositivedirectionDigi3 == 4)
7335  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 31; depth = 3 \b");
7336  if (kcountHFpositivedirectionDigi3 == 5)
7337  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 32; depth = 3 \b");
7338  if (kcountHFpositivedirectionDigi3 == 6)
7339  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 33; depth = 3 \b");
7340  if (kcountHFpositivedirectionDigi3 == 7)
7341  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 34; depth = 3 \b");
7342  if (kcountHFpositivedirectionDigi3 == 8)
7343  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 35; depth = 3 \b");
7344  if (kcountHFpositivedirectionDigi3 == 9)
7345  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 36; depth = 3 \b");
7346  if (kcountHFpositivedirectionDigi3 == 10)
7347  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 37; depth = 3 \b");
7348  if (kcountHFpositivedirectionDigi3 == 11)
7349  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 38; depth = 3 \b");
7350  if (kcountHFpositivedirectionDigi3 == 12)
7351  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 39; depth = 3 \b");
7352  if (kcountHFpositivedirectionDigi3 == 13)
7353  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 40; depth = 3 \b");
7354  HFpositivedirectionDigi3->Draw("Error");
7355  kcountHFpositivedirectionDigi3++;
7356  if (kcountHFpositivedirectionDigi3 > 13)
7357  break; // 4x6 = 24
7358  } //ccctest>0
7359 
7360  } // for i
7361  } //if(jeta-41 >= 0)
7362  } //for jeta
7364  c3x5->Update();
7365  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png");
7366  c3x5->Clear();
7367  // clean-up
7368  if (h2CeffHFpositivedirectionDigi3)
7369  delete h2CeffHFpositivedirectionDigi3;
7370  //========================================================================================== 7
7371  //======================================================================
7372  //======================================================================1D plot: R vs phi , different eta, depth=4
7373  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
7374  c3x5->Clear();
7376  c3x5->Divide(3, 5);
7377  c3x5->cd(1);
7378  int kcountHFpositivedirectionDigi4 = 1;
7379  TH1F *h2CeffHFpositivedirectionDigi4 = new TH1F("h2CeffHFpositivedirectionDigi4", "", nphi, 0., 72.);
7380 
7381  for (int jeta = 0; jeta < njeta; jeta++) {
7382  // positivedirectionDigi:
7383  if (jeta - 41 >= 0) {
7384  // for (int i=0;i<ndepth;i++) {
7385  // depth=4
7386  for (int i = 3; i < 4; i++) {
7387  TH1F *HFpositivedirectionDigi4 = (TH1F *)h2CeffHFpositivedirectionDigi4->Clone("twod1");
7388 
7389  float ccctest = 0; // to avoid empty massive elements
7390  for (int jphi = 0; jphi < nphi; jphi++) {
7391  double ccc1 = adigiHF[i][jeta][jphi];
7392  if (ccc1 != 0.) {
7393  HFpositivedirectionDigi4->Fill(jphi, ccc1);
7394  ccctest = 1.; //HFpositivedirectionDigi4->SetBinError(i,0.01);
7395  }
7396  } // for jphi
7397  if (ccctest > 0.) {
7398  //cout<<"777 kcountHFpositivedirectionDigi4 = "<<kcountHFpositivedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
7399  c3x5->cd(kcountHFpositivedirectionDigi4);
7400  HFpositivedirectionDigi4->SetMarkerStyle(20);
7401  HFpositivedirectionDigi4->SetMarkerSize(0.4);
7402  HFpositivedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
7403  HFpositivedirectionDigi4->SetXTitle("HFpositivedirectionDigi4 \b");
7404  HFpositivedirectionDigi4->SetMarkerColor(2);
7405  HFpositivedirectionDigi4->SetLineColor(0);
7406  gPad->SetGridy();
7407  gPad->SetGridx();
7408  // gPad->SetLogy();
7409  if (kcountHFpositivedirectionDigi4 == 1)
7410  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 28; depth = 4 \b");
7411  if (kcountHFpositivedirectionDigi4 == 2)
7412  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 29; depth = 4 \b");
7413  if (kcountHFpositivedirectionDigi4 == 3)
7414  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 30; depth = 4 \b");
7415  if (kcountHFpositivedirectionDigi4 == 4)
7416  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 31; depth = 4 \b");
7417  if (kcountHFpositivedirectionDigi4 == 5)
7418  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 32; depth = 4 \b");
7419  if (kcountHFpositivedirectionDigi4 == 6)
7420  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 33; depth = 4 \b");
7421  if (kcountHFpositivedirectionDigi4 == 7)
7422  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 34; depth = 4 \b");
7423  if (kcountHFpositivedirectionDigi4 == 8)
7424  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 35; depth = 4 \b");
7425  if (kcountHFpositivedirectionDigi4 == 9)
7426  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 36; depth = 4 \b");
7427  if (kcountHFpositivedirectionDigi4 == 10)
7428  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 37; depth = 4 \b");
7429  if (kcountHFpositivedirectionDigi4 == 11)
7430  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 38; depth = 4 \b");
7431  if (kcountHFpositivedirectionDigi4 == 12)
7432  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 39; depth = 4 \b");
7433  if (kcountHFpositivedirectionDigi4 == 13)
7434  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 40; depth = 4 \b");
7435  HFpositivedirectionDigi4->Draw("Error");
7436  kcountHFpositivedirectionDigi4++;
7437  if (kcountHFpositivedirectionDigi4 > 13)
7438  break; // 4x6 = 24
7439  } //ccctest>0
7440 
7441  } // for i
7442  } //if(jeta-41 >= 0)
7443  } //for jeta
7445  c3x5->Update();
7446  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png");
7447  c3x5->Clear();
7448  // clean-up
7449  if (h2CeffHFpositivedirectionDigi4)
7450  delete h2CeffHFpositivedirectionDigi4;
7451 
7452  //========================================================================================== 1111114
7453  //======================================================================
7454  //======================================================================1D plot: R vs phi , different eta, depth=1
7455  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
7456  c3x5->Clear();
7458  c3x5->Divide(3, 5);
7459  c3x5->cd(1);
7460  int kcountHFnegativedirectionDigi1 = 1;
7461  TH1F *h2CeffHFnegativedirectionDigi1 = new TH1F("h2CeffHFnegativedirectionDigi1", "", nphi, 0., 72.);
7462  for (int jeta = 0; jeta < njeta; jeta++) {
7463  // negativedirectionDigi:
7464  if (jeta - 41 < 0) {
7465  // for (int i=0;i<ndepth;i++) {
7466  // depth=1
7467  for (int i = 0; i < 1; i++) {
7468  TH1F *HFnegativedirectionDigi1 = (TH1F *)h2CeffHFnegativedirectionDigi1->Clone("twod1");
7469  float ccctest = 0; // to avoid empty massive elements
7470  for (int jphi = 0; jphi < nphi; jphi++) {
7471  double ccc1 = adigiHF[i][jeta][jphi];
7472  if (ccc1 != 0.) {
7473  HFnegativedirectionDigi1->Fill(jphi, ccc1);
7474  ccctest = 1.; //HFnegativedirectionDigi1->SetBinError(i,0.01);
7475  }
7476  } // for jphi
7477  if (ccctest > 0.) {
7478  // cout<<"444 kcountHFnegativedirectionDigi1 = "<<kcountHFnegativedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
7479  c3x5->cd(kcountHFnegativedirectionDigi1);
7480  HFnegativedirectionDigi1->SetMarkerStyle(20);
7481  HFnegativedirectionDigi1->SetMarkerSize(0.4);
7482  HFnegativedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
7483  HFnegativedirectionDigi1->SetXTitle("HFnegativedirectionDigi1 \b");
7484  HFnegativedirectionDigi1->SetMarkerColor(2);
7485  HFnegativedirectionDigi1->SetLineColor(0);
7486  gPad->SetGridy();
7487  gPad->SetGridx();
7488  // gPad->SetLogy();
7489  if (kcountHFnegativedirectionDigi1 == 1)
7490  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
7491  if (kcountHFnegativedirectionDigi1 == 2)
7492  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
7493  if (kcountHFnegativedirectionDigi1 == 3)
7494  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
7495  if (kcountHFnegativedirectionDigi1 == 4)
7496  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
7497  if (kcountHFnegativedirectionDigi1 == 5)
7498  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
7499  if (kcountHFnegativedirectionDigi1 == 6)
7500  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
7501  if (kcountHFnegativedirectionDigi1 == 7)
7502  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
7503  if (kcountHFnegativedirectionDigi1 == 8)
7504  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
7505  if (kcountHFnegativedirectionDigi1 == 9)
7506  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
7507  if (kcountHFnegativedirectionDigi1 == 10)
7508  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
7509  if (kcountHFnegativedirectionDigi1 == 11)
7510  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
7511  if (kcountHFnegativedirectionDigi1 == 12)
7512  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
7513  if (kcountHFnegativedirectionDigi1 == 13)
7514  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
7515  HFnegativedirectionDigi1->Draw("Error");
7516  kcountHFnegativedirectionDigi1++;
7517  if (kcountHFnegativedirectionDigi1 > 13)
7518  break; //
7519  } //ccctest>0
7520 
7521  } // for i
7522  } //if(jeta-41< 0)
7523  } //for jeta
7525  c3x5->Update();
7526  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
7527  c3x5->Clear();
7528  // clean-up
7529  if (h2CeffHFnegativedirectionDigi1)
7530  delete h2CeffHFnegativedirectionDigi1;
7531 
7532  //========================================================================================== 1111115
7533  //======================================================================
7534  //======================================================================1D plot: R vs phi , different eta, depth=2
7535  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
7536  c3x5->Clear();
7538  c3x5->Divide(3, 5);
7539  c3x5->cd(1);
7540  int kcountHFnegativedirectionDigi2 = 1;
7541  TH1F *h2CeffHFnegativedirectionDigi2 = new TH1F("h2CeffHFnegativedirectionDigi2", "", nphi, 0., 72.);
7542  for (int jeta = 0; jeta < njeta; jeta++) {
7543  // negativedirectionDigi:
7544  if (jeta - 41 < 0) {
7545  // for (int i=0;i<ndepth;i++) {
7546  // depth=2
7547  for (int i = 1; i < 2; i++) {
7548  TH1F *HFnegativedirectionDigi2 = (TH1F *)h2CeffHFnegativedirectionDigi2->Clone("twod1");
7549  float ccctest = 0; // to avoid empty massive elements
7550  for (int jphi = 0; jphi < nphi; jphi++) {
7551  double ccc1 = adigiHF[i][jeta][jphi];
7552  if (ccc1 != 0.) {
7553  HFnegativedirectionDigi2->Fill(jphi, ccc1);
7554  ccctest = 1.; //HFnegativedirectionDigi2->SetBinError(i,0.01);
7555  }
7556  } // for jphi
7557  if (ccctest > 0.) {
7558  //cout<<"555 kcountHFnegativedirectionDigi2 = "<<kcountHFnegativedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
7559  c3x5->cd(kcountHFnegativedirectionDigi2);
7560  HFnegativedirectionDigi2->SetMarkerStyle(20);
7561  HFnegativedirectionDigi2->SetMarkerSize(0.4);
7562  HFnegativedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
7563  HFnegativedirectionDigi2->SetXTitle("HFnegativedirectionDigi2 \b");
7564  HFnegativedirectionDigi2->SetMarkerColor(2);
7565  HFnegativedirectionDigi2->SetLineColor(0);
7566  gPad->SetGridy();
7567  gPad->SetGridx();
7568  // gPad->SetLogy();
7569  if (kcountHFnegativedirectionDigi2 == 1)
7570  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
7571  if (kcountHFnegativedirectionDigi2 == 2)
7572  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
7573  if (kcountHFnegativedirectionDigi2 == 3)
7574  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
7575  if (kcountHFnegativedirectionDigi2 == 4)
7576  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
7577  if (kcountHFnegativedirectionDigi2 == 5)
7578  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
7579  if (kcountHFnegativedirectionDigi2 == 6)
7580  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
7581  if (kcountHFnegativedirectionDigi2 == 7)
7582  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
7583  if (kcountHFnegativedirectionDigi2 == 8)
7584  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
7585  if (kcountHFnegativedirectionDigi2 == 9)
7586  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
7587  if (kcountHFnegativedirectionDigi2 == 10)
7588  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
7589  if (kcountHFnegativedirectionDigi2 == 11)
7590  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
7591  if (kcountHFnegativedirectionDigi2 == 12)
7592  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
7593  if (kcountHFnegativedirectionDigi2 == 13)
7594  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
7595  HFnegativedirectionDigi2->Draw("Error");
7596  kcountHFnegativedirectionDigi2++;
7597  if (kcountHFnegativedirectionDigi2 > 13)
7598  break; // 4x6 = 24
7599  } //ccctest>0
7600 
7601  } // for i
7602  } //if(jeta-41< 0)
7603  } //for jeta
7605  c3x5->Update();
7606  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
7607  c3x5->Clear();
7608  // clean-up
7609  if (h2CeffHFnegativedirectionDigi2)
7610  delete h2CeffHFnegativedirectionDigi2;
7611  //========================================================================================== 1111116
7612  //======================================================================
7613  //======================================================================1D plot: R vs phi , different eta, depth=3
7614  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
7615  c3x5->Clear();
7617  c3x5->Divide(3, 5);
7618  c3x5->cd(1);
7619  int kcountHFnegativedirectionDigi3 = 1;
7620  TH1F *h2CeffHFnegativedirectionDigi3 = new TH1F("h2CeffHFnegativedirectionDigi3", "", nphi, 0., 72.);
7621  for (int jeta = 0; jeta < njeta; jeta++) {
7622  // negativedirectionDigi:
7623  if (jeta - 41 < 0) {
7624  // for (int i=0;i<ndepth;i++) {
7625  // depth=3
7626  for (int i = 2; i < 3; i++) {
7627  TH1F *HFnegativedirectionDigi3 = (TH1F *)h2CeffHFnegativedirectionDigi3->Clone("twod1");
7628  float ccctest = 0; // to avoid empty massive elements
7629  for (int jphi = 0; jphi < nphi; jphi++) {
7630  double ccc1 = adigiHF[i][jeta][jphi];
7631  if (ccc1 != 0.) {
7632  HFnegativedirectionDigi3->Fill(jphi, ccc1);
7633  ccctest = 1.; //HFnegativedirectionDigi3->SetBinError(i,0.01);
7634  }
7635  } // for jphi
7636  if (ccctest > 0.) {
7637  //cout<<"666 kcountHFnegativedirectionDigi3 = "<<kcountHFnegativedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
7638  c3x5->cd(kcountHFnegativedirectionDigi3);
7639  HFnegativedirectionDigi3->SetMarkerStyle(20);
7640  HFnegativedirectionDigi3->SetMarkerSize(0.4);
7641  HFnegativedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
7642  HFnegativedirectionDigi3->SetXTitle("HFnegativedirectionDigi3 \b");
7643  HFnegativedirectionDigi3->SetMarkerColor(2);
7644  HFnegativedirectionDigi3->SetLineColor(0);
7645  gPad->SetGridy();
7646  gPad->SetGridx();
7647  // gPad->SetLogy();
7648  if (kcountHFnegativedirectionDigi3 == 1)
7649  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-41; depth = 3 \b");
7650  if (kcountHFnegativedirectionDigi3 == 2)
7651  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-40; depth = 3 \b");
7652  if (kcountHFnegativedirectionDigi3 == 3)
7653  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-39; depth = 3 \b");
7654  if (kcountHFnegativedirectionDigi3 == 4)
7655  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-38; depth = 3 \b");
7656  if (kcountHFnegativedirectionDigi3 == 5)
7657  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-37; depth = 3 \b");
7658  if (kcountHFnegativedirectionDigi3 == 6)
7659  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-36; depth = 3 \b");
7660  if (kcountHFnegativedirectionDigi3 == 7)
7661  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-35; depth = 3 \b");
7662  if (kcountHFnegativedirectionDigi3 == 8)
7663  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-34; depth = 3 \b");
7664  if (kcountHFnegativedirectionDigi3 == 9)
7665  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-33; depth = 3 \b");
7666  if (kcountHFnegativedirectionDigi3 == 10)
7667  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-32; depth = 3 \b");
7668  if (kcountHFnegativedirectionDigi3 == 11)
7669  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-31; depth = 3 \b");
7670  if (kcountHFnegativedirectionDigi3 == 12)
7671  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-30; depth = 3 \b");
7672  if (kcountHFnegativedirectionDigi3 == 13)
7673  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-29; depth = 3 \b");
7674  HFnegativedirectionDigi3->Draw("Error");
7675  kcountHFnegativedirectionDigi3++;
7676  if (kcountHFnegativedirectionDigi3 > 13)
7677  break; // 4x6 = 24
7678  } //ccctest>0
7679 
7680  } // for i
7681  } //if(jeta-41< 0)
7682  } //for jeta
7684  c3x5->Update();
7685  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png");
7686  c3x5->Clear();
7687  // clean-up
7688  if (h2CeffHFnegativedirectionDigi3)
7689  delete h2CeffHFnegativedirectionDigi3;
7690  //========================================================================================== 1111117
7691  //======================================================================
7692  //======================================================================1D plot: R vs phi , different eta, depth=4
7693  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
7694  c3x5->Clear();
7696  c3x5->Divide(3, 5);
7697  c3x5->cd(1);
7698  int kcountHFnegativedirectionDigi4 = 1;
7699  TH1F *h2CeffHFnegativedirectionDigi4 = new TH1F("h2CeffHFnegativedirectionDigi4", "", nphi, 0., 72.);
7700 
7701  for (int jeta = 0; jeta < njeta; jeta++) {
7702  // negativedirectionDigi:
7703  if (jeta - 41 < 0) {
7704  // for (int i=0;i<ndepth;i++) {
7705  // depth=4
7706  for (int i = 3; i < 4; i++) {
7707  TH1F *HFnegativedirectionDigi4 = (TH1F *)h2CeffHFnegativedirectionDigi4->Clone("twod1");
7708 
7709  float ccctest = 0; // to avoid empty massive elements
7710  for (int jphi = 0; jphi < nphi; jphi++) {
7711  double ccc1 = adigiHF[i][jeta][jphi];
7712  if (ccc1 != 0.) {
7713  HFnegativedirectionDigi4->Fill(jphi, ccc1);
7714  ccctest = 1.; //HFnegativedirectionDigi4->SetBinError(i,0.01);
7715  }
7716  } // for jphi
7717  if (ccctest > 0.) {
7718  //cout<<"777 kcountHFnegativedirectionDigi4 = "<<kcountHFnegativedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
7719  c3x5->cd(kcountHFnegativedirectionDigi4);
7720  HFnegativedirectionDigi4->SetMarkerStyle(20);
7721  HFnegativedirectionDigi4->SetMarkerSize(0.4);
7722  HFnegativedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
7723  HFnegativedirectionDigi4->SetXTitle("HFnegativedirectionDigi4 \b");
7724  HFnegativedirectionDigi4->SetMarkerColor(2);
7725  HFnegativedirectionDigi4->SetLineColor(0);
7726  gPad->SetGridy();
7727  gPad->SetGridx();
7728  // gPad->SetLogy();
7729  if (kcountHFnegativedirectionDigi4 == 1)
7730  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-41; depth = 4 \b");
7731  if (kcountHFnegativedirectionDigi4 == 2)
7732  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-40; depth = 4 \b");
7733  if (kcountHFnegativedirectionDigi4 == 3)
7734  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-39; depth = 4 \b");
7735  if (kcountHFnegativedirectionDigi4 == 4)
7736  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-38; depth = 4 \b");
7737  if (kcountHFnegativedirectionDigi4 == 5)
7738  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-37; depth = 4 \b");
7739  if (kcountHFnegativedirectionDigi4 == 6)
7740  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-36; depth = 4 \b");
7741  if (kcountHFnegativedirectionDigi4 == 7)
7742  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-35; depth = 4 \b");
7743  if (kcountHFnegativedirectionDigi4 == 8)
7744  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-34; depth = 4 \b");
7745  if (kcountHFnegativedirectionDigi4 == 9)
7746  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-33; depth = 4 \b");
7747  if (kcountHFnegativedirectionDigi4 == 10)
7748  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-32; depth = 4 \b");
7749  if (kcountHFnegativedirectionDigi4 == 11)
7750  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-31; depth = 4 \b");
7751  if (kcountHFnegativedirectionDigi4 == 12)
7752  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-30; depth = 4 \b");
7753  if (kcountHFnegativedirectionDigi4 == 13)
7754  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-29; depth = 4 \b");
7755  HFnegativedirectionDigi4->Draw("Error");
7756  kcountHFnegativedirectionDigi4++;
7757  if (kcountHFnegativedirectionDigi4 > 13)
7758  break; // 4x6 = 24
7759  } //ccctest>0
7760 
7761  } // for i
7762  } //if(jeta-41< 0)
7763  } //for jeta
7765  c3x5->Update();
7766  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png");
7767  c3x5->Clear();
7768  // clean-up
7769  if (h2CeffHFnegativedirectionDigi4)
7770  delete h2CeffHFnegativedirectionDigi4;
7771 
7772  //======================================================================================================================
7773  //======================================================================================================================
7774  //======================================================================================================================
7775  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
7776 
7777  //cout<<" Start Vaiance: preparation *****" <<endl;
7778  TH2F *digiVariance1HF1 = (TH2F *)hfile->Get("h_amplitudechannel2_HF1");
7779  TH2F *digiVariance0HF1 = (TH2F *)hfile->Get("h_amplitudechannel0_HF1");
7780  TH2F *digiVarianceHF1 = (TH2F *)digiVariance1HF1->Clone("digiVarianceHF1");
7781  digiVarianceHF1->Divide(digiVariance1HF1, digiVariance0HF1, 1, 1, "B");
7782  TH2F *digiVariance1HF2 = (TH2F *)hfile->Get("h_amplitudechannel2_HF2");
7783  TH2F *digiVariance0HF2 = (TH2F *)hfile->Get("h_amplitudechannel0_HF2");
7784  TH2F *digiVarianceHF2 = (TH2F *)digiVariance1HF2->Clone("digiVarianceHF2");
7785  digiVarianceHF2->Divide(digiVariance1HF2, digiVariance0HF2, 1, 1, "B");
7786  TH2F *digiVariance1HF3 = (TH2F *)hfile->Get("h_amplitudechannel2_HF3");
7787  TH2F *digiVariance0HF3 = (TH2F *)hfile->Get("h_amplitudechannel0_HF3");
7788  TH2F *digiVarianceHF3 = (TH2F *)digiVariance1HF3->Clone("digiVarianceHF3");
7789  digiVarianceHF3->Divide(digiVariance1HF3, digiVariance0HF3, 1, 1, "B");
7790  TH2F *digiVariance1HF4 = (TH2F *)hfile->Get("h_amplitudechannel2_HF4");
7791  TH2F *digiVariance0HF4 = (TH2F *)hfile->Get("h_amplitudechannel0_HF4");
7792  TH2F *digiVarianceHF4 = (TH2F *)digiVariance1HF4->Clone("digiVarianceHF4");
7793  digiVarianceHF4->Divide(digiVariance1HF4, digiVariance0HF4, 1, 1, "B");
7794  //cout<<" Vaiance: preparation DONE *****" <<endl;
7795  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive digivarianceHF
7796  // = sum(R*R)/N - (sum(R)/N)**2
7797  for (int jeta = 0; jeta < njeta; jeta++) {
7798  //preparation for PHI normalization:
7799  double sumdigiHF0 = 0;
7800  int nsumdigiHF0 = 0;
7801  double sumdigiHF1 = 0;
7802  int nsumdigiHF1 = 0;
7803  double sumdigiHF2 = 0;
7804  int nsumdigiHF2 = 0;
7805  double sumdigiHF3 = 0;
7806  int nsumdigiHF3 = 0;
7807  for (int jphi = 0; jphi < njphi; jphi++) {
7808  digivarianceHF[0][jeta][jphi] = digiVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
7809  digivarianceHF[1][jeta][jphi] = digiVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
7810  digivarianceHF[2][jeta][jphi] = digiVarianceHF3->GetBinContent(jeta + 1, jphi + 1);
7811  digivarianceHF[3][jeta][jphi] = digiVarianceHF4->GetBinContent(jeta + 1, jphi + 1);
7812  if (digivarianceHF[0][jeta][jphi] > 0.) {
7813  sumdigiHF0 += digivarianceHF[0][jeta][jphi];
7814  ++nsumdigiHF0;
7815  }
7816  if (digivarianceHF[1][jeta][jphi] > 0.) {
7817  sumdigiHF1 += digivarianceHF[1][jeta][jphi];
7818  ++nsumdigiHF1;
7819  }
7820  if (digivarianceHF[2][jeta][jphi] > 0.) {
7821  sumdigiHF2 += digivarianceHF[2][jeta][jphi];
7822  ++nsumdigiHF2;
7823  }
7824  if (digivarianceHF[3][jeta][jphi] > 0.) {
7825  sumdigiHF3 += digivarianceHF[3][jeta][jphi];
7826  ++nsumdigiHF3;
7827  }
7828  } // phi
7829  // PHI normalization :
7830  for (int jphi = 0; jphi < njphi; jphi++) {
7831  if (digivarianceHF[0][jeta][jphi] > 0.)
7832  digivarianceHF[0][jeta][jphi] /= (sumdigiHF0 / nsumdigiHF0);
7833  if (digivarianceHF[1][jeta][jphi] > 0.)
7834  digivarianceHF[1][jeta][jphi] /= (sumdigiHF1 / nsumdigiHF1);
7835  if (digivarianceHF[2][jeta][jphi] > 0.)
7836  digivarianceHF[2][jeta][jphi] /= (sumdigiHF2 / nsumdigiHF2);
7837  if (digivarianceHF[3][jeta][jphi] > 0.)
7838  digivarianceHF[3][jeta][jphi] /= (sumdigiHF3 / nsumdigiHF3);
7839  } // phi
7840  // digivarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
7841  for (int jphi = 0; jphi < njphi; jphi++) {
7842  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
7843  digivarianceHF[0][jeta][jphi] -= adigiHF[0][jeta][jphi] * adigiHF[0][jeta][jphi];
7844  digivarianceHF[0][jeta][jphi] = fabs(digivarianceHF[0][jeta][jphi]);
7845  digivarianceHF[1][jeta][jphi] -= adigiHF[1][jeta][jphi] * adigiHF[1][jeta][jphi];
7846  digivarianceHF[1][jeta][jphi] = fabs(digivarianceHF[1][jeta][jphi]);
7847  digivarianceHF[2][jeta][jphi] -= adigiHF[2][jeta][jphi] * adigiHF[2][jeta][jphi];
7848  digivarianceHF[2][jeta][jphi] = fabs(digivarianceHF[2][jeta][jphi]);
7849  digivarianceHF[3][jeta][jphi] -= adigiHF[3][jeta][jphi] * adigiHF[3][jeta][jphi];
7850  digivarianceHF[3][jeta][jphi] = fabs(digivarianceHF[3][jeta][jphi]);
7851  }
7852  }
7853  //cout<<" Vaiance: DONE*****" <<endl;
7854  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
7855  //======================================================================
7856  //======================================================================
7857  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
7858  c1x1->Clear();
7860  c1x0->Divide(1, 1);
7861  c1x0->cd(1);
7862  TH2F *DefzDdigiHF42D = new TH2F("DefzDdigiHF42D", "", neta, -41., 41., nphi, 0., 72.);
7863  TH2F *DefzDdigiHF42D0 = new TH2F("DefzDdigiHF42D0", "", neta, -41., 41., nphi, 0., 72.);
7864  TH2F *DefzDdigiHF42DF = (TH2F *)DefzDdigiHF42D0->Clone("DefzDdigiHF42DF");
7865  for (int i = 0; i < ndepth; i++) {
7866  for (int jeta = 0; jeta < neta; jeta++) {
7867  for (int jphi = 0; jphi < nphi; jphi++) {
7868  double ccc1 = digivarianceHF[i][jeta][jphi];
7869  int k2plot = jeta - 41;
7870  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
7871  if (adigiHF[i][jeta][jphi] > 0.) {
7872  DefzDdigiHF42D->Fill(kkk, jphi, ccc1);
7873  DefzDdigiHF42D0->Fill(kkk, jphi, 1.);
7874  }
7875  }
7876  }
7877  }
7878  DefzDdigiHF42DF->Divide(DefzDdigiHF42D, DefzDdigiHF42D0, 1, 1, "B"); // average A
7879  // DefzDdigiHF1->Sumw2();
7880  gPad->SetGridy();
7881  gPad->SetGridx(); // gPad->SetLogz();
7882  DefzDdigiHF42DF->SetMarkerStyle(20);
7883  DefzDdigiHF42DF->SetMarkerSize(0.4);
7884  DefzDdigiHF42DF->GetZaxis()->SetLabelSize(0.08);
7885  DefzDdigiHF42DF->SetXTitle("<D>_depth #eta \b");
7886  DefzDdigiHF42DF->SetYTitle(" #phi \b");
7887  DefzDdigiHF42DF->SetZTitle("<D>_depth \b");
7888  DefzDdigiHF42DF->SetMarkerColor(2);
7889  DefzDdigiHF42DF->SetLineColor(
7890  0); // DefzDdigiHF42DF->SetMaximum(1.000); // DefzDdigiHF42DF->SetMinimum(1.0);
7891  DefzDdigiHF42DF->Draw("COLZ");
7893  c1x0->Update();
7894  c1x0->Print("DdigiGeneralD2PhiSymmetryHF.png");
7895  c1x0->Clear();
7896  // clean-up
7897  if (DefzDdigiHF42D)
7898  delete DefzDdigiHF42D;
7899  if (DefzDdigiHF42D0)
7900  delete DefzDdigiHF42D0;
7901  if (DefzDdigiHF42DF)
7902  delete DefzDdigiHF42DF;
7903  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
7904  //======================================================================
7905  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
7906  c1x1->Clear();
7908  c1x1->Divide(1, 1);
7909  c1x1->cd(1);
7910  TH1F *DefzDdigiHF41D = new TH1F("DefzDdigiHF41D", "", nphi, 0., 72.);
7911  TH1F *DefzDdigiHF41D0 = new TH1F("DefzDdigiHF41D0", "", nphi, 0., 72.);
7912  TH1F *DefzDdigiHF41DF = (TH1F *)DefzDdigiHF41D0->Clone("DefzDdigiHF41DF");
7913 
7914  for (int jphi = 0; jphi < nphi; jphi++) {
7915  for (int jeta = 0; jeta < neta; jeta++) {
7916  for (int i = 0; i < ndepth; i++) {
7917  double ccc1 = digivarianceHF[i][jeta][jphi];
7918  if (adigiHF[i][jeta][jphi] > 0.) {
7919  DefzDdigiHF41D->Fill(jphi, ccc1);
7920  DefzDdigiHF41D0->Fill(jphi, 1.);
7921  }
7922  }
7923  }
7924  }
7925  // DefzDdigiHF41D->Sumw2();DefzDdigiHF41D0->Sumw2();
7926 
7927  DefzDdigiHF41DF->Divide(DefzDdigiHF41D, DefzDdigiHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
7928  DefzDdigiHF41D0->Sumw2();
7929  // for (int jphi=1;jphi<73;jphi++) {DefzDdigiHF41DF->SetBinError(jphi,0.01);}
7930  gPad->SetGridy();
7931  gPad->SetGridx(); // gPad->SetLogz();
7932  DefzDdigiHF41DF->SetMarkerStyle(20);
7933  DefzDdigiHF41DF->SetMarkerSize(1.4);
7934  DefzDdigiHF41DF->GetZaxis()->SetLabelSize(0.08);
7935  DefzDdigiHF41DF->SetXTitle("#phi \b");
7936  DefzDdigiHF41DF->SetYTitle(" <D> \b");
7937  DefzDdigiHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
7938  DefzDdigiHF41DF->SetMarkerColor(4);
7939  DefzDdigiHF41DF->SetLineColor(4); // DefzDdigiHF41DF->SetMinimum(0.8); DefzDdigiHF41DF->SetMinimum(-0.015);
7940  DefzDdigiHF41DF->Draw("Error");
7942  c1x1->Update();
7943  c1x1->Print("DdigiGeneralD1PhiSymmetryHF.png");
7944  c1x1->Clear();
7945  // clean-up
7946  if (DefzDdigiHF41D)
7947  delete DefzDdigiHF41D;
7948  if (DefzDdigiHF41D0)
7949  delete DefzDdigiHF41D0;
7950  if (DefzDdigiHF41DF)
7951  delete DefzDdigiHF41DF;
7952  //========================================================================================== 14
7953  //======================================================================
7954  //======================================================================1D plot: D vs phi , different eta, depth=1
7955  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
7956  c3x5->Clear();
7958  c3x5->Divide(3, 5);
7959  c3x5->cd(1);
7960  int kcountHFpositivedirectionDigiD1 = 1;
7961  TH1F *h2CeffHFpositivedirectionDigiD1 = new TH1F("h2CeffHFpositivedirectionDigiD1", "", nphi, 0., 72.);
7962 
7963  for (int jeta = 0; jeta < njeta; jeta++) {
7964  // positivedirectionDigiD:
7965  if (jeta - 41 >= 0) {
7966  // for (int i=0;i<ndepth;i++) {
7967  // depth=1
7968  for (int i = 0; i < 1; i++) {
7969  TH1F *HFpositivedirectionDigiD1 = (TH1F *)h2CeffHFpositivedirectionDigiD1->Clone("twod1");
7970 
7971  float ccctest = 0; // to avoid empty massive elements
7972  for (int jphi = 0; jphi < nphi; jphi++) {
7973  double ccc1 = digivarianceHF[i][jeta][jphi];
7974  if (adigiHF[i][jeta][jphi] > 0.) {
7975  HFpositivedirectionDigiD1->Fill(jphi, ccc1);
7976  ccctest = 1.; //HFpositivedirectionDigiD1->SetBinError(i,0.01);
7977  }
7978  } // for jphi
7979  if (ccctest > 0.) {
7980  //cout<<"1414 kcountHFpositivedirectionDigiD1 = "<<kcountHFpositivedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
7981  c3x5->cd(kcountHFpositivedirectionDigiD1);
7982  HFpositivedirectionDigiD1->SetMarkerStyle(20);
7983  HFpositivedirectionDigiD1->SetMarkerSize(0.4);
7984  HFpositivedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
7985  HFpositivedirectionDigiD1->SetXTitle("HFpositivedirectionDigiD1 \b");
7986  HFpositivedirectionDigiD1->SetMarkerColor(2);
7987  HFpositivedirectionDigiD1->SetLineColor(0);
7988  gPad->SetGridy();
7989  gPad->SetGridx();
7990  // gPad->SetLogy();
7991  if (kcountHFpositivedirectionDigiD1 == 1)
7992  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
7993  if (kcountHFpositivedirectionDigiD1 == 2)
7994  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
7995  if (kcountHFpositivedirectionDigiD1 == 3)
7996  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
7997  if (kcountHFpositivedirectionDigiD1 == 4)
7998  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
7999  if (kcountHFpositivedirectionDigiD1 == 5)
8000  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
8001  if (kcountHFpositivedirectionDigiD1 == 6)
8002  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
8003  if (kcountHFpositivedirectionDigiD1 == 7)
8004  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
8005  if (kcountHFpositivedirectionDigiD1 == 8)
8006  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
8007  if (kcountHFpositivedirectionDigiD1 == 9)
8008  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
8009  if (kcountHFpositivedirectionDigiD1 == 10)
8010  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
8011  if (kcountHFpositivedirectionDigiD1 == 11)
8012  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
8013  if (kcountHFpositivedirectionDigiD1 == 12)
8014  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
8015  if (kcountHFpositivedirectionDigiD1 == 13)
8016  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
8017  HFpositivedirectionDigiD1->Draw("Error");
8018  kcountHFpositivedirectionDigiD1++;
8019  if (kcountHFpositivedirectionDigiD1 > 13)
8020  break; // 4x6 = 24
8021  } //ccctest>0
8022 
8023  } // for i
8024  } //if(jeta-41 >= 0)
8025  } //for jeta
8027  c3x5->Update();
8028  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
8029  c3x5->Clear();
8030  // clean-up
8031  if (h2CeffHFpositivedirectionDigiD1)
8032  delete h2CeffHFpositivedirectionDigiD1;
8033  //========================================================================================== 15
8034  //======================================================================
8035  //======================================================================1D plot: D vs phi , different eta, depth=2
8036  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
8037  c3x5->Clear();
8038  c3x5->Divide(3, 5);
8039  c3x5->cd(1);
8040  int kcountHFpositivedirectionDigiD2 = 1;
8041  TH1F *h2CeffHFpositivedirectionDigiD2 = new TH1F("h2CeffHFpositivedirectionDigiD2", "", nphi, 0., 72.);
8042 
8043  for (int jeta = 0; jeta < njeta; jeta++) {
8044  // positivedirectionDigiD:
8045  if (jeta - 41 >= 0) {
8046  // for (int i=0;i<ndepth;i++) {
8047  // depth=2
8048  for (int i = 1; i < 2; i++) {
8049  TH1F *HFpositivedirectionDigiD2 = (TH1F *)h2CeffHFpositivedirectionDigiD2->Clone("twod1");
8050 
8051  float ccctest = 0; // to avoid empty massive elements
8052  for (int jphi = 0; jphi < nphi; jphi++) {
8053  double ccc1 = digivarianceHF[i][jeta][jphi];
8054  if (adigiHF[i][jeta][jphi] > 0.) {
8055  HFpositivedirectionDigiD2->Fill(jphi, ccc1);
8056  ccctest = 1.; //HFpositivedirectionDigiD2->SetBinError(i,0.01);
8057  }
8058  } // for jphi
8059  if (ccctest > 0.) {
8060  //cout<<"1515 kcountHFpositivedirectionDigiD2 = "<<kcountHFpositivedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
8061  c3x5->cd(kcountHFpositivedirectionDigiD2);
8062  HFpositivedirectionDigiD2->SetMarkerStyle(20);
8063  HFpositivedirectionDigiD2->SetMarkerSize(0.4);
8064  HFpositivedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
8065  HFpositivedirectionDigiD2->SetXTitle("HFpositivedirectionDigiD2 \b");
8066  HFpositivedirectionDigiD2->SetMarkerColor(2);
8067  HFpositivedirectionDigiD2->SetLineColor(0);
8068  gPad->SetGridy();
8069  gPad->SetGridx();
8070  // gPad->SetLogy();
8071  if (kcountHFpositivedirectionDigiD2 == 1)
8072  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
8073  if (kcountHFpositivedirectionDigiD2 == 2)
8074  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
8075  if (kcountHFpositivedirectionDigiD2 == 3)
8076  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
8077  if (kcountHFpositivedirectionDigiD2 == 4)
8078  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
8079  if (kcountHFpositivedirectionDigiD2 == 5)
8080  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
8081  if (kcountHFpositivedirectionDigiD2 == 6)
8082  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
8083  if (kcountHFpositivedirectionDigiD2 == 7)
8084  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
8085  if (kcountHFpositivedirectionDigiD2 == 8)
8086  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
8087  if (kcountHFpositivedirectionDigiD2 == 9)
8088  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
8089  if (kcountHFpositivedirectionDigiD2 == 10)
8090  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
8091  if (kcountHFpositivedirectionDigiD2 == 11)
8092  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
8093  if (kcountHFpositivedirectionDigiD2 == 12)
8094  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
8095  if (kcountHFpositivedirectionDigiD2 == 13)
8096  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
8097  HFpositivedirectionDigiD2->Draw("Error");
8098  kcountHFpositivedirectionDigiD2++;
8099  if (kcountHFpositivedirectionDigiD2 > 13)
8100  break; // 4x6 = 24
8101  } //ccctest>0
8102 
8103  } // for i
8104  } //if(jeta-41 >= 0)
8105  } //for jeta
8107  c3x5->Update();
8108  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
8109  c3x5->Clear();
8110  // clean-up
8111  if (h2CeffHFpositivedirectionDigiD2)
8112  delete h2CeffHFpositivedirectionDigiD2;
8113  //========================================================================================== 16
8114  //======================================================================
8115  //======================================================================1D plot: D vs phi , different eta, depth=3
8116  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
8117  c3x5->Clear();
8118  c3x5->Divide(3, 5);
8119  c3x5->cd(1);
8120  int kcountHFpositivedirectionDigiD3 = 1;
8121  TH1F *h2CeffHFpositivedirectionDigiD3 = new TH1F("h2CeffHFpositivedirectionDigiD3", "", nphi, 0., 72.);
8122 
8123  for (int jeta = 0; jeta < njeta; jeta++) {
8124  // positivedirectionDigiD:
8125  if (jeta - 41 >= 0) {
8126  // for (int i=0;i<ndepth;i++) {
8127  // depth=3
8128  for (int i = 2; i < 3; i++) {
8129  TH1F *HFpositivedirectionDigiD3 = (TH1F *)h2CeffHFpositivedirectionDigiD3->Clone("twod1");
8130 
8131  float ccctest = 0; // to avoid empty massive elements
8132  for (int jphi = 0; jphi < nphi; jphi++) {
8133  double ccc1 = digivarianceHF[i][jeta][jphi];
8134  if (adigiHF[i][jeta][jphi] > 0.) {
8135  HFpositivedirectionDigiD3->Fill(jphi, ccc1);
8136  ccctest = 1.; //HFpositivedirectionDigiD3->SetBinError(i,0.01);
8137  }
8138  } // for jphi
8139  if (ccctest > 0.) {
8140  //cout<<"1616 kcountHFpositivedirectionDigiD3 = "<<kcountHFpositivedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
8141  c3x5->cd(kcountHFpositivedirectionDigiD3);
8142  HFpositivedirectionDigiD3->SetMarkerStyle(20);
8143  HFpositivedirectionDigiD3->SetMarkerSize(0.4);
8144  HFpositivedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
8145  HFpositivedirectionDigiD3->SetXTitle("HFpositivedirectionDigiD3 \b");
8146  HFpositivedirectionDigiD3->SetMarkerColor(2);
8147  HFpositivedirectionDigiD3->SetLineColor(0);
8148  gPad->SetGridy();
8149  gPad->SetGridx();
8150  // gPad->SetLogy();
8151  if (kcountHFpositivedirectionDigiD3 == 1)
8152  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 28; depth = 3 \b");
8153  if (kcountHFpositivedirectionDigiD3 == 2)
8154  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 29; depth = 3 \b");
8155  if (kcountHFpositivedirectionDigiD3 == 3)
8156  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 30; depth = 3 \b");
8157  if (kcountHFpositivedirectionDigiD3 == 4)
8158  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 31; depth = 3 \b");
8159  if (kcountHFpositivedirectionDigiD3 == 5)
8160  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 32; depth = 3 \b");
8161  if (kcountHFpositivedirectionDigiD3 == 6)
8162  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 33; depth = 3 \b");
8163  if (kcountHFpositivedirectionDigiD3 == 7)
8164  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 34; depth = 3 \b");
8165  if (kcountHFpositivedirectionDigiD3 == 8)
8166  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 35; depth = 3 \b");
8167  if (kcountHFpositivedirectionDigiD3 == 9)
8168  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 36; depth = 3 \b");
8169  if (kcountHFpositivedirectionDigiD3 == 10)
8170  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 37; depth = 3 \b");
8171  if (kcountHFpositivedirectionDigiD3 == 11)
8172  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 38; depth = 3 \b");
8173  if (kcountHFpositivedirectionDigiD3 == 12)
8174  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 39; depth = 3 \b");
8175  if (kcountHFpositivedirectionDigiD3 == 13)
8176  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 40; depth = 3 \b");
8177  HFpositivedirectionDigiD3->Draw("Error");
8178  kcountHFpositivedirectionDigiD3++;
8179  if (kcountHFpositivedirectionDigiD3 > 13)
8180  break; // 4x6 = 24
8181  } //ccctest>0
8182 
8183  } // for i
8184  } //if(jeta-41 >= 0)
8185  } //for jeta
8187  c3x5->Update();
8188  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png");
8189  c3x5->Clear();
8190  // clean-up
8191  if (h2CeffHFpositivedirectionDigiD3)
8192  delete h2CeffHFpositivedirectionDigiD3;
8193  //========================================================================================== 17
8194  //======================================================================
8195  //======================================================================1D plot: D vs phi , different eta, depth=4
8196  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
8197  c3x5->Clear();
8198  c3x5->Divide(3, 5);
8199  c3x5->cd(1);
8200  int kcountHFpositivedirectionDigiD4 = 1;
8201  TH1F *h2CeffHFpositivedirectionDigiD4 = new TH1F("h2CeffHFpositivedirectionDigiD4", "", nphi, 0., 72.);
8202 
8203  for (int jeta = 0; jeta < njeta; jeta++) {
8204  // positivedirectionDigiD:
8205  if (jeta - 41 >= 0) {
8206  // for (int i=0;i<ndepth;i++) {
8207  // depth=4
8208  for (int i = 3; i < 4; i++) {
8209  TH1F *HFpositivedirectionDigiD4 = (TH1F *)h2CeffHFpositivedirectionDigiD4->Clone("twod1");
8210 
8211  float ccctest = 0; // to avoid empty massive elements
8212  for (int jphi = 0; jphi < nphi; jphi++) {
8213  double ccc1 = digivarianceHF[i][jeta][jphi];
8214  if (adigiHF[i][jeta][jphi] > 0.) {
8215  HFpositivedirectionDigiD4->Fill(jphi, ccc1);
8216  ccctest = 1.; //HFpositivedirectionDigiD4->SetBinError(i,0.01);
8217  }
8218  } // for jphi
8219  if (ccctest > 0.) {
8220  //cout<<"1717 kcountHFpositivedirectionDigiD4 = "<<kcountHFpositivedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
8221  c3x5->cd(kcountHFpositivedirectionDigiD4);
8222  HFpositivedirectionDigiD4->SetMarkerStyle(20);
8223  HFpositivedirectionDigiD4->SetMarkerSize(0.4);
8224  HFpositivedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
8225  HFpositivedirectionDigiD4->SetXTitle("HFpositivedirectionDigiD4 \b");
8226  HFpositivedirectionDigiD4->SetMarkerColor(2);
8227  HFpositivedirectionDigiD4->SetLineColor(0);
8228  gPad->SetGridy();
8229  gPad->SetGridx();
8230  // gPad->SetLogy();
8231  if (kcountHFpositivedirectionDigiD4 == 1)
8232  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 28; depth = 4 \b");
8233  if (kcountHFpositivedirectionDigiD4 == 2)
8234  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 29; depth = 4 \b");
8235  if (kcountHFpositivedirectionDigiD4 == 3)
8236  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 30; depth = 4 \b");
8237  if (kcountHFpositivedirectionDigiD4 == 4)
8238  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 31; depth = 4 \b");
8239  if (kcountHFpositivedirectionDigiD4 == 5)
8240  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 32; depth = 4 \b");
8241  if (kcountHFpositivedirectionDigiD4 == 6)
8242  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 33; depth = 4 \b");
8243  if (kcountHFpositivedirectionDigiD4 == 7)
8244  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 34; depth = 4 \b");
8245  if (kcountHFpositivedirectionDigiD4 == 8)
8246  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 35; depth = 4 \b");
8247  if (kcountHFpositivedirectionDigiD4 == 9)
8248  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 36; depth = 4 \b");
8249  if (kcountHFpositivedirectionDigiD4 == 10)
8250  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 37; depth = 4 \b");
8251  if (kcountHFpositivedirectionDigiD4 == 11)
8252  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 38; depth = 4 \b");
8253  if (kcountHFpositivedirectionDigiD4 == 12)
8254  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 39; depth = 4 \b");
8255  if (kcountHFpositivedirectionDigiD4 == 13)
8256  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 40; depth = 4 \b");
8257  HFpositivedirectionDigiD4->Draw("Error");
8258  kcountHFpositivedirectionDigiD4++;
8259  if (kcountHFpositivedirectionDigiD4 > 13)
8260  break; // 4x6 = 24
8261  } //ccctest>0
8262 
8263  } // for i
8264  } //if(jeta-41 >= 0)
8265  } //for jeta
8267  c3x5->Update();
8268  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png");
8269  c3x5->Clear();
8270  // clean-up
8271  if (h2CeffHFpositivedirectionDigiD4)
8272  delete h2CeffHFpositivedirectionDigiD4;
8273 
8274  //========================================================================================== 22222214
8275  //======================================================================
8276  //======================================================================1D plot: D vs phi , different eta, depth=1
8277  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
8278  c3x5->Clear();
8280  c3x5->Divide(3, 5);
8281  c3x5->cd(1);
8282  int kcountHFnegativedirectionDigiD1 = 1;
8283  TH1F *h2CeffHFnegativedirectionDigiD1 = new TH1F("h2CeffHFnegativedirectionDigiD1", "", nphi, 0., 72.);
8284 
8285  for (int jeta = 0; jeta < njeta; jeta++) {
8286  // negativedirectionDigiD:
8287  if (jeta - 41 < 0) {
8288  // for (int i=0;i<ndepth;i++) {
8289  // depth=1
8290  for (int i = 0; i < 1; i++) {
8291  TH1F *HFnegativedirectionDigiD1 = (TH1F *)h2CeffHFnegativedirectionDigiD1->Clone("twod1");
8292 
8293  float ccctest = 0; // to avoid empty massive elements
8294  for (int jphi = 0; jphi < nphi; jphi++) {
8295  double ccc1 = digivarianceHF[i][jeta][jphi];
8296  if (adigiHF[i][jeta][jphi] > 0.) {
8297  HFnegativedirectionDigiD1->Fill(jphi, ccc1);
8298  ccctest = 1.; //HFnegativedirectionDigiD1->SetBinError(i,0.01);
8299  }
8300  } // for jphi
8301  if (ccctest > 0.) {
8302  //cout<<"1414 kcountHFnegativedirectionDigiD1 = "<<kcountHFnegativedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
8303  c3x5->cd(kcountHFnegativedirectionDigiD1);
8304  HFnegativedirectionDigiD1->SetMarkerStyle(20);
8305  HFnegativedirectionDigiD1->SetMarkerSize(0.4);
8306  HFnegativedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
8307  HFnegativedirectionDigiD1->SetXTitle("HFnegativedirectionDigiD1 \b");
8308  HFnegativedirectionDigiD1->SetMarkerColor(2);
8309  HFnegativedirectionDigiD1->SetLineColor(0);
8310  gPad->SetGridy();
8311  gPad->SetGridx();
8312  // gPad->SetLogy();
8313  if (kcountHFnegativedirectionDigiD1 == 1)
8314  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
8315  if (kcountHFnegativedirectionDigiD1 == 2)
8316  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
8317  if (kcountHFnegativedirectionDigiD1 == 3)
8318  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
8319  if (kcountHFnegativedirectionDigiD1 == 4)
8320  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
8321  if (kcountHFnegativedirectionDigiD1 == 5)
8322  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
8323  if (kcountHFnegativedirectionDigiD1 == 6)
8324  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
8325  if (kcountHFnegativedirectionDigiD1 == 7)
8326  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
8327  if (kcountHFnegativedirectionDigiD1 == 8)
8328  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
8329  if (kcountHFnegativedirectionDigiD1 == 9)
8330  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
8331  if (kcountHFnegativedirectionDigiD1 == 10)
8332  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
8333  if (kcountHFnegativedirectionDigiD1 == 11)
8334  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
8335  if (kcountHFnegativedirectionDigiD1 == 12)
8336  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
8337  if (kcountHFnegativedirectionDigiD1 == 13)
8338  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
8339  HFnegativedirectionDigiD1->Draw("Error");
8340  kcountHFnegativedirectionDigiD1++;
8341  if (kcountHFnegativedirectionDigiD1 > 13)
8342  break; // 4x6 = 24
8343  } //ccctest>0
8344 
8345  } // for i
8346  } //if(jeta-41< 0)
8347  } //for jeta
8349  c3x5->Update();
8350  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
8351  c3x5->Clear();
8352  // clean-up
8353  if (h2CeffHFnegativedirectionDigiD1)
8354  delete h2CeffHFnegativedirectionDigiD1;
8355  //========================================================================================== 22222215
8356  //======================================================================
8357  //======================================================================1D plot: D vs phi , different eta, depth=2
8358  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
8359  c3x5->Clear();
8360  c3x5->Divide(3, 5);
8361  c3x5->cd(1);
8362  int kcountHFnegativedirectionDigiD2 = 1;
8363  TH1F *h2CeffHFnegativedirectionDigiD2 = new TH1F("h2CeffHFnegativedirectionDigiD2", "", nphi, 0., 72.);
8364 
8365  for (int jeta = 0; jeta < njeta; jeta++) {
8366  // negativedirectionDigiD:
8367  if (jeta - 41 < 0) {
8368  // for (int i=0;i<ndepth;i++) {
8369  // depth=2
8370  for (int i = 1; i < 2; i++) {
8371  TH1F *HFnegativedirectionDigiD2 = (TH1F *)h2CeffHFnegativedirectionDigiD2->Clone("twod1");
8372 
8373  float ccctest = 0; // to avoid empty massive elements
8374  for (int jphi = 0; jphi < nphi; jphi++) {
8375  double ccc1 = digivarianceHF[i][jeta][jphi];
8376  if (adigiHF[i][jeta][jphi] > 0.) {
8377  HFnegativedirectionDigiD2->Fill(jphi, ccc1);
8378  ccctest = 1.; //HFnegativedirectionDigiD2->SetBinError(i,0.01);
8379  }
8380  } // for jphi
8381  if (ccctest > 0.) {
8382  //cout<<"1515 kcountHFnegativedirectionDigiD2 = "<<kcountHFnegativedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
8383  c3x5->cd(kcountHFnegativedirectionDigiD2);
8384  HFnegativedirectionDigiD2->SetMarkerStyle(20);
8385  HFnegativedirectionDigiD2->SetMarkerSize(0.4);
8386  HFnegativedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
8387  HFnegativedirectionDigiD2->SetXTitle("HFnegativedirectionDigiD2 \b");
8388  HFnegativedirectionDigiD2->SetMarkerColor(2);
8389  HFnegativedirectionDigiD2->SetLineColor(0);
8390  gPad->SetGridy();
8391  gPad->SetGridx();
8392  // gPad->SetLogy();
8393  if (kcountHFnegativedirectionDigiD2 == 1)
8394  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
8395  if (kcountHFnegativedirectionDigiD2 == 2)
8396  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
8397  if (kcountHFnegativedirectionDigiD2 == 3)
8398  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
8399  if (kcountHFnegativedirectionDigiD2 == 4)
8400  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
8401  if (kcountHFnegativedirectionDigiD2 == 5)
8402  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
8403  if (kcountHFnegativedirectionDigiD2 == 6)
8404  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
8405  if (kcountHFnegativedirectionDigiD2 == 7)
8406  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
8407  if (kcountHFnegativedirectionDigiD2 == 8)
8408  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
8409  if (kcountHFnegativedirectionDigiD2 == 9)
8410  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
8411  if (kcountHFnegativedirectionDigiD2 == 10)
8412  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
8413  if (kcountHFnegativedirectionDigiD2 == 11)
8414  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
8415  if (kcountHFnegativedirectionDigiD2 == 12)
8416  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
8417  if (kcountHFnegativedirectionDigiD2 == 13)
8418  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
8419  HFnegativedirectionDigiD2->Draw("Error");
8420  kcountHFnegativedirectionDigiD2++;
8421  if (kcountHFnegativedirectionDigiD2 > 13)
8422  break; // 4x6 = 24
8423  } //ccctest>0
8424 
8425  } // for i
8426  } //if(jeta-41< 0)
8427  } //for jeta
8429  c3x5->Update();
8430  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
8431  c3x5->Clear();
8432  // clean-up
8433  if (h2CeffHFnegativedirectionDigiD2)
8434  delete h2CeffHFnegativedirectionDigiD2;
8435  //========================================================================================== 22222216
8436  //======================================================================
8437  //======================================================================1D plot: D vs phi , different eta, depth=3
8438  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
8439  c3x5->Clear();
8440  c3x5->Divide(3, 5);
8441  c3x5->cd(1);
8442  int kcountHFnegativedirectionDigiD3 = 1;
8443  TH1F *h2CeffHFnegativedirectionDigiD3 = new TH1F("h2CeffHFnegativedirectionDigiD3", "", nphi, 0., 72.);
8444 
8445  for (int jeta = 0; jeta < njeta; jeta++) {
8446  // negativedirectionDigiD:
8447  if (jeta - 41 < 0) {
8448  // for (int i=0;i<ndepth;i++) {
8449  // depth=3
8450  for (int i = 2; i < 3; i++) {
8451  TH1F *HFnegativedirectionDigiD3 = (TH1F *)h2CeffHFnegativedirectionDigiD3->Clone("twod1");
8452 
8453  float ccctest = 0; // to avoid empty massive elements
8454  for (int jphi = 0; jphi < nphi; jphi++) {
8455  double ccc1 = digivarianceHF[i][jeta][jphi];
8456  if (adigiHF[i][jeta][jphi] > 0.) {
8457  HFnegativedirectionDigiD3->Fill(jphi, ccc1);
8458  ccctest = 1.; //HFnegativedirectionDigiD3->SetBinError(i,0.01);
8459  }
8460  } // for jphi
8461  if (ccctest > 0.) {
8462  //cout<<"1616 kcountHFnegativedirectionDigiD3 = "<<kcountHFnegativedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
8463  c3x5->cd(kcountHFnegativedirectionDigiD3);
8464  HFnegativedirectionDigiD3->SetMarkerStyle(20);
8465  HFnegativedirectionDigiD3->SetMarkerSize(0.4);
8466  HFnegativedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
8467  HFnegativedirectionDigiD3->SetXTitle("HFnegativedirectionDigiD3 \b");
8468  HFnegativedirectionDigiD3->SetMarkerColor(2);
8469  HFnegativedirectionDigiD3->SetLineColor(0);
8470  gPad->SetGridy();
8471  gPad->SetGridx();
8472  // gPad->SetLogy();
8473  if (kcountHFnegativedirectionDigiD3 == 1)
8474  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-41; depth = 3 \b");
8475  if (kcountHFnegativedirectionDigiD3 == 2)
8476  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-40; depth = 3 \b");
8477  if (kcountHFnegativedirectionDigiD3 == 3)
8478  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-39; depth = 3 \b");
8479  if (kcountHFnegativedirectionDigiD3 == 4)
8480  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-38; depth = 3 \b");
8481  if (kcountHFnegativedirectionDigiD3 == 5)
8482  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-37; depth = 3 \b");
8483  if (kcountHFnegativedirectionDigiD3 == 6)
8484  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-36; depth = 3 \b");
8485  if (kcountHFnegativedirectionDigiD3 == 7)
8486  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-35; depth = 3 \b");
8487  if (kcountHFnegativedirectionDigiD3 == 8)
8488  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-34; depth = 3 \b");
8489  if (kcountHFnegativedirectionDigiD3 == 9)
8490  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-33; depth = 3 \b");
8491  if (kcountHFnegativedirectionDigiD3 == 10)
8492  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-32; depth = 3 \b");
8493  if (kcountHFnegativedirectionDigiD3 == 11)
8494  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-31; depth = 3 \b");
8495  if (kcountHFnegativedirectionDigiD3 == 12)
8496  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-30; depth = 3 \b");
8497  if (kcountHFnegativedirectionDigiD3 == 13)
8498  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-29; depth = 3 \b");
8499  HFnegativedirectionDigiD3->Draw("Error");
8500  kcountHFnegativedirectionDigiD3++;
8501  if (kcountHFnegativedirectionDigiD3 > 13)
8502  break; // 4x6 = 24
8503  } //ccctest>0
8504 
8505  } // for i
8506  } //if(jeta-41< 0)
8507  } //for jeta
8509  c3x5->Update();
8510  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png");
8511  c3x5->Clear();
8512  // clean-up
8513  if (h2CeffHFnegativedirectionDigiD3)
8514  delete h2CeffHFnegativedirectionDigiD3;
8515  //========================================================================================== 22222217
8516  //======================================================================
8517  //======================================================================1D plot: D vs phi , different eta, depth=4
8518  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
8519  c3x5->Clear();
8520  c3x5->Divide(3, 5);
8521  c3x5->cd(1);
8522  int kcountHFnegativedirectionDigiD4 = 1;
8523  TH1F *h2CeffHFnegativedirectionDigiD4 = new TH1F("h2CeffHFnegativedirectionDigiD4", "", nphi, 0., 72.);
8524 
8525  for (int jeta = 0; jeta < njeta; jeta++) {
8526  // negativedirectionDigiD:
8527  if (jeta - 41 < 0) {
8528  // for (int i=0;i<ndepth;i++) {
8529  // depth=4
8530  for (int i = 3; i < 4; i++) {
8531  TH1F *HFnegativedirectionDigiD4 = (TH1F *)h2CeffHFnegativedirectionDigiD4->Clone("twod1");
8532 
8533  float ccctest = 0; // to avoid empty massive elements
8534  for (int jphi = 0; jphi < nphi; jphi++) {
8535  double ccc1 = digivarianceHF[i][jeta][jphi];
8536  if (adigiHF[i][jeta][jphi] > 0.) {
8537  HFnegativedirectionDigiD4->Fill(jphi, ccc1);
8538  ccctest = 1.; //HFnegativedirectionDigiD4->SetBinError(i,0.01);
8539  }
8540  } // for jphi
8541  if (ccctest > 0.) {
8542  //cout<<"1717 kcountHFnegativedirectionDigiD4 = "<<kcountHFnegativedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
8543  c3x5->cd(kcountHFnegativedirectionDigiD4);
8544  HFnegativedirectionDigiD4->SetMarkerStyle(20);
8545  HFnegativedirectionDigiD4->SetMarkerSize(0.4);
8546  HFnegativedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
8547  HFnegativedirectionDigiD4->SetXTitle("HFnegativedirectionDigiD4 \b");
8548  HFnegativedirectionDigiD4->SetMarkerColor(2);
8549  HFnegativedirectionDigiD4->SetLineColor(0);
8550  gPad->SetGridy();
8551  gPad->SetGridx();
8552  // gPad->SetLogy();
8553  if (kcountHFnegativedirectionDigiD4 == 1)
8554  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-41; depth = 4 \b");
8555  if (kcountHFnegativedirectionDigiD4 == 2)
8556  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-40; depth = 4 \b");
8557  if (kcountHFnegativedirectionDigiD4 == 3)
8558  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-39; depth = 4 \b");
8559  if (kcountHFnegativedirectionDigiD4 == 4)
8560  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-38; depth = 4 \b");
8561  if (kcountHFnegativedirectionDigiD4 == 5)
8562  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-37; depth = 4 \b");
8563  if (kcountHFnegativedirectionDigiD4 == 6)
8564  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-36; depth = 4 \b");
8565  if (kcountHFnegativedirectionDigiD4 == 7)
8566  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-35; depth = 4 \b");
8567  if (kcountHFnegativedirectionDigiD4 == 8)
8568  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-34; depth = 4 \b");
8569  if (kcountHFnegativedirectionDigiD4 == 9)
8570  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-33; depth = 4 \b");
8571  if (kcountHFnegativedirectionDigiD4 == 10)
8572  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-32; depth = 4 \b");
8573  if (kcountHFnegativedirectionDigiD4 == 11)
8574  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-31; depth = 4 \b");
8575  if (kcountHFnegativedirectionDigiD4 == 12)
8576  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-30; depth = 4 \b");
8577  if (kcountHFnegativedirectionDigiD4 == 13)
8578  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-29; depth = 4 \b");
8579  HFnegativedirectionDigiD4->Draw("Error");
8580  kcountHFnegativedirectionDigiD4++;
8581  if (kcountHFnegativedirectionDigiD4 > 13)
8582  break; // 4x6 = 24
8583  } //ccctest>0
8584 
8585  } // for i
8586  } //if(jeta-41< 0)
8587  } //for jeta
8589  c3x5->Update();
8590  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png");
8591  c3x5->Clear();
8592  // clean-up
8593  if (h2CeffHFnegativedirectionDigiD4)
8594  delete h2CeffHFnegativedirectionDigiD4;
8595 
8596  //===================================================================== END of Digi HF for phi-symmetry
8597  //===================================================================== END of Digi HF for phi-symmetry
8598  //===================================================================== END of Digi HF for phi-symmetry
8599 
8600  //============================================================================================================ END of Digi for phi-symmetry
8601  //============================================================================================================ END of Digi for phi-symmetry
8602  //============================================================================================================ END of Digi for phi-symmetry
8603 
8604  //============================================================================================================ END of Digi for phi-symmetry
8605  //============================================================================================================ END of Digi for phi-symmetry
8606  //============================================================================================================ END of Digi for phi-symmetry
8607  //============================================================================================================ END of Digi for phi-symmetry
8608  //============================================================================================================ END of Digi for phi-symmetry
8609  //============================================================================================================ END of Digi for phi-symmetry
8610  //============================================================================================================ END of Digi for phi-symmetry
8611  //============================================================================================================ END of Digi for phi-symmetry
8612  //============================================================================================================ END of Digi for phi-symmetry
8613 
8614  // END of Digi Digi Digi Digi Digi ENDDigi Digi Digi Digi Digi ENDDigi Digi Digi Digi ENDDigi Digi Digi Digi Digi Digi Digi ENDDigi Digi Digi Digi Digi Digi Digi Digi Digi Digi ENDDigi END
8615 
8619 
8623  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
8624  //ndepth = k_max[5];
8625  ndepth = 4;
8626  double arecosignalHB[ndepth][njeta][njphi];
8627  double recosignalvarianceHB[ndepth][njeta][njphi];
8628  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HB recSignalEnergy
8629  TH2F *recSignalEnergy1HB1 = (TH2F *)hfile->Get("h_recSignalEnergy1_HB1");
8630  TH2F *recSignalEnergy0HB1 = (TH2F *)hfile->Get("h_recSignalEnergy0_HB1");
8631  TH2F *recSignalEnergyHB1 = (TH2F *)recSignalEnergy1HB1->Clone("recSignalEnergyHB1");
8632  recSignalEnergyHB1->Divide(recSignalEnergy1HB1, recSignalEnergy0HB1, 1, 1, "B");
8633  TH2F *recSignalEnergy1HB2 = (TH2F *)hfile->Get("h_recSignalEnergy1_HB2");
8634  TH2F *recSignalEnergy0HB2 = (TH2F *)hfile->Get("h_recSignalEnergy0_HB2");
8635  TH2F *recSignalEnergyHB2 = (TH2F *)recSignalEnergy1HB2->Clone("recSignalEnergyHB2");
8636  recSignalEnergyHB2->Divide(recSignalEnergy1HB2, recSignalEnergy0HB2, 1, 1, "B");
8637  TH2F *recSignalEnergy1HB3 = (TH2F *)hfile->Get("h_recSignalEnergy1_HB3");
8638  TH2F *recSignalEnergy0HB3 = (TH2F *)hfile->Get("h_recSignalEnergy0_HB3");
8639  TH2F *recSignalEnergyHB3 = (TH2F *)recSignalEnergy1HB3->Clone("recSignalEnergyHB3");
8640  recSignalEnergyHB3->Divide(recSignalEnergy1HB3, recSignalEnergy0HB3, 1, 1, "B");
8641  TH2F *recSignalEnergy1HB4 = (TH2F *)hfile->Get("h_recSignalEnergy1_HB4");
8642  TH2F *recSignalEnergy0HB4 = (TH2F *)hfile->Get("h_recSignalEnergy0_HB4");
8643  TH2F *recSignalEnergyHB4 = (TH2F *)recSignalEnergy1HB4->Clone("recSignalEnergyHB4");
8644  recSignalEnergyHB4->Divide(recSignalEnergy1HB4, recSignalEnergy0HB4, 1, 1, "B");
8645  for (int jeta = 0; jeta < njeta; jeta++) {
8646  //====================================================================== PHI normalization & put R into massive arecosignalHB
8647  //preparation for PHI normalization:
8648  double sumrecosignalHB0 = 0;
8649  int nsumrecosignalHB0 = 0;
8650  double sumrecosignalHB1 = 0;
8651  int nsumrecosignalHB1 = 0;
8652  double sumrecosignalHB2 = 0;
8653  int nsumrecosignalHB2 = 0;
8654  double sumrecosignalHB3 = 0;
8655  int nsumrecosignalHB3 = 0;
8656  for (int jphi = 0; jphi < njphi; jphi++) {
8657  arecosignalHB[0][jeta][jphi] = recSignalEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
8658  arecosignalHB[1][jeta][jphi] = recSignalEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
8659  arecosignalHB[2][jeta][jphi] = recSignalEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
8660  arecosignalHB[3][jeta][jphi] = recSignalEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
8661  if (arecosignalHB[0][jeta][jphi] > 0.) {
8662  sumrecosignalHB0 += arecosignalHB[0][jeta][jphi];
8663  ++nsumrecosignalHB0;
8664  }
8665  if (arecosignalHB[1][jeta][jphi] > 0.) {
8666  sumrecosignalHB1 += arecosignalHB[1][jeta][jphi];
8667  ++nsumrecosignalHB1;
8668  }
8669  if (arecosignalHB[2][jeta][jphi] > 0.) {
8670  sumrecosignalHB2 += arecosignalHB[2][jeta][jphi];
8671  ++nsumrecosignalHB2;
8672  }
8673  if (arecosignalHB[3][jeta][jphi] > 0.) {
8674  sumrecosignalHB3 += arecosignalHB[3][jeta][jphi];
8675  ++nsumrecosignalHB3;
8676  }
8677  } // phi
8678  // PHI normalization:
8679  for (int jphi = 0; jphi < njphi; jphi++) {
8680  if (arecosignalHB[0][jeta][jphi] > 0.)
8681  arecosignalHB[0][jeta][jphi] /= (sumrecosignalHB0 / nsumrecosignalHB0);
8682  if (arecosignalHB[1][jeta][jphi] > 0.)
8683  arecosignalHB[1][jeta][jphi] /= (sumrecosignalHB1 / nsumrecosignalHB1);
8684  if (arecosignalHB[2][jeta][jphi] > 0.)
8685  arecosignalHB[2][jeta][jphi] /= (sumrecosignalHB2 / nsumrecosignalHB2);
8686  if (arecosignalHB[3][jeta][jphi] > 0.)
8687  arecosignalHB[3][jeta][jphi] /= (sumrecosignalHB3 / nsumrecosignalHB3);
8688  } // phi
8689  } //eta
8690  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
8691  //======================================================================
8692  //======================================================================
8693  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
8694  c2x1->Clear();
8696  c2x1->Divide(2, 1);
8697  c2x1->cd(1);
8698  TH2F *GefzRrecosignalHB42D = new TH2F("GefzRrecosignalHB42D", "", neta, -41., 41., nphi, 0., 72.);
8699  TH2F *GefzRrecosignalHB42D0 = new TH2F("GefzRrecosignalHB42D0", "", neta, -41., 41., nphi, 0., 72.);
8700  TH2F *GefzRrecosignalHB42DF = (TH2F *)GefzRrecosignalHB42D0->Clone("GefzRrecosignalHB42DF");
8701  for (int i = 0; i < ndepth; i++) {
8702  for (int jeta = 0; jeta < neta; jeta++) {
8703  for (int jphi = 0; jphi < nphi; jphi++) {
8704  double ccc1 = arecosignalHB[i][jeta][jphi];
8705  int k2plot = jeta - 41;
8706  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
8707  if (ccc1 != 0.) {
8708  GefzRrecosignalHB42D->Fill(kkk, jphi, ccc1);
8709  GefzRrecosignalHB42D0->Fill(kkk, jphi, 1.);
8710  }
8711  }
8712  }
8713  }
8714  GefzRrecosignalHB42DF->Divide(GefzRrecosignalHB42D, GefzRrecosignalHB42D0, 1, 1, "B"); // average A
8715  gPad->SetGridy();
8716  gPad->SetGridx(); // gPad->SetLogz();
8717  GefzRrecosignalHB42DF->SetXTitle("<R>_depth #eta \b");
8718  GefzRrecosignalHB42DF->SetYTitle(" #phi \b");
8719  GefzRrecosignalHB42DF->Draw("COLZ");
8720 
8721  c2x1->cd(2);
8722  TH1F *energyhitSignal_HB = (TH1F *)hfile->Get("h_energyhitSignal_HB");
8723  energyhitSignal_HB->SetMarkerStyle(20);
8724  energyhitSignal_HB->SetMarkerSize(0.4);
8725  energyhitSignal_HB->GetYaxis()->SetLabelSize(0.04);
8726  energyhitSignal_HB->SetXTitle("energyhitSignal_HB \b");
8727  energyhitSignal_HB->SetMarkerColor(2);
8728  energyhitSignal_HB->SetLineColor(0);
8729  gPad->SetGridy();
8730  gPad->SetGridx();
8731  energyhitSignal_HB->Draw("Error");
8732 
8734  c2x1->Update();
8735  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHB.png");
8736  c2x1->Clear();
8737  // clean-up
8738  if (GefzRrecosignalHB42D)
8739  delete GefzRrecosignalHB42D;
8740  if (GefzRrecosignalHB42D0)
8741  delete GefzRrecosignalHB42D0;
8742  if (GefzRrecosignalHB42DF)
8743  delete GefzRrecosignalHB42DF;
8744  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
8745  //======================================================================
8746  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
8747  c1x1->Clear();
8749  c1x1->Divide(1, 1);
8750  c1x1->cd(1);
8751  TH1F *GefzRrecosignalHB41D = new TH1F("GefzRrecosignalHB41D", "", nphi, 0., 72.);
8752  TH1F *GefzRrecosignalHB41D0 = new TH1F("GefzRrecosignalHB41D0", "", nphi, 0., 72.);
8753  TH1F *GefzRrecosignalHB41DF = (TH1F *)GefzRrecosignalHB41D0->Clone("GefzRrecosignalHB41DF");
8754  for (int jphi = 0; jphi < nphi; jphi++) {
8755  for (int jeta = 0; jeta < neta; jeta++) {
8756  for (int i = 0; i < ndepth; i++) {
8757  double ccc1 = arecosignalHB[i][jeta][jphi];
8758  if (ccc1 != 0.) {
8759  GefzRrecosignalHB41D->Fill(jphi, ccc1);
8760  GefzRrecosignalHB41D0->Fill(jphi, 1.);
8761  }
8762  }
8763  }
8764  }
8765  GefzRrecosignalHB41DF->Divide(
8766  GefzRrecosignalHB41D, GefzRrecosignalHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
8767  GefzRrecosignalHB41D0->Sumw2();
8768  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHB41DF->SetBinError(jphi,0.01);}
8769  gPad->SetGridy();
8770  gPad->SetGridx(); // gPad->SetLogz();
8771  GefzRrecosignalHB41DF->SetMarkerStyle(20);
8772  GefzRrecosignalHB41DF->SetMarkerSize(1.4);
8773  GefzRrecosignalHB41DF->GetZaxis()->SetLabelSize(0.08);
8774  GefzRrecosignalHB41DF->SetXTitle("#phi \b");
8775  GefzRrecosignalHB41DF->SetYTitle(" <R> \b");
8776  GefzRrecosignalHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
8777  GefzRrecosignalHB41DF->SetMarkerColor(4);
8778  GefzRrecosignalHB41DF->SetLineColor(
8779  4); // GefzRrecosignalHB41DF->SetMinimum(0.8); // GefzRrecosignalHB41DF->SetMaximum(1.000);
8780  GefzRrecosignalHB41DF->Draw("Error");
8782  c1x1->Update();
8783  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHB.png");
8784  c1x1->Clear();
8785  // clean-up
8786  if (GefzRrecosignalHB41D)
8787  delete GefzRrecosignalHB41D;
8788  if (GefzRrecosignalHB41D0)
8789  delete GefzRrecosignalHB41D0;
8790  if (GefzRrecosignalHB41DF)
8791  delete GefzRrecosignalHB41DF;
8792  //========================================================================================== 4
8793  //======================================================================
8794  //======================================================================1D plot: R vs phi , different eta, depth=1
8795  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
8796  c3x5->Clear();
8798  c3x5->Divide(4, 4);
8799  c3x5->cd(1);
8800  int kcountHBpositivedirectionRecosignal1 = 1;
8801  TH1F *h2CeffHBpositivedirectionRecosignal1 = new TH1F("h2CeffHBpositivedirectionRecosignal1", "", nphi, 0., 72.);
8802  for (int jeta = 0; jeta < njeta; jeta++) {
8803  // positivedirectionRecosignal:
8804  if (jeta - 41 >= 0) {
8805  // for (int i=0;i<ndepth;i++) {
8806  // depth=1
8807  for (int i = 0; i < 1; i++) {
8808  TH1F *HBpositivedirectionRecosignal1 = (TH1F *)h2CeffHBpositivedirectionRecosignal1->Clone("twod1");
8809  float ccctest = 0; // to avoid empty massive elements
8810  for (int jphi = 0; jphi < nphi; jphi++) {
8811  double ccc1 = arecosignalHB[i][jeta][jphi];
8812  if (ccc1 != 0.) {
8813  HBpositivedirectionRecosignal1->Fill(jphi, ccc1);
8814  ccctest = 1.; //HBpositivedirectionRecosignal1->SetBinError(i,0.01);
8815  }
8816  } // for jphi
8817  if (ccctest > 0.) {
8818  // cout<<"444 kcountHBpositivedirectionRecosignal1 = "<<kcountHBpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
8819  c3x5->cd(kcountHBpositivedirectionRecosignal1);
8820  HBpositivedirectionRecosignal1->SetMarkerStyle(20);
8821  HBpositivedirectionRecosignal1->SetMarkerSize(0.4);
8822  HBpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
8823  HBpositivedirectionRecosignal1->SetXTitle("HBpositivedirectionRecosignal1 \b");
8824  HBpositivedirectionRecosignal1->SetMarkerColor(2);
8825  HBpositivedirectionRecosignal1->SetLineColor(0);
8826  gPad->SetGridy();
8827  gPad->SetGridx();
8828  // gPad->SetLogy();
8829  if (kcountHBpositivedirectionRecosignal1 == 1)
8830  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
8831  if (kcountHBpositivedirectionRecosignal1 == 2)
8832  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
8833  if (kcountHBpositivedirectionRecosignal1 == 3)
8834  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
8835  if (kcountHBpositivedirectionRecosignal1 == 4)
8836  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
8837  if (kcountHBpositivedirectionRecosignal1 == 5)
8838  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
8839  if (kcountHBpositivedirectionRecosignal1 == 6)
8840  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
8841  if (kcountHBpositivedirectionRecosignal1 == 7)
8842  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
8843  if (kcountHBpositivedirectionRecosignal1 == 8)
8844  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
8845  if (kcountHBpositivedirectionRecosignal1 == 9)
8846  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
8847  if (kcountHBpositivedirectionRecosignal1 == 10)
8848  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
8849  if (kcountHBpositivedirectionRecosignal1 == 11)
8850  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
8851  if (kcountHBpositivedirectionRecosignal1 == 12)
8852  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
8853  if (kcountHBpositivedirectionRecosignal1 == 13)
8854  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
8855  if (kcountHBpositivedirectionRecosignal1 == 14)
8856  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
8857  if (kcountHBpositivedirectionRecosignal1 == 15)
8858  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
8859  if (kcountHBpositivedirectionRecosignal1 == 16)
8860  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
8861  HBpositivedirectionRecosignal1->Draw("Error");
8862  kcountHBpositivedirectionRecosignal1++;
8863  if (kcountHBpositivedirectionRecosignal1 > 16)
8864  break; //
8865  } //ccctest>0
8866 
8867  } // for i
8868  } //if(jeta-41 >= 0)
8869  } //for jeta
8871  c3x5->Update();
8872  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
8873  c3x5->Clear();
8874  // clean-up
8875  if (h2CeffHBpositivedirectionRecosignal1)
8876  delete h2CeffHBpositivedirectionRecosignal1;
8877 
8878  //========================================================================================== 5
8879  //======================================================================
8880  //======================================================================1D plot: R vs phi , different eta, depth=2
8881  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
8882  c3x5->Clear();
8884  c3x5->Divide(4, 4);
8885  c3x5->cd(1);
8886  int kcountHBpositivedirectionRecosignal2 = 1;
8887  TH1F *h2CeffHBpositivedirectionRecosignal2 = new TH1F("h2CeffHBpositivedirectionRecosignal2", "", nphi, 0., 72.);
8888  for (int jeta = 0; jeta < njeta; jeta++) {
8889  // positivedirectionRecosignal:
8890  if (jeta - 41 >= 0) {
8891  // for (int i=0;i<ndepth;i++) {
8892  // depth=2
8893  for (int i = 1; i < 2; i++) {
8894  TH1F *HBpositivedirectionRecosignal2 = (TH1F *)h2CeffHBpositivedirectionRecosignal2->Clone("twod1");
8895  float ccctest = 0; // to avoid empty massive elements
8896  for (int jphi = 0; jphi < nphi; jphi++) {
8897  double ccc1 = arecosignalHB[i][jeta][jphi];
8898  if (ccc1 != 0.) {
8899  HBpositivedirectionRecosignal2->Fill(jphi, ccc1);
8900  ccctest = 1.; //HBpositivedirectionRecosignal2->SetBinError(i,0.01);
8901  }
8902  } // for jphi
8903  if (ccctest > 0.) {
8904  //cout<<"555 kcountHBpositivedirectionRecosignal2 = "<<kcountHBpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
8905  c3x5->cd(kcountHBpositivedirectionRecosignal2);
8906  HBpositivedirectionRecosignal2->SetMarkerStyle(20);
8907  HBpositivedirectionRecosignal2->SetMarkerSize(0.4);
8908  HBpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
8909  HBpositivedirectionRecosignal2->SetXTitle("HBpositivedirectionRecosignal2 \b");
8910  HBpositivedirectionRecosignal2->SetMarkerColor(2);
8911  HBpositivedirectionRecosignal2->SetLineColor(0);
8912  gPad->SetGridy();
8913  gPad->SetGridx();
8914  // gPad->SetLogy();
8915  if (kcountHBpositivedirectionRecosignal2 == 1)
8916  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
8917  if (kcountHBpositivedirectionRecosignal2 == 2)
8918  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
8919  if (kcountHBpositivedirectionRecosignal2 == 3)
8920  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
8921  if (kcountHBpositivedirectionRecosignal2 == 4)
8922  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
8923  if (kcountHBpositivedirectionRecosignal2 == 5)
8924  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
8925  if (kcountHBpositivedirectionRecosignal2 == 6)
8926  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
8927  if (kcountHBpositivedirectionRecosignal2 == 7)
8928  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
8929  if (kcountHBpositivedirectionRecosignal2 == 8)
8930  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
8931  if (kcountHBpositivedirectionRecosignal2 == 9)
8932  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
8933  if (kcountHBpositivedirectionRecosignal2 == 10)
8934  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
8935  if (kcountHBpositivedirectionRecosignal2 == 11)
8936  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
8937  if (kcountHBpositivedirectionRecosignal2 == 12)
8938  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
8939  if (kcountHBpositivedirectionRecosignal2 == 13)
8940  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
8941  if (kcountHBpositivedirectionRecosignal2 == 14)
8942  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
8943  if (kcountHBpositivedirectionRecosignal2 == 15)
8944  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
8945  if (kcountHBpositivedirectionRecosignal2 == 16)
8946  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
8947  HBpositivedirectionRecosignal2->Draw("Error");
8948  kcountHBpositivedirectionRecosignal2++;
8949  if (kcountHBpositivedirectionRecosignal2 > 16)
8950  break; // 4x6 = 24
8951  } //ccctest>0
8952 
8953  } // for i
8954  } //if(jeta-41 >= 0)
8955  } //for jeta
8957  c3x5->Update();
8958  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
8959  c3x5->Clear();
8960  // clean-up
8961  if (h2CeffHBpositivedirectionRecosignal2)
8962  delete h2CeffHBpositivedirectionRecosignal2;
8963  //========================================================================================== 6
8964  //======================================================================
8965  //======================================================================1D plot: R vs phi , different eta, depth=3
8966  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
8967  c3x5->Clear();
8969  c3x5->Divide(4, 4);
8970  c3x5->cd(1);
8971  int kcountHBpositivedirectionRecosignal3 = 1;
8972  TH1F *h2CeffHBpositivedirectionRecosignal3 = new TH1F("h2CeffHBpositivedirectionRecosignal3", "", nphi, 0., 72.);
8973  for (int jeta = 0; jeta < njeta; jeta++) {
8974  // positivedirectionRecosignal:
8975  if (jeta - 41 >= 0) {
8976  // for (int i=0;i<ndepth;i++) {
8977  // depth=3
8978  for (int i = 2; i < 3; i++) {
8979  TH1F *HBpositivedirectionRecosignal3 = (TH1F *)h2CeffHBpositivedirectionRecosignal3->Clone("twod1");
8980  float ccctest = 0; // to avoid empty massive elements
8981  for (int jphi = 0; jphi < nphi; jphi++) {
8982  double ccc1 = arecosignalHB[i][jeta][jphi];
8983  if (ccc1 != 0.) {
8984  HBpositivedirectionRecosignal3->Fill(jphi, ccc1);
8985  ccctest = 1.; //HBpositivedirectionRecosignal3->SetBinError(i,0.01);
8986  }
8987  } // for jphi
8988  if (ccctest > 0.) {
8989  //cout<<"666 kcountHBpositivedirectionRecosignal3 = "<<kcountHBpositivedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
8990  c3x5->cd(kcountHBpositivedirectionRecosignal3);
8991  HBpositivedirectionRecosignal3->SetMarkerStyle(20);
8992  HBpositivedirectionRecosignal3->SetMarkerSize(0.4);
8993  HBpositivedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
8994  HBpositivedirectionRecosignal3->SetXTitle("HBpositivedirectionRecosignal3 \b");
8995  HBpositivedirectionRecosignal3->SetMarkerColor(2);
8996  HBpositivedirectionRecosignal3->SetLineColor(0);
8997  gPad->SetGridy();
8998  gPad->SetGridx();
8999  // gPad->SetLogy();
9000  if (kcountHBpositivedirectionRecosignal3 == 1)
9001  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
9002  if (kcountHBpositivedirectionRecosignal3 == 2)
9003  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
9004  if (kcountHBpositivedirectionRecosignal3 == 3)
9005  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
9006  if (kcountHBpositivedirectionRecosignal3 == 4)
9007  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
9008  if (kcountHBpositivedirectionRecosignal3 == 5)
9009  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
9010  if (kcountHBpositivedirectionRecosignal3 == 6)
9011  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
9012  if (kcountHBpositivedirectionRecosignal3 == 7)
9013  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
9014  if (kcountHBpositivedirectionRecosignal3 == 8)
9015  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
9016  if (kcountHBpositivedirectionRecosignal3 == 9)
9017  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
9018  if (kcountHBpositivedirectionRecosignal3 == 10)
9019  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
9020  if (kcountHBpositivedirectionRecosignal3 == 11)
9021  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
9022  if (kcountHBpositivedirectionRecosignal3 == 12)
9023  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
9024  if (kcountHBpositivedirectionRecosignal3 == 13)
9025  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
9026  if (kcountHBpositivedirectionRecosignal3 == 14)
9027  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
9028  if (kcountHBpositivedirectionRecosignal3 == 15)
9029  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
9030  if (kcountHBpositivedirectionRecosignal3 == 16)
9031  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
9032  HBpositivedirectionRecosignal3->Draw("Error");
9033  kcountHBpositivedirectionRecosignal3++;
9034  if (kcountHBpositivedirectionRecosignal3 > 16)
9035  break; // 4x6 = 24
9036  } //ccctest>0
9037 
9038  } // for i
9039  } //if(jeta-41 >= 0)
9040  } //for jeta
9042  c3x5->Update();
9043  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
9044  c3x5->Clear();
9045  // clean-up
9046  if (h2CeffHBpositivedirectionRecosignal3)
9047  delete h2CeffHBpositivedirectionRecosignal3;
9048  //========================================================================================== 7
9049  //======================================================================
9050  //======================================================================1D plot: R vs phi , different eta, depth=4
9051  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
9052  c3x5->Clear();
9054  c3x5->Divide(4, 4);
9055  c3x5->cd(1);
9056  int kcountHBpositivedirectionRecosignal4 = 1;
9057  TH1F *h2CeffHBpositivedirectionRecosignal4 = new TH1F("h2CeffHBpositivedirectionRecosignal4", "", nphi, 0., 72.);
9058 
9059  for (int jeta = 0; jeta < njeta; jeta++) {
9060  // positivedirectionRecosignal:
9061  if (jeta - 41 >= 0) {
9062  // for (int i=0;i<ndepth;i++) {
9063  // depth=4
9064  for (int i = 3; i < 4; i++) {
9065  TH1F *HBpositivedirectionRecosignal4 = (TH1F *)h2CeffHBpositivedirectionRecosignal4->Clone("twod1");
9066 
9067  float ccctest = 0; // to avoid empty massive elements
9068  for (int jphi = 0; jphi < nphi; jphi++) {
9069  double ccc1 = arecosignalHB[i][jeta][jphi];
9070  if (ccc1 != 0.) {
9071  HBpositivedirectionRecosignal4->Fill(jphi, ccc1);
9072  ccctest = 1.; //HBpositivedirectionRecosignal4->SetBinError(i,0.01);
9073  }
9074  } // for jphi
9075  if (ccctest > 0.) {
9076  //cout<<"777 kcountHBpositivedirectionRecosignal4 = "<<kcountHBpositivedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
9077  c3x5->cd(kcountHBpositivedirectionRecosignal4);
9078  HBpositivedirectionRecosignal4->SetMarkerStyle(20);
9079  HBpositivedirectionRecosignal4->SetMarkerSize(0.4);
9080  HBpositivedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
9081  HBpositivedirectionRecosignal4->SetXTitle("HBpositivedirectionRecosignal4 \b");
9082  HBpositivedirectionRecosignal4->SetMarkerColor(2);
9083  HBpositivedirectionRecosignal4->SetLineColor(0);
9084  gPad->SetGridy();
9085  gPad->SetGridx();
9086  // gPad->SetLogy();
9087  if (kcountHBpositivedirectionRecosignal4 == 1)
9088  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
9089  if (kcountHBpositivedirectionRecosignal4 == 2)
9090  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
9091  if (kcountHBpositivedirectionRecosignal4 == 3)
9092  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
9093  if (kcountHBpositivedirectionRecosignal4 == 4)
9094  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
9095  if (kcountHBpositivedirectionRecosignal4 == 5)
9096  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
9097  if (kcountHBpositivedirectionRecosignal4 == 6)
9098  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
9099  if (kcountHBpositivedirectionRecosignal4 == 7)
9100  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
9101  if (kcountHBpositivedirectionRecosignal4 == 8)
9102  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
9103  if (kcountHBpositivedirectionRecosignal4 == 9)
9104  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
9105  if (kcountHBpositivedirectionRecosignal4 == 10)
9106  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
9107  if (kcountHBpositivedirectionRecosignal4 == 11)
9108  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
9109  if (kcountHBpositivedirectionRecosignal4 == 12)
9110  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
9111  if (kcountHBpositivedirectionRecosignal4 == 13)
9112  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
9113  if (kcountHBpositivedirectionRecosignal4 == 14)
9114  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
9115  if (kcountHBpositivedirectionRecosignal4 == 15)
9116  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
9117  if (kcountHBpositivedirectionRecosignal4 == 16)
9118  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
9119  HBpositivedirectionRecosignal4->Draw("Error");
9120  kcountHBpositivedirectionRecosignal4++;
9121  if (kcountHBpositivedirectionRecosignal4 > 16)
9122  break; // 4x6 = 24
9123  } //ccctest>0
9124 
9125  } // for i
9126  } //if(jeta-41 >= 0)
9127  } //for jeta
9129  c3x5->Update();
9130  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
9131  c3x5->Clear();
9132  // clean-up
9133  if (h2CeffHBpositivedirectionRecosignal4)
9134  delete h2CeffHBpositivedirectionRecosignal4;
9135 
9136  //========================================================================================== 1114
9137  //======================================================================
9138  //======================================================================1D plot: R vs phi , different eta, depth=1
9139  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
9140  c3x5->Clear();
9142  c3x5->Divide(4, 4);
9143  c3x5->cd(1);
9144  int kcountHBnegativedirectionRecosignal1 = 1;
9145  TH1F *h2CeffHBnegativedirectionRecosignal1 = new TH1F("h2CeffHBnegativedirectionRecosignal1", "", nphi, 0., 72.);
9146  for (int jeta = 0; jeta < njeta; jeta++) {
9147  // negativedirectionRecosignal:
9148  if (jeta - 41 < 0) {
9149  // for (int i=0;i<ndepth;i++) {
9150  // depth=1
9151  for (int i = 0; i < 1; i++) {
9152  TH1F *HBnegativedirectionRecosignal1 = (TH1F *)h2CeffHBnegativedirectionRecosignal1->Clone("twod1");
9153  float ccctest = 0; // to avoid empty massive elements
9154  for (int jphi = 0; jphi < nphi; jphi++) {
9155  double ccc1 = arecosignalHB[i][jeta][jphi];
9156  if (ccc1 != 0.) {
9157  HBnegativedirectionRecosignal1->Fill(jphi, ccc1);
9158  ccctest = 1.; //HBnegativedirectionRecosignal1->SetBinError(i,0.01);
9159  }
9160  } // for jphi
9161  if (ccctest > 0.) {
9162  // cout<<"444 kcountHBnegativedirectionRecosignal1 = "<<kcountHBnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
9163  c3x5->cd(kcountHBnegativedirectionRecosignal1);
9164  HBnegativedirectionRecosignal1->SetMarkerStyle(20);
9165  HBnegativedirectionRecosignal1->SetMarkerSize(0.4);
9166  HBnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
9167  HBnegativedirectionRecosignal1->SetXTitle("HBnegativedirectionRecosignal1 \b");
9168  HBnegativedirectionRecosignal1->SetMarkerColor(2);
9169  HBnegativedirectionRecosignal1->SetLineColor(0);
9170  gPad->SetGridy();
9171  gPad->SetGridx();
9172  // gPad->SetLogy();
9173  if (kcountHBnegativedirectionRecosignal1 == 1)
9174  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
9175  if (kcountHBnegativedirectionRecosignal1 == 2)
9176  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
9177  if (kcountHBnegativedirectionRecosignal1 == 3)
9178  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
9179  if (kcountHBnegativedirectionRecosignal1 == 4)
9180  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
9181  if (kcountHBnegativedirectionRecosignal1 == 5)
9182  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
9183  if (kcountHBnegativedirectionRecosignal1 == 6)
9184  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
9185  if (kcountHBnegativedirectionRecosignal1 == 7)
9186  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
9187  if (kcountHBnegativedirectionRecosignal1 == 8)
9188  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
9189  if (kcountHBnegativedirectionRecosignal1 == 9)
9190  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
9191  if (kcountHBnegativedirectionRecosignal1 == 10)
9192  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
9193  if (kcountHBnegativedirectionRecosignal1 == 11)
9194  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
9195  if (kcountHBnegativedirectionRecosignal1 == 12)
9196  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
9197  if (kcountHBnegativedirectionRecosignal1 == 13)
9198  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
9199  if (kcountHBnegativedirectionRecosignal1 == 14)
9200  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
9201  if (kcountHBnegativedirectionRecosignal1 == 15)
9202  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
9203  if (kcountHBnegativedirectionRecosignal1 == 16)
9204  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
9205  HBnegativedirectionRecosignal1->Draw("Error");
9206  kcountHBnegativedirectionRecosignal1++;
9207  if (kcountHBnegativedirectionRecosignal1 > 16)
9208  break; //
9209  } //ccctest>0
9210 
9211  } // for i
9212  } //if(jeta-41 < 0 )
9213  } //for jeta
9215  c3x5->Update();
9216  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
9217  c3x5->Clear();
9218  // clean-up
9219  if (h2CeffHBnegativedirectionRecosignal1)
9220  delete h2CeffHBnegativedirectionRecosignal1;
9221 
9222  //========================================================================================== 1115
9223  //======================================================================
9224  //======================================================================1D plot: R vs phi , different eta, depth=2
9225  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
9226  c3x5->Clear();
9228  c3x5->Divide(4, 4);
9229  c3x5->cd(1);
9230  int kcountHBnegativedirectionRecosignal2 = 1;
9231  TH1F *h2CeffHBnegativedirectionRecosignal2 = new TH1F("h2CeffHBnegativedirectionRecosignal2", "", nphi, 0., 72.);
9232  for (int jeta = 0; jeta < njeta; jeta++) {
9233  // negativedirectionRecosignal:
9234  if (jeta - 41 < 0) {
9235  // for (int i=0;i<ndepth;i++) {
9236  // depth=2
9237  for (int i = 1; i < 2; i++) {
9238  TH1F *HBnegativedirectionRecosignal2 = (TH1F *)h2CeffHBnegativedirectionRecosignal2->Clone("twod1");
9239  float ccctest = 0; // to avoid empty massive elements
9240  for (int jphi = 0; jphi < nphi; jphi++) {
9241  double ccc1 = arecosignalHB[i][jeta][jphi];
9242  if (ccc1 != 0.) {
9243  HBnegativedirectionRecosignal2->Fill(jphi, ccc1);
9244  ccctest = 1.; //HBnegativedirectionRecosignal2->SetBinError(i,0.01);
9245  }
9246  } // for jphi
9247  if (ccctest > 0.) {
9248  //cout<<"555 kcountHBnegativedirectionRecosignal2 = "<<kcountHBnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
9249  c3x5->cd(kcountHBnegativedirectionRecosignal2);
9250  HBnegativedirectionRecosignal2->SetMarkerStyle(20);
9251  HBnegativedirectionRecosignal2->SetMarkerSize(0.4);
9252  HBnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
9253  HBnegativedirectionRecosignal2->SetXTitle("HBnegativedirectionRecosignal2 \b");
9254  HBnegativedirectionRecosignal2->SetMarkerColor(2);
9255  HBnegativedirectionRecosignal2->SetLineColor(0);
9256  gPad->SetGridy();
9257  gPad->SetGridx();
9258  // gPad->SetLogy();
9259  if (kcountHBnegativedirectionRecosignal2 == 1)
9260  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
9261  if (kcountHBnegativedirectionRecosignal2 == 2)
9262  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
9263  if (kcountHBnegativedirectionRecosignal2 == 3)
9264  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
9265  if (kcountHBnegativedirectionRecosignal2 == 4)
9266  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
9267  if (kcountHBnegativedirectionRecosignal2 == 5)
9268  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
9269  if (kcountHBnegativedirectionRecosignal2 == 6)
9270  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
9271  if (kcountHBnegativedirectionRecosignal2 == 7)
9272  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
9273  if (kcountHBnegativedirectionRecosignal2 == 8)
9274  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
9275  if (kcountHBnegativedirectionRecosignal2 == 9)
9276  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
9277  if (kcountHBnegativedirectionRecosignal2 == 10)
9278  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
9279  if (kcountHBnegativedirectionRecosignal2 == 11)
9280  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
9281  if (kcountHBnegativedirectionRecosignal2 == 12)
9282  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
9283  if (kcountHBnegativedirectionRecosignal2 == 13)
9284  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
9285  if (kcountHBnegativedirectionRecosignal2 == 14)
9286  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
9287  if (kcountHBnegativedirectionRecosignal2 == 15)
9288  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
9289  if (kcountHBnegativedirectionRecosignal2 == 16)
9290  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
9291  HBnegativedirectionRecosignal2->Draw("Error");
9292  kcountHBnegativedirectionRecosignal2++;
9293  if (kcountHBnegativedirectionRecosignal2 > 16)
9294  break; // 4x6 = 24
9295  } //ccctest>0
9296 
9297  } // for i
9298  } //if(jeta-41 < 0 )
9299  } //for jeta
9301  c3x5->Update();
9302  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
9303  c3x5->Clear();
9304  // clean-up
9305  if (h2CeffHBnegativedirectionRecosignal2)
9306  delete h2CeffHBnegativedirectionRecosignal2;
9307  //========================================================================================== 1116
9308  //======================================================================
9309  //======================================================================1D plot: R vs phi , different eta, depth=3
9310  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
9311  c3x5->Clear();
9313  c3x5->Divide(4, 4);
9314  c3x5->cd(1);
9315  int kcountHBnegativedirectionRecosignal3 = 1;
9316  TH1F *h2CeffHBnegativedirectionRecosignal3 = new TH1F("h2CeffHBnegativedirectionRecosignal3", "", nphi, 0., 72.);
9317  for (int jeta = 0; jeta < njeta; jeta++) {
9318  // negativedirectionRecosignal:
9319  if (jeta - 41 < 0) {
9320  // for (int i=0;i<ndepth;i++) {
9321  // depth=3
9322  for (int i = 2; i < 3; i++) {
9323  TH1F *HBnegativedirectionRecosignal3 = (TH1F *)h2CeffHBnegativedirectionRecosignal3->Clone("twod1");
9324  float ccctest = 0; // to avoid empty massive elements
9325  for (int jphi = 0; jphi < nphi; jphi++) {
9326  double ccc1 = arecosignalHB[i][jeta][jphi];
9327  if (ccc1 != 0.) {
9328  HBnegativedirectionRecosignal3->Fill(jphi, ccc1);
9329  ccctest = 1.; //HBnegativedirectionRecosignal3->SetBinError(i,0.01);
9330  }
9331  } // for jphi
9332  if (ccctest > 0.) {
9333  //cout<<"666 kcountHBnegativedirectionRecosignal3 = "<<kcountHBnegativedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
9334  c3x5->cd(kcountHBnegativedirectionRecosignal3);
9335  HBnegativedirectionRecosignal3->SetMarkerStyle(20);
9336  HBnegativedirectionRecosignal3->SetMarkerSize(0.4);
9337  HBnegativedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
9338  HBnegativedirectionRecosignal3->SetXTitle("HBnegativedirectionRecosignal3 \b");
9339  HBnegativedirectionRecosignal3->SetMarkerColor(2);
9340  HBnegativedirectionRecosignal3->SetLineColor(0);
9341  gPad->SetGridy();
9342  gPad->SetGridx();
9343  // gPad->SetLogy();
9344  if (kcountHBnegativedirectionRecosignal3 == 1)
9345  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
9346  if (kcountHBnegativedirectionRecosignal3 == 2)
9347  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
9348  if (kcountHBnegativedirectionRecosignal3 == 3)
9349  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
9350  if (kcountHBnegativedirectionRecosignal3 == 4)
9351  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
9352  if (kcountHBnegativedirectionRecosignal3 == 5)
9353  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
9354  if (kcountHBnegativedirectionRecosignal3 == 6)
9355  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
9356  if (kcountHBnegativedirectionRecosignal3 == 7)
9357  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
9358  if (kcountHBnegativedirectionRecosignal3 == 8)
9359  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
9360  if (kcountHBnegativedirectionRecosignal3 == 9)
9361  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
9362  if (kcountHBnegativedirectionRecosignal3 == 10)
9363  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
9364  if (kcountHBnegativedirectionRecosignal3 == 11)
9365  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
9366  if (kcountHBnegativedirectionRecosignal3 == 12)
9367  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
9368  if (kcountHBnegativedirectionRecosignal3 == 13)
9369  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
9370  if (kcountHBnegativedirectionRecosignal3 == 14)
9371  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
9372  if (kcountHBnegativedirectionRecosignal3 == 15)
9373  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
9374  if (kcountHBnegativedirectionRecosignal3 == 16)
9375  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
9376 
9377  HBnegativedirectionRecosignal3->Draw("Error");
9378  kcountHBnegativedirectionRecosignal3++;
9379  if (kcountHBnegativedirectionRecosignal3 > 16)
9380  break; // 4x6 = 24
9381  } //ccctest>0
9382 
9383  } // for i
9384  } //if(jeta-41 < 0 )
9385  } //for jeta
9387  c3x5->Update();
9388  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
9389  c3x5->Clear();
9390  // clean-up
9391  if (h2CeffHBnegativedirectionRecosignal3)
9392  delete h2CeffHBnegativedirectionRecosignal3;
9393  //========================================================================================== 1117
9394  //======================================================================
9395  //======================================================================1D plot: R vs phi , different eta, depth=4
9396  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
9397  c3x5->Clear();
9399  c3x5->Divide(4, 4);
9400  c3x5->cd(1);
9401  int kcountHBnegativedirectionRecosignal4 = 1;
9402  TH1F *h2CeffHBnegativedirectionRecosignal4 = new TH1F("h2CeffHBnegativedirectionRecosignal4", "", nphi, 0., 72.);
9403 
9404  for (int jeta = 0; jeta < njeta; jeta++) {
9405  // negativedirectionRecosignal:
9406  if (jeta - 41 < 0) {
9407  // for (int i=0;i<ndepth;i++) {
9408  // depth=4
9409  for (int i = 3; i < 4; i++) {
9410  TH1F *HBnegativedirectionRecosignal4 = (TH1F *)h2CeffHBnegativedirectionRecosignal4->Clone("twod1");
9411 
9412  float ccctest = 0; // to avoid empty massive elements
9413  for (int jphi = 0; jphi < nphi; jphi++) {
9414  double ccc1 = arecosignalHB[i][jeta][jphi];
9415  if (ccc1 != 0.) {
9416  HBnegativedirectionRecosignal4->Fill(jphi, ccc1);
9417  ccctest = 1.; //HBnegativedirectionRecosignal4->SetBinError(i,0.01);
9418  }
9419  } // for jphi
9420  if (ccctest > 0.) {
9421  //cout<<"777 kcountHBnegativedirectionRecosignal4 = "<<kcountHBnegativedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
9422  c3x5->cd(kcountHBnegativedirectionRecosignal4);
9423  HBnegativedirectionRecosignal4->SetMarkerStyle(20);
9424  HBnegativedirectionRecosignal4->SetMarkerSize(0.4);
9425  HBnegativedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
9426  HBnegativedirectionRecosignal4->SetXTitle("HBnegativedirectionRecosignal4 \b");
9427  HBnegativedirectionRecosignal4->SetMarkerColor(2);
9428  HBnegativedirectionRecosignal4->SetLineColor(0);
9429  gPad->SetGridy();
9430  gPad->SetGridx();
9431  // gPad->SetLogy();
9432  if (kcountHBnegativedirectionRecosignal4 == 1)
9433  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
9434  if (kcountHBnegativedirectionRecosignal4 == 2)
9435  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
9436  if (kcountHBnegativedirectionRecosignal4 == 3)
9437  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
9438  if (kcountHBnegativedirectionRecosignal4 == 4)
9439  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
9440  if (kcountHBnegativedirectionRecosignal4 == 5)
9441  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
9442  if (kcountHBnegativedirectionRecosignal4 == 6)
9443  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
9444  if (kcountHBnegativedirectionRecosignal4 == 7)
9445  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
9446  if (kcountHBnegativedirectionRecosignal4 == 8)
9447  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
9448  if (kcountHBnegativedirectionRecosignal4 == 9)
9449  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
9450  if (kcountHBnegativedirectionRecosignal4 == 10)
9451  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
9452  if (kcountHBnegativedirectionRecosignal4 == 11)
9453  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
9454  if (kcountHBnegativedirectionRecosignal4 == 12)
9455  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
9456  if (kcountHBnegativedirectionRecosignal4 == 13)
9457  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
9458  if (kcountHBnegativedirectionRecosignal4 == 14)
9459  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
9460  if (kcountHBnegativedirectionRecosignal4 == 15)
9461  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
9462  if (kcountHBnegativedirectionRecosignal4 == 16)
9463  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
9464  HBnegativedirectionRecosignal4->Draw("Error");
9465  kcountHBnegativedirectionRecosignal4++;
9466  if (kcountHBnegativedirectionRecosignal4 > 16)
9467  break; // 4x6 = 24
9468  } //ccctest>0
9469 
9470  } // for i
9471  } //if(jeta-41 < 0 )
9472  } //for jeta
9474  c3x5->Update();
9475  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
9476  c3x5->Clear();
9477  // clean-up
9478  if (h2CeffHBnegativedirectionRecosignal4)
9479  delete h2CeffHBnegativedirectionRecosignal4;
9480 
9481  //======================================================================================================================
9482  //======================================================================================================================
9483  //======================================================================================================================
9484  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
9485 
9486  //cout<<" Start Vaiance: preparation *****" <<endl;
9487  TH2F *recosignalVariance1HB1 = (TH2F *)hfile->Get("h_recSignalEnergy2_HB1");
9488  TH2F *recosignalVariance0HB1 = (TH2F *)hfile->Get("h_recSignalEnergy0_HB1");
9489  TH2F *recosignalVarianceHB1 = (TH2F *)recosignalVariance1HB1->Clone("recosignalVarianceHB1");
9490  recosignalVarianceHB1->Divide(recosignalVariance1HB1, recosignalVariance0HB1, 1, 1, "B");
9491  TH2F *recosignalVariance1HB2 = (TH2F *)hfile->Get("h_recSignalEnergy2_HB2");
9492  TH2F *recosignalVariance0HB2 = (TH2F *)hfile->Get("h_recSignalEnergy0_HB2");
9493  TH2F *recosignalVarianceHB2 = (TH2F *)recosignalVariance1HB2->Clone("recosignalVarianceHB2");
9494  recosignalVarianceHB2->Divide(recosignalVariance1HB2, recosignalVariance0HB2, 1, 1, "B");
9495  TH2F *recosignalVariance1HB3 = (TH2F *)hfile->Get("h_recSignalEnergy2_HB3");
9496  TH2F *recosignalVariance0HB3 = (TH2F *)hfile->Get("h_recSignalEnergy0_HB3");
9497  TH2F *recosignalVarianceHB3 = (TH2F *)recosignalVariance1HB3->Clone("recosignalVarianceHB3");
9498  recosignalVarianceHB3->Divide(recosignalVariance1HB3, recosignalVariance0HB3, 1, 1, "B");
9499  TH2F *recosignalVariance1HB4 = (TH2F *)hfile->Get("h_recSignalEnergy2_HB4");
9500  TH2F *recosignalVariance0HB4 = (TH2F *)hfile->Get("h_recSignalEnergy0_HB4");
9501  TH2F *recosignalVarianceHB4 = (TH2F *)recosignalVariance1HB4->Clone("recosignalVarianceHB4");
9502  recosignalVarianceHB4->Divide(recosignalVariance1HB4, recosignalVariance0HB4, 1, 1, "B");
9503  //cout<<" Vaiance: preparation DONE *****" <<endl;
9504  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvarianceHB
9505  // = sum(R*R)/N - (sum(R)/N)**2
9506  for (int jeta = 0; jeta < njeta; jeta++) {
9507  //preparation for PHI normalization:
9508  double sumrecosignalHB0 = 0;
9509  int nsumrecosignalHB0 = 0;
9510  double sumrecosignalHB1 = 0;
9511  int nsumrecosignalHB1 = 0;
9512  double sumrecosignalHB2 = 0;
9513  int nsumrecosignalHB2 = 0;
9514  double sumrecosignalHB3 = 0;
9515  int nsumrecosignalHB3 = 0;
9516  for (int jphi = 0; jphi < njphi; jphi++) {
9517  recosignalvarianceHB[0][jeta][jphi] = recosignalVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
9518  recosignalvarianceHB[1][jeta][jphi] = recosignalVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
9519  recosignalvarianceHB[2][jeta][jphi] = recosignalVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
9520  recosignalvarianceHB[3][jeta][jphi] = recosignalVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
9521  if (recosignalvarianceHB[0][jeta][jphi] > 0.) {
9522  sumrecosignalHB0 += recosignalvarianceHB[0][jeta][jphi];
9523  ++nsumrecosignalHB0;
9524  }
9525  if (recosignalvarianceHB[1][jeta][jphi] > 0.) {
9526  sumrecosignalHB1 += recosignalvarianceHB[1][jeta][jphi];
9527  ++nsumrecosignalHB1;
9528  }
9529  if (recosignalvarianceHB[2][jeta][jphi] > 0.) {
9530  sumrecosignalHB2 += recosignalvarianceHB[2][jeta][jphi];
9531  ++nsumrecosignalHB2;
9532  }
9533  if (recosignalvarianceHB[3][jeta][jphi] > 0.) {
9534  sumrecosignalHB3 += recosignalvarianceHB[3][jeta][jphi];
9535  ++nsumrecosignalHB3;
9536  }
9537  } // phi
9538  // PHI normalization :
9539  for (int jphi = 0; jphi < njphi; jphi++) {
9540  if (recosignalvarianceHB[0][jeta][jphi] > 0.)
9541  recosignalvarianceHB[0][jeta][jphi] /= (sumrecosignalHB0 / nsumrecosignalHB0);
9542  if (recosignalvarianceHB[1][jeta][jphi] > 0.)
9543  recosignalvarianceHB[1][jeta][jphi] /= (sumrecosignalHB1 / nsumrecosignalHB1);
9544  if (recosignalvarianceHB[2][jeta][jphi] > 0.)
9545  recosignalvarianceHB[2][jeta][jphi] /= (sumrecosignalHB2 / nsumrecosignalHB2);
9546  if (recosignalvarianceHB[3][jeta][jphi] > 0.)
9547  recosignalvarianceHB[3][jeta][jphi] /= (sumrecosignalHB3 / nsumrecosignalHB3);
9548  } // phi
9549  // recosignalvarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
9550  for (int jphi = 0; jphi < njphi; jphi++) {
9551  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
9552  recosignalvarianceHB[0][jeta][jphi] -= arecosignalHB[0][jeta][jphi] * arecosignalHB[0][jeta][jphi];
9553  recosignalvarianceHB[0][jeta][jphi] = fabs(recosignalvarianceHB[0][jeta][jphi]);
9554  recosignalvarianceHB[1][jeta][jphi] -= arecosignalHB[1][jeta][jphi] * arecosignalHB[1][jeta][jphi];
9555  recosignalvarianceHB[1][jeta][jphi] = fabs(recosignalvarianceHB[1][jeta][jphi]);
9556  recosignalvarianceHB[2][jeta][jphi] -= arecosignalHB[2][jeta][jphi] * arecosignalHB[2][jeta][jphi];
9557  recosignalvarianceHB[2][jeta][jphi] = fabs(recosignalvarianceHB[2][jeta][jphi]);
9558  recosignalvarianceHB[3][jeta][jphi] -= arecosignalHB[3][jeta][jphi] * arecosignalHB[3][jeta][jphi];
9559  recosignalvarianceHB[3][jeta][jphi] = fabs(recosignalvarianceHB[3][jeta][jphi]);
9560  }
9561  }
9562  //cout<<" Vaiance: DONE*****" <<endl;
9563  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
9564  //======================================================================
9565  //======================================================================
9566  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
9567  c1x1->Clear();
9569  c1x0->Divide(1, 1);
9570  c1x0->cd(1);
9571  TH2F *DefzDrecosignalHB42D = new TH2F("DefzDrecosignalHB42D", "", neta, -41., 41., nphi, 0., 72.);
9572  TH2F *DefzDrecosignalHB42D0 = new TH2F("DefzDrecosignalHB42D0", "", neta, -41., 41., nphi, 0., 72.);
9573  TH2F *DefzDrecosignalHB42DF = (TH2F *)DefzDrecosignalHB42D0->Clone("DefzDrecosignalHB42DF");
9574  for (int i = 0; i < ndepth; i++) {
9575  for (int jeta = 0; jeta < neta; jeta++) {
9576  for (int jphi = 0; jphi < nphi; jphi++) {
9577  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9578  int k2plot = jeta - 41;
9579  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
9580  if (arecosignalHB[i][jeta][jphi] > 0.) {
9581  DefzDrecosignalHB42D->Fill(kkk, jphi, ccc1);
9582  DefzDrecosignalHB42D0->Fill(kkk, jphi, 1.);
9583  }
9584  }
9585  }
9586  }
9587  DefzDrecosignalHB42DF->Divide(DefzDrecosignalHB42D, DefzDrecosignalHB42D0, 1, 1, "B"); // average A
9588  // DefzDrecosignalHB1->Sumw2();
9589  gPad->SetGridy();
9590  gPad->SetGridx(); // gPad->SetLogz();
9591  DefzDrecosignalHB42DF->SetMarkerStyle(20);
9592  DefzDrecosignalHB42DF->SetMarkerSize(0.4);
9593  DefzDrecosignalHB42DF->GetZaxis()->SetLabelSize(0.08);
9594  DefzDrecosignalHB42DF->SetXTitle("<D>_depth #eta \b");
9595  DefzDrecosignalHB42DF->SetYTitle(" #phi \b");
9596  DefzDrecosignalHB42DF->SetZTitle("<D>_depth \b");
9597  DefzDrecosignalHB42DF->SetMarkerColor(2);
9598  DefzDrecosignalHB42DF->SetLineColor(
9599  0); // DefzDrecosignalHB42DF->SetMaximum(1.000); // DefzDrecosignalHB42DF->SetMinimum(1.0);
9600  DefzDrecosignalHB42DF->Draw("COLZ");
9602  c1x0->Update();
9603  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHB.png");
9604  c1x0->Clear();
9605  // clean-up
9606  if (DefzDrecosignalHB42D)
9607  delete DefzDrecosignalHB42D;
9608  if (DefzDrecosignalHB42D0)
9609  delete DefzDrecosignalHB42D0;
9610  if (DefzDrecosignalHB42DF)
9611  delete DefzDrecosignalHB42DF;
9612  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
9613  //======================================================================
9614  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
9615  c1x1->Clear();
9617  c1x1->Divide(1, 1);
9618  c1x1->cd(1);
9619  TH1F *DefzDrecosignalHB41D = new TH1F("DefzDrecosignalHB41D", "", nphi, 0., 72.);
9620  TH1F *DefzDrecosignalHB41D0 = new TH1F("DefzDrecosignalHB41D0", "", nphi, 0., 72.);
9621  TH1F *DefzDrecosignalHB41DF = (TH1F *)DefzDrecosignalHB41D0->Clone("DefzDrecosignalHB41DF");
9622 
9623  for (int jphi = 0; jphi < nphi; jphi++) {
9624  for (int jeta = 0; jeta < neta; jeta++) {
9625  for (int i = 0; i < ndepth; i++) {
9626  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9627  if (arecosignalHB[i][jeta][jphi] > 0.) {
9628  DefzDrecosignalHB41D->Fill(jphi, ccc1);
9629  DefzDrecosignalHB41D0->Fill(jphi, 1.);
9630  }
9631  }
9632  }
9633  }
9634  // DefzDrecosignalHB41D->Sumw2();DefzDrecosignalHB41D0->Sumw2();
9635 
9636  DefzDrecosignalHB41DF->Divide(
9637  DefzDrecosignalHB41D, DefzDrecosignalHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
9638  DefzDrecosignalHB41D0->Sumw2();
9639  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHB41DF->SetBinError(jphi,0.01);}
9640  gPad->SetGridy();
9641  gPad->SetGridx(); // gPad->SetLogz();
9642  DefzDrecosignalHB41DF->SetMarkerStyle(20);
9643  DefzDrecosignalHB41DF->SetMarkerSize(1.4);
9644  DefzDrecosignalHB41DF->GetZaxis()->SetLabelSize(0.08);
9645  DefzDrecosignalHB41DF->SetXTitle("#phi \b");
9646  DefzDrecosignalHB41DF->SetYTitle(" <D> \b");
9647  DefzDrecosignalHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
9648  DefzDrecosignalHB41DF->SetMarkerColor(4);
9649  DefzDrecosignalHB41DF->SetLineColor(
9650  4); // DefzDrecosignalHB41DF->SetMinimum(0.8); DefzDrecosignalHB41DF->SetMinimum(-0.015);
9651  DefzDrecosignalHB41DF->Draw("Error");
9653  c1x1->Update();
9654  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHB.png");
9655  c1x1->Clear();
9656  // clean-up
9657  if (DefzDrecosignalHB41D)
9658  delete DefzDrecosignalHB41D;
9659  if (DefzDrecosignalHB41D0)
9660  delete DefzDrecosignalHB41D0;
9661  if (DefzDrecosignalHB41DF)
9662  delete DefzDrecosignalHB41DF;
9663 
9664  //========================================================================================== 14
9665  //======================================================================
9666  //======================================================================1D plot: D vs phi , different eta, depth=1
9667  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
9668  c3x5->Clear();
9670  c3x5->Divide(4, 4);
9671  c3x5->cd(1);
9672  int kcountHBpositivedirectionRecosignalD1 = 1;
9673  TH1F *h2CeffHBpositivedirectionRecosignalD1 = new TH1F("h2CeffHBpositivedirectionRecosignalD1", "", nphi, 0., 72.);
9674 
9675  for (int jeta = 0; jeta < njeta; jeta++) {
9676  // positivedirectionRecosignalD:
9677  if (jeta - 41 >= 0) {
9678  // for (int i=0;i<ndepth;i++) {
9679  // depth=1
9680  for (int i = 0; i < 1; i++) {
9681  TH1F *HBpositivedirectionRecosignalD1 = (TH1F *)h2CeffHBpositivedirectionRecosignalD1->Clone("twod1");
9682 
9683  float ccctest = 0; // to avoid empty massive elements
9684  for (int jphi = 0; jphi < nphi; jphi++) {
9685  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9686  if (arecosignalHB[i][jeta][jphi] > 0.) {
9687  HBpositivedirectionRecosignalD1->Fill(jphi, ccc1);
9688  ccctest = 1.; //HBpositivedirectionRecosignalD1->SetBinError(i,0.01);
9689  }
9690  } // for jphi
9691  if (ccctest > 0.) {
9692  //cout<<"1414 kcountHBpositivedirectionRecosignalD1 = "<<kcountHBpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
9693  c3x5->cd(kcountHBpositivedirectionRecosignalD1);
9694  HBpositivedirectionRecosignalD1->SetMarkerStyle(20);
9695  HBpositivedirectionRecosignalD1->SetMarkerSize(0.4);
9696  HBpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
9697  HBpositivedirectionRecosignalD1->SetXTitle("HBpositivedirectionRecosignalD1 \b");
9698  HBpositivedirectionRecosignalD1->SetMarkerColor(2);
9699  HBpositivedirectionRecosignalD1->SetLineColor(0);
9700  gPad->SetGridy();
9701  gPad->SetGridx();
9702  // gPad->SetLogy();
9703  if (kcountHBpositivedirectionRecosignalD1 == 1)
9704  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
9705  if (kcountHBpositivedirectionRecosignalD1 == 2)
9706  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
9707  if (kcountHBpositivedirectionRecosignalD1 == 3)
9708  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
9709  if (kcountHBpositivedirectionRecosignalD1 == 4)
9710  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
9711  if (kcountHBpositivedirectionRecosignalD1 == 5)
9712  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
9713  if (kcountHBpositivedirectionRecosignalD1 == 6)
9714  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
9715  if (kcountHBpositivedirectionRecosignalD1 == 7)
9716  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
9717  if (kcountHBpositivedirectionRecosignalD1 == 8)
9718  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
9719  if (kcountHBpositivedirectionRecosignalD1 == 9)
9720  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
9721  if (kcountHBpositivedirectionRecosignalD1 == 10)
9722  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
9723  if (kcountHBpositivedirectionRecosignalD1 == 11)
9724  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
9725  if (kcountHBpositivedirectionRecosignalD1 == 12)
9726  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
9727  if (kcountHBpositivedirectionRecosignalD1 == 13)
9728  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
9729  if (kcountHBpositivedirectionRecosignalD1 == 14)
9730  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
9731  if (kcountHBpositivedirectionRecosignalD1 == 15)
9732  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
9733  if (kcountHBpositivedirectionRecosignalD1 == 16)
9734  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
9735  HBpositivedirectionRecosignalD1->Draw("Error");
9736  kcountHBpositivedirectionRecosignalD1++;
9737  if (kcountHBpositivedirectionRecosignalD1 > 16)
9738  break; // 4x6 = 24
9739  } //ccctest>0
9740 
9741  } // for i
9742  } //if(jeta-41 >= 0)
9743  } //for jeta
9745  c3x5->Update();
9746  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
9747  c3x5->Clear();
9748  // clean-up
9749  if (h2CeffHBpositivedirectionRecosignalD1)
9750  delete h2CeffHBpositivedirectionRecosignalD1;
9751  //========================================================================================== 15
9752  //======================================================================
9753  //======================================================================1D plot: D vs phi , different eta, depth=2
9754  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
9755  c3x5->Clear();
9756  c3x5->Divide(4, 4);
9757  c3x5->cd(1);
9758  int kcountHBpositivedirectionRecosignalD2 = 1;
9759  TH1F *h2CeffHBpositivedirectionRecosignalD2 = new TH1F("h2CeffHBpositivedirectionRecosignalD2", "", nphi, 0., 72.);
9760 
9761  for (int jeta = 0; jeta < njeta; jeta++) {
9762  // positivedirectionRecosignalD:
9763  if (jeta - 41 >= 0) {
9764  // for (int i=0;i<ndepth;i++) {
9765  // depth=2
9766  for (int i = 1; i < 2; i++) {
9767  TH1F *HBpositivedirectionRecosignalD2 = (TH1F *)h2CeffHBpositivedirectionRecosignalD2->Clone("twod1");
9768 
9769  float ccctest = 0; // to avoid empty massive elements
9770  for (int jphi = 0; jphi < nphi; jphi++) {
9771  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9772  if (arecosignalHB[i][jeta][jphi] > 0.) {
9773  HBpositivedirectionRecosignalD2->Fill(jphi, ccc1);
9774  ccctest = 1.; //HBpositivedirectionRecosignalD2->SetBinError(i,0.01);
9775  }
9776  } // for jphi
9777  if (ccctest > 0.) {
9778  //cout<<"1515 kcountHBpositivedirectionRecosignalD2 = "<<kcountHBpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
9779  c3x5->cd(kcountHBpositivedirectionRecosignalD2);
9780  HBpositivedirectionRecosignalD2->SetMarkerStyle(20);
9781  HBpositivedirectionRecosignalD2->SetMarkerSize(0.4);
9782  HBpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
9783  HBpositivedirectionRecosignalD2->SetXTitle("HBpositivedirectionRecosignalD2 \b");
9784  HBpositivedirectionRecosignalD2->SetMarkerColor(2);
9785  HBpositivedirectionRecosignalD2->SetLineColor(0);
9786  gPad->SetGridy();
9787  gPad->SetGridx();
9788  // gPad->SetLogy();
9789  if (kcountHBpositivedirectionRecosignalD2 == 1)
9790  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
9791  if (kcountHBpositivedirectionRecosignalD2 == 2)
9792  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
9793  if (kcountHBpositivedirectionRecosignalD2 == 3)
9794  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
9795  if (kcountHBpositivedirectionRecosignalD2 == 4)
9796  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
9797  if (kcountHBpositivedirectionRecosignalD2 == 5)
9798  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
9799  if (kcountHBpositivedirectionRecosignalD2 == 6)
9800  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
9801  if (kcountHBpositivedirectionRecosignalD2 == 7)
9802  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
9803  if (kcountHBpositivedirectionRecosignalD2 == 8)
9804  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
9805  if (kcountHBpositivedirectionRecosignalD2 == 9)
9806  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
9807  if (kcountHBpositivedirectionRecosignalD2 == 10)
9808  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
9809  if (kcountHBpositivedirectionRecosignalD2 == 11)
9810  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
9811  if (kcountHBpositivedirectionRecosignalD2 == 12)
9812  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
9813  if (kcountHBpositivedirectionRecosignalD2 == 13)
9814  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
9815  if (kcountHBpositivedirectionRecosignalD2 == 14)
9816  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
9817  if (kcountHBpositivedirectionRecosignalD2 == 15)
9818  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
9819  if (kcountHBpositivedirectionRecosignalD2 == 16)
9820  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
9821  HBpositivedirectionRecosignalD2->Draw("Error");
9822  kcountHBpositivedirectionRecosignalD2++;
9823  if (kcountHBpositivedirectionRecosignalD2 > 16)
9824  break; // 4x6 = 24
9825  } //ccctest>0
9826 
9827  } // for i
9828  } //if(jeta-41 >= 0)
9829  } //for jeta
9831  c3x5->Update();
9832  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
9833  c3x5->Clear();
9834  // clean-up
9835  if (h2CeffHBpositivedirectionRecosignalD2)
9836  delete h2CeffHBpositivedirectionRecosignalD2;
9837  //========================================================================================== 16
9838  //======================================================================
9839  //======================================================================1D plot: D vs phi , different eta, depth=3
9840  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
9841  c3x5->Clear();
9842  c3x5->Divide(4, 4);
9843  c3x5->cd(1);
9844  int kcountHBpositivedirectionRecosignalD3 = 1;
9845  TH1F *h2CeffHBpositivedirectionRecosignalD3 = new TH1F("h2CeffHBpositivedirectionRecosignalD3", "", nphi, 0., 72.);
9846 
9847  for (int jeta = 0; jeta < njeta; jeta++) {
9848  // positivedirectionRecosignalD:
9849  if (jeta - 41 >= 0) {
9850  // for (int i=0;i<ndepth;i++) {
9851  // depth=3
9852  for (int i = 2; i < 3; i++) {
9853  TH1F *HBpositivedirectionRecosignalD3 = (TH1F *)h2CeffHBpositivedirectionRecosignalD3->Clone("twod1");
9854 
9855  float ccctest = 0; // to avoid empty massive elements
9856  for (int jphi = 0; jphi < nphi; jphi++) {
9857  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9858  if (arecosignalHB[i][jeta][jphi] > 0.) {
9859  HBpositivedirectionRecosignalD3->Fill(jphi, ccc1);
9860  ccctest = 1.; //HBpositivedirectionRecosignalD3->SetBinError(i,0.01);
9861  }
9862  } // for jphi
9863  if (ccctest > 0.) {
9864  //cout<<"1616 kcountHBpositivedirectionRecosignalD3 = "<<kcountHBpositivedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
9865  c3x5->cd(kcountHBpositivedirectionRecosignalD3);
9866  HBpositivedirectionRecosignalD3->SetMarkerStyle(20);
9867  HBpositivedirectionRecosignalD3->SetMarkerSize(0.4);
9868  HBpositivedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
9869  HBpositivedirectionRecosignalD3->SetXTitle("HBpositivedirectionRecosignalD3 \b");
9870  HBpositivedirectionRecosignalD3->SetMarkerColor(2);
9871  HBpositivedirectionRecosignalD3->SetLineColor(0);
9872  gPad->SetGridy();
9873  gPad->SetGridx();
9874  // gPad->SetLogy();
9875  if (kcountHBpositivedirectionRecosignalD3 == 1)
9876  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
9877  if (kcountHBpositivedirectionRecosignalD3 == 2)
9878  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
9879  if (kcountHBpositivedirectionRecosignalD3 == 3)
9880  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
9881  if (kcountHBpositivedirectionRecosignalD3 == 4)
9882  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
9883  if (kcountHBpositivedirectionRecosignalD3 == 5)
9884  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
9885  if (kcountHBpositivedirectionRecosignalD3 == 6)
9886  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
9887  if (kcountHBpositivedirectionRecosignalD3 == 7)
9888  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
9889  if (kcountHBpositivedirectionRecosignalD3 == 8)
9890  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
9891  if (kcountHBpositivedirectionRecosignalD3 == 9)
9892  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
9893  if (kcountHBpositivedirectionRecosignalD3 == 10)
9894  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
9895  if (kcountHBpositivedirectionRecosignalD3 == 11)
9896  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
9897  if (kcountHBpositivedirectionRecosignalD3 == 12)
9898  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
9899  if (kcountHBpositivedirectionRecosignalD3 == 13)
9900  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
9901  if (kcountHBpositivedirectionRecosignalD3 == 14)
9902  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
9903  if (kcountHBpositivedirectionRecosignalD3 == 15)
9904  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
9905  if (kcountHBpositivedirectionRecosignalD3 == 16)
9906  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
9907  HBpositivedirectionRecosignalD3->Draw("Error");
9908  kcountHBpositivedirectionRecosignalD3++;
9909  if (kcountHBpositivedirectionRecosignalD3 > 16)
9910  break; // 4x6 = 24
9911  } //ccctest>0
9912 
9913  } // for i
9914  } //if(jeta-41 >= 0)
9915  } //for jeta
9917  c3x5->Update();
9918  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
9919  c3x5->Clear();
9920  // clean-up
9921  if (h2CeffHBpositivedirectionRecosignalD3)
9922  delete h2CeffHBpositivedirectionRecosignalD3;
9923  //========================================================================================== 17
9924  //======================================================================
9925  //======================================================================1D plot: D vs phi , different eta, depth=4
9926  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
9927  c3x5->Clear();
9928  c3x5->Divide(4, 4);
9929  c3x5->cd(1);
9930  int kcountHBpositivedirectionRecosignalD4 = 1;
9931  TH1F *h2CeffHBpositivedirectionRecosignalD4 = new TH1F("h2CeffHBpositivedirectionRecosignalD4", "", nphi, 0., 72.);
9932 
9933  for (int jeta = 0; jeta < njeta; jeta++) {
9934  // positivedirectionRecosignalD:
9935  if (jeta - 41 >= 0) {
9936  // for (int i=0;i<ndepth;i++) {
9937  // depth=4
9938  for (int i = 3; i < 4; i++) {
9939  TH1F *HBpositivedirectionRecosignalD4 = (TH1F *)h2CeffHBpositivedirectionRecosignalD4->Clone("twod1");
9940 
9941  float ccctest = 0; // to avoid empty massive elements
9942  for (int jphi = 0; jphi < nphi; jphi++) {
9943  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9944  if (arecosignalHB[i][jeta][jphi] > 0.) {
9945  HBpositivedirectionRecosignalD4->Fill(jphi, ccc1);
9946  ccctest = 1.; //HBpositivedirectionRecosignalD4->SetBinError(i,0.01);
9947  }
9948  } // for jphi
9949  if (ccctest > 0.) {
9950  //cout<<"1717 kcountHBpositivedirectionRecosignalD4 = "<<kcountHBpositivedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
9951  c3x5->cd(kcountHBpositivedirectionRecosignalD4);
9952  HBpositivedirectionRecosignalD4->SetMarkerStyle(20);
9953  HBpositivedirectionRecosignalD4->SetMarkerSize(0.4);
9954  HBpositivedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
9955  HBpositivedirectionRecosignalD4->SetXTitle("HBpositivedirectionRecosignalD4 \b");
9956  HBpositivedirectionRecosignalD4->SetMarkerColor(2);
9957  HBpositivedirectionRecosignalD4->SetLineColor(0);
9958  gPad->SetGridy();
9959  gPad->SetGridx();
9960  // gPad->SetLogy();
9961  if (kcountHBpositivedirectionRecosignalD4 == 1)
9962  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
9963  if (kcountHBpositivedirectionRecosignalD4 == 2)
9964  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
9965  if (kcountHBpositivedirectionRecosignalD4 == 3)
9966  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
9967  if (kcountHBpositivedirectionRecosignalD4 == 4)
9968  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
9969  if (kcountHBpositivedirectionRecosignalD4 == 5)
9970  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
9971  if (kcountHBpositivedirectionRecosignalD4 == 6)
9972  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
9973  if (kcountHBpositivedirectionRecosignalD4 == 7)
9974  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
9975  if (kcountHBpositivedirectionRecosignalD4 == 8)
9976  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
9977  if (kcountHBpositivedirectionRecosignalD4 == 9)
9978  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
9979  if (kcountHBpositivedirectionRecosignalD4 == 10)
9980  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
9981  if (kcountHBpositivedirectionRecosignalD4 == 11)
9982  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
9983  if (kcountHBpositivedirectionRecosignalD4 == 12)
9984  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
9985  if (kcountHBpositivedirectionRecosignalD4 == 13)
9986  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
9987  if (kcountHBpositivedirectionRecosignalD4 == 14)
9988  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
9989  if (kcountHBpositivedirectionRecosignalD4 == 15)
9990  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
9991  if (kcountHBpositivedirectionRecosignalD4 == 16)
9992  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
9993  HBpositivedirectionRecosignalD4->Draw("Error");
9994  kcountHBpositivedirectionRecosignalD4++;
9995  if (kcountHBpositivedirectionRecosignalD4 > 16)
9996  break; // 4x6 = 24
9997  } //ccctest>0
9998 
9999  } // for i
10000  } //if(jeta-41 >= 0)
10001  } //for jeta
10003  c3x5->Update();
10004  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
10005  c3x5->Clear();
10006  // clean-up
10007  if (h2CeffHBpositivedirectionRecosignalD4)
10008  delete h2CeffHBpositivedirectionRecosignalD4;
10009 
10010  //========================================================================================== 22214
10011  //======================================================================
10012  //======================================================================1D plot: D vs phi , different eta, depth=1
10013  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
10014  c3x5->Clear();
10016  c3x5->Divide(4, 4);
10017  c3x5->cd(1);
10018  int kcountHBnegativedirectionRecosignalD1 = 1;
10019  TH1F *h2CeffHBnegativedirectionRecosignalD1 = new TH1F("h2CeffHBnegativedirectionRecosignalD1", "", nphi, 0., 72.);
10020 
10021  for (int jeta = 0; jeta < njeta; jeta++) {
10022  // negativedirectionRecosignalD:
10023  if (jeta - 41 < 0) {
10024  // for (int i=0;i<ndepth;i++) {
10025  // depth=1
10026  for (int i = 0; i < 1; i++) {
10027  TH1F *HBnegativedirectionRecosignalD1 = (TH1F *)h2CeffHBnegativedirectionRecosignalD1->Clone("twod1");
10028 
10029  float ccctest = 0; // to avoid empty massive elements
10030  for (int jphi = 0; jphi < nphi; jphi++) {
10031  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10032  if (arecosignalHB[i][jeta][jphi] > 0.) {
10033  HBnegativedirectionRecosignalD1->Fill(jphi, ccc1);
10034  ccctest = 1.; //HBnegativedirectionRecosignalD1->SetBinError(i,0.01);
10035  }
10036  } // for jphi
10037  if (ccctest > 0.) {
10038  //cout<<"1414 kcountHBnegativedirectionRecosignalD1 = "<<kcountHBnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
10039  c3x5->cd(kcountHBnegativedirectionRecosignalD1);
10040  HBnegativedirectionRecosignalD1->SetMarkerStyle(20);
10041  HBnegativedirectionRecosignalD1->SetMarkerSize(0.4);
10042  HBnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
10043  HBnegativedirectionRecosignalD1->SetXTitle("HBnegativedirectionRecosignalD1 \b");
10044  HBnegativedirectionRecosignalD1->SetMarkerColor(2);
10045  HBnegativedirectionRecosignalD1->SetLineColor(0);
10046  gPad->SetGridy();
10047  gPad->SetGridx();
10048  // gPad->SetLogy();
10049  if (kcountHBnegativedirectionRecosignalD1 == 1)
10050  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -16; depth = 1 \b");
10051  if (kcountHBnegativedirectionRecosignalD1 == 2)
10052  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -15; depth = 1 \b");
10053  if (kcountHBnegativedirectionRecosignalD1 == 3)
10054  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -14; depth = 1 \b");
10055  if (kcountHBnegativedirectionRecosignalD1 == 4)
10056  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -13; depth = 1 \b");
10057  if (kcountHBnegativedirectionRecosignalD1 == 5)
10058  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -12; depth = 1 \b");
10059  if (kcountHBnegativedirectionRecosignalD1 == 6)
10060  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -11; depth = 1 \b");
10061  if (kcountHBnegativedirectionRecosignalD1 == 7)
10062  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -10; depth = 1 \b");
10063  if (kcountHBnegativedirectionRecosignalD1 == 8)
10064  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -9; depth = 1 \b");
10065  if (kcountHBnegativedirectionRecosignalD1 == 9)
10066  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -8; depth = 1 \b");
10067  if (kcountHBnegativedirectionRecosignalD1 == 10)
10068  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -7; depth = 1 \b");
10069  if (kcountHBnegativedirectionRecosignalD1 == 11)
10070  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -6; depth = 1 \b");
10071  if (kcountHBnegativedirectionRecosignalD1 == 12)
10072  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -5; depth = 1 \b");
10073  if (kcountHBnegativedirectionRecosignalD1 == 13)
10074  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -4; depth = 1 \b");
10075  if (kcountHBnegativedirectionRecosignalD1 == 14)
10076  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -3; depth = 1 \b");
10077  if (kcountHBnegativedirectionRecosignalD1 == 15)
10078  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -2; depth = 1 \b");
10079  if (kcountHBnegativedirectionRecosignalD1 == 16)
10080  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -1; depth = 1 \b");
10081  HBnegativedirectionRecosignalD1->Draw("Error");
10082  kcountHBnegativedirectionRecosignalD1++;
10083  if (kcountHBnegativedirectionRecosignalD1 > 16)
10084  break; // 4x6 = 24
10085  } //ccctest>0
10086 
10087  } // for i
10088  } //if(jeta-41 < 0)
10089  } //for jeta
10091  c3x5->Update();
10092  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
10093  c3x5->Clear();
10094  // clean-up
10095  if (h2CeffHBnegativedirectionRecosignalD1)
10096  delete h2CeffHBnegativedirectionRecosignalD1;
10097  //========================================================================================== 22215
10098  //======================================================================
10099  //======================================================================1D plot: D vs phi , different eta, depth=2
10100  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
10101  c3x5->Clear();
10102  c3x5->Divide(4, 4);
10103  c3x5->cd(1);
10104  int kcountHBnegativedirectionRecosignalD2 = 1;
10105  TH1F *h2CeffHBnegativedirectionRecosignalD2 = new TH1F("h2CeffHBnegativedirectionRecosignalD2", "", nphi, 0., 72.);
10106 
10107  for (int jeta = 0; jeta < njeta; jeta++) {
10108  // negativedirectionRecosignalD:
10109  if (jeta - 41 < 0) {
10110  // for (int i=0;i<ndepth;i++) {
10111  // depth=2
10112  for (int i = 1; i < 2; i++) {
10113  TH1F *HBnegativedirectionRecosignalD2 = (TH1F *)h2CeffHBnegativedirectionRecosignalD2->Clone("twod1");
10114 
10115  float ccctest = 0; // to avoid empty massive elements
10116  for (int jphi = 0; jphi < nphi; jphi++) {
10117  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10118  if (arecosignalHB[i][jeta][jphi] > 0.) {
10119  HBnegativedirectionRecosignalD2->Fill(jphi, ccc1);
10120  ccctest = 1.; //HBnegativedirectionRecosignalD2->SetBinError(i,0.01);
10121  }
10122  } // for jphi
10123  if (ccctest > 0.) {
10124  //cout<<"1515 kcountHBnegativedirectionRecosignalD2 = "<<kcountHBnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
10125  c3x5->cd(kcountHBnegativedirectionRecosignalD2);
10126  HBnegativedirectionRecosignalD2->SetMarkerStyle(20);
10127  HBnegativedirectionRecosignalD2->SetMarkerSize(0.4);
10128  HBnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
10129  HBnegativedirectionRecosignalD2->SetXTitle("HBnegativedirectionRecosignalD2 \b");
10130  HBnegativedirectionRecosignalD2->SetMarkerColor(2);
10131  HBnegativedirectionRecosignalD2->SetLineColor(0);
10132  gPad->SetGridy();
10133  gPad->SetGridx();
10134  // gPad->SetLogy();
10135  if (kcountHBnegativedirectionRecosignalD2 == 1)
10136  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
10137  if (kcountHBnegativedirectionRecosignalD2 == 2)
10138  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
10139  if (kcountHBnegativedirectionRecosignalD2 == 3)
10140  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
10141  if (kcountHBnegativedirectionRecosignalD2 == 4)
10142  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
10143  if (kcountHBnegativedirectionRecosignalD2 == 5)
10144  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
10145  if (kcountHBnegativedirectionRecosignalD2 == 6)
10146  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
10147  if (kcountHBnegativedirectionRecosignalD2 == 7)
10148  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
10149  if (kcountHBnegativedirectionRecosignalD2 == 8)
10150  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-9 ; depth = 2 \b");
10151  if (kcountHBnegativedirectionRecosignalD2 == 9)
10152  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-8 ; depth = 2 \b");
10153  if (kcountHBnegativedirectionRecosignalD2 == 10)
10154  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-7 ; depth = 2 \b");
10155  if (kcountHBnegativedirectionRecosignalD2 == 11)
10156  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-6 ; depth = 2 \b");
10157  if (kcountHBnegativedirectionRecosignalD2 == 12)
10158  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-5 ; depth = 2 \b");
10159  if (kcountHBnegativedirectionRecosignalD2 == 13)
10160  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-4 ; depth = 2 \b");
10161  if (kcountHBnegativedirectionRecosignalD2 == 14)
10162  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-3 ; depth = 2 \b");
10163  if (kcountHBnegativedirectionRecosignalD2 == 15)
10164  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-2 ; depth = 2 \b");
10165  if (kcountHBnegativedirectionRecosignalD2 == 16)
10166  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-1 ; depth = 2 \b");
10167  HBnegativedirectionRecosignalD2->Draw("Error");
10168  kcountHBnegativedirectionRecosignalD2++;
10169  if (kcountHBnegativedirectionRecosignalD2 > 16)
10170  break; // 4x6 = 24
10171  } //ccctest>0
10172 
10173  } // for i
10174  } //if(jeta-41 < 0)
10175  } //for jeta
10177  c3x5->Update();
10178  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
10179  c3x5->Clear();
10180  // clean-up
10181  if (h2CeffHBnegativedirectionRecosignalD2)
10182  delete h2CeffHBnegativedirectionRecosignalD2;
10183  //========================================================================================== 22216
10184  //======================================================================
10185  //======================================================================1D plot: D vs phi , different eta, depth=3
10186  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
10187  c3x5->Clear();
10188  c3x5->Divide(4, 4);
10189  c3x5->cd(1);
10190  int kcountHBnegativedirectionRecosignalD3 = 1;
10191  TH1F *h2CeffHBnegativedirectionRecosignalD3 = new TH1F("h2CeffHBnegativedirectionRecosignalD3", "", nphi, 0., 72.);
10192 
10193  for (int jeta = 0; jeta < njeta; jeta++) {
10194  // negativedirectionRecosignalD:
10195  if (jeta - 41 < 0) {
10196  // for (int i=0;i<ndepth;i++) {
10197  // depth=3
10198  for (int i = 2; i < 3; i++) {
10199  TH1F *HBnegativedirectionRecosignalD3 = (TH1F *)h2CeffHBnegativedirectionRecosignalD3->Clone("twod1");
10200 
10201  float ccctest = 0; // to avoid empty massive elements
10202  for (int jphi = 0; jphi < nphi; jphi++) {
10203  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10204  if (arecosignalHB[i][jeta][jphi] > 0.) {
10205  HBnegativedirectionRecosignalD3->Fill(jphi, ccc1);
10206  ccctest = 1.; //HBnegativedirectionRecosignalD3->SetBinError(i,0.01);
10207  }
10208  } // for jphi
10209  if (ccctest > 0.) {
10210  //cout<<"1616 kcountHBnegativedirectionRecosignalD3 = "<<kcountHBnegativedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
10211  c3x5->cd(kcountHBnegativedirectionRecosignalD3);
10212  HBnegativedirectionRecosignalD3->SetMarkerStyle(20);
10213  HBnegativedirectionRecosignalD3->SetMarkerSize(0.4);
10214  HBnegativedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
10215  HBnegativedirectionRecosignalD3->SetXTitle("HBnegativedirectionRecosignalD3 \b");
10216  HBnegativedirectionRecosignalD3->SetMarkerColor(2);
10217  HBnegativedirectionRecosignalD3->SetLineColor(0);
10218  gPad->SetGridy();
10219  gPad->SetGridx();
10220  // gPad->SetLogy();
10221  if (kcountHBnegativedirectionRecosignalD3 == 1)
10222  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
10223  if (kcountHBnegativedirectionRecosignalD3 == 2)
10224  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
10225  if (kcountHBnegativedirectionRecosignalD3 == 3)
10226  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
10227  if (kcountHBnegativedirectionRecosignalD3 == 4)
10228  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
10229  if (kcountHBnegativedirectionRecosignalD3 == 5)
10230  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
10231  if (kcountHBnegativedirectionRecosignalD3 == 6)
10232  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
10233  if (kcountHBnegativedirectionRecosignalD3 == 7)
10234  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
10235  if (kcountHBnegativedirectionRecosignalD3 == 8)
10236  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-9 ; depth = 3 \b");
10237  if (kcountHBnegativedirectionRecosignalD3 == 9)
10238  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-8 ; depth = 3 \b");
10239  if (kcountHBnegativedirectionRecosignalD3 == 10)
10240  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-7 ; depth = 3 \b");
10241  if (kcountHBnegativedirectionRecosignalD3 == 11)
10242  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-6 ; depth = 3 \b");
10243  if (kcountHBnegativedirectionRecosignalD3 == 12)
10244  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-5 ; depth = 3 \b");
10245  if (kcountHBnegativedirectionRecosignalD3 == 13)
10246  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-4 ; depth = 3 \b");
10247  if (kcountHBnegativedirectionRecosignalD3 == 14)
10248  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-3 ; depth = 3 \b");
10249  if (kcountHBnegativedirectionRecosignalD3 == 15)
10250  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-2 ; depth = 3 \b");
10251  if (kcountHBnegativedirectionRecosignalD3 == 16)
10252  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-1 ; depth = 3 \b");
10253  HBnegativedirectionRecosignalD3->Draw("Error");
10254  kcountHBnegativedirectionRecosignalD3++;
10255  if (kcountHBnegativedirectionRecosignalD3 > 16)
10256  break; // 4x6 = 24
10257  } //ccctest>0
10258 
10259  } // for i
10260  } //if(jeta-41 < 0)
10261  } //for jeta
10263  c3x5->Update();
10264  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
10265  c3x5->Clear();
10266  // clean-up
10267  if (h2CeffHBnegativedirectionRecosignalD3)
10268  delete h2CeffHBnegativedirectionRecosignalD3;
10269  //========================================================================================== 22217
10270  //======================================================================
10271  //======================================================================1D plot: D vs phi , different eta, depth=4
10272  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
10273  c3x5->Clear();
10274  c3x5->Divide(4, 4);
10275  c3x5->cd(1);
10276  int kcountHBnegativedirectionRecosignalD4 = 1;
10277  TH1F *h2CeffHBnegativedirectionRecosignalD4 = new TH1F("h2CeffHBnegativedirectionRecosignalD4", "", nphi, 0., 72.);
10278 
10279  for (int jeta = 0; jeta < njeta; jeta++) {
10280  // negativedirectionRecosignalD:
10281  if (jeta - 41 < 0) {
10282  // for (int i=0;i<ndepth;i++) {
10283  // depth=4
10284  for (int i = 3; i < 4; i++) {
10285  TH1F *HBnegativedirectionRecosignalD4 = (TH1F *)h2CeffHBnegativedirectionRecosignalD4->Clone("twod1");
10286 
10287  float ccctest = 0; // to avoid empty massive elements
10288  for (int jphi = 0; jphi < nphi; jphi++) {
10289  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10290  if (arecosignalHB[i][jeta][jphi] > 0.) {
10291  HBnegativedirectionRecosignalD4->Fill(jphi, ccc1);
10292  ccctest = 1.; //HBnegativedirectionRecosignalD4->SetBinError(i,0.01);
10293  }
10294  } // for jphi
10295  if (ccctest > 0.) {
10296  //cout<<"1717 kcountHBnegativedirectionRecosignalD4 = "<<kcountHBnegativedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
10297  c3x5->cd(kcountHBnegativedirectionRecosignalD4);
10298  HBnegativedirectionRecosignalD4->SetMarkerStyle(20);
10299  HBnegativedirectionRecosignalD4->SetMarkerSize(0.4);
10300  HBnegativedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
10301  HBnegativedirectionRecosignalD4->SetXTitle("HBnegativedirectionRecosignalD4 \b");
10302  HBnegativedirectionRecosignalD4->SetMarkerColor(2);
10303  HBnegativedirectionRecosignalD4->SetLineColor(0);
10304  gPad->SetGridy();
10305  gPad->SetGridx();
10306  // gPad->SetLogy();
10307  if (kcountHBnegativedirectionRecosignalD4 == 1)
10308  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
10309  if (kcountHBnegativedirectionRecosignalD4 == 2)
10310  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
10311  if (kcountHBnegativedirectionRecosignalD4 == 3)
10312  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
10313  if (kcountHBnegativedirectionRecosignalD4 == 4)
10314  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
10315  if (kcountHBnegativedirectionRecosignalD4 == 5)
10316  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
10317  if (kcountHBnegativedirectionRecosignalD4 == 6)
10318  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
10319  if (kcountHBnegativedirectionRecosignalD4 == 7)
10320  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
10321  if (kcountHBnegativedirectionRecosignalD4 == 8)
10322  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-9 ; depth = 4 \b");
10323  if (kcountHBnegativedirectionRecosignalD4 == 9)
10324  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-8 ; depth = 4 \b");
10325  if (kcountHBnegativedirectionRecosignalD4 == 10)
10326  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-7 ; depth = 4 \b");
10327  if (kcountHBnegativedirectionRecosignalD4 == 11)
10328  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-6 ; depth = 4 \b");
10329  if (kcountHBnegativedirectionRecosignalD4 == 12)
10330  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-5 ; depth = 4 \b");
10331  if (kcountHBnegativedirectionRecosignalD4 == 13)
10332  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-4 ; depth = 4 \b");
10333  if (kcountHBnegativedirectionRecosignalD4 == 14)
10334  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-3 ; depth = 4 \b");
10335  if (kcountHBnegativedirectionRecosignalD4 == 15)
10336  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-2 ; depth = 4 \b");
10337  if (kcountHBnegativedirectionRecosignalD4 == 16)
10338  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-1 ; depth = 4 \b");
10339  HBnegativedirectionRecosignalD4->Draw("Error");
10340  kcountHBnegativedirectionRecosignalD4++;
10341  if (kcountHBnegativedirectionRecosignalD4 > 16)
10342  break; // 4x6 = 24
10343  } //ccctest>0
10344 
10345  } // for i
10346  } //if(jeta-41 < 0)
10347  } //for jeta
10349  c3x5->Update();
10350  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
10351  c3x5->Clear();
10352  // clean-up
10353  if (h2CeffHBnegativedirectionRecosignalD4)
10354  delete h2CeffHBnegativedirectionRecosignalD4;
10355 
10356  //===================================================================== END of Recosignal HB for phi-symmetry
10357  //===================================================================== END of Recosignal HB for phi-symmetry
10358  //===================================================================== END of Recosignal HB for phi-symmetry
10359 
10363  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
10364  //ndepth = k_max[3];
10365  ndepth = 7;
10366  // const int ndepth = 7;
10367  double arecosignalhe[ndepth][njeta][njphi];
10368  double recosignalvariancehe[ndepth][njeta][njphi];
10369  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HE
10370  TH2F *recSignalEnergy1HE1 = (TH2F *)hfile->Get("h_recSignalEnergy1_HE1");
10371  TH2F *recSignalEnergy0HE1 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE1");
10372  TH2F *recSignalEnergyHE1 = (TH2F *)recSignalEnergy1HE1->Clone("recSignalEnergyHE1");
10373  recSignalEnergyHE1->Divide(recSignalEnergy1HE1, recSignalEnergy0HE1, 1, 1, "B");
10374  TH2F *recSignalEnergy1HE2 = (TH2F *)hfile->Get("h_recSignalEnergy1_HE2");
10375  TH2F *recSignalEnergy0HE2 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE2");
10376  TH2F *recSignalEnergyHE2 = (TH2F *)recSignalEnergy1HE2->Clone("recSignalEnergyHE2");
10377  recSignalEnergyHE2->Divide(recSignalEnergy1HE2, recSignalEnergy0HE2, 1, 1, "B");
10378  TH2F *recSignalEnergy1HE3 = (TH2F *)hfile->Get("h_recSignalEnergy1_HE3");
10379  TH2F *recSignalEnergy0HE3 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE3");
10380  TH2F *recSignalEnergyHE3 = (TH2F *)recSignalEnergy1HE3->Clone("recSignalEnergyHE3");
10381  recSignalEnergyHE3->Divide(recSignalEnergy1HE3, recSignalEnergy0HE3, 1, 1, "B");
10382  TH2F *recSignalEnergy1HE4 = (TH2F *)hfile->Get("h_recSignalEnergy1_HE4");
10383  TH2F *recSignalEnergy0HE4 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE4");
10384  TH2F *recSignalEnergyHE4 = (TH2F *)recSignalEnergy1HE4->Clone("recSignalEnergyHE4");
10385  recSignalEnergyHE4->Divide(recSignalEnergy1HE4, recSignalEnergy0HE4, 1, 1, "B");
10386  TH2F *recSignalEnergy1HE5 = (TH2F *)hfile->Get("h_recSignalEnergy1_HE5");
10387  TH2F *recSignalEnergy0HE5 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE5");
10388  TH2F *recSignalEnergyHE5 = (TH2F *)recSignalEnergy1HE5->Clone("recSignalEnergyHE5");
10389  recSignalEnergyHE5->Divide(recSignalEnergy1HE5, recSignalEnergy0HE5, 1, 1, "B");
10390  TH2F *recSignalEnergy1HE6 = (TH2F *)hfile->Get("h_recSignalEnergy1_HE6");
10391  TH2F *recSignalEnergy0HE6 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE6");
10392  TH2F *recSignalEnergyHE6 = (TH2F *)recSignalEnergy1HE6->Clone("recSignalEnergyHE6");
10393  recSignalEnergyHE6->Divide(recSignalEnergy1HE6, recSignalEnergy0HE6, 1, 1, "B");
10394  TH2F *recSignalEnergy1HE7 = (TH2F *)hfile->Get("h_recSignalEnergy1_HE7");
10395  TH2F *recSignalEnergy0HE7 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE7");
10396  TH2F *recSignalEnergyHE7 = (TH2F *)recSignalEnergy1HE7->Clone("recSignalEnergyHE7");
10397  recSignalEnergyHE7->Divide(recSignalEnergy1HE7, recSignalEnergy0HE7, 1, 1, "B");
10398  for (int jeta = 0; jeta < njeta; jeta++) {
10399  //====================================================================== PHI normalization & put R into massive arecosignalhe
10400  //preparation for PHI normalization:
10401  double sumrecosignalHE0 = 0;
10402  int nsumrecosignalHE0 = 0;
10403  double sumrecosignalHE1 = 0;
10404  int nsumrecosignalHE1 = 0;
10405  double sumrecosignalHE2 = 0;
10406  int nsumrecosignalHE2 = 0;
10407  double sumrecosignalHE3 = 0;
10408  int nsumrecosignalHE3 = 0;
10409  double sumrecosignalHE4 = 0;
10410  int nsumrecosignalHE4 = 0;
10411  double sumrecosignalHE5 = 0;
10412  int nsumrecosignalHE5 = 0;
10413  double sumrecosignalHE6 = 0;
10414  int nsumrecosignalHE6 = 0;
10415  for (int jphi = 0; jphi < njphi; jphi++) {
10416  arecosignalhe[0][jeta][jphi] = recSignalEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
10417  arecosignalhe[1][jeta][jphi] = recSignalEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
10418  arecosignalhe[2][jeta][jphi] = recSignalEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
10419  arecosignalhe[3][jeta][jphi] = recSignalEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
10420  arecosignalhe[4][jeta][jphi] = recSignalEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
10421  arecosignalhe[5][jeta][jphi] = recSignalEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
10422  arecosignalhe[6][jeta][jphi] = recSignalEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
10423  if (arecosignalhe[0][jeta][jphi] > 0.) {
10424  sumrecosignalHE0 += arecosignalhe[0][jeta][jphi];
10425  ++nsumrecosignalHE0;
10426  }
10427  if (arecosignalhe[1][jeta][jphi] > 0.) {
10428  sumrecosignalHE1 += arecosignalhe[1][jeta][jphi];
10429  ++nsumrecosignalHE1;
10430  }
10431  if (arecosignalhe[2][jeta][jphi] > 0.) {
10432  sumrecosignalHE2 += arecosignalhe[2][jeta][jphi];
10433  ++nsumrecosignalHE2;
10434  }
10435  if (arecosignalhe[3][jeta][jphi] > 0.) {
10436  sumrecosignalHE3 += arecosignalhe[3][jeta][jphi];
10437  ++nsumrecosignalHE3;
10438  }
10439  if (arecosignalhe[4][jeta][jphi] > 0.) {
10440  sumrecosignalHE4 += arecosignalhe[4][jeta][jphi];
10441  ++nsumrecosignalHE4;
10442  }
10443  if (arecosignalhe[5][jeta][jphi] > 0.) {
10444  sumrecosignalHE5 += arecosignalhe[5][jeta][jphi];
10445  ++nsumrecosignalHE5;
10446  }
10447  if (arecosignalhe[6][jeta][jphi] > 0.) {
10448  sumrecosignalHE6 += arecosignalhe[6][jeta][jphi];
10449  ++nsumrecosignalHE6;
10450  }
10451  } // phi
10452  // PHI normalization:
10453  for (int jphi = 0; jphi < njphi; jphi++) {
10454  if (arecosignalhe[0][jeta][jphi] > 0.)
10455  arecosignalhe[0][jeta][jphi] /= (sumrecosignalHE0 / nsumrecosignalHE0);
10456  if (arecosignalhe[1][jeta][jphi] > 0.)
10457  arecosignalhe[1][jeta][jphi] /= (sumrecosignalHE1 / nsumrecosignalHE1);
10458  if (arecosignalhe[2][jeta][jphi] > 0.)
10459  arecosignalhe[2][jeta][jphi] /= (sumrecosignalHE2 / nsumrecosignalHE2);
10460  if (arecosignalhe[3][jeta][jphi] > 0.)
10461  arecosignalhe[3][jeta][jphi] /= (sumrecosignalHE3 / nsumrecosignalHE3);
10462  if (arecosignalhe[4][jeta][jphi] > 0.)
10463  arecosignalhe[4][jeta][jphi] /= (sumrecosignalHE4 / nsumrecosignalHE4);
10464  if (arecosignalhe[5][jeta][jphi] > 0.)
10465  arecosignalhe[5][jeta][jphi] /= (sumrecosignalHE5 / nsumrecosignalHE5);
10466  if (arecosignalhe[6][jeta][jphi] > 0.)
10467  arecosignalhe[6][jeta][jphi] /= (sumrecosignalHE6 / nsumrecosignalHE6);
10468  } // phi
10469  } //eta
10470  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
10471  //======================================================================
10472  //======================================================================
10473  //cout<<" R2D-eta/phi-plot: R, averaged over depthes *****" <<endl;
10474  c2x1->Clear();
10476  c2x1->Divide(2, 1);
10477  c2x1->cd(1);
10478  TH2F *GefzRrecosignalHE42D = new TH2F("GefzRrecosignalHE42D", "", neta, -41., 41., nphi, 0., 72.);
10479  TH2F *GefzRrecosignalHE42D0 = new TH2F("GefzRrecosignalHE42D0", "", neta, -41., 41., nphi, 0., 72.);
10480  TH2F *GefzRrecosignalHE42DF = (TH2F *)GefzRrecosignalHE42D0->Clone("GefzRrecosignalHE42DF");
10481  for (int i = 0; i < ndepth; i++) {
10482  for (int jeta = 0; jeta < neta; jeta++) {
10483  for (int jphi = 0; jphi < nphi; jphi++) {
10484  double ccc1 = arecosignalhe[i][jeta][jphi];
10485  int k2plot = jeta - 41;
10486  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
10487  if (ccc1 != 0.) {
10488  GefzRrecosignalHE42D->Fill(kkk, jphi, ccc1);
10489  GefzRrecosignalHE42D0->Fill(kkk, jphi, 1.);
10490  }
10491  }
10492  }
10493  }
10494  GefzRrecosignalHE42DF->Divide(GefzRrecosignalHE42D, GefzRrecosignalHE42D0, 1, 1, "B"); // average A
10495  gPad->SetGridy();
10496  gPad->SetGridx(); // gPad->SetLogz();
10497  GefzRrecosignalHE42DF->SetXTitle("<R>_depth #eta \b");
10498  GefzRrecosignalHE42DF->SetYTitle(" #phi \b");
10499  GefzRrecosignalHE42DF->Draw("COLZ");
10500 
10501  c2x1->cd(2);
10502  TH1F *energyhitSignal_HE = (TH1F *)hfile->Get("h_energyhitSignal_HE");
10503  energyhitSignal_HE->SetMarkerStyle(20);
10504  energyhitSignal_HE->SetMarkerSize(0.4);
10505  energyhitSignal_HE->GetYaxis()->SetLabelSize(0.04);
10506  energyhitSignal_HE->SetXTitle("energyhitSignal_HE \b");
10507  energyhitSignal_HE->SetMarkerColor(2);
10508  energyhitSignal_HE->SetLineColor(0);
10509  gPad->SetGridy();
10510  gPad->SetGridx();
10511  energyhitSignal_HE->Draw("Error");
10512 
10514  c2x1->Update();
10515  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHE.png");
10516  c2x1->Clear();
10517  // clean-up
10518  if (GefzRrecosignalHE42D)
10519  delete GefzRrecosignalHE42D;
10520  if (GefzRrecosignalHE42D0)
10521  delete GefzRrecosignalHE42D0;
10522  if (GefzRrecosignalHE42DF)
10523  delete GefzRrecosignalHE42DF;
10524  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
10525  //======================================================================
10526  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
10527  c1x1->Clear();
10529  c1x1->Divide(1, 1);
10530  c1x1->cd(1);
10531  TH1F *GefzRrecosignalHE41D = new TH1F("GefzRrecosignalHE41D", "", nphi, 0., 72.);
10532  TH1F *GefzRrecosignalHE41D0 = new TH1F("GefzRrecosignalHE41D0", "", nphi, 0., 72.);
10533  TH1F *GefzRrecosignalHE41DF = (TH1F *)GefzRrecosignalHE41D0->Clone("GefzRrecosignalHE41DF");
10534  for (int jphi = 0; jphi < nphi; jphi++) {
10535  for (int jeta = 0; jeta < neta; jeta++) {
10536  for (int i = 0; i < ndepth; i++) {
10537  double ccc1 = arecosignalhe[i][jeta][jphi];
10538  if (ccc1 != 0.) {
10539  GefzRrecosignalHE41D->Fill(jphi, ccc1);
10540  GefzRrecosignalHE41D0->Fill(jphi, 1.);
10541  }
10542  }
10543  }
10544  }
10545  GefzRrecosignalHE41DF->Divide(
10546  GefzRrecosignalHE41D, GefzRrecosignalHE41D0, 1, 1, "B"); // R averaged over depthes & eta
10547  GefzRrecosignalHE41D0->Sumw2();
10548  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHE41DF->SetBinError(jphi,0.01);}
10549  gPad->SetGridy();
10550  gPad->SetGridx(); // gPad->SetLogz();
10551  GefzRrecosignalHE41DF->SetMarkerStyle(20);
10552  GefzRrecosignalHE41DF->SetMarkerSize(1.4);
10553  GefzRrecosignalHE41DF->GetZaxis()->SetLabelSize(0.08);
10554  GefzRrecosignalHE41DF->SetXTitle("#phi \b");
10555  GefzRrecosignalHE41DF->SetYTitle(" <R> \b");
10556  GefzRrecosignalHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
10557  GefzRrecosignalHE41DF->SetMarkerColor(4);
10558  GefzRrecosignalHE41DF->SetLineColor(
10559  4); // GefzRrecosignalHE41DF->SetMinimum(0.8); // GefzRrecosignalHE41DF->SetMaximum(1.000);
10560  GefzRrecosignalHE41DF->Draw("Error");
10562  c1x1->Update();
10563  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHE.png");
10564  c1x1->Clear();
10565  // clean-up
10566  if (GefzRrecosignalHE41D)
10567  delete GefzRrecosignalHE41D;
10568  if (GefzRrecosignalHE41D0)
10569  delete GefzRrecosignalHE41D0;
10570  if (GefzRrecosignalHE41DF)
10571  delete GefzRrecosignalHE41DF;
10572 
10573  //========================================================================================== 4
10574  //======================================================================
10575  //======================================================================1D plot: R vs phi , different eta, depth=1
10576  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
10577  c3x5->Clear();
10579  c3x5->Divide(3, 5);
10580  c3x5->cd(1);
10581  int kcountHEpositivedirectionRecosignal1 = 1;
10582  TH1F *h2CeffHEpositivedirectionRecosignal1 = new TH1F("h2CeffHEpositivedirectionRecosignal1", "", nphi, 0., 72.);
10583  for (int jeta = 0; jeta < njeta; jeta++) {
10584  // positivedirectionRecosignal:
10585  if (jeta - 41 >= 0) {
10586  // for (int i=0;i<ndepth;i++) {
10587  // depth=1
10588  for (int i = 0; i < 1; i++) {
10589  TH1F *HEpositivedirectionRecosignal1 = (TH1F *)h2CeffHEpositivedirectionRecosignal1->Clone("twod1");
10590  float ccctest = 0; // to avoid empty massive elements
10591  for (int jphi = 0; jphi < nphi; jphi++) {
10592  double ccc1 = arecosignalhe[i][jeta][jphi];
10593  if (ccc1 != 0.) {
10594  HEpositivedirectionRecosignal1->Fill(jphi, ccc1);
10595  ccctest = 1.; //HEpositivedirectionRecosignal1->SetBinError(i,0.01);
10596  }
10597  } // for jphi
10598  if (ccctest > 0.) {
10599  // cout<<"444 kcountHEpositivedirectionRecosignal1 = "<<kcountHEpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
10600  c3x5->cd(kcountHEpositivedirectionRecosignal1);
10601  HEpositivedirectionRecosignal1->SetMarkerStyle(20);
10602  HEpositivedirectionRecosignal1->SetMarkerSize(0.4);
10603  HEpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
10604  HEpositivedirectionRecosignal1->SetXTitle("HEpositivedirectionRecosignal1 \b");
10605  HEpositivedirectionRecosignal1->SetMarkerColor(2);
10606  HEpositivedirectionRecosignal1->SetLineColor(0);
10607  gPad->SetGridy();
10608  gPad->SetGridx();
10609  // gPad->SetLogy();
10610  if (kcountHEpositivedirectionRecosignal1 == 1)
10611  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
10612  if (kcountHEpositivedirectionRecosignal1 == 2)
10613  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
10614  if (kcountHEpositivedirectionRecosignal1 == 3)
10615  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
10616  if (kcountHEpositivedirectionRecosignal1 == 4)
10617  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
10618  if (kcountHEpositivedirectionRecosignal1 == 5)
10619  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
10620  if (kcountHEpositivedirectionRecosignal1 == 6)
10621  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
10622  if (kcountHEpositivedirectionRecosignal1 == 7)
10623  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
10624  if (kcountHEpositivedirectionRecosignal1 == 8)
10625  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
10626  if (kcountHEpositivedirectionRecosignal1 == 9)
10627  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
10628  if (kcountHEpositivedirectionRecosignal1 == 10)
10629  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
10630  if (kcountHEpositivedirectionRecosignal1 == 11)
10631  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
10632  if (kcountHEpositivedirectionRecosignal1 == 12)
10633  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
10634  HEpositivedirectionRecosignal1->Draw("Error");
10635  kcountHEpositivedirectionRecosignal1++;
10636  if (kcountHEpositivedirectionRecosignal1 > 12)
10637  break; // 4x6 = 24
10638  } //ccctest>0
10639 
10640  } // for i
10641  } //if(jeta-41 >= 0)
10642  } //for jeta
10644  c3x5->Update();
10645  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
10646  c3x5->Clear();
10647  // clean-up
10648  if (h2CeffHEpositivedirectionRecosignal1)
10649  delete h2CeffHEpositivedirectionRecosignal1;
10650 
10651  //========================================================================================== 5
10652  //======================================================================
10653  //======================================================================1D plot: R vs phi , different eta, depth=2
10654  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
10655  c3x5->Clear();
10657  c3x5->Divide(3, 5);
10658  c3x5->cd(1);
10659  int kcountHEpositivedirectionRecosignal2 = 1;
10660  TH1F *h2CeffHEpositivedirectionRecosignal2 = new TH1F("h2CeffHEpositivedirectionRecosignal2", "", nphi, 0., 72.);
10661  for (int jeta = 0; jeta < njeta; jeta++) {
10662  // positivedirectionRecosignal:
10663  if (jeta - 41 >= 0) {
10664  // for (int i=0;i<ndepth;i++) {
10665  // depth=2
10666  for (int i = 1; i < 2; i++) {
10667  TH1F *HEpositivedirectionRecosignal2 = (TH1F *)h2CeffHEpositivedirectionRecosignal2->Clone("twod1");
10668  float ccctest = 0; // to avoid empty massive elements
10669  for (int jphi = 0; jphi < nphi; jphi++) {
10670  double ccc1 = arecosignalhe[i][jeta][jphi];
10671  if (ccc1 != 0.) {
10672  HEpositivedirectionRecosignal2->Fill(jphi, ccc1);
10673  ccctest = 1.; //HEpositivedirectionRecosignal2->SetBinError(i,0.01);
10674  }
10675  } // for jphi
10676  if (ccctest > 0.) {
10677  //cout<<"555 kcountHEpositivedirectionRecosignal2 = "<<kcountHEpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
10678  c3x5->cd(kcountHEpositivedirectionRecosignal2);
10679  HEpositivedirectionRecosignal2->SetMarkerStyle(20);
10680  HEpositivedirectionRecosignal2->SetMarkerSize(0.4);
10681  HEpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
10682  HEpositivedirectionRecosignal2->SetXTitle("HEpositivedirectionRecosignal2 \b");
10683  HEpositivedirectionRecosignal2->SetMarkerColor(2);
10684  HEpositivedirectionRecosignal2->SetLineColor(0);
10685  gPad->SetGridy();
10686  gPad->SetGridx();
10687  // gPad->SetLogy();
10688  if (kcountHEpositivedirectionRecosignal2 == 1)
10689  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
10690  if (kcountHEpositivedirectionRecosignal2 == 2)
10691  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
10692  if (kcountHEpositivedirectionRecosignal2 == 3)
10693  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
10694  if (kcountHEpositivedirectionRecosignal2 == 4)
10695  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
10696  if (kcountHEpositivedirectionRecosignal2 == 5)
10697  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
10698  if (kcountHEpositivedirectionRecosignal2 == 6)
10699  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
10700  if (kcountHEpositivedirectionRecosignal2 == 7)
10701  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
10702  if (kcountHEpositivedirectionRecosignal2 == 8)
10703  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
10704  if (kcountHEpositivedirectionRecosignal2 == 9)
10705  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
10706  if (kcountHEpositivedirectionRecosignal2 == 10)
10707  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
10708  if (kcountHEpositivedirectionRecosignal2 == 11)
10709  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
10710  if (kcountHEpositivedirectionRecosignal2 == 12)
10711  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
10712  if (kcountHEpositivedirectionRecosignal2 == 13)
10713  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
10714  HEpositivedirectionRecosignal2->Draw("Error");
10715  kcountHEpositivedirectionRecosignal2++;
10716  if (kcountHEpositivedirectionRecosignal2 > 13)
10717  break; // 4x6 = 24
10718  } //ccctest>0
10719 
10720  } // for i
10721  } //if(jeta-41 >= 0)
10722  } //for jeta
10724  c3x5->Update();
10725  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
10726  c3x5->Clear();
10727  // clean-up
10728  if (h2CeffHEpositivedirectionRecosignal2)
10729  delete h2CeffHEpositivedirectionRecosignal2;
10730  //========================================================================================== 6
10731  //======================================================================
10732  //======================================================================1D plot: R vs phi , different eta, depth=3
10733  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
10734  c3x5->Clear();
10736  c3x5->Divide(3, 5);
10737  c3x5->cd(1);
10738  int kcountHEpositivedirectionRecosignal3 = 1;
10739  TH1F *h2CeffHEpositivedirectionRecosignal3 = new TH1F("h2CeffHEpositivedirectionRecosignal3", "", nphi, 0., 72.);
10740  for (int jeta = 0; jeta < njeta; jeta++) {
10741  // positivedirectionRecosignal:
10742  if (jeta - 41 >= 0) {
10743  // for (int i=0;i<ndepth;i++) {
10744  // depth=3
10745  for (int i = 2; i < 3; i++) {
10746  TH1F *HEpositivedirectionRecosignal3 = (TH1F *)h2CeffHEpositivedirectionRecosignal3->Clone("twod1");
10747  float ccctest = 0; // to avoid empty massive elements
10748  for (int jphi = 0; jphi < nphi; jphi++) {
10749  double ccc1 = arecosignalhe[i][jeta][jphi];
10750  if (ccc1 != 0.) {
10751  HEpositivedirectionRecosignal3->Fill(jphi, ccc1);
10752  ccctest = 1.; //HEpositivedirectionRecosignal3->SetBinError(i,0.01);
10753  }
10754  } // for jphi
10755  if (ccctest > 0.) {
10756  //cout<<"666 kcountHEpositivedirectionRecosignal3 = "<<kcountHEpositivedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
10757  c3x5->cd(kcountHEpositivedirectionRecosignal3);
10758  HEpositivedirectionRecosignal3->SetMarkerStyle(20);
10759  HEpositivedirectionRecosignal3->SetMarkerSize(0.4);
10760  HEpositivedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
10761  HEpositivedirectionRecosignal3->SetXTitle("HEpositivedirectionRecosignal3 \b");
10762  HEpositivedirectionRecosignal3->SetMarkerColor(2);
10763  HEpositivedirectionRecosignal3->SetLineColor(0);
10764  gPad->SetGridy();
10765  gPad->SetGridx();
10766  // gPad->SetLogy();
10767  if (kcountHEpositivedirectionRecosignal3 == 1)
10768  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
10769  if (kcountHEpositivedirectionRecosignal3 == 2)
10770  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
10771  if (kcountHEpositivedirectionRecosignal3 == 3)
10772  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
10773  if (kcountHEpositivedirectionRecosignal3 == 4)
10774  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
10775  if (kcountHEpositivedirectionRecosignal3 == 5)
10776  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
10777  if (kcountHEpositivedirectionRecosignal3 == 6)
10778  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
10779  if (kcountHEpositivedirectionRecosignal3 == 7)
10780  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
10781  if (kcountHEpositivedirectionRecosignal3 == 8)
10782  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
10783  if (kcountHEpositivedirectionRecosignal3 == 9)
10784  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
10785  if (kcountHEpositivedirectionRecosignal3 == 10)
10786  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
10787  if (kcountHEpositivedirectionRecosignal3 == 11)
10788  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
10789  if (kcountHEpositivedirectionRecosignal3 == 12)
10790  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
10791  if (kcountHEpositivedirectionRecosignal3 == 13)
10792  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
10793  HEpositivedirectionRecosignal3->Draw("Error");
10794  kcountHEpositivedirectionRecosignal3++;
10795  if (kcountHEpositivedirectionRecosignal3 > 13)
10796  break; // 4x6 = 24
10797  } //ccctest>0
10798 
10799  } // for i
10800  } //if(jeta-41 >= 0)
10801  } //for jeta
10803  c3x5->Update();
10804  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
10805  c3x5->Clear();
10806  // clean-up
10807  if (h2CeffHEpositivedirectionRecosignal3)
10808  delete h2CeffHEpositivedirectionRecosignal3;
10809  //========================================================================================== 7
10810  //======================================================================
10811  //======================================================================1D plot: R vs phi , different eta, depth=4
10812  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
10813  c3x5->Clear();
10815  c3x5->Divide(3, 5);
10816  c3x5->cd(1);
10817  int kcountHEpositivedirectionRecosignal4 = 1;
10818  TH1F *h2CeffHEpositivedirectionRecosignal4 = new TH1F("h2CeffHEpositivedirectionRecosignal4", "", nphi, 0., 72.);
10819 
10820  for (int jeta = 0; jeta < njeta; jeta++) {
10821  // positivedirectionRecosignal:
10822  if (jeta - 41 >= 0) {
10823  // for (int i=0;i<ndepth;i++) {
10824  // depth=4
10825  for (int i = 3; i < 4; i++) {
10826  TH1F *HEpositivedirectionRecosignal4 = (TH1F *)h2CeffHEpositivedirectionRecosignal4->Clone("twod1");
10827 
10828  float ccctest = 0; // to avoid empty massive elements
10829  for (int jphi = 0; jphi < nphi; jphi++) {
10830  double ccc1 = arecosignalhe[i][jeta][jphi];
10831  if (ccc1 != 0.) {
10832  HEpositivedirectionRecosignal4->Fill(jphi, ccc1);
10833  ccctest = 1.; //HEpositivedirectionRecosignal4->SetBinError(i,0.01);
10834  }
10835  } // for jphi
10836  if (ccctest > 0.) {
10837  //cout<<"777 kcountHEpositivedirectionRecosignal4 = "<<kcountHEpositivedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
10838  c3x5->cd(kcountHEpositivedirectionRecosignal4);
10839  HEpositivedirectionRecosignal4->SetMarkerStyle(20);
10840  HEpositivedirectionRecosignal4->SetMarkerSize(0.4);
10841  HEpositivedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
10842  HEpositivedirectionRecosignal4->SetXTitle("HEpositivedirectionRecosignal4 \b");
10843  HEpositivedirectionRecosignal4->SetMarkerColor(2);
10844  HEpositivedirectionRecosignal4->SetLineColor(0);
10845  gPad->SetGridy();
10846  gPad->SetGridx();
10847  // gPad->SetLogy();
10848  if (kcountHEpositivedirectionRecosignal4 == 1)
10849  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
10850  if (kcountHEpositivedirectionRecosignal4 == 2)
10851  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
10852  if (kcountHEpositivedirectionRecosignal4 == 3)
10853  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
10854  if (kcountHEpositivedirectionRecosignal4 == 4)
10855  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
10856  if (kcountHEpositivedirectionRecosignal4 == 5)
10857  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
10858  if (kcountHEpositivedirectionRecosignal4 == 6)
10859  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
10860  if (kcountHEpositivedirectionRecosignal4 == 7)
10861  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
10862  if (kcountHEpositivedirectionRecosignal4 == 8)
10863  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
10864  if (kcountHEpositivedirectionRecosignal4 == 9)
10865  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
10866  if (kcountHEpositivedirectionRecosignal4 == 10)
10867  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
10868  if (kcountHEpositivedirectionRecosignal4 == 11)
10869  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
10870  if (kcountHEpositivedirectionRecosignal4 == 12)
10871  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
10872  HEpositivedirectionRecosignal4->Draw("Error");
10873  kcountHEpositivedirectionRecosignal4++;
10874  if (kcountHEpositivedirectionRecosignal4 > 12)
10875  break; // 4x6 = 24
10876  } //ccctest>0
10877 
10878  } // for i
10879  } //if(jeta-41 >= 0)
10880  } //for jeta
10882  c3x5->Update();
10883  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
10884  c3x5->Clear();
10885  // clean-up
10886  if (h2CeffHEpositivedirectionRecosignal4)
10887  delete h2CeffHEpositivedirectionRecosignal4;
10888  //========================================================================================== 8
10889  //======================================================================
10890  //======================================================================1D plot: R vs phi , different eta, depth=5
10891  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
10892  c3x5->Clear();
10894  c3x5->Divide(3, 5);
10895  c3x5->cd(1);
10896  int kcountHEpositivedirectionRecosignal5 = 1;
10897  TH1F *h2CeffHEpositivedirectionRecosignal5 = new TH1F("h2CeffHEpositivedirectionRecosignal5", "", nphi, 0., 72.);
10898 
10899  for (int jeta = 0; jeta < njeta; jeta++) {
10900  // positivedirectionRecosignal:
10901  if (jeta - 41 >= 0) {
10902  // for (int i=0;i<ndepth;i++) {
10903  // depth=5
10904  for (int i = 4; i < 5; i++) {
10905  TH1F *HEpositivedirectionRecosignal5 = (TH1F *)h2CeffHEpositivedirectionRecosignal5->Clone("twod1");
10906 
10907  float ccctest = 0; // to avoid empty massive elements
10908  for (int jphi = 0; jphi < nphi; jphi++) {
10909  // cout<<"888 initial kcountHEpositivedirectionRecosignal5 = "<<kcountHEpositivedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" arecosignalhe[i][jeta][jphi]= "<< arecosignalhe[i][jeta][jphi] <<" depth= "<< i <<endl;
10910 
10911  double ccc1 = arecosignalhe[i][jeta][jphi];
10912  if (ccc1 != 0.) {
10913  HEpositivedirectionRecosignal5->Fill(jphi, ccc1);
10914  ccctest = 1.; //HEpositivedirectionRecosignal5->SetBinError(i,0.01);
10915  }
10916  } // for jphi
10917  if (ccctest > 0.) {
10918  //cout<<"888 kcountHEpositivedirectionRecosignal5 = "<<kcountHEpositivedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<endl;
10919  c3x5->cd(kcountHEpositivedirectionRecosignal5);
10920  HEpositivedirectionRecosignal5->SetMarkerStyle(20);
10921  HEpositivedirectionRecosignal5->SetMarkerSize(0.4);
10922  HEpositivedirectionRecosignal5->GetYaxis()->SetLabelSize(0.04);
10923  HEpositivedirectionRecosignal5->SetXTitle("HEpositivedirectionRecosignal5 \b");
10924  HEpositivedirectionRecosignal5->SetMarkerColor(2);
10925  HEpositivedirectionRecosignal5->SetLineColor(0);
10926  gPad->SetGridy();
10927  gPad->SetGridx();
10928  // gPad->SetLogy();
10929  if (kcountHEpositivedirectionRecosignal5 == 1)
10930  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
10931  if (kcountHEpositivedirectionRecosignal5 == 2)
10932  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
10933  if (kcountHEpositivedirectionRecosignal5 == 3)
10934  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
10935  if (kcountHEpositivedirectionRecosignal5 == 4)
10936  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
10937  if (kcountHEpositivedirectionRecosignal5 == 5)
10938  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
10939  if (kcountHEpositivedirectionRecosignal5 == 6)
10940  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
10941  if (kcountHEpositivedirectionRecosignal5 == 7)
10942  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
10943  if (kcountHEpositivedirectionRecosignal5 == 8)
10944  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
10945  if (kcountHEpositivedirectionRecosignal5 == 9)
10946  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
10947  if (kcountHEpositivedirectionRecosignal5 == 10)
10948  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
10949  if (kcountHEpositivedirectionRecosignal5 == 11)
10950  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
10951  HEpositivedirectionRecosignal5->Draw("Error");
10952  kcountHEpositivedirectionRecosignal5++;
10953  if (kcountHEpositivedirectionRecosignal5 > 11)
10954  break; // 4x6 = 24
10955  } //ccctest>0
10956 
10957  } // for i
10958  } //if(jeta-41 >= 0)
10959  } //for jeta
10961  c3x5->Update();
10962  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
10963  c3x5->Clear();
10964  // clean-up
10965  if (h2CeffHEpositivedirectionRecosignal5)
10966  delete h2CeffHEpositivedirectionRecosignal5;
10967  //========================================================================================== 9
10968  //======================================================================
10969  //======================================================================1D plot: R vs phi , different eta, depth=6
10970  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
10971  c3x5->Clear();
10973  c3x5->Divide(3, 5);
10974  c3x5->cd(1);
10975  int kcountHEpositivedirectionRecosignal6 = 1;
10976  TH1F *h2CeffHEpositivedirectionRecosignal6 = new TH1F("h2CeffHEpositivedirectionRecosignal6", "", nphi, 0., 72.);
10977 
10978  for (int jeta = 0; jeta < njeta; jeta++) {
10979  // positivedirectionRecosignal:
10980  if (jeta - 41 >= 0) {
10981  // for (int i=0;i<ndepth;i++) {
10982  // depth=6
10983  for (int i = 5; i < 6; i++) {
10984  TH1F *HEpositivedirectionRecosignal6 = (TH1F *)h2CeffHEpositivedirectionRecosignal6->Clone("twod1");
10985 
10986  float ccctest = 0; // to avoid empty massive elements
10987  for (int jphi = 0; jphi < nphi; jphi++) {
10988  double ccc1 = arecosignalhe[i][jeta][jphi];
10989  if (ccc1 != 0.) {
10990  HEpositivedirectionRecosignal6->Fill(jphi, ccc1);
10991  ccctest = 1.; //HEpositivedirectionRecosignal6->SetBinError(i,0.01);
10992  }
10993  } // for jphi
10994  if (ccctest > 0.) {
10995  //cout<<"999 kcountHEpositivedirectionRecosignal6 = "<<kcountHEpositivedirectionRecosignal6 <<" jeta-41= "<< jeta-41 <<endl;
10996  c3x5->cd(kcountHEpositivedirectionRecosignal6);
10997  HEpositivedirectionRecosignal6->SetMarkerStyle(20);
10998  HEpositivedirectionRecosignal6->SetMarkerSize(0.4);
10999  HEpositivedirectionRecosignal6->GetYaxis()->SetLabelSize(0.04);
11000  HEpositivedirectionRecosignal6->SetXTitle("HEpositivedirectionRecosignal6 \b");
11001  HEpositivedirectionRecosignal6->SetMarkerColor(2);
11002  HEpositivedirectionRecosignal6->SetLineColor(0);
11003  gPad->SetGridy();
11004  gPad->SetGridx();
11005  // gPad->SetLogy();
11006  if (kcountHEpositivedirectionRecosignal6 == 1)
11007  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
11008  if (kcountHEpositivedirectionRecosignal6 == 2)
11009  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
11010  if (kcountHEpositivedirectionRecosignal6 == 3)
11011  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
11012  if (kcountHEpositivedirectionRecosignal6 == 4)
11013  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
11014  if (kcountHEpositivedirectionRecosignal6 == 5)
11015  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
11016  if (kcountHEpositivedirectionRecosignal6 == 6)
11017  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
11018  if (kcountHEpositivedirectionRecosignal6 == 7)
11019  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
11020  if (kcountHEpositivedirectionRecosignal6 == 8)
11021  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
11022  if (kcountHEpositivedirectionRecosignal6 == 9)
11023  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
11024  if (kcountHEpositivedirectionRecosignal6 == 10)
11025  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
11026  HEpositivedirectionRecosignal6->Draw("Error");
11027  kcountHEpositivedirectionRecosignal6++;
11028  if (kcountHEpositivedirectionRecosignal6 > 10)
11029  break; // 4x6 = 24
11030  } //ccctest>0
11031 
11032  } // for i
11033  } //if(jeta-41 >= 0)
11034  } //for jeta
11036  c3x5->Update();
11037  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
11038  c3x5->Clear();
11039  // clean-up
11040  if (h2CeffHEpositivedirectionRecosignal6)
11041  delete h2CeffHEpositivedirectionRecosignal6;
11042  //========================================================================================== 10
11043  //======================================================================
11044  //======================================================================1D plot: R vs phi , different eta, depth=7
11045  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
11046  c3x5->Clear();
11048  c3x5->Divide(3, 5);
11049  c3x5->cd(1);
11050  int kcountHEpositivedirectionRecosignal7 = 1;
11051  TH1F *h2CeffHEpositivedirectionRecosignal7 = new TH1F("h2CeffHEpositivedirectionRecosignal7", "", nphi, 0., 72.);
11052 
11053  for (int jeta = 0; jeta < njeta; jeta++) {
11054  // positivedirectionRecosignal:
11055  if (jeta - 41 >= 0) {
11056  // for (int i=0;i<ndepth;i++) {
11057  // depth=7
11058  for (int i = 6; i < 7; i++) {
11059  TH1F *HEpositivedirectionRecosignal7 = (TH1F *)h2CeffHEpositivedirectionRecosignal7->Clone("twod1");
11060 
11061  float ccctest = 0; // to avoid empty massive elements
11062  for (int jphi = 0; jphi < nphi; jphi++) {
11063  double ccc1 = arecosignalhe[i][jeta][jphi];
11064  if (ccc1 != 0.) {
11065  HEpositivedirectionRecosignal7->Fill(jphi, ccc1);
11066  ccctest = 1.; //HEpositivedirectionRecosignal7->SetBinError(i,0.01);
11067  }
11068  } // for jphi
11069  if (ccctest > 0.) {
11070  //cout<<"1010 kcountHEpositivedirectionRecosignal7 = "<<kcountHEpositivedirectionRecosignal7 <<" jeta-41= "<< jeta-41 <<endl;
11071  c3x5->cd(kcountHEpositivedirectionRecosignal7);
11072  HEpositivedirectionRecosignal7->SetMarkerStyle(20);
11073  HEpositivedirectionRecosignal7->SetMarkerSize(0.4);
11074  HEpositivedirectionRecosignal7->GetYaxis()->SetLabelSize(0.04);
11075  HEpositivedirectionRecosignal7->SetXTitle("HEpositivedirectionRecosignal7 \b");
11076  HEpositivedirectionRecosignal7->SetMarkerColor(2);
11077  HEpositivedirectionRecosignal7->SetLineColor(0);
11078  gPad->SetGridy();
11079  gPad->SetGridx();
11080  // gPad->SetLogy();
11081  if (kcountHEpositivedirectionRecosignal7 == 1)
11082  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
11083  if (kcountHEpositivedirectionRecosignal7 == 2)
11084  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
11085  if (kcountHEpositivedirectionRecosignal7 == 3)
11086  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
11087  HEpositivedirectionRecosignal7->Draw("Error");
11088  kcountHEpositivedirectionRecosignal7++;
11089  if (kcountHEpositivedirectionRecosignal7 > 3)
11090  break; //
11091  } //ccctest>0
11092 
11093  } // for i
11094  } //if(jeta-41 >= 0)
11095  } //for jeta
11097  c3x5->Update();
11098  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
11099  c3x5->Clear();
11100  // clean-up
11101  if (h2CeffHEpositivedirectionRecosignal7)
11102  delete h2CeffHEpositivedirectionRecosignal7;
11103 
11105  //========================================================================================== 1114
11106  //======================================================================
11107  //======================================================================1D plot: R vs phi , different eta, depth=1
11108  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
11109  c3x5->Clear();
11111  c3x5->Divide(3, 5);
11112  c3x5->cd(1);
11113  int kcountHEnegativedirectionRecosignal1 = 1;
11114  TH1F *h2CeffHEnegativedirectionRecosignal1 = new TH1F("h2CeffHEnegativedirectionRecosignal1", "", nphi, 0., 72.);
11115  for (int jeta = 0; jeta < njeta; jeta++) {
11116  // negativedirectionRecosignal:
11117  if (jeta - 41 < 0) {
11118  // for (int i=0;i<ndepth;i++) {
11119  // depth=1
11120  for (int i = 0; i < 1; i++) {
11121  TH1F *HEnegativedirectionRecosignal1 = (TH1F *)h2CeffHEnegativedirectionRecosignal1->Clone("twod1");
11122  float ccctest = 0; // to avoid empty massive elements
11123  for (int jphi = 0; jphi < nphi; jphi++) {
11124  double ccc1 = arecosignalhe[i][jeta][jphi];
11125  if (ccc1 != 0.) {
11126  HEnegativedirectionRecosignal1->Fill(jphi, ccc1);
11127  ccctest = 1.; //HEnegativedirectionRecosignal1->SetBinError(i,0.01);
11128  }
11129  } // for jphi
11130  if (ccctest > 0.) {
11131  // cout<<"444 kcountHEnegativedirectionRecosignal1 = "<<kcountHEnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
11132  c3x5->cd(kcountHEnegativedirectionRecosignal1);
11133  HEnegativedirectionRecosignal1->SetMarkerStyle(20);
11134  HEnegativedirectionRecosignal1->SetMarkerSize(0.4);
11135  HEnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
11136  HEnegativedirectionRecosignal1->SetXTitle("HEnegativedirectionRecosignal1 \b");
11137  HEnegativedirectionRecosignal1->SetMarkerColor(2);
11138  HEnegativedirectionRecosignal1->SetLineColor(0);
11139  gPad->SetGridy();
11140  gPad->SetGridx();
11141  // gPad->SetLogy();
11142  if (kcountHEnegativedirectionRecosignal1 == 1)
11143  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
11144  if (kcountHEnegativedirectionRecosignal1 == 2)
11145  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
11146  if (kcountHEnegativedirectionRecosignal1 == 3)
11147  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
11148  if (kcountHEnegativedirectionRecosignal1 == 4)
11149  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
11150  if (kcountHEnegativedirectionRecosignal1 == 5)
11151  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
11152  if (kcountHEnegativedirectionRecosignal1 == 6)
11153  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
11154  if (kcountHEnegativedirectionRecosignal1 == 7)
11155  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
11156  if (kcountHEnegativedirectionRecosignal1 == 8)
11157  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
11158  if (kcountHEnegativedirectionRecosignal1 == 9)
11159  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
11160  if (kcountHEnegativedirectionRecosignal1 == 10)
11161  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
11162  if (kcountHEnegativedirectionRecosignal1 == 11)
11163  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
11164  if (kcountHEnegativedirectionRecosignal1 == 12)
11165  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
11166  HEnegativedirectionRecosignal1->Draw("Error");
11167  kcountHEnegativedirectionRecosignal1++;
11168  if (kcountHEnegativedirectionRecosignal1 > 12)
11169  break; // 4x6 = 24
11170  } //ccctest>0
11171 
11172  } // for i
11173  } //if(jeta-41 < 0)
11174  } //for jeta
11176  c3x5->Update();
11177  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
11178  c3x5->Clear();
11179  // clean-up
11180  if (h2CeffHEnegativedirectionRecosignal1)
11181  delete h2CeffHEnegativedirectionRecosignal1;
11182 
11183  //========================================================================================== 1115
11184  //======================================================================
11185  //======================================================================1D plot: R vs phi , different eta, depth=2
11186  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
11187  c3x5->Clear();
11189  c3x5->Divide(3, 5);
11190  c3x5->cd(1);
11191  int kcountHEnegativedirectionRecosignal2 = 1;
11192  TH1F *h2CeffHEnegativedirectionRecosignal2 = new TH1F("h2CeffHEnegativedirectionRecosignal2", "", nphi, 0., 72.);
11193  for (int jeta = 0; jeta < njeta; jeta++) {
11194  // negativedirectionRecosignal:
11195  if (jeta - 41 < 0) {
11196  // for (int i=0;i<ndepth;i++) {
11197  // depth=2
11198  for (int i = 1; i < 2; i++) {
11199  TH1F *HEnegativedirectionRecosignal2 = (TH1F *)h2CeffHEnegativedirectionRecosignal2->Clone("twod1");
11200  float ccctest = 0; // to avoid empty massive elements
11201  for (int jphi = 0; jphi < nphi; jphi++) {
11202  double ccc1 = arecosignalhe[i][jeta][jphi];
11203  if (ccc1 != 0.) {
11204  HEnegativedirectionRecosignal2->Fill(jphi, ccc1);
11205  ccctest = 1.; //HEnegativedirectionRecosignal2->SetBinError(i,0.01);
11206  }
11207  } // for jphi
11208  if (ccctest > 0.) {
11209  //cout<<"555 kcountHEnegativedirectionRecosignal2 = "<<kcountHEnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
11210  c3x5->cd(kcountHEnegativedirectionRecosignal2);
11211  HEnegativedirectionRecosignal2->SetMarkerStyle(20);
11212  HEnegativedirectionRecosignal2->SetMarkerSize(0.4);
11213  HEnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
11214  HEnegativedirectionRecosignal2->SetXTitle("HEnegativedirectionRecosignal2 \b");
11215  HEnegativedirectionRecosignal2->SetMarkerColor(2);
11216  HEnegativedirectionRecosignal2->SetLineColor(0);
11217  gPad->SetGridy();
11218  gPad->SetGridx();
11219  // gPad->SetLogy();
11220  if (kcountHEnegativedirectionRecosignal2 == 1)
11221  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
11222  if (kcountHEnegativedirectionRecosignal2 == 2)
11223  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
11224  if (kcountHEnegativedirectionRecosignal2 == 3)
11225  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
11226  if (kcountHEnegativedirectionRecosignal2 == 4)
11227  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
11228  if (kcountHEnegativedirectionRecosignal2 == 5)
11229  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
11230  if (kcountHEnegativedirectionRecosignal2 == 6)
11231  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
11232  if (kcountHEnegativedirectionRecosignal2 == 7)
11233  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
11234  if (kcountHEnegativedirectionRecosignal2 == 8)
11235  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
11236  if (kcountHEnegativedirectionRecosignal2 == 9)
11237  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
11238  if (kcountHEnegativedirectionRecosignal2 == 10)
11239  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
11240  if (kcountHEnegativedirectionRecosignal2 == 11)
11241  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
11242  if (kcountHEnegativedirectionRecosignal2 == 12)
11243  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
11244  if (kcountHEnegativedirectionRecosignal2 == 13)
11245  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
11246  HEnegativedirectionRecosignal2->Draw("Error");
11247  kcountHEnegativedirectionRecosignal2++;
11248  if (kcountHEnegativedirectionRecosignal2 > 13)
11249  break; // 4x6 = 24
11250  } //ccctest>0
11251 
11252  } // for i
11253  } //if(jeta-41 < 0)
11254  } //for jeta
11256  c3x5->Update();
11257  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
11258  c3x5->Clear();
11259  // clean-up
11260  if (h2CeffHEnegativedirectionRecosignal2)
11261  delete h2CeffHEnegativedirectionRecosignal2;
11262  //========================================================================================== 1116
11263  //======================================================================
11264  //======================================================================1D plot: R vs phi , different eta, depth=3
11265  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
11266  c3x5->Clear();
11268  c3x5->Divide(3, 5);
11269  c3x5->cd(1);
11270  int kcountHEnegativedirectionRecosignal3 = 1;
11271  TH1F *h2CeffHEnegativedirectionRecosignal3 = new TH1F("h2CeffHEnegativedirectionRecosignal3", "", nphi, 0., 72.);
11272  for (int jeta = 0; jeta < njeta; jeta++) {
11273  // negativedirectionRecosignal:
11274  if (jeta - 41 < 0) {
11275  // for (int i=0;i<ndepth;i++) {
11276  // depth=3
11277  for (int i = 2; i < 3; i++) {
11278  TH1F *HEnegativedirectionRecosignal3 = (TH1F *)h2CeffHEnegativedirectionRecosignal3->Clone("twod1");
11279  float ccctest = 0; // to avoid empty massive elements
11280  for (int jphi = 0; jphi < nphi; jphi++) {
11281  double ccc1 = arecosignalhe[i][jeta][jphi];
11282  if (ccc1 != 0.) {
11283  HEnegativedirectionRecosignal3->Fill(jphi, ccc1);
11284  ccctest = 1.; //HEnegativedirectionRecosignal3->SetBinError(i,0.01);
11285  }
11286  } // for jphi
11287  if (ccctest > 0.) {
11288  //cout<<"666 kcountHEnegativedirectionRecosignal3 = "<<kcountHEnegativedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
11289  c3x5->cd(kcountHEnegativedirectionRecosignal3);
11290  HEnegativedirectionRecosignal3->SetMarkerStyle(20);
11291  HEnegativedirectionRecosignal3->SetMarkerSize(0.4);
11292  HEnegativedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
11293  HEnegativedirectionRecosignal3->SetXTitle("HEnegativedirectionRecosignal3 \b");
11294  HEnegativedirectionRecosignal3->SetMarkerColor(2);
11295  HEnegativedirectionRecosignal3->SetLineColor(0);
11296  gPad->SetGridy();
11297  gPad->SetGridx();
11298  // gPad->SetLogy();
11299  if (kcountHEnegativedirectionRecosignal3 == 1)
11300  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
11301  if (kcountHEnegativedirectionRecosignal3 == 2)
11302  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
11303  if (kcountHEnegativedirectionRecosignal3 == 3)
11304  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
11305  if (kcountHEnegativedirectionRecosignal3 == 4)
11306  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
11307  if (kcountHEnegativedirectionRecosignal3 == 5)
11308  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
11309  if (kcountHEnegativedirectionRecosignal3 == 6)
11310  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
11311  if (kcountHEnegativedirectionRecosignal3 == 7)
11312  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
11313  if (kcountHEnegativedirectionRecosignal3 == 8)
11314  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
11315  if (kcountHEnegativedirectionRecosignal3 == 9)
11316  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
11317  if (kcountHEnegativedirectionRecosignal3 == 10)
11318  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
11319  if (kcountHEnegativedirectionRecosignal3 == 11)
11320  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
11321  if (kcountHEnegativedirectionRecosignal3 == 12)
11322  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
11323  if (kcountHEnegativedirectionRecosignal3 == 13)
11324  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
11325  HEnegativedirectionRecosignal3->Draw("Error");
11326  kcountHEnegativedirectionRecosignal3++;
11327  if (kcountHEnegativedirectionRecosignal3 > 13)
11328  break; // 4x6 = 24
11329  } //ccctest>0
11330 
11331  } // for i
11332  } //if(jeta-41 < 0)
11333  } //for jeta
11335  c3x5->Update();
11336  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
11337  c3x5->Clear();
11338  // clean-up
11339  if (h2CeffHEnegativedirectionRecosignal3)
11340  delete h2CeffHEnegativedirectionRecosignal3;
11341  //========================================================================================== 1117
11342  //======================================================================
11343  //======================================================================1D plot: R vs phi , different eta, depth=4
11344  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
11345  c3x5->Clear();
11347  c3x5->Divide(3, 5);
11348  c3x5->cd(1);
11349  int kcountHEnegativedirectionRecosignal4 = 1;
11350  TH1F *h2CeffHEnegativedirectionRecosignal4 = new TH1F("h2CeffHEnegativedirectionRecosignal4", "", nphi, 0., 72.);
11351 
11352  for (int jeta = 0; jeta < njeta; jeta++) {
11353  // negativedirectionRecosignal:
11354  if (jeta - 41 < 0) {
11355  // for (int i=0;i<ndepth;i++) {
11356  // depth=4
11357  for (int i = 3; i < 4; i++) {
11358  TH1F *HEnegativedirectionRecosignal4 = (TH1F *)h2CeffHEnegativedirectionRecosignal4->Clone("twod1");
11359 
11360  float ccctest = 0; // to avoid empty massive elements
11361  for (int jphi = 0; jphi < nphi; jphi++) {
11362  double ccc1 = arecosignalhe[i][jeta][jphi];
11363  if (ccc1 != 0.) {
11364  HEnegativedirectionRecosignal4->Fill(jphi, ccc1);
11365  ccctest = 1.; //HEnegativedirectionRecosignal4->SetBinError(i,0.01);
11366  }
11367  } // for jphi
11368  if (ccctest > 0.) {
11369  //cout<<"777 kcountHEnegativedirectionRecosignal4 = "<<kcountHEnegativedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
11370  c3x5->cd(kcountHEnegativedirectionRecosignal4);
11371  HEnegativedirectionRecosignal4->SetMarkerStyle(20);
11372  HEnegativedirectionRecosignal4->SetMarkerSize(0.4);
11373  HEnegativedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
11374  HEnegativedirectionRecosignal4->SetXTitle("HEnegativedirectionRecosignal4 \b");
11375  HEnegativedirectionRecosignal4->SetMarkerColor(2);
11376  HEnegativedirectionRecosignal4->SetLineColor(0);
11377  gPad->SetGridy();
11378  gPad->SetGridx();
11379  // gPad->SetLogy();
11380  if (kcountHEnegativedirectionRecosignal4 == 1)
11381  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
11382  if (kcountHEnegativedirectionRecosignal4 == 2)
11383  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
11384  if (kcountHEnegativedirectionRecosignal4 == 3)
11385  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
11386  if (kcountHEnegativedirectionRecosignal4 == 4)
11387  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
11388  if (kcountHEnegativedirectionRecosignal4 == 5)
11389  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
11390  if (kcountHEnegativedirectionRecosignal4 == 6)
11391  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
11392  if (kcountHEnegativedirectionRecosignal4 == 7)
11393  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
11394  if (kcountHEnegativedirectionRecosignal4 == 8)
11395  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
11396  if (kcountHEnegativedirectionRecosignal4 == 9)
11397  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
11398  if (kcountHEnegativedirectionRecosignal4 == 10)
11399  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
11400  if (kcountHEnegativedirectionRecosignal4 == 11)
11401  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
11402  if (kcountHEnegativedirectionRecosignal4 == 12)
11403  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
11404  HEnegativedirectionRecosignal4->Draw("Error");
11405  kcountHEnegativedirectionRecosignal4++;
11406  if (kcountHEnegativedirectionRecosignal4 > 12)
11407  break; // 4x6 = 24
11408  } //ccctest>0
11409 
11410  } // for i
11411  } //if(jeta-41 < 0)
11412  } //for jeta
11414  c3x5->Update();
11415  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
11416  c3x5->Clear();
11417  // clean-up
11418  if (h2CeffHEnegativedirectionRecosignal4)
11419  delete h2CeffHEnegativedirectionRecosignal4;
11420  //========================================================================================== 1118
11421  //======================================================================
11422  //======================================================================1D plot: R vs phi , different eta, depth=5
11423  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
11424  c3x5->Clear();
11426  c3x5->Divide(3, 5);
11427  c3x5->cd(1);
11428  int kcountHEnegativedirectionRecosignal5 = 1;
11429  TH1F *h2CeffHEnegativedirectionRecosignal5 = new TH1F("h2CeffHEnegativedirectionRecosignal5", "", nphi, 0., 72.);
11430 
11431  for (int jeta = 0; jeta < njeta; jeta++) {
11432  // negativedirectionRecosignal:
11433  if (jeta - 41 < 0) {
11434  // for (int i=0;i<ndepth;i++) {
11435  // depth=5
11436  for (int i = 4; i < 5; i++) {
11437  TH1F *HEnegativedirectionRecosignal5 = (TH1F *)h2CeffHEnegativedirectionRecosignal5->Clone("twod1");
11438 
11439  float ccctest = 0; // to avoid empty massive elements
11440  for (int jphi = 0; jphi < nphi; jphi++) {
11441  // cout<<"888 initial kcountHEnegativedirectionRecosignal5 = "<<kcountHEnegativedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" arecosignalhe[i][jeta][jphi]= "<< arecosignalhe[i][jeta][jphi] <<" depth= "<< i <<endl;
11442 
11443  double ccc1 = arecosignalhe[i][jeta][jphi];
11444  if (ccc1 != 0.) {
11445  HEnegativedirectionRecosignal5->Fill(jphi, ccc1);
11446  ccctest = 1.; //HEnegativedirectionRecosignal5->SetBinError(i,0.01);
11447  }
11448  } // for jphi
11449  if (ccctest > 0.) {
11450  //cout<<"888 kcountHEnegativedirectionRecosignal5 = "<<kcountHEnegativedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<endl;
11451  c3x5->cd(kcountHEnegativedirectionRecosignal5);
11452  HEnegativedirectionRecosignal5->SetMarkerStyle(20);
11453  HEnegativedirectionRecosignal5->SetMarkerSize(0.4);
11454  HEnegativedirectionRecosignal5->GetYaxis()->SetLabelSize(0.04);
11455  HEnegativedirectionRecosignal5->SetXTitle("HEnegativedirectionRecosignal5 \b");
11456  HEnegativedirectionRecosignal5->SetMarkerColor(2);
11457  HEnegativedirectionRecosignal5->SetLineColor(0);
11458  gPad->SetGridy();
11459  gPad->SetGridx();
11460  // gPad->SetLogy();
11461  if (kcountHEnegativedirectionRecosignal5 == 1)
11462  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
11463  if (kcountHEnegativedirectionRecosignal5 == 2)
11464  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
11465  if (kcountHEnegativedirectionRecosignal5 == 3)
11466  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
11467  if (kcountHEnegativedirectionRecosignal5 == 4)
11468  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
11469  if (kcountHEnegativedirectionRecosignal5 == 5)
11470  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
11471  if (kcountHEnegativedirectionRecosignal5 == 6)
11472  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
11473  if (kcountHEnegativedirectionRecosignal5 == 7)
11474  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
11475  if (kcountHEnegativedirectionRecosignal5 == 8)
11476  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
11477  if (kcountHEnegativedirectionRecosignal5 == 9)
11478  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
11479  if (kcountHEnegativedirectionRecosignal5 == 10)
11480  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
11481  if (kcountHEnegativedirectionRecosignal5 == 11)
11482  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
11483  HEnegativedirectionRecosignal5->Draw("Error");
11484  kcountHEnegativedirectionRecosignal5++;
11485  if (kcountHEnegativedirectionRecosignal5 > 11)
11486  break; // 4x6 = 24
11487  } //ccctest>0
11488 
11489  } // for i
11490  } //if(jeta-41 < 0)
11491  } //for jeta
11493  c3x5->Update();
11494  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
11495  c3x5->Clear();
11496  // clean-up
11497  if (h2CeffHEnegativedirectionRecosignal5)
11498  delete h2CeffHEnegativedirectionRecosignal5;
11499  //========================================================================================== 1119
11500  //======================================================================
11501  //======================================================================1D plot: R vs phi , different eta, depth=6
11502  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
11503  c3x5->Clear();
11505  c3x5->Divide(3, 5);
11506  c3x5->cd(1);
11507  int kcountHEnegativedirectionRecosignal6 = 1;
11508  TH1F *h2CeffHEnegativedirectionRecosignal6 = new TH1F("h2CeffHEnegativedirectionRecosignal6", "", nphi, 0., 72.);
11509 
11510  for (int jeta = 0; jeta < njeta; jeta++) {
11511  // negativedirectionRecosignal:
11512  if (jeta - 41 < 0) {
11513  // for (int i=0;i<ndepth;i++) {
11514  // depth=6
11515  for (int i = 5; i < 6; i++) {
11516  TH1F *HEnegativedirectionRecosignal6 = (TH1F *)h2CeffHEnegativedirectionRecosignal6->Clone("twod1");
11517 
11518  float ccctest = 0; // to avoid empty massive elements
11519  for (int jphi = 0; jphi < nphi; jphi++) {
11520  double ccc1 = arecosignalhe[i][jeta][jphi];
11521  if (ccc1 != 0.) {
11522  HEnegativedirectionRecosignal6->Fill(jphi, ccc1);
11523  ccctest = 1.; //HEnegativedirectionRecosignal6->SetBinError(i,0.01);
11524  }
11525  } // for jphi
11526  if (ccctest > 0.) {
11527  //cout<<"999 kcountHEnegativedirectionRecosignal6 = "<<kcountHEnegativedirectionRecosignal6 <<" jeta-41= "<< jeta-41 <<endl;
11528  c3x5->cd(kcountHEnegativedirectionRecosignal6);
11529  HEnegativedirectionRecosignal6->SetMarkerStyle(20);
11530  HEnegativedirectionRecosignal6->SetMarkerSize(0.4);
11531  HEnegativedirectionRecosignal6->GetYaxis()->SetLabelSize(0.04);
11532  HEnegativedirectionRecosignal6->SetXTitle("HEnegativedirectionRecosignal6 \b");
11533  HEnegativedirectionRecosignal6->SetMarkerColor(2);
11534  HEnegativedirectionRecosignal6->SetLineColor(0);
11535  gPad->SetGridy();
11536  gPad->SetGridx();
11537  // gPad->SetLogy();
11538  if (kcountHEnegativedirectionRecosignal6 == 1)
11539  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
11540  if (kcountHEnegativedirectionRecosignal6 == 2)
11541  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
11542  if (kcountHEnegativedirectionRecosignal6 == 3)
11543  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
11544  if (kcountHEnegativedirectionRecosignal6 == 4)
11545  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
11546  if (kcountHEnegativedirectionRecosignal6 == 5)
11547  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
11548  if (kcountHEnegativedirectionRecosignal6 == 6)
11549  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
11550  if (kcountHEnegativedirectionRecosignal6 == 7)
11551  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
11552  if (kcountHEnegativedirectionRecosignal6 == 8)
11553  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
11554  if (kcountHEnegativedirectionRecosignal6 == 9)
11555  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
11556  if (kcountHEnegativedirectionRecosignal6 == 10)
11557  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
11558  HEnegativedirectionRecosignal6->Draw("Error");
11559  kcountHEnegativedirectionRecosignal6++;
11560  if (kcountHEnegativedirectionRecosignal6 > 10)
11561  break; // 4x6 = 24
11562  } //ccctest>0
11563 
11564  } // for i
11565  } //if(jeta-41 < 0)
11566  } //for jeta
11568  c3x5->Update();
11569  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
11570  c3x5->Clear();
11571  // clean-up
11572  if (h2CeffHEnegativedirectionRecosignal6)
11573  delete h2CeffHEnegativedirectionRecosignal6;
11574  //========================================================================================== 11110
11575  //======================================================================
11576  //======================================================================1D plot: R vs phi , different eta, depth=7
11577  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
11578  c3x5->Clear();
11580  c3x5->Divide(3, 5);
11581  c3x5->cd(1);
11582  int kcountHEnegativedirectionRecosignal7 = 1;
11583  TH1F *h2CeffHEnegativedirectionRecosignal7 = new TH1F("h2CeffHEnegativedirectionRecosignal7", "", nphi, 0., 72.);
11584 
11585  for (int jeta = 0; jeta < njeta; jeta++) {
11586  // negativedirectionRecosignal:
11587  if (jeta - 41 < 0) {
11588  // for (int i=0;i<ndepth;i++) {
11589  // depth=7
11590  for (int i = 6; i < 7; i++) {
11591  TH1F *HEnegativedirectionRecosignal7 = (TH1F *)h2CeffHEnegativedirectionRecosignal7->Clone("twod1");
11592 
11593  float ccctest = 0; // to avoid empty massive elements
11594  for (int jphi = 0; jphi < nphi; jphi++) {
11595  double ccc1 = arecosignalhe[i][jeta][jphi];
11596  if (ccc1 != 0.) {
11597  HEnegativedirectionRecosignal7->Fill(jphi, ccc1);
11598  ccctest = 1.; //HEnegativedirectionRecosignal7->SetBinError(i,0.01);
11599  }
11600  } // for jphi
11601  if (ccctest > 0.) {
11602  //cout<<"1010 kcountHEnegativedirectionRecosignal7 = "<<kcountHEnegativedirectionRecosignal7 <<" jeta-41= "<< jeta-41 <<endl;
11603  c3x5->cd(kcountHEnegativedirectionRecosignal7);
11604  HEnegativedirectionRecosignal7->SetMarkerStyle(20);
11605  HEnegativedirectionRecosignal7->SetMarkerSize(0.4);
11606  HEnegativedirectionRecosignal7->GetYaxis()->SetLabelSize(0.04);
11607  HEnegativedirectionRecosignal7->SetXTitle("HEnegativedirectionRecosignal7 \b");
11608  HEnegativedirectionRecosignal7->SetMarkerColor(2);
11609  HEnegativedirectionRecosignal7->SetLineColor(0);
11610  gPad->SetGridy();
11611  gPad->SetGridx();
11612  // gPad->SetLogy();
11613  if (kcountHEnegativedirectionRecosignal7 == 1)
11614  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
11615  if (kcountHEnegativedirectionRecosignal7 == 2)
11616  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
11617  if (kcountHEnegativedirectionRecosignal7 == 3)
11618  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
11619  HEnegativedirectionRecosignal7->Draw("Error");
11620  kcountHEnegativedirectionRecosignal7++;
11621  if (kcountHEnegativedirectionRecosignal7 > 3)
11622  break; // 4x6 = 24
11623  } //ccctest>0
11624 
11625  } // for i
11626  } //if(jeta-41 < 0)
11627  } //for jeta
11629  c3x5->Update();
11630  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
11631  c3x5->Clear();
11632  // clean-up
11633  if (h2CeffHEnegativedirectionRecosignal7)
11634  delete h2CeffHEnegativedirectionRecosignal7;
11635 
11637 
11638  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
11639 
11640  //cout<<" Start Vaiance: preparation *****" <<endl;
11641  TH2F *recosignalVariance1HE1 = (TH2F *)hfile->Get("h_recSignalEnergy2_HE1");
11642  TH2F *recosignalVariance0HE1 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE1");
11643  TH2F *recosignalVarianceHE1 = (TH2F *)recosignalVariance1HE1->Clone("recosignalVarianceHE1");
11644  recosignalVarianceHE1->Divide(recosignalVariance1HE1, recosignalVariance0HE1, 1, 1, "B");
11645  TH2F *recosignalVariance1HE2 = (TH2F *)hfile->Get("h_recSignalEnergy2_HE2");
11646  TH2F *recosignalVariance0HE2 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE2");
11647  TH2F *recosignalVarianceHE2 = (TH2F *)recosignalVariance1HE2->Clone("recosignalVarianceHE2");
11648  recosignalVarianceHE2->Divide(recosignalVariance1HE2, recosignalVariance0HE2, 1, 1, "B");
11649  TH2F *recosignalVariance1HE3 = (TH2F *)hfile->Get("h_recSignalEnergy2_HE3");
11650  TH2F *recosignalVariance0HE3 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE3");
11651  TH2F *recosignalVarianceHE3 = (TH2F *)recosignalVariance1HE3->Clone("recosignalVarianceHE3");
11652  recosignalVarianceHE3->Divide(recosignalVariance1HE3, recosignalVariance0HE3, 1, 1, "B");
11653  TH2F *recosignalVariance1HE4 = (TH2F *)hfile->Get("h_recSignalEnergy2_HE4");
11654  TH2F *recosignalVariance0HE4 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE4");
11655  TH2F *recosignalVarianceHE4 = (TH2F *)recosignalVariance1HE4->Clone("recosignalVarianceHE4");
11656  recosignalVarianceHE4->Divide(recosignalVariance1HE4, recosignalVariance0HE4, 1, 1, "B");
11657  TH2F *recosignalVariance1HE5 = (TH2F *)hfile->Get("h_recSignalEnergy2_HE5");
11658  TH2F *recosignalVariance0HE5 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE5");
11659  TH2F *recosignalVarianceHE5 = (TH2F *)recosignalVariance1HE5->Clone("recosignalVarianceHE5");
11660  recosignalVarianceHE5->Divide(recosignalVariance1HE5, recosignalVariance0HE5, 1, 1, "B");
11661  TH2F *recosignalVariance1HE6 = (TH2F *)hfile->Get("h_recSignalEnergy2_HE6");
11662  TH2F *recosignalVariance0HE6 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE6");
11663  TH2F *recosignalVarianceHE6 = (TH2F *)recosignalVariance1HE6->Clone("recosignalVarianceHE6");
11664  recosignalVarianceHE6->Divide(recosignalVariance1HE6, recosignalVariance0HE6, 1, 1, "B");
11665  TH2F *recosignalVariance1HE7 = (TH2F *)hfile->Get("h_recSignalEnergy2_HE7");
11666  TH2F *recosignalVariance0HE7 = (TH2F *)hfile->Get("h_recSignalEnergy0_HE7");
11667  TH2F *recosignalVarianceHE7 = (TH2F *)recosignalVariance1HE7->Clone("recosignalVarianceHE7");
11668  recosignalVarianceHE7->Divide(recosignalVariance1HE7, recosignalVariance0HE7, 1, 1, "B");
11669  //cout<<" Vaiance: preparation DONE *****" <<endl;
11670  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvariancehe
11671  // = sum(R*R)/N - (sum(R)/N)**2
11672  for (int jeta = 0; jeta < njeta; jeta++) {
11673  //preparation for PHI normalization:
11674  double sumrecosignalHE0 = 0;
11675  int nsumrecosignalHE0 = 0;
11676  double sumrecosignalHE1 = 0;
11677  int nsumrecosignalHE1 = 0;
11678  double sumrecosignalHE2 = 0;
11679  int nsumrecosignalHE2 = 0;
11680  double sumrecosignalHE3 = 0;
11681  int nsumrecosignalHE3 = 0;
11682  double sumrecosignalHE4 = 0;
11683  int nsumrecosignalHE4 = 0;
11684  double sumrecosignalHE5 = 0;
11685  int nsumrecosignalHE5 = 0;
11686  double sumrecosignalHE6 = 0;
11687  int nsumrecosignalHE6 = 0;
11688  for (int jphi = 0; jphi < njphi; jphi++) {
11689  recosignalvariancehe[0][jeta][jphi] = recosignalVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
11690  recosignalvariancehe[1][jeta][jphi] = recosignalVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
11691  recosignalvariancehe[2][jeta][jphi] = recosignalVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
11692  recosignalvariancehe[3][jeta][jphi] = recosignalVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
11693  recosignalvariancehe[4][jeta][jphi] = recosignalVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
11694  recosignalvariancehe[5][jeta][jphi] = recosignalVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
11695  recosignalvariancehe[6][jeta][jphi] = recosignalVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
11696  if (recosignalvariancehe[0][jeta][jphi] > 0.) {
11697  sumrecosignalHE0 += recosignalvariancehe[0][jeta][jphi];
11698  ++nsumrecosignalHE0;
11699  }
11700  if (recosignalvariancehe[1][jeta][jphi] > 0.) {
11701  sumrecosignalHE1 += recosignalvariancehe[1][jeta][jphi];
11702  ++nsumrecosignalHE1;
11703  }
11704  if (recosignalvariancehe[2][jeta][jphi] > 0.) {
11705  sumrecosignalHE2 += recosignalvariancehe[2][jeta][jphi];
11706  ++nsumrecosignalHE2;
11707  }
11708  if (recosignalvariancehe[3][jeta][jphi] > 0.) {
11709  sumrecosignalHE3 += recosignalvariancehe[3][jeta][jphi];
11710  ++nsumrecosignalHE3;
11711  }
11712  if (recosignalvariancehe[4][jeta][jphi] > 0.) {
11713  sumrecosignalHE4 += recosignalvariancehe[4][jeta][jphi];
11714  ++nsumrecosignalHE4;
11715  }
11716  if (recosignalvariancehe[5][jeta][jphi] > 0.) {
11717  sumrecosignalHE5 += recosignalvariancehe[5][jeta][jphi];
11718  ++nsumrecosignalHE5;
11719  }
11720  if (recosignalvariancehe[6][jeta][jphi] > 0.) {
11721  sumrecosignalHE6 += recosignalvariancehe[6][jeta][jphi];
11722  ++nsumrecosignalHE6;
11723  }
11724  } // phi
11725  // PHI normalization :
11726  for (int jphi = 0; jphi < njphi; jphi++) {
11727  if (recosignalvariancehe[0][jeta][jphi] > 0.)
11728  recosignalvariancehe[0][jeta][jphi] /= (sumrecosignalHE0 / nsumrecosignalHE0);
11729  if (recosignalvariancehe[1][jeta][jphi] > 0.)
11730  recosignalvariancehe[1][jeta][jphi] /= (sumrecosignalHE1 / nsumrecosignalHE1);
11731  if (recosignalvariancehe[2][jeta][jphi] > 0.)
11732  recosignalvariancehe[2][jeta][jphi] /= (sumrecosignalHE2 / nsumrecosignalHE2);
11733  if (recosignalvariancehe[3][jeta][jphi] > 0.)
11734  recosignalvariancehe[3][jeta][jphi] /= (sumrecosignalHE3 / nsumrecosignalHE3);
11735  if (recosignalvariancehe[4][jeta][jphi] > 0.)
11736  recosignalvariancehe[4][jeta][jphi] /= (sumrecosignalHE4 / nsumrecosignalHE4);
11737  if (recosignalvariancehe[5][jeta][jphi] > 0.)
11738  recosignalvariancehe[5][jeta][jphi] /= (sumrecosignalHE5 / nsumrecosignalHE5);
11739  if (recosignalvariancehe[6][jeta][jphi] > 0.)
11740  recosignalvariancehe[6][jeta][jphi] /= (sumrecosignalHE6 / nsumrecosignalHE6);
11741  } // phi
11742  // recosignalvariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
11743  for (int jphi = 0; jphi < njphi; jphi++) {
11744  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
11745  recosignalvariancehe[0][jeta][jphi] -= arecosignalhe[0][jeta][jphi] * arecosignalhe[0][jeta][jphi];
11746  recosignalvariancehe[0][jeta][jphi] = fabs(recosignalvariancehe[0][jeta][jphi]);
11747  recosignalvariancehe[1][jeta][jphi] -= arecosignalhe[1][jeta][jphi] * arecosignalhe[1][jeta][jphi];
11748  recosignalvariancehe[1][jeta][jphi] = fabs(recosignalvariancehe[1][jeta][jphi]);
11749  recosignalvariancehe[2][jeta][jphi] -= arecosignalhe[2][jeta][jphi] * arecosignalhe[2][jeta][jphi];
11750  recosignalvariancehe[2][jeta][jphi] = fabs(recosignalvariancehe[2][jeta][jphi]);
11751  recosignalvariancehe[3][jeta][jphi] -= arecosignalhe[3][jeta][jphi] * arecosignalhe[3][jeta][jphi];
11752  recosignalvariancehe[3][jeta][jphi] = fabs(recosignalvariancehe[3][jeta][jphi]);
11753  recosignalvariancehe[4][jeta][jphi] -= arecosignalhe[4][jeta][jphi] * arecosignalhe[4][jeta][jphi];
11754  recosignalvariancehe[4][jeta][jphi] = fabs(recosignalvariancehe[4][jeta][jphi]);
11755  recosignalvariancehe[5][jeta][jphi] -= arecosignalhe[5][jeta][jphi] * arecosignalhe[5][jeta][jphi];
11756  recosignalvariancehe[5][jeta][jphi] = fabs(recosignalvariancehe[5][jeta][jphi]);
11757  recosignalvariancehe[6][jeta][jphi] -= arecosignalhe[6][jeta][jphi] * arecosignalhe[6][jeta][jphi];
11758  recosignalvariancehe[6][jeta][jphi] = fabs(recosignalvariancehe[6][jeta][jphi]);
11759  }
11760  }
11761  //cout<<" Vaiance: DONE*****" <<endl;
11762  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
11763  //======================================================================
11764  //======================================================================
11765  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
11766  c1x1->Clear();
11768  c1x0->Divide(1, 1);
11769  c1x0->cd(1);
11770  TH2F *DefzDrecosignalHE42D = new TH2F("DefzDrecosignalHE42D", "", neta, -41., 41., nphi, 0., 72.);
11771  TH2F *DefzDrecosignalHE42D0 = new TH2F("DefzDrecosignalHE42D0", "", neta, -41., 41., nphi, 0., 72.);
11772  TH2F *DefzDrecosignalHE42DF = (TH2F *)DefzDrecosignalHE42D0->Clone("DefzDrecosignalHE42DF");
11773  for (int i = 0; i < ndepth; i++) {
11774  for (int jeta = 0; jeta < neta; jeta++) {
11775  for (int jphi = 0; jphi < nphi; jphi++) {
11776  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11777  int k2plot = jeta - 41;
11778  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
11779  if (arecosignalhe[i][jeta][jphi] > 0.) {
11780  DefzDrecosignalHE42D->Fill(kkk, jphi, ccc1);
11781  DefzDrecosignalHE42D0->Fill(kkk, jphi, 1.);
11782  }
11783  }
11784  }
11785  }
11786  DefzDrecosignalHE42DF->Divide(DefzDrecosignalHE42D, DefzDrecosignalHE42D0, 1, 1, "B"); // average A
11787  // DefzDrecosignalHE1->Sumw2();
11788  gPad->SetGridy();
11789  gPad->SetGridx(); // gPad->SetLogz();
11790  DefzDrecosignalHE42DF->SetMarkerStyle(20);
11791  DefzDrecosignalHE42DF->SetMarkerSize(0.4);
11792  DefzDrecosignalHE42DF->GetZaxis()->SetLabelSize(0.08);
11793  DefzDrecosignalHE42DF->SetXTitle("<D>_depth #eta \b");
11794  DefzDrecosignalHE42DF->SetYTitle(" #phi \b");
11795  DefzDrecosignalHE42DF->SetZTitle("<D>_depth \b");
11796  DefzDrecosignalHE42DF->SetMarkerColor(2);
11797  DefzDrecosignalHE42DF->SetLineColor(
11798  0); // DefzDrecosignalHE42DF->SetMaximum(1.000); // DefzDrecosignalHE42DF->SetMinimum(1.0);
11799  DefzDrecosignalHE42DF->Draw("COLZ");
11801  c1x0->Update();
11802  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHE.png");
11803  c1x0->Clear();
11804  // clean-up
11805  if (DefzDrecosignalHE42D)
11806  delete DefzDrecosignalHE42D;
11807  if (DefzDrecosignalHE42D0)
11808  delete DefzDrecosignalHE42D0;
11809  if (DefzDrecosignalHE42DF)
11810  delete DefzDrecosignalHE42DF;
11811  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
11812  //======================================================================
11813  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
11814  c1x1->Clear();
11816  c1x1->Divide(1, 1);
11817  c1x1->cd(1);
11818  TH1F *DefzDrecosignalHE41D = new TH1F("DefzDrecosignalHE41D", "", nphi, 0., 72.);
11819  TH1F *DefzDrecosignalHE41D0 = new TH1F("DefzDrecosignalHE41D0", "", nphi, 0., 72.);
11820  TH1F *DefzDrecosignalHE41DF = (TH1F *)DefzDrecosignalHE41D0->Clone("DefzDrecosignalHE41DF");
11821 
11822  for (int jphi = 0; jphi < nphi; jphi++) {
11823  for (int jeta = 0; jeta < neta; jeta++) {
11824  for (int i = 0; i < ndepth; i++) {
11825  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11826  if (arecosignalhe[i][jeta][jphi] > 0.) {
11827  DefzDrecosignalHE41D->Fill(jphi, ccc1);
11828  DefzDrecosignalHE41D0->Fill(jphi, 1.);
11829  }
11830  }
11831  }
11832  }
11833  // DefzDrecosignalHE41D->Sumw2();DefzDrecosignalHE41D0->Sumw2();
11834 
11835  DefzDrecosignalHE41DF->Divide(
11836  DefzDrecosignalHE41D, DefzDrecosignalHE41D0, 1, 1, "B"); // R averaged over depthes & eta
11837  DefzDrecosignalHE41D0->Sumw2();
11838  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHE41DF->SetBinError(jphi,0.01);}
11839  gPad->SetGridy();
11840  gPad->SetGridx(); // gPad->SetLogz();
11841  DefzDrecosignalHE41DF->SetMarkerStyle(20);
11842  DefzDrecosignalHE41DF->SetMarkerSize(1.4);
11843  DefzDrecosignalHE41DF->GetZaxis()->SetLabelSize(0.08);
11844  DefzDrecosignalHE41DF->SetXTitle("#phi \b");
11845  DefzDrecosignalHE41DF->SetYTitle(" <D> \b");
11846  DefzDrecosignalHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
11847  DefzDrecosignalHE41DF->SetMarkerColor(4);
11848  DefzDrecosignalHE41DF->SetLineColor(
11849  4); // DefzDrecosignalHE41DF->SetMinimum(0.8); DefzDrecosignalHE41DF->SetMinimum(-0.015);
11850  DefzDrecosignalHE41DF->Draw("Error");
11852  c1x1->Update();
11853  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHE.png");
11854  c1x1->Clear();
11855  // clean-up
11856  if (DefzDrecosignalHE41D)
11857  delete DefzDrecosignalHE41D;
11858  if (DefzDrecosignalHE41D0)
11859  delete DefzDrecosignalHE41D0;
11860  if (DefzDrecosignalHE41DF)
11861  delete DefzDrecosignalHE41DF;
11862  //========================================================================================== 14
11863  //======================================================================
11864  //======================================================================1D plot: D vs phi , different eta, depth=1
11865  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
11866  c3x5->Clear();
11868  c3x5->Divide(3, 5);
11869  c3x5->cd(1);
11870  int kcountHEpositivedirectionRecosignalD1 = 1;
11871  TH1F *h2CeffHEpositivedirectionRecosignalD1 = new TH1F("h2CeffHEpositivedirectionRecosignalD1", "", nphi, 0., 72.);
11872 
11873  for (int jeta = 0; jeta < njeta; jeta++) {
11874  // positivedirectionRecosignalD:
11875  if (jeta - 41 >= 0) {
11876  // for (int i=0;i<ndepth;i++) {
11877  // depth=1
11878  for (int i = 0; i < 1; i++) {
11879  TH1F *HEpositivedirectionRecosignalD1 = (TH1F *)h2CeffHEpositivedirectionRecosignalD1->Clone("twod1");
11880 
11881  float ccctest = 0; // to avoid empty massive elements
11882  for (int jphi = 0; jphi < nphi; jphi++) {
11883  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11884  if (arecosignalhe[i][jeta][jphi] > 0.) {
11885  HEpositivedirectionRecosignalD1->Fill(jphi, ccc1);
11886  ccctest = 1.; //HEpositivedirectionRecosignalD1->SetBinError(i,0.01);
11887  }
11888  } // for jphi
11889  if (ccctest > 0.) {
11890  //cout<<"1414 kcountHEpositivedirectionRecosignalD1 = "<<kcountHEpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
11891  c3x5->cd(kcountHEpositivedirectionRecosignalD1);
11892  HEpositivedirectionRecosignalD1->SetMarkerStyle(20);
11893  HEpositivedirectionRecosignalD1->SetMarkerSize(0.4);
11894  HEpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
11895  HEpositivedirectionRecosignalD1->SetXTitle("HEpositivedirectionRecosignalD1 \b");
11896  HEpositivedirectionRecosignalD1->SetMarkerColor(2);
11897  HEpositivedirectionRecosignalD1->SetLineColor(0);
11898  gPad->SetGridy();
11899  gPad->SetGridx();
11900  // gPad->SetLogy();
11901  if (kcountHEpositivedirectionRecosignalD1 == 1)
11902  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
11903  if (kcountHEpositivedirectionRecosignalD1 == 2)
11904  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
11905  if (kcountHEpositivedirectionRecosignalD1 == 3)
11906  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
11907  if (kcountHEpositivedirectionRecosignalD1 == 4)
11908  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
11909  if (kcountHEpositivedirectionRecosignalD1 == 5)
11910  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
11911  if (kcountHEpositivedirectionRecosignalD1 == 6)
11912  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
11913  if (kcountHEpositivedirectionRecosignalD1 == 7)
11914  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
11915  if (kcountHEpositivedirectionRecosignalD1 == 8)
11916  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
11917  if (kcountHEpositivedirectionRecosignalD1 == 9)
11918  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
11919  if (kcountHEpositivedirectionRecosignalD1 == 10)
11920  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
11921  if (kcountHEpositivedirectionRecosignalD1 == 11)
11922  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
11923  if (kcountHEpositivedirectionRecosignalD1 == 12)
11924  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
11925  HEpositivedirectionRecosignalD1->Draw("Error");
11926  kcountHEpositivedirectionRecosignalD1++;
11927  if (kcountHEpositivedirectionRecosignalD1 > 12)
11928  break; // 4x6 = 24
11929  } //ccctest>0
11930 
11931  } // for i
11932  } //if(jeta-41 >= 0)
11933  } //for jeta
11935  c3x5->Update();
11936  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
11937  c3x5->Clear();
11938  // clean-up
11939  if (h2CeffHEpositivedirectionRecosignalD1)
11940  delete h2CeffHEpositivedirectionRecosignalD1;
11941  //========================================================================================== 15
11942  //======================================================================
11943  //======================================================================1D plot: D vs phi , different eta, depth=2
11944  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
11945  c3x5->Clear();
11946  c3x5->Divide(3, 5);
11947  c3x5->cd(1);
11948  int kcountHEpositivedirectionRecosignalD2 = 1;
11949  TH1F *h2CeffHEpositivedirectionRecosignalD2 = new TH1F("h2CeffHEpositivedirectionRecosignalD2", "", nphi, 0., 72.);
11950 
11951  for (int jeta = 0; jeta < njeta; jeta++) {
11952  // positivedirectionRecosignalD:
11953  if (jeta - 41 >= 0) {
11954  // for (int i=0;i<ndepth;i++) {
11955  // depth=2
11956  for (int i = 1; i < 2; i++) {
11957  TH1F *HEpositivedirectionRecosignalD2 = (TH1F *)h2CeffHEpositivedirectionRecosignalD2->Clone("twod1");
11958 
11959  float ccctest = 0; // to avoid empty massive elements
11960  for (int jphi = 0; jphi < nphi; jphi++) {
11961  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11962  if (arecosignalhe[i][jeta][jphi] > 0.) {
11963  HEpositivedirectionRecosignalD2->Fill(jphi, ccc1);
11964  ccctest = 1.; //HEpositivedirectionRecosignalD2->SetBinError(i,0.01);
11965  }
11966  } // for jphi
11967  if (ccctest > 0.) {
11968  //cout<<"1515 kcountHEpositivedirectionRecosignalD2 = "<<kcountHEpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
11969  c3x5->cd(kcountHEpositivedirectionRecosignalD2);
11970  HEpositivedirectionRecosignalD2->SetMarkerStyle(20);
11971  HEpositivedirectionRecosignalD2->SetMarkerSize(0.4);
11972  HEpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
11973  HEpositivedirectionRecosignalD2->SetXTitle("HEpositivedirectionRecosignalD2 \b");
11974  HEpositivedirectionRecosignalD2->SetMarkerColor(2);
11975  HEpositivedirectionRecosignalD2->SetLineColor(0);
11976  gPad->SetGridy();
11977  gPad->SetGridx();
11978  // gPad->SetLogy();
11979  if (kcountHEpositivedirectionRecosignalD2 == 1)
11980  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
11981  if (kcountHEpositivedirectionRecosignalD2 == 2)
11982  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
11983  if (kcountHEpositivedirectionRecosignalD2 == 3)
11984  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
11985  if (kcountHEpositivedirectionRecosignalD2 == 4)
11986  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
11987  if (kcountHEpositivedirectionRecosignalD2 == 5)
11988  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
11989  if (kcountHEpositivedirectionRecosignalD2 == 6)
11990  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
11991  if (kcountHEpositivedirectionRecosignalD2 == 7)
11992  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
11993  if (kcountHEpositivedirectionRecosignalD2 == 8)
11994  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
11995  if (kcountHEpositivedirectionRecosignalD2 == 9)
11996  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
11997  if (kcountHEpositivedirectionRecosignalD2 == 10)
11998  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
11999  if (kcountHEpositivedirectionRecosignalD2 == 11)
12000  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
12001  if (kcountHEpositivedirectionRecosignalD2 == 12)
12002  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
12003  if (kcountHEpositivedirectionRecosignalD2 == 13)
12004  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
12005  HEpositivedirectionRecosignalD2->Draw("Error");
12006  kcountHEpositivedirectionRecosignalD2++;
12007  if (kcountHEpositivedirectionRecosignalD2 > 13)
12008  break; // 4x6 = 24
12009  } //ccctest>0
12010 
12011  } // for i
12012  } //if(jeta-41 >= 0)
12013  } //for jeta
12015  c3x5->Update();
12016  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
12017  c3x5->Clear();
12018  // clean-up
12019  if (h2CeffHEpositivedirectionRecosignalD2)
12020  delete h2CeffHEpositivedirectionRecosignalD2;
12021  //========================================================================================== 16
12022  //======================================================================
12023  //======================================================================1D plot: D vs phi , different eta, depth=3
12024  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
12025  c3x5->Clear();
12026  c3x5->Divide(3, 5);
12027  c3x5->cd(1);
12028  int kcountHEpositivedirectionRecosignalD3 = 1;
12029  TH1F *h2CeffHEpositivedirectionRecosignalD3 = new TH1F("h2CeffHEpositivedirectionRecosignalD3", "", nphi, 0., 72.);
12030 
12031  for (int jeta = 0; jeta < njeta; jeta++) {
12032  // positivedirectionRecosignalD:
12033  if (jeta - 41 >= 0) {
12034  // for (int i=0;i<ndepth;i++) {
12035  // depth=3
12036  for (int i = 2; i < 3; i++) {
12037  TH1F *HEpositivedirectionRecosignalD3 = (TH1F *)h2CeffHEpositivedirectionRecosignalD3->Clone("twod1");
12038 
12039  float ccctest = 0; // to avoid empty massive elements
12040  for (int jphi = 0; jphi < nphi; jphi++) {
12041  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12042  if (arecosignalhe[i][jeta][jphi] > 0.) {
12043  HEpositivedirectionRecosignalD3->Fill(jphi, ccc1);
12044  ccctest = 1.; //HEpositivedirectionRecosignalD3->SetBinError(i,0.01);
12045  }
12046  } // for jphi
12047  if (ccctest > 0.) {
12048  //cout<<"1616 kcountHEpositivedirectionRecosignalD3 = "<<kcountHEpositivedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
12049  c3x5->cd(kcountHEpositivedirectionRecosignalD3);
12050  HEpositivedirectionRecosignalD3->SetMarkerStyle(20);
12051  HEpositivedirectionRecosignalD3->SetMarkerSize(0.4);
12052  HEpositivedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
12053  HEpositivedirectionRecosignalD3->SetXTitle("HEpositivedirectionRecosignalD3 \b");
12054  HEpositivedirectionRecosignalD3->SetMarkerColor(2);
12055  HEpositivedirectionRecosignalD3->SetLineColor(0);
12056  gPad->SetGridy();
12057  gPad->SetGridx();
12058  // gPad->SetLogy();
12059  if (kcountHEpositivedirectionRecosignalD3 == 1)
12060  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
12061  if (kcountHEpositivedirectionRecosignalD3 == 2)
12062  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
12063  if (kcountHEpositivedirectionRecosignalD3 == 3)
12064  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
12065  if (kcountHEpositivedirectionRecosignalD3 == 4)
12066  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
12067  if (kcountHEpositivedirectionRecosignalD3 == 5)
12068  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
12069  if (kcountHEpositivedirectionRecosignalD3 == 6)
12070  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
12071  if (kcountHEpositivedirectionRecosignalD3 == 7)
12072  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
12073  if (kcountHEpositivedirectionRecosignalD3 == 8)
12074  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
12075  if (kcountHEpositivedirectionRecosignalD3 == 9)
12076  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
12077  if (kcountHEpositivedirectionRecosignalD3 == 10)
12078  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
12079  if (kcountHEpositivedirectionRecosignalD3 == 11)
12080  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
12081  if (kcountHEpositivedirectionRecosignalD3 == 12)
12082  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
12083  if (kcountHEpositivedirectionRecosignalD3 == 13)
12084  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
12085  HEpositivedirectionRecosignalD3->Draw("Error");
12086  kcountHEpositivedirectionRecosignalD3++;
12087  if (kcountHEpositivedirectionRecosignalD3 > 13)
12088  break; // 4x6 = 24
12089  } //ccctest>0
12090 
12091  } // for i
12092  } //if(jeta-41 >= 0)
12093  } //for jeta
12095  c3x5->Update();
12096  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
12097  c3x5->Clear();
12098  // clean-up
12099  if (h2CeffHEpositivedirectionRecosignalD3)
12100  delete h2CeffHEpositivedirectionRecosignalD3;
12101  //========================================================================================== 17
12102  //======================================================================
12103  //======================================================================1D plot: D vs phi , different eta, depth=4
12104  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
12105  c3x5->Clear();
12106  c3x5->Divide(3, 5);
12107  c3x5->cd(1);
12108  int kcountHEpositivedirectionRecosignalD4 = 1;
12109  TH1F *h2CeffHEpositivedirectionRecosignalD4 = new TH1F("h2CeffHEpositivedirectionRecosignalD4", "", nphi, 0., 72.);
12110 
12111  for (int jeta = 0; jeta < njeta; jeta++) {
12112  // positivedirectionRecosignalD:
12113  if (jeta - 41 >= 0) {
12114  // for (int i=0;i<ndepth;i++) {
12115  // depth=4
12116  for (int i = 3; i < 4; i++) {
12117  TH1F *HEpositivedirectionRecosignalD4 = (TH1F *)h2CeffHEpositivedirectionRecosignalD4->Clone("twod1");
12118 
12119  float ccctest = 0; // to avoid empty massive elements
12120  for (int jphi = 0; jphi < nphi; jphi++) {
12121  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12122  if (arecosignalhe[i][jeta][jphi] > 0.) {
12123  HEpositivedirectionRecosignalD4->Fill(jphi, ccc1);
12124  ccctest = 1.; //HEpositivedirectionRecosignalD4->SetBinError(i,0.01);
12125  }
12126  } // for jphi
12127  if (ccctest > 0.) {
12128  //cout<<"1717 kcountHEpositivedirectionRecosignalD4 = "<<kcountHEpositivedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
12129  c3x5->cd(kcountHEpositivedirectionRecosignalD4);
12130  HEpositivedirectionRecosignalD4->SetMarkerStyle(20);
12131  HEpositivedirectionRecosignalD4->SetMarkerSize(0.4);
12132  HEpositivedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
12133  HEpositivedirectionRecosignalD4->SetXTitle("HEpositivedirectionRecosignalD4 \b");
12134  HEpositivedirectionRecosignalD4->SetMarkerColor(2);
12135  HEpositivedirectionRecosignalD4->SetLineColor(0);
12136  gPad->SetGridy();
12137  gPad->SetGridx();
12138  // gPad->SetLogy();
12139  if (kcountHEpositivedirectionRecosignalD4 == 1)
12140  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
12141  if (kcountHEpositivedirectionRecosignalD4 == 2)
12142  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
12143  if (kcountHEpositivedirectionRecosignalD4 == 3)
12144  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
12145  if (kcountHEpositivedirectionRecosignalD4 == 4)
12146  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
12147  if (kcountHEpositivedirectionRecosignalD4 == 5)
12148  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
12149  if (kcountHEpositivedirectionRecosignalD4 == 6)
12150  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
12151  if (kcountHEpositivedirectionRecosignalD4 == 7)
12152  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
12153  if (kcountHEpositivedirectionRecosignalD4 == 8)
12154  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
12155  if (kcountHEpositivedirectionRecosignalD4 == 9)
12156  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
12157  if (kcountHEpositivedirectionRecosignalD4 == 10)
12158  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
12159  if (kcountHEpositivedirectionRecosignalD4 == 11)
12160  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
12161  if (kcountHEpositivedirectionRecosignalD4 == 12)
12162  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
12163  HEpositivedirectionRecosignalD4->Draw("Error");
12164  kcountHEpositivedirectionRecosignalD4++;
12165  if (kcountHEpositivedirectionRecosignalD4 > 12)
12166  break; // 4x6 = 24
12167  } //ccctest>0
12168 
12169  } // for i
12170  } //if(jeta-41 >= 0)
12171  } //for jeta
12173  c3x5->Update();
12174  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
12175  c3x5->Clear();
12176  // clean-up
12177  if (h2CeffHEpositivedirectionRecosignalD4)
12178  delete h2CeffHEpositivedirectionRecosignalD4;
12179  //========================================================================================== 18
12180  //======================================================================
12181  //======================================================================1D plot: D vs phi , different eta, depth=5
12182  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
12183  c3x5->Clear();
12184  c3x5->Divide(3, 5);
12185  c3x5->cd(1);
12186  int kcountHEpositivedirectionRecosignalD5 = 1;
12187  TH1F *h2CeffHEpositivedirectionRecosignalD5 = new TH1F("h2CeffHEpositivedirectionRecosignalD5", "", nphi, 0., 72.);
12188 
12189  for (int jeta = 0; jeta < njeta; jeta++) {
12190  // positivedirectionRecosignalD:
12191  if (jeta - 41 >= 0) {
12192  // for (int i=0;i<ndepth;i++) {
12193  // depth=5
12194  for (int i = 4; i < 5; i++) {
12195  TH1F *HEpositivedirectionRecosignalD5 = (TH1F *)h2CeffHEpositivedirectionRecosignalD5->Clone("twod1");
12196 
12197  float ccctest = 0; // to avoid empty massive elements
12198  for (int jphi = 0; jphi < nphi; jphi++) {
12199  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12200  if (arecosignalhe[i][jeta][jphi] > 0.) {
12201  HEpositivedirectionRecosignalD5->Fill(jphi, ccc1);
12202  ccctest = 1.; //HEpositivedirectionRecosignalD5->SetBinError(i,0.01);
12203  }
12204  } // for jphi
12205  if (ccctest > 0.) {
12206  //cout<<"1818 kcountHEpositivedirectionRecosignalD5 = "<<kcountHEpositivedirectionRecosignalD5 <<" jeta-41= "<< jeta-41 <<endl;
12207  c3x5->cd(kcountHEpositivedirectionRecosignalD5);
12208  HEpositivedirectionRecosignalD5->SetMarkerStyle(20);
12209  HEpositivedirectionRecosignalD5->SetMarkerSize(0.4);
12210  HEpositivedirectionRecosignalD5->GetYaxis()->SetLabelSize(0.04);
12211  HEpositivedirectionRecosignalD5->SetXTitle("HEpositivedirectionRecosignalD5 \b");
12212  HEpositivedirectionRecosignalD5->SetMarkerColor(2);
12213  HEpositivedirectionRecosignalD5->SetLineColor(0);
12214  gPad->SetGridy();
12215  gPad->SetGridx();
12216  // gPad->SetLogy();
12217  if (kcountHEpositivedirectionRecosignalD5 == 1)
12218  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
12219  if (kcountHEpositivedirectionRecosignalD5 == 2)
12220  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
12221  if (kcountHEpositivedirectionRecosignalD5 == 3)
12222  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
12223  if (kcountHEpositivedirectionRecosignalD5 == 4)
12224  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
12225  if (kcountHEpositivedirectionRecosignalD5 == 5)
12226  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
12227  if (kcountHEpositivedirectionRecosignalD5 == 6)
12228  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
12229  if (kcountHEpositivedirectionRecosignalD5 == 7)
12230  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
12231  if (kcountHEpositivedirectionRecosignalD5 == 8)
12232  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
12233  if (kcountHEpositivedirectionRecosignalD5 == 9)
12234  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
12235  if (kcountHEpositivedirectionRecosignalD5 == 10)
12236  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
12237  if (kcountHEpositivedirectionRecosignalD5 == 11)
12238  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
12239  HEpositivedirectionRecosignalD5->Draw("Error");
12240  kcountHEpositivedirectionRecosignalD5++;
12241  if (kcountHEpositivedirectionRecosignalD5 > 11)
12242  break; // 4x6 = 24
12243  } //ccctest>0
12244 
12245  } // for i
12246  } //if(jeta-41 >= 0)
12247  } //for jeta
12249  c3x5->Update();
12250  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
12251  c3x5->Clear();
12252  // clean-up
12253  if (h2CeffHEpositivedirectionRecosignalD5)
12254  delete h2CeffHEpositivedirectionRecosignalD5;
12255  //========================================================================================== 19
12256  //======================================================================
12257  //======================================================================1D plot: D vs phi , different eta, depth=6
12258  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
12259  c3x5->Clear();
12260  c3x5->Divide(3, 5);
12261  c3x5->cd(1);
12262  int kcountHEpositivedirectionRecosignalD6 = 1;
12263  TH1F *h2CeffHEpositivedirectionRecosignalD6 = new TH1F("h2CeffHEpositivedirectionRecosignalD6", "", nphi, 0., 72.);
12264 
12265  for (int jeta = 0; jeta < njeta; jeta++) {
12266  // positivedirectionRecosignalD:
12267  if (jeta - 41 >= 0) {
12268  // for (int i=0;i<ndepth;i++) {
12269  // depth=6
12270  for (int i = 5; i < 6; i++) {
12271  TH1F *HEpositivedirectionRecosignalD6 = (TH1F *)h2CeffHEpositivedirectionRecosignalD6->Clone("twod1");
12272 
12273  float ccctest = 0; // to avoid empty massive elements
12274  for (int jphi = 0; jphi < nphi; jphi++) {
12275  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12276  if (arecosignalhe[i][jeta][jphi] > 0.) {
12277  HEpositivedirectionRecosignalD6->Fill(jphi, ccc1);
12278  ccctest = 1.; //HEpositivedirectionRecosignalD6->SetBinError(i,0.01);
12279  }
12280  } // for jphi
12281  if (ccctest > 0.) {
12282  //cout<<"1919 kcountHEpositivedirectionRecosignalD6 = "<<kcountHEpositivedirectionRecosignalD6 <<" jeta-41= "<< jeta-41 <<endl;
12283  c3x5->cd(kcountHEpositivedirectionRecosignalD6);
12284  HEpositivedirectionRecosignalD6->SetMarkerStyle(20);
12285  HEpositivedirectionRecosignalD6->SetMarkerSize(0.4);
12286  HEpositivedirectionRecosignalD6->GetYaxis()->SetLabelSize(0.04);
12287  HEpositivedirectionRecosignalD6->SetXTitle("HEpositivedirectionRecosignalD6 \b");
12288  HEpositivedirectionRecosignalD6->SetMarkerColor(2);
12289  HEpositivedirectionRecosignalD6->SetLineColor(0);
12290  gPad->SetGridy();
12291  gPad->SetGridx();
12292  // gPad->SetLogy();
12293  if (kcountHEpositivedirectionRecosignalD6 == 1)
12294  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
12295  if (kcountHEpositivedirectionRecosignalD6 == 2)
12296  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
12297  if (kcountHEpositivedirectionRecosignalD6 == 3)
12298  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
12299  if (kcountHEpositivedirectionRecosignalD6 == 4)
12300  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
12301  if (kcountHEpositivedirectionRecosignalD6 == 5)
12302  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
12303  if (kcountHEpositivedirectionRecosignalD6 == 6)
12304  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
12305  if (kcountHEpositivedirectionRecosignalD6 == 7)
12306  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
12307  if (kcountHEpositivedirectionRecosignalD6 == 8)
12308  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
12309  if (kcountHEpositivedirectionRecosignalD6 == 9)
12310  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
12311  if (kcountHEpositivedirectionRecosignalD6 == 10)
12312  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
12313  HEpositivedirectionRecosignalD6->Draw("Error");
12314  kcountHEpositivedirectionRecosignalD6++;
12315  if (kcountHEpositivedirectionRecosignalD6 > 10)
12316  break; // 4x6 = 24
12317  } //ccctest>0
12318 
12319  } // for i
12320  } //if(jeta-41 >= 0)
12321  } //for jeta
12323  c3x5->Update();
12324  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
12325  c3x5->Clear();
12326  // clean-up
12327  if (h2CeffHEpositivedirectionRecosignalD6)
12328  delete h2CeffHEpositivedirectionRecosignalD6;
12329  //========================================================================================== 20
12330  //======================================================================
12331  //======================================================================1D plot: D vs phi , different eta, depth=7
12332  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
12333  c3x5->Clear();
12334  c3x5->Divide(3, 5);
12335  c3x5->cd(1);
12336  int kcountHEpositivedirectionRecosignalD7 = 1;
12337  TH1F *h2CeffHEpositivedirectionRecosignalD7 = new TH1F("h2CeffHEpositivedirectionRecosignalD7", "", nphi, 0., 72.);
12338 
12339  for (int jeta = 0; jeta < njeta; jeta++) {
12340  // positivedirectionRecosignalD:
12341  if (jeta - 41 >= 0) {
12342  // for (int i=0;i<ndepth;i++) {
12343  // depth=7
12344  for (int i = 6; i < 7; i++) {
12345  TH1F *HEpositivedirectionRecosignalD7 = (TH1F *)h2CeffHEpositivedirectionRecosignalD7->Clone("twod1");
12346 
12347  float ccctest = 0; // to avoid empty massive elements
12348  for (int jphi = 0; jphi < nphi; jphi++) {
12349  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12350  if (arecosignalhe[i][jeta][jphi] > 0.) {
12351  HEpositivedirectionRecosignalD7->Fill(jphi, ccc1);
12352  ccctest = 1.; //HEpositivedirectionRecosignalD7->SetBinError(i,0.01);
12353  }
12354  } // for jphi
12355  if (ccctest != 0.) {
12356  //cout<<"2020 kcountHEpositivedirectionRecosignalD7 = "<<kcountHEpositivedirectionRecosignalD7 <<" jeta-41= "<< jeta-41 <<endl;
12357  c3x5->cd(kcountHEpositivedirectionRecosignalD7);
12358  HEpositivedirectionRecosignalD7->SetMarkerStyle(20);
12359  HEpositivedirectionRecosignalD7->SetMarkerSize(0.4);
12360  HEpositivedirectionRecosignalD7->GetYaxis()->SetLabelSize(0.04);
12361  HEpositivedirectionRecosignalD7->SetXTitle("HEpositivedirectionRecosignalD7 \b");
12362  HEpositivedirectionRecosignalD7->SetMarkerColor(2);
12363  HEpositivedirectionRecosignalD7->SetLineColor(0);
12364  gPad->SetGridy();
12365  gPad->SetGridx();
12366  // gPad->SetLogy();
12367  if (kcountHEpositivedirectionRecosignalD7 == 1)
12368  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
12369  if (kcountHEpositivedirectionRecosignalD7 == 2)
12370  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
12371  if (kcountHEpositivedirectionRecosignalD7 == 3)
12372  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
12373  HEpositivedirectionRecosignalD7->Draw("Error");
12374  kcountHEpositivedirectionRecosignalD7++;
12375  if (kcountHEpositivedirectionRecosignalD7 > 3)
12376  break; // 4x6 = 24
12377  } //ccctest>0
12378 
12379  } // for i
12380  } //if(jeta-41 >= 0)
12381  } //for jeta
12383  c3x5->Update();
12384  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
12385  c3x5->Clear();
12386  // clean-up
12387  if (h2CeffHEpositivedirectionRecosignalD7)
12388  delete h2CeffHEpositivedirectionRecosignalD7;
12389 
12390  //========================================================================================== 22222214
12391  //======================================================================
12392  //======================================================================1D plot: D vs phi , different eta, depth=1
12393  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
12394  c3x5->Clear();
12396  c3x5->Divide(3, 5);
12397  c3x5->cd(1);
12398  int kcountHEnegativedirectionRecosignalD1 = 1;
12399  TH1F *h2CeffHEnegativedirectionRecosignalD1 = new TH1F("h2CeffHEnegativedirectionRecosignalD1", "", nphi, 0., 72.);
12400 
12401  for (int jeta = 0; jeta < njeta; jeta++) {
12402  // negativedirectionRecosignalD:
12403  if (jeta - 41 < 0) {
12404  // for (int i=0;i<ndepth;i++) {
12405  // depth=1
12406  for (int i = 0; i < 1; i++) {
12407  TH1F *HEnegativedirectionRecosignalD1 = (TH1F *)h2CeffHEnegativedirectionRecosignalD1->Clone("twod1");
12408 
12409  float ccctest = 0; // to avoid empty massive elements
12410  for (int jphi = 0; jphi < nphi; jphi++) {
12411  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12412  if (arecosignalhe[i][jeta][jphi] > 0.) {
12413  HEnegativedirectionRecosignalD1->Fill(jphi, ccc1);
12414  ccctest = 1.; //HEnegativedirectionRecosignalD1->SetBinError(i,0.01);
12415  }
12416  } // for jphi
12417  if (ccctest > 0.) {
12418  //cout<<"1414 kcountHEnegativedirectionRecosignalD1 = "<<kcountHEnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
12419  c3x5->cd(kcountHEnegativedirectionRecosignalD1);
12420  HEnegativedirectionRecosignalD1->SetMarkerStyle(20);
12421  HEnegativedirectionRecosignalD1->SetMarkerSize(0.4);
12422  HEnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
12423  HEnegativedirectionRecosignalD1->SetXTitle("HEnegativedirectionRecosignalD1 \b");
12424  HEnegativedirectionRecosignalD1->SetMarkerColor(2);
12425  HEnegativedirectionRecosignalD1->SetLineColor(0);
12426  gPad->SetGridy();
12427  gPad->SetGridx();
12428  // gPad->SetLogy();
12429  if (kcountHEnegativedirectionRecosignalD1 == 1)
12430  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
12431  if (kcountHEnegativedirectionRecosignalD1 == 2)
12432  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
12433  if (kcountHEnegativedirectionRecosignalD1 == 3)
12434  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
12435  if (kcountHEnegativedirectionRecosignalD1 == 4)
12436  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
12437  if (kcountHEnegativedirectionRecosignalD1 == 5)
12438  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
12439  if (kcountHEnegativedirectionRecosignalD1 == 6)
12440  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
12441  if (kcountHEnegativedirectionRecosignalD1 == 7)
12442  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
12443  if (kcountHEnegativedirectionRecosignalD1 == 8)
12444  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
12445  if (kcountHEnegativedirectionRecosignalD1 == 9)
12446  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
12447  if (kcountHEnegativedirectionRecosignalD1 == 10)
12448  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
12449  if (kcountHEnegativedirectionRecosignalD1 == 11)
12450  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
12451  if (kcountHEnegativedirectionRecosignalD1 == 12)
12452  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
12453  HEnegativedirectionRecosignalD1->Draw("Error");
12454  kcountHEnegativedirectionRecosignalD1++;
12455  if (kcountHEnegativedirectionRecosignalD1 > 12)
12456  break; // 4x6 = 24
12457  } //ccctest>0
12458 
12459  } // for i
12460  } //if(jeta-41 < 0)
12461  } //for jeta
12463  c3x5->Update();
12464  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
12465  c3x5->Clear();
12466  // clean-up
12467  if (h2CeffHEnegativedirectionRecosignalD1)
12468  delete h2CeffHEnegativedirectionRecosignalD1;
12469  //========================================================================================== 22222215
12470  //======================================================================
12471  //======================================================================1D plot: D vs phi , different eta, depth=2
12472  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
12473  c3x5->Clear();
12474  c3x5->Divide(3, 5);
12475  c3x5->cd(1);
12476  int kcountHEnegativedirectionRecosignalD2 = 1;
12477  TH1F *h2CeffHEnegativedirectionRecosignalD2 = new TH1F("h2CeffHEnegativedirectionRecosignalD2", "", nphi, 0., 72.);
12478 
12479  for (int jeta = 0; jeta < njeta; jeta++) {
12480  // negativedirectionRecosignalD:
12481  if (jeta - 41 < 0) {
12482  // for (int i=0;i<ndepth;i++) {
12483  // depth=2
12484  for (int i = 1; i < 2; i++) {
12485  TH1F *HEnegativedirectionRecosignalD2 = (TH1F *)h2CeffHEnegativedirectionRecosignalD2->Clone("twod1");
12486 
12487  float ccctest = 0; // to avoid empty massive elements
12488  for (int jphi = 0; jphi < nphi; jphi++) {
12489  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12490  if (arecosignalhe[i][jeta][jphi] > 0.) {
12491  HEnegativedirectionRecosignalD2->Fill(jphi, ccc1);
12492  ccctest = 1.; //HEnegativedirectionRecosignalD2->SetBinError(i,0.01);
12493  }
12494  } // for jphi
12495  if (ccctest > 0.) {
12496  //cout<<"1515 kcountHEnegativedirectionRecosignalD2 = "<<kcountHEnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
12497  c3x5->cd(kcountHEnegativedirectionRecosignalD2);
12498  HEnegativedirectionRecosignalD2->SetMarkerStyle(20);
12499  HEnegativedirectionRecosignalD2->SetMarkerSize(0.4);
12500  HEnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
12501  HEnegativedirectionRecosignalD2->SetXTitle("HEnegativedirectionRecosignalD2 \b");
12502  HEnegativedirectionRecosignalD2->SetMarkerColor(2);
12503  HEnegativedirectionRecosignalD2->SetLineColor(0);
12504  gPad->SetGridy();
12505  gPad->SetGridx();
12506  // gPad->SetLogy();
12507  if (kcountHEnegativedirectionRecosignalD2 == 1)
12508  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
12509  if (kcountHEnegativedirectionRecosignalD2 == 2)
12510  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
12511  if (kcountHEnegativedirectionRecosignalD2 == 3)
12512  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
12513  if (kcountHEnegativedirectionRecosignalD2 == 4)
12514  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
12515  if (kcountHEnegativedirectionRecosignalD2 == 5)
12516  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
12517  if (kcountHEnegativedirectionRecosignalD2 == 6)
12518  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
12519  if (kcountHEnegativedirectionRecosignalD2 == 7)
12520  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
12521  if (kcountHEnegativedirectionRecosignalD2 == 8)
12522  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
12523  if (kcountHEnegativedirectionRecosignalD2 == 9)
12524  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
12525  if (kcountHEnegativedirectionRecosignalD2 == 10)
12526  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
12527  if (kcountHEnegativedirectionRecosignalD2 == 11)
12528  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
12529  if (kcountHEnegativedirectionRecosignalD2 == 12)
12530  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
12531  if (kcountHEnegativedirectionRecosignalD2 == 13)
12532  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
12533  HEnegativedirectionRecosignalD2->Draw("Error");
12534  kcountHEnegativedirectionRecosignalD2++;
12535  if (kcountHEnegativedirectionRecosignalD2 > 13)
12536  break; // 4x6 = 24
12537  } //ccctest>0
12538 
12539  } // for i
12540  } //if(jeta-41 < 0)
12541  } //for jeta
12543  c3x5->Update();
12544  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
12545  c3x5->Clear();
12546  // clean-up
12547  if (h2CeffHEnegativedirectionRecosignalD2)
12548  delete h2CeffHEnegativedirectionRecosignalD2;
12549  //========================================================================================== 22222216
12550  //======================================================================
12551  //======================================================================1D plot: D vs phi , different eta, depth=3
12552  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
12553  c3x5->Clear();
12554  c3x5->Divide(3, 5);
12555  c3x5->cd(1);
12556  int kcountHEnegativedirectionRecosignalD3 = 1;
12557  TH1F *h2CeffHEnegativedirectionRecosignalD3 = new TH1F("h2CeffHEnegativedirectionRecosignalD3", "", nphi, 0., 72.);
12558 
12559  for (int jeta = 0; jeta < njeta; jeta++) {
12560  // negativedirectionRecosignalD:
12561  if (jeta - 41 < 0) {
12562  // for (int i=0;i<ndepth;i++) {
12563  // depth=3
12564  for (int i = 2; i < 3; i++) {
12565  TH1F *HEnegativedirectionRecosignalD3 = (TH1F *)h2CeffHEnegativedirectionRecosignalD3->Clone("twod1");
12566 
12567  float ccctest = 0; // to avoid empty massive elements
12568  for (int jphi = 0; jphi < nphi; jphi++) {
12569  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12570  if (arecosignalhe[i][jeta][jphi] > 0.) {
12571  HEnegativedirectionRecosignalD3->Fill(jphi, ccc1);
12572  ccctest = 1.; //HEnegativedirectionRecosignalD3->SetBinError(i,0.01);
12573  }
12574  } // for jphi
12575  if (ccctest > 0.) {
12576  //cout<<"1616 kcountHEnegativedirectionRecosignalD3 = "<<kcountHEnegativedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
12577  c3x5->cd(kcountHEnegativedirectionRecosignalD3);
12578  HEnegativedirectionRecosignalD3->SetMarkerStyle(20);
12579  HEnegativedirectionRecosignalD3->SetMarkerSize(0.4);
12580  HEnegativedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
12581  HEnegativedirectionRecosignalD3->SetXTitle("HEnegativedirectionRecosignalD3 \b");
12582  HEnegativedirectionRecosignalD3->SetMarkerColor(2);
12583  HEnegativedirectionRecosignalD3->SetLineColor(0);
12584  gPad->SetGridy();
12585  gPad->SetGridx();
12586  // gPad->SetLogy();
12587  if (kcountHEnegativedirectionRecosignalD3 == 1)
12588  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
12589  if (kcountHEnegativedirectionRecosignalD3 == 2)
12590  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
12591  if (kcountHEnegativedirectionRecosignalD3 == 3)
12592  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
12593  if (kcountHEnegativedirectionRecosignalD3 == 4)
12594  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
12595  if (kcountHEnegativedirectionRecosignalD3 == 5)
12596  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
12597  if (kcountHEnegativedirectionRecosignalD3 == 6)
12598  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
12599  if (kcountHEnegativedirectionRecosignalD3 == 7)
12600  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
12601  if (kcountHEnegativedirectionRecosignalD3 == 8)
12602  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
12603  if (kcountHEnegativedirectionRecosignalD3 == 9)
12604  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
12605  if (kcountHEnegativedirectionRecosignalD3 == 10)
12606  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
12607  if (kcountHEnegativedirectionRecosignalD3 == 11)
12608  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
12609  if (kcountHEnegativedirectionRecosignalD3 == 12)
12610  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
12611  if (kcountHEnegativedirectionRecosignalD3 == 13)
12612  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
12613  HEnegativedirectionRecosignalD3->Draw("Error");
12614  kcountHEnegativedirectionRecosignalD3++;
12615  if (kcountHEnegativedirectionRecosignalD3 > 13)
12616  break; // 4x6 = 24
12617  } //ccctest>0
12618 
12619  } // for i
12620  } //if(jeta-41 < 0)
12621  } //for jeta
12623  c3x5->Update();
12624  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
12625  c3x5->Clear();
12626  // clean-up
12627  if (h2CeffHEnegativedirectionRecosignalD3)
12628  delete h2CeffHEnegativedirectionRecosignalD3;
12629  //========================================================================================== 22222217
12630  //======================================================================
12631  //======================================================================1D plot: D vs phi , different eta, depth=4
12632  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
12633  c3x5->Clear();
12634  c3x5->Divide(3, 5);
12635  c3x5->cd(1);
12636  int kcountHEnegativedirectionRecosignalD4 = 1;
12637  TH1F *h2CeffHEnegativedirectionRecosignalD4 = new TH1F("h2CeffHEnegativedirectionRecosignalD4", "", nphi, 0., 72.);
12638 
12639  for (int jeta = 0; jeta < njeta; jeta++) {
12640  // negativedirectionRecosignalD:
12641  if (jeta - 41 < 0) {
12642  // for (int i=0;i<ndepth;i++) {
12643  // depth=4
12644  for (int i = 3; i < 4; i++) {
12645  TH1F *HEnegativedirectionRecosignalD4 = (TH1F *)h2CeffHEnegativedirectionRecosignalD4->Clone("twod1");
12646 
12647  float ccctest = 0; // to avoid empty massive elements
12648  for (int jphi = 0; jphi < nphi; jphi++) {
12649  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12650  if (arecosignalhe[i][jeta][jphi] > 0.) {
12651  HEnegativedirectionRecosignalD4->Fill(jphi, ccc1);
12652  ccctest = 1.; //HEnegativedirectionRecosignalD4->SetBinError(i,0.01);
12653  }
12654  } // for jphi
12655  if (ccctest > 0.) {
12656  //cout<<"1717 kcountHEnegativedirectionRecosignalD4 = "<<kcountHEnegativedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
12657  c3x5->cd(kcountHEnegativedirectionRecosignalD4);
12658  HEnegativedirectionRecosignalD4->SetMarkerStyle(20);
12659  HEnegativedirectionRecosignalD4->SetMarkerSize(0.4);
12660  HEnegativedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
12661  HEnegativedirectionRecosignalD4->SetXTitle("HEnegativedirectionRecosignalD4 \b");
12662  HEnegativedirectionRecosignalD4->SetMarkerColor(2);
12663  HEnegativedirectionRecosignalD4->SetLineColor(0);
12664  gPad->SetGridy();
12665  gPad->SetGridx();
12666  // gPad->SetLogy();
12667  if (kcountHEnegativedirectionRecosignalD4 == 1)
12668  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
12669  if (kcountHEnegativedirectionRecosignalD4 == 2)
12670  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
12671  if (kcountHEnegativedirectionRecosignalD4 == 3)
12672  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
12673  if (kcountHEnegativedirectionRecosignalD4 == 4)
12674  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
12675  if (kcountHEnegativedirectionRecosignalD4 == 5)
12676  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
12677  if (kcountHEnegativedirectionRecosignalD4 == 6)
12678  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
12679  if (kcountHEnegativedirectionRecosignalD4 == 7)
12680  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
12681  if (kcountHEnegativedirectionRecosignalD4 == 8)
12682  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
12683  if (kcountHEnegativedirectionRecosignalD4 == 9)
12684  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
12685  if (kcountHEnegativedirectionRecosignalD4 == 10)
12686  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
12687  if (kcountHEnegativedirectionRecosignalD4 == 11)
12688  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
12689  if (kcountHEnegativedirectionRecosignalD4 == 12)
12690  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
12691  HEnegativedirectionRecosignalD4->Draw("Error");
12692  kcountHEnegativedirectionRecosignalD4++;
12693  if (kcountHEnegativedirectionRecosignalD4 > 12)
12694  break; // 4x6 = 24
12695  } //ccctest>0
12696 
12697  } // for i
12698  } //if(jeta-41 < 0)
12699  } //for jeta
12701  c3x5->Update();
12702  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
12703  c3x5->Clear();
12704  // clean-up
12705  if (h2CeffHEnegativedirectionRecosignalD4)
12706  delete h2CeffHEnegativedirectionRecosignalD4;
12707  //========================================================================================== 22222218
12708  //======================================================================
12709  //======================================================================1D plot: D vs phi , different eta, depth=5
12710  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
12711  c3x5->Clear();
12712  c3x5->Divide(3, 5);
12713  c3x5->cd(1);
12714  int kcountHEnegativedirectionRecosignalD5 = 1;
12715  TH1F *h2CeffHEnegativedirectionRecosignalD5 = new TH1F("h2CeffHEnegativedirectionRecosignalD5", "", nphi, 0., 72.);
12716 
12717  for (int jeta = 0; jeta < njeta; jeta++) {
12718  // negativedirectionRecosignalD:
12719  if (jeta - 41 < 0) {
12720  // for (int i=0;i<ndepth;i++) {
12721  // depth=5
12722  for (int i = 4; i < 5; i++) {
12723  TH1F *HEnegativedirectionRecosignalD5 = (TH1F *)h2CeffHEnegativedirectionRecosignalD5->Clone("twod1");
12724 
12725  float ccctest = 0; // to avoid empty massive elements
12726  for (int jphi = 0; jphi < nphi; jphi++) {
12727  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12728  if (arecosignalhe[i][jeta][jphi] > 0.) {
12729  HEnegativedirectionRecosignalD5->Fill(jphi, ccc1);
12730  ccctest = 1.; //HEnegativedirectionRecosignalD5->SetBinError(i,0.01);
12731  }
12732  } // for jphi
12733  if (ccctest > 0.) {
12734  //cout<<"1818 kcountHEnegativedirectionRecosignalD5 = "<<kcountHEnegativedirectionRecosignalD5 <<" jeta-41= "<< jeta-41 <<endl;
12735  c3x5->cd(kcountHEnegativedirectionRecosignalD5);
12736  HEnegativedirectionRecosignalD5->SetMarkerStyle(20);
12737  HEnegativedirectionRecosignalD5->SetMarkerSize(0.4);
12738  HEnegativedirectionRecosignalD5->GetYaxis()->SetLabelSize(0.04);
12739  HEnegativedirectionRecosignalD5->SetXTitle("HEnegativedirectionRecosignalD5 \b");
12740  HEnegativedirectionRecosignalD5->SetMarkerColor(2);
12741  HEnegativedirectionRecosignalD5->SetLineColor(0);
12742  gPad->SetGridy();
12743  gPad->SetGridx();
12744  // gPad->SetLogy();
12745  if (kcountHEnegativedirectionRecosignalD5 == 1)
12746  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
12747  if (kcountHEnegativedirectionRecosignalD5 == 2)
12748  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
12749  if (kcountHEnegativedirectionRecosignalD5 == 3)
12750  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
12751  if (kcountHEnegativedirectionRecosignalD5 == 4)
12752  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
12753  if (kcountHEnegativedirectionRecosignalD5 == 5)
12754  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
12755  if (kcountHEnegativedirectionRecosignalD5 == 6)
12756  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
12757  if (kcountHEnegativedirectionRecosignalD5 == 7)
12758  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
12759  if (kcountHEnegativedirectionRecosignalD5 == 8)
12760  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
12761  if (kcountHEnegativedirectionRecosignalD5 == 9)
12762  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
12763  if (kcountHEnegativedirectionRecosignalD5 == 10)
12764  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
12765  if (kcountHEnegativedirectionRecosignalD5 == 11)
12766  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
12767  HEnegativedirectionRecosignalD5->Draw("Error");
12768  kcountHEnegativedirectionRecosignalD5++;
12769  if (kcountHEnegativedirectionRecosignalD5 > 11)
12770  break; // 4x6 = 24
12771  } //ccctest>0
12772 
12773  } // for i
12774  } //if(jeta-41 < 0)
12775  } //for jeta
12777  c3x5->Update();
12778  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
12779  c3x5->Clear();
12780  // clean-up
12781  if (h2CeffHEnegativedirectionRecosignalD5)
12782  delete h2CeffHEnegativedirectionRecosignalD5;
12783  //========================================================================================== 22222219
12784  //======================================================================
12785  //======================================================================1D plot: D vs phi , different eta, depth=6
12786  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
12787  c3x5->Clear();
12788  c3x5->Divide(3, 5);
12789  c3x5->cd(1);
12790  int kcountHEnegativedirectionRecosignalD6 = 1;
12791  TH1F *h2CeffHEnegativedirectionRecosignalD6 = new TH1F("h2CeffHEnegativedirectionRecosignalD6", "", nphi, 0., 72.);
12792 
12793  for (int jeta = 0; jeta < njeta; jeta++) {
12794  // negativedirectionRecosignalD:
12795  if (jeta - 41 < 0) {
12796  // for (int i=0;i<ndepth;i++) {
12797  // depth=6
12798  for (int i = 5; i < 6; i++) {
12799  TH1F *HEnegativedirectionRecosignalD6 = (TH1F *)h2CeffHEnegativedirectionRecosignalD6->Clone("twod1");
12800 
12801  float ccctest = 0; // to avoid empty massive elements
12802  for (int jphi = 0; jphi < nphi; jphi++) {
12803  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12804  if (arecosignalhe[i][jeta][jphi] > 0.) {
12805  HEnegativedirectionRecosignalD6->Fill(jphi, ccc1);
12806  ccctest = 1.; //HEnegativedirectionRecosignalD6->SetBinError(i,0.01);
12807  }
12808  } // for jphi
12809  if (ccctest > 0.) {
12810  //cout<<"1919 kcountHEnegativedirectionRecosignalD6 = "<<kcountHEnegativedirectionRecosignalD6 <<" jeta-41= "<< jeta-41 <<endl;
12811  c3x5->cd(kcountHEnegativedirectionRecosignalD6);
12812  HEnegativedirectionRecosignalD6->SetMarkerStyle(20);
12813  HEnegativedirectionRecosignalD6->SetMarkerSize(0.4);
12814  HEnegativedirectionRecosignalD6->GetYaxis()->SetLabelSize(0.04);
12815  HEnegativedirectionRecosignalD6->SetXTitle("HEnegativedirectionRecosignalD6 \b");
12816  HEnegativedirectionRecosignalD6->SetMarkerColor(2);
12817  HEnegativedirectionRecosignalD6->SetLineColor(0);
12818  gPad->SetGridy();
12819  gPad->SetGridx();
12820  // gPad->SetLogy();
12821  if (kcountHEnegativedirectionRecosignalD6 == 1)
12822  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
12823  if (kcountHEnegativedirectionRecosignalD6 == 2)
12824  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
12825  if (kcountHEnegativedirectionRecosignalD6 == 3)
12826  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
12827  if (kcountHEnegativedirectionRecosignalD6 == 4)
12828  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
12829  if (kcountHEnegativedirectionRecosignalD6 == 5)
12830  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
12831  if (kcountHEnegativedirectionRecosignalD6 == 6)
12832  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
12833  if (kcountHEnegativedirectionRecosignalD6 == 7)
12834  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
12835  if (kcountHEnegativedirectionRecosignalD6 == 8)
12836  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
12837  if (kcountHEnegativedirectionRecosignalD6 == 9)
12838  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
12839  if (kcountHEnegativedirectionRecosignalD6 == 10)
12840  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
12841  HEnegativedirectionRecosignalD6->Draw("Error");
12842  kcountHEnegativedirectionRecosignalD6++;
12843  if (kcountHEnegativedirectionRecosignalD6 > 10)
12844  break; // 4x6 = 24
12845  } //ccctest>0
12846 
12847  } // for i
12848  } //if(jeta-41 < 0)
12849  } //for jeta
12851  c3x5->Update();
12852  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
12853  c3x5->Clear();
12854  // clean-up
12855  if (h2CeffHEnegativedirectionRecosignalD6)
12856  delete h2CeffHEnegativedirectionRecosignalD6;
12857  //========================================================================================== 22222220
12858  //======================================================================
12859  //======================================================================1D plot: D vs phi , different eta, depth=7
12860  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
12861  c3x5->Clear();
12862  c3x5->Divide(3, 5);
12863  c3x5->cd(1);
12864  int kcountHEnegativedirectionRecosignalD7 = 1;
12865  TH1F *h2CeffHEnegativedirectionRecosignalD7 = new TH1F("h2CeffHEnegativedirectionRecosignalD7", "", nphi, 0., 72.);
12866 
12867  for (int jeta = 0; jeta < njeta; jeta++) {
12868  // negativedirectionRecosignalD:
12869  if (jeta - 41 < 0) {
12870  // for (int i=0;i<ndepth;i++) {
12871  // depth=7
12872  for (int i = 6; i < 7; i++) {
12873  TH1F *HEnegativedirectionRecosignalD7 = (TH1F *)h2CeffHEnegativedirectionRecosignalD7->Clone("twod1");
12874 
12875  float ccctest = 0; // to avoid empty massive elements
12876  for (int jphi = 0; jphi < nphi; jphi++) {
12877  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12878  if (arecosignalhe[i][jeta][jphi] > 0.) {
12879  HEnegativedirectionRecosignalD7->Fill(jphi, ccc1);
12880  ccctest = 1.; //HEnegativedirectionRecosignalD7->SetBinError(i,0.01);
12881  }
12882  } // for jphi
12883  if (ccctest != 0.) {
12884  //cout<<"2020 kcountHEnegativedirectionRecosignalD7 = "<<kcountHEnegativedirectionRecosignalD7 <<" jeta-41= "<< jeta-41 <<endl;
12885  c3x5->cd(kcountHEnegativedirectionRecosignalD7);
12886  HEnegativedirectionRecosignalD7->SetMarkerStyle(20);
12887  HEnegativedirectionRecosignalD7->SetMarkerSize(0.4);
12888  HEnegativedirectionRecosignalD7->GetYaxis()->SetLabelSize(0.04);
12889  HEnegativedirectionRecosignalD7->SetXTitle("HEnegativedirectionRecosignalD7 \b");
12890  HEnegativedirectionRecosignalD7->SetMarkerColor(2);
12891  HEnegativedirectionRecosignalD7->SetLineColor(0);
12892  gPad->SetGridy();
12893  gPad->SetGridx();
12894  // gPad->SetLogy();
12895  if (kcountHEnegativedirectionRecosignalD7 == 1)
12896  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
12897  if (kcountHEnegativedirectionRecosignalD7 == 2)
12898  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
12899  if (kcountHEnegativedirectionRecosignalD7 == 3)
12900  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
12901  HEnegativedirectionRecosignalD7->Draw("Error");
12902  kcountHEnegativedirectionRecosignalD7++;
12903  if (kcountHEnegativedirectionRecosignalD7 > 3)
12904  break; // 4x6 = 24
12905  } //ccctest>0
12906 
12907  } // for i
12908  } //if(jeta-41 < 0)
12909  } //for jeta
12911  c3x5->Update();
12912  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
12913  c3x5->Clear();
12914  // clean-up
12915  if (h2CeffHEnegativedirectionRecosignalD7)
12916  delete h2CeffHEnegativedirectionRecosignalD7;
12917  //===================================================================== END of Recosignal HE for phi-symmetry
12918  //===================================================================== END of Recosignal HE for phi-symmetry
12919  //===================================================================== END of Recosignal HE for phi-symmetry
12923  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
12924  //ndepth = k_max[5];
12925  ndepth = 2;
12926  double arecosignalHF[ndepth][njeta][njphi];
12927  double recosignalvarianceHF[ndepth][njeta][njphi];
12928  //cout<<"111RRRRRRRRRRRRRRRRRRRRRRRRR Recosignal HF" <<endl;
12929  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HF
12930  TH2F *recSignalEnergy1HF1 = (TH2F *)hfile->Get("h_recSignalEnergy1_HF1");
12931  TH2F *recSignalEnergy0HF1 = (TH2F *)hfile->Get("h_recSignalEnergy0_HF1");
12932  TH2F *recSignalEnergyHF1 = (TH2F *)recSignalEnergy1HF1->Clone("recSignalEnergyHF1");
12933  recSignalEnergyHF1->Divide(recSignalEnergy1HF1, recSignalEnergy0HF1, 1, 1, "B");
12934  TH2F *recSignalEnergy1HF2 = (TH2F *)hfile->Get("h_recSignalEnergy1_HF2");
12935  TH2F *recSignalEnergy0HF2 = (TH2F *)hfile->Get("h_recSignalEnergy0_HF2");
12936  TH2F *recSignalEnergyHF2 = (TH2F *)recSignalEnergy1HF2->Clone("recSignalEnergyHF2");
12937  recSignalEnergyHF2->Divide(recSignalEnergy1HF2, recSignalEnergy0HF2, 1, 1, "B");
12938  // cout<<"222RRRRRRRRRRRRRRRRRRRRRRRRR Recosignal HF" <<endl;
12939  //====================================================================== PHI normalization & put R into massive arecosignalHF
12940  for (int jeta = 0; jeta < njeta; jeta++) {
12941  //preparation for PHI normalization:
12942  double sumrecosignalHF0 = 0;
12943  int nsumrecosignalHF0 = 0;
12944  double sumrecosignalHF1 = 0;
12945  int nsumrecosignalHF1 = 0;
12946  for (int jphi = 0; jphi < njphi; jphi++) {
12947  arecosignalHF[0][jeta][jphi] = recSignalEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
12948  arecosignalHF[1][jeta][jphi] = recSignalEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
12949  if (arecosignalHF[0][jeta][jphi] > 0.) {
12950  sumrecosignalHF0 += arecosignalHF[0][jeta][jphi];
12951  ++nsumrecosignalHF0;
12952  }
12953  if (arecosignalHF[1][jeta][jphi] > 0.) {
12954  sumrecosignalHF1 += arecosignalHF[1][jeta][jphi];
12955  ++nsumrecosignalHF1;
12956  }
12957  } // phi
12958  // PHI normalization:
12959  for (int jphi = 0; jphi < njphi; jphi++) {
12960  if (arecosignalHF[0][jeta][jphi] > 0.)
12961  arecosignalHF[0][jeta][jphi] /= (sumrecosignalHF0 / nsumrecosignalHF0);
12962  if (arecosignalHF[1][jeta][jphi] > 0.)
12963  arecosignalHF[1][jeta][jphi] /= (sumrecosignalHF1 / nsumrecosignalHF1);
12964  } // phi
12965  } //eta
12966  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
12967  //======================================================================
12968  //======================================================================
12969  // cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
12970  c2x1->Clear();
12972  c2x1->Divide(2, 1);
12973  c2x1->cd(1);
12974  TH2F *GefzRrecosignalHF42D = new TH2F("GefzRrecosignalHF42D", "", neta, -41., 41., nphi, 0., 72.);
12975  TH2F *GefzRrecosignalHF42D0 = new TH2F("GefzRrecosignalHF42D0", "", neta, -41., 41., nphi, 0., 72.);
12976  TH2F *GefzRrecosignalHF42DF = (TH2F *)GefzRrecosignalHF42D0->Clone("GefzRrecosignalHF42DF");
12977  for (int i = 0; i < ndepth; i++) {
12978  for (int jeta = 0; jeta < neta; jeta++) {
12979  for (int jphi = 0; jphi < nphi; jphi++) {
12980  double ccc1 = arecosignalHF[i][jeta][jphi];
12981  int k2plot = jeta - 41;
12982  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
12983  if (ccc1 != 0.) {
12984  GefzRrecosignalHF42D->Fill(kkk, jphi, ccc1);
12985  GefzRrecosignalHF42D0->Fill(kkk, jphi, 1.);
12986  }
12987  }
12988  }
12989  }
12990  GefzRrecosignalHF42DF->Divide(GefzRrecosignalHF42D, GefzRrecosignalHF42D0, 1, 1, "B"); // average A
12991  gPad->SetGridy();
12992  gPad->SetGridx(); // gPad->SetLogz();
12993  GefzRrecosignalHF42DF->SetXTitle("<R>_depth #eta \b");
12994  GefzRrecosignalHF42DF->SetYTitle(" #phi \b");
12995  GefzRrecosignalHF42DF->Draw("COLZ");
12996 
12997  c2x1->cd(2);
12998  TH1F *energyhitSignal_HF = (TH1F *)hfile->Get("h_energyhitSignal_HF");
12999  energyhitSignal_HF->SetMarkerStyle(20);
13000  energyhitSignal_HF->SetMarkerSize(0.4);
13001  energyhitSignal_HF->GetYaxis()->SetLabelSize(0.04);
13002  energyhitSignal_HF->SetXTitle("energyhitSignal_HF \b");
13003  energyhitSignal_HF->SetMarkerColor(2);
13004  energyhitSignal_HF->SetLineColor(0);
13005  gPad->SetGridy();
13006  gPad->SetGridx();
13007  energyhitSignal_HF->Draw("Error");
13008 
13010  c2x1->Update();
13011  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHF.png");
13012  c2x1->Clear();
13013  // clean-up
13014  if (GefzRrecosignalHF42D)
13015  delete GefzRrecosignalHF42D;
13016  if (GefzRrecosignalHF42D0)
13017  delete GefzRrecosignalHF42D0;
13018  if (GefzRrecosignalHF42DF)
13019  delete GefzRrecosignalHF42DF;
13020  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
13021  //======================================================================
13022  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
13023  c1x1->Clear();
13025  c1x1->Divide(1, 1);
13026  c1x1->cd(1);
13027  TH1F *GefzRrecosignalHF41D = new TH1F("GefzRrecosignalHF41D", "", nphi, 0., 72.);
13028  TH1F *GefzRrecosignalHF41D0 = new TH1F("GefzRrecosignalHF41D0", "", nphi, 0., 72.);
13029  TH1F *GefzRrecosignalHF41DF = (TH1F *)GefzRrecosignalHF41D0->Clone("GefzRrecosignalHF41DF");
13030  for (int jphi = 0; jphi < nphi; jphi++) {
13031  for (int jeta = 0; jeta < neta; jeta++) {
13032  for (int i = 0; i < ndepth; i++) {
13033  double ccc1 = arecosignalHF[i][jeta][jphi];
13034  if (ccc1 != 0.) {
13035  GefzRrecosignalHF41D->Fill(jphi, ccc1);
13036  GefzRrecosignalHF41D0->Fill(jphi, 1.);
13037  }
13038  }
13039  }
13040  }
13041  GefzRrecosignalHF41DF->Divide(
13042  GefzRrecosignalHF41D, GefzRrecosignalHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
13043  GefzRrecosignalHF41D0->Sumw2();
13044  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHF41DF->SetBinError(jphi,0.01);}
13045  gPad->SetGridy();
13046  gPad->SetGridx(); // gPad->SetLogz();
13047  GefzRrecosignalHF41DF->SetMarkerStyle(20);
13048  GefzRrecosignalHF41DF->SetMarkerSize(1.4);
13049  GefzRrecosignalHF41DF->GetZaxis()->SetLabelSize(0.08);
13050  GefzRrecosignalHF41DF->SetXTitle("#phi \b");
13051  GefzRrecosignalHF41DF->SetYTitle(" <R> \b");
13052  GefzRrecosignalHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
13053  GefzRrecosignalHF41DF->SetMarkerColor(4);
13054  GefzRrecosignalHF41DF->SetLineColor(
13055  4); // GefzRrecosignalHF41DF->SetMinimum(0.8); // GefzRrecosignalHF41DF->SetMaximum(1.000);
13056  GefzRrecosignalHF41DF->Draw("Error");
13058  c1x1->Update();
13059  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHF.png");
13060  c1x1->Clear();
13061  // clean-up
13062  if (GefzRrecosignalHF41D)
13063  delete GefzRrecosignalHF41D;
13064  if (GefzRrecosignalHF41D0)
13065  delete GefzRrecosignalHF41D0;
13066  if (GefzRrecosignalHF41DF)
13067  delete GefzRrecosignalHF41DF;
13068  //========================================================================================== 4
13069  //======================================================================
13070  //======================================================================1D plot: R vs phi , different eta, depth=1
13071  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
13072  c3x5->Clear();
13074  c3x5->Divide(3, 5);
13075  c3x5->cd(1);
13076  int kcountHFpositivedirectionRecosignal1 = 1;
13077  TH1F *h2CeffHFpositivedirectionRecosignal1 = new TH1F("h2CeffHFpositivedirectionRecosignal1", "", nphi, 0., 72.);
13078  for (int jeta = 0; jeta < njeta; jeta++) {
13079  // positivedirectionRecosignal:
13080  if (jeta - 41 >= 0) {
13081  // for (int i=0;i<ndepth;i++) {
13082  // depth=1
13083  for (int i = 0; i < 1; i++) {
13084  TH1F *HFpositivedirectionRecosignal1 = (TH1F *)h2CeffHFpositivedirectionRecosignal1->Clone("twod1");
13085  float ccctest = 0; // to avoid empty massive elements
13086  for (int jphi = 0; jphi < nphi; jphi++) {
13087  double ccc1 = arecosignalHF[i][jeta][jphi];
13088  if (ccc1 != 0.) {
13089  HFpositivedirectionRecosignal1->Fill(jphi, ccc1);
13090  ccctest = 1.; //HFpositivedirectionRecosignal1->SetBinError(i,0.01);
13091  }
13092  } // for jphi
13093  if (ccctest > 0.) {
13094  // cout<<"444 kcountHFpositivedirectionRecosignal1 = "<<kcountHFpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
13095  c3x5->cd(kcountHFpositivedirectionRecosignal1);
13096  HFpositivedirectionRecosignal1->SetMarkerStyle(20);
13097  HFpositivedirectionRecosignal1->SetMarkerSize(0.4);
13098  HFpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
13099  HFpositivedirectionRecosignal1->SetXTitle("HFpositivedirectionRecosignal1 \b");
13100  HFpositivedirectionRecosignal1->SetMarkerColor(2);
13101  HFpositivedirectionRecosignal1->SetLineColor(0);
13102  gPad->SetGridy();
13103  gPad->SetGridx();
13104  // gPad->SetLogy();
13105  if (kcountHFpositivedirectionRecosignal1 == 1)
13106  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
13107  if (kcountHFpositivedirectionRecosignal1 == 2)
13108  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
13109  if (kcountHFpositivedirectionRecosignal1 == 3)
13110  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
13111  if (kcountHFpositivedirectionRecosignal1 == 4)
13112  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
13113  if (kcountHFpositivedirectionRecosignal1 == 5)
13114  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
13115  if (kcountHFpositivedirectionRecosignal1 == 6)
13116  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
13117  if (kcountHFpositivedirectionRecosignal1 == 7)
13118  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
13119  if (kcountHFpositivedirectionRecosignal1 == 8)
13120  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
13121  if (kcountHFpositivedirectionRecosignal1 == 9)
13122  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
13123  if (kcountHFpositivedirectionRecosignal1 == 10)
13124  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
13125  if (kcountHFpositivedirectionRecosignal1 == 11)
13126  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
13127  if (kcountHFpositivedirectionRecosignal1 == 12)
13128  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
13129  if (kcountHFpositivedirectionRecosignal1 == 13)
13130  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
13131  HFpositivedirectionRecosignal1->Draw("Error");
13132  kcountHFpositivedirectionRecosignal1++;
13133  if (kcountHFpositivedirectionRecosignal1 > 13)
13134  break; //
13135  } //ccctest>0
13136 
13137  } // for i
13138  } //if(jeta-41 >= 0)
13139  } //for jeta
13141  c3x5->Update();
13142  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
13143  c3x5->Clear();
13144  // clean-up
13145  if (h2CeffHFpositivedirectionRecosignal1)
13146  delete h2CeffHFpositivedirectionRecosignal1;
13147 
13148  //========================================================================================== 5
13149  //======================================================================
13150  //======================================================================1D plot: R vs phi , different eta, depth=2
13151  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
13152  c3x5->Clear();
13154  c3x5->Divide(3, 5);
13155  c3x5->cd(1);
13156  int kcountHFpositivedirectionRecosignal2 = 1;
13157  TH1F *h2CeffHFpositivedirectionRecosignal2 = new TH1F("h2CeffHFpositivedirectionRecosignal2", "", nphi, 0., 72.);
13158  for (int jeta = 0; jeta < njeta; jeta++) {
13159  // positivedirectionRecosignal:
13160  if (jeta - 41 >= 0) {
13161  // for (int i=0;i<ndepth;i++) {
13162  // depth=2
13163  for (int i = 1; i < 2; i++) {
13164  TH1F *HFpositivedirectionRecosignal2 = (TH1F *)h2CeffHFpositivedirectionRecosignal2->Clone("twod1");
13165  float ccctest = 0; // to avoid empty massive elements
13166  for (int jphi = 0; jphi < nphi; jphi++) {
13167  double ccc1 = arecosignalHF[i][jeta][jphi];
13168  if (ccc1 != 0.) {
13169  HFpositivedirectionRecosignal2->Fill(jphi, ccc1);
13170  ccctest = 1.; //HFpositivedirectionRecosignal2->SetBinError(i,0.01);
13171  }
13172  } // for jphi
13173  if (ccctest > 0.) {
13174  //cout<<"555 kcountHFpositivedirectionRecosignal2 = "<<kcountHFpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
13175  c3x5->cd(kcountHFpositivedirectionRecosignal2);
13176  HFpositivedirectionRecosignal2->SetMarkerStyle(20);
13177  HFpositivedirectionRecosignal2->SetMarkerSize(0.4);
13178  HFpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
13179  HFpositivedirectionRecosignal2->SetXTitle("HFpositivedirectionRecosignal2 \b");
13180  HFpositivedirectionRecosignal2->SetMarkerColor(2);
13181  HFpositivedirectionRecosignal2->SetLineColor(0);
13182  gPad->SetGridy();
13183  gPad->SetGridx();
13184  // gPad->SetLogy();
13185  if (kcountHFpositivedirectionRecosignal2 == 1)
13186  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
13187  if (kcountHFpositivedirectionRecosignal2 == 2)
13188  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
13189  if (kcountHFpositivedirectionRecosignal2 == 3)
13190  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
13191  if (kcountHFpositivedirectionRecosignal2 == 4)
13192  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
13193  if (kcountHFpositivedirectionRecosignal2 == 5)
13194  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
13195  if (kcountHFpositivedirectionRecosignal2 == 6)
13196  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
13197  if (kcountHFpositivedirectionRecosignal2 == 7)
13198  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
13199  if (kcountHFpositivedirectionRecosignal2 == 8)
13200  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
13201  if (kcountHFpositivedirectionRecosignal2 == 9)
13202  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
13203  if (kcountHFpositivedirectionRecosignal2 == 10)
13204  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
13205  if (kcountHFpositivedirectionRecosignal2 == 11)
13206  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
13207  if (kcountHFpositivedirectionRecosignal2 == 12)
13208  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
13209  if (kcountHFpositivedirectionRecosignal2 == 13)
13210  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
13211  HFpositivedirectionRecosignal2->Draw("Error");
13212  kcountHFpositivedirectionRecosignal2++;
13213  if (kcountHFpositivedirectionRecosignal2 > 13)
13214  break; // 4x6 = 24
13215  } //ccctest>0
13216 
13217  } // for i
13218  } //if(jeta-41 >= 0)
13219  } //for jeta
13221  c3x5->Update();
13222  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
13223  c3x5->Clear();
13224  // clean-up
13225  if (h2CeffHFpositivedirectionRecosignal2)
13226  delete h2CeffHFpositivedirectionRecosignal2;
13227 
13228  //========================================================================================== 1111114
13229  //======================================================================
13230  //======================================================================1D plot: R vs phi , different eta, depth=1
13231  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
13232  c3x5->Clear();
13234  c3x5->Divide(3, 5);
13235  c3x5->cd(1);
13236  int kcountHFnegativedirectionRecosignal1 = 1;
13237  TH1F *h2CeffHFnegativedirectionRecosignal1 = new TH1F("h2CeffHFnegativedirectionRecosignal1", "", nphi, 0., 72.);
13238  for (int jeta = 0; jeta < njeta; jeta++) {
13239  // negativedirectionRecosignal:
13240  if (jeta - 41 < 0) {
13241  // for (int i=0;i<ndepth;i++) {
13242  // depth=1
13243  for (int i = 0; i < 1; i++) {
13244  TH1F *HFnegativedirectionRecosignal1 = (TH1F *)h2CeffHFnegativedirectionRecosignal1->Clone("twod1");
13245  float ccctest = 0; // to avoid empty massive elements
13246  for (int jphi = 0; jphi < nphi; jphi++) {
13247  double ccc1 = arecosignalHF[i][jeta][jphi];
13248  if (ccc1 != 0.) {
13249  HFnegativedirectionRecosignal1->Fill(jphi, ccc1);
13250  ccctest = 1.; //HFnegativedirectionRecosignal1->SetBinError(i,0.01);
13251  }
13252  } // for jphi
13253  if (ccctest > 0.) {
13254  // cout<<"444 kcountHFnegativedirectionRecosignal1 = "<<kcountHFnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
13255  c3x5->cd(kcountHFnegativedirectionRecosignal1);
13256  HFnegativedirectionRecosignal1->SetMarkerStyle(20);
13257  HFnegativedirectionRecosignal1->SetMarkerSize(0.4);
13258  HFnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
13259  HFnegativedirectionRecosignal1->SetXTitle("HFnegativedirectionRecosignal1 \b");
13260  HFnegativedirectionRecosignal1->SetMarkerColor(2);
13261  HFnegativedirectionRecosignal1->SetLineColor(0);
13262  gPad->SetGridy();
13263  gPad->SetGridx();
13264  // gPad->SetLogy();
13265  if (kcountHFnegativedirectionRecosignal1 == 1)
13266  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
13267  if (kcountHFnegativedirectionRecosignal1 == 2)
13268  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
13269  if (kcountHFnegativedirectionRecosignal1 == 3)
13270  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
13271  if (kcountHFnegativedirectionRecosignal1 == 4)
13272  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
13273  if (kcountHFnegativedirectionRecosignal1 == 5)
13274  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
13275  if (kcountHFnegativedirectionRecosignal1 == 6)
13276  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
13277  if (kcountHFnegativedirectionRecosignal1 == 7)
13278  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
13279  if (kcountHFnegativedirectionRecosignal1 == 8)
13280  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
13281  if (kcountHFnegativedirectionRecosignal1 == 9)
13282  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
13283  if (kcountHFnegativedirectionRecosignal1 == 10)
13284  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
13285  if (kcountHFnegativedirectionRecosignal1 == 11)
13286  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
13287  if (kcountHFnegativedirectionRecosignal1 == 12)
13288  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
13289  if (kcountHFnegativedirectionRecosignal1 == 13)
13290  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
13291  HFnegativedirectionRecosignal1->Draw("Error");
13292  kcountHFnegativedirectionRecosignal1++;
13293  if (kcountHFnegativedirectionRecosignal1 > 13)
13294  break; //
13295  } //ccctest>0
13296 
13297  } // for i
13298  } //if(jeta-41< 0)
13299  } //for jeta
13301  c3x5->Update();
13302  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
13303  c3x5->Clear();
13304  // clean-up
13305  if (h2CeffHFnegativedirectionRecosignal1)
13306  delete h2CeffHFnegativedirectionRecosignal1;
13307 
13308  //========================================================================================== 1111115
13309  //======================================================================
13310  //======================================================================1D plot: R vs phi , different eta, depth=2
13311  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
13312  c3x5->Clear();
13314  c3x5->Divide(3, 5);
13315  c3x5->cd(1);
13316  int kcountHFnegativedirectionRecosignal2 = 1;
13317  TH1F *h2CeffHFnegativedirectionRecosignal2 = new TH1F("h2CeffHFnegativedirectionRecosignal2", "", nphi, 0., 72.);
13318  for (int jeta = 0; jeta < njeta; jeta++) {
13319  // negativedirectionRecosignal:
13320  if (jeta - 41 < 0) {
13321  // for (int i=0;i<ndepth;i++) {
13322  // depth=2
13323  for (int i = 1; i < 2; i++) {
13324  TH1F *HFnegativedirectionRecosignal2 = (TH1F *)h2CeffHFnegativedirectionRecosignal2->Clone("twod1");
13325  float ccctest = 0; // to avoid empty massive elements
13326  for (int jphi = 0; jphi < nphi; jphi++) {
13327  double ccc1 = arecosignalHF[i][jeta][jphi];
13328  if (ccc1 != 0.) {
13329  HFnegativedirectionRecosignal2->Fill(jphi, ccc1);
13330  ccctest = 1.; //HFnegativedirectionRecosignal2->SetBinError(i,0.01);
13331  }
13332  } // for jphi
13333  if (ccctest > 0.) {
13334  //cout<<"555 kcountHFnegativedirectionRecosignal2 = "<<kcountHFnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
13335  c3x5->cd(kcountHFnegativedirectionRecosignal2);
13336  HFnegativedirectionRecosignal2->SetMarkerStyle(20);
13337  HFnegativedirectionRecosignal2->SetMarkerSize(0.4);
13338  HFnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
13339  HFnegativedirectionRecosignal2->SetXTitle("HFnegativedirectionRecosignal2 \b");
13340  HFnegativedirectionRecosignal2->SetMarkerColor(2);
13341  HFnegativedirectionRecosignal2->SetLineColor(0);
13342  gPad->SetGridy();
13343  gPad->SetGridx();
13344  // gPad->SetLogy();
13345  if (kcountHFnegativedirectionRecosignal2 == 1)
13346  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
13347  if (kcountHFnegativedirectionRecosignal2 == 2)
13348  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
13349  if (kcountHFnegativedirectionRecosignal2 == 3)
13350  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
13351  if (kcountHFnegativedirectionRecosignal2 == 4)
13352  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
13353  if (kcountHFnegativedirectionRecosignal2 == 5)
13354  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
13355  if (kcountHFnegativedirectionRecosignal2 == 6)
13356  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
13357  if (kcountHFnegativedirectionRecosignal2 == 7)
13358  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
13359  if (kcountHFnegativedirectionRecosignal2 == 8)
13360  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
13361  if (kcountHFnegativedirectionRecosignal2 == 9)
13362  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
13363  if (kcountHFnegativedirectionRecosignal2 == 10)
13364  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
13365  if (kcountHFnegativedirectionRecosignal2 == 11)
13366  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
13367  if (kcountHFnegativedirectionRecosignal2 == 12)
13368  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
13369  if (kcountHFnegativedirectionRecosignal2 == 13)
13370  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
13371  HFnegativedirectionRecosignal2->Draw("Error");
13372  kcountHFnegativedirectionRecosignal2++;
13373  if (kcountHFnegativedirectionRecosignal2 > 13)
13374  break; // 4x6 = 24
13375  } //ccctest>0
13376 
13377  } // for i
13378  } //if(jeta-41< 0)
13379  } //for jeta
13381  c3x5->Update();
13382  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
13383  c3x5->Clear();
13384  // clean-up
13385  if (h2CeffHFnegativedirectionRecosignal2)
13386  delete h2CeffHFnegativedirectionRecosignal2;
13387 
13388  //======================================================================================================================
13389  //======================================================================================================================
13390  //======================================================================================================================
13391  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
13392 
13393  //cout<<" Start Vaiance: preparation *****" <<endl;
13394  TH2F *recosignalVariance1HF1 = (TH2F *)hfile->Get("h_recSignalEnergy2_HF1");
13395  TH2F *recosignalVariance0HF1 = (TH2F *)hfile->Get("h_recSignalEnergy0_HF1");
13396  TH2F *recosignalVarianceHF1 = (TH2F *)recosignalVariance1HF1->Clone("recosignalVarianceHF1");
13397  recosignalVarianceHF1->Divide(recosignalVariance1HF1, recosignalVariance0HF1, 1, 1, "B");
13398  TH2F *recosignalVariance1HF2 = (TH2F *)hfile->Get("h_recSignalEnergy2_HF2");
13399  TH2F *recosignalVariance0HF2 = (TH2F *)hfile->Get("h_recSignalEnergy0_HF2");
13400  TH2F *recosignalVarianceHF2 = (TH2F *)recosignalVariance1HF2->Clone("recosignalVarianceHF2");
13401  recosignalVarianceHF2->Divide(recosignalVariance1HF2, recosignalVariance0HF2, 1, 1, "B");
13402  //cout<<" Vaiance: preparation DONE *****" <<endl;
13403  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvarianceHF
13404  // = sum(R*R)/N - (sum(R)/N)**2
13405  for (int jeta = 0; jeta < njeta; jeta++) {
13406  //preparation for PHI normalization:
13407  double sumrecosignalHF0 = 0;
13408  int nsumrecosignalHF0 = 0;
13409  double sumrecosignalHF1 = 0;
13410  int nsumrecosignalHF1 = 0;
13411  for (int jphi = 0; jphi < njphi; jphi++) {
13412  recosignalvarianceHF[0][jeta][jphi] = recosignalVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
13413  recosignalvarianceHF[1][jeta][jphi] = recosignalVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
13414  if (recosignalvarianceHF[0][jeta][jphi] > 0.) {
13415  sumrecosignalHF0 += recosignalvarianceHF[0][jeta][jphi];
13416  ++nsumrecosignalHF0;
13417  }
13418  if (recosignalvarianceHF[1][jeta][jphi] > 0.) {
13419  sumrecosignalHF1 += recosignalvarianceHF[1][jeta][jphi];
13420  ++nsumrecosignalHF1;
13421  }
13422  } // phi
13423  // PHI normalization :
13424  for (int jphi = 0; jphi < njphi; jphi++) {
13425  if (recosignalvarianceHF[0][jeta][jphi] > 0.)
13426  recosignalvarianceHF[0][jeta][jphi] /= (sumrecosignalHF0 / nsumrecosignalHF0);
13427  if (recosignalvarianceHF[1][jeta][jphi] > 0.)
13428  recosignalvarianceHF[1][jeta][jphi] /= (sumrecosignalHF1 / nsumrecosignalHF1);
13429  } // phi
13430  // recosignalvarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
13431  for (int jphi = 0; jphi < njphi; jphi++) {
13432  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
13433  recosignalvarianceHF[0][jeta][jphi] -= arecosignalHF[0][jeta][jphi] * arecosignalHF[0][jeta][jphi];
13434  recosignalvarianceHF[0][jeta][jphi] = fabs(recosignalvarianceHF[0][jeta][jphi]);
13435  recosignalvarianceHF[1][jeta][jphi] -= arecosignalHF[1][jeta][jphi] * arecosignalHF[1][jeta][jphi];
13436  recosignalvarianceHF[1][jeta][jphi] = fabs(recosignalvarianceHF[1][jeta][jphi]);
13437  }
13438  }
13439  //cout<<" Vaiance: DONE*****" <<endl;
13440  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
13441  //======================================================================
13442  //======================================================================
13443  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
13444  c1x1->Clear();
13446  c1x0->Divide(1, 1);
13447  c1x0->cd(1);
13448  TH2F *DefzDrecosignalHF42D = new TH2F("DefzDrecosignalHF42D", "", neta, -41., 41., nphi, 0., 72.);
13449  TH2F *DefzDrecosignalHF42D0 = new TH2F("DefzDrecosignalHF42D0", "", neta, -41., 41., nphi, 0., 72.);
13450  TH2F *DefzDrecosignalHF42DF = (TH2F *)DefzDrecosignalHF42D0->Clone("DefzDrecosignalHF42DF");
13451  for (int i = 0; i < ndepth; i++) {
13452  for (int jeta = 0; jeta < neta; jeta++) {
13453  for (int jphi = 0; jphi < nphi; jphi++) {
13454  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13455  int k2plot = jeta - 41;
13456  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
13457  if (arecosignalHF[i][jeta][jphi] > 0.) {
13458  DefzDrecosignalHF42D->Fill(kkk, jphi, ccc1);
13459  DefzDrecosignalHF42D0->Fill(kkk, jphi, 1.);
13460  }
13461  }
13462  }
13463  }
13464  DefzDrecosignalHF42DF->Divide(DefzDrecosignalHF42D, DefzDrecosignalHF42D0, 1, 1, "B"); // average A
13465  // DefzDrecosignalHF1->Sumw2();
13466  gPad->SetGridy();
13467  gPad->SetGridx(); // gPad->SetLogz();
13468  DefzDrecosignalHF42DF->SetMarkerStyle(20);
13469  DefzDrecosignalHF42DF->SetMarkerSize(0.4);
13470  DefzDrecosignalHF42DF->GetZaxis()->SetLabelSize(0.08);
13471  DefzDrecosignalHF42DF->SetXTitle("<D>_depth #eta \b");
13472  DefzDrecosignalHF42DF->SetYTitle(" #phi \b");
13473  DefzDrecosignalHF42DF->SetZTitle("<D>_depth \b");
13474  DefzDrecosignalHF42DF->SetMarkerColor(2);
13475  DefzDrecosignalHF42DF->SetLineColor(
13476  0); // DefzDrecosignalHF42DF->SetMaximum(1.000); // DefzDrecosignalHF42DF->SetMinimum(1.0);
13477  DefzDrecosignalHF42DF->Draw("COLZ");
13479  c1x0->Update();
13480  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHF.png");
13481  c1x0->Clear();
13482  // clean-up
13483  if (DefzDrecosignalHF42D)
13484  delete DefzDrecosignalHF42D;
13485  if (DefzDrecosignalHF42D0)
13486  delete DefzDrecosignalHF42D0;
13487  if (DefzDrecosignalHF42DF)
13488  delete DefzDrecosignalHF42DF;
13489  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
13490  //======================================================================
13491  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
13492  c1x1->Clear();
13494  c1x1->Divide(1, 1);
13495  c1x1->cd(1);
13496  TH1F *DefzDrecosignalHF41D = new TH1F("DefzDrecosignalHF41D", "", nphi, 0., 72.);
13497  TH1F *DefzDrecosignalHF41D0 = new TH1F("DefzDrecosignalHF41D0", "", nphi, 0., 72.);
13498  TH1F *DefzDrecosignalHF41DF = (TH1F *)DefzDrecosignalHF41D0->Clone("DefzDrecosignalHF41DF");
13499 
13500  for (int jphi = 0; jphi < nphi; jphi++) {
13501  for (int jeta = 0; jeta < neta; jeta++) {
13502  for (int i = 0; i < ndepth; i++) {
13503  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13504  if (arecosignalHF[i][jeta][jphi] > 0.) {
13505  DefzDrecosignalHF41D->Fill(jphi, ccc1);
13506  DefzDrecosignalHF41D0->Fill(jphi, 1.);
13507  }
13508  }
13509  }
13510  }
13511  // DefzDrecosignalHF41D->Sumw2();DefzDrecosignalHF41D0->Sumw2();
13512 
13513  DefzDrecosignalHF41DF->Divide(
13514  DefzDrecosignalHF41D, DefzDrecosignalHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
13515  DefzDrecosignalHF41D0->Sumw2();
13516  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHF41DF->SetBinError(jphi,0.01);}
13517  gPad->SetGridy();
13518  gPad->SetGridx(); // gPad->SetLogz();
13519  DefzDrecosignalHF41DF->SetMarkerStyle(20);
13520  DefzDrecosignalHF41DF->SetMarkerSize(1.4);
13521  DefzDrecosignalHF41DF->GetZaxis()->SetLabelSize(0.08);
13522  DefzDrecosignalHF41DF->SetXTitle("#phi \b");
13523  DefzDrecosignalHF41DF->SetYTitle(" <D> \b");
13524  DefzDrecosignalHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
13525  DefzDrecosignalHF41DF->SetMarkerColor(4);
13526  DefzDrecosignalHF41DF->SetLineColor(
13527  4); // DefzDrecosignalHF41DF->SetMinimum(0.8); DefzDrecosignalHF41DF->SetMinimum(-0.015);
13528  DefzDrecosignalHF41DF->Draw("Error");
13530  c1x1->Update();
13531  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHF.png");
13532  c1x1->Clear();
13533  // clean-up
13534  if (DefzDrecosignalHF41D)
13535  delete DefzDrecosignalHF41D;
13536  if (DefzDrecosignalHF41D0)
13537  delete DefzDrecosignalHF41D0;
13538  if (DefzDrecosignalHF41DF)
13539  delete DefzDrecosignalHF41DF;
13540  //========================================================================================== 14
13541  //======================================================================
13542  //======================================================================1D plot: D vs phi , different eta, depth=1
13543  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
13544  c3x5->Clear();
13546  c3x5->Divide(3, 5);
13547  c3x5->cd(1);
13548  int kcountHFpositivedirectionRecosignalD1 = 1;
13549  TH1F *h2CeffHFpositivedirectionRecosignalD1 = new TH1F("h2CeffHFpositivedirectionRecosignalD1", "", nphi, 0., 72.);
13550 
13551  for (int jeta = 0; jeta < njeta; jeta++) {
13552  // positivedirectionRecosignalD:
13553  if (jeta - 41 >= 0) {
13554  // for (int i=0;i<ndepth;i++) {
13555  // depth=1
13556  for (int i = 0; i < 1; i++) {
13557  TH1F *HFpositivedirectionRecosignalD1 = (TH1F *)h2CeffHFpositivedirectionRecosignalD1->Clone("twod1");
13558 
13559  float ccctest = 0; // to avoid empty massive elements
13560  for (int jphi = 0; jphi < nphi; jphi++) {
13561  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13562  if (arecosignalHF[i][jeta][jphi] > 0.) {
13563  HFpositivedirectionRecosignalD1->Fill(jphi, ccc1);
13564  ccctest = 1.; //HFpositivedirectionRecosignalD1->SetBinError(i,0.01);
13565  }
13566  } // for jphi
13567  if (ccctest > 0.) {
13568  //cout<<"1414 kcountHFpositivedirectionRecosignalD1 = "<<kcountHFpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
13569  c3x5->cd(kcountHFpositivedirectionRecosignalD1);
13570  HFpositivedirectionRecosignalD1->SetMarkerStyle(20);
13571  HFpositivedirectionRecosignalD1->SetMarkerSize(0.4);
13572  HFpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
13573  HFpositivedirectionRecosignalD1->SetXTitle("HFpositivedirectionRecosignalD1 \b");
13574  HFpositivedirectionRecosignalD1->SetMarkerColor(2);
13575  HFpositivedirectionRecosignalD1->SetLineColor(0);
13576  gPad->SetGridy();
13577  gPad->SetGridx();
13578  // gPad->SetLogy();
13579  if (kcountHFpositivedirectionRecosignalD1 == 1)
13580  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
13581  if (kcountHFpositivedirectionRecosignalD1 == 2)
13582  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
13583  if (kcountHFpositivedirectionRecosignalD1 == 3)
13584  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
13585  if (kcountHFpositivedirectionRecosignalD1 == 4)
13586  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
13587  if (kcountHFpositivedirectionRecosignalD1 == 5)
13588  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
13589  if (kcountHFpositivedirectionRecosignalD1 == 6)
13590  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
13591  if (kcountHFpositivedirectionRecosignalD1 == 7)
13592  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
13593  if (kcountHFpositivedirectionRecosignalD1 == 8)
13594  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
13595  if (kcountHFpositivedirectionRecosignalD1 == 9)
13596  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
13597  if (kcountHFpositivedirectionRecosignalD1 == 10)
13598  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
13599  if (kcountHFpositivedirectionRecosignalD1 == 11)
13600  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
13601  if (kcountHFpositivedirectionRecosignalD1 == 12)
13602  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
13603  if (kcountHFpositivedirectionRecosignalD1 == 13)
13604  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
13605  HFpositivedirectionRecosignalD1->Draw("Error");
13606  kcountHFpositivedirectionRecosignalD1++;
13607  if (kcountHFpositivedirectionRecosignalD1 > 13)
13608  break; // 4x6 = 24
13609  } //ccctest>0
13610 
13611  } // for i
13612  } //if(jeta-41 >= 0)
13613  } //for jeta
13615  c3x5->Update();
13616  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
13617  c3x5->Clear();
13618  // clean-up
13619  if (h2CeffHFpositivedirectionRecosignalD1)
13620  delete h2CeffHFpositivedirectionRecosignalD1;
13621  //========================================================================================== 15
13622  //======================================================================
13623  //======================================================================1D plot: D vs phi , different eta, depth=2
13624  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
13625  c3x5->Clear();
13626  c3x5->Divide(3, 5);
13627  c3x5->cd(1);
13628  int kcountHFpositivedirectionRecosignalD2 = 1;
13629  TH1F *h2CeffHFpositivedirectionRecosignalD2 = new TH1F("h2CeffHFpositivedirectionRecosignalD2", "", nphi, 0., 72.);
13630 
13631  for (int jeta = 0; jeta < njeta; jeta++) {
13632  // positivedirectionRecosignalD:
13633  if (jeta - 41 >= 0) {
13634  // for (int i=0;i<ndepth;i++) {
13635  // depth=2
13636  for (int i = 1; i < 2; i++) {
13637  TH1F *HFpositivedirectionRecosignalD2 = (TH1F *)h2CeffHFpositivedirectionRecosignalD2->Clone("twod1");
13638 
13639  float ccctest = 0; // to avoid empty massive elements
13640  for (int jphi = 0; jphi < nphi; jphi++) {
13641  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13642  if (arecosignalHF[i][jeta][jphi] > 0.) {
13643  HFpositivedirectionRecosignalD2->Fill(jphi, ccc1);
13644  ccctest = 1.; //HFpositivedirectionRecosignalD2->SetBinError(i,0.01);
13645  }
13646  } // for jphi
13647  if (ccctest > 0.) {
13648  //cout<<"1515 kcountHFpositivedirectionRecosignalD2 = "<<kcountHFpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
13649  c3x5->cd(kcountHFpositivedirectionRecosignalD2);
13650  HFpositivedirectionRecosignalD2->SetMarkerStyle(20);
13651  HFpositivedirectionRecosignalD2->SetMarkerSize(0.4);
13652  HFpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
13653  HFpositivedirectionRecosignalD2->SetXTitle("HFpositivedirectionRecosignalD2 \b");
13654  HFpositivedirectionRecosignalD2->SetMarkerColor(2);
13655  HFpositivedirectionRecosignalD2->SetLineColor(0);
13656  gPad->SetGridy();
13657  gPad->SetGridx();
13658  // gPad->SetLogy();
13659  if (kcountHFpositivedirectionRecosignalD2 == 1)
13660  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
13661  if (kcountHFpositivedirectionRecosignalD2 == 2)
13662  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
13663  if (kcountHFpositivedirectionRecosignalD2 == 3)
13664  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
13665  if (kcountHFpositivedirectionRecosignalD2 == 4)
13666  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
13667  if (kcountHFpositivedirectionRecosignalD2 == 5)
13668  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
13669  if (kcountHFpositivedirectionRecosignalD2 == 6)
13670  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
13671  if (kcountHFpositivedirectionRecosignalD2 == 7)
13672  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
13673  if (kcountHFpositivedirectionRecosignalD2 == 8)
13674  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
13675  if (kcountHFpositivedirectionRecosignalD2 == 9)
13676  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
13677  if (kcountHFpositivedirectionRecosignalD2 == 10)
13678  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
13679  if (kcountHFpositivedirectionRecosignalD2 == 11)
13680  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
13681  if (kcountHFpositivedirectionRecosignalD2 == 12)
13682  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
13683  if (kcountHFpositivedirectionRecosignalD2 == 13)
13684  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
13685  HFpositivedirectionRecosignalD2->Draw("Error");
13686  kcountHFpositivedirectionRecosignalD2++;
13687  if (kcountHFpositivedirectionRecosignalD2 > 13)
13688  break; // 4x6 = 24
13689  } //ccctest>0
13690 
13691  } // for i
13692  } //if(jeta-41 >= 0)
13693  } //for jeta
13695  c3x5->Update();
13696  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
13697  c3x5->Clear();
13698  // clean-up
13699  if (h2CeffHFpositivedirectionRecosignalD2)
13700  delete h2CeffHFpositivedirectionRecosignalD2;
13701  //========================================================================================== 22222214
13702  //======================================================================
13703  //======================================================================1D plot: D vs phi , different eta, depth=1
13704  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
13705  c3x5->Clear();
13707  c3x5->Divide(3, 5);
13708  c3x5->cd(1);
13709  int kcountHFnegativedirectionRecosignalD1 = 1;
13710  TH1F *h2CeffHFnegativedirectionRecosignalD1 = new TH1F("h2CeffHFnegativedirectionRecosignalD1", "", nphi, 0., 72.);
13711 
13712  for (int jeta = 0; jeta < njeta; jeta++) {
13713  // negativedirectionRecosignalD:
13714  if (jeta - 41 < 0) {
13715  // for (int i=0;i<ndepth;i++) {
13716  // depth=1
13717  for (int i = 0; i < 1; i++) {
13718  TH1F *HFnegativedirectionRecosignalD1 = (TH1F *)h2CeffHFnegativedirectionRecosignalD1->Clone("twod1");
13719 
13720  float ccctest = 0; // to avoid empty massive elements
13721  for (int jphi = 0; jphi < nphi; jphi++) {
13722  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13723  if (arecosignalHF[i][jeta][jphi] > 0.) {
13724  HFnegativedirectionRecosignalD1->Fill(jphi, ccc1);
13725  ccctest = 1.; //HFnegativedirectionRecosignalD1->SetBinError(i,0.01);
13726  }
13727  } // for jphi
13728  if (ccctest > 0.) {
13729  //cout<<"1414 kcountHFnegativedirectionRecosignalD1 = "<<kcountHFnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
13730  c3x5->cd(kcountHFnegativedirectionRecosignalD1);
13731  HFnegativedirectionRecosignalD1->SetMarkerStyle(20);
13732  HFnegativedirectionRecosignalD1->SetMarkerSize(0.4);
13733  HFnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
13734  HFnegativedirectionRecosignalD1->SetXTitle("HFnegativedirectionRecosignalD1 \b");
13735  HFnegativedirectionRecosignalD1->SetMarkerColor(2);
13736  HFnegativedirectionRecosignalD1->SetLineColor(0);
13737  gPad->SetGridy();
13738  gPad->SetGridx();
13739  // gPad->SetLogy();
13740  if (kcountHFnegativedirectionRecosignalD1 == 1)
13741  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
13742  if (kcountHFnegativedirectionRecosignalD1 == 2)
13743  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
13744  if (kcountHFnegativedirectionRecosignalD1 == 3)
13745  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
13746  if (kcountHFnegativedirectionRecosignalD1 == 4)
13747  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
13748  if (kcountHFnegativedirectionRecosignalD1 == 5)
13749  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
13750  if (kcountHFnegativedirectionRecosignalD1 == 6)
13751  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
13752  if (kcountHFnegativedirectionRecosignalD1 == 7)
13753  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
13754  if (kcountHFnegativedirectionRecosignalD1 == 8)
13755  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
13756  if (kcountHFnegativedirectionRecosignalD1 == 9)
13757  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
13758  if (kcountHFnegativedirectionRecosignalD1 == 10)
13759  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
13760  if (kcountHFnegativedirectionRecosignalD1 == 11)
13761  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
13762  if (kcountHFnegativedirectionRecosignalD1 == 12)
13763  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
13764  if (kcountHFnegativedirectionRecosignalD1 == 13)
13765  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
13766  HFnegativedirectionRecosignalD1->Draw("Error");
13767  kcountHFnegativedirectionRecosignalD1++;
13768  if (kcountHFnegativedirectionRecosignalD1 > 13)
13769  break; // 4x6 = 24
13770  } //ccctest>0
13771 
13772  } // for i
13773  } //if(jeta-41< 0)
13774  } //for jeta
13776  c3x5->Update();
13777  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
13778  c3x5->Clear();
13779  // clean-up
13780  if (h2CeffHFnegativedirectionRecosignalD1)
13781  delete h2CeffHFnegativedirectionRecosignalD1;
13782  //========================================================================================== 22222215
13783  //======================================================================
13784  //======================================================================1D plot: D vs phi , different eta, depth=2
13785  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
13786  c3x5->Clear();
13787  c3x5->Divide(3, 5);
13788  c3x5->cd(1);
13789  int kcountHFnegativedirectionRecosignalD2 = 1;
13790  TH1F *h2CeffHFnegativedirectionRecosignalD2 = new TH1F("h2CeffHFnegativedirectionRecosignalD2", "", nphi, 0., 72.);
13791 
13792  for (int jeta = 0; jeta < njeta; jeta++) {
13793  // negativedirectionRecosignalD:
13794  if (jeta - 41 < 0) {
13795  // for (int i=0;i<ndepth;i++) {
13796  // depth=2
13797  for (int i = 1; i < 2; i++) {
13798  TH1F *HFnegativedirectionRecosignalD2 = (TH1F *)h2CeffHFnegativedirectionRecosignalD2->Clone("twod1");
13799 
13800  float ccctest = 0; // to avoid empty massive elements
13801  for (int jphi = 0; jphi < nphi; jphi++) {
13802  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13803  if (arecosignalHF[i][jeta][jphi] > 0.) {
13804  HFnegativedirectionRecosignalD2->Fill(jphi, ccc1);
13805  ccctest = 1.; //HFnegativedirectionRecosignalD2->SetBinError(i,0.01);
13806  }
13807  } // for jphi
13808  if (ccctest > 0.) {
13809  //cout<<"1515 kcountHFnegativedirectionRecosignalD2 = "<<kcountHFnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
13810  c3x5->cd(kcountHFnegativedirectionRecosignalD2);
13811  HFnegativedirectionRecosignalD2->SetMarkerStyle(20);
13812  HFnegativedirectionRecosignalD2->SetMarkerSize(0.4);
13813  HFnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
13814  HFnegativedirectionRecosignalD2->SetXTitle("HFnegativedirectionRecosignalD2 \b");
13815  HFnegativedirectionRecosignalD2->SetMarkerColor(2);
13816  HFnegativedirectionRecosignalD2->SetLineColor(0);
13817  gPad->SetGridy();
13818  gPad->SetGridx();
13819  // gPad->SetLogy();
13820  if (kcountHFnegativedirectionRecosignalD2 == 1)
13821  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
13822  if (kcountHFnegativedirectionRecosignalD2 == 2)
13823  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
13824  if (kcountHFnegativedirectionRecosignalD2 == 3)
13825  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
13826  if (kcountHFnegativedirectionRecosignalD2 == 4)
13827  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
13828  if (kcountHFnegativedirectionRecosignalD2 == 5)
13829  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
13830  if (kcountHFnegativedirectionRecosignalD2 == 6)
13831  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
13832  if (kcountHFnegativedirectionRecosignalD2 == 7)
13833  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
13834  if (kcountHFnegativedirectionRecosignalD2 == 8)
13835  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
13836  if (kcountHFnegativedirectionRecosignalD2 == 9)
13837  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
13838  if (kcountHFnegativedirectionRecosignalD2 == 10)
13839  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
13840  if (kcountHFnegativedirectionRecosignalD2 == 11)
13841  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
13842  if (kcountHFnegativedirectionRecosignalD2 == 12)
13843  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
13844  if (kcountHFnegativedirectionRecosignalD2 == 13)
13845  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
13846  HFnegativedirectionRecosignalD2->Draw("Error");
13847  kcountHFnegativedirectionRecosignalD2++;
13848  if (kcountHFnegativedirectionRecosignalD2 > 13)
13849  break; // 4x6 = 24
13850  } //ccctest>0
13851 
13852  } // for i
13853  } //if(jeta-41< 0)
13854  } //for jeta
13856  c3x5->Update();
13857  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
13858  c3x5->Clear();
13859  // clean-up
13860  if (h2CeffHFnegativedirectionRecosignalD2)
13861  delete h2CeffHFnegativedirectionRecosignalD2;
13862 
13863  //===================================================================== END of Recosignal HF for phi-symmetry
13864  //===================================================================== END of Recosignal HF for phi-symmetry
13865  //===================================================================== END of Recosignal HF for phi-symmetry
13866  //============================================================================================================ END of Recosignal for phi-symmetry
13867  //============================================================================================================ END of Recosignal for phi-symmetry
13868  //============================================================================================================ END of Recosignal for phi-symmetry
13869 
13876  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
13877  //ndepth = k_max[5];
13878  ndepth = 4;
13879  double areconoiseHB[ndepth][njeta][njphi];
13880  double breconoiseHB[ndepth][njeta][njphi];
13881  double reconoisevarianceHB[ndepth][njeta][njphi];
13882  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HB recNoiseEnergy
13883  TH2F *recNoiseEnergy1HB1 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HB1");
13884  TH2F *recNoiseEnergy0HB1 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HB1");
13885  TH2F *recNoiseEnergyHB1 = (TH2F *)recNoiseEnergy1HB1->Clone("recNoiseEnergyHB1");
13886  recNoiseEnergyHB1->Divide(recNoiseEnergy1HB1, recNoiseEnergy0HB1, 1, 1, "B");
13887  TH2F *recNoiseEnergy1HB2 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HB2");
13888  TH2F *recNoiseEnergy0HB2 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HB2");
13889  TH2F *recNoiseEnergyHB2 = (TH2F *)recNoiseEnergy1HB2->Clone("recNoiseEnergyHB2");
13890  recNoiseEnergyHB2->Divide(recNoiseEnergy1HB2, recNoiseEnergy0HB2, 1, 1, "B");
13891  TH2F *recNoiseEnergy1HB3 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HB3");
13892  TH2F *recNoiseEnergy0HB3 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HB3");
13893  TH2F *recNoiseEnergyHB3 = (TH2F *)recNoiseEnergy1HB3->Clone("recNoiseEnergyHB3");
13894  recNoiseEnergyHB3->Divide(recNoiseEnergy1HB3, recNoiseEnergy0HB3, 1, 1, "B");
13895  TH2F *recNoiseEnergy1HB4 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HB4");
13896  TH2F *recNoiseEnergy0HB4 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HB4");
13897  TH2F *recNoiseEnergyHB4 = (TH2F *)recNoiseEnergy1HB4->Clone("recNoiseEnergyHB4");
13898  recNoiseEnergyHB4->Divide(recNoiseEnergy1HB4, recNoiseEnergy0HB4, 1, 1, "B");
13899  for (int jeta = 0; jeta < njeta; jeta++) {
13900  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
13901  //====================================================================== PHI normalization & put R into massive areconoiseHB
13902  //preparation for PHI normalization:
13903  double sumreconoiseHB0 = 0;
13904  int nsumreconoiseHB0 = 0;
13905  double sumreconoiseHB1 = 0;
13906  int nsumreconoiseHB1 = 0;
13907  double sumreconoiseHB2 = 0;
13908  int nsumreconoiseHB2 = 0;
13909  double sumreconoiseHB3 = 0;
13910  int nsumreconoiseHB3 = 0;
13911  for (int jphi = 0; jphi < njphi; jphi++) {
13912  areconoiseHB[0][jeta][jphi] = recNoiseEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
13913  areconoiseHB[1][jeta][jphi] = recNoiseEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
13914  areconoiseHB[2][jeta][jphi] = recNoiseEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
13915  areconoiseHB[3][jeta][jphi] = recNoiseEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
13916  breconoiseHB[0][jeta][jphi] = recNoiseEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
13917  breconoiseHB[1][jeta][jphi] = recNoiseEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
13918  breconoiseHB[2][jeta][jphi] = recNoiseEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
13919  breconoiseHB[3][jeta][jphi] = recNoiseEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
13920  if (areconoiseHB[0][jeta][jphi] != 0.) {
13921  sumreconoiseHB0 += areconoiseHB[0][jeta][jphi];
13922  ++nsumreconoiseHB0;
13923  }
13924  if (areconoiseHB[1][jeta][jphi] != 0.) {
13925  sumreconoiseHB1 += areconoiseHB[1][jeta][jphi];
13926  ++nsumreconoiseHB1;
13927  }
13928  if (areconoiseHB[2][jeta][jphi] != 0.) {
13929  sumreconoiseHB2 += areconoiseHB[2][jeta][jphi];
13930  ++nsumreconoiseHB2;
13931  }
13932  if (areconoiseHB[3][jeta][jphi] != 0.) {
13933  sumreconoiseHB3 += areconoiseHB[3][jeta][jphi];
13934  ++nsumreconoiseHB3;
13935  }
13936  } // phi
13937  // PHI normalization: DIF
13938  for (int jphi = 0; jphi < njphi; jphi++) {
13939  if (sumreconoiseHB0 != 0.)
13940  breconoiseHB[0][jeta][jphi] -= (sumreconoiseHB0 / nsumreconoiseHB0);
13941  if (sumreconoiseHB1 != 0.)
13942  breconoiseHB[1][jeta][jphi] -= (sumreconoiseHB1 / nsumreconoiseHB1);
13943  if (sumreconoiseHB2 != 0.)
13944  breconoiseHB[2][jeta][jphi] -= (sumreconoiseHB2 / nsumreconoiseHB2);
13945  if (sumreconoiseHB3 != 0.)
13946  breconoiseHB[3][jeta][jphi] -= (sumreconoiseHB3 / nsumreconoiseHB3);
13947  } // phi
13948  // PHI normalization: R
13949  for (int jphi = 0; jphi < njphi; jphi++) {
13950  if (areconoiseHB[0][jeta][jphi] != 0.)
13951  areconoiseHB[0][jeta][jphi] /= (sumreconoiseHB0 / nsumreconoiseHB0);
13952  if (areconoiseHB[1][jeta][jphi] != 0.)
13953  areconoiseHB[1][jeta][jphi] /= (sumreconoiseHB1 / nsumreconoiseHB1);
13954  if (areconoiseHB[2][jeta][jphi] != 0.)
13955  areconoiseHB[2][jeta][jphi] /= (sumreconoiseHB2 / nsumreconoiseHB2);
13956  if (areconoiseHB[3][jeta][jphi] != 0.)
13957  areconoiseHB[3][jeta][jphi] /= (sumreconoiseHB3 / nsumreconoiseHB3);
13958  } // phi
13959  } //if eta
13960  } //eta
13961  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
13962  //======================================================================
13963  //======================================================================
13964  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
13965  c2x1->Clear();
13967  c2x1->Divide(2, 1);
13968  c2x1->cd(1);
13969  TH2F *GefzRreconoiseHB42D = new TH2F("GefzRreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
13970  TH2F *GefzRreconoiseHB42D0 = new TH2F("GefzRreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
13971  TH2F *GefzRreconoiseHB42DF = (TH2F *)GefzRreconoiseHB42D0->Clone("GefzRreconoiseHB42DF");
13972  for (int i = 0; i < ndepth; i++) {
13973  for (int jeta = 0; jeta < neta; jeta++) {
13974  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
13975  for (int jphi = 0; jphi < nphi; jphi++) {
13976  double ccc1 = areconoiseHB[i][jeta][jphi];
13977  int k2plot = jeta - 41;
13978  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
13979  if (ccc1 != 0.) {
13980  GefzRreconoiseHB42D->Fill(kkk, jphi, ccc1);
13981  GefzRreconoiseHB42D0->Fill(kkk, jphi, 1.);
13982  }
13983  }
13984  }
13985  }
13986  }
13987  GefzRreconoiseHB42DF->Divide(GefzRreconoiseHB42D, GefzRreconoiseHB42D0, 1, 1, "B"); // average A
13988  gPad->SetGridy();
13989  gPad->SetGridx(); // gPad->SetLogz();
13990  GefzRreconoiseHB42DF->SetXTitle("<R>_depth #eta \b");
13991  GefzRreconoiseHB42DF->SetYTitle(" #phi \b");
13992  GefzRreconoiseHB42DF->Draw("COLZ");
13993 
13994  c2x1->cd(2);
13995  TH1F *energyhitNoise_HB = (TH1F *)hfile->Get("h_energyhitNoise_HB");
13996  energyhitNoise_HB->SetMarkerStyle(20);
13997  energyhitNoise_HB->SetMarkerSize(0.4);
13998  energyhitNoise_HB->GetYaxis()->SetLabelSize(0.04);
13999  energyhitNoise_HB->SetXTitle("energyhitNoise_HB \b");
14000  energyhitNoise_HB->SetMarkerColor(2);
14001  energyhitNoise_HB->SetLineColor(0);
14002  gPad->SetGridy();
14003  gPad->SetGridx();
14004  energyhitNoise_HB->Draw("Error");
14005 
14007  c2x1->Update();
14008  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHB.png");
14009  c2x1->Clear();
14010  // clean-up
14011  if (GefzRreconoiseHB42D)
14012  delete GefzRreconoiseHB42D;
14013  if (GefzRreconoiseHB42D0)
14014  delete GefzRreconoiseHB42D0;
14015  if (GefzRreconoiseHB42DF)
14016  delete GefzRreconoiseHB42DF;
14017  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
14018  //======================================================================
14019  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
14020  c1x1->Clear();
14022  c1x1->Divide(1, 1);
14023  c1x1->cd(1);
14024  TH1F *GefzRreconoiseHB41D = new TH1F("GefzRreconoiseHB41D", "", nphi, 0., 72.);
14025  TH1F *GefzRreconoiseHB41D0 = new TH1F("GefzRreconoiseHB41D0", "", nphi, 0., 72.);
14026  TH1F *GefzRreconoiseHB41DF = (TH1F *)GefzRreconoiseHB41D0->Clone("GefzRreconoiseHB41DF");
14027  for (int jphi = 0; jphi < nphi; jphi++) {
14028  for (int jeta = 0; jeta < neta; jeta++) {
14029  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
14030  for (int i = 0; i < ndepth; i++) {
14031  double ccc1 = areconoiseHB[i][jeta][jphi];
14032  if (ccc1 != 0.) {
14033  GefzRreconoiseHB41D->Fill(jphi, ccc1);
14034  GefzRreconoiseHB41D0->Fill(jphi, 1.);
14035  }
14036  }
14037  }
14038  }
14039  }
14040  GefzRreconoiseHB41DF->Divide(GefzRreconoiseHB41D, GefzRreconoiseHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
14041  GefzRreconoiseHB41D0->Sumw2();
14042  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHB41DF->SetBinError(jphi,0.01);}
14043  gPad->SetGridy();
14044  gPad->SetGridx(); // gPad->SetLogz();
14045  GefzRreconoiseHB41DF->SetMarkerStyle(20);
14046  GefzRreconoiseHB41DF->SetMarkerSize(1.4);
14047  GefzRreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
14048  GefzRreconoiseHB41DF->SetXTitle("#phi \b");
14049  GefzRreconoiseHB41DF->SetYTitle(" <R> \b");
14050  GefzRreconoiseHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
14051  GefzRreconoiseHB41DF->SetMarkerColor(4);
14052  GefzRreconoiseHB41DF->SetLineColor(
14053  4); //GefzRreconoiseHB41DF->SetMinimum(0.8); // GefzRreconoiseHB41DF->SetMaximum(1.000);
14054  GefzRreconoiseHB41DF->Draw("Error");
14056  c1x1->Update();
14057  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHB.png");
14058  c1x1->Clear();
14059  // clean-up
14060  if (GefzRreconoiseHB41D)
14061  delete GefzRreconoiseHB41D;
14062  if (GefzRreconoiseHB41D0)
14063  delete GefzRreconoiseHB41D0;
14064  if (GefzRreconoiseHB41DF)
14065  delete GefzRreconoiseHB41DF;
14066  //========================================================================================== 4
14067  //======================================================================
14068  //======================================================================1D plot: R vs phi , different eta, depth=1
14069  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
14070  c3x5->Clear();
14072  c3x5->Divide(4, 4);
14073  c3x5->cd(1);
14074  int kcountHBpositivedirectionReconoise1 = 1;
14075  TH1F *h2CeffHBpositivedirectionReconoise1 = new TH1F("h2CeffHBpositivedirectionReconoise1", "", nphi, 0., 72.);
14076  for (int jeta = 0; jeta < njeta; jeta++) {
14077  // positivedirectionReconoise:
14078  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14079  // for (int i=0;i<ndepth;i++) {
14080  // depth=1
14081  for (int i = 0; i < 1; i++) {
14082  TH1F *HBpositivedirectionReconoise1 = (TH1F *)h2CeffHBpositivedirectionReconoise1->Clone("twod1");
14083  float ccctest = 0; // to avoid empty massive elements
14084  for (int jphi = 0; jphi < nphi; jphi++) {
14085  double ccc1 = areconoiseHB[i][jeta][jphi];
14086  if (ccc1 != 0.) {
14087  HBpositivedirectionReconoise1->Fill(jphi, ccc1);
14088  ccctest = 1.; //HBpositivedirectionReconoise1->SetBinError(i,0.01);
14089  }
14090  } // for jphi
14091  if (ccctest > 0.) {
14092  // cout<<"444 kcountHBpositivedirectionReconoise1 = "<<kcountHBpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
14093  c3x5->cd(kcountHBpositivedirectionReconoise1);
14094  HBpositivedirectionReconoise1->SetMarkerStyle(20);
14095  HBpositivedirectionReconoise1->SetMarkerSize(0.4);
14096  HBpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
14097  HBpositivedirectionReconoise1->SetXTitle("HBpositivedirectionReconoise1 \b");
14098  HBpositivedirectionReconoise1->SetMarkerColor(2);
14099  HBpositivedirectionReconoise1->SetLineColor(0);
14100  gPad->SetGridy();
14101  gPad->SetGridx();
14102  // gPad->SetLogy();
14103  if (kcountHBpositivedirectionReconoise1 == 1)
14104  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
14105  if (kcountHBpositivedirectionReconoise1 == 2)
14106  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
14107  if (kcountHBpositivedirectionReconoise1 == 3)
14108  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
14109  if (kcountHBpositivedirectionReconoise1 == 4)
14110  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
14111  if (kcountHBpositivedirectionReconoise1 == 5)
14112  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
14113  if (kcountHBpositivedirectionReconoise1 == 6)
14114  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
14115  if (kcountHBpositivedirectionReconoise1 == 7)
14116  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
14117  if (kcountHBpositivedirectionReconoise1 == 8)
14118  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
14119  if (kcountHBpositivedirectionReconoise1 == 9)
14120  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
14121  if (kcountHBpositivedirectionReconoise1 == 10)
14122  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
14123  if (kcountHBpositivedirectionReconoise1 == 11)
14124  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
14125  if (kcountHBpositivedirectionReconoise1 == 12)
14126  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
14127  if (kcountHBpositivedirectionReconoise1 == 13)
14128  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
14129  if (kcountHBpositivedirectionReconoise1 == 14)
14130  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
14131  if (kcountHBpositivedirectionReconoise1 == 15)
14132  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
14133  if (kcountHBpositivedirectionReconoise1 == 16)
14134  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
14135  HBpositivedirectionReconoise1->Draw("Error");
14136  kcountHBpositivedirectionReconoise1++;
14137  if (kcountHBpositivedirectionReconoise1 > 16)
14138  break; //
14139  } //ccctest>0
14140 
14141  } // for i
14142  } //if(jeta-41 >= 0)
14143  } //for jeta
14145  c3x5->Update();
14146  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
14147  c3x5->Clear();
14148  // clean-up
14149  if (h2CeffHBpositivedirectionReconoise1)
14150  delete h2CeffHBpositivedirectionReconoise1;
14151 
14152  //========================================================================================== 5
14153  //======================================================================
14154  //======================================================================1D plot: R vs phi , different eta, depth=2
14155  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
14156  c3x5->Clear();
14158  c3x5->Divide(4, 4);
14159  c3x5->cd(1);
14160  int kcountHBpositivedirectionReconoise2 = 1;
14161  TH1F *h2CeffHBpositivedirectionReconoise2 = new TH1F("h2CeffHBpositivedirectionReconoise2", "", nphi, 0., 72.);
14162  for (int jeta = 0; jeta < njeta; jeta++) {
14163  // positivedirectionReconoise:
14164  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14165  // for (int i=0;i<ndepth;i++) {
14166  // depth=2
14167  for (int i = 1; i < 2; i++) {
14168  TH1F *HBpositivedirectionReconoise2 = (TH1F *)h2CeffHBpositivedirectionReconoise2->Clone("twod1");
14169  float ccctest = 0; // to avoid empty massive elements
14170  for (int jphi = 0; jphi < nphi; jphi++) {
14171  double ccc1 = areconoiseHB[i][jeta][jphi];
14172  if (ccc1 != 0.) {
14173  HBpositivedirectionReconoise2->Fill(jphi, ccc1);
14174  ccctest = 1.; //HBpositivedirectionReconoise2->SetBinError(i,0.01);
14175  }
14176  } // for jphi
14177  if (ccctest > 0.) {
14178  //cout<<"555 kcountHBpositivedirectionReconoise2 = "<<kcountHBpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
14179  c3x5->cd(kcountHBpositivedirectionReconoise2);
14180  HBpositivedirectionReconoise2->SetMarkerStyle(20);
14181  HBpositivedirectionReconoise2->SetMarkerSize(0.4);
14182  HBpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
14183  HBpositivedirectionReconoise2->SetXTitle("HBpositivedirectionReconoise2 \b");
14184  HBpositivedirectionReconoise2->SetMarkerColor(2);
14185  HBpositivedirectionReconoise2->SetLineColor(0);
14186  gPad->SetGridy();
14187  gPad->SetGridx();
14188  // gPad->SetLogy();
14189  if (kcountHBpositivedirectionReconoise2 == 1)
14190  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
14191  if (kcountHBpositivedirectionReconoise2 == 2)
14192  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
14193  if (kcountHBpositivedirectionReconoise2 == 3)
14194  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
14195  if (kcountHBpositivedirectionReconoise2 == 4)
14196  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
14197  if (kcountHBpositivedirectionReconoise2 == 5)
14198  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
14199  if (kcountHBpositivedirectionReconoise2 == 6)
14200  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
14201  if (kcountHBpositivedirectionReconoise2 == 7)
14202  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
14203  if (kcountHBpositivedirectionReconoise2 == 8)
14204  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
14205  if (kcountHBpositivedirectionReconoise2 == 9)
14206  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
14207  if (kcountHBpositivedirectionReconoise2 == 10)
14208  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
14209  if (kcountHBpositivedirectionReconoise2 == 11)
14210  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
14211  if (kcountHBpositivedirectionReconoise2 == 12)
14212  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
14213  if (kcountHBpositivedirectionReconoise2 == 13)
14214  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
14215  if (kcountHBpositivedirectionReconoise2 == 14)
14216  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
14217  if (kcountHBpositivedirectionReconoise2 == 15)
14218  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
14219  if (kcountHBpositivedirectionReconoise2 == 16)
14220  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
14221  HBpositivedirectionReconoise2->Draw("Error");
14222  kcountHBpositivedirectionReconoise2++;
14223  if (kcountHBpositivedirectionReconoise2 > 16)
14224  break; // 4x6 = 24
14225  } //ccctest>0
14226 
14227  } // for i
14228  } //if(jeta-41 >= 0)
14229  } //for jeta
14231  c3x5->Update();
14232  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
14233  c3x5->Clear();
14234  // clean-up
14235  if (h2CeffHBpositivedirectionReconoise2)
14236  delete h2CeffHBpositivedirectionReconoise2;
14237  //========================================================================================== 6
14238  //======================================================================
14239  //======================================================================1D plot: R vs phi , different eta, depth=3
14240  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
14241  c3x5->Clear();
14243  c3x5->Divide(4, 4);
14244  c3x5->cd(1);
14245  int kcountHBpositivedirectionReconoise3 = 1;
14246  TH1F *h2CeffHBpositivedirectionReconoise3 = new TH1F("h2CeffHBpositivedirectionReconoise3", "", nphi, 0., 72.);
14247  for (int jeta = 0; jeta < njeta; jeta++) {
14248  // positivedirectionReconoise:
14249  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14250  // for (int i=0;i<ndepth;i++) {
14251  // depth=3
14252  for (int i = 2; i < 3; i++) {
14253  TH1F *HBpositivedirectionReconoise3 = (TH1F *)h2CeffHBpositivedirectionReconoise3->Clone("twod1");
14254  float ccctest = 0; // to avoid empty massive elements
14255  for (int jphi = 0; jphi < nphi; jphi++) {
14256  double ccc1 = areconoiseHB[i][jeta][jphi];
14257  if (ccc1 != 0.) {
14258  HBpositivedirectionReconoise3->Fill(jphi, ccc1);
14259  ccctest = 1.; //HBpositivedirectionReconoise3->SetBinError(i,0.01);
14260  }
14261  } // for jphi
14262  if (ccctest > 0.) {
14263  //cout<<"666 kcountHBpositivedirectionReconoise3 = "<<kcountHBpositivedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
14264  c3x5->cd(kcountHBpositivedirectionReconoise3);
14265  HBpositivedirectionReconoise3->SetMarkerStyle(20);
14266  HBpositivedirectionReconoise3->SetMarkerSize(0.4);
14267  HBpositivedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
14268  HBpositivedirectionReconoise3->SetXTitle("HBpositivedirectionReconoise3 \b");
14269  HBpositivedirectionReconoise3->SetMarkerColor(2);
14270  HBpositivedirectionReconoise3->SetLineColor(0);
14271  gPad->SetGridy();
14272  gPad->SetGridx();
14273  // gPad->SetLogy();
14274  if (kcountHBpositivedirectionReconoise3 == 1)
14275  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
14276  if (kcountHBpositivedirectionReconoise3 == 2)
14277  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
14278  if (kcountHBpositivedirectionReconoise3 == 3)
14279  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
14280  if (kcountHBpositivedirectionReconoise3 == 4)
14281  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
14282  if (kcountHBpositivedirectionReconoise3 == 5)
14283  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
14284  if (kcountHBpositivedirectionReconoise3 == 6)
14285  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
14286  if (kcountHBpositivedirectionReconoise3 == 7)
14287  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
14288  if (kcountHBpositivedirectionReconoise3 == 8)
14289  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
14290  if (kcountHBpositivedirectionReconoise3 == 9)
14291  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
14292  if (kcountHBpositivedirectionReconoise3 == 10)
14293  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
14294  if (kcountHBpositivedirectionReconoise3 == 11)
14295  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
14296  if (kcountHBpositivedirectionReconoise3 == 12)
14297  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
14298  if (kcountHBpositivedirectionReconoise3 == 13)
14299  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
14300  if (kcountHBpositivedirectionReconoise3 == 14)
14301  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
14302  if (kcountHBpositivedirectionReconoise3 == 15)
14303  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
14304  if (kcountHBpositivedirectionReconoise3 == 16)
14305  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
14306  HBpositivedirectionReconoise3->Draw("Error");
14307  kcountHBpositivedirectionReconoise3++;
14308  if (kcountHBpositivedirectionReconoise3 > 16)
14309  break; // 4x6 = 24
14310  } //ccctest>0
14311 
14312  } // for i
14313  } //if(jeta-41 >= 0)
14314  } //for jeta
14316  c3x5->Update();
14317  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
14318  c3x5->Clear();
14319  // clean-up
14320  if (h2CeffHBpositivedirectionReconoise3)
14321  delete h2CeffHBpositivedirectionReconoise3;
14322  //========================================================================================== 7
14323  //======================================================================
14324  //======================================================================1D plot: R vs phi , different eta, depth=4
14325  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
14326  c3x5->Clear();
14328  c3x5->Divide(4, 4);
14329  c3x5->cd(1);
14330  int kcountHBpositivedirectionReconoise4 = 1;
14331  TH1F *h2CeffHBpositivedirectionReconoise4 = new TH1F("h2CeffHBpositivedirectionReconoise4", "", nphi, 0., 72.);
14332 
14333  for (int jeta = 0; jeta < njeta; jeta++) {
14334  // positivedirectionReconoise:
14335  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14336  // for (int i=0;i<ndepth;i++) {
14337  // depth=4
14338  for (int i = 3; i < 4; i++) {
14339  TH1F *HBpositivedirectionReconoise4 = (TH1F *)h2CeffHBpositivedirectionReconoise4->Clone("twod1");
14340 
14341  float ccctest = 0; // to avoid empty massive elements
14342  for (int jphi = 0; jphi < nphi; jphi++) {
14343  double ccc1 = areconoiseHB[i][jeta][jphi];
14344  if (ccc1 != 0.) {
14345  HBpositivedirectionReconoise4->Fill(jphi, ccc1);
14346  ccctest = 1.; //HBpositivedirectionReconoise4->SetBinError(i,0.01);
14347  }
14348  } // for jphi
14349  if (ccctest > 0.) {
14350  //cout<<"777 kcountHBpositivedirectionReconoise4 = "<<kcountHBpositivedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
14351  c3x5->cd(kcountHBpositivedirectionReconoise4);
14352  HBpositivedirectionReconoise4->SetMarkerStyle(20);
14353  HBpositivedirectionReconoise4->SetMarkerSize(0.4);
14354  HBpositivedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
14355  HBpositivedirectionReconoise4->SetXTitle("HBpositivedirectionReconoise4 \b");
14356  HBpositivedirectionReconoise4->SetMarkerColor(2);
14357  HBpositivedirectionReconoise4->SetLineColor(0);
14358  gPad->SetGridy();
14359  gPad->SetGridx();
14360  // gPad->SetLogy();
14361  if (kcountHBpositivedirectionReconoise4 == 1)
14362  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
14363  if (kcountHBpositivedirectionReconoise4 == 2)
14364  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
14365  if (kcountHBpositivedirectionReconoise4 == 3)
14366  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
14367  if (kcountHBpositivedirectionReconoise4 == 4)
14368  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
14369  if (kcountHBpositivedirectionReconoise4 == 5)
14370  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
14371  if (kcountHBpositivedirectionReconoise4 == 6)
14372  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
14373  if (kcountHBpositivedirectionReconoise4 == 7)
14374  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
14375  if (kcountHBpositivedirectionReconoise4 == 8)
14376  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
14377  if (kcountHBpositivedirectionReconoise4 == 9)
14378  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
14379  if (kcountHBpositivedirectionReconoise4 == 10)
14380  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
14381  if (kcountHBpositivedirectionReconoise4 == 11)
14382  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
14383  if (kcountHBpositivedirectionReconoise4 == 12)
14384  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
14385  if (kcountHBpositivedirectionReconoise4 == 13)
14386  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
14387  if (kcountHBpositivedirectionReconoise4 == 14)
14388  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
14389  if (kcountHBpositivedirectionReconoise4 == 15)
14390  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
14391  if (kcountHBpositivedirectionReconoise4 == 16)
14392  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
14393  HBpositivedirectionReconoise4->Draw("Error");
14394  kcountHBpositivedirectionReconoise4++;
14395  if (kcountHBpositivedirectionReconoise4 > 16)
14396  break; // 4x6 = 24
14397  } //ccctest>0
14398 
14399  } // for i
14400  } //if(jeta-41 >= 0)
14401  } //for jeta
14403  c3x5->Update();
14404  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
14405  c3x5->Clear();
14406  // clean-up
14407  if (h2CeffHBpositivedirectionReconoise4)
14408  delete h2CeffHBpositivedirectionReconoise4;
14409 
14410  //========================================================================================== 1114
14411  //======================================================================
14412  //======================================================================1D plot: R vs phi , different eta, depth=1
14413  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
14414  c3x5->Clear();
14416  c3x5->Divide(4, 4);
14417  c3x5->cd(1);
14418  int kcountHBnegativedirectionReconoise1 = 1;
14419  TH1F *h2CeffHBnegativedirectionReconoise1 = new TH1F("h2CeffHBnegativedirectionReconoise1", "", nphi, 0., 72.);
14420  for (int jeta = 0; jeta < njeta; jeta++) {
14421  // negativedirectionReconoise:
14422  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14423  // for (int i=0;i<ndepth;i++) {
14424  // depth=1
14425  for (int i = 0; i < 1; i++) {
14426  TH1F *HBnegativedirectionReconoise1 = (TH1F *)h2CeffHBnegativedirectionReconoise1->Clone("twod1");
14427  float ccctest = 0; // to avoid empty massive elements
14428  for (int jphi = 0; jphi < nphi; jphi++) {
14429  double ccc1 = areconoiseHB[i][jeta][jphi];
14430  if (ccc1 != 0.) {
14431  HBnegativedirectionReconoise1->Fill(jphi, ccc1);
14432  ccctest = 1.; //HBnegativedirectionReconoise1->SetBinError(i,0.01);
14433  }
14434  } // for jphi
14435  if (ccctest > 0.) {
14436  // cout<<"444 kcountHBnegativedirectionReconoise1 = "<<kcountHBnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
14437  c3x5->cd(kcountHBnegativedirectionReconoise1);
14438  HBnegativedirectionReconoise1->SetMarkerStyle(20);
14439  HBnegativedirectionReconoise1->SetMarkerSize(0.4);
14440  HBnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
14441  HBnegativedirectionReconoise1->SetXTitle("HBnegativedirectionReconoise1 \b");
14442  HBnegativedirectionReconoise1->SetMarkerColor(2);
14443  HBnegativedirectionReconoise1->SetLineColor(0);
14444  gPad->SetGridy();
14445  gPad->SetGridx();
14446  // gPad->SetLogy();
14447  if (kcountHBnegativedirectionReconoise1 == 1)
14448  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
14449  if (kcountHBnegativedirectionReconoise1 == 2)
14450  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
14451  if (kcountHBnegativedirectionReconoise1 == 3)
14452  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
14453  if (kcountHBnegativedirectionReconoise1 == 4)
14454  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
14455  if (kcountHBnegativedirectionReconoise1 == 5)
14456  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
14457  if (kcountHBnegativedirectionReconoise1 == 6)
14458  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
14459  if (kcountHBnegativedirectionReconoise1 == 7)
14460  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
14461  if (kcountHBnegativedirectionReconoise1 == 8)
14462  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
14463  if (kcountHBnegativedirectionReconoise1 == 9)
14464  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
14465  if (kcountHBnegativedirectionReconoise1 == 10)
14466  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
14467  if (kcountHBnegativedirectionReconoise1 == 11)
14468  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
14469  if (kcountHBnegativedirectionReconoise1 == 12)
14470  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
14471  if (kcountHBnegativedirectionReconoise1 == 13)
14472  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
14473  if (kcountHBnegativedirectionReconoise1 == 14)
14474  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
14475  if (kcountHBnegativedirectionReconoise1 == 15)
14476  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
14477  if (kcountHBnegativedirectionReconoise1 == 16)
14478  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
14479  HBnegativedirectionReconoise1->Draw("Error");
14480  kcountHBnegativedirectionReconoise1++;
14481  if (kcountHBnegativedirectionReconoise1 > 16)
14482  break; //
14483  } //ccctest>0
14484 
14485  } // for i
14486  } //if(jeta-41 < 0 )
14487  } //for jeta
14489  c3x5->Update();
14490  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
14491  c3x5->Clear();
14492  // clean-up
14493  if (h2CeffHBnegativedirectionReconoise1)
14494  delete h2CeffHBnegativedirectionReconoise1;
14495 
14496  //========================================================================================== 1115
14497  //======================================================================
14498  //======================================================================1D plot: R vs phi , different eta, depth=2
14499  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
14500  c3x5->Clear();
14502  c3x5->Divide(4, 4);
14503  c3x5->cd(1);
14504  int kcountHBnegativedirectionReconoise2 = 1;
14505  TH1F *h2CeffHBnegativedirectionReconoise2 = new TH1F("h2CeffHBnegativedirectionReconoise2", "", nphi, 0., 72.);
14506  for (int jeta = 0; jeta < njeta; jeta++) {
14507  // negativedirectionReconoise:
14508  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14509  // for (int i=0;i<ndepth;i++) {
14510  // depth=2
14511  for (int i = 1; i < 2; i++) {
14512  TH1F *HBnegativedirectionReconoise2 = (TH1F *)h2CeffHBnegativedirectionReconoise2->Clone("twod1");
14513  float ccctest = 0; // to avoid empty massive elements
14514  for (int jphi = 0; jphi < nphi; jphi++) {
14515  double ccc1 = areconoiseHB[i][jeta][jphi];
14516  if (ccc1 != 0.) {
14517  HBnegativedirectionReconoise2->Fill(jphi, ccc1);
14518  ccctest = 1.; //HBnegativedirectionReconoise2->SetBinError(i,0.01);
14519  }
14520  } // for jphi
14521  if (ccctest > 0.) {
14522  //cout<<"555 kcountHBnegativedirectionReconoise2 = "<<kcountHBnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
14523  c3x5->cd(kcountHBnegativedirectionReconoise2);
14524  HBnegativedirectionReconoise2->SetMarkerStyle(20);
14525  HBnegativedirectionReconoise2->SetMarkerSize(0.4);
14526  HBnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
14527  HBnegativedirectionReconoise2->SetXTitle("HBnegativedirectionReconoise2 \b");
14528  HBnegativedirectionReconoise2->SetMarkerColor(2);
14529  HBnegativedirectionReconoise2->SetLineColor(0);
14530  gPad->SetGridy();
14531  gPad->SetGridx();
14532  // gPad->SetLogy();
14533  if (kcountHBnegativedirectionReconoise2 == 1)
14534  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
14535  if (kcountHBnegativedirectionReconoise2 == 2)
14536  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
14537  if (kcountHBnegativedirectionReconoise2 == 3)
14538  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
14539  if (kcountHBnegativedirectionReconoise2 == 4)
14540  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
14541  if (kcountHBnegativedirectionReconoise2 == 5)
14542  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
14543  if (kcountHBnegativedirectionReconoise2 == 6)
14544  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
14545  if (kcountHBnegativedirectionReconoise2 == 7)
14546  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
14547  if (kcountHBnegativedirectionReconoise2 == 8)
14548  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
14549  if (kcountHBnegativedirectionReconoise2 == 9)
14550  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
14551  if (kcountHBnegativedirectionReconoise2 == 10)
14552  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
14553  if (kcountHBnegativedirectionReconoise2 == 11)
14554  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
14555  if (kcountHBnegativedirectionReconoise2 == 12)
14556  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
14557  if (kcountHBnegativedirectionReconoise2 == 13)
14558  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
14559  if (kcountHBnegativedirectionReconoise2 == 14)
14560  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
14561  if (kcountHBnegativedirectionReconoise2 == 15)
14562  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
14563  if (kcountHBnegativedirectionReconoise2 == 16)
14564  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
14565  HBnegativedirectionReconoise2->Draw("Error");
14566  kcountHBnegativedirectionReconoise2++;
14567  if (kcountHBnegativedirectionReconoise2 > 16)
14568  break; // 4x6 = 24
14569  } //ccctest>0
14570 
14571  } // for i
14572  } //if(jeta-41 < 0 )
14573  } //for jeta
14575  c3x5->Update();
14576  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
14577  c3x5->Clear();
14578  // clean-up
14579  if (h2CeffHBnegativedirectionReconoise2)
14580  delete h2CeffHBnegativedirectionReconoise2;
14581  //========================================================================================== 1116
14582  //======================================================================
14583  //======================================================================1D plot: R vs phi , different eta, depth=3
14584  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
14585  c3x5->Clear();
14587  c3x5->Divide(4, 4);
14588  c3x5->cd(1);
14589  int kcountHBnegativedirectionReconoise3 = 1;
14590  TH1F *h2CeffHBnegativedirectionReconoise3 = new TH1F("h2CeffHBnegativedirectionReconoise3", "", nphi, 0., 72.);
14591  for (int jeta = 0; jeta < njeta; jeta++) {
14592  // negativedirectionReconoise:
14593  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14594  // for (int i=0;i<ndepth;i++) {
14595  // depth=3
14596  for (int i = 2; i < 3; i++) {
14597  TH1F *HBnegativedirectionReconoise3 = (TH1F *)h2CeffHBnegativedirectionReconoise3->Clone("twod1");
14598  float ccctest = 0; // to avoid empty massive elements
14599  for (int jphi = 0; jphi < nphi; jphi++) {
14600  double ccc1 = areconoiseHB[i][jeta][jphi];
14601  if (ccc1 != 0.) {
14602  HBnegativedirectionReconoise3->Fill(jphi, ccc1);
14603  ccctest = 1.; //HBnegativedirectionReconoise3->SetBinError(i,0.01);
14604  }
14605  } // for jphi
14606  if (ccctest > 0.) {
14607  //cout<<"666 kcountHBnegativedirectionReconoise3 = "<<kcountHBnegativedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
14608  c3x5->cd(kcountHBnegativedirectionReconoise3);
14609  HBnegativedirectionReconoise3->SetMarkerStyle(20);
14610  HBnegativedirectionReconoise3->SetMarkerSize(0.4);
14611  HBnegativedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
14612  HBnegativedirectionReconoise3->SetXTitle("HBnegativedirectionReconoise3 \b");
14613  HBnegativedirectionReconoise3->SetMarkerColor(2);
14614  HBnegativedirectionReconoise3->SetLineColor(0);
14615  gPad->SetGridy();
14616  gPad->SetGridx();
14617  // gPad->SetLogy();
14618  if (kcountHBnegativedirectionReconoise3 == 1)
14619  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
14620  if (kcountHBnegativedirectionReconoise3 == 2)
14621  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
14622  if (kcountHBnegativedirectionReconoise3 == 3)
14623  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
14624  if (kcountHBnegativedirectionReconoise3 == 4)
14625  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
14626  if (kcountHBnegativedirectionReconoise3 == 5)
14627  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
14628  if (kcountHBnegativedirectionReconoise3 == 6)
14629  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
14630  if (kcountHBnegativedirectionReconoise3 == 7)
14631  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
14632  if (kcountHBnegativedirectionReconoise3 == 8)
14633  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
14634  if (kcountHBnegativedirectionReconoise3 == 9)
14635  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
14636  if (kcountHBnegativedirectionReconoise3 == 10)
14637  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
14638  if (kcountHBnegativedirectionReconoise3 == 11)
14639  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
14640  if (kcountHBnegativedirectionReconoise3 == 12)
14641  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
14642  if (kcountHBnegativedirectionReconoise3 == 13)
14643  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
14644  if (kcountHBnegativedirectionReconoise3 == 14)
14645  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
14646  if (kcountHBnegativedirectionReconoise3 == 15)
14647  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
14648  if (kcountHBnegativedirectionReconoise3 == 16)
14649  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
14650 
14651  HBnegativedirectionReconoise3->Draw("Error");
14652  kcountHBnegativedirectionReconoise3++;
14653  if (kcountHBnegativedirectionReconoise3 > 16)
14654  break; // 4x6 = 24
14655  } //ccctest>0
14656 
14657  } // for i
14658  } //if(jeta-41 < 0 )
14659  } //for jeta
14661  c3x5->Update();
14662  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
14663  c3x5->Clear();
14664  // clean-up
14665  if (h2CeffHBnegativedirectionReconoise3)
14666  delete h2CeffHBnegativedirectionReconoise3;
14667  //========================================================================================== 1117
14668  //======================================================================
14669  //======================================================================1D plot: R vs phi , different eta, depth=4
14670  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
14671  c3x5->Clear();
14673  c3x5->Divide(4, 4);
14674  c3x5->cd(1);
14675  int kcountHBnegativedirectionReconoise4 = 1;
14676  TH1F *h2CeffHBnegativedirectionReconoise4 = new TH1F("h2CeffHBnegativedirectionReconoise4", "", nphi, 0., 72.);
14677 
14678  for (int jeta = 0; jeta < njeta; jeta++) {
14679  // negativedirectionReconoise:
14680  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14681  // for (int i=0;i<ndepth;i++) {
14682  // depth=4
14683  for (int i = 3; i < 4; i++) {
14684  TH1F *HBnegativedirectionReconoise4 = (TH1F *)h2CeffHBnegativedirectionReconoise4->Clone("twod1");
14685 
14686  float ccctest = 0; // to avoid empty massive elements
14687  for (int jphi = 0; jphi < nphi; jphi++) {
14688  double ccc1 = areconoiseHB[i][jeta][jphi];
14689  if (ccc1 != 0.) {
14690  HBnegativedirectionReconoise4->Fill(jphi, ccc1);
14691  ccctest = 1.; //HBnegativedirectionReconoise4->SetBinError(i,0.01);
14692  }
14693  } // for jphi
14694  if (ccctest > 0.) {
14695  //cout<<"777 kcountHBnegativedirectionReconoise4 = "<<kcountHBnegativedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
14696  c3x5->cd(kcountHBnegativedirectionReconoise4);
14697  HBnegativedirectionReconoise4->SetMarkerStyle(20);
14698  HBnegativedirectionReconoise4->SetMarkerSize(0.4);
14699  HBnegativedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
14700  HBnegativedirectionReconoise4->SetXTitle("HBnegativedirectionReconoise4 \b");
14701  HBnegativedirectionReconoise4->SetMarkerColor(2);
14702  HBnegativedirectionReconoise4->SetLineColor(0);
14703  gPad->SetGridy();
14704  gPad->SetGridx();
14705  // gPad->SetLogy();
14706  if (kcountHBnegativedirectionReconoise4 == 1)
14707  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
14708  if (kcountHBnegativedirectionReconoise4 == 2)
14709  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
14710  if (kcountHBnegativedirectionReconoise4 == 3)
14711  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
14712  if (kcountHBnegativedirectionReconoise4 == 4)
14713  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
14714  if (kcountHBnegativedirectionReconoise4 == 5)
14715  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
14716  if (kcountHBnegativedirectionReconoise4 == 6)
14717  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
14718  if (kcountHBnegativedirectionReconoise4 == 7)
14719  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
14720  if (kcountHBnegativedirectionReconoise4 == 8)
14721  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
14722  if (kcountHBnegativedirectionReconoise4 == 9)
14723  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
14724  if (kcountHBnegativedirectionReconoise4 == 10)
14725  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
14726  if (kcountHBnegativedirectionReconoise4 == 11)
14727  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
14728  if (kcountHBnegativedirectionReconoise4 == 12)
14729  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
14730  if (kcountHBnegativedirectionReconoise4 == 13)
14731  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
14732  if (kcountHBnegativedirectionReconoise4 == 14)
14733  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
14734  if (kcountHBnegativedirectionReconoise4 == 15)
14735  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
14736  if (kcountHBnegativedirectionReconoise4 == 16)
14737  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
14738  HBnegativedirectionReconoise4->Draw("Error");
14739  kcountHBnegativedirectionReconoise4++;
14740  if (kcountHBnegativedirectionReconoise4 > 16)
14741  break; // 4x6 = 24
14742  } //ccctest>0
14743 
14744  } // for i
14745  } //if(jeta-41 < 0 )
14746  } //for jeta
14748  c3x5->Update();
14749  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
14750  c3x5->Clear();
14751  // clean-up
14752  if (h2CeffHBnegativedirectionReconoise4)
14753  delete h2CeffHBnegativedirectionReconoise4;
14754 
14755  //======================================================================================================================
14756  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HE
14757  //======================================================================================================================
14758  //======================================================================
14759  //cout<<" R2D-eta/phi-plot: DIF, averaged over depthfs *****" <<endl;
14760  c2x1->Clear();
14762  c2x1->Divide(2, 1);
14763  c2x1->cd(1);
14764  TH2F *GefzDIFreconoiseHB42D = new TH2F("GefzDIFreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
14765  TH2F *GefzDIFreconoiseHB42D0 = new TH2F("GefzDIFreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
14766  TH2F *GefzDIFreconoiseHB42DF = (TH2F *)GefzDIFreconoiseHB42D0->Clone("GefzDIFreconoiseHB42DF");
14767  for (int i = 0; i < ndepth; i++) {
14768  for (int jeta = 0; jeta < neta; jeta++) {
14769  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
14770  for (int jphi = 0; jphi < nphi; jphi++) {
14771  double ccc1 = breconoiseHB[i][jeta][jphi];
14772  int k2plot = jeta - 41;
14773  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
14774  if (ccc1 != 0.) {
14775  GefzDIFreconoiseHB42D->Fill(kkk, jphi, ccc1);
14776  GefzDIFreconoiseHB42D0->Fill(kkk, jphi, 1.);
14777  }
14778  }
14779  }
14780  }
14781  }
14782  GefzDIFreconoiseHB42DF->Divide(GefzDIFreconoiseHB42D, GefzDIFreconoiseHB42D0, 1, 1, "B"); // average A
14783  gPad->SetGridy();
14784  gPad->SetGridx(); // gPad->SetLogz();
14785  GefzDIFreconoiseHB42DF->SetXTitle("<DIF>_depth #eta \b");
14786  GefzDIFreconoiseHB42DF->SetYTitle(" #phi \b");
14787  GefzDIFreconoiseHB42DF->Draw("COLZ");
14788 
14789  // c2x1->cd(2);
14790  // TH1F *energyhitNoise_HB= (TH1F*)hfile->Get("h_energyhitNoise_HB");
14791  // energyhitNoise_HB ->SetMarkerStyle(20);energyhitNoise_HB ->SetMarkerSize(0.4);energyhitNoise_HB ->GetYaxis()->SetLabelSize(0.04);energyhitNoise_HB ->SetXTitle("energyhitNoise_HB \b");energyhitNoise_HB ->SetMarkerColor(2);energyhitNoise_HB ->SetLineColor(0);gPad->SetGridy();gPad->SetGridx();energyhitNoise_HB ->Draw("Error");
14792 
14794  c2x1->Update();
14795  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHB.png");
14796  c2x1->Clear();
14797  // clean-up
14798  if (GefzDIFreconoiseHB42D)
14799  delete GefzDIFreconoiseHB42D;
14800  if (GefzDIFreconoiseHB42D0)
14801  delete GefzDIFreconoiseHB42D0;
14802  if (GefzDIFreconoiseHB42DF)
14803  delete GefzDIFreconoiseHB42DF;
14804  //====================================================================== 1D plot: DIF vs phi , averaged over depthfs & eta
14805  //======================================================================
14806  //cout<<" 1D plot: DIF vs phi , averaged over depthfs & eta *****" <<endl;
14807  c1x1->Clear();
14809  c1x1->Divide(1, 1);
14810  c1x1->cd(1);
14811  TH1F *GefzDIFreconoiseHB41D = new TH1F("GefzDIFreconoiseHB41D", "", nphi, 0., 72.);
14812  TH1F *GefzDIFreconoiseHB41D0 = new TH1F("GefzDIFreconoiseHB41D0", "", nphi, 0., 72.);
14813  TH1F *GefzDIFreconoiseHB41DF = (TH1F *)GefzDIFreconoiseHB41D0->Clone("GefzDIFreconoiseHB41DF");
14814  for (int jphi = 0; jphi < nphi; jphi++) {
14815  for (int jeta = 0; jeta < neta; jeta++) {
14816  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
14817  for (int i = 0; i < ndepth; i++) {
14818  double ccc1 = breconoiseHB[i][jeta][jphi];
14819  if (ccc1 != 0.) {
14820  GefzDIFreconoiseHB41D->Fill(jphi, ccc1);
14821  GefzDIFreconoiseHB41D0->Fill(jphi, 1.);
14822  }
14823  }
14824  }
14825  }
14826  }
14827  GefzDIFreconoiseHB41DF->Divide(
14828  GefzDIFreconoiseHB41D, GefzDIFreconoiseHB41D0, 1, 1, "B"); // DIF averaged over depthfs & eta
14829  GefzDIFreconoiseHB41D0->Sumw2();
14830  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHB41DF->SetBinError(jphi,0.01);}
14831  gPad->SetGridy();
14832  gPad->SetGridx(); // gPad->SetLogz();
14833  GefzDIFreconoiseHB41DF->SetMarkerStyle(20);
14834  GefzDIFreconoiseHB41DF->SetMarkerSize(1.4);
14835  GefzDIFreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
14836  GefzDIFreconoiseHB41DF->SetXTitle("#phi \b");
14837  GefzDIFreconoiseHB41DF->SetYTitle(" <DIF> \b");
14838  GefzDIFreconoiseHB41DF->SetZTitle("<DIF>_PHI - AllDepthfs \b");
14839  GefzDIFreconoiseHB41DF->SetMarkerColor(4);
14840  GefzDIFreconoiseHB41DF->SetLineColor(
14841  4); //GefzDIFreconoiseHB41DF->SetMinimum(0.8); // GefzDIFreconoiseHB41DF->SetMaximum(1.000);
14842  GefzDIFreconoiseHB41DF->Draw("Error");
14844  c1x1->Update();
14845  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHB.png");
14846  c1x1->Clear();
14847  // clean-up
14848  if (GefzDIFreconoiseHB41D)
14849  delete GefzDIFreconoiseHB41D;
14850  if (GefzDIFreconoiseHB41D0)
14851  delete GefzDIFreconoiseHB41D0;
14852  if (GefzDIFreconoiseHB41DF)
14853  delete GefzDIFreconoiseHB41DF;
14854  //========================================================================================== 4
14855  //======================================================================
14856  //======================================================================1D plot: DIF vs phi , different eta, depth=1
14857  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
14858  c3x5->Clear();
14860  c3x5->Divide(4, 4);
14861  c3x5->cd(1);
14862  int kcountHBpositivedirectionReconoiseDIF1 = 1;
14863  TH1F *h2CeffHBpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
14864  for (int jeta = 0; jeta < njeta; jeta++) {
14865  // positivedirectionReconoiseDIF:
14866  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14867  // for (int i=0;i<ndepth;i++) {
14868  // depth=1
14869  for (int i = 0; i < 1; i++) {
14870  TH1F *HBpositivedirectionReconoiseDIF1 = (TH1F *)h2CeffHBpositivedirectionReconoiseDIF1->Clone("twod1");
14871  float ccctest = 0; // to avoid empty massive elements
14872  for (int jphi = 0; jphi < nphi; jphi++) {
14873  double ccc1 = breconoiseHB[i][jeta][jphi];
14874  if (ccc1 != 0.) {
14875  HBpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
14876  ccctest = 1.; //HBpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
14877  }
14878  } // for jphi
14879  if (ccctest > 0.) {
14880  // cout<<"444 kcountHBpositivedirectionReconoiseDIF1 = "<<kcountHBpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
14881  c3x5->cd(kcountHBpositivedirectionReconoiseDIF1);
14882  HBpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
14883  HBpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
14884  HBpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
14885  HBpositivedirectionReconoiseDIF1->SetXTitle("HBpositivedirectionReconoiseDIF1 \b");
14886  HBpositivedirectionReconoiseDIF1->SetMarkerColor(2);
14887  HBpositivedirectionReconoiseDIF1->SetLineColor(0);
14888  gPad->SetGridy();
14889  gPad->SetGridx();
14890  // gPad->SetLogy();
14891  if (kcountHBpositivedirectionReconoiseDIF1 == 1)
14892  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 0; depth = 1 \b");
14893  if (kcountHBpositivedirectionReconoiseDIF1 == 2)
14894  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 1; depth = 1 \b");
14895  if (kcountHBpositivedirectionReconoiseDIF1 == 3)
14896  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 2; depth = 1 \b");
14897  if (kcountHBpositivedirectionReconoiseDIF1 == 4)
14898  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 3; depth = 1 \b");
14899  if (kcountHBpositivedirectionReconoiseDIF1 == 5)
14900  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 4; depth = 1 \b");
14901  if (kcountHBpositivedirectionReconoiseDIF1 == 6)
14902  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 5; depth = 1 \b");
14903  if (kcountHBpositivedirectionReconoiseDIF1 == 7)
14904  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 6; depth = 1 \b");
14905  if (kcountHBpositivedirectionReconoiseDIF1 == 8)
14906  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 7; depth = 1 \b");
14907  if (kcountHBpositivedirectionReconoiseDIF1 == 9)
14908  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 8; depth = 1 \b");
14909  if (kcountHBpositivedirectionReconoiseDIF1 == 10)
14910  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 9; depth = 1 \b");
14911  if (kcountHBpositivedirectionReconoiseDIF1 == 11)
14912  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 10; depth = 1 \b");
14913  if (kcountHBpositivedirectionReconoiseDIF1 == 12)
14914  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 11; depth = 1 \b");
14915  if (kcountHBpositivedirectionReconoiseDIF1 == 13)
14916  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 12; depth = 1 \b");
14917  if (kcountHBpositivedirectionReconoiseDIF1 == 14)
14918  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 13; depth = 1 \b");
14919  if (kcountHBpositivedirectionReconoiseDIF1 == 15)
14920  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 14; depth = 1 \b");
14921  if (kcountHBpositivedirectionReconoiseDIF1 == 16)
14922  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 15; depth = 1 \b");
14923  HBpositivedirectionReconoiseDIF1->Draw("Error");
14924  kcountHBpositivedirectionReconoiseDIF1++;
14925  if (kcountHBpositivedirectionReconoiseDIF1 > 16)
14926  break; //
14927  } //ccctest>0
14928 
14929  } // for i
14930  } //if(jeta-41 >= 0)
14931  } //for jeta
14933  c3x5->Update();
14934  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
14935  c3x5->Clear();
14936  // clean-up
14937  if (h2CeffHBpositivedirectionReconoiseDIF1)
14938  delete h2CeffHBpositivedirectionReconoiseDIF1;
14939 
14940  //========================================================================================== 5
14941  //======================================================================
14942  //======================================================================1D plot: R vs phi , different eta, depth=2
14943  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
14944  c3x5->Clear();
14946  c3x5->Divide(4, 4);
14947  c3x5->cd(1);
14948  int kcountHBpositivedirectionReconoiseDIF2 = 1;
14949  TH1F *h2CeffHBpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
14950  for (int jeta = 0; jeta < njeta; jeta++) {
14951  // positivedirectionReconoiseDIF:
14952  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14953  // for (int i=0;i<ndepth;i++) {
14954  // depth=2
14955  for (int i = 1; i < 2; i++) {
14956  TH1F *HBpositivedirectionReconoiseDIF2 = (TH1F *)h2CeffHBpositivedirectionReconoiseDIF2->Clone("twod1");
14957  float ccctest = 0; // to avoid empty massive elements
14958  for (int jphi = 0; jphi < nphi; jphi++) {
14959  double ccc1 = breconoiseHB[i][jeta][jphi];
14960  if (ccc1 != 0.) {
14961  HBpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
14962  ccctest = 1.; //HBpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
14963  }
14964  } // for jphi
14965  if (ccctest > 0.) {
14966  //cout<<"555 kcountHBpositivedirectionReconoiseDIF2 = "<<kcountHBpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
14967  c3x5->cd(kcountHBpositivedirectionReconoiseDIF2);
14968  HBpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
14969  HBpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
14970  HBpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
14971  HBpositivedirectionReconoiseDIF2->SetXTitle("HBpositivedirectionReconoiseDIF2 \b");
14972  HBpositivedirectionReconoiseDIF2->SetMarkerColor(2);
14973  HBpositivedirectionReconoiseDIF2->SetLineColor(0);
14974  gPad->SetGridy();
14975  gPad->SetGridx();
14976  // gPad->SetLogy();
14977  if (kcountHBpositivedirectionReconoiseDIF2 == 1)
14978  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 0; depth = 2 \b");
14979  if (kcountHBpositivedirectionReconoiseDIF2 == 2)
14980  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 1; depth = 2 \b");
14981  if (kcountHBpositivedirectionReconoiseDIF2 == 3)
14982  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 2; depth = 2 \b");
14983  if (kcountHBpositivedirectionReconoiseDIF2 == 4)
14984  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 3; depth = 2 \b");
14985  if (kcountHBpositivedirectionReconoiseDIF2 == 5)
14986  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 4; depth = 2 \b");
14987  if (kcountHBpositivedirectionReconoiseDIF2 == 6)
14988  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 5; depth = 2 \b");
14989  if (kcountHBpositivedirectionReconoiseDIF2 == 7)
14990  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 6; depth = 2 \b");
14991  if (kcountHBpositivedirectionReconoiseDIF2 == 8)
14992  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 7; depth = 2 \b");
14993  if (kcountHBpositivedirectionReconoiseDIF2 == 9)
14994  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 8; depth = 2 \b");
14995  if (kcountHBpositivedirectionReconoiseDIF2 == 10)
14996  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 9; depth = 2 \b");
14997  if (kcountHBpositivedirectionReconoiseDIF2 == 11)
14998  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 10; depth = 2 \b");
14999  if (kcountHBpositivedirectionReconoiseDIF2 == 12)
15000  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 11; depth = 2 \b");
15001  if (kcountHBpositivedirectionReconoiseDIF2 == 13)
15002  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 12; depth = 2 \b");
15003  if (kcountHBpositivedirectionReconoiseDIF2 == 14)
15004  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 13; depth = 2 \b");
15005  if (kcountHBpositivedirectionReconoiseDIF2 == 15)
15006  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 14; depth = 2 \b");
15007  if (kcountHBpositivedirectionReconoiseDIF2 == 16)
15008  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 15; depth = 2 \b");
15009  HBpositivedirectionReconoiseDIF2->Draw("Error");
15010  kcountHBpositivedirectionReconoiseDIF2++;
15011  if (kcountHBpositivedirectionReconoiseDIF2 > 16)
15012  break; // 4x6 = 24
15013  } //ccctest>0
15014 
15015  } // for i
15016  } //if(jeta-41 >= 0)
15017  } //for jeta
15019  c3x5->Update();
15020  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
15021  c3x5->Clear();
15022  // clean-up
15023  if (h2CeffHBpositivedirectionReconoiseDIF2)
15024  delete h2CeffHBpositivedirectionReconoiseDIF2;
15025  //========================================================================================== 6
15026  //======================================================================
15027  //======================================================================1D plot: R vs phi , different eta, depth=3
15028  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
15029  c3x5->Clear();
15031  c3x5->Divide(4, 4);
15032  c3x5->cd(1);
15033  int kcountHBpositivedirectionReconoiseDIF3 = 1;
15034  TH1F *h2CeffHBpositivedirectionReconoiseDIF3 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF3", "", nphi, 0., 72.);
15035  for (int jeta = 0; jeta < njeta; jeta++) {
15036  // positivedirectionReconoiseDIF:
15037  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15038  // for (int i=0;i<ndepth;i++) {
15039  // depth=3
15040  for (int i = 2; i < 3; i++) {
15041  TH1F *HBpositivedirectionReconoiseDIF3 = (TH1F *)h2CeffHBpositivedirectionReconoiseDIF3->Clone("twod1");
15042  float ccctest = 0; // to avoid empty massive elements
15043  for (int jphi = 0; jphi < nphi; jphi++) {
15044  double ccc1 = breconoiseHB[i][jeta][jphi];
15045  if (ccc1 != 0.) {
15046  HBpositivedirectionReconoiseDIF3->Fill(jphi, ccc1);
15047  ccctest = 1.; //HBpositivedirectionReconoiseDIF3->SetBinError(i,0.01);
15048  }
15049  } // for jphi
15050  if (ccctest > 0.) {
15051  //cout<<"666 kcountHBpositivedirectionReconoiseDIF3 = "<<kcountHBpositivedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
15052  c3x5->cd(kcountHBpositivedirectionReconoiseDIF3);
15053  HBpositivedirectionReconoiseDIF3->SetMarkerStyle(20);
15054  HBpositivedirectionReconoiseDIF3->SetMarkerSize(0.4);
15055  HBpositivedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
15056  HBpositivedirectionReconoiseDIF3->SetXTitle("HBpositivedirectionReconoiseDIF3 \b");
15057  HBpositivedirectionReconoiseDIF3->SetMarkerColor(2);
15058  HBpositivedirectionReconoiseDIF3->SetLineColor(0);
15059  gPad->SetGridy();
15060  gPad->SetGridx();
15061  // gPad->SetLogy();
15062  if (kcountHBpositivedirectionReconoiseDIF3 == 1)
15063  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 0; depth = 3 \b");
15064  if (kcountHBpositivedirectionReconoiseDIF3 == 2)
15065  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 1; depth = 3 \b");
15066  if (kcountHBpositivedirectionReconoiseDIF3 == 3)
15067  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 2; depth = 3 \b");
15068  if (kcountHBpositivedirectionReconoiseDIF3 == 4)
15069  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 3; depth = 3 \b");
15070  if (kcountHBpositivedirectionReconoiseDIF3 == 5)
15071  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 4; depth = 3 \b");
15072  if (kcountHBpositivedirectionReconoiseDIF3 == 6)
15073  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 5; depth = 3 \b");
15074  if (kcountHBpositivedirectionReconoiseDIF3 == 7)
15075  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 6; depth = 3 \b");
15076  if (kcountHBpositivedirectionReconoiseDIF3 == 8)
15077  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 7; depth = 3 \b");
15078  if (kcountHBpositivedirectionReconoiseDIF3 == 9)
15079  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 8; depth = 3 \b");
15080  if (kcountHBpositivedirectionReconoiseDIF3 == 10)
15081  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 9; depth = 3 \b");
15082  if (kcountHBpositivedirectionReconoiseDIF3 == 11)
15083  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 0; depth = 3 \b");
15084  if (kcountHBpositivedirectionReconoiseDIF3 == 12)
15085  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 11; depth = 3 \b");
15086  if (kcountHBpositivedirectionReconoiseDIF3 == 13)
15087  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 12; depth = 3 \b");
15088  if (kcountHBpositivedirectionReconoiseDIF3 == 14)
15089  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 13; depth = 3 \b");
15090  if (kcountHBpositivedirectionReconoiseDIF3 == 15)
15091  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 14; depth = 3 \b");
15092  if (kcountHBpositivedirectionReconoiseDIF3 == 16)
15093  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 15; depth = 3 \b");
15094  HBpositivedirectionReconoiseDIF3->Draw("Error");
15095  kcountHBpositivedirectionReconoiseDIF3++;
15096  if (kcountHBpositivedirectionReconoiseDIF3 > 16)
15097  break; // 4x6 = 24
15098  } //ccctest>0
15099 
15100  } // for i
15101  } //if(jeta-41 >= 0)
15102  } //for jeta
15104  c3x5->Update();
15105  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
15106  c3x5->Clear();
15107  // clean-up
15108  if (h2CeffHBpositivedirectionReconoiseDIF3)
15109  delete h2CeffHBpositivedirectionReconoiseDIF3;
15110  //========================================================================================== 7
15111  //======================================================================
15112  //======================================================================1D plot: R vs phi , different eta, depth=4
15113  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
15114  c3x5->Clear();
15116  c3x5->Divide(4, 4);
15117  c3x5->cd(1);
15118  int kcountHBpositivedirectionReconoiseDIF4 = 1;
15119  TH1F *h2CeffHBpositivedirectionReconoiseDIF4 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF4", "", nphi, 0., 72.);
15120 
15121  for (int jeta = 0; jeta < njeta; jeta++) {
15122  // positivedirectionReconoiseDIF:
15123  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15124  // for (int i=0;i<ndepth;i++) {
15125  // depth=4
15126  for (int i = 3; i < 4; i++) {
15127  TH1F *HBpositivedirectionReconoiseDIF4 = (TH1F *)h2CeffHBpositivedirectionReconoiseDIF4->Clone("twod1");
15128 
15129  float ccctest = 0; // to avoid empty massive elements
15130  for (int jphi = 0; jphi < nphi; jphi++) {
15131  double ccc1 = breconoiseHB[i][jeta][jphi];
15132  if (ccc1 != 0.) {
15133  HBpositivedirectionReconoiseDIF4->Fill(jphi, ccc1);
15134  ccctest = 1.; //HBpositivedirectionReconoiseDIF4->SetBinError(i,0.01);
15135  }
15136  } // for jphi
15137  if (ccctest > 0.) {
15138  //cout<<"777 kcountHBpositivedirectionReconoiseDIF4 = "<<kcountHBpositivedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
15139  c3x5->cd(kcountHBpositivedirectionReconoiseDIF4);
15140  HBpositivedirectionReconoiseDIF4->SetMarkerStyle(20);
15141  HBpositivedirectionReconoiseDIF4->SetMarkerSize(0.4);
15142  HBpositivedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
15143  HBpositivedirectionReconoiseDIF4->SetXTitle("HBpositivedirectionReconoiseDIF4 \b");
15144  HBpositivedirectionReconoiseDIF4->SetMarkerColor(2);
15145  HBpositivedirectionReconoiseDIF4->SetLineColor(0);
15146  gPad->SetGridy();
15147  gPad->SetGridx();
15148  // gPad->SetLogy();
15149  if (kcountHBpositivedirectionReconoiseDIF4 == 1)
15150  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 0; depth = 4 \b");
15151  if (kcountHBpositivedirectionReconoiseDIF4 == 2)
15152  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 1; depth = 4 \b");
15153  if (kcountHBpositivedirectionReconoiseDIF4 == 3)
15154  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 2; depth = 4 \b");
15155  if (kcountHBpositivedirectionReconoiseDIF4 == 4)
15156  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 3; depth = 4 \b");
15157  if (kcountHBpositivedirectionReconoiseDIF4 == 5)
15158  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 4; depth = 4 \b");
15159  if (kcountHBpositivedirectionReconoiseDIF4 == 6)
15160  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 5; depth = 4 \b");
15161  if (kcountHBpositivedirectionReconoiseDIF4 == 7)
15162  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 6; depth = 4 \b");
15163  if (kcountHBpositivedirectionReconoiseDIF4 == 8)
15164  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 7; depth = 4 \b");
15165  if (kcountHBpositivedirectionReconoiseDIF4 == 9)
15166  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 8; depth = 4 \b");
15167  if (kcountHBpositivedirectionReconoiseDIF4 == 10)
15168  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 9; depth = 4 \b");
15169  if (kcountHBpositivedirectionReconoiseDIF4 == 11)
15170  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 10; depth = 4 \b");
15171  if (kcountHBpositivedirectionReconoiseDIF4 == 12)
15172  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 11; depth = 4 \b");
15173  if (kcountHBpositivedirectionReconoiseDIF4 == 13)
15174  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 12; depth = 4 \b");
15175  if (kcountHBpositivedirectionReconoiseDIF4 == 14)
15176  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 13; depth = 4 \b");
15177  if (kcountHBpositivedirectionReconoiseDIF4 == 15)
15178  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 14; depth = 4 \b");
15179  if (kcountHBpositivedirectionReconoiseDIF4 == 16)
15180  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 15; depth = 4 \b");
15181  HBpositivedirectionReconoiseDIF4->Draw("Error");
15182  kcountHBpositivedirectionReconoiseDIF4++;
15183  if (kcountHBpositivedirectionReconoiseDIF4 > 16)
15184  break; // 4x6 = 24
15185  } //ccctest>0
15186 
15187  } // for i
15188  } //if(jeta-41 >= 0)
15189  } //for jeta
15191  c3x5->Update();
15192  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
15193  c3x5->Clear();
15194  // clean-up
15195  if (h2CeffHBpositivedirectionReconoiseDIF4)
15196  delete h2CeffHBpositivedirectionReconoiseDIF4;
15197 
15198  //========================================================================================== 1114
15199  //======================================================================
15200  //======================================================================1D plot: R vs phi , different eta, depth=1
15201  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
15202  c3x5->Clear();
15204  c3x5->Divide(4, 4);
15205  c3x5->cd(1);
15206  int kcountHBnegativedirectionReconoiseDIF1 = 1;
15207  TH1F *h2CeffHBnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
15208  for (int jeta = 0; jeta < njeta; jeta++) {
15209  // negativedirectionReconoiseDIF:
15210  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15211  // for (int i=0;i<ndepth;i++) {
15212  // depth=1
15213  for (int i = 0; i < 1; i++) {
15214  TH1F *HBnegativedirectionReconoiseDIF1 = (TH1F *)h2CeffHBnegativedirectionReconoiseDIF1->Clone("twod1");
15215  float ccctest = 0; // to avoid empty massive elements
15216  for (int jphi = 0; jphi < nphi; jphi++) {
15217  double ccc1 = breconoiseHB[i][jeta][jphi];
15218  if (ccc1 != 0.) {
15219  HBnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
15220  ccctest = 1.; //HBnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
15221  }
15222  } // for jphi
15223  if (ccctest > 0.) {
15224  // cout<<"444 kcountHBnegativedirectionReconoiseDIF1 = "<<kcountHBnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
15225  c3x5->cd(kcountHBnegativedirectionReconoiseDIF1);
15226  HBnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
15227  HBnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
15228  HBnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
15229  HBnegativedirectionReconoiseDIF1->SetXTitle("HBnegativedirectionReconoiseDIF1 \b");
15230  HBnegativedirectionReconoiseDIF1->SetMarkerColor(2);
15231  HBnegativedirectionReconoiseDIF1->SetLineColor(0);
15232  gPad->SetGridy();
15233  gPad->SetGridx();
15234  // gPad->SetLogy();
15235  if (kcountHBnegativedirectionReconoiseDIF1 == 1)
15236  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -16; depth = 1 \b");
15237  if (kcountHBnegativedirectionReconoiseDIF1 == 2)
15238  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -15; depth = 1 \b");
15239  if (kcountHBnegativedirectionReconoiseDIF1 == 3)
15240  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -14; depth = 1 \b");
15241  if (kcountHBnegativedirectionReconoiseDIF1 == 4)
15242  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -13; depth = 1 \b");
15243  if (kcountHBnegativedirectionReconoiseDIF1 == 5)
15244  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -12; depth = 1 \b");
15245  if (kcountHBnegativedirectionReconoiseDIF1 == 6)
15246  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -11; depth = 1 \b");
15247  if (kcountHBnegativedirectionReconoiseDIF1 == 7)
15248  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -10; depth = 1 \b");
15249  if (kcountHBnegativedirectionReconoiseDIF1 == 8)
15250  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -9; depth = 1 \b");
15251  if (kcountHBnegativedirectionReconoiseDIF1 == 9)
15252  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -8; depth = 1 \b");
15253  if (kcountHBnegativedirectionReconoiseDIF1 == 10)
15254  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -7; depth = 1 \b");
15255  if (kcountHBnegativedirectionReconoiseDIF1 == 11)
15256  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -6; depth = 1 \b");
15257  if (kcountHBnegativedirectionReconoiseDIF1 == 12)
15258  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -5; depth = 1 \b");
15259  if (kcountHBnegativedirectionReconoiseDIF1 == 13)
15260  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -4; depth = 1 \b");
15261  if (kcountHBnegativedirectionReconoiseDIF1 == 14)
15262  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -3; depth = 1 \b");
15263  if (kcountHBnegativedirectionReconoiseDIF1 == 15)
15264  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -2; depth = 1 \b");
15265  if (kcountHBnegativedirectionReconoiseDIF1 == 16)
15266  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -1; depth = 1 \b");
15267  HBnegativedirectionReconoiseDIF1->Draw("Error");
15268  kcountHBnegativedirectionReconoiseDIF1++;
15269  if (kcountHBnegativedirectionReconoiseDIF1 > 16)
15270  break; //
15271  } //ccctest>0
15272 
15273  } // for i
15274  } //if(jeta-41 < 0 )
15275  } //for jeta
15277  c3x5->Update();
15278  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
15279  c3x5->Clear();
15280  // clean-up
15281  if (h2CeffHBnegativedirectionReconoiseDIF1)
15282  delete h2CeffHBnegativedirectionReconoiseDIF1;
15283 
15284  //========================================================================================== 1115
15285  //======================================================================
15286  //======================================================================1D plot: R vs phi , different eta, depth=2
15287  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
15288  c3x5->Clear();
15290  c3x5->Divide(4, 4);
15291  c3x5->cd(1);
15292  int kcountHBnegativedirectionReconoiseDIF2 = 1;
15293  TH1F *h2CeffHBnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
15294  for (int jeta = 0; jeta < njeta; jeta++) {
15295  // negativedirectionReconoiseDIF:
15296  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15297  // for (int i=0;i<ndepth;i++) {
15298  // depth=2
15299  for (int i = 1; i < 2; i++) {
15300  TH1F *HBnegativedirectionReconoiseDIF2 = (TH1F *)h2CeffHBnegativedirectionReconoiseDIF2->Clone("twod1");
15301  float ccctest = 0; // to avoid empty massive elements
15302  for (int jphi = 0; jphi < nphi; jphi++) {
15303  double ccc1 = breconoiseHB[i][jeta][jphi];
15304  if (ccc1 != 0.) {
15305  HBnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
15306  ccctest = 1.; //HBnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
15307  }
15308  } // for jphi
15309  if (ccctest > 0.) {
15310  //cout<<"555 kcountHBnegativedirectionReconoiseDIF2 = "<<kcountHBnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
15311  c3x5->cd(kcountHBnegativedirectionReconoiseDIF2);
15312  HBnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
15313  HBnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
15314  HBnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
15315  HBnegativedirectionReconoiseDIF2->SetXTitle("HBnegativedirectionReconoiseDIF2 \b");
15316  HBnegativedirectionReconoiseDIF2->SetMarkerColor(2);
15317  HBnegativedirectionReconoiseDIF2->SetLineColor(0);
15318  gPad->SetGridy();
15319  gPad->SetGridx();
15320  // gPad->SetLogy();
15321  if (kcountHBnegativedirectionReconoiseDIF2 == 1)
15322  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -16; depth = 2 \b");
15323  if (kcountHBnegativedirectionReconoiseDIF2 == 2)
15324  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -15; depth = 2 \b");
15325  if (kcountHBnegativedirectionReconoiseDIF2 == 3)
15326  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -14; depth = 2 \b");
15327  if (kcountHBnegativedirectionReconoiseDIF2 == 4)
15328  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -13; depth = 2 \b");
15329  if (kcountHBnegativedirectionReconoiseDIF2 == 5)
15330  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -12; depth = 2 \b");
15331  if (kcountHBnegativedirectionReconoiseDIF2 == 6)
15332  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -11; depth = 2 \b");
15333  if (kcountHBnegativedirectionReconoiseDIF2 == 7)
15334  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -10; depth = 2 \b");
15335  if (kcountHBnegativedirectionReconoiseDIF2 == 8)
15336  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -9; depth = 2 \b");
15337  if (kcountHBnegativedirectionReconoiseDIF2 == 9)
15338  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -8; depth = 2 \b");
15339  if (kcountHBnegativedirectionReconoiseDIF2 == 10)
15340  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -7; depth = 2 \b");
15341  if (kcountHBnegativedirectionReconoiseDIF2 == 11)
15342  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -6; depth = 2 \b");
15343  if (kcountHBnegativedirectionReconoiseDIF2 == 12)
15344  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -5; depth = 2 \b");
15345  if (kcountHBnegativedirectionReconoiseDIF2 == 13)
15346  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -4; depth = 2 \b");
15347  if (kcountHBnegativedirectionReconoiseDIF2 == 14)
15348  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -3; depth = 2 \b");
15349  if (kcountHBnegativedirectionReconoiseDIF2 == 15)
15350  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -2; depth = 2 \b");
15351  if (kcountHBnegativedirectionReconoiseDIF2 == 16)
15352  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -1; depth = 2 \b");
15353  HBnegativedirectionReconoiseDIF2->Draw("Error");
15354  kcountHBnegativedirectionReconoiseDIF2++;
15355  if (kcountHBnegativedirectionReconoiseDIF2 > 16)
15356  break; // 4x6 = 24
15357  } //ccctest>0
15358 
15359  } // for i
15360  } //if(jeta-41 < 0 )
15361  } //for jeta
15363  c3x5->Update();
15364  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
15365  c3x5->Clear();
15366  // clean-up
15367  if (h2CeffHBnegativedirectionReconoiseDIF2)
15368  delete h2CeffHBnegativedirectionReconoiseDIF2;
15369  //========================================================================================== 1116
15370  //======================================================================
15371  //======================================================================1D plot: R vs phi , different eta, depth=3
15372  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
15373  c3x5->Clear();
15375  c3x5->Divide(4, 4);
15376  c3x5->cd(1);
15377  int kcountHBnegativedirectionReconoiseDIF3 = 1;
15378  TH1F *h2CeffHBnegativedirectionReconoiseDIF3 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF3", "", nphi, 0., 72.);
15379  for (int jeta = 0; jeta < njeta; jeta++) {
15380  // negativedirectionReconoiseDIF:
15381  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15382  // for (int i=0;i<ndepth;i++) {
15383  // depth=3
15384  for (int i = 2; i < 3; i++) {
15385  TH1F *HBnegativedirectionReconoiseDIF3 = (TH1F *)h2CeffHBnegativedirectionReconoiseDIF3->Clone("twod1");
15386  float ccctest = 0; // to avoid empty massive elements
15387  for (int jphi = 0; jphi < nphi; jphi++) {
15388  double ccc1 = breconoiseHB[i][jeta][jphi];
15389  if (ccc1 != 0.) {
15390  HBnegativedirectionReconoiseDIF3->Fill(jphi, ccc1);
15391  ccctest = 1.; //HBnegativedirectionReconoiseDIF3->SetBinError(i,0.01);
15392  }
15393  } // for jphi
15394  if (ccctest > 0.) {
15395  //cout<<"666 kcountHBnegativedirectionReconoiseDIF3 = "<<kcountHBnegativedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
15396  c3x5->cd(kcountHBnegativedirectionReconoiseDIF3);
15397  HBnegativedirectionReconoiseDIF3->SetMarkerStyle(20);
15398  HBnegativedirectionReconoiseDIF3->SetMarkerSize(0.4);
15399  HBnegativedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
15400  HBnegativedirectionReconoiseDIF3->SetXTitle("HBnegativedirectionReconoiseDIF3 \b");
15401  HBnegativedirectionReconoiseDIF3->SetMarkerColor(2);
15402  HBnegativedirectionReconoiseDIF3->SetLineColor(0);
15403  gPad->SetGridy();
15404  gPad->SetGridx();
15405  // gPad->SetLogy();
15406  if (kcountHBnegativedirectionReconoiseDIF3 == 1)
15407  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -16; depth = 3 \b");
15408  if (kcountHBnegativedirectionReconoiseDIF3 == 2)
15409  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -15; depth = 3 \b");
15410  if (kcountHBnegativedirectionReconoiseDIF3 == 3)
15411  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -14; depth = 3 \b");
15412  if (kcountHBnegativedirectionReconoiseDIF3 == 4)
15413  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -13; depth = 3 \b");
15414  if (kcountHBnegativedirectionReconoiseDIF3 == 5)
15415  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -12; depth = 3 \b");
15416  if (kcountHBnegativedirectionReconoiseDIF3 == 6)
15417  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -11; depth = 3 \b");
15418  if (kcountHBnegativedirectionReconoiseDIF3 == 7)
15419  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -10; depth = 3 \b");
15420  if (kcountHBnegativedirectionReconoiseDIF3 == 8)
15421  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -9; depth = 3 \b");
15422  if (kcountHBnegativedirectionReconoiseDIF3 == 9)
15423  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -8; depth = 3 \b");
15424  if (kcountHBnegativedirectionReconoiseDIF3 == 10)
15425  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -7; depth = 3 \b");
15426  if (kcountHBnegativedirectionReconoiseDIF3 == 11)
15427  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -6; depth = 3 \b");
15428  if (kcountHBnegativedirectionReconoiseDIF3 == 12)
15429  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -5; depth = 3 \b");
15430  if (kcountHBnegativedirectionReconoiseDIF3 == 13)
15431  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -4; depth = 3 \b");
15432  if (kcountHBnegativedirectionReconoiseDIF3 == 14)
15433  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -3; depth = 3 \b");
15434  if (kcountHBnegativedirectionReconoiseDIF3 == 15)
15435  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -2; depth = 3 \b");
15436  if (kcountHBnegativedirectionReconoiseDIF3 == 16)
15437  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -1; depth = 3 \b");
15438 
15439  HBnegativedirectionReconoiseDIF3->Draw("Error");
15440  kcountHBnegativedirectionReconoiseDIF3++;
15441  if (kcountHBnegativedirectionReconoiseDIF3 > 16)
15442  break; // 4x6 = 24
15443  } //ccctest>0
15444 
15445  } // for i
15446  } //if(jeta-41 < 0 )
15447  } //for jeta
15449  c3x5->Update();
15450  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
15451  c3x5->Clear();
15452  // clean-up
15453  if (h2CeffHBnegativedirectionReconoiseDIF3)
15454  delete h2CeffHBnegativedirectionReconoiseDIF3;
15455  //========================================================================================== 1117
15456  //======================================================================
15457  //======================================================================1D plot: R vs phi , different eta, depth=4
15458  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
15459  c3x5->Clear();
15461  c3x5->Divide(4, 4);
15462  c3x5->cd(1);
15463  int kcountHBnegativedirectionReconoiseDIF4 = 1;
15464  TH1F *h2CeffHBnegativedirectionReconoiseDIF4 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF4", "", nphi, 0., 72.);
15465 
15466  for (int jeta = 0; jeta < njeta; jeta++) {
15467  // negativedirectionReconoiseDIF:
15468  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15469  // for (int i=0;i<ndepth;i++) {
15470  // depth=4
15471  for (int i = 3; i < 4; i++) {
15472  TH1F *HBnegativedirectionReconoiseDIF4 = (TH1F *)h2CeffHBnegativedirectionReconoiseDIF4->Clone("twod1");
15473 
15474  float ccctest = 0; // to avoid empty massive elements
15475  for (int jphi = 0; jphi < nphi; jphi++) {
15476  double ccc1 = breconoiseHB[i][jeta][jphi];
15477  if (ccc1 != 0.) {
15478  HBnegativedirectionReconoiseDIF4->Fill(jphi, ccc1);
15479  ccctest = 1.; //HBnegativedirectionReconoiseDIF4->SetBinError(i,0.01);
15480  }
15481  } // for jphi
15482  if (ccctest > 0.) {
15483  //cout<<"777 kcountHBnegativedirectionReconoiseDIF4 = "<<kcountHBnegativedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
15484  c3x5->cd(kcountHBnegativedirectionReconoiseDIF4);
15485  HBnegativedirectionReconoiseDIF4->SetMarkerStyle(20);
15486  HBnegativedirectionReconoiseDIF4->SetMarkerSize(0.4);
15487  HBnegativedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
15488  HBnegativedirectionReconoiseDIF4->SetXTitle("HBnegativedirectionReconoiseDIF4 \b");
15489  HBnegativedirectionReconoiseDIF4->SetMarkerColor(2);
15490  HBnegativedirectionReconoiseDIF4->SetLineColor(0);
15491  gPad->SetGridy();
15492  gPad->SetGridx();
15493  // gPad->SetLogy();
15494  if (kcountHBnegativedirectionReconoiseDIF4 == 1)
15495  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -16; depth = 4 \b");
15496  if (kcountHBnegativedirectionReconoiseDIF4 == 2)
15497  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -15; depth = 4 \b");
15498  if (kcountHBnegativedirectionReconoiseDIF4 == 3)
15499  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -14; depth = 4 \b");
15500  if (kcountHBnegativedirectionReconoiseDIF4 == 4)
15501  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -13; depth = 4 \b");
15502  if (kcountHBnegativedirectionReconoiseDIF4 == 5)
15503  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -12; depth = 4 \b");
15504  if (kcountHBnegativedirectionReconoiseDIF4 == 6)
15505  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -11; depth = 4 \b");
15506  if (kcountHBnegativedirectionReconoiseDIF4 == 7)
15507  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -10; depth = 4 \b");
15508  if (kcountHBnegativedirectionReconoiseDIF4 == 8)
15509  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -9; depth = 4 \b");
15510  if (kcountHBnegativedirectionReconoiseDIF4 == 9)
15511  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -8; depth = 4 \b");
15512  if (kcountHBnegativedirectionReconoiseDIF4 == 10)
15513  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -7; depth = 4 \b");
15514  if (kcountHBnegativedirectionReconoiseDIF4 == 11)
15515  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -6; depth = 4 \b");
15516  if (kcountHBnegativedirectionReconoiseDIF4 == 12)
15517  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -5; depth = 4 \b");
15518  if (kcountHBnegativedirectionReconoiseDIF4 == 13)
15519  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -4; depth = 4 \b");
15520  if (kcountHBnegativedirectionReconoiseDIF4 == 14)
15521  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -3; depth = 4 \b");
15522  if (kcountHBnegativedirectionReconoiseDIF4 == 15)
15523  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -2; depth = 4 \b");
15524  if (kcountHBnegativedirectionReconoiseDIF4 == 16)
15525  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -1; depth = 4 \b");
15526  HBnegativedirectionReconoiseDIF4->Draw("Error");
15527  kcountHBnegativedirectionReconoiseDIF4++;
15528  if (kcountHBnegativedirectionReconoiseDIF4 > 16)
15529  break; // 4x6 = 24
15530  } //ccctest>0
15531 
15532  } // for i
15533  } //if(jeta-41 < 0 )
15534  } //for jeta
15536  c3x5->Update();
15537  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
15538  c3x5->Clear();
15539  // clean-up
15540  if (h2CeffHBnegativedirectionReconoiseDIF4)
15541  delete h2CeffHBnegativedirectionReconoiseDIF4;
15542 
15543  //======================================================================================================================
15544  //======================================================================================================================
15545  //======================================================================================================================
15546  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
15547 
15548  //cout<<" Start Vaiance: preparation *****" <<endl;
15549  TH2F *reconoiseVariance1HB1 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HB1");
15550  TH2F *reconoiseVariance0HB1 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HB1");
15551  TH2F *reconoiseVarianceHB1 = (TH2F *)reconoiseVariance1HB1->Clone("reconoiseVarianceHB1");
15552  reconoiseVarianceHB1->Divide(reconoiseVariance1HB1, reconoiseVariance0HB1, 1, 1, "B");
15553  TH2F *reconoiseVariance1HB2 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HB2");
15554  TH2F *reconoiseVariance0HB2 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HB2");
15555  TH2F *reconoiseVarianceHB2 = (TH2F *)reconoiseVariance1HB2->Clone("reconoiseVarianceHB2");
15556  reconoiseVarianceHB2->Divide(reconoiseVariance1HB2, reconoiseVariance0HB2, 1, 1, "B");
15557  TH2F *reconoiseVariance1HB3 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HB3");
15558  TH2F *reconoiseVariance0HB3 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HB3");
15559  TH2F *reconoiseVarianceHB3 = (TH2F *)reconoiseVariance1HB3->Clone("reconoiseVarianceHB3");
15560  reconoiseVarianceHB3->Divide(reconoiseVariance1HB3, reconoiseVariance0HB3, 1, 1, "B");
15561  TH2F *reconoiseVariance1HB4 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HB4");
15562  TH2F *reconoiseVariance0HB4 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HB4");
15563  TH2F *reconoiseVarianceHB4 = (TH2F *)reconoiseVariance1HB4->Clone("reconoiseVarianceHB4");
15564  reconoiseVarianceHB4->Divide(reconoiseVariance1HB4, reconoiseVariance0HB4, 1, 1, "B");
15565  //cout<<" Vaiance: preparation DONE *****" <<endl;
15566  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevarianceHB
15567  // = sum(R*R)/N - (sum(R)/N)**2
15568  for (int jeta = 0; jeta < njeta; jeta++) {
15569  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
15570  //preparation for PHI normalization:
15571  double sumreconoiseHB0 = 0;
15572  int nsumreconoiseHB0 = 0;
15573  double sumreconoiseHB1 = 0;
15574  int nsumreconoiseHB1 = 0;
15575  double sumreconoiseHB2 = 0;
15576  int nsumreconoiseHB2 = 0;
15577  double sumreconoiseHB3 = 0;
15578  int nsumreconoiseHB3 = 0;
15579  for (int jphi = 0; jphi < njphi; jphi++) {
15580  reconoisevarianceHB[0][jeta][jphi] = reconoiseVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
15581  reconoisevarianceHB[1][jeta][jphi] = reconoiseVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
15582  reconoisevarianceHB[2][jeta][jphi] = reconoiseVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
15583  reconoisevarianceHB[3][jeta][jphi] = reconoiseVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
15584  if (reconoisevarianceHB[0][jeta][jphi] != 0.) {
15585  sumreconoiseHB0 += reconoisevarianceHB[0][jeta][jphi];
15586  ++nsumreconoiseHB0;
15587  }
15588  if (reconoisevarianceHB[1][jeta][jphi] != 0.) {
15589  sumreconoiseHB1 += reconoisevarianceHB[1][jeta][jphi];
15590  ++nsumreconoiseHB1;
15591  }
15592  if (reconoisevarianceHB[2][jeta][jphi] != 0.) {
15593  sumreconoiseHB2 += reconoisevarianceHB[2][jeta][jphi];
15594  ++nsumreconoiseHB2;
15595  }
15596  if (reconoisevarianceHB[3][jeta][jphi] != 0.) {
15597  sumreconoiseHB3 += reconoisevarianceHB[3][jeta][jphi];
15598  ++nsumreconoiseHB3;
15599  }
15600  } // phi
15601  // PHI normalization :
15602  for (int jphi = 0; jphi < njphi; jphi++) {
15603  if (sumreconoiseHB0 != 0.)
15604  reconoisevarianceHB[0][jeta][jphi] /= (sumreconoiseHB0 / nsumreconoiseHB0);
15605  if (sumreconoiseHB1 != 0.)
15606  reconoisevarianceHB[1][jeta][jphi] /= (sumreconoiseHB1 / nsumreconoiseHB1);
15607  if (sumreconoiseHB2 != 0.)
15608  reconoisevarianceHB[2][jeta][jphi] /= (sumreconoiseHB2 / nsumreconoiseHB2);
15609  if (sumreconoiseHB3 != 0.)
15610  reconoisevarianceHB[3][jeta][jphi] /= (sumreconoiseHB3 / nsumreconoiseHB3);
15611  } // phi
15612  // reconoisevarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
15613  for (int jphi = 0; jphi < njphi; jphi++) {
15614  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
15615  reconoisevarianceHB[0][jeta][jphi] -= areconoiseHB[0][jeta][jphi] * areconoiseHB[0][jeta][jphi];
15616  reconoisevarianceHB[0][jeta][jphi] = fabs(reconoisevarianceHB[0][jeta][jphi]);
15617  reconoisevarianceHB[1][jeta][jphi] -= areconoiseHB[1][jeta][jphi] * areconoiseHB[1][jeta][jphi];
15618  reconoisevarianceHB[1][jeta][jphi] = fabs(reconoisevarianceHB[1][jeta][jphi]);
15619  reconoisevarianceHB[2][jeta][jphi] -= areconoiseHB[2][jeta][jphi] * areconoiseHB[2][jeta][jphi];
15620  reconoisevarianceHB[2][jeta][jphi] = fabs(reconoisevarianceHB[2][jeta][jphi]);
15621  reconoisevarianceHB[3][jeta][jphi] -= areconoiseHB[3][jeta][jphi] * areconoiseHB[3][jeta][jphi];
15622  reconoisevarianceHB[3][jeta][jphi] = fabs(reconoisevarianceHB[3][jeta][jphi]);
15623  }
15624  }
15625  }
15626  //cout<<" Vaiance: DONE*****" <<endl;
15627  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
15628  //======================================================================
15629  //======================================================================
15630  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
15631  c1x1->Clear();
15633  c1x0->Divide(1, 1);
15634  c1x0->cd(1);
15635  TH2F *DefzDreconoiseHB42D = new TH2F("DefzDreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
15636  TH2F *DefzDreconoiseHB42D0 = new TH2F("DefzDreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
15637  TH2F *DefzDreconoiseHB42DF = (TH2F *)DefzDreconoiseHB42D0->Clone("DefzDreconoiseHB42DF");
15638  for (int i = 0; i < ndepth; i++) {
15639  for (int jeta = 0; jeta < neta; jeta++) {
15640  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
15641  for (int jphi = 0; jphi < nphi; jphi++) {
15642  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15643  int k2plot = jeta - 41;
15644  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
15645  if (areconoiseHB[i][jeta][jphi] > 0.) {
15646  DefzDreconoiseHB42D->Fill(kkk, jphi, ccc1);
15647  DefzDreconoiseHB42D0->Fill(kkk, jphi, 1.);
15648  }
15649  }
15650  }
15651  }
15652  }
15653  DefzDreconoiseHB42DF->Divide(DefzDreconoiseHB42D, DefzDreconoiseHB42D0, 1, 1, "B"); // average A
15654  // DefzDreconoiseHB1->Sumw2();
15655  gPad->SetGridy();
15656  gPad->SetGridx(); // gPad->SetLogz();
15657  DefzDreconoiseHB42DF->SetMarkerStyle(20);
15658  DefzDreconoiseHB42DF->SetMarkerSize(0.4);
15659  DefzDreconoiseHB42DF->GetZaxis()->SetLabelSize(0.08);
15660  DefzDreconoiseHB42DF->SetXTitle("<D>_depth #eta \b");
15661  DefzDreconoiseHB42DF->SetYTitle(" #phi \b");
15662  DefzDreconoiseHB42DF->SetZTitle("<D>_depth \b");
15663  DefzDreconoiseHB42DF->SetMarkerColor(2);
15664  DefzDreconoiseHB42DF->SetLineColor(
15665  0); // DefzDreconoiseHB42DF->SetMaximum(1.000); // DefzDreconoiseHB42DF->SetMinimum(1.0);
15666  DefzDreconoiseHB42DF->Draw("COLZ");
15668  c1x0->Update();
15669  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHB.png");
15670  c1x0->Clear();
15671  // clean-up
15672  if (DefzDreconoiseHB42D)
15673  delete DefzDreconoiseHB42D;
15674  if (DefzDreconoiseHB42D0)
15675  delete DefzDreconoiseHB42D0;
15676  if (DefzDreconoiseHB42DF)
15677  delete DefzDreconoiseHB42DF;
15678  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
15679  //======================================================================
15680  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
15681  c1x1->Clear();
15683  c1x1->Divide(1, 1);
15684  c1x1->cd(1);
15685  TH1F *DefzDreconoiseHB41D = new TH1F("DefzDreconoiseHB41D", "", nphi, 0., 72.);
15686  TH1F *DefzDreconoiseHB41D0 = new TH1F("DefzDreconoiseHB41D0", "", nphi, 0., 72.);
15687  TH1F *DefzDreconoiseHB41DF = (TH1F *)DefzDreconoiseHB41D0->Clone("DefzDreconoiseHB41DF");
15688 
15689  for (int jphi = 0; jphi < nphi; jphi++) {
15690  for (int jeta = 0; jeta < neta; jeta++) {
15691  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
15692  for (int i = 0; i < ndepth; i++) {
15693  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15694  if (areconoiseHB[i][jeta][jphi] > 0.) {
15695  DefzDreconoiseHB41D->Fill(jphi, ccc1);
15696  DefzDreconoiseHB41D0->Fill(jphi, 1.);
15697  }
15698  }
15699  }
15700  }
15701  }
15702  // DefzDreconoiseHB41D->Sumw2();DefzDreconoiseHB41D0->Sumw2();
15703 
15704  DefzDreconoiseHB41DF->Divide(DefzDreconoiseHB41D, DefzDreconoiseHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
15705  DefzDreconoiseHB41D0->Sumw2();
15706  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHB41DF->SetBinError(jphi,0.01);}
15707  gPad->SetGridy();
15708  gPad->SetGridx(); // gPad->SetLogz();
15709  DefzDreconoiseHB41DF->SetMarkerStyle(20);
15710  DefzDreconoiseHB41DF->SetMarkerSize(1.4);
15711  DefzDreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
15712  DefzDreconoiseHB41DF->SetXTitle("#phi \b");
15713  DefzDreconoiseHB41DF->SetYTitle(" <D> \b");
15714  DefzDreconoiseHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
15715  DefzDreconoiseHB41DF->SetMarkerColor(4);
15716  DefzDreconoiseHB41DF->SetLineColor(
15717  4); //DefzDreconoiseHB41DF->SetMinimum(0.8); DefzDreconoiseHB41DF->SetMinimum(-0.015);
15718  DefzDreconoiseHB41DF->Draw("Error");
15720  c1x1->Update();
15721  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHB.png");
15722  c1x1->Clear();
15723  // clean-up
15724  if (DefzDreconoiseHB41D)
15725  delete DefzDreconoiseHB41D;
15726  if (DefzDreconoiseHB41D0)
15727  delete DefzDreconoiseHB41D0;
15728  if (DefzDreconoiseHB41DF)
15729  delete DefzDreconoiseHB41DF;
15730 
15731  //========================================================================================== 14
15732  //======================================================================
15733  //======================================================================1D plot: D vs phi , different eta, depth=1
15734  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
15735  c3x5->Clear();
15737  c3x5->Divide(4, 4);
15738  c3x5->cd(1);
15739  int kcountHBpositivedirectionReconoiseD1 = 1;
15740  TH1F *h2CeffHBpositivedirectionReconoiseD1 = new TH1F("h2CeffHBpositivedirectionReconoiseD1", "", nphi, 0., 72.);
15741 
15742  for (int jeta = 0; jeta < njeta; jeta++) {
15743  // positivedirectionReconoiseD:
15744  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15745  // for (int i=0;i<ndepth;i++) {
15746  // depth=1
15747  for (int i = 0; i < 1; i++) {
15748  TH1F *HBpositivedirectionReconoiseD1 = (TH1F *)h2CeffHBpositivedirectionReconoiseD1->Clone("twod1");
15749 
15750  float ccctest = 0; // to avoid empty massive elements
15751  for (int jphi = 0; jphi < nphi; jphi++) {
15752  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15753  if (areconoiseHB[i][jeta][jphi] > 0.) {
15754  HBpositivedirectionReconoiseD1->Fill(jphi, ccc1);
15755  ccctest = 1.; //HBpositivedirectionReconoiseD1->SetBinError(i,0.01);
15756  }
15757  } // for jphi
15758  if (ccctest > 0.) {
15759  //cout<<"1414 kcountHBpositivedirectionReconoiseD1 = "<<kcountHBpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
15760  c3x5->cd(kcountHBpositivedirectionReconoiseD1);
15761  HBpositivedirectionReconoiseD1->SetMarkerStyle(20);
15762  HBpositivedirectionReconoiseD1->SetMarkerSize(0.4);
15763  HBpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
15764  HBpositivedirectionReconoiseD1->SetXTitle("HBpositivedirectionReconoiseD1 \b");
15765  HBpositivedirectionReconoiseD1->SetMarkerColor(2);
15766  HBpositivedirectionReconoiseD1->SetLineColor(0);
15767  gPad->SetGridy();
15768  gPad->SetGridx();
15769  // gPad->SetLogy();
15770  if (kcountHBpositivedirectionReconoiseD1 == 1)
15771  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
15772  if (kcountHBpositivedirectionReconoiseD1 == 2)
15773  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
15774  if (kcountHBpositivedirectionReconoiseD1 == 3)
15775  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
15776  if (kcountHBpositivedirectionReconoiseD1 == 4)
15777  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
15778  if (kcountHBpositivedirectionReconoiseD1 == 5)
15779  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
15780  if (kcountHBpositivedirectionReconoiseD1 == 6)
15781  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
15782  if (kcountHBpositivedirectionReconoiseD1 == 7)
15783  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
15784  if (kcountHBpositivedirectionReconoiseD1 == 8)
15785  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
15786  if (kcountHBpositivedirectionReconoiseD1 == 9)
15787  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
15788  if (kcountHBpositivedirectionReconoiseD1 == 10)
15789  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
15790  if (kcountHBpositivedirectionReconoiseD1 == 11)
15791  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
15792  if (kcountHBpositivedirectionReconoiseD1 == 12)
15793  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
15794  if (kcountHBpositivedirectionReconoiseD1 == 13)
15795  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
15796  if (kcountHBpositivedirectionReconoiseD1 == 14)
15797  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
15798  if (kcountHBpositivedirectionReconoiseD1 == 15)
15799  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
15800  if (kcountHBpositivedirectionReconoiseD1 == 16)
15801  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
15802  HBpositivedirectionReconoiseD1->Draw("Error");
15803  kcountHBpositivedirectionReconoiseD1++;
15804  if (kcountHBpositivedirectionReconoiseD1 > 16)
15805  break; // 4x6 = 24
15806  } //ccctest>0
15807 
15808  } // for i
15809  } //if(jeta-41 >= 0)
15810  } //for jeta
15812  c3x5->Update();
15813  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
15814  c3x5->Clear();
15815  // clean-up
15816  if (h2CeffHBpositivedirectionReconoiseD1)
15817  delete h2CeffHBpositivedirectionReconoiseD1;
15818  //========================================================================================== 15
15819  //======================================================================
15820  //======================================================================1D plot: D vs phi , different eta, depth=2
15821  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
15822  c3x5->Clear();
15823  c3x5->Divide(4, 4);
15824  c3x5->cd(1);
15825  int kcountHBpositivedirectionReconoiseD2 = 1;
15826  TH1F *h2CeffHBpositivedirectionReconoiseD2 = new TH1F("h2CeffHBpositivedirectionReconoiseD2", "", nphi, 0., 72.);
15827 
15828  for (int jeta = 0; jeta < njeta; jeta++) {
15829  // positivedirectionReconoiseD:
15830  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15831  // for (int i=0;i<ndepth;i++) {
15832  // depth=2
15833  for (int i = 1; i < 2; i++) {
15834  TH1F *HBpositivedirectionReconoiseD2 = (TH1F *)h2CeffHBpositivedirectionReconoiseD2->Clone("twod1");
15835 
15836  float ccctest = 0; // to avoid empty massive elements
15837  for (int jphi = 0; jphi < nphi; jphi++) {
15838  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15839  if (areconoiseHB[i][jeta][jphi] > 0.) {
15840  HBpositivedirectionReconoiseD2->Fill(jphi, ccc1);
15841  ccctest = 1.; //HBpositivedirectionReconoiseD2->SetBinError(i,0.01);
15842  }
15843  } // for jphi
15844  if (ccctest > 0.) {
15845  //cout<<"1515 kcountHBpositivedirectionReconoiseD2 = "<<kcountHBpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
15846  c3x5->cd(kcountHBpositivedirectionReconoiseD2);
15847  HBpositivedirectionReconoiseD2->SetMarkerStyle(20);
15848  HBpositivedirectionReconoiseD2->SetMarkerSize(0.4);
15849  HBpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
15850  HBpositivedirectionReconoiseD2->SetXTitle("HBpositivedirectionReconoiseD2 \b");
15851  HBpositivedirectionReconoiseD2->SetMarkerColor(2);
15852  HBpositivedirectionReconoiseD2->SetLineColor(0);
15853  gPad->SetGridy();
15854  gPad->SetGridx();
15855  // gPad->SetLogy();
15856  if (kcountHBpositivedirectionReconoiseD2 == 1)
15857  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
15858  if (kcountHBpositivedirectionReconoiseD2 == 2)
15859  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
15860  if (kcountHBpositivedirectionReconoiseD2 == 3)
15861  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
15862  if (kcountHBpositivedirectionReconoiseD2 == 4)
15863  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
15864  if (kcountHBpositivedirectionReconoiseD2 == 5)
15865  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
15866  if (kcountHBpositivedirectionReconoiseD2 == 6)
15867  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
15868  if (kcountHBpositivedirectionReconoiseD2 == 7)
15869  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
15870  if (kcountHBpositivedirectionReconoiseD2 == 8)
15871  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
15872  if (kcountHBpositivedirectionReconoiseD2 == 9)
15873  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
15874  if (kcountHBpositivedirectionReconoiseD2 == 10)
15875  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
15876  if (kcountHBpositivedirectionReconoiseD2 == 11)
15877  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
15878  if (kcountHBpositivedirectionReconoiseD2 == 12)
15879  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
15880  if (kcountHBpositivedirectionReconoiseD2 == 13)
15881  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
15882  if (kcountHBpositivedirectionReconoiseD2 == 14)
15883  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
15884  if (kcountHBpositivedirectionReconoiseD2 == 15)
15885  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
15886  if (kcountHBpositivedirectionReconoiseD2 == 16)
15887  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
15888  HBpositivedirectionReconoiseD2->Draw("Error");
15889  kcountHBpositivedirectionReconoiseD2++;
15890  if (kcountHBpositivedirectionReconoiseD2 > 16)
15891  break; // 4x6 = 24
15892  } //ccctest>0
15893 
15894  } // for i
15895  } //if(jeta-41 >= 0)
15896  } //for jeta
15898  c3x5->Update();
15899  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
15900  c3x5->Clear();
15901  // clean-up
15902  if (h2CeffHBpositivedirectionReconoiseD2)
15903  delete h2CeffHBpositivedirectionReconoiseD2;
15904  //========================================================================================== 16
15905  //======================================================================
15906  //======================================================================1D plot: D vs phi , different eta, depth=3
15907  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
15908  c3x5->Clear();
15909  c3x5->Divide(4, 4);
15910  c3x5->cd(1);
15911  int kcountHBpositivedirectionReconoiseD3 = 1;
15912  TH1F *h2CeffHBpositivedirectionReconoiseD3 = new TH1F("h2CeffHBpositivedirectionReconoiseD3", "", nphi, 0., 72.);
15913 
15914  for (int jeta = 0; jeta < njeta; jeta++) {
15915  // positivedirectionReconoiseD:
15916  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15917  // for (int i=0;i<ndepth;i++) {
15918  // depth=3
15919  for (int i = 2; i < 3; i++) {
15920  TH1F *HBpositivedirectionReconoiseD3 = (TH1F *)h2CeffHBpositivedirectionReconoiseD3->Clone("twod1");
15921 
15922  float ccctest = 0; // to avoid empty massive elements
15923  for (int jphi = 0; jphi < nphi; jphi++) {
15924  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15925  if (areconoiseHB[i][jeta][jphi] > 0.) {
15926  HBpositivedirectionReconoiseD3->Fill(jphi, ccc1);
15927  ccctest = 1.; //HBpositivedirectionReconoiseD3->SetBinError(i,0.01);
15928  }
15929  } // for jphi
15930  if (ccctest > 0.) {
15931  //cout<<"1616 kcountHBpositivedirectionReconoiseD3 = "<<kcountHBpositivedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
15932  c3x5->cd(kcountHBpositivedirectionReconoiseD3);
15933  HBpositivedirectionReconoiseD3->SetMarkerStyle(20);
15934  HBpositivedirectionReconoiseD3->SetMarkerSize(0.4);
15935  HBpositivedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
15936  HBpositivedirectionReconoiseD3->SetXTitle("HBpositivedirectionReconoiseD3 \b");
15937  HBpositivedirectionReconoiseD3->SetMarkerColor(2);
15938  HBpositivedirectionReconoiseD3->SetLineColor(0);
15939  gPad->SetGridy();
15940  gPad->SetGridx();
15941  // gPad->SetLogy();
15942  if (kcountHBpositivedirectionReconoiseD3 == 1)
15943  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
15944  if (kcountHBpositivedirectionReconoiseD3 == 2)
15945  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
15946  if (kcountHBpositivedirectionReconoiseD3 == 3)
15947  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
15948  if (kcountHBpositivedirectionReconoiseD3 == 4)
15949  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
15950  if (kcountHBpositivedirectionReconoiseD3 == 5)
15951  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
15952  if (kcountHBpositivedirectionReconoiseD3 == 6)
15953  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
15954  if (kcountHBpositivedirectionReconoiseD3 == 7)
15955  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
15956  if (kcountHBpositivedirectionReconoiseD3 == 8)
15957  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
15958  if (kcountHBpositivedirectionReconoiseD3 == 9)
15959  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
15960  if (kcountHBpositivedirectionReconoiseD3 == 10)
15961  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
15962  if (kcountHBpositivedirectionReconoiseD3 == 11)
15963  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
15964  if (kcountHBpositivedirectionReconoiseD3 == 12)
15965  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
15966  if (kcountHBpositivedirectionReconoiseD3 == 13)
15967  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
15968  if (kcountHBpositivedirectionReconoiseD3 == 14)
15969  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
15970  if (kcountHBpositivedirectionReconoiseD3 == 15)
15971  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
15972  if (kcountHBpositivedirectionReconoiseD3 == 16)
15973  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
15974  HBpositivedirectionReconoiseD3->Draw("Error");
15975  kcountHBpositivedirectionReconoiseD3++;
15976  if (kcountHBpositivedirectionReconoiseD3 > 16)
15977  break; // 4x6 = 24
15978  } //ccctest>0
15979 
15980  } // for i
15981  } //if(jeta-41 >= 0)
15982  } //for jeta
15984  c3x5->Update();
15985  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
15986  c3x5->Clear();
15987  // clean-up
15988  if (h2CeffHBpositivedirectionReconoiseD3)
15989  delete h2CeffHBpositivedirectionReconoiseD3;
15990  //========================================================================================== 17
15991  //======================================================================
15992  //======================================================================1D plot: D vs phi , different eta, depth=4
15993  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
15994  c3x5->Clear();
15995  c3x5->Divide(4, 4);
15996  c3x5->cd(1);
15997  int kcountHBpositivedirectionReconoiseD4 = 1;
15998  TH1F *h2CeffHBpositivedirectionReconoiseD4 = new TH1F("h2CeffHBpositivedirectionReconoiseD4", "", nphi, 0., 72.);
15999 
16000  for (int jeta = 0; jeta < njeta; jeta++) {
16001  // positivedirectionReconoiseD:
16002  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
16003  // for (int i=0;i<ndepth;i++) {
16004  // depth=4
16005  for (int i = 3; i < 4; i++) {
16006  TH1F *HBpositivedirectionReconoiseD4 = (TH1F *)h2CeffHBpositivedirectionReconoiseD4->Clone("twod1");
16007 
16008  float ccctest = 0; // to avoid empty massive elements
16009  for (int jphi = 0; jphi < nphi; jphi++) {
16010  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16011  if (areconoiseHB[i][jeta][jphi] > 0.) {
16012  HBpositivedirectionReconoiseD4->Fill(jphi, ccc1);
16013  ccctest = 1.; //HBpositivedirectionReconoiseD4->SetBinError(i,0.01);
16014  }
16015  } // for jphi
16016  if (ccctest > 0.) {
16017  //cout<<"1717 kcountHBpositivedirectionReconoiseD4 = "<<kcountHBpositivedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
16018  c3x5->cd(kcountHBpositivedirectionReconoiseD4);
16019  HBpositivedirectionReconoiseD4->SetMarkerStyle(20);
16020  HBpositivedirectionReconoiseD4->SetMarkerSize(0.4);
16021  HBpositivedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
16022  HBpositivedirectionReconoiseD4->SetXTitle("HBpositivedirectionReconoiseD4 \b");
16023  HBpositivedirectionReconoiseD4->SetMarkerColor(2);
16024  HBpositivedirectionReconoiseD4->SetLineColor(0);
16025  gPad->SetGridy();
16026  gPad->SetGridx();
16027  // gPad->SetLogy();
16028  if (kcountHBpositivedirectionReconoiseD4 == 1)
16029  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
16030  if (kcountHBpositivedirectionReconoiseD4 == 2)
16031  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
16032  if (kcountHBpositivedirectionReconoiseD4 == 3)
16033  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
16034  if (kcountHBpositivedirectionReconoiseD4 == 4)
16035  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
16036  if (kcountHBpositivedirectionReconoiseD4 == 5)
16037  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
16038  if (kcountHBpositivedirectionReconoiseD4 == 6)
16039  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
16040  if (kcountHBpositivedirectionReconoiseD4 == 7)
16041  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
16042  if (kcountHBpositivedirectionReconoiseD4 == 8)
16043  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
16044  if (kcountHBpositivedirectionReconoiseD4 == 9)
16045  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
16046  if (kcountHBpositivedirectionReconoiseD4 == 10)
16047  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
16048  if (kcountHBpositivedirectionReconoiseD4 == 11)
16049  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
16050  if (kcountHBpositivedirectionReconoiseD4 == 12)
16051  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
16052  if (kcountHBpositivedirectionReconoiseD4 == 13)
16053  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
16054  if (kcountHBpositivedirectionReconoiseD4 == 14)
16055  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
16056  if (kcountHBpositivedirectionReconoiseD4 == 15)
16057  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
16058  if (kcountHBpositivedirectionReconoiseD4 == 16)
16059  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
16060  HBpositivedirectionReconoiseD4->Draw("Error");
16061  kcountHBpositivedirectionReconoiseD4++;
16062  if (kcountHBpositivedirectionReconoiseD4 > 16)
16063  break; // 4x6 = 24
16064  } //ccctest>0
16065 
16066  } // for i
16067  } //if(jeta-41 >= 0)
16068  } //for jeta
16070  c3x5->Update();
16071  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
16072  c3x5->Clear();
16073  // clean-up
16074  if (h2CeffHBpositivedirectionReconoiseD4)
16075  delete h2CeffHBpositivedirectionReconoiseD4;
16076 
16077  //========================================================================================== 22214
16078  //======================================================================
16079  //======================================================================1D plot: D vs phi , different eta, depth=1
16080  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
16081  c3x5->Clear();
16083  c3x5->Divide(4, 4);
16084  c3x5->cd(1);
16085  int kcountHBnegativedirectionReconoiseD1 = 1;
16086  TH1F *h2CeffHBnegativedirectionReconoiseD1 = new TH1F("h2CeffHBnegativedirectionReconoiseD1", "", nphi, 0., 72.);
16087 
16088  for (int jeta = 0; jeta < njeta; jeta++) {
16089  // negativedirectionReconoiseD:
16090  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16091  // for (int i=0;i<ndepth;i++) {
16092  // depth=1
16093  for (int i = 0; i < 1; i++) {
16094  TH1F *HBnegativedirectionReconoiseD1 = (TH1F *)h2CeffHBnegativedirectionReconoiseD1->Clone("twod1");
16095 
16096  float ccctest = 0; // to avoid empty massive elements
16097  for (int jphi = 0; jphi < nphi; jphi++) {
16098  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16099  if (areconoiseHB[i][jeta][jphi] > 0.) {
16100  HBnegativedirectionReconoiseD1->Fill(jphi, ccc1);
16101  ccctest = 1.; //HBnegativedirectionReconoiseD1->SetBinError(i,0.01);
16102  }
16103  } // for jphi
16104  if (ccctest > 0.) {
16105  //cout<<"1414 kcountHBnegativedirectionReconoiseD1 = "<<kcountHBnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
16106  c3x5->cd(kcountHBnegativedirectionReconoiseD1);
16107  HBnegativedirectionReconoiseD1->SetMarkerStyle(20);
16108  HBnegativedirectionReconoiseD1->SetMarkerSize(0.4);
16109  HBnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
16110  HBnegativedirectionReconoiseD1->SetXTitle("HBnegativedirectionReconoiseD1 \b");
16111  HBnegativedirectionReconoiseD1->SetMarkerColor(2);
16112  HBnegativedirectionReconoiseD1->SetLineColor(0);
16113  gPad->SetGridy();
16114  gPad->SetGridx();
16115  // gPad->SetLogy();
16116  if (kcountHBnegativedirectionReconoiseD1 == 1)
16117  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-16; depth = 1 \b");
16118  if (kcountHBnegativedirectionReconoiseD1 == 2)
16119  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-15; depth = 1 \b");
16120  if (kcountHBnegativedirectionReconoiseD1 == 3)
16121  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-14; depth = 1 \b");
16122  if (kcountHBnegativedirectionReconoiseD1 == 4)
16123  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-13; depth = 1 \b");
16124  if (kcountHBnegativedirectionReconoiseD1 == 5)
16125  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-12; depth = 1 \b");
16126  if (kcountHBnegativedirectionReconoiseD1 == 6)
16127  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-11; depth = 1 \b");
16128  if (kcountHBnegativedirectionReconoiseD1 == 7)
16129  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-10; depth = 1 \b");
16130  if (kcountHBnegativedirectionReconoiseD1 == 8)
16131  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-9; depth = 1 \b");
16132  if (kcountHBnegativedirectionReconoiseD1 == 9)
16133  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-8; depth = 1 \b");
16134  if (kcountHBnegativedirectionReconoiseD1 == 10)
16135  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-7; depth = 1 \b");
16136  if (kcountHBnegativedirectionReconoiseD1 == 11)
16137  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-6; depth = 1 \b");
16138  if (kcountHBnegativedirectionReconoiseD1 == 12)
16139  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-5; depth = 1 \b");
16140  if (kcountHBnegativedirectionReconoiseD1 == 13)
16141  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-4; depth = 1 \b");
16142  if (kcountHBnegativedirectionReconoiseD1 == 14)
16143  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-3; depth = 1 \b");
16144  if (kcountHBnegativedirectionReconoiseD1 == 15)
16145  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-2; depth = 1 \b");
16146  if (kcountHBnegativedirectionReconoiseD1 == 16)
16147  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-1; depth = 1 \b");
16148  HBnegativedirectionReconoiseD1->Draw("Error");
16149  kcountHBnegativedirectionReconoiseD1++;
16150  if (kcountHBnegativedirectionReconoiseD1 > 16)
16151  break; // 4x6 = 24
16152  } //ccctest>0
16153 
16154  } // for i
16155  } //if(jeta-41 < 0)
16156  } //for jeta
16158  c3x5->Update();
16159  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
16160  c3x5->Clear();
16161  // clean-up
16162  if (h2CeffHBnegativedirectionReconoiseD1)
16163  delete h2CeffHBnegativedirectionReconoiseD1;
16164  //========================================================================================== 22215
16165  //======================================================================
16166  //======================================================================1D plot: D vs phi , different eta, depth=2
16167  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
16168  c3x5->Clear();
16169  c3x5->Divide(4, 4);
16170  c3x5->cd(1);
16171  int kcountHBnegativedirectionReconoiseD2 = 1;
16172  TH1F *h2CeffHBnegativedirectionReconoiseD2 = new TH1F("h2CeffHBnegativedirectionReconoiseD2", "", nphi, 0., 72.);
16173 
16174  for (int jeta = 0; jeta < njeta; jeta++) {
16175  // negativedirectionReconoiseD:
16176  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16177  // for (int i=0;i<ndepth;i++) {
16178  // depth=2
16179  for (int i = 1; i < 2; i++) {
16180  TH1F *HBnegativedirectionReconoiseD2 = (TH1F *)h2CeffHBnegativedirectionReconoiseD2->Clone("twod1");
16181 
16182  float ccctest = 0; // to avoid empty massive elements
16183  for (int jphi = 0; jphi < nphi; jphi++) {
16184  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16185  if (areconoiseHB[i][jeta][jphi] > 0.) {
16186  HBnegativedirectionReconoiseD2->Fill(jphi, ccc1);
16187  ccctest = 1.; //HBnegativedirectionReconoiseD2->SetBinError(i,0.01);
16188  }
16189  } // for jphi
16190  if (ccctest > 0.) {
16191  //cout<<"1515 kcountHBnegativedirectionReconoiseD2 = "<<kcountHBnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
16192  c3x5->cd(kcountHBnegativedirectionReconoiseD2);
16193  HBnegativedirectionReconoiseD2->SetMarkerStyle(20);
16194  HBnegativedirectionReconoiseD2->SetMarkerSize(0.4);
16195  HBnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
16196  HBnegativedirectionReconoiseD2->SetXTitle("HBnegativedirectionReconoiseD2 \b");
16197  HBnegativedirectionReconoiseD2->SetMarkerColor(2);
16198  HBnegativedirectionReconoiseD2->SetLineColor(0);
16199  gPad->SetGridy();
16200  gPad->SetGridx();
16201  // gPad->SetLogy();
16202  if (kcountHBnegativedirectionReconoiseD2 == 1)
16203  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
16204  if (kcountHBnegativedirectionReconoiseD2 == 2)
16205  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
16206  if (kcountHBnegativedirectionReconoiseD2 == 3)
16207  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
16208  if (kcountHBnegativedirectionReconoiseD2 == 4)
16209  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
16210  if (kcountHBnegativedirectionReconoiseD2 == 5)
16211  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
16212  if (kcountHBnegativedirectionReconoiseD2 == 6)
16213  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
16214  if (kcountHBnegativedirectionReconoiseD2 == 7)
16215  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
16216  if (kcountHBnegativedirectionReconoiseD2 == 8)
16217  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-9; depth = 2 \b");
16218  if (kcountHBnegativedirectionReconoiseD2 == 9)
16219  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-8; depth = 2 \b");
16220  if (kcountHBnegativedirectionReconoiseD2 == 10)
16221  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-7; depth = 2 \b");
16222  if (kcountHBnegativedirectionReconoiseD2 == 11)
16223  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-6; depth = 2 \b");
16224  if (kcountHBnegativedirectionReconoiseD2 == 12)
16225  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-5; depth = 2 \b");
16226  if (kcountHBnegativedirectionReconoiseD2 == 13)
16227  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-4; depth = 2 \b");
16228  if (kcountHBnegativedirectionReconoiseD2 == 14)
16229  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-3; depth = 2 \b");
16230  if (kcountHBnegativedirectionReconoiseD2 == 15)
16231  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-2; depth = 2 \b");
16232  if (kcountHBnegativedirectionReconoiseD2 == 16)
16233  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-1; depth = 2 \b");
16234  HBnegativedirectionReconoiseD2->Draw("Error");
16235  kcountHBnegativedirectionReconoiseD2++;
16236  if (kcountHBnegativedirectionReconoiseD2 > 16)
16237  break; // 4x6 = 24
16238  } //ccctest>0
16239 
16240  } // for i
16241  } //if(jeta-41 < 0)
16242  } //for jeta
16244  c3x5->Update();
16245  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
16246  c3x5->Clear();
16247  // clean-up
16248  if (h2CeffHBnegativedirectionReconoiseD2)
16249  delete h2CeffHBnegativedirectionReconoiseD2;
16250  //========================================================================================== 22216
16251  //======================================================================
16252  //======================================================================1D plot: D vs phi , different eta, depth=3
16253  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
16254  c3x5->Clear();
16255  c3x5->Divide(4, 4);
16256  c3x5->cd(1);
16257  int kcountHBnegativedirectionReconoiseD3 = 1;
16258  TH1F *h2CeffHBnegativedirectionReconoiseD3 = new TH1F("h2CeffHBnegativedirectionReconoiseD3", "", nphi, 0., 72.);
16259 
16260  for (int jeta = 0; jeta < njeta; jeta++) {
16261  // negativedirectionReconoiseD:
16262  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16263  // for (int i=0;i<ndepth;i++) {
16264  // depth=3
16265  for (int i = 2; i < 3; i++) {
16266  TH1F *HBnegativedirectionReconoiseD3 = (TH1F *)h2CeffHBnegativedirectionReconoiseD3->Clone("twod1");
16267 
16268  float ccctest = 0; // to avoid empty massive elements
16269  for (int jphi = 0; jphi < nphi; jphi++) {
16270  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16271  if (areconoiseHB[i][jeta][jphi] > 0.) {
16272  HBnegativedirectionReconoiseD3->Fill(jphi, ccc1);
16273  ccctest = 1.; //HBnegativedirectionReconoiseD3->SetBinError(i,0.01);
16274  }
16275  } // for jphi
16276  if (ccctest > 0.) {
16277  //cout<<"1616 kcountHBnegativedirectionReconoiseD3 = "<<kcountHBnegativedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
16278  c3x5->cd(kcountHBnegativedirectionReconoiseD3);
16279  HBnegativedirectionReconoiseD3->SetMarkerStyle(20);
16280  HBnegativedirectionReconoiseD3->SetMarkerSize(0.4);
16281  HBnegativedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
16282  HBnegativedirectionReconoiseD3->SetXTitle("HBnegativedirectionReconoiseD3 \b");
16283  HBnegativedirectionReconoiseD3->SetMarkerColor(2);
16284  HBnegativedirectionReconoiseD3->SetLineColor(0);
16285  gPad->SetGridy();
16286  gPad->SetGridx();
16287  // gPad->SetLogy();
16288  if (kcountHBnegativedirectionReconoiseD3 == 1)
16289  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
16290  if (kcountHBnegativedirectionReconoiseD3 == 2)
16291  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
16292  if (kcountHBnegativedirectionReconoiseD3 == 3)
16293  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
16294  if (kcountHBnegativedirectionReconoiseD3 == 4)
16295  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
16296  if (kcountHBnegativedirectionReconoiseD3 == 5)
16297  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
16298  if (kcountHBnegativedirectionReconoiseD3 == 6)
16299  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
16300  if (kcountHBnegativedirectionReconoiseD3 == 7)
16301  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
16302  if (kcountHBnegativedirectionReconoiseD3 == 8)
16303  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-9; depth = 3 \b");
16304  if (kcountHBnegativedirectionReconoiseD3 == 9)
16305  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-8; depth = 3 \b");
16306  if (kcountHBnegativedirectionReconoiseD3 == 10)
16307  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-7; depth = 3 \b");
16308  if (kcountHBnegativedirectionReconoiseD3 == 11)
16309  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-6; depth = 3 \b");
16310  if (kcountHBnegativedirectionReconoiseD3 == 12)
16311  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-5; depth = 3 \b");
16312  if (kcountHBnegativedirectionReconoiseD3 == 13)
16313  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-4; depth = 3 \b");
16314  if (kcountHBnegativedirectionReconoiseD3 == 14)
16315  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-3; depth = 3 \b");
16316  if (kcountHBnegativedirectionReconoiseD3 == 15)
16317  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-2; depth = 3 \b");
16318  if (kcountHBnegativedirectionReconoiseD3 == 16)
16319  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-1; depth = 3 \b");
16320  HBnegativedirectionReconoiseD3->Draw("Error");
16321  kcountHBnegativedirectionReconoiseD3++;
16322  if (kcountHBnegativedirectionReconoiseD3 > 16)
16323  break; // 4x6 = 24
16324  } //ccctest>0
16325 
16326  } // for i
16327  } //if(jeta-41 < 0)
16328  } //for jeta
16330  c3x5->Update();
16331  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
16332  c3x5->Clear();
16333  // clean-up
16334  if (h2CeffHBnegativedirectionReconoiseD3)
16335  delete h2CeffHBnegativedirectionReconoiseD3;
16336  //========================================================================================== 22217
16337  //======================================================================
16338  //======================================================================1D plot: D vs phi , different eta, depth=4
16339  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
16340  c3x5->Clear();
16341  c3x5->Divide(4, 4);
16342  c3x5->cd(1);
16343  int kcountHBnegativedirectionReconoiseD4 = 1;
16344  TH1F *h2CeffHBnegativedirectionReconoiseD4 = new TH1F("h2CeffHBnegativedirectionReconoiseD4", "", nphi, 0., 72.);
16345 
16346  for (int jeta = 0; jeta < njeta; jeta++) {
16347  // negativedirectionReconoiseD:
16348  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16349  // for (int i=0;i<ndepth;i++) {
16350  // depth=4
16351  for (int i = 3; i < 4; i++) {
16352  TH1F *HBnegativedirectionReconoiseD4 = (TH1F *)h2CeffHBnegativedirectionReconoiseD4->Clone("twod1");
16353 
16354  float ccctest = 0; // to avoid empty massive elements
16355  for (int jphi = 0; jphi < nphi; jphi++) {
16356  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16357  if (areconoiseHB[i][jeta][jphi] > 0.) {
16358  HBnegativedirectionReconoiseD4->Fill(jphi, ccc1);
16359  ccctest = 1.; //HBnegativedirectionReconoiseD4->SetBinError(i,0.01);
16360  }
16361  } // for jphi
16362  if (ccctest > 0.) {
16363  //cout<<"1717 kcountHBnegativedirectionReconoiseD4 = "<<kcountHBnegativedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
16364  c3x5->cd(kcountHBnegativedirectionReconoiseD4);
16365  HBnegativedirectionReconoiseD4->SetMarkerStyle(20);
16366  HBnegativedirectionReconoiseD4->SetMarkerSize(0.4);
16367  HBnegativedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
16368  HBnegativedirectionReconoiseD4->SetXTitle("HBnegativedirectionReconoiseD4 \b");
16369  HBnegativedirectionReconoiseD4->SetMarkerColor(2);
16370  HBnegativedirectionReconoiseD4->SetLineColor(0);
16371  gPad->SetGridy();
16372  gPad->SetGridx();
16373  // gPad->SetLogy();
16374  if (kcountHBnegativedirectionReconoiseD4 == 1)
16375  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
16376  if (kcountHBnegativedirectionReconoiseD4 == 2)
16377  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
16378  if (kcountHBnegativedirectionReconoiseD4 == 3)
16379  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
16380  if (kcountHBnegativedirectionReconoiseD4 == 4)
16381  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
16382  if (kcountHBnegativedirectionReconoiseD4 == 5)
16383  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
16384  if (kcountHBnegativedirectionReconoiseD4 == 6)
16385  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
16386  if (kcountHBnegativedirectionReconoiseD4 == 7)
16387  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
16388  if (kcountHBnegativedirectionReconoiseD4 == 8)
16389  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-9; depth = 4 \b");
16390  if (kcountHBnegativedirectionReconoiseD4 == 9)
16391  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-8; depth = 4 \b");
16392  if (kcountHBnegativedirectionReconoiseD4 == 10)
16393  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-7; depth = 4 \b");
16394  if (kcountHBnegativedirectionReconoiseD4 == 11)
16395  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-6; depth = 4 \b");
16396  if (kcountHBnegativedirectionReconoiseD4 == 12)
16397  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-5; depth = 4 \b");
16398  if (kcountHBnegativedirectionReconoiseD4 == 13)
16399  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-4; depth = 4 \b");
16400  if (kcountHBnegativedirectionReconoiseD4 == 14)
16401  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-3; depth = 4 \b");
16402  if (kcountHBnegativedirectionReconoiseD4 == 15)
16403  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-2; depth = 4 \b");
16404  if (kcountHBnegativedirectionReconoiseD4 == 16)
16405  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-1; depth = 4 \b");
16406  HBnegativedirectionReconoiseD4->Draw("Error");
16407  kcountHBnegativedirectionReconoiseD4++;
16408  if (kcountHBnegativedirectionReconoiseD4 > 16)
16409  break; // 4x6 = 24
16410  } //ccctest>0
16411 
16412  } // for i
16413  } //if(jeta-41 < 0)
16414  } //for jeta
16416  c3x5->Update();
16417  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
16418  c3x5->Clear();
16419  // clean-up
16420  if (h2CeffHBnegativedirectionReconoiseD4)
16421  delete h2CeffHBnegativedirectionReconoiseD4;
16422 
16423  //===================================================================== END of Reconoise HB for phi-symmetry
16424  //===================================================================== END of Reconoise HB for phi-symmetry
16425  //===================================================================== END of Reconoise HB for phi-symmetry
16426 
16430  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
16431  //ndepth = k_max[3];
16432  ndepth = 7;
16433  // const int ndepth = 7;
16434  double areconoisehe[ndepth][njeta][njphi];
16435  double breconoisehe[ndepth][njeta][njphi];
16436  double reconoisevariancehe[ndepth][njeta][njphi];
16438  TH2F *recNoiseEnergy1HE1 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HE1");
16439  TH2F *recNoiseEnergy0HE1 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE1");
16440  TH2F *recNoiseEnergyHE1 = (TH2F *)recNoiseEnergy1HE1->Clone("recNoiseEnergyHE1");
16441  recNoiseEnergyHE1->Divide(recNoiseEnergy1HE1, recNoiseEnergy0HE1, 1, 1, "B");
16442  TH2F *recNoiseEnergy1HE2 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HE2");
16443  TH2F *recNoiseEnergy0HE2 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE2");
16444  TH2F *recNoiseEnergyHE2 = (TH2F *)recNoiseEnergy1HE2->Clone("recNoiseEnergyHE2");
16445  recNoiseEnergyHE2->Divide(recNoiseEnergy1HE2, recNoiseEnergy0HE2, 1, 1, "B");
16446  TH2F *recNoiseEnergy1HE3 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HE3");
16447  TH2F *recNoiseEnergy0HE3 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE3");
16448  TH2F *recNoiseEnergyHE3 = (TH2F *)recNoiseEnergy1HE3->Clone("recNoiseEnergyHE3");
16449  recNoiseEnergyHE3->Divide(recNoiseEnergy1HE3, recNoiseEnergy0HE3, 1, 1, "B");
16450  TH2F *recNoiseEnergy1HE4 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HE4");
16451  TH2F *recNoiseEnergy0HE4 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE4");
16452  TH2F *recNoiseEnergyHE4 = (TH2F *)recNoiseEnergy1HE4->Clone("recNoiseEnergyHE4");
16453  recNoiseEnergyHE4->Divide(recNoiseEnergy1HE4, recNoiseEnergy0HE4, 1, 1, "B");
16454  TH2F *recNoiseEnergy1HE5 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HE5");
16455  TH2F *recNoiseEnergy0HE5 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE5");
16456  TH2F *recNoiseEnergyHE5 = (TH2F *)recNoiseEnergy1HE5->Clone("recNoiseEnergyHE5");
16457  recNoiseEnergyHE5->Divide(recNoiseEnergy1HE5, recNoiseEnergy0HE5, 1, 1, "B");
16458  TH2F *recNoiseEnergy1HE6 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HE6");
16459  TH2F *recNoiseEnergy0HE6 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE6");
16460  TH2F *recNoiseEnergyHE6 = (TH2F *)recNoiseEnergy1HE6->Clone("recNoiseEnergyHE6");
16461  recNoiseEnergyHE6->Divide(recNoiseEnergy1HE6, recNoiseEnergy0HE6, 1, 1, "B");
16462  TH2F *recNoiseEnergy1HE7 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HE7");
16463  TH2F *recNoiseEnergy0HE7 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE7");
16464  TH2F *recNoiseEnergyHE7 = (TH2F *)recNoiseEnergy1HE7->Clone("recNoiseEnergyHE7");
16465  recNoiseEnergyHE7->Divide(recNoiseEnergy1HE7, recNoiseEnergy0HE7, 1, 1, "B");
16466  for (int jeta = 0; jeta < njeta; jeta++) {
16467  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
16468  //====================================================================== PHI normalization & put R into massive areconoisehe
16469  //preparation for PHI normalization:
16470  double sumreconoiseHE0 = 0;
16471  int nsumreconoiseHE0 = 0;
16472  double sumreconoiseHE1 = 0;
16473  int nsumreconoiseHE1 = 0;
16474  double sumreconoiseHE2 = 0;
16475  int nsumreconoiseHE2 = 0;
16476  double sumreconoiseHE3 = 0;
16477  int nsumreconoiseHE3 = 0;
16478  double sumreconoiseHE4 = 0;
16479  int nsumreconoiseHE4 = 0;
16480  double sumreconoiseHE5 = 0;
16481  int nsumreconoiseHE5 = 0;
16482  double sumreconoiseHE6 = 0;
16483  int nsumreconoiseHE6 = 0;
16484  for (int jphi = 0; jphi < njphi; jphi++) {
16485  areconoisehe[0][jeta][jphi] = recNoiseEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
16486  areconoisehe[1][jeta][jphi] = recNoiseEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
16487  areconoisehe[2][jeta][jphi] = recNoiseEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
16488  areconoisehe[3][jeta][jphi] = recNoiseEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
16489  areconoisehe[4][jeta][jphi] = recNoiseEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
16490  areconoisehe[5][jeta][jphi] = recNoiseEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
16491  areconoisehe[6][jeta][jphi] = recNoiseEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
16492 
16493  breconoisehe[0][jeta][jphi] = recNoiseEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
16494  breconoisehe[1][jeta][jphi] = recNoiseEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
16495  breconoisehe[2][jeta][jphi] = recNoiseEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
16496  breconoisehe[3][jeta][jphi] = recNoiseEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
16497  breconoisehe[4][jeta][jphi] = recNoiseEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
16498  breconoisehe[5][jeta][jphi] = recNoiseEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
16499  breconoisehe[6][jeta][jphi] = recNoiseEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
16500 
16501  if (areconoisehe[0][jeta][jphi] != 0.) {
16502  sumreconoiseHE0 += areconoisehe[0][jeta][jphi];
16503  ++nsumreconoiseHE0;
16504  }
16505  if (areconoisehe[1][jeta][jphi] != 0.) {
16506  sumreconoiseHE1 += areconoisehe[1][jeta][jphi];
16507  ++nsumreconoiseHE1;
16508  }
16509  if (areconoisehe[2][jeta][jphi] != 0.) {
16510  sumreconoiseHE2 += areconoisehe[2][jeta][jphi];
16511  ++nsumreconoiseHE2;
16512  }
16513  if (areconoisehe[3][jeta][jphi] != 0.) {
16514  sumreconoiseHE3 += areconoisehe[3][jeta][jphi];
16515  ++nsumreconoiseHE3;
16516  }
16517  if (areconoisehe[4][jeta][jphi] != 0.) {
16518  sumreconoiseHE4 += areconoisehe[4][jeta][jphi];
16519  ++nsumreconoiseHE4;
16520  }
16521  if (areconoisehe[5][jeta][jphi] != 0.) {
16522  sumreconoiseHE5 += areconoisehe[5][jeta][jphi];
16523  ++nsumreconoiseHE5;
16524  }
16525  if (areconoisehe[6][jeta][jphi] != 0.) {
16526  sumreconoiseHE6 += areconoisehe[6][jeta][jphi];
16527  ++nsumreconoiseHE6;
16528  }
16529  } // phi
16530 
16531  // PHI normalization for DIF:
16532  for (int jphi = 0; jphi < njphi; jphi++) {
16533  if (sumreconoiseHE0 != 0.)
16534  breconoisehe[0][jeta][jphi] -= (sumreconoiseHE0 / nsumreconoiseHE0);
16535  if (sumreconoiseHE1 != 0.)
16536  breconoisehe[1][jeta][jphi] -= (sumreconoiseHE1 / nsumreconoiseHE1);
16537  if (sumreconoiseHE2 != 0.)
16538  breconoisehe[2][jeta][jphi] -= (sumreconoiseHE2 / nsumreconoiseHE2);
16539  if (sumreconoiseHE3 != 0.)
16540  breconoisehe[3][jeta][jphi] -= (sumreconoiseHE3 / nsumreconoiseHE3);
16541  if (sumreconoiseHE4 != 0.)
16542  breconoisehe[4][jeta][jphi] -= (sumreconoiseHE4 / nsumreconoiseHE4);
16543  if (sumreconoiseHE5 != 0.)
16544  breconoisehe[5][jeta][jphi] -= (sumreconoiseHE5 / nsumreconoiseHE5);
16545  if (sumreconoiseHE6 != 0.)
16546  breconoisehe[6][jeta][jphi] -= (sumreconoiseHE6 / nsumreconoiseHE6);
16547  } // phi
16548 
16549  // PHI normalization for R:
16550  for (int jphi = 0; jphi < njphi; jphi++) {
16551  if (sumreconoiseHE0 != 0.)
16552  areconoisehe[0][jeta][jphi] /= (sumreconoiseHE0 / nsumreconoiseHE0);
16553  if (sumreconoiseHE1 != 0.)
16554  areconoisehe[1][jeta][jphi] /= (sumreconoiseHE1 / nsumreconoiseHE1);
16555  if (sumreconoiseHE2 != 0.)
16556  areconoisehe[2][jeta][jphi] /= (sumreconoiseHE2 / nsumreconoiseHE2);
16557  if (sumreconoiseHE3 != 0.)
16558  areconoisehe[3][jeta][jphi] /= (sumreconoiseHE3 / nsumreconoiseHE3);
16559  if (sumreconoiseHE4 != 0.)
16560  areconoisehe[4][jeta][jphi] /= (sumreconoiseHE4 / nsumreconoiseHE4);
16561  if (sumreconoiseHE5 != 0.)
16562  areconoisehe[5][jeta][jphi] /= (sumreconoiseHE5 / nsumreconoiseHE5);
16563  if (sumreconoiseHE6 != 0.)
16564  areconoisehe[6][jeta][jphi] /= (sumreconoiseHE6 / nsumreconoiseHE6);
16565  } // phi
16566  } //if( (jeta-41 >=
16567  } //eta
16568  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
16569  //======================================================================
16570  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HE
16571  //======================================================================
16572  c2x1->Clear();
16574  c2x1->Divide(2, 1);
16575  c2x1->cd(1);
16576  TH2F *GefzRreconoiseHE42D = new TH2F("GefzRreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
16577  TH2F *GefzRreconoiseHE42D0 = new TH2F("GefzRreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
16578  TH2F *GefzRreconoiseHE42DF = (TH2F *)GefzRreconoiseHE42D0->Clone("GefzRreconoiseHE42DF");
16579  for (int i = 0; i < ndepth; i++) {
16580  for (int jeta = 0; jeta < neta; jeta++) {
16581  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
16582  for (int jphi = 0; jphi < nphi; jphi++) {
16583  double ccc1 = areconoisehe[i][jeta][jphi];
16584  int k2plot = jeta - 41;
16585  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
16586  if (ccc1 != 0.) {
16587  GefzRreconoiseHE42D->Fill(kkk, jphi, ccc1);
16588  GefzRreconoiseHE42D0->Fill(kkk, jphi, 1.);
16589  }
16590  }
16591  }
16592  }
16593  }
16594  GefzRreconoiseHE42DF->Divide(GefzRreconoiseHE42D, GefzRreconoiseHE42D0, 1, 1, "B"); // average A
16595  gPad->SetGridy();
16596  gPad->SetGridx(); // gPad->SetLogz();
16597  GefzRreconoiseHE42DF->SetXTitle("<R>_depth #eta \b");
16598  GefzRreconoiseHE42DF->SetYTitle(" #phi \b");
16599  GefzRreconoiseHE42DF->Draw("COLZ");
16600 
16601  c2x1->cd(2);
16602  TH1F *energyhitNoise_HE = (TH1F *)hfile->Get("h_energyhitNoise_HE");
16603  energyhitNoise_HE->SetMarkerStyle(20);
16604  energyhitNoise_HE->SetMarkerSize(0.4);
16605  energyhitNoise_HE->GetYaxis()->SetLabelSize(0.04);
16606  energyhitNoise_HE->SetXTitle("energyhitNoise_HE \b");
16607  energyhitNoise_HE->SetMarkerColor(2);
16608  energyhitNoise_HE->SetLineColor(0);
16609  gPad->SetGridy();
16610  gPad->SetGridx();
16611  energyhitNoise_HE->Draw("Error");
16612 
16614  c2x1->Update();
16615  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHE.png");
16616  c2x1->Clear();
16617  // clean-up
16618  if (GefzRreconoiseHE42D)
16619  delete GefzRreconoiseHE42D;
16620  if (GefzRreconoiseHE42D0)
16621  delete GefzRreconoiseHE42D0;
16622  if (GefzRreconoiseHE42DF)
16623  delete GefzRreconoiseHE42DF;
16624  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
16625  //======================================================================
16626  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
16627  c1x1->Clear();
16629  c1x1->Divide(1, 1);
16630  c1x1->cd(1);
16631  TH1F *GefzRreconoiseHE41D = new TH1F("GefzRreconoiseHE41D", "", nphi, 0., 72.);
16632  TH1F *GefzRreconoiseHE41D0 = new TH1F("GefzRreconoiseHE41D0", "", nphi, 0., 72.);
16633  TH1F *GefzRreconoiseHE41DF = (TH1F *)GefzRreconoiseHE41D0->Clone("GefzRreconoiseHE41DF");
16634  for (int jphi = 0; jphi < nphi; jphi++) {
16635  for (int jeta = 0; jeta < neta; jeta++) {
16636  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
16637  for (int i = 0; i < ndepth; i++) {
16638  double ccc1 = areconoisehe[i][jeta][jphi];
16639  if (ccc1 != 0.) {
16640  GefzRreconoiseHE41D->Fill(jphi, ccc1);
16641  GefzRreconoiseHE41D0->Fill(jphi, 1.);
16642  }
16643  }
16644  }
16645  }
16646  }
16647  GefzRreconoiseHE41DF->Divide(GefzRreconoiseHE41D, GefzRreconoiseHE41D0, 1, 1, "B"); // R averaged over depthes & eta
16648  GefzRreconoiseHE41D0->Sumw2();
16649  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHE41DF->SetBinError(jphi,0.01);}
16650  gPad->SetGridy();
16651  gPad->SetGridx(); // gPad->SetLogz();
16652  GefzRreconoiseHE41DF->SetMarkerStyle(20);
16653  GefzRreconoiseHE41DF->SetMarkerSize(1.4);
16654  GefzRreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
16655  GefzRreconoiseHE41DF->SetXTitle("#phi \b");
16656  GefzRreconoiseHE41DF->SetYTitle(" <R> \b");
16657  GefzRreconoiseHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
16658  GefzRreconoiseHE41DF->SetMarkerColor(4);
16659  GefzRreconoiseHE41DF->SetLineColor(
16660  4); // GefzRreconoiseHE41DF->SetMinimum(0.8); // GefzRreconoiseHE41DF->SetMaximum(1.000);
16661  GefzRreconoiseHE41DF->Draw("Error");
16663  c1x1->Update();
16664  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHE.png");
16665  c1x1->Clear();
16666  // clean-up
16667  if (GefzRreconoiseHE41D)
16668  delete GefzRreconoiseHE41D;
16669  if (GefzRreconoiseHE41D0)
16670  delete GefzRreconoiseHE41D0;
16671  if (GefzRreconoiseHE41DF)
16672  delete GefzRreconoiseHE41DF;
16673 
16674  //========================================================================================== 4
16675  //======================================================================
16676  //======================================================================1D plot: R vs phi , different eta, depth=1
16677  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
16678  c3x5->Clear();
16680  c3x5->Divide(3, 5);
16681  c3x5->cd(1);
16682  int kcountHEpositivedirectionReconoise1 = 1;
16683  TH1F *h2CeffHEpositivedirectionReconoise1 = new TH1F("h2CeffHEpositivedirectionReconoise1", "", nphi, 0., 72.);
16684  for (int jeta = 0; jeta < njeta; jeta++) {
16685  // positivedirectionReconoise:
16686  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16687  // for (int i=0;i<ndepth;i++) {
16688  // depth=1
16689  for (int i = 0; i < 1; i++) {
16690  TH1F *HEpositivedirectionReconoise1 = (TH1F *)h2CeffHEpositivedirectionReconoise1->Clone("twod1");
16691  float ccctest = 0; // to avoid empty massive elements
16692  for (int jphi = 0; jphi < nphi; jphi++) {
16693  double ccc1 = areconoisehe[i][jeta][jphi];
16694  if (ccc1 != 0.) {
16695  HEpositivedirectionReconoise1->Fill(jphi, ccc1);
16696  ccctest = 1.; //HEpositivedirectionReconoise1->SetBinError(i,0.01);
16697  }
16698  } // for jphi
16699  if (ccctest > 0.) {
16700  // cout<<"444 kcountHEpositivedirectionReconoise1 = "<<kcountHEpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
16701  c3x5->cd(kcountHEpositivedirectionReconoise1);
16702  HEpositivedirectionReconoise1->SetMarkerStyle(20);
16703  HEpositivedirectionReconoise1->SetMarkerSize(0.4);
16704  HEpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
16705  HEpositivedirectionReconoise1->SetXTitle("HEpositivedirectionReconoise1 \b");
16706  HEpositivedirectionReconoise1->SetMarkerColor(2);
16707  HEpositivedirectionReconoise1->SetLineColor(0);
16708  gPad->SetGridy();
16709  gPad->SetGridx();
16710  // gPad->SetLogy();
16711  if (kcountHEpositivedirectionReconoise1 == 1)
16712  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
16713  if (kcountHEpositivedirectionReconoise1 == 2)
16714  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
16715  if (kcountHEpositivedirectionReconoise1 == 3)
16716  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
16717  if (kcountHEpositivedirectionReconoise1 == 4)
16718  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
16719  if (kcountHEpositivedirectionReconoise1 == 5)
16720  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
16721  if (kcountHEpositivedirectionReconoise1 == 6)
16722  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
16723  if (kcountHEpositivedirectionReconoise1 == 7)
16724  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
16725  if (kcountHEpositivedirectionReconoise1 == 8)
16726  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
16727  if (kcountHEpositivedirectionReconoise1 == 9)
16728  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
16729  if (kcountHEpositivedirectionReconoise1 == 10)
16730  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
16731  if (kcountHEpositivedirectionReconoise1 == 11)
16732  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
16733  if (kcountHEpositivedirectionReconoise1 == 12)
16734  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
16735  HEpositivedirectionReconoise1->Draw("Error");
16736  kcountHEpositivedirectionReconoise1++;
16737  if (kcountHEpositivedirectionReconoise1 > 12)
16738  break; // 4x6 = 24
16739  } //ccctest>0
16740 
16741  } // for i
16742  } //if(jeta-41 >= 15 && jeta-41 <= 28
16743  } //for jeta
16745  c3x5->Update();
16746  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
16747  c3x5->Clear();
16748  // clean-up
16749  if (h2CeffHEpositivedirectionReconoise1)
16750  delete h2CeffHEpositivedirectionReconoise1;
16751 
16752  //========================================================================================== 5
16753  //======================================================================
16754  //======================================================================1D plot: R vs phi , different eta, depth=2
16755  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
16756  c3x5->Clear();
16758  c3x5->Divide(3, 5);
16759  c3x5->cd(1);
16760  int kcountHEpositivedirectionReconoise2 = 1;
16761  TH1F *h2CeffHEpositivedirectionReconoise2 = new TH1F("h2CeffHEpositivedirectionReconoise2", "", nphi, 0., 72.);
16762  for (int jeta = 0; jeta < njeta; jeta++) {
16763  // positivedirectionReconoise:
16764  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16765  // for (int i=0;i<ndepth;i++) {
16766  // depth=2
16767  for (int i = 1; i < 2; i++) {
16768  TH1F *HEpositivedirectionReconoise2 = (TH1F *)h2CeffHEpositivedirectionReconoise2->Clone("twod1");
16769  float ccctest = 0; // to avoid empty massive elements
16770  for (int jphi = 0; jphi < nphi; jphi++) {
16771  double ccc1 = areconoisehe[i][jeta][jphi];
16772  if (ccc1 != 0.) {
16773  HEpositivedirectionReconoise2->Fill(jphi, ccc1);
16774  ccctest = 1.; //HEpositivedirectionReconoise2->SetBinError(i,0.01);
16775  }
16776  } // for jphi
16777  if (ccctest > 0.) {
16778  //cout<<"555 kcountHEpositivedirectionReconoise2 = "<<kcountHEpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
16779  c3x5->cd(kcountHEpositivedirectionReconoise2);
16780  HEpositivedirectionReconoise2->SetMarkerStyle(20);
16781  HEpositivedirectionReconoise2->SetMarkerSize(0.4);
16782  HEpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
16783  HEpositivedirectionReconoise2->SetXTitle("HEpositivedirectionReconoise2 \b");
16784  HEpositivedirectionReconoise2->SetMarkerColor(2);
16785  HEpositivedirectionReconoise2->SetLineColor(0);
16786  gPad->SetGridy();
16787  gPad->SetGridx();
16788  // gPad->SetLogy();
16789  if (kcountHEpositivedirectionReconoise2 == 1)
16790  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
16791  if (kcountHEpositivedirectionReconoise2 == 2)
16792  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
16793  if (kcountHEpositivedirectionReconoise2 == 3)
16794  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
16795  if (kcountHEpositivedirectionReconoise2 == 4)
16796  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
16797  if (kcountHEpositivedirectionReconoise2 == 5)
16798  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
16799  if (kcountHEpositivedirectionReconoise2 == 6)
16800  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
16801  if (kcountHEpositivedirectionReconoise2 == 7)
16802  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
16803  if (kcountHEpositivedirectionReconoise2 == 8)
16804  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
16805  if (kcountHEpositivedirectionReconoise2 == 9)
16806  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
16807  if (kcountHEpositivedirectionReconoise2 == 10)
16808  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
16809  if (kcountHEpositivedirectionReconoise2 == 11)
16810  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
16811  if (kcountHEpositivedirectionReconoise2 == 12)
16812  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
16813  if (kcountHEpositivedirectionReconoise2 == 13)
16814  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
16815  HEpositivedirectionReconoise2->Draw("Error");
16816  kcountHEpositivedirectionReconoise2++;
16817  if (kcountHEpositivedirectionReconoise2 > 13)
16818  break; // 4x6 = 24
16819  } //ccctest>0
16820 
16821  } // for i
16822  } //if(jeta-41
16823  } //for jeta
16825  c3x5->Update();
16826  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
16827  c3x5->Clear();
16828  // clean-up
16829  if (h2CeffHEpositivedirectionReconoise2)
16830  delete h2CeffHEpositivedirectionReconoise2;
16831  //========================================================================================== 6
16832  //======================================================================
16833  //======================================================================1D plot: R vs phi , different eta, depth=3
16834  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
16835  c3x5->Clear();
16837  c3x5->Divide(3, 5);
16838  c3x5->cd(1);
16839  int kcountHEpositivedirectionReconoise3 = 1;
16840  TH1F *h2CeffHEpositivedirectionReconoise3 = new TH1F("h2CeffHEpositivedirectionReconoise3", "", nphi, 0., 72.);
16841  for (int jeta = 0; jeta < njeta; jeta++) {
16842  // positivedirectionReconoise:
16843  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16844  // for (int i=0;i<ndepth;i++) {
16845  // depth=3
16846  for (int i = 2; i < 3; i++) {
16847  TH1F *HEpositivedirectionReconoise3 = (TH1F *)h2CeffHEpositivedirectionReconoise3->Clone("twod1");
16848  float ccctest = 0; // to avoid empty massive elements
16849  for (int jphi = 0; jphi < nphi; jphi++) {
16850  double ccc1 = areconoisehe[i][jeta][jphi];
16851  if (ccc1 != 0.) {
16852  HEpositivedirectionReconoise3->Fill(jphi, ccc1);
16853  ccctest = 1.; //HEpositivedirectionReconoise3->SetBinError(i,0.01);
16854  }
16855  } // for jphi
16856  if (ccctest > 0.) {
16857  //cout<<"666 kcountHEpositivedirectionReconoise3 = "<<kcountHEpositivedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
16858  c3x5->cd(kcountHEpositivedirectionReconoise3);
16859  HEpositivedirectionReconoise3->SetMarkerStyle(20);
16860  HEpositivedirectionReconoise3->SetMarkerSize(0.4);
16861  HEpositivedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
16862  HEpositivedirectionReconoise3->SetXTitle("HEpositivedirectionReconoise3 \b");
16863  HEpositivedirectionReconoise3->SetMarkerColor(2);
16864  HEpositivedirectionReconoise3->SetLineColor(0);
16865  gPad->SetGridy();
16866  gPad->SetGridx();
16867  // gPad->SetLogy();
16868  if (kcountHEpositivedirectionReconoise3 == 1)
16869  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
16870  if (kcountHEpositivedirectionReconoise3 == 2)
16871  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
16872  if (kcountHEpositivedirectionReconoise3 == 3)
16873  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
16874  if (kcountHEpositivedirectionReconoise3 == 4)
16875  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
16876  if (kcountHEpositivedirectionReconoise3 == 5)
16877  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
16878  if (kcountHEpositivedirectionReconoise3 == 6)
16879  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
16880  if (kcountHEpositivedirectionReconoise3 == 7)
16881  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
16882  if (kcountHEpositivedirectionReconoise3 == 8)
16883  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
16884  if (kcountHEpositivedirectionReconoise3 == 9)
16885  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
16886  if (kcountHEpositivedirectionReconoise3 == 10)
16887  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
16888  if (kcountHEpositivedirectionReconoise3 == 11)
16889  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
16890  if (kcountHEpositivedirectionReconoise3 == 12)
16891  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
16892  if (kcountHEpositivedirectionReconoise3 == 13)
16893  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
16894  HEpositivedirectionReconoise3->Draw("Error");
16895  kcountHEpositivedirectionReconoise3++;
16896  if (kcountHEpositivedirectionReconoise3 > 13)
16897  break; // 4x6 = 24
16898  } //ccctest>0
16899 
16900  } // for i
16901  } //if(jeta-41 >=
16902  } //for jeta
16904  c3x5->Update();
16905  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
16906  c3x5->Clear();
16907  // clean-up
16908  if (h2CeffHEpositivedirectionReconoise3)
16909  delete h2CeffHEpositivedirectionReconoise3;
16910  //========================================================================================== 7
16911  //======================================================================
16912  //======================================================================1D plot: R vs phi , different eta, depth=4
16913  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
16914  c3x5->Clear();
16916  c3x5->Divide(3, 5);
16917  c3x5->cd(1);
16918  int kcountHEpositivedirectionReconoise4 = 1;
16919  TH1F *h2CeffHEpositivedirectionReconoise4 = new TH1F("h2CeffHEpositivedirectionReconoise4", "", nphi, 0., 72.);
16920 
16921  for (int jeta = 0; jeta < njeta; jeta++) {
16922  // positivedirectionReconoise:
16923  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16924  // for (int i=0;i<ndepth;i++) {
16925  // depth=4
16926  for (int i = 3; i < 4; i++) {
16927  TH1F *HEpositivedirectionReconoise4 = (TH1F *)h2CeffHEpositivedirectionReconoise4->Clone("twod1");
16928 
16929  float ccctest = 0; // to avoid empty massive elements
16930  for (int jphi = 0; jphi < nphi; jphi++) {
16931  double ccc1 = areconoisehe[i][jeta][jphi];
16932  if (ccc1 != 0.) {
16933  HEpositivedirectionReconoise4->Fill(jphi, ccc1);
16934  ccctest = 1.; //HEpositivedirectionReconoise4->SetBinError(i,0.01);
16935  }
16936  } // for jphi
16937  if (ccctest > 0.) {
16938  //cout<<"777 kcountHEpositivedirectionReconoise4 = "<<kcountHEpositivedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
16939  c3x5->cd(kcountHEpositivedirectionReconoise4);
16940  HEpositivedirectionReconoise4->SetMarkerStyle(20);
16941  HEpositivedirectionReconoise4->SetMarkerSize(0.4);
16942  HEpositivedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
16943  HEpositivedirectionReconoise4->SetXTitle("HEpositivedirectionReconoise4 \b");
16944  HEpositivedirectionReconoise4->SetMarkerColor(2);
16945  HEpositivedirectionReconoise4->SetLineColor(0);
16946  gPad->SetGridy();
16947  gPad->SetGridx();
16948  // gPad->SetLogy();
16949  if (kcountHEpositivedirectionReconoise4 == 1)
16950  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
16951  if (kcountHEpositivedirectionReconoise4 == 2)
16952  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
16953  if (kcountHEpositivedirectionReconoise4 == 3)
16954  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
16955  if (kcountHEpositivedirectionReconoise4 == 4)
16956  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
16957  if (kcountHEpositivedirectionReconoise4 == 5)
16958  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
16959  if (kcountHEpositivedirectionReconoise4 == 6)
16960  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
16961  if (kcountHEpositivedirectionReconoise4 == 7)
16962  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
16963  if (kcountHEpositivedirectionReconoise4 == 8)
16964  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
16965  if (kcountHEpositivedirectionReconoise4 == 9)
16966  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
16967  if (kcountHEpositivedirectionReconoise4 == 10)
16968  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
16969  if (kcountHEpositivedirectionReconoise4 == 11)
16970  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
16971  if (kcountHEpositivedirectionReconoise4 == 12)
16972  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
16973  HEpositivedirectionReconoise4->Draw("Error");
16974  kcountHEpositivedirectionReconoise4++;
16975  if (kcountHEpositivedirectionReconoise4 > 12)
16976  break; // 4x6 = 24
16977  } //ccctest>0
16978 
16979  } // for i
16980  } //if(jeta-41 >= -29 && jeta-41 <= -16)
16981  } //for jeta
16983  c3x5->Update();
16984  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
16985  c3x5->Clear();
16986  // clean-up
16987  if (h2CeffHEpositivedirectionReconoise4)
16988  delete h2CeffHEpositivedirectionReconoise4;
16989  //========================================================================================== 8
16990  //======================================================================
16991  //======================================================================1D plot: R vs phi , different eta, depth=5
16992  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
16993  c3x5->Clear();
16995  c3x5->Divide(3, 5);
16996  c3x5->cd(1);
16997  int kcountHEpositivedirectionReconoise5 = 1;
16998  TH1F *h2CeffHEpositivedirectionReconoise5 = new TH1F("h2CeffHEpositivedirectionReconoise5", "", nphi, 0., 72.);
16999 
17000  for (int jeta = 0; jeta < njeta; jeta++) {
17001  // positivedirectionReconoise:
17002  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17003  // for (int i=0;i<ndepth;i++) {
17004  // depth=5
17005  for (int i = 4; i < 5; i++) {
17006  TH1F *HEpositivedirectionReconoise5 = (TH1F *)h2CeffHEpositivedirectionReconoise5->Clone("twod1");
17007 
17008  float ccctest = 0; // to avoid empty massive elements
17009  for (int jphi = 0; jphi < nphi; jphi++) {
17010  // cout<<"888 initial kcountHEpositivedirectionReconoise5 = "<<kcountHEpositivedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" areconoisehe[i][jeta][jphi]= "<< areconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
17011 
17012  double ccc1 = areconoisehe[i][jeta][jphi];
17013  if (ccc1 != 0.) {
17014  HEpositivedirectionReconoise5->Fill(jphi, ccc1);
17015  ccctest = 1.; //HEpositivedirectionReconoise5->SetBinError(i,0.01);
17016  }
17017  } // for jphi
17018  if (ccctest > 0.) {
17019  //cout<<"888 kcountHEpositivedirectionReconoise5 = "<<kcountHEpositivedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<endl;
17020  c3x5->cd(kcountHEpositivedirectionReconoise5);
17021  HEpositivedirectionReconoise5->SetMarkerStyle(20);
17022  HEpositivedirectionReconoise5->SetMarkerSize(0.4);
17023  HEpositivedirectionReconoise5->GetYaxis()->SetLabelSize(0.04);
17024  HEpositivedirectionReconoise5->SetXTitle("HEpositivedirectionReconoise5 \b");
17025  HEpositivedirectionReconoise5->SetMarkerColor(2);
17026  HEpositivedirectionReconoise5->SetLineColor(0);
17027  gPad->SetGridy();
17028  gPad->SetGridx();
17029  // gPad->SetLogy();
17030  if (kcountHEpositivedirectionReconoise5 == 1)
17031  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
17032  if (kcountHEpositivedirectionReconoise5 == 2)
17033  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
17034  if (kcountHEpositivedirectionReconoise5 == 3)
17035  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
17036  if (kcountHEpositivedirectionReconoise5 == 4)
17037  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
17038  if (kcountHEpositivedirectionReconoise5 == 5)
17039  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
17040  if (kcountHEpositivedirectionReconoise5 == 6)
17041  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
17042  if (kcountHEpositivedirectionReconoise5 == 7)
17043  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
17044  if (kcountHEpositivedirectionReconoise5 == 8)
17045  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
17046  if (kcountHEpositivedirectionReconoise5 == 9)
17047  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
17048  if (kcountHEpositivedirectionReconoise5 == 10)
17049  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
17050  if (kcountHEpositivedirectionReconoise5 == 11)
17051  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
17052  HEpositivedirectionReconoise5->Draw("Error");
17053  kcountHEpositivedirectionReconoise5++;
17054  if (kcountHEpositivedirectionReconoise5 > 11)
17055  break; // 4x6 = 24
17056  } //ccctest>0
17057 
17058  } // for i
17059  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17060  } //for jeta
17062  c3x5->Update();
17063  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
17064  c3x5->Clear();
17065  // clean-up
17066  if (h2CeffHEpositivedirectionReconoise5)
17067  delete h2CeffHEpositivedirectionReconoise5;
17068  //========================================================================================== 9
17069  //======================================================================
17070  //======================================================================1D plot: R vs phi , different eta, depth=6
17071  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
17072  c3x5->Clear();
17074  c3x5->Divide(3, 5);
17075  c3x5->cd(1);
17076  int kcountHEpositivedirectionReconoise6 = 1;
17077  TH1F *h2CeffHEpositivedirectionReconoise6 = new TH1F("h2CeffHEpositivedirectionReconoise6", "", nphi, 0., 72.);
17078 
17079  for (int jeta = 0; jeta < njeta; jeta++) {
17080  // positivedirectionReconoise:
17081  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17082  // for (int i=0;i<ndepth;i++) {
17083  // depth=6
17084  for (int i = 5; i < 6; i++) {
17085  TH1F *HEpositivedirectionReconoise6 = (TH1F *)h2CeffHEpositivedirectionReconoise6->Clone("twod1");
17086 
17087  float ccctest = 0; // to avoid empty massive elements
17088  for (int jphi = 0; jphi < nphi; jphi++) {
17089  double ccc1 = areconoisehe[i][jeta][jphi];
17090  if (ccc1 != 0.) {
17091  HEpositivedirectionReconoise6->Fill(jphi, ccc1);
17092  ccctest = 1.; //HEpositivedirectionReconoise6->SetBinError(i,0.01);
17093  }
17094  } // for jphi
17095  if (ccctest > 0.) {
17096  //cout<<"999 kcountHEpositivedirectionReconoise6 = "<<kcountHEpositivedirectionReconoise6 <<" jeta-41= "<< jeta-41 <<endl;
17097  c3x5->cd(kcountHEpositivedirectionReconoise6);
17098  HEpositivedirectionReconoise6->SetMarkerStyle(20);
17099  HEpositivedirectionReconoise6->SetMarkerSize(0.4);
17100  HEpositivedirectionReconoise6->GetYaxis()->SetLabelSize(0.04);
17101  HEpositivedirectionReconoise6->SetXTitle("HEpositivedirectionReconoise6 \b");
17102  HEpositivedirectionReconoise6->SetMarkerColor(2);
17103  HEpositivedirectionReconoise6->SetLineColor(0);
17104  gPad->SetGridy();
17105  gPad->SetGridx();
17106  // gPad->SetLogy();
17107  if (kcountHEpositivedirectionReconoise6 == 1)
17108  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
17109  if (kcountHEpositivedirectionReconoise6 == 2)
17110  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
17111  if (kcountHEpositivedirectionReconoise6 == 3)
17112  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
17113  if (kcountHEpositivedirectionReconoise6 == 4)
17114  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
17115  if (kcountHEpositivedirectionReconoise6 == 5)
17116  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
17117  if (kcountHEpositivedirectionReconoise6 == 6)
17118  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
17119  if (kcountHEpositivedirectionReconoise6 == 7)
17120  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
17121  if (kcountHEpositivedirectionReconoise6 == 8)
17122  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
17123  if (kcountHEpositivedirectionReconoise6 == 9)
17124  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
17125  if (kcountHEpositivedirectionReconoise6 == 10)
17126  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
17127  HEpositivedirectionReconoise6->Draw("Error");
17128  kcountHEpositivedirectionReconoise6++;
17129  if (kcountHEpositivedirectionReconoise6 > 10)
17130  break; // 4x6 = 24
17131  } //ccctest>0
17132 
17133  } // for i
17134  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17135  } //for jeta
17137  c3x5->Update();
17138  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
17139  c3x5->Clear();
17140  // clean-up
17141  if (h2CeffHEpositivedirectionReconoise6)
17142  delete h2CeffHEpositivedirectionReconoise6;
17143  //========================================================================================== 10
17144  //======================================================================
17145  //======================================================================1D plot: R vs phi , different eta, depth=7
17146  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
17147  c3x5->Clear();
17149  c3x5->Divide(3, 5);
17150  c3x5->cd(1);
17151  int kcountHEpositivedirectionReconoise7 = 1;
17152  TH1F *h2CeffHEpositivedirectionReconoise7 = new TH1F("h2CeffHEpositivedirectionReconoise7", "", nphi, 0., 72.);
17153 
17154  for (int jeta = 0; jeta < njeta; jeta++) {
17155  // positivedirectionReconoise:
17156  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17157  // for (int i=0;i<ndepth;i++) {
17158  // depth=7
17159  for (int i = 6; i < 7; i++) {
17160  TH1F *HEpositivedirectionReconoise7 = (TH1F *)h2CeffHEpositivedirectionReconoise7->Clone("twod1");
17161 
17162  float ccctest = 0; // to avoid empty massive elements
17163  for (int jphi = 0; jphi < nphi; jphi++) {
17164  double ccc1 = areconoisehe[i][jeta][jphi];
17165  if (ccc1 != 0.) {
17166  HEpositivedirectionReconoise7->Fill(jphi, ccc1);
17167  ccctest = 1.; //HEpositivedirectionReconoise7->SetBinError(i,0.01);
17168  }
17169  } // for jphi
17170  if (ccctest > 0.) {
17171  //cout<<"1010 kcountHEpositivedirectionReconoise7 = "<<kcountHEpositivedirectionReconoise7 <<" jeta-41= "<< jeta-41 <<endl;
17172  c3x5->cd(kcountHEpositivedirectionReconoise7);
17173  HEpositivedirectionReconoise7->SetMarkerStyle(20);
17174  HEpositivedirectionReconoise7->SetMarkerSize(0.4);
17175  HEpositivedirectionReconoise7->GetYaxis()->SetLabelSize(0.04);
17176  HEpositivedirectionReconoise7->SetXTitle("HEpositivedirectionReconoise7 \b");
17177  HEpositivedirectionReconoise7->SetMarkerColor(2);
17178  HEpositivedirectionReconoise7->SetLineColor(0);
17179  gPad->SetGridy();
17180  gPad->SetGridx();
17181  // gPad->SetLogy();
17182  if (kcountHEpositivedirectionReconoise7 == 1)
17183  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
17184  if (kcountHEpositivedirectionReconoise7 == 2)
17185  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
17186  if (kcountHEpositivedirectionReconoise7 == 3)
17187  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
17188  HEpositivedirectionReconoise7->Draw("Error");
17189  kcountHEpositivedirectionReconoise7++;
17190  if (kcountHEpositivedirectionReconoise7 > 3)
17191  break; //
17192  } //ccctest>0
17193 
17194  } // for i
17195  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17196  } //for jeta
17198  c3x5->Update();
17199  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
17200  c3x5->Clear();
17201  // clean-up
17202  if (h2CeffHEpositivedirectionReconoise7)
17203  delete h2CeffHEpositivedirectionReconoise7;
17204 
17206  //========================================================================================== 1114
17207  //======================================================================
17208  //======================================================================1D plot: R vs phi , different eta, depth=1
17209  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
17210  c3x5->Clear();
17212  c3x5->Divide(3, 5);
17213  c3x5->cd(1);
17214  int kcountHEnegativedirectionReconoise1 = 1;
17215  TH1F *h2CeffHEnegativedirectionReconoise1 = new TH1F("h2CeffHEnegativedirectionReconoise1", "", nphi, 0., 72.);
17216  for (int jeta = 0; jeta < njeta; jeta++) {
17217  // negativedirectionReconoise:
17218  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17219  // for (int i=0;i<ndepth;i++) {
17220  // depth=1
17221  for (int i = 0; i < 1; i++) {
17222  TH1F *HEnegativedirectionReconoise1 = (TH1F *)h2CeffHEnegativedirectionReconoise1->Clone("twod1");
17223  float ccctest = 0; // to avoid empty massive elements
17224  for (int jphi = 0; jphi < nphi; jphi++) {
17225  double ccc1 = areconoisehe[i][jeta][jphi];
17226  if (ccc1 != 0.) {
17227  HEnegativedirectionReconoise1->Fill(jphi, ccc1);
17228  ccctest = 1.; //HEnegativedirectionReconoise1->SetBinError(i,0.01);
17229  }
17230  } // for jphi
17231  if (ccctest > 0.) {
17232  // cout<<"444 kcountHEnegativedirectionReconoise1 = "<<kcountHEnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
17233  c3x5->cd(kcountHEnegativedirectionReconoise1);
17234  HEnegativedirectionReconoise1->SetMarkerStyle(20);
17235  HEnegativedirectionReconoise1->SetMarkerSize(0.4);
17236  HEnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
17237  HEnegativedirectionReconoise1->SetXTitle("HEnegativedirectionReconoise1 \b");
17238  HEnegativedirectionReconoise1->SetMarkerColor(2);
17239  HEnegativedirectionReconoise1->SetLineColor(0);
17240  gPad->SetGridy();
17241  gPad->SetGridx();
17242  // gPad->SetLogy();
17243  if (kcountHEnegativedirectionReconoise1 == 1)
17244  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
17245  if (kcountHEnegativedirectionReconoise1 == 2)
17246  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
17247  if (kcountHEnegativedirectionReconoise1 == 3)
17248  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
17249  if (kcountHEnegativedirectionReconoise1 == 4)
17250  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
17251  if (kcountHEnegativedirectionReconoise1 == 5)
17252  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
17253  if (kcountHEnegativedirectionReconoise1 == 6)
17254  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
17255  if (kcountHEnegativedirectionReconoise1 == 7)
17256  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
17257  if (kcountHEnegativedirectionReconoise1 == 8)
17258  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
17259  if (kcountHEnegativedirectionReconoise1 == 9)
17260  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
17261  if (kcountHEnegativedirectionReconoise1 == 10)
17262  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
17263  if (kcountHEnegativedirectionReconoise1 == 11)
17264  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
17265  if (kcountHEnegativedirectionReconoise1 == 12)
17266  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
17267  HEnegativedirectionReconoise1->Draw("Error");
17268  kcountHEnegativedirectionReconoise1++;
17269  if (kcountHEnegativedirectionReconoise1 > 12)
17270  break; // 4x6 = 24
17271  } //ccctest>0
17272 
17273  } // for i
17274  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17275  } //for jeta
17277  c3x5->Update();
17278  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
17279  c3x5->Clear();
17280  // clean-up
17281  if (h2CeffHEnegativedirectionReconoise1)
17282  delete h2CeffHEnegativedirectionReconoise1;
17283 
17284  //========================================================================================== 1115
17285  //======================================================================
17286  //======================================================================1D plot: R vs phi , different eta, depth=2
17287  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
17288  c3x5->Clear();
17290  c3x5->Divide(3, 5);
17291  c3x5->cd(1);
17292  int kcountHEnegativedirectionReconoise2 = 1;
17293  TH1F *h2CeffHEnegativedirectionReconoise2 = new TH1F("h2CeffHEnegativedirectionReconoise2", "", nphi, 0., 72.);
17294  for (int jeta = 0; jeta < njeta; jeta++) {
17295  // negativedirectionReconoise:
17296  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17297  // for (int i=0;i<ndepth;i++) {
17298  // depth=2
17299  for (int i = 1; i < 2; i++) {
17300  TH1F *HEnegativedirectionReconoise2 = (TH1F *)h2CeffHEnegativedirectionReconoise2->Clone("twod1");
17301  float ccctest = 0; // to avoid empty massive elements
17302  for (int jphi = 0; jphi < nphi; jphi++) {
17303  double ccc1 = areconoisehe[i][jeta][jphi];
17304  if (ccc1 != 0.) {
17305  HEnegativedirectionReconoise2->Fill(jphi, ccc1);
17306  ccctest = 1.; //HEnegativedirectionReconoise2->SetBinError(i,0.01);
17307  }
17308  } // for jphi
17309  if (ccctest > 0.) {
17310  //cout<<"555 kcountHEnegativedirectionReconoise2 = "<<kcountHEnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
17311  c3x5->cd(kcountHEnegativedirectionReconoise2);
17312  HEnegativedirectionReconoise2->SetMarkerStyle(20);
17313  HEnegativedirectionReconoise2->SetMarkerSize(0.4);
17314  HEnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
17315  HEnegativedirectionReconoise2->SetXTitle("HEnegativedirectionReconoise2 \b");
17316  HEnegativedirectionReconoise2->SetMarkerColor(2);
17317  HEnegativedirectionReconoise2->SetLineColor(0);
17318  gPad->SetGridy();
17319  gPad->SetGridx();
17320  // gPad->SetLogy();
17321  if (kcountHEnegativedirectionReconoise2 == 1)
17322  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
17323  if (kcountHEnegativedirectionReconoise2 == 2)
17324  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
17325  if (kcountHEnegativedirectionReconoise2 == 3)
17326  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
17327  if (kcountHEnegativedirectionReconoise2 == 4)
17328  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
17329  if (kcountHEnegativedirectionReconoise2 == 5)
17330  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
17331  if (kcountHEnegativedirectionReconoise2 == 6)
17332  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
17333  if (kcountHEnegativedirectionReconoise2 == 7)
17334  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
17335  if (kcountHEnegativedirectionReconoise2 == 8)
17336  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
17337  if (kcountHEnegativedirectionReconoise2 == 9)
17338  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
17339  if (kcountHEnegativedirectionReconoise2 == 10)
17340  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
17341  if (kcountHEnegativedirectionReconoise2 == 11)
17342  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
17343  if (kcountHEnegativedirectionReconoise2 == 12)
17344  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
17345  if (kcountHEnegativedirectionReconoise2 == 13)
17346  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
17347  HEnegativedirectionReconoise2->Draw("Error");
17348  kcountHEnegativedirectionReconoise2++;
17349  if (kcountHEnegativedirectionReconoise2 > 13)
17350  break; // 4x6 = 24
17351  } //ccctest>0
17352 
17353  } // for i
17354  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17355  } //for jeta
17357  c3x5->Update();
17358  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
17359  c3x5->Clear();
17360  // clean-up
17361  if (h2CeffHEnegativedirectionReconoise2)
17362  delete h2CeffHEnegativedirectionReconoise2;
17363  //========================================================================================== 1116
17364  //======================================================================
17365  //======================================================================1D plot: R vs phi , different eta, depth=3
17366  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
17367  c3x5->Clear();
17369  c3x5->Divide(3, 5);
17370  c3x5->cd(1);
17371  int kcountHEnegativedirectionReconoise3 = 1;
17372  TH1F *h2CeffHEnegativedirectionReconoise3 = new TH1F("h2CeffHEnegativedirectionReconoise3", "", nphi, 0., 72.);
17373  for (int jeta = 0; jeta < njeta; jeta++) {
17374  // negativedirectionReconoise:
17375  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17376  // for (int i=0;i<ndepth;i++) {
17377  // depth=3
17378  for (int i = 2; i < 3; i++) {
17379  TH1F *HEnegativedirectionReconoise3 = (TH1F *)h2CeffHEnegativedirectionReconoise3->Clone("twod1");
17380  float ccctest = 0; // to avoid empty massive elements
17381  for (int jphi = 0; jphi < nphi; jphi++) {
17382  double ccc1 = areconoisehe[i][jeta][jphi];
17383  if (ccc1 != 0.) {
17384  HEnegativedirectionReconoise3->Fill(jphi, ccc1);
17385  ccctest = 1.; //HEnegativedirectionReconoise3->SetBinError(i,0.01);
17386  }
17387  } // for jphi
17388  if (ccctest > 0.) {
17389  //cout<<"666 kcountHEnegativedirectionReconoise3 = "<<kcountHEnegativedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
17390  c3x5->cd(kcountHEnegativedirectionReconoise3);
17391  HEnegativedirectionReconoise3->SetMarkerStyle(20);
17392  HEnegativedirectionReconoise3->SetMarkerSize(0.4);
17393  HEnegativedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
17394  HEnegativedirectionReconoise3->SetXTitle("HEnegativedirectionReconoise3 \b");
17395  HEnegativedirectionReconoise3->SetMarkerColor(2);
17396  HEnegativedirectionReconoise3->SetLineColor(0);
17397  gPad->SetGridy();
17398  gPad->SetGridx();
17399  // gPad->SetLogy();
17400  if (kcountHEnegativedirectionReconoise3 == 1)
17401  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
17402  if (kcountHEnegativedirectionReconoise3 == 2)
17403  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
17404  if (kcountHEnegativedirectionReconoise3 == 3)
17405  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
17406  if (kcountHEnegativedirectionReconoise3 == 4)
17407  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
17408  if (kcountHEnegativedirectionReconoise3 == 5)
17409  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
17410  if (kcountHEnegativedirectionReconoise3 == 6)
17411  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
17412  if (kcountHEnegativedirectionReconoise3 == 7)
17413  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
17414  if (kcountHEnegativedirectionReconoise3 == 8)
17415  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
17416  if (kcountHEnegativedirectionReconoise3 == 9)
17417  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
17418  if (kcountHEnegativedirectionReconoise3 == 10)
17419  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
17420  if (kcountHEnegativedirectionReconoise3 == 11)
17421  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
17422  if (kcountHEnegativedirectionReconoise3 == 12)
17423  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
17424  if (kcountHEnegativedirectionReconoise3 == 13)
17425  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
17426  HEnegativedirectionReconoise3->Draw("Error");
17427  kcountHEnegativedirectionReconoise3++;
17428  if (kcountHEnegativedirectionReconoise3 > 13)
17429  break; // 4x6 = 24
17430  } //ccctest>0
17431 
17432  } // for i
17433  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17434  } //for jeta
17436  c3x5->Update();
17437  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
17438  c3x5->Clear();
17439  // clean-up
17440  if (h2CeffHEnegativedirectionReconoise3)
17441  delete h2CeffHEnegativedirectionReconoise3;
17442  //========================================================================================== 1117
17443  //======================================================================
17444  //======================================================================1D plot: R vs phi , different eta, depth=4
17445  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
17446  c3x5->Clear();
17448  c3x5->Divide(3, 5);
17449  c3x5->cd(1);
17450  int kcountHEnegativedirectionReconoise4 = 1;
17451  TH1F *h2CeffHEnegativedirectionReconoise4 = new TH1F("h2CeffHEnegativedirectionReconoise4", "", nphi, 0., 72.);
17452 
17453  for (int jeta = 0; jeta < njeta; jeta++) {
17454  // negativedirectionReconoise:
17455  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17456  // for (int i=0;i<ndepth;i++) {
17457  // depth=4
17458  for (int i = 3; i < 4; i++) {
17459  TH1F *HEnegativedirectionReconoise4 = (TH1F *)h2CeffHEnegativedirectionReconoise4->Clone("twod1");
17460 
17461  float ccctest = 0; // to avoid empty massive elements
17462  for (int jphi = 0; jphi < nphi; jphi++) {
17463  double ccc1 = areconoisehe[i][jeta][jphi];
17464  if (ccc1 != 0.) {
17465  HEnegativedirectionReconoise4->Fill(jphi, ccc1);
17466  ccctest = 1.; //HEnegativedirectionReconoise4->SetBinError(i,0.01);
17467  }
17468  } // for jphi
17469  if (ccctest > 0.) {
17470  //cout<<"777 kcountHEnegativedirectionReconoise4 = "<<kcountHEnegativedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
17471  c3x5->cd(kcountHEnegativedirectionReconoise4);
17472  HEnegativedirectionReconoise4->SetMarkerStyle(20);
17473  HEnegativedirectionReconoise4->SetMarkerSize(0.4);
17474  HEnegativedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
17475  HEnegativedirectionReconoise4->SetXTitle("HEnegativedirectionReconoise4 \b");
17476  HEnegativedirectionReconoise4->SetMarkerColor(2);
17477  HEnegativedirectionReconoise4->SetLineColor(0);
17478  gPad->SetGridy();
17479  gPad->SetGridx();
17480  // gPad->SetLogy();
17481  if (kcountHEnegativedirectionReconoise4 == 1)
17482  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
17483  if (kcountHEnegativedirectionReconoise4 == 2)
17484  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
17485  if (kcountHEnegativedirectionReconoise4 == 3)
17486  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
17487  if (kcountHEnegativedirectionReconoise4 == 4)
17488  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
17489  if (kcountHEnegativedirectionReconoise4 == 5)
17490  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
17491  if (kcountHEnegativedirectionReconoise4 == 6)
17492  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
17493  if (kcountHEnegativedirectionReconoise4 == 7)
17494  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
17495  if (kcountHEnegativedirectionReconoise4 == 8)
17496  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
17497  if (kcountHEnegativedirectionReconoise4 == 9)
17498  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
17499  if (kcountHEnegativedirectionReconoise4 == 10)
17500  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
17501  if (kcountHEnegativedirectionReconoise4 == 11)
17502  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
17503  if (kcountHEnegativedirectionReconoise4 == 12)
17504  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
17505  HEnegativedirectionReconoise4->Draw("Error");
17506  kcountHEnegativedirectionReconoise4++;
17507  if (kcountHEnegativedirectionReconoise4 > 12)
17508  break; // 4x6 = 24
17509  } //ccctest>0
17510 
17511  } // for i
17512  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17513  } //for jeta
17515  c3x5->Update();
17516  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
17517  c3x5->Clear();
17518  // clean-up
17519  if (h2CeffHEnegativedirectionReconoise4)
17520  delete h2CeffHEnegativedirectionReconoise4;
17521  //========================================================================================== 1118
17522  //======================================================================
17523  //======================================================================1D plot: R vs phi , different eta, depth=5
17524  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
17525  c3x5->Clear();
17527  c3x5->Divide(3, 5);
17528  c3x5->cd(1);
17529  int kcountHEnegativedirectionReconoise5 = 1;
17530  TH1F *h2CeffHEnegativedirectionReconoise5 = new TH1F("h2CeffHEnegativedirectionReconoise5", "", nphi, 0., 72.);
17531 
17532  for (int jeta = 0; jeta < njeta; jeta++) {
17533  // negativedirectionReconoise:
17534  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17535  // for (int i=0;i<ndepth;i++) {
17536  // depth=5
17537  for (int i = 4; i < 5; i++) {
17538  TH1F *HEnegativedirectionReconoise5 = (TH1F *)h2CeffHEnegativedirectionReconoise5->Clone("twod1");
17539 
17540  float ccctest = 0; // to avoid empty massive elements
17541  for (int jphi = 0; jphi < nphi; jphi++) {
17542  // cout<<"888 initial kcountHEnegativedirectionReconoise5 = "<<kcountHEnegativedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" areconoisehe[i][jeta][jphi]= "<< areconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
17543 
17544  double ccc1 = areconoisehe[i][jeta][jphi];
17545  if (ccc1 != 0.) {
17546  HEnegativedirectionReconoise5->Fill(jphi, ccc1);
17547  ccctest = 1.; //HEnegativedirectionReconoise5->SetBinError(i,0.01);
17548  }
17549  } // for jphi
17550  if (ccctest > 0.) {
17551  //cout<<"888 kcountHEnegativedirectionReconoise5 = "<<kcountHEnegativedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<endl;
17552  c3x5->cd(kcountHEnegativedirectionReconoise5);
17553  HEnegativedirectionReconoise5->SetMarkerStyle(20);
17554  HEnegativedirectionReconoise5->SetMarkerSize(0.4);
17555  HEnegativedirectionReconoise5->GetYaxis()->SetLabelSize(0.04);
17556  HEnegativedirectionReconoise5->SetXTitle("HEnegativedirectionReconoise5 \b");
17557  HEnegativedirectionReconoise5->SetMarkerColor(2);
17558  HEnegativedirectionReconoise5->SetLineColor(0);
17559  gPad->SetGridy();
17560  gPad->SetGridx();
17561  // gPad->SetLogy();
17562  if (kcountHEnegativedirectionReconoise5 == 1)
17563  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
17564  if (kcountHEnegativedirectionReconoise5 == 2)
17565  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
17566  if (kcountHEnegativedirectionReconoise5 == 3)
17567  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
17568  if (kcountHEnegativedirectionReconoise5 == 4)
17569  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
17570  if (kcountHEnegativedirectionReconoise5 == 5)
17571  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
17572  if (kcountHEnegativedirectionReconoise5 == 6)
17573  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
17574  if (kcountHEnegativedirectionReconoise5 == 7)
17575  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
17576  if (kcountHEnegativedirectionReconoise5 == 8)
17577  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
17578  if (kcountHEnegativedirectionReconoise5 == 9)
17579  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
17580  if (kcountHEnegativedirectionReconoise5 == 10)
17581  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
17582  if (kcountHEnegativedirectionReconoise5 == 11)
17583  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
17584  HEnegativedirectionReconoise5->Draw("Error");
17585  kcountHEnegativedirectionReconoise5++;
17586  if (kcountHEnegativedirectionReconoise5 > 11)
17587  break; // 4x6 = 24
17588  } //ccctest>0
17589 
17590  } // for i
17591  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17592  } //for jeta
17594  c3x5->Update();
17595  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
17596  c3x5->Clear();
17597  // clean-up
17598  if (h2CeffHEnegativedirectionReconoise5)
17599  delete h2CeffHEnegativedirectionReconoise5;
17600  //========================================================================================== 1119
17601  //======================================================================
17602  //======================================================================1D plot: R vs phi , different eta, depth=6
17603  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
17604  c3x5->Clear();
17606  c3x5->Divide(3, 5);
17607  c3x5->cd(1);
17608  int kcountHEnegativedirectionReconoise6 = 1;
17609  TH1F *h2CeffHEnegativedirectionReconoise6 = new TH1F("h2CeffHEnegativedirectionReconoise6", "", nphi, 0., 72.);
17610 
17611  for (int jeta = 0; jeta < njeta; jeta++) {
17612  // negativedirectionReconoise:
17613  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17614  // for (int i=0;i<ndepth;i++) {
17615  // depth=6
17616  for (int i = 5; i < 6; i++) {
17617  TH1F *HEnegativedirectionReconoise6 = (TH1F *)h2CeffHEnegativedirectionReconoise6->Clone("twod1");
17618 
17619  float ccctest = 0; // to avoid empty massive elements
17620  for (int jphi = 0; jphi < nphi; jphi++) {
17621  double ccc1 = areconoisehe[i][jeta][jphi];
17622  if (ccc1 != 0.) {
17623  HEnegativedirectionReconoise6->Fill(jphi, ccc1);
17624  ccctest = 1.; //HEnegativedirectionReconoise6->SetBinError(i,0.01);
17625  }
17626  } // for jphi
17627  if (ccctest > 0.) {
17628  //cout<<"999 kcountHEnegativedirectionReconoise6 = "<<kcountHEnegativedirectionReconoise6 <<" jeta-41= "<< jeta-41 <<endl;
17629  c3x5->cd(kcountHEnegativedirectionReconoise6);
17630  HEnegativedirectionReconoise6->SetMarkerStyle(20);
17631  HEnegativedirectionReconoise6->SetMarkerSize(0.4);
17632  HEnegativedirectionReconoise6->GetYaxis()->SetLabelSize(0.04);
17633  HEnegativedirectionReconoise6->SetXTitle("HEnegativedirectionReconoise6 \b");
17634  HEnegativedirectionReconoise6->SetMarkerColor(2);
17635  HEnegativedirectionReconoise6->SetLineColor(0);
17636  gPad->SetGridy();
17637  gPad->SetGridx();
17638  // gPad->SetLogy();
17639  if (kcountHEnegativedirectionReconoise6 == 1)
17640  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
17641  if (kcountHEnegativedirectionReconoise6 == 2)
17642  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
17643  if (kcountHEnegativedirectionReconoise6 == 3)
17644  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
17645  if (kcountHEnegativedirectionReconoise6 == 4)
17646  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
17647  if (kcountHEnegativedirectionReconoise6 == 5)
17648  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
17649  if (kcountHEnegativedirectionReconoise6 == 6)
17650  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
17651  if (kcountHEnegativedirectionReconoise6 == 7)
17652  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
17653  if (kcountHEnegativedirectionReconoise6 == 8)
17654  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
17655  if (kcountHEnegativedirectionReconoise6 == 9)
17656  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
17657  if (kcountHEnegativedirectionReconoise6 == 10)
17658  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
17659  HEnegativedirectionReconoise6->Draw("Error");
17660  kcountHEnegativedirectionReconoise6++;
17661  if (kcountHEnegativedirectionReconoise6 > 10)
17662  break; // 4x6 = 24
17663  } //ccctest>0
17664 
17665  } // for i
17666  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17667  } //for jeta
17669  c3x5->Update();
17670  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
17671  c3x5->Clear();
17672  // clean-up
17673  if (h2CeffHEnegativedirectionReconoise6)
17674  delete h2CeffHEnegativedirectionReconoise6;
17675  //========================================================================================== 11110
17676  //======================================================================
17677  //======================================================================1D plot: R vs phi , different eta, depth=7
17678  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
17679  c3x5->Clear();
17681  c3x5->Divide(3, 5);
17682  c3x5->cd(1);
17683  int kcountHEnegativedirectionReconoise7 = 1;
17684  TH1F *h2CeffHEnegativedirectionReconoise7 = new TH1F("h2CeffHEnegativedirectionReconoise7", "", nphi, 0., 72.);
17685 
17686  for (int jeta = 0; jeta < njeta; jeta++) {
17687  // negativedirectionReconoise:
17688  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17689  // for (int i=0;i<ndepth;i++) {
17690  // depth=7
17691  for (int i = 6; i < 7; i++) {
17692  TH1F *HEnegativedirectionReconoise7 = (TH1F *)h2CeffHEnegativedirectionReconoise7->Clone("twod1");
17693 
17694  float ccctest = 0; // to avoid empty massive elements
17695  for (int jphi = 0; jphi < nphi; jphi++) {
17696  double ccc1 = areconoisehe[i][jeta][jphi];
17697  if (ccc1 != 0.) {
17698  HEnegativedirectionReconoise7->Fill(jphi, ccc1);
17699  ccctest = 1.; //HEnegativedirectionReconoise7->SetBinError(i,0.01);
17700  }
17701  } // for jphi
17702  if (ccctest > 0.) {
17703  //cout<<"1010 kcountHEnegativedirectionReconoise7 = "<<kcountHEnegativedirectionReconoise7 <<" jeta-41= "<< jeta-41 <<endl;
17704  c3x5->cd(kcountHEnegativedirectionReconoise7);
17705  HEnegativedirectionReconoise7->SetMarkerStyle(20);
17706  HEnegativedirectionReconoise7->SetMarkerSize(0.4);
17707  HEnegativedirectionReconoise7->GetYaxis()->SetLabelSize(0.04);
17708  HEnegativedirectionReconoise7->SetXTitle("HEnegativedirectionReconoise7 \b");
17709  HEnegativedirectionReconoise7->SetMarkerColor(2);
17710  HEnegativedirectionReconoise7->SetLineColor(0);
17711  gPad->SetGridy();
17712  gPad->SetGridx();
17713  // gPad->SetLogy();
17714  if (kcountHEnegativedirectionReconoise7 == 1)
17715  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
17716  if (kcountHEnegativedirectionReconoise7 == 2)
17717  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
17718  if (kcountHEnegativedirectionReconoise7 == 3)
17719  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
17720  HEnegativedirectionReconoise7->Draw("Error");
17721  kcountHEnegativedirectionReconoise7++;
17722  if (kcountHEnegativedirectionReconoise7 > 3)
17723  break; // 4x6 = 24
17724  } //ccctest>0
17725 
17726  } // for i
17727  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17728  } //for jeta
17730  c3x5->Update();
17731  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
17732  c3x5->Clear();
17733  // clean-up
17734  if (h2CeffHEnegativedirectionReconoise7)
17735  delete h2CeffHEnegativedirectionReconoise7;
17736 
17737  //======================================================================================================================
17738  //======================================================================================================================
17740  //======================================================================================================================
17741  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HE
17742  //======================================================================================================================
17743  //======================================================================
17744  c2x1->Clear();
17746  c2x1->Divide(2, 1);
17747  c2x1->cd(1);
17748  TH2F *GefzDIFreconoiseHE42D = new TH2F("GefzDIFreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
17749  TH2F *GefzDIFreconoiseHE42D0 = new TH2F("GefzDIFreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
17750  TH2F *GefzDIFreconoiseHE42DF = (TH2F *)GefzDIFreconoiseHE42D0->Clone("GefzDIFreconoiseHE42DF");
17751  for (int i = 0; i < ndepth; i++) {
17752  for (int jeta = 0; jeta < neta; jeta++) {
17753  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
17754  for (int jphi = 0; jphi < nphi; jphi++) {
17755  double ccc1 = breconoisehe[i][jeta][jphi];
17756  int k2plot = jeta - 41;
17757  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
17758  if (ccc1 != 0.) {
17759  GefzDIFreconoiseHE42D->Fill(kkk, jphi, ccc1);
17760  GefzDIFreconoiseHE42D0->Fill(kkk, jphi, 1.);
17761  }
17762  }
17763  }
17764  }
17765  }
17766  GefzDIFreconoiseHE42DF->Divide(GefzDIFreconoiseHE42D, GefzDIFreconoiseHE42D0, 1, 1, "B"); // average A
17767  gPad->SetGridy();
17768  gPad->SetGridx(); // gPad->SetLogz();
17769  GefzDIFreconoiseHE42DF->SetXTitle("<DIF>_depth #eta \b");
17770  GefzDIFreconoiseHE42DF->SetYTitle(" #phi \b");
17771  GefzDIFreconoiseHE42DF->Draw("COLZ");
17772 
17773  //c2x1->cd(2);
17774  //TH1F *energyhitNoise_HE= (TH1F*)hfile->Get("h_energyhitNoise_HE");
17775  //energyhitNoise_HE ->SetMarkerStyle(20);energyhitNoise_HE ->SetMarkerSize(0.4);energyhitNoise_HE ->GetYaxis()->SetLabelSize(0.04);energyhitNoise_HE ->SetXTitle("energyhitNoise_HE \b");energyhitNoise_HE ->SetMarkerColor(2);energyhitNoise_HE ->SetLineColor(0);gPad->SetGridy();gPad->SetGridx();energyhitNoise_HE ->Draw("Error");
17776 
17778  c2x1->Update();
17779  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHE.png");
17780  c2x1->Clear();
17781  // clean-up
17782  if (GefzDIFreconoiseHE42D)
17783  delete GefzDIFreconoiseHE42D;
17784  if (GefzDIFreconoiseHE42D0)
17785  delete GefzDIFreconoiseHE42D0;
17786  if (GefzDIFreconoiseHE42DF)
17787  delete GefzDIFreconoiseHE42DF;
17788  //====================================================================== 1D plot: DIF vs phi , averaged over depthes & eta
17789  //======================================================================
17790  //cout<<" 1D plot: DIF vs phi , averaged over depthes & eta *****" <<endl;
17791  c1x1->Clear();
17793  c1x1->Divide(1, 1);
17794  c1x1->cd(1);
17795  TH1F *GefzDIFreconoiseHE41D = new TH1F("GefzDIFreconoiseHE41D", "", nphi, 0., 72.);
17796  TH1F *GefzDIFreconoiseHE41D0 = new TH1F("GefzDIFreconoiseHE41D0", "", nphi, 0., 72.);
17797  TH1F *GefzDIFreconoiseHE41DF = (TH1F *)GefzDIFreconoiseHE41D0->Clone("GefzDIFreconoiseHE41DF");
17798  for (int jphi = 0; jphi < nphi; jphi++) {
17799  for (int jeta = 0; jeta < neta; jeta++) {
17800  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
17801  for (int i = 0; i < ndepth; i++) {
17802  double ccc1 = breconoisehe[i][jeta][jphi];
17803  if (ccc1 != 0.) {
17804  GefzDIFreconoiseHE41D->Fill(jphi, ccc1);
17805  GefzDIFreconoiseHE41D0->Fill(jphi, 1.);
17806  }
17807  }
17808  }
17809  }
17810  }
17811  GefzDIFreconoiseHE41DF->Divide(
17812  GefzDIFreconoiseHE41D, GefzDIFreconoiseHE41D0, 1, 1, "B"); // DIF averaged over depthes & eta
17813  GefzDIFreconoiseHE41D0->Sumw2();
17814  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHE41DF->SetBinError(jphi,0.01);}
17815  gPad->SetGridy();
17816  gPad->SetGridx(); // gPad->SetLogz();
17817  GefzDIFreconoiseHE41DF->SetMarkerStyle(20);
17818  GefzDIFreconoiseHE41DF->SetMarkerSize(1.4);
17819  GefzDIFreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
17820  GefzDIFreconoiseHE41DF->SetXTitle("#phi \b");
17821  GefzDIFreconoiseHE41DF->SetYTitle(" <DIF> \b");
17822  GefzDIFreconoiseHE41DF->SetZTitle("<DIF>_PHI - AllDepthes \b");
17823  GefzDIFreconoiseHE41DF->SetMarkerColor(4);
17824  GefzDIFreconoiseHE41DF->SetLineColor(
17825  4); // GefzDIFreconoiseHE41DF->SetMinimum(0.8); // GefzDIFreconoiseHE41DF->SetMaximum(1.000);
17826  GefzDIFreconoiseHE41DF->Draw("Error");
17828  c1x1->Update();
17829  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHE.png");
17830  c1x1->Clear();
17831  // clean-up
17832  if (GefzDIFreconoiseHE41D)
17833  delete GefzDIFreconoiseHE41D;
17834  if (GefzDIFreconoiseHE41D0)
17835  delete GefzDIFreconoiseHE41D0;
17836  if (GefzDIFreconoiseHE41DF)
17837  delete GefzDIFreconoiseHE41DF;
17838 
17839  //========================================================================================== 4
17840  //======================================================================
17841  //======================================================================1D plot: DIF vs phi , different eta, depth=1
17842  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
17843  c3x5->Clear();
17845  c3x5->Divide(3, 5);
17846  c3x5->cd(1);
17847  int kcountHEpositivedirectionReconoiseDIF1 = 1;
17848  TH1F *h2CeffHEpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
17849  for (int jeta = 0; jeta < njeta; jeta++) {
17850  // positivedirectionReconoiseDIF:
17851  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17852  // for (int i=0;i<ndepth;i++) {
17853  // depth=1
17854  for (int i = 0; i < 1; i++) {
17855  TH1F *HEpositivedirectionReconoiseDIF1 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF1->Clone("twod1");
17856  float ccctest = 0; // to avoid empty massive elements
17857  for (int jphi = 0; jphi < nphi; jphi++) {
17858  double ccc1 = breconoisehe[i][jeta][jphi];
17859  if (ccc1 != 0.) {
17860  HEpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
17861  ccctest = 1.; //HEpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
17862  }
17863  } // for jphi
17864  if (ccctest > 0.) {
17865  // cout<<"444 kcountHEpositivedirectionReconoiseDIF1 = "<<kcountHEpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
17866  c3x5->cd(kcountHEpositivedirectionReconoiseDIF1);
17867  HEpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
17868  HEpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
17869  HEpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
17870  HEpositivedirectionReconoiseDIF1->SetXTitle("HEpositivedirectionReconoiseDIF1 \b");
17871  HEpositivedirectionReconoiseDIF1->SetMarkerColor(2);
17872  HEpositivedirectionReconoiseDIF1->SetLineColor(0);
17873  gPad->SetGridy();
17874  gPad->SetGridx();
17875  // gPad->SetLogy();
17876  if (kcountHEpositivedirectionReconoiseDIF1 == 1)
17877  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 17; depth = 1 \b");
17878  if (kcountHEpositivedirectionReconoiseDIF1 == 2)
17879  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 18; depth = 1 \b");
17880  if (kcountHEpositivedirectionReconoiseDIF1 == 3)
17881  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 19; depth = 1 \b");
17882  if (kcountHEpositivedirectionReconoiseDIF1 == 4)
17883  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 20; depth = 1 \b");
17884  if (kcountHEpositivedirectionReconoiseDIF1 == 5)
17885  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 21; depth = 1 \b");
17886  if (kcountHEpositivedirectionReconoiseDIF1 == 6)
17887  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 22; depth = 1 \b");
17888  if (kcountHEpositivedirectionReconoiseDIF1 == 7)
17889  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 23; depth = 1 \b");
17890  if (kcountHEpositivedirectionReconoiseDIF1 == 8)
17891  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 24; depth = 1 \b");
17892  if (kcountHEpositivedirectionReconoiseDIF1 == 9)
17893  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 25; depth = 1 \b");
17894  if (kcountHEpositivedirectionReconoiseDIF1 == 10)
17895  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 26; depth = 1 \b");
17896  if (kcountHEpositivedirectionReconoiseDIF1 == 11)
17897  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 27; depth = 1 \b");
17898  if (kcountHEpositivedirectionReconoiseDIF1 == 12)
17899  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 28; depth = 1 \b");
17900  HEpositivedirectionReconoiseDIF1->Draw("Error");
17901  kcountHEpositivedirectionReconoiseDIF1++;
17902  if (kcountHEpositivedirectionReconoiseDIF1 > 12)
17903  break; // 4x6 = 24
17904  } //ccctest>0
17905 
17906  } // for i
17907  } //if(jeta-41 >= 15 && jeta-41 <= 28
17908  } //for jeta
17910  c3x5->Update();
17911  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
17912  c3x5->Clear();
17913  // clean-up
17914  if (h2CeffHEpositivedirectionReconoiseDIF1)
17915  delete h2CeffHEpositivedirectionReconoiseDIF1;
17916 
17917  //========================================================================================== 5
17918  //======================================================================
17919  //======================================================================1D plot: R vs phi , different eta, depth=2
17920  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
17921  c3x5->Clear();
17923  c3x5->Divide(3, 5);
17924  c3x5->cd(1);
17925  int kcountHEpositivedirectionReconoiseDIF2 = 1;
17926  TH1F *h2CeffHEpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
17927  for (int jeta = 0; jeta < njeta; jeta++) {
17928  // positivedirectionReconoiseDIF:
17929  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17930  // for (int i=0;i<ndepth;i++) {
17931  // depth=2
17932  for (int i = 1; i < 2; i++) {
17933  TH1F *HEpositivedirectionReconoiseDIF2 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF2->Clone("twod1");
17934  float ccctest = 0; // to avoid empty massive elements
17935  for (int jphi = 0; jphi < nphi; jphi++) {
17936  double ccc1 = breconoisehe[i][jeta][jphi];
17937  if (ccc1 != 0.) {
17938  HEpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
17939  ccctest = 1.; //HEpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
17940  }
17941  } // for jphi
17942  if (ccctest > 0.) {
17943  //cout<<"555 kcountHEpositivedirectionReconoiseDIF2 = "<<kcountHEpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
17944  c3x5->cd(kcountHEpositivedirectionReconoiseDIF2);
17945  HEpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
17946  HEpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
17947  HEpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
17948  HEpositivedirectionReconoiseDIF2->SetXTitle("HEpositivedirectionReconoiseDIF2 \b");
17949  HEpositivedirectionReconoiseDIF2->SetMarkerColor(2);
17950  HEpositivedirectionReconoiseDIF2->SetLineColor(0);
17951  gPad->SetGridy();
17952  gPad->SetGridx();
17953  // gPad->SetLogy();
17954  if (kcountHEpositivedirectionReconoiseDIF2 == 1)
17955  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 16; depth = 2 \b");
17956  if (kcountHEpositivedirectionReconoiseDIF2 == 2)
17957  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 17; depth = 2 \b");
17958  if (kcountHEpositivedirectionReconoiseDIF2 == 3)
17959  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 18; depth = 2 \b");
17960  if (kcountHEpositivedirectionReconoiseDIF2 == 4)
17961  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 19; depth = 2 \b");
17962  if (kcountHEpositivedirectionReconoiseDIF2 == 5)
17963  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 20; depth = 2 \b");
17964  if (kcountHEpositivedirectionReconoiseDIF2 == 6)
17965  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 21; depth = 2 \b");
17966  if (kcountHEpositivedirectionReconoiseDIF2 == 7)
17967  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 22; depth = 2 \b");
17968  if (kcountHEpositivedirectionReconoiseDIF2 == 8)
17969  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 23; depth = 2 \b");
17970  if (kcountHEpositivedirectionReconoiseDIF2 == 9)
17971  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 24; depth = 2 \b");
17972  if (kcountHEpositivedirectionReconoiseDIF2 == 10)
17973  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 25; depth = 2 \b");
17974  if (kcountHEpositivedirectionReconoiseDIF2 == 11)
17975  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 26; depth = 2 \b");
17976  if (kcountHEpositivedirectionReconoiseDIF2 == 12)
17977  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 27; depth = 2 \b");
17978  if (kcountHEpositivedirectionReconoiseDIF2 == 13)
17979  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 28; depth = 2 \b");
17980  HEpositivedirectionReconoiseDIF2->Draw("Error");
17981  kcountHEpositivedirectionReconoiseDIF2++;
17982  if (kcountHEpositivedirectionReconoiseDIF2 > 13)
17983  break; // 4x6 = 24
17984  } //ccctest>0
17985 
17986  } // for i
17987  } //if(jeta-41
17988  } //for jeta
17990  c3x5->Update();
17991  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
17992  c3x5->Clear();
17993  // clean-up
17994  if (h2CeffHEpositivedirectionReconoiseDIF2)
17995  delete h2CeffHEpositivedirectionReconoiseDIF2;
17996  //========================================================================================== 6
17997  //======================================================================
17998  //======================================================================1D plot: R vs phi , different eta, depth=3
17999  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
18000  c3x5->Clear();
18002  c3x5->Divide(3, 5);
18003  c3x5->cd(1);
18004  int kcountHEpositivedirectionReconoiseDIF3 = 1;
18005  TH1F *h2CeffHEpositivedirectionReconoiseDIF3 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF3", "", nphi, 0., 72.);
18006  for (int jeta = 0; jeta < njeta; jeta++) {
18007  // positivedirectionReconoiseDIF:
18008  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18009  // for (int i=0;i<ndepth;i++) {
18010  // depth=3
18011  for (int i = 2; i < 3; i++) {
18012  TH1F *HEpositivedirectionReconoiseDIF3 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF3->Clone("twod1");
18013  float ccctest = 0; // to avoid empty massive elements
18014  for (int jphi = 0; jphi < nphi; jphi++) {
18015  double ccc1 = breconoisehe[i][jeta][jphi];
18016  if (ccc1 != 0.) {
18017  HEpositivedirectionReconoiseDIF3->Fill(jphi, ccc1);
18018  ccctest = 1.; //HEpositivedirectionReconoiseDIF3->SetBinError(i,0.01);
18019  }
18020  } // for jphi
18021  if (ccctest > 0.) {
18022  //cout<<"666 kcountHEpositivedirectionReconoiseDIF3 = "<<kcountHEpositivedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
18023  c3x5->cd(kcountHEpositivedirectionReconoiseDIF3);
18024  HEpositivedirectionReconoiseDIF3->SetMarkerStyle(20);
18025  HEpositivedirectionReconoiseDIF3->SetMarkerSize(0.4);
18026  HEpositivedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
18027  HEpositivedirectionReconoiseDIF3->SetXTitle("HEpositivedirectionReconoiseDIF3 \b");
18028  HEpositivedirectionReconoiseDIF3->SetMarkerColor(2);
18029  HEpositivedirectionReconoiseDIF3->SetLineColor(0);
18030  gPad->SetGridy();
18031  gPad->SetGridx();
18032  // gPad->SetLogy();
18033  if (kcountHEpositivedirectionReconoiseDIF3 == 1)
18034  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 16; depth = 3 \b");
18035  if (kcountHEpositivedirectionReconoiseDIF3 == 2)
18036  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 17; depth = 3 \b");
18037  if (kcountHEpositivedirectionReconoiseDIF3 == 3)
18038  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 18; depth = 3 \b");
18039  if (kcountHEpositivedirectionReconoiseDIF3 == 4)
18040  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 19; depth = 3 \b");
18041  if (kcountHEpositivedirectionReconoiseDIF3 == 5)
18042  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 20; depth = 3 \b");
18043  if (kcountHEpositivedirectionReconoiseDIF3 == 6)
18044  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 21; depth = 3 \b");
18045  if (kcountHEpositivedirectionReconoiseDIF3 == 7)
18046  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 22; depth = 3 \b");
18047  if (kcountHEpositivedirectionReconoiseDIF3 == 8)
18048  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 23; depth = 3 \b");
18049  if (kcountHEpositivedirectionReconoiseDIF3 == 9)
18050  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 24; depth = 3 \b");
18051  if (kcountHEpositivedirectionReconoiseDIF3 == 10)
18052  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 25; depth = 3 \b");
18053  if (kcountHEpositivedirectionReconoiseDIF3 == 11)
18054  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 26; depth = 3 \b");
18055  if (kcountHEpositivedirectionReconoiseDIF3 == 12)
18056  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 27; depth = 3 \b");
18057  if (kcountHEpositivedirectionReconoiseDIF3 == 13)
18058  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 28; depth = 3 \b");
18059  HEpositivedirectionReconoiseDIF3->Draw("Error");
18060  kcountHEpositivedirectionReconoiseDIF3++;
18061  if (kcountHEpositivedirectionReconoiseDIF3 > 13)
18062  break; // 4x6 = 24
18063  } //ccctest>0
18064 
18065  } // for i
18066  } //if(jeta-41 >=
18067  } //for jeta
18069  c3x5->Update();
18070  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
18071  c3x5->Clear();
18072  // clean-up
18073  if (h2CeffHEpositivedirectionReconoiseDIF3)
18074  delete h2CeffHEpositivedirectionReconoiseDIF3;
18075  //========================================================================================== 7
18076  //======================================================================
18077  //======================================================================1D plot: R vs phi , different eta, depth=4
18078  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
18079  c3x5->Clear();
18081  c3x5->Divide(3, 5);
18082  c3x5->cd(1);
18083  int kcountHEpositivedirectionReconoiseDIF4 = 1;
18084  TH1F *h2CeffHEpositivedirectionReconoiseDIF4 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF4", "", nphi, 0., 72.);
18085 
18086  for (int jeta = 0; jeta < njeta; jeta++) {
18087  // positivedirectionReconoiseDIF:
18088  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18089  // for (int i=0;i<ndepth;i++) {
18090  // depth=4
18091  for (int i = 3; i < 4; i++) {
18092  TH1F *HEpositivedirectionReconoiseDIF4 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF4->Clone("twod1");
18093 
18094  float ccctest = 0; // to avoid empty massive elements
18095  for (int jphi = 0; jphi < nphi; jphi++) {
18096  double ccc1 = breconoisehe[i][jeta][jphi];
18097  if (ccc1 != 0.) {
18098  HEpositivedirectionReconoiseDIF4->Fill(jphi, ccc1);
18099  ccctest = 1.; //HEpositivedirectionReconoiseDIF4->SetBinError(i,0.01);
18100  }
18101  } // for jphi
18102  if (ccctest > 0.) {
18103  //cout<<"777 kcountHEpositivedirectionReconoiseDIF4 = "<<kcountHEpositivedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
18104  c3x5->cd(kcountHEpositivedirectionReconoiseDIF4);
18105  HEpositivedirectionReconoiseDIF4->SetMarkerStyle(20);
18106  HEpositivedirectionReconoiseDIF4->SetMarkerSize(0.4);
18107  HEpositivedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
18108  HEpositivedirectionReconoiseDIF4->SetXTitle("HEpositivedirectionReconoiseDIF4 \b");
18109  HEpositivedirectionReconoiseDIF4->SetMarkerColor(2);
18110  HEpositivedirectionReconoiseDIF4->SetLineColor(0);
18111  gPad->SetGridy();
18112  gPad->SetGridx();
18113  // gPad->SetLogy();
18114  if (kcountHEpositivedirectionReconoiseDIF4 == 1)
18115  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 15; depth = 4 \b");
18116  if (kcountHEpositivedirectionReconoiseDIF4 == 2)
18117  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 17; depth = 4 \b");
18118  if (kcountHEpositivedirectionReconoiseDIF4 == 3)
18119  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 18; depth = 4 \b");
18120  if (kcountHEpositivedirectionReconoiseDIF4 == 4)
18121  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 19; depth = 4 \b");
18122  if (kcountHEpositivedirectionReconoiseDIF4 == 5)
18123  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 20; depth = 4 \b");
18124  if (kcountHEpositivedirectionReconoiseDIF4 == 6)
18125  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 21; depth = 4 \b");
18126  if (kcountHEpositivedirectionReconoiseDIF4 == 7)
18127  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 22; depth = 4 \b");
18128  if (kcountHEpositivedirectionReconoiseDIF4 == 8)
18129  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 23; depth = 4 \b");
18130  if (kcountHEpositivedirectionReconoiseDIF4 == 9)
18131  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 24; depth = 4 \b");
18132  if (kcountHEpositivedirectionReconoiseDIF4 == 10)
18133  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 25; depth = 4 \b");
18134  if (kcountHEpositivedirectionReconoiseDIF4 == 11)
18135  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 26; depth = 4 \b");
18136  if (kcountHEpositivedirectionReconoiseDIF4 == 12)
18137  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 27; depth = 4 \b");
18138  HEpositivedirectionReconoiseDIF4->Draw("Error");
18139  kcountHEpositivedirectionReconoiseDIF4++;
18140  if (kcountHEpositivedirectionReconoiseDIF4 > 12)
18141  break; // 4x6 = 24
18142  } //ccctest>0
18143 
18144  } // for i
18145  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18146  } //for jeta
18148  c3x5->Update();
18149  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
18150  c3x5->Clear();
18151  // clean-up
18152  if (h2CeffHEpositivedirectionReconoiseDIF4)
18153  delete h2CeffHEpositivedirectionReconoiseDIF4;
18154  //========================================================================================== 8
18155  //======================================================================
18156  //======================================================================1D plot: R vs phi , different eta, depth=5
18157  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
18158  c3x5->Clear();
18160  c3x5->Divide(3, 5);
18161  c3x5->cd(1);
18162  int kcountHEpositivedirectionReconoiseDIF5 = 1;
18163  TH1F *h2CeffHEpositivedirectionReconoiseDIF5 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF5", "", nphi, 0., 72.);
18164 
18165  for (int jeta = 0; jeta < njeta; jeta++) {
18166  // positivedirectionReconoiseDIF:
18167  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18168  // for (int i=0;i<ndepth;i++) {
18169  // depth=5
18170  for (int i = 4; i < 5; i++) {
18171  TH1F *HEpositivedirectionReconoiseDIF5 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF5->Clone("twod1");
18172 
18173  float ccctest = 0; // to avoid empty massive elements
18174  for (int jphi = 0; jphi < nphi; jphi++) {
18175  // cout<<"888 initial kcountHEpositivedirectionReconoiseDIF5 = "<<kcountHEpositivedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" breconoisehe[i][jeta][jphi]= "<< breconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
18176 
18177  double ccc1 = breconoisehe[i][jeta][jphi];
18178  if (ccc1 != 0.) {
18179  HEpositivedirectionReconoiseDIF5->Fill(jphi, ccc1);
18180  ccctest = 1.; //HEpositivedirectionReconoiseDIF5->SetBinError(i,0.01);
18181  }
18182  } // for jphi
18183  if (ccctest > 0.) {
18184  //cout<<"888 kcountHEpositivedirectionReconoiseDIF5 = "<<kcountHEpositivedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<endl;
18185  c3x5->cd(kcountHEpositivedirectionReconoiseDIF5);
18186  HEpositivedirectionReconoiseDIF5->SetMarkerStyle(20);
18187  HEpositivedirectionReconoiseDIF5->SetMarkerSize(0.4);
18188  HEpositivedirectionReconoiseDIF5->GetYaxis()->SetLabelSize(0.04);
18189  HEpositivedirectionReconoiseDIF5->SetXTitle("HEpositivedirectionReconoiseDIF5 \b");
18190  HEpositivedirectionReconoiseDIF5->SetMarkerColor(2);
18191  HEpositivedirectionReconoiseDIF5->SetLineColor(0);
18192  gPad->SetGridy();
18193  gPad->SetGridx();
18194  // gPad->SetLogy();
18195  if (kcountHEpositivedirectionReconoiseDIF5 == 1)
18196  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 17; depth = 5 \b");
18197  if (kcountHEpositivedirectionReconoiseDIF5 == 2)
18198  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 18; depth = 5 \b");
18199  if (kcountHEpositivedirectionReconoiseDIF5 == 3)
18200  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 19; depth = 5 \b");
18201  if (kcountHEpositivedirectionReconoiseDIF5 == 4)
18202  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 20; depth = 5 \b");
18203  if (kcountHEpositivedirectionReconoiseDIF5 == 5)
18204  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 21; depth = 5 \b");
18205  if (kcountHEpositivedirectionReconoiseDIF5 == 6)
18206  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 22; depth = 5 \b");
18207  if (kcountHEpositivedirectionReconoiseDIF5 == 7)
18208  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 23; depth = 5 \b");
18209  if (kcountHEpositivedirectionReconoiseDIF5 == 8)
18210  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 24; depth = 5 \b");
18211  if (kcountHEpositivedirectionReconoiseDIF5 == 9)
18212  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 25; depth = 5 \b");
18213  if (kcountHEpositivedirectionReconoiseDIF5 == 10)
18214  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 26; depth = 5 \b");
18215  if (kcountHEpositivedirectionReconoiseDIF5 == 11)
18216  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 27; depth = 5 \b");
18217  HEpositivedirectionReconoiseDIF5->Draw("Error");
18218  kcountHEpositivedirectionReconoiseDIF5++;
18219  if (kcountHEpositivedirectionReconoiseDIF5 > 11)
18220  break; // 4x6 = 24
18221  } //ccctest>0
18222 
18223  } // for i
18224  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18225  } //for jeta
18227  c3x5->Update();
18228  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
18229  c3x5->Clear();
18230  // clean-up
18231  if (h2CeffHEpositivedirectionReconoiseDIF5)
18232  delete h2CeffHEpositivedirectionReconoiseDIF5;
18233  //========================================================================================== 9
18234  //======================================================================
18235  //======================================================================1D plot: R vs phi , different eta, depth=6
18236  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
18237  c3x5->Clear();
18239  c3x5->Divide(3, 5);
18240  c3x5->cd(1);
18241  int kcountHEpositivedirectionReconoiseDIF6 = 1;
18242  TH1F *h2CeffHEpositivedirectionReconoiseDIF6 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF6", "", nphi, 0., 72.);
18243 
18244  for (int jeta = 0; jeta < njeta; jeta++) {
18245  // positivedirectionReconoiseDIF:
18246  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18247  // for (int i=0;i<ndepth;i++) {
18248  // depth=6
18249  for (int i = 5; i < 6; i++) {
18250  TH1F *HEpositivedirectionReconoiseDIF6 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF6->Clone("twod1");
18251 
18252  float ccctest = 0; // to avoid empty massive elements
18253  for (int jphi = 0; jphi < nphi; jphi++) {
18254  double ccc1 = breconoisehe[i][jeta][jphi];
18255  if (ccc1 != 0.) {
18256  HEpositivedirectionReconoiseDIF6->Fill(jphi, ccc1);
18257  ccctest = 1.; //HEpositivedirectionReconoiseDIF6->SetBinError(i,0.01);
18258  }
18259  } // for jphi
18260  if (ccctest > 0.) {
18261  //cout<<"999 kcountHEpositivedirectionReconoiseDIF6 = "<<kcountHEpositivedirectionReconoiseDIF6 <<" jeta-41= "<< jeta-41 <<endl;
18262  c3x5->cd(kcountHEpositivedirectionReconoiseDIF6);
18263  HEpositivedirectionReconoiseDIF6->SetMarkerStyle(20);
18264  HEpositivedirectionReconoiseDIF6->SetMarkerSize(0.4);
18265  HEpositivedirectionReconoiseDIF6->GetYaxis()->SetLabelSize(0.04);
18266  HEpositivedirectionReconoiseDIF6->SetXTitle("HEpositivedirectionReconoiseDIF6 \b");
18267  HEpositivedirectionReconoiseDIF6->SetMarkerColor(2);
18268  HEpositivedirectionReconoiseDIF6->SetLineColor(0);
18269  gPad->SetGridy();
18270  gPad->SetGridx();
18271  // gPad->SetLogy();
18272  if (kcountHEpositivedirectionReconoiseDIF6 == 1)
18273  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 18; depth = 6 \b");
18274  if (kcountHEpositivedirectionReconoiseDIF6 == 2)
18275  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 19; depth = 6 \b");
18276  if (kcountHEpositivedirectionReconoiseDIF6 == 3)
18277  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 20; depth = 6 \b");
18278  if (kcountHEpositivedirectionReconoiseDIF6 == 4)
18279  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 21; depth = 6 \b");
18280  if (kcountHEpositivedirectionReconoiseDIF6 == 5)
18281  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 22; depth = 6 \b");
18282  if (kcountHEpositivedirectionReconoiseDIF6 == 6)
18283  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 23; depth = 6 \b");
18284  if (kcountHEpositivedirectionReconoiseDIF6 == 7)
18285  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 24; depth = 6 \b");
18286  if (kcountHEpositivedirectionReconoiseDIF6 == 8)
18287  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 25; depth = 6 \b");
18288  if (kcountHEpositivedirectionReconoiseDIF6 == 9)
18289  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 26; depth = 6 \b");
18290  if (kcountHEpositivedirectionReconoiseDIF6 == 10)
18291  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 27; depth = 6 \b");
18292  HEpositivedirectionReconoiseDIF6->Draw("Error");
18293  kcountHEpositivedirectionReconoiseDIF6++;
18294  if (kcountHEpositivedirectionReconoiseDIF6 > 10)
18295  break; // 4x6 = 24
18296  } //ccctest>0
18297 
18298  } // for i
18299  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18300  } //for jeta
18302  c3x5->Update();
18303  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
18304  c3x5->Clear();
18305  // clean-up
18306  if (h2CeffHEpositivedirectionReconoiseDIF6)
18307  delete h2CeffHEpositivedirectionReconoiseDIF6;
18308  //========================================================================================== 10
18309  //======================================================================
18310  //======================================================================1D plot: R vs phi , different eta, depth=7
18311  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
18312  c3x5->Clear();
18314  c3x5->Divide(3, 5);
18315  c3x5->cd(1);
18316  int kcountHEpositivedirectionReconoiseDIF7 = 1;
18317  TH1F *h2CeffHEpositivedirectionReconoiseDIF7 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF7", "", nphi, 0., 72.);
18318 
18319  for (int jeta = 0; jeta < njeta; jeta++) {
18320  // positivedirectionReconoiseDIF:
18321  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18322  // for (int i=0;i<ndepth;i++) {
18323  // depth=7
18324  for (int i = 6; i < 7; i++) {
18325  TH1F *HEpositivedirectionReconoiseDIF7 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF7->Clone("twod1");
18326 
18327  float ccctest = 0; // to avoid empty massive elements
18328  for (int jphi = 0; jphi < nphi; jphi++) {
18329  double ccc1 = breconoisehe[i][jeta][jphi];
18330  if (ccc1 != 0.) {
18331  HEpositivedirectionReconoiseDIF7->Fill(jphi, ccc1);
18332  ccctest = 1.; //HEpositivedirectionReconoiseDIF7->SetBinError(i,0.01);
18333  }
18334  } // for jphi
18335  if (ccctest > 0.) {
18336  //cout<<"1010 kcountHEpositivedirectionReconoiseDIF7 = "<<kcountHEpositivedirectionReconoiseDIF7 <<" jeta-41= "<< jeta-41 <<endl;
18337  c3x5->cd(kcountHEpositivedirectionReconoiseDIF7);
18338  HEpositivedirectionReconoiseDIF7->SetMarkerStyle(20);
18339  HEpositivedirectionReconoiseDIF7->SetMarkerSize(0.4);
18340  HEpositivedirectionReconoiseDIF7->GetYaxis()->SetLabelSize(0.04);
18341  HEpositivedirectionReconoiseDIF7->SetXTitle("HEpositivedirectionReconoiseDIF7 \b");
18342  HEpositivedirectionReconoiseDIF7->SetMarkerColor(2);
18343  HEpositivedirectionReconoiseDIF7->SetLineColor(0);
18344  gPad->SetGridy();
18345  gPad->SetGridx();
18346  // gPad->SetLogy();
18347  if (kcountHEpositivedirectionReconoiseDIF7 == 1)
18348  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 25; depth = 7 \b");
18349  if (kcountHEpositivedirectionReconoiseDIF7 == 2)
18350  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 26; depth = 7 \b");
18351  if (kcountHEpositivedirectionReconoiseDIF7 == 3)
18352  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 27; depth = 7 \b");
18353  HEpositivedirectionReconoiseDIF7->Draw("Error");
18354  kcountHEpositivedirectionReconoiseDIF7++;
18355  if (kcountHEpositivedirectionReconoiseDIF7 > 3)
18356  break; //
18357  } //ccctest>0
18358 
18359  } // for i
18360  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18361  } //for jeta
18363  c3x5->Update();
18364  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
18365  c3x5->Clear();
18366  // clean-up
18367  if (h2CeffHEpositivedirectionReconoiseDIF7)
18368  delete h2CeffHEpositivedirectionReconoiseDIF7;
18369 
18371  //========================================================================================== 1114
18372  //======================================================================
18373  //======================================================================1D plot: R vs phi , different eta, depth=1
18374  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
18375  c3x5->Clear();
18377  c3x5->Divide(3, 5);
18378  c3x5->cd(1);
18379  int kcountHEnegativedirectionReconoiseDIF1 = 1;
18380  TH1F *h2CeffHEnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
18381  for (int jeta = 0; jeta < njeta; jeta++) {
18382  // negativedirectionReconoiseDIF:
18383  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18384  // for (int i=0;i<ndepth;i++) {
18385  // depth=1
18386  for (int i = 0; i < 1; i++) {
18387  TH1F *HEnegativedirectionReconoiseDIF1 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF1->Clone("twod1");
18388  float ccctest = 0; // to avoid empty massive elements
18389  for (int jphi = 0; jphi < nphi; jphi++) {
18390  double ccc1 = breconoisehe[i][jeta][jphi];
18391  if (ccc1 != 0.) {
18392  HEnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
18393  ccctest = 1.; //HEnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
18394  }
18395  } // for jphi
18396  if (ccctest > 0.) {
18397  // cout<<"444 kcountHEnegativedirectionReconoiseDIF1 = "<<kcountHEnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
18398  c3x5->cd(kcountHEnegativedirectionReconoiseDIF1);
18399  HEnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
18400  HEnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
18401  HEnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
18402  HEnegativedirectionReconoiseDIF1->SetXTitle("HEnegativedirectionReconoiseDIF1 \b");
18403  HEnegativedirectionReconoiseDIF1->SetMarkerColor(2);
18404  HEnegativedirectionReconoiseDIF1->SetLineColor(0);
18405  gPad->SetGridy();
18406  gPad->SetGridx();
18407  // gPad->SetLogy();
18408  if (kcountHEnegativedirectionReconoiseDIF1 == 1)
18409  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-29; depth = 1 \b");
18410  if (kcountHEnegativedirectionReconoiseDIF1 == 2)
18411  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-28; depth = 1 \b");
18412  if (kcountHEnegativedirectionReconoiseDIF1 == 3)
18413  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-27; depth = 1 \b");
18414  if (kcountHEnegativedirectionReconoiseDIF1 == 4)
18415  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-26; depth = 1 \b");
18416  if (kcountHEnegativedirectionReconoiseDIF1 == 5)
18417  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-25; depth = 1 \b");
18418  if (kcountHEnegativedirectionReconoiseDIF1 == 6)
18419  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-24; depth = 1 \b");
18420  if (kcountHEnegativedirectionReconoiseDIF1 == 7)
18421  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-23; depth = 1 \b");
18422  if (kcountHEnegativedirectionReconoiseDIF1 == 8)
18423  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-22; depth = 1 \b");
18424  if (kcountHEnegativedirectionReconoiseDIF1 == 9)
18425  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-21; depth = 1 \b");
18426  if (kcountHEnegativedirectionReconoiseDIF1 == 10)
18427  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-20; depth = 1 \b");
18428  if (kcountHEnegativedirectionReconoiseDIF1 == 11)
18429  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-19; depth = 1 \b");
18430  if (kcountHEnegativedirectionReconoiseDIF1 == 12)
18431  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-18; depth = 1 \b");
18432  HEnegativedirectionReconoiseDIF1->Draw("Error");
18433  kcountHEnegativedirectionReconoiseDIF1++;
18434  if (kcountHEnegativedirectionReconoiseDIF1 > 12)
18435  break; // 4x6 = 24
18436  } //ccctest>0
18437 
18438  } // for i
18439  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18440  } //for jeta
18442  c3x5->Update();
18443  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
18444  c3x5->Clear();
18445  // clean-up
18446  if (h2CeffHEnegativedirectionReconoiseDIF1)
18447  delete h2CeffHEnegativedirectionReconoiseDIF1;
18448 
18449  //========================================================================================== 1115
18450  //======================================================================
18451  //======================================================================1D plot: R vs phi , different eta, depth=2
18452  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
18453  c3x5->Clear();
18455  c3x5->Divide(3, 5);
18456  c3x5->cd(1);
18457  int kcountHEnegativedirectionReconoiseDIF2 = 1;
18458  TH1F *h2CeffHEnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
18459  for (int jeta = 0; jeta < njeta; jeta++) {
18460  // negativedirectionReconoiseDIF:
18461  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18462  // for (int i=0;i<ndepth;i++) {
18463  // depth=2
18464  for (int i = 1; i < 2; i++) {
18465  TH1F *HEnegativedirectionReconoiseDIF2 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF2->Clone("twod1");
18466  float ccctest = 0; // to avoid empty massive elements
18467  for (int jphi = 0; jphi < nphi; jphi++) {
18468  double ccc1 = breconoisehe[i][jeta][jphi];
18469  if (ccc1 != 0.) {
18470  HEnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
18471  ccctest = 1.; //HEnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
18472  }
18473  } // for jphi
18474  if (ccctest > 0.) {
18475  //cout<<"555 kcountHEnegativedirectionReconoiseDIF2 = "<<kcountHEnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
18476  c3x5->cd(kcountHEnegativedirectionReconoiseDIF2);
18477  HEnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
18478  HEnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
18479  HEnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
18480  HEnegativedirectionReconoiseDIF2->SetXTitle("HEnegativedirectionReconoiseDIF2 \b");
18481  HEnegativedirectionReconoiseDIF2->SetMarkerColor(2);
18482  HEnegativedirectionReconoiseDIF2->SetLineColor(0);
18483  gPad->SetGridy();
18484  gPad->SetGridx();
18485  // gPad->SetLogy();
18486  if (kcountHEnegativedirectionReconoiseDIF2 == 1)
18487  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-29; depth = 2 \b");
18488  if (kcountHEnegativedirectionReconoiseDIF2 == 2)
18489  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-28; depth = 2 \b");
18490  if (kcountHEnegativedirectionReconoiseDIF2 == 3)
18491  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-27; depth = 2 \b");
18492  if (kcountHEnegativedirectionReconoiseDIF2 == 4)
18493  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-26; depth = 2 \b");
18494  if (kcountHEnegativedirectionReconoiseDIF2 == 5)
18495  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-25; depth = 2 \b");
18496  if (kcountHEnegativedirectionReconoiseDIF2 == 6)
18497  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-24; depth = 2 \b");
18498  if (kcountHEnegativedirectionReconoiseDIF2 == 7)
18499  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-23; depth = 2 \b");
18500  if (kcountHEnegativedirectionReconoiseDIF2 == 8)
18501  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-22; depth = 2 \b");
18502  if (kcountHEnegativedirectionReconoiseDIF2 == 9)
18503  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-21; depth = 2 \b");
18504  if (kcountHEnegativedirectionReconoiseDIF2 == 10)
18505  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-20; depth = 2 \b");
18506  if (kcountHEnegativedirectionReconoiseDIF2 == 11)
18507  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-19; depth = 2 \b");
18508  if (kcountHEnegativedirectionReconoiseDIF2 == 12)
18509  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-18; depth = 2 \b");
18510  if (kcountHEnegativedirectionReconoiseDIF2 == 13)
18511  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-17; depth = 2 \b");
18512  HEnegativedirectionReconoiseDIF2->Draw("Error");
18513  kcountHEnegativedirectionReconoiseDIF2++;
18514  if (kcountHEnegativedirectionReconoiseDIF2 > 13)
18515  break; // 4x6 = 24
18516  } //ccctest>0
18517 
18518  } // for i
18519  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18520  } //for jeta
18522  c3x5->Update();
18523  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
18524  c3x5->Clear();
18525  // clean-up
18526  if (h2CeffHEnegativedirectionReconoiseDIF2)
18527  delete h2CeffHEnegativedirectionReconoiseDIF2;
18528  //========================================================================================== 1116
18529  //======================================================================
18530  //======================================================================1D plot: R vs phi , different eta, depth=3
18531  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
18532  c3x5->Clear();
18534  c3x5->Divide(3, 5);
18535  c3x5->cd(1);
18536  int kcountHEnegativedirectionReconoiseDIF3 = 1;
18537  TH1F *h2CeffHEnegativedirectionReconoiseDIF3 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF3", "", nphi, 0., 72.);
18538  for (int jeta = 0; jeta < njeta; jeta++) {
18539  // negativedirectionReconoiseDIF:
18540  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18541  // for (int i=0;i<ndepth;i++) {
18542  // depth=3
18543  for (int i = 2; i < 3; i++) {
18544  TH1F *HEnegativedirectionReconoiseDIF3 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF3->Clone("twod1");
18545  float ccctest = 0; // to avoid empty massive elements
18546  for (int jphi = 0; jphi < nphi; jphi++) {
18547  double ccc1 = breconoisehe[i][jeta][jphi];
18548  if (ccc1 != 0.) {
18549  HEnegativedirectionReconoiseDIF3->Fill(jphi, ccc1);
18550  ccctest = 1.; //HEnegativedirectionReconoiseDIF3->SetBinError(i,0.01);
18551  }
18552  } // for jphi
18553  if (ccctest > 0.) {
18554  //cout<<"666 kcountHEnegativedirectionReconoiseDIF3 = "<<kcountHEnegativedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
18555  c3x5->cd(kcountHEnegativedirectionReconoiseDIF3);
18556  HEnegativedirectionReconoiseDIF3->SetMarkerStyle(20);
18557  HEnegativedirectionReconoiseDIF3->SetMarkerSize(0.4);
18558  HEnegativedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
18559  HEnegativedirectionReconoiseDIF3->SetXTitle("HEnegativedirectionReconoiseDIF3 \b");
18560  HEnegativedirectionReconoiseDIF3->SetMarkerColor(2);
18561  HEnegativedirectionReconoiseDIF3->SetLineColor(0);
18562  gPad->SetGridy();
18563  gPad->SetGridx();
18564  // gPad->SetLogy();
18565  if (kcountHEnegativedirectionReconoiseDIF3 == 1)
18566  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-29; depth = 3 \b");
18567  if (kcountHEnegativedirectionReconoiseDIF3 == 2)
18568  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-28; depth = 3 \b");
18569  if (kcountHEnegativedirectionReconoiseDIF3 == 3)
18570  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-27; depth = 3 \b");
18571  if (kcountHEnegativedirectionReconoiseDIF3 == 4)
18572  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-26; depth = 3 \b");
18573  if (kcountHEnegativedirectionReconoiseDIF3 == 5)
18574  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-25; depth = 3 \b");
18575  if (kcountHEnegativedirectionReconoiseDIF3 == 6)
18576  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-24; depth = 3 \b");
18577  if (kcountHEnegativedirectionReconoiseDIF3 == 7)
18578  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-23; depth = 3 \b");
18579  if (kcountHEnegativedirectionReconoiseDIF3 == 8)
18580  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-22; depth = 3 \b");
18581  if (kcountHEnegativedirectionReconoiseDIF3 == 9)
18582  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-21; depth = 3 \b");
18583  if (kcountHEnegativedirectionReconoiseDIF3 == 10)
18584  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-20; depth = 3 \b");
18585  if (kcountHEnegativedirectionReconoiseDIF3 == 11)
18586  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-19; depth = 3 \b");
18587  if (kcountHEnegativedirectionReconoiseDIF3 == 12)
18588  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-18; depth = 3 \b");
18589  if (kcountHEnegativedirectionReconoiseDIF3 == 13)
18590  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-17; depth = 3 \b");
18591  HEnegativedirectionReconoiseDIF3->Draw("Error");
18592  kcountHEnegativedirectionReconoiseDIF3++;
18593  if (kcountHEnegativedirectionReconoiseDIF3 > 13)
18594  break; // 4x6 = 24
18595  } //ccctest>0
18596 
18597  } // for i
18598  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18599  } //for jeta
18601  c3x5->Update();
18602  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
18603  c3x5->Clear();
18604  // clean-up
18605  if (h2CeffHEnegativedirectionReconoiseDIF3)
18606  delete h2CeffHEnegativedirectionReconoiseDIF3;
18607  //========================================================================================== 1117
18608  //======================================================================
18609  //======================================================================1D plot: R vs phi , different eta, depth=4
18610  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
18611  c3x5->Clear();
18613  c3x5->Divide(3, 5);
18614  c3x5->cd(1);
18615  int kcountHEnegativedirectionReconoiseDIF4 = 1;
18616  TH1F *h2CeffHEnegativedirectionReconoiseDIF4 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF4", "", nphi, 0., 72.);
18617 
18618  for (int jeta = 0; jeta < njeta; jeta++) {
18619  // negativedirectionReconoiseDIF:
18620  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18621  // for (int i=0;i<ndepth;i++) {
18622  // depth=4
18623  for (int i = 3; i < 4; i++) {
18624  TH1F *HEnegativedirectionReconoiseDIF4 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF4->Clone("twod1");
18625 
18626  float ccctest = 0; // to avoid empty massive elements
18627  for (int jphi = 0; jphi < nphi; jphi++) {
18628  double ccc1 = breconoisehe[i][jeta][jphi];
18629  if (ccc1 != 0.) {
18630  HEnegativedirectionReconoiseDIF4->Fill(jphi, ccc1);
18631  ccctest = 1.; //HEnegativedirectionReconoiseDIF4->SetBinError(i,0.01);
18632  }
18633  } // for jphi
18634  if (ccctest > 0.) {
18635  //cout<<"777 kcountHEnegativedirectionReconoiseDIF4 = "<<kcountHEnegativedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
18636  c3x5->cd(kcountHEnegativedirectionReconoiseDIF4);
18637  HEnegativedirectionReconoiseDIF4->SetMarkerStyle(20);
18638  HEnegativedirectionReconoiseDIF4->SetMarkerSize(0.4);
18639  HEnegativedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
18640  HEnegativedirectionReconoiseDIF4->SetXTitle("HEnegativedirectionReconoiseDIF4 \b");
18641  HEnegativedirectionReconoiseDIF4->SetMarkerColor(2);
18642  HEnegativedirectionReconoiseDIF4->SetLineColor(0);
18643  gPad->SetGridy();
18644  gPad->SetGridx();
18645  // gPad->SetLogy();
18646  if (kcountHEnegativedirectionReconoiseDIF4 == 1)
18647  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-28; depth = 4 \b");
18648  if (kcountHEnegativedirectionReconoiseDIF4 == 2)
18649  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-27; depth = 4 \b");
18650  if (kcountHEnegativedirectionReconoiseDIF4 == 3)
18651  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-26; depth = 4 \b");
18652  if (kcountHEnegativedirectionReconoiseDIF4 == 4)
18653  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-25; depth = 4 \b");
18654  if (kcountHEnegativedirectionReconoiseDIF4 == 5)
18655  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-24; depth = 4 \b");
18656  if (kcountHEnegativedirectionReconoiseDIF4 == 6)
18657  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-23; depth = 4 \b");
18658  if (kcountHEnegativedirectionReconoiseDIF4 == 7)
18659  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-22; depth = 4 \b");
18660  if (kcountHEnegativedirectionReconoiseDIF4 == 8)
18661  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-21; depth = 4 \b");
18662  if (kcountHEnegativedirectionReconoiseDIF4 == 9)
18663  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-20; depth = 4 \b");
18664  if (kcountHEnegativedirectionReconoiseDIF4 == 10)
18665  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-19; depth = 4 \b");
18666  if (kcountHEnegativedirectionReconoiseDIF4 == 11)
18667  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-18; depth = 4 \b");
18668  if (kcountHEnegativedirectionReconoiseDIF4 == 12)
18669  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-16; depth = 4 \b");
18670  HEnegativedirectionReconoiseDIF4->Draw("Error");
18671  kcountHEnegativedirectionReconoiseDIF4++;
18672  if (kcountHEnegativedirectionReconoiseDIF4 > 12)
18673  break; // 4x6 = 24
18674  } //ccctest>0
18675 
18676  } // for i
18677  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18678  } //for jeta
18680  c3x5->Update();
18681  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
18682  c3x5->Clear();
18683  // clean-up
18684  if (h2CeffHEnegativedirectionReconoiseDIF4)
18685  delete h2CeffHEnegativedirectionReconoiseDIF4;
18686  //========================================================================================== 1118
18687  //======================================================================
18688  //======================================================================1D plot: R vs phi , different eta, depth=5
18689  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
18690  c3x5->Clear();
18692  c3x5->Divide(3, 5);
18693  c3x5->cd(1);
18694  int kcountHEnegativedirectionReconoiseDIF5 = 1;
18695  TH1F *h2CeffHEnegativedirectionReconoiseDIF5 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF5", "", nphi, 0., 72.);
18696 
18697  for (int jeta = 0; jeta < njeta; jeta++) {
18698  // negativedirectionReconoiseDIF:
18699  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18700  // for (int i=0;i<ndepth;i++) {
18701  // depth=5
18702  for (int i = 4; i < 5; i++) {
18703  TH1F *HEnegativedirectionReconoiseDIF5 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF5->Clone("twod1");
18704 
18705  float ccctest = 0; // to avoid empty massive elements
18706  for (int jphi = 0; jphi < nphi; jphi++) {
18707  // cout<<"888 initial kcountHEnegativedirectionReconoiseDIF5 = "<<kcountHEnegativedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" breconoisehe[i][jeta][jphi]= "<< breconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
18708 
18709  double ccc1 = breconoisehe[i][jeta][jphi];
18710  if (ccc1 != 0.) {
18711  HEnegativedirectionReconoiseDIF5->Fill(jphi, ccc1);
18712  ccctest = 1.; //HEnegativedirectionReconoiseDIF5->SetBinError(i,0.01);
18713  }
18714  } // for jphi
18715  if (ccctest > 0.) {
18716  //cout<<"888 kcountHEnegativedirectionReconoiseDIF5 = "<<kcountHEnegativedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<endl;
18717  c3x5->cd(kcountHEnegativedirectionReconoiseDIF5);
18718  HEnegativedirectionReconoiseDIF5->SetMarkerStyle(20);
18719  HEnegativedirectionReconoiseDIF5->SetMarkerSize(0.4);
18720  HEnegativedirectionReconoiseDIF5->GetYaxis()->SetLabelSize(0.04);
18721  HEnegativedirectionReconoiseDIF5->SetXTitle("HEnegativedirectionReconoiseDIF5 \b");
18722  HEnegativedirectionReconoiseDIF5->SetMarkerColor(2);
18723  HEnegativedirectionReconoiseDIF5->SetLineColor(0);
18724  gPad->SetGridy();
18725  gPad->SetGridx();
18726  // gPad->SetLogy();
18727  if (kcountHEnegativedirectionReconoiseDIF5 == 1)
18728  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-28; depth = 5 \b");
18729  if (kcountHEnegativedirectionReconoiseDIF5 == 2)
18730  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-27; depth = 5 \b");
18731  if (kcountHEnegativedirectionReconoiseDIF5 == 3)
18732  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-26; depth = 5 \b");
18733  if (kcountHEnegativedirectionReconoiseDIF5 == 4)
18734  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-25; depth = 5 \b");
18735  if (kcountHEnegativedirectionReconoiseDIF5 == 5)
18736  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-24; depth = 5 \b");
18737  if (kcountHEnegativedirectionReconoiseDIF5 == 6)
18738  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-23; depth = 5 \b");
18739  if (kcountHEnegativedirectionReconoiseDIF5 == 7)
18740  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-22; depth = 5 \b");
18741  if (kcountHEnegativedirectionReconoiseDIF5 == 8)
18742  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-21; depth = 5 \b");
18743  if (kcountHEnegativedirectionReconoiseDIF5 == 9)
18744  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-20; depth = 5 \b");
18745  if (kcountHEnegativedirectionReconoiseDIF5 == 10)
18746  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-19; depth = 5 \b");
18747  if (kcountHEnegativedirectionReconoiseDIF5 == 11)
18748  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-18; depth = 5 \b");
18749  HEnegativedirectionReconoiseDIF5->Draw("Error");
18750  kcountHEnegativedirectionReconoiseDIF5++;
18751  if (kcountHEnegativedirectionReconoiseDIF5 > 11)
18752  break; // 4x6 = 24
18753  } //ccctest>0
18754 
18755  } // for i
18756  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18757  } //for jeta
18759  c3x5->Update();
18760  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
18761  c3x5->Clear();
18762  // clean-up
18763  if (h2CeffHEnegativedirectionReconoiseDIF5)
18764  delete h2CeffHEnegativedirectionReconoiseDIF5;
18765  //========================================================================================== 1119
18766  //======================================================================
18767  //======================================================================1D plot: R vs phi , different eta, depth=6
18768  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
18769  c3x5->Clear();
18771  c3x5->Divide(3, 5);
18772  c3x5->cd(1);
18773  int kcountHEnegativedirectionReconoiseDIF6 = 1;
18774  TH1F *h2CeffHEnegativedirectionReconoiseDIF6 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF6", "", nphi, 0., 72.);
18775 
18776  for (int jeta = 0; jeta < njeta; jeta++) {
18777  // negativedirectionReconoiseDIF:
18778  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18779  // for (int i=0;i<ndepth;i++) {
18780  // depth=6
18781  for (int i = 5; i < 6; i++) {
18782  TH1F *HEnegativedirectionReconoiseDIF6 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF6->Clone("twod1");
18783 
18784  float ccctest = 0; // to avoid empty massive elements
18785  for (int jphi = 0; jphi < nphi; jphi++) {
18786  double ccc1 = breconoisehe[i][jeta][jphi];
18787  if (ccc1 != 0.) {
18788  HEnegativedirectionReconoiseDIF6->Fill(jphi, ccc1);
18789  ccctest = 1.; //HEnegativedirectionReconoiseDIF6->SetBinError(i,0.01);
18790  }
18791  } // for jphi
18792  if (ccctest > 0.) {
18793  //cout<<"999 kcountHEnegativedirectionReconoiseDIF6 = "<<kcountHEnegativedirectionReconoiseDIF6 <<" jeta-41= "<< jeta-41 <<endl;
18794  c3x5->cd(kcountHEnegativedirectionReconoiseDIF6);
18795  HEnegativedirectionReconoiseDIF6->SetMarkerStyle(20);
18796  HEnegativedirectionReconoiseDIF6->SetMarkerSize(0.4);
18797  HEnegativedirectionReconoiseDIF6->GetYaxis()->SetLabelSize(0.04);
18798  HEnegativedirectionReconoiseDIF6->SetXTitle("HEnegativedirectionReconoiseDIF6 \b");
18799  HEnegativedirectionReconoiseDIF6->SetMarkerColor(2);
18800  HEnegativedirectionReconoiseDIF6->SetLineColor(0);
18801  gPad->SetGridy();
18802  gPad->SetGridx();
18803  // gPad->SetLogy();
18804  if (kcountHEnegativedirectionReconoiseDIF6 == 1)
18805  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-28; depth = 6 \b");
18806  if (kcountHEnegativedirectionReconoiseDIF6 == 2)
18807  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-27; depth = 6 \b");
18808  if (kcountHEnegativedirectionReconoiseDIF6 == 3)
18809  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-26; depth = 6 \b");
18810  if (kcountHEnegativedirectionReconoiseDIF6 == 4)
18811  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-25; depth = 6 \b");
18812  if (kcountHEnegativedirectionReconoiseDIF6 == 5)
18813  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-24; depth = 6 \b");
18814  if (kcountHEnegativedirectionReconoiseDIF6 == 6)
18815  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-23; depth = 6 \b");
18816  if (kcountHEnegativedirectionReconoiseDIF6 == 7)
18817  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-22; depth = 6 \b");
18818  if (kcountHEnegativedirectionReconoiseDIF6 == 8)
18819  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-21; depth = 6 \b");
18820  if (kcountHEnegativedirectionReconoiseDIF6 == 9)
18821  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-20; depth = 6 \b");
18822  if (kcountHEnegativedirectionReconoiseDIF6 == 10)
18823  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-19; depth = 6 \b");
18824  HEnegativedirectionReconoiseDIF6->Draw("Error");
18825  kcountHEnegativedirectionReconoiseDIF6++;
18826  if (kcountHEnegativedirectionReconoiseDIF6 > 10)
18827  break; // 4x6 = 24
18828  } //ccctest>0
18829 
18830  } // for i
18831  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18832  } //for jeta
18834  c3x5->Update();
18835  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
18836  c3x5->Clear();
18837  // clean-up
18838  if (h2CeffHEnegativedirectionReconoiseDIF6)
18839  delete h2CeffHEnegativedirectionReconoiseDIF6;
18840  //========================================================================================== 11110
18841  //======================================================================
18842  //======================================================================1D plot: R vs phi , different eta, depth=7
18843  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
18844  c3x5->Clear();
18846  c3x5->Divide(3, 5);
18847  c3x5->cd(1);
18848  int kcountHEnegativedirectionReconoiseDIF7 = 1;
18849  TH1F *h2CeffHEnegativedirectionReconoiseDIF7 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF7", "", nphi, 0., 72.);
18850 
18851  for (int jeta = 0; jeta < njeta; jeta++) {
18852  // negativedirectionReconoiseDIF:
18853  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18854  // for (int i=0;i<ndepth;i++) {
18855  // depth=7
18856  for (int i = 6; i < 7; i++) {
18857  TH1F *HEnegativedirectionReconoiseDIF7 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF7->Clone("twod1");
18858 
18859  float ccctest = 0; // to avoid empty massive elements
18860  for (int jphi = 0; jphi < nphi; jphi++) {
18861  double ccc1 = breconoisehe[i][jeta][jphi];
18862  if (ccc1 != 0.) {
18863  HEnegativedirectionReconoiseDIF7->Fill(jphi, ccc1);
18864  ccctest = 1.; //HEnegativedirectionReconoiseDIF7->SetBinError(i,0.01);
18865  }
18866  } // for jphi
18867  if (ccctest > 0.) {
18868  //cout<<"1010 kcountHEnegativedirectionReconoiseDIF7 = "<<kcountHEnegativedirectionReconoiseDIF7 <<" jeta-41= "<< jeta-41 <<endl;
18869  c3x5->cd(kcountHEnegativedirectionReconoiseDIF7);
18870  HEnegativedirectionReconoiseDIF7->SetMarkerStyle(20);
18871  HEnegativedirectionReconoiseDIF7->SetMarkerSize(0.4);
18872  HEnegativedirectionReconoiseDIF7->GetYaxis()->SetLabelSize(0.04);
18873  HEnegativedirectionReconoiseDIF7->SetXTitle("HEnegativedirectionReconoiseDIF7 \b");
18874  HEnegativedirectionReconoiseDIF7->SetMarkerColor(2);
18875  HEnegativedirectionReconoiseDIF7->SetLineColor(0);
18876  gPad->SetGridy();
18877  gPad->SetGridx();
18878  // gPad->SetLogy();
18879  if (kcountHEnegativedirectionReconoiseDIF7 == 1)
18880  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-28; depth = 7 \b");
18881  if (kcountHEnegativedirectionReconoiseDIF7 == 2)
18882  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-27; depth = 7 \b");
18883  if (kcountHEnegativedirectionReconoiseDIF7 == 3)
18884  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-26; depth = 7 \b");
18885  HEnegativedirectionReconoiseDIF7->Draw("Error");
18886  kcountHEnegativedirectionReconoiseDIF7++;
18887  if (kcountHEnegativedirectionReconoiseDIF7 > 3)
18888  break; // 4x6 = 24
18889  } //ccctest>0
18890 
18891  } // for i
18892  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18893  } //for jeta
18895  c3x5->Update();
18896  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
18897  c3x5->Clear();
18898  // clean-up
18899  if (h2CeffHEnegativedirectionReconoiseDIF7)
18900  delete h2CeffHEnegativedirectionReconoiseDIF7;
18901 
18902  //======================================================================================================================
18903  //======================================================================================================================
18905  //======================================================================================================================
18906  //======================================================================================================================
18907  //======================================================================================================================
18908 
18909  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
18910 
18911  //cout<<" Start Vaiance: preparation *****" <<endl;
18912  TH2F *reconoiseVariance1HE1 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HE1");
18913  TH2F *reconoiseVariance0HE1 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE1");
18914  TH2F *reconoiseVarianceHE1 = (TH2F *)reconoiseVariance1HE1->Clone("reconoiseVarianceHE1");
18915  reconoiseVarianceHE1->Divide(reconoiseVariance1HE1, reconoiseVariance0HE1, 1, 1, "B");
18916  TH2F *reconoiseVariance1HE2 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HE2");
18917  TH2F *reconoiseVariance0HE2 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE2");
18918  TH2F *reconoiseVarianceHE2 = (TH2F *)reconoiseVariance1HE2->Clone("reconoiseVarianceHE2");
18919  reconoiseVarianceHE2->Divide(reconoiseVariance1HE2, reconoiseVariance0HE2, 1, 1, "B");
18920  TH2F *reconoiseVariance1HE3 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HE3");
18921  TH2F *reconoiseVariance0HE3 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE3");
18922  TH2F *reconoiseVarianceHE3 = (TH2F *)reconoiseVariance1HE3->Clone("reconoiseVarianceHE3");
18923  reconoiseVarianceHE3->Divide(reconoiseVariance1HE3, reconoiseVariance0HE3, 1, 1, "B");
18924  TH2F *reconoiseVariance1HE4 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HE4");
18925  TH2F *reconoiseVariance0HE4 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE4");
18926  TH2F *reconoiseVarianceHE4 = (TH2F *)reconoiseVariance1HE4->Clone("reconoiseVarianceHE4");
18927  reconoiseVarianceHE4->Divide(reconoiseVariance1HE4, reconoiseVariance0HE4, 1, 1, "B");
18928  TH2F *reconoiseVariance1HE5 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HE5");
18929  TH2F *reconoiseVariance0HE5 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE5");
18930  TH2F *reconoiseVarianceHE5 = (TH2F *)reconoiseVariance1HE5->Clone("reconoiseVarianceHE5");
18931  reconoiseVarianceHE5->Divide(reconoiseVariance1HE5, reconoiseVariance0HE5, 1, 1, "B");
18932  TH2F *reconoiseVariance1HE6 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HE6");
18933  TH2F *reconoiseVariance0HE6 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE6");
18934  TH2F *reconoiseVarianceHE6 = (TH2F *)reconoiseVariance1HE6->Clone("reconoiseVarianceHE6");
18935  reconoiseVarianceHE6->Divide(reconoiseVariance1HE6, reconoiseVariance0HE6, 1, 1, "B");
18936  TH2F *reconoiseVariance1HE7 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HE7");
18937  TH2F *reconoiseVariance0HE7 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HE7");
18938  TH2F *reconoiseVarianceHE7 = (TH2F *)reconoiseVariance1HE7->Clone("reconoiseVarianceHE7");
18939  reconoiseVarianceHE7->Divide(reconoiseVariance1HE7, reconoiseVariance0HE7, 1, 1, "B");
18940  //cout<<" Vaiance: preparation DONE *****" <<endl;
18941  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevariancehe
18942  // = sum(R*R)/N - (sum(R)/N)**2
18943  for (int jeta = 0; jeta < njeta; jeta++) {
18944  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
18945  //preparation for PHI normalization:
18946  double sumreconoiseHE0 = 0;
18947  int nsumreconoiseHE0 = 0;
18948  double sumreconoiseHE1 = 0;
18949  int nsumreconoiseHE1 = 0;
18950  double sumreconoiseHE2 = 0;
18951  int nsumreconoiseHE2 = 0;
18952  double sumreconoiseHE3 = 0;
18953  int nsumreconoiseHE3 = 0;
18954  double sumreconoiseHE4 = 0;
18955  int nsumreconoiseHE4 = 0;
18956  double sumreconoiseHE5 = 0;
18957  int nsumreconoiseHE5 = 0;
18958  double sumreconoiseHE6 = 0;
18959  int nsumreconoiseHE6 = 0;
18960  for (int jphi = 0; jphi < njphi; jphi++) {
18961  reconoisevariancehe[0][jeta][jphi] = reconoiseVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
18962  reconoisevariancehe[1][jeta][jphi] = reconoiseVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
18963  reconoisevariancehe[2][jeta][jphi] = reconoiseVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
18964  reconoisevariancehe[3][jeta][jphi] = reconoiseVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
18965  reconoisevariancehe[4][jeta][jphi] = reconoiseVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
18966  reconoisevariancehe[5][jeta][jphi] = reconoiseVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
18967  reconoisevariancehe[6][jeta][jphi] = reconoiseVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
18968  if (reconoisevariancehe[0][jeta][jphi] != 0.) {
18969  sumreconoiseHE0 += reconoisevariancehe[0][jeta][jphi];
18970  ++nsumreconoiseHE0;
18971  }
18972  if (reconoisevariancehe[1][jeta][jphi] != 0.) {
18973  sumreconoiseHE1 += reconoisevariancehe[1][jeta][jphi];
18974  ++nsumreconoiseHE1;
18975  }
18976  if (reconoisevariancehe[2][jeta][jphi] != 0.) {
18977  sumreconoiseHE2 += reconoisevariancehe[2][jeta][jphi];
18978  ++nsumreconoiseHE2;
18979  }
18980  if (reconoisevariancehe[3][jeta][jphi] != 0.) {
18981  sumreconoiseHE3 += reconoisevariancehe[3][jeta][jphi];
18982  ++nsumreconoiseHE3;
18983  }
18984  if (reconoisevariancehe[4][jeta][jphi] != 0.) {
18985  sumreconoiseHE4 += reconoisevariancehe[4][jeta][jphi];
18986  ++nsumreconoiseHE4;
18987  }
18988  if (reconoisevariancehe[5][jeta][jphi] != 0.) {
18989  sumreconoiseHE5 += reconoisevariancehe[5][jeta][jphi];
18990  ++nsumreconoiseHE5;
18991  }
18992  if (reconoisevariancehe[6][jeta][jphi] != 0.) {
18993  sumreconoiseHE6 += reconoisevariancehe[6][jeta][jphi];
18994  ++nsumreconoiseHE6;
18995  }
18996  } // phi
18997  // PHI normalization :
18998  for (int jphi = 0; jphi < njphi; jphi++) {
18999  if (sumreconoiseHE0 != 0.)
19000  reconoisevariancehe[0][jeta][jphi] /= (sumreconoiseHE0 / nsumreconoiseHE0);
19001  if (sumreconoiseHE1 != 0.)
19002  reconoisevariancehe[1][jeta][jphi] /= (sumreconoiseHE1 / nsumreconoiseHE1);
19003  if (sumreconoiseHE2 != 0.)
19004  reconoisevariancehe[2][jeta][jphi] /= (sumreconoiseHE2 / nsumreconoiseHE2);
19005  if (sumreconoiseHE3 != 0.)
19006  reconoisevariancehe[3][jeta][jphi] /= (sumreconoiseHE3 / nsumreconoiseHE3);
19007  if (sumreconoiseHE4 != 0.)
19008  reconoisevariancehe[4][jeta][jphi] /= (sumreconoiseHE4 / nsumreconoiseHE4);
19009  if (sumreconoiseHE5 != 0.)
19010  reconoisevariancehe[5][jeta][jphi] /= (sumreconoiseHE5 / nsumreconoiseHE5);
19011  if (sumreconoiseHE6 != 0.)
19012  reconoisevariancehe[6][jeta][jphi] /= (sumreconoiseHE6 / nsumreconoiseHE6);
19013  } // phi
19014  // reconoisevariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
19015  for (int jphi = 0; jphi < njphi; jphi++) {
19016  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
19017  reconoisevariancehe[0][jeta][jphi] -= areconoisehe[0][jeta][jphi] * areconoisehe[0][jeta][jphi];
19018  reconoisevariancehe[0][jeta][jphi] = fabs(reconoisevariancehe[0][jeta][jphi]);
19019  reconoisevariancehe[1][jeta][jphi] -= areconoisehe[1][jeta][jphi] * areconoisehe[1][jeta][jphi];
19020  reconoisevariancehe[1][jeta][jphi] = fabs(reconoisevariancehe[1][jeta][jphi]);
19021  reconoisevariancehe[2][jeta][jphi] -= areconoisehe[2][jeta][jphi] * areconoisehe[2][jeta][jphi];
19022  reconoisevariancehe[2][jeta][jphi] = fabs(reconoisevariancehe[2][jeta][jphi]);
19023  reconoisevariancehe[3][jeta][jphi] -= areconoisehe[3][jeta][jphi] * areconoisehe[3][jeta][jphi];
19024  reconoisevariancehe[3][jeta][jphi] = fabs(reconoisevariancehe[3][jeta][jphi]);
19025  reconoisevariancehe[4][jeta][jphi] -= areconoisehe[4][jeta][jphi] * areconoisehe[4][jeta][jphi];
19026  reconoisevariancehe[4][jeta][jphi] = fabs(reconoisevariancehe[4][jeta][jphi]);
19027  reconoisevariancehe[5][jeta][jphi] -= areconoisehe[5][jeta][jphi] * areconoisehe[5][jeta][jphi];
19028  reconoisevariancehe[5][jeta][jphi] = fabs(reconoisevariancehe[5][jeta][jphi]);
19029  reconoisevariancehe[6][jeta][jphi] -= areconoisehe[6][jeta][jphi] * areconoisehe[6][jeta][jphi];
19030  reconoisevariancehe[6][jeta][jphi] = fabs(reconoisevariancehe[6][jeta][jphi]);
19031  }
19032  }
19033  }
19034  //cout<<" Vaiance: DONE*****" <<endl;
19035  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
19036  //======================================================================
19037  //======================================================================
19038  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
19039  c1x1->Clear();
19041  c1x0->Divide(1, 1);
19042  c1x0->cd(1);
19043  TH2F *DefzDreconoiseHE42D = new TH2F("DefzDreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
19044  TH2F *DefzDreconoiseHE42D0 = new TH2F("DefzDreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
19045  TH2F *DefzDreconoiseHE42DF = (TH2F *)DefzDreconoiseHE42D0->Clone("DefzDreconoiseHE42DF");
19046  for (int i = 0; i < ndepth; i++) {
19047  for (int jeta = 0; jeta < neta; jeta++) {
19048  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
19049  for (int jphi = 0; jphi < nphi; jphi++) {
19050  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19051  int k2plot = jeta - 41;
19052  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
19053  if (areconoisehe[i][jeta][jphi] > 0.) {
19054  DefzDreconoiseHE42D->Fill(kkk, jphi, ccc1);
19055  DefzDreconoiseHE42D0->Fill(kkk, jphi, 1.);
19056  }
19057  }
19058  }
19059  }
19060  }
19061  DefzDreconoiseHE42DF->Divide(DefzDreconoiseHE42D, DefzDreconoiseHE42D0, 1, 1, "B"); // average A
19062  // DefzDreconoiseHE1->Sumw2();
19063  gPad->SetGridy();
19064  gPad->SetGridx(); // gPad->SetLogz();
19065  DefzDreconoiseHE42DF->SetMarkerStyle(20);
19066  DefzDreconoiseHE42DF->SetMarkerSize(0.4);
19067  DefzDreconoiseHE42DF->GetZaxis()->SetLabelSize(0.08);
19068  DefzDreconoiseHE42DF->SetXTitle("<D>_depth #eta \b");
19069  DefzDreconoiseHE42DF->SetYTitle(" #phi \b");
19070  DefzDreconoiseHE42DF->SetZTitle("<D>_depth \b");
19071  DefzDreconoiseHE42DF->SetMarkerColor(2);
19072  DefzDreconoiseHE42DF->SetLineColor(
19073  0); // DefzDreconoiseHE42DF->SetMaximum(1.000); // DefzDreconoiseHE42DF->SetMinimum(1.0);
19074  DefzDreconoiseHE42DF->Draw("COLZ");
19076  c1x0->Update();
19077  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHE.png");
19078  c1x0->Clear();
19079  // clean-up
19080  if (DefzDreconoiseHE42D)
19081  delete DefzDreconoiseHE42D;
19082  if (DefzDreconoiseHE42D0)
19083  delete DefzDreconoiseHE42D0;
19084  if (DefzDreconoiseHE42DF)
19085  delete DefzDreconoiseHE42DF;
19086  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
19087  //======================================================================
19088  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
19089  c1x1->Clear();
19091  c1x1->Divide(1, 1);
19092  c1x1->cd(1);
19093  TH1F *DefzDreconoiseHE41D = new TH1F("DefzDreconoiseHE41D", "", nphi, 0., 72.);
19094  TH1F *DefzDreconoiseHE41D0 = new TH1F("DefzDreconoiseHE41D0", "", nphi, 0., 72.);
19095  TH1F *DefzDreconoiseHE41DF = (TH1F *)DefzDreconoiseHE41D0->Clone("DefzDreconoiseHE41DF");
19096 
19097  for (int jphi = 0; jphi < nphi; jphi++) {
19098  for (int jeta = 0; jeta < neta; jeta++) {
19099  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
19100  for (int i = 0; i < ndepth; i++) {
19101  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19102  if (areconoisehe[i][jeta][jphi] > 0.) {
19103  DefzDreconoiseHE41D->Fill(jphi, ccc1);
19104  DefzDreconoiseHE41D0->Fill(jphi, 1.);
19105  }
19106  }
19107  }
19108  }
19109  }
19110  // DefzDreconoiseHE41D->Sumw2();DefzDreconoiseHE41D0->Sumw2();
19111 
19112  DefzDreconoiseHE41DF->Divide(DefzDreconoiseHE41D, DefzDreconoiseHE41D0, 1, 1, "B"); // R averaged over depthes & eta
19113  DefzDreconoiseHE41D0->Sumw2();
19114  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHE41DF->SetBinError(jphi,0.01);}
19115  gPad->SetGridy();
19116  gPad->SetGridx(); // gPad->SetLogz();
19117  DefzDreconoiseHE41DF->SetMarkerStyle(20);
19118  DefzDreconoiseHE41DF->SetMarkerSize(1.4);
19119  DefzDreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
19120  DefzDreconoiseHE41DF->SetXTitle("#phi \b");
19121  DefzDreconoiseHE41DF->SetYTitle(" <D> \b");
19122  DefzDreconoiseHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
19123  DefzDreconoiseHE41DF->SetMarkerColor(4);
19124  DefzDreconoiseHE41DF->SetLineColor(
19125  4); // DefzDreconoiseHE41DF->SetMinimum(0.8); DefzDreconoiseHE41DF->SetMinimum(-0.015);
19126  DefzDreconoiseHE41DF->Draw("Error");
19128  c1x1->Update();
19129  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHE.png");
19130  c1x1->Clear();
19131  // clean-up
19132  if (DefzDreconoiseHE41D)
19133  delete DefzDreconoiseHE41D;
19134  if (DefzDreconoiseHE41D0)
19135  delete DefzDreconoiseHE41D0;
19136  if (DefzDreconoiseHE41DF)
19137  delete DefzDreconoiseHE41DF;
19138  //========================================================================================== 14
19139  //======================================================================
19140  //======================================================================1D plot: D vs phi , different eta, depth=1
19141  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
19142  c3x5->Clear();
19144  c3x5->Divide(3, 5);
19145  c3x5->cd(1);
19146  int kcountHEpositivedirectionReconoiseD1 = 1;
19147  TH1F *h2CeffHEpositivedirectionReconoiseD1 = new TH1F("h2CeffHEpositivedirectionReconoiseD1", "", nphi, 0., 72.);
19148 
19149  for (int jeta = 0; jeta < njeta; jeta++) {
19150  // positivedirectionReconoiseD:
19151  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19152  // for (int i=0;i<ndepth;i++) {
19153  // depth=1
19154  for (int i = 0; i < 1; i++) {
19155  TH1F *HEpositivedirectionReconoiseD1 = (TH1F *)h2CeffHEpositivedirectionReconoiseD1->Clone("twod1");
19156 
19157  float ccctest = 0; // to avoid empty massive elements
19158  for (int jphi = 0; jphi < nphi; jphi++) {
19159  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19160  if (areconoisehe[i][jeta][jphi] > 0.) {
19161  HEpositivedirectionReconoiseD1->Fill(jphi, ccc1);
19162  ccctest = 1.; //HEpositivedirectionReconoiseD1->SetBinError(i,0.01);
19163  }
19164  } // for jphi
19165  if (ccctest > 0.) {
19166  //cout<<"1414 kcountHEpositivedirectionReconoiseD1 = "<<kcountHEpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
19167  c3x5->cd(kcountHEpositivedirectionReconoiseD1);
19168  HEpositivedirectionReconoiseD1->SetMarkerStyle(20);
19169  HEpositivedirectionReconoiseD1->SetMarkerSize(0.4);
19170  HEpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
19171  HEpositivedirectionReconoiseD1->SetXTitle("HEpositivedirectionReconoiseD1 \b");
19172  HEpositivedirectionReconoiseD1->SetMarkerColor(2);
19173  HEpositivedirectionReconoiseD1->SetLineColor(0);
19174  gPad->SetGridy();
19175  gPad->SetGridx();
19176  // gPad->SetLogy();
19177  if (kcountHEpositivedirectionReconoiseD1 == 1)
19178  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
19179  if (kcountHEpositivedirectionReconoiseD1 == 2)
19180  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
19181  if (kcountHEpositivedirectionReconoiseD1 == 3)
19182  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
19183  if (kcountHEpositivedirectionReconoiseD1 == 4)
19184  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
19185  if (kcountHEpositivedirectionReconoiseD1 == 5)
19186  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
19187  if (kcountHEpositivedirectionReconoiseD1 == 6)
19188  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
19189  if (kcountHEpositivedirectionReconoiseD1 == 7)
19190  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
19191  if (kcountHEpositivedirectionReconoiseD1 == 8)
19192  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
19193  if (kcountHEpositivedirectionReconoiseD1 == 9)
19194  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
19195  if (kcountHEpositivedirectionReconoiseD1 == 10)
19196  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
19197  if (kcountHEpositivedirectionReconoiseD1 == 11)
19198  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
19199  if (kcountHEpositivedirectionReconoiseD1 == 12)
19200  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
19201  HEpositivedirectionReconoiseD1->Draw("Error");
19202  kcountHEpositivedirectionReconoiseD1++;
19203  if (kcountHEpositivedirectionReconoiseD1 > 12)
19204  break; // 4x6 = 24
19205  } //ccctest>0
19206 
19207  } // for i
19208  } //if(jeta-41 >= 0)
19209  } //for jeta
19211  c3x5->Update();
19212  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
19213  c3x5->Clear();
19214  // clean-up
19215  if (h2CeffHEpositivedirectionReconoiseD1)
19216  delete h2CeffHEpositivedirectionReconoiseD1;
19217  //========================================================================================== 15
19218  //======================================================================
19219  //======================================================================1D plot: D vs phi , different eta, depth=2
19220  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
19221  c3x5->Clear();
19222  c3x5->Divide(3, 5);
19223  c3x5->cd(1);
19224  int kcountHEpositivedirectionReconoiseD2 = 1;
19225  TH1F *h2CeffHEpositivedirectionReconoiseD2 = new TH1F("h2CeffHEpositivedirectionReconoiseD2", "", nphi, 0., 72.);
19226 
19227  for (int jeta = 0; jeta < njeta; jeta++) {
19228  // positivedirectionReconoiseD:
19229  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19230  // for (int i=0;i<ndepth;i++) {
19231  // depth=2
19232  for (int i = 1; i < 2; i++) {
19233  TH1F *HEpositivedirectionReconoiseD2 = (TH1F *)h2CeffHEpositivedirectionReconoiseD2->Clone("twod1");
19234 
19235  float ccctest = 0; // to avoid empty massive elements
19236  for (int jphi = 0; jphi < nphi; jphi++) {
19237  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19238  if (areconoisehe[i][jeta][jphi] > 0.) {
19239  HEpositivedirectionReconoiseD2->Fill(jphi, ccc1);
19240  ccctest = 1.; //HEpositivedirectionReconoiseD2->SetBinError(i,0.01);
19241  }
19242  } // for jphi
19243  if (ccctest > 0.) {
19244  //cout<<"1515 kcountHEpositivedirectionReconoiseD2 = "<<kcountHEpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
19245  c3x5->cd(kcountHEpositivedirectionReconoiseD2);
19246  HEpositivedirectionReconoiseD2->SetMarkerStyle(20);
19247  HEpositivedirectionReconoiseD2->SetMarkerSize(0.4);
19248  HEpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
19249  HEpositivedirectionReconoiseD2->SetXTitle("HEpositivedirectionReconoiseD2 \b");
19250  HEpositivedirectionReconoiseD2->SetMarkerColor(2);
19251  HEpositivedirectionReconoiseD2->SetLineColor(0);
19252  gPad->SetGridy();
19253  gPad->SetGridx();
19254  // gPad->SetLogy();
19255  if (kcountHEpositivedirectionReconoiseD2 == 1)
19256  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
19257  if (kcountHEpositivedirectionReconoiseD2 == 2)
19258  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
19259  if (kcountHEpositivedirectionReconoiseD2 == 3)
19260  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
19261  if (kcountHEpositivedirectionReconoiseD2 == 4)
19262  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
19263  if (kcountHEpositivedirectionReconoiseD2 == 5)
19264  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
19265  if (kcountHEpositivedirectionReconoiseD2 == 6)
19266  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
19267  if (kcountHEpositivedirectionReconoiseD2 == 7)
19268  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
19269  if (kcountHEpositivedirectionReconoiseD2 == 8)
19270  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
19271  if (kcountHEpositivedirectionReconoiseD2 == 9)
19272  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
19273  if (kcountHEpositivedirectionReconoiseD2 == 10)
19274  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
19275  if (kcountHEpositivedirectionReconoiseD2 == 11)
19276  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
19277  if (kcountHEpositivedirectionReconoiseD2 == 12)
19278  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
19279  if (kcountHEpositivedirectionReconoiseD2 == 13)
19280  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
19281  HEpositivedirectionReconoiseD2->Draw("Error");
19282  kcountHEpositivedirectionReconoiseD2++;
19283  if (kcountHEpositivedirectionReconoiseD2 > 13)
19284  break; // 4x6 = 24
19285  } //ccctest>0
19286 
19287  } // for i
19288  } //if(jeta-41 >= 0)
19289  } //for jeta
19291  c3x5->Update();
19292  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
19293  c3x5->Clear();
19294  // clean-up
19295  if (h2CeffHEpositivedirectionReconoiseD2)
19296  delete h2CeffHEpositivedirectionReconoiseD2;
19297  //========================================================================================== 16
19298  //======================================================================
19299  //======================================================================1D plot: D vs phi , different eta, depth=3
19300  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
19301  c3x5->Clear();
19302  c3x5->Divide(3, 5);
19303  c3x5->cd(1);
19304  int kcountHEpositivedirectionReconoiseD3 = 1;
19305  TH1F *h2CeffHEpositivedirectionReconoiseD3 = new TH1F("h2CeffHEpositivedirectionReconoiseD3", "", nphi, 0., 72.);
19306 
19307  for (int jeta = 0; jeta < njeta; jeta++) {
19308  // positivedirectionReconoiseD:
19309  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19310  // for (int i=0;i<ndepth;i++) {
19311  // depth=3
19312  for (int i = 2; i < 3; i++) {
19313  TH1F *HEpositivedirectionReconoiseD3 = (TH1F *)h2CeffHEpositivedirectionReconoiseD3->Clone("twod1");
19314 
19315  float ccctest = 0; // to avoid empty massive elements
19316  for (int jphi = 0; jphi < nphi; jphi++) {
19317  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19318  if (areconoisehe[i][jeta][jphi] > 0.) {
19319  HEpositivedirectionReconoiseD3->Fill(jphi, ccc1);
19320  ccctest = 1.; //HEpositivedirectionReconoiseD3->SetBinError(i,0.01);
19321  }
19322  } // for jphi
19323  if (ccctest > 0.) {
19324  //cout<<"1616 kcountHEpositivedirectionReconoiseD3 = "<<kcountHEpositivedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
19325  c3x5->cd(kcountHEpositivedirectionReconoiseD3);
19326  HEpositivedirectionReconoiseD3->SetMarkerStyle(20);
19327  HEpositivedirectionReconoiseD3->SetMarkerSize(0.4);
19328  HEpositivedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
19329  HEpositivedirectionReconoiseD3->SetXTitle("HEpositivedirectionReconoiseD3 \b");
19330  HEpositivedirectionReconoiseD3->SetMarkerColor(2);
19331  HEpositivedirectionReconoiseD3->SetLineColor(0);
19332  gPad->SetGridy();
19333  gPad->SetGridx();
19334  // gPad->SetLogy();
19335  if (kcountHEpositivedirectionReconoiseD3 == 1)
19336  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
19337  if (kcountHEpositivedirectionReconoiseD3 == 2)
19338  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
19339  if (kcountHEpositivedirectionReconoiseD3 == 3)
19340  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
19341  if (kcountHEpositivedirectionReconoiseD3 == 4)
19342  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
19343  if (kcountHEpositivedirectionReconoiseD3 == 5)
19344  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
19345  if (kcountHEpositivedirectionReconoiseD3 == 6)
19346  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
19347  if (kcountHEpositivedirectionReconoiseD3 == 7)
19348  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
19349  if (kcountHEpositivedirectionReconoiseD3 == 8)
19350  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
19351  if (kcountHEpositivedirectionReconoiseD3 == 9)
19352  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
19353  if (kcountHEpositivedirectionReconoiseD3 == 10)
19354  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
19355  if (kcountHEpositivedirectionReconoiseD3 == 11)
19356  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
19357  if (kcountHEpositivedirectionReconoiseD3 == 12)
19358  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
19359  if (kcountHEpositivedirectionReconoiseD3 == 13)
19360  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
19361  HEpositivedirectionReconoiseD3->Draw("Error");
19362  kcountHEpositivedirectionReconoiseD3++;
19363  if (kcountHEpositivedirectionReconoiseD3 > 13)
19364  break; // 4x6 = 24
19365  } //ccctest>0
19366 
19367  } // for i
19368  } //if(jeta-41 >= 0)
19369  } //for jeta
19371  c3x5->Update();
19372  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
19373  c3x5->Clear();
19374  // clean-up
19375  if (h2CeffHEpositivedirectionReconoiseD3)
19376  delete h2CeffHEpositivedirectionReconoiseD3;
19377  //========================================================================================== 17
19378  //======================================================================
19379  //======================================================================1D plot: D vs phi , different eta, depth=4
19380  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
19381  c3x5->Clear();
19382  c3x5->Divide(3, 5);
19383  c3x5->cd(1);
19384  int kcountHEpositivedirectionReconoiseD4 = 1;
19385  TH1F *h2CeffHEpositivedirectionReconoiseD4 = new TH1F("h2CeffHEpositivedirectionReconoiseD4", "", nphi, 0., 72.);
19386 
19387  for (int jeta = 0; jeta < njeta; jeta++) {
19388  // positivedirectionReconoiseD:
19389  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19390  // for (int i=0;i<ndepth;i++) {
19391  // depth=4
19392  for (int i = 3; i < 4; i++) {
19393  TH1F *HEpositivedirectionReconoiseD4 = (TH1F *)h2CeffHEpositivedirectionReconoiseD4->Clone("twod1");
19394 
19395  float ccctest = 0; // to avoid empty massive elements
19396  for (int jphi = 0; jphi < nphi; jphi++) {
19397  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19398  if (areconoisehe[i][jeta][jphi] > 0.) {
19399  HEpositivedirectionReconoiseD4->Fill(jphi, ccc1);
19400  ccctest = 1.; //HEpositivedirectionReconoiseD4->SetBinError(i,0.01);
19401  }
19402  } // for jphi
19403  if (ccctest > 0.) {
19404  //cout<<"1717 kcountHEpositivedirectionReconoiseD4 = "<<kcountHEpositivedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
19405  c3x5->cd(kcountHEpositivedirectionReconoiseD4);
19406  HEpositivedirectionReconoiseD4->SetMarkerStyle(20);
19407  HEpositivedirectionReconoiseD4->SetMarkerSize(0.4);
19408  HEpositivedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
19409  HEpositivedirectionReconoiseD4->SetXTitle("HEpositivedirectionReconoiseD4 \b");
19410  HEpositivedirectionReconoiseD4->SetMarkerColor(2);
19411  HEpositivedirectionReconoiseD4->SetLineColor(0);
19412  gPad->SetGridy();
19413  gPad->SetGridx();
19414  // gPad->SetLogy();
19415  if (kcountHEpositivedirectionReconoiseD4 == 1)
19416  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
19417  if (kcountHEpositivedirectionReconoiseD4 == 2)
19418  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
19419  if (kcountHEpositivedirectionReconoiseD4 == 3)
19420  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
19421  if (kcountHEpositivedirectionReconoiseD4 == 4)
19422  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
19423  if (kcountHEpositivedirectionReconoiseD4 == 5)
19424  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
19425  if (kcountHEpositivedirectionReconoiseD4 == 6)
19426  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
19427  if (kcountHEpositivedirectionReconoiseD4 == 7)
19428  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
19429  if (kcountHEpositivedirectionReconoiseD4 == 8)
19430  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
19431  if (kcountHEpositivedirectionReconoiseD4 == 9)
19432  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
19433  if (kcountHEpositivedirectionReconoiseD4 == 10)
19434  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
19435  if (kcountHEpositivedirectionReconoiseD4 == 11)
19436  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
19437  if (kcountHEpositivedirectionReconoiseD4 == 12)
19438  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
19439  HEpositivedirectionReconoiseD4->Draw("Error");
19440  kcountHEpositivedirectionReconoiseD4++;
19441  if (kcountHEpositivedirectionReconoiseD4 > 12)
19442  break; // 4x6 = 24
19443  } //ccctest>0
19444 
19445  } // for i
19446  } //if(jeta-41 >= 0)
19447  } //for jeta
19449  c3x5->Update();
19450  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
19451  c3x5->Clear();
19452  // clean-up
19453  if (h2CeffHEpositivedirectionReconoiseD4)
19454  delete h2CeffHEpositivedirectionReconoiseD4;
19455  //========================================================================================== 18
19456  //======================================================================
19457  //======================================================================1D plot: D vs phi , different eta, depth=5
19458  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
19459  c3x5->Clear();
19460  c3x5->Divide(3, 5);
19461  c3x5->cd(1);
19462  int kcountHEpositivedirectionReconoiseD5 = 1;
19463  TH1F *h2CeffHEpositivedirectionReconoiseD5 = new TH1F("h2CeffHEpositivedirectionReconoiseD5", "", nphi, 0., 72.);
19464 
19465  for (int jeta = 0; jeta < njeta; jeta++) {
19466  // positivedirectionReconoiseD:
19467  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19468  // for (int i=0;i<ndepth;i++) {
19469  // depth=5
19470  for (int i = 4; i < 5; i++) {
19471  TH1F *HEpositivedirectionReconoiseD5 = (TH1F *)h2CeffHEpositivedirectionReconoiseD5->Clone("twod1");
19472 
19473  float ccctest = 0; // to avoid empty massive elements
19474  for (int jphi = 0; jphi < nphi; jphi++) {
19475  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19476  if (areconoisehe[i][jeta][jphi] > 0.) {
19477  HEpositivedirectionReconoiseD5->Fill(jphi, ccc1);
19478  ccctest = 1.; //HEpositivedirectionReconoiseD5->SetBinError(i,0.01);
19479  }
19480  } // for jphi
19481  if (ccctest > 0.) {
19482  //cout<<"1818 kcountHEpositivedirectionReconoiseD5 = "<<kcountHEpositivedirectionReconoiseD5 <<" jeta-41= "<< jeta-41 <<endl;
19483  c3x5->cd(kcountHEpositivedirectionReconoiseD5);
19484  HEpositivedirectionReconoiseD5->SetMarkerStyle(20);
19485  HEpositivedirectionReconoiseD5->SetMarkerSize(0.4);
19486  HEpositivedirectionReconoiseD5->GetYaxis()->SetLabelSize(0.04);
19487  HEpositivedirectionReconoiseD5->SetXTitle("HEpositivedirectionReconoiseD5 \b");
19488  HEpositivedirectionReconoiseD5->SetMarkerColor(2);
19489  HEpositivedirectionReconoiseD5->SetLineColor(0);
19490  gPad->SetGridy();
19491  gPad->SetGridx();
19492  // gPad->SetLogy();
19493  if (kcountHEpositivedirectionReconoiseD5 == 1)
19494  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
19495  if (kcountHEpositivedirectionReconoiseD5 == 2)
19496  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
19497  if (kcountHEpositivedirectionReconoiseD5 == 3)
19498  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
19499  if (kcountHEpositivedirectionReconoiseD5 == 4)
19500  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
19501  if (kcountHEpositivedirectionReconoiseD5 == 5)
19502  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
19503  if (kcountHEpositivedirectionReconoiseD5 == 6)
19504  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
19505  if (kcountHEpositivedirectionReconoiseD5 == 7)
19506  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
19507  if (kcountHEpositivedirectionReconoiseD5 == 8)
19508  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
19509  if (kcountHEpositivedirectionReconoiseD5 == 9)
19510  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
19511  if (kcountHEpositivedirectionReconoiseD5 == 10)
19512  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
19513  if (kcountHEpositivedirectionReconoiseD5 == 11)
19514  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
19515  HEpositivedirectionReconoiseD5->Draw("Error");
19516  kcountHEpositivedirectionReconoiseD5++;
19517  if (kcountHEpositivedirectionReconoiseD5 > 11)
19518  break; // 4x6 = 24
19519  } //ccctest>0
19520 
19521  } // for i
19522  } //if(jeta-41 >= 0)
19523  } //for jeta
19525  c3x5->Update();
19526  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
19527  c3x5->Clear();
19528  // clean-up
19529  if (h2CeffHEpositivedirectionReconoiseD5)
19530  delete h2CeffHEpositivedirectionReconoiseD5;
19531  //========================================================================================== 19
19532  //======================================================================
19533  //======================================================================1D plot: D vs phi , different eta, depth=6
19534  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
19535  c3x5->Clear();
19536  c3x5->Divide(3, 5);
19537  c3x5->cd(1);
19538  int kcountHEpositivedirectionReconoiseD6 = 1;
19539  TH1F *h2CeffHEpositivedirectionReconoiseD6 = new TH1F("h2CeffHEpositivedirectionReconoiseD6", "", nphi, 0., 72.);
19540 
19541  for (int jeta = 0; jeta < njeta; jeta++) {
19542  // positivedirectionReconoiseD:
19543  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19544  // for (int i=0;i<ndepth;i++) {
19545  // depth=6
19546  for (int i = 5; i < 6; i++) {
19547  TH1F *HEpositivedirectionReconoiseD6 = (TH1F *)h2CeffHEpositivedirectionReconoiseD6->Clone("twod1");
19548 
19549  float ccctest = 0; // to avoid empty massive elements
19550  for (int jphi = 0; jphi < nphi; jphi++) {
19551  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19552  if (areconoisehe[i][jeta][jphi] > 0.) {
19553  HEpositivedirectionReconoiseD6->Fill(jphi, ccc1);
19554  ccctest = 1.; //HEpositivedirectionReconoiseD6->SetBinError(i,0.01);
19555  }
19556  } // for jphi
19557  if (ccctest > 0.) {
19558  //cout<<"1919 kcountHEpositivedirectionReconoiseD6 = "<<kcountHEpositivedirectionReconoiseD6 <<" jeta-41= "<< jeta-41 <<endl;
19559  c3x5->cd(kcountHEpositivedirectionReconoiseD6);
19560  HEpositivedirectionReconoiseD6->SetMarkerStyle(20);
19561  HEpositivedirectionReconoiseD6->SetMarkerSize(0.4);
19562  HEpositivedirectionReconoiseD6->GetYaxis()->SetLabelSize(0.04);
19563  HEpositivedirectionReconoiseD6->SetXTitle("HEpositivedirectionReconoiseD6 \b");
19564  HEpositivedirectionReconoiseD6->SetMarkerColor(2);
19565  HEpositivedirectionReconoiseD6->SetLineColor(0);
19566  gPad->SetGridy();
19567  gPad->SetGridx();
19568  // gPad->SetLogy();
19569  if (kcountHEpositivedirectionReconoiseD6 == 1)
19570  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
19571  if (kcountHEpositivedirectionReconoiseD6 == 2)
19572  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
19573  if (kcountHEpositivedirectionReconoiseD6 == 3)
19574  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
19575  if (kcountHEpositivedirectionReconoiseD6 == 4)
19576  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
19577  if (kcountHEpositivedirectionReconoiseD6 == 5)
19578  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
19579  if (kcountHEpositivedirectionReconoiseD6 == 6)
19580  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
19581  if (kcountHEpositivedirectionReconoiseD6 == 7)
19582  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
19583  if (kcountHEpositivedirectionReconoiseD6 == 8)
19584  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
19585  if (kcountHEpositivedirectionReconoiseD6 == 9)
19586  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
19587  if (kcountHEpositivedirectionReconoiseD6 == 10)
19588  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
19589  HEpositivedirectionReconoiseD6->Draw("Error");
19590  kcountHEpositivedirectionReconoiseD6++;
19591  if (kcountHEpositivedirectionReconoiseD6 > 10)
19592  break; // 4x6 = 24
19593  } //ccctest>0
19594 
19595  } // for i
19596  } //if(jeta-41 >= 0)
19597  } //for jeta
19599  c3x5->Update();
19600  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
19601  c3x5->Clear();
19602  // clean-up
19603  if (h2CeffHEpositivedirectionReconoiseD6)
19604  delete h2CeffHEpositivedirectionReconoiseD6;
19605  //========================================================================================== 20
19606  //======================================================================
19607  //======================================================================1D plot: D vs phi , different eta, depth=7
19608  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
19609  c3x5->Clear();
19610  c3x5->Divide(3, 5);
19611  c3x5->cd(1);
19612  int kcountHEpositivedirectionReconoiseD7 = 1;
19613  TH1F *h2CeffHEpositivedirectionReconoiseD7 = new TH1F("h2CeffHEpositivedirectionReconoiseD7", "", nphi, 0., 72.);
19614 
19615  for (int jeta = 0; jeta < njeta; jeta++) {
19616  // positivedirectionReconoiseD:
19617  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19618  // for (int i=0;i<ndepth;i++) {
19619  // depth=7
19620  for (int i = 6; i < 7; i++) {
19621  TH1F *HEpositivedirectionReconoiseD7 = (TH1F *)h2CeffHEpositivedirectionReconoiseD7->Clone("twod1");
19622 
19623  float ccctest = 0; // to avoid empty massive elements
19624  for (int jphi = 0; jphi < nphi; jphi++) {
19625  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19626  if (areconoisehe[i][jeta][jphi] > 0.) {
19627  HEpositivedirectionReconoiseD7->Fill(jphi, ccc1);
19628  ccctest = 1.; //HEpositivedirectionReconoiseD7->SetBinError(i,0.01);
19629  }
19630  } // for jphi
19631  if (ccctest != 0.) {
19632  //cout<<"2020 kcountHEpositivedirectionReconoiseD7 = "<<kcountHEpositivedirectionReconoiseD7 <<" jeta-41= "<< jeta-41 <<endl;
19633  c3x5->cd(kcountHEpositivedirectionReconoiseD7);
19634  HEpositivedirectionReconoiseD7->SetMarkerStyle(20);
19635  HEpositivedirectionReconoiseD7->SetMarkerSize(0.4);
19636  HEpositivedirectionReconoiseD7->GetYaxis()->SetLabelSize(0.04);
19637  HEpositivedirectionReconoiseD7->SetXTitle("HEpositivedirectionReconoiseD7 \b");
19638  HEpositivedirectionReconoiseD7->SetMarkerColor(2);
19639  HEpositivedirectionReconoiseD7->SetLineColor(0);
19640  gPad->SetGridy();
19641  gPad->SetGridx();
19642  // gPad->SetLogy();
19643  if (kcountHEpositivedirectionReconoiseD7 == 1)
19644  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
19645  if (kcountHEpositivedirectionReconoiseD7 == 2)
19646  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
19647  if (kcountHEpositivedirectionReconoiseD7 == 3)
19648  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
19649  HEpositivedirectionReconoiseD7->Draw("Error");
19650  kcountHEpositivedirectionReconoiseD7++;
19651  if (kcountHEpositivedirectionReconoiseD7 > 3)
19652  break; // 4x6 = 24
19653  } //ccctest>0
19654 
19655  } // for i
19656  } //if(jeta-41 >= 0)
19657  } //for jeta
19659  c3x5->Update();
19660  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
19661  c3x5->Clear();
19662  // clean-up
19663  if (h2CeffHEpositivedirectionReconoiseD7)
19664  delete h2CeffHEpositivedirectionReconoiseD7;
19665 
19666  //========================================================================================== 22222214
19667  //======================================================================
19668  //======================================================================1D plot: D vs phi , different eta, depth=1
19669  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
19670  c3x5->Clear();
19672  c3x5->Divide(3, 5);
19673  c3x5->cd(1);
19674  int kcountHEnegativedirectionReconoiseD1 = 1;
19675  TH1F *h2CeffHEnegativedirectionReconoiseD1 = new TH1F("h2CeffHEnegativedirectionReconoiseD1", "", nphi, 0., 72.);
19676 
19677  for (int jeta = 0; jeta < njeta; jeta++) {
19678  // negativedirectionReconoiseD:
19679  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19680  // for (int i=0;i<ndepth;i++) {
19681  // depth=1
19682  for (int i = 0; i < 1; i++) {
19683  TH1F *HEnegativedirectionReconoiseD1 = (TH1F *)h2CeffHEnegativedirectionReconoiseD1->Clone("twod1");
19684 
19685  float ccctest = 0; // to avoid empty massive elements
19686  for (int jphi = 0; jphi < nphi; jphi++) {
19687  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19688  if (areconoisehe[i][jeta][jphi] > 0.) {
19689  HEnegativedirectionReconoiseD1->Fill(jphi, ccc1);
19690  ccctest = 1.; //HEnegativedirectionReconoiseD1->SetBinError(i,0.01);
19691  }
19692  } // for jphi
19693  if (ccctest > 0.) {
19694  //cout<<"1414 kcountHEnegativedirectionReconoiseD1 = "<<kcountHEnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
19695  c3x5->cd(kcountHEnegativedirectionReconoiseD1);
19696  HEnegativedirectionReconoiseD1->SetMarkerStyle(20);
19697  HEnegativedirectionReconoiseD1->SetMarkerSize(0.4);
19698  HEnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
19699  HEnegativedirectionReconoiseD1->SetXTitle("HEnegativedirectionReconoiseD1 \b");
19700  HEnegativedirectionReconoiseD1->SetMarkerColor(2);
19701  HEnegativedirectionReconoiseD1->SetLineColor(0);
19702  gPad->SetGridy();
19703  gPad->SetGridx();
19704  // gPad->SetLogy();
19705  if (kcountHEnegativedirectionReconoiseD1 == 1)
19706  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
19707  if (kcountHEnegativedirectionReconoiseD1 == 2)
19708  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
19709  if (kcountHEnegativedirectionReconoiseD1 == 3)
19710  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
19711  if (kcountHEnegativedirectionReconoiseD1 == 4)
19712  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
19713  if (kcountHEnegativedirectionReconoiseD1 == 5)
19714  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
19715  if (kcountHEnegativedirectionReconoiseD1 == 6)
19716  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
19717  if (kcountHEnegativedirectionReconoiseD1 == 7)
19718  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
19719  if (kcountHEnegativedirectionReconoiseD1 == 8)
19720  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
19721  if (kcountHEnegativedirectionReconoiseD1 == 9)
19722  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
19723  if (kcountHEnegativedirectionReconoiseD1 == 10)
19724  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
19725  if (kcountHEnegativedirectionReconoiseD1 == 11)
19726  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
19727  if (kcountHEnegativedirectionReconoiseD1 == 12)
19728  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
19729  HEnegativedirectionReconoiseD1->Draw("Error");
19730  kcountHEnegativedirectionReconoiseD1++;
19731  if (kcountHEnegativedirectionReconoiseD1 > 12)
19732  break; // 4x6 = 24
19733  } //ccctest>0
19734 
19735  } // for i
19736  } //if(jeta-41 < 0)
19737  } //for jeta
19739  c3x5->Update();
19740  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
19741  c3x5->Clear();
19742  // clean-up
19743  if (h2CeffHEnegativedirectionReconoiseD1)
19744  delete h2CeffHEnegativedirectionReconoiseD1;
19745  //========================================================================================== 22222215
19746  //======================================================================
19747  //======================================================================1D plot: D vs phi , different eta, depth=2
19748  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
19749  c3x5->Clear();
19750  c3x5->Divide(3, 5);
19751  c3x5->cd(1);
19752  int kcountHEnegativedirectionReconoiseD2 = 1;
19753  TH1F *h2CeffHEnegativedirectionReconoiseD2 = new TH1F("h2CeffHEnegativedirectionReconoiseD2", "", nphi, 0., 72.);
19754 
19755  for (int jeta = 0; jeta < njeta; jeta++) {
19756  // negativedirectionReconoiseD:
19757  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19758  // for (int i=0;i<ndepth;i++) {
19759  // depth=2
19760  for (int i = 1; i < 2; i++) {
19761  TH1F *HEnegativedirectionReconoiseD2 = (TH1F *)h2CeffHEnegativedirectionReconoiseD2->Clone("twod1");
19762 
19763  float ccctest = 0; // to avoid empty massive elements
19764  for (int jphi = 0; jphi < nphi; jphi++) {
19765  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19766  if (areconoisehe[i][jeta][jphi] > 0.) {
19767  HEnegativedirectionReconoiseD2->Fill(jphi, ccc1);
19768  ccctest = 1.; //HEnegativedirectionReconoiseD2->SetBinError(i,0.01);
19769  }
19770  } // for jphi
19771  if (ccctest > 0.) {
19772  //cout<<"1515 kcountHEnegativedirectionReconoiseD2 = "<<kcountHEnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
19773  c3x5->cd(kcountHEnegativedirectionReconoiseD2);
19774  HEnegativedirectionReconoiseD2->SetMarkerStyle(20);
19775  HEnegativedirectionReconoiseD2->SetMarkerSize(0.4);
19776  HEnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
19777  HEnegativedirectionReconoiseD2->SetXTitle("HEnegativedirectionReconoiseD2 \b");
19778  HEnegativedirectionReconoiseD2->SetMarkerColor(2);
19779  HEnegativedirectionReconoiseD2->SetLineColor(0);
19780  gPad->SetGridy();
19781  gPad->SetGridx();
19782  // gPad->SetLogy();
19783  if (kcountHEnegativedirectionReconoiseD2 == 1)
19784  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
19785  if (kcountHEnegativedirectionReconoiseD2 == 2)
19786  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
19787  if (kcountHEnegativedirectionReconoiseD2 == 3)
19788  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
19789  if (kcountHEnegativedirectionReconoiseD2 == 4)
19790  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
19791  if (kcountHEnegativedirectionReconoiseD2 == 5)
19792  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
19793  if (kcountHEnegativedirectionReconoiseD2 == 6)
19794  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
19795  if (kcountHEnegativedirectionReconoiseD2 == 7)
19796  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
19797  if (kcountHEnegativedirectionReconoiseD2 == 8)
19798  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
19799  if (kcountHEnegativedirectionReconoiseD2 == 9)
19800  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
19801  if (kcountHEnegativedirectionReconoiseD2 == 10)
19802  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
19803  if (kcountHEnegativedirectionReconoiseD2 == 11)
19804  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
19805  if (kcountHEnegativedirectionReconoiseD2 == 12)
19806  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
19807  if (kcountHEnegativedirectionReconoiseD2 == 13)
19808  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
19809  HEnegativedirectionReconoiseD2->Draw("Error");
19810  kcountHEnegativedirectionReconoiseD2++;
19811  if (kcountHEnegativedirectionReconoiseD2 > 13)
19812  break; // 4x6 = 24
19813  } //ccctest>0
19814 
19815  } // for i
19816  } //if(jeta-41 < 0)
19817  } //for jeta
19819  c3x5->Update();
19820  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
19821  c3x5->Clear();
19822  // clean-up
19823  if (h2CeffHEnegativedirectionReconoiseD2)
19824  delete h2CeffHEnegativedirectionReconoiseD2;
19825  //========================================================================================== 22222216
19826  //======================================================================
19827  //======================================================================1D plot: D vs phi , different eta, depth=3
19828  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
19829  c3x5->Clear();
19830  c3x5->Divide(3, 5);
19831  c3x5->cd(1);
19832  int kcountHEnegativedirectionReconoiseD3 = 1;
19833  TH1F *h2CeffHEnegativedirectionReconoiseD3 = new TH1F("h2CeffHEnegativedirectionReconoiseD3", "", nphi, 0., 72.);
19834 
19835  for (int jeta = 0; jeta < njeta; jeta++) {
19836  // negativedirectionReconoiseD:
19837  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19838  // for (int i=0;i<ndepth;i++) {
19839  // depth=3
19840  for (int i = 2; i < 3; i++) {
19841  TH1F *HEnegativedirectionReconoiseD3 = (TH1F *)h2CeffHEnegativedirectionReconoiseD3->Clone("twod1");
19842 
19843  float ccctest = 0; // to avoid empty massive elements
19844  for (int jphi = 0; jphi < nphi; jphi++) {
19845  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19846  if (areconoisehe[i][jeta][jphi] > 0.) {
19847  HEnegativedirectionReconoiseD3->Fill(jphi, ccc1);
19848  ccctest = 1.; //HEnegativedirectionReconoiseD3->SetBinError(i,0.01);
19849  }
19850  } // for jphi
19851  if (ccctest > 0.) {
19852  //cout<<"1616 kcountHEnegativedirectionReconoiseD3 = "<<kcountHEnegativedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
19853  c3x5->cd(kcountHEnegativedirectionReconoiseD3);
19854  HEnegativedirectionReconoiseD3->SetMarkerStyle(20);
19855  HEnegativedirectionReconoiseD3->SetMarkerSize(0.4);
19856  HEnegativedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
19857  HEnegativedirectionReconoiseD3->SetXTitle("HEnegativedirectionReconoiseD3 \b");
19858  HEnegativedirectionReconoiseD3->SetMarkerColor(2);
19859  HEnegativedirectionReconoiseD3->SetLineColor(0);
19860  gPad->SetGridy();
19861  gPad->SetGridx();
19862  // gPad->SetLogy();
19863  if (kcountHEnegativedirectionReconoiseD3 == 1)
19864  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
19865  if (kcountHEnegativedirectionReconoiseD3 == 2)
19866  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
19867  if (kcountHEnegativedirectionReconoiseD3 == 3)
19868  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
19869  if (kcountHEnegativedirectionReconoiseD3 == 4)
19870  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
19871  if (kcountHEnegativedirectionReconoiseD3 == 5)
19872  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
19873  if (kcountHEnegativedirectionReconoiseD3 == 6)
19874  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
19875  if (kcountHEnegativedirectionReconoiseD3 == 7)
19876  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
19877  if (kcountHEnegativedirectionReconoiseD3 == 8)
19878  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
19879  if (kcountHEnegativedirectionReconoiseD3 == 9)
19880  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
19881  if (kcountHEnegativedirectionReconoiseD3 == 10)
19882  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
19883  if (kcountHEnegativedirectionReconoiseD3 == 11)
19884  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
19885  if (kcountHEnegativedirectionReconoiseD3 == 12)
19886  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
19887  if (kcountHEnegativedirectionReconoiseD3 == 13)
19888  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
19889  HEnegativedirectionReconoiseD3->Draw("Error");
19890  kcountHEnegativedirectionReconoiseD3++;
19891  if (kcountHEnegativedirectionReconoiseD3 > 13)
19892  break; // 4x6 = 24
19893  } //ccctest>0
19894 
19895  } // for i
19896  } //if(jeta-41 < 0)
19897  } //for jeta
19899  c3x5->Update();
19900  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
19901  c3x5->Clear();
19902  // clean-up
19903  if (h2CeffHEnegativedirectionReconoiseD3)
19904  delete h2CeffHEnegativedirectionReconoiseD3;
19905  //========================================================================================== 22222217
19906  //======================================================================
19907  //======================================================================1D plot: D vs phi , different eta, depth=4
19908  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
19909  c3x5->Clear();
19910  c3x5->Divide(3, 5);
19911  c3x5->cd(1);
19912  int kcountHEnegativedirectionReconoiseD4 = 1;
19913  TH1F *h2CeffHEnegativedirectionReconoiseD4 = new TH1F("h2CeffHEnegativedirectionReconoiseD4", "", nphi, 0., 72.);
19914 
19915  for (int jeta = 0; jeta < njeta; jeta++) {
19916  // negativedirectionReconoiseD:
19917  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19918  // for (int i=0;i<ndepth;i++) {
19919  // depth=4
19920  for (int i = 3; i < 4; i++) {
19921  TH1F *HEnegativedirectionReconoiseD4 = (TH1F *)h2CeffHEnegativedirectionReconoiseD4->Clone("twod1");
19922 
19923  float ccctest = 0; // to avoid empty massive elements
19924  for (int jphi = 0; jphi < nphi; jphi++) {
19925  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19926  if (areconoisehe[i][jeta][jphi] > 0.) {
19927  HEnegativedirectionReconoiseD4->Fill(jphi, ccc1);
19928  ccctest = 1.; //HEnegativedirectionReconoiseD4->SetBinError(i,0.01);
19929  }
19930  } // for jphi
19931  if (ccctest > 0.) {
19932  //cout<<"1717 kcountHEnegativedirectionReconoiseD4 = "<<kcountHEnegativedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
19933  c3x5->cd(kcountHEnegativedirectionReconoiseD4);
19934  HEnegativedirectionReconoiseD4->SetMarkerStyle(20);
19935  HEnegativedirectionReconoiseD4->SetMarkerSize(0.4);
19936  HEnegativedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
19937  HEnegativedirectionReconoiseD4->SetXTitle("HEnegativedirectionReconoiseD4 \b");
19938  HEnegativedirectionReconoiseD4->SetMarkerColor(2);
19939  HEnegativedirectionReconoiseD4->SetLineColor(0);
19940  gPad->SetGridy();
19941  gPad->SetGridx();
19942  // gPad->SetLogy();
19943  if (kcountHEnegativedirectionReconoiseD4 == 1)
19944  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
19945  if (kcountHEnegativedirectionReconoiseD4 == 2)
19946  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
19947  if (kcountHEnegativedirectionReconoiseD4 == 3)
19948  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
19949  if (kcountHEnegativedirectionReconoiseD4 == 4)
19950  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
19951  if (kcountHEnegativedirectionReconoiseD4 == 5)
19952  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
19953  if (kcountHEnegativedirectionReconoiseD4 == 6)
19954  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
19955  if (kcountHEnegativedirectionReconoiseD4 == 7)
19956  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
19957  if (kcountHEnegativedirectionReconoiseD4 == 8)
19958  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
19959  if (kcountHEnegativedirectionReconoiseD4 == 9)
19960  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
19961  if (kcountHEnegativedirectionReconoiseD4 == 10)
19962  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
19963  if (kcountHEnegativedirectionReconoiseD4 == 11)
19964  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
19965  if (kcountHEnegativedirectionReconoiseD4 == 12)
19966  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
19967  HEnegativedirectionReconoiseD4->Draw("Error");
19968  kcountHEnegativedirectionReconoiseD4++;
19969  if (kcountHEnegativedirectionReconoiseD4 > 12)
19970  break; // 4x6 = 24
19971  } //ccctest>0
19972 
19973  } // for i
19974  } //if(jeta-41 < 0)
19975  } //for jeta
19977  c3x5->Update();
19978  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
19979  c3x5->Clear();
19980  // clean-up
19981  if (h2CeffHEnegativedirectionReconoiseD4)
19982  delete h2CeffHEnegativedirectionReconoiseD4;
19983  //========================================================================================== 22222218
19984  //======================================================================
19985  //======================================================================1D plot: D vs phi , different eta, depth=5
19986  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
19987  c3x5->Clear();
19988  c3x5->Divide(3, 5);
19989  c3x5->cd(1);
19990  int kcountHEnegativedirectionReconoiseD5 = 1;
19991  TH1F *h2CeffHEnegativedirectionReconoiseD5 = new TH1F("h2CeffHEnegativedirectionReconoiseD5", "", nphi, 0., 72.);
19992 
19993  for (int jeta = 0; jeta < njeta; jeta++) {
19994  // negativedirectionReconoiseD:
19995  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19996  // for (int i=0;i<ndepth;i++) {
19997  // depth=5
19998  for (int i = 4; i < 5; i++) {
19999  TH1F *HEnegativedirectionReconoiseD5 = (TH1F *)h2CeffHEnegativedirectionReconoiseD5->Clone("twod1");
20000 
20001  float ccctest = 0; // to avoid empty massive elements
20002  for (int jphi = 0; jphi < nphi; jphi++) {
20003  double ccc1 = reconoisevariancehe[i][jeta][jphi];
20004  if (areconoisehe[i][jeta][jphi] > 0.) {
20005  HEnegativedirectionReconoiseD5->Fill(jphi, ccc1);
20006  ccctest = 1.; //HEnegativedirectionReconoiseD5->SetBinError(i,0.01);
20007  }
20008  } // for jphi
20009  if (ccctest > 0.) {
20010  //cout<<"1818 kcountHEnegativedirectionReconoiseD5 = "<<kcountHEnegativedirectionReconoiseD5 <<" jeta-41= "<< jeta-41 <<endl;
20011  c3x5->cd(kcountHEnegativedirectionReconoiseD5);
20012  HEnegativedirectionReconoiseD5->SetMarkerStyle(20);
20013  HEnegativedirectionReconoiseD5->SetMarkerSize(0.4);
20014  HEnegativedirectionReconoiseD5->GetYaxis()->SetLabelSize(0.04);
20015  HEnegativedirectionReconoiseD5->SetXTitle("HEnegativedirectionReconoiseD5 \b");
20016  HEnegativedirectionReconoiseD5->SetMarkerColor(2);
20017  HEnegativedirectionReconoiseD5->SetLineColor(0);
20018  gPad->SetGridy();
20019  gPad->SetGridx();
20020  // gPad->SetLogy();
20021  if (kcountHEnegativedirectionReconoiseD5 == 1)
20022  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
20023  if (kcountHEnegativedirectionReconoiseD5 == 2)
20024  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
20025  if (kcountHEnegativedirectionReconoiseD5 == 3)
20026  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
20027  if (kcountHEnegativedirectionReconoiseD5 == 4)
20028  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
20029  if (kcountHEnegativedirectionReconoiseD5 == 5)
20030  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
20031  if (kcountHEnegativedirectionReconoiseD5 == 6)
20032  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
20033  if (kcountHEnegativedirectionReconoiseD5 == 7)
20034  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
20035  if (kcountHEnegativedirectionReconoiseD5 == 8)
20036  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
20037  if (kcountHEnegativedirectionReconoiseD5 == 9)
20038  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
20039  if (kcountHEnegativedirectionReconoiseD5 == 10)
20040  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
20041  if (kcountHEnegativedirectionReconoiseD5 == 11)
20042  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
20043  HEnegativedirectionReconoiseD5->Draw("Error");
20044  kcountHEnegativedirectionReconoiseD5++;
20045  if (kcountHEnegativedirectionReconoiseD5 > 11)
20046  break; // 4x6 = 24
20047  } //ccctest>0
20048 
20049  } // for i
20050  } //if(jeta-41 < 0)
20051  } //for jeta
20053  c3x5->Update();
20054  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
20055  c3x5->Clear();
20056  // clean-up
20057  if (h2CeffHEnegativedirectionReconoiseD5)
20058  delete h2CeffHEnegativedirectionReconoiseD5;
20059  //========================================================================================== 22222219
20060  //======================================================================
20061  //======================================================================1D plot: D vs phi , different eta, depth=6
20062  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
20063  c3x5->Clear();
20064  c3x5->Divide(3, 5);
20065  c3x5->cd(1);
20066  int kcountHEnegativedirectionReconoiseD6 = 1;
20067  TH1F *h2CeffHEnegativedirectionReconoiseD6 = new TH1F("h2CeffHEnegativedirectionReconoiseD6", "", nphi, 0., 72.);
20068 
20069  for (int jeta = 0; jeta < njeta; jeta++) {
20070  // negativedirectionReconoiseD:
20071  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
20072  // for (int i=0;i<ndepth;i++) {
20073  // depth=6
20074  for (int i = 5; i < 6; i++) {
20075  TH1F *HEnegativedirectionReconoiseD6 = (TH1F *)h2CeffHEnegativedirectionReconoiseD6->Clone("twod1");
20076 
20077  float ccctest = 0; // to avoid empty massive elements
20078  for (int jphi = 0; jphi < nphi; jphi++) {
20079  double ccc1 = reconoisevariancehe[i][jeta][jphi];
20080  if (areconoisehe[i][jeta][jphi] > 0.) {
20081  HEnegativedirectionReconoiseD6->Fill(jphi, ccc1);
20082  ccctest = 1.; //HEnegativedirectionReconoiseD6->SetBinError(i,0.01);
20083  }
20084  } // for jphi
20085  if (ccctest > 0.) {
20086  //cout<<"1919 kcountHEnegativedirectionReconoiseD6 = "<<kcountHEnegativedirectionReconoiseD6 <<" jeta-41= "<< jeta-41 <<endl;
20087  c3x5->cd(kcountHEnegativedirectionReconoiseD6);
20088  HEnegativedirectionReconoiseD6->SetMarkerStyle(20);
20089  HEnegativedirectionReconoiseD6->SetMarkerSize(0.4);
20090  HEnegativedirectionReconoiseD6->GetYaxis()->SetLabelSize(0.04);
20091  HEnegativedirectionReconoiseD6->SetXTitle("HEnegativedirectionReconoiseD6 \b");
20092  HEnegativedirectionReconoiseD6->SetMarkerColor(2);
20093  HEnegativedirectionReconoiseD6->SetLineColor(0);
20094  gPad->SetGridy();
20095  gPad->SetGridx();
20096  // gPad->SetLogy();
20097  if (kcountHEnegativedirectionReconoiseD6 == 1)
20098  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
20099  if (kcountHEnegativedirectionReconoiseD6 == 2)
20100  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
20101  if (kcountHEnegativedirectionReconoiseD6 == 3)
20102  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
20103  if (kcountHEnegativedirectionReconoiseD6 == 4)
20104  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
20105  if (kcountHEnegativedirectionReconoiseD6 == 5)
20106  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
20107  if (kcountHEnegativedirectionReconoiseD6 == 6)
20108  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
20109  if (kcountHEnegativedirectionReconoiseD6 == 7)
20110  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
20111  if (kcountHEnegativedirectionReconoiseD6 == 8)
20112  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
20113  if (kcountHEnegativedirectionReconoiseD6 == 9)
20114  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
20115  if (kcountHEnegativedirectionReconoiseD6 == 10)
20116  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
20117  HEnegativedirectionReconoiseD6->Draw("Error");
20118  kcountHEnegativedirectionReconoiseD6++;
20119  if (kcountHEnegativedirectionReconoiseD6 > 10)
20120  break; // 4x6 = 24
20121  } //ccctest>0
20122 
20123  } // for i
20124  } //if(jeta-41 < 0)
20125  } //for jeta
20127  c3x5->Update();
20128  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
20129  c3x5->Clear();
20130  // clean-up
20131  if (h2CeffHEnegativedirectionReconoiseD6)
20132  delete h2CeffHEnegativedirectionReconoiseD6;
20133  //========================================================================================== 22222220
20134  //======================================================================
20135  //======================================================================1D plot: D vs phi , different eta, depth=7
20136  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
20137  c3x5->Clear();
20138  c3x5->Divide(3, 5);
20139  c3x5->cd(1);
20140  int kcountHEnegativedirectionReconoiseD7 = 1;
20141  TH1F *h2CeffHEnegativedirectionReconoiseD7 = new TH1F("h2CeffHEnegativedirectionReconoiseD7", "", nphi, 0., 72.);
20142 
20143  for (int jeta = 0; jeta < njeta; jeta++) {
20144  // negativedirectionReconoiseD:
20145  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
20146  // for (int i=0;i<ndepth;i++) {
20147  // depth=7
20148  for (int i = 6; i < 7; i++) {
20149  TH1F *HEnegativedirectionReconoiseD7 = (TH1F *)h2CeffHEnegativedirectionReconoiseD7->Clone("twod1");
20150 
20151  float ccctest = 0; // to avoid empty massive elements
20152  for (int jphi = 0; jphi < nphi; jphi++) {
20153  double ccc1 = reconoisevariancehe[i][jeta][jphi];
20154  if (areconoisehe[i][jeta][jphi] > 0.) {
20155  HEnegativedirectionReconoiseD7->Fill(jphi, ccc1);
20156  ccctest = 1.; //HEnegativedirectionReconoiseD7->SetBinError(i,0.01);
20157  }
20158  } // for jphi
20159  if (ccctest != 0.) {
20160  //cout<<"2020 kcountHEnegativedirectionReconoiseD7 = "<<kcountHEnegativedirectionReconoiseD7 <<" jeta-41= "<< jeta-41 <<endl;
20161  c3x5->cd(kcountHEnegativedirectionReconoiseD7);
20162  HEnegativedirectionReconoiseD7->SetMarkerStyle(20);
20163  HEnegativedirectionReconoiseD7->SetMarkerSize(0.4);
20164  HEnegativedirectionReconoiseD7->GetYaxis()->SetLabelSize(0.04);
20165  HEnegativedirectionReconoiseD7->SetXTitle("HEnegativedirectionReconoiseD7 \b");
20166  HEnegativedirectionReconoiseD7->SetMarkerColor(2);
20167  HEnegativedirectionReconoiseD7->SetLineColor(0);
20168  gPad->SetGridy();
20169  gPad->SetGridx();
20170  // gPad->SetLogy();
20171  if (kcountHEnegativedirectionReconoiseD7 == 1)
20172  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
20173  if (kcountHEnegativedirectionReconoiseD7 == 2)
20174  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
20175  if (kcountHEnegativedirectionReconoiseD7 == 3)
20176  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
20177  HEnegativedirectionReconoiseD7->Draw("Error");
20178  kcountHEnegativedirectionReconoiseD7++;
20179  if (kcountHEnegativedirectionReconoiseD7 > 3)
20180  break; // 4x6 = 24
20181  } //ccctest>0
20182 
20183  } // for i
20184  } //if(jeta-41 < 0)
20185  } //for jeta
20187  c3x5->Update();
20188  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
20189  c3x5->Clear();
20190  // clean-up
20191  if (h2CeffHEnegativedirectionReconoiseD7)
20192  delete h2CeffHEnegativedirectionReconoiseD7;
20193  //===================================================================== END of Reconoise HE for phi-symmetry
20194  //===================================================================== END of Reconoise HE for phi-symmetry
20195  //===================================================================== END of Reconoise HE for phi-symmetry
20199  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
20200  //ndepth = k_max[5];
20201  ndepth = 2;
20202  double areconoiseHF[ndepth][njeta][njphi];
20203  double breconoiseHF[ndepth][njeta][njphi];
20204  double reconoisevarianceHF[ndepth][njeta][njphi];
20205 
20206  TH2F *recNoiseEnergy1HF1 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HF1");
20207  TH2F *recNoiseEnergy0HF1 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HF1");
20208  TH2F *recNoiseEnergyHF1 = (TH2F *)recNoiseEnergy1HF1->Clone("recNoiseEnergyHF1");
20209  recNoiseEnergyHF1->Divide(recNoiseEnergy1HF1, recNoiseEnergy0HF1, 1, 1, "B");
20210  TH2F *recNoiseEnergy1HF2 = (TH2F *)hfile->Get("h_recNoiseEnergy1_HF2");
20211  TH2F *recNoiseEnergy0HF2 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HF2");
20212  TH2F *recNoiseEnergyHF2 = (TH2F *)recNoiseEnergy1HF2->Clone("recNoiseEnergyHF2");
20213  recNoiseEnergyHF2->Divide(recNoiseEnergy1HF2, recNoiseEnergy0HF2, 1, 1, "B");
20214  //====================================================================== PHI normalization & put R into massive areconoiseHF
20215  for (int jeta = 0; jeta < njeta; jeta++) {
20216  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20217  //preparation for PHI normalization:
20218  double sumreconoiseHF0 = 0;
20219  int nsumreconoiseHF0 = 0;
20220  double sumreconoiseHF1 = 0;
20221  int nsumreconoiseHF1 = 0;
20222  for (int jphi = 0; jphi < njphi; jphi++) {
20223  areconoiseHF[0][jeta][jphi] = recNoiseEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
20224  areconoiseHF[1][jeta][jphi] = recNoiseEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
20225  breconoiseHF[0][jeta][jphi] = recNoiseEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
20226  breconoiseHF[1][jeta][jphi] = recNoiseEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
20227  sumreconoiseHF0 += areconoiseHF[0][jeta][jphi];
20228  ++nsumreconoiseHF0;
20229  sumreconoiseHF1 += areconoiseHF[1][jeta][jphi];
20230  ++nsumreconoiseHF1;
20231  } // phi
20232 
20233  // PHI normalization for DIF:
20234  for (int jphi = 0; jphi < njphi; jphi++) {
20235  if (sumreconoiseHF0 != 0.)
20236  breconoiseHF[0][jeta][jphi] -= (sumreconoiseHF0 / nsumreconoiseHF0);
20237  if (sumreconoiseHF1 != 0.)
20238  breconoiseHF[1][jeta][jphi] -= (sumreconoiseHF1 / nsumreconoiseHF1);
20239  } // phi
20240 
20241  // PHI normalization for R:
20242  for (int jphi = 0; jphi < njphi; jphi++) {
20243  if (sumreconoiseHF0 != 0.)
20244  areconoiseHF[0][jeta][jphi] /= (sumreconoiseHF0 / nsumreconoiseHF0);
20245  if (sumreconoiseHF1 != 0.)
20246  areconoiseHF[1][jeta][jphi] /= (sumreconoiseHF1 / nsumreconoiseHF1);
20247  } // phi
20248 
20249  } // jeta-41
20250  } //eta
20252 
20253  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HF
20254  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
20255  //======================================================================
20256  //======================================================================
20257  // cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
20258  c2x1->Clear();
20260  c2x1->Divide(2, 1);
20261  c2x1->cd(1);
20262  TH2F *GefzRreconoiseHF42D = new TH2F("GefzRreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
20263  TH2F *GefzRreconoiseHF42D0 = new TH2F("GefzRreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
20264  TH2F *GefzRreconoiseHF42DF = (TH2F *)GefzRreconoiseHF42D0->Clone("GefzRreconoiseHF42DF");
20265  for (int i = 0; i < ndepth; i++) {
20266  for (int jeta = 0; jeta < neta; jeta++) {
20267  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20268  for (int jphi = 0; jphi < nphi; jphi++) {
20269  double ccc1 = areconoiseHF[i][jeta][jphi];
20270  int k2plot = jeta - 41;
20271  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
20272  if (ccc1 != 0.) {
20273  GefzRreconoiseHF42D->Fill(kkk, jphi, ccc1);
20274  GefzRreconoiseHF42D0->Fill(kkk, jphi, 1.);
20275  }
20276  }
20277  }
20278  }
20279  }
20280  GefzRreconoiseHF42DF->Divide(GefzRreconoiseHF42D, GefzRreconoiseHF42D0, 1, 1, "B"); // average A
20281  gPad->SetGridy();
20282  gPad->SetGridx(); // gPad->SetLogz();
20283  GefzRreconoiseHF42DF->SetXTitle("<R>_depth #eta \b");
20284  GefzRreconoiseHF42DF->SetYTitle(" #phi \b");
20285  GefzRreconoiseHF42DF->Draw("COLZ");
20286 
20287  c2x1->cd(2);
20288  TH1F *energyhitNoise_HF = (TH1F *)hfile->Get("h_energyhitNoise_HF");
20289  energyhitNoise_HF->SetMarkerStyle(20);
20290  energyhitNoise_HF->SetMarkerSize(0.4);
20291  energyhitNoise_HF->GetYaxis()->SetLabelSize(0.04);
20292  energyhitNoise_HF->SetXTitle("energyhitNoise_HF \b");
20293  energyhitNoise_HF->SetMarkerColor(2);
20294  energyhitNoise_HF->SetLineColor(0);
20295  gPad->SetGridy();
20296  gPad->SetGridx();
20297  energyhitNoise_HF->Draw("Error");
20298 
20300  c2x1->Update();
20301  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHF.png");
20302  c2x1->Clear();
20303  // clean-up
20304  if (GefzRreconoiseHF42D)
20305  delete GefzRreconoiseHF42D;
20306  if (GefzRreconoiseHF42D0)
20307  delete GefzRreconoiseHF42D0;
20308  if (GefzRreconoiseHF42DF)
20309  delete GefzRreconoiseHF42DF;
20310  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
20311  //======================================================================
20312  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
20313  c1x1->Clear();
20315  c1x1->Divide(1, 1);
20316  c1x1->cd(1);
20317  TH1F *GefzRreconoiseHF41D = new TH1F("GefzRreconoiseHF41D", "", nphi, 0., 72.);
20318  TH1F *GefzRreconoiseHF41D0 = new TH1F("GefzRreconoiseHF41D0", "", nphi, 0., 72.);
20319  TH1F *GefzRreconoiseHF41DF = (TH1F *)GefzRreconoiseHF41D0->Clone("GefzRreconoiseHF41DF");
20320  for (int jphi = 0; jphi < nphi; jphi++) {
20321  for (int jeta = 0; jeta < neta; jeta++) {
20322  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20323  for (int i = 0; i < ndepth; i++) {
20324  double ccc1 = areconoiseHF[i][jeta][jphi];
20325  if (ccc1 != 0.) {
20326  GefzRreconoiseHF41D->Fill(jphi, ccc1);
20327  GefzRreconoiseHF41D0->Fill(jphi, 1.);
20328  }
20329  }
20330  }
20331  }
20332  }
20333  GefzRreconoiseHF41DF->Divide(GefzRreconoiseHF41D, GefzRreconoiseHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
20334  GefzRreconoiseHF41D0->Sumw2();
20335  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHF41DF->SetBinError(jphi,0.01);}
20336  gPad->SetGridy();
20337  gPad->SetGridx(); // gPad->SetLogz();
20338  GefzRreconoiseHF41DF->SetMarkerStyle(20);
20339  GefzRreconoiseHF41DF->SetMarkerSize(1.4);
20340  GefzRreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
20341  GefzRreconoiseHF41DF->SetXTitle("#phi \b");
20342  GefzRreconoiseHF41DF->SetYTitle(" <R> \b");
20343  GefzRreconoiseHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
20344  GefzRreconoiseHF41DF->SetMarkerColor(4);
20345  GefzRreconoiseHF41DF->SetLineColor(
20346  4); // GefzRreconoiseHF41DF->SetMinimum(0.8); // GefzRreconoiseHF41DF->SetMaximum(1.000);
20347  GefzRreconoiseHF41DF->Draw("Error");
20349  c1x1->Update();
20350  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHF.png");
20351  c1x1->Clear();
20352  // clean-up
20353  if (GefzRreconoiseHF41D)
20354  delete GefzRreconoiseHF41D;
20355  if (GefzRreconoiseHF41D0)
20356  delete GefzRreconoiseHF41D0;
20357  if (GefzRreconoiseHF41DF)
20358  delete GefzRreconoiseHF41DF;
20359  //========================================================================================== 4
20360  //======================================================================
20361  //======================================================================1D plot: R vs phi , different eta, depth=1
20362  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
20363  c3x5->Clear();
20365  c3x5->Divide(3, 5);
20366  c3x5->cd(1);
20367  int kcountHFpositivedirectionReconoise1 = 1;
20368  TH1F *h2CeffHFpositivedirectionReconoise1 = new TH1F("h2CeffHFpositivedirectionReconoise1", "", nphi, 0., 72.);
20369  for (int jeta = 0; jeta < njeta; jeta++) {
20370  // positivedirectionReconoise:
20371  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20372  // for (int i=0;i<ndepth;i++) {
20373  // depth=1
20374  for (int i = 0; i < 1; i++) {
20375  TH1F *HFpositivedirectionReconoise1 = (TH1F *)h2CeffHFpositivedirectionReconoise1->Clone("twod1");
20376  float ccctest = 0; // to avoid empty massive elements
20377  for (int jphi = 0; jphi < nphi; jphi++) {
20378  double ccc1 = areconoiseHF[i][jeta][jphi];
20379  if (ccc1 != 0.) {
20380  HFpositivedirectionReconoise1->Fill(jphi, ccc1);
20381  ccctest = 1.; //HFpositivedirectionReconoise1->SetBinError(i,0.01);
20382  }
20383  } // for jphi
20384  if (ccctest > 0.) {
20385  // cout<<"444 kcountHFpositivedirectionReconoise1 = "<<kcountHFpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
20386  c3x5->cd(kcountHFpositivedirectionReconoise1);
20387  HFpositivedirectionReconoise1->SetMarkerStyle(20);
20388  HFpositivedirectionReconoise1->SetMarkerSize(0.4);
20389  HFpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
20390  HFpositivedirectionReconoise1->SetXTitle("HFpositivedirectionReconoise1 \b");
20391  HFpositivedirectionReconoise1->SetMarkerColor(2);
20392  HFpositivedirectionReconoise1->SetLineColor(0);
20393  gPad->SetGridy();
20394  gPad->SetGridx();
20395  // gPad->SetLogy();
20396  if (kcountHFpositivedirectionReconoise1 == 1)
20397  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
20398  if (kcountHFpositivedirectionReconoise1 == 2)
20399  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
20400  if (kcountHFpositivedirectionReconoise1 == 3)
20401  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
20402  if (kcountHFpositivedirectionReconoise1 == 4)
20403  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
20404  if (kcountHFpositivedirectionReconoise1 == 5)
20405  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
20406  if (kcountHFpositivedirectionReconoise1 == 6)
20407  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
20408  if (kcountHFpositivedirectionReconoise1 == 7)
20409  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
20410  if (kcountHFpositivedirectionReconoise1 == 8)
20411  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
20412  if (kcountHFpositivedirectionReconoise1 == 9)
20413  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
20414  if (kcountHFpositivedirectionReconoise1 == 10)
20415  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
20416  if (kcountHFpositivedirectionReconoise1 == 11)
20417  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
20418  if (kcountHFpositivedirectionReconoise1 == 12)
20419  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
20420  if (kcountHFpositivedirectionReconoise1 == 13)
20421  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
20422  HFpositivedirectionReconoise1->Draw("Error");
20423  kcountHFpositivedirectionReconoise1++;
20424  if (kcountHFpositivedirectionReconoise1 > 13)
20425  break; //
20426  } //ccctest>0
20427 
20428  } // for i
20429  } //if(jeta-41 >= 28 && jeta-41 <= 40
20430  } //for jeta
20432  c3x5->Update();
20433  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
20434  c3x5->Clear();
20435  // clean-up
20436  if (h2CeffHFpositivedirectionReconoise1)
20437  delete h2CeffHFpositivedirectionReconoise1;
20438 
20439  //========================================================================================== 5
20440  //======================================================================
20441  //======================================================================1D plot: R vs phi , different eta, depth=2
20442  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
20443  c3x5->Clear();
20445  c3x5->Divide(3, 5);
20446  c3x5->cd(1);
20447  int kcountHFpositivedirectionReconoise2 = 1;
20448  TH1F *h2CeffHFpositivedirectionReconoise2 = new TH1F("h2CeffHFpositivedirectionReconoise2", "", nphi, 0., 72.);
20449  for (int jeta = 0; jeta < njeta; jeta++) {
20450  // positivedirectionReconoise:
20451  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20452  // for (int i=0;i<ndepth;i++) {
20453  // depth=2
20454  for (int i = 1; i < 2; i++) {
20455  TH1F *HFpositivedirectionReconoise2 = (TH1F *)h2CeffHFpositivedirectionReconoise2->Clone("twod1");
20456  float ccctest = 0; // to avoid empty massive elements
20457  for (int jphi = 0; jphi < nphi; jphi++) {
20458  double ccc1 = areconoiseHF[i][jeta][jphi];
20459  if (ccc1 != 0.) {
20460  HFpositivedirectionReconoise2->Fill(jphi, ccc1);
20461  ccctest = 1.; //HFpositivedirectionReconoise2->SetBinError(i,0.01);
20462  }
20463  } // for jphi
20464  if (ccctest > 0.) {
20465  //cout<<"555 kcountHFpositivedirectionReconoise2 = "<<kcountHFpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
20466  c3x5->cd(kcountHFpositivedirectionReconoise2);
20467  HFpositivedirectionReconoise2->SetMarkerStyle(20);
20468  HFpositivedirectionReconoise2->SetMarkerSize(0.4);
20469  HFpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
20470  HFpositivedirectionReconoise2->SetXTitle("HFpositivedirectionReconoise2 \b");
20471  HFpositivedirectionReconoise2->SetMarkerColor(2);
20472  HFpositivedirectionReconoise2->SetLineColor(0);
20473  gPad->SetGridy();
20474  gPad->SetGridx();
20475  // gPad->SetLogy();
20476  if (kcountHFpositivedirectionReconoise2 == 1)
20477  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
20478  if (kcountHFpositivedirectionReconoise2 == 2)
20479  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
20480  if (kcountHFpositivedirectionReconoise2 == 3)
20481  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
20482  if (kcountHFpositivedirectionReconoise2 == 4)
20483  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
20484  if (kcountHFpositivedirectionReconoise2 == 5)
20485  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
20486  if (kcountHFpositivedirectionReconoise2 == 6)
20487  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
20488  if (kcountHFpositivedirectionReconoise2 == 7)
20489  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
20490  if (kcountHFpositivedirectionReconoise2 == 8)
20491  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
20492  if (kcountHFpositivedirectionReconoise2 == 9)
20493  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
20494  if (kcountHFpositivedirectionReconoise2 == 10)
20495  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
20496  if (kcountHFpositivedirectionReconoise2 == 11)
20497  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
20498  if (kcountHFpositivedirectionReconoise2 == 12)
20499  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
20500  if (kcountHFpositivedirectionReconoise2 == 13)
20501  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
20502  HFpositivedirectionReconoise2->Draw("Error");
20503  kcountHFpositivedirectionReconoise2++;
20504  if (kcountHFpositivedirectionReconoise2 > 13)
20505  break; // 4x6 = 24
20506  } //ccctest>0
20507 
20508  } // for i
20509  } //if(jeta-41 >= 28 && jeta-41 <= 40)
20510  } //for jeta
20512  c3x5->Update();
20513  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
20514  c3x5->Clear();
20515  // clean-up
20516  if (h2CeffHFpositivedirectionReconoise2)
20517  delete h2CeffHFpositivedirectionReconoise2;
20518 
20519  //========================================================================================== 1111114
20520  //======================================================================
20521  //======================================================================1D plot: R vs phi , different eta, depth=1
20522  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
20523  c3x5->Clear();
20525  c3x5->Divide(3, 5);
20526  c3x5->cd(1);
20527  int kcountHFnegativedirectionReconoise1 = 1;
20528  TH1F *h2CeffHFnegativedirectionReconoise1 = new TH1F("h2CeffHFnegativedirectionReconoise1", "", nphi, 0., 72.);
20529  for (int jeta = 0; jeta < njeta; jeta++) {
20530  // negativedirectionReconoise:
20531  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
20532  // for (int i=0;i<ndepth;i++) {
20533  // depth=1
20534  for (int i = 0; i < 1; i++) {
20535  TH1F *HFnegativedirectionReconoise1 = (TH1F *)h2CeffHFnegativedirectionReconoise1->Clone("twod1");
20536  float ccctest = 0; // to avoid empty massive elements
20537  for (int jphi = 0; jphi < nphi; jphi++) {
20538  double ccc1 = areconoiseHF[i][jeta][jphi];
20539  if (ccc1 != 0.) {
20540  HFnegativedirectionReconoise1->Fill(jphi, ccc1);
20541  ccctest = 1.; //HFnegativedirectionReconoise1->SetBinError(i,0.01);
20542  }
20543  } // for jphi
20544  if (ccctest > 0.) {
20545  // cout<<"444 kcountHFnegativedirectionReconoise1 = "<<kcountHFnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
20546  c3x5->cd(kcountHFnegativedirectionReconoise1);
20547  HFnegativedirectionReconoise1->SetMarkerStyle(20);
20548  HFnegativedirectionReconoise1->SetMarkerSize(0.4);
20549  HFnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
20550  HFnegativedirectionReconoise1->SetXTitle("HFnegativedirectionReconoise1 \b");
20551  HFnegativedirectionReconoise1->SetMarkerColor(2);
20552  HFnegativedirectionReconoise1->SetLineColor(0);
20553  gPad->SetGridy();
20554  gPad->SetGridx();
20555  // gPad->SetLogy();
20556  if (kcountHFnegativedirectionReconoise1 == 1)
20557  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
20558  if (kcountHFnegativedirectionReconoise1 == 2)
20559  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
20560  if (kcountHFnegativedirectionReconoise1 == 3)
20561  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
20562  if (kcountHFnegativedirectionReconoise1 == 4)
20563  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
20564  if (kcountHFnegativedirectionReconoise1 == 5)
20565  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
20566  if (kcountHFnegativedirectionReconoise1 == 6)
20567  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
20568  if (kcountHFnegativedirectionReconoise1 == 7)
20569  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
20570  if (kcountHFnegativedirectionReconoise1 == 8)
20571  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
20572  if (kcountHFnegativedirectionReconoise1 == 9)
20573  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
20574  if (kcountHFnegativedirectionReconoise1 == 10)
20575  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
20576  if (kcountHFnegativedirectionReconoise1 == 11)
20577  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
20578  if (kcountHFnegativedirectionReconoise1 == 12)
20579  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
20580  if (kcountHFnegativedirectionReconoise1 == 13)
20581  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
20582  HFnegativedirectionReconoise1->Draw("Error");
20583  kcountHFnegativedirectionReconoise1++;
20584  if (kcountHFnegativedirectionReconoise1 > 13)
20585  break; //
20586  } //ccctest>0
20587 
20588  } // for i
20589  } //if(jeta-41 >= -41 && jeta-41 <= -29)
20590  } //for jeta
20592  c3x5->Update();
20593  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
20594  c3x5->Clear();
20595  // clean-up
20596  if (h2CeffHFnegativedirectionReconoise1)
20597  delete h2CeffHFnegativedirectionReconoise1;
20598 
20599  //========================================================================================== 1111115
20600  //======================================================================
20601  //======================================================================1D plot: R vs phi , different eta, depth=2
20602  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
20603  c3x5->Clear();
20605  c3x5->Divide(3, 5);
20606  c3x5->cd(1);
20607  int kcountHFnegativedirectionReconoise2 = 1;
20608  TH1F *h2CeffHFnegativedirectionReconoise2 = new TH1F("h2CeffHFnegativedirectionReconoise2", "", nphi, 0., 72.);
20609  for (int jeta = 0; jeta < njeta; jeta++) {
20610  // negativedirectionReconoise:
20611  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
20612  // for (int i=0;i<ndepth;i++) {
20613  // depth=2
20614  for (int i = 1; i < 2; i++) {
20615  TH1F *HFnegativedirectionReconoise2 = (TH1F *)h2CeffHFnegativedirectionReconoise2->Clone("twod1");
20616  float ccctest = 0; // to avoid empty massive elements
20617  for (int jphi = 0; jphi < nphi; jphi++) {
20618  double ccc1 = areconoiseHF[i][jeta][jphi];
20619  if (ccc1 != 0.) {
20620  HFnegativedirectionReconoise2->Fill(jphi, ccc1);
20621  ccctest = 1.; //HFnegativedirectionReconoise2->SetBinError(i,0.01);
20622  }
20623  } // for jphi
20624  if (ccctest > 0.) {
20625  //cout<<"555 kcountHFnegativedirectionReconoise2 = "<<kcountHFnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
20626  c3x5->cd(kcountHFnegativedirectionReconoise2);
20627  HFnegativedirectionReconoise2->SetMarkerStyle(20);
20628  HFnegativedirectionReconoise2->SetMarkerSize(0.4);
20629  HFnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
20630  HFnegativedirectionReconoise2->SetXTitle("HFnegativedirectionReconoise2 \b");
20631  HFnegativedirectionReconoise2->SetMarkerColor(2);
20632  HFnegativedirectionReconoise2->SetLineColor(0);
20633  gPad->SetGridy();
20634  gPad->SetGridx();
20635  // gPad->SetLogy();
20636  if (kcountHFnegativedirectionReconoise2 == 1)
20637  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
20638  if (kcountHFnegativedirectionReconoise2 == 2)
20639  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
20640  if (kcountHFnegativedirectionReconoise2 == 3)
20641  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
20642  if (kcountHFnegativedirectionReconoise2 == 4)
20643  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
20644  if (kcountHFnegativedirectionReconoise2 == 5)
20645  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
20646  if (kcountHFnegativedirectionReconoise2 == 6)
20647  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
20648  if (kcountHFnegativedirectionReconoise2 == 7)
20649  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
20650  if (kcountHFnegativedirectionReconoise2 == 8)
20651  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
20652  if (kcountHFnegativedirectionReconoise2 == 9)
20653  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
20654  if (kcountHFnegativedirectionReconoise2 == 10)
20655  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
20656  if (kcountHFnegativedirectionReconoise2 == 11)
20657  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
20658  if (kcountHFnegativedirectionReconoise2 == 12)
20659  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
20660  if (kcountHFnegativedirectionReconoise2 == 13)
20661  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
20662  HFnegativedirectionReconoise2->Draw("Error");
20663  kcountHFnegativedirectionReconoise2++;
20664  if (kcountHFnegativedirectionReconoise2 > 13)
20665  break; // 4x6 = 24
20666  } //ccctest>0
20667 
20668  } // for i
20669  } //if(jeta-41 >= -41 && jeta-41 <= -29)
20670  } //for jeta
20672  c3x5->Update();
20673  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
20674  c3x5->Clear();
20675  // clean-up
20676  if (h2CeffHFnegativedirectionReconoise2)
20677  delete h2CeffHFnegativedirectionReconoise2;
20678 
20679  //======================================================================================================================
20680  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HF
20681  //------------------------ 2D-eta/phi-plot: DIF, averaged over depthfs
20682  //======================================================================
20683  //======================================================================
20684  // cout<<" DIF2D-eta/phi-plot: DIF, averaged over depthfs *****" <<endl;
20685  c2x1->Clear();
20687  c2x1->Divide(2, 1);
20688  c2x1->cd(1);
20689  TH2F *GefzDIFreconoiseHF42D = new TH2F("GefzDIFreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
20690  TH2F *GefzDIFreconoiseHF42D0 = new TH2F("GefzDIFreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
20691  TH2F *GefzDIFreconoiseHF42DF = (TH2F *)GefzDIFreconoiseHF42D0->Clone("GefzDIFreconoiseHF42DF");
20692  for (int i = 0; i < ndepth; i++) {
20693  for (int jeta = 0; jeta < neta; jeta++) {
20694  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20695  for (int jphi = 0; jphi < nphi; jphi++) {
20696  double ccc1 = breconoiseHF[i][jeta][jphi];
20697  int k2plot = jeta - 41;
20698  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
20699  if (ccc1 != 0.) {
20700  GefzDIFreconoiseHF42D->Fill(kkk, jphi, ccc1);
20701  GefzDIFreconoiseHF42D0->Fill(kkk, jphi, 1.);
20702  }
20703  }
20704  }
20705  }
20706  }
20707  GefzDIFreconoiseHF42DF->Divide(GefzDIFreconoiseHF42D, GefzDIFreconoiseHF42D0, 1, 1, "B"); // average A
20708  gPad->SetGridy();
20709  gPad->SetGridx(); // gPad->SetLogz();
20710  GefzDIFreconoiseHF42DF->SetXTitle("<DIF>_depth #eta \b");
20711  GefzDIFreconoiseHF42DF->SetYTitle(" #phi \b");
20712  GefzDIFreconoiseHF42DF->Draw("COLZ");
20713 
20714  c2x1->cd(2);
20715  // TH1F *energyhitNoiseCut_HF= (TH1F*)hfile->Get("h_energyhitNoiseCut_HF");
20716  // energyhitNoiseCut_HF ->SetMarkerStyle(20);energyhitNoiseCut_HF ->SetMarkerSize(0.4);energyhitNoiseCut_HF ->GetYaxis()->SetLabelSize(0.04);energyhitNoiseCut_HF ->SetXTitle("energyhitNoiseCut_HF \b");energyhitNoiseCut_HF ->SetMarkerColor(2);energyhitNoiseCut_HF ->SetLineColor(0);gPad->SetGridy();gPad->SetGridx();energyhitNoiseCut_HF ->Draw("Error");
20717 
20719  c2x1->Update();
20720  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHF.png");
20721  c2x1->Clear();
20722  // clean-up
20723  if (GefzDIFreconoiseHF42D)
20724  delete GefzDIFreconoiseHF42D;
20725  if (GefzDIFreconoiseHF42D0)
20726  delete GefzDIFreconoiseHF42D0;
20727  if (GefzDIFreconoiseHF42DF)
20728  delete GefzDIFreconoiseHF42DF;
20729  //====================================================================== 1D plot: DIF vs phi , averaged over depthfs & eta
20730  //======================================================================
20731  //cout<<" 1D plot: DIF vs phi , averaged over depthfs & eta *****" <<endl;
20732  c1x1->Clear();
20734  c1x1->Divide(1, 1);
20735  c1x1->cd(1);
20736  TH1F *GefzDIFreconoiseHF41D = new TH1F("GefzDIFreconoiseHF41D", "", nphi, 0., 72.);
20737  TH1F *GefzDIFreconoiseHF41D0 = new TH1F("GefzDIFreconoiseHF41D0", "", nphi, 0., 72.);
20738  TH1F *GefzDIFreconoiseHF41DF = (TH1F *)GefzDIFreconoiseHF41D0->Clone("GefzDIFreconoiseHF41DF");
20739  for (int jphi = 0; jphi < nphi; jphi++) {
20740  for (int jeta = 0; jeta < neta; jeta++) {
20741  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20742  for (int i = 0; i < ndepth; i++) {
20743  double ccc1 = breconoiseHF[i][jeta][jphi];
20744  if (ccc1 != 0.) {
20745  GefzDIFreconoiseHF41D->Fill(jphi, ccc1);
20746  GefzDIFreconoiseHF41D0->Fill(jphi, 1.);
20747  }
20748  }
20749  }
20750  }
20751  }
20752  GefzDIFreconoiseHF41DF->Divide(
20753  GefzDIFreconoiseHF41D, GefzDIFreconoiseHF41D0, 1, 1, "B"); // DIF averaged over depthfs & eta
20754  GefzDIFreconoiseHF41D0->Sumw2();
20755  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHF41DF->SetBinError(jphi,0.01);}
20756  gPad->SetGridy();
20757  gPad->SetGridx(); // gPad->SetLogz();
20758  GefzDIFreconoiseHF41DF->SetMarkerStyle(20);
20759  GefzDIFreconoiseHF41DF->SetMarkerSize(1.4);
20760  GefzDIFreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
20761  GefzDIFreconoiseHF41DF->SetXTitle("#phi \b");
20762  GefzDIFreconoiseHF41DF->SetYTitle(" <DIF> \b");
20763  GefzDIFreconoiseHF41DF->SetZTitle("<DIF>_PHI - AllDepthfs \b");
20764  GefzDIFreconoiseHF41DF->SetMarkerColor(4);
20765  GefzDIFreconoiseHF41DF->SetLineColor(
20766  4); // GefzDIFreconoiseHF41DF->SetMinimum(0.8); // GefzDIFreconoiseHF41DF->SetMaximum(1.000);
20767  GefzDIFreconoiseHF41DF->Draw("Error");
20769  c1x1->Update();
20770  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHF.png");
20771  c1x1->Clear();
20772  // clean-up
20773  if (GefzDIFreconoiseHF41D)
20774  delete GefzDIFreconoiseHF41D;
20775  if (GefzDIFreconoiseHF41D0)
20776  delete GefzDIFreconoiseHF41D0;
20777  if (GefzDIFreconoiseHF41DF)
20778  delete GefzDIFreconoiseHF41DF;
20779  //========================================================================================== 4
20780  //======================================================================
20781  //======================================================================1D plot: DIF vs phi , different eta, depth=1
20782  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
20783  c3x5->Clear();
20785  c3x5->Divide(3, 5);
20786  c3x5->cd(1);
20787  int kcountHFpositivedirectionReconoiseDIF1 = 1;
20788  TH1F *h2CeffHFpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHFpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
20789  for (int jeta = 0; jeta < njeta; jeta++) {
20790  // positivedirectionReconoiseDIF:
20791  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20792  // for (int i=0;i<ndepth;i++) {
20793  // depth=1
20794  for (int i = 0; i < 1; i++) {
20795  TH1F *HFpositivedirectionReconoiseDIF1 = (TH1F *)h2CeffHFpositivedirectionReconoiseDIF1->Clone("twod1");
20796  float ccctest = 0; // to avoid empty massive elements
20797  for (int jphi = 0; jphi < nphi; jphi++) {
20798  double ccc1 = breconoiseHF[i][jeta][jphi];
20799  if (ccc1 != 0.) {
20800  HFpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
20801  ccctest = 1.; //HFpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
20802  }
20803  } // for jphi
20804  if (ccctest > 0.) {
20805  // cout<<"444 kcountHFpositivedirectionReconoiseDIF1 = "<<kcountHFpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
20806  c3x5->cd(kcountHFpositivedirectionReconoiseDIF1);
20807  HFpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
20808  HFpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
20809  HFpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
20810  HFpositivedirectionReconoiseDIF1->SetXTitle("HFpositivedirectionReconoiseDIF1 \b");
20811  HFpositivedirectionReconoiseDIF1->SetMarkerColor(2);
20812  HFpositivedirectionReconoiseDIF1->SetLineColor(0);
20813  gPad->SetGridy();
20814  gPad->SetGridx();
20815  // gPad->SetLogy();
20816  if (kcountHFpositivedirectionReconoiseDIF1 == 1)
20817  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 28; depth = 1 \b");
20818  if (kcountHFpositivedirectionReconoiseDIF1 == 2)
20819  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 29; depth = 1 \b");
20820  if (kcountHFpositivedirectionReconoiseDIF1 == 3)
20821  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 30; depth = 1 \b");
20822  if (kcountHFpositivedirectionReconoiseDIF1 == 4)
20823  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 31; depth = 1 \b");
20824  if (kcountHFpositivedirectionReconoiseDIF1 == 5)
20825  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 32; depth = 1 \b");
20826  if (kcountHFpositivedirectionReconoiseDIF1 == 6)
20827  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 33; depth = 1 \b");
20828  if (kcountHFpositivedirectionReconoiseDIF1 == 7)
20829  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 34; depth = 1 \b");
20830  if (kcountHFpositivedirectionReconoiseDIF1 == 8)
20831  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 35; depth = 1 \b");
20832  if (kcountHFpositivedirectionReconoiseDIF1 == 9)
20833  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 36; depth = 1 \b");
20834  if (kcountHFpositivedirectionReconoiseDIF1 == 10)
20835  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 37; depth = 1 \b");
20836  if (kcountHFpositivedirectionReconoiseDIF1 == 11)
20837  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 38; depth = 1 \b");
20838  if (kcountHFpositivedirectionReconoiseDIF1 == 12)
20839  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 39; depth = 1 \b");
20840  if (kcountHFpositivedirectionReconoiseDIF1 == 13)
20841  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 40; depth = 1 \b");
20842  HFpositivedirectionReconoiseDIF1->Draw("Error");
20843  kcountHFpositivedirectionReconoiseDIF1++;
20844  if (kcountHFpositivedirectionReconoiseDIF1 > 13)
20845  break; //
20846  } //ccctest>0
20847 
20848  } // for i
20849  } //if(jeta-41 >= 28 && jeta-41 <= 40
20850  } //for jeta
20852  c3x5->Update();
20853  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
20854  c3x5->Clear();
20855  // clean-up
20856  if (h2CeffHFpositivedirectionReconoiseDIF1)
20857  delete h2CeffHFpositivedirectionReconoiseDIF1;
20858 
20859  //========================================================================================== 5
20860  //======================================================================
20861  //======================================================================1D plot: R vs phi , different eta, depth=2
20862  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
20863  c3x5->Clear();
20865  c3x5->Divide(3, 5);
20866  c3x5->cd(1);
20867  int kcountHFpositivedirectionReconoiseDIF2 = 1;
20868  TH1F *h2CeffHFpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHFpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
20869  for (int jeta = 0; jeta < njeta; jeta++) {
20870  // positivedirectionReconoiseDIF:
20871  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20872  // for (int i=0;i<ndepth;i++) {
20873  // depth=2
20874  for (int i = 1; i < 2; i++) {
20875  TH1F *HFpositivedirectionReconoiseDIF2 = (TH1F *)h2CeffHFpositivedirectionReconoiseDIF2->Clone("twod1");
20876  float ccctest = 0; // to avoid empty massive elements
20877  for (int jphi = 0; jphi < nphi; jphi++) {
20878  double ccc1 = breconoiseHF[i][jeta][jphi];
20879  if (ccc1 != 0.) {
20880  HFpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
20881  ccctest = 1.; //HFpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
20882  }
20883  } // for jphi
20884  if (ccctest > 0.) {
20885  //cout<<"555 kcountHFpositivedirectionReconoiseDIF2 = "<<kcountHFpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
20886  c3x5->cd(kcountHFpositivedirectionReconoiseDIF2);
20887  HFpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
20888  HFpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
20889  HFpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
20890  HFpositivedirectionReconoiseDIF2->SetXTitle("HFpositivedirectionReconoiseDIF2 \b");
20891  HFpositivedirectionReconoiseDIF2->SetMarkerColor(2);
20892  HFpositivedirectionReconoiseDIF2->SetLineColor(0);
20893  gPad->SetGridy();
20894  gPad->SetGridx();
20895  // gPad->SetLogy();
20896  if (kcountHFpositivedirectionReconoiseDIF2 == 1)
20897  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 28; depth = 2 \b");
20898  if (kcountHFpositivedirectionReconoiseDIF2 == 2)
20899  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 29; depth = 2 \b");
20900  if (kcountHFpositivedirectionReconoiseDIF2 == 3)
20901  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 30; depth = 2 \b");
20902  if (kcountHFpositivedirectionReconoiseDIF2 == 4)
20903  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 31; depth = 2 \b");
20904  if (kcountHFpositivedirectionReconoiseDIF2 == 5)
20905  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 32; depth = 2 \b");
20906  if (kcountHFpositivedirectionReconoiseDIF2 == 6)
20907  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 33; depth = 2 \b");
20908  if (kcountHFpositivedirectionReconoiseDIF2 == 7)
20909  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 34; depth = 2 \b");
20910  if (kcountHFpositivedirectionReconoiseDIF2 == 8)
20911  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 35; depth = 2 \b");
20912  if (kcountHFpositivedirectionReconoiseDIF2 == 9)
20913  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 36; depth = 2 \b");
20914  if (kcountHFpositivedirectionReconoiseDIF2 == 10)
20915  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 37; depth = 2 \b");
20916  if (kcountHFpositivedirectionReconoiseDIF2 == 11)
20917  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 38; depth = 2 \b");
20918  if (kcountHFpositivedirectionReconoiseDIF2 == 12)
20919  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 39; depth = 2 \b");
20920  if (kcountHFpositivedirectionReconoiseDIF2 == 13)
20921  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 40; depth = 2 \b");
20922  HFpositivedirectionReconoiseDIF2->Draw("Error");
20923  kcountHFpositivedirectionReconoiseDIF2++;
20924  if (kcountHFpositivedirectionReconoiseDIF2 > 13)
20925  break; // 4x6 = 24
20926  } //ccctest>0
20927 
20928  } // for i
20929  } //if(jeta-41 >= 28 && jeta-41 <= 40)
20930  } //for jeta
20932  c3x5->Update();
20933  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
20934  c3x5->Clear();
20935  // clean-up
20936  if (h2CeffHFpositivedirectionReconoiseDIF2)
20937  delete h2CeffHFpositivedirectionReconoiseDIF2;
20938 
20939  //========================================================================================== 1111114
20940  //======================================================================
20941  //======================================================================1D plot: DIF vs phi , different eta, depth=1
20942  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
20943  c3x5->Clear();
20945  c3x5->Divide(3, 5);
20946  c3x5->cd(1);
20947  int kcountHFnegativedirectionReconoiseDIF1 = 1;
20948  TH1F *h2CeffHFnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHFnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
20949  for (int jeta = 0; jeta < njeta; jeta++) {
20950  // negativedirectionReconoiseDIF:
20951  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
20952  // for (int i=0;i<ndepth;i++) {
20953  // depth=1
20954  for (int i = 0; i < 1; i++) {
20955  TH1F *HFnegativedirectionReconoiseDIF1 = (TH1F *)h2CeffHFnegativedirectionReconoiseDIF1->Clone("twod1");
20956  float ccctest = 0; // to avoid empty massive elements
20957  for (int jphi = 0; jphi < nphi; jphi++) {
20958  double ccc1 = breconoiseHF[i][jeta][jphi];
20959  if (ccc1 != 0.) {
20960  HFnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
20961  ccctest = 1.; //HFnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
20962  }
20963  } // for jphi
20964  if (ccctest > 0.) {
20965  // cout<<"444 kcountHFnegativedirectionReconoiseDIF1 = "<<kcountHFnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
20966  c3x5->cd(kcountHFnegativedirectionReconoiseDIF1);
20967  HFnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
20968  HFnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
20969  HFnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
20970  HFnegativedirectionReconoiseDIF1->SetXTitle("HFnegativedirectionReconoiseDIF1 \b");
20971  HFnegativedirectionReconoiseDIF1->SetMarkerColor(2);
20972  HFnegativedirectionReconoiseDIF1->SetLineColor(0);
20973  gPad->SetGridy();
20974  gPad->SetGridx();
20975  // gPad->SetLogy();
20976  if (kcountHFnegativedirectionReconoiseDIF1 == 1)
20977  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-41; depth = 1 \b");
20978  if (kcountHFnegativedirectionReconoiseDIF1 == 2)
20979  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-40; depth = 1 \b");
20980  if (kcountHFnegativedirectionReconoiseDIF1 == 3)
20981  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-39; depth = 1 \b");
20982  if (kcountHFnegativedirectionReconoiseDIF1 == 4)
20983  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-38; depth = 1 \b");
20984  if (kcountHFnegativedirectionReconoiseDIF1 == 5)
20985  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-37; depth = 1 \b");
20986  if (kcountHFnegativedirectionReconoiseDIF1 == 6)
20987  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-36; depth = 1 \b");
20988  if (kcountHFnegativedirectionReconoiseDIF1 == 7)
20989  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-35; depth = 1 \b");
20990  if (kcountHFnegativedirectionReconoiseDIF1 == 8)
20991  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-34; depth = 1 \b");
20992  if (kcountHFnegativedirectionReconoiseDIF1 == 9)
20993  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-33; depth = 1 \b");
20994  if (kcountHFnegativedirectionReconoiseDIF1 == 10)
20995  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-32; depth = 1 \b");
20996  if (kcountHFnegativedirectionReconoiseDIF1 == 11)
20997  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-31; depth = 1 \b");
20998  if (kcountHFnegativedirectionReconoiseDIF1 == 12)
20999  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-30; depth = 1 \b");
21000  if (kcountHFnegativedirectionReconoiseDIF1 == 13)
21001  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-29; depth = 1 \b");
21002  HFnegativedirectionReconoiseDIF1->Draw("Error");
21003  kcountHFnegativedirectionReconoiseDIF1++;
21004  if (kcountHFnegativedirectionReconoiseDIF1 > 13)
21005  break; //
21006  } //ccctest>0
21007 
21008  } // for i
21009  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21010  } //for jeta
21012  c3x5->Update();
21013  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
21014  c3x5->Clear();
21015  // clean-up
21016  if (h2CeffHFnegativedirectionReconoiseDIF1)
21017  delete h2CeffHFnegativedirectionReconoiseDIF1;
21018 
21019  //========================================================================================== 1111115
21020  //======================================================================
21021  //======================================================================1D plot: R vs phi , different eta, depth=2
21022  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
21023  c3x5->Clear();
21025  c3x5->Divide(3, 5);
21026  c3x5->cd(1);
21027  int kcountHFnegativedirectionReconoiseDIF2 = 1;
21028  TH1F *h2CeffHFnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHFnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
21029  for (int jeta = 0; jeta < njeta; jeta++) {
21030  // negativedirectionReconoiseDIF:
21031  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
21032  // for (int i=0;i<ndepth;i++) {
21033  // depth=2
21034  for (int i = 1; i < 2; i++) {
21035  TH1F *HFnegativedirectionReconoiseDIF2 = (TH1F *)h2CeffHFnegativedirectionReconoiseDIF2->Clone("twod1");
21036  float ccctest = 0; // to avoid empty massive elements
21037  for (int jphi = 0; jphi < nphi; jphi++) {
21038  double ccc1 = breconoiseHF[i][jeta][jphi];
21039  if (ccc1 != 0.) {
21040  HFnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
21041  ccctest = 1.; //HFnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
21042  }
21043  } // for jphi
21044  if (ccctest > 0.) {
21045  //cout<<"555 kcountHFnegativedirectionReconoiseDIF2 = "<<kcountHFnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
21046  c3x5->cd(kcountHFnegativedirectionReconoiseDIF2);
21047  HFnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
21048  HFnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
21049  HFnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
21050  HFnegativedirectionReconoiseDIF2->SetXTitle("HFnegativedirectionReconoiseDIF2 \b");
21051  HFnegativedirectionReconoiseDIF2->SetMarkerColor(2);
21052  HFnegativedirectionReconoiseDIF2->SetLineColor(0);
21053  gPad->SetGridy();
21054  gPad->SetGridx();
21055  // gPad->SetLogy();
21056  if (kcountHFnegativedirectionReconoiseDIF2 == 1)
21057  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-41; depth = 2 \b");
21058  if (kcountHFnegativedirectionReconoiseDIF2 == 2)
21059  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-40; depth = 2 \b");
21060  if (kcountHFnegativedirectionReconoiseDIF2 == 3)
21061  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-39; depth = 2 \b");
21062  if (kcountHFnegativedirectionReconoiseDIF2 == 4)
21063  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-38; depth = 2 \b");
21064  if (kcountHFnegativedirectionReconoiseDIF2 == 5)
21065  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-37; depth = 2 \b");
21066  if (kcountHFnegativedirectionReconoiseDIF2 == 6)
21067  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-36; depth = 2 \b");
21068  if (kcountHFnegativedirectionReconoiseDIF2 == 7)
21069  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-35; depth = 2 \b");
21070  if (kcountHFnegativedirectionReconoiseDIF2 == 8)
21071  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-34; depth = 2 \b");
21072  if (kcountHFnegativedirectionReconoiseDIF2 == 9)
21073  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-33; depth = 2 \b");
21074  if (kcountHFnegativedirectionReconoiseDIF2 == 10)
21075  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-32; depth = 2 \b");
21076  if (kcountHFnegativedirectionReconoiseDIF2 == 11)
21077  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-31; depth = 2 \b");
21078  if (kcountHFnegativedirectionReconoiseDIF2 == 12)
21079  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-30; depth = 2 \b");
21080  if (kcountHFnegativedirectionReconoiseDIF2 == 13)
21081  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-20; depth = 2 \b");
21082  HFnegativedirectionReconoiseDIF2->Draw("Error");
21083  kcountHFnegativedirectionReconoiseDIF2++;
21084  if (kcountHFnegativedirectionReconoiseDIF2 > 13)
21085  break; // 4x6 = 24
21086  } //ccctest>0
21087 
21088  } // for i
21089  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21090  } //for jeta
21092  c3x5->Update();
21093  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
21094  c3x5->Clear();
21095  // clean-up
21096  if (h2CeffHFnegativedirectionReconoiseDIF2)
21097  delete h2CeffHFnegativedirectionReconoiseDIF2;
21098 
21099  //======================================================================================================================
21100  //======================================================================================================================
21101  //======================================================================================================================
21102  //======================================================================================================================
21103  //======================================================================================================================
21104  //======================================================================================================================
21105  //======================================================================================================================
21106  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
21107 
21108  //cout<<" Start Vaiance: preparation *****" <<endl;
21109  TH2F *reconoiseVariance1HF1 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HF1");
21110  TH2F *reconoiseVariance0HF1 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HF1");
21111  TH2F *reconoiseVarianceHF1 = (TH2F *)reconoiseVariance1HF1->Clone("reconoiseVarianceHF1");
21112  reconoiseVarianceHF1->Divide(reconoiseVariance1HF1, reconoiseVariance0HF1, 1, 1, "B");
21113  TH2F *reconoiseVariance1HF2 = (TH2F *)hfile->Get("h_recNoiseEnergy2_HF2");
21114  TH2F *reconoiseVariance0HF2 = (TH2F *)hfile->Get("h_recNoiseEnergy0_HF2");
21115  TH2F *reconoiseVarianceHF2 = (TH2F *)reconoiseVariance1HF2->Clone("reconoiseVarianceHF2");
21116  reconoiseVarianceHF2->Divide(reconoiseVariance1HF2, reconoiseVariance0HF2, 1, 1, "B");
21117  //cout<<" Vaiance: preparation DONE *****" <<endl;
21118  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevarianceHF
21119  // = sum(R*R)/N - (sum(R)/N)**2
21120  for (int jeta = 0; jeta < njeta; jeta++) {
21121  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
21122  //preparation for PHI normalization:
21123  double sumreconoiseHF0 = 0;
21124  int nsumreconoiseHF0 = 0;
21125  double sumreconoiseHF1 = 0;
21126  int nsumreconoiseHF1 = 0;
21127  for (int jphi = 0; jphi < njphi; jphi++) {
21128  reconoisevarianceHF[0][jeta][jphi] = reconoiseVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
21129  reconoisevarianceHF[1][jeta][jphi] = reconoiseVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
21130  sumreconoiseHF0 += reconoisevarianceHF[0][jeta][jphi];
21131  ++nsumreconoiseHF0;
21132  sumreconoiseHF1 += reconoisevarianceHF[1][jeta][jphi];
21133  ++nsumreconoiseHF1;
21134  } // phi
21135  // PHI normalization :
21136  for (int jphi = 0; jphi < njphi; jphi++) {
21137  if (reconoisevarianceHF[0][jeta][jphi] != 0.)
21138  reconoisevarianceHF[0][jeta][jphi] /= (sumreconoiseHF0 / nsumreconoiseHF0);
21139  if (reconoisevarianceHF[1][jeta][jphi] != 0.)
21140  reconoisevarianceHF[1][jeta][jphi] /= (sumreconoiseHF1 / nsumreconoiseHF1);
21141  } // phi
21142  // reconoisevarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
21143  for (int jphi = 0; jphi < njphi; jphi++) {
21144  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
21145  reconoisevarianceHF[0][jeta][jphi] -= areconoiseHF[0][jeta][jphi] * areconoiseHF[0][jeta][jphi];
21146  reconoisevarianceHF[0][jeta][jphi] = fabs(reconoisevarianceHF[0][jeta][jphi]);
21147  reconoisevarianceHF[1][jeta][jphi] -= areconoiseHF[1][jeta][jphi] * areconoiseHF[1][jeta][jphi];
21148  reconoisevarianceHF[1][jeta][jphi] = fabs(reconoisevarianceHF[1][jeta][jphi]);
21149  }
21150  }
21151  }
21152  //cout<<" Vaiance: DONE*****" <<endl;
21153  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
21154  //======================================================================
21155  //======================================================================
21156  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
21157  c1x1->Clear();
21159  c1x0->Divide(1, 1);
21160  c1x0->cd(1);
21161  TH2F *DefzDreconoiseHF42D = new TH2F("DefzDreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
21162  TH2F *DefzDreconoiseHF42D0 = new TH2F("DefzDreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
21163  TH2F *DefzDreconoiseHF42DF = (TH2F *)DefzDreconoiseHF42D0->Clone("DefzDreconoiseHF42DF");
21164  for (int i = 0; i < ndepth; i++) {
21165  for (int jeta = 0; jeta < neta; jeta++) {
21166  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
21167  for (int jphi = 0; jphi < nphi; jphi++) {
21168  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21169  int k2plot = jeta - 41;
21170  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
21171  if (areconoiseHF[i][jeta][jphi] > 0.) {
21172  DefzDreconoiseHF42D->Fill(kkk, jphi, ccc1);
21173  DefzDreconoiseHF42D0->Fill(kkk, jphi, 1.);
21174  }
21175  }
21176  }
21177  }
21178  }
21179  DefzDreconoiseHF42DF->Divide(DefzDreconoiseHF42D, DefzDreconoiseHF42D0, 1, 1, "B"); // average A
21180  // DefzDreconoiseHF1->Sumw2();
21181  gPad->SetGridy();
21182  gPad->SetGridx(); // gPad->SetLogz();
21183  DefzDreconoiseHF42DF->SetMarkerStyle(20);
21184  DefzDreconoiseHF42DF->SetMarkerSize(0.4);
21185  DefzDreconoiseHF42DF->GetZaxis()->SetLabelSize(0.08);
21186  DefzDreconoiseHF42DF->SetXTitle("<D>_depth #eta \b");
21187  DefzDreconoiseHF42DF->SetYTitle(" #phi \b");
21188  DefzDreconoiseHF42DF->SetZTitle("<D>_depth \b");
21189  DefzDreconoiseHF42DF->SetMarkerColor(2);
21190  DefzDreconoiseHF42DF->SetLineColor(
21191  0); // DefzDreconoiseHF42DF->SetMaximum(1.000); // DefzDreconoiseHF42DF->SetMinimum(1.0);
21192  DefzDreconoiseHF42DF->Draw("COLZ");
21194  c1x0->Update();
21195  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHF.png");
21196  c1x0->Clear();
21197  // clean-up
21198  if (DefzDreconoiseHF42D)
21199  delete DefzDreconoiseHF42D;
21200  if (DefzDreconoiseHF42D0)
21201  delete DefzDreconoiseHF42D0;
21202  if (DefzDreconoiseHF42DF)
21203  delete DefzDreconoiseHF42DF;
21204  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
21205  //======================================================================
21206  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
21207  c1x1->Clear();
21209  c1x1->Divide(1, 1);
21210  c1x1->cd(1);
21211  TH1F *DefzDreconoiseHF41D = new TH1F("DefzDreconoiseHF41D", "", nphi, 0., 72.);
21212  TH1F *DefzDreconoiseHF41D0 = new TH1F("DefzDreconoiseHF41D0", "", nphi, 0., 72.);
21213  TH1F *DefzDreconoiseHF41DF = (TH1F *)DefzDreconoiseHF41D0->Clone("DefzDreconoiseHF41DF");
21214 
21215  for (int jphi = 0; jphi < nphi; jphi++) {
21216  for (int jeta = 0; jeta < neta; jeta++) {
21217  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
21218  for (int i = 0; i < ndepth; i++) {
21219  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21220  if (areconoiseHF[i][jeta][jphi] > 0.) {
21221  DefzDreconoiseHF41D->Fill(jphi, ccc1);
21222  DefzDreconoiseHF41D0->Fill(jphi, 1.);
21223  }
21224  }
21225  }
21226  }
21227  }
21228  // DefzDreconoiseHF41D->Sumw2();DefzDreconoiseHF41D0->Sumw2();
21229 
21230  DefzDreconoiseHF41DF->Divide(DefzDreconoiseHF41D, DefzDreconoiseHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
21231  DefzDreconoiseHF41D0->Sumw2();
21232  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHF41DF->SetBinError(jphi,0.01);}
21233  gPad->SetGridy();
21234  gPad->SetGridx(); // gPad->SetLogz();
21235  DefzDreconoiseHF41DF->SetMarkerStyle(20);
21236  DefzDreconoiseHF41DF->SetMarkerSize(1.4);
21237  DefzDreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
21238  DefzDreconoiseHF41DF->SetXTitle("#phi \b");
21239  DefzDreconoiseHF41DF->SetYTitle(" <D> \b");
21240  DefzDreconoiseHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
21241  DefzDreconoiseHF41DF->SetMarkerColor(4);
21242  DefzDreconoiseHF41DF->SetLineColor(
21243  4); // DefzDreconoiseHF41DF->SetMinimum(0.8); DefzDreconoiseHF41DF->SetMinimum(-0.015);
21244  DefzDreconoiseHF41DF->Draw("Error");
21246  c1x1->Update();
21247  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHF.png");
21248  c1x1->Clear();
21249  // clean-up
21250  if (DefzDreconoiseHF41D)
21251  delete DefzDreconoiseHF41D;
21252  if (DefzDreconoiseHF41D0)
21253  delete DefzDreconoiseHF41D0;
21254  if (DefzDreconoiseHF41DF)
21255  delete DefzDreconoiseHF41DF;
21256  //========================================================================================== 14
21257  //======================================================================
21258  //======================================================================1D plot: D vs phi , different eta, depth=1
21259  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
21260  c3x5->Clear();
21262  c3x5->Divide(3, 5);
21263  c3x5->cd(1);
21264  int kcountHFpositivedirectionReconoiseD1 = 1;
21265  TH1F *h2CeffHFpositivedirectionReconoiseD1 = new TH1F("h2CeffHFpositivedirectionReconoiseD1", "", nphi, 0., 72.);
21266 
21267  for (int jeta = 0; jeta < njeta; jeta++) {
21268  // positivedirectionReconoiseD:
21269  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
21270  // for (int i=0;i<ndepth;i++) {
21271  // depth=1
21272  for (int i = 0; i < 1; i++) {
21273  TH1F *HFpositivedirectionReconoiseD1 = (TH1F *)h2CeffHFpositivedirectionReconoiseD1->Clone("twod1");
21274 
21275  float ccctest = 0; // to avoid empty massive elements
21276  for (int jphi = 0; jphi < nphi; jphi++) {
21277  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21278  if (areconoiseHF[i][jeta][jphi] > 0.) {
21279  HFpositivedirectionReconoiseD1->Fill(jphi, ccc1);
21280  ccctest = 1.; //HFpositivedirectionReconoiseD1->SetBinError(i,0.01);
21281  }
21282  } // for jphi
21283  if (ccctest > 0.) {
21284  //cout<<"1414 kcountHFpositivedirectionReconoiseD1 = "<<kcountHFpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
21285  c3x5->cd(kcountHFpositivedirectionReconoiseD1);
21286  HFpositivedirectionReconoiseD1->SetMarkerStyle(20);
21287  HFpositivedirectionReconoiseD1->SetMarkerSize(0.4);
21288  HFpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
21289  HFpositivedirectionReconoiseD1->SetXTitle("HFpositivedirectionReconoiseD1 \b");
21290  HFpositivedirectionReconoiseD1->SetMarkerColor(2);
21291  HFpositivedirectionReconoiseD1->SetLineColor(0);
21292  gPad->SetGridy();
21293  gPad->SetGridx();
21294  // gPad->SetLogy();
21295  if (kcountHFpositivedirectionReconoiseD1 == 1)
21296  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
21297  if (kcountHFpositivedirectionReconoiseD1 == 2)
21298  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
21299  if (kcountHFpositivedirectionReconoiseD1 == 3)
21300  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
21301  if (kcountHFpositivedirectionReconoiseD1 == 4)
21302  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
21303  if (kcountHFpositivedirectionReconoiseD1 == 5)
21304  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
21305  if (kcountHFpositivedirectionReconoiseD1 == 6)
21306  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
21307  if (kcountHFpositivedirectionReconoiseD1 == 7)
21308  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
21309  if (kcountHFpositivedirectionReconoiseD1 == 8)
21310  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
21311  if (kcountHFpositivedirectionReconoiseD1 == 9)
21312  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
21313  if (kcountHFpositivedirectionReconoiseD1 == 10)
21314  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
21315  if (kcountHFpositivedirectionReconoiseD1 == 11)
21316  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
21317  if (kcountHFpositivedirectionReconoiseD1 == 12)
21318  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
21319  if (kcountHFpositivedirectionReconoiseD1 == 13)
21320  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
21321  HFpositivedirectionReconoiseD1->Draw("Error");
21322  kcountHFpositivedirectionReconoiseD1++;
21323  if (kcountHFpositivedirectionReconoiseD1 > 13)
21324  break; // 4x6 = 24
21325  } //ccctest>0
21326 
21327  } // for i
21328  } //if(jeta-41 >= 28 && jeta-41 <= 40)
21329  } //for jeta
21331  c3x5->Update();
21332  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
21333  c3x5->Clear();
21334  // clean-up
21335  if (h2CeffHFpositivedirectionReconoiseD1)
21336  delete h2CeffHFpositivedirectionReconoiseD1;
21337  //========================================================================================== 15
21338  //======================================================================
21339  //======================================================================1D plot: D vs phi , different eta, depth=2
21340  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
21341  c3x5->Clear();
21342  c3x5->Divide(3, 5);
21343  c3x5->cd(1);
21344  int kcountHFpositivedirectionReconoiseD2 = 1;
21345  TH1F *h2CeffHFpositivedirectionReconoiseD2 = new TH1F("h2CeffHFpositivedirectionReconoiseD2", "", nphi, 0., 72.);
21346 
21347  for (int jeta = 0; jeta < njeta; jeta++) {
21348  // positivedirectionReconoiseD:
21349  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
21350  // for (int i=0;i<ndepth;i++) {
21351  // depth=2
21352  for (int i = 1; i < 2; i++) {
21353  TH1F *HFpositivedirectionReconoiseD2 = (TH1F *)h2CeffHFpositivedirectionReconoiseD2->Clone("twod1");
21354 
21355  float ccctest = 0; // to avoid empty massive elements
21356  for (int jphi = 0; jphi < nphi; jphi++) {
21357  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21358  if (areconoiseHF[i][jeta][jphi] > 0.) {
21359  HFpositivedirectionReconoiseD2->Fill(jphi, ccc1);
21360  ccctest = 1.; //HFpositivedirectionReconoiseD2->SetBinError(i,0.01);
21361  }
21362  } // for jphi
21363  if (ccctest > 0.) {
21364  //cout<<"1515 kcountHFpositivedirectionReconoiseD2 = "<<kcountHFpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
21365  c3x5->cd(kcountHFpositivedirectionReconoiseD2);
21366  HFpositivedirectionReconoiseD2->SetMarkerStyle(20);
21367  HFpositivedirectionReconoiseD2->SetMarkerSize(0.4);
21368  HFpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
21369  HFpositivedirectionReconoiseD2->SetXTitle("HFpositivedirectionReconoiseD2 \b");
21370  HFpositivedirectionReconoiseD2->SetMarkerColor(2);
21371  HFpositivedirectionReconoiseD2->SetLineColor(0);
21372  gPad->SetGridy();
21373  gPad->SetGridx();
21374  // gPad->SetLogy();
21375  if (kcountHFpositivedirectionReconoiseD2 == 1)
21376  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
21377  if (kcountHFpositivedirectionReconoiseD2 == 2)
21378  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
21379  if (kcountHFpositivedirectionReconoiseD2 == 3)
21380  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
21381  if (kcountHFpositivedirectionReconoiseD2 == 4)
21382  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
21383  if (kcountHFpositivedirectionReconoiseD2 == 5)
21384  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
21385  if (kcountHFpositivedirectionReconoiseD2 == 6)
21386  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
21387  if (kcountHFpositivedirectionReconoiseD2 == 7)
21388  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
21389  if (kcountHFpositivedirectionReconoiseD2 == 8)
21390  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
21391  if (kcountHFpositivedirectionReconoiseD2 == 9)
21392  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
21393  if (kcountHFpositivedirectionReconoiseD2 == 10)
21394  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
21395  if (kcountHFpositivedirectionReconoiseD2 == 11)
21396  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
21397  if (kcountHFpositivedirectionReconoiseD2 == 12)
21398  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
21399  if (kcountHFpositivedirectionReconoiseD2 == 13)
21400  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
21401  HFpositivedirectionReconoiseD2->Draw("Error");
21402  kcountHFpositivedirectionReconoiseD2++;
21403  if (kcountHFpositivedirectionReconoiseD2 > 13)
21404  break; // 4x6 = 24
21405  } //ccctest>0
21406 
21407  } // for i
21408  } //if(jeta-41 >= 28 && jeta-41 <= 40)
21409  } //for jeta
21411  c3x5->Update();
21412  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
21413  c3x5->Clear();
21414  // clean-up
21415  if (h2CeffHFpositivedirectionReconoiseD2)
21416  delete h2CeffHFpositivedirectionReconoiseD2;
21417  //========================================================================================== 22222214
21418  //======================================================================
21419  //======================================================================1D plot: D vs phi , different eta, depth=1
21420  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
21421  c3x5->Clear();
21423  c3x5->Divide(3, 5);
21424  c3x5->cd(1);
21425  int kcountHFnegativedirectionReconoiseD1 = 1;
21426  TH1F *h2CeffHFnegativedirectionReconoiseD1 = new TH1F("h2CeffHFnegativedirectionReconoiseD1", "", nphi, 0., 72.);
21427 
21428  for (int jeta = 0; jeta < njeta; jeta++) {
21429  // negativedirectionReconoiseD:
21430  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
21431  // for (int i=0;i<ndepth;i++) {
21432  // depth=1
21433  for (int i = 0; i < 1; i++) {
21434  TH1F *HFnegativedirectionReconoiseD1 = (TH1F *)h2CeffHFnegativedirectionReconoiseD1->Clone("twod1");
21435 
21436  float ccctest = 0; // to avoid empty massive elements
21437  for (int jphi = 0; jphi < nphi; jphi++) {
21438  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21439  if (areconoiseHF[i][jeta][jphi] > 0.) {
21440  HFnegativedirectionReconoiseD1->Fill(jphi, ccc1);
21441  ccctest = 1.; //HFnegativedirectionReconoiseD1->SetBinError(i,0.01);
21442  }
21443  } // for jphi
21444  if (ccctest > 0.) {
21445  //cout<<"1414 kcountHFnegativedirectionReconoiseD1 = "<<kcountHFnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
21446  c3x5->cd(kcountHFnegativedirectionReconoiseD1);
21447  HFnegativedirectionReconoiseD1->SetMarkerStyle(20);
21448  HFnegativedirectionReconoiseD1->SetMarkerSize(0.4);
21449  HFnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
21450  HFnegativedirectionReconoiseD1->SetXTitle("HFnegativedirectionReconoiseD1 \b");
21451  HFnegativedirectionReconoiseD1->SetMarkerColor(2);
21452  HFnegativedirectionReconoiseD1->SetLineColor(0);
21453  gPad->SetGridy();
21454  gPad->SetGridx();
21455  // gPad->SetLogy();
21456  if (kcountHFnegativedirectionReconoiseD1 == 1)
21457  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
21458  if (kcountHFnegativedirectionReconoiseD1 == 2)
21459  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
21460  if (kcountHFnegativedirectionReconoiseD1 == 3)
21461  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
21462  if (kcountHFnegativedirectionReconoiseD1 == 4)
21463  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
21464  if (kcountHFnegativedirectionReconoiseD1 == 5)
21465  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
21466  if (kcountHFnegativedirectionReconoiseD1 == 6)
21467  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
21468  if (kcountHFnegativedirectionReconoiseD1 == 7)
21469  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
21470  if (kcountHFnegativedirectionReconoiseD1 == 8)
21471  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
21472  if (kcountHFnegativedirectionReconoiseD1 == 9)
21473  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
21474  if (kcountHFnegativedirectionReconoiseD1 == 10)
21475  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
21476  if (kcountHFnegativedirectionReconoiseD1 == 11)
21477  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
21478  if (kcountHFnegativedirectionReconoiseD1 == 12)
21479  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
21480  if (kcountHFnegativedirectionReconoiseD1 == 13)
21481  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
21482  HFnegativedirectionReconoiseD1->Draw("Error");
21483  kcountHFnegativedirectionReconoiseD1++;
21484  if (kcountHFnegativedirectionReconoiseD1 > 13)
21485  break; // 4x6 = 24
21486  } //ccctest>0
21487 
21488  } // for i
21489  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21490  } //for jeta
21492  c3x5->Update();
21493  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
21494  c3x5->Clear();
21495  // clean-up
21496  if (h2CeffHFnegativedirectionReconoiseD1)
21497  delete h2CeffHFnegativedirectionReconoiseD1;
21498  //========================================================================================== 22222215
21499  //======================================================================
21500  //======================================================================1D plot: D vs phi , different eta, depth=2
21501  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
21502  c3x5->Clear();
21503  c3x5->Divide(3, 5);
21504  c3x5->cd(1);
21505  int kcountHFnegativedirectionReconoiseD2 = 1;
21506  TH1F *h2CeffHFnegativedirectionReconoiseD2 = new TH1F("h2CeffHFnegativedirectionReconoiseD2", "", nphi, 0., 72.);
21507 
21508  for (int jeta = 0; jeta < njeta; jeta++) {
21509  // negativedirectionReconoiseD:
21510  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
21511  // for (int i=0;i<ndepth;i++) {
21512  // depth=2
21513  for (int i = 1; i < 2; i++) {
21514  TH1F *HFnegativedirectionReconoiseD2 = (TH1F *)h2CeffHFnegativedirectionReconoiseD2->Clone("twod1");
21515 
21516  float ccctest = 0; // to avoid empty massive elements
21517  for (int jphi = 0; jphi < nphi; jphi++) {
21518  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21519  if (areconoiseHF[i][jeta][jphi] > 0.) {
21520  HFnegativedirectionReconoiseD2->Fill(jphi, ccc1);
21521  ccctest = 1.; //HFnegativedirectionReconoiseD2->SetBinError(i,0.01);
21522  }
21523  } // for jphi
21524  if (ccctest > 0.) {
21525  //cout<<"1515 kcountHFnegativedirectionReconoiseD2 = "<<kcountHFnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
21526  c3x5->cd(kcountHFnegativedirectionReconoiseD2);
21527  HFnegativedirectionReconoiseD2->SetMarkerStyle(20);
21528  HFnegativedirectionReconoiseD2->SetMarkerSize(0.4);
21529  HFnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
21530  HFnegativedirectionReconoiseD2->SetXTitle("HFnegativedirectionReconoiseD2 \b");
21531  HFnegativedirectionReconoiseD2->SetMarkerColor(2);
21532  HFnegativedirectionReconoiseD2->SetLineColor(0);
21533  gPad->SetGridy();
21534  gPad->SetGridx();
21535  // gPad->SetLogy();
21536  if (kcountHFnegativedirectionReconoiseD2 == 1)
21537  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
21538  if (kcountHFnegativedirectionReconoiseD2 == 2)
21539  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
21540  if (kcountHFnegativedirectionReconoiseD2 == 3)
21541  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
21542  if (kcountHFnegativedirectionReconoiseD2 == 4)
21543  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
21544  if (kcountHFnegativedirectionReconoiseD2 == 5)
21545  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
21546  if (kcountHFnegativedirectionReconoiseD2 == 6)
21547  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
21548  if (kcountHFnegativedirectionReconoiseD2 == 7)
21549  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
21550  if (kcountHFnegativedirectionReconoiseD2 == 8)
21551  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
21552  if (kcountHFnegativedirectionReconoiseD2 == 9)
21553  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
21554  if (kcountHFnegativedirectionReconoiseD2 == 10)
21555  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
21556  if (kcountHFnegativedirectionReconoiseD2 == 11)
21557  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
21558  if (kcountHFnegativedirectionReconoiseD2 == 12)
21559  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
21560  if (kcountHFnegativedirectionReconoiseD2 == 13)
21561  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
21562  HFnegativedirectionReconoiseD2->Draw("Error");
21563  kcountHFnegativedirectionReconoiseD2++;
21564  if (kcountHFnegativedirectionReconoiseD2 > 13)
21565  break; // 4x6 = 24
21566  } //ccctest>0
21567 
21568  } // for i
21569  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21570  } //for jeta
21572  c3x5->Update();
21573  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
21574  c3x5->Clear();
21575  // clean-up
21576  if (h2CeffHFnegativedirectionReconoiseD2)
21577  delete h2CeffHFnegativedirectionReconoiseD2;
21578 
21579  //===================================================================== END of Reconoise HF for phi-symmetry
21580  //===================================================================== END of Reconoise HF for phi-symmetry
21581  //===================================================================== END of Reconoise HF for phi-symmetry
21582  //============================================================================================================ END of Reconoise for phi-symmetry
21583  //============================================================================================================ END of Reconoise for phi-symmetry
21584  //============================================================================================================ END of Reconoise for phi-symmetry
21585 
21586  //==================================================================================================================================================== END for phi-symmetry
21587  //==================================================================================================================================================== END for phi-symmetry
21588  //==================================================================================================================================================== END for phi-symmetry
21589  //====================================================================================================================================================
21590 
21591  std::cout << " We are here to print 2017 MAPs " << std::endl;
21592  //======================================================================
21593 
21594  //======================================================================
21596 
21597  TH2F *Map_ALL = new TH2F("Map_All", "Map_all", 82, -41, 40, 72, 0, 71);
21598  int nx = Map_ALL->GetXaxis()->GetNbins();
21599  int ny = Map_ALL->GetYaxis()->GetNbins();
21600  int NBad = 0;
21601  int NWarn = 0;
21602  int NCalib = 0;
21603  int NPed = 0;
21604  // int Eta[3][10000]={0};
21605  int Eta[4][10000] = {0};
21606  int Phi[4][10000] = {0};
21607  int Sub[4][10000] = {0};
21608  int Depth[4][10000] = {0};
21609  string Comment[4][10000] = {""};
21610  string Text[33] = {"", "Cm", "Am", "Wm", "Rm", "TNm", "TXm", "", "", "", "", "Cc", "Ac", "Wc", "Rc", "TNc", "TXc",
21611  "", "", "", "", "GS", "", "", "", "", "", "", "", "", "", "Pm", "pWm"};
21612  int flag_W = 0;
21613  int flag_B = 0;
21614  int flag_P = 0;
21615 
21616  for (int i = 1; i <= nx; i++) { //Eta
21617  for (int j = 1; j <= ny; j++) { // Phi
21618  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
21619  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
21620  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
21621  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
21622  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
21623  if (Map_SUB[sub][k]->GetBinContent(i, j) != 0) {
21624  Map_SUB[sub][k]->SetBinContent(i, j, 0.5);
21625  Map_ALL->SetBinContent(i, j, 0.5);
21626  }
21627  }
21628  }
21629  }
21630  }
21631 
21632  for (int i = 1; i <= nx; i++) { //Eta
21633  for (int j = 1; j <= ny; j++) { // Phi
21634  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
21635  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
21636  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
21637  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
21638  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
21639  flag_W = 0;
21640  flag_B = 0;
21641  flag_P = 0;
21642  for (int test = 1; test <= 6; test++) { //Test: 1-Wm, 2-Rm, etc
21643  //Bad
21644  if (Map_Ampl[test][sub][k]->GetBinContent(i, j) >
21645  0.1) { //Rate 0.1 for displaying on whole detector map and subdetector map
21646  Map_ALL->SetBinContent(i, j, 1.);
21647  Map_SUB[sub][k]->SetBinContent(i, j, 1.);
21648  if (flag_B == 0) {
21649  NBad += 1;
21650  Eta[2][NBad] = i - 41;
21651  Phi[2][NBad] = j - 1;
21652  Sub[2][NBad] = sub;
21653  Depth[2][NBad] = k;
21654  Comment[2][NBad] = Text[test];
21655  } else
21656  Comment[2][NBad] += ", " + Text[test];
21657  flag_B = 1;
21658  // cout<<"Map_Ampl["<<test<<"]["<<sub<<"]["<<k<<"]->GetBinContent("<<i<<","<<j<<")= "<<Map_Ampl[test][sub][k]->GetBinContent(i,j)<<endl;
21659  }
21660  //Warning
21661  /*
21662  if ((Map_Ampl[test][sub][k]->GetBinContent(i,j) != 0.)&&(Map_Ampl[test][sub][k]->GetBinContent(i,j) < 0.001) ) {
21663  if (Map_SUB[sub][k]->GetBinContent(i,j)!=1.) Map_SUB[sub][k]->SetBinContent(i,j,0.75);
21664  if (Map_ALL->GetBinContent(i,j)!=1.) Map_ALL->SetBinContent(i,j,0.75);
21665  if (flag_W == 0) {
21666  NWarn +=1;
21667  Eta[1][NWarn]=i-41;
21668  Phi[1][NWarn]=j-1;
21669  Sub[1][NWarn]=sub;
21670  Depth[1][NWarn]=k;
21671  Comment[1][NWarn]=Text[test];
21672  }
21673  else Comment[1][NWarn]+=", "+Text[test];
21674  flag_W = 1;
21675 // cout<<"Map_Ampl["<<test<<"]["<<sub<<"]["<<k<<"]->GetBinContent("<<i<<","<<j<<")= "<<Map_Ampl[test][sub][k]->GetBinContent(i,j)<<endl;
21676  }
21677 */
21678 
21679  } //end test
21680 
21681  //Calib
21682  /*
21683  for (int test=11;test<=16;test++) { //Test: 1-2.E, 2-2.F, etc
21684  if (Map_Ampl[test][sub][k]->GetBinContent(i,j) != 0.) {
21685 // if (Map_SUB[sub][k]->GetBinContent(i,j)!=1.0) Map_SUB[sub][k]->SetBinContent(i,j,0.3);
21686 // if (Map_ALL->GetBinContent(i,j)!=1.) Map_ALL->SetBinContent(i,j,0.3);
21687  if (flag_W == 0) {
21688  NWarn +=1;
21689  Eta[1][NWarn]=i-41;
21690  Phi[1][NWarn]=j-1;
21691  Sub[1][NWarn]=sub;
21692  Depth[1][NWarn]=k;
21693  Comment[1][NWarn]=Text[test];
21694  }
21695  else Comment[1][NWarn]+=", "+Text[test];
21696  flag_W = 1;
21697 // cout<<"Map_Ampl["<<test<<"]["<<sub<<"]["<<k<<"]->GetBinContent("<<i<<","<<j<<")= "<<Map_Ampl[test][sub][k]->GetBinContent(i,j)<<endl;
21698  }
21699  } //end test
21700 */
21701  //Gain stabil
21702  for (int test = 21; test <= 21; test++) {
21703  if (abs(Map_Ampl[test][sub][k]->GetBinContent(i, j)) > porog[sub]) {
21704  if (Map_SUB[sub][k]->GetBinContent(i, j) != 1.0)
21705  Map_SUB[sub][k]->SetBinContent(i, j, 0.75);
21706  if (Map_ALL->GetBinContent(i, j) != 1.) {
21707  Map_ALL->SetBinContent(i, j, 0.75);
21708  if (flag_W == 0) {
21709  NWarn += 1;
21710  Eta[1][NWarn] = i - 41;
21711  Phi[1][NWarn] = j - 1;
21712  Sub[1][NWarn] = sub;
21713  Depth[1][NWarn] = k;
21714  Comment[1][NWarn] = Text[test];
21715  } else
21716  Comment[1][NWarn] += ", " + Text[test];
21717  flag_W = 1;
21718 
21719  cout << "Map_Ampl[" << test << "][" << sub << "][" << k << "]->GetBinContent(" << i << "," << j
21720  << ")= " << Map_Ampl[test][sub][k]->GetBinContent(i, j) << endl;
21721  }
21722  }
21723  } //end test
21724 
21725  //Pedestals
21726  for (int test = 31; test <= 32; test++) {
21727  if (Map_Ampl[test][sub][k]->GetBinContent(i, j) > 0.1) {
21728  // if (Map_SUB[sub][k]->GetBinContent(i,j)!=1.0) Map_SUB[sub][k]->SetBinContent(i,j,0.75);
21729  // if (Map_ALL->GetBinContent(i,j)!=1.) Map_ALL->SetBinContent(i,j,0.75);
21730  if (flag_P == 0) {
21731  NPed += 1;
21732  Eta[3][NPed] = i - 41;
21733  Phi[3][NPed] = j - 1;
21734  Sub[3][NPed] = sub;
21735  Depth[3][NPed] = k;
21736  Comment[3][NPed] = Text[test];
21737  } else
21738  Comment[3][NPed] += ", " + Text[test];
21739  flag_P = 1;
21740 
21741  // cout<<"Map_Ampl["<<test<<"]["<<sub<<"]["<<k<<"]->GetBinContent("<<i<<","<<j<<")= "<<Map_Ampl[test][sub][k]->GetBinContent(i,j)<<endl;
21742  }
21743  } //end test
21744 
21745  } //end Depth
21746  } //end Sub
21747  } //end Phi
21748  } //end Eta
21749  // subdet maps
21750  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
21751 
21752  std::cout << " 2017 MAPS_SUB " << sub << std::endl;
21753  // if (sub==1) cHB->Divide(2,1);
21754  if (sub == 1)
21755  cHB->Divide(2, 2);
21756  // if (sub==2) cHE->Divide(3,1);
21757  if (sub == 2)
21758  cHE->Divide(3, 3);
21759  if (sub == 3)
21760  cONE->Divide(1, 1);
21761  // if (sub==4) cHB->Divide(2,1);
21762  if (sub == 4)
21763  cHF->Divide(2, 2);
21764  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
21765  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
21766  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
21767  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
21768  if (sub == 1)
21769  cHB->cd(k);
21770  if (sub == 2)
21771  cHE->cd(k);
21772  if (sub == 3)
21773  cONE->cd(k - 3);
21774  if (sub == 4)
21775  cHF->cd(k);
21776  gPad->SetGridy();
21777  gPad->SetGridx();
21778  // gPad->SetLogz();
21779  // gStyle->SetTitleOffset(0.5, "Y");
21780  if (sub == 1)
21781  sprintf(str, "HB, Depth%d \b", k);
21782  if (sub == 2)
21783  sprintf(str, "HE, Depth%d \b", k);
21784  if (sub == 3)
21785  sprintf(str, "HO, Depth%d \b", k);
21786  if (sub == 4)
21787  sprintf(str, "HF, Depth%d \b", k);
21788  Map_SUB[sub][k]->SetTitle(str);
21789  Map_SUB[sub][k]->SetXTitle("#eta \b");
21790  Map_SUB[sub][k]->SetYTitle("#phi \b");
21791  Map_SUB[sub][k]->Draw("COL");
21792  Map_SUB[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
21793  Map_SUB[sub][k]->GetZaxis()->SetRangeUser(0., 1.);
21794  if (sub == 1) {
21795  cHB->Modified();
21796  cHB->Update();
21797  }
21798  if (sub == 2) {
21799  cHE->Modified();
21800  cHE->Update();
21801  }
21802  if (sub == 3) {
21803  cONE->Modified();
21804  cONE->Update();
21805  }
21806  if (sub == 4) {
21807  cHF->Modified();
21808  cHF->Update();
21809  }
21810  } //end depth
21811  if (sub == 1) {
21812  cHB->Print("MAPHB.png");
21813  cHB->Clear();
21814  }
21815  if (sub == 2) {
21816  cHE->Print("MAPHE.png");
21817  cHE->Clear();
21818  }
21819  if (sub == 3) {
21820  cONE->Print("MAPHO.png");
21821  cONE->Clear();
21822  }
21823  if (sub == 4) {
21824  cHF->Print("MAPHF.png");
21825  cHF->Clear();
21826  }
21827  }
21828 
21830  // TCanvas *cmain1 = new TCanvas("cmain1","MAP",200,10,1400,1800);
21831  TCanvas *cmain1 = new TCanvas("cmain1", "MAP", 250, 10, 1450, 1410);
21832  cmain1->Divide(2, 2);
21833 
21834  cmain1->cd(1);
21835  TH1F *JDBEYESJ0 = (TH1F *)hfile->Get("h_totalAmplitudeHBperEvent");
21836  JDBEYESJ0->SetStats(0);
21837  JDBEYESJ0->SetMarkerStyle(20);
21838  JDBEYESJ0->SetMarkerSize(0.8);
21839  JDBEYESJ0->GetYaxis()->SetLabelSize(0.04);
21840  JDBEYESJ0->SetXTitle("iEvent \b");
21841  JDBEYESJ0->SetYTitle("totalAmplitude perEvent \b");
21842  JDBEYESJ0->SetTitle("HB \b");
21843  JDBEYESJ0->SetMarkerColor(2);
21844  JDBEYESJ0->SetLineColor(1);
21845  JDBEYESJ0->SetMinimum(0.8);
21846  JDBEYESJ0->Draw("HIST same P0");
21847 
21848  cmain1->cd(2);
21849  TH1F *JDBEYESJ1 = (TH1F *)hfile->Get("h_totalAmplitudeHEperEvent");
21850  JDBEYESJ1->SetStats(0);
21851  JDBEYESJ1->SetMarkerStyle(20);
21852  JDBEYESJ1->SetMarkerSize(0.8);
21853  JDBEYESJ1->GetYaxis()->SetLabelSize(0.04);
21854  JDBEYESJ1->SetXTitle("iEvent \b");
21855  JDBEYESJ1->SetYTitle("totalAmplitude perEvent \b");
21856  JDBEYESJ1->SetTitle("HE \b");
21857  JDBEYESJ1->SetMarkerColor(2);
21858  JDBEYESJ1->SetLineColor(1);
21859  JDBEYESJ1->SetMinimum(0.8);
21860  JDBEYESJ1->Draw("HIST same P0");
21861 
21862  cmain1->cd(3);
21863  TH1F *JDBEYESJ2 = (TH1F *)hfile->Get("h_totalAmplitudeHFperEvent");
21864  JDBEYESJ2->SetStats(0);
21865  JDBEYESJ2->SetMarkerStyle(20);
21866  JDBEYESJ2->SetMarkerSize(0.8);
21867  JDBEYESJ2->GetYaxis()->SetLabelSize(0.04);
21868  JDBEYESJ2->SetXTitle("iEvent \b");
21869  JDBEYESJ2->SetYTitle("totalAmplitude perEvent \b");
21870  JDBEYESJ2->SetTitle("HF \b");
21871  JDBEYESJ2->SetMarkerColor(2);
21872  JDBEYESJ2->SetLineColor(1);
21873  JDBEYESJ2->SetMinimum(0.8);
21874  JDBEYESJ2->Draw("HIST same P0");
21875 
21876  cmain1->cd(4);
21877  TH1F *JDBEYESJ3 = (TH1F *)hfile->Get("h_totalAmplitudeHOperEvent");
21878  JDBEYESJ3->SetStats(0);
21879  JDBEYESJ3->SetMarkerStyle(20);
21880  JDBEYESJ3->SetMarkerSize(0.8);
21881  JDBEYESJ3->GetYaxis()->SetLabelSize(0.04);
21882  JDBEYESJ3->SetXTitle("iEvent \b");
21883  JDBEYESJ3->SetYTitle("totalAmplitude perEvent \b");
21884  JDBEYESJ3->SetTitle("HO \b");
21885  JDBEYESJ3->SetMarkerColor(2);
21886  JDBEYESJ3->SetLineColor(1);
21887  JDBEYESJ3->SetMinimum(0.8);
21888  JDBEYESJ3->Draw("HIST same P0");
21889 
21890  cmain1->Modified();
21891  cmain1->Update();
21892  cmain1->Print("EVENTDEPENDENCE.png");
21893 
21894  std::cout << " EVENTDEPENDENCE " << std::endl;
21895 
21897  // ALL SubDet
21898  gStyle->SetOptTitle(0);
21899  TCanvas *cmain = new TCanvas("cmain", "MAP", 1000, 1000);
21900  //cmain->cd(1);
21901  gPad->SetGridy();
21902  gPad->SetGridx();
21903  // gPad->SetLogz();
21904  Map_ALL->SetTitleOffset(1.3, "Y");
21905  Map_ALL->SetXTitle("#eta \b");
21906  Map_ALL->SetYTitle("#phi \b");
21907  Map_ALL->Draw("COL");
21908  Map_ALL->GetYaxis()->SetRangeUser(0, 72.);
21909  Map_ALL->GetZaxis()->SetRangeUser(0, 1.);
21910  cmain->Modified();
21911  cmain->Update();
21912  cmain->Print("MAP.png");
21913 
21914  std::cout << "******** MAP_ALL done" << std::endl;
21915  std::cout << "********" << std::endl;
21916 
21917  std::cout << "********" << std::endl;
21918  std::cout << "************ Start creating each test kind for each subdet html pages:" << std::endl;
21919 
21920  //======================================================================
21921 
21922  //======================================================================
21923  // Creating each test kind for each subdet html pages:
21924  std::string raw_class, raw_class1, raw_class2, raw_class3;
21925  int ind = 0;
21926 
21927  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
21928  ofstream htmlFileT, htmlFileC, htmlFileD, htmlFileP, htmlFileS, htmlFileM, htmlFileR, htmlFileN;
21929  if (sub == 1) {
21930  htmlFileT.open("HB_Tile.html");
21931  htmlFileC.open("HB_Calib.html");
21932  htmlFileD.open("HB_Drift.html");
21933  htmlFileP.open("HB_Pedestals.html");
21934  htmlFileS.open("HB_Shapes.html");
21935  htmlFileM.open("HB_PhiSymmetryDigi.html");
21936  htmlFileR.open("HB_PhiSymmetryRecoSignal.html");
21937  htmlFileN.open("HB_PhiSymmetryRecoNoise.html");
21938  }
21939  if (sub == 2) {
21940  htmlFileT.open("HE_Tile.html");
21941  htmlFileC.open("HE_Calib.html");
21942  htmlFileD.open("HE_Drift.html");
21943  htmlFileP.open("HE_Pedestals.html");
21944  htmlFileS.open("HE_Shapes.html");
21945  htmlFileM.open("HE_PhiSymmetryDigi.html");
21946  htmlFileR.open("HE_PhiSymmetryRecoSignal.html");
21947  htmlFileN.open("HE_PhiSymmetryRecoNoise.html");
21948  }
21949  if (sub == 3) {
21950  htmlFileT.open("HO_Tile.html");
21951  htmlFileC.open("HO_Calib.html");
21952  htmlFileD.open("HO_Drift.html");
21953  htmlFileP.open("HO_Pedestals.html");
21954  htmlFileS.open("HO_Shapes.html");
21955  }
21956  if (sub == 4) {
21957  htmlFileT.open("HF_Tile.html");
21958  htmlFileC.open("HF_Calib.html");
21959  htmlFileD.open("HF_Drift.html");
21960  htmlFileP.open("HF_Pedestals.html");
21961  htmlFileS.open("HF_Shapes.html");
21962  htmlFileM.open("HF_PhiSymmetryDigi.html");
21963  htmlFileR.open("HF_PhiSymmetryRecoSignal.html");
21964  htmlFileN.open("HF_PhiSymmetryRecoNoise.html");
21965  }
21966 
21967  // Megatile channels
21968  htmlFileT << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
21969  htmlFileT << "<head>" << std::endl;
21970  htmlFileT << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
21971  htmlFileT << "<title> Remote Monitoring Tool </title>" << std::endl;
21972  htmlFileT << "<style type=\"text/css\">" << std::endl;
21973  htmlFileT << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
21974  << std::endl;
21975  htmlFileT << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
21976  htmlFileT << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
21977  "text-align: center;}"
21978  << std::endl;
21979  htmlFileT << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
21980  htmlFileT << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
21981  htmlFileT << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
21982  htmlFileT << "</style>" << std::endl;
21983  htmlFileT << "<body>" << std::endl;
21984 
21985  if (sub == 1)
21986  htmlFileT << "<h1> Criteria for megatile channels for HB, RUN = " << runnumber << " </h1>" << std::endl;
21987  if (sub == 2)
21988  htmlFileT << "<h1> Criteria for megatile channels for HE, RUN = " << runnumber << " </h1>" << std::endl;
21989  if (sub == 3)
21990  htmlFileT << "<h1> Criteria for megatile channels for HO, RUN = " << runnumber << " </h1>" << std::endl;
21991  if (sub == 4)
21992  htmlFileT << "<h1> Criteria for megatile channels for HF, RUN = " << runnumber << " </h1>" << std::endl;
21993  htmlFileT << "<br>" << std::endl;
21994 
21995  // Test Entries
21996 
21997  htmlFileT << "<h2> 0. Entries for each channel.</h3>" << std::endl;
21998  htmlFileT << "<h3> 0.A. Entries in each channel for each depth.</h3>" << std::endl;
21999  htmlFileT << "<h4> Channel legend: color is rate of entries </h4>" << std::endl;
22000  if (sub == 1)
22001  htmlFileT << " <img src=\"MapRateEntryHB.png\" />" << std::endl;
22002  if (sub == 2)
22003  htmlFileT << " <img src=\"MapRateEntryHE.png\" />" << std::endl;
22004  if (sub == 3)
22005  htmlFileT << " <img src=\"MapRateEntryHO.png\" />" << std::endl;
22006  if (sub == 4)
22007  htmlFileT << " <img src=\"MapRateEntryHF.png\" />" << std::endl;
22008  htmlFileT << "<br>" << std::endl;
22009 
22010  // Test Cm
22011  htmlFileT << "<h2> 1. Cm criterion: CapID errors for each channel.</h3>" << std::endl;
22012  htmlFileT << "<h3> 1.A. Rate of CapId failures in each channel for each depth.</h3>" << std::endl;
22013  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22014  if (sub == 1)
22015  htmlFileT << " <img src=\"MapRateCapIDHB.png\" />" << std::endl;
22016  if (sub == 2)
22017  htmlFileT << " <img src=\"MapRateCapIDHE.png\" />" << std::endl;
22018  if (sub == 3)
22019  htmlFileT << " <img src=\"MapRateCapIDHO.png\" />" << std::endl;
22020  if (sub == 4)
22021  htmlFileT << " <img src=\"MapRateCapIDHF.png\" />" << std::endl;
22022  htmlFileT << "<br>" << std::endl;
22023 
22024  // Am
22025  htmlFileT << "<h2> 2. Am criterion: ADC amplitude collected over all TSs(Full Amplitude) for each channel. </h3>"
22026  << std::endl;
22027  htmlFileT << "<h3> 2.A. Full ADC amplitude distribution over all events, channels and depths.</h3>" << std::endl;
22028  htmlFileT << "<h4> Legend: Bins less " << MIN_M[2][sub] << " correpond to bad ADC amplitude </h4>" << std::endl;
22029  if (sub == 1)
22030  htmlFileT << " <img src=\"HistAmplHB.png\" />" << std::endl;
22031  if (sub == 2)
22032  htmlFileT << " <img src=\"HistAmplHE.png\" />" << std::endl;
22033  if (sub == 3)
22034  htmlFileT << " <img src=\"HistAmplHO.png\" />" << std::endl;
22035  if (sub == 4)
22036  htmlFileT << " <img src=\"HistAmplHF.png\" />" << std::endl;
22037  htmlFileT << "<br>" << std::endl;
22038  htmlFileT << "<h3> 2.B. Rate of bad ADC amplitude (<" << MIN_M[2][sub] << ") in each channel for each depth. </h3>"
22039  << std::endl;
22040  htmlFileT << "<h4> Channel legend: white - good, other colours - bad. </h4>" << std::endl;
22041  if (sub == 1)
22042  htmlFileT << " <img src=\"MapRateAmplHB.png\" />" << std::endl;
22043  if (sub == 2)
22044  htmlFileT << " <img src=\"MapRateAmplHE.png\" />" << std::endl;
22045  if (sub == 3)
22046  htmlFileT << " <img src=\"MapRateAmplHO.png\" />" << std::endl;
22047  if (sub == 4)
22048  htmlFileT << " <img src=\"MapRateAmplHF.png\" />" << std::endl;
22049  htmlFileT << "<br>" << std::endl;
22050 
22051  // Test Wm
22052  htmlFileT << "<h2> 3. Wm criterion: RMS (width) of ADC amplutude for each channel.</h3>" << std::endl;
22053  htmlFileT << "<h3> 3.A. RMS distribution over all events, channel and depth.</h3>" << std::endl;
22054  htmlFileT << "<h4> Legend: Bins less " << MIN_M[3][sub] << " and more " << MAX_M[3][sub]
22055  << " correpond to bad RMS </h4>" << std::endl;
22056  if (sub == 1)
22057  htmlFileT << " <img src=\"HistRMSHB.png\" />" << std::endl;
22058  if (sub == 2)
22059  htmlFileT << " <img src=\"HistRMSHE.png\" />" << std::endl;
22060  if (sub == 3)
22061  htmlFileT << " <img src=\"HistRMSHO.png\" />" << std::endl;
22062  if (sub == 4)
22063  htmlFileT << " <img src=\"HistRMSHF.png\" />" << std::endl;
22064  htmlFileT << "<br>" << std::endl;
22065  htmlFileT << "<h3> 3.B. Rate of bad RMS (<" << MIN_M[3][sub] << ",>" << MAX_M[3][sub]
22066  << ") in each channel for each depth.</h3>" << std::endl;
22067  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22068  if (sub == 1)
22069  htmlFileT << " <img src=\"MapRateRMSHB.png\" />" << std::endl;
22070  if (sub == 2)
22071  htmlFileT << " <img src=\"MapRateRMSHE.png\" />" << std::endl;
22072  if (sub == 3)
22073  htmlFileT << " <img src=\"MapRateRMSHO.png\" />" << std::endl;
22074  if (sub == 4)
22075  htmlFileT << " <img src=\"MapRateRMSHF.png\" />" << std::endl;
22076  htmlFileT << "<br>" << std::endl;
22077 
22078  // Rm
22079  htmlFileT << "<h2> 4. Rm criterion: Ratio ADC value sum over four near maximum (-2, -1, max, +1) TS to ADC value "
22080  "sum over all TS for each channel. </h3>"
22081  << std::endl;
22082  htmlFileT << "<h3> 4.A. Ratio distribution over all events, channels and depths.</h3>" << std::endl;
22083  htmlFileT << "<h4> Legend: Bins less " << MIN_M[4][sub] << " and more " << MAX_M[4][sub]
22084  << " correpond to bad ratio </h4>" << std::endl;
22085  if (sub == 1)
22086  htmlFileT << " <img src=\"Hist43TStoAllTSHB.png\" />" << std::endl;
22087  if (sub == 2)
22088  htmlFileT << " <img src=\"Hist43TStoAllTSHE.png\" />" << std::endl;
22089  if (sub == 3)
22090  htmlFileT << " <img src=\"Hist43TStoAllTSHO.png\" />" << std::endl;
22091  if (sub == 4)
22092  htmlFileT << " <img src=\"Hist43TStoAllTSHF.png\" />" << std::endl;
22093  htmlFileT << "<br>" << std::endl;
22094  htmlFileT << "<h3> 4.B. Rate of bad ratio (<" << MIN_M[4][sub] << ", >" << MAX_M[4][sub]
22095  << ") in each channel for each depth.</h3>" << std::endl;
22096  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22097  if (sub == 1)
22098  htmlFileT << " <img src=\"MapRate43TStoAllTSHB.png\" />" << std::endl;
22099  if (sub == 2)
22100  htmlFileT << " <img src=\"MapRate43TStoAllTSHE.png\" />" << std::endl;
22101  if (sub == 3)
22102  htmlFileT << " <img src=\"MapRate43TStoAllTSHO.png\" />" << std::endl;
22103  if (sub == 4)
22104  htmlFileT << " <img src=\"MapRate43TStoAllTSHF.png\" />" << std::endl;
22105  htmlFileT << "<br>" << std::endl;
22106 
22107  // TNm
22108  htmlFileT << "<h2> 5. TNm criterion: Mean TS position for each channel.</h3>" << std::endl;
22109  htmlFileT << "<h3> 5.A. TN position distribution over all events, channels and depths.</h3>" << std::endl;
22110  htmlFileT << "<h4> Legend: Bins less " << MIN_M[5][sub] << " and more " << MAX_M[5][sub]
22111  << " correpond to bad mean position </h4>" << std::endl;
22112  if (sub == 1)
22113  htmlFileT << " <img src=\"HistMeanPosHB.png\" />" << std::endl;
22114  if (sub == 2)
22115  htmlFileT << " <img src=\"HistMeanPosHE.png\" />" << std::endl;
22116  if (sub == 3)
22117  htmlFileT << " <img src=\"HistMeanPosHO.png\" />" << std::endl;
22118  if (sub == 4)
22119  htmlFileT << " <img src=\"HistMeanPosHF.png\" />" << std::endl;
22120  htmlFileT << "<br>" << std::endl;
22121  htmlFileT << "<h3> 5.B. Rate of bad TN position (<" << MIN_M[5][sub] << ", >" << MAX_M[5][sub]
22122  << ") in each channel for each depth. </h3>" << std::endl;
22123  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22124  if (sub == 1)
22125  htmlFileT << " <img src=\"MapRateMeanPosHB.png\" />" << std::endl;
22126  if (sub == 2)
22127  htmlFileT << " <img src=\"MapRateMeanPosHE.png\" />" << std::endl;
22128  if (sub == 3)
22129  htmlFileT << " <img src=\"MapRateMeanPosHO.png\" />" << std::endl;
22130  if (sub == 4)
22131  htmlFileT << " <img src=\"MapRateMeanPosHF.png\" />" << std::endl;
22132  htmlFileT << "<br>" << std::endl;
22133 
22134  // TXm
22135  htmlFileT << "<h2> 6.TXm criterion: Maximum TS position for each channel.</h3>" << std::endl;
22136  htmlFileT << "<h3> 6.A. TX position distribution over all events, channel and depth.</h3>" << std::endl;
22137  htmlFileT << "<h4> Legend: Bins less " << MIN_M[6][sub] << " and more " << MAX_M[6][sub]
22138  << " correpond to bad position </h4>" << std::endl;
22139  if (sub == 1)
22140  htmlFileT << " <img src=\"HistMaxPosHB.png\" />" << std::endl;
22141  if (sub == 2)
22142  htmlFileT << " <img src=\"HistMaxPosHE.png\" />" << std::endl;
22143  if (sub == 3)
22144  htmlFileT << " <img src=\"HistMaxPosHO.png\" />" << std::endl;
22145  if (sub == 4)
22146  htmlFileT << " <img src=\"HistMaxPosHF.png\" />" << std::endl;
22147  htmlFileT << "<br>" << std::endl;
22148  htmlFileT << "<h3> 6.B. Rate of bad TX position (<" << MIN_M[6][sub] << ", >" << MAX_M[6][sub]
22149  << ") in each channel for each depth. </h3>" << std::endl;
22150  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22151  if (sub == 1)
22152  htmlFileT << " <img src=\"MapRateMaxPosHB.png\" />" << std::endl;
22153  if (sub == 2)
22154  htmlFileT << " <img src=\"MapRateMaxPosHE.png\" />" << std::endl;
22155  if (sub == 3)
22156  htmlFileT << " <img src=\"MapRateMaxPosHO.png\" />" << std::endl;
22157  if (sub == 4)
22158  htmlFileT << " <img src=\"MapRateMaxPosHF.png\" />" << std::endl;
22159  htmlFileT << "<br>" << std::endl;
22160 
22161  htmlFileT << "</body> " << std::endl;
22162  htmlFileT << "</html> " << std::endl;
22163  htmlFileT.close();
22164 
22165  //Calibration channels
22166  htmlFileC << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22167  htmlFileC << "<head>" << std::endl;
22168  htmlFileC << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22169  htmlFileC << "<title> Raw Data Analyser </title>" << std::endl;
22170  htmlFileC << "<style type=\"text/css\">" << std::endl;
22171  htmlFileC << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22172  << std::endl;
22173  htmlFileC << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22174  htmlFileC << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22175  "text-align: center;}"
22176  << std::endl;
22177  htmlFileC << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22178  htmlFileC << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22179  htmlFileC << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22180  htmlFileC << "</style>" << std::endl;
22181  htmlFileC << "<body>" << std::endl;
22182 
22183  if (sub == 1)
22184  htmlFileC << "<h1> Criteria for calibration channels for HB, RUN = " << runnumber << " </h1>" << std::endl;
22185  if (sub == 2)
22186  htmlFileC << "<h1> Criteria for calibration channels for HE, RUN = " << runnumber << " </h1>" << std::endl;
22187  if (sub == 3)
22188  htmlFileC << "<h1> Criteria for calibration channels for HO, RUN = " << runnumber << " </h1>" << std::endl;
22189  if (sub == 4)
22190  htmlFileC << "<h1> Criteria for calibration channels for HF, RUN = " << runnumber << " </h1>" << std::endl;
22191  htmlFileC << "<br>" << std::endl;
22192 
22193  // Test Entries
22194 
22195  htmlFileC << "<h2> 0. Entries for each channel.</h3>" << std::endl;
22196  htmlFileC << "<h3> 0.A. Entries in each channel for each depth.</h3>" << std::endl;
22197  htmlFileC << "<h4> Channel legend: color is rate of entries </h4>" << std::endl;
22198  if (sub == 1)
22199  htmlFileC << " <img src=\"MapRateCalibEntryHB.png\" />" << std::endl;
22200  if (sub == 2)
22201  htmlFileC << " <img src=\"MapRateCalibEntryHE.png\" />" << std::endl;
22202  if (sub == 3)
22203  htmlFileC << " <img src=\"MapRateCalibEntryHO.png\" />" << std::endl;
22204  if (sub == 4)
22205  htmlFileC << " <img src=\"MapRateCalibEntryHF.png\" />" << std::endl;
22206  htmlFileC << "<br>" << std::endl;
22207 
22208  // Test Cc
22209  htmlFileC << "<h2> 1. Cc criterion: CapID errors for each channel.</h3>" << std::endl;
22210  htmlFileC << "<h3> 1.A. Rate of CapId failures in each channel for each depth.</h3>" << std::endl;
22211  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22212  if (sub == 1)
22213  htmlFileC << " <img src=\"MapRateCapCalibHB.png\" />" << std::endl;
22214  if (sub == 2)
22215  htmlFileC << " <img src=\"MapRateCapCalibHE.png\" />" << std::endl;
22216  if (sub == 3)
22217  htmlFileC << " <img src=\"MapRateCapCalibHO.png\" />" << std::endl;
22218  if (sub == 4)
22219  htmlFileC << " <img src=\"MapRateCapCalibHF.png\" />" << std::endl;
22220  htmlFileC << "<br>" << std::endl;
22221 
22222  // Ac
22223  htmlFileC << "<h2> 2. Ac criterion: ADC amplitude collected over all TSs(Full Amplitude) for each channel. </h3>"
22224  << std::endl;
22225  htmlFileC << "<h3> 2.A. Full ADC amplitude distribution over all events, channels and depths.</h3>" << std::endl;
22226  htmlFileC << "<h4> Legend: Bins less " << MIN_C[2][sub] << " correpond to bad ADC amplitude </h4>" << std::endl;
22227  if (sub == 1)
22228  htmlFileC << " <img src=\"HistAmplCalibHB.png\" />" << std::endl;
22229  if (sub == 2)
22230  htmlFileC << " <img src=\"HistAmplCalibHE.png\" />" << std::endl;
22231  if (sub == 3)
22232  htmlFileC << " <img src=\"HistAmplCalibHO.png\" />" << std::endl;
22233  if (sub == 4)
22234  htmlFileC << " <img src=\"HistAmplCalibHF.png\" />" << std::endl;
22235  htmlFileC << "<br>" << std::endl;
22236  htmlFileC << "<h3> 2.B. Rate of bad ADC amplitude (<" << MIN_C[2][sub] << ") in each channel for each depth. </h3>"
22237  << std::endl;
22238  htmlFileC << "<h4> Channel legend: white - good, other colours - bad. </h4>" << std::endl;
22239  if (sub == 1)
22240  htmlFileC << " <img src=\"MapRateAmplCalibHB.png\" />" << std::endl;
22241  if (sub == 2)
22242  htmlFileC << " <img src=\"MapRateAmplCalibHE.png\" />" << std::endl;
22243  if (sub == 3)
22244  htmlFileC << " <img src=\"MapRateAmplCalibHO.png\" />" << std::endl;
22245  if (sub == 4)
22246  htmlFileC << " <img src=\"MapRateAmplCalibHF.png\" />" << std::endl;
22247  htmlFileC << "<br>" << std::endl;
22248 
22249  // Test Wc
22250  htmlFileC << "<h2> 3. Wc criterion: RMS (width) of ADC amplutude for each channel.</h3>" << std::endl;
22251  htmlFileC << "<h3> 3.A. W distribution over all events, channel and depth.</h3>" << std::endl;
22252  htmlFileC << "<h4> Legend: Bins less " << MIN_C[3][sub] << " and more " << MAX_C[3][sub]
22253  << " correpond to bad RMS </h4>" << std::endl;
22254  if (sub == 1)
22255  htmlFileC << " <img src=\"HistRMSCalibHB.png\" />" << std::endl;
22256  if (sub == 2)
22257  htmlFileC << " <img src=\"HistRMSCalibHE.png\" />" << std::endl;
22258  if (sub == 3)
22259  htmlFileC << " <img src=\"HistRMSCalibHO.png\" />" << std::endl;
22260  if (sub == 4)
22261  htmlFileC << " <img src=\"HistRMSCalibHF.png\" />" << std::endl;
22262  htmlFileC << "<br>" << std::endl;
22263  htmlFileC << "<h3> 3.B. Rate of bad W (<" << MIN_C[3][sub] << ",>" << MAX_C[3][sub]
22264  << ") in each channel for each depth.</h3>" << std::endl;
22265  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22266  if (sub == 1)
22267  htmlFileC << " <img src=\"MapRateRMSCalibHB.png\" />" << std::endl;
22268  if (sub == 2)
22269  htmlFileC << " <img src=\"MapRateRMSCalibHE.png\" />" << std::endl;
22270  if (sub == 3)
22271  htmlFileC << " <img src=\"MapRateRMSCalibHO.png\" />" << std::endl;
22272  if (sub == 4)
22273  htmlFileC << " <img src=\"MapRateRMSCalibHF.png\" />" << std::endl;
22274  htmlFileC << "<br>" << std::endl;
22275 
22276  // Rc
22277  htmlFileC << "<h2> 4. Rc criterion: Ratio ADC value sum over five near maximum (-2, -1, max, +1, +2) TS to ADC "
22278  "value sum over all TS for each channel. </h3>"
22279  << std::endl;
22280  htmlFileC << "<h3> 4.A. Ratio distribution over all events, channels and depths.</h3>" << std::endl;
22281  htmlFileC << "<h4> Legend: Bins less " << MIN_C[4][sub] << " and more " << MAX_C[4][sub]
22282  << " correpond to bad ratio </h4>" << std::endl;
22283  if (sub == 1)
22284  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHB.png\" />" << std::endl;
22285  if (sub == 2)
22286  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHE.png\" />" << std::endl;
22287  if (sub == 3)
22288  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHO.png\" />" << std::endl;
22289  if (sub == 4)
22290  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHF.png\" />" << std::endl;
22291  htmlFileC << "<br>" << std::endl;
22292  htmlFileC << "<h3> 4.B. Rate of bad Ratio (<" << MIN_C[4][sub] << ", >" << MAX_C[4][sub]
22293  << ") in each channel for each depth.</h3>" << std::endl;
22294  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22295  if (sub == 1)
22296  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHB.png\" />" << std::endl;
22297  if (sub == 2)
22298  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHE.png\" />" << std::endl;
22299  if (sub == 3)
22300  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHO.png\" />" << std::endl;
22301  if (sub == 4)
22302  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHF.png\" />" << std::endl;
22303  htmlFileC << "<br>" << std::endl;
22304 
22305  // TNc
22306  htmlFileC << "<h2> 5. TNc criterion: Mean TS position for each channel.</h3>" << std::endl;
22307  htmlFileC << "<h3> 5.A. TN position distribution over all events, channels and depths.</h3>" << std::endl;
22308  htmlFileC << "<h4> Legend: Bins less " << MIN_C[5][sub] << " and more " << MAX_C[5][sub]
22309  << " correpond to bad position </h4>" << std::endl;
22310  if (sub == 1)
22311  htmlFileC << " <img src=\"HistMeanPosCalibHB.png\" />" << std::endl;
22312  if (sub == 2)
22313  htmlFileC << " <img src=\"HistMeanPosCalibHE.png\" />" << std::endl;
22314  if (sub == 3)
22315  htmlFileC << " <img src=\"HistMeanPosCalibHO.png\" />" << std::endl;
22316  if (sub == 4)
22317  htmlFileC << " <img src=\"HistMeanPosCalibHF.png\" />" << std::endl;
22318  htmlFileC << "<br>" << std::endl;
22319  htmlFileC << "<h3> 5.B. Rate of bad TN position (<" << MIN_C[5][sub] << ", >" << MAX_C[5][sub]
22320  << ") in each channel for each depth. </h3>" << std::endl;
22321  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22322  if (sub == 1)
22323  htmlFileC << " <img src=\"MapRateMeanPosCalibHB.png\" />" << std::endl;
22324  if (sub == 2)
22325  htmlFileC << " <img src=\"MapRateMeanPosCalibHE.png\" />" << std::endl;
22326  if (sub == 3)
22327  htmlFileC << " <img src=\"MapRateMeanPosCalibHO.png\" />" << std::endl;
22328  if (sub == 4)
22329  htmlFileC << " <img src=\"MapRateMeanPosCalibHF.png\" />" << std::endl;
22330  htmlFileC << "<br>" << std::endl;
22331 
22332  // TXm
22333  htmlFileC << "<h2> 6.TXc criterion: Maximum TS position for each channel.</h3>" << std::endl;
22334  htmlFileC << "<h3> 6.A. TX position distribution over all events, channel and depth.</h3>" << std::endl;
22335  htmlFileC << "<h4> Legend: Bins less " << MIN_C[6][sub] << " and more " << MAX_C[6][sub]
22336  << " correpond to bad position </h4>" << std::endl;
22337  if (sub == 1)
22338  htmlFileC << " <img src=\"HistMaxPosCalibHB.png\" />" << std::endl;
22339  if (sub == 2)
22340  htmlFileC << " <img src=\"HistMaxPosCalibHE.png\" />" << std::endl;
22341  if (sub == 3)
22342  htmlFileC << " <img src=\"HistMaxPosCalibHO.png\" />" << std::endl;
22343  if (sub == 4)
22344  htmlFileC << " <img src=\"HistMaxPosCalibHF.png\" />" << std::endl;
22345  htmlFileC << "<br>" << std::endl;
22346  htmlFileC << "<h3> 6.B. Rate of bad TX position (<" << MIN_C[6][sub] << ", >" << MAX_C[6][sub]
22347  << ") in each channel for each depth. </h3>" << std::endl;
22348  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22349  if (sub == 1)
22350  htmlFileC << " <img src=\"MapRateMaxPosCalibHB.png\" />" << std::endl;
22351  if (sub == 2)
22352  htmlFileC << " <img src=\"MapRateMaxPosCalibHE.png\" />" << std::endl;
22353  if (sub == 3)
22354  htmlFileC << " <img src=\"MapRateMaxPosCalibHO.png\" />" << std::endl;
22355  if (sub == 4)
22356  htmlFileC << " <img src=\"MapRateMaxPosCalibHF.png\" />" << std::endl;
22357  htmlFileC << "<br>" << std::endl;
22358 
22359  htmlFileC << "</body> " << std::endl;
22360  htmlFileC << "</html> " << std::endl;
22361  htmlFileC.close();
22362 
22363  //Response drift
22364  htmlFileD << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22365  htmlFileD << "<head>" << std::endl;
22366  htmlFileD << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22367  htmlFileD << "<title> Remore Monitoring Tool </title>" << std::endl;
22368  htmlFileD << "<style type=\"text/css\">" << std::endl;
22369  htmlFileD << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22370  << std::endl;
22371  htmlFileD << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22372  htmlFileD << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22373  "text-align: center;}"
22374  << std::endl;
22375  htmlFileD << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22376  htmlFileD << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22377  htmlFileD << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22378  htmlFileD << "</style>" << std::endl;
22379  htmlFileD << "<body>" << std::endl;
22380 
22381  if (sub == 1)
22382  htmlFileD << "<h1> Response drift for HB: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
22383  << " </h1>" << std::endl;
22384  if (sub == 2)
22385  htmlFileD << "<h1> Response drift for HE: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
22386  << " </h1>" << std::endl;
22387  if (sub == 3)
22388  htmlFileD << "<h1> Response drift for HO: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
22389  << " </h1>" << std::endl;
22390  if (sub == 4)
22391  htmlFileD << "<h1> Response drift for HF: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
22392  << " </h1>" << std::endl;
22393  htmlFileD << "<br>" << std::endl;
22394 
22395  // test GS
22396  htmlFileD << "<h2> 1. Gain Stability (GS) </h3>" << std::endl;
22397  htmlFileD << "<h3> 1.A. Averaged channel response, collected over all TS, for Current run in each channel for each "
22398  "depth.</h3>"
22399  << std::endl;
22400  htmlFileD << "<h4> Channel legend: colour means cooresponding value of mean response. </h4>" << std::endl;
22401  if (sub == 1)
22402  htmlFileD << " <img src=\"MapRateAmpl1HB.png\" />" << std::endl;
22403  if (sub == 2)
22404  htmlFileD << " <img src=\"MapRateAmpl1HE.png\" />" << std::endl;
22405  if (sub == 3)
22406  htmlFileD << " <img src=\"MapRateAmpl1HO.png\" />" << std::endl;
22407  if (sub == 4)
22408  htmlFileD << " <img src=\"MapRateAmpl1HF.png\" />" << std::endl;
22409  htmlFileD << "<br>" << std::endl;
22410  htmlFileD << "<h3> 1.B. Averaged channel response, collected over all TS, for Reference run in each channel for "
22411  "each depth.</h3>"
22412  << std::endl;
22413  htmlFileD << "<h4> Channel legend: colour means cooresponding value of mean response. </h4>" << std::endl;
22414  if (sub == 1)
22415  htmlFileD << " <img src=\"MapRateAmpl2HB.png\" />" << std::endl;
22416  if (sub == 2)
22417  htmlFileD << " <img src=\"MapRateAmpl2HE.png\" />" << std::endl;
22418  if (sub == 3)
22419  htmlFileD << " <img src=\"MapRateAmpl2HO.png\" />" << std::endl;
22420  if (sub == 4)
22421  htmlFileD << " <img src=\"MapRateAmpl2HF.png\" />" << std::endl;
22422  htmlFileD << "<br>" << std::endl;
22423  htmlFileD << "<h3> 1.C. Relative difference between Current and Reference run distribution over all events, "
22424  "channels for each depth.</h3>"
22425  << std::endl;
22426  htmlFileD << "<h4> Legend: Bins less -" << porog[sub] << "% and more +" << porog[sub]
22427  << "% correpond to bad relative difference position </h4>" << std::endl;
22428  if (sub == 1)
22429  htmlFileD << " <img src=\"HistAmplDriftDepthHB.png\" />" << std::endl;
22430  if (sub == 2)
22431  htmlFileD << " <img src=\"HistAmplDriftDepthHE.png\" />" << std::endl;
22432  if (sub == 3)
22433  htmlFileD << " <img src=\"HistAmplDriftDepthHO.png\" />" << std::endl;
22434  if (sub == 4)
22435  htmlFileD << " <img src=\"HistAmplDriftDepthHF.png\" />" << std::endl;
22436  htmlFileD << "<br>" << std::endl;
22437  htmlFileD << "<h3> 1.D. Rate of bad relative difference (<-" << porog[sub] << ", >+" << porog[sub]
22438  << ") in each channel for each depth.</h3>" << std::endl;
22439  htmlFileD << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22440  if (sub == 1)
22441  htmlFileD << " <img src=\"MapRateAmplDriftHB.png\" />" << std::endl;
22442  if (sub == 2)
22443  htmlFileD << " <img src=\"MapRateAmplDriftHE.png\" />" << std::endl;
22444  if (sub == 3)
22445  htmlFileD << " <img src=\"MapRateAmplDriftHO.png\" />" << std::endl;
22446  if (sub == 4)
22447  htmlFileD << " <img src=\"MapRateAmplDriftHF.png\" />" << std::endl;
22448  htmlFileD << "<br>" << std::endl;
22449 
22450  htmlFileD << "</body> " << std::endl;
22451  htmlFileD << "</html> " << std::endl;
22452  htmlFileD.close();
22453 
22454  // Pedestals
22455  htmlFileP << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22456  htmlFileP << "<head>" << std::endl;
22457  htmlFileP << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22458  htmlFileP << "<title> Remote Monitoring Tool </title>" << std::endl;
22459  htmlFileP << "<style type=\"text/css\">" << std::endl;
22460  htmlFileP << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22461  << std::endl;
22462  htmlFileP << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22463  htmlFileP << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22464  "text-align: center;}"
22465  << std::endl;
22466  htmlFileP << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22467  htmlFileP << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22468  htmlFileP << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22469  htmlFileP << "</style>" << std::endl;
22470  htmlFileP << "<body>" << std::endl;
22471 
22472  if (sub == 1)
22473  htmlFileP << "<h1> Pedestals for HB, RUN = " << runnumber << " </h1>" << std::endl;
22474  if (sub == 2)
22475  htmlFileP << "<h1> Pedestals for HE, RUN = " << runnumber << " </h1>" << std::endl;
22476  if (sub == 3)
22477  htmlFileP << "<h1> Pedestals for HO, RUN = " << runnumber << " </h1>" << std::endl;
22478  if (sub == 4)
22479  htmlFileP << "<h1> Pedestals for HF, RUN = " << runnumber << " </h1>" << std::endl;
22480  htmlFileP << "<br>" << std::endl;
22481 
22482  // Pedestal:
22483  htmlFileP << "<h2> 1.Pm criterion: Pedestals for each CapID .</h3>" << std::endl;
22484  htmlFileP << "<h3> 1.A. Pedestal distribution over all events, channels for each CapID and all depths.</h3>"
22485  << std::endl;
22486  htmlFileP << "<h4> Legend: Bins less " << Pedest[0][sub] << " correpond to bad Pedestals </h4>" << std::endl;
22487  if (sub == 1)
22488  htmlFileP << " <img src=\"HistPedestalsHB.png\" />" << std::endl;
22489  if (sub == 2)
22490  htmlFileP << " <img src=\"HistPedestalsHE.png\" />" << std::endl;
22491  if (sub == 3)
22492  htmlFileP << " <img src=\"HistPedestalsHO.png\" />" << std::endl;
22493  if (sub == 4)
22494  htmlFileP << " <img src=\"HistPedestalsHF.png\" />" << std::endl;
22495  htmlFileP << "<br>" << std::endl;
22496  htmlFileP << "<h3> 1.B. Rate of channels at very low Pedestals at least in one CapID for each depth.</h3>"
22497  << std::endl;
22498  htmlFileP << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22499  if (sub == 1)
22500  htmlFileP << " <img src=\"MapRatePedHB.png\" />" << std::endl;
22501  if (sub == 2)
22502  htmlFileP << " <img src=\"MapRatePedHE.png\" />" << std::endl;
22503  if (sub == 3)
22504  htmlFileP << " <img src=\"MapRatePedHO.png\" />" << std::endl;
22505  if (sub == 4)
22506  htmlFileP << " <img src=\"MapRatePedHF.png\" />" << std::endl;
22507 
22508  // PedestalWidth:
22509  htmlFileP << "<h2> 2.pWm criterion: Pedestal Widths for each CapID .</h3>" << std::endl;
22510  htmlFileP << "<h3> 2.A. Pedestal Widths distribution over all events, channels for each CapID and all depths.</h3>"
22511  << std::endl;
22512  htmlFileP << "<h4> Legend: Bins less " << Pedest[1][sub] << " correpond to bad Pedestal Widths </h4>" << std::endl;
22513  if (sub == 1)
22514  htmlFileP << " <img src=\"HistPedestalWidthsHB.png\" />" << std::endl;
22515  if (sub == 2)
22516  htmlFileP << " <img src=\"HistPedestalWidthsHE.png\" />" << std::endl;
22517  if (sub == 3)
22518  htmlFileP << " <img src=\"HistPedestalWidthsHO.png\" />" << std::endl;
22519  if (sub == 4)
22520  htmlFileP << " <img src=\"HistPedestalWidthsHF.png\" />" << std::endl;
22521  htmlFileP << "<br>" << std::endl;
22522  htmlFileP << "<h3> 2.B. Rate of channels at very low Pedestal Widths at least in one CapID for each depth.</h3>"
22523  << std::endl;
22524  htmlFileP << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22525  if (sub == 1)
22526  htmlFileP << " <img src=\"MapRatePedWidthsHB.png\" />" << std::endl;
22527  if (sub == 2)
22528  htmlFileP << " <img src=\"MapRatePedWidthsHE.png\" />" << std::endl;
22529  if (sub == 3)
22530  htmlFileP << " <img src=\"MapRatePedWidthsHO.png\" />" << std::endl;
22531  if (sub == 4)
22532  htmlFileP << " <img src=\"MapRatePedWidthsHF.png\" />" << std::endl;
22533 
22534  // Correlations of Pedestal(Width) and fullAmplitude:
22535  htmlFileP << "<h2> 3.Pedestal and pedestalWidths vs Amplitude .</h3>" << std::endl;
22536  htmlFileP << "<h3> 3.A. Correlation of Pedestal(pedestalWidths) and Amplitude over all channels and events .</h3>"
22537  << std::endl;
22538  htmlFileP << "<h4> Legend: colour - entries </h4>" << std::endl;
22539  if (sub == 1)
22540  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHB.png\" />" << std::endl;
22541  if (sub == 2)
22542  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHE.png\" />" << std::endl;
22543  if (sub == 3)
22544  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHO.png\" />" << std::endl;
22545  if (sub == 4)
22546  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHF.png\" />" << std::endl;
22547  htmlFileP << "<br>" << std::endl;
22548  htmlFileP.close();
22549 
22550  // TSs Shapes:
22551 
22552  htmlFileS << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22553  htmlFileS << "<head>" << std::endl;
22554  htmlFileS << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22555  htmlFileS << "<title> Remote Monitoring Tool </title>" << std::endl;
22556  htmlFileS << "<style type=\"text/css\">" << std::endl;
22557  htmlFileS << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22558  << std::endl;
22559  htmlFileS << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22560  htmlFileS << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22561  "text-align: center;}"
22562  << std::endl;
22563  htmlFileS << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22564  htmlFileS << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22565  htmlFileS << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22566  htmlFileS << "</style>" << std::endl;
22567  htmlFileS << "<body>" << std::endl;
22568 
22569  if (sub == 1)
22570  htmlFileS << "<h1> ADC Shape for HB, RUN = " << runnumber << " </h1>" << std::endl;
22571  if (sub == 2)
22572  htmlFileS << "<h1> ADC Shape for HE, RUN = " << runnumber << " </h1>" << std::endl;
22573  if (sub == 3)
22574  htmlFileS << "<h1> ADC Shape for HO, RUN = " << runnumber << " </h1>" << std::endl;
22575  if (sub == 4)
22576  htmlFileS << "<h1> ADC Shape for HF, RUN = " << runnumber << " </h1>" << std::endl;
22577  htmlFileS << "<br>" << std::endl;
22578 
22579  htmlFileS << "<h2> 1.Mean ADC Shape.</h3>" << std::endl;
22580  htmlFileS << "<h3> 1.A. ADC shape averaged over all good channels, depth and events.</h3>" << std::endl;
22581  // htmlFileS << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22582  if (sub == 1)
22583  htmlFileS << " <img src=\"HistGoodTSshapesHB.png\" />" << std::endl;
22584  if (sub == 2)
22585  htmlFileS << " <img src=\"HistGoodTSshapesHE.png\" />" << std::endl;
22586  if (sub == 3)
22587  htmlFileS << " <img src=\"HistGoodTSshapesHO.png\" />" << std::endl;
22588  if (sub == 4)
22589  htmlFileS << " <img src=\"HistGoodTSshapesHF.png\" />" << std::endl;
22590  htmlFileS << "<br>" << std::endl;
22591  htmlFileS << "<h3> 1.B. ADC shape averaged over all bad channels, depth and events. Bad channels are selected by 5 "
22592  "criteria: CapId, A, W, P, Pw </h3>"
22593  << std::endl;
22594  // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22595  if (sub == 1)
22596  htmlFileS << " <img src=\"HistBadTSshapesHB.png\" />" << std::endl;
22597  if (sub == 2)
22598  htmlFileS << " <img src=\"HistBadTSshapesHE.png\" />" << std::endl;
22599  if (sub == 3)
22600  htmlFileS << " <img src=\"HistBadTSshapesHO.png\" />" << std::endl;
22601  if (sub == 4)
22602  htmlFileS << " <img src=\"HistBadTSshapesHF.png\" />" << std::endl;
22603 
22604  htmlFileS << "<h2> 2. Occupancy and rates of non-zero amplitudes for separate TSs in Sub-Detector over "
22605  "depth,eta.phi </h3>"
22606  << std::endl;
22607  htmlFileS << "<h3> 2.A. reminder:.......................... for HBHE, TS=2;...................................... "
22608  "for HF, TS=1;..................................... for HO, TS=0,1,2 </h3>"
22609  << std::endl;
22610  if (sub == 1)
22611  htmlFileS << " <img src=\"Hist_mapDepthAllTS2_HB.png\" />" << std::endl;
22612  if (sub == 2)
22613  htmlFileS << " <img src=\"Hist_mapDepthAllTS2_HE.png\" />" << std::endl;
22614  if (sub == 3)
22615  htmlFileS << " <img src=\"Hist_mapDepthAllTS012_HO.png\" />" << std::endl;
22616  if (sub == 4)
22617  htmlFileS << " <img src=\"Hist_mapDepthAllTS1_HF.png\" />" << std::endl;
22618  htmlFileS << "<br>" << std::endl;
22619 
22620  /*
22621  htmlFileS << "<h2> 2. ADC in Time Slice </h3>"<< std::endl;
22622  htmlFileS << "<h3> 2.A. ADC counts histogrammed over all channels, depth and events.</h3>"<< std::endl;
22623 // htmlFileS << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22624  if (sub==1) htmlFileS << " <img src=\"Hist_ADC_HB_All.png\" />" << std::endl;
22625  if (sub==2) htmlFileS << " <img src=\"Hist_ADC_HE_All.png\" />" << std::endl;
22626  if (sub==3) htmlFileS << " <img src=\"Hist_ADC_HO_All.png\" />" << std::endl;
22627  if (sub==4) htmlFileS << " <img src=\"Hist_ADC_HF_All.png\" />" << std::endl;
22628  htmlFileS << "<br>"<< std::endl;
22629  htmlFileS << "<h3> 2.B. ADC counts histogrammed over all channels and events for each depth separately. </h3>"<< std::endl;
22630 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22631  if (sub==1) htmlFileS << " <img src=\"Hist_ADC_HB_DS.png\" />" << std::endl;
22632  if (sub==2) htmlFileS << " <img src=\"Hist_ADC_HE_DS.png\" />" << std::endl;
22633  if (sub==3) htmlFileS << " <img src=\"Hist_ADC_HO_DS.png\" />" << std::endl;
22634  if (sub==4) htmlFileS << " <img src=\"Hist_ADC_HF_DS.png\" />" << std::endl;
22635 
22636  htmlFileS << "<h2> 3. ADC Sum in Time Slice </h3>"<< std::endl;
22637  htmlFileS << "<h3> 3.A. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"<< std::endl;
22638 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22639  if (sub==1) htmlFileS << " <img src=\"Hist_SumADC_HB.png\" />" << std::endl;
22640  if (sub==2) htmlFileS << " <img src=\"Hist_SumADC_HE.png\" />" << std::endl;
22641  if (sub==3) htmlFileS << " <img src=\"Hist_SumADC_HO.png\" />" << std::endl;
22642  if (sub==4) htmlFileS << " <img src=\"Hist_SumADC_HF.png\" />" << std::endl;
22643 
22644  htmlFileS << "<h3> 3.B. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"<< std::endl;
22645 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22646  if (sub==1) htmlFileS << " <img src=\"Hist_SumADC_HB0.png\" />" << std::endl;
22647  if (sub==2) htmlFileS << " <img src=\"Hist_SumADC_HE0.png\" />" << std::endl;
22648  if (sub==3) htmlFileS << " <img src=\"Hist_SumADC_HO0.png\" />" << std::endl;
22649  if (sub==4) htmlFileS << " <img src=\"Hist_SumADC_HF0.png\" />" << std::endl;
22650 
22651  htmlFileS << "<h3> 3.C. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"<< std::endl;
22652 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22653  if (sub==1) htmlFileS << " <img src=\"Hist_SumADC_HB1.png\" />" << std::endl;
22654  if (sub==2) htmlFileS << " <img src=\"Hist_SumADC_HE1.png\" />" << std::endl;
22655  if (sub==3) htmlFileS << " <img src=\"Hist_SumADC_HO1.png\" />" << std::endl;
22656  if (sub==4) htmlFileS << " <img src=\"Hist_SumADC_HF1.png\" />" << std::endl;
22657 */
22658  htmlFileS.close();
22659 
22661 
22663 
22665 
22666  htmlFileM << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22667  htmlFileM << "<head>" << std::endl;
22668  htmlFileM << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22669  htmlFileM << "<title> Remote Monitoring Tool </title>" << std::endl;
22670  htmlFileM << "<style type=\"text/css\">" << std::endl;
22671  htmlFileM << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22672  << std::endl;
22673  htmlFileM << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22674  htmlFileM << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22675  "text-align: center;}"
22676  << std::endl;
22677  htmlFileM << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22678  htmlFileM << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22679  htmlFileM << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22680  htmlFileM << "</style>" << std::endl;
22681  htmlFileM << "<body>" << std::endl;
22682 
22684 
22685  if (sub == 1)
22686  htmlFileM << "<h1> Digis Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>" << std::endl;
22687  if (sub == 2)
22688  htmlFileM << "<h1> Digis Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>" << std::endl;
22689  if (sub == 4)
22690  htmlFileM << "<h1> Digis Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>" << std::endl;
22691  htmlFileM << "<br>" << std::endl;
22692 
22693  htmlFileM << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
22694  htmlFileM << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
22695  // htmlFileM << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22696  if (sub == 1)
22697  htmlFileM << " <img src=\"RdigiGeneralD2PhiSymmetryHB.png\" />" << std::endl;
22698  if (sub == 2)
22699  htmlFileM << " <img src=\"RdigiGeneralD2PhiSymmetryHE.png\" />" << std::endl;
22700  if (sub == 4)
22701  htmlFileM << " <img src=\"RdigiGeneralD2PhiSymmetryHF.png\" />" << std::endl;
22702  htmlFileM << "<br>" << std::endl;
22703 
22704  htmlFileM << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
22705  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22706  if (sub == 1)
22707  htmlFileM << " <img src=\"RdigiGeneralD1PhiSymmetryHB.png\" />" << std::endl;
22708  if (sub == 2)
22709  htmlFileM << " <img src=\"RdigiGeneralD1PhiSymmetryHE.png\" />" << std::endl;
22710  if (sub == 4)
22711  htmlFileM << " <img src=\"RdigiGeneralD1PhiSymmetryHF.png\" />" << std::endl;
22712  htmlFileM << "<br>" << std::endl;
22713 
22715 
22717  htmlFileM << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
22718  htmlFileM << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
22719  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22720  if (sub == 1)
22721  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22722  if (sub == 2)
22723  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22724  if (sub == 4)
22725  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22726  htmlFileM << "<br>" << std::endl;
22727 
22728  htmlFileM << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
22729  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22730  if (sub == 1)
22731  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22732  if (sub == 2)
22733  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22734  if (sub == 4)
22735  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22736  htmlFileM << "<br>" << std::endl;
22737 
22738  htmlFileM << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
22739  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22740  if (sub == 1)
22741  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22742  if (sub == 2)
22743  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22744  if (sub == 4)
22745  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22746  htmlFileM << "<br>" << std::endl;
22747 
22748  htmlFileM << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
22749  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22750  if (sub == 1)
22751  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22752  if (sub == 2)
22753  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22754  if (sub == 4)
22755  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22756  htmlFileM << "<br>" << std::endl;
22757 
22758  if (sub == 2)
22759  htmlFileM << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
22760  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22761  if (sub == 2)
22762  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22763  htmlFileM << "<br>" << std::endl;
22764 
22765  if (sub == 2)
22766  htmlFileM << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
22767  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22768  if (sub == 2)
22769  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22770  htmlFileM << "<br>" << std::endl;
22771 
22772  if (sub == 2)
22773  htmlFileM << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
22774  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22775  if (sub == 2)
22776  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22777  htmlFileM << "<br>" << std::endl;
22778 
22780  htmlFileM << "<h2> 2: D(digivarianceSignalhe) </h3>" << std::endl;
22781  htmlFileM << "<h3> 2A: eta/phi-plot: D(digivarianceSignalhe), averaged over depthes </h3>" << std::endl;
22782  // htmlFileM << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22783  if (sub == 1)
22784  htmlFileM << " <img src=\"DdigiGeneralD2PhiSymmetryHB.png\" />" << std::endl;
22785  if (sub == 2)
22786  htmlFileM << " <img src=\"DdigiGeneralD2PhiSymmetryHE.png\" />" << std::endl;
22787  if (sub == 4)
22788  htmlFileM << " <img src=\"DdigiGeneralD2PhiSymmetryHF.png\" />" << std::endl;
22789  htmlFileM << "<br>" << std::endl;
22790 
22791  htmlFileM << "<h3> 2B: D(digivarianceSignalhe) vs phi , averaged over depthes & eta </h3>" << std::endl;
22792  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22793  if (sub == 1)
22794  htmlFileM << " <img src=\"DdigiGeneralD1PhiSymmetryHB.png\" />" << std::endl;
22795  if (sub == 2)
22796  htmlFileM << " <img src=\"DdigiGeneralD1PhiSymmetryHE.png\" />" << std::endl;
22797  if (sub == 4)
22798  htmlFileM << " <img src=\"DdigiGeneralD1PhiSymmetryHF.png\" />" << std::endl;
22799  htmlFileM << "<br>" << std::endl;
22800 
22803  htmlFileM << "<h2> Positive direction, D(digivarianceSignalhe) </h3>" << std::endl;
22804  htmlFileM << "<h3> 2C: D(digivarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
22805  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22806  if (sub == 1)
22807  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22808  if (sub == 2)
22809  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22810  if (sub == 4)
22811  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22812  htmlFileM << "<br>" << std::endl;
22813 
22814  htmlFileM << "<h3> 2.D. D(digivarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
22815  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22816  if (sub == 1)
22817  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22818  if (sub == 2)
22819  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22820  if (sub == 4)
22821  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22822  htmlFileM << "<br>" << std::endl;
22823 
22824  htmlFileM << "<h3> 2E: D(digivarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
22825  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22826  if (sub == 1)
22827  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22828  if (sub == 2)
22829  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22830  if (sub == 4)
22831  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22832  htmlFileM << "<br>" << std::endl;
22833 
22834  htmlFileM << "<h3> 2F: D(digivarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
22835  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22836  if (sub == 1)
22837  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22838  if (sub == 2)
22839  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22840  if (sub == 4)
22841  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22842  htmlFileM << "<br>" << std::endl;
22843 
22844  if (sub == 2)
22845  htmlFileM << "<h3> 2G: D(digivarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
22846  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22847  if (sub == 2)
22848  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22849  htmlFileM << "<br>" << std::endl;
22850 
22851  if (sub == 2)
22852  htmlFileM << "<h3> 2H: D(digivarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
22853  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22854  if (sub == 2)
22855  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22856  htmlFileM << "<br>" << std::endl;
22857 
22858  if (sub == 2)
22859  htmlFileM << "<h3> 2I: D(digivarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
22860  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22861  if (sub == 2)
22862  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22863  htmlFileM << "<br>" << std::endl;
22864 
22867  htmlFileM << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
22868  << std::endl;
22869 
22871  htmlFileM << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
22872  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22873  if (sub == 1)
22874  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22875  if (sub == 2)
22876  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22877  if (sub == 4)
22878  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22879  htmlFileM << "<br>" << std::endl;
22880 
22881  htmlFileM << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
22882  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22883  if (sub == 1)
22884  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22885  if (sub == 2)
22886  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22887  if (sub == 4)
22888  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22889  htmlFileM << "<br>" << std::endl;
22890 
22891  htmlFileM << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
22892  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22893  if (sub == 1)
22894  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22895  if (sub == 2)
22896  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22897  if (sub == 4)
22898  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22899  htmlFileM << "<br>" << std::endl;
22900 
22901  htmlFileM << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
22902  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22903  if (sub == 1)
22904  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22905  if (sub == 2)
22906  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22907  if (sub == 4)
22908  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22909  htmlFileM << "<br>" << std::endl;
22910 
22911  if (sub == 2)
22912  htmlFileM << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
22913  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22914  if (sub == 2)
22915  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22916  htmlFileM << "<br>" << std::endl;
22917 
22918  if (sub == 2)
22919  htmlFileM << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
22920  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22921  if (sub == 2)
22922  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22923  htmlFileM << "<br>" << std::endl;
22924 
22925  if (sub == 2)
22926  htmlFileM << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
22927  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22928  if (sub == 2)
22929  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22930  htmlFileM << "<br>" << std::endl;
22931 
22933  htmlFileM << "<h2> 4: Negative direction, D(digivarianceSignalhe) </h3>" << std::endl;
22935  htmlFileM << "<h3> 4C: D(digivarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
22936  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22937  if (sub == 1)
22938  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22939  if (sub == 2)
22940  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22941  if (sub == 4)
22942  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22943  htmlFileM << "<br>" << std::endl;
22944 
22945  htmlFileM << "<h3> 4.D. D(digivarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
22946  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22947  if (sub == 1)
22948  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22949  if (sub == 2)
22950  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22951  if (sub == 4)
22952  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22953  htmlFileM << "<br>" << std::endl;
22954 
22955  htmlFileM << "<h3> 4E: D(digivarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
22956  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22957  if (sub == 1)
22958  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22959  if (sub == 2)
22960  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22961  if (sub == 4)
22962  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22963  htmlFileM << "<br>" << std::endl;
22964 
22965  htmlFileM << "<h3> 4F: D(digivarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
22966  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22967  if (sub == 1)
22968  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22969  if (sub == 2)
22970  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22971  if (sub == 4)
22972  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22973  htmlFileM << "<br>" << std::endl;
22974 
22975  if (sub == 2)
22976  htmlFileM << "<h3> 4G: D(digivarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
22977  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22978  if (sub == 2)
22979  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22980  htmlFileM << "<br>" << std::endl;
22981 
22982  if (sub == 2)
22983  htmlFileM << "<h3> 4H: D(digivarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
22984  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22985  if (sub == 2)
22986  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22987  htmlFileM << "<br>" << std::endl;
22988 
22989  if (sub == 2)
22990  htmlFileM << "<h3> 4I: D(digivarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
22991  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22992  if (sub == 2)
22993  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22994  htmlFileM << "<br>" << std::endl;
22996  htmlFileM.close();
22998  //
23002 
23003  htmlFileR << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
23004  htmlFileR << "<head>" << std::endl;
23005  htmlFileR << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
23006  htmlFileR << "<title> Remote Monitoring Tool </title>" << std::endl;
23007  htmlFileR << "<style type=\"text/css\">" << std::endl;
23008  htmlFileR << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
23009  << std::endl;
23010  htmlFileR << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
23011  htmlFileR << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
23012  "text-align: center;}"
23013  << std::endl;
23014  htmlFileR << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
23015  htmlFileR << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
23016  htmlFileR << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
23017  htmlFileR << "</style>" << std::endl;
23018  htmlFileR << "<body>" << std::endl;
23019 
23021 
23022  if (sub == 1)
23023  htmlFileR << "<h1> RecoSignal Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>"
23024  << std::endl;
23025  if (sub == 2)
23026  htmlFileR << "<h1> RecoSignal Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>"
23027  << std::endl;
23028  if (sub == 4)
23029  htmlFileR << "<h1> RecoSignal Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>"
23030  << std::endl;
23031  htmlFileR << "<br>" << std::endl;
23032 
23033  htmlFileR << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
23034  htmlFileR << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
23035  // htmlFileR << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23036  if (sub == 1)
23037  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23038  if (sub == 2)
23039  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23040  if (sub == 4)
23041  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23042  htmlFileR << "<br>" << std::endl;
23043 
23044  htmlFileR << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
23045  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23046  if (sub == 1)
23047  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23048  if (sub == 2)
23049  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23050  if (sub == 4)
23051  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23052  htmlFileR << "<br>" << std::endl;
23053 
23055 
23057  htmlFileR << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
23058  htmlFileR << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
23059  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23060  if (sub == 1)
23061  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23062  if (sub == 2)
23063  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23064  if (sub == 4)
23065  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23066  htmlFileR << "<br>" << std::endl;
23067 
23068  htmlFileR << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
23069  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23070  if (sub == 1)
23071  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23072  if (sub == 2)
23073  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23074  if (sub == 4)
23075  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23076  htmlFileR << "<br>" << std::endl;
23077 
23078  if (sub == 1 || sub == 2)
23079  htmlFileR << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
23080  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23081  if (sub == 1)
23082  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23083  if (sub == 2)
23084  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23085  htmlFileR << "<br>" << std::endl;
23086 
23087  if (sub == 1 || sub == 2)
23088  htmlFileR << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
23089  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23090  if (sub == 1)
23091  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23092  if (sub == 2)
23093  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23094  htmlFileR << "<br>" << std::endl;
23095 
23096  if (sub == 2)
23097  htmlFileR << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
23098  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23099  if (sub == 2)
23100  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23101  htmlFileR << "<br>" << std::endl;
23102 
23103  if (sub == 2)
23104  htmlFileR << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
23105  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23106  if (sub == 2)
23107  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23108  htmlFileR << "<br>" << std::endl;
23109 
23110  if (sub == 2)
23111  htmlFileR << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
23112  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23113  if (sub == 2)
23114  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23115  htmlFileR << "<br>" << std::endl;
23116 
23118  htmlFileR << "<h2> 2: D(recosignalvarianceSignalhe) </h3>" << std::endl;
23119  htmlFileR << "<h3> 2A: eta/phi-plot: D(recosignalvarianceSignalhe), averaged over depthes </h3>" << std::endl;
23120  // htmlFileR << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23121  if (sub == 1)
23122  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23123  if (sub == 2)
23124  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23125  if (sub == 4)
23126  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23127  htmlFileR << "<br>" << std::endl;
23128 
23129  htmlFileR << "<h3> 2B: D(recosignalvarianceSignalhe) vs phi , averaged over depthes & eta </h3>" << std::endl;
23130  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23131  if (sub == 1)
23132  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23133  if (sub == 2)
23134  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23135  if (sub == 4)
23136  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23137  htmlFileR << "<br>" << std::endl;
23138 
23141  htmlFileR << "<h2> Positive direction, D(recosignalvarianceSignalhe) </h3>" << std::endl;
23142  htmlFileR << "<h3> 2C: D(recosignalvarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
23143  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23144  if (sub == 1)
23145  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23146  if (sub == 2)
23147  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23148  if (sub == 4)
23149  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23150  htmlFileR << "<br>" << std::endl;
23151 
23152  htmlFileR << "<h3> 2.D. D(recosignalvarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
23153  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23154  if (sub == 1)
23155  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23156  if (sub == 2)
23157  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23158  if (sub == 4)
23159  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23160  htmlFileR << "<br>" << std::endl;
23161 
23162  if (sub == 1 || sub == 2)
23163  htmlFileR << "<h3> 2E: D(recosignalvarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
23164  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23165  if (sub == 1)
23166  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23167  if (sub == 2)
23168  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23169  htmlFileR << "<br>" << std::endl;
23170 
23171  if (sub == 1 || sub == 2)
23172  htmlFileR << "<h3> 2F: D(recosignalvarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
23173  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23174  if (sub == 1)
23175  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23176  if (sub == 2)
23177  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23178  htmlFileR << "<br>" << std::endl;
23179 
23180  if (sub == 2)
23181  htmlFileR << "<h3> 2G: D(recosignalvarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
23182  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23183  if (sub == 2)
23184  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23185  htmlFileR << "<br>" << std::endl;
23186 
23187  if (sub == 2)
23188  htmlFileR << "<h3> 2H: D(recosignalvarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
23189  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23190  if (sub == 2)
23191  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23192  htmlFileR << "<br>" << std::endl;
23193 
23194  if (sub == 2)
23195  htmlFileR << "<h3> 2I: D(recosignalvarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
23196  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23197  if (sub == 2)
23198  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23199  htmlFileR << "<br>" << std::endl;
23200 
23203  htmlFileR << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
23204  << std::endl;
23205 
23207  htmlFileR << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
23208  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23209  if (sub == 1)
23210  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23211  if (sub == 2)
23212  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23213  if (sub == 4)
23214  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23215  htmlFileR << "<br>" << std::endl;
23216 
23217  htmlFileR << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
23218  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23219  if (sub == 1)
23220  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23221  if (sub == 2)
23222  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23223  if (sub == 4)
23224  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23225  htmlFileR << "<br>" << std::endl;
23226 
23227  if (sub == 1 || sub == 2)
23228  htmlFileR << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
23229  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23230  if (sub == 1)
23231  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23232  if (sub == 2)
23233  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23234  htmlFileR << "<br>" << std::endl;
23235 
23236  if (sub == 1 || sub == 2)
23237  htmlFileR << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
23238  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23239  if (sub == 1)
23240  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23241  if (sub == 2)
23242  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23243  htmlFileR << "<br>" << std::endl;
23244 
23245  if (sub == 2)
23246  htmlFileR << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
23247  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23248  if (sub == 2)
23249  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23250  htmlFileR << "<br>" << std::endl;
23251 
23252  if (sub == 2)
23253  htmlFileR << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
23254  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23255  if (sub == 2)
23256  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23257  htmlFileR << "<br>" << std::endl;
23258 
23259  if (sub == 2)
23260  htmlFileR << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
23261  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23262  if (sub == 2)
23263  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23264  htmlFileR << "<br>" << std::endl;
23265 
23267  htmlFileR << "<h2> 4: Negative direction, D(recosignalvarianceSignalhe) </h3>" << std::endl;
23269  htmlFileR << "<h3> 4C: D(recosignalvarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
23270  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23271  if (sub == 1)
23272  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23273  if (sub == 2)
23274  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23275  if (sub == 4)
23276  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23277  htmlFileR << "<br>" << std::endl;
23278 
23279  htmlFileR << "<h3> 4.D. D(recosignalvarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
23280  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23281  if (sub == 1)
23282  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23283  if (sub == 2)
23284  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23285  if (sub == 4)
23286  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23287  htmlFileR << "<br>" << std::endl;
23288 
23289  if (sub == 1 || sub == 2)
23290  htmlFileR << "<h3> 4E: D(recosignalvarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
23291  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23292  if (sub == 1)
23293  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23294  if (sub == 2)
23295  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23296  htmlFileR << "<br>" << std::endl;
23297 
23298  if (sub == 1 || sub == 2)
23299  htmlFileR << "<h3> 4F: D(recosignalvarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
23300  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23301  if (sub == 1)
23302  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23303  if (sub == 2)
23304  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23305  htmlFileR << "<br>" << std::endl;
23306 
23307  if (sub == 2)
23308  htmlFileR << "<h3> 4G: D(recosignalvarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
23309  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23310  if (sub == 2)
23311  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23312  htmlFileR << "<br>" << std::endl;
23313 
23314  if (sub == 2)
23315  htmlFileR << "<h3> 4H: D(recosignalvarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
23316  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23317  if (sub == 2)
23318  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23319  htmlFileR << "<br>" << std::endl;
23320 
23321  if (sub == 2)
23322  htmlFileR << "<h3> 4I: D(recosignalvarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
23323  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23324  if (sub == 2)
23325  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23326  htmlFileR << "<br>" << std::endl;
23328  htmlFileR.close();
23330  //
23334 
23335  htmlFileN << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
23336  htmlFileN << "<head>" << std::endl;
23337  htmlFileN << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
23338  htmlFileN << "<title> Remote Monitoring Tool </title>" << std::endl;
23339  htmlFileN << "<style type=\"text/css\">" << std::endl;
23340  htmlFileN << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
23341  << std::endl;
23342  htmlFileN << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
23343  htmlFileN << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
23344  "text-align: center;}"
23345  << std::endl;
23346  htmlFileN << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
23347  htmlFileN << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
23348  htmlFileN << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
23349  htmlFileN << "</style>" << std::endl;
23350  htmlFileN << "<body>" << std::endl;
23351 
23353 
23354  if (sub == 1)
23355  htmlFileN << "<h1> RecoNoise Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>"
23356  << std::endl;
23357  if (sub == 2)
23358  htmlFileN << "<h1> RecoNoise Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>"
23359  << std::endl;
23360  if (sub == 4)
23361  htmlFileN << "<h1> RecoNoise Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>"
23362  << std::endl;
23363  htmlFileN << "<br>" << std::endl;
23364 
23365  htmlFileN << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
23366  htmlFileN << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
23367  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23368  if (sub == 1)
23369  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23370  if (sub == 2)
23371  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23372  if (sub == 4)
23373  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23374  htmlFileN << "<br>" << std::endl;
23375 
23376  htmlFileN << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
23377  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23378  if (sub == 1)
23379  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23380  if (sub == 2)
23381  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23382  if (sub == 4)
23383  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23384  htmlFileN << "<br>" << std::endl;
23385 
23387 
23389  htmlFileN << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
23390  htmlFileN << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
23391  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23392  if (sub == 1)
23393  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23394  if (sub == 2)
23395  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23396  if (sub == 4)
23397  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23398  htmlFileN << "<br>" << std::endl;
23399 
23400  htmlFileN << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
23401  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23402  if (sub == 1)
23403  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23404  if (sub == 2)
23405  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23406  if (sub == 4)
23407  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23408  htmlFileN << "<br>" << std::endl;
23409 
23410  if (sub == 1 || sub == 2)
23411  htmlFileN << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
23412  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23413  if (sub == 1)
23414  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23415  if (sub == 2)
23416  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23417  htmlFileN << "<br>" << std::endl;
23418 
23419  if (sub == 1 || sub == 2)
23420  htmlFileN << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
23421  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23422  if (sub == 1)
23423  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23424  if (sub == 2)
23425  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23426  htmlFileN << "<br>" << std::endl;
23427 
23428  if (sub == 2)
23429  htmlFileN << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
23430  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23431  if (sub == 2)
23432  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23433  htmlFileN << "<br>" << std::endl;
23434 
23435  if (sub == 2)
23436  htmlFileN << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
23437  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23438  if (sub == 2)
23439  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23440  htmlFileN << "<br>" << std::endl;
23441 
23442  if (sub == 2)
23443  htmlFileN << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
23444  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23445  if (sub == 2)
23446  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23447  htmlFileN << "<br>" << std::endl;
23448 
23450  htmlFileN << "<h2> 2: D(reconoisevarianceNoisehe) </h3>" << std::endl;
23451  htmlFileN << "<h3> 2A: eta/phi-plot: D(reconoisevarianceNoisehe), averaged over depthes </h3>" << std::endl;
23452  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23453  if (sub == 1)
23454  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23455  if (sub == 2)
23456  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23457  if (sub == 4)
23458  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23459  htmlFileN << "<br>" << std::endl;
23460 
23461  htmlFileN << "<h3> 2B: D(reconoisevarianceNoisehe) vs phi , averaged over depthes & eta </h3>" << std::endl;
23462  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23463  if (sub == 1)
23464  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23465  if (sub == 2)
23466  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23467  if (sub == 4)
23468  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23469  htmlFileN << "<br>" << std::endl;
23470 
23473  htmlFileN << "<h2> Positive direction, D(reconoisevarianceNoisehe) </h3>" << std::endl;
23474  htmlFileN << "<h3> 2C: D(reconoisevarianceNoisehe) vs phi , different eta, Depth1 </h3>" << std::endl;
23475  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23476  if (sub == 1)
23477  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23478  if (sub == 2)
23479  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23480  if (sub == 4)
23481  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23482  htmlFileN << "<br>" << std::endl;
23483 
23484  htmlFileN << "<h3> 2.D. D(reconoisevarianceNoisehe) vs phi , different eta, Depth2 </h3>" << std::endl;
23485  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23486  if (sub == 1)
23487  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23488  if (sub == 2)
23489  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23490  if (sub == 4)
23491  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23492  htmlFileN << "<br>" << std::endl;
23493 
23494  if (sub == 1 || sub == 2)
23495  htmlFileN << "<h3> 2E: D(reconoisevarianceNoisehe) vs phi , different eta, Depth3 </h3>" << std::endl;
23496  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23497  if (sub == 1)
23498  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23499  if (sub == 2)
23500  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23501  htmlFileN << "<br>" << std::endl;
23502 
23503  if (sub == 1 || sub == 2)
23504  htmlFileN << "<h3> 2F: D(reconoisevarianceNoisehe) vs phi , different eta, Depth4 </h3>" << std::endl;
23505  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23506  if (sub == 1)
23507  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23508  if (sub == 2)
23509  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23510  htmlFileN << "<br>" << std::endl;
23511 
23512  if (sub == 2)
23513  htmlFileN << "<h3> 2G: D(reconoisevarianceNoisehe) vs phi , different eta, Depth5 </h3>" << std::endl;
23514  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23515  if (sub == 2)
23516  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23517  htmlFileN << "<br>" << std::endl;
23518 
23519  if (sub == 2)
23520  htmlFileN << "<h3> 2H: D(reconoisevarianceNoisehe) vs phi , different eta, Depth6 </h3>" << std::endl;
23521  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23522  if (sub == 2)
23523  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23524  htmlFileN << "<br>" << std::endl;
23525 
23526  if (sub == 2)
23527  htmlFileN << "<h3> 2I: D(reconoisevarianceNoisehe) vs phi , different eta, Depth7 </h3>" << std::endl;
23528  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23529  if (sub == 2)
23530  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23531  htmlFileN << "<br>" << std::endl;
23532 
23535  htmlFileN << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
23536  << std::endl;
23537 
23539  htmlFileN << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
23540  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23541  if (sub == 1)
23542  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23543  if (sub == 2)
23544  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23545  if (sub == 4)
23546  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23547  htmlFileN << "<br>" << std::endl;
23548 
23549  htmlFileN << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
23550  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23551  if (sub == 1)
23552  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23553  if (sub == 2)
23554  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23555  if (sub == 4)
23556  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23557  htmlFileN << "<br>" << std::endl;
23558 
23559  if (sub == 1 || sub == 2)
23560  htmlFileN << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
23561  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23562  if (sub == 1)
23563  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23564  if (sub == 2)
23565  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23566  htmlFileN << "<br>" << std::endl;
23567 
23568  if (sub == 1 || sub == 2)
23569  htmlFileN << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
23570  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23571  if (sub == 1)
23572  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23573  if (sub == 2)
23574  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23575  htmlFileN << "<br>" << std::endl;
23576 
23577  if (sub == 2)
23578  htmlFileN << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
23579  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23580  if (sub == 2)
23581  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23582  htmlFileN << "<br>" << std::endl;
23583 
23584  if (sub == 2)
23585  htmlFileN << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
23586  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23587  if (sub == 2)
23588  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23589  htmlFileN << "<br>" << std::endl;
23590 
23591  if (sub == 2)
23592  htmlFileN << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
23593  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23594  if (sub == 2)
23595  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23596  htmlFileN << "<br>" << std::endl;
23597 
23599  htmlFileN << "<h2> 4: Negative direction, D(reconoisevarianceNoisehe) </h3>" << std::endl;
23601  htmlFileN << "<h3> 4C: D(reconoisevarianceNoisehe) vs phi , different eta, Depth1 </h3>" << std::endl;
23602  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23603  if (sub == 1)
23604  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23605  if (sub == 2)
23606  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23607  if (sub == 4)
23608  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23609  htmlFileN << "<br>" << std::endl;
23610 
23611  htmlFileN << "<h3> 4.D. D(reconoisevarianceNoisehe) vs phi , different eta, Depth2 </h3>" << std::endl;
23612  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23613  if (sub == 1)
23614  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23615  if (sub == 2)
23616  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23617  if (sub == 4)
23618  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23619  htmlFileN << "<br>" << std::endl;
23620 
23621  if (sub == 1 || sub == 2)
23622  htmlFileN << "<h3> 4E: D(reconoisevarianceNoisehe) vs phi , different eta, Depth3 </h3>" << std::endl;
23623  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23624  if (sub == 1)
23625  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23626  if (sub == 2)
23627  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23628  htmlFileN << "<br>" << std::endl;
23629 
23630  if (sub == 1 || sub == 2)
23631  htmlFileN << "<h3> 4F: D(reconoisevarianceNoisehe) vs phi , different eta, Depth4 </h3>" << std::endl;
23632  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23633  if (sub == 1)
23634  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23635  if (sub == 2)
23636  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23637  htmlFileN << "<br>" << std::endl;
23638 
23639  if (sub == 2)
23640  htmlFileN << "<h3> 4G: D(reconoisevarianceNoisehe) vs phi , different eta, Depth5 </h3>" << std::endl;
23641  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23642  if (sub == 2)
23643  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23644  htmlFileN << "<br>" << std::endl;
23645 
23646  if (sub == 2)
23647  htmlFileN << "<h3> 4H: D(reconoisevarianceNoisehe) vs phi , different eta, Depth6 </h3>" << std::endl;
23648  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23649  if (sub == 2)
23650  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23651  htmlFileN << "<br>" << std::endl;
23652 
23653  if (sub == 2)
23654  htmlFileN << "<h3> 4I: D(reconoisevarianceNoisehe) vs phi , different eta, Depth7 </h3>" << std::endl;
23655  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23656  if (sub == 2)
23657  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23658  htmlFileN << "<br>" << std::endl;
23660 
23662 
23663  if (sub == 1)
23664  htmlFileN << "<h1> Only for Noise RecHits these lines below, HB, RUN = " << runnumber << " </h1>" << std::endl;
23665  if (sub == 2)
23666  htmlFileN << "<h1> Only for Noise RecHits these lines below, HE, RUN = " << runnumber << " </h1>" << std::endl;
23667  if (sub == 4)
23668  htmlFileN << "<h1> Only for Noise RecHits these lines below, HF, RUN = " << runnumber << " </h1>" << std::endl;
23669  htmlFileN << "<br>" << std::endl;
23670 
23671  htmlFileN << "<h2> 5: DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>" << std::endl;
23672  htmlFileN << "<h3> 5A: eta/phi-plot: DIF, averaged over depthes </h3>" << std::endl;
23673  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23674  if (sub == 1)
23675  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23676  if (sub == 2)
23677  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23678  if (sub == 4)
23679  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23680  htmlFileN << "<br>" << std::endl;
23681 
23682  htmlFileN << "<h3> 5B: DIF vs phi , averaged over depthes & eta </h3>" << std::endl;
23683  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23684  if (sub == 1)
23685  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23686  if (sub == 2)
23687  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23688  if (sub == 4)
23689  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23690  htmlFileN << "<br>" << std::endl;
23691 
23693 
23695  htmlFileN << "<h2> Positive direction, DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>"
23696  << std::endl;
23697  htmlFileN << "<h3> 5C: DIF vs phi , different eta, Depth1 </h3>" << std::endl;
23698  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23699  if (sub == 1)
23700  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23701  if (sub == 2)
23702  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23703  if (sub == 4)
23704  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23705  htmlFileN << "<br>" << std::endl;
23706 
23707  htmlFileN << "<h3> 5D: DIF vs phi , different eta, Depth2 </h3>" << std::endl;
23708  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23709  if (sub == 1)
23710  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23711  if (sub == 2)
23712  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23713  if (sub == 4)
23714  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23715  htmlFileN << "<br>" << std::endl;
23716 
23717  if (sub == 1 || sub == 2)
23718  htmlFileN << "<h3> 1E: DIF vs phi , different eta, Depth3 </h3>" << std::endl;
23719  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23720  if (sub == 1)
23721  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23722  if (sub == 2)
23723  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23724  htmlFileN << "<br>" << std::endl;
23725 
23726  if (sub == 1 || sub == 2)
23727  htmlFileN << "<h3> 5F: DIF vs phi , different eta, Depth4 </h3>" << std::endl;
23728  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23729  if (sub == 1)
23730  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23731  if (sub == 2)
23732  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23733  htmlFileN << "<br>" << std::endl;
23734 
23735  if (sub == 2)
23736  htmlFileN << "<h3> 5G: DIF vs phi , different eta, Depth5 </h3>" << std::endl;
23737  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23738  if (sub == 2)
23739  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23740  htmlFileN << "<br>" << std::endl;
23741 
23742  if (sub == 2)
23743  htmlFileN << "<h3> 5H: DIF vs phi , different eta, Depth6 </h3>" << std::endl;
23744  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23745  if (sub == 2)
23746  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23747  htmlFileN << "<br>" << std::endl;
23748 
23749  if (sub == 2)
23750  htmlFileN << "<h3> 5I: DIF vs phi , different eta, Depth7 </h3>" << std::endl;
23751  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23752  if (sub == 2)
23753  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23754  htmlFileN << "<br>" << std::endl;
23755 
23757 
23759  htmlFileN << "<h2> Negative direction, DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>"
23760  << std::endl;
23761  htmlFileN << "<h3> 5C: DIF vs phi , different eta, Depth1 </h3>" << std::endl;
23762  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23763  if (sub == 1)
23764  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23765  if (sub == 2)
23766  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23767  if (sub == 4)
23768  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23769  htmlFileN << "<br>" << std::endl;
23770 
23771  htmlFileN << "<h3> 5D: DIF vs phi , different eta, Depth2 </h3>" << std::endl;
23772  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23773  if (sub == 1)
23774  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23775  if (sub == 2)
23776  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23777  if (sub == 4)
23778  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23779  htmlFileN << "<br>" << std::endl;
23780 
23781  if (sub == 1 || sub == 2)
23782  htmlFileN << "<h3> 5E: DIF vs phi , different eta, Depth3 </h3>" << std::endl;
23783  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23784  if (sub == 1)
23785  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23786  if (sub == 2)
23787  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23788  htmlFileN << "<br>" << std::endl;
23789 
23790  if (sub == 1 || sub == 2)
23791  htmlFileN << "<h3> 5F: DIF vs phi , different eta, Depth4 </h3>" << std::endl;
23792  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23793  if (sub == 1)
23794  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23795  if (sub == 2)
23796  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23797  htmlFileN << "<br>" << std::endl;
23798 
23799  if (sub == 2)
23800  htmlFileN << "<h3> 5G: DIF vs phi , different eta, Depth5 </h3>" << std::endl;
23801  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23802  if (sub == 2)
23803  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23804  htmlFileN << "<br>" << std::endl;
23805 
23806  if (sub == 2)
23807  htmlFileN << "<h3> 5H: DIF vs phi , different eta, Depth6 </h3>" << std::endl;
23808  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23809  if (sub == 2)
23810  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23811  htmlFileN << "<br>" << std::endl;
23812 
23813  if (sub == 2)
23814  htmlFileN << "<h3> 5I: DIF vs phi , different eta, Depth7 </h3>" << std::endl;
23815  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23816  if (sub == 2)
23817  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23818  htmlFileN << "<br>" << std::endl;
23819 
23821 
23822  //
23823  //
23824  htmlFileN.close();
23825 
23828 
23829  //
23830  //
23831  } // end sub //for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
23832 
23833  //======================================================================
23834 
23835  std::cout << "********" << std::endl;
23836  std::cout << "************ Start creating subdet html pages: - rather long time needed, waiting please"
23837  << std::endl;
23838  //======================================================================
23839  // Creating subdet html pages:
23840 
23841  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
23842  ofstream htmlFile;
23843  if (sub == 1)
23844  htmlFile.open("HB.html");
23845  if (sub == 2)
23846  htmlFile.open("HE.html");
23847  if (sub == 3)
23848  htmlFile.open("HO.html");
23849  if (sub == 4)
23850  htmlFile.open("HF.html");
23851 
23852  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
23853  htmlFile << "<head>" << std::endl;
23854  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
23855  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
23856  htmlFile << "<style type=\"text/css\">" << std::endl;
23857  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
23858  << std::endl;
23859  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
23860  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
23861  "text-align: center;}"
23862  << std::endl;
23863  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
23864  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
23865  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
23866  htmlFile << " td.s5 { font-family: arial, arial ce, helvetica; background-color: #FF00FF; }" << std::endl;
23867  htmlFile << " td.s6 { font-family: arial, arial ce, helvetica; background-color: #9ACD32; }" << std::endl;
23868  htmlFile << " td.s7 { font-family: arial, arial ce, helvetica; background-color: #32CD32; }" << std::endl;
23869  htmlFile << " td.s8 { font-family: arial, arial ce, helvetica; background-color: #00FFFF; }" << std::endl;
23870  htmlFile << " td.s9 { font-family: arial, arial ce, helvetica; background-color: #FFE4E1; }" << std::endl;
23871  htmlFile << " td.s10 { font-family: arial, arial ce, helvetica; background-color: #A0522D; }" << std::endl;
23872  htmlFile << " td.s11 { font-family: arial, arial ce, helvetica; background-color: #1E90FF; }" << std::endl;
23873  htmlFile << " td.s12 { font-family: arial, arial ce, helvetica; background-color: #00BFFF; }" << std::endl;
23874  htmlFile << " td.s13 { font-family: arial, arial ce, helvetica; background-color: #FFFF00; }" << std::endl;
23875  htmlFile << " td.s14 { font-family: arial, arial ce, helvetica; background-color: #B8860B; }" << std::endl;
23876  htmlFile << "</style>" << std::endl;
23877  htmlFile << "<body>" << std::endl;
23878  if (sub == 1)
23879  htmlFile << "<h1> HCAL BARREL, RUN = " << runnumber << " </h1>" << std::endl;
23880  if (sub == 2)
23881  htmlFile << "<h1> HCAL ENDCAP, RUN = " << runnumber << " </h1>" << std::endl;
23882  if (sub == 3)
23883  htmlFile << "<h1> HCAL OUTER, RUN = " << runnumber << " </h1>" << std::endl;
23884  if (sub == 4)
23885  htmlFile << "<h1> HCAL FORWARD, RUN = " << runnumber << " </h1>" << std::endl;
23886  htmlFile << "<br>" << std::endl;
23887  if (sub == 1)
23888  htmlFile << "<h2> 1. Analysis results for HB</h2>" << std::endl;
23889  if (sub == 2)
23890  htmlFile << "<h2> 1. Analysis results for HE</h2>" << std::endl;
23891  if (sub == 3)
23892  htmlFile << "<h2> 1. Analysis results for HO</h2>" << std::endl;
23893  if (sub == 4)
23894  htmlFile << "<h2> 1. Analysis results for HF</h2>" << std::endl;
23895  htmlFile << "<table width=\"600\">" << std::endl;
23896  htmlFile << "<tr>" << std::endl;
23897 
23898  if (sub == 1) {
23899  htmlFile << " <td><a href=\"HB_Tile.html\">Megatile Channels</a></td>" << std::endl;
23900  htmlFile << " <td><a href=\"HB_Calib.html\">Calibration Channels</a></td>" << std::endl;
23901  htmlFile << " <td><a href=\"HB_Drift.html\">Gain Stability</a></td>" << std::endl;
23902  htmlFile << " <td><a href=\"HB_Pedestals.html\">Pedestals</a></td>" << std::endl;
23903  htmlFile << " <td><a href=\"HB_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23904  htmlFile << " <td><a href=\"HB_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>" << std::endl;
23905  htmlFile << " <td><a href=\"HB_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>" << std::endl;
23906  htmlFile << " <td><a href=\"HB_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>" << std::endl;
23907 
23908  /*
23909  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HB_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23910  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HB_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23911  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HB_Drift.html\">Gain Stability</a></td>"<< std::endl;
23912  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HB_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23913  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HB_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23914  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HB_PhiSymmetryDigi.html\">Phi-SymmetryDigi</a></td>"<< std::endl;
23915  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HB_PhiSymmetryRecoSignal.html\">Phi-SymmetryRecoSignal</a></td>"<< std::endl;
23916  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HB_PhiSymmetryRecoNoise.html\">Phi-SymmetryRecoNoise</a></td>"<< std::endl;
23917 */
23918  }
23919  if (sub == 2) {
23920  htmlFile << " <td><a href=\"HE_Tile.html\">Megatile Channels</a></td>" << std::endl;
23921  htmlFile << " <td><a href=\"HE_Calib.html\">Calibration Channels</a></td>" << std::endl;
23922  htmlFile << " <td><a href=\"HE_Drift.html\">Gain Stability</a></td>" << std::endl;
23923  htmlFile << " <td><a href=\"HE_Pedestals.html\">Pedestals</a></td>" << std::endl;
23924  htmlFile << " <td><a href=\"HE_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23925  htmlFile << " <td><a href=\"HE_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>" << std::endl;
23926  htmlFile << " <td><a href=\"HE_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>" << std::endl;
23927  htmlFile << " <td><a href=\"HE_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>" << std::endl;
23928 
23929  /*
23930  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HE_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23931  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HE_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23932  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HE_Drift.html\">Gain Stability</a></td>"<< std::endl;
23933  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HE_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23934  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HE_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23935  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HE_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>"<< std::endl;
23936  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HE_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>"<< std::endl;
23937  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HE_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>"<< std::endl;
23938  */
23939  }
23940  if (sub == 3) {
23941  htmlFile << " <td><a href=\"HO_Tile.html\">Megatile Channels</a></td>" << std::endl;
23942  htmlFile << " <td><a href=\"HO_Calib.html\">Calibration Channels</a></td>" << std::endl;
23943  htmlFile << " <td><a href=\"HO_Drift.html\">Gain Stability</a></td>" << std::endl;
23944  htmlFile << " <td><a href=\"HO_Pedestals.html\">Pedestals</a></td>" << std::endl;
23945  htmlFile << " <td><a href=\"HO_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23946 
23947  /*
23948  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HO_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23949  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HO_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23950  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HO_Drift.html\">Gain Stability</a></td>"<< std::endl;
23951  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HO_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23952  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HO_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23953  */
23954  }
23955 
23956  if (sub == 4) {
23957  htmlFile << " <td><a href=\"HF_Tile.html\">Megatile Channels</a></td>" << std::endl;
23958  htmlFile << " <td><a href=\"HF_Calib.html\">Calibration Channels</a></td>" << std::endl;
23959  htmlFile << " <td><a href=\"HF_Drift.html\">Gain Stability</a></td>" << std::endl;
23960  htmlFile << " <td><a href=\"HF_Pedestals.html\">Pedestals</a></td>" << std::endl;
23961  htmlFile << " <td><a href=\"HF_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23962  htmlFile << " <td><a href=\"HF_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>" << std::endl;
23963  htmlFile << " <td><a href=\"HF_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>" << std::endl;
23964  htmlFile << " <td><a href=\"HF_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>" << std::endl;
23965 
23966  /*
23967  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HF_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23968  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HF_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23969  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HF_Drift.html\">Gain Stability</a></td>"<< std::endl;
23970  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HF_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23971  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HF_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23972  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HF_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>"<< std::endl;
23973  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HF_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>"<< std::endl;
23974  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HF_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>"<< std::endl;
23975  */
23976  }
23977 
23978  htmlFile << "</tr>" << std::endl;
23979  htmlFile << "</table>" << std::endl;
23980  htmlFile << "<br>" << std::endl;
23981  if (sub == 1)
23982  htmlFile << "<h2> 2.Status HB over all criteria </h2>" << std::endl;
23983  if (sub == 2)
23984  htmlFile << "<h2> 2.Status HE over all criteria </h2>" << std::endl;
23985  if (sub == 3)
23986  htmlFile << "<h2> 2.Status HO over all criteria </h2>" << std::endl;
23987  if (sub == 4)
23988  htmlFile << "<h2> 2.Status HF over all criteria </h2>" << std::endl;
23989  htmlFile << "<h3> 2.A.Channel map for each Depth </h3>" << std::endl;
23990  htmlFile << "<h4> Channel legend: green - good, red - bad (rate of failures at least 0.1), yellow - at least 2% "
23991  "gain drift, white - not applicable or out of range </h4>"
23992  << std::endl;
23993  if (sub == 1)
23994  htmlFile << " <img src=\"MAPHB.png\" />" << std::endl;
23995  if (sub == 2)
23996  htmlFile << " <img src=\"MAPHE.png\" />" << std::endl;
23997  if (sub == 3)
23998  htmlFile << " <img src=\"MAPHO.png\" />" << std::endl;
23999  if (sub == 4)
24000  htmlFile << " <img src=\"MAPHF.png\" />" << std::endl;
24001  htmlFile << "<br>" << std::endl;
24002 
24003  htmlFile << "<h3> 2.B.List of Bad channels (rate > 0.1) and its rates for each RMT criteria (for GS - %) </h3>"
24004  << std::endl;
24005 
24006  // htmlFile << " <td><a href=\"HELP.html\"> Description of criteria for bad channel selection</a></td>"<< std::endl;
24007  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24008  << "/HELP.html\"> Description of criteria for bad channel selection</a></td>" << std::endl;
24009 
24010  htmlFile << "<table>" << std::endl;
24011  htmlFile << "<tr>";
24012  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24013  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24014  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24015  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24016  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24017  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24018  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24019  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24020  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24021  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24022  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24023  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24024  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24025  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24026  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24027  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24028  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24029  htmlFile << "<td class=\"s5\" align=\"center\">Cm</td>" << std::endl;
24030  htmlFile << "<td class=\"s5\" align=\"center\">Am</td>" << std::endl;
24031  htmlFile << "<td class=\"s5\" align=\"center\">Wm</td>" << std::endl;
24032  htmlFile << "<td class=\"s5\" align=\"center\">Rm</td>" << std::endl;
24033  htmlFile << "<td class=\"s5\" align=\"center\">TNm</td>" << std::endl;
24034  htmlFile << "<td class=\"s5\" align=\"center\">TXm</td>" << std::endl;
24035  htmlFile << "<td class=\"s9\" align=\"center\">GS (%)</td>" << std::endl;
24036  htmlFile << "<td class=\"s4\" align=\"center\">Pm</td>" << std::endl;
24037  htmlFile << "<td class=\"s4\" align=\"center\">pWm</td>" << std::endl;
24038  htmlFile << "<td class=\"s8\" align=\"center\">Cc</td>" << std::endl;
24039  htmlFile << "<td class=\"s8\" align=\"center\">Ac</td>" << std::endl;
24040  htmlFile << "<td class=\"s8\" align=\"center\">Wc</td>" << std::endl;
24041  htmlFile << "<td class=\"s8\" align=\"center\">Rc</td>" << std::endl;
24042  htmlFile << "<td class=\"s8\" align=\"center\">TNc</td>" << std::endl;
24043  htmlFile << "<td class=\"s8\" align=\"center\">TXc</td>" << std::endl;
24044 
24045  htmlFile << "</tr>" << std::endl;
24046 
24047  for (int i = 1; i <= NBad; i++) {
24048  if ((ind % 2) == 1) {
24049  raw_class = "<td class=\"s2\" align=\"center\">";
24050  raw_class1 = "<td class=\"s6\" align=\"center\">";
24051  raw_class2 = "<td class=\"s11\" align=\"center\">";
24052  raw_class3 = "<td class=\"s13\" align=\"center\">";
24053 
24054  } else {
24055  raw_class = "<td class=\"s3\" align=\"center\">";
24056  raw_class1 = "<td class=\"s7\" align=\"center\">";
24057  raw_class2 = "<td class=\"s12\" align=\"center\">";
24058  raw_class3 = "<td class=\"s14\" align=\"center\">";
24059  }
24060  const CellDB db;
24061  CellDB ce;
24062  if ((ce.size() >= 1) && (Sub[2][i] == sub)) {
24063  if (Sub[2][i] == 1) {
24064  ce = db.find("subdet", "HB").find("Eta", Eta[2][i]).find("Phi", Phi[2][i]).find("Depth", Depth[2][i]);
24065  if (ce.size() == 0) {
24066  // cout<<"Error: No such HB, Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;
24067  continue;
24068  } else if (ce.size() > 1) {
24069  cout << "Warning: More than one line correspond to such HB, Eta=" << Eta[2][i] << ", Phi=" << Phi[2][i]
24070  << ", Depth=" << Depth[2][i] << " in database" << endl;
24071  }
24072  }
24073  if (Sub[2][i] == 2) {
24074  ce = db.find("subdet", "HE").find("Eta", Eta[2][i]).find("Phi", Phi[2][i]).find("Depth", Depth[2][i]);
24075  if (ce.size() == 0) {
24076  // cout<<"Error: No such HE, Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;
24077  continue;
24078  } else if (ce.size() > 1) {
24079  cout << "Warning: More than one line correspond to such HE, Eta=" << Eta[2][i] << ", Phi=" << Phi[2][i]
24080  << ", Depth=" << Depth[2][i] << " in database" << endl;
24081  }
24082  }
24083  if (Sub[2][i] == 3) {
24084  ce = db.find("subdet", "HO").find("Eta", Eta[2][i]).find("Phi", Phi[2][i]).find("Depth", Depth[2][i]);
24085  if (ce.size() == 0) {
24086  // cout<<"Error: No such HO, Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;
24087  continue;
24088  } else if (ce.size() > 1) {
24089  cout << "Warning: More than one line correspond to such HO, Eta=" << Eta[2][i] << ", Phi=" << Phi[2][i]
24090  << ", Depth=" << Depth[2][i] << " in database" << endl;
24091  }
24092  }
24093  if (Sub[2][i] == 4) {
24094  ce = db.find("subdet", "HF").find("Eta", Eta[2][i]).find("Phi", Phi[2][i]).find("Depth", Depth[2][i]);
24095  if (ce.size() == 0) {
24096  // cout<<"Error: No such HF, Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;
24097  continue;
24098  } else if (ce.size() > 1) {
24099  cout << "Warning: More than one line correspond to such HF, Eta=" << Eta[2][i] << ", Phi=" << Phi[2][i]
24100  << ", Depth=" << Depth[2][i] << " in database" << endl;
24101  }
24102  }
24103  htmlFile << "<tr>" << std::endl;
24104  htmlFile << "<td class=\"s4\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24105  htmlFile << raw_class << Eta[2][i] << "</td>" << std::endl;
24106  htmlFile << raw_class << Phi[2][i] << "</td>" << std::endl;
24107  htmlFile << raw_class << Depth[2][i] << "</td>" << std::endl;
24108  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24109  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24110  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24111  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24112  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24113  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24114  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24115  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24116  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24117  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24118  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24119  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24120  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24121  htmlFile << raw_class1 << Map_Ampl[1][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24122  << "</td>" << std::endl;
24123  htmlFile << raw_class1 << Map_Ampl[2][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24124  << "</td>" << std::endl;
24125  htmlFile << raw_class1 << Map_Ampl[3][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24126  << "</td>" << std::endl;
24127  htmlFile << raw_class1 << Map_Ampl[4][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24128  << "</td>" << std::endl;
24129  htmlFile << raw_class1 << Map_Ampl[5][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24130  << "</td>" << std::endl;
24131  htmlFile << raw_class1 << Map_Ampl[6][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24132  << "</td>" << std::endl;
24133  htmlFile << raw_class3 << Map_Ampl[21][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24134  << "</td>" << std::endl;
24135  htmlFile << raw_class << Map_Ampl[31][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24136  << "</td>" << std::endl;
24137  htmlFile << raw_class << Map_Ampl[32][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24138  << "</td>" << std::endl;
24139  htmlFile << raw_class2 << Map_Ampl[11][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24140  << "</td>" << std::endl;
24141  htmlFile << raw_class2 << Map_Ampl[12][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24142  << "</td>" << std::endl;
24143  htmlFile << raw_class2 << Map_Ampl[13][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24144  << "</td>" << std::endl;
24145  htmlFile << raw_class2 << Map_Ampl[14][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24146  << "</td>" << std::endl;
24147  htmlFile << raw_class2 << Map_Ampl[15][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24148  << "</td>" << std::endl;
24149  htmlFile << raw_class2 << Map_Ampl[16][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24150  << "</td>" << std::endl;
24151  htmlFile << "</tr>" << std::endl;
24152 
24153  ind += 1;
24154  }
24155  }
24156  htmlFile << "</table>" << std::endl;
24157  htmlFile << "<br>" << std::endl;
24158 
24159  htmlFile << "<h3> 2.C.List of Gain unstable channels and its value in % (for other criterias - rate)</h3>"
24160  << std::endl;
24161  htmlFile << "<table>" << std::endl;
24162  htmlFile << "<tr>";
24163  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24164  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24165  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24166  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24167  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24168  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24169  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24170  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24171  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24172  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24173  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24174  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24175  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24176  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24177  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24178  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24179  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24180  htmlFile << "<td class=\"s5\" align=\"center\">Cm</td>" << std::endl;
24181  htmlFile << "<td class=\"s5\" align=\"center\">Am</td>" << std::endl;
24182  htmlFile << "<td class=\"s5\" align=\"center\">Wm</td>" << std::endl;
24183  htmlFile << "<td class=\"s5\" align=\"center\">Rm</td>" << std::endl;
24184  htmlFile << "<td class=\"s5\" align=\"center\">TNm</td>" << std::endl;
24185  htmlFile << "<td class=\"s5\" align=\"center\">TXm</td>" << std::endl;
24186  htmlFile << "<td class=\"s9\" align=\"center\">GS(%)</td>" << std::endl;
24187  htmlFile << "<td class=\"s4\" align=\"center\">Pm</td>" << std::endl;
24188  htmlFile << "<td class=\"s4\" align=\"center\">pWm</td>" << std::endl;
24189  htmlFile << "<td class=\"s8\" align=\"center\">Cc</td>" << std::endl;
24190  htmlFile << "<td class=\"s8\" align=\"center\">Ac</td>" << std::endl;
24191  htmlFile << "<td class=\"s8\" align=\"center\">Wc</td>" << std::endl;
24192  htmlFile << "<td class=\"s8\" align=\"center\">Rc</td>" << std::endl;
24193  htmlFile << "<td class=\"s8\" align=\"center\">TNc</td>" << std::endl;
24194  htmlFile << "<td class=\"s8\" align=\"center\">TXc</td>" << std::endl;
24195  htmlFile << "</tr>" << std::endl;
24196 
24197  for (int i = 1; i <= NWarn; i++) {
24198  if ((ind % 2) == 1) {
24199  raw_class = "<td class=\"s2\" align=\"center\">";
24200  raw_class1 = "<td class=\"s6\" align=\"center\">";
24201  raw_class2 = "<td class=\"s11\" align=\"center\">";
24202  raw_class3 = "<td class=\"s13\" align=\"center\">";
24203 
24204  } else {
24205  raw_class = "<td class=\"s3\" align=\"center\">";
24206  raw_class1 = "<td class=\"s7\" align=\"center\">";
24207  raw_class2 = "<td class=\"s12\" align=\"center\">";
24208  raw_class3 = "<td class=\"s14\" align=\"center\">";
24209  }
24210  const CellDB db;
24211  CellDB ce;
24212  if ((ce.size() >= 1) && (Sub[1][i] == sub)) {
24213  if (Sub[1][i] == 1) {
24214  ce = db.find("subdet", "HB").find("Eta", Eta[1][i]).find("Phi", Phi[1][i]).find("Depth", Depth[1][i]);
24215  if (ce.size() == 0) {
24216  // cout<<"Error: No such HB, Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;
24217  continue;
24218  } else if (ce.size() > 1) {
24219  cout << "Warning: More than one line correspond to such HB, Eta=" << Eta[1][i] << ", Phi=" << Phi[1][i]
24220  << ", Depth=" << Depth[1][i] << " in database" << endl;
24221  }
24222  }
24223  if (Sub[1][i] == 2) {
24224  ce = db.find("subdet", "HE").find("Eta", Eta[1][i]).find("Phi", Phi[1][i]).find("Depth", Depth[1][i]);
24225  if (ce.size() == 0) {
24226  // cout<<"Error: No such HE, Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;
24227  continue;
24228  } else if (ce.size() > 1) {
24229  cout << "Warning: More than one line correspond to such HE, Eta=" << Eta[1][i] << ", Phi=" << Phi[1][i]
24230  << ", Depth=" << Depth[1][i] << " in database" << endl;
24231  }
24232  }
24233  if (Sub[1][i] == 3) {
24234  ce = db.find("subdet", "HO").find("Eta", Eta[1][i]).find("Phi", Phi[1][i]).find("Depth", Depth[1][i]);
24235  if (ce.size() == 0) {
24236  // cout<<"Error: No such HO, Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;
24237  continue;
24238  } else if (ce.size() > 1) {
24239  cout << "Warning: More than one line correspond to such HO, Eta=" << Eta[1][i] << ", Phi=" << Phi[1][i]
24240  << ", Depth=" << Depth[1][i] << " in database" << endl;
24241  }
24242  }
24243  if (Sub[1][i] == 4) {
24244  ce = db.find("subdet", "HF").find("Eta", Eta[1][i]).find("Phi", Phi[1][i]).find("Depth", Depth[1][i]);
24245  if (ce.size() == 0) {
24246  // cout<<"Error: No such HF, Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;
24247  continue;
24248  } else if (ce.size() > 1) {
24249  cout << "Warning: More than one line correspond to such HF, Eta=" << Eta[1][i] << ", Phi=" << Phi[1][i]
24250  << ", Depth=" << Depth[1][i] << " in database" << endl;
24251  }
24252  }
24253  htmlFile << "<td class=\"s4\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24254  htmlFile << raw_class << Eta[1][i] << "</td>" << std::endl;
24255  htmlFile << raw_class << Phi[1][i] << "</td>" << std::endl;
24256  htmlFile << raw_class << Depth[1][i] << "</td>" << std::endl;
24257  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24258  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24259  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24260  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24261  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24262  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24263  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24264  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24265  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24266  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24267  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24268  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24269  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24270  htmlFile << raw_class1 << Map_Ampl[1][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24271  << "</td>" << std::endl;
24272  htmlFile << raw_class1 << Map_Ampl[2][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24273  << "</td>" << std::endl;
24274  htmlFile << raw_class1 << Map_Ampl[3][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24275  << "</td>" << std::endl;
24276  htmlFile << raw_class1 << Map_Ampl[4][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24277  << "</td>" << std::endl;
24278  htmlFile << raw_class1 << Map_Ampl[5][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24279  << "</td>" << std::endl;
24280  htmlFile << raw_class1 << Map_Ampl[6][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24281  << "</td>" << std::endl;
24282  htmlFile << raw_class3 << Map_Ampl[21][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24283  << "</td>" << std::endl;
24284  htmlFile << raw_class << Map_Ampl[31][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24285  << "</td>" << std::endl;
24286  htmlFile << raw_class << Map_Ampl[32][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24287  << "</td>" << std::endl;
24288  htmlFile << raw_class2 << Map_Ampl[11][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24289  << "</td>" << std::endl;
24290  htmlFile << raw_class2 << Map_Ampl[12][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24291  << "</td>" << std::endl;
24292  htmlFile << raw_class2 << Map_Ampl[13][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24293  << "</td>" << std::endl;
24294  htmlFile << raw_class2 << Map_Ampl[14][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24295  << "</td>" << std::endl;
24296  htmlFile << raw_class2 << Map_Ampl[15][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24297  << "</td>" << std::endl;
24298  htmlFile << raw_class2 << Map_Ampl[16][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24299  << "</td>" << std::endl;
24300  htmlFile << "</tr>" << std::endl;
24301  htmlFile << "</tr>" << std::endl;
24302  ind += 1;
24303  }
24304  }
24305  htmlFile << "</table>" << std::endl;
24306  htmlFile << "<br>" << std::endl;
24307 
24308  htmlFile << "<h3> 2.D.List of channels with Bad Pedestals (rate > 0.1) and its rates (for GS - %)</h3>"
24309  << std::endl;
24310  htmlFile << "<table>" << std::endl;
24311  htmlFile << "<tr>";
24312  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24313  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24314  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24315  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24316  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24317  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24318  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24319  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24320  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24321  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24322  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24323  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24324  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24325  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24326  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24327  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24328  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24329  htmlFile << "<td class=\"s5\" align=\"center\">Cm</td>" << std::endl;
24330  htmlFile << "<td class=\"s5\" align=\"center\">Am</td>" << std::endl;
24331  htmlFile << "<td class=\"s5\" align=\"center\">Wm</td>" << std::endl;
24332  htmlFile << "<td class=\"s5\" align=\"center\">Rm</td>" << std::endl;
24333  htmlFile << "<td class=\"s5\" align=\"center\">TNm</td>" << std::endl;
24334  htmlFile << "<td class=\"s5\" align=\"center\">TXm</td>" << std::endl;
24335  htmlFile << "<td class=\"s9\" align=\"center\">GS(%)</td>" << std::endl;
24336  htmlFile << "<td class=\"s4\" align=\"center\">Pm</td>" << std::endl;
24337  htmlFile << "<td class=\"s4\" align=\"center\">pWm</td>" << std::endl;
24338  htmlFile << "<td class=\"s8\" align=\"center\">Cc</td>" << std::endl;
24339  htmlFile << "<td class=\"s8\" align=\"center\">Ac</td>" << std::endl;
24340  htmlFile << "<td class=\"s8\" align=\"center\">Wc</td>" << std::endl;
24341  htmlFile << "<td class=\"s8\" align=\"center\">Rc</td>" << std::endl;
24342  htmlFile << "<td class=\"s8\" align=\"center\">TNc</td>" << std::endl;
24343  htmlFile << "<td class=\"s8\" align=\"center\">TXc</td>" << std::endl;
24344  htmlFile << "</tr>" << std::endl;
24345 
24346  for (int i = 1; i <= NPed; i++) {
24347  if ((ind % 2) == 1) {
24348  raw_class = "<td class=\"s2\" align=\"center\">";
24349  raw_class1 = "<td class=\"s6\" align=\"center\">";
24350  raw_class2 = "<td class=\"s11\" align=\"center\">";
24351  raw_class3 = "<td class=\"s13\" align=\"center\">";
24352 
24353  } else {
24354  raw_class = "<td class=\"s3\" align=\"center\">";
24355  raw_class1 = "<td class=\"s7\" align=\"center\">";
24356  raw_class2 = "<td class=\"s12\" align=\"center\">";
24357  raw_class3 = "<td class=\"s14\" align=\"center\">";
24358  }
24359  const CellDB db;
24360  CellDB ce;
24361  if ((ce.size() >= 1) && (Sub[3][i] == sub)) {
24362  if (Sub[3][i] == 1) {
24363  ce = db.find("subdet", "HB").find("Eta", Eta[3][i]).find("Phi", Phi[3][i]).find("Depth", Depth[3][i]);
24364  if (ce.size() == 0) {
24365  // cout<<"Error: No such HB, Eta="<< Eta[3][i] <<", Phi="<< Phi[3][i] <<", Depth="<< Depth[3][i] <<" in database"<<endl;
24366  continue;
24367  } else if (ce.size() > 1) {
24368  cout << "Warning: More than one line correspond to such HB, Eta=" << Eta[3][i] << ", Phi=" << Phi[3][i]
24369  << ", Depth=" << Depth[3][i] << " in database" << endl;
24370  }
24371  }
24372  if (Sub[3][i] == 2) {
24373  ce = db.find("subdet", "HE").find("Eta", Eta[3][i]).find("Phi", Phi[3][i]).find("Depth", Depth[3][i]);
24374  if (ce.size() == 0) {
24375  // cout<<"Error: No such HE, Eta="<< Eta[3][i] <<", Phi="<< Phi[3][i] <<", Depth="<< Depth[3][i] <<" in database"<<endl;
24376  continue;
24377  } else if (ce.size() > 1) {
24378  cout << "Warning: More than one line correspond to such HE, Eta=" << Eta[3][i] << ", Phi=" << Phi[3][i]
24379  << ", Depth=" << Depth[3][i] << " in database" << endl;
24380  }
24381  }
24382  if (Sub[3][i] == 3) {
24383  ce = db.find("subdet", "HO").find("Eta", Eta[3][i]).find("Phi", Phi[3][i]).find("Depth", Depth[3][i]);
24384  if (ce.size() == 0) {
24385  // cout<<"Error: No such HO, Eta="<< Eta[3][i] <<", Phi="<< Phi[3][i] <<", Depth="<< Depth[3][i] <<" in database"<<endl;
24386  continue;
24387  } else if (ce.size() > 1) {
24388  cout << "Warning: More than one line correspond to such HO, Eta=" << Eta[3][i] << ", Phi=" << Phi[3][i]
24389  << ", Depth=" << Depth[3][i] << " in database" << endl;
24390  }
24391  }
24392  if (Sub[3][i] == 4) {
24393  ce = db.find("subdet", "HF").find("Eta", Eta[3][i]).find("Phi", Phi[3][i]).find("Depth", Depth[3][i]);
24394  if (ce.size() == 0) {
24395  // cout<<"Error: No such HF, Eta="<< Eta[3][i] <<", Phi="<< Phi[3][i] <<", Depth="<< Depth[3][i] <<" in database"<<endl;
24396  continue;
24397  } else if (ce.size() > 1) {
24398  cout << "Warning: More than one line correspond to such HF, Eta=" << Eta[3][i] << ", Phi=" << Phi[3][i]
24399  << ", Depth=" << Depth[3][i] << " in database" << endl;
24400  }
24401  }
24402  htmlFile << "<td class=\"s4\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24403  htmlFile << raw_class << Eta[3][i] << "</td>" << std::endl;
24404  htmlFile << raw_class << Phi[3][i] << "</td>" << std::endl;
24405  htmlFile << raw_class << Depth[3][i] << "</td>" << std::endl;
24406  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24407  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24408  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24409  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24410  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24411  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24412  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24413  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24414  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24415  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24416  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24417  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24418  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24419  htmlFile << raw_class1 << Map_Ampl[1][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24420  << "</td>" << std::endl;
24421  htmlFile << raw_class1 << Map_Ampl[2][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24422  << "</td>" << std::endl;
24423  htmlFile << raw_class1 << Map_Ampl[3][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24424  << "</td>" << std::endl;
24425  htmlFile << raw_class1 << Map_Ampl[4][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24426  << "</td>" << std::endl;
24427  htmlFile << raw_class1 << Map_Ampl[5][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24428  << "</td>" << std::endl;
24429  htmlFile << raw_class1 << Map_Ampl[6][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24430  << "</td>" << std::endl;
24431  htmlFile << raw_class3 << Map_Ampl[21][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24432  << "</td>" << std::endl;
24433  htmlFile << raw_class << Map_Ampl[31][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24434  << "</td>" << std::endl;
24435  htmlFile << raw_class << Map_Ampl[32][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24436  << "</td>" << std::endl;
24437  htmlFile << raw_class2 << Map_Ampl[11][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24438  << "</td>" << std::endl;
24439  htmlFile << raw_class2 << Map_Ampl[12][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24440  << "</td>" << std::endl;
24441  htmlFile << raw_class2 << Map_Ampl[13][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24442  << "</td>" << std::endl;
24443  htmlFile << raw_class2 << Map_Ampl[14][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24444  << "</td>" << std::endl;
24445  htmlFile << raw_class2 << Map_Ampl[15][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24446  << "</td>" << std::endl;
24447  htmlFile << raw_class2 << Map_Ampl[16][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24448  << "</td>" << std::endl;
24449  htmlFile << "</tr>" << std::endl;
24450  htmlFile << "</tr>" << std::endl;
24451  ind += 1;
24452  }
24453  }
24454  htmlFile << "</table>" << std::endl;
24455 
24456  htmlFile << "</body> " << std::endl;
24457  htmlFile << "</html> " << std::endl;
24458  htmlFile.close();
24459  }
24460 
24461  //======================================================================
24462 
24463  std::cout << "********" << std::endl;
24464  std::cout << "************ Start creating description HELP html file:" << std::endl;
24465  //======================================================================
24466  // Creating description html file:
24467  ofstream htmlFile;
24468  htmlFile.open("HELP.html");
24469  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
24470  htmlFile << "<head>" << std::endl;
24471  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
24472  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
24473  htmlFile << "<style type=\"text/css\">" << std::endl;
24474  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
24475  << std::endl;
24476  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
24477  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
24478  "text-align: center;}"
24479  << std::endl;
24480  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
24481  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
24482  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
24483  htmlFile << "</style>" << std::endl;
24484  htmlFile << "<body>" << std::endl;
24485  htmlFile << "<h1> Description of Remote Monitoring Tool criteria for bad channel selection</h1>" << std::endl;
24486  htmlFile << "<br>" << std::endl;
24487  htmlFile << "<h3> - C means CAPID Errors assuming we inspect CAPID non-rotation,error & validation bits, and for "
24488  "this criterion - no need to apply any cuts to select bcs.</h3> "
24489  << std::endl;
24490  htmlFile << "<br>" << std::endl;
24491  htmlFile << "<h3> - A means full amplitude, collected over all time slices </h3> " << std::endl;
24492  htmlFile << "<h3> - R means ratio criterion where we define as a bad, the channels, for which the signal portion in "
24493  "4 middle TSs(plus one, minus two around TS with maximal amplitude) is out of some range of reasonable "
24494  "values </h3> "
24495  << std::endl;
24496  htmlFile << "<br>" << std::endl;
24497  htmlFile << "<h3> - W means width of shape distribution. Width is defined as square root from dispersion. </h3> "
24498  << std::endl;
24499  htmlFile << "<br>" << std::endl;
24500  htmlFile << "<h3> - TN means mean time position of adc signal. </h3> " << std::endl;
24501  htmlFile << "<br>" << std::endl;
24502  htmlFile << "<h3> - TX means TS number of maximum signal </h3> " << std::endl;
24503  htmlFile << "<br>" << std::endl;
24504  htmlFile << "<h3> - m means megatile channels. For example Am means Amplitude criteria for megatile channels </h3> "
24505  << std::endl;
24506  htmlFile << "<br>" << std::endl;
24507  htmlFile
24508  << "<h3> - c means calibration channels. For example Ac means Amplitude criteria for calibration channels </h3> "
24509  << std::endl;
24510  htmlFile << "<br>" << std::endl;
24511  htmlFile << "<h3> - Pm means Pedestals. </h3> " << std::endl;
24512  htmlFile << "<br>" << std::endl;
24513  htmlFile << "<h3> - pWm means pedestal Width. </h3> " << std::endl;
24514  htmlFile << "<br>" << std::endl;
24515  htmlFile << "</body> " << std::endl;
24516  htmlFile << "</html> " << std::endl;
24517  htmlFile.close();
24518 
24519  //======================================================================
24520 
24521  std::cout << "********" << std::endl;
24522  std::cout << "************ Start creating MAP html file: - rather long time needed, waiting please" << std::endl;
24523  //======================================================================
24524  // Creating main html file:
24525  htmlFile.open("MAP.html");
24526  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
24527  htmlFile << "<head>" << std::endl;
24528  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
24529  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
24530  htmlFile << "<style type=\"text/css\">" << std::endl;
24531  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
24532  << std::endl;
24533  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
24534  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
24535  "text-align: center;}"
24536  << std::endl;
24537  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
24538  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
24539  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
24540  htmlFile << " td.s5 { font-family: arial, arial ce, helvetica; background-color: #FF00FF; }" << std::endl;
24541  htmlFile << " td.s6 { font-family: arial, arial ce, helvetica; background-color: #9ACD32; }" << std::endl;
24542  htmlFile << " td.s7 { font-family: arial, arial ce, helvetica; background-color: #32CD32; }" << std::endl;
24543  htmlFile << "</style>" << std::endl;
24544  htmlFile << "<body>" << std::endl;
24545 
24546  htmlFile << "<h1> Remote Monitoring Tool, LED RUN = " << runnumber << ". </h1>" << std::endl;
24547  htmlFile << "<br>" << std::endl;
24548 
24549  htmlFile << "<h2> 1. Analysis results for subdetectors </h2>" << std::endl;
24550  htmlFile << "<table width=\"400\">" << std::endl;
24551  htmlFile << "<tr>" << std::endl;
24552 
24553  htmlFile << " <td><a href=\"HB.html\">HB</a></td>" << std::endl;
24554  htmlFile << " <td><a href=\"HE.html\">HE</a></td>" << std::endl;
24555  htmlFile << " <td><a href=\"HO.html\">HO</a></td>" << std::endl;
24556  htmlFile << " <td><a href=\"HF.html\">HF</a></td>" << std::endl;
24557 
24558  /*
24559  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HB.html\">HB</a></td>"<< std::endl;
24560  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HE.html\">HE</a></td>"<< std::endl;
24561  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HO.html\">HO</a></td>"<< std::endl;
24562  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_"<<runnumber<<"/HF.html\">HF</a></td>"<< std::endl;
24563 */
24564 
24565  htmlFile << "</tr>" << std::endl;
24566  htmlFile << "</table>" << std::endl;
24567  htmlFile << "<br>" << std::endl;
24568 
24569  htmlFile << "<h2> 2. Amplitude summed over all sub-detector channels vs first 1000 events of this Run </h2>"
24570  << std::endl;
24571  htmlFile << "<h3> 2.A. Total subdetector Amplitude vs iEvent </h3>" << std::endl;
24572  htmlFile << " <img src=\"EVENTDEPENDENCE.png\" />" << std::endl;
24573  htmlFile << "<br>" << std::endl;
24574  htmlFile << "<br>" << std::endl;
24575  htmlFile << "<br>" << std::endl;
24576 
24577  htmlFile << "<h2> 3. HCAL status over all criteria and subdetectors </h2>" << std::endl;
24578  htmlFile << "<h3> 3.A. Channels in detector space </h3>" << std::endl;
24579  htmlFile << "<h4> Legend for channel status: green - good, red - bad, yellow - at least 2% gain drift, white - not "
24580  "applicable or out of range </h4>"
24581  << std::endl;
24582  htmlFile << " <img src=\"MAP.png\" />" << std::endl;
24583  htmlFile << "<br>" << std::endl;
24584  htmlFile << "<br>" << std::endl;
24585 
24586  htmlFile << "<h3> 3.B. List of Bad channels </h3>" << std::endl;
24587 
24588  // htmlFile << " <td><a href=\"HELP.html\"> Description of criteria for bad channel selection</a></td>"<< std::endl;
24589  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24590  << "/HELP.html\"> Description of criteria for bad channel selection</a></td>" << std::endl;
24591  htmlFile << "<table>" << std::endl;
24592  htmlFile << "<tr>";
24593  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24594  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24595  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24596  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24597  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24598  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24599  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24600  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24601  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24602  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24603  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24604  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24605  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24606  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24607  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24608  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24609  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24610  htmlFile << "<td class=\"s5\" align=\"center\">RMT-criteria</td>" << std::endl;
24611  htmlFile << "</tr>" << std::endl;
24612 
24613  ind = 0;
24614 
24615  for (int i = 1; i <= NBad; i++) {
24616  if ((ind % 2) == 1) {
24617  raw_class = "<td class=\"s2\" align=\"center\">";
24618  raw_class1 = "<td class=\"s6\" align=\"center\">";
24619  } else {
24620  raw_class = "<td class=\"s3\" align=\"center\">";
24621  raw_class1 = "<td class=\"s7\" align=\"center\">";
24622  }
24623  const CellDB db;
24624  const CellDB ce = db.find("Eta", Eta[2][i]).find("Phi", Phi[2][i]).find("Depth", Depth[2][i]);
24625  if (ce.size() == 0) {
24626  // cout<<"Error: No such Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;
24627  continue;
24628  }
24629  // else if (ce.size()>1) { cout<<"Warning: More than one line correspond to such Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;}
24630 
24631  if (ce.size() >= 1) {
24632  htmlFile << "<tr>" << std::endl;
24633  htmlFile << "<td class=\"s1\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24634  htmlFile << raw_class << Eta[2][i] << "</td>" << std::endl;
24635  htmlFile << raw_class << Phi[2][i] << "</td>" << std::endl;
24636  htmlFile << raw_class << Depth[2][i] << "</td>" << std::endl;
24637  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24638  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24639  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24640  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24641  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24642  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24643  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24644  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24645  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24646  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24647  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24648  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24649  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24650  htmlFile << raw_class1 << Comment[2][i] << "</td>" << std::endl;
24651  htmlFile << "</tr>" << std::endl;
24652 
24653  ind += 1;
24654  }
24655  }
24656  htmlFile << "</table>" << std::endl;
24657  htmlFile << "<br>" << std::endl;
24658 
24659  htmlFile << "<h3> 2.C.List of Gain unstable channels </h3>" << std::endl;
24660  // htmlFile << " <td><a href=\"HELP.html\"> Description of criteria for bad channel selection</a></td>"<< std::endl;
24661  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24662  << "/HELP.html\"> Description of criteria for bad channel selection</a></td>" << std::endl;
24663 
24664  htmlFile << "<table>" << std::endl;
24665  htmlFile << "<tr>";
24666  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24667  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24668  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24669  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24670  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24671  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24672  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24673  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24674  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24675  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24676  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24677  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24678  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24679  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24680  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24681  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24682  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24683  htmlFile << "<td class=\"s5\" align=\"center\">Failed criteria</td>" << std::endl;
24684  htmlFile << "</tr>" << std::endl;
24685 
24686  for (int i = 1; i <= NWarn; i++) {
24687  if ((ind % 2) == 1) {
24688  raw_class = "<td class=\"s2\" align=\"center\">";
24689  raw_class1 = "<td class=\"s6\" align=\"center\">";
24690  } else {
24691  raw_class = "<td class=\"s3\" align=\"center\">";
24692  raw_class1 = "<td class=\"s7\" align=\"center\">";
24693  }
24694  const CellDB db;
24695  const CellDB ce = db.find("Eta", Eta[1][i]).find("Phi", Phi[1][i]).find("Depth", Depth[1][i]);
24696  if (ce.size() == 0) {
24697  // cout<<"Error: No such Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;
24698  continue;
24699  }
24700  // else if (ce.size()>1) { cout<<"Warning: More than one line correspond to such Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;}
24701 
24702  if (ce.size() >= 1) {
24703  htmlFile << "<tr>" << std::endl;
24704  htmlFile << "<td class=\"s1\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24705  htmlFile << raw_class << Eta[1][i] << "</td>" << std::endl;
24706  htmlFile << raw_class << Phi[1][i] << "</td>" << std::endl;
24707  htmlFile << raw_class << Depth[1][i] << "</td>" << std::endl;
24708  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24709  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24710  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24711  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24712  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24713  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24714  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24715  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24716  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24717  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24718  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24719  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24720  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24721  htmlFile << raw_class1 << Comment[1][i] << "</td>" << std::endl;
24722  htmlFile << "</tr>" << std::endl;
24723 
24724  ind += 1;
24725  }
24726  }
24727 
24728  htmlFile << "</table>" << std::endl;
24729  htmlFile << "<br>" << std::endl;
24730 
24731  htmlFile << "<h3> 2.D.List of channels with bad Pedestals </h3>" << std::endl;
24732  // htmlFile << " <td><a href=\"HELP.html\"> Description of criteria for bad channel selection</a></td>"<< std::endl;
24733  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24734  << "/HELP.html\"> Description of criteria for bad channel selection</a></td>" << std::endl;
24735 
24736  htmlFile << "<table>" << std::endl;
24737  htmlFile << "<tr>";
24738  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24739  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24740  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24741  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24742  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24743  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24744  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24745  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24746  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24747  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24748  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24749  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24750  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24751  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24752  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24753  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24754  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24755  htmlFile << "<td class=\"s5\" align=\"center\">Failed criteria</td>" << std::endl;
24756  htmlFile << "</tr>" << std::endl;
24757 
24758  for (int i = 1; i <= NPed; i++) {
24759  if ((ind % 2) == 1) {
24760  raw_class = "<td class=\"s2\" align=\"center\">";
24761  raw_class1 = "<td class=\"s6\" align=\"center\">";
24762  } else {
24763  raw_class = "<td class=\"s3\" align=\"center\">";
24764  raw_class1 = "<td class=\"s7\" align=\"center\">";
24765  }
24766  const CellDB db;
24767  const CellDB ce = db.find("Eta", Eta[3][i]).find("Phi", Phi[3][i]).find("Depth", Depth[3][i]);
24768  if (ce.size() == 0) {
24769  // cout<<"Error: No such Eta="<< Eta[3][i] << ", Phi="<< Phi[3][i] <<", Depth="<< Depth[3][i] <<" in database"<<endl;
24770  continue;
24771  }
24772  // else if (ce.size()>1) { cout<<"Warning: More than one line correspond to such Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;}
24773 
24774  if (ce.size() >= 1) {
24775  htmlFile << "<tr>" << std::endl;
24776  htmlFile << "<td class=\"s1\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24777  htmlFile << raw_class << Eta[3][i] << "</td>" << std::endl;
24778  htmlFile << raw_class << Phi[3][i] << "</td>" << std::endl;
24779  htmlFile << raw_class << Depth[3][i] << "</td>" << std::endl;
24780  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24781  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24782  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24783  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24784  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24785  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24786  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24787  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24788  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24789  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24790  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24791  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24792  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24793  htmlFile << raw_class1 << Comment[3][i] << "</td>" << std::endl;
24794  htmlFile << "</tr>" << std::endl;
24795 
24796  ind += 1;
24797  }
24798  }
24799 
24800  htmlFile << "</table>" << std::endl;
24801 
24802  htmlFile << "</body> " << std::endl;
24803  htmlFile << "</html> " << std::endl;
24804  htmlFile.close();
24805  //======================================================================
24806 
24807  //======================================================================
24808  // Close and delete all possible things:
24809  hfile->Close();
24810  // hfile->Delete();
24811  // Exit Root
24812  gSystem->Exit(0);
24813  //======================================================================
24814 }
const int nphi
CellDB find(const std::string par, const T val) const
tuple db
Definition: EcalCondDB.py:153
int size() const
const int nsub
const int neta
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
uint16_t const *__restrict__ x
Definition: gpuClustering.h:39
tuple argc
Definition: dir2webdir.py:39
string fname
main script
tuple cout
Definition: gather_cfg.py:144
const int ndepth
#define str(s)