CMS 3D CMS Logo

RemoteMonitoringIMPSMTEST.cc
Go to the documentation of this file.
1 // How to run: ./RemoteMonitoringIMPSM.cc.exe root_file1 root_file_ref Global
2 //
3 //
4 //
5 //
6 
7 #include "LogEleMapdb.h"
8 
9 #include <iostream>
10 #include <fstream>
11 
12 #include "TH1.h"
13 #include "TH2.h"
14 #include "TCanvas.h"
15 #include "TROOT.h"
16 #include <TMath.h>
17 #include "TStyle.h"
18 #include "TSystem.h"
19 #include "TLegend.h"
20 #include "TText.h"
21 #include "TAxis.h"
22 #include "TFile.h"
23 #include "TLine.h"
24 #include "TGraph.h"
25 
26 using namespace std;
27 int main(int argc, char* argv[]) {
28  std::string dirnm = "Analyzer";
29  gROOT->Reset();
30  gROOT->SetStyle("Plain");
31  gStyle->SetOptStat(0);
32  gStyle->SetOptTitle(1);
33  // ok change
34  if (argc < 3)
35  return 1;
36  char fname[300];
37  char refname[300];
38  char runtypeC[300];
39  sprintf(fname, "%s", argv[1]);
40  sprintf(refname, "%s", argv[2]);
41  sprintf(runtypeC, "%s", argv[3]);
42  // std::cout<<fname<<" "<<refname<<" "<<runtypeC<<std::endl;
43  std::cout << " We are here to print fname refname runtypeC " << fname << " " << refname << " " << runtypeC
44  << std::endl;
45  // ok change
46 
47  //======================================================================
48  // Connect the input files, parameters and get the 2-d histogram in memory
49  string promt = (string)fname;
50  string runtype = (string)runtypeC;
51  string runnumber = "";
52  for (unsigned int i = promt.size() - 11; i < promt.size() - 5; i++)
53  runnumber += fname[i];
54 
55  TFile* hfile = new TFile(fname, "READ");
56  hfile->ls();
57  TDirectory* dir = (TDirectory*)hfile->FindObjectAny(dirnm.c_str());
58 
59  // with TfileService implementation, change everywhere below: hfile->Get to dir->FindObjectAny
60 
61  //======================================================================
62  // Prepare histograms and plot them to .png files
63 
64  // Phi-symmetry for Calibration Group:
65 
66  TCanvas* c1x0 = new TCanvas("c1x0", "c1x0", 300, 10, 800, 700);
67 
68  TCanvas* c1x1 = new TCanvas("c1x1", "c1x1", 100, 10, 600, 700);
69 
70  TCanvas* c2x1 = new TCanvas("c2x1", "c2x1", 200, 300, 1600, 800);
71 
72  TCanvas* c3x5 = new TCanvas("c3x5", "c3x5", 1000, 1500);
73  //
74 
75  char* str = (char*)alloca(10000);
76 
77  // before upgrade 2017:
78  // depth: HB depth1,2; HE depth1,2,3; HO depth4; HF depth1,2
79  // 5 depthes: 0(empty), 1,2,3,4
80 
81  // upgrade 2017:
82  // depth: HB depth1,2; HE depth1,2,3,4,5,6,7; HO depth4; HF depth1,2,3,4
83  // 8 depthes: 0(empty), 1,2,3,4,5,6,7
84 
85  // upgrade 2021:
86  // depth: HB depth1,2,3,4; HE depth1,2,3,4,5,6,7; HO depth4; HF depth1,2,3,4
87  // 10 depthes: 0(empty), 1,2,3,4,5,6,7,8,9
88 
89  // Int_t ALLDEPTH = 5;
90  // Int_t ALLDEPTH = 8;
91  Int_t ALLDEPTH = 10;
92 
93  int k_min[5] = {0, 1, 1, 4, 1}; // minimum depth for each subdet
94  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
95  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
96  int k_max[5] = {0, 4, 7, 4, 4}; // maximum depth for each subdet
98 
99  const int nsub = 4;
100  const int neta = 82;
101  const int nphi = 72;
102  int njeta = neta;
103  int njphi = nphi;
104  //const int ndepth = 7;
105  int ndepth;
109 
116  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
117  //ndepth = k_max[5];
118  ndepth = 4;
119  double arecosignalHB[ndepth][njeta][njphi];
120  double recosignalvarianceHB[ndepth][njeta][njphi];
121  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HB recSignalEnergy
122  TH2F* recSignalEnergy1HB1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HB1");
123  TH2F* recSignalEnergy0HB1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB1");
124  TH2F* recSignalEnergyHB1 = (TH2F*)recSignalEnergy1HB1->Clone("recSignalEnergyHB1");
125  recSignalEnergyHB1->Divide(recSignalEnergy1HB1, recSignalEnergy0HB1, 1, 1, "B");
126  TH2F* recSignalEnergy1HB2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HB2");
127  TH2F* recSignalEnergy0HB2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB2");
128  TH2F* recSignalEnergyHB2 = (TH2F*)recSignalEnergy1HB2->Clone("recSignalEnergyHB2");
129  recSignalEnergyHB2->Divide(recSignalEnergy1HB2, recSignalEnergy0HB2, 1, 1, "B");
130  TH2F* recSignalEnergy1HB3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HB3");
131  TH2F* recSignalEnergy0HB3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB3");
132  TH2F* recSignalEnergyHB3 = (TH2F*)recSignalEnergy1HB3->Clone("recSignalEnergyHB3");
133  recSignalEnergyHB3->Divide(recSignalEnergy1HB3, recSignalEnergy0HB3, 1, 1, "B");
134  TH2F* recSignalEnergy1HB4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HB4");
135  TH2F* recSignalEnergy0HB4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB4");
136  TH2F* recSignalEnergyHB4 = (TH2F*)recSignalEnergy1HB4->Clone("recSignalEnergyHB4");
137  recSignalEnergyHB4->Divide(recSignalEnergy1HB4, recSignalEnergy0HB4, 1, 1, "B");
138  for (int jeta = 0; jeta < njeta; jeta++) {
139  //====================================================================== PHI normalization & put R into massive arecosignalHB
140  //preparation for PHI normalization:
141  double sumrecosignalHB0 = 0;
142  int nsumrecosignalHB0 = 0;
143  double sumrecosignalHB1 = 0;
144  int nsumrecosignalHB1 = 0;
145  double sumrecosignalHB2 = 0;
146  int nsumrecosignalHB2 = 0;
147  double sumrecosignalHB3 = 0;
148  int nsumrecosignalHB3 = 0;
149  for (int jphi = 0; jphi < njphi; jphi++) {
150  arecosignalHB[0][jeta][jphi] = recSignalEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
151  arecosignalHB[1][jeta][jphi] = recSignalEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
152  arecosignalHB[2][jeta][jphi] = recSignalEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
153  arecosignalHB[3][jeta][jphi] = recSignalEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
154  if (arecosignalHB[0][jeta][jphi] > 0.) {
155  sumrecosignalHB0 += arecosignalHB[0][jeta][jphi];
156  ++nsumrecosignalHB0;
157  }
158  if (arecosignalHB[1][jeta][jphi] > 0.) {
159  sumrecosignalHB1 += arecosignalHB[1][jeta][jphi];
160  ++nsumrecosignalHB1;
161  }
162  if (arecosignalHB[2][jeta][jphi] > 0.) {
163  sumrecosignalHB2 += arecosignalHB[2][jeta][jphi];
164  ++nsumrecosignalHB2;
165  }
166  if (arecosignalHB[3][jeta][jphi] > 0.) {
167  sumrecosignalHB3 += arecosignalHB[3][jeta][jphi];
168  ++nsumrecosignalHB3;
169  }
170  } // phi
171  // PHI normalization:
172  for (int jphi = 0; jphi < njphi; jphi++) {
173  if (arecosignalHB[0][jeta][jphi] > 0.)
174  arecosignalHB[0][jeta][jphi] /= (sumrecosignalHB0 / nsumrecosignalHB0);
175  if (arecosignalHB[1][jeta][jphi] > 0.)
176  arecosignalHB[1][jeta][jphi] /= (sumrecosignalHB1 / nsumrecosignalHB1);
177  if (arecosignalHB[2][jeta][jphi] > 0.)
178  arecosignalHB[2][jeta][jphi] /= (sumrecosignalHB2 / nsumrecosignalHB2);
179  if (arecosignalHB[3][jeta][jphi] > 0.)
180  arecosignalHB[3][jeta][jphi] /= (sumrecosignalHB3 / nsumrecosignalHB3);
181  } // phi
182  } //eta
183  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
184  //======================================================================
185  //======================================================================
186  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
187  c2x1->Clear();
189  c2x1->Divide(2, 1);
190  c2x1->cd(1);
191  TH2F* GefzRrecosignalHB42D = new TH2F("GefzRrecosignalHB42D", "", neta, -41., 41., nphi, 0., 72.);
192  TH2F* GefzRrecosignalHB42D0 = new TH2F("GefzRrecosignalHB42D0", "", neta, -41., 41., nphi, 0., 72.);
193  TH2F* GefzRrecosignalHB42DF = (TH2F*)GefzRrecosignalHB42D0->Clone("GefzRrecosignalHB42DF");
194  for (int i = 0; i < ndepth; i++) {
195  for (int jeta = 0; jeta < neta; jeta++) {
196  for (int jphi = 0; jphi < nphi; jphi++) {
197  double ccc1 = arecosignalHB[i][jeta][jphi];
198  int k2plot = jeta - 41;
199  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
200  if (ccc1 != 0.) {
201  GefzRrecosignalHB42D->Fill(kkk, jphi, ccc1);
202  GefzRrecosignalHB42D0->Fill(kkk, jphi, 1.);
203  }
204  }
205  }
206  }
207  GefzRrecosignalHB42DF->Divide(GefzRrecosignalHB42D, GefzRrecosignalHB42D0, 1, 1, "B"); // average A
208  gPad->SetGridy();
209  gPad->SetGridx(); // gPad->SetLogz();
210  GefzRrecosignalHB42DF->SetXTitle("<R>_depth #eta \b");
211  GefzRrecosignalHB42DF->SetYTitle(" #phi \b");
212  GefzRrecosignalHB42DF->Draw("COLZ");
213 
214  c2x1->cd(2);
215  TH1F* energyhitSignal_HB = (TH1F*)dir->FindObjectAny("h_energyhitSignal_HB");
216  energyhitSignal_HB->SetMarkerStyle(20);
217  energyhitSignal_HB->SetMarkerSize(0.4);
218  energyhitSignal_HB->GetYaxis()->SetLabelSize(0.04);
219  energyhitSignal_HB->SetXTitle("energyhitSignal_HB \b");
220  energyhitSignal_HB->SetMarkerColor(2);
221  energyhitSignal_HB->SetLineColor(0);
222  gPad->SetGridy();
223  gPad->SetGridx();
224  energyhitSignal_HB->Draw("Error");
225 
227  c2x1->Update();
228  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHB.png");
229  c2x1->Clear();
230  // clean-up
231  if (GefzRrecosignalHB42D)
232  delete GefzRrecosignalHB42D;
233  if (GefzRrecosignalHB42D0)
234  delete GefzRrecosignalHB42D0;
235  if (GefzRrecosignalHB42DF)
236  delete GefzRrecosignalHB42DF;
237  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
238  //======================================================================
239  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
240  c1x1->Clear();
242  c1x1->Divide(1, 1);
243  c1x1->cd(1);
244  TH1F* GefzRrecosignalHB41D = new TH1F("GefzRrecosignalHB41D", "", nphi, 0., 72.);
245  TH1F* GefzRrecosignalHB41D0 = new TH1F("GefzRrecosignalHB41D0", "", nphi, 0., 72.);
246  TH1F* GefzRrecosignalHB41DF = (TH1F*)GefzRrecosignalHB41D0->Clone("GefzRrecosignalHB41DF");
247  for (int jphi = 0; jphi < nphi; jphi++) {
248  for (int jeta = 0; jeta < neta; jeta++) {
249  for (int i = 0; i < ndepth; i++) {
250  double ccc1 = arecosignalHB[i][jeta][jphi];
251  if (ccc1 != 0.) {
252  GefzRrecosignalHB41D->Fill(jphi, ccc1);
253  GefzRrecosignalHB41D0->Fill(jphi, 1.);
254  }
255  }
256  }
257  }
258  GefzRrecosignalHB41DF->Divide(
259  GefzRrecosignalHB41D, GefzRrecosignalHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
260  GefzRrecosignalHB41D0->Sumw2();
261  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHB41DF->SetBinError(jphi,0.01);}
262  gPad->SetGridy();
263  gPad->SetGridx(); // gPad->SetLogz();
264  GefzRrecosignalHB41DF->SetMarkerStyle(20);
265  GefzRrecosignalHB41DF->SetMarkerSize(1.4);
266  GefzRrecosignalHB41DF->GetZaxis()->SetLabelSize(0.08);
267  GefzRrecosignalHB41DF->SetXTitle("#phi \b");
268  GefzRrecosignalHB41DF->SetYTitle(" <R> \b");
269  GefzRrecosignalHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
270  GefzRrecosignalHB41DF->SetMarkerColor(4);
271  GefzRrecosignalHB41DF->SetLineColor(
272  4); // GefzRrecosignalHB41DF->SetMinimum(0.8); // GefzRrecosignalHB41DF->SetMaximum(1.000);
273  GefzRrecosignalHB41DF->Draw("Error");
275  c1x1->Update();
276  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHB.png");
277  c1x1->Clear();
278  // clean-up
279  if (GefzRrecosignalHB41D)
280  delete GefzRrecosignalHB41D;
281  if (GefzRrecosignalHB41D0)
282  delete GefzRrecosignalHB41D0;
283  if (GefzRrecosignalHB41DF)
284  delete GefzRrecosignalHB41DF;
285  //========================================================================================== 4
286  //======================================================================
287  //======================================================================1D plot: R vs phi , different eta, depth=1
288  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
289  c3x5->Clear();
291  c3x5->Divide(4, 4);
292  c3x5->cd(1);
293  int kcountHBpositivedirectionRecosignal1 = 1;
294  TH1F* h2CeffHBpositivedirectionRecosignal1 = new TH1F("h2CeffHBpositivedirectionRecosignal1", "", nphi, 0., 72.);
295  for (int jeta = 0; jeta < njeta; jeta++) {
296  // positivedirectionRecosignal:
297  if (jeta - 41 >= 0) {
298  // for (int i=0;i<ndepth;i++) {
299  // depth=1
300  for (int i = 0; i < 1; i++) {
301  TH1F* HBpositivedirectionRecosignal1 = (TH1F*)h2CeffHBpositivedirectionRecosignal1->Clone("twod1");
302  float ccctest = 0; // to avoid empty massive elements
303  for (int jphi = 0; jphi < nphi; jphi++) {
304  double ccc1 = arecosignalHB[i][jeta][jphi];
305  if (ccc1 != 0.) {
306  HBpositivedirectionRecosignal1->Fill(jphi, ccc1);
307  ccctest = 1.; //HBpositivedirectionRecosignal1->SetBinError(i,0.01);
308  }
309  } // for jphi
310  if (ccctest > 0.) {
311  // cout<<"444 kcountHBpositivedirectionRecosignal1 = "<<kcountHBpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
312  c3x5->cd(kcountHBpositivedirectionRecosignal1);
313  HBpositivedirectionRecosignal1->SetMarkerStyle(20);
314  HBpositivedirectionRecosignal1->SetMarkerSize(0.4);
315  HBpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
316  HBpositivedirectionRecosignal1->SetXTitle("HBpositivedirectionRecosignal1 \b");
317  HBpositivedirectionRecosignal1->SetMarkerColor(2);
318  HBpositivedirectionRecosignal1->SetLineColor(0);
319  gPad->SetGridy();
320  gPad->SetGridx();
321  // gPad->SetLogy();
322  if (kcountHBpositivedirectionRecosignal1 == 1)
323  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
324  if (kcountHBpositivedirectionRecosignal1 == 2)
325  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
326  if (kcountHBpositivedirectionRecosignal1 == 3)
327  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
328  if (kcountHBpositivedirectionRecosignal1 == 4)
329  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
330  if (kcountHBpositivedirectionRecosignal1 == 5)
331  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
332  if (kcountHBpositivedirectionRecosignal1 == 6)
333  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
334  if (kcountHBpositivedirectionRecosignal1 == 7)
335  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
336  if (kcountHBpositivedirectionRecosignal1 == 8)
337  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
338  if (kcountHBpositivedirectionRecosignal1 == 9)
339  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
340  if (kcountHBpositivedirectionRecosignal1 == 10)
341  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
342  if (kcountHBpositivedirectionRecosignal1 == 11)
343  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
344  if (kcountHBpositivedirectionRecosignal1 == 12)
345  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
346  if (kcountHBpositivedirectionRecosignal1 == 13)
347  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
348  if (kcountHBpositivedirectionRecosignal1 == 14)
349  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
350  if (kcountHBpositivedirectionRecosignal1 == 15)
351  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
352  if (kcountHBpositivedirectionRecosignal1 == 16)
353  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
354  HBpositivedirectionRecosignal1->Draw("Error");
355  kcountHBpositivedirectionRecosignal1++;
356  if (kcountHBpositivedirectionRecosignal1 > 16)
357  break; //
358  } //ccctest>0
359 
360  } // for i
361  } //if(jeta-41 >= 0)
362  } //for jeta
364  c3x5->Update();
365  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
366  c3x5->Clear();
367  // clean-up
368  if (h2CeffHBpositivedirectionRecosignal1)
369  delete h2CeffHBpositivedirectionRecosignal1;
370 
371  //========================================================================================== 5
372  //======================================================================
373  //======================================================================1D plot: R vs phi , different eta, depth=2
374  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
375  c3x5->Clear();
377  c3x5->Divide(4, 4);
378  c3x5->cd(1);
379  int kcountHBpositivedirectionRecosignal2 = 1;
380  TH1F* h2CeffHBpositivedirectionRecosignal2 = new TH1F("h2CeffHBpositivedirectionRecosignal2", "", nphi, 0., 72.);
381  for (int jeta = 0; jeta < njeta; jeta++) {
382  // positivedirectionRecosignal:
383  if (jeta - 41 >= 0) {
384  // for (int i=0;i<ndepth;i++) {
385  // depth=2
386  for (int i = 1; i < 2; i++) {
387  TH1F* HBpositivedirectionRecosignal2 = (TH1F*)h2CeffHBpositivedirectionRecosignal2->Clone("twod1");
388  float ccctest = 0; // to avoid empty massive elements
389  for (int jphi = 0; jphi < nphi; jphi++) {
390  double ccc1 = arecosignalHB[i][jeta][jphi];
391  if (ccc1 != 0.) {
392  HBpositivedirectionRecosignal2->Fill(jphi, ccc1);
393  ccctest = 1.; //HBpositivedirectionRecosignal2->SetBinError(i,0.01);
394  }
395  } // for jphi
396  if (ccctest > 0.) {
397  //cout<<"555 kcountHBpositivedirectionRecosignal2 = "<<kcountHBpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
398  c3x5->cd(kcountHBpositivedirectionRecosignal2);
399  HBpositivedirectionRecosignal2->SetMarkerStyle(20);
400  HBpositivedirectionRecosignal2->SetMarkerSize(0.4);
401  HBpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
402  HBpositivedirectionRecosignal2->SetXTitle("HBpositivedirectionRecosignal2 \b");
403  HBpositivedirectionRecosignal2->SetMarkerColor(2);
404  HBpositivedirectionRecosignal2->SetLineColor(0);
405  gPad->SetGridy();
406  gPad->SetGridx();
407  // gPad->SetLogy();
408  if (kcountHBpositivedirectionRecosignal2 == 1)
409  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
410  if (kcountHBpositivedirectionRecosignal2 == 2)
411  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
412  if (kcountHBpositivedirectionRecosignal2 == 3)
413  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
414  if (kcountHBpositivedirectionRecosignal2 == 4)
415  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
416  if (kcountHBpositivedirectionRecosignal2 == 5)
417  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
418  if (kcountHBpositivedirectionRecosignal2 == 6)
419  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
420  if (kcountHBpositivedirectionRecosignal2 == 7)
421  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
422  if (kcountHBpositivedirectionRecosignal2 == 8)
423  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
424  if (kcountHBpositivedirectionRecosignal2 == 9)
425  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
426  if (kcountHBpositivedirectionRecosignal2 == 10)
427  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
428  if (kcountHBpositivedirectionRecosignal2 == 11)
429  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
430  if (kcountHBpositivedirectionRecosignal2 == 12)
431  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
432  if (kcountHBpositivedirectionRecosignal2 == 13)
433  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
434  if (kcountHBpositivedirectionRecosignal2 == 14)
435  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
436  if (kcountHBpositivedirectionRecosignal2 == 15)
437  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
438  if (kcountHBpositivedirectionRecosignal2 == 16)
439  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
440  HBpositivedirectionRecosignal2->Draw("Error");
441  kcountHBpositivedirectionRecosignal2++;
442  if (kcountHBpositivedirectionRecosignal2 > 16)
443  break; // 4x6 = 24
444  } //ccctest>0
445 
446  } // for i
447  } //if(jeta-41 >= 0)
448  } //for jeta
450  c3x5->Update();
451  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
452  c3x5->Clear();
453  // clean-up
454  if (h2CeffHBpositivedirectionRecosignal2)
455  delete h2CeffHBpositivedirectionRecosignal2;
456  //========================================================================================== 6
457  //======================================================================
458  //======================================================================1D plot: R vs phi , different eta, depth=3
459  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
460  c3x5->Clear();
462  c3x5->Divide(4, 4);
463  c3x5->cd(1);
464  int kcountHBpositivedirectionRecosignal3 = 1;
465  TH1F* h2CeffHBpositivedirectionRecosignal3 = new TH1F("h2CeffHBpositivedirectionRecosignal3", "", nphi, 0., 72.);
466  for (int jeta = 0; jeta < njeta; jeta++) {
467  // positivedirectionRecosignal:
468  if (jeta - 41 >= 0) {
469  // for (int i=0;i<ndepth;i++) {
470  // depth=3
471  for (int i = 2; i < 3; i++) {
472  TH1F* HBpositivedirectionRecosignal3 = (TH1F*)h2CeffHBpositivedirectionRecosignal3->Clone("twod1");
473  float ccctest = 0; // to avoid empty massive elements
474  for (int jphi = 0; jphi < nphi; jphi++) {
475  double ccc1 = arecosignalHB[i][jeta][jphi];
476  if (ccc1 != 0.) {
477  HBpositivedirectionRecosignal3->Fill(jphi, ccc1);
478  ccctest = 1.; //HBpositivedirectionRecosignal3->SetBinError(i,0.01);
479  }
480  } // for jphi
481  if (ccctest > 0.) {
482  //cout<<"666 kcountHBpositivedirectionRecosignal3 = "<<kcountHBpositivedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
483  c3x5->cd(kcountHBpositivedirectionRecosignal3);
484  HBpositivedirectionRecosignal3->SetMarkerStyle(20);
485  HBpositivedirectionRecosignal3->SetMarkerSize(0.4);
486  HBpositivedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
487  HBpositivedirectionRecosignal3->SetXTitle("HBpositivedirectionRecosignal3 \b");
488  HBpositivedirectionRecosignal3->SetMarkerColor(2);
489  HBpositivedirectionRecosignal3->SetLineColor(0);
490  gPad->SetGridy();
491  gPad->SetGridx();
492  // gPad->SetLogy();
493  if (kcountHBpositivedirectionRecosignal3 == 1)
494  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
495  if (kcountHBpositivedirectionRecosignal3 == 2)
496  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
497  if (kcountHBpositivedirectionRecosignal3 == 3)
498  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
499  if (kcountHBpositivedirectionRecosignal3 == 4)
500  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
501  if (kcountHBpositivedirectionRecosignal3 == 5)
502  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
503  if (kcountHBpositivedirectionRecosignal3 == 6)
504  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
505  if (kcountHBpositivedirectionRecosignal3 == 7)
506  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
507  if (kcountHBpositivedirectionRecosignal3 == 8)
508  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
509  if (kcountHBpositivedirectionRecosignal3 == 9)
510  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
511  if (kcountHBpositivedirectionRecosignal3 == 10)
512  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
513  if (kcountHBpositivedirectionRecosignal3 == 11)
514  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
515  if (kcountHBpositivedirectionRecosignal3 == 12)
516  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
517  if (kcountHBpositivedirectionRecosignal3 == 13)
518  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
519  if (kcountHBpositivedirectionRecosignal3 == 14)
520  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
521  if (kcountHBpositivedirectionRecosignal3 == 15)
522  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
523  if (kcountHBpositivedirectionRecosignal3 == 16)
524  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
525  HBpositivedirectionRecosignal3->Draw("Error");
526  kcountHBpositivedirectionRecosignal3++;
527  if (kcountHBpositivedirectionRecosignal3 > 16)
528  break; // 4x6 = 24
529  } //ccctest>0
530 
531  } // for i
532  } //if(jeta-41 >= 0)
533  } //for jeta
535  c3x5->Update();
536  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
537  c3x5->Clear();
538  // clean-up
539  if (h2CeffHBpositivedirectionRecosignal3)
540  delete h2CeffHBpositivedirectionRecosignal3;
541  //========================================================================================== 7
542  //======================================================================
543  //======================================================================1D plot: R vs phi , different eta, depth=4
544  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
545  c3x5->Clear();
547  c3x5->Divide(4, 4);
548  c3x5->cd(1);
549  int kcountHBpositivedirectionRecosignal4 = 1;
550  TH1F* h2CeffHBpositivedirectionRecosignal4 = new TH1F("h2CeffHBpositivedirectionRecosignal4", "", nphi, 0., 72.);
551 
552  for (int jeta = 0; jeta < njeta; jeta++) {
553  // positivedirectionRecosignal:
554  if (jeta - 41 >= 0) {
555  // for (int i=0;i<ndepth;i++) {
556  // depth=4
557  for (int i = 3; i < 4; i++) {
558  TH1F* HBpositivedirectionRecosignal4 = (TH1F*)h2CeffHBpositivedirectionRecosignal4->Clone("twod1");
559 
560  float ccctest = 0; // to avoid empty massive elements
561  for (int jphi = 0; jphi < nphi; jphi++) {
562  double ccc1 = arecosignalHB[i][jeta][jphi];
563  if (ccc1 != 0.) {
564  HBpositivedirectionRecosignal4->Fill(jphi, ccc1);
565  ccctest = 1.; //HBpositivedirectionRecosignal4->SetBinError(i,0.01);
566  }
567  } // for jphi
568  if (ccctest > 0.) {
569  //cout<<"777 kcountHBpositivedirectionRecosignal4 = "<<kcountHBpositivedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
570  c3x5->cd(kcountHBpositivedirectionRecosignal4);
571  HBpositivedirectionRecosignal4->SetMarkerStyle(20);
572  HBpositivedirectionRecosignal4->SetMarkerSize(0.4);
573  HBpositivedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
574  HBpositivedirectionRecosignal4->SetXTitle("HBpositivedirectionRecosignal4 \b");
575  HBpositivedirectionRecosignal4->SetMarkerColor(2);
576  HBpositivedirectionRecosignal4->SetLineColor(0);
577  gPad->SetGridy();
578  gPad->SetGridx();
579  // gPad->SetLogy();
580  if (kcountHBpositivedirectionRecosignal4 == 1)
581  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
582  if (kcountHBpositivedirectionRecosignal4 == 2)
583  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
584  if (kcountHBpositivedirectionRecosignal4 == 3)
585  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
586  if (kcountHBpositivedirectionRecosignal4 == 4)
587  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
588  if (kcountHBpositivedirectionRecosignal4 == 5)
589  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
590  if (kcountHBpositivedirectionRecosignal4 == 6)
591  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
592  if (kcountHBpositivedirectionRecosignal4 == 7)
593  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
594  if (kcountHBpositivedirectionRecosignal4 == 8)
595  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
596  if (kcountHBpositivedirectionRecosignal4 == 9)
597  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
598  if (kcountHBpositivedirectionRecosignal4 == 10)
599  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
600  if (kcountHBpositivedirectionRecosignal4 == 11)
601  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
602  if (kcountHBpositivedirectionRecosignal4 == 12)
603  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
604  if (kcountHBpositivedirectionRecosignal4 == 13)
605  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
606  if (kcountHBpositivedirectionRecosignal4 == 14)
607  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
608  if (kcountHBpositivedirectionRecosignal4 == 15)
609  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
610  if (kcountHBpositivedirectionRecosignal4 == 16)
611  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
612  HBpositivedirectionRecosignal4->Draw("Error");
613  kcountHBpositivedirectionRecosignal4++;
614  if (kcountHBpositivedirectionRecosignal4 > 16)
615  break; // 4x6 = 24
616  } //ccctest>0
617 
618  } // for i
619  } //if(jeta-41 >= 0)
620  } //for jeta
622  c3x5->Update();
623  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
624  c3x5->Clear();
625  // clean-up
626  if (h2CeffHBpositivedirectionRecosignal4)
627  delete h2CeffHBpositivedirectionRecosignal4;
628 
629  //========================================================================================== 1114
630  //======================================================================
631  //======================================================================1D plot: R vs phi , different eta, depth=1
632  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
633  c3x5->Clear();
635  c3x5->Divide(4, 4);
636  c3x5->cd(1);
637  int kcountHBnegativedirectionRecosignal1 = 1;
638  TH1F* h2CeffHBnegativedirectionRecosignal1 = new TH1F("h2CeffHBnegativedirectionRecosignal1", "", nphi, 0., 72.);
639  for (int jeta = 0; jeta < njeta; jeta++) {
640  // negativedirectionRecosignal:
641  if (jeta - 41 < 0) {
642  // for (int i=0;i<ndepth;i++) {
643  // depth=1
644  for (int i = 0; i < 1; i++) {
645  TH1F* HBnegativedirectionRecosignal1 = (TH1F*)h2CeffHBnegativedirectionRecosignal1->Clone("twod1");
646  float ccctest = 0; // to avoid empty massive elements
647  for (int jphi = 0; jphi < nphi; jphi++) {
648  double ccc1 = arecosignalHB[i][jeta][jphi];
649  if (ccc1 != 0.) {
650  HBnegativedirectionRecosignal1->Fill(jphi, ccc1);
651  ccctest = 1.; //HBnegativedirectionRecosignal1->SetBinError(i,0.01);
652  }
653  } // for jphi
654  if (ccctest > 0.) {
655  // cout<<"444 kcountHBnegativedirectionRecosignal1 = "<<kcountHBnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
656  c3x5->cd(kcountHBnegativedirectionRecosignal1);
657  HBnegativedirectionRecosignal1->SetMarkerStyle(20);
658  HBnegativedirectionRecosignal1->SetMarkerSize(0.4);
659  HBnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
660  HBnegativedirectionRecosignal1->SetXTitle("HBnegativedirectionRecosignal1 \b");
661  HBnegativedirectionRecosignal1->SetMarkerColor(2);
662  HBnegativedirectionRecosignal1->SetLineColor(0);
663  gPad->SetGridy();
664  gPad->SetGridx();
665  // gPad->SetLogy();
666  if (kcountHBnegativedirectionRecosignal1 == 1)
667  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
668  if (kcountHBnegativedirectionRecosignal1 == 2)
669  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
670  if (kcountHBnegativedirectionRecosignal1 == 3)
671  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
672  if (kcountHBnegativedirectionRecosignal1 == 4)
673  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
674  if (kcountHBnegativedirectionRecosignal1 == 5)
675  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
676  if (kcountHBnegativedirectionRecosignal1 == 6)
677  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
678  if (kcountHBnegativedirectionRecosignal1 == 7)
679  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
680  if (kcountHBnegativedirectionRecosignal1 == 8)
681  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
682  if (kcountHBnegativedirectionRecosignal1 == 9)
683  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
684  if (kcountHBnegativedirectionRecosignal1 == 10)
685  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
686  if (kcountHBnegativedirectionRecosignal1 == 11)
687  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
688  if (kcountHBnegativedirectionRecosignal1 == 12)
689  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
690  if (kcountHBnegativedirectionRecosignal1 == 13)
691  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
692  if (kcountHBnegativedirectionRecosignal1 == 14)
693  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
694  if (kcountHBnegativedirectionRecosignal1 == 15)
695  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
696  if (kcountHBnegativedirectionRecosignal1 == 16)
697  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
698  HBnegativedirectionRecosignal1->Draw("Error");
699  kcountHBnegativedirectionRecosignal1++;
700  if (kcountHBnegativedirectionRecosignal1 > 16)
701  break; //
702  } //ccctest>0
703 
704  } // for i
705  } //if(jeta-41 < 0 )
706  } //for jeta
708  c3x5->Update();
709  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
710  c3x5->Clear();
711  // clean-up
712  if (h2CeffHBnegativedirectionRecosignal1)
713  delete h2CeffHBnegativedirectionRecosignal1;
714 
715  //========================================================================================== 1115
716  //======================================================================
717  //======================================================================1D plot: R vs phi , different eta, depth=2
718  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
719  c3x5->Clear();
721  c3x5->Divide(4, 4);
722  c3x5->cd(1);
723  int kcountHBnegativedirectionRecosignal2 = 1;
724  TH1F* h2CeffHBnegativedirectionRecosignal2 = new TH1F("h2CeffHBnegativedirectionRecosignal2", "", nphi, 0., 72.);
725  for (int jeta = 0; jeta < njeta; jeta++) {
726  // negativedirectionRecosignal:
727  if (jeta - 41 < 0) {
728  // for (int i=0;i<ndepth;i++) {
729  // depth=2
730  for (int i = 1; i < 2; i++) {
731  TH1F* HBnegativedirectionRecosignal2 = (TH1F*)h2CeffHBnegativedirectionRecosignal2->Clone("twod1");
732  float ccctest = 0; // to avoid empty massive elements
733  for (int jphi = 0; jphi < nphi; jphi++) {
734  double ccc1 = arecosignalHB[i][jeta][jphi];
735  if (ccc1 != 0.) {
736  HBnegativedirectionRecosignal2->Fill(jphi, ccc1);
737  ccctest = 1.; //HBnegativedirectionRecosignal2->SetBinError(i,0.01);
738  }
739  } // for jphi
740  if (ccctest > 0.) {
741  //cout<<"555 kcountHBnegativedirectionRecosignal2 = "<<kcountHBnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
742  c3x5->cd(kcountHBnegativedirectionRecosignal2);
743  HBnegativedirectionRecosignal2->SetMarkerStyle(20);
744  HBnegativedirectionRecosignal2->SetMarkerSize(0.4);
745  HBnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
746  HBnegativedirectionRecosignal2->SetXTitle("HBnegativedirectionRecosignal2 \b");
747  HBnegativedirectionRecosignal2->SetMarkerColor(2);
748  HBnegativedirectionRecosignal2->SetLineColor(0);
749  gPad->SetGridy();
750  gPad->SetGridx();
751  // gPad->SetLogy();
752  if (kcountHBnegativedirectionRecosignal2 == 1)
753  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
754  if (kcountHBnegativedirectionRecosignal2 == 2)
755  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
756  if (kcountHBnegativedirectionRecosignal2 == 3)
757  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
758  if (kcountHBnegativedirectionRecosignal2 == 4)
759  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
760  if (kcountHBnegativedirectionRecosignal2 == 5)
761  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
762  if (kcountHBnegativedirectionRecosignal2 == 6)
763  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
764  if (kcountHBnegativedirectionRecosignal2 == 7)
765  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
766  if (kcountHBnegativedirectionRecosignal2 == 8)
767  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
768  if (kcountHBnegativedirectionRecosignal2 == 9)
769  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
770  if (kcountHBnegativedirectionRecosignal2 == 10)
771  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
772  if (kcountHBnegativedirectionRecosignal2 == 11)
773  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
774  if (kcountHBnegativedirectionRecosignal2 == 12)
775  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
776  if (kcountHBnegativedirectionRecosignal2 == 13)
777  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
778  if (kcountHBnegativedirectionRecosignal2 == 14)
779  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
780  if (kcountHBnegativedirectionRecosignal2 == 15)
781  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
782  if (kcountHBnegativedirectionRecosignal2 == 16)
783  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
784  HBnegativedirectionRecosignal2->Draw("Error");
785  kcountHBnegativedirectionRecosignal2++;
786  if (kcountHBnegativedirectionRecosignal2 > 16)
787  break; // 4x6 = 24
788  } //ccctest>0
789 
790  } // for i
791  } //if(jeta-41 < 0 )
792  } //for jeta
794  c3x5->Update();
795  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
796  c3x5->Clear();
797  // clean-up
798  if (h2CeffHBnegativedirectionRecosignal2)
799  delete h2CeffHBnegativedirectionRecosignal2;
800  //========================================================================================== 1116
801  //======================================================================
802  //======================================================================1D plot: R vs phi , different eta, depth=3
803  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
804  c3x5->Clear();
806  c3x5->Divide(4, 4);
807  c3x5->cd(1);
808  int kcountHBnegativedirectionRecosignal3 = 1;
809  TH1F* h2CeffHBnegativedirectionRecosignal3 = new TH1F("h2CeffHBnegativedirectionRecosignal3", "", nphi, 0., 72.);
810  for (int jeta = 0; jeta < njeta; jeta++) {
811  // negativedirectionRecosignal:
812  if (jeta - 41 < 0) {
813  // for (int i=0;i<ndepth;i++) {
814  // depth=3
815  for (int i = 2; i < 3; i++) {
816  TH1F* HBnegativedirectionRecosignal3 = (TH1F*)h2CeffHBnegativedirectionRecosignal3->Clone("twod1");
817  float ccctest = 0; // to avoid empty massive elements
818  for (int jphi = 0; jphi < nphi; jphi++) {
819  double ccc1 = arecosignalHB[i][jeta][jphi];
820  if (ccc1 != 0.) {
821  HBnegativedirectionRecosignal3->Fill(jphi, ccc1);
822  ccctest = 1.; //HBnegativedirectionRecosignal3->SetBinError(i,0.01);
823  }
824  } // for jphi
825  if (ccctest > 0.) {
826  //cout<<"666 kcountHBnegativedirectionRecosignal3 = "<<kcountHBnegativedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
827  c3x5->cd(kcountHBnegativedirectionRecosignal3);
828  HBnegativedirectionRecosignal3->SetMarkerStyle(20);
829  HBnegativedirectionRecosignal3->SetMarkerSize(0.4);
830  HBnegativedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
831  HBnegativedirectionRecosignal3->SetXTitle("HBnegativedirectionRecosignal3 \b");
832  HBnegativedirectionRecosignal3->SetMarkerColor(2);
833  HBnegativedirectionRecosignal3->SetLineColor(0);
834  gPad->SetGridy();
835  gPad->SetGridx();
836  // gPad->SetLogy();
837  if (kcountHBnegativedirectionRecosignal3 == 1)
838  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
839  if (kcountHBnegativedirectionRecosignal3 == 2)
840  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
841  if (kcountHBnegativedirectionRecosignal3 == 3)
842  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
843  if (kcountHBnegativedirectionRecosignal3 == 4)
844  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
845  if (kcountHBnegativedirectionRecosignal3 == 5)
846  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
847  if (kcountHBnegativedirectionRecosignal3 == 6)
848  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
849  if (kcountHBnegativedirectionRecosignal3 == 7)
850  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
851  if (kcountHBnegativedirectionRecosignal3 == 8)
852  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
853  if (kcountHBnegativedirectionRecosignal3 == 9)
854  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
855  if (kcountHBnegativedirectionRecosignal3 == 10)
856  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
857  if (kcountHBnegativedirectionRecosignal3 == 11)
858  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
859  if (kcountHBnegativedirectionRecosignal3 == 12)
860  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
861  if (kcountHBnegativedirectionRecosignal3 == 13)
862  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
863  if (kcountHBnegativedirectionRecosignal3 == 14)
864  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
865  if (kcountHBnegativedirectionRecosignal3 == 15)
866  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
867  if (kcountHBnegativedirectionRecosignal3 == 16)
868  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
869 
870  HBnegativedirectionRecosignal3->Draw("Error");
871  kcountHBnegativedirectionRecosignal3++;
872  if (kcountHBnegativedirectionRecosignal3 > 16)
873  break; // 4x6 = 24
874  } //ccctest>0
875 
876  } // for i
877  } //if(jeta-41 < 0 )
878  } //for jeta
880  c3x5->Update();
881  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
882  c3x5->Clear();
883  // clean-up
884  if (h2CeffHBnegativedirectionRecosignal3)
885  delete h2CeffHBnegativedirectionRecosignal3;
886  //========================================================================================== 1117
887  //======================================================================
888  //======================================================================1D plot: R vs phi , different eta, depth=4
889  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
890  c3x5->Clear();
892  c3x5->Divide(4, 4);
893  c3x5->cd(1);
894  int kcountHBnegativedirectionRecosignal4 = 1;
895  TH1F* h2CeffHBnegativedirectionRecosignal4 = new TH1F("h2CeffHBnegativedirectionRecosignal4", "", nphi, 0., 72.);
896 
897  for (int jeta = 0; jeta < njeta; jeta++) {
898  // negativedirectionRecosignal:
899  if (jeta - 41 < 0) {
900  // for (int i=0;i<ndepth;i++) {
901  // depth=4
902  for (int i = 3; i < 4; i++) {
903  TH1F* HBnegativedirectionRecosignal4 = (TH1F*)h2CeffHBnegativedirectionRecosignal4->Clone("twod1");
904 
905  float ccctest = 0; // to avoid empty massive elements
906  for (int jphi = 0; jphi < nphi; jphi++) {
907  double ccc1 = arecosignalHB[i][jeta][jphi];
908  if (ccc1 != 0.) {
909  HBnegativedirectionRecosignal4->Fill(jphi, ccc1);
910  ccctest = 1.; //HBnegativedirectionRecosignal4->SetBinError(i,0.01);
911  }
912  } // for jphi
913  if (ccctest > 0.) {
914  //cout<<"777 kcountHBnegativedirectionRecosignal4 = "<<kcountHBnegativedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
915  c3x5->cd(kcountHBnegativedirectionRecosignal4);
916  HBnegativedirectionRecosignal4->SetMarkerStyle(20);
917  HBnegativedirectionRecosignal4->SetMarkerSize(0.4);
918  HBnegativedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
919  HBnegativedirectionRecosignal4->SetXTitle("HBnegativedirectionRecosignal4 \b");
920  HBnegativedirectionRecosignal4->SetMarkerColor(2);
921  HBnegativedirectionRecosignal4->SetLineColor(0);
922  gPad->SetGridy();
923  gPad->SetGridx();
924  // gPad->SetLogy();
925  if (kcountHBnegativedirectionRecosignal4 == 1)
926  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
927  if (kcountHBnegativedirectionRecosignal4 == 2)
928  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
929  if (kcountHBnegativedirectionRecosignal4 == 3)
930  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
931  if (kcountHBnegativedirectionRecosignal4 == 4)
932  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
933  if (kcountHBnegativedirectionRecosignal4 == 5)
934  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
935  if (kcountHBnegativedirectionRecosignal4 == 6)
936  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
937  if (kcountHBnegativedirectionRecosignal4 == 7)
938  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
939  if (kcountHBnegativedirectionRecosignal4 == 8)
940  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
941  if (kcountHBnegativedirectionRecosignal4 == 9)
942  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
943  if (kcountHBnegativedirectionRecosignal4 == 10)
944  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
945  if (kcountHBnegativedirectionRecosignal4 == 11)
946  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
947  if (kcountHBnegativedirectionRecosignal4 == 12)
948  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
949  if (kcountHBnegativedirectionRecosignal4 == 13)
950  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
951  if (kcountHBnegativedirectionRecosignal4 == 14)
952  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
953  if (kcountHBnegativedirectionRecosignal4 == 15)
954  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
955  if (kcountHBnegativedirectionRecosignal4 == 16)
956  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
957  HBnegativedirectionRecosignal4->Draw("Error");
958  kcountHBnegativedirectionRecosignal4++;
959  if (kcountHBnegativedirectionRecosignal4 > 16)
960  break; // 4x6 = 24
961  } //ccctest>0
962 
963  } // for i
964  } //if(jeta-41 < 0 )
965  } //for jeta
967  c3x5->Update();
968  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
969  c3x5->Clear();
970  // clean-up
971  if (h2CeffHBnegativedirectionRecosignal4)
972  delete h2CeffHBnegativedirectionRecosignal4;
973 
974  //======================================================================================================================
975  //======================================================================================================================
976  //======================================================================================================================
977  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
978 
979  //cout<<" Start Vaiance: preparation *****" <<endl;
980  TH2F* recosignalVariance1HB1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HB1");
981  TH2F* recosignalVariance0HB1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB1");
982  TH2F* recosignalVarianceHB1 = (TH2F*)recosignalVariance1HB1->Clone("recosignalVarianceHB1");
983  recosignalVarianceHB1->Divide(recosignalVariance1HB1, recosignalVariance0HB1, 1, 1, "B");
984  TH2F* recosignalVariance1HB2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HB2");
985  TH2F* recosignalVariance0HB2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB2");
986  TH2F* recosignalVarianceHB2 = (TH2F*)recosignalVariance1HB2->Clone("recosignalVarianceHB2");
987  recosignalVarianceHB2->Divide(recosignalVariance1HB2, recosignalVariance0HB2, 1, 1, "B");
988  TH2F* recosignalVariance1HB3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HB3");
989  TH2F* recosignalVariance0HB3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB3");
990  TH2F* recosignalVarianceHB3 = (TH2F*)recosignalVariance1HB3->Clone("recosignalVarianceHB3");
991  recosignalVarianceHB3->Divide(recosignalVariance1HB3, recosignalVariance0HB3, 1, 1, "B");
992  TH2F* recosignalVariance1HB4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HB4");
993  TH2F* recosignalVariance0HB4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB4");
994  TH2F* recosignalVarianceHB4 = (TH2F*)recosignalVariance1HB4->Clone("recosignalVarianceHB4");
995  recosignalVarianceHB4->Divide(recosignalVariance1HB4, recosignalVariance0HB4, 1, 1, "B");
996  //cout<<" Vaiance: preparation DONE *****" <<endl;
997  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvarianceHB
998  // = sum(R*R)/N - (sum(R)/N)**2
999  for (int jeta = 0; jeta < njeta; jeta++) {
1000  //preparation for PHI normalization:
1001  double sumrecosignalHB0 = 0;
1002  int nsumrecosignalHB0 = 0;
1003  double sumrecosignalHB1 = 0;
1004  int nsumrecosignalHB1 = 0;
1005  double sumrecosignalHB2 = 0;
1006  int nsumrecosignalHB2 = 0;
1007  double sumrecosignalHB3 = 0;
1008  int nsumrecosignalHB3 = 0;
1009  for (int jphi = 0; jphi < njphi; jphi++) {
1010  recosignalvarianceHB[0][jeta][jphi] = recosignalVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
1011  recosignalvarianceHB[1][jeta][jphi] = recosignalVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
1012  recosignalvarianceHB[2][jeta][jphi] = recosignalVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
1013  recosignalvarianceHB[3][jeta][jphi] = recosignalVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
1014  if (recosignalvarianceHB[0][jeta][jphi] > 0.) {
1015  sumrecosignalHB0 += recosignalvarianceHB[0][jeta][jphi];
1016  ++nsumrecosignalHB0;
1017  }
1018  if (recosignalvarianceHB[1][jeta][jphi] > 0.) {
1019  sumrecosignalHB1 += recosignalvarianceHB[1][jeta][jphi];
1020  ++nsumrecosignalHB1;
1021  }
1022  if (recosignalvarianceHB[2][jeta][jphi] > 0.) {
1023  sumrecosignalHB2 += recosignalvarianceHB[2][jeta][jphi];
1024  ++nsumrecosignalHB2;
1025  }
1026  if (recosignalvarianceHB[3][jeta][jphi] > 0.) {
1027  sumrecosignalHB3 += recosignalvarianceHB[3][jeta][jphi];
1028  ++nsumrecosignalHB3;
1029  }
1030  } // phi
1031  // PHI normalization :
1032  for (int jphi = 0; jphi < njphi; jphi++) {
1033  if (recosignalvarianceHB[0][jeta][jphi] > 0.)
1034  recosignalvarianceHB[0][jeta][jphi] /= (sumrecosignalHB0 / nsumrecosignalHB0);
1035  if (recosignalvarianceHB[1][jeta][jphi] > 0.)
1036  recosignalvarianceHB[1][jeta][jphi] /= (sumrecosignalHB1 / nsumrecosignalHB1);
1037  if (recosignalvarianceHB[2][jeta][jphi] > 0.)
1038  recosignalvarianceHB[2][jeta][jphi] /= (sumrecosignalHB2 / nsumrecosignalHB2);
1039  if (recosignalvarianceHB[3][jeta][jphi] > 0.)
1040  recosignalvarianceHB[3][jeta][jphi] /= (sumrecosignalHB3 / nsumrecosignalHB3);
1041  } // phi
1042  // recosignalvarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
1043  for (int jphi = 0; jphi < njphi; jphi++) {
1044  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
1045  recosignalvarianceHB[0][jeta][jphi] -= arecosignalHB[0][jeta][jphi] * arecosignalHB[0][jeta][jphi];
1046  recosignalvarianceHB[0][jeta][jphi] = fabs(recosignalvarianceHB[0][jeta][jphi]);
1047  recosignalvarianceHB[1][jeta][jphi] -= arecosignalHB[1][jeta][jphi] * arecosignalHB[1][jeta][jphi];
1048  recosignalvarianceHB[1][jeta][jphi] = fabs(recosignalvarianceHB[1][jeta][jphi]);
1049  recosignalvarianceHB[2][jeta][jphi] -= arecosignalHB[2][jeta][jphi] * arecosignalHB[2][jeta][jphi];
1050  recosignalvarianceHB[2][jeta][jphi] = fabs(recosignalvarianceHB[2][jeta][jphi]);
1051  recosignalvarianceHB[3][jeta][jphi] -= arecosignalHB[3][jeta][jphi] * arecosignalHB[3][jeta][jphi];
1052  recosignalvarianceHB[3][jeta][jphi] = fabs(recosignalvarianceHB[3][jeta][jphi]);
1053  }
1054  }
1055  //cout<<" Vaiance: DONE*****" <<endl;
1056  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
1057  //======================================================================
1058  //======================================================================
1059  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
1060  c1x1->Clear();
1062  c1x0->Divide(1, 1);
1063  c1x0->cd(1);
1064  TH2F* DefzDrecosignalHB42D = new TH2F("DefzDrecosignalHB42D", "", neta, -41., 41., nphi, 0., 72.);
1065  TH2F* DefzDrecosignalHB42D0 = new TH2F("DefzDrecosignalHB42D0", "", neta, -41., 41., nphi, 0., 72.);
1066  TH2F* DefzDrecosignalHB42DF = (TH2F*)DefzDrecosignalHB42D0->Clone("DefzDrecosignalHB42DF");
1067  for (int i = 0; i < ndepth; i++) {
1068  for (int jeta = 0; jeta < neta; jeta++) {
1069  for (int jphi = 0; jphi < nphi; jphi++) {
1070  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
1071  int k2plot = jeta - 41;
1072  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
1073  if (arecosignalHB[i][jeta][jphi] > 0.) {
1074  DefzDrecosignalHB42D->Fill(kkk, jphi, ccc1);
1075  DefzDrecosignalHB42D0->Fill(kkk, jphi, 1.);
1076  }
1077  }
1078  }
1079  }
1080  DefzDrecosignalHB42DF->Divide(DefzDrecosignalHB42D, DefzDrecosignalHB42D0, 1, 1, "B"); // average A
1081  // DefzDrecosignalHB1->Sumw2();
1082  gPad->SetGridy();
1083  gPad->SetGridx(); // gPad->SetLogz();
1084  DefzDrecosignalHB42DF->SetMarkerStyle(20);
1085  DefzDrecosignalHB42DF->SetMarkerSize(0.4);
1086  DefzDrecosignalHB42DF->GetZaxis()->SetLabelSize(0.08);
1087  DefzDrecosignalHB42DF->SetXTitle("<D>_depth #eta \b");
1088  DefzDrecosignalHB42DF->SetYTitle(" #phi \b");
1089  DefzDrecosignalHB42DF->SetZTitle("<D>_depth \b");
1090  DefzDrecosignalHB42DF->SetMarkerColor(2);
1091  DefzDrecosignalHB42DF->SetLineColor(
1092  0); // DefzDrecosignalHB42DF->SetMaximum(1.000); // DefzDrecosignalHB42DF->SetMinimum(1.0);
1093  DefzDrecosignalHB42DF->Draw("COLZ");
1095  c1x0->Update();
1096  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHB.png");
1097  c1x0->Clear();
1098  // clean-up
1099  if (DefzDrecosignalHB42D)
1100  delete DefzDrecosignalHB42D;
1101  if (DefzDrecosignalHB42D0)
1102  delete DefzDrecosignalHB42D0;
1103  if (DefzDrecosignalHB42DF)
1104  delete DefzDrecosignalHB42DF;
1105  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
1106  //======================================================================
1107  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
1108  c1x1->Clear();
1110  c1x1->Divide(1, 1);
1111  c1x1->cd(1);
1112  TH1F* DefzDrecosignalHB41D = new TH1F("DefzDrecosignalHB41D", "", nphi, 0., 72.);
1113  TH1F* DefzDrecosignalHB41D0 = new TH1F("DefzDrecosignalHB41D0", "", nphi, 0., 72.);
1114  TH1F* DefzDrecosignalHB41DF = (TH1F*)DefzDrecosignalHB41D0->Clone("DefzDrecosignalHB41DF");
1115 
1116  for (int jphi = 0; jphi < nphi; jphi++) {
1117  for (int jeta = 0; jeta < neta; jeta++) {
1118  for (int i = 0; i < ndepth; i++) {
1119  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
1120  if (arecosignalHB[i][jeta][jphi] > 0.) {
1121  DefzDrecosignalHB41D->Fill(jphi, ccc1);
1122  DefzDrecosignalHB41D0->Fill(jphi, 1.);
1123  }
1124  }
1125  }
1126  }
1127  // DefzDrecosignalHB41D->Sumw2();DefzDrecosignalHB41D0->Sumw2();
1128 
1129  DefzDrecosignalHB41DF->Divide(
1130  DefzDrecosignalHB41D, DefzDrecosignalHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
1131  DefzDrecosignalHB41D0->Sumw2();
1132  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHB41DF->SetBinError(jphi,0.01);}
1133  gPad->SetGridy();
1134  gPad->SetGridx(); // gPad->SetLogz();
1135  DefzDrecosignalHB41DF->SetMarkerStyle(20);
1136  DefzDrecosignalHB41DF->SetMarkerSize(1.4);
1137  DefzDrecosignalHB41DF->GetZaxis()->SetLabelSize(0.08);
1138  DefzDrecosignalHB41DF->SetXTitle("#phi \b");
1139  DefzDrecosignalHB41DF->SetYTitle(" <D> \b");
1140  DefzDrecosignalHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
1141  DefzDrecosignalHB41DF->SetMarkerColor(4);
1142  DefzDrecosignalHB41DF->SetLineColor(
1143  4); // DefzDrecosignalHB41DF->SetMinimum(0.8); DefzDrecosignalHB41DF->SetMinimum(-0.015);
1144  DefzDrecosignalHB41DF->Draw("Error");
1146  c1x1->Update();
1147  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHB.png");
1148  c1x1->Clear();
1149  // clean-up
1150  if (DefzDrecosignalHB41D)
1151  delete DefzDrecosignalHB41D;
1152  if (DefzDrecosignalHB41D0)
1153  delete DefzDrecosignalHB41D0;
1154  if (DefzDrecosignalHB41DF)
1155  delete DefzDrecosignalHB41DF;
1156 
1157  //========================================================================================== 14
1158  //======================================================================
1159  //======================================================================1D plot: D vs phi , different eta, depth=1
1160  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
1161  c3x5->Clear();
1163  c3x5->Divide(4, 4);
1164  c3x5->cd(1);
1165  int kcountHBpositivedirectionRecosignalD1 = 1;
1166  TH1F* h2CeffHBpositivedirectionRecosignalD1 = new TH1F("h2CeffHBpositivedirectionRecosignalD1", "", nphi, 0., 72.);
1167 
1168  for (int jeta = 0; jeta < njeta; jeta++) {
1169  // positivedirectionRecosignalD:
1170  if (jeta - 41 >= 0) {
1171  // for (int i=0;i<ndepth;i++) {
1172  // depth=1
1173  for (int i = 0; i < 1; i++) {
1174  TH1F* HBpositivedirectionRecosignalD1 = (TH1F*)h2CeffHBpositivedirectionRecosignalD1->Clone("twod1");
1175 
1176  float ccctest = 0; // to avoid empty massive elements
1177  for (int jphi = 0; jphi < nphi; jphi++) {
1178  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
1179  if (arecosignalHB[i][jeta][jphi] > 0.) {
1180  HBpositivedirectionRecosignalD1->Fill(jphi, ccc1);
1181  ccctest = 1.; //HBpositivedirectionRecosignalD1->SetBinError(i,0.01);
1182  }
1183  } // for jphi
1184  if (ccctest > 0.) {
1185  //cout<<"1414 kcountHBpositivedirectionRecosignalD1 = "<<kcountHBpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
1186  c3x5->cd(kcountHBpositivedirectionRecosignalD1);
1187  HBpositivedirectionRecosignalD1->SetMarkerStyle(20);
1188  HBpositivedirectionRecosignalD1->SetMarkerSize(0.4);
1189  HBpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
1190  HBpositivedirectionRecosignalD1->SetXTitle("HBpositivedirectionRecosignalD1 \b");
1191  HBpositivedirectionRecosignalD1->SetMarkerColor(2);
1192  HBpositivedirectionRecosignalD1->SetLineColor(0);
1193  gPad->SetGridy();
1194  gPad->SetGridx();
1195  // gPad->SetLogy();
1196  if (kcountHBpositivedirectionRecosignalD1 == 1)
1197  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
1198  if (kcountHBpositivedirectionRecosignalD1 == 2)
1199  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
1200  if (kcountHBpositivedirectionRecosignalD1 == 3)
1201  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
1202  if (kcountHBpositivedirectionRecosignalD1 == 4)
1203  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
1204  if (kcountHBpositivedirectionRecosignalD1 == 5)
1205  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
1206  if (kcountHBpositivedirectionRecosignalD1 == 6)
1207  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
1208  if (kcountHBpositivedirectionRecosignalD1 == 7)
1209  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
1210  if (kcountHBpositivedirectionRecosignalD1 == 8)
1211  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
1212  if (kcountHBpositivedirectionRecosignalD1 == 9)
1213  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
1214  if (kcountHBpositivedirectionRecosignalD1 == 10)
1215  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
1216  if (kcountHBpositivedirectionRecosignalD1 == 11)
1217  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
1218  if (kcountHBpositivedirectionRecosignalD1 == 12)
1219  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
1220  if (kcountHBpositivedirectionRecosignalD1 == 13)
1221  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
1222  if (kcountHBpositivedirectionRecosignalD1 == 14)
1223  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
1224  if (kcountHBpositivedirectionRecosignalD1 == 15)
1225  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
1226  if (kcountHBpositivedirectionRecosignalD1 == 16)
1227  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
1228  HBpositivedirectionRecosignalD1->Draw("Error");
1229  kcountHBpositivedirectionRecosignalD1++;
1230  if (kcountHBpositivedirectionRecosignalD1 > 16)
1231  break; // 4x6 = 24
1232  } //ccctest>0
1233 
1234  } // for i
1235  } //if(jeta-41 >= 0)
1236  } //for jeta
1238  c3x5->Update();
1239  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
1240  c3x5->Clear();
1241  // clean-up
1242  if (h2CeffHBpositivedirectionRecosignalD1)
1243  delete h2CeffHBpositivedirectionRecosignalD1;
1244  //========================================================================================== 15
1245  //======================================================================
1246  //======================================================================1D plot: D vs phi , different eta, depth=2
1247  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
1248  c3x5->Clear();
1249  c3x5->Divide(4, 4);
1250  c3x5->cd(1);
1251  int kcountHBpositivedirectionRecosignalD2 = 1;
1252  TH1F* h2CeffHBpositivedirectionRecosignalD2 = new TH1F("h2CeffHBpositivedirectionRecosignalD2", "", nphi, 0., 72.);
1253 
1254  for (int jeta = 0; jeta < njeta; jeta++) {
1255  // positivedirectionRecosignalD:
1256  if (jeta - 41 >= 0) {
1257  // for (int i=0;i<ndepth;i++) {
1258  // depth=2
1259  for (int i = 1; i < 2; i++) {
1260  TH1F* HBpositivedirectionRecosignalD2 = (TH1F*)h2CeffHBpositivedirectionRecosignalD2->Clone("twod1");
1261 
1262  float ccctest = 0; // to avoid empty massive elements
1263  for (int jphi = 0; jphi < nphi; jphi++) {
1264  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
1265  if (arecosignalHB[i][jeta][jphi] > 0.) {
1266  HBpositivedirectionRecosignalD2->Fill(jphi, ccc1);
1267  ccctest = 1.; //HBpositivedirectionRecosignalD2->SetBinError(i,0.01);
1268  }
1269  } // for jphi
1270  if (ccctest > 0.) {
1271  //cout<<"1515 kcountHBpositivedirectionRecosignalD2 = "<<kcountHBpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
1272  c3x5->cd(kcountHBpositivedirectionRecosignalD2);
1273  HBpositivedirectionRecosignalD2->SetMarkerStyle(20);
1274  HBpositivedirectionRecosignalD2->SetMarkerSize(0.4);
1275  HBpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
1276  HBpositivedirectionRecosignalD2->SetXTitle("HBpositivedirectionRecosignalD2 \b");
1277  HBpositivedirectionRecosignalD2->SetMarkerColor(2);
1278  HBpositivedirectionRecosignalD2->SetLineColor(0);
1279  gPad->SetGridy();
1280  gPad->SetGridx();
1281  // gPad->SetLogy();
1282  if (kcountHBpositivedirectionRecosignalD2 == 1)
1283  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
1284  if (kcountHBpositivedirectionRecosignalD2 == 2)
1285  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
1286  if (kcountHBpositivedirectionRecosignalD2 == 3)
1287  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
1288  if (kcountHBpositivedirectionRecosignalD2 == 4)
1289  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
1290  if (kcountHBpositivedirectionRecosignalD2 == 5)
1291  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
1292  if (kcountHBpositivedirectionRecosignalD2 == 6)
1293  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
1294  if (kcountHBpositivedirectionRecosignalD2 == 7)
1295  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
1296  if (kcountHBpositivedirectionRecosignalD2 == 8)
1297  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
1298  if (kcountHBpositivedirectionRecosignalD2 == 9)
1299  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
1300  if (kcountHBpositivedirectionRecosignalD2 == 10)
1301  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
1302  if (kcountHBpositivedirectionRecosignalD2 == 11)
1303  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
1304  if (kcountHBpositivedirectionRecosignalD2 == 12)
1305  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
1306  if (kcountHBpositivedirectionRecosignalD2 == 13)
1307  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
1308  if (kcountHBpositivedirectionRecosignalD2 == 14)
1309  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
1310  if (kcountHBpositivedirectionRecosignalD2 == 15)
1311  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
1312  if (kcountHBpositivedirectionRecosignalD2 == 16)
1313  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
1314  HBpositivedirectionRecosignalD2->Draw("Error");
1315  kcountHBpositivedirectionRecosignalD2++;
1316  if (kcountHBpositivedirectionRecosignalD2 > 16)
1317  break; // 4x6 = 24
1318  } //ccctest>0
1319 
1320  } // for i
1321  } //if(jeta-41 >= 0)
1322  } //for jeta
1324  c3x5->Update();
1325  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
1326  c3x5->Clear();
1327  // clean-up
1328  if (h2CeffHBpositivedirectionRecosignalD2)
1329  delete h2CeffHBpositivedirectionRecosignalD2;
1330  //========================================================================================== 16
1331  //======================================================================
1332  //======================================================================1D plot: D vs phi , different eta, depth=3
1333  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
1334  c3x5->Clear();
1335  c3x5->Divide(4, 4);
1336  c3x5->cd(1);
1337  int kcountHBpositivedirectionRecosignalD3 = 1;
1338  TH1F* h2CeffHBpositivedirectionRecosignalD3 = new TH1F("h2CeffHBpositivedirectionRecosignalD3", "", nphi, 0., 72.);
1339 
1340  for (int jeta = 0; jeta < njeta; jeta++) {
1341  // positivedirectionRecosignalD:
1342  if (jeta - 41 >= 0) {
1343  // for (int i=0;i<ndepth;i++) {
1344  // depth=3
1345  for (int i = 2; i < 3; i++) {
1346  TH1F* HBpositivedirectionRecosignalD3 = (TH1F*)h2CeffHBpositivedirectionRecosignalD3->Clone("twod1");
1347 
1348  float ccctest = 0; // to avoid empty massive elements
1349  for (int jphi = 0; jphi < nphi; jphi++) {
1350  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
1351  if (arecosignalHB[i][jeta][jphi] > 0.) {
1352  HBpositivedirectionRecosignalD3->Fill(jphi, ccc1);
1353  ccctest = 1.; //HBpositivedirectionRecosignalD3->SetBinError(i,0.01);
1354  }
1355  } // for jphi
1356  if (ccctest > 0.) {
1357  //cout<<"1616 kcountHBpositivedirectionRecosignalD3 = "<<kcountHBpositivedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
1358  c3x5->cd(kcountHBpositivedirectionRecosignalD3);
1359  HBpositivedirectionRecosignalD3->SetMarkerStyle(20);
1360  HBpositivedirectionRecosignalD3->SetMarkerSize(0.4);
1361  HBpositivedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
1362  HBpositivedirectionRecosignalD3->SetXTitle("HBpositivedirectionRecosignalD3 \b");
1363  HBpositivedirectionRecosignalD3->SetMarkerColor(2);
1364  HBpositivedirectionRecosignalD3->SetLineColor(0);
1365  gPad->SetGridy();
1366  gPad->SetGridx();
1367  // gPad->SetLogy();
1368  if (kcountHBpositivedirectionRecosignalD3 == 1)
1369  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
1370  if (kcountHBpositivedirectionRecosignalD3 == 2)
1371  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
1372  if (kcountHBpositivedirectionRecosignalD3 == 3)
1373  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
1374  if (kcountHBpositivedirectionRecosignalD3 == 4)
1375  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
1376  if (kcountHBpositivedirectionRecosignalD3 == 5)
1377  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
1378  if (kcountHBpositivedirectionRecosignalD3 == 6)
1379  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
1380  if (kcountHBpositivedirectionRecosignalD3 == 7)
1381  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
1382  if (kcountHBpositivedirectionRecosignalD3 == 8)
1383  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
1384  if (kcountHBpositivedirectionRecosignalD3 == 9)
1385  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
1386  if (kcountHBpositivedirectionRecosignalD3 == 10)
1387  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
1388  if (kcountHBpositivedirectionRecosignalD3 == 11)
1389  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
1390  if (kcountHBpositivedirectionRecosignalD3 == 12)
1391  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
1392  if (kcountHBpositivedirectionRecosignalD3 == 13)
1393  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
1394  if (kcountHBpositivedirectionRecosignalD3 == 14)
1395  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
1396  if (kcountHBpositivedirectionRecosignalD3 == 15)
1397  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
1398  if (kcountHBpositivedirectionRecosignalD3 == 16)
1399  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
1400  HBpositivedirectionRecosignalD3->Draw("Error");
1401  kcountHBpositivedirectionRecosignalD3++;
1402  if (kcountHBpositivedirectionRecosignalD3 > 16)
1403  break; // 4x6 = 24
1404  } //ccctest>0
1405 
1406  } // for i
1407  } //if(jeta-41 >= 0)
1408  } //for jeta
1410  c3x5->Update();
1411  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
1412  c3x5->Clear();
1413  // clean-up
1414  if (h2CeffHBpositivedirectionRecosignalD3)
1415  delete h2CeffHBpositivedirectionRecosignalD3;
1416  //========================================================================================== 17
1417  //======================================================================
1418  //======================================================================1D plot: D vs phi , different eta, depth=4
1419  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
1420  c3x5->Clear();
1421  c3x5->Divide(4, 4);
1422  c3x5->cd(1);
1423  int kcountHBpositivedirectionRecosignalD4 = 1;
1424  TH1F* h2CeffHBpositivedirectionRecosignalD4 = new TH1F("h2CeffHBpositivedirectionRecosignalD4", "", nphi, 0., 72.);
1425 
1426  for (int jeta = 0; jeta < njeta; jeta++) {
1427  // positivedirectionRecosignalD:
1428  if (jeta - 41 >= 0) {
1429  // for (int i=0;i<ndepth;i++) {
1430  // depth=4
1431  for (int i = 3; i < 4; i++) {
1432  TH1F* HBpositivedirectionRecosignalD4 = (TH1F*)h2CeffHBpositivedirectionRecosignalD4->Clone("twod1");
1433 
1434  float ccctest = 0; // to avoid empty massive elements
1435  for (int jphi = 0; jphi < nphi; jphi++) {
1436  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
1437  if (arecosignalHB[i][jeta][jphi] > 0.) {
1438  HBpositivedirectionRecosignalD4->Fill(jphi, ccc1);
1439  ccctest = 1.; //HBpositivedirectionRecosignalD4->SetBinError(i,0.01);
1440  }
1441  } // for jphi
1442  if (ccctest > 0.) {
1443  //cout<<"1717 kcountHBpositivedirectionRecosignalD4 = "<<kcountHBpositivedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
1444  c3x5->cd(kcountHBpositivedirectionRecosignalD4);
1445  HBpositivedirectionRecosignalD4->SetMarkerStyle(20);
1446  HBpositivedirectionRecosignalD4->SetMarkerSize(0.4);
1447  HBpositivedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
1448  HBpositivedirectionRecosignalD4->SetXTitle("HBpositivedirectionRecosignalD4 \b");
1449  HBpositivedirectionRecosignalD4->SetMarkerColor(2);
1450  HBpositivedirectionRecosignalD4->SetLineColor(0);
1451  gPad->SetGridy();
1452  gPad->SetGridx();
1453  // gPad->SetLogy();
1454  if (kcountHBpositivedirectionRecosignalD4 == 1)
1455  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
1456  if (kcountHBpositivedirectionRecosignalD4 == 2)
1457  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
1458  if (kcountHBpositivedirectionRecosignalD4 == 3)
1459  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
1460  if (kcountHBpositivedirectionRecosignalD4 == 4)
1461  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
1462  if (kcountHBpositivedirectionRecosignalD4 == 5)
1463  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
1464  if (kcountHBpositivedirectionRecosignalD4 == 6)
1465  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
1466  if (kcountHBpositivedirectionRecosignalD4 == 7)
1467  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
1468  if (kcountHBpositivedirectionRecosignalD4 == 8)
1469  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
1470  if (kcountHBpositivedirectionRecosignalD4 == 9)
1471  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
1472  if (kcountHBpositivedirectionRecosignalD4 == 10)
1473  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
1474  if (kcountHBpositivedirectionRecosignalD4 == 11)
1475  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
1476  if (kcountHBpositivedirectionRecosignalD4 == 12)
1477  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
1478  if (kcountHBpositivedirectionRecosignalD4 == 13)
1479  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
1480  if (kcountHBpositivedirectionRecosignalD4 == 14)
1481  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
1482  if (kcountHBpositivedirectionRecosignalD4 == 15)
1483  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
1484  if (kcountHBpositivedirectionRecosignalD4 == 16)
1485  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
1486  HBpositivedirectionRecosignalD4->Draw("Error");
1487  kcountHBpositivedirectionRecosignalD4++;
1488  if (kcountHBpositivedirectionRecosignalD4 > 16)
1489  break; // 4x6 = 24
1490  } //ccctest>0
1491 
1492  } // for i
1493  } //if(jeta-41 >= 0)
1494  } //for jeta
1496  c3x5->Update();
1497  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
1498  c3x5->Clear();
1499  // clean-up
1500  if (h2CeffHBpositivedirectionRecosignalD4)
1501  delete h2CeffHBpositivedirectionRecosignalD4;
1502 
1503  //========================================================================================== 22214
1504  //======================================================================
1505  //======================================================================1D plot: D vs phi , different eta, depth=1
1506  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
1507  c3x5->Clear();
1509  c3x5->Divide(4, 4);
1510  c3x5->cd(1);
1511  int kcountHBnegativedirectionRecosignalD1 = 1;
1512  TH1F* h2CeffHBnegativedirectionRecosignalD1 = new TH1F("h2CeffHBnegativedirectionRecosignalD1", "", nphi, 0., 72.);
1513 
1514  for (int jeta = 0; jeta < njeta; jeta++) {
1515  // negativedirectionRecosignalD:
1516  if (jeta - 41 < 0) {
1517  // for (int i=0;i<ndepth;i++) {
1518  // depth=1
1519  for (int i = 0; i < 1; i++) {
1520  TH1F* HBnegativedirectionRecosignalD1 = (TH1F*)h2CeffHBnegativedirectionRecosignalD1->Clone("twod1");
1521 
1522  float ccctest = 0; // to avoid empty massive elements
1523  for (int jphi = 0; jphi < nphi; jphi++) {
1524  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
1525  if (arecosignalHB[i][jeta][jphi] > 0.) {
1526  HBnegativedirectionRecosignalD1->Fill(jphi, ccc1);
1527  ccctest = 1.; //HBnegativedirectionRecosignalD1->SetBinError(i,0.01);
1528  }
1529  } // for jphi
1530  if (ccctest > 0.) {
1531  //cout<<"1414 kcountHBnegativedirectionRecosignalD1 = "<<kcountHBnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
1532  c3x5->cd(kcountHBnegativedirectionRecosignalD1);
1533  HBnegativedirectionRecosignalD1->SetMarkerStyle(20);
1534  HBnegativedirectionRecosignalD1->SetMarkerSize(0.4);
1535  HBnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
1536  HBnegativedirectionRecosignalD1->SetXTitle("HBnegativedirectionRecosignalD1 \b");
1537  HBnegativedirectionRecosignalD1->SetMarkerColor(2);
1538  HBnegativedirectionRecosignalD1->SetLineColor(0);
1539  gPad->SetGridy();
1540  gPad->SetGridx();
1541  // gPad->SetLogy();
1542  if (kcountHBnegativedirectionRecosignalD1 == 1)
1543  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -16; depth = 1 \b");
1544  if (kcountHBnegativedirectionRecosignalD1 == 2)
1545  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -15; depth = 1 \b");
1546  if (kcountHBnegativedirectionRecosignalD1 == 3)
1547  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -14; depth = 1 \b");
1548  if (kcountHBnegativedirectionRecosignalD1 == 4)
1549  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -13; depth = 1 \b");
1550  if (kcountHBnegativedirectionRecosignalD1 == 5)
1551  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -12; depth = 1 \b");
1552  if (kcountHBnegativedirectionRecosignalD1 == 6)
1553  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -11; depth = 1 \b");
1554  if (kcountHBnegativedirectionRecosignalD1 == 7)
1555  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -10; depth = 1 \b");
1556  if (kcountHBnegativedirectionRecosignalD1 == 8)
1557  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -9; depth = 1 \b");
1558  if (kcountHBnegativedirectionRecosignalD1 == 9)
1559  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -8; depth = 1 \b");
1560  if (kcountHBnegativedirectionRecosignalD1 == 10)
1561  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -7; depth = 1 \b");
1562  if (kcountHBnegativedirectionRecosignalD1 == 11)
1563  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -6; depth = 1 \b");
1564  if (kcountHBnegativedirectionRecosignalD1 == 12)
1565  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -5; depth = 1 \b");
1566  if (kcountHBnegativedirectionRecosignalD1 == 13)
1567  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -4; depth = 1 \b");
1568  if (kcountHBnegativedirectionRecosignalD1 == 14)
1569  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -3; depth = 1 \b");
1570  if (kcountHBnegativedirectionRecosignalD1 == 15)
1571  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -2; depth = 1 \b");
1572  if (kcountHBnegativedirectionRecosignalD1 == 16)
1573  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -1; depth = 1 \b");
1574  HBnegativedirectionRecosignalD1->Draw("Error");
1575  kcountHBnegativedirectionRecosignalD1++;
1576  if (kcountHBnegativedirectionRecosignalD1 > 16)
1577  break; // 4x6 = 24
1578  } //ccctest>0
1579 
1580  } // for i
1581  } //if(jeta-41 < 0)
1582  } //for jeta
1584  c3x5->Update();
1585  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
1586  c3x5->Clear();
1587  // clean-up
1588  if (h2CeffHBnegativedirectionRecosignalD1)
1589  delete h2CeffHBnegativedirectionRecosignalD1;
1590  //========================================================================================== 22215
1591  //======================================================================
1592  //======================================================================1D plot: D vs phi , different eta, depth=2
1593  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
1594  c3x5->Clear();
1595  c3x5->Divide(4, 4);
1596  c3x5->cd(1);
1597  int kcountHBnegativedirectionRecosignalD2 = 1;
1598  TH1F* h2CeffHBnegativedirectionRecosignalD2 = new TH1F("h2CeffHBnegativedirectionRecosignalD2", "", nphi, 0., 72.);
1599 
1600  for (int jeta = 0; jeta < njeta; jeta++) {
1601  // negativedirectionRecosignalD:
1602  if (jeta - 41 < 0) {
1603  // for (int i=0;i<ndepth;i++) {
1604  // depth=2
1605  for (int i = 1; i < 2; i++) {
1606  TH1F* HBnegativedirectionRecosignalD2 = (TH1F*)h2CeffHBnegativedirectionRecosignalD2->Clone("twod1");
1607 
1608  float ccctest = 0; // to avoid empty massive elements
1609  for (int jphi = 0; jphi < nphi; jphi++) {
1610  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
1611  if (arecosignalHB[i][jeta][jphi] > 0.) {
1612  HBnegativedirectionRecosignalD2->Fill(jphi, ccc1);
1613  ccctest = 1.; //HBnegativedirectionRecosignalD2->SetBinError(i,0.01);
1614  }
1615  } // for jphi
1616  if (ccctest > 0.) {
1617  //cout<<"1515 kcountHBnegativedirectionRecosignalD2 = "<<kcountHBnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
1618  c3x5->cd(kcountHBnegativedirectionRecosignalD2);
1619  HBnegativedirectionRecosignalD2->SetMarkerStyle(20);
1620  HBnegativedirectionRecosignalD2->SetMarkerSize(0.4);
1621  HBnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
1622  HBnegativedirectionRecosignalD2->SetXTitle("HBnegativedirectionRecosignalD2 \b");
1623  HBnegativedirectionRecosignalD2->SetMarkerColor(2);
1624  HBnegativedirectionRecosignalD2->SetLineColor(0);
1625  gPad->SetGridy();
1626  gPad->SetGridx();
1627  // gPad->SetLogy();
1628  if (kcountHBnegativedirectionRecosignalD2 == 1)
1629  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
1630  if (kcountHBnegativedirectionRecosignalD2 == 2)
1631  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
1632  if (kcountHBnegativedirectionRecosignalD2 == 3)
1633  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
1634  if (kcountHBnegativedirectionRecosignalD2 == 4)
1635  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
1636  if (kcountHBnegativedirectionRecosignalD2 == 5)
1637  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
1638  if (kcountHBnegativedirectionRecosignalD2 == 6)
1639  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
1640  if (kcountHBnegativedirectionRecosignalD2 == 7)
1641  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
1642  if (kcountHBnegativedirectionRecosignalD2 == 8)
1643  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-9 ; depth = 2 \b");
1644  if (kcountHBnegativedirectionRecosignalD2 == 9)
1645  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-8 ; depth = 2 \b");
1646  if (kcountHBnegativedirectionRecosignalD2 == 10)
1647  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-7 ; depth = 2 \b");
1648  if (kcountHBnegativedirectionRecosignalD2 == 11)
1649  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-6 ; depth = 2 \b");
1650  if (kcountHBnegativedirectionRecosignalD2 == 12)
1651  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-5 ; depth = 2 \b");
1652  if (kcountHBnegativedirectionRecosignalD2 == 13)
1653  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-4 ; depth = 2 \b");
1654  if (kcountHBnegativedirectionRecosignalD2 == 14)
1655  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-3 ; depth = 2 \b");
1656  if (kcountHBnegativedirectionRecosignalD2 == 15)
1657  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-2 ; depth = 2 \b");
1658  if (kcountHBnegativedirectionRecosignalD2 == 16)
1659  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-1 ; depth = 2 \b");
1660  HBnegativedirectionRecosignalD2->Draw("Error");
1661  kcountHBnegativedirectionRecosignalD2++;
1662  if (kcountHBnegativedirectionRecosignalD2 > 16)
1663  break; // 4x6 = 24
1664  } //ccctest>0
1665 
1666  } // for i
1667  } //if(jeta-41 < 0)
1668  } //for jeta
1670  c3x5->Update();
1671  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
1672  c3x5->Clear();
1673  // clean-up
1674  if (h2CeffHBnegativedirectionRecosignalD2)
1675  delete h2CeffHBnegativedirectionRecosignalD2;
1676  //========================================================================================== 22216
1677  //======================================================================
1678  //======================================================================1D plot: D vs phi , different eta, depth=3
1679  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
1680  c3x5->Clear();
1681  c3x5->Divide(4, 4);
1682  c3x5->cd(1);
1683  int kcountHBnegativedirectionRecosignalD3 = 1;
1684  TH1F* h2CeffHBnegativedirectionRecosignalD3 = new TH1F("h2CeffHBnegativedirectionRecosignalD3", "", nphi, 0., 72.);
1685 
1686  for (int jeta = 0; jeta < njeta; jeta++) {
1687  // negativedirectionRecosignalD:
1688  if (jeta - 41 < 0) {
1689  // for (int i=0;i<ndepth;i++) {
1690  // depth=3
1691  for (int i = 2; i < 3; i++) {
1692  TH1F* HBnegativedirectionRecosignalD3 = (TH1F*)h2CeffHBnegativedirectionRecosignalD3->Clone("twod1");
1693 
1694  float ccctest = 0; // to avoid empty massive elements
1695  for (int jphi = 0; jphi < nphi; jphi++) {
1696  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
1697  if (arecosignalHB[i][jeta][jphi] > 0.) {
1698  HBnegativedirectionRecosignalD3->Fill(jphi, ccc1);
1699  ccctest = 1.; //HBnegativedirectionRecosignalD3->SetBinError(i,0.01);
1700  }
1701  } // for jphi
1702  if (ccctest > 0.) {
1703  //cout<<"1616 kcountHBnegativedirectionRecosignalD3 = "<<kcountHBnegativedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
1704  c3x5->cd(kcountHBnegativedirectionRecosignalD3);
1705  HBnegativedirectionRecosignalD3->SetMarkerStyle(20);
1706  HBnegativedirectionRecosignalD3->SetMarkerSize(0.4);
1707  HBnegativedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
1708  HBnegativedirectionRecosignalD3->SetXTitle("HBnegativedirectionRecosignalD3 \b");
1709  HBnegativedirectionRecosignalD3->SetMarkerColor(2);
1710  HBnegativedirectionRecosignalD3->SetLineColor(0);
1711  gPad->SetGridy();
1712  gPad->SetGridx();
1713  // gPad->SetLogy();
1714  if (kcountHBnegativedirectionRecosignalD3 == 1)
1715  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
1716  if (kcountHBnegativedirectionRecosignalD3 == 2)
1717  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
1718  if (kcountHBnegativedirectionRecosignalD3 == 3)
1719  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
1720  if (kcountHBnegativedirectionRecosignalD3 == 4)
1721  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
1722  if (kcountHBnegativedirectionRecosignalD3 == 5)
1723  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
1724  if (kcountHBnegativedirectionRecosignalD3 == 6)
1725  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
1726  if (kcountHBnegativedirectionRecosignalD3 == 7)
1727  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
1728  if (kcountHBnegativedirectionRecosignalD3 == 8)
1729  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-9 ; depth = 3 \b");
1730  if (kcountHBnegativedirectionRecosignalD3 == 9)
1731  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-8 ; depth = 3 \b");
1732  if (kcountHBnegativedirectionRecosignalD3 == 10)
1733  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-7 ; depth = 3 \b");
1734  if (kcountHBnegativedirectionRecosignalD3 == 11)
1735  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-6 ; depth = 3 \b");
1736  if (kcountHBnegativedirectionRecosignalD3 == 12)
1737  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-5 ; depth = 3 \b");
1738  if (kcountHBnegativedirectionRecosignalD3 == 13)
1739  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-4 ; depth = 3 \b");
1740  if (kcountHBnegativedirectionRecosignalD3 == 14)
1741  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-3 ; depth = 3 \b");
1742  if (kcountHBnegativedirectionRecosignalD3 == 15)
1743  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-2 ; depth = 3 \b");
1744  if (kcountHBnegativedirectionRecosignalD3 == 16)
1745  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-1 ; depth = 3 \b");
1746  HBnegativedirectionRecosignalD3->Draw("Error");
1747  kcountHBnegativedirectionRecosignalD3++;
1748  if (kcountHBnegativedirectionRecosignalD3 > 16)
1749  break; // 4x6 = 24
1750  } //ccctest>0
1751 
1752  } // for i
1753  } //if(jeta-41 < 0)
1754  } //for jeta
1756  c3x5->Update();
1757  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
1758  c3x5->Clear();
1759  // clean-up
1760  if (h2CeffHBnegativedirectionRecosignalD3)
1761  delete h2CeffHBnegativedirectionRecosignalD3;
1762  //========================================================================================== 22217
1763  //======================================================================
1764  //======================================================================1D plot: D vs phi , different eta, depth=4
1765  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
1766  c3x5->Clear();
1767  c3x5->Divide(4, 4);
1768  c3x5->cd(1);
1769  int kcountHBnegativedirectionRecosignalD4 = 1;
1770  TH1F* h2CeffHBnegativedirectionRecosignalD4 = new TH1F("h2CeffHBnegativedirectionRecosignalD4", "", nphi, 0., 72.);
1771 
1772  for (int jeta = 0; jeta < njeta; jeta++) {
1773  // negativedirectionRecosignalD:
1774  if (jeta - 41 < 0) {
1775  // for (int i=0;i<ndepth;i++) {
1776  // depth=4
1777  for (int i = 3; i < 4; i++) {
1778  TH1F* HBnegativedirectionRecosignalD4 = (TH1F*)h2CeffHBnegativedirectionRecosignalD4->Clone("twod1");
1779 
1780  float ccctest = 0; // to avoid empty massive elements
1781  for (int jphi = 0; jphi < nphi; jphi++) {
1782  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
1783  if (arecosignalHB[i][jeta][jphi] > 0.) {
1784  HBnegativedirectionRecosignalD4->Fill(jphi, ccc1);
1785  ccctest = 1.; //HBnegativedirectionRecosignalD4->SetBinError(i,0.01);
1786  }
1787  } // for jphi
1788  if (ccctest > 0.) {
1789  //cout<<"1717 kcountHBnegativedirectionRecosignalD4 = "<<kcountHBnegativedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
1790  c3x5->cd(kcountHBnegativedirectionRecosignalD4);
1791  HBnegativedirectionRecosignalD4->SetMarkerStyle(20);
1792  HBnegativedirectionRecosignalD4->SetMarkerSize(0.4);
1793  HBnegativedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
1794  HBnegativedirectionRecosignalD4->SetXTitle("HBnegativedirectionRecosignalD4 \b");
1795  HBnegativedirectionRecosignalD4->SetMarkerColor(2);
1796  HBnegativedirectionRecosignalD4->SetLineColor(0);
1797  gPad->SetGridy();
1798  gPad->SetGridx();
1799  // gPad->SetLogy();
1800  if (kcountHBnegativedirectionRecosignalD4 == 1)
1801  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
1802  if (kcountHBnegativedirectionRecosignalD4 == 2)
1803  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
1804  if (kcountHBnegativedirectionRecosignalD4 == 3)
1805  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
1806  if (kcountHBnegativedirectionRecosignalD4 == 4)
1807  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
1808  if (kcountHBnegativedirectionRecosignalD4 == 5)
1809  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
1810  if (kcountHBnegativedirectionRecosignalD4 == 6)
1811  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
1812  if (kcountHBnegativedirectionRecosignalD4 == 7)
1813  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
1814  if (kcountHBnegativedirectionRecosignalD4 == 8)
1815  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-9 ; depth = 4 \b");
1816  if (kcountHBnegativedirectionRecosignalD4 == 9)
1817  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-8 ; depth = 4 \b");
1818  if (kcountHBnegativedirectionRecosignalD4 == 10)
1819  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-7 ; depth = 4 \b");
1820  if (kcountHBnegativedirectionRecosignalD4 == 11)
1821  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-6 ; depth = 4 \b");
1822  if (kcountHBnegativedirectionRecosignalD4 == 12)
1823  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-5 ; depth = 4 \b");
1824  if (kcountHBnegativedirectionRecosignalD4 == 13)
1825  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-4 ; depth = 4 \b");
1826  if (kcountHBnegativedirectionRecosignalD4 == 14)
1827  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-3 ; depth = 4 \b");
1828  if (kcountHBnegativedirectionRecosignalD4 == 15)
1829  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-2 ; depth = 4 \b");
1830  if (kcountHBnegativedirectionRecosignalD4 == 16)
1831  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-1 ; depth = 4 \b");
1832  HBnegativedirectionRecosignalD4->Draw("Error");
1833  kcountHBnegativedirectionRecosignalD4++;
1834  if (kcountHBnegativedirectionRecosignalD4 > 16)
1835  break; // 4x6 = 24
1836  } //ccctest>0
1837 
1838  } // for i
1839  } //if(jeta-41 < 0)
1840  } //for jeta
1842  c3x5->Update();
1843  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
1844  c3x5->Clear();
1845  // clean-up
1846  if (h2CeffHBnegativedirectionRecosignalD4)
1847  delete h2CeffHBnegativedirectionRecosignalD4;
1848 
1849  //===================================================================== END of Recosignal HB for phi-symmetry
1850  //===================================================================== END of Recosignal HB for phi-symmetry
1851  //===================================================================== END of Recosignal HB for phi-symmetry
1852 
1856  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
1857  //ndepth = k_max[3];
1858  ndepth = 7;
1859  // const int ndepth = 7;
1860  double arecosignalhe[ndepth][njeta][njphi];
1861  double recosignalvariancehe[ndepth][njeta][njphi];
1862  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HE
1863  TH2F* recSignalEnergy1HE1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE1");
1864  TH2F* recSignalEnergy0HE1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE1");
1865  TH2F* recSignalEnergyHE1 = (TH2F*)recSignalEnergy1HE1->Clone("recSignalEnergyHE1");
1866  recSignalEnergyHE1->Divide(recSignalEnergy1HE1, recSignalEnergy0HE1, 1, 1, "B");
1867  TH2F* recSignalEnergy1HE2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE2");
1868  TH2F* recSignalEnergy0HE2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE2");
1869  TH2F* recSignalEnergyHE2 = (TH2F*)recSignalEnergy1HE2->Clone("recSignalEnergyHE2");
1870  recSignalEnergyHE2->Divide(recSignalEnergy1HE2, recSignalEnergy0HE2, 1, 1, "B");
1871  TH2F* recSignalEnergy1HE3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE3");
1872  TH2F* recSignalEnergy0HE3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE3");
1873  TH2F* recSignalEnergyHE3 = (TH2F*)recSignalEnergy1HE3->Clone("recSignalEnergyHE3");
1874  recSignalEnergyHE3->Divide(recSignalEnergy1HE3, recSignalEnergy0HE3, 1, 1, "B");
1875  TH2F* recSignalEnergy1HE4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE4");
1876  TH2F* recSignalEnergy0HE4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE4");
1877  TH2F* recSignalEnergyHE4 = (TH2F*)recSignalEnergy1HE4->Clone("recSignalEnergyHE4");
1878  recSignalEnergyHE4->Divide(recSignalEnergy1HE4, recSignalEnergy0HE4, 1, 1, "B");
1879  TH2F* recSignalEnergy1HE5 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE5");
1880  TH2F* recSignalEnergy0HE5 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE5");
1881  TH2F* recSignalEnergyHE5 = (TH2F*)recSignalEnergy1HE5->Clone("recSignalEnergyHE5");
1882  recSignalEnergyHE5->Divide(recSignalEnergy1HE5, recSignalEnergy0HE5, 1, 1, "B");
1883  TH2F* recSignalEnergy1HE6 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE6");
1884  TH2F* recSignalEnergy0HE6 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE6");
1885  TH2F* recSignalEnergyHE6 = (TH2F*)recSignalEnergy1HE6->Clone("recSignalEnergyHE6");
1886  recSignalEnergyHE6->Divide(recSignalEnergy1HE6, recSignalEnergy0HE6, 1, 1, "B");
1887  TH2F* recSignalEnergy1HE7 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE7");
1888  TH2F* recSignalEnergy0HE7 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE7");
1889  TH2F* recSignalEnergyHE7 = (TH2F*)recSignalEnergy1HE7->Clone("recSignalEnergyHE7");
1890  recSignalEnergyHE7->Divide(recSignalEnergy1HE7, recSignalEnergy0HE7, 1, 1, "B");
1891  for (int jeta = 0; jeta < njeta; jeta++) {
1892  //====================================================================== PHI normalization & put R into massive arecosignalhe
1893  //preparation for PHI normalization:
1894  double sumrecosignalHE0 = 0;
1895  int nsumrecosignalHE0 = 0;
1896  double sumrecosignalHE1 = 0;
1897  int nsumrecosignalHE1 = 0;
1898  double sumrecosignalHE2 = 0;
1899  int nsumrecosignalHE2 = 0;
1900  double sumrecosignalHE3 = 0;
1901  int nsumrecosignalHE3 = 0;
1902  double sumrecosignalHE4 = 0;
1903  int nsumrecosignalHE4 = 0;
1904  double sumrecosignalHE5 = 0;
1905  int nsumrecosignalHE5 = 0;
1906  double sumrecosignalHE6 = 0;
1907  int nsumrecosignalHE6 = 0;
1908  for (int jphi = 0; jphi < njphi; jphi++) {
1909  arecosignalhe[0][jeta][jphi] = recSignalEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
1910  arecosignalhe[1][jeta][jphi] = recSignalEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
1911  arecosignalhe[2][jeta][jphi] = recSignalEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
1912  arecosignalhe[3][jeta][jphi] = recSignalEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
1913  arecosignalhe[4][jeta][jphi] = recSignalEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
1914  arecosignalhe[5][jeta][jphi] = recSignalEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
1915  arecosignalhe[6][jeta][jphi] = recSignalEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
1916  if (arecosignalhe[0][jeta][jphi] > 0.) {
1917  sumrecosignalHE0 += arecosignalhe[0][jeta][jphi];
1918  ++nsumrecosignalHE0;
1919  }
1920  if (arecosignalhe[1][jeta][jphi] > 0.) {
1921  sumrecosignalHE1 += arecosignalhe[1][jeta][jphi];
1922  ++nsumrecosignalHE1;
1923  }
1924  if (arecosignalhe[2][jeta][jphi] > 0.) {
1925  sumrecosignalHE2 += arecosignalhe[2][jeta][jphi];
1926  ++nsumrecosignalHE2;
1927  }
1928  if (arecosignalhe[3][jeta][jphi] > 0.) {
1929  sumrecosignalHE3 += arecosignalhe[3][jeta][jphi];
1930  ++nsumrecosignalHE3;
1931  }
1932  if (arecosignalhe[4][jeta][jphi] > 0.) {
1933  sumrecosignalHE4 += arecosignalhe[4][jeta][jphi];
1934  ++nsumrecosignalHE4;
1935  }
1936  if (arecosignalhe[5][jeta][jphi] > 0.) {
1937  sumrecosignalHE5 += arecosignalhe[5][jeta][jphi];
1938  ++nsumrecosignalHE5;
1939  }
1940  if (arecosignalhe[6][jeta][jphi] > 0.) {
1941  sumrecosignalHE6 += arecosignalhe[6][jeta][jphi];
1942  ++nsumrecosignalHE6;
1943  }
1944  } // phi
1945  // PHI normalization:
1946  for (int jphi = 0; jphi < njphi; jphi++) {
1947  if (arecosignalhe[0][jeta][jphi] > 0.)
1948  arecosignalhe[0][jeta][jphi] /= (sumrecosignalHE0 / nsumrecosignalHE0);
1949  if (arecosignalhe[1][jeta][jphi] > 0.)
1950  arecosignalhe[1][jeta][jphi] /= (sumrecosignalHE1 / nsumrecosignalHE1);
1951  if (arecosignalhe[2][jeta][jphi] > 0.)
1952  arecosignalhe[2][jeta][jphi] /= (sumrecosignalHE2 / nsumrecosignalHE2);
1953  if (arecosignalhe[3][jeta][jphi] > 0.)
1954  arecosignalhe[3][jeta][jphi] /= (sumrecosignalHE3 / nsumrecosignalHE3);
1955  if (arecosignalhe[4][jeta][jphi] > 0.)
1956  arecosignalhe[4][jeta][jphi] /= (sumrecosignalHE4 / nsumrecosignalHE4);
1957  if (arecosignalhe[5][jeta][jphi] > 0.)
1958  arecosignalhe[5][jeta][jphi] /= (sumrecosignalHE5 / nsumrecosignalHE5);
1959  if (arecosignalhe[6][jeta][jphi] > 0.)
1960  arecosignalhe[6][jeta][jphi] /= (sumrecosignalHE6 / nsumrecosignalHE6);
1961  } // phi
1962  } //eta
1963  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
1964  //======================================================================
1965  //======================================================================
1966  //cout<<" R2D-eta/phi-plot: R, averaged over depthes *****" <<endl;
1967  c2x1->Clear();
1969  c2x1->Divide(2, 1);
1970  c2x1->cd(1);
1971  TH2F* GefzRrecosignalHE42D = new TH2F("GefzRrecosignalHE42D", "", neta, -41., 41., nphi, 0., 72.);
1972  TH2F* GefzRrecosignalHE42D0 = new TH2F("GefzRrecosignalHE42D0", "", neta, -41., 41., nphi, 0., 72.);
1973  TH2F* GefzRrecosignalHE42DF = (TH2F*)GefzRrecosignalHE42D0->Clone("GefzRrecosignalHE42DF");
1974  for (int i = 0; i < ndepth; i++) {
1975  for (int jeta = 0; jeta < neta; jeta++) {
1976  for (int jphi = 0; jphi < nphi; jphi++) {
1977  double ccc1 = arecosignalhe[i][jeta][jphi];
1978  int k2plot = jeta - 41;
1979  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
1980  if (ccc1 != 0.) {
1981  GefzRrecosignalHE42D->Fill(kkk, jphi, ccc1);
1982  GefzRrecosignalHE42D0->Fill(kkk, jphi, 1.);
1983  }
1984  }
1985  }
1986  }
1987  GefzRrecosignalHE42DF->Divide(GefzRrecosignalHE42D, GefzRrecosignalHE42D0, 1, 1, "B"); // average A
1988  gPad->SetGridy();
1989  gPad->SetGridx(); // gPad->SetLogz();
1990  GefzRrecosignalHE42DF->SetXTitle("<R>_depth #eta \b");
1991  GefzRrecosignalHE42DF->SetYTitle(" #phi \b");
1992  GefzRrecosignalHE42DF->Draw("COLZ");
1993 
1994  c2x1->cd(2);
1995  TH1F* energyhitSignal_HE = (TH1F*)dir->FindObjectAny("h_energyhitSignal_HE");
1996  energyhitSignal_HE->SetMarkerStyle(20);
1997  energyhitSignal_HE->SetMarkerSize(0.4);
1998  energyhitSignal_HE->GetYaxis()->SetLabelSize(0.04);
1999  energyhitSignal_HE->SetXTitle("energyhitSignal_HE \b");
2000  energyhitSignal_HE->SetMarkerColor(2);
2001  energyhitSignal_HE->SetLineColor(0);
2002  gPad->SetGridy();
2003  gPad->SetGridx();
2004  energyhitSignal_HE->Draw("Error");
2005 
2007  c2x1->Update();
2008  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHE.png");
2009  c2x1->Clear();
2010  // clean-up
2011  if (GefzRrecosignalHE42D)
2012  delete GefzRrecosignalHE42D;
2013  if (GefzRrecosignalHE42D0)
2014  delete GefzRrecosignalHE42D0;
2015  if (GefzRrecosignalHE42DF)
2016  delete GefzRrecosignalHE42DF;
2017  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
2018  //======================================================================
2019  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
2020  c1x1->Clear();
2022  c1x1->Divide(1, 1);
2023  c1x1->cd(1);
2024  TH1F* GefzRrecosignalHE41D = new TH1F("GefzRrecosignalHE41D", "", nphi, 0., 72.);
2025  TH1F* GefzRrecosignalHE41D0 = new TH1F("GefzRrecosignalHE41D0", "", nphi, 0., 72.);
2026  TH1F* GefzRrecosignalHE41DF = (TH1F*)GefzRrecosignalHE41D0->Clone("GefzRrecosignalHE41DF");
2027  for (int jphi = 0; jphi < nphi; jphi++) {
2028  for (int jeta = 0; jeta < neta; jeta++) {
2029  for (int i = 0; i < ndepth; i++) {
2030  double ccc1 = arecosignalhe[i][jeta][jphi];
2031  if (ccc1 != 0.) {
2032  GefzRrecosignalHE41D->Fill(jphi, ccc1);
2033  GefzRrecosignalHE41D0->Fill(jphi, 1.);
2034  }
2035  }
2036  }
2037  }
2038  GefzRrecosignalHE41DF->Divide(
2039  GefzRrecosignalHE41D, GefzRrecosignalHE41D0, 1, 1, "B"); // R averaged over depthes & eta
2040  GefzRrecosignalHE41D0->Sumw2();
2041  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHE41DF->SetBinError(jphi,0.01);}
2042  gPad->SetGridy();
2043  gPad->SetGridx(); // gPad->SetLogz();
2044  GefzRrecosignalHE41DF->SetMarkerStyle(20);
2045  GefzRrecosignalHE41DF->SetMarkerSize(1.4);
2046  GefzRrecosignalHE41DF->GetZaxis()->SetLabelSize(0.08);
2047  GefzRrecosignalHE41DF->SetXTitle("#phi \b");
2048  GefzRrecosignalHE41DF->SetYTitle(" <R> \b");
2049  GefzRrecosignalHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
2050  GefzRrecosignalHE41DF->SetMarkerColor(4);
2051  GefzRrecosignalHE41DF->SetLineColor(
2052  4); // GefzRrecosignalHE41DF->SetMinimum(0.8); // GefzRrecosignalHE41DF->SetMaximum(1.000);
2053  GefzRrecosignalHE41DF->Draw("Error");
2055  c1x1->Update();
2056  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHE.png");
2057  c1x1->Clear();
2058  // clean-up
2059  if (GefzRrecosignalHE41D)
2060  delete GefzRrecosignalHE41D;
2061  if (GefzRrecosignalHE41D0)
2062  delete GefzRrecosignalHE41D0;
2063  if (GefzRrecosignalHE41DF)
2064  delete GefzRrecosignalHE41DF;
2065 
2066  //========================================================================================== 4
2067  //======================================================================
2068  //======================================================================1D plot: R vs phi , different eta, depth=1
2069  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
2070  c3x5->Clear();
2072  c3x5->Divide(3, 5);
2073  c3x5->cd(1);
2074  int kcountHEpositivedirectionRecosignal1 = 1;
2075  TH1F* h2CeffHEpositivedirectionRecosignal1 = new TH1F("h2CeffHEpositivedirectionRecosignal1", "", nphi, 0., 72.);
2076  for (int jeta = 0; jeta < njeta; jeta++) {
2077  // positivedirectionRecosignal:
2078  if (jeta - 41 >= 0) {
2079  // for (int i=0;i<ndepth;i++) {
2080  // depth=1
2081  for (int i = 0; i < 1; i++) {
2082  TH1F* HEpositivedirectionRecosignal1 = (TH1F*)h2CeffHEpositivedirectionRecosignal1->Clone("twod1");
2083  float ccctest = 0; // to avoid empty massive elements
2084  for (int jphi = 0; jphi < nphi; jphi++) {
2085  double ccc1 = arecosignalhe[i][jeta][jphi];
2086  if (ccc1 != 0.) {
2087  HEpositivedirectionRecosignal1->Fill(jphi, ccc1);
2088  ccctest = 1.; //HEpositivedirectionRecosignal1->SetBinError(i,0.01);
2089  }
2090  } // for jphi
2091  if (ccctest > 0.) {
2092  // cout<<"444 kcountHEpositivedirectionRecosignal1 = "<<kcountHEpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
2093  c3x5->cd(kcountHEpositivedirectionRecosignal1);
2094  HEpositivedirectionRecosignal1->SetMarkerStyle(20);
2095  HEpositivedirectionRecosignal1->SetMarkerSize(0.4);
2096  HEpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
2097  HEpositivedirectionRecosignal1->SetXTitle("HEpositivedirectionRecosignal1 \b");
2098  HEpositivedirectionRecosignal1->SetMarkerColor(2);
2099  HEpositivedirectionRecosignal1->SetLineColor(0);
2100  gPad->SetGridy();
2101  gPad->SetGridx();
2102  // gPad->SetLogy();
2103  if (kcountHEpositivedirectionRecosignal1 == 1)
2104  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
2105  if (kcountHEpositivedirectionRecosignal1 == 2)
2106  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
2107  if (kcountHEpositivedirectionRecosignal1 == 3)
2108  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
2109  if (kcountHEpositivedirectionRecosignal1 == 4)
2110  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
2111  if (kcountHEpositivedirectionRecosignal1 == 5)
2112  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
2113  if (kcountHEpositivedirectionRecosignal1 == 6)
2114  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
2115  if (kcountHEpositivedirectionRecosignal1 == 7)
2116  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
2117  if (kcountHEpositivedirectionRecosignal1 == 8)
2118  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
2119  if (kcountHEpositivedirectionRecosignal1 == 9)
2120  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
2121  if (kcountHEpositivedirectionRecosignal1 == 10)
2122  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
2123  if (kcountHEpositivedirectionRecosignal1 == 11)
2124  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
2125  if (kcountHEpositivedirectionRecosignal1 == 12)
2126  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
2127  HEpositivedirectionRecosignal1->Draw("Error");
2128  kcountHEpositivedirectionRecosignal1++;
2129  if (kcountHEpositivedirectionRecosignal1 > 12)
2130  break; // 4x6 = 24
2131  } //ccctest>0
2132 
2133  } // for i
2134  } //if(jeta-41 >= 0)
2135  } //for jeta
2137  c3x5->Update();
2138  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
2139  c3x5->Clear();
2140  // clean-up
2141  if (h2CeffHEpositivedirectionRecosignal1)
2142  delete h2CeffHEpositivedirectionRecosignal1;
2143 
2144  //========================================================================================== 5
2145  //======================================================================
2146  //======================================================================1D plot: R vs phi , different eta, depth=2
2147  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
2148  c3x5->Clear();
2150  c3x5->Divide(3, 5);
2151  c3x5->cd(1);
2152  int kcountHEpositivedirectionRecosignal2 = 1;
2153  TH1F* h2CeffHEpositivedirectionRecosignal2 = new TH1F("h2CeffHEpositivedirectionRecosignal2", "", nphi, 0., 72.);
2154  for (int jeta = 0; jeta < njeta; jeta++) {
2155  // positivedirectionRecosignal:
2156  if (jeta - 41 >= 0) {
2157  // for (int i=0;i<ndepth;i++) {
2158  // depth=2
2159  for (int i = 1; i < 2; i++) {
2160  TH1F* HEpositivedirectionRecosignal2 = (TH1F*)h2CeffHEpositivedirectionRecosignal2->Clone("twod1");
2161  float ccctest = 0; // to avoid empty massive elements
2162  for (int jphi = 0; jphi < nphi; jphi++) {
2163  double ccc1 = arecosignalhe[i][jeta][jphi];
2164  if (ccc1 != 0.) {
2165  HEpositivedirectionRecosignal2->Fill(jphi, ccc1);
2166  ccctest = 1.; //HEpositivedirectionRecosignal2->SetBinError(i,0.01);
2167  }
2168  } // for jphi
2169  if (ccctest > 0.) {
2170  //cout<<"555 kcountHEpositivedirectionRecosignal2 = "<<kcountHEpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
2171  c3x5->cd(kcountHEpositivedirectionRecosignal2);
2172  HEpositivedirectionRecosignal2->SetMarkerStyle(20);
2173  HEpositivedirectionRecosignal2->SetMarkerSize(0.4);
2174  HEpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
2175  HEpositivedirectionRecosignal2->SetXTitle("HEpositivedirectionRecosignal2 \b");
2176  HEpositivedirectionRecosignal2->SetMarkerColor(2);
2177  HEpositivedirectionRecosignal2->SetLineColor(0);
2178  gPad->SetGridy();
2179  gPad->SetGridx();
2180  // gPad->SetLogy();
2181  if (kcountHEpositivedirectionRecosignal2 == 1)
2182  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
2183  if (kcountHEpositivedirectionRecosignal2 == 2)
2184  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
2185  if (kcountHEpositivedirectionRecosignal2 == 3)
2186  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
2187  if (kcountHEpositivedirectionRecosignal2 == 4)
2188  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
2189  if (kcountHEpositivedirectionRecosignal2 == 5)
2190  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
2191  if (kcountHEpositivedirectionRecosignal2 == 6)
2192  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
2193  if (kcountHEpositivedirectionRecosignal2 == 7)
2194  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
2195  if (kcountHEpositivedirectionRecosignal2 == 8)
2196  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
2197  if (kcountHEpositivedirectionRecosignal2 == 9)
2198  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
2199  if (kcountHEpositivedirectionRecosignal2 == 10)
2200  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
2201  if (kcountHEpositivedirectionRecosignal2 == 11)
2202  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
2203  if (kcountHEpositivedirectionRecosignal2 == 12)
2204  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
2205  if (kcountHEpositivedirectionRecosignal2 == 13)
2206  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
2207  HEpositivedirectionRecosignal2->Draw("Error");
2208  kcountHEpositivedirectionRecosignal2++;
2209  if (kcountHEpositivedirectionRecosignal2 > 13)
2210  break; // 4x6 = 24
2211  } //ccctest>0
2212 
2213  } // for i
2214  } //if(jeta-41 >= 0)
2215  } //for jeta
2217  c3x5->Update();
2218  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
2219  c3x5->Clear();
2220  // clean-up
2221  if (h2CeffHEpositivedirectionRecosignal2)
2222  delete h2CeffHEpositivedirectionRecosignal2;
2223  //========================================================================================== 6
2224  //======================================================================
2225  //======================================================================1D plot: R vs phi , different eta, depth=3
2226  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
2227  c3x5->Clear();
2229  c3x5->Divide(3, 5);
2230  c3x5->cd(1);
2231  int kcountHEpositivedirectionRecosignal3 = 1;
2232  TH1F* h2CeffHEpositivedirectionRecosignal3 = new TH1F("h2CeffHEpositivedirectionRecosignal3", "", nphi, 0., 72.);
2233  for (int jeta = 0; jeta < njeta; jeta++) {
2234  // positivedirectionRecosignal:
2235  if (jeta - 41 >= 0) {
2236  // for (int i=0;i<ndepth;i++) {
2237  // depth=3
2238  for (int i = 2; i < 3; i++) {
2239  TH1F* HEpositivedirectionRecosignal3 = (TH1F*)h2CeffHEpositivedirectionRecosignal3->Clone("twod1");
2240  float ccctest = 0; // to avoid empty massive elements
2241  for (int jphi = 0; jphi < nphi; jphi++) {
2242  double ccc1 = arecosignalhe[i][jeta][jphi];
2243  if (ccc1 != 0.) {
2244  HEpositivedirectionRecosignal3->Fill(jphi, ccc1);
2245  ccctest = 1.; //HEpositivedirectionRecosignal3->SetBinError(i,0.01);
2246  }
2247  } // for jphi
2248  if (ccctest > 0.) {
2249  //cout<<"666 kcountHEpositivedirectionRecosignal3 = "<<kcountHEpositivedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
2250  c3x5->cd(kcountHEpositivedirectionRecosignal3);
2251  HEpositivedirectionRecosignal3->SetMarkerStyle(20);
2252  HEpositivedirectionRecosignal3->SetMarkerSize(0.4);
2253  HEpositivedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
2254  HEpositivedirectionRecosignal3->SetXTitle("HEpositivedirectionRecosignal3 \b");
2255  HEpositivedirectionRecosignal3->SetMarkerColor(2);
2256  HEpositivedirectionRecosignal3->SetLineColor(0);
2257  gPad->SetGridy();
2258  gPad->SetGridx();
2259  // gPad->SetLogy();
2260  if (kcountHEpositivedirectionRecosignal3 == 1)
2261  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
2262  if (kcountHEpositivedirectionRecosignal3 == 2)
2263  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
2264  if (kcountHEpositivedirectionRecosignal3 == 3)
2265  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
2266  if (kcountHEpositivedirectionRecosignal3 == 4)
2267  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
2268  if (kcountHEpositivedirectionRecosignal3 == 5)
2269  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
2270  if (kcountHEpositivedirectionRecosignal3 == 6)
2271  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
2272  if (kcountHEpositivedirectionRecosignal3 == 7)
2273  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
2274  if (kcountHEpositivedirectionRecosignal3 == 8)
2275  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
2276  if (kcountHEpositivedirectionRecosignal3 == 9)
2277  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
2278  if (kcountHEpositivedirectionRecosignal3 == 10)
2279  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
2280  if (kcountHEpositivedirectionRecosignal3 == 11)
2281  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
2282  if (kcountHEpositivedirectionRecosignal3 == 12)
2283  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
2284  if (kcountHEpositivedirectionRecosignal3 == 13)
2285  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
2286  HEpositivedirectionRecosignal3->Draw("Error");
2287  kcountHEpositivedirectionRecosignal3++;
2288  if (kcountHEpositivedirectionRecosignal3 > 13)
2289  break; // 4x6 = 24
2290  } //ccctest>0
2291 
2292  } // for i
2293  } //if(jeta-41 >= 0)
2294  } //for jeta
2296  c3x5->Update();
2297  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
2298  c3x5->Clear();
2299  // clean-up
2300  if (h2CeffHEpositivedirectionRecosignal3)
2301  delete h2CeffHEpositivedirectionRecosignal3;
2302  //========================================================================================== 7
2303  //======================================================================
2304  //======================================================================1D plot: R vs phi , different eta, depth=4
2305  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
2306  c3x5->Clear();
2308  c3x5->Divide(3, 5);
2309  c3x5->cd(1);
2310  int kcountHEpositivedirectionRecosignal4 = 1;
2311  TH1F* h2CeffHEpositivedirectionRecosignal4 = new TH1F("h2CeffHEpositivedirectionRecosignal4", "", nphi, 0., 72.);
2312 
2313  for (int jeta = 0; jeta < njeta; jeta++) {
2314  // positivedirectionRecosignal:
2315  if (jeta - 41 >= 0) {
2316  // for (int i=0;i<ndepth;i++) {
2317  // depth=4
2318  for (int i = 3; i < 4; i++) {
2319  TH1F* HEpositivedirectionRecosignal4 = (TH1F*)h2CeffHEpositivedirectionRecosignal4->Clone("twod1");
2320 
2321  float ccctest = 0; // to avoid empty massive elements
2322  for (int jphi = 0; jphi < nphi; jphi++) {
2323  double ccc1 = arecosignalhe[i][jeta][jphi];
2324  if (ccc1 != 0.) {
2325  HEpositivedirectionRecosignal4->Fill(jphi, ccc1);
2326  ccctest = 1.; //HEpositivedirectionRecosignal4->SetBinError(i,0.01);
2327  }
2328  } // for jphi
2329  if (ccctest > 0.) {
2330  //cout<<"777 kcountHEpositivedirectionRecosignal4 = "<<kcountHEpositivedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
2331  c3x5->cd(kcountHEpositivedirectionRecosignal4);
2332  HEpositivedirectionRecosignal4->SetMarkerStyle(20);
2333  HEpositivedirectionRecosignal4->SetMarkerSize(0.4);
2334  HEpositivedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
2335  HEpositivedirectionRecosignal4->SetXTitle("HEpositivedirectionRecosignal4 \b");
2336  HEpositivedirectionRecosignal4->SetMarkerColor(2);
2337  HEpositivedirectionRecosignal4->SetLineColor(0);
2338  gPad->SetGridy();
2339  gPad->SetGridx();
2340  // gPad->SetLogy();
2341  if (kcountHEpositivedirectionRecosignal4 == 1)
2342  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
2343  if (kcountHEpositivedirectionRecosignal4 == 2)
2344  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
2345  if (kcountHEpositivedirectionRecosignal4 == 3)
2346  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
2347  if (kcountHEpositivedirectionRecosignal4 == 4)
2348  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
2349  if (kcountHEpositivedirectionRecosignal4 == 5)
2350  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
2351  if (kcountHEpositivedirectionRecosignal4 == 6)
2352  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
2353  if (kcountHEpositivedirectionRecosignal4 == 7)
2354  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
2355  if (kcountHEpositivedirectionRecosignal4 == 8)
2356  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
2357  if (kcountHEpositivedirectionRecosignal4 == 9)
2358  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
2359  if (kcountHEpositivedirectionRecosignal4 == 10)
2360  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
2361  if (kcountHEpositivedirectionRecosignal4 == 11)
2362  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
2363  if (kcountHEpositivedirectionRecosignal4 == 12)
2364  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
2365  HEpositivedirectionRecosignal4->Draw("Error");
2366  kcountHEpositivedirectionRecosignal4++;
2367  if (kcountHEpositivedirectionRecosignal4 > 12)
2368  break; // 4x6 = 24
2369  } //ccctest>0
2370 
2371  } // for i
2372  } //if(jeta-41 >= 0)
2373  } //for jeta
2375  c3x5->Update();
2376  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
2377  c3x5->Clear();
2378  // clean-up
2379  if (h2CeffHEpositivedirectionRecosignal4)
2380  delete h2CeffHEpositivedirectionRecosignal4;
2381  //========================================================================================== 8
2382  //======================================================================
2383  //======================================================================1D plot: R vs phi , different eta, depth=5
2384  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
2385  c3x5->Clear();
2387  c3x5->Divide(3, 5);
2388  c3x5->cd(1);
2389  int kcountHEpositivedirectionRecosignal5 = 1;
2390  TH1F* h2CeffHEpositivedirectionRecosignal5 = new TH1F("h2CeffHEpositivedirectionRecosignal5", "", nphi, 0., 72.);
2391 
2392  for (int jeta = 0; jeta < njeta; jeta++) {
2393  // positivedirectionRecosignal:
2394  if (jeta - 41 >= 0) {
2395  // for (int i=0;i<ndepth;i++) {
2396  // depth=5
2397  for (int i = 4; i < 5; i++) {
2398  TH1F* HEpositivedirectionRecosignal5 = (TH1F*)h2CeffHEpositivedirectionRecosignal5->Clone("twod1");
2399 
2400  float ccctest = 0; // to avoid empty massive elements
2401  for (int jphi = 0; jphi < nphi; jphi++) {
2402  // cout<<"888 initial kcountHEpositivedirectionRecosignal5 = "<<kcountHEpositivedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" arecosignalhe[i][jeta][jphi]= "<< arecosignalhe[i][jeta][jphi] <<" depth= "<< i <<endl;
2403 
2404  double ccc1 = arecosignalhe[i][jeta][jphi];
2405  if (ccc1 != 0.) {
2406  HEpositivedirectionRecosignal5->Fill(jphi, ccc1);
2407  ccctest = 1.; //HEpositivedirectionRecosignal5->SetBinError(i,0.01);
2408  }
2409  } // for jphi
2410  if (ccctest > 0.) {
2411  //cout<<"888 kcountHEpositivedirectionRecosignal5 = "<<kcountHEpositivedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<endl;
2412  c3x5->cd(kcountHEpositivedirectionRecosignal5);
2413  HEpositivedirectionRecosignal5->SetMarkerStyle(20);
2414  HEpositivedirectionRecosignal5->SetMarkerSize(0.4);
2415  HEpositivedirectionRecosignal5->GetYaxis()->SetLabelSize(0.04);
2416  HEpositivedirectionRecosignal5->SetXTitle("HEpositivedirectionRecosignal5 \b");
2417  HEpositivedirectionRecosignal5->SetMarkerColor(2);
2418  HEpositivedirectionRecosignal5->SetLineColor(0);
2419  gPad->SetGridy();
2420  gPad->SetGridx();
2421  // gPad->SetLogy();
2422  if (kcountHEpositivedirectionRecosignal5 == 1)
2423  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
2424  if (kcountHEpositivedirectionRecosignal5 == 2)
2425  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
2426  if (kcountHEpositivedirectionRecosignal5 == 3)
2427  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
2428  if (kcountHEpositivedirectionRecosignal5 == 4)
2429  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
2430  if (kcountHEpositivedirectionRecosignal5 == 5)
2431  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
2432  if (kcountHEpositivedirectionRecosignal5 == 6)
2433  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
2434  if (kcountHEpositivedirectionRecosignal5 == 7)
2435  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
2436  if (kcountHEpositivedirectionRecosignal5 == 8)
2437  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
2438  if (kcountHEpositivedirectionRecosignal5 == 9)
2439  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
2440  if (kcountHEpositivedirectionRecosignal5 == 10)
2441  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
2442  if (kcountHEpositivedirectionRecosignal5 == 11)
2443  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
2444  HEpositivedirectionRecosignal5->Draw("Error");
2445  kcountHEpositivedirectionRecosignal5++;
2446  if (kcountHEpositivedirectionRecosignal5 > 11)
2447  break; // 4x6 = 24
2448  } //ccctest>0
2449 
2450  } // for i
2451  } //if(jeta-41 >= 0)
2452  } //for jeta
2454  c3x5->Update();
2455  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
2456  c3x5->Clear();
2457  // clean-up
2458  if (h2CeffHEpositivedirectionRecosignal5)
2459  delete h2CeffHEpositivedirectionRecosignal5;
2460  //========================================================================================== 9
2461  //======================================================================
2462  //======================================================================1D plot: R vs phi , different eta, depth=6
2463  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
2464  c3x5->Clear();
2466  c3x5->Divide(3, 5);
2467  c3x5->cd(1);
2468  int kcountHEpositivedirectionRecosignal6 = 1;
2469  TH1F* h2CeffHEpositivedirectionRecosignal6 = new TH1F("h2CeffHEpositivedirectionRecosignal6", "", nphi, 0., 72.);
2470 
2471  for (int jeta = 0; jeta < njeta; jeta++) {
2472  // positivedirectionRecosignal:
2473  if (jeta - 41 >= 0) {
2474  // for (int i=0;i<ndepth;i++) {
2475  // depth=6
2476  for (int i = 5; i < 6; i++) {
2477  TH1F* HEpositivedirectionRecosignal6 = (TH1F*)h2CeffHEpositivedirectionRecosignal6->Clone("twod1");
2478 
2479  float ccctest = 0; // to avoid empty massive elements
2480  for (int jphi = 0; jphi < nphi; jphi++) {
2481  double ccc1 = arecosignalhe[i][jeta][jphi];
2482  if (ccc1 != 0.) {
2483  HEpositivedirectionRecosignal6->Fill(jphi, ccc1);
2484  ccctest = 1.; //HEpositivedirectionRecosignal6->SetBinError(i,0.01);
2485  }
2486  } // for jphi
2487  if (ccctest > 0.) {
2488  //cout<<"999 kcountHEpositivedirectionRecosignal6 = "<<kcountHEpositivedirectionRecosignal6 <<" jeta-41= "<< jeta-41 <<endl;
2489  c3x5->cd(kcountHEpositivedirectionRecosignal6);
2490  HEpositivedirectionRecosignal6->SetMarkerStyle(20);
2491  HEpositivedirectionRecosignal6->SetMarkerSize(0.4);
2492  HEpositivedirectionRecosignal6->GetYaxis()->SetLabelSize(0.04);
2493  HEpositivedirectionRecosignal6->SetXTitle("HEpositivedirectionRecosignal6 \b");
2494  HEpositivedirectionRecosignal6->SetMarkerColor(2);
2495  HEpositivedirectionRecosignal6->SetLineColor(0);
2496  gPad->SetGridy();
2497  gPad->SetGridx();
2498  // gPad->SetLogy();
2499  if (kcountHEpositivedirectionRecosignal6 == 1)
2500  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
2501  if (kcountHEpositivedirectionRecosignal6 == 2)
2502  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
2503  if (kcountHEpositivedirectionRecosignal6 == 3)
2504  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
2505  if (kcountHEpositivedirectionRecosignal6 == 4)
2506  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
2507  if (kcountHEpositivedirectionRecosignal6 == 5)
2508  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
2509  if (kcountHEpositivedirectionRecosignal6 == 6)
2510  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
2511  if (kcountHEpositivedirectionRecosignal6 == 7)
2512  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
2513  if (kcountHEpositivedirectionRecosignal6 == 8)
2514  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
2515  if (kcountHEpositivedirectionRecosignal6 == 9)
2516  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
2517  if (kcountHEpositivedirectionRecosignal6 == 10)
2518  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
2519  HEpositivedirectionRecosignal6->Draw("Error");
2520  kcountHEpositivedirectionRecosignal6++;
2521  if (kcountHEpositivedirectionRecosignal6 > 10)
2522  break; // 4x6 = 24
2523  } //ccctest>0
2524 
2525  } // for i
2526  } //if(jeta-41 >= 0)
2527  } //for jeta
2529  c3x5->Update();
2530  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
2531  c3x5->Clear();
2532  // clean-up
2533  if (h2CeffHEpositivedirectionRecosignal6)
2534  delete h2CeffHEpositivedirectionRecosignal6;
2535  //========================================================================================== 10
2536  //======================================================================
2537  //======================================================================1D plot: R vs phi , different eta, depth=7
2538  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
2539  c3x5->Clear();
2541  c3x5->Divide(3, 5);
2542  c3x5->cd(1);
2543  int kcountHEpositivedirectionRecosignal7 = 1;
2544  TH1F* h2CeffHEpositivedirectionRecosignal7 = new TH1F("h2CeffHEpositivedirectionRecosignal7", "", nphi, 0., 72.);
2545 
2546  for (int jeta = 0; jeta < njeta; jeta++) {
2547  // positivedirectionRecosignal:
2548  if (jeta - 41 >= 0) {
2549  // for (int i=0;i<ndepth;i++) {
2550  // depth=7
2551  for (int i = 6; i < 7; i++) {
2552  TH1F* HEpositivedirectionRecosignal7 = (TH1F*)h2CeffHEpositivedirectionRecosignal7->Clone("twod1");
2553 
2554  float ccctest = 0; // to avoid empty massive elements
2555  for (int jphi = 0; jphi < nphi; jphi++) {
2556  double ccc1 = arecosignalhe[i][jeta][jphi];
2557  if (ccc1 != 0.) {
2558  HEpositivedirectionRecosignal7->Fill(jphi, ccc1);
2559  ccctest = 1.; //HEpositivedirectionRecosignal7->SetBinError(i,0.01);
2560  }
2561  } // for jphi
2562  if (ccctest > 0.) {
2563  //cout<<"1010 kcountHEpositivedirectionRecosignal7 = "<<kcountHEpositivedirectionRecosignal7 <<" jeta-41= "<< jeta-41 <<endl;
2564  c3x5->cd(kcountHEpositivedirectionRecosignal7);
2565  HEpositivedirectionRecosignal7->SetMarkerStyle(20);
2566  HEpositivedirectionRecosignal7->SetMarkerSize(0.4);
2567  HEpositivedirectionRecosignal7->GetYaxis()->SetLabelSize(0.04);
2568  HEpositivedirectionRecosignal7->SetXTitle("HEpositivedirectionRecosignal7 \b");
2569  HEpositivedirectionRecosignal7->SetMarkerColor(2);
2570  HEpositivedirectionRecosignal7->SetLineColor(0);
2571  gPad->SetGridy();
2572  gPad->SetGridx();
2573  // gPad->SetLogy();
2574  if (kcountHEpositivedirectionRecosignal7 == 1)
2575  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
2576  if (kcountHEpositivedirectionRecosignal7 == 2)
2577  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
2578  if (kcountHEpositivedirectionRecosignal7 == 3)
2579  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
2580  HEpositivedirectionRecosignal7->Draw("Error");
2581  kcountHEpositivedirectionRecosignal7++;
2582  if (kcountHEpositivedirectionRecosignal7 > 3)
2583  break; //
2584  } //ccctest>0
2585 
2586  } // for i
2587  } //if(jeta-41 >= 0)
2588  } //for jeta
2590  c3x5->Update();
2591  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
2592  c3x5->Clear();
2593  // clean-up
2594  if (h2CeffHEpositivedirectionRecosignal7)
2595  delete h2CeffHEpositivedirectionRecosignal7;
2596 
2598  //========================================================================================== 1114
2599  //======================================================================
2600  //======================================================================1D plot: R vs phi , different eta, depth=1
2601  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
2602  c3x5->Clear();
2604  c3x5->Divide(3, 5);
2605  c3x5->cd(1);
2606  int kcountHEnegativedirectionRecosignal1 = 1;
2607  TH1F* h2CeffHEnegativedirectionRecosignal1 = new TH1F("h2CeffHEnegativedirectionRecosignal1", "", nphi, 0., 72.);
2608  for (int jeta = 0; jeta < njeta; jeta++) {
2609  // negativedirectionRecosignal:
2610  if (jeta - 41 < 0) {
2611  // for (int i=0;i<ndepth;i++) {
2612  // depth=1
2613  for (int i = 0; i < 1; i++) {
2614  TH1F* HEnegativedirectionRecosignal1 = (TH1F*)h2CeffHEnegativedirectionRecosignal1->Clone("twod1");
2615  float ccctest = 0; // to avoid empty massive elements
2616  for (int jphi = 0; jphi < nphi; jphi++) {
2617  double ccc1 = arecosignalhe[i][jeta][jphi];
2618  if (ccc1 != 0.) {
2619  HEnegativedirectionRecosignal1->Fill(jphi, ccc1);
2620  ccctest = 1.; //HEnegativedirectionRecosignal1->SetBinError(i,0.01);
2621  }
2622  } // for jphi
2623  if (ccctest > 0.) {
2624  // cout<<"444 kcountHEnegativedirectionRecosignal1 = "<<kcountHEnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
2625  c3x5->cd(kcountHEnegativedirectionRecosignal1);
2626  HEnegativedirectionRecosignal1->SetMarkerStyle(20);
2627  HEnegativedirectionRecosignal1->SetMarkerSize(0.4);
2628  HEnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
2629  HEnegativedirectionRecosignal1->SetXTitle("HEnegativedirectionRecosignal1 \b");
2630  HEnegativedirectionRecosignal1->SetMarkerColor(2);
2631  HEnegativedirectionRecosignal1->SetLineColor(0);
2632  gPad->SetGridy();
2633  gPad->SetGridx();
2634  // gPad->SetLogy();
2635  if (kcountHEnegativedirectionRecosignal1 == 1)
2636  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
2637  if (kcountHEnegativedirectionRecosignal1 == 2)
2638  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
2639  if (kcountHEnegativedirectionRecosignal1 == 3)
2640  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
2641  if (kcountHEnegativedirectionRecosignal1 == 4)
2642  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
2643  if (kcountHEnegativedirectionRecosignal1 == 5)
2644  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
2645  if (kcountHEnegativedirectionRecosignal1 == 6)
2646  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
2647  if (kcountHEnegativedirectionRecosignal1 == 7)
2648  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
2649  if (kcountHEnegativedirectionRecosignal1 == 8)
2650  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
2651  if (kcountHEnegativedirectionRecosignal1 == 9)
2652  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
2653  if (kcountHEnegativedirectionRecosignal1 == 10)
2654  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
2655  if (kcountHEnegativedirectionRecosignal1 == 11)
2656  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
2657  if (kcountHEnegativedirectionRecosignal1 == 12)
2658  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
2659  HEnegativedirectionRecosignal1->Draw("Error");
2660  kcountHEnegativedirectionRecosignal1++;
2661  if (kcountHEnegativedirectionRecosignal1 > 12)
2662  break; // 4x6 = 24
2663  } //ccctest>0
2664 
2665  } // for i
2666  } //if(jeta-41 < 0)
2667  } //for jeta
2669  c3x5->Update();
2670  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
2671  c3x5->Clear();
2672  // clean-up
2673  if (h2CeffHEnegativedirectionRecosignal1)
2674  delete h2CeffHEnegativedirectionRecosignal1;
2675 
2676  //========================================================================================== 1115
2677  //======================================================================
2678  //======================================================================1D plot: R vs phi , different eta, depth=2
2679  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
2680  c3x5->Clear();
2682  c3x5->Divide(3, 5);
2683  c3x5->cd(1);
2684  int kcountHEnegativedirectionRecosignal2 = 1;
2685  TH1F* h2CeffHEnegativedirectionRecosignal2 = new TH1F("h2CeffHEnegativedirectionRecosignal2", "", nphi, 0., 72.);
2686  for (int jeta = 0; jeta < njeta; jeta++) {
2687  // negativedirectionRecosignal:
2688  if (jeta - 41 < 0) {
2689  // for (int i=0;i<ndepth;i++) {
2690  // depth=2
2691  for (int i = 1; i < 2; i++) {
2692  TH1F* HEnegativedirectionRecosignal2 = (TH1F*)h2CeffHEnegativedirectionRecosignal2->Clone("twod1");
2693  float ccctest = 0; // to avoid empty massive elements
2694  for (int jphi = 0; jphi < nphi; jphi++) {
2695  double ccc1 = arecosignalhe[i][jeta][jphi];
2696  if (ccc1 != 0.) {
2697  HEnegativedirectionRecosignal2->Fill(jphi, ccc1);
2698  ccctest = 1.; //HEnegativedirectionRecosignal2->SetBinError(i,0.01);
2699  }
2700  } // for jphi
2701  if (ccctest > 0.) {
2702  //cout<<"555 kcountHEnegativedirectionRecosignal2 = "<<kcountHEnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
2703  c3x5->cd(kcountHEnegativedirectionRecosignal2);
2704  HEnegativedirectionRecosignal2->SetMarkerStyle(20);
2705  HEnegativedirectionRecosignal2->SetMarkerSize(0.4);
2706  HEnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
2707  HEnegativedirectionRecosignal2->SetXTitle("HEnegativedirectionRecosignal2 \b");
2708  HEnegativedirectionRecosignal2->SetMarkerColor(2);
2709  HEnegativedirectionRecosignal2->SetLineColor(0);
2710  gPad->SetGridy();
2711  gPad->SetGridx();
2712  // gPad->SetLogy();
2713  if (kcountHEnegativedirectionRecosignal2 == 1)
2714  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
2715  if (kcountHEnegativedirectionRecosignal2 == 2)
2716  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
2717  if (kcountHEnegativedirectionRecosignal2 == 3)
2718  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
2719  if (kcountHEnegativedirectionRecosignal2 == 4)
2720  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
2721  if (kcountHEnegativedirectionRecosignal2 == 5)
2722  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
2723  if (kcountHEnegativedirectionRecosignal2 == 6)
2724  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
2725  if (kcountHEnegativedirectionRecosignal2 == 7)
2726  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
2727  if (kcountHEnegativedirectionRecosignal2 == 8)
2728  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
2729  if (kcountHEnegativedirectionRecosignal2 == 9)
2730  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
2731  if (kcountHEnegativedirectionRecosignal2 == 10)
2732  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
2733  if (kcountHEnegativedirectionRecosignal2 == 11)
2734  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
2735  if (kcountHEnegativedirectionRecosignal2 == 12)
2736  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
2737  if (kcountHEnegativedirectionRecosignal2 == 13)
2738  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
2739  HEnegativedirectionRecosignal2->Draw("Error");
2740  kcountHEnegativedirectionRecosignal2++;
2741  if (kcountHEnegativedirectionRecosignal2 > 13)
2742  break; // 4x6 = 24
2743  } //ccctest>0
2744 
2745  } // for i
2746  } //if(jeta-41 < 0)
2747  } //for jeta
2749  c3x5->Update();
2750  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
2751  c3x5->Clear();
2752  // clean-up
2753  if (h2CeffHEnegativedirectionRecosignal2)
2754  delete h2CeffHEnegativedirectionRecosignal2;
2755  //========================================================================================== 1116
2756  //======================================================================
2757  //======================================================================1D plot: R vs phi , different eta, depth=3
2758  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
2759  c3x5->Clear();
2761  c3x5->Divide(3, 5);
2762  c3x5->cd(1);
2763  int kcountHEnegativedirectionRecosignal3 = 1;
2764  TH1F* h2CeffHEnegativedirectionRecosignal3 = new TH1F("h2CeffHEnegativedirectionRecosignal3", "", nphi, 0., 72.);
2765  for (int jeta = 0; jeta < njeta; jeta++) {
2766  // negativedirectionRecosignal:
2767  if (jeta - 41 < 0) {
2768  // for (int i=0;i<ndepth;i++) {
2769  // depth=3
2770  for (int i = 2; i < 3; i++) {
2771  TH1F* HEnegativedirectionRecosignal3 = (TH1F*)h2CeffHEnegativedirectionRecosignal3->Clone("twod1");
2772  float ccctest = 0; // to avoid empty massive elements
2773  for (int jphi = 0; jphi < nphi; jphi++) {
2774  double ccc1 = arecosignalhe[i][jeta][jphi];
2775  if (ccc1 != 0.) {
2776  HEnegativedirectionRecosignal3->Fill(jphi, ccc1);
2777  ccctest = 1.; //HEnegativedirectionRecosignal3->SetBinError(i,0.01);
2778  }
2779  } // for jphi
2780  if (ccctest > 0.) {
2781  //cout<<"666 kcountHEnegativedirectionRecosignal3 = "<<kcountHEnegativedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
2782  c3x5->cd(kcountHEnegativedirectionRecosignal3);
2783  HEnegativedirectionRecosignal3->SetMarkerStyle(20);
2784  HEnegativedirectionRecosignal3->SetMarkerSize(0.4);
2785  HEnegativedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
2786  HEnegativedirectionRecosignal3->SetXTitle("HEnegativedirectionRecosignal3 \b");
2787  HEnegativedirectionRecosignal3->SetMarkerColor(2);
2788  HEnegativedirectionRecosignal3->SetLineColor(0);
2789  gPad->SetGridy();
2790  gPad->SetGridx();
2791  // gPad->SetLogy();
2792  if (kcountHEnegativedirectionRecosignal3 == 1)
2793  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
2794  if (kcountHEnegativedirectionRecosignal3 == 2)
2795  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
2796  if (kcountHEnegativedirectionRecosignal3 == 3)
2797  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
2798  if (kcountHEnegativedirectionRecosignal3 == 4)
2799  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
2800  if (kcountHEnegativedirectionRecosignal3 == 5)
2801  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
2802  if (kcountHEnegativedirectionRecosignal3 == 6)
2803  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
2804  if (kcountHEnegativedirectionRecosignal3 == 7)
2805  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
2806  if (kcountHEnegativedirectionRecosignal3 == 8)
2807  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
2808  if (kcountHEnegativedirectionRecosignal3 == 9)
2809  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
2810  if (kcountHEnegativedirectionRecosignal3 == 10)
2811  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
2812  if (kcountHEnegativedirectionRecosignal3 == 11)
2813  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
2814  if (kcountHEnegativedirectionRecosignal3 == 12)
2815  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
2816  if (kcountHEnegativedirectionRecosignal3 == 13)
2817  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
2818  HEnegativedirectionRecosignal3->Draw("Error");
2819  kcountHEnegativedirectionRecosignal3++;
2820  if (kcountHEnegativedirectionRecosignal3 > 13)
2821  break; // 4x6 = 24
2822  } //ccctest>0
2823 
2824  } // for i
2825  } //if(jeta-41 < 0)
2826  } //for jeta
2828  c3x5->Update();
2829  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
2830  c3x5->Clear();
2831  // clean-up
2832  if (h2CeffHEnegativedirectionRecosignal3)
2833  delete h2CeffHEnegativedirectionRecosignal3;
2834  //========================================================================================== 1117
2835  //======================================================================
2836  //======================================================================1D plot: R vs phi , different eta, depth=4
2837  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
2838  c3x5->Clear();
2840  c3x5->Divide(3, 5);
2841  c3x5->cd(1);
2842  int kcountHEnegativedirectionRecosignal4 = 1;
2843  TH1F* h2CeffHEnegativedirectionRecosignal4 = new TH1F("h2CeffHEnegativedirectionRecosignal4", "", nphi, 0., 72.);
2844 
2845  for (int jeta = 0; jeta < njeta; jeta++) {
2846  // negativedirectionRecosignal:
2847  if (jeta - 41 < 0) {
2848  // for (int i=0;i<ndepth;i++) {
2849  // depth=4
2850  for (int i = 3; i < 4; i++) {
2851  TH1F* HEnegativedirectionRecosignal4 = (TH1F*)h2CeffHEnegativedirectionRecosignal4->Clone("twod1");
2852 
2853  float ccctest = 0; // to avoid empty massive elements
2854  for (int jphi = 0; jphi < nphi; jphi++) {
2855  double ccc1 = arecosignalhe[i][jeta][jphi];
2856  if (ccc1 != 0.) {
2857  HEnegativedirectionRecosignal4->Fill(jphi, ccc1);
2858  ccctest = 1.; //HEnegativedirectionRecosignal4->SetBinError(i,0.01);
2859  }
2860  } // for jphi
2861  if (ccctest > 0.) {
2862  //cout<<"777 kcountHEnegativedirectionRecosignal4 = "<<kcountHEnegativedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
2863  c3x5->cd(kcountHEnegativedirectionRecosignal4);
2864  HEnegativedirectionRecosignal4->SetMarkerStyle(20);
2865  HEnegativedirectionRecosignal4->SetMarkerSize(0.4);
2866  HEnegativedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
2867  HEnegativedirectionRecosignal4->SetXTitle("HEnegativedirectionRecosignal4 \b");
2868  HEnegativedirectionRecosignal4->SetMarkerColor(2);
2869  HEnegativedirectionRecosignal4->SetLineColor(0);
2870  gPad->SetGridy();
2871  gPad->SetGridx();
2872  // gPad->SetLogy();
2873  if (kcountHEnegativedirectionRecosignal4 == 1)
2874  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
2875  if (kcountHEnegativedirectionRecosignal4 == 2)
2876  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
2877  if (kcountHEnegativedirectionRecosignal4 == 3)
2878  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
2879  if (kcountHEnegativedirectionRecosignal4 == 4)
2880  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
2881  if (kcountHEnegativedirectionRecosignal4 == 5)
2882  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
2883  if (kcountHEnegativedirectionRecosignal4 == 6)
2884  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
2885  if (kcountHEnegativedirectionRecosignal4 == 7)
2886  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
2887  if (kcountHEnegativedirectionRecosignal4 == 8)
2888  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
2889  if (kcountHEnegativedirectionRecosignal4 == 9)
2890  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
2891  if (kcountHEnegativedirectionRecosignal4 == 10)
2892  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
2893  if (kcountHEnegativedirectionRecosignal4 == 11)
2894  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
2895  if (kcountHEnegativedirectionRecosignal4 == 12)
2896  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
2897  HEnegativedirectionRecosignal4->Draw("Error");
2898  kcountHEnegativedirectionRecosignal4++;
2899  if (kcountHEnegativedirectionRecosignal4 > 12)
2900  break; // 4x6 = 24
2901  } //ccctest>0
2902 
2903  } // for i
2904  } //if(jeta-41 < 0)
2905  } //for jeta
2907  c3x5->Update();
2908  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
2909  c3x5->Clear();
2910  // clean-up
2911  if (h2CeffHEnegativedirectionRecosignal4)
2912  delete h2CeffHEnegativedirectionRecosignal4;
2913  //========================================================================================== 1118
2914  //======================================================================
2915  //======================================================================1D plot: R vs phi , different eta, depth=5
2916  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
2917  c3x5->Clear();
2919  c3x5->Divide(3, 5);
2920  c3x5->cd(1);
2921  int kcountHEnegativedirectionRecosignal5 = 1;
2922  TH1F* h2CeffHEnegativedirectionRecosignal5 = new TH1F("h2CeffHEnegativedirectionRecosignal5", "", nphi, 0., 72.);
2923 
2924  for (int jeta = 0; jeta < njeta; jeta++) {
2925  // negativedirectionRecosignal:
2926  if (jeta - 41 < 0) {
2927  // for (int i=0;i<ndepth;i++) {
2928  // depth=5
2929  for (int i = 4; i < 5; i++) {
2930  TH1F* HEnegativedirectionRecosignal5 = (TH1F*)h2CeffHEnegativedirectionRecosignal5->Clone("twod1");
2931 
2932  float ccctest = 0; // to avoid empty massive elements
2933  for (int jphi = 0; jphi < nphi; jphi++) {
2934  // cout<<"888 initial kcountHEnegativedirectionRecosignal5 = "<<kcountHEnegativedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" arecosignalhe[i][jeta][jphi]= "<< arecosignalhe[i][jeta][jphi] <<" depth= "<< i <<endl;
2935 
2936  double ccc1 = arecosignalhe[i][jeta][jphi];
2937  if (ccc1 != 0.) {
2938  HEnegativedirectionRecosignal5->Fill(jphi, ccc1);
2939  ccctest = 1.; //HEnegativedirectionRecosignal5->SetBinError(i,0.01);
2940  }
2941  } // for jphi
2942  if (ccctest > 0.) {
2943  //cout<<"888 kcountHEnegativedirectionRecosignal5 = "<<kcountHEnegativedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<endl;
2944  c3x5->cd(kcountHEnegativedirectionRecosignal5);
2945  HEnegativedirectionRecosignal5->SetMarkerStyle(20);
2946  HEnegativedirectionRecosignal5->SetMarkerSize(0.4);
2947  HEnegativedirectionRecosignal5->GetYaxis()->SetLabelSize(0.04);
2948  HEnegativedirectionRecosignal5->SetXTitle("HEnegativedirectionRecosignal5 \b");
2949  HEnegativedirectionRecosignal5->SetMarkerColor(2);
2950  HEnegativedirectionRecosignal5->SetLineColor(0);
2951  gPad->SetGridy();
2952  gPad->SetGridx();
2953  // gPad->SetLogy();
2954  if (kcountHEnegativedirectionRecosignal5 == 1)
2955  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
2956  if (kcountHEnegativedirectionRecosignal5 == 2)
2957  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
2958  if (kcountHEnegativedirectionRecosignal5 == 3)
2959  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
2960  if (kcountHEnegativedirectionRecosignal5 == 4)
2961  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
2962  if (kcountHEnegativedirectionRecosignal5 == 5)
2963  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
2964  if (kcountHEnegativedirectionRecosignal5 == 6)
2965  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
2966  if (kcountHEnegativedirectionRecosignal5 == 7)
2967  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
2968  if (kcountHEnegativedirectionRecosignal5 == 8)
2969  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
2970  if (kcountHEnegativedirectionRecosignal5 == 9)
2971  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
2972  if (kcountHEnegativedirectionRecosignal5 == 10)
2973  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
2974  if (kcountHEnegativedirectionRecosignal5 == 11)
2975  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
2976  HEnegativedirectionRecosignal5->Draw("Error");
2977  kcountHEnegativedirectionRecosignal5++;
2978  if (kcountHEnegativedirectionRecosignal5 > 11)
2979  break; // 4x6 = 24
2980  } //ccctest>0
2981 
2982  } // for i
2983  } //if(jeta-41 < 0)
2984  } //for jeta
2986  c3x5->Update();
2987  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
2988  c3x5->Clear();
2989  // clean-up
2990  if (h2CeffHEnegativedirectionRecosignal5)
2991  delete h2CeffHEnegativedirectionRecosignal5;
2992  //========================================================================================== 1119
2993  //======================================================================
2994  //======================================================================1D plot: R vs phi , different eta, depth=6
2995  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
2996  c3x5->Clear();
2998  c3x5->Divide(3, 5);
2999  c3x5->cd(1);
3000  int kcountHEnegativedirectionRecosignal6 = 1;
3001  TH1F* h2CeffHEnegativedirectionRecosignal6 = new TH1F("h2CeffHEnegativedirectionRecosignal6", "", nphi, 0., 72.);
3002 
3003  for (int jeta = 0; jeta < njeta; jeta++) {
3004  // negativedirectionRecosignal:
3005  if (jeta - 41 < 0) {
3006  // for (int i=0;i<ndepth;i++) {
3007  // depth=6
3008  for (int i = 5; i < 6; i++) {
3009  TH1F* HEnegativedirectionRecosignal6 = (TH1F*)h2CeffHEnegativedirectionRecosignal6->Clone("twod1");
3010 
3011  float ccctest = 0; // to avoid empty massive elements
3012  for (int jphi = 0; jphi < nphi; jphi++) {
3013  double ccc1 = arecosignalhe[i][jeta][jphi];
3014  if (ccc1 != 0.) {
3015  HEnegativedirectionRecosignal6->Fill(jphi, ccc1);
3016  ccctest = 1.; //HEnegativedirectionRecosignal6->SetBinError(i,0.01);
3017  }
3018  } // for jphi
3019  if (ccctest > 0.) {
3020  //cout<<"999 kcountHEnegativedirectionRecosignal6 = "<<kcountHEnegativedirectionRecosignal6 <<" jeta-41= "<< jeta-41 <<endl;
3021  c3x5->cd(kcountHEnegativedirectionRecosignal6);
3022  HEnegativedirectionRecosignal6->SetMarkerStyle(20);
3023  HEnegativedirectionRecosignal6->SetMarkerSize(0.4);
3024  HEnegativedirectionRecosignal6->GetYaxis()->SetLabelSize(0.04);
3025  HEnegativedirectionRecosignal6->SetXTitle("HEnegativedirectionRecosignal6 \b");
3026  HEnegativedirectionRecosignal6->SetMarkerColor(2);
3027  HEnegativedirectionRecosignal6->SetLineColor(0);
3028  gPad->SetGridy();
3029  gPad->SetGridx();
3030  // gPad->SetLogy();
3031  if (kcountHEnegativedirectionRecosignal6 == 1)
3032  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
3033  if (kcountHEnegativedirectionRecosignal6 == 2)
3034  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
3035  if (kcountHEnegativedirectionRecosignal6 == 3)
3036  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
3037  if (kcountHEnegativedirectionRecosignal6 == 4)
3038  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
3039  if (kcountHEnegativedirectionRecosignal6 == 5)
3040  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
3041  if (kcountHEnegativedirectionRecosignal6 == 6)
3042  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
3043  if (kcountHEnegativedirectionRecosignal6 == 7)
3044  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
3045  if (kcountHEnegativedirectionRecosignal6 == 8)
3046  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
3047  if (kcountHEnegativedirectionRecosignal6 == 9)
3048  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
3049  if (kcountHEnegativedirectionRecosignal6 == 10)
3050  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
3051  HEnegativedirectionRecosignal6->Draw("Error");
3052  kcountHEnegativedirectionRecosignal6++;
3053  if (kcountHEnegativedirectionRecosignal6 > 10)
3054  break; // 4x6 = 24
3055  } //ccctest>0
3056 
3057  } // for i
3058  } //if(jeta-41 < 0)
3059  } //for jeta
3061  c3x5->Update();
3062  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
3063  c3x5->Clear();
3064  // clean-up
3065  if (h2CeffHEnegativedirectionRecosignal6)
3066  delete h2CeffHEnegativedirectionRecosignal6;
3067  //========================================================================================== 11110
3068  //======================================================================
3069  //======================================================================1D plot: R vs phi , different eta, depth=7
3070  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
3071  c3x5->Clear();
3073  c3x5->Divide(3, 5);
3074  c3x5->cd(1);
3075  int kcountHEnegativedirectionRecosignal7 = 1;
3076  TH1F* h2CeffHEnegativedirectionRecosignal7 = new TH1F("h2CeffHEnegativedirectionRecosignal7", "", nphi, 0., 72.);
3077 
3078  for (int jeta = 0; jeta < njeta; jeta++) {
3079  // negativedirectionRecosignal:
3080  if (jeta - 41 < 0) {
3081  // for (int i=0;i<ndepth;i++) {
3082  // depth=7
3083  for (int i = 6; i < 7; i++) {
3084  TH1F* HEnegativedirectionRecosignal7 = (TH1F*)h2CeffHEnegativedirectionRecosignal7->Clone("twod1");
3085 
3086  float ccctest = 0; // to avoid empty massive elements
3087  for (int jphi = 0; jphi < nphi; jphi++) {
3088  double ccc1 = arecosignalhe[i][jeta][jphi];
3089  if (ccc1 != 0.) {
3090  HEnegativedirectionRecosignal7->Fill(jphi, ccc1);
3091  ccctest = 1.; //HEnegativedirectionRecosignal7->SetBinError(i,0.01);
3092  }
3093  } // for jphi
3094  if (ccctest > 0.) {
3095  //cout<<"1010 kcountHEnegativedirectionRecosignal7 = "<<kcountHEnegativedirectionRecosignal7 <<" jeta-41= "<< jeta-41 <<endl;
3096  c3x5->cd(kcountHEnegativedirectionRecosignal7);
3097  HEnegativedirectionRecosignal7->SetMarkerStyle(20);
3098  HEnegativedirectionRecosignal7->SetMarkerSize(0.4);
3099  HEnegativedirectionRecosignal7->GetYaxis()->SetLabelSize(0.04);
3100  HEnegativedirectionRecosignal7->SetXTitle("HEnegativedirectionRecosignal7 \b");
3101  HEnegativedirectionRecosignal7->SetMarkerColor(2);
3102  HEnegativedirectionRecosignal7->SetLineColor(0);
3103  gPad->SetGridy();
3104  gPad->SetGridx();
3105  // gPad->SetLogy();
3106  if (kcountHEnegativedirectionRecosignal7 == 1)
3107  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
3108  if (kcountHEnegativedirectionRecosignal7 == 2)
3109  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
3110  if (kcountHEnegativedirectionRecosignal7 == 3)
3111  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
3112  HEnegativedirectionRecosignal7->Draw("Error");
3113  kcountHEnegativedirectionRecosignal7++;
3114  if (kcountHEnegativedirectionRecosignal7 > 3)
3115  break; // 4x6 = 24
3116  } //ccctest>0
3117 
3118  } // for i
3119  } //if(jeta-41 < 0)
3120  } //for jeta
3122  c3x5->Update();
3123  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
3124  c3x5->Clear();
3125  // clean-up
3126  if (h2CeffHEnegativedirectionRecosignal7)
3127  delete h2CeffHEnegativedirectionRecosignal7;
3128 
3130 
3131  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
3132 
3133  //cout<<" Start Vaiance: preparation *****" <<endl;
3134  TH2F* recosignalVariance1HE1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE1");
3135  TH2F* recosignalVariance0HE1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE1");
3136  TH2F* recosignalVarianceHE1 = (TH2F*)recosignalVariance1HE1->Clone("recosignalVarianceHE1");
3137  recosignalVarianceHE1->Divide(recosignalVariance1HE1, recosignalVariance0HE1, 1, 1, "B");
3138  TH2F* recosignalVariance1HE2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE2");
3139  TH2F* recosignalVariance0HE2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE2");
3140  TH2F* recosignalVarianceHE2 = (TH2F*)recosignalVariance1HE2->Clone("recosignalVarianceHE2");
3141  recosignalVarianceHE2->Divide(recosignalVariance1HE2, recosignalVariance0HE2, 1, 1, "B");
3142  TH2F* recosignalVariance1HE3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE3");
3143  TH2F* recosignalVariance0HE3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE3");
3144  TH2F* recosignalVarianceHE3 = (TH2F*)recosignalVariance1HE3->Clone("recosignalVarianceHE3");
3145  recosignalVarianceHE3->Divide(recosignalVariance1HE3, recosignalVariance0HE3, 1, 1, "B");
3146  TH2F* recosignalVariance1HE4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE4");
3147  TH2F* recosignalVariance0HE4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE4");
3148  TH2F* recosignalVarianceHE4 = (TH2F*)recosignalVariance1HE4->Clone("recosignalVarianceHE4");
3149  recosignalVarianceHE4->Divide(recosignalVariance1HE4, recosignalVariance0HE4, 1, 1, "B");
3150  TH2F* recosignalVariance1HE5 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE5");
3151  TH2F* recosignalVariance0HE5 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE5");
3152  TH2F* recosignalVarianceHE5 = (TH2F*)recosignalVariance1HE5->Clone("recosignalVarianceHE5");
3153  recosignalVarianceHE5->Divide(recosignalVariance1HE5, recosignalVariance0HE5, 1, 1, "B");
3154  TH2F* recosignalVariance1HE6 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE6");
3155  TH2F* recosignalVariance0HE6 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE6");
3156  TH2F* recosignalVarianceHE6 = (TH2F*)recosignalVariance1HE6->Clone("recosignalVarianceHE6");
3157  recosignalVarianceHE6->Divide(recosignalVariance1HE6, recosignalVariance0HE6, 1, 1, "B");
3158  TH2F* recosignalVariance1HE7 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE7");
3159  TH2F* recosignalVariance0HE7 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE7");
3160  TH2F* recosignalVarianceHE7 = (TH2F*)recosignalVariance1HE7->Clone("recosignalVarianceHE7");
3161  recosignalVarianceHE7->Divide(recosignalVariance1HE7, recosignalVariance0HE7, 1, 1, "B");
3162  //cout<<" Vaiance: preparation DONE *****" <<endl;
3163  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvariancehe
3164  // = sum(R*R)/N - (sum(R)/N)**2
3165  for (int jeta = 0; jeta < njeta; jeta++) {
3166  //preparation for PHI normalization:
3167  double sumrecosignalHE0 = 0;
3168  int nsumrecosignalHE0 = 0;
3169  double sumrecosignalHE1 = 0;
3170  int nsumrecosignalHE1 = 0;
3171  double sumrecosignalHE2 = 0;
3172  int nsumrecosignalHE2 = 0;
3173  double sumrecosignalHE3 = 0;
3174  int nsumrecosignalHE3 = 0;
3175  double sumrecosignalHE4 = 0;
3176  int nsumrecosignalHE4 = 0;
3177  double sumrecosignalHE5 = 0;
3178  int nsumrecosignalHE5 = 0;
3179  double sumrecosignalHE6 = 0;
3180  int nsumrecosignalHE6 = 0;
3181  for (int jphi = 0; jphi < njphi; jphi++) {
3182  recosignalvariancehe[0][jeta][jphi] = recosignalVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
3183  recosignalvariancehe[1][jeta][jphi] = recosignalVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
3184  recosignalvariancehe[2][jeta][jphi] = recosignalVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
3185  recosignalvariancehe[3][jeta][jphi] = recosignalVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
3186  recosignalvariancehe[4][jeta][jphi] = recosignalVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
3187  recosignalvariancehe[5][jeta][jphi] = recosignalVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
3188  recosignalvariancehe[6][jeta][jphi] = recosignalVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
3189  if (recosignalvariancehe[0][jeta][jphi] > 0.) {
3190  sumrecosignalHE0 += recosignalvariancehe[0][jeta][jphi];
3191  ++nsumrecosignalHE0;
3192  }
3193  if (recosignalvariancehe[1][jeta][jphi] > 0.) {
3194  sumrecosignalHE1 += recosignalvariancehe[1][jeta][jphi];
3195  ++nsumrecosignalHE1;
3196  }
3197  if (recosignalvariancehe[2][jeta][jphi] > 0.) {
3198  sumrecosignalHE2 += recosignalvariancehe[2][jeta][jphi];
3199  ++nsumrecosignalHE2;
3200  }
3201  if (recosignalvariancehe[3][jeta][jphi] > 0.) {
3202  sumrecosignalHE3 += recosignalvariancehe[3][jeta][jphi];
3203  ++nsumrecosignalHE3;
3204  }
3205  if (recosignalvariancehe[4][jeta][jphi] > 0.) {
3206  sumrecosignalHE4 += recosignalvariancehe[4][jeta][jphi];
3207  ++nsumrecosignalHE4;
3208  }
3209  if (recosignalvariancehe[5][jeta][jphi] > 0.) {
3210  sumrecosignalHE5 += recosignalvariancehe[5][jeta][jphi];
3211  ++nsumrecosignalHE5;
3212  }
3213  if (recosignalvariancehe[6][jeta][jphi] > 0.) {
3214  sumrecosignalHE6 += recosignalvariancehe[6][jeta][jphi];
3215  ++nsumrecosignalHE6;
3216  }
3217  } // phi
3218  // PHI normalization :
3219  for (int jphi = 0; jphi < njphi; jphi++) {
3220  if (recosignalvariancehe[0][jeta][jphi] > 0.)
3221  recosignalvariancehe[0][jeta][jphi] /= (sumrecosignalHE0 / nsumrecosignalHE0);
3222  if (recosignalvariancehe[1][jeta][jphi] > 0.)
3223  recosignalvariancehe[1][jeta][jphi] /= (sumrecosignalHE1 / nsumrecosignalHE1);
3224  if (recosignalvariancehe[2][jeta][jphi] > 0.)
3225  recosignalvariancehe[2][jeta][jphi] /= (sumrecosignalHE2 / nsumrecosignalHE2);
3226  if (recosignalvariancehe[3][jeta][jphi] > 0.)
3227  recosignalvariancehe[3][jeta][jphi] /= (sumrecosignalHE3 / nsumrecosignalHE3);
3228  if (recosignalvariancehe[4][jeta][jphi] > 0.)
3229  recosignalvariancehe[4][jeta][jphi] /= (sumrecosignalHE4 / nsumrecosignalHE4);
3230  if (recosignalvariancehe[5][jeta][jphi] > 0.)
3231  recosignalvariancehe[5][jeta][jphi] /= (sumrecosignalHE5 / nsumrecosignalHE5);
3232  if (recosignalvariancehe[6][jeta][jphi] > 0.)
3233  recosignalvariancehe[6][jeta][jphi] /= (sumrecosignalHE6 / nsumrecosignalHE6);
3234  } // phi
3235  // recosignalvariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
3236  for (int jphi = 0; jphi < njphi; jphi++) {
3237  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
3238  recosignalvariancehe[0][jeta][jphi] -= arecosignalhe[0][jeta][jphi] * arecosignalhe[0][jeta][jphi];
3239  recosignalvariancehe[0][jeta][jphi] = fabs(recosignalvariancehe[0][jeta][jphi]);
3240  recosignalvariancehe[1][jeta][jphi] -= arecosignalhe[1][jeta][jphi] * arecosignalhe[1][jeta][jphi];
3241  recosignalvariancehe[1][jeta][jphi] = fabs(recosignalvariancehe[1][jeta][jphi]);
3242  recosignalvariancehe[2][jeta][jphi] -= arecosignalhe[2][jeta][jphi] * arecosignalhe[2][jeta][jphi];
3243  recosignalvariancehe[2][jeta][jphi] = fabs(recosignalvariancehe[2][jeta][jphi]);
3244  recosignalvariancehe[3][jeta][jphi] -= arecosignalhe[3][jeta][jphi] * arecosignalhe[3][jeta][jphi];
3245  recosignalvariancehe[3][jeta][jphi] = fabs(recosignalvariancehe[3][jeta][jphi]);
3246  recosignalvariancehe[4][jeta][jphi] -= arecosignalhe[4][jeta][jphi] * arecosignalhe[4][jeta][jphi];
3247  recosignalvariancehe[4][jeta][jphi] = fabs(recosignalvariancehe[4][jeta][jphi]);
3248  recosignalvariancehe[5][jeta][jphi] -= arecosignalhe[5][jeta][jphi] * arecosignalhe[5][jeta][jphi];
3249  recosignalvariancehe[5][jeta][jphi] = fabs(recosignalvariancehe[5][jeta][jphi]);
3250  recosignalvariancehe[6][jeta][jphi] -= arecosignalhe[6][jeta][jphi] * arecosignalhe[6][jeta][jphi];
3251  recosignalvariancehe[6][jeta][jphi] = fabs(recosignalvariancehe[6][jeta][jphi]);
3252  }
3253  }
3254  //cout<<" Vaiance: DONE*****" <<endl;
3255  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
3256  //======================================================================
3257  //======================================================================
3258  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
3259  c1x1->Clear();
3261  c1x0->Divide(1, 1);
3262  c1x0->cd(1);
3263  TH2F* DefzDrecosignalHE42D = new TH2F("DefzDrecosignalHE42D", "", neta, -41., 41., nphi, 0., 72.);
3264  TH2F* DefzDrecosignalHE42D0 = new TH2F("DefzDrecosignalHE42D0", "", neta, -41., 41., nphi, 0., 72.);
3265  TH2F* DefzDrecosignalHE42DF = (TH2F*)DefzDrecosignalHE42D0->Clone("DefzDrecosignalHE42DF");
3266  for (int i = 0; i < ndepth; i++) {
3267  for (int jeta = 0; jeta < neta; jeta++) {
3268  for (int jphi = 0; jphi < nphi; jphi++) {
3269  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3270  int k2plot = jeta - 41;
3271  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
3272  if (arecosignalhe[i][jeta][jphi] > 0.) {
3273  DefzDrecosignalHE42D->Fill(kkk, jphi, ccc1);
3274  DefzDrecosignalHE42D0->Fill(kkk, jphi, 1.);
3275  }
3276  }
3277  }
3278  }
3279  DefzDrecosignalHE42DF->Divide(DefzDrecosignalHE42D, DefzDrecosignalHE42D0, 1, 1, "B"); // average A
3280  // DefzDrecosignalHE1->Sumw2();
3281  gPad->SetGridy();
3282  gPad->SetGridx(); // gPad->SetLogz();
3283  DefzDrecosignalHE42DF->SetMarkerStyle(20);
3284  DefzDrecosignalHE42DF->SetMarkerSize(0.4);
3285  DefzDrecosignalHE42DF->GetZaxis()->SetLabelSize(0.08);
3286  DefzDrecosignalHE42DF->SetXTitle("<D>_depth #eta \b");
3287  DefzDrecosignalHE42DF->SetYTitle(" #phi \b");
3288  DefzDrecosignalHE42DF->SetZTitle("<D>_depth \b");
3289  DefzDrecosignalHE42DF->SetMarkerColor(2);
3290  DefzDrecosignalHE42DF->SetLineColor(
3291  0); // DefzDrecosignalHE42DF->SetMaximum(1.000); // DefzDrecosignalHE42DF->SetMinimum(1.0);
3292  DefzDrecosignalHE42DF->Draw("COLZ");
3294  c1x0->Update();
3295  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHE.png");
3296  c1x0->Clear();
3297  // clean-up
3298  if (DefzDrecosignalHE42D)
3299  delete DefzDrecosignalHE42D;
3300  if (DefzDrecosignalHE42D0)
3301  delete DefzDrecosignalHE42D0;
3302  if (DefzDrecosignalHE42DF)
3303  delete DefzDrecosignalHE42DF;
3304  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
3305  //======================================================================
3306  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
3307  c1x1->Clear();
3309  c1x1->Divide(1, 1);
3310  c1x1->cd(1);
3311  TH1F* DefzDrecosignalHE41D = new TH1F("DefzDrecosignalHE41D", "", nphi, 0., 72.);
3312  TH1F* DefzDrecosignalHE41D0 = new TH1F("DefzDrecosignalHE41D0", "", nphi, 0., 72.);
3313  TH1F* DefzDrecosignalHE41DF = (TH1F*)DefzDrecosignalHE41D0->Clone("DefzDrecosignalHE41DF");
3314 
3315  for (int jphi = 0; jphi < nphi; jphi++) {
3316  for (int jeta = 0; jeta < neta; jeta++) {
3317  for (int i = 0; i < ndepth; i++) {
3318  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3319  if (arecosignalhe[i][jeta][jphi] > 0.) {
3320  DefzDrecosignalHE41D->Fill(jphi, ccc1);
3321  DefzDrecosignalHE41D0->Fill(jphi, 1.);
3322  }
3323  }
3324  }
3325  }
3326  // DefzDrecosignalHE41D->Sumw2();DefzDrecosignalHE41D0->Sumw2();
3327 
3328  DefzDrecosignalHE41DF->Divide(
3329  DefzDrecosignalHE41D, DefzDrecosignalHE41D0, 1, 1, "B"); // R averaged over depthes & eta
3330  DefzDrecosignalHE41D0->Sumw2();
3331  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHE41DF->SetBinError(jphi,0.01);}
3332  gPad->SetGridy();
3333  gPad->SetGridx(); // gPad->SetLogz();
3334  DefzDrecosignalHE41DF->SetMarkerStyle(20);
3335  DefzDrecosignalHE41DF->SetMarkerSize(1.4);
3336  DefzDrecosignalHE41DF->GetZaxis()->SetLabelSize(0.08);
3337  DefzDrecosignalHE41DF->SetXTitle("#phi \b");
3338  DefzDrecosignalHE41DF->SetYTitle(" <D> \b");
3339  DefzDrecosignalHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
3340  DefzDrecosignalHE41DF->SetMarkerColor(4);
3341  DefzDrecosignalHE41DF->SetLineColor(
3342  4); // DefzDrecosignalHE41DF->SetMinimum(0.8); DefzDrecosignalHE41DF->SetMinimum(-0.015);
3343  DefzDrecosignalHE41DF->Draw("Error");
3345  c1x1->Update();
3346  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHE.png");
3347  c1x1->Clear();
3348  // clean-up
3349  if (DefzDrecosignalHE41D)
3350  delete DefzDrecosignalHE41D;
3351  if (DefzDrecosignalHE41D0)
3352  delete DefzDrecosignalHE41D0;
3353  if (DefzDrecosignalHE41DF)
3354  delete DefzDrecosignalHE41DF;
3355  //========================================================================================== 14
3356  //======================================================================
3357  //======================================================================1D plot: D vs phi , different eta, depth=1
3358  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
3359  c3x5->Clear();
3361  c3x5->Divide(3, 5);
3362  c3x5->cd(1);
3363  int kcountHEpositivedirectionRecosignalD1 = 1;
3364  TH1F* h2CeffHEpositivedirectionRecosignalD1 = new TH1F("h2CeffHEpositivedirectionRecosignalD1", "", nphi, 0., 72.);
3365 
3366  for (int jeta = 0; jeta < njeta; jeta++) {
3367  // positivedirectionRecosignalD:
3368  if (jeta - 41 >= 0) {
3369  // for (int i=0;i<ndepth;i++) {
3370  // depth=1
3371  for (int i = 0; i < 1; i++) {
3372  TH1F* HEpositivedirectionRecosignalD1 = (TH1F*)h2CeffHEpositivedirectionRecosignalD1->Clone("twod1");
3373 
3374  float ccctest = 0; // to avoid empty massive elements
3375  for (int jphi = 0; jphi < nphi; jphi++) {
3376  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3377  if (arecosignalhe[i][jeta][jphi] > 0.) {
3378  HEpositivedirectionRecosignalD1->Fill(jphi, ccc1);
3379  ccctest = 1.; //HEpositivedirectionRecosignalD1->SetBinError(i,0.01);
3380  }
3381  } // for jphi
3382  if (ccctest > 0.) {
3383  //cout<<"1414 kcountHEpositivedirectionRecosignalD1 = "<<kcountHEpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
3384  c3x5->cd(kcountHEpositivedirectionRecosignalD1);
3385  HEpositivedirectionRecosignalD1->SetMarkerStyle(20);
3386  HEpositivedirectionRecosignalD1->SetMarkerSize(0.4);
3387  HEpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
3388  HEpositivedirectionRecosignalD1->SetXTitle("HEpositivedirectionRecosignalD1 \b");
3389  HEpositivedirectionRecosignalD1->SetMarkerColor(2);
3390  HEpositivedirectionRecosignalD1->SetLineColor(0);
3391  gPad->SetGridy();
3392  gPad->SetGridx();
3393  // gPad->SetLogy();
3394  if (kcountHEpositivedirectionRecosignalD1 == 1)
3395  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
3396  if (kcountHEpositivedirectionRecosignalD1 == 2)
3397  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
3398  if (kcountHEpositivedirectionRecosignalD1 == 3)
3399  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
3400  if (kcountHEpositivedirectionRecosignalD1 == 4)
3401  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
3402  if (kcountHEpositivedirectionRecosignalD1 == 5)
3403  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
3404  if (kcountHEpositivedirectionRecosignalD1 == 6)
3405  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
3406  if (kcountHEpositivedirectionRecosignalD1 == 7)
3407  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
3408  if (kcountHEpositivedirectionRecosignalD1 == 8)
3409  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
3410  if (kcountHEpositivedirectionRecosignalD1 == 9)
3411  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
3412  if (kcountHEpositivedirectionRecosignalD1 == 10)
3413  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
3414  if (kcountHEpositivedirectionRecosignalD1 == 11)
3415  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
3416  if (kcountHEpositivedirectionRecosignalD1 == 12)
3417  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
3418  HEpositivedirectionRecosignalD1->Draw("Error");
3419  kcountHEpositivedirectionRecosignalD1++;
3420  if (kcountHEpositivedirectionRecosignalD1 > 12)
3421  break; // 4x6 = 24
3422  } //ccctest>0
3423 
3424  } // for i
3425  } //if(jeta-41 >= 0)
3426  } //for jeta
3428  c3x5->Update();
3429  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
3430  c3x5->Clear();
3431  // clean-up
3432  if (h2CeffHEpositivedirectionRecosignalD1)
3433  delete h2CeffHEpositivedirectionRecosignalD1;
3434  //========================================================================================== 15
3435  //======================================================================
3436  //======================================================================1D plot: D vs phi , different eta, depth=2
3437  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
3438  c3x5->Clear();
3439  c3x5->Divide(3, 5);
3440  c3x5->cd(1);
3441  int kcountHEpositivedirectionRecosignalD2 = 1;
3442  TH1F* h2CeffHEpositivedirectionRecosignalD2 = new TH1F("h2CeffHEpositivedirectionRecosignalD2", "", nphi, 0., 72.);
3443 
3444  for (int jeta = 0; jeta < njeta; jeta++) {
3445  // positivedirectionRecosignalD:
3446  if (jeta - 41 >= 0) {
3447  // for (int i=0;i<ndepth;i++) {
3448  // depth=2
3449  for (int i = 1; i < 2; i++) {
3450  TH1F* HEpositivedirectionRecosignalD2 = (TH1F*)h2CeffHEpositivedirectionRecosignalD2->Clone("twod1");
3451 
3452  float ccctest = 0; // to avoid empty massive elements
3453  for (int jphi = 0; jphi < nphi; jphi++) {
3454  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3455  if (arecosignalhe[i][jeta][jphi] > 0.) {
3456  HEpositivedirectionRecosignalD2->Fill(jphi, ccc1);
3457  ccctest = 1.; //HEpositivedirectionRecosignalD2->SetBinError(i,0.01);
3458  }
3459  } // for jphi
3460  if (ccctest > 0.) {
3461  //cout<<"1515 kcountHEpositivedirectionRecosignalD2 = "<<kcountHEpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
3462  c3x5->cd(kcountHEpositivedirectionRecosignalD2);
3463  HEpositivedirectionRecosignalD2->SetMarkerStyle(20);
3464  HEpositivedirectionRecosignalD2->SetMarkerSize(0.4);
3465  HEpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
3466  HEpositivedirectionRecosignalD2->SetXTitle("HEpositivedirectionRecosignalD2 \b");
3467  HEpositivedirectionRecosignalD2->SetMarkerColor(2);
3468  HEpositivedirectionRecosignalD2->SetLineColor(0);
3469  gPad->SetGridy();
3470  gPad->SetGridx();
3471  // gPad->SetLogy();
3472  if (kcountHEpositivedirectionRecosignalD2 == 1)
3473  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
3474  if (kcountHEpositivedirectionRecosignalD2 == 2)
3475  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
3476  if (kcountHEpositivedirectionRecosignalD2 == 3)
3477  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
3478  if (kcountHEpositivedirectionRecosignalD2 == 4)
3479  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
3480  if (kcountHEpositivedirectionRecosignalD2 == 5)
3481  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
3482  if (kcountHEpositivedirectionRecosignalD2 == 6)
3483  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
3484  if (kcountHEpositivedirectionRecosignalD2 == 7)
3485  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
3486  if (kcountHEpositivedirectionRecosignalD2 == 8)
3487  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
3488  if (kcountHEpositivedirectionRecosignalD2 == 9)
3489  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
3490  if (kcountHEpositivedirectionRecosignalD2 == 10)
3491  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
3492  if (kcountHEpositivedirectionRecosignalD2 == 11)
3493  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
3494  if (kcountHEpositivedirectionRecosignalD2 == 12)
3495  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
3496  if (kcountHEpositivedirectionRecosignalD2 == 13)
3497  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
3498  HEpositivedirectionRecosignalD2->Draw("Error");
3499  kcountHEpositivedirectionRecosignalD2++;
3500  if (kcountHEpositivedirectionRecosignalD2 > 13)
3501  break; // 4x6 = 24
3502  } //ccctest>0
3503 
3504  } // for i
3505  } //if(jeta-41 >= 0)
3506  } //for jeta
3508  c3x5->Update();
3509  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
3510  c3x5->Clear();
3511  // clean-up
3512  if (h2CeffHEpositivedirectionRecosignalD2)
3513  delete h2CeffHEpositivedirectionRecosignalD2;
3514  //========================================================================================== 16
3515  //======================================================================
3516  //======================================================================1D plot: D vs phi , different eta, depth=3
3517  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
3518  c3x5->Clear();
3519  c3x5->Divide(3, 5);
3520  c3x5->cd(1);
3521  int kcountHEpositivedirectionRecosignalD3 = 1;
3522  TH1F* h2CeffHEpositivedirectionRecosignalD3 = new TH1F("h2CeffHEpositivedirectionRecosignalD3", "", nphi, 0., 72.);
3523 
3524  for (int jeta = 0; jeta < njeta; jeta++) {
3525  // positivedirectionRecosignalD:
3526  if (jeta - 41 >= 0) {
3527  // for (int i=0;i<ndepth;i++) {
3528  // depth=3
3529  for (int i = 2; i < 3; i++) {
3530  TH1F* HEpositivedirectionRecosignalD3 = (TH1F*)h2CeffHEpositivedirectionRecosignalD3->Clone("twod1");
3531 
3532  float ccctest = 0; // to avoid empty massive elements
3533  for (int jphi = 0; jphi < nphi; jphi++) {
3534  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3535  if (arecosignalhe[i][jeta][jphi] > 0.) {
3536  HEpositivedirectionRecosignalD3->Fill(jphi, ccc1);
3537  ccctest = 1.; //HEpositivedirectionRecosignalD3->SetBinError(i,0.01);
3538  }
3539  } // for jphi
3540  if (ccctest > 0.) {
3541  //cout<<"1616 kcountHEpositivedirectionRecosignalD3 = "<<kcountHEpositivedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
3542  c3x5->cd(kcountHEpositivedirectionRecosignalD3);
3543  HEpositivedirectionRecosignalD3->SetMarkerStyle(20);
3544  HEpositivedirectionRecosignalD3->SetMarkerSize(0.4);
3545  HEpositivedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
3546  HEpositivedirectionRecosignalD3->SetXTitle("HEpositivedirectionRecosignalD3 \b");
3547  HEpositivedirectionRecosignalD3->SetMarkerColor(2);
3548  HEpositivedirectionRecosignalD3->SetLineColor(0);
3549  gPad->SetGridy();
3550  gPad->SetGridx();
3551  // gPad->SetLogy();
3552  if (kcountHEpositivedirectionRecosignalD3 == 1)
3553  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
3554  if (kcountHEpositivedirectionRecosignalD3 == 2)
3555  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
3556  if (kcountHEpositivedirectionRecosignalD3 == 3)
3557  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
3558  if (kcountHEpositivedirectionRecosignalD3 == 4)
3559  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
3560  if (kcountHEpositivedirectionRecosignalD3 == 5)
3561  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
3562  if (kcountHEpositivedirectionRecosignalD3 == 6)
3563  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
3564  if (kcountHEpositivedirectionRecosignalD3 == 7)
3565  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
3566  if (kcountHEpositivedirectionRecosignalD3 == 8)
3567  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
3568  if (kcountHEpositivedirectionRecosignalD3 == 9)
3569  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
3570  if (kcountHEpositivedirectionRecosignalD3 == 10)
3571  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
3572  if (kcountHEpositivedirectionRecosignalD3 == 11)
3573  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
3574  if (kcountHEpositivedirectionRecosignalD3 == 12)
3575  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
3576  if (kcountHEpositivedirectionRecosignalD3 == 13)
3577  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
3578  HEpositivedirectionRecosignalD3->Draw("Error");
3579  kcountHEpositivedirectionRecosignalD3++;
3580  if (kcountHEpositivedirectionRecosignalD3 > 13)
3581  break; // 4x6 = 24
3582  } //ccctest>0
3583 
3584  } // for i
3585  } //if(jeta-41 >= 0)
3586  } //for jeta
3588  c3x5->Update();
3589  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
3590  c3x5->Clear();
3591  // clean-up
3592  if (h2CeffHEpositivedirectionRecosignalD3)
3593  delete h2CeffHEpositivedirectionRecosignalD3;
3594  //========================================================================================== 17
3595  //======================================================================
3596  //======================================================================1D plot: D vs phi , different eta, depth=4
3597  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
3598  c3x5->Clear();
3599  c3x5->Divide(3, 5);
3600  c3x5->cd(1);
3601  int kcountHEpositivedirectionRecosignalD4 = 1;
3602  TH1F* h2CeffHEpositivedirectionRecosignalD4 = new TH1F("h2CeffHEpositivedirectionRecosignalD4", "", nphi, 0., 72.);
3603 
3604  for (int jeta = 0; jeta < njeta; jeta++) {
3605  // positivedirectionRecosignalD:
3606  if (jeta - 41 >= 0) {
3607  // for (int i=0;i<ndepth;i++) {
3608  // depth=4
3609  for (int i = 3; i < 4; i++) {
3610  TH1F* HEpositivedirectionRecosignalD4 = (TH1F*)h2CeffHEpositivedirectionRecosignalD4->Clone("twod1");
3611 
3612  float ccctest = 0; // to avoid empty massive elements
3613  for (int jphi = 0; jphi < nphi; jphi++) {
3614  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3615  if (arecosignalhe[i][jeta][jphi] > 0.) {
3616  HEpositivedirectionRecosignalD4->Fill(jphi, ccc1);
3617  ccctest = 1.; //HEpositivedirectionRecosignalD4->SetBinError(i,0.01);
3618  }
3619  } // for jphi
3620  if (ccctest > 0.) {
3621  //cout<<"1717 kcountHEpositivedirectionRecosignalD4 = "<<kcountHEpositivedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
3622  c3x5->cd(kcountHEpositivedirectionRecosignalD4);
3623  HEpositivedirectionRecosignalD4->SetMarkerStyle(20);
3624  HEpositivedirectionRecosignalD4->SetMarkerSize(0.4);
3625  HEpositivedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
3626  HEpositivedirectionRecosignalD4->SetXTitle("HEpositivedirectionRecosignalD4 \b");
3627  HEpositivedirectionRecosignalD4->SetMarkerColor(2);
3628  HEpositivedirectionRecosignalD4->SetLineColor(0);
3629  gPad->SetGridy();
3630  gPad->SetGridx();
3631  // gPad->SetLogy();
3632  if (kcountHEpositivedirectionRecosignalD4 == 1)
3633  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
3634  if (kcountHEpositivedirectionRecosignalD4 == 2)
3635  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
3636  if (kcountHEpositivedirectionRecosignalD4 == 3)
3637  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
3638  if (kcountHEpositivedirectionRecosignalD4 == 4)
3639  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
3640  if (kcountHEpositivedirectionRecosignalD4 == 5)
3641  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
3642  if (kcountHEpositivedirectionRecosignalD4 == 6)
3643  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
3644  if (kcountHEpositivedirectionRecosignalD4 == 7)
3645  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
3646  if (kcountHEpositivedirectionRecosignalD4 == 8)
3647  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
3648  if (kcountHEpositivedirectionRecosignalD4 == 9)
3649  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
3650  if (kcountHEpositivedirectionRecosignalD4 == 10)
3651  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
3652  if (kcountHEpositivedirectionRecosignalD4 == 11)
3653  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
3654  if (kcountHEpositivedirectionRecosignalD4 == 12)
3655  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
3656  HEpositivedirectionRecosignalD4->Draw("Error");
3657  kcountHEpositivedirectionRecosignalD4++;
3658  if (kcountHEpositivedirectionRecosignalD4 > 12)
3659  break; // 4x6 = 24
3660  } //ccctest>0
3661 
3662  } // for i
3663  } //if(jeta-41 >= 0)
3664  } //for jeta
3666  c3x5->Update();
3667  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
3668  c3x5->Clear();
3669  // clean-up
3670  if (h2CeffHEpositivedirectionRecosignalD4)
3671  delete h2CeffHEpositivedirectionRecosignalD4;
3672  //========================================================================================== 18
3673  //======================================================================
3674  //======================================================================1D plot: D vs phi , different eta, depth=5
3675  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
3676  c3x5->Clear();
3677  c3x5->Divide(3, 5);
3678  c3x5->cd(1);
3679  int kcountHEpositivedirectionRecosignalD5 = 1;
3680  TH1F* h2CeffHEpositivedirectionRecosignalD5 = new TH1F("h2CeffHEpositivedirectionRecosignalD5", "", nphi, 0., 72.);
3681 
3682  for (int jeta = 0; jeta < njeta; jeta++) {
3683  // positivedirectionRecosignalD:
3684  if (jeta - 41 >= 0) {
3685  // for (int i=0;i<ndepth;i++) {
3686  // depth=5
3687  for (int i = 4; i < 5; i++) {
3688  TH1F* HEpositivedirectionRecosignalD5 = (TH1F*)h2CeffHEpositivedirectionRecosignalD5->Clone("twod1");
3689 
3690  float ccctest = 0; // to avoid empty massive elements
3691  for (int jphi = 0; jphi < nphi; jphi++) {
3692  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3693  if (arecosignalhe[i][jeta][jphi] > 0.) {
3694  HEpositivedirectionRecosignalD5->Fill(jphi, ccc1);
3695  ccctest = 1.; //HEpositivedirectionRecosignalD5->SetBinError(i,0.01);
3696  }
3697  } // for jphi
3698  if (ccctest > 0.) {
3699  //cout<<"1818 kcountHEpositivedirectionRecosignalD5 = "<<kcountHEpositivedirectionRecosignalD5 <<" jeta-41= "<< jeta-41 <<endl;
3700  c3x5->cd(kcountHEpositivedirectionRecosignalD5);
3701  HEpositivedirectionRecosignalD5->SetMarkerStyle(20);
3702  HEpositivedirectionRecosignalD5->SetMarkerSize(0.4);
3703  HEpositivedirectionRecosignalD5->GetYaxis()->SetLabelSize(0.04);
3704  HEpositivedirectionRecosignalD5->SetXTitle("HEpositivedirectionRecosignalD5 \b");
3705  HEpositivedirectionRecosignalD5->SetMarkerColor(2);
3706  HEpositivedirectionRecosignalD5->SetLineColor(0);
3707  gPad->SetGridy();
3708  gPad->SetGridx();
3709  // gPad->SetLogy();
3710  if (kcountHEpositivedirectionRecosignalD5 == 1)
3711  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
3712  if (kcountHEpositivedirectionRecosignalD5 == 2)
3713  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
3714  if (kcountHEpositivedirectionRecosignalD5 == 3)
3715  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
3716  if (kcountHEpositivedirectionRecosignalD5 == 4)
3717  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
3718  if (kcountHEpositivedirectionRecosignalD5 == 5)
3719  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
3720  if (kcountHEpositivedirectionRecosignalD5 == 6)
3721  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
3722  if (kcountHEpositivedirectionRecosignalD5 == 7)
3723  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
3724  if (kcountHEpositivedirectionRecosignalD5 == 8)
3725  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
3726  if (kcountHEpositivedirectionRecosignalD5 == 9)
3727  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
3728  if (kcountHEpositivedirectionRecosignalD5 == 10)
3729  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
3730  if (kcountHEpositivedirectionRecosignalD5 == 11)
3731  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
3732  HEpositivedirectionRecosignalD5->Draw("Error");
3733  kcountHEpositivedirectionRecosignalD5++;
3734  if (kcountHEpositivedirectionRecosignalD5 > 11)
3735  break; // 4x6 = 24
3736  } //ccctest>0
3737 
3738  } // for i
3739  } //if(jeta-41 >= 0)
3740  } //for jeta
3742  c3x5->Update();
3743  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
3744  c3x5->Clear();
3745  // clean-up
3746  if (h2CeffHEpositivedirectionRecosignalD5)
3747  delete h2CeffHEpositivedirectionRecosignalD5;
3748  //========================================================================================== 19
3749  //======================================================================
3750  //======================================================================1D plot: D vs phi , different eta, depth=6
3751  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
3752  c3x5->Clear();
3753  c3x5->Divide(3, 5);
3754  c3x5->cd(1);
3755  int kcountHEpositivedirectionRecosignalD6 = 1;
3756  TH1F* h2CeffHEpositivedirectionRecosignalD6 = new TH1F("h2CeffHEpositivedirectionRecosignalD6", "", nphi, 0., 72.);
3757 
3758  for (int jeta = 0; jeta < njeta; jeta++) {
3759  // positivedirectionRecosignalD:
3760  if (jeta - 41 >= 0) {
3761  // for (int i=0;i<ndepth;i++) {
3762  // depth=6
3763  for (int i = 5; i < 6; i++) {
3764  TH1F* HEpositivedirectionRecosignalD6 = (TH1F*)h2CeffHEpositivedirectionRecosignalD6->Clone("twod1");
3765 
3766  float ccctest = 0; // to avoid empty massive elements
3767  for (int jphi = 0; jphi < nphi; jphi++) {
3768  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3769  if (arecosignalhe[i][jeta][jphi] > 0.) {
3770  HEpositivedirectionRecosignalD6->Fill(jphi, ccc1);
3771  ccctest = 1.; //HEpositivedirectionRecosignalD6->SetBinError(i,0.01);
3772  }
3773  } // for jphi
3774  if (ccctest > 0.) {
3775  //cout<<"1919 kcountHEpositivedirectionRecosignalD6 = "<<kcountHEpositivedirectionRecosignalD6 <<" jeta-41= "<< jeta-41 <<endl;
3776  c3x5->cd(kcountHEpositivedirectionRecosignalD6);
3777  HEpositivedirectionRecosignalD6->SetMarkerStyle(20);
3778  HEpositivedirectionRecosignalD6->SetMarkerSize(0.4);
3779  HEpositivedirectionRecosignalD6->GetYaxis()->SetLabelSize(0.04);
3780  HEpositivedirectionRecosignalD6->SetXTitle("HEpositivedirectionRecosignalD6 \b");
3781  HEpositivedirectionRecosignalD6->SetMarkerColor(2);
3782  HEpositivedirectionRecosignalD6->SetLineColor(0);
3783  gPad->SetGridy();
3784  gPad->SetGridx();
3785  // gPad->SetLogy();
3786  if (kcountHEpositivedirectionRecosignalD6 == 1)
3787  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
3788  if (kcountHEpositivedirectionRecosignalD6 == 2)
3789  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
3790  if (kcountHEpositivedirectionRecosignalD6 == 3)
3791  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
3792  if (kcountHEpositivedirectionRecosignalD6 == 4)
3793  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
3794  if (kcountHEpositivedirectionRecosignalD6 == 5)
3795  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
3796  if (kcountHEpositivedirectionRecosignalD6 == 6)
3797  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
3798  if (kcountHEpositivedirectionRecosignalD6 == 7)
3799  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
3800  if (kcountHEpositivedirectionRecosignalD6 == 8)
3801  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
3802  if (kcountHEpositivedirectionRecosignalD6 == 9)
3803  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
3804  if (kcountHEpositivedirectionRecosignalD6 == 10)
3805  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
3806  HEpositivedirectionRecosignalD6->Draw("Error");
3807  kcountHEpositivedirectionRecosignalD6++;
3808  if (kcountHEpositivedirectionRecosignalD6 > 10)
3809  break; // 4x6 = 24
3810  } //ccctest>0
3811 
3812  } // for i
3813  } //if(jeta-41 >= 0)
3814  } //for jeta
3816  c3x5->Update();
3817  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
3818  c3x5->Clear();
3819  // clean-up
3820  if (h2CeffHEpositivedirectionRecosignalD6)
3821  delete h2CeffHEpositivedirectionRecosignalD6;
3822  //========================================================================================== 20
3823  //======================================================================
3824  //======================================================================1D plot: D vs phi , different eta, depth=7
3825  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
3826  c3x5->Clear();
3827  c3x5->Divide(3, 5);
3828  c3x5->cd(1);
3829  int kcountHEpositivedirectionRecosignalD7 = 1;
3830  TH1F* h2CeffHEpositivedirectionRecosignalD7 = new TH1F("h2CeffHEpositivedirectionRecosignalD7", "", nphi, 0., 72.);
3831 
3832  for (int jeta = 0; jeta < njeta; jeta++) {
3833  // positivedirectionRecosignalD:
3834  if (jeta - 41 >= 0) {
3835  // for (int i=0;i<ndepth;i++) {
3836  // depth=7
3837  for (int i = 6; i < 7; i++) {
3838  TH1F* HEpositivedirectionRecosignalD7 = (TH1F*)h2CeffHEpositivedirectionRecosignalD7->Clone("twod1");
3839 
3840  float ccctest = 0; // to avoid empty massive elements
3841  for (int jphi = 0; jphi < nphi; jphi++) {
3842  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3843  if (arecosignalhe[i][jeta][jphi] > 0.) {
3844  HEpositivedirectionRecosignalD7->Fill(jphi, ccc1);
3845  ccctest = 1.; //HEpositivedirectionRecosignalD7->SetBinError(i,0.01);
3846  }
3847  } // for jphi
3848  if (ccctest != 0.) {
3849  //cout<<"2020 kcountHEpositivedirectionRecosignalD7 = "<<kcountHEpositivedirectionRecosignalD7 <<" jeta-41= "<< jeta-41 <<endl;
3850  c3x5->cd(kcountHEpositivedirectionRecosignalD7);
3851  HEpositivedirectionRecosignalD7->SetMarkerStyle(20);
3852  HEpositivedirectionRecosignalD7->SetMarkerSize(0.4);
3853  HEpositivedirectionRecosignalD7->GetYaxis()->SetLabelSize(0.04);
3854  HEpositivedirectionRecosignalD7->SetXTitle("HEpositivedirectionRecosignalD7 \b");
3855  HEpositivedirectionRecosignalD7->SetMarkerColor(2);
3856  HEpositivedirectionRecosignalD7->SetLineColor(0);
3857  gPad->SetGridy();
3858  gPad->SetGridx();
3859  // gPad->SetLogy();
3860  if (kcountHEpositivedirectionRecosignalD7 == 1)
3861  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
3862  if (kcountHEpositivedirectionRecosignalD7 == 2)
3863  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
3864  if (kcountHEpositivedirectionRecosignalD7 == 3)
3865  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
3866  HEpositivedirectionRecosignalD7->Draw("Error");
3867  kcountHEpositivedirectionRecosignalD7++;
3868  if (kcountHEpositivedirectionRecosignalD7 > 3)
3869  break; // 4x6 = 24
3870  } //ccctest>0
3871 
3872  } // for i
3873  } //if(jeta-41 >= 0)
3874  } //for jeta
3876  c3x5->Update();
3877  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
3878  c3x5->Clear();
3879  // clean-up
3880  if (h2CeffHEpositivedirectionRecosignalD7)
3881  delete h2CeffHEpositivedirectionRecosignalD7;
3882 
3883  //========================================================================================== 22222214
3884  //======================================================================
3885  //======================================================================1D plot: D vs phi , different eta, depth=1
3886  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
3887  c3x5->Clear();
3889  c3x5->Divide(3, 5);
3890  c3x5->cd(1);
3891  int kcountHEnegativedirectionRecosignalD1 = 1;
3892  TH1F* h2CeffHEnegativedirectionRecosignalD1 = new TH1F("h2CeffHEnegativedirectionRecosignalD1", "", nphi, 0., 72.);
3893 
3894  for (int jeta = 0; jeta < njeta; jeta++) {
3895  // negativedirectionRecosignalD:
3896  if (jeta - 41 < 0) {
3897  // for (int i=0;i<ndepth;i++) {
3898  // depth=1
3899  for (int i = 0; i < 1; i++) {
3900  TH1F* HEnegativedirectionRecosignalD1 = (TH1F*)h2CeffHEnegativedirectionRecosignalD1->Clone("twod1");
3901 
3902  float ccctest = 0; // to avoid empty massive elements
3903  for (int jphi = 0; jphi < nphi; jphi++) {
3904  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3905  if (arecosignalhe[i][jeta][jphi] > 0.) {
3906  HEnegativedirectionRecosignalD1->Fill(jphi, ccc1);
3907  ccctest = 1.; //HEnegativedirectionRecosignalD1->SetBinError(i,0.01);
3908  }
3909  } // for jphi
3910  if (ccctest > 0.) {
3911  //cout<<"1414 kcountHEnegativedirectionRecosignalD1 = "<<kcountHEnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
3912  c3x5->cd(kcountHEnegativedirectionRecosignalD1);
3913  HEnegativedirectionRecosignalD1->SetMarkerStyle(20);
3914  HEnegativedirectionRecosignalD1->SetMarkerSize(0.4);
3915  HEnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
3916  HEnegativedirectionRecosignalD1->SetXTitle("HEnegativedirectionRecosignalD1 \b");
3917  HEnegativedirectionRecosignalD1->SetMarkerColor(2);
3918  HEnegativedirectionRecosignalD1->SetLineColor(0);
3919  gPad->SetGridy();
3920  gPad->SetGridx();
3921  // gPad->SetLogy();
3922  if (kcountHEnegativedirectionRecosignalD1 == 1)
3923  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
3924  if (kcountHEnegativedirectionRecosignalD1 == 2)
3925  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
3926  if (kcountHEnegativedirectionRecosignalD1 == 3)
3927  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
3928  if (kcountHEnegativedirectionRecosignalD1 == 4)
3929  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
3930  if (kcountHEnegativedirectionRecosignalD1 == 5)
3931  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
3932  if (kcountHEnegativedirectionRecosignalD1 == 6)
3933  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
3934  if (kcountHEnegativedirectionRecosignalD1 == 7)
3935  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
3936  if (kcountHEnegativedirectionRecosignalD1 == 8)
3937  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
3938  if (kcountHEnegativedirectionRecosignalD1 == 9)
3939  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
3940  if (kcountHEnegativedirectionRecosignalD1 == 10)
3941  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
3942  if (kcountHEnegativedirectionRecosignalD1 == 11)
3943  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
3944  if (kcountHEnegativedirectionRecosignalD1 == 12)
3945  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
3946  HEnegativedirectionRecosignalD1->Draw("Error");
3947  kcountHEnegativedirectionRecosignalD1++;
3948  if (kcountHEnegativedirectionRecosignalD1 > 12)
3949  break; // 4x6 = 24
3950  } //ccctest>0
3951 
3952  } // for i
3953  } //if(jeta-41 < 0)
3954  } //for jeta
3956  c3x5->Update();
3957  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
3958  c3x5->Clear();
3959  // clean-up
3960  if (h2CeffHEnegativedirectionRecosignalD1)
3961  delete h2CeffHEnegativedirectionRecosignalD1;
3962  //========================================================================================== 22222215
3963  //======================================================================
3964  //======================================================================1D plot: D vs phi , different eta, depth=2
3965  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
3966  c3x5->Clear();
3967  c3x5->Divide(3, 5);
3968  c3x5->cd(1);
3969  int kcountHEnegativedirectionRecosignalD2 = 1;
3970  TH1F* h2CeffHEnegativedirectionRecosignalD2 = new TH1F("h2CeffHEnegativedirectionRecosignalD2", "", nphi, 0., 72.);
3971 
3972  for (int jeta = 0; jeta < njeta; jeta++) {
3973  // negativedirectionRecosignalD:
3974  if (jeta - 41 < 0) {
3975  // for (int i=0;i<ndepth;i++) {
3976  // depth=2
3977  for (int i = 1; i < 2; i++) {
3978  TH1F* HEnegativedirectionRecosignalD2 = (TH1F*)h2CeffHEnegativedirectionRecosignalD2->Clone("twod1");
3979 
3980  float ccctest = 0; // to avoid empty massive elements
3981  for (int jphi = 0; jphi < nphi; jphi++) {
3982  double ccc1 = recosignalvariancehe[i][jeta][jphi];
3983  if (arecosignalhe[i][jeta][jphi] > 0.) {
3984  HEnegativedirectionRecosignalD2->Fill(jphi, ccc1);
3985  ccctest = 1.; //HEnegativedirectionRecosignalD2->SetBinError(i,0.01);
3986  }
3987  } // for jphi
3988  if (ccctest > 0.) {
3989  //cout<<"1515 kcountHEnegativedirectionRecosignalD2 = "<<kcountHEnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
3990  c3x5->cd(kcountHEnegativedirectionRecosignalD2);
3991  HEnegativedirectionRecosignalD2->SetMarkerStyle(20);
3992  HEnegativedirectionRecosignalD2->SetMarkerSize(0.4);
3993  HEnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
3994  HEnegativedirectionRecosignalD2->SetXTitle("HEnegativedirectionRecosignalD2 \b");
3995  HEnegativedirectionRecosignalD2->SetMarkerColor(2);
3996  HEnegativedirectionRecosignalD2->SetLineColor(0);
3997  gPad->SetGridy();
3998  gPad->SetGridx();
3999  // gPad->SetLogy();
4000  if (kcountHEnegativedirectionRecosignalD2 == 1)
4001  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
4002  if (kcountHEnegativedirectionRecosignalD2 == 2)
4003  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
4004  if (kcountHEnegativedirectionRecosignalD2 == 3)
4005  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
4006  if (kcountHEnegativedirectionRecosignalD2 == 4)
4007  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
4008  if (kcountHEnegativedirectionRecosignalD2 == 5)
4009  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
4010  if (kcountHEnegativedirectionRecosignalD2 == 6)
4011  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
4012  if (kcountHEnegativedirectionRecosignalD2 == 7)
4013  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
4014  if (kcountHEnegativedirectionRecosignalD2 == 8)
4015  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
4016  if (kcountHEnegativedirectionRecosignalD2 == 9)
4017  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
4018  if (kcountHEnegativedirectionRecosignalD2 == 10)
4019  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
4020  if (kcountHEnegativedirectionRecosignalD2 == 11)
4021  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
4022  if (kcountHEnegativedirectionRecosignalD2 == 12)
4023  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
4024  if (kcountHEnegativedirectionRecosignalD2 == 13)
4025  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
4026  HEnegativedirectionRecosignalD2->Draw("Error");
4027  kcountHEnegativedirectionRecosignalD2++;
4028  if (kcountHEnegativedirectionRecosignalD2 > 13)
4029  break; // 4x6 = 24
4030  } //ccctest>0
4031 
4032  } // for i
4033  } //if(jeta-41 < 0)
4034  } //for jeta
4036  c3x5->Update();
4037  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
4038  c3x5->Clear();
4039  // clean-up
4040  if (h2CeffHEnegativedirectionRecosignalD2)
4041  delete h2CeffHEnegativedirectionRecosignalD2;
4042  //========================================================================================== 22222216
4043  //======================================================================
4044  //======================================================================1D plot: D vs phi , different eta, depth=3
4045  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
4046  c3x5->Clear();
4047  c3x5->Divide(3, 5);
4048  c3x5->cd(1);
4049  int kcountHEnegativedirectionRecosignalD3 = 1;
4050  TH1F* h2CeffHEnegativedirectionRecosignalD3 = new TH1F("h2CeffHEnegativedirectionRecosignalD3", "", nphi, 0., 72.);
4051 
4052  for (int jeta = 0; jeta < njeta; jeta++) {
4053  // negativedirectionRecosignalD:
4054  if (jeta - 41 < 0) {
4055  // for (int i=0;i<ndepth;i++) {
4056  // depth=3
4057  for (int i = 2; i < 3; i++) {
4058  TH1F* HEnegativedirectionRecosignalD3 = (TH1F*)h2CeffHEnegativedirectionRecosignalD3->Clone("twod1");
4059 
4060  float ccctest = 0; // to avoid empty massive elements
4061  for (int jphi = 0; jphi < nphi; jphi++) {
4062  double ccc1 = recosignalvariancehe[i][jeta][jphi];
4063  if (arecosignalhe[i][jeta][jphi] > 0.) {
4064  HEnegativedirectionRecosignalD3->Fill(jphi, ccc1);
4065  ccctest = 1.; //HEnegativedirectionRecosignalD3->SetBinError(i,0.01);
4066  }
4067  } // for jphi
4068  if (ccctest > 0.) {
4069  //cout<<"1616 kcountHEnegativedirectionRecosignalD3 = "<<kcountHEnegativedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
4070  c3x5->cd(kcountHEnegativedirectionRecosignalD3);
4071  HEnegativedirectionRecosignalD3->SetMarkerStyle(20);
4072  HEnegativedirectionRecosignalD3->SetMarkerSize(0.4);
4073  HEnegativedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
4074  HEnegativedirectionRecosignalD3->SetXTitle("HEnegativedirectionRecosignalD3 \b");
4075  HEnegativedirectionRecosignalD3->SetMarkerColor(2);
4076  HEnegativedirectionRecosignalD3->SetLineColor(0);
4077  gPad->SetGridy();
4078  gPad->SetGridx();
4079  // gPad->SetLogy();
4080  if (kcountHEnegativedirectionRecosignalD3 == 1)
4081  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
4082  if (kcountHEnegativedirectionRecosignalD3 == 2)
4083  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
4084  if (kcountHEnegativedirectionRecosignalD3 == 3)
4085  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
4086  if (kcountHEnegativedirectionRecosignalD3 == 4)
4087  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
4088  if (kcountHEnegativedirectionRecosignalD3 == 5)
4089  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
4090  if (kcountHEnegativedirectionRecosignalD3 == 6)
4091  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
4092  if (kcountHEnegativedirectionRecosignalD3 == 7)
4093  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
4094  if (kcountHEnegativedirectionRecosignalD3 == 8)
4095  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
4096  if (kcountHEnegativedirectionRecosignalD3 == 9)
4097  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
4098  if (kcountHEnegativedirectionRecosignalD3 == 10)
4099  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
4100  if (kcountHEnegativedirectionRecosignalD3 == 11)
4101  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
4102  if (kcountHEnegativedirectionRecosignalD3 == 12)
4103  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
4104  if (kcountHEnegativedirectionRecosignalD3 == 13)
4105  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
4106  HEnegativedirectionRecosignalD3->Draw("Error");
4107  kcountHEnegativedirectionRecosignalD3++;
4108  if (kcountHEnegativedirectionRecosignalD3 > 13)
4109  break; // 4x6 = 24
4110  } //ccctest>0
4111 
4112  } // for i
4113  } //if(jeta-41 < 0)
4114  } //for jeta
4116  c3x5->Update();
4117  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
4118  c3x5->Clear();
4119  // clean-up
4120  if (h2CeffHEnegativedirectionRecosignalD3)
4121  delete h2CeffHEnegativedirectionRecosignalD3;
4122  //========================================================================================== 22222217
4123  //======================================================================
4124  //======================================================================1D plot: D vs phi , different eta, depth=4
4125  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
4126  c3x5->Clear();
4127  c3x5->Divide(3, 5);
4128  c3x5->cd(1);
4129  int kcountHEnegativedirectionRecosignalD4 = 1;
4130  TH1F* h2CeffHEnegativedirectionRecosignalD4 = new TH1F("h2CeffHEnegativedirectionRecosignalD4", "", nphi, 0., 72.);
4131 
4132  for (int jeta = 0; jeta < njeta; jeta++) {
4133  // negativedirectionRecosignalD:
4134  if (jeta - 41 < 0) {
4135  // for (int i=0;i<ndepth;i++) {
4136  // depth=4
4137  for (int i = 3; i < 4; i++) {
4138  TH1F* HEnegativedirectionRecosignalD4 = (TH1F*)h2CeffHEnegativedirectionRecosignalD4->Clone("twod1");
4139 
4140  float ccctest = 0; // to avoid empty massive elements
4141  for (int jphi = 0; jphi < nphi; jphi++) {
4142  double ccc1 = recosignalvariancehe[i][jeta][jphi];
4143  if (arecosignalhe[i][jeta][jphi] > 0.) {
4144  HEnegativedirectionRecosignalD4->Fill(jphi, ccc1);
4145  ccctest = 1.; //HEnegativedirectionRecosignalD4->SetBinError(i,0.01);
4146  }
4147  } // for jphi
4148  if (ccctest > 0.) {
4149  //cout<<"1717 kcountHEnegativedirectionRecosignalD4 = "<<kcountHEnegativedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
4150  c3x5->cd(kcountHEnegativedirectionRecosignalD4);
4151  HEnegativedirectionRecosignalD4->SetMarkerStyle(20);
4152  HEnegativedirectionRecosignalD4->SetMarkerSize(0.4);
4153  HEnegativedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
4154  HEnegativedirectionRecosignalD4->SetXTitle("HEnegativedirectionRecosignalD4 \b");
4155  HEnegativedirectionRecosignalD4->SetMarkerColor(2);
4156  HEnegativedirectionRecosignalD4->SetLineColor(0);
4157  gPad->SetGridy();
4158  gPad->SetGridx();
4159  // gPad->SetLogy();
4160  if (kcountHEnegativedirectionRecosignalD4 == 1)
4161  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
4162  if (kcountHEnegativedirectionRecosignalD4 == 2)
4163  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
4164  if (kcountHEnegativedirectionRecosignalD4 == 3)
4165  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
4166  if (kcountHEnegativedirectionRecosignalD4 == 4)
4167  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
4168  if (kcountHEnegativedirectionRecosignalD4 == 5)
4169  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
4170  if (kcountHEnegativedirectionRecosignalD4 == 6)
4171  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
4172  if (kcountHEnegativedirectionRecosignalD4 == 7)
4173  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
4174  if (kcountHEnegativedirectionRecosignalD4 == 8)
4175  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
4176  if (kcountHEnegativedirectionRecosignalD4 == 9)
4177  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
4178  if (kcountHEnegativedirectionRecosignalD4 == 10)
4179  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
4180  if (kcountHEnegativedirectionRecosignalD4 == 11)
4181  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
4182  if (kcountHEnegativedirectionRecosignalD4 == 12)
4183  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
4184  HEnegativedirectionRecosignalD4->Draw("Error");
4185  kcountHEnegativedirectionRecosignalD4++;
4186  if (kcountHEnegativedirectionRecosignalD4 > 12)
4187  break; // 4x6 = 24
4188  } //ccctest>0
4189 
4190  } // for i
4191  } //if(jeta-41 < 0)
4192  } //for jeta
4194  c3x5->Update();
4195  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
4196  c3x5->Clear();
4197  // clean-up
4198  if (h2CeffHEnegativedirectionRecosignalD4)
4199  delete h2CeffHEnegativedirectionRecosignalD4;
4200  //========================================================================================== 22222218
4201  //======================================================================
4202  //======================================================================1D plot: D vs phi , different eta, depth=5
4203  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
4204  c3x5->Clear();
4205  c3x5->Divide(3, 5);
4206  c3x5->cd(1);
4207  int kcountHEnegativedirectionRecosignalD5 = 1;
4208  TH1F* h2CeffHEnegativedirectionRecosignalD5 = new TH1F("h2CeffHEnegativedirectionRecosignalD5", "", nphi, 0., 72.);
4209 
4210  for (int jeta = 0; jeta < njeta; jeta++) {
4211  // negativedirectionRecosignalD:
4212  if (jeta - 41 < 0) {
4213  // for (int i=0;i<ndepth;i++) {
4214  // depth=5
4215  for (int i = 4; i < 5; i++) {
4216  TH1F* HEnegativedirectionRecosignalD5 = (TH1F*)h2CeffHEnegativedirectionRecosignalD5->Clone("twod1");
4217 
4218  float ccctest = 0; // to avoid empty massive elements
4219  for (int jphi = 0; jphi < nphi; jphi++) {
4220  double ccc1 = recosignalvariancehe[i][jeta][jphi];
4221  if (arecosignalhe[i][jeta][jphi] > 0.) {
4222  HEnegativedirectionRecosignalD5->Fill(jphi, ccc1);
4223  ccctest = 1.; //HEnegativedirectionRecosignalD5->SetBinError(i,0.01);
4224  }
4225  } // for jphi
4226  if (ccctest > 0.) {
4227  //cout<<"1818 kcountHEnegativedirectionRecosignalD5 = "<<kcountHEnegativedirectionRecosignalD5 <<" jeta-41= "<< jeta-41 <<endl;
4228  c3x5->cd(kcountHEnegativedirectionRecosignalD5);
4229  HEnegativedirectionRecosignalD5->SetMarkerStyle(20);
4230  HEnegativedirectionRecosignalD5->SetMarkerSize(0.4);
4231  HEnegativedirectionRecosignalD5->GetYaxis()->SetLabelSize(0.04);
4232  HEnegativedirectionRecosignalD5->SetXTitle("HEnegativedirectionRecosignalD5 \b");
4233  HEnegativedirectionRecosignalD5->SetMarkerColor(2);
4234  HEnegativedirectionRecosignalD5->SetLineColor(0);
4235  gPad->SetGridy();
4236  gPad->SetGridx();
4237  // gPad->SetLogy();
4238  if (kcountHEnegativedirectionRecosignalD5 == 1)
4239  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
4240  if (kcountHEnegativedirectionRecosignalD5 == 2)
4241  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
4242  if (kcountHEnegativedirectionRecosignalD5 == 3)
4243  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
4244  if (kcountHEnegativedirectionRecosignalD5 == 4)
4245  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
4246  if (kcountHEnegativedirectionRecosignalD5 == 5)
4247  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
4248  if (kcountHEnegativedirectionRecosignalD5 == 6)
4249  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
4250  if (kcountHEnegativedirectionRecosignalD5 == 7)
4251  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
4252  if (kcountHEnegativedirectionRecosignalD5 == 8)
4253  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
4254  if (kcountHEnegativedirectionRecosignalD5 == 9)
4255  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
4256  if (kcountHEnegativedirectionRecosignalD5 == 10)
4257  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
4258  if (kcountHEnegativedirectionRecosignalD5 == 11)
4259  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
4260  HEnegativedirectionRecosignalD5->Draw("Error");
4261  kcountHEnegativedirectionRecosignalD5++;
4262  if (kcountHEnegativedirectionRecosignalD5 > 11)
4263  break; // 4x6 = 24
4264  } //ccctest>0
4265 
4266  } // for i
4267  } //if(jeta-41 < 0)
4268  } //for jeta
4270  c3x5->Update();
4271  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
4272  c3x5->Clear();
4273  // clean-up
4274  if (h2CeffHEnegativedirectionRecosignalD5)
4275  delete h2CeffHEnegativedirectionRecosignalD5;
4276  //========================================================================================== 22222219
4277  //======================================================================
4278  //======================================================================1D plot: D vs phi , different eta, depth=6
4279  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
4280  c3x5->Clear();
4281  c3x5->Divide(3, 5);
4282  c3x5->cd(1);
4283  int kcountHEnegativedirectionRecosignalD6 = 1;
4284  TH1F* h2CeffHEnegativedirectionRecosignalD6 = new TH1F("h2CeffHEnegativedirectionRecosignalD6", "", nphi, 0., 72.);
4285 
4286  for (int jeta = 0; jeta < njeta; jeta++) {
4287  // negativedirectionRecosignalD:
4288  if (jeta - 41 < 0) {
4289  // for (int i=0;i<ndepth;i++) {
4290  // depth=6
4291  for (int i = 5; i < 6; i++) {
4292  TH1F* HEnegativedirectionRecosignalD6 = (TH1F*)h2CeffHEnegativedirectionRecosignalD6->Clone("twod1");
4293 
4294  float ccctest = 0; // to avoid empty massive elements
4295  for (int jphi = 0; jphi < nphi; jphi++) {
4296  double ccc1 = recosignalvariancehe[i][jeta][jphi];
4297  if (arecosignalhe[i][jeta][jphi] > 0.) {
4298  HEnegativedirectionRecosignalD6->Fill(jphi, ccc1);
4299  ccctest = 1.; //HEnegativedirectionRecosignalD6->SetBinError(i,0.01);
4300  }
4301  } // for jphi
4302  if (ccctest > 0.) {
4303  //cout<<"1919 kcountHEnegativedirectionRecosignalD6 = "<<kcountHEnegativedirectionRecosignalD6 <<" jeta-41= "<< jeta-41 <<endl;
4304  c3x5->cd(kcountHEnegativedirectionRecosignalD6);
4305  HEnegativedirectionRecosignalD6->SetMarkerStyle(20);
4306  HEnegativedirectionRecosignalD6->SetMarkerSize(0.4);
4307  HEnegativedirectionRecosignalD6->GetYaxis()->SetLabelSize(0.04);
4308  HEnegativedirectionRecosignalD6->SetXTitle("HEnegativedirectionRecosignalD6 \b");
4309  HEnegativedirectionRecosignalD6->SetMarkerColor(2);
4310  HEnegativedirectionRecosignalD6->SetLineColor(0);
4311  gPad->SetGridy();
4312  gPad->SetGridx();
4313  // gPad->SetLogy();
4314  if (kcountHEnegativedirectionRecosignalD6 == 1)
4315  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
4316  if (kcountHEnegativedirectionRecosignalD6 == 2)
4317  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
4318  if (kcountHEnegativedirectionRecosignalD6 == 3)
4319  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
4320  if (kcountHEnegativedirectionRecosignalD6 == 4)
4321  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
4322  if (kcountHEnegativedirectionRecosignalD6 == 5)
4323  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
4324  if (kcountHEnegativedirectionRecosignalD6 == 6)
4325  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
4326  if (kcountHEnegativedirectionRecosignalD6 == 7)
4327  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
4328  if (kcountHEnegativedirectionRecosignalD6 == 8)
4329  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
4330  if (kcountHEnegativedirectionRecosignalD6 == 9)
4331  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
4332  if (kcountHEnegativedirectionRecosignalD6 == 10)
4333  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
4334  HEnegativedirectionRecosignalD6->Draw("Error");
4335  kcountHEnegativedirectionRecosignalD6++;
4336  if (kcountHEnegativedirectionRecosignalD6 > 10)
4337  break; // 4x6 = 24
4338  } //ccctest>0
4339 
4340  } // for i
4341  } //if(jeta-41 < 0)
4342  } //for jeta
4344  c3x5->Update();
4345  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
4346  c3x5->Clear();
4347  // clean-up
4348  if (h2CeffHEnegativedirectionRecosignalD6)
4349  delete h2CeffHEnegativedirectionRecosignalD6;
4350  //========================================================================================== 22222220
4351  //======================================================================
4352  //======================================================================1D plot: D vs phi , different eta, depth=7
4353  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
4354  c3x5->Clear();
4355  c3x5->Divide(3, 5);
4356  c3x5->cd(1);
4357  int kcountHEnegativedirectionRecosignalD7 = 1;
4358  TH1F* h2CeffHEnegativedirectionRecosignalD7 = new TH1F("h2CeffHEnegativedirectionRecosignalD7", "", nphi, 0., 72.);
4359 
4360  for (int jeta = 0; jeta < njeta; jeta++) {
4361  // negativedirectionRecosignalD:
4362  if (jeta - 41 < 0) {
4363  // for (int i=0;i<ndepth;i++) {
4364  // depth=7
4365  for (int i = 6; i < 7; i++) {
4366  TH1F* HEnegativedirectionRecosignalD7 = (TH1F*)h2CeffHEnegativedirectionRecosignalD7->Clone("twod1");
4367 
4368  float ccctest = 0; // to avoid empty massive elements
4369  for (int jphi = 0; jphi < nphi; jphi++) {
4370  double ccc1 = recosignalvariancehe[i][jeta][jphi];
4371  if (arecosignalhe[i][jeta][jphi] > 0.) {
4372  HEnegativedirectionRecosignalD7->Fill(jphi, ccc1);
4373  ccctest = 1.; //HEnegativedirectionRecosignalD7->SetBinError(i,0.01);
4374  }
4375  } // for jphi
4376  if (ccctest != 0.) {
4377  //cout<<"2020 kcountHEnegativedirectionRecosignalD7 = "<<kcountHEnegativedirectionRecosignalD7 <<" jeta-41= "<< jeta-41 <<endl;
4378  c3x5->cd(kcountHEnegativedirectionRecosignalD7);
4379  HEnegativedirectionRecosignalD7->SetMarkerStyle(20);
4380  HEnegativedirectionRecosignalD7->SetMarkerSize(0.4);
4381  HEnegativedirectionRecosignalD7->GetYaxis()->SetLabelSize(0.04);
4382  HEnegativedirectionRecosignalD7->SetXTitle("HEnegativedirectionRecosignalD7 \b");
4383  HEnegativedirectionRecosignalD7->SetMarkerColor(2);
4384  HEnegativedirectionRecosignalD7->SetLineColor(0);
4385  gPad->SetGridy();
4386  gPad->SetGridx();
4387  // gPad->SetLogy();
4388  if (kcountHEnegativedirectionRecosignalD7 == 1)
4389  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
4390  if (kcountHEnegativedirectionRecosignalD7 == 2)
4391  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
4392  if (kcountHEnegativedirectionRecosignalD7 == 3)
4393  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
4394  HEnegativedirectionRecosignalD7->Draw("Error");
4395  kcountHEnegativedirectionRecosignalD7++;
4396  if (kcountHEnegativedirectionRecosignalD7 > 3)
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("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
4406  c3x5->Clear();
4407  // clean-up
4408  if (h2CeffHEnegativedirectionRecosignalD7)
4409  delete h2CeffHEnegativedirectionRecosignalD7;
4410  //===================================================================== END of Recosignal HE for phi-symmetry
4411  //===================================================================== END of Recosignal HE for phi-symmetry
4412  //===================================================================== END of Recosignal HE for phi-symmetry
4416  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
4417  //ndepth = k_max[5];
4418  ndepth = 2;
4419  double arecosignalHF[ndepth][njeta][njphi];
4420  double recosignalvarianceHF[ndepth][njeta][njphi];
4421  //cout<<"111RRRRRRRRRRRRRRRRRRRRRRRRR Recosignal HF" <<endl;
4422  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HF
4423  TH2F* recSignalEnergy1HF1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HF1");
4424  TH2F* recSignalEnergy0HF1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HF1");
4425  TH2F* recSignalEnergyHF1 = (TH2F*)recSignalEnergy1HF1->Clone("recSignalEnergyHF1");
4426  recSignalEnergyHF1->Divide(recSignalEnergy1HF1, recSignalEnergy0HF1, 1, 1, "B");
4427  TH2F* recSignalEnergy1HF2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HF2");
4428  TH2F* recSignalEnergy0HF2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HF2");
4429  TH2F* recSignalEnergyHF2 = (TH2F*)recSignalEnergy1HF2->Clone("recSignalEnergyHF2");
4430  recSignalEnergyHF2->Divide(recSignalEnergy1HF2, recSignalEnergy0HF2, 1, 1, "B");
4431  // cout<<"222RRRRRRRRRRRRRRRRRRRRRRRRR Recosignal HF" <<endl;
4432  //====================================================================== PHI normalization & put R into massive arecosignalHF
4433  for (int jeta = 0; jeta < njeta; jeta++) {
4434  //preparation for PHI normalization:
4435  double sumrecosignalHF0 = 0;
4436  int nsumrecosignalHF0 = 0;
4437  double sumrecosignalHF1 = 0;
4438  int nsumrecosignalHF1 = 0;
4439  for (int jphi = 0; jphi < njphi; jphi++) {
4440  arecosignalHF[0][jeta][jphi] = recSignalEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
4441  arecosignalHF[1][jeta][jphi] = recSignalEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
4442  if (arecosignalHF[0][jeta][jphi] > 0.) {
4443  sumrecosignalHF0 += arecosignalHF[0][jeta][jphi];
4444  ++nsumrecosignalHF0;
4445  }
4446  if (arecosignalHF[1][jeta][jphi] > 0.) {
4447  sumrecosignalHF1 += arecosignalHF[1][jeta][jphi];
4448  ++nsumrecosignalHF1;
4449  }
4450  } // phi
4451  // PHI normalization:
4452  for (int jphi = 0; jphi < njphi; jphi++) {
4453  if (arecosignalHF[0][jeta][jphi] > 0.)
4454  arecosignalHF[0][jeta][jphi] /= (sumrecosignalHF0 / nsumrecosignalHF0);
4455  if (arecosignalHF[1][jeta][jphi] > 0.)
4456  arecosignalHF[1][jeta][jphi] /= (sumrecosignalHF1 / nsumrecosignalHF1);
4457  } // phi
4458  } //eta
4459  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
4460  //======================================================================
4461  //======================================================================
4462  // cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
4463  c2x1->Clear();
4465  c2x1->Divide(2, 1);
4466  c2x1->cd(1);
4467  TH2F* GefzRrecosignalHF42D = new TH2F("GefzRrecosignalHF42D", "", neta, -41., 41., nphi, 0., 72.);
4468  TH2F* GefzRrecosignalHF42D0 = new TH2F("GefzRrecosignalHF42D0", "", neta, -41., 41., nphi, 0., 72.);
4469  TH2F* GefzRrecosignalHF42DF = (TH2F*)GefzRrecosignalHF42D0->Clone("GefzRrecosignalHF42DF");
4470  for (int i = 0; i < ndepth; i++) {
4471  for (int jeta = 0; jeta < neta; jeta++) {
4472  for (int jphi = 0; jphi < nphi; jphi++) {
4473  double ccc1 = arecosignalHF[i][jeta][jphi];
4474  int k2plot = jeta - 41;
4475  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
4476  if (ccc1 != 0.) {
4477  GefzRrecosignalHF42D->Fill(kkk, jphi, ccc1);
4478  GefzRrecosignalHF42D0->Fill(kkk, jphi, 1.);
4479  }
4480  }
4481  }
4482  }
4483  GefzRrecosignalHF42DF->Divide(GefzRrecosignalHF42D, GefzRrecosignalHF42D0, 1, 1, "B"); // average A
4484  gPad->SetGridy();
4485  gPad->SetGridx(); // gPad->SetLogz();
4486  GefzRrecosignalHF42DF->SetXTitle("<R>_depth #eta \b");
4487  GefzRrecosignalHF42DF->SetYTitle(" #phi \b");
4488  GefzRrecosignalHF42DF->Draw("COLZ");
4489 
4490  c2x1->cd(2);
4491  TH1F* energyhitSignal_HF = (TH1F*)dir->FindObjectAny("h_energyhitSignal_HF");
4492  energyhitSignal_HF->SetMarkerStyle(20);
4493  energyhitSignal_HF->SetMarkerSize(0.4);
4494  energyhitSignal_HF->GetYaxis()->SetLabelSize(0.04);
4495  energyhitSignal_HF->SetXTitle("energyhitSignal_HF \b");
4496  energyhitSignal_HF->SetMarkerColor(2);
4497  energyhitSignal_HF->SetLineColor(0);
4498  gPad->SetGridy();
4499  gPad->SetGridx();
4500  energyhitSignal_HF->Draw("Error");
4501 
4503  c2x1->Update();
4504  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHF.png");
4505  c2x1->Clear();
4506  // clean-up
4507  if (GefzRrecosignalHF42D)
4508  delete GefzRrecosignalHF42D;
4509  if (GefzRrecosignalHF42D0)
4510  delete GefzRrecosignalHF42D0;
4511  if (GefzRrecosignalHF42DF)
4512  delete GefzRrecosignalHF42DF;
4513  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
4514  //======================================================================
4515  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
4516  c1x1->Clear();
4518  c1x1->Divide(1, 1);
4519  c1x1->cd(1);
4520  TH1F* GefzRrecosignalHF41D = new TH1F("GefzRrecosignalHF41D", "", nphi, 0., 72.);
4521  TH1F* GefzRrecosignalHF41D0 = new TH1F("GefzRrecosignalHF41D0", "", nphi, 0., 72.);
4522  TH1F* GefzRrecosignalHF41DF = (TH1F*)GefzRrecosignalHF41D0->Clone("GefzRrecosignalHF41DF");
4523  for (int jphi = 0; jphi < nphi; jphi++) {
4524  for (int jeta = 0; jeta < neta; jeta++) {
4525  for (int i = 0; i < ndepth; i++) {
4526  double ccc1 = arecosignalHF[i][jeta][jphi];
4527  if (ccc1 != 0.) {
4528  GefzRrecosignalHF41D->Fill(jphi, ccc1);
4529  GefzRrecosignalHF41D0->Fill(jphi, 1.);
4530  }
4531  }
4532  }
4533  }
4534  GefzRrecosignalHF41DF->Divide(
4535  GefzRrecosignalHF41D, GefzRrecosignalHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
4536  GefzRrecosignalHF41D0->Sumw2();
4537  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHF41DF->SetBinError(jphi,0.01);}
4538  gPad->SetGridy();
4539  gPad->SetGridx(); // gPad->SetLogz();
4540  GefzRrecosignalHF41DF->SetMarkerStyle(20);
4541  GefzRrecosignalHF41DF->SetMarkerSize(1.4);
4542  GefzRrecosignalHF41DF->GetZaxis()->SetLabelSize(0.08);
4543  GefzRrecosignalHF41DF->SetXTitle("#phi \b");
4544  GefzRrecosignalHF41DF->SetYTitle(" <R> \b");
4545  GefzRrecosignalHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
4546  GefzRrecosignalHF41DF->SetMarkerColor(4);
4547  GefzRrecosignalHF41DF->SetLineColor(
4548  4); // GefzRrecosignalHF41DF->SetMinimum(0.8); // GefzRrecosignalHF41DF->SetMaximum(1.000);
4549  GefzRrecosignalHF41DF->Draw("Error");
4551  c1x1->Update();
4552  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHF.png");
4553  c1x1->Clear();
4554  // clean-up
4555  if (GefzRrecosignalHF41D)
4556  delete GefzRrecosignalHF41D;
4557  if (GefzRrecosignalHF41D0)
4558  delete GefzRrecosignalHF41D0;
4559  if (GefzRrecosignalHF41DF)
4560  delete GefzRrecosignalHF41DF;
4561  //========================================================================================== 4
4562  //======================================================================
4563  //======================================================================1D plot: R vs phi , different eta, depth=1
4564  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
4565  c3x5->Clear();
4567  c3x5->Divide(3, 5);
4568  c3x5->cd(1);
4569  int kcountHFpositivedirectionRecosignal1 = 1;
4570  TH1F* h2CeffHFpositivedirectionRecosignal1 = new TH1F("h2CeffHFpositivedirectionRecosignal1", "", nphi, 0., 72.);
4571  for (int jeta = 0; jeta < njeta; jeta++) {
4572  // positivedirectionRecosignal:
4573  if (jeta - 41 >= 0) {
4574  // for (int i=0;i<ndepth;i++) {
4575  // depth=1
4576  for (int i = 0; i < 1; i++) {
4577  TH1F* HFpositivedirectionRecosignal1 = (TH1F*)h2CeffHFpositivedirectionRecosignal1->Clone("twod1");
4578  float ccctest = 0; // to avoid empty massive elements
4579  for (int jphi = 0; jphi < nphi; jphi++) {
4580  double ccc1 = arecosignalHF[i][jeta][jphi];
4581  if (ccc1 != 0.) {
4582  HFpositivedirectionRecosignal1->Fill(jphi, ccc1);
4583  ccctest = 1.; //HFpositivedirectionRecosignal1->SetBinError(i,0.01);
4584  }
4585  } // for jphi
4586  if (ccctest > 0.) {
4587  // cout<<"444 kcountHFpositivedirectionRecosignal1 = "<<kcountHFpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
4588  c3x5->cd(kcountHFpositivedirectionRecosignal1);
4589  HFpositivedirectionRecosignal1->SetMarkerStyle(20);
4590  HFpositivedirectionRecosignal1->SetMarkerSize(0.4);
4591  HFpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
4592  HFpositivedirectionRecosignal1->SetXTitle("HFpositivedirectionRecosignal1 \b");
4593  HFpositivedirectionRecosignal1->SetMarkerColor(2);
4594  HFpositivedirectionRecosignal1->SetLineColor(0);
4595  gPad->SetGridy();
4596  gPad->SetGridx();
4597  // gPad->SetLogy();
4598  if (kcountHFpositivedirectionRecosignal1 == 1)
4599  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
4600  if (kcountHFpositivedirectionRecosignal1 == 2)
4601  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
4602  if (kcountHFpositivedirectionRecosignal1 == 3)
4603  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
4604  if (kcountHFpositivedirectionRecosignal1 == 4)
4605  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
4606  if (kcountHFpositivedirectionRecosignal1 == 5)
4607  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
4608  if (kcountHFpositivedirectionRecosignal1 == 6)
4609  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
4610  if (kcountHFpositivedirectionRecosignal1 == 7)
4611  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
4612  if (kcountHFpositivedirectionRecosignal1 == 8)
4613  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
4614  if (kcountHFpositivedirectionRecosignal1 == 9)
4615  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
4616  if (kcountHFpositivedirectionRecosignal1 == 10)
4617  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
4618  if (kcountHFpositivedirectionRecosignal1 == 11)
4619  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
4620  if (kcountHFpositivedirectionRecosignal1 == 12)
4621  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
4622  if (kcountHFpositivedirectionRecosignal1 == 13)
4623  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
4624  HFpositivedirectionRecosignal1->Draw("Error");
4625  kcountHFpositivedirectionRecosignal1++;
4626  if (kcountHFpositivedirectionRecosignal1 > 13)
4627  break; //
4628  } //ccctest>0
4629 
4630  } // for i
4631  } //if(jeta-41 >= 0)
4632  } //for jeta
4634  c3x5->Update();
4635  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
4636  c3x5->Clear();
4637  // clean-up
4638  if (h2CeffHFpositivedirectionRecosignal1)
4639  delete h2CeffHFpositivedirectionRecosignal1;
4640 
4641  //========================================================================================== 5
4642  //======================================================================
4643  //======================================================================1D plot: R vs phi , different eta, depth=2
4644  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
4645  c3x5->Clear();
4647  c3x5->Divide(3, 5);
4648  c3x5->cd(1);
4649  int kcountHFpositivedirectionRecosignal2 = 1;
4650  TH1F* h2CeffHFpositivedirectionRecosignal2 = new TH1F("h2CeffHFpositivedirectionRecosignal2", "", nphi, 0., 72.);
4651  for (int jeta = 0; jeta < njeta; jeta++) {
4652  // positivedirectionRecosignal:
4653  if (jeta - 41 >= 0) {
4654  // for (int i=0;i<ndepth;i++) {
4655  // depth=2
4656  for (int i = 1; i < 2; i++) {
4657  TH1F* HFpositivedirectionRecosignal2 = (TH1F*)h2CeffHFpositivedirectionRecosignal2->Clone("twod1");
4658  float ccctest = 0; // to avoid empty massive elements
4659  for (int jphi = 0; jphi < nphi; jphi++) {
4660  double ccc1 = arecosignalHF[i][jeta][jphi];
4661  if (ccc1 != 0.) {
4662  HFpositivedirectionRecosignal2->Fill(jphi, ccc1);
4663  ccctest = 1.; //HFpositivedirectionRecosignal2->SetBinError(i,0.01);
4664  }
4665  } // for jphi
4666  if (ccctest > 0.) {
4667  //cout<<"555 kcountHFpositivedirectionRecosignal2 = "<<kcountHFpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
4668  c3x5->cd(kcountHFpositivedirectionRecosignal2);
4669  HFpositivedirectionRecosignal2->SetMarkerStyle(20);
4670  HFpositivedirectionRecosignal2->SetMarkerSize(0.4);
4671  HFpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
4672  HFpositivedirectionRecosignal2->SetXTitle("HFpositivedirectionRecosignal2 \b");
4673  HFpositivedirectionRecosignal2->SetMarkerColor(2);
4674  HFpositivedirectionRecosignal2->SetLineColor(0);
4675  gPad->SetGridy();
4676  gPad->SetGridx();
4677  // gPad->SetLogy();
4678  if (kcountHFpositivedirectionRecosignal2 == 1)
4679  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
4680  if (kcountHFpositivedirectionRecosignal2 == 2)
4681  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
4682  if (kcountHFpositivedirectionRecosignal2 == 3)
4683  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
4684  if (kcountHFpositivedirectionRecosignal2 == 4)
4685  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
4686  if (kcountHFpositivedirectionRecosignal2 == 5)
4687  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
4688  if (kcountHFpositivedirectionRecosignal2 == 6)
4689  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
4690  if (kcountHFpositivedirectionRecosignal2 == 7)
4691  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
4692  if (kcountHFpositivedirectionRecosignal2 == 8)
4693  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
4694  if (kcountHFpositivedirectionRecosignal2 == 9)
4695  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
4696  if (kcountHFpositivedirectionRecosignal2 == 10)
4697  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
4698  if (kcountHFpositivedirectionRecosignal2 == 11)
4699  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
4700  if (kcountHFpositivedirectionRecosignal2 == 12)
4701  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
4702  if (kcountHFpositivedirectionRecosignal2 == 13)
4703  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
4704  HFpositivedirectionRecosignal2->Draw("Error");
4705  kcountHFpositivedirectionRecosignal2++;
4706  if (kcountHFpositivedirectionRecosignal2 > 13)
4707  break; // 4x6 = 24
4708  } //ccctest>0
4709 
4710  } // for i
4711  } //if(jeta-41 >= 0)
4712  } //for jeta
4714  c3x5->Update();
4715  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
4716  c3x5->Clear();
4717  // clean-up
4718  if (h2CeffHFpositivedirectionRecosignal2)
4719  delete h2CeffHFpositivedirectionRecosignal2;
4720 
4721  //========================================================================================== 1111114
4722  //======================================================================
4723  //======================================================================1D plot: R vs phi , different eta, depth=1
4724  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
4725  c3x5->Clear();
4727  c3x5->Divide(3, 5);
4728  c3x5->cd(1);
4729  int kcountHFnegativedirectionRecosignal1 = 1;
4730  TH1F* h2CeffHFnegativedirectionRecosignal1 = new TH1F("h2CeffHFnegativedirectionRecosignal1", "", nphi, 0., 72.);
4731  for (int jeta = 0; jeta < njeta; jeta++) {
4732  // negativedirectionRecosignal:
4733  if (jeta - 41 < 0) {
4734  // for (int i=0;i<ndepth;i++) {
4735  // depth=1
4736  for (int i = 0; i < 1; i++) {
4737  TH1F* HFnegativedirectionRecosignal1 = (TH1F*)h2CeffHFnegativedirectionRecosignal1->Clone("twod1");
4738  float ccctest = 0; // to avoid empty massive elements
4739  for (int jphi = 0; jphi < nphi; jphi++) {
4740  double ccc1 = arecosignalHF[i][jeta][jphi];
4741  if (ccc1 != 0.) {
4742  HFnegativedirectionRecosignal1->Fill(jphi, ccc1);
4743  ccctest = 1.; //HFnegativedirectionRecosignal1->SetBinError(i,0.01);
4744  }
4745  } // for jphi
4746  if (ccctest > 0.) {
4747  // cout<<"444 kcountHFnegativedirectionRecosignal1 = "<<kcountHFnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
4748  c3x5->cd(kcountHFnegativedirectionRecosignal1);
4749  HFnegativedirectionRecosignal1->SetMarkerStyle(20);
4750  HFnegativedirectionRecosignal1->SetMarkerSize(0.4);
4751  HFnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
4752  HFnegativedirectionRecosignal1->SetXTitle("HFnegativedirectionRecosignal1 \b");
4753  HFnegativedirectionRecosignal1->SetMarkerColor(2);
4754  HFnegativedirectionRecosignal1->SetLineColor(0);
4755  gPad->SetGridy();
4756  gPad->SetGridx();
4757  // gPad->SetLogy();
4758  if (kcountHFnegativedirectionRecosignal1 == 1)
4759  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
4760  if (kcountHFnegativedirectionRecosignal1 == 2)
4761  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
4762  if (kcountHFnegativedirectionRecosignal1 == 3)
4763  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
4764  if (kcountHFnegativedirectionRecosignal1 == 4)
4765  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
4766  if (kcountHFnegativedirectionRecosignal1 == 5)
4767  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
4768  if (kcountHFnegativedirectionRecosignal1 == 6)
4769  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
4770  if (kcountHFnegativedirectionRecosignal1 == 7)
4771  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
4772  if (kcountHFnegativedirectionRecosignal1 == 8)
4773  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
4774  if (kcountHFnegativedirectionRecosignal1 == 9)
4775  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
4776  if (kcountHFnegativedirectionRecosignal1 == 10)
4777  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
4778  if (kcountHFnegativedirectionRecosignal1 == 11)
4779  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
4780  if (kcountHFnegativedirectionRecosignal1 == 12)
4781  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
4782  if (kcountHFnegativedirectionRecosignal1 == 13)
4783  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
4784  HFnegativedirectionRecosignal1->Draw("Error");
4785  kcountHFnegativedirectionRecosignal1++;
4786  if (kcountHFnegativedirectionRecosignal1 > 13)
4787  break; //
4788  } //ccctest>0
4789 
4790  } // for i
4791  } //if(jeta-41< 0)
4792  } //for jeta
4794  c3x5->Update();
4795  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
4796  c3x5->Clear();
4797  // clean-up
4798  if (h2CeffHFnegativedirectionRecosignal1)
4799  delete h2CeffHFnegativedirectionRecosignal1;
4800 
4801  //========================================================================================== 1111115
4802  //======================================================================
4803  //======================================================================1D plot: R vs phi , different eta, depth=2
4804  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
4805  c3x5->Clear();
4807  c3x5->Divide(3, 5);
4808  c3x5->cd(1);
4809  int kcountHFnegativedirectionRecosignal2 = 1;
4810  TH1F* h2CeffHFnegativedirectionRecosignal2 = new TH1F("h2CeffHFnegativedirectionRecosignal2", "", nphi, 0., 72.);
4811  for (int jeta = 0; jeta < njeta; jeta++) {
4812  // negativedirectionRecosignal:
4813  if (jeta - 41 < 0) {
4814  // for (int i=0;i<ndepth;i++) {
4815  // depth=2
4816  for (int i = 1; i < 2; i++) {
4817  TH1F* HFnegativedirectionRecosignal2 = (TH1F*)h2CeffHFnegativedirectionRecosignal2->Clone("twod1");
4818  float ccctest = 0; // to avoid empty massive elements
4819  for (int jphi = 0; jphi < nphi; jphi++) {
4820  double ccc1 = arecosignalHF[i][jeta][jphi];
4821  if (ccc1 != 0.) {
4822  HFnegativedirectionRecosignal2->Fill(jphi, ccc1);
4823  ccctest = 1.; //HFnegativedirectionRecosignal2->SetBinError(i,0.01);
4824  }
4825  } // for jphi
4826  if (ccctest > 0.) {
4827  //cout<<"555 kcountHFnegativedirectionRecosignal2 = "<<kcountHFnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
4828  c3x5->cd(kcountHFnegativedirectionRecosignal2);
4829  HFnegativedirectionRecosignal2->SetMarkerStyle(20);
4830  HFnegativedirectionRecosignal2->SetMarkerSize(0.4);
4831  HFnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
4832  HFnegativedirectionRecosignal2->SetXTitle("HFnegativedirectionRecosignal2 \b");
4833  HFnegativedirectionRecosignal2->SetMarkerColor(2);
4834  HFnegativedirectionRecosignal2->SetLineColor(0);
4835  gPad->SetGridy();
4836  gPad->SetGridx();
4837  // gPad->SetLogy();
4838  if (kcountHFnegativedirectionRecosignal2 == 1)
4839  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
4840  if (kcountHFnegativedirectionRecosignal2 == 2)
4841  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
4842  if (kcountHFnegativedirectionRecosignal2 == 3)
4843  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
4844  if (kcountHFnegativedirectionRecosignal2 == 4)
4845  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
4846  if (kcountHFnegativedirectionRecosignal2 == 5)
4847  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
4848  if (kcountHFnegativedirectionRecosignal2 == 6)
4849  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
4850  if (kcountHFnegativedirectionRecosignal2 == 7)
4851  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
4852  if (kcountHFnegativedirectionRecosignal2 == 8)
4853  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
4854  if (kcountHFnegativedirectionRecosignal2 == 9)
4855  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
4856  if (kcountHFnegativedirectionRecosignal2 == 10)
4857  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
4858  if (kcountHFnegativedirectionRecosignal2 == 11)
4859  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
4860  if (kcountHFnegativedirectionRecosignal2 == 12)
4861  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
4862  if (kcountHFnegativedirectionRecosignal2 == 13)
4863  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
4864  HFnegativedirectionRecosignal2->Draw("Error");
4865  kcountHFnegativedirectionRecosignal2++;
4866  if (kcountHFnegativedirectionRecosignal2 > 13)
4867  break; // 4x6 = 24
4868  } //ccctest>0
4869 
4870  } // for i
4871  } //if(jeta-41< 0)
4872  } //for jeta
4874  c3x5->Update();
4875  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
4876  c3x5->Clear();
4877  // clean-up
4878  if (h2CeffHFnegativedirectionRecosignal2)
4879  delete h2CeffHFnegativedirectionRecosignal2;
4880 
4881  //======================================================================================================================
4882  //======================================================================================================================
4883  //======================================================================================================================
4884  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
4885 
4886  //cout<<" Start Vaiance: preparation *****" <<endl;
4887  TH2F* recosignalVariance1HF1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HF1");
4888  TH2F* recosignalVariance0HF1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HF1");
4889  TH2F* recosignalVarianceHF1 = (TH2F*)recosignalVariance1HF1->Clone("recosignalVarianceHF1");
4890  recosignalVarianceHF1->Divide(recosignalVariance1HF1, recosignalVariance0HF1, 1, 1, "B");
4891  TH2F* recosignalVariance1HF2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HF2");
4892  TH2F* recosignalVariance0HF2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HF2");
4893  TH2F* recosignalVarianceHF2 = (TH2F*)recosignalVariance1HF2->Clone("recosignalVarianceHF2");
4894  recosignalVarianceHF2->Divide(recosignalVariance1HF2, recosignalVariance0HF2, 1, 1, "B");
4895  //cout<<" Vaiance: preparation DONE *****" <<endl;
4896  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvarianceHF
4897  // = sum(R*R)/N - (sum(R)/N)**2
4898  for (int jeta = 0; jeta < njeta; jeta++) {
4899  //preparation for PHI normalization:
4900  double sumrecosignalHF0 = 0;
4901  int nsumrecosignalHF0 = 0;
4902  double sumrecosignalHF1 = 0;
4903  int nsumrecosignalHF1 = 0;
4904  for (int jphi = 0; jphi < njphi; jphi++) {
4905  recosignalvarianceHF[0][jeta][jphi] = recosignalVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
4906  recosignalvarianceHF[1][jeta][jphi] = recosignalVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
4907  if (recosignalvarianceHF[0][jeta][jphi] > 0.) {
4908  sumrecosignalHF0 += recosignalvarianceHF[0][jeta][jphi];
4909  ++nsumrecosignalHF0;
4910  }
4911  if (recosignalvarianceHF[1][jeta][jphi] > 0.) {
4912  sumrecosignalHF1 += recosignalvarianceHF[1][jeta][jphi];
4913  ++nsumrecosignalHF1;
4914  }
4915  } // phi
4916  // PHI normalization :
4917  for (int jphi = 0; jphi < njphi; jphi++) {
4918  if (recosignalvarianceHF[0][jeta][jphi] > 0.)
4919  recosignalvarianceHF[0][jeta][jphi] /= (sumrecosignalHF0 / nsumrecosignalHF0);
4920  if (recosignalvarianceHF[1][jeta][jphi] > 0.)
4921  recosignalvarianceHF[1][jeta][jphi] /= (sumrecosignalHF1 / nsumrecosignalHF1);
4922  } // phi
4923  // recosignalvarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
4924  for (int jphi = 0; jphi < njphi; jphi++) {
4925  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
4926  recosignalvarianceHF[0][jeta][jphi] -= arecosignalHF[0][jeta][jphi] * arecosignalHF[0][jeta][jphi];
4927  recosignalvarianceHF[0][jeta][jphi] = fabs(recosignalvarianceHF[0][jeta][jphi]);
4928  recosignalvarianceHF[1][jeta][jphi] -= arecosignalHF[1][jeta][jphi] * arecosignalHF[1][jeta][jphi];
4929  recosignalvarianceHF[1][jeta][jphi] = fabs(recosignalvarianceHF[1][jeta][jphi]);
4930  }
4931  }
4932  //cout<<" Vaiance: DONE*****" <<endl;
4933  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
4934  //======================================================================
4935  //======================================================================
4936  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
4937  c1x1->Clear();
4939  c1x0->Divide(1, 1);
4940  c1x0->cd(1);
4941  TH2F* DefzDrecosignalHF42D = new TH2F("DefzDrecosignalHF42D", "", neta, -41., 41., nphi, 0., 72.);
4942  TH2F* DefzDrecosignalHF42D0 = new TH2F("DefzDrecosignalHF42D0", "", neta, -41., 41., nphi, 0., 72.);
4943  TH2F* DefzDrecosignalHF42DF = (TH2F*)DefzDrecosignalHF42D0->Clone("DefzDrecosignalHF42DF");
4944  for (int i = 0; i < ndepth; i++) {
4945  for (int jeta = 0; jeta < neta; jeta++) {
4946  for (int jphi = 0; jphi < nphi; jphi++) {
4947  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
4948  int k2plot = jeta - 41;
4949  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
4950  if (arecosignalHF[i][jeta][jphi] > 0.) {
4951  DefzDrecosignalHF42D->Fill(kkk, jphi, ccc1);
4952  DefzDrecosignalHF42D0->Fill(kkk, jphi, 1.);
4953  }
4954  }
4955  }
4956  }
4957  DefzDrecosignalHF42DF->Divide(DefzDrecosignalHF42D, DefzDrecosignalHF42D0, 1, 1, "B"); // average A
4958  // DefzDrecosignalHF1->Sumw2();
4959  gPad->SetGridy();
4960  gPad->SetGridx(); // gPad->SetLogz();
4961  DefzDrecosignalHF42DF->SetMarkerStyle(20);
4962  DefzDrecosignalHF42DF->SetMarkerSize(0.4);
4963  DefzDrecosignalHF42DF->GetZaxis()->SetLabelSize(0.08);
4964  DefzDrecosignalHF42DF->SetXTitle("<D>_depth #eta \b");
4965  DefzDrecosignalHF42DF->SetYTitle(" #phi \b");
4966  DefzDrecosignalHF42DF->SetZTitle("<D>_depth \b");
4967  DefzDrecosignalHF42DF->SetMarkerColor(2);
4968  DefzDrecosignalHF42DF->SetLineColor(
4969  0); // DefzDrecosignalHF42DF->SetMaximum(1.000); // DefzDrecosignalHF42DF->SetMinimum(1.0);
4970  DefzDrecosignalHF42DF->Draw("COLZ");
4972  c1x0->Update();
4973  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHF.png");
4974  c1x0->Clear();
4975  // clean-up
4976  if (DefzDrecosignalHF42D)
4977  delete DefzDrecosignalHF42D;
4978  if (DefzDrecosignalHF42D0)
4979  delete DefzDrecosignalHF42D0;
4980  if (DefzDrecosignalHF42DF)
4981  delete DefzDrecosignalHF42DF;
4982  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
4983  //======================================================================
4984  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
4985  c1x1->Clear();
4987  c1x1->Divide(1, 1);
4988  c1x1->cd(1);
4989  TH1F* DefzDrecosignalHF41D = new TH1F("DefzDrecosignalHF41D", "", nphi, 0., 72.);
4990  TH1F* DefzDrecosignalHF41D0 = new TH1F("DefzDrecosignalHF41D0", "", nphi, 0., 72.);
4991  TH1F* DefzDrecosignalHF41DF = (TH1F*)DefzDrecosignalHF41D0->Clone("DefzDrecosignalHF41DF");
4992 
4993  for (int jphi = 0; jphi < nphi; jphi++) {
4994  for (int jeta = 0; jeta < neta; jeta++) {
4995  for (int i = 0; i < ndepth; i++) {
4996  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
4997  if (arecosignalHF[i][jeta][jphi] > 0.) {
4998  DefzDrecosignalHF41D->Fill(jphi, ccc1);
4999  DefzDrecosignalHF41D0->Fill(jphi, 1.);
5000  }
5001  }
5002  }
5003  }
5004  // DefzDrecosignalHF41D->Sumw2();DefzDrecosignalHF41D0->Sumw2();
5005 
5006  DefzDrecosignalHF41DF->Divide(
5007  DefzDrecosignalHF41D, DefzDrecosignalHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
5008  DefzDrecosignalHF41D0->Sumw2();
5009  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHF41DF->SetBinError(jphi,0.01);}
5010  gPad->SetGridy();
5011  gPad->SetGridx(); // gPad->SetLogz();
5012  DefzDrecosignalHF41DF->SetMarkerStyle(20);
5013  DefzDrecosignalHF41DF->SetMarkerSize(1.4);
5014  DefzDrecosignalHF41DF->GetZaxis()->SetLabelSize(0.08);
5015  DefzDrecosignalHF41DF->SetXTitle("#phi \b");
5016  DefzDrecosignalHF41DF->SetYTitle(" <D> \b");
5017  DefzDrecosignalHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
5018  DefzDrecosignalHF41DF->SetMarkerColor(4);
5019  DefzDrecosignalHF41DF->SetLineColor(
5020  4); // DefzDrecosignalHF41DF->SetMinimum(0.8); DefzDrecosignalHF41DF->SetMinimum(-0.015);
5021  DefzDrecosignalHF41DF->Draw("Error");
5023  c1x1->Update();
5024  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHF.png");
5025  c1x1->Clear();
5026  // clean-up
5027  if (DefzDrecosignalHF41D)
5028  delete DefzDrecosignalHF41D;
5029  if (DefzDrecosignalHF41D0)
5030  delete DefzDrecosignalHF41D0;
5031  if (DefzDrecosignalHF41DF)
5032  delete DefzDrecosignalHF41DF;
5033  //========================================================================================== 14
5034  //======================================================================
5035  //======================================================================1D plot: D vs phi , different eta, depth=1
5036  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
5037  c3x5->Clear();
5039  c3x5->Divide(3, 5);
5040  c3x5->cd(1);
5041  int kcountHFpositivedirectionRecosignalD1 = 1;
5042  TH1F* h2CeffHFpositivedirectionRecosignalD1 = new TH1F("h2CeffHFpositivedirectionRecosignalD1", "", nphi, 0., 72.);
5043 
5044  for (int jeta = 0; jeta < njeta; jeta++) {
5045  // positivedirectionRecosignalD:
5046  if (jeta - 41 >= 0) {
5047  // for (int i=0;i<ndepth;i++) {
5048  // depth=1
5049  for (int i = 0; i < 1; i++) {
5050  TH1F* HFpositivedirectionRecosignalD1 = (TH1F*)h2CeffHFpositivedirectionRecosignalD1->Clone("twod1");
5051 
5052  float ccctest = 0; // to avoid empty massive elements
5053  for (int jphi = 0; jphi < nphi; jphi++) {
5054  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
5055  if (arecosignalHF[i][jeta][jphi] > 0.) {
5056  HFpositivedirectionRecosignalD1->Fill(jphi, ccc1);
5057  ccctest = 1.; //HFpositivedirectionRecosignalD1->SetBinError(i,0.01);
5058  }
5059  } // for jphi
5060  if (ccctest > 0.) {
5061  //cout<<"1414 kcountHFpositivedirectionRecosignalD1 = "<<kcountHFpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
5062  c3x5->cd(kcountHFpositivedirectionRecosignalD1);
5063  HFpositivedirectionRecosignalD1->SetMarkerStyle(20);
5064  HFpositivedirectionRecosignalD1->SetMarkerSize(0.4);
5065  HFpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
5066  HFpositivedirectionRecosignalD1->SetXTitle("HFpositivedirectionRecosignalD1 \b");
5067  HFpositivedirectionRecosignalD1->SetMarkerColor(2);
5068  HFpositivedirectionRecosignalD1->SetLineColor(0);
5069  gPad->SetGridy();
5070  gPad->SetGridx();
5071  // gPad->SetLogy();
5072  if (kcountHFpositivedirectionRecosignalD1 == 1)
5073  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
5074  if (kcountHFpositivedirectionRecosignalD1 == 2)
5075  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
5076  if (kcountHFpositivedirectionRecosignalD1 == 3)
5077  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
5078  if (kcountHFpositivedirectionRecosignalD1 == 4)
5079  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
5080  if (kcountHFpositivedirectionRecosignalD1 == 5)
5081  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
5082  if (kcountHFpositivedirectionRecosignalD1 == 6)
5083  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
5084  if (kcountHFpositivedirectionRecosignalD1 == 7)
5085  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
5086  if (kcountHFpositivedirectionRecosignalD1 == 8)
5087  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
5088  if (kcountHFpositivedirectionRecosignalD1 == 9)
5089  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
5090  if (kcountHFpositivedirectionRecosignalD1 == 10)
5091  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
5092  if (kcountHFpositivedirectionRecosignalD1 == 11)
5093  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
5094  if (kcountHFpositivedirectionRecosignalD1 == 12)
5095  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
5096  if (kcountHFpositivedirectionRecosignalD1 == 13)
5097  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
5098  HFpositivedirectionRecosignalD1->Draw("Error");
5099  kcountHFpositivedirectionRecosignalD1++;
5100  if (kcountHFpositivedirectionRecosignalD1 > 13)
5101  break; // 4x6 = 24
5102  } //ccctest>0
5103 
5104  } // for i
5105  } //if(jeta-41 >= 0)
5106  } //for jeta
5108  c3x5->Update();
5109  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
5110  c3x5->Clear();
5111  // clean-up
5112  if (h2CeffHFpositivedirectionRecosignalD1)
5113  delete h2CeffHFpositivedirectionRecosignalD1;
5114  //========================================================================================== 15
5115  //======================================================================
5116  //======================================================================1D plot: D vs phi , different eta, depth=2
5117  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
5118  c3x5->Clear();
5119  c3x5->Divide(3, 5);
5120  c3x5->cd(1);
5121  int kcountHFpositivedirectionRecosignalD2 = 1;
5122  TH1F* h2CeffHFpositivedirectionRecosignalD2 = new TH1F("h2CeffHFpositivedirectionRecosignalD2", "", nphi, 0., 72.);
5123 
5124  for (int jeta = 0; jeta < njeta; jeta++) {
5125  // positivedirectionRecosignalD:
5126  if (jeta - 41 >= 0) {
5127  // for (int i=0;i<ndepth;i++) {
5128  // depth=2
5129  for (int i = 1; i < 2; i++) {
5130  TH1F* HFpositivedirectionRecosignalD2 = (TH1F*)h2CeffHFpositivedirectionRecosignalD2->Clone("twod1");
5131 
5132  float ccctest = 0; // to avoid empty massive elements
5133  for (int jphi = 0; jphi < nphi; jphi++) {
5134  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
5135  if (arecosignalHF[i][jeta][jphi] > 0.) {
5136  HFpositivedirectionRecosignalD2->Fill(jphi, ccc1);
5137  ccctest = 1.; //HFpositivedirectionRecosignalD2->SetBinError(i,0.01);
5138  }
5139  } // for jphi
5140  if (ccctest > 0.) {
5141  //cout<<"1515 kcountHFpositivedirectionRecosignalD2 = "<<kcountHFpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
5142  c3x5->cd(kcountHFpositivedirectionRecosignalD2);
5143  HFpositivedirectionRecosignalD2->SetMarkerStyle(20);
5144  HFpositivedirectionRecosignalD2->SetMarkerSize(0.4);
5145  HFpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
5146  HFpositivedirectionRecosignalD2->SetXTitle("HFpositivedirectionRecosignalD2 \b");
5147  HFpositivedirectionRecosignalD2->SetMarkerColor(2);
5148  HFpositivedirectionRecosignalD2->SetLineColor(0);
5149  gPad->SetGridy();
5150  gPad->SetGridx();
5151  // gPad->SetLogy();
5152  if (kcountHFpositivedirectionRecosignalD2 == 1)
5153  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
5154  if (kcountHFpositivedirectionRecosignalD2 == 2)
5155  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
5156  if (kcountHFpositivedirectionRecosignalD2 == 3)
5157  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
5158  if (kcountHFpositivedirectionRecosignalD2 == 4)
5159  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
5160  if (kcountHFpositivedirectionRecosignalD2 == 5)
5161  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
5162  if (kcountHFpositivedirectionRecosignalD2 == 6)
5163  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
5164  if (kcountHFpositivedirectionRecosignalD2 == 7)
5165  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
5166  if (kcountHFpositivedirectionRecosignalD2 == 8)
5167  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
5168  if (kcountHFpositivedirectionRecosignalD2 == 9)
5169  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
5170  if (kcountHFpositivedirectionRecosignalD2 == 10)
5171  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
5172  if (kcountHFpositivedirectionRecosignalD2 == 11)
5173  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
5174  if (kcountHFpositivedirectionRecosignalD2 == 12)
5175  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
5176  if (kcountHFpositivedirectionRecosignalD2 == 13)
5177  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
5178  HFpositivedirectionRecosignalD2->Draw("Error");
5179  kcountHFpositivedirectionRecosignalD2++;
5180  if (kcountHFpositivedirectionRecosignalD2 > 13)
5181  break; // 4x6 = 24
5182  } //ccctest>0
5183 
5184  } // for i
5185  } //if(jeta-41 >= 0)
5186  } //for jeta
5188  c3x5->Update();
5189  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
5190  c3x5->Clear();
5191  // clean-up
5192  if (h2CeffHFpositivedirectionRecosignalD2)
5193  delete h2CeffHFpositivedirectionRecosignalD2;
5194  //========================================================================================== 22222214
5195  //======================================================================
5196  //======================================================================1D plot: D vs phi , different eta, depth=1
5197  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
5198  c3x5->Clear();
5200  c3x5->Divide(3, 5);
5201  c3x5->cd(1);
5202  int kcountHFnegativedirectionRecosignalD1 = 1;
5203  TH1F* h2CeffHFnegativedirectionRecosignalD1 = new TH1F("h2CeffHFnegativedirectionRecosignalD1", "", nphi, 0., 72.);
5204 
5205  for (int jeta = 0; jeta < njeta; jeta++) {
5206  // negativedirectionRecosignalD:
5207  if (jeta - 41 < 0) {
5208  // for (int i=0;i<ndepth;i++) {
5209  // depth=1
5210  for (int i = 0; i < 1; i++) {
5211  TH1F* HFnegativedirectionRecosignalD1 = (TH1F*)h2CeffHFnegativedirectionRecosignalD1->Clone("twod1");
5212 
5213  float ccctest = 0; // to avoid empty massive elements
5214  for (int jphi = 0; jphi < nphi; jphi++) {
5215  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
5216  if (arecosignalHF[i][jeta][jphi] > 0.) {
5217  HFnegativedirectionRecosignalD1->Fill(jphi, ccc1);
5218  ccctest = 1.; //HFnegativedirectionRecosignalD1->SetBinError(i,0.01);
5219  }
5220  } // for jphi
5221  if (ccctest > 0.) {
5222  //cout<<"1414 kcountHFnegativedirectionRecosignalD1 = "<<kcountHFnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
5223  c3x5->cd(kcountHFnegativedirectionRecosignalD1);
5224  HFnegativedirectionRecosignalD1->SetMarkerStyle(20);
5225  HFnegativedirectionRecosignalD1->SetMarkerSize(0.4);
5226  HFnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
5227  HFnegativedirectionRecosignalD1->SetXTitle("HFnegativedirectionRecosignalD1 \b");
5228  HFnegativedirectionRecosignalD1->SetMarkerColor(2);
5229  HFnegativedirectionRecosignalD1->SetLineColor(0);
5230  gPad->SetGridy();
5231  gPad->SetGridx();
5232  // gPad->SetLogy();
5233  if (kcountHFnegativedirectionRecosignalD1 == 1)
5234  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
5235  if (kcountHFnegativedirectionRecosignalD1 == 2)
5236  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
5237  if (kcountHFnegativedirectionRecosignalD1 == 3)
5238  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
5239  if (kcountHFnegativedirectionRecosignalD1 == 4)
5240  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
5241  if (kcountHFnegativedirectionRecosignalD1 == 5)
5242  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
5243  if (kcountHFnegativedirectionRecosignalD1 == 6)
5244  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
5245  if (kcountHFnegativedirectionRecosignalD1 == 7)
5246  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
5247  if (kcountHFnegativedirectionRecosignalD1 == 8)
5248  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
5249  if (kcountHFnegativedirectionRecosignalD1 == 9)
5250  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
5251  if (kcountHFnegativedirectionRecosignalD1 == 10)
5252  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
5253  if (kcountHFnegativedirectionRecosignalD1 == 11)
5254  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
5255  if (kcountHFnegativedirectionRecosignalD1 == 12)
5256  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
5257  if (kcountHFnegativedirectionRecosignalD1 == 13)
5258  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
5259  HFnegativedirectionRecosignalD1->Draw("Error");
5260  kcountHFnegativedirectionRecosignalD1++;
5261  if (kcountHFnegativedirectionRecosignalD1 > 13)
5262  break; // 4x6 = 24
5263  } //ccctest>0
5264 
5265  } // for i
5266  } //if(jeta-41< 0)
5267  } //for jeta
5269  c3x5->Update();
5270  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
5271  c3x5->Clear();
5272  // clean-up
5273  if (h2CeffHFnegativedirectionRecosignalD1)
5274  delete h2CeffHFnegativedirectionRecosignalD1;
5275  //========================================================================================== 22222215
5276  //======================================================================
5277  //======================================================================1D plot: D vs phi , different eta, depth=2
5278  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
5279  c3x5->Clear();
5280  c3x5->Divide(3, 5);
5281  c3x5->cd(1);
5282  int kcountHFnegativedirectionRecosignalD2 = 1;
5283  TH1F* h2CeffHFnegativedirectionRecosignalD2 = new TH1F("h2CeffHFnegativedirectionRecosignalD2", "", nphi, 0., 72.);
5284 
5285  for (int jeta = 0; jeta < njeta; jeta++) {
5286  // negativedirectionRecosignalD:
5287  if (jeta - 41 < 0) {
5288  // for (int i=0;i<ndepth;i++) {
5289  // depth=2
5290  for (int i = 1; i < 2; i++) {
5291  TH1F* HFnegativedirectionRecosignalD2 = (TH1F*)h2CeffHFnegativedirectionRecosignalD2->Clone("twod1");
5292 
5293  float ccctest = 0; // to avoid empty massive elements
5294  for (int jphi = 0; jphi < nphi; jphi++) {
5295  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
5296  if (arecosignalHF[i][jeta][jphi] > 0.) {
5297  HFnegativedirectionRecosignalD2->Fill(jphi, ccc1);
5298  ccctest = 1.; //HFnegativedirectionRecosignalD2->SetBinError(i,0.01);
5299  }
5300  } // for jphi
5301  if (ccctest > 0.) {
5302  //cout<<"1515 kcountHFnegativedirectionRecosignalD2 = "<<kcountHFnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
5303  c3x5->cd(kcountHFnegativedirectionRecosignalD2);
5304  HFnegativedirectionRecosignalD2->SetMarkerStyle(20);
5305  HFnegativedirectionRecosignalD2->SetMarkerSize(0.4);
5306  HFnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
5307  HFnegativedirectionRecosignalD2->SetXTitle("HFnegativedirectionRecosignalD2 \b");
5308  HFnegativedirectionRecosignalD2->SetMarkerColor(2);
5309  HFnegativedirectionRecosignalD2->SetLineColor(0);
5310  gPad->SetGridy();
5311  gPad->SetGridx();
5312  // gPad->SetLogy();
5313  if (kcountHFnegativedirectionRecosignalD2 == 1)
5314  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
5315  if (kcountHFnegativedirectionRecosignalD2 == 2)
5316  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
5317  if (kcountHFnegativedirectionRecosignalD2 == 3)
5318  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
5319  if (kcountHFnegativedirectionRecosignalD2 == 4)
5320  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
5321  if (kcountHFnegativedirectionRecosignalD2 == 5)
5322  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
5323  if (kcountHFnegativedirectionRecosignalD2 == 6)
5324  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
5325  if (kcountHFnegativedirectionRecosignalD2 == 7)
5326  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
5327  if (kcountHFnegativedirectionRecosignalD2 == 8)
5328  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
5329  if (kcountHFnegativedirectionRecosignalD2 == 9)
5330  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
5331  if (kcountHFnegativedirectionRecosignalD2 == 10)
5332  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
5333  if (kcountHFnegativedirectionRecosignalD2 == 11)
5334  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
5335  if (kcountHFnegativedirectionRecosignalD2 == 12)
5336  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
5337  if (kcountHFnegativedirectionRecosignalD2 == 13)
5338  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
5339  HFnegativedirectionRecosignalD2->Draw("Error");
5340  kcountHFnegativedirectionRecosignalD2++;
5341  if (kcountHFnegativedirectionRecosignalD2 > 13)
5342  break; // 4x6 = 24
5343  } //ccctest>0
5344 
5345  } // for i
5346  } //if(jeta-41< 0)
5347  } //for jeta
5349  c3x5->Update();
5350  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
5351  c3x5->Clear();
5352  // clean-up
5353  if (h2CeffHFnegativedirectionRecosignalD2)
5354  delete h2CeffHFnegativedirectionRecosignalD2;
5355 
5356  //===================================================================== END of Recosignal HF for phi-symmetry
5357  //===================================================================== END of Recosignal HF for phi-symmetry
5358  //===================================================================== END of Recosignal HF for phi-symmetry
5359  //============================================================================================================ END of Recosignal for phi-symmetry
5360  //============================================================================================================ END of Recosignal for phi-symmetry
5361  //============================================================================================================ END of Recosignal for phi-symmetry
5362 
5369  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
5370  //ndepth = k_max[5];
5371  ndepth = 4;
5372  double areconoiseHB[ndepth][njeta][njphi];
5373  double breconoiseHB[ndepth][njeta][njphi];
5374  double reconoisevarianceHB[ndepth][njeta][njphi];
5375  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HB recNoiseEnergy
5376  TH2F* recNoiseEnergy1HB1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HB1");
5377  TH2F* recNoiseEnergy0HB1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB1");
5378  TH2F* recNoiseEnergyHB1 = (TH2F*)recNoiseEnergy1HB1->Clone("recNoiseEnergyHB1");
5379  recNoiseEnergyHB1->Divide(recNoiseEnergy1HB1, recNoiseEnergy0HB1, 1, 1, "B");
5380  TH2F* recNoiseEnergy1HB2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HB2");
5381  TH2F* recNoiseEnergy0HB2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB2");
5382  TH2F* recNoiseEnergyHB2 = (TH2F*)recNoiseEnergy1HB2->Clone("recNoiseEnergyHB2");
5383  recNoiseEnergyHB2->Divide(recNoiseEnergy1HB2, recNoiseEnergy0HB2, 1, 1, "B");
5384  TH2F* recNoiseEnergy1HB3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HB3");
5385  TH2F* recNoiseEnergy0HB3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB3");
5386  TH2F* recNoiseEnergyHB3 = (TH2F*)recNoiseEnergy1HB3->Clone("recNoiseEnergyHB3");
5387  recNoiseEnergyHB3->Divide(recNoiseEnergy1HB3, recNoiseEnergy0HB3, 1, 1, "B");
5388  TH2F* recNoiseEnergy1HB4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HB4");
5389  TH2F* recNoiseEnergy0HB4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB4");
5390  TH2F* recNoiseEnergyHB4 = (TH2F*)recNoiseEnergy1HB4->Clone("recNoiseEnergyHB4");
5391  recNoiseEnergyHB4->Divide(recNoiseEnergy1HB4, recNoiseEnergy0HB4, 1, 1, "B");
5392  for (int jeta = 0; jeta < njeta; jeta++) {
5393  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
5394  //====================================================================== PHI normalization & put R into massive areconoiseHB
5395  //preparation for PHI normalization:
5396  double sumreconoiseHB0 = 0;
5397  int nsumreconoiseHB0 = 0;
5398  double sumreconoiseHB1 = 0;
5399  int nsumreconoiseHB1 = 0;
5400  double sumreconoiseHB2 = 0;
5401  int nsumreconoiseHB2 = 0;
5402  double sumreconoiseHB3 = 0;
5403  int nsumreconoiseHB3 = 0;
5404  for (int jphi = 0; jphi < njphi; jphi++) {
5405  areconoiseHB[0][jeta][jphi] = recNoiseEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
5406  areconoiseHB[1][jeta][jphi] = recNoiseEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
5407  areconoiseHB[2][jeta][jphi] = recNoiseEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
5408  areconoiseHB[3][jeta][jphi] = recNoiseEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
5409  breconoiseHB[0][jeta][jphi] = recNoiseEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
5410  breconoiseHB[1][jeta][jphi] = recNoiseEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
5411  breconoiseHB[2][jeta][jphi] = recNoiseEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
5412  breconoiseHB[3][jeta][jphi] = recNoiseEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
5413  if (areconoiseHB[0][jeta][jphi] != 0.) {
5414  sumreconoiseHB0 += areconoiseHB[0][jeta][jphi];
5415  ++nsumreconoiseHB0;
5416  }
5417  if (areconoiseHB[1][jeta][jphi] != 0.) {
5418  sumreconoiseHB1 += areconoiseHB[1][jeta][jphi];
5419  ++nsumreconoiseHB1;
5420  }
5421  if (areconoiseHB[2][jeta][jphi] != 0.) {
5422  sumreconoiseHB2 += areconoiseHB[2][jeta][jphi];
5423  ++nsumreconoiseHB2;
5424  }
5425  if (areconoiseHB[3][jeta][jphi] != 0.) {
5426  sumreconoiseHB3 += areconoiseHB[3][jeta][jphi];
5427  ++nsumreconoiseHB3;
5428  }
5429  } // phi
5430  // PHI normalization: DIF
5431  for (int jphi = 0; jphi < njphi; jphi++) {
5432  if (sumreconoiseHB0 != 0.)
5433  breconoiseHB[0][jeta][jphi] -= (sumreconoiseHB0 / nsumreconoiseHB0);
5434  if (sumreconoiseHB1 != 0.)
5435  breconoiseHB[1][jeta][jphi] -= (sumreconoiseHB1 / nsumreconoiseHB1);
5436  if (sumreconoiseHB2 != 0.)
5437  breconoiseHB[2][jeta][jphi] -= (sumreconoiseHB2 / nsumreconoiseHB2);
5438  if (sumreconoiseHB3 != 0.)
5439  breconoiseHB[3][jeta][jphi] -= (sumreconoiseHB3 / nsumreconoiseHB3);
5440  } // phi
5441  // PHI normalization: R
5442  for (int jphi = 0; jphi < njphi; jphi++) {
5443  if (areconoiseHB[0][jeta][jphi] != 0.)
5444  areconoiseHB[0][jeta][jphi] /= (sumreconoiseHB0 / nsumreconoiseHB0);
5445  if (areconoiseHB[1][jeta][jphi] != 0.)
5446  areconoiseHB[1][jeta][jphi] /= (sumreconoiseHB1 / nsumreconoiseHB1);
5447  if (areconoiseHB[2][jeta][jphi] != 0.)
5448  areconoiseHB[2][jeta][jphi] /= (sumreconoiseHB2 / nsumreconoiseHB2);
5449  if (areconoiseHB[3][jeta][jphi] != 0.)
5450  areconoiseHB[3][jeta][jphi] /= (sumreconoiseHB3 / nsumreconoiseHB3);
5451  } // phi
5452  } //if eta
5453  } //eta
5454  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
5455  //======================================================================
5456  //======================================================================
5457  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
5458  c2x1->Clear();
5460  c2x1->Divide(2, 1);
5461  c2x1->cd(1);
5462  TH2F* GefzRreconoiseHB42D = new TH2F("GefzRreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
5463  TH2F* GefzRreconoiseHB42D0 = new TH2F("GefzRreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
5464  TH2F* GefzRreconoiseHB42DF = (TH2F*)GefzRreconoiseHB42D0->Clone("GefzRreconoiseHB42DF");
5465  for (int i = 0; i < ndepth; i++) {
5466  for (int jeta = 0; jeta < neta; jeta++) {
5467  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
5468  for (int jphi = 0; jphi < nphi; jphi++) {
5469  double ccc1 = areconoiseHB[i][jeta][jphi];
5470  int k2plot = jeta - 41;
5471  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
5472  if (ccc1 != 0.) {
5473  GefzRreconoiseHB42D->Fill(kkk, jphi, ccc1);
5474  GefzRreconoiseHB42D0->Fill(kkk, jphi, 1.);
5475  }
5476  }
5477  }
5478  }
5479  }
5480  GefzRreconoiseHB42DF->Divide(GefzRreconoiseHB42D, GefzRreconoiseHB42D0, 1, 1, "B"); // average A
5481  gPad->SetGridy();
5482  gPad->SetGridx(); // gPad->SetLogz();
5483  GefzRreconoiseHB42DF->SetXTitle("<R>_depth #eta \b");
5484  GefzRreconoiseHB42DF->SetYTitle(" #phi \b");
5485  GefzRreconoiseHB42DF->Draw("COLZ");
5486 
5487  c2x1->cd(2);
5488  TH1F* energyhitNoise_HB = (TH1F*)dir->FindObjectAny("h_energyhitNoise_HB");
5489  energyhitNoise_HB->SetMarkerStyle(20);
5490  energyhitNoise_HB->SetMarkerSize(0.4);
5491  energyhitNoise_HB->GetYaxis()->SetLabelSize(0.04);
5492  energyhitNoise_HB->SetXTitle("energyhitNoise_HB \b");
5493  energyhitNoise_HB->SetMarkerColor(2);
5494  energyhitNoise_HB->SetLineColor(0);
5495  gPad->SetGridy();
5496  gPad->SetGridx();
5497  energyhitNoise_HB->Draw("Error");
5498 
5500  c2x1->Update();
5501  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHB.png");
5502  c2x1->Clear();
5503  // clean-up
5504  if (GefzRreconoiseHB42D)
5505  delete GefzRreconoiseHB42D;
5506  if (GefzRreconoiseHB42D0)
5507  delete GefzRreconoiseHB42D0;
5508  if (GefzRreconoiseHB42DF)
5509  delete GefzRreconoiseHB42DF;
5510  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
5511  //======================================================================
5512  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
5513  c1x1->Clear();
5515  c1x1->Divide(1, 1);
5516  c1x1->cd(1);
5517  TH1F* GefzRreconoiseHB41D = new TH1F("GefzRreconoiseHB41D", "", nphi, 0., 72.);
5518  TH1F* GefzRreconoiseHB41D0 = new TH1F("GefzRreconoiseHB41D0", "", nphi, 0., 72.);
5519  TH1F* GefzRreconoiseHB41DF = (TH1F*)GefzRreconoiseHB41D0->Clone("GefzRreconoiseHB41DF");
5520  for (int jphi = 0; jphi < nphi; jphi++) {
5521  for (int jeta = 0; jeta < neta; jeta++) {
5522  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
5523  for (int i = 0; i < ndepth; i++) {
5524  double ccc1 = areconoiseHB[i][jeta][jphi];
5525  if (ccc1 != 0.) {
5526  GefzRreconoiseHB41D->Fill(jphi, ccc1);
5527  GefzRreconoiseHB41D0->Fill(jphi, 1.);
5528  }
5529  }
5530  }
5531  }
5532  }
5533  GefzRreconoiseHB41DF->Divide(GefzRreconoiseHB41D, GefzRreconoiseHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
5534  GefzRreconoiseHB41D0->Sumw2();
5535  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHB41DF->SetBinError(jphi,0.01);}
5536  gPad->SetGridy();
5537  gPad->SetGridx(); // gPad->SetLogz();
5538  GefzRreconoiseHB41DF->SetMarkerStyle(20);
5539  GefzRreconoiseHB41DF->SetMarkerSize(1.4);
5540  GefzRreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
5541  GefzRreconoiseHB41DF->SetXTitle("#phi \b");
5542  GefzRreconoiseHB41DF->SetYTitle(" <R> \b");
5543  GefzRreconoiseHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
5544  GefzRreconoiseHB41DF->SetMarkerColor(4);
5545  GefzRreconoiseHB41DF->SetLineColor(
5546  4); //GefzRreconoiseHB41DF->SetMinimum(0.8); // GefzRreconoiseHB41DF->SetMaximum(1.000);
5547  GefzRreconoiseHB41DF->Draw("Error");
5549  c1x1->Update();
5550  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHB.png");
5551  c1x1->Clear();
5552  // clean-up
5553  if (GefzRreconoiseHB41D)
5554  delete GefzRreconoiseHB41D;
5555  if (GefzRreconoiseHB41D0)
5556  delete GefzRreconoiseHB41D0;
5557  if (GefzRreconoiseHB41DF)
5558  delete GefzRreconoiseHB41DF;
5559  //========================================================================================== 4
5560  //======================================================================
5561  //======================================================================1D plot: R vs phi , different eta, depth=1
5562  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
5563  c3x5->Clear();
5565  c3x5->Divide(4, 4);
5566  c3x5->cd(1);
5567  int kcountHBpositivedirectionReconoise1 = 1;
5568  TH1F* h2CeffHBpositivedirectionReconoise1 = new TH1F("h2CeffHBpositivedirectionReconoise1", "", nphi, 0., 72.);
5569  for (int jeta = 0; jeta < njeta; jeta++) {
5570  // positivedirectionReconoise:
5571  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
5572  // for (int i=0;i<ndepth;i++) {
5573  // depth=1
5574  for (int i = 0; i < 1; i++) {
5575  TH1F* HBpositivedirectionReconoise1 = (TH1F*)h2CeffHBpositivedirectionReconoise1->Clone("twod1");
5576  float ccctest = 0; // to avoid empty massive elements
5577  for (int jphi = 0; jphi < nphi; jphi++) {
5578  double ccc1 = areconoiseHB[i][jeta][jphi];
5579  if (ccc1 != 0.) {
5580  HBpositivedirectionReconoise1->Fill(jphi, ccc1);
5581  ccctest = 1.; //HBpositivedirectionReconoise1->SetBinError(i,0.01);
5582  }
5583  } // for jphi
5584  if (ccctest > 0.) {
5585  // cout<<"444 kcountHBpositivedirectionReconoise1 = "<<kcountHBpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
5586  c3x5->cd(kcountHBpositivedirectionReconoise1);
5587  HBpositivedirectionReconoise1->SetMarkerStyle(20);
5588  HBpositivedirectionReconoise1->SetMarkerSize(0.4);
5589  HBpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
5590  HBpositivedirectionReconoise1->SetXTitle("HBpositivedirectionReconoise1 \b");
5591  HBpositivedirectionReconoise1->SetMarkerColor(2);
5592  HBpositivedirectionReconoise1->SetLineColor(0);
5593  gPad->SetGridy();
5594  gPad->SetGridx();
5595  // gPad->SetLogy();
5596  if (kcountHBpositivedirectionReconoise1 == 1)
5597  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
5598  if (kcountHBpositivedirectionReconoise1 == 2)
5599  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
5600  if (kcountHBpositivedirectionReconoise1 == 3)
5601  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
5602  if (kcountHBpositivedirectionReconoise1 == 4)
5603  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
5604  if (kcountHBpositivedirectionReconoise1 == 5)
5605  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
5606  if (kcountHBpositivedirectionReconoise1 == 6)
5607  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
5608  if (kcountHBpositivedirectionReconoise1 == 7)
5609  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
5610  if (kcountHBpositivedirectionReconoise1 == 8)
5611  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
5612  if (kcountHBpositivedirectionReconoise1 == 9)
5613  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
5614  if (kcountHBpositivedirectionReconoise1 == 10)
5615  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
5616  if (kcountHBpositivedirectionReconoise1 == 11)
5617  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
5618  if (kcountHBpositivedirectionReconoise1 == 12)
5619  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
5620  if (kcountHBpositivedirectionReconoise1 == 13)
5621  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
5622  if (kcountHBpositivedirectionReconoise1 == 14)
5623  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
5624  if (kcountHBpositivedirectionReconoise1 == 15)
5625  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
5626  if (kcountHBpositivedirectionReconoise1 == 16)
5627  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
5628  HBpositivedirectionReconoise1->Draw("Error");
5629  kcountHBpositivedirectionReconoise1++;
5630  if (kcountHBpositivedirectionReconoise1 > 16)
5631  break; //
5632  } //ccctest>0
5633 
5634  } // for i
5635  } //if(jeta-41 >= 0)
5636  } //for jeta
5638  c3x5->Update();
5639  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
5640  c3x5->Clear();
5641  // clean-up
5642  if (h2CeffHBpositivedirectionReconoise1)
5643  delete h2CeffHBpositivedirectionReconoise1;
5644 
5645  //========================================================================================== 5
5646  //======================================================================
5647  //======================================================================1D plot: R vs phi , different eta, depth=2
5648  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
5649  c3x5->Clear();
5651  c3x5->Divide(4, 4);
5652  c3x5->cd(1);
5653  int kcountHBpositivedirectionReconoise2 = 1;
5654  TH1F* h2CeffHBpositivedirectionReconoise2 = new TH1F("h2CeffHBpositivedirectionReconoise2", "", nphi, 0., 72.);
5655  for (int jeta = 0; jeta < njeta; jeta++) {
5656  // positivedirectionReconoise:
5657  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
5658  // for (int i=0;i<ndepth;i++) {
5659  // depth=2
5660  for (int i = 1; i < 2; i++) {
5661  TH1F* HBpositivedirectionReconoise2 = (TH1F*)h2CeffHBpositivedirectionReconoise2->Clone("twod1");
5662  float ccctest = 0; // to avoid empty massive elements
5663  for (int jphi = 0; jphi < nphi; jphi++) {
5664  double ccc1 = areconoiseHB[i][jeta][jphi];
5665  if (ccc1 != 0.) {
5666  HBpositivedirectionReconoise2->Fill(jphi, ccc1);
5667  ccctest = 1.; //HBpositivedirectionReconoise2->SetBinError(i,0.01);
5668  }
5669  } // for jphi
5670  if (ccctest > 0.) {
5671  //cout<<"555 kcountHBpositivedirectionReconoise2 = "<<kcountHBpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
5672  c3x5->cd(kcountHBpositivedirectionReconoise2);
5673  HBpositivedirectionReconoise2->SetMarkerStyle(20);
5674  HBpositivedirectionReconoise2->SetMarkerSize(0.4);
5675  HBpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
5676  HBpositivedirectionReconoise2->SetXTitle("HBpositivedirectionReconoise2 \b");
5677  HBpositivedirectionReconoise2->SetMarkerColor(2);
5678  HBpositivedirectionReconoise2->SetLineColor(0);
5679  gPad->SetGridy();
5680  gPad->SetGridx();
5681  // gPad->SetLogy();
5682  if (kcountHBpositivedirectionReconoise2 == 1)
5683  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
5684  if (kcountHBpositivedirectionReconoise2 == 2)
5685  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
5686  if (kcountHBpositivedirectionReconoise2 == 3)
5687  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
5688  if (kcountHBpositivedirectionReconoise2 == 4)
5689  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
5690  if (kcountHBpositivedirectionReconoise2 == 5)
5691  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
5692  if (kcountHBpositivedirectionReconoise2 == 6)
5693  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
5694  if (kcountHBpositivedirectionReconoise2 == 7)
5695  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
5696  if (kcountHBpositivedirectionReconoise2 == 8)
5697  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
5698  if (kcountHBpositivedirectionReconoise2 == 9)
5699  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
5700  if (kcountHBpositivedirectionReconoise2 == 10)
5701  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
5702  if (kcountHBpositivedirectionReconoise2 == 11)
5703  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
5704  if (kcountHBpositivedirectionReconoise2 == 12)
5705  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
5706  if (kcountHBpositivedirectionReconoise2 == 13)
5707  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
5708  if (kcountHBpositivedirectionReconoise2 == 14)
5709  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
5710  if (kcountHBpositivedirectionReconoise2 == 15)
5711  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
5712  if (kcountHBpositivedirectionReconoise2 == 16)
5713  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
5714  HBpositivedirectionReconoise2->Draw("Error");
5715  kcountHBpositivedirectionReconoise2++;
5716  if (kcountHBpositivedirectionReconoise2 > 16)
5717  break; // 4x6 = 24
5718  } //ccctest>0
5719 
5720  } // for i
5721  } //if(jeta-41 >= 0)
5722  } //for jeta
5724  c3x5->Update();
5725  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
5726  c3x5->Clear();
5727  // clean-up
5728  if (h2CeffHBpositivedirectionReconoise2)
5729  delete h2CeffHBpositivedirectionReconoise2;
5730  //========================================================================================== 6
5731  //======================================================================
5732  //======================================================================1D plot: R vs phi , different eta, depth=3
5733  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
5734  c3x5->Clear();
5736  c3x5->Divide(4, 4);
5737  c3x5->cd(1);
5738  int kcountHBpositivedirectionReconoise3 = 1;
5739  TH1F* h2CeffHBpositivedirectionReconoise3 = new TH1F("h2CeffHBpositivedirectionReconoise3", "", nphi, 0., 72.);
5740  for (int jeta = 0; jeta < njeta; jeta++) {
5741  // positivedirectionReconoise:
5742  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
5743  // for (int i=0;i<ndepth;i++) {
5744  // depth=3
5745  for (int i = 2; i < 3; i++) {
5746  TH1F* HBpositivedirectionReconoise3 = (TH1F*)h2CeffHBpositivedirectionReconoise3->Clone("twod1");
5747  float ccctest = 0; // to avoid empty massive elements
5748  for (int jphi = 0; jphi < nphi; jphi++) {
5749  double ccc1 = areconoiseHB[i][jeta][jphi];
5750  if (ccc1 != 0.) {
5751  HBpositivedirectionReconoise3->Fill(jphi, ccc1);
5752  ccctest = 1.; //HBpositivedirectionReconoise3->SetBinError(i,0.01);
5753  }
5754  } // for jphi
5755  if (ccctest > 0.) {
5756  //cout<<"666 kcountHBpositivedirectionReconoise3 = "<<kcountHBpositivedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
5757  c3x5->cd(kcountHBpositivedirectionReconoise3);
5758  HBpositivedirectionReconoise3->SetMarkerStyle(20);
5759  HBpositivedirectionReconoise3->SetMarkerSize(0.4);
5760  HBpositivedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
5761  HBpositivedirectionReconoise3->SetXTitle("HBpositivedirectionReconoise3 \b");
5762  HBpositivedirectionReconoise3->SetMarkerColor(2);
5763  HBpositivedirectionReconoise3->SetLineColor(0);
5764  gPad->SetGridy();
5765  gPad->SetGridx();
5766  // gPad->SetLogy();
5767  if (kcountHBpositivedirectionReconoise3 == 1)
5768  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
5769  if (kcountHBpositivedirectionReconoise3 == 2)
5770  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
5771  if (kcountHBpositivedirectionReconoise3 == 3)
5772  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
5773  if (kcountHBpositivedirectionReconoise3 == 4)
5774  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
5775  if (kcountHBpositivedirectionReconoise3 == 5)
5776  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
5777  if (kcountHBpositivedirectionReconoise3 == 6)
5778  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
5779  if (kcountHBpositivedirectionReconoise3 == 7)
5780  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
5781  if (kcountHBpositivedirectionReconoise3 == 8)
5782  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
5783  if (kcountHBpositivedirectionReconoise3 == 9)
5784  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
5785  if (kcountHBpositivedirectionReconoise3 == 10)
5786  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
5787  if (kcountHBpositivedirectionReconoise3 == 11)
5788  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
5789  if (kcountHBpositivedirectionReconoise3 == 12)
5790  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
5791  if (kcountHBpositivedirectionReconoise3 == 13)
5792  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
5793  if (kcountHBpositivedirectionReconoise3 == 14)
5794  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
5795  if (kcountHBpositivedirectionReconoise3 == 15)
5796  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
5797  if (kcountHBpositivedirectionReconoise3 == 16)
5798  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
5799  HBpositivedirectionReconoise3->Draw("Error");
5800  kcountHBpositivedirectionReconoise3++;
5801  if (kcountHBpositivedirectionReconoise3 > 16)
5802  break; // 4x6 = 24
5803  } //ccctest>0
5804 
5805  } // for i
5806  } //if(jeta-41 >= 0)
5807  } //for jeta
5809  c3x5->Update();
5810  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
5811  c3x5->Clear();
5812  // clean-up
5813  if (h2CeffHBpositivedirectionReconoise3)
5814  delete h2CeffHBpositivedirectionReconoise3;
5815  //========================================================================================== 7
5816  //======================================================================
5817  //======================================================================1D plot: R vs phi , different eta, depth=4
5818  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
5819  c3x5->Clear();
5821  c3x5->Divide(4, 4);
5822  c3x5->cd(1);
5823  int kcountHBpositivedirectionReconoise4 = 1;
5824  TH1F* h2CeffHBpositivedirectionReconoise4 = new TH1F("h2CeffHBpositivedirectionReconoise4", "", nphi, 0., 72.);
5825 
5826  for (int jeta = 0; jeta < njeta; jeta++) {
5827  // positivedirectionReconoise:
5828  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
5829  // for (int i=0;i<ndepth;i++) {
5830  // depth=4
5831  for (int i = 3; i < 4; i++) {
5832  TH1F* HBpositivedirectionReconoise4 = (TH1F*)h2CeffHBpositivedirectionReconoise4->Clone("twod1");
5833 
5834  float ccctest = 0; // to avoid empty massive elements
5835  for (int jphi = 0; jphi < nphi; jphi++) {
5836  double ccc1 = areconoiseHB[i][jeta][jphi];
5837  if (ccc1 != 0.) {
5838  HBpositivedirectionReconoise4->Fill(jphi, ccc1);
5839  ccctest = 1.; //HBpositivedirectionReconoise4->SetBinError(i,0.01);
5840  }
5841  } // for jphi
5842  if (ccctest > 0.) {
5843  //cout<<"777 kcountHBpositivedirectionReconoise4 = "<<kcountHBpositivedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
5844  c3x5->cd(kcountHBpositivedirectionReconoise4);
5845  HBpositivedirectionReconoise4->SetMarkerStyle(20);
5846  HBpositivedirectionReconoise4->SetMarkerSize(0.4);
5847  HBpositivedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
5848  HBpositivedirectionReconoise4->SetXTitle("HBpositivedirectionReconoise4 \b");
5849  HBpositivedirectionReconoise4->SetMarkerColor(2);
5850  HBpositivedirectionReconoise4->SetLineColor(0);
5851  gPad->SetGridy();
5852  gPad->SetGridx();
5853  // gPad->SetLogy();
5854  if (kcountHBpositivedirectionReconoise4 == 1)
5855  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
5856  if (kcountHBpositivedirectionReconoise4 == 2)
5857  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
5858  if (kcountHBpositivedirectionReconoise4 == 3)
5859  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
5860  if (kcountHBpositivedirectionReconoise4 == 4)
5861  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
5862  if (kcountHBpositivedirectionReconoise4 == 5)
5863  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
5864  if (kcountHBpositivedirectionReconoise4 == 6)
5865  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
5866  if (kcountHBpositivedirectionReconoise4 == 7)
5867  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
5868  if (kcountHBpositivedirectionReconoise4 == 8)
5869  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
5870  if (kcountHBpositivedirectionReconoise4 == 9)
5871  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
5872  if (kcountHBpositivedirectionReconoise4 == 10)
5873  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
5874  if (kcountHBpositivedirectionReconoise4 == 11)
5875  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
5876  if (kcountHBpositivedirectionReconoise4 == 12)
5877  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
5878  if (kcountHBpositivedirectionReconoise4 == 13)
5879  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
5880  if (kcountHBpositivedirectionReconoise4 == 14)
5881  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
5882  if (kcountHBpositivedirectionReconoise4 == 15)
5883  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
5884  if (kcountHBpositivedirectionReconoise4 == 16)
5885  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
5886  HBpositivedirectionReconoise4->Draw("Error");
5887  kcountHBpositivedirectionReconoise4++;
5888  if (kcountHBpositivedirectionReconoise4 > 16)
5889  break; // 4x6 = 24
5890  } //ccctest>0
5891 
5892  } // for i
5893  } //if(jeta-41 >= 0)
5894  } //for jeta
5896  c3x5->Update();
5897  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
5898  c3x5->Clear();
5899  // clean-up
5900  if (h2CeffHBpositivedirectionReconoise4)
5901  delete h2CeffHBpositivedirectionReconoise4;
5902 
5903  //========================================================================================== 1114
5904  //======================================================================
5905  //======================================================================1D plot: R vs phi , different eta, depth=1
5906  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
5907  c3x5->Clear();
5909  c3x5->Divide(4, 4);
5910  c3x5->cd(1);
5911  int kcountHBnegativedirectionReconoise1 = 1;
5912  TH1F* h2CeffHBnegativedirectionReconoise1 = new TH1F("h2CeffHBnegativedirectionReconoise1", "", nphi, 0., 72.);
5913  for (int jeta = 0; jeta < njeta; jeta++) {
5914  // negativedirectionReconoise:
5915  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
5916  // for (int i=0;i<ndepth;i++) {
5917  // depth=1
5918  for (int i = 0; i < 1; i++) {
5919  TH1F* HBnegativedirectionReconoise1 = (TH1F*)h2CeffHBnegativedirectionReconoise1->Clone("twod1");
5920  float ccctest = 0; // to avoid empty massive elements
5921  for (int jphi = 0; jphi < nphi; jphi++) {
5922  double ccc1 = areconoiseHB[i][jeta][jphi];
5923  if (ccc1 != 0.) {
5924  HBnegativedirectionReconoise1->Fill(jphi, ccc1);
5925  ccctest = 1.; //HBnegativedirectionReconoise1->SetBinError(i,0.01);
5926  }
5927  } // for jphi
5928  if (ccctest > 0.) {
5929  // cout<<"444 kcountHBnegativedirectionReconoise1 = "<<kcountHBnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
5930  c3x5->cd(kcountHBnegativedirectionReconoise1);
5931  HBnegativedirectionReconoise1->SetMarkerStyle(20);
5932  HBnegativedirectionReconoise1->SetMarkerSize(0.4);
5933  HBnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
5934  HBnegativedirectionReconoise1->SetXTitle("HBnegativedirectionReconoise1 \b");
5935  HBnegativedirectionReconoise1->SetMarkerColor(2);
5936  HBnegativedirectionReconoise1->SetLineColor(0);
5937  gPad->SetGridy();
5938  gPad->SetGridx();
5939  // gPad->SetLogy();
5940  if (kcountHBnegativedirectionReconoise1 == 1)
5941  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
5942  if (kcountHBnegativedirectionReconoise1 == 2)
5943  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
5944  if (kcountHBnegativedirectionReconoise1 == 3)
5945  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
5946  if (kcountHBnegativedirectionReconoise1 == 4)
5947  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
5948  if (kcountHBnegativedirectionReconoise1 == 5)
5949  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
5950  if (kcountHBnegativedirectionReconoise1 == 6)
5951  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
5952  if (kcountHBnegativedirectionReconoise1 == 7)
5953  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
5954  if (kcountHBnegativedirectionReconoise1 == 8)
5955  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
5956  if (kcountHBnegativedirectionReconoise1 == 9)
5957  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
5958  if (kcountHBnegativedirectionReconoise1 == 10)
5959  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
5960  if (kcountHBnegativedirectionReconoise1 == 11)
5961  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
5962  if (kcountHBnegativedirectionReconoise1 == 12)
5963  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
5964  if (kcountHBnegativedirectionReconoise1 == 13)
5965  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
5966  if (kcountHBnegativedirectionReconoise1 == 14)
5967  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
5968  if (kcountHBnegativedirectionReconoise1 == 15)
5969  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
5970  if (kcountHBnegativedirectionReconoise1 == 16)
5971  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
5972  HBnegativedirectionReconoise1->Draw("Error");
5973  kcountHBnegativedirectionReconoise1++;
5974  if (kcountHBnegativedirectionReconoise1 > 16)
5975  break; //
5976  } //ccctest>0
5977 
5978  } // for i
5979  } //if(jeta-41 < 0 )
5980  } //for jeta
5982  c3x5->Update();
5983  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
5984  c3x5->Clear();
5985  // clean-up
5986  if (h2CeffHBnegativedirectionReconoise1)
5987  delete h2CeffHBnegativedirectionReconoise1;
5988 
5989  //========================================================================================== 1115
5990  //======================================================================
5991  //======================================================================1D plot: R vs phi , different eta, depth=2
5992  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
5993  c3x5->Clear();
5995  c3x5->Divide(4, 4);
5996  c3x5->cd(1);
5997  int kcountHBnegativedirectionReconoise2 = 1;
5998  TH1F* h2CeffHBnegativedirectionReconoise2 = new TH1F("h2CeffHBnegativedirectionReconoise2", "", nphi, 0., 72.);
5999  for (int jeta = 0; jeta < njeta; jeta++) {
6000  // negativedirectionReconoise:
6001  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
6002  // for (int i=0;i<ndepth;i++) {
6003  // depth=2
6004  for (int i = 1; i < 2; i++) {
6005  TH1F* HBnegativedirectionReconoise2 = (TH1F*)h2CeffHBnegativedirectionReconoise2->Clone("twod1");
6006  float ccctest = 0; // to avoid empty massive elements
6007  for (int jphi = 0; jphi < nphi; jphi++) {
6008  double ccc1 = areconoiseHB[i][jeta][jphi];
6009  if (ccc1 != 0.) {
6010  HBnegativedirectionReconoise2->Fill(jphi, ccc1);
6011  ccctest = 1.; //HBnegativedirectionReconoise2->SetBinError(i,0.01);
6012  }
6013  } // for jphi
6014  if (ccctest > 0.) {
6015  //cout<<"555 kcountHBnegativedirectionReconoise2 = "<<kcountHBnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
6016  c3x5->cd(kcountHBnegativedirectionReconoise2);
6017  HBnegativedirectionReconoise2->SetMarkerStyle(20);
6018  HBnegativedirectionReconoise2->SetMarkerSize(0.4);
6019  HBnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
6020  HBnegativedirectionReconoise2->SetXTitle("HBnegativedirectionReconoise2 \b");
6021  HBnegativedirectionReconoise2->SetMarkerColor(2);
6022  HBnegativedirectionReconoise2->SetLineColor(0);
6023  gPad->SetGridy();
6024  gPad->SetGridx();
6025  // gPad->SetLogy();
6026  if (kcountHBnegativedirectionReconoise2 == 1)
6027  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
6028  if (kcountHBnegativedirectionReconoise2 == 2)
6029  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
6030  if (kcountHBnegativedirectionReconoise2 == 3)
6031  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
6032  if (kcountHBnegativedirectionReconoise2 == 4)
6033  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
6034  if (kcountHBnegativedirectionReconoise2 == 5)
6035  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
6036  if (kcountHBnegativedirectionReconoise2 == 6)
6037  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
6038  if (kcountHBnegativedirectionReconoise2 == 7)
6039  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
6040  if (kcountHBnegativedirectionReconoise2 == 8)
6041  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
6042  if (kcountHBnegativedirectionReconoise2 == 9)
6043  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
6044  if (kcountHBnegativedirectionReconoise2 == 10)
6045  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
6046  if (kcountHBnegativedirectionReconoise2 == 11)
6047  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
6048  if (kcountHBnegativedirectionReconoise2 == 12)
6049  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
6050  if (kcountHBnegativedirectionReconoise2 == 13)
6051  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
6052  if (kcountHBnegativedirectionReconoise2 == 14)
6053  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
6054  if (kcountHBnegativedirectionReconoise2 == 15)
6055  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
6056  if (kcountHBnegativedirectionReconoise2 == 16)
6057  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
6058  HBnegativedirectionReconoise2->Draw("Error");
6059  kcountHBnegativedirectionReconoise2++;
6060  if (kcountHBnegativedirectionReconoise2 > 16)
6061  break; // 4x6 = 24
6062  } //ccctest>0
6063 
6064  } // for i
6065  } //if(jeta-41 < 0 )
6066  } //for jeta
6068  c3x5->Update();
6069  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
6070  c3x5->Clear();
6071  // clean-up
6072  if (h2CeffHBnegativedirectionReconoise2)
6073  delete h2CeffHBnegativedirectionReconoise2;
6074  //========================================================================================== 1116
6075  //======================================================================
6076  //======================================================================1D plot: R vs phi , different eta, depth=3
6077  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
6078  c3x5->Clear();
6080  c3x5->Divide(4, 4);
6081  c3x5->cd(1);
6082  int kcountHBnegativedirectionReconoise3 = 1;
6083  TH1F* h2CeffHBnegativedirectionReconoise3 = new TH1F("h2CeffHBnegativedirectionReconoise3", "", nphi, 0., 72.);
6084  for (int jeta = 0; jeta < njeta; jeta++) {
6085  // negativedirectionReconoise:
6086  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
6087  // for (int i=0;i<ndepth;i++) {
6088  // depth=3
6089  for (int i = 2; i < 3; i++) {
6090  TH1F* HBnegativedirectionReconoise3 = (TH1F*)h2CeffHBnegativedirectionReconoise3->Clone("twod1");
6091  float ccctest = 0; // to avoid empty massive elements
6092  for (int jphi = 0; jphi < nphi; jphi++) {
6093  double ccc1 = areconoiseHB[i][jeta][jphi];
6094  if (ccc1 != 0.) {
6095  HBnegativedirectionReconoise3->Fill(jphi, ccc1);
6096  ccctest = 1.; //HBnegativedirectionReconoise3->SetBinError(i,0.01);
6097  }
6098  } // for jphi
6099  if (ccctest > 0.) {
6100  //cout<<"666 kcountHBnegativedirectionReconoise3 = "<<kcountHBnegativedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
6101  c3x5->cd(kcountHBnegativedirectionReconoise3);
6102  HBnegativedirectionReconoise3->SetMarkerStyle(20);
6103  HBnegativedirectionReconoise3->SetMarkerSize(0.4);
6104  HBnegativedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
6105  HBnegativedirectionReconoise3->SetXTitle("HBnegativedirectionReconoise3 \b");
6106  HBnegativedirectionReconoise3->SetMarkerColor(2);
6107  HBnegativedirectionReconoise3->SetLineColor(0);
6108  gPad->SetGridy();
6109  gPad->SetGridx();
6110  // gPad->SetLogy();
6111  if (kcountHBnegativedirectionReconoise3 == 1)
6112  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
6113  if (kcountHBnegativedirectionReconoise3 == 2)
6114  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
6115  if (kcountHBnegativedirectionReconoise3 == 3)
6116  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
6117  if (kcountHBnegativedirectionReconoise3 == 4)
6118  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
6119  if (kcountHBnegativedirectionReconoise3 == 5)
6120  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
6121  if (kcountHBnegativedirectionReconoise3 == 6)
6122  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
6123  if (kcountHBnegativedirectionReconoise3 == 7)
6124  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
6125  if (kcountHBnegativedirectionReconoise3 == 8)
6126  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
6127  if (kcountHBnegativedirectionReconoise3 == 9)
6128  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
6129  if (kcountHBnegativedirectionReconoise3 == 10)
6130  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
6131  if (kcountHBnegativedirectionReconoise3 == 11)
6132  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
6133  if (kcountHBnegativedirectionReconoise3 == 12)
6134  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
6135  if (kcountHBnegativedirectionReconoise3 == 13)
6136  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
6137  if (kcountHBnegativedirectionReconoise3 == 14)
6138  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
6139  if (kcountHBnegativedirectionReconoise3 == 15)
6140  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
6141  if (kcountHBnegativedirectionReconoise3 == 16)
6142  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
6143 
6144  HBnegativedirectionReconoise3->Draw("Error");
6145  kcountHBnegativedirectionReconoise3++;
6146  if (kcountHBnegativedirectionReconoise3 > 16)
6147  break; // 4x6 = 24
6148  } //ccctest>0
6149 
6150  } // for i
6151  } //if(jeta-41 < 0 )
6152  } //for jeta
6154  c3x5->Update();
6155  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
6156  c3x5->Clear();
6157  // clean-up
6158  if (h2CeffHBnegativedirectionReconoise3)
6159  delete h2CeffHBnegativedirectionReconoise3;
6160  //========================================================================================== 1117
6161  //======================================================================
6162  //======================================================================1D plot: R vs phi , different eta, depth=4
6163  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
6164  c3x5->Clear();
6166  c3x5->Divide(4, 4);
6167  c3x5->cd(1);
6168  int kcountHBnegativedirectionReconoise4 = 1;
6169  TH1F* h2CeffHBnegativedirectionReconoise4 = new TH1F("h2CeffHBnegativedirectionReconoise4", "", nphi, 0., 72.);
6170 
6171  for (int jeta = 0; jeta < njeta; jeta++) {
6172  // negativedirectionReconoise:
6173  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
6174  // for (int i=0;i<ndepth;i++) {
6175  // depth=4
6176  for (int i = 3; i < 4; i++) {
6177  TH1F* HBnegativedirectionReconoise4 = (TH1F*)h2CeffHBnegativedirectionReconoise4->Clone("twod1");
6178 
6179  float ccctest = 0; // to avoid empty massive elements
6180  for (int jphi = 0; jphi < nphi; jphi++) {
6181  double ccc1 = areconoiseHB[i][jeta][jphi];
6182  if (ccc1 != 0.) {
6183  HBnegativedirectionReconoise4->Fill(jphi, ccc1);
6184  ccctest = 1.; //HBnegativedirectionReconoise4->SetBinError(i,0.01);
6185  }
6186  } // for jphi
6187  if (ccctest > 0.) {
6188  //cout<<"777 kcountHBnegativedirectionReconoise4 = "<<kcountHBnegativedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
6189  c3x5->cd(kcountHBnegativedirectionReconoise4);
6190  HBnegativedirectionReconoise4->SetMarkerStyle(20);
6191  HBnegativedirectionReconoise4->SetMarkerSize(0.4);
6192  HBnegativedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
6193  HBnegativedirectionReconoise4->SetXTitle("HBnegativedirectionReconoise4 \b");
6194  HBnegativedirectionReconoise4->SetMarkerColor(2);
6195  HBnegativedirectionReconoise4->SetLineColor(0);
6196  gPad->SetGridy();
6197  gPad->SetGridx();
6198  // gPad->SetLogy();
6199  if (kcountHBnegativedirectionReconoise4 == 1)
6200  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
6201  if (kcountHBnegativedirectionReconoise4 == 2)
6202  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
6203  if (kcountHBnegativedirectionReconoise4 == 3)
6204  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
6205  if (kcountHBnegativedirectionReconoise4 == 4)
6206  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
6207  if (kcountHBnegativedirectionReconoise4 == 5)
6208  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
6209  if (kcountHBnegativedirectionReconoise4 == 6)
6210  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
6211  if (kcountHBnegativedirectionReconoise4 == 7)
6212  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
6213  if (kcountHBnegativedirectionReconoise4 == 8)
6214  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
6215  if (kcountHBnegativedirectionReconoise4 == 9)
6216  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
6217  if (kcountHBnegativedirectionReconoise4 == 10)
6218  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
6219  if (kcountHBnegativedirectionReconoise4 == 11)
6220  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
6221  if (kcountHBnegativedirectionReconoise4 == 12)
6222  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
6223  if (kcountHBnegativedirectionReconoise4 == 13)
6224  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
6225  if (kcountHBnegativedirectionReconoise4 == 14)
6226  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
6227  if (kcountHBnegativedirectionReconoise4 == 15)
6228  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
6229  if (kcountHBnegativedirectionReconoise4 == 16)
6230  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
6231  HBnegativedirectionReconoise4->Draw("Error");
6232  kcountHBnegativedirectionReconoise4++;
6233  if (kcountHBnegativedirectionReconoise4 > 16)
6234  break; // 4x6 = 24
6235  } //ccctest>0
6236 
6237  } // for i
6238  } //if(jeta-41 < 0 )
6239  } //for jeta
6241  c3x5->Update();
6242  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
6243  c3x5->Clear();
6244  // clean-up
6245  if (h2CeffHBnegativedirectionReconoise4)
6246  delete h2CeffHBnegativedirectionReconoise4;
6247 
6248  //======================================================================================================================
6249  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HE
6250  //======================================================================================================================
6251  //======================================================================
6252  //cout<<" R2D-eta/phi-plot: DIF, averaged over depthfs *****" <<endl;
6253  c2x1->Clear();
6255  c2x1->Divide(2, 1);
6256  c2x1->cd(1);
6257  TH2F* GefzDIFreconoiseHB42D = new TH2F("GefzDIFreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
6258  TH2F* GefzDIFreconoiseHB42D0 = new TH2F("GefzDIFreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
6259  TH2F* GefzDIFreconoiseHB42DF = (TH2F*)GefzDIFreconoiseHB42D0->Clone("GefzDIFreconoiseHB42DF");
6260  for (int i = 0; i < ndepth; i++) {
6261  for (int jeta = 0; jeta < neta; jeta++) {
6262  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
6263  for (int jphi = 0; jphi < nphi; jphi++) {
6264  double ccc1 = breconoiseHB[i][jeta][jphi];
6265  int k2plot = jeta - 41;
6266  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
6267  if (ccc1 != 0.) {
6268  GefzDIFreconoiseHB42D->Fill(kkk, jphi, ccc1);
6269  GefzDIFreconoiseHB42D0->Fill(kkk, jphi, 1.);
6270  }
6271  }
6272  }
6273  }
6274  }
6275  GefzDIFreconoiseHB42DF->Divide(GefzDIFreconoiseHB42D, GefzDIFreconoiseHB42D0, 1, 1, "B"); // average A
6276  gPad->SetGridy();
6277  gPad->SetGridx(); // gPad->SetLogz();
6278  GefzDIFreconoiseHB42DF->SetXTitle("<DIF>_depth #eta \b");
6279  GefzDIFreconoiseHB42DF->SetYTitle(" #phi \b");
6280  GefzDIFreconoiseHB42DF->Draw("COLZ");
6281 
6282  // c2x1->cd(2);
6283  // TH1F *energyhitNoise_HB= (TH1F*)dir->FindObjectAny("h_energyhitNoise_HB");
6284  // 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");
6285 
6287  c2x1->Update();
6288  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHB.png");
6289  c2x1->Clear();
6290  // clean-up
6291  if (GefzDIFreconoiseHB42D)
6292  delete GefzDIFreconoiseHB42D;
6293  if (GefzDIFreconoiseHB42D0)
6294  delete GefzDIFreconoiseHB42D0;
6295  if (GefzDIFreconoiseHB42DF)
6296  delete GefzDIFreconoiseHB42DF;
6297  //====================================================================== 1D plot: DIF vs phi , averaged over depthfs & eta
6298  //======================================================================
6299  //cout<<" 1D plot: DIF vs phi , averaged over depthfs & eta *****" <<endl;
6300  c1x1->Clear();
6302  c1x1->Divide(1, 1);
6303  c1x1->cd(1);
6304  TH1F* GefzDIFreconoiseHB41D = new TH1F("GefzDIFreconoiseHB41D", "", nphi, 0., 72.);
6305  TH1F* GefzDIFreconoiseHB41D0 = new TH1F("GefzDIFreconoiseHB41D0", "", nphi, 0., 72.);
6306  TH1F* GefzDIFreconoiseHB41DF = (TH1F*)GefzDIFreconoiseHB41D0->Clone("GefzDIFreconoiseHB41DF");
6307  for (int jphi = 0; jphi < nphi; jphi++) {
6308  for (int jeta = 0; jeta < neta; jeta++) {
6309  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
6310  for (int i = 0; i < ndepth; i++) {
6311  double ccc1 = breconoiseHB[i][jeta][jphi];
6312  if (ccc1 != 0.) {
6313  GefzDIFreconoiseHB41D->Fill(jphi, ccc1);
6314  GefzDIFreconoiseHB41D0->Fill(jphi, 1.);
6315  }
6316  }
6317  }
6318  }
6319  }
6320  GefzDIFreconoiseHB41DF->Divide(
6321  GefzDIFreconoiseHB41D, GefzDIFreconoiseHB41D0, 1, 1, "B"); // DIF averaged over depthfs & eta
6322  GefzDIFreconoiseHB41D0->Sumw2();
6323  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHB41DF->SetBinError(jphi,0.01);}
6324  gPad->SetGridy();
6325  gPad->SetGridx(); // gPad->SetLogz();
6326  GefzDIFreconoiseHB41DF->SetMarkerStyle(20);
6327  GefzDIFreconoiseHB41DF->SetMarkerSize(1.4);
6328  GefzDIFreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
6329  GefzDIFreconoiseHB41DF->SetXTitle("#phi \b");
6330  GefzDIFreconoiseHB41DF->SetYTitle(" <DIF> \b");
6331  GefzDIFreconoiseHB41DF->SetZTitle("<DIF>_PHI - AllDepthfs \b");
6332  GefzDIFreconoiseHB41DF->SetMarkerColor(4);
6333  GefzDIFreconoiseHB41DF->SetLineColor(
6334  4); //GefzDIFreconoiseHB41DF->SetMinimum(0.8); // GefzDIFreconoiseHB41DF->SetMaximum(1.000);
6335  GefzDIFreconoiseHB41DF->Draw("Error");
6337  c1x1->Update();
6338  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHB.png");
6339  c1x1->Clear();
6340  // clean-up
6341  if (GefzDIFreconoiseHB41D)
6342  delete GefzDIFreconoiseHB41D;
6343  if (GefzDIFreconoiseHB41D0)
6344  delete GefzDIFreconoiseHB41D0;
6345  if (GefzDIFreconoiseHB41DF)
6346  delete GefzDIFreconoiseHB41DF;
6347  //========================================================================================== 4
6348  //======================================================================
6349  //======================================================================1D plot: DIF vs phi , different eta, depth=1
6350  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
6351  c3x5->Clear();
6353  c3x5->Divide(4, 4);
6354  c3x5->cd(1);
6355  int kcountHBpositivedirectionReconoiseDIF1 = 1;
6356  TH1F* h2CeffHBpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
6357  for (int jeta = 0; jeta < njeta; jeta++) {
6358  // positivedirectionReconoiseDIF:
6359  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
6360  // for (int i=0;i<ndepth;i++) {
6361  // depth=1
6362  for (int i = 0; i < 1; i++) {
6363  TH1F* HBpositivedirectionReconoiseDIF1 = (TH1F*)h2CeffHBpositivedirectionReconoiseDIF1->Clone("twod1");
6364  float ccctest = 0; // to avoid empty massive elements
6365  for (int jphi = 0; jphi < nphi; jphi++) {
6366  double ccc1 = breconoiseHB[i][jeta][jphi];
6367  if (ccc1 != 0.) {
6368  HBpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
6369  ccctest = 1.; //HBpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
6370  }
6371  } // for jphi
6372  if (ccctest > 0.) {
6373  // cout<<"444 kcountHBpositivedirectionReconoiseDIF1 = "<<kcountHBpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
6374  c3x5->cd(kcountHBpositivedirectionReconoiseDIF1);
6375  HBpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
6376  HBpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
6377  HBpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
6378  HBpositivedirectionReconoiseDIF1->SetXTitle("HBpositivedirectionReconoiseDIF1 \b");
6379  HBpositivedirectionReconoiseDIF1->SetMarkerColor(2);
6380  HBpositivedirectionReconoiseDIF1->SetLineColor(0);
6381  gPad->SetGridy();
6382  gPad->SetGridx();
6383  // gPad->SetLogy();
6384  if (kcountHBpositivedirectionReconoiseDIF1 == 1)
6385  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 0; depth = 1 \b");
6386  if (kcountHBpositivedirectionReconoiseDIF1 == 2)
6387  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 1; depth = 1 \b");
6388  if (kcountHBpositivedirectionReconoiseDIF1 == 3)
6389  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 2; depth = 1 \b");
6390  if (kcountHBpositivedirectionReconoiseDIF1 == 4)
6391  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 3; depth = 1 \b");
6392  if (kcountHBpositivedirectionReconoiseDIF1 == 5)
6393  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 4; depth = 1 \b");
6394  if (kcountHBpositivedirectionReconoiseDIF1 == 6)
6395  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 5; depth = 1 \b");
6396  if (kcountHBpositivedirectionReconoiseDIF1 == 7)
6397  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 6; depth = 1 \b");
6398  if (kcountHBpositivedirectionReconoiseDIF1 == 8)
6399  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 7; depth = 1 \b");
6400  if (kcountHBpositivedirectionReconoiseDIF1 == 9)
6401  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 8; depth = 1 \b");
6402  if (kcountHBpositivedirectionReconoiseDIF1 == 10)
6403  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 9; depth = 1 \b");
6404  if (kcountHBpositivedirectionReconoiseDIF1 == 11)
6405  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 10; depth = 1 \b");
6406  if (kcountHBpositivedirectionReconoiseDIF1 == 12)
6407  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 11; depth = 1 \b");
6408  if (kcountHBpositivedirectionReconoiseDIF1 == 13)
6409  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 12; depth = 1 \b");
6410  if (kcountHBpositivedirectionReconoiseDIF1 == 14)
6411  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 13; depth = 1 \b");
6412  if (kcountHBpositivedirectionReconoiseDIF1 == 15)
6413  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 14; depth = 1 \b");
6414  if (kcountHBpositivedirectionReconoiseDIF1 == 16)
6415  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 15; depth = 1 \b");
6416  HBpositivedirectionReconoiseDIF1->Draw("Error");
6417  kcountHBpositivedirectionReconoiseDIF1++;
6418  if (kcountHBpositivedirectionReconoiseDIF1 > 16)
6419  break; //
6420  } //ccctest>0
6421 
6422  } // for i
6423  } //if(jeta-41 >= 0)
6424  } //for jeta
6426  c3x5->Update();
6427  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
6428  c3x5->Clear();
6429  // clean-up
6430  if (h2CeffHBpositivedirectionReconoiseDIF1)
6431  delete h2CeffHBpositivedirectionReconoiseDIF1;
6432 
6433  //========================================================================================== 5
6434  //======================================================================
6435  //======================================================================1D plot: R vs phi , different eta, depth=2
6436  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
6437  c3x5->Clear();
6439  c3x5->Divide(4, 4);
6440  c3x5->cd(1);
6441  int kcountHBpositivedirectionReconoiseDIF2 = 1;
6442  TH1F* h2CeffHBpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
6443  for (int jeta = 0; jeta < njeta; jeta++) {
6444  // positivedirectionReconoiseDIF:
6445  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
6446  // for (int i=0;i<ndepth;i++) {
6447  // depth=2
6448  for (int i = 1; i < 2; i++) {
6449  TH1F* HBpositivedirectionReconoiseDIF2 = (TH1F*)h2CeffHBpositivedirectionReconoiseDIF2->Clone("twod1");
6450  float ccctest = 0; // to avoid empty massive elements
6451  for (int jphi = 0; jphi < nphi; jphi++) {
6452  double ccc1 = breconoiseHB[i][jeta][jphi];
6453  if (ccc1 != 0.) {
6454  HBpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
6455  ccctest = 1.; //HBpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
6456  }
6457  } // for jphi
6458  if (ccctest > 0.) {
6459  //cout<<"555 kcountHBpositivedirectionReconoiseDIF2 = "<<kcountHBpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
6460  c3x5->cd(kcountHBpositivedirectionReconoiseDIF2);
6461  HBpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
6462  HBpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
6463  HBpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
6464  HBpositivedirectionReconoiseDIF2->SetXTitle("HBpositivedirectionReconoiseDIF2 \b");
6465  HBpositivedirectionReconoiseDIF2->SetMarkerColor(2);
6466  HBpositivedirectionReconoiseDIF2->SetLineColor(0);
6467  gPad->SetGridy();
6468  gPad->SetGridx();
6469  // gPad->SetLogy();
6470  if (kcountHBpositivedirectionReconoiseDIF2 == 1)
6471  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 0; depth = 2 \b");
6472  if (kcountHBpositivedirectionReconoiseDIF2 == 2)
6473  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 1; depth = 2 \b");
6474  if (kcountHBpositivedirectionReconoiseDIF2 == 3)
6475  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 2; depth = 2 \b");
6476  if (kcountHBpositivedirectionReconoiseDIF2 == 4)
6477  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 3; depth = 2 \b");
6478  if (kcountHBpositivedirectionReconoiseDIF2 == 5)
6479  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 4; depth = 2 \b");
6480  if (kcountHBpositivedirectionReconoiseDIF2 == 6)
6481  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 5; depth = 2 \b");
6482  if (kcountHBpositivedirectionReconoiseDIF2 == 7)
6483  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 6; depth = 2 \b");
6484  if (kcountHBpositivedirectionReconoiseDIF2 == 8)
6485  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 7; depth = 2 \b");
6486  if (kcountHBpositivedirectionReconoiseDIF2 == 9)
6487  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 8; depth = 2 \b");
6488  if (kcountHBpositivedirectionReconoiseDIF2 == 10)
6489  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 9; depth = 2 \b");
6490  if (kcountHBpositivedirectionReconoiseDIF2 == 11)
6491  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 10; depth = 2 \b");
6492  if (kcountHBpositivedirectionReconoiseDIF2 == 12)
6493  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 11; depth = 2 \b");
6494  if (kcountHBpositivedirectionReconoiseDIF2 == 13)
6495  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 12; depth = 2 \b");
6496  if (kcountHBpositivedirectionReconoiseDIF2 == 14)
6497  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 13; depth = 2 \b");
6498  if (kcountHBpositivedirectionReconoiseDIF2 == 15)
6499  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 14; depth = 2 \b");
6500  if (kcountHBpositivedirectionReconoiseDIF2 == 16)
6501  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 15; depth = 2 \b");
6502  HBpositivedirectionReconoiseDIF2->Draw("Error");
6503  kcountHBpositivedirectionReconoiseDIF2++;
6504  if (kcountHBpositivedirectionReconoiseDIF2 > 16)
6505  break; // 4x6 = 24
6506  } //ccctest>0
6507 
6508  } // for i
6509  } //if(jeta-41 >= 0)
6510  } //for jeta
6512  c3x5->Update();
6513  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
6514  c3x5->Clear();
6515  // clean-up
6516  if (h2CeffHBpositivedirectionReconoiseDIF2)
6517  delete h2CeffHBpositivedirectionReconoiseDIF2;
6518  //========================================================================================== 6
6519  //======================================================================
6520  //======================================================================1D plot: R vs phi , different eta, depth=3
6521  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
6522  c3x5->Clear();
6524  c3x5->Divide(4, 4);
6525  c3x5->cd(1);
6526  int kcountHBpositivedirectionReconoiseDIF3 = 1;
6527  TH1F* h2CeffHBpositivedirectionReconoiseDIF3 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF3", "", nphi, 0., 72.);
6528  for (int jeta = 0; jeta < njeta; jeta++) {
6529  // positivedirectionReconoiseDIF:
6530  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
6531  // for (int i=0;i<ndepth;i++) {
6532  // depth=3
6533  for (int i = 2; i < 3; i++) {
6534  TH1F* HBpositivedirectionReconoiseDIF3 = (TH1F*)h2CeffHBpositivedirectionReconoiseDIF3->Clone("twod1");
6535  float ccctest = 0; // to avoid empty massive elements
6536  for (int jphi = 0; jphi < nphi; jphi++) {
6537  double ccc1 = breconoiseHB[i][jeta][jphi];
6538  if (ccc1 != 0.) {
6539  HBpositivedirectionReconoiseDIF3->Fill(jphi, ccc1);
6540  ccctest = 1.; //HBpositivedirectionReconoiseDIF3->SetBinError(i,0.01);
6541  }
6542  } // for jphi
6543  if (ccctest > 0.) {
6544  //cout<<"666 kcountHBpositivedirectionReconoiseDIF3 = "<<kcountHBpositivedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
6545  c3x5->cd(kcountHBpositivedirectionReconoiseDIF3);
6546  HBpositivedirectionReconoiseDIF3->SetMarkerStyle(20);
6547  HBpositivedirectionReconoiseDIF3->SetMarkerSize(0.4);
6548  HBpositivedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
6549  HBpositivedirectionReconoiseDIF3->SetXTitle("HBpositivedirectionReconoiseDIF3 \b");
6550  HBpositivedirectionReconoiseDIF3->SetMarkerColor(2);
6551  HBpositivedirectionReconoiseDIF3->SetLineColor(0);
6552  gPad->SetGridy();
6553  gPad->SetGridx();
6554  // gPad->SetLogy();
6555  if (kcountHBpositivedirectionReconoiseDIF3 == 1)
6556  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 0; depth = 3 \b");
6557  if (kcountHBpositivedirectionReconoiseDIF3 == 2)
6558  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 1; depth = 3 \b");
6559  if (kcountHBpositivedirectionReconoiseDIF3 == 3)
6560  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 2; depth = 3 \b");
6561  if (kcountHBpositivedirectionReconoiseDIF3 == 4)
6562  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 3; depth = 3 \b");
6563  if (kcountHBpositivedirectionReconoiseDIF3 == 5)
6564  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 4; depth = 3 \b");
6565  if (kcountHBpositivedirectionReconoiseDIF3 == 6)
6566  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 5; depth = 3 \b");
6567  if (kcountHBpositivedirectionReconoiseDIF3 == 7)
6568  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 6; depth = 3 \b");
6569  if (kcountHBpositivedirectionReconoiseDIF3 == 8)
6570  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 7; depth = 3 \b");
6571  if (kcountHBpositivedirectionReconoiseDIF3 == 9)
6572  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 8; depth = 3 \b");
6573  if (kcountHBpositivedirectionReconoiseDIF3 == 10)
6574  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 9; depth = 3 \b");
6575  if (kcountHBpositivedirectionReconoiseDIF3 == 11)
6576  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 0; depth = 3 \b");
6577  if (kcountHBpositivedirectionReconoiseDIF3 == 12)
6578  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 11; depth = 3 \b");
6579  if (kcountHBpositivedirectionReconoiseDIF3 == 13)
6580  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 12; depth = 3 \b");
6581  if (kcountHBpositivedirectionReconoiseDIF3 == 14)
6582  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 13; depth = 3 \b");
6583  if (kcountHBpositivedirectionReconoiseDIF3 == 15)
6584  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 14; depth = 3 \b");
6585  if (kcountHBpositivedirectionReconoiseDIF3 == 16)
6586  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 15; depth = 3 \b");
6587  HBpositivedirectionReconoiseDIF3->Draw("Error");
6588  kcountHBpositivedirectionReconoiseDIF3++;
6589  if (kcountHBpositivedirectionReconoiseDIF3 > 16)
6590  break; // 4x6 = 24
6591  } //ccctest>0
6592 
6593  } // for i
6594  } //if(jeta-41 >= 0)
6595  } //for jeta
6597  c3x5->Update();
6598  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
6599  c3x5->Clear();
6600  // clean-up
6601  if (h2CeffHBpositivedirectionReconoiseDIF3)
6602  delete h2CeffHBpositivedirectionReconoiseDIF3;
6603  //========================================================================================== 7
6604  //======================================================================
6605  //======================================================================1D plot: R vs phi , different eta, depth=4
6606  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
6607  c3x5->Clear();
6609  c3x5->Divide(4, 4);
6610  c3x5->cd(1);
6611  int kcountHBpositivedirectionReconoiseDIF4 = 1;
6612  TH1F* h2CeffHBpositivedirectionReconoiseDIF4 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF4", "", nphi, 0., 72.);
6613 
6614  for (int jeta = 0; jeta < njeta; jeta++) {
6615  // positivedirectionReconoiseDIF:
6616  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
6617  // for (int i=0;i<ndepth;i++) {
6618  // depth=4
6619  for (int i = 3; i < 4; i++) {
6620  TH1F* HBpositivedirectionReconoiseDIF4 = (TH1F*)h2CeffHBpositivedirectionReconoiseDIF4->Clone("twod1");
6621 
6622  float ccctest = 0; // to avoid empty massive elements
6623  for (int jphi = 0; jphi < nphi; jphi++) {
6624  double ccc1 = breconoiseHB[i][jeta][jphi];
6625  if (ccc1 != 0.) {
6626  HBpositivedirectionReconoiseDIF4->Fill(jphi, ccc1);
6627  ccctest = 1.; //HBpositivedirectionReconoiseDIF4->SetBinError(i,0.01);
6628  }
6629  } // for jphi
6630  if (ccctest > 0.) {
6631  //cout<<"777 kcountHBpositivedirectionReconoiseDIF4 = "<<kcountHBpositivedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
6632  c3x5->cd(kcountHBpositivedirectionReconoiseDIF4);
6633  HBpositivedirectionReconoiseDIF4->SetMarkerStyle(20);
6634  HBpositivedirectionReconoiseDIF4->SetMarkerSize(0.4);
6635  HBpositivedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
6636  HBpositivedirectionReconoiseDIF4->SetXTitle("HBpositivedirectionReconoiseDIF4 \b");
6637  HBpositivedirectionReconoiseDIF4->SetMarkerColor(2);
6638  HBpositivedirectionReconoiseDIF4->SetLineColor(0);
6639  gPad->SetGridy();
6640  gPad->SetGridx();
6641  // gPad->SetLogy();
6642  if (kcountHBpositivedirectionReconoiseDIF4 == 1)
6643  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 0; depth = 4 \b");
6644  if (kcountHBpositivedirectionReconoiseDIF4 == 2)
6645  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 1; depth = 4 \b");
6646  if (kcountHBpositivedirectionReconoiseDIF4 == 3)
6647  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 2; depth = 4 \b");
6648  if (kcountHBpositivedirectionReconoiseDIF4 == 4)
6649  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 3; depth = 4 \b");
6650  if (kcountHBpositivedirectionReconoiseDIF4 == 5)
6651  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 4; depth = 4 \b");
6652  if (kcountHBpositivedirectionReconoiseDIF4 == 6)
6653  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 5; depth = 4 \b");
6654  if (kcountHBpositivedirectionReconoiseDIF4 == 7)
6655  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 6; depth = 4 \b");
6656  if (kcountHBpositivedirectionReconoiseDIF4 == 8)
6657  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 7; depth = 4 \b");
6658  if (kcountHBpositivedirectionReconoiseDIF4 == 9)
6659  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 8; depth = 4 \b");
6660  if (kcountHBpositivedirectionReconoiseDIF4 == 10)
6661  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 9; depth = 4 \b");
6662  if (kcountHBpositivedirectionReconoiseDIF4 == 11)
6663  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 10; depth = 4 \b");
6664  if (kcountHBpositivedirectionReconoiseDIF4 == 12)
6665  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 11; depth = 4 \b");
6666  if (kcountHBpositivedirectionReconoiseDIF4 == 13)
6667  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 12; depth = 4 \b");
6668  if (kcountHBpositivedirectionReconoiseDIF4 == 14)
6669  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 13; depth = 4 \b");
6670  if (kcountHBpositivedirectionReconoiseDIF4 == 15)
6671  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 14; depth = 4 \b");
6672  if (kcountHBpositivedirectionReconoiseDIF4 == 16)
6673  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 15; depth = 4 \b");
6674  HBpositivedirectionReconoiseDIF4->Draw("Error");
6675  kcountHBpositivedirectionReconoiseDIF4++;
6676  if (kcountHBpositivedirectionReconoiseDIF4 > 16)
6677  break; // 4x6 = 24
6678  } //ccctest>0
6679 
6680  } // for i
6681  } //if(jeta-41 >= 0)
6682  } //for jeta
6684  c3x5->Update();
6685  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
6686  c3x5->Clear();
6687  // clean-up
6688  if (h2CeffHBpositivedirectionReconoiseDIF4)
6689  delete h2CeffHBpositivedirectionReconoiseDIF4;
6690 
6691  //========================================================================================== 1114
6692  //======================================================================
6693  //======================================================================1D plot: R vs phi , different eta, depth=1
6694  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
6695  c3x5->Clear();
6697  c3x5->Divide(4, 4);
6698  c3x5->cd(1);
6699  int kcountHBnegativedirectionReconoiseDIF1 = 1;
6700  TH1F* h2CeffHBnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
6701  for (int jeta = 0; jeta < njeta; jeta++) {
6702  // negativedirectionReconoiseDIF:
6703  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
6704  // for (int i=0;i<ndepth;i++) {
6705  // depth=1
6706  for (int i = 0; i < 1; i++) {
6707  TH1F* HBnegativedirectionReconoiseDIF1 = (TH1F*)h2CeffHBnegativedirectionReconoiseDIF1->Clone("twod1");
6708  float ccctest = 0; // to avoid empty massive elements
6709  for (int jphi = 0; jphi < nphi; jphi++) {
6710  double ccc1 = breconoiseHB[i][jeta][jphi];
6711  if (ccc1 != 0.) {
6712  HBnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
6713  ccctest = 1.; //HBnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
6714  }
6715  } // for jphi
6716  if (ccctest > 0.) {
6717  // cout<<"444 kcountHBnegativedirectionReconoiseDIF1 = "<<kcountHBnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
6718  c3x5->cd(kcountHBnegativedirectionReconoiseDIF1);
6719  HBnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
6720  HBnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
6721  HBnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
6722  HBnegativedirectionReconoiseDIF1->SetXTitle("HBnegativedirectionReconoiseDIF1 \b");
6723  HBnegativedirectionReconoiseDIF1->SetMarkerColor(2);
6724  HBnegativedirectionReconoiseDIF1->SetLineColor(0);
6725  gPad->SetGridy();
6726  gPad->SetGridx();
6727  // gPad->SetLogy();
6728  if (kcountHBnegativedirectionReconoiseDIF1 == 1)
6729  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -16; depth = 1 \b");
6730  if (kcountHBnegativedirectionReconoiseDIF1 == 2)
6731  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -15; depth = 1 \b");
6732  if (kcountHBnegativedirectionReconoiseDIF1 == 3)
6733  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -14; depth = 1 \b");
6734  if (kcountHBnegativedirectionReconoiseDIF1 == 4)
6735  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -13; depth = 1 \b");
6736  if (kcountHBnegativedirectionReconoiseDIF1 == 5)
6737  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -12; depth = 1 \b");
6738  if (kcountHBnegativedirectionReconoiseDIF1 == 6)
6739  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -11; depth = 1 \b");
6740  if (kcountHBnegativedirectionReconoiseDIF1 == 7)
6741  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -10; depth = 1 \b");
6742  if (kcountHBnegativedirectionReconoiseDIF1 == 8)
6743  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -9; depth = 1 \b");
6744  if (kcountHBnegativedirectionReconoiseDIF1 == 9)
6745  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -8; depth = 1 \b");
6746  if (kcountHBnegativedirectionReconoiseDIF1 == 10)
6747  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -7; depth = 1 \b");
6748  if (kcountHBnegativedirectionReconoiseDIF1 == 11)
6749  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -6; depth = 1 \b");
6750  if (kcountHBnegativedirectionReconoiseDIF1 == 12)
6751  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -5; depth = 1 \b");
6752  if (kcountHBnegativedirectionReconoiseDIF1 == 13)
6753  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -4; depth = 1 \b");
6754  if (kcountHBnegativedirectionReconoiseDIF1 == 14)
6755  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -3; depth = 1 \b");
6756  if (kcountHBnegativedirectionReconoiseDIF1 == 15)
6757  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -2; depth = 1 \b");
6758  if (kcountHBnegativedirectionReconoiseDIF1 == 16)
6759  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -1; depth = 1 \b");
6760  HBnegativedirectionReconoiseDIF1->Draw("Error");
6761  kcountHBnegativedirectionReconoiseDIF1++;
6762  if (kcountHBnegativedirectionReconoiseDIF1 > 16)
6763  break; //
6764  } //ccctest>0
6765 
6766  } // for i
6767  } //if(jeta-41 < 0 )
6768  } //for jeta
6770  c3x5->Update();
6771  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
6772  c3x5->Clear();
6773  // clean-up
6774  if (h2CeffHBnegativedirectionReconoiseDIF1)
6775  delete h2CeffHBnegativedirectionReconoiseDIF1;
6776 
6777  //========================================================================================== 1115
6778  //======================================================================
6779  //======================================================================1D plot: R vs phi , different eta, depth=2
6780  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
6781  c3x5->Clear();
6783  c3x5->Divide(4, 4);
6784  c3x5->cd(1);
6785  int kcountHBnegativedirectionReconoiseDIF2 = 1;
6786  TH1F* h2CeffHBnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
6787  for (int jeta = 0; jeta < njeta; jeta++) {
6788  // negativedirectionReconoiseDIF:
6789  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
6790  // for (int i=0;i<ndepth;i++) {
6791  // depth=2
6792  for (int i = 1; i < 2; i++) {
6793  TH1F* HBnegativedirectionReconoiseDIF2 = (TH1F*)h2CeffHBnegativedirectionReconoiseDIF2->Clone("twod1");
6794  float ccctest = 0; // to avoid empty massive elements
6795  for (int jphi = 0; jphi < nphi; jphi++) {
6796  double ccc1 = breconoiseHB[i][jeta][jphi];
6797  if (ccc1 != 0.) {
6798  HBnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
6799  ccctest = 1.; //HBnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
6800  }
6801  } // for jphi
6802  if (ccctest > 0.) {
6803  //cout<<"555 kcountHBnegativedirectionReconoiseDIF2 = "<<kcountHBnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
6804  c3x5->cd(kcountHBnegativedirectionReconoiseDIF2);
6805  HBnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
6806  HBnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
6807  HBnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
6808  HBnegativedirectionReconoiseDIF2->SetXTitle("HBnegativedirectionReconoiseDIF2 \b");
6809  HBnegativedirectionReconoiseDIF2->SetMarkerColor(2);
6810  HBnegativedirectionReconoiseDIF2->SetLineColor(0);
6811  gPad->SetGridy();
6812  gPad->SetGridx();
6813  // gPad->SetLogy();
6814  if (kcountHBnegativedirectionReconoiseDIF2 == 1)
6815  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -16; depth = 2 \b");
6816  if (kcountHBnegativedirectionReconoiseDIF2 == 2)
6817  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -15; depth = 2 \b");
6818  if (kcountHBnegativedirectionReconoiseDIF2 == 3)
6819  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -14; depth = 2 \b");
6820  if (kcountHBnegativedirectionReconoiseDIF2 == 4)
6821  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -13; depth = 2 \b");
6822  if (kcountHBnegativedirectionReconoiseDIF2 == 5)
6823  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -12; depth = 2 \b");
6824  if (kcountHBnegativedirectionReconoiseDIF2 == 6)
6825  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -11; depth = 2 \b");
6826  if (kcountHBnegativedirectionReconoiseDIF2 == 7)
6827  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -10; depth = 2 \b");
6828  if (kcountHBnegativedirectionReconoiseDIF2 == 8)
6829  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -9; depth = 2 \b");
6830  if (kcountHBnegativedirectionReconoiseDIF2 == 9)
6831  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -8; depth = 2 \b");
6832  if (kcountHBnegativedirectionReconoiseDIF2 == 10)
6833  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -7; depth = 2 \b");
6834  if (kcountHBnegativedirectionReconoiseDIF2 == 11)
6835  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -6; depth = 2 \b");
6836  if (kcountHBnegativedirectionReconoiseDIF2 == 12)
6837  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -5; depth = 2 \b");
6838  if (kcountHBnegativedirectionReconoiseDIF2 == 13)
6839  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -4; depth = 2 \b");
6840  if (kcountHBnegativedirectionReconoiseDIF2 == 14)
6841  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -3; depth = 2 \b");
6842  if (kcountHBnegativedirectionReconoiseDIF2 == 15)
6843  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -2; depth = 2 \b");
6844  if (kcountHBnegativedirectionReconoiseDIF2 == 16)
6845  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -1; depth = 2 \b");
6846  HBnegativedirectionReconoiseDIF2->Draw("Error");
6847  kcountHBnegativedirectionReconoiseDIF2++;
6848  if (kcountHBnegativedirectionReconoiseDIF2 > 16)
6849  break; // 4x6 = 24
6850  } //ccctest>0
6851 
6852  } // for i
6853  } //if(jeta-41 < 0 )
6854  } //for jeta
6856  c3x5->Update();
6857  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
6858  c3x5->Clear();
6859  // clean-up
6860  if (h2CeffHBnegativedirectionReconoiseDIF2)
6861  delete h2CeffHBnegativedirectionReconoiseDIF2;
6862  //========================================================================================== 1116
6863  //======================================================================
6864  //======================================================================1D plot: R vs phi , different eta, depth=3
6865  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
6866  c3x5->Clear();
6868  c3x5->Divide(4, 4);
6869  c3x5->cd(1);
6870  int kcountHBnegativedirectionReconoiseDIF3 = 1;
6871  TH1F* h2CeffHBnegativedirectionReconoiseDIF3 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF3", "", nphi, 0., 72.);
6872  for (int jeta = 0; jeta < njeta; jeta++) {
6873  // negativedirectionReconoiseDIF:
6874  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
6875  // for (int i=0;i<ndepth;i++) {
6876  // depth=3
6877  for (int i = 2; i < 3; i++) {
6878  TH1F* HBnegativedirectionReconoiseDIF3 = (TH1F*)h2CeffHBnegativedirectionReconoiseDIF3->Clone("twod1");
6879  float ccctest = 0; // to avoid empty massive elements
6880  for (int jphi = 0; jphi < nphi; jphi++) {
6881  double ccc1 = breconoiseHB[i][jeta][jphi];
6882  if (ccc1 != 0.) {
6883  HBnegativedirectionReconoiseDIF3->Fill(jphi, ccc1);
6884  ccctest = 1.; //HBnegativedirectionReconoiseDIF3->SetBinError(i,0.01);
6885  }
6886  } // for jphi
6887  if (ccctest > 0.) {
6888  //cout<<"666 kcountHBnegativedirectionReconoiseDIF3 = "<<kcountHBnegativedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
6889  c3x5->cd(kcountHBnegativedirectionReconoiseDIF3);
6890  HBnegativedirectionReconoiseDIF3->SetMarkerStyle(20);
6891  HBnegativedirectionReconoiseDIF3->SetMarkerSize(0.4);
6892  HBnegativedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
6893  HBnegativedirectionReconoiseDIF3->SetXTitle("HBnegativedirectionReconoiseDIF3 \b");
6894  HBnegativedirectionReconoiseDIF3->SetMarkerColor(2);
6895  HBnegativedirectionReconoiseDIF3->SetLineColor(0);
6896  gPad->SetGridy();
6897  gPad->SetGridx();
6898  // gPad->SetLogy();
6899  if (kcountHBnegativedirectionReconoiseDIF3 == 1)
6900  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -16; depth = 3 \b");
6901  if (kcountHBnegativedirectionReconoiseDIF3 == 2)
6902  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -15; depth = 3 \b");
6903  if (kcountHBnegativedirectionReconoiseDIF3 == 3)
6904  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -14; depth = 3 \b");
6905  if (kcountHBnegativedirectionReconoiseDIF3 == 4)
6906  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -13; depth = 3 \b");
6907  if (kcountHBnegativedirectionReconoiseDIF3 == 5)
6908  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -12; depth = 3 \b");
6909  if (kcountHBnegativedirectionReconoiseDIF3 == 6)
6910  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -11; depth = 3 \b");
6911  if (kcountHBnegativedirectionReconoiseDIF3 == 7)
6912  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -10; depth = 3 \b");
6913  if (kcountHBnegativedirectionReconoiseDIF3 == 8)
6914  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -9; depth = 3 \b");
6915  if (kcountHBnegativedirectionReconoiseDIF3 == 9)
6916  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -8; depth = 3 \b");
6917  if (kcountHBnegativedirectionReconoiseDIF3 == 10)
6918  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -7; depth = 3 \b");
6919  if (kcountHBnegativedirectionReconoiseDIF3 == 11)
6920  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -6; depth = 3 \b");
6921  if (kcountHBnegativedirectionReconoiseDIF3 == 12)
6922  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -5; depth = 3 \b");
6923  if (kcountHBnegativedirectionReconoiseDIF3 == 13)
6924  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -4; depth = 3 \b");
6925  if (kcountHBnegativedirectionReconoiseDIF3 == 14)
6926  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -3; depth = 3 \b");
6927  if (kcountHBnegativedirectionReconoiseDIF3 == 15)
6928  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -2; depth = 3 \b");
6929  if (kcountHBnegativedirectionReconoiseDIF3 == 16)
6930  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -1; depth = 3 \b");
6931 
6932  HBnegativedirectionReconoiseDIF3->Draw("Error");
6933  kcountHBnegativedirectionReconoiseDIF3++;
6934  if (kcountHBnegativedirectionReconoiseDIF3 > 16)
6935  break; // 4x6 = 24
6936  } //ccctest>0
6937 
6938  } // for i
6939  } //if(jeta-41 < 0 )
6940  } //for jeta
6942  c3x5->Update();
6943  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
6944  c3x5->Clear();
6945  // clean-up
6946  if (h2CeffHBnegativedirectionReconoiseDIF3)
6947  delete h2CeffHBnegativedirectionReconoiseDIF3;
6948  //========================================================================================== 1117
6949  //======================================================================
6950  //======================================================================1D plot: R vs phi , different eta, depth=4
6951  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
6952  c3x5->Clear();
6954  c3x5->Divide(4, 4);
6955  c3x5->cd(1);
6956  int kcountHBnegativedirectionReconoiseDIF4 = 1;
6957  TH1F* h2CeffHBnegativedirectionReconoiseDIF4 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF4", "", nphi, 0., 72.);
6958 
6959  for (int jeta = 0; jeta < njeta; jeta++) {
6960  // negativedirectionReconoiseDIF:
6961  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
6962  // for (int i=0;i<ndepth;i++) {
6963  // depth=4
6964  for (int i = 3; i < 4; i++) {
6965  TH1F* HBnegativedirectionReconoiseDIF4 = (TH1F*)h2CeffHBnegativedirectionReconoiseDIF4->Clone("twod1");
6966 
6967  float ccctest = 0; // to avoid empty massive elements
6968  for (int jphi = 0; jphi < nphi; jphi++) {
6969  double ccc1 = breconoiseHB[i][jeta][jphi];
6970  if (ccc1 != 0.) {
6971  HBnegativedirectionReconoiseDIF4->Fill(jphi, ccc1);
6972  ccctest = 1.; //HBnegativedirectionReconoiseDIF4->SetBinError(i,0.01);
6973  }
6974  } // for jphi
6975  if (ccctest > 0.) {
6976  //cout<<"777 kcountHBnegativedirectionReconoiseDIF4 = "<<kcountHBnegativedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
6977  c3x5->cd(kcountHBnegativedirectionReconoiseDIF4);
6978  HBnegativedirectionReconoiseDIF4->SetMarkerStyle(20);
6979  HBnegativedirectionReconoiseDIF4->SetMarkerSize(0.4);
6980  HBnegativedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
6981  HBnegativedirectionReconoiseDIF4->SetXTitle("HBnegativedirectionReconoiseDIF4 \b");
6982  HBnegativedirectionReconoiseDIF4->SetMarkerColor(2);
6983  HBnegativedirectionReconoiseDIF4->SetLineColor(0);
6984  gPad->SetGridy();
6985  gPad->SetGridx();
6986  // gPad->SetLogy();
6987  if (kcountHBnegativedirectionReconoiseDIF4 == 1)
6988  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -16; depth = 4 \b");
6989  if (kcountHBnegativedirectionReconoiseDIF4 == 2)
6990  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -15; depth = 4 \b");
6991  if (kcountHBnegativedirectionReconoiseDIF4 == 3)
6992  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -14; depth = 4 \b");
6993  if (kcountHBnegativedirectionReconoiseDIF4 == 4)
6994  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -13; depth = 4 \b");
6995  if (kcountHBnegativedirectionReconoiseDIF4 == 5)
6996  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -12; depth = 4 \b");
6997  if (kcountHBnegativedirectionReconoiseDIF4 == 6)
6998  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -11; depth = 4 \b");
6999  if (kcountHBnegativedirectionReconoiseDIF4 == 7)
7000  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -10; depth = 4 \b");
7001  if (kcountHBnegativedirectionReconoiseDIF4 == 8)
7002  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -9; depth = 4 \b");
7003  if (kcountHBnegativedirectionReconoiseDIF4 == 9)
7004  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -8; depth = 4 \b");
7005  if (kcountHBnegativedirectionReconoiseDIF4 == 10)
7006  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -7; depth = 4 \b");
7007  if (kcountHBnegativedirectionReconoiseDIF4 == 11)
7008  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -6; depth = 4 \b");
7009  if (kcountHBnegativedirectionReconoiseDIF4 == 12)
7010  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -5; depth = 4 \b");
7011  if (kcountHBnegativedirectionReconoiseDIF4 == 13)
7012  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -4; depth = 4 \b");
7013  if (kcountHBnegativedirectionReconoiseDIF4 == 14)
7014  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -3; depth = 4 \b");
7015  if (kcountHBnegativedirectionReconoiseDIF4 == 15)
7016  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -2; depth = 4 \b");
7017  if (kcountHBnegativedirectionReconoiseDIF4 == 16)
7018  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -1; depth = 4 \b");
7019  HBnegativedirectionReconoiseDIF4->Draw("Error");
7020  kcountHBnegativedirectionReconoiseDIF4++;
7021  if (kcountHBnegativedirectionReconoiseDIF4 > 16)
7022  break; // 4x6 = 24
7023  } //ccctest>0
7024 
7025  } // for i
7026  } //if(jeta-41 < 0 )
7027  } //for jeta
7029  c3x5->Update();
7030  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
7031  c3x5->Clear();
7032  // clean-up
7033  if (h2CeffHBnegativedirectionReconoiseDIF4)
7034  delete h2CeffHBnegativedirectionReconoiseDIF4;
7035 
7036  //======================================================================================================================
7037  //======================================================================================================================
7038  //======================================================================================================================
7039  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
7040 
7041  //cout<<" Start Vaiance: preparation *****" <<endl;
7042  TH2F* reconoiseVariance1HB1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HB1");
7043  TH2F* reconoiseVariance0HB1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB1");
7044  TH2F* reconoiseVarianceHB1 = (TH2F*)reconoiseVariance1HB1->Clone("reconoiseVarianceHB1");
7045  reconoiseVarianceHB1->Divide(reconoiseVariance1HB1, reconoiseVariance0HB1, 1, 1, "B");
7046  TH2F* reconoiseVariance1HB2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HB2");
7047  TH2F* reconoiseVariance0HB2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB2");
7048  TH2F* reconoiseVarianceHB2 = (TH2F*)reconoiseVariance1HB2->Clone("reconoiseVarianceHB2");
7049  reconoiseVarianceHB2->Divide(reconoiseVariance1HB2, reconoiseVariance0HB2, 1, 1, "B");
7050  TH2F* reconoiseVariance1HB3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HB3");
7051  TH2F* reconoiseVariance0HB3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB3");
7052  TH2F* reconoiseVarianceHB3 = (TH2F*)reconoiseVariance1HB3->Clone("reconoiseVarianceHB3");
7053  reconoiseVarianceHB3->Divide(reconoiseVariance1HB3, reconoiseVariance0HB3, 1, 1, "B");
7054  TH2F* reconoiseVariance1HB4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HB4");
7055  TH2F* reconoiseVariance0HB4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB4");
7056  TH2F* reconoiseVarianceHB4 = (TH2F*)reconoiseVariance1HB4->Clone("reconoiseVarianceHB4");
7057  reconoiseVarianceHB4->Divide(reconoiseVariance1HB4, reconoiseVariance0HB4, 1, 1, "B");
7058  //cout<<" Vaiance: preparation DONE *****" <<endl;
7059  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevarianceHB
7060  // = sum(R*R)/N - (sum(R)/N)**2
7061  for (int jeta = 0; jeta < njeta; jeta++) {
7062  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
7063  //preparation for PHI normalization:
7064  double sumreconoiseHB0 = 0;
7065  int nsumreconoiseHB0 = 0;
7066  double sumreconoiseHB1 = 0;
7067  int nsumreconoiseHB1 = 0;
7068  double sumreconoiseHB2 = 0;
7069  int nsumreconoiseHB2 = 0;
7070  double sumreconoiseHB3 = 0;
7071  int nsumreconoiseHB3 = 0;
7072  for (int jphi = 0; jphi < njphi; jphi++) {
7073  reconoisevarianceHB[0][jeta][jphi] = reconoiseVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
7074  reconoisevarianceHB[1][jeta][jphi] = reconoiseVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
7075  reconoisevarianceHB[2][jeta][jphi] = reconoiseVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
7076  reconoisevarianceHB[3][jeta][jphi] = reconoiseVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
7077  if (reconoisevarianceHB[0][jeta][jphi] != 0.) {
7078  sumreconoiseHB0 += reconoisevarianceHB[0][jeta][jphi];
7079  ++nsumreconoiseHB0;
7080  }
7081  if (reconoisevarianceHB[1][jeta][jphi] != 0.) {
7082  sumreconoiseHB1 += reconoisevarianceHB[1][jeta][jphi];
7083  ++nsumreconoiseHB1;
7084  }
7085  if (reconoisevarianceHB[2][jeta][jphi] != 0.) {
7086  sumreconoiseHB2 += reconoisevarianceHB[2][jeta][jphi];
7087  ++nsumreconoiseHB2;
7088  }
7089  if (reconoisevarianceHB[3][jeta][jphi] != 0.) {
7090  sumreconoiseHB3 += reconoisevarianceHB[3][jeta][jphi];
7091  ++nsumreconoiseHB3;
7092  }
7093  } // phi
7094  // PHI normalization :
7095  for (int jphi = 0; jphi < njphi; jphi++) {
7096  if (sumreconoiseHB0 != 0.)
7097  reconoisevarianceHB[0][jeta][jphi] /= (sumreconoiseHB0 / nsumreconoiseHB0);
7098  if (sumreconoiseHB1 != 0.)
7099  reconoisevarianceHB[1][jeta][jphi] /= (sumreconoiseHB1 / nsumreconoiseHB1);
7100  if (sumreconoiseHB2 != 0.)
7101  reconoisevarianceHB[2][jeta][jphi] /= (sumreconoiseHB2 / nsumreconoiseHB2);
7102  if (sumreconoiseHB3 != 0.)
7103  reconoisevarianceHB[3][jeta][jphi] /= (sumreconoiseHB3 / nsumreconoiseHB3);
7104  } // phi
7105  // reconoisevarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
7106  for (int jphi = 0; jphi < njphi; jphi++) {
7107  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
7108  reconoisevarianceHB[0][jeta][jphi] -= areconoiseHB[0][jeta][jphi] * areconoiseHB[0][jeta][jphi];
7109  reconoisevarianceHB[0][jeta][jphi] = fabs(reconoisevarianceHB[0][jeta][jphi]);
7110  reconoisevarianceHB[1][jeta][jphi] -= areconoiseHB[1][jeta][jphi] * areconoiseHB[1][jeta][jphi];
7111  reconoisevarianceHB[1][jeta][jphi] = fabs(reconoisevarianceHB[1][jeta][jphi]);
7112  reconoisevarianceHB[2][jeta][jphi] -= areconoiseHB[2][jeta][jphi] * areconoiseHB[2][jeta][jphi];
7113  reconoisevarianceHB[2][jeta][jphi] = fabs(reconoisevarianceHB[2][jeta][jphi]);
7114  reconoisevarianceHB[3][jeta][jphi] -= areconoiseHB[3][jeta][jphi] * areconoiseHB[3][jeta][jphi];
7115  reconoisevarianceHB[3][jeta][jphi] = fabs(reconoisevarianceHB[3][jeta][jphi]);
7116  }
7117  }
7118  }
7119  //cout<<" Vaiance: DONE*****" <<endl;
7120  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
7121  //======================================================================
7122  //======================================================================
7123  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
7124  c1x1->Clear();
7126  c1x0->Divide(1, 1);
7127  c1x0->cd(1);
7128  TH2F* DefzDreconoiseHB42D = new TH2F("DefzDreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
7129  TH2F* DefzDreconoiseHB42D0 = new TH2F("DefzDreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
7130  TH2F* DefzDreconoiseHB42DF = (TH2F*)DefzDreconoiseHB42D0->Clone("DefzDreconoiseHB42DF");
7131  for (int i = 0; i < ndepth; i++) {
7132  for (int jeta = 0; jeta < neta; jeta++) {
7133  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
7134  for (int jphi = 0; jphi < nphi; jphi++) {
7135  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
7136  int k2plot = jeta - 41;
7137  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
7138  if (areconoiseHB[i][jeta][jphi] > 0.) {
7139  DefzDreconoiseHB42D->Fill(kkk, jphi, ccc1);
7140  DefzDreconoiseHB42D0->Fill(kkk, jphi, 1.);
7141  }
7142  }
7143  }
7144  }
7145  }
7146  DefzDreconoiseHB42DF->Divide(DefzDreconoiseHB42D, DefzDreconoiseHB42D0, 1, 1, "B"); // average A
7147  // DefzDreconoiseHB1->Sumw2();
7148  gPad->SetGridy();
7149  gPad->SetGridx(); // gPad->SetLogz();
7150  DefzDreconoiseHB42DF->SetMarkerStyle(20);
7151  DefzDreconoiseHB42DF->SetMarkerSize(0.4);
7152  DefzDreconoiseHB42DF->GetZaxis()->SetLabelSize(0.08);
7153  DefzDreconoiseHB42DF->SetXTitle("<D>_depth #eta \b");
7154  DefzDreconoiseHB42DF->SetYTitle(" #phi \b");
7155  DefzDreconoiseHB42DF->SetZTitle("<D>_depth \b");
7156  DefzDreconoiseHB42DF->SetMarkerColor(2);
7157  DefzDreconoiseHB42DF->SetLineColor(
7158  0); // DefzDreconoiseHB42DF->SetMaximum(1.000); // DefzDreconoiseHB42DF->SetMinimum(1.0);
7159  DefzDreconoiseHB42DF->Draw("COLZ");
7161  c1x0->Update();
7162  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHB.png");
7163  c1x0->Clear();
7164  // clean-up
7165  if (DefzDreconoiseHB42D)
7166  delete DefzDreconoiseHB42D;
7167  if (DefzDreconoiseHB42D0)
7168  delete DefzDreconoiseHB42D0;
7169  if (DefzDreconoiseHB42DF)
7170  delete DefzDreconoiseHB42DF;
7171  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
7172  //======================================================================
7173  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
7174  c1x1->Clear();
7176  c1x1->Divide(1, 1);
7177  c1x1->cd(1);
7178  TH1F* DefzDreconoiseHB41D = new TH1F("DefzDreconoiseHB41D", "", nphi, 0., 72.);
7179  TH1F* DefzDreconoiseHB41D0 = new TH1F("DefzDreconoiseHB41D0", "", nphi, 0., 72.);
7180  TH1F* DefzDreconoiseHB41DF = (TH1F*)DefzDreconoiseHB41D0->Clone("DefzDreconoiseHB41DF");
7181 
7182  for (int jphi = 0; jphi < nphi; jphi++) {
7183  for (int jeta = 0; jeta < neta; jeta++) {
7184  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
7185  for (int i = 0; i < ndepth; i++) {
7186  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
7187  if (areconoiseHB[i][jeta][jphi] > 0.) {
7188  DefzDreconoiseHB41D->Fill(jphi, ccc1);
7189  DefzDreconoiseHB41D0->Fill(jphi, 1.);
7190  }
7191  }
7192  }
7193  }
7194  }
7195  // DefzDreconoiseHB41D->Sumw2();DefzDreconoiseHB41D0->Sumw2();
7196 
7197  DefzDreconoiseHB41DF->Divide(DefzDreconoiseHB41D, DefzDreconoiseHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
7198  DefzDreconoiseHB41D0->Sumw2();
7199  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHB41DF->SetBinError(jphi,0.01);}
7200  gPad->SetGridy();
7201  gPad->SetGridx(); // gPad->SetLogz();
7202  DefzDreconoiseHB41DF->SetMarkerStyle(20);
7203  DefzDreconoiseHB41DF->SetMarkerSize(1.4);
7204  DefzDreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
7205  DefzDreconoiseHB41DF->SetXTitle("#phi \b");
7206  DefzDreconoiseHB41DF->SetYTitle(" <D> \b");
7207  DefzDreconoiseHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
7208  DefzDreconoiseHB41DF->SetMarkerColor(4);
7209  DefzDreconoiseHB41DF->SetLineColor(
7210  4); //DefzDreconoiseHB41DF->SetMinimum(0.8); DefzDreconoiseHB41DF->SetMinimum(-0.015);
7211  DefzDreconoiseHB41DF->Draw("Error");
7213  c1x1->Update();
7214  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHB.png");
7215  c1x1->Clear();
7216  // clean-up
7217  if (DefzDreconoiseHB41D)
7218  delete DefzDreconoiseHB41D;
7219  if (DefzDreconoiseHB41D0)
7220  delete DefzDreconoiseHB41D0;
7221  if (DefzDreconoiseHB41DF)
7222  delete DefzDreconoiseHB41DF;
7223 
7224  //========================================================================================== 14
7225  //======================================================================
7226  //======================================================================1D plot: D vs phi , different eta, depth=1
7227  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
7228  c3x5->Clear();
7230  c3x5->Divide(4, 4);
7231  c3x5->cd(1);
7232  int kcountHBpositivedirectionReconoiseD1 = 1;
7233  TH1F* h2CeffHBpositivedirectionReconoiseD1 = new TH1F("h2CeffHBpositivedirectionReconoiseD1", "", nphi, 0., 72.);
7234 
7235  for (int jeta = 0; jeta < njeta; jeta++) {
7236  // positivedirectionReconoiseD:
7237  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
7238  // for (int i=0;i<ndepth;i++) {
7239  // depth=1
7240  for (int i = 0; i < 1; i++) {
7241  TH1F* HBpositivedirectionReconoiseD1 = (TH1F*)h2CeffHBpositivedirectionReconoiseD1->Clone("twod1");
7242 
7243  float ccctest = 0; // to avoid empty massive elements
7244  for (int jphi = 0; jphi < nphi; jphi++) {
7245  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
7246  if (areconoiseHB[i][jeta][jphi] > 0.) {
7247  HBpositivedirectionReconoiseD1->Fill(jphi, ccc1);
7248  ccctest = 1.; //HBpositivedirectionReconoiseD1->SetBinError(i,0.01);
7249  }
7250  } // for jphi
7251  if (ccctest > 0.) {
7252  //cout<<"1414 kcountHBpositivedirectionReconoiseD1 = "<<kcountHBpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
7253  c3x5->cd(kcountHBpositivedirectionReconoiseD1);
7254  HBpositivedirectionReconoiseD1->SetMarkerStyle(20);
7255  HBpositivedirectionReconoiseD1->SetMarkerSize(0.4);
7256  HBpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
7257  HBpositivedirectionReconoiseD1->SetXTitle("HBpositivedirectionReconoiseD1 \b");
7258  HBpositivedirectionReconoiseD1->SetMarkerColor(2);
7259  HBpositivedirectionReconoiseD1->SetLineColor(0);
7260  gPad->SetGridy();
7261  gPad->SetGridx();
7262  // gPad->SetLogy();
7263  if (kcountHBpositivedirectionReconoiseD1 == 1)
7264  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
7265  if (kcountHBpositivedirectionReconoiseD1 == 2)
7266  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
7267  if (kcountHBpositivedirectionReconoiseD1 == 3)
7268  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
7269  if (kcountHBpositivedirectionReconoiseD1 == 4)
7270  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
7271  if (kcountHBpositivedirectionReconoiseD1 == 5)
7272  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
7273  if (kcountHBpositivedirectionReconoiseD1 == 6)
7274  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
7275  if (kcountHBpositivedirectionReconoiseD1 == 7)
7276  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
7277  if (kcountHBpositivedirectionReconoiseD1 == 8)
7278  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
7279  if (kcountHBpositivedirectionReconoiseD1 == 9)
7280  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
7281  if (kcountHBpositivedirectionReconoiseD1 == 10)
7282  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
7283  if (kcountHBpositivedirectionReconoiseD1 == 11)
7284  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
7285  if (kcountHBpositivedirectionReconoiseD1 == 12)
7286  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
7287  if (kcountHBpositivedirectionReconoiseD1 == 13)
7288  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
7289  if (kcountHBpositivedirectionReconoiseD1 == 14)
7290  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
7291  if (kcountHBpositivedirectionReconoiseD1 == 15)
7292  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
7293  if (kcountHBpositivedirectionReconoiseD1 == 16)
7294  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
7295  HBpositivedirectionReconoiseD1->Draw("Error");
7296  kcountHBpositivedirectionReconoiseD1++;
7297  if (kcountHBpositivedirectionReconoiseD1 > 16)
7298  break; // 4x6 = 24
7299  } //ccctest>0
7300 
7301  } // for i
7302  } //if(jeta-41 >= 0)
7303  } //for jeta
7305  c3x5->Update();
7306  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
7307  c3x5->Clear();
7308  // clean-up
7309  if (h2CeffHBpositivedirectionReconoiseD1)
7310  delete h2CeffHBpositivedirectionReconoiseD1;
7311  //========================================================================================== 15
7312  //======================================================================
7313  //======================================================================1D plot: D vs phi , different eta, depth=2
7314  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
7315  c3x5->Clear();
7316  c3x5->Divide(4, 4);
7317  c3x5->cd(1);
7318  int kcountHBpositivedirectionReconoiseD2 = 1;
7319  TH1F* h2CeffHBpositivedirectionReconoiseD2 = new TH1F("h2CeffHBpositivedirectionReconoiseD2", "", nphi, 0., 72.);
7320 
7321  for (int jeta = 0; jeta < njeta; jeta++) {
7322  // positivedirectionReconoiseD:
7323  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
7324  // for (int i=0;i<ndepth;i++) {
7325  // depth=2
7326  for (int i = 1; i < 2; i++) {
7327  TH1F* HBpositivedirectionReconoiseD2 = (TH1F*)h2CeffHBpositivedirectionReconoiseD2->Clone("twod1");
7328 
7329  float ccctest = 0; // to avoid empty massive elements
7330  for (int jphi = 0; jphi < nphi; jphi++) {
7331  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
7332  if (areconoiseHB[i][jeta][jphi] > 0.) {
7333  HBpositivedirectionReconoiseD2->Fill(jphi, ccc1);
7334  ccctest = 1.; //HBpositivedirectionReconoiseD2->SetBinError(i,0.01);
7335  }
7336  } // for jphi
7337  if (ccctest > 0.) {
7338  //cout<<"1515 kcountHBpositivedirectionReconoiseD2 = "<<kcountHBpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
7339  c3x5->cd(kcountHBpositivedirectionReconoiseD2);
7340  HBpositivedirectionReconoiseD2->SetMarkerStyle(20);
7341  HBpositivedirectionReconoiseD2->SetMarkerSize(0.4);
7342  HBpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
7343  HBpositivedirectionReconoiseD2->SetXTitle("HBpositivedirectionReconoiseD2 \b");
7344  HBpositivedirectionReconoiseD2->SetMarkerColor(2);
7345  HBpositivedirectionReconoiseD2->SetLineColor(0);
7346  gPad->SetGridy();
7347  gPad->SetGridx();
7348  // gPad->SetLogy();
7349  if (kcountHBpositivedirectionReconoiseD2 == 1)
7350  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
7351  if (kcountHBpositivedirectionReconoiseD2 == 2)
7352  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
7353  if (kcountHBpositivedirectionReconoiseD2 == 3)
7354  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
7355  if (kcountHBpositivedirectionReconoiseD2 == 4)
7356  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
7357  if (kcountHBpositivedirectionReconoiseD2 == 5)
7358  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
7359  if (kcountHBpositivedirectionReconoiseD2 == 6)
7360  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
7361  if (kcountHBpositivedirectionReconoiseD2 == 7)
7362  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
7363  if (kcountHBpositivedirectionReconoiseD2 == 8)
7364  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
7365  if (kcountHBpositivedirectionReconoiseD2 == 9)
7366  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
7367  if (kcountHBpositivedirectionReconoiseD2 == 10)
7368  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
7369  if (kcountHBpositivedirectionReconoiseD2 == 11)
7370  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
7371  if (kcountHBpositivedirectionReconoiseD2 == 12)
7372  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
7373  if (kcountHBpositivedirectionReconoiseD2 == 13)
7374  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
7375  if (kcountHBpositivedirectionReconoiseD2 == 14)
7376  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
7377  if (kcountHBpositivedirectionReconoiseD2 == 15)
7378  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
7379  if (kcountHBpositivedirectionReconoiseD2 == 16)
7380  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
7381  HBpositivedirectionReconoiseD2->Draw("Error");
7382  kcountHBpositivedirectionReconoiseD2++;
7383  if (kcountHBpositivedirectionReconoiseD2 > 16)
7384  break; // 4x6 = 24
7385  } //ccctest>0
7386 
7387  } // for i
7388  } //if(jeta-41 >= 0)
7389  } //for jeta
7391  c3x5->Update();
7392  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
7393  c3x5->Clear();
7394  // clean-up
7395  if (h2CeffHBpositivedirectionReconoiseD2)
7396  delete h2CeffHBpositivedirectionReconoiseD2;
7397  //========================================================================================== 16
7398  //======================================================================
7399  //======================================================================1D plot: D vs phi , different eta, depth=3
7400  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
7401  c3x5->Clear();
7402  c3x5->Divide(4, 4);
7403  c3x5->cd(1);
7404  int kcountHBpositivedirectionReconoiseD3 = 1;
7405  TH1F* h2CeffHBpositivedirectionReconoiseD3 = new TH1F("h2CeffHBpositivedirectionReconoiseD3", "", nphi, 0., 72.);
7406 
7407  for (int jeta = 0; jeta < njeta; jeta++) {
7408  // positivedirectionReconoiseD:
7409  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
7410  // for (int i=0;i<ndepth;i++) {
7411  // depth=3
7412  for (int i = 2; i < 3; i++) {
7413  TH1F* HBpositivedirectionReconoiseD3 = (TH1F*)h2CeffHBpositivedirectionReconoiseD3->Clone("twod1");
7414 
7415  float ccctest = 0; // to avoid empty massive elements
7416  for (int jphi = 0; jphi < nphi; jphi++) {
7417  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
7418  if (areconoiseHB[i][jeta][jphi] > 0.) {
7419  HBpositivedirectionReconoiseD3->Fill(jphi, ccc1);
7420  ccctest = 1.; //HBpositivedirectionReconoiseD3->SetBinError(i,0.01);
7421  }
7422  } // for jphi
7423  if (ccctest > 0.) {
7424  //cout<<"1616 kcountHBpositivedirectionReconoiseD3 = "<<kcountHBpositivedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
7425  c3x5->cd(kcountHBpositivedirectionReconoiseD3);
7426  HBpositivedirectionReconoiseD3->SetMarkerStyle(20);
7427  HBpositivedirectionReconoiseD3->SetMarkerSize(0.4);
7428  HBpositivedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
7429  HBpositivedirectionReconoiseD3->SetXTitle("HBpositivedirectionReconoiseD3 \b");
7430  HBpositivedirectionReconoiseD3->SetMarkerColor(2);
7431  HBpositivedirectionReconoiseD3->SetLineColor(0);
7432  gPad->SetGridy();
7433  gPad->SetGridx();
7434  // gPad->SetLogy();
7435  if (kcountHBpositivedirectionReconoiseD3 == 1)
7436  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
7437  if (kcountHBpositivedirectionReconoiseD3 == 2)
7438  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
7439  if (kcountHBpositivedirectionReconoiseD3 == 3)
7440  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
7441  if (kcountHBpositivedirectionReconoiseD3 == 4)
7442  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
7443  if (kcountHBpositivedirectionReconoiseD3 == 5)
7444  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
7445  if (kcountHBpositivedirectionReconoiseD3 == 6)
7446  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
7447  if (kcountHBpositivedirectionReconoiseD3 == 7)
7448  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
7449  if (kcountHBpositivedirectionReconoiseD3 == 8)
7450  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
7451  if (kcountHBpositivedirectionReconoiseD3 == 9)
7452  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
7453  if (kcountHBpositivedirectionReconoiseD3 == 10)
7454  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
7455  if (kcountHBpositivedirectionReconoiseD3 == 11)
7456  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
7457  if (kcountHBpositivedirectionReconoiseD3 == 12)
7458  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
7459  if (kcountHBpositivedirectionReconoiseD3 == 13)
7460  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
7461  if (kcountHBpositivedirectionReconoiseD3 == 14)
7462  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
7463  if (kcountHBpositivedirectionReconoiseD3 == 15)
7464  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
7465  if (kcountHBpositivedirectionReconoiseD3 == 16)
7466  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
7467  HBpositivedirectionReconoiseD3->Draw("Error");
7468  kcountHBpositivedirectionReconoiseD3++;
7469  if (kcountHBpositivedirectionReconoiseD3 > 16)
7470  break; // 4x6 = 24
7471  } //ccctest>0
7472 
7473  } // for i
7474  } //if(jeta-41 >= 0)
7475  } //for jeta
7477  c3x5->Update();
7478  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
7479  c3x5->Clear();
7480  // clean-up
7481  if (h2CeffHBpositivedirectionReconoiseD3)
7482  delete h2CeffHBpositivedirectionReconoiseD3;
7483  //========================================================================================== 17
7484  //======================================================================
7485  //======================================================================1D plot: D vs phi , different eta, depth=4
7486  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
7487  c3x5->Clear();
7488  c3x5->Divide(4, 4);
7489  c3x5->cd(1);
7490  int kcountHBpositivedirectionReconoiseD4 = 1;
7491  TH1F* h2CeffHBpositivedirectionReconoiseD4 = new TH1F("h2CeffHBpositivedirectionReconoiseD4", "", nphi, 0., 72.);
7492 
7493  for (int jeta = 0; jeta < njeta; jeta++) {
7494  // positivedirectionReconoiseD:
7495  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
7496  // for (int i=0;i<ndepth;i++) {
7497  // depth=4
7498  for (int i = 3; i < 4; i++) {
7499  TH1F* HBpositivedirectionReconoiseD4 = (TH1F*)h2CeffHBpositivedirectionReconoiseD4->Clone("twod1");
7500 
7501  float ccctest = 0; // to avoid empty massive elements
7502  for (int jphi = 0; jphi < nphi; jphi++) {
7503  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
7504  if (areconoiseHB[i][jeta][jphi] > 0.) {
7505  HBpositivedirectionReconoiseD4->Fill(jphi, ccc1);
7506  ccctest = 1.; //HBpositivedirectionReconoiseD4->SetBinError(i,0.01);
7507  }
7508  } // for jphi
7509  if (ccctest > 0.) {
7510  //cout<<"1717 kcountHBpositivedirectionReconoiseD4 = "<<kcountHBpositivedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
7511  c3x5->cd(kcountHBpositivedirectionReconoiseD4);
7512  HBpositivedirectionReconoiseD4->SetMarkerStyle(20);
7513  HBpositivedirectionReconoiseD4->SetMarkerSize(0.4);
7514  HBpositivedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
7515  HBpositivedirectionReconoiseD4->SetXTitle("HBpositivedirectionReconoiseD4 \b");
7516  HBpositivedirectionReconoiseD4->SetMarkerColor(2);
7517  HBpositivedirectionReconoiseD4->SetLineColor(0);
7518  gPad->SetGridy();
7519  gPad->SetGridx();
7520  // gPad->SetLogy();
7521  if (kcountHBpositivedirectionReconoiseD4 == 1)
7522  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
7523  if (kcountHBpositivedirectionReconoiseD4 == 2)
7524  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
7525  if (kcountHBpositivedirectionReconoiseD4 == 3)
7526  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
7527  if (kcountHBpositivedirectionReconoiseD4 == 4)
7528  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
7529  if (kcountHBpositivedirectionReconoiseD4 == 5)
7530  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
7531  if (kcountHBpositivedirectionReconoiseD4 == 6)
7532  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
7533  if (kcountHBpositivedirectionReconoiseD4 == 7)
7534  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
7535  if (kcountHBpositivedirectionReconoiseD4 == 8)
7536  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
7537  if (kcountHBpositivedirectionReconoiseD4 == 9)
7538  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
7539  if (kcountHBpositivedirectionReconoiseD4 == 10)
7540  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
7541  if (kcountHBpositivedirectionReconoiseD4 == 11)
7542  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
7543  if (kcountHBpositivedirectionReconoiseD4 == 12)
7544  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
7545  if (kcountHBpositivedirectionReconoiseD4 == 13)
7546  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
7547  if (kcountHBpositivedirectionReconoiseD4 == 14)
7548  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
7549  if (kcountHBpositivedirectionReconoiseD4 == 15)
7550  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
7551  if (kcountHBpositivedirectionReconoiseD4 == 16)
7552  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
7553  HBpositivedirectionReconoiseD4->Draw("Error");
7554  kcountHBpositivedirectionReconoiseD4++;
7555  if (kcountHBpositivedirectionReconoiseD4 > 16)
7556  break; // 4x6 = 24
7557  } //ccctest>0
7558 
7559  } // for i
7560  } //if(jeta-41 >= 0)
7561  } //for jeta
7563  c3x5->Update();
7564  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
7565  c3x5->Clear();
7566  // clean-up
7567  if (h2CeffHBpositivedirectionReconoiseD4)
7568  delete h2CeffHBpositivedirectionReconoiseD4;
7569 
7570  //========================================================================================== 22214
7571  //======================================================================
7572  //======================================================================1D plot: D vs phi , different eta, depth=1
7573  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
7574  c3x5->Clear();
7576  c3x5->Divide(4, 4);
7577  c3x5->cd(1);
7578  int kcountHBnegativedirectionReconoiseD1 = 1;
7579  TH1F* h2CeffHBnegativedirectionReconoiseD1 = new TH1F("h2CeffHBnegativedirectionReconoiseD1", "", nphi, 0., 72.);
7580 
7581  for (int jeta = 0; jeta < njeta; jeta++) {
7582  // negativedirectionReconoiseD:
7583  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
7584  // for (int i=0;i<ndepth;i++) {
7585  // depth=1
7586  for (int i = 0; i < 1; i++) {
7587  TH1F* HBnegativedirectionReconoiseD1 = (TH1F*)h2CeffHBnegativedirectionReconoiseD1->Clone("twod1");
7588 
7589  float ccctest = 0; // to avoid empty massive elements
7590  for (int jphi = 0; jphi < nphi; jphi++) {
7591  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
7592  if (areconoiseHB[i][jeta][jphi] > 0.) {
7593  HBnegativedirectionReconoiseD1->Fill(jphi, ccc1);
7594  ccctest = 1.; //HBnegativedirectionReconoiseD1->SetBinError(i,0.01);
7595  }
7596  } // for jphi
7597  if (ccctest > 0.) {
7598  //cout<<"1414 kcountHBnegativedirectionReconoiseD1 = "<<kcountHBnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
7599  c3x5->cd(kcountHBnegativedirectionReconoiseD1);
7600  HBnegativedirectionReconoiseD1->SetMarkerStyle(20);
7601  HBnegativedirectionReconoiseD1->SetMarkerSize(0.4);
7602  HBnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
7603  HBnegativedirectionReconoiseD1->SetXTitle("HBnegativedirectionReconoiseD1 \b");
7604  HBnegativedirectionReconoiseD1->SetMarkerColor(2);
7605  HBnegativedirectionReconoiseD1->SetLineColor(0);
7606  gPad->SetGridy();
7607  gPad->SetGridx();
7608  // gPad->SetLogy();
7609  if (kcountHBnegativedirectionReconoiseD1 == 1)
7610  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-16; depth = 1 \b");
7611  if (kcountHBnegativedirectionReconoiseD1 == 2)
7612  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-15; depth = 1 \b");
7613  if (kcountHBnegativedirectionReconoiseD1 == 3)
7614  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-14; depth = 1 \b");
7615  if (kcountHBnegativedirectionReconoiseD1 == 4)
7616  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-13; depth = 1 \b");
7617  if (kcountHBnegativedirectionReconoiseD1 == 5)
7618  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-12; depth = 1 \b");
7619  if (kcountHBnegativedirectionReconoiseD1 == 6)
7620  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-11; depth = 1 \b");
7621  if (kcountHBnegativedirectionReconoiseD1 == 7)
7622  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-10; depth = 1 \b");
7623  if (kcountHBnegativedirectionReconoiseD1 == 8)
7624  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-9; depth = 1 \b");
7625  if (kcountHBnegativedirectionReconoiseD1 == 9)
7626  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-8; depth = 1 \b");
7627  if (kcountHBnegativedirectionReconoiseD1 == 10)
7628  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-7; depth = 1 \b");
7629  if (kcountHBnegativedirectionReconoiseD1 == 11)
7630  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-6; depth = 1 \b");
7631  if (kcountHBnegativedirectionReconoiseD1 == 12)
7632  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-5; depth = 1 \b");
7633  if (kcountHBnegativedirectionReconoiseD1 == 13)
7634  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-4; depth = 1 \b");
7635  if (kcountHBnegativedirectionReconoiseD1 == 14)
7636  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-3; depth = 1 \b");
7637  if (kcountHBnegativedirectionReconoiseD1 == 15)
7638  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-2; depth = 1 \b");
7639  if (kcountHBnegativedirectionReconoiseD1 == 16)
7640  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-1; depth = 1 \b");
7641  HBnegativedirectionReconoiseD1->Draw("Error");
7642  kcountHBnegativedirectionReconoiseD1++;
7643  if (kcountHBnegativedirectionReconoiseD1 > 16)
7644  break; // 4x6 = 24
7645  } //ccctest>0
7646 
7647  } // for i
7648  } //if(jeta-41 < 0)
7649  } //for jeta
7651  c3x5->Update();
7652  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
7653  c3x5->Clear();
7654  // clean-up
7655  if (h2CeffHBnegativedirectionReconoiseD1)
7656  delete h2CeffHBnegativedirectionReconoiseD1;
7657  //========================================================================================== 22215
7658  //======================================================================
7659  //======================================================================1D plot: D vs phi , different eta, depth=2
7660  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
7661  c3x5->Clear();
7662  c3x5->Divide(4, 4);
7663  c3x5->cd(1);
7664  int kcountHBnegativedirectionReconoiseD2 = 1;
7665  TH1F* h2CeffHBnegativedirectionReconoiseD2 = new TH1F("h2CeffHBnegativedirectionReconoiseD2", "", nphi, 0., 72.);
7666 
7667  for (int jeta = 0; jeta < njeta; jeta++) {
7668  // negativedirectionReconoiseD:
7669  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
7670  // for (int i=0;i<ndepth;i++) {
7671  // depth=2
7672  for (int i = 1; i < 2; i++) {
7673  TH1F* HBnegativedirectionReconoiseD2 = (TH1F*)h2CeffHBnegativedirectionReconoiseD2->Clone("twod1");
7674 
7675  float ccctest = 0; // to avoid empty massive elements
7676  for (int jphi = 0; jphi < nphi; jphi++) {
7677  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
7678  if (areconoiseHB[i][jeta][jphi] > 0.) {
7679  HBnegativedirectionReconoiseD2->Fill(jphi, ccc1);
7680  ccctest = 1.; //HBnegativedirectionReconoiseD2->SetBinError(i,0.01);
7681  }
7682  } // for jphi
7683  if (ccctest > 0.) {
7684  //cout<<"1515 kcountHBnegativedirectionReconoiseD2 = "<<kcountHBnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
7685  c3x5->cd(kcountHBnegativedirectionReconoiseD2);
7686  HBnegativedirectionReconoiseD2->SetMarkerStyle(20);
7687  HBnegativedirectionReconoiseD2->SetMarkerSize(0.4);
7688  HBnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
7689  HBnegativedirectionReconoiseD2->SetXTitle("HBnegativedirectionReconoiseD2 \b");
7690  HBnegativedirectionReconoiseD2->SetMarkerColor(2);
7691  HBnegativedirectionReconoiseD2->SetLineColor(0);
7692  gPad->SetGridy();
7693  gPad->SetGridx();
7694  // gPad->SetLogy();
7695  if (kcountHBnegativedirectionReconoiseD2 == 1)
7696  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
7697  if (kcountHBnegativedirectionReconoiseD2 == 2)
7698  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
7699  if (kcountHBnegativedirectionReconoiseD2 == 3)
7700  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
7701  if (kcountHBnegativedirectionReconoiseD2 == 4)
7702  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
7703  if (kcountHBnegativedirectionReconoiseD2 == 5)
7704  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
7705  if (kcountHBnegativedirectionReconoiseD2 == 6)
7706  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
7707  if (kcountHBnegativedirectionReconoiseD2 == 7)
7708  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
7709  if (kcountHBnegativedirectionReconoiseD2 == 8)
7710  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-9; depth = 2 \b");
7711  if (kcountHBnegativedirectionReconoiseD2 == 9)
7712  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-8; depth = 2 \b");
7713  if (kcountHBnegativedirectionReconoiseD2 == 10)
7714  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-7; depth = 2 \b");
7715  if (kcountHBnegativedirectionReconoiseD2 == 11)
7716  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-6; depth = 2 \b");
7717  if (kcountHBnegativedirectionReconoiseD2 == 12)
7718  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-5; depth = 2 \b");
7719  if (kcountHBnegativedirectionReconoiseD2 == 13)
7720  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-4; depth = 2 \b");
7721  if (kcountHBnegativedirectionReconoiseD2 == 14)
7722  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-3; depth = 2 \b");
7723  if (kcountHBnegativedirectionReconoiseD2 == 15)
7724  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-2; depth = 2 \b");
7725  if (kcountHBnegativedirectionReconoiseD2 == 16)
7726  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-1; depth = 2 \b");
7727  HBnegativedirectionReconoiseD2->Draw("Error");
7728  kcountHBnegativedirectionReconoiseD2++;
7729  if (kcountHBnegativedirectionReconoiseD2 > 16)
7730  break; // 4x6 = 24
7731  } //ccctest>0
7732 
7733  } // for i
7734  } //if(jeta-41 < 0)
7735  } //for jeta
7737  c3x5->Update();
7738  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
7739  c3x5->Clear();
7740  // clean-up
7741  if (h2CeffHBnegativedirectionReconoiseD2)
7742  delete h2CeffHBnegativedirectionReconoiseD2;
7743  //========================================================================================== 22216
7744  //======================================================================
7745  //======================================================================1D plot: D vs phi , different eta, depth=3
7746  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
7747  c3x5->Clear();
7748  c3x5->Divide(4, 4);
7749  c3x5->cd(1);
7750  int kcountHBnegativedirectionReconoiseD3 = 1;
7751  TH1F* h2CeffHBnegativedirectionReconoiseD3 = new TH1F("h2CeffHBnegativedirectionReconoiseD3", "", nphi, 0., 72.);
7752 
7753  for (int jeta = 0; jeta < njeta; jeta++) {
7754  // negativedirectionReconoiseD:
7755  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
7756  // for (int i=0;i<ndepth;i++) {
7757  // depth=3
7758  for (int i = 2; i < 3; i++) {
7759  TH1F* HBnegativedirectionReconoiseD3 = (TH1F*)h2CeffHBnegativedirectionReconoiseD3->Clone("twod1");
7760 
7761  float ccctest = 0; // to avoid empty massive elements
7762  for (int jphi = 0; jphi < nphi; jphi++) {
7763  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
7764  if (areconoiseHB[i][jeta][jphi] > 0.) {
7765  HBnegativedirectionReconoiseD3->Fill(jphi, ccc1);
7766  ccctest = 1.; //HBnegativedirectionReconoiseD3->SetBinError(i,0.01);
7767  }
7768  } // for jphi
7769  if (ccctest > 0.) {
7770  //cout<<"1616 kcountHBnegativedirectionReconoiseD3 = "<<kcountHBnegativedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
7771  c3x5->cd(kcountHBnegativedirectionReconoiseD3);
7772  HBnegativedirectionReconoiseD3->SetMarkerStyle(20);
7773  HBnegativedirectionReconoiseD3->SetMarkerSize(0.4);
7774  HBnegativedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
7775  HBnegativedirectionReconoiseD3->SetXTitle("HBnegativedirectionReconoiseD3 \b");
7776  HBnegativedirectionReconoiseD3->SetMarkerColor(2);
7777  HBnegativedirectionReconoiseD3->SetLineColor(0);
7778  gPad->SetGridy();
7779  gPad->SetGridx();
7780  // gPad->SetLogy();
7781  if (kcountHBnegativedirectionReconoiseD3 == 1)
7782  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
7783  if (kcountHBnegativedirectionReconoiseD3 == 2)
7784  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
7785  if (kcountHBnegativedirectionReconoiseD3 == 3)
7786  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
7787  if (kcountHBnegativedirectionReconoiseD3 == 4)
7788  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
7789  if (kcountHBnegativedirectionReconoiseD3 == 5)
7790  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
7791  if (kcountHBnegativedirectionReconoiseD3 == 6)
7792  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
7793  if (kcountHBnegativedirectionReconoiseD3 == 7)
7794  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
7795  if (kcountHBnegativedirectionReconoiseD3 == 8)
7796  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-9; depth = 3 \b");
7797  if (kcountHBnegativedirectionReconoiseD3 == 9)
7798  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-8; depth = 3 \b");
7799  if (kcountHBnegativedirectionReconoiseD3 == 10)
7800  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-7; depth = 3 \b");
7801  if (kcountHBnegativedirectionReconoiseD3 == 11)
7802  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-6; depth = 3 \b");
7803  if (kcountHBnegativedirectionReconoiseD3 == 12)
7804  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-5; depth = 3 \b");
7805  if (kcountHBnegativedirectionReconoiseD3 == 13)
7806  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-4; depth = 3 \b");
7807  if (kcountHBnegativedirectionReconoiseD3 == 14)
7808  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-3; depth = 3 \b");
7809  if (kcountHBnegativedirectionReconoiseD3 == 15)
7810  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-2; depth = 3 \b");
7811  if (kcountHBnegativedirectionReconoiseD3 == 16)
7812  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-1; depth = 3 \b");
7813  HBnegativedirectionReconoiseD3->Draw("Error");
7814  kcountHBnegativedirectionReconoiseD3++;
7815  if (kcountHBnegativedirectionReconoiseD3 > 16)
7816  break; // 4x6 = 24
7817  } //ccctest>0
7818 
7819  } // for i
7820  } //if(jeta-41 < 0)
7821  } //for jeta
7823  c3x5->Update();
7824  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
7825  c3x5->Clear();
7826  // clean-up
7827  if (h2CeffHBnegativedirectionReconoiseD3)
7828  delete h2CeffHBnegativedirectionReconoiseD3;
7829  //========================================================================================== 22217
7830  //======================================================================
7831  //======================================================================1D plot: D vs phi , different eta, depth=4
7832  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
7833  c3x5->Clear();
7834  c3x5->Divide(4, 4);
7835  c3x5->cd(1);
7836  int kcountHBnegativedirectionReconoiseD4 = 1;
7837  TH1F* h2CeffHBnegativedirectionReconoiseD4 = new TH1F("h2CeffHBnegativedirectionReconoiseD4", "", nphi, 0., 72.);
7838 
7839  for (int jeta = 0; jeta < njeta; jeta++) {
7840  // negativedirectionReconoiseD:
7841  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
7842  // for (int i=0;i<ndepth;i++) {
7843  // depth=4
7844  for (int i = 3; i < 4; i++) {
7845  TH1F* HBnegativedirectionReconoiseD4 = (TH1F*)h2CeffHBnegativedirectionReconoiseD4->Clone("twod1");
7846 
7847  float ccctest = 0; // to avoid empty massive elements
7848  for (int jphi = 0; jphi < nphi; jphi++) {
7849  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
7850  if (areconoiseHB[i][jeta][jphi] > 0.) {
7851  HBnegativedirectionReconoiseD4->Fill(jphi, ccc1);
7852  ccctest = 1.; //HBnegativedirectionReconoiseD4->SetBinError(i,0.01);
7853  }
7854  } // for jphi
7855  if (ccctest > 0.) {
7856  //cout<<"1717 kcountHBnegativedirectionReconoiseD4 = "<<kcountHBnegativedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
7857  c3x5->cd(kcountHBnegativedirectionReconoiseD4);
7858  HBnegativedirectionReconoiseD4->SetMarkerStyle(20);
7859  HBnegativedirectionReconoiseD4->SetMarkerSize(0.4);
7860  HBnegativedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
7861  HBnegativedirectionReconoiseD4->SetXTitle("HBnegativedirectionReconoiseD4 \b");
7862  HBnegativedirectionReconoiseD4->SetMarkerColor(2);
7863  HBnegativedirectionReconoiseD4->SetLineColor(0);
7864  gPad->SetGridy();
7865  gPad->SetGridx();
7866  // gPad->SetLogy();
7867  if (kcountHBnegativedirectionReconoiseD4 == 1)
7868  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
7869  if (kcountHBnegativedirectionReconoiseD4 == 2)
7870  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
7871  if (kcountHBnegativedirectionReconoiseD4 == 3)
7872  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
7873  if (kcountHBnegativedirectionReconoiseD4 == 4)
7874  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
7875  if (kcountHBnegativedirectionReconoiseD4 == 5)
7876  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
7877  if (kcountHBnegativedirectionReconoiseD4 == 6)
7878  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
7879  if (kcountHBnegativedirectionReconoiseD4 == 7)
7880  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
7881  if (kcountHBnegativedirectionReconoiseD4 == 8)
7882  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-9; depth = 4 \b");
7883  if (kcountHBnegativedirectionReconoiseD4 == 9)
7884  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-8; depth = 4 \b");
7885  if (kcountHBnegativedirectionReconoiseD4 == 10)
7886  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-7; depth = 4 \b");
7887  if (kcountHBnegativedirectionReconoiseD4 == 11)
7888  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-6; depth = 4 \b");
7889  if (kcountHBnegativedirectionReconoiseD4 == 12)
7890  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-5; depth = 4 \b");
7891  if (kcountHBnegativedirectionReconoiseD4 == 13)
7892  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-4; depth = 4 \b");
7893  if (kcountHBnegativedirectionReconoiseD4 == 14)
7894  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-3; depth = 4 \b");
7895  if (kcountHBnegativedirectionReconoiseD4 == 15)
7896  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-2; depth = 4 \b");
7897  if (kcountHBnegativedirectionReconoiseD4 == 16)
7898  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-1; depth = 4 \b");
7899  HBnegativedirectionReconoiseD4->Draw("Error");
7900  kcountHBnegativedirectionReconoiseD4++;
7901  if (kcountHBnegativedirectionReconoiseD4 > 16)
7902  break; // 4x6 = 24
7903  } //ccctest>0
7904 
7905  } // for i
7906  } //if(jeta-41 < 0)
7907  } //for jeta
7909  c3x5->Update();
7910  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
7911  c3x5->Clear();
7912  // clean-up
7913  if (h2CeffHBnegativedirectionReconoiseD4)
7914  delete h2CeffHBnegativedirectionReconoiseD4;
7915 
7916  //===================================================================== END of Reconoise HB for phi-symmetry
7917  //===================================================================== END of Reconoise HB for phi-symmetry
7918  //===================================================================== END of Reconoise HB for phi-symmetry
7919 
7923  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
7924  //ndepth = k_max[3];
7925  ndepth = 7;
7926  // const int ndepth = 7;
7927  double areconoisehe[ndepth][njeta][njphi];
7928  double breconoisehe[ndepth][njeta][njphi];
7929  double reconoisevariancehe[ndepth][njeta][njphi];
7931  TH2F* recNoiseEnergy1HE1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE1");
7932  TH2F* recNoiseEnergy0HE1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE1");
7933  TH2F* recNoiseEnergyHE1 = (TH2F*)recNoiseEnergy1HE1->Clone("recNoiseEnergyHE1");
7934  recNoiseEnergyHE1->Divide(recNoiseEnergy1HE1, recNoiseEnergy0HE1, 1, 1, "B");
7935  TH2F* recNoiseEnergy1HE2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE2");
7936  TH2F* recNoiseEnergy0HE2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE2");
7937  TH2F* recNoiseEnergyHE2 = (TH2F*)recNoiseEnergy1HE2->Clone("recNoiseEnergyHE2");
7938  recNoiseEnergyHE2->Divide(recNoiseEnergy1HE2, recNoiseEnergy0HE2, 1, 1, "B");
7939  TH2F* recNoiseEnergy1HE3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE3");
7940  TH2F* recNoiseEnergy0HE3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE3");
7941  TH2F* recNoiseEnergyHE3 = (TH2F*)recNoiseEnergy1HE3->Clone("recNoiseEnergyHE3");
7942  recNoiseEnergyHE3->Divide(recNoiseEnergy1HE3, recNoiseEnergy0HE3, 1, 1, "B");
7943  TH2F* recNoiseEnergy1HE4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE4");
7944  TH2F* recNoiseEnergy0HE4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE4");
7945  TH2F* recNoiseEnergyHE4 = (TH2F*)recNoiseEnergy1HE4->Clone("recNoiseEnergyHE4");
7946  recNoiseEnergyHE4->Divide(recNoiseEnergy1HE4, recNoiseEnergy0HE4, 1, 1, "B");
7947  TH2F* recNoiseEnergy1HE5 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE5");
7948  TH2F* recNoiseEnergy0HE5 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE5");
7949  TH2F* recNoiseEnergyHE5 = (TH2F*)recNoiseEnergy1HE5->Clone("recNoiseEnergyHE5");
7950  recNoiseEnergyHE5->Divide(recNoiseEnergy1HE5, recNoiseEnergy0HE5, 1, 1, "B");
7951  TH2F* recNoiseEnergy1HE6 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE6");
7952  TH2F* recNoiseEnergy0HE6 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE6");
7953  TH2F* recNoiseEnergyHE6 = (TH2F*)recNoiseEnergy1HE6->Clone("recNoiseEnergyHE6");
7954  recNoiseEnergyHE6->Divide(recNoiseEnergy1HE6, recNoiseEnergy0HE6, 1, 1, "B");
7955  TH2F* recNoiseEnergy1HE7 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE7");
7956  TH2F* recNoiseEnergy0HE7 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE7");
7957  TH2F* recNoiseEnergyHE7 = (TH2F*)recNoiseEnergy1HE7->Clone("recNoiseEnergyHE7");
7958  recNoiseEnergyHE7->Divide(recNoiseEnergy1HE7, recNoiseEnergy0HE7, 1, 1, "B");
7959  for (int jeta = 0; jeta < njeta; jeta++) {
7960  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
7961  //====================================================================== PHI normalization & put R into massive areconoisehe
7962  //preparation for PHI normalization:
7963  double sumreconoiseHE0 = 0;
7964  int nsumreconoiseHE0 = 0;
7965  double sumreconoiseHE1 = 0;
7966  int nsumreconoiseHE1 = 0;
7967  double sumreconoiseHE2 = 0;
7968  int nsumreconoiseHE2 = 0;
7969  double sumreconoiseHE3 = 0;
7970  int nsumreconoiseHE3 = 0;
7971  double sumreconoiseHE4 = 0;
7972  int nsumreconoiseHE4 = 0;
7973  double sumreconoiseHE5 = 0;
7974  int nsumreconoiseHE5 = 0;
7975  double sumreconoiseHE6 = 0;
7976  int nsumreconoiseHE6 = 0;
7977  for (int jphi = 0; jphi < njphi; jphi++) {
7978  areconoisehe[0][jeta][jphi] = recNoiseEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
7979  areconoisehe[1][jeta][jphi] = recNoiseEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
7980  areconoisehe[2][jeta][jphi] = recNoiseEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
7981  areconoisehe[3][jeta][jphi] = recNoiseEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
7982  areconoisehe[4][jeta][jphi] = recNoiseEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
7983  areconoisehe[5][jeta][jphi] = recNoiseEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
7984  areconoisehe[6][jeta][jphi] = recNoiseEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
7985 
7986  breconoisehe[0][jeta][jphi] = recNoiseEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
7987  breconoisehe[1][jeta][jphi] = recNoiseEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
7988  breconoisehe[2][jeta][jphi] = recNoiseEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
7989  breconoisehe[3][jeta][jphi] = recNoiseEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
7990  breconoisehe[4][jeta][jphi] = recNoiseEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
7991  breconoisehe[5][jeta][jphi] = recNoiseEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
7992  breconoisehe[6][jeta][jphi] = recNoiseEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
7993 
7994  if (areconoisehe[0][jeta][jphi] != 0.) {
7995  sumreconoiseHE0 += areconoisehe[0][jeta][jphi];
7996  ++nsumreconoiseHE0;
7997  }
7998  if (areconoisehe[1][jeta][jphi] != 0.) {
7999  sumreconoiseHE1 += areconoisehe[1][jeta][jphi];
8000  ++nsumreconoiseHE1;
8001  }
8002  if (areconoisehe[2][jeta][jphi] != 0.) {
8003  sumreconoiseHE2 += areconoisehe[2][jeta][jphi];
8004  ++nsumreconoiseHE2;
8005  }
8006  if (areconoisehe[3][jeta][jphi] != 0.) {
8007  sumreconoiseHE3 += areconoisehe[3][jeta][jphi];
8008  ++nsumreconoiseHE3;
8009  }
8010  if (areconoisehe[4][jeta][jphi] != 0.) {
8011  sumreconoiseHE4 += areconoisehe[4][jeta][jphi];
8012  ++nsumreconoiseHE4;
8013  }
8014  if (areconoisehe[5][jeta][jphi] != 0.) {
8015  sumreconoiseHE5 += areconoisehe[5][jeta][jphi];
8016  ++nsumreconoiseHE5;
8017  }
8018  if (areconoisehe[6][jeta][jphi] != 0.) {
8019  sumreconoiseHE6 += areconoisehe[6][jeta][jphi];
8020  ++nsumreconoiseHE6;
8021  }
8022  } // phi
8023 
8024  // PHI normalization for DIF:
8025  for (int jphi = 0; jphi < njphi; jphi++) {
8026  if (sumreconoiseHE0 != 0.)
8027  breconoisehe[0][jeta][jphi] -= (sumreconoiseHE0 / nsumreconoiseHE0);
8028  if (sumreconoiseHE1 != 0.)
8029  breconoisehe[1][jeta][jphi] -= (sumreconoiseHE1 / nsumreconoiseHE1);
8030  if (sumreconoiseHE2 != 0.)
8031  breconoisehe[2][jeta][jphi] -= (sumreconoiseHE2 / nsumreconoiseHE2);
8032  if (sumreconoiseHE3 != 0.)
8033  breconoisehe[3][jeta][jphi] -= (sumreconoiseHE3 / nsumreconoiseHE3);
8034  if (sumreconoiseHE4 != 0.)
8035  breconoisehe[4][jeta][jphi] -= (sumreconoiseHE4 / nsumreconoiseHE4);
8036  if (sumreconoiseHE5 != 0.)
8037  breconoisehe[5][jeta][jphi] -= (sumreconoiseHE5 / nsumreconoiseHE5);
8038  if (sumreconoiseHE6 != 0.)
8039  breconoisehe[6][jeta][jphi] -= (sumreconoiseHE6 / nsumreconoiseHE6);
8040  } // phi
8041 
8042  // PHI normalization for R:
8043  for (int jphi = 0; jphi < njphi; jphi++) {
8044  if (sumreconoiseHE0 != 0.)
8045  areconoisehe[0][jeta][jphi] /= (sumreconoiseHE0 / nsumreconoiseHE0);
8046  if (sumreconoiseHE1 != 0.)
8047  areconoisehe[1][jeta][jphi] /= (sumreconoiseHE1 / nsumreconoiseHE1);
8048  if (sumreconoiseHE2 != 0.)
8049  areconoisehe[2][jeta][jphi] /= (sumreconoiseHE2 / nsumreconoiseHE2);
8050  if (sumreconoiseHE3 != 0.)
8051  areconoisehe[3][jeta][jphi] /= (sumreconoiseHE3 / nsumreconoiseHE3);
8052  if (sumreconoiseHE4 != 0.)
8053  areconoisehe[4][jeta][jphi] /= (sumreconoiseHE4 / nsumreconoiseHE4);
8054  if (sumreconoiseHE5 != 0.)
8055  areconoisehe[5][jeta][jphi] /= (sumreconoiseHE5 / nsumreconoiseHE5);
8056  if (sumreconoiseHE6 != 0.)
8057  areconoisehe[6][jeta][jphi] /= (sumreconoiseHE6 / nsumreconoiseHE6);
8058  } // phi
8059  } //if( (jeta-41 >=
8060  } //eta
8061  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
8062  //======================================================================
8063  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HE
8064  //======================================================================
8065  c2x1->Clear();
8067  c2x1->Divide(2, 1);
8068  c2x1->cd(1);
8069  TH2F* GefzRreconoiseHE42D = new TH2F("GefzRreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
8070  TH2F* GefzRreconoiseHE42D0 = new TH2F("GefzRreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
8071  TH2F* GefzRreconoiseHE42DF = (TH2F*)GefzRreconoiseHE42D0->Clone("GefzRreconoiseHE42DF");
8072  for (int i = 0; i < ndepth; i++) {
8073  for (int jeta = 0; jeta < neta; jeta++) {
8074  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
8075  for (int jphi = 0; jphi < nphi; jphi++) {
8076  double ccc1 = areconoisehe[i][jeta][jphi];
8077  int k2plot = jeta - 41;
8078  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
8079  if (ccc1 != 0.) {
8080  GefzRreconoiseHE42D->Fill(kkk, jphi, ccc1);
8081  GefzRreconoiseHE42D0->Fill(kkk, jphi, 1.);
8082  }
8083  }
8084  }
8085  }
8086  }
8087  GefzRreconoiseHE42DF->Divide(GefzRreconoiseHE42D, GefzRreconoiseHE42D0, 1, 1, "B"); // average A
8088  gPad->SetGridy();
8089  gPad->SetGridx(); // gPad->SetLogz();
8090  GefzRreconoiseHE42DF->SetXTitle("<R>_depth #eta \b");
8091  GefzRreconoiseHE42DF->SetYTitle(" #phi \b");
8092  GefzRreconoiseHE42DF->Draw("COLZ");
8093 
8094  c2x1->cd(2);
8095  TH1F* energyhitNoise_HE = (TH1F*)dir->FindObjectAny("h_energyhitNoise_HE");
8096  energyhitNoise_HE->SetMarkerStyle(20);
8097  energyhitNoise_HE->SetMarkerSize(0.4);
8098  energyhitNoise_HE->GetYaxis()->SetLabelSize(0.04);
8099  energyhitNoise_HE->SetXTitle("energyhitNoise_HE \b");
8100  energyhitNoise_HE->SetMarkerColor(2);
8101  energyhitNoise_HE->SetLineColor(0);
8102  gPad->SetGridy();
8103  gPad->SetGridx();
8104  energyhitNoise_HE->Draw("Error");
8105 
8107  c2x1->Update();
8108  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHE.png");
8109  c2x1->Clear();
8110  // clean-up
8111  if (GefzRreconoiseHE42D)
8112  delete GefzRreconoiseHE42D;
8113  if (GefzRreconoiseHE42D0)
8114  delete GefzRreconoiseHE42D0;
8115  if (GefzRreconoiseHE42DF)
8116  delete GefzRreconoiseHE42DF;
8117  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
8118  //======================================================================
8119  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
8120  c1x1->Clear();
8122  c1x1->Divide(1, 1);
8123  c1x1->cd(1);
8124  TH1F* GefzRreconoiseHE41D = new TH1F("GefzRreconoiseHE41D", "", nphi, 0., 72.);
8125  TH1F* GefzRreconoiseHE41D0 = new TH1F("GefzRreconoiseHE41D0", "", nphi, 0., 72.);
8126  TH1F* GefzRreconoiseHE41DF = (TH1F*)GefzRreconoiseHE41D0->Clone("GefzRreconoiseHE41DF");
8127  for (int jphi = 0; jphi < nphi; jphi++) {
8128  for (int jeta = 0; jeta < neta; jeta++) {
8129  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
8130  for (int i = 0; i < ndepth; i++) {
8131  double ccc1 = areconoisehe[i][jeta][jphi];
8132  if (ccc1 != 0.) {
8133  GefzRreconoiseHE41D->Fill(jphi, ccc1);
8134  GefzRreconoiseHE41D0->Fill(jphi, 1.);
8135  }
8136  }
8137  }
8138  }
8139  }
8140  GefzRreconoiseHE41DF->Divide(GefzRreconoiseHE41D, GefzRreconoiseHE41D0, 1, 1, "B"); // R averaged over depthes & eta
8141  GefzRreconoiseHE41D0->Sumw2();
8142  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHE41DF->SetBinError(jphi,0.01);}
8143  gPad->SetGridy();
8144  gPad->SetGridx(); // gPad->SetLogz();
8145  GefzRreconoiseHE41DF->SetMarkerStyle(20);
8146  GefzRreconoiseHE41DF->SetMarkerSize(1.4);
8147  GefzRreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
8148  GefzRreconoiseHE41DF->SetXTitle("#phi \b");
8149  GefzRreconoiseHE41DF->SetYTitle(" <R> \b");
8150  GefzRreconoiseHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
8151  GefzRreconoiseHE41DF->SetMarkerColor(4);
8152  GefzRreconoiseHE41DF->SetLineColor(
8153  4); // GefzRreconoiseHE41DF->SetMinimum(0.8); // GefzRreconoiseHE41DF->SetMaximum(1.000);
8154  GefzRreconoiseHE41DF->Draw("Error");
8156  c1x1->Update();
8157  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHE.png");
8158  c1x1->Clear();
8159  // clean-up
8160  if (GefzRreconoiseHE41D)
8161  delete GefzRreconoiseHE41D;
8162  if (GefzRreconoiseHE41D0)
8163  delete GefzRreconoiseHE41D0;
8164  if (GefzRreconoiseHE41DF)
8165  delete GefzRreconoiseHE41DF;
8166 
8167  //========================================================================================== 4
8168  //======================================================================
8169  //======================================================================1D plot: R vs phi , different eta, depth=1
8170  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
8171  c3x5->Clear();
8173  c3x5->Divide(3, 5);
8174  c3x5->cd(1);
8175  int kcountHEpositivedirectionReconoise1 = 1;
8176  TH1F* h2CeffHEpositivedirectionReconoise1 = new TH1F("h2CeffHEpositivedirectionReconoise1", "", nphi, 0., 72.);
8177  for (int jeta = 0; jeta < njeta; jeta++) {
8178  // positivedirectionReconoise:
8179  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
8180  // for (int i=0;i<ndepth;i++) {
8181  // depth=1
8182  for (int i = 0; i < 1; i++) {
8183  TH1F* HEpositivedirectionReconoise1 = (TH1F*)h2CeffHEpositivedirectionReconoise1->Clone("twod1");
8184  float ccctest = 0; // to avoid empty massive elements
8185  for (int jphi = 0; jphi < nphi; jphi++) {
8186  double ccc1 = areconoisehe[i][jeta][jphi];
8187  if (ccc1 != 0.) {
8188  HEpositivedirectionReconoise1->Fill(jphi, ccc1);
8189  ccctest = 1.; //HEpositivedirectionReconoise1->SetBinError(i,0.01);
8190  }
8191  } // for jphi
8192  if (ccctest > 0.) {
8193  // cout<<"444 kcountHEpositivedirectionReconoise1 = "<<kcountHEpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
8194  c3x5->cd(kcountHEpositivedirectionReconoise1);
8195  HEpositivedirectionReconoise1->SetMarkerStyle(20);
8196  HEpositivedirectionReconoise1->SetMarkerSize(0.4);
8197  HEpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
8198  HEpositivedirectionReconoise1->SetXTitle("HEpositivedirectionReconoise1 \b");
8199  HEpositivedirectionReconoise1->SetMarkerColor(2);
8200  HEpositivedirectionReconoise1->SetLineColor(0);
8201  gPad->SetGridy();
8202  gPad->SetGridx();
8203  // gPad->SetLogy();
8204  if (kcountHEpositivedirectionReconoise1 == 1)
8205  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
8206  if (kcountHEpositivedirectionReconoise1 == 2)
8207  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
8208  if (kcountHEpositivedirectionReconoise1 == 3)
8209  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
8210  if (kcountHEpositivedirectionReconoise1 == 4)
8211  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
8212  if (kcountHEpositivedirectionReconoise1 == 5)
8213  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
8214  if (kcountHEpositivedirectionReconoise1 == 6)
8215  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
8216  if (kcountHEpositivedirectionReconoise1 == 7)
8217  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
8218  if (kcountHEpositivedirectionReconoise1 == 8)
8219  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
8220  if (kcountHEpositivedirectionReconoise1 == 9)
8221  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
8222  if (kcountHEpositivedirectionReconoise1 == 10)
8223  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
8224  if (kcountHEpositivedirectionReconoise1 == 11)
8225  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
8226  if (kcountHEpositivedirectionReconoise1 == 12)
8227  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
8228  HEpositivedirectionReconoise1->Draw("Error");
8229  kcountHEpositivedirectionReconoise1++;
8230  if (kcountHEpositivedirectionReconoise1 > 12)
8231  break; // 4x6 = 24
8232  } //ccctest>0
8233 
8234  } // for i
8235  } //if(jeta-41 >= 15 && jeta-41 <= 28
8236  } //for jeta
8238  c3x5->Update();
8239  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
8240  c3x5->Clear();
8241  // clean-up
8242  if (h2CeffHEpositivedirectionReconoise1)
8243  delete h2CeffHEpositivedirectionReconoise1;
8244 
8245  //========================================================================================== 5
8246  //======================================================================
8247  //======================================================================1D plot: R vs phi , different eta, depth=2
8248  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
8249  c3x5->Clear();
8251  c3x5->Divide(3, 5);
8252  c3x5->cd(1);
8253  int kcountHEpositivedirectionReconoise2 = 1;
8254  TH1F* h2CeffHEpositivedirectionReconoise2 = new TH1F("h2CeffHEpositivedirectionReconoise2", "", nphi, 0., 72.);
8255  for (int jeta = 0; jeta < njeta; jeta++) {
8256  // positivedirectionReconoise:
8257  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
8258  // for (int i=0;i<ndepth;i++) {
8259  // depth=2
8260  for (int i = 1; i < 2; i++) {
8261  TH1F* HEpositivedirectionReconoise2 = (TH1F*)h2CeffHEpositivedirectionReconoise2->Clone("twod1");
8262  float ccctest = 0; // to avoid empty massive elements
8263  for (int jphi = 0; jphi < nphi; jphi++) {
8264  double ccc1 = areconoisehe[i][jeta][jphi];
8265  if (ccc1 != 0.) {
8266  HEpositivedirectionReconoise2->Fill(jphi, ccc1);
8267  ccctest = 1.; //HEpositivedirectionReconoise2->SetBinError(i,0.01);
8268  }
8269  } // for jphi
8270  if (ccctest > 0.) {
8271  //cout<<"555 kcountHEpositivedirectionReconoise2 = "<<kcountHEpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
8272  c3x5->cd(kcountHEpositivedirectionReconoise2);
8273  HEpositivedirectionReconoise2->SetMarkerStyle(20);
8274  HEpositivedirectionReconoise2->SetMarkerSize(0.4);
8275  HEpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
8276  HEpositivedirectionReconoise2->SetXTitle("HEpositivedirectionReconoise2 \b");
8277  HEpositivedirectionReconoise2->SetMarkerColor(2);
8278  HEpositivedirectionReconoise2->SetLineColor(0);
8279  gPad->SetGridy();
8280  gPad->SetGridx();
8281  // gPad->SetLogy();
8282  if (kcountHEpositivedirectionReconoise2 == 1)
8283  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
8284  if (kcountHEpositivedirectionReconoise2 == 2)
8285  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
8286  if (kcountHEpositivedirectionReconoise2 == 3)
8287  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
8288  if (kcountHEpositivedirectionReconoise2 == 4)
8289  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
8290  if (kcountHEpositivedirectionReconoise2 == 5)
8291  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
8292  if (kcountHEpositivedirectionReconoise2 == 6)
8293  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
8294  if (kcountHEpositivedirectionReconoise2 == 7)
8295  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
8296  if (kcountHEpositivedirectionReconoise2 == 8)
8297  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
8298  if (kcountHEpositivedirectionReconoise2 == 9)
8299  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
8300  if (kcountHEpositivedirectionReconoise2 == 10)
8301  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
8302  if (kcountHEpositivedirectionReconoise2 == 11)
8303  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
8304  if (kcountHEpositivedirectionReconoise2 == 12)
8305  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
8306  if (kcountHEpositivedirectionReconoise2 == 13)
8307  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
8308  HEpositivedirectionReconoise2->Draw("Error");
8309  kcountHEpositivedirectionReconoise2++;
8310  if (kcountHEpositivedirectionReconoise2 > 13)
8311  break; // 4x6 = 24
8312  } //ccctest>0
8313 
8314  } // for i
8315  } //if(jeta-41
8316  } //for jeta
8318  c3x5->Update();
8319  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
8320  c3x5->Clear();
8321  // clean-up
8322  if (h2CeffHEpositivedirectionReconoise2)
8323  delete h2CeffHEpositivedirectionReconoise2;
8324  //========================================================================================== 6
8325  //======================================================================
8326  //======================================================================1D plot: R vs phi , different eta, depth=3
8327  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
8328  c3x5->Clear();
8330  c3x5->Divide(3, 5);
8331  c3x5->cd(1);
8332  int kcountHEpositivedirectionReconoise3 = 1;
8333  TH1F* h2CeffHEpositivedirectionReconoise3 = new TH1F("h2CeffHEpositivedirectionReconoise3", "", nphi, 0., 72.);
8334  for (int jeta = 0; jeta < njeta; jeta++) {
8335  // positivedirectionReconoise:
8336  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
8337  // for (int i=0;i<ndepth;i++) {
8338  // depth=3
8339  for (int i = 2; i < 3; i++) {
8340  TH1F* HEpositivedirectionReconoise3 = (TH1F*)h2CeffHEpositivedirectionReconoise3->Clone("twod1");
8341  float ccctest = 0; // to avoid empty massive elements
8342  for (int jphi = 0; jphi < nphi; jphi++) {
8343  double ccc1 = areconoisehe[i][jeta][jphi];
8344  if (ccc1 != 0.) {
8345  HEpositivedirectionReconoise3->Fill(jphi, ccc1);
8346  ccctest = 1.; //HEpositivedirectionReconoise3->SetBinError(i,0.01);
8347  }
8348  } // for jphi
8349  if (ccctest > 0.) {
8350  //cout<<"666 kcountHEpositivedirectionReconoise3 = "<<kcountHEpositivedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
8351  c3x5->cd(kcountHEpositivedirectionReconoise3);
8352  HEpositivedirectionReconoise3->SetMarkerStyle(20);
8353  HEpositivedirectionReconoise3->SetMarkerSize(0.4);
8354  HEpositivedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
8355  HEpositivedirectionReconoise3->SetXTitle("HEpositivedirectionReconoise3 \b");
8356  HEpositivedirectionReconoise3->SetMarkerColor(2);
8357  HEpositivedirectionReconoise3->SetLineColor(0);
8358  gPad->SetGridy();
8359  gPad->SetGridx();
8360  // gPad->SetLogy();
8361  if (kcountHEpositivedirectionReconoise3 == 1)
8362  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
8363  if (kcountHEpositivedirectionReconoise3 == 2)
8364  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
8365  if (kcountHEpositivedirectionReconoise3 == 3)
8366  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
8367  if (kcountHEpositivedirectionReconoise3 == 4)
8368  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
8369  if (kcountHEpositivedirectionReconoise3 == 5)
8370  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
8371  if (kcountHEpositivedirectionReconoise3 == 6)
8372  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
8373  if (kcountHEpositivedirectionReconoise3 == 7)
8374  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
8375  if (kcountHEpositivedirectionReconoise3 == 8)
8376  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
8377  if (kcountHEpositivedirectionReconoise3 == 9)
8378  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
8379  if (kcountHEpositivedirectionReconoise3 == 10)
8380  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
8381  if (kcountHEpositivedirectionReconoise3 == 11)
8382  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
8383  if (kcountHEpositivedirectionReconoise3 == 12)
8384  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
8385  if (kcountHEpositivedirectionReconoise3 == 13)
8386  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
8387  HEpositivedirectionReconoise3->Draw("Error");
8388  kcountHEpositivedirectionReconoise3++;
8389  if (kcountHEpositivedirectionReconoise3 > 13)
8390  break; // 4x6 = 24
8391  } //ccctest>0
8392 
8393  } // for i
8394  } //if(jeta-41 >=
8395  } //for jeta
8397  c3x5->Update();
8398  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
8399  c3x5->Clear();
8400  // clean-up
8401  if (h2CeffHEpositivedirectionReconoise3)
8402  delete h2CeffHEpositivedirectionReconoise3;
8403  //========================================================================================== 7
8404  //======================================================================
8405  //======================================================================1D plot: R vs phi , different eta, depth=4
8406  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
8407  c3x5->Clear();
8409  c3x5->Divide(3, 5);
8410  c3x5->cd(1);
8411  int kcountHEpositivedirectionReconoise4 = 1;
8412  TH1F* h2CeffHEpositivedirectionReconoise4 = new TH1F("h2CeffHEpositivedirectionReconoise4", "", nphi, 0., 72.);
8413 
8414  for (int jeta = 0; jeta < njeta; jeta++) {
8415  // positivedirectionReconoise:
8416  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
8417  // for (int i=0;i<ndepth;i++) {
8418  // depth=4
8419  for (int i = 3; i < 4; i++) {
8420  TH1F* HEpositivedirectionReconoise4 = (TH1F*)h2CeffHEpositivedirectionReconoise4->Clone("twod1");
8421 
8422  float ccctest = 0; // to avoid empty massive elements
8423  for (int jphi = 0; jphi < nphi; jphi++) {
8424  double ccc1 = areconoisehe[i][jeta][jphi];
8425  if (ccc1 != 0.) {
8426  HEpositivedirectionReconoise4->Fill(jphi, ccc1);
8427  ccctest = 1.; //HEpositivedirectionReconoise4->SetBinError(i,0.01);
8428  }
8429  } // for jphi
8430  if (ccctest > 0.) {
8431  //cout<<"777 kcountHEpositivedirectionReconoise4 = "<<kcountHEpositivedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
8432  c3x5->cd(kcountHEpositivedirectionReconoise4);
8433  HEpositivedirectionReconoise4->SetMarkerStyle(20);
8434  HEpositivedirectionReconoise4->SetMarkerSize(0.4);
8435  HEpositivedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
8436  HEpositivedirectionReconoise4->SetXTitle("HEpositivedirectionReconoise4 \b");
8437  HEpositivedirectionReconoise4->SetMarkerColor(2);
8438  HEpositivedirectionReconoise4->SetLineColor(0);
8439  gPad->SetGridy();
8440  gPad->SetGridx();
8441  // gPad->SetLogy();
8442  if (kcountHEpositivedirectionReconoise4 == 1)
8443  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
8444  if (kcountHEpositivedirectionReconoise4 == 2)
8445  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
8446  if (kcountHEpositivedirectionReconoise4 == 3)
8447  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
8448  if (kcountHEpositivedirectionReconoise4 == 4)
8449  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
8450  if (kcountHEpositivedirectionReconoise4 == 5)
8451  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
8452  if (kcountHEpositivedirectionReconoise4 == 6)
8453  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
8454  if (kcountHEpositivedirectionReconoise4 == 7)
8455  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
8456  if (kcountHEpositivedirectionReconoise4 == 8)
8457  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
8458  if (kcountHEpositivedirectionReconoise4 == 9)
8459  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
8460  if (kcountHEpositivedirectionReconoise4 == 10)
8461  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
8462  if (kcountHEpositivedirectionReconoise4 == 11)
8463  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
8464  if (kcountHEpositivedirectionReconoise4 == 12)
8465  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
8466  HEpositivedirectionReconoise4->Draw("Error");
8467  kcountHEpositivedirectionReconoise4++;
8468  if (kcountHEpositivedirectionReconoise4 > 12)
8469  break; // 4x6 = 24
8470  } //ccctest>0
8471 
8472  } // for i
8473  } //if(jeta-41 >= -29 && jeta-41 <= -16)
8474  } //for jeta
8476  c3x5->Update();
8477  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
8478  c3x5->Clear();
8479  // clean-up
8480  if (h2CeffHEpositivedirectionReconoise4)
8481  delete h2CeffHEpositivedirectionReconoise4;
8482  //========================================================================================== 8
8483  //======================================================================
8484  //======================================================================1D plot: R vs phi , different eta, depth=5
8485  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
8486  c3x5->Clear();
8488  c3x5->Divide(3, 5);
8489  c3x5->cd(1);
8490  int kcountHEpositivedirectionReconoise5 = 1;
8491  TH1F* h2CeffHEpositivedirectionReconoise5 = new TH1F("h2CeffHEpositivedirectionReconoise5", "", nphi, 0., 72.);
8492 
8493  for (int jeta = 0; jeta < njeta; jeta++) {
8494  // positivedirectionReconoise:
8495  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
8496  // for (int i=0;i<ndepth;i++) {
8497  // depth=5
8498  for (int i = 4; i < 5; i++) {
8499  TH1F* HEpositivedirectionReconoise5 = (TH1F*)h2CeffHEpositivedirectionReconoise5->Clone("twod1");
8500 
8501  float ccctest = 0; // to avoid empty massive elements
8502  for (int jphi = 0; jphi < nphi; jphi++) {
8503  // cout<<"888 initial kcountHEpositivedirectionReconoise5 = "<<kcountHEpositivedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" areconoisehe[i][jeta][jphi]= "<< areconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
8504 
8505  double ccc1 = areconoisehe[i][jeta][jphi];
8506  if (ccc1 != 0.) {
8507  HEpositivedirectionReconoise5->Fill(jphi, ccc1);
8508  ccctest = 1.; //HEpositivedirectionReconoise5->SetBinError(i,0.01);
8509  }
8510  } // for jphi
8511  if (ccctest > 0.) {
8512  //cout<<"888 kcountHEpositivedirectionReconoise5 = "<<kcountHEpositivedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<endl;
8513  c3x5->cd(kcountHEpositivedirectionReconoise5);
8514  HEpositivedirectionReconoise5->SetMarkerStyle(20);
8515  HEpositivedirectionReconoise5->SetMarkerSize(0.4);
8516  HEpositivedirectionReconoise5->GetYaxis()->SetLabelSize(0.04);
8517  HEpositivedirectionReconoise5->SetXTitle("HEpositivedirectionReconoise5 \b");
8518  HEpositivedirectionReconoise5->SetMarkerColor(2);
8519  HEpositivedirectionReconoise5->SetLineColor(0);
8520  gPad->SetGridy();
8521  gPad->SetGridx();
8522  // gPad->SetLogy();
8523  if (kcountHEpositivedirectionReconoise5 == 1)
8524  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
8525  if (kcountHEpositivedirectionReconoise5 == 2)
8526  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
8527  if (kcountHEpositivedirectionReconoise5 == 3)
8528  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
8529  if (kcountHEpositivedirectionReconoise5 == 4)
8530  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
8531  if (kcountHEpositivedirectionReconoise5 == 5)
8532  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
8533  if (kcountHEpositivedirectionReconoise5 == 6)
8534  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
8535  if (kcountHEpositivedirectionReconoise5 == 7)
8536  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
8537  if (kcountHEpositivedirectionReconoise5 == 8)
8538  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
8539  if (kcountHEpositivedirectionReconoise5 == 9)
8540  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
8541  if (kcountHEpositivedirectionReconoise5 == 10)
8542  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
8543  if (kcountHEpositivedirectionReconoise5 == 11)
8544  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
8545  HEpositivedirectionReconoise5->Draw("Error");
8546  kcountHEpositivedirectionReconoise5++;
8547  if (kcountHEpositivedirectionReconoise5 > 11)
8548  break; // 4x6 = 24
8549  } //ccctest>0
8550 
8551  } // for i
8552  } //if(jeta-41 >= -29 && jeta-41 <= -16)
8553  } //for jeta
8555  c3x5->Update();
8556  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
8557  c3x5->Clear();
8558  // clean-up
8559  if (h2CeffHEpositivedirectionReconoise5)
8560  delete h2CeffHEpositivedirectionReconoise5;
8561  //========================================================================================== 9
8562  //======================================================================
8563  //======================================================================1D plot: R vs phi , different eta, depth=6
8564  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
8565  c3x5->Clear();
8567  c3x5->Divide(3, 5);
8568  c3x5->cd(1);
8569  int kcountHEpositivedirectionReconoise6 = 1;
8570  TH1F* h2CeffHEpositivedirectionReconoise6 = new TH1F("h2CeffHEpositivedirectionReconoise6", "", nphi, 0., 72.);
8571 
8572  for (int jeta = 0; jeta < njeta; jeta++) {
8573  // positivedirectionReconoise:
8574  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
8575  // for (int i=0;i<ndepth;i++) {
8576  // depth=6
8577  for (int i = 5; i < 6; i++) {
8578  TH1F* HEpositivedirectionReconoise6 = (TH1F*)h2CeffHEpositivedirectionReconoise6->Clone("twod1");
8579 
8580  float ccctest = 0; // to avoid empty massive elements
8581  for (int jphi = 0; jphi < nphi; jphi++) {
8582  double ccc1 = areconoisehe[i][jeta][jphi];
8583  if (ccc1 != 0.) {
8584  HEpositivedirectionReconoise6->Fill(jphi, ccc1);
8585  ccctest = 1.; //HEpositivedirectionReconoise6->SetBinError(i,0.01);
8586  }
8587  } // for jphi
8588  if (ccctest > 0.) {
8589  //cout<<"999 kcountHEpositivedirectionReconoise6 = "<<kcountHEpositivedirectionReconoise6 <<" jeta-41= "<< jeta-41 <<endl;
8590  c3x5->cd(kcountHEpositivedirectionReconoise6);
8591  HEpositivedirectionReconoise6->SetMarkerStyle(20);
8592  HEpositivedirectionReconoise6->SetMarkerSize(0.4);
8593  HEpositivedirectionReconoise6->GetYaxis()->SetLabelSize(0.04);
8594  HEpositivedirectionReconoise6->SetXTitle("HEpositivedirectionReconoise6 \b");
8595  HEpositivedirectionReconoise6->SetMarkerColor(2);
8596  HEpositivedirectionReconoise6->SetLineColor(0);
8597  gPad->SetGridy();
8598  gPad->SetGridx();
8599  // gPad->SetLogy();
8600  if (kcountHEpositivedirectionReconoise6 == 1)
8601  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
8602  if (kcountHEpositivedirectionReconoise6 == 2)
8603  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
8604  if (kcountHEpositivedirectionReconoise6 == 3)
8605  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
8606  if (kcountHEpositivedirectionReconoise6 == 4)
8607  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
8608  if (kcountHEpositivedirectionReconoise6 == 5)
8609  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
8610  if (kcountHEpositivedirectionReconoise6 == 6)
8611  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
8612  if (kcountHEpositivedirectionReconoise6 == 7)
8613  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
8614  if (kcountHEpositivedirectionReconoise6 == 8)
8615  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
8616  if (kcountHEpositivedirectionReconoise6 == 9)
8617  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
8618  if (kcountHEpositivedirectionReconoise6 == 10)
8619  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
8620  HEpositivedirectionReconoise6->Draw("Error");
8621  kcountHEpositivedirectionReconoise6++;
8622  if (kcountHEpositivedirectionReconoise6 > 10)
8623  break; // 4x6 = 24
8624  } //ccctest>0
8625 
8626  } // for i
8627  } //if(jeta-41 >= -29 && jeta-41 <= -16)
8628  } //for jeta
8630  c3x5->Update();
8631  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
8632  c3x5->Clear();
8633  // clean-up
8634  if (h2CeffHEpositivedirectionReconoise6)
8635  delete h2CeffHEpositivedirectionReconoise6;
8636  //========================================================================================== 10
8637  //======================================================================
8638  //======================================================================1D plot: R vs phi , different eta, depth=7
8639  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
8640  c3x5->Clear();
8642  c3x5->Divide(3, 5);
8643  c3x5->cd(1);
8644  int kcountHEpositivedirectionReconoise7 = 1;
8645  TH1F* h2CeffHEpositivedirectionReconoise7 = new TH1F("h2CeffHEpositivedirectionReconoise7", "", nphi, 0., 72.);
8646 
8647  for (int jeta = 0; jeta < njeta; jeta++) {
8648  // positivedirectionReconoise:
8649  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
8650  // for (int i=0;i<ndepth;i++) {
8651  // depth=7
8652  for (int i = 6; i < 7; i++) {
8653  TH1F* HEpositivedirectionReconoise7 = (TH1F*)h2CeffHEpositivedirectionReconoise7->Clone("twod1");
8654 
8655  float ccctest = 0; // to avoid empty massive elements
8656  for (int jphi = 0; jphi < nphi; jphi++) {
8657  double ccc1 = areconoisehe[i][jeta][jphi];
8658  if (ccc1 != 0.) {
8659  HEpositivedirectionReconoise7->Fill(jphi, ccc1);
8660  ccctest = 1.; //HEpositivedirectionReconoise7->SetBinError(i,0.01);
8661  }
8662  } // for jphi
8663  if (ccctest > 0.) {
8664  //cout<<"1010 kcountHEpositivedirectionReconoise7 = "<<kcountHEpositivedirectionReconoise7 <<" jeta-41= "<< jeta-41 <<endl;
8665  c3x5->cd(kcountHEpositivedirectionReconoise7);
8666  HEpositivedirectionReconoise7->SetMarkerStyle(20);
8667  HEpositivedirectionReconoise7->SetMarkerSize(0.4);
8668  HEpositivedirectionReconoise7->GetYaxis()->SetLabelSize(0.04);
8669  HEpositivedirectionReconoise7->SetXTitle("HEpositivedirectionReconoise7 \b");
8670  HEpositivedirectionReconoise7->SetMarkerColor(2);
8671  HEpositivedirectionReconoise7->SetLineColor(0);
8672  gPad->SetGridy();
8673  gPad->SetGridx();
8674  // gPad->SetLogy();
8675  if (kcountHEpositivedirectionReconoise7 == 1)
8676  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
8677  if (kcountHEpositivedirectionReconoise7 == 2)
8678  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
8679  if (kcountHEpositivedirectionReconoise7 == 3)
8680  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
8681  HEpositivedirectionReconoise7->Draw("Error");
8682  kcountHEpositivedirectionReconoise7++;
8683  if (kcountHEpositivedirectionReconoise7 > 3)
8684  break; //
8685  } //ccctest>0
8686 
8687  } // for i
8688  } //if(jeta-41 >= -29 && jeta-41 <= -16)
8689  } //for jeta
8691  c3x5->Update();
8692  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
8693  c3x5->Clear();
8694  // clean-up
8695  if (h2CeffHEpositivedirectionReconoise7)
8696  delete h2CeffHEpositivedirectionReconoise7;
8697 
8699  //========================================================================================== 1114
8700  //======================================================================
8701  //======================================================================1D plot: R vs phi , different eta, depth=1
8702  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
8703  c3x5->Clear();
8705  c3x5->Divide(3, 5);
8706  c3x5->cd(1);
8707  int kcountHEnegativedirectionReconoise1 = 1;
8708  TH1F* h2CeffHEnegativedirectionReconoise1 = new TH1F("h2CeffHEnegativedirectionReconoise1", "", nphi, 0., 72.);
8709  for (int jeta = 0; jeta < njeta; jeta++) {
8710  // negativedirectionReconoise:
8711  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
8712  // for (int i=0;i<ndepth;i++) {
8713  // depth=1
8714  for (int i = 0; i < 1; i++) {
8715  TH1F* HEnegativedirectionReconoise1 = (TH1F*)h2CeffHEnegativedirectionReconoise1->Clone("twod1");
8716  float ccctest = 0; // to avoid empty massive elements
8717  for (int jphi = 0; jphi < nphi; jphi++) {
8718  double ccc1 = areconoisehe[i][jeta][jphi];
8719  if (ccc1 != 0.) {
8720  HEnegativedirectionReconoise1->Fill(jphi, ccc1);
8721  ccctest = 1.; //HEnegativedirectionReconoise1->SetBinError(i,0.01);
8722  }
8723  } // for jphi
8724  if (ccctest > 0.) {
8725  // cout<<"444 kcountHEnegativedirectionReconoise1 = "<<kcountHEnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
8726  c3x5->cd(kcountHEnegativedirectionReconoise1);
8727  HEnegativedirectionReconoise1->SetMarkerStyle(20);
8728  HEnegativedirectionReconoise1->SetMarkerSize(0.4);
8729  HEnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
8730  HEnegativedirectionReconoise1->SetXTitle("HEnegativedirectionReconoise1 \b");
8731  HEnegativedirectionReconoise1->SetMarkerColor(2);
8732  HEnegativedirectionReconoise1->SetLineColor(0);
8733  gPad->SetGridy();
8734  gPad->SetGridx();
8735  // gPad->SetLogy();
8736  if (kcountHEnegativedirectionReconoise1 == 1)
8737  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
8738  if (kcountHEnegativedirectionReconoise1 == 2)
8739  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
8740  if (kcountHEnegativedirectionReconoise1 == 3)
8741  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
8742  if (kcountHEnegativedirectionReconoise1 == 4)
8743  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
8744  if (kcountHEnegativedirectionReconoise1 == 5)
8745  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
8746  if (kcountHEnegativedirectionReconoise1 == 6)
8747  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
8748  if (kcountHEnegativedirectionReconoise1 == 7)
8749  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
8750  if (kcountHEnegativedirectionReconoise1 == 8)
8751  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
8752  if (kcountHEnegativedirectionReconoise1 == 9)
8753  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
8754  if (kcountHEnegativedirectionReconoise1 == 10)
8755  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
8756  if (kcountHEnegativedirectionReconoise1 == 11)
8757  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
8758  if (kcountHEnegativedirectionReconoise1 == 12)
8759  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
8760  HEnegativedirectionReconoise1->Draw("Error");
8761  kcountHEnegativedirectionReconoise1++;
8762  if (kcountHEnegativedirectionReconoise1 > 12)
8763  break; // 4x6 = 24
8764  } //ccctest>0
8765 
8766  } // for i
8767  } //if(jeta-41 >= -29 && jeta-41 <= -16)
8768  } //for jeta
8770  c3x5->Update();
8771  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
8772  c3x5->Clear();
8773  // clean-up
8774  if (h2CeffHEnegativedirectionReconoise1)
8775  delete h2CeffHEnegativedirectionReconoise1;
8776 
8777  //========================================================================================== 1115
8778  //======================================================================
8779  //======================================================================1D plot: R vs phi , different eta, depth=2
8780  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
8781  c3x5->Clear();
8783  c3x5->Divide(3, 5);
8784  c3x5->cd(1);
8785  int kcountHEnegativedirectionReconoise2 = 1;
8786  TH1F* h2CeffHEnegativedirectionReconoise2 = new TH1F("h2CeffHEnegativedirectionReconoise2", "", nphi, 0., 72.);
8787  for (int jeta = 0; jeta < njeta; jeta++) {
8788  // negativedirectionReconoise:
8789  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
8790  // for (int i=0;i<ndepth;i++) {
8791  // depth=2
8792  for (int i = 1; i < 2; i++) {
8793  TH1F* HEnegativedirectionReconoise2 = (TH1F*)h2CeffHEnegativedirectionReconoise2->Clone("twod1");
8794  float ccctest = 0; // to avoid empty massive elements
8795  for (int jphi = 0; jphi < nphi; jphi++) {
8796  double ccc1 = areconoisehe[i][jeta][jphi];
8797  if (ccc1 != 0.) {
8798  HEnegativedirectionReconoise2->Fill(jphi, ccc1);
8799  ccctest = 1.; //HEnegativedirectionReconoise2->SetBinError(i,0.01);
8800  }
8801  } // for jphi
8802  if (ccctest > 0.) {
8803  //cout<<"555 kcountHEnegativedirectionReconoise2 = "<<kcountHEnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
8804  c3x5->cd(kcountHEnegativedirectionReconoise2);
8805  HEnegativedirectionReconoise2->SetMarkerStyle(20);
8806  HEnegativedirectionReconoise2->SetMarkerSize(0.4);
8807  HEnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
8808  HEnegativedirectionReconoise2->SetXTitle("HEnegativedirectionReconoise2 \b");
8809  HEnegativedirectionReconoise2->SetMarkerColor(2);
8810  HEnegativedirectionReconoise2->SetLineColor(0);
8811  gPad->SetGridy();
8812  gPad->SetGridx();
8813  // gPad->SetLogy();
8814  if (kcountHEnegativedirectionReconoise2 == 1)
8815  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
8816  if (kcountHEnegativedirectionReconoise2 == 2)
8817  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
8818  if (kcountHEnegativedirectionReconoise2 == 3)
8819  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
8820  if (kcountHEnegativedirectionReconoise2 == 4)
8821  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
8822  if (kcountHEnegativedirectionReconoise2 == 5)
8823  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
8824  if (kcountHEnegativedirectionReconoise2 == 6)
8825  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
8826  if (kcountHEnegativedirectionReconoise2 == 7)
8827  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
8828  if (kcountHEnegativedirectionReconoise2 == 8)
8829  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
8830  if (kcountHEnegativedirectionReconoise2 == 9)
8831  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
8832  if (kcountHEnegativedirectionReconoise2 == 10)
8833  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
8834  if (kcountHEnegativedirectionReconoise2 == 11)
8835  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
8836  if (kcountHEnegativedirectionReconoise2 == 12)
8837  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
8838  if (kcountHEnegativedirectionReconoise2 == 13)
8839  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
8840  HEnegativedirectionReconoise2->Draw("Error");
8841  kcountHEnegativedirectionReconoise2++;
8842  if (kcountHEnegativedirectionReconoise2 > 13)
8843  break; // 4x6 = 24
8844  } //ccctest>0
8845 
8846  } // for i
8847  } //if(jeta-41 >= -29 && jeta-41 <= -16)
8848  } //for jeta
8850  c3x5->Update();
8851  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
8852  c3x5->Clear();
8853  // clean-up
8854  if (h2CeffHEnegativedirectionReconoise2)
8855  delete h2CeffHEnegativedirectionReconoise2;
8856  //========================================================================================== 1116
8857  //======================================================================
8858  //======================================================================1D plot: R vs phi , different eta, depth=3
8859  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
8860  c3x5->Clear();
8862  c3x5->Divide(3, 5);
8863  c3x5->cd(1);
8864  int kcountHEnegativedirectionReconoise3 = 1;
8865  TH1F* h2CeffHEnegativedirectionReconoise3 = new TH1F("h2CeffHEnegativedirectionReconoise3", "", nphi, 0., 72.);
8866  for (int jeta = 0; jeta < njeta; jeta++) {
8867  // negativedirectionReconoise:
8868  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
8869  // for (int i=0;i<ndepth;i++) {
8870  // depth=3
8871  for (int i = 2; i < 3; i++) {
8872  TH1F* HEnegativedirectionReconoise3 = (TH1F*)h2CeffHEnegativedirectionReconoise3->Clone("twod1");
8873  float ccctest = 0; // to avoid empty massive elements
8874  for (int jphi = 0; jphi < nphi; jphi++) {
8875  double ccc1 = areconoisehe[i][jeta][jphi];
8876  if (ccc1 != 0.) {
8877  HEnegativedirectionReconoise3->Fill(jphi, ccc1);
8878  ccctest = 1.; //HEnegativedirectionReconoise3->SetBinError(i,0.01);
8879  }
8880  } // for jphi
8881  if (ccctest > 0.) {
8882  //cout<<"666 kcountHEnegativedirectionReconoise3 = "<<kcountHEnegativedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
8883  c3x5->cd(kcountHEnegativedirectionReconoise3);
8884  HEnegativedirectionReconoise3->SetMarkerStyle(20);
8885  HEnegativedirectionReconoise3->SetMarkerSize(0.4);
8886  HEnegativedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
8887  HEnegativedirectionReconoise3->SetXTitle("HEnegativedirectionReconoise3 \b");
8888  HEnegativedirectionReconoise3->SetMarkerColor(2);
8889  HEnegativedirectionReconoise3->SetLineColor(0);
8890  gPad->SetGridy();
8891  gPad->SetGridx();
8892  // gPad->SetLogy();
8893  if (kcountHEnegativedirectionReconoise3 == 1)
8894  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
8895  if (kcountHEnegativedirectionReconoise3 == 2)
8896  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
8897  if (kcountHEnegativedirectionReconoise3 == 3)
8898  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
8899  if (kcountHEnegativedirectionReconoise3 == 4)
8900  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
8901  if (kcountHEnegativedirectionReconoise3 == 5)
8902  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
8903  if (kcountHEnegativedirectionReconoise3 == 6)
8904  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
8905  if (kcountHEnegativedirectionReconoise3 == 7)
8906  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
8907  if (kcountHEnegativedirectionReconoise3 == 8)
8908  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
8909  if (kcountHEnegativedirectionReconoise3 == 9)
8910  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
8911  if (kcountHEnegativedirectionReconoise3 == 10)
8912  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
8913  if (kcountHEnegativedirectionReconoise3 == 11)
8914  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
8915  if (kcountHEnegativedirectionReconoise3 == 12)
8916  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
8917  if (kcountHEnegativedirectionReconoise3 == 13)
8918  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
8919  HEnegativedirectionReconoise3->Draw("Error");
8920  kcountHEnegativedirectionReconoise3++;
8921  if (kcountHEnegativedirectionReconoise3 > 13)
8922  break; // 4x6 = 24
8923  } //ccctest>0
8924 
8925  } // for i
8926  } //if(jeta-41 >= -29 && jeta-41 <= -16)
8927  } //for jeta
8929  c3x5->Update();
8930  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
8931  c3x5->Clear();
8932  // clean-up
8933  if (h2CeffHEnegativedirectionReconoise3)
8934  delete h2CeffHEnegativedirectionReconoise3;
8935  //========================================================================================== 1117
8936  //======================================================================
8937  //======================================================================1D plot: R vs phi , different eta, depth=4
8938  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
8939  c3x5->Clear();
8941  c3x5->Divide(3, 5);
8942  c3x5->cd(1);
8943  int kcountHEnegativedirectionReconoise4 = 1;
8944  TH1F* h2CeffHEnegativedirectionReconoise4 = new TH1F("h2CeffHEnegativedirectionReconoise4", "", nphi, 0., 72.);
8945 
8946  for (int jeta = 0; jeta < njeta; jeta++) {
8947  // negativedirectionReconoise:
8948  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
8949  // for (int i=0;i<ndepth;i++) {
8950  // depth=4
8951  for (int i = 3; i < 4; i++) {
8952  TH1F* HEnegativedirectionReconoise4 = (TH1F*)h2CeffHEnegativedirectionReconoise4->Clone("twod1");
8953 
8954  float ccctest = 0; // to avoid empty massive elements
8955  for (int jphi = 0; jphi < nphi; jphi++) {
8956  double ccc1 = areconoisehe[i][jeta][jphi];
8957  if (ccc1 != 0.) {
8958  HEnegativedirectionReconoise4->Fill(jphi, ccc1);
8959  ccctest = 1.; //HEnegativedirectionReconoise4->SetBinError(i,0.01);
8960  }
8961  } // for jphi
8962  if (ccctest > 0.) {
8963  //cout<<"777 kcountHEnegativedirectionReconoise4 = "<<kcountHEnegativedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
8964  c3x5->cd(kcountHEnegativedirectionReconoise4);
8965  HEnegativedirectionReconoise4->SetMarkerStyle(20);
8966  HEnegativedirectionReconoise4->SetMarkerSize(0.4);
8967  HEnegativedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
8968  HEnegativedirectionReconoise4->SetXTitle("HEnegativedirectionReconoise4 \b");
8969  HEnegativedirectionReconoise4->SetMarkerColor(2);
8970  HEnegativedirectionReconoise4->SetLineColor(0);
8971  gPad->SetGridy();
8972  gPad->SetGridx();
8973  // gPad->SetLogy();
8974  if (kcountHEnegativedirectionReconoise4 == 1)
8975  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
8976  if (kcountHEnegativedirectionReconoise4 == 2)
8977  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
8978  if (kcountHEnegativedirectionReconoise4 == 3)
8979  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
8980  if (kcountHEnegativedirectionReconoise4 == 4)
8981  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
8982  if (kcountHEnegativedirectionReconoise4 == 5)
8983  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
8984  if (kcountHEnegativedirectionReconoise4 == 6)
8985  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
8986  if (kcountHEnegativedirectionReconoise4 == 7)
8987  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
8988  if (kcountHEnegativedirectionReconoise4 == 8)
8989  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
8990  if (kcountHEnegativedirectionReconoise4 == 9)
8991  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
8992  if (kcountHEnegativedirectionReconoise4 == 10)
8993  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
8994  if (kcountHEnegativedirectionReconoise4 == 11)
8995  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
8996  if (kcountHEnegativedirectionReconoise4 == 12)
8997  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
8998  HEnegativedirectionReconoise4->Draw("Error");
8999  kcountHEnegativedirectionReconoise4++;
9000  if (kcountHEnegativedirectionReconoise4 > 12)
9001  break; // 4x6 = 24
9002  } //ccctest>0
9003 
9004  } // for i
9005  } //if(jeta-41 >= -29 && jeta-41 <= -16)
9006  } //for jeta
9008  c3x5->Update();
9009  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
9010  c3x5->Clear();
9011  // clean-up
9012  if (h2CeffHEnegativedirectionReconoise4)
9013  delete h2CeffHEnegativedirectionReconoise4;
9014  //========================================================================================== 1118
9015  //======================================================================
9016  //======================================================================1D plot: R vs phi , different eta, depth=5
9017  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
9018  c3x5->Clear();
9020  c3x5->Divide(3, 5);
9021  c3x5->cd(1);
9022  int kcountHEnegativedirectionReconoise5 = 1;
9023  TH1F* h2CeffHEnegativedirectionReconoise5 = new TH1F("h2CeffHEnegativedirectionReconoise5", "", nphi, 0., 72.);
9024 
9025  for (int jeta = 0; jeta < njeta; jeta++) {
9026  // negativedirectionReconoise:
9027  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
9028  // for (int i=0;i<ndepth;i++) {
9029  // depth=5
9030  for (int i = 4; i < 5; i++) {
9031  TH1F* HEnegativedirectionReconoise5 = (TH1F*)h2CeffHEnegativedirectionReconoise5->Clone("twod1");
9032 
9033  float ccctest = 0; // to avoid empty massive elements
9034  for (int jphi = 0; jphi < nphi; jphi++) {
9035  // cout<<"888 initial kcountHEnegativedirectionReconoise5 = "<<kcountHEnegativedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" areconoisehe[i][jeta][jphi]= "<< areconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
9036 
9037  double ccc1 = areconoisehe[i][jeta][jphi];
9038  if (ccc1 != 0.) {
9039  HEnegativedirectionReconoise5->Fill(jphi, ccc1);
9040  ccctest = 1.; //HEnegativedirectionReconoise5->SetBinError(i,0.01);
9041  }
9042  } // for jphi
9043  if (ccctest > 0.) {
9044  //cout<<"888 kcountHEnegativedirectionReconoise5 = "<<kcountHEnegativedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<endl;
9045  c3x5->cd(kcountHEnegativedirectionReconoise5);
9046  HEnegativedirectionReconoise5->SetMarkerStyle(20);
9047  HEnegativedirectionReconoise5->SetMarkerSize(0.4);
9048  HEnegativedirectionReconoise5->GetYaxis()->SetLabelSize(0.04);
9049  HEnegativedirectionReconoise5->SetXTitle("HEnegativedirectionReconoise5 \b");
9050  HEnegativedirectionReconoise5->SetMarkerColor(2);
9051  HEnegativedirectionReconoise5->SetLineColor(0);
9052  gPad->SetGridy();
9053  gPad->SetGridx();
9054  // gPad->SetLogy();
9055  if (kcountHEnegativedirectionReconoise5 == 1)
9056  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
9057  if (kcountHEnegativedirectionReconoise5 == 2)
9058  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
9059  if (kcountHEnegativedirectionReconoise5 == 3)
9060  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
9061  if (kcountHEnegativedirectionReconoise5 == 4)
9062  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
9063  if (kcountHEnegativedirectionReconoise5 == 5)
9064  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
9065  if (kcountHEnegativedirectionReconoise5 == 6)
9066  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
9067  if (kcountHEnegativedirectionReconoise5 == 7)
9068  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
9069  if (kcountHEnegativedirectionReconoise5 == 8)
9070  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
9071  if (kcountHEnegativedirectionReconoise5 == 9)
9072  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
9073  if (kcountHEnegativedirectionReconoise5 == 10)
9074  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
9075  if (kcountHEnegativedirectionReconoise5 == 11)
9076  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
9077  HEnegativedirectionReconoise5->Draw("Error");
9078  kcountHEnegativedirectionReconoise5++;
9079  if (kcountHEnegativedirectionReconoise5 > 11)
9080  break; // 4x6 = 24
9081  } //ccctest>0
9082 
9083  } // for i
9084  } //if(jeta-41 >= -29 && jeta-41 <= -16)
9085  } //for jeta
9087  c3x5->Update();
9088  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
9089  c3x5->Clear();
9090  // clean-up
9091  if (h2CeffHEnegativedirectionReconoise5)
9092  delete h2CeffHEnegativedirectionReconoise5;
9093  //========================================================================================== 1119
9094  //======================================================================
9095  //======================================================================1D plot: R vs phi , different eta, depth=6
9096  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
9097  c3x5->Clear();
9099  c3x5->Divide(3, 5);
9100  c3x5->cd(1);
9101  int kcountHEnegativedirectionReconoise6 = 1;
9102  TH1F* h2CeffHEnegativedirectionReconoise6 = new TH1F("h2CeffHEnegativedirectionReconoise6", "", nphi, 0., 72.);
9103 
9104  for (int jeta = 0; jeta < njeta; jeta++) {
9105  // negativedirectionReconoise:
9106  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
9107  // for (int i=0;i<ndepth;i++) {
9108  // depth=6
9109  for (int i = 5; i < 6; i++) {
9110  TH1F* HEnegativedirectionReconoise6 = (TH1F*)h2CeffHEnegativedirectionReconoise6->Clone("twod1");
9111 
9112  float ccctest = 0; // to avoid empty massive elements
9113  for (int jphi = 0; jphi < nphi; jphi++) {
9114  double ccc1 = areconoisehe[i][jeta][jphi];
9115  if (ccc1 != 0.) {
9116  HEnegativedirectionReconoise6->Fill(jphi, ccc1);
9117  ccctest = 1.; //HEnegativedirectionReconoise6->SetBinError(i,0.01);
9118  }
9119  } // for jphi
9120  if (ccctest > 0.) {
9121  //cout<<"999 kcountHEnegativedirectionReconoise6 = "<<kcountHEnegativedirectionReconoise6 <<" jeta-41= "<< jeta-41 <<endl;
9122  c3x5->cd(kcountHEnegativedirectionReconoise6);
9123  HEnegativedirectionReconoise6->SetMarkerStyle(20);
9124  HEnegativedirectionReconoise6->SetMarkerSize(0.4);
9125  HEnegativedirectionReconoise6->GetYaxis()->SetLabelSize(0.04);
9126  HEnegativedirectionReconoise6->SetXTitle("HEnegativedirectionReconoise6 \b");
9127  HEnegativedirectionReconoise6->SetMarkerColor(2);
9128  HEnegativedirectionReconoise6->SetLineColor(0);
9129  gPad->SetGridy();
9130  gPad->SetGridx();
9131  // gPad->SetLogy();
9132  if (kcountHEnegativedirectionReconoise6 == 1)
9133  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
9134  if (kcountHEnegativedirectionReconoise6 == 2)
9135  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
9136  if (kcountHEnegativedirectionReconoise6 == 3)
9137  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
9138  if (kcountHEnegativedirectionReconoise6 == 4)
9139  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
9140  if (kcountHEnegativedirectionReconoise6 == 5)
9141  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
9142  if (kcountHEnegativedirectionReconoise6 == 6)
9143  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
9144  if (kcountHEnegativedirectionReconoise6 == 7)
9145  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
9146  if (kcountHEnegativedirectionReconoise6 == 8)
9147  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
9148  if (kcountHEnegativedirectionReconoise6 == 9)
9149  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
9150  if (kcountHEnegativedirectionReconoise6 == 10)
9151  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
9152  HEnegativedirectionReconoise6->Draw("Error");
9153  kcountHEnegativedirectionReconoise6++;
9154  if (kcountHEnegativedirectionReconoise6 > 10)
9155  break; // 4x6 = 24
9156  } //ccctest>0
9157 
9158  } // for i
9159  } //if(jeta-41 >= -29 && jeta-41 <= -16)
9160  } //for jeta
9162  c3x5->Update();
9163  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
9164  c3x5->Clear();
9165  // clean-up
9166  if (h2CeffHEnegativedirectionReconoise6)
9167  delete h2CeffHEnegativedirectionReconoise6;
9168  //========================================================================================== 11110
9169  //======================================================================
9170  //======================================================================1D plot: R vs phi , different eta, depth=7
9171  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
9172  c3x5->Clear();
9174  c3x5->Divide(3, 5);
9175  c3x5->cd(1);
9176  int kcountHEnegativedirectionReconoise7 = 1;
9177  TH1F* h2CeffHEnegativedirectionReconoise7 = new TH1F("h2CeffHEnegativedirectionReconoise7", "", nphi, 0., 72.);
9178 
9179  for (int jeta = 0; jeta < njeta; jeta++) {
9180  // negativedirectionReconoise:
9181  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
9182  // for (int i=0;i<ndepth;i++) {
9183  // depth=7
9184  for (int i = 6; i < 7; i++) {
9185  TH1F* HEnegativedirectionReconoise7 = (TH1F*)h2CeffHEnegativedirectionReconoise7->Clone("twod1");
9186 
9187  float ccctest = 0; // to avoid empty massive elements
9188  for (int jphi = 0; jphi < nphi; jphi++) {
9189  double ccc1 = areconoisehe[i][jeta][jphi];
9190  if (ccc1 != 0.) {
9191  HEnegativedirectionReconoise7->Fill(jphi, ccc1);
9192  ccctest = 1.; //HEnegativedirectionReconoise7->SetBinError(i,0.01);
9193  }
9194  } // for jphi
9195  if (ccctest > 0.) {
9196  //cout<<"1010 kcountHEnegativedirectionReconoise7 = "<<kcountHEnegativedirectionReconoise7 <<" jeta-41= "<< jeta-41 <<endl;
9197  c3x5->cd(kcountHEnegativedirectionReconoise7);
9198  HEnegativedirectionReconoise7->SetMarkerStyle(20);
9199  HEnegativedirectionReconoise7->SetMarkerSize(0.4);
9200  HEnegativedirectionReconoise7->GetYaxis()->SetLabelSize(0.04);
9201  HEnegativedirectionReconoise7->SetXTitle("HEnegativedirectionReconoise7 \b");
9202  HEnegativedirectionReconoise7->SetMarkerColor(2);
9203  HEnegativedirectionReconoise7->SetLineColor(0);
9204  gPad->SetGridy();
9205  gPad->SetGridx();
9206  // gPad->SetLogy();
9207  if (kcountHEnegativedirectionReconoise7 == 1)
9208  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
9209  if (kcountHEnegativedirectionReconoise7 == 2)
9210  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
9211  if (kcountHEnegativedirectionReconoise7 == 3)
9212  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
9213  HEnegativedirectionReconoise7->Draw("Error");
9214  kcountHEnegativedirectionReconoise7++;
9215  if (kcountHEnegativedirectionReconoise7 > 3)
9216  break; // 4x6 = 24
9217  } //ccctest>0
9218 
9219  } // for i
9220  } //if(jeta-41 >= -29 && jeta-41 <= -16)
9221  } //for jeta
9223  c3x5->Update();
9224  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
9225  c3x5->Clear();
9226  // clean-up
9227  if (h2CeffHEnegativedirectionReconoise7)
9228  delete h2CeffHEnegativedirectionReconoise7;
9229 
9230  //======================================================================================================================
9231  //======================================================================================================================
9233  //======================================================================================================================
9234  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HE
9235  //======================================================================================================================
9236  //======================================================================
9237  c2x1->Clear();
9239  c2x1->Divide(2, 1);
9240  c2x1->cd(1);
9241  TH2F* GefzDIFreconoiseHE42D = new TH2F("GefzDIFreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
9242  TH2F* GefzDIFreconoiseHE42D0 = new TH2F("GefzDIFreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
9243  TH2F* GefzDIFreconoiseHE42DF = (TH2F*)GefzDIFreconoiseHE42D0->Clone("GefzDIFreconoiseHE42DF");
9244  for (int i = 0; i < ndepth; i++) {
9245  for (int jeta = 0; jeta < neta; jeta++) {
9246  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
9247  for (int jphi = 0; jphi < nphi; jphi++) {
9248  double ccc1 = breconoisehe[i][jeta][jphi];
9249  int k2plot = jeta - 41;
9250  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
9251  if (ccc1 != 0.) {
9252  GefzDIFreconoiseHE42D->Fill(kkk, jphi, ccc1);
9253  GefzDIFreconoiseHE42D0->Fill(kkk, jphi, 1.);
9254  }
9255  }
9256  }
9257  }
9258  }
9259  GefzDIFreconoiseHE42DF->Divide(GefzDIFreconoiseHE42D, GefzDIFreconoiseHE42D0, 1, 1, "B"); // average A
9260  gPad->SetGridy();
9261  gPad->SetGridx(); // gPad->SetLogz();
9262  GefzDIFreconoiseHE42DF->SetXTitle("<DIF>_depth #eta \b");
9263  GefzDIFreconoiseHE42DF->SetYTitle(" #phi \b");
9264  GefzDIFreconoiseHE42DF->Draw("COLZ");
9265 
9266  //c2x1->cd(2);
9267  //TH1F *energyhitNoise_HE= (TH1F*)dir->FindObjectAny("h_energyhitNoise_HE");
9268  //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");
9269 
9271  c2x1->Update();
9272  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHE.png");
9273  c2x1->Clear();
9274  // clean-up
9275  if (GefzDIFreconoiseHE42D)
9276  delete GefzDIFreconoiseHE42D;
9277  if (GefzDIFreconoiseHE42D0)
9278  delete GefzDIFreconoiseHE42D0;
9279  if (GefzDIFreconoiseHE42DF)
9280  delete GefzDIFreconoiseHE42DF;
9281  //====================================================================== 1D plot: DIF vs phi , averaged over depthes & eta
9282  //======================================================================
9283  //cout<<" 1D plot: DIF vs phi , averaged over depthes & eta *****" <<endl;
9284  c1x1->Clear();
9286  c1x1->Divide(1, 1);
9287  c1x1->cd(1);
9288  TH1F* GefzDIFreconoiseHE41D = new TH1F("GefzDIFreconoiseHE41D", "", nphi, 0., 72.);
9289  TH1F* GefzDIFreconoiseHE41D0 = new TH1F("GefzDIFreconoiseHE41D0", "", nphi, 0., 72.);
9290  TH1F* GefzDIFreconoiseHE41DF = (TH1F*)GefzDIFreconoiseHE41D0->Clone("GefzDIFreconoiseHE41DF");
9291  for (int jphi = 0; jphi < nphi; jphi++) {
9292  for (int jeta = 0; jeta < neta; jeta++) {
9293  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
9294  for (int i = 0; i < ndepth; i++) {
9295  double ccc1 = breconoisehe[i][jeta][jphi];
9296  if (ccc1 != 0.) {
9297  GefzDIFreconoiseHE41D->Fill(jphi, ccc1);
9298  GefzDIFreconoiseHE41D0->Fill(jphi, 1.);
9299  }
9300  }
9301  }
9302  }
9303  }
9304  GefzDIFreconoiseHE41DF->Divide(
9305  GefzDIFreconoiseHE41D, GefzDIFreconoiseHE41D0, 1, 1, "B"); // DIF averaged over depthes & eta
9306  GefzDIFreconoiseHE41D0->Sumw2();
9307  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHE41DF->SetBinError(jphi,0.01);}
9308  gPad->SetGridy();
9309  gPad->SetGridx(); // gPad->SetLogz();
9310  GefzDIFreconoiseHE41DF->SetMarkerStyle(20);
9311  GefzDIFreconoiseHE41DF->SetMarkerSize(1.4);
9312  GefzDIFreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
9313  GefzDIFreconoiseHE41DF->SetXTitle("#phi \b");
9314  GefzDIFreconoiseHE41DF->SetYTitle(" <DIF> \b");
9315  GefzDIFreconoiseHE41DF->SetZTitle("<DIF>_PHI - AllDepthes \b");
9316  GefzDIFreconoiseHE41DF->SetMarkerColor(4);
9317  GefzDIFreconoiseHE41DF->SetLineColor(
9318  4); // GefzDIFreconoiseHE41DF->SetMinimum(0.8); // GefzDIFreconoiseHE41DF->SetMaximum(1.000);
9319  GefzDIFreconoiseHE41DF->Draw("Error");
9321  c1x1->Update();
9322  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHE.png");
9323  c1x1->Clear();
9324  // clean-up
9325  if (GefzDIFreconoiseHE41D)
9326  delete GefzDIFreconoiseHE41D;
9327  if (GefzDIFreconoiseHE41D0)
9328  delete GefzDIFreconoiseHE41D0;
9329  if (GefzDIFreconoiseHE41DF)
9330  delete GefzDIFreconoiseHE41DF;
9331 
9332  //========================================================================================== 4
9333  //======================================================================
9334  //======================================================================1D plot: DIF vs phi , different eta, depth=1
9335  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
9336  c3x5->Clear();
9338  c3x5->Divide(3, 5);
9339  c3x5->cd(1);
9340  int kcountHEpositivedirectionReconoiseDIF1 = 1;
9341  TH1F* h2CeffHEpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
9342  for (int jeta = 0; jeta < njeta; jeta++) {
9343  // positivedirectionReconoiseDIF:
9344  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
9345  // for (int i=0;i<ndepth;i++) {
9346  // depth=1
9347  for (int i = 0; i < 1; i++) {
9348  TH1F* HEpositivedirectionReconoiseDIF1 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF1->Clone("twod1");
9349  float ccctest = 0; // to avoid empty massive elements
9350  for (int jphi = 0; jphi < nphi; jphi++) {
9351  double ccc1 = breconoisehe[i][jeta][jphi];
9352  if (ccc1 != 0.) {
9353  HEpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
9354  ccctest = 1.; //HEpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
9355  }
9356  } // for jphi
9357  if (ccctest > 0.) {
9358  // cout<<"444 kcountHEpositivedirectionReconoiseDIF1 = "<<kcountHEpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
9359  c3x5->cd(kcountHEpositivedirectionReconoiseDIF1);
9360  HEpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
9361  HEpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
9362  HEpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
9363  HEpositivedirectionReconoiseDIF1->SetXTitle("HEpositivedirectionReconoiseDIF1 \b");
9364  HEpositivedirectionReconoiseDIF1->SetMarkerColor(2);
9365  HEpositivedirectionReconoiseDIF1->SetLineColor(0);
9366  gPad->SetGridy();
9367  gPad->SetGridx();
9368  // gPad->SetLogy();
9369  if (kcountHEpositivedirectionReconoiseDIF1 == 1)
9370  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 17; depth = 1 \b");
9371  if (kcountHEpositivedirectionReconoiseDIF1 == 2)
9372  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 18; depth = 1 \b");
9373  if (kcountHEpositivedirectionReconoiseDIF1 == 3)
9374  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 19; depth = 1 \b");
9375  if (kcountHEpositivedirectionReconoiseDIF1 == 4)
9376  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 20; depth = 1 \b");
9377  if (kcountHEpositivedirectionReconoiseDIF1 == 5)
9378  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 21; depth = 1 \b");
9379  if (kcountHEpositivedirectionReconoiseDIF1 == 6)
9380  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 22; depth = 1 \b");
9381  if (kcountHEpositivedirectionReconoiseDIF1 == 7)
9382  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 23; depth = 1 \b");
9383  if (kcountHEpositivedirectionReconoiseDIF1 == 8)
9384  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 24; depth = 1 \b");
9385  if (kcountHEpositivedirectionReconoiseDIF1 == 9)
9386  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 25; depth = 1 \b");
9387  if (kcountHEpositivedirectionReconoiseDIF1 == 10)
9388  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 26; depth = 1 \b");
9389  if (kcountHEpositivedirectionReconoiseDIF1 == 11)
9390  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 27; depth = 1 \b");
9391  if (kcountHEpositivedirectionReconoiseDIF1 == 12)
9392  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 28; depth = 1 \b");
9393  HEpositivedirectionReconoiseDIF1->Draw("Error");
9394  kcountHEpositivedirectionReconoiseDIF1++;
9395  if (kcountHEpositivedirectionReconoiseDIF1 > 12)
9396  break; // 4x6 = 24
9397  } //ccctest>0
9398 
9399  } // for i
9400  } //if(jeta-41 >= 15 && jeta-41 <= 28
9401  } //for jeta
9403  c3x5->Update();
9404  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
9405  c3x5->Clear();
9406  // clean-up
9407  if (h2CeffHEpositivedirectionReconoiseDIF1)
9408  delete h2CeffHEpositivedirectionReconoiseDIF1;
9409 
9410  //========================================================================================== 5
9411  //======================================================================
9412  //======================================================================1D plot: R vs phi , different eta, depth=2
9413  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
9414  c3x5->Clear();
9416  c3x5->Divide(3, 5);
9417  c3x5->cd(1);
9418  int kcountHEpositivedirectionReconoiseDIF2 = 1;
9419  TH1F* h2CeffHEpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
9420  for (int jeta = 0; jeta < njeta; jeta++) {
9421  // positivedirectionReconoiseDIF:
9422  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
9423  // for (int i=0;i<ndepth;i++) {
9424  // depth=2
9425  for (int i = 1; i < 2; i++) {
9426  TH1F* HEpositivedirectionReconoiseDIF2 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF2->Clone("twod1");
9427  float ccctest = 0; // to avoid empty massive elements
9428  for (int jphi = 0; jphi < nphi; jphi++) {
9429  double ccc1 = breconoisehe[i][jeta][jphi];
9430  if (ccc1 != 0.) {
9431  HEpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
9432  ccctest = 1.; //HEpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
9433  }
9434  } // for jphi
9435  if (ccctest > 0.) {
9436  //cout<<"555 kcountHEpositivedirectionReconoiseDIF2 = "<<kcountHEpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
9437  c3x5->cd(kcountHEpositivedirectionReconoiseDIF2);
9438  HEpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
9439  HEpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
9440  HEpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
9441  HEpositivedirectionReconoiseDIF2->SetXTitle("HEpositivedirectionReconoiseDIF2 \b");
9442  HEpositivedirectionReconoiseDIF2->SetMarkerColor(2);
9443  HEpositivedirectionReconoiseDIF2->SetLineColor(0);
9444  gPad->SetGridy();
9445  gPad->SetGridx();
9446  // gPad->SetLogy();
9447  if (kcountHEpositivedirectionReconoiseDIF2 == 1)
9448  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 16; depth = 2 \b");
9449  if (kcountHEpositivedirectionReconoiseDIF2 == 2)
9450  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 17; depth = 2 \b");
9451  if (kcountHEpositivedirectionReconoiseDIF2 == 3)
9452  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 18; depth = 2 \b");
9453  if (kcountHEpositivedirectionReconoiseDIF2 == 4)
9454  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 19; depth = 2 \b");
9455  if (kcountHEpositivedirectionReconoiseDIF2 == 5)
9456  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 20; depth = 2 \b");
9457  if (kcountHEpositivedirectionReconoiseDIF2 == 6)
9458  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 21; depth = 2 \b");
9459  if (kcountHEpositivedirectionReconoiseDIF2 == 7)
9460  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 22; depth = 2 \b");
9461  if (kcountHEpositivedirectionReconoiseDIF2 == 8)
9462  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 23; depth = 2 \b");
9463  if (kcountHEpositivedirectionReconoiseDIF2 == 9)
9464  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 24; depth = 2 \b");
9465  if (kcountHEpositivedirectionReconoiseDIF2 == 10)
9466  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 25; depth = 2 \b");
9467  if (kcountHEpositivedirectionReconoiseDIF2 == 11)
9468  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 26; depth = 2 \b");
9469  if (kcountHEpositivedirectionReconoiseDIF2 == 12)
9470  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 27; depth = 2 \b");
9471  if (kcountHEpositivedirectionReconoiseDIF2 == 13)
9472  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 28; depth = 2 \b");
9473  HEpositivedirectionReconoiseDIF2->Draw("Error");
9474  kcountHEpositivedirectionReconoiseDIF2++;
9475  if (kcountHEpositivedirectionReconoiseDIF2 > 13)
9476  break; // 4x6 = 24
9477  } //ccctest>0
9478 
9479  } // for i
9480  } //if(jeta-41
9481  } //for jeta
9483  c3x5->Update();
9484  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
9485  c3x5->Clear();
9486  // clean-up
9487  if (h2CeffHEpositivedirectionReconoiseDIF2)
9488  delete h2CeffHEpositivedirectionReconoiseDIF2;
9489  //========================================================================================== 6
9490  //======================================================================
9491  //======================================================================1D plot: R vs phi , different eta, depth=3
9492  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
9493  c3x5->Clear();
9495  c3x5->Divide(3, 5);
9496  c3x5->cd(1);
9497  int kcountHEpositivedirectionReconoiseDIF3 = 1;
9498  TH1F* h2CeffHEpositivedirectionReconoiseDIF3 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF3", "", nphi, 0., 72.);
9499  for (int jeta = 0; jeta < njeta; jeta++) {
9500  // positivedirectionReconoiseDIF:
9501  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
9502  // for (int i=0;i<ndepth;i++) {
9503  // depth=3
9504  for (int i = 2; i < 3; i++) {
9505  TH1F* HEpositivedirectionReconoiseDIF3 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF3->Clone("twod1");
9506  float ccctest = 0; // to avoid empty massive elements
9507  for (int jphi = 0; jphi < nphi; jphi++) {
9508  double ccc1 = breconoisehe[i][jeta][jphi];
9509  if (ccc1 != 0.) {
9510  HEpositivedirectionReconoiseDIF3->Fill(jphi, ccc1);
9511  ccctest = 1.; //HEpositivedirectionReconoiseDIF3->SetBinError(i,0.01);
9512  }
9513  } // for jphi
9514  if (ccctest > 0.) {
9515  //cout<<"666 kcountHEpositivedirectionReconoiseDIF3 = "<<kcountHEpositivedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
9516  c3x5->cd(kcountHEpositivedirectionReconoiseDIF3);
9517  HEpositivedirectionReconoiseDIF3->SetMarkerStyle(20);
9518  HEpositivedirectionReconoiseDIF3->SetMarkerSize(0.4);
9519  HEpositivedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
9520  HEpositivedirectionReconoiseDIF3->SetXTitle("HEpositivedirectionReconoiseDIF3 \b");
9521  HEpositivedirectionReconoiseDIF3->SetMarkerColor(2);
9522  HEpositivedirectionReconoiseDIF3->SetLineColor(0);
9523  gPad->SetGridy();
9524  gPad->SetGridx();
9525  // gPad->SetLogy();
9526  if (kcountHEpositivedirectionReconoiseDIF3 == 1)
9527  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 16; depth = 3 \b");
9528  if (kcountHEpositivedirectionReconoiseDIF3 == 2)
9529  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 17; depth = 3 \b");
9530  if (kcountHEpositivedirectionReconoiseDIF3 == 3)
9531  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 18; depth = 3 \b");
9532  if (kcountHEpositivedirectionReconoiseDIF3 == 4)
9533  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 19; depth = 3 \b");
9534  if (kcountHEpositivedirectionReconoiseDIF3 == 5)
9535  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 20; depth = 3 \b");
9536  if (kcountHEpositivedirectionReconoiseDIF3 == 6)
9537  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 21; depth = 3 \b");
9538  if (kcountHEpositivedirectionReconoiseDIF3 == 7)
9539  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 22; depth = 3 \b");
9540  if (kcountHEpositivedirectionReconoiseDIF3 == 8)
9541  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 23; depth = 3 \b");
9542  if (kcountHEpositivedirectionReconoiseDIF3 == 9)
9543  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 24; depth = 3 \b");
9544  if (kcountHEpositivedirectionReconoiseDIF3 == 10)
9545  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 25; depth = 3 \b");
9546  if (kcountHEpositivedirectionReconoiseDIF3 == 11)
9547  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 26; depth = 3 \b");
9548  if (kcountHEpositivedirectionReconoiseDIF3 == 12)
9549  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 27; depth = 3 \b");
9550  if (kcountHEpositivedirectionReconoiseDIF3 == 13)
9551  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 28; depth = 3 \b");
9552  HEpositivedirectionReconoiseDIF3->Draw("Error");
9553  kcountHEpositivedirectionReconoiseDIF3++;
9554  if (kcountHEpositivedirectionReconoiseDIF3 > 13)
9555  break; // 4x6 = 24
9556  } //ccctest>0
9557 
9558  } // for i
9559  } //if(jeta-41 >=
9560  } //for jeta
9562  c3x5->Update();
9563  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
9564  c3x5->Clear();
9565  // clean-up
9566  if (h2CeffHEpositivedirectionReconoiseDIF3)
9567  delete h2CeffHEpositivedirectionReconoiseDIF3;
9568  //========================================================================================== 7
9569  //======================================================================
9570  //======================================================================1D plot: R vs phi , different eta, depth=4
9571  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
9572  c3x5->Clear();
9574  c3x5->Divide(3, 5);
9575  c3x5->cd(1);
9576  int kcountHEpositivedirectionReconoiseDIF4 = 1;
9577  TH1F* h2CeffHEpositivedirectionReconoiseDIF4 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF4", "", nphi, 0., 72.);
9578 
9579  for (int jeta = 0; jeta < njeta; jeta++) {
9580  // positivedirectionReconoiseDIF:
9581  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
9582  // for (int i=0;i<ndepth;i++) {
9583  // depth=4
9584  for (int i = 3; i < 4; i++) {
9585  TH1F* HEpositivedirectionReconoiseDIF4 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF4->Clone("twod1");
9586 
9587  float ccctest = 0; // to avoid empty massive elements
9588  for (int jphi = 0; jphi < nphi; jphi++) {
9589  double ccc1 = breconoisehe[i][jeta][jphi];
9590  if (ccc1 != 0.) {
9591  HEpositivedirectionReconoiseDIF4->Fill(jphi, ccc1);
9592  ccctest = 1.; //HEpositivedirectionReconoiseDIF4->SetBinError(i,0.01);
9593  }
9594  } // for jphi
9595  if (ccctest > 0.) {
9596  //cout<<"777 kcountHEpositivedirectionReconoiseDIF4 = "<<kcountHEpositivedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
9597  c3x5->cd(kcountHEpositivedirectionReconoiseDIF4);
9598  HEpositivedirectionReconoiseDIF4->SetMarkerStyle(20);
9599  HEpositivedirectionReconoiseDIF4->SetMarkerSize(0.4);
9600  HEpositivedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
9601  HEpositivedirectionReconoiseDIF4->SetXTitle("HEpositivedirectionReconoiseDIF4 \b");
9602  HEpositivedirectionReconoiseDIF4->SetMarkerColor(2);
9603  HEpositivedirectionReconoiseDIF4->SetLineColor(0);
9604  gPad->SetGridy();
9605  gPad->SetGridx();
9606  // gPad->SetLogy();
9607  if (kcountHEpositivedirectionReconoiseDIF4 == 1)
9608  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 15; depth = 4 \b");
9609  if (kcountHEpositivedirectionReconoiseDIF4 == 2)
9610  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 17; depth = 4 \b");
9611  if (kcountHEpositivedirectionReconoiseDIF4 == 3)
9612  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 18; depth = 4 \b");
9613  if (kcountHEpositivedirectionReconoiseDIF4 == 4)
9614  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 19; depth = 4 \b");
9615  if (kcountHEpositivedirectionReconoiseDIF4 == 5)
9616  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 20; depth = 4 \b");
9617  if (kcountHEpositivedirectionReconoiseDIF4 == 6)
9618  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 21; depth = 4 \b");
9619  if (kcountHEpositivedirectionReconoiseDIF4 == 7)
9620  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 22; depth = 4 \b");
9621  if (kcountHEpositivedirectionReconoiseDIF4 == 8)
9622  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 23; depth = 4 \b");
9623  if (kcountHEpositivedirectionReconoiseDIF4 == 9)
9624  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 24; depth = 4 \b");
9625  if (kcountHEpositivedirectionReconoiseDIF4 == 10)
9626  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 25; depth = 4 \b");
9627  if (kcountHEpositivedirectionReconoiseDIF4 == 11)
9628  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 26; depth = 4 \b");
9629  if (kcountHEpositivedirectionReconoiseDIF4 == 12)
9630  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 27; depth = 4 \b");
9631  HEpositivedirectionReconoiseDIF4->Draw("Error");
9632  kcountHEpositivedirectionReconoiseDIF4++;
9633  if (kcountHEpositivedirectionReconoiseDIF4 > 12)
9634  break; // 4x6 = 24
9635  } //ccctest>0
9636 
9637  } // for i
9638  } //if(jeta-41 >= -29 && jeta-41 <= -16)
9639  } //for jeta
9641  c3x5->Update();
9642  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
9643  c3x5->Clear();
9644  // clean-up
9645  if (h2CeffHEpositivedirectionReconoiseDIF4)
9646  delete h2CeffHEpositivedirectionReconoiseDIF4;
9647  //========================================================================================== 8
9648  //======================================================================
9649  //======================================================================1D plot: R vs phi , different eta, depth=5
9650  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
9651  c3x5->Clear();
9653  c3x5->Divide(3, 5);
9654  c3x5->cd(1);
9655  int kcountHEpositivedirectionReconoiseDIF5 = 1;
9656  TH1F* h2CeffHEpositivedirectionReconoiseDIF5 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF5", "", nphi, 0., 72.);
9657 
9658  for (int jeta = 0; jeta < njeta; jeta++) {
9659  // positivedirectionReconoiseDIF:
9660  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
9661  // for (int i=0;i<ndepth;i++) {
9662  // depth=5
9663  for (int i = 4; i < 5; i++) {
9664  TH1F* HEpositivedirectionReconoiseDIF5 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF5->Clone("twod1");
9665 
9666  float ccctest = 0; // to avoid empty massive elements
9667  for (int jphi = 0; jphi < nphi; jphi++) {
9668  // cout<<"888 initial kcountHEpositivedirectionReconoiseDIF5 = "<<kcountHEpositivedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" breconoisehe[i][jeta][jphi]= "<< breconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
9669 
9670  double ccc1 = breconoisehe[i][jeta][jphi];
9671  if (ccc1 != 0.) {
9672  HEpositivedirectionReconoiseDIF5->Fill(jphi, ccc1);
9673  ccctest = 1.; //HEpositivedirectionReconoiseDIF5->SetBinError(i,0.01);
9674  }
9675  } // for jphi
9676  if (ccctest > 0.) {
9677  //cout<<"888 kcountHEpositivedirectionReconoiseDIF5 = "<<kcountHEpositivedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<endl;
9678  c3x5->cd(kcountHEpositivedirectionReconoiseDIF5);
9679  HEpositivedirectionReconoiseDIF5->SetMarkerStyle(20);
9680  HEpositivedirectionReconoiseDIF5->SetMarkerSize(0.4);
9681  HEpositivedirectionReconoiseDIF5->GetYaxis()->SetLabelSize(0.04);
9682  HEpositivedirectionReconoiseDIF5->SetXTitle("HEpositivedirectionReconoiseDIF5 \b");
9683  HEpositivedirectionReconoiseDIF5->SetMarkerColor(2);
9684  HEpositivedirectionReconoiseDIF5->SetLineColor(0);
9685  gPad->SetGridy();
9686  gPad->SetGridx();
9687  // gPad->SetLogy();
9688  if (kcountHEpositivedirectionReconoiseDIF5 == 1)
9689  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 17; depth = 5 \b");
9690  if (kcountHEpositivedirectionReconoiseDIF5 == 2)
9691  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 18; depth = 5 \b");
9692  if (kcountHEpositivedirectionReconoiseDIF5 == 3)
9693  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 19; depth = 5 \b");
9694  if (kcountHEpositivedirectionReconoiseDIF5 == 4)
9695  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 20; depth = 5 \b");
9696  if (kcountHEpositivedirectionReconoiseDIF5 == 5)
9697  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 21; depth = 5 \b");
9698  if (kcountHEpositivedirectionReconoiseDIF5 == 6)
9699  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 22; depth = 5 \b");
9700  if (kcountHEpositivedirectionReconoiseDIF5 == 7)
9701  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 23; depth = 5 \b");
9702  if (kcountHEpositivedirectionReconoiseDIF5 == 8)
9703  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 24; depth = 5 \b");
9704  if (kcountHEpositivedirectionReconoiseDIF5 == 9)
9705  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 25; depth = 5 \b");
9706  if (kcountHEpositivedirectionReconoiseDIF5 == 10)
9707  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 26; depth = 5 \b");
9708  if (kcountHEpositivedirectionReconoiseDIF5 == 11)
9709  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 27; depth = 5 \b");
9710  HEpositivedirectionReconoiseDIF5->Draw("Error");
9711  kcountHEpositivedirectionReconoiseDIF5++;
9712  if (kcountHEpositivedirectionReconoiseDIF5 > 11)
9713  break; // 4x6 = 24
9714  } //ccctest>0
9715 
9716  } // for i
9717  } //if(jeta-41 >= -29 && jeta-41 <= -16)
9718  } //for jeta
9720  c3x5->Update();
9721  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
9722  c3x5->Clear();
9723  // clean-up
9724  if (h2CeffHEpositivedirectionReconoiseDIF5)
9725  delete h2CeffHEpositivedirectionReconoiseDIF5;
9726  //========================================================================================== 9
9727  //======================================================================
9728  //======================================================================1D plot: R vs phi , different eta, depth=6
9729  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
9730  c3x5->Clear();
9732  c3x5->Divide(3, 5);
9733  c3x5->cd(1);
9734  int kcountHEpositivedirectionReconoiseDIF6 = 1;
9735  TH1F* h2CeffHEpositivedirectionReconoiseDIF6 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF6", "", nphi, 0., 72.);
9736 
9737  for (int jeta = 0; jeta < njeta; jeta++) {
9738  // positivedirectionReconoiseDIF:
9739  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
9740  // for (int i=0;i<ndepth;i++) {
9741  // depth=6
9742  for (int i = 5; i < 6; i++) {
9743  TH1F* HEpositivedirectionReconoiseDIF6 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF6->Clone("twod1");
9744 
9745  float ccctest = 0; // to avoid empty massive elements
9746  for (int jphi = 0; jphi < nphi; jphi++) {
9747  double ccc1 = breconoisehe[i][jeta][jphi];
9748  if (ccc1 != 0.) {
9749  HEpositivedirectionReconoiseDIF6->Fill(jphi, ccc1);
9750  ccctest = 1.; //HEpositivedirectionReconoiseDIF6->SetBinError(i,0.01);
9751  }
9752  } // for jphi
9753  if (ccctest > 0.) {
9754  //cout<<"999 kcountHEpositivedirectionReconoiseDIF6 = "<<kcountHEpositivedirectionReconoiseDIF6 <<" jeta-41= "<< jeta-41 <<endl;
9755  c3x5->cd(kcountHEpositivedirectionReconoiseDIF6);
9756  HEpositivedirectionReconoiseDIF6->SetMarkerStyle(20);
9757  HEpositivedirectionReconoiseDIF6->SetMarkerSize(0.4);
9758  HEpositivedirectionReconoiseDIF6->GetYaxis()->SetLabelSize(0.04);
9759  HEpositivedirectionReconoiseDIF6->SetXTitle("HEpositivedirectionReconoiseDIF6 \b");
9760  HEpositivedirectionReconoiseDIF6->SetMarkerColor(2);
9761  HEpositivedirectionReconoiseDIF6->SetLineColor(0);
9762  gPad->SetGridy();
9763  gPad->SetGridx();
9764  // gPad->SetLogy();
9765  if (kcountHEpositivedirectionReconoiseDIF6 == 1)
9766  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 18; depth = 6 \b");
9767  if (kcountHEpositivedirectionReconoiseDIF6 == 2)
9768  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 19; depth = 6 \b");
9769  if (kcountHEpositivedirectionReconoiseDIF6 == 3)
9770  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 20; depth = 6 \b");
9771  if (kcountHEpositivedirectionReconoiseDIF6 == 4)
9772  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 21; depth = 6 \b");
9773  if (kcountHEpositivedirectionReconoiseDIF6 == 5)
9774  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 22; depth = 6 \b");
9775  if (kcountHEpositivedirectionReconoiseDIF6 == 6)
9776  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 23; depth = 6 \b");
9777  if (kcountHEpositivedirectionReconoiseDIF6 == 7)
9778  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 24; depth = 6 \b");
9779  if (kcountHEpositivedirectionReconoiseDIF6 == 8)
9780  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 25; depth = 6 \b");
9781  if (kcountHEpositivedirectionReconoiseDIF6 == 9)
9782  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 26; depth = 6 \b");
9783  if (kcountHEpositivedirectionReconoiseDIF6 == 10)
9784  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 27; depth = 6 \b");
9785  HEpositivedirectionReconoiseDIF6->Draw("Error");
9786  kcountHEpositivedirectionReconoiseDIF6++;
9787  if (kcountHEpositivedirectionReconoiseDIF6 > 10)
9788  break; // 4x6 = 24
9789  } //ccctest>0
9790 
9791  } // for i
9792  } //if(jeta-41 >= -29 && jeta-41 <= -16)
9793  } //for jeta
9795  c3x5->Update();
9796  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
9797  c3x5->Clear();
9798  // clean-up
9799  if (h2CeffHEpositivedirectionReconoiseDIF6)
9800  delete h2CeffHEpositivedirectionReconoiseDIF6;
9801  //========================================================================================== 10
9802  //======================================================================
9803  //======================================================================1D plot: R vs phi , different eta, depth=7
9804  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
9805  c3x5->Clear();
9807  c3x5->Divide(3, 5);
9808  c3x5->cd(1);
9809  int kcountHEpositivedirectionReconoiseDIF7 = 1;
9810  TH1F* h2CeffHEpositivedirectionReconoiseDIF7 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF7", "", nphi, 0., 72.);
9811 
9812  for (int jeta = 0; jeta < njeta; jeta++) {
9813  // positivedirectionReconoiseDIF:
9814  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
9815  // for (int i=0;i<ndepth;i++) {
9816  // depth=7
9817  for (int i = 6; i < 7; i++) {
9818  TH1F* HEpositivedirectionReconoiseDIF7 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF7->Clone("twod1");
9819 
9820  float ccctest = 0; // to avoid empty massive elements
9821  for (int jphi = 0; jphi < nphi; jphi++) {
9822  double ccc1 = breconoisehe[i][jeta][jphi];
9823  if (ccc1 != 0.) {
9824  HEpositivedirectionReconoiseDIF7->Fill(jphi, ccc1);
9825  ccctest = 1.; //HEpositivedirectionReconoiseDIF7->SetBinError(i,0.01);
9826  }
9827  } // for jphi
9828  if (ccctest > 0.) {
9829  //cout<<"1010 kcountHEpositivedirectionReconoiseDIF7 = "<<kcountHEpositivedirectionReconoiseDIF7 <<" jeta-41= "<< jeta-41 <<endl;
9830  c3x5->cd(kcountHEpositivedirectionReconoiseDIF7);
9831  HEpositivedirectionReconoiseDIF7->SetMarkerStyle(20);
9832  HEpositivedirectionReconoiseDIF7->SetMarkerSize(0.4);
9833  HEpositivedirectionReconoiseDIF7->GetYaxis()->SetLabelSize(0.04);
9834  HEpositivedirectionReconoiseDIF7->SetXTitle("HEpositivedirectionReconoiseDIF7 \b");
9835  HEpositivedirectionReconoiseDIF7->SetMarkerColor(2);
9836  HEpositivedirectionReconoiseDIF7->SetLineColor(0);
9837  gPad->SetGridy();
9838  gPad->SetGridx();
9839  // gPad->SetLogy();
9840  if (kcountHEpositivedirectionReconoiseDIF7 == 1)
9841  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 25; depth = 7 \b");
9842  if (kcountHEpositivedirectionReconoiseDIF7 == 2)
9843  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 26; depth = 7 \b");
9844  if (kcountHEpositivedirectionReconoiseDIF7 == 3)
9845  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 27; depth = 7 \b");
9846  HEpositivedirectionReconoiseDIF7->Draw("Error");
9847  kcountHEpositivedirectionReconoiseDIF7++;
9848  if (kcountHEpositivedirectionReconoiseDIF7 > 3)
9849  break; //
9850  } //ccctest>0
9851 
9852  } // for i
9853  } //if(jeta-41 >= -29 && jeta-41 <= -16)
9854  } //for jeta
9856  c3x5->Update();
9857  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
9858  c3x5->Clear();
9859  // clean-up
9860  if (h2CeffHEpositivedirectionReconoiseDIF7)
9861  delete h2CeffHEpositivedirectionReconoiseDIF7;
9862 
9864  //========================================================================================== 1114
9865  //======================================================================
9866  //======================================================================1D plot: R vs phi , different eta, depth=1
9867  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
9868  c3x5->Clear();
9870  c3x5->Divide(3, 5);
9871  c3x5->cd(1);
9872  int kcountHEnegativedirectionReconoiseDIF1 = 1;
9873  TH1F* h2CeffHEnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
9874  for (int jeta = 0; jeta < njeta; jeta++) {
9875  // negativedirectionReconoiseDIF:
9876  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
9877  // for (int i=0;i<ndepth;i++) {
9878  // depth=1
9879  for (int i = 0; i < 1; i++) {
9880  TH1F* HEnegativedirectionReconoiseDIF1 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF1->Clone("twod1");
9881  float ccctest = 0; // to avoid empty massive elements
9882  for (int jphi = 0; jphi < nphi; jphi++) {
9883  double ccc1 = breconoisehe[i][jeta][jphi];
9884  if (ccc1 != 0.) {
9885  HEnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
9886  ccctest = 1.; //HEnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
9887  }
9888  } // for jphi
9889  if (ccctest > 0.) {
9890  // cout<<"444 kcountHEnegativedirectionReconoiseDIF1 = "<<kcountHEnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
9891  c3x5->cd(kcountHEnegativedirectionReconoiseDIF1);
9892  HEnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
9893  HEnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
9894  HEnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
9895  HEnegativedirectionReconoiseDIF1->SetXTitle("HEnegativedirectionReconoiseDIF1 \b");
9896  HEnegativedirectionReconoiseDIF1->SetMarkerColor(2);
9897  HEnegativedirectionReconoiseDIF1->SetLineColor(0);
9898  gPad->SetGridy();
9899  gPad->SetGridx();
9900  // gPad->SetLogy();
9901  if (kcountHEnegativedirectionReconoiseDIF1 == 1)
9902  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-29; depth = 1 \b");
9903  if (kcountHEnegativedirectionReconoiseDIF1 == 2)
9904  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-28; depth = 1 \b");
9905  if (kcountHEnegativedirectionReconoiseDIF1 == 3)
9906  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-27; depth = 1 \b");
9907  if (kcountHEnegativedirectionReconoiseDIF1 == 4)
9908  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-26; depth = 1 \b");
9909  if (kcountHEnegativedirectionReconoiseDIF1 == 5)
9910  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-25; depth = 1 \b");
9911  if (kcountHEnegativedirectionReconoiseDIF1 == 6)
9912  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-24; depth = 1 \b");
9913  if (kcountHEnegativedirectionReconoiseDIF1 == 7)
9914  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-23; depth = 1 \b");
9915  if (kcountHEnegativedirectionReconoiseDIF1 == 8)
9916  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-22; depth = 1 \b");
9917  if (kcountHEnegativedirectionReconoiseDIF1 == 9)
9918  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-21; depth = 1 \b");
9919  if (kcountHEnegativedirectionReconoiseDIF1 == 10)
9920  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-20; depth = 1 \b");
9921  if (kcountHEnegativedirectionReconoiseDIF1 == 11)
9922  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-19; depth = 1 \b");
9923  if (kcountHEnegativedirectionReconoiseDIF1 == 12)
9924  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-18; depth = 1 \b");
9925  HEnegativedirectionReconoiseDIF1->Draw("Error");
9926  kcountHEnegativedirectionReconoiseDIF1++;
9927  if (kcountHEnegativedirectionReconoiseDIF1 > 12)
9928  break; // 4x6 = 24
9929  } //ccctest>0
9930 
9931  } // for i
9932  } //if(jeta-41 >= -29 && jeta-41 <= -16)
9933  } //for jeta
9935  c3x5->Update();
9936  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
9937  c3x5->Clear();
9938  // clean-up
9939  if (h2CeffHEnegativedirectionReconoiseDIF1)
9940  delete h2CeffHEnegativedirectionReconoiseDIF1;
9941 
9942  //========================================================================================== 1115
9943  //======================================================================
9944  //======================================================================1D plot: R vs phi , different eta, depth=2
9945  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
9946  c3x5->Clear();
9948  c3x5->Divide(3, 5);
9949  c3x5->cd(1);
9950  int kcountHEnegativedirectionReconoiseDIF2 = 1;
9951  TH1F* h2CeffHEnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
9952  for (int jeta = 0; jeta < njeta; jeta++) {
9953  // negativedirectionReconoiseDIF:
9954  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
9955  // for (int i=0;i<ndepth;i++) {
9956  // depth=2
9957  for (int i = 1; i < 2; i++) {
9958  TH1F* HEnegativedirectionReconoiseDIF2 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF2->Clone("twod1");
9959  float ccctest = 0; // to avoid empty massive elements
9960  for (int jphi = 0; jphi < nphi; jphi++) {
9961  double ccc1 = breconoisehe[i][jeta][jphi];
9962  if (ccc1 != 0.) {
9963  HEnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
9964  ccctest = 1.; //HEnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
9965  }
9966  } // for jphi
9967  if (ccctest > 0.) {
9968  //cout<<"555 kcountHEnegativedirectionReconoiseDIF2 = "<<kcountHEnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
9969  c3x5->cd(kcountHEnegativedirectionReconoiseDIF2);
9970  HEnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
9971  HEnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
9972  HEnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
9973  HEnegativedirectionReconoiseDIF2->SetXTitle("HEnegativedirectionReconoiseDIF2 \b");
9974  HEnegativedirectionReconoiseDIF2->SetMarkerColor(2);
9975  HEnegativedirectionReconoiseDIF2->SetLineColor(0);
9976  gPad->SetGridy();
9977  gPad->SetGridx();
9978  // gPad->SetLogy();
9979  if (kcountHEnegativedirectionReconoiseDIF2 == 1)
9980  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-29; depth = 2 \b");
9981  if (kcountHEnegativedirectionReconoiseDIF2 == 2)
9982  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-28; depth = 2 \b");
9983  if (kcountHEnegativedirectionReconoiseDIF2 == 3)
9984  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-27; depth = 2 \b");
9985  if (kcountHEnegativedirectionReconoiseDIF2 == 4)
9986  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-26; depth = 2 \b");
9987  if (kcountHEnegativedirectionReconoiseDIF2 == 5)
9988  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-25; depth = 2 \b");
9989  if (kcountHEnegativedirectionReconoiseDIF2 == 6)
9990  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-24; depth = 2 \b");
9991  if (kcountHEnegativedirectionReconoiseDIF2 == 7)
9992  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-23; depth = 2 \b");
9993  if (kcountHEnegativedirectionReconoiseDIF2 == 8)
9994  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-22; depth = 2 \b");
9995  if (kcountHEnegativedirectionReconoiseDIF2 == 9)
9996  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-21; depth = 2 \b");
9997  if (kcountHEnegativedirectionReconoiseDIF2 == 10)
9998  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-20; depth = 2 \b");
9999  if (kcountHEnegativedirectionReconoiseDIF2 == 11)
10000  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-19; depth = 2 \b");
10001  if (kcountHEnegativedirectionReconoiseDIF2 == 12)
10002  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-18; depth = 2 \b");
10003  if (kcountHEnegativedirectionReconoiseDIF2 == 13)
10004  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-17; depth = 2 \b");
10005  HEnegativedirectionReconoiseDIF2->Draw("Error");
10006  kcountHEnegativedirectionReconoiseDIF2++;
10007  if (kcountHEnegativedirectionReconoiseDIF2 > 13)
10008  break; // 4x6 = 24
10009  } //ccctest>0
10010 
10011  } // for i
10012  } //if(jeta-41 >= -29 && jeta-41 <= -16)
10013  } //for jeta
10015  c3x5->Update();
10016  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
10017  c3x5->Clear();
10018  // clean-up
10019  if (h2CeffHEnegativedirectionReconoiseDIF2)
10020  delete h2CeffHEnegativedirectionReconoiseDIF2;
10021  //========================================================================================== 1116
10022  //======================================================================
10023  //======================================================================1D plot: R vs phi , different eta, depth=3
10024  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
10025  c3x5->Clear();
10027  c3x5->Divide(3, 5);
10028  c3x5->cd(1);
10029  int kcountHEnegativedirectionReconoiseDIF3 = 1;
10030  TH1F* h2CeffHEnegativedirectionReconoiseDIF3 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF3", "", nphi, 0., 72.);
10031  for (int jeta = 0; jeta < njeta; jeta++) {
10032  // negativedirectionReconoiseDIF:
10033  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
10034  // for (int i=0;i<ndepth;i++) {
10035  // depth=3
10036  for (int i = 2; i < 3; i++) {
10037  TH1F* HEnegativedirectionReconoiseDIF3 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF3->Clone("twod1");
10038  float ccctest = 0; // to avoid empty massive elements
10039  for (int jphi = 0; jphi < nphi; jphi++) {
10040  double ccc1 = breconoisehe[i][jeta][jphi];
10041  if (ccc1 != 0.) {
10042  HEnegativedirectionReconoiseDIF3->Fill(jphi, ccc1);
10043  ccctest = 1.; //HEnegativedirectionReconoiseDIF3->SetBinError(i,0.01);
10044  }
10045  } // for jphi
10046  if (ccctest > 0.) {
10047  //cout<<"666 kcountHEnegativedirectionReconoiseDIF3 = "<<kcountHEnegativedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
10048  c3x5->cd(kcountHEnegativedirectionReconoiseDIF3);
10049  HEnegativedirectionReconoiseDIF3->SetMarkerStyle(20);
10050  HEnegativedirectionReconoiseDIF3->SetMarkerSize(0.4);
10051  HEnegativedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
10052  HEnegativedirectionReconoiseDIF3->SetXTitle("HEnegativedirectionReconoiseDIF3 \b");
10053  HEnegativedirectionReconoiseDIF3->SetMarkerColor(2);
10054  HEnegativedirectionReconoiseDIF3->SetLineColor(0);
10055  gPad->SetGridy();
10056  gPad->SetGridx();
10057  // gPad->SetLogy();
10058  if (kcountHEnegativedirectionReconoiseDIF3 == 1)
10059  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-29; depth = 3 \b");
10060  if (kcountHEnegativedirectionReconoiseDIF3 == 2)
10061  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-28; depth = 3 \b");
10062  if (kcountHEnegativedirectionReconoiseDIF3 == 3)
10063  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-27; depth = 3 \b");
10064  if (kcountHEnegativedirectionReconoiseDIF3 == 4)
10065  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-26; depth = 3 \b");
10066  if (kcountHEnegativedirectionReconoiseDIF3 == 5)
10067  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-25; depth = 3 \b");
10068  if (kcountHEnegativedirectionReconoiseDIF3 == 6)
10069  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-24; depth = 3 \b");
10070  if (kcountHEnegativedirectionReconoiseDIF3 == 7)
10071  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-23; depth = 3 \b");
10072  if (kcountHEnegativedirectionReconoiseDIF3 == 8)
10073  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-22; depth = 3 \b");
10074  if (kcountHEnegativedirectionReconoiseDIF3 == 9)
10075  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-21; depth = 3 \b");
10076  if (kcountHEnegativedirectionReconoiseDIF3 == 10)
10077  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-20; depth = 3 \b");
10078  if (kcountHEnegativedirectionReconoiseDIF3 == 11)
10079  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-19; depth = 3 \b");
10080  if (kcountHEnegativedirectionReconoiseDIF3 == 12)
10081  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-18; depth = 3 \b");
10082  if (kcountHEnegativedirectionReconoiseDIF3 == 13)
10083  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-17; depth = 3 \b");
10084  HEnegativedirectionReconoiseDIF3->Draw("Error");
10085  kcountHEnegativedirectionReconoiseDIF3++;
10086  if (kcountHEnegativedirectionReconoiseDIF3 > 13)
10087  break; // 4x6 = 24
10088  } //ccctest>0
10089 
10090  } // for i
10091  } //if(jeta-41 >= -29 && jeta-41 <= -16)
10092  } //for jeta
10094  c3x5->Update();
10095  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
10096  c3x5->Clear();
10097  // clean-up
10098  if (h2CeffHEnegativedirectionReconoiseDIF3)
10099  delete h2CeffHEnegativedirectionReconoiseDIF3;
10100  //========================================================================================== 1117
10101  //======================================================================
10102  //======================================================================1D plot: R vs phi , different eta, depth=4
10103  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
10104  c3x5->Clear();
10106  c3x5->Divide(3, 5);
10107  c3x5->cd(1);
10108  int kcountHEnegativedirectionReconoiseDIF4 = 1;
10109  TH1F* h2CeffHEnegativedirectionReconoiseDIF4 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF4", "", nphi, 0., 72.);
10110 
10111  for (int jeta = 0; jeta < njeta; jeta++) {
10112  // negativedirectionReconoiseDIF:
10113  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
10114  // for (int i=0;i<ndepth;i++) {
10115  // depth=4
10116  for (int i = 3; i < 4; i++) {
10117  TH1F* HEnegativedirectionReconoiseDIF4 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF4->Clone("twod1");
10118 
10119  float ccctest = 0; // to avoid empty massive elements
10120  for (int jphi = 0; jphi < nphi; jphi++) {
10121  double ccc1 = breconoisehe[i][jeta][jphi];
10122  if (ccc1 != 0.) {
10123  HEnegativedirectionReconoiseDIF4->Fill(jphi, ccc1);
10124  ccctest = 1.; //HEnegativedirectionReconoiseDIF4->SetBinError(i,0.01);
10125  }
10126  } // for jphi
10127  if (ccctest > 0.) {
10128  //cout<<"777 kcountHEnegativedirectionReconoiseDIF4 = "<<kcountHEnegativedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
10129  c3x5->cd(kcountHEnegativedirectionReconoiseDIF4);
10130  HEnegativedirectionReconoiseDIF4->SetMarkerStyle(20);
10131  HEnegativedirectionReconoiseDIF4->SetMarkerSize(0.4);
10132  HEnegativedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
10133  HEnegativedirectionReconoiseDIF4->SetXTitle("HEnegativedirectionReconoiseDIF4 \b");
10134  HEnegativedirectionReconoiseDIF4->SetMarkerColor(2);
10135  HEnegativedirectionReconoiseDIF4->SetLineColor(0);
10136  gPad->SetGridy();
10137  gPad->SetGridx();
10138  // gPad->SetLogy();
10139  if (kcountHEnegativedirectionReconoiseDIF4 == 1)
10140  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-28; depth = 4 \b");
10141  if (kcountHEnegativedirectionReconoiseDIF4 == 2)
10142  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-27; depth = 4 \b");
10143  if (kcountHEnegativedirectionReconoiseDIF4 == 3)
10144  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-26; depth = 4 \b");
10145  if (kcountHEnegativedirectionReconoiseDIF4 == 4)
10146  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-25; depth = 4 \b");
10147  if (kcountHEnegativedirectionReconoiseDIF4 == 5)
10148  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-24; depth = 4 \b");
10149  if (kcountHEnegativedirectionReconoiseDIF4 == 6)
10150  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-23; depth = 4 \b");
10151  if (kcountHEnegativedirectionReconoiseDIF4 == 7)
10152  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-22; depth = 4 \b");
10153  if (kcountHEnegativedirectionReconoiseDIF4 == 8)
10154  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-21; depth = 4 \b");
10155  if (kcountHEnegativedirectionReconoiseDIF4 == 9)
10156  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-20; depth = 4 \b");
10157  if (kcountHEnegativedirectionReconoiseDIF4 == 10)
10158  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-19; depth = 4 \b");
10159  if (kcountHEnegativedirectionReconoiseDIF4 == 11)
10160  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-18; depth = 4 \b");
10161  if (kcountHEnegativedirectionReconoiseDIF4 == 12)
10162  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-16; depth = 4 \b");
10163  HEnegativedirectionReconoiseDIF4->Draw("Error");
10164  kcountHEnegativedirectionReconoiseDIF4++;
10165  if (kcountHEnegativedirectionReconoiseDIF4 > 12)
10166  break; // 4x6 = 24
10167  } //ccctest>0
10168 
10169  } // for i
10170  } //if(jeta-41 >= -29 && jeta-41 <= -16)
10171  } //for jeta
10173  c3x5->Update();
10174  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
10175  c3x5->Clear();
10176  // clean-up
10177  if (h2CeffHEnegativedirectionReconoiseDIF4)
10178  delete h2CeffHEnegativedirectionReconoiseDIF4;
10179  //========================================================================================== 1118
10180  //======================================================================
10181  //======================================================================1D plot: R vs phi , different eta, depth=5
10182  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
10183  c3x5->Clear();
10185  c3x5->Divide(3, 5);
10186  c3x5->cd(1);
10187  int kcountHEnegativedirectionReconoiseDIF5 = 1;
10188  TH1F* h2CeffHEnegativedirectionReconoiseDIF5 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF5", "", nphi, 0., 72.);
10189 
10190  for (int jeta = 0; jeta < njeta; jeta++) {
10191  // negativedirectionReconoiseDIF:
10192  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
10193  // for (int i=0;i<ndepth;i++) {
10194  // depth=5
10195  for (int i = 4; i < 5; i++) {
10196  TH1F* HEnegativedirectionReconoiseDIF5 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF5->Clone("twod1");
10197 
10198  float ccctest = 0; // to avoid empty massive elements
10199  for (int jphi = 0; jphi < nphi; jphi++) {
10200  // cout<<"888 initial kcountHEnegativedirectionReconoiseDIF5 = "<<kcountHEnegativedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" breconoisehe[i][jeta][jphi]= "<< breconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
10201 
10202  double ccc1 = breconoisehe[i][jeta][jphi];
10203  if (ccc1 != 0.) {
10204  HEnegativedirectionReconoiseDIF5->Fill(jphi, ccc1);
10205  ccctest = 1.; //HEnegativedirectionReconoiseDIF5->SetBinError(i,0.01);
10206  }
10207  } // for jphi
10208  if (ccctest > 0.) {
10209  //cout<<"888 kcountHEnegativedirectionReconoiseDIF5 = "<<kcountHEnegativedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<endl;
10210  c3x5->cd(kcountHEnegativedirectionReconoiseDIF5);
10211  HEnegativedirectionReconoiseDIF5->SetMarkerStyle(20);
10212  HEnegativedirectionReconoiseDIF5->SetMarkerSize(0.4);
10213  HEnegativedirectionReconoiseDIF5->GetYaxis()->SetLabelSize(0.04);
10214  HEnegativedirectionReconoiseDIF5->SetXTitle("HEnegativedirectionReconoiseDIF5 \b");
10215  HEnegativedirectionReconoiseDIF5->SetMarkerColor(2);
10216  HEnegativedirectionReconoiseDIF5->SetLineColor(0);
10217  gPad->SetGridy();
10218  gPad->SetGridx();
10219  // gPad->SetLogy();
10220  if (kcountHEnegativedirectionReconoiseDIF5 == 1)
10221  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-28; depth = 5 \b");
10222  if (kcountHEnegativedirectionReconoiseDIF5 == 2)
10223  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-27; depth = 5 \b");
10224  if (kcountHEnegativedirectionReconoiseDIF5 == 3)
10225  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-26; depth = 5 \b");
10226  if (kcountHEnegativedirectionReconoiseDIF5 == 4)
10227  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-25; depth = 5 \b");
10228  if (kcountHEnegativedirectionReconoiseDIF5 == 5)
10229  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-24; depth = 5 \b");
10230  if (kcountHEnegativedirectionReconoiseDIF5 == 6)
10231  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-23; depth = 5 \b");
10232  if (kcountHEnegativedirectionReconoiseDIF5 == 7)
10233  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-22; depth = 5 \b");
10234  if (kcountHEnegativedirectionReconoiseDIF5 == 8)
10235  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-21; depth = 5 \b");
10236  if (kcountHEnegativedirectionReconoiseDIF5 == 9)
10237  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-20; depth = 5 \b");
10238  if (kcountHEnegativedirectionReconoiseDIF5 == 10)
10239  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-19; depth = 5 \b");
10240  if (kcountHEnegativedirectionReconoiseDIF5 == 11)
10241  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-18; depth = 5 \b");
10242  HEnegativedirectionReconoiseDIF5->Draw("Error");
10243  kcountHEnegativedirectionReconoiseDIF5++;
10244  if (kcountHEnegativedirectionReconoiseDIF5 > 11)
10245  break; // 4x6 = 24
10246  } //ccctest>0
10247 
10248  } // for i
10249  } //if(jeta-41 >= -29 && jeta-41 <= -16)
10250  } //for jeta
10252  c3x5->Update();
10253  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
10254  c3x5->Clear();
10255  // clean-up
10256  if (h2CeffHEnegativedirectionReconoiseDIF5)
10257  delete h2CeffHEnegativedirectionReconoiseDIF5;
10258  //========================================================================================== 1119
10259  //======================================================================
10260  //======================================================================1D plot: R vs phi , different eta, depth=6
10261  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
10262  c3x5->Clear();
10264  c3x5->Divide(3, 5);
10265  c3x5->cd(1);
10266  int kcountHEnegativedirectionReconoiseDIF6 = 1;
10267  TH1F* h2CeffHEnegativedirectionReconoiseDIF6 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF6", "", nphi, 0., 72.);
10268 
10269  for (int jeta = 0; jeta < njeta; jeta++) {
10270  // negativedirectionReconoiseDIF:
10271  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
10272  // for (int i=0;i<ndepth;i++) {
10273  // depth=6
10274  for (int i = 5; i < 6; i++) {
10275  TH1F* HEnegativedirectionReconoiseDIF6 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF6->Clone("twod1");
10276 
10277  float ccctest = 0; // to avoid empty massive elements
10278  for (int jphi = 0; jphi < nphi; jphi++) {
10279  double ccc1 = breconoisehe[i][jeta][jphi];
10280  if (ccc1 != 0.) {
10281  HEnegativedirectionReconoiseDIF6->Fill(jphi, ccc1);
10282  ccctest = 1.; //HEnegativedirectionReconoiseDIF6->SetBinError(i,0.01);
10283  }
10284  } // for jphi
10285  if (ccctest > 0.) {
10286  //cout<<"999 kcountHEnegativedirectionReconoiseDIF6 = "<<kcountHEnegativedirectionReconoiseDIF6 <<" jeta-41= "<< jeta-41 <<endl;
10287  c3x5->cd(kcountHEnegativedirectionReconoiseDIF6);
10288  HEnegativedirectionReconoiseDIF6->SetMarkerStyle(20);
10289  HEnegativedirectionReconoiseDIF6->SetMarkerSize(0.4);
10290  HEnegativedirectionReconoiseDIF6->GetYaxis()->SetLabelSize(0.04);
10291  HEnegativedirectionReconoiseDIF6->SetXTitle("HEnegativedirectionReconoiseDIF6 \b");
10292  HEnegativedirectionReconoiseDIF6->SetMarkerColor(2);
10293  HEnegativedirectionReconoiseDIF6->SetLineColor(0);
10294  gPad->SetGridy();
10295  gPad->SetGridx();
10296  // gPad->SetLogy();
10297  if (kcountHEnegativedirectionReconoiseDIF6 == 1)
10298  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-28; depth = 6 \b");
10299  if (kcountHEnegativedirectionReconoiseDIF6 == 2)
10300  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-27; depth = 6 \b");
10301  if (kcountHEnegativedirectionReconoiseDIF6 == 3)
10302  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-26; depth = 6 \b");
10303  if (kcountHEnegativedirectionReconoiseDIF6 == 4)
10304  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-25; depth = 6 \b");
10305  if (kcountHEnegativedirectionReconoiseDIF6 == 5)
10306  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-24; depth = 6 \b");
10307  if (kcountHEnegativedirectionReconoiseDIF6 == 6)
10308  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-23; depth = 6 \b");
10309  if (kcountHEnegativedirectionReconoiseDIF6 == 7)
10310  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-22; depth = 6 \b");
10311  if (kcountHEnegativedirectionReconoiseDIF6 == 8)
10312  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-21; depth = 6 \b");
10313  if (kcountHEnegativedirectionReconoiseDIF6 == 9)
10314  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-20; depth = 6 \b");
10315  if (kcountHEnegativedirectionReconoiseDIF6 == 10)
10316  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-19; depth = 6 \b");
10317  HEnegativedirectionReconoiseDIF6->Draw("Error");
10318  kcountHEnegativedirectionReconoiseDIF6++;
10319  if (kcountHEnegativedirectionReconoiseDIF6 > 10)
10320  break; // 4x6 = 24
10321  } //ccctest>0
10322 
10323  } // for i
10324  } //if(jeta-41 >= -29 && jeta-41 <= -16)
10325  } //for jeta
10327  c3x5->Update();
10328  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
10329  c3x5->Clear();
10330  // clean-up
10331  if (h2CeffHEnegativedirectionReconoiseDIF6)
10332  delete h2CeffHEnegativedirectionReconoiseDIF6;
10333  //========================================================================================== 11110
10334  //======================================================================
10335  //======================================================================1D plot: R vs phi , different eta, depth=7
10336  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
10337  c3x5->Clear();
10339  c3x5->Divide(3, 5);
10340  c3x5->cd(1);
10341  int kcountHEnegativedirectionReconoiseDIF7 = 1;
10342  TH1F* h2CeffHEnegativedirectionReconoiseDIF7 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF7", "", nphi, 0., 72.);
10343 
10344  for (int jeta = 0; jeta < njeta; jeta++) {
10345  // negativedirectionReconoiseDIF:
10346  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
10347  // for (int i=0;i<ndepth;i++) {
10348  // depth=7
10349  for (int i = 6; i < 7; i++) {
10350  TH1F* HEnegativedirectionReconoiseDIF7 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF7->Clone("twod1");
10351 
10352  float ccctest = 0; // to avoid empty massive elements
10353  for (int jphi = 0; jphi < nphi; jphi++) {
10354  double ccc1 = breconoisehe[i][jeta][jphi];
10355  if (ccc1 != 0.) {
10356  HEnegativedirectionReconoiseDIF7->Fill(jphi, ccc1);
10357  ccctest = 1.; //HEnegativedirectionReconoiseDIF7->SetBinError(i,0.01);
10358  }
10359  } // for jphi
10360  if (ccctest > 0.) {
10361  //cout<<"1010 kcountHEnegativedirectionReconoiseDIF7 = "<<kcountHEnegativedirectionReconoiseDIF7 <<" jeta-41= "<< jeta-41 <<endl;
10362  c3x5->cd(kcountHEnegativedirectionReconoiseDIF7);
10363  HEnegativedirectionReconoiseDIF7->SetMarkerStyle(20);
10364  HEnegativedirectionReconoiseDIF7->SetMarkerSize(0.4);
10365  HEnegativedirectionReconoiseDIF7->GetYaxis()->SetLabelSize(0.04);
10366  HEnegativedirectionReconoiseDIF7->SetXTitle("HEnegativedirectionReconoiseDIF7 \b");
10367  HEnegativedirectionReconoiseDIF7->SetMarkerColor(2);
10368  HEnegativedirectionReconoiseDIF7->SetLineColor(0);
10369  gPad->SetGridy();
10370  gPad->SetGridx();
10371  // gPad->SetLogy();
10372  if (kcountHEnegativedirectionReconoiseDIF7 == 1)
10373  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-28; depth = 7 \b");
10374  if (kcountHEnegativedirectionReconoiseDIF7 == 2)
10375  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-27; depth = 7 \b");
10376  if (kcountHEnegativedirectionReconoiseDIF7 == 3)
10377  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-26; depth = 7 \b");
10378  HEnegativedirectionReconoiseDIF7->Draw("Error");
10379  kcountHEnegativedirectionReconoiseDIF7++;
10380  if (kcountHEnegativedirectionReconoiseDIF7 > 3)
10381  break; // 4x6 = 24
10382  } //ccctest>0
10383 
10384  } // for i
10385  } //if(jeta-41 >= -29 && jeta-41 <= -16)
10386  } //for jeta
10388  c3x5->Update();
10389  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
10390  c3x5->Clear();
10391  // clean-up
10392  if (h2CeffHEnegativedirectionReconoiseDIF7)
10393  delete h2CeffHEnegativedirectionReconoiseDIF7;
10394 
10395  //======================================================================================================================
10396  //======================================================================================================================
10398  //======================================================================================================================
10399  //======================================================================================================================
10400  //======================================================================================================================
10401 
10402  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
10403 
10404  //cout<<" Start Vaiance: preparation *****" <<endl;
10405  TH2F* reconoiseVariance1HE1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE1");
10406  TH2F* reconoiseVariance0HE1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE1");
10407  TH2F* reconoiseVarianceHE1 = (TH2F*)reconoiseVariance1HE1->Clone("reconoiseVarianceHE1");
10408  reconoiseVarianceHE1->Divide(reconoiseVariance1HE1, reconoiseVariance0HE1, 1, 1, "B");
10409  TH2F* reconoiseVariance1HE2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE2");
10410  TH2F* reconoiseVariance0HE2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE2");
10411  TH2F* reconoiseVarianceHE2 = (TH2F*)reconoiseVariance1HE2->Clone("reconoiseVarianceHE2");
10412  reconoiseVarianceHE2->Divide(reconoiseVariance1HE2, reconoiseVariance0HE2, 1, 1, "B");
10413  TH2F* reconoiseVariance1HE3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE3");
10414  TH2F* reconoiseVariance0HE3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE3");
10415  TH2F* reconoiseVarianceHE3 = (TH2F*)reconoiseVariance1HE3->Clone("reconoiseVarianceHE3");
10416  reconoiseVarianceHE3->Divide(reconoiseVariance1HE3, reconoiseVariance0HE3, 1, 1, "B");
10417  TH2F* reconoiseVariance1HE4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE4");
10418  TH2F* reconoiseVariance0HE4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE4");
10419  TH2F* reconoiseVarianceHE4 = (TH2F*)reconoiseVariance1HE4->Clone("reconoiseVarianceHE4");
10420  reconoiseVarianceHE4->Divide(reconoiseVariance1HE4, reconoiseVariance0HE4, 1, 1, "B");
10421  TH2F* reconoiseVariance1HE5 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE5");
10422  TH2F* reconoiseVariance0HE5 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE5");
10423  TH2F* reconoiseVarianceHE5 = (TH2F*)reconoiseVariance1HE5->Clone("reconoiseVarianceHE5");
10424  reconoiseVarianceHE5->Divide(reconoiseVariance1HE5, reconoiseVariance0HE5, 1, 1, "B");
10425  TH2F* reconoiseVariance1HE6 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE6");
10426  TH2F* reconoiseVariance0HE6 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE6");
10427  TH2F* reconoiseVarianceHE6 = (TH2F*)reconoiseVariance1HE6->Clone("reconoiseVarianceHE6");
10428  reconoiseVarianceHE6->Divide(reconoiseVariance1HE6, reconoiseVariance0HE6, 1, 1, "B");
10429  TH2F* reconoiseVariance1HE7 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE7");
10430  TH2F* reconoiseVariance0HE7 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE7");
10431  TH2F* reconoiseVarianceHE7 = (TH2F*)reconoiseVariance1HE7->Clone("reconoiseVarianceHE7");
10432  reconoiseVarianceHE7->Divide(reconoiseVariance1HE7, reconoiseVariance0HE7, 1, 1, "B");
10433  //cout<<" Vaiance: preparation DONE *****" <<endl;
10434  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevariancehe
10435  // = sum(R*R)/N - (sum(R)/N)**2
10436  for (int jeta = 0; jeta < njeta; jeta++) {
10437  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
10438  //preparation for PHI normalization:
10439  double sumreconoiseHE0 = 0;
10440  int nsumreconoiseHE0 = 0;
10441  double sumreconoiseHE1 = 0;
10442  int nsumreconoiseHE1 = 0;
10443  double sumreconoiseHE2 = 0;
10444  int nsumreconoiseHE2 = 0;
10445  double sumreconoiseHE3 = 0;
10446  int nsumreconoiseHE3 = 0;
10447  double sumreconoiseHE4 = 0;
10448  int nsumreconoiseHE4 = 0;
10449  double sumreconoiseHE5 = 0;
10450  int nsumreconoiseHE5 = 0;
10451  double sumreconoiseHE6 = 0;
10452  int nsumreconoiseHE6 = 0;
10453  for (int jphi = 0; jphi < njphi; jphi++) {
10454  reconoisevariancehe[0][jeta][jphi] = reconoiseVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
10455  reconoisevariancehe[1][jeta][jphi] = reconoiseVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
10456  reconoisevariancehe[2][jeta][jphi] = reconoiseVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
10457  reconoisevariancehe[3][jeta][jphi] = reconoiseVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
10458  reconoisevariancehe[4][jeta][jphi] = reconoiseVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
10459  reconoisevariancehe[5][jeta][jphi] = reconoiseVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
10460  reconoisevariancehe[6][jeta][jphi] = reconoiseVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
10461  if (reconoisevariancehe[0][jeta][jphi] != 0.) {
10462  sumreconoiseHE0 += reconoisevariancehe[0][jeta][jphi];
10463  ++nsumreconoiseHE0;
10464  }
10465  if (reconoisevariancehe[1][jeta][jphi] != 0.) {
10466  sumreconoiseHE1 += reconoisevariancehe[1][jeta][jphi];
10467  ++nsumreconoiseHE1;
10468  }
10469  if (reconoisevariancehe[2][jeta][jphi] != 0.) {
10470  sumreconoiseHE2 += reconoisevariancehe[2][jeta][jphi];
10471  ++nsumreconoiseHE2;
10472  }
10473  if (reconoisevariancehe[3][jeta][jphi] != 0.) {
10474  sumreconoiseHE3 += reconoisevariancehe[3][jeta][jphi];
10475  ++nsumreconoiseHE3;
10476  }
10477  if (reconoisevariancehe[4][jeta][jphi] != 0.) {
10478  sumreconoiseHE4 += reconoisevariancehe[4][jeta][jphi];
10479  ++nsumreconoiseHE4;
10480  }
10481  if (reconoisevariancehe[5][jeta][jphi] != 0.) {
10482  sumreconoiseHE5 += reconoisevariancehe[5][jeta][jphi];
10483  ++nsumreconoiseHE5;
10484  }
10485  if (reconoisevariancehe[6][jeta][jphi] != 0.) {
10486  sumreconoiseHE6 += reconoisevariancehe[6][jeta][jphi];
10487  ++nsumreconoiseHE6;
10488  }
10489  } // phi
10490  // PHI normalization :
10491  for (int jphi = 0; jphi < njphi; jphi++) {
10492  if (sumreconoiseHE0 != 0.)
10493  reconoisevariancehe[0][jeta][jphi] /= (sumreconoiseHE0 / nsumreconoiseHE0);
10494  if (sumreconoiseHE1 != 0.)
10495  reconoisevariancehe[1][jeta][jphi] /= (sumreconoiseHE1 / nsumreconoiseHE1);
10496  if (sumreconoiseHE2 != 0.)
10497  reconoisevariancehe[2][jeta][jphi] /= (sumreconoiseHE2 / nsumreconoiseHE2);
10498  if (sumreconoiseHE3 != 0.)
10499  reconoisevariancehe[3][jeta][jphi] /= (sumreconoiseHE3 / nsumreconoiseHE3);
10500  if (sumreconoiseHE4 != 0.)
10501  reconoisevariancehe[4][jeta][jphi] /= (sumreconoiseHE4 / nsumreconoiseHE4);
10502  if (sumreconoiseHE5 != 0.)
10503  reconoisevariancehe[5][jeta][jphi] /= (sumreconoiseHE5 / nsumreconoiseHE5);
10504  if (sumreconoiseHE6 != 0.)
10505  reconoisevariancehe[6][jeta][jphi] /= (sumreconoiseHE6 / nsumreconoiseHE6);
10506  } // phi
10507  // reconoisevariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
10508  for (int jphi = 0; jphi < njphi; jphi++) {
10509  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
10510  reconoisevariancehe[0][jeta][jphi] -= areconoisehe[0][jeta][jphi] * areconoisehe[0][jeta][jphi];
10511  reconoisevariancehe[0][jeta][jphi] = fabs(reconoisevariancehe[0][jeta][jphi]);
10512  reconoisevariancehe[1][jeta][jphi] -= areconoisehe[1][jeta][jphi] * areconoisehe[1][jeta][jphi];
10513  reconoisevariancehe[1][jeta][jphi] = fabs(reconoisevariancehe[1][jeta][jphi]);
10514  reconoisevariancehe[2][jeta][jphi] -= areconoisehe[2][jeta][jphi] * areconoisehe[2][jeta][jphi];
10515  reconoisevariancehe[2][jeta][jphi] = fabs(reconoisevariancehe[2][jeta][jphi]);
10516  reconoisevariancehe[3][jeta][jphi] -= areconoisehe[3][jeta][jphi] * areconoisehe[3][jeta][jphi];
10517  reconoisevariancehe[3][jeta][jphi] = fabs(reconoisevariancehe[3][jeta][jphi]);
10518  reconoisevariancehe[4][jeta][jphi] -= areconoisehe[4][jeta][jphi] * areconoisehe[4][jeta][jphi];
10519  reconoisevariancehe[4][jeta][jphi] = fabs(reconoisevariancehe[4][jeta][jphi]);
10520  reconoisevariancehe[5][jeta][jphi] -= areconoisehe[5][jeta][jphi] * areconoisehe[5][jeta][jphi];
10521  reconoisevariancehe[5][jeta][jphi] = fabs(reconoisevariancehe[5][jeta][jphi]);
10522  reconoisevariancehe[6][jeta][jphi] -= areconoisehe[6][jeta][jphi] * areconoisehe[6][jeta][jphi];
10523  reconoisevariancehe[6][jeta][jphi] = fabs(reconoisevariancehe[6][jeta][jphi]);
10524  }
10525  }
10526  }
10527  //cout<<" Vaiance: DONE*****" <<endl;
10528  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
10529  //======================================================================
10530  //======================================================================
10531  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
10532  c1x1->Clear();
10534  c1x0->Divide(1, 1);
10535  c1x0->cd(1);
10536  TH2F* DefzDreconoiseHE42D = new TH2F("DefzDreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
10537  TH2F* DefzDreconoiseHE42D0 = new TH2F("DefzDreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
10538  TH2F* DefzDreconoiseHE42DF = (TH2F*)DefzDreconoiseHE42D0->Clone("DefzDreconoiseHE42DF");
10539  for (int i = 0; i < ndepth; i++) {
10540  for (int jeta = 0; jeta < neta; jeta++) {
10541  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
10542  for (int jphi = 0; jphi < nphi; jphi++) {
10543  double ccc1 = reconoisevariancehe[i][jeta][jphi];
10544  int k2plot = jeta - 41;
10545  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
10546  if (areconoisehe[i][jeta][jphi] > 0.) {
10547  DefzDreconoiseHE42D->Fill(kkk, jphi, ccc1);
10548  DefzDreconoiseHE42D0->Fill(kkk, jphi, 1.);
10549  }
10550  }
10551  }
10552  }
10553  }
10554  DefzDreconoiseHE42DF->Divide(DefzDreconoiseHE42D, DefzDreconoiseHE42D0, 1, 1, "B"); // average A
10555  // DefzDreconoiseHE1->Sumw2();
10556  gPad->SetGridy();
10557  gPad->SetGridx(); // gPad->SetLogz();
10558  DefzDreconoiseHE42DF->SetMarkerStyle(20);
10559  DefzDreconoiseHE42DF->SetMarkerSize(0.4);
10560  DefzDreconoiseHE42DF->GetZaxis()->SetLabelSize(0.08);
10561  DefzDreconoiseHE42DF->SetXTitle("<D>_depth #eta \b");
10562  DefzDreconoiseHE42DF->SetYTitle(" #phi \b");
10563  DefzDreconoiseHE42DF->SetZTitle("<D>_depth \b");
10564  DefzDreconoiseHE42DF->SetMarkerColor(2);
10565  DefzDreconoiseHE42DF->SetLineColor(
10566  0); // DefzDreconoiseHE42DF->SetMaximum(1.000); // DefzDreconoiseHE42DF->SetMinimum(1.0);
10567  DefzDreconoiseHE42DF->Draw("COLZ");
10569  c1x0->Update();
10570  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHE.png");
10571  c1x0->Clear();
10572  // clean-up
10573  if (DefzDreconoiseHE42D)
10574  delete DefzDreconoiseHE42D;
10575  if (DefzDreconoiseHE42D0)
10576  delete DefzDreconoiseHE42D0;
10577  if (DefzDreconoiseHE42DF)
10578  delete DefzDreconoiseHE42DF;
10579  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
10580  //======================================================================
10581  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
10582  c1x1->Clear();
10584  c1x1->Divide(1, 1);
10585  c1x1->cd(1);
10586  TH1F* DefzDreconoiseHE41D = new TH1F("DefzDreconoiseHE41D", "", nphi, 0., 72.);
10587  TH1F* DefzDreconoiseHE41D0 = new TH1F("DefzDreconoiseHE41D0", "", nphi, 0., 72.);
10588  TH1F* DefzDreconoiseHE41DF = (TH1F*)DefzDreconoiseHE41D0->Clone("DefzDreconoiseHE41DF");
10589 
10590  for (int jphi = 0; jphi < nphi; jphi++) {
10591  for (int jeta = 0; jeta < neta; jeta++) {
10592  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
10593  for (int i = 0; i < ndepth; i++) {
10594  double ccc1 = reconoisevariancehe[i][jeta][jphi];
10595  if (areconoisehe[i][jeta][jphi] > 0.) {
10596  DefzDreconoiseHE41D->Fill(jphi, ccc1);
10597  DefzDreconoiseHE41D0->Fill(jphi, 1.);
10598  }
10599  }
10600  }
10601  }
10602  }
10603  // DefzDreconoiseHE41D->Sumw2();DefzDreconoiseHE41D0->Sumw2();
10604 
10605  DefzDreconoiseHE41DF->Divide(DefzDreconoiseHE41D, DefzDreconoiseHE41D0, 1, 1, "B"); // R averaged over depthes & eta
10606  DefzDreconoiseHE41D0->Sumw2();
10607  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHE41DF->SetBinError(jphi,0.01);}
10608  gPad->SetGridy();
10609  gPad->SetGridx(); // gPad->SetLogz();
10610  DefzDreconoiseHE41DF->SetMarkerStyle(20);
10611  DefzDreconoiseHE41DF->SetMarkerSize(1.4);
10612  DefzDreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
10613  DefzDreconoiseHE41DF->SetXTitle("#phi \b");
10614  DefzDreconoiseHE41DF->SetYTitle(" <D> \b");
10615  DefzDreconoiseHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
10616  DefzDreconoiseHE41DF->SetMarkerColor(4);
10617  DefzDreconoiseHE41DF->SetLineColor(
10618  4); // DefzDreconoiseHE41DF->SetMinimum(0.8); DefzDreconoiseHE41DF->SetMinimum(-0.015);
10619  DefzDreconoiseHE41DF->Draw("Error");
10621  c1x1->Update();
10622  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHE.png");
10623  c1x1->Clear();
10624  // clean-up
10625  if (DefzDreconoiseHE41D)
10626  delete DefzDreconoiseHE41D;
10627  if (DefzDreconoiseHE41D0)
10628  delete DefzDreconoiseHE41D0;
10629  if (DefzDreconoiseHE41DF)
10630  delete DefzDreconoiseHE41DF;
10631  //========================================================================================== 14
10632  //======================================================================
10633  //======================================================================1D plot: D vs phi , different eta, depth=1
10634  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
10635  c3x5->Clear();
10637  c3x5->Divide(3, 5);
10638  c3x5->cd(1);
10639  int kcountHEpositivedirectionReconoiseD1 = 1;
10640  TH1F* h2CeffHEpositivedirectionReconoiseD1 = new TH1F("h2CeffHEpositivedirectionReconoiseD1", "", nphi, 0., 72.);
10641 
10642  for (int jeta = 0; jeta < njeta; jeta++) {
10643  // positivedirectionReconoiseD:
10644  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
10645  // for (int i=0;i<ndepth;i++) {
10646  // depth=1
10647  for (int i = 0; i < 1; i++) {
10648  TH1F* HEpositivedirectionReconoiseD1 = (TH1F*)h2CeffHEpositivedirectionReconoiseD1->Clone("twod1");
10649 
10650  float ccctest = 0; // to avoid empty massive elements
10651  for (int jphi = 0; jphi < nphi; jphi++) {
10652  double ccc1 = reconoisevariancehe[i][jeta][jphi];
10653  if (areconoisehe[i][jeta][jphi] > 0.) {
10654  HEpositivedirectionReconoiseD1->Fill(jphi, ccc1);
10655  ccctest = 1.; //HEpositivedirectionReconoiseD1->SetBinError(i,0.01);
10656  }
10657  } // for jphi
10658  if (ccctest > 0.) {
10659  //cout<<"1414 kcountHEpositivedirectionReconoiseD1 = "<<kcountHEpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
10660  c3x5->cd(kcountHEpositivedirectionReconoiseD1);
10661  HEpositivedirectionReconoiseD1->SetMarkerStyle(20);
10662  HEpositivedirectionReconoiseD1->SetMarkerSize(0.4);
10663  HEpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
10664  HEpositivedirectionReconoiseD1->SetXTitle("HEpositivedirectionReconoiseD1 \b");
10665  HEpositivedirectionReconoiseD1->SetMarkerColor(2);
10666  HEpositivedirectionReconoiseD1->SetLineColor(0);
10667  gPad->SetGridy();
10668  gPad->SetGridx();
10669  // gPad->SetLogy();
10670  if (kcountHEpositivedirectionReconoiseD1 == 1)
10671  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
10672  if (kcountHEpositivedirectionReconoiseD1 == 2)
10673  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
10674  if (kcountHEpositivedirectionReconoiseD1 == 3)
10675  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
10676  if (kcountHEpositivedirectionReconoiseD1 == 4)
10677  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
10678  if (kcountHEpositivedirectionReconoiseD1 == 5)
10679  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
10680  if (kcountHEpositivedirectionReconoiseD1 == 6)
10681  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
10682  if (kcountHEpositivedirectionReconoiseD1 == 7)
10683  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
10684  if (kcountHEpositivedirectionReconoiseD1 == 8)
10685  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
10686  if (kcountHEpositivedirectionReconoiseD1 == 9)
10687  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
10688  if (kcountHEpositivedirectionReconoiseD1 == 10)
10689  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
10690  if (kcountHEpositivedirectionReconoiseD1 == 11)
10691  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
10692  if (kcountHEpositivedirectionReconoiseD1 == 12)
10693  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
10694  HEpositivedirectionReconoiseD1->Draw("Error");
10695  kcountHEpositivedirectionReconoiseD1++;
10696  if (kcountHEpositivedirectionReconoiseD1 > 12)
10697  break; // 4x6 = 24
10698  } //ccctest>0
10699 
10700  } // for i
10701  } //if(jeta-41 >= 0)
10702  } //for jeta
10704  c3x5->Update();
10705  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
10706  c3x5->Clear();
10707  // clean-up
10708  if (h2CeffHEpositivedirectionReconoiseD1)
10709  delete h2CeffHEpositivedirectionReconoiseD1;
10710  //========================================================================================== 15
10711  //======================================================================
10712  //======================================================================1D plot: D vs phi , different eta, depth=2
10713  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
10714  c3x5->Clear();
10715  c3x5->Divide(3, 5);
10716  c3x5->cd(1);
10717  int kcountHEpositivedirectionReconoiseD2 = 1;
10718  TH1F* h2CeffHEpositivedirectionReconoiseD2 = new TH1F("h2CeffHEpositivedirectionReconoiseD2", "", nphi, 0., 72.);
10719 
10720  for (int jeta = 0; jeta < njeta; jeta++) {
10721  // positivedirectionReconoiseD:
10722  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
10723  // for (int i=0;i<ndepth;i++) {
10724  // depth=2
10725  for (int i = 1; i < 2; i++) {
10726  TH1F* HEpositivedirectionReconoiseD2 = (TH1F*)h2CeffHEpositivedirectionReconoiseD2->Clone("twod1");
10727 
10728  float ccctest = 0; // to avoid empty massive elements
10729  for (int jphi = 0; jphi < nphi; jphi++) {
10730  double ccc1 = reconoisevariancehe[i][jeta][jphi];
10731  if (areconoisehe[i][jeta][jphi] > 0.) {
10732  HEpositivedirectionReconoiseD2->Fill(jphi, ccc1);
10733  ccctest = 1.; //HEpositivedirectionReconoiseD2->SetBinError(i,0.01);
10734  }
10735  } // for jphi
10736  if (ccctest > 0.) {
10737  //cout<<"1515 kcountHEpositivedirectionReconoiseD2 = "<<kcountHEpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
10738  c3x5->cd(kcountHEpositivedirectionReconoiseD2);
10739  HEpositivedirectionReconoiseD2->SetMarkerStyle(20);
10740  HEpositivedirectionReconoiseD2->SetMarkerSize(0.4);
10741  HEpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
10742  HEpositivedirectionReconoiseD2->SetXTitle("HEpositivedirectionReconoiseD2 \b");
10743  HEpositivedirectionReconoiseD2->SetMarkerColor(2);
10744  HEpositivedirectionReconoiseD2->SetLineColor(0);
10745  gPad->SetGridy();
10746  gPad->SetGridx();
10747  // gPad->SetLogy();
10748  if (kcountHEpositivedirectionReconoiseD2 == 1)
10749  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
10750  if (kcountHEpositivedirectionReconoiseD2 == 2)
10751  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
10752  if (kcountHEpositivedirectionReconoiseD2 == 3)
10753  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
10754  if (kcountHEpositivedirectionReconoiseD2 == 4)
10755  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
10756  if (kcountHEpositivedirectionReconoiseD2 == 5)
10757  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
10758  if (kcountHEpositivedirectionReconoiseD2 == 6)
10759  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
10760  if (kcountHEpositivedirectionReconoiseD2 == 7)
10761  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
10762  if (kcountHEpositivedirectionReconoiseD2 == 8)
10763  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
10764  if (kcountHEpositivedirectionReconoiseD2 == 9)
10765  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
10766  if (kcountHEpositivedirectionReconoiseD2 == 10)
10767  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
10768  if (kcountHEpositivedirectionReconoiseD2 == 11)
10769  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
10770  if (kcountHEpositivedirectionReconoiseD2 == 12)
10771  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
10772  if (kcountHEpositivedirectionReconoiseD2 == 13)
10773  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
10774  HEpositivedirectionReconoiseD2->Draw("Error");
10775  kcountHEpositivedirectionReconoiseD2++;
10776  if (kcountHEpositivedirectionReconoiseD2 > 13)
10777  break; // 4x6 = 24
10778  } //ccctest>0
10779 
10780  } // for i
10781  } //if(jeta-41 >= 0)
10782  } //for jeta
10784  c3x5->Update();
10785  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
10786  c3x5->Clear();
10787  // clean-up
10788  if (h2CeffHEpositivedirectionReconoiseD2)
10789  delete h2CeffHEpositivedirectionReconoiseD2;
10790  //========================================================================================== 16
10791  //======================================================================
10792  //======================================================================1D plot: D vs phi , different eta, depth=3
10793  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
10794  c3x5->Clear();
10795  c3x5->Divide(3, 5);
10796  c3x5->cd(1);
10797  int kcountHEpositivedirectionReconoiseD3 = 1;
10798  TH1F* h2CeffHEpositivedirectionReconoiseD3 = new TH1F("h2CeffHEpositivedirectionReconoiseD3", "", nphi, 0., 72.);
10799 
10800  for (int jeta = 0; jeta < njeta; jeta++) {
10801  // positivedirectionReconoiseD:
10802  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
10803  // for (int i=0;i<ndepth;i++) {
10804  // depth=3
10805  for (int i = 2; i < 3; i++) {
10806  TH1F* HEpositivedirectionReconoiseD3 = (TH1F*)h2CeffHEpositivedirectionReconoiseD3->Clone("twod1");
10807 
10808  float ccctest = 0; // to avoid empty massive elements
10809  for (int jphi = 0; jphi < nphi; jphi++) {
10810  double ccc1 = reconoisevariancehe[i][jeta][jphi];
10811  if (areconoisehe[i][jeta][jphi] > 0.) {
10812  HEpositivedirectionReconoiseD3->Fill(jphi, ccc1);
10813  ccctest = 1.; //HEpositivedirectionReconoiseD3->SetBinError(i,0.01);
10814  }
10815  } // for jphi
10816  if (ccctest > 0.) {
10817  //cout<<"1616 kcountHEpositivedirectionReconoiseD3 = "<<kcountHEpositivedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
10818  c3x5->cd(kcountHEpositivedirectionReconoiseD3);
10819  HEpositivedirectionReconoiseD3->SetMarkerStyle(20);
10820  HEpositivedirectionReconoiseD3->SetMarkerSize(0.4);
10821  HEpositivedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
10822  HEpositivedirectionReconoiseD3->SetXTitle("HEpositivedirectionReconoiseD3 \b");
10823  HEpositivedirectionReconoiseD3->SetMarkerColor(2);
10824  HEpositivedirectionReconoiseD3->SetLineColor(0);
10825  gPad->SetGridy();
10826  gPad->SetGridx();
10827  // gPad->SetLogy();
10828  if (kcountHEpositivedirectionReconoiseD3 == 1)
10829  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
10830  if (kcountHEpositivedirectionReconoiseD3 == 2)
10831  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
10832  if (kcountHEpositivedirectionReconoiseD3 == 3)
10833  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
10834  if (kcountHEpositivedirectionReconoiseD3 == 4)
10835  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
10836  if (kcountHEpositivedirectionReconoiseD3 == 5)
10837  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
10838  if (kcountHEpositivedirectionReconoiseD3 == 6)
10839  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
10840  if (kcountHEpositivedirectionReconoiseD3 == 7)
10841  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
10842  if (kcountHEpositivedirectionReconoiseD3 == 8)
10843  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
10844  if (kcountHEpositivedirectionReconoiseD3 == 9)
10845  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
10846  if (kcountHEpositivedirectionReconoiseD3 == 10)
10847  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
10848  if (kcountHEpositivedirectionReconoiseD3 == 11)
10849  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
10850  if (kcountHEpositivedirectionReconoiseD3 == 12)
10851  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
10852  if (kcountHEpositivedirectionReconoiseD3 == 13)
10853  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
10854  HEpositivedirectionReconoiseD3->Draw("Error");
10855  kcountHEpositivedirectionReconoiseD3++;
10856  if (kcountHEpositivedirectionReconoiseD3 > 13)
10857  break; // 4x6 = 24
10858  } //ccctest>0
10859 
10860  } // for i
10861  } //if(jeta-41 >= 0)
10862  } //for jeta
10864  c3x5->Update();
10865  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
10866  c3x5->Clear();
10867  // clean-up
10868  if (h2CeffHEpositivedirectionReconoiseD3)
10869  delete h2CeffHEpositivedirectionReconoiseD3;
10870  //========================================================================================== 17
10871  //======================================================================
10872  //======================================================================1D plot: D vs phi , different eta, depth=4
10873  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
10874  c3x5->Clear();
10875  c3x5->Divide(3, 5);
10876  c3x5->cd(1);
10877  int kcountHEpositivedirectionReconoiseD4 = 1;
10878  TH1F* h2CeffHEpositivedirectionReconoiseD4 = new TH1F("h2CeffHEpositivedirectionReconoiseD4", "", nphi, 0., 72.);
10879 
10880  for (int jeta = 0; jeta < njeta; jeta++) {
10881  // positivedirectionReconoiseD:
10882  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
10883  // for (int i=0;i<ndepth;i++) {
10884  // depth=4
10885  for (int i = 3; i < 4; i++) {
10886  TH1F* HEpositivedirectionReconoiseD4 = (TH1F*)h2CeffHEpositivedirectionReconoiseD4->Clone("twod1");
10887 
10888  float ccctest = 0; // to avoid empty massive elements
10889  for (int jphi = 0; jphi < nphi; jphi++) {
10890  double ccc1 = reconoisevariancehe[i][jeta][jphi];
10891  if (areconoisehe[i][jeta][jphi] > 0.) {
10892  HEpositivedirectionReconoiseD4->Fill(jphi, ccc1);
10893  ccctest = 1.; //HEpositivedirectionReconoiseD4->SetBinError(i,0.01);
10894  }
10895  } // for jphi
10896  if (ccctest > 0.) {
10897  //cout<<"1717 kcountHEpositivedirectionReconoiseD4 = "<<kcountHEpositivedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
10898  c3x5->cd(kcountHEpositivedirectionReconoiseD4);
10899  HEpositivedirectionReconoiseD4->SetMarkerStyle(20);
10900  HEpositivedirectionReconoiseD4->SetMarkerSize(0.4);
10901  HEpositivedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
10902  HEpositivedirectionReconoiseD4->SetXTitle("HEpositivedirectionReconoiseD4 \b");
10903  HEpositivedirectionReconoiseD4->SetMarkerColor(2);
10904  HEpositivedirectionReconoiseD4->SetLineColor(0);
10905  gPad->SetGridy();
10906  gPad->SetGridx();
10907  // gPad->SetLogy();
10908  if (kcountHEpositivedirectionReconoiseD4 == 1)
10909  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
10910  if (kcountHEpositivedirectionReconoiseD4 == 2)
10911  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
10912  if (kcountHEpositivedirectionReconoiseD4 == 3)
10913  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
10914  if (kcountHEpositivedirectionReconoiseD4 == 4)
10915  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
10916  if (kcountHEpositivedirectionReconoiseD4 == 5)
10917  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
10918  if (kcountHEpositivedirectionReconoiseD4 == 6)
10919  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
10920  if (kcountHEpositivedirectionReconoiseD4 == 7)
10921  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
10922  if (kcountHEpositivedirectionReconoiseD4 == 8)
10923  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
10924  if (kcountHEpositivedirectionReconoiseD4 == 9)
10925  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
10926  if (kcountHEpositivedirectionReconoiseD4 == 10)
10927  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
10928  if (kcountHEpositivedirectionReconoiseD4 == 11)
10929  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
10930  if (kcountHEpositivedirectionReconoiseD4 == 12)
10931  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
10932  HEpositivedirectionReconoiseD4->Draw("Error");
10933  kcountHEpositivedirectionReconoiseD4++;
10934  if (kcountHEpositivedirectionReconoiseD4 > 12)
10935  break; // 4x6 = 24
10936  } //ccctest>0
10937 
10938  } // for i
10939  } //if(jeta-41 >= 0)
10940  } //for jeta
10942  c3x5->Update();
10943  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
10944  c3x5->Clear();
10945  // clean-up
10946  if (h2CeffHEpositivedirectionReconoiseD4)
10947  delete h2CeffHEpositivedirectionReconoiseD4;
10948  //========================================================================================== 18
10949  //======================================================================
10950  //======================================================================1D plot: D vs phi , different eta, depth=5
10951  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
10952  c3x5->Clear();
10953  c3x5->Divide(3, 5);
10954  c3x5->cd(1);
10955  int kcountHEpositivedirectionReconoiseD5 = 1;
10956  TH1F* h2CeffHEpositivedirectionReconoiseD5 = new TH1F("h2CeffHEpositivedirectionReconoiseD5", "", nphi, 0., 72.);
10957 
10958  for (int jeta = 0; jeta < njeta; jeta++) {
10959  // positivedirectionReconoiseD:
10960  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
10961  // for (int i=0;i<ndepth;i++) {
10962  // depth=5
10963  for (int i = 4; i < 5; i++) {
10964  TH1F* HEpositivedirectionReconoiseD5 = (TH1F*)h2CeffHEpositivedirectionReconoiseD5->Clone("twod1");
10965 
10966  float ccctest = 0; // to avoid empty massive elements
10967  for (int jphi = 0; jphi < nphi; jphi++) {
10968  double ccc1 = reconoisevariancehe[i][jeta][jphi];
10969  if (areconoisehe[i][jeta][jphi] > 0.) {
10970  HEpositivedirectionReconoiseD5->Fill(jphi, ccc1);
10971  ccctest = 1.; //HEpositivedirectionReconoiseD5->SetBinError(i,0.01);
10972  }
10973  } // for jphi
10974  if (ccctest > 0.) {
10975  //cout<<"1818 kcountHEpositivedirectionReconoiseD5 = "<<kcountHEpositivedirectionReconoiseD5 <<" jeta-41= "<< jeta-41 <<endl;
10976  c3x5->cd(kcountHEpositivedirectionReconoiseD5);
10977  HEpositivedirectionReconoiseD5->SetMarkerStyle(20);
10978  HEpositivedirectionReconoiseD5->SetMarkerSize(0.4);
10979  HEpositivedirectionReconoiseD5->GetYaxis()->SetLabelSize(0.04);
10980  HEpositivedirectionReconoiseD5->SetXTitle("HEpositivedirectionReconoiseD5 \b");
10981  HEpositivedirectionReconoiseD5->SetMarkerColor(2);
10982  HEpositivedirectionReconoiseD5->SetLineColor(0);
10983  gPad->SetGridy();
10984  gPad->SetGridx();
10985  // gPad->SetLogy();
10986  if (kcountHEpositivedirectionReconoiseD5 == 1)
10987  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
10988  if (kcountHEpositivedirectionReconoiseD5 == 2)
10989  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
10990  if (kcountHEpositivedirectionReconoiseD5 == 3)
10991  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
10992  if (kcountHEpositivedirectionReconoiseD5 == 4)
10993  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
10994  if (kcountHEpositivedirectionReconoiseD5 == 5)
10995  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
10996  if (kcountHEpositivedirectionReconoiseD5 == 6)
10997  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
10998  if (kcountHEpositivedirectionReconoiseD5 == 7)
10999  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
11000  if (kcountHEpositivedirectionReconoiseD5 == 8)
11001  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
11002  if (kcountHEpositivedirectionReconoiseD5 == 9)
11003  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
11004  if (kcountHEpositivedirectionReconoiseD5 == 10)
11005  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
11006  if (kcountHEpositivedirectionReconoiseD5 == 11)
11007  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
11008  HEpositivedirectionReconoiseD5->Draw("Error");
11009  kcountHEpositivedirectionReconoiseD5++;
11010  if (kcountHEpositivedirectionReconoiseD5 > 11)
11011  break; // 4x6 = 24
11012  } //ccctest>0
11013 
11014  } // for i
11015  } //if(jeta-41 >= 0)
11016  } //for jeta
11018  c3x5->Update();
11019  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
11020  c3x5->Clear();
11021  // clean-up
11022  if (h2CeffHEpositivedirectionReconoiseD5)
11023  delete h2CeffHEpositivedirectionReconoiseD5;
11024  //========================================================================================== 19
11025  //======================================================================
11026  //======================================================================1D plot: D vs phi , different eta, depth=6
11027  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
11028  c3x5->Clear();
11029  c3x5->Divide(3, 5);
11030  c3x5->cd(1);
11031  int kcountHEpositivedirectionReconoiseD6 = 1;
11032  TH1F* h2CeffHEpositivedirectionReconoiseD6 = new TH1F("h2CeffHEpositivedirectionReconoiseD6", "", nphi, 0., 72.);
11033 
11034  for (int jeta = 0; jeta < njeta; jeta++) {
11035  // positivedirectionReconoiseD:
11036  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
11037  // for (int i=0;i<ndepth;i++) {
11038  // depth=6
11039  for (int i = 5; i < 6; i++) {
11040  TH1F* HEpositivedirectionReconoiseD6 = (TH1F*)h2CeffHEpositivedirectionReconoiseD6->Clone("twod1");
11041 
11042  float ccctest = 0; // to avoid empty massive elements
11043  for (int jphi = 0; jphi < nphi; jphi++) {
11044  double ccc1 = reconoisevariancehe[i][jeta][jphi];
11045  if (areconoisehe[i][jeta][jphi] > 0.) {
11046  HEpositivedirectionReconoiseD6->Fill(jphi, ccc1);
11047  ccctest = 1.; //HEpositivedirectionReconoiseD6->SetBinError(i,0.01);
11048  }
11049  } // for jphi
11050  if (ccctest > 0.) {
11051  //cout<<"1919 kcountHEpositivedirectionReconoiseD6 = "<<kcountHEpositivedirectionReconoiseD6 <<" jeta-41= "<< jeta-41 <<endl;
11052  c3x5->cd(kcountHEpositivedirectionReconoiseD6);
11053  HEpositivedirectionReconoiseD6->SetMarkerStyle(20);
11054  HEpositivedirectionReconoiseD6->SetMarkerSize(0.4);
11055  HEpositivedirectionReconoiseD6->GetYaxis()->SetLabelSize(0.04);
11056  HEpositivedirectionReconoiseD6->SetXTitle("HEpositivedirectionReconoiseD6 \b");
11057  HEpositivedirectionReconoiseD6->SetMarkerColor(2);
11058  HEpositivedirectionReconoiseD6->SetLineColor(0);
11059  gPad->SetGridy();
11060  gPad->SetGridx();
11061  // gPad->SetLogy();
11062  if (kcountHEpositivedirectionReconoiseD6 == 1)
11063  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
11064  if (kcountHEpositivedirectionReconoiseD6 == 2)
11065  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
11066  if (kcountHEpositivedirectionReconoiseD6 == 3)
11067  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
11068  if (kcountHEpositivedirectionReconoiseD6 == 4)
11069  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
11070  if (kcountHEpositivedirectionReconoiseD6 == 5)
11071  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
11072  if (kcountHEpositivedirectionReconoiseD6 == 6)
11073  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
11074  if (kcountHEpositivedirectionReconoiseD6 == 7)
11075  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
11076  if (kcountHEpositivedirectionReconoiseD6 == 8)
11077  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
11078  if (kcountHEpositivedirectionReconoiseD6 == 9)
11079  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
11080  if (kcountHEpositivedirectionReconoiseD6 == 10)
11081  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
11082  HEpositivedirectionReconoiseD6->Draw("Error");
11083  kcountHEpositivedirectionReconoiseD6++;
11084  if (kcountHEpositivedirectionReconoiseD6 > 10)
11085  break; // 4x6 = 24
11086  } //ccctest>0
11087 
11088  } // for i
11089  } //if(jeta-41 >= 0)
11090  } //for jeta
11092  c3x5->Update();
11093  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
11094  c3x5->Clear();
11095  // clean-up
11096  if (h2CeffHEpositivedirectionReconoiseD6)
11097  delete h2CeffHEpositivedirectionReconoiseD6;
11098  //========================================================================================== 20
11099  //======================================================================
11100  //======================================================================1D plot: D vs phi , different eta, depth=7
11101  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
11102  c3x5->Clear();
11103  c3x5->Divide(3, 5);
11104  c3x5->cd(1);
11105  int kcountHEpositivedirectionReconoiseD7 = 1;
11106  TH1F* h2CeffHEpositivedirectionReconoiseD7 = new TH1F("h2CeffHEpositivedirectionReconoiseD7", "", nphi, 0., 72.);
11107 
11108  for (int jeta = 0; jeta < njeta; jeta++) {
11109  // positivedirectionReconoiseD:
11110  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
11111  // for (int i=0;i<ndepth;i++) {
11112  // depth=7
11113  for (int i = 6; i < 7; i++) {
11114  TH1F* HEpositivedirectionReconoiseD7 = (TH1F*)h2CeffHEpositivedirectionReconoiseD7->Clone("twod1");
11115 
11116  float ccctest = 0; // to avoid empty massive elements
11117  for (int jphi = 0; jphi < nphi; jphi++) {
11118  double ccc1 = reconoisevariancehe[i][jeta][jphi];
11119  if (areconoisehe[i][jeta][jphi] > 0.) {
11120  HEpositivedirectionReconoiseD7->Fill(jphi, ccc1);
11121  ccctest = 1.; //HEpositivedirectionReconoiseD7->SetBinError(i,0.01);
11122  }
11123  } // for jphi
11124  if (ccctest != 0.) {
11125  //cout<<"2020 kcountHEpositivedirectionReconoiseD7 = "<<kcountHEpositivedirectionReconoiseD7 <<" jeta-41= "<< jeta-41 <<endl;
11126  c3x5->cd(kcountHEpositivedirectionReconoiseD7);
11127  HEpositivedirectionReconoiseD7->SetMarkerStyle(20);
11128  HEpositivedirectionReconoiseD7->SetMarkerSize(0.4);
11129  HEpositivedirectionReconoiseD7->GetYaxis()->SetLabelSize(0.04);
11130  HEpositivedirectionReconoiseD7->SetXTitle("HEpositivedirectionReconoiseD7 \b");
11131  HEpositivedirectionReconoiseD7->SetMarkerColor(2);
11132  HEpositivedirectionReconoiseD7->SetLineColor(0);
11133  gPad->SetGridy();
11134  gPad->SetGridx();
11135  // gPad->SetLogy();
11136  if (kcountHEpositivedirectionReconoiseD7 == 1)
11137  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
11138  if (kcountHEpositivedirectionReconoiseD7 == 2)
11139  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
11140  if (kcountHEpositivedirectionReconoiseD7 == 3)
11141  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
11142  HEpositivedirectionReconoiseD7->Draw("Error");
11143  kcountHEpositivedirectionReconoiseD7++;
11144  if (kcountHEpositivedirectionReconoiseD7 > 3)
11145  break; // 4x6 = 24
11146  } //ccctest>0
11147 
11148  } // for i
11149  } //if(jeta-41 >= 0)
11150  } //for jeta
11152  c3x5->Update();
11153  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
11154  c3x5->Clear();
11155  // clean-up
11156  if (h2CeffHEpositivedirectionReconoiseD7)
11157  delete h2CeffHEpositivedirectionReconoiseD7;
11158 
11159  //========================================================================================== 22222214
11160  //======================================================================
11161  //======================================================================1D plot: D vs phi , different eta, depth=1
11162  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
11163  c3x5->Clear();
11165  c3x5->Divide(3, 5);
11166  c3x5->cd(1);
11167  int kcountHEnegativedirectionReconoiseD1 = 1;
11168  TH1F* h2CeffHEnegativedirectionReconoiseD1 = new TH1F("h2CeffHEnegativedirectionReconoiseD1", "", nphi, 0., 72.);
11169 
11170  for (int jeta = 0; jeta < njeta; jeta++) {
11171  // negativedirectionReconoiseD:
11172  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
11173  // for (int i=0;i<ndepth;i++) {
11174  // depth=1
11175  for (int i = 0; i < 1; i++) {
11176  TH1F* HEnegativedirectionReconoiseD1 = (TH1F*)h2CeffHEnegativedirectionReconoiseD1->Clone("twod1");
11177 
11178  float ccctest = 0; // to avoid empty massive elements
11179  for (int jphi = 0; jphi < nphi; jphi++) {
11180  double ccc1 = reconoisevariancehe[i][jeta][jphi];
11181  if (areconoisehe[i][jeta][jphi] > 0.) {
11182  HEnegativedirectionReconoiseD1->Fill(jphi, ccc1);
11183  ccctest = 1.; //HEnegativedirectionReconoiseD1->SetBinError(i,0.01);
11184  }
11185  } // for jphi
11186  if (ccctest > 0.) {
11187  //cout<<"1414 kcountHEnegativedirectionReconoiseD1 = "<<kcountHEnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
11188  c3x5->cd(kcountHEnegativedirectionReconoiseD1);
11189  HEnegativedirectionReconoiseD1->SetMarkerStyle(20);
11190  HEnegativedirectionReconoiseD1->SetMarkerSize(0.4);
11191  HEnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
11192  HEnegativedirectionReconoiseD1->SetXTitle("HEnegativedirectionReconoiseD1 \b");
11193  HEnegativedirectionReconoiseD1->SetMarkerColor(2);
11194  HEnegativedirectionReconoiseD1->SetLineColor(0);
11195  gPad->SetGridy();
11196  gPad->SetGridx();
11197  // gPad->SetLogy();
11198  if (kcountHEnegativedirectionReconoiseD1 == 1)
11199  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
11200  if (kcountHEnegativedirectionReconoiseD1 == 2)
11201  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
11202  if (kcountHEnegativedirectionReconoiseD1 == 3)
11203  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
11204  if (kcountHEnegativedirectionReconoiseD1 == 4)
11205  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
11206  if (kcountHEnegativedirectionReconoiseD1 == 5)
11207  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
11208  if (kcountHEnegativedirectionReconoiseD1 == 6)
11209  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
11210  if (kcountHEnegativedirectionReconoiseD1 == 7)
11211  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
11212  if (kcountHEnegativedirectionReconoiseD1 == 8)
11213  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
11214  if (kcountHEnegativedirectionReconoiseD1 == 9)
11215  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
11216  if (kcountHEnegativedirectionReconoiseD1 == 10)
11217  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
11218  if (kcountHEnegativedirectionReconoiseD1 == 11)
11219  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
11220  if (kcountHEnegativedirectionReconoiseD1 == 12)
11221  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
11222  HEnegativedirectionReconoiseD1->Draw("Error");
11223  kcountHEnegativedirectionReconoiseD1++;
11224  if (kcountHEnegativedirectionReconoiseD1 > 12)
11225  break; // 4x6 = 24
11226  } //ccctest>0
11227 
11228  } // for i
11229  } //if(jeta-41 < 0)
11230  } //for jeta
11232  c3x5->Update();
11233  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
11234  c3x5->Clear();
11235  // clean-up
11236  if (h2CeffHEnegativedirectionReconoiseD1)
11237  delete h2CeffHEnegativedirectionReconoiseD1;
11238  //========================================================================================== 22222215
11239  //======================================================================
11240  //======================================================================1D plot: D vs phi , different eta, depth=2
11241  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
11242  c3x5->Clear();
11243  c3x5->Divide(3, 5);
11244  c3x5->cd(1);
11245  int kcountHEnegativedirectionReconoiseD2 = 1;
11246  TH1F* h2CeffHEnegativedirectionReconoiseD2 = new TH1F("h2CeffHEnegativedirectionReconoiseD2", "", nphi, 0., 72.);
11247 
11248  for (int jeta = 0; jeta < njeta; jeta++) {
11249  // negativedirectionReconoiseD:
11250  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
11251  // for (int i=0;i<ndepth;i++) {
11252  // depth=2
11253  for (int i = 1; i < 2; i++) {
11254  TH1F* HEnegativedirectionReconoiseD2 = (TH1F*)h2CeffHEnegativedirectionReconoiseD2->Clone("twod1");
11255 
11256  float ccctest = 0; // to avoid empty massive elements
11257  for (int jphi = 0; jphi < nphi; jphi++) {
11258  double ccc1 = reconoisevariancehe[i][jeta][jphi];
11259  if (areconoisehe[i][jeta][jphi] > 0.) {
11260  HEnegativedirectionReconoiseD2->Fill(jphi, ccc1);
11261  ccctest = 1.; //HEnegativedirectionReconoiseD2->SetBinError(i,0.01);
11262  }
11263  } // for jphi
11264  if (ccctest > 0.) {
11265  //cout<<"1515 kcountHEnegativedirectionReconoiseD2 = "<<kcountHEnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
11266  c3x5->cd(kcountHEnegativedirectionReconoiseD2);
11267  HEnegativedirectionReconoiseD2->SetMarkerStyle(20);
11268  HEnegativedirectionReconoiseD2->SetMarkerSize(0.4);
11269  HEnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
11270  HEnegativedirectionReconoiseD2->SetXTitle("HEnegativedirectionReconoiseD2 \b");
11271  HEnegativedirectionReconoiseD2->SetMarkerColor(2);
11272  HEnegativedirectionReconoiseD2->SetLineColor(0);
11273  gPad->SetGridy();
11274  gPad->SetGridx();
11275  // gPad->SetLogy();
11276  if (kcountHEnegativedirectionReconoiseD2 == 1)
11277  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
11278  if (kcountHEnegativedirectionReconoiseD2 == 2)
11279  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
11280  if (kcountHEnegativedirectionReconoiseD2 == 3)
11281  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
11282  if (kcountHEnegativedirectionReconoiseD2 == 4)
11283  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
11284  if (kcountHEnegativedirectionReconoiseD2 == 5)
11285  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
11286  if (kcountHEnegativedirectionReconoiseD2 == 6)
11287  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
11288  if (kcountHEnegativedirectionReconoiseD2 == 7)
11289  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
11290  if (kcountHEnegativedirectionReconoiseD2 == 8)
11291  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
11292  if (kcountHEnegativedirectionReconoiseD2 == 9)
11293  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
11294  if (kcountHEnegativedirectionReconoiseD2 == 10)
11295  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
11296  if (kcountHEnegativedirectionReconoiseD2 == 11)
11297  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
11298  if (kcountHEnegativedirectionReconoiseD2 == 12)
11299  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
11300  if (kcountHEnegativedirectionReconoiseD2 == 13)
11301  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
11302  HEnegativedirectionReconoiseD2->Draw("Error");
11303  kcountHEnegativedirectionReconoiseD2++;
11304  if (kcountHEnegativedirectionReconoiseD2 > 13)
11305  break; // 4x6 = 24
11306  } //ccctest>0
11307 
11308  } // for i
11309  } //if(jeta-41 < 0)
11310  } //for jeta
11312  c3x5->Update();
11313  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
11314  c3x5->Clear();
11315  // clean-up
11316  if (h2CeffHEnegativedirectionReconoiseD2)
11317  delete h2CeffHEnegativedirectionReconoiseD2;
11318  //========================================================================================== 22222216
11319  //======================================================================
11320  //======================================================================1D plot: D vs phi , different eta, depth=3
11321  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
11322  c3x5->Clear();
11323  c3x5->Divide(3, 5);
11324  c3x5->cd(1);
11325  int kcountHEnegativedirectionReconoiseD3 = 1;
11326  TH1F* h2CeffHEnegativedirectionReconoiseD3 = new TH1F("h2CeffHEnegativedirectionReconoiseD3", "", nphi, 0., 72.);
11327 
11328  for (int jeta = 0; jeta < njeta; jeta++) {
11329  // negativedirectionReconoiseD:
11330  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
11331  // for (int i=0;i<ndepth;i++) {
11332  // depth=3
11333  for (int i = 2; i < 3; i++) {
11334  TH1F* HEnegativedirectionReconoiseD3 = (TH1F*)h2CeffHEnegativedirectionReconoiseD3->Clone("twod1");
11335 
11336  float ccctest = 0; // to avoid empty massive elements
11337  for (int jphi = 0; jphi < nphi; jphi++) {
11338  double ccc1 = reconoisevariancehe[i][jeta][jphi];
11339  if (areconoisehe[i][jeta][jphi] > 0.) {
11340  HEnegativedirectionReconoiseD3->Fill(jphi, ccc1);
11341  ccctest = 1.; //HEnegativedirectionReconoiseD3->SetBinError(i,0.01);
11342  }
11343  } // for jphi
11344  if (ccctest > 0.) {
11345  //cout<<"1616 kcountHEnegativedirectionReconoiseD3 = "<<kcountHEnegativedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
11346  c3x5->cd(kcountHEnegativedirectionReconoiseD3);
11347  HEnegativedirectionReconoiseD3->SetMarkerStyle(20);
11348  HEnegativedirectionReconoiseD3->SetMarkerSize(0.4);
11349  HEnegativedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
11350  HEnegativedirectionReconoiseD3->SetXTitle("HEnegativedirectionReconoiseD3 \b");
11351  HEnegativedirectionReconoiseD3->SetMarkerColor(2);
11352  HEnegativedirectionReconoiseD3->SetLineColor(0);
11353  gPad->SetGridy();
11354  gPad->SetGridx();
11355  // gPad->SetLogy();
11356  if (kcountHEnegativedirectionReconoiseD3 == 1)
11357  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
11358  if (kcountHEnegativedirectionReconoiseD3 == 2)
11359  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
11360  if (kcountHEnegativedirectionReconoiseD3 == 3)
11361  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
11362  if (kcountHEnegativedirectionReconoiseD3 == 4)
11363  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
11364  if (kcountHEnegativedirectionReconoiseD3 == 5)
11365  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
11366  if (kcountHEnegativedirectionReconoiseD3 == 6)
11367  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
11368  if (kcountHEnegativedirectionReconoiseD3 == 7)
11369  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
11370  if (kcountHEnegativedirectionReconoiseD3 == 8)
11371  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
11372  if (kcountHEnegativedirectionReconoiseD3 == 9)
11373  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
11374  if (kcountHEnegativedirectionReconoiseD3 == 10)
11375  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
11376  if (kcountHEnegativedirectionReconoiseD3 == 11)
11377  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
11378  if (kcountHEnegativedirectionReconoiseD3 == 12)
11379  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
11380  if (kcountHEnegativedirectionReconoiseD3 == 13)
11381  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
11382  HEnegativedirectionReconoiseD3->Draw("Error");
11383  kcountHEnegativedirectionReconoiseD3++;
11384  if (kcountHEnegativedirectionReconoiseD3 > 13)
11385  break; // 4x6 = 24
11386  } //ccctest>0
11387 
11388  } // for i
11389  } //if(jeta-41 < 0)
11390  } //for jeta
11392  c3x5->Update();
11393  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
11394  c3x5->Clear();
11395  // clean-up
11396  if (h2CeffHEnegativedirectionReconoiseD3)
11397  delete h2CeffHEnegativedirectionReconoiseD3;
11398  //========================================================================================== 22222217
11399  //======================================================================
11400  //======================================================================1D plot: D vs phi , different eta, depth=4
11401  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
11402  c3x5->Clear();
11403  c3x5->Divide(3, 5);
11404  c3x5->cd(1);
11405  int kcountHEnegativedirectionReconoiseD4 = 1;
11406  TH1F* h2CeffHEnegativedirectionReconoiseD4 = new TH1F("h2CeffHEnegativedirectionReconoiseD4", "", nphi, 0., 72.);
11407 
11408  for (int jeta = 0; jeta < njeta; jeta++) {
11409  // negativedirectionReconoiseD:
11410  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
11411  // for (int i=0;i<ndepth;i++) {
11412  // depth=4
11413  for (int i = 3; i < 4; i++) {
11414  TH1F* HEnegativedirectionReconoiseD4 = (TH1F*)h2CeffHEnegativedirectionReconoiseD4->Clone("twod1");
11415 
11416  float ccctest = 0; // to avoid empty massive elements
11417  for (int jphi = 0; jphi < nphi; jphi++) {
11418  double ccc1 = reconoisevariancehe[i][jeta][jphi];
11419  if (areconoisehe[i][jeta][jphi] > 0.) {
11420  HEnegativedirectionReconoiseD4->Fill(jphi, ccc1);
11421  ccctest = 1.; //HEnegativedirectionReconoiseD4->SetBinError(i,0.01);
11422  }
11423  } // for jphi
11424  if (ccctest > 0.) {
11425  //cout<<"1717 kcountHEnegativedirectionReconoiseD4 = "<<kcountHEnegativedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
11426  c3x5->cd(kcountHEnegativedirectionReconoiseD4);
11427  HEnegativedirectionReconoiseD4->SetMarkerStyle(20);
11428  HEnegativedirectionReconoiseD4->SetMarkerSize(0.4);
11429  HEnegativedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
11430  HEnegativedirectionReconoiseD4->SetXTitle("HEnegativedirectionReconoiseD4 \b");
11431  HEnegativedirectionReconoiseD4->SetMarkerColor(2);
11432  HEnegativedirectionReconoiseD4->SetLineColor(0);
11433  gPad->SetGridy();
11434  gPad->SetGridx();
11435  // gPad->SetLogy();
11436  if (kcountHEnegativedirectionReconoiseD4 == 1)
11437  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
11438  if (kcountHEnegativedirectionReconoiseD4 == 2)
11439  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
11440  if (kcountHEnegativedirectionReconoiseD4 == 3)
11441  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
11442  if (kcountHEnegativedirectionReconoiseD4 == 4)
11443  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
11444  if (kcountHEnegativedirectionReconoiseD4 == 5)
11445  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
11446  if (kcountHEnegativedirectionReconoiseD4 == 6)
11447  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
11448  if (kcountHEnegativedirectionReconoiseD4 == 7)
11449  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
11450  if (kcountHEnegativedirectionReconoiseD4 == 8)
11451  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
11452  if (kcountHEnegativedirectionReconoiseD4 == 9)
11453  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
11454  if (kcountHEnegativedirectionReconoiseD4 == 10)
11455  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
11456  if (kcountHEnegativedirectionReconoiseD4 == 11)
11457  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
11458  if (kcountHEnegativedirectionReconoiseD4 == 12)
11459  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
11460  HEnegativedirectionReconoiseD4->Draw("Error");
11461  kcountHEnegativedirectionReconoiseD4++;
11462  if (kcountHEnegativedirectionReconoiseD4 > 12)
11463  break; // 4x6 = 24
11464  } //ccctest>0
11465 
11466  } // for i
11467  } //if(jeta-41 < 0)
11468  } //for jeta
11470  c3x5->Update();
11471  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
11472  c3x5->Clear();
11473  // clean-up
11474  if (h2CeffHEnegativedirectionReconoiseD4)
11475  delete h2CeffHEnegativedirectionReconoiseD4;
11476  //========================================================================================== 22222218
11477  //======================================================================
11478  //======================================================================1D plot: D vs phi , different eta, depth=5
11479  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
11480  c3x5->Clear();
11481  c3x5->Divide(3, 5);
11482  c3x5->cd(1);
11483  int kcountHEnegativedirectionReconoiseD5 = 1;
11484  TH1F* h2CeffHEnegativedirectionReconoiseD5 = new TH1F("h2CeffHEnegativedirectionReconoiseD5", "", nphi, 0., 72.);
11485 
11486  for (int jeta = 0; jeta < njeta; jeta++) {
11487  // negativedirectionReconoiseD:
11488  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
11489  // for (int i=0;i<ndepth;i++) {
11490  // depth=5
11491  for (int i = 4; i < 5; i++) {
11492  TH1F* HEnegativedirectionReconoiseD5 = (TH1F*)h2CeffHEnegativedirectionReconoiseD5->Clone("twod1");
11493 
11494  float ccctest = 0; // to avoid empty massive elements
11495  for (int jphi = 0; jphi < nphi; jphi++) {
11496  double ccc1 = reconoisevariancehe[i][jeta][jphi];
11497  if (areconoisehe[i][jeta][jphi] > 0.) {
11498  HEnegativedirectionReconoiseD5->Fill(jphi, ccc1);
11499  ccctest = 1.; //HEnegativedirectionReconoiseD5->SetBinError(i,0.01);
11500  }
11501  } // for jphi
11502  if (ccctest > 0.) {
11503  //cout<<"1818 kcountHEnegativedirectionReconoiseD5 = "<<kcountHEnegativedirectionReconoiseD5 <<" jeta-41= "<< jeta-41 <<endl;
11504  c3x5->cd(kcountHEnegativedirectionReconoiseD5);
11505  HEnegativedirectionReconoiseD5->SetMarkerStyle(20);
11506  HEnegativedirectionReconoiseD5->SetMarkerSize(0.4);
11507  HEnegativedirectionReconoiseD5->GetYaxis()->SetLabelSize(0.04);
11508  HEnegativedirectionReconoiseD5->SetXTitle("HEnegativedirectionReconoiseD5 \b");
11509  HEnegativedirectionReconoiseD5->SetMarkerColor(2);
11510  HEnegativedirectionReconoiseD5->SetLineColor(0);
11511  gPad->SetGridy();
11512  gPad->SetGridx();
11513  // gPad->SetLogy();
11514  if (kcountHEnegativedirectionReconoiseD5 == 1)
11515  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
11516  if (kcountHEnegativedirectionReconoiseD5 == 2)
11517  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
11518  if (kcountHEnegativedirectionReconoiseD5 == 3)
11519  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
11520  if (kcountHEnegativedirectionReconoiseD5 == 4)
11521  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
11522  if (kcountHEnegativedirectionReconoiseD5 == 5)
11523  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
11524  if (kcountHEnegativedirectionReconoiseD5 == 6)
11525  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
11526  if (kcountHEnegativedirectionReconoiseD5 == 7)
11527  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
11528  if (kcountHEnegativedirectionReconoiseD5 == 8)
11529  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
11530  if (kcountHEnegativedirectionReconoiseD5 == 9)
11531  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
11532  if (kcountHEnegativedirectionReconoiseD5 == 10)
11533  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
11534  if (kcountHEnegativedirectionReconoiseD5 == 11)
11535  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
11536  HEnegativedirectionReconoiseD5->Draw("Error");
11537  kcountHEnegativedirectionReconoiseD5++;
11538  if (kcountHEnegativedirectionReconoiseD5 > 11)
11539  break; // 4x6 = 24
11540  } //ccctest>0
11541 
11542  } // for i
11543  } //if(jeta-41 < 0)
11544  } //for jeta
11546  c3x5->Update();
11547  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
11548  c3x5->Clear();
11549  // clean-up
11550  if (h2CeffHEnegativedirectionReconoiseD5)
11551  delete h2CeffHEnegativedirectionReconoiseD5;
11552  //========================================================================================== 22222219
11553  //======================================================================
11554  //======================================================================1D plot: D vs phi , different eta, depth=6
11555  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
11556  c3x5->Clear();
11557  c3x5->Divide(3, 5);
11558  c3x5->cd(1);
11559  int kcountHEnegativedirectionReconoiseD6 = 1;
11560  TH1F* h2CeffHEnegativedirectionReconoiseD6 = new TH1F("h2CeffHEnegativedirectionReconoiseD6", "", nphi, 0., 72.);
11561 
11562  for (int jeta = 0; jeta < njeta; jeta++) {
11563  // negativedirectionReconoiseD:
11564  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
11565  // for (int i=0;i<ndepth;i++) {
11566  // depth=6
11567  for (int i = 5; i < 6; i++) {
11568  TH1F* HEnegativedirectionReconoiseD6 = (TH1F*)h2CeffHEnegativedirectionReconoiseD6->Clone("twod1");
11569 
11570  float ccctest = 0; // to avoid empty massive elements
11571  for (int jphi = 0; jphi < nphi; jphi++) {
11572  double ccc1 = reconoisevariancehe[i][jeta][jphi];
11573  if (areconoisehe[i][jeta][jphi] > 0.) {
11574  HEnegativedirectionReconoiseD6->Fill(jphi, ccc1);
11575  ccctest = 1.; //HEnegativedirectionReconoiseD6->SetBinError(i,0.01);
11576  }
11577  } // for jphi
11578  if (ccctest > 0.) {
11579  //cout<<"1919 kcountHEnegativedirectionReconoiseD6 = "<<kcountHEnegativedirectionReconoiseD6 <<" jeta-41= "<< jeta-41 <<endl;
11580  c3x5->cd(kcountHEnegativedirectionReconoiseD6);
11581  HEnegativedirectionReconoiseD6->SetMarkerStyle(20);
11582  HEnegativedirectionReconoiseD6->SetMarkerSize(0.4);
11583  HEnegativedirectionReconoiseD6->GetYaxis()->SetLabelSize(0.04);
11584  HEnegativedirectionReconoiseD6->SetXTitle("HEnegativedirectionReconoiseD6 \b");
11585  HEnegativedirectionReconoiseD6->SetMarkerColor(2);
11586  HEnegativedirectionReconoiseD6->SetLineColor(0);
11587  gPad->SetGridy();
11588  gPad->SetGridx();
11589  // gPad->SetLogy();
11590  if (kcountHEnegativedirectionReconoiseD6 == 1)
11591  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
11592  if (kcountHEnegativedirectionReconoiseD6 == 2)
11593  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
11594  if (kcountHEnegativedirectionReconoiseD6 == 3)
11595  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
11596  if (kcountHEnegativedirectionReconoiseD6 == 4)
11597  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
11598  if (kcountHEnegativedirectionReconoiseD6 == 5)
11599  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
11600  if (kcountHEnegativedirectionReconoiseD6 == 6)
11601  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
11602  if (kcountHEnegativedirectionReconoiseD6 == 7)
11603  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
11604  if (kcountHEnegativedirectionReconoiseD6 == 8)
11605  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
11606  if (kcountHEnegativedirectionReconoiseD6 == 9)
11607  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
11608  if (kcountHEnegativedirectionReconoiseD6 == 10)
11609  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
11610  HEnegativedirectionReconoiseD6->Draw("Error");
11611  kcountHEnegativedirectionReconoiseD6++;
11612  if (kcountHEnegativedirectionReconoiseD6 > 10)
11613  break; // 4x6 = 24
11614  } //ccctest>0
11615 
11616  } // for i
11617  } //if(jeta-41 < 0)
11618  } //for jeta
11620  c3x5->Update();
11621  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
11622  c3x5->Clear();
11623  // clean-up
11624  if (h2CeffHEnegativedirectionReconoiseD6)
11625  delete h2CeffHEnegativedirectionReconoiseD6;
11626  //========================================================================================== 22222220
11627  //======================================================================
11628  //======================================================================1D plot: D vs phi , different eta, depth=7
11629  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
11630  c3x5->Clear();
11631  c3x5->Divide(3, 5);
11632  c3x5->cd(1);
11633  int kcountHEnegativedirectionReconoiseD7 = 1;
11634  TH1F* h2CeffHEnegativedirectionReconoiseD7 = new TH1F("h2CeffHEnegativedirectionReconoiseD7", "", nphi, 0., 72.);
11635 
11636  for (int jeta = 0; jeta < njeta; jeta++) {
11637  // negativedirectionReconoiseD:
11638  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
11639  // for (int i=0;i<ndepth;i++) {
11640  // depth=7
11641  for (int i = 6; i < 7; i++) {
11642  TH1F* HEnegativedirectionReconoiseD7 = (TH1F*)h2CeffHEnegativedirectionReconoiseD7->Clone("twod1");
11643 
11644  float ccctest = 0; // to avoid empty massive elements
11645  for (int jphi = 0; jphi < nphi; jphi++) {
11646  double ccc1 = reconoisevariancehe[i][jeta][jphi];
11647  if (areconoisehe[i][jeta][jphi] > 0.) {
11648  HEnegativedirectionReconoiseD7->Fill(jphi, ccc1);
11649  ccctest = 1.; //HEnegativedirectionReconoiseD7->SetBinError(i,0.01);
11650  }
11651  } // for jphi
11652  if (ccctest != 0.) {
11653  //cout<<"2020 kcountHEnegativedirectionReconoiseD7 = "<<kcountHEnegativedirectionReconoiseD7 <<" jeta-41= "<< jeta-41 <<endl;
11654  c3x5->cd(kcountHEnegativedirectionReconoiseD7);
11655  HEnegativedirectionReconoiseD7->SetMarkerStyle(20);
11656  HEnegativedirectionReconoiseD7->SetMarkerSize(0.4);
11657  HEnegativedirectionReconoiseD7->GetYaxis()->SetLabelSize(0.04);
11658  HEnegativedirectionReconoiseD7->SetXTitle("HEnegativedirectionReconoiseD7 \b");
11659  HEnegativedirectionReconoiseD7->SetMarkerColor(2);
11660  HEnegativedirectionReconoiseD7->SetLineColor(0);
11661  gPad->SetGridy();
11662  gPad->SetGridx();
11663  // gPad->SetLogy();
11664  if (kcountHEnegativedirectionReconoiseD7 == 1)
11665  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
11666  if (kcountHEnegativedirectionReconoiseD7 == 2)
11667  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
11668  if (kcountHEnegativedirectionReconoiseD7 == 3)
11669  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
11670  HEnegativedirectionReconoiseD7->Draw("Error");
11671  kcountHEnegativedirectionReconoiseD7++;
11672  if (kcountHEnegativedirectionReconoiseD7 > 3)
11673  break; // 4x6 = 24
11674  } //ccctest>0
11675 
11676  } // for i
11677  } //if(jeta-41 < 0)
11678  } //for jeta
11680  c3x5->Update();
11681  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
11682  c3x5->Clear();
11683  // clean-up
11684  if (h2CeffHEnegativedirectionReconoiseD7)
11685  delete h2CeffHEnegativedirectionReconoiseD7;
11686  //===================================================================== END of Reconoise HE for phi-symmetry
11687  //===================================================================== END of Reconoise HE for phi-symmetry
11688  //===================================================================== END of Reconoise HE for phi-symmetry
11692  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
11693  //ndepth = k_max[5];
11694  ndepth = 2;
11695  double areconoiseHF[ndepth][njeta][njphi];
11696  double breconoiseHF[ndepth][njeta][njphi];
11697  double reconoisevarianceHF[ndepth][njeta][njphi];
11698 
11699  TH2F* recNoiseEnergy1HF1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HF1");
11700  TH2F* recNoiseEnergy0HF1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HF1");
11701  TH2F* recNoiseEnergyHF1 = (TH2F*)recNoiseEnergy1HF1->Clone("recNoiseEnergyHF1");
11702  recNoiseEnergyHF1->Divide(recNoiseEnergy1HF1, recNoiseEnergy0HF1, 1, 1, "B");
11703  TH2F* recNoiseEnergy1HF2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HF2");
11704  TH2F* recNoiseEnergy0HF2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HF2");
11705  TH2F* recNoiseEnergyHF2 = (TH2F*)recNoiseEnergy1HF2->Clone("recNoiseEnergyHF2");
11706  recNoiseEnergyHF2->Divide(recNoiseEnergy1HF2, recNoiseEnergy0HF2, 1, 1, "B");
11707  //====================================================================== PHI normalization & put R into massive areconoiseHF
11708  for (int jeta = 0; jeta < njeta; jeta++) {
11709  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
11710  //preparation for PHI normalization:
11711  double sumreconoiseHF0 = 0;
11712  int nsumreconoiseHF0 = 0;
11713  double sumreconoiseHF1 = 0;
11714  int nsumreconoiseHF1 = 0;
11715  for (int jphi = 0; jphi < njphi; jphi++) {
11716  areconoiseHF[0][jeta][jphi] = recNoiseEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
11717  areconoiseHF[1][jeta][jphi] = recNoiseEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
11718  breconoiseHF[0][jeta][jphi] = recNoiseEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
11719  breconoiseHF[1][jeta][jphi] = recNoiseEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
11720  sumreconoiseHF0 += areconoiseHF[0][jeta][jphi];
11721  ++nsumreconoiseHF0;
11722  sumreconoiseHF1 += areconoiseHF[1][jeta][jphi];
11723  ++nsumreconoiseHF1;
11724  } // phi
11725 
11726  // PHI normalization for DIF:
11727  for (int jphi = 0; jphi < njphi; jphi++) {
11728  if (sumreconoiseHF0 != 0.)
11729  breconoiseHF[0][jeta][jphi] -= (sumreconoiseHF0 / nsumreconoiseHF0);
11730  if (sumreconoiseHF1 != 0.)
11731  breconoiseHF[1][jeta][jphi] -= (sumreconoiseHF1 / nsumreconoiseHF1);
11732  } // phi
11733 
11734  // PHI normalization for R:
11735  for (int jphi = 0; jphi < njphi; jphi++) {
11736  if (sumreconoiseHF0 != 0.)
11737  areconoiseHF[0][jeta][jphi] /= (sumreconoiseHF0 / nsumreconoiseHF0);
11738  if (sumreconoiseHF1 != 0.)
11739  areconoiseHF[1][jeta][jphi] /= (sumreconoiseHF1 / nsumreconoiseHF1);
11740  } // phi
11741 
11742  } // jeta-41
11743  } //eta
11745 
11746  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HF
11747  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
11748  //======================================================================
11749  //======================================================================
11750  // cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
11751  c2x1->Clear();
11753  c2x1->Divide(2, 1);
11754  c2x1->cd(1);
11755  TH2F* GefzRreconoiseHF42D = new TH2F("GefzRreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
11756  TH2F* GefzRreconoiseHF42D0 = new TH2F("GefzRreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
11757  TH2F* GefzRreconoiseHF42DF = (TH2F*)GefzRreconoiseHF42D0->Clone("GefzRreconoiseHF42DF");
11758  for (int i = 0; i < ndepth; i++) {
11759  for (int jeta = 0; jeta < neta; jeta++) {
11760  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
11761  for (int jphi = 0; jphi < nphi; jphi++) {
11762  double ccc1 = areconoiseHF[i][jeta][jphi];
11763  int k2plot = jeta - 41;
11764  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
11765  if (ccc1 != 0.) {
11766  GefzRreconoiseHF42D->Fill(kkk, jphi, ccc1);
11767  GefzRreconoiseHF42D0->Fill(kkk, jphi, 1.);
11768  }
11769  }
11770  }
11771  }
11772  }
11773  GefzRreconoiseHF42DF->Divide(GefzRreconoiseHF42D, GefzRreconoiseHF42D0, 1, 1, "B"); // average A
11774  gPad->SetGridy();
11775  gPad->SetGridx(); // gPad->SetLogz();
11776  GefzRreconoiseHF42DF->SetXTitle("<R>_depth #eta \b");
11777  GefzRreconoiseHF42DF->SetYTitle(" #phi \b");
11778  GefzRreconoiseHF42DF->Draw("COLZ");
11779 
11780  c2x1->cd(2);
11781  TH1F* energyhitNoise_HF = (TH1F*)dir->FindObjectAny("h_energyhitNoise_HF");
11782  energyhitNoise_HF->SetMarkerStyle(20);
11783  energyhitNoise_HF->SetMarkerSize(0.4);
11784  energyhitNoise_HF->GetYaxis()->SetLabelSize(0.04);
11785  energyhitNoise_HF->SetXTitle("energyhitNoise_HF \b");
11786  energyhitNoise_HF->SetMarkerColor(2);
11787  energyhitNoise_HF->SetLineColor(0);
11788  gPad->SetGridy();
11789  gPad->SetGridx();
11790  energyhitNoise_HF->Draw("Error");
11791 
11793  c2x1->Update();
11794  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHF.png");
11795  c2x1->Clear();
11796  // clean-up
11797  if (GefzRreconoiseHF42D)
11798  delete GefzRreconoiseHF42D;
11799  if (GefzRreconoiseHF42D0)
11800  delete GefzRreconoiseHF42D0;
11801  if (GefzRreconoiseHF42DF)
11802  delete GefzRreconoiseHF42DF;
11803  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
11804  //======================================================================
11805  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
11806  c1x1->Clear();
11808  c1x1->Divide(1, 1);
11809  c1x1->cd(1);
11810  TH1F* GefzRreconoiseHF41D = new TH1F("GefzRreconoiseHF41D", "", nphi, 0., 72.);
11811  TH1F* GefzRreconoiseHF41D0 = new TH1F("GefzRreconoiseHF41D0", "", nphi, 0., 72.);
11812  TH1F* GefzRreconoiseHF41DF = (TH1F*)GefzRreconoiseHF41D0->Clone("GefzRreconoiseHF41DF");
11813  for (int jphi = 0; jphi < nphi; jphi++) {
11814  for (int jeta = 0; jeta < neta; jeta++) {
11815  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
11816  for (int i = 0; i < ndepth; i++) {
11817  double ccc1 = areconoiseHF[i][jeta][jphi];
11818  if (ccc1 != 0.) {
11819  GefzRreconoiseHF41D->Fill(jphi, ccc1);
11820  GefzRreconoiseHF41D0->Fill(jphi, 1.);
11821  }
11822  }
11823  }
11824  }
11825  }
11826  GefzRreconoiseHF41DF->Divide(GefzRreconoiseHF41D, GefzRreconoiseHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
11827  GefzRreconoiseHF41D0->Sumw2();
11828  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHF41DF->SetBinError(jphi,0.01);}
11829  gPad->SetGridy();
11830  gPad->SetGridx(); // gPad->SetLogz();
11831  GefzRreconoiseHF41DF->SetMarkerStyle(20);
11832  GefzRreconoiseHF41DF->SetMarkerSize(1.4);
11833  GefzRreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
11834  GefzRreconoiseHF41DF->SetXTitle("#phi \b");
11835  GefzRreconoiseHF41DF->SetYTitle(" <R> \b");
11836  GefzRreconoiseHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
11837  GefzRreconoiseHF41DF->SetMarkerColor(4);
11838  GefzRreconoiseHF41DF->SetLineColor(
11839  4); // GefzRreconoiseHF41DF->SetMinimum(0.8); // GefzRreconoiseHF41DF->SetMaximum(1.000);
11840  GefzRreconoiseHF41DF->Draw("Error");
11842  c1x1->Update();
11843  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHF.png");
11844  c1x1->Clear();
11845  // clean-up
11846  if (GefzRreconoiseHF41D)
11847  delete GefzRreconoiseHF41D;
11848  if (GefzRreconoiseHF41D0)
11849  delete GefzRreconoiseHF41D0;
11850  if (GefzRreconoiseHF41DF)
11851  delete GefzRreconoiseHF41DF;
11852  //========================================================================================== 4
11853  //======================================================================
11854  //======================================================================1D plot: R vs phi , different eta, depth=1
11855  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
11856  c3x5->Clear();
11858  c3x5->Divide(3, 5);
11859  c3x5->cd(1);
11860  int kcountHFpositivedirectionReconoise1 = 1;
11861  TH1F* h2CeffHFpositivedirectionReconoise1 = new TH1F("h2CeffHFpositivedirectionReconoise1", "", nphi, 0., 72.);
11862  for (int jeta = 0; jeta < njeta; jeta++) {
11863  // positivedirectionReconoise:
11864  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
11865  // for (int i=0;i<ndepth;i++) {
11866  // depth=1
11867  for (int i = 0; i < 1; i++) {
11868  TH1F* HFpositivedirectionReconoise1 = (TH1F*)h2CeffHFpositivedirectionReconoise1->Clone("twod1");
11869  float ccctest = 0; // to avoid empty massive elements
11870  for (int jphi = 0; jphi < nphi; jphi++) {
11871  double ccc1 = areconoiseHF[i][jeta][jphi];
11872  if (ccc1 != 0.) {
11873  HFpositivedirectionReconoise1->Fill(jphi, ccc1);
11874  ccctest = 1.; //HFpositivedirectionReconoise1->SetBinError(i,0.01);
11875  }
11876  } // for jphi
11877  if (ccctest > 0.) {
11878  // cout<<"444 kcountHFpositivedirectionReconoise1 = "<<kcountHFpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
11879  c3x5->cd(kcountHFpositivedirectionReconoise1);
11880  HFpositivedirectionReconoise1->SetMarkerStyle(20);
11881  HFpositivedirectionReconoise1->SetMarkerSize(0.4);
11882  HFpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
11883  HFpositivedirectionReconoise1->SetXTitle("HFpositivedirectionReconoise1 \b");
11884  HFpositivedirectionReconoise1->SetMarkerColor(2);
11885  HFpositivedirectionReconoise1->SetLineColor(0);
11886  gPad->SetGridy();
11887  gPad->SetGridx();
11888  // gPad->SetLogy();
11889  if (kcountHFpositivedirectionReconoise1 == 1)
11890  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
11891  if (kcountHFpositivedirectionReconoise1 == 2)
11892  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
11893  if (kcountHFpositivedirectionReconoise1 == 3)
11894  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
11895  if (kcountHFpositivedirectionReconoise1 == 4)
11896  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
11897  if (kcountHFpositivedirectionReconoise1 == 5)
11898  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
11899  if (kcountHFpositivedirectionReconoise1 == 6)
11900  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
11901  if (kcountHFpositivedirectionReconoise1 == 7)
11902  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
11903  if (kcountHFpositivedirectionReconoise1 == 8)
11904  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
11905  if (kcountHFpositivedirectionReconoise1 == 9)
11906  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
11907  if (kcountHFpositivedirectionReconoise1 == 10)
11908  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
11909  if (kcountHFpositivedirectionReconoise1 == 11)
11910  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
11911  if (kcountHFpositivedirectionReconoise1 == 12)
11912  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
11913  if (kcountHFpositivedirectionReconoise1 == 13)
11914  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
11915  HFpositivedirectionReconoise1->Draw("Error");
11916  kcountHFpositivedirectionReconoise1++;
11917  if (kcountHFpositivedirectionReconoise1 > 13)
11918  break; //
11919  } //ccctest>0
11920 
11921  } // for i
11922  } //if(jeta-41 >= 28 && jeta-41 <= 40
11923  } //for jeta
11925  c3x5->Update();
11926  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
11927  c3x5->Clear();
11928  // clean-up
11929  if (h2CeffHFpositivedirectionReconoise1)
11930  delete h2CeffHFpositivedirectionReconoise1;
11931 
11932  //========================================================================================== 5
11933  //======================================================================
11934  //======================================================================1D plot: R vs phi , different eta, depth=2
11935  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
11936  c3x5->Clear();
11938  c3x5->Divide(3, 5);
11939  c3x5->cd(1);
11940  int kcountHFpositivedirectionReconoise2 = 1;
11941  TH1F* h2CeffHFpositivedirectionReconoise2 = new TH1F("h2CeffHFpositivedirectionReconoise2", "", nphi, 0., 72.);
11942  for (int jeta = 0; jeta < njeta; jeta++) {
11943  // positivedirectionReconoise:
11944  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
11945  // for (int i=0;i<ndepth;i++) {
11946  // depth=2
11947  for (int i = 1; i < 2; i++) {
11948  TH1F* HFpositivedirectionReconoise2 = (TH1F*)h2CeffHFpositivedirectionReconoise2->Clone("twod1");
11949  float ccctest = 0; // to avoid empty massive elements
11950  for (int jphi = 0; jphi < nphi; jphi++) {
11951  double ccc1 = areconoiseHF[i][jeta][jphi];
11952  if (ccc1 != 0.) {
11953  HFpositivedirectionReconoise2->Fill(jphi, ccc1);
11954  ccctest = 1.; //HFpositivedirectionReconoise2->SetBinError(i,0.01);
11955  }
11956  } // for jphi
11957  if (ccctest > 0.) {
11958  //cout<<"555 kcountHFpositivedirectionReconoise2 = "<<kcountHFpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
11959  c3x5->cd(kcountHFpositivedirectionReconoise2);
11960  HFpositivedirectionReconoise2->SetMarkerStyle(20);
11961  HFpositivedirectionReconoise2->SetMarkerSize(0.4);
11962  HFpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
11963  HFpositivedirectionReconoise2->SetXTitle("HFpositivedirectionReconoise2 \b");
11964  HFpositivedirectionReconoise2->SetMarkerColor(2);
11965  HFpositivedirectionReconoise2->SetLineColor(0);
11966  gPad->SetGridy();
11967  gPad->SetGridx();
11968  // gPad->SetLogy();
11969  if (kcountHFpositivedirectionReconoise2 == 1)
11970  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
11971  if (kcountHFpositivedirectionReconoise2 == 2)
11972  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
11973  if (kcountHFpositivedirectionReconoise2 == 3)
11974  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
11975  if (kcountHFpositivedirectionReconoise2 == 4)
11976  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
11977  if (kcountHFpositivedirectionReconoise2 == 5)
11978  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
11979  if (kcountHFpositivedirectionReconoise2 == 6)
11980  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
11981  if (kcountHFpositivedirectionReconoise2 == 7)
11982  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
11983  if (kcountHFpositivedirectionReconoise2 == 8)
11984  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
11985  if (kcountHFpositivedirectionReconoise2 == 9)
11986  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
11987  if (kcountHFpositivedirectionReconoise2 == 10)
11988  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
11989  if (kcountHFpositivedirectionReconoise2 == 11)
11990  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
11991  if (kcountHFpositivedirectionReconoise2 == 12)
11992  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
11993  if (kcountHFpositivedirectionReconoise2 == 13)
11994  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
11995  HFpositivedirectionReconoise2->Draw("Error");
11996  kcountHFpositivedirectionReconoise2++;
11997  if (kcountHFpositivedirectionReconoise2 > 13)
11998  break; // 4x6 = 24
11999  } //ccctest>0
12000 
12001  } // for i
12002  } //if(jeta-41 >= 28 && jeta-41 <= 40)
12003  } //for jeta
12005  c3x5->Update();
12006  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
12007  c3x5->Clear();
12008  // clean-up
12009  if (h2CeffHFpositivedirectionReconoise2)
12010  delete h2CeffHFpositivedirectionReconoise2;
12011 
12012  //========================================================================================== 1111114
12013  //======================================================================
12014  //======================================================================1D plot: R vs phi , different eta, depth=1
12015  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
12016  c3x5->Clear();
12018  c3x5->Divide(3, 5);
12019  c3x5->cd(1);
12020  int kcountHFnegativedirectionReconoise1 = 1;
12021  TH1F* h2CeffHFnegativedirectionReconoise1 = new TH1F("h2CeffHFnegativedirectionReconoise1", "", nphi, 0., 72.);
12022  for (int jeta = 0; jeta < njeta; jeta++) {
12023  // negativedirectionReconoise:
12024  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
12025  // for (int i=0;i<ndepth;i++) {
12026  // depth=1
12027  for (int i = 0; i < 1; i++) {
12028  TH1F* HFnegativedirectionReconoise1 = (TH1F*)h2CeffHFnegativedirectionReconoise1->Clone("twod1");
12029  float ccctest = 0; // to avoid empty massive elements
12030  for (int jphi = 0; jphi < nphi; jphi++) {
12031  double ccc1 = areconoiseHF[i][jeta][jphi];
12032  if (ccc1 != 0.) {
12033  HFnegativedirectionReconoise1->Fill(jphi, ccc1);
12034  ccctest = 1.; //HFnegativedirectionReconoise1->SetBinError(i,0.01);
12035  }
12036  } // for jphi
12037  if (ccctest > 0.) {
12038  // cout<<"444 kcountHFnegativedirectionReconoise1 = "<<kcountHFnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
12039  c3x5->cd(kcountHFnegativedirectionReconoise1);
12040  HFnegativedirectionReconoise1->SetMarkerStyle(20);
12041  HFnegativedirectionReconoise1->SetMarkerSize(0.4);
12042  HFnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
12043  HFnegativedirectionReconoise1->SetXTitle("HFnegativedirectionReconoise1 \b");
12044  HFnegativedirectionReconoise1->SetMarkerColor(2);
12045  HFnegativedirectionReconoise1->SetLineColor(0);
12046  gPad->SetGridy();
12047  gPad->SetGridx();
12048  // gPad->SetLogy();
12049  if (kcountHFnegativedirectionReconoise1 == 1)
12050  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
12051  if (kcountHFnegativedirectionReconoise1 == 2)
12052  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
12053  if (kcountHFnegativedirectionReconoise1 == 3)
12054  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
12055  if (kcountHFnegativedirectionReconoise1 == 4)
12056  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
12057  if (kcountHFnegativedirectionReconoise1 == 5)
12058  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
12059  if (kcountHFnegativedirectionReconoise1 == 6)
12060  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
12061  if (kcountHFnegativedirectionReconoise1 == 7)
12062  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
12063  if (kcountHFnegativedirectionReconoise1 == 8)
12064  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
12065  if (kcountHFnegativedirectionReconoise1 == 9)
12066  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
12067  if (kcountHFnegativedirectionReconoise1 == 10)
12068  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
12069  if (kcountHFnegativedirectionReconoise1 == 11)
12070  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
12071  if (kcountHFnegativedirectionReconoise1 == 12)
12072  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
12073  if (kcountHFnegativedirectionReconoise1 == 13)
12074  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
12075  HFnegativedirectionReconoise1->Draw("Error");
12076  kcountHFnegativedirectionReconoise1++;
12077  if (kcountHFnegativedirectionReconoise1 > 13)
12078  break; //
12079  } //ccctest>0
12080 
12081  } // for i
12082  } //if(jeta-41 >= -41 && jeta-41 <= -29)
12083  } //for jeta
12085  c3x5->Update();
12086  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
12087  c3x5->Clear();
12088  // clean-up
12089  if (h2CeffHFnegativedirectionReconoise1)
12090  delete h2CeffHFnegativedirectionReconoise1;
12091 
12092  //========================================================================================== 1111115
12093  //======================================================================
12094  //======================================================================1D plot: R vs phi , different eta, depth=2
12095  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
12096  c3x5->Clear();
12098  c3x5->Divide(3, 5);
12099  c3x5->cd(1);
12100  int kcountHFnegativedirectionReconoise2 = 1;
12101  TH1F* h2CeffHFnegativedirectionReconoise2 = new TH1F("h2CeffHFnegativedirectionReconoise2", "", nphi, 0., 72.);
12102  for (int jeta = 0; jeta < njeta; jeta++) {
12103  // negativedirectionReconoise:
12104  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
12105  // for (int i=0;i<ndepth;i++) {
12106  // depth=2
12107  for (int i = 1; i < 2; i++) {
12108  TH1F* HFnegativedirectionReconoise2 = (TH1F*)h2CeffHFnegativedirectionReconoise2->Clone("twod1");
12109  float ccctest = 0; // to avoid empty massive elements
12110  for (int jphi = 0; jphi < nphi; jphi++) {
12111  double ccc1 = areconoiseHF[i][jeta][jphi];
12112  if (ccc1 != 0.) {
12113  HFnegativedirectionReconoise2->Fill(jphi, ccc1);
12114  ccctest = 1.; //HFnegativedirectionReconoise2->SetBinError(i,0.01);
12115  }
12116  } // for jphi
12117  if (ccctest > 0.) {
12118  //cout<<"555 kcountHFnegativedirectionReconoise2 = "<<kcountHFnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
12119  c3x5->cd(kcountHFnegativedirectionReconoise2);
12120  HFnegativedirectionReconoise2->SetMarkerStyle(20);
12121  HFnegativedirectionReconoise2->SetMarkerSize(0.4);
12122  HFnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
12123  HFnegativedirectionReconoise2->SetXTitle("HFnegativedirectionReconoise2 \b");
12124  HFnegativedirectionReconoise2->SetMarkerColor(2);
12125  HFnegativedirectionReconoise2->SetLineColor(0);
12126  gPad->SetGridy();
12127  gPad->SetGridx();
12128  // gPad->SetLogy();
12129  if (kcountHFnegativedirectionReconoise2 == 1)
12130  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
12131  if (kcountHFnegativedirectionReconoise2 == 2)
12132  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
12133  if (kcountHFnegativedirectionReconoise2 == 3)
12134  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
12135  if (kcountHFnegativedirectionReconoise2 == 4)
12136  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
12137  if (kcountHFnegativedirectionReconoise2 == 5)
12138  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
12139  if (kcountHFnegativedirectionReconoise2 == 6)
12140  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
12141  if (kcountHFnegativedirectionReconoise2 == 7)
12142  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
12143  if (kcountHFnegativedirectionReconoise2 == 8)
12144  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
12145  if (kcountHFnegativedirectionReconoise2 == 9)
12146  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
12147  if (kcountHFnegativedirectionReconoise2 == 10)
12148  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
12149  if (kcountHFnegativedirectionReconoise2 == 11)
12150  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
12151  if (kcountHFnegativedirectionReconoise2 == 12)
12152  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
12153  if (kcountHFnegativedirectionReconoise2 == 13)
12154  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
12155  HFnegativedirectionReconoise2->Draw("Error");
12156  kcountHFnegativedirectionReconoise2++;
12157  if (kcountHFnegativedirectionReconoise2 > 13)
12158  break; // 4x6 = 24
12159  } //ccctest>0
12160 
12161  } // for i
12162  } //if(jeta-41 >= -41 && jeta-41 <= -29)
12163  } //for jeta
12165  c3x5->Update();
12166  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
12167  c3x5->Clear();
12168  // clean-up
12169  if (h2CeffHFnegativedirectionReconoise2)
12170  delete h2CeffHFnegativedirectionReconoise2;
12171 
12172  //======================================================================================================================
12173  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HF
12174  //------------------------ 2D-eta/phi-plot: DIF, averaged over depthfs
12175  //======================================================================
12176  //======================================================================
12177  // cout<<" DIF2D-eta/phi-plot: DIF, averaged over depthfs *****" <<endl;
12178  c2x1->Clear();
12180  c2x1->Divide(2, 1);
12181  c2x1->cd(1);
12182  TH2F* GefzDIFreconoiseHF42D = new TH2F("GefzDIFreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
12183  TH2F* GefzDIFreconoiseHF42D0 = new TH2F("GefzDIFreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
12184  TH2F* GefzDIFreconoiseHF42DF = (TH2F*)GefzDIFreconoiseHF42D0->Clone("GefzDIFreconoiseHF42DF");
12185  for (int i = 0; i < ndepth; i++) {
12186  for (int jeta = 0; jeta < neta; jeta++) {
12187  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
12188  for (int jphi = 0; jphi < nphi; jphi++) {
12189  double ccc1 = breconoiseHF[i][jeta][jphi];
12190  int k2plot = jeta - 41;
12191  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
12192  if (ccc1 != 0.) {
12193  GefzDIFreconoiseHF42D->Fill(kkk, jphi, ccc1);
12194  GefzDIFreconoiseHF42D0->Fill(kkk, jphi, 1.);
12195  }
12196  }
12197  }
12198  }
12199  }
12200  GefzDIFreconoiseHF42DF->Divide(GefzDIFreconoiseHF42D, GefzDIFreconoiseHF42D0, 1, 1, "B"); // average A
12201  gPad->SetGridy();
12202  gPad->SetGridx(); // gPad->SetLogz();
12203  GefzDIFreconoiseHF42DF->SetXTitle("<DIF>_depth #eta \b");
12204  GefzDIFreconoiseHF42DF->SetYTitle(" #phi \b");
12205  GefzDIFreconoiseHF42DF->Draw("COLZ");
12206 
12207  c2x1->cd(2);
12208  // TH1F *energyhitNoiseCut_HF= (TH1F*)dir->FindObjectAny("h_energyhitNoiseCut_HF");
12209  // 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");
12210 
12212  c2x1->Update();
12213  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHF.png");
12214  c2x1->Clear();
12215  // clean-up
12216  if (GefzDIFreconoiseHF42D)
12217  delete GefzDIFreconoiseHF42D;
12218  if (GefzDIFreconoiseHF42D0)
12219  delete GefzDIFreconoiseHF42D0;
12220  if (GefzDIFreconoiseHF42DF)
12221  delete GefzDIFreconoiseHF42DF;
12222  //====================================================================== 1D plot: DIF vs phi , averaged over depthfs & eta
12223  //======================================================================
12224  //cout<<" 1D plot: DIF vs phi , averaged over depthfs & eta *****" <<endl;
12225  c1x1->Clear();
12227  c1x1->Divide(1, 1);
12228  c1x1->cd(1);
12229  TH1F* GefzDIFreconoiseHF41D = new TH1F("GefzDIFreconoiseHF41D", "", nphi, 0., 72.);
12230  TH1F* GefzDIFreconoiseHF41D0 = new TH1F("GefzDIFreconoiseHF41D0", "", nphi, 0., 72.);
12231  TH1F* GefzDIFreconoiseHF41DF = (TH1F*)GefzDIFreconoiseHF41D0->Clone("GefzDIFreconoiseHF41DF");
12232  for (int jphi = 0; jphi < nphi; jphi++) {
12233  for (int jeta = 0; jeta < neta; jeta++) {
12234  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
12235  for (int i = 0; i < ndepth; i++) {
12236  double ccc1 = breconoiseHF[i][jeta][jphi];
12237  if (ccc1 != 0.) {
12238  GefzDIFreconoiseHF41D->Fill(jphi, ccc1);
12239  GefzDIFreconoiseHF41D0->Fill(jphi, 1.);
12240  }
12241  }
12242  }
12243  }
12244  }
12245  GefzDIFreconoiseHF41DF->Divide(
12246  GefzDIFreconoiseHF41D, GefzDIFreconoiseHF41D0, 1, 1, "B"); // DIF averaged over depthfs & eta
12247  GefzDIFreconoiseHF41D0->Sumw2();
12248  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHF41DF->SetBinError(jphi,0.01);}
12249  gPad->SetGridy();
12250  gPad->SetGridx(); // gPad->SetLogz();
12251  GefzDIFreconoiseHF41DF->SetMarkerStyle(20);
12252  GefzDIFreconoiseHF41DF->SetMarkerSize(1.4);
12253  GefzDIFreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
12254  GefzDIFreconoiseHF41DF->SetXTitle("#phi \b");
12255  GefzDIFreconoiseHF41DF->SetYTitle(" <DIF> \b");
12256  GefzDIFreconoiseHF41DF->SetZTitle("<DIF>_PHI - AllDepthfs \b");
12257  GefzDIFreconoiseHF41DF->SetMarkerColor(4);
12258  GefzDIFreconoiseHF41DF->SetLineColor(
12259  4); // GefzDIFreconoiseHF41DF->SetMinimum(0.8); // GefzDIFreconoiseHF41DF->SetMaximum(1.000);
12260  GefzDIFreconoiseHF41DF->Draw("Error");
12262  c1x1->Update();
12263  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHF.png");
12264  c1x1->Clear();
12265  // clean-up
12266  if (GefzDIFreconoiseHF41D)
12267  delete GefzDIFreconoiseHF41D;
12268  if (GefzDIFreconoiseHF41D0)
12269  delete GefzDIFreconoiseHF41D0;
12270  if (GefzDIFreconoiseHF41DF)
12271  delete GefzDIFreconoiseHF41DF;
12272  //========================================================================================== 4
12273  //======================================================================
12274  //======================================================================1D plot: DIF vs phi , different eta, depth=1
12275  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
12276  c3x5->Clear();
12278  c3x5->Divide(3, 5);
12279  c3x5->cd(1);
12280  int kcountHFpositivedirectionReconoiseDIF1 = 1;
12281  TH1F* h2CeffHFpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHFpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
12282  for (int jeta = 0; jeta < njeta; jeta++) {
12283  // positivedirectionReconoiseDIF:
12284  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
12285  // for (int i=0;i<ndepth;i++) {
12286  // depth=1
12287  for (int i = 0; i < 1; i++) {
12288  TH1F* HFpositivedirectionReconoiseDIF1 = (TH1F*)h2CeffHFpositivedirectionReconoiseDIF1->Clone("twod1");
12289  float ccctest = 0; // to avoid empty massive elements
12290  for (int jphi = 0; jphi < nphi; jphi++) {
12291  double ccc1 = breconoiseHF[i][jeta][jphi];
12292  if (ccc1 != 0.) {
12293  HFpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
12294  ccctest = 1.; //HFpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
12295  }
12296  } // for jphi
12297  if (ccctest > 0.) {
12298  // cout<<"444 kcountHFpositivedirectionReconoiseDIF1 = "<<kcountHFpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
12299  c3x5->cd(kcountHFpositivedirectionReconoiseDIF1);
12300  HFpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
12301  HFpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
12302  HFpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
12303  HFpositivedirectionReconoiseDIF1->SetXTitle("HFpositivedirectionReconoiseDIF1 \b");
12304  HFpositivedirectionReconoiseDIF1->SetMarkerColor(2);
12305  HFpositivedirectionReconoiseDIF1->SetLineColor(0);
12306  gPad->SetGridy();
12307  gPad->SetGridx();
12308  // gPad->SetLogy();
12309  if (kcountHFpositivedirectionReconoiseDIF1 == 1)
12310  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 28; depth = 1 \b");
12311  if (kcountHFpositivedirectionReconoiseDIF1 == 2)
12312  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 29; depth = 1 \b");
12313  if (kcountHFpositivedirectionReconoiseDIF1 == 3)
12314  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 30; depth = 1 \b");
12315  if (kcountHFpositivedirectionReconoiseDIF1 == 4)
12316  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 31; depth = 1 \b");
12317  if (kcountHFpositivedirectionReconoiseDIF1 == 5)
12318  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 32; depth = 1 \b");
12319  if (kcountHFpositivedirectionReconoiseDIF1 == 6)
12320  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 33; depth = 1 \b");
12321  if (kcountHFpositivedirectionReconoiseDIF1 == 7)
12322  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 34; depth = 1 \b");
12323  if (kcountHFpositivedirectionReconoiseDIF1 == 8)
12324  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 35; depth = 1 \b");
12325  if (kcountHFpositivedirectionReconoiseDIF1 == 9)
12326  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 36; depth = 1 \b");
12327  if (kcountHFpositivedirectionReconoiseDIF1 == 10)
12328  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 37; depth = 1 \b");
12329  if (kcountHFpositivedirectionReconoiseDIF1 == 11)
12330  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 38; depth = 1 \b");
12331  if (kcountHFpositivedirectionReconoiseDIF1 == 12)
12332  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 39; depth = 1 \b");
12333  if (kcountHFpositivedirectionReconoiseDIF1 == 13)
12334  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 40; depth = 1 \b");
12335  HFpositivedirectionReconoiseDIF1->Draw("Error");
12336  kcountHFpositivedirectionReconoiseDIF1++;
12337  if (kcountHFpositivedirectionReconoiseDIF1 > 13)
12338  break; //
12339  } //ccctest>0
12340 
12341  } // for i
12342  } //if(jeta-41 >= 28 && jeta-41 <= 40
12343  } //for jeta
12345  c3x5->Update();
12346  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
12347  c3x5->Clear();
12348  // clean-up
12349  if (h2CeffHFpositivedirectionReconoiseDIF1)
12350  delete h2CeffHFpositivedirectionReconoiseDIF1;
12351 
12352  //========================================================================================== 5
12353  //======================================================================
12354  //======================================================================1D plot: R vs phi , different eta, depth=2
12355  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
12356  c3x5->Clear();
12358  c3x5->Divide(3, 5);
12359  c3x5->cd(1);
12360  int kcountHFpositivedirectionReconoiseDIF2 = 1;
12361  TH1F* h2CeffHFpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHFpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
12362  for (int jeta = 0; jeta < njeta; jeta++) {
12363  // positivedirectionReconoiseDIF:
12364  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
12365  // for (int i=0;i<ndepth;i++) {
12366  // depth=2
12367  for (int i = 1; i < 2; i++) {
12368  TH1F* HFpositivedirectionReconoiseDIF2 = (TH1F*)h2CeffHFpositivedirectionReconoiseDIF2->Clone("twod1");
12369  float ccctest = 0; // to avoid empty massive elements
12370  for (int jphi = 0; jphi < nphi; jphi++) {
12371  double ccc1 = breconoiseHF[i][jeta][jphi];
12372  if (ccc1 != 0.) {
12373  HFpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
12374  ccctest = 1.; //HFpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
12375  }
12376  } // for jphi
12377  if (ccctest > 0.) {
12378  //cout<<"555 kcountHFpositivedirectionReconoiseDIF2 = "<<kcountHFpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
12379  c3x5->cd(kcountHFpositivedirectionReconoiseDIF2);
12380  HFpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
12381  HFpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
12382  HFpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
12383  HFpositivedirectionReconoiseDIF2->SetXTitle("HFpositivedirectionReconoiseDIF2 \b");
12384  HFpositivedirectionReconoiseDIF2->SetMarkerColor(2);
12385  HFpositivedirectionReconoiseDIF2->SetLineColor(0);
12386  gPad->SetGridy();
12387  gPad->SetGridx();
12388  // gPad->SetLogy();
12389  if (kcountHFpositivedirectionReconoiseDIF2 == 1)
12390  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 28; depth = 2 \b");
12391  if (kcountHFpositivedirectionReconoiseDIF2 == 2)
12392  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 29; depth = 2 \b");
12393  if (kcountHFpositivedirectionReconoiseDIF2 == 3)
12394  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 30; depth = 2 \b");
12395  if (kcountHFpositivedirectionReconoiseDIF2 == 4)
12396  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 31; depth = 2 \b");
12397  if (kcountHFpositivedirectionReconoiseDIF2 == 5)
12398  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 32; depth = 2 \b");
12399  if (kcountHFpositivedirectionReconoiseDIF2 == 6)
12400  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 33; depth = 2 \b");
12401  if (kcountHFpositivedirectionReconoiseDIF2 == 7)
12402  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 34; depth = 2 \b");
12403  if (kcountHFpositivedirectionReconoiseDIF2 == 8)
12404  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 35; depth = 2 \b");
12405  if (kcountHFpositivedirectionReconoiseDIF2 == 9)
12406  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 36; depth = 2 \b");
12407  if (kcountHFpositivedirectionReconoiseDIF2 == 10)
12408  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 37; depth = 2 \b");
12409  if (kcountHFpositivedirectionReconoiseDIF2 == 11)
12410  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 38; depth = 2 \b");
12411  if (kcountHFpositivedirectionReconoiseDIF2 == 12)
12412  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 39; depth = 2 \b");
12413  if (kcountHFpositivedirectionReconoiseDIF2 == 13)
12414  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 40; depth = 2 \b");
12415  HFpositivedirectionReconoiseDIF2->Draw("Error");
12416  kcountHFpositivedirectionReconoiseDIF2++;
12417  if (kcountHFpositivedirectionReconoiseDIF2 > 13)
12418  break; // 4x6 = 24
12419  } //ccctest>0
12420 
12421  } // for i
12422  } //if(jeta-41 >= 28 && jeta-41 <= 40)
12423  } //for jeta
12425  c3x5->Update();
12426  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
12427  c3x5->Clear();
12428  // clean-up
12429  if (h2CeffHFpositivedirectionReconoiseDIF2)
12430  delete h2CeffHFpositivedirectionReconoiseDIF2;
12431 
12432  //========================================================================================== 1111114
12433  //======================================================================
12434  //======================================================================1D plot: DIF vs phi , different eta, depth=1
12435  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
12436  c3x5->Clear();
12438  c3x5->Divide(3, 5);
12439  c3x5->cd(1);
12440  int kcountHFnegativedirectionReconoiseDIF1 = 1;
12441  TH1F* h2CeffHFnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHFnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
12442  for (int jeta = 0; jeta < njeta; jeta++) {
12443  // negativedirectionReconoiseDIF:
12444  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
12445  // for (int i=0;i<ndepth;i++) {
12446  // depth=1
12447  for (int i = 0; i < 1; i++) {
12448  TH1F* HFnegativedirectionReconoiseDIF1 = (TH1F*)h2CeffHFnegativedirectionReconoiseDIF1->Clone("twod1");
12449  float ccctest = 0; // to avoid empty massive elements
12450  for (int jphi = 0; jphi < nphi; jphi++) {
12451  double ccc1 = breconoiseHF[i][jeta][jphi];
12452  if (ccc1 != 0.) {
12453  HFnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
12454  ccctest = 1.; //HFnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
12455  }
12456  } // for jphi
12457  if (ccctest > 0.) {
12458  // cout<<"444 kcountHFnegativedirectionReconoiseDIF1 = "<<kcountHFnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
12459  c3x5->cd(kcountHFnegativedirectionReconoiseDIF1);
12460  HFnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
12461  HFnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
12462  HFnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
12463  HFnegativedirectionReconoiseDIF1->SetXTitle("HFnegativedirectionReconoiseDIF1 \b");
12464  HFnegativedirectionReconoiseDIF1->SetMarkerColor(2);
12465  HFnegativedirectionReconoiseDIF1->SetLineColor(0);
12466  gPad->SetGridy();
12467  gPad->SetGridx();
12468  // gPad->SetLogy();
12469  if (kcountHFnegativedirectionReconoiseDIF1 == 1)
12470  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-41; depth = 1 \b");
12471  if (kcountHFnegativedirectionReconoiseDIF1 == 2)
12472  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-40; depth = 1 \b");
12473  if (kcountHFnegativedirectionReconoiseDIF1 == 3)
12474  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-39; depth = 1 \b");
12475  if (kcountHFnegativedirectionReconoiseDIF1 == 4)
12476  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-38; depth = 1 \b");
12477  if (kcountHFnegativedirectionReconoiseDIF1 == 5)
12478  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-37; depth = 1 \b");
12479  if (kcountHFnegativedirectionReconoiseDIF1 == 6)
12480  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-36; depth = 1 \b");
12481  if (kcountHFnegativedirectionReconoiseDIF1 == 7)
12482  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-35; depth = 1 \b");
12483  if (kcountHFnegativedirectionReconoiseDIF1 == 8)
12484  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-34; depth = 1 \b");
12485  if (kcountHFnegativedirectionReconoiseDIF1 == 9)
12486  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-33; depth = 1 \b");
12487  if (kcountHFnegativedirectionReconoiseDIF1 == 10)
12488  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-32; depth = 1 \b");
12489  if (kcountHFnegativedirectionReconoiseDIF1 == 11)
12490  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-31; depth = 1 \b");
12491  if (kcountHFnegativedirectionReconoiseDIF1 == 12)
12492  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-30; depth = 1 \b");
12493  if (kcountHFnegativedirectionReconoiseDIF1 == 13)
12494  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-29; depth = 1 \b");
12495  HFnegativedirectionReconoiseDIF1->Draw("Error");
12496  kcountHFnegativedirectionReconoiseDIF1++;
12497  if (kcountHFnegativedirectionReconoiseDIF1 > 13)
12498  break; //
12499  } //ccctest>0
12500 
12501  } // for i
12502  } //if(jeta-41 >= -41 && jeta-41 <= -29)
12503  } //for jeta
12505  c3x5->Update();
12506  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
12507  c3x5->Clear();
12508  // clean-up
12509  if (h2CeffHFnegativedirectionReconoiseDIF1)
12510  delete h2CeffHFnegativedirectionReconoiseDIF1;
12511 
12512  //========================================================================================== 1111115
12513  //======================================================================
12514  //======================================================================1D plot: R vs phi , different eta, depth=2
12515  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
12516  c3x5->Clear();
12518  c3x5->Divide(3, 5);
12519  c3x5->cd(1);
12520  int kcountHFnegativedirectionReconoiseDIF2 = 1;
12521  TH1F* h2CeffHFnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHFnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
12522  for (int jeta = 0; jeta < njeta; jeta++) {
12523  // negativedirectionReconoiseDIF:
12524  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
12525  // for (int i=0;i<ndepth;i++) {
12526  // depth=2
12527  for (int i = 1; i < 2; i++) {
12528  TH1F* HFnegativedirectionReconoiseDIF2 = (TH1F*)h2CeffHFnegativedirectionReconoiseDIF2->Clone("twod1");
12529  float ccctest = 0; // to avoid empty massive elements
12530  for (int jphi = 0; jphi < nphi; jphi++) {
12531  double ccc1 = breconoiseHF[i][jeta][jphi];
12532  if (ccc1 != 0.) {
12533  HFnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
12534  ccctest = 1.; //HFnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
12535  }
12536  } // for jphi
12537  if (ccctest > 0.) {
12538  //cout<<"555 kcountHFnegativedirectionReconoiseDIF2 = "<<kcountHFnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
12539  c3x5->cd(kcountHFnegativedirectionReconoiseDIF2);
12540  HFnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
12541  HFnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
12542  HFnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
12543  HFnegativedirectionReconoiseDIF2->SetXTitle("HFnegativedirectionReconoiseDIF2 \b");
12544  HFnegativedirectionReconoiseDIF2->SetMarkerColor(2);
12545  HFnegativedirectionReconoiseDIF2->SetLineColor(0);
12546  gPad->SetGridy();
12547  gPad->SetGridx();
12548  // gPad->SetLogy();
12549  if (kcountHFnegativedirectionReconoiseDIF2 == 1)
12550  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-41; depth = 2 \b");
12551  if (kcountHFnegativedirectionReconoiseDIF2 == 2)
12552  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-40; depth = 2 \b");
12553  if (kcountHFnegativedirectionReconoiseDIF2 == 3)
12554  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-39; depth = 2 \b");
12555  if (kcountHFnegativedirectionReconoiseDIF2 == 4)
12556  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-38; depth = 2 \b");
12557  if (kcountHFnegativedirectionReconoiseDIF2 == 5)
12558  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-37; depth = 2 \b");
12559  if (kcountHFnegativedirectionReconoiseDIF2 == 6)
12560  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-36; depth = 2 \b");
12561  if (kcountHFnegativedirectionReconoiseDIF2 == 7)
12562  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-35; depth = 2 \b");
12563  if (kcountHFnegativedirectionReconoiseDIF2 == 8)
12564  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-34; depth = 2 \b");
12565  if (kcountHFnegativedirectionReconoiseDIF2 == 9)
12566  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-33; depth = 2 \b");
12567  if (kcountHFnegativedirectionReconoiseDIF2 == 10)
12568  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-32; depth = 2 \b");
12569  if (kcountHFnegativedirectionReconoiseDIF2 == 11)
12570  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-31; depth = 2 \b");
12571  if (kcountHFnegativedirectionReconoiseDIF2 == 12)
12572  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-30; depth = 2 \b");
12573  if (kcountHFnegativedirectionReconoiseDIF2 == 13)
12574  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-20; depth = 2 \b");
12575  HFnegativedirectionReconoiseDIF2->Draw("Error");
12576  kcountHFnegativedirectionReconoiseDIF2++;
12577  if (kcountHFnegativedirectionReconoiseDIF2 > 13)
12578  break; // 4x6 = 24
12579  } //ccctest>0
12580 
12581  } // for i
12582  } //if(jeta-41 >= -41 && jeta-41 <= -29)
12583  } //for jeta
12585  c3x5->Update();
12586  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
12587  c3x5->Clear();
12588  // clean-up
12589  if (h2CeffHFnegativedirectionReconoiseDIF2)
12590  delete h2CeffHFnegativedirectionReconoiseDIF2;
12591 
12592  //======================================================================================================================
12593  //======================================================================================================================
12594  //======================================================================================================================
12595  //======================================================================================================================
12596  //======================================================================================================================
12597  //======================================================================================================================
12598  //======================================================================================================================
12599  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
12600 
12601  //cout<<" Start Vaiance: preparation *****" <<endl;
12602  TH2F* reconoiseVariance1HF1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HF1");
12603  TH2F* reconoiseVariance0HF1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HF1");
12604  TH2F* reconoiseVarianceHF1 = (TH2F*)reconoiseVariance1HF1->Clone("reconoiseVarianceHF1");
12605  reconoiseVarianceHF1->Divide(reconoiseVariance1HF1, reconoiseVariance0HF1, 1, 1, "B");
12606  TH2F* reconoiseVariance1HF2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HF2");
12607  TH2F* reconoiseVariance0HF2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HF2");
12608  TH2F* reconoiseVarianceHF2 = (TH2F*)reconoiseVariance1HF2->Clone("reconoiseVarianceHF2");
12609  reconoiseVarianceHF2->Divide(reconoiseVariance1HF2, reconoiseVariance0HF2, 1, 1, "B");
12610  //cout<<" Vaiance: preparation DONE *****" <<endl;
12611  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevarianceHF
12612  // = sum(R*R)/N - (sum(R)/N)**2
12613  for (int jeta = 0; jeta < njeta; jeta++) {
12614  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
12615  //preparation for PHI normalization:
12616  double sumreconoiseHF0 = 0;
12617  int nsumreconoiseHF0 = 0;
12618  double sumreconoiseHF1 = 0;
12619  int nsumreconoiseHF1 = 0;
12620  for (int jphi = 0; jphi < njphi; jphi++) {
12621  reconoisevarianceHF[0][jeta][jphi] = reconoiseVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
12622  reconoisevarianceHF[1][jeta][jphi] = reconoiseVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
12623  sumreconoiseHF0 += reconoisevarianceHF[0][jeta][jphi];
12624  ++nsumreconoiseHF0;
12625  sumreconoiseHF1 += reconoisevarianceHF[1][jeta][jphi];
12626  ++nsumreconoiseHF1;
12627  } // phi
12628  // PHI normalization :
12629  for (int jphi = 0; jphi < njphi; jphi++) {
12630  if (reconoisevarianceHF[0][jeta][jphi] != 0.)
12631  reconoisevarianceHF[0][jeta][jphi] /= (sumreconoiseHF0 / nsumreconoiseHF0);
12632  if (reconoisevarianceHF[1][jeta][jphi] != 0.)
12633  reconoisevarianceHF[1][jeta][jphi] /= (sumreconoiseHF1 / nsumreconoiseHF1);
12634  } // phi
12635  // reconoisevarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
12636  for (int jphi = 0; jphi < njphi; jphi++) {
12637  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
12638  reconoisevarianceHF[0][jeta][jphi] -= areconoiseHF[0][jeta][jphi] * areconoiseHF[0][jeta][jphi];
12639  reconoisevarianceHF[0][jeta][jphi] = fabs(reconoisevarianceHF[0][jeta][jphi]);
12640  reconoisevarianceHF[1][jeta][jphi] -= areconoiseHF[1][jeta][jphi] * areconoiseHF[1][jeta][jphi];
12641  reconoisevarianceHF[1][jeta][jphi] = fabs(reconoisevarianceHF[1][jeta][jphi]);
12642  }
12643  }
12644  }
12645  //cout<<" Vaiance: DONE*****" <<endl;
12646  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
12647  //======================================================================
12648  //======================================================================
12649  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
12650  c1x1->Clear();
12652  c1x0->Divide(1, 1);
12653  c1x0->cd(1);
12654  TH2F* DefzDreconoiseHF42D = new TH2F("DefzDreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
12655  TH2F* DefzDreconoiseHF42D0 = new TH2F("DefzDreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
12656  TH2F* DefzDreconoiseHF42DF = (TH2F*)DefzDreconoiseHF42D0->Clone("DefzDreconoiseHF42DF");
12657  for (int i = 0; i < ndepth; i++) {
12658  for (int jeta = 0; jeta < neta; jeta++) {
12659  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
12660  for (int jphi = 0; jphi < nphi; jphi++) {
12661  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
12662  int k2plot = jeta - 41;
12663  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
12664  if (areconoiseHF[i][jeta][jphi] > 0.) {
12665  DefzDreconoiseHF42D->Fill(kkk, jphi, ccc1);
12666  DefzDreconoiseHF42D0->Fill(kkk, jphi, 1.);
12667  }
12668  }
12669  }
12670  }
12671  }
12672  DefzDreconoiseHF42DF->Divide(DefzDreconoiseHF42D, DefzDreconoiseHF42D0, 1, 1, "B"); // average A
12673  // DefzDreconoiseHF1->Sumw2();
12674  gPad->SetGridy();
12675  gPad->SetGridx(); // gPad->SetLogz();
12676  DefzDreconoiseHF42DF->SetMarkerStyle(20);
12677  DefzDreconoiseHF42DF->SetMarkerSize(0.4);
12678  DefzDreconoiseHF42DF->GetZaxis()->SetLabelSize(0.08);
12679  DefzDreconoiseHF42DF->SetXTitle("<D>_depth #eta \b");
12680  DefzDreconoiseHF42DF->SetYTitle(" #phi \b");
12681  DefzDreconoiseHF42DF->SetZTitle("<D>_depth \b");
12682  DefzDreconoiseHF42DF->SetMarkerColor(2);
12683  DefzDreconoiseHF42DF->SetLineColor(
12684  0); // DefzDreconoiseHF42DF->SetMaximum(1.000); // DefzDreconoiseHF42DF->SetMinimum(1.0);
12685  DefzDreconoiseHF42DF->Draw("COLZ");
12687  c1x0->Update();
12688  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHF.png");
12689  c1x0->Clear();
12690  // clean-up
12691  if (DefzDreconoiseHF42D)
12692  delete DefzDreconoiseHF42D;
12693  if (DefzDreconoiseHF42D0)
12694  delete DefzDreconoiseHF42D0;
12695  if (DefzDreconoiseHF42DF)
12696  delete DefzDreconoiseHF42DF;
12697  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
12698  //======================================================================
12699  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
12700  c1x1->Clear();
12702  c1x1->Divide(1, 1);
12703  c1x1->cd(1);
12704  TH1F* DefzDreconoiseHF41D = new TH1F("DefzDreconoiseHF41D", "", nphi, 0., 72.);
12705  TH1F* DefzDreconoiseHF41D0 = new TH1F("DefzDreconoiseHF41D0", "", nphi, 0., 72.);
12706  TH1F* DefzDreconoiseHF41DF = (TH1F*)DefzDreconoiseHF41D0->Clone("DefzDreconoiseHF41DF");
12707 
12708  for (int jphi = 0; jphi < nphi; jphi++) {
12709  for (int jeta = 0; jeta < neta; jeta++) {
12710  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
12711  for (int i = 0; i < ndepth; i++) {
12712  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
12713  if (areconoiseHF[i][jeta][jphi] > 0.) {
12714  DefzDreconoiseHF41D->Fill(jphi, ccc1);
12715  DefzDreconoiseHF41D0->Fill(jphi, 1.);
12716  }
12717  }
12718  }
12719  }
12720  }
12721  // DefzDreconoiseHF41D->Sumw2();DefzDreconoiseHF41D0->Sumw2();
12722 
12723  DefzDreconoiseHF41DF->Divide(DefzDreconoiseHF41D, DefzDreconoiseHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
12724  DefzDreconoiseHF41D0->Sumw2();
12725  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHF41DF->SetBinError(jphi,0.01);}
12726  gPad->SetGridy();
12727  gPad->SetGridx(); // gPad->SetLogz();
12728  DefzDreconoiseHF41DF->SetMarkerStyle(20);
12729  DefzDreconoiseHF41DF->SetMarkerSize(1.4);
12730  DefzDreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
12731  DefzDreconoiseHF41DF->SetXTitle("#phi \b");
12732  DefzDreconoiseHF41DF->SetYTitle(" <D> \b");
12733  DefzDreconoiseHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
12734  DefzDreconoiseHF41DF->SetMarkerColor(4);
12735  DefzDreconoiseHF41DF->SetLineColor(
12736  4); // DefzDreconoiseHF41DF->SetMinimum(0.8); DefzDreconoiseHF41DF->SetMinimum(-0.015);
12737  DefzDreconoiseHF41DF->Draw("Error");
12739  c1x1->Update();
12740  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHF.png");
12741  c1x1->Clear();
12742  // clean-up
12743  if (DefzDreconoiseHF41D)
12744  delete DefzDreconoiseHF41D;
12745  if (DefzDreconoiseHF41D0)
12746  delete DefzDreconoiseHF41D0;
12747  if (DefzDreconoiseHF41DF)
12748  delete DefzDreconoiseHF41DF;
12749  //========================================================================================== 14
12750  //======================================================================
12751  //======================================================================1D plot: D vs phi , different eta, depth=1
12752  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
12753  c3x5->Clear();
12755  c3x5->Divide(3, 5);
12756  c3x5->cd(1);
12757  int kcountHFpositivedirectionReconoiseD1 = 1;
12758  TH1F* h2CeffHFpositivedirectionReconoiseD1 = new TH1F("h2CeffHFpositivedirectionReconoiseD1", "", nphi, 0., 72.);
12759 
12760  for (int jeta = 0; jeta < njeta; jeta++) {
12761  // positivedirectionReconoiseD:
12762  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
12763  // for (int i=0;i<ndepth;i++) {
12764  // depth=1
12765  for (int i = 0; i < 1; i++) {
12766  TH1F* HFpositivedirectionReconoiseD1 = (TH1F*)h2CeffHFpositivedirectionReconoiseD1->Clone("twod1");
12767 
12768  float ccctest = 0; // to avoid empty massive elements
12769  for (int jphi = 0; jphi < nphi; jphi++) {
12770  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
12771  if (areconoiseHF[i][jeta][jphi] > 0.) {
12772  HFpositivedirectionReconoiseD1->Fill(jphi, ccc1);
12773  ccctest = 1.; //HFpositivedirectionReconoiseD1->SetBinError(i,0.01);
12774  }
12775  } // for jphi
12776  if (ccctest > 0.) {
12777  //cout<<"1414 kcountHFpositivedirectionReconoiseD1 = "<<kcountHFpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
12778  c3x5->cd(kcountHFpositivedirectionReconoiseD1);
12779  HFpositivedirectionReconoiseD1->SetMarkerStyle(20);
12780  HFpositivedirectionReconoiseD1->SetMarkerSize(0.4);
12781  HFpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
12782  HFpositivedirectionReconoiseD1->SetXTitle("HFpositivedirectionReconoiseD1 \b");
12783  HFpositivedirectionReconoiseD1->SetMarkerColor(2);
12784  HFpositivedirectionReconoiseD1->SetLineColor(0);
12785  gPad->SetGridy();
12786  gPad->SetGridx();
12787  // gPad->SetLogy();
12788  if (kcountHFpositivedirectionReconoiseD1 == 1)
12789  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
12790  if (kcountHFpositivedirectionReconoiseD1 == 2)
12791  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
12792  if (kcountHFpositivedirectionReconoiseD1 == 3)
12793  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
12794  if (kcountHFpositivedirectionReconoiseD1 == 4)
12795  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
12796  if (kcountHFpositivedirectionReconoiseD1 == 5)
12797  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
12798  if (kcountHFpositivedirectionReconoiseD1 == 6)
12799  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
12800  if (kcountHFpositivedirectionReconoiseD1 == 7)
12801  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
12802  if (kcountHFpositivedirectionReconoiseD1 == 8)
12803  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
12804  if (kcountHFpositivedirectionReconoiseD1 == 9)
12805  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
12806  if (kcountHFpositivedirectionReconoiseD1 == 10)
12807  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
12808  if (kcountHFpositivedirectionReconoiseD1 == 11)
12809  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
12810  if (kcountHFpositivedirectionReconoiseD1 == 12)
12811  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
12812  if (kcountHFpositivedirectionReconoiseD1 == 13)
12813  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
12814  HFpositivedirectionReconoiseD1->Draw("Error");
12815  kcountHFpositivedirectionReconoiseD1++;
12816  if (kcountHFpositivedirectionReconoiseD1 > 13)
12817  break; // 4x6 = 24
12818  } //ccctest>0
12819 
12820  } // for i
12821  } //if(jeta-41 >= 28 && jeta-41 <= 40)
12822  } //for jeta
12824  c3x5->Update();
12825  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
12826  c3x5->Clear();
12827  // clean-up
12828  if (h2CeffHFpositivedirectionReconoiseD1)
12829  delete h2CeffHFpositivedirectionReconoiseD1;
12830  //========================================================================================== 15
12831  //======================================================================
12832  //======================================================================1D plot: D vs phi , different eta, depth=2
12833  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
12834  c3x5->Clear();
12835  c3x5->Divide(3, 5);
12836  c3x5->cd(1);
12837  int kcountHFpositivedirectionReconoiseD2 = 1;
12838  TH1F* h2CeffHFpositivedirectionReconoiseD2 = new TH1F("h2CeffHFpositivedirectionReconoiseD2", "", nphi, 0., 72.);
12839 
12840  for (int jeta = 0; jeta < njeta; jeta++) {
12841  // positivedirectionReconoiseD:
12842  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
12843  // for (int i=0;i<ndepth;i++) {
12844  // depth=2
12845  for (int i = 1; i < 2; i++) {
12846  TH1F* HFpositivedirectionReconoiseD2 = (TH1F*)h2CeffHFpositivedirectionReconoiseD2->Clone("twod1");
12847 
12848  float ccctest = 0; // to avoid empty massive elements
12849  for (int jphi = 0; jphi < nphi; jphi++) {
12850  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
12851  if (areconoiseHF[i][jeta][jphi] > 0.) {
12852  HFpositivedirectionReconoiseD2->Fill(jphi, ccc1);
12853  ccctest = 1.; //HFpositivedirectionReconoiseD2->SetBinError(i,0.01);
12854  }
12855  } // for jphi
12856  if (ccctest > 0.) {
12857  //cout<<"1515 kcountHFpositivedirectionReconoiseD2 = "<<kcountHFpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
12858  c3x5->cd(kcountHFpositivedirectionReconoiseD2);
12859  HFpositivedirectionReconoiseD2->SetMarkerStyle(20);
12860  HFpositivedirectionReconoiseD2->SetMarkerSize(0.4);
12861  HFpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
12862  HFpositivedirectionReconoiseD2->SetXTitle("HFpositivedirectionReconoiseD2 \b");
12863  HFpositivedirectionReconoiseD2->SetMarkerColor(2);
12864  HFpositivedirectionReconoiseD2->SetLineColor(0);
12865  gPad->SetGridy();
12866  gPad->SetGridx();
12867  // gPad->SetLogy();
12868  if (kcountHFpositivedirectionReconoiseD2 == 1)
12869  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
12870  if (kcountHFpositivedirectionReconoiseD2 == 2)
12871  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
12872  if (kcountHFpositivedirectionReconoiseD2 == 3)
12873  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
12874  if (kcountHFpositivedirectionReconoiseD2 == 4)
12875  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
12876  if (kcountHFpositivedirectionReconoiseD2 == 5)
12877  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
12878  if (kcountHFpositivedirectionReconoiseD2 == 6)
12879  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
12880  if (kcountHFpositivedirectionReconoiseD2 == 7)
12881  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
12882  if (kcountHFpositivedirectionReconoiseD2 == 8)
12883  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
12884  if (kcountHFpositivedirectionReconoiseD2 == 9)
12885  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
12886  if (kcountHFpositivedirectionReconoiseD2 == 10)
12887  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
12888  if (kcountHFpositivedirectionReconoiseD2 == 11)
12889  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
12890  if (kcountHFpositivedirectionReconoiseD2 == 12)
12891  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
12892  if (kcountHFpositivedirectionReconoiseD2 == 13)
12893  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
12894  HFpositivedirectionReconoiseD2->Draw("Error");
12895  kcountHFpositivedirectionReconoiseD2++;
12896  if (kcountHFpositivedirectionReconoiseD2 > 13)
12897  break; // 4x6 = 24
12898  } //ccctest>0
12899 
12900  } // for i
12901  } //if(jeta-41 >= 28 && jeta-41 <= 40)
12902  } //for jeta
12904  c3x5->Update();
12905  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
12906  c3x5->Clear();
12907  // clean-up
12908  if (h2CeffHFpositivedirectionReconoiseD2)
12909  delete h2CeffHFpositivedirectionReconoiseD2;
12910  //========================================================================================== 22222214
12911  //======================================================================
12912  //======================================================================1D plot: D vs phi , different eta, depth=1
12913  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
12914  c3x5->Clear();
12916  c3x5->Divide(3, 5);
12917  c3x5->cd(1);
12918  int kcountHFnegativedirectionReconoiseD1 = 1;
12919  TH1F* h2CeffHFnegativedirectionReconoiseD1 = new TH1F("h2CeffHFnegativedirectionReconoiseD1", "", nphi, 0., 72.);
12920 
12921  for (int jeta = 0; jeta < njeta; jeta++) {
12922  // negativedirectionReconoiseD:
12923  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
12924  // for (int i=0;i<ndepth;i++) {
12925  // depth=1
12926  for (int i = 0; i < 1; i++) {
12927  TH1F* HFnegativedirectionReconoiseD1 = (TH1F*)h2CeffHFnegativedirectionReconoiseD1->Clone("twod1");
12928 
12929  float ccctest = 0; // to avoid empty massive elements
12930  for (int jphi = 0; jphi < nphi; jphi++) {
12931  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
12932  if (areconoiseHF[i][jeta][jphi] > 0.) {
12933  HFnegativedirectionReconoiseD1->Fill(jphi, ccc1);
12934  ccctest = 1.; //HFnegativedirectionReconoiseD1->SetBinError(i,0.01);
12935  }
12936  } // for jphi
12937  if (ccctest > 0.) {
12938  //cout<<"1414 kcountHFnegativedirectionReconoiseD1 = "<<kcountHFnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
12939  c3x5->cd(kcountHFnegativedirectionReconoiseD1);
12940  HFnegativedirectionReconoiseD1->SetMarkerStyle(20);
12941  HFnegativedirectionReconoiseD1->SetMarkerSize(0.4);
12942  HFnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
12943  HFnegativedirectionReconoiseD1->SetXTitle("HFnegativedirectionReconoiseD1 \b");
12944  HFnegativedirectionReconoiseD1->SetMarkerColor(2);
12945  HFnegativedirectionReconoiseD1->SetLineColor(0);
12946  gPad->SetGridy();
12947  gPad->SetGridx();
12948  // gPad->SetLogy();
12949  if (kcountHFnegativedirectionReconoiseD1 == 1)
12950  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
12951  if (kcountHFnegativedirectionReconoiseD1 == 2)
12952  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
12953  if (kcountHFnegativedirectionReconoiseD1 == 3)
12954  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
12955  if (kcountHFnegativedirectionReconoiseD1 == 4)
12956  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
12957  if (kcountHFnegativedirectionReconoiseD1 == 5)
12958  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
12959  if (kcountHFnegativedirectionReconoiseD1 == 6)
12960  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
12961  if (kcountHFnegativedirectionReconoiseD1 == 7)
12962  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
12963  if (kcountHFnegativedirectionReconoiseD1 == 8)
12964  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
12965  if (kcountHFnegativedirectionReconoiseD1 == 9)
12966  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
12967  if (kcountHFnegativedirectionReconoiseD1 == 10)
12968  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
12969  if (kcountHFnegativedirectionReconoiseD1 == 11)
12970  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
12971  if (kcountHFnegativedirectionReconoiseD1 == 12)
12972  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
12973  if (kcountHFnegativedirectionReconoiseD1 == 13)
12974  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
12975  HFnegativedirectionReconoiseD1->Draw("Error");
12976  kcountHFnegativedirectionReconoiseD1++;
12977  if (kcountHFnegativedirectionReconoiseD1 > 13)
12978  break; // 4x6 = 24
12979  } //ccctest>0
12980 
12981  } // for i
12982  } //if(jeta-41 >= -41 && jeta-41 <= -29)
12983  } //for jeta
12985  c3x5->Update();
12986  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
12987  c3x5->Clear();
12988  // clean-up
12989  if (h2CeffHFnegativedirectionReconoiseD1)
12990  delete h2CeffHFnegativedirectionReconoiseD1;
12991  //========================================================================================== 22222215
12992  //======================================================================
12993  //======================================================================1D plot: D vs phi , different eta, depth=2
12994  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
12995  c3x5->Clear();
12996  c3x5->Divide(3, 5);
12997  c3x5->cd(1);
12998  int kcountHFnegativedirectionReconoiseD2 = 1;
12999  TH1F* h2CeffHFnegativedirectionReconoiseD2 = new TH1F("h2CeffHFnegativedirectionReconoiseD2", "", nphi, 0., 72.);
13000 
13001  for (int jeta = 0; jeta < njeta; jeta++) {
13002  // negativedirectionReconoiseD:
13003  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
13004  // for (int i=0;i<ndepth;i++) {
13005  // depth=2
13006  for (int i = 1; i < 2; i++) {
13007  TH1F* HFnegativedirectionReconoiseD2 = (TH1F*)h2CeffHFnegativedirectionReconoiseD2->Clone("twod1");
13008 
13009  float ccctest = 0; // to avoid empty massive elements
13010  for (int jphi = 0; jphi < nphi; jphi++) {
13011  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
13012  if (areconoiseHF[i][jeta][jphi] > 0.) {
13013  HFnegativedirectionReconoiseD2->Fill(jphi, ccc1);
13014  ccctest = 1.; //HFnegativedirectionReconoiseD2->SetBinError(i,0.01);
13015  }
13016  } // for jphi
13017  if (ccctest > 0.) {
13018  //cout<<"1515 kcountHFnegativedirectionReconoiseD2 = "<<kcountHFnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
13019  c3x5->cd(kcountHFnegativedirectionReconoiseD2);
13020  HFnegativedirectionReconoiseD2->SetMarkerStyle(20);
13021  HFnegativedirectionReconoiseD2->SetMarkerSize(0.4);
13022  HFnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
13023  HFnegativedirectionReconoiseD2->SetXTitle("HFnegativedirectionReconoiseD2 \b");
13024  HFnegativedirectionReconoiseD2->SetMarkerColor(2);
13025  HFnegativedirectionReconoiseD2->SetLineColor(0);
13026  gPad->SetGridy();
13027  gPad->SetGridx();
13028  // gPad->SetLogy();
13029  if (kcountHFnegativedirectionReconoiseD2 == 1)
13030  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
13031  if (kcountHFnegativedirectionReconoiseD2 == 2)
13032  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
13033  if (kcountHFnegativedirectionReconoiseD2 == 3)
13034  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
13035  if (kcountHFnegativedirectionReconoiseD2 == 4)
13036  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
13037  if (kcountHFnegativedirectionReconoiseD2 == 5)
13038  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
13039  if (kcountHFnegativedirectionReconoiseD2 == 6)
13040  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
13041  if (kcountHFnegativedirectionReconoiseD2 == 7)
13042  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
13043  if (kcountHFnegativedirectionReconoiseD2 == 8)
13044  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
13045  if (kcountHFnegativedirectionReconoiseD2 == 9)
13046  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
13047  if (kcountHFnegativedirectionReconoiseD2 == 10)
13048  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
13049  if (kcountHFnegativedirectionReconoiseD2 == 11)
13050  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
13051  if (kcountHFnegativedirectionReconoiseD2 == 12)
13052  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
13053  if (kcountHFnegativedirectionReconoiseD2 == 13)
13054  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
13055  HFnegativedirectionReconoiseD2->Draw("Error");
13056  kcountHFnegativedirectionReconoiseD2++;
13057  if (kcountHFnegativedirectionReconoiseD2 > 13)
13058  break; // 4x6 = 24
13059  } //ccctest>0
13060 
13061  } // for i
13062  } //if(jeta-41 >= -41 && jeta-41 <= -29)
13063  } //for jeta
13065  c3x5->Update();
13066  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
13067  c3x5->Clear();
13068  // clean-up
13069  if (h2CeffHFnegativedirectionReconoiseD2)
13070  delete h2CeffHFnegativedirectionReconoiseD2;
13071 
13072  //===================================================================== END of Reconoise HF for phi-symmetry
13073  //===================================================================== END of Reconoise HF for phi-symmetry
13074  //===================================================================== END of Reconoise HF for phi-symmetry
13075  //============================================================================================================ END of Reconoise for phi-symmetry
13076  //============================================================================================================ END of Reconoise for phi-symmetry
13077  //============================================================================================================ END of Reconoise for phi-symmetry
13078 
13079  //==================================================================================================================================================== END for phi-symmetry
13080  //==================================================================================================================================================== END for phi-symmetry
13081  //==================================================================================================================================================== END for phi-symmetry
13082  //====================================================================================================================================================
13083 
13084  //======================================================================
13085  // Creating each test kind for each subdet html pages:
13086  std::string raw_class, raw_class1, raw_class2, raw_class3;
13087  int ind = 0;
13088 
13089  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
13090  ofstream htmlFileR, htmlFileN;
13091  if (sub == 1) {
13092  htmlFileR.open("HB_PhiSymmetryRecoSignal.html");
13093  htmlFileN.open("HB_PhiSymmetryRecoNoise.html");
13094  }
13095  if (sub == 2) {
13096  htmlFileR.open("HE_PhiSymmetryRecoSignal.html");
13097  htmlFileN.open("HE_PhiSymmetryRecoNoise.html");
13098  }
13099 
13100  if (sub == 4) {
13101  htmlFileR.open("HF_PhiSymmetryRecoSignal.html");
13102  htmlFileN.open("HF_PhiSymmetryRecoNoise.html");
13103  }
13104 
13108 
13109  htmlFileR << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
13110  htmlFileR << "<head>" << std::endl;
13111  htmlFileR << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
13112  htmlFileR << "<title> Remote Monitoring Tool </title>" << std::endl;
13113  htmlFileR << "<style type=\"text/css\">" << std::endl;
13114  htmlFileR << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
13115  << std::endl;
13116  htmlFileR << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
13117  htmlFileR << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
13118  "text-align: center;}"
13119  << std::endl;
13120  htmlFileR << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
13121  htmlFileR << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
13122  htmlFileR << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
13123  htmlFileR << "</style>" << std::endl;
13124  htmlFileR << "<body>" << std::endl;
13125 
13127 
13128  if (sub == 1)
13129  htmlFileR << "<h1> Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>" << std::endl;
13130  if (sub == 2)
13131  htmlFileR << "<h1> Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>" << std::endl;
13132  if (sub == 4)
13133  htmlFileR << "<h1> Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>" << std::endl;
13134  htmlFileR << "<br>" << std::endl;
13135 
13136  htmlFileR << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
13137  htmlFileR << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
13138  // htmlFileR << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
13139  if (sub == 1)
13140  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHB.png\" />" << std::endl;
13141  if (sub == 2)
13142  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHE.png\" />" << std::endl;
13143  if (sub == 4)
13144  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHF.png\" />" << std::endl;
13145  htmlFileR << "<br>" << std::endl;
13146 
13147  htmlFileR << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
13148  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13149  if (sub == 1)
13150  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHB.png\" />" << std::endl;
13151  if (sub == 2)
13152  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHE.png\" />" << std::endl;
13153  if (sub == 4)
13154  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHF.png\" />" << std::endl;
13155  htmlFileR << "<br>" << std::endl;
13156 
13158 
13160  htmlFileR << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
13161  htmlFileR << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
13162  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13163  if (sub == 1)
13164  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
13165  if (sub == 2)
13166  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
13167  if (sub == 4)
13168  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
13169  htmlFileR << "<br>" << std::endl;
13170 
13171  htmlFileR << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
13172  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13173  if (sub == 1)
13174  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
13175  if (sub == 2)
13176  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
13177  if (sub == 4)
13178  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
13179  htmlFileR << "<br>" << std::endl;
13180 
13181  if (sub == 1 || sub == 2)
13182  htmlFileR << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
13183  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13184  if (sub == 1)
13185  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
13186  if (sub == 2)
13187  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
13188  htmlFileR << "<br>" << std::endl;
13189 
13190  if (sub == 1 || sub == 2)
13191  htmlFileR << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
13192  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13193  if (sub == 1)
13194  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
13195  if (sub == 2)
13196  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
13197  htmlFileR << "<br>" << std::endl;
13198 
13199  if (sub == 2)
13200  htmlFileR << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
13201  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13202  if (sub == 2)
13203  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
13204  htmlFileR << "<br>" << std::endl;
13205 
13206  if (sub == 2)
13207  htmlFileR << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
13208  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13209  if (sub == 2)
13210  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
13211  htmlFileR << "<br>" << std::endl;
13212 
13213  if (sub == 2)
13214  htmlFileR << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
13215  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13216  if (sub == 2)
13217  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
13218  htmlFileR << "<br>" << std::endl;
13219 
13221  htmlFileR << "<h2> 2: D(recosignalvarianceSignalhe) </h3>" << std::endl;
13222  htmlFileR << "<h3> 2A: eta/phi-plot: D(recosignalvarianceSignalhe), averaged over depthes </h3>" << std::endl;
13223  // htmlFileR << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
13224  if (sub == 1)
13225  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHB.png\" />" << std::endl;
13226  if (sub == 2)
13227  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHE.png\" />" << std::endl;
13228  if (sub == 4)
13229  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHF.png\" />" << std::endl;
13230  htmlFileR << "<br>" << std::endl;
13231 
13232  htmlFileR << "<h3> 2B: D(recosignalvarianceSignalhe) vs phi , averaged over depthes & eta </h3>" << std::endl;
13233  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13234  if (sub == 1)
13235  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHB.png\" />" << std::endl;
13236  if (sub == 2)
13237  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHE.png\" />" << std::endl;
13238  if (sub == 4)
13239  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHF.png\" />" << std::endl;
13240  htmlFileR << "<br>" << std::endl;
13241 
13244  htmlFileR << "<h2> Positive direction, D(recosignalvarianceSignalhe) </h3>" << std::endl;
13245  htmlFileR << "<h3> 2C: D(recosignalvarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
13246  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13247  if (sub == 1)
13248  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
13249  if (sub == 2)
13250  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
13251  if (sub == 4)
13252  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
13253  htmlFileR << "<br>" << std::endl;
13254 
13255  htmlFileR << "<h3> 2.D. D(recosignalvarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
13256  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13257  if (sub == 1)
13258  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
13259  if (sub == 2)
13260  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
13261  if (sub == 4)
13262  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
13263  htmlFileR << "<br>" << std::endl;
13264 
13265  if (sub == 1 || sub == 2)
13266  htmlFileR << "<h3> 2E: D(recosignalvarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
13267  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13268  if (sub == 1)
13269  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
13270  if (sub == 2)
13271  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
13272  htmlFileR << "<br>" << std::endl;
13273 
13274  if (sub == 1 || sub == 2)
13275  htmlFileR << "<h3> 2F: D(recosignalvarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
13276  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13277  if (sub == 1)
13278  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
13279  if (sub == 2)
13280  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
13281  htmlFileR << "<br>" << std::endl;
13282 
13283  if (sub == 2)
13284  htmlFileR << "<h3> 2G: D(recosignalvarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
13285  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13286  if (sub == 2)
13287  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
13288  htmlFileR << "<br>" << std::endl;
13289 
13290  if (sub == 2)
13291  htmlFileR << "<h3> 2H: D(recosignalvarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
13292  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13293  if (sub == 2)
13294  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
13295  htmlFileR << "<br>" << std::endl;
13296 
13297  if (sub == 2)
13298  htmlFileR << "<h3> 2I: D(recosignalvarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
13299  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13300  if (sub == 2)
13301  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
13302  htmlFileR << "<br>" << std::endl;
13303 
13306  htmlFileR << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
13307  << std::endl;
13308 
13310  htmlFileR << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
13311  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13312  if (sub == 1)
13313  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
13314  if (sub == 2)
13315  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
13316  if (sub == 4)
13317  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
13318  htmlFileR << "<br>" << std::endl;
13319 
13320  htmlFileR << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
13321  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13322  if (sub == 1)
13323  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
13324  if (sub == 2)
13325  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
13326  if (sub == 4)
13327  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
13328  htmlFileR << "<br>" << std::endl;
13329 
13330  if (sub == 1 || sub == 2)
13331  htmlFileR << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
13332  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13333  if (sub == 1)
13334  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
13335  if (sub == 2)
13336  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
13337  htmlFileR << "<br>" << std::endl;
13338 
13339  if (sub == 1 || sub == 2)
13340  htmlFileR << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
13341  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13342  if (sub == 1)
13343  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
13344  if (sub == 2)
13345  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
13346  htmlFileR << "<br>" << std::endl;
13347 
13348  if (sub == 2)
13349  htmlFileR << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
13350  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13351  if (sub == 2)
13352  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
13353  htmlFileR << "<br>" << std::endl;
13354 
13355  if (sub == 2)
13356  htmlFileR << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
13357  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13358  if (sub == 2)
13359  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
13360  htmlFileR << "<br>" << std::endl;
13361 
13362  if (sub == 2)
13363  htmlFileR << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
13364  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13365  if (sub == 2)
13366  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
13367  htmlFileR << "<br>" << std::endl;
13368 
13370  htmlFileR << "<h2> 4: Negative direction, D(recosignalvarianceSignalhe) </h3>" << std::endl;
13372  htmlFileR << "<h3> 4C: D(recosignalvarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
13373  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13374  if (sub == 1)
13375  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
13376  if (sub == 2)
13377  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
13378  if (sub == 4)
13379  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
13380  htmlFileR << "<br>" << std::endl;
13381 
13382  htmlFileR << "<h3> 4.D. D(recosignalvarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
13383  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13384  if (sub == 1)
13385  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
13386  if (sub == 2)
13387  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
13388  if (sub == 4)
13389  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
13390  htmlFileR << "<br>" << std::endl;
13391 
13392  if (sub == 1 || sub == 2)
13393  htmlFileR << "<h3> 4E: D(recosignalvarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
13394  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13395  if (sub == 1)
13396  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
13397  if (sub == 2)
13398  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
13399  htmlFileR << "<br>" << std::endl;
13400 
13401  if (sub == 1 || sub == 2)
13402  htmlFileR << "<h3> 4F: D(recosignalvarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
13403  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13404  if (sub == 1)
13405  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
13406  if (sub == 2)
13407  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
13408  htmlFileR << "<br>" << std::endl;
13409 
13410  if (sub == 2)
13411  htmlFileR << "<h3> 4G: D(recosignalvarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
13412  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13413  if (sub == 2)
13414  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
13415  htmlFileR << "<br>" << std::endl;
13416 
13417  if (sub == 2)
13418  htmlFileR << "<h3> 4H: D(recosignalvarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
13419  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13420  if (sub == 2)
13421  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
13422  htmlFileR << "<br>" << std::endl;
13423 
13424  if (sub == 2)
13425  htmlFileR << "<h3> 4I: D(recosignalvarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
13426  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13427  if (sub == 2)
13428  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
13429  htmlFileR << "<br>" << std::endl;
13431  htmlFileR.close();
13433  //
13437 
13438  htmlFileN << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
13439  htmlFileN << "<head>" << std::endl;
13440  htmlFileN << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
13441  htmlFileN << "<title> Remote Monitoring Tool </title>" << std::endl;
13442  htmlFileN << "<style type=\"text/css\">" << std::endl;
13443  htmlFileN << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
13444  << std::endl;
13445  htmlFileN << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
13446  htmlFileN << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
13447  "text-align: center;}"
13448  << std::endl;
13449  htmlFileN << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
13450  htmlFileN << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
13451  htmlFileN << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
13452  htmlFileN << "</style>" << std::endl;
13453  htmlFileN << "<body>" << std::endl;
13454 
13456 
13457  if (sub == 1)
13458  htmlFileN << "<h1> Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>" << std::endl;
13459  if (sub == 2)
13460  htmlFileN << "<h1> Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>" << std::endl;
13461  if (sub == 4)
13462  htmlFileN << "<h1> Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>" << std::endl;
13463  htmlFileN << "<br>" << std::endl;
13464 
13465  htmlFileN << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
13466  htmlFileN << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
13467  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
13468  if (sub == 1)
13469  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
13470  if (sub == 2)
13471  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
13472  if (sub == 4)
13473  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
13474  htmlFileN << "<br>" << std::endl;
13475 
13476  htmlFileN << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
13477  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13478  if (sub == 1)
13479  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
13480  if (sub == 2)
13481  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
13482  if (sub == 4)
13483  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
13484  htmlFileN << "<br>" << std::endl;
13485 
13487 
13489  htmlFileN << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
13490  htmlFileN << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
13491  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13492  if (sub == 1)
13493  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
13494  if (sub == 2)
13495  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
13496  if (sub == 4)
13497  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
13498  htmlFileN << "<br>" << std::endl;
13499 
13500  htmlFileN << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
13501  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13502  if (sub == 1)
13503  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
13504  if (sub == 2)
13505  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
13506  if (sub == 4)
13507  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
13508  htmlFileN << "<br>" << std::endl;
13509 
13510  if (sub == 1 || sub == 2)
13511  htmlFileN << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
13512  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13513  if (sub == 1)
13514  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
13515  if (sub == 2)
13516  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
13517  htmlFileN << "<br>" << std::endl;
13518 
13519  if (sub == 1 || sub == 2)
13520  htmlFileN << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
13521  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13522  if (sub == 1)
13523  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
13524  if (sub == 2)
13525  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
13526  htmlFileN << "<br>" << std::endl;
13527 
13528  if (sub == 2)
13529  htmlFileN << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
13530  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13531  if (sub == 2)
13532  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
13533  htmlFileN << "<br>" << std::endl;
13534 
13535  if (sub == 2)
13536  htmlFileN << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
13537  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13538  if (sub == 2)
13539  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
13540  htmlFileN << "<br>" << std::endl;
13541 
13542  if (sub == 2)
13543  htmlFileN << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
13544  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13545  if (sub == 2)
13546  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
13547  htmlFileN << "<br>" << std::endl;
13548 
13550  htmlFileN << "<h2> 2: D(reconoisevarianceNoisehe) </h3>" << std::endl;
13551  htmlFileN << "<h3> 2A: eta/phi-plot: D(reconoisevarianceNoisehe), averaged over depthes </h3>" << std::endl;
13552  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
13553  if (sub == 1)
13554  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
13555  if (sub == 2)
13556  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
13557  if (sub == 4)
13558  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
13559  htmlFileN << "<br>" << std::endl;
13560 
13561  htmlFileN << "<h3> 2B: D(reconoisevarianceNoisehe) vs phi , averaged over depthes & eta </h3>" << std::endl;
13562  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13563  if (sub == 1)
13564  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
13565  if (sub == 2)
13566  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
13567  if (sub == 4)
13568  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
13569  htmlFileN << "<br>" << std::endl;
13570 
13573  htmlFileN << "<h2> Positive direction, D(reconoisevarianceNoisehe) </h3>" << std::endl;
13574  htmlFileN << "<h3> 2C: D(reconoisevarianceNoisehe) vs phi , different eta, Depth1 </h3>" << std::endl;
13575  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13576  if (sub == 1)
13577  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
13578  if (sub == 2)
13579  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
13580  if (sub == 4)
13581  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
13582  htmlFileN << "<br>" << std::endl;
13583 
13584  htmlFileN << "<h3> 2.D. D(reconoisevarianceNoisehe) vs phi , different eta, Depth2 </h3>" << std::endl;
13585  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13586  if (sub == 1)
13587  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
13588  if (sub == 2)
13589  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
13590  if (sub == 4)
13591  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
13592  htmlFileN << "<br>" << std::endl;
13593 
13594  if (sub == 1 || sub == 2)
13595  htmlFileN << "<h3> 2E: D(reconoisevarianceNoisehe) vs phi , different eta, Depth3 </h3>" << std::endl;
13596  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13597  if (sub == 1)
13598  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
13599  if (sub == 2)
13600  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
13601  htmlFileN << "<br>" << std::endl;
13602 
13603  if (sub == 1 || sub == 2)
13604  htmlFileN << "<h3> 2F: D(reconoisevarianceNoisehe) vs phi , different eta, Depth4 </h3>" << std::endl;
13605  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13606  if (sub == 1)
13607  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
13608  if (sub == 2)
13609  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
13610  htmlFileN << "<br>" << std::endl;
13611 
13612  if (sub == 2)
13613  htmlFileN << "<h3> 2G: D(reconoisevarianceNoisehe) vs phi , different eta, Depth5 </h3>" << std::endl;
13614  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13615  if (sub == 2)
13616  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
13617  htmlFileN << "<br>" << std::endl;
13618 
13619  if (sub == 2)
13620  htmlFileN << "<h3> 2H: D(reconoisevarianceNoisehe) vs phi , different eta, Depth6 </h3>" << std::endl;
13621  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13622  if (sub == 2)
13623  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
13624  htmlFileN << "<br>" << std::endl;
13625 
13626  if (sub == 2)
13627  htmlFileN << "<h3> 2I: D(reconoisevarianceNoisehe) vs phi , different eta, Depth7 </h3>" << std::endl;
13628  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13629  if (sub == 2)
13630  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
13631  htmlFileN << "<br>" << std::endl;
13632 
13635  htmlFileN << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
13636  << std::endl;
13637 
13639  htmlFileN << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
13640  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13641  if (sub == 1)
13642  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
13643  if (sub == 2)
13644  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
13645  if (sub == 4)
13646  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
13647  htmlFileN << "<br>" << std::endl;
13648 
13649  htmlFileN << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
13650  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13651  if (sub == 1)
13652  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
13653  if (sub == 2)
13654  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
13655  if (sub == 4)
13656  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
13657  htmlFileN << "<br>" << std::endl;
13658 
13659  if (sub == 1 || sub == 2)
13660  htmlFileN << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
13661  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13662  if (sub == 1)
13663  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
13664  if (sub == 2)
13665  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
13666  htmlFileN << "<br>" << std::endl;
13667 
13668  if (sub == 1 || sub == 2)
13669  htmlFileN << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
13670  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13671  if (sub == 1)
13672  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
13673  if (sub == 2)
13674  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
13675  htmlFileN << "<br>" << std::endl;
13676 
13677  if (sub == 2)
13678  htmlFileN << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
13679  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13680  if (sub == 2)
13681  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
13682  htmlFileN << "<br>" << std::endl;
13683 
13684  if (sub == 2)
13685  htmlFileN << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
13686  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13687  if (sub == 2)
13688  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
13689  htmlFileN << "<br>" << std::endl;
13690 
13691  if (sub == 2)
13692  htmlFileN << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
13693  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13694  if (sub == 2)
13695  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
13696  htmlFileN << "<br>" << std::endl;
13697 
13699  htmlFileN << "<h2> 4: Negative direction, D(reconoisevarianceNoisehe) </h3>" << std::endl;
13701  htmlFileN << "<h3> 4C: D(reconoisevarianceNoisehe) vs phi , different eta, Depth1 </h3>" << std::endl;
13702  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13703  if (sub == 1)
13704  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
13705  if (sub == 2)
13706  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
13707  if (sub == 4)
13708  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
13709  htmlFileN << "<br>" << std::endl;
13710 
13711  htmlFileN << "<h3> 4.D. D(reconoisevarianceNoisehe) vs phi , different eta, Depth2 </h3>" << std::endl;
13712  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13713  if (sub == 1)
13714  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
13715  if (sub == 2)
13716  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
13717  if (sub == 4)
13718  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
13719  htmlFileN << "<br>" << std::endl;
13720 
13721  if (sub == 1 || sub == 2)
13722  htmlFileN << "<h3> 4E: D(reconoisevarianceNoisehe) vs phi , different eta, Depth3 </h3>" << std::endl;
13723  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13724  if (sub == 1)
13725  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
13726  if (sub == 2)
13727  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
13728  htmlFileN << "<br>" << std::endl;
13729 
13730  if (sub == 1 || sub == 2)
13731  htmlFileN << "<h3> 4F: D(reconoisevarianceNoisehe) vs phi , different eta, Depth4 </h3>" << std::endl;
13732  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13733  if (sub == 1)
13734  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
13735  if (sub == 2)
13736  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
13737  htmlFileN << "<br>" << std::endl;
13738 
13739  if (sub == 2)
13740  htmlFileN << "<h3> 4G: D(reconoisevarianceNoisehe) vs phi , different eta, Depth5 </h3>" << std::endl;
13741  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13742  if (sub == 2)
13743  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
13744  htmlFileN << "<br>" << std::endl;
13745 
13746  if (sub == 2)
13747  htmlFileN << "<h3> 4H: D(reconoisevarianceNoisehe) vs phi , different eta, Depth6 </h3>" << std::endl;
13748  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13749  if (sub == 2)
13750  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
13751  htmlFileN << "<br>" << std::endl;
13752 
13753  if (sub == 2)
13754  htmlFileN << "<h3> 4I: D(reconoisevarianceNoisehe) vs phi , different eta, Depth7 </h3>" << std::endl;
13755  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13756  if (sub == 2)
13757  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
13758  htmlFileN << "<br>" << std::endl;
13760 
13762 
13763  if (sub == 1)
13764  htmlFileN << "<h1> Only for Noise RecHits these lines below, HB, RUN = " << runnumber << " </h1>" << std::endl;
13765  if (sub == 2)
13766  htmlFileN << "<h1> Only for Noise RecHits these lines below, HE, RUN = " << runnumber << " </h1>" << std::endl;
13767  if (sub == 4)
13768  htmlFileN << "<h1> Only for Noise RecHits these lines below, HF, RUN = " << runnumber << " </h1>" << std::endl;
13769  htmlFileN << "<br>" << std::endl;
13770 
13771  htmlFileN << "<h2> 5: DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>" << std::endl;
13772  htmlFileN << "<h3> 5A: eta/phi-plot: DIF, averaged over depthes </h3>" << std::endl;
13773  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
13774  if (sub == 1)
13775  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
13776  if (sub == 2)
13777  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
13778  if (sub == 4)
13779  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
13780  htmlFileN << "<br>" << std::endl;
13781 
13782  htmlFileN << "<h3> 5B: DIF vs phi , averaged over depthes & eta </h3>" << std::endl;
13783  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13784  if (sub == 1)
13785  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
13786  if (sub == 2)
13787  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
13788  if (sub == 4)
13789  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
13790  htmlFileN << "<br>" << std::endl;
13791 
13793 
13795  htmlFileN << "<h2> Positive direction, DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>"
13796  << std::endl;
13797  htmlFileN << "<h3> 5C: DIF vs phi , different eta, Depth1 </h3>" << std::endl;
13798  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13799  if (sub == 1)
13800  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
13801  if (sub == 2)
13802  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
13803  if (sub == 4)
13804  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
13805  htmlFileN << "<br>" << std::endl;
13806 
13807  htmlFileN << "<h3> 5D: DIF vs phi , different eta, Depth2 </h3>" << std::endl;
13808  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13809  if (sub == 1)
13810  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
13811  if (sub == 2)
13812  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
13813  if (sub == 4)
13814  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
13815  htmlFileN << "<br>" << std::endl;
13816 
13817  if (sub == 1 || sub == 2)
13818  htmlFileN << "<h3> 1E: DIF vs phi , different eta, Depth3 </h3>" << std::endl;
13819  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13820  if (sub == 1)
13821  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
13822  if (sub == 2)
13823  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
13824  htmlFileN << "<br>" << std::endl;
13825 
13826  if (sub == 1 || sub == 2)
13827  htmlFileN << "<h3> 5F: DIF vs phi , different eta, Depth4 </h3>" << std::endl;
13828  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13829  if (sub == 1)
13830  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
13831  if (sub == 2)
13832  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
13833  htmlFileN << "<br>" << std::endl;
13834 
13835  if (sub == 2)
13836  htmlFileN << "<h3> 5G: DIF vs phi , different eta, Depth5 </h3>" << std::endl;
13837  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13838  if (sub == 2)
13839  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
13840  htmlFileN << "<br>" << std::endl;
13841 
13842  if (sub == 2)
13843  htmlFileN << "<h3> 5H: DIF vs phi , different eta, Depth6 </h3>" << std::endl;
13844  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13845  if (sub == 2)
13846  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
13847  htmlFileN << "<br>" << std::endl;
13848 
13849  if (sub == 2)
13850  htmlFileN << "<h3> 5I: DIF vs phi , different eta, Depth7 </h3>" << std::endl;
13851  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13852  if (sub == 2)
13853  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
13854  htmlFileN << "<br>" << std::endl;
13855 
13857 
13859  htmlFileN << "<h2> Negative direction, DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>"
13860  << std::endl;
13861  htmlFileN << "<h3> 5C: DIF vs phi , different eta, Depth1 </h3>" << std::endl;
13862  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13863  if (sub == 1)
13864  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
13865  if (sub == 2)
13866  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
13867  if (sub == 4)
13868  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
13869  htmlFileN << "<br>" << std::endl;
13870 
13871  htmlFileN << "<h3> 5D: DIF vs phi , different eta, Depth2 </h3>" << std::endl;
13872  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13873  if (sub == 1)
13874  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
13875  if (sub == 2)
13876  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
13877  if (sub == 4)
13878  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
13879  htmlFileN << "<br>" << std::endl;
13880 
13881  if (sub == 1 || sub == 2)
13882  htmlFileN << "<h3> 5E: DIF vs phi , different eta, Depth3 </h3>" << std::endl;
13883  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13884  if (sub == 1)
13885  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
13886  if (sub == 2)
13887  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
13888  htmlFileN << "<br>" << std::endl;
13889 
13890  if (sub == 1 || sub == 2)
13891  htmlFileN << "<h3> 5F: DIF vs phi , different eta, Depth4 </h3>" << std::endl;
13892  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13893  if (sub == 1)
13894  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
13895  if (sub == 2)
13896  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
13897  htmlFileN << "<br>" << std::endl;
13898 
13899  if (sub == 2)
13900  htmlFileN << "<h3> 5G: DIF vs phi , different eta, Depth5 </h3>" << std::endl;
13901  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13902  if (sub == 2)
13903  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
13904  htmlFileN << "<br>" << std::endl;
13905 
13906  if (sub == 2)
13907  htmlFileN << "<h3> 5H: DIF vs phi , different eta, Depth6 </h3>" << std::endl;
13908  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13909  if (sub == 2)
13910  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
13911  htmlFileN << "<br>" << std::endl;
13912 
13913  if (sub == 2)
13914  htmlFileN << "<h3> 5I: DIF vs phi , different eta, Depth7 </h3>" << std::endl;
13915  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
13916  if (sub == 2)
13917  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
13918  htmlFileN << "<br>" << std::endl;
13919 
13921 
13922  //
13923  //
13924  htmlFileN.close();
13925 
13928 
13929  //
13930  //
13931  } // end sub //for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
13932 
13933  //======================================================================
13934 
13935  std::cout << "********" << std::endl;
13936  std::cout << "************ Start creating subdet html pages: - rather long time needed, waiting please"
13937  << std::endl;
13938  //======================================================================
13939  // Creating subdet html pages:
13940 
13941  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
13942  ofstream htmlFile;
13943  if (sub == 1)
13944  htmlFile.open("HB.html");
13945  if (sub == 2)
13946  htmlFile.open("HE.html");
13947  if (sub == 3)
13948  htmlFile.open("HO.html");
13949  if (sub == 4)
13950  htmlFile.open("HF.html");
13951 
13952  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
13953  htmlFile << "<head>" << std::endl;
13954  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
13955  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
13956  htmlFile << "<style type=\"text/css\">" << std::endl;
13957  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
13958  << std::endl;
13959  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
13960  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
13961  "text-align: center;}"
13962  << std::endl;
13963  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
13964  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
13965  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
13966  htmlFile << " td.s5 { font-family: arial, arial ce, helvetica; background-color: #FF00FF; }" << std::endl;
13967  htmlFile << " td.s6 { font-family: arial, arial ce, helvetica; background-color: #9ACD32; }" << std::endl;
13968  htmlFile << " td.s7 { font-family: arial, arial ce, helvetica; background-color: #32CD32; }" << std::endl;
13969  htmlFile << " td.s8 { font-family: arial, arial ce, helvetica; background-color: #00FFFF; }" << std::endl;
13970  htmlFile << " td.s9 { font-family: arial, arial ce, helvetica; background-color: #FFE4E1; }" << std::endl;
13971  htmlFile << " td.s10 { font-family: arial, arial ce, helvetica; background-color: #A0522D; }" << std::endl;
13972  htmlFile << " td.s11 { font-family: arial, arial ce, helvetica; background-color: #1E90FF; }" << std::endl;
13973  htmlFile << " td.s12 { font-family: arial, arial ce, helvetica; background-color: #00BFFF; }" << std::endl;
13974  htmlFile << " td.s13 { font-family: arial, arial ce, helvetica; background-color: #FFFF00; }" << std::endl;
13975  htmlFile << " td.s14 { font-family: arial, arial ce, helvetica; background-color: #B8860B; }" << std::endl;
13976  htmlFile << "</style>" << std::endl;
13977  htmlFile << "<body>" << std::endl;
13978  if (sub == 1)
13979  htmlFile << "<h1> HCAL BARREL, RUN = " << runnumber << " </h1>" << std::endl;
13980  if (sub == 2)
13981  htmlFile << "<h1> HCAL ENDCAP, RUN = " << runnumber << " </h1>" << std::endl;
13982  if (sub == 3)
13983  htmlFile << "<h1> HCAL OUTER, RUN = " << runnumber << " </h1>" << std::endl;
13984  if (sub == 4)
13985  htmlFile << "<h1> HCAL FORWARD, RUN = " << runnumber << " </h1>" << std::endl;
13986  htmlFile << "<br>" << std::endl;
13987  if (sub == 1)
13988  htmlFile << "<h2> 1. Analysis results for HB</h2>" << std::endl;
13989  if (sub == 2)
13990  htmlFile << "<h2> 1. Analysis results for HE</h2>" << std::endl;
13991  if (sub == 3)
13992  htmlFile << "<h2> 1. Analysis results for HO</h2>" << std::endl;
13993  if (sub == 4)
13994  htmlFile << "<h2> 1. Analysis results for HF</h2>" << std::endl;
13995  htmlFile << "<table width=\"600\">" << std::endl;
13996  htmlFile << "<tr>" << std::endl;
13997 
13998  if (sub == 1) {
13999  htmlFile << " <td><a href=\"HB_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>" << std::endl;
14000  htmlFile << " <td><a href=\"HB_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>" << std::endl;
14001 
14002  /*
14003  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/IMPSM/GLOBAL_"<<runnumber<<"/HB_PhiSymmetryRecoSignal.html\">Phi-SymmetryRecoSignal</a></td>"<< std::endl;
14004  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/IMPSM/GLOBAL_"<<runnumber<<"/HB_PhiSymmetryRecoNoise.html\">Phi-SymmetryRecoNoise</a></td>"<< std::endl;
14005 */
14006  }
14007  if (sub == 2) {
14008  htmlFile << " <td><a href=\"HE_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>" << std::endl;
14009  htmlFile << " <td><a href=\"HE_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>" << std::endl;
14010 
14011  /*
14012  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/IMPSM/GLOBAL_"<<runnumber<<"/HE_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>"<< std::endl;
14013  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/IMPSM/GLOBAL_"<<runnumber<<"/HE_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>"<< std::endl;
14014 */
14015  }
14016 
14017  if (sub == 4) {
14018  htmlFile << " <td><a href=\"HF_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>" << std::endl;
14019  htmlFile << " <td><a href=\"HF_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>" << std::endl;
14020 
14021  /*
14022  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/IMPSM/GLOBAL_"<<runnumber<<"/HF_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>"<< std::endl;
14023  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/IMPSM/GLOBAL_"<<runnumber<<"/HF_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>"<< std::endl;
14024 */
14025  }
14026 
14027  htmlFile << "</tr>" << std::endl;
14028  htmlFile << "</table>" << std::endl;
14029  htmlFile << "<br>" << std::endl;
14030 
14031  htmlFile << "</body> " << std::endl;
14032  htmlFile << "</html> " << std::endl;
14033  htmlFile.close();
14034  }
14035 
14036  //======================================================================
14037 
14038  std::cout << "********" << std::endl;
14039  std::cout << "************ Start creating description HELP html file:" << std::endl;
14040  //======================================================================
14041  // Creating description html file:
14042  ofstream htmlFile;
14043  htmlFile.open("HELP.html");
14044  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
14045  htmlFile << "<head>" << std::endl;
14046  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
14047  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
14048  htmlFile << "<style type=\"text/css\">" << std::endl;
14049  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
14050  << std::endl;
14051  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
14052  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
14053  "text-align: center;}"
14054  << std::endl;
14055  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
14056  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
14057  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
14058  htmlFile << "</style>" << std::endl;
14059  htmlFile << "<body>" << std::endl;
14060  htmlFile << "<h1> Description of Remote Monitoring Tool criteria for bad channel selection</h1>" << std::endl;
14061  htmlFile << "<br>" << std::endl;
14062  htmlFile << "<h3> - C means CAPID Errors assuming we inspect CAPID non-rotation,error & validation bits, and for "
14063  "this criterion - no need to apply any cuts to select bcs.</h3> "
14064  << std::endl;
14065  htmlFile << "<br>" << std::endl;
14066  htmlFile << "<h3> - A means full amplitude, collected over all time slices </h3> " << std::endl;
14067  htmlFile << "<h3> - R means ratio criterion where we define as a bad, the channels, for which the signal portion in "
14068  "4 middle TSs(plus one, minus two around TS with maximal amplitude) is out of some range of reasonable "
14069  "values </h3> "
14070  << std::endl;
14071  htmlFile << "<br>" << std::endl;
14072  htmlFile << "<h3> - W means width of shape distribution. Width is defined as square root from dispersion. </h3> "
14073  << std::endl;
14074  htmlFile << "<br>" << std::endl;
14075  htmlFile << "<h3> - TN means mean time position of adc signal. </h3> " << std::endl;
14076  htmlFile << "<br>" << std::endl;
14077  htmlFile << "<h3> - TX means TS number of maximum signal </h3> " << std::endl;
14078  htmlFile << "<br>" << std::endl;
14079  htmlFile << "<h3> - m means megatile channels. For example Am means Amplitude criteria for megatile channels </h3> "
14080  << std::endl;
14081  htmlFile << "<br>" << std::endl;
14082  htmlFile
14083  << "<h3> - c means calibration channels. For example Ac means Amplitude criteria for calibration channels </h3> "
14084  << std::endl;
14085  htmlFile << "<br>" << std::endl;
14086  htmlFile << "<h3> - Pm means Pedestals. </h3> " << std::endl;
14087  htmlFile << "<br>" << std::endl;
14088  htmlFile << "<h3> - pWm means pedestal Width. </h3> " << std::endl;
14089  htmlFile << "<br>" << std::endl;
14090  htmlFile << "</body> " << std::endl;
14091  htmlFile << "</html> " << std::endl;
14092  htmlFile.close();
14093 
14094  //======================================================================
14095 
14096  std::cout << "********" << std::endl;
14097  std::cout << "************ Start creating MAP html file: - rather long time needed, waiting please" << std::endl;
14098  //======================================================================
14099  // Creating main html file:
14100  htmlFile.open("MAP.html");
14101  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
14102  htmlFile << "<head>" << std::endl;
14103  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
14104  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
14105  htmlFile << "<style type=\"text/css\">" << std::endl;
14106  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
14107  << std::endl;
14108  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
14109  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
14110  "text-align: center;}"
14111  << std::endl;
14112  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
14113  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
14114  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
14115  htmlFile << " td.s5 { font-family: arial, arial ce, helvetica; background-color: #FF00FF; }" << std::endl;
14116  htmlFile << " td.s6 { font-family: arial, arial ce, helvetica; background-color: #9ACD32; }" << std::endl;
14117  htmlFile << " td.s7 { font-family: arial, arial ce, helvetica; background-color: #32CD32; }" << std::endl;
14118  htmlFile << "</style>" << std::endl;
14119  htmlFile << "<body>" << std::endl;
14120 
14121  htmlFile << "<h1> Remote Monitoring Tool, RUN = " << runnumber << ". </h1>" << std::endl;
14122  htmlFile << "<br>" << std::endl;
14123 
14124  htmlFile << "<h2> 1. Analysis results for subdetectors </h2>" << std::endl;
14125  htmlFile << "<table width=\"400\">" << std::endl;
14126  htmlFile << "<tr>" << std::endl;
14127 
14128  /*
14129  htmlFile << " <td><a href=\"HB.html\">HB</a></td>"<< std::endl;
14130  htmlFile << " <td><a href=\"HE.html\">HE</a></td>"<< std::endl;
14131  htmlFile << " <td><a href=\"HO.html\">HO</a></td>"<< std::endl;
14132  htmlFile << " <td><a href=\"HF.html\">HF</a></td>"<< std::endl;
14133 */
14134  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/IMPSM/GLOBAL_" << runnumber
14135  << "/HB.html\">HB</a></td>" << std::endl;
14136  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/IMPSM/GLOBAL_" << runnumber
14137  << "/HE.html\">HE</a></td>" << std::endl;
14138  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/IMPSM/GLOBAL_" << runnumber
14139  << "/HO.html\">HO</a></td>" << std::endl;
14140  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/IMPSM/GLOBAL_" << runnumber
14141  << "/HF.html\">HF</a></td>" << std::endl;
14142 
14143  htmlFile << "</tr>" << std::endl;
14144  htmlFile << "</table>" << std::endl;
14145  htmlFile << "<br>" << std::endl;
14146 
14147  htmlFile << "</body> " << std::endl;
14148  htmlFile << "</html> " << std::endl;
14149  htmlFile.close();
14150  //======================================================================
14151 
14152  //======================================================================
14153  // Close and delete all possible things:
14154  hfile->Close();
14155  // hfile->Delete();
14156  // Exit Root
14157  gSystem->Exit(0);
14158  //======================================================================
14159 }
const int nphi
const int nsub
const int neta
int main(int argc, char *argv[])
string fname
main script
const int ndepth
#define str(s)