CMS 3D CMS Logo

Functions
RemoteMonitoringMAP.cc File Reference
#include "LogEleMapdb.h"
#include <iostream>
#include <fstream>
#include "TH1.h"
#include "TH2.h"
#include "TCanvas.h"
#include "TROOT.h"
#include <TMath.h>
#include "TStyle.h"
#include "TSystem.h"
#include "TLegend.h"
#include "TText.h"
#include "TAxis.h"
#include "TFile.h"
#include "TLine.h"
#include "TGraph.h"

Go to the source code of this file.

Functions

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

Function Documentation

◆ main()

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

Prepare maps of good/bad channels:

Definition at line 34 of file RemoteMonitoringMAP.cc.

References funct::abs(), dir2webdir::argc, GCPpyPlots::argv, HLT_2024v13_cff::cap, gather_cfg::cout, dqmiodatasetharvest::db, electronHcalTowerIsolationLcone_cfi::Depth, DeadROC_duringRun::dir, alignmentValidation::fname, mps_fire::i, dqmiolumiharvest::j, METSignificanceParams_cfi::jeta, dqmdumpme::k, MAX, MIN, ndepth, neta, nphi, nsub, VtxSmearedParameters_cfi::Phi, cond::runnumber, SiStripCommissioningClient_cfg::runtype, CellDB::size(), str, AlCaHLTBitMon_QueryRunRegistry::string, ctpps_dqm_sourceclient-live_cfg::test, and x.

34  {
35  std::string dirnm = "Analyzer";
36  gROOT->Reset();
37  gROOT->SetStyle("Plain");
38  gStyle->SetOptStat(0);
39  gStyle->SetOptTitle(1);
40  // ok change
41  if (argc < 3)
42  return 1;
43  char fname[300];
44  char refname[300];
45  char runtypeC[300];
46  sprintf(fname, "%s", argv[1]);
47  sprintf(refname, "%s", argv[2]);
48  sprintf(runtypeC, "%s", argv[3]);
49  std::cout << fname << " " << refname << " " << runtypeC << std::endl;
50  // ok change
51 
52  //======================================================================
53  // Connect the input files, parameters and get the 2-d histogram in memory
54  // TFile *hfile= new TFile("GlobalHist.root", "READ");
55  string promt = (string)fname;
56  string runtype = (string)runtypeC;
57  string runnumber = "";
58  for (unsigned int i = promt.size() - 11; i < promt.size() - 5; i++)
59  runnumber += fname[i];
60  string refrunnumber = "";
61  promt = (string)refname;
62  for (unsigned int i = promt.size() - 11; i < promt.size() - 5; i++)
63  refrunnumber += refname[i];
64 
65  TFile *hfile = new TFile(fname, "READ");
66  hfile->ls();
67  TDirectory *dir = (TDirectory *)hfile->FindObjectAny(dirnm.c_str());
68 
69  TFile *hreffile = new TFile(refname, "READ");
70  hreffile->ls();
71  TDirectory *refdir = (TDirectory *)hreffile->FindObjectAny(dirnm.c_str());
72 
73  // with TfileService implementation, change everywhere below: hreffile->Get to refdir->FindObjectAny
74  // with TfileService implementation, change everywhere below: hfile->Get to dir->FindObjectAny
75 
76  double MIN_M[7][5];
77  double MAX_M[7][5];
78  double MIN_C[7][5];
79  double MAX_C[7][5];
80  double porog[5];
81  double Pedest[2][5];
82 
83  if (runtype == "LED") {
84  //CUTS: [test][subdetector] ADC amplitude Am Width for Wm Ratio cut for Rm TS mean for TNm TS max for TXm
85  double MIN_M_LED[7][5] = {{0., 0., 0., 0., 0.},
86  {0., 0., 0., 0., 0.},
87  {0, 100., 70., 40., 40.},
88  {0, 0.7, 0.7, 0.1, 0.1},
89  {0, 0.7, 0.6, 0.40, 0.45},
90  {0, 2.5, 1.0, 1.0, 1.0},
91  {0, 1.5, 1.5, 0.5, 0.5}};
92  double MAX_M_LED[7][5] = {{0., 0., 0., 0., 0.},
93  {0., 0., 0., 0., 0.},
94  {0, 3000, 500000, 3000, 150000},
95  {0, 2.5, 2.5, 2.8, 2.6},
96  {0, 0.94, 0.95, 1.04, 1.02},
97  {0, 5.5, 5.2, 4.8, 4.2},
98  {0, 6.5, 6.5, 8.5, 8.5}};
99  double MIN_C_LED[7][5] = {{0., 0., 0., 0., 0.},
100  {0., 0., 0., 0., 0.},
101  {0, 1000., 1000., 1000., 100.},
102  {0, 1.3, 1.3, 0.7, 0.3},
103  {0, 0.76, 0.76, 0.85, 0.5},
104  {0, 2.4, 2.4, 1.5, 3.5},
105  {0, 1.5, 1.5, 1.5, 3.5}};
106  double MAX_C_LED[7][5] = {{0., 0., 0., 0., 0.},
107  {0., 0., 0., 0., 0.},
108  {0, 1E20, 1E20, 1E20, 1E20},
109  {0, 1.9, 1.9, 1.65, 1.5},
110  {0, 0.94, 0.94, 0.99, 0.8},
111  {0, 3.7, 3.7, 2.7, 4.5},
112  {0, 2.5, 2.5, 2.5, 4.5}};
113  double porog_LED[5] = {0., 2., 2., 2., 2.}; // Cut for GS test in pro cents
114  double Pedest_LED[2][5] = {{0., 0.1, 0.6, 0.1, 0.8},
115  {0., 0.1, 0.1, 0.1, 0.4}}; //Cuts for Pedestal and pedestal Width
116  for (int i = 0; i <= 6; i++)
117  for (int j = 0; j <= 4; j++) {
118  MIN_M[i][j] = MIN_M_LED[i][j];
119  MAX_M[i][j] = MAX_M_LED[i][j];
120  MIN_C[i][j] = MIN_C_LED[i][j];
121  MAX_C[i][j] = MAX_C_LED[i][j];
122  }
123  for (int i = 0; i <= 4; i++) {
124  porog[i] = porog_LED[i];
125  Pedest[0][i] = Pedest_LED[0][i];
126  Pedest[1][i] = Pedest_LED[1][i];
127  }
128  }
129 
130  if (runtype == "LASER") {
131  //CUTS: [test][subdetector] ADC amplitude Am Width for Wm Ratio cut for Rm TS mean for TNm TS max for TXm
132  double MIN_M_LASER[7][5] = {{0., 0., 0., 0., 0.},
133  {0., 0., 0., 0., 0.},
134  {0, 40., 40., 100., 40.},
135  {0, 0.3, 0.9, 0.2, 0.2},
136  {0, 0.5, 0.55, 0.55, 0.60},
137  {0, 5.0, 2.5, 1.1, 5.5},
138  {0, 1.5, 1.5, 1.5, 1.5}};
139  double MAX_M_LASER[7][5] = {{0., 0., 0., 0., 0.},
140  {0., 0., 0., 0., 0.},
141  {0, 3500, 350000, 3500, 150000},
142  {0, 2.5, 3.6, 2.6, 2.1},
143  {0, 1.00, 1.00, 1.04, 1.02},
144  {0, 7.5, 6.5, 4.4, 8.5},
145  {0, 8.5, 8.5, 6.5, 8.5}};
146  double MIN_C_LASER[7][5] = {{0., 0., 0., 0., 0.},
147  {0., 0., 0., 0., 0.},
148  {0, 1000., 1000., 1000., 100.},
149  {0, 1.3, 1.3, 0.7, 0.3},
150  {0, 0.76, 0.76, 0.85, 0.5},
151  {0, 2.4, 2.4, 1.5, 3.5},
152  {0, 1.5, 1.5, 1.5, 3.5}};
153  double MAX_C_LASER[7][5] = {{0., 0., 0., 0., 0.},
154  {0., 0., 0., 0., 0.},
155  {0, 1E20, 1E20, 1E20, 1E20},
156  {0, 1.9, 1.9, 1.65, 1.5},
157  {0, 0.94, 0.94, 1.0, 0.8},
158  {0, 3.7, 3.7, 2.7, 4.5},
159  {0, 2.5, 2.5, 2.5, 4.5}};
160  double porog_LASER[5] = {0., 2., 2., 2., 2.}; // Cut for GS test in pro cents
161  // double porog_LASER[5] = {0., 200., 200., 100., 100.}; // Cut for GS test in pro cents
162  double Pedest_LASER[2][5] = {{0., 0.1, 0.6, 0.1, 0.8},
163  {0., 0.1, 0.1, 0.1, 0.4}}; //Cuts for Pedestal and pedestal Width
164  for (int i = 0; i <= 6; i++)
165  for (int j = 0; j <= 4; j++) {
166  MIN_M[i][j] = MIN_M_LASER[i][j];
167  MAX_M[i][j] = MAX_M_LASER[i][j];
168  MIN_C[i][j] = MIN_C_LASER[i][j];
169  MAX_C[i][j] = MAX_C_LASER[i][j];
170  }
171  for (int i = 0; i <= 4; i++) {
172  porog[i] = porog_LASER[i];
173  Pedest[0][i] = Pedest_LASER[0][i];
174  Pedest[1][i] = Pedest_LASER[1][i];
175  }
176  }
177  if (runtype == "PEDESTAL") {
178  //CUTS: [test][subdetector] ADC amplitude Am Width for Wm Ratio cut for Rm TS mean for TNm TS max for TXm
179  double MIN_M_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
180  {0., 0., 0., 0., 0.},
181  {0, 10., 10., 200., 5.},
182  {0, 2.7, 2.7, 2.7, 0.2},
183  {0, 0.31, 0.31, 0.05, 0.15},
184  {0, 4.5, 4.5, 4.5, 2.0},
185  {0, 0.5, 0.5, 0.5, 0.5}};
186  double MAX_M_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
187  {0., 0., 0., 0., 0.},
188  {0, 2500., 250000., 2500., 150000.},
189  {0, 3.0, 3.0, 5.0, 3.0},
190  {0, 0.95, 0.95, 1.00, 0.98},
191  {0, 4.6, 4.6, 4.6, 7.0},
192  {0, 9.5, 9.5, 8.5, 8.5}};
193  double MIN_C_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
194  {0., 0., 0., 0., 0.},
195  {0, 1000., 1000., 1000., 100.},
196  {0, 1.3, 1.3, 0.7, 0.3},
197  {0, 0.76, 0.76, 0.85, 0.5},
198  {0, 2.4, 2.4, 1.5, 3.5},
199  {0, 1.5, 1.5, 1.5, 3.5}};
200  double MAX_C_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
201  {0., 0., 0., 0., 0.},
202  {0, 1E20, 1E20, 1E20, 1E20},
203  {0, 1.9, 1.9, 1.65, 1.5},
204  {0, 0.94, 0.94, 1.0, 0.8},
205  {0, 3.7, 3.7, 2.7, 4.5},
206  {0, 2.5, 2.5, 2.5, 4.5}};
207  double porog_PEDESTAL[5] = {0., 2., 2., 2., 2.}; // Cut for GS test in pro cents
208  // double porog_PEDESTAL[5] = {0., 200., 200., 100., 100.}; // Cut for GS test in pro cents
209  double Pedest_PEDESTAL[2][5] = {{0., 0.1, 0.6, 0.1, 0.8},
210  {0., 0.1, 0.1, 0.1, 0.4}}; //Cuts for Pedestal and pedestal Width
211  for (int i = 0; i <= 6; i++)
212  for (int j = 0; j <= 4; j++) {
213  MIN_M[i][j] = MIN_M_PEDESTAL[i][j];
214  MAX_M[i][j] = MAX_M_PEDESTAL[i][j];
215  MIN_C[i][j] = MIN_C_PEDESTAL[i][j];
216  MAX_C[i][j] = MAX_C_PEDESTAL[i][j];
217  }
218  for (int i = 0; i <= 4; i++) {
219  porog[i] = porog_PEDESTAL[i];
220  Pedest[0][i] = Pedest_PEDESTAL[0][i];
221  Pedest[1][i] = Pedest_PEDESTAL[1][i];
222  }
223  }
224 
225  //======================================================================
226 
227  cout << endl;
228  cout << MIN_M[2][1] << endl;
229 
230  //======================================================================
231  // Prepare histograms and plot them to .png files
232 
233  //TCanvas *cHB = new TCanvas("cHB","cHB",1000,500);
234  TCanvas *cHB = new TCanvas("cHB", "cHB", 1000, 1000);
235  //TCanvas *cHE = new TCanvas("cHE","cHE",1500,500);
236  TCanvas *cHE = new TCanvas("cHE", "cHE", 1500, 1500);
237  //TCanvas *cONE = new TCanvas("cONE","cONE",500,500);
238  TCanvas *cONE = new TCanvas("cONE", "cONE", 1500, 500);
239  TCanvas *cPED = new TCanvas("cPED", "cPED", 1000, 500);
240  //TCanvas *cHF = new TCanvas("cHF","cHF",1000,1000);
241  TCanvas *cHF = new TCanvas("cHF", "cHF", 1000, 1000);
242 
243  // Phi-symmetry for Calibration Group:
244 
245  TCanvas *c1x0 = new TCanvas("c1x0", "c1x0", 300, 10, 800, 700);
246 
247  TCanvas *c1x1 = new TCanvas("c1x1", "c1x1", 100, 10, 600, 700);
248 
249  TCanvas *c2x1 = new TCanvas("c2x1", "c2x1", 200, 300, 1600, 800);
250 
251  TCanvas *c3x5 = new TCanvas("c3x5", "c3x5", 1000, 1500);
252  //
253 
254  char *str = (char *)alloca(10000);
255 
256  // before upgrade 2017:
257  // depth: HB depth1,2; HE depth1,2,3; HO depth4; HF depth1,2
258  // 5 depthes: 0(empty), 1,2,3,4
259 
260  // upgrade 2017:
261  // depth: HB depth1,2; HE depth1,2,3,4,5,6,7; HO depth4; HF depth1,2,3,4
262  // 8 depthes: 0(empty), 1,2,3,4,5,6,7
263 
264  // upgrade 2021:
265  // depth: HB depth1,2,3,4; HE depth1,2,3,4,5,6,7; HO depth4; HF depth1,2,3,4
266  // 10 depthes: 0(empty), 1,2,3,4,5,6,7,8,9
267 
268  // Int_t ALLDEPTH = 5;
269  // Int_t ALLDEPTH = 8;
270  Int_t ALLDEPTH = 10;
271 
272  int k_min[5] = {0, 1, 1, 4, 1}; // minimum depth for each subdet
273  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
274  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
275  int k_max[5] = {0, 4, 7, 4, 4}; // maximum depth for each subdet
276 
277  TH2F *Map_Ampl[33][5][ALLDEPTH]; // 2D histogramm for test,subdet,depth
278  TH2F *Map_SUB[5][ALLDEPTH]; // 2d histogramm for subdet, depth
279  TH1F *HistAmplDepth[22][5][ALLDEPTH]; // 1d histogramm for test,subdet, depth
280  TH1F *HistAmpl[22][5]; // 1d histogramm for test,subdet
281  TH2F *Map_SUBTS[5][ALLDEPTH]; // 2d histogramm for subdet, depth in different TSs
282 
283  TH1F *HistPed[3][5][4]; // 1d histogramm for test,subdet, CapID
284  TH2F *Map_Ped[3][5]; // 2d histogramm for test,subdet -> test 33
285  TH1F *hist_GoodTSshape[5]; // 1d histogramm for TS shape subdet -> test 41
286  TH1F *hist_GoodTSshape0[5]; // 1d histogramm for TS shape subdet -> test 41
287  TH1F *hist_BadTSshape[5]; // 1d histogramm for TS shape subdet -> test 41
288  TH1F *hist_BadTSshape0[5]; // 1d histogramm for TS shape subdet -> test 41
289  TH1F *hist_ADC_All[5]; // 1d histogramm for TS shape subdet -> test 42
290  TH1F *hist_ADC_DS[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 42
291  TH1F *hist_SumADC[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 43
292  TH1F *hist_SumADC0[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 43
293  TH1F *hist_SumADC1[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 43
294 
295  Map_SUB[1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1_HB");
296  Map_SUB[1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2_HB");
297  Map_SUB[2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1_HE");
298  Map_SUB[2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2_HE");
299  Map_SUB[2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3_HE");
300  Map_SUB[3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4_HO");
301  Map_SUB[4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1_HF");
302  Map_SUB[4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2_HF");
303 
304  Map_SUB[1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3_HB");
305  Map_SUB[1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4_HB");
306  Map_SUB[2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4_HE");
307  Map_SUB[2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5_HE");
308  Map_SUB[2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6_HE");
309  Map_SUB[2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7_HE");
310  Map_SUB[4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3_HF");
311  Map_SUB[4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4_HF");
312 
313  //+++++++++++++++++++++++++++++
314  //Test 0 Entries
315  //+++++++++++++++++++++++++++++
316 
317  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
318  // if (sub==1) cHB->Divide(2,1);
319  if (sub == 1)
320  cHB->Divide(2, 2);
321  // if (sub==2) cHE->Divide(3,1);
322  if (sub == 2)
323  cHE->Divide(3, 3);
324  if (sub == 3)
325  cONE->Divide(1, 1);
326  // if (sub==4) cHF->Divide(2,1);
327  if (sub == 4)
328  cHF->Divide(2, 2);
329  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
330  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
331  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
332  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
333  if (sub == 1)
334  cHB->cd(k);
335  if (sub == 2)
336  cHE->cd(k);
337  if (sub == 3)
338  cONE->cd(k - 3);
339  if (sub == 4)
340  cHF->cd(k);
341  gPad->SetGridy();
342  gPad->SetGridx();
343  gPad->SetLogz();
344  if (sub == 1)
345  sprintf(str, "HB, Depth%d \b", k);
346  if (sub == 2)
347  sprintf(str, "HE, Depth%d \b", k);
348  if (sub == 3)
349  sprintf(str, "HO, Depth%d \b", k);
350  if (sub == 4)
351  sprintf(str, "HF, Depth%d \b", k);
352  Map_SUB[sub][k]->SetTitle(str);
353  Map_SUB[sub][k]->SetXTitle("#eta \b");
354  Map_SUB[sub][k]->SetYTitle("#phi \b");
355  Map_SUB[sub][k]->SetZTitle("Number of events \b");
356  if (sub == 3)
357  Map_SUB[sub][k]->SetTitleOffset(0.8, "Z");
358  Map_SUB[sub][k]->Draw("COLZ");
359  Map_SUB[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
360  // Map_SUB[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
361  if (sub == 1) {
362  cHB->Modified();
363  cHB->Update();
364  }
365  if (sub == 2) {
366  cHE->Modified();
367  cHE->Update();
368  }
369  if (sub == 3) {
370  cONE->Modified();
371  cONE->Update();
372  }
373  if (sub == 4) {
374  cHF->Modified();
375  cHF->Update();
376  }
377  } //end depth
378 
379  if (sub == 1) {
380  cHB->Print("MapRateEntryHB.png");
381  cHB->Clear();
382  }
383  if (sub == 2) {
384  cHE->Print("MapRateEntryHE.png");
385  cHE->Clear();
386  }
387  if (sub == 3) {
388  cONE->Print("MapRateEntryHO.png");
389  cONE->Clear();
390  }
391  if (sub == 4) {
392  cHF->Print("MapRateEntryHF.png");
393  cHF->Clear();
394  }
395  } // end sub
396 
397  //+++++++++++++++++++++++++++++
398  //Test 1 (Cm) Rate of Cap ID errors
399  //+++++++++++++++++++++++++++++
400 
401  Map_Ampl[1][1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1Error_HB");
402  Map_Ampl[1][1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2Error_HB");
403  Map_Ampl[1][2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1Error_HE");
404  Map_Ampl[1][2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2Error_HE");
405  Map_Ampl[1][2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3Error_HE");
406  Map_Ampl[1][3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Error_HO");
407  Map_Ampl[1][4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1Error_HF");
408  Map_Ampl[1][4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2Error_HF");
409 
410  Map_Ampl[1][1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3Error_HB");
411  Map_Ampl[1][1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Error_HB");
412  Map_Ampl[1][2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Error_HE");
413  Map_Ampl[1][2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5Error_HE");
414  Map_Ampl[1][2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6Error_HE");
415  Map_Ampl[1][2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7Error_HE");
416  Map_Ampl[1][4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3Error_HF");
417  Map_Ampl[1][4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Error_HF");
418 
419  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
420  // if (sub==1) cHB->Divide(2,1);
421  if (sub == 1)
422  cHB->Divide(2, 2);
423  // if (sub==2) cHE->Divide(3,1);
424  if (sub == 2)
425  cHE->Divide(3, 3);
426  if (sub == 3)
427  cONE->Divide(1, 1);
428  // if (sub==4) cHF->Divide(2,1);
429  if (sub == 4)
430  cHF->Divide(2, 2);
431  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
432  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
433  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
434  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
435  if (sub == 1)
436  cHB->cd(k);
437  if (sub == 2)
438  cHE->cd(k);
439  if (sub == 3)
440  cONE->cd(k - 3);
441  if (sub == 4)
442  cHF->cd(k);
443  Map_Ampl[1][sub][k]->Divide(Map_Ampl[1][sub][k], Map_SUB[sub][k], 1, 1, "B");
444  gPad->SetGridy();
445  gPad->SetGridx();
446  gPad->SetLogz();
447  if (sub == 1)
448  sprintf(str, "HB, Depth%d \b", k);
449  if (sub == 2)
450  sprintf(str, "HE, Depth%d \b", k);
451  if (sub == 3)
452  sprintf(str, "HO, Depth%d \b", k);
453  if (sub == 4)
454  sprintf(str, "HF, Depth%d \b", k);
455  Map_Ampl[1][sub][k]->SetTitle(str);
456  Map_Ampl[1][sub][k]->SetXTitle("#eta \b");
457  Map_Ampl[1][sub][k]->SetYTitle("#phi \b");
458  Map_Ampl[1][sub][k]->SetZTitle("Rate \b");
459  if (sub == 3)
460  Map_Ampl[1][sub][k]->SetTitleOffset(0.8, "Z");
461  Map_Ampl[1][sub][k]->Draw("COLZ");
462  Map_Ampl[1][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
463  Map_Ampl[1][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
464  if (sub == 1) {
465  cHB->Modified();
466  cHB->Update();
467  }
468  if (sub == 2) {
469  cHE->Modified();
470  cHE->Update();
471  }
472  if (sub == 3) {
473  cONE->Modified();
474  cONE->Update();
475  }
476  if (sub == 4) {
477  cHF->Modified();
478  cHF->Update();
479  }
480  } //end depth
481 
482  if (sub == 1) {
483  cHB->Print("MapRateCapIDHB.png");
484  cHB->Clear();
485  }
486  if (sub == 2) {
487  cHE->Print("MapRateCapIDHE.png");
488  cHE->Clear();
489  }
490  if (sub == 3) {
491  cONE->Print("MapRateCapIDHO.png");
492  cONE->Clear();
493  }
494  if (sub == 4) {
495  cHF->Print("MapRateCapIDHF.png");
496  cHF->Clear();
497  }
498  } // end sub
499 
500  //+++++++++++++++++++++++++++++
501  //Test 2 (Am) ADC amplitude
502  //+++++++++++++++++++++++++++++
503 
504  Map_Ampl[2][1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1ADCAmpl225_HB");
505  Map_Ampl[2][1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2ADCAmpl225_HB");
506  Map_Ampl[2][2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1ADCAmpl225_HE");
507  Map_Ampl[2][2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2ADCAmpl225_HE");
508  Map_Ampl[2][2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3ADCAmpl225_HE");
509  Map_Ampl[2][3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4ADCAmpl225_HO");
510  Map_Ampl[2][4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1ADCAmpl225_HF");
511  Map_Ampl[2][4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2ADCAmpl225_HF");
512 
513  Map_Ampl[2][1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3ADCAmpl225_HB");
514  Map_Ampl[2][1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4ADCAmpl225_HB");
515  Map_Ampl[2][2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4ADCAmpl225_HE");
516  Map_Ampl[2][2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5ADCAmpl225_HE");
517  Map_Ampl[2][2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6ADCAmpl225_HE");
518  Map_Ampl[2][2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7ADCAmpl225_HE");
519  Map_Ampl[2][4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3ADCAmpl225_HF");
520  Map_Ampl[2][4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4ADCAmpl225_HF");
521 
522  HistAmpl[2][1] = (TH1F *)dir->FindObjectAny("h_ADCAmpl_HB");
523  HistAmpl[2][2] = (TH1F *)dir->FindObjectAny("h_ADCAmpl_HE");
524  HistAmpl[2][3] = (TH1F *)dir->FindObjectAny("h_ADCAmpl_HO");
525  HistAmpl[2][4] = (TH1F *)dir->FindObjectAny("h_ADCAmpl_HF");
526 
527  //+++++++++++++++++++++++++++++
528  //Test 3 (Wm) Rate of RMS
529  //+++++++++++++++++++++++++++++
530 
531  Map_Ampl[3][1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1Amplitude225_HB");
532  Map_Ampl[3][1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2Amplitude225_HB");
533  Map_Ampl[3][2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1Amplitude225_HE");
534  Map_Ampl[3][2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2Amplitude225_HE");
535  Map_Ampl[3][2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3Amplitude225_HE");
536  Map_Ampl[3][3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Amplitude225_HO");
537  Map_Ampl[3][4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1Amplitude225_HF");
538  Map_Ampl[3][4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2Amplitude225_HF");
539 
540  Map_Ampl[3][1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3Amplitude225_HB");
541  Map_Ampl[3][1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Amplitude225_HB");
542  Map_Ampl[3][2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Amplitude225_HE");
543  Map_Ampl[3][2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5Amplitude225_HE");
544  Map_Ampl[3][2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6Amplitude225_HE");
545  Map_Ampl[3][2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7Amplitude225_HE");
546  Map_Ampl[3][4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3Amplitude225_HF");
547  Map_Ampl[3][4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Amplitude225_HF");
548 
549  HistAmpl[3][1] = (TH1F *)dir->FindObjectAny("h_Amplitude_HB");
550  HistAmpl[3][2] = (TH1F *)dir->FindObjectAny("h_Amplitude_HE");
551  HistAmpl[3][3] = (TH1F *)dir->FindObjectAny("h_Amplitude_HO");
552  HistAmpl[3][4] = (TH1F *)dir->FindObjectAny("h_Amplitude_HF");
553 
554  //+++++++++++++++++++++++++++++
555  //Test 4 (Rm) Rate of ratio 4 near max TS/ All TS
556  //+++++++++++++++++++++++++++++
557 
558  Map_Ampl[4][1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1Ampl047_HB");
559  Map_Ampl[4][1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2Ampl047_HB");
560  Map_Ampl[4][2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1Ampl047_HE");
561  Map_Ampl[4][2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2Ampl047_HE");
562  Map_Ampl[4][2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3Ampl047_HE");
563  Map_Ampl[4][3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Ampl047_HO");
564  Map_Ampl[4][4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1Ampl047_HF");
565  Map_Ampl[4][4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2Ampl047_HF");
566 
567  Map_Ampl[4][1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3Ampl047_HB");
568  Map_Ampl[4][1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Ampl047_HB");
569  Map_Ampl[4][2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Ampl047_HE");
570  Map_Ampl[4][2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5Ampl047_HE");
571  Map_Ampl[4][2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6Ampl047_HE");
572  Map_Ampl[4][2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7Ampl047_HE");
573  Map_Ampl[4][4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3Ampl047_HF");
574  Map_Ampl[4][4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4Ampl047_HF");
575 
576  HistAmpl[4][1] = (TH1F *)dir->FindObjectAny("h_Ampl_HB");
577  HistAmpl[4][2] = (TH1F *)dir->FindObjectAny("h_Ampl_HE");
578  HistAmpl[4][3] = (TH1F *)dir->FindObjectAny("h_Ampl_HO");
579  HistAmpl[4][4] = (TH1F *)dir->FindObjectAny("h_Ampl_HF");
580 
581  //+++++++++++++++++++++++++++++
582  //Test 5 (TNm) Mean position in 1-8 TS range
583  //+++++++++++++++++++++++++++++
584 
585  Map_Ampl[5][1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA225_HB");
586  Map_Ampl[5][1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA225_HB");
587  Map_Ampl[5][2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA225_HE");
588  Map_Ampl[5][2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA225_HE");
589  Map_Ampl[5][2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA225_HE");
590  Map_Ampl[5][3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA225_HO");
591  Map_Ampl[5][4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA225_HF");
592  Map_Ampl[5][4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA225_HF");
593 
594  Map_Ampl[5][1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA225_HB");
595  Map_Ampl[5][1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA225_HB");
596  Map_Ampl[5][2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA225_HE");
597  Map_Ampl[5][2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5TSmeanA225_HE");
598  Map_Ampl[5][2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6TSmeanA225_HE");
599  Map_Ampl[5][2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7TSmeanA225_HE");
600  Map_Ampl[5][4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA225_HF");
601  Map_Ampl[5][4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA225_HF");
602 
603  HistAmpl[5][1] = (TH1F *)dir->FindObjectAny("h_TSmeanA_HB");
604  HistAmpl[5][2] = (TH1F *)dir->FindObjectAny("h_TSmeanA_HE");
605  HistAmpl[5][3] = (TH1F *)dir->FindObjectAny("h_TSmeanA_HO");
606  HistAmpl[5][4] = (TH1F *)dir->FindObjectAny("h_TSmeanA_HF");
607 
608  //+++++++++++++++++++++++++++++
609  //Test 6 (TXm) Maximum position in 1-8 TS range
610  //+++++++++++++++++++++++++++++
611 
612  Map_Ampl[6][1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmaxA225_HB");
613  Map_Ampl[6][1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmaxA225_HB");
614  Map_Ampl[6][2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmaxA225_HE");
615  Map_Ampl[6][2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmaxA225_HE");
616  Map_Ampl[6][2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmaxA225_HE");
617  Map_Ampl[6][3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmaxA225_HO");
618  Map_Ampl[6][4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmaxA225_HF");
619  Map_Ampl[6][4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmaxA225_HF");
620 
621  Map_Ampl[6][1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmaxA225_HB");
622  Map_Ampl[6][1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmaxA225_HB");
623  Map_Ampl[6][2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmaxA225_HE");
624  Map_Ampl[6][2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5TSmaxA225_HE");
625  Map_Ampl[6][2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6TSmaxA225_HE");
626  Map_Ampl[6][2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7TSmaxA225_HE");
627  Map_Ampl[6][4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmaxA225_HF");
628  Map_Ampl[6][4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmaxA225_HF");
629 
630  HistAmpl[6][1] = (TH1F *)dir->FindObjectAny("h_TSmaxA_HB");
631  HistAmpl[6][2] = (TH1F *)dir->FindObjectAny("h_TSmaxA_HE");
632  HistAmpl[6][3] = (TH1F *)dir->FindObjectAny("h_TSmaxA_HO");
633  HistAmpl[6][4] = (TH1F *)dir->FindObjectAny("h_TSmaxA_HF");
634 
635  for (int test = 2; test <= 6; test++) { //Test: 2-Am, 3-Wm, 4-Rm, 5-TNm, 6-TXm,
636  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
637  // if (sub==1) cHB->Divide(2,1);
638  if (sub == 1)
639  cHB->Divide(2, 2);
640  // if (sub==2) cHE->Divide(3,1);
641  if (sub == 2)
642  cHE->Divide(3, 3);
643  if (sub == 3)
644  cONE->Divide(1, 1);
645  // if (sub==4) cHF->Divide(2,1);
646  if (sub == 4)
647  cHF->Divide(2, 2);
648  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
649  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
650  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
651  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
652  if (sub == 1)
653  cHB->cd(k);
654  if (sub == 2)
655  cHE->cd(k);
656  if (sub == 3)
657  cONE->cd(k - 3);
658  if (sub == 4)
659  cHF->cd(k);
660  Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_SUB[sub][k], 1, 1, "B");
661  gPad->SetGridy();
662  gPad->SetGridx();
663  gPad->SetLogz();
664  if (sub == 1)
665  sprintf(str, "HB, Depth%d \b", k);
666  if (sub == 2)
667  sprintf(str, "HE, Depth%d \b", k);
668  if (sub == 3)
669  sprintf(str, "HO, Depth%d \b", k);
670  if (sub == 4)
671  sprintf(str, "HF, Depth%d \b", k);
672  Map_Ampl[test][sub][k]->SetTitle(str);
673  Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
674  Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
675  Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
676  if (sub == 3)
677  Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
678  Map_Ampl[test][sub][k]->Draw("COLZ");
679  Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
680  Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
681  if (sub == 1) {
682  cHB->Modified();
683  cHB->Update();
684  }
685  if (sub == 2) {
686  cHE->Modified();
687  cHE->Update();
688  }
689  if (sub == 3) {
690  cONE->Modified();
691  cONE->Update();
692  }
693  if (sub == 4) {
694  cHF->Modified();
695  cHF->Update();
696  }
697  } //end depth
698  if (test == 2) {
699  if (sub == 1) {
700  cHB->Print("MapRateAmplHB.png");
701  cHB->Clear();
702  }
703  if (sub == 2) {
704  cHE->Print("MapRateAmplHE.png");
705  cHE->Clear();
706  }
707  if (sub == 3) {
708  cONE->Print("MapRateAmplHO.png");
709  cONE->Clear();
710  }
711  if (sub == 4) {
712  cHF->Print("MapRateAmplHF.png");
713  cHF->Clear();
714  }
715  }
716  if (test == 3) {
717  if (sub == 1) {
718  cHB->Print("MapRateRMSHB.png");
719  cHB->Clear();
720  }
721  if (sub == 2) {
722  cHE->Print("MapRateRMSHE.png");
723  cHE->Clear();
724  }
725  if (sub == 3) {
726  cONE->Print("MapRateRMSHO.png");
727  cONE->Clear();
728  }
729  if (sub == 4) {
730  cHF->Print("MapRateRMSHF.png");
731  cHF->Clear();
732  }
733  }
734  if (test == 4) {
735  if (sub == 1) {
736  cHB->Print("MapRate43TStoAllTSHB.png");
737  cHB->Clear();
738  }
739  if (sub == 2) {
740  cHE->Print("MapRate43TStoAllTSHE.png");
741  cHE->Clear();
742  }
743  if (sub == 3) {
744  cONE->Print("MapRate43TStoAllTSHO.png");
745  cONE->Clear();
746  }
747  if (sub == 4) {
748  cHF->Print("MapRate43TStoAllTSHF.png");
749  cHF->Clear();
750  }
751  }
752  if (test == 5) {
753  if (sub == 1) {
754  cHB->Print("MapRateMeanPosHB.png");
755  cHB->Clear();
756  }
757  if (sub == 2) {
758  cHE->Print("MapRateMeanPosHE.png");
759  cHE->Clear();
760  }
761  if (sub == 3) {
762  cONE->Print("MapRateMeanPosHO.png");
763  cONE->Clear();
764  }
765  if (sub == 4) {
766  cHF->Print("MapRateMeanPosHF.png");
767  cHF->Clear();
768  }
769  }
770  if (test == 6) {
771  if (sub == 1) {
772  cHB->Print("MapRateMaxPosHB.png");
773  cHB->Clear();
774  }
775  if (sub == 2) {
776  cHE->Print("MapRateMaxPosHE.png");
777  cHE->Clear();
778  }
779  if (sub == 3) {
780  cONE->Print("MapRateMaxPosHO.png");
781  cONE->Clear();
782  }
783  if (sub == 4) {
784  cHF->Print("MapRateMaxPosHF.png");
785  cHF->Clear();
786  }
787  }
788 
789  // cONE->Divide(1,1);
790  cONE->Divide(3, 1);
791  if (test == 2 && sub == 2) {
792  cONE->cd(2);
793  TH1F *kjkjkhj2 = (TH1F *)dir->FindObjectAny("h_AmplitudeHEtest1");
794  kjkjkhj2->Draw("");
795  kjkjkhj2->SetTitle("HE, All Depth: shunt1");
796  cONE->cd(3);
797  TH1F *kjkjkhj3 = (TH1F *)dir->FindObjectAny("h_AmplitudeHEtest6");
798  kjkjkhj3->Draw("");
799  kjkjkhj3->SetTitle("HE, All Depth: shunt6");
800  }
801  if (test == 2 && sub == 1) {
802  cONE->cd(2);
803  TH1F *kjkjkhb2 = (TH1F *)dir->FindObjectAny("h_AmplitudeHBtest1");
804  kjkjkhb2->Draw("");
805  kjkjkhb2->SetTitle("HB, All Depth: shunt1");
806  cONE->cd(3);
807  TH1F *kjkjkhb3 = (TH1F *)dir->FindObjectAny("h_AmplitudeHBtest6");
808  kjkjkhb3->Draw("");
809  kjkjkhb3->SetTitle("HB, All Depth: shunt6");
810  }
811  cONE->cd(1);
812  gPad->SetGridy();
813  gPad->SetGridx();
814  gPad->SetLogy();
815  if (sub == 1)
816  HistAmpl[test][sub]->SetTitle("HB, All Depth: shunt6");
817  if (sub == 2)
818  HistAmpl[test][sub]->SetTitle("HE, All Depth: shunt6");
819  if (sub == 3)
820  HistAmpl[test][sub]->SetTitle("HO, All Depth");
821  if (sub == 4)
822  HistAmpl[test][sub]->SetTitle("HF, All Depth");
823  if (test == 2)
824  HistAmpl[test][sub]->SetXTitle("ADC Amlitude in each event & cell \b");
825  if (test == 3)
826  HistAmpl[test][sub]->SetXTitle("RMS in each event & cell \b");
827  if (test == 4)
828  HistAmpl[test][sub]->SetXTitle("Ratio in each event & cell \b");
829  if (test == 5)
830  HistAmpl[test][sub]->SetXTitle("Mean TS position in each event & cell \b");
831  if (test == 6)
832  HistAmpl[test][sub]->SetXTitle("Max TS position in each event & cell \b");
833  HistAmpl[test][sub]->SetYTitle("Number of cell-events \b");
834  HistAmpl[test][sub]->SetLineColor(4);
835  HistAmpl[test][sub]->SetLineWidth(2);
836  HistAmpl[test][sub]->SetTitleOffset(1.4, "Y");
837  HistAmpl[test][sub]->Draw("");
838  // // HistAmpl[test][sub]->GetYaxis()->SetRangeUser(1., 100.);
839  // if (test==2) {gPad->SetLogx(); HistAmpl[test][sub]->GetXaxis()->SetRangeUser(1., 10000.);}
840  if (test == 2) {
841  gPad->SetLogx();
842  }
843  if (test == 3)
844  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 5.); // width
845  if (test == 4)
846  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 1.); // R
847  if (test == 5)
848  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.); //Tn
849  if (test == 6)
850  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.); //Tx
851  cONE->Modified();
852  cONE->Update();
853  double min_x[] = {MIN_M[test][sub], MIN_M[test][sub]};
854  double min_y[] = {0., 100000000.};
855  TGraph *MIN = new TGraph(2, min_x, min_y);
856  MIN->SetLineStyle(2);
857  MIN->SetLineColor(2);
858  MIN->SetLineWidth(2 + 100 * 100);
859  MIN->SetFillStyle(3005);
860  MIN->SetFillColor(2);
861  MIN->Draw("L");
862  double max_x[] = {MAX_M[test][sub], MAX_M[test][sub]};
863  double max_y[] = {0., 100000000.};
864  TGraph *MAX = new TGraph(2, max_x, max_y);
865  MAX->SetLineStyle(2);
866  MAX->SetLineColor(2);
867  MAX->SetLineWidth(-2 - 100 * 100);
868  MAX->SetFillStyle(3004);
869  MAX->SetFillColor(2);
870  MAX->Draw("L");
871  if (test == 2) {
872  if (sub == 1) {
873  cONE->Print("HistAmplHB.png");
874  cONE->Clear();
875  }
876  if (sub == 2) {
877  cONE->Print("HistAmplHE.png");
878  cONE->Clear();
879  }
880  if (sub == 3) {
881  cONE->Print("HistAmplHO.png");
882  cONE->Clear();
883  }
884  if (sub == 4) {
885  cONE->Print("HistAmplHF.png");
886  cONE->Clear();
887  }
888  }
889  if (test == 3) {
890  if (sub == 1) {
891  cONE->Print("HistRMSHB.png");
892  cONE->Clear();
893  }
894  if (sub == 2) {
895  cONE->Print("HistRMSHE.png");
896  cONE->Clear();
897  }
898  if (sub == 3) {
899  cONE->Print("HistRMSHO.png");
900  cONE->Clear();
901  }
902  if (sub == 4) {
903  cONE->Print("HistRMSHF.png");
904  cONE->Clear();
905  }
906  }
907  if (test == 4) {
908  if (sub == 1) {
909  cONE->Print("Hist43TStoAllTSHB.png");
910  cONE->Clear();
911  }
912  if (sub == 2) {
913  cONE->Print("Hist43TStoAllTSHE.png");
914  cONE->Clear();
915  }
916  if (sub == 3) {
917  cONE->Print("Hist43TStoAllTSHO.png");
918  cONE->Clear();
919  }
920  if (sub == 4) {
921  cONE->Print("Hist43TStoAllTSHF.png");
922  cONE->Clear();
923  }
924  }
925  if (test == 5) {
926  if (sub == 1) {
927  cONE->Print("HistMeanPosHB.png");
928  cONE->Clear();
929  }
930  if (sub == 2) {
931  cONE->Print("HistMeanPosHE.png");
932  cONE->Clear();
933  }
934  if (sub == 3) {
935  cONE->Print("HistMeanPosHO.png");
936  cONE->Clear();
937  }
938  if (sub == 4) {
939  cONE->Print("HistMeanPosHF.png");
940  cONE->Clear();
941  }
942  }
943  if (test == 6) {
944  if (sub == 1) {
945  cONE->Print("HistMaxPosHB.png");
946  cONE->Clear();
947  }
948  if (sub == 2) {
949  cONE->Print("HistMaxPosHE.png");
950  cONE->Clear();
951  }
952  if (sub == 3) {
953  cONE->Print("HistMaxPosHO.png");
954  cONE->Clear();
955  }
956  if (sub == 4) {
957  cONE->Print("HistMaxPosHF.png");
958  cONE->Clear();
959  }
960  }
961  } // end sub
962  } //end test
963 
964  TH2F *Map_Calib[5][5]; // 2d histogramm for subdet, depth
965 
966  Map_Calib[1][1] = (TH2F *)dir->FindObjectAny("h_map_HB");
967  Map_Calib[1][2] = (TH2F *)dir->FindObjectAny("h_map_HB");
968  Map_Calib[2][1] = (TH2F *)dir->FindObjectAny("h_map_HE");
969  Map_Calib[2][2] = (TH2F *)dir->FindObjectAny("h_map_HE");
970  Map_Calib[2][3] = (TH2F *)dir->FindObjectAny("h_map_HE");
971  Map_Calib[3][4] = (TH2F *)dir->FindObjectAny("h_map_HO");
972  Map_Calib[4][1] = (TH2F *)dir->FindObjectAny("h_map_HF");
973  Map_Calib[4][2] = (TH2F *)dir->FindObjectAny("h_map_HF");
974 
975  //+++++++++++++++++++++++++++++
976  //Test 0 Entries
977  //+++++++++++++++++++++++++++++
978 
979  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
980  // if (sub==1) cHB->Divide(2,1);
981  // if (sub==2) cHE->Divide(3,1);
982  cONE->Divide(1, 1);
983  // if (sub==4) cHB->Divide(2,1);
984  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
985  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
986  // for (int k=k_min[sub];k<=k_max[sub];k++) { //Depth
987  int k = 1;
988  cONE->cd(k);
989  // if (sub==1) cHB->cd(k);
990  // if (sub==2) cHE->cd(k);
991  if (sub == 3)
992  k = 4;
993  // if (sub==4) cHB->cd(k);
994  gPad->SetGridy();
995  gPad->SetGridx();
996  gPad->SetLogz();
997  if (sub == 1)
998  sprintf(str, "HB");
999  if (sub == 2)
1000  sprintf(str, "HE");
1001  if (sub == 3)
1002  sprintf(str, "HO");
1003  if (sub == 4)
1004  sprintf(str, "HF");
1005  Map_Calib[sub][k]->SetTitle(str);
1006  Map_Calib[sub][k]->SetXTitle("#eta \b");
1007  Map_Calib[sub][k]->SetYTitle("#phi \b");
1008  Map_Calib[sub][k]->SetZTitle("Number of events\b");
1009  if (sub == 3)
1010  Map_Calib[sub][k]->SetTitleOffset(0.8, "Z");
1011  Map_Calib[sub][k]->Draw("COLZ");
1012  Map_Calib[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1013  // Map_Calib[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
1014  // if (sub==1) {cHB->Modified(); cHB->Update();}
1015  // if (sub==2) {cHE->Modified(); cHE->Update();}
1016  cONE->Modified();
1017  cONE->Update();
1018  // if (sub==4) {cHB->Modified(); cHB->Update();}
1019  // }//end depth
1020 
1021  if (sub == 1) {
1022  cONE->Print("MapRateCalibEntryHB.png");
1023  cONE->Clear();
1024  }
1025  if (sub == 2) {
1026  cONE->Print("MapRateCalibEntryHE.png");
1027  cONE->Clear();
1028  }
1029  if (sub == 3) {
1030  cONE->Print("MapRateCalibEntryHO.png");
1031  cONE->Clear();
1032  }
1033  if (sub == 4) {
1034  cONE->Print("MapRateCalibEntryHF.png");
1035  cONE->Clear();
1036  }
1037  } // end sub
1038 
1039  //+++++++++++++++++++++++++++++
1040  //Test 11 (Cc) Rate of Cap ID errors for calibration channels
1041  //+++++++++++++++++++++++++++++
1042 
1043  Map_Ampl[11][1][1] = (TH2F *)dir->FindObjectAny("h_mapCapCalib047_HB");
1044  Map_Ampl[11][1][2] = (TH2F *)dir->FindObjectAny("h_mapCapCalib047_HB");
1045  Map_Ampl[11][2][1] = (TH2F *)dir->FindObjectAny("h_mapCapCalib047_HE");
1046  Map_Ampl[11][2][2] = (TH2F *)dir->FindObjectAny("h_mapCapCalib047_HE");
1047  Map_Ampl[11][2][3] = (TH2F *)dir->FindObjectAny("h_mapCapCalib047_HE");
1048  Map_Ampl[11][3][4] = (TH2F *)dir->FindObjectAny("h_mapCapCalib047_HO");
1049  Map_Ampl[11][4][1] = (TH2F *)dir->FindObjectAny("h_mapCapCalib047_HF");
1050  Map_Ampl[11][4][2] = (TH2F *)dir->FindObjectAny("h_mapCapCalib047_HF");
1051 
1052  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
1053  // if (sub==1) cHB->Divide(2,1);
1054  // if (sub==2) cHE->Divide(3,1);
1055  cONE->Divide(1, 1);
1056  // if (sub==4) cHB->Divide(2,1);
1057  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1058  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1059  // for (int k=k_min[sub];k<=k_max[sub];k++) { //Depth
1060  int k = 1;
1061  cONE->cd(k);
1062  // if (sub==1) cHB->cd(k);
1063  // if (sub==2) cHE->cd(k);
1064  if (sub == 3)
1065  k = 4;
1066  // if (sub==4) cHB->cd(k);
1067  Map_Ampl[11][sub][k]->Divide(Map_Ampl[11][sub][k], Map_Calib[sub][k], 1, 1, "B");
1068  gPad->SetGridy();
1069  gPad->SetGridx();
1070  gPad->SetLogz();
1071  if (sub == 1)
1072  sprintf(str, "HB");
1073  if (sub == 2)
1074  sprintf(str, "HE");
1075  if (sub == 3)
1076  sprintf(str, "HO");
1077  if (sub == 4)
1078  sprintf(str, "HF");
1079  Map_Ampl[11][sub][k]->SetTitle(str);
1080  Map_Ampl[11][sub][k]->SetXTitle("#eta \b");
1081  Map_Ampl[11][sub][k]->SetYTitle("#phi \b");
1082  Map_Ampl[11][sub][k]->SetZTitle("Rate \b");
1083  Map_Ampl[11][sub][k]->SetTitleOffset(0.75, "Z");
1084  Map_Ampl[11][sub][k]->Draw("COLZ");
1085  Map_Ampl[11][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1086  Map_Ampl[11][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
1087  // if (sub==1) {cHB->Modified(); cHB->Update();}
1088  // if (sub==2) {cHE->Modified(); cHE->Update();}
1089  cONE->Modified();
1090  cONE->Update();
1091  // if (sub==4) {cHB->Modified(); cHB->Update();}
1092  // }//end depth
1093 
1094  if (sub == 1) {
1095  cONE->Print("MapRateCapCalibHB.png");
1096  cONE->Clear();
1097  }
1098  if (sub == 2) {
1099  cONE->Print("MapRateCapCalibHE.png");
1100  cONE->Clear();
1101  }
1102  if (sub == 3) {
1103  cONE->Print("MapRateCapCalibHO.png");
1104  cONE->Clear();
1105  }
1106  if (sub == 4) {
1107  cONE->Print("MapRateCapCalibHF.png");
1108  cONE->Clear();
1109  }
1110  } // end sub
1111 
1112  //+++++++++++++++++++++++++++++
1113  //Test 12 (Ac) ADC amplitude for calibration chanels
1114  //+++++++++++++++++++++++++++++
1115 
1116  Map_Ampl[12][1][1] = (TH2F *)dir->FindObjectAny("h_mapADCCalib047_HB");
1117  Map_Ampl[12][1][2] = (TH2F *)dir->FindObjectAny("h_mapADCCalib047_HB");
1118  Map_Ampl[12][2][1] = (TH2F *)dir->FindObjectAny("h_mapADCCalib047_HE");
1119  Map_Ampl[12][2][2] = (TH2F *)dir->FindObjectAny("h_mapADCCalib047_HE");
1120  Map_Ampl[12][2][3] = (TH2F *)dir->FindObjectAny("h_mapADCCalib047_HE");
1121  Map_Ampl[12][3][4] = (TH2F *)dir->FindObjectAny("h_mapADCCalib047_HO");
1122  Map_Ampl[12][4][1] = (TH2F *)dir->FindObjectAny("h_mapADCCalib047_HF");
1123  Map_Ampl[12][4][2] = (TH2F *)dir->FindObjectAny("h_mapADCCalib047_HF");
1124 
1125  HistAmpl[12][1] = (TH1F *)dir->FindObjectAny("h_ADCCalib_HB");
1126  HistAmpl[12][2] = (TH1F *)dir->FindObjectAny("h_ADCCalib_HE");
1127  HistAmpl[12][3] = (TH1F *)dir->FindObjectAny("h_ADCCalib_HO");
1128  HistAmpl[12][4] = (TH1F *)dir->FindObjectAny("h_ADCCalib_HF");
1129 
1130  //+++++++++++++++++++++++++++++
1131  //Test 13 (Wc) Rate of RMS
1132  //+++++++++++++++++++++++++++++
1133 
1134  Map_Ampl[13][1][1] = (TH2F *)dir->FindObjectAny("h_mapWidthCalib047_HB");
1135  Map_Ampl[13][1][2] = (TH2F *)dir->FindObjectAny("h_mapWidthCalib047_HB");
1136  Map_Ampl[13][2][1] = (TH2F *)dir->FindObjectAny("h_mapWidthCalib047_HE");
1137  Map_Ampl[13][2][2] = (TH2F *)dir->FindObjectAny("h_mapWidthCalib047_HE");
1138  Map_Ampl[13][2][3] = (TH2F *)dir->FindObjectAny("h_mapWidthCalib047_HE");
1139  Map_Ampl[13][3][4] = (TH2F *)dir->FindObjectAny("h_mapWidthCalib047_HO");
1140  Map_Ampl[13][4][1] = (TH2F *)dir->FindObjectAny("h_mapWidthCalib047_HF");
1141  Map_Ampl[13][4][2] = (TH2F *)dir->FindObjectAny("h_mapWidthCalib047_HF");
1142 
1143  HistAmpl[13][1] = (TH1F *)dir->FindObjectAny("h_WidthCalib_HB");
1144  HistAmpl[13][2] = (TH1F *)dir->FindObjectAny("h_WidthCalib_HE");
1145  HistAmpl[13][3] = (TH1F *)dir->FindObjectAny("h_WidthCalib_HO");
1146  HistAmpl[13][4] = (TH1F *)dir->FindObjectAny("h_WidthCalib_HF");
1147 
1148  //+++++++++++++++++++++++++++++
1149  //Test 14 (Rc) Rate of ratio 4 near max TS/ All TS
1150  //+++++++++++++++++++++++++++++
1151 
1152  Map_Ampl[14][1][1] = (TH2F *)dir->FindObjectAny("h_mapRatioCalib047_HB");
1153  Map_Ampl[14][1][2] = (TH2F *)dir->FindObjectAny("h_mapRatioCalib047_HB");
1154  Map_Ampl[14][2][1] = (TH2F *)dir->FindObjectAny("h_mapRatioCalib047_HE");
1155  Map_Ampl[14][2][2] = (TH2F *)dir->FindObjectAny("h_mapRatioCalib047_HE");
1156  Map_Ampl[14][2][3] = (TH2F *)dir->FindObjectAny("h_mapRatioCalib047_HE");
1157  Map_Ampl[14][3][4] = (TH2F *)dir->FindObjectAny("h_mapRatioCalib047_HO");
1158  Map_Ampl[14][4][1] = (TH2F *)dir->FindObjectAny("h_mapRatioCalib047_HF");
1159  Map_Ampl[14][4][2] = (TH2F *)dir->FindObjectAny("h_mapRatioCalib047_HF");
1160 
1161  HistAmpl[14][1] = (TH1F *)dir->FindObjectAny("h_RatioCalib_HB");
1162  HistAmpl[14][2] = (TH1F *)dir->FindObjectAny("h_RatioCalib_HE");
1163  HistAmpl[14][3] = (TH1F *)dir->FindObjectAny("h_RatioCalib_HO");
1164  HistAmpl[14][4] = (TH1F *)dir->FindObjectAny("h_RatioCalib_HF");
1165 
1166  //+++++++++++++++++++++++++++++
1167  //Test 15 (TNc) Mean position in 1-8 TS range
1168  //+++++++++++++++++++++++++++++
1169 
1170  Map_Ampl[15][1][1] = (TH2F *)dir->FindObjectAny("h_mapTSmeanCalib047_HB");
1171  Map_Ampl[15][1][2] = (TH2F *)dir->FindObjectAny("h_mapTSmeanCalib047_HB");
1172  Map_Ampl[15][2][1] = (TH2F *)dir->FindObjectAny("h_mapTSmeanCalib047_HE");
1173  Map_Ampl[15][2][2] = (TH2F *)dir->FindObjectAny("h_mapTSmeanCalib047_HE");
1174  Map_Ampl[15][2][3] = (TH2F *)dir->FindObjectAny("h_mapTSmeanCalib047_HE");
1175  Map_Ampl[15][3][4] = (TH2F *)dir->FindObjectAny("h_mapTSmeanCalib047_HO");
1176  Map_Ampl[15][4][1] = (TH2F *)dir->FindObjectAny("h_mapTSmeanCalib047_HF");
1177  Map_Ampl[15][4][2] = (TH2F *)dir->FindObjectAny("h_mapTSmeanCalib047_HF");
1178 
1179  HistAmpl[15][1] = (TH1F *)dir->FindObjectAny("h_TSmeanCalib_HB");
1180  HistAmpl[15][2] = (TH1F *)dir->FindObjectAny("h_TSmeanCalib_HE");
1181  HistAmpl[15][3] = (TH1F *)dir->FindObjectAny("h_TSmeanCalib_HO");
1182  HistAmpl[15][4] = (TH1F *)dir->FindObjectAny("h_TSmeanCalib_HF");
1183 
1184  //+++++++++++++++++++++++++++++
1185  //Test 16 (TXc) Maximum position in 1-8 TS range
1186  //+++++++++++++++++++++++++++++
1187 
1188  Map_Ampl[16][1][1] = (TH2F *)dir->FindObjectAny("h_mapTSmaxCalib047_HB");
1189  Map_Ampl[16][1][2] = (TH2F *)dir->FindObjectAny("h_mapTSmaxCalib047_HB");
1190  Map_Ampl[16][2][1] = (TH2F *)dir->FindObjectAny("h_mapTSmaxCalib047_HE");
1191  Map_Ampl[16][2][2] = (TH2F *)dir->FindObjectAny("h_mapTSmaxCalib047_HE");
1192  Map_Ampl[16][2][3] = (TH2F *)dir->FindObjectAny("h_mapTSmaxCalib047_HE");
1193  Map_Ampl[16][3][4] = (TH2F *)dir->FindObjectAny("h_mapTSmaxCalib047_HO");
1194  Map_Ampl[16][4][1] = (TH2F *)dir->FindObjectAny("h_mapTSmaxCalib047_HF");
1195  Map_Ampl[16][4][2] = (TH2F *)dir->FindObjectAny("h_mapTSmaxCalib047_HF");
1196 
1197  HistAmpl[16][1] = (TH1F *)dir->FindObjectAny("h_TSmaxCalib_HB");
1198  HistAmpl[16][2] = (TH1F *)dir->FindObjectAny("h_TSmaxCalib_HE");
1199  HistAmpl[16][3] = (TH1F *)dir->FindObjectAny("h_TSmaxCalib_HO");
1200  HistAmpl[16][4] = (TH1F *)dir->FindObjectAny("h_TSmaxCalib_HF");
1201 
1202  for (int test = 12; test <= 16; test++) { //Test: 2-Am, 3-Wm, 4-Rm, 5-TNm, 6-TXm,
1203  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
1204  if (sub == 1)
1205  cONE->Divide(1, 1); //cHB->Divide(2,1);
1206  if (sub == 2)
1207  cONE->Divide(1, 1); //cHE->Divide(3,1);
1208  if (sub == 3)
1209  cONE->Divide(1, 1);
1210  if (sub == 4)
1211  cONE->Divide(1, 1); //cHB->Divide(2,1);
1212  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1213  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1214  // for (int k=k_min[sub];k<=k_max[sub];k++) { //Depth
1215  int k = 1;
1216  if (sub == 1) {
1217  k = 1;
1218  cONE->cd(k);
1219  } //cHB->cd(k); }
1220  if (sub == 2) {
1221  k = 1;
1222  cONE->cd(k);
1223  } //cHE->cd(k); }
1224  if (sub == 3) {
1225  k = 4;
1226  cONE->cd(k - 3);
1227  }
1228  if (sub == 4) {
1229  k = 1;
1230  cONE->cd(k);
1231  } //cHB->cd(k); }
1232  Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_Calib[sub][k], 1, 1, "B");
1233  gPad->SetGridy();
1234  gPad->SetGridx();
1235  gPad->SetLogz();
1236  if (sub == 1)
1237  sprintf(str, "HB");
1238  if (sub == 2)
1239  sprintf(str, "HE");
1240  if (sub == 3)
1241  sprintf(str, "HO");
1242  if (sub == 4)
1243  sprintf(str, "HF");
1244  Map_Ampl[test][sub][k]->SetTitle(str);
1245  Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
1246  Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
1247  Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
1248  Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
1249  Map_Ampl[test][sub][k]->Draw("COLZ");
1250  Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1251  Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.00001, 1.);
1252  // if (sub==1) {cHB->Modified(); cHB->Update();}
1253  // if (sub==2) {cHE->Modified(); cHE->Update();}
1254  cONE->Modified();
1255  cONE->Update();
1256  // if (sub==4) {cHB->Modified(); cHB->Update();}
1257  // }//end depth
1258  if (test == 12) {
1259  if (sub == 1) {
1260  cONE->Print("MapRateAmplCalibHB.png");
1261  cONE->Clear();
1262  }
1263  if (sub == 2) {
1264  cONE->Print("MapRateAmplCalibHE.png");
1265  cONE->Clear();
1266  }
1267  if (sub == 3) {
1268  cONE->Print("MapRateAmplCalibHO.png");
1269  cONE->Clear();
1270  }
1271  if (sub == 4) {
1272  cONE->Print("MapRateAmplCalibHF.png");
1273  cONE->Clear();
1274  }
1275  }
1276  if (test == 13) {
1277  if (sub == 1) {
1278  cONE->Print("MapRateRMSCalibHB.png");
1279  cONE->Clear();
1280  }
1281  if (sub == 2) {
1282  cONE->Print("MapRateRMSCalibHE.png");
1283  cONE->Clear();
1284  }
1285  if (sub == 3) {
1286  cONE->Print("MapRateRMSCalibHO.png");
1287  cONE->Clear();
1288  }
1289  if (sub == 4) {
1290  cONE->Print("MapRateRMSCalibHF.png");
1291  cONE->Clear();
1292  }
1293  }
1294  if (test == 14) {
1295  if (sub == 1) {
1296  cONE->Print("MapRate43TStoAllTSCalibHB.png");
1297  cONE->Clear();
1298  }
1299  if (sub == 2) {
1300  cONE->Print("MapRate43TStoAllTSCalibHE.png");
1301  cONE->Clear();
1302  }
1303  if (sub == 3) {
1304  cONE->Print("MapRate43TStoAllTSCalibHO.png");
1305  cONE->Clear();
1306  }
1307  if (sub == 4) {
1308  cONE->Print("MapRate43TStoAllTSCalibHF.png");
1309  cONE->Clear();
1310  }
1311  }
1312  if (test == 15) {
1313  if (sub == 1) {
1314  cONE->Print("MapRateMeanPosCalibHB.png");
1315  cONE->Clear();
1316  }
1317  if (sub == 2) {
1318  cONE->Print("MapRateMeanPosCalibHE.png");
1319  cONE->Clear();
1320  }
1321  if (sub == 3) {
1322  cONE->Print("MapRateMeanPosCalibHO.png");
1323  cONE->Clear();
1324  }
1325  if (sub == 4) {
1326  cONE->Print("MapRateMeanPosCalibHF.png");
1327  cONE->Clear();
1328  }
1329  }
1330  if (test == 16) {
1331  if (sub == 1) {
1332  cONE->Print("MapRateMaxPosCalibHB.png");
1333  cONE->Clear();
1334  }
1335  if (sub == 2) {
1336  cONE->Print("MapRateMaxPosCalibHE.png");
1337  cONE->Clear();
1338  }
1339  if (sub == 3) {
1340  cONE->Print("MapRateMaxPosCalibHO.png");
1341  cONE->Clear();
1342  }
1343  if (sub == 4) {
1344  cONE->Print("MapRateMaxPosCalibHF.png");
1345  cONE->Clear();
1346  }
1347  }
1348 
1349  cONE->Divide(1, 1);
1350  cONE->cd(1);
1351  gPad->SetGridy();
1352  gPad->SetGridx();
1353  gPad->SetLogy();
1354  if (sub == 1)
1355  HistAmpl[test][sub]->SetTitle("HB, All Depth");
1356  if (sub == 2)
1357  HistAmpl[test][sub]->SetTitle("HE, All Depth");
1358  if (sub == 3)
1359  HistAmpl[test][sub]->SetTitle("HO, All Depth");
1360  if (sub == 4)
1361  HistAmpl[test][sub]->SetTitle("HF, All Depth");
1362  if (test == 12)
1363  HistAmpl[test][sub]->SetXTitle("ADC Amlitude in each event & cell \b");
1364  if (test == 13)
1365  HistAmpl[test][sub]->SetXTitle("Amplitude RMS in each event & cell \b");
1366  if (test == 14)
1367  HistAmpl[test][sub]->SetXTitle("Ratio in each event & cell \b");
1368  if (test == 15)
1369  HistAmpl[test][sub]->SetXTitle("Mean TS position in each event & cell \b");
1370  if (test == 16)
1371  HistAmpl[test][sub]->SetXTitle("Max TS position in each event & cell \b");
1372  HistAmpl[test][sub]->SetYTitle("Number of cell-events \b");
1373  HistAmpl[test][sub]->SetLineColor(4);
1374  HistAmpl[test][sub]->SetLineWidth(2);
1375  HistAmpl[test][sub]->SetTitleOffset(1.4, "Y");
1376  HistAmpl[test][sub]->Draw("");
1377  // HistAmpl[test][sub]->GetYaxis()->SetRangeUser(1., 100.);
1378  if (test == 12) {
1379  gPad->SetLogx();
1380  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(1., 10000.);
1381  }
1382  if (test == 13)
1383  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 5.);
1384  if (test == 14)
1385  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 1.);
1386  if (test == 15)
1387  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.);
1388  if (test == 16)
1389  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.);
1390  cONE->Modified();
1391  cONE->Update();
1392  double min_x[] = {MIN_C[test - 10][sub], MIN_C[test - 10][sub]};
1393  double min_y[] = {0., 100000000.};
1394  TGraph *MIN = new TGraph(2, min_x, min_y);
1395  MIN->SetLineStyle(2);
1396  MIN->SetLineColor(2);
1397  MIN->SetLineWidth(2 + 100 * 100);
1398  MIN->SetFillStyle(3005);
1399  MIN->SetFillColor(2);
1400  MIN->Draw("L");
1401  double max_x[] = {MAX_C[test - 10][sub], MAX_C[test - 10][sub]};
1402  double max_y[] = {0., 100000000.};
1403  TGraph *MAX = new TGraph(2, max_x, max_y);
1404  MAX->SetLineStyle(2);
1405  MAX->SetLineColor(2);
1406  MAX->SetLineWidth(-2 - 100 * 100);
1407  MAX->SetFillStyle(3004);
1408  MAX->SetFillColor(2);
1409  MAX->Draw("L");
1410  if (test == 12) {
1411  if (sub == 1) {
1412  cONE->Print("HistAmplCalibHB.png");
1413  cONE->Clear();
1414  }
1415  if (sub == 2) {
1416  cONE->Print("HistAmplCalibHE.png");
1417  cONE->Clear();
1418  }
1419  if (sub == 3) {
1420  cONE->Print("HistAmplCalibHO.png");
1421  cONE->Clear();
1422  }
1423  if (sub == 4) {
1424  cONE->Print("HistAmplCalibHF.png");
1425  cONE->Clear();
1426  }
1427  }
1428  if (test == 13) {
1429  if (sub == 1) {
1430  cONE->Print("HistRMSCalibHB.png");
1431  cONE->Clear();
1432  }
1433  if (sub == 2) {
1434  cONE->Print("HistRMSCalibHE.png");
1435  cONE->Clear();
1436  }
1437  if (sub == 3) {
1438  cONE->Print("HistRMSCalibHO.png");
1439  cONE->Clear();
1440  }
1441  if (sub == 4) {
1442  cONE->Print("HistRMSCalibHF.png");
1443  cONE->Clear();
1444  }
1445  }
1446  if (test == 14) {
1447  if (sub == 1) {
1448  cONE->Print("Hist43TStoAllTSCalibHB.png");
1449  cONE->Clear();
1450  }
1451  if (sub == 2) {
1452  cONE->Print("Hist43TStoAllTSCalibHE.png");
1453  cONE->Clear();
1454  }
1455  if (sub == 3) {
1456  cONE->Print("Hist43TStoAllTSCalibHO.png");
1457  cONE->Clear();
1458  }
1459  if (sub == 4) {
1460  cONE->Print("Hist43TStoAllTSCalibHF.png");
1461  cONE->Clear();
1462  }
1463  }
1464  if (test == 15) {
1465  if (sub == 1) {
1466  cONE->Print("HistMeanPosCalibHB.png");
1467  cONE->Clear();
1468  }
1469  if (sub == 2) {
1470  cONE->Print("HistMeanPosCalibHE.png");
1471  cONE->Clear();
1472  }
1473  if (sub == 3) {
1474  cONE->Print("HistMeanPosCalibHO.png");
1475  cONE->Clear();
1476  }
1477  if (sub == 4) {
1478  cONE->Print("HistMeanPosCalibHF.png");
1479  cONE->Clear();
1480  }
1481  }
1482  if (test == 16) {
1483  if (sub == 1) {
1484  cONE->Print("HistMaxPosCalibHB.png");
1485  cONE->Clear();
1486  }
1487  if (sub == 2) {
1488  cONE->Print("HistMaxPosCalibHE.png");
1489  cONE->Clear();
1490  }
1491  if (sub == 3) {
1492  cONE->Print("HistMaxPosCalibHO.png");
1493  cONE->Clear();
1494  }
1495  if (sub == 4) {
1496  cONE->Print("HistMaxPosCalibHF.png");
1497  cONE->Clear();
1498  }
1499  }
1500  } // end sub
1501  } //end test
1502 
1503  //+++++++++++++++++++++++++++++
1504  //Test 21 (GS) Amplitude drift
1505  //+++++++++++++++++++++++++++++
1506 
1507  Map_Ampl[21][1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1AmplE34_HB");
1508  Map_Ampl[21][1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2AmplE34_HB");
1509  Map_Ampl[21][1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3AmplE34_HB");
1510  Map_Ampl[21][1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4AmplE34_HB");
1511  Map_Ampl[21][2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1AmplE34_HE");
1512  Map_Ampl[21][2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2AmplE34_HE");
1513  Map_Ampl[21][2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3AmplE34_HE");
1514  Map_Ampl[21][2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4AmplE34_HE");
1515  Map_Ampl[21][2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5AmplE34_HE");
1516  Map_Ampl[21][2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6AmplE34_HE");
1517  Map_Ampl[21][2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7AmplE34_HE");
1518  Map_Ampl[21][3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4AmplE34_HO");
1519  Map_Ampl[21][4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1AmplE34_HF");
1520  Map_Ampl[21][4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2AmplE34_HF");
1521  Map_Ampl[21][4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3AmplE34_HF");
1522  Map_Ampl[21][4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4AmplE34_HF");
1523 
1524  TH2F *Map_RefAmpl[5][ALLDEPTH]; // 2D histogramm for subdet, depth
1525  TH2F *Map_RefSUB[5][ALLDEPTH]; // 2d histogramm for subdet, depth
1526 
1527  Map_RefAmpl[1][1] = (TH2F *)refdir->FindObjectAny("h_mapDepth1AmplE34_HB");
1528  Map_RefAmpl[1][2] = (TH2F *)refdir->FindObjectAny("h_mapDepth2AmplE34_HB");
1529  Map_RefAmpl[1][3] = (TH2F *)refdir->FindObjectAny("h_mapDepth3AmplE34_HB");
1530  Map_RefAmpl[1][4] = (TH2F *)refdir->FindObjectAny("h_mapDepth4AmplE34_HB");
1531  Map_RefAmpl[2][1] = (TH2F *)refdir->FindObjectAny("h_mapDepth1AmplE34_HE");
1532  Map_RefAmpl[2][2] = (TH2F *)refdir->FindObjectAny("h_mapDepth2AmplE34_HE");
1533  Map_RefAmpl[2][3] = (TH2F *)refdir->FindObjectAny("h_mapDepth3AmplE34_HE");
1534  Map_RefAmpl[2][4] = (TH2F *)refdir->FindObjectAny("h_mapDepth4AmplE34_HE");
1535  Map_RefAmpl[2][5] = (TH2F *)refdir->FindObjectAny("h_mapDepth5AmplE34_HE");
1536  Map_RefAmpl[2][6] = (TH2F *)refdir->FindObjectAny("h_mapDepth6AmplE34_HE");
1537  Map_RefAmpl[2][7] = (TH2F *)refdir->FindObjectAny("h_mapDepth7AmplE34_HE");
1538  Map_RefAmpl[3][4] = (TH2F *)refdir->FindObjectAny("h_mapDepth4AmplE34_HO");
1539  Map_RefAmpl[4][1] = (TH2F *)refdir->FindObjectAny("h_mapDepth1AmplE34_HF");
1540  Map_RefAmpl[4][2] = (TH2F *)refdir->FindObjectAny("h_mapDepth2AmplE34_HF");
1541  Map_RefAmpl[4][3] = (TH2F *)refdir->FindObjectAny("h_mapDepth3AmplE34_HF");
1542  Map_RefAmpl[4][4] = (TH2F *)refdir->FindObjectAny("h_mapDepth4AmplE34_HF");
1543 
1544  Map_RefSUB[1][1] = (TH2F *)refdir->FindObjectAny("h_mapDepth1_HB");
1545  Map_RefSUB[1][2] = (TH2F *)refdir->FindObjectAny("h_mapDepth2_HB");
1546  Map_RefSUB[1][3] = (TH2F *)refdir->FindObjectAny("h_mapDepth3_HB");
1547  Map_RefSUB[1][4] = (TH2F *)refdir->FindObjectAny("h_mapDepth4_HB");
1548  Map_RefSUB[2][1] = (TH2F *)refdir->FindObjectAny("h_mapDepth1_HE");
1549  Map_RefSUB[2][2] = (TH2F *)refdir->FindObjectAny("h_mapDepth2_HE");
1550  Map_RefSUB[2][3] = (TH2F *)refdir->FindObjectAny("h_mapDepth3_HE");
1551  Map_RefSUB[2][4] = (TH2F *)refdir->FindObjectAny("h_mapDepth4_HE");
1552  Map_RefSUB[2][5] = (TH2F *)refdir->FindObjectAny("h_mapDepth5_HE");
1553  Map_RefSUB[2][6] = (TH2F *)refdir->FindObjectAny("h_mapDepth6_HE");
1554  Map_RefSUB[2][7] = (TH2F *)refdir->FindObjectAny("h_mapDepth7_HE");
1555  Map_RefSUB[3][4] = (TH2F *)refdir->FindObjectAny("h_mapDepth4_HO");
1556  Map_RefSUB[4][1] = (TH2F *)refdir->FindObjectAny("h_mapDepth1_HF");
1557  Map_RefSUB[4][2] = (TH2F *)refdir->FindObjectAny("h_mapDepth2_HF");
1558  Map_RefSUB[4][3] = (TH2F *)refdir->FindObjectAny("h_mapDepth3_HF");
1559  Map_RefSUB[4][4] = (TH2F *)refdir->FindObjectAny("h_mapDepth4_HF");
1560 
1561  HistAmplDepth[21][1][1] = new TH1F("diffAmpl_Depth1_HB", "", 100, -10., 10.);
1562  HistAmplDepth[21][1][2] = new TH1F("diffAmpl_Depth2_HB", "", 100, -10., 10.);
1563  HistAmplDepth[21][1][3] = new TH1F("diffAmpl_Depth3_HB", "", 100, -10., 10.);
1564  HistAmplDepth[21][1][4] = new TH1F("diffAmpl_Depth4_HB", "", 100, -10., 10.);
1565  HistAmplDepth[21][2][1] = new TH1F("diffAmpl_Depth1_HE", "", 100, -10., 10.);
1566  HistAmplDepth[21][2][2] = new TH1F("diffAmpl_Depth2_HE", "", 100, -10., 10.);
1567  HistAmplDepth[21][2][3] = new TH1F("diffAmpl_Depth3_HE", "", 100, -10., 10.);
1568  HistAmplDepth[21][2][4] = new TH1F("diffAmpl_Depth4_HE", "", 100, -10., 10.);
1569  HistAmplDepth[21][2][5] = new TH1F("diffAmpl_Depth5_HE", "", 100, -10., 10.);
1570  HistAmplDepth[21][2][6] = new TH1F("diffAmpl_Depth6_HE", "", 100, -10., 10.);
1571  HistAmplDepth[21][2][7] = new TH1F("diffAmpl_Depth7_HE", "", 100, -10., 10.);
1572  HistAmplDepth[21][3][4] = new TH1F("diffAmpl_Depth4_HO", "", 100, -10., 10.);
1573  HistAmplDepth[21][4][1] = new TH1F("diffAmpl_Depth1_HF", "", 100, -10., 10.);
1574  HistAmplDepth[21][4][2] = new TH1F("diffAmpl_Depth2_HF", "", 100, -10., 10.);
1575  HistAmplDepth[21][4][3] = new TH1F("diffAmpl_Depth3_HF", "", 100, -10., 10.);
1576  HistAmplDepth[21][4][4] = new TH1F("diffAmpl_Depth4_HF", "", 100, -10., 10.);
1577 
1578  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
1579  // if (sub==1) cHB->Divide(2,1);
1580  if (sub == 1)
1581  cHB->Divide(2, 2);
1582  // if (sub==2) cHE->Divide(3,1);
1583  if (sub == 2)
1584  cHE->Divide(3, 3);
1585  if (sub == 3)
1586  cONE->Divide(1, 1);
1587  // if (sub==4) cHF->Divide(2,1);
1588  if (sub == 4)
1589  cHF->Divide(2, 2);
1590  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1591  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1592  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
1593  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1594  if (sub == 1)
1595  cHB->cd(k);
1596  if (sub == 2)
1597  cHE->cd(k);
1598  if (sub == 3)
1599  cONE->cd(k - 3);
1600  if (sub == 4)
1601  cHF->cd(k);
1602  Map_Ampl[21][sub][k]->Divide(Map_Ampl[21][sub][k], Map_SUB[sub][k], 1, 1, "B");
1603  gPad->SetGridy();
1604  gPad->SetGridx();
1605  gPad->SetLogz();
1606  if (sub == 1)
1607  sprintf(str, "HB, Depth%d \b", k);
1608  if (sub == 2)
1609  sprintf(str, "HE, Depth%d \b", k);
1610  if (sub == 3)
1611  sprintf(str, "HO, Depth%d \b", k);
1612  if (sub == 4)
1613  sprintf(str, "HF, Depth%d \b", k);
1614  Map_Ampl[21][sub][k]->SetTitle(str);
1615  Map_Ampl[21][sub][k]->SetXTitle("#eta \b");
1616  Map_Ampl[21][sub][k]->SetYTitle("#phi \b");
1617  Map_Ampl[21][sub][k]->SetZTitle("Response \b");
1618  Map_Ampl[21][sub][k]->SetTitleOffset(1.1, "Z");
1619  Map_Ampl[21][sub][k]->Draw("COLZ");
1620  Map_Ampl[21][sub][k]->GetYaxis()->SetRangeUser(0, 71.);
1621  // Map_Ampl[21][sub][k]->GetZaxis()->SetRangeUser(1., 10.);
1622  if (sub == 1) {
1623  cHB->Modified();
1624  cHB->Update();
1625  }
1626  if (sub == 2) {
1627  cHE->Modified();
1628  cHE->Update();
1629  }
1630  if (sub == 3) {
1631  cONE->Modified();
1632  cONE->Update();
1633  }
1634  if (sub == 4) {
1635  cHF->Modified();
1636  cHF->Update();
1637  }
1638  } //end depth
1639  if (sub == 1) {
1640  cHB->Print("MapRateAmpl1HB.png");
1641  cHB->Clear();
1642  }
1643  if (sub == 2) {
1644  cHE->Print("MapRateAmpl1HE.png");
1645  cHE->Clear();
1646  }
1647  if (sub == 3) {
1648  cONE->Print("MapRateAmpl1HO.png");
1649  cONE->Clear();
1650  }
1651  if (sub == 4) {
1652  cHF->Print("MapRateAmpl1HF.png");
1653  cHF->Clear();
1654  }
1655 
1656  // if (sub==1) cHB->Divide(2,1);
1657  if (sub == 1)
1658  cHB->Divide(2, 2);
1659  // if (sub==2) cHE->Divide(3,1);
1660  if (sub == 2)
1661  cHE->Divide(3, 3);
1662  if (sub == 3)
1663  cONE->Divide(1, 1);
1664  // if (sub==4) cHF->Divide(2,1);
1665  if (sub == 4)
1666  cHF->Divide(2, 2);
1667 
1668  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1669  if (sub == 1)
1670  cHB->cd(k);
1671  if (sub == 2)
1672  cHE->cd(k);
1673  if (sub == 3)
1674  cONE->cd(k - 3);
1675  if (sub == 4)
1676  cHF->cd(k);
1677  Map_RefAmpl[sub][k]->Divide(Map_RefAmpl[sub][k], Map_RefSUB[sub][k], 1, 1, "B");
1678  gPad->SetGridy();
1679  gPad->SetGridx();
1680  gPad->SetLogz();
1681  if (sub == 1)
1682  sprintf(str, "HB, Depth%d \b", k);
1683  if (sub == 2)
1684  sprintf(str, "HE, Depth%d \b", k);
1685  if (sub == 3)
1686  sprintf(str, "HO, Depth%d \b", k);
1687  if (sub == 4)
1688  sprintf(str, "HF, Depth%d \b", k);
1689  Map_RefAmpl[sub][k]->SetTitle(str);
1690  Map_RefAmpl[sub][k]->SetXTitle("#eta \b");
1691  Map_RefAmpl[sub][k]->SetYTitle("#phi \b");
1692  Map_RefAmpl[sub][k]->SetZTitle("Response\b");
1693  Map_RefAmpl[sub][k]->SetTitleOffset(1.1, "Z");
1694  Map_RefAmpl[sub][k]->Draw("COLZ");
1695  Map_RefAmpl[sub][k]->GetYaxis()->SetRangeUser(0, 71.);
1696  // Map_RefAmpl[21][sub][k]->GetZaxis()->SetRangeUser(1., 10.);
1697  if (sub == 1) {
1698  cHB->Modified();
1699  cHB->Update();
1700  }
1701  if (sub == 2) {
1702  cHE->Modified();
1703  cHE->Update();
1704  }
1705  if (sub == 3) {
1706  cONE->Modified();
1707  cONE->Update();
1708  }
1709  if (sub == 4) {
1710  cHF->Modified();
1711  cHF->Update();
1712  }
1713  } //end depth
1714  if (sub == 1) {
1715  cHB->Print("MapRateAmpl2HB.png");
1716  cHB->Clear();
1717  }
1718  if (sub == 2) {
1719  cHE->Print("MapRateAmpl2HE.png");
1720  cHE->Clear();
1721  }
1722  if (sub == 3) {
1723  cONE->Print("MapRateAmpl2HO.png");
1724  cONE->Clear();
1725  }
1726  if (sub == 4) {
1727  cHF->Print("MapRateAmpl2HF.png");
1728  cHF->Clear();
1729  }
1730 
1731  // if (sub==1) cHB->Divide(2,1);
1732  if (sub == 1)
1733  cHB->Divide(2, 2);
1734  // if (sub==2) cHE->Divide(3,1);
1735  if (sub == 2)
1736  cHE->Divide(3, 3);
1737  if (sub == 3)
1738  cONE->Divide(1, 1);
1739  // if (sub==4) cHF->Divide(2,1);
1740  if (sub == 4)
1741  cHF->Divide(2, 2);
1742 
1743  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1744  if (sub == 1)
1745  cHB->cd(k);
1746  if (sub == 2)
1747  cHE->cd(k);
1748  if (sub == 3)
1749  cONE->cd(k - 3);
1750  if (sub == 4)
1751  cHF->cd(k);
1752  TH2F *TTT = new TH2F("Map", "Map", 82, -41, 40, 72, 0, 71);
1753  for (int x = 1; x <= Map_Ampl[21][sub][k]->GetXaxis()->GetNbins(); x++) {
1754  for (int y = 1; y <= Map_Ampl[21][sub][k]->GetYaxis()->GetNbins(); y++) {
1755  if (Map_Ampl[21][sub][k]->GetBinContent(x, y) != 0 && Map_RefAmpl[sub][k]->GetBinContent(x, y) != 0) {
1756  double ccc1 = Map_Ampl[21][sub][k]->GetBinContent(x, y) - Map_RefAmpl[sub][k]->GetBinContent(x, y);
1757  ccc1 = 100. * ccc1 / Map_Ampl[21][sub][k]->GetBinContent(x, y); // in %
1758  HistAmplDepth[21][sub][k]->Fill(ccc1);
1759  Map_Ampl[21][sub][k]->SetBinContent(x, y, fabs(ccc1));
1760  if (fabs(ccc1) > porog[sub])
1761  TTT->SetBinContent(x, y, fabs(ccc1));
1762  else
1763  TTT->SetBinContent(x, y, 0);
1764  }
1765  } //end y
1766  } //esnd x
1767  gPad->SetGridy();
1768  gPad->SetGridx();
1769  // gPad->SetLogz();
1770  if (sub == 1)
1771  sprintf(str, "HB, Depth%d \b", k);
1772  if (sub == 2)
1773  sprintf(str, "HE, Depth%d \b", k);
1774  if (sub == 3)
1775  sprintf(str, "HO, Depth%d \b", k);
1776  if (sub == 4)
1777  sprintf(str, "HF, Depth%d \b", k);
1778  TTT->SetTitle(str);
1779  TTT->SetXTitle("#eta \b");
1780  TTT->SetYTitle("#phi \b");
1781  TTT->SetZTitle("Relative difference, % \b");
1782  TTT->SetTitleOffset(0.9, "Z");
1783  TTT->Draw("COLZ");
1784  TTT->GetYaxis()->SetRangeUser(0, 71.);
1785  TTT->GetZaxis()->SetRangeUser(0, 10.);
1786  if (sub == 1) {
1787  cHB->Modified();
1788  cHB->Update();
1789  }
1790  if (sub == 2) {
1791  cHE->Modified();
1792  cHE->Update();
1793  }
1794  if (sub == 3) {
1795  cONE->Modified();
1796  cONE->Update();
1797  }
1798  if (sub == 4) {
1799  cHF->Modified();
1800  cHF->Update();
1801  }
1802  } //end depth
1803 
1804  if (sub == 1) {
1805  cHB->Print("MapRateAmplDriftHB.png");
1806  cHB->Clear();
1807  }
1808  if (sub == 2) {
1809  cHE->Print("MapRateAmplDriftHE.png");
1810  cHE->Clear();
1811  }
1812  if (sub == 3) {
1813  cONE->Print("MapRateAmplDriftHO.png");
1814  cONE->Clear();
1815  }
1816  if (sub == 4) {
1817  cHF->Print("MapRateAmplDriftHF.png");
1818  cHF->Clear();
1819  }
1821 
1822  // if (sub==1) cHB->Divide(2,1);
1823  if (sub == 1)
1824  cHB->Divide(2, 2);
1825  // if (sub==2) cHE->Divide(3,1);
1826  if (sub == 2)
1827  cHE->Divide(3, 3);
1828  if (sub == 3)
1829  cONE->Divide(1, 1);
1830  // if (sub==4) cHF->Divide(2,1);
1831  if (sub == 4)
1832  cHF->Divide(2, 2);
1833 
1834  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1835  if (sub == 1)
1836  cHB->cd(k);
1837  if (sub == 2)
1838  cHE->cd(k);
1839  if (sub == 3)
1840  cONE->cd(k - 3);
1841  if (sub == 4)
1842  cHF->cd(k);
1843  gPad->SetGridy();
1844  gPad->SetGridx();
1845  gPad->SetLogy();
1846  if (sub == 1)
1847  sprintf(str, "HB, Depth%d \b", k);
1848  if (sub == 2)
1849  sprintf(str, "HE, Depth%d \b", k);
1850  if (sub == 3)
1851  sprintf(str, "HO, Depth%d \b", k);
1852  if (sub == 4)
1853  sprintf(str, "HF, Depth%d \b", k);
1854  HistAmplDepth[21][sub][k]->SetTitle(str);
1855  HistAmplDepth[21][sub][k]->SetYTitle("Number of cell-events \b");
1856  HistAmplDepth[21][sub][k]->SetXTitle("Per cent \b");
1857  HistAmplDepth[21][sub][k]->SetLineColor(4);
1858  HistAmplDepth[21][sub][k]->SetLineWidth(2);
1859  HistAmplDepth[21][sub][k]->SetTitleOffset(1.4, "Y");
1860  HistAmplDepth[21][sub][k]->Draw();
1861  // HistAmplDepth[21][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1862  HistAmplDepth[21][sub][k]->GetXaxis()->SetRangeUser(-10., 10.);
1863  if (sub == 1) {
1864  cHB->Modified();
1865  cHB->Update();
1866  }
1867  if (sub == 2) {
1868  cHE->Modified();
1869  cHE->Update();
1870  }
1871  if (sub == 3) {
1872  cONE->Modified();
1873  cONE->Update();
1874  }
1875  if (sub == 4) {
1876  cHF->Modified();
1877  cHF->Update();
1878  }
1879  double min_x[] = {-1 * porog[sub], -1 * porog[sub]};
1880  double min_y[] = {0., 100000000.};
1881  TGraph *MIN = new TGraph(2, min_x, min_y);
1882  MIN->SetLineStyle(2);
1883  MIN->SetLineColor(2);
1884  MIN->SetLineWidth(2 + 100 * 100);
1885  MIN->SetFillStyle(3005);
1886  MIN->SetFillColor(2);
1887  MIN->Draw("L");
1888  double max_x[] = {porog[sub], porog[sub]};
1889  double max_y[] = {0., 100000000.};
1890  TGraph *MAX = new TGraph(2, max_x, max_y);
1891  MAX->SetLineStyle(2);
1892  MAX->SetLineColor(2);
1893  MAX->SetLineWidth(-2 - 100 * 100);
1894  MAX->SetFillStyle(3004);
1895  MAX->SetFillColor(2);
1896  MAX->Draw("L");
1897  } // end depth
1898  if (sub == 1) {
1899  cHB->Print("HistAmplDriftDepthHB.png");
1900  cHB->Clear();
1901  }
1902  if (sub == 2) {
1903  cHE->Print("HistAmplDriftDepthHE.png");
1904  cHE->Clear();
1905  }
1906  if (sub == 3) {
1907  cONE->Print("HistAmplDriftDepthHO.png");
1908  cONE->Clear();
1909  }
1910  if (sub == 4) {
1911  cHF->Print("HistAmplDriftDepthHF.png");
1912  cHF->Clear();
1913  }
1914  } //end sub
1915 
1916  //+++++++++++++++++++++++++++++++++++
1917  //Test 31, 32 Pedestal, pedestalWidths
1918  //++++++++++++++++++++++++++++++++++++
1919 
1920  Map_Ampl[31][1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1pedestal_HB");
1921  Map_Ampl[31][1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2pedestal_HB");
1922  Map_Ampl[31][1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3pedestal_HB");
1923  Map_Ampl[31][1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4pedestal_HB");
1924  Map_Ampl[31][2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1pedestal_HE");
1925  Map_Ampl[31][2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2pedestal_HE");
1926  Map_Ampl[31][2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3pedestal_HE");
1927  Map_Ampl[31][2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4pedestal_HE");
1928  Map_Ampl[31][2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5pedestal_HE");
1929  Map_Ampl[31][2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6pedestal_HE");
1930  Map_Ampl[31][2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7pedestal_HE");
1931  Map_Ampl[31][3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4pedestal_HO");
1932  Map_Ampl[31][4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1pedestal_HF");
1933  Map_Ampl[31][4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2pedestal_HF");
1934  Map_Ampl[31][4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3pedestal_HF");
1935  Map_Ampl[31][4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4pedestal_HF");
1936 
1937  Map_Ampl[32][1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1pedestalw_HB");
1938  Map_Ampl[32][1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2pedestalw_HB");
1939  Map_Ampl[32][1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3pedestalw_HB");
1940  Map_Ampl[32][1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4pedestalw_HB");
1941  Map_Ampl[32][2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1pedestalw_HE");
1942  Map_Ampl[32][2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2pedestalw_HE");
1943  Map_Ampl[32][2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3pedestalw_HE");
1944  Map_Ampl[32][2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4pedestalw_HE");
1945  Map_Ampl[32][2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5pedestalw_HE");
1946  Map_Ampl[32][2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6pedestalw_HE");
1947  Map_Ampl[32][2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7pedestalw_HE");
1948  Map_Ampl[32][3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4pedestalw_HO");
1949  Map_Ampl[32][4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1pedestalw_HF");
1950  Map_Ampl[32][4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2pedestalw_HF");
1951  Map_Ampl[32][4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3pedestalw_HF");
1952  Map_Ampl[32][4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4pedestalw_HF");
1953 
1954  HistPed[1][1][0] = (TH1F *)dir->FindObjectAny("h_pedestal0_HB");
1955  HistPed[1][1][1] = (TH1F *)dir->FindObjectAny("h_pedestal1_HB");
1956  HistPed[1][1][2] = (TH1F *)dir->FindObjectAny("h_pedestal2_HB");
1957  HistPed[1][1][3] = (TH1F *)dir->FindObjectAny("h_pedestal3_HB");
1958  HistPed[2][1][0] = (TH1F *)dir->FindObjectAny("h_pedestalw0_HB");
1959  HistPed[2][1][1] = (TH1F *)dir->FindObjectAny("h_pedestalw1_HB");
1960  HistPed[2][1][2] = (TH1F *)dir->FindObjectAny("h_pedestalw2_HB");
1961  HistPed[2][1][3] = (TH1F *)dir->FindObjectAny("h_pedestalw3_HB");
1962 
1963  HistPed[1][2][0] = (TH1F *)dir->FindObjectAny("h_pedestal0_HE");
1964  HistPed[1][2][1] = (TH1F *)dir->FindObjectAny("h_pedestal1_HE");
1965  HistPed[1][2][2] = (TH1F *)dir->FindObjectAny("h_pedestal2_HE");
1966  HistPed[1][2][3] = (TH1F *)dir->FindObjectAny("h_pedestal3_HE");
1967  HistPed[2][2][0] = (TH1F *)dir->FindObjectAny("h_pedestalw0_HE");
1968  HistPed[2][2][1] = (TH1F *)dir->FindObjectAny("h_pedestalw1_HE");
1969  HistPed[2][2][2] = (TH1F *)dir->FindObjectAny("h_pedestalw2_HE");
1970  HistPed[2][2][3] = (TH1F *)dir->FindObjectAny("h_pedestalw3_HE");
1971 
1972  HistPed[1][3][0] = (TH1F *)dir->FindObjectAny("h_pedestal0_HO");
1973  HistPed[1][3][1] = (TH1F *)dir->FindObjectAny("h_pedestal1_HO");
1974  HistPed[1][3][2] = (TH1F *)dir->FindObjectAny("h_pedestal2_HO");
1975  HistPed[1][3][3] = (TH1F *)dir->FindObjectAny("h_pedestal3_HO");
1976  HistPed[2][3][0] = (TH1F *)dir->FindObjectAny("h_pedestalw0_HO");
1977  HistPed[2][3][1] = (TH1F *)dir->FindObjectAny("h_pedestalw1_HO");
1978  HistPed[2][3][2] = (TH1F *)dir->FindObjectAny("h_pedestalw2_HO");
1979  HistPed[2][3][3] = (TH1F *)dir->FindObjectAny("h_pedestalw3_HO");
1980 
1981  HistPed[1][4][0] = (TH1F *)dir->FindObjectAny("h_pedestal0_HF");
1982  HistPed[1][4][1] = (TH1F *)dir->FindObjectAny("h_pedestal1_HF");
1983  HistPed[1][4][2] = (TH1F *)dir->FindObjectAny("h_pedestal2_HF");
1984  HistPed[1][4][3] = (TH1F *)dir->FindObjectAny("h_pedestal3_HF");
1985  HistPed[2][4][0] = (TH1F *)dir->FindObjectAny("h_pedestalw0_HF");
1986  HistPed[2][4][1] = (TH1F *)dir->FindObjectAny("h_pedestalw1_HF");
1987  HistPed[2][4][2] = (TH1F *)dir->FindObjectAny("h_pedestalw2_HF");
1988  HistPed[2][4][3] = (TH1F *)dir->FindObjectAny("h_pedestalw3_HF");
1989 
1990  for (int test = 31; test <= 32; test++) { //Test: 31-Pedestals, 32-pedestal Widths,
1991  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
1992  // if (sub==1) cHB->Divide(2,1);
1993  if (sub == 1)
1994  cHB->Divide(2, 2);
1995  // if (sub==2) cHE->Divide(3,1);
1996  if (sub == 2)
1997  cHE->Divide(3, 3);
1998  if (sub == 3)
1999  cONE->Divide(1, 1);
2000  // if (sub==4) cHF->Divide(2,1);
2001  if (sub == 4)
2002  cHF->Divide(2, 2);
2003  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2004  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2005  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
2006  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depths
2007  if (sub == 1)
2008  cHB->cd(k);
2009  if (sub == 2)
2010  cHE->cd(k);
2011  if (sub == 3)
2012  cONE->cd(k - 3);
2013  if (sub == 4)
2014  cHF->cd(k);
2015  Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_SUB[sub][k], 1, 1, "B");
2016  gPad->SetGridy();
2017  gPad->SetGridx();
2018  gPad->SetLogz();
2019  if (sub == 1)
2020  sprintf(str, "HB, Depth%d \b", k);
2021  if (sub == 2)
2022  sprintf(str, "HE, Depth%d \b", k);
2023  if (sub == 3)
2024  sprintf(str, "HO, Depth%d \b", k);
2025  if (sub == 4)
2026  sprintf(str, "HF, Depth%d \b", k);
2027  Map_Ampl[test][sub][k]->SetTitle(str);
2028  Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
2029  Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
2030  Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
2031  if (sub == 3)
2032  Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
2033  Map_Ampl[test][sub][k]->Draw("COLZ");
2034  Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2035  Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2036  if (sub == 1) {
2037  cHB->Modified();
2038  cHB->Update();
2039  }
2040  if (sub == 2) {
2041  cHE->Modified();
2042  cHE->Update();
2043  }
2044  if (sub == 3) {
2045  cONE->Modified();
2046  cONE->Update();
2047  }
2048  if (sub == 4) {
2049  cHF->Modified();
2050  cHF->Update();
2051  }
2052  } //end depth
2053  if (test == 31) {
2054  if (sub == 1) {
2055  cHB->Print("MapRatePedHB.png");
2056  cHB->Clear();
2057  }
2058  if (sub == 2) {
2059  cHE->Print("MapRatePedHE.png");
2060  cHE->Clear();
2061  }
2062  if (sub == 3) {
2063  cONE->Print("MapRatePedHO.png");
2064  cONE->Clear();
2065  }
2066  if (sub == 4) {
2067  cHF->Print("MapRatePedHF.png");
2068  cHF->Clear();
2069  }
2070  }
2071  if (test == 32) {
2072  if (sub == 1) {
2073  cHB->Print("MapRatePedWidthsHB.png");
2074  cHB->Clear();
2075  }
2076  if (sub == 2) {
2077  cHE->Print("MapRatePedWidthsHE.png");
2078  cHE->Clear();
2079  }
2080  if (sub == 3) {
2081  cONE->Print("MapRatePedWidthsHO.png");
2082  cONE->Clear();
2083  }
2084  if (sub == 4) {
2085  cHF->Print("MapRatePedWidthsHF.png");
2086  cHF->Clear();
2087  }
2088  }
2089 
2091 
2092  cPED->Divide(2, 2);
2093  for (int cap = 0; cap <= 3; cap++) {
2094  cPED->cd(cap + 1);
2095  gPad->SetGridy();
2096  gPad->SetGridx();
2097  gPad->SetLogy();
2098 
2099  if (sub == 1)
2100  sprintf(str, "HB, Cap%d, all depth\b", cap);
2101  if (sub == 2)
2102  sprintf(str, "HE, Cap%d, all depth\b", cap);
2103  if (sub == 3)
2104  sprintf(str, "HO, Cap%d, all depth\b", cap);
2105  if (sub == 4)
2106  sprintf(str, "HF, Cap%d, all depth\b", cap);
2107 
2108  HistPed[test - 30][sub][cap]->SetTitle(str);
2109 
2110  if (test == 31)
2111  HistPed[test - 30][sub][cap]->SetXTitle("Pedestals in each event & cell \b");
2112  if (test == 32)
2113  HistPed[test - 30][sub][cap]->SetXTitle("Pedestal Widths in each event & cell \b");
2114 
2115  HistPed[test - 30][sub][cap]->SetYTitle("Number of channel-events \b");
2116  HistPed[test - 30][sub][cap]->SetLineColor(4);
2117  HistPed[test - 30][sub][cap]->SetLineWidth(2);
2118  HistPed[test - 30][sub][cap]->SetTitleOffset(1.4, "Y");
2119  HistPed[test - 30][sub][cap]->Draw("");
2120  // HistPed[test-30][sub][cap]->GetYaxis()->SetRangeUser(1., 100.);
2121  // if (test==31) {gPad->SetLogx(); HistPed[test-30][sub][cap]->GetXaxis()->SetRangeUser(1., 10000.);}
2122  // if (test==32) HistPed[test-30][sub][cap]->GetXaxis()->SetRangeUser(0., 5.);
2123 
2124  cPED->Modified();
2125  cPED->Update();
2126  double min_x[] = {Pedest[test - 31][sub], Pedest[test - 31][sub]};
2127  double min_y[] = {0., 100000000.};
2128  TGraph *MIN = new TGraph(2, min_x, min_y);
2129  MIN->SetLineStyle(2);
2130  MIN->SetLineColor(2);
2131  MIN->SetLineWidth(2 + 100 * 100);
2132  MIN->SetFillStyle(3005);
2133  MIN->SetFillColor(2);
2134  MIN->Draw("L");
2135  }
2136  if (test == 31) {
2137  if (sub == 1) {
2138  cPED->Print("HistPedestalsHB.png");
2139  cPED->Clear();
2140  }
2141  if (sub == 2) {
2142  cPED->Print("HistPedestalsHE.png");
2143  cPED->Clear();
2144  }
2145  if (sub == 3) {
2146  cPED->Print("HistPedestalsHO.png");
2147  cPED->Clear();
2148  }
2149  if (sub == 4) {
2150  cPED->Print("HistPedestalsHF.png");
2151  cPED->Clear();
2152  }
2153  }
2154  if (test == 32) {
2155  if (sub == 1) {
2156  cPED->Print("HistPedestalWidthsHB.png");
2157  cPED->Clear();
2158  }
2159  if (sub == 2) {
2160  cPED->Print("HistPedestalWidthsHE.png");
2161  cPED->Clear();
2162  }
2163  if (sub == 3) {
2164  cPED->Print("HistPedestalWidthsHO.png");
2165  cPED->Clear();
2166  }
2167  if (sub == 4) {
2168  cPED->Print("HistPedestalWidthsHF.png");
2169  cPED->Clear();
2170  }
2171  }
2172  } // end sub
2173  } //end test 31,32
2174 
2175  //+++++++++++++++++++++++++++++++++++
2176  //Test 33 Correlation of Pedestal, pedestalWidths Vs fullAmplitude
2177  //++++++++++++++++++++++++++++++++++++
2178 
2179  cPED->Clear();
2180  Map_Ped[1][1] = (TH2F *)dir->FindObjectAny("h2_pedvsampl_HB");
2181  Map_Ped[1][2] = (TH2F *)dir->FindObjectAny("h2_pedvsampl_HE");
2182  Map_Ped[1][3] = (TH2F *)dir->FindObjectAny("h2_pedvsampl_HO");
2183  Map_Ped[1][4] = (TH2F *)dir->FindObjectAny("h2_pedvsampl_HF");
2184  Map_Ped[2][1] = (TH2F *)dir->FindObjectAny("h2_pedwvsampl_HB");
2185  Map_Ped[2][2] = (TH2F *)dir->FindObjectAny("h2_pedwvsampl_HE");
2186  Map_Ped[2][3] = (TH2F *)dir->FindObjectAny("h2_pedwvsampl_HO");
2187  Map_Ped[2][4] = (TH2F *)dir->FindObjectAny("h2_pedwvsampl_HF");
2188  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2189  cPED->Divide(2, 1);
2190  for (int test = 1; test <= 2; test++) {
2191  cPED->cd(test);
2192  gPad->SetGridy();
2193  gPad->SetGridx();
2194  gPad->SetLogz();
2195  if (test == 1)
2196  Map_Ped[test][sub]->SetXTitle("Pedestal, fC \b");
2197  if (test == 2)
2198  Map_Ped[test][sub]->SetXTitle("pedestal Width, fC \b");
2199  Map_Ped[test][sub]->SetYTitle("Amplitude, fC \b");
2200  Map_Ped[test][sub]->SetZTitle("entries \b");
2201  if (test == 1)
2202  sprintf(str, "Cap0 Pedestal vs Amplitude \b");
2203  if (test == 2)
2204  sprintf(str, "Cap0 pedestalWidth vs Amplitude \b");
2205  Map_Ped[test][sub]->SetTitle(str);
2206  Map_Ped[test][sub]->Draw("COLZ");
2207  // Map_Ped[test][sub]->GetYaxis()->SetRangeUser(0, 72.);
2208  // Map_Ped[test][sub]->GetZaxis()->SetRangeUser(0.0001, 1.);
2209  cPED->Modified();
2210  cPED->Update();
2211  } // test 1,2
2212  if (sub == 1) {
2213  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHB.png");
2214  cPED->Clear();
2215  }
2216  if (sub == 2) {
2217  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHE.png");
2218  cPED->Clear();
2219  }
2220  if (sub == 3) {
2221  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHO.png");
2222  cPED->Clear();
2223  }
2224  if (sub == 4) {
2225  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHF.png");
2226  cPED->Clear();
2227  }
2228  } // end sub
2229 
2230  //+++++++++++++++++++++++++++++++++++
2231  //Test 41 Time Slices shape for good and bad channels
2232  //++++++++++++++++++++++++++++++++++++
2233 
2234  cONE->Clear();
2235  hist_GoodTSshape[1] = (TH1F *)dir->FindObjectAny("h_shape_good_channels_HB");
2236  hist_GoodTSshape[2] = (TH1F *)dir->FindObjectAny("h_shape_good_channels_HE");
2237  hist_GoodTSshape[3] = (TH1F *)dir->FindObjectAny("h_shape_good_channels_HO");
2238  hist_GoodTSshape[4] = (TH1F *)dir->FindObjectAny("h_shape_good_channels_HF");
2239 
2240  hist_GoodTSshape0[1] = (TH1F *)dir->FindObjectAny("h_shape0_good_channels_HB");
2241  hist_GoodTSshape0[2] = (TH1F *)dir->FindObjectAny("h_shape0_good_channels_HE");
2242  hist_GoodTSshape0[3] = (TH1F *)dir->FindObjectAny("h_shape0_good_channels_HO");
2243  hist_GoodTSshape0[4] = (TH1F *)dir->FindObjectAny("h_shape0_good_channels_HF");
2244 
2245  hist_BadTSshape[1] = (TH1F *)dir->FindObjectAny("h_shape_bad_channels_HB");
2246  hist_BadTSshape[2] = (TH1F *)dir->FindObjectAny("h_shape_bad_channels_HE");
2247  hist_BadTSshape[3] = (TH1F *)dir->FindObjectAny("h_shape_bad_channels_HO");
2248  hist_BadTSshape[4] = (TH1F *)dir->FindObjectAny("h_shape_bad_channels_HF");
2249 
2250  hist_BadTSshape0[1] = (TH1F *)dir->FindObjectAny("h_shape0_bad_channels_HB");
2251  hist_BadTSshape0[2] = (TH1F *)dir->FindObjectAny("h_shape0_bad_channels_HE");
2252  hist_BadTSshape0[3] = (TH1F *)dir->FindObjectAny("h_shape0_bad_channels_HO");
2253  hist_BadTSshape0[4] = (TH1F *)dir->FindObjectAny("h_shape0_bad_channels_HF");
2254 
2255  cONE->cd(1);
2256 
2257  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2258 
2259  gPad->SetGridy();
2260  gPad->SetGridx();
2261  gPad->SetLogz();
2262  hist_GoodTSshape[sub]->Divide(hist_GoodTSshape[sub], hist_GoodTSshape0[sub], 1, 1, "B");
2263  hist_GoodTSshape[sub]->SetXTitle("Time slice \b");
2264  hist_GoodTSshape[sub]->SetYTitle("ADC counts \b");
2265  sprintf(str, "Mean ADC Shape \b");
2266  hist_GoodTSshape[sub]->SetTitle(str);
2267  hist_GoodTSshape[sub]->Draw("");
2268  // hist_GoodTSshape[sub]->GetYaxis()->SetRangeUser(0, 72.);
2269  // hist_GoodTSshape[sub]->GetZaxis()->SetRangeUser(0.0001, 1.);
2270  cONE->Modified();
2271  cONE->Update();
2272  if (sub == 1) {
2273  cONE->Print("HistGoodTSshapesHB.png");
2274  cONE->Clear();
2275  }
2276  if (sub == 2) {
2277  cONE->Print("HistGoodTSshapesHE.png");
2278  cONE->Clear();
2279  }
2280  if (sub == 3) {
2281  cONE->Print("HistGoodTSshapesHO.png");
2282  cONE->Clear();
2283  }
2284  if (sub == 4) {
2285  cONE->Print("HistGoodTSshapesHF.png");
2286  cONE->Clear();
2287  }
2288  } // end sub
2289 
2290  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2291 
2292  gPad->SetGridy();
2293  gPad->SetGridx();
2294  gPad->SetLogz();
2295  hist_BadTSshape[sub]->Divide(hist_BadTSshape[sub], hist_BadTSshape0[sub], 1, 1, "B");
2296  hist_BadTSshape[sub]->SetXTitle("Time slice \b");
2297  hist_BadTSshape[sub]->SetYTitle("ADC counts \b");
2298  sprintf(str, "Mean ADC Shape \b");
2299  hist_BadTSshape[sub]->SetTitle(str);
2300  hist_BadTSshape[sub]->Draw("");
2301  // hist_BadTSshape[sub]->GetYaxis()->SetRangeUser(0, 72.);
2302  // hist_BadTSshape[sub]->GetZaxis()->SetRangeUser(0.0001, 1.);
2303  cONE->Modified();
2304  cONE->Update();
2305  if (sub == 1) {
2306  cONE->Print("HistBadTSshapesHB.png");
2307  cONE->Clear();
2308  }
2309  if (sub == 2) {
2310  cONE->Print("HistBadTSshapesHE.png");
2311  cONE->Clear();
2312  }
2313  if (sub == 3) {
2314  cONE->Print("HistBadTSshapesHO.png");
2315  cONE->Clear();
2316  }
2317  if (sub == 4) {
2318  cONE->Print("HistBadTSshapesHF.png");
2319  cONE->Clear();
2320  }
2321  } // end sub
2322 
2323  //+++++++++++++++++++++++++++++
2324  // Entries in different TSs:
2325  //+++++++++++++++++++++++++++++
2326  Map_SUBTS[1][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1TS2_HB");
2327  Map_SUBTS[1][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2TS2_HB");
2328  Map_SUBTS[1][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3TS2_HB");
2329  Map_SUBTS[1][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TS2_HB");
2330 
2331  Map_SUBTS[2][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1TS2_HE");
2332  Map_SUBTS[2][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2TS2_HE");
2333  Map_SUBTS[2][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3TS2_HE");
2334  Map_SUBTS[2][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TS2_HE");
2335  Map_SUBTS[2][5] = (TH2F *)dir->FindObjectAny("h_mapDepth5TS2_HE");
2336  Map_SUBTS[2][6] = (TH2F *)dir->FindObjectAny("h_mapDepth6TS2_HE");
2337  Map_SUBTS[2][7] = (TH2F *)dir->FindObjectAny("h_mapDepth7TS2_HE");
2338 
2339  Map_SUBTS[3][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TS012_HO");
2340 
2341  Map_SUBTS[4][1] = (TH2F *)dir->FindObjectAny("h_mapDepth1TS1_HF");
2342  Map_SUBTS[4][2] = (TH2F *)dir->FindObjectAny("h_mapDepth2TS1_HF");
2343  Map_SUBTS[4][3] = (TH2F *)dir->FindObjectAny("h_mapDepth3TS1_HF");
2344  Map_SUBTS[4][4] = (TH2F *)dir->FindObjectAny("h_mapDepth4TS1_HF");
2345 
2347  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
2348  // if (sub==1) cHB->Divide(2,1);
2349  if (sub == 1)
2350  cHB->Divide(2, 2);
2351  // if (sub==2) cHE->Divide(3,1);
2352  if (sub == 2)
2353  cHE->Divide(3, 3);
2354  if (sub == 3)
2355  cONE->Divide(1, 1);
2356  // if (sub==4) cHF->Divide(2,1);
2357  if (sub == 4)
2358  cHF->Divide(2, 2);
2359  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2360  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2361  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
2362  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
2363  if (sub == 1)
2364  cHB->cd(k);
2365  if (sub == 2)
2366  cHE->cd(k);
2367  if (sub == 3)
2368  cONE->cd(k - 3);
2369  if (sub == 4)
2370  cHF->cd(k);
2371  Map_SUBTS[sub][k]->Divide(Map_SUBTS[sub][k], Map_SUB[sub][k], 1, 1, "B");
2372  gPad->SetGridy();
2373  gPad->SetGridx();
2374  gPad->SetLogz();
2375  if (sub == 1)
2376  sprintf(str, "HB, Depth%d \b", k);
2377  if (sub == 2)
2378  sprintf(str, "HE, Depth%d \b", k);
2379  if (sub == 3)
2380  sprintf(str, "HO, Depth%d \b", k);
2381  if (sub == 4)
2382  sprintf(str, "HF, Depth%d \b", k);
2383  Map_SUBTS[sub][k]->SetTitle(str);
2384  Map_SUBTS[sub][k]->SetXTitle("#eta \b");
2385  Map_SUBTS[sub][k]->SetYTitle("#phi \b");
2386  Map_SUBTS[sub][k]->SetZTitle("Rate \b");
2387  if (sub == 3)
2388  Map_SUBTS[sub][k]->SetTitleOffset(0.8, "Z");
2389  Map_SUBTS[sub][k]->Draw("COLZ");
2390  Map_SUBTS[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2391  Map_SUBTS[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2392  if (sub == 1) {
2393  cHB->Modified();
2394  cHB->Update();
2395  }
2396  if (sub == 2) {
2397  cHE->Modified();
2398  cHE->Update();
2399  }
2400  if (sub == 3) {
2401  cONE->Modified();
2402  cONE->Update();
2403  }
2404  if (sub == 4) {
2405  cHF->Modified();
2406  cHF->Update();
2407  }
2408  } //end depth
2409 
2410  if (sub == 1) {
2411  cHB->Print("Hist_mapDepthAllTS2_HB.png");
2412  cHB->Clear();
2413  }
2414  if (sub == 2) {
2415  cHE->Print("Hist_mapDepthAllTS2_HE.png");
2416  cHE->Clear();
2417  }
2418  if (sub == 3) {
2419  cONE->Print("Hist_mapDepthAllTS012_HO.png");
2420  cONE->Clear();
2421  }
2422  if (sub == 4) {
2423  cHF->Print("Hist_mapDepthAllTS1_HF.png");
2424  cHF->Clear();
2425  }
2426  } // end sub
2427 
2429 
2430  /*
2431  //+++++++++++++++++++++++++++++++++++
2432 //Test 42 ADC in TS distributions
2433 //++++++++++++++++++++++++++++++++++++
2434 
2435 std::cout<<" We are here to print ADC "<<std::endl;
2436 
2437  hist_ADC_All[1] = (TH1F*)dir->FindObjectAny("h_ADC_HB");
2438  hist_ADC_All[2] = (TH1F*)dir->FindObjectAny("h_ADC_HE");
2439  hist_ADC_All[3] = (TH1F*)dir->FindObjectAny("h_ADC_HO");
2440  hist_ADC_All[4] = (TH1F*)dir->FindObjectAny("h_ADC_HF");
2441 
2442 
2443  hist_ADC_DS[1][1] = (TH1F*)dir->FindObjectAny("h_ADC_HBdepth1");
2444  hist_ADC_DS[1][2] = (TH1F*)dir->FindObjectAny("h_ADC_HBdepth2");
2445  hist_ADC_DS[2][1] = (TH1F*)dir->FindObjectAny("h_ADC_HEdepth1");
2446  hist_ADC_DS[2][2] = (TH1F*)dir->FindObjectAny("h_ADC_HEdepth2");
2447  hist_ADC_DS[2][3] = (TH1F*)dir->FindObjectAny("h_ADC_HEdepth3");
2448  hist_ADC_DS[3][4] = (TH1F*)dir->FindObjectAny("h_ADC_HOdepth4");
2449  hist_ADC_DS[4][1] = (TH1F*)dir->FindObjectAny("h_ADC_HFdepth1");
2450  hist_ADC_DS[4][2] = (TH1F*)dir->FindObjectAny("h_ADC_HFdepth2");
2451 
2452 
2453  cONE->Clear();
2454  cONE->Divide(1,1);
2455  cONE->cd(1);
2456 
2457  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2458  gPad->SetGridy();
2459  gPad->SetGridx();
2460  gPad->SetLogy();
2461  hist_ADC_All[sub]->SetXTitle("ADC counts \b");
2462  hist_ADC_All[sub]->SetYTitle("Number of channels-events \b");
2463  if (sub==1) sprintf(str,"ADC counts Distribution HB\b");
2464  if (sub==2) sprintf(str,"ADC counts Distribution HE\b");
2465  if (sub==3) sprintf(str,"ADC counts Distribution HO\b");
2466  if (sub==4) sprintf(str,"ADC counts Distribution HF\b");
2467  hist_ADC_All[sub]->SetTitle(str);
2468  hist_ADC_All[sub]->Draw("");
2469  // hist_ADC_All[sub]->GetYaxis()->SetRangeUser(0, 72.);
2470  hist_ADC_All[sub]->GetXaxis()->SetRangeUser(0.000, 1000.);
2471  cONE->Modified(); cONE->Update();
2472  if (sub==1) {cONE->Print("Hist_ADC_HB_All.png"); cONE->Clear();}
2473  if (sub==2) {cONE->Print("Hist_ADC_HE_All.png"); cONE->Clear();}
2474  if (sub==3) {cONE->Print("Hist_ADC_HO_All.png"); cONE->Clear();}
2475  if (sub==4) {cONE->Print("Hist_ADC_HF_All.png"); cONE->Clear();}
2476  }// end sub
2477 
2478 
2479  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2480  if (sub==1) cHB->Divide(2,1);
2481  if (sub==2) cHE->Divide(3,1);
2482  if (sub==3) cONE->Divide(1,1);
2483  if (sub==4) cHB->Divide(2,1);
2484  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2485  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2486  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2487  if (sub==1) cHB->cd(k);
2488  if (sub==2) cHE->cd(k);
2489  if (sub==3) cONE->cd(k-3);
2490  if (sub==4) cHB->cd(k);
2491  gPad->SetGridy();
2492  gPad->SetGridx();
2493  gPad->SetLogy();
2494  hist_ADC_DS[sub][k]->SetXTitle("ADC counts \b");
2495  hist_ADC_DS[sub][k]->SetYTitle("Number of channels-events \b");
2496  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2497  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2498  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2499  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2500  hist_ADC_DS[sub][k]->SetTitle(str);
2501  hist_ADC_DS[sub][k]->Draw("");
2502  // hist_ADC_DS[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2503  hist_ADC_DS[sub][k]->GetXaxis()->SetRangeUser(0.000, 1000.);
2504  if (sub==1) {cHB->Modified(); cHB->Update();}
2505  if (sub==2) {cHE->Modified(); cHE->Update();}
2506  if (sub==3) {cONE->Modified();cONE->Update();}
2507  if (sub==4) {cHB->Modified(); cHB->Update();}
2508  }//end depth
2509  if (sub==1) {cHB->Print("Hist_ADC_HB_DS.png"); cHB->Clear();}
2510  if (sub==2) {cHE->Print("Hist_ADC_HE_DS.png"); cHE->Clear();}
2511  if (sub==3) {cONE->Print("Hist_ADC_HO_DS.png"); cONE->Clear();}
2512  if (sub==4) {cHB->Print("Hist_ADC_HF_DS.png"); cHB->Clear();}
2513  }// end sub
2514 
2515 
2516  //+++++++++++++++++++++++++++++++++++
2517 //Test 43 Sum ADC in TS distributions
2518 //++++++++++++++++++++++++++++++++++++
2519 
2520  hist_SumADC[1][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HB");
2521  hist_SumADC[1][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HB");
2522  hist_SumADC[2][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HE");
2523  hist_SumADC[2][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HE");
2524  hist_SumADC[2][3] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth3_HE");
2525  hist_SumADC[3][4] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth4_HO");
2526  hist_SumADC[4][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HF");
2527  hist_SumADC[4][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HF");
2528 
2529  hist_SumADC0[1][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HB0");
2530  hist_SumADC0[1][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HB0");
2531  hist_SumADC0[2][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HE0");
2532  hist_SumADC0[2][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HE0");
2533  hist_SumADC0[2][3] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth3_HE0");
2534  hist_SumADC0[3][4] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth4_HO0");
2535  hist_SumADC0[4][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HF0");
2536  hist_SumADC0[4][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HF0");
2537 
2538  hist_SumADC1[1][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HB1");
2539  hist_SumADC1[1][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HB1");
2540  hist_SumADC1[2][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HE1");
2541  hist_SumADC1[2][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HE1");
2542  hist_SumADC1[2][3] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth3_HE1");
2543  hist_SumADC1[3][4] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth4_HO1");
2544  hist_SumADC1[4][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HF1");
2545  hist_SumADC1[4][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HF1");
2546 
2547  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2548  if (sub==1) cHB->Divide(2,1);
2549  if (sub==2) cHE->Divide(3,1);
2550  if (sub==3) cONE->Divide(1,1);
2551  if (sub==4) cHB->Divide(2,1);
2552  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2553  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2554  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2555  if (sub==1) cHB->cd(k);
2556  if (sub==2) cHE->cd(k);
2557  if (sub==3) cONE->cd(k-3);
2558  if (sub==4) cHB->cd(k);
2559  gPad->SetGridy();
2560  gPad->SetGridx();
2561  gPad->SetLogy();
2562  hist_SumADC[sub][k]->SetXTitle("ADC sum \b");
2563  hist_SumADC[sub][k]->SetYTitle("Number of channels-events \b");
2564  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2565  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2566  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2567  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2568  hist_SumADC[sub][k]->SetTitle(str);
2569  hist_SumADC[sub][k]->Draw("");
2570  // hist_SumADC[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2571  // hist_SumADC[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2572  if (sub==1) {cHB->Modified(); cHB->Update();}
2573  if (sub==2) {cHE->Modified(); cHE->Update();}
2574  if (sub==3) {cONE->Modified();cONE->Update();}
2575  if (sub==4) {cHB->Modified(); cHB->Update();}
2576  }//end depth
2577  if (sub==1) {cHB->Print("Hist_SumADC_HB.png"); cHB->Clear();}
2578  if (sub==2) {cHE->Print("Hist_SumADC_HE.png"); cHE->Clear();}
2579  if (sub==3) {cONE->Print("Hist_SumADC_HO.png"); cONE->Clear();}
2580  if (sub==4) {cHB->Print("Hist_SumADC_HF.png"); cHB->Clear();}
2581  }// end sub
2582 
2583 
2584  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2585  if (sub==1) cHB->Divide(2,1);
2586  if (sub==2) cHE->Divide(3,1);
2587  if (sub==3) cONE->Divide(1,1);
2588  if (sub==4) cHB->Divide(2,1);
2589  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2590  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2591  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2592  if (sub==1) cHB->cd(k);
2593  if (sub==2) cHE->cd(k);
2594  if (sub==3) cONE->cd(k-3);
2595  if (sub==4) cHB->cd(k);
2596  gPad->SetGridy();
2597  gPad->SetGridx();
2598  gPad->SetLogy();
2599  hist_SumADC0[sub][k]->SetXTitle("ADC sum \b");
2600  hist_SumADC0[sub][k]->SetYTitle("Number of channels-events \b");
2601  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2602  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2603  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2604  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2605  hist_SumADC0[sub][k]->SetTitle(str);
2606  hist_SumADC0[sub][k]->Draw("");
2607  // hist_SumADC0[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2608  // hist_SumADC0[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2609  if (sub==1) {cHB->Modified(); cHB->Update();}
2610  if (sub==2) {cHE->Modified(); cHE->Update();}
2611  if (sub==3) {cONE->Modified();cONE->Update();}
2612  if (sub==4) {cHB->Modified(); cHB->Update();}
2613  }//end depth
2614  if (sub==1) {cHB->Print("Hist_SumADC_HB0.png"); cHB->Clear();}
2615  if (sub==2) {cHE->Print("Hist_SumADC_HE0.png"); cHE->Clear();}
2616  if (sub==3) {cONE->Print("Hist_SumADC_HO0.png"); cONE->Clear();}
2617  if (sub==4) {cHB->Print("Hist_SumADC_HF0.png"); cHB->Clear();}
2618  }// end sub
2619 
2620  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2621  if (sub==1) cHB->Divide(2,1);
2622  if (sub==2) cHE->Divide(3,1);
2623  if (sub==3) cONE->Divide(1,1);
2624  if (sub==4) cHB->Divide(2,1);
2625  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2626  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2627  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2628  if (sub==1) cHB->cd(k);
2629  if (sub==2) cHE->cd(k);
2630  if (sub==3) cONE->cd(k-3);
2631  if (sub==4) cHB->cd(k);
2632  gPad->SetGridy();
2633  gPad->SetGridx();
2634  gPad->SetLogy();
2635  hist_SumADC1[sub][k]->SetXTitle("ADC sum \b");
2636  hist_SumADC1[sub][k]->SetYTitle("Number of channels-events \b");
2637  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2638  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2639  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2640  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2641  hist_SumADC1[sub][k]->SetTitle(str);
2642  hist_SumADC1[sub][k]->Draw("");
2643  // hist_SumADC1[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2644  // hist_SumADC1[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2645  if (sub==1) {cHB->Modified(); cHB->Update();}
2646  if (sub==2) {cHE->Modified(); cHE->Update();}
2647  if (sub==3) {cONE->Modified();cONE->Update();}
2648  if (sub==4) {cHB->Modified(); cHB->Update();}
2649  }//end depth
2650  if (sub==1) {cHB->Print("Hist_SumADC_HB1.png"); cHB->Clear();}
2651  if (sub==2) {cHE->Print("Hist_SumADC_HE1.png"); cHE->Clear();}
2652  if (sub==3) {cONE->Print("Hist_SumADC_HO1.png"); cONE->Clear();}
2653  if (sub==4) {cHB->Print("Hist_SumADC_HF1.png"); cHB->Clear();}
2654  }// end sub
2655 
2656 */
2657 
2663 
2664  /*
2665  depth=5 all
2666  i=1-82 in initial histo
2667  j=i-1 in massives
2668 
2669  j= 13 23 (11) 12 25 (!!!)
2670  j-41 in histo
2671  -28 -18 (11) -29 -16
2672 
2673  j= 59 69 (11) 57 70 (!!!)
2674  j-41 in histo
2675  18 28 (11) 16 29
2676  */
2677 
2678  const int nsub = 4;
2679  const int neta = 82;
2680  const int nphi = 72;
2681  int njeta = neta;
2682  int njphi = nphi;
2683  //const int ndepth = 7;
2684  int ndepth;
2688 
2693 
2697  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
2698  //ndepth = k_max[5];
2699  ndepth = 4;
2700  double adigiHB[ndepth][njeta][njphi];
2701  double digivarianceHB[ndepth][njeta][njphi];
2702  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Digi HB
2703  TH2F *amplitudechannel1HB1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HB1");
2704  TH2F *amplitudechannel0HB1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HB1");
2705  TH2F *amplitudechannelHB1 = (TH2F *)amplitudechannel1HB1->Clone("amplitudechannelHB1");
2706  amplitudechannelHB1->Divide(amplitudechannel1HB1, amplitudechannel0HB1, 1, 1, "B");
2707  TH2F *amplitudechannel1HB2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HB2");
2708  TH2F *amplitudechannel0HB2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HB2");
2709  TH2F *amplitudechannelHB2 = (TH2F *)amplitudechannel1HB2->Clone("amplitudechannelHB2");
2710  amplitudechannelHB2->Divide(amplitudechannel1HB2, amplitudechannel0HB2, 1, 1, "B");
2711  TH2F *amplitudechannel1HB3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HB3");
2712  TH2F *amplitudechannel0HB3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HB3");
2713  TH2F *amplitudechannelHB3 = (TH2F *)amplitudechannel1HB3->Clone("amplitudechannelHB3");
2714  amplitudechannelHB3->Divide(amplitudechannel1HB3, amplitudechannel0HB3, 1, 1, "B");
2715  TH2F *amplitudechannel1HB4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HB4");
2716  TH2F *amplitudechannel0HB4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HB4");
2717  TH2F *amplitudechannelHB4 = (TH2F *)amplitudechannel1HB4->Clone("amplitudechannelHB4");
2718  amplitudechannelHB4->Divide(amplitudechannel1HB4, amplitudechannel0HB4, 1, 1, "B");
2719  for (int jeta = 0; jeta < njeta; jeta++) {
2720  //====================================================================== PHI normalization & put R into massive adigiHB
2721  //preparation for PHI normalization:
2722  double sumdigiHB0 = 0;
2723  int nsumdigiHB0 = 0;
2724  double sumdigiHB1 = 0;
2725  int nsumdigiHB1 = 0;
2726  double sumdigiHB2 = 0;
2727  int nsumdigiHB2 = 0;
2728  double sumdigiHB3 = 0;
2729  int nsumdigiHB3 = 0;
2730  for (int jphi = 0; jphi < njphi; jphi++) {
2731  adigiHB[0][jeta][jphi] = amplitudechannelHB1->GetBinContent(jeta + 1, jphi + 1);
2732  adigiHB[1][jeta][jphi] = amplitudechannelHB2->GetBinContent(jeta + 1, jphi + 1);
2733  adigiHB[2][jeta][jphi] = amplitudechannelHB3->GetBinContent(jeta + 1, jphi + 1);
2734  adigiHB[3][jeta][jphi] = amplitudechannelHB4->GetBinContent(jeta + 1, jphi + 1);
2735  if (adigiHB[0][jeta][jphi] > 0.) {
2736  sumdigiHB0 += adigiHB[0][jeta][jphi];
2737  ++nsumdigiHB0;
2738  }
2739  if (adigiHB[1][jeta][jphi] > 0.) {
2740  sumdigiHB1 += adigiHB[1][jeta][jphi];
2741  ++nsumdigiHB1;
2742  }
2743  if (adigiHB[2][jeta][jphi] > 0.) {
2744  sumdigiHB2 += adigiHB[2][jeta][jphi];
2745  ++nsumdigiHB2;
2746  }
2747  if (adigiHB[3][jeta][jphi] > 0.) {
2748  sumdigiHB3 += adigiHB[3][jeta][jphi];
2749  ++nsumdigiHB3;
2750  }
2751  } // phi
2752  // PHI normalization:
2753  for (int jphi = 0; jphi < njphi; jphi++) {
2754  if (adigiHB[0][jeta][jphi] > 0.)
2755  adigiHB[0][jeta][jphi] /= (sumdigiHB0 / nsumdigiHB0);
2756  if (adigiHB[1][jeta][jphi] > 0.)
2757  adigiHB[1][jeta][jphi] /= (sumdigiHB1 / nsumdigiHB1);
2758  if (adigiHB[2][jeta][jphi] > 0.)
2759  adigiHB[2][jeta][jphi] /= (sumdigiHB2 / nsumdigiHB2);
2760  if (adigiHB[3][jeta][jphi] > 0.)
2761  adigiHB[3][jeta][jphi] /= (sumdigiHB3 / nsumdigiHB3);
2762  } // phi
2763  } //eta
2764  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
2765  //======================================================================
2766  //======================================================================
2767  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
2768  c1x0->Clear();
2770  c1x0->Divide(1, 1);
2771  c1x0->cd(1);
2772  TH2F *GefzRdigiHB42D = new TH2F("GefzRdigiHB42D", "", neta, -41., 41., nphi, 0., 72.);
2773  TH2F *GefzRdigiHB42D0 = new TH2F("GefzRdigiHB42D0", "", neta, -41., 41., nphi, 0., 72.);
2774  TH2F *GefzRdigiHB42DF = (TH2F *)GefzRdigiHB42D0->Clone("GefzRdigiHB42DF");
2775  for (int i = 0; i < ndepth; i++) {
2776  for (int jeta = 0; jeta < neta; jeta++) {
2777  for (int jphi = 0; jphi < nphi; jphi++) {
2778  double ccc1 = adigiHB[i][jeta][jphi];
2779  int k2plot = jeta - 41;
2780  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
2781  if (ccc1 != 0.) {
2782  GefzRdigiHB42D->Fill(kkk, jphi, ccc1);
2783  GefzRdigiHB42D0->Fill(kkk, jphi, 1.);
2784  }
2785  }
2786  }
2787  }
2788  GefzRdigiHB42DF->Divide(GefzRdigiHB42D, GefzRdigiHB42D0, 1, 1, "B"); // average A
2789  gPad->SetGridy();
2790  gPad->SetGridx(); // gPad->SetLogz();
2791  GefzRdigiHB42DF->SetMarkerStyle(20);
2792  GefzRdigiHB42DF->SetMarkerSize(0.4);
2793  GefzRdigiHB42DF->GetZaxis()->SetLabelSize(0.08);
2794  GefzRdigiHB42DF->SetXTitle("<R>_depth #eta \b");
2795  GefzRdigiHB42DF->SetYTitle(" #phi \b");
2796  GefzRdigiHB42DF->SetZTitle("<R>_depth \b");
2797  GefzRdigiHB42DF->SetMarkerColor(2);
2798  GefzRdigiHB42DF->SetLineColor(
2799  0); // GefzRdigiHB42DF->SetMaximum(1.000); // GefzRdigiHB42DF->SetMinimum(1.0);
2800  GefzRdigiHB42DF->Draw("COLZ");
2802  c1x0->Update();
2803  c1x0->Print("RdigiGeneralD2PhiSymmetryHB.png");
2804  c1x0->Clear();
2805  // clean-up
2806  if (GefzRdigiHB42D)
2807  delete GefzRdigiHB42D;
2808  if (GefzRdigiHB42D0)
2809  delete GefzRdigiHB42D0;
2810  if (GefzRdigiHB42DF)
2811  delete GefzRdigiHB42DF;
2812  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
2813  //======================================================================
2814  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
2815  c1x1->Clear();
2817  c1x1->Divide(1, 1);
2818  c1x1->cd(1);
2819  TH1F *GefzRdigiHB41D = new TH1F("GefzRdigiHB41D", "", nphi, 0., 72.);
2820  TH1F *GefzRdigiHB41D0 = new TH1F("GefzRdigiHB41D0", "", nphi, 0., 72.);
2821  TH1F *GefzRdigiHB41DF = (TH1F *)GefzRdigiHB41D0->Clone("GefzRdigiHB41DF");
2822  for (int jphi = 0; jphi < nphi; jphi++) {
2823  for (int jeta = 0; jeta < neta; jeta++) {
2824  for (int i = 0; i < ndepth; i++) {
2825  double ccc1 = adigiHB[i][jeta][jphi];
2826  if (ccc1 != 0.) {
2827  GefzRdigiHB41D->Fill(jphi, ccc1);
2828  GefzRdigiHB41D0->Fill(jphi, 1.);
2829  }
2830  }
2831  }
2832  }
2833  GefzRdigiHB41DF->Divide(GefzRdigiHB41D, GefzRdigiHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
2834  GefzRdigiHB41D0->Sumw2();
2835  // for (int jphi=1;jphi<73;jphi++) {GefzRdigiHB41DF->SetBinError(jphi,0.01);}
2836  gPad->SetGridy();
2837  gPad->SetGridx(); // gPad->SetLogz();
2838  GefzRdigiHB41DF->SetMarkerStyle(20);
2839  GefzRdigiHB41DF->SetMarkerSize(1.4);
2840  GefzRdigiHB41DF->GetZaxis()->SetLabelSize(0.08);
2841  GefzRdigiHB41DF->SetXTitle("#phi \b");
2842  GefzRdigiHB41DF->SetYTitle(" <R> \b");
2843  GefzRdigiHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
2844  GefzRdigiHB41DF->SetMarkerColor(4);
2845  GefzRdigiHB41DF->SetLineColor(
2846  4); // GefzRdigiHB41DF->SetMinimum(0.8); // GefzRdigiHB41DF->SetMaximum(1.000);
2847  GefzRdigiHB41DF->Draw("Error");
2849  c1x1->Update();
2850  c1x1->Print("RdigiGeneralD1PhiSymmetryHB.png");
2851  c1x1->Clear();
2852  // clean-up
2853  if (GefzRdigiHB41D)
2854  delete GefzRdigiHB41D;
2855  if (GefzRdigiHB41D0)
2856  delete GefzRdigiHB41D0;
2857  if (GefzRdigiHB41DF)
2858  delete GefzRdigiHB41DF;
2859  //========================================================================================== 4
2860  //======================================================================
2861  //======================================================================1D plot: R vs phi , different eta, depth=1
2862  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
2863  c3x5->Clear();
2865  c3x5->Divide(4, 4);
2866  c3x5->cd(1);
2867  int kcountHBpositivedirectionDigi1 = 1;
2868  TH1F *h2CeffHBpositivedirectionDigi1 = new TH1F("h2CeffHBpositivedirectionDigi1", "", nphi, 0., 72.);
2869  for (int jeta = 0; jeta < njeta; jeta++) {
2870  // positivedirectionDigi:
2871  if (jeta - 41 >= 0) {
2872  // for (int i=0;i<ndepth;i++) {
2873  // depth=1
2874  for (int i = 0; i < 1; i++) {
2875  TH1F *HBpositivedirectionDigi1 = (TH1F *)h2CeffHBpositivedirectionDigi1->Clone("twod1");
2876  float ccctest = 0; // to avoid empty massive elements
2877  for (int jphi = 0; jphi < nphi; jphi++) {
2878  double ccc1 = adigiHB[i][jeta][jphi];
2879  if (ccc1 != 0.) {
2880  HBpositivedirectionDigi1->Fill(jphi, ccc1);
2881  ccctest = 1.; //HBpositivedirectionDigi1->SetBinError(i,0.01);
2882  }
2883  } // for jphi
2884  if (ccctest > 0.) {
2885  // cout<<"444 kcountHBpositivedirectionDigi1 = "<<kcountHBpositivedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
2886  c3x5->cd(kcountHBpositivedirectionDigi1);
2887  HBpositivedirectionDigi1->SetMarkerStyle(20);
2888  HBpositivedirectionDigi1->SetMarkerSize(0.4);
2889  HBpositivedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
2890  HBpositivedirectionDigi1->SetXTitle("HBpositivedirectionDigi1 \b");
2891  HBpositivedirectionDigi1->SetMarkerColor(2);
2892  HBpositivedirectionDigi1->SetLineColor(0);
2893  gPad->SetGridy();
2894  gPad->SetGridx();
2895  // gPad->SetLogy();
2896  if (kcountHBpositivedirectionDigi1 == 1)
2897  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
2898  if (kcountHBpositivedirectionDigi1 == 2)
2899  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
2900  if (kcountHBpositivedirectionDigi1 == 3)
2901  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
2902  if (kcountHBpositivedirectionDigi1 == 4)
2903  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
2904  if (kcountHBpositivedirectionDigi1 == 5)
2905  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
2906  if (kcountHBpositivedirectionDigi1 == 6)
2907  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
2908  if (kcountHBpositivedirectionDigi1 == 7)
2909  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
2910  if (kcountHBpositivedirectionDigi1 == 8)
2911  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
2912  if (kcountHBpositivedirectionDigi1 == 9)
2913  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
2914  if (kcountHBpositivedirectionDigi1 == 10)
2915  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
2916  if (kcountHBpositivedirectionDigi1 == 11)
2917  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
2918  if (kcountHBpositivedirectionDigi1 == 12)
2919  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
2920  if (kcountHBpositivedirectionDigi1 == 13)
2921  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
2922  if (kcountHBpositivedirectionDigi1 == 14)
2923  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
2924  if (kcountHBpositivedirectionDigi1 == 15)
2925  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
2926  if (kcountHBpositivedirectionDigi1 == 16)
2927  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
2928  HBpositivedirectionDigi1->Draw("Error");
2929  kcountHBpositivedirectionDigi1++;
2930  if (kcountHBpositivedirectionDigi1 > 16)
2931  break; //
2932  } //ccctest>0
2933 
2934  } // for i
2935  } //if(jeta-41 >= 0)
2936  } //for jeta
2938  c3x5->Update();
2939  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
2940  c3x5->Clear();
2941  // clean-up
2942  if (h2CeffHBpositivedirectionDigi1)
2943  delete h2CeffHBpositivedirectionDigi1;
2944 
2945  //========================================================================================== 5
2946  //======================================================================
2947  //======================================================================1D plot: R vs phi , different eta, depth=2
2948  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
2949  c3x5->Clear();
2951  c3x5->Divide(4, 4);
2952  c3x5->cd(1);
2953  int kcountHBpositivedirectionDigi2 = 1;
2954  TH1F *h2CeffHBpositivedirectionDigi2 = new TH1F("h2CeffHBpositivedirectionDigi2", "", nphi, 0., 72.);
2955  for (int jeta = 0; jeta < njeta; jeta++) {
2956  // positivedirectionDigi:
2957  if (jeta - 41 >= 0) {
2958  // for (int i=0;i<ndepth;i++) {
2959  // depth=2
2960  for (int i = 1; i < 2; i++) {
2961  TH1F *HBpositivedirectionDigi2 = (TH1F *)h2CeffHBpositivedirectionDigi2->Clone("twod1");
2962  float ccctest = 0; // to avoid empty massive elements
2963  for (int jphi = 0; jphi < nphi; jphi++) {
2964  double ccc1 = adigiHB[i][jeta][jphi];
2965  if (ccc1 != 0.) {
2966  HBpositivedirectionDigi2->Fill(jphi, ccc1);
2967  ccctest = 1.; //HBpositivedirectionDigi2->SetBinError(i,0.01);
2968  }
2969  } // for jphi
2970  if (ccctest > 0.) {
2971  //cout<<"555 kcountHBpositivedirectionDigi2 = "<<kcountHBpositivedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
2972  c3x5->cd(kcountHBpositivedirectionDigi2);
2973  HBpositivedirectionDigi2->SetMarkerStyle(20);
2974  HBpositivedirectionDigi2->SetMarkerSize(0.4);
2975  HBpositivedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
2976  HBpositivedirectionDigi2->SetXTitle("HBpositivedirectionDigi2 \b");
2977  HBpositivedirectionDigi2->SetMarkerColor(2);
2978  HBpositivedirectionDigi2->SetLineColor(0);
2979  gPad->SetGridy();
2980  gPad->SetGridx();
2981  // gPad->SetLogy();
2982  if (kcountHBpositivedirectionDigi2 == 1)
2983  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
2984  if (kcountHBpositivedirectionDigi2 == 2)
2985  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
2986  if (kcountHBpositivedirectionDigi2 == 3)
2987  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
2988  if (kcountHBpositivedirectionDigi2 == 4)
2989  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
2990  if (kcountHBpositivedirectionDigi2 == 5)
2991  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
2992  if (kcountHBpositivedirectionDigi2 == 6)
2993  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
2994  if (kcountHBpositivedirectionDigi2 == 7)
2995  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
2996  if (kcountHBpositivedirectionDigi2 == 8)
2997  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
2998  if (kcountHBpositivedirectionDigi2 == 9)
2999  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
3000  if (kcountHBpositivedirectionDigi2 == 10)
3001  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
3002  if (kcountHBpositivedirectionDigi2 == 11)
3003  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
3004  if (kcountHBpositivedirectionDigi2 == 12)
3005  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
3006  if (kcountHBpositivedirectionDigi2 == 13)
3007  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
3008  if (kcountHBpositivedirectionDigi2 == 14)
3009  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
3010  if (kcountHBpositivedirectionDigi2 == 15)
3011  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
3012  if (kcountHBpositivedirectionDigi2 == 16)
3013  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
3014  HBpositivedirectionDigi2->Draw("Error");
3015  kcountHBpositivedirectionDigi2++;
3016  if (kcountHBpositivedirectionDigi2 > 16)
3017  break; // 4x6 = 24
3018  } //ccctest>0
3019 
3020  } // for i
3021  } //if(jeta-41 >= 0)
3022  } //for jeta
3024  c3x5->Update();
3025  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
3026  c3x5->Clear();
3027  // clean-up
3028  if (h2CeffHBpositivedirectionDigi2)
3029  delete h2CeffHBpositivedirectionDigi2;
3030  //========================================================================================== 6
3031  //======================================================================
3032  //======================================================================1D plot: R vs phi , different eta, depth=3
3033  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
3034  c3x5->Clear();
3036  c3x5->Divide(4, 4);
3037  c3x5->cd(1);
3038  int kcountHBpositivedirectionDigi3 = 1;
3039  TH1F *h2CeffHBpositivedirectionDigi3 = new TH1F("h2CeffHBpositivedirectionDigi3", "", nphi, 0., 72.);
3040  for (int jeta = 0; jeta < njeta; jeta++) {
3041  // positivedirectionDigi:
3042  if (jeta - 41 >= 0) {
3043  // for (int i=0;i<ndepth;i++) {
3044  // depth=3
3045  for (int i = 2; i < 3; i++) {
3046  TH1F *HBpositivedirectionDigi3 = (TH1F *)h2CeffHBpositivedirectionDigi3->Clone("twod1");
3047  float ccctest = 0; // to avoid empty massive elements
3048  for (int jphi = 0; jphi < nphi; jphi++) {
3049  double ccc1 = adigiHB[i][jeta][jphi];
3050  if (ccc1 != 0.) {
3051  HBpositivedirectionDigi3->Fill(jphi, ccc1);
3052  ccctest = 1.; //HBpositivedirectionDigi3->SetBinError(i,0.01);
3053  }
3054  } // for jphi
3055  if (ccctest > 0.) {
3056  //cout<<"666 kcountHBpositivedirectionDigi3 = "<<kcountHBpositivedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
3057  c3x5->cd(kcountHBpositivedirectionDigi3);
3058  HBpositivedirectionDigi3->SetMarkerStyle(20);
3059  HBpositivedirectionDigi3->SetMarkerSize(0.4);
3060  HBpositivedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
3061  HBpositivedirectionDigi3->SetXTitle("HBpositivedirectionDigi3 \b");
3062  HBpositivedirectionDigi3->SetMarkerColor(2);
3063  HBpositivedirectionDigi3->SetLineColor(0);
3064  gPad->SetGridy();
3065  gPad->SetGridx();
3066  // gPad->SetLogy();
3067  if (kcountHBpositivedirectionDigi3 == 1)
3068  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
3069  if (kcountHBpositivedirectionDigi3 == 2)
3070  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
3071  if (kcountHBpositivedirectionDigi3 == 3)
3072  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
3073  if (kcountHBpositivedirectionDigi3 == 4)
3074  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
3075  if (kcountHBpositivedirectionDigi3 == 5)
3076  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
3077  if (kcountHBpositivedirectionDigi3 == 6)
3078  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
3079  if (kcountHBpositivedirectionDigi3 == 7)
3080  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
3081  if (kcountHBpositivedirectionDigi3 == 8)
3082  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
3083  if (kcountHBpositivedirectionDigi3 == 9)
3084  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
3085  if (kcountHBpositivedirectionDigi3 == 10)
3086  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
3087  if (kcountHBpositivedirectionDigi3 == 11)
3088  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
3089  if (kcountHBpositivedirectionDigi3 == 12)
3090  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
3091  if (kcountHBpositivedirectionDigi3 == 13)
3092  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
3093  if (kcountHBpositivedirectionDigi3 == 14)
3094  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
3095  if (kcountHBpositivedirectionDigi3 == 15)
3096  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
3097  if (kcountHBpositivedirectionDigi3 == 16)
3098  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
3099  HBpositivedirectionDigi3->Draw("Error");
3100  kcountHBpositivedirectionDigi3++;
3101  if (kcountHBpositivedirectionDigi3 > 16)
3102  break; // 4x6 = 24
3103  } //ccctest>0
3104 
3105  } // for i
3106  } //if(jeta-41 >= 0)
3107  } //for jeta
3109  c3x5->Update();
3110  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
3111  c3x5->Clear();
3112  // clean-up
3113  if (h2CeffHBpositivedirectionDigi3)
3114  delete h2CeffHBpositivedirectionDigi3;
3115  //========================================================================================== 7
3116  //======================================================================
3117  //======================================================================1D plot: R vs phi , different eta, depth=4
3118  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
3119  c3x5->Clear();
3121  c3x5->Divide(4, 4);
3122  c3x5->cd(1);
3123  int kcountHBpositivedirectionDigi4 = 1;
3124  TH1F *h2CeffHBpositivedirectionDigi4 = new TH1F("h2CeffHBpositivedirectionDigi4", "", nphi, 0., 72.);
3125 
3126  for (int jeta = 0; jeta < njeta; jeta++) {
3127  // positivedirectionDigi:
3128  if (jeta - 41 >= 0) {
3129  // for (int i=0;i<ndepth;i++) {
3130  // depth=4
3131  for (int i = 3; i < 4; i++) {
3132  TH1F *HBpositivedirectionDigi4 = (TH1F *)h2CeffHBpositivedirectionDigi4->Clone("twod1");
3133 
3134  float ccctest = 0; // to avoid empty massive elements
3135  for (int jphi = 0; jphi < nphi; jphi++) {
3136  double ccc1 = adigiHB[i][jeta][jphi];
3137  if (ccc1 != 0.) {
3138  HBpositivedirectionDigi4->Fill(jphi, ccc1);
3139  ccctest = 1.; //HBpositivedirectionDigi4->SetBinError(i,0.01);
3140  }
3141  } // for jphi
3142  if (ccctest > 0.) {
3143  //cout<<"777 kcountHBpositivedirectionDigi4 = "<<kcountHBpositivedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
3144  c3x5->cd(kcountHBpositivedirectionDigi4);
3145  HBpositivedirectionDigi4->SetMarkerStyle(20);
3146  HBpositivedirectionDigi4->SetMarkerSize(0.4);
3147  HBpositivedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
3148  HBpositivedirectionDigi4->SetXTitle("HBpositivedirectionDigi4 \b");
3149  HBpositivedirectionDigi4->SetMarkerColor(2);
3150  HBpositivedirectionDigi4->SetLineColor(0);
3151  gPad->SetGridy();
3152  gPad->SetGridx();
3153  // gPad->SetLogy();
3154  if (kcountHBpositivedirectionDigi4 == 1)
3155  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
3156  if (kcountHBpositivedirectionDigi4 == 2)
3157  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
3158  if (kcountHBpositivedirectionDigi4 == 3)
3159  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
3160  if (kcountHBpositivedirectionDigi4 == 4)
3161  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
3162  if (kcountHBpositivedirectionDigi4 == 5)
3163  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
3164  if (kcountHBpositivedirectionDigi4 == 6)
3165  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
3166  if (kcountHBpositivedirectionDigi4 == 7)
3167  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
3168  if (kcountHBpositivedirectionDigi4 == 8)
3169  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
3170  if (kcountHBpositivedirectionDigi4 == 9)
3171  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
3172  if (kcountHBpositivedirectionDigi4 == 10)
3173  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
3174  if (kcountHBpositivedirectionDigi4 == 11)
3175  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
3176  if (kcountHBpositivedirectionDigi4 == 12)
3177  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
3178  if (kcountHBpositivedirectionDigi4 == 13)
3179  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
3180  if (kcountHBpositivedirectionDigi4 == 14)
3181  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
3182  if (kcountHBpositivedirectionDigi4 == 15)
3183  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
3184  if (kcountHBpositivedirectionDigi4 == 16)
3185  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
3186  HBpositivedirectionDigi4->Draw("Error");
3187  kcountHBpositivedirectionDigi4++;
3188  if (kcountHBpositivedirectionDigi4 > 16)
3189  break; // 4x6 = 24
3190  } //ccctest>0
3191 
3192  } // for i
3193  } //if(jeta-41 >= 0)
3194  } //for jeta
3196  c3x5->Update();
3197  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
3198  c3x5->Clear();
3199  // clean-up
3200  if (h2CeffHBpositivedirectionDigi4)
3201  delete h2CeffHBpositivedirectionDigi4;
3202 
3203  //========================================================================================== 1114
3204  //======================================================================
3205  //======================================================================1D plot: R vs phi , different eta, depth=1
3206  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
3207  c3x5->Clear();
3209  c3x5->Divide(4, 4);
3210  c3x5->cd(1);
3211  int kcountHBnegativedirectionDigi1 = 1;
3212  TH1F *h2CeffHBnegativedirectionDigi1 = new TH1F("h2CeffHBnegativedirectionDigi1", "", nphi, 0., 72.);
3213  for (int jeta = 0; jeta < njeta; jeta++) {
3214  // negativedirectionDigi:
3215  if (jeta - 41 < 0) {
3216  // for (int i=0;i<ndepth;i++) {
3217  // depth=1
3218  for (int i = 0; i < 1; i++) {
3219  TH1F *HBnegativedirectionDigi1 = (TH1F *)h2CeffHBnegativedirectionDigi1->Clone("twod1");
3220  float ccctest = 0; // to avoid empty massive elements
3221  for (int jphi = 0; jphi < nphi; jphi++) {
3222  double ccc1 = adigiHB[i][jeta][jphi];
3223  if (ccc1 != 0.) {
3224  HBnegativedirectionDigi1->Fill(jphi, ccc1);
3225  ccctest = 1.; //HBnegativedirectionDigi1->SetBinError(i,0.01);
3226  }
3227  } // for jphi
3228  if (ccctest > 0.) {
3229  // cout<<"444 kcountHBnegativedirectionDigi1 = "<<kcountHBnegativedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
3230  c3x5->cd(kcountHBnegativedirectionDigi1);
3231  HBnegativedirectionDigi1->SetMarkerStyle(20);
3232  HBnegativedirectionDigi1->SetMarkerSize(0.4);
3233  HBnegativedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
3234  HBnegativedirectionDigi1->SetXTitle("HBnegativedirectionDigi1 \b");
3235  HBnegativedirectionDigi1->SetMarkerColor(2);
3236  HBnegativedirectionDigi1->SetLineColor(0);
3237  gPad->SetGridy();
3238  gPad->SetGridx();
3239  // gPad->SetLogy();
3240  if (kcountHBnegativedirectionDigi1 == 1)
3241  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
3242  if (kcountHBnegativedirectionDigi1 == 2)
3243  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
3244  if (kcountHBnegativedirectionDigi1 == 3)
3245  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
3246  if (kcountHBnegativedirectionDigi1 == 4)
3247  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
3248  if (kcountHBnegativedirectionDigi1 == 5)
3249  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
3250  if (kcountHBnegativedirectionDigi1 == 6)
3251  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
3252  if (kcountHBnegativedirectionDigi1 == 7)
3253  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
3254  if (kcountHBnegativedirectionDigi1 == 8)
3255  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
3256  if (kcountHBnegativedirectionDigi1 == 9)
3257  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
3258  if (kcountHBnegativedirectionDigi1 == 10)
3259  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
3260  if (kcountHBnegativedirectionDigi1 == 11)
3261  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
3262  if (kcountHBnegativedirectionDigi1 == 12)
3263  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
3264  if (kcountHBnegativedirectionDigi1 == 13)
3265  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
3266  if (kcountHBnegativedirectionDigi1 == 14)
3267  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
3268  if (kcountHBnegativedirectionDigi1 == 15)
3269  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
3270  if (kcountHBnegativedirectionDigi1 == 16)
3271  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
3272  HBnegativedirectionDigi1->Draw("Error");
3273  kcountHBnegativedirectionDigi1++;
3274  if (kcountHBnegativedirectionDigi1 > 16)
3275  break; //
3276  } //ccctest>0
3277 
3278  } // for i
3279  } //if(jeta-41 < 0 )
3280  } //for jeta
3282  c3x5->Update();
3283  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
3284  c3x5->Clear();
3285  // clean-up
3286  if (h2CeffHBnegativedirectionDigi1)
3287  delete h2CeffHBnegativedirectionDigi1;
3288 
3289  //========================================================================================== 1115
3290  //======================================================================
3291  //======================================================================1D plot: R vs phi , different eta, depth=2
3292  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
3293  c3x5->Clear();
3295  c3x5->Divide(4, 4);
3296  c3x5->cd(1);
3297  int kcountHBnegativedirectionDigi2 = 1;
3298  TH1F *h2CeffHBnegativedirectionDigi2 = new TH1F("h2CeffHBnegativedirectionDigi2", "", nphi, 0., 72.);
3299  for (int jeta = 0; jeta < njeta; jeta++) {
3300  // negativedirectionDigi:
3301  if (jeta - 41 < 0) {
3302  // for (int i=0;i<ndepth;i++) {
3303  // depth=2
3304  for (int i = 1; i < 2; i++) {
3305  TH1F *HBnegativedirectionDigi2 = (TH1F *)h2CeffHBnegativedirectionDigi2->Clone("twod1");
3306  float ccctest = 0; // to avoid empty massive elements
3307  for (int jphi = 0; jphi < nphi; jphi++) {
3308  double ccc1 = adigiHB[i][jeta][jphi];
3309  if (ccc1 != 0.) {
3310  HBnegativedirectionDigi2->Fill(jphi, ccc1);
3311  ccctest = 1.; //HBnegativedirectionDigi2->SetBinError(i,0.01);
3312  }
3313  } // for jphi
3314  if (ccctest > 0.) {
3315  //cout<<"555 kcountHBnegativedirectionDigi2 = "<<kcountHBnegativedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
3316  c3x5->cd(kcountHBnegativedirectionDigi2);
3317  HBnegativedirectionDigi2->SetMarkerStyle(20);
3318  HBnegativedirectionDigi2->SetMarkerSize(0.4);
3319  HBnegativedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
3320  HBnegativedirectionDigi2->SetXTitle("HBnegativedirectionDigi2 \b");
3321  HBnegativedirectionDigi2->SetMarkerColor(2);
3322  HBnegativedirectionDigi2->SetLineColor(0);
3323  gPad->SetGridy();
3324  gPad->SetGridx();
3325  // gPad->SetLogy();
3326  if (kcountHBnegativedirectionDigi2 == 1)
3327  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
3328  if (kcountHBnegativedirectionDigi2 == 2)
3329  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
3330  if (kcountHBnegativedirectionDigi2 == 3)
3331  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
3332  if (kcountHBnegativedirectionDigi2 == 4)
3333  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
3334  if (kcountHBnegativedirectionDigi2 == 5)
3335  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
3336  if (kcountHBnegativedirectionDigi2 == 6)
3337  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
3338  if (kcountHBnegativedirectionDigi2 == 7)
3339  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
3340  if (kcountHBnegativedirectionDigi2 == 8)
3341  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
3342  if (kcountHBnegativedirectionDigi2 == 9)
3343  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
3344  if (kcountHBnegativedirectionDigi2 == 10)
3345  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
3346  if (kcountHBnegativedirectionDigi2 == 11)
3347  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
3348  if (kcountHBnegativedirectionDigi2 == 12)
3349  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
3350  if (kcountHBnegativedirectionDigi2 == 13)
3351  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
3352  if (kcountHBnegativedirectionDigi2 == 14)
3353  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
3354  if (kcountHBnegativedirectionDigi2 == 15)
3355  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
3356  if (kcountHBnegativedirectionDigi2 == 16)
3357  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
3358  HBnegativedirectionDigi2->Draw("Error");
3359  kcountHBnegativedirectionDigi2++;
3360  if (kcountHBnegativedirectionDigi2 > 16)
3361  break; // 4x6 = 24
3362  } //ccctest>0
3363 
3364  } // for i
3365  } //if(jeta-41 < 0 )
3366  } //for jeta
3368  c3x5->Update();
3369  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
3370  c3x5->Clear();
3371  // clean-up
3372  if (h2CeffHBnegativedirectionDigi2)
3373  delete h2CeffHBnegativedirectionDigi2;
3374  //========================================================================================== 1116
3375  //======================================================================
3376  //======================================================================1D plot: R vs phi , different eta, depth=3
3377  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
3378  c3x5->Clear();
3380  c3x5->Divide(4, 4);
3381  c3x5->cd(1);
3382  int kcountHBnegativedirectionDigi3 = 1;
3383  TH1F *h2CeffHBnegativedirectionDigi3 = new TH1F("h2CeffHBnegativedirectionDigi3", "", nphi, 0., 72.);
3384  for (int jeta = 0; jeta < njeta; jeta++) {
3385  // negativedirectionDigi:
3386  if (jeta - 41 < 0) {
3387  // for (int i=0;i<ndepth;i++) {
3388  // depth=3
3389  for (int i = 2; i < 3; i++) {
3390  TH1F *HBnegativedirectionDigi3 = (TH1F *)h2CeffHBnegativedirectionDigi3->Clone("twod1");
3391  float ccctest = 0; // to avoid empty massive elements
3392  for (int jphi = 0; jphi < nphi; jphi++) {
3393  double ccc1 = adigiHB[i][jeta][jphi];
3394  if (ccc1 != 0.) {
3395  HBnegativedirectionDigi3->Fill(jphi, ccc1);
3396  ccctest = 1.; //HBnegativedirectionDigi3->SetBinError(i,0.01);
3397  }
3398  } // for jphi
3399  if (ccctest > 0.) {
3400  //cout<<"666 kcountHBnegativedirectionDigi3 = "<<kcountHBnegativedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
3401  c3x5->cd(kcountHBnegativedirectionDigi3);
3402  HBnegativedirectionDigi3->SetMarkerStyle(20);
3403  HBnegativedirectionDigi3->SetMarkerSize(0.4);
3404  HBnegativedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
3405  HBnegativedirectionDigi3->SetXTitle("HBnegativedirectionDigi3 \b");
3406  HBnegativedirectionDigi3->SetMarkerColor(2);
3407  HBnegativedirectionDigi3->SetLineColor(0);
3408  gPad->SetGridy();
3409  gPad->SetGridx();
3410  // gPad->SetLogy();
3411  if (kcountHBnegativedirectionDigi3 == 1)
3412  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
3413  if (kcountHBnegativedirectionDigi3 == 2)
3414  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
3415  if (kcountHBnegativedirectionDigi3 == 3)
3416  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
3417  if (kcountHBnegativedirectionDigi3 == 4)
3418  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
3419  if (kcountHBnegativedirectionDigi3 == 5)
3420  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
3421  if (kcountHBnegativedirectionDigi3 == 6)
3422  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
3423  if (kcountHBnegativedirectionDigi3 == 7)
3424  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
3425  if (kcountHBnegativedirectionDigi3 == 8)
3426  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
3427  if (kcountHBnegativedirectionDigi3 == 9)
3428  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
3429  if (kcountHBnegativedirectionDigi3 == 10)
3430  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
3431  if (kcountHBnegativedirectionDigi3 == 11)
3432  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
3433  if (kcountHBnegativedirectionDigi3 == 12)
3434  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
3435  if (kcountHBnegativedirectionDigi3 == 13)
3436  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
3437  if (kcountHBnegativedirectionDigi3 == 14)
3438  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
3439  if (kcountHBnegativedirectionDigi3 == 15)
3440  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
3441  if (kcountHBnegativedirectionDigi3 == 16)
3442  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
3443 
3444  HBnegativedirectionDigi3->Draw("Error");
3445  kcountHBnegativedirectionDigi3++;
3446  if (kcountHBnegativedirectionDigi3 > 16)
3447  break; // 4x6 = 24
3448  } //ccctest>0
3449 
3450  } // for i
3451  } //if(jeta-41 < 0 )
3452  } //for jeta
3454  c3x5->Update();
3455  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
3456  c3x5->Clear();
3457  // clean-up
3458  if (h2CeffHBnegativedirectionDigi3)
3459  delete h2CeffHBnegativedirectionDigi3;
3460  //========================================================================================== 1117
3461  //======================================================================
3462  //======================================================================1D plot: R vs phi , different eta, depth=4
3463  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
3464  c3x5->Clear();
3466  c3x5->Divide(4, 4);
3467  c3x5->cd(1);
3468  int kcountHBnegativedirectionDigi4 = 1;
3469  TH1F *h2CeffHBnegativedirectionDigi4 = new TH1F("h2CeffHBnegativedirectionDigi4", "", nphi, 0., 72.);
3470 
3471  for (int jeta = 0; jeta < njeta; jeta++) {
3472  // negativedirectionDigi:
3473  if (jeta - 41 < 0) {
3474  // for (int i=0;i<ndepth;i++) {
3475  // depth=4
3476  for (int i = 3; i < 4; i++) {
3477  TH1F *HBnegativedirectionDigi4 = (TH1F *)h2CeffHBnegativedirectionDigi4->Clone("twod1");
3478 
3479  float ccctest = 0; // to avoid empty massive elements
3480  for (int jphi = 0; jphi < nphi; jphi++) {
3481  double ccc1 = adigiHB[i][jeta][jphi];
3482  if (ccc1 != 0.) {
3483  HBnegativedirectionDigi4->Fill(jphi, ccc1);
3484  ccctest = 1.; //HBnegativedirectionDigi4->SetBinError(i,0.01);
3485  }
3486  } // for jphi
3487  if (ccctest > 0.) {
3488  //cout<<"777 kcountHBnegativedirectionDigi4 = "<<kcountHBnegativedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
3489  c3x5->cd(kcountHBnegativedirectionDigi4);
3490  HBnegativedirectionDigi4->SetMarkerStyle(20);
3491  HBnegativedirectionDigi4->SetMarkerSize(0.4);
3492  HBnegativedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
3493  HBnegativedirectionDigi4->SetXTitle("HBnegativedirectionDigi4 \b");
3494  HBnegativedirectionDigi4->SetMarkerColor(2);
3495  HBnegativedirectionDigi4->SetLineColor(0);
3496  gPad->SetGridy();
3497  gPad->SetGridx();
3498  // gPad->SetLogy();
3499  if (kcountHBnegativedirectionDigi4 == 1)
3500  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
3501  if (kcountHBnegativedirectionDigi4 == 2)
3502  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
3503  if (kcountHBnegativedirectionDigi4 == 3)
3504  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
3505  if (kcountHBnegativedirectionDigi4 == 4)
3506  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
3507  if (kcountHBnegativedirectionDigi4 == 5)
3508  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
3509  if (kcountHBnegativedirectionDigi4 == 6)
3510  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
3511  if (kcountHBnegativedirectionDigi4 == 7)
3512  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
3513  if (kcountHBnegativedirectionDigi4 == 8)
3514  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
3515  if (kcountHBnegativedirectionDigi4 == 9)
3516  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
3517  if (kcountHBnegativedirectionDigi4 == 10)
3518  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
3519  if (kcountHBnegativedirectionDigi4 == 11)
3520  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
3521  if (kcountHBnegativedirectionDigi4 == 12)
3522  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
3523  if (kcountHBnegativedirectionDigi4 == 13)
3524  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
3525  if (kcountHBnegativedirectionDigi4 == 14)
3526  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
3527  if (kcountHBnegativedirectionDigi4 == 15)
3528  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
3529  if (kcountHBnegativedirectionDigi4 == 16)
3530  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
3531  HBnegativedirectionDigi4->Draw("Error");
3532  kcountHBnegativedirectionDigi4++;
3533  if (kcountHBnegativedirectionDigi4 > 16)
3534  break; // 4x6 = 24
3535  } //ccctest>0
3536 
3537  } // for i
3538  } //if(jeta-41 < 0 )
3539  } //for jeta
3541  c3x5->Update();
3542  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
3543  c3x5->Clear();
3544  // clean-up
3545  if (h2CeffHBnegativedirectionDigi4)
3546  delete h2CeffHBnegativedirectionDigi4;
3547 
3548  //======================================================================================================================
3549  //======================================================================================================================
3550  //======================================================================================================================
3551  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
3552 
3553  //cout<<" Start Vaiance: preparation *****" <<endl;
3554  TH2F *digiVariance1HB1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HB1");
3555  TH2F *digiVariance0HB1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HB1");
3556  TH2F *digiVarianceHB1 = (TH2F *)digiVariance1HB1->Clone("digiVarianceHB1");
3557  digiVarianceHB1->Divide(digiVariance1HB1, digiVariance0HB1, 1, 1, "B");
3558  TH2F *digiVariance1HB2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HB2");
3559  TH2F *digiVariance0HB2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HB2");
3560  TH2F *digiVarianceHB2 = (TH2F *)digiVariance1HB2->Clone("digiVarianceHB2");
3561  digiVarianceHB2->Divide(digiVariance1HB2, digiVariance0HB2, 1, 1, "B");
3562  TH2F *digiVariance1HB3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HB3");
3563  TH2F *digiVariance0HB3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HB3");
3564  TH2F *digiVarianceHB3 = (TH2F *)digiVariance1HB3->Clone("digiVarianceHB3");
3565  digiVarianceHB3->Divide(digiVariance1HB3, digiVariance0HB3, 1, 1, "B");
3566  TH2F *digiVariance1HB4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HB4");
3567  TH2F *digiVariance0HB4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HB4");
3568  TH2F *digiVarianceHB4 = (TH2F *)digiVariance1HB4->Clone("digiVarianceHB4");
3569  digiVarianceHB4->Divide(digiVariance1HB4, digiVariance0HB4, 1, 1, "B");
3570  //cout<<" Vaiance: preparation DONE *****" <<endl;
3571  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive digivarianceHB
3572  // = sum(R*R)/N - (sum(R)/N)**2
3573  for (int jeta = 0; jeta < njeta; jeta++) {
3574  //preparation for PHI normalization:
3575  double sumdigiHB0 = 0;
3576  int nsumdigiHB0 = 0;
3577  double sumdigiHB1 = 0;
3578  int nsumdigiHB1 = 0;
3579  double sumdigiHB2 = 0;
3580  int nsumdigiHB2 = 0;
3581  double sumdigiHB3 = 0;
3582  int nsumdigiHB3 = 0;
3583  for (int jphi = 0; jphi < njphi; jphi++) {
3584  digivarianceHB[0][jeta][jphi] = digiVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
3585  digivarianceHB[1][jeta][jphi] = digiVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
3586  digivarianceHB[2][jeta][jphi] = digiVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
3587  digivarianceHB[3][jeta][jphi] = digiVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
3588  if (digivarianceHB[0][jeta][jphi] > 0.) {
3589  sumdigiHB0 += digivarianceHB[0][jeta][jphi];
3590  ++nsumdigiHB0;
3591  }
3592  if (digivarianceHB[1][jeta][jphi] > 0.) {
3593  sumdigiHB1 += digivarianceHB[1][jeta][jphi];
3594  ++nsumdigiHB1;
3595  }
3596  if (digivarianceHB[2][jeta][jphi] > 0.) {
3597  sumdigiHB2 += digivarianceHB[2][jeta][jphi];
3598  ++nsumdigiHB2;
3599  }
3600  if (digivarianceHB[3][jeta][jphi] > 0.) {
3601  sumdigiHB3 += digivarianceHB[3][jeta][jphi];
3602  ++nsumdigiHB3;
3603  }
3604  } // phi
3605  // PHI normalization :
3606  for (int jphi = 0; jphi < njphi; jphi++) {
3607  if (digivarianceHB[0][jeta][jphi] > 0.)
3608  digivarianceHB[0][jeta][jphi] /= (sumdigiHB0 / nsumdigiHB0);
3609  if (digivarianceHB[1][jeta][jphi] > 0.)
3610  digivarianceHB[1][jeta][jphi] /= (sumdigiHB1 / nsumdigiHB1);
3611  if (digivarianceHB[2][jeta][jphi] > 0.)
3612  digivarianceHB[2][jeta][jphi] /= (sumdigiHB2 / nsumdigiHB2);
3613  if (digivarianceHB[3][jeta][jphi] > 0.)
3614  digivarianceHB[3][jeta][jphi] /= (sumdigiHB3 / nsumdigiHB3);
3615  } // phi
3616  // digivarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
3617  for (int jphi = 0; jphi < njphi; jphi++) {
3618  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
3619  digivarianceHB[0][jeta][jphi] -= adigiHB[0][jeta][jphi] * adigiHB[0][jeta][jphi];
3620  digivarianceHB[0][jeta][jphi] = fabs(digivarianceHB[0][jeta][jphi]);
3621  digivarianceHB[1][jeta][jphi] -= adigiHB[1][jeta][jphi] * adigiHB[1][jeta][jphi];
3622  digivarianceHB[1][jeta][jphi] = fabs(digivarianceHB[1][jeta][jphi]);
3623  digivarianceHB[2][jeta][jphi] -= adigiHB[2][jeta][jphi] * adigiHB[2][jeta][jphi];
3624  digivarianceHB[2][jeta][jphi] = fabs(digivarianceHB[2][jeta][jphi]);
3625  digivarianceHB[3][jeta][jphi] -= adigiHB[3][jeta][jphi] * adigiHB[3][jeta][jphi];
3626  digivarianceHB[3][jeta][jphi] = fabs(digivarianceHB[3][jeta][jphi]);
3627  }
3628  }
3629  //cout<<" Vaiance: DONE*****" <<endl;
3630  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
3631  //======================================================================
3632  //======================================================================
3633  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
3634  c1x1->Clear();
3636  c1x0->Divide(1, 1);
3637  c1x0->cd(1);
3638  TH2F *DefzDdigiHB42D = new TH2F("DefzDdigiHB42D", "", neta, -41., 41., nphi, 0., 72.);
3639  TH2F *DefzDdigiHB42D0 = new TH2F("DefzDdigiHB42D0", "", neta, -41., 41., nphi, 0., 72.);
3640  TH2F *DefzDdigiHB42DF = (TH2F *)DefzDdigiHB42D0->Clone("DefzDdigiHB42DF");
3641  for (int i = 0; i < ndepth; i++) {
3642  for (int jeta = 0; jeta < neta; jeta++) {
3643  for (int jphi = 0; jphi < nphi; jphi++) {
3644  double ccc1 = digivarianceHB[i][jeta][jphi];
3645  int k2plot = jeta - 41;
3646  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
3647  if (adigiHB[i][jeta][jphi] > 0.) {
3648  DefzDdigiHB42D->Fill(kkk, jphi, ccc1);
3649  DefzDdigiHB42D0->Fill(kkk, jphi, 1.);
3650  }
3651  }
3652  }
3653  }
3654  DefzDdigiHB42DF->Divide(DefzDdigiHB42D, DefzDdigiHB42D0, 1, 1, "B"); // average A
3655  // DefzDdigiHB1->Sumw2();
3656  gPad->SetGridy();
3657  gPad->SetGridx(); // gPad->SetLogz();
3658  DefzDdigiHB42DF->SetMarkerStyle(20);
3659  DefzDdigiHB42DF->SetMarkerSize(0.4);
3660  DefzDdigiHB42DF->GetZaxis()->SetLabelSize(0.08);
3661  DefzDdigiHB42DF->SetXTitle("<D>_depth #eta \b");
3662  DefzDdigiHB42DF->SetYTitle(" #phi \b");
3663  DefzDdigiHB42DF->SetZTitle("<D>_depth \b");
3664  DefzDdigiHB42DF->SetMarkerColor(2);
3665  DefzDdigiHB42DF->SetLineColor(
3666  0); // DefzDdigiHB42DF->SetMaximum(1.000); // DefzDdigiHB42DF->SetMinimum(1.0);
3667  DefzDdigiHB42DF->Draw("COLZ");
3669  c1x0->Update();
3670  c1x0->Print("DdigiGeneralD2PhiSymmetryHB.png");
3671  c1x0->Clear();
3672  // clean-up
3673  if (DefzDdigiHB42D)
3674  delete DefzDdigiHB42D;
3675  if (DefzDdigiHB42D0)
3676  delete DefzDdigiHB42D0;
3677  if (DefzDdigiHB42DF)
3678  delete DefzDdigiHB42DF;
3679  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
3680  //======================================================================
3681  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
3682  c1x1->Clear();
3684  c1x1->Divide(1, 1);
3685  c1x1->cd(1);
3686  TH1F *DefzDdigiHB41D = new TH1F("DefzDdigiHB41D", "", nphi, 0., 72.);
3687  TH1F *DefzDdigiHB41D0 = new TH1F("DefzDdigiHB41D0", "", nphi, 0., 72.);
3688  TH1F *DefzDdigiHB41DF = (TH1F *)DefzDdigiHB41D0->Clone("DefzDdigiHB41DF");
3689 
3690  for (int jphi = 0; jphi < nphi; jphi++) {
3691  for (int jeta = 0; jeta < neta; jeta++) {
3692  for (int i = 0; i < ndepth; i++) {
3693  double ccc1 = digivarianceHB[i][jeta][jphi];
3694  if (adigiHB[i][jeta][jphi] > 0.) {
3695  DefzDdigiHB41D->Fill(jphi, ccc1);
3696  DefzDdigiHB41D0->Fill(jphi, 1.);
3697  }
3698  }
3699  }
3700  }
3701  // DefzDdigiHB41D->Sumw2();DefzDdigiHB41D0->Sumw2();
3702 
3703  DefzDdigiHB41DF->Divide(DefzDdigiHB41D, DefzDdigiHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
3704  DefzDdigiHB41D0->Sumw2();
3705  // for (int jphi=1;jphi<73;jphi++) {DefzDdigiHB41DF->SetBinError(jphi,0.01);}
3706  gPad->SetGridy();
3707  gPad->SetGridx(); // gPad->SetLogz();
3708  DefzDdigiHB41DF->SetMarkerStyle(20);
3709  DefzDdigiHB41DF->SetMarkerSize(1.4);
3710  DefzDdigiHB41DF->GetZaxis()->SetLabelSize(0.08);
3711  DefzDdigiHB41DF->SetXTitle("#phi \b");
3712  DefzDdigiHB41DF->SetYTitle(" <D> \b");
3713  DefzDdigiHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
3714  DefzDdigiHB41DF->SetMarkerColor(4);
3715  DefzDdigiHB41DF->SetLineColor(4); // DefzDdigiHB41DF->SetMinimum(0.8); DefzDdigiHB41DF->SetMinimum(-0.015);
3716  DefzDdigiHB41DF->Draw("Error");
3718  c1x1->Update();
3719  c1x1->Print("DdigiGeneralD1PhiSymmetryHB.png");
3720  c1x1->Clear();
3721  // clean-up
3722  if (DefzDdigiHB41D)
3723  delete DefzDdigiHB41D;
3724  if (DefzDdigiHB41D0)
3725  delete DefzDdigiHB41D0;
3726  if (DefzDdigiHB41DF)
3727  delete DefzDdigiHB41DF;
3728 
3729  //========================================================================================== 14
3730  //======================================================================
3731  //======================================================================1D plot: D vs phi , different eta, depth=1
3732  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
3733  c3x5->Clear();
3735  c3x5->Divide(4, 4);
3736  c3x5->cd(1);
3737  int kcountHBpositivedirectionDigiD1 = 1;
3738  TH1F *h2CeffHBpositivedirectionDigiD1 = new TH1F("h2CeffHBpositivedirectionDigiD1", "", nphi, 0., 72.);
3739 
3740  for (int jeta = 0; jeta < njeta; jeta++) {
3741  // positivedirectionDigiD:
3742  if (jeta - 41 >= 0) {
3743  // for (int i=0;i<ndepth;i++) {
3744  // depth=1
3745  for (int i = 0; i < 1; i++) {
3746  TH1F *HBpositivedirectionDigiD1 = (TH1F *)h2CeffHBpositivedirectionDigiD1->Clone("twod1");
3747 
3748  float ccctest = 0; // to avoid empty massive elements
3749  for (int jphi = 0; jphi < nphi; jphi++) {
3750  double ccc1 = digivarianceHB[i][jeta][jphi];
3751  if (adigiHB[i][jeta][jphi] > 0.) {
3752  HBpositivedirectionDigiD1->Fill(jphi, ccc1);
3753  ccctest = 1.; //HBpositivedirectionDigiD1->SetBinError(i,0.01);
3754  }
3755  } // for jphi
3756  if (ccctest > 0.) {
3757  //cout<<"1414 kcountHBpositivedirectionDigiD1 = "<<kcountHBpositivedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
3758  c3x5->cd(kcountHBpositivedirectionDigiD1);
3759  HBpositivedirectionDigiD1->SetMarkerStyle(20);
3760  HBpositivedirectionDigiD1->SetMarkerSize(0.4);
3761  HBpositivedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
3762  HBpositivedirectionDigiD1->SetXTitle("HBpositivedirectionDigiD1 \b");
3763  HBpositivedirectionDigiD1->SetMarkerColor(2);
3764  HBpositivedirectionDigiD1->SetLineColor(0);
3765  gPad->SetGridy();
3766  gPad->SetGridx();
3767  // gPad->SetLogy();
3768  if (kcountHBpositivedirectionDigiD1 == 1)
3769  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
3770  if (kcountHBpositivedirectionDigiD1 == 2)
3771  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
3772  if (kcountHBpositivedirectionDigiD1 == 3)
3773  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
3774  if (kcountHBpositivedirectionDigiD1 == 4)
3775  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
3776  if (kcountHBpositivedirectionDigiD1 == 5)
3777  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
3778  if (kcountHBpositivedirectionDigiD1 == 6)
3779  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
3780  if (kcountHBpositivedirectionDigiD1 == 7)
3781  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
3782  if (kcountHBpositivedirectionDigiD1 == 8)
3783  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
3784  if (kcountHBpositivedirectionDigiD1 == 9)
3785  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
3786  if (kcountHBpositivedirectionDigiD1 == 10)
3787  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
3788  if (kcountHBpositivedirectionDigiD1 == 11)
3789  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
3790  if (kcountHBpositivedirectionDigiD1 == 12)
3791  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
3792  if (kcountHBpositivedirectionDigiD1 == 13)
3793  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
3794  if (kcountHBpositivedirectionDigiD1 == 14)
3795  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
3796  if (kcountHBpositivedirectionDigiD1 == 15)
3797  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
3798  if (kcountHBpositivedirectionDigiD1 == 16)
3799  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
3800  HBpositivedirectionDigiD1->Draw("Error");
3801  kcountHBpositivedirectionDigiD1++;
3802  if (kcountHBpositivedirectionDigiD1 > 16)
3803  break; // 4x6 = 24
3804  } //ccctest>0
3805 
3806  } // for i
3807  } //if(jeta-41 >= 0)
3808  } //for jeta
3810  c3x5->Update();
3811  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
3812  c3x5->Clear();
3813  // clean-up
3814  if (h2CeffHBpositivedirectionDigiD1)
3815  delete h2CeffHBpositivedirectionDigiD1;
3816  //========================================================================================== 15
3817  //======================================================================
3818  //======================================================================1D plot: D vs phi , different eta, depth=2
3819  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
3820  c3x5->Clear();
3821  c3x5->Divide(4, 4);
3822  c3x5->cd(1);
3823  int kcountHBpositivedirectionDigiD2 = 1;
3824  TH1F *h2CeffHBpositivedirectionDigiD2 = new TH1F("h2CeffHBpositivedirectionDigiD2", "", nphi, 0., 72.);
3825 
3826  for (int jeta = 0; jeta < njeta; jeta++) {
3827  // positivedirectionDigiD:
3828  if (jeta - 41 >= 0) {
3829  // for (int i=0;i<ndepth;i++) {
3830  // depth=2
3831  for (int i = 1; i < 2; i++) {
3832  TH1F *HBpositivedirectionDigiD2 = (TH1F *)h2CeffHBpositivedirectionDigiD2->Clone("twod1");
3833 
3834  float ccctest = 0; // to avoid empty massive elements
3835  for (int jphi = 0; jphi < nphi; jphi++) {
3836  double ccc1 = digivarianceHB[i][jeta][jphi];
3837  if (adigiHB[i][jeta][jphi] > 0.) {
3838  HBpositivedirectionDigiD2->Fill(jphi, ccc1);
3839  ccctest = 1.; //HBpositivedirectionDigiD2->SetBinError(i,0.01);
3840  }
3841  } // for jphi
3842  if (ccctest > 0.) {
3843  //cout<<"1515 kcountHBpositivedirectionDigiD2 = "<<kcountHBpositivedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
3844  c3x5->cd(kcountHBpositivedirectionDigiD2);
3845  HBpositivedirectionDigiD2->SetMarkerStyle(20);
3846  HBpositivedirectionDigiD2->SetMarkerSize(0.4);
3847  HBpositivedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
3848  HBpositivedirectionDigiD2->SetXTitle("HBpositivedirectionDigiD2 \b");
3849  HBpositivedirectionDigiD2->SetMarkerColor(2);
3850  HBpositivedirectionDigiD2->SetLineColor(0);
3851  gPad->SetGridy();
3852  gPad->SetGridx();
3853  // gPad->SetLogy();
3854  if (kcountHBpositivedirectionDigiD2 == 1)
3855  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
3856  if (kcountHBpositivedirectionDigiD2 == 2)
3857  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
3858  if (kcountHBpositivedirectionDigiD2 == 3)
3859  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
3860  if (kcountHBpositivedirectionDigiD2 == 4)
3861  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
3862  if (kcountHBpositivedirectionDigiD2 == 5)
3863  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
3864  if (kcountHBpositivedirectionDigiD2 == 6)
3865  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
3866  if (kcountHBpositivedirectionDigiD2 == 7)
3867  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
3868  if (kcountHBpositivedirectionDigiD2 == 8)
3869  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
3870  if (kcountHBpositivedirectionDigiD2 == 9)
3871  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
3872  if (kcountHBpositivedirectionDigiD2 == 10)
3873  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
3874  if (kcountHBpositivedirectionDigiD2 == 11)
3875  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
3876  if (kcountHBpositivedirectionDigiD2 == 12)
3877  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
3878  if (kcountHBpositivedirectionDigiD2 == 13)
3879  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
3880  if (kcountHBpositivedirectionDigiD2 == 14)
3881  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
3882  if (kcountHBpositivedirectionDigiD2 == 15)
3883  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
3884  if (kcountHBpositivedirectionDigiD2 == 16)
3885  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
3886  HBpositivedirectionDigiD2->Draw("Error");
3887  kcountHBpositivedirectionDigiD2++;
3888  if (kcountHBpositivedirectionDigiD2 > 16)
3889  break; // 4x6 = 24
3890  } //ccctest>0
3891 
3892  } // for i
3893  } //if(jeta-41 >= 0)
3894  } //for jeta
3896  c3x5->Update();
3897  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
3898  c3x5->Clear();
3899  // clean-up
3900  if (h2CeffHBpositivedirectionDigiD2)
3901  delete h2CeffHBpositivedirectionDigiD2;
3902  //========================================================================================== 16
3903  //======================================================================
3904  //======================================================================1D plot: D vs phi , different eta, depth=3
3905  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
3906  c3x5->Clear();
3907  c3x5->Divide(4, 4);
3908  c3x5->cd(1);
3909  int kcountHBpositivedirectionDigiD3 = 1;
3910  TH1F *h2CeffHBpositivedirectionDigiD3 = new TH1F("h2CeffHBpositivedirectionDigiD3", "", nphi, 0., 72.);
3911 
3912  for (int jeta = 0; jeta < njeta; jeta++) {
3913  // positivedirectionDigiD:
3914  if (jeta - 41 >= 0) {
3915  // for (int i=0;i<ndepth;i++) {
3916  // depth=3
3917  for (int i = 2; i < 3; i++) {
3918  TH1F *HBpositivedirectionDigiD3 = (TH1F *)h2CeffHBpositivedirectionDigiD3->Clone("twod1");
3919 
3920  float ccctest = 0; // to avoid empty massive elements
3921  for (int jphi = 0; jphi < nphi; jphi++) {
3922  double ccc1 = digivarianceHB[i][jeta][jphi];
3923  if (adigiHB[i][jeta][jphi] > 0.) {
3924  HBpositivedirectionDigiD3->Fill(jphi, ccc1);
3925  ccctest = 1.; //HBpositivedirectionDigiD3->SetBinError(i,0.01);
3926  }
3927  } // for jphi
3928  if (ccctest > 0.) {
3929  //cout<<"1616 kcountHBpositivedirectionDigiD3 = "<<kcountHBpositivedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
3930  c3x5->cd(kcountHBpositivedirectionDigiD3);
3931  HBpositivedirectionDigiD3->SetMarkerStyle(20);
3932  HBpositivedirectionDigiD3->SetMarkerSize(0.4);
3933  HBpositivedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
3934  HBpositivedirectionDigiD3->SetXTitle("HBpositivedirectionDigiD3 \b");
3935  HBpositivedirectionDigiD3->SetMarkerColor(2);
3936  HBpositivedirectionDigiD3->SetLineColor(0);
3937  gPad->SetGridy();
3938  gPad->SetGridx();
3939  // gPad->SetLogy();
3940  if (kcountHBpositivedirectionDigiD3 == 1)
3941  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
3942  if (kcountHBpositivedirectionDigiD3 == 2)
3943  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
3944  if (kcountHBpositivedirectionDigiD3 == 3)
3945  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
3946  if (kcountHBpositivedirectionDigiD3 == 4)
3947  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
3948  if (kcountHBpositivedirectionDigiD3 == 5)
3949  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
3950  if (kcountHBpositivedirectionDigiD3 == 6)
3951  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
3952  if (kcountHBpositivedirectionDigiD3 == 7)
3953  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
3954  if (kcountHBpositivedirectionDigiD3 == 8)
3955  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
3956  if (kcountHBpositivedirectionDigiD3 == 9)
3957  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
3958  if (kcountHBpositivedirectionDigiD3 == 10)
3959  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
3960  if (kcountHBpositivedirectionDigiD3 == 11)
3961  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
3962  if (kcountHBpositivedirectionDigiD3 == 12)
3963  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
3964  if (kcountHBpositivedirectionDigiD3 == 13)
3965  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
3966  if (kcountHBpositivedirectionDigiD3 == 14)
3967  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
3968  if (kcountHBpositivedirectionDigiD3 == 15)
3969  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
3970  if (kcountHBpositivedirectionDigiD3 == 16)
3971  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
3972  HBpositivedirectionDigiD3->Draw("Error");
3973  kcountHBpositivedirectionDigiD3++;
3974  if (kcountHBpositivedirectionDigiD3 > 16)
3975  break; // 4x6 = 24
3976  } //ccctest>0
3977 
3978  } // for i
3979  } //if(jeta-41 >= 0)
3980  } //for jeta
3982  c3x5->Update();
3983  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
3984  c3x5->Clear();
3985  // clean-up
3986  if (h2CeffHBpositivedirectionDigiD3)
3987  delete h2CeffHBpositivedirectionDigiD3;
3988  //========================================================================================== 17
3989  //======================================================================
3990  //======================================================================1D plot: D vs phi , different eta, depth=4
3991  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
3992  c3x5->Clear();
3993  c3x5->Divide(4, 4);
3994  c3x5->cd(1);
3995  int kcountHBpositivedirectionDigiD4 = 1;
3996  TH1F *h2CeffHBpositivedirectionDigiD4 = new TH1F("h2CeffHBpositivedirectionDigiD4", "", nphi, 0., 72.);
3997 
3998  for (int jeta = 0; jeta < njeta; jeta++) {
3999  // positivedirectionDigiD:
4000  if (jeta - 41 >= 0) {
4001  // for (int i=0;i<ndepth;i++) {
4002  // depth=4
4003  for (int i = 3; i < 4; i++) {
4004  TH1F *HBpositivedirectionDigiD4 = (TH1F *)h2CeffHBpositivedirectionDigiD4->Clone("twod1");
4005 
4006  float ccctest = 0; // to avoid empty massive elements
4007  for (int jphi = 0; jphi < nphi; jphi++) {
4008  double ccc1 = digivarianceHB[i][jeta][jphi];
4009  if (adigiHB[i][jeta][jphi] > 0.) {
4010  HBpositivedirectionDigiD4->Fill(jphi, ccc1);
4011  ccctest = 1.; //HBpositivedirectionDigiD4->SetBinError(i,0.01);
4012  }
4013  } // for jphi
4014  if (ccctest > 0.) {
4015  //cout<<"1717 kcountHBpositivedirectionDigiD4 = "<<kcountHBpositivedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
4016  c3x5->cd(kcountHBpositivedirectionDigiD4);
4017  HBpositivedirectionDigiD4->SetMarkerStyle(20);
4018  HBpositivedirectionDigiD4->SetMarkerSize(0.4);
4019  HBpositivedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
4020  HBpositivedirectionDigiD4->SetXTitle("HBpositivedirectionDigiD4 \b");
4021  HBpositivedirectionDigiD4->SetMarkerColor(2);
4022  HBpositivedirectionDigiD4->SetLineColor(0);
4023  gPad->SetGridy();
4024  gPad->SetGridx();
4025  // gPad->SetLogy();
4026  if (kcountHBpositivedirectionDigiD4 == 1)
4027  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
4028  if (kcountHBpositivedirectionDigiD4 == 2)
4029  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
4030  if (kcountHBpositivedirectionDigiD4 == 3)
4031  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
4032  if (kcountHBpositivedirectionDigiD4 == 4)
4033  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
4034  if (kcountHBpositivedirectionDigiD4 == 5)
4035  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
4036  if (kcountHBpositivedirectionDigiD4 == 6)
4037  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
4038  if (kcountHBpositivedirectionDigiD4 == 7)
4039  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
4040  if (kcountHBpositivedirectionDigiD4 == 8)
4041  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
4042  if (kcountHBpositivedirectionDigiD4 == 9)
4043  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
4044  if (kcountHBpositivedirectionDigiD4 == 10)
4045  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
4046  if (kcountHBpositivedirectionDigiD4 == 11)
4047  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
4048  if (kcountHBpositivedirectionDigiD4 == 12)
4049  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
4050  if (kcountHBpositivedirectionDigiD4 == 13)
4051  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
4052  if (kcountHBpositivedirectionDigiD4 == 14)
4053  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
4054  if (kcountHBpositivedirectionDigiD4 == 15)
4055  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
4056  if (kcountHBpositivedirectionDigiD4 == 16)
4057  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
4058  HBpositivedirectionDigiD4->Draw("Error");
4059  kcountHBpositivedirectionDigiD4++;
4060  if (kcountHBpositivedirectionDigiD4 > 16)
4061  break; // 4x6 = 24
4062  } //ccctest>0
4063 
4064  } // for i
4065  } //if(jeta-41 >= 0)
4066  } //for jeta
4068  c3x5->Update();
4069  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
4070  c3x5->Clear();
4071  // clean-up
4072  if (h2CeffHBpositivedirectionDigiD4)
4073  delete h2CeffHBpositivedirectionDigiD4;
4074 
4075  //========================================================================================== 22214
4076  //======================================================================
4077  //======================================================================1D plot: D vs phi , different eta, depth=1
4078  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
4079  c3x5->Clear();
4081  c3x5->Divide(4, 4);
4082  c3x5->cd(1);
4083  int kcountHBnegativedirectionDigiD1 = 1;
4084  TH1F *h2CeffHBnegativedirectionDigiD1 = new TH1F("h2CeffHBnegativedirectionDigiD1", "", nphi, 0., 72.);
4085 
4086  for (int jeta = 0; jeta < njeta; jeta++) {
4087  // negativedirectionDigiD:
4088  if (jeta - 41 < 0) {
4089  // for (int i=0;i<ndepth;i++) {
4090  // depth=1
4091  for (int i = 0; i < 1; i++) {
4092  TH1F *HBnegativedirectionDigiD1 = (TH1F *)h2CeffHBnegativedirectionDigiD1->Clone("twod1");
4093 
4094  float ccctest = 0; // to avoid empty massive elements
4095  for (int jphi = 0; jphi < nphi; jphi++) {
4096  double ccc1 = digivarianceHB[i][jeta][jphi];
4097  if (adigiHB[i][jeta][jphi] > 0.) {
4098  HBnegativedirectionDigiD1->Fill(jphi, ccc1);
4099  ccctest = 1.; //HBnegativedirectionDigiD1->SetBinError(i,0.01);
4100  }
4101  } // for jphi
4102  if (ccctest > 0.) {
4103  //cout<<"1414 kcountHBnegativedirectionDigiD1 = "<<kcountHBnegativedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
4104  c3x5->cd(kcountHBnegativedirectionDigiD1);
4105  HBnegativedirectionDigiD1->SetMarkerStyle(20);
4106  HBnegativedirectionDigiD1->SetMarkerSize(0.4);
4107  HBnegativedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
4108  HBnegativedirectionDigiD1->SetXTitle("HBnegativedirectionDigiD1 \b");
4109  HBnegativedirectionDigiD1->SetMarkerColor(2);
4110  HBnegativedirectionDigiD1->SetLineColor(0);
4111  gPad->SetGridy();
4112  gPad->SetGridx();
4113  // gPad->SetLogy();
4114  if (kcountHBnegativedirectionDigiD1 == 1)
4115  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-16; depth = 1 \b");
4116  if (kcountHBnegativedirectionDigiD1 == 2)
4117  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-15; depth = 1 \b");
4118  if (kcountHBnegativedirectionDigiD1 == 3)
4119  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-14; depth = 1 \b");
4120  if (kcountHBnegativedirectionDigiD1 == 4)
4121  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-13; depth = 1 \b");
4122  if (kcountHBnegativedirectionDigiD1 == 5)
4123  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-12; depth = 1 \b");
4124  if (kcountHBnegativedirectionDigiD1 == 6)
4125  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-11; depth = 1 \b");
4126  if (kcountHBnegativedirectionDigiD1 == 7)
4127  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-10; depth = 1 \b");
4128  if (kcountHBnegativedirectionDigiD1 == 8)
4129  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-9; depth = 1 \b");
4130  if (kcountHBnegativedirectionDigiD1 == 9)
4131  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-8; depth = 1 \b");
4132  if (kcountHBnegativedirectionDigiD1 == 10)
4133  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-7; depth = 1 \b");
4134  if (kcountHBnegativedirectionDigiD1 == 11)
4135  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-6; depth = 1 \b");
4136  if (kcountHBnegativedirectionDigiD1 == 12)
4137  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-5; depth = 1 \b");
4138  if (kcountHBnegativedirectionDigiD1 == 13)
4139  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-4; depth = 1 \b");
4140  if (kcountHBnegativedirectionDigiD1 == 14)
4141  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-3; depth = 1 \b");
4142  if (kcountHBnegativedirectionDigiD1 == 15)
4143  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-2; depth = 1 \b");
4144  if (kcountHBnegativedirectionDigiD1 == 16)
4145  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-1; depth = 1 \b");
4146  HBnegativedirectionDigiD1->Draw("Error");
4147  kcountHBnegativedirectionDigiD1++;
4148  if (kcountHBnegativedirectionDigiD1 > 16)
4149  break; // 4x6 = 24
4150  } //ccctest>0
4151 
4152  } // for i
4153  } //if(jeta-41 < 0)
4154  } //for jeta
4156  c3x5->Update();
4157  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
4158  c3x5->Clear();
4159  // clean-up
4160  if (h2CeffHBnegativedirectionDigiD1)
4161  delete h2CeffHBnegativedirectionDigiD1;
4162  //========================================================================================== 22215
4163  //======================================================================
4164  //======================================================================1D plot: D vs phi , different eta, depth=2
4165  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
4166  c3x5->Clear();
4167  c3x5->Divide(4, 4);
4168  c3x5->cd(1);
4169  int kcountHBnegativedirectionDigiD2 = 1;
4170  TH1F *h2CeffHBnegativedirectionDigiD2 = new TH1F("h2CeffHBnegativedirectionDigiD2", "", nphi, 0., 72.);
4171 
4172  for (int jeta = 0; jeta < njeta; jeta++) {
4173  // negativedirectionDigiD:
4174  if (jeta - 41 < 0) {
4175  // for (int i=0;i<ndepth;i++) {
4176  // depth=2
4177  for (int i = 1; i < 2; i++) {
4178  TH1F *HBnegativedirectionDigiD2 = (TH1F *)h2CeffHBnegativedirectionDigiD2->Clone("twod1");
4179 
4180  float ccctest = 0; // to avoid empty massive elements
4181  for (int jphi = 0; jphi < nphi; jphi++) {
4182  double ccc1 = digivarianceHB[i][jeta][jphi];
4183  if (adigiHB[i][jeta][jphi] > 0.) {
4184  HBnegativedirectionDigiD2->Fill(jphi, ccc1);
4185  ccctest = 1.; //HBnegativedirectionDigiD2->SetBinError(i,0.01);
4186  }
4187  } // for jphi
4188  if (ccctest > 0.) {
4189  //cout<<"1515 kcountHBnegativedirectionDigiD2 = "<<kcountHBnegativedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
4190  c3x5->cd(kcountHBnegativedirectionDigiD2);
4191  HBnegativedirectionDigiD2->SetMarkerStyle(20);
4192  HBnegativedirectionDigiD2->SetMarkerSize(0.4);
4193  HBnegativedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
4194  HBnegativedirectionDigiD2->SetXTitle("HBnegativedirectionDigiD2 \b");
4195  HBnegativedirectionDigiD2->SetMarkerColor(2);
4196  HBnegativedirectionDigiD2->SetLineColor(0);
4197  gPad->SetGridy();
4198  gPad->SetGridx();
4199  // gPad->SetLogy();
4200  if (kcountHBnegativedirectionDigiD2 == 1)
4201  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
4202  if (kcountHBnegativedirectionDigiD2 == 2)
4203  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
4204  if (kcountHBnegativedirectionDigiD2 == 3)
4205  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
4206  if (kcountHBnegativedirectionDigiD2 == 4)
4207  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
4208  if (kcountHBnegativedirectionDigiD2 == 5)
4209  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
4210  if (kcountHBnegativedirectionDigiD2 == 6)
4211  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
4212  if (kcountHBnegativedirectionDigiD2 == 7)
4213  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
4214  if (kcountHBnegativedirectionDigiD2 == 8)
4215  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-9; depth = 2 \b");
4216  if (kcountHBnegativedirectionDigiD2 == 9)
4217  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-8; depth = 2 \b");
4218  if (kcountHBnegativedirectionDigiD2 == 10)
4219  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-7; depth = 2 \b");
4220  if (kcountHBnegativedirectionDigiD2 == 11)
4221  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-6; depth = 2 \b");
4222  if (kcountHBnegativedirectionDigiD2 == 12)
4223  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-5; depth = 2 \b");
4224  if (kcountHBnegativedirectionDigiD2 == 13)
4225  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-4; depth = 2 \b");
4226  if (kcountHBnegativedirectionDigiD2 == 14)
4227  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-3; depth = 2 \b");
4228  if (kcountHBnegativedirectionDigiD2 == 15)
4229  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-2; depth = 2 \b");
4230  if (kcountHBnegativedirectionDigiD2 == 16)
4231  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-1; depth = 2 \b");
4232  HBnegativedirectionDigiD2->Draw("Error");
4233  kcountHBnegativedirectionDigiD2++;
4234  if (kcountHBnegativedirectionDigiD2 > 16)
4235  break; // 4x6 = 24
4236  } //ccctest>0
4237 
4238  } // for i
4239  } //if(jeta-41 < 0)
4240  } //for jeta
4242  c3x5->Update();
4243  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
4244  c3x5->Clear();
4245  // clean-up
4246  if (h2CeffHBnegativedirectionDigiD2)
4247  delete h2CeffHBnegativedirectionDigiD2;
4248  //========================================================================================== 22216
4249  //======================================================================
4250  //======================================================================1D plot: D vs phi , different eta, depth=3
4251  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
4252  c3x5->Clear();
4253  c3x5->Divide(4, 4);
4254  c3x5->cd(1);
4255  int kcountHBnegativedirectionDigiD3 = 1;
4256  TH1F *h2CeffHBnegativedirectionDigiD3 = new TH1F("h2CeffHBnegativedirectionDigiD3", "", nphi, 0., 72.);
4257 
4258  for (int jeta = 0; jeta < njeta; jeta++) {
4259  // negativedirectionDigiD:
4260  if (jeta - 41 < 0) {
4261  // for (int i=0;i<ndepth;i++) {
4262  // depth=3
4263  for (int i = 2; i < 3; i++) {
4264  TH1F *HBnegativedirectionDigiD3 = (TH1F *)h2CeffHBnegativedirectionDigiD3->Clone("twod1");
4265 
4266  float ccctest = 0; // to avoid empty massive elements
4267  for (int jphi = 0; jphi < nphi; jphi++) {
4268  double ccc1 = digivarianceHB[i][jeta][jphi];
4269  if (adigiHB[i][jeta][jphi] > 0.) {
4270  HBnegativedirectionDigiD3->Fill(jphi, ccc1);
4271  ccctest = 1.; //HBnegativedirectionDigiD3->SetBinError(i,0.01);
4272  }
4273  } // for jphi
4274  if (ccctest > 0.) {
4275  //cout<<"1616 kcountHBnegativedirectionDigiD3 = "<<kcountHBnegativedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
4276  c3x5->cd(kcountHBnegativedirectionDigiD3);
4277  HBnegativedirectionDigiD3->SetMarkerStyle(20);
4278  HBnegativedirectionDigiD3->SetMarkerSize(0.4);
4279  HBnegativedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
4280  HBnegativedirectionDigiD3->SetXTitle("HBnegativedirectionDigiD3 \b");
4281  HBnegativedirectionDigiD3->SetMarkerColor(2);
4282  HBnegativedirectionDigiD3->SetLineColor(0);
4283  gPad->SetGridy();
4284  gPad->SetGridx();
4285  // gPad->SetLogy();
4286  if (kcountHBnegativedirectionDigiD3 == 1)
4287  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
4288  if (kcountHBnegativedirectionDigiD3 == 2)
4289  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
4290  if (kcountHBnegativedirectionDigiD3 == 3)
4291  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
4292  if (kcountHBnegativedirectionDigiD3 == 4)
4293  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
4294  if (kcountHBnegativedirectionDigiD3 == 5)
4295  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
4296  if (kcountHBnegativedirectionDigiD3 == 6)
4297  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
4298  if (kcountHBnegativedirectionDigiD3 == 7)
4299  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
4300  if (kcountHBnegativedirectionDigiD3 == 8)
4301  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-9; depth = 3 \b");
4302  if (kcountHBnegativedirectionDigiD3 == 9)
4303  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-8; depth = 3 \b");
4304  if (kcountHBnegativedirectionDigiD3 == 10)
4305  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-7; depth = 3 \b");
4306  if (kcountHBnegativedirectionDigiD3 == 11)
4307  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-6; depth = 3 \b");
4308  if (kcountHBnegativedirectionDigiD3 == 12)
4309  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-5; depth = 3 \b");
4310  if (kcountHBnegativedirectionDigiD3 == 13)
4311  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-4; depth = 3 \b");
4312  if (kcountHBnegativedirectionDigiD3 == 14)
4313  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-3; depth = 3 \b");
4314  if (kcountHBnegativedirectionDigiD3 == 15)
4315  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-2; depth = 3 \b");
4316  if (kcountHBnegativedirectionDigiD3 == 16)
4317  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-1; depth = 3 \b");
4318  HBnegativedirectionDigiD3->Draw("Error");
4319  kcountHBnegativedirectionDigiD3++;
4320  if (kcountHBnegativedirectionDigiD3 > 16)
4321  break; // 4x6 = 24
4322  } //ccctest>0
4323 
4324  } // for i
4325  } //if(jeta-41 < 0)
4326  } //for jeta
4328  c3x5->Update();
4329  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
4330  c3x5->Clear();
4331  // clean-up
4332  if (h2CeffHBnegativedirectionDigiD3)
4333  delete h2CeffHBnegativedirectionDigiD3;
4334  //========================================================================================== 22217
4335  //======================================================================
4336  //======================================================================1D plot: D vs phi , different eta, depth=4
4337  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
4338  c3x5->Clear();
4339  c3x5->Divide(4, 4);
4340  c3x5->cd(1);
4341  int kcountHBnegativedirectionDigiD4 = 1;
4342  TH1F *h2CeffHBnegativedirectionDigiD4 = new TH1F("h2CeffHBnegativedirectionDigiD4", "", nphi, 0., 72.);
4343 
4344  for (int jeta = 0; jeta < njeta; jeta++) {
4345  // negativedirectionDigiD:
4346  if (jeta - 41 < 0) {
4347  // for (int i=0;i<ndepth;i++) {
4348  // depth=4
4349  for (int i = 3; i < 4; i++) {
4350  TH1F *HBnegativedirectionDigiD4 = (TH1F *)h2CeffHBnegativedirectionDigiD4->Clone("twod1");
4351 
4352  float ccctest = 0; // to avoid empty massive elements
4353  for (int jphi = 0; jphi < nphi; jphi++) {
4354  double ccc1 = digivarianceHB[i][jeta][jphi];
4355  if (adigiHB[i][jeta][jphi] > 0.) {
4356  HBnegativedirectionDigiD4->Fill(jphi, ccc1);
4357  ccctest = 1.; //HBnegativedirectionDigiD4->SetBinError(i,0.01);
4358  }
4359  } // for jphi
4360  if (ccctest > 0.) {
4361  //cout<<"1717 kcountHBnegativedirectionDigiD4 = "<<kcountHBnegativedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
4362  c3x5->cd(kcountHBnegativedirectionDigiD4);
4363  HBnegativedirectionDigiD4->SetMarkerStyle(20);
4364  HBnegativedirectionDigiD4->SetMarkerSize(0.4);
4365  HBnegativedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
4366  HBnegativedirectionDigiD4->SetXTitle("HBnegativedirectionDigiD4 \b");
4367  HBnegativedirectionDigiD4->SetMarkerColor(2);
4368  HBnegativedirectionDigiD4->SetLineColor(0);
4369  gPad->SetGridy();
4370  gPad->SetGridx();
4371  // gPad->SetLogy();
4372  if (kcountHBnegativedirectionDigiD4 == 1)
4373  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
4374  if (kcountHBnegativedirectionDigiD4 == 2)
4375  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
4376  if (kcountHBnegativedirectionDigiD4 == 3)
4377  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
4378  if (kcountHBnegativedirectionDigiD4 == 4)
4379  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
4380  if (kcountHBnegativedirectionDigiD4 == 5)
4381  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
4382  if (kcountHBnegativedirectionDigiD4 == 6)
4383  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
4384  if (kcountHBnegativedirectionDigiD4 == 7)
4385  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
4386  if (kcountHBnegativedirectionDigiD4 == 8)
4387  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-9; depth = 4 \b");
4388  if (kcountHBnegativedirectionDigiD4 == 9)
4389  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-8; depth = 4 \b");
4390  if (kcountHBnegativedirectionDigiD4 == 10)
4391  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-7; depth = 4 \b");
4392  if (kcountHBnegativedirectionDigiD4 == 11)
4393  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-6; depth = 4 \b");
4394  if (kcountHBnegativedirectionDigiD4 == 12)
4395  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-5; depth = 4 \b");
4396  if (kcountHBnegativedirectionDigiD4 == 13)
4397  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-4; depth = 4 \b");
4398  if (kcountHBnegativedirectionDigiD4 == 14)
4399  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-3; depth = 4 \b");
4400  if (kcountHBnegativedirectionDigiD4 == 15)
4401  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-2; depth = 4 \b");
4402  if (kcountHBnegativedirectionDigiD4 == 16)
4403  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-1; depth = 4 \b");
4404  HBnegativedirectionDigiD4->Draw("Error");
4405  kcountHBnegativedirectionDigiD4++;
4406  if (kcountHBnegativedirectionDigiD4 > 16)
4407  break; // 4x6 = 24
4408  } //ccctest>0
4409 
4410  } // for i
4411  } //if(jeta-41 < 0)
4412  } //for jeta
4414  c3x5->Update();
4415  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
4416  c3x5->Clear();
4417  // clean-up
4418  if (h2CeffHBnegativedirectionDigiD4)
4419  delete h2CeffHBnegativedirectionDigiD4;
4420 
4421  //===================================================================== END of Digi HB for phi-symmetry
4422  //===================================================================== END of Digi HB for phi-symmetry
4423  //===================================================================== END of Digi HB for phi-symmetry
4424 
4428  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
4429  //ndepth = k_max[3];
4430  ndepth = 7;
4431  // const int ndepth = 7;
4432  double adigihe[ndepth][njeta][njphi];
4433  double digivariancehe[ndepth][njeta][njphi];
4434  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Digi HE
4435  TH2F *amplitudechannel1HE1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HE1");
4436  TH2F *amplitudechannel0HE1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE1");
4437  TH2F *amplitudechannelHE1 = (TH2F *)amplitudechannel1HE1->Clone("amplitudechannelHE1");
4438  amplitudechannelHE1->Divide(amplitudechannel1HE1, amplitudechannel0HE1, 1, 1, "B");
4439  TH2F *amplitudechannel1HE2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HE2");
4440  TH2F *amplitudechannel0HE2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE2");
4441  TH2F *amplitudechannelHE2 = (TH2F *)amplitudechannel1HE2->Clone("amplitudechannelHE2");
4442  amplitudechannelHE2->Divide(amplitudechannel1HE2, amplitudechannel0HE2, 1, 1, "B");
4443  TH2F *amplitudechannel1HE3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HE3");
4444  TH2F *amplitudechannel0HE3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE3");
4445  TH2F *amplitudechannelHE3 = (TH2F *)amplitudechannel1HE3->Clone("amplitudechannelHE3");
4446  amplitudechannelHE3->Divide(amplitudechannel1HE3, amplitudechannel0HE3, 1, 1, "B");
4447  TH2F *amplitudechannel1HE4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HE4");
4448  TH2F *amplitudechannel0HE4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE4");
4449  TH2F *amplitudechannelHE4 = (TH2F *)amplitudechannel1HE4->Clone("amplitudechannelHE4");
4450  amplitudechannelHE4->Divide(amplitudechannel1HE4, amplitudechannel0HE4, 1, 1, "B");
4451  TH2F *amplitudechannel1HE5 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HE5");
4452  TH2F *amplitudechannel0HE5 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE5");
4453  TH2F *amplitudechannelHE5 = (TH2F *)amplitudechannel1HE5->Clone("amplitudechannelHE5");
4454  amplitudechannelHE5->Divide(amplitudechannel1HE5, amplitudechannel0HE5, 1, 1, "B");
4455  TH2F *amplitudechannel1HE6 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HE6");
4456  TH2F *amplitudechannel0HE6 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE6");
4457  TH2F *amplitudechannelHE6 = (TH2F *)amplitudechannel1HE6->Clone("amplitudechannelHE6");
4458  amplitudechannelHE6->Divide(amplitudechannel1HE6, amplitudechannel0HE6, 1, 1, "B");
4459  TH2F *amplitudechannel1HE7 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HE7");
4460  TH2F *amplitudechannel0HE7 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE7");
4461  TH2F *amplitudechannelHE7 = (TH2F *)amplitudechannel1HE7->Clone("amplitudechannelHE7");
4462  amplitudechannelHE7->Divide(amplitudechannel1HE7, amplitudechannel0HE7, 1, 1, "B");
4463  for (int jeta = 0; jeta < njeta; jeta++) {
4464  //====================================================================== PHI normalization & put R into massive adigihe
4465  //preparation for PHI normalization:
4466  double sumdigiHE0 = 0;
4467  int nsumdigiHE0 = 0;
4468  double sumdigiHE1 = 0;
4469  int nsumdigiHE1 = 0;
4470  double sumdigiHE2 = 0;
4471  int nsumdigiHE2 = 0;
4472  double sumdigiHE3 = 0;
4473  int nsumdigiHE3 = 0;
4474  double sumdigiHE4 = 0;
4475  int nsumdigiHE4 = 0;
4476  double sumdigiHE5 = 0;
4477  int nsumdigiHE5 = 0;
4478  double sumdigiHE6 = 0;
4479  int nsumdigiHE6 = 0;
4480  for (int jphi = 0; jphi < njphi; jphi++) {
4481  adigihe[0][jeta][jphi] = amplitudechannelHE1->GetBinContent(jeta + 1, jphi + 1);
4482  adigihe[1][jeta][jphi] = amplitudechannelHE2->GetBinContent(jeta + 1, jphi + 1);
4483  adigihe[2][jeta][jphi] = amplitudechannelHE3->GetBinContent(jeta + 1, jphi + 1);
4484  adigihe[3][jeta][jphi] = amplitudechannelHE4->GetBinContent(jeta + 1, jphi + 1);
4485  adigihe[4][jeta][jphi] = amplitudechannelHE5->GetBinContent(jeta + 1, jphi + 1);
4486  adigihe[5][jeta][jphi] = amplitudechannelHE6->GetBinContent(jeta + 1, jphi + 1);
4487  adigihe[6][jeta][jphi] = amplitudechannelHE7->GetBinContent(jeta + 1, jphi + 1);
4488  if (adigihe[0][jeta][jphi] > 0.) {
4489  sumdigiHE0 += adigihe[0][jeta][jphi];
4490  ++nsumdigiHE0;
4491  }
4492  if (adigihe[1][jeta][jphi] > 0.) {
4493  sumdigiHE1 += adigihe[1][jeta][jphi];
4494  ++nsumdigiHE1;
4495  }
4496  if (adigihe[2][jeta][jphi] > 0.) {
4497  sumdigiHE2 += adigihe[2][jeta][jphi];
4498  ++nsumdigiHE2;
4499  }
4500  if (adigihe[3][jeta][jphi] > 0.) {
4501  sumdigiHE3 += adigihe[3][jeta][jphi];
4502  ++nsumdigiHE3;
4503  }
4504  if (adigihe[4][jeta][jphi] > 0.) {
4505  sumdigiHE4 += adigihe[4][jeta][jphi];
4506  ++nsumdigiHE4;
4507  }
4508  if (adigihe[5][jeta][jphi] > 0.) {
4509  sumdigiHE5 += adigihe[5][jeta][jphi];
4510  ++nsumdigiHE5;
4511  }
4512  if (adigihe[6][jeta][jphi] > 0.) {
4513  sumdigiHE6 += adigihe[6][jeta][jphi];
4514  ++nsumdigiHE6;
4515  }
4516  } // phi
4517  // PHI normalization:
4518  for (int jphi = 0; jphi < njphi; jphi++) {
4519  if (adigihe[0][jeta][jphi] > 0.)
4520  adigihe[0][jeta][jphi] /= (sumdigiHE0 / nsumdigiHE0);
4521  if (adigihe[1][jeta][jphi] > 0.)
4522  adigihe[1][jeta][jphi] /= (sumdigiHE1 / nsumdigiHE1);
4523  if (adigihe[2][jeta][jphi] > 0.)
4524  adigihe[2][jeta][jphi] /= (sumdigiHE2 / nsumdigiHE2);
4525  if (adigihe[3][jeta][jphi] > 0.)
4526  adigihe[3][jeta][jphi] /= (sumdigiHE3 / nsumdigiHE3);
4527  if (adigihe[4][jeta][jphi] > 0.)
4528  adigihe[4][jeta][jphi] /= (sumdigiHE4 / nsumdigiHE4);
4529  if (adigihe[5][jeta][jphi] > 0.)
4530  adigihe[5][jeta][jphi] /= (sumdigiHE5 / nsumdigiHE5);
4531  if (adigihe[6][jeta][jphi] > 0.)
4532  adigihe[6][jeta][jphi] /= (sumdigiHE6 / nsumdigiHE6);
4533  } // phi
4534  } //eta
4535  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
4536  //======================================================================
4537  //======================================================================
4538  //cout<<" R2D-eta/phi-plot: R, averaged over depthes *****" <<endl;
4539  c1x0->Clear();
4541  c1x0->Divide(1, 1);
4542  c1x0->cd(1);
4543  TH2F *GefzRdigiHE42D = new TH2F("GefzRdigiHE42D", "", neta, -41., 41., nphi, 0., 72.);
4544  TH2F *GefzRdigiHE42D0 = new TH2F("GefzRdigiHE42D0", "", neta, -41., 41., nphi, 0., 72.);
4545  TH2F *GefzRdigiHE42DF = (TH2F *)GefzRdigiHE42D0->Clone("GefzRdigiHE42DF");
4546  for (int i = 0; i < ndepth; i++) {
4547  for (int jeta = 0; jeta < neta; jeta++) {
4548  for (int jphi = 0; jphi < nphi; jphi++) {
4549  double ccc1 = adigihe[i][jeta][jphi];
4550  int k2plot = jeta - 41;
4551  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
4552  if (ccc1 != 0.) {
4553  GefzRdigiHE42D->Fill(kkk, jphi, ccc1);
4554  GefzRdigiHE42D0->Fill(kkk, jphi, 1.);
4555  }
4556  }
4557  }
4558  }
4559  GefzRdigiHE42DF->Divide(GefzRdigiHE42D, GefzRdigiHE42D0, 1, 1, "B"); // average A
4560  gPad->SetGridy();
4561  gPad->SetGridx(); // gPad->SetLogz();
4562  GefzRdigiHE42DF->SetMarkerStyle(20);
4563  GefzRdigiHE42DF->SetMarkerSize(0.4);
4564  GefzRdigiHE42DF->GetZaxis()->SetLabelSize(0.08);
4565  GefzRdigiHE42DF->SetXTitle("<R>_depth #eta \b");
4566  GefzRdigiHE42DF->SetYTitle(" #phi \b");
4567  GefzRdigiHE42DF->SetZTitle("<R>_depth \b");
4568  GefzRdigiHE42DF->SetMarkerColor(2);
4569  GefzRdigiHE42DF->SetLineColor(
4570  0); // GefzRdigiHE42DF->SetMaximum(1.000); // GefzRdigiHE42DF->SetMinimum(1.0);
4571  GefzRdigiHE42DF->Draw("COLZ");
4573  c1x0->Update();
4574  c1x0->Print("RdigiGeneralD2PhiSymmetryHE.png");
4575  c1x0->Clear();
4576  // clean-up
4577  if (GefzRdigiHE42D)
4578  delete GefzRdigiHE42D;
4579  if (GefzRdigiHE42D0)
4580  delete GefzRdigiHE42D0;
4581  if (GefzRdigiHE42DF)
4582  delete GefzRdigiHE42DF;
4583  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
4584  //======================================================================
4585  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
4586  c1x1->Clear();
4588  c1x1->Divide(1, 1);
4589  c1x1->cd(1);
4590  TH1F *GefzRdigiHE41D = new TH1F("GefzRdigiHE41D", "", nphi, 0., 72.);
4591  TH1F *GefzRdigiHE41D0 = new TH1F("GefzRdigiHE41D0", "", nphi, 0., 72.);
4592  TH1F *GefzRdigiHE41DF = (TH1F *)GefzRdigiHE41D0->Clone("GefzRdigiHE41DF");
4593  for (int jphi = 0; jphi < nphi; jphi++) {
4594  for (int jeta = 0; jeta < neta; jeta++) {
4595  for (int i = 0; i < ndepth; i++) {
4596  double ccc1 = adigihe[i][jeta][jphi];
4597  if (ccc1 != 0.) {
4598  GefzRdigiHE41D->Fill(jphi, ccc1);
4599  GefzRdigiHE41D0->Fill(jphi, 1.);
4600  }
4601  }
4602  }
4603  }
4604  GefzRdigiHE41DF->Divide(GefzRdigiHE41D, GefzRdigiHE41D0, 1, 1, "B"); // R averaged over depthes & eta
4605  GefzRdigiHE41D0->Sumw2();
4606  // for (int jphi=1;jphi<73;jphi++) {GefzRdigiHE41DF->SetBinError(jphi,0.01);}
4607  gPad->SetGridy();
4608  gPad->SetGridx(); // gPad->SetLogz();
4609  GefzRdigiHE41DF->SetMarkerStyle(20);
4610  GefzRdigiHE41DF->SetMarkerSize(1.4);
4611  GefzRdigiHE41DF->GetZaxis()->SetLabelSize(0.08);
4612  GefzRdigiHE41DF->SetXTitle("#phi \b");
4613  GefzRdigiHE41DF->SetYTitle(" <R> \b");
4614  GefzRdigiHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
4615  GefzRdigiHE41DF->SetMarkerColor(4);
4616  GefzRdigiHE41DF->SetLineColor(
4617  4); // GefzRdigiHE41DF->SetMinimum(0.8); // GefzRdigiHE41DF->SetMaximum(1.000);
4618  GefzRdigiHE41DF->Draw("Error");
4620  c1x1->Update();
4621  c1x1->Print("RdigiGeneralD1PhiSymmetryHE.png");
4622  c1x1->Clear();
4623  // clean-up
4624  if (GefzRdigiHE41D)
4625  delete GefzRdigiHE41D;
4626  if (GefzRdigiHE41D0)
4627  delete GefzRdigiHE41D0;
4628  if (GefzRdigiHE41DF)
4629  delete GefzRdigiHE41DF;
4630 
4631  //========================================================================================== 4
4632  //======================================================================
4633  //======================================================================1D plot: R vs phi , different eta, depth=1
4634  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
4635  c3x5->Clear();
4637  c3x5->Divide(3, 5);
4638  c3x5->cd(1);
4639  int kcountHEpositivedirectionDigi1 = 1;
4640  TH1F *h2CeffHEpositivedirectionDigi1 = new TH1F("h2CeffHEpositivedirectionDigi1", "", nphi, 0., 72.);
4641  for (int jeta = 0; jeta < njeta; jeta++) {
4642  // positivedirectionDigi:
4643  if (jeta - 41 >= 0) {
4644  // for (int i=0;i<ndepth;i++) {
4645  // depth=1
4646  for (int i = 0; i < 1; i++) {
4647  TH1F *HEpositivedirectionDigi1 = (TH1F *)h2CeffHEpositivedirectionDigi1->Clone("twod1");
4648  float ccctest = 0; // to avoid empty massive elements
4649  for (int jphi = 0; jphi < nphi; jphi++) {
4650  double ccc1 = adigihe[i][jeta][jphi];
4651  if (ccc1 != 0.) {
4652  HEpositivedirectionDigi1->Fill(jphi, ccc1);
4653  ccctest = 1.; //HEpositivedirectionDigi1->SetBinError(i,0.01);
4654  }
4655  } // for jphi
4656  if (ccctest > 0.) {
4657  // cout<<"444 kcountHEpositivedirectionDigi1 = "<<kcountHEpositivedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
4658  c3x5->cd(kcountHEpositivedirectionDigi1);
4659  HEpositivedirectionDigi1->SetMarkerStyle(20);
4660  HEpositivedirectionDigi1->SetMarkerSize(0.4);
4661  HEpositivedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
4662  HEpositivedirectionDigi1->SetXTitle("HEpositivedirectionDigi1 \b");
4663  HEpositivedirectionDigi1->SetMarkerColor(2);
4664  HEpositivedirectionDigi1->SetLineColor(0);
4665  gPad->SetGridy();
4666  gPad->SetGridx();
4667  // gPad->SetLogy();
4668  if (kcountHEpositivedirectionDigi1 == 1)
4669  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
4670  if (kcountHEpositivedirectionDigi1 == 2)
4671  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
4672  if (kcountHEpositivedirectionDigi1 == 3)
4673  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
4674  if (kcountHEpositivedirectionDigi1 == 4)
4675  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
4676  if (kcountHEpositivedirectionDigi1 == 5)
4677  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
4678  if (kcountHEpositivedirectionDigi1 == 6)
4679  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
4680  if (kcountHEpositivedirectionDigi1 == 7)
4681  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
4682  if (kcountHEpositivedirectionDigi1 == 8)
4683  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
4684  if (kcountHEpositivedirectionDigi1 == 9)
4685  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
4686  if (kcountHEpositivedirectionDigi1 == 10)
4687  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
4688  if (kcountHEpositivedirectionDigi1 == 11)
4689  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
4690  if (kcountHEpositivedirectionDigi1 == 12)
4691  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
4692  HEpositivedirectionDigi1->Draw("Error");
4693  kcountHEpositivedirectionDigi1++;
4694  if (kcountHEpositivedirectionDigi1 > 12)
4695  break; // 4x6 = 24
4696  } //ccctest>0
4697 
4698  } // for i
4699  } //if(jeta-41 >= 0)
4700  } //for jeta
4702  c3x5->Update();
4703  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
4704  c3x5->Clear();
4705  // clean-up
4706  if (h2CeffHEpositivedirectionDigi1)
4707  delete h2CeffHEpositivedirectionDigi1;
4708 
4709  //========================================================================================== 5
4710  //======================================================================
4711  //======================================================================1D plot: R vs phi , different eta, depth=2
4712  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
4713  c3x5->Clear();
4715  c3x5->Divide(3, 5);
4716  c3x5->cd(1);
4717  int kcountHEpositivedirectionDigi2 = 1;
4718  TH1F *h2CeffHEpositivedirectionDigi2 = new TH1F("h2CeffHEpositivedirectionDigi2", "", nphi, 0., 72.);
4719  for (int jeta = 0; jeta < njeta; jeta++) {
4720  // positivedirectionDigi:
4721  if (jeta - 41 >= 0) {
4722  // for (int i=0;i<ndepth;i++) {
4723  // depth=2
4724  for (int i = 1; i < 2; i++) {
4725  TH1F *HEpositivedirectionDigi2 = (TH1F *)h2CeffHEpositivedirectionDigi2->Clone("twod1");
4726  float ccctest = 0; // to avoid empty massive elements
4727  for (int jphi = 0; jphi < nphi; jphi++) {
4728  double ccc1 = adigihe[i][jeta][jphi];
4729  if (ccc1 != 0.) {
4730  HEpositivedirectionDigi2->Fill(jphi, ccc1);
4731  ccctest = 1.; //HEpositivedirectionDigi2->SetBinError(i,0.01);
4732  }
4733  } // for jphi
4734  if (ccctest > 0.) {
4735  //cout<<"555 kcountHEpositivedirectionDigi2 = "<<kcountHEpositivedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
4736  c3x5->cd(kcountHEpositivedirectionDigi2);
4737  HEpositivedirectionDigi2->SetMarkerStyle(20);
4738  HEpositivedirectionDigi2->SetMarkerSize(0.4);
4739  HEpositivedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
4740  HEpositivedirectionDigi2->SetXTitle("HEpositivedirectionDigi2 \b");
4741  HEpositivedirectionDigi2->SetMarkerColor(2);
4742  HEpositivedirectionDigi2->SetLineColor(0);
4743  gPad->SetGridy();
4744  gPad->SetGridx();
4745  // gPad->SetLogy();
4746  if (kcountHEpositivedirectionDigi2 == 1)
4747  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
4748  if (kcountHEpositivedirectionDigi2 == 2)
4749  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
4750  if (kcountHEpositivedirectionDigi2 == 3)
4751  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
4752  if (kcountHEpositivedirectionDigi2 == 4)
4753  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
4754  if (kcountHEpositivedirectionDigi2 == 5)
4755  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
4756  if (kcountHEpositivedirectionDigi2 == 6)
4757  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
4758  if (kcountHEpositivedirectionDigi2 == 7)
4759  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
4760  if (kcountHEpositivedirectionDigi2 == 8)
4761  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
4762  if (kcountHEpositivedirectionDigi2 == 9)
4763  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
4764  if (kcountHEpositivedirectionDigi2 == 10)
4765  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
4766  if (kcountHEpositivedirectionDigi2 == 11)
4767  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
4768  if (kcountHEpositivedirectionDigi2 == 12)
4769  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
4770  if (kcountHEpositivedirectionDigi2 == 13)
4771  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
4772  HEpositivedirectionDigi2->Draw("Error");
4773  kcountHEpositivedirectionDigi2++;
4774  if (kcountHEpositivedirectionDigi2 > 13)
4775  break; // 4x6 = 24
4776  } //ccctest>0
4777 
4778  } // for i
4779  } //if(jeta-41 >= 0)
4780  } //for jeta
4782  c3x5->Update();
4783  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
4784  c3x5->Clear();
4785  // clean-up
4786  if (h2CeffHEpositivedirectionDigi2)
4787  delete h2CeffHEpositivedirectionDigi2;
4788  //========================================================================================== 6
4789  //======================================================================
4790  //======================================================================1D plot: R vs phi , different eta, depth=3
4791  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
4792  c3x5->Clear();
4794  c3x5->Divide(3, 5);
4795  c3x5->cd(1);
4796  int kcountHEpositivedirectionDigi3 = 1;
4797  TH1F *h2CeffHEpositivedirectionDigi3 = new TH1F("h2CeffHEpositivedirectionDigi3", "", nphi, 0., 72.);
4798  for (int jeta = 0; jeta < njeta; jeta++) {
4799  // positivedirectionDigi:
4800  if (jeta - 41 >= 0) {
4801  // for (int i=0;i<ndepth;i++) {
4802  // depth=3
4803  for (int i = 2; i < 3; i++) {
4804  TH1F *HEpositivedirectionDigi3 = (TH1F *)h2CeffHEpositivedirectionDigi3->Clone("twod1");
4805  float ccctest = 0; // to avoid empty massive elements
4806  for (int jphi = 0; jphi < nphi; jphi++) {
4807  double ccc1 = adigihe[i][jeta][jphi];
4808  if (ccc1 != 0.) {
4809  HEpositivedirectionDigi3->Fill(jphi, ccc1);
4810  ccctest = 1.; //HEpositivedirectionDigi3->SetBinError(i,0.01);
4811  }
4812  } // for jphi
4813  if (ccctest > 0.) {
4814  //cout<<"666 kcountHEpositivedirectionDigi3 = "<<kcountHEpositivedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
4815  c3x5->cd(kcountHEpositivedirectionDigi3);
4816  HEpositivedirectionDigi3->SetMarkerStyle(20);
4817  HEpositivedirectionDigi3->SetMarkerSize(0.4);
4818  HEpositivedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
4819  HEpositivedirectionDigi3->SetXTitle("HEpositivedirectionDigi3 \b");
4820  HEpositivedirectionDigi3->SetMarkerColor(2);
4821  HEpositivedirectionDigi3->SetLineColor(0);
4822  gPad->SetGridy();
4823  gPad->SetGridx();
4824  // gPad->SetLogy();
4825  if (kcountHEpositivedirectionDigi3 == 1)
4826  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
4827  if (kcountHEpositivedirectionDigi3 == 2)
4828  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
4829  if (kcountHEpositivedirectionDigi3 == 3)
4830  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
4831  if (kcountHEpositivedirectionDigi3 == 4)
4832  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
4833  if (kcountHEpositivedirectionDigi3 == 5)
4834  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
4835  if (kcountHEpositivedirectionDigi3 == 6)
4836  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
4837  if (kcountHEpositivedirectionDigi3 == 7)
4838  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
4839  if (kcountHEpositivedirectionDigi3 == 8)
4840  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
4841  if (kcountHEpositivedirectionDigi3 == 9)
4842  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
4843  if (kcountHEpositivedirectionDigi3 == 10)
4844  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
4845  if (kcountHEpositivedirectionDigi3 == 11)
4846  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
4847  if (kcountHEpositivedirectionDigi3 == 12)
4848  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
4849  if (kcountHEpositivedirectionDigi3 == 13)
4850  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
4851  HEpositivedirectionDigi3->Draw("Error");
4852  kcountHEpositivedirectionDigi3++;
4853  if (kcountHEpositivedirectionDigi3 > 13)
4854  break; // 4x6 = 24
4855  } //ccctest>0
4856 
4857  } // for i
4858  } //if(jeta-41 >= 0)
4859  } //for jeta
4861  c3x5->Update();
4862  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
4863  c3x5->Clear();
4864  // clean-up
4865  if (h2CeffHEpositivedirectionDigi3)
4866  delete h2CeffHEpositivedirectionDigi3;
4867  //========================================================================================== 7
4868  //======================================================================
4869  //======================================================================1D plot: R vs phi , different eta, depth=4
4870  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
4871  c3x5->Clear();
4873  c3x5->Divide(3, 5);
4874  c3x5->cd(1);
4875  int kcountHEpositivedirectionDigi4 = 1;
4876  TH1F *h2CeffHEpositivedirectionDigi4 = new TH1F("h2CeffHEpositivedirectionDigi4", "", nphi, 0., 72.);
4877 
4878  for (int jeta = 0; jeta < njeta; jeta++) {
4879  // positivedirectionDigi:
4880  if (jeta - 41 >= 0) {
4881  // for (int i=0;i<ndepth;i++) {
4882  // depth=4
4883  for (int i = 3; i < 4; i++) {
4884  TH1F *HEpositivedirectionDigi4 = (TH1F *)h2CeffHEpositivedirectionDigi4->Clone("twod1");
4885 
4886  float ccctest = 0; // to avoid empty massive elements
4887  for (int jphi = 0; jphi < nphi; jphi++) {
4888  double ccc1 = adigihe[i][jeta][jphi];
4889  if (ccc1 != 0.) {
4890  HEpositivedirectionDigi4->Fill(jphi, ccc1);
4891  ccctest = 1.; //HEpositivedirectionDigi4->SetBinError(i,0.01);
4892  }
4893  } // for jphi
4894  if (ccctest > 0.) {
4895  //cout<<"777 kcountHEpositivedirectionDigi4 = "<<kcountHEpositivedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
4896  c3x5->cd(kcountHEpositivedirectionDigi4);
4897  HEpositivedirectionDigi4->SetMarkerStyle(20);
4898  HEpositivedirectionDigi4->SetMarkerSize(0.4);
4899  HEpositivedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
4900  HEpositivedirectionDigi4->SetXTitle("HEpositivedirectionDigi4 \b");
4901  HEpositivedirectionDigi4->SetMarkerColor(2);
4902  HEpositivedirectionDigi4->SetLineColor(0);
4903  gPad->SetGridy();
4904  gPad->SetGridx();
4905  // gPad->SetLogy();
4906  if (kcountHEpositivedirectionDigi4 == 1)
4907  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
4908  if (kcountHEpositivedirectionDigi4 == 2)
4909  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
4910  if (kcountHEpositivedirectionDigi4 == 3)
4911  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
4912  if (kcountHEpositivedirectionDigi4 == 4)
4913  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
4914  if (kcountHEpositivedirectionDigi4 == 5)
4915  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
4916  if (kcountHEpositivedirectionDigi4 == 6)
4917  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
4918  if (kcountHEpositivedirectionDigi4 == 7)
4919  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
4920  if (kcountHEpositivedirectionDigi4 == 8)
4921  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
4922  if (kcountHEpositivedirectionDigi4 == 9)
4923  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
4924  if (kcountHEpositivedirectionDigi4 == 10)
4925  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
4926  if (kcountHEpositivedirectionDigi4 == 11)
4927  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
4928  if (kcountHEpositivedirectionDigi4 == 12)
4929  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
4930  HEpositivedirectionDigi4->Draw("Error");
4931  kcountHEpositivedirectionDigi4++;
4932  if (kcountHEpositivedirectionDigi4 > 12)
4933  break; // 4x6 = 24
4934  } //ccctest>0
4935 
4936  } // for i
4937  } //if(jeta-41 >= 0)
4938  } //for jeta
4940  c3x5->Update();
4941  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
4942  c3x5->Clear();
4943  // clean-up
4944  if (h2CeffHEpositivedirectionDigi4)
4945  delete h2CeffHEpositivedirectionDigi4;
4946  //========================================================================================== 8
4947  //======================================================================
4948  //======================================================================1D plot: R vs phi , different eta, depth=5
4949  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
4950  c3x5->Clear();
4952  c3x5->Divide(3, 5);
4953  c3x5->cd(1);
4954  int kcountHEpositivedirectionDigi5 = 1;
4955  TH1F *h2CeffHEpositivedirectionDigi5 = new TH1F("h2CeffHEpositivedirectionDigi5", "", nphi, 0., 72.);
4956 
4957  for (int jeta = 0; jeta < njeta; jeta++) {
4958  // positivedirectionDigi:
4959  if (jeta - 41 >= 0) {
4960  // for (int i=0;i<ndepth;i++) {
4961  // depth=5
4962  for (int i = 4; i < 5; i++) {
4963  TH1F *HEpositivedirectionDigi5 = (TH1F *)h2CeffHEpositivedirectionDigi5->Clone("twod1");
4964 
4965  float ccctest = 0; // to avoid empty massive elements
4966  for (int jphi = 0; jphi < nphi; jphi++) {
4967  // cout<<"888 initial kcountHEpositivedirectionDigi5 = "<<kcountHEpositivedirectionDigi5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" adigihe[i][jeta][jphi]= "<< adigihe[i][jeta][jphi] <<" depth= "<< i <<endl;
4968 
4969  double ccc1 = adigihe[i][jeta][jphi];
4970  if (ccc1 != 0.) {
4971  HEpositivedirectionDigi5->Fill(jphi, ccc1);
4972  ccctest = 1.; //HEpositivedirectionDigi5->SetBinError(i,0.01);
4973  }
4974  } // for jphi
4975  if (ccctest > 0.) {
4976  //cout<<"888 kcountHEpositivedirectionDigi5 = "<<kcountHEpositivedirectionDigi5 <<" jeta-41= "<< jeta-41 <<endl;
4977  c3x5->cd(kcountHEpositivedirectionDigi5);
4978  HEpositivedirectionDigi5->SetMarkerStyle(20);
4979  HEpositivedirectionDigi5->SetMarkerSize(0.4);
4980  HEpositivedirectionDigi5->GetYaxis()->SetLabelSize(0.04);
4981  HEpositivedirectionDigi5->SetXTitle("HEpositivedirectionDigi5 \b");
4982  HEpositivedirectionDigi5->SetMarkerColor(2);
4983  HEpositivedirectionDigi5->SetLineColor(0);
4984  gPad->SetGridy();
4985  gPad->SetGridx();
4986  // gPad->SetLogy();
4987  if (kcountHEpositivedirectionDigi5 == 1)
4988  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
4989  if (kcountHEpositivedirectionDigi5 == 2)
4990  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
4991  if (kcountHEpositivedirectionDigi5 == 3)
4992  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
4993  if (kcountHEpositivedirectionDigi5 == 4)
4994  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
4995  if (kcountHEpositivedirectionDigi5 == 5)
4996  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
4997  if (kcountHEpositivedirectionDigi5 == 6)
4998  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
4999  if (kcountHEpositivedirectionDigi5 == 7)
5000  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
5001  if (kcountHEpositivedirectionDigi5 == 8)
5002  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
5003  if (kcountHEpositivedirectionDigi5 == 9)
5004  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
5005  if (kcountHEpositivedirectionDigi5 == 10)
5006  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
5007  if (kcountHEpositivedirectionDigi5 == 11)
5008  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
5009  HEpositivedirectionDigi5->Draw("Error");
5010  kcountHEpositivedirectionDigi5++;
5011  if (kcountHEpositivedirectionDigi5 > 11)
5012  break; // 4x6 = 24
5013  } //ccctest>0
5014 
5015  } // for i
5016  } //if(jeta-41 >= 0)
5017  } //for jeta
5019  c3x5->Update();
5020  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
5021  c3x5->Clear();
5022  // clean-up
5023  if (h2CeffHEpositivedirectionDigi5)
5024  delete h2CeffHEpositivedirectionDigi5;
5025  //========================================================================================== 9
5026  //======================================================================
5027  //======================================================================1D plot: R vs phi , different eta, depth=6
5028  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
5029  c3x5->Clear();
5031  c3x5->Divide(3, 5);
5032  c3x5->cd(1);
5033  int kcountHEpositivedirectionDigi6 = 1;
5034  TH1F *h2CeffHEpositivedirectionDigi6 = new TH1F("h2CeffHEpositivedirectionDigi6", "", nphi, 0., 72.);
5035 
5036  for (int jeta = 0; jeta < njeta; jeta++) {
5037  // positivedirectionDigi:
5038  if (jeta - 41 >= 0) {
5039  // for (int i=0;i<ndepth;i++) {
5040  // depth=6
5041  for (int i = 5; i < 6; i++) {
5042  TH1F *HEpositivedirectionDigi6 = (TH1F *)h2CeffHEpositivedirectionDigi6->Clone("twod1");
5043 
5044  float ccctest = 0; // to avoid empty massive elements
5045  for (int jphi = 0; jphi < nphi; jphi++) {
5046  double ccc1 = adigihe[i][jeta][jphi];
5047  if (ccc1 != 0.) {
5048  HEpositivedirectionDigi6->Fill(jphi, ccc1);
5049  ccctest = 1.; //HEpositivedirectionDigi6->SetBinError(i,0.01);
5050  }
5051  } // for jphi
5052  if (ccctest > 0.) {
5053  //cout<<"999 kcountHEpositivedirectionDigi6 = "<<kcountHEpositivedirectionDigi6 <<" jeta-41= "<< jeta-41 <<endl;
5054  c3x5->cd(kcountHEpositivedirectionDigi6);
5055  HEpositivedirectionDigi6->SetMarkerStyle(20);
5056  HEpositivedirectionDigi6->SetMarkerSize(0.4);
5057  HEpositivedirectionDigi6->GetYaxis()->SetLabelSize(0.04);
5058  HEpositivedirectionDigi6->SetXTitle("HEpositivedirectionDigi6 \b");
5059  HEpositivedirectionDigi6->SetMarkerColor(2);
5060  HEpositivedirectionDigi6->SetLineColor(0);
5061  gPad->SetGridy();
5062  gPad->SetGridx();
5063  // gPad->SetLogy();
5064  if (kcountHEpositivedirectionDigi6 == 1)
5065  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
5066  if (kcountHEpositivedirectionDigi6 == 2)
5067  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
5068  if (kcountHEpositivedirectionDigi6 == 3)
5069  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
5070  if (kcountHEpositivedirectionDigi6 == 4)
5071  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
5072  if (kcountHEpositivedirectionDigi6 == 5)
5073  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
5074  if (kcountHEpositivedirectionDigi6 == 6)
5075  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
5076  if (kcountHEpositivedirectionDigi6 == 7)
5077  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
5078  if (kcountHEpositivedirectionDigi6 == 8)
5079  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
5080  if (kcountHEpositivedirectionDigi6 == 9)
5081  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
5082  if (kcountHEpositivedirectionDigi6 == 10)
5083  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
5084  HEpositivedirectionDigi6->Draw("Error");
5085  kcountHEpositivedirectionDigi6++;
5086  if (kcountHEpositivedirectionDigi6 > 10)
5087  break; // 4x6 = 24
5088  } //ccctest>0
5089 
5090  } // for i
5091  } //if(jeta-41 >= 0)
5092  } //for jeta
5094  c3x5->Update();
5095  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
5096  c3x5->Clear();
5097  // clean-up
5098  if (h2CeffHEpositivedirectionDigi6)
5099  delete h2CeffHEpositivedirectionDigi6;
5100  //========================================================================================== 10
5101  //======================================================================
5102  //======================================================================1D plot: R vs phi , different eta, depth=7
5103  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
5104  c3x5->Clear();
5106  c3x5->Divide(3, 5);
5107  c3x5->cd(1);
5108  int kcountHEpositivedirectionDigi7 = 1;
5109  TH1F *h2CeffHEpositivedirectionDigi7 = new TH1F("h2CeffHEpositivedirectionDigi7", "", nphi, 0., 72.);
5110 
5111  for (int jeta = 0; jeta < njeta; jeta++) {
5112  // positivedirectionDigi:
5113  if (jeta - 41 >= 0) {
5114  // for (int i=0;i<ndepth;i++) {
5115  // depth=7
5116  for (int i = 6; i < 7; i++) {
5117  TH1F *HEpositivedirectionDigi7 = (TH1F *)h2CeffHEpositivedirectionDigi7->Clone("twod1");
5118 
5119  float ccctest = 0; // to avoid empty massive elements
5120  for (int jphi = 0; jphi < nphi; jphi++) {
5121  double ccc1 = adigihe[i][jeta][jphi];
5122  if (ccc1 != 0.) {
5123  HEpositivedirectionDigi7->Fill(jphi, ccc1);
5124  ccctest = 1.; //HEpositivedirectionDigi7->SetBinError(i,0.01);
5125  }
5126  } // for jphi
5127  if (ccctest > 0.) {
5128  //cout<<"1010 kcountHEpositivedirectionDigi7 = "<<kcountHEpositivedirectionDigi7 <<" jeta-41= "<< jeta-41 <<endl;
5129  c3x5->cd(kcountHEpositivedirectionDigi7);
5130  HEpositivedirectionDigi7->SetMarkerStyle(20);
5131  HEpositivedirectionDigi7->SetMarkerSize(0.4);
5132  HEpositivedirectionDigi7->GetYaxis()->SetLabelSize(0.04);
5133  HEpositivedirectionDigi7->SetXTitle("HEpositivedirectionDigi7 \b");
5134  HEpositivedirectionDigi7->SetMarkerColor(2);
5135  HEpositivedirectionDigi7->SetLineColor(0);
5136  gPad->SetGridy();
5137  gPad->SetGridx();
5138  // gPad->SetLogy();
5139  if (kcountHEpositivedirectionDigi7 == 1)
5140  HEpositivedirectionDigi7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
5141  if (kcountHEpositivedirectionDigi7 == 2)
5142  HEpositivedirectionDigi7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
5143  if (kcountHEpositivedirectionDigi7 == 3)
5144  HEpositivedirectionDigi7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
5145  HEpositivedirectionDigi7->Draw("Error");
5146  kcountHEpositivedirectionDigi7++;
5147  if (kcountHEpositivedirectionDigi7 > 3)
5148  break; //
5149  } //ccctest>0
5150 
5151  } // for i
5152  } //if(jeta-41 >= 0)
5153  } //for jeta
5155  c3x5->Update();
5156  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
5157  c3x5->Clear();
5158  // clean-up
5159  if (h2CeffHEpositivedirectionDigi7)
5160  delete h2CeffHEpositivedirectionDigi7;
5161 
5163  //========================================================================================== 1114
5164  //======================================================================
5165  //======================================================================1D plot: R vs phi , different eta, depth=1
5166  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
5167  c3x5->Clear();
5169  c3x5->Divide(3, 5);
5170  c3x5->cd(1);
5171  int kcountHEnegativedirectionDigi1 = 1;
5172  TH1F *h2CeffHEnegativedirectionDigi1 = new TH1F("h2CeffHEnegativedirectionDigi1", "", nphi, 0., 72.);
5173  for (int jeta = 0; jeta < njeta; jeta++) {
5174  // negativedirectionDigi:
5175  if (jeta - 41 < 0) {
5176  // for (int i=0;i<ndepth;i++) {
5177  // depth=1
5178  for (int i = 0; i < 1; i++) {
5179  TH1F *HEnegativedirectionDigi1 = (TH1F *)h2CeffHEnegativedirectionDigi1->Clone("twod1");
5180  float ccctest = 0; // to avoid empty massive elements
5181  for (int jphi = 0; jphi < nphi; jphi++) {
5182  double ccc1 = adigihe[i][jeta][jphi];
5183  if (ccc1 != 0.) {
5184  HEnegativedirectionDigi1->Fill(jphi, ccc1);
5185  ccctest = 1.; //HEnegativedirectionDigi1->SetBinError(i,0.01);
5186  }
5187  } // for jphi
5188  if (ccctest > 0.) {
5189  // cout<<"444 kcountHEnegativedirectionDigi1 = "<<kcountHEnegativedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
5190  c3x5->cd(kcountHEnegativedirectionDigi1);
5191  HEnegativedirectionDigi1->SetMarkerStyle(20);
5192  HEnegativedirectionDigi1->SetMarkerSize(0.4);
5193  HEnegativedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
5194  HEnegativedirectionDigi1->SetXTitle("HEnegativedirectionDigi1 \b");
5195  HEnegativedirectionDigi1->SetMarkerColor(2);
5196  HEnegativedirectionDigi1->SetLineColor(0);
5197  gPad->SetGridy();
5198  gPad->SetGridx();
5199  // gPad->SetLogy();
5200  if (kcountHEnegativedirectionDigi1 == 1)
5201  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
5202  if (kcountHEnegativedirectionDigi1 == 2)
5203  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
5204  if (kcountHEnegativedirectionDigi1 == 3)
5205  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
5206  if (kcountHEnegativedirectionDigi1 == 4)
5207  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
5208  if (kcountHEnegativedirectionDigi1 == 5)
5209  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
5210  if (kcountHEnegativedirectionDigi1 == 6)
5211  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
5212  if (kcountHEnegativedirectionDigi1 == 7)
5213  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
5214  if (kcountHEnegativedirectionDigi1 == 8)
5215  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
5216  if (kcountHEnegativedirectionDigi1 == 9)
5217  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
5218  if (kcountHEnegativedirectionDigi1 == 10)
5219  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
5220  if (kcountHEnegativedirectionDigi1 == 11)
5221  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
5222  if (kcountHEnegativedirectionDigi1 == 12)
5223  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
5224  HEnegativedirectionDigi1->Draw("Error");
5225  kcountHEnegativedirectionDigi1++;
5226  if (kcountHEnegativedirectionDigi1 > 12)
5227  break; // 4x6 = 24
5228  } //ccctest>0
5229 
5230  } // for i
5231  } //if(jeta-41 < 0)
5232  } //for jeta
5234  c3x5->Update();
5235  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
5236  c3x5->Clear();
5237  // clean-up
5238  if (h2CeffHEnegativedirectionDigi1)
5239  delete h2CeffHEnegativedirectionDigi1;
5240 
5241  //========================================================================================== 1115
5242  //======================================================================
5243  //======================================================================1D plot: R vs phi , different eta, depth=2
5244  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
5245  c3x5->Clear();
5247  c3x5->Divide(3, 5);
5248  c3x5->cd(1);
5249  int kcountHEnegativedirectionDigi2 = 1;
5250  TH1F *h2CeffHEnegativedirectionDigi2 = new TH1F("h2CeffHEnegativedirectionDigi2", "", nphi, 0., 72.);
5251  for (int jeta = 0; jeta < njeta; jeta++) {
5252  // negativedirectionDigi:
5253  if (jeta - 41 < 0) {
5254  // for (int i=0;i<ndepth;i++) {
5255  // depth=2
5256  for (int i = 1; i < 2; i++) {
5257  TH1F *HEnegativedirectionDigi2 = (TH1F *)h2CeffHEnegativedirectionDigi2->Clone("twod1");
5258  float ccctest = 0; // to avoid empty massive elements
5259  for (int jphi = 0; jphi < nphi; jphi++) {
5260  double ccc1 = adigihe[i][jeta][jphi];
5261  if (ccc1 != 0.) {
5262  HEnegativedirectionDigi2->Fill(jphi, ccc1);
5263  ccctest = 1.; //HEnegativedirectionDigi2->SetBinError(i,0.01);
5264  }
5265  } // for jphi
5266  if (ccctest > 0.) {
5267  //cout<<"555 kcountHEnegativedirectionDigi2 = "<<kcountHEnegativedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
5268  c3x5->cd(kcountHEnegativedirectionDigi2);
5269  HEnegativedirectionDigi2->SetMarkerStyle(20);
5270  HEnegativedirectionDigi2->SetMarkerSize(0.4);
5271  HEnegativedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
5272  HEnegativedirectionDigi2->SetXTitle("HEnegativedirectionDigi2 \b");
5273  HEnegativedirectionDigi2->SetMarkerColor(2);
5274  HEnegativedirectionDigi2->SetLineColor(0);
5275  gPad->SetGridy();
5276  gPad->SetGridx();
5277  // gPad->SetLogy();
5278  if (kcountHEnegativedirectionDigi2 == 1)
5279  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
5280  if (kcountHEnegativedirectionDigi2 == 2)
5281  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
5282  if (kcountHEnegativedirectionDigi2 == 3)
5283  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
5284  if (kcountHEnegativedirectionDigi2 == 4)
5285  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
5286  if (kcountHEnegativedirectionDigi2 == 5)
5287  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
5288  if (kcountHEnegativedirectionDigi2 == 6)
5289  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
5290  if (kcountHEnegativedirectionDigi2 == 7)
5291  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
5292  if (kcountHEnegativedirectionDigi2 == 8)
5293  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
5294  if (kcountHEnegativedirectionDigi2 == 9)
5295  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
5296  if (kcountHEnegativedirectionDigi2 == 10)
5297  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
5298  if (kcountHEnegativedirectionDigi2 == 11)
5299  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
5300  if (kcountHEnegativedirectionDigi2 == 12)
5301  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
5302  if (kcountHEnegativedirectionDigi2 == 13)
5303  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
5304  HEnegativedirectionDigi2->Draw("Error");
5305  kcountHEnegativedirectionDigi2++;
5306  if (kcountHEnegativedirectionDigi2 > 13)
5307  break; // 4x6 = 24
5308  } //ccctest>0
5309 
5310  } // for i
5311  } //if(jeta-41 < 0)
5312  } //for jeta
5314  c3x5->Update();
5315  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
5316  c3x5->Clear();
5317  // clean-up
5318  if (h2CeffHEnegativedirectionDigi2)
5319  delete h2CeffHEnegativedirectionDigi2;
5320  //========================================================================================== 1116
5321  //======================================================================
5322  //======================================================================1D plot: R vs phi , different eta, depth=3
5323  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
5324  c3x5->Clear();
5326  c3x5->Divide(3, 5);
5327  c3x5->cd(1);
5328  int kcountHEnegativedirectionDigi3 = 1;
5329  TH1F *h2CeffHEnegativedirectionDigi3 = new TH1F("h2CeffHEnegativedirectionDigi3", "", nphi, 0., 72.);
5330  for (int jeta = 0; jeta < njeta; jeta++) {
5331  // negativedirectionDigi:
5332  if (jeta - 41 < 0) {
5333  // for (int i=0;i<ndepth;i++) {
5334  // depth=3
5335  for (int i = 2; i < 3; i++) {
5336  TH1F *HEnegativedirectionDigi3 = (TH1F *)h2CeffHEnegativedirectionDigi3->Clone("twod1");
5337  float ccctest = 0; // to avoid empty massive elements
5338  for (int jphi = 0; jphi < nphi; jphi++) {
5339  double ccc1 = adigihe[i][jeta][jphi];
5340  if (ccc1 != 0.) {
5341  HEnegativedirectionDigi3->Fill(jphi, ccc1);
5342  ccctest = 1.; //HEnegativedirectionDigi3->SetBinError(i,0.01);
5343  }
5344  } // for jphi
5345  if (ccctest > 0.) {
5346  //cout<<"666 kcountHEnegativedirectionDigi3 = "<<kcountHEnegativedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
5347  c3x5->cd(kcountHEnegativedirectionDigi3);
5348  HEnegativedirectionDigi3->SetMarkerStyle(20);
5349  HEnegativedirectionDigi3->SetMarkerSize(0.4);
5350  HEnegativedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
5351  HEnegativedirectionDigi3->SetXTitle("HEnegativedirectionDigi3 \b");
5352  HEnegativedirectionDigi3->SetMarkerColor(2);
5353  HEnegativedirectionDigi3->SetLineColor(0);
5354  gPad->SetGridy();
5355  gPad->SetGridx();
5356  // gPad->SetLogy();
5357  if (kcountHEnegativedirectionDigi3 == 1)
5358  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
5359  if (kcountHEnegativedirectionDigi3 == 2)
5360  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
5361  if (kcountHEnegativedirectionDigi3 == 3)
5362  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
5363  if (kcountHEnegativedirectionDigi3 == 4)
5364  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
5365  if (kcountHEnegativedirectionDigi3 == 5)
5366  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
5367  if (kcountHEnegativedirectionDigi3 == 6)
5368  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
5369  if (kcountHEnegativedirectionDigi3 == 7)
5370  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
5371  if (kcountHEnegativedirectionDigi3 == 8)
5372  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
5373  if (kcountHEnegativedirectionDigi3 == 9)
5374  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
5375  if (kcountHEnegativedirectionDigi3 == 10)
5376  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
5377  if (kcountHEnegativedirectionDigi3 == 11)
5378  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
5379  if (kcountHEnegativedirectionDigi3 == 12)
5380  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
5381  if (kcountHEnegativedirectionDigi3 == 13)
5382  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
5383  HEnegativedirectionDigi3->Draw("Error");
5384  kcountHEnegativedirectionDigi3++;
5385  if (kcountHEnegativedirectionDigi3 > 13)
5386  break; // 4x6 = 24
5387  } //ccctest>0
5388 
5389  } // for i
5390  } //if(jeta-41 < 0)
5391  } //for jeta
5393  c3x5->Update();
5394  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
5395  c3x5->Clear();
5396  // clean-up
5397  if (h2CeffHEnegativedirectionDigi3)
5398  delete h2CeffHEnegativedirectionDigi3;
5399  //========================================================================================== 1117
5400  //======================================================================
5401  //======================================================================1D plot: R vs phi , different eta, depth=4
5402  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
5403  c3x5->Clear();
5405  c3x5->Divide(3, 5);
5406  c3x5->cd(1);
5407  int kcountHEnegativedirectionDigi4 = 1;
5408  TH1F *h2CeffHEnegativedirectionDigi4 = new TH1F("h2CeffHEnegativedirectionDigi4", "", nphi, 0., 72.);
5409 
5410  for (int jeta = 0; jeta < njeta; jeta++) {
5411  // negativedirectionDigi:
5412  if (jeta - 41 < 0) {
5413  // for (int i=0;i<ndepth;i++) {
5414  // depth=4
5415  for (int i = 3; i < 4; i++) {
5416  TH1F *HEnegativedirectionDigi4 = (TH1F *)h2CeffHEnegativedirectionDigi4->Clone("twod1");
5417 
5418  float ccctest = 0; // to avoid empty massive elements
5419  for (int jphi = 0; jphi < nphi; jphi++) {
5420  double ccc1 = adigihe[i][jeta][jphi];
5421  if (ccc1 != 0.) {
5422  HEnegativedirectionDigi4->Fill(jphi, ccc1);
5423  ccctest = 1.; //HEnegativedirectionDigi4->SetBinError(i,0.01);
5424  }
5425  } // for jphi
5426  if (ccctest > 0.) {
5427  //cout<<"777 kcountHEnegativedirectionDigi4 = "<<kcountHEnegativedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
5428  c3x5->cd(kcountHEnegativedirectionDigi4);
5429  HEnegativedirectionDigi4->SetMarkerStyle(20);
5430  HEnegativedirectionDigi4->SetMarkerSize(0.4);
5431  HEnegativedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
5432  HEnegativedirectionDigi4->SetXTitle("HEnegativedirectionDigi4 \b");
5433  HEnegativedirectionDigi4->SetMarkerColor(2);
5434  HEnegativedirectionDigi4->SetLineColor(0);
5435  gPad->SetGridy();
5436  gPad->SetGridx();
5437  // gPad->SetLogy();
5438  if (kcountHEnegativedirectionDigi4 == 1)
5439  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
5440  if (kcountHEnegativedirectionDigi4 == 2)
5441  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
5442  if (kcountHEnegativedirectionDigi4 == 3)
5443  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
5444  if (kcountHEnegativedirectionDigi4 == 4)
5445  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
5446  if (kcountHEnegativedirectionDigi4 == 5)
5447  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
5448  if (kcountHEnegativedirectionDigi4 == 6)
5449  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
5450  if (kcountHEnegativedirectionDigi4 == 7)
5451  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
5452  if (kcountHEnegativedirectionDigi4 == 8)
5453  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
5454  if (kcountHEnegativedirectionDigi4 == 9)
5455  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
5456  if (kcountHEnegativedirectionDigi4 == 10)
5457  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
5458  if (kcountHEnegativedirectionDigi4 == 11)
5459  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
5460  if (kcountHEnegativedirectionDigi4 == 12)
5461  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
5462  HEnegativedirectionDigi4->Draw("Error");
5463  kcountHEnegativedirectionDigi4++;
5464  if (kcountHEnegativedirectionDigi4 > 12)
5465  break; // 4x6 = 24
5466  } //ccctest>0
5467 
5468  } // for i
5469  } //if(jeta-41 < 0)
5470  } //for jeta
5472  c3x5->Update();
5473  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
5474  c3x5->Clear();
5475  // clean-up
5476  if (h2CeffHEnegativedirectionDigi4)
5477  delete h2CeffHEnegativedirectionDigi4;
5478  //========================================================================================== 1118
5479  //======================================================================
5480  //======================================================================1D plot: R vs phi , different eta, depth=5
5481  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
5482  c3x5->Clear();
5484  c3x5->Divide(3, 5);
5485  c3x5->cd(1);
5486  int kcountHEnegativedirectionDigi5 = 1;
5487  TH1F *h2CeffHEnegativedirectionDigi5 = new TH1F("h2CeffHEnegativedirectionDigi5", "", nphi, 0., 72.);
5488 
5489  for (int jeta = 0; jeta < njeta; jeta++) {
5490  // negativedirectionDigi:
5491  if (jeta - 41 < 0) {
5492  // for (int i=0;i<ndepth;i++) {
5493  // depth=5
5494  for (int i = 4; i < 5; i++) {
5495  TH1F *HEnegativedirectionDigi5 = (TH1F *)h2CeffHEnegativedirectionDigi5->Clone("twod1");
5496 
5497  float ccctest = 0; // to avoid empty massive elements
5498  for (int jphi = 0; jphi < nphi; jphi++) {
5499  // cout<<"888 initial kcountHEnegativedirectionDigi5 = "<<kcountHEnegativedirectionDigi5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" adigihe[i][jeta][jphi]= "<< adigihe[i][jeta][jphi] <<" depth= "<< i <<endl;
5500 
5501  double ccc1 = adigihe[i][jeta][jphi];
5502  if (ccc1 != 0.) {
5503  HEnegativedirectionDigi5->Fill(jphi, ccc1);
5504  ccctest = 1.; //HEnegativedirectionDigi5->SetBinError(i,0.01);
5505  }
5506  } // for jphi
5507  if (ccctest > 0.) {
5508  //cout<<"888 kcountHEnegativedirectionDigi5 = "<<kcountHEnegativedirectionDigi5 <<" jeta-41= "<< jeta-41 <<endl;
5509  c3x5->cd(kcountHEnegativedirectionDigi5);
5510  HEnegativedirectionDigi5->SetMarkerStyle(20);
5511  HEnegativedirectionDigi5->SetMarkerSize(0.4);
5512  HEnegativedirectionDigi5->GetYaxis()->SetLabelSize(0.04);
5513  HEnegativedirectionDigi5->SetXTitle("HEnegativedirectionDigi5 \b");
5514  HEnegativedirectionDigi5->SetMarkerColor(2);
5515  HEnegativedirectionDigi5->SetLineColor(0);
5516  gPad->SetGridy();
5517  gPad->SetGridx();
5518  // gPad->SetLogy();
5519  if (kcountHEnegativedirectionDigi5 == 1)
5520  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
5521  if (kcountHEnegativedirectionDigi5 == 2)
5522  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
5523  if (kcountHEnegativedirectionDigi5 == 3)
5524  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
5525  if (kcountHEnegativedirectionDigi5 == 4)
5526  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
5527  if (kcountHEnegativedirectionDigi5 == 5)
5528  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
5529  if (kcountHEnegativedirectionDigi5 == 6)
5530  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
5531  if (kcountHEnegativedirectionDigi5 == 7)
5532  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
5533  if (kcountHEnegativedirectionDigi5 == 8)
5534  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
5535  if (kcountHEnegativedirectionDigi5 == 9)
5536  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
5537  if (kcountHEnegativedirectionDigi5 == 10)
5538  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
5539  if (kcountHEnegativedirectionDigi5 == 11)
5540  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
5541  HEnegativedirectionDigi5->Draw("Error");
5542  kcountHEnegativedirectionDigi5++;
5543  if (kcountHEnegativedirectionDigi5 > 11)
5544  break; // 4x6 = 24
5545  } //ccctest>0
5546 
5547  } // for i
5548  } //if(jeta-41 < 0)
5549  } //for jeta
5551  c3x5->Update();
5552  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
5553  c3x5->Clear();
5554  // clean-up
5555  if (h2CeffHEnegativedirectionDigi5)
5556  delete h2CeffHEnegativedirectionDigi5;
5557  //========================================================================================== 1119
5558  //======================================================================
5559  //======================================================================1D plot: R vs phi , different eta, depth=6
5560  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
5561  c3x5->Clear();
5563  c3x5->Divide(3, 5);
5564  c3x5->cd(1);
5565  int kcountHEnegativedirectionDigi6 = 1;
5566  TH1F *h2CeffHEnegativedirectionDigi6 = new TH1F("h2CeffHEnegativedirectionDigi6", "", nphi, 0., 72.);
5567 
5568  for (int jeta = 0; jeta < njeta; jeta++) {
5569  // negativedirectionDigi:
5570  if (jeta - 41 < 0) {
5571  // for (int i=0;i<ndepth;i++) {
5572  // depth=6
5573  for (int i = 5; i < 6; i++) {
5574  TH1F *HEnegativedirectionDigi6 = (TH1F *)h2CeffHEnegativedirectionDigi6->Clone("twod1");
5575 
5576  float ccctest = 0; // to avoid empty massive elements
5577  for (int jphi = 0; jphi < nphi; jphi++) {
5578  double ccc1 = adigihe[i][jeta][jphi];
5579  if (ccc1 != 0.) {
5580  HEnegativedirectionDigi6->Fill(jphi, ccc1);
5581  ccctest = 1.; //HEnegativedirectionDigi6->SetBinError(i,0.01);
5582  }
5583  } // for jphi
5584  if (ccctest > 0.) {
5585  //cout<<"999 kcountHEnegativedirectionDigi6 = "<<kcountHEnegativedirectionDigi6 <<" jeta-41= "<< jeta-41 <<endl;
5586  c3x5->cd(kcountHEnegativedirectionDigi6);
5587  HEnegativedirectionDigi6->SetMarkerStyle(20);
5588  HEnegativedirectionDigi6->SetMarkerSize(0.4);
5589  HEnegativedirectionDigi6->GetYaxis()->SetLabelSize(0.04);
5590  HEnegativedirectionDigi6->SetXTitle("HEnegativedirectionDigi6 \b");
5591  HEnegativedirectionDigi6->SetMarkerColor(2);
5592  HEnegativedirectionDigi6->SetLineColor(0);
5593  gPad->SetGridy();
5594  gPad->SetGridx();
5595  // gPad->SetLogy();
5596  if (kcountHEnegativedirectionDigi6 == 1)
5597  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
5598  if (kcountHEnegativedirectionDigi6 == 2)
5599  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
5600  if (kcountHEnegativedirectionDigi6 == 3)
5601  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
5602  if (kcountHEnegativedirectionDigi6 == 4)
5603  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
5604  if (kcountHEnegativedirectionDigi6 == 5)
5605  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
5606  if (kcountHEnegativedirectionDigi6 == 6)
5607  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
5608  if (kcountHEnegativedirectionDigi6 == 7)
5609  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
5610  if (kcountHEnegativedirectionDigi6 == 8)
5611  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
5612  if (kcountHEnegativedirectionDigi6 == 9)
5613  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
5614  if (kcountHEnegativedirectionDigi6 == 10)
5615  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
5616  HEnegativedirectionDigi6->Draw("Error");
5617  kcountHEnegativedirectionDigi6++;
5618  if (kcountHEnegativedirectionDigi6 > 10)
5619  break; // 4x6 = 24
5620  } //ccctest>0
5621 
5622  } // for i
5623  } //if(jeta-41 < 0)
5624  } //for jeta
5626  c3x5->Update();
5627  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
5628  c3x5->Clear();
5629  // clean-up
5630  if (h2CeffHEnegativedirectionDigi6)
5631  delete h2CeffHEnegativedirectionDigi6;
5632  //========================================================================================== 11110
5633  //======================================================================
5634  //======================================================================1D plot: R vs phi , different eta, depth=7
5635  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
5636  c3x5->Clear();
5638  c3x5->Divide(3, 5);
5639  c3x5->cd(1);
5640  int kcountHEnegativedirectionDigi7 = 1;
5641  TH1F *h2CeffHEnegativedirectionDigi7 = new TH1F("h2CeffHEnegativedirectionDigi7", "", nphi, 0., 72.);
5642 
5643  for (int jeta = 0; jeta < njeta; jeta++) {
5644  // negativedirectionDigi:
5645  if (jeta - 41 < 0) {
5646  // for (int i=0;i<ndepth;i++) {
5647  // depth=7
5648  for (int i = 6; i < 7; i++) {
5649  TH1F *HEnegativedirectionDigi7 = (TH1F *)h2CeffHEnegativedirectionDigi7->Clone("twod1");
5650 
5651  float ccctest = 0; // to avoid empty massive elements
5652  for (int jphi = 0; jphi < nphi; jphi++) {
5653  double ccc1 = adigihe[i][jeta][jphi];
5654  if (ccc1 != 0.) {
5655  HEnegativedirectionDigi7->Fill(jphi, ccc1);
5656  ccctest = 1.; //HEnegativedirectionDigi7->SetBinError(i,0.01);
5657  }
5658  } // for jphi
5659  if (ccctest > 0.) {
5660  //cout<<"1010 kcountHEnegativedirectionDigi7 = "<<kcountHEnegativedirectionDigi7 <<" jeta-41= "<< jeta-41 <<endl;
5661  c3x5->cd(kcountHEnegativedirectionDigi7);
5662  HEnegativedirectionDigi7->SetMarkerStyle(20);
5663  HEnegativedirectionDigi7->SetMarkerSize(0.4);
5664  HEnegativedirectionDigi7->GetYaxis()->SetLabelSize(0.04);
5665  HEnegativedirectionDigi7->SetXTitle("HEnegativedirectionDigi7 \b");
5666  HEnegativedirectionDigi7->SetMarkerColor(2);
5667  HEnegativedirectionDigi7->SetLineColor(0);
5668  gPad->SetGridy();
5669  gPad->SetGridx();
5670  // gPad->SetLogy();
5671  if (kcountHEnegativedirectionDigi7 == 1)
5672  HEnegativedirectionDigi7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
5673  if (kcountHEnegativedirectionDigi7 == 2)
5674  HEnegativedirectionDigi7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
5675  if (kcountHEnegativedirectionDigi7 == 3)
5676  HEnegativedirectionDigi7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
5677  HEnegativedirectionDigi7->Draw("Error");
5678  kcountHEnegativedirectionDigi7++;
5679  if (kcountHEnegativedirectionDigi7 > 3)
5680  break; // 4x6 = 24
5681  } //ccctest>0
5682 
5683  } // for i
5684  } //if(jeta-41 < 0)
5685  } //for jeta
5687  c3x5->Update();
5688  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
5689  c3x5->Clear();
5690  // clean-up
5691  if (h2CeffHEnegativedirectionDigi7)
5692  delete h2CeffHEnegativedirectionDigi7;
5693 
5695 
5696  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
5697 
5698  //cout<<" Start Vaiance: preparation *****" <<endl;
5699  TH2F *digiVariance1HE1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HE1");
5700  TH2F *digiVariance0HE1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE1");
5701  TH2F *digiVarianceHE1 = (TH2F *)digiVariance1HE1->Clone("digiVarianceHE1");
5702  digiVarianceHE1->Divide(digiVariance1HE1, digiVariance0HE1, 1, 1, "B");
5703  TH2F *digiVariance1HE2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HE2");
5704  TH2F *digiVariance0HE2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE2");
5705  TH2F *digiVarianceHE2 = (TH2F *)digiVariance1HE2->Clone("digiVarianceHE2");
5706  digiVarianceHE2->Divide(digiVariance1HE2, digiVariance0HE2, 1, 1, "B");
5707  TH2F *digiVariance1HE3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HE3");
5708  TH2F *digiVariance0HE3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE3");
5709  TH2F *digiVarianceHE3 = (TH2F *)digiVariance1HE3->Clone("digiVarianceHE3");
5710  digiVarianceHE3->Divide(digiVariance1HE3, digiVariance0HE3, 1, 1, "B");
5711  TH2F *digiVariance1HE4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HE4");
5712  TH2F *digiVariance0HE4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE4");
5713  TH2F *digiVarianceHE4 = (TH2F *)digiVariance1HE4->Clone("digiVarianceHE4");
5714  digiVarianceHE4->Divide(digiVariance1HE4, digiVariance0HE4, 1, 1, "B");
5715  TH2F *digiVariance1HE5 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HE5");
5716  TH2F *digiVariance0HE5 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE5");
5717  TH2F *digiVarianceHE5 = (TH2F *)digiVariance1HE5->Clone("digiVarianceHE5");
5718  digiVarianceHE5->Divide(digiVariance1HE5, digiVariance0HE5, 1, 1, "B");
5719  TH2F *digiVariance1HE6 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HE6");
5720  TH2F *digiVariance0HE6 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE6");
5721  TH2F *digiVarianceHE6 = (TH2F *)digiVariance1HE6->Clone("digiVarianceHE6");
5722  digiVarianceHE6->Divide(digiVariance1HE6, digiVariance0HE6, 1, 1, "B");
5723  TH2F *digiVariance1HE7 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HE7");
5724  TH2F *digiVariance0HE7 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HE7");
5725  TH2F *digiVarianceHE7 = (TH2F *)digiVariance1HE7->Clone("digiVarianceHE7");
5726  digiVarianceHE7->Divide(digiVariance1HE7, digiVariance0HE7, 1, 1, "B");
5727  //cout<<" Vaiance: preparation DONE *****" <<endl;
5728  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive digivariancehe
5729  // = sum(R*R)/N - (sum(R)/N)**2
5730  for (int jeta = 0; jeta < njeta; jeta++) {
5731  //preparation for PHI normalization:
5732  double sumdigiHE0 = 0;
5733  int nsumdigiHE0 = 0;
5734  double sumdigiHE1 = 0;
5735  int nsumdigiHE1 = 0;
5736  double sumdigiHE2 = 0;
5737  int nsumdigiHE2 = 0;
5738  double sumdigiHE3 = 0;
5739  int nsumdigiHE3 = 0;
5740  double sumdigiHE4 = 0;
5741  int nsumdigiHE4 = 0;
5742  double sumdigiHE5 = 0;
5743  int nsumdigiHE5 = 0;
5744  double sumdigiHE6 = 0;
5745  int nsumdigiHE6 = 0;
5746  for (int jphi = 0; jphi < njphi; jphi++) {
5747  digivariancehe[0][jeta][jphi] = digiVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
5748  digivariancehe[1][jeta][jphi] = digiVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
5749  digivariancehe[2][jeta][jphi] = digiVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
5750  digivariancehe[3][jeta][jphi] = digiVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
5751  digivariancehe[4][jeta][jphi] = digiVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
5752  digivariancehe[5][jeta][jphi] = digiVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
5753  digivariancehe[6][jeta][jphi] = digiVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
5754  if (digivariancehe[0][jeta][jphi] > 0.) {
5755  sumdigiHE0 += digivariancehe[0][jeta][jphi];
5756  ++nsumdigiHE0;
5757  }
5758  if (digivariancehe[1][jeta][jphi] > 0.) {
5759  sumdigiHE1 += digivariancehe[1][jeta][jphi];
5760  ++nsumdigiHE1;
5761  }
5762  if (digivariancehe[2][jeta][jphi] > 0.) {
5763  sumdigiHE2 += digivariancehe[2][jeta][jphi];
5764  ++nsumdigiHE2;
5765  }
5766  if (digivariancehe[3][jeta][jphi] > 0.) {
5767  sumdigiHE3 += digivariancehe[3][jeta][jphi];
5768  ++nsumdigiHE3;
5769  }
5770  if (digivariancehe[4][jeta][jphi] > 0.) {
5771  sumdigiHE4 += digivariancehe[4][jeta][jphi];
5772  ++nsumdigiHE4;
5773  }
5774  if (digivariancehe[5][jeta][jphi] > 0.) {
5775  sumdigiHE5 += digivariancehe[5][jeta][jphi];
5776  ++nsumdigiHE5;
5777  }
5778  if (digivariancehe[6][jeta][jphi] > 0.) {
5779  sumdigiHE6 += digivariancehe[6][jeta][jphi];
5780  ++nsumdigiHE6;
5781  }
5782  } // phi
5783  // PHI normalization :
5784  for (int jphi = 0; jphi < njphi; jphi++) {
5785  if (digivariancehe[0][jeta][jphi] > 0.)
5786  digivariancehe[0][jeta][jphi] /= (sumdigiHE0 / nsumdigiHE0);
5787  if (digivariancehe[1][jeta][jphi] > 0.)
5788  digivariancehe[1][jeta][jphi] /= (sumdigiHE1 / nsumdigiHE1);
5789  if (digivariancehe[2][jeta][jphi] > 0.)
5790  digivariancehe[2][jeta][jphi] /= (sumdigiHE2 / nsumdigiHE2);
5791  if (digivariancehe[3][jeta][jphi] > 0.)
5792  digivariancehe[3][jeta][jphi] /= (sumdigiHE3 / nsumdigiHE3);
5793  if (digivariancehe[4][jeta][jphi] > 0.)
5794  digivariancehe[4][jeta][jphi] /= (sumdigiHE4 / nsumdigiHE4);
5795  if (digivariancehe[5][jeta][jphi] > 0.)
5796  digivariancehe[5][jeta][jphi] /= (sumdigiHE5 / nsumdigiHE5);
5797  if (digivariancehe[6][jeta][jphi] > 0.)
5798  digivariancehe[6][jeta][jphi] /= (sumdigiHE6 / nsumdigiHE6);
5799  } // phi
5800  // digivariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
5801  for (int jphi = 0; jphi < njphi; jphi++) {
5802  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
5803  digivariancehe[0][jeta][jphi] -= adigihe[0][jeta][jphi] * adigihe[0][jeta][jphi];
5804  digivariancehe[0][jeta][jphi] = fabs(digivariancehe[0][jeta][jphi]);
5805  digivariancehe[1][jeta][jphi] -= adigihe[1][jeta][jphi] * adigihe[1][jeta][jphi];
5806  digivariancehe[1][jeta][jphi] = fabs(digivariancehe[1][jeta][jphi]);
5807  digivariancehe[2][jeta][jphi] -= adigihe[2][jeta][jphi] * adigihe[2][jeta][jphi];
5808  digivariancehe[2][jeta][jphi] = fabs(digivariancehe[2][jeta][jphi]);
5809  digivariancehe[3][jeta][jphi] -= adigihe[3][jeta][jphi] * adigihe[3][jeta][jphi];
5810  digivariancehe[3][jeta][jphi] = fabs(digivariancehe[3][jeta][jphi]);
5811  digivariancehe[4][jeta][jphi] -= adigihe[4][jeta][jphi] * adigihe[4][jeta][jphi];
5812  digivariancehe[4][jeta][jphi] = fabs(digivariancehe[4][jeta][jphi]);
5813  digivariancehe[5][jeta][jphi] -= adigihe[5][jeta][jphi] * adigihe[5][jeta][jphi];
5814  digivariancehe[5][jeta][jphi] = fabs(digivariancehe[5][jeta][jphi]);
5815  digivariancehe[6][jeta][jphi] -= adigihe[6][jeta][jphi] * adigihe[6][jeta][jphi];
5816  digivariancehe[6][jeta][jphi] = fabs(digivariancehe[6][jeta][jphi]);
5817  }
5818  }
5819  //cout<<" Vaiance: DONE*****" <<endl;
5820  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
5821  //======================================================================
5822  //======================================================================
5823  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
5824  c1x1->Clear();
5826  c1x0->Divide(1, 1);
5827  c1x0->cd(1);
5828  TH2F *DefzDdigiHE42D = new TH2F("DefzDdigiHE42D", "", neta, -41., 41., nphi, 0., 72.);
5829  TH2F *DefzDdigiHE42D0 = new TH2F("DefzDdigiHE42D0", "", neta, -41., 41., nphi, 0., 72.);
5830  TH2F *DefzDdigiHE42DF = (TH2F *)DefzDdigiHE42D0->Clone("DefzDdigiHE42DF");
5831  for (int i = 0; i < ndepth; i++) {
5832  for (int jeta = 0; jeta < neta; jeta++) {
5833  for (int jphi = 0; jphi < nphi; jphi++) {
5834  double ccc1 = digivariancehe[i][jeta][jphi];
5835  int k2plot = jeta - 41;
5836  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
5837  if (adigihe[i][jeta][jphi] > 0.) {
5838  DefzDdigiHE42D->Fill(kkk, jphi, ccc1);
5839  DefzDdigiHE42D0->Fill(kkk, jphi, 1.);
5840  }
5841  }
5842  }
5843  }
5844  DefzDdigiHE42DF->Divide(DefzDdigiHE42D, DefzDdigiHE42D0, 1, 1, "B"); // average A
5845  // DefzDdigiHE1->Sumw2();
5846  gPad->SetGridy();
5847  gPad->SetGridx(); // gPad->SetLogz();
5848  DefzDdigiHE42DF->SetMarkerStyle(20);
5849  DefzDdigiHE42DF->SetMarkerSize(0.4);
5850  DefzDdigiHE42DF->GetZaxis()->SetLabelSize(0.08);
5851  DefzDdigiHE42DF->SetXTitle("<D>_depth #eta \b");
5852  DefzDdigiHE42DF->SetYTitle(" #phi \b");
5853  DefzDdigiHE42DF->SetZTitle("<D>_depth \b");
5854  DefzDdigiHE42DF->SetMarkerColor(2);
5855  DefzDdigiHE42DF->SetLineColor(
5856  0); // DefzDdigiHE42DF->SetMaximum(1.000); // DefzDdigiHE42DF->SetMinimum(1.0);
5857  DefzDdigiHE42DF->Draw("COLZ");
5859  c1x0->Update();
5860  c1x0->Print("DdigiGeneralD2PhiSymmetryHE.png");
5861  c1x0->Clear();
5862  // clean-up
5863  if (DefzDdigiHE42D)
5864  delete DefzDdigiHE42D;
5865  if (DefzDdigiHE42D0)
5866  delete DefzDdigiHE42D0;
5867  if (DefzDdigiHE42DF)
5868  delete DefzDdigiHE42DF;
5869  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
5870  //======================================================================
5871  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
5872  c1x1->Clear();
5874  c1x1->Divide(1, 1);
5875  c1x1->cd(1);
5876  TH1F *DefzDdigiHE41D = new TH1F("DefzDdigiHE41D", "", nphi, 0., 72.);
5877  TH1F *DefzDdigiHE41D0 = new TH1F("DefzDdigiHE41D0", "", nphi, 0., 72.);
5878  TH1F *DefzDdigiHE41DF = (TH1F *)DefzDdigiHE41D0->Clone("DefzDdigiHE41DF");
5879 
5880  for (int jphi = 0; jphi < nphi; jphi++) {
5881  for (int jeta = 0; jeta < neta; jeta++) {
5882  for (int i = 0; i < ndepth; i++) {
5883  double ccc1 = digivariancehe[i][jeta][jphi];
5884  if (adigihe[i][jeta][jphi] > 0.) {
5885  DefzDdigiHE41D->Fill(jphi, ccc1);
5886  DefzDdigiHE41D0->Fill(jphi, 1.);
5887  }
5888  }
5889  }
5890  }
5891  // DefzDdigiHE41D->Sumw2();DefzDdigiHE41D0->Sumw2();
5892 
5893  DefzDdigiHE41DF->Divide(DefzDdigiHE41D, DefzDdigiHE41D0, 1, 1, "B"); // R averaged over depthes & eta
5894  DefzDdigiHE41D0->Sumw2();
5895  // for (int jphi=1;jphi<73;jphi++) {DefzDdigiHE41DF->SetBinError(jphi,0.01);}
5896  gPad->SetGridy();
5897  gPad->SetGridx(); // gPad->SetLogz();
5898  DefzDdigiHE41DF->SetMarkerStyle(20);
5899  DefzDdigiHE41DF->SetMarkerSize(1.4);
5900  DefzDdigiHE41DF->GetZaxis()->SetLabelSize(0.08);
5901  DefzDdigiHE41DF->SetXTitle("#phi \b");
5902  DefzDdigiHE41DF->SetYTitle(" <D> \b");
5903  DefzDdigiHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
5904  DefzDdigiHE41DF->SetMarkerColor(4);
5905  DefzDdigiHE41DF->SetLineColor(4); // DefzDdigiHE41DF->SetMinimum(0.8); DefzDdigiHE41DF->SetMinimum(-0.015);
5906  DefzDdigiHE41DF->Draw("Error");
5908  c1x1->Update();
5909  c1x1->Print("DdigiGeneralD1PhiSymmetryHE.png");
5910  c1x1->Clear();
5911  // clean-up
5912  if (DefzDdigiHE41D)
5913  delete DefzDdigiHE41D;
5914  if (DefzDdigiHE41D0)
5915  delete DefzDdigiHE41D0;
5916  if (DefzDdigiHE41DF)
5917  delete DefzDdigiHE41DF;
5918  //========================================================================================== 14
5919  //======================================================================
5920  //======================================================================1D plot: D vs phi , different eta, depth=1
5921  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
5922  c3x5->Clear();
5924  c3x5->Divide(3, 5);
5925  c3x5->cd(1);
5926  int kcountHEpositivedirectionDigiD1 = 1;
5927  TH1F *h2CeffHEpositivedirectionDigiD1 = new TH1F("h2CeffHEpositivedirectionDigiD1", "", nphi, 0., 72.);
5928 
5929  for (int jeta = 0; jeta < njeta; jeta++) {
5930  // positivedirectionDigiD:
5931  if (jeta - 41 >= 0) {
5932  // for (int i=0;i<ndepth;i++) {
5933  // depth=1
5934  for (int i = 0; i < 1; i++) {
5935  TH1F *HEpositivedirectionDigiD1 = (TH1F *)h2CeffHEpositivedirectionDigiD1->Clone("twod1");
5936 
5937  float ccctest = 0; // to avoid empty massive elements
5938  for (int jphi = 0; jphi < nphi; jphi++) {
5939  double ccc1 = digivariancehe[i][jeta][jphi];
5940  if (adigihe[i][jeta][jphi] > 0.) {
5941  HEpositivedirectionDigiD1->Fill(jphi, ccc1);
5942  ccctest = 1.; //HEpositivedirectionDigiD1->SetBinError(i,0.01);
5943  }
5944  } // for jphi
5945  if (ccctest > 0.) {
5946  //cout<<"1414 kcountHEpositivedirectionDigiD1 = "<<kcountHEpositivedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
5947  c3x5->cd(kcountHEpositivedirectionDigiD1);
5948  HEpositivedirectionDigiD1->SetMarkerStyle(20);
5949  HEpositivedirectionDigiD1->SetMarkerSize(0.4);
5950  HEpositivedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
5951  HEpositivedirectionDigiD1->SetXTitle("HEpositivedirectionDigiD1 \b");
5952  HEpositivedirectionDigiD1->SetMarkerColor(2);
5953  HEpositivedirectionDigiD1->SetLineColor(0);
5954  gPad->SetGridy();
5955  gPad->SetGridx();
5956  // gPad->SetLogy();
5957  if (kcountHEpositivedirectionDigiD1 == 1)
5958  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
5959  if (kcountHEpositivedirectionDigiD1 == 2)
5960  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
5961  if (kcountHEpositivedirectionDigiD1 == 3)
5962  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
5963  if (kcountHEpositivedirectionDigiD1 == 4)
5964  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
5965  if (kcountHEpositivedirectionDigiD1 == 5)
5966  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
5967  if (kcountHEpositivedirectionDigiD1 == 6)
5968  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
5969  if (kcountHEpositivedirectionDigiD1 == 7)
5970  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
5971  if (kcountHEpositivedirectionDigiD1 == 8)
5972  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
5973  if (kcountHEpositivedirectionDigiD1 == 9)
5974  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
5975  if (kcountHEpositivedirectionDigiD1 == 10)
5976  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
5977  if (kcountHEpositivedirectionDigiD1 == 11)
5978  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
5979  if (kcountHEpositivedirectionDigiD1 == 12)
5980  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
5981  HEpositivedirectionDigiD1->Draw("Error");
5982  kcountHEpositivedirectionDigiD1++;
5983  if (kcountHEpositivedirectionDigiD1 > 12)
5984  break; // 4x6 = 24
5985  } //ccctest>0
5986 
5987  } // for i
5988  } //if(jeta-41 >= 0)
5989  } //for jeta
5991  c3x5->Update();
5992  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
5993  c3x5->Clear();
5994  // clean-up
5995  if (h2CeffHEpositivedirectionDigiD1)
5996  delete h2CeffHEpositivedirectionDigiD1;
5997  //========================================================================================== 15
5998  //======================================================================
5999  //======================================================================1D plot: D vs phi , different eta, depth=2
6000  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
6001  c3x5->Clear();
6002  c3x5->Divide(3, 5);
6003  c3x5->cd(1);
6004  int kcountHEpositivedirectionDigiD2 = 1;
6005  TH1F *h2CeffHEpositivedirectionDigiD2 = new TH1F("h2CeffHEpositivedirectionDigiD2", "", nphi, 0., 72.);
6006 
6007  for (int jeta = 0; jeta < njeta; jeta++) {
6008  // positivedirectionDigiD:
6009  if (jeta - 41 >= 0) {
6010  // for (int i=0;i<ndepth;i++) {
6011  // depth=2
6012  for (int i = 1; i < 2; i++) {
6013  TH1F *HEpositivedirectionDigiD2 = (TH1F *)h2CeffHEpositivedirectionDigiD2->Clone("twod1");
6014 
6015  float ccctest = 0; // to avoid empty massive elements
6016  for (int jphi = 0; jphi < nphi; jphi++) {
6017  double ccc1 = digivariancehe[i][jeta][jphi];
6018  if (adigihe[i][jeta][jphi] > 0.) {
6019  HEpositivedirectionDigiD2->Fill(jphi, ccc1);
6020  ccctest = 1.; //HEpositivedirectionDigiD2->SetBinError(i,0.01);
6021  }
6022  } // for jphi
6023  if (ccctest > 0.) {
6024  //cout<<"1515 kcountHEpositivedirectionDigiD2 = "<<kcountHEpositivedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
6025  c3x5->cd(kcountHEpositivedirectionDigiD2);
6026  HEpositivedirectionDigiD2->SetMarkerStyle(20);
6027  HEpositivedirectionDigiD2->SetMarkerSize(0.4);
6028  HEpositivedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
6029  HEpositivedirectionDigiD2->SetXTitle("HEpositivedirectionDigiD2 \b");
6030  HEpositivedirectionDigiD2->SetMarkerColor(2);
6031  HEpositivedirectionDigiD2->SetLineColor(0);
6032  gPad->SetGridy();
6033  gPad->SetGridx();
6034  // gPad->SetLogy();
6035  if (kcountHEpositivedirectionDigiD2 == 1)
6036  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
6037  if (kcountHEpositivedirectionDigiD2 == 2)
6038  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
6039  if (kcountHEpositivedirectionDigiD2 == 3)
6040  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
6041  if (kcountHEpositivedirectionDigiD2 == 4)
6042  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
6043  if (kcountHEpositivedirectionDigiD2 == 5)
6044  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
6045  if (kcountHEpositivedirectionDigiD2 == 6)
6046  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
6047  if (kcountHEpositivedirectionDigiD2 == 7)
6048  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
6049  if (kcountHEpositivedirectionDigiD2 == 8)
6050  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
6051  if (kcountHEpositivedirectionDigiD2 == 9)
6052  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
6053  if (kcountHEpositivedirectionDigiD2 == 10)
6054  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
6055  if (kcountHEpositivedirectionDigiD2 == 11)
6056  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
6057  if (kcountHEpositivedirectionDigiD2 == 12)
6058  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
6059  if (kcountHEpositivedirectionDigiD2 == 13)
6060  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
6061  HEpositivedirectionDigiD2->Draw("Error");
6062  kcountHEpositivedirectionDigiD2++;
6063  if (kcountHEpositivedirectionDigiD2 > 13)
6064  break; // 4x6 = 24
6065  } //ccctest>0
6066 
6067  } // for i
6068  } //if(jeta-41 >= 0)
6069  } //for jeta
6071  c3x5->Update();
6072  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
6073  c3x5->Clear();
6074  // clean-up
6075  if (h2CeffHEpositivedirectionDigiD2)
6076  delete h2CeffHEpositivedirectionDigiD2;
6077  //========================================================================================== 16
6078  //======================================================================
6079  //======================================================================1D plot: D vs phi , different eta, depth=3
6080  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
6081  c3x5->Clear();
6082  c3x5->Divide(3, 5);
6083  c3x5->cd(1);
6084  int kcountHEpositivedirectionDigiD3 = 1;
6085  TH1F *h2CeffHEpositivedirectionDigiD3 = new TH1F("h2CeffHEpositivedirectionDigiD3", "", nphi, 0., 72.);
6086 
6087  for (int jeta = 0; jeta < njeta; jeta++) {
6088  // positivedirectionDigiD:
6089  if (jeta - 41 >= 0) {
6090  // for (int i=0;i<ndepth;i++) {
6091  // depth=3
6092  for (int i = 2; i < 3; i++) {
6093  TH1F *HEpositivedirectionDigiD3 = (TH1F *)h2CeffHEpositivedirectionDigiD3->Clone("twod1");
6094 
6095  float ccctest = 0; // to avoid empty massive elements
6096  for (int jphi = 0; jphi < nphi; jphi++) {
6097  double ccc1 = digivariancehe[i][jeta][jphi];
6098  if (adigihe[i][jeta][jphi] > 0.) {
6099  HEpositivedirectionDigiD3->Fill(jphi, ccc1);
6100  ccctest = 1.; //HEpositivedirectionDigiD3->SetBinError(i,0.01);
6101  }
6102  } // for jphi
6103  if (ccctest > 0.) {
6104  //cout<<"1616 kcountHEpositivedirectionDigiD3 = "<<kcountHEpositivedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
6105  c3x5->cd(kcountHEpositivedirectionDigiD3);
6106  HEpositivedirectionDigiD3->SetMarkerStyle(20);
6107  HEpositivedirectionDigiD3->SetMarkerSize(0.4);
6108  HEpositivedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
6109  HEpositivedirectionDigiD3->SetXTitle("HEpositivedirectionDigiD3 \b");
6110  HEpositivedirectionDigiD3->SetMarkerColor(2);
6111  HEpositivedirectionDigiD3->SetLineColor(0);
6112  gPad->SetGridy();
6113  gPad->SetGridx();
6114  // gPad->SetLogy();
6115  if (kcountHEpositivedirectionDigiD3 == 1)
6116  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
6117  if (kcountHEpositivedirectionDigiD3 == 2)
6118  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
6119  if (kcountHEpositivedirectionDigiD3 == 3)
6120  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
6121  if (kcountHEpositivedirectionDigiD3 == 4)
6122  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
6123  if (kcountHEpositivedirectionDigiD3 == 5)
6124  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
6125  if (kcountHEpositivedirectionDigiD3 == 6)
6126  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
6127  if (kcountHEpositivedirectionDigiD3 == 7)
6128  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
6129  if (kcountHEpositivedirectionDigiD3 == 8)
6130  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
6131  if (kcountHEpositivedirectionDigiD3 == 9)
6132  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
6133  if (kcountHEpositivedirectionDigiD3 == 10)
6134  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
6135  if (kcountHEpositivedirectionDigiD3 == 11)
6136  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
6137  if (kcountHEpositivedirectionDigiD3 == 12)
6138  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
6139  if (kcountHEpositivedirectionDigiD3 == 13)
6140  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
6141  HEpositivedirectionDigiD3->Draw("Error");
6142  kcountHEpositivedirectionDigiD3++;
6143  if (kcountHEpositivedirectionDigiD3 > 13)
6144  break; // 4x6 = 24
6145  } //ccctest>0
6146 
6147  } // for i
6148  } //if(jeta-41 >= 0)
6149  } //for jeta
6151  c3x5->Update();
6152  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
6153  c3x5->Clear();
6154  // clean-up
6155  if (h2CeffHEpositivedirectionDigiD3)
6156  delete h2CeffHEpositivedirectionDigiD3;
6157  //========================================================================================== 17
6158  //======================================================================
6159  //======================================================================1D plot: D vs phi , different eta, depth=4
6160  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
6161  c3x5->Clear();
6162  c3x5->Divide(3, 5);
6163  c3x5->cd(1);
6164  int kcountHEpositivedirectionDigiD4 = 1;
6165  TH1F *h2CeffHEpositivedirectionDigiD4 = new TH1F("h2CeffHEpositivedirectionDigiD4", "", nphi, 0., 72.);
6166 
6167  for (int jeta = 0; jeta < njeta; jeta++) {
6168  // positivedirectionDigiD:
6169  if (jeta - 41 >= 0) {
6170  // for (int i=0;i<ndepth;i++) {
6171  // depth=4
6172  for (int i = 3; i < 4; i++) {
6173  TH1F *HEpositivedirectionDigiD4 = (TH1F *)h2CeffHEpositivedirectionDigiD4->Clone("twod1");
6174 
6175  float ccctest = 0; // to avoid empty massive elements
6176  for (int jphi = 0; jphi < nphi; jphi++) {
6177  double ccc1 = digivariancehe[i][jeta][jphi];
6178  if (adigihe[i][jeta][jphi] > 0.) {
6179  HEpositivedirectionDigiD4->Fill(jphi, ccc1);
6180  ccctest = 1.; //HEpositivedirectionDigiD4->SetBinError(i,0.01);
6181  }
6182  } // for jphi
6183  if (ccctest > 0.) {
6184  //cout<<"1717 kcountHEpositivedirectionDigiD4 = "<<kcountHEpositivedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
6185  c3x5->cd(kcountHEpositivedirectionDigiD4);
6186  HEpositivedirectionDigiD4->SetMarkerStyle(20);
6187  HEpositivedirectionDigiD4->SetMarkerSize(0.4);
6188  HEpositivedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
6189  HEpositivedirectionDigiD4->SetXTitle("HEpositivedirectionDigiD4 \b");
6190  HEpositivedirectionDigiD4->SetMarkerColor(2);
6191  HEpositivedirectionDigiD4->SetLineColor(0);
6192  gPad->SetGridy();
6193  gPad->SetGridx();
6194  // gPad->SetLogy();
6195  if (kcountHEpositivedirectionDigiD4 == 1)
6196  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
6197  if (kcountHEpositivedirectionDigiD4 == 2)
6198  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
6199  if (kcountHEpositivedirectionDigiD4 == 3)
6200  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
6201  if (kcountHEpositivedirectionDigiD4 == 4)
6202  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
6203  if (kcountHEpositivedirectionDigiD4 == 5)
6204  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
6205  if (kcountHEpositivedirectionDigiD4 == 6)
6206  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
6207  if (kcountHEpositivedirectionDigiD4 == 7)
6208  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
6209  if (kcountHEpositivedirectionDigiD4 == 8)
6210  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
6211  if (kcountHEpositivedirectionDigiD4 == 9)
6212  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
6213  if (kcountHEpositivedirectionDigiD4 == 10)
6214  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
6215  if (kcountHEpositivedirectionDigiD4 == 11)
6216  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
6217  if (kcountHEpositivedirectionDigiD4 == 12)
6218  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
6219  HEpositivedirectionDigiD4->Draw("Error");
6220  kcountHEpositivedirectionDigiD4++;
6221  if (kcountHEpositivedirectionDigiD4 > 12)
6222  break; // 4x6 = 24
6223  } //ccctest>0
6224 
6225  } // for i
6226  } //if(jeta-41 >= 0)
6227  } //for jeta
6229  c3x5->Update();
6230  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
6231  c3x5->Clear();
6232  // clean-up
6233  if (h2CeffHEpositivedirectionDigiD4)
6234  delete h2CeffHEpositivedirectionDigiD4;
6235  //========================================================================================== 18
6236  //======================================================================
6237  //======================================================================1D plot: D vs phi , different eta, depth=5
6238  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
6239  c3x5->Clear();
6240  c3x5->Divide(3, 5);
6241  c3x5->cd(1);
6242  int kcountHEpositivedirectionDigiD5 = 1;
6243  TH1F *h2CeffHEpositivedirectionDigiD5 = new TH1F("h2CeffHEpositivedirectionDigiD5", "", nphi, 0., 72.);
6244 
6245  for (int jeta = 0; jeta < njeta; jeta++) {
6246  // positivedirectionDigiD:
6247  if (jeta - 41 >= 0) {
6248  // for (int i=0;i<ndepth;i++) {
6249  // depth=5
6250  for (int i = 4; i < 5; i++) {
6251  TH1F *HEpositivedirectionDigiD5 = (TH1F *)h2CeffHEpositivedirectionDigiD5->Clone("twod1");
6252 
6253  float ccctest = 0; // to avoid empty massive elements
6254  for (int jphi = 0; jphi < nphi; jphi++) {
6255  double ccc1 = digivariancehe[i][jeta][jphi];
6256  if (adigihe[i][jeta][jphi] > 0.) {
6257  HEpositivedirectionDigiD5->Fill(jphi, ccc1);
6258  ccctest = 1.; //HEpositivedirectionDigiD5->SetBinError(i,0.01);
6259  }
6260  } // for jphi
6261  if (ccctest > 0.) {
6262  //cout<<"1818 kcountHEpositivedirectionDigiD5 = "<<kcountHEpositivedirectionDigiD5 <<" jeta-41= "<< jeta-41 <<endl;
6263  c3x5->cd(kcountHEpositivedirectionDigiD5);
6264  HEpositivedirectionDigiD5->SetMarkerStyle(20);
6265  HEpositivedirectionDigiD5->SetMarkerSize(0.4);
6266  HEpositivedirectionDigiD5->GetYaxis()->SetLabelSize(0.04);
6267  HEpositivedirectionDigiD5->SetXTitle("HEpositivedirectionDigiD5 \b");
6268  HEpositivedirectionDigiD5->SetMarkerColor(2);
6269  HEpositivedirectionDigiD5->SetLineColor(0);
6270  gPad->SetGridy();
6271  gPad->SetGridx();
6272  // gPad->SetLogy();
6273  if (kcountHEpositivedirectionDigiD5 == 1)
6274  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
6275  if (kcountHEpositivedirectionDigiD5 == 2)
6276  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
6277  if (kcountHEpositivedirectionDigiD5 == 3)
6278  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
6279  if (kcountHEpositivedirectionDigiD5 == 4)
6280  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
6281  if (kcountHEpositivedirectionDigiD5 == 5)
6282  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
6283  if (kcountHEpositivedirectionDigiD5 == 6)
6284  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
6285  if (kcountHEpositivedirectionDigiD5 == 7)
6286  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
6287  if (kcountHEpositivedirectionDigiD5 == 8)
6288  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
6289  if (kcountHEpositivedirectionDigiD5 == 9)
6290  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
6291  if (kcountHEpositivedirectionDigiD5 == 10)
6292  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
6293  if (kcountHEpositivedirectionDigiD5 == 11)
6294  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
6295  HEpositivedirectionDigiD5->Draw("Error");
6296  kcountHEpositivedirectionDigiD5++;
6297  if (kcountHEpositivedirectionDigiD5 > 11)
6298  break; // 4x6 = 24
6299  } //ccctest>0
6300 
6301  } // for i
6302  } //if(jeta-41 >= 0)
6303  } //for jeta
6305  c3x5->Update();
6306  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
6307  c3x5->Clear();
6308  // clean-up
6309  if (h2CeffHEpositivedirectionDigiD5)
6310  delete h2CeffHEpositivedirectionDigiD5;
6311  //========================================================================================== 19
6312  //======================================================================
6313  //======================================================================1D plot: D vs phi , different eta, depth=6
6314  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
6315  c3x5->Clear();
6316  c3x5->Divide(3, 5);
6317  c3x5->cd(1);
6318  int kcountHEpositivedirectionDigiD6 = 1;
6319  TH1F *h2CeffHEpositivedirectionDigiD6 = new TH1F("h2CeffHEpositivedirectionDigiD6", "", nphi, 0., 72.);
6320 
6321  for (int jeta = 0; jeta < njeta; jeta++) {
6322  // positivedirectionDigiD:
6323  if (jeta - 41 >= 0) {
6324  // for (int i=0;i<ndepth;i++) {
6325  // depth=6
6326  for (int i = 5; i < 6; i++) {
6327  TH1F *HEpositivedirectionDigiD6 = (TH1F *)h2CeffHEpositivedirectionDigiD6->Clone("twod1");
6328 
6329  float ccctest = 0; // to avoid empty massive elements
6330  for (int jphi = 0; jphi < nphi; jphi++) {
6331  double ccc1 = digivariancehe[i][jeta][jphi];
6332  if (adigihe[i][jeta][jphi] > 0.) {
6333  HEpositivedirectionDigiD6->Fill(jphi, ccc1);
6334  ccctest = 1.; //HEpositivedirectionDigiD6->SetBinError(i,0.01);
6335  }
6336  } // for jphi
6337  if (ccctest > 0.) {
6338  //cout<<"1919 kcountHEpositivedirectionDigiD6 = "<<kcountHEpositivedirectionDigiD6 <<" jeta-41= "<< jeta-41 <<endl;
6339  c3x5->cd(kcountHEpositivedirectionDigiD6);
6340  HEpositivedirectionDigiD6->SetMarkerStyle(20);
6341  HEpositivedirectionDigiD6->SetMarkerSize(0.4);
6342  HEpositivedirectionDigiD6->GetYaxis()->SetLabelSize(0.04);
6343  HEpositivedirectionDigiD6->SetXTitle("HEpositivedirectionDigiD6 \b");
6344  HEpositivedirectionDigiD6->SetMarkerColor(2);
6345  HEpositivedirectionDigiD6->SetLineColor(0);
6346  gPad->SetGridy();
6347  gPad->SetGridx();
6348  // gPad->SetLogy();
6349  if (kcountHEpositivedirectionDigiD6 == 1)
6350  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
6351  if (kcountHEpositivedirectionDigiD6 == 2)
6352  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
6353  if (kcountHEpositivedirectionDigiD6 == 3)
6354  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
6355  if (kcountHEpositivedirectionDigiD6 == 4)
6356  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
6357  if (kcountHEpositivedirectionDigiD6 == 5)
6358  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
6359  if (kcountHEpositivedirectionDigiD6 == 6)
6360  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
6361  if (kcountHEpositivedirectionDigiD6 == 7)
6362  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
6363  if (kcountHEpositivedirectionDigiD6 == 8)
6364  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
6365  if (kcountHEpositivedirectionDigiD6 == 9)
6366  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
6367  if (kcountHEpositivedirectionDigiD6 == 10)
6368  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
6369  HEpositivedirectionDigiD6->Draw("Error");
6370  kcountHEpositivedirectionDigiD6++;
6371  if (kcountHEpositivedirectionDigiD6 > 10)
6372  break; // 4x6 = 24
6373  } //ccctest>0
6374 
6375  } // for i
6376  } //if(jeta-41 >= 0)
6377  } //for jeta
6379  c3x5->Update();
6380  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
6381  c3x5->Clear();
6382  // clean-up
6383  if (h2CeffHEpositivedirectionDigiD6)
6384  delete h2CeffHEpositivedirectionDigiD6;
6385  //========================================================================================== 20
6386  //======================================================================
6387  //======================================================================1D plot: D vs phi , different eta, depth=7
6388  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
6389  c3x5->Clear();
6390  c3x5->Divide(3, 5);
6391  c3x5->cd(1);
6392  int kcountHEpositivedirectionDigiD7 = 1;
6393  TH1F *h2CeffHEpositivedirectionDigiD7 = new TH1F("h2CeffHEpositivedirectionDigiD7", "", nphi, 0., 72.);
6394 
6395  for (int jeta = 0; jeta < njeta; jeta++) {
6396  // positivedirectionDigiD:
6397  if (jeta - 41 >= 0) {
6398  // for (int i=0;i<ndepth;i++) {
6399  // depth=7
6400  for (int i = 6; i < 7; i++) {
6401  TH1F *HEpositivedirectionDigiD7 = (TH1F *)h2CeffHEpositivedirectionDigiD7->Clone("twod1");
6402 
6403  float ccctest = 0; // to avoid empty massive elements
6404  for (int jphi = 0; jphi < nphi; jphi++) {
6405  double ccc1 = digivariancehe[i][jeta][jphi];
6406  if (adigihe[i][jeta][jphi] > 0.) {
6407  HEpositivedirectionDigiD7->Fill(jphi, ccc1);
6408  ccctest = 1.; //HEpositivedirectionDigiD7->SetBinError(i,0.01);
6409  }
6410  } // for jphi
6411  if (ccctest != 0.) {
6412  //cout<<"2020 kcountHEpositivedirectionDigiD7 = "<<kcountHEpositivedirectionDigiD7 <<" jeta-41= "<< jeta-41 <<endl;
6413  c3x5->cd(kcountHEpositivedirectionDigiD7);
6414  HEpositivedirectionDigiD7->SetMarkerStyle(20);
6415  HEpositivedirectionDigiD7->SetMarkerSize(0.4);
6416  HEpositivedirectionDigiD7->GetYaxis()->SetLabelSize(0.04);
6417  HEpositivedirectionDigiD7->SetXTitle("HEpositivedirectionDigiD7 \b");
6418  HEpositivedirectionDigiD7->SetMarkerColor(2);
6419  HEpositivedirectionDigiD7->SetLineColor(0);
6420  gPad->SetGridy();
6421  gPad->SetGridx();
6422  // gPad->SetLogy();
6423  if (kcountHEpositivedirectionDigiD7 == 1)
6424  HEpositivedirectionDigiD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
6425  if (kcountHEpositivedirectionDigiD7 == 2)
6426  HEpositivedirectionDigiD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
6427  if (kcountHEpositivedirectionDigiD7 == 3)
6428  HEpositivedirectionDigiD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
6429  HEpositivedirectionDigiD7->Draw("Error");
6430  kcountHEpositivedirectionDigiD7++;
6431  if (kcountHEpositivedirectionDigiD7 > 3)
6432  break; // 4x6 = 24
6433  } //ccctest>0
6434 
6435  } // for i
6436  } //if(jeta-41 >= 0)
6437  } //for jeta
6439  c3x5->Update();
6440  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
6441  c3x5->Clear();
6442  // clean-up
6443  if (h2CeffHEpositivedirectionDigiD7)
6444  delete h2CeffHEpositivedirectionDigiD7;
6445 
6446  //========================================================================================== 22222214
6447  //======================================================================
6448  //======================================================================1D plot: D vs phi , different eta, depth=1
6449  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
6450  c3x5->Clear();
6452  c3x5->Divide(3, 5);
6453  c3x5->cd(1);
6454  int kcountHEnegativedirectionDigiD1 = 1;
6455  TH1F *h2CeffHEnegativedirectionDigiD1 = new TH1F("h2CeffHEnegativedirectionDigiD1", "", nphi, 0., 72.);
6456 
6457  for (int jeta = 0; jeta < njeta; jeta++) {
6458  // negativedirectionDigiD:
6459  if (jeta - 41 < 0) {
6460  // for (int i=0;i<ndepth;i++) {
6461  // depth=1
6462  for (int i = 0; i < 1; i++) {
6463  TH1F *HEnegativedirectionDigiD1 = (TH1F *)h2CeffHEnegativedirectionDigiD1->Clone("twod1");
6464 
6465  float ccctest = 0; // to avoid empty massive elements
6466  for (int jphi = 0; jphi < nphi; jphi++) {
6467  double ccc1 = digivariancehe[i][jeta][jphi];
6468  if (adigihe[i][jeta][jphi] > 0.) {
6469  HEnegativedirectionDigiD1->Fill(jphi, ccc1);
6470  ccctest = 1.; //HEnegativedirectionDigiD1->SetBinError(i,0.01);
6471  }
6472  } // for jphi
6473  if (ccctest > 0.) {
6474  //cout<<"1414 kcountHEnegativedirectionDigiD1 = "<<kcountHEnegativedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
6475  c3x5->cd(kcountHEnegativedirectionDigiD1);
6476  HEnegativedirectionDigiD1->SetMarkerStyle(20);
6477  HEnegativedirectionDigiD1->SetMarkerSize(0.4);
6478  HEnegativedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
6479  HEnegativedirectionDigiD1->SetXTitle("HEnegativedirectionDigiD1 \b");
6480  HEnegativedirectionDigiD1->SetMarkerColor(2);
6481  HEnegativedirectionDigiD1->SetLineColor(0);
6482  gPad->SetGridy();
6483  gPad->SetGridx();
6484  // gPad->SetLogy();
6485  if (kcountHEnegativedirectionDigiD1 == 1)
6486  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
6487  if (kcountHEnegativedirectionDigiD1 == 2)
6488  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
6489  if (kcountHEnegativedirectionDigiD1 == 3)
6490  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
6491  if (kcountHEnegativedirectionDigiD1 == 4)
6492  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
6493  if (kcountHEnegativedirectionDigiD1 == 5)
6494  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
6495  if (kcountHEnegativedirectionDigiD1 == 6)
6496  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
6497  if (kcountHEnegativedirectionDigiD1 == 7)
6498  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
6499  if (kcountHEnegativedirectionDigiD1 == 8)
6500  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
6501  if (kcountHEnegativedirectionDigiD1 == 9)
6502  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
6503  if (kcountHEnegativedirectionDigiD1 == 10)
6504  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
6505  if (kcountHEnegativedirectionDigiD1 == 11)
6506  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
6507  if (kcountHEnegativedirectionDigiD1 == 12)
6508  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
6509  HEnegativedirectionDigiD1->Draw("Error");
6510  kcountHEnegativedirectionDigiD1++;
6511  if (kcountHEnegativedirectionDigiD1 > 12)
6512  break; // 4x6 = 24
6513  } //ccctest>0
6514 
6515  } // for i
6516  } //if(jeta-41 < 0)
6517  } //for jeta
6519  c3x5->Update();
6520  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
6521  c3x5->Clear();
6522  // clean-up
6523  if (h2CeffHEnegativedirectionDigiD1)
6524  delete h2CeffHEnegativedirectionDigiD1;
6525  //========================================================================================== 22222215
6526  //======================================================================
6527  //======================================================================1D plot: D vs phi , different eta, depth=2
6528  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
6529  c3x5->Clear();
6530  c3x5->Divide(3, 5);
6531  c3x5->cd(1);
6532  int kcountHEnegativedirectionDigiD2 = 1;
6533  TH1F *h2CeffHEnegativedirectionDigiD2 = new TH1F("h2CeffHEnegativedirectionDigiD2", "", nphi, 0., 72.);
6534 
6535  for (int jeta = 0; jeta < njeta; jeta++) {
6536  // negativedirectionDigiD:
6537  if (jeta - 41 < 0) {
6538  // for (int i=0;i<ndepth;i++) {
6539  // depth=2
6540  for (int i = 1; i < 2; i++) {
6541  TH1F *HEnegativedirectionDigiD2 = (TH1F *)h2CeffHEnegativedirectionDigiD2->Clone("twod1");
6542 
6543  float ccctest = 0; // to avoid empty massive elements
6544  for (int jphi = 0; jphi < nphi; jphi++) {
6545  double ccc1 = digivariancehe[i][jeta][jphi];
6546  if (adigihe[i][jeta][jphi] > 0.) {
6547  HEnegativedirectionDigiD2->Fill(jphi, ccc1);
6548  ccctest = 1.; //HEnegativedirectionDigiD2->SetBinError(i,0.01);
6549  }
6550  } // for jphi
6551  if (ccctest > 0.) {
6552  //cout<<"1515 kcountHEnegativedirectionDigiD2 = "<<kcountHEnegativedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
6553  c3x5->cd(kcountHEnegativedirectionDigiD2);
6554  HEnegativedirectionDigiD2->SetMarkerStyle(20);
6555  HEnegativedirectionDigiD2->SetMarkerSize(0.4);
6556  HEnegativedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
6557  HEnegativedirectionDigiD2->SetXTitle("HEnegativedirectionDigiD2 \b");
6558  HEnegativedirectionDigiD2->SetMarkerColor(2);
6559  HEnegativedirectionDigiD2->SetLineColor(0);
6560  gPad->SetGridy();
6561  gPad->SetGridx();
6562  // gPad->SetLogy();
6563  if (kcountHEnegativedirectionDigiD2 == 1)
6564  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
6565  if (kcountHEnegativedirectionDigiD2 == 2)
6566  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
6567  if (kcountHEnegativedirectionDigiD2 == 3)
6568  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
6569  if (kcountHEnegativedirectionDigiD2 == 4)
6570  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
6571  if (kcountHEnegativedirectionDigiD2 == 5)
6572  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
6573  if (kcountHEnegativedirectionDigiD2 == 6)
6574  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
6575  if (kcountHEnegativedirectionDigiD2 == 7)
6576  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
6577  if (kcountHEnegativedirectionDigiD2 == 8)
6578  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
6579  if (kcountHEnegativedirectionDigiD2 == 9)
6580  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
6581  if (kcountHEnegativedirectionDigiD2 == 10)
6582  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
6583  if (kcountHEnegativedirectionDigiD2 == 11)
6584  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
6585  if (kcountHEnegativedirectionDigiD2 == 12)
6586  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
6587  if (kcountHEnegativedirectionDigiD2 == 13)
6588  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
6589  HEnegativedirectionDigiD2->Draw("Error");
6590  kcountHEnegativedirectionDigiD2++;
6591  if (kcountHEnegativedirectionDigiD2 > 13)
6592  break; // 4x6 = 24
6593  } //ccctest>0
6594 
6595  } // for i
6596  } //if(jeta-41 < 0)
6597  } //for jeta
6599  c3x5->Update();
6600  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
6601  c3x5->Clear();
6602  // clean-up
6603  if (h2CeffHEnegativedirectionDigiD2)
6604  delete h2CeffHEnegativedirectionDigiD2;
6605  //========================================================================================== 22222216
6606  //======================================================================
6607  //======================================================================1D plot: D vs phi , different eta, depth=3
6608  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
6609  c3x5->Clear();
6610  c3x5->Divide(3, 5);
6611  c3x5->cd(1);
6612  int kcountHEnegativedirectionDigiD3 = 1;
6613  TH1F *h2CeffHEnegativedirectionDigiD3 = new TH1F("h2CeffHEnegativedirectionDigiD3", "", nphi, 0., 72.);
6614 
6615  for (int jeta = 0; jeta < njeta; jeta++) {
6616  // negativedirectionDigiD:
6617  if (jeta - 41 < 0) {
6618  // for (int i=0;i<ndepth;i++) {
6619  // depth=3
6620  for (int i = 2; i < 3; i++) {
6621  TH1F *HEnegativedirectionDigiD3 = (TH1F *)h2CeffHEnegativedirectionDigiD3->Clone("twod1");
6622 
6623  float ccctest = 0; // to avoid empty massive elements
6624  for (int jphi = 0; jphi < nphi; jphi++) {
6625  double ccc1 = digivariancehe[i][jeta][jphi];
6626  if (adigihe[i][jeta][jphi] > 0.) {
6627  HEnegativedirectionDigiD3->Fill(jphi, ccc1);
6628  ccctest = 1.; //HEnegativedirectionDigiD3->SetBinError(i,0.01);
6629  }
6630  } // for jphi
6631  if (ccctest > 0.) {
6632  //cout<<"1616 kcountHEnegativedirectionDigiD3 = "<<kcountHEnegativedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
6633  c3x5->cd(kcountHEnegativedirectionDigiD3);
6634  HEnegativedirectionDigiD3->SetMarkerStyle(20);
6635  HEnegativedirectionDigiD3->SetMarkerSize(0.4);
6636  HEnegativedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
6637  HEnegativedirectionDigiD3->SetXTitle("HEnegativedirectionDigiD3 \b");
6638  HEnegativedirectionDigiD3->SetMarkerColor(2);
6639  HEnegativedirectionDigiD3->SetLineColor(0);
6640  gPad->SetGridy();
6641  gPad->SetGridx();
6642  // gPad->SetLogy();
6643  if (kcountHEnegativedirectionDigiD3 == 1)
6644  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
6645  if (kcountHEnegativedirectionDigiD3 == 2)
6646  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
6647  if (kcountHEnegativedirectionDigiD3 == 3)
6648  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
6649  if (kcountHEnegativedirectionDigiD3 == 4)
6650  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
6651  if (kcountHEnegativedirectionDigiD3 == 5)
6652  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
6653  if (kcountHEnegativedirectionDigiD3 == 6)
6654  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
6655  if (kcountHEnegativedirectionDigiD3 == 7)
6656  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
6657  if (kcountHEnegativedirectionDigiD3 == 8)
6658  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
6659  if (kcountHEnegativedirectionDigiD3 == 9)
6660  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
6661  if (kcountHEnegativedirectionDigiD3 == 10)
6662  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
6663  if (kcountHEnegativedirectionDigiD3 == 11)
6664  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
6665  if (kcountHEnegativedirectionDigiD3 == 12)
6666  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
6667  if (kcountHEnegativedirectionDigiD3 == 13)
6668  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
6669  HEnegativedirectionDigiD3->Draw("Error");
6670  kcountHEnegativedirectionDigiD3++;
6671  if (kcountHEnegativedirectionDigiD3 > 13)
6672  break; // 4x6 = 24
6673  } //ccctest>0
6674 
6675  } // for i
6676  } //if(jeta-41 < 0)
6677  } //for jeta
6679  c3x5->Update();
6680  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
6681  c3x5->Clear();
6682  // clean-up
6683  if (h2CeffHEnegativedirectionDigiD3)
6684  delete h2CeffHEnegativedirectionDigiD3;
6685  //========================================================================================== 22222217
6686  //======================================================================
6687  //======================================================================1D plot: D vs phi , different eta, depth=4
6688  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
6689  c3x5->Clear();
6690  c3x5->Divide(3, 5);
6691  c3x5->cd(1);
6692  int kcountHEnegativedirectionDigiD4 = 1;
6693  TH1F *h2CeffHEnegativedirectionDigiD4 = new TH1F("h2CeffHEnegativedirectionDigiD4", "", nphi, 0., 72.);
6694 
6695  for (int jeta = 0; jeta < njeta; jeta++) {
6696  // negativedirectionDigiD:
6697  if (jeta - 41 < 0) {
6698  // for (int i=0;i<ndepth;i++) {
6699  // depth=4
6700  for (int i = 3; i < 4; i++) {
6701  TH1F *HEnegativedirectionDigiD4 = (TH1F *)h2CeffHEnegativedirectionDigiD4->Clone("twod1");
6702 
6703  float ccctest = 0; // to avoid empty massive elements
6704  for (int jphi = 0; jphi < nphi; jphi++) {
6705  double ccc1 = digivariancehe[i][jeta][jphi];
6706  if (adigihe[i][jeta][jphi] > 0.) {
6707  HEnegativedirectionDigiD4->Fill(jphi, ccc1);
6708  ccctest = 1.; //HEnegativedirectionDigiD4->SetBinError(i,0.01);
6709  }
6710  } // for jphi
6711  if (ccctest > 0.) {
6712  //cout<<"1717 kcountHEnegativedirectionDigiD4 = "<<kcountHEnegativedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
6713  c3x5->cd(kcountHEnegativedirectionDigiD4);
6714  HEnegativedirectionDigiD4->SetMarkerStyle(20);
6715  HEnegativedirectionDigiD4->SetMarkerSize(0.4);
6716  HEnegativedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
6717  HEnegativedirectionDigiD4->SetXTitle("HEnegativedirectionDigiD4 \b");
6718  HEnegativedirectionDigiD4->SetMarkerColor(2);
6719  HEnegativedirectionDigiD4->SetLineColor(0);
6720  gPad->SetGridy();
6721  gPad->SetGridx();
6722  // gPad->SetLogy();
6723  if (kcountHEnegativedirectionDigiD4 == 1)
6724  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
6725  if (kcountHEnegativedirectionDigiD4 == 2)
6726  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
6727  if (kcountHEnegativedirectionDigiD4 == 3)
6728  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
6729  if (kcountHEnegativedirectionDigiD4 == 4)
6730  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
6731  if (kcountHEnegativedirectionDigiD4 == 5)
6732  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
6733  if (kcountHEnegativedirectionDigiD4 == 6)
6734  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
6735  if (kcountHEnegativedirectionDigiD4 == 7)
6736  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
6737  if (kcountHEnegativedirectionDigiD4 == 8)
6738  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
6739  if (kcountHEnegativedirectionDigiD4 == 9)
6740  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
6741  if (kcountHEnegativedirectionDigiD4 == 10)
6742  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
6743  if (kcountHEnegativedirectionDigiD4 == 11)
6744  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
6745  if (kcountHEnegativedirectionDigiD4 == 12)
6746  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
6747  HEnegativedirectionDigiD4->Draw("Error");
6748  kcountHEnegativedirectionDigiD4++;
6749  if (kcountHEnegativedirectionDigiD4 > 12)
6750  break; // 4x6 = 24
6751  } //ccctest>0
6752 
6753  } // for i
6754  } //if(jeta-41 < 0)
6755  } //for jeta
6757  c3x5->Update();
6758  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
6759  c3x5->Clear();
6760  // clean-up
6761  if (h2CeffHEnegativedirectionDigiD4)
6762  delete h2CeffHEnegativedirectionDigiD4;
6763  //========================================================================================== 22222218
6764  //======================================================================
6765  //======================================================================1D plot: D vs phi , different eta, depth=5
6766  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
6767  c3x5->Clear();
6768  c3x5->Divide(3, 5);
6769  c3x5->cd(1);
6770  int kcountHEnegativedirectionDigiD5 = 1;
6771  TH1F *h2CeffHEnegativedirectionDigiD5 = new TH1F("h2CeffHEnegativedirectionDigiD5", "", nphi, 0., 72.);
6772 
6773  for (int jeta = 0; jeta < njeta; jeta++) {
6774  // negativedirectionDigiD:
6775  if (jeta - 41 < 0) {
6776  // for (int i=0;i<ndepth;i++) {
6777  // depth=5
6778  for (int i = 4; i < 5; i++) {
6779  TH1F *HEnegativedirectionDigiD5 = (TH1F *)h2CeffHEnegativedirectionDigiD5->Clone("twod1");
6780 
6781  float ccctest = 0; // to avoid empty massive elements
6782  for (int jphi = 0; jphi < nphi; jphi++) {
6783  double ccc1 = digivariancehe[i][jeta][jphi];
6784  if (adigihe[i][jeta][jphi] > 0.) {
6785  HEnegativedirectionDigiD5->Fill(jphi, ccc1);
6786  ccctest = 1.; //HEnegativedirectionDigiD5->SetBinError(i,0.01);
6787  }
6788  } // for jphi
6789  if (ccctest > 0.) {
6790  //cout<<"1818 kcountHEnegativedirectionDigiD5 = "<<kcountHEnegativedirectionDigiD5 <<" jeta-41= "<< jeta-41 <<endl;
6791  c3x5->cd(kcountHEnegativedirectionDigiD5);
6792  HEnegativedirectionDigiD5->SetMarkerStyle(20);
6793  HEnegativedirectionDigiD5->SetMarkerSize(0.4);
6794  HEnegativedirectionDigiD5->GetYaxis()->SetLabelSize(0.04);
6795  HEnegativedirectionDigiD5->SetXTitle("HEnegativedirectionDigiD5 \b");
6796  HEnegativedirectionDigiD5->SetMarkerColor(2);
6797  HEnegativedirectionDigiD5->SetLineColor(0);
6798  gPad->SetGridy();
6799  gPad->SetGridx();
6800  // gPad->SetLogy();
6801  if (kcountHEnegativedirectionDigiD5 == 1)
6802  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
6803  if (kcountHEnegativedirectionDigiD5 == 2)
6804  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
6805  if (kcountHEnegativedirectionDigiD5 == 3)
6806  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
6807  if (kcountHEnegativedirectionDigiD5 == 4)
6808  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
6809  if (kcountHEnegativedirectionDigiD5 == 5)
6810  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
6811  if (kcountHEnegativedirectionDigiD5 == 6)
6812  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
6813  if (kcountHEnegativedirectionDigiD5 == 7)
6814  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
6815  if (kcountHEnegativedirectionDigiD5 == 8)
6816  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
6817  if (kcountHEnegativedirectionDigiD5 == 9)
6818  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
6819  if (kcountHEnegativedirectionDigiD5 == 10)
6820  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
6821  if (kcountHEnegativedirectionDigiD5 == 11)
6822  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
6823  HEnegativedirectionDigiD5->Draw("Error");
6824  kcountHEnegativedirectionDigiD5++;
6825  if (kcountHEnegativedirectionDigiD5 > 11)
6826  break; // 4x6 = 24
6827  } //ccctest>0
6828 
6829  } // for i
6830  } //if(jeta-41 < 0)
6831  } //for jeta
6833  c3x5->Update();
6834  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
6835  c3x5->Clear();
6836  // clean-up
6837  if (h2CeffHEnegativedirectionDigiD5)
6838  delete h2CeffHEnegativedirectionDigiD5;
6839  //========================================================================================== 22222219
6840  //======================================================================
6841  //======================================================================1D plot: D vs phi , different eta, depth=6
6842  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
6843  c3x5->Clear();
6844  c3x5->Divide(3, 5);
6845  c3x5->cd(1);
6846  int kcountHEnegativedirectionDigiD6 = 1;
6847  TH1F *h2CeffHEnegativedirectionDigiD6 = new TH1F("h2CeffHEnegativedirectionDigiD6", "", nphi, 0., 72.);
6848 
6849  for (int jeta = 0; jeta < njeta; jeta++) {
6850  // negativedirectionDigiD:
6851  if (jeta - 41 < 0) {
6852  // for (int i=0;i<ndepth;i++) {
6853  // depth=6
6854  for (int i = 5; i < 6; i++) {
6855  TH1F *HEnegativedirectionDigiD6 = (TH1F *)h2CeffHEnegativedirectionDigiD6->Clone("twod1");
6856 
6857  float ccctest = 0; // to avoid empty massive elements
6858  for (int jphi = 0; jphi < nphi; jphi++) {
6859  double ccc1 = digivariancehe[i][jeta][jphi];
6860  if (adigihe[i][jeta][jphi] > 0.) {
6861  HEnegativedirectionDigiD6->Fill(jphi, ccc1);
6862  ccctest = 1.; //HEnegativedirectionDigiD6->SetBinError(i,0.01);
6863  }
6864  } // for jphi
6865  if (ccctest > 0.) {
6866  //cout<<"1919 kcountHEnegativedirectionDigiD6 = "<<kcountHEnegativedirectionDigiD6 <<" jeta-41= "<< jeta-41 <<endl;
6867  c3x5->cd(kcountHEnegativedirectionDigiD6);
6868  HEnegativedirectionDigiD6->SetMarkerStyle(20);
6869  HEnegativedirectionDigiD6->SetMarkerSize(0.4);
6870  HEnegativedirectionDigiD6->GetYaxis()->SetLabelSize(0.04);
6871  HEnegativedirectionDigiD6->SetXTitle("HEnegativedirectionDigiD6 \b");
6872  HEnegativedirectionDigiD6->SetMarkerColor(2);
6873  HEnegativedirectionDigiD6->SetLineColor(0);
6874  gPad->SetGridy();
6875  gPad->SetGridx();
6876  // gPad->SetLogy();
6877  if (kcountHEnegativedirectionDigiD6 == 1)
6878  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
6879  if (kcountHEnegativedirectionDigiD6 == 2)
6880  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
6881  if (kcountHEnegativedirectionDigiD6 == 3)
6882  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
6883  if (kcountHEnegativedirectionDigiD6 == 4)
6884  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
6885  if (kcountHEnegativedirectionDigiD6 == 5)
6886  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
6887  if (kcountHEnegativedirectionDigiD6 == 6)
6888  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
6889  if (kcountHEnegativedirectionDigiD6 == 7)
6890  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
6891  if (kcountHEnegativedirectionDigiD6 == 8)
6892  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
6893  if (kcountHEnegativedirectionDigiD6 == 9)
6894  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
6895  if (kcountHEnegativedirectionDigiD6 == 10)
6896  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
6897  HEnegativedirectionDigiD6->Draw("Error");
6898  kcountHEnegativedirectionDigiD6++;
6899  if (kcountHEnegativedirectionDigiD6 > 10)
6900  break; // 4x6 = 24
6901  } //ccctest>0
6902 
6903  } // for i
6904  } //if(jeta-41 < 0)
6905  } //for jeta
6907  c3x5->Update();
6908  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
6909  c3x5->Clear();
6910  // clean-up
6911  if (h2CeffHEnegativedirectionDigiD6)
6912  delete h2CeffHEnegativedirectionDigiD6;
6913  //========================================================================================== 22222220
6914  //======================================================================
6915  //======================================================================1D plot: D vs phi , different eta, depth=7
6916  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
6917  c3x5->Clear();
6918  c3x5->Divide(3, 5);
6919  c3x5->cd(1);
6920  int kcountHEnegativedirectionDigiD7 = 1;
6921  TH1F *h2CeffHEnegativedirectionDigiD7 = new TH1F("h2CeffHEnegativedirectionDigiD7", "", nphi, 0., 72.);
6922 
6923  for (int jeta = 0; jeta < njeta; jeta++) {
6924  // negativedirectionDigiD:
6925  if (jeta - 41 < 0) {
6926  // for (int i=0;i<ndepth;i++) {
6927  // depth=7
6928  for (int i = 6; i < 7; i++) {
6929  TH1F *HEnegativedirectionDigiD7 = (TH1F *)h2CeffHEnegativedirectionDigiD7->Clone("twod1");
6930 
6931  float ccctest = 0; // to avoid empty massive elements
6932  for (int jphi = 0; jphi < nphi; jphi++) {
6933  double ccc1 = digivariancehe[i][jeta][jphi];
6934  if (adigihe[i][jeta][jphi] > 0.) {
6935  HEnegativedirectionDigiD7->Fill(jphi, ccc1);
6936  ccctest = 1.; //HEnegativedirectionDigiD7->SetBinError(i,0.01);
6937  }
6938  } // for jphi
6939  if (ccctest != 0.) {
6940  //cout<<"2020 kcountHEnegativedirectionDigiD7 = "<<kcountHEnegativedirectionDigiD7 <<" jeta-41= "<< jeta-41 <<endl;
6941  c3x5->cd(kcountHEnegativedirectionDigiD7);
6942  HEnegativedirectionDigiD7->SetMarkerStyle(20);
6943  HEnegativedirectionDigiD7->SetMarkerSize(0.4);
6944  HEnegativedirectionDigiD7->GetYaxis()->SetLabelSize(0.04);
6945  HEnegativedirectionDigiD7->SetXTitle("HEnegativedirectionDigiD7 \b");
6946  HEnegativedirectionDigiD7->SetMarkerColor(2);
6947  HEnegativedirectionDigiD7->SetLineColor(0);
6948  gPad->SetGridy();
6949  gPad->SetGridx();
6950  // gPad->SetLogy();
6951  if (kcountHEnegativedirectionDigiD7 == 1)
6952  HEnegativedirectionDigiD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
6953  if (kcountHEnegativedirectionDigiD7 == 2)
6954  HEnegativedirectionDigiD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
6955  if (kcountHEnegativedirectionDigiD7 == 3)
6956  HEnegativedirectionDigiD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
6957  HEnegativedirectionDigiD7->Draw("Error");
6958  kcountHEnegativedirectionDigiD7++;
6959  if (kcountHEnegativedirectionDigiD7 > 3)
6960  break; // 4x6 = 24
6961  } //ccctest>0
6962 
6963  } // for i
6964  } //if(jeta-41 < 0)
6965  } //for jeta
6967  c3x5->Update();
6968  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
6969  c3x5->Clear();
6970  // clean-up
6971  if (h2CeffHEnegativedirectionDigiD7)
6972  delete h2CeffHEnegativedirectionDigiD7;
6973  //===================================================================== END of Digi HE for phi-symmetry
6974  //===================================================================== END of Digi HE for phi-symmetry
6975  //===================================================================== END of Digi HE for phi-symmetry
6976 
6980  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
6981  //ndepth = k_max[5];
6982  ndepth = 4;
6983  double adigiHF[ndepth][njeta][njphi];
6984  double digivarianceHF[ndepth][njeta][njphi];
6985  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Digi HF
6986  TH2F *amplitudechannel1HF1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HF1");
6987  TH2F *amplitudechannel0HF1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HF1");
6988  TH2F *amplitudechannelHF1 = (TH2F *)amplitudechannel1HF1->Clone("amplitudechannelHF1");
6989  amplitudechannelHF1->Divide(amplitudechannel1HF1, amplitudechannel0HF1, 1, 1, "B");
6990  TH2F *amplitudechannel1HF2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HF2");
6991  TH2F *amplitudechannel0HF2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HF2");
6992  TH2F *amplitudechannelHF2 = (TH2F *)amplitudechannel1HF2->Clone("amplitudechannelHF2");
6993  amplitudechannelHF2->Divide(amplitudechannel1HF2, amplitudechannel0HF2, 1, 1, "B");
6994  TH2F *amplitudechannel1HF3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HF3");
6995  TH2F *amplitudechannel0HF3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HF3");
6996  TH2F *amplitudechannelHF3 = (TH2F *)amplitudechannel1HF3->Clone("amplitudechannelHF3");
6997  amplitudechannelHF3->Divide(amplitudechannel1HF3, amplitudechannel0HF3, 1, 1, "B");
6998  TH2F *amplitudechannel1HF4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel1_HF4");
6999  TH2F *amplitudechannel0HF4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HF4");
7000  TH2F *amplitudechannelHF4 = (TH2F *)amplitudechannel1HF4->Clone("amplitudechannelHF4");
7001  amplitudechannelHF4->Divide(amplitudechannel1HF4, amplitudechannel0HF4, 1, 1, "B");
7002  for (int jeta = 0; jeta < njeta; jeta++) {
7003  //====================================================================== PHI normalization & put R into massive adigiHF
7004  //preparation for PHI normalization:
7005  double sumdigiHF0 = 0;
7006  int nsumdigiHF0 = 0;
7007  double sumdigiHF1 = 0;
7008  int nsumdigiHF1 = 0;
7009  double sumdigiHF2 = 0;
7010  int nsumdigiHF2 = 0;
7011  double sumdigiHF3 = 0;
7012  int nsumdigiHF3 = 0;
7013  for (int jphi = 0; jphi < njphi; jphi++) {
7014  adigiHF[0][jeta][jphi] = amplitudechannelHF1->GetBinContent(jeta + 1, jphi + 1);
7015  adigiHF[1][jeta][jphi] = amplitudechannelHF2->GetBinContent(jeta + 1, jphi + 1);
7016  adigiHF[2][jeta][jphi] = amplitudechannelHF3->GetBinContent(jeta + 1, jphi + 1);
7017  adigiHF[3][jeta][jphi] = amplitudechannelHF4->GetBinContent(jeta + 1, jphi + 1);
7018  if (adigiHF[0][jeta][jphi] > 0.) {
7019  sumdigiHF0 += adigiHF[0][jeta][jphi];
7020  ++nsumdigiHF0;
7021  }
7022  if (adigiHF[1][jeta][jphi] > 0.) {
7023  sumdigiHF1 += adigiHF[1][jeta][jphi];
7024  ++nsumdigiHF1;
7025  }
7026  if (adigiHF[2][jeta][jphi] > 0.) {
7027  sumdigiHF2 += adigiHF[2][jeta][jphi];
7028  ++nsumdigiHF2;
7029  }
7030  if (adigiHF[3][jeta][jphi] > 0.) {
7031  sumdigiHF3 += adigiHF[3][jeta][jphi];
7032  ++nsumdigiHF3;
7033  }
7034  } // phi
7035  // PHI normalization:
7036  for (int jphi = 0; jphi < njphi; jphi++) {
7037  if (adigiHF[0][jeta][jphi] > 0.)
7038  adigiHF[0][jeta][jphi] /= (sumdigiHF0 / nsumdigiHF0);
7039  if (adigiHF[1][jeta][jphi] > 0.)
7040  adigiHF[1][jeta][jphi] /= (sumdigiHF1 / nsumdigiHF1);
7041  if (adigiHF[2][jeta][jphi] > 0.)
7042  adigiHF[2][jeta][jphi] /= (sumdigiHF2 / nsumdigiHF2);
7043  if (adigiHF[3][jeta][jphi] > 0.)
7044  adigiHF[3][jeta][jphi] /= (sumdigiHF3 / nsumdigiHF3);
7045  } // phi
7046  } //eta
7047  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
7048  //======================================================================
7049  //======================================================================
7050  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
7051  c1x0->Clear();
7053  c1x0->Divide(1, 1);
7054  c1x0->cd(1);
7055  TH2F *GefzRdigiHF42D = new TH2F("GefzRdigiHF42D", "", neta, -41., 41., nphi, 0., 72.);
7056  TH2F *GefzRdigiHF42D0 = new TH2F("GefzRdigiHF42D0", "", neta, -41., 41., nphi, 0., 72.);
7057  TH2F *GefzRdigiHF42DF = (TH2F *)GefzRdigiHF42D0->Clone("GefzRdigiHF42DF");
7058  for (int i = 0; i < ndepth; i++) {
7059  for (int jeta = 0; jeta < neta; jeta++) {
7060  for (int jphi = 0; jphi < nphi; jphi++) {
7061  double ccc1 = adigiHF[i][jeta][jphi];
7062  int k2plot = jeta - 41;
7063  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
7064  if (ccc1 != 0.) {
7065  GefzRdigiHF42D->Fill(kkk, jphi, ccc1);
7066  GefzRdigiHF42D0->Fill(kkk, jphi, 1.);
7067  }
7068  }
7069  }
7070  }
7071  GefzRdigiHF42DF->Divide(GefzRdigiHF42D, GefzRdigiHF42D0, 1, 1, "B"); // average A
7072  gPad->SetGridy();
7073  gPad->SetGridx(); // gPad->SetLogz();
7074  GefzRdigiHF42DF->SetMarkerStyle(20);
7075  GefzRdigiHF42DF->SetMarkerSize(0.4);
7076  GefzRdigiHF42DF->GetZaxis()->SetLabelSize(0.08);
7077  GefzRdigiHF42DF->SetXTitle("<R>_depth #eta \b");
7078  GefzRdigiHF42DF->SetYTitle(" #phi \b");
7079  GefzRdigiHF42DF->SetZTitle("<R>_depth \b");
7080  GefzRdigiHF42DF->SetMarkerColor(2);
7081  GefzRdigiHF42DF->SetLineColor(
7082  0); // GefzRdigiHF42DF->SetMaximum(1.000); // GefzRdigiHF42DF->SetMinimum(1.0);
7083  GefzRdigiHF42DF->Draw("COLZ");
7085  c1x0->Update();
7086  c1x0->Print("RdigiGeneralD2PhiSymmetryHF.png");
7087  c1x0->Clear();
7088  // clean-up
7089  if (GefzRdigiHF42D)
7090  delete GefzRdigiHF42D;
7091  if (GefzRdigiHF42D0)
7092  delete GefzRdigiHF42D0;
7093  if (GefzRdigiHF42DF)
7094  delete GefzRdigiHF42DF;
7095  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
7096  //======================================================================
7097  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
7098  c1x1->Clear();
7100  c1x1->Divide(1, 1);
7101  c1x1->cd(1);
7102  TH1F *GefzRdigiHF41D = new TH1F("GefzRdigiHF41D", "", nphi, 0., 72.);
7103  TH1F *GefzRdigiHF41D0 = new TH1F("GefzRdigiHF41D0", "", nphi, 0., 72.);
7104  TH1F *GefzRdigiHF41DF = (TH1F *)GefzRdigiHF41D0->Clone("GefzRdigiHF41DF");
7105  for (int jphi = 0; jphi < nphi; jphi++) {
7106  for (int jeta = 0; jeta < neta; jeta++) {
7107  for (int i = 0; i < ndepth; i++) {
7108  double ccc1 = adigiHF[i][jeta][jphi];
7109  if (ccc1 != 0.) {
7110  GefzRdigiHF41D->Fill(jphi, ccc1);
7111  GefzRdigiHF41D0->Fill(jphi, 1.);
7112  }
7113  }
7114  }
7115  }
7116  GefzRdigiHF41DF->Divide(GefzRdigiHF41D, GefzRdigiHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
7117  GefzRdigiHF41D0->Sumw2();
7118  // for (int jphi=1;jphi<73;jphi++) {GefzRdigiHF41DF->SetBinError(jphi,0.01);}
7119  gPad->SetGridy();
7120  gPad->SetGridx(); // gPad->SetLogz();
7121  GefzRdigiHF41DF->SetMarkerStyle(20);
7122  GefzRdigiHF41DF->SetMarkerSize(1.4);
7123  GefzRdigiHF41DF->GetZaxis()->SetLabelSize(0.08);
7124  GefzRdigiHF41DF->SetXTitle("#phi \b");
7125  GefzRdigiHF41DF->SetYTitle(" <R> \b");
7126  GefzRdigiHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
7127  GefzRdigiHF41DF->SetMarkerColor(4);
7128  GefzRdigiHF41DF->SetLineColor(
7129  4); // GefzRdigiHF41DF->SetMinimum(0.8); // GefzRdigiHF41DF->SetMaximum(1.000);
7130  GefzRdigiHF41DF->Draw("Error");
7132  c1x1->Update();
7133  c1x1->Print("RdigiGeneralD1PhiSymmetryHF.png");
7134  c1x1->Clear();
7135  // clean-up
7136  if (GefzRdigiHF41D)
7137  delete GefzRdigiHF41D;
7138  if (GefzRdigiHF41D0)
7139  delete GefzRdigiHF41D0;
7140  if (GefzRdigiHF41DF)
7141  delete GefzRdigiHF41DF;
7142  //========================================================================================== 4
7143  //======================================================================
7144  //======================================================================1D plot: R vs phi , different eta, depth=1
7145  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
7146  c3x5->Clear();
7148  c3x5->Divide(3, 5);
7149  c3x5->cd(1);
7150  int kcountHFpositivedirectionDigi1 = 1;
7151  TH1F *h2CeffHFpositivedirectionDigi1 = new TH1F("h2CeffHFpositivedirectionDigi1", "", nphi, 0., 72.);
7152  for (int jeta = 0; jeta < njeta; jeta++) {
7153  // positivedirectionDigi:
7154  if (jeta - 41 >= 0) {
7155  // for (int i=0;i<ndepth;i++) {
7156  // depth=1
7157  for (int i = 0; i < 1; i++) {
7158  TH1F *HFpositivedirectionDigi1 = (TH1F *)h2CeffHFpositivedirectionDigi1->Clone("twod1");
7159  float ccctest = 0; // to avoid empty massive elements
7160  for (int jphi = 0; jphi < nphi; jphi++) {
7161  double ccc1 = adigiHF[i][jeta][jphi];
7162  if (ccc1 != 0.) {
7163  HFpositivedirectionDigi1->Fill(jphi, ccc1);
7164  ccctest = 1.; //HFpositivedirectionDigi1->SetBinError(i,0.01);
7165  }
7166  } // for jphi
7167  if (ccctest > 0.) {
7168  // cout<<"444 kcountHFpositivedirectionDigi1 = "<<kcountHFpositivedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
7169  c3x5->cd(kcountHFpositivedirectionDigi1);
7170  HFpositivedirectionDigi1->SetMarkerStyle(20);
7171  HFpositivedirectionDigi1->SetMarkerSize(0.4);
7172  HFpositivedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
7173  HFpositivedirectionDigi1->SetXTitle("HFpositivedirectionDigi1 \b");
7174  HFpositivedirectionDigi1->SetMarkerColor(2);
7175  HFpositivedirectionDigi1->SetLineColor(0);
7176  gPad->SetGridy();
7177  gPad->SetGridx();
7178  // gPad->SetLogy();
7179  if (kcountHFpositivedirectionDigi1 == 1)
7180  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
7181  if (kcountHFpositivedirectionDigi1 == 2)
7182  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
7183  if (kcountHFpositivedirectionDigi1 == 3)
7184  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
7185  if (kcountHFpositivedirectionDigi1 == 4)
7186  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
7187  if (kcountHFpositivedirectionDigi1 == 5)
7188  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
7189  if (kcountHFpositivedirectionDigi1 == 6)
7190  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
7191  if (kcountHFpositivedirectionDigi1 == 7)
7192  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
7193  if (kcountHFpositivedirectionDigi1 == 8)
7194  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
7195  if (kcountHFpositivedirectionDigi1 == 9)
7196  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
7197  if (kcountHFpositivedirectionDigi1 == 10)
7198  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
7199  if (kcountHFpositivedirectionDigi1 == 11)
7200  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
7201  if (kcountHFpositivedirectionDigi1 == 12)
7202  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
7203  if (kcountHFpositivedirectionDigi1 == 13)
7204  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
7205  HFpositivedirectionDigi1->Draw("Error");
7206  kcountHFpositivedirectionDigi1++;
7207  if (kcountHFpositivedirectionDigi1 > 13)
7208  break; //
7209  } //ccctest>0
7210 
7211  } // for i
7212  } //if(jeta-41 >= 0)
7213  } //for jeta
7215  c3x5->Update();
7216  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
7217  c3x5->Clear();
7218  // clean-up
7219  if (h2CeffHFpositivedirectionDigi1)
7220  delete h2CeffHFpositivedirectionDigi1;
7221 
7222  //========================================================================================== 5
7223  //======================================================================
7224  //======================================================================1D plot: R vs phi , different eta, depth=2
7225  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
7226  c3x5->Clear();
7228  c3x5->Divide(3, 5);
7229  c3x5->cd(1);
7230  int kcountHFpositivedirectionDigi2 = 1;
7231  TH1F *h2CeffHFpositivedirectionDigi2 = new TH1F("h2CeffHFpositivedirectionDigi2", "", nphi, 0., 72.);
7232  for (int jeta = 0; jeta < njeta; jeta++) {
7233  // positivedirectionDigi:
7234  if (jeta - 41 >= 0) {
7235  // for (int i=0;i<ndepth;i++) {
7236  // depth=2
7237  for (int i = 1; i < 2; i++) {
7238  TH1F *HFpositivedirectionDigi2 = (TH1F *)h2CeffHFpositivedirectionDigi2->Clone("twod1");
7239  float ccctest = 0; // to avoid empty massive elements
7240  for (int jphi = 0; jphi < nphi; jphi++) {
7241  double ccc1 = adigiHF[i][jeta][jphi];
7242  if (ccc1 != 0.) {
7243  HFpositivedirectionDigi2->Fill(jphi, ccc1);
7244  ccctest = 1.; //HFpositivedirectionDigi2->SetBinError(i,0.01);
7245  }
7246  } // for jphi
7247  if (ccctest > 0.) {
7248  //cout<<"555 kcountHFpositivedirectionDigi2 = "<<kcountHFpositivedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
7249  c3x5->cd(kcountHFpositivedirectionDigi2);
7250  HFpositivedirectionDigi2->SetMarkerStyle(20);
7251  HFpositivedirectionDigi2->SetMarkerSize(0.4);
7252  HFpositivedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
7253  HFpositivedirectionDigi2->SetXTitle("HFpositivedirectionDigi2 \b");
7254  HFpositivedirectionDigi2->SetMarkerColor(2);
7255  HFpositivedirectionDigi2->SetLineColor(0);
7256  gPad->SetGridy();
7257  gPad->SetGridx();
7258  // gPad->SetLogy();
7259  if (kcountHFpositivedirectionDigi2 == 1)
7260  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
7261  if (kcountHFpositivedirectionDigi2 == 2)
7262  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
7263  if (kcountHFpositivedirectionDigi2 == 3)
7264  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
7265  if (kcountHFpositivedirectionDigi2 == 4)
7266  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
7267  if (kcountHFpositivedirectionDigi2 == 5)
7268  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
7269  if (kcountHFpositivedirectionDigi2 == 6)
7270  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
7271  if (kcountHFpositivedirectionDigi2 == 7)
7272  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
7273  if (kcountHFpositivedirectionDigi2 == 8)
7274  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
7275  if (kcountHFpositivedirectionDigi2 == 9)
7276  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
7277  if (kcountHFpositivedirectionDigi2 == 10)
7278  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
7279  if (kcountHFpositivedirectionDigi2 == 11)
7280  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
7281  if (kcountHFpositivedirectionDigi2 == 12)
7282  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
7283  if (kcountHFpositivedirectionDigi2 == 13)
7284  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
7285  HFpositivedirectionDigi2->Draw("Error");
7286  kcountHFpositivedirectionDigi2++;
7287  if (kcountHFpositivedirectionDigi2 > 13)
7288  break; // 4x6 = 24
7289  } //ccctest>0
7290 
7291  } // for i
7292  } //if(jeta-41 >= 0)
7293  } //for jeta
7295  c3x5->Update();
7296  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
7297  c3x5->Clear();
7298  // clean-up
7299  if (h2CeffHFpositivedirectionDigi2)
7300  delete h2CeffHFpositivedirectionDigi2;
7301  //========================================================================================== 6
7302  //======================================================================
7303  //======================================================================1D plot: R vs phi , different eta, depth=3
7304  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
7305  c3x5->Clear();
7307  c3x5->Divide(3, 5);
7308  c3x5->cd(1);
7309  int kcountHFpositivedirectionDigi3 = 1;
7310  TH1F *h2CeffHFpositivedirectionDigi3 = new TH1F("h2CeffHFpositivedirectionDigi3", "", nphi, 0., 72.);
7311  for (int jeta = 0; jeta < njeta; jeta++) {
7312  // positivedirectionDigi:
7313  if (jeta - 41 >= 0) {
7314  // for (int i=0;i<ndepth;i++) {
7315  // depth=3
7316  for (int i = 2; i < 3; i++) {
7317  TH1F *HFpositivedirectionDigi3 = (TH1F *)h2CeffHFpositivedirectionDigi3->Clone("twod1");
7318  float ccctest = 0; // to avoid empty massive elements
7319  for (int jphi = 0; jphi < nphi; jphi++) {
7320  double ccc1 = adigiHF[i][jeta][jphi];
7321  if (ccc1 != 0.) {
7322  HFpositivedirectionDigi3->Fill(jphi, ccc1);
7323  ccctest = 1.; //HFpositivedirectionDigi3->SetBinError(i,0.01);
7324  }
7325  } // for jphi
7326  if (ccctest > 0.) {
7327  //cout<<"666 kcountHFpositivedirectionDigi3 = "<<kcountHFpositivedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
7328  c3x5->cd(kcountHFpositivedirectionDigi3);
7329  HFpositivedirectionDigi3->SetMarkerStyle(20);
7330  HFpositivedirectionDigi3->SetMarkerSize(0.4);
7331  HFpositivedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
7332  HFpositivedirectionDigi3->SetXTitle("HFpositivedirectionDigi3 \b");
7333  HFpositivedirectionDigi3->SetMarkerColor(2);
7334  HFpositivedirectionDigi3->SetLineColor(0);
7335  gPad->SetGridy();
7336  gPad->SetGridx();
7337  // gPad->SetLogy();
7338  if (kcountHFpositivedirectionDigi3 == 1)
7339  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 28; depth = 3 \b");
7340  if (kcountHFpositivedirectionDigi3 == 2)
7341  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 29; depth = 3 \b");
7342  if (kcountHFpositivedirectionDigi3 == 3)
7343  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 30; depth = 3 \b");
7344  if (kcountHFpositivedirectionDigi3 == 4)
7345  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 31; depth = 3 \b");
7346  if (kcountHFpositivedirectionDigi3 == 5)
7347  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 32; depth = 3 \b");
7348  if (kcountHFpositivedirectionDigi3 == 6)
7349  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 33; depth = 3 \b");
7350  if (kcountHFpositivedirectionDigi3 == 7)
7351  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 34; depth = 3 \b");
7352  if (kcountHFpositivedirectionDigi3 == 8)
7353  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 35; depth = 3 \b");
7354  if (kcountHFpositivedirectionDigi3 == 9)
7355  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 36; depth = 3 \b");
7356  if (kcountHFpositivedirectionDigi3 == 10)
7357  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 37; depth = 3 \b");
7358  if (kcountHFpositivedirectionDigi3 == 11)
7359  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 38; depth = 3 \b");
7360  if (kcountHFpositivedirectionDigi3 == 12)
7361  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 39; depth = 3 \b");
7362  if (kcountHFpositivedirectionDigi3 == 13)
7363  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 40; depth = 3 \b");
7364  HFpositivedirectionDigi3->Draw("Error");
7365  kcountHFpositivedirectionDigi3++;
7366  if (kcountHFpositivedirectionDigi3 > 13)
7367  break; // 4x6 = 24
7368  } //ccctest>0
7369 
7370  } // for i
7371  } //if(jeta-41 >= 0)
7372  } //for jeta
7374  c3x5->Update();
7375  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png");
7376  c3x5->Clear();
7377  // clean-up
7378  if (h2CeffHFpositivedirectionDigi3)
7379  delete h2CeffHFpositivedirectionDigi3;
7380  //========================================================================================== 7
7381  //======================================================================
7382  //======================================================================1D plot: R vs phi , different eta, depth=4
7383  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
7384  c3x5->Clear();
7386  c3x5->Divide(3, 5);
7387  c3x5->cd(1);
7388  int kcountHFpositivedirectionDigi4 = 1;
7389  TH1F *h2CeffHFpositivedirectionDigi4 = new TH1F("h2CeffHFpositivedirectionDigi4", "", nphi, 0., 72.);
7390 
7391  for (int jeta = 0; jeta < njeta; jeta++) {
7392  // positivedirectionDigi:
7393  if (jeta - 41 >= 0) {
7394  // for (int i=0;i<ndepth;i++) {
7395  // depth=4
7396  for (int i = 3; i < 4; i++) {
7397  TH1F *HFpositivedirectionDigi4 = (TH1F *)h2CeffHFpositivedirectionDigi4->Clone("twod1");
7398 
7399  float ccctest = 0; // to avoid empty massive elements
7400  for (int jphi = 0; jphi < nphi; jphi++) {
7401  double ccc1 = adigiHF[i][jeta][jphi];
7402  if (ccc1 != 0.) {
7403  HFpositivedirectionDigi4->Fill(jphi, ccc1);
7404  ccctest = 1.; //HFpositivedirectionDigi4->SetBinError(i,0.01);
7405  }
7406  } // for jphi
7407  if (ccctest > 0.) {
7408  //cout<<"777 kcountHFpositivedirectionDigi4 = "<<kcountHFpositivedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
7409  c3x5->cd(kcountHFpositivedirectionDigi4);
7410  HFpositivedirectionDigi4->SetMarkerStyle(20);
7411  HFpositivedirectionDigi4->SetMarkerSize(0.4);
7412  HFpositivedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
7413  HFpositivedirectionDigi4->SetXTitle("HFpositivedirectionDigi4 \b");
7414  HFpositivedirectionDigi4->SetMarkerColor(2);
7415  HFpositivedirectionDigi4->SetLineColor(0);
7416  gPad->SetGridy();
7417  gPad->SetGridx();
7418  // gPad->SetLogy();
7419  if (kcountHFpositivedirectionDigi4 == 1)
7420  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 28; depth = 4 \b");
7421  if (kcountHFpositivedirectionDigi4 == 2)
7422  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 29; depth = 4 \b");
7423  if (kcountHFpositivedirectionDigi4 == 3)
7424  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 30; depth = 4 \b");
7425  if (kcountHFpositivedirectionDigi4 == 4)
7426  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 31; depth = 4 \b");
7427  if (kcountHFpositivedirectionDigi4 == 5)
7428  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 32; depth = 4 \b");
7429  if (kcountHFpositivedirectionDigi4 == 6)
7430  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 33; depth = 4 \b");
7431  if (kcountHFpositivedirectionDigi4 == 7)
7432  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 34; depth = 4 \b");
7433  if (kcountHFpositivedirectionDigi4 == 8)
7434  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 35; depth = 4 \b");
7435  if (kcountHFpositivedirectionDigi4 == 9)
7436  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 36; depth = 4 \b");
7437  if (kcountHFpositivedirectionDigi4 == 10)
7438  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 37; depth = 4 \b");
7439  if (kcountHFpositivedirectionDigi4 == 11)
7440  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 38; depth = 4 \b");
7441  if (kcountHFpositivedirectionDigi4 == 12)
7442  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 39; depth = 4 \b");
7443  if (kcountHFpositivedirectionDigi4 == 13)
7444  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 40; depth = 4 \b");
7445  HFpositivedirectionDigi4->Draw("Error");
7446  kcountHFpositivedirectionDigi4++;
7447  if (kcountHFpositivedirectionDigi4 > 13)
7448  break; // 4x6 = 24
7449  } //ccctest>0
7450 
7451  } // for i
7452  } //if(jeta-41 >= 0)
7453  } //for jeta
7455  c3x5->Update();
7456  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png");
7457  c3x5->Clear();
7458  // clean-up
7459  if (h2CeffHFpositivedirectionDigi4)
7460  delete h2CeffHFpositivedirectionDigi4;
7461 
7462  //========================================================================================== 1111114
7463  //======================================================================
7464  //======================================================================1D plot: R vs phi , different eta, depth=1
7465  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
7466  c3x5->Clear();
7468  c3x5->Divide(3, 5);
7469  c3x5->cd(1);
7470  int kcountHFnegativedirectionDigi1 = 1;
7471  TH1F *h2CeffHFnegativedirectionDigi1 = new TH1F("h2CeffHFnegativedirectionDigi1", "", nphi, 0., 72.);
7472  for (int jeta = 0; jeta < njeta; jeta++) {
7473  // negativedirectionDigi:
7474  if (jeta - 41 < 0) {
7475  // for (int i=0;i<ndepth;i++) {
7476  // depth=1
7477  for (int i = 0; i < 1; i++) {
7478  TH1F *HFnegativedirectionDigi1 = (TH1F *)h2CeffHFnegativedirectionDigi1->Clone("twod1");
7479  float ccctest = 0; // to avoid empty massive elements
7480  for (int jphi = 0; jphi < nphi; jphi++) {
7481  double ccc1 = adigiHF[i][jeta][jphi];
7482  if (ccc1 != 0.) {
7483  HFnegativedirectionDigi1->Fill(jphi, ccc1);
7484  ccctest = 1.; //HFnegativedirectionDigi1->SetBinError(i,0.01);
7485  }
7486  } // for jphi
7487  if (ccctest > 0.) {
7488  // cout<<"444 kcountHFnegativedirectionDigi1 = "<<kcountHFnegativedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
7489  c3x5->cd(kcountHFnegativedirectionDigi1);
7490  HFnegativedirectionDigi1->SetMarkerStyle(20);
7491  HFnegativedirectionDigi1->SetMarkerSize(0.4);
7492  HFnegativedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
7493  HFnegativedirectionDigi1->SetXTitle("HFnegativedirectionDigi1 \b");
7494  HFnegativedirectionDigi1->SetMarkerColor(2);
7495  HFnegativedirectionDigi1->SetLineColor(0);
7496  gPad->SetGridy();
7497  gPad->SetGridx();
7498  // gPad->SetLogy();
7499  if (kcountHFnegativedirectionDigi1 == 1)
7500  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
7501  if (kcountHFnegativedirectionDigi1 == 2)
7502  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
7503  if (kcountHFnegativedirectionDigi1 == 3)
7504  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
7505  if (kcountHFnegativedirectionDigi1 == 4)
7506  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
7507  if (kcountHFnegativedirectionDigi1 == 5)
7508  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
7509  if (kcountHFnegativedirectionDigi1 == 6)
7510  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
7511  if (kcountHFnegativedirectionDigi1 == 7)
7512  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
7513  if (kcountHFnegativedirectionDigi1 == 8)
7514  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
7515  if (kcountHFnegativedirectionDigi1 == 9)
7516  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
7517  if (kcountHFnegativedirectionDigi1 == 10)
7518  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
7519  if (kcountHFnegativedirectionDigi1 == 11)
7520  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
7521  if (kcountHFnegativedirectionDigi1 == 12)
7522  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
7523  if (kcountHFnegativedirectionDigi1 == 13)
7524  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
7525  HFnegativedirectionDigi1->Draw("Error");
7526  kcountHFnegativedirectionDigi1++;
7527  if (kcountHFnegativedirectionDigi1 > 13)
7528  break; //
7529  } //ccctest>0
7530 
7531  } // for i
7532  } //if(jeta-41< 0)
7533  } //for jeta
7535  c3x5->Update();
7536  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
7537  c3x5->Clear();
7538  // clean-up
7539  if (h2CeffHFnegativedirectionDigi1)
7540  delete h2CeffHFnegativedirectionDigi1;
7541 
7542  //========================================================================================== 1111115
7543  //======================================================================
7544  //======================================================================1D plot: R vs phi , different eta, depth=2
7545  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
7546  c3x5->Clear();
7548  c3x5->Divide(3, 5);
7549  c3x5->cd(1);
7550  int kcountHFnegativedirectionDigi2 = 1;
7551  TH1F *h2CeffHFnegativedirectionDigi2 = new TH1F("h2CeffHFnegativedirectionDigi2", "", nphi, 0., 72.);
7552  for (int jeta = 0; jeta < njeta; jeta++) {
7553  // negativedirectionDigi:
7554  if (jeta - 41 < 0) {
7555  // for (int i=0;i<ndepth;i++) {
7556  // depth=2
7557  for (int i = 1; i < 2; i++) {
7558  TH1F *HFnegativedirectionDigi2 = (TH1F *)h2CeffHFnegativedirectionDigi2->Clone("twod1");
7559  float ccctest = 0; // to avoid empty massive elements
7560  for (int jphi = 0; jphi < nphi; jphi++) {
7561  double ccc1 = adigiHF[i][jeta][jphi];
7562  if (ccc1 != 0.) {
7563  HFnegativedirectionDigi2->Fill(jphi, ccc1);
7564  ccctest = 1.; //HFnegativedirectionDigi2->SetBinError(i,0.01);
7565  }
7566  } // for jphi
7567  if (ccctest > 0.) {
7568  //cout<<"555 kcountHFnegativedirectionDigi2 = "<<kcountHFnegativedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
7569  c3x5->cd(kcountHFnegativedirectionDigi2);
7570  HFnegativedirectionDigi2->SetMarkerStyle(20);
7571  HFnegativedirectionDigi2->SetMarkerSize(0.4);
7572  HFnegativedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
7573  HFnegativedirectionDigi2->SetXTitle("HFnegativedirectionDigi2 \b");
7574  HFnegativedirectionDigi2->SetMarkerColor(2);
7575  HFnegativedirectionDigi2->SetLineColor(0);
7576  gPad->SetGridy();
7577  gPad->SetGridx();
7578  // gPad->SetLogy();
7579  if (kcountHFnegativedirectionDigi2 == 1)
7580  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
7581  if (kcountHFnegativedirectionDigi2 == 2)
7582  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
7583  if (kcountHFnegativedirectionDigi2 == 3)
7584  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
7585  if (kcountHFnegativedirectionDigi2 == 4)
7586  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
7587  if (kcountHFnegativedirectionDigi2 == 5)
7588  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
7589  if (kcountHFnegativedirectionDigi2 == 6)
7590  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
7591  if (kcountHFnegativedirectionDigi2 == 7)
7592  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
7593  if (kcountHFnegativedirectionDigi2 == 8)
7594  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
7595  if (kcountHFnegativedirectionDigi2 == 9)
7596  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
7597  if (kcountHFnegativedirectionDigi2 == 10)
7598  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
7599  if (kcountHFnegativedirectionDigi2 == 11)
7600  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
7601  if (kcountHFnegativedirectionDigi2 == 12)
7602  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
7603  if (kcountHFnegativedirectionDigi2 == 13)
7604  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
7605  HFnegativedirectionDigi2->Draw("Error");
7606  kcountHFnegativedirectionDigi2++;
7607  if (kcountHFnegativedirectionDigi2 > 13)
7608  break; // 4x6 = 24
7609  } //ccctest>0
7610 
7611  } // for i
7612  } //if(jeta-41< 0)
7613  } //for jeta
7615  c3x5->Update();
7616  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
7617  c3x5->Clear();
7618  // clean-up
7619  if (h2CeffHFnegativedirectionDigi2)
7620  delete h2CeffHFnegativedirectionDigi2;
7621  //========================================================================================== 1111116
7622  //======================================================================
7623  //======================================================================1D plot: R vs phi , different eta, depth=3
7624  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
7625  c3x5->Clear();
7627  c3x5->Divide(3, 5);
7628  c3x5->cd(1);
7629  int kcountHFnegativedirectionDigi3 = 1;
7630  TH1F *h2CeffHFnegativedirectionDigi3 = new TH1F("h2CeffHFnegativedirectionDigi3", "", nphi, 0., 72.);
7631  for (int jeta = 0; jeta < njeta; jeta++) {
7632  // negativedirectionDigi:
7633  if (jeta - 41 < 0) {
7634  // for (int i=0;i<ndepth;i++) {
7635  // depth=3
7636  for (int i = 2; i < 3; i++) {
7637  TH1F *HFnegativedirectionDigi3 = (TH1F *)h2CeffHFnegativedirectionDigi3->Clone("twod1");
7638  float ccctest = 0; // to avoid empty massive elements
7639  for (int jphi = 0; jphi < nphi; jphi++) {
7640  double ccc1 = adigiHF[i][jeta][jphi];
7641  if (ccc1 != 0.) {
7642  HFnegativedirectionDigi3->Fill(jphi, ccc1);
7643  ccctest = 1.; //HFnegativedirectionDigi3->SetBinError(i,0.01);
7644  }
7645  } // for jphi
7646  if (ccctest > 0.) {
7647  //cout<<"666 kcountHFnegativedirectionDigi3 = "<<kcountHFnegativedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
7648  c3x5->cd(kcountHFnegativedirectionDigi3);
7649  HFnegativedirectionDigi3->SetMarkerStyle(20);
7650  HFnegativedirectionDigi3->SetMarkerSize(0.4);
7651  HFnegativedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
7652  HFnegativedirectionDigi3->SetXTitle("HFnegativedirectionDigi3 \b");
7653  HFnegativedirectionDigi3->SetMarkerColor(2);
7654  HFnegativedirectionDigi3->SetLineColor(0);
7655  gPad->SetGridy();
7656  gPad->SetGridx();
7657  // gPad->SetLogy();
7658  if (kcountHFnegativedirectionDigi3 == 1)
7659  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-41; depth = 3 \b");
7660  if (kcountHFnegativedirectionDigi3 == 2)
7661  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-40; depth = 3 \b");
7662  if (kcountHFnegativedirectionDigi3 == 3)
7663  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-39; depth = 3 \b");
7664  if (kcountHFnegativedirectionDigi3 == 4)
7665  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-38; depth = 3 \b");
7666  if (kcountHFnegativedirectionDigi3 == 5)
7667  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-37; depth = 3 \b");
7668  if (kcountHFnegativedirectionDigi3 == 6)
7669  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-36; depth = 3 \b");
7670  if (kcountHFnegativedirectionDigi3 == 7)
7671  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-35; depth = 3 \b");
7672  if (kcountHFnegativedirectionDigi3 == 8)
7673  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-34; depth = 3 \b");
7674  if (kcountHFnegativedirectionDigi3 == 9)
7675  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-33; depth = 3 \b");
7676  if (kcountHFnegativedirectionDigi3 == 10)
7677  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-32; depth = 3 \b");
7678  if (kcountHFnegativedirectionDigi3 == 11)
7679  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-31; depth = 3 \b");
7680  if (kcountHFnegativedirectionDigi3 == 12)
7681  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-30; depth = 3 \b");
7682  if (kcountHFnegativedirectionDigi3 == 13)
7683  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-29; depth = 3 \b");
7684  HFnegativedirectionDigi3->Draw("Error");
7685  kcountHFnegativedirectionDigi3++;
7686  if (kcountHFnegativedirectionDigi3 > 13)
7687  break; // 4x6 = 24
7688  } //ccctest>0
7689 
7690  } // for i
7691  } //if(jeta-41< 0)
7692  } //for jeta
7694  c3x5->Update();
7695  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png");
7696  c3x5->Clear();
7697  // clean-up
7698  if (h2CeffHFnegativedirectionDigi3)
7699  delete h2CeffHFnegativedirectionDigi3;
7700  //========================================================================================== 1111117
7701  //======================================================================
7702  //======================================================================1D plot: R vs phi , different eta, depth=4
7703  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
7704  c3x5->Clear();
7706  c3x5->Divide(3, 5);
7707  c3x5->cd(1);
7708  int kcountHFnegativedirectionDigi4 = 1;
7709  TH1F *h2CeffHFnegativedirectionDigi4 = new TH1F("h2CeffHFnegativedirectionDigi4", "", nphi, 0., 72.);
7710 
7711  for (int jeta = 0; jeta < njeta; jeta++) {
7712  // negativedirectionDigi:
7713  if (jeta - 41 < 0) {
7714  // for (int i=0;i<ndepth;i++) {
7715  // depth=4
7716  for (int i = 3; i < 4; i++) {
7717  TH1F *HFnegativedirectionDigi4 = (TH1F *)h2CeffHFnegativedirectionDigi4->Clone("twod1");
7718 
7719  float ccctest = 0; // to avoid empty massive elements
7720  for (int jphi = 0; jphi < nphi; jphi++) {
7721  double ccc1 = adigiHF[i][jeta][jphi];
7722  if (ccc1 != 0.) {
7723  HFnegativedirectionDigi4->Fill(jphi, ccc1);
7724  ccctest = 1.; //HFnegativedirectionDigi4->SetBinError(i,0.01);
7725  }
7726  } // for jphi
7727  if (ccctest > 0.) {
7728  //cout<<"777 kcountHFnegativedirectionDigi4 = "<<kcountHFnegativedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
7729  c3x5->cd(kcountHFnegativedirectionDigi4);
7730  HFnegativedirectionDigi4->SetMarkerStyle(20);
7731  HFnegativedirectionDigi4->SetMarkerSize(0.4);
7732  HFnegativedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
7733  HFnegativedirectionDigi4->SetXTitle("HFnegativedirectionDigi4 \b");
7734  HFnegativedirectionDigi4->SetMarkerColor(2);
7735  HFnegativedirectionDigi4->SetLineColor(0);
7736  gPad->SetGridy();
7737  gPad->SetGridx();
7738  // gPad->SetLogy();
7739  if (kcountHFnegativedirectionDigi4 == 1)
7740  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-41; depth = 4 \b");
7741  if (kcountHFnegativedirectionDigi4 == 2)
7742  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-40; depth = 4 \b");
7743  if (kcountHFnegativedirectionDigi4 == 3)
7744  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-39; depth = 4 \b");
7745  if (kcountHFnegativedirectionDigi4 == 4)
7746  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-38; depth = 4 \b");
7747  if (kcountHFnegativedirectionDigi4 == 5)
7748  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-37; depth = 4 \b");
7749  if (kcountHFnegativedirectionDigi4 == 6)
7750  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-36; depth = 4 \b");
7751  if (kcountHFnegativedirectionDigi4 == 7)
7752  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-35; depth = 4 \b");
7753  if (kcountHFnegativedirectionDigi4 == 8)
7754  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-34; depth = 4 \b");
7755  if (kcountHFnegativedirectionDigi4 == 9)
7756  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-33; depth = 4 \b");
7757  if (kcountHFnegativedirectionDigi4 == 10)
7758  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-32; depth = 4 \b");
7759  if (kcountHFnegativedirectionDigi4 == 11)
7760  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-31; depth = 4 \b");
7761  if (kcountHFnegativedirectionDigi4 == 12)
7762  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-30; depth = 4 \b");
7763  if (kcountHFnegativedirectionDigi4 == 13)
7764  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-29; depth = 4 \b");
7765  HFnegativedirectionDigi4->Draw("Error");
7766  kcountHFnegativedirectionDigi4++;
7767  if (kcountHFnegativedirectionDigi4 > 13)
7768  break; // 4x6 = 24
7769  } //ccctest>0
7770 
7771  } // for i
7772  } //if(jeta-41< 0)
7773  } //for jeta
7775  c3x5->Update();
7776  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png");
7777  c3x5->Clear();
7778  // clean-up
7779  if (h2CeffHFnegativedirectionDigi4)
7780  delete h2CeffHFnegativedirectionDigi4;
7781 
7782  //======================================================================================================================
7783  //======================================================================================================================
7784  //======================================================================================================================
7785  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
7786 
7787  //cout<<" Start Vaiance: preparation *****" <<endl;
7788  TH2F *digiVariance1HF1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HF1");
7789  TH2F *digiVariance0HF1 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HF1");
7790  TH2F *digiVarianceHF1 = (TH2F *)digiVariance1HF1->Clone("digiVarianceHF1");
7791  digiVarianceHF1->Divide(digiVariance1HF1, digiVariance0HF1, 1, 1, "B");
7792  TH2F *digiVariance1HF2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HF2");
7793  TH2F *digiVariance0HF2 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HF2");
7794  TH2F *digiVarianceHF2 = (TH2F *)digiVariance1HF2->Clone("digiVarianceHF2");
7795  digiVarianceHF2->Divide(digiVariance1HF2, digiVariance0HF2, 1, 1, "B");
7796  TH2F *digiVariance1HF3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HF3");
7797  TH2F *digiVariance0HF3 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HF3");
7798  TH2F *digiVarianceHF3 = (TH2F *)digiVariance1HF3->Clone("digiVarianceHF3");
7799  digiVarianceHF3->Divide(digiVariance1HF3, digiVariance0HF3, 1, 1, "B");
7800  TH2F *digiVariance1HF4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel2_HF4");
7801  TH2F *digiVariance0HF4 = (TH2F *)dir->FindObjectAny("h_amplitudechannel0_HF4");
7802  TH2F *digiVarianceHF4 = (TH2F *)digiVariance1HF4->Clone("digiVarianceHF4");
7803  digiVarianceHF4->Divide(digiVariance1HF4, digiVariance0HF4, 1, 1, "B");
7804  //cout<<" Vaiance: preparation DONE *****" <<endl;
7805  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive digivarianceHF
7806  // = sum(R*R)/N - (sum(R)/N)**2
7807  for (int jeta = 0; jeta < njeta; jeta++) {
7808  //preparation for PHI normalization:
7809  double sumdigiHF0 = 0;
7810  int nsumdigiHF0 = 0;
7811  double sumdigiHF1 = 0;
7812  int nsumdigiHF1 = 0;
7813  double sumdigiHF2 = 0;
7814  int nsumdigiHF2 = 0;
7815  double sumdigiHF3 = 0;
7816  int nsumdigiHF3 = 0;
7817  for (int jphi = 0; jphi < njphi; jphi++) {
7818  digivarianceHF[0][jeta][jphi] = digiVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
7819  digivarianceHF[1][jeta][jphi] = digiVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
7820  digivarianceHF[2][jeta][jphi] = digiVarianceHF3->GetBinContent(jeta + 1, jphi + 1);
7821  digivarianceHF[3][jeta][jphi] = digiVarianceHF4->GetBinContent(jeta + 1, jphi + 1);
7822  if (digivarianceHF[0][jeta][jphi] > 0.) {
7823  sumdigiHF0 += digivarianceHF[0][jeta][jphi];
7824  ++nsumdigiHF0;
7825  }
7826  if (digivarianceHF[1][jeta][jphi] > 0.) {
7827  sumdigiHF1 += digivarianceHF[1][jeta][jphi];
7828  ++nsumdigiHF1;
7829  }
7830  if (digivarianceHF[2][jeta][jphi] > 0.) {
7831  sumdigiHF2 += digivarianceHF[2][jeta][jphi];
7832  ++nsumdigiHF2;
7833  }
7834  if (digivarianceHF[3][jeta][jphi] > 0.) {
7835  sumdigiHF3 += digivarianceHF[3][jeta][jphi];
7836  ++nsumdigiHF3;
7837  }
7838  } // phi
7839  // PHI normalization :
7840  for (int jphi = 0; jphi < njphi; jphi++) {
7841  if (digivarianceHF[0][jeta][jphi] > 0.)
7842  digivarianceHF[0][jeta][jphi] /= (sumdigiHF0 / nsumdigiHF0);
7843  if (digivarianceHF[1][jeta][jphi] > 0.)
7844  digivarianceHF[1][jeta][jphi] /= (sumdigiHF1 / nsumdigiHF1);
7845  if (digivarianceHF[2][jeta][jphi] > 0.)
7846  digivarianceHF[2][jeta][jphi] /= (sumdigiHF2 / nsumdigiHF2);
7847  if (digivarianceHF[3][jeta][jphi] > 0.)
7848  digivarianceHF[3][jeta][jphi] /= (sumdigiHF3 / nsumdigiHF3);
7849  } // phi
7850  // digivarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
7851  for (int jphi = 0; jphi < njphi; jphi++) {
7852  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
7853  digivarianceHF[0][jeta][jphi] -= adigiHF[0][jeta][jphi] * adigiHF[0][jeta][jphi];
7854  digivarianceHF[0][jeta][jphi] = fabs(digivarianceHF[0][jeta][jphi]);
7855  digivarianceHF[1][jeta][jphi] -= adigiHF[1][jeta][jphi] * adigiHF[1][jeta][jphi];
7856  digivarianceHF[1][jeta][jphi] = fabs(digivarianceHF[1][jeta][jphi]);
7857  digivarianceHF[2][jeta][jphi] -= adigiHF[2][jeta][jphi] * adigiHF[2][jeta][jphi];
7858  digivarianceHF[2][jeta][jphi] = fabs(digivarianceHF[2][jeta][jphi]);
7859  digivarianceHF[3][jeta][jphi] -= adigiHF[3][jeta][jphi] * adigiHF[3][jeta][jphi];
7860  digivarianceHF[3][jeta][jphi] = fabs(digivarianceHF[3][jeta][jphi]);
7861  }
7862  }
7863  //cout<<" Vaiance: DONE*****" <<endl;
7864  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
7865  //======================================================================
7866  //======================================================================
7867  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
7868  c1x1->Clear();
7870  c1x0->Divide(1, 1);
7871  c1x0->cd(1);
7872  TH2F *DefzDdigiHF42D = new TH2F("DefzDdigiHF42D", "", neta, -41., 41., nphi, 0., 72.);
7873  TH2F *DefzDdigiHF42D0 = new TH2F("DefzDdigiHF42D0", "", neta, -41., 41., nphi, 0., 72.);
7874  TH2F *DefzDdigiHF42DF = (TH2F *)DefzDdigiHF42D0->Clone("DefzDdigiHF42DF");
7875  for (int i = 0; i < ndepth; i++) {
7876  for (int jeta = 0; jeta < neta; jeta++) {
7877  for (int jphi = 0; jphi < nphi; jphi++) {
7878  double ccc1 = digivarianceHF[i][jeta][jphi];
7879  int k2plot = jeta - 41;
7880  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
7881  if (adigiHF[i][jeta][jphi] > 0.) {
7882  DefzDdigiHF42D->Fill(kkk, jphi, ccc1);
7883  DefzDdigiHF42D0->Fill(kkk, jphi, 1.);
7884  }
7885  }
7886  }
7887  }
7888  DefzDdigiHF42DF->Divide(DefzDdigiHF42D, DefzDdigiHF42D0, 1, 1, "B"); // average A
7889  // DefzDdigiHF1->Sumw2();
7890  gPad->SetGridy();
7891  gPad->SetGridx(); // gPad->SetLogz();
7892  DefzDdigiHF42DF->SetMarkerStyle(20);
7893  DefzDdigiHF42DF->SetMarkerSize(0.4);
7894  DefzDdigiHF42DF->GetZaxis()->SetLabelSize(0.08);
7895  DefzDdigiHF42DF->SetXTitle("<D>_depth #eta \b");
7896  DefzDdigiHF42DF->SetYTitle(" #phi \b");
7897  DefzDdigiHF42DF->SetZTitle("<D>_depth \b");
7898  DefzDdigiHF42DF->SetMarkerColor(2);
7899  DefzDdigiHF42DF->SetLineColor(
7900  0); // DefzDdigiHF42DF->SetMaximum(1.000); // DefzDdigiHF42DF->SetMinimum(1.0);
7901  DefzDdigiHF42DF->Draw("COLZ");
7903  c1x0->Update();
7904  c1x0->Print("DdigiGeneralD2PhiSymmetryHF.png");
7905  c1x0->Clear();
7906  // clean-up
7907  if (DefzDdigiHF42D)
7908  delete DefzDdigiHF42D;
7909  if (DefzDdigiHF42D0)
7910  delete DefzDdigiHF42D0;
7911  if (DefzDdigiHF42DF)
7912  delete DefzDdigiHF42DF;
7913  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
7914  //======================================================================
7915  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
7916  c1x1->Clear();
7918  c1x1->Divide(1, 1);
7919  c1x1->cd(1);
7920  TH1F *DefzDdigiHF41D = new TH1F("DefzDdigiHF41D", "", nphi, 0., 72.);
7921  TH1F *DefzDdigiHF41D0 = new TH1F("DefzDdigiHF41D0", "", nphi, 0., 72.);
7922  TH1F *DefzDdigiHF41DF = (TH1F *)DefzDdigiHF41D0->Clone("DefzDdigiHF41DF");
7923 
7924  for (int jphi = 0; jphi < nphi; jphi++) {
7925  for (int jeta = 0; jeta < neta; jeta++) {
7926  for (int i = 0; i < ndepth; i++) {
7927  double ccc1 = digivarianceHF[i][jeta][jphi];
7928  if (adigiHF[i][jeta][jphi] > 0.) {
7929  DefzDdigiHF41D->Fill(jphi, ccc1);
7930  DefzDdigiHF41D0->Fill(jphi, 1.);
7931  }
7932  }
7933  }
7934  }
7935  // DefzDdigiHF41D->Sumw2();DefzDdigiHF41D0->Sumw2();
7936 
7937  DefzDdigiHF41DF->Divide(DefzDdigiHF41D, DefzDdigiHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
7938  DefzDdigiHF41D0->Sumw2();
7939  // for (int jphi=1;jphi<73;jphi++) {DefzDdigiHF41DF->SetBinError(jphi,0.01);}
7940  gPad->SetGridy();
7941  gPad->SetGridx(); // gPad->SetLogz();
7942  DefzDdigiHF41DF->SetMarkerStyle(20);
7943  DefzDdigiHF41DF->SetMarkerSize(1.4);
7944  DefzDdigiHF41DF->GetZaxis()->SetLabelSize(0.08);
7945  DefzDdigiHF41DF->SetXTitle("#phi \b");
7946  DefzDdigiHF41DF->SetYTitle(" <D> \b");
7947  DefzDdigiHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
7948  DefzDdigiHF41DF->SetMarkerColor(4);
7949  DefzDdigiHF41DF->SetLineColor(4); // DefzDdigiHF41DF->SetMinimum(0.8); DefzDdigiHF41DF->SetMinimum(-0.015);
7950  DefzDdigiHF41DF->Draw("Error");
7952  c1x1->Update();
7953  c1x1->Print("DdigiGeneralD1PhiSymmetryHF.png");
7954  c1x1->Clear();
7955  // clean-up
7956  if (DefzDdigiHF41D)
7957  delete DefzDdigiHF41D;
7958  if (DefzDdigiHF41D0)
7959  delete DefzDdigiHF41D0;
7960  if (DefzDdigiHF41DF)
7961  delete DefzDdigiHF41DF;
7962  //========================================================================================== 14
7963  //======================================================================
7964  //======================================================================1D plot: D vs phi , different eta, depth=1
7965  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
7966  c3x5->Clear();
7968  c3x5->Divide(3, 5);
7969  c3x5->cd(1);
7970  int kcountHFpositivedirectionDigiD1 = 1;
7971  TH1F *h2CeffHFpositivedirectionDigiD1 = new TH1F("h2CeffHFpositivedirectionDigiD1", "", nphi, 0., 72.);
7972 
7973  for (int jeta = 0; jeta < njeta; jeta++) {
7974  // positivedirectionDigiD:
7975  if (jeta - 41 >= 0) {
7976  // for (int i=0;i<ndepth;i++) {
7977  // depth=1
7978  for (int i = 0; i < 1; i++) {
7979  TH1F *HFpositivedirectionDigiD1 = (TH1F *)h2CeffHFpositivedirectionDigiD1->Clone("twod1");
7980 
7981  float ccctest = 0; // to avoid empty massive elements
7982  for (int jphi = 0; jphi < nphi; jphi++) {
7983  double ccc1 = digivarianceHF[i][jeta][jphi];
7984  if (adigiHF[i][jeta][jphi] > 0.) {
7985  HFpositivedirectionDigiD1->Fill(jphi, ccc1);
7986  ccctest = 1.; //HFpositivedirectionDigiD1->SetBinError(i,0.01);
7987  }
7988  } // for jphi
7989  if (ccctest > 0.) {
7990  //cout<<"1414 kcountHFpositivedirectionDigiD1 = "<<kcountHFpositivedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
7991  c3x5->cd(kcountHFpositivedirectionDigiD1);
7992  HFpositivedirectionDigiD1->SetMarkerStyle(20);
7993  HFpositivedirectionDigiD1->SetMarkerSize(0.4);
7994  HFpositivedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
7995  HFpositivedirectionDigiD1->SetXTitle("HFpositivedirectionDigiD1 \b");
7996  HFpositivedirectionDigiD1->SetMarkerColor(2);
7997  HFpositivedirectionDigiD1->SetLineColor(0);
7998  gPad->SetGridy();
7999  gPad->SetGridx();
8000  // gPad->SetLogy();
8001  if (kcountHFpositivedirectionDigiD1 == 1)
8002  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
8003  if (kcountHFpositivedirectionDigiD1 == 2)
8004  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
8005  if (kcountHFpositivedirectionDigiD1 == 3)
8006  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
8007  if (kcountHFpositivedirectionDigiD1 == 4)
8008  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
8009  if (kcountHFpositivedirectionDigiD1 == 5)
8010  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
8011  if (kcountHFpositivedirectionDigiD1 == 6)
8012  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
8013  if (kcountHFpositivedirectionDigiD1 == 7)
8014  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
8015  if (kcountHFpositivedirectionDigiD1 == 8)
8016  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
8017  if (kcountHFpositivedirectionDigiD1 == 9)
8018  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
8019  if (kcountHFpositivedirectionDigiD1 == 10)
8020  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
8021  if (kcountHFpositivedirectionDigiD1 == 11)
8022  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
8023  if (kcountHFpositivedirectionDigiD1 == 12)
8024  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
8025  if (kcountHFpositivedirectionDigiD1 == 13)
8026  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
8027  HFpositivedirectionDigiD1->Draw("Error");
8028  kcountHFpositivedirectionDigiD1++;
8029  if (kcountHFpositivedirectionDigiD1 > 13)
8030  break; // 4x6 = 24
8031  } //ccctest>0
8032 
8033  } // for i
8034  } //if(jeta-41 >= 0)
8035  } //for jeta
8037  c3x5->Update();
8038  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
8039  c3x5->Clear();
8040  // clean-up
8041  if (h2CeffHFpositivedirectionDigiD1)
8042  delete h2CeffHFpositivedirectionDigiD1;
8043  //========================================================================================== 15
8044  //======================================================================
8045  //======================================================================1D plot: D vs phi , different eta, depth=2
8046  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
8047  c3x5->Clear();
8048  c3x5->Divide(3, 5);
8049  c3x5->cd(1);
8050  int kcountHFpositivedirectionDigiD2 = 1;
8051  TH1F *h2CeffHFpositivedirectionDigiD2 = new TH1F("h2CeffHFpositivedirectionDigiD2", "", nphi, 0., 72.);
8052 
8053  for (int jeta = 0; jeta < njeta; jeta++) {
8054  // positivedirectionDigiD:
8055  if (jeta - 41 >= 0) {
8056  // for (int i=0;i<ndepth;i++) {
8057  // depth=2
8058  for (int i = 1; i < 2; i++) {
8059  TH1F *HFpositivedirectionDigiD2 = (TH1F *)h2CeffHFpositivedirectionDigiD2->Clone("twod1");
8060 
8061  float ccctest = 0; // to avoid empty massive elements
8062  for (int jphi = 0; jphi < nphi; jphi++) {
8063  double ccc1 = digivarianceHF[i][jeta][jphi];
8064  if (adigiHF[i][jeta][jphi] > 0.) {
8065  HFpositivedirectionDigiD2->Fill(jphi, ccc1);
8066  ccctest = 1.; //HFpositivedirectionDigiD2->SetBinError(i,0.01);
8067  }
8068  } // for jphi
8069  if (ccctest > 0.) {
8070  //cout<<"1515 kcountHFpositivedirectionDigiD2 = "<<kcountHFpositivedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
8071  c3x5->cd(kcountHFpositivedirectionDigiD2);
8072  HFpositivedirectionDigiD2->SetMarkerStyle(20);
8073  HFpositivedirectionDigiD2->SetMarkerSize(0.4);
8074  HFpositivedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
8075  HFpositivedirectionDigiD2->SetXTitle("HFpositivedirectionDigiD2 \b");
8076  HFpositivedirectionDigiD2->SetMarkerColor(2);
8077  HFpositivedirectionDigiD2->SetLineColor(0);
8078  gPad->SetGridy();
8079  gPad->SetGridx();
8080  // gPad->SetLogy();
8081  if (kcountHFpositivedirectionDigiD2 == 1)
8082  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
8083  if (kcountHFpositivedirectionDigiD2 == 2)
8084  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
8085  if (kcountHFpositivedirectionDigiD2 == 3)
8086  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
8087  if (kcountHFpositivedirectionDigiD2 == 4)
8088  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
8089  if (kcountHFpositivedirectionDigiD2 == 5)
8090  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
8091  if (kcountHFpositivedirectionDigiD2 == 6)
8092  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
8093  if (kcountHFpositivedirectionDigiD2 == 7)
8094  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
8095  if (kcountHFpositivedirectionDigiD2 == 8)
8096  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
8097  if (kcountHFpositivedirectionDigiD2 == 9)
8098  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
8099  if (kcountHFpositivedirectionDigiD2 == 10)
8100  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
8101  if (kcountHFpositivedirectionDigiD2 == 11)
8102  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
8103  if (kcountHFpositivedirectionDigiD2 == 12)
8104  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
8105  if (kcountHFpositivedirectionDigiD2 == 13)
8106  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
8107  HFpositivedirectionDigiD2->Draw("Error");
8108  kcountHFpositivedirectionDigiD2++;
8109  if (kcountHFpositivedirectionDigiD2 > 13)
8110  break; // 4x6 = 24
8111  } //ccctest>0
8112 
8113  } // for i
8114  } //if(jeta-41 >= 0)
8115  } //for jeta
8117  c3x5->Update();
8118  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
8119  c3x5->Clear();
8120  // clean-up
8121  if (h2CeffHFpositivedirectionDigiD2)
8122  delete h2CeffHFpositivedirectionDigiD2;
8123  //========================================================================================== 16
8124  //======================================================================
8125  //======================================================================1D plot: D vs phi , different eta, depth=3
8126  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
8127  c3x5->Clear();
8128  c3x5->Divide(3, 5);
8129  c3x5->cd(1);
8130  int kcountHFpositivedirectionDigiD3 = 1;
8131  TH1F *h2CeffHFpositivedirectionDigiD3 = new TH1F("h2CeffHFpositivedirectionDigiD3", "", nphi, 0., 72.);
8132 
8133  for (int jeta = 0; jeta < njeta; jeta++) {
8134  // positivedirectionDigiD:
8135  if (jeta - 41 >= 0) {
8136  // for (int i=0;i<ndepth;i++) {
8137  // depth=3
8138  for (int i = 2; i < 3; i++) {
8139  TH1F *HFpositivedirectionDigiD3 = (TH1F *)h2CeffHFpositivedirectionDigiD3->Clone("twod1");
8140 
8141  float ccctest = 0; // to avoid empty massive elements
8142  for (int jphi = 0; jphi < nphi; jphi++) {
8143  double ccc1 = digivarianceHF[i][jeta][jphi];
8144  if (adigiHF[i][jeta][jphi] > 0.) {
8145  HFpositivedirectionDigiD3->Fill(jphi, ccc1);
8146  ccctest = 1.; //HFpositivedirectionDigiD3->SetBinError(i,0.01);
8147  }
8148  } // for jphi
8149  if (ccctest > 0.) {
8150  //cout<<"1616 kcountHFpositivedirectionDigiD3 = "<<kcountHFpositivedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
8151  c3x5->cd(kcountHFpositivedirectionDigiD3);
8152  HFpositivedirectionDigiD3->SetMarkerStyle(20);
8153  HFpositivedirectionDigiD3->SetMarkerSize(0.4);
8154  HFpositivedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
8155  HFpositivedirectionDigiD3->SetXTitle("HFpositivedirectionDigiD3 \b");
8156  HFpositivedirectionDigiD3->SetMarkerColor(2);
8157  HFpositivedirectionDigiD3->SetLineColor(0);
8158  gPad->SetGridy();
8159  gPad->SetGridx();
8160  // gPad->SetLogy();
8161  if (kcountHFpositivedirectionDigiD3 == 1)
8162  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 28; depth = 3 \b");
8163  if (kcountHFpositivedirectionDigiD3 == 2)
8164  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 29; depth = 3 \b");
8165  if (kcountHFpositivedirectionDigiD3 == 3)
8166  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 30; depth = 3 \b");
8167  if (kcountHFpositivedirectionDigiD3 == 4)
8168  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 31; depth = 3 \b");
8169  if (kcountHFpositivedirectionDigiD3 == 5)
8170  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 32; depth = 3 \b");
8171  if (kcountHFpositivedirectionDigiD3 == 6)
8172  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 33; depth = 3 \b");
8173  if (kcountHFpositivedirectionDigiD3 == 7)
8174  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 34; depth = 3 \b");
8175  if (kcountHFpositivedirectionDigiD3 == 8)
8176  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 35; depth = 3 \b");
8177  if (kcountHFpositivedirectionDigiD3 == 9)
8178  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 36; depth = 3 \b");
8179  if (kcountHFpositivedirectionDigiD3 == 10)
8180  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 37; depth = 3 \b");
8181  if (kcountHFpositivedirectionDigiD3 == 11)
8182  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 38; depth = 3 \b");
8183  if (kcountHFpositivedirectionDigiD3 == 12)
8184  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 39; depth = 3 \b");
8185  if (kcountHFpositivedirectionDigiD3 == 13)
8186  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 40; depth = 3 \b");
8187  HFpositivedirectionDigiD3->Draw("Error");
8188  kcountHFpositivedirectionDigiD3++;
8189  if (kcountHFpositivedirectionDigiD3 > 13)
8190  break; // 4x6 = 24
8191  } //ccctest>0
8192 
8193  } // for i
8194  } //if(jeta-41 >= 0)
8195  } //for jeta
8197  c3x5->Update();
8198  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png");
8199  c3x5->Clear();
8200  // clean-up
8201  if (h2CeffHFpositivedirectionDigiD3)
8202  delete h2CeffHFpositivedirectionDigiD3;
8203  //========================================================================================== 17
8204  //======================================================================
8205  //======================================================================1D plot: D vs phi , different eta, depth=4
8206  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
8207  c3x5->Clear();
8208  c3x5->Divide(3, 5);
8209  c3x5->cd(1);
8210  int kcountHFpositivedirectionDigiD4 = 1;
8211  TH1F *h2CeffHFpositivedirectionDigiD4 = new TH1F("h2CeffHFpositivedirectionDigiD4", "", nphi, 0., 72.);
8212 
8213  for (int jeta = 0; jeta < njeta; jeta++) {
8214  // positivedirectionDigiD:
8215  if (jeta - 41 >= 0) {
8216  // for (int i=0;i<ndepth;i++) {
8217  // depth=4
8218  for (int i = 3; i < 4; i++) {
8219  TH1F *HFpositivedirectionDigiD4 = (TH1F *)h2CeffHFpositivedirectionDigiD4->Clone("twod1");
8220 
8221  float ccctest = 0; // to avoid empty massive elements
8222  for (int jphi = 0; jphi < nphi; jphi++) {
8223  double ccc1 = digivarianceHF[i][jeta][jphi];
8224  if (adigiHF[i][jeta][jphi] > 0.) {
8225  HFpositivedirectionDigiD4->Fill(jphi, ccc1);
8226  ccctest = 1.; //HFpositivedirectionDigiD4->SetBinError(i,0.01);
8227  }
8228  } // for jphi
8229  if (ccctest > 0.) {
8230  //cout<<"1717 kcountHFpositivedirectionDigiD4 = "<<kcountHFpositivedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
8231  c3x5->cd(kcountHFpositivedirectionDigiD4);
8232  HFpositivedirectionDigiD4->SetMarkerStyle(20);
8233  HFpositivedirectionDigiD4->SetMarkerSize(0.4);
8234  HFpositivedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
8235  HFpositivedirectionDigiD4->SetXTitle("HFpositivedirectionDigiD4 \b");
8236  HFpositivedirectionDigiD4->SetMarkerColor(2);
8237  HFpositivedirectionDigiD4->SetLineColor(0);
8238  gPad->SetGridy();
8239  gPad->SetGridx();
8240  // gPad->SetLogy();
8241  if (kcountHFpositivedirectionDigiD4 == 1)
8242  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 28; depth = 4 \b");
8243  if (kcountHFpositivedirectionDigiD4 == 2)
8244  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 29; depth = 4 \b");
8245  if (kcountHFpositivedirectionDigiD4 == 3)
8246  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 30; depth = 4 \b");
8247  if (kcountHFpositivedirectionDigiD4 == 4)
8248  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 31; depth = 4 \b");
8249  if (kcountHFpositivedirectionDigiD4 == 5)
8250  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 32; depth = 4 \b");
8251  if (kcountHFpositivedirectionDigiD4 == 6)
8252  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 33; depth = 4 \b");
8253  if (kcountHFpositivedirectionDigiD4 == 7)
8254  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 34; depth = 4 \b");
8255  if (kcountHFpositivedirectionDigiD4 == 8)
8256  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 35; depth = 4 \b");
8257  if (kcountHFpositivedirectionDigiD4 == 9)
8258  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 36; depth = 4 \b");
8259  if (kcountHFpositivedirectionDigiD4 == 10)
8260  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 37; depth = 4 \b");
8261  if (kcountHFpositivedirectionDigiD4 == 11)
8262  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 38; depth = 4 \b");
8263  if (kcountHFpositivedirectionDigiD4 == 12)
8264  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 39; depth = 4 \b");
8265  if (kcountHFpositivedirectionDigiD4 == 13)
8266  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 40; depth = 4 \b");
8267  HFpositivedirectionDigiD4->Draw("Error");
8268  kcountHFpositivedirectionDigiD4++;
8269  if (kcountHFpositivedirectionDigiD4 > 13)
8270  break; // 4x6 = 24
8271  } //ccctest>0
8272 
8273  } // for i
8274  } //if(jeta-41 >= 0)
8275  } //for jeta
8277  c3x5->Update();
8278  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png");
8279  c3x5->Clear();
8280  // clean-up
8281  if (h2CeffHFpositivedirectionDigiD4)
8282  delete h2CeffHFpositivedirectionDigiD4;
8283 
8284  //========================================================================================== 22222214
8285  //======================================================================
8286  //======================================================================1D plot: D vs phi , different eta, depth=1
8287  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
8288  c3x5->Clear();
8290  c3x5->Divide(3, 5);
8291  c3x5->cd(1);
8292  int kcountHFnegativedirectionDigiD1 = 1;
8293  TH1F *h2CeffHFnegativedirectionDigiD1 = new TH1F("h2CeffHFnegativedirectionDigiD1", "", nphi, 0., 72.);
8294 
8295  for (int jeta = 0; jeta < njeta; jeta++) {
8296  // negativedirectionDigiD:
8297  if (jeta - 41 < 0) {
8298  // for (int i=0;i<ndepth;i++) {
8299  // depth=1
8300  for (int i = 0; i < 1; i++) {
8301  TH1F *HFnegativedirectionDigiD1 = (TH1F *)h2CeffHFnegativedirectionDigiD1->Clone("twod1");
8302 
8303  float ccctest = 0; // to avoid empty massive elements
8304  for (int jphi = 0; jphi < nphi; jphi++) {
8305  double ccc1 = digivarianceHF[i][jeta][jphi];
8306  if (adigiHF[i][jeta][jphi] > 0.) {
8307  HFnegativedirectionDigiD1->Fill(jphi, ccc1);
8308  ccctest = 1.; //HFnegativedirectionDigiD1->SetBinError(i,0.01);
8309  }
8310  } // for jphi
8311  if (ccctest > 0.) {
8312  //cout<<"1414 kcountHFnegativedirectionDigiD1 = "<<kcountHFnegativedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
8313  c3x5->cd(kcountHFnegativedirectionDigiD1);
8314  HFnegativedirectionDigiD1->SetMarkerStyle(20);
8315  HFnegativedirectionDigiD1->SetMarkerSize(0.4);
8316  HFnegativedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
8317  HFnegativedirectionDigiD1->SetXTitle("HFnegativedirectionDigiD1 \b");
8318  HFnegativedirectionDigiD1->SetMarkerColor(2);
8319  HFnegativedirectionDigiD1->SetLineColor(0);
8320  gPad->SetGridy();
8321  gPad->SetGridx();
8322  // gPad->SetLogy();
8323  if (kcountHFnegativedirectionDigiD1 == 1)
8324  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
8325  if (kcountHFnegativedirectionDigiD1 == 2)
8326  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
8327  if (kcountHFnegativedirectionDigiD1 == 3)
8328  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
8329  if (kcountHFnegativedirectionDigiD1 == 4)
8330  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
8331  if (kcountHFnegativedirectionDigiD1 == 5)
8332  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
8333  if (kcountHFnegativedirectionDigiD1 == 6)
8334  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
8335  if (kcountHFnegativedirectionDigiD1 == 7)
8336  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
8337  if (kcountHFnegativedirectionDigiD1 == 8)
8338  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
8339  if (kcountHFnegativedirectionDigiD1 == 9)
8340  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
8341  if (kcountHFnegativedirectionDigiD1 == 10)
8342  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
8343  if (kcountHFnegativedirectionDigiD1 == 11)
8344  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
8345  if (kcountHFnegativedirectionDigiD1 == 12)
8346  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
8347  if (kcountHFnegativedirectionDigiD1 == 13)
8348  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
8349  HFnegativedirectionDigiD1->Draw("Error");
8350  kcountHFnegativedirectionDigiD1++;
8351  if (kcountHFnegativedirectionDigiD1 > 13)
8352  break; // 4x6 = 24
8353  } //ccctest>0
8354 
8355  } // for i
8356  } //if(jeta-41< 0)
8357  } //for jeta
8359  c3x5->Update();
8360  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
8361  c3x5->Clear();
8362  // clean-up
8363  if (h2CeffHFnegativedirectionDigiD1)
8364  delete h2CeffHFnegativedirectionDigiD1;
8365  //========================================================================================== 22222215
8366  //======================================================================
8367  //======================================================================1D plot: D vs phi , different eta, depth=2
8368  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
8369  c3x5->Clear();
8370  c3x5->Divide(3, 5);
8371  c3x5->cd(1);
8372  int kcountHFnegativedirectionDigiD2 = 1;
8373  TH1F *h2CeffHFnegativedirectionDigiD2 = new TH1F("h2CeffHFnegativedirectionDigiD2", "", nphi, 0., 72.);
8374 
8375  for (int jeta = 0; jeta < njeta; jeta++) {
8376  // negativedirectionDigiD:
8377  if (jeta - 41 < 0) {
8378  // for (int i=0;i<ndepth;i++) {
8379  // depth=2
8380  for (int i = 1; i < 2; i++) {
8381  TH1F *HFnegativedirectionDigiD2 = (TH1F *)h2CeffHFnegativedirectionDigiD2->Clone("twod1");
8382 
8383  float ccctest = 0; // to avoid empty massive elements
8384  for (int jphi = 0; jphi < nphi; jphi++) {
8385  double ccc1 = digivarianceHF[i][jeta][jphi];
8386  if (adigiHF[i][jeta][jphi] > 0.) {
8387  HFnegativedirectionDigiD2->Fill(jphi, ccc1);
8388  ccctest = 1.; //HFnegativedirectionDigiD2->SetBinError(i,0.01);
8389  }
8390  } // for jphi
8391  if (ccctest > 0.) {
8392  //cout<<"1515 kcountHFnegativedirectionDigiD2 = "<<kcountHFnegativedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
8393  c3x5->cd(kcountHFnegativedirectionDigiD2);
8394  HFnegativedirectionDigiD2->SetMarkerStyle(20);
8395  HFnegativedirectionDigiD2->SetMarkerSize(0.4);
8396  HFnegativedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
8397  HFnegativedirectionDigiD2->SetXTitle("HFnegativedirectionDigiD2 \b");
8398  HFnegativedirectionDigiD2->SetMarkerColor(2);
8399  HFnegativedirectionDigiD2->SetLineColor(0);
8400  gPad->SetGridy();
8401  gPad->SetGridx();
8402  // gPad->SetLogy();
8403  if (kcountHFnegativedirectionDigiD2 == 1)
8404  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
8405  if (kcountHFnegativedirectionDigiD2 == 2)
8406  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
8407  if (kcountHFnegativedirectionDigiD2 == 3)
8408  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
8409  if (kcountHFnegativedirectionDigiD2 == 4)
8410  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
8411  if (kcountHFnegativedirectionDigiD2 == 5)
8412  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
8413  if (kcountHFnegativedirectionDigiD2 == 6)
8414  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
8415  if (kcountHFnegativedirectionDigiD2 == 7)
8416  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
8417  if (kcountHFnegativedirectionDigiD2 == 8)
8418  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
8419  if (kcountHFnegativedirectionDigiD2 == 9)
8420  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
8421  if (kcountHFnegativedirectionDigiD2 == 10)
8422  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
8423  if (kcountHFnegativedirectionDigiD2 == 11)
8424  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
8425  if (kcountHFnegativedirectionDigiD2 == 12)
8426  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
8427  if (kcountHFnegativedirectionDigiD2 == 13)
8428  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
8429  HFnegativedirectionDigiD2->Draw("Error");
8430  kcountHFnegativedirectionDigiD2++;
8431  if (kcountHFnegativedirectionDigiD2 > 13)
8432  break; // 4x6 = 24
8433  } //ccctest>0
8434 
8435  } // for i
8436  } //if(jeta-41< 0)
8437  } //for jeta
8439  c3x5->Update();
8440  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
8441  c3x5->Clear();
8442  // clean-up
8443  if (h2CeffHFnegativedirectionDigiD2)
8444  delete h2CeffHFnegativedirectionDigiD2;
8445  //========================================================================================== 22222216
8446  //======================================================================
8447  //======================================================================1D plot: D vs phi , different eta, depth=3
8448  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
8449  c3x5->Clear();
8450  c3x5->Divide(3, 5);
8451  c3x5->cd(1);
8452  int kcountHFnegativedirectionDigiD3 = 1;
8453  TH1F *h2CeffHFnegativedirectionDigiD3 = new TH1F("h2CeffHFnegativedirectionDigiD3", "", nphi, 0., 72.);
8454 
8455  for (int jeta = 0; jeta < njeta; jeta++) {
8456  // negativedirectionDigiD:
8457  if (jeta - 41 < 0) {
8458  // for (int i=0;i<ndepth;i++) {
8459  // depth=3
8460  for (int i = 2; i < 3; i++) {
8461  TH1F *HFnegativedirectionDigiD3 = (TH1F *)h2CeffHFnegativedirectionDigiD3->Clone("twod1");
8462 
8463  float ccctest = 0; // to avoid empty massive elements
8464  for (int jphi = 0; jphi < nphi; jphi++) {
8465  double ccc1 = digivarianceHF[i][jeta][jphi];
8466  if (adigiHF[i][jeta][jphi] > 0.) {
8467  HFnegativedirectionDigiD3->Fill(jphi, ccc1);
8468  ccctest = 1.; //HFnegativedirectionDigiD3->SetBinError(i,0.01);
8469  }
8470  } // for jphi
8471  if (ccctest > 0.) {
8472  //cout<<"1616 kcountHFnegativedirectionDigiD3 = "<<kcountHFnegativedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
8473  c3x5->cd(kcountHFnegativedirectionDigiD3);
8474  HFnegativedirectionDigiD3->SetMarkerStyle(20);
8475  HFnegativedirectionDigiD3->SetMarkerSize(0.4);
8476  HFnegativedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
8477  HFnegativedirectionDigiD3->SetXTitle("HFnegativedirectionDigiD3 \b");
8478  HFnegativedirectionDigiD3->SetMarkerColor(2);
8479  HFnegativedirectionDigiD3->SetLineColor(0);
8480  gPad->SetGridy();
8481  gPad->SetGridx();
8482  // gPad->SetLogy();
8483  if (kcountHFnegativedirectionDigiD3 == 1)
8484  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-41; depth = 3 \b");
8485  if (kcountHFnegativedirectionDigiD3 == 2)
8486  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-40; depth = 3 \b");
8487  if (kcountHFnegativedirectionDigiD3 == 3)
8488  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-39; depth = 3 \b");
8489  if (kcountHFnegativedirectionDigiD3 == 4)
8490  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-38; depth = 3 \b");
8491  if (kcountHFnegativedirectionDigiD3 == 5)
8492  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-37; depth = 3 \b");
8493  if (kcountHFnegativedirectionDigiD3 == 6)
8494  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-36; depth = 3 \b");
8495  if (kcountHFnegativedirectionDigiD3 == 7)
8496  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-35; depth = 3 \b");
8497  if (kcountHFnegativedirectionDigiD3 == 8)
8498  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-34; depth = 3 \b");
8499  if (kcountHFnegativedirectionDigiD3 == 9)
8500  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-33; depth = 3 \b");
8501  if (kcountHFnegativedirectionDigiD3 == 10)
8502  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-32; depth = 3 \b");
8503  if (kcountHFnegativedirectionDigiD3 == 11)
8504  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-31; depth = 3 \b");
8505  if (kcountHFnegativedirectionDigiD3 == 12)
8506  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-30; depth = 3 \b");
8507  if (kcountHFnegativedirectionDigiD3 == 13)
8508  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-29; depth = 3 \b");
8509  HFnegativedirectionDigiD3->Draw("Error");
8510  kcountHFnegativedirectionDigiD3++;
8511  if (kcountHFnegativedirectionDigiD3 > 13)
8512  break; // 4x6 = 24
8513  } //ccctest>0
8514 
8515  } // for i
8516  } //if(jeta-41< 0)
8517  } //for jeta
8519  c3x5->Update();
8520  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png");
8521  c3x5->Clear();
8522  // clean-up
8523  if (h2CeffHFnegativedirectionDigiD3)
8524  delete h2CeffHFnegativedirectionDigiD3;
8525  //========================================================================================== 22222217
8526  //======================================================================
8527  //======================================================================1D plot: D vs phi , different eta, depth=4
8528  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
8529  c3x5->Clear();
8530  c3x5->Divide(3, 5);
8531  c3x5->cd(1);
8532  int kcountHFnegativedirectionDigiD4 = 1;
8533  TH1F *h2CeffHFnegativedirectionDigiD4 = new TH1F("h2CeffHFnegativedirectionDigiD4", "", nphi, 0., 72.);
8534 
8535  for (int jeta = 0; jeta < njeta; jeta++) {
8536  // negativedirectionDigiD:
8537  if (jeta - 41 < 0) {
8538  // for (int i=0;i<ndepth;i++) {
8539  // depth=4
8540  for (int i = 3; i < 4; i++) {
8541  TH1F *HFnegativedirectionDigiD4 = (TH1F *)h2CeffHFnegativedirectionDigiD4->Clone("twod1");
8542 
8543  float ccctest = 0; // to avoid empty massive elements
8544  for (int jphi = 0; jphi < nphi; jphi++) {
8545  double ccc1 = digivarianceHF[i][jeta][jphi];
8546  if (adigiHF[i][jeta][jphi] > 0.) {
8547  HFnegativedirectionDigiD4->Fill(jphi, ccc1);
8548  ccctest = 1.; //HFnegativedirectionDigiD4->SetBinError(i,0.01);
8549  }
8550  } // for jphi
8551  if (ccctest > 0.) {
8552  //cout<<"1717 kcountHFnegativedirectionDigiD4 = "<<kcountHFnegativedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
8553  c3x5->cd(kcountHFnegativedirectionDigiD4);
8554  HFnegativedirectionDigiD4->SetMarkerStyle(20);
8555  HFnegativedirectionDigiD4->SetMarkerSize(0.4);
8556  HFnegativedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
8557  HFnegativedirectionDigiD4->SetXTitle("HFnegativedirectionDigiD4 \b");
8558  HFnegativedirectionDigiD4->SetMarkerColor(2);
8559  HFnegativedirectionDigiD4->SetLineColor(0);
8560  gPad->SetGridy();
8561  gPad->SetGridx();
8562  // gPad->SetLogy();
8563  if (kcountHFnegativedirectionDigiD4 == 1)
8564  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-41; depth = 4 \b");
8565  if (kcountHFnegativedirectionDigiD4 == 2)
8566  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-40; depth = 4 \b");
8567  if (kcountHFnegativedirectionDigiD4 == 3)
8568  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-39; depth = 4 \b");
8569  if (kcountHFnegativedirectionDigiD4 == 4)
8570  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-38; depth = 4 \b");
8571  if (kcountHFnegativedirectionDigiD4 == 5)
8572  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-37; depth = 4 \b");
8573  if (kcountHFnegativedirectionDigiD4 == 6)
8574  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-36; depth = 4 \b");
8575  if (kcountHFnegativedirectionDigiD4 == 7)
8576  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-35; depth = 4 \b");
8577  if (kcountHFnegativedirectionDigiD4 == 8)
8578  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-34; depth = 4 \b");
8579  if (kcountHFnegativedirectionDigiD4 == 9)
8580  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-33; depth = 4 \b");
8581  if (kcountHFnegativedirectionDigiD4 == 10)
8582  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-32; depth = 4 \b");
8583  if (kcountHFnegativedirectionDigiD4 == 11)
8584  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-31; depth = 4 \b");
8585  if (kcountHFnegativedirectionDigiD4 == 12)
8586  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-30; depth = 4 \b");
8587  if (kcountHFnegativedirectionDigiD4 == 13)
8588  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-29; depth = 4 \b");
8589  HFnegativedirectionDigiD4->Draw("Error");
8590  kcountHFnegativedirectionDigiD4++;
8591  if (kcountHFnegativedirectionDigiD4 > 13)
8592  break; // 4x6 = 24
8593  } //ccctest>0
8594 
8595  } // for i
8596  } //if(jeta-41< 0)
8597  } //for jeta
8599  c3x5->Update();
8600  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png");
8601  c3x5->Clear();
8602  // clean-up
8603  if (h2CeffHFnegativedirectionDigiD4)
8604  delete h2CeffHFnegativedirectionDigiD4;
8605 
8606  //===================================================================== END of Digi HF for phi-symmetry
8607  //===================================================================== END of Digi HF for phi-symmetry
8608  //===================================================================== END of Digi HF for phi-symmetry
8609 
8610  //============================================================================================================ END of Digi for phi-symmetry
8611  //============================================================================================================ END of Digi for phi-symmetry
8612  //============================================================================================================ END of Digi for phi-symmetry
8613 
8614  //============================================================================================================ END of Digi for phi-symmetry
8615  //============================================================================================================ END of Digi for phi-symmetry
8616  //============================================================================================================ END of Digi for phi-symmetry
8617  //============================================================================================================ END of Digi for phi-symmetry
8618  //============================================================================================================ END of Digi for phi-symmetry
8619  //============================================================================================================ END of Digi for phi-symmetry
8620  //============================================================================================================ END of Digi for phi-symmetry
8621  //============================================================================================================ END of Digi for phi-symmetry
8622  //============================================================================================================ END of Digi for phi-symmetry
8623 
8624  // END of Digi Digi Digi Digi Digi ENDDigi Digi Digi Digi Digi ENDDigi Digi Digi Digi ENDDigi Digi Digi Digi Digi Digi Digi ENDDigi Digi Digi Digi Digi Digi Digi Digi Digi Digi ENDDigi END
8625 
8629 
8633  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
8634  //ndepth = k_max[5];
8635  ndepth = 4;
8636  double arecosignalHB[ndepth][njeta][njphi];
8637  double recosignalvarianceHB[ndepth][njeta][njphi];
8638  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HB recSignalEnergy
8639  TH2F *recSignalEnergy1HB1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HB1");
8640  TH2F *recSignalEnergy0HB1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HB1");
8641  TH2F *recSignalEnergyHB1 = (TH2F *)recSignalEnergy1HB1->Clone("recSignalEnergyHB1");
8642  recSignalEnergyHB1->Divide(recSignalEnergy1HB1, recSignalEnergy0HB1, 1, 1, "B");
8643  TH2F *recSignalEnergy1HB2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HB2");
8644  TH2F *recSignalEnergy0HB2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HB2");
8645  TH2F *recSignalEnergyHB2 = (TH2F *)recSignalEnergy1HB2->Clone("recSignalEnergyHB2");
8646  recSignalEnergyHB2->Divide(recSignalEnergy1HB2, recSignalEnergy0HB2, 1, 1, "B");
8647  TH2F *recSignalEnergy1HB3 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HB3");
8648  TH2F *recSignalEnergy0HB3 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HB3");
8649  TH2F *recSignalEnergyHB3 = (TH2F *)recSignalEnergy1HB3->Clone("recSignalEnergyHB3");
8650  recSignalEnergyHB3->Divide(recSignalEnergy1HB3, recSignalEnergy0HB3, 1, 1, "B");
8651  TH2F *recSignalEnergy1HB4 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HB4");
8652  TH2F *recSignalEnergy0HB4 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HB4");
8653  TH2F *recSignalEnergyHB4 = (TH2F *)recSignalEnergy1HB4->Clone("recSignalEnergyHB4");
8654  recSignalEnergyHB4->Divide(recSignalEnergy1HB4, recSignalEnergy0HB4, 1, 1, "B");
8655  for (int jeta = 0; jeta < njeta; jeta++) {
8656  //====================================================================== PHI normalization & put R into massive arecosignalHB
8657  //preparation for PHI normalization:
8658  double sumrecosignalHB0 = 0;
8659  int nsumrecosignalHB0 = 0;
8660  double sumrecosignalHB1 = 0;
8661  int nsumrecosignalHB1 = 0;
8662  double sumrecosignalHB2 = 0;
8663  int nsumrecosignalHB2 = 0;
8664  double sumrecosignalHB3 = 0;
8665  int nsumrecosignalHB3 = 0;
8666  for (int jphi = 0; jphi < njphi; jphi++) {
8667  arecosignalHB[0][jeta][jphi] = recSignalEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
8668  arecosignalHB[1][jeta][jphi] = recSignalEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
8669  arecosignalHB[2][jeta][jphi] = recSignalEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
8670  arecosignalHB[3][jeta][jphi] = recSignalEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
8671  if (arecosignalHB[0][jeta][jphi] > 0.) {
8672  sumrecosignalHB0 += arecosignalHB[0][jeta][jphi];
8673  ++nsumrecosignalHB0;
8674  }
8675  if (arecosignalHB[1][jeta][jphi] > 0.) {
8676  sumrecosignalHB1 += arecosignalHB[1][jeta][jphi];
8677  ++nsumrecosignalHB1;
8678  }
8679  if (arecosignalHB[2][jeta][jphi] > 0.) {
8680  sumrecosignalHB2 += arecosignalHB[2][jeta][jphi];
8681  ++nsumrecosignalHB2;
8682  }
8683  if (arecosignalHB[3][jeta][jphi] > 0.) {
8684  sumrecosignalHB3 += arecosignalHB[3][jeta][jphi];
8685  ++nsumrecosignalHB3;
8686  }
8687  } // phi
8688  // PHI normalization:
8689  for (int jphi = 0; jphi < njphi; jphi++) {
8690  if (arecosignalHB[0][jeta][jphi] > 0.)
8691  arecosignalHB[0][jeta][jphi] /= (sumrecosignalHB0 / nsumrecosignalHB0);
8692  if (arecosignalHB[1][jeta][jphi] > 0.)
8693  arecosignalHB[1][jeta][jphi] /= (sumrecosignalHB1 / nsumrecosignalHB1);
8694  if (arecosignalHB[2][jeta][jphi] > 0.)
8695  arecosignalHB[2][jeta][jphi] /= (sumrecosignalHB2 / nsumrecosignalHB2);
8696  if (arecosignalHB[3][jeta][jphi] > 0.)
8697  arecosignalHB[3][jeta][jphi] /= (sumrecosignalHB3 / nsumrecosignalHB3);
8698  } // phi
8699  } //eta
8700  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
8701  //======================================================================
8702  //======================================================================
8703  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
8704  c2x1->Clear();
8706  c2x1->Divide(2, 1);
8707  c2x1->cd(1);
8708  TH2F *GefzRrecosignalHB42D = new TH2F("GefzRrecosignalHB42D", "", neta, -41., 41., nphi, 0., 72.);
8709  TH2F *GefzRrecosignalHB42D0 = new TH2F("GefzRrecosignalHB42D0", "", neta, -41., 41., nphi, 0., 72.);
8710  TH2F *GefzRrecosignalHB42DF = (TH2F *)GefzRrecosignalHB42D0->Clone("GefzRrecosignalHB42DF");
8711  for (int i = 0; i < ndepth; i++) {
8712  for (int jeta = 0; jeta < neta; jeta++) {
8713  for (int jphi = 0; jphi < nphi; jphi++) {
8714  double ccc1 = arecosignalHB[i][jeta][jphi];
8715  int k2plot = jeta - 41;
8716  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
8717  if (ccc1 != 0.) {
8718  GefzRrecosignalHB42D->Fill(kkk, jphi, ccc1);
8719  GefzRrecosignalHB42D0->Fill(kkk, jphi, 1.);
8720  }
8721  }
8722  }
8723  }
8724  GefzRrecosignalHB42DF->Divide(GefzRrecosignalHB42D, GefzRrecosignalHB42D0, 1, 1, "B"); // average A
8725  gPad->SetGridy();
8726  gPad->SetGridx(); // gPad->SetLogz();
8727  GefzRrecosignalHB42DF->SetXTitle("<R>_depth #eta \b");
8728  GefzRrecosignalHB42DF->SetYTitle(" #phi \b");
8729  GefzRrecosignalHB42DF->Draw("COLZ");
8730 
8731  c2x1->cd(2);
8732  TH1F *energyhitSignal_HB = (TH1F *)dir->FindObjectAny("h_energyhitSignal_HB");
8733  energyhitSignal_HB->SetMarkerStyle(20);
8734  energyhitSignal_HB->SetMarkerSize(0.4);
8735  energyhitSignal_HB->GetYaxis()->SetLabelSize(0.04);
8736  energyhitSignal_HB->SetXTitle("energyhitSignal_HB \b");
8737  energyhitSignal_HB->SetMarkerColor(2);
8738  energyhitSignal_HB->SetLineColor(0);
8739  gPad->SetGridy();
8740  gPad->SetGridx();
8741  energyhitSignal_HB->Draw("Error");
8742 
8744  c2x1->Update();
8745  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHB.png");
8746  c2x1->Clear();
8747  // clean-up
8748  if (GefzRrecosignalHB42D)
8749  delete GefzRrecosignalHB42D;
8750  if (GefzRrecosignalHB42D0)
8751  delete GefzRrecosignalHB42D0;
8752  if (GefzRrecosignalHB42DF)
8753  delete GefzRrecosignalHB42DF;
8754  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
8755  //======================================================================
8756  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
8757  c1x1->Clear();
8759  c1x1->Divide(1, 1);
8760  c1x1->cd(1);
8761  TH1F *GefzRrecosignalHB41D = new TH1F("GefzRrecosignalHB41D", "", nphi, 0., 72.);
8762  TH1F *GefzRrecosignalHB41D0 = new TH1F("GefzRrecosignalHB41D0", "", nphi, 0., 72.);
8763  TH1F *GefzRrecosignalHB41DF = (TH1F *)GefzRrecosignalHB41D0->Clone("GefzRrecosignalHB41DF");
8764  for (int jphi = 0; jphi < nphi; jphi++) {
8765  for (int jeta = 0; jeta < neta; jeta++) {
8766  for (int i = 0; i < ndepth; i++) {
8767  double ccc1 = arecosignalHB[i][jeta][jphi];
8768  if (ccc1 != 0.) {
8769  GefzRrecosignalHB41D->Fill(jphi, ccc1);
8770  GefzRrecosignalHB41D0->Fill(jphi, 1.);
8771  }
8772  }
8773  }
8774  }
8775  GefzRrecosignalHB41DF->Divide(
8776  GefzRrecosignalHB41D, GefzRrecosignalHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
8777  GefzRrecosignalHB41D0->Sumw2();
8778  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHB41DF->SetBinError(jphi,0.01);}
8779  gPad->SetGridy();
8780  gPad->SetGridx(); // gPad->SetLogz();
8781  GefzRrecosignalHB41DF->SetMarkerStyle(20);
8782  GefzRrecosignalHB41DF->SetMarkerSize(1.4);
8783  GefzRrecosignalHB41DF->GetZaxis()->SetLabelSize(0.08);
8784  GefzRrecosignalHB41DF->SetXTitle("#phi \b");
8785  GefzRrecosignalHB41DF->SetYTitle(" <R> \b");
8786  GefzRrecosignalHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
8787  GefzRrecosignalHB41DF->SetMarkerColor(4);
8788  GefzRrecosignalHB41DF->SetLineColor(
8789  4); // GefzRrecosignalHB41DF->SetMinimum(0.8); // GefzRrecosignalHB41DF->SetMaximum(1.000);
8790  GefzRrecosignalHB41DF->Draw("Error");
8792  c1x1->Update();
8793  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHB.png");
8794  c1x1->Clear();
8795  // clean-up
8796  if (GefzRrecosignalHB41D)
8797  delete GefzRrecosignalHB41D;
8798  if (GefzRrecosignalHB41D0)
8799  delete GefzRrecosignalHB41D0;
8800  if (GefzRrecosignalHB41DF)
8801  delete GefzRrecosignalHB41DF;
8802  //========================================================================================== 4
8803  //======================================================================
8804  //======================================================================1D plot: R vs phi , different eta, depth=1
8805  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
8806  c3x5->Clear();
8808  c3x5->Divide(4, 4);
8809  c3x5->cd(1);
8810  int kcountHBpositivedirectionRecosignal1 = 1;
8811  TH1F *h2CeffHBpositivedirectionRecosignal1 = new TH1F("h2CeffHBpositivedirectionRecosignal1", "", nphi, 0., 72.);
8812  for (int jeta = 0; jeta < njeta; jeta++) {
8813  // positivedirectionRecosignal:
8814  if (jeta - 41 >= 0) {
8815  // for (int i=0;i<ndepth;i++) {
8816  // depth=1
8817  for (int i = 0; i < 1; i++) {
8818  TH1F *HBpositivedirectionRecosignal1 = (TH1F *)h2CeffHBpositivedirectionRecosignal1->Clone("twod1");
8819  float ccctest = 0; // to avoid empty massive elements
8820  for (int jphi = 0; jphi < nphi; jphi++) {
8821  double ccc1 = arecosignalHB[i][jeta][jphi];
8822  if (ccc1 != 0.) {
8823  HBpositivedirectionRecosignal1->Fill(jphi, ccc1);
8824  ccctest = 1.; //HBpositivedirectionRecosignal1->SetBinError(i,0.01);
8825  }
8826  } // for jphi
8827  if (ccctest > 0.) {
8828  // cout<<"444 kcountHBpositivedirectionRecosignal1 = "<<kcountHBpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
8829  c3x5->cd(kcountHBpositivedirectionRecosignal1);
8830  HBpositivedirectionRecosignal1->SetMarkerStyle(20);
8831  HBpositivedirectionRecosignal1->SetMarkerSize(0.4);
8832  HBpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
8833  HBpositivedirectionRecosignal1->SetXTitle("HBpositivedirectionRecosignal1 \b");
8834  HBpositivedirectionRecosignal1->SetMarkerColor(2);
8835  HBpositivedirectionRecosignal1->SetLineColor(0);
8836  gPad->SetGridy();
8837  gPad->SetGridx();
8838  // gPad->SetLogy();
8839  if (kcountHBpositivedirectionRecosignal1 == 1)
8840  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
8841  if (kcountHBpositivedirectionRecosignal1 == 2)
8842  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
8843  if (kcountHBpositivedirectionRecosignal1 == 3)
8844  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
8845  if (kcountHBpositivedirectionRecosignal1 == 4)
8846  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
8847  if (kcountHBpositivedirectionRecosignal1 == 5)
8848  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
8849  if (kcountHBpositivedirectionRecosignal1 == 6)
8850  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
8851  if (kcountHBpositivedirectionRecosignal1 == 7)
8852  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
8853  if (kcountHBpositivedirectionRecosignal1 == 8)
8854  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
8855  if (kcountHBpositivedirectionRecosignal1 == 9)
8856  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
8857  if (kcountHBpositivedirectionRecosignal1 == 10)
8858  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
8859  if (kcountHBpositivedirectionRecosignal1 == 11)
8860  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
8861  if (kcountHBpositivedirectionRecosignal1 == 12)
8862  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
8863  if (kcountHBpositivedirectionRecosignal1 == 13)
8864  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
8865  if (kcountHBpositivedirectionRecosignal1 == 14)
8866  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
8867  if (kcountHBpositivedirectionRecosignal1 == 15)
8868  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
8869  if (kcountHBpositivedirectionRecosignal1 == 16)
8870  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
8871  HBpositivedirectionRecosignal1->Draw("Error");
8872  kcountHBpositivedirectionRecosignal1++;
8873  if (kcountHBpositivedirectionRecosignal1 > 16)
8874  break; //
8875  } //ccctest>0
8876 
8877  } // for i
8878  } //if(jeta-41 >= 0)
8879  } //for jeta
8881  c3x5->Update();
8882  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
8883  c3x5->Clear();
8884  // clean-up
8885  if (h2CeffHBpositivedirectionRecosignal1)
8886  delete h2CeffHBpositivedirectionRecosignal1;
8887 
8888  //========================================================================================== 5
8889  //======================================================================
8890  //======================================================================1D plot: R vs phi , different eta, depth=2
8891  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
8892  c3x5->Clear();
8894  c3x5->Divide(4, 4);
8895  c3x5->cd(1);
8896  int kcountHBpositivedirectionRecosignal2 = 1;
8897  TH1F *h2CeffHBpositivedirectionRecosignal2 = new TH1F("h2CeffHBpositivedirectionRecosignal2", "", nphi, 0., 72.);
8898  for (int jeta = 0; jeta < njeta; jeta++) {
8899  // positivedirectionRecosignal:
8900  if (jeta - 41 >= 0) {
8901  // for (int i=0;i<ndepth;i++) {
8902  // depth=2
8903  for (int i = 1; i < 2; i++) {
8904  TH1F *HBpositivedirectionRecosignal2 = (TH1F *)h2CeffHBpositivedirectionRecosignal2->Clone("twod1");
8905  float ccctest = 0; // to avoid empty massive elements
8906  for (int jphi = 0; jphi < nphi; jphi++) {
8907  double ccc1 = arecosignalHB[i][jeta][jphi];
8908  if (ccc1 != 0.) {
8909  HBpositivedirectionRecosignal2->Fill(jphi, ccc1);
8910  ccctest = 1.; //HBpositivedirectionRecosignal2->SetBinError(i,0.01);
8911  }
8912  } // for jphi
8913  if (ccctest > 0.) {
8914  //cout<<"555 kcountHBpositivedirectionRecosignal2 = "<<kcountHBpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
8915  c3x5->cd(kcountHBpositivedirectionRecosignal2);
8916  HBpositivedirectionRecosignal2->SetMarkerStyle(20);
8917  HBpositivedirectionRecosignal2->SetMarkerSize(0.4);
8918  HBpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
8919  HBpositivedirectionRecosignal2->SetXTitle("HBpositivedirectionRecosignal2 \b");
8920  HBpositivedirectionRecosignal2->SetMarkerColor(2);
8921  HBpositivedirectionRecosignal2->SetLineColor(0);
8922  gPad->SetGridy();
8923  gPad->SetGridx();
8924  // gPad->SetLogy();
8925  if (kcountHBpositivedirectionRecosignal2 == 1)
8926  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
8927  if (kcountHBpositivedirectionRecosignal2 == 2)
8928  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
8929  if (kcountHBpositivedirectionRecosignal2 == 3)
8930  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
8931  if (kcountHBpositivedirectionRecosignal2 == 4)
8932  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
8933  if (kcountHBpositivedirectionRecosignal2 == 5)
8934  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
8935  if (kcountHBpositivedirectionRecosignal2 == 6)
8936  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
8937  if (kcountHBpositivedirectionRecosignal2 == 7)
8938  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
8939  if (kcountHBpositivedirectionRecosignal2 == 8)
8940  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
8941  if (kcountHBpositivedirectionRecosignal2 == 9)
8942  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
8943  if (kcountHBpositivedirectionRecosignal2 == 10)
8944  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
8945  if (kcountHBpositivedirectionRecosignal2 == 11)
8946  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
8947  if (kcountHBpositivedirectionRecosignal2 == 12)
8948  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
8949  if (kcountHBpositivedirectionRecosignal2 == 13)
8950  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
8951  if (kcountHBpositivedirectionRecosignal2 == 14)
8952  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
8953  if (kcountHBpositivedirectionRecosignal2 == 15)
8954  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
8955  if (kcountHBpositivedirectionRecosignal2 == 16)
8956  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
8957  HBpositivedirectionRecosignal2->Draw("Error");
8958  kcountHBpositivedirectionRecosignal2++;
8959  if (kcountHBpositivedirectionRecosignal2 > 16)
8960  break; // 4x6 = 24
8961  } //ccctest>0
8962 
8963  } // for i
8964  } //if(jeta-41 >= 0)
8965  } //for jeta
8967  c3x5->Update();
8968  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
8969  c3x5->Clear();
8970  // clean-up
8971  if (h2CeffHBpositivedirectionRecosignal2)
8972  delete h2CeffHBpositivedirectionRecosignal2;
8973  //========================================================================================== 6
8974  //======================================================================
8975  //======================================================================1D plot: R vs phi , different eta, depth=3
8976  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
8977  c3x5->Clear();
8979  c3x5->Divide(4, 4);
8980  c3x5->cd(1);
8981  int kcountHBpositivedirectionRecosignal3 = 1;
8982  TH1F *h2CeffHBpositivedirectionRecosignal3 = new TH1F("h2CeffHBpositivedirectionRecosignal3", "", nphi, 0., 72.);
8983  for (int jeta = 0; jeta < njeta; jeta++) {
8984  // positivedirectionRecosignal:
8985  if (jeta - 41 >= 0) {
8986  // for (int i=0;i<ndepth;i++) {
8987  // depth=3
8988  for (int i = 2; i < 3; i++) {
8989  TH1F *HBpositivedirectionRecosignal3 = (TH1F *)h2CeffHBpositivedirectionRecosignal3->Clone("twod1");
8990  float ccctest = 0; // to avoid empty massive elements
8991  for (int jphi = 0; jphi < nphi; jphi++) {
8992  double ccc1 = arecosignalHB[i][jeta][jphi];
8993  if (ccc1 != 0.) {
8994  HBpositivedirectionRecosignal3->Fill(jphi, ccc1);
8995  ccctest = 1.; //HBpositivedirectionRecosignal3->SetBinError(i,0.01);
8996  }
8997  } // for jphi
8998  if (ccctest > 0.) {
8999  //cout<<"666 kcountHBpositivedirectionRecosignal3 = "<<kcountHBpositivedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
9000  c3x5->cd(kcountHBpositivedirectionRecosignal3);
9001  HBpositivedirectionRecosignal3->SetMarkerStyle(20);
9002  HBpositivedirectionRecosignal3->SetMarkerSize(0.4);
9003  HBpositivedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
9004  HBpositivedirectionRecosignal3->SetXTitle("HBpositivedirectionRecosignal3 \b");
9005  HBpositivedirectionRecosignal3->SetMarkerColor(2);
9006  HBpositivedirectionRecosignal3->SetLineColor(0);
9007  gPad->SetGridy();
9008  gPad->SetGridx();
9009  // gPad->SetLogy();
9010  if (kcountHBpositivedirectionRecosignal3 == 1)
9011  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
9012  if (kcountHBpositivedirectionRecosignal3 == 2)
9013  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
9014  if (kcountHBpositivedirectionRecosignal3 == 3)
9015  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
9016  if (kcountHBpositivedirectionRecosignal3 == 4)
9017  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
9018  if (kcountHBpositivedirectionRecosignal3 == 5)
9019  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
9020  if (kcountHBpositivedirectionRecosignal3 == 6)
9021  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
9022  if (kcountHBpositivedirectionRecosignal3 == 7)
9023  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
9024  if (kcountHBpositivedirectionRecosignal3 == 8)
9025  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
9026  if (kcountHBpositivedirectionRecosignal3 == 9)
9027  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
9028  if (kcountHBpositivedirectionRecosignal3 == 10)
9029  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
9030  if (kcountHBpositivedirectionRecosignal3 == 11)
9031  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
9032  if (kcountHBpositivedirectionRecosignal3 == 12)
9033  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
9034  if (kcountHBpositivedirectionRecosignal3 == 13)
9035  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
9036  if (kcountHBpositivedirectionRecosignal3 == 14)
9037  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
9038  if (kcountHBpositivedirectionRecosignal3 == 15)
9039  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
9040  if (kcountHBpositivedirectionRecosignal3 == 16)
9041  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
9042  HBpositivedirectionRecosignal3->Draw("Error");
9043  kcountHBpositivedirectionRecosignal3++;
9044  if (kcountHBpositivedirectionRecosignal3 > 16)
9045  break; // 4x6 = 24
9046  } //ccctest>0
9047 
9048  } // for i
9049  } //if(jeta-41 >= 0)
9050  } //for jeta
9052  c3x5->Update();
9053  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
9054  c3x5->Clear();
9055  // clean-up
9056  if (h2CeffHBpositivedirectionRecosignal3)
9057  delete h2CeffHBpositivedirectionRecosignal3;
9058  //========================================================================================== 7
9059  //======================================================================
9060  //======================================================================1D plot: R vs phi , different eta, depth=4
9061  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
9062  c3x5->Clear();
9064  c3x5->Divide(4, 4);
9065  c3x5->cd(1);
9066  int kcountHBpositivedirectionRecosignal4 = 1;
9067  TH1F *h2CeffHBpositivedirectionRecosignal4 = new TH1F("h2CeffHBpositivedirectionRecosignal4", "", nphi, 0., 72.);
9068 
9069  for (int jeta = 0; jeta < njeta; jeta++) {
9070  // positivedirectionRecosignal:
9071  if (jeta - 41 >= 0) {
9072  // for (int i=0;i<ndepth;i++) {
9073  // depth=4
9074  for (int i = 3; i < 4; i++) {
9075  TH1F *HBpositivedirectionRecosignal4 = (TH1F *)h2CeffHBpositivedirectionRecosignal4->Clone("twod1");
9076 
9077  float ccctest = 0; // to avoid empty massive elements
9078  for (int jphi = 0; jphi < nphi; jphi++) {
9079  double ccc1 = arecosignalHB[i][jeta][jphi];
9080  if (ccc1 != 0.) {
9081  HBpositivedirectionRecosignal4->Fill(jphi, ccc1);
9082  ccctest = 1.; //HBpositivedirectionRecosignal4->SetBinError(i,0.01);
9083  }
9084  } // for jphi
9085  if (ccctest > 0.) {
9086  //cout<<"777 kcountHBpositivedirectionRecosignal4 = "<<kcountHBpositivedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
9087  c3x5->cd(kcountHBpositivedirectionRecosignal4);
9088  HBpositivedirectionRecosignal4->SetMarkerStyle(20);
9089  HBpositivedirectionRecosignal4->SetMarkerSize(0.4);
9090  HBpositivedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
9091  HBpositivedirectionRecosignal4->SetXTitle("HBpositivedirectionRecosignal4 \b");
9092  HBpositivedirectionRecosignal4->SetMarkerColor(2);
9093  HBpositivedirectionRecosignal4->SetLineColor(0);
9094  gPad->SetGridy();
9095  gPad->SetGridx();
9096  // gPad->SetLogy();
9097  if (kcountHBpositivedirectionRecosignal4 == 1)
9098  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
9099  if (kcountHBpositivedirectionRecosignal4 == 2)
9100  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
9101  if (kcountHBpositivedirectionRecosignal4 == 3)
9102  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
9103  if (kcountHBpositivedirectionRecosignal4 == 4)
9104  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
9105  if (kcountHBpositivedirectionRecosignal4 == 5)
9106  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
9107  if (kcountHBpositivedirectionRecosignal4 == 6)
9108  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
9109  if (kcountHBpositivedirectionRecosignal4 == 7)
9110  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
9111  if (kcountHBpositivedirectionRecosignal4 == 8)
9112  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
9113  if (kcountHBpositivedirectionRecosignal4 == 9)
9114  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
9115  if (kcountHBpositivedirectionRecosignal4 == 10)
9116  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
9117  if (kcountHBpositivedirectionRecosignal4 == 11)
9118  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
9119  if (kcountHBpositivedirectionRecosignal4 == 12)
9120  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
9121  if (kcountHBpositivedirectionRecosignal4 == 13)
9122  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
9123  if (kcountHBpositivedirectionRecosignal4 == 14)
9124  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
9125  if (kcountHBpositivedirectionRecosignal4 == 15)
9126  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
9127  if (kcountHBpositivedirectionRecosignal4 == 16)
9128  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
9129  HBpositivedirectionRecosignal4->Draw("Error");
9130  kcountHBpositivedirectionRecosignal4++;
9131  if (kcountHBpositivedirectionRecosignal4 > 16)
9132  break; // 4x6 = 24
9133  } //ccctest>0
9134 
9135  } // for i
9136  } //if(jeta-41 >= 0)
9137  } //for jeta
9139  c3x5->Update();
9140  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
9141  c3x5->Clear();
9142  // clean-up
9143  if (h2CeffHBpositivedirectionRecosignal4)
9144  delete h2CeffHBpositivedirectionRecosignal4;
9145 
9146  //========================================================================================== 1114
9147  //======================================================================
9148  //======================================================================1D plot: R vs phi , different eta, depth=1
9149  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
9150  c3x5->Clear();
9152  c3x5->Divide(4, 4);
9153  c3x5->cd(1);
9154  int kcountHBnegativedirectionRecosignal1 = 1;
9155  TH1F *h2CeffHBnegativedirectionRecosignal1 = new TH1F("h2CeffHBnegativedirectionRecosignal1", "", nphi, 0., 72.);
9156  for (int jeta = 0; jeta < njeta; jeta++) {
9157  // negativedirectionRecosignal:
9158  if (jeta - 41 < 0) {
9159  // for (int i=0;i<ndepth;i++) {
9160  // depth=1
9161  for (int i = 0; i < 1; i++) {
9162  TH1F *HBnegativedirectionRecosignal1 = (TH1F *)h2CeffHBnegativedirectionRecosignal1->Clone("twod1");
9163  float ccctest = 0; // to avoid empty massive elements
9164  for (int jphi = 0; jphi < nphi; jphi++) {
9165  double ccc1 = arecosignalHB[i][jeta][jphi];
9166  if (ccc1 != 0.) {
9167  HBnegativedirectionRecosignal1->Fill(jphi, ccc1);
9168  ccctest = 1.; //HBnegativedirectionRecosignal1->SetBinError(i,0.01);
9169  }
9170  } // for jphi
9171  if (ccctest > 0.) {
9172  // cout<<"444 kcountHBnegativedirectionRecosignal1 = "<<kcountHBnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
9173  c3x5->cd(kcountHBnegativedirectionRecosignal1);
9174  HBnegativedirectionRecosignal1->SetMarkerStyle(20);
9175  HBnegativedirectionRecosignal1->SetMarkerSize(0.4);
9176  HBnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
9177  HBnegativedirectionRecosignal1->SetXTitle("HBnegativedirectionRecosignal1 \b");
9178  HBnegativedirectionRecosignal1->SetMarkerColor(2);
9179  HBnegativedirectionRecosignal1->SetLineColor(0);
9180  gPad->SetGridy();
9181  gPad->SetGridx();
9182  // gPad->SetLogy();
9183  if (kcountHBnegativedirectionRecosignal1 == 1)
9184  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
9185  if (kcountHBnegativedirectionRecosignal1 == 2)
9186  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
9187  if (kcountHBnegativedirectionRecosignal1 == 3)
9188  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
9189  if (kcountHBnegativedirectionRecosignal1 == 4)
9190  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
9191  if (kcountHBnegativedirectionRecosignal1 == 5)
9192  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
9193  if (kcountHBnegativedirectionRecosignal1 == 6)
9194  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
9195  if (kcountHBnegativedirectionRecosignal1 == 7)
9196  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
9197  if (kcountHBnegativedirectionRecosignal1 == 8)
9198  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
9199  if (kcountHBnegativedirectionRecosignal1 == 9)
9200  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
9201  if (kcountHBnegativedirectionRecosignal1 == 10)
9202  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
9203  if (kcountHBnegativedirectionRecosignal1 == 11)
9204  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
9205  if (kcountHBnegativedirectionRecosignal1 == 12)
9206  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
9207  if (kcountHBnegativedirectionRecosignal1 == 13)
9208  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
9209  if (kcountHBnegativedirectionRecosignal1 == 14)
9210  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
9211  if (kcountHBnegativedirectionRecosignal1 == 15)
9212  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
9213  if (kcountHBnegativedirectionRecosignal1 == 16)
9214  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
9215  HBnegativedirectionRecosignal1->Draw("Error");
9216  kcountHBnegativedirectionRecosignal1++;
9217  if (kcountHBnegativedirectionRecosignal1 > 16)
9218  break; //
9219  } //ccctest>0
9220 
9221  } // for i
9222  } //if(jeta-41 < 0 )
9223  } //for jeta
9225  c3x5->Update();
9226  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
9227  c3x5->Clear();
9228  // clean-up
9229  if (h2CeffHBnegativedirectionRecosignal1)
9230  delete h2CeffHBnegativedirectionRecosignal1;
9231 
9232  //========================================================================================== 1115
9233  //======================================================================
9234  //======================================================================1D plot: R vs phi , different eta, depth=2
9235  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
9236  c3x5->Clear();
9238  c3x5->Divide(4, 4);
9239  c3x5->cd(1);
9240  int kcountHBnegativedirectionRecosignal2 = 1;
9241  TH1F *h2CeffHBnegativedirectionRecosignal2 = new TH1F("h2CeffHBnegativedirectionRecosignal2", "", nphi, 0., 72.);
9242  for (int jeta = 0; jeta < njeta; jeta++) {
9243  // negativedirectionRecosignal:
9244  if (jeta - 41 < 0) {
9245  // for (int i=0;i<ndepth;i++) {
9246  // depth=2
9247  for (int i = 1; i < 2; i++) {
9248  TH1F *HBnegativedirectionRecosignal2 = (TH1F *)h2CeffHBnegativedirectionRecosignal2->Clone("twod1");
9249  float ccctest = 0; // to avoid empty massive elements
9250  for (int jphi = 0; jphi < nphi; jphi++) {
9251  double ccc1 = arecosignalHB[i][jeta][jphi];
9252  if (ccc1 != 0.) {
9253  HBnegativedirectionRecosignal2->Fill(jphi, ccc1);
9254  ccctest = 1.; //HBnegativedirectionRecosignal2->SetBinError(i,0.01);
9255  }
9256  } // for jphi
9257  if (ccctest > 0.) {
9258  //cout<<"555 kcountHBnegativedirectionRecosignal2 = "<<kcountHBnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
9259  c3x5->cd(kcountHBnegativedirectionRecosignal2);
9260  HBnegativedirectionRecosignal2->SetMarkerStyle(20);
9261  HBnegativedirectionRecosignal2->SetMarkerSize(0.4);
9262  HBnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
9263  HBnegativedirectionRecosignal2->SetXTitle("HBnegativedirectionRecosignal2 \b");
9264  HBnegativedirectionRecosignal2->SetMarkerColor(2);
9265  HBnegativedirectionRecosignal2->SetLineColor(0);
9266  gPad->SetGridy();
9267  gPad->SetGridx();
9268  // gPad->SetLogy();
9269  if (kcountHBnegativedirectionRecosignal2 == 1)
9270  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
9271  if (kcountHBnegativedirectionRecosignal2 == 2)
9272  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
9273  if (kcountHBnegativedirectionRecosignal2 == 3)
9274  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
9275  if (kcountHBnegativedirectionRecosignal2 == 4)
9276  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
9277  if (kcountHBnegativedirectionRecosignal2 == 5)
9278  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
9279  if (kcountHBnegativedirectionRecosignal2 == 6)
9280  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
9281  if (kcountHBnegativedirectionRecosignal2 == 7)
9282  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
9283  if (kcountHBnegativedirectionRecosignal2 == 8)
9284  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
9285  if (kcountHBnegativedirectionRecosignal2 == 9)
9286  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
9287  if (kcountHBnegativedirectionRecosignal2 == 10)
9288  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
9289  if (kcountHBnegativedirectionRecosignal2 == 11)
9290  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
9291  if (kcountHBnegativedirectionRecosignal2 == 12)
9292  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
9293  if (kcountHBnegativedirectionRecosignal2 == 13)
9294  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
9295  if (kcountHBnegativedirectionRecosignal2 == 14)
9296  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
9297  if (kcountHBnegativedirectionRecosignal2 == 15)
9298  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
9299  if (kcountHBnegativedirectionRecosignal2 == 16)
9300  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
9301  HBnegativedirectionRecosignal2->Draw("Error");
9302  kcountHBnegativedirectionRecosignal2++;
9303  if (kcountHBnegativedirectionRecosignal2 > 16)
9304  break; // 4x6 = 24
9305  } //ccctest>0
9306 
9307  } // for i
9308  } //if(jeta-41 < 0 )
9309  } //for jeta
9311  c3x5->Update();
9312  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
9313  c3x5->Clear();
9314  // clean-up
9315  if (h2CeffHBnegativedirectionRecosignal2)
9316  delete h2CeffHBnegativedirectionRecosignal2;
9317  //========================================================================================== 1116
9318  //======================================================================
9319  //======================================================================1D plot: R vs phi , different eta, depth=3
9320  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
9321  c3x5->Clear();
9323  c3x5->Divide(4, 4);
9324  c3x5->cd(1);
9325  int kcountHBnegativedirectionRecosignal3 = 1;
9326  TH1F *h2CeffHBnegativedirectionRecosignal3 = new TH1F("h2CeffHBnegativedirectionRecosignal3", "", nphi, 0., 72.);
9327  for (int jeta = 0; jeta < njeta; jeta++) {
9328  // negativedirectionRecosignal:
9329  if (jeta - 41 < 0) {
9330  // for (int i=0;i<ndepth;i++) {
9331  // depth=3
9332  for (int i = 2; i < 3; i++) {
9333  TH1F *HBnegativedirectionRecosignal3 = (TH1F *)h2CeffHBnegativedirectionRecosignal3->Clone("twod1");
9334  float ccctest = 0; // to avoid empty massive elements
9335  for (int jphi = 0; jphi < nphi; jphi++) {
9336  double ccc1 = arecosignalHB[i][jeta][jphi];
9337  if (ccc1 != 0.) {
9338  HBnegativedirectionRecosignal3->Fill(jphi, ccc1);
9339  ccctest = 1.; //HBnegativedirectionRecosignal3->SetBinError(i,0.01);
9340  }
9341  } // for jphi
9342  if (ccctest > 0.) {
9343  //cout<<"666 kcountHBnegativedirectionRecosignal3 = "<<kcountHBnegativedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
9344  c3x5->cd(kcountHBnegativedirectionRecosignal3);
9345  HBnegativedirectionRecosignal3->SetMarkerStyle(20);
9346  HBnegativedirectionRecosignal3->SetMarkerSize(0.4);
9347  HBnegativedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
9348  HBnegativedirectionRecosignal3->SetXTitle("HBnegativedirectionRecosignal3 \b");
9349  HBnegativedirectionRecosignal3->SetMarkerColor(2);
9350  HBnegativedirectionRecosignal3->SetLineColor(0);
9351  gPad->SetGridy();
9352  gPad->SetGridx();
9353  // gPad->SetLogy();
9354  if (kcountHBnegativedirectionRecosignal3 == 1)
9355  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
9356  if (kcountHBnegativedirectionRecosignal3 == 2)
9357  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
9358  if (kcountHBnegativedirectionRecosignal3 == 3)
9359  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
9360  if (kcountHBnegativedirectionRecosignal3 == 4)
9361  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
9362  if (kcountHBnegativedirectionRecosignal3 == 5)
9363  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
9364  if (kcountHBnegativedirectionRecosignal3 == 6)
9365  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
9366  if (kcountHBnegativedirectionRecosignal3 == 7)
9367  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
9368  if (kcountHBnegativedirectionRecosignal3 == 8)
9369  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
9370  if (kcountHBnegativedirectionRecosignal3 == 9)
9371  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
9372  if (kcountHBnegativedirectionRecosignal3 == 10)
9373  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
9374  if (kcountHBnegativedirectionRecosignal3 == 11)
9375  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
9376  if (kcountHBnegativedirectionRecosignal3 == 12)
9377  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
9378  if (kcountHBnegativedirectionRecosignal3 == 13)
9379  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
9380  if (kcountHBnegativedirectionRecosignal3 == 14)
9381  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
9382  if (kcountHBnegativedirectionRecosignal3 == 15)
9383  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
9384  if (kcountHBnegativedirectionRecosignal3 == 16)
9385  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
9386 
9387  HBnegativedirectionRecosignal3->Draw("Error");
9388  kcountHBnegativedirectionRecosignal3++;
9389  if (kcountHBnegativedirectionRecosignal3 > 16)
9390  break; // 4x6 = 24
9391  } //ccctest>0
9392 
9393  } // for i
9394  } //if(jeta-41 < 0 )
9395  } //for jeta
9397  c3x5->Update();
9398  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
9399  c3x5->Clear();
9400  // clean-up
9401  if (h2CeffHBnegativedirectionRecosignal3)
9402  delete h2CeffHBnegativedirectionRecosignal3;
9403  //========================================================================================== 1117
9404  //======================================================================
9405  //======================================================================1D plot: R vs phi , different eta, depth=4
9406  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
9407  c3x5->Clear();
9409  c3x5->Divide(4, 4);
9410  c3x5->cd(1);
9411  int kcountHBnegativedirectionRecosignal4 = 1;
9412  TH1F *h2CeffHBnegativedirectionRecosignal4 = new TH1F("h2CeffHBnegativedirectionRecosignal4", "", nphi, 0., 72.);
9413 
9414  for (int jeta = 0; jeta < njeta; jeta++) {
9415  // negativedirectionRecosignal:
9416  if (jeta - 41 < 0) {
9417  // for (int i=0;i<ndepth;i++) {
9418  // depth=4
9419  for (int i = 3; i < 4; i++) {
9420  TH1F *HBnegativedirectionRecosignal4 = (TH1F *)h2CeffHBnegativedirectionRecosignal4->Clone("twod1");
9421 
9422  float ccctest = 0; // to avoid empty massive elements
9423  for (int jphi = 0; jphi < nphi; jphi++) {
9424  double ccc1 = arecosignalHB[i][jeta][jphi];
9425  if (ccc1 != 0.) {
9426  HBnegativedirectionRecosignal4->Fill(jphi, ccc1);
9427  ccctest = 1.; //HBnegativedirectionRecosignal4->SetBinError(i,0.01);
9428  }
9429  } // for jphi
9430  if (ccctest > 0.) {
9431  //cout<<"777 kcountHBnegativedirectionRecosignal4 = "<<kcountHBnegativedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
9432  c3x5->cd(kcountHBnegativedirectionRecosignal4);
9433  HBnegativedirectionRecosignal4->SetMarkerStyle(20);
9434  HBnegativedirectionRecosignal4->SetMarkerSize(0.4);
9435  HBnegativedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
9436  HBnegativedirectionRecosignal4->SetXTitle("HBnegativedirectionRecosignal4 \b");
9437  HBnegativedirectionRecosignal4->SetMarkerColor(2);
9438  HBnegativedirectionRecosignal4->SetLineColor(0);
9439  gPad->SetGridy();
9440  gPad->SetGridx();
9441  // gPad->SetLogy();
9442  if (kcountHBnegativedirectionRecosignal4 == 1)
9443  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
9444  if (kcountHBnegativedirectionRecosignal4 == 2)
9445  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
9446  if (kcountHBnegativedirectionRecosignal4 == 3)
9447  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
9448  if (kcountHBnegativedirectionRecosignal4 == 4)
9449  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
9450  if (kcountHBnegativedirectionRecosignal4 == 5)
9451  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
9452  if (kcountHBnegativedirectionRecosignal4 == 6)
9453  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
9454  if (kcountHBnegativedirectionRecosignal4 == 7)
9455  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
9456  if (kcountHBnegativedirectionRecosignal4 == 8)
9457  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
9458  if (kcountHBnegativedirectionRecosignal4 == 9)
9459  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
9460  if (kcountHBnegativedirectionRecosignal4 == 10)
9461  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
9462  if (kcountHBnegativedirectionRecosignal4 == 11)
9463  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
9464  if (kcountHBnegativedirectionRecosignal4 == 12)
9465  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
9466  if (kcountHBnegativedirectionRecosignal4 == 13)
9467  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
9468  if (kcountHBnegativedirectionRecosignal4 == 14)
9469  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
9470  if (kcountHBnegativedirectionRecosignal4 == 15)
9471  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
9472  if (kcountHBnegativedirectionRecosignal4 == 16)
9473  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
9474  HBnegativedirectionRecosignal4->Draw("Error");
9475  kcountHBnegativedirectionRecosignal4++;
9476  if (kcountHBnegativedirectionRecosignal4 > 16)
9477  break; // 4x6 = 24
9478  } //ccctest>0
9479 
9480  } // for i
9481  } //if(jeta-41 < 0 )
9482  } //for jeta
9484  c3x5->Update();
9485  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
9486  c3x5->Clear();
9487  // clean-up
9488  if (h2CeffHBnegativedirectionRecosignal4)
9489  delete h2CeffHBnegativedirectionRecosignal4;
9490 
9491  //======================================================================================================================
9492  //======================================================================================================================
9493  //======================================================================================================================
9494  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
9495 
9496  //cout<<" Start Vaiance: preparation *****" <<endl;
9497  TH2F *recosignalVariance1HB1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HB1");
9498  TH2F *recosignalVariance0HB1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HB1");
9499  TH2F *recosignalVarianceHB1 = (TH2F *)recosignalVariance1HB1->Clone("recosignalVarianceHB1");
9500  recosignalVarianceHB1->Divide(recosignalVariance1HB1, recosignalVariance0HB1, 1, 1, "B");
9501  TH2F *recosignalVariance1HB2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HB2");
9502  TH2F *recosignalVariance0HB2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HB2");
9503  TH2F *recosignalVarianceHB2 = (TH2F *)recosignalVariance1HB2->Clone("recosignalVarianceHB2");
9504  recosignalVarianceHB2->Divide(recosignalVariance1HB2, recosignalVariance0HB2, 1, 1, "B");
9505  TH2F *recosignalVariance1HB3 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HB3");
9506  TH2F *recosignalVariance0HB3 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HB3");
9507  TH2F *recosignalVarianceHB3 = (TH2F *)recosignalVariance1HB3->Clone("recosignalVarianceHB3");
9508  recosignalVarianceHB3->Divide(recosignalVariance1HB3, recosignalVariance0HB3, 1, 1, "B");
9509  TH2F *recosignalVariance1HB4 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HB4");
9510  TH2F *recosignalVariance0HB4 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HB4");
9511  TH2F *recosignalVarianceHB4 = (TH2F *)recosignalVariance1HB4->Clone("recosignalVarianceHB4");
9512  recosignalVarianceHB4->Divide(recosignalVariance1HB4, recosignalVariance0HB4, 1, 1, "B");
9513  //cout<<" Vaiance: preparation DONE *****" <<endl;
9514  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvarianceHB
9515  // = sum(R*R)/N - (sum(R)/N)**2
9516  for (int jeta = 0; jeta < njeta; jeta++) {
9517  //preparation for PHI normalization:
9518  double sumrecosignalHB0 = 0;
9519  int nsumrecosignalHB0 = 0;
9520  double sumrecosignalHB1 = 0;
9521  int nsumrecosignalHB1 = 0;
9522  double sumrecosignalHB2 = 0;
9523  int nsumrecosignalHB2 = 0;
9524  double sumrecosignalHB3 = 0;
9525  int nsumrecosignalHB3 = 0;
9526  for (int jphi = 0; jphi < njphi; jphi++) {
9527  recosignalvarianceHB[0][jeta][jphi] = recosignalVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
9528  recosignalvarianceHB[1][jeta][jphi] = recosignalVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
9529  recosignalvarianceHB[2][jeta][jphi] = recosignalVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
9530  recosignalvarianceHB[3][jeta][jphi] = recosignalVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
9531  if (recosignalvarianceHB[0][jeta][jphi] > 0.) {
9532  sumrecosignalHB0 += recosignalvarianceHB[0][jeta][jphi];
9533  ++nsumrecosignalHB0;
9534  }
9535  if (recosignalvarianceHB[1][jeta][jphi] > 0.) {
9536  sumrecosignalHB1 += recosignalvarianceHB[1][jeta][jphi];
9537  ++nsumrecosignalHB1;
9538  }
9539  if (recosignalvarianceHB[2][jeta][jphi] > 0.) {
9540  sumrecosignalHB2 += recosignalvarianceHB[2][jeta][jphi];
9541  ++nsumrecosignalHB2;
9542  }
9543  if (recosignalvarianceHB[3][jeta][jphi] > 0.) {
9544  sumrecosignalHB3 += recosignalvarianceHB[3][jeta][jphi];
9545  ++nsumrecosignalHB3;
9546  }
9547  } // phi
9548  // PHI normalization :
9549  for (int jphi = 0; jphi < njphi; jphi++) {
9550  if (recosignalvarianceHB[0][jeta][jphi] > 0.)
9551  recosignalvarianceHB[0][jeta][jphi] /= (sumrecosignalHB0 / nsumrecosignalHB0);
9552  if (recosignalvarianceHB[1][jeta][jphi] > 0.)
9553  recosignalvarianceHB[1][jeta][jphi] /= (sumrecosignalHB1 / nsumrecosignalHB1);
9554  if (recosignalvarianceHB[2][jeta][jphi] > 0.)
9555  recosignalvarianceHB[2][jeta][jphi] /= (sumrecosignalHB2 / nsumrecosignalHB2);
9556  if (recosignalvarianceHB[3][jeta][jphi] > 0.)
9557  recosignalvarianceHB[3][jeta][jphi] /= (sumrecosignalHB3 / nsumrecosignalHB3);
9558  } // phi
9559  // recosignalvarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
9560  for (int jphi = 0; jphi < njphi; jphi++) {
9561  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
9562  recosignalvarianceHB[0][jeta][jphi] -= arecosignalHB[0][jeta][jphi] * arecosignalHB[0][jeta][jphi];
9563  recosignalvarianceHB[0][jeta][jphi] = fabs(recosignalvarianceHB[0][jeta][jphi]);
9564  recosignalvarianceHB[1][jeta][jphi] -= arecosignalHB[1][jeta][jphi] * arecosignalHB[1][jeta][jphi];
9565  recosignalvarianceHB[1][jeta][jphi] = fabs(recosignalvarianceHB[1][jeta][jphi]);
9566  recosignalvarianceHB[2][jeta][jphi] -= arecosignalHB[2][jeta][jphi] * arecosignalHB[2][jeta][jphi];
9567  recosignalvarianceHB[2][jeta][jphi] = fabs(recosignalvarianceHB[2][jeta][jphi]);
9568  recosignalvarianceHB[3][jeta][jphi] -= arecosignalHB[3][jeta][jphi] * arecosignalHB[3][jeta][jphi];
9569  recosignalvarianceHB[3][jeta][jphi] = fabs(recosignalvarianceHB[3][jeta][jphi]);
9570  }
9571  }
9572  //cout<<" Vaiance: DONE*****" <<endl;
9573  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
9574  //======================================================================
9575  //======================================================================
9576  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
9577  c1x1->Clear();
9579  c1x0->Divide(1, 1);
9580  c1x0->cd(1);
9581  TH2F *DefzDrecosignalHB42D = new TH2F("DefzDrecosignalHB42D", "", neta, -41., 41., nphi, 0., 72.);
9582  TH2F *DefzDrecosignalHB42D0 = new TH2F("DefzDrecosignalHB42D0", "", neta, -41., 41., nphi, 0., 72.);
9583  TH2F *DefzDrecosignalHB42DF = (TH2F *)DefzDrecosignalHB42D0->Clone("DefzDrecosignalHB42DF");
9584  for (int i = 0; i < ndepth; i++) {
9585  for (int jeta = 0; jeta < neta; jeta++) {
9586  for (int jphi = 0; jphi < nphi; jphi++) {
9587  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9588  int k2plot = jeta - 41;
9589  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
9590  if (arecosignalHB[i][jeta][jphi] > 0.) {
9591  DefzDrecosignalHB42D->Fill(kkk, jphi, ccc1);
9592  DefzDrecosignalHB42D0->Fill(kkk, jphi, 1.);
9593  }
9594  }
9595  }
9596  }
9597  DefzDrecosignalHB42DF->Divide(DefzDrecosignalHB42D, DefzDrecosignalHB42D0, 1, 1, "B"); // average A
9598  // DefzDrecosignalHB1->Sumw2();
9599  gPad->SetGridy();
9600  gPad->SetGridx(); // gPad->SetLogz();
9601  DefzDrecosignalHB42DF->SetMarkerStyle(20);
9602  DefzDrecosignalHB42DF->SetMarkerSize(0.4);
9603  DefzDrecosignalHB42DF->GetZaxis()->SetLabelSize(0.08);
9604  DefzDrecosignalHB42DF->SetXTitle("<D>_depth #eta \b");
9605  DefzDrecosignalHB42DF->SetYTitle(" #phi \b");
9606  DefzDrecosignalHB42DF->SetZTitle("<D>_depth \b");
9607  DefzDrecosignalHB42DF->SetMarkerColor(2);
9608  DefzDrecosignalHB42DF->SetLineColor(
9609  0); // DefzDrecosignalHB42DF->SetMaximum(1.000); // DefzDrecosignalHB42DF->SetMinimum(1.0);
9610  DefzDrecosignalHB42DF->Draw("COLZ");
9612  c1x0->Update();
9613  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHB.png");
9614  c1x0->Clear();
9615  // clean-up
9616  if (DefzDrecosignalHB42D)
9617  delete DefzDrecosignalHB42D;
9618  if (DefzDrecosignalHB42D0)
9619  delete DefzDrecosignalHB42D0;
9620  if (DefzDrecosignalHB42DF)
9621  delete DefzDrecosignalHB42DF;
9622  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
9623  //======================================================================
9624  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
9625  c1x1->Clear();
9627  c1x1->Divide(1, 1);
9628  c1x1->cd(1);
9629  TH1F *DefzDrecosignalHB41D = new TH1F("DefzDrecosignalHB41D", "", nphi, 0., 72.);
9630  TH1F *DefzDrecosignalHB41D0 = new TH1F("DefzDrecosignalHB41D0", "", nphi, 0., 72.);
9631  TH1F *DefzDrecosignalHB41DF = (TH1F *)DefzDrecosignalHB41D0->Clone("DefzDrecosignalHB41DF");
9632 
9633  for (int jphi = 0; jphi < nphi; jphi++) {
9634  for (int jeta = 0; jeta < neta; jeta++) {
9635  for (int i = 0; i < ndepth; i++) {
9636  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9637  if (arecosignalHB[i][jeta][jphi] > 0.) {
9638  DefzDrecosignalHB41D->Fill(jphi, ccc1);
9639  DefzDrecosignalHB41D0->Fill(jphi, 1.);
9640  }
9641  }
9642  }
9643  }
9644  // DefzDrecosignalHB41D->Sumw2();DefzDrecosignalHB41D0->Sumw2();
9645 
9646  DefzDrecosignalHB41DF->Divide(
9647  DefzDrecosignalHB41D, DefzDrecosignalHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
9648  DefzDrecosignalHB41D0->Sumw2();
9649  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHB41DF->SetBinError(jphi,0.01);}
9650  gPad->SetGridy();
9651  gPad->SetGridx(); // gPad->SetLogz();
9652  DefzDrecosignalHB41DF->SetMarkerStyle(20);
9653  DefzDrecosignalHB41DF->SetMarkerSize(1.4);
9654  DefzDrecosignalHB41DF->GetZaxis()->SetLabelSize(0.08);
9655  DefzDrecosignalHB41DF->SetXTitle("#phi \b");
9656  DefzDrecosignalHB41DF->SetYTitle(" <D> \b");
9657  DefzDrecosignalHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
9658  DefzDrecosignalHB41DF->SetMarkerColor(4);
9659  DefzDrecosignalHB41DF->SetLineColor(
9660  4); // DefzDrecosignalHB41DF->SetMinimum(0.8); DefzDrecosignalHB41DF->SetMinimum(-0.015);
9661  DefzDrecosignalHB41DF->Draw("Error");
9663  c1x1->Update();
9664  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHB.png");
9665  c1x1->Clear();
9666  // clean-up
9667  if (DefzDrecosignalHB41D)
9668  delete DefzDrecosignalHB41D;
9669  if (DefzDrecosignalHB41D0)
9670  delete DefzDrecosignalHB41D0;
9671  if (DefzDrecosignalHB41DF)
9672  delete DefzDrecosignalHB41DF;
9673 
9674  //========================================================================================== 14
9675  //======================================================================
9676  //======================================================================1D plot: D vs phi , different eta, depth=1
9677  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
9678  c3x5->Clear();
9680  c3x5->Divide(4, 4);
9681  c3x5->cd(1);
9682  int kcountHBpositivedirectionRecosignalD1 = 1;
9683  TH1F *h2CeffHBpositivedirectionRecosignalD1 = new TH1F("h2CeffHBpositivedirectionRecosignalD1", "", nphi, 0., 72.);
9684 
9685  for (int jeta = 0; jeta < njeta; jeta++) {
9686  // positivedirectionRecosignalD:
9687  if (jeta - 41 >= 0) {
9688  // for (int i=0;i<ndepth;i++) {
9689  // depth=1
9690  for (int i = 0; i < 1; i++) {
9691  TH1F *HBpositivedirectionRecosignalD1 = (TH1F *)h2CeffHBpositivedirectionRecosignalD1->Clone("twod1");
9692 
9693  float ccctest = 0; // to avoid empty massive elements
9694  for (int jphi = 0; jphi < nphi; jphi++) {
9695  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9696  if (arecosignalHB[i][jeta][jphi] > 0.) {
9697  HBpositivedirectionRecosignalD1->Fill(jphi, ccc1);
9698  ccctest = 1.; //HBpositivedirectionRecosignalD1->SetBinError(i,0.01);
9699  }
9700  } // for jphi
9701  if (ccctest > 0.) {
9702  //cout<<"1414 kcountHBpositivedirectionRecosignalD1 = "<<kcountHBpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
9703  c3x5->cd(kcountHBpositivedirectionRecosignalD1);
9704  HBpositivedirectionRecosignalD1->SetMarkerStyle(20);
9705  HBpositivedirectionRecosignalD1->SetMarkerSize(0.4);
9706  HBpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
9707  HBpositivedirectionRecosignalD1->SetXTitle("HBpositivedirectionRecosignalD1 \b");
9708  HBpositivedirectionRecosignalD1->SetMarkerColor(2);
9709  HBpositivedirectionRecosignalD1->SetLineColor(0);
9710  gPad->SetGridy();
9711  gPad->SetGridx();
9712  // gPad->SetLogy();
9713  if (kcountHBpositivedirectionRecosignalD1 == 1)
9714  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
9715  if (kcountHBpositivedirectionRecosignalD1 == 2)
9716  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
9717  if (kcountHBpositivedirectionRecosignalD1 == 3)
9718  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
9719  if (kcountHBpositivedirectionRecosignalD1 == 4)
9720  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
9721  if (kcountHBpositivedirectionRecosignalD1 == 5)
9722  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
9723  if (kcountHBpositivedirectionRecosignalD1 == 6)
9724  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
9725  if (kcountHBpositivedirectionRecosignalD1 == 7)
9726  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
9727  if (kcountHBpositivedirectionRecosignalD1 == 8)
9728  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
9729  if (kcountHBpositivedirectionRecosignalD1 == 9)
9730  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
9731  if (kcountHBpositivedirectionRecosignalD1 == 10)
9732  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
9733  if (kcountHBpositivedirectionRecosignalD1 == 11)
9734  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
9735  if (kcountHBpositivedirectionRecosignalD1 == 12)
9736  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
9737  if (kcountHBpositivedirectionRecosignalD1 == 13)
9738  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
9739  if (kcountHBpositivedirectionRecosignalD1 == 14)
9740  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
9741  if (kcountHBpositivedirectionRecosignalD1 == 15)
9742  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
9743  if (kcountHBpositivedirectionRecosignalD1 == 16)
9744  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
9745  HBpositivedirectionRecosignalD1->Draw("Error");
9746  kcountHBpositivedirectionRecosignalD1++;
9747  if (kcountHBpositivedirectionRecosignalD1 > 16)
9748  break; // 4x6 = 24
9749  } //ccctest>0
9750 
9751  } // for i
9752  } //if(jeta-41 >= 0)
9753  } //for jeta
9755  c3x5->Update();
9756  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
9757  c3x5->Clear();
9758  // clean-up
9759  if (h2CeffHBpositivedirectionRecosignalD1)
9760  delete h2CeffHBpositivedirectionRecosignalD1;
9761  //========================================================================================== 15
9762  //======================================================================
9763  //======================================================================1D plot: D vs phi , different eta, depth=2
9764  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
9765  c3x5->Clear();
9766  c3x5->Divide(4, 4);
9767  c3x5->cd(1);
9768  int kcountHBpositivedirectionRecosignalD2 = 1;
9769  TH1F *h2CeffHBpositivedirectionRecosignalD2 = new TH1F("h2CeffHBpositivedirectionRecosignalD2", "", nphi, 0., 72.);
9770 
9771  for (int jeta = 0; jeta < njeta; jeta++) {
9772  // positivedirectionRecosignalD:
9773  if (jeta - 41 >= 0) {
9774  // for (int i=0;i<ndepth;i++) {
9775  // depth=2
9776  for (int i = 1; i < 2; i++) {
9777  TH1F *HBpositivedirectionRecosignalD2 = (TH1F *)h2CeffHBpositivedirectionRecosignalD2->Clone("twod1");
9778 
9779  float ccctest = 0; // to avoid empty massive elements
9780  for (int jphi = 0; jphi < nphi; jphi++) {
9781  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9782  if (arecosignalHB[i][jeta][jphi] > 0.) {
9783  HBpositivedirectionRecosignalD2->Fill(jphi, ccc1);
9784  ccctest = 1.; //HBpositivedirectionRecosignalD2->SetBinError(i,0.01);
9785  }
9786  } // for jphi
9787  if (ccctest > 0.) {
9788  //cout<<"1515 kcountHBpositivedirectionRecosignalD2 = "<<kcountHBpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
9789  c3x5->cd(kcountHBpositivedirectionRecosignalD2);
9790  HBpositivedirectionRecosignalD2->SetMarkerStyle(20);
9791  HBpositivedirectionRecosignalD2->SetMarkerSize(0.4);
9792  HBpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
9793  HBpositivedirectionRecosignalD2->SetXTitle("HBpositivedirectionRecosignalD2 \b");
9794  HBpositivedirectionRecosignalD2->SetMarkerColor(2);
9795  HBpositivedirectionRecosignalD2->SetLineColor(0);
9796  gPad->SetGridy();
9797  gPad->SetGridx();
9798  // gPad->SetLogy();
9799  if (kcountHBpositivedirectionRecosignalD2 == 1)
9800  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
9801  if (kcountHBpositivedirectionRecosignalD2 == 2)
9802  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
9803  if (kcountHBpositivedirectionRecosignalD2 == 3)
9804  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
9805  if (kcountHBpositivedirectionRecosignalD2 == 4)
9806  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
9807  if (kcountHBpositivedirectionRecosignalD2 == 5)
9808  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
9809  if (kcountHBpositivedirectionRecosignalD2 == 6)
9810  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
9811  if (kcountHBpositivedirectionRecosignalD2 == 7)
9812  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
9813  if (kcountHBpositivedirectionRecosignalD2 == 8)
9814  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
9815  if (kcountHBpositivedirectionRecosignalD2 == 9)
9816  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
9817  if (kcountHBpositivedirectionRecosignalD2 == 10)
9818  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
9819  if (kcountHBpositivedirectionRecosignalD2 == 11)
9820  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
9821  if (kcountHBpositivedirectionRecosignalD2 == 12)
9822  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
9823  if (kcountHBpositivedirectionRecosignalD2 == 13)
9824  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
9825  if (kcountHBpositivedirectionRecosignalD2 == 14)
9826  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
9827  if (kcountHBpositivedirectionRecosignalD2 == 15)
9828  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
9829  if (kcountHBpositivedirectionRecosignalD2 == 16)
9830  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
9831  HBpositivedirectionRecosignalD2->Draw("Error");
9832  kcountHBpositivedirectionRecosignalD2++;
9833  if (kcountHBpositivedirectionRecosignalD2 > 16)
9834  break; // 4x6 = 24
9835  } //ccctest>0
9836 
9837  } // for i
9838  } //if(jeta-41 >= 0)
9839  } //for jeta
9841  c3x5->Update();
9842  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
9843  c3x5->Clear();
9844  // clean-up
9845  if (h2CeffHBpositivedirectionRecosignalD2)
9846  delete h2CeffHBpositivedirectionRecosignalD2;
9847  //========================================================================================== 16
9848  //======================================================================
9849  //======================================================================1D plot: D vs phi , different eta, depth=3
9850  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
9851  c3x5->Clear();
9852  c3x5->Divide(4, 4);
9853  c3x5->cd(1);
9854  int kcountHBpositivedirectionRecosignalD3 = 1;
9855  TH1F *h2CeffHBpositivedirectionRecosignalD3 = new TH1F("h2CeffHBpositivedirectionRecosignalD3", "", nphi, 0., 72.);
9856 
9857  for (int jeta = 0; jeta < njeta; jeta++) {
9858  // positivedirectionRecosignalD:
9859  if (jeta - 41 >= 0) {
9860  // for (int i=0;i<ndepth;i++) {
9861  // depth=3
9862  for (int i = 2; i < 3; i++) {
9863  TH1F *HBpositivedirectionRecosignalD3 = (TH1F *)h2CeffHBpositivedirectionRecosignalD3->Clone("twod1");
9864 
9865  float ccctest = 0; // to avoid empty massive elements
9866  for (int jphi = 0; jphi < nphi; jphi++) {
9867  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9868  if (arecosignalHB[i][jeta][jphi] > 0.) {
9869  HBpositivedirectionRecosignalD3->Fill(jphi, ccc1);
9870  ccctest = 1.; //HBpositivedirectionRecosignalD3->SetBinError(i,0.01);
9871  }
9872  } // for jphi
9873  if (ccctest > 0.) {
9874  //cout<<"1616 kcountHBpositivedirectionRecosignalD3 = "<<kcountHBpositivedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
9875  c3x5->cd(kcountHBpositivedirectionRecosignalD3);
9876  HBpositivedirectionRecosignalD3->SetMarkerStyle(20);
9877  HBpositivedirectionRecosignalD3->SetMarkerSize(0.4);
9878  HBpositivedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
9879  HBpositivedirectionRecosignalD3->SetXTitle("HBpositivedirectionRecosignalD3 \b");
9880  HBpositivedirectionRecosignalD3->SetMarkerColor(2);
9881  HBpositivedirectionRecosignalD3->SetLineColor(0);
9882  gPad->SetGridy();
9883  gPad->SetGridx();
9884  // gPad->SetLogy();
9885  if (kcountHBpositivedirectionRecosignalD3 == 1)
9886  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
9887  if (kcountHBpositivedirectionRecosignalD3 == 2)
9888  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
9889  if (kcountHBpositivedirectionRecosignalD3 == 3)
9890  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
9891  if (kcountHBpositivedirectionRecosignalD3 == 4)
9892  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
9893  if (kcountHBpositivedirectionRecosignalD3 == 5)
9894  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
9895  if (kcountHBpositivedirectionRecosignalD3 == 6)
9896  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
9897  if (kcountHBpositivedirectionRecosignalD3 == 7)
9898  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
9899  if (kcountHBpositivedirectionRecosignalD3 == 8)
9900  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
9901  if (kcountHBpositivedirectionRecosignalD3 == 9)
9902  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
9903  if (kcountHBpositivedirectionRecosignalD3 == 10)
9904  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
9905  if (kcountHBpositivedirectionRecosignalD3 == 11)
9906  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
9907  if (kcountHBpositivedirectionRecosignalD3 == 12)
9908  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
9909  if (kcountHBpositivedirectionRecosignalD3 == 13)
9910  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
9911  if (kcountHBpositivedirectionRecosignalD3 == 14)
9912  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
9913  if (kcountHBpositivedirectionRecosignalD3 == 15)
9914  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
9915  if (kcountHBpositivedirectionRecosignalD3 == 16)
9916  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
9917  HBpositivedirectionRecosignalD3->Draw("Error");
9918  kcountHBpositivedirectionRecosignalD3++;
9919  if (kcountHBpositivedirectionRecosignalD3 > 16)
9920  break; // 4x6 = 24
9921  } //ccctest>0
9922 
9923  } // for i
9924  } //if(jeta-41 >= 0)
9925  } //for jeta
9927  c3x5->Update();
9928  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
9929  c3x5->Clear();
9930  // clean-up
9931  if (h2CeffHBpositivedirectionRecosignalD3)
9932  delete h2CeffHBpositivedirectionRecosignalD3;
9933  //========================================================================================== 17
9934  //======================================================================
9935  //======================================================================1D plot: D vs phi , different eta, depth=4
9936  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
9937  c3x5->Clear();
9938  c3x5->Divide(4, 4);
9939  c3x5->cd(1);
9940  int kcountHBpositivedirectionRecosignalD4 = 1;
9941  TH1F *h2CeffHBpositivedirectionRecosignalD4 = new TH1F("h2CeffHBpositivedirectionRecosignalD4", "", nphi, 0., 72.);
9942 
9943  for (int jeta = 0; jeta < njeta; jeta++) {
9944  // positivedirectionRecosignalD:
9945  if (jeta - 41 >= 0) {
9946  // for (int i=0;i<ndepth;i++) {
9947  // depth=4
9948  for (int i = 3; i < 4; i++) {
9949  TH1F *HBpositivedirectionRecosignalD4 = (TH1F *)h2CeffHBpositivedirectionRecosignalD4->Clone("twod1");
9950 
9951  float ccctest = 0; // to avoid empty massive elements
9952  for (int jphi = 0; jphi < nphi; jphi++) {
9953  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9954  if (arecosignalHB[i][jeta][jphi] > 0.) {
9955  HBpositivedirectionRecosignalD4->Fill(jphi, ccc1);
9956  ccctest = 1.; //HBpositivedirectionRecosignalD4->SetBinError(i,0.01);
9957  }
9958  } // for jphi
9959  if (ccctest > 0.) {
9960  //cout<<"1717 kcountHBpositivedirectionRecosignalD4 = "<<kcountHBpositivedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
9961  c3x5->cd(kcountHBpositivedirectionRecosignalD4);
9962  HBpositivedirectionRecosignalD4->SetMarkerStyle(20);
9963  HBpositivedirectionRecosignalD4->SetMarkerSize(0.4);
9964  HBpositivedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
9965  HBpositivedirectionRecosignalD4->SetXTitle("HBpositivedirectionRecosignalD4 \b");
9966  HBpositivedirectionRecosignalD4->SetMarkerColor(2);
9967  HBpositivedirectionRecosignalD4->SetLineColor(0);
9968  gPad->SetGridy();
9969  gPad->SetGridx();
9970  // gPad->SetLogy();
9971  if (kcountHBpositivedirectionRecosignalD4 == 1)
9972  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
9973  if (kcountHBpositivedirectionRecosignalD4 == 2)
9974  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
9975  if (kcountHBpositivedirectionRecosignalD4 == 3)
9976  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
9977  if (kcountHBpositivedirectionRecosignalD4 == 4)
9978  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
9979  if (kcountHBpositivedirectionRecosignalD4 == 5)
9980  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
9981  if (kcountHBpositivedirectionRecosignalD4 == 6)
9982  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
9983  if (kcountHBpositivedirectionRecosignalD4 == 7)
9984  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
9985  if (kcountHBpositivedirectionRecosignalD4 == 8)
9986  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
9987  if (kcountHBpositivedirectionRecosignalD4 == 9)
9988  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
9989  if (kcountHBpositivedirectionRecosignalD4 == 10)
9990  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
9991  if (kcountHBpositivedirectionRecosignalD4 == 11)
9992  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
9993  if (kcountHBpositivedirectionRecosignalD4 == 12)
9994  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
9995  if (kcountHBpositivedirectionRecosignalD4 == 13)
9996  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
9997  if (kcountHBpositivedirectionRecosignalD4 == 14)
9998  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
9999  if (kcountHBpositivedirectionRecosignalD4 == 15)
10000  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
10001  if (kcountHBpositivedirectionRecosignalD4 == 16)
10002  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
10003  HBpositivedirectionRecosignalD4->Draw("Error");
10004  kcountHBpositivedirectionRecosignalD4++;
10005  if (kcountHBpositivedirectionRecosignalD4 > 16)
10006  break; // 4x6 = 24
10007  } //ccctest>0
10008 
10009  } // for i
10010  } //if(jeta-41 >= 0)
10011  } //for jeta
10013  c3x5->Update();
10014  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
10015  c3x5->Clear();
10016  // clean-up
10017  if (h2CeffHBpositivedirectionRecosignalD4)
10018  delete h2CeffHBpositivedirectionRecosignalD4;
10019 
10020  //========================================================================================== 22214
10021  //======================================================================
10022  //======================================================================1D plot: D vs phi , different eta, depth=1
10023  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
10024  c3x5->Clear();
10026  c3x5->Divide(4, 4);
10027  c3x5->cd(1);
10028  int kcountHBnegativedirectionRecosignalD1 = 1;
10029  TH1F *h2CeffHBnegativedirectionRecosignalD1 = new TH1F("h2CeffHBnegativedirectionRecosignalD1", "", nphi, 0., 72.);
10030 
10031  for (int jeta = 0; jeta < njeta; jeta++) {
10032  // negativedirectionRecosignalD:
10033  if (jeta - 41 < 0) {
10034  // for (int i=0;i<ndepth;i++) {
10035  // depth=1
10036  for (int i = 0; i < 1; i++) {
10037  TH1F *HBnegativedirectionRecosignalD1 = (TH1F *)h2CeffHBnegativedirectionRecosignalD1->Clone("twod1");
10038 
10039  float ccctest = 0; // to avoid empty massive elements
10040  for (int jphi = 0; jphi < nphi; jphi++) {
10041  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10042  if (arecosignalHB[i][jeta][jphi] > 0.) {
10043  HBnegativedirectionRecosignalD1->Fill(jphi, ccc1);
10044  ccctest = 1.; //HBnegativedirectionRecosignalD1->SetBinError(i,0.01);
10045  }
10046  } // for jphi
10047  if (ccctest > 0.) {
10048  //cout<<"1414 kcountHBnegativedirectionRecosignalD1 = "<<kcountHBnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
10049  c3x5->cd(kcountHBnegativedirectionRecosignalD1);
10050  HBnegativedirectionRecosignalD1->SetMarkerStyle(20);
10051  HBnegativedirectionRecosignalD1->SetMarkerSize(0.4);
10052  HBnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
10053  HBnegativedirectionRecosignalD1->SetXTitle("HBnegativedirectionRecosignalD1 \b");
10054  HBnegativedirectionRecosignalD1->SetMarkerColor(2);
10055  HBnegativedirectionRecosignalD1->SetLineColor(0);
10056  gPad->SetGridy();
10057  gPad->SetGridx();
10058  // gPad->SetLogy();
10059  if (kcountHBnegativedirectionRecosignalD1 == 1)
10060  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -16; depth = 1 \b");
10061  if (kcountHBnegativedirectionRecosignalD1 == 2)
10062  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -15; depth = 1 \b");
10063  if (kcountHBnegativedirectionRecosignalD1 == 3)
10064  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -14; depth = 1 \b");
10065  if (kcountHBnegativedirectionRecosignalD1 == 4)
10066  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -13; depth = 1 \b");
10067  if (kcountHBnegativedirectionRecosignalD1 == 5)
10068  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -12; depth = 1 \b");
10069  if (kcountHBnegativedirectionRecosignalD1 == 6)
10070  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -11; depth = 1 \b");
10071  if (kcountHBnegativedirectionRecosignalD1 == 7)
10072  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -10; depth = 1 \b");
10073  if (kcountHBnegativedirectionRecosignalD1 == 8)
10074  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -9; depth = 1 \b");
10075  if (kcountHBnegativedirectionRecosignalD1 == 9)
10076  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -8; depth = 1 \b");
10077  if (kcountHBnegativedirectionRecosignalD1 == 10)
10078  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -7; depth = 1 \b");
10079  if (kcountHBnegativedirectionRecosignalD1 == 11)
10080  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -6; depth = 1 \b");
10081  if (kcountHBnegativedirectionRecosignalD1 == 12)
10082  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -5; depth = 1 \b");
10083  if (kcountHBnegativedirectionRecosignalD1 == 13)
10084  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -4; depth = 1 \b");
10085  if (kcountHBnegativedirectionRecosignalD1 == 14)
10086  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -3; depth = 1 \b");
10087  if (kcountHBnegativedirectionRecosignalD1 == 15)
10088  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -2; depth = 1 \b");
10089  if (kcountHBnegativedirectionRecosignalD1 == 16)
10090  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -1; depth = 1 \b");
10091  HBnegativedirectionRecosignalD1->Draw("Error");
10092  kcountHBnegativedirectionRecosignalD1++;
10093  if (kcountHBnegativedirectionRecosignalD1 > 16)
10094  break; // 4x6 = 24
10095  } //ccctest>0
10096 
10097  } // for i
10098  } //if(jeta-41 < 0)
10099  } //for jeta
10101  c3x5->Update();
10102  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
10103  c3x5->Clear();
10104  // clean-up
10105  if (h2CeffHBnegativedirectionRecosignalD1)
10106  delete h2CeffHBnegativedirectionRecosignalD1;
10107  //========================================================================================== 22215
10108  //======================================================================
10109  //======================================================================1D plot: D vs phi , different eta, depth=2
10110  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
10111  c3x5->Clear();
10112  c3x5->Divide(4, 4);
10113  c3x5->cd(1);
10114  int kcountHBnegativedirectionRecosignalD2 = 1;
10115  TH1F *h2CeffHBnegativedirectionRecosignalD2 = new TH1F("h2CeffHBnegativedirectionRecosignalD2", "", nphi, 0., 72.);
10116 
10117  for (int jeta = 0; jeta < njeta; jeta++) {
10118  // negativedirectionRecosignalD:
10119  if (jeta - 41 < 0) {
10120  // for (int i=0;i<ndepth;i++) {
10121  // depth=2
10122  for (int i = 1; i < 2; i++) {
10123  TH1F *HBnegativedirectionRecosignalD2 = (TH1F *)h2CeffHBnegativedirectionRecosignalD2->Clone("twod1");
10124 
10125  float ccctest = 0; // to avoid empty massive elements
10126  for (int jphi = 0; jphi < nphi; jphi++) {
10127  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10128  if (arecosignalHB[i][jeta][jphi] > 0.) {
10129  HBnegativedirectionRecosignalD2->Fill(jphi, ccc1);
10130  ccctest = 1.; //HBnegativedirectionRecosignalD2->SetBinError(i,0.01);
10131  }
10132  } // for jphi
10133  if (ccctest > 0.) {
10134  //cout<<"1515 kcountHBnegativedirectionRecosignalD2 = "<<kcountHBnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
10135  c3x5->cd(kcountHBnegativedirectionRecosignalD2);
10136  HBnegativedirectionRecosignalD2->SetMarkerStyle(20);
10137  HBnegativedirectionRecosignalD2->SetMarkerSize(0.4);
10138  HBnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
10139  HBnegativedirectionRecosignalD2->SetXTitle("HBnegativedirectionRecosignalD2 \b");
10140  HBnegativedirectionRecosignalD2->SetMarkerColor(2);
10141  HBnegativedirectionRecosignalD2->SetLineColor(0);
10142  gPad->SetGridy();
10143  gPad->SetGridx();
10144  // gPad->SetLogy();
10145  if (kcountHBnegativedirectionRecosignalD2 == 1)
10146  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
10147  if (kcountHBnegativedirectionRecosignalD2 == 2)
10148  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
10149  if (kcountHBnegativedirectionRecosignalD2 == 3)
10150  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
10151  if (kcountHBnegativedirectionRecosignalD2 == 4)
10152  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
10153  if (kcountHBnegativedirectionRecosignalD2 == 5)
10154  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
10155  if (kcountHBnegativedirectionRecosignalD2 == 6)
10156  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
10157  if (kcountHBnegativedirectionRecosignalD2 == 7)
10158  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
10159  if (kcountHBnegativedirectionRecosignalD2 == 8)
10160  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-9 ; depth = 2 \b");
10161  if (kcountHBnegativedirectionRecosignalD2 == 9)
10162  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-8 ; depth = 2 \b");
10163  if (kcountHBnegativedirectionRecosignalD2 == 10)
10164  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-7 ; depth = 2 \b");
10165  if (kcountHBnegativedirectionRecosignalD2 == 11)
10166  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-6 ; depth = 2 \b");
10167  if (kcountHBnegativedirectionRecosignalD2 == 12)
10168  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-5 ; depth = 2 \b");
10169  if (kcountHBnegativedirectionRecosignalD2 == 13)
10170  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-4 ; depth = 2 \b");
10171  if (kcountHBnegativedirectionRecosignalD2 == 14)
10172  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-3 ; depth = 2 \b");
10173  if (kcountHBnegativedirectionRecosignalD2 == 15)
10174  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-2 ; depth = 2 \b");
10175  if (kcountHBnegativedirectionRecosignalD2 == 16)
10176  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-1 ; depth = 2 \b");
10177  HBnegativedirectionRecosignalD2->Draw("Error");
10178  kcountHBnegativedirectionRecosignalD2++;
10179  if (kcountHBnegativedirectionRecosignalD2 > 16)
10180  break; // 4x6 = 24
10181  } //ccctest>0
10182 
10183  } // for i
10184  } //if(jeta-41 < 0)
10185  } //for jeta
10187  c3x5->Update();
10188  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
10189  c3x5->Clear();
10190  // clean-up
10191  if (h2CeffHBnegativedirectionRecosignalD2)
10192  delete h2CeffHBnegativedirectionRecosignalD2;
10193  //========================================================================================== 22216
10194  //======================================================================
10195  //======================================================================1D plot: D vs phi , different eta, depth=3
10196  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
10197  c3x5->Clear();
10198  c3x5->Divide(4, 4);
10199  c3x5->cd(1);
10200  int kcountHBnegativedirectionRecosignalD3 = 1;
10201  TH1F *h2CeffHBnegativedirectionRecosignalD3 = new TH1F("h2CeffHBnegativedirectionRecosignalD3", "", nphi, 0., 72.);
10202 
10203  for (int jeta = 0; jeta < njeta; jeta++) {
10204  // negativedirectionRecosignalD:
10205  if (jeta - 41 < 0) {
10206  // for (int i=0;i<ndepth;i++) {
10207  // depth=3
10208  for (int i = 2; i < 3; i++) {
10209  TH1F *HBnegativedirectionRecosignalD3 = (TH1F *)h2CeffHBnegativedirectionRecosignalD3->Clone("twod1");
10210 
10211  float ccctest = 0; // to avoid empty massive elements
10212  for (int jphi = 0; jphi < nphi; jphi++) {
10213  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10214  if (arecosignalHB[i][jeta][jphi] > 0.) {
10215  HBnegativedirectionRecosignalD3->Fill(jphi, ccc1);
10216  ccctest = 1.; //HBnegativedirectionRecosignalD3->SetBinError(i,0.01);
10217  }
10218  } // for jphi
10219  if (ccctest > 0.) {
10220  //cout<<"1616 kcountHBnegativedirectionRecosignalD3 = "<<kcountHBnegativedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
10221  c3x5->cd(kcountHBnegativedirectionRecosignalD3);
10222  HBnegativedirectionRecosignalD3->SetMarkerStyle(20);
10223  HBnegativedirectionRecosignalD3->SetMarkerSize(0.4);
10224  HBnegativedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
10225  HBnegativedirectionRecosignalD3->SetXTitle("HBnegativedirectionRecosignalD3 \b");
10226  HBnegativedirectionRecosignalD3->SetMarkerColor(2);
10227  HBnegativedirectionRecosignalD3->SetLineColor(0);
10228  gPad->SetGridy();
10229  gPad->SetGridx();
10230  // gPad->SetLogy();
10231  if (kcountHBnegativedirectionRecosignalD3 == 1)
10232  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
10233  if (kcountHBnegativedirectionRecosignalD3 == 2)
10234  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
10235  if (kcountHBnegativedirectionRecosignalD3 == 3)
10236  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
10237  if (kcountHBnegativedirectionRecosignalD3 == 4)
10238  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
10239  if (kcountHBnegativedirectionRecosignalD3 == 5)
10240  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
10241  if (kcountHBnegativedirectionRecosignalD3 == 6)
10242  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
10243  if (kcountHBnegativedirectionRecosignalD3 == 7)
10244  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
10245  if (kcountHBnegativedirectionRecosignalD3 == 8)
10246  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-9 ; depth = 3 \b");
10247  if (kcountHBnegativedirectionRecosignalD3 == 9)
10248  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-8 ; depth = 3 \b");
10249  if (kcountHBnegativedirectionRecosignalD3 == 10)
10250  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-7 ; depth = 3 \b");
10251  if (kcountHBnegativedirectionRecosignalD3 == 11)
10252  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-6 ; depth = 3 \b");
10253  if (kcountHBnegativedirectionRecosignalD3 == 12)
10254  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-5 ; depth = 3 \b");
10255  if (kcountHBnegativedirectionRecosignalD3 == 13)
10256  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-4 ; depth = 3 \b");
10257  if (kcountHBnegativedirectionRecosignalD3 == 14)
10258  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-3 ; depth = 3 \b");
10259  if (kcountHBnegativedirectionRecosignalD3 == 15)
10260  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-2 ; depth = 3 \b");
10261  if (kcountHBnegativedirectionRecosignalD3 == 16)
10262  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-1 ; depth = 3 \b");
10263  HBnegativedirectionRecosignalD3->Draw("Error");
10264  kcountHBnegativedirectionRecosignalD3++;
10265  if (kcountHBnegativedirectionRecosignalD3 > 16)
10266  break; // 4x6 = 24
10267  } //ccctest>0
10268 
10269  } // for i
10270  } //if(jeta-41 < 0)
10271  } //for jeta
10273  c3x5->Update();
10274  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
10275  c3x5->Clear();
10276  // clean-up
10277  if (h2CeffHBnegativedirectionRecosignalD3)
10278  delete h2CeffHBnegativedirectionRecosignalD3;
10279  //========================================================================================== 22217
10280  //======================================================================
10281  //======================================================================1D plot: D vs phi , different eta, depth=4
10282  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
10283  c3x5->Clear();
10284  c3x5->Divide(4, 4);
10285  c3x5->cd(1);
10286  int kcountHBnegativedirectionRecosignalD4 = 1;
10287  TH1F *h2CeffHBnegativedirectionRecosignalD4 = new TH1F("h2CeffHBnegativedirectionRecosignalD4", "", nphi, 0., 72.);
10288 
10289  for (int jeta = 0; jeta < njeta; jeta++) {
10290  // negativedirectionRecosignalD:
10291  if (jeta - 41 < 0) {
10292  // for (int i=0;i<ndepth;i++) {
10293  // depth=4
10294  for (int i = 3; i < 4; i++) {
10295  TH1F *HBnegativedirectionRecosignalD4 = (TH1F *)h2CeffHBnegativedirectionRecosignalD4->Clone("twod1");
10296 
10297  float ccctest = 0; // to avoid empty massive elements
10298  for (int jphi = 0; jphi < nphi; jphi++) {
10299  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10300  if (arecosignalHB[i][jeta][jphi] > 0.) {
10301  HBnegativedirectionRecosignalD4->Fill(jphi, ccc1);
10302  ccctest = 1.; //HBnegativedirectionRecosignalD4->SetBinError(i,0.01);
10303  }
10304  } // for jphi
10305  if (ccctest > 0.) {
10306  //cout<<"1717 kcountHBnegativedirectionRecosignalD4 = "<<kcountHBnegativedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
10307  c3x5->cd(kcountHBnegativedirectionRecosignalD4);
10308  HBnegativedirectionRecosignalD4->SetMarkerStyle(20);
10309  HBnegativedirectionRecosignalD4->SetMarkerSize(0.4);
10310  HBnegativedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
10311  HBnegativedirectionRecosignalD4->SetXTitle("HBnegativedirectionRecosignalD4 \b");
10312  HBnegativedirectionRecosignalD4->SetMarkerColor(2);
10313  HBnegativedirectionRecosignalD4->SetLineColor(0);
10314  gPad->SetGridy();
10315  gPad->SetGridx();
10316  // gPad->SetLogy();
10317  if (kcountHBnegativedirectionRecosignalD4 == 1)
10318  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
10319  if (kcountHBnegativedirectionRecosignalD4 == 2)
10320  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
10321  if (kcountHBnegativedirectionRecosignalD4 == 3)
10322  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
10323  if (kcountHBnegativedirectionRecosignalD4 == 4)
10324  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
10325  if (kcountHBnegativedirectionRecosignalD4 == 5)
10326  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
10327  if (kcountHBnegativedirectionRecosignalD4 == 6)
10328  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
10329  if (kcountHBnegativedirectionRecosignalD4 == 7)
10330  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
10331  if (kcountHBnegativedirectionRecosignalD4 == 8)
10332  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-9 ; depth = 4 \b");
10333  if (kcountHBnegativedirectionRecosignalD4 == 9)
10334  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-8 ; depth = 4 \b");
10335  if (kcountHBnegativedirectionRecosignalD4 == 10)
10336  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-7 ; depth = 4 \b");
10337  if (kcountHBnegativedirectionRecosignalD4 == 11)
10338  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-6 ; depth = 4 \b");
10339  if (kcountHBnegativedirectionRecosignalD4 == 12)
10340  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-5 ; depth = 4 \b");
10341  if (kcountHBnegativedirectionRecosignalD4 == 13)
10342  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-4 ; depth = 4 \b");
10343  if (kcountHBnegativedirectionRecosignalD4 == 14)
10344  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-3 ; depth = 4 \b");
10345  if (kcountHBnegativedirectionRecosignalD4 == 15)
10346  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-2 ; depth = 4 \b");
10347  if (kcountHBnegativedirectionRecosignalD4 == 16)
10348  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-1 ; depth = 4 \b");
10349  HBnegativedirectionRecosignalD4->Draw("Error");
10350  kcountHBnegativedirectionRecosignalD4++;
10351  if (kcountHBnegativedirectionRecosignalD4 > 16)
10352  break; // 4x6 = 24
10353  } //ccctest>0
10354 
10355  } // for i
10356  } //if(jeta-41 < 0)
10357  } //for jeta
10359  c3x5->Update();
10360  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
10361  c3x5->Clear();
10362  // clean-up
10363  if (h2CeffHBnegativedirectionRecosignalD4)
10364  delete h2CeffHBnegativedirectionRecosignalD4;
10365 
10366  //===================================================================== END of Recosignal HB for phi-symmetry
10367  //===================================================================== END of Recosignal HB for phi-symmetry
10368  //===================================================================== END of Recosignal HB for phi-symmetry
10369 
10373  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
10374  //ndepth = k_max[3];
10375  ndepth = 7;
10376  // const int ndepth = 7;
10377  double arecosignalhe[ndepth][njeta][njphi];
10378  double recosignalvariancehe[ndepth][njeta][njphi];
10379  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HE
10380  TH2F *recSignalEnergy1HE1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HE1");
10381  TH2F *recSignalEnergy0HE1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE1");
10382  TH2F *recSignalEnergyHE1 = (TH2F *)recSignalEnergy1HE1->Clone("recSignalEnergyHE1");
10383  recSignalEnergyHE1->Divide(recSignalEnergy1HE1, recSignalEnergy0HE1, 1, 1, "B");
10384  TH2F *recSignalEnergy1HE2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HE2");
10385  TH2F *recSignalEnergy0HE2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE2");
10386  TH2F *recSignalEnergyHE2 = (TH2F *)recSignalEnergy1HE2->Clone("recSignalEnergyHE2");
10387  recSignalEnergyHE2->Divide(recSignalEnergy1HE2, recSignalEnergy0HE2, 1, 1, "B");
10388  TH2F *recSignalEnergy1HE3 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HE3");
10389  TH2F *recSignalEnergy0HE3 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE3");
10390  TH2F *recSignalEnergyHE3 = (TH2F *)recSignalEnergy1HE3->Clone("recSignalEnergyHE3");
10391  recSignalEnergyHE3->Divide(recSignalEnergy1HE3, recSignalEnergy0HE3, 1, 1, "B");
10392  TH2F *recSignalEnergy1HE4 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HE4");
10393  TH2F *recSignalEnergy0HE4 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE4");
10394  TH2F *recSignalEnergyHE4 = (TH2F *)recSignalEnergy1HE4->Clone("recSignalEnergyHE4");
10395  recSignalEnergyHE4->Divide(recSignalEnergy1HE4, recSignalEnergy0HE4, 1, 1, "B");
10396  TH2F *recSignalEnergy1HE5 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HE5");
10397  TH2F *recSignalEnergy0HE5 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE5");
10398  TH2F *recSignalEnergyHE5 = (TH2F *)recSignalEnergy1HE5->Clone("recSignalEnergyHE5");
10399  recSignalEnergyHE5->Divide(recSignalEnergy1HE5, recSignalEnergy0HE5, 1, 1, "B");
10400  TH2F *recSignalEnergy1HE6 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HE6");
10401  TH2F *recSignalEnergy0HE6 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE6");
10402  TH2F *recSignalEnergyHE6 = (TH2F *)recSignalEnergy1HE6->Clone("recSignalEnergyHE6");
10403  recSignalEnergyHE6->Divide(recSignalEnergy1HE6, recSignalEnergy0HE6, 1, 1, "B");
10404  TH2F *recSignalEnergy1HE7 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HE7");
10405  TH2F *recSignalEnergy0HE7 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE7");
10406  TH2F *recSignalEnergyHE7 = (TH2F *)recSignalEnergy1HE7->Clone("recSignalEnergyHE7");
10407  recSignalEnergyHE7->Divide(recSignalEnergy1HE7, recSignalEnergy0HE7, 1, 1, "B");
10408  for (int jeta = 0; jeta < njeta; jeta++) {
10409  //====================================================================== PHI normalization & put R into massive arecosignalhe
10410  //preparation for PHI normalization:
10411  double sumrecosignalHE0 = 0;
10412  int nsumrecosignalHE0 = 0;
10413  double sumrecosignalHE1 = 0;
10414  int nsumrecosignalHE1 = 0;
10415  double sumrecosignalHE2 = 0;
10416  int nsumrecosignalHE2 = 0;
10417  double sumrecosignalHE3 = 0;
10418  int nsumrecosignalHE3 = 0;
10419  double sumrecosignalHE4 = 0;
10420  int nsumrecosignalHE4 = 0;
10421  double sumrecosignalHE5 = 0;
10422  int nsumrecosignalHE5 = 0;
10423  double sumrecosignalHE6 = 0;
10424  int nsumrecosignalHE6 = 0;
10425  for (int jphi = 0; jphi < njphi; jphi++) {
10426  arecosignalhe[0][jeta][jphi] = recSignalEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
10427  arecosignalhe[1][jeta][jphi] = recSignalEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
10428  arecosignalhe[2][jeta][jphi] = recSignalEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
10429  arecosignalhe[3][jeta][jphi] = recSignalEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
10430  arecosignalhe[4][jeta][jphi] = recSignalEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
10431  arecosignalhe[5][jeta][jphi] = recSignalEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
10432  arecosignalhe[6][jeta][jphi] = recSignalEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
10433  if (arecosignalhe[0][jeta][jphi] > 0.) {
10434  sumrecosignalHE0 += arecosignalhe[0][jeta][jphi];
10435  ++nsumrecosignalHE0;
10436  }
10437  if (arecosignalhe[1][jeta][jphi] > 0.) {
10438  sumrecosignalHE1 += arecosignalhe[1][jeta][jphi];
10439  ++nsumrecosignalHE1;
10440  }
10441  if (arecosignalhe[2][jeta][jphi] > 0.) {
10442  sumrecosignalHE2 += arecosignalhe[2][jeta][jphi];
10443  ++nsumrecosignalHE2;
10444  }
10445  if (arecosignalhe[3][jeta][jphi] > 0.) {
10446  sumrecosignalHE3 += arecosignalhe[3][jeta][jphi];
10447  ++nsumrecosignalHE3;
10448  }
10449  if (arecosignalhe[4][jeta][jphi] > 0.) {
10450  sumrecosignalHE4 += arecosignalhe[4][jeta][jphi];
10451  ++nsumrecosignalHE4;
10452  }
10453  if (arecosignalhe[5][jeta][jphi] > 0.) {
10454  sumrecosignalHE5 += arecosignalhe[5][jeta][jphi];
10455  ++nsumrecosignalHE5;
10456  }
10457  if (arecosignalhe[6][jeta][jphi] > 0.) {
10458  sumrecosignalHE6 += arecosignalhe[6][jeta][jphi];
10459  ++nsumrecosignalHE6;
10460  }
10461  } // phi
10462  // PHI normalization:
10463  for (int jphi = 0; jphi < njphi; jphi++) {
10464  if (arecosignalhe[0][jeta][jphi] > 0.)
10465  arecosignalhe[0][jeta][jphi] /= (sumrecosignalHE0 / nsumrecosignalHE0);
10466  if (arecosignalhe[1][jeta][jphi] > 0.)
10467  arecosignalhe[1][jeta][jphi] /= (sumrecosignalHE1 / nsumrecosignalHE1);
10468  if (arecosignalhe[2][jeta][jphi] > 0.)
10469  arecosignalhe[2][jeta][jphi] /= (sumrecosignalHE2 / nsumrecosignalHE2);
10470  if (arecosignalhe[3][jeta][jphi] > 0.)
10471  arecosignalhe[3][jeta][jphi] /= (sumrecosignalHE3 / nsumrecosignalHE3);
10472  if (arecosignalhe[4][jeta][jphi] > 0.)
10473  arecosignalhe[4][jeta][jphi] /= (sumrecosignalHE4 / nsumrecosignalHE4);
10474  if (arecosignalhe[5][jeta][jphi] > 0.)
10475  arecosignalhe[5][jeta][jphi] /= (sumrecosignalHE5 / nsumrecosignalHE5);
10476  if (arecosignalhe[6][jeta][jphi] > 0.)
10477  arecosignalhe[6][jeta][jphi] /= (sumrecosignalHE6 / nsumrecosignalHE6);
10478  } // phi
10479  } //eta
10480  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
10481  //======================================================================
10482  //======================================================================
10483  //cout<<" R2D-eta/phi-plot: R, averaged over depthes *****" <<endl;
10484  c2x1->Clear();
10486  c2x1->Divide(2, 1);
10487  c2x1->cd(1);
10488  TH2F *GefzRrecosignalHE42D = new TH2F("GefzRrecosignalHE42D", "", neta, -41., 41., nphi, 0., 72.);
10489  TH2F *GefzRrecosignalHE42D0 = new TH2F("GefzRrecosignalHE42D0", "", neta, -41., 41., nphi, 0., 72.);
10490  TH2F *GefzRrecosignalHE42DF = (TH2F *)GefzRrecosignalHE42D0->Clone("GefzRrecosignalHE42DF");
10491  for (int i = 0; i < ndepth; i++) {
10492  for (int jeta = 0; jeta < neta; jeta++) {
10493  for (int jphi = 0; jphi < nphi; jphi++) {
10494  double ccc1 = arecosignalhe[i][jeta][jphi];
10495  int k2plot = jeta - 41;
10496  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
10497  if (ccc1 != 0.) {
10498  GefzRrecosignalHE42D->Fill(kkk, jphi, ccc1);
10499  GefzRrecosignalHE42D0->Fill(kkk, jphi, 1.);
10500  }
10501  }
10502  }
10503  }
10504  GefzRrecosignalHE42DF->Divide(GefzRrecosignalHE42D, GefzRrecosignalHE42D0, 1, 1, "B"); // average A
10505  gPad->SetGridy();
10506  gPad->SetGridx(); // gPad->SetLogz();
10507  GefzRrecosignalHE42DF->SetXTitle("<R>_depth #eta \b");
10508  GefzRrecosignalHE42DF->SetYTitle(" #phi \b");
10509  GefzRrecosignalHE42DF->Draw("COLZ");
10510 
10511  c2x1->cd(2);
10512  TH1F *energyhitSignal_HE = (TH1F *)dir->FindObjectAny("h_energyhitSignal_HE");
10513  energyhitSignal_HE->SetMarkerStyle(20);
10514  energyhitSignal_HE->SetMarkerSize(0.4);
10515  energyhitSignal_HE->GetYaxis()->SetLabelSize(0.04);
10516  energyhitSignal_HE->SetXTitle("energyhitSignal_HE \b");
10517  energyhitSignal_HE->SetMarkerColor(2);
10518  energyhitSignal_HE->SetLineColor(0);
10519  gPad->SetGridy();
10520  gPad->SetGridx();
10521  energyhitSignal_HE->Draw("Error");
10522 
10524  c2x1->Update();
10525  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHE.png");
10526  c2x1->Clear();
10527  // clean-up
10528  if (GefzRrecosignalHE42D)
10529  delete GefzRrecosignalHE42D;
10530  if (GefzRrecosignalHE42D0)
10531  delete GefzRrecosignalHE42D0;
10532  if (GefzRrecosignalHE42DF)
10533  delete GefzRrecosignalHE42DF;
10534  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
10535  //======================================================================
10536  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
10537  c1x1->Clear();
10539  c1x1->Divide(1, 1);
10540  c1x1->cd(1);
10541  TH1F *GefzRrecosignalHE41D = new TH1F("GefzRrecosignalHE41D", "", nphi, 0., 72.);
10542  TH1F *GefzRrecosignalHE41D0 = new TH1F("GefzRrecosignalHE41D0", "", nphi, 0., 72.);
10543  TH1F *GefzRrecosignalHE41DF = (TH1F *)GefzRrecosignalHE41D0->Clone("GefzRrecosignalHE41DF");
10544  for (int jphi = 0; jphi < nphi; jphi++) {
10545  for (int jeta = 0; jeta < neta; jeta++) {
10546  for (int i = 0; i < ndepth; i++) {
10547  double ccc1 = arecosignalhe[i][jeta][jphi];
10548  if (ccc1 != 0.) {
10549  GefzRrecosignalHE41D->Fill(jphi, ccc1);
10550  GefzRrecosignalHE41D0->Fill(jphi, 1.);
10551  }
10552  }
10553  }
10554  }
10555  GefzRrecosignalHE41DF->Divide(
10556  GefzRrecosignalHE41D, GefzRrecosignalHE41D0, 1, 1, "B"); // R averaged over depthes & eta
10557  GefzRrecosignalHE41D0->Sumw2();
10558  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHE41DF->SetBinError(jphi,0.01);}
10559  gPad->SetGridy();
10560  gPad->SetGridx(); // gPad->SetLogz();
10561  GefzRrecosignalHE41DF->SetMarkerStyle(20);
10562  GefzRrecosignalHE41DF->SetMarkerSize(1.4);
10563  GefzRrecosignalHE41DF->GetZaxis()->SetLabelSize(0.08);
10564  GefzRrecosignalHE41DF->SetXTitle("#phi \b");
10565  GefzRrecosignalHE41DF->SetYTitle(" <R> \b");
10566  GefzRrecosignalHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
10567  GefzRrecosignalHE41DF->SetMarkerColor(4);
10568  GefzRrecosignalHE41DF->SetLineColor(
10569  4); // GefzRrecosignalHE41DF->SetMinimum(0.8); // GefzRrecosignalHE41DF->SetMaximum(1.000);
10570  GefzRrecosignalHE41DF->Draw("Error");
10572  c1x1->Update();
10573  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHE.png");
10574  c1x1->Clear();
10575  // clean-up
10576  if (GefzRrecosignalHE41D)
10577  delete GefzRrecosignalHE41D;
10578  if (GefzRrecosignalHE41D0)
10579  delete GefzRrecosignalHE41D0;
10580  if (GefzRrecosignalHE41DF)
10581  delete GefzRrecosignalHE41DF;
10582 
10583  //========================================================================================== 4
10584  //======================================================================
10585  //======================================================================1D plot: R vs phi , different eta, depth=1
10586  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
10587  c3x5->Clear();
10589  c3x5->Divide(3, 5);
10590  c3x5->cd(1);
10591  int kcountHEpositivedirectionRecosignal1 = 1;
10592  TH1F *h2CeffHEpositivedirectionRecosignal1 = new TH1F("h2CeffHEpositivedirectionRecosignal1", "", nphi, 0., 72.);
10593  for (int jeta = 0; jeta < njeta; jeta++) {
10594  // positivedirectionRecosignal:
10595  if (jeta - 41 >= 0) {
10596  // for (int i=0;i<ndepth;i++) {
10597  // depth=1
10598  for (int i = 0; i < 1; i++) {
10599  TH1F *HEpositivedirectionRecosignal1 = (TH1F *)h2CeffHEpositivedirectionRecosignal1->Clone("twod1");
10600  float ccctest = 0; // to avoid empty massive elements
10601  for (int jphi = 0; jphi < nphi; jphi++) {
10602  double ccc1 = arecosignalhe[i][jeta][jphi];
10603  if (ccc1 != 0.) {
10604  HEpositivedirectionRecosignal1->Fill(jphi, ccc1);
10605  ccctest = 1.; //HEpositivedirectionRecosignal1->SetBinError(i,0.01);
10606  }
10607  } // for jphi
10608  if (ccctest > 0.) {
10609  // cout<<"444 kcountHEpositivedirectionRecosignal1 = "<<kcountHEpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
10610  c3x5->cd(kcountHEpositivedirectionRecosignal1);
10611  HEpositivedirectionRecosignal1->SetMarkerStyle(20);
10612  HEpositivedirectionRecosignal1->SetMarkerSize(0.4);
10613  HEpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
10614  HEpositivedirectionRecosignal1->SetXTitle("HEpositivedirectionRecosignal1 \b");
10615  HEpositivedirectionRecosignal1->SetMarkerColor(2);
10616  HEpositivedirectionRecosignal1->SetLineColor(0);
10617  gPad->SetGridy();
10618  gPad->SetGridx();
10619  // gPad->SetLogy();
10620  if (kcountHEpositivedirectionRecosignal1 == 1)
10621  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
10622  if (kcountHEpositivedirectionRecosignal1 == 2)
10623  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
10624  if (kcountHEpositivedirectionRecosignal1 == 3)
10625  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
10626  if (kcountHEpositivedirectionRecosignal1 == 4)
10627  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
10628  if (kcountHEpositivedirectionRecosignal1 == 5)
10629  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
10630  if (kcountHEpositivedirectionRecosignal1 == 6)
10631  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
10632  if (kcountHEpositivedirectionRecosignal1 == 7)
10633  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
10634  if (kcountHEpositivedirectionRecosignal1 == 8)
10635  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
10636  if (kcountHEpositivedirectionRecosignal1 == 9)
10637  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
10638  if (kcountHEpositivedirectionRecosignal1 == 10)
10639  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
10640  if (kcountHEpositivedirectionRecosignal1 == 11)
10641  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
10642  if (kcountHEpositivedirectionRecosignal1 == 12)
10643  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
10644  HEpositivedirectionRecosignal1->Draw("Error");
10645  kcountHEpositivedirectionRecosignal1++;
10646  if (kcountHEpositivedirectionRecosignal1 > 12)
10647  break; // 4x6 = 24
10648  } //ccctest>0
10649 
10650  } // for i
10651  } //if(jeta-41 >= 0)
10652  } //for jeta
10654  c3x5->Update();
10655  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
10656  c3x5->Clear();
10657  // clean-up
10658  if (h2CeffHEpositivedirectionRecosignal1)
10659  delete h2CeffHEpositivedirectionRecosignal1;
10660 
10661  //========================================================================================== 5
10662  //======================================================================
10663  //======================================================================1D plot: R vs phi , different eta, depth=2
10664  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
10665  c3x5->Clear();
10667  c3x5->Divide(3, 5);
10668  c3x5->cd(1);
10669  int kcountHEpositivedirectionRecosignal2 = 1;
10670  TH1F *h2CeffHEpositivedirectionRecosignal2 = new TH1F("h2CeffHEpositivedirectionRecosignal2", "", nphi, 0., 72.);
10671  for (int jeta = 0; jeta < njeta; jeta++) {
10672  // positivedirectionRecosignal:
10673  if (jeta - 41 >= 0) {
10674  // for (int i=0;i<ndepth;i++) {
10675  // depth=2
10676  for (int i = 1; i < 2; i++) {
10677  TH1F *HEpositivedirectionRecosignal2 = (TH1F *)h2CeffHEpositivedirectionRecosignal2->Clone("twod1");
10678  float ccctest = 0; // to avoid empty massive elements
10679  for (int jphi = 0; jphi < nphi; jphi++) {
10680  double ccc1 = arecosignalhe[i][jeta][jphi];
10681  if (ccc1 != 0.) {
10682  HEpositivedirectionRecosignal2->Fill(jphi, ccc1);
10683  ccctest = 1.; //HEpositivedirectionRecosignal2->SetBinError(i,0.01);
10684  }
10685  } // for jphi
10686  if (ccctest > 0.) {
10687  //cout<<"555 kcountHEpositivedirectionRecosignal2 = "<<kcountHEpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
10688  c3x5->cd(kcountHEpositivedirectionRecosignal2);
10689  HEpositivedirectionRecosignal2->SetMarkerStyle(20);
10690  HEpositivedirectionRecosignal2->SetMarkerSize(0.4);
10691  HEpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
10692  HEpositivedirectionRecosignal2->SetXTitle("HEpositivedirectionRecosignal2 \b");
10693  HEpositivedirectionRecosignal2->SetMarkerColor(2);
10694  HEpositivedirectionRecosignal2->SetLineColor(0);
10695  gPad->SetGridy();
10696  gPad->SetGridx();
10697  // gPad->SetLogy();
10698  if (kcountHEpositivedirectionRecosignal2 == 1)
10699  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
10700  if (kcountHEpositivedirectionRecosignal2 == 2)
10701  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
10702  if (kcountHEpositivedirectionRecosignal2 == 3)
10703  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
10704  if (kcountHEpositivedirectionRecosignal2 == 4)
10705  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
10706  if (kcountHEpositivedirectionRecosignal2 == 5)
10707  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
10708  if (kcountHEpositivedirectionRecosignal2 == 6)
10709  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
10710  if (kcountHEpositivedirectionRecosignal2 == 7)
10711  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
10712  if (kcountHEpositivedirectionRecosignal2 == 8)
10713  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
10714  if (kcountHEpositivedirectionRecosignal2 == 9)
10715  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
10716  if (kcountHEpositivedirectionRecosignal2 == 10)
10717  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
10718  if (kcountHEpositivedirectionRecosignal2 == 11)
10719  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
10720  if (kcountHEpositivedirectionRecosignal2 == 12)
10721  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
10722  if (kcountHEpositivedirectionRecosignal2 == 13)
10723  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
10724  HEpositivedirectionRecosignal2->Draw("Error");
10725  kcountHEpositivedirectionRecosignal2++;
10726  if (kcountHEpositivedirectionRecosignal2 > 13)
10727  break; // 4x6 = 24
10728  } //ccctest>0
10729 
10730  } // for i
10731  } //if(jeta-41 >= 0)
10732  } //for jeta
10734  c3x5->Update();
10735  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
10736  c3x5->Clear();
10737  // clean-up
10738  if (h2CeffHEpositivedirectionRecosignal2)
10739  delete h2CeffHEpositivedirectionRecosignal2;
10740  //========================================================================================== 6
10741  //======================================================================
10742  //======================================================================1D plot: R vs phi , different eta, depth=3
10743  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
10744  c3x5->Clear();
10746  c3x5->Divide(3, 5);
10747  c3x5->cd(1);
10748  int kcountHEpositivedirectionRecosignal3 = 1;
10749  TH1F *h2CeffHEpositivedirectionRecosignal3 = new TH1F("h2CeffHEpositivedirectionRecosignal3", "", nphi, 0., 72.);
10750  for (int jeta = 0; jeta < njeta; jeta++) {
10751  // positivedirectionRecosignal:
10752  if (jeta - 41 >= 0) {
10753  // for (int i=0;i<ndepth;i++) {
10754  // depth=3
10755  for (int i = 2; i < 3; i++) {
10756  TH1F *HEpositivedirectionRecosignal3 = (TH1F *)h2CeffHEpositivedirectionRecosignal3->Clone("twod1");
10757  float ccctest = 0; // to avoid empty massive elements
10758  for (int jphi = 0; jphi < nphi; jphi++) {
10759  double ccc1 = arecosignalhe[i][jeta][jphi];
10760  if (ccc1 != 0.) {
10761  HEpositivedirectionRecosignal3->Fill(jphi, ccc1);
10762  ccctest = 1.; //HEpositivedirectionRecosignal3->SetBinError(i,0.01);
10763  }
10764  } // for jphi
10765  if (ccctest > 0.) {
10766  //cout<<"666 kcountHEpositivedirectionRecosignal3 = "<<kcountHEpositivedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
10767  c3x5->cd(kcountHEpositivedirectionRecosignal3);
10768  HEpositivedirectionRecosignal3->SetMarkerStyle(20);
10769  HEpositivedirectionRecosignal3->SetMarkerSize(0.4);
10770  HEpositivedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
10771  HEpositivedirectionRecosignal3->SetXTitle("HEpositivedirectionRecosignal3 \b");
10772  HEpositivedirectionRecosignal3->SetMarkerColor(2);
10773  HEpositivedirectionRecosignal3->SetLineColor(0);
10774  gPad->SetGridy();
10775  gPad->SetGridx();
10776  // gPad->SetLogy();
10777  if (kcountHEpositivedirectionRecosignal3 == 1)
10778  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
10779  if (kcountHEpositivedirectionRecosignal3 == 2)
10780  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
10781  if (kcountHEpositivedirectionRecosignal3 == 3)
10782  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
10783  if (kcountHEpositivedirectionRecosignal3 == 4)
10784  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
10785  if (kcountHEpositivedirectionRecosignal3 == 5)
10786  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
10787  if (kcountHEpositivedirectionRecosignal3 == 6)
10788  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
10789  if (kcountHEpositivedirectionRecosignal3 == 7)
10790  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
10791  if (kcountHEpositivedirectionRecosignal3 == 8)
10792  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
10793  if (kcountHEpositivedirectionRecosignal3 == 9)
10794  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
10795  if (kcountHEpositivedirectionRecosignal3 == 10)
10796  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
10797  if (kcountHEpositivedirectionRecosignal3 == 11)
10798  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
10799  if (kcountHEpositivedirectionRecosignal3 == 12)
10800  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
10801  if (kcountHEpositivedirectionRecosignal3 == 13)
10802  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
10803  HEpositivedirectionRecosignal3->Draw("Error");
10804  kcountHEpositivedirectionRecosignal3++;
10805  if (kcountHEpositivedirectionRecosignal3 > 13)
10806  break; // 4x6 = 24
10807  } //ccctest>0
10808 
10809  } // for i
10810  } //if(jeta-41 >= 0)
10811  } //for jeta
10813  c3x5->Update();
10814  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
10815  c3x5->Clear();
10816  // clean-up
10817  if (h2CeffHEpositivedirectionRecosignal3)
10818  delete h2CeffHEpositivedirectionRecosignal3;
10819  //========================================================================================== 7
10820  //======================================================================
10821  //======================================================================1D plot: R vs phi , different eta, depth=4
10822  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
10823  c3x5->Clear();
10825  c3x5->Divide(3, 5);
10826  c3x5->cd(1);
10827  int kcountHEpositivedirectionRecosignal4 = 1;
10828  TH1F *h2CeffHEpositivedirectionRecosignal4 = new TH1F("h2CeffHEpositivedirectionRecosignal4", "", nphi, 0., 72.);
10829 
10830  for (int jeta = 0; jeta < njeta; jeta++) {
10831  // positivedirectionRecosignal:
10832  if (jeta - 41 >= 0) {
10833  // for (int i=0;i<ndepth;i++) {
10834  // depth=4
10835  for (int i = 3; i < 4; i++) {
10836  TH1F *HEpositivedirectionRecosignal4 = (TH1F *)h2CeffHEpositivedirectionRecosignal4->Clone("twod1");
10837 
10838  float ccctest = 0; // to avoid empty massive elements
10839  for (int jphi = 0; jphi < nphi; jphi++) {
10840  double ccc1 = arecosignalhe[i][jeta][jphi];
10841  if (ccc1 != 0.) {
10842  HEpositivedirectionRecosignal4->Fill(jphi, ccc1);
10843  ccctest = 1.; //HEpositivedirectionRecosignal4->SetBinError(i,0.01);
10844  }
10845  } // for jphi
10846  if (ccctest > 0.) {
10847  //cout<<"777 kcountHEpositivedirectionRecosignal4 = "<<kcountHEpositivedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
10848  c3x5->cd(kcountHEpositivedirectionRecosignal4);
10849  HEpositivedirectionRecosignal4->SetMarkerStyle(20);
10850  HEpositivedirectionRecosignal4->SetMarkerSize(0.4);
10851  HEpositivedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
10852  HEpositivedirectionRecosignal4->SetXTitle("HEpositivedirectionRecosignal4 \b");
10853  HEpositivedirectionRecosignal4->SetMarkerColor(2);
10854  HEpositivedirectionRecosignal4->SetLineColor(0);
10855  gPad->SetGridy();
10856  gPad->SetGridx();
10857  // gPad->SetLogy();
10858  if (kcountHEpositivedirectionRecosignal4 == 1)
10859  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
10860  if (kcountHEpositivedirectionRecosignal4 == 2)
10861  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
10862  if (kcountHEpositivedirectionRecosignal4 == 3)
10863  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
10864  if (kcountHEpositivedirectionRecosignal4 == 4)
10865  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
10866  if (kcountHEpositivedirectionRecosignal4 == 5)
10867  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
10868  if (kcountHEpositivedirectionRecosignal4 == 6)
10869  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
10870  if (kcountHEpositivedirectionRecosignal4 == 7)
10871  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
10872  if (kcountHEpositivedirectionRecosignal4 == 8)
10873  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
10874  if (kcountHEpositivedirectionRecosignal4 == 9)
10875  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
10876  if (kcountHEpositivedirectionRecosignal4 == 10)
10877  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
10878  if (kcountHEpositivedirectionRecosignal4 == 11)
10879  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
10880  if (kcountHEpositivedirectionRecosignal4 == 12)
10881  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
10882  HEpositivedirectionRecosignal4->Draw("Error");
10883  kcountHEpositivedirectionRecosignal4++;
10884  if (kcountHEpositivedirectionRecosignal4 > 12)
10885  break; // 4x6 = 24
10886  } //ccctest>0
10887 
10888  } // for i
10889  } //if(jeta-41 >= 0)
10890  } //for jeta
10892  c3x5->Update();
10893  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
10894  c3x5->Clear();
10895  // clean-up
10896  if (h2CeffHEpositivedirectionRecosignal4)
10897  delete h2CeffHEpositivedirectionRecosignal4;
10898  //========================================================================================== 8
10899  //======================================================================
10900  //======================================================================1D plot: R vs phi , different eta, depth=5
10901  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
10902  c3x5->Clear();
10904  c3x5->Divide(3, 5);
10905  c3x5->cd(1);
10906  int kcountHEpositivedirectionRecosignal5 = 1;
10907  TH1F *h2CeffHEpositivedirectionRecosignal5 = new TH1F("h2CeffHEpositivedirectionRecosignal5", "", nphi, 0., 72.);
10908 
10909  for (int jeta = 0; jeta < njeta; jeta++) {
10910  // positivedirectionRecosignal:
10911  if (jeta - 41 >= 0) {
10912  // for (int i=0;i<ndepth;i++) {
10913  // depth=5
10914  for (int i = 4; i < 5; i++) {
10915  TH1F *HEpositivedirectionRecosignal5 = (TH1F *)h2CeffHEpositivedirectionRecosignal5->Clone("twod1");
10916 
10917  float ccctest = 0; // to avoid empty massive elements
10918  for (int jphi = 0; jphi < nphi; jphi++) {
10919  // cout<<"888 initial kcountHEpositivedirectionRecosignal5 = "<<kcountHEpositivedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" arecosignalhe[i][jeta][jphi]= "<< arecosignalhe[i][jeta][jphi] <<" depth= "<< i <<endl;
10920 
10921  double ccc1 = arecosignalhe[i][jeta][jphi];
10922  if (ccc1 != 0.) {
10923  HEpositivedirectionRecosignal5->Fill(jphi, ccc1);
10924  ccctest = 1.; //HEpositivedirectionRecosignal5->SetBinError(i,0.01);
10925  }
10926  } // for jphi
10927  if (ccctest > 0.) {
10928  //cout<<"888 kcountHEpositivedirectionRecosignal5 = "<<kcountHEpositivedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<endl;
10929  c3x5->cd(kcountHEpositivedirectionRecosignal5);
10930  HEpositivedirectionRecosignal5->SetMarkerStyle(20);
10931  HEpositivedirectionRecosignal5->SetMarkerSize(0.4);
10932  HEpositivedirectionRecosignal5->GetYaxis()->SetLabelSize(0.04);
10933  HEpositivedirectionRecosignal5->SetXTitle("HEpositivedirectionRecosignal5 \b");
10934  HEpositivedirectionRecosignal5->SetMarkerColor(2);
10935  HEpositivedirectionRecosignal5->SetLineColor(0);
10936  gPad->SetGridy();
10937  gPad->SetGridx();
10938  // gPad->SetLogy();
10939  if (kcountHEpositivedirectionRecosignal5 == 1)
10940  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
10941  if (kcountHEpositivedirectionRecosignal5 == 2)
10942  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
10943  if (kcountHEpositivedirectionRecosignal5 == 3)
10944  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
10945  if (kcountHEpositivedirectionRecosignal5 == 4)
10946  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
10947  if (kcountHEpositivedirectionRecosignal5 == 5)
10948  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
10949  if (kcountHEpositivedirectionRecosignal5 == 6)
10950  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
10951  if (kcountHEpositivedirectionRecosignal5 == 7)
10952  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
10953  if (kcountHEpositivedirectionRecosignal5 == 8)
10954  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
10955  if (kcountHEpositivedirectionRecosignal5 == 9)
10956  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
10957  if (kcountHEpositivedirectionRecosignal5 == 10)
10958  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
10959  if (kcountHEpositivedirectionRecosignal5 == 11)
10960  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
10961  HEpositivedirectionRecosignal5->Draw("Error");
10962  kcountHEpositivedirectionRecosignal5++;
10963  if (kcountHEpositivedirectionRecosignal5 > 11)
10964  break; // 4x6 = 24
10965  } //ccctest>0
10966 
10967  } // for i
10968  } //if(jeta-41 >= 0)
10969  } //for jeta
10971  c3x5->Update();
10972  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
10973  c3x5->Clear();
10974  // clean-up
10975  if (h2CeffHEpositivedirectionRecosignal5)
10976  delete h2CeffHEpositivedirectionRecosignal5;
10977  //========================================================================================== 9
10978  //======================================================================
10979  //======================================================================1D plot: R vs phi , different eta, depth=6
10980  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
10981  c3x5->Clear();
10983  c3x5->Divide(3, 5);
10984  c3x5->cd(1);
10985  int kcountHEpositivedirectionRecosignal6 = 1;
10986  TH1F *h2CeffHEpositivedirectionRecosignal6 = new TH1F("h2CeffHEpositivedirectionRecosignal6", "", nphi, 0., 72.);
10987 
10988  for (int jeta = 0; jeta < njeta; jeta++) {
10989  // positivedirectionRecosignal:
10990  if (jeta - 41 >= 0) {
10991  // for (int i=0;i<ndepth;i++) {
10992  // depth=6
10993  for (int i = 5; i < 6; i++) {
10994  TH1F *HEpositivedirectionRecosignal6 = (TH1F *)h2CeffHEpositivedirectionRecosignal6->Clone("twod1");
10995 
10996  float ccctest = 0; // to avoid empty massive elements
10997  for (int jphi = 0; jphi < nphi; jphi++) {
10998  double ccc1 = arecosignalhe[i][jeta][jphi];
10999  if (ccc1 != 0.) {
11000  HEpositivedirectionRecosignal6->Fill(jphi, ccc1);
11001  ccctest = 1.; //HEpositivedirectionRecosignal6->SetBinError(i,0.01);
11002  }
11003  } // for jphi
11004  if (ccctest > 0.) {
11005  //cout<<"999 kcountHEpositivedirectionRecosignal6 = "<<kcountHEpositivedirectionRecosignal6 <<" jeta-41= "<< jeta-41 <<endl;
11006  c3x5->cd(kcountHEpositivedirectionRecosignal6);
11007  HEpositivedirectionRecosignal6->SetMarkerStyle(20);
11008  HEpositivedirectionRecosignal6->SetMarkerSize(0.4);
11009  HEpositivedirectionRecosignal6->GetYaxis()->SetLabelSize(0.04);
11010  HEpositivedirectionRecosignal6->SetXTitle("HEpositivedirectionRecosignal6 \b");
11011  HEpositivedirectionRecosignal6->SetMarkerColor(2);
11012  HEpositivedirectionRecosignal6->SetLineColor(0);
11013  gPad->SetGridy();
11014  gPad->SetGridx();
11015  // gPad->SetLogy();
11016  if (kcountHEpositivedirectionRecosignal6 == 1)
11017  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
11018  if (kcountHEpositivedirectionRecosignal6 == 2)
11019  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
11020  if (kcountHEpositivedirectionRecosignal6 == 3)
11021  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
11022  if (kcountHEpositivedirectionRecosignal6 == 4)
11023  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
11024  if (kcountHEpositivedirectionRecosignal6 == 5)
11025  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
11026  if (kcountHEpositivedirectionRecosignal6 == 6)
11027  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
11028  if (kcountHEpositivedirectionRecosignal6 == 7)
11029  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
11030  if (kcountHEpositivedirectionRecosignal6 == 8)
11031  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
11032  if (kcountHEpositivedirectionRecosignal6 == 9)
11033  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
11034  if (kcountHEpositivedirectionRecosignal6 == 10)
11035  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
11036  HEpositivedirectionRecosignal6->Draw("Error");
11037  kcountHEpositivedirectionRecosignal6++;
11038  if (kcountHEpositivedirectionRecosignal6 > 10)
11039  break; // 4x6 = 24
11040  } //ccctest>0
11041 
11042  } // for i
11043  } //if(jeta-41 >= 0)
11044  } //for jeta
11046  c3x5->Update();
11047  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
11048  c3x5->Clear();
11049  // clean-up
11050  if (h2CeffHEpositivedirectionRecosignal6)
11051  delete h2CeffHEpositivedirectionRecosignal6;
11052  //========================================================================================== 10
11053  //======================================================================
11054  //======================================================================1D plot: R vs phi , different eta, depth=7
11055  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
11056  c3x5->Clear();
11058  c3x5->Divide(3, 5);
11059  c3x5->cd(1);
11060  int kcountHEpositivedirectionRecosignal7 = 1;
11061  TH1F *h2CeffHEpositivedirectionRecosignal7 = new TH1F("h2CeffHEpositivedirectionRecosignal7", "", nphi, 0., 72.);
11062 
11063  for (int jeta = 0; jeta < njeta; jeta++) {
11064  // positivedirectionRecosignal:
11065  if (jeta - 41 >= 0) {
11066  // for (int i=0;i<ndepth;i++) {
11067  // depth=7
11068  for (int i = 6; i < 7; i++) {
11069  TH1F *HEpositivedirectionRecosignal7 = (TH1F *)h2CeffHEpositivedirectionRecosignal7->Clone("twod1");
11070 
11071  float ccctest = 0; // to avoid empty massive elements
11072  for (int jphi = 0; jphi < nphi; jphi++) {
11073  double ccc1 = arecosignalhe[i][jeta][jphi];
11074  if (ccc1 != 0.) {
11075  HEpositivedirectionRecosignal7->Fill(jphi, ccc1);
11076  ccctest = 1.; //HEpositivedirectionRecosignal7->SetBinError(i,0.01);
11077  }
11078  } // for jphi
11079  if (ccctest > 0.) {
11080  //cout<<"1010 kcountHEpositivedirectionRecosignal7 = "<<kcountHEpositivedirectionRecosignal7 <<" jeta-41= "<< jeta-41 <<endl;
11081  c3x5->cd(kcountHEpositivedirectionRecosignal7);
11082  HEpositivedirectionRecosignal7->SetMarkerStyle(20);
11083  HEpositivedirectionRecosignal7->SetMarkerSize(0.4);
11084  HEpositivedirectionRecosignal7->GetYaxis()->SetLabelSize(0.04);
11085  HEpositivedirectionRecosignal7->SetXTitle("HEpositivedirectionRecosignal7 \b");
11086  HEpositivedirectionRecosignal7->SetMarkerColor(2);
11087  HEpositivedirectionRecosignal7->SetLineColor(0);
11088  gPad->SetGridy();
11089  gPad->SetGridx();
11090  // gPad->SetLogy();
11091  if (kcountHEpositivedirectionRecosignal7 == 1)
11092  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
11093  if (kcountHEpositivedirectionRecosignal7 == 2)
11094  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
11095  if (kcountHEpositivedirectionRecosignal7 == 3)
11096  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
11097  HEpositivedirectionRecosignal7->Draw("Error");
11098  kcountHEpositivedirectionRecosignal7++;
11099  if (kcountHEpositivedirectionRecosignal7 > 3)
11100  break; //
11101  } //ccctest>0
11102 
11103  } // for i
11104  } //if(jeta-41 >= 0)
11105  } //for jeta
11107  c3x5->Update();
11108  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
11109  c3x5->Clear();
11110  // clean-up
11111  if (h2CeffHEpositivedirectionRecosignal7)
11112  delete h2CeffHEpositivedirectionRecosignal7;
11113 
11115  //========================================================================================== 1114
11116  //======================================================================
11117  //======================================================================1D plot: R vs phi , different eta, depth=1
11118  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
11119  c3x5->Clear();
11121  c3x5->Divide(3, 5);
11122  c3x5->cd(1);
11123  int kcountHEnegativedirectionRecosignal1 = 1;
11124  TH1F *h2CeffHEnegativedirectionRecosignal1 = new TH1F("h2CeffHEnegativedirectionRecosignal1", "", nphi, 0., 72.);
11125  for (int jeta = 0; jeta < njeta; jeta++) {
11126  // negativedirectionRecosignal:
11127  if (jeta - 41 < 0) {
11128  // for (int i=0;i<ndepth;i++) {
11129  // depth=1
11130  for (int i = 0; i < 1; i++) {
11131  TH1F *HEnegativedirectionRecosignal1 = (TH1F *)h2CeffHEnegativedirectionRecosignal1->Clone("twod1");
11132  float ccctest = 0; // to avoid empty massive elements
11133  for (int jphi = 0; jphi < nphi; jphi++) {
11134  double ccc1 = arecosignalhe[i][jeta][jphi];
11135  if (ccc1 != 0.) {
11136  HEnegativedirectionRecosignal1->Fill(jphi, ccc1);
11137  ccctest = 1.; //HEnegativedirectionRecosignal1->SetBinError(i,0.01);
11138  }
11139  } // for jphi
11140  if (ccctest > 0.) {
11141  // cout<<"444 kcountHEnegativedirectionRecosignal1 = "<<kcountHEnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
11142  c3x5->cd(kcountHEnegativedirectionRecosignal1);
11143  HEnegativedirectionRecosignal1->SetMarkerStyle(20);
11144  HEnegativedirectionRecosignal1->SetMarkerSize(0.4);
11145  HEnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
11146  HEnegativedirectionRecosignal1->SetXTitle("HEnegativedirectionRecosignal1 \b");
11147  HEnegativedirectionRecosignal1->SetMarkerColor(2);
11148  HEnegativedirectionRecosignal1->SetLineColor(0);
11149  gPad->SetGridy();
11150  gPad->SetGridx();
11151  // gPad->SetLogy();
11152  if (kcountHEnegativedirectionRecosignal1 == 1)
11153  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
11154  if (kcountHEnegativedirectionRecosignal1 == 2)
11155  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
11156  if (kcountHEnegativedirectionRecosignal1 == 3)
11157  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
11158  if (kcountHEnegativedirectionRecosignal1 == 4)
11159  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
11160  if (kcountHEnegativedirectionRecosignal1 == 5)
11161  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
11162  if (kcountHEnegativedirectionRecosignal1 == 6)
11163  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
11164  if (kcountHEnegativedirectionRecosignal1 == 7)
11165  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
11166  if (kcountHEnegativedirectionRecosignal1 == 8)
11167  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
11168  if (kcountHEnegativedirectionRecosignal1 == 9)
11169  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
11170  if (kcountHEnegativedirectionRecosignal1 == 10)
11171  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
11172  if (kcountHEnegativedirectionRecosignal1 == 11)
11173  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
11174  if (kcountHEnegativedirectionRecosignal1 == 12)
11175  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
11176  HEnegativedirectionRecosignal1->Draw("Error");
11177  kcountHEnegativedirectionRecosignal1++;
11178  if (kcountHEnegativedirectionRecosignal1 > 12)
11179  break; // 4x6 = 24
11180  } //ccctest>0
11181 
11182  } // for i
11183  } //if(jeta-41 < 0)
11184  } //for jeta
11186  c3x5->Update();
11187  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
11188  c3x5->Clear();
11189  // clean-up
11190  if (h2CeffHEnegativedirectionRecosignal1)
11191  delete h2CeffHEnegativedirectionRecosignal1;
11192 
11193  //========================================================================================== 1115
11194  //======================================================================
11195  //======================================================================1D plot: R vs phi , different eta, depth=2
11196  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
11197  c3x5->Clear();
11199  c3x5->Divide(3, 5);
11200  c3x5->cd(1);
11201  int kcountHEnegativedirectionRecosignal2 = 1;
11202  TH1F *h2CeffHEnegativedirectionRecosignal2 = new TH1F("h2CeffHEnegativedirectionRecosignal2", "", nphi, 0., 72.);
11203  for (int jeta = 0; jeta < njeta; jeta++) {
11204  // negativedirectionRecosignal:
11205  if (jeta - 41 < 0) {
11206  // for (int i=0;i<ndepth;i++) {
11207  // depth=2
11208  for (int i = 1; i < 2; i++) {
11209  TH1F *HEnegativedirectionRecosignal2 = (TH1F *)h2CeffHEnegativedirectionRecosignal2->Clone("twod1");
11210  float ccctest = 0; // to avoid empty massive elements
11211  for (int jphi = 0; jphi < nphi; jphi++) {
11212  double ccc1 = arecosignalhe[i][jeta][jphi];
11213  if (ccc1 != 0.) {
11214  HEnegativedirectionRecosignal2->Fill(jphi, ccc1);
11215  ccctest = 1.; //HEnegativedirectionRecosignal2->SetBinError(i,0.01);
11216  }
11217  } // for jphi
11218  if (ccctest > 0.) {
11219  //cout<<"555 kcountHEnegativedirectionRecosignal2 = "<<kcountHEnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
11220  c3x5->cd(kcountHEnegativedirectionRecosignal2);
11221  HEnegativedirectionRecosignal2->SetMarkerStyle(20);
11222  HEnegativedirectionRecosignal2->SetMarkerSize(0.4);
11223  HEnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
11224  HEnegativedirectionRecosignal2->SetXTitle("HEnegativedirectionRecosignal2 \b");
11225  HEnegativedirectionRecosignal2->SetMarkerColor(2);
11226  HEnegativedirectionRecosignal2->SetLineColor(0);
11227  gPad->SetGridy();
11228  gPad->SetGridx();
11229  // gPad->SetLogy();
11230  if (kcountHEnegativedirectionRecosignal2 == 1)
11231  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
11232  if (kcountHEnegativedirectionRecosignal2 == 2)
11233  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
11234  if (kcountHEnegativedirectionRecosignal2 == 3)
11235  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
11236  if (kcountHEnegativedirectionRecosignal2 == 4)
11237  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
11238  if (kcountHEnegativedirectionRecosignal2 == 5)
11239  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
11240  if (kcountHEnegativedirectionRecosignal2 == 6)
11241  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
11242  if (kcountHEnegativedirectionRecosignal2 == 7)
11243  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
11244  if (kcountHEnegativedirectionRecosignal2 == 8)
11245  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
11246  if (kcountHEnegativedirectionRecosignal2 == 9)
11247  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
11248  if (kcountHEnegativedirectionRecosignal2 == 10)
11249  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
11250  if (kcountHEnegativedirectionRecosignal2 == 11)
11251  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
11252  if (kcountHEnegativedirectionRecosignal2 == 12)
11253  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
11254  if (kcountHEnegativedirectionRecosignal2 == 13)
11255  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
11256  HEnegativedirectionRecosignal2->Draw("Error");
11257  kcountHEnegativedirectionRecosignal2++;
11258  if (kcountHEnegativedirectionRecosignal2 > 13)
11259  break; // 4x6 = 24
11260  } //ccctest>0
11261 
11262  } // for i
11263  } //if(jeta-41 < 0)
11264  } //for jeta
11266  c3x5->Update();
11267  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
11268  c3x5->Clear();
11269  // clean-up
11270  if (h2CeffHEnegativedirectionRecosignal2)
11271  delete h2CeffHEnegativedirectionRecosignal2;
11272  //========================================================================================== 1116
11273  //======================================================================
11274  //======================================================================1D plot: R vs phi , different eta, depth=3
11275  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
11276  c3x5->Clear();
11278  c3x5->Divide(3, 5);
11279  c3x5->cd(1);
11280  int kcountHEnegativedirectionRecosignal3 = 1;
11281  TH1F *h2CeffHEnegativedirectionRecosignal3 = new TH1F("h2CeffHEnegativedirectionRecosignal3", "", nphi, 0., 72.);
11282  for (int jeta = 0; jeta < njeta; jeta++) {
11283  // negativedirectionRecosignal:
11284  if (jeta - 41 < 0) {
11285  // for (int i=0;i<ndepth;i++) {
11286  // depth=3
11287  for (int i = 2; i < 3; i++) {
11288  TH1F *HEnegativedirectionRecosignal3 = (TH1F *)h2CeffHEnegativedirectionRecosignal3->Clone("twod1");
11289  float ccctest = 0; // to avoid empty massive elements
11290  for (int jphi = 0; jphi < nphi; jphi++) {
11291  double ccc1 = arecosignalhe[i][jeta][jphi];
11292  if (ccc1 != 0.) {
11293  HEnegativedirectionRecosignal3->Fill(jphi, ccc1);
11294  ccctest = 1.; //HEnegativedirectionRecosignal3->SetBinError(i,0.01);
11295  }
11296  } // for jphi
11297  if (ccctest > 0.) {
11298  //cout<<"666 kcountHEnegativedirectionRecosignal3 = "<<kcountHEnegativedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
11299  c3x5->cd(kcountHEnegativedirectionRecosignal3);
11300  HEnegativedirectionRecosignal3->SetMarkerStyle(20);
11301  HEnegativedirectionRecosignal3->SetMarkerSize(0.4);
11302  HEnegativedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
11303  HEnegativedirectionRecosignal3->SetXTitle("HEnegativedirectionRecosignal3 \b");
11304  HEnegativedirectionRecosignal3->SetMarkerColor(2);
11305  HEnegativedirectionRecosignal3->SetLineColor(0);
11306  gPad->SetGridy();
11307  gPad->SetGridx();
11308  // gPad->SetLogy();
11309  if (kcountHEnegativedirectionRecosignal3 == 1)
11310  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
11311  if (kcountHEnegativedirectionRecosignal3 == 2)
11312  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
11313  if (kcountHEnegativedirectionRecosignal3 == 3)
11314  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
11315  if (kcountHEnegativedirectionRecosignal3 == 4)
11316  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
11317  if (kcountHEnegativedirectionRecosignal3 == 5)
11318  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
11319  if (kcountHEnegativedirectionRecosignal3 == 6)
11320  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
11321  if (kcountHEnegativedirectionRecosignal3 == 7)
11322  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
11323  if (kcountHEnegativedirectionRecosignal3 == 8)
11324  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
11325  if (kcountHEnegativedirectionRecosignal3 == 9)
11326  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
11327  if (kcountHEnegativedirectionRecosignal3 == 10)
11328  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
11329  if (kcountHEnegativedirectionRecosignal3 == 11)
11330  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
11331  if (kcountHEnegativedirectionRecosignal3 == 12)
11332  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
11333  if (kcountHEnegativedirectionRecosignal3 == 13)
11334  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
11335  HEnegativedirectionRecosignal3->Draw("Error");
11336  kcountHEnegativedirectionRecosignal3++;
11337  if (kcountHEnegativedirectionRecosignal3 > 13)
11338  break; // 4x6 = 24
11339  } //ccctest>0
11340 
11341  } // for i
11342  } //if(jeta-41 < 0)
11343  } //for jeta
11345  c3x5->Update();
11346  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
11347  c3x5->Clear();
11348  // clean-up
11349  if (h2CeffHEnegativedirectionRecosignal3)
11350  delete h2CeffHEnegativedirectionRecosignal3;
11351  //========================================================================================== 1117
11352  //======================================================================
11353  //======================================================================1D plot: R vs phi , different eta, depth=4
11354  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
11355  c3x5->Clear();
11357  c3x5->Divide(3, 5);
11358  c3x5->cd(1);
11359  int kcountHEnegativedirectionRecosignal4 = 1;
11360  TH1F *h2CeffHEnegativedirectionRecosignal4 = new TH1F("h2CeffHEnegativedirectionRecosignal4", "", nphi, 0., 72.);
11361 
11362  for (int jeta = 0; jeta < njeta; jeta++) {
11363  // negativedirectionRecosignal:
11364  if (jeta - 41 < 0) {
11365  // for (int i=0;i<ndepth;i++) {
11366  // depth=4
11367  for (int i = 3; i < 4; i++) {
11368  TH1F *HEnegativedirectionRecosignal4 = (TH1F *)h2CeffHEnegativedirectionRecosignal4->Clone("twod1");
11369 
11370  float ccctest = 0; // to avoid empty massive elements
11371  for (int jphi = 0; jphi < nphi; jphi++) {
11372  double ccc1 = arecosignalhe[i][jeta][jphi];
11373  if (ccc1 != 0.) {
11374  HEnegativedirectionRecosignal4->Fill(jphi, ccc1);
11375  ccctest = 1.; //HEnegativedirectionRecosignal4->SetBinError(i,0.01);
11376  }
11377  } // for jphi
11378  if (ccctest > 0.) {
11379  //cout<<"777 kcountHEnegativedirectionRecosignal4 = "<<kcountHEnegativedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
11380  c3x5->cd(kcountHEnegativedirectionRecosignal4);
11381  HEnegativedirectionRecosignal4->SetMarkerStyle(20);
11382  HEnegativedirectionRecosignal4->SetMarkerSize(0.4);
11383  HEnegativedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
11384  HEnegativedirectionRecosignal4->SetXTitle("HEnegativedirectionRecosignal4 \b");
11385  HEnegativedirectionRecosignal4->SetMarkerColor(2);
11386  HEnegativedirectionRecosignal4->SetLineColor(0);
11387  gPad->SetGridy();
11388  gPad->SetGridx();
11389  // gPad->SetLogy();
11390  if (kcountHEnegativedirectionRecosignal4 == 1)
11391  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
11392  if (kcountHEnegativedirectionRecosignal4 == 2)
11393  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
11394  if (kcountHEnegativedirectionRecosignal4 == 3)
11395  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
11396  if (kcountHEnegativedirectionRecosignal4 == 4)
11397  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
11398  if (kcountHEnegativedirectionRecosignal4 == 5)
11399  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
11400  if (kcountHEnegativedirectionRecosignal4 == 6)
11401  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
11402  if (kcountHEnegativedirectionRecosignal4 == 7)
11403  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
11404  if (kcountHEnegativedirectionRecosignal4 == 8)
11405  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
11406  if (kcountHEnegativedirectionRecosignal4 == 9)
11407  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
11408  if (kcountHEnegativedirectionRecosignal4 == 10)
11409  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
11410  if (kcountHEnegativedirectionRecosignal4 == 11)
11411  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
11412  if (kcountHEnegativedirectionRecosignal4 == 12)
11413  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
11414  HEnegativedirectionRecosignal4->Draw("Error");
11415  kcountHEnegativedirectionRecosignal4++;
11416  if (kcountHEnegativedirectionRecosignal4 > 12)
11417  break; // 4x6 = 24
11418  } //ccctest>0
11419 
11420  } // for i
11421  } //if(jeta-41 < 0)
11422  } //for jeta
11424  c3x5->Update();
11425  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
11426  c3x5->Clear();
11427  // clean-up
11428  if (h2CeffHEnegativedirectionRecosignal4)
11429  delete h2CeffHEnegativedirectionRecosignal4;
11430  //========================================================================================== 1118
11431  //======================================================================
11432  //======================================================================1D plot: R vs phi , different eta, depth=5
11433  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
11434  c3x5->Clear();
11436  c3x5->Divide(3, 5);
11437  c3x5->cd(1);
11438  int kcountHEnegativedirectionRecosignal5 = 1;
11439  TH1F *h2CeffHEnegativedirectionRecosignal5 = new TH1F("h2CeffHEnegativedirectionRecosignal5", "", nphi, 0., 72.);
11440 
11441  for (int jeta = 0; jeta < njeta; jeta++) {
11442  // negativedirectionRecosignal:
11443  if (jeta - 41 < 0) {
11444  // for (int i=0;i<ndepth;i++) {
11445  // depth=5
11446  for (int i = 4; i < 5; i++) {
11447  TH1F *HEnegativedirectionRecosignal5 = (TH1F *)h2CeffHEnegativedirectionRecosignal5->Clone("twod1");
11448 
11449  float ccctest = 0; // to avoid empty massive elements
11450  for (int jphi = 0; jphi < nphi; jphi++) {
11451  // cout<<"888 initial kcountHEnegativedirectionRecosignal5 = "<<kcountHEnegativedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" arecosignalhe[i][jeta][jphi]= "<< arecosignalhe[i][jeta][jphi] <<" depth= "<< i <<endl;
11452 
11453  double ccc1 = arecosignalhe[i][jeta][jphi];
11454  if (ccc1 != 0.) {
11455  HEnegativedirectionRecosignal5->Fill(jphi, ccc1);
11456  ccctest = 1.; //HEnegativedirectionRecosignal5->SetBinError(i,0.01);
11457  }
11458  } // for jphi
11459  if (ccctest > 0.) {
11460  //cout<<"888 kcountHEnegativedirectionRecosignal5 = "<<kcountHEnegativedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<endl;
11461  c3x5->cd(kcountHEnegativedirectionRecosignal5);
11462  HEnegativedirectionRecosignal5->SetMarkerStyle(20);
11463  HEnegativedirectionRecosignal5->SetMarkerSize(0.4);
11464  HEnegativedirectionRecosignal5->GetYaxis()->SetLabelSize(0.04);
11465  HEnegativedirectionRecosignal5->SetXTitle("HEnegativedirectionRecosignal5 \b");
11466  HEnegativedirectionRecosignal5->SetMarkerColor(2);
11467  HEnegativedirectionRecosignal5->SetLineColor(0);
11468  gPad->SetGridy();
11469  gPad->SetGridx();
11470  // gPad->SetLogy();
11471  if (kcountHEnegativedirectionRecosignal5 == 1)
11472  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
11473  if (kcountHEnegativedirectionRecosignal5 == 2)
11474  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
11475  if (kcountHEnegativedirectionRecosignal5 == 3)
11476  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
11477  if (kcountHEnegativedirectionRecosignal5 == 4)
11478  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
11479  if (kcountHEnegativedirectionRecosignal5 == 5)
11480  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
11481  if (kcountHEnegativedirectionRecosignal5 == 6)
11482  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
11483  if (kcountHEnegativedirectionRecosignal5 == 7)
11484  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
11485  if (kcountHEnegativedirectionRecosignal5 == 8)
11486  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
11487  if (kcountHEnegativedirectionRecosignal5 == 9)
11488  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
11489  if (kcountHEnegativedirectionRecosignal5 == 10)
11490  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
11491  if (kcountHEnegativedirectionRecosignal5 == 11)
11492  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
11493  HEnegativedirectionRecosignal5->Draw("Error");
11494  kcountHEnegativedirectionRecosignal5++;
11495  if (kcountHEnegativedirectionRecosignal5 > 11)
11496  break; // 4x6 = 24
11497  } //ccctest>0
11498 
11499  } // for i
11500  } //if(jeta-41 < 0)
11501  } //for jeta
11503  c3x5->Update();
11504  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
11505  c3x5->Clear();
11506  // clean-up
11507  if (h2CeffHEnegativedirectionRecosignal5)
11508  delete h2CeffHEnegativedirectionRecosignal5;
11509  //========================================================================================== 1119
11510  //======================================================================
11511  //======================================================================1D plot: R vs phi , different eta, depth=6
11512  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
11513  c3x5->Clear();
11515  c3x5->Divide(3, 5);
11516  c3x5->cd(1);
11517  int kcountHEnegativedirectionRecosignal6 = 1;
11518  TH1F *h2CeffHEnegativedirectionRecosignal6 = new TH1F("h2CeffHEnegativedirectionRecosignal6", "", nphi, 0., 72.);
11519 
11520  for (int jeta = 0; jeta < njeta; jeta++) {
11521  // negativedirectionRecosignal:
11522  if (jeta - 41 < 0) {
11523  // for (int i=0;i<ndepth;i++) {
11524  // depth=6
11525  for (int i = 5; i < 6; i++) {
11526  TH1F *HEnegativedirectionRecosignal6 = (TH1F *)h2CeffHEnegativedirectionRecosignal6->Clone("twod1");
11527 
11528  float ccctest = 0; // to avoid empty massive elements
11529  for (int jphi = 0; jphi < nphi; jphi++) {
11530  double ccc1 = arecosignalhe[i][jeta][jphi];
11531  if (ccc1 != 0.) {
11532  HEnegativedirectionRecosignal6->Fill(jphi, ccc1);
11533  ccctest = 1.; //HEnegativedirectionRecosignal6->SetBinError(i,0.01);
11534  }
11535  } // for jphi
11536  if (ccctest > 0.) {
11537  //cout<<"999 kcountHEnegativedirectionRecosignal6 = "<<kcountHEnegativedirectionRecosignal6 <<" jeta-41= "<< jeta-41 <<endl;
11538  c3x5->cd(kcountHEnegativedirectionRecosignal6);
11539  HEnegativedirectionRecosignal6->SetMarkerStyle(20);
11540  HEnegativedirectionRecosignal6->SetMarkerSize(0.4);
11541  HEnegativedirectionRecosignal6->GetYaxis()->SetLabelSize(0.04);
11542  HEnegativedirectionRecosignal6->SetXTitle("HEnegativedirectionRecosignal6 \b");
11543  HEnegativedirectionRecosignal6->SetMarkerColor(2);
11544  HEnegativedirectionRecosignal6->SetLineColor(0);
11545  gPad->SetGridy();
11546  gPad->SetGridx();
11547  // gPad->SetLogy();
11548  if (kcountHEnegativedirectionRecosignal6 == 1)
11549  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
11550  if (kcountHEnegativedirectionRecosignal6 == 2)
11551  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
11552  if (kcountHEnegativedirectionRecosignal6 == 3)
11553  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
11554  if (kcountHEnegativedirectionRecosignal6 == 4)
11555  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
11556  if (kcountHEnegativedirectionRecosignal6 == 5)
11557  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
11558  if (kcountHEnegativedirectionRecosignal6 == 6)
11559  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
11560  if (kcountHEnegativedirectionRecosignal6 == 7)
11561  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
11562  if (kcountHEnegativedirectionRecosignal6 == 8)
11563  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
11564  if (kcountHEnegativedirectionRecosignal6 == 9)
11565  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
11566  if (kcountHEnegativedirectionRecosignal6 == 10)
11567  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
11568  HEnegativedirectionRecosignal6->Draw("Error");
11569  kcountHEnegativedirectionRecosignal6++;
11570  if (kcountHEnegativedirectionRecosignal6 > 10)
11571  break; // 4x6 = 24
11572  } //ccctest>0
11573 
11574  } // for i
11575  } //if(jeta-41 < 0)
11576  } //for jeta
11578  c3x5->Update();
11579  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
11580  c3x5->Clear();
11581  // clean-up
11582  if (h2CeffHEnegativedirectionRecosignal6)
11583  delete h2CeffHEnegativedirectionRecosignal6;
11584  //========================================================================================== 11110
11585  //======================================================================
11586  //======================================================================1D plot: R vs phi , different eta, depth=7
11587  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
11588  c3x5->Clear();
11590  c3x5->Divide(3, 5);
11591  c3x5->cd(1);
11592  int kcountHEnegativedirectionRecosignal7 = 1;
11593  TH1F *h2CeffHEnegativedirectionRecosignal7 = new TH1F("h2CeffHEnegativedirectionRecosignal7", "", nphi, 0., 72.);
11594 
11595  for (int jeta = 0; jeta < njeta; jeta++) {
11596  // negativedirectionRecosignal:
11597  if (jeta - 41 < 0) {
11598  // for (int i=0;i<ndepth;i++) {
11599  // depth=7
11600  for (int i = 6; i < 7; i++) {
11601  TH1F *HEnegativedirectionRecosignal7 = (TH1F *)h2CeffHEnegativedirectionRecosignal7->Clone("twod1");
11602 
11603  float ccctest = 0; // to avoid empty massive elements
11604  for (int jphi = 0; jphi < nphi; jphi++) {
11605  double ccc1 = arecosignalhe[i][jeta][jphi];
11606  if (ccc1 != 0.) {
11607  HEnegativedirectionRecosignal7->Fill(jphi, ccc1);
11608  ccctest = 1.; //HEnegativedirectionRecosignal7->SetBinError(i,0.01);
11609  }
11610  } // for jphi
11611  if (ccctest > 0.) {
11612  //cout<<"1010 kcountHEnegativedirectionRecosignal7 = "<<kcountHEnegativedirectionRecosignal7 <<" jeta-41= "<< jeta-41 <<endl;
11613  c3x5->cd(kcountHEnegativedirectionRecosignal7);
11614  HEnegativedirectionRecosignal7->SetMarkerStyle(20);
11615  HEnegativedirectionRecosignal7->SetMarkerSize(0.4);
11616  HEnegativedirectionRecosignal7->GetYaxis()->SetLabelSize(0.04);
11617  HEnegativedirectionRecosignal7->SetXTitle("HEnegativedirectionRecosignal7 \b");
11618  HEnegativedirectionRecosignal7->SetMarkerColor(2);
11619  HEnegativedirectionRecosignal7->SetLineColor(0);
11620  gPad->SetGridy();
11621  gPad->SetGridx();
11622  // gPad->SetLogy();
11623  if (kcountHEnegativedirectionRecosignal7 == 1)
11624  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
11625  if (kcountHEnegativedirectionRecosignal7 == 2)
11626  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
11627  if (kcountHEnegativedirectionRecosignal7 == 3)
11628  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
11629  HEnegativedirectionRecosignal7->Draw("Error");
11630  kcountHEnegativedirectionRecosignal7++;
11631  if (kcountHEnegativedirectionRecosignal7 > 3)
11632  break; // 4x6 = 24
11633  } //ccctest>0
11634 
11635  } // for i
11636  } //if(jeta-41 < 0)
11637  } //for jeta
11639  c3x5->Update();
11640  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
11641  c3x5->Clear();
11642  // clean-up
11643  if (h2CeffHEnegativedirectionRecosignal7)
11644  delete h2CeffHEnegativedirectionRecosignal7;
11645 
11647 
11648  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
11649 
11650  //cout<<" Start Vaiance: preparation *****" <<endl;
11651  TH2F *recosignalVariance1HE1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HE1");
11652  TH2F *recosignalVariance0HE1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE1");
11653  TH2F *recosignalVarianceHE1 = (TH2F *)recosignalVariance1HE1->Clone("recosignalVarianceHE1");
11654  recosignalVarianceHE1->Divide(recosignalVariance1HE1, recosignalVariance0HE1, 1, 1, "B");
11655  TH2F *recosignalVariance1HE2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HE2");
11656  TH2F *recosignalVariance0HE2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE2");
11657  TH2F *recosignalVarianceHE2 = (TH2F *)recosignalVariance1HE2->Clone("recosignalVarianceHE2");
11658  recosignalVarianceHE2->Divide(recosignalVariance1HE2, recosignalVariance0HE2, 1, 1, "B");
11659  TH2F *recosignalVariance1HE3 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HE3");
11660  TH2F *recosignalVariance0HE3 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE3");
11661  TH2F *recosignalVarianceHE3 = (TH2F *)recosignalVariance1HE3->Clone("recosignalVarianceHE3");
11662  recosignalVarianceHE3->Divide(recosignalVariance1HE3, recosignalVariance0HE3, 1, 1, "B");
11663  TH2F *recosignalVariance1HE4 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HE4");
11664  TH2F *recosignalVariance0HE4 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE4");
11665  TH2F *recosignalVarianceHE4 = (TH2F *)recosignalVariance1HE4->Clone("recosignalVarianceHE4");
11666  recosignalVarianceHE4->Divide(recosignalVariance1HE4, recosignalVariance0HE4, 1, 1, "B");
11667  TH2F *recosignalVariance1HE5 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HE5");
11668  TH2F *recosignalVariance0HE5 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE5");
11669  TH2F *recosignalVarianceHE5 = (TH2F *)recosignalVariance1HE5->Clone("recosignalVarianceHE5");
11670  recosignalVarianceHE5->Divide(recosignalVariance1HE5, recosignalVariance0HE5, 1, 1, "B");
11671  TH2F *recosignalVariance1HE6 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HE6");
11672  TH2F *recosignalVariance0HE6 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE6");
11673  TH2F *recosignalVarianceHE6 = (TH2F *)recosignalVariance1HE6->Clone("recosignalVarianceHE6");
11674  recosignalVarianceHE6->Divide(recosignalVariance1HE6, recosignalVariance0HE6, 1, 1, "B");
11675  TH2F *recosignalVariance1HE7 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HE7");
11676  TH2F *recosignalVariance0HE7 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HE7");
11677  TH2F *recosignalVarianceHE7 = (TH2F *)recosignalVariance1HE7->Clone("recosignalVarianceHE7");
11678  recosignalVarianceHE7->Divide(recosignalVariance1HE7, recosignalVariance0HE7, 1, 1, "B");
11679  //cout<<" Vaiance: preparation DONE *****" <<endl;
11680  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvariancehe
11681  // = sum(R*R)/N - (sum(R)/N)**2
11682  for (int jeta = 0; jeta < njeta; jeta++) {
11683  //preparation for PHI normalization:
11684  double sumrecosignalHE0 = 0;
11685  int nsumrecosignalHE0 = 0;
11686  double sumrecosignalHE1 = 0;
11687  int nsumrecosignalHE1 = 0;
11688  double sumrecosignalHE2 = 0;
11689  int nsumrecosignalHE2 = 0;
11690  double sumrecosignalHE3 = 0;
11691  int nsumrecosignalHE3 = 0;
11692  double sumrecosignalHE4 = 0;
11693  int nsumrecosignalHE4 = 0;
11694  double sumrecosignalHE5 = 0;
11695  int nsumrecosignalHE5 = 0;
11696  double sumrecosignalHE6 = 0;
11697  int nsumrecosignalHE6 = 0;
11698  for (int jphi = 0; jphi < njphi; jphi++) {
11699  recosignalvariancehe[0][jeta][jphi] = recosignalVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
11700  recosignalvariancehe[1][jeta][jphi] = recosignalVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
11701  recosignalvariancehe[2][jeta][jphi] = recosignalVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
11702  recosignalvariancehe[3][jeta][jphi] = recosignalVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
11703  recosignalvariancehe[4][jeta][jphi] = recosignalVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
11704  recosignalvariancehe[5][jeta][jphi] = recosignalVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
11705  recosignalvariancehe[6][jeta][jphi] = recosignalVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
11706  if (recosignalvariancehe[0][jeta][jphi] > 0.) {
11707  sumrecosignalHE0 += recosignalvariancehe[0][jeta][jphi];
11708  ++nsumrecosignalHE0;
11709  }
11710  if (recosignalvariancehe[1][jeta][jphi] > 0.) {
11711  sumrecosignalHE1 += recosignalvariancehe[1][jeta][jphi];
11712  ++nsumrecosignalHE1;
11713  }
11714  if (recosignalvariancehe[2][jeta][jphi] > 0.) {
11715  sumrecosignalHE2 += recosignalvariancehe[2][jeta][jphi];
11716  ++nsumrecosignalHE2;
11717  }
11718  if (recosignalvariancehe[3][jeta][jphi] > 0.) {
11719  sumrecosignalHE3 += recosignalvariancehe[3][jeta][jphi];
11720  ++nsumrecosignalHE3;
11721  }
11722  if (recosignalvariancehe[4][jeta][jphi] > 0.) {
11723  sumrecosignalHE4 += recosignalvariancehe[4][jeta][jphi];
11724  ++nsumrecosignalHE4;
11725  }
11726  if (recosignalvariancehe[5][jeta][jphi] > 0.) {
11727  sumrecosignalHE5 += recosignalvariancehe[5][jeta][jphi];
11728  ++nsumrecosignalHE5;
11729  }
11730  if (recosignalvariancehe[6][jeta][jphi] > 0.) {
11731  sumrecosignalHE6 += recosignalvariancehe[6][jeta][jphi];
11732  ++nsumrecosignalHE6;
11733  }
11734  } // phi
11735  // PHI normalization :
11736  for (int jphi = 0; jphi < njphi; jphi++) {
11737  if (recosignalvariancehe[0][jeta][jphi] > 0.)
11738  recosignalvariancehe[0][jeta][jphi] /= (sumrecosignalHE0 / nsumrecosignalHE0);
11739  if (recosignalvariancehe[1][jeta][jphi] > 0.)
11740  recosignalvariancehe[1][jeta][jphi] /= (sumrecosignalHE1 / nsumrecosignalHE1);
11741  if (recosignalvariancehe[2][jeta][jphi] > 0.)
11742  recosignalvariancehe[2][jeta][jphi] /= (sumrecosignalHE2 / nsumrecosignalHE2);
11743  if (recosignalvariancehe[3][jeta][jphi] > 0.)
11744  recosignalvariancehe[3][jeta][jphi] /= (sumrecosignalHE3 / nsumrecosignalHE3);
11745  if (recosignalvariancehe[4][jeta][jphi] > 0.)
11746  recosignalvariancehe[4][jeta][jphi] /= (sumrecosignalHE4 / nsumrecosignalHE4);
11747  if (recosignalvariancehe[5][jeta][jphi] > 0.)
11748  recosignalvariancehe[5][jeta][jphi] /= (sumrecosignalHE5 / nsumrecosignalHE5);
11749  if (recosignalvariancehe[6][jeta][jphi] > 0.)
11750  recosignalvariancehe[6][jeta][jphi] /= (sumrecosignalHE6 / nsumrecosignalHE6);
11751  } // phi
11752  // recosignalvariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
11753  for (int jphi = 0; jphi < njphi; jphi++) {
11754  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
11755  recosignalvariancehe[0][jeta][jphi] -= arecosignalhe[0][jeta][jphi] * arecosignalhe[0][jeta][jphi];
11756  recosignalvariancehe[0][jeta][jphi] = fabs(recosignalvariancehe[0][jeta][jphi]);
11757  recosignalvariancehe[1][jeta][jphi] -= arecosignalhe[1][jeta][jphi] * arecosignalhe[1][jeta][jphi];
11758  recosignalvariancehe[1][jeta][jphi] = fabs(recosignalvariancehe[1][jeta][jphi]);
11759  recosignalvariancehe[2][jeta][jphi] -= arecosignalhe[2][jeta][jphi] * arecosignalhe[2][jeta][jphi];
11760  recosignalvariancehe[2][jeta][jphi] = fabs(recosignalvariancehe[2][jeta][jphi]);
11761  recosignalvariancehe[3][jeta][jphi] -= arecosignalhe[3][jeta][jphi] * arecosignalhe[3][jeta][jphi];
11762  recosignalvariancehe[3][jeta][jphi] = fabs(recosignalvariancehe[3][jeta][jphi]);
11763  recosignalvariancehe[4][jeta][jphi] -= arecosignalhe[4][jeta][jphi] * arecosignalhe[4][jeta][jphi];
11764  recosignalvariancehe[4][jeta][jphi] = fabs(recosignalvariancehe[4][jeta][jphi]);
11765  recosignalvariancehe[5][jeta][jphi] -= arecosignalhe[5][jeta][jphi] * arecosignalhe[5][jeta][jphi];
11766  recosignalvariancehe[5][jeta][jphi] = fabs(recosignalvariancehe[5][jeta][jphi]);
11767  recosignalvariancehe[6][jeta][jphi] -= arecosignalhe[6][jeta][jphi] * arecosignalhe[6][jeta][jphi];
11768  recosignalvariancehe[6][jeta][jphi] = fabs(recosignalvariancehe[6][jeta][jphi]);
11769  }
11770  }
11771  //cout<<" Vaiance: DONE*****" <<endl;
11772  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
11773  //======================================================================
11774  //======================================================================
11775  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
11776  c1x1->Clear();
11778  c1x0->Divide(1, 1);
11779  c1x0->cd(1);
11780  TH2F *DefzDrecosignalHE42D = new TH2F("DefzDrecosignalHE42D", "", neta, -41., 41., nphi, 0., 72.);
11781  TH2F *DefzDrecosignalHE42D0 = new TH2F("DefzDrecosignalHE42D0", "", neta, -41., 41., nphi, 0., 72.);
11782  TH2F *DefzDrecosignalHE42DF = (TH2F *)DefzDrecosignalHE42D0->Clone("DefzDrecosignalHE42DF");
11783  for (int i = 0; i < ndepth; i++) {
11784  for (int jeta = 0; jeta < neta; jeta++) {
11785  for (int jphi = 0; jphi < nphi; jphi++) {
11786  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11787  int k2plot = jeta - 41;
11788  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
11789  if (arecosignalhe[i][jeta][jphi] > 0.) {
11790  DefzDrecosignalHE42D->Fill(kkk, jphi, ccc1);
11791  DefzDrecosignalHE42D0->Fill(kkk, jphi, 1.);
11792  }
11793  }
11794  }
11795  }
11796  DefzDrecosignalHE42DF->Divide(DefzDrecosignalHE42D, DefzDrecosignalHE42D0, 1, 1, "B"); // average A
11797  // DefzDrecosignalHE1->Sumw2();
11798  gPad->SetGridy();
11799  gPad->SetGridx(); // gPad->SetLogz();
11800  DefzDrecosignalHE42DF->SetMarkerStyle(20);
11801  DefzDrecosignalHE42DF->SetMarkerSize(0.4);
11802  DefzDrecosignalHE42DF->GetZaxis()->SetLabelSize(0.08);
11803  DefzDrecosignalHE42DF->SetXTitle("<D>_depth #eta \b");
11804  DefzDrecosignalHE42DF->SetYTitle(" #phi \b");
11805  DefzDrecosignalHE42DF->SetZTitle("<D>_depth \b");
11806  DefzDrecosignalHE42DF->SetMarkerColor(2);
11807  DefzDrecosignalHE42DF->SetLineColor(
11808  0); // DefzDrecosignalHE42DF->SetMaximum(1.000); // DefzDrecosignalHE42DF->SetMinimum(1.0);
11809  DefzDrecosignalHE42DF->Draw("COLZ");
11811  c1x0->Update();
11812  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHE.png");
11813  c1x0->Clear();
11814  // clean-up
11815  if (DefzDrecosignalHE42D)
11816  delete DefzDrecosignalHE42D;
11817  if (DefzDrecosignalHE42D0)
11818  delete DefzDrecosignalHE42D0;
11819  if (DefzDrecosignalHE42DF)
11820  delete DefzDrecosignalHE42DF;
11821  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
11822  //======================================================================
11823  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
11824  c1x1->Clear();
11826  c1x1->Divide(1, 1);
11827  c1x1->cd(1);
11828  TH1F *DefzDrecosignalHE41D = new TH1F("DefzDrecosignalHE41D", "", nphi, 0., 72.);
11829  TH1F *DefzDrecosignalHE41D0 = new TH1F("DefzDrecosignalHE41D0", "", nphi, 0., 72.);
11830  TH1F *DefzDrecosignalHE41DF = (TH1F *)DefzDrecosignalHE41D0->Clone("DefzDrecosignalHE41DF");
11831 
11832  for (int jphi = 0; jphi < nphi; jphi++) {
11833  for (int jeta = 0; jeta < neta; jeta++) {
11834  for (int i = 0; i < ndepth; i++) {
11835  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11836  if (arecosignalhe[i][jeta][jphi] > 0.) {
11837  DefzDrecosignalHE41D->Fill(jphi, ccc1);
11838  DefzDrecosignalHE41D0->Fill(jphi, 1.);
11839  }
11840  }
11841  }
11842  }
11843  // DefzDrecosignalHE41D->Sumw2();DefzDrecosignalHE41D0->Sumw2();
11844 
11845  DefzDrecosignalHE41DF->Divide(
11846  DefzDrecosignalHE41D, DefzDrecosignalHE41D0, 1, 1, "B"); // R averaged over depthes & eta
11847  DefzDrecosignalHE41D0->Sumw2();
11848  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHE41DF->SetBinError(jphi,0.01);}
11849  gPad->SetGridy();
11850  gPad->SetGridx(); // gPad->SetLogz();
11851  DefzDrecosignalHE41DF->SetMarkerStyle(20);
11852  DefzDrecosignalHE41DF->SetMarkerSize(1.4);
11853  DefzDrecosignalHE41DF->GetZaxis()->SetLabelSize(0.08);
11854  DefzDrecosignalHE41DF->SetXTitle("#phi \b");
11855  DefzDrecosignalHE41DF->SetYTitle(" <D> \b");
11856  DefzDrecosignalHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
11857  DefzDrecosignalHE41DF->SetMarkerColor(4);
11858  DefzDrecosignalHE41DF->SetLineColor(
11859  4); // DefzDrecosignalHE41DF->SetMinimum(0.8); DefzDrecosignalHE41DF->SetMinimum(-0.015);
11860  DefzDrecosignalHE41DF->Draw("Error");
11862  c1x1->Update();
11863  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHE.png");
11864  c1x1->Clear();
11865  // clean-up
11866  if (DefzDrecosignalHE41D)
11867  delete DefzDrecosignalHE41D;
11868  if (DefzDrecosignalHE41D0)
11869  delete DefzDrecosignalHE41D0;
11870  if (DefzDrecosignalHE41DF)
11871  delete DefzDrecosignalHE41DF;
11872  //========================================================================================== 14
11873  //======================================================================
11874  //======================================================================1D plot: D vs phi , different eta, depth=1
11875  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
11876  c3x5->Clear();
11878  c3x5->Divide(3, 5);
11879  c3x5->cd(1);
11880  int kcountHEpositivedirectionRecosignalD1 = 1;
11881  TH1F *h2CeffHEpositivedirectionRecosignalD1 = new TH1F("h2CeffHEpositivedirectionRecosignalD1", "", nphi, 0., 72.);
11882 
11883  for (int jeta = 0; jeta < njeta; jeta++) {
11884  // positivedirectionRecosignalD:
11885  if (jeta - 41 >= 0) {
11886  // for (int i=0;i<ndepth;i++) {
11887  // depth=1
11888  for (int i = 0; i < 1; i++) {
11889  TH1F *HEpositivedirectionRecosignalD1 = (TH1F *)h2CeffHEpositivedirectionRecosignalD1->Clone("twod1");
11890 
11891  float ccctest = 0; // to avoid empty massive elements
11892  for (int jphi = 0; jphi < nphi; jphi++) {
11893  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11894  if (arecosignalhe[i][jeta][jphi] > 0.) {
11895  HEpositivedirectionRecosignalD1->Fill(jphi, ccc1);
11896  ccctest = 1.; //HEpositivedirectionRecosignalD1->SetBinError(i,0.01);
11897  }
11898  } // for jphi
11899  if (ccctest > 0.) {
11900  //cout<<"1414 kcountHEpositivedirectionRecosignalD1 = "<<kcountHEpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
11901  c3x5->cd(kcountHEpositivedirectionRecosignalD1);
11902  HEpositivedirectionRecosignalD1->SetMarkerStyle(20);
11903  HEpositivedirectionRecosignalD1->SetMarkerSize(0.4);
11904  HEpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
11905  HEpositivedirectionRecosignalD1->SetXTitle("HEpositivedirectionRecosignalD1 \b");
11906  HEpositivedirectionRecosignalD1->SetMarkerColor(2);
11907  HEpositivedirectionRecosignalD1->SetLineColor(0);
11908  gPad->SetGridy();
11909  gPad->SetGridx();
11910  // gPad->SetLogy();
11911  if (kcountHEpositivedirectionRecosignalD1 == 1)
11912  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
11913  if (kcountHEpositivedirectionRecosignalD1 == 2)
11914  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
11915  if (kcountHEpositivedirectionRecosignalD1 == 3)
11916  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
11917  if (kcountHEpositivedirectionRecosignalD1 == 4)
11918  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
11919  if (kcountHEpositivedirectionRecosignalD1 == 5)
11920  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
11921  if (kcountHEpositivedirectionRecosignalD1 == 6)
11922  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
11923  if (kcountHEpositivedirectionRecosignalD1 == 7)
11924  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
11925  if (kcountHEpositivedirectionRecosignalD1 == 8)
11926  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
11927  if (kcountHEpositivedirectionRecosignalD1 == 9)
11928  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
11929  if (kcountHEpositivedirectionRecosignalD1 == 10)
11930  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
11931  if (kcountHEpositivedirectionRecosignalD1 == 11)
11932  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
11933  if (kcountHEpositivedirectionRecosignalD1 == 12)
11934  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
11935  HEpositivedirectionRecosignalD1->Draw("Error");
11936  kcountHEpositivedirectionRecosignalD1++;
11937  if (kcountHEpositivedirectionRecosignalD1 > 12)
11938  break; // 4x6 = 24
11939  } //ccctest>0
11940 
11941  } // for i
11942  } //if(jeta-41 >= 0)
11943  } //for jeta
11945  c3x5->Update();
11946  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
11947  c3x5->Clear();
11948  // clean-up
11949  if (h2CeffHEpositivedirectionRecosignalD1)
11950  delete h2CeffHEpositivedirectionRecosignalD1;
11951  //========================================================================================== 15
11952  //======================================================================
11953  //======================================================================1D plot: D vs phi , different eta, depth=2
11954  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
11955  c3x5->Clear();
11956  c3x5->Divide(3, 5);
11957  c3x5->cd(1);
11958  int kcountHEpositivedirectionRecosignalD2 = 1;
11959  TH1F *h2CeffHEpositivedirectionRecosignalD2 = new TH1F("h2CeffHEpositivedirectionRecosignalD2", "", nphi, 0., 72.);
11960 
11961  for (int jeta = 0; jeta < njeta; jeta++) {
11962  // positivedirectionRecosignalD:
11963  if (jeta - 41 >= 0) {
11964  // for (int i=0;i<ndepth;i++) {
11965  // depth=2
11966  for (int i = 1; i < 2; i++) {
11967  TH1F *HEpositivedirectionRecosignalD2 = (TH1F *)h2CeffHEpositivedirectionRecosignalD2->Clone("twod1");
11968 
11969  float ccctest = 0; // to avoid empty massive elements
11970  for (int jphi = 0; jphi < nphi; jphi++) {
11971  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11972  if (arecosignalhe[i][jeta][jphi] > 0.) {
11973  HEpositivedirectionRecosignalD2->Fill(jphi, ccc1);
11974  ccctest = 1.; //HEpositivedirectionRecosignalD2->SetBinError(i,0.01);
11975  }
11976  } // for jphi
11977  if (ccctest > 0.) {
11978  //cout<<"1515 kcountHEpositivedirectionRecosignalD2 = "<<kcountHEpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
11979  c3x5->cd(kcountHEpositivedirectionRecosignalD2);
11980  HEpositivedirectionRecosignalD2->SetMarkerStyle(20);
11981  HEpositivedirectionRecosignalD2->SetMarkerSize(0.4);
11982  HEpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
11983  HEpositivedirectionRecosignalD2->SetXTitle("HEpositivedirectionRecosignalD2 \b");
11984  HEpositivedirectionRecosignalD2->SetMarkerColor(2);
11985  HEpositivedirectionRecosignalD2->SetLineColor(0);
11986  gPad->SetGridy();
11987  gPad->SetGridx();
11988  // gPad->SetLogy();
11989  if (kcountHEpositivedirectionRecosignalD2 == 1)
11990  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
11991  if (kcountHEpositivedirectionRecosignalD2 == 2)
11992  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
11993  if (kcountHEpositivedirectionRecosignalD2 == 3)
11994  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
11995  if (kcountHEpositivedirectionRecosignalD2 == 4)
11996  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
11997  if (kcountHEpositivedirectionRecosignalD2 == 5)
11998  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
11999  if (kcountHEpositivedirectionRecosignalD2 == 6)
12000  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
12001  if (kcountHEpositivedirectionRecosignalD2 == 7)
12002  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
12003  if (kcountHEpositivedirectionRecosignalD2 == 8)
12004  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
12005  if (kcountHEpositivedirectionRecosignalD2 == 9)
12006  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
12007  if (kcountHEpositivedirectionRecosignalD2 == 10)
12008  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
12009  if (kcountHEpositivedirectionRecosignalD2 == 11)
12010  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
12011  if (kcountHEpositivedirectionRecosignalD2 == 12)
12012  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
12013  if (kcountHEpositivedirectionRecosignalD2 == 13)
12014  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
12015  HEpositivedirectionRecosignalD2->Draw("Error");
12016  kcountHEpositivedirectionRecosignalD2++;
12017  if (kcountHEpositivedirectionRecosignalD2 > 13)
12018  break; // 4x6 = 24
12019  } //ccctest>0
12020 
12021  } // for i
12022  } //if(jeta-41 >= 0)
12023  } //for jeta
12025  c3x5->Update();
12026  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
12027  c3x5->Clear();
12028  // clean-up
12029  if (h2CeffHEpositivedirectionRecosignalD2)
12030  delete h2CeffHEpositivedirectionRecosignalD2;
12031  //========================================================================================== 16
12032  //======================================================================
12033  //======================================================================1D plot: D vs phi , different eta, depth=3
12034  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
12035  c3x5->Clear();
12036  c3x5->Divide(3, 5);
12037  c3x5->cd(1);
12038  int kcountHEpositivedirectionRecosignalD3 = 1;
12039  TH1F *h2CeffHEpositivedirectionRecosignalD3 = new TH1F("h2CeffHEpositivedirectionRecosignalD3", "", nphi, 0., 72.);
12040 
12041  for (int jeta = 0; jeta < njeta; jeta++) {
12042  // positivedirectionRecosignalD:
12043  if (jeta - 41 >= 0) {
12044  // for (int i=0;i<ndepth;i++) {
12045  // depth=3
12046  for (int i = 2; i < 3; i++) {
12047  TH1F *HEpositivedirectionRecosignalD3 = (TH1F *)h2CeffHEpositivedirectionRecosignalD3->Clone("twod1");
12048 
12049  float ccctest = 0; // to avoid empty massive elements
12050  for (int jphi = 0; jphi < nphi; jphi++) {
12051  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12052  if (arecosignalhe[i][jeta][jphi] > 0.) {
12053  HEpositivedirectionRecosignalD3->Fill(jphi, ccc1);
12054  ccctest = 1.; //HEpositivedirectionRecosignalD3->SetBinError(i,0.01);
12055  }
12056  } // for jphi
12057  if (ccctest > 0.) {
12058  //cout<<"1616 kcountHEpositivedirectionRecosignalD3 = "<<kcountHEpositivedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
12059  c3x5->cd(kcountHEpositivedirectionRecosignalD3);
12060  HEpositivedirectionRecosignalD3->SetMarkerStyle(20);
12061  HEpositivedirectionRecosignalD3->SetMarkerSize(0.4);
12062  HEpositivedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
12063  HEpositivedirectionRecosignalD3->SetXTitle("HEpositivedirectionRecosignalD3 \b");
12064  HEpositivedirectionRecosignalD3->SetMarkerColor(2);
12065  HEpositivedirectionRecosignalD3->SetLineColor(0);
12066  gPad->SetGridy();
12067  gPad->SetGridx();
12068  // gPad->SetLogy();
12069  if (kcountHEpositivedirectionRecosignalD3 == 1)
12070  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
12071  if (kcountHEpositivedirectionRecosignalD3 == 2)
12072  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
12073  if (kcountHEpositivedirectionRecosignalD3 == 3)
12074  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
12075  if (kcountHEpositivedirectionRecosignalD3 == 4)
12076  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
12077  if (kcountHEpositivedirectionRecosignalD3 == 5)
12078  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
12079  if (kcountHEpositivedirectionRecosignalD3 == 6)
12080  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
12081  if (kcountHEpositivedirectionRecosignalD3 == 7)
12082  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
12083  if (kcountHEpositivedirectionRecosignalD3 == 8)
12084  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
12085  if (kcountHEpositivedirectionRecosignalD3 == 9)
12086  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
12087  if (kcountHEpositivedirectionRecosignalD3 == 10)
12088  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
12089  if (kcountHEpositivedirectionRecosignalD3 == 11)
12090  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
12091  if (kcountHEpositivedirectionRecosignalD3 == 12)
12092  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
12093  if (kcountHEpositivedirectionRecosignalD3 == 13)
12094  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
12095  HEpositivedirectionRecosignalD3->Draw("Error");
12096  kcountHEpositivedirectionRecosignalD3++;
12097  if (kcountHEpositivedirectionRecosignalD3 > 13)
12098  break; // 4x6 = 24
12099  } //ccctest>0
12100 
12101  } // for i
12102  } //if(jeta-41 >= 0)
12103  } //for jeta
12105  c3x5->Update();
12106  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
12107  c3x5->Clear();
12108  // clean-up
12109  if (h2CeffHEpositivedirectionRecosignalD3)
12110  delete h2CeffHEpositivedirectionRecosignalD3;
12111  //========================================================================================== 17
12112  //======================================================================
12113  //======================================================================1D plot: D vs phi , different eta, depth=4
12114  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
12115  c3x5->Clear();
12116  c3x5->Divide(3, 5);
12117  c3x5->cd(1);
12118  int kcountHEpositivedirectionRecosignalD4 = 1;
12119  TH1F *h2CeffHEpositivedirectionRecosignalD4 = new TH1F("h2CeffHEpositivedirectionRecosignalD4", "", nphi, 0., 72.);
12120 
12121  for (int jeta = 0; jeta < njeta; jeta++) {
12122  // positivedirectionRecosignalD:
12123  if (jeta - 41 >= 0) {
12124  // for (int i=0;i<ndepth;i++) {
12125  // depth=4
12126  for (int i = 3; i < 4; i++) {
12127  TH1F *HEpositivedirectionRecosignalD4 = (TH1F *)h2CeffHEpositivedirectionRecosignalD4->Clone("twod1");
12128 
12129  float ccctest = 0; // to avoid empty massive elements
12130  for (int jphi = 0; jphi < nphi; jphi++) {
12131  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12132  if (arecosignalhe[i][jeta][jphi] > 0.) {
12133  HEpositivedirectionRecosignalD4->Fill(jphi, ccc1);
12134  ccctest = 1.; //HEpositivedirectionRecosignalD4->SetBinError(i,0.01);
12135  }
12136  } // for jphi
12137  if (ccctest > 0.) {
12138  //cout<<"1717 kcountHEpositivedirectionRecosignalD4 = "<<kcountHEpositivedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
12139  c3x5->cd(kcountHEpositivedirectionRecosignalD4);
12140  HEpositivedirectionRecosignalD4->SetMarkerStyle(20);
12141  HEpositivedirectionRecosignalD4->SetMarkerSize(0.4);
12142  HEpositivedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
12143  HEpositivedirectionRecosignalD4->SetXTitle("HEpositivedirectionRecosignalD4 \b");
12144  HEpositivedirectionRecosignalD4->SetMarkerColor(2);
12145  HEpositivedirectionRecosignalD4->SetLineColor(0);
12146  gPad->SetGridy();
12147  gPad->SetGridx();
12148  // gPad->SetLogy();
12149  if (kcountHEpositivedirectionRecosignalD4 == 1)
12150  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
12151  if (kcountHEpositivedirectionRecosignalD4 == 2)
12152  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
12153  if (kcountHEpositivedirectionRecosignalD4 == 3)
12154  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
12155  if (kcountHEpositivedirectionRecosignalD4 == 4)
12156  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
12157  if (kcountHEpositivedirectionRecosignalD4 == 5)
12158  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
12159  if (kcountHEpositivedirectionRecosignalD4 == 6)
12160  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
12161  if (kcountHEpositivedirectionRecosignalD4 == 7)
12162  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
12163  if (kcountHEpositivedirectionRecosignalD4 == 8)
12164  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
12165  if (kcountHEpositivedirectionRecosignalD4 == 9)
12166  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
12167  if (kcountHEpositivedirectionRecosignalD4 == 10)
12168  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
12169  if (kcountHEpositivedirectionRecosignalD4 == 11)
12170  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
12171  if (kcountHEpositivedirectionRecosignalD4 == 12)
12172  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
12173  HEpositivedirectionRecosignalD4->Draw("Error");
12174  kcountHEpositivedirectionRecosignalD4++;
12175  if (kcountHEpositivedirectionRecosignalD4 > 12)
12176  break; // 4x6 = 24
12177  } //ccctest>0
12178 
12179  } // for i
12180  } //if(jeta-41 >= 0)
12181  } //for jeta
12183  c3x5->Update();
12184  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
12185  c3x5->Clear();
12186  // clean-up
12187  if (h2CeffHEpositivedirectionRecosignalD4)
12188  delete h2CeffHEpositivedirectionRecosignalD4;
12189  //========================================================================================== 18
12190  //======================================================================
12191  //======================================================================1D plot: D vs phi , different eta, depth=5
12192  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
12193  c3x5->Clear();
12194  c3x5->Divide(3, 5);
12195  c3x5->cd(1);
12196  int kcountHEpositivedirectionRecosignalD5 = 1;
12197  TH1F *h2CeffHEpositivedirectionRecosignalD5 = new TH1F("h2CeffHEpositivedirectionRecosignalD5", "", nphi, 0., 72.);
12198 
12199  for (int jeta = 0; jeta < njeta; jeta++) {
12200  // positivedirectionRecosignalD:
12201  if (jeta - 41 >= 0) {
12202  // for (int i=0;i<ndepth;i++) {
12203  // depth=5
12204  for (int i = 4; i < 5; i++) {
12205  TH1F *HEpositivedirectionRecosignalD5 = (TH1F *)h2CeffHEpositivedirectionRecosignalD5->Clone("twod1");
12206 
12207  float ccctest = 0; // to avoid empty massive elements
12208  for (int jphi = 0; jphi < nphi; jphi++) {
12209  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12210  if (arecosignalhe[i][jeta][jphi] > 0.) {
12211  HEpositivedirectionRecosignalD5->Fill(jphi, ccc1);
12212  ccctest = 1.; //HEpositivedirectionRecosignalD5->SetBinError(i,0.01);
12213  }
12214  } // for jphi
12215  if (ccctest > 0.) {
12216  //cout<<"1818 kcountHEpositivedirectionRecosignalD5 = "<<kcountHEpositivedirectionRecosignalD5 <<" jeta-41= "<< jeta-41 <<endl;
12217  c3x5->cd(kcountHEpositivedirectionRecosignalD5);
12218  HEpositivedirectionRecosignalD5->SetMarkerStyle(20);
12219  HEpositivedirectionRecosignalD5->SetMarkerSize(0.4);
12220  HEpositivedirectionRecosignalD5->GetYaxis()->SetLabelSize(0.04);
12221  HEpositivedirectionRecosignalD5->SetXTitle("HEpositivedirectionRecosignalD5 \b");
12222  HEpositivedirectionRecosignalD5->SetMarkerColor(2);
12223  HEpositivedirectionRecosignalD5->SetLineColor(0);
12224  gPad->SetGridy();
12225  gPad->SetGridx();
12226  // gPad->SetLogy();
12227  if (kcountHEpositivedirectionRecosignalD5 == 1)
12228  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
12229  if (kcountHEpositivedirectionRecosignalD5 == 2)
12230  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
12231  if (kcountHEpositivedirectionRecosignalD5 == 3)
12232  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
12233  if (kcountHEpositivedirectionRecosignalD5 == 4)
12234  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
12235  if (kcountHEpositivedirectionRecosignalD5 == 5)
12236  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
12237  if (kcountHEpositivedirectionRecosignalD5 == 6)
12238  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
12239  if (kcountHEpositivedirectionRecosignalD5 == 7)
12240  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
12241  if (kcountHEpositivedirectionRecosignalD5 == 8)
12242  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
12243  if (kcountHEpositivedirectionRecosignalD5 == 9)
12244  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
12245  if (kcountHEpositivedirectionRecosignalD5 == 10)
12246  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
12247  if (kcountHEpositivedirectionRecosignalD5 == 11)
12248  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
12249  HEpositivedirectionRecosignalD5->Draw("Error");
12250  kcountHEpositivedirectionRecosignalD5++;
12251  if (kcountHEpositivedirectionRecosignalD5 > 11)
12252  break; // 4x6 = 24
12253  } //ccctest>0
12254 
12255  } // for i
12256  } //if(jeta-41 >= 0)
12257  } //for jeta
12259  c3x5->Update();
12260  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
12261  c3x5->Clear();
12262  // clean-up
12263  if (h2CeffHEpositivedirectionRecosignalD5)
12264  delete h2CeffHEpositivedirectionRecosignalD5;
12265  //========================================================================================== 19
12266  //======================================================================
12267  //======================================================================1D plot: D vs phi , different eta, depth=6
12268  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
12269  c3x5->Clear();
12270  c3x5->Divide(3, 5);
12271  c3x5->cd(1);
12272  int kcountHEpositivedirectionRecosignalD6 = 1;
12273  TH1F *h2CeffHEpositivedirectionRecosignalD6 = new TH1F("h2CeffHEpositivedirectionRecosignalD6", "", nphi, 0., 72.);
12274 
12275  for (int jeta = 0; jeta < njeta; jeta++) {
12276  // positivedirectionRecosignalD:
12277  if (jeta - 41 >= 0) {
12278  // for (int i=0;i<ndepth;i++) {
12279  // depth=6
12280  for (int i = 5; i < 6; i++) {
12281  TH1F *HEpositivedirectionRecosignalD6 = (TH1F *)h2CeffHEpositivedirectionRecosignalD6->Clone("twod1");
12282 
12283  float ccctest = 0; // to avoid empty massive elements
12284  for (int jphi = 0; jphi < nphi; jphi++) {
12285  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12286  if (arecosignalhe[i][jeta][jphi] > 0.) {
12287  HEpositivedirectionRecosignalD6->Fill(jphi, ccc1);
12288  ccctest = 1.; //HEpositivedirectionRecosignalD6->SetBinError(i,0.01);
12289  }
12290  } // for jphi
12291  if (ccctest > 0.) {
12292  //cout<<"1919 kcountHEpositivedirectionRecosignalD6 = "<<kcountHEpositivedirectionRecosignalD6 <<" jeta-41= "<< jeta-41 <<endl;
12293  c3x5->cd(kcountHEpositivedirectionRecosignalD6);
12294  HEpositivedirectionRecosignalD6->SetMarkerStyle(20);
12295  HEpositivedirectionRecosignalD6->SetMarkerSize(0.4);
12296  HEpositivedirectionRecosignalD6->GetYaxis()->SetLabelSize(0.04);
12297  HEpositivedirectionRecosignalD6->SetXTitle("HEpositivedirectionRecosignalD6 \b");
12298  HEpositivedirectionRecosignalD6->SetMarkerColor(2);
12299  HEpositivedirectionRecosignalD6->SetLineColor(0);
12300  gPad->SetGridy();
12301  gPad->SetGridx();
12302  // gPad->SetLogy();
12303  if (kcountHEpositivedirectionRecosignalD6 == 1)
12304  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
12305  if (kcountHEpositivedirectionRecosignalD6 == 2)
12306  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
12307  if (kcountHEpositivedirectionRecosignalD6 == 3)
12308  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
12309  if (kcountHEpositivedirectionRecosignalD6 == 4)
12310  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
12311  if (kcountHEpositivedirectionRecosignalD6 == 5)
12312  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
12313  if (kcountHEpositivedirectionRecosignalD6 == 6)
12314  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
12315  if (kcountHEpositivedirectionRecosignalD6 == 7)
12316  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
12317  if (kcountHEpositivedirectionRecosignalD6 == 8)
12318  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
12319  if (kcountHEpositivedirectionRecosignalD6 == 9)
12320  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
12321  if (kcountHEpositivedirectionRecosignalD6 == 10)
12322  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
12323  HEpositivedirectionRecosignalD6->Draw("Error");
12324  kcountHEpositivedirectionRecosignalD6++;
12325  if (kcountHEpositivedirectionRecosignalD6 > 10)
12326  break; // 4x6 = 24
12327  } //ccctest>0
12328 
12329  } // for i
12330  } //if(jeta-41 >= 0)
12331  } //for jeta
12333  c3x5->Update();
12334  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
12335  c3x5->Clear();
12336  // clean-up
12337  if (h2CeffHEpositivedirectionRecosignalD6)
12338  delete h2CeffHEpositivedirectionRecosignalD6;
12339  //========================================================================================== 20
12340  //======================================================================
12341  //======================================================================1D plot: D vs phi , different eta, depth=7
12342  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
12343  c3x5->Clear();
12344  c3x5->Divide(3, 5);
12345  c3x5->cd(1);
12346  int kcountHEpositivedirectionRecosignalD7 = 1;
12347  TH1F *h2CeffHEpositivedirectionRecosignalD7 = new TH1F("h2CeffHEpositivedirectionRecosignalD7", "", nphi, 0., 72.);
12348 
12349  for (int jeta = 0; jeta < njeta; jeta++) {
12350  // positivedirectionRecosignalD:
12351  if (jeta - 41 >= 0) {
12352  // for (int i=0;i<ndepth;i++) {
12353  // depth=7
12354  for (int i = 6; i < 7; i++) {
12355  TH1F *HEpositivedirectionRecosignalD7 = (TH1F *)h2CeffHEpositivedirectionRecosignalD7->Clone("twod1");
12356 
12357  float ccctest = 0; // to avoid empty massive elements
12358  for (int jphi = 0; jphi < nphi; jphi++) {
12359  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12360  if (arecosignalhe[i][jeta][jphi] > 0.) {
12361  HEpositivedirectionRecosignalD7->Fill(jphi, ccc1);
12362  ccctest = 1.; //HEpositivedirectionRecosignalD7->SetBinError(i,0.01);
12363  }
12364  } // for jphi
12365  if (ccctest != 0.) {
12366  //cout<<"2020 kcountHEpositivedirectionRecosignalD7 = "<<kcountHEpositivedirectionRecosignalD7 <<" jeta-41= "<< jeta-41 <<endl;
12367  c3x5->cd(kcountHEpositivedirectionRecosignalD7);
12368  HEpositivedirectionRecosignalD7->SetMarkerStyle(20);
12369  HEpositivedirectionRecosignalD7->SetMarkerSize(0.4);
12370  HEpositivedirectionRecosignalD7->GetYaxis()->SetLabelSize(0.04);
12371  HEpositivedirectionRecosignalD7->SetXTitle("HEpositivedirectionRecosignalD7 \b");
12372  HEpositivedirectionRecosignalD7->SetMarkerColor(2);
12373  HEpositivedirectionRecosignalD7->SetLineColor(0);
12374  gPad->SetGridy();
12375  gPad->SetGridx();
12376  // gPad->SetLogy();
12377  if (kcountHEpositivedirectionRecosignalD7 == 1)
12378  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
12379  if (kcountHEpositivedirectionRecosignalD7 == 2)
12380  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
12381  if (kcountHEpositivedirectionRecosignalD7 == 3)
12382  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
12383  HEpositivedirectionRecosignalD7->Draw("Error");
12384  kcountHEpositivedirectionRecosignalD7++;
12385  if (kcountHEpositivedirectionRecosignalD7 > 3)
12386  break; // 4x6 = 24
12387  } //ccctest>0
12388 
12389  } // for i
12390  } //if(jeta-41 >= 0)
12391  } //for jeta
12393  c3x5->Update();
12394  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
12395  c3x5->Clear();
12396  // clean-up
12397  if (h2CeffHEpositivedirectionRecosignalD7)
12398  delete h2CeffHEpositivedirectionRecosignalD7;
12399 
12400  //========================================================================================== 22222214
12401  //======================================================================
12402  //======================================================================1D plot: D vs phi , different eta, depth=1
12403  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
12404  c3x5->Clear();
12406  c3x5->Divide(3, 5);
12407  c3x5->cd(1);
12408  int kcountHEnegativedirectionRecosignalD1 = 1;
12409  TH1F *h2CeffHEnegativedirectionRecosignalD1 = new TH1F("h2CeffHEnegativedirectionRecosignalD1", "", nphi, 0., 72.);
12410 
12411  for (int jeta = 0; jeta < njeta; jeta++) {
12412  // negativedirectionRecosignalD:
12413  if (jeta - 41 < 0) {
12414  // for (int i=0;i<ndepth;i++) {
12415  // depth=1
12416  for (int i = 0; i < 1; i++) {
12417  TH1F *HEnegativedirectionRecosignalD1 = (TH1F *)h2CeffHEnegativedirectionRecosignalD1->Clone("twod1");
12418 
12419  float ccctest = 0; // to avoid empty massive elements
12420  for (int jphi = 0; jphi < nphi; jphi++) {
12421  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12422  if (arecosignalhe[i][jeta][jphi] > 0.) {
12423  HEnegativedirectionRecosignalD1->Fill(jphi, ccc1);
12424  ccctest = 1.; //HEnegativedirectionRecosignalD1->SetBinError(i,0.01);
12425  }
12426  } // for jphi
12427  if (ccctest > 0.) {
12428  //cout<<"1414 kcountHEnegativedirectionRecosignalD1 = "<<kcountHEnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
12429  c3x5->cd(kcountHEnegativedirectionRecosignalD1);
12430  HEnegativedirectionRecosignalD1->SetMarkerStyle(20);
12431  HEnegativedirectionRecosignalD1->SetMarkerSize(0.4);
12432  HEnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
12433  HEnegativedirectionRecosignalD1->SetXTitle("HEnegativedirectionRecosignalD1 \b");
12434  HEnegativedirectionRecosignalD1->SetMarkerColor(2);
12435  HEnegativedirectionRecosignalD1->SetLineColor(0);
12436  gPad->SetGridy();
12437  gPad->SetGridx();
12438  // gPad->SetLogy();
12439  if (kcountHEnegativedirectionRecosignalD1 == 1)
12440  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
12441  if (kcountHEnegativedirectionRecosignalD1 == 2)
12442  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
12443  if (kcountHEnegativedirectionRecosignalD1 == 3)
12444  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
12445  if (kcountHEnegativedirectionRecosignalD1 == 4)
12446  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
12447  if (kcountHEnegativedirectionRecosignalD1 == 5)
12448  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
12449  if (kcountHEnegativedirectionRecosignalD1 == 6)
12450  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
12451  if (kcountHEnegativedirectionRecosignalD1 == 7)
12452  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
12453  if (kcountHEnegativedirectionRecosignalD1 == 8)
12454  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
12455  if (kcountHEnegativedirectionRecosignalD1 == 9)
12456  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
12457  if (kcountHEnegativedirectionRecosignalD1 == 10)
12458  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
12459  if (kcountHEnegativedirectionRecosignalD1 == 11)
12460  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
12461  if (kcountHEnegativedirectionRecosignalD1 == 12)
12462  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
12463  HEnegativedirectionRecosignalD1->Draw("Error");
12464  kcountHEnegativedirectionRecosignalD1++;
12465  if (kcountHEnegativedirectionRecosignalD1 > 12)
12466  break; // 4x6 = 24
12467  } //ccctest>0
12468 
12469  } // for i
12470  } //if(jeta-41 < 0)
12471  } //for jeta
12473  c3x5->Update();
12474  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
12475  c3x5->Clear();
12476  // clean-up
12477  if (h2CeffHEnegativedirectionRecosignalD1)
12478  delete h2CeffHEnegativedirectionRecosignalD1;
12479  //========================================================================================== 22222215
12480  //======================================================================
12481  //======================================================================1D plot: D vs phi , different eta, depth=2
12482  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
12483  c3x5->Clear();
12484  c3x5->Divide(3, 5);
12485  c3x5->cd(1);
12486  int kcountHEnegativedirectionRecosignalD2 = 1;
12487  TH1F *h2CeffHEnegativedirectionRecosignalD2 = new TH1F("h2CeffHEnegativedirectionRecosignalD2", "", nphi, 0., 72.);
12488 
12489  for (int jeta = 0; jeta < njeta; jeta++) {
12490  // negativedirectionRecosignalD:
12491  if (jeta - 41 < 0) {
12492  // for (int i=0;i<ndepth;i++) {
12493  // depth=2
12494  for (int i = 1; i < 2; i++) {
12495  TH1F *HEnegativedirectionRecosignalD2 = (TH1F *)h2CeffHEnegativedirectionRecosignalD2->Clone("twod1");
12496 
12497  float ccctest = 0; // to avoid empty massive elements
12498  for (int jphi = 0; jphi < nphi; jphi++) {
12499  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12500  if (arecosignalhe[i][jeta][jphi] > 0.) {
12501  HEnegativedirectionRecosignalD2->Fill(jphi, ccc1);
12502  ccctest = 1.; //HEnegativedirectionRecosignalD2->SetBinError(i,0.01);
12503  }
12504  } // for jphi
12505  if (ccctest > 0.) {
12506  //cout<<"1515 kcountHEnegativedirectionRecosignalD2 = "<<kcountHEnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
12507  c3x5->cd(kcountHEnegativedirectionRecosignalD2);
12508  HEnegativedirectionRecosignalD2->SetMarkerStyle(20);
12509  HEnegativedirectionRecosignalD2->SetMarkerSize(0.4);
12510  HEnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
12511  HEnegativedirectionRecosignalD2->SetXTitle("HEnegativedirectionRecosignalD2 \b");
12512  HEnegativedirectionRecosignalD2->SetMarkerColor(2);
12513  HEnegativedirectionRecosignalD2->SetLineColor(0);
12514  gPad->SetGridy();
12515  gPad->SetGridx();
12516  // gPad->SetLogy();
12517  if (kcountHEnegativedirectionRecosignalD2 == 1)
12518  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
12519  if (kcountHEnegativedirectionRecosignalD2 == 2)
12520  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
12521  if (kcountHEnegativedirectionRecosignalD2 == 3)
12522  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
12523  if (kcountHEnegativedirectionRecosignalD2 == 4)
12524  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
12525  if (kcountHEnegativedirectionRecosignalD2 == 5)
12526  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
12527  if (kcountHEnegativedirectionRecosignalD2 == 6)
12528  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
12529  if (kcountHEnegativedirectionRecosignalD2 == 7)
12530  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
12531  if (kcountHEnegativedirectionRecosignalD2 == 8)
12532  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
12533  if (kcountHEnegativedirectionRecosignalD2 == 9)
12534  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
12535  if (kcountHEnegativedirectionRecosignalD2 == 10)
12536  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
12537  if (kcountHEnegativedirectionRecosignalD2 == 11)
12538  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
12539  if (kcountHEnegativedirectionRecosignalD2 == 12)
12540  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
12541  if (kcountHEnegativedirectionRecosignalD2 == 13)
12542  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
12543  HEnegativedirectionRecosignalD2->Draw("Error");
12544  kcountHEnegativedirectionRecosignalD2++;
12545  if (kcountHEnegativedirectionRecosignalD2 > 13)
12546  break; // 4x6 = 24
12547  } //ccctest>0
12548 
12549  } // for i
12550  } //if(jeta-41 < 0)
12551  } //for jeta
12553  c3x5->Update();
12554  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
12555  c3x5->Clear();
12556  // clean-up
12557  if (h2CeffHEnegativedirectionRecosignalD2)
12558  delete h2CeffHEnegativedirectionRecosignalD2;
12559  //========================================================================================== 22222216
12560  //======================================================================
12561  //======================================================================1D plot: D vs phi , different eta, depth=3
12562  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
12563  c3x5->Clear();
12564  c3x5->Divide(3, 5);
12565  c3x5->cd(1);
12566  int kcountHEnegativedirectionRecosignalD3 = 1;
12567  TH1F *h2CeffHEnegativedirectionRecosignalD3 = new TH1F("h2CeffHEnegativedirectionRecosignalD3", "", nphi, 0., 72.);
12568 
12569  for (int jeta = 0; jeta < njeta; jeta++) {
12570  // negativedirectionRecosignalD:
12571  if (jeta - 41 < 0) {
12572  // for (int i=0;i<ndepth;i++) {
12573  // depth=3
12574  for (int i = 2; i < 3; i++) {
12575  TH1F *HEnegativedirectionRecosignalD3 = (TH1F *)h2CeffHEnegativedirectionRecosignalD3->Clone("twod1");
12576 
12577  float ccctest = 0; // to avoid empty massive elements
12578  for (int jphi = 0; jphi < nphi; jphi++) {
12579  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12580  if (arecosignalhe[i][jeta][jphi] > 0.) {
12581  HEnegativedirectionRecosignalD3->Fill(jphi, ccc1);
12582  ccctest = 1.; //HEnegativedirectionRecosignalD3->SetBinError(i,0.01);
12583  }
12584  } // for jphi
12585  if (ccctest > 0.) {
12586  //cout<<"1616 kcountHEnegativedirectionRecosignalD3 = "<<kcountHEnegativedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
12587  c3x5->cd(kcountHEnegativedirectionRecosignalD3);
12588  HEnegativedirectionRecosignalD3->SetMarkerStyle(20);
12589  HEnegativedirectionRecosignalD3->SetMarkerSize(0.4);
12590  HEnegativedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
12591  HEnegativedirectionRecosignalD3->SetXTitle("HEnegativedirectionRecosignalD3 \b");
12592  HEnegativedirectionRecosignalD3->SetMarkerColor(2);
12593  HEnegativedirectionRecosignalD3->SetLineColor(0);
12594  gPad->SetGridy();
12595  gPad->SetGridx();
12596  // gPad->SetLogy();
12597  if (kcountHEnegativedirectionRecosignalD3 == 1)
12598  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
12599  if (kcountHEnegativedirectionRecosignalD3 == 2)
12600  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
12601  if (kcountHEnegativedirectionRecosignalD3 == 3)
12602  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
12603  if (kcountHEnegativedirectionRecosignalD3 == 4)
12604  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
12605  if (kcountHEnegativedirectionRecosignalD3 == 5)
12606  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
12607  if (kcountHEnegativedirectionRecosignalD3 == 6)
12608  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
12609  if (kcountHEnegativedirectionRecosignalD3 == 7)
12610  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
12611  if (kcountHEnegativedirectionRecosignalD3 == 8)
12612  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
12613  if (kcountHEnegativedirectionRecosignalD3 == 9)
12614  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
12615  if (kcountHEnegativedirectionRecosignalD3 == 10)
12616  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
12617  if (kcountHEnegativedirectionRecosignalD3 == 11)
12618  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
12619  if (kcountHEnegativedirectionRecosignalD3 == 12)
12620  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
12621  if (kcountHEnegativedirectionRecosignalD3 == 13)
12622  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
12623  HEnegativedirectionRecosignalD3->Draw("Error");
12624  kcountHEnegativedirectionRecosignalD3++;
12625  if (kcountHEnegativedirectionRecosignalD3 > 13)
12626  break; // 4x6 = 24
12627  } //ccctest>0
12628 
12629  } // for i
12630  } //if(jeta-41 < 0)
12631  } //for jeta
12633  c3x5->Update();
12634  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
12635  c3x5->Clear();
12636  // clean-up
12637  if (h2CeffHEnegativedirectionRecosignalD3)
12638  delete h2CeffHEnegativedirectionRecosignalD3;
12639  //========================================================================================== 22222217
12640  //======================================================================
12641  //======================================================================1D plot: D vs phi , different eta, depth=4
12642  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
12643  c3x5->Clear();
12644  c3x5->Divide(3, 5);
12645  c3x5->cd(1);
12646  int kcountHEnegativedirectionRecosignalD4 = 1;
12647  TH1F *h2CeffHEnegativedirectionRecosignalD4 = new TH1F("h2CeffHEnegativedirectionRecosignalD4", "", nphi, 0., 72.);
12648 
12649  for (int jeta = 0; jeta < njeta; jeta++) {
12650  // negativedirectionRecosignalD:
12651  if (jeta - 41 < 0) {
12652  // for (int i=0;i<ndepth;i++) {
12653  // depth=4
12654  for (int i = 3; i < 4; i++) {
12655  TH1F *HEnegativedirectionRecosignalD4 = (TH1F *)h2CeffHEnegativedirectionRecosignalD4->Clone("twod1");
12656 
12657  float ccctest = 0; // to avoid empty massive elements
12658  for (int jphi = 0; jphi < nphi; jphi++) {
12659  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12660  if (arecosignalhe[i][jeta][jphi] > 0.) {
12661  HEnegativedirectionRecosignalD4->Fill(jphi, ccc1);
12662  ccctest = 1.; //HEnegativedirectionRecosignalD4->SetBinError(i,0.01);
12663  }
12664  } // for jphi
12665  if (ccctest > 0.) {
12666  //cout<<"1717 kcountHEnegativedirectionRecosignalD4 = "<<kcountHEnegativedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
12667  c3x5->cd(kcountHEnegativedirectionRecosignalD4);
12668  HEnegativedirectionRecosignalD4->SetMarkerStyle(20);
12669  HEnegativedirectionRecosignalD4->SetMarkerSize(0.4);
12670  HEnegativedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
12671  HEnegativedirectionRecosignalD4->SetXTitle("HEnegativedirectionRecosignalD4 \b");
12672  HEnegativedirectionRecosignalD4->SetMarkerColor(2);
12673  HEnegativedirectionRecosignalD4->SetLineColor(0);
12674  gPad->SetGridy();
12675  gPad->SetGridx();
12676  // gPad->SetLogy();
12677  if (kcountHEnegativedirectionRecosignalD4 == 1)
12678  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
12679  if (kcountHEnegativedirectionRecosignalD4 == 2)
12680  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
12681  if (kcountHEnegativedirectionRecosignalD4 == 3)
12682  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
12683  if (kcountHEnegativedirectionRecosignalD4 == 4)
12684  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
12685  if (kcountHEnegativedirectionRecosignalD4 == 5)
12686  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
12687  if (kcountHEnegativedirectionRecosignalD4 == 6)
12688  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
12689  if (kcountHEnegativedirectionRecosignalD4 == 7)
12690  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
12691  if (kcountHEnegativedirectionRecosignalD4 == 8)
12692  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
12693  if (kcountHEnegativedirectionRecosignalD4 == 9)
12694  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
12695  if (kcountHEnegativedirectionRecosignalD4 == 10)
12696  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
12697  if (kcountHEnegativedirectionRecosignalD4 == 11)
12698  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
12699  if (kcountHEnegativedirectionRecosignalD4 == 12)
12700  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
12701  HEnegativedirectionRecosignalD4->Draw("Error");
12702  kcountHEnegativedirectionRecosignalD4++;
12703  if (kcountHEnegativedirectionRecosignalD4 > 12)
12704  break; // 4x6 = 24
12705  } //ccctest>0
12706 
12707  } // for i
12708  } //if(jeta-41 < 0)
12709  } //for jeta
12711  c3x5->Update();
12712  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
12713  c3x5->Clear();
12714  // clean-up
12715  if (h2CeffHEnegativedirectionRecosignalD4)
12716  delete h2CeffHEnegativedirectionRecosignalD4;
12717  //========================================================================================== 22222218
12718  //======================================================================
12719  //======================================================================1D plot: D vs phi , different eta, depth=5
12720  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
12721  c3x5->Clear();
12722  c3x5->Divide(3, 5);
12723  c3x5->cd(1);
12724  int kcountHEnegativedirectionRecosignalD5 = 1;
12725  TH1F *h2CeffHEnegativedirectionRecosignalD5 = new TH1F("h2CeffHEnegativedirectionRecosignalD5", "", nphi, 0., 72.);
12726 
12727  for (int jeta = 0; jeta < njeta; jeta++) {
12728  // negativedirectionRecosignalD:
12729  if (jeta - 41 < 0) {
12730  // for (int i=0;i<ndepth;i++) {
12731  // depth=5
12732  for (int i = 4; i < 5; i++) {
12733  TH1F *HEnegativedirectionRecosignalD5 = (TH1F *)h2CeffHEnegativedirectionRecosignalD5->Clone("twod1");
12734 
12735  float ccctest = 0; // to avoid empty massive elements
12736  for (int jphi = 0; jphi < nphi; jphi++) {
12737  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12738  if (arecosignalhe[i][jeta][jphi] > 0.) {
12739  HEnegativedirectionRecosignalD5->Fill(jphi, ccc1);
12740  ccctest = 1.; //HEnegativedirectionRecosignalD5->SetBinError(i,0.01);
12741  }
12742  } // for jphi
12743  if (ccctest > 0.) {
12744  //cout<<"1818 kcountHEnegativedirectionRecosignalD5 = "<<kcountHEnegativedirectionRecosignalD5 <<" jeta-41= "<< jeta-41 <<endl;
12745  c3x5->cd(kcountHEnegativedirectionRecosignalD5);
12746  HEnegativedirectionRecosignalD5->SetMarkerStyle(20);
12747  HEnegativedirectionRecosignalD5->SetMarkerSize(0.4);
12748  HEnegativedirectionRecosignalD5->GetYaxis()->SetLabelSize(0.04);
12749  HEnegativedirectionRecosignalD5->SetXTitle("HEnegativedirectionRecosignalD5 \b");
12750  HEnegativedirectionRecosignalD5->SetMarkerColor(2);
12751  HEnegativedirectionRecosignalD5->SetLineColor(0);
12752  gPad->SetGridy();
12753  gPad->SetGridx();
12754  // gPad->SetLogy();
12755  if (kcountHEnegativedirectionRecosignalD5 == 1)
12756  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
12757  if (kcountHEnegativedirectionRecosignalD5 == 2)
12758  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
12759  if (kcountHEnegativedirectionRecosignalD5 == 3)
12760  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
12761  if (kcountHEnegativedirectionRecosignalD5 == 4)
12762  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
12763  if (kcountHEnegativedirectionRecosignalD5 == 5)
12764  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
12765  if (kcountHEnegativedirectionRecosignalD5 == 6)
12766  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
12767  if (kcountHEnegativedirectionRecosignalD5 == 7)
12768  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
12769  if (kcountHEnegativedirectionRecosignalD5 == 8)
12770  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
12771  if (kcountHEnegativedirectionRecosignalD5 == 9)
12772  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
12773  if (kcountHEnegativedirectionRecosignalD5 == 10)
12774  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
12775  if (kcountHEnegativedirectionRecosignalD5 == 11)
12776  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
12777  HEnegativedirectionRecosignalD5->Draw("Error");
12778  kcountHEnegativedirectionRecosignalD5++;
12779  if (kcountHEnegativedirectionRecosignalD5 > 11)
12780  break; // 4x6 = 24
12781  } //ccctest>0
12782 
12783  } // for i
12784  } //if(jeta-41 < 0)
12785  } //for jeta
12787  c3x5->Update();
12788  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
12789  c3x5->Clear();
12790  // clean-up
12791  if (h2CeffHEnegativedirectionRecosignalD5)
12792  delete h2CeffHEnegativedirectionRecosignalD5;
12793  //========================================================================================== 22222219
12794  //======================================================================
12795  //======================================================================1D plot: D vs phi , different eta, depth=6
12796  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
12797  c3x5->Clear();
12798  c3x5->Divide(3, 5);
12799  c3x5->cd(1);
12800  int kcountHEnegativedirectionRecosignalD6 = 1;
12801  TH1F *h2CeffHEnegativedirectionRecosignalD6 = new TH1F("h2CeffHEnegativedirectionRecosignalD6", "", nphi, 0., 72.);
12802 
12803  for (int jeta = 0; jeta < njeta; jeta++) {
12804  // negativedirectionRecosignalD:
12805  if (jeta - 41 < 0) {
12806  // for (int i=0;i<ndepth;i++) {
12807  // depth=6
12808  for (int i = 5; i < 6; i++) {
12809  TH1F *HEnegativedirectionRecosignalD6 = (TH1F *)h2CeffHEnegativedirectionRecosignalD6->Clone("twod1");
12810 
12811  float ccctest = 0; // to avoid empty massive elements
12812  for (int jphi = 0; jphi < nphi; jphi++) {
12813  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12814  if (arecosignalhe[i][jeta][jphi] > 0.) {
12815  HEnegativedirectionRecosignalD6->Fill(jphi, ccc1);
12816  ccctest = 1.; //HEnegativedirectionRecosignalD6->SetBinError(i,0.01);
12817  }
12818  } // for jphi
12819  if (ccctest > 0.) {
12820  //cout<<"1919 kcountHEnegativedirectionRecosignalD6 = "<<kcountHEnegativedirectionRecosignalD6 <<" jeta-41= "<< jeta-41 <<endl;
12821  c3x5->cd(kcountHEnegativedirectionRecosignalD6);
12822  HEnegativedirectionRecosignalD6->SetMarkerStyle(20);
12823  HEnegativedirectionRecosignalD6->SetMarkerSize(0.4);
12824  HEnegativedirectionRecosignalD6->GetYaxis()->SetLabelSize(0.04);
12825  HEnegativedirectionRecosignalD6->SetXTitle("HEnegativedirectionRecosignalD6 \b");
12826  HEnegativedirectionRecosignalD6->SetMarkerColor(2);
12827  HEnegativedirectionRecosignalD6->SetLineColor(0);
12828  gPad->SetGridy();
12829  gPad->SetGridx();
12830  // gPad->SetLogy();
12831  if (kcountHEnegativedirectionRecosignalD6 == 1)
12832  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
12833  if (kcountHEnegativedirectionRecosignalD6 == 2)
12834  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
12835  if (kcountHEnegativedirectionRecosignalD6 == 3)
12836  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
12837  if (kcountHEnegativedirectionRecosignalD6 == 4)
12838  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
12839  if (kcountHEnegativedirectionRecosignalD6 == 5)
12840  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
12841  if (kcountHEnegativedirectionRecosignalD6 == 6)
12842  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
12843  if (kcountHEnegativedirectionRecosignalD6 == 7)
12844  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
12845  if (kcountHEnegativedirectionRecosignalD6 == 8)
12846  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
12847  if (kcountHEnegativedirectionRecosignalD6 == 9)
12848  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
12849  if (kcountHEnegativedirectionRecosignalD6 == 10)
12850  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
12851  HEnegativedirectionRecosignalD6->Draw("Error");
12852  kcountHEnegativedirectionRecosignalD6++;
12853  if (kcountHEnegativedirectionRecosignalD6 > 10)
12854  break; // 4x6 = 24
12855  } //ccctest>0
12856 
12857  } // for i
12858  } //if(jeta-41 < 0)
12859  } //for jeta
12861  c3x5->Update();
12862  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
12863  c3x5->Clear();
12864  // clean-up
12865  if (h2CeffHEnegativedirectionRecosignalD6)
12866  delete h2CeffHEnegativedirectionRecosignalD6;
12867  //========================================================================================== 22222220
12868  //======================================================================
12869  //======================================================================1D plot: D vs phi , different eta, depth=7
12870  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
12871  c3x5->Clear();
12872  c3x5->Divide(3, 5);
12873  c3x5->cd(1);
12874  int kcountHEnegativedirectionRecosignalD7 = 1;
12875  TH1F *h2CeffHEnegativedirectionRecosignalD7 = new TH1F("h2CeffHEnegativedirectionRecosignalD7", "", nphi, 0., 72.);
12876 
12877  for (int jeta = 0; jeta < njeta; jeta++) {
12878  // negativedirectionRecosignalD:
12879  if (jeta - 41 < 0) {
12880  // for (int i=0;i<ndepth;i++) {
12881  // depth=7
12882  for (int i = 6; i < 7; i++) {
12883  TH1F *HEnegativedirectionRecosignalD7 = (TH1F *)h2CeffHEnegativedirectionRecosignalD7->Clone("twod1");
12884 
12885  float ccctest = 0; // to avoid empty massive elements
12886  for (int jphi = 0; jphi < nphi; jphi++) {
12887  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12888  if (arecosignalhe[i][jeta][jphi] > 0.) {
12889  HEnegativedirectionRecosignalD7->Fill(jphi, ccc1);
12890  ccctest = 1.; //HEnegativedirectionRecosignalD7->SetBinError(i,0.01);
12891  }
12892  } // for jphi
12893  if (ccctest != 0.) {
12894  //cout<<"2020 kcountHEnegativedirectionRecosignalD7 = "<<kcountHEnegativedirectionRecosignalD7 <<" jeta-41= "<< jeta-41 <<endl;
12895  c3x5->cd(kcountHEnegativedirectionRecosignalD7);
12896  HEnegativedirectionRecosignalD7->SetMarkerStyle(20);
12897  HEnegativedirectionRecosignalD7->SetMarkerSize(0.4);
12898  HEnegativedirectionRecosignalD7->GetYaxis()->SetLabelSize(0.04);
12899  HEnegativedirectionRecosignalD7->SetXTitle("HEnegativedirectionRecosignalD7 \b");
12900  HEnegativedirectionRecosignalD7->SetMarkerColor(2);
12901  HEnegativedirectionRecosignalD7->SetLineColor(0);
12902  gPad->SetGridy();
12903  gPad->SetGridx();
12904  // gPad->SetLogy();
12905  if (kcountHEnegativedirectionRecosignalD7 == 1)
12906  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
12907  if (kcountHEnegativedirectionRecosignalD7 == 2)
12908  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
12909  if (kcountHEnegativedirectionRecosignalD7 == 3)
12910  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
12911  HEnegativedirectionRecosignalD7->Draw("Error");
12912  kcountHEnegativedirectionRecosignalD7++;
12913  if (kcountHEnegativedirectionRecosignalD7 > 3)
12914  break; // 4x6 = 24
12915  } //ccctest>0
12916 
12917  } // for i
12918  } //if(jeta-41 < 0)
12919  } //for jeta
12921  c3x5->Update();
12922  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
12923  c3x5->Clear();
12924  // clean-up
12925  if (h2CeffHEnegativedirectionRecosignalD7)
12926  delete h2CeffHEnegativedirectionRecosignalD7;
12927  //===================================================================== END of Recosignal HE for phi-symmetry
12928  //===================================================================== END of Recosignal HE for phi-symmetry
12929  //===================================================================== END of Recosignal HE for phi-symmetry
12933  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
12934  //ndepth = k_max[5];
12935  ndepth = 2;
12936  double arecosignalHF[ndepth][njeta][njphi];
12937  double recosignalvarianceHF[ndepth][njeta][njphi];
12938  //cout<<"111RRRRRRRRRRRRRRRRRRRRRRRRR Recosignal HF" <<endl;
12939  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HF
12940  TH2F *recSignalEnergy1HF1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HF1");
12941  TH2F *recSignalEnergy0HF1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HF1");
12942  TH2F *recSignalEnergyHF1 = (TH2F *)recSignalEnergy1HF1->Clone("recSignalEnergyHF1");
12943  recSignalEnergyHF1->Divide(recSignalEnergy1HF1, recSignalEnergy0HF1, 1, 1, "B");
12944  TH2F *recSignalEnergy1HF2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy1_HF2");
12945  TH2F *recSignalEnergy0HF2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HF2");
12946  TH2F *recSignalEnergyHF2 = (TH2F *)recSignalEnergy1HF2->Clone("recSignalEnergyHF2");
12947  recSignalEnergyHF2->Divide(recSignalEnergy1HF2, recSignalEnergy0HF2, 1, 1, "B");
12948  // cout<<"222RRRRRRRRRRRRRRRRRRRRRRRRR Recosignal HF" <<endl;
12949  //====================================================================== PHI normalization & put R into massive arecosignalHF
12950  for (int jeta = 0; jeta < njeta; jeta++) {
12951  //preparation for PHI normalization:
12952  double sumrecosignalHF0 = 0;
12953  int nsumrecosignalHF0 = 0;
12954  double sumrecosignalHF1 = 0;
12955  int nsumrecosignalHF1 = 0;
12956  for (int jphi = 0; jphi < njphi; jphi++) {
12957  arecosignalHF[0][jeta][jphi] = recSignalEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
12958  arecosignalHF[1][jeta][jphi] = recSignalEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
12959  if (arecosignalHF[0][jeta][jphi] > 0.) {
12960  sumrecosignalHF0 += arecosignalHF[0][jeta][jphi];
12961  ++nsumrecosignalHF0;
12962  }
12963  if (arecosignalHF[1][jeta][jphi] > 0.) {
12964  sumrecosignalHF1 += arecosignalHF[1][jeta][jphi];
12965  ++nsumrecosignalHF1;
12966  }
12967  } // phi
12968  // PHI normalization:
12969  for (int jphi = 0; jphi < njphi; jphi++) {
12970  if (arecosignalHF[0][jeta][jphi] > 0.)
12971  arecosignalHF[0][jeta][jphi] /= (sumrecosignalHF0 / nsumrecosignalHF0);
12972  if (arecosignalHF[1][jeta][jphi] > 0.)
12973  arecosignalHF[1][jeta][jphi] /= (sumrecosignalHF1 / nsumrecosignalHF1);
12974  } // phi
12975  } //eta
12976  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
12977  //======================================================================
12978  //======================================================================
12979  // cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
12980  c2x1->Clear();
12982  c2x1->Divide(2, 1);
12983  c2x1->cd(1);
12984  TH2F *GefzRrecosignalHF42D = new TH2F("GefzRrecosignalHF42D", "", neta, -41., 41., nphi, 0., 72.);
12985  TH2F *GefzRrecosignalHF42D0 = new TH2F("GefzRrecosignalHF42D0", "", neta, -41., 41., nphi, 0., 72.);
12986  TH2F *GefzRrecosignalHF42DF = (TH2F *)GefzRrecosignalHF42D0->Clone("GefzRrecosignalHF42DF");
12987  for (int i = 0; i < ndepth; i++) {
12988  for (int jeta = 0; jeta < neta; jeta++) {
12989  for (int jphi = 0; jphi < nphi; jphi++) {
12990  double ccc1 = arecosignalHF[i][jeta][jphi];
12991  int k2plot = jeta - 41;
12992  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
12993  if (ccc1 != 0.) {
12994  GefzRrecosignalHF42D->Fill(kkk, jphi, ccc1);
12995  GefzRrecosignalHF42D0->Fill(kkk, jphi, 1.);
12996  }
12997  }
12998  }
12999  }
13000  GefzRrecosignalHF42DF->Divide(GefzRrecosignalHF42D, GefzRrecosignalHF42D0, 1, 1, "B"); // average A
13001  gPad->SetGridy();
13002  gPad->SetGridx(); // gPad->SetLogz();
13003  GefzRrecosignalHF42DF->SetXTitle("<R>_depth #eta \b");
13004  GefzRrecosignalHF42DF->SetYTitle(" #phi \b");
13005  GefzRrecosignalHF42DF->Draw("COLZ");
13006 
13007  c2x1->cd(2);
13008  TH1F *energyhitSignal_HF = (TH1F *)dir->FindObjectAny("h_energyhitSignal_HF");
13009  energyhitSignal_HF->SetMarkerStyle(20);
13010  energyhitSignal_HF->SetMarkerSize(0.4);
13011  energyhitSignal_HF->GetYaxis()->SetLabelSize(0.04);
13012  energyhitSignal_HF->SetXTitle("energyhitSignal_HF \b");
13013  energyhitSignal_HF->SetMarkerColor(2);
13014  energyhitSignal_HF->SetLineColor(0);
13015  gPad->SetGridy();
13016  gPad->SetGridx();
13017  energyhitSignal_HF->Draw("Error");
13018 
13020  c2x1->Update();
13021  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHF.png");
13022  c2x1->Clear();
13023  // clean-up
13024  if (GefzRrecosignalHF42D)
13025  delete GefzRrecosignalHF42D;
13026  if (GefzRrecosignalHF42D0)
13027  delete GefzRrecosignalHF42D0;
13028  if (GefzRrecosignalHF42DF)
13029  delete GefzRrecosignalHF42DF;
13030  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
13031  //======================================================================
13032  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
13033  c1x1->Clear();
13035  c1x1->Divide(1, 1);
13036  c1x1->cd(1);
13037  TH1F *GefzRrecosignalHF41D = new TH1F("GefzRrecosignalHF41D", "", nphi, 0., 72.);
13038  TH1F *GefzRrecosignalHF41D0 = new TH1F("GefzRrecosignalHF41D0", "", nphi, 0., 72.);
13039  TH1F *GefzRrecosignalHF41DF = (TH1F *)GefzRrecosignalHF41D0->Clone("GefzRrecosignalHF41DF");
13040  for (int jphi = 0; jphi < nphi; jphi++) {
13041  for (int jeta = 0; jeta < neta; jeta++) {
13042  for (int i = 0; i < ndepth; i++) {
13043  double ccc1 = arecosignalHF[i][jeta][jphi];
13044  if (ccc1 != 0.) {
13045  GefzRrecosignalHF41D->Fill(jphi, ccc1);
13046  GefzRrecosignalHF41D0->Fill(jphi, 1.);
13047  }
13048  }
13049  }
13050  }
13051  GefzRrecosignalHF41DF->Divide(
13052  GefzRrecosignalHF41D, GefzRrecosignalHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
13053  GefzRrecosignalHF41D0->Sumw2();
13054  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHF41DF->SetBinError(jphi,0.01);}
13055  gPad->SetGridy();
13056  gPad->SetGridx(); // gPad->SetLogz();
13057  GefzRrecosignalHF41DF->SetMarkerStyle(20);
13058  GefzRrecosignalHF41DF->SetMarkerSize(1.4);
13059  GefzRrecosignalHF41DF->GetZaxis()->SetLabelSize(0.08);
13060  GefzRrecosignalHF41DF->SetXTitle("#phi \b");
13061  GefzRrecosignalHF41DF->SetYTitle(" <R> \b");
13062  GefzRrecosignalHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
13063  GefzRrecosignalHF41DF->SetMarkerColor(4);
13064  GefzRrecosignalHF41DF->SetLineColor(
13065  4); // GefzRrecosignalHF41DF->SetMinimum(0.8); // GefzRrecosignalHF41DF->SetMaximum(1.000);
13066  GefzRrecosignalHF41DF->Draw("Error");
13068  c1x1->Update();
13069  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHF.png");
13070  c1x1->Clear();
13071  // clean-up
13072  if (GefzRrecosignalHF41D)
13073  delete GefzRrecosignalHF41D;
13074  if (GefzRrecosignalHF41D0)
13075  delete GefzRrecosignalHF41D0;
13076  if (GefzRrecosignalHF41DF)
13077  delete GefzRrecosignalHF41DF;
13078  //========================================================================================== 4
13079  //======================================================================
13080  //======================================================================1D plot: R vs phi , different eta, depth=1
13081  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
13082  c3x5->Clear();
13084  c3x5->Divide(3, 5);
13085  c3x5->cd(1);
13086  int kcountHFpositivedirectionRecosignal1 = 1;
13087  TH1F *h2CeffHFpositivedirectionRecosignal1 = new TH1F("h2CeffHFpositivedirectionRecosignal1", "", nphi, 0., 72.);
13088  for (int jeta = 0; jeta < njeta; jeta++) {
13089  // positivedirectionRecosignal:
13090  if (jeta - 41 >= 0) {
13091  // for (int i=0;i<ndepth;i++) {
13092  // depth=1
13093  for (int i = 0; i < 1; i++) {
13094  TH1F *HFpositivedirectionRecosignal1 = (TH1F *)h2CeffHFpositivedirectionRecosignal1->Clone("twod1");
13095  float ccctest = 0; // to avoid empty massive elements
13096  for (int jphi = 0; jphi < nphi; jphi++) {
13097  double ccc1 = arecosignalHF[i][jeta][jphi];
13098  if (ccc1 != 0.) {
13099  HFpositivedirectionRecosignal1->Fill(jphi, ccc1);
13100  ccctest = 1.; //HFpositivedirectionRecosignal1->SetBinError(i,0.01);
13101  }
13102  } // for jphi
13103  if (ccctest > 0.) {
13104  // cout<<"444 kcountHFpositivedirectionRecosignal1 = "<<kcountHFpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
13105  c3x5->cd(kcountHFpositivedirectionRecosignal1);
13106  HFpositivedirectionRecosignal1->SetMarkerStyle(20);
13107  HFpositivedirectionRecosignal1->SetMarkerSize(0.4);
13108  HFpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
13109  HFpositivedirectionRecosignal1->SetXTitle("HFpositivedirectionRecosignal1 \b");
13110  HFpositivedirectionRecosignal1->SetMarkerColor(2);
13111  HFpositivedirectionRecosignal1->SetLineColor(0);
13112  gPad->SetGridy();
13113  gPad->SetGridx();
13114  // gPad->SetLogy();
13115  if (kcountHFpositivedirectionRecosignal1 == 1)
13116  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
13117  if (kcountHFpositivedirectionRecosignal1 == 2)
13118  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
13119  if (kcountHFpositivedirectionRecosignal1 == 3)
13120  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
13121  if (kcountHFpositivedirectionRecosignal1 == 4)
13122  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
13123  if (kcountHFpositivedirectionRecosignal1 == 5)
13124  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
13125  if (kcountHFpositivedirectionRecosignal1 == 6)
13126  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
13127  if (kcountHFpositivedirectionRecosignal1 == 7)
13128  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
13129  if (kcountHFpositivedirectionRecosignal1 == 8)
13130  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
13131  if (kcountHFpositivedirectionRecosignal1 == 9)
13132  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
13133  if (kcountHFpositivedirectionRecosignal1 == 10)
13134  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
13135  if (kcountHFpositivedirectionRecosignal1 == 11)
13136  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
13137  if (kcountHFpositivedirectionRecosignal1 == 12)
13138  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
13139  if (kcountHFpositivedirectionRecosignal1 == 13)
13140  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
13141  HFpositivedirectionRecosignal1->Draw("Error");
13142  kcountHFpositivedirectionRecosignal1++;
13143  if (kcountHFpositivedirectionRecosignal1 > 13)
13144  break; //
13145  } //ccctest>0
13146 
13147  } // for i
13148  } //if(jeta-41 >= 0)
13149  } //for jeta
13151  c3x5->Update();
13152  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
13153  c3x5->Clear();
13154  // clean-up
13155  if (h2CeffHFpositivedirectionRecosignal1)
13156  delete h2CeffHFpositivedirectionRecosignal1;
13157 
13158  //========================================================================================== 5
13159  //======================================================================
13160  //======================================================================1D plot: R vs phi , different eta, depth=2
13161  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
13162  c3x5->Clear();
13164  c3x5->Divide(3, 5);
13165  c3x5->cd(1);
13166  int kcountHFpositivedirectionRecosignal2 = 1;
13167  TH1F *h2CeffHFpositivedirectionRecosignal2 = new TH1F("h2CeffHFpositivedirectionRecosignal2", "", nphi, 0., 72.);
13168  for (int jeta = 0; jeta < njeta; jeta++) {
13169  // positivedirectionRecosignal:
13170  if (jeta - 41 >= 0) {
13171  // for (int i=0;i<ndepth;i++) {
13172  // depth=2
13173  for (int i = 1; i < 2; i++) {
13174  TH1F *HFpositivedirectionRecosignal2 = (TH1F *)h2CeffHFpositivedirectionRecosignal2->Clone("twod1");
13175  float ccctest = 0; // to avoid empty massive elements
13176  for (int jphi = 0; jphi < nphi; jphi++) {
13177  double ccc1 = arecosignalHF[i][jeta][jphi];
13178  if (ccc1 != 0.) {
13179  HFpositivedirectionRecosignal2->Fill(jphi, ccc1);
13180  ccctest = 1.; //HFpositivedirectionRecosignal2->SetBinError(i,0.01);
13181  }
13182  } // for jphi
13183  if (ccctest > 0.) {
13184  //cout<<"555 kcountHFpositivedirectionRecosignal2 = "<<kcountHFpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
13185  c3x5->cd(kcountHFpositivedirectionRecosignal2);
13186  HFpositivedirectionRecosignal2->SetMarkerStyle(20);
13187  HFpositivedirectionRecosignal2->SetMarkerSize(0.4);
13188  HFpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
13189  HFpositivedirectionRecosignal2->SetXTitle("HFpositivedirectionRecosignal2 \b");
13190  HFpositivedirectionRecosignal2->SetMarkerColor(2);
13191  HFpositivedirectionRecosignal2->SetLineColor(0);
13192  gPad->SetGridy();
13193  gPad->SetGridx();
13194  // gPad->SetLogy();
13195  if (kcountHFpositivedirectionRecosignal2 == 1)
13196  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
13197  if (kcountHFpositivedirectionRecosignal2 == 2)
13198  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
13199  if (kcountHFpositivedirectionRecosignal2 == 3)
13200  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
13201  if (kcountHFpositivedirectionRecosignal2 == 4)
13202  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
13203  if (kcountHFpositivedirectionRecosignal2 == 5)
13204  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
13205  if (kcountHFpositivedirectionRecosignal2 == 6)
13206  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
13207  if (kcountHFpositivedirectionRecosignal2 == 7)
13208  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
13209  if (kcountHFpositivedirectionRecosignal2 == 8)
13210  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
13211  if (kcountHFpositivedirectionRecosignal2 == 9)
13212  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
13213  if (kcountHFpositivedirectionRecosignal2 == 10)
13214  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
13215  if (kcountHFpositivedirectionRecosignal2 == 11)
13216  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
13217  if (kcountHFpositivedirectionRecosignal2 == 12)
13218  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
13219  if (kcountHFpositivedirectionRecosignal2 == 13)
13220  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
13221  HFpositivedirectionRecosignal2->Draw("Error");
13222  kcountHFpositivedirectionRecosignal2++;
13223  if (kcountHFpositivedirectionRecosignal2 > 13)
13224  break; // 4x6 = 24
13225  } //ccctest>0
13226 
13227  } // for i
13228  } //if(jeta-41 >= 0)
13229  } //for jeta
13231  c3x5->Update();
13232  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
13233  c3x5->Clear();
13234  // clean-up
13235  if (h2CeffHFpositivedirectionRecosignal2)
13236  delete h2CeffHFpositivedirectionRecosignal2;
13237 
13238  //========================================================================================== 1111114
13239  //======================================================================
13240  //======================================================================1D plot: R vs phi , different eta, depth=1
13241  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
13242  c3x5->Clear();
13244  c3x5->Divide(3, 5);
13245  c3x5->cd(1);
13246  int kcountHFnegativedirectionRecosignal1 = 1;
13247  TH1F *h2CeffHFnegativedirectionRecosignal1 = new TH1F("h2CeffHFnegativedirectionRecosignal1", "", nphi, 0., 72.);
13248  for (int jeta = 0; jeta < njeta; jeta++) {
13249  // negativedirectionRecosignal:
13250  if (jeta - 41 < 0) {
13251  // for (int i=0;i<ndepth;i++) {
13252  // depth=1
13253  for (int i = 0; i < 1; i++) {
13254  TH1F *HFnegativedirectionRecosignal1 = (TH1F *)h2CeffHFnegativedirectionRecosignal1->Clone("twod1");
13255  float ccctest = 0; // to avoid empty massive elements
13256  for (int jphi = 0; jphi < nphi; jphi++) {
13257  double ccc1 = arecosignalHF[i][jeta][jphi];
13258  if (ccc1 != 0.) {
13259  HFnegativedirectionRecosignal1->Fill(jphi, ccc1);
13260  ccctest = 1.; //HFnegativedirectionRecosignal1->SetBinError(i,0.01);
13261  }
13262  } // for jphi
13263  if (ccctest > 0.) {
13264  // cout<<"444 kcountHFnegativedirectionRecosignal1 = "<<kcountHFnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
13265  c3x5->cd(kcountHFnegativedirectionRecosignal1);
13266  HFnegativedirectionRecosignal1->SetMarkerStyle(20);
13267  HFnegativedirectionRecosignal1->SetMarkerSize(0.4);
13268  HFnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
13269  HFnegativedirectionRecosignal1->SetXTitle("HFnegativedirectionRecosignal1 \b");
13270  HFnegativedirectionRecosignal1->SetMarkerColor(2);
13271  HFnegativedirectionRecosignal1->SetLineColor(0);
13272  gPad->SetGridy();
13273  gPad->SetGridx();
13274  // gPad->SetLogy();
13275  if (kcountHFnegativedirectionRecosignal1 == 1)
13276  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
13277  if (kcountHFnegativedirectionRecosignal1 == 2)
13278  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
13279  if (kcountHFnegativedirectionRecosignal1 == 3)
13280  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
13281  if (kcountHFnegativedirectionRecosignal1 == 4)
13282  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
13283  if (kcountHFnegativedirectionRecosignal1 == 5)
13284  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
13285  if (kcountHFnegativedirectionRecosignal1 == 6)
13286  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
13287  if (kcountHFnegativedirectionRecosignal1 == 7)
13288  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
13289  if (kcountHFnegativedirectionRecosignal1 == 8)
13290  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
13291  if (kcountHFnegativedirectionRecosignal1 == 9)
13292  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
13293  if (kcountHFnegativedirectionRecosignal1 == 10)
13294  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
13295  if (kcountHFnegativedirectionRecosignal1 == 11)
13296  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
13297  if (kcountHFnegativedirectionRecosignal1 == 12)
13298  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
13299  if (kcountHFnegativedirectionRecosignal1 == 13)
13300  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
13301  HFnegativedirectionRecosignal1->Draw("Error");
13302  kcountHFnegativedirectionRecosignal1++;
13303  if (kcountHFnegativedirectionRecosignal1 > 13)
13304  break; //
13305  } //ccctest>0
13306 
13307  } // for i
13308  } //if(jeta-41< 0)
13309  } //for jeta
13311  c3x5->Update();
13312  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
13313  c3x5->Clear();
13314  // clean-up
13315  if (h2CeffHFnegativedirectionRecosignal1)
13316  delete h2CeffHFnegativedirectionRecosignal1;
13317 
13318  //========================================================================================== 1111115
13319  //======================================================================
13320  //======================================================================1D plot: R vs phi , different eta, depth=2
13321  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
13322  c3x5->Clear();
13324  c3x5->Divide(3, 5);
13325  c3x5->cd(1);
13326  int kcountHFnegativedirectionRecosignal2 = 1;
13327  TH1F *h2CeffHFnegativedirectionRecosignal2 = new TH1F("h2CeffHFnegativedirectionRecosignal2", "", nphi, 0., 72.);
13328  for (int jeta = 0; jeta < njeta; jeta++) {
13329  // negativedirectionRecosignal:
13330  if (jeta - 41 < 0) {
13331  // for (int i=0;i<ndepth;i++) {
13332  // depth=2
13333  for (int i = 1; i < 2; i++) {
13334  TH1F *HFnegativedirectionRecosignal2 = (TH1F *)h2CeffHFnegativedirectionRecosignal2->Clone("twod1");
13335  float ccctest = 0; // to avoid empty massive elements
13336  for (int jphi = 0; jphi < nphi; jphi++) {
13337  double ccc1 = arecosignalHF[i][jeta][jphi];
13338  if (ccc1 != 0.) {
13339  HFnegativedirectionRecosignal2->Fill(jphi, ccc1);
13340  ccctest = 1.; //HFnegativedirectionRecosignal2->SetBinError(i,0.01);
13341  }
13342  } // for jphi
13343  if (ccctest > 0.) {
13344  //cout<<"555 kcountHFnegativedirectionRecosignal2 = "<<kcountHFnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
13345  c3x5->cd(kcountHFnegativedirectionRecosignal2);
13346  HFnegativedirectionRecosignal2->SetMarkerStyle(20);
13347  HFnegativedirectionRecosignal2->SetMarkerSize(0.4);
13348  HFnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
13349  HFnegativedirectionRecosignal2->SetXTitle("HFnegativedirectionRecosignal2 \b");
13350  HFnegativedirectionRecosignal2->SetMarkerColor(2);
13351  HFnegativedirectionRecosignal2->SetLineColor(0);
13352  gPad->SetGridy();
13353  gPad->SetGridx();
13354  // gPad->SetLogy();
13355  if (kcountHFnegativedirectionRecosignal2 == 1)
13356  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
13357  if (kcountHFnegativedirectionRecosignal2 == 2)
13358  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
13359  if (kcountHFnegativedirectionRecosignal2 == 3)
13360  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
13361  if (kcountHFnegativedirectionRecosignal2 == 4)
13362  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
13363  if (kcountHFnegativedirectionRecosignal2 == 5)
13364  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
13365  if (kcountHFnegativedirectionRecosignal2 == 6)
13366  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
13367  if (kcountHFnegativedirectionRecosignal2 == 7)
13368  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
13369  if (kcountHFnegativedirectionRecosignal2 == 8)
13370  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
13371  if (kcountHFnegativedirectionRecosignal2 == 9)
13372  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
13373  if (kcountHFnegativedirectionRecosignal2 == 10)
13374  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
13375  if (kcountHFnegativedirectionRecosignal2 == 11)
13376  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
13377  if (kcountHFnegativedirectionRecosignal2 == 12)
13378  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
13379  if (kcountHFnegativedirectionRecosignal2 == 13)
13380  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
13381  HFnegativedirectionRecosignal2->Draw("Error");
13382  kcountHFnegativedirectionRecosignal2++;
13383  if (kcountHFnegativedirectionRecosignal2 > 13)
13384  break; // 4x6 = 24
13385  } //ccctest>0
13386 
13387  } // for i
13388  } //if(jeta-41< 0)
13389  } //for jeta
13391  c3x5->Update();
13392  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
13393  c3x5->Clear();
13394  // clean-up
13395  if (h2CeffHFnegativedirectionRecosignal2)
13396  delete h2CeffHFnegativedirectionRecosignal2;
13397 
13398  //======================================================================================================================
13399  //======================================================================================================================
13400  //======================================================================================================================
13401  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
13402 
13403  //cout<<" Start Vaiance: preparation *****" <<endl;
13404  TH2F *recosignalVariance1HF1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HF1");
13405  TH2F *recosignalVariance0HF1 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HF1");
13406  TH2F *recosignalVarianceHF1 = (TH2F *)recosignalVariance1HF1->Clone("recosignalVarianceHF1");
13407  recosignalVarianceHF1->Divide(recosignalVariance1HF1, recosignalVariance0HF1, 1, 1, "B");
13408  TH2F *recosignalVariance1HF2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy2_HF2");
13409  TH2F *recosignalVariance0HF2 = (TH2F *)dir->FindObjectAny("h_recSignalEnergy0_HF2");
13410  TH2F *recosignalVarianceHF2 = (TH2F *)recosignalVariance1HF2->Clone("recosignalVarianceHF2");
13411  recosignalVarianceHF2->Divide(recosignalVariance1HF2, recosignalVariance0HF2, 1, 1, "B");
13412  //cout<<" Vaiance: preparation DONE *****" <<endl;
13413  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvarianceHF
13414  // = sum(R*R)/N - (sum(R)/N)**2
13415  for (int jeta = 0; jeta < njeta; jeta++) {
13416  //preparation for PHI normalization:
13417  double sumrecosignalHF0 = 0;
13418  int nsumrecosignalHF0 = 0;
13419  double sumrecosignalHF1 = 0;
13420  int nsumrecosignalHF1 = 0;
13421  for (int jphi = 0; jphi < njphi; jphi++) {
13422  recosignalvarianceHF[0][jeta][jphi] = recosignalVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
13423  recosignalvarianceHF[1][jeta][jphi] = recosignalVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
13424  if (recosignalvarianceHF[0][jeta][jphi] > 0.) {
13425  sumrecosignalHF0 += recosignalvarianceHF[0][jeta][jphi];
13426  ++nsumrecosignalHF0;
13427  }
13428  if (recosignalvarianceHF[1][jeta][jphi] > 0.) {
13429  sumrecosignalHF1 += recosignalvarianceHF[1][jeta][jphi];
13430  ++nsumrecosignalHF1;
13431  }
13432  } // phi
13433  // PHI normalization :
13434  for (int jphi = 0; jphi < njphi; jphi++) {
13435  if (recosignalvarianceHF[0][jeta][jphi] > 0.)
13436  recosignalvarianceHF[0][jeta][jphi] /= (sumrecosignalHF0 / nsumrecosignalHF0);
13437  if (recosignalvarianceHF[1][jeta][jphi] > 0.)
13438  recosignalvarianceHF[1][jeta][jphi] /= (sumrecosignalHF1 / nsumrecosignalHF1);
13439  } // phi
13440  // recosignalvarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
13441  for (int jphi = 0; jphi < njphi; jphi++) {
13442  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
13443  recosignalvarianceHF[0][jeta][jphi] -= arecosignalHF[0][jeta][jphi] * arecosignalHF[0][jeta][jphi];
13444  recosignalvarianceHF[0][jeta][jphi] = fabs(recosignalvarianceHF[0][jeta][jphi]);
13445  recosignalvarianceHF[1][jeta][jphi] -= arecosignalHF[1][jeta][jphi] * arecosignalHF[1][jeta][jphi];
13446  recosignalvarianceHF[1][jeta][jphi] = fabs(recosignalvarianceHF[1][jeta][jphi]);
13447  }
13448  }
13449  //cout<<" Vaiance: DONE*****" <<endl;
13450  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
13451  //======================================================================
13452  //======================================================================
13453  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
13454  c1x1->Clear();
13456  c1x0->Divide(1, 1);
13457  c1x0->cd(1);
13458  TH2F *DefzDrecosignalHF42D = new TH2F("DefzDrecosignalHF42D", "", neta, -41., 41., nphi, 0., 72.);
13459  TH2F *DefzDrecosignalHF42D0 = new TH2F("DefzDrecosignalHF42D0", "", neta, -41., 41., nphi, 0., 72.);
13460  TH2F *DefzDrecosignalHF42DF = (TH2F *)DefzDrecosignalHF42D0->Clone("DefzDrecosignalHF42DF");
13461  for (int i = 0; i < ndepth; i++) {
13462  for (int jeta = 0; jeta < neta; jeta++) {
13463  for (int jphi = 0; jphi < nphi; jphi++) {
13464  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13465  int k2plot = jeta - 41;
13466  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
13467  if (arecosignalHF[i][jeta][jphi] > 0.) {
13468  DefzDrecosignalHF42D->Fill(kkk, jphi, ccc1);
13469  DefzDrecosignalHF42D0->Fill(kkk, jphi, 1.);
13470  }
13471  }
13472  }
13473  }
13474  DefzDrecosignalHF42DF->Divide(DefzDrecosignalHF42D, DefzDrecosignalHF42D0, 1, 1, "B"); // average A
13475  // DefzDrecosignalHF1->Sumw2();
13476  gPad->SetGridy();
13477  gPad->SetGridx(); // gPad->SetLogz();
13478  DefzDrecosignalHF42DF->SetMarkerStyle(20);
13479  DefzDrecosignalHF42DF->SetMarkerSize(0.4);
13480  DefzDrecosignalHF42DF->GetZaxis()->SetLabelSize(0.08);
13481  DefzDrecosignalHF42DF->SetXTitle("<D>_depth #eta \b");
13482  DefzDrecosignalHF42DF->SetYTitle(" #phi \b");
13483  DefzDrecosignalHF42DF->SetZTitle("<D>_depth \b");
13484  DefzDrecosignalHF42DF->SetMarkerColor(2);
13485  DefzDrecosignalHF42DF->SetLineColor(
13486  0); // DefzDrecosignalHF42DF->SetMaximum(1.000); // DefzDrecosignalHF42DF->SetMinimum(1.0);
13487  DefzDrecosignalHF42DF->Draw("COLZ");
13489  c1x0->Update();
13490  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHF.png");
13491  c1x0->Clear();
13492  // clean-up
13493  if (DefzDrecosignalHF42D)
13494  delete DefzDrecosignalHF42D;
13495  if (DefzDrecosignalHF42D0)
13496  delete DefzDrecosignalHF42D0;
13497  if (DefzDrecosignalHF42DF)
13498  delete DefzDrecosignalHF42DF;
13499  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
13500  //======================================================================
13501  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
13502  c1x1->Clear();
13504  c1x1->Divide(1, 1);
13505  c1x1->cd(1);
13506  TH1F *DefzDrecosignalHF41D = new TH1F("DefzDrecosignalHF41D", "", nphi, 0., 72.);
13507  TH1F *DefzDrecosignalHF41D0 = new TH1F("DefzDrecosignalHF41D0", "", nphi, 0., 72.);
13508  TH1F *DefzDrecosignalHF41DF = (TH1F *)DefzDrecosignalHF41D0->Clone("DefzDrecosignalHF41DF");
13509 
13510  for (int jphi = 0; jphi < nphi; jphi++) {
13511  for (int jeta = 0; jeta < neta; jeta++) {
13512  for (int i = 0; i < ndepth; i++) {
13513  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13514  if (arecosignalHF[i][jeta][jphi] > 0.) {
13515  DefzDrecosignalHF41D->Fill(jphi, ccc1);
13516  DefzDrecosignalHF41D0->Fill(jphi, 1.);
13517  }
13518  }
13519  }
13520  }
13521  // DefzDrecosignalHF41D->Sumw2();DefzDrecosignalHF41D0->Sumw2();
13522 
13523  DefzDrecosignalHF41DF->Divide(
13524  DefzDrecosignalHF41D, DefzDrecosignalHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
13525  DefzDrecosignalHF41D0->Sumw2();
13526  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHF41DF->SetBinError(jphi,0.01);}
13527  gPad->SetGridy();
13528  gPad->SetGridx(); // gPad->SetLogz();
13529  DefzDrecosignalHF41DF->SetMarkerStyle(20);
13530  DefzDrecosignalHF41DF->SetMarkerSize(1.4);
13531  DefzDrecosignalHF41DF->GetZaxis()->SetLabelSize(0.08);
13532  DefzDrecosignalHF41DF->SetXTitle("#phi \b");
13533  DefzDrecosignalHF41DF->SetYTitle(" <D> \b");
13534  DefzDrecosignalHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
13535  DefzDrecosignalHF41DF->SetMarkerColor(4);
13536  DefzDrecosignalHF41DF->SetLineColor(
13537  4); // DefzDrecosignalHF41DF->SetMinimum(0.8); DefzDrecosignalHF41DF->SetMinimum(-0.015);
13538  DefzDrecosignalHF41DF->Draw("Error");
13540  c1x1->Update();
13541  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHF.png");
13542  c1x1->Clear();
13543  // clean-up
13544  if (DefzDrecosignalHF41D)
13545  delete DefzDrecosignalHF41D;
13546  if (DefzDrecosignalHF41D0)
13547  delete DefzDrecosignalHF41D0;
13548  if (DefzDrecosignalHF41DF)
13549  delete DefzDrecosignalHF41DF;
13550  //========================================================================================== 14
13551  //======================================================================
13552  //======================================================================1D plot: D vs phi , different eta, depth=1
13553  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
13554  c3x5->Clear();
13556  c3x5->Divide(3, 5);
13557  c3x5->cd(1);
13558  int kcountHFpositivedirectionRecosignalD1 = 1;
13559  TH1F *h2CeffHFpositivedirectionRecosignalD1 = new TH1F("h2CeffHFpositivedirectionRecosignalD1", "", nphi, 0., 72.);
13560 
13561  for (int jeta = 0; jeta < njeta; jeta++) {
13562  // positivedirectionRecosignalD:
13563  if (jeta - 41 >= 0) {
13564  // for (int i=0;i<ndepth;i++) {
13565  // depth=1
13566  for (int i = 0; i < 1; i++) {
13567  TH1F *HFpositivedirectionRecosignalD1 = (TH1F *)h2CeffHFpositivedirectionRecosignalD1->Clone("twod1");
13568 
13569  float ccctest = 0; // to avoid empty massive elements
13570  for (int jphi = 0; jphi < nphi; jphi++) {
13571  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13572  if (arecosignalHF[i][jeta][jphi] > 0.) {
13573  HFpositivedirectionRecosignalD1->Fill(jphi, ccc1);
13574  ccctest = 1.; //HFpositivedirectionRecosignalD1->SetBinError(i,0.01);
13575  }
13576  } // for jphi
13577  if (ccctest > 0.) {
13578  //cout<<"1414 kcountHFpositivedirectionRecosignalD1 = "<<kcountHFpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
13579  c3x5->cd(kcountHFpositivedirectionRecosignalD1);
13580  HFpositivedirectionRecosignalD1->SetMarkerStyle(20);
13581  HFpositivedirectionRecosignalD1->SetMarkerSize(0.4);
13582  HFpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
13583  HFpositivedirectionRecosignalD1->SetXTitle("HFpositivedirectionRecosignalD1 \b");
13584  HFpositivedirectionRecosignalD1->SetMarkerColor(2);
13585  HFpositivedirectionRecosignalD1->SetLineColor(0);
13586  gPad->SetGridy();
13587  gPad->SetGridx();
13588  // gPad->SetLogy();
13589  if (kcountHFpositivedirectionRecosignalD1 == 1)
13590  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
13591  if (kcountHFpositivedirectionRecosignalD1 == 2)
13592  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
13593  if (kcountHFpositivedirectionRecosignalD1 == 3)
13594  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
13595  if (kcountHFpositivedirectionRecosignalD1 == 4)
13596  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
13597  if (kcountHFpositivedirectionRecosignalD1 == 5)
13598  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
13599  if (kcountHFpositivedirectionRecosignalD1 == 6)
13600  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
13601  if (kcountHFpositivedirectionRecosignalD1 == 7)
13602  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
13603  if (kcountHFpositivedirectionRecosignalD1 == 8)
13604  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
13605  if (kcountHFpositivedirectionRecosignalD1 == 9)
13606  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
13607  if (kcountHFpositivedirectionRecosignalD1 == 10)
13608  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
13609  if (kcountHFpositivedirectionRecosignalD1 == 11)
13610  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
13611  if (kcountHFpositivedirectionRecosignalD1 == 12)
13612  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
13613  if (kcountHFpositivedirectionRecosignalD1 == 13)
13614  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
13615  HFpositivedirectionRecosignalD1->Draw("Error");
13616  kcountHFpositivedirectionRecosignalD1++;
13617  if (kcountHFpositivedirectionRecosignalD1 > 13)
13618  break; // 4x6 = 24
13619  } //ccctest>0
13620 
13621  } // for i
13622  } //if(jeta-41 >= 0)
13623  } //for jeta
13625  c3x5->Update();
13626  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
13627  c3x5->Clear();
13628  // clean-up
13629  if (h2CeffHFpositivedirectionRecosignalD1)
13630  delete h2CeffHFpositivedirectionRecosignalD1;
13631  //========================================================================================== 15
13632  //======================================================================
13633  //======================================================================1D plot: D vs phi , different eta, depth=2
13634  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
13635  c3x5->Clear();
13636  c3x5->Divide(3, 5);
13637  c3x5->cd(1);
13638  int kcountHFpositivedirectionRecosignalD2 = 1;
13639  TH1F *h2CeffHFpositivedirectionRecosignalD2 = new TH1F("h2CeffHFpositivedirectionRecosignalD2", "", nphi, 0., 72.);
13640 
13641  for (int jeta = 0; jeta < njeta; jeta++) {
13642  // positivedirectionRecosignalD:
13643  if (jeta - 41 >= 0) {
13644  // for (int i=0;i<ndepth;i++) {
13645  // depth=2
13646  for (int i = 1; i < 2; i++) {
13647  TH1F *HFpositivedirectionRecosignalD2 = (TH1F *)h2CeffHFpositivedirectionRecosignalD2->Clone("twod1");
13648 
13649  float ccctest = 0; // to avoid empty massive elements
13650  for (int jphi = 0; jphi < nphi; jphi++) {
13651  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13652  if (arecosignalHF[i][jeta][jphi] > 0.) {
13653  HFpositivedirectionRecosignalD2->Fill(jphi, ccc1);
13654  ccctest = 1.; //HFpositivedirectionRecosignalD2->SetBinError(i,0.01);
13655  }
13656  } // for jphi
13657  if (ccctest > 0.) {
13658  //cout<<"1515 kcountHFpositivedirectionRecosignalD2 = "<<kcountHFpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
13659  c3x5->cd(kcountHFpositivedirectionRecosignalD2);
13660  HFpositivedirectionRecosignalD2->SetMarkerStyle(20);
13661  HFpositivedirectionRecosignalD2->SetMarkerSize(0.4);
13662  HFpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
13663  HFpositivedirectionRecosignalD2->SetXTitle("HFpositivedirectionRecosignalD2 \b");
13664  HFpositivedirectionRecosignalD2->SetMarkerColor(2);
13665  HFpositivedirectionRecosignalD2->SetLineColor(0);
13666  gPad->SetGridy();
13667  gPad->SetGridx();
13668  // gPad->SetLogy();
13669  if (kcountHFpositivedirectionRecosignalD2 == 1)
13670  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
13671  if (kcountHFpositivedirectionRecosignalD2 == 2)
13672  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
13673  if (kcountHFpositivedirectionRecosignalD2 == 3)
13674  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
13675  if (kcountHFpositivedirectionRecosignalD2 == 4)
13676  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
13677  if (kcountHFpositivedirectionRecosignalD2 == 5)
13678  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
13679  if (kcountHFpositivedirectionRecosignalD2 == 6)
13680  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
13681  if (kcountHFpositivedirectionRecosignalD2 == 7)
13682  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
13683  if (kcountHFpositivedirectionRecosignalD2 == 8)
13684  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
13685  if (kcountHFpositivedirectionRecosignalD2 == 9)
13686  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
13687  if (kcountHFpositivedirectionRecosignalD2 == 10)
13688  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
13689  if (kcountHFpositivedirectionRecosignalD2 == 11)
13690  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
13691  if (kcountHFpositivedirectionRecosignalD2 == 12)
13692  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
13693  if (kcountHFpositivedirectionRecosignalD2 == 13)
13694  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
13695  HFpositivedirectionRecosignalD2->Draw("Error");
13696  kcountHFpositivedirectionRecosignalD2++;
13697  if (kcountHFpositivedirectionRecosignalD2 > 13)
13698  break; // 4x6 = 24
13699  } //ccctest>0
13700 
13701  } // for i
13702  } //if(jeta-41 >= 0)
13703  } //for jeta
13705  c3x5->Update();
13706  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
13707  c3x5->Clear();
13708  // clean-up
13709  if (h2CeffHFpositivedirectionRecosignalD2)
13710  delete h2CeffHFpositivedirectionRecosignalD2;
13711  //========================================================================================== 22222214
13712  //======================================================================
13713  //======================================================================1D plot: D vs phi , different eta, depth=1
13714  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
13715  c3x5->Clear();
13717  c3x5->Divide(3, 5);
13718  c3x5->cd(1);
13719  int kcountHFnegativedirectionRecosignalD1 = 1;
13720  TH1F *h2CeffHFnegativedirectionRecosignalD1 = new TH1F("h2CeffHFnegativedirectionRecosignalD1", "", nphi, 0., 72.);
13721 
13722  for (int jeta = 0; jeta < njeta; jeta++) {
13723  // negativedirectionRecosignalD:
13724  if (jeta - 41 < 0) {
13725  // for (int i=0;i<ndepth;i++) {
13726  // depth=1
13727  for (int i = 0; i < 1; i++) {
13728  TH1F *HFnegativedirectionRecosignalD1 = (TH1F *)h2CeffHFnegativedirectionRecosignalD1->Clone("twod1");
13729 
13730  float ccctest = 0; // to avoid empty massive elements
13731  for (int jphi = 0; jphi < nphi; jphi++) {
13732  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13733  if (arecosignalHF[i][jeta][jphi] > 0.) {
13734  HFnegativedirectionRecosignalD1->Fill(jphi, ccc1);
13735  ccctest = 1.; //HFnegativedirectionRecosignalD1->SetBinError(i,0.01);
13736  }
13737  } // for jphi
13738  if (ccctest > 0.) {
13739  //cout<<"1414 kcountHFnegativedirectionRecosignalD1 = "<<kcountHFnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
13740  c3x5->cd(kcountHFnegativedirectionRecosignalD1);
13741  HFnegativedirectionRecosignalD1->SetMarkerStyle(20);
13742  HFnegativedirectionRecosignalD1->SetMarkerSize(0.4);
13743  HFnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
13744  HFnegativedirectionRecosignalD1->SetXTitle("HFnegativedirectionRecosignalD1 \b");
13745  HFnegativedirectionRecosignalD1->SetMarkerColor(2);
13746  HFnegativedirectionRecosignalD1->SetLineColor(0);
13747  gPad->SetGridy();
13748  gPad->SetGridx();
13749  // gPad->SetLogy();
13750  if (kcountHFnegativedirectionRecosignalD1 == 1)
13751  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
13752  if (kcountHFnegativedirectionRecosignalD1 == 2)
13753  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
13754  if (kcountHFnegativedirectionRecosignalD1 == 3)
13755  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
13756  if (kcountHFnegativedirectionRecosignalD1 == 4)
13757  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
13758  if (kcountHFnegativedirectionRecosignalD1 == 5)
13759  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
13760  if (kcountHFnegativedirectionRecosignalD1 == 6)
13761  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
13762  if (kcountHFnegativedirectionRecosignalD1 == 7)
13763  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
13764  if (kcountHFnegativedirectionRecosignalD1 == 8)
13765  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
13766  if (kcountHFnegativedirectionRecosignalD1 == 9)
13767  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
13768  if (kcountHFnegativedirectionRecosignalD1 == 10)
13769  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
13770  if (kcountHFnegativedirectionRecosignalD1 == 11)
13771  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
13772  if (kcountHFnegativedirectionRecosignalD1 == 12)
13773  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
13774  if (kcountHFnegativedirectionRecosignalD1 == 13)
13775  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
13776  HFnegativedirectionRecosignalD1->Draw("Error");
13777  kcountHFnegativedirectionRecosignalD1++;
13778  if (kcountHFnegativedirectionRecosignalD1 > 13)
13779  break; // 4x6 = 24
13780  } //ccctest>0
13781 
13782  } // for i
13783  } //if(jeta-41< 0)
13784  } //for jeta
13786  c3x5->Update();
13787  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
13788  c3x5->Clear();
13789  // clean-up
13790  if (h2CeffHFnegativedirectionRecosignalD1)
13791  delete h2CeffHFnegativedirectionRecosignalD1;
13792  //========================================================================================== 22222215
13793  //======================================================================
13794  //======================================================================1D plot: D vs phi , different eta, depth=2
13795  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
13796  c3x5->Clear();
13797  c3x5->Divide(3, 5);
13798  c3x5->cd(1);
13799  int kcountHFnegativedirectionRecosignalD2 = 1;
13800  TH1F *h2CeffHFnegativedirectionRecosignalD2 = new TH1F("h2CeffHFnegativedirectionRecosignalD2", "", nphi, 0., 72.);
13801 
13802  for (int jeta = 0; jeta < njeta; jeta++) {
13803  // negativedirectionRecosignalD:
13804  if (jeta - 41 < 0) {
13805  // for (int i=0;i<ndepth;i++) {
13806  // depth=2
13807  for (int i = 1; i < 2; i++) {
13808  TH1F *HFnegativedirectionRecosignalD2 = (TH1F *)h2CeffHFnegativedirectionRecosignalD2->Clone("twod1");
13809 
13810  float ccctest = 0; // to avoid empty massive elements
13811  for (int jphi = 0; jphi < nphi; jphi++) {
13812  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13813  if (arecosignalHF[i][jeta][jphi] > 0.) {
13814  HFnegativedirectionRecosignalD2->Fill(jphi, ccc1);
13815  ccctest = 1.; //HFnegativedirectionRecosignalD2->SetBinError(i,0.01);
13816  }
13817  } // for jphi
13818  if (ccctest > 0.) {
13819  //cout<<"1515 kcountHFnegativedirectionRecosignalD2 = "<<kcountHFnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
13820  c3x5->cd(kcountHFnegativedirectionRecosignalD2);
13821  HFnegativedirectionRecosignalD2->SetMarkerStyle(20);
13822  HFnegativedirectionRecosignalD2->SetMarkerSize(0.4);
13823  HFnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
13824  HFnegativedirectionRecosignalD2->SetXTitle("HFnegativedirectionRecosignalD2 \b");
13825  HFnegativedirectionRecosignalD2->SetMarkerColor(2);
13826  HFnegativedirectionRecosignalD2->SetLineColor(0);
13827  gPad->SetGridy();
13828  gPad->SetGridx();
13829  // gPad->SetLogy();
13830  if (kcountHFnegativedirectionRecosignalD2 == 1)
13831  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
13832  if (kcountHFnegativedirectionRecosignalD2 == 2)
13833  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
13834  if (kcountHFnegativedirectionRecosignalD2 == 3)
13835  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
13836  if (kcountHFnegativedirectionRecosignalD2 == 4)
13837  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
13838  if (kcountHFnegativedirectionRecosignalD2 == 5)
13839  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
13840  if (kcountHFnegativedirectionRecosignalD2 == 6)
13841  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
13842  if (kcountHFnegativedirectionRecosignalD2 == 7)
13843  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
13844  if (kcountHFnegativedirectionRecosignalD2 == 8)
13845  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
13846  if (kcountHFnegativedirectionRecosignalD2 == 9)
13847  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
13848  if (kcountHFnegativedirectionRecosignalD2 == 10)
13849  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
13850  if (kcountHFnegativedirectionRecosignalD2 == 11)
13851  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
13852  if (kcountHFnegativedirectionRecosignalD2 == 12)
13853  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
13854  if (kcountHFnegativedirectionRecosignalD2 == 13)
13855  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
13856  HFnegativedirectionRecosignalD2->Draw("Error");
13857  kcountHFnegativedirectionRecosignalD2++;
13858  if (kcountHFnegativedirectionRecosignalD2 > 13)
13859  break; // 4x6 = 24
13860  } //ccctest>0
13861 
13862  } // for i
13863  } //if(jeta-41< 0)
13864  } //for jeta
13866  c3x5->Update();
13867  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
13868  c3x5->Clear();
13869  // clean-up
13870  if (h2CeffHFnegativedirectionRecosignalD2)
13871  delete h2CeffHFnegativedirectionRecosignalD2;
13872 
13873  //===================================================================== END of Recosignal HF for phi-symmetry
13874  //===================================================================== END of Recosignal HF for phi-symmetry
13875  //===================================================================== END of Recosignal HF for phi-symmetry
13876  //============================================================================================================ END of Recosignal for phi-symmetry
13877  //============================================================================================================ END of Recosignal for phi-symmetry
13878  //============================================================================================================ END of Recosignal for phi-symmetry
13879 
13886  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
13887  //ndepth = k_max[5];
13888  ndepth = 4;
13889  double areconoiseHB[ndepth][njeta][njphi];
13890  double breconoiseHB[ndepth][njeta][njphi];
13891  double reconoisevarianceHB[ndepth][njeta][njphi];
13892  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HB recNoiseEnergy
13893  TH2F *recNoiseEnergy1HB1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HB1");
13894  TH2F *recNoiseEnergy0HB1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HB1");
13895  TH2F *recNoiseEnergyHB1 = (TH2F *)recNoiseEnergy1HB1->Clone("recNoiseEnergyHB1");
13896  recNoiseEnergyHB1->Divide(recNoiseEnergy1HB1, recNoiseEnergy0HB1, 1, 1, "B");
13897  TH2F *recNoiseEnergy1HB2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HB2");
13898  TH2F *recNoiseEnergy0HB2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HB2");
13899  TH2F *recNoiseEnergyHB2 = (TH2F *)recNoiseEnergy1HB2->Clone("recNoiseEnergyHB2");
13900  recNoiseEnergyHB2->Divide(recNoiseEnergy1HB2, recNoiseEnergy0HB2, 1, 1, "B");
13901  TH2F *recNoiseEnergy1HB3 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HB3");
13902  TH2F *recNoiseEnergy0HB3 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HB3");
13903  TH2F *recNoiseEnergyHB3 = (TH2F *)recNoiseEnergy1HB3->Clone("recNoiseEnergyHB3");
13904  recNoiseEnergyHB3->Divide(recNoiseEnergy1HB3, recNoiseEnergy0HB3, 1, 1, "B");
13905  TH2F *recNoiseEnergy1HB4 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HB4");
13906  TH2F *recNoiseEnergy0HB4 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HB4");
13907  TH2F *recNoiseEnergyHB4 = (TH2F *)recNoiseEnergy1HB4->Clone("recNoiseEnergyHB4");
13908  recNoiseEnergyHB4->Divide(recNoiseEnergy1HB4, recNoiseEnergy0HB4, 1, 1, "B");
13909  for (int jeta = 0; jeta < njeta; jeta++) {
13910  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
13911  //====================================================================== PHI normalization & put R into massive areconoiseHB
13912  //preparation for PHI normalization:
13913  double sumreconoiseHB0 = 0;
13914  int nsumreconoiseHB0 = 0;
13915  double sumreconoiseHB1 = 0;
13916  int nsumreconoiseHB1 = 0;
13917  double sumreconoiseHB2 = 0;
13918  int nsumreconoiseHB2 = 0;
13919  double sumreconoiseHB3 = 0;
13920  int nsumreconoiseHB3 = 0;
13921  for (int jphi = 0; jphi < njphi; jphi++) {
13922  areconoiseHB[0][jeta][jphi] = recNoiseEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
13923  areconoiseHB[1][jeta][jphi] = recNoiseEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
13924  areconoiseHB[2][jeta][jphi] = recNoiseEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
13925  areconoiseHB[3][jeta][jphi] = recNoiseEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
13926  breconoiseHB[0][jeta][jphi] = recNoiseEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
13927  breconoiseHB[1][jeta][jphi] = recNoiseEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
13928  breconoiseHB[2][jeta][jphi] = recNoiseEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
13929  breconoiseHB[3][jeta][jphi] = recNoiseEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
13930  if (areconoiseHB[0][jeta][jphi] != 0.) {
13931  sumreconoiseHB0 += areconoiseHB[0][jeta][jphi];
13932  ++nsumreconoiseHB0;
13933  }
13934  if (areconoiseHB[1][jeta][jphi] != 0.) {
13935  sumreconoiseHB1 += areconoiseHB[1][jeta][jphi];
13936  ++nsumreconoiseHB1;
13937  }
13938  if (areconoiseHB[2][jeta][jphi] != 0.) {
13939  sumreconoiseHB2 += areconoiseHB[2][jeta][jphi];
13940  ++nsumreconoiseHB2;
13941  }
13942  if (areconoiseHB[3][jeta][jphi] != 0.) {
13943  sumreconoiseHB3 += areconoiseHB[3][jeta][jphi];
13944  ++nsumreconoiseHB3;
13945  }
13946  } // phi
13947  // PHI normalization: DIF
13948  for (int jphi = 0; jphi < njphi; jphi++) {
13949  if (sumreconoiseHB0 != 0.)
13950  breconoiseHB[0][jeta][jphi] -= (sumreconoiseHB0 / nsumreconoiseHB0);
13951  if (sumreconoiseHB1 != 0.)
13952  breconoiseHB[1][jeta][jphi] -= (sumreconoiseHB1 / nsumreconoiseHB1);
13953  if (sumreconoiseHB2 != 0.)
13954  breconoiseHB[2][jeta][jphi] -= (sumreconoiseHB2 / nsumreconoiseHB2);
13955  if (sumreconoiseHB3 != 0.)
13956  breconoiseHB[3][jeta][jphi] -= (sumreconoiseHB3 / nsumreconoiseHB3);
13957  } // phi
13958  // PHI normalization: R
13959  for (int jphi = 0; jphi < njphi; jphi++) {
13960  if (areconoiseHB[0][jeta][jphi] != 0.)
13961  areconoiseHB[0][jeta][jphi] /= (sumreconoiseHB0 / nsumreconoiseHB0);
13962  if (areconoiseHB[1][jeta][jphi] != 0.)
13963  areconoiseHB[1][jeta][jphi] /= (sumreconoiseHB1 / nsumreconoiseHB1);
13964  if (areconoiseHB[2][jeta][jphi] != 0.)
13965  areconoiseHB[2][jeta][jphi] /= (sumreconoiseHB2 / nsumreconoiseHB2);
13966  if (areconoiseHB[3][jeta][jphi] != 0.)
13967  areconoiseHB[3][jeta][jphi] /= (sumreconoiseHB3 / nsumreconoiseHB3);
13968  } // phi
13969  } //if eta
13970  } //eta
13971  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
13972  //======================================================================
13973  //======================================================================
13974  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
13975  c2x1->Clear();
13977  c2x1->Divide(2, 1);
13978  c2x1->cd(1);
13979  TH2F *GefzRreconoiseHB42D = new TH2F("GefzRreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
13980  TH2F *GefzRreconoiseHB42D0 = new TH2F("GefzRreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
13981  TH2F *GefzRreconoiseHB42DF = (TH2F *)GefzRreconoiseHB42D0->Clone("GefzRreconoiseHB42DF");
13982  for (int i = 0; i < ndepth; i++) {
13983  for (int jeta = 0; jeta < neta; jeta++) {
13984  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
13985  for (int jphi = 0; jphi < nphi; jphi++) {
13986  double ccc1 = areconoiseHB[i][jeta][jphi];
13987  int k2plot = jeta - 41;
13988  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
13989  if (ccc1 != 0.) {
13990  GefzRreconoiseHB42D->Fill(kkk, jphi, ccc1);
13991  GefzRreconoiseHB42D0->Fill(kkk, jphi, 1.);
13992  }
13993  }
13994  }
13995  }
13996  }
13997  GefzRreconoiseHB42DF->Divide(GefzRreconoiseHB42D, GefzRreconoiseHB42D0, 1, 1, "B"); // average A
13998  gPad->SetGridy();
13999  gPad->SetGridx(); // gPad->SetLogz();
14000  GefzRreconoiseHB42DF->SetXTitle("<R>_depth #eta \b");
14001  GefzRreconoiseHB42DF->SetYTitle(" #phi \b");
14002  GefzRreconoiseHB42DF->Draw("COLZ");
14003 
14004  c2x1->cd(2);
14005  TH1F *energyhitNoise_HB = (TH1F *)dir->FindObjectAny("h_energyhitNoise_HB");
14006  energyhitNoise_HB->SetMarkerStyle(20);
14007  energyhitNoise_HB->SetMarkerSize(0.4);
14008  energyhitNoise_HB->GetYaxis()->SetLabelSize(0.04);
14009  energyhitNoise_HB->SetXTitle("energyhitNoise_HB \b");
14010  energyhitNoise_HB->SetMarkerColor(2);
14011  energyhitNoise_HB->SetLineColor(0);
14012  gPad->SetGridy();
14013  gPad->SetGridx();
14014  energyhitNoise_HB->Draw("Error");
14015 
14017  c2x1->Update();
14018  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHB.png");
14019  c2x1->Clear();
14020  // clean-up
14021  if (GefzRreconoiseHB42D)
14022  delete GefzRreconoiseHB42D;
14023  if (GefzRreconoiseHB42D0)
14024  delete GefzRreconoiseHB42D0;
14025  if (GefzRreconoiseHB42DF)
14026  delete GefzRreconoiseHB42DF;
14027  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
14028  //======================================================================
14029  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
14030  c1x1->Clear();
14032  c1x1->Divide(1, 1);
14033  c1x1->cd(1);
14034  TH1F *GefzRreconoiseHB41D = new TH1F("GefzRreconoiseHB41D", "", nphi, 0., 72.);
14035  TH1F *GefzRreconoiseHB41D0 = new TH1F("GefzRreconoiseHB41D0", "", nphi, 0., 72.);
14036  TH1F *GefzRreconoiseHB41DF = (TH1F *)GefzRreconoiseHB41D0->Clone("GefzRreconoiseHB41DF");
14037  for (int jphi = 0; jphi < nphi; jphi++) {
14038  for (int jeta = 0; jeta < neta; jeta++) {
14039  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
14040  for (int i = 0; i < ndepth; i++) {
14041  double ccc1 = areconoiseHB[i][jeta][jphi];
14042  if (ccc1 != 0.) {
14043  GefzRreconoiseHB41D->Fill(jphi, ccc1);
14044  GefzRreconoiseHB41D0->Fill(jphi, 1.);
14045  }
14046  }
14047  }
14048  }
14049  }
14050  GefzRreconoiseHB41DF->Divide(GefzRreconoiseHB41D, GefzRreconoiseHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
14051  GefzRreconoiseHB41D0->Sumw2();
14052  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHB41DF->SetBinError(jphi,0.01);}
14053  gPad->SetGridy();
14054  gPad->SetGridx(); // gPad->SetLogz();
14055  GefzRreconoiseHB41DF->SetMarkerStyle(20);
14056  GefzRreconoiseHB41DF->SetMarkerSize(1.4);
14057  GefzRreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
14058  GefzRreconoiseHB41DF->SetXTitle("#phi \b");
14059  GefzRreconoiseHB41DF->SetYTitle(" <R> \b");
14060  GefzRreconoiseHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
14061  GefzRreconoiseHB41DF->SetMarkerColor(4);
14062  GefzRreconoiseHB41DF->SetLineColor(
14063  4); //GefzRreconoiseHB41DF->SetMinimum(0.8); // GefzRreconoiseHB41DF->SetMaximum(1.000);
14064  GefzRreconoiseHB41DF->Draw("Error");
14066  c1x1->Update();
14067  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHB.png");
14068  c1x1->Clear();
14069  // clean-up
14070  if (GefzRreconoiseHB41D)
14071  delete GefzRreconoiseHB41D;
14072  if (GefzRreconoiseHB41D0)
14073  delete GefzRreconoiseHB41D0;
14074  if (GefzRreconoiseHB41DF)
14075  delete GefzRreconoiseHB41DF;
14076  //========================================================================================== 4
14077  //======================================================================
14078  //======================================================================1D plot: R vs phi , different eta, depth=1
14079  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
14080  c3x5->Clear();
14082  c3x5->Divide(4, 4);
14083  c3x5->cd(1);
14084  int kcountHBpositivedirectionReconoise1 = 1;
14085  TH1F *h2CeffHBpositivedirectionReconoise1 = new TH1F("h2CeffHBpositivedirectionReconoise1", "", nphi, 0., 72.);
14086  for (int jeta = 0; jeta < njeta; jeta++) {
14087  // positivedirectionReconoise:
14088  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14089  // for (int i=0;i<ndepth;i++) {
14090  // depth=1
14091  for (int i = 0; i < 1; i++) {
14092  TH1F *HBpositivedirectionReconoise1 = (TH1F *)h2CeffHBpositivedirectionReconoise1->Clone("twod1");
14093  float ccctest = 0; // to avoid empty massive elements
14094  for (int jphi = 0; jphi < nphi; jphi++) {
14095  double ccc1 = areconoiseHB[i][jeta][jphi];
14096  if (ccc1 != 0.) {
14097  HBpositivedirectionReconoise1->Fill(jphi, ccc1);
14098  ccctest = 1.; //HBpositivedirectionReconoise1->SetBinError(i,0.01);
14099  }
14100  } // for jphi
14101  if (ccctest > 0.) {
14102  // cout<<"444 kcountHBpositivedirectionReconoise1 = "<<kcountHBpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
14103  c3x5->cd(kcountHBpositivedirectionReconoise1);
14104  HBpositivedirectionReconoise1->SetMarkerStyle(20);
14105  HBpositivedirectionReconoise1->SetMarkerSize(0.4);
14106  HBpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
14107  HBpositivedirectionReconoise1->SetXTitle("HBpositivedirectionReconoise1 \b");
14108  HBpositivedirectionReconoise1->SetMarkerColor(2);
14109  HBpositivedirectionReconoise1->SetLineColor(0);
14110  gPad->SetGridy();
14111  gPad->SetGridx();
14112  // gPad->SetLogy();
14113  if (kcountHBpositivedirectionReconoise1 == 1)
14114  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
14115  if (kcountHBpositivedirectionReconoise1 == 2)
14116  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
14117  if (kcountHBpositivedirectionReconoise1 == 3)
14118  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
14119  if (kcountHBpositivedirectionReconoise1 == 4)
14120  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
14121  if (kcountHBpositivedirectionReconoise1 == 5)
14122  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
14123  if (kcountHBpositivedirectionReconoise1 == 6)
14124  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
14125  if (kcountHBpositivedirectionReconoise1 == 7)
14126  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
14127  if (kcountHBpositivedirectionReconoise1 == 8)
14128  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
14129  if (kcountHBpositivedirectionReconoise1 == 9)
14130  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
14131  if (kcountHBpositivedirectionReconoise1 == 10)
14132  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
14133  if (kcountHBpositivedirectionReconoise1 == 11)
14134  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
14135  if (kcountHBpositivedirectionReconoise1 == 12)
14136  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
14137  if (kcountHBpositivedirectionReconoise1 == 13)
14138  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
14139  if (kcountHBpositivedirectionReconoise1 == 14)
14140  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
14141  if (kcountHBpositivedirectionReconoise1 == 15)
14142  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
14143  if (kcountHBpositivedirectionReconoise1 == 16)
14144  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
14145  HBpositivedirectionReconoise1->Draw("Error");
14146  kcountHBpositivedirectionReconoise1++;
14147  if (kcountHBpositivedirectionReconoise1 > 16)
14148  break; //
14149  } //ccctest>0
14150 
14151  } // for i
14152  } //if(jeta-41 >= 0)
14153  } //for jeta
14155  c3x5->Update();
14156  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
14157  c3x5->Clear();
14158  // clean-up
14159  if (h2CeffHBpositivedirectionReconoise1)
14160  delete h2CeffHBpositivedirectionReconoise1;
14161 
14162  //========================================================================================== 5
14163  //======================================================================
14164  //======================================================================1D plot: R vs phi , different eta, depth=2
14165  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
14166  c3x5->Clear();
14168  c3x5->Divide(4, 4);
14169  c3x5->cd(1);
14170  int kcountHBpositivedirectionReconoise2 = 1;
14171  TH1F *h2CeffHBpositivedirectionReconoise2 = new TH1F("h2CeffHBpositivedirectionReconoise2", "", nphi, 0., 72.);
14172  for (int jeta = 0; jeta < njeta; jeta++) {
14173  // positivedirectionReconoise:
14174  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14175  // for (int i=0;i<ndepth;i++) {
14176  // depth=2
14177  for (int i = 1; i < 2; i++) {
14178  TH1F *HBpositivedirectionReconoise2 = (TH1F *)h2CeffHBpositivedirectionReconoise2->Clone("twod1");
14179  float ccctest = 0; // to avoid empty massive elements
14180  for (int jphi = 0; jphi < nphi; jphi++) {
14181  double ccc1 = areconoiseHB[i][jeta][jphi];
14182  if (ccc1 != 0.) {
14183  HBpositivedirectionReconoise2->Fill(jphi, ccc1);
14184  ccctest = 1.; //HBpositivedirectionReconoise2->SetBinError(i,0.01);
14185  }
14186  } // for jphi
14187  if (ccctest > 0.) {
14188  //cout<<"555 kcountHBpositivedirectionReconoise2 = "<<kcountHBpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
14189  c3x5->cd(kcountHBpositivedirectionReconoise2);
14190  HBpositivedirectionReconoise2->SetMarkerStyle(20);
14191  HBpositivedirectionReconoise2->SetMarkerSize(0.4);
14192  HBpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
14193  HBpositivedirectionReconoise2->SetXTitle("HBpositivedirectionReconoise2 \b");
14194  HBpositivedirectionReconoise2->SetMarkerColor(2);
14195  HBpositivedirectionReconoise2->SetLineColor(0);
14196  gPad->SetGridy();
14197  gPad->SetGridx();
14198  // gPad->SetLogy();
14199  if (kcountHBpositivedirectionReconoise2 == 1)
14200  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
14201  if (kcountHBpositivedirectionReconoise2 == 2)
14202  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
14203  if (kcountHBpositivedirectionReconoise2 == 3)
14204  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
14205  if (kcountHBpositivedirectionReconoise2 == 4)
14206  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
14207  if (kcountHBpositivedirectionReconoise2 == 5)
14208  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
14209  if (kcountHBpositivedirectionReconoise2 == 6)
14210  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
14211  if (kcountHBpositivedirectionReconoise2 == 7)
14212  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
14213  if (kcountHBpositivedirectionReconoise2 == 8)
14214  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
14215  if (kcountHBpositivedirectionReconoise2 == 9)
14216  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
14217  if (kcountHBpositivedirectionReconoise2 == 10)
14218  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
14219  if (kcountHBpositivedirectionReconoise2 == 11)
14220  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
14221  if (kcountHBpositivedirectionReconoise2 == 12)
14222  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
14223  if (kcountHBpositivedirectionReconoise2 == 13)
14224  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
14225  if (kcountHBpositivedirectionReconoise2 == 14)
14226  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
14227  if (kcountHBpositivedirectionReconoise2 == 15)
14228  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
14229  if (kcountHBpositivedirectionReconoise2 == 16)
14230  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
14231  HBpositivedirectionReconoise2->Draw("Error");
14232  kcountHBpositivedirectionReconoise2++;
14233  if (kcountHBpositivedirectionReconoise2 > 16)
14234  break; // 4x6 = 24
14235  } //ccctest>0
14236 
14237  } // for i
14238  } //if(jeta-41 >= 0)
14239  } //for jeta
14241  c3x5->Update();
14242  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
14243  c3x5->Clear();
14244  // clean-up
14245  if (h2CeffHBpositivedirectionReconoise2)
14246  delete h2CeffHBpositivedirectionReconoise2;
14247  //========================================================================================== 6
14248  //======================================================================
14249  //======================================================================1D plot: R vs phi , different eta, depth=3
14250  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
14251  c3x5->Clear();
14253  c3x5->Divide(4, 4);
14254  c3x5->cd(1);
14255  int kcountHBpositivedirectionReconoise3 = 1;
14256  TH1F *h2CeffHBpositivedirectionReconoise3 = new TH1F("h2CeffHBpositivedirectionReconoise3", "", nphi, 0., 72.);
14257  for (int jeta = 0; jeta < njeta; jeta++) {
14258  // positivedirectionReconoise:
14259  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14260  // for (int i=0;i<ndepth;i++) {
14261  // depth=3
14262  for (int i = 2; i < 3; i++) {
14263  TH1F *HBpositivedirectionReconoise3 = (TH1F *)h2CeffHBpositivedirectionReconoise3->Clone("twod1");
14264  float ccctest = 0; // to avoid empty massive elements
14265  for (int jphi = 0; jphi < nphi; jphi++) {
14266  double ccc1 = areconoiseHB[i][jeta][jphi];
14267  if (ccc1 != 0.) {
14268  HBpositivedirectionReconoise3->Fill(jphi, ccc1);
14269  ccctest = 1.; //HBpositivedirectionReconoise3->SetBinError(i,0.01);
14270  }
14271  } // for jphi
14272  if (ccctest > 0.) {
14273  //cout<<"666 kcountHBpositivedirectionReconoise3 = "<<kcountHBpositivedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
14274  c3x5->cd(kcountHBpositivedirectionReconoise3);
14275  HBpositivedirectionReconoise3->SetMarkerStyle(20);
14276  HBpositivedirectionReconoise3->SetMarkerSize(0.4);
14277  HBpositivedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
14278  HBpositivedirectionReconoise3->SetXTitle("HBpositivedirectionReconoise3 \b");
14279  HBpositivedirectionReconoise3->SetMarkerColor(2);
14280  HBpositivedirectionReconoise3->SetLineColor(0);
14281  gPad->SetGridy();
14282  gPad->SetGridx();
14283  // gPad->SetLogy();
14284  if (kcountHBpositivedirectionReconoise3 == 1)
14285  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
14286  if (kcountHBpositivedirectionReconoise3 == 2)
14287  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
14288  if (kcountHBpositivedirectionReconoise3 == 3)
14289  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
14290  if (kcountHBpositivedirectionReconoise3 == 4)
14291  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
14292  if (kcountHBpositivedirectionReconoise3 == 5)
14293  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
14294  if (kcountHBpositivedirectionReconoise3 == 6)
14295  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
14296  if (kcountHBpositivedirectionReconoise3 == 7)
14297  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
14298  if (kcountHBpositivedirectionReconoise3 == 8)
14299  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
14300  if (kcountHBpositivedirectionReconoise3 == 9)
14301  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
14302  if (kcountHBpositivedirectionReconoise3 == 10)
14303  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
14304  if (kcountHBpositivedirectionReconoise3 == 11)
14305  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
14306  if (kcountHBpositivedirectionReconoise3 == 12)
14307  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
14308  if (kcountHBpositivedirectionReconoise3 == 13)
14309  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
14310  if (kcountHBpositivedirectionReconoise3 == 14)
14311  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
14312  if (kcountHBpositivedirectionReconoise3 == 15)
14313  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
14314  if (kcountHBpositivedirectionReconoise3 == 16)
14315  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
14316  HBpositivedirectionReconoise3->Draw("Error");
14317  kcountHBpositivedirectionReconoise3++;
14318  if (kcountHBpositivedirectionReconoise3 > 16)
14319  break; // 4x6 = 24
14320  } //ccctest>0
14321 
14322  } // for i
14323  } //if(jeta-41 >= 0)
14324  } //for jeta
14326  c3x5->Update();
14327  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
14328  c3x5->Clear();
14329  // clean-up
14330  if (h2CeffHBpositivedirectionReconoise3)
14331  delete h2CeffHBpositivedirectionReconoise3;
14332  //========================================================================================== 7
14333  //======================================================================
14334  //======================================================================1D plot: R vs phi , different eta, depth=4
14335  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
14336  c3x5->Clear();
14338  c3x5->Divide(4, 4);
14339  c3x5->cd(1);
14340  int kcountHBpositivedirectionReconoise4 = 1;
14341  TH1F *h2CeffHBpositivedirectionReconoise4 = new TH1F("h2CeffHBpositivedirectionReconoise4", "", nphi, 0., 72.);
14342 
14343  for (int jeta = 0; jeta < njeta; jeta++) {
14344  // positivedirectionReconoise:
14345  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14346  // for (int i=0;i<ndepth;i++) {
14347  // depth=4
14348  for (int i = 3; i < 4; i++) {
14349  TH1F *HBpositivedirectionReconoise4 = (TH1F *)h2CeffHBpositivedirectionReconoise4->Clone("twod1");
14350 
14351  float ccctest = 0; // to avoid empty massive elements
14352  for (int jphi = 0; jphi < nphi; jphi++) {
14353  double ccc1 = areconoiseHB[i][jeta][jphi];
14354  if (ccc1 != 0.) {
14355  HBpositivedirectionReconoise4->Fill(jphi, ccc1);
14356  ccctest = 1.; //HBpositivedirectionReconoise4->SetBinError(i,0.01);
14357  }
14358  } // for jphi
14359  if (ccctest > 0.) {
14360  //cout<<"777 kcountHBpositivedirectionReconoise4 = "<<kcountHBpositivedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
14361  c3x5->cd(kcountHBpositivedirectionReconoise4);
14362  HBpositivedirectionReconoise4->SetMarkerStyle(20);
14363  HBpositivedirectionReconoise4->SetMarkerSize(0.4);
14364  HBpositivedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
14365  HBpositivedirectionReconoise4->SetXTitle("HBpositivedirectionReconoise4 \b");
14366  HBpositivedirectionReconoise4->SetMarkerColor(2);
14367  HBpositivedirectionReconoise4->SetLineColor(0);
14368  gPad->SetGridy();
14369  gPad->SetGridx();
14370  // gPad->SetLogy();
14371  if (kcountHBpositivedirectionReconoise4 == 1)
14372  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
14373  if (kcountHBpositivedirectionReconoise4 == 2)
14374  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
14375  if (kcountHBpositivedirectionReconoise4 == 3)
14376  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
14377  if (kcountHBpositivedirectionReconoise4 == 4)
14378  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
14379  if (kcountHBpositivedirectionReconoise4 == 5)
14380  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
14381  if (kcountHBpositivedirectionReconoise4 == 6)
14382  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
14383  if (kcountHBpositivedirectionReconoise4 == 7)
14384  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
14385  if (kcountHBpositivedirectionReconoise4 == 8)
14386  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
14387  if (kcountHBpositivedirectionReconoise4 == 9)
14388  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
14389  if (kcountHBpositivedirectionReconoise4 == 10)
14390  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
14391  if (kcountHBpositivedirectionReconoise4 == 11)
14392  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
14393  if (kcountHBpositivedirectionReconoise4 == 12)
14394  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
14395  if (kcountHBpositivedirectionReconoise4 == 13)
14396  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
14397  if (kcountHBpositivedirectionReconoise4 == 14)
14398  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
14399  if (kcountHBpositivedirectionReconoise4 == 15)
14400  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
14401  if (kcountHBpositivedirectionReconoise4 == 16)
14402  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
14403  HBpositivedirectionReconoise4->Draw("Error");
14404  kcountHBpositivedirectionReconoise4++;
14405  if (kcountHBpositivedirectionReconoise4 > 16)
14406  break; // 4x6 = 24
14407  } //ccctest>0
14408 
14409  } // for i
14410  } //if(jeta-41 >= 0)
14411  } //for jeta
14413  c3x5->Update();
14414  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
14415  c3x5->Clear();
14416  // clean-up
14417  if (h2CeffHBpositivedirectionReconoise4)
14418  delete h2CeffHBpositivedirectionReconoise4;
14419 
14420  //========================================================================================== 1114
14421  //======================================================================
14422  //======================================================================1D plot: R vs phi , different eta, depth=1
14423  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
14424  c3x5->Clear();
14426  c3x5->Divide(4, 4);
14427  c3x5->cd(1);
14428  int kcountHBnegativedirectionReconoise1 = 1;
14429  TH1F *h2CeffHBnegativedirectionReconoise1 = new TH1F("h2CeffHBnegativedirectionReconoise1", "", nphi, 0., 72.);
14430  for (int jeta = 0; jeta < njeta; jeta++) {
14431  // negativedirectionReconoise:
14432  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14433  // for (int i=0;i<ndepth;i++) {
14434  // depth=1
14435  for (int i = 0; i < 1; i++) {
14436  TH1F *HBnegativedirectionReconoise1 = (TH1F *)h2CeffHBnegativedirectionReconoise1->Clone("twod1");
14437  float ccctest = 0; // to avoid empty massive elements
14438  for (int jphi = 0; jphi < nphi; jphi++) {
14439  double ccc1 = areconoiseHB[i][jeta][jphi];
14440  if (ccc1 != 0.) {
14441  HBnegativedirectionReconoise1->Fill(jphi, ccc1);
14442  ccctest = 1.; //HBnegativedirectionReconoise1->SetBinError(i,0.01);
14443  }
14444  } // for jphi
14445  if (ccctest > 0.) {
14446  // cout<<"444 kcountHBnegativedirectionReconoise1 = "<<kcountHBnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
14447  c3x5->cd(kcountHBnegativedirectionReconoise1);
14448  HBnegativedirectionReconoise1->SetMarkerStyle(20);
14449  HBnegativedirectionReconoise1->SetMarkerSize(0.4);
14450  HBnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
14451  HBnegativedirectionReconoise1->SetXTitle("HBnegativedirectionReconoise1 \b");
14452  HBnegativedirectionReconoise1->SetMarkerColor(2);
14453  HBnegativedirectionReconoise1->SetLineColor(0);
14454  gPad->SetGridy();
14455  gPad->SetGridx();
14456  // gPad->SetLogy();
14457  if (kcountHBnegativedirectionReconoise1 == 1)
14458  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
14459  if (kcountHBnegativedirectionReconoise1 == 2)
14460  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
14461  if (kcountHBnegativedirectionReconoise1 == 3)
14462  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
14463  if (kcountHBnegativedirectionReconoise1 == 4)
14464  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
14465  if (kcountHBnegativedirectionReconoise1 == 5)
14466  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
14467  if (kcountHBnegativedirectionReconoise1 == 6)
14468  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
14469  if (kcountHBnegativedirectionReconoise1 == 7)
14470  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
14471  if (kcountHBnegativedirectionReconoise1 == 8)
14472  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
14473  if (kcountHBnegativedirectionReconoise1 == 9)
14474  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
14475  if (kcountHBnegativedirectionReconoise1 == 10)
14476  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
14477  if (kcountHBnegativedirectionReconoise1 == 11)
14478  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
14479  if (kcountHBnegativedirectionReconoise1 == 12)
14480  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
14481  if (kcountHBnegativedirectionReconoise1 == 13)
14482  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
14483  if (kcountHBnegativedirectionReconoise1 == 14)
14484  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
14485  if (kcountHBnegativedirectionReconoise1 == 15)
14486  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
14487  if (kcountHBnegativedirectionReconoise1 == 16)
14488  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
14489  HBnegativedirectionReconoise1->Draw("Error");
14490  kcountHBnegativedirectionReconoise1++;
14491  if (kcountHBnegativedirectionReconoise1 > 16)
14492  break; //
14493  } //ccctest>0
14494 
14495  } // for i
14496  } //if(jeta-41 < 0 )
14497  } //for jeta
14499  c3x5->Update();
14500  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
14501  c3x5->Clear();
14502  // clean-up
14503  if (h2CeffHBnegativedirectionReconoise1)
14504  delete h2CeffHBnegativedirectionReconoise1;
14505 
14506  //========================================================================================== 1115
14507  //======================================================================
14508  //======================================================================1D plot: R vs phi , different eta, depth=2
14509  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
14510  c3x5->Clear();
14512  c3x5->Divide(4, 4);
14513  c3x5->cd(1);
14514  int kcountHBnegativedirectionReconoise2 = 1;
14515  TH1F *h2CeffHBnegativedirectionReconoise2 = new TH1F("h2CeffHBnegativedirectionReconoise2", "", nphi, 0., 72.);
14516  for (int jeta = 0; jeta < njeta; jeta++) {
14517  // negativedirectionReconoise:
14518  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14519  // for (int i=0;i<ndepth;i++) {
14520  // depth=2
14521  for (int i = 1; i < 2; i++) {
14522  TH1F *HBnegativedirectionReconoise2 = (TH1F *)h2CeffHBnegativedirectionReconoise2->Clone("twod1");
14523  float ccctest = 0; // to avoid empty massive elements
14524  for (int jphi = 0; jphi < nphi; jphi++) {
14525  double ccc1 = areconoiseHB[i][jeta][jphi];
14526  if (ccc1 != 0.) {
14527  HBnegativedirectionReconoise2->Fill(jphi, ccc1);
14528  ccctest = 1.; //HBnegativedirectionReconoise2->SetBinError(i,0.01);
14529  }
14530  } // for jphi
14531  if (ccctest > 0.) {
14532  //cout<<"555 kcountHBnegativedirectionReconoise2 = "<<kcountHBnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
14533  c3x5->cd(kcountHBnegativedirectionReconoise2);
14534  HBnegativedirectionReconoise2->SetMarkerStyle(20);
14535  HBnegativedirectionReconoise2->SetMarkerSize(0.4);
14536  HBnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
14537  HBnegativedirectionReconoise2->SetXTitle("HBnegativedirectionReconoise2 \b");
14538  HBnegativedirectionReconoise2->SetMarkerColor(2);
14539  HBnegativedirectionReconoise2->SetLineColor(0);
14540  gPad->SetGridy();
14541  gPad->SetGridx();
14542  // gPad->SetLogy();
14543  if (kcountHBnegativedirectionReconoise2 == 1)
14544  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
14545  if (kcountHBnegativedirectionReconoise2 == 2)
14546  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
14547  if (kcountHBnegativedirectionReconoise2 == 3)
14548  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
14549  if (kcountHBnegativedirectionReconoise2 == 4)
14550  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
14551  if (kcountHBnegativedirectionReconoise2 == 5)
14552  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
14553  if (kcountHBnegativedirectionReconoise2 == 6)
14554  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
14555  if (kcountHBnegativedirectionReconoise2 == 7)
14556  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
14557  if (kcountHBnegativedirectionReconoise2 == 8)
14558  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
14559  if (kcountHBnegativedirectionReconoise2 == 9)
14560  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
14561  if (kcountHBnegativedirectionReconoise2 == 10)
14562  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
14563  if (kcountHBnegativedirectionReconoise2 == 11)
14564  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
14565  if (kcountHBnegativedirectionReconoise2 == 12)
14566  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
14567  if (kcountHBnegativedirectionReconoise2 == 13)
14568  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
14569  if (kcountHBnegativedirectionReconoise2 == 14)
14570  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
14571  if (kcountHBnegativedirectionReconoise2 == 15)
14572  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
14573  if (kcountHBnegativedirectionReconoise2 == 16)
14574  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
14575  HBnegativedirectionReconoise2->Draw("Error");
14576  kcountHBnegativedirectionReconoise2++;
14577  if (kcountHBnegativedirectionReconoise2 > 16)
14578  break; // 4x6 = 24
14579  } //ccctest>0
14580 
14581  } // for i
14582  } //if(jeta-41 < 0 )
14583  } //for jeta
14585  c3x5->Update();
14586  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
14587  c3x5->Clear();
14588  // clean-up
14589  if (h2CeffHBnegativedirectionReconoise2)
14590  delete h2CeffHBnegativedirectionReconoise2;
14591  //========================================================================================== 1116
14592  //======================================================================
14593  //======================================================================1D plot: R vs phi , different eta, depth=3
14594  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
14595  c3x5->Clear();
14597  c3x5->Divide(4, 4);
14598  c3x5->cd(1);
14599  int kcountHBnegativedirectionReconoise3 = 1;
14600  TH1F *h2CeffHBnegativedirectionReconoise3 = new TH1F("h2CeffHBnegativedirectionReconoise3", "", nphi, 0., 72.);
14601  for (int jeta = 0; jeta < njeta; jeta++) {
14602  // negativedirectionReconoise:
14603  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14604  // for (int i=0;i<ndepth;i++) {
14605  // depth=3
14606  for (int i = 2; i < 3; i++) {
14607  TH1F *HBnegativedirectionReconoise3 = (TH1F *)h2CeffHBnegativedirectionReconoise3->Clone("twod1");
14608  float ccctest = 0; // to avoid empty massive elements
14609  for (int jphi = 0; jphi < nphi; jphi++) {
14610  double ccc1 = areconoiseHB[i][jeta][jphi];
14611  if (ccc1 != 0.) {
14612  HBnegativedirectionReconoise3->Fill(jphi, ccc1);
14613  ccctest = 1.; //HBnegativedirectionReconoise3->SetBinError(i,0.01);
14614  }
14615  } // for jphi
14616  if (ccctest > 0.) {
14617  //cout<<"666 kcountHBnegativedirectionReconoise3 = "<<kcountHBnegativedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
14618  c3x5->cd(kcountHBnegativedirectionReconoise3);
14619  HBnegativedirectionReconoise3->SetMarkerStyle(20);
14620  HBnegativedirectionReconoise3->SetMarkerSize(0.4);
14621  HBnegativedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
14622  HBnegativedirectionReconoise3->SetXTitle("HBnegativedirectionReconoise3 \b");
14623  HBnegativedirectionReconoise3->SetMarkerColor(2);
14624  HBnegativedirectionReconoise3->SetLineColor(0);
14625  gPad->SetGridy();
14626  gPad->SetGridx();
14627  // gPad->SetLogy();
14628  if (kcountHBnegativedirectionReconoise3 == 1)
14629  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
14630  if (kcountHBnegativedirectionReconoise3 == 2)
14631  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
14632  if (kcountHBnegativedirectionReconoise3 == 3)
14633  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
14634  if (kcountHBnegativedirectionReconoise3 == 4)
14635  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
14636  if (kcountHBnegativedirectionReconoise3 == 5)
14637  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
14638  if (kcountHBnegativedirectionReconoise3 == 6)
14639  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
14640  if (kcountHBnegativedirectionReconoise3 == 7)
14641  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
14642  if (kcountHBnegativedirectionReconoise3 == 8)
14643  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
14644  if (kcountHBnegativedirectionReconoise3 == 9)
14645  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
14646  if (kcountHBnegativedirectionReconoise3 == 10)
14647  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
14648  if (kcountHBnegativedirectionReconoise3 == 11)
14649  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
14650  if (kcountHBnegativedirectionReconoise3 == 12)
14651  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
14652  if (kcountHBnegativedirectionReconoise3 == 13)
14653  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
14654  if (kcountHBnegativedirectionReconoise3 == 14)
14655  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
14656  if (kcountHBnegativedirectionReconoise3 == 15)
14657  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
14658  if (kcountHBnegativedirectionReconoise3 == 16)
14659  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
14660 
14661  HBnegativedirectionReconoise3->Draw("Error");
14662  kcountHBnegativedirectionReconoise3++;
14663  if (kcountHBnegativedirectionReconoise3 > 16)
14664  break; // 4x6 = 24
14665  } //ccctest>0
14666 
14667  } // for i
14668  } //if(jeta-41 < 0 )
14669  } //for jeta
14671  c3x5->Update();
14672  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
14673  c3x5->Clear();
14674  // clean-up
14675  if (h2CeffHBnegativedirectionReconoise3)
14676  delete h2CeffHBnegativedirectionReconoise3;
14677  //========================================================================================== 1117
14678  //======================================================================
14679  //======================================================================1D plot: R vs phi , different eta, depth=4
14680  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
14681  c3x5->Clear();
14683  c3x5->Divide(4, 4);
14684  c3x5->cd(1);
14685  int kcountHBnegativedirectionReconoise4 = 1;
14686  TH1F *h2CeffHBnegativedirectionReconoise4 = new TH1F("h2CeffHBnegativedirectionReconoise4", "", nphi, 0., 72.);
14687 
14688  for (int jeta = 0; jeta < njeta; jeta++) {
14689  // negativedirectionReconoise:
14690  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14691  // for (int i=0;i<ndepth;i++) {
14692  // depth=4
14693  for (int i = 3; i < 4; i++) {
14694  TH1F *HBnegativedirectionReconoise4 = (TH1F *)h2CeffHBnegativedirectionReconoise4->Clone("twod1");
14695 
14696  float ccctest = 0; // to avoid empty massive elements
14697  for (int jphi = 0; jphi < nphi; jphi++) {
14698  double ccc1 = areconoiseHB[i][jeta][jphi];
14699  if (ccc1 != 0.) {
14700  HBnegativedirectionReconoise4->Fill(jphi, ccc1);
14701  ccctest = 1.; //HBnegativedirectionReconoise4->SetBinError(i,0.01);
14702  }
14703  } // for jphi
14704  if (ccctest > 0.) {
14705  //cout<<"777 kcountHBnegativedirectionReconoise4 = "<<kcountHBnegativedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
14706  c3x5->cd(kcountHBnegativedirectionReconoise4);
14707  HBnegativedirectionReconoise4->SetMarkerStyle(20);
14708  HBnegativedirectionReconoise4->SetMarkerSize(0.4);
14709  HBnegativedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
14710  HBnegativedirectionReconoise4->SetXTitle("HBnegativedirectionReconoise4 \b");
14711  HBnegativedirectionReconoise4->SetMarkerColor(2);
14712  HBnegativedirectionReconoise4->SetLineColor(0);
14713  gPad->SetGridy();
14714  gPad->SetGridx();
14715  // gPad->SetLogy();
14716  if (kcountHBnegativedirectionReconoise4 == 1)
14717  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
14718  if (kcountHBnegativedirectionReconoise4 == 2)
14719  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
14720  if (kcountHBnegativedirectionReconoise4 == 3)
14721  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
14722  if (kcountHBnegativedirectionReconoise4 == 4)
14723  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
14724  if (kcountHBnegativedirectionReconoise4 == 5)
14725  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
14726  if (kcountHBnegativedirectionReconoise4 == 6)
14727  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
14728  if (kcountHBnegativedirectionReconoise4 == 7)
14729  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
14730  if (kcountHBnegativedirectionReconoise4 == 8)
14731  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
14732  if (kcountHBnegativedirectionReconoise4 == 9)
14733  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
14734  if (kcountHBnegativedirectionReconoise4 == 10)
14735  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
14736  if (kcountHBnegativedirectionReconoise4 == 11)
14737  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
14738  if (kcountHBnegativedirectionReconoise4 == 12)
14739  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
14740  if (kcountHBnegativedirectionReconoise4 == 13)
14741  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
14742  if (kcountHBnegativedirectionReconoise4 == 14)
14743  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
14744  if (kcountHBnegativedirectionReconoise4 == 15)
14745  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
14746  if (kcountHBnegativedirectionReconoise4 == 16)
14747  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
14748  HBnegativedirectionReconoise4->Draw("Error");
14749  kcountHBnegativedirectionReconoise4++;
14750  if (kcountHBnegativedirectionReconoise4 > 16)
14751  break; // 4x6 = 24
14752  } //ccctest>0
14753 
14754  } // for i
14755  } //if(jeta-41 < 0 )
14756  } //for jeta
14758  c3x5->Update();
14759  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
14760  c3x5->Clear();
14761  // clean-up
14762  if (h2CeffHBnegativedirectionReconoise4)
14763  delete h2CeffHBnegativedirectionReconoise4;
14764 
14765  //======================================================================================================================
14766  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HE
14767  //======================================================================================================================
14768  //======================================================================
14769  //cout<<" R2D-eta/phi-plot: DIF, averaged over depthfs *****" <<endl;
14770  c2x1->Clear();
14772  c2x1->Divide(2, 1);
14773  c2x1->cd(1);
14774  TH2F *GefzDIFreconoiseHB42D = new TH2F("GefzDIFreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
14775  TH2F *GefzDIFreconoiseHB42D0 = new TH2F("GefzDIFreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
14776  TH2F *GefzDIFreconoiseHB42DF = (TH2F *)GefzDIFreconoiseHB42D0->Clone("GefzDIFreconoiseHB42DF");
14777  for (int i = 0; i < ndepth; i++) {
14778  for (int jeta = 0; jeta < neta; jeta++) {
14779  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
14780  for (int jphi = 0; jphi < nphi; jphi++) {
14781  double ccc1 = breconoiseHB[i][jeta][jphi];
14782  int k2plot = jeta - 41;
14783  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
14784  if (ccc1 != 0.) {
14785  GefzDIFreconoiseHB42D->Fill(kkk, jphi, ccc1);
14786  GefzDIFreconoiseHB42D0->Fill(kkk, jphi, 1.);
14787  }
14788  }
14789  }
14790  }
14791  }
14792  GefzDIFreconoiseHB42DF->Divide(GefzDIFreconoiseHB42D, GefzDIFreconoiseHB42D0, 1, 1, "B"); // average A
14793  gPad->SetGridy();
14794  gPad->SetGridx(); // gPad->SetLogz();
14795  GefzDIFreconoiseHB42DF->SetXTitle("<DIF>_depth #eta \b");
14796  GefzDIFreconoiseHB42DF->SetYTitle(" #phi \b");
14797  GefzDIFreconoiseHB42DF->Draw("COLZ");
14798 
14799  // c2x1->cd(2);
14800  // TH1F *energyhitNoise_HB= (TH1F*)dir->FindObjectAny("h_energyhitNoise_HB");
14801  // 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");
14802 
14804  c2x1->Update();
14805  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHB.png");
14806  c2x1->Clear();
14807  // clean-up
14808  if (GefzDIFreconoiseHB42D)
14809  delete GefzDIFreconoiseHB42D;
14810  if (GefzDIFreconoiseHB42D0)
14811  delete GefzDIFreconoiseHB42D0;
14812  if (GefzDIFreconoiseHB42DF)
14813  delete GefzDIFreconoiseHB42DF;
14814  //====================================================================== 1D plot: DIF vs phi , averaged over depthfs & eta
14815  //======================================================================
14816  //cout<<" 1D plot: DIF vs phi , averaged over depthfs & eta *****" <<endl;
14817  c1x1->Clear();
14819  c1x1->Divide(1, 1);
14820  c1x1->cd(1);
14821  TH1F *GefzDIFreconoiseHB41D = new TH1F("GefzDIFreconoiseHB41D", "", nphi, 0., 72.);
14822  TH1F *GefzDIFreconoiseHB41D0 = new TH1F("GefzDIFreconoiseHB41D0", "", nphi, 0., 72.);
14823  TH1F *GefzDIFreconoiseHB41DF = (TH1F *)GefzDIFreconoiseHB41D0->Clone("GefzDIFreconoiseHB41DF");
14824  for (int jphi = 0; jphi < nphi; jphi++) {
14825  for (int jeta = 0; jeta < neta; jeta++) {
14826  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
14827  for (int i = 0; i < ndepth; i++) {
14828  double ccc1 = breconoiseHB[i][jeta][jphi];
14829  if (ccc1 != 0.) {
14830  GefzDIFreconoiseHB41D->Fill(jphi, ccc1);
14831  GefzDIFreconoiseHB41D0->Fill(jphi, 1.);
14832  }
14833  }
14834  }
14835  }
14836  }
14837  GefzDIFreconoiseHB41DF->Divide(
14838  GefzDIFreconoiseHB41D, GefzDIFreconoiseHB41D0, 1, 1, "B"); // DIF averaged over depthfs & eta
14839  GefzDIFreconoiseHB41D0->Sumw2();
14840  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHB41DF->SetBinError(jphi,0.01);}
14841  gPad->SetGridy();
14842  gPad->SetGridx(); // gPad->SetLogz();
14843  GefzDIFreconoiseHB41DF->SetMarkerStyle(20);
14844  GefzDIFreconoiseHB41DF->SetMarkerSize(1.4);
14845  GefzDIFreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
14846  GefzDIFreconoiseHB41DF->SetXTitle("#phi \b");
14847  GefzDIFreconoiseHB41DF->SetYTitle(" <DIF> \b");
14848  GefzDIFreconoiseHB41DF->SetZTitle("<DIF>_PHI - AllDepthfs \b");
14849  GefzDIFreconoiseHB41DF->SetMarkerColor(4);
14850  GefzDIFreconoiseHB41DF->SetLineColor(
14851  4); //GefzDIFreconoiseHB41DF->SetMinimum(0.8); // GefzDIFreconoiseHB41DF->SetMaximum(1.000);
14852  GefzDIFreconoiseHB41DF->Draw("Error");
14854  c1x1->Update();
14855  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHB.png");
14856  c1x1->Clear();
14857  // clean-up
14858  if (GefzDIFreconoiseHB41D)
14859  delete GefzDIFreconoiseHB41D;
14860  if (GefzDIFreconoiseHB41D0)
14861  delete GefzDIFreconoiseHB41D0;
14862  if (GefzDIFreconoiseHB41DF)
14863  delete GefzDIFreconoiseHB41DF;
14864  //========================================================================================== 4
14865  //======================================================================
14866  //======================================================================1D plot: DIF vs phi , different eta, depth=1
14867  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
14868  c3x5->Clear();
14870  c3x5->Divide(4, 4);
14871  c3x5->cd(1);
14872  int kcountHBpositivedirectionReconoiseDIF1 = 1;
14873  TH1F *h2CeffHBpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
14874  for (int jeta = 0; jeta < njeta; jeta++) {
14875  // positivedirectionReconoiseDIF:
14876  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14877  // for (int i=0;i<ndepth;i++) {
14878  // depth=1
14879  for (int i = 0; i < 1; i++) {
14880  TH1F *HBpositivedirectionReconoiseDIF1 = (TH1F *)h2CeffHBpositivedirectionReconoiseDIF1->Clone("twod1");
14881  float ccctest = 0; // to avoid empty massive elements
14882  for (int jphi = 0; jphi < nphi; jphi++) {
14883  double ccc1 = breconoiseHB[i][jeta][jphi];
14884  if (ccc1 != 0.) {
14885  HBpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
14886  ccctest = 1.; //HBpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
14887  }
14888  } // for jphi
14889  if (ccctest > 0.) {
14890  // cout<<"444 kcountHBpositivedirectionReconoiseDIF1 = "<<kcountHBpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
14891  c3x5->cd(kcountHBpositivedirectionReconoiseDIF1);
14892  HBpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
14893  HBpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
14894  HBpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
14895  HBpositivedirectionReconoiseDIF1->SetXTitle("HBpositivedirectionReconoiseDIF1 \b");
14896  HBpositivedirectionReconoiseDIF1->SetMarkerColor(2);
14897  HBpositivedirectionReconoiseDIF1->SetLineColor(0);
14898  gPad->SetGridy();
14899  gPad->SetGridx();
14900  // gPad->SetLogy();
14901  if (kcountHBpositivedirectionReconoiseDIF1 == 1)
14902  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 0; depth = 1 \b");
14903  if (kcountHBpositivedirectionReconoiseDIF1 == 2)
14904  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 1; depth = 1 \b");
14905  if (kcountHBpositivedirectionReconoiseDIF1 == 3)
14906  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 2; depth = 1 \b");
14907  if (kcountHBpositivedirectionReconoiseDIF1 == 4)
14908  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 3; depth = 1 \b");
14909  if (kcountHBpositivedirectionReconoiseDIF1 == 5)
14910  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 4; depth = 1 \b");
14911  if (kcountHBpositivedirectionReconoiseDIF1 == 6)
14912  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 5; depth = 1 \b");
14913  if (kcountHBpositivedirectionReconoiseDIF1 == 7)
14914  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 6; depth = 1 \b");
14915  if (kcountHBpositivedirectionReconoiseDIF1 == 8)
14916  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 7; depth = 1 \b");
14917  if (kcountHBpositivedirectionReconoiseDIF1 == 9)
14918  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 8; depth = 1 \b");
14919  if (kcountHBpositivedirectionReconoiseDIF1 == 10)
14920  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 9; depth = 1 \b");
14921  if (kcountHBpositivedirectionReconoiseDIF1 == 11)
14922  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 10; depth = 1 \b");
14923  if (kcountHBpositivedirectionReconoiseDIF1 == 12)
14924  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 11; depth = 1 \b");
14925  if (kcountHBpositivedirectionReconoiseDIF1 == 13)
14926  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 12; depth = 1 \b");
14927  if (kcountHBpositivedirectionReconoiseDIF1 == 14)
14928  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 13; depth = 1 \b");
14929  if (kcountHBpositivedirectionReconoiseDIF1 == 15)
14930  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 14; depth = 1 \b");
14931  if (kcountHBpositivedirectionReconoiseDIF1 == 16)
14932  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 15; depth = 1 \b");
14933  HBpositivedirectionReconoiseDIF1->Draw("Error");
14934  kcountHBpositivedirectionReconoiseDIF1++;
14935  if (kcountHBpositivedirectionReconoiseDIF1 > 16)
14936  break; //
14937  } //ccctest>0
14938 
14939  } // for i
14940  } //if(jeta-41 >= 0)
14941  } //for jeta
14943  c3x5->Update();
14944  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
14945  c3x5->Clear();
14946  // clean-up
14947  if (h2CeffHBpositivedirectionReconoiseDIF1)
14948  delete h2CeffHBpositivedirectionReconoiseDIF1;
14949 
14950  //========================================================================================== 5
14951  //======================================================================
14952  //======================================================================1D plot: R vs phi , different eta, depth=2
14953  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
14954  c3x5->Clear();
14956  c3x5->Divide(4, 4);
14957  c3x5->cd(1);
14958  int kcountHBpositivedirectionReconoiseDIF2 = 1;
14959  TH1F *h2CeffHBpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
14960  for (int jeta = 0; jeta < njeta; jeta++) {
14961  // positivedirectionReconoiseDIF:
14962  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14963  // for (int i=0;i<ndepth;i++) {
14964  // depth=2
14965  for (int i = 1; i < 2; i++) {
14966  TH1F *HBpositivedirectionReconoiseDIF2 = (TH1F *)h2CeffHBpositivedirectionReconoiseDIF2->Clone("twod1");
14967  float ccctest = 0; // to avoid empty massive elements
14968  for (int jphi = 0; jphi < nphi; jphi++) {
14969  double ccc1 = breconoiseHB[i][jeta][jphi];
14970  if (ccc1 != 0.) {
14971  HBpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
14972  ccctest = 1.; //HBpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
14973  }
14974  } // for jphi
14975  if (ccctest > 0.) {
14976  //cout<<"555 kcountHBpositivedirectionReconoiseDIF2 = "<<kcountHBpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
14977  c3x5->cd(kcountHBpositivedirectionReconoiseDIF2);
14978  HBpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
14979  HBpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
14980  HBpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
14981  HBpositivedirectionReconoiseDIF2->SetXTitle("HBpositivedirectionReconoiseDIF2 \b");
14982  HBpositivedirectionReconoiseDIF2->SetMarkerColor(2);
14983  HBpositivedirectionReconoiseDIF2->SetLineColor(0);
14984  gPad->SetGridy();
14985  gPad->SetGridx();
14986  // gPad->SetLogy();
14987  if (kcountHBpositivedirectionReconoiseDIF2 == 1)
14988  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 0; depth = 2 \b");
14989  if (kcountHBpositivedirectionReconoiseDIF2 == 2)
14990  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 1; depth = 2 \b");
14991  if (kcountHBpositivedirectionReconoiseDIF2 == 3)
14992  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 2; depth = 2 \b");
14993  if (kcountHBpositivedirectionReconoiseDIF2 == 4)
14994  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 3; depth = 2 \b");
14995  if (kcountHBpositivedirectionReconoiseDIF2 == 5)
14996  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 4; depth = 2 \b");
14997  if (kcountHBpositivedirectionReconoiseDIF2 == 6)
14998  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 5; depth = 2 \b");
14999  if (kcountHBpositivedirectionReconoiseDIF2 == 7)
15000  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 6; depth = 2 \b");
15001  if (kcountHBpositivedirectionReconoiseDIF2 == 8)
15002  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 7; depth = 2 \b");
15003  if (kcountHBpositivedirectionReconoiseDIF2 == 9)
15004  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 8; depth = 2 \b");
15005  if (kcountHBpositivedirectionReconoiseDIF2 == 10)
15006  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 9; depth = 2 \b");
15007  if (kcountHBpositivedirectionReconoiseDIF2 == 11)
15008  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 10; depth = 2 \b");
15009  if (kcountHBpositivedirectionReconoiseDIF2 == 12)
15010  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 11; depth = 2 \b");
15011  if (kcountHBpositivedirectionReconoiseDIF2 == 13)
15012  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 12; depth = 2 \b");
15013  if (kcountHBpositivedirectionReconoiseDIF2 == 14)
15014  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 13; depth = 2 \b");
15015  if (kcountHBpositivedirectionReconoiseDIF2 == 15)
15016  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 14; depth = 2 \b");
15017  if (kcountHBpositivedirectionReconoiseDIF2 == 16)
15018  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 15; depth = 2 \b");
15019  HBpositivedirectionReconoiseDIF2->Draw("Error");
15020  kcountHBpositivedirectionReconoiseDIF2++;
15021  if (kcountHBpositivedirectionReconoiseDIF2 > 16)
15022  break; // 4x6 = 24
15023  } //ccctest>0
15024 
15025  } // for i
15026  } //if(jeta-41 >= 0)
15027  } //for jeta
15029  c3x5->Update();
15030  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
15031  c3x5->Clear();
15032  // clean-up
15033  if (h2CeffHBpositivedirectionReconoiseDIF2)
15034  delete h2CeffHBpositivedirectionReconoiseDIF2;
15035  //========================================================================================== 6
15036  //======================================================================
15037  //======================================================================1D plot: R vs phi , different eta, depth=3
15038  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
15039  c3x5->Clear();
15041  c3x5->Divide(4, 4);
15042  c3x5->cd(1);
15043  int kcountHBpositivedirectionReconoiseDIF3 = 1;
15044  TH1F *h2CeffHBpositivedirectionReconoiseDIF3 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF3", "", nphi, 0., 72.);
15045  for (int jeta = 0; jeta < njeta; jeta++) {
15046  // positivedirectionReconoiseDIF:
15047  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15048  // for (int i=0;i<ndepth;i++) {
15049  // depth=3
15050  for (int i = 2; i < 3; i++) {
15051  TH1F *HBpositivedirectionReconoiseDIF3 = (TH1F *)h2CeffHBpositivedirectionReconoiseDIF3->Clone("twod1");
15052  float ccctest = 0; // to avoid empty massive elements
15053  for (int jphi = 0; jphi < nphi; jphi++) {
15054  double ccc1 = breconoiseHB[i][jeta][jphi];
15055  if (ccc1 != 0.) {
15056  HBpositivedirectionReconoiseDIF3->Fill(jphi, ccc1);
15057  ccctest = 1.; //HBpositivedirectionReconoiseDIF3->SetBinError(i,0.01);
15058  }
15059  } // for jphi
15060  if (ccctest > 0.) {
15061  //cout<<"666 kcountHBpositivedirectionReconoiseDIF3 = "<<kcountHBpositivedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
15062  c3x5->cd(kcountHBpositivedirectionReconoiseDIF3);
15063  HBpositivedirectionReconoiseDIF3->SetMarkerStyle(20);
15064  HBpositivedirectionReconoiseDIF3->SetMarkerSize(0.4);
15065  HBpositivedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
15066  HBpositivedirectionReconoiseDIF3->SetXTitle("HBpositivedirectionReconoiseDIF3 \b");
15067  HBpositivedirectionReconoiseDIF3->SetMarkerColor(2);
15068  HBpositivedirectionReconoiseDIF3->SetLineColor(0);
15069  gPad->SetGridy();
15070  gPad->SetGridx();
15071  // gPad->SetLogy();
15072  if (kcountHBpositivedirectionReconoiseDIF3 == 1)
15073  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 0; depth = 3 \b");
15074  if (kcountHBpositivedirectionReconoiseDIF3 == 2)
15075  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 1; depth = 3 \b");
15076  if (kcountHBpositivedirectionReconoiseDIF3 == 3)
15077  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 2; depth = 3 \b");
15078  if (kcountHBpositivedirectionReconoiseDIF3 == 4)
15079  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 3; depth = 3 \b");
15080  if (kcountHBpositivedirectionReconoiseDIF3 == 5)
15081  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 4; depth = 3 \b");
15082  if (kcountHBpositivedirectionReconoiseDIF3 == 6)
15083  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 5; depth = 3 \b");
15084  if (kcountHBpositivedirectionReconoiseDIF3 == 7)
15085  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 6; depth = 3 \b");
15086  if (kcountHBpositivedirectionReconoiseDIF3 == 8)
15087  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 7; depth = 3 \b");
15088  if (kcountHBpositivedirectionReconoiseDIF3 == 9)
15089  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 8; depth = 3 \b");
15090  if (kcountHBpositivedirectionReconoiseDIF3 == 10)
15091  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 9; depth = 3 \b");
15092  if (kcountHBpositivedirectionReconoiseDIF3 == 11)
15093  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 0; depth = 3 \b");
15094  if (kcountHBpositivedirectionReconoiseDIF3 == 12)
15095  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 11; depth = 3 \b");
15096  if (kcountHBpositivedirectionReconoiseDIF3 == 13)
15097  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 12; depth = 3 \b");
15098  if (kcountHBpositivedirectionReconoiseDIF3 == 14)
15099  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 13; depth = 3 \b");
15100  if (kcountHBpositivedirectionReconoiseDIF3 == 15)
15101  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 14; depth = 3 \b");
15102  if (kcountHBpositivedirectionReconoiseDIF3 == 16)
15103  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 15; depth = 3 \b");
15104  HBpositivedirectionReconoiseDIF3->Draw("Error");
15105  kcountHBpositivedirectionReconoiseDIF3++;
15106  if (kcountHBpositivedirectionReconoiseDIF3 > 16)
15107  break; // 4x6 = 24
15108  } //ccctest>0
15109 
15110  } // for i
15111  } //if(jeta-41 >= 0)
15112  } //for jeta
15114  c3x5->Update();
15115  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
15116  c3x5->Clear();
15117  // clean-up
15118  if (h2CeffHBpositivedirectionReconoiseDIF3)
15119  delete h2CeffHBpositivedirectionReconoiseDIF3;
15120  //========================================================================================== 7
15121  //======================================================================
15122  //======================================================================1D plot: R vs phi , different eta, depth=4
15123  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
15124  c3x5->Clear();
15126  c3x5->Divide(4, 4);
15127  c3x5->cd(1);
15128  int kcountHBpositivedirectionReconoiseDIF4 = 1;
15129  TH1F *h2CeffHBpositivedirectionReconoiseDIF4 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF4", "", nphi, 0., 72.);
15130 
15131  for (int jeta = 0; jeta < njeta; jeta++) {
15132  // positivedirectionReconoiseDIF:
15133  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15134  // for (int i=0;i<ndepth;i++) {
15135  // depth=4
15136  for (int i = 3; i < 4; i++) {
15137  TH1F *HBpositivedirectionReconoiseDIF4 = (TH1F *)h2CeffHBpositivedirectionReconoiseDIF4->Clone("twod1");
15138 
15139  float ccctest = 0; // to avoid empty massive elements
15140  for (int jphi = 0; jphi < nphi; jphi++) {
15141  double ccc1 = breconoiseHB[i][jeta][jphi];
15142  if (ccc1 != 0.) {
15143  HBpositivedirectionReconoiseDIF4->Fill(jphi, ccc1);
15144  ccctest = 1.; //HBpositivedirectionReconoiseDIF4->SetBinError(i,0.01);
15145  }
15146  } // for jphi
15147  if (ccctest > 0.) {
15148  //cout<<"777 kcountHBpositivedirectionReconoiseDIF4 = "<<kcountHBpositivedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
15149  c3x5->cd(kcountHBpositivedirectionReconoiseDIF4);
15150  HBpositivedirectionReconoiseDIF4->SetMarkerStyle(20);
15151  HBpositivedirectionReconoiseDIF4->SetMarkerSize(0.4);
15152  HBpositivedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
15153  HBpositivedirectionReconoiseDIF4->SetXTitle("HBpositivedirectionReconoiseDIF4 \b");
15154  HBpositivedirectionReconoiseDIF4->SetMarkerColor(2);
15155  HBpositivedirectionReconoiseDIF4->SetLineColor(0);
15156  gPad->SetGridy();
15157  gPad->SetGridx();
15158  // gPad->SetLogy();
15159  if (kcountHBpositivedirectionReconoiseDIF4 == 1)
15160  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 0; depth = 4 \b");
15161  if (kcountHBpositivedirectionReconoiseDIF4 == 2)
15162  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 1; depth = 4 \b");
15163  if (kcountHBpositivedirectionReconoiseDIF4 == 3)
15164  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 2; depth = 4 \b");
15165  if (kcountHBpositivedirectionReconoiseDIF4 == 4)
15166  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 3; depth = 4 \b");
15167  if (kcountHBpositivedirectionReconoiseDIF4 == 5)
15168  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 4; depth = 4 \b");
15169  if (kcountHBpositivedirectionReconoiseDIF4 == 6)
15170  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 5; depth = 4 \b");
15171  if (kcountHBpositivedirectionReconoiseDIF4 == 7)
15172  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 6; depth = 4 \b");
15173  if (kcountHBpositivedirectionReconoiseDIF4 == 8)
15174  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 7; depth = 4 \b");
15175  if (kcountHBpositivedirectionReconoiseDIF4 == 9)
15176  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 8; depth = 4 \b");
15177  if (kcountHBpositivedirectionReconoiseDIF4 == 10)
15178  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 9; depth = 4 \b");
15179  if (kcountHBpositivedirectionReconoiseDIF4 == 11)
15180  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 10; depth = 4 \b");
15181  if (kcountHBpositivedirectionReconoiseDIF4 == 12)
15182  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 11; depth = 4 \b");
15183  if (kcountHBpositivedirectionReconoiseDIF4 == 13)
15184  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 12; depth = 4 \b");
15185  if (kcountHBpositivedirectionReconoiseDIF4 == 14)
15186  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 13; depth = 4 \b");
15187  if (kcountHBpositivedirectionReconoiseDIF4 == 15)
15188  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 14; depth = 4 \b");
15189  if (kcountHBpositivedirectionReconoiseDIF4 == 16)
15190  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 15; depth = 4 \b");
15191  HBpositivedirectionReconoiseDIF4->Draw("Error");
15192  kcountHBpositivedirectionReconoiseDIF4++;
15193  if (kcountHBpositivedirectionReconoiseDIF4 > 16)
15194  break; // 4x6 = 24
15195  } //ccctest>0
15196 
15197  } // for i
15198  } //if(jeta-41 >= 0)
15199  } //for jeta
15201  c3x5->Update();
15202  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
15203  c3x5->Clear();
15204  // clean-up
15205  if (h2CeffHBpositivedirectionReconoiseDIF4)
15206  delete h2CeffHBpositivedirectionReconoiseDIF4;
15207 
15208  //========================================================================================== 1114
15209  //======================================================================
15210  //======================================================================1D plot: R vs phi , different eta, depth=1
15211  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
15212  c3x5->Clear();
15214  c3x5->Divide(4, 4);
15215  c3x5->cd(1);
15216  int kcountHBnegativedirectionReconoiseDIF1 = 1;
15217  TH1F *h2CeffHBnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
15218  for (int jeta = 0; jeta < njeta; jeta++) {
15219  // negativedirectionReconoiseDIF:
15220  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15221  // for (int i=0;i<ndepth;i++) {
15222  // depth=1
15223  for (int i = 0; i < 1; i++) {
15224  TH1F *HBnegativedirectionReconoiseDIF1 = (TH1F *)h2CeffHBnegativedirectionReconoiseDIF1->Clone("twod1");
15225  float ccctest = 0; // to avoid empty massive elements
15226  for (int jphi = 0; jphi < nphi; jphi++) {
15227  double ccc1 = breconoiseHB[i][jeta][jphi];
15228  if (ccc1 != 0.) {
15229  HBnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
15230  ccctest = 1.; //HBnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
15231  }
15232  } // for jphi
15233  if (ccctest > 0.) {
15234  // cout<<"444 kcountHBnegativedirectionReconoiseDIF1 = "<<kcountHBnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
15235  c3x5->cd(kcountHBnegativedirectionReconoiseDIF1);
15236  HBnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
15237  HBnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
15238  HBnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
15239  HBnegativedirectionReconoiseDIF1->SetXTitle("HBnegativedirectionReconoiseDIF1 \b");
15240  HBnegativedirectionReconoiseDIF1->SetMarkerColor(2);
15241  HBnegativedirectionReconoiseDIF1->SetLineColor(0);
15242  gPad->SetGridy();
15243  gPad->SetGridx();
15244  // gPad->SetLogy();
15245  if (kcountHBnegativedirectionReconoiseDIF1 == 1)
15246  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -16; depth = 1 \b");
15247  if (kcountHBnegativedirectionReconoiseDIF1 == 2)
15248  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -15; depth = 1 \b");
15249  if (kcountHBnegativedirectionReconoiseDIF1 == 3)
15250  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -14; depth = 1 \b");
15251  if (kcountHBnegativedirectionReconoiseDIF1 == 4)
15252  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -13; depth = 1 \b");
15253  if (kcountHBnegativedirectionReconoiseDIF1 == 5)
15254  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -12; depth = 1 \b");
15255  if (kcountHBnegativedirectionReconoiseDIF1 == 6)
15256  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -11; depth = 1 \b");
15257  if (kcountHBnegativedirectionReconoiseDIF1 == 7)
15258  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -10; depth = 1 \b");
15259  if (kcountHBnegativedirectionReconoiseDIF1 == 8)
15260  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -9; depth = 1 \b");
15261  if (kcountHBnegativedirectionReconoiseDIF1 == 9)
15262  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -8; depth = 1 \b");
15263  if (kcountHBnegativedirectionReconoiseDIF1 == 10)
15264  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -7; depth = 1 \b");
15265  if (kcountHBnegativedirectionReconoiseDIF1 == 11)
15266  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -6; depth = 1 \b");
15267  if (kcountHBnegativedirectionReconoiseDIF1 == 12)
15268  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -5; depth = 1 \b");
15269  if (kcountHBnegativedirectionReconoiseDIF1 == 13)
15270  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -4; depth = 1 \b");
15271  if (kcountHBnegativedirectionReconoiseDIF1 == 14)
15272  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -3; depth = 1 \b");
15273  if (kcountHBnegativedirectionReconoiseDIF1 == 15)
15274  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -2; depth = 1 \b");
15275  if (kcountHBnegativedirectionReconoiseDIF1 == 16)
15276  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -1; depth = 1 \b");
15277  HBnegativedirectionReconoiseDIF1->Draw("Error");
15278  kcountHBnegativedirectionReconoiseDIF1++;
15279  if (kcountHBnegativedirectionReconoiseDIF1 > 16)
15280  break; //
15281  } //ccctest>0
15282 
15283  } // for i
15284  } //if(jeta-41 < 0 )
15285  } //for jeta
15287  c3x5->Update();
15288  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
15289  c3x5->Clear();
15290  // clean-up
15291  if (h2CeffHBnegativedirectionReconoiseDIF1)
15292  delete h2CeffHBnegativedirectionReconoiseDIF1;
15293 
15294  //========================================================================================== 1115
15295  //======================================================================
15296  //======================================================================1D plot: R vs phi , different eta, depth=2
15297  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
15298  c3x5->Clear();
15300  c3x5->Divide(4, 4);
15301  c3x5->cd(1);
15302  int kcountHBnegativedirectionReconoiseDIF2 = 1;
15303  TH1F *h2CeffHBnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
15304  for (int jeta = 0; jeta < njeta; jeta++) {
15305  // negativedirectionReconoiseDIF:
15306  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15307  // for (int i=0;i<ndepth;i++) {
15308  // depth=2
15309  for (int i = 1; i < 2; i++) {
15310  TH1F *HBnegativedirectionReconoiseDIF2 = (TH1F *)h2CeffHBnegativedirectionReconoiseDIF2->Clone("twod1");
15311  float ccctest = 0; // to avoid empty massive elements
15312  for (int jphi = 0; jphi < nphi; jphi++) {
15313  double ccc1 = breconoiseHB[i][jeta][jphi];
15314  if (ccc1 != 0.) {
15315  HBnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
15316  ccctest = 1.; //HBnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
15317  }
15318  } // for jphi
15319  if (ccctest > 0.) {
15320  //cout<<"555 kcountHBnegativedirectionReconoiseDIF2 = "<<kcountHBnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
15321  c3x5->cd(kcountHBnegativedirectionReconoiseDIF2);
15322  HBnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
15323  HBnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
15324  HBnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
15325  HBnegativedirectionReconoiseDIF2->SetXTitle("HBnegativedirectionReconoiseDIF2 \b");
15326  HBnegativedirectionReconoiseDIF2->SetMarkerColor(2);
15327  HBnegativedirectionReconoiseDIF2->SetLineColor(0);
15328  gPad->SetGridy();
15329  gPad->SetGridx();
15330  // gPad->SetLogy();
15331  if (kcountHBnegativedirectionReconoiseDIF2 == 1)
15332  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -16; depth = 2 \b");
15333  if (kcountHBnegativedirectionReconoiseDIF2 == 2)
15334  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -15; depth = 2 \b");
15335  if (kcountHBnegativedirectionReconoiseDIF2 == 3)
15336  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -14; depth = 2 \b");
15337  if (kcountHBnegativedirectionReconoiseDIF2 == 4)
15338  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -13; depth = 2 \b");
15339  if (kcountHBnegativedirectionReconoiseDIF2 == 5)
15340  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -12; depth = 2 \b");
15341  if (kcountHBnegativedirectionReconoiseDIF2 == 6)
15342  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -11; depth = 2 \b");
15343  if (kcountHBnegativedirectionReconoiseDIF2 == 7)
15344  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -10; depth = 2 \b");
15345  if (kcountHBnegativedirectionReconoiseDIF2 == 8)
15346  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -9; depth = 2 \b");
15347  if (kcountHBnegativedirectionReconoiseDIF2 == 9)
15348  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -8; depth = 2 \b");
15349  if (kcountHBnegativedirectionReconoiseDIF2 == 10)
15350  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -7; depth = 2 \b");
15351  if (kcountHBnegativedirectionReconoiseDIF2 == 11)
15352  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -6; depth = 2 \b");
15353  if (kcountHBnegativedirectionReconoiseDIF2 == 12)
15354  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -5; depth = 2 \b");
15355  if (kcountHBnegativedirectionReconoiseDIF2 == 13)
15356  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -4; depth = 2 \b");
15357  if (kcountHBnegativedirectionReconoiseDIF2 == 14)
15358  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -3; depth = 2 \b");
15359  if (kcountHBnegativedirectionReconoiseDIF2 == 15)
15360  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -2; depth = 2 \b");
15361  if (kcountHBnegativedirectionReconoiseDIF2 == 16)
15362  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -1; depth = 2 \b");
15363  HBnegativedirectionReconoiseDIF2->Draw("Error");
15364  kcountHBnegativedirectionReconoiseDIF2++;
15365  if (kcountHBnegativedirectionReconoiseDIF2 > 16)
15366  break; // 4x6 = 24
15367  } //ccctest>0
15368 
15369  } // for i
15370  } //if(jeta-41 < 0 )
15371  } //for jeta
15373  c3x5->Update();
15374  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
15375  c3x5->Clear();
15376  // clean-up
15377  if (h2CeffHBnegativedirectionReconoiseDIF2)
15378  delete h2CeffHBnegativedirectionReconoiseDIF2;
15379  //========================================================================================== 1116
15380  //======================================================================
15381  //======================================================================1D plot: R vs phi , different eta, depth=3
15382  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
15383  c3x5->Clear();
15385  c3x5->Divide(4, 4);
15386  c3x5->cd(1);
15387  int kcountHBnegativedirectionReconoiseDIF3 = 1;
15388  TH1F *h2CeffHBnegativedirectionReconoiseDIF3 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF3", "", nphi, 0., 72.);
15389  for (int jeta = 0; jeta < njeta; jeta++) {
15390  // negativedirectionReconoiseDIF:
15391  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15392  // for (int i=0;i<ndepth;i++) {
15393  // depth=3
15394  for (int i = 2; i < 3; i++) {
15395  TH1F *HBnegativedirectionReconoiseDIF3 = (TH1F *)h2CeffHBnegativedirectionReconoiseDIF3->Clone("twod1");
15396  float ccctest = 0; // to avoid empty massive elements
15397  for (int jphi = 0; jphi < nphi; jphi++) {
15398  double ccc1 = breconoiseHB[i][jeta][jphi];
15399  if (ccc1 != 0.) {
15400  HBnegativedirectionReconoiseDIF3->Fill(jphi, ccc1);
15401  ccctest = 1.; //HBnegativedirectionReconoiseDIF3->SetBinError(i,0.01);
15402  }
15403  } // for jphi
15404  if (ccctest > 0.) {
15405  //cout<<"666 kcountHBnegativedirectionReconoiseDIF3 = "<<kcountHBnegativedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
15406  c3x5->cd(kcountHBnegativedirectionReconoiseDIF3);
15407  HBnegativedirectionReconoiseDIF3->SetMarkerStyle(20);
15408  HBnegativedirectionReconoiseDIF3->SetMarkerSize(0.4);
15409  HBnegativedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
15410  HBnegativedirectionReconoiseDIF3->SetXTitle("HBnegativedirectionReconoiseDIF3 \b");
15411  HBnegativedirectionReconoiseDIF3->SetMarkerColor(2);
15412  HBnegativedirectionReconoiseDIF3->SetLineColor(0);
15413  gPad->SetGridy();
15414  gPad->SetGridx();
15415  // gPad->SetLogy();
15416  if (kcountHBnegativedirectionReconoiseDIF3 == 1)
15417  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -16; depth = 3 \b");
15418  if (kcountHBnegativedirectionReconoiseDIF3 == 2)
15419  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -15; depth = 3 \b");
15420  if (kcountHBnegativedirectionReconoiseDIF3 == 3)
15421  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -14; depth = 3 \b");
15422  if (kcountHBnegativedirectionReconoiseDIF3 == 4)
15423  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -13; depth = 3 \b");
15424  if (kcountHBnegativedirectionReconoiseDIF3 == 5)
15425  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -12; depth = 3 \b");
15426  if (kcountHBnegativedirectionReconoiseDIF3 == 6)
15427  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -11; depth = 3 \b");
15428  if (kcountHBnegativedirectionReconoiseDIF3 == 7)
15429  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -10; depth = 3 \b");
15430  if (kcountHBnegativedirectionReconoiseDIF3 == 8)
15431  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -9; depth = 3 \b");
15432  if (kcountHBnegativedirectionReconoiseDIF3 == 9)
15433  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -8; depth = 3 \b");
15434  if (kcountHBnegativedirectionReconoiseDIF3 == 10)
15435  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -7; depth = 3 \b");
15436  if (kcountHBnegativedirectionReconoiseDIF3 == 11)
15437  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -6; depth = 3 \b");
15438  if (kcountHBnegativedirectionReconoiseDIF3 == 12)
15439  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -5; depth = 3 \b");
15440  if (kcountHBnegativedirectionReconoiseDIF3 == 13)
15441  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -4; depth = 3 \b");
15442  if (kcountHBnegativedirectionReconoiseDIF3 == 14)
15443  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -3; depth = 3 \b");
15444  if (kcountHBnegativedirectionReconoiseDIF3 == 15)
15445  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -2; depth = 3 \b");
15446  if (kcountHBnegativedirectionReconoiseDIF3 == 16)
15447  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -1; depth = 3 \b");
15448 
15449  HBnegativedirectionReconoiseDIF3->Draw("Error");
15450  kcountHBnegativedirectionReconoiseDIF3++;
15451  if (kcountHBnegativedirectionReconoiseDIF3 > 16)
15452  break; // 4x6 = 24
15453  } //ccctest>0
15454 
15455  } // for i
15456  } //if(jeta-41 < 0 )
15457  } //for jeta
15459  c3x5->Update();
15460  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
15461  c3x5->Clear();
15462  // clean-up
15463  if (h2CeffHBnegativedirectionReconoiseDIF3)
15464  delete h2CeffHBnegativedirectionReconoiseDIF3;
15465  //========================================================================================== 1117
15466  //======================================================================
15467  //======================================================================1D plot: R vs phi , different eta, depth=4
15468  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
15469  c3x5->Clear();
15471  c3x5->Divide(4, 4);
15472  c3x5->cd(1);
15473  int kcountHBnegativedirectionReconoiseDIF4 = 1;
15474  TH1F *h2CeffHBnegativedirectionReconoiseDIF4 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF4", "", nphi, 0., 72.);
15475 
15476  for (int jeta = 0; jeta < njeta; jeta++) {
15477  // negativedirectionReconoiseDIF:
15478  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15479  // for (int i=0;i<ndepth;i++) {
15480  // depth=4
15481  for (int i = 3; i < 4; i++) {
15482  TH1F *HBnegativedirectionReconoiseDIF4 = (TH1F *)h2CeffHBnegativedirectionReconoiseDIF4->Clone("twod1");
15483 
15484  float ccctest = 0; // to avoid empty massive elements
15485  for (int jphi = 0; jphi < nphi; jphi++) {
15486  double ccc1 = breconoiseHB[i][jeta][jphi];
15487  if (ccc1 != 0.) {
15488  HBnegativedirectionReconoiseDIF4->Fill(jphi, ccc1);
15489  ccctest = 1.; //HBnegativedirectionReconoiseDIF4->SetBinError(i,0.01);
15490  }
15491  } // for jphi
15492  if (ccctest > 0.) {
15493  //cout<<"777 kcountHBnegativedirectionReconoiseDIF4 = "<<kcountHBnegativedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
15494  c3x5->cd(kcountHBnegativedirectionReconoiseDIF4);
15495  HBnegativedirectionReconoiseDIF4->SetMarkerStyle(20);
15496  HBnegativedirectionReconoiseDIF4->SetMarkerSize(0.4);
15497  HBnegativedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
15498  HBnegativedirectionReconoiseDIF4->SetXTitle("HBnegativedirectionReconoiseDIF4 \b");
15499  HBnegativedirectionReconoiseDIF4->SetMarkerColor(2);
15500  HBnegativedirectionReconoiseDIF4->SetLineColor(0);
15501  gPad->SetGridy();
15502  gPad->SetGridx();
15503  // gPad->SetLogy();
15504  if (kcountHBnegativedirectionReconoiseDIF4 == 1)
15505  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -16; depth = 4 \b");
15506  if (kcountHBnegativedirectionReconoiseDIF4 == 2)
15507  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -15; depth = 4 \b");
15508  if (kcountHBnegativedirectionReconoiseDIF4 == 3)
15509  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -14; depth = 4 \b");
15510  if (kcountHBnegativedirectionReconoiseDIF4 == 4)
15511  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -13; depth = 4 \b");
15512  if (kcountHBnegativedirectionReconoiseDIF4 == 5)
15513  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -12; depth = 4 \b");
15514  if (kcountHBnegativedirectionReconoiseDIF4 == 6)
15515  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -11; depth = 4 \b");
15516  if (kcountHBnegativedirectionReconoiseDIF4 == 7)
15517  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -10; depth = 4 \b");
15518  if (kcountHBnegativedirectionReconoiseDIF4 == 8)
15519  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -9; depth = 4 \b");
15520  if (kcountHBnegativedirectionReconoiseDIF4 == 9)
15521  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -8; depth = 4 \b");
15522  if (kcountHBnegativedirectionReconoiseDIF4 == 10)
15523  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -7; depth = 4 \b");
15524  if (kcountHBnegativedirectionReconoiseDIF4 == 11)
15525  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -6; depth = 4 \b");
15526  if (kcountHBnegativedirectionReconoiseDIF4 == 12)
15527  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -5; depth = 4 \b");
15528  if (kcountHBnegativedirectionReconoiseDIF4 == 13)
15529  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -4; depth = 4 \b");
15530  if (kcountHBnegativedirectionReconoiseDIF4 == 14)
15531  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -3; depth = 4 \b");
15532  if (kcountHBnegativedirectionReconoiseDIF4 == 15)
15533  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -2; depth = 4 \b");
15534  if (kcountHBnegativedirectionReconoiseDIF4 == 16)
15535  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -1; depth = 4 \b");
15536  HBnegativedirectionReconoiseDIF4->Draw("Error");
15537  kcountHBnegativedirectionReconoiseDIF4++;
15538  if (kcountHBnegativedirectionReconoiseDIF4 > 16)
15539  break; // 4x6 = 24
15540  } //ccctest>0
15541 
15542  } // for i
15543  } //if(jeta-41 < 0 )
15544  } //for jeta
15546  c3x5->Update();
15547  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
15548  c3x5->Clear();
15549  // clean-up
15550  if (h2CeffHBnegativedirectionReconoiseDIF4)
15551  delete h2CeffHBnegativedirectionReconoiseDIF4;
15552 
15553  //======================================================================================================================
15554  //======================================================================================================================
15555  //======================================================================================================================
15556  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
15557 
15558  //cout<<" Start Vaiance: preparation *****" <<endl;
15559  TH2F *reconoiseVariance1HB1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HB1");
15560  TH2F *reconoiseVariance0HB1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HB1");
15561  TH2F *reconoiseVarianceHB1 = (TH2F *)reconoiseVariance1HB1->Clone("reconoiseVarianceHB1");
15562  reconoiseVarianceHB1->Divide(reconoiseVariance1HB1, reconoiseVariance0HB1, 1, 1, "B");
15563  TH2F *reconoiseVariance1HB2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HB2");
15564  TH2F *reconoiseVariance0HB2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HB2");
15565  TH2F *reconoiseVarianceHB2 = (TH2F *)reconoiseVariance1HB2->Clone("reconoiseVarianceHB2");
15566  reconoiseVarianceHB2->Divide(reconoiseVariance1HB2, reconoiseVariance0HB2, 1, 1, "B");
15567  TH2F *reconoiseVariance1HB3 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HB3");
15568  TH2F *reconoiseVariance0HB3 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HB3");
15569  TH2F *reconoiseVarianceHB3 = (TH2F *)reconoiseVariance1HB3->Clone("reconoiseVarianceHB3");
15570  reconoiseVarianceHB3->Divide(reconoiseVariance1HB3, reconoiseVariance0HB3, 1, 1, "B");
15571  TH2F *reconoiseVariance1HB4 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HB4");
15572  TH2F *reconoiseVariance0HB4 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HB4");
15573  TH2F *reconoiseVarianceHB4 = (TH2F *)reconoiseVariance1HB4->Clone("reconoiseVarianceHB4");
15574  reconoiseVarianceHB4->Divide(reconoiseVariance1HB4, reconoiseVariance0HB4, 1, 1, "B");
15575  //cout<<" Vaiance: preparation DONE *****" <<endl;
15576  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevarianceHB
15577  // = sum(R*R)/N - (sum(R)/N)**2
15578  for (int jeta = 0; jeta < njeta; jeta++) {
15579  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
15580  //preparation for PHI normalization:
15581  double sumreconoiseHB0 = 0;
15582  int nsumreconoiseHB0 = 0;
15583  double sumreconoiseHB1 = 0;
15584  int nsumreconoiseHB1 = 0;
15585  double sumreconoiseHB2 = 0;
15586  int nsumreconoiseHB2 = 0;
15587  double sumreconoiseHB3 = 0;
15588  int nsumreconoiseHB3 = 0;
15589  for (int jphi = 0; jphi < njphi; jphi++) {
15590  reconoisevarianceHB[0][jeta][jphi] = reconoiseVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
15591  reconoisevarianceHB[1][jeta][jphi] = reconoiseVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
15592  reconoisevarianceHB[2][jeta][jphi] = reconoiseVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
15593  reconoisevarianceHB[3][jeta][jphi] = reconoiseVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
15594  if (reconoisevarianceHB[0][jeta][jphi] != 0.) {
15595  sumreconoiseHB0 += reconoisevarianceHB[0][jeta][jphi];
15596  ++nsumreconoiseHB0;
15597  }
15598  if (reconoisevarianceHB[1][jeta][jphi] != 0.) {
15599  sumreconoiseHB1 += reconoisevarianceHB[1][jeta][jphi];
15600  ++nsumreconoiseHB1;
15601  }
15602  if (reconoisevarianceHB[2][jeta][jphi] != 0.) {
15603  sumreconoiseHB2 += reconoisevarianceHB[2][jeta][jphi];
15604  ++nsumreconoiseHB2;
15605  }
15606  if (reconoisevarianceHB[3][jeta][jphi] != 0.) {
15607  sumreconoiseHB3 += reconoisevarianceHB[3][jeta][jphi];
15608  ++nsumreconoiseHB3;
15609  }
15610  } // phi
15611  // PHI normalization :
15612  for (int jphi = 0; jphi < njphi; jphi++) {
15613  if (sumreconoiseHB0 != 0.)
15614  reconoisevarianceHB[0][jeta][jphi] /= (sumreconoiseHB0 / nsumreconoiseHB0);
15615  if (sumreconoiseHB1 != 0.)
15616  reconoisevarianceHB[1][jeta][jphi] /= (sumreconoiseHB1 / nsumreconoiseHB1);
15617  if (sumreconoiseHB2 != 0.)
15618  reconoisevarianceHB[2][jeta][jphi] /= (sumreconoiseHB2 / nsumreconoiseHB2);
15619  if (sumreconoiseHB3 != 0.)
15620  reconoisevarianceHB[3][jeta][jphi] /= (sumreconoiseHB3 / nsumreconoiseHB3);
15621  } // phi
15622  // reconoisevarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
15623  for (int jphi = 0; jphi < njphi; jphi++) {
15624  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
15625  reconoisevarianceHB[0][jeta][jphi] -= areconoiseHB[0][jeta][jphi] * areconoiseHB[0][jeta][jphi];
15626  reconoisevarianceHB[0][jeta][jphi] = fabs(reconoisevarianceHB[0][jeta][jphi]);
15627  reconoisevarianceHB[1][jeta][jphi] -= areconoiseHB[1][jeta][jphi] * areconoiseHB[1][jeta][jphi];
15628  reconoisevarianceHB[1][jeta][jphi] = fabs(reconoisevarianceHB[1][jeta][jphi]);
15629  reconoisevarianceHB[2][jeta][jphi] -= areconoiseHB[2][jeta][jphi] * areconoiseHB[2][jeta][jphi];
15630  reconoisevarianceHB[2][jeta][jphi] = fabs(reconoisevarianceHB[2][jeta][jphi]);
15631  reconoisevarianceHB[3][jeta][jphi] -= areconoiseHB[3][jeta][jphi] * areconoiseHB[3][jeta][jphi];
15632  reconoisevarianceHB[3][jeta][jphi] = fabs(reconoisevarianceHB[3][jeta][jphi]);
15633  }
15634  }
15635  }
15636  //cout<<" Vaiance: DONE*****" <<endl;
15637  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
15638  //======================================================================
15639  //======================================================================
15640  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
15641  c1x1->Clear();
15643  c1x0->Divide(1, 1);
15644  c1x0->cd(1);
15645  TH2F *DefzDreconoiseHB42D = new TH2F("DefzDreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
15646  TH2F *DefzDreconoiseHB42D0 = new TH2F("DefzDreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
15647  TH2F *DefzDreconoiseHB42DF = (TH2F *)DefzDreconoiseHB42D0->Clone("DefzDreconoiseHB42DF");
15648  for (int i = 0; i < ndepth; i++) {
15649  for (int jeta = 0; jeta < neta; jeta++) {
15650  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
15651  for (int jphi = 0; jphi < nphi; jphi++) {
15652  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15653  int k2plot = jeta - 41;
15654  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
15655  if (areconoiseHB[i][jeta][jphi] > 0.) {
15656  DefzDreconoiseHB42D->Fill(kkk, jphi, ccc1);
15657  DefzDreconoiseHB42D0->Fill(kkk, jphi, 1.);
15658  }
15659  }
15660  }
15661  }
15662  }
15663  DefzDreconoiseHB42DF->Divide(DefzDreconoiseHB42D, DefzDreconoiseHB42D0, 1, 1, "B"); // average A
15664  // DefzDreconoiseHB1->Sumw2();
15665  gPad->SetGridy();
15666  gPad->SetGridx(); // gPad->SetLogz();
15667  DefzDreconoiseHB42DF->SetMarkerStyle(20);
15668  DefzDreconoiseHB42DF->SetMarkerSize(0.4);
15669  DefzDreconoiseHB42DF->GetZaxis()->SetLabelSize(0.08);
15670  DefzDreconoiseHB42DF->SetXTitle("<D>_depth #eta \b");
15671  DefzDreconoiseHB42DF->SetYTitle(" #phi \b");
15672  DefzDreconoiseHB42DF->SetZTitle("<D>_depth \b");
15673  DefzDreconoiseHB42DF->SetMarkerColor(2);
15674  DefzDreconoiseHB42DF->SetLineColor(
15675  0); // DefzDreconoiseHB42DF->SetMaximum(1.000); // DefzDreconoiseHB42DF->SetMinimum(1.0);
15676  DefzDreconoiseHB42DF->Draw("COLZ");
15678  c1x0->Update();
15679  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHB.png");
15680  c1x0->Clear();
15681  // clean-up
15682  if (DefzDreconoiseHB42D)
15683  delete DefzDreconoiseHB42D;
15684  if (DefzDreconoiseHB42D0)
15685  delete DefzDreconoiseHB42D0;
15686  if (DefzDreconoiseHB42DF)
15687  delete DefzDreconoiseHB42DF;
15688  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
15689  //======================================================================
15690  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
15691  c1x1->Clear();
15693  c1x1->Divide(1, 1);
15694  c1x1->cd(1);
15695  TH1F *DefzDreconoiseHB41D = new TH1F("DefzDreconoiseHB41D", "", nphi, 0., 72.);
15696  TH1F *DefzDreconoiseHB41D0 = new TH1F("DefzDreconoiseHB41D0", "", nphi, 0., 72.);
15697  TH1F *DefzDreconoiseHB41DF = (TH1F *)DefzDreconoiseHB41D0->Clone("DefzDreconoiseHB41DF");
15698 
15699  for (int jphi = 0; jphi < nphi; jphi++) {
15700  for (int jeta = 0; jeta < neta; jeta++) {
15701  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
15702  for (int i = 0; i < ndepth; i++) {
15703  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15704  if (areconoiseHB[i][jeta][jphi] > 0.) {
15705  DefzDreconoiseHB41D->Fill(jphi, ccc1);
15706  DefzDreconoiseHB41D0->Fill(jphi, 1.);
15707  }
15708  }
15709  }
15710  }
15711  }
15712  // DefzDreconoiseHB41D->Sumw2();DefzDreconoiseHB41D0->Sumw2();
15713 
15714  DefzDreconoiseHB41DF->Divide(DefzDreconoiseHB41D, DefzDreconoiseHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
15715  DefzDreconoiseHB41D0->Sumw2();
15716  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHB41DF->SetBinError(jphi,0.01);}
15717  gPad->SetGridy();
15718  gPad->SetGridx(); // gPad->SetLogz();
15719  DefzDreconoiseHB41DF->SetMarkerStyle(20);
15720  DefzDreconoiseHB41DF->SetMarkerSize(1.4);
15721  DefzDreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
15722  DefzDreconoiseHB41DF->SetXTitle("#phi \b");
15723  DefzDreconoiseHB41DF->SetYTitle(" <D> \b");
15724  DefzDreconoiseHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
15725  DefzDreconoiseHB41DF->SetMarkerColor(4);
15726  DefzDreconoiseHB41DF->SetLineColor(
15727  4); //DefzDreconoiseHB41DF->SetMinimum(0.8); DefzDreconoiseHB41DF->SetMinimum(-0.015);
15728  DefzDreconoiseHB41DF->Draw("Error");
15730  c1x1->Update();
15731  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHB.png");
15732  c1x1->Clear();
15733  // clean-up
15734  if (DefzDreconoiseHB41D)
15735  delete DefzDreconoiseHB41D;
15736  if (DefzDreconoiseHB41D0)
15737  delete DefzDreconoiseHB41D0;
15738  if (DefzDreconoiseHB41DF)
15739  delete DefzDreconoiseHB41DF;
15740 
15741  //========================================================================================== 14
15742  //======================================================================
15743  //======================================================================1D plot: D vs phi , different eta, depth=1
15744  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
15745  c3x5->Clear();
15747  c3x5->Divide(4, 4);
15748  c3x5->cd(1);
15749  int kcountHBpositivedirectionReconoiseD1 = 1;
15750  TH1F *h2CeffHBpositivedirectionReconoiseD1 = new TH1F("h2CeffHBpositivedirectionReconoiseD1", "", nphi, 0., 72.);
15751 
15752  for (int jeta = 0; jeta < njeta; jeta++) {
15753  // positivedirectionReconoiseD:
15754  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15755  // for (int i=0;i<ndepth;i++) {
15756  // depth=1
15757  for (int i = 0; i < 1; i++) {
15758  TH1F *HBpositivedirectionReconoiseD1 = (TH1F *)h2CeffHBpositivedirectionReconoiseD1->Clone("twod1");
15759 
15760  float ccctest = 0; // to avoid empty massive elements
15761  for (int jphi = 0; jphi < nphi; jphi++) {
15762  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15763  if (areconoiseHB[i][jeta][jphi] > 0.) {
15764  HBpositivedirectionReconoiseD1->Fill(jphi, ccc1);
15765  ccctest = 1.; //HBpositivedirectionReconoiseD1->SetBinError(i,0.01);
15766  }
15767  } // for jphi
15768  if (ccctest > 0.) {
15769  //cout<<"1414 kcountHBpositivedirectionReconoiseD1 = "<<kcountHBpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
15770  c3x5->cd(kcountHBpositivedirectionReconoiseD1);
15771  HBpositivedirectionReconoiseD1->SetMarkerStyle(20);
15772  HBpositivedirectionReconoiseD1->SetMarkerSize(0.4);
15773  HBpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
15774  HBpositivedirectionReconoiseD1->SetXTitle("HBpositivedirectionReconoiseD1 \b");
15775  HBpositivedirectionReconoiseD1->SetMarkerColor(2);
15776  HBpositivedirectionReconoiseD1->SetLineColor(0);
15777  gPad->SetGridy();
15778  gPad->SetGridx();
15779  // gPad->SetLogy();
15780  if (kcountHBpositivedirectionReconoiseD1 == 1)
15781  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
15782  if (kcountHBpositivedirectionReconoiseD1 == 2)
15783  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
15784  if (kcountHBpositivedirectionReconoiseD1 == 3)
15785  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
15786  if (kcountHBpositivedirectionReconoiseD1 == 4)
15787  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
15788  if (kcountHBpositivedirectionReconoiseD1 == 5)
15789  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
15790  if (kcountHBpositivedirectionReconoiseD1 == 6)
15791  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
15792  if (kcountHBpositivedirectionReconoiseD1 == 7)
15793  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
15794  if (kcountHBpositivedirectionReconoiseD1 == 8)
15795  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
15796  if (kcountHBpositivedirectionReconoiseD1 == 9)
15797  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
15798  if (kcountHBpositivedirectionReconoiseD1 == 10)
15799  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
15800  if (kcountHBpositivedirectionReconoiseD1 == 11)
15801  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
15802  if (kcountHBpositivedirectionReconoiseD1 == 12)
15803  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
15804  if (kcountHBpositivedirectionReconoiseD1 == 13)
15805  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
15806  if (kcountHBpositivedirectionReconoiseD1 == 14)
15807  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
15808  if (kcountHBpositivedirectionReconoiseD1 == 15)
15809  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
15810  if (kcountHBpositivedirectionReconoiseD1 == 16)
15811  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
15812  HBpositivedirectionReconoiseD1->Draw("Error");
15813  kcountHBpositivedirectionReconoiseD1++;
15814  if (kcountHBpositivedirectionReconoiseD1 > 16)
15815  break; // 4x6 = 24
15816  } //ccctest>0
15817 
15818  } // for i
15819  } //if(jeta-41 >= 0)
15820  } //for jeta
15822  c3x5->Update();
15823  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
15824  c3x5->Clear();
15825  // clean-up
15826  if (h2CeffHBpositivedirectionReconoiseD1)
15827  delete h2CeffHBpositivedirectionReconoiseD1;
15828  //========================================================================================== 15
15829  //======================================================================
15830  //======================================================================1D plot: D vs phi , different eta, depth=2
15831  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
15832  c3x5->Clear();
15833  c3x5->Divide(4, 4);
15834  c3x5->cd(1);
15835  int kcountHBpositivedirectionReconoiseD2 = 1;
15836  TH1F *h2CeffHBpositivedirectionReconoiseD2 = new TH1F("h2CeffHBpositivedirectionReconoiseD2", "", nphi, 0., 72.);
15837 
15838  for (int jeta = 0; jeta < njeta; jeta++) {
15839  // positivedirectionReconoiseD:
15840  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15841  // for (int i=0;i<ndepth;i++) {
15842  // depth=2
15843  for (int i = 1; i < 2; i++) {
15844  TH1F *HBpositivedirectionReconoiseD2 = (TH1F *)h2CeffHBpositivedirectionReconoiseD2->Clone("twod1");
15845 
15846  float ccctest = 0; // to avoid empty massive elements
15847  for (int jphi = 0; jphi < nphi; jphi++) {
15848  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15849  if (areconoiseHB[i][jeta][jphi] > 0.) {
15850  HBpositivedirectionReconoiseD2->Fill(jphi, ccc1);
15851  ccctest = 1.; //HBpositivedirectionReconoiseD2->SetBinError(i,0.01);
15852  }
15853  } // for jphi
15854  if (ccctest > 0.) {
15855  //cout<<"1515 kcountHBpositivedirectionReconoiseD2 = "<<kcountHBpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
15856  c3x5->cd(kcountHBpositivedirectionReconoiseD2);
15857  HBpositivedirectionReconoiseD2->SetMarkerStyle(20);
15858  HBpositivedirectionReconoiseD2->SetMarkerSize(0.4);
15859  HBpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
15860  HBpositivedirectionReconoiseD2->SetXTitle("HBpositivedirectionReconoiseD2 \b");
15861  HBpositivedirectionReconoiseD2->SetMarkerColor(2);
15862  HBpositivedirectionReconoiseD2->SetLineColor(0);
15863  gPad->SetGridy();
15864  gPad->SetGridx();
15865  // gPad->SetLogy();
15866  if (kcountHBpositivedirectionReconoiseD2 == 1)
15867  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
15868  if (kcountHBpositivedirectionReconoiseD2 == 2)
15869  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
15870  if (kcountHBpositivedirectionReconoiseD2 == 3)
15871  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
15872  if (kcountHBpositivedirectionReconoiseD2 == 4)
15873  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
15874  if (kcountHBpositivedirectionReconoiseD2 == 5)
15875  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
15876  if (kcountHBpositivedirectionReconoiseD2 == 6)
15877  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
15878  if (kcountHBpositivedirectionReconoiseD2 == 7)
15879  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
15880  if (kcountHBpositivedirectionReconoiseD2 == 8)
15881  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
15882  if (kcountHBpositivedirectionReconoiseD2 == 9)
15883  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
15884  if (kcountHBpositivedirectionReconoiseD2 == 10)
15885  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
15886  if (kcountHBpositivedirectionReconoiseD2 == 11)
15887  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
15888  if (kcountHBpositivedirectionReconoiseD2 == 12)
15889  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
15890  if (kcountHBpositivedirectionReconoiseD2 == 13)
15891  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
15892  if (kcountHBpositivedirectionReconoiseD2 == 14)
15893  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
15894  if (kcountHBpositivedirectionReconoiseD2 == 15)
15895  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
15896  if (kcountHBpositivedirectionReconoiseD2 == 16)
15897  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
15898  HBpositivedirectionReconoiseD2->Draw("Error");
15899  kcountHBpositivedirectionReconoiseD2++;
15900  if (kcountHBpositivedirectionReconoiseD2 > 16)
15901  break; // 4x6 = 24
15902  } //ccctest>0
15903 
15904  } // for i
15905  } //if(jeta-41 >= 0)
15906  } //for jeta
15908  c3x5->Update();
15909  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
15910  c3x5->Clear();
15911  // clean-up
15912  if (h2CeffHBpositivedirectionReconoiseD2)
15913  delete h2CeffHBpositivedirectionReconoiseD2;
15914  //========================================================================================== 16
15915  //======================================================================
15916  //======================================================================1D plot: D vs phi , different eta, depth=3
15917  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
15918  c3x5->Clear();
15919  c3x5->Divide(4, 4);
15920  c3x5->cd(1);
15921  int kcountHBpositivedirectionReconoiseD3 = 1;
15922  TH1F *h2CeffHBpositivedirectionReconoiseD3 = new TH1F("h2CeffHBpositivedirectionReconoiseD3", "", nphi, 0., 72.);
15923 
15924  for (int jeta = 0; jeta < njeta; jeta++) {
15925  // positivedirectionReconoiseD:
15926  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15927  // for (int i=0;i<ndepth;i++) {
15928  // depth=3
15929  for (int i = 2; i < 3; i++) {
15930  TH1F *HBpositivedirectionReconoiseD3 = (TH1F *)h2CeffHBpositivedirectionReconoiseD3->Clone("twod1");
15931 
15932  float ccctest = 0; // to avoid empty massive elements
15933  for (int jphi = 0; jphi < nphi; jphi++) {
15934  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15935  if (areconoiseHB[i][jeta][jphi] > 0.) {
15936  HBpositivedirectionReconoiseD3->Fill(jphi, ccc1);
15937  ccctest = 1.; //HBpositivedirectionReconoiseD3->SetBinError(i,0.01);
15938  }
15939  } // for jphi
15940  if (ccctest > 0.) {
15941  //cout<<"1616 kcountHBpositivedirectionReconoiseD3 = "<<kcountHBpositivedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
15942  c3x5->cd(kcountHBpositivedirectionReconoiseD3);
15943  HBpositivedirectionReconoiseD3->SetMarkerStyle(20);
15944  HBpositivedirectionReconoiseD3->SetMarkerSize(0.4);
15945  HBpositivedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
15946  HBpositivedirectionReconoiseD3->SetXTitle("HBpositivedirectionReconoiseD3 \b");
15947  HBpositivedirectionReconoiseD3->SetMarkerColor(2);
15948  HBpositivedirectionReconoiseD3->SetLineColor(0);
15949  gPad->SetGridy();
15950  gPad->SetGridx();
15951  // gPad->SetLogy();
15952  if (kcountHBpositivedirectionReconoiseD3 == 1)
15953  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
15954  if (kcountHBpositivedirectionReconoiseD3 == 2)
15955  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
15956  if (kcountHBpositivedirectionReconoiseD3 == 3)
15957  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
15958  if (kcountHBpositivedirectionReconoiseD3 == 4)
15959  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
15960  if (kcountHBpositivedirectionReconoiseD3 == 5)
15961  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
15962  if (kcountHBpositivedirectionReconoiseD3 == 6)
15963  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
15964  if (kcountHBpositivedirectionReconoiseD3 == 7)
15965  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
15966  if (kcountHBpositivedirectionReconoiseD3 == 8)
15967  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
15968  if (kcountHBpositivedirectionReconoiseD3 == 9)
15969  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
15970  if (kcountHBpositivedirectionReconoiseD3 == 10)
15971  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
15972  if (kcountHBpositivedirectionReconoiseD3 == 11)
15973  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
15974  if (kcountHBpositivedirectionReconoiseD3 == 12)
15975  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
15976  if (kcountHBpositivedirectionReconoiseD3 == 13)
15977  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
15978  if (kcountHBpositivedirectionReconoiseD3 == 14)
15979  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
15980  if (kcountHBpositivedirectionReconoiseD3 == 15)
15981  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
15982  if (kcountHBpositivedirectionReconoiseD3 == 16)
15983  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
15984  HBpositivedirectionReconoiseD3->Draw("Error");
15985  kcountHBpositivedirectionReconoiseD3++;
15986  if (kcountHBpositivedirectionReconoiseD3 > 16)
15987  break; // 4x6 = 24
15988  } //ccctest>0
15989 
15990  } // for i
15991  } //if(jeta-41 >= 0)
15992  } //for jeta
15994  c3x5->Update();
15995  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
15996  c3x5->Clear();
15997  // clean-up
15998  if (h2CeffHBpositivedirectionReconoiseD3)
15999  delete h2CeffHBpositivedirectionReconoiseD3;
16000  //========================================================================================== 17
16001  //======================================================================
16002  //======================================================================1D plot: D vs phi , different eta, depth=4
16003  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
16004  c3x5->Clear();
16005  c3x5->Divide(4, 4);
16006  c3x5->cd(1);
16007  int kcountHBpositivedirectionReconoiseD4 = 1;
16008  TH1F *h2CeffHBpositivedirectionReconoiseD4 = new TH1F("h2CeffHBpositivedirectionReconoiseD4", "", nphi, 0., 72.);
16009 
16010  for (int jeta = 0; jeta < njeta; jeta++) {
16011  // positivedirectionReconoiseD:
16012  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
16013  // for (int i=0;i<ndepth;i++) {
16014  // depth=4
16015  for (int i = 3; i < 4; i++) {
16016  TH1F *HBpositivedirectionReconoiseD4 = (TH1F *)h2CeffHBpositivedirectionReconoiseD4->Clone("twod1");
16017 
16018  float ccctest = 0; // to avoid empty massive elements
16019  for (int jphi = 0; jphi < nphi; jphi++) {
16020  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16021  if (areconoiseHB[i][jeta][jphi] > 0.) {
16022  HBpositivedirectionReconoiseD4->Fill(jphi, ccc1);
16023  ccctest = 1.; //HBpositivedirectionReconoiseD4->SetBinError(i,0.01);
16024  }
16025  } // for jphi
16026  if (ccctest > 0.) {
16027  //cout<<"1717 kcountHBpositivedirectionReconoiseD4 = "<<kcountHBpositivedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
16028  c3x5->cd(kcountHBpositivedirectionReconoiseD4);
16029  HBpositivedirectionReconoiseD4->SetMarkerStyle(20);
16030  HBpositivedirectionReconoiseD4->SetMarkerSize(0.4);
16031  HBpositivedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
16032  HBpositivedirectionReconoiseD4->SetXTitle("HBpositivedirectionReconoiseD4 \b");
16033  HBpositivedirectionReconoiseD4->SetMarkerColor(2);
16034  HBpositivedirectionReconoiseD4->SetLineColor(0);
16035  gPad->SetGridy();
16036  gPad->SetGridx();
16037  // gPad->SetLogy();
16038  if (kcountHBpositivedirectionReconoiseD4 == 1)
16039  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
16040  if (kcountHBpositivedirectionReconoiseD4 == 2)
16041  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
16042  if (kcountHBpositivedirectionReconoiseD4 == 3)
16043  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
16044  if (kcountHBpositivedirectionReconoiseD4 == 4)
16045  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
16046  if (kcountHBpositivedirectionReconoiseD4 == 5)
16047  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
16048  if (kcountHBpositivedirectionReconoiseD4 == 6)
16049  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
16050  if (kcountHBpositivedirectionReconoiseD4 == 7)
16051  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
16052  if (kcountHBpositivedirectionReconoiseD4 == 8)
16053  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
16054  if (kcountHBpositivedirectionReconoiseD4 == 9)
16055  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
16056  if (kcountHBpositivedirectionReconoiseD4 == 10)
16057  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
16058  if (kcountHBpositivedirectionReconoiseD4 == 11)
16059  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
16060  if (kcountHBpositivedirectionReconoiseD4 == 12)
16061  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
16062  if (kcountHBpositivedirectionReconoiseD4 == 13)
16063  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
16064  if (kcountHBpositivedirectionReconoiseD4 == 14)
16065  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
16066  if (kcountHBpositivedirectionReconoiseD4 == 15)
16067  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
16068  if (kcountHBpositivedirectionReconoiseD4 == 16)
16069  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
16070  HBpositivedirectionReconoiseD4->Draw("Error");
16071  kcountHBpositivedirectionReconoiseD4++;
16072  if (kcountHBpositivedirectionReconoiseD4 > 16)
16073  break; // 4x6 = 24
16074  } //ccctest>0
16075 
16076  } // for i
16077  } //if(jeta-41 >= 0)
16078  } //for jeta
16080  c3x5->Update();
16081  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
16082  c3x5->Clear();
16083  // clean-up
16084  if (h2CeffHBpositivedirectionReconoiseD4)
16085  delete h2CeffHBpositivedirectionReconoiseD4;
16086 
16087  //========================================================================================== 22214
16088  //======================================================================
16089  //======================================================================1D plot: D vs phi , different eta, depth=1
16090  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
16091  c3x5->Clear();
16093  c3x5->Divide(4, 4);
16094  c3x5->cd(1);
16095  int kcountHBnegativedirectionReconoiseD1 = 1;
16096  TH1F *h2CeffHBnegativedirectionReconoiseD1 = new TH1F("h2CeffHBnegativedirectionReconoiseD1", "", nphi, 0., 72.);
16097 
16098  for (int jeta = 0; jeta < njeta; jeta++) {
16099  // negativedirectionReconoiseD:
16100  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16101  // for (int i=0;i<ndepth;i++) {
16102  // depth=1
16103  for (int i = 0; i < 1; i++) {
16104  TH1F *HBnegativedirectionReconoiseD1 = (TH1F *)h2CeffHBnegativedirectionReconoiseD1->Clone("twod1");
16105 
16106  float ccctest = 0; // to avoid empty massive elements
16107  for (int jphi = 0; jphi < nphi; jphi++) {
16108  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16109  if (areconoiseHB[i][jeta][jphi] > 0.) {
16110  HBnegativedirectionReconoiseD1->Fill(jphi, ccc1);
16111  ccctest = 1.; //HBnegativedirectionReconoiseD1->SetBinError(i,0.01);
16112  }
16113  } // for jphi
16114  if (ccctest > 0.) {
16115  //cout<<"1414 kcountHBnegativedirectionReconoiseD1 = "<<kcountHBnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
16116  c3x5->cd(kcountHBnegativedirectionReconoiseD1);
16117  HBnegativedirectionReconoiseD1->SetMarkerStyle(20);
16118  HBnegativedirectionReconoiseD1->SetMarkerSize(0.4);
16119  HBnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
16120  HBnegativedirectionReconoiseD1->SetXTitle("HBnegativedirectionReconoiseD1 \b");
16121  HBnegativedirectionReconoiseD1->SetMarkerColor(2);
16122  HBnegativedirectionReconoiseD1->SetLineColor(0);
16123  gPad->SetGridy();
16124  gPad->SetGridx();
16125  // gPad->SetLogy();
16126  if (kcountHBnegativedirectionReconoiseD1 == 1)
16127  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-16; depth = 1 \b");
16128  if (kcountHBnegativedirectionReconoiseD1 == 2)
16129  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-15; depth = 1 \b");
16130  if (kcountHBnegativedirectionReconoiseD1 == 3)
16131  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-14; depth = 1 \b");
16132  if (kcountHBnegativedirectionReconoiseD1 == 4)
16133  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-13; depth = 1 \b");
16134  if (kcountHBnegativedirectionReconoiseD1 == 5)
16135  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-12; depth = 1 \b");
16136  if (kcountHBnegativedirectionReconoiseD1 == 6)
16137  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-11; depth = 1 \b");
16138  if (kcountHBnegativedirectionReconoiseD1 == 7)
16139  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-10; depth = 1 \b");
16140  if (kcountHBnegativedirectionReconoiseD1 == 8)
16141  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-9; depth = 1 \b");
16142  if (kcountHBnegativedirectionReconoiseD1 == 9)
16143  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-8; depth = 1 \b");
16144  if (kcountHBnegativedirectionReconoiseD1 == 10)
16145  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-7; depth = 1 \b");
16146  if (kcountHBnegativedirectionReconoiseD1 == 11)
16147  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-6; depth = 1 \b");
16148  if (kcountHBnegativedirectionReconoiseD1 == 12)
16149  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-5; depth = 1 \b");
16150  if (kcountHBnegativedirectionReconoiseD1 == 13)
16151  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-4; depth = 1 \b");
16152  if (kcountHBnegativedirectionReconoiseD1 == 14)
16153  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-3; depth = 1 \b");
16154  if (kcountHBnegativedirectionReconoiseD1 == 15)
16155  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-2; depth = 1 \b");
16156  if (kcountHBnegativedirectionReconoiseD1 == 16)
16157  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-1; depth = 1 \b");
16158  HBnegativedirectionReconoiseD1->Draw("Error");
16159  kcountHBnegativedirectionReconoiseD1++;
16160  if (kcountHBnegativedirectionReconoiseD1 > 16)
16161  break; // 4x6 = 24
16162  } //ccctest>0
16163 
16164  } // for i
16165  } //if(jeta-41 < 0)
16166  } //for jeta
16168  c3x5->Update();
16169  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
16170  c3x5->Clear();
16171  // clean-up
16172  if (h2CeffHBnegativedirectionReconoiseD1)
16173  delete h2CeffHBnegativedirectionReconoiseD1;
16174  //========================================================================================== 22215
16175  //======================================================================
16176  //======================================================================1D plot: D vs phi , different eta, depth=2
16177  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
16178  c3x5->Clear();
16179  c3x5->Divide(4, 4);
16180  c3x5->cd(1);
16181  int kcountHBnegativedirectionReconoiseD2 = 1;
16182  TH1F *h2CeffHBnegativedirectionReconoiseD2 = new TH1F("h2CeffHBnegativedirectionReconoiseD2", "", nphi, 0., 72.);
16183 
16184  for (int jeta = 0; jeta < njeta; jeta++) {
16185  // negativedirectionReconoiseD:
16186  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16187  // for (int i=0;i<ndepth;i++) {
16188  // depth=2
16189  for (int i = 1; i < 2; i++) {
16190  TH1F *HBnegativedirectionReconoiseD2 = (TH1F *)h2CeffHBnegativedirectionReconoiseD2->Clone("twod1");
16191 
16192  float ccctest = 0; // to avoid empty massive elements
16193  for (int jphi = 0; jphi < nphi; jphi++) {
16194  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16195  if (areconoiseHB[i][jeta][jphi] > 0.) {
16196  HBnegativedirectionReconoiseD2->Fill(jphi, ccc1);
16197  ccctest = 1.; //HBnegativedirectionReconoiseD2->SetBinError(i,0.01);
16198  }
16199  } // for jphi
16200  if (ccctest > 0.) {
16201  //cout<<"1515 kcountHBnegativedirectionReconoiseD2 = "<<kcountHBnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
16202  c3x5->cd(kcountHBnegativedirectionReconoiseD2);
16203  HBnegativedirectionReconoiseD2->SetMarkerStyle(20);
16204  HBnegativedirectionReconoiseD2->SetMarkerSize(0.4);
16205  HBnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
16206  HBnegativedirectionReconoiseD2->SetXTitle("HBnegativedirectionReconoiseD2 \b");
16207  HBnegativedirectionReconoiseD2->SetMarkerColor(2);
16208  HBnegativedirectionReconoiseD2->SetLineColor(0);
16209  gPad->SetGridy();
16210  gPad->SetGridx();
16211  // gPad->SetLogy();
16212  if (kcountHBnegativedirectionReconoiseD2 == 1)
16213  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
16214  if (kcountHBnegativedirectionReconoiseD2 == 2)
16215  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
16216  if (kcountHBnegativedirectionReconoiseD2 == 3)
16217  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
16218  if (kcountHBnegativedirectionReconoiseD2 == 4)
16219  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
16220  if (kcountHBnegativedirectionReconoiseD2 == 5)
16221  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
16222  if (kcountHBnegativedirectionReconoiseD2 == 6)
16223  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
16224  if (kcountHBnegativedirectionReconoiseD2 == 7)
16225  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
16226  if (kcountHBnegativedirectionReconoiseD2 == 8)
16227  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-9; depth = 2 \b");
16228  if (kcountHBnegativedirectionReconoiseD2 == 9)
16229  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-8; depth = 2 \b");
16230  if (kcountHBnegativedirectionReconoiseD2 == 10)
16231  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-7; depth = 2 \b");
16232  if (kcountHBnegativedirectionReconoiseD2 == 11)
16233  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-6; depth = 2 \b");
16234  if (kcountHBnegativedirectionReconoiseD2 == 12)
16235  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-5; depth = 2 \b");
16236  if (kcountHBnegativedirectionReconoiseD2 == 13)
16237  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-4; depth = 2 \b");
16238  if (kcountHBnegativedirectionReconoiseD2 == 14)
16239  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-3; depth = 2 \b");
16240  if (kcountHBnegativedirectionReconoiseD2 == 15)
16241  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-2; depth = 2 \b");
16242  if (kcountHBnegativedirectionReconoiseD2 == 16)
16243  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-1; depth = 2 \b");
16244  HBnegativedirectionReconoiseD2->Draw("Error");
16245  kcountHBnegativedirectionReconoiseD2++;
16246  if (kcountHBnegativedirectionReconoiseD2 > 16)
16247  break; // 4x6 = 24
16248  } //ccctest>0
16249 
16250  } // for i
16251  } //if(jeta-41 < 0)
16252  } //for jeta
16254  c3x5->Update();
16255  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
16256  c3x5->Clear();
16257  // clean-up
16258  if (h2CeffHBnegativedirectionReconoiseD2)
16259  delete h2CeffHBnegativedirectionReconoiseD2;
16260  //========================================================================================== 22216
16261  //======================================================================
16262  //======================================================================1D plot: D vs phi , different eta, depth=3
16263  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
16264  c3x5->Clear();
16265  c3x5->Divide(4, 4);
16266  c3x5->cd(1);
16267  int kcountHBnegativedirectionReconoiseD3 = 1;
16268  TH1F *h2CeffHBnegativedirectionReconoiseD3 = new TH1F("h2CeffHBnegativedirectionReconoiseD3", "", nphi, 0., 72.);
16269 
16270  for (int jeta = 0; jeta < njeta; jeta++) {
16271  // negativedirectionReconoiseD:
16272  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16273  // for (int i=0;i<ndepth;i++) {
16274  // depth=3
16275  for (int i = 2; i < 3; i++) {
16276  TH1F *HBnegativedirectionReconoiseD3 = (TH1F *)h2CeffHBnegativedirectionReconoiseD3->Clone("twod1");
16277 
16278  float ccctest = 0; // to avoid empty massive elements
16279  for (int jphi = 0; jphi < nphi; jphi++) {
16280  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16281  if (areconoiseHB[i][jeta][jphi] > 0.) {
16282  HBnegativedirectionReconoiseD3->Fill(jphi, ccc1);
16283  ccctest = 1.; //HBnegativedirectionReconoiseD3->SetBinError(i,0.01);
16284  }
16285  } // for jphi
16286  if (ccctest > 0.) {
16287  //cout<<"1616 kcountHBnegativedirectionReconoiseD3 = "<<kcountHBnegativedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
16288  c3x5->cd(kcountHBnegativedirectionReconoiseD3);
16289  HBnegativedirectionReconoiseD3->SetMarkerStyle(20);
16290  HBnegativedirectionReconoiseD3->SetMarkerSize(0.4);
16291  HBnegativedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
16292  HBnegativedirectionReconoiseD3->SetXTitle("HBnegativedirectionReconoiseD3 \b");
16293  HBnegativedirectionReconoiseD3->SetMarkerColor(2);
16294  HBnegativedirectionReconoiseD3->SetLineColor(0);
16295  gPad->SetGridy();
16296  gPad->SetGridx();
16297  // gPad->SetLogy();
16298  if (kcountHBnegativedirectionReconoiseD3 == 1)
16299  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
16300  if (kcountHBnegativedirectionReconoiseD3 == 2)
16301  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
16302  if (kcountHBnegativedirectionReconoiseD3 == 3)
16303  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
16304  if (kcountHBnegativedirectionReconoiseD3 == 4)
16305  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
16306  if (kcountHBnegativedirectionReconoiseD3 == 5)
16307  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
16308  if (kcountHBnegativedirectionReconoiseD3 == 6)
16309  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
16310  if (kcountHBnegativedirectionReconoiseD3 == 7)
16311  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
16312  if (kcountHBnegativedirectionReconoiseD3 == 8)
16313  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-9; depth = 3 \b");
16314  if (kcountHBnegativedirectionReconoiseD3 == 9)
16315  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-8; depth = 3 \b");
16316  if (kcountHBnegativedirectionReconoiseD3 == 10)
16317  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-7; depth = 3 \b");
16318  if (kcountHBnegativedirectionReconoiseD3 == 11)
16319  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-6; depth = 3 \b");
16320  if (kcountHBnegativedirectionReconoiseD3 == 12)
16321  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-5; depth = 3 \b");
16322  if (kcountHBnegativedirectionReconoiseD3 == 13)
16323  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-4; depth = 3 \b");
16324  if (kcountHBnegativedirectionReconoiseD3 == 14)
16325  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-3; depth = 3 \b");
16326  if (kcountHBnegativedirectionReconoiseD3 == 15)
16327  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-2; depth = 3 \b");
16328  if (kcountHBnegativedirectionReconoiseD3 == 16)
16329  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-1; depth = 3 \b");
16330  HBnegativedirectionReconoiseD3->Draw("Error");
16331  kcountHBnegativedirectionReconoiseD3++;
16332  if (kcountHBnegativedirectionReconoiseD3 > 16)
16333  break; // 4x6 = 24
16334  } //ccctest>0
16335 
16336  } // for i
16337  } //if(jeta-41 < 0)
16338  } //for jeta
16340  c3x5->Update();
16341  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
16342  c3x5->Clear();
16343  // clean-up
16344  if (h2CeffHBnegativedirectionReconoiseD3)
16345  delete h2CeffHBnegativedirectionReconoiseD3;
16346  //========================================================================================== 22217
16347  //======================================================================
16348  //======================================================================1D plot: D vs phi , different eta, depth=4
16349  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
16350  c3x5->Clear();
16351  c3x5->Divide(4, 4);
16352  c3x5->cd(1);
16353  int kcountHBnegativedirectionReconoiseD4 = 1;
16354  TH1F *h2CeffHBnegativedirectionReconoiseD4 = new TH1F("h2CeffHBnegativedirectionReconoiseD4", "", nphi, 0., 72.);
16355 
16356  for (int jeta = 0; jeta < njeta; jeta++) {
16357  // negativedirectionReconoiseD:
16358  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16359  // for (int i=0;i<ndepth;i++) {
16360  // depth=4
16361  for (int i = 3; i < 4; i++) {
16362  TH1F *HBnegativedirectionReconoiseD4 = (TH1F *)h2CeffHBnegativedirectionReconoiseD4->Clone("twod1");
16363 
16364  float ccctest = 0; // to avoid empty massive elements
16365  for (int jphi = 0; jphi < nphi; jphi++) {
16366  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16367  if (areconoiseHB[i][jeta][jphi] > 0.) {
16368  HBnegativedirectionReconoiseD4->Fill(jphi, ccc1);
16369  ccctest = 1.; //HBnegativedirectionReconoiseD4->SetBinError(i,0.01);
16370  }
16371  } // for jphi
16372  if (ccctest > 0.) {
16373  //cout<<"1717 kcountHBnegativedirectionReconoiseD4 = "<<kcountHBnegativedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
16374  c3x5->cd(kcountHBnegativedirectionReconoiseD4);
16375  HBnegativedirectionReconoiseD4->SetMarkerStyle(20);
16376  HBnegativedirectionReconoiseD4->SetMarkerSize(0.4);
16377  HBnegativedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
16378  HBnegativedirectionReconoiseD4->SetXTitle("HBnegativedirectionReconoiseD4 \b");
16379  HBnegativedirectionReconoiseD4->SetMarkerColor(2);
16380  HBnegativedirectionReconoiseD4->SetLineColor(0);
16381  gPad->SetGridy();
16382  gPad->SetGridx();
16383  // gPad->SetLogy();
16384  if (kcountHBnegativedirectionReconoiseD4 == 1)
16385  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
16386  if (kcountHBnegativedirectionReconoiseD4 == 2)
16387  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
16388  if (kcountHBnegativedirectionReconoiseD4 == 3)
16389  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
16390  if (kcountHBnegativedirectionReconoiseD4 == 4)
16391  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
16392  if (kcountHBnegativedirectionReconoiseD4 == 5)
16393  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
16394  if (kcountHBnegativedirectionReconoiseD4 == 6)
16395  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
16396  if (kcountHBnegativedirectionReconoiseD4 == 7)
16397  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
16398  if (kcountHBnegativedirectionReconoiseD4 == 8)
16399  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-9; depth = 4 \b");
16400  if (kcountHBnegativedirectionReconoiseD4 == 9)
16401  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-8; depth = 4 \b");
16402  if (kcountHBnegativedirectionReconoiseD4 == 10)
16403  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-7; depth = 4 \b");
16404  if (kcountHBnegativedirectionReconoiseD4 == 11)
16405  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-6; depth = 4 \b");
16406  if (kcountHBnegativedirectionReconoiseD4 == 12)
16407  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-5; depth = 4 \b");
16408  if (kcountHBnegativedirectionReconoiseD4 == 13)
16409  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-4; depth = 4 \b");
16410  if (kcountHBnegativedirectionReconoiseD4 == 14)
16411  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-3; depth = 4 \b");
16412  if (kcountHBnegativedirectionReconoiseD4 == 15)
16413  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-2; depth = 4 \b");
16414  if (kcountHBnegativedirectionReconoiseD4 == 16)
16415  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-1; depth = 4 \b");
16416  HBnegativedirectionReconoiseD4->Draw("Error");
16417  kcountHBnegativedirectionReconoiseD4++;
16418  if (kcountHBnegativedirectionReconoiseD4 > 16)
16419  break; // 4x6 = 24
16420  } //ccctest>0
16421 
16422  } // for i
16423  } //if(jeta-41 < 0)
16424  } //for jeta
16426  c3x5->Update();
16427  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
16428  c3x5->Clear();
16429  // clean-up
16430  if (h2CeffHBnegativedirectionReconoiseD4)
16431  delete h2CeffHBnegativedirectionReconoiseD4;
16432 
16433  //===================================================================== END of Reconoise HB for phi-symmetry
16434  //===================================================================== END of Reconoise HB for phi-symmetry
16435  //===================================================================== END of Reconoise HB for phi-symmetry
16436 
16440  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
16441  //ndepth = k_max[3];
16442  ndepth = 7;
16443  // const int ndepth = 7;
16444  double areconoisehe[ndepth][njeta][njphi];
16445  double breconoisehe[ndepth][njeta][njphi];
16446  double reconoisevariancehe[ndepth][njeta][njphi];
16448  TH2F *recNoiseEnergy1HE1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HE1");
16449  TH2F *recNoiseEnergy0HE1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE1");
16450  TH2F *recNoiseEnergyHE1 = (TH2F *)recNoiseEnergy1HE1->Clone("recNoiseEnergyHE1");
16451  recNoiseEnergyHE1->Divide(recNoiseEnergy1HE1, recNoiseEnergy0HE1, 1, 1, "B");
16452  TH2F *recNoiseEnergy1HE2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HE2");
16453  TH2F *recNoiseEnergy0HE2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE2");
16454  TH2F *recNoiseEnergyHE2 = (TH2F *)recNoiseEnergy1HE2->Clone("recNoiseEnergyHE2");
16455  recNoiseEnergyHE2->Divide(recNoiseEnergy1HE2, recNoiseEnergy0HE2, 1, 1, "B");
16456  TH2F *recNoiseEnergy1HE3 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HE3");
16457  TH2F *recNoiseEnergy0HE3 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE3");
16458  TH2F *recNoiseEnergyHE3 = (TH2F *)recNoiseEnergy1HE3->Clone("recNoiseEnergyHE3");
16459  recNoiseEnergyHE3->Divide(recNoiseEnergy1HE3, recNoiseEnergy0HE3, 1, 1, "B");
16460  TH2F *recNoiseEnergy1HE4 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HE4");
16461  TH2F *recNoiseEnergy0HE4 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE4");
16462  TH2F *recNoiseEnergyHE4 = (TH2F *)recNoiseEnergy1HE4->Clone("recNoiseEnergyHE4");
16463  recNoiseEnergyHE4->Divide(recNoiseEnergy1HE4, recNoiseEnergy0HE4, 1, 1, "B");
16464  TH2F *recNoiseEnergy1HE5 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HE5");
16465  TH2F *recNoiseEnergy0HE5 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE5");
16466  TH2F *recNoiseEnergyHE5 = (TH2F *)recNoiseEnergy1HE5->Clone("recNoiseEnergyHE5");
16467  recNoiseEnergyHE5->Divide(recNoiseEnergy1HE5, recNoiseEnergy0HE5, 1, 1, "B");
16468  TH2F *recNoiseEnergy1HE6 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HE6");
16469  TH2F *recNoiseEnergy0HE6 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE6");
16470  TH2F *recNoiseEnergyHE6 = (TH2F *)recNoiseEnergy1HE6->Clone("recNoiseEnergyHE6");
16471  recNoiseEnergyHE6->Divide(recNoiseEnergy1HE6, recNoiseEnergy0HE6, 1, 1, "B");
16472  TH2F *recNoiseEnergy1HE7 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HE7");
16473  TH2F *recNoiseEnergy0HE7 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE7");
16474  TH2F *recNoiseEnergyHE7 = (TH2F *)recNoiseEnergy1HE7->Clone("recNoiseEnergyHE7");
16475  recNoiseEnergyHE7->Divide(recNoiseEnergy1HE7, recNoiseEnergy0HE7, 1, 1, "B");
16476  for (int jeta = 0; jeta < njeta; jeta++) {
16477  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
16478  //====================================================================== PHI normalization & put R into massive areconoisehe
16479  //preparation for PHI normalization:
16480  double sumreconoiseHE0 = 0;
16481  int nsumreconoiseHE0 = 0;
16482  double sumreconoiseHE1 = 0;
16483  int nsumreconoiseHE1 = 0;
16484  double sumreconoiseHE2 = 0;
16485  int nsumreconoiseHE2 = 0;
16486  double sumreconoiseHE3 = 0;
16487  int nsumreconoiseHE3 = 0;
16488  double sumreconoiseHE4 = 0;
16489  int nsumreconoiseHE4 = 0;
16490  double sumreconoiseHE5 = 0;
16491  int nsumreconoiseHE5 = 0;
16492  double sumreconoiseHE6 = 0;
16493  int nsumreconoiseHE6 = 0;
16494  for (int jphi = 0; jphi < njphi; jphi++) {
16495  areconoisehe[0][jeta][jphi] = recNoiseEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
16496  areconoisehe[1][jeta][jphi] = recNoiseEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
16497  areconoisehe[2][jeta][jphi] = recNoiseEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
16498  areconoisehe[3][jeta][jphi] = recNoiseEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
16499  areconoisehe[4][jeta][jphi] = recNoiseEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
16500  areconoisehe[5][jeta][jphi] = recNoiseEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
16501  areconoisehe[6][jeta][jphi] = recNoiseEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
16502 
16503  breconoisehe[0][jeta][jphi] = recNoiseEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
16504  breconoisehe[1][jeta][jphi] = recNoiseEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
16505  breconoisehe[2][jeta][jphi] = recNoiseEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
16506  breconoisehe[3][jeta][jphi] = recNoiseEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
16507  breconoisehe[4][jeta][jphi] = recNoiseEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
16508  breconoisehe[5][jeta][jphi] = recNoiseEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
16509  breconoisehe[6][jeta][jphi] = recNoiseEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
16510 
16511  if (areconoisehe[0][jeta][jphi] != 0.) {
16512  sumreconoiseHE0 += areconoisehe[0][jeta][jphi];
16513  ++nsumreconoiseHE0;
16514  }
16515  if (areconoisehe[1][jeta][jphi] != 0.) {
16516  sumreconoiseHE1 += areconoisehe[1][jeta][jphi];
16517  ++nsumreconoiseHE1;
16518  }
16519  if (areconoisehe[2][jeta][jphi] != 0.) {
16520  sumreconoiseHE2 += areconoisehe[2][jeta][jphi];
16521  ++nsumreconoiseHE2;
16522  }
16523  if (areconoisehe[3][jeta][jphi] != 0.) {
16524  sumreconoiseHE3 += areconoisehe[3][jeta][jphi];
16525  ++nsumreconoiseHE3;
16526  }
16527  if (areconoisehe[4][jeta][jphi] != 0.) {
16528  sumreconoiseHE4 += areconoisehe[4][jeta][jphi];
16529  ++nsumreconoiseHE4;
16530  }
16531  if (areconoisehe[5][jeta][jphi] != 0.) {
16532  sumreconoiseHE5 += areconoisehe[5][jeta][jphi];
16533  ++nsumreconoiseHE5;
16534  }
16535  if (areconoisehe[6][jeta][jphi] != 0.) {
16536  sumreconoiseHE6 += areconoisehe[6][jeta][jphi];
16537  ++nsumreconoiseHE6;
16538  }
16539  } // phi
16540 
16541  // PHI normalization for DIF:
16542  for (int jphi = 0; jphi < njphi; jphi++) {
16543  if (sumreconoiseHE0 != 0.)
16544  breconoisehe[0][jeta][jphi] -= (sumreconoiseHE0 / nsumreconoiseHE0);
16545  if (sumreconoiseHE1 != 0.)
16546  breconoisehe[1][jeta][jphi] -= (sumreconoiseHE1 / nsumreconoiseHE1);
16547  if (sumreconoiseHE2 != 0.)
16548  breconoisehe[2][jeta][jphi] -= (sumreconoiseHE2 / nsumreconoiseHE2);
16549  if (sumreconoiseHE3 != 0.)
16550  breconoisehe[3][jeta][jphi] -= (sumreconoiseHE3 / nsumreconoiseHE3);
16551  if (sumreconoiseHE4 != 0.)
16552  breconoisehe[4][jeta][jphi] -= (sumreconoiseHE4 / nsumreconoiseHE4);
16553  if (sumreconoiseHE5 != 0.)
16554  breconoisehe[5][jeta][jphi] -= (sumreconoiseHE5 / nsumreconoiseHE5);
16555  if (sumreconoiseHE6 != 0.)
16556  breconoisehe[6][jeta][jphi] -= (sumreconoiseHE6 / nsumreconoiseHE6);
16557  } // phi
16558 
16559  // PHI normalization for R:
16560  for (int jphi = 0; jphi < njphi; jphi++) {
16561  if (sumreconoiseHE0 != 0.)
16562  areconoisehe[0][jeta][jphi] /= (sumreconoiseHE0 / nsumreconoiseHE0);
16563  if (sumreconoiseHE1 != 0.)
16564  areconoisehe[1][jeta][jphi] /= (sumreconoiseHE1 / nsumreconoiseHE1);
16565  if (sumreconoiseHE2 != 0.)
16566  areconoisehe[2][jeta][jphi] /= (sumreconoiseHE2 / nsumreconoiseHE2);
16567  if (sumreconoiseHE3 != 0.)
16568  areconoisehe[3][jeta][jphi] /= (sumreconoiseHE3 / nsumreconoiseHE3);
16569  if (sumreconoiseHE4 != 0.)
16570  areconoisehe[4][jeta][jphi] /= (sumreconoiseHE4 / nsumreconoiseHE4);
16571  if (sumreconoiseHE5 != 0.)
16572  areconoisehe[5][jeta][jphi] /= (sumreconoiseHE5 / nsumreconoiseHE5);
16573  if (sumreconoiseHE6 != 0.)
16574  areconoisehe[6][jeta][jphi] /= (sumreconoiseHE6 / nsumreconoiseHE6);
16575  } // phi
16576  } //if( (jeta-41 >=
16577  } //eta
16578  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
16579  //======================================================================
16580  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HE
16581  //======================================================================
16582  c2x1->Clear();
16584  c2x1->Divide(2, 1);
16585  c2x1->cd(1);
16586  TH2F *GefzRreconoiseHE42D = new TH2F("GefzRreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
16587  TH2F *GefzRreconoiseHE42D0 = new TH2F("GefzRreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
16588  TH2F *GefzRreconoiseHE42DF = (TH2F *)GefzRreconoiseHE42D0->Clone("GefzRreconoiseHE42DF");
16589  for (int i = 0; i < ndepth; i++) {
16590  for (int jeta = 0; jeta < neta; jeta++) {
16591  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
16592  for (int jphi = 0; jphi < nphi; jphi++) {
16593  double ccc1 = areconoisehe[i][jeta][jphi];
16594  int k2plot = jeta - 41;
16595  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
16596  if (ccc1 != 0.) {
16597  GefzRreconoiseHE42D->Fill(kkk, jphi, ccc1);
16598  GefzRreconoiseHE42D0->Fill(kkk, jphi, 1.);
16599  }
16600  }
16601  }
16602  }
16603  }
16604  GefzRreconoiseHE42DF->Divide(GefzRreconoiseHE42D, GefzRreconoiseHE42D0, 1, 1, "B"); // average A
16605  gPad->SetGridy();
16606  gPad->SetGridx(); // gPad->SetLogz();
16607  GefzRreconoiseHE42DF->SetXTitle("<R>_depth #eta \b");
16608  GefzRreconoiseHE42DF->SetYTitle(" #phi \b");
16609  GefzRreconoiseHE42DF->Draw("COLZ");
16610 
16611  c2x1->cd(2);
16612  TH1F *energyhitNoise_HE = (TH1F *)dir->FindObjectAny("h_energyhitNoise_HE");
16613  energyhitNoise_HE->SetMarkerStyle(20);
16614  energyhitNoise_HE->SetMarkerSize(0.4);
16615  energyhitNoise_HE->GetYaxis()->SetLabelSize(0.04);
16616  energyhitNoise_HE->SetXTitle("energyhitNoise_HE \b");
16617  energyhitNoise_HE->SetMarkerColor(2);
16618  energyhitNoise_HE->SetLineColor(0);
16619  gPad->SetGridy();
16620  gPad->SetGridx();
16621  energyhitNoise_HE->Draw("Error");
16622 
16624  c2x1->Update();
16625  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHE.png");
16626  c2x1->Clear();
16627  // clean-up
16628  if (GefzRreconoiseHE42D)
16629  delete GefzRreconoiseHE42D;
16630  if (GefzRreconoiseHE42D0)
16631  delete GefzRreconoiseHE42D0;
16632  if (GefzRreconoiseHE42DF)
16633  delete GefzRreconoiseHE42DF;
16634  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
16635  //======================================================================
16636  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
16637  c1x1->Clear();
16639  c1x1->Divide(1, 1);
16640  c1x1->cd(1);
16641  TH1F *GefzRreconoiseHE41D = new TH1F("GefzRreconoiseHE41D", "", nphi, 0., 72.);
16642  TH1F *GefzRreconoiseHE41D0 = new TH1F("GefzRreconoiseHE41D0", "", nphi, 0., 72.);
16643  TH1F *GefzRreconoiseHE41DF = (TH1F *)GefzRreconoiseHE41D0->Clone("GefzRreconoiseHE41DF");
16644  for (int jphi = 0; jphi < nphi; jphi++) {
16645  for (int jeta = 0; jeta < neta; jeta++) {
16646  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
16647  for (int i = 0; i < ndepth; i++) {
16648  double ccc1 = areconoisehe[i][jeta][jphi];
16649  if (ccc1 != 0.) {
16650  GefzRreconoiseHE41D->Fill(jphi, ccc1);
16651  GefzRreconoiseHE41D0->Fill(jphi, 1.);
16652  }
16653  }
16654  }
16655  }
16656  }
16657  GefzRreconoiseHE41DF->Divide(GefzRreconoiseHE41D, GefzRreconoiseHE41D0, 1, 1, "B"); // R averaged over depthes & eta
16658  GefzRreconoiseHE41D0->Sumw2();
16659  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHE41DF->SetBinError(jphi,0.01);}
16660  gPad->SetGridy();
16661  gPad->SetGridx(); // gPad->SetLogz();
16662  GefzRreconoiseHE41DF->SetMarkerStyle(20);
16663  GefzRreconoiseHE41DF->SetMarkerSize(1.4);
16664  GefzRreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
16665  GefzRreconoiseHE41DF->SetXTitle("#phi \b");
16666  GefzRreconoiseHE41DF->SetYTitle(" <R> \b");
16667  GefzRreconoiseHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
16668  GefzRreconoiseHE41DF->SetMarkerColor(4);
16669  GefzRreconoiseHE41DF->SetLineColor(
16670  4); // GefzRreconoiseHE41DF->SetMinimum(0.8); // GefzRreconoiseHE41DF->SetMaximum(1.000);
16671  GefzRreconoiseHE41DF->Draw("Error");
16673  c1x1->Update();
16674  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHE.png");
16675  c1x1->Clear();
16676  // clean-up
16677  if (GefzRreconoiseHE41D)
16678  delete GefzRreconoiseHE41D;
16679  if (GefzRreconoiseHE41D0)
16680  delete GefzRreconoiseHE41D0;
16681  if (GefzRreconoiseHE41DF)
16682  delete GefzRreconoiseHE41DF;
16683 
16684  //========================================================================================== 4
16685  //======================================================================
16686  //======================================================================1D plot: R vs phi , different eta, depth=1
16687  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
16688  c3x5->Clear();
16690  c3x5->Divide(3, 5);
16691  c3x5->cd(1);
16692  int kcountHEpositivedirectionReconoise1 = 1;
16693  TH1F *h2CeffHEpositivedirectionReconoise1 = new TH1F("h2CeffHEpositivedirectionReconoise1", "", nphi, 0., 72.);
16694  for (int jeta = 0; jeta < njeta; jeta++) {
16695  // positivedirectionReconoise:
16696  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16697  // for (int i=0;i<ndepth;i++) {
16698  // depth=1
16699  for (int i = 0; i < 1; i++) {
16700  TH1F *HEpositivedirectionReconoise1 = (TH1F *)h2CeffHEpositivedirectionReconoise1->Clone("twod1");
16701  float ccctest = 0; // to avoid empty massive elements
16702  for (int jphi = 0; jphi < nphi; jphi++) {
16703  double ccc1 = areconoisehe[i][jeta][jphi];
16704  if (ccc1 != 0.) {
16705  HEpositivedirectionReconoise1->Fill(jphi, ccc1);
16706  ccctest = 1.; //HEpositivedirectionReconoise1->SetBinError(i,0.01);
16707  }
16708  } // for jphi
16709  if (ccctest > 0.) {
16710  // cout<<"444 kcountHEpositivedirectionReconoise1 = "<<kcountHEpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
16711  c3x5->cd(kcountHEpositivedirectionReconoise1);
16712  HEpositivedirectionReconoise1->SetMarkerStyle(20);
16713  HEpositivedirectionReconoise1->SetMarkerSize(0.4);
16714  HEpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
16715  HEpositivedirectionReconoise1->SetXTitle("HEpositivedirectionReconoise1 \b");
16716  HEpositivedirectionReconoise1->SetMarkerColor(2);
16717  HEpositivedirectionReconoise1->SetLineColor(0);
16718  gPad->SetGridy();
16719  gPad->SetGridx();
16720  // gPad->SetLogy();
16721  if (kcountHEpositivedirectionReconoise1 == 1)
16722  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
16723  if (kcountHEpositivedirectionReconoise1 == 2)
16724  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
16725  if (kcountHEpositivedirectionReconoise1 == 3)
16726  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
16727  if (kcountHEpositivedirectionReconoise1 == 4)
16728  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
16729  if (kcountHEpositivedirectionReconoise1 == 5)
16730  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
16731  if (kcountHEpositivedirectionReconoise1 == 6)
16732  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
16733  if (kcountHEpositivedirectionReconoise1 == 7)
16734  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
16735  if (kcountHEpositivedirectionReconoise1 == 8)
16736  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
16737  if (kcountHEpositivedirectionReconoise1 == 9)
16738  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
16739  if (kcountHEpositivedirectionReconoise1 == 10)
16740  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
16741  if (kcountHEpositivedirectionReconoise1 == 11)
16742  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
16743  if (kcountHEpositivedirectionReconoise1 == 12)
16744  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
16745  HEpositivedirectionReconoise1->Draw("Error");
16746  kcountHEpositivedirectionReconoise1++;
16747  if (kcountHEpositivedirectionReconoise1 > 12)
16748  break; // 4x6 = 24
16749  } //ccctest>0
16750 
16751  } // for i
16752  } //if(jeta-41 >= 15 && jeta-41 <= 28
16753  } //for jeta
16755  c3x5->Update();
16756  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
16757  c3x5->Clear();
16758  // clean-up
16759  if (h2CeffHEpositivedirectionReconoise1)
16760  delete h2CeffHEpositivedirectionReconoise1;
16761 
16762  //========================================================================================== 5
16763  //======================================================================
16764  //======================================================================1D plot: R vs phi , different eta, depth=2
16765  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
16766  c3x5->Clear();
16768  c3x5->Divide(3, 5);
16769  c3x5->cd(1);
16770  int kcountHEpositivedirectionReconoise2 = 1;
16771  TH1F *h2CeffHEpositivedirectionReconoise2 = new TH1F("h2CeffHEpositivedirectionReconoise2", "", nphi, 0., 72.);
16772  for (int jeta = 0; jeta < njeta; jeta++) {
16773  // positivedirectionReconoise:
16774  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16775  // for (int i=0;i<ndepth;i++) {
16776  // depth=2
16777  for (int i = 1; i < 2; i++) {
16778  TH1F *HEpositivedirectionReconoise2 = (TH1F *)h2CeffHEpositivedirectionReconoise2->Clone("twod1");
16779  float ccctest = 0; // to avoid empty massive elements
16780  for (int jphi = 0; jphi < nphi; jphi++) {
16781  double ccc1 = areconoisehe[i][jeta][jphi];
16782  if (ccc1 != 0.) {
16783  HEpositivedirectionReconoise2->Fill(jphi, ccc1);
16784  ccctest = 1.; //HEpositivedirectionReconoise2->SetBinError(i,0.01);
16785  }
16786  } // for jphi
16787  if (ccctest > 0.) {
16788  //cout<<"555 kcountHEpositivedirectionReconoise2 = "<<kcountHEpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
16789  c3x5->cd(kcountHEpositivedirectionReconoise2);
16790  HEpositivedirectionReconoise2->SetMarkerStyle(20);
16791  HEpositivedirectionReconoise2->SetMarkerSize(0.4);
16792  HEpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
16793  HEpositivedirectionReconoise2->SetXTitle("HEpositivedirectionReconoise2 \b");
16794  HEpositivedirectionReconoise2->SetMarkerColor(2);
16795  HEpositivedirectionReconoise2->SetLineColor(0);
16796  gPad->SetGridy();
16797  gPad->SetGridx();
16798  // gPad->SetLogy();
16799  if (kcountHEpositivedirectionReconoise2 == 1)
16800  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
16801  if (kcountHEpositivedirectionReconoise2 == 2)
16802  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
16803  if (kcountHEpositivedirectionReconoise2 == 3)
16804  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
16805  if (kcountHEpositivedirectionReconoise2 == 4)
16806  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
16807  if (kcountHEpositivedirectionReconoise2 == 5)
16808  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
16809  if (kcountHEpositivedirectionReconoise2 == 6)
16810  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
16811  if (kcountHEpositivedirectionReconoise2 == 7)
16812  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
16813  if (kcountHEpositivedirectionReconoise2 == 8)
16814  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
16815  if (kcountHEpositivedirectionReconoise2 == 9)
16816  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
16817  if (kcountHEpositivedirectionReconoise2 == 10)
16818  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
16819  if (kcountHEpositivedirectionReconoise2 == 11)
16820  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
16821  if (kcountHEpositivedirectionReconoise2 == 12)
16822  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
16823  if (kcountHEpositivedirectionReconoise2 == 13)
16824  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
16825  HEpositivedirectionReconoise2->Draw("Error");
16826  kcountHEpositivedirectionReconoise2++;
16827  if (kcountHEpositivedirectionReconoise2 > 13)
16828  break; // 4x6 = 24
16829  } //ccctest>0
16830 
16831  } // for i
16832  } //if(jeta-41
16833  } //for jeta
16835  c3x5->Update();
16836  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
16837  c3x5->Clear();
16838  // clean-up
16839  if (h2CeffHEpositivedirectionReconoise2)
16840  delete h2CeffHEpositivedirectionReconoise2;
16841  //========================================================================================== 6
16842  //======================================================================
16843  //======================================================================1D plot: R vs phi , different eta, depth=3
16844  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
16845  c3x5->Clear();
16847  c3x5->Divide(3, 5);
16848  c3x5->cd(1);
16849  int kcountHEpositivedirectionReconoise3 = 1;
16850  TH1F *h2CeffHEpositivedirectionReconoise3 = new TH1F("h2CeffHEpositivedirectionReconoise3", "", nphi, 0., 72.);
16851  for (int jeta = 0; jeta < njeta; jeta++) {
16852  // positivedirectionReconoise:
16853  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16854  // for (int i=0;i<ndepth;i++) {
16855  // depth=3
16856  for (int i = 2; i < 3; i++) {
16857  TH1F *HEpositivedirectionReconoise3 = (TH1F *)h2CeffHEpositivedirectionReconoise3->Clone("twod1");
16858  float ccctest = 0; // to avoid empty massive elements
16859  for (int jphi = 0; jphi < nphi; jphi++) {
16860  double ccc1 = areconoisehe[i][jeta][jphi];
16861  if (ccc1 != 0.) {
16862  HEpositivedirectionReconoise3->Fill(jphi, ccc1);
16863  ccctest = 1.; //HEpositivedirectionReconoise3->SetBinError(i,0.01);
16864  }
16865  } // for jphi
16866  if (ccctest > 0.) {
16867  //cout<<"666 kcountHEpositivedirectionReconoise3 = "<<kcountHEpositivedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
16868  c3x5->cd(kcountHEpositivedirectionReconoise3);
16869  HEpositivedirectionReconoise3->SetMarkerStyle(20);
16870  HEpositivedirectionReconoise3->SetMarkerSize(0.4);
16871  HEpositivedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
16872  HEpositivedirectionReconoise3->SetXTitle("HEpositivedirectionReconoise3 \b");
16873  HEpositivedirectionReconoise3->SetMarkerColor(2);
16874  HEpositivedirectionReconoise3->SetLineColor(0);
16875  gPad->SetGridy();
16876  gPad->SetGridx();
16877  // gPad->SetLogy();
16878  if (kcountHEpositivedirectionReconoise3 == 1)
16879  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
16880  if (kcountHEpositivedirectionReconoise3 == 2)
16881  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
16882  if (kcountHEpositivedirectionReconoise3 == 3)
16883  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
16884  if (kcountHEpositivedirectionReconoise3 == 4)
16885  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
16886  if (kcountHEpositivedirectionReconoise3 == 5)
16887  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
16888  if (kcountHEpositivedirectionReconoise3 == 6)
16889  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
16890  if (kcountHEpositivedirectionReconoise3 == 7)
16891  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
16892  if (kcountHEpositivedirectionReconoise3 == 8)
16893  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
16894  if (kcountHEpositivedirectionReconoise3 == 9)
16895  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
16896  if (kcountHEpositivedirectionReconoise3 == 10)
16897  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
16898  if (kcountHEpositivedirectionReconoise3 == 11)
16899  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
16900  if (kcountHEpositivedirectionReconoise3 == 12)
16901  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
16902  if (kcountHEpositivedirectionReconoise3 == 13)
16903  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
16904  HEpositivedirectionReconoise3->Draw("Error");
16905  kcountHEpositivedirectionReconoise3++;
16906  if (kcountHEpositivedirectionReconoise3 > 13)
16907  break; // 4x6 = 24
16908  } //ccctest>0
16909 
16910  } // for i
16911  } //if(jeta-41 >=
16912  } //for jeta
16914  c3x5->Update();
16915  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
16916  c3x5->Clear();
16917  // clean-up
16918  if (h2CeffHEpositivedirectionReconoise3)
16919  delete h2CeffHEpositivedirectionReconoise3;
16920  //========================================================================================== 7
16921  //======================================================================
16922  //======================================================================1D plot: R vs phi , different eta, depth=4
16923  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
16924  c3x5->Clear();
16926  c3x5->Divide(3, 5);
16927  c3x5->cd(1);
16928  int kcountHEpositivedirectionReconoise4 = 1;
16929  TH1F *h2CeffHEpositivedirectionReconoise4 = new TH1F("h2CeffHEpositivedirectionReconoise4", "", nphi, 0., 72.);
16930 
16931  for (int jeta = 0; jeta < njeta; jeta++) {
16932  // positivedirectionReconoise:
16933  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16934  // for (int i=0;i<ndepth;i++) {
16935  // depth=4
16936  for (int i = 3; i < 4; i++) {
16937  TH1F *HEpositivedirectionReconoise4 = (TH1F *)h2CeffHEpositivedirectionReconoise4->Clone("twod1");
16938 
16939  float ccctest = 0; // to avoid empty massive elements
16940  for (int jphi = 0; jphi < nphi; jphi++) {
16941  double ccc1 = areconoisehe[i][jeta][jphi];
16942  if (ccc1 != 0.) {
16943  HEpositivedirectionReconoise4->Fill(jphi, ccc1);
16944  ccctest = 1.; //HEpositivedirectionReconoise4->SetBinError(i,0.01);
16945  }
16946  } // for jphi
16947  if (ccctest > 0.) {
16948  //cout<<"777 kcountHEpositivedirectionReconoise4 = "<<kcountHEpositivedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
16949  c3x5->cd(kcountHEpositivedirectionReconoise4);
16950  HEpositivedirectionReconoise4->SetMarkerStyle(20);
16951  HEpositivedirectionReconoise4->SetMarkerSize(0.4);
16952  HEpositivedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
16953  HEpositivedirectionReconoise4->SetXTitle("HEpositivedirectionReconoise4 \b");
16954  HEpositivedirectionReconoise4->SetMarkerColor(2);
16955  HEpositivedirectionReconoise4->SetLineColor(0);
16956  gPad->SetGridy();
16957  gPad->SetGridx();
16958  // gPad->SetLogy();
16959  if (kcountHEpositivedirectionReconoise4 == 1)
16960  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
16961  if (kcountHEpositivedirectionReconoise4 == 2)
16962  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
16963  if (kcountHEpositivedirectionReconoise4 == 3)
16964  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
16965  if (kcountHEpositivedirectionReconoise4 == 4)
16966  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
16967  if (kcountHEpositivedirectionReconoise4 == 5)
16968  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
16969  if (kcountHEpositivedirectionReconoise4 == 6)
16970  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
16971  if (kcountHEpositivedirectionReconoise4 == 7)
16972  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
16973  if (kcountHEpositivedirectionReconoise4 == 8)
16974  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
16975  if (kcountHEpositivedirectionReconoise4 == 9)
16976  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
16977  if (kcountHEpositivedirectionReconoise4 == 10)
16978  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
16979  if (kcountHEpositivedirectionReconoise4 == 11)
16980  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
16981  if (kcountHEpositivedirectionReconoise4 == 12)
16982  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
16983  HEpositivedirectionReconoise4->Draw("Error");
16984  kcountHEpositivedirectionReconoise4++;
16985  if (kcountHEpositivedirectionReconoise4 > 12)
16986  break; // 4x6 = 24
16987  } //ccctest>0
16988 
16989  } // for i
16990  } //if(jeta-41 >= -29 && jeta-41 <= -16)
16991  } //for jeta
16993  c3x5->Update();
16994  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
16995  c3x5->Clear();
16996  // clean-up
16997  if (h2CeffHEpositivedirectionReconoise4)
16998  delete h2CeffHEpositivedirectionReconoise4;
16999  //========================================================================================== 8
17000  //======================================================================
17001  //======================================================================1D plot: R vs phi , different eta, depth=5
17002  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
17003  c3x5->Clear();
17005  c3x5->Divide(3, 5);
17006  c3x5->cd(1);
17007  int kcountHEpositivedirectionReconoise5 = 1;
17008  TH1F *h2CeffHEpositivedirectionReconoise5 = new TH1F("h2CeffHEpositivedirectionReconoise5", "", nphi, 0., 72.);
17009 
17010  for (int jeta = 0; jeta < njeta; jeta++) {
17011  // positivedirectionReconoise:
17012  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17013  // for (int i=0;i<ndepth;i++) {
17014  // depth=5
17015  for (int i = 4; i < 5; i++) {
17016  TH1F *HEpositivedirectionReconoise5 = (TH1F *)h2CeffHEpositivedirectionReconoise5->Clone("twod1");
17017 
17018  float ccctest = 0; // to avoid empty massive elements
17019  for (int jphi = 0; jphi < nphi; jphi++) {
17020  // cout<<"888 initial kcountHEpositivedirectionReconoise5 = "<<kcountHEpositivedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" areconoisehe[i][jeta][jphi]= "<< areconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
17021 
17022  double ccc1 = areconoisehe[i][jeta][jphi];
17023  if (ccc1 != 0.) {
17024  HEpositivedirectionReconoise5->Fill(jphi, ccc1);
17025  ccctest = 1.; //HEpositivedirectionReconoise5->SetBinError(i,0.01);
17026  }
17027  } // for jphi
17028  if (ccctest > 0.) {
17029  //cout<<"888 kcountHEpositivedirectionReconoise5 = "<<kcountHEpositivedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<endl;
17030  c3x5->cd(kcountHEpositivedirectionReconoise5);
17031  HEpositivedirectionReconoise5->SetMarkerStyle(20);
17032  HEpositivedirectionReconoise5->SetMarkerSize(0.4);
17033  HEpositivedirectionReconoise5->GetYaxis()->SetLabelSize(0.04);
17034  HEpositivedirectionReconoise5->SetXTitle("HEpositivedirectionReconoise5 \b");
17035  HEpositivedirectionReconoise5->SetMarkerColor(2);
17036  HEpositivedirectionReconoise5->SetLineColor(0);
17037  gPad->SetGridy();
17038  gPad->SetGridx();
17039  // gPad->SetLogy();
17040  if (kcountHEpositivedirectionReconoise5 == 1)
17041  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
17042  if (kcountHEpositivedirectionReconoise5 == 2)
17043  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
17044  if (kcountHEpositivedirectionReconoise5 == 3)
17045  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
17046  if (kcountHEpositivedirectionReconoise5 == 4)
17047  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
17048  if (kcountHEpositivedirectionReconoise5 == 5)
17049  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
17050  if (kcountHEpositivedirectionReconoise5 == 6)
17051  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
17052  if (kcountHEpositivedirectionReconoise5 == 7)
17053  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
17054  if (kcountHEpositivedirectionReconoise5 == 8)
17055  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
17056  if (kcountHEpositivedirectionReconoise5 == 9)
17057  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
17058  if (kcountHEpositivedirectionReconoise5 == 10)
17059  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
17060  if (kcountHEpositivedirectionReconoise5 == 11)
17061  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
17062  HEpositivedirectionReconoise5->Draw("Error");
17063  kcountHEpositivedirectionReconoise5++;
17064  if (kcountHEpositivedirectionReconoise5 > 11)
17065  break; // 4x6 = 24
17066  } //ccctest>0
17067 
17068  } // for i
17069  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17070  } //for jeta
17072  c3x5->Update();
17073  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
17074  c3x5->Clear();
17075  // clean-up
17076  if (h2CeffHEpositivedirectionReconoise5)
17077  delete h2CeffHEpositivedirectionReconoise5;
17078  //========================================================================================== 9
17079  //======================================================================
17080  //======================================================================1D plot: R vs phi , different eta, depth=6
17081  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
17082  c3x5->Clear();
17084  c3x5->Divide(3, 5);
17085  c3x5->cd(1);
17086  int kcountHEpositivedirectionReconoise6 = 1;
17087  TH1F *h2CeffHEpositivedirectionReconoise6 = new TH1F("h2CeffHEpositivedirectionReconoise6", "", nphi, 0., 72.);
17088 
17089  for (int jeta = 0; jeta < njeta; jeta++) {
17090  // positivedirectionReconoise:
17091  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17092  // for (int i=0;i<ndepth;i++) {
17093  // depth=6
17094  for (int i = 5; i < 6; i++) {
17095  TH1F *HEpositivedirectionReconoise6 = (TH1F *)h2CeffHEpositivedirectionReconoise6->Clone("twod1");
17096 
17097  float ccctest = 0; // to avoid empty massive elements
17098  for (int jphi = 0; jphi < nphi; jphi++) {
17099  double ccc1 = areconoisehe[i][jeta][jphi];
17100  if (ccc1 != 0.) {
17101  HEpositivedirectionReconoise6->Fill(jphi, ccc1);
17102  ccctest = 1.; //HEpositivedirectionReconoise6->SetBinError(i,0.01);
17103  }
17104  } // for jphi
17105  if (ccctest > 0.) {
17106  //cout<<"999 kcountHEpositivedirectionReconoise6 = "<<kcountHEpositivedirectionReconoise6 <<" jeta-41= "<< jeta-41 <<endl;
17107  c3x5->cd(kcountHEpositivedirectionReconoise6);
17108  HEpositivedirectionReconoise6->SetMarkerStyle(20);
17109  HEpositivedirectionReconoise6->SetMarkerSize(0.4);
17110  HEpositivedirectionReconoise6->GetYaxis()->SetLabelSize(0.04);
17111  HEpositivedirectionReconoise6->SetXTitle("HEpositivedirectionReconoise6 \b");
17112  HEpositivedirectionReconoise6->SetMarkerColor(2);
17113  HEpositivedirectionReconoise6->SetLineColor(0);
17114  gPad->SetGridy();
17115  gPad->SetGridx();
17116  // gPad->SetLogy();
17117  if (kcountHEpositivedirectionReconoise6 == 1)
17118  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
17119  if (kcountHEpositivedirectionReconoise6 == 2)
17120  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
17121  if (kcountHEpositivedirectionReconoise6 == 3)
17122  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
17123  if (kcountHEpositivedirectionReconoise6 == 4)
17124  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
17125  if (kcountHEpositivedirectionReconoise6 == 5)
17126  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
17127  if (kcountHEpositivedirectionReconoise6 == 6)
17128  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
17129  if (kcountHEpositivedirectionReconoise6 == 7)
17130  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
17131  if (kcountHEpositivedirectionReconoise6 == 8)
17132  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
17133  if (kcountHEpositivedirectionReconoise6 == 9)
17134  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
17135  if (kcountHEpositivedirectionReconoise6 == 10)
17136  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
17137  HEpositivedirectionReconoise6->Draw("Error");
17138  kcountHEpositivedirectionReconoise6++;
17139  if (kcountHEpositivedirectionReconoise6 > 10)
17140  break; // 4x6 = 24
17141  } //ccctest>0
17142 
17143  } // for i
17144  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17145  } //for jeta
17147  c3x5->Update();
17148  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
17149  c3x5->Clear();
17150  // clean-up
17151  if (h2CeffHEpositivedirectionReconoise6)
17152  delete h2CeffHEpositivedirectionReconoise6;
17153  //========================================================================================== 10
17154  //======================================================================
17155  //======================================================================1D plot: R vs phi , different eta, depth=7
17156  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
17157  c3x5->Clear();
17159  c3x5->Divide(3, 5);
17160  c3x5->cd(1);
17161  int kcountHEpositivedirectionReconoise7 = 1;
17162  TH1F *h2CeffHEpositivedirectionReconoise7 = new TH1F("h2CeffHEpositivedirectionReconoise7", "", nphi, 0., 72.);
17163 
17164  for (int jeta = 0; jeta < njeta; jeta++) {
17165  // positivedirectionReconoise:
17166  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17167  // for (int i=0;i<ndepth;i++) {
17168  // depth=7
17169  for (int i = 6; i < 7; i++) {
17170  TH1F *HEpositivedirectionReconoise7 = (TH1F *)h2CeffHEpositivedirectionReconoise7->Clone("twod1");
17171 
17172  float ccctest = 0; // to avoid empty massive elements
17173  for (int jphi = 0; jphi < nphi; jphi++) {
17174  double ccc1 = areconoisehe[i][jeta][jphi];
17175  if (ccc1 != 0.) {
17176  HEpositivedirectionReconoise7->Fill(jphi, ccc1);
17177  ccctest = 1.; //HEpositivedirectionReconoise7->SetBinError(i,0.01);
17178  }
17179  } // for jphi
17180  if (ccctest > 0.) {
17181  //cout<<"1010 kcountHEpositivedirectionReconoise7 = "<<kcountHEpositivedirectionReconoise7 <<" jeta-41= "<< jeta-41 <<endl;
17182  c3x5->cd(kcountHEpositivedirectionReconoise7);
17183  HEpositivedirectionReconoise7->SetMarkerStyle(20);
17184  HEpositivedirectionReconoise7->SetMarkerSize(0.4);
17185  HEpositivedirectionReconoise7->GetYaxis()->SetLabelSize(0.04);
17186  HEpositivedirectionReconoise7->SetXTitle("HEpositivedirectionReconoise7 \b");
17187  HEpositivedirectionReconoise7->SetMarkerColor(2);
17188  HEpositivedirectionReconoise7->SetLineColor(0);
17189  gPad->SetGridy();
17190  gPad->SetGridx();
17191  // gPad->SetLogy();
17192  if (kcountHEpositivedirectionReconoise7 == 1)
17193  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
17194  if (kcountHEpositivedirectionReconoise7 == 2)
17195  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
17196  if (kcountHEpositivedirectionReconoise7 == 3)
17197  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
17198  HEpositivedirectionReconoise7->Draw("Error");
17199  kcountHEpositivedirectionReconoise7++;
17200  if (kcountHEpositivedirectionReconoise7 > 3)
17201  break; //
17202  } //ccctest>0
17203 
17204  } // for i
17205  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17206  } //for jeta
17208  c3x5->Update();
17209  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
17210  c3x5->Clear();
17211  // clean-up
17212  if (h2CeffHEpositivedirectionReconoise7)
17213  delete h2CeffHEpositivedirectionReconoise7;
17214 
17216  //========================================================================================== 1114
17217  //======================================================================
17218  //======================================================================1D plot: R vs phi , different eta, depth=1
17219  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
17220  c3x5->Clear();
17222  c3x5->Divide(3, 5);
17223  c3x5->cd(1);
17224  int kcountHEnegativedirectionReconoise1 = 1;
17225  TH1F *h2CeffHEnegativedirectionReconoise1 = new TH1F("h2CeffHEnegativedirectionReconoise1", "", nphi, 0., 72.);
17226  for (int jeta = 0; jeta < njeta; jeta++) {
17227  // negativedirectionReconoise:
17228  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17229  // for (int i=0;i<ndepth;i++) {
17230  // depth=1
17231  for (int i = 0; i < 1; i++) {
17232  TH1F *HEnegativedirectionReconoise1 = (TH1F *)h2CeffHEnegativedirectionReconoise1->Clone("twod1");
17233  float ccctest = 0; // to avoid empty massive elements
17234  for (int jphi = 0; jphi < nphi; jphi++) {
17235  double ccc1 = areconoisehe[i][jeta][jphi];
17236  if (ccc1 != 0.) {
17237  HEnegativedirectionReconoise1->Fill(jphi, ccc1);
17238  ccctest = 1.; //HEnegativedirectionReconoise1->SetBinError(i,0.01);
17239  }
17240  } // for jphi
17241  if (ccctest > 0.) {
17242  // cout<<"444 kcountHEnegativedirectionReconoise1 = "<<kcountHEnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
17243  c3x5->cd(kcountHEnegativedirectionReconoise1);
17244  HEnegativedirectionReconoise1->SetMarkerStyle(20);
17245  HEnegativedirectionReconoise1->SetMarkerSize(0.4);
17246  HEnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
17247  HEnegativedirectionReconoise1->SetXTitle("HEnegativedirectionReconoise1 \b");
17248  HEnegativedirectionReconoise1->SetMarkerColor(2);
17249  HEnegativedirectionReconoise1->SetLineColor(0);
17250  gPad->SetGridy();
17251  gPad->SetGridx();
17252  // gPad->SetLogy();
17253  if (kcountHEnegativedirectionReconoise1 == 1)
17254  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
17255  if (kcountHEnegativedirectionReconoise1 == 2)
17256  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
17257  if (kcountHEnegativedirectionReconoise1 == 3)
17258  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
17259  if (kcountHEnegativedirectionReconoise1 == 4)
17260  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
17261  if (kcountHEnegativedirectionReconoise1 == 5)
17262  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
17263  if (kcountHEnegativedirectionReconoise1 == 6)
17264  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
17265  if (kcountHEnegativedirectionReconoise1 == 7)
17266  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
17267  if (kcountHEnegativedirectionReconoise1 == 8)
17268  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
17269  if (kcountHEnegativedirectionReconoise1 == 9)
17270  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
17271  if (kcountHEnegativedirectionReconoise1 == 10)
17272  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
17273  if (kcountHEnegativedirectionReconoise1 == 11)
17274  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
17275  if (kcountHEnegativedirectionReconoise1 == 12)
17276  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
17277  HEnegativedirectionReconoise1->Draw("Error");
17278  kcountHEnegativedirectionReconoise1++;
17279  if (kcountHEnegativedirectionReconoise1 > 12)
17280  break; // 4x6 = 24
17281  } //ccctest>0
17282 
17283  } // for i
17284  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17285  } //for jeta
17287  c3x5->Update();
17288  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
17289  c3x5->Clear();
17290  // clean-up
17291  if (h2CeffHEnegativedirectionReconoise1)
17292  delete h2CeffHEnegativedirectionReconoise1;
17293 
17294  //========================================================================================== 1115
17295  //======================================================================
17296  //======================================================================1D plot: R vs phi , different eta, depth=2
17297  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
17298  c3x5->Clear();
17300  c3x5->Divide(3, 5);
17301  c3x5->cd(1);
17302  int kcountHEnegativedirectionReconoise2 = 1;
17303  TH1F *h2CeffHEnegativedirectionReconoise2 = new TH1F("h2CeffHEnegativedirectionReconoise2", "", nphi, 0., 72.);
17304  for (int jeta = 0; jeta < njeta; jeta++) {
17305  // negativedirectionReconoise:
17306  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17307  // for (int i=0;i<ndepth;i++) {
17308  // depth=2
17309  for (int i = 1; i < 2; i++) {
17310  TH1F *HEnegativedirectionReconoise2 = (TH1F *)h2CeffHEnegativedirectionReconoise2->Clone("twod1");
17311  float ccctest = 0; // to avoid empty massive elements
17312  for (int jphi = 0; jphi < nphi; jphi++) {
17313  double ccc1 = areconoisehe[i][jeta][jphi];
17314  if (ccc1 != 0.) {
17315  HEnegativedirectionReconoise2->Fill(jphi, ccc1);
17316  ccctest = 1.; //HEnegativedirectionReconoise2->SetBinError(i,0.01);
17317  }
17318  } // for jphi
17319  if (ccctest > 0.) {
17320  //cout<<"555 kcountHEnegativedirectionReconoise2 = "<<kcountHEnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
17321  c3x5->cd(kcountHEnegativedirectionReconoise2);
17322  HEnegativedirectionReconoise2->SetMarkerStyle(20);
17323  HEnegativedirectionReconoise2->SetMarkerSize(0.4);
17324  HEnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
17325  HEnegativedirectionReconoise2->SetXTitle("HEnegativedirectionReconoise2 \b");
17326  HEnegativedirectionReconoise2->SetMarkerColor(2);
17327  HEnegativedirectionReconoise2->SetLineColor(0);
17328  gPad->SetGridy();
17329  gPad->SetGridx();
17330  // gPad->SetLogy();
17331  if (kcountHEnegativedirectionReconoise2 == 1)
17332  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
17333  if (kcountHEnegativedirectionReconoise2 == 2)
17334  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
17335  if (kcountHEnegativedirectionReconoise2 == 3)
17336  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
17337  if (kcountHEnegativedirectionReconoise2 == 4)
17338  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
17339  if (kcountHEnegativedirectionReconoise2 == 5)
17340  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
17341  if (kcountHEnegativedirectionReconoise2 == 6)
17342  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
17343  if (kcountHEnegativedirectionReconoise2 == 7)
17344  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
17345  if (kcountHEnegativedirectionReconoise2 == 8)
17346  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
17347  if (kcountHEnegativedirectionReconoise2 == 9)
17348  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
17349  if (kcountHEnegativedirectionReconoise2 == 10)
17350  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
17351  if (kcountHEnegativedirectionReconoise2 == 11)
17352  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
17353  if (kcountHEnegativedirectionReconoise2 == 12)
17354  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
17355  if (kcountHEnegativedirectionReconoise2 == 13)
17356  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
17357  HEnegativedirectionReconoise2->Draw("Error");
17358  kcountHEnegativedirectionReconoise2++;
17359  if (kcountHEnegativedirectionReconoise2 > 13)
17360  break; // 4x6 = 24
17361  } //ccctest>0
17362 
17363  } // for i
17364  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17365  } //for jeta
17367  c3x5->Update();
17368  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
17369  c3x5->Clear();
17370  // clean-up
17371  if (h2CeffHEnegativedirectionReconoise2)
17372  delete h2CeffHEnegativedirectionReconoise2;
17373  //========================================================================================== 1116
17374  //======================================================================
17375  //======================================================================1D plot: R vs phi , different eta, depth=3
17376  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
17377  c3x5->Clear();
17379  c3x5->Divide(3, 5);
17380  c3x5->cd(1);
17381  int kcountHEnegativedirectionReconoise3 = 1;
17382  TH1F *h2CeffHEnegativedirectionReconoise3 = new TH1F("h2CeffHEnegativedirectionReconoise3", "", nphi, 0., 72.);
17383  for (int jeta = 0; jeta < njeta; jeta++) {
17384  // negativedirectionReconoise:
17385  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17386  // for (int i=0;i<ndepth;i++) {
17387  // depth=3
17388  for (int i = 2; i < 3; i++) {
17389  TH1F *HEnegativedirectionReconoise3 = (TH1F *)h2CeffHEnegativedirectionReconoise3->Clone("twod1");
17390  float ccctest = 0; // to avoid empty massive elements
17391  for (int jphi = 0; jphi < nphi; jphi++) {
17392  double ccc1 = areconoisehe[i][jeta][jphi];
17393  if (ccc1 != 0.) {
17394  HEnegativedirectionReconoise3->Fill(jphi, ccc1);
17395  ccctest = 1.; //HEnegativedirectionReconoise3->SetBinError(i,0.01);
17396  }
17397  } // for jphi
17398  if (ccctest > 0.) {
17399  //cout<<"666 kcountHEnegativedirectionReconoise3 = "<<kcountHEnegativedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
17400  c3x5->cd(kcountHEnegativedirectionReconoise3);
17401  HEnegativedirectionReconoise3->SetMarkerStyle(20);
17402  HEnegativedirectionReconoise3->SetMarkerSize(0.4);
17403  HEnegativedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
17404  HEnegativedirectionReconoise3->SetXTitle("HEnegativedirectionReconoise3 \b");
17405  HEnegativedirectionReconoise3->SetMarkerColor(2);
17406  HEnegativedirectionReconoise3->SetLineColor(0);
17407  gPad->SetGridy();
17408  gPad->SetGridx();
17409  // gPad->SetLogy();
17410  if (kcountHEnegativedirectionReconoise3 == 1)
17411  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
17412  if (kcountHEnegativedirectionReconoise3 == 2)
17413  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
17414  if (kcountHEnegativedirectionReconoise3 == 3)
17415  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
17416  if (kcountHEnegativedirectionReconoise3 == 4)
17417  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
17418  if (kcountHEnegativedirectionReconoise3 == 5)
17419  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
17420  if (kcountHEnegativedirectionReconoise3 == 6)
17421  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
17422  if (kcountHEnegativedirectionReconoise3 == 7)
17423  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
17424  if (kcountHEnegativedirectionReconoise3 == 8)
17425  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
17426  if (kcountHEnegativedirectionReconoise3 == 9)
17427  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
17428  if (kcountHEnegativedirectionReconoise3 == 10)
17429  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
17430  if (kcountHEnegativedirectionReconoise3 == 11)
17431  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
17432  if (kcountHEnegativedirectionReconoise3 == 12)
17433  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
17434  if (kcountHEnegativedirectionReconoise3 == 13)
17435  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
17436  HEnegativedirectionReconoise3->Draw("Error");
17437  kcountHEnegativedirectionReconoise3++;
17438  if (kcountHEnegativedirectionReconoise3 > 13)
17439  break; // 4x6 = 24
17440  } //ccctest>0
17441 
17442  } // for i
17443  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17444  } //for jeta
17446  c3x5->Update();
17447  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
17448  c3x5->Clear();
17449  // clean-up
17450  if (h2CeffHEnegativedirectionReconoise3)
17451  delete h2CeffHEnegativedirectionReconoise3;
17452  //========================================================================================== 1117
17453  //======================================================================
17454  //======================================================================1D plot: R vs phi , different eta, depth=4
17455  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
17456  c3x5->Clear();
17458  c3x5->Divide(3, 5);
17459  c3x5->cd(1);
17460  int kcountHEnegativedirectionReconoise4 = 1;
17461  TH1F *h2CeffHEnegativedirectionReconoise4 = new TH1F("h2CeffHEnegativedirectionReconoise4", "", nphi, 0., 72.);
17462 
17463  for (int jeta = 0; jeta < njeta; jeta++) {
17464  // negativedirectionReconoise:
17465  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17466  // for (int i=0;i<ndepth;i++) {
17467  // depth=4
17468  for (int i = 3; i < 4; i++) {
17469  TH1F *HEnegativedirectionReconoise4 = (TH1F *)h2CeffHEnegativedirectionReconoise4->Clone("twod1");
17470 
17471  float ccctest = 0; // to avoid empty massive elements
17472  for (int jphi = 0; jphi < nphi; jphi++) {
17473  double ccc1 = areconoisehe[i][jeta][jphi];
17474  if (ccc1 != 0.) {
17475  HEnegativedirectionReconoise4->Fill(jphi, ccc1);
17476  ccctest = 1.; //HEnegativedirectionReconoise4->SetBinError(i,0.01);
17477  }
17478  } // for jphi
17479  if (ccctest > 0.) {
17480  //cout<<"777 kcountHEnegativedirectionReconoise4 = "<<kcountHEnegativedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
17481  c3x5->cd(kcountHEnegativedirectionReconoise4);
17482  HEnegativedirectionReconoise4->SetMarkerStyle(20);
17483  HEnegativedirectionReconoise4->SetMarkerSize(0.4);
17484  HEnegativedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
17485  HEnegativedirectionReconoise4->SetXTitle("HEnegativedirectionReconoise4 \b");
17486  HEnegativedirectionReconoise4->SetMarkerColor(2);
17487  HEnegativedirectionReconoise4->SetLineColor(0);
17488  gPad->SetGridy();
17489  gPad->SetGridx();
17490  // gPad->SetLogy();
17491  if (kcountHEnegativedirectionReconoise4 == 1)
17492  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
17493  if (kcountHEnegativedirectionReconoise4 == 2)
17494  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
17495  if (kcountHEnegativedirectionReconoise4 == 3)
17496  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
17497  if (kcountHEnegativedirectionReconoise4 == 4)
17498  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
17499  if (kcountHEnegativedirectionReconoise4 == 5)
17500  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
17501  if (kcountHEnegativedirectionReconoise4 == 6)
17502  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
17503  if (kcountHEnegativedirectionReconoise4 == 7)
17504  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
17505  if (kcountHEnegativedirectionReconoise4 == 8)
17506  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
17507  if (kcountHEnegativedirectionReconoise4 == 9)
17508  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
17509  if (kcountHEnegativedirectionReconoise4 == 10)
17510  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
17511  if (kcountHEnegativedirectionReconoise4 == 11)
17512  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
17513  if (kcountHEnegativedirectionReconoise4 == 12)
17514  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
17515  HEnegativedirectionReconoise4->Draw("Error");
17516  kcountHEnegativedirectionReconoise4++;
17517  if (kcountHEnegativedirectionReconoise4 > 12)
17518  break; // 4x6 = 24
17519  } //ccctest>0
17520 
17521  } // for i
17522  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17523  } //for jeta
17525  c3x5->Update();
17526  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
17527  c3x5->Clear();
17528  // clean-up
17529  if (h2CeffHEnegativedirectionReconoise4)
17530  delete h2CeffHEnegativedirectionReconoise4;
17531  //========================================================================================== 1118
17532  //======================================================================
17533  //======================================================================1D plot: R vs phi , different eta, depth=5
17534  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
17535  c3x5->Clear();
17537  c3x5->Divide(3, 5);
17538  c3x5->cd(1);
17539  int kcountHEnegativedirectionReconoise5 = 1;
17540  TH1F *h2CeffHEnegativedirectionReconoise5 = new TH1F("h2CeffHEnegativedirectionReconoise5", "", nphi, 0., 72.);
17541 
17542  for (int jeta = 0; jeta < njeta; jeta++) {
17543  // negativedirectionReconoise:
17544  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17545  // for (int i=0;i<ndepth;i++) {
17546  // depth=5
17547  for (int i = 4; i < 5; i++) {
17548  TH1F *HEnegativedirectionReconoise5 = (TH1F *)h2CeffHEnegativedirectionReconoise5->Clone("twod1");
17549 
17550  float ccctest = 0; // to avoid empty massive elements
17551  for (int jphi = 0; jphi < nphi; jphi++) {
17552  // cout<<"888 initial kcountHEnegativedirectionReconoise5 = "<<kcountHEnegativedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" areconoisehe[i][jeta][jphi]= "<< areconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
17553 
17554  double ccc1 = areconoisehe[i][jeta][jphi];
17555  if (ccc1 != 0.) {
17556  HEnegativedirectionReconoise5->Fill(jphi, ccc1);
17557  ccctest = 1.; //HEnegativedirectionReconoise5->SetBinError(i,0.01);
17558  }
17559  } // for jphi
17560  if (ccctest > 0.) {
17561  //cout<<"888 kcountHEnegativedirectionReconoise5 = "<<kcountHEnegativedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<endl;
17562  c3x5->cd(kcountHEnegativedirectionReconoise5);
17563  HEnegativedirectionReconoise5->SetMarkerStyle(20);
17564  HEnegativedirectionReconoise5->SetMarkerSize(0.4);
17565  HEnegativedirectionReconoise5->GetYaxis()->SetLabelSize(0.04);
17566  HEnegativedirectionReconoise5->SetXTitle("HEnegativedirectionReconoise5 \b");
17567  HEnegativedirectionReconoise5->SetMarkerColor(2);
17568  HEnegativedirectionReconoise5->SetLineColor(0);
17569  gPad->SetGridy();
17570  gPad->SetGridx();
17571  // gPad->SetLogy();
17572  if (kcountHEnegativedirectionReconoise5 == 1)
17573  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
17574  if (kcountHEnegativedirectionReconoise5 == 2)
17575  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
17576  if (kcountHEnegativedirectionReconoise5 == 3)
17577  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
17578  if (kcountHEnegativedirectionReconoise5 == 4)
17579  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
17580  if (kcountHEnegativedirectionReconoise5 == 5)
17581  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
17582  if (kcountHEnegativedirectionReconoise5 == 6)
17583  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
17584  if (kcountHEnegativedirectionReconoise5 == 7)
17585  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
17586  if (kcountHEnegativedirectionReconoise5 == 8)
17587  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
17588  if (kcountHEnegativedirectionReconoise5 == 9)
17589  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
17590  if (kcountHEnegativedirectionReconoise5 == 10)
17591  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
17592  if (kcountHEnegativedirectionReconoise5 == 11)
17593  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
17594  HEnegativedirectionReconoise5->Draw("Error");
17595  kcountHEnegativedirectionReconoise5++;
17596  if (kcountHEnegativedirectionReconoise5 > 11)
17597  break; // 4x6 = 24
17598  } //ccctest>0
17599 
17600  } // for i
17601  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17602  } //for jeta
17604  c3x5->Update();
17605  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
17606  c3x5->Clear();
17607  // clean-up
17608  if (h2CeffHEnegativedirectionReconoise5)
17609  delete h2CeffHEnegativedirectionReconoise5;
17610  //========================================================================================== 1119
17611  //======================================================================
17612  //======================================================================1D plot: R vs phi , different eta, depth=6
17613  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
17614  c3x5->Clear();
17616  c3x5->Divide(3, 5);
17617  c3x5->cd(1);
17618  int kcountHEnegativedirectionReconoise6 = 1;
17619  TH1F *h2CeffHEnegativedirectionReconoise6 = new TH1F("h2CeffHEnegativedirectionReconoise6", "", nphi, 0., 72.);
17620 
17621  for (int jeta = 0; jeta < njeta; jeta++) {
17622  // negativedirectionReconoise:
17623  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17624  // for (int i=0;i<ndepth;i++) {
17625  // depth=6
17626  for (int i = 5; i < 6; i++) {
17627  TH1F *HEnegativedirectionReconoise6 = (TH1F *)h2CeffHEnegativedirectionReconoise6->Clone("twod1");
17628 
17629  float ccctest = 0; // to avoid empty massive elements
17630  for (int jphi = 0; jphi < nphi; jphi++) {
17631  double ccc1 = areconoisehe[i][jeta][jphi];
17632  if (ccc1 != 0.) {
17633  HEnegativedirectionReconoise6->Fill(jphi, ccc1);
17634  ccctest = 1.; //HEnegativedirectionReconoise6->SetBinError(i,0.01);
17635  }
17636  } // for jphi
17637  if (ccctest > 0.) {
17638  //cout<<"999 kcountHEnegativedirectionReconoise6 = "<<kcountHEnegativedirectionReconoise6 <<" jeta-41= "<< jeta-41 <<endl;
17639  c3x5->cd(kcountHEnegativedirectionReconoise6);
17640  HEnegativedirectionReconoise6->SetMarkerStyle(20);
17641  HEnegativedirectionReconoise6->SetMarkerSize(0.4);
17642  HEnegativedirectionReconoise6->GetYaxis()->SetLabelSize(0.04);
17643  HEnegativedirectionReconoise6->SetXTitle("HEnegativedirectionReconoise6 \b");
17644  HEnegativedirectionReconoise6->SetMarkerColor(2);
17645  HEnegativedirectionReconoise6->SetLineColor(0);
17646  gPad->SetGridy();
17647  gPad->SetGridx();
17648  // gPad->SetLogy();
17649  if (kcountHEnegativedirectionReconoise6 == 1)
17650  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
17651  if (kcountHEnegativedirectionReconoise6 == 2)
17652  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
17653  if (kcountHEnegativedirectionReconoise6 == 3)
17654  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
17655  if (kcountHEnegativedirectionReconoise6 == 4)
17656  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
17657  if (kcountHEnegativedirectionReconoise6 == 5)
17658  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
17659  if (kcountHEnegativedirectionReconoise6 == 6)
17660  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
17661  if (kcountHEnegativedirectionReconoise6 == 7)
17662  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
17663  if (kcountHEnegativedirectionReconoise6 == 8)
17664  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
17665  if (kcountHEnegativedirectionReconoise6 == 9)
17666  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
17667  if (kcountHEnegativedirectionReconoise6 == 10)
17668  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
17669  HEnegativedirectionReconoise6->Draw("Error");
17670  kcountHEnegativedirectionReconoise6++;
17671  if (kcountHEnegativedirectionReconoise6 > 10)
17672  break; // 4x6 = 24
17673  } //ccctest>0
17674 
17675  } // for i
17676  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17677  } //for jeta
17679  c3x5->Update();
17680  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
17681  c3x5->Clear();
17682  // clean-up
17683  if (h2CeffHEnegativedirectionReconoise6)
17684  delete h2CeffHEnegativedirectionReconoise6;
17685  //========================================================================================== 11110
17686  //======================================================================
17687  //======================================================================1D plot: R vs phi , different eta, depth=7
17688  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
17689  c3x5->Clear();
17691  c3x5->Divide(3, 5);
17692  c3x5->cd(1);
17693  int kcountHEnegativedirectionReconoise7 = 1;
17694  TH1F *h2CeffHEnegativedirectionReconoise7 = new TH1F("h2CeffHEnegativedirectionReconoise7", "", nphi, 0., 72.);
17695 
17696  for (int jeta = 0; jeta < njeta; jeta++) {
17697  // negativedirectionReconoise:
17698  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17699  // for (int i=0;i<ndepth;i++) {
17700  // depth=7
17701  for (int i = 6; i < 7; i++) {
17702  TH1F *HEnegativedirectionReconoise7 = (TH1F *)h2CeffHEnegativedirectionReconoise7->Clone("twod1");
17703 
17704  float ccctest = 0; // to avoid empty massive elements
17705  for (int jphi = 0; jphi < nphi; jphi++) {
17706  double ccc1 = areconoisehe[i][jeta][jphi];
17707  if (ccc1 != 0.) {
17708  HEnegativedirectionReconoise7->Fill(jphi, ccc1);
17709  ccctest = 1.; //HEnegativedirectionReconoise7->SetBinError(i,0.01);
17710  }
17711  } // for jphi
17712  if (ccctest > 0.) {
17713  //cout<<"1010 kcountHEnegativedirectionReconoise7 = "<<kcountHEnegativedirectionReconoise7 <<" jeta-41= "<< jeta-41 <<endl;
17714  c3x5->cd(kcountHEnegativedirectionReconoise7);
17715  HEnegativedirectionReconoise7->SetMarkerStyle(20);
17716  HEnegativedirectionReconoise7->SetMarkerSize(0.4);
17717  HEnegativedirectionReconoise7->GetYaxis()->SetLabelSize(0.04);
17718  HEnegativedirectionReconoise7->SetXTitle("HEnegativedirectionReconoise7 \b");
17719  HEnegativedirectionReconoise7->SetMarkerColor(2);
17720  HEnegativedirectionReconoise7->SetLineColor(0);
17721  gPad->SetGridy();
17722  gPad->SetGridx();
17723  // gPad->SetLogy();
17724  if (kcountHEnegativedirectionReconoise7 == 1)
17725  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
17726  if (kcountHEnegativedirectionReconoise7 == 2)
17727  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
17728  if (kcountHEnegativedirectionReconoise7 == 3)
17729  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
17730  HEnegativedirectionReconoise7->Draw("Error");
17731  kcountHEnegativedirectionReconoise7++;
17732  if (kcountHEnegativedirectionReconoise7 > 3)
17733  break; // 4x6 = 24
17734  } //ccctest>0
17735 
17736  } // for i
17737  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17738  } //for jeta
17740  c3x5->Update();
17741  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
17742  c3x5->Clear();
17743  // clean-up
17744  if (h2CeffHEnegativedirectionReconoise7)
17745  delete h2CeffHEnegativedirectionReconoise7;
17746 
17747  //======================================================================================================================
17748  //======================================================================================================================
17750  //======================================================================================================================
17751  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HE
17752  //======================================================================================================================
17753  //======================================================================
17754  c2x1->Clear();
17756  c2x1->Divide(2, 1);
17757  c2x1->cd(1);
17758  TH2F *GefzDIFreconoiseHE42D = new TH2F("GefzDIFreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
17759  TH2F *GefzDIFreconoiseHE42D0 = new TH2F("GefzDIFreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
17760  TH2F *GefzDIFreconoiseHE42DF = (TH2F *)GefzDIFreconoiseHE42D0->Clone("GefzDIFreconoiseHE42DF");
17761  for (int i = 0; i < ndepth; i++) {
17762  for (int jeta = 0; jeta < neta; jeta++) {
17763  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
17764  for (int jphi = 0; jphi < nphi; jphi++) {
17765  double ccc1 = breconoisehe[i][jeta][jphi];
17766  int k2plot = jeta - 41;
17767  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
17768  if (ccc1 != 0.) {
17769  GefzDIFreconoiseHE42D->Fill(kkk, jphi, ccc1);
17770  GefzDIFreconoiseHE42D0->Fill(kkk, jphi, 1.);
17771  }
17772  }
17773  }
17774  }
17775  }
17776  GefzDIFreconoiseHE42DF->Divide(GefzDIFreconoiseHE42D, GefzDIFreconoiseHE42D0, 1, 1, "B"); // average A
17777  gPad->SetGridy();
17778  gPad->SetGridx(); // gPad->SetLogz();
17779  GefzDIFreconoiseHE42DF->SetXTitle("<DIF>_depth #eta \b");
17780  GefzDIFreconoiseHE42DF->SetYTitle(" #phi \b");
17781  GefzDIFreconoiseHE42DF->Draw("COLZ");
17782 
17783  //c2x1->cd(2);
17784  //TH1F *energyhitNoise_HE= (TH1F*)dir->FindObjectAny("h_energyhitNoise_HE");
17785  //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");
17786 
17788  c2x1->Update();
17789  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHE.png");
17790  c2x1->Clear();
17791  // clean-up
17792  if (GefzDIFreconoiseHE42D)
17793  delete GefzDIFreconoiseHE42D;
17794  if (GefzDIFreconoiseHE42D0)
17795  delete GefzDIFreconoiseHE42D0;
17796  if (GefzDIFreconoiseHE42DF)
17797  delete GefzDIFreconoiseHE42DF;
17798  //====================================================================== 1D plot: DIF vs phi , averaged over depthes & eta
17799  //======================================================================
17800  //cout<<" 1D plot: DIF vs phi , averaged over depthes & eta *****" <<endl;
17801  c1x1->Clear();
17803  c1x1->Divide(1, 1);
17804  c1x1->cd(1);
17805  TH1F *GefzDIFreconoiseHE41D = new TH1F("GefzDIFreconoiseHE41D", "", nphi, 0., 72.);
17806  TH1F *GefzDIFreconoiseHE41D0 = new TH1F("GefzDIFreconoiseHE41D0", "", nphi, 0., 72.);
17807  TH1F *GefzDIFreconoiseHE41DF = (TH1F *)GefzDIFreconoiseHE41D0->Clone("GefzDIFreconoiseHE41DF");
17808  for (int jphi = 0; jphi < nphi; jphi++) {
17809  for (int jeta = 0; jeta < neta; jeta++) {
17810  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
17811  for (int i = 0; i < ndepth; i++) {
17812  double ccc1 = breconoisehe[i][jeta][jphi];
17813  if (ccc1 != 0.) {
17814  GefzDIFreconoiseHE41D->Fill(jphi, ccc1);
17815  GefzDIFreconoiseHE41D0->Fill(jphi, 1.);
17816  }
17817  }
17818  }
17819  }
17820  }
17821  GefzDIFreconoiseHE41DF->Divide(
17822  GefzDIFreconoiseHE41D, GefzDIFreconoiseHE41D0, 1, 1, "B"); // DIF averaged over depthes & eta
17823  GefzDIFreconoiseHE41D0->Sumw2();
17824  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHE41DF->SetBinError(jphi,0.01);}
17825  gPad->SetGridy();
17826  gPad->SetGridx(); // gPad->SetLogz();
17827  GefzDIFreconoiseHE41DF->SetMarkerStyle(20);
17828  GefzDIFreconoiseHE41DF->SetMarkerSize(1.4);
17829  GefzDIFreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
17830  GefzDIFreconoiseHE41DF->SetXTitle("#phi \b");
17831  GefzDIFreconoiseHE41DF->SetYTitle(" <DIF> \b");
17832  GefzDIFreconoiseHE41DF->SetZTitle("<DIF>_PHI - AllDepthes \b");
17833  GefzDIFreconoiseHE41DF->SetMarkerColor(4);
17834  GefzDIFreconoiseHE41DF->SetLineColor(
17835  4); // GefzDIFreconoiseHE41DF->SetMinimum(0.8); // GefzDIFreconoiseHE41DF->SetMaximum(1.000);
17836  GefzDIFreconoiseHE41DF->Draw("Error");
17838  c1x1->Update();
17839  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHE.png");
17840  c1x1->Clear();
17841  // clean-up
17842  if (GefzDIFreconoiseHE41D)
17843  delete GefzDIFreconoiseHE41D;
17844  if (GefzDIFreconoiseHE41D0)
17845  delete GefzDIFreconoiseHE41D0;
17846  if (GefzDIFreconoiseHE41DF)
17847  delete GefzDIFreconoiseHE41DF;
17848 
17849  //========================================================================================== 4
17850  //======================================================================
17851  //======================================================================1D plot: DIF vs phi , different eta, depth=1
17852  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
17853  c3x5->Clear();
17855  c3x5->Divide(3, 5);
17856  c3x5->cd(1);
17857  int kcountHEpositivedirectionReconoiseDIF1 = 1;
17858  TH1F *h2CeffHEpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
17859  for (int jeta = 0; jeta < njeta; jeta++) {
17860  // positivedirectionReconoiseDIF:
17861  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17862  // for (int i=0;i<ndepth;i++) {
17863  // depth=1
17864  for (int i = 0; i < 1; i++) {
17865  TH1F *HEpositivedirectionReconoiseDIF1 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF1->Clone("twod1");
17866  float ccctest = 0; // to avoid empty massive elements
17867  for (int jphi = 0; jphi < nphi; jphi++) {
17868  double ccc1 = breconoisehe[i][jeta][jphi];
17869  if (ccc1 != 0.) {
17870  HEpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
17871  ccctest = 1.; //HEpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
17872  }
17873  } // for jphi
17874  if (ccctest > 0.) {
17875  // cout<<"444 kcountHEpositivedirectionReconoiseDIF1 = "<<kcountHEpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
17876  c3x5->cd(kcountHEpositivedirectionReconoiseDIF1);
17877  HEpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
17878  HEpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
17879  HEpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
17880  HEpositivedirectionReconoiseDIF1->SetXTitle("HEpositivedirectionReconoiseDIF1 \b");
17881  HEpositivedirectionReconoiseDIF1->SetMarkerColor(2);
17882  HEpositivedirectionReconoiseDIF1->SetLineColor(0);
17883  gPad->SetGridy();
17884  gPad->SetGridx();
17885  // gPad->SetLogy();
17886  if (kcountHEpositivedirectionReconoiseDIF1 == 1)
17887  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 17; depth = 1 \b");
17888  if (kcountHEpositivedirectionReconoiseDIF1 == 2)
17889  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 18; depth = 1 \b");
17890  if (kcountHEpositivedirectionReconoiseDIF1 == 3)
17891  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 19; depth = 1 \b");
17892  if (kcountHEpositivedirectionReconoiseDIF1 == 4)
17893  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 20; depth = 1 \b");
17894  if (kcountHEpositivedirectionReconoiseDIF1 == 5)
17895  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 21; depth = 1 \b");
17896  if (kcountHEpositivedirectionReconoiseDIF1 == 6)
17897  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 22; depth = 1 \b");
17898  if (kcountHEpositivedirectionReconoiseDIF1 == 7)
17899  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 23; depth = 1 \b");
17900  if (kcountHEpositivedirectionReconoiseDIF1 == 8)
17901  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 24; depth = 1 \b");
17902  if (kcountHEpositivedirectionReconoiseDIF1 == 9)
17903  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 25; depth = 1 \b");
17904  if (kcountHEpositivedirectionReconoiseDIF1 == 10)
17905  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 26; depth = 1 \b");
17906  if (kcountHEpositivedirectionReconoiseDIF1 == 11)
17907  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 27; depth = 1 \b");
17908  if (kcountHEpositivedirectionReconoiseDIF1 == 12)
17909  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 28; depth = 1 \b");
17910  HEpositivedirectionReconoiseDIF1->Draw("Error");
17911  kcountHEpositivedirectionReconoiseDIF1++;
17912  if (kcountHEpositivedirectionReconoiseDIF1 > 12)
17913  break; // 4x6 = 24
17914  } //ccctest>0
17915 
17916  } // for i
17917  } //if(jeta-41 >= 15 && jeta-41 <= 28
17918  } //for jeta
17920  c3x5->Update();
17921  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
17922  c3x5->Clear();
17923  // clean-up
17924  if (h2CeffHEpositivedirectionReconoiseDIF1)
17925  delete h2CeffHEpositivedirectionReconoiseDIF1;
17926 
17927  //========================================================================================== 5
17928  //======================================================================
17929  //======================================================================1D plot: R vs phi , different eta, depth=2
17930  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
17931  c3x5->Clear();
17933  c3x5->Divide(3, 5);
17934  c3x5->cd(1);
17935  int kcountHEpositivedirectionReconoiseDIF2 = 1;
17936  TH1F *h2CeffHEpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
17937  for (int jeta = 0; jeta < njeta; jeta++) {
17938  // positivedirectionReconoiseDIF:
17939  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17940  // for (int i=0;i<ndepth;i++) {
17941  // depth=2
17942  for (int i = 1; i < 2; i++) {
17943  TH1F *HEpositivedirectionReconoiseDIF2 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF2->Clone("twod1");
17944  float ccctest = 0; // to avoid empty massive elements
17945  for (int jphi = 0; jphi < nphi; jphi++) {
17946  double ccc1 = breconoisehe[i][jeta][jphi];
17947  if (ccc1 != 0.) {
17948  HEpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
17949  ccctest = 1.; //HEpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
17950  }
17951  } // for jphi
17952  if (ccctest > 0.) {
17953  //cout<<"555 kcountHEpositivedirectionReconoiseDIF2 = "<<kcountHEpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
17954  c3x5->cd(kcountHEpositivedirectionReconoiseDIF2);
17955  HEpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
17956  HEpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
17957  HEpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
17958  HEpositivedirectionReconoiseDIF2->SetXTitle("HEpositivedirectionReconoiseDIF2 \b");
17959  HEpositivedirectionReconoiseDIF2->SetMarkerColor(2);
17960  HEpositivedirectionReconoiseDIF2->SetLineColor(0);
17961  gPad->SetGridy();
17962  gPad->SetGridx();
17963  // gPad->SetLogy();
17964  if (kcountHEpositivedirectionReconoiseDIF2 == 1)
17965  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 16; depth = 2 \b");
17966  if (kcountHEpositivedirectionReconoiseDIF2 == 2)
17967  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 17; depth = 2 \b");
17968  if (kcountHEpositivedirectionReconoiseDIF2 == 3)
17969  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 18; depth = 2 \b");
17970  if (kcountHEpositivedirectionReconoiseDIF2 == 4)
17971  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 19; depth = 2 \b");
17972  if (kcountHEpositivedirectionReconoiseDIF2 == 5)
17973  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 20; depth = 2 \b");
17974  if (kcountHEpositivedirectionReconoiseDIF2 == 6)
17975  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 21; depth = 2 \b");
17976  if (kcountHEpositivedirectionReconoiseDIF2 == 7)
17977  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 22; depth = 2 \b");
17978  if (kcountHEpositivedirectionReconoiseDIF2 == 8)
17979  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 23; depth = 2 \b");
17980  if (kcountHEpositivedirectionReconoiseDIF2 == 9)
17981  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 24; depth = 2 \b");
17982  if (kcountHEpositivedirectionReconoiseDIF2 == 10)
17983  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 25; depth = 2 \b");
17984  if (kcountHEpositivedirectionReconoiseDIF2 == 11)
17985  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 26; depth = 2 \b");
17986  if (kcountHEpositivedirectionReconoiseDIF2 == 12)
17987  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 27; depth = 2 \b");
17988  if (kcountHEpositivedirectionReconoiseDIF2 == 13)
17989  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 28; depth = 2 \b");
17990  HEpositivedirectionReconoiseDIF2->Draw("Error");
17991  kcountHEpositivedirectionReconoiseDIF2++;
17992  if (kcountHEpositivedirectionReconoiseDIF2 > 13)
17993  break; // 4x6 = 24
17994  } //ccctest>0
17995 
17996  } // for i
17997  } //if(jeta-41
17998  } //for jeta
18000  c3x5->Update();
18001  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
18002  c3x5->Clear();
18003  // clean-up
18004  if (h2CeffHEpositivedirectionReconoiseDIF2)
18005  delete h2CeffHEpositivedirectionReconoiseDIF2;
18006  //========================================================================================== 6
18007  //======================================================================
18008  //======================================================================1D plot: R vs phi , different eta, depth=3
18009  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
18010  c3x5->Clear();
18012  c3x5->Divide(3, 5);
18013  c3x5->cd(1);
18014  int kcountHEpositivedirectionReconoiseDIF3 = 1;
18015  TH1F *h2CeffHEpositivedirectionReconoiseDIF3 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF3", "", nphi, 0., 72.);
18016  for (int jeta = 0; jeta < njeta; jeta++) {
18017  // positivedirectionReconoiseDIF:
18018  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18019  // for (int i=0;i<ndepth;i++) {
18020  // depth=3
18021  for (int i = 2; i < 3; i++) {
18022  TH1F *HEpositivedirectionReconoiseDIF3 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF3->Clone("twod1");
18023  float ccctest = 0; // to avoid empty massive elements
18024  for (int jphi = 0; jphi < nphi; jphi++) {
18025  double ccc1 = breconoisehe[i][jeta][jphi];
18026  if (ccc1 != 0.) {
18027  HEpositivedirectionReconoiseDIF3->Fill(jphi, ccc1);
18028  ccctest = 1.; //HEpositivedirectionReconoiseDIF3->SetBinError(i,0.01);
18029  }
18030  } // for jphi
18031  if (ccctest > 0.) {
18032  //cout<<"666 kcountHEpositivedirectionReconoiseDIF3 = "<<kcountHEpositivedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
18033  c3x5->cd(kcountHEpositivedirectionReconoiseDIF3);
18034  HEpositivedirectionReconoiseDIF3->SetMarkerStyle(20);
18035  HEpositivedirectionReconoiseDIF3->SetMarkerSize(0.4);
18036  HEpositivedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
18037  HEpositivedirectionReconoiseDIF3->SetXTitle("HEpositivedirectionReconoiseDIF3 \b");
18038  HEpositivedirectionReconoiseDIF3->SetMarkerColor(2);
18039  HEpositivedirectionReconoiseDIF3->SetLineColor(0);
18040  gPad->SetGridy();
18041  gPad->SetGridx();
18042  // gPad->SetLogy();
18043  if (kcountHEpositivedirectionReconoiseDIF3 == 1)
18044  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 16; depth = 3 \b");
18045  if (kcountHEpositivedirectionReconoiseDIF3 == 2)
18046  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 17; depth = 3 \b");
18047  if (kcountHEpositivedirectionReconoiseDIF3 == 3)
18048  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 18; depth = 3 \b");
18049  if (kcountHEpositivedirectionReconoiseDIF3 == 4)
18050  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 19; depth = 3 \b");
18051  if (kcountHEpositivedirectionReconoiseDIF3 == 5)
18052  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 20; depth = 3 \b");
18053  if (kcountHEpositivedirectionReconoiseDIF3 == 6)
18054  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 21; depth = 3 \b");
18055  if (kcountHEpositivedirectionReconoiseDIF3 == 7)
18056  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 22; depth = 3 \b");
18057  if (kcountHEpositivedirectionReconoiseDIF3 == 8)
18058  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 23; depth = 3 \b");
18059  if (kcountHEpositivedirectionReconoiseDIF3 == 9)
18060  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 24; depth = 3 \b");
18061  if (kcountHEpositivedirectionReconoiseDIF3 == 10)
18062  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 25; depth = 3 \b");
18063  if (kcountHEpositivedirectionReconoiseDIF3 == 11)
18064  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 26; depth = 3 \b");
18065  if (kcountHEpositivedirectionReconoiseDIF3 == 12)
18066  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 27; depth = 3 \b");
18067  if (kcountHEpositivedirectionReconoiseDIF3 == 13)
18068  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 28; depth = 3 \b");
18069  HEpositivedirectionReconoiseDIF3->Draw("Error");
18070  kcountHEpositivedirectionReconoiseDIF3++;
18071  if (kcountHEpositivedirectionReconoiseDIF3 > 13)
18072  break; // 4x6 = 24
18073  } //ccctest>0
18074 
18075  } // for i
18076  } //if(jeta-41 >=
18077  } //for jeta
18079  c3x5->Update();
18080  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
18081  c3x5->Clear();
18082  // clean-up
18083  if (h2CeffHEpositivedirectionReconoiseDIF3)
18084  delete h2CeffHEpositivedirectionReconoiseDIF3;
18085  //========================================================================================== 7
18086  //======================================================================
18087  //======================================================================1D plot: R vs phi , different eta, depth=4
18088  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
18089  c3x5->Clear();
18091  c3x5->Divide(3, 5);
18092  c3x5->cd(1);
18093  int kcountHEpositivedirectionReconoiseDIF4 = 1;
18094  TH1F *h2CeffHEpositivedirectionReconoiseDIF4 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF4", "", nphi, 0., 72.);
18095 
18096  for (int jeta = 0; jeta < njeta; jeta++) {
18097  // positivedirectionReconoiseDIF:
18098  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18099  // for (int i=0;i<ndepth;i++) {
18100  // depth=4
18101  for (int i = 3; i < 4; i++) {
18102  TH1F *HEpositivedirectionReconoiseDIF4 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF4->Clone("twod1");
18103 
18104  float ccctest = 0; // to avoid empty massive elements
18105  for (int jphi = 0; jphi < nphi; jphi++) {
18106  double ccc1 = breconoisehe[i][jeta][jphi];
18107  if (ccc1 != 0.) {
18108  HEpositivedirectionReconoiseDIF4->Fill(jphi, ccc1);
18109  ccctest = 1.; //HEpositivedirectionReconoiseDIF4->SetBinError(i,0.01);
18110  }
18111  } // for jphi
18112  if (ccctest > 0.) {
18113  //cout<<"777 kcountHEpositivedirectionReconoiseDIF4 = "<<kcountHEpositivedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
18114  c3x5->cd(kcountHEpositivedirectionReconoiseDIF4);
18115  HEpositivedirectionReconoiseDIF4->SetMarkerStyle(20);
18116  HEpositivedirectionReconoiseDIF4->SetMarkerSize(0.4);
18117  HEpositivedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
18118  HEpositivedirectionReconoiseDIF4->SetXTitle("HEpositivedirectionReconoiseDIF4 \b");
18119  HEpositivedirectionReconoiseDIF4->SetMarkerColor(2);
18120  HEpositivedirectionReconoiseDIF4->SetLineColor(0);
18121  gPad->SetGridy();
18122  gPad->SetGridx();
18123  // gPad->SetLogy();
18124  if (kcountHEpositivedirectionReconoiseDIF4 == 1)
18125  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 15; depth = 4 \b");
18126  if (kcountHEpositivedirectionReconoiseDIF4 == 2)
18127  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 17; depth = 4 \b");
18128  if (kcountHEpositivedirectionReconoiseDIF4 == 3)
18129  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 18; depth = 4 \b");
18130  if (kcountHEpositivedirectionReconoiseDIF4 == 4)
18131  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 19; depth = 4 \b");
18132  if (kcountHEpositivedirectionReconoiseDIF4 == 5)
18133  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 20; depth = 4 \b");
18134  if (kcountHEpositivedirectionReconoiseDIF4 == 6)
18135  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 21; depth = 4 \b");
18136  if (kcountHEpositivedirectionReconoiseDIF4 == 7)
18137  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 22; depth = 4 \b");
18138  if (kcountHEpositivedirectionReconoiseDIF4 == 8)
18139  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 23; depth = 4 \b");
18140  if (kcountHEpositivedirectionReconoiseDIF4 == 9)
18141  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 24; depth = 4 \b");
18142  if (kcountHEpositivedirectionReconoiseDIF4 == 10)
18143  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 25; depth = 4 \b");
18144  if (kcountHEpositivedirectionReconoiseDIF4 == 11)
18145  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 26; depth = 4 \b");
18146  if (kcountHEpositivedirectionReconoiseDIF4 == 12)
18147  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 27; depth = 4 \b");
18148  HEpositivedirectionReconoiseDIF4->Draw("Error");
18149  kcountHEpositivedirectionReconoiseDIF4++;
18150  if (kcountHEpositivedirectionReconoiseDIF4 > 12)
18151  break; // 4x6 = 24
18152  } //ccctest>0
18153 
18154  } // for i
18155  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18156  } //for jeta
18158  c3x5->Update();
18159  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
18160  c3x5->Clear();
18161  // clean-up
18162  if (h2CeffHEpositivedirectionReconoiseDIF4)
18163  delete h2CeffHEpositivedirectionReconoiseDIF4;
18164  //========================================================================================== 8
18165  //======================================================================
18166  //======================================================================1D plot: R vs phi , different eta, depth=5
18167  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
18168  c3x5->Clear();
18170  c3x5->Divide(3, 5);
18171  c3x5->cd(1);
18172  int kcountHEpositivedirectionReconoiseDIF5 = 1;
18173  TH1F *h2CeffHEpositivedirectionReconoiseDIF5 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF5", "", nphi, 0., 72.);
18174 
18175  for (int jeta = 0; jeta < njeta; jeta++) {
18176  // positivedirectionReconoiseDIF:
18177  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18178  // for (int i=0;i<ndepth;i++) {
18179  // depth=5
18180  for (int i = 4; i < 5; i++) {
18181  TH1F *HEpositivedirectionReconoiseDIF5 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF5->Clone("twod1");
18182 
18183  float ccctest = 0; // to avoid empty massive elements
18184  for (int jphi = 0; jphi < nphi; jphi++) {
18185  // cout<<"888 initial kcountHEpositivedirectionReconoiseDIF5 = "<<kcountHEpositivedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" breconoisehe[i][jeta][jphi]= "<< breconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
18186 
18187  double ccc1 = breconoisehe[i][jeta][jphi];
18188  if (ccc1 != 0.) {
18189  HEpositivedirectionReconoiseDIF5->Fill(jphi, ccc1);
18190  ccctest = 1.; //HEpositivedirectionReconoiseDIF5->SetBinError(i,0.01);
18191  }
18192  } // for jphi
18193  if (ccctest > 0.) {
18194  //cout<<"888 kcountHEpositivedirectionReconoiseDIF5 = "<<kcountHEpositivedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<endl;
18195  c3x5->cd(kcountHEpositivedirectionReconoiseDIF5);
18196  HEpositivedirectionReconoiseDIF5->SetMarkerStyle(20);
18197  HEpositivedirectionReconoiseDIF5->SetMarkerSize(0.4);
18198  HEpositivedirectionReconoiseDIF5->GetYaxis()->SetLabelSize(0.04);
18199  HEpositivedirectionReconoiseDIF5->SetXTitle("HEpositivedirectionReconoiseDIF5 \b");
18200  HEpositivedirectionReconoiseDIF5->SetMarkerColor(2);
18201  HEpositivedirectionReconoiseDIF5->SetLineColor(0);
18202  gPad->SetGridy();
18203  gPad->SetGridx();
18204  // gPad->SetLogy();
18205  if (kcountHEpositivedirectionReconoiseDIF5 == 1)
18206  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 17; depth = 5 \b");
18207  if (kcountHEpositivedirectionReconoiseDIF5 == 2)
18208  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 18; depth = 5 \b");
18209  if (kcountHEpositivedirectionReconoiseDIF5 == 3)
18210  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 19; depth = 5 \b");
18211  if (kcountHEpositivedirectionReconoiseDIF5 == 4)
18212  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 20; depth = 5 \b");
18213  if (kcountHEpositivedirectionReconoiseDIF5 == 5)
18214  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 21; depth = 5 \b");
18215  if (kcountHEpositivedirectionReconoiseDIF5 == 6)
18216  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 22; depth = 5 \b");
18217  if (kcountHEpositivedirectionReconoiseDIF5 == 7)
18218  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 23; depth = 5 \b");
18219  if (kcountHEpositivedirectionReconoiseDIF5 == 8)
18220  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 24; depth = 5 \b");
18221  if (kcountHEpositivedirectionReconoiseDIF5 == 9)
18222  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 25; depth = 5 \b");
18223  if (kcountHEpositivedirectionReconoiseDIF5 == 10)
18224  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 26; depth = 5 \b");
18225  if (kcountHEpositivedirectionReconoiseDIF5 == 11)
18226  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 27; depth = 5 \b");
18227  HEpositivedirectionReconoiseDIF5->Draw("Error");
18228  kcountHEpositivedirectionReconoiseDIF5++;
18229  if (kcountHEpositivedirectionReconoiseDIF5 > 11)
18230  break; // 4x6 = 24
18231  } //ccctest>0
18232 
18233  } // for i
18234  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18235  } //for jeta
18237  c3x5->Update();
18238  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
18239  c3x5->Clear();
18240  // clean-up
18241  if (h2CeffHEpositivedirectionReconoiseDIF5)
18242  delete h2CeffHEpositivedirectionReconoiseDIF5;
18243  //========================================================================================== 9
18244  //======================================================================
18245  //======================================================================1D plot: R vs phi , different eta, depth=6
18246  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
18247  c3x5->Clear();
18249  c3x5->Divide(3, 5);
18250  c3x5->cd(1);
18251  int kcountHEpositivedirectionReconoiseDIF6 = 1;
18252  TH1F *h2CeffHEpositivedirectionReconoiseDIF6 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF6", "", nphi, 0., 72.);
18253 
18254  for (int jeta = 0; jeta < njeta; jeta++) {
18255  // positivedirectionReconoiseDIF:
18256  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18257  // for (int i=0;i<ndepth;i++) {
18258  // depth=6
18259  for (int i = 5; i < 6; i++) {
18260  TH1F *HEpositivedirectionReconoiseDIF6 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF6->Clone("twod1");
18261 
18262  float ccctest = 0; // to avoid empty massive elements
18263  for (int jphi = 0; jphi < nphi; jphi++) {
18264  double ccc1 = breconoisehe[i][jeta][jphi];
18265  if (ccc1 != 0.) {
18266  HEpositivedirectionReconoiseDIF6->Fill(jphi, ccc1);
18267  ccctest = 1.; //HEpositivedirectionReconoiseDIF6->SetBinError(i,0.01);
18268  }
18269  } // for jphi
18270  if (ccctest > 0.) {
18271  //cout<<"999 kcountHEpositivedirectionReconoiseDIF6 = "<<kcountHEpositivedirectionReconoiseDIF6 <<" jeta-41= "<< jeta-41 <<endl;
18272  c3x5->cd(kcountHEpositivedirectionReconoiseDIF6);
18273  HEpositivedirectionReconoiseDIF6->SetMarkerStyle(20);
18274  HEpositivedirectionReconoiseDIF6->SetMarkerSize(0.4);
18275  HEpositivedirectionReconoiseDIF6->GetYaxis()->SetLabelSize(0.04);
18276  HEpositivedirectionReconoiseDIF6->SetXTitle("HEpositivedirectionReconoiseDIF6 \b");
18277  HEpositivedirectionReconoiseDIF6->SetMarkerColor(2);
18278  HEpositivedirectionReconoiseDIF6->SetLineColor(0);
18279  gPad->SetGridy();
18280  gPad->SetGridx();
18281  // gPad->SetLogy();
18282  if (kcountHEpositivedirectionReconoiseDIF6 == 1)
18283  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 18; depth = 6 \b");
18284  if (kcountHEpositivedirectionReconoiseDIF6 == 2)
18285  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 19; depth = 6 \b");
18286  if (kcountHEpositivedirectionReconoiseDIF6 == 3)
18287  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 20; depth = 6 \b");
18288  if (kcountHEpositivedirectionReconoiseDIF6 == 4)
18289  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 21; depth = 6 \b");
18290  if (kcountHEpositivedirectionReconoiseDIF6 == 5)
18291  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 22; depth = 6 \b");
18292  if (kcountHEpositivedirectionReconoiseDIF6 == 6)
18293  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 23; depth = 6 \b");
18294  if (kcountHEpositivedirectionReconoiseDIF6 == 7)
18295  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 24; depth = 6 \b");
18296  if (kcountHEpositivedirectionReconoiseDIF6 == 8)
18297  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 25; depth = 6 \b");
18298  if (kcountHEpositivedirectionReconoiseDIF6 == 9)
18299  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 26; depth = 6 \b");
18300  if (kcountHEpositivedirectionReconoiseDIF6 == 10)
18301  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 27; depth = 6 \b");
18302  HEpositivedirectionReconoiseDIF6->Draw("Error");
18303  kcountHEpositivedirectionReconoiseDIF6++;
18304  if (kcountHEpositivedirectionReconoiseDIF6 > 10)
18305  break; // 4x6 = 24
18306  } //ccctest>0
18307 
18308  } // for i
18309  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18310  } //for jeta
18312  c3x5->Update();
18313  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
18314  c3x5->Clear();
18315  // clean-up
18316  if (h2CeffHEpositivedirectionReconoiseDIF6)
18317  delete h2CeffHEpositivedirectionReconoiseDIF6;
18318  //========================================================================================== 10
18319  //======================================================================
18320  //======================================================================1D plot: R vs phi , different eta, depth=7
18321  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
18322  c3x5->Clear();
18324  c3x5->Divide(3, 5);
18325  c3x5->cd(1);
18326  int kcountHEpositivedirectionReconoiseDIF7 = 1;
18327  TH1F *h2CeffHEpositivedirectionReconoiseDIF7 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF7", "", nphi, 0., 72.);
18328 
18329  for (int jeta = 0; jeta < njeta; jeta++) {
18330  // positivedirectionReconoiseDIF:
18331  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18332  // for (int i=0;i<ndepth;i++) {
18333  // depth=7
18334  for (int i = 6; i < 7; i++) {
18335  TH1F *HEpositivedirectionReconoiseDIF7 = (TH1F *)h2CeffHEpositivedirectionReconoiseDIF7->Clone("twod1");
18336 
18337  float ccctest = 0; // to avoid empty massive elements
18338  for (int jphi = 0; jphi < nphi; jphi++) {
18339  double ccc1 = breconoisehe[i][jeta][jphi];
18340  if (ccc1 != 0.) {
18341  HEpositivedirectionReconoiseDIF7->Fill(jphi, ccc1);
18342  ccctest = 1.; //HEpositivedirectionReconoiseDIF7->SetBinError(i,0.01);
18343  }
18344  } // for jphi
18345  if (ccctest > 0.) {
18346  //cout<<"1010 kcountHEpositivedirectionReconoiseDIF7 = "<<kcountHEpositivedirectionReconoiseDIF7 <<" jeta-41= "<< jeta-41 <<endl;
18347  c3x5->cd(kcountHEpositivedirectionReconoiseDIF7);
18348  HEpositivedirectionReconoiseDIF7->SetMarkerStyle(20);
18349  HEpositivedirectionReconoiseDIF7->SetMarkerSize(0.4);
18350  HEpositivedirectionReconoiseDIF7->GetYaxis()->SetLabelSize(0.04);
18351  HEpositivedirectionReconoiseDIF7->SetXTitle("HEpositivedirectionReconoiseDIF7 \b");
18352  HEpositivedirectionReconoiseDIF7->SetMarkerColor(2);
18353  HEpositivedirectionReconoiseDIF7->SetLineColor(0);
18354  gPad->SetGridy();
18355  gPad->SetGridx();
18356  // gPad->SetLogy();
18357  if (kcountHEpositivedirectionReconoiseDIF7 == 1)
18358  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 25; depth = 7 \b");
18359  if (kcountHEpositivedirectionReconoiseDIF7 == 2)
18360  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 26; depth = 7 \b");
18361  if (kcountHEpositivedirectionReconoiseDIF7 == 3)
18362  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 27; depth = 7 \b");
18363  HEpositivedirectionReconoiseDIF7->Draw("Error");
18364  kcountHEpositivedirectionReconoiseDIF7++;
18365  if (kcountHEpositivedirectionReconoiseDIF7 > 3)
18366  break; //
18367  } //ccctest>0
18368 
18369  } // for i
18370  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18371  } //for jeta
18373  c3x5->Update();
18374  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
18375  c3x5->Clear();
18376  // clean-up
18377  if (h2CeffHEpositivedirectionReconoiseDIF7)
18378  delete h2CeffHEpositivedirectionReconoiseDIF7;
18379 
18381  //========================================================================================== 1114
18382  //======================================================================
18383  //======================================================================1D plot: R vs phi , different eta, depth=1
18384  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
18385  c3x5->Clear();
18387  c3x5->Divide(3, 5);
18388  c3x5->cd(1);
18389  int kcountHEnegativedirectionReconoiseDIF1 = 1;
18390  TH1F *h2CeffHEnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
18391  for (int jeta = 0; jeta < njeta; jeta++) {
18392  // negativedirectionReconoiseDIF:
18393  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18394  // for (int i=0;i<ndepth;i++) {
18395  // depth=1
18396  for (int i = 0; i < 1; i++) {
18397  TH1F *HEnegativedirectionReconoiseDIF1 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF1->Clone("twod1");
18398  float ccctest = 0; // to avoid empty massive elements
18399  for (int jphi = 0; jphi < nphi; jphi++) {
18400  double ccc1 = breconoisehe[i][jeta][jphi];
18401  if (ccc1 != 0.) {
18402  HEnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
18403  ccctest = 1.; //HEnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
18404  }
18405  } // for jphi
18406  if (ccctest > 0.) {
18407  // cout<<"444 kcountHEnegativedirectionReconoiseDIF1 = "<<kcountHEnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
18408  c3x5->cd(kcountHEnegativedirectionReconoiseDIF1);
18409  HEnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
18410  HEnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
18411  HEnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
18412  HEnegativedirectionReconoiseDIF1->SetXTitle("HEnegativedirectionReconoiseDIF1 \b");
18413  HEnegativedirectionReconoiseDIF1->SetMarkerColor(2);
18414  HEnegativedirectionReconoiseDIF1->SetLineColor(0);
18415  gPad->SetGridy();
18416  gPad->SetGridx();
18417  // gPad->SetLogy();
18418  if (kcountHEnegativedirectionReconoiseDIF1 == 1)
18419  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-29; depth = 1 \b");
18420  if (kcountHEnegativedirectionReconoiseDIF1 == 2)
18421  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-28; depth = 1 \b");
18422  if (kcountHEnegativedirectionReconoiseDIF1 == 3)
18423  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-27; depth = 1 \b");
18424  if (kcountHEnegativedirectionReconoiseDIF1 == 4)
18425  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-26; depth = 1 \b");
18426  if (kcountHEnegativedirectionReconoiseDIF1 == 5)
18427  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-25; depth = 1 \b");
18428  if (kcountHEnegativedirectionReconoiseDIF1 == 6)
18429  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-24; depth = 1 \b");
18430  if (kcountHEnegativedirectionReconoiseDIF1 == 7)
18431  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-23; depth = 1 \b");
18432  if (kcountHEnegativedirectionReconoiseDIF1 == 8)
18433  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-22; depth = 1 \b");
18434  if (kcountHEnegativedirectionReconoiseDIF1 == 9)
18435  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-21; depth = 1 \b");
18436  if (kcountHEnegativedirectionReconoiseDIF1 == 10)
18437  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-20; depth = 1 \b");
18438  if (kcountHEnegativedirectionReconoiseDIF1 == 11)
18439  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-19; depth = 1 \b");
18440  if (kcountHEnegativedirectionReconoiseDIF1 == 12)
18441  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-18; depth = 1 \b");
18442  HEnegativedirectionReconoiseDIF1->Draw("Error");
18443  kcountHEnegativedirectionReconoiseDIF1++;
18444  if (kcountHEnegativedirectionReconoiseDIF1 > 12)
18445  break; // 4x6 = 24
18446  } //ccctest>0
18447 
18448  } // for i
18449  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18450  } //for jeta
18452  c3x5->Update();
18453  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
18454  c3x5->Clear();
18455  // clean-up
18456  if (h2CeffHEnegativedirectionReconoiseDIF1)
18457  delete h2CeffHEnegativedirectionReconoiseDIF1;
18458 
18459  //========================================================================================== 1115
18460  //======================================================================
18461  //======================================================================1D plot: R vs phi , different eta, depth=2
18462  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
18463  c3x5->Clear();
18465  c3x5->Divide(3, 5);
18466  c3x5->cd(1);
18467  int kcountHEnegativedirectionReconoiseDIF2 = 1;
18468  TH1F *h2CeffHEnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
18469  for (int jeta = 0; jeta < njeta; jeta++) {
18470  // negativedirectionReconoiseDIF:
18471  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18472  // for (int i=0;i<ndepth;i++) {
18473  // depth=2
18474  for (int i = 1; i < 2; i++) {
18475  TH1F *HEnegativedirectionReconoiseDIF2 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF2->Clone("twod1");
18476  float ccctest = 0; // to avoid empty massive elements
18477  for (int jphi = 0; jphi < nphi; jphi++) {
18478  double ccc1 = breconoisehe[i][jeta][jphi];
18479  if (ccc1 != 0.) {
18480  HEnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
18481  ccctest = 1.; //HEnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
18482  }
18483  } // for jphi
18484  if (ccctest > 0.) {
18485  //cout<<"555 kcountHEnegativedirectionReconoiseDIF2 = "<<kcountHEnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
18486  c3x5->cd(kcountHEnegativedirectionReconoiseDIF2);
18487  HEnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
18488  HEnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
18489  HEnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
18490  HEnegativedirectionReconoiseDIF2->SetXTitle("HEnegativedirectionReconoiseDIF2 \b");
18491  HEnegativedirectionReconoiseDIF2->SetMarkerColor(2);
18492  HEnegativedirectionReconoiseDIF2->SetLineColor(0);
18493  gPad->SetGridy();
18494  gPad->SetGridx();
18495  // gPad->SetLogy();
18496  if (kcountHEnegativedirectionReconoiseDIF2 == 1)
18497  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-29; depth = 2 \b");
18498  if (kcountHEnegativedirectionReconoiseDIF2 == 2)
18499  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-28; depth = 2 \b");
18500  if (kcountHEnegativedirectionReconoiseDIF2 == 3)
18501  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-27; depth = 2 \b");
18502  if (kcountHEnegativedirectionReconoiseDIF2 == 4)
18503  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-26; depth = 2 \b");
18504  if (kcountHEnegativedirectionReconoiseDIF2 == 5)
18505  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-25; depth = 2 \b");
18506  if (kcountHEnegativedirectionReconoiseDIF2 == 6)
18507  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-24; depth = 2 \b");
18508  if (kcountHEnegativedirectionReconoiseDIF2 == 7)
18509  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-23; depth = 2 \b");
18510  if (kcountHEnegativedirectionReconoiseDIF2 == 8)
18511  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-22; depth = 2 \b");
18512  if (kcountHEnegativedirectionReconoiseDIF2 == 9)
18513  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-21; depth = 2 \b");
18514  if (kcountHEnegativedirectionReconoiseDIF2 == 10)
18515  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-20; depth = 2 \b");
18516  if (kcountHEnegativedirectionReconoiseDIF2 == 11)
18517  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-19; depth = 2 \b");
18518  if (kcountHEnegativedirectionReconoiseDIF2 == 12)
18519  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-18; depth = 2 \b");
18520  if (kcountHEnegativedirectionReconoiseDIF2 == 13)
18521  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-17; depth = 2 \b");
18522  HEnegativedirectionReconoiseDIF2->Draw("Error");
18523  kcountHEnegativedirectionReconoiseDIF2++;
18524  if (kcountHEnegativedirectionReconoiseDIF2 > 13)
18525  break; // 4x6 = 24
18526  } //ccctest>0
18527 
18528  } // for i
18529  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18530  } //for jeta
18532  c3x5->Update();
18533  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
18534  c3x5->Clear();
18535  // clean-up
18536  if (h2CeffHEnegativedirectionReconoiseDIF2)
18537  delete h2CeffHEnegativedirectionReconoiseDIF2;
18538  //========================================================================================== 1116
18539  //======================================================================
18540  //======================================================================1D plot: R vs phi , different eta, depth=3
18541  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
18542  c3x5->Clear();
18544  c3x5->Divide(3, 5);
18545  c3x5->cd(1);
18546  int kcountHEnegativedirectionReconoiseDIF3 = 1;
18547  TH1F *h2CeffHEnegativedirectionReconoiseDIF3 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF3", "", nphi, 0., 72.);
18548  for (int jeta = 0; jeta < njeta; jeta++) {
18549  // negativedirectionReconoiseDIF:
18550  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18551  // for (int i=0;i<ndepth;i++) {
18552  // depth=3
18553  for (int i = 2; i < 3; i++) {
18554  TH1F *HEnegativedirectionReconoiseDIF3 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF3->Clone("twod1");
18555  float ccctest = 0; // to avoid empty massive elements
18556  for (int jphi = 0; jphi < nphi; jphi++) {
18557  double ccc1 = breconoisehe[i][jeta][jphi];
18558  if (ccc1 != 0.) {
18559  HEnegativedirectionReconoiseDIF3->Fill(jphi, ccc1);
18560  ccctest = 1.; //HEnegativedirectionReconoiseDIF3->SetBinError(i,0.01);
18561  }
18562  } // for jphi
18563  if (ccctest > 0.) {
18564  //cout<<"666 kcountHEnegativedirectionReconoiseDIF3 = "<<kcountHEnegativedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
18565  c3x5->cd(kcountHEnegativedirectionReconoiseDIF3);
18566  HEnegativedirectionReconoiseDIF3->SetMarkerStyle(20);
18567  HEnegativedirectionReconoiseDIF3->SetMarkerSize(0.4);
18568  HEnegativedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
18569  HEnegativedirectionReconoiseDIF3->SetXTitle("HEnegativedirectionReconoiseDIF3 \b");
18570  HEnegativedirectionReconoiseDIF3->SetMarkerColor(2);
18571  HEnegativedirectionReconoiseDIF3->SetLineColor(0);
18572  gPad->SetGridy();
18573  gPad->SetGridx();
18574  // gPad->SetLogy();
18575  if (kcountHEnegativedirectionReconoiseDIF3 == 1)
18576  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-29; depth = 3 \b");
18577  if (kcountHEnegativedirectionReconoiseDIF3 == 2)
18578  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-28; depth = 3 \b");
18579  if (kcountHEnegativedirectionReconoiseDIF3 == 3)
18580  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-27; depth = 3 \b");
18581  if (kcountHEnegativedirectionReconoiseDIF3 == 4)
18582  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-26; depth = 3 \b");
18583  if (kcountHEnegativedirectionReconoiseDIF3 == 5)
18584  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-25; depth = 3 \b");
18585  if (kcountHEnegativedirectionReconoiseDIF3 == 6)
18586  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-24; depth = 3 \b");
18587  if (kcountHEnegativedirectionReconoiseDIF3 == 7)
18588  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-23; depth = 3 \b");
18589  if (kcountHEnegativedirectionReconoiseDIF3 == 8)
18590  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-22; depth = 3 \b");
18591  if (kcountHEnegativedirectionReconoiseDIF3 == 9)
18592  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-21; depth = 3 \b");
18593  if (kcountHEnegativedirectionReconoiseDIF3 == 10)
18594  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-20; depth = 3 \b");
18595  if (kcountHEnegativedirectionReconoiseDIF3 == 11)
18596  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-19; depth = 3 \b");
18597  if (kcountHEnegativedirectionReconoiseDIF3 == 12)
18598  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-18; depth = 3 \b");
18599  if (kcountHEnegativedirectionReconoiseDIF3 == 13)
18600  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-17; depth = 3 \b");
18601  HEnegativedirectionReconoiseDIF3->Draw("Error");
18602  kcountHEnegativedirectionReconoiseDIF3++;
18603  if (kcountHEnegativedirectionReconoiseDIF3 > 13)
18604  break; // 4x6 = 24
18605  } //ccctest>0
18606 
18607  } // for i
18608  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18609  } //for jeta
18611  c3x5->Update();
18612  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
18613  c3x5->Clear();
18614  // clean-up
18615  if (h2CeffHEnegativedirectionReconoiseDIF3)
18616  delete h2CeffHEnegativedirectionReconoiseDIF3;
18617  //========================================================================================== 1117
18618  //======================================================================
18619  //======================================================================1D plot: R vs phi , different eta, depth=4
18620  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
18621  c3x5->Clear();
18623  c3x5->Divide(3, 5);
18624  c3x5->cd(1);
18625  int kcountHEnegativedirectionReconoiseDIF4 = 1;
18626  TH1F *h2CeffHEnegativedirectionReconoiseDIF4 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF4", "", nphi, 0., 72.);
18627 
18628  for (int jeta = 0; jeta < njeta; jeta++) {
18629  // negativedirectionReconoiseDIF:
18630  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18631  // for (int i=0;i<ndepth;i++) {
18632  // depth=4
18633  for (int i = 3; i < 4; i++) {
18634  TH1F *HEnegativedirectionReconoiseDIF4 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF4->Clone("twod1");
18635 
18636  float ccctest = 0; // to avoid empty massive elements
18637  for (int jphi = 0; jphi < nphi; jphi++) {
18638  double ccc1 = breconoisehe[i][jeta][jphi];
18639  if (ccc1 != 0.) {
18640  HEnegativedirectionReconoiseDIF4->Fill(jphi, ccc1);
18641  ccctest = 1.; //HEnegativedirectionReconoiseDIF4->SetBinError(i,0.01);
18642  }
18643  } // for jphi
18644  if (ccctest > 0.) {
18645  //cout<<"777 kcountHEnegativedirectionReconoiseDIF4 = "<<kcountHEnegativedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
18646  c3x5->cd(kcountHEnegativedirectionReconoiseDIF4);
18647  HEnegativedirectionReconoiseDIF4->SetMarkerStyle(20);
18648  HEnegativedirectionReconoiseDIF4->SetMarkerSize(0.4);
18649  HEnegativedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
18650  HEnegativedirectionReconoiseDIF4->SetXTitle("HEnegativedirectionReconoiseDIF4 \b");
18651  HEnegativedirectionReconoiseDIF4->SetMarkerColor(2);
18652  HEnegativedirectionReconoiseDIF4->SetLineColor(0);
18653  gPad->SetGridy();
18654  gPad->SetGridx();
18655  // gPad->SetLogy();
18656  if (kcountHEnegativedirectionReconoiseDIF4 == 1)
18657  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-28; depth = 4 \b");
18658  if (kcountHEnegativedirectionReconoiseDIF4 == 2)
18659  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-27; depth = 4 \b");
18660  if (kcountHEnegativedirectionReconoiseDIF4 == 3)
18661  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-26; depth = 4 \b");
18662  if (kcountHEnegativedirectionReconoiseDIF4 == 4)
18663  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-25; depth = 4 \b");
18664  if (kcountHEnegativedirectionReconoiseDIF4 == 5)
18665  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-24; depth = 4 \b");
18666  if (kcountHEnegativedirectionReconoiseDIF4 == 6)
18667  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-23; depth = 4 \b");
18668  if (kcountHEnegativedirectionReconoiseDIF4 == 7)
18669  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-22; depth = 4 \b");
18670  if (kcountHEnegativedirectionReconoiseDIF4 == 8)
18671  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-21; depth = 4 \b");
18672  if (kcountHEnegativedirectionReconoiseDIF4 == 9)
18673  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-20; depth = 4 \b");
18674  if (kcountHEnegativedirectionReconoiseDIF4 == 10)
18675  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-19; depth = 4 \b");
18676  if (kcountHEnegativedirectionReconoiseDIF4 == 11)
18677  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-18; depth = 4 \b");
18678  if (kcountHEnegativedirectionReconoiseDIF4 == 12)
18679  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-16; depth = 4 \b");
18680  HEnegativedirectionReconoiseDIF4->Draw("Error");
18681  kcountHEnegativedirectionReconoiseDIF4++;
18682  if (kcountHEnegativedirectionReconoiseDIF4 > 12)
18683  break; // 4x6 = 24
18684  } //ccctest>0
18685 
18686  } // for i
18687  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18688  } //for jeta
18690  c3x5->Update();
18691  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
18692  c3x5->Clear();
18693  // clean-up
18694  if (h2CeffHEnegativedirectionReconoiseDIF4)
18695  delete h2CeffHEnegativedirectionReconoiseDIF4;
18696  //========================================================================================== 1118
18697  //======================================================================
18698  //======================================================================1D plot: R vs phi , different eta, depth=5
18699  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
18700  c3x5->Clear();
18702  c3x5->Divide(3, 5);
18703  c3x5->cd(1);
18704  int kcountHEnegativedirectionReconoiseDIF5 = 1;
18705  TH1F *h2CeffHEnegativedirectionReconoiseDIF5 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF5", "", nphi, 0., 72.);
18706 
18707  for (int jeta = 0; jeta < njeta; jeta++) {
18708  // negativedirectionReconoiseDIF:
18709  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18710  // for (int i=0;i<ndepth;i++) {
18711  // depth=5
18712  for (int i = 4; i < 5; i++) {
18713  TH1F *HEnegativedirectionReconoiseDIF5 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF5->Clone("twod1");
18714 
18715  float ccctest = 0; // to avoid empty massive elements
18716  for (int jphi = 0; jphi < nphi; jphi++) {
18717  // cout<<"888 initial kcountHEnegativedirectionReconoiseDIF5 = "<<kcountHEnegativedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" breconoisehe[i][jeta][jphi]= "<< breconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
18718 
18719  double ccc1 = breconoisehe[i][jeta][jphi];
18720  if (ccc1 != 0.) {
18721  HEnegativedirectionReconoiseDIF5->Fill(jphi, ccc1);
18722  ccctest = 1.; //HEnegativedirectionReconoiseDIF5->SetBinError(i,0.01);
18723  }
18724  } // for jphi
18725  if (ccctest > 0.) {
18726  //cout<<"888 kcountHEnegativedirectionReconoiseDIF5 = "<<kcountHEnegativedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<endl;
18727  c3x5->cd(kcountHEnegativedirectionReconoiseDIF5);
18728  HEnegativedirectionReconoiseDIF5->SetMarkerStyle(20);
18729  HEnegativedirectionReconoiseDIF5->SetMarkerSize(0.4);
18730  HEnegativedirectionReconoiseDIF5->GetYaxis()->SetLabelSize(0.04);
18731  HEnegativedirectionReconoiseDIF5->SetXTitle("HEnegativedirectionReconoiseDIF5 \b");
18732  HEnegativedirectionReconoiseDIF5->SetMarkerColor(2);
18733  HEnegativedirectionReconoiseDIF5->SetLineColor(0);
18734  gPad->SetGridy();
18735  gPad->SetGridx();
18736  // gPad->SetLogy();
18737  if (kcountHEnegativedirectionReconoiseDIF5 == 1)
18738  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-28; depth = 5 \b");
18739  if (kcountHEnegativedirectionReconoiseDIF5 == 2)
18740  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-27; depth = 5 \b");
18741  if (kcountHEnegativedirectionReconoiseDIF5 == 3)
18742  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-26; depth = 5 \b");
18743  if (kcountHEnegativedirectionReconoiseDIF5 == 4)
18744  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-25; depth = 5 \b");
18745  if (kcountHEnegativedirectionReconoiseDIF5 == 5)
18746  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-24; depth = 5 \b");
18747  if (kcountHEnegativedirectionReconoiseDIF5 == 6)
18748  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-23; depth = 5 \b");
18749  if (kcountHEnegativedirectionReconoiseDIF5 == 7)
18750  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-22; depth = 5 \b");
18751  if (kcountHEnegativedirectionReconoiseDIF5 == 8)
18752  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-21; depth = 5 \b");
18753  if (kcountHEnegativedirectionReconoiseDIF5 == 9)
18754  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-20; depth = 5 \b");
18755  if (kcountHEnegativedirectionReconoiseDIF5 == 10)
18756  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-19; depth = 5 \b");
18757  if (kcountHEnegativedirectionReconoiseDIF5 == 11)
18758  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-18; depth = 5 \b");
18759  HEnegativedirectionReconoiseDIF5->Draw("Error");
18760  kcountHEnegativedirectionReconoiseDIF5++;
18761  if (kcountHEnegativedirectionReconoiseDIF5 > 11)
18762  break; // 4x6 = 24
18763  } //ccctest>0
18764 
18765  } // for i
18766  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18767  } //for jeta
18769  c3x5->Update();
18770  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
18771  c3x5->Clear();
18772  // clean-up
18773  if (h2CeffHEnegativedirectionReconoiseDIF5)
18774  delete h2CeffHEnegativedirectionReconoiseDIF5;
18775  //========================================================================================== 1119
18776  //======================================================================
18777  //======================================================================1D plot: R vs phi , different eta, depth=6
18778  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
18779  c3x5->Clear();
18781  c3x5->Divide(3, 5);
18782  c3x5->cd(1);
18783  int kcountHEnegativedirectionReconoiseDIF6 = 1;
18784  TH1F *h2CeffHEnegativedirectionReconoiseDIF6 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF6", "", nphi, 0., 72.);
18785 
18786  for (int jeta = 0; jeta < njeta; jeta++) {
18787  // negativedirectionReconoiseDIF:
18788  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18789  // for (int i=0;i<ndepth;i++) {
18790  // depth=6
18791  for (int i = 5; i < 6; i++) {
18792  TH1F *HEnegativedirectionReconoiseDIF6 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF6->Clone("twod1");
18793 
18794  float ccctest = 0; // to avoid empty massive elements
18795  for (int jphi = 0; jphi < nphi; jphi++) {
18796  double ccc1 = breconoisehe[i][jeta][jphi];
18797  if (ccc1 != 0.) {
18798  HEnegativedirectionReconoiseDIF6->Fill(jphi, ccc1);
18799  ccctest = 1.; //HEnegativedirectionReconoiseDIF6->SetBinError(i,0.01);
18800  }
18801  } // for jphi
18802  if (ccctest > 0.) {
18803  //cout<<"999 kcountHEnegativedirectionReconoiseDIF6 = "<<kcountHEnegativedirectionReconoiseDIF6 <<" jeta-41= "<< jeta-41 <<endl;
18804  c3x5->cd(kcountHEnegativedirectionReconoiseDIF6);
18805  HEnegativedirectionReconoiseDIF6->SetMarkerStyle(20);
18806  HEnegativedirectionReconoiseDIF6->SetMarkerSize(0.4);
18807  HEnegativedirectionReconoiseDIF6->GetYaxis()->SetLabelSize(0.04);
18808  HEnegativedirectionReconoiseDIF6->SetXTitle("HEnegativedirectionReconoiseDIF6 \b");
18809  HEnegativedirectionReconoiseDIF6->SetMarkerColor(2);
18810  HEnegativedirectionReconoiseDIF6->SetLineColor(0);
18811  gPad->SetGridy();
18812  gPad->SetGridx();
18813  // gPad->SetLogy();
18814  if (kcountHEnegativedirectionReconoiseDIF6 == 1)
18815  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-28; depth = 6 \b");
18816  if (kcountHEnegativedirectionReconoiseDIF6 == 2)
18817  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-27; depth = 6 \b");
18818  if (kcountHEnegativedirectionReconoiseDIF6 == 3)
18819  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-26; depth = 6 \b");
18820  if (kcountHEnegativedirectionReconoiseDIF6 == 4)
18821  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-25; depth = 6 \b");
18822  if (kcountHEnegativedirectionReconoiseDIF6 == 5)
18823  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-24; depth = 6 \b");
18824  if (kcountHEnegativedirectionReconoiseDIF6 == 6)
18825  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-23; depth = 6 \b");
18826  if (kcountHEnegativedirectionReconoiseDIF6 == 7)
18827  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-22; depth = 6 \b");
18828  if (kcountHEnegativedirectionReconoiseDIF6 == 8)
18829  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-21; depth = 6 \b");
18830  if (kcountHEnegativedirectionReconoiseDIF6 == 9)
18831  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-20; depth = 6 \b");
18832  if (kcountHEnegativedirectionReconoiseDIF6 == 10)
18833  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-19; depth = 6 \b");
18834  HEnegativedirectionReconoiseDIF6->Draw("Error");
18835  kcountHEnegativedirectionReconoiseDIF6++;
18836  if (kcountHEnegativedirectionReconoiseDIF6 > 10)
18837  break; // 4x6 = 24
18838  } //ccctest>0
18839 
18840  } // for i
18841  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18842  } //for jeta
18844  c3x5->Update();
18845  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
18846  c3x5->Clear();
18847  // clean-up
18848  if (h2CeffHEnegativedirectionReconoiseDIF6)
18849  delete h2CeffHEnegativedirectionReconoiseDIF6;
18850  //========================================================================================== 11110
18851  //======================================================================
18852  //======================================================================1D plot: R vs phi , different eta, depth=7
18853  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
18854  c3x5->Clear();
18856  c3x5->Divide(3, 5);
18857  c3x5->cd(1);
18858  int kcountHEnegativedirectionReconoiseDIF7 = 1;
18859  TH1F *h2CeffHEnegativedirectionReconoiseDIF7 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF7", "", nphi, 0., 72.);
18860 
18861  for (int jeta = 0; jeta < njeta; jeta++) {
18862  // negativedirectionReconoiseDIF:
18863  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18864  // for (int i=0;i<ndepth;i++) {
18865  // depth=7
18866  for (int i = 6; i < 7; i++) {
18867  TH1F *HEnegativedirectionReconoiseDIF7 = (TH1F *)h2CeffHEnegativedirectionReconoiseDIF7->Clone("twod1");
18868 
18869  float ccctest = 0; // to avoid empty massive elements
18870  for (int jphi = 0; jphi < nphi; jphi++) {
18871  double ccc1 = breconoisehe[i][jeta][jphi];
18872  if (ccc1 != 0.) {
18873  HEnegativedirectionReconoiseDIF7->Fill(jphi, ccc1);
18874  ccctest = 1.; //HEnegativedirectionReconoiseDIF7->SetBinError(i,0.01);
18875  }
18876  } // for jphi
18877  if (ccctest > 0.) {
18878  //cout<<"1010 kcountHEnegativedirectionReconoiseDIF7 = "<<kcountHEnegativedirectionReconoiseDIF7 <<" jeta-41= "<< jeta-41 <<endl;
18879  c3x5->cd(kcountHEnegativedirectionReconoiseDIF7);
18880  HEnegativedirectionReconoiseDIF7->SetMarkerStyle(20);
18881  HEnegativedirectionReconoiseDIF7->SetMarkerSize(0.4);
18882  HEnegativedirectionReconoiseDIF7->GetYaxis()->SetLabelSize(0.04);
18883  HEnegativedirectionReconoiseDIF7->SetXTitle("HEnegativedirectionReconoiseDIF7 \b");
18884  HEnegativedirectionReconoiseDIF7->SetMarkerColor(2);
18885  HEnegativedirectionReconoiseDIF7->SetLineColor(0);
18886  gPad->SetGridy();
18887  gPad->SetGridx();
18888  // gPad->SetLogy();
18889  if (kcountHEnegativedirectionReconoiseDIF7 == 1)
18890  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-28; depth = 7 \b");
18891  if (kcountHEnegativedirectionReconoiseDIF7 == 2)
18892  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-27; depth = 7 \b");
18893  if (kcountHEnegativedirectionReconoiseDIF7 == 3)
18894  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-26; depth = 7 \b");
18895  HEnegativedirectionReconoiseDIF7->Draw("Error");
18896  kcountHEnegativedirectionReconoiseDIF7++;
18897  if (kcountHEnegativedirectionReconoiseDIF7 > 3)
18898  break; // 4x6 = 24
18899  } //ccctest>0
18900 
18901  } // for i
18902  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18903  } //for jeta
18905  c3x5->Update();
18906  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
18907  c3x5->Clear();
18908  // clean-up
18909  if (h2CeffHEnegativedirectionReconoiseDIF7)
18910  delete h2CeffHEnegativedirectionReconoiseDIF7;
18911 
18912  //======================================================================================================================
18913  //======================================================================================================================
18915  //======================================================================================================================
18916  //======================================================================================================================
18917  //======================================================================================================================
18918 
18919  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
18920 
18921  //cout<<" Start Vaiance: preparation *****" <<endl;
18922  TH2F *reconoiseVariance1HE1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HE1");
18923  TH2F *reconoiseVariance0HE1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE1");
18924  TH2F *reconoiseVarianceHE1 = (TH2F *)reconoiseVariance1HE1->Clone("reconoiseVarianceHE1");
18925  reconoiseVarianceHE1->Divide(reconoiseVariance1HE1, reconoiseVariance0HE1, 1, 1, "B");
18926  TH2F *reconoiseVariance1HE2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HE2");
18927  TH2F *reconoiseVariance0HE2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE2");
18928  TH2F *reconoiseVarianceHE2 = (TH2F *)reconoiseVariance1HE2->Clone("reconoiseVarianceHE2");
18929  reconoiseVarianceHE2->Divide(reconoiseVariance1HE2, reconoiseVariance0HE2, 1, 1, "B");
18930  TH2F *reconoiseVariance1HE3 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HE3");
18931  TH2F *reconoiseVariance0HE3 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE3");
18932  TH2F *reconoiseVarianceHE3 = (TH2F *)reconoiseVariance1HE3->Clone("reconoiseVarianceHE3");
18933  reconoiseVarianceHE3->Divide(reconoiseVariance1HE3, reconoiseVariance0HE3, 1, 1, "B");
18934  TH2F *reconoiseVariance1HE4 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HE4");
18935  TH2F *reconoiseVariance0HE4 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE4");
18936  TH2F *reconoiseVarianceHE4 = (TH2F *)reconoiseVariance1HE4->Clone("reconoiseVarianceHE4");
18937  reconoiseVarianceHE4->Divide(reconoiseVariance1HE4, reconoiseVariance0HE4, 1, 1, "B");
18938  TH2F *reconoiseVariance1HE5 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HE5");
18939  TH2F *reconoiseVariance0HE5 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE5");
18940  TH2F *reconoiseVarianceHE5 = (TH2F *)reconoiseVariance1HE5->Clone("reconoiseVarianceHE5");
18941  reconoiseVarianceHE5->Divide(reconoiseVariance1HE5, reconoiseVariance0HE5, 1, 1, "B");
18942  TH2F *reconoiseVariance1HE6 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HE6");
18943  TH2F *reconoiseVariance0HE6 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE6");
18944  TH2F *reconoiseVarianceHE6 = (TH2F *)reconoiseVariance1HE6->Clone("reconoiseVarianceHE6");
18945  reconoiseVarianceHE6->Divide(reconoiseVariance1HE6, reconoiseVariance0HE6, 1, 1, "B");
18946  TH2F *reconoiseVariance1HE7 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HE7");
18947  TH2F *reconoiseVariance0HE7 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HE7");
18948  TH2F *reconoiseVarianceHE7 = (TH2F *)reconoiseVariance1HE7->Clone("reconoiseVarianceHE7");
18949  reconoiseVarianceHE7->Divide(reconoiseVariance1HE7, reconoiseVariance0HE7, 1, 1, "B");
18950  //cout<<" Vaiance: preparation DONE *****" <<endl;
18951  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevariancehe
18952  // = sum(R*R)/N - (sum(R)/N)**2
18953  for (int jeta = 0; jeta < njeta; jeta++) {
18954  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
18955  //preparation for PHI normalization:
18956  double sumreconoiseHE0 = 0;
18957  int nsumreconoiseHE0 = 0;
18958  double sumreconoiseHE1 = 0;
18959  int nsumreconoiseHE1 = 0;
18960  double sumreconoiseHE2 = 0;
18961  int nsumreconoiseHE2 = 0;
18962  double sumreconoiseHE3 = 0;
18963  int nsumreconoiseHE3 = 0;
18964  double sumreconoiseHE4 = 0;
18965  int nsumreconoiseHE4 = 0;
18966  double sumreconoiseHE5 = 0;
18967  int nsumreconoiseHE5 = 0;
18968  double sumreconoiseHE6 = 0;
18969  int nsumreconoiseHE6 = 0;
18970  for (int jphi = 0; jphi < njphi; jphi++) {
18971  reconoisevariancehe[0][jeta][jphi] = reconoiseVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
18972  reconoisevariancehe[1][jeta][jphi] = reconoiseVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
18973  reconoisevariancehe[2][jeta][jphi] = reconoiseVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
18974  reconoisevariancehe[3][jeta][jphi] = reconoiseVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
18975  reconoisevariancehe[4][jeta][jphi] = reconoiseVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
18976  reconoisevariancehe[5][jeta][jphi] = reconoiseVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
18977  reconoisevariancehe[6][jeta][jphi] = reconoiseVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
18978  if (reconoisevariancehe[0][jeta][jphi] != 0.) {
18979  sumreconoiseHE0 += reconoisevariancehe[0][jeta][jphi];
18980  ++nsumreconoiseHE0;
18981  }
18982  if (reconoisevariancehe[1][jeta][jphi] != 0.) {
18983  sumreconoiseHE1 += reconoisevariancehe[1][jeta][jphi];
18984  ++nsumreconoiseHE1;
18985  }
18986  if (reconoisevariancehe[2][jeta][jphi] != 0.) {
18987  sumreconoiseHE2 += reconoisevariancehe[2][jeta][jphi];
18988  ++nsumreconoiseHE2;
18989  }
18990  if (reconoisevariancehe[3][jeta][jphi] != 0.) {
18991  sumreconoiseHE3 += reconoisevariancehe[3][jeta][jphi];
18992  ++nsumreconoiseHE3;
18993  }
18994  if (reconoisevariancehe[4][jeta][jphi] != 0.) {
18995  sumreconoiseHE4 += reconoisevariancehe[4][jeta][jphi];
18996  ++nsumreconoiseHE4;
18997  }
18998  if (reconoisevariancehe[5][jeta][jphi] != 0.) {
18999  sumreconoiseHE5 += reconoisevariancehe[5][jeta][jphi];
19000  ++nsumreconoiseHE5;
19001  }
19002  if (reconoisevariancehe[6][jeta][jphi] != 0.) {
19003  sumreconoiseHE6 += reconoisevariancehe[6][jeta][jphi];
19004  ++nsumreconoiseHE6;
19005  }
19006  } // phi
19007  // PHI normalization :
19008  for (int jphi = 0; jphi < njphi; jphi++) {
19009  if (sumreconoiseHE0 != 0.)
19010  reconoisevariancehe[0][jeta][jphi] /= (sumreconoiseHE0 / nsumreconoiseHE0);
19011  if (sumreconoiseHE1 != 0.)
19012  reconoisevariancehe[1][jeta][jphi] /= (sumreconoiseHE1 / nsumreconoiseHE1);
19013  if (sumreconoiseHE2 != 0.)
19014  reconoisevariancehe[2][jeta][jphi] /= (sumreconoiseHE2 / nsumreconoiseHE2);
19015  if (sumreconoiseHE3 != 0.)
19016  reconoisevariancehe[3][jeta][jphi] /= (sumreconoiseHE3 / nsumreconoiseHE3);
19017  if (sumreconoiseHE4 != 0.)
19018  reconoisevariancehe[4][jeta][jphi] /= (sumreconoiseHE4 / nsumreconoiseHE4);
19019  if (sumreconoiseHE5 != 0.)
19020  reconoisevariancehe[5][jeta][jphi] /= (sumreconoiseHE5 / nsumreconoiseHE5);
19021  if (sumreconoiseHE6 != 0.)
19022  reconoisevariancehe[6][jeta][jphi] /= (sumreconoiseHE6 / nsumreconoiseHE6);
19023  } // phi
19024  // reconoisevariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
19025  for (int jphi = 0; jphi < njphi; jphi++) {
19026  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
19027  reconoisevariancehe[0][jeta][jphi] -= areconoisehe[0][jeta][jphi] * areconoisehe[0][jeta][jphi];
19028  reconoisevariancehe[0][jeta][jphi] = fabs(reconoisevariancehe[0][jeta][jphi]);
19029  reconoisevariancehe[1][jeta][jphi] -= areconoisehe[1][jeta][jphi] * areconoisehe[1][jeta][jphi];
19030  reconoisevariancehe[1][jeta][jphi] = fabs(reconoisevariancehe[1][jeta][jphi]);
19031  reconoisevariancehe[2][jeta][jphi] -= areconoisehe[2][jeta][jphi] * areconoisehe[2][jeta][jphi];
19032  reconoisevariancehe[2][jeta][jphi] = fabs(reconoisevariancehe[2][jeta][jphi]);
19033  reconoisevariancehe[3][jeta][jphi] -= areconoisehe[3][jeta][jphi] * areconoisehe[3][jeta][jphi];
19034  reconoisevariancehe[3][jeta][jphi] = fabs(reconoisevariancehe[3][jeta][jphi]);
19035  reconoisevariancehe[4][jeta][jphi] -= areconoisehe[4][jeta][jphi] * areconoisehe[4][jeta][jphi];
19036  reconoisevariancehe[4][jeta][jphi] = fabs(reconoisevariancehe[4][jeta][jphi]);
19037  reconoisevariancehe[5][jeta][jphi] -= areconoisehe[5][jeta][jphi] * areconoisehe[5][jeta][jphi];
19038  reconoisevariancehe[5][jeta][jphi] = fabs(reconoisevariancehe[5][jeta][jphi]);
19039  reconoisevariancehe[6][jeta][jphi] -= areconoisehe[6][jeta][jphi] * areconoisehe[6][jeta][jphi];
19040  reconoisevariancehe[6][jeta][jphi] = fabs(reconoisevariancehe[6][jeta][jphi]);
19041  }
19042  }
19043  }
19044  //cout<<" Vaiance: DONE*****" <<endl;
19045  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
19046  //======================================================================
19047  //======================================================================
19048  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
19049  c1x1->Clear();
19051  c1x0->Divide(1, 1);
19052  c1x0->cd(1);
19053  TH2F *DefzDreconoiseHE42D = new TH2F("DefzDreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
19054  TH2F *DefzDreconoiseHE42D0 = new TH2F("DefzDreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
19055  TH2F *DefzDreconoiseHE42DF = (TH2F *)DefzDreconoiseHE42D0->Clone("DefzDreconoiseHE42DF");
19056  for (int i = 0; i < ndepth; i++) {
19057  for (int jeta = 0; jeta < neta; jeta++) {
19058  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
19059  for (int jphi = 0; jphi < nphi; jphi++) {
19060  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19061  int k2plot = jeta - 41;
19062  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
19063  if (areconoisehe[i][jeta][jphi] > 0.) {
19064  DefzDreconoiseHE42D->Fill(kkk, jphi, ccc1);
19065  DefzDreconoiseHE42D0->Fill(kkk, jphi, 1.);
19066  }
19067  }
19068  }
19069  }
19070  }
19071  DefzDreconoiseHE42DF->Divide(DefzDreconoiseHE42D, DefzDreconoiseHE42D0, 1, 1, "B"); // average A
19072  // DefzDreconoiseHE1->Sumw2();
19073  gPad->SetGridy();
19074  gPad->SetGridx(); // gPad->SetLogz();
19075  DefzDreconoiseHE42DF->SetMarkerStyle(20);
19076  DefzDreconoiseHE42DF->SetMarkerSize(0.4);
19077  DefzDreconoiseHE42DF->GetZaxis()->SetLabelSize(0.08);
19078  DefzDreconoiseHE42DF->SetXTitle("<D>_depth #eta \b");
19079  DefzDreconoiseHE42DF->SetYTitle(" #phi \b");
19080  DefzDreconoiseHE42DF->SetZTitle("<D>_depth \b");
19081  DefzDreconoiseHE42DF->SetMarkerColor(2);
19082  DefzDreconoiseHE42DF->SetLineColor(
19083  0); // DefzDreconoiseHE42DF->SetMaximum(1.000); // DefzDreconoiseHE42DF->SetMinimum(1.0);
19084  DefzDreconoiseHE42DF->Draw("COLZ");
19086  c1x0->Update();
19087  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHE.png");
19088  c1x0->Clear();
19089  // clean-up
19090  if (DefzDreconoiseHE42D)
19091  delete DefzDreconoiseHE42D;
19092  if (DefzDreconoiseHE42D0)
19093  delete DefzDreconoiseHE42D0;
19094  if (DefzDreconoiseHE42DF)
19095  delete DefzDreconoiseHE42DF;
19096  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
19097  //======================================================================
19098  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
19099  c1x1->Clear();
19101  c1x1->Divide(1, 1);
19102  c1x1->cd(1);
19103  TH1F *DefzDreconoiseHE41D = new TH1F("DefzDreconoiseHE41D", "", nphi, 0., 72.);
19104  TH1F *DefzDreconoiseHE41D0 = new TH1F("DefzDreconoiseHE41D0", "", nphi, 0., 72.);
19105  TH1F *DefzDreconoiseHE41DF = (TH1F *)DefzDreconoiseHE41D0->Clone("DefzDreconoiseHE41DF");
19106 
19107  for (int jphi = 0; jphi < nphi; jphi++) {
19108  for (int jeta = 0; jeta < neta; jeta++) {
19109  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
19110  for (int i = 0; i < ndepth; i++) {
19111  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19112  if (areconoisehe[i][jeta][jphi] > 0.) {
19113  DefzDreconoiseHE41D->Fill(jphi, ccc1);
19114  DefzDreconoiseHE41D0->Fill(jphi, 1.);
19115  }
19116  }
19117  }
19118  }
19119  }
19120  // DefzDreconoiseHE41D->Sumw2();DefzDreconoiseHE41D0->Sumw2();
19121 
19122  DefzDreconoiseHE41DF->Divide(DefzDreconoiseHE41D, DefzDreconoiseHE41D0, 1, 1, "B"); // R averaged over depthes & eta
19123  DefzDreconoiseHE41D0->Sumw2();
19124  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHE41DF->SetBinError(jphi,0.01);}
19125  gPad->SetGridy();
19126  gPad->SetGridx(); // gPad->SetLogz();
19127  DefzDreconoiseHE41DF->SetMarkerStyle(20);
19128  DefzDreconoiseHE41DF->SetMarkerSize(1.4);
19129  DefzDreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
19130  DefzDreconoiseHE41DF->SetXTitle("#phi \b");
19131  DefzDreconoiseHE41DF->SetYTitle(" <D> \b");
19132  DefzDreconoiseHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
19133  DefzDreconoiseHE41DF->SetMarkerColor(4);
19134  DefzDreconoiseHE41DF->SetLineColor(
19135  4); // DefzDreconoiseHE41DF->SetMinimum(0.8); DefzDreconoiseHE41DF->SetMinimum(-0.015);
19136  DefzDreconoiseHE41DF->Draw("Error");
19138  c1x1->Update();
19139  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHE.png");
19140  c1x1->Clear();
19141  // clean-up
19142  if (DefzDreconoiseHE41D)
19143  delete DefzDreconoiseHE41D;
19144  if (DefzDreconoiseHE41D0)
19145  delete DefzDreconoiseHE41D0;
19146  if (DefzDreconoiseHE41DF)
19147  delete DefzDreconoiseHE41DF;
19148  //========================================================================================== 14
19149  //======================================================================
19150  //======================================================================1D plot: D vs phi , different eta, depth=1
19151  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
19152  c3x5->Clear();
19154  c3x5->Divide(3, 5);
19155  c3x5->cd(1);
19156  int kcountHEpositivedirectionReconoiseD1 = 1;
19157  TH1F *h2CeffHEpositivedirectionReconoiseD1 = new TH1F("h2CeffHEpositivedirectionReconoiseD1", "", nphi, 0., 72.);
19158 
19159  for (int jeta = 0; jeta < njeta; jeta++) {
19160  // positivedirectionReconoiseD:
19161  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19162  // for (int i=0;i<ndepth;i++) {
19163  // depth=1
19164  for (int i = 0; i < 1; i++) {
19165  TH1F *HEpositivedirectionReconoiseD1 = (TH1F *)h2CeffHEpositivedirectionReconoiseD1->Clone("twod1");
19166 
19167  float ccctest = 0; // to avoid empty massive elements
19168  for (int jphi = 0; jphi < nphi; jphi++) {
19169  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19170  if (areconoisehe[i][jeta][jphi] > 0.) {
19171  HEpositivedirectionReconoiseD1->Fill(jphi, ccc1);
19172  ccctest = 1.; //HEpositivedirectionReconoiseD1->SetBinError(i,0.01);
19173  }
19174  } // for jphi
19175  if (ccctest > 0.) {
19176  //cout<<"1414 kcountHEpositivedirectionReconoiseD1 = "<<kcountHEpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
19177  c3x5->cd(kcountHEpositivedirectionReconoiseD1);
19178  HEpositivedirectionReconoiseD1->SetMarkerStyle(20);
19179  HEpositivedirectionReconoiseD1->SetMarkerSize(0.4);
19180  HEpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
19181  HEpositivedirectionReconoiseD1->SetXTitle("HEpositivedirectionReconoiseD1 \b");
19182  HEpositivedirectionReconoiseD1->SetMarkerColor(2);
19183  HEpositivedirectionReconoiseD1->SetLineColor(0);
19184  gPad->SetGridy();
19185  gPad->SetGridx();
19186  // gPad->SetLogy();
19187  if (kcountHEpositivedirectionReconoiseD1 == 1)
19188  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
19189  if (kcountHEpositivedirectionReconoiseD1 == 2)
19190  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
19191  if (kcountHEpositivedirectionReconoiseD1 == 3)
19192  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
19193  if (kcountHEpositivedirectionReconoiseD1 == 4)
19194  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
19195  if (kcountHEpositivedirectionReconoiseD1 == 5)
19196  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
19197  if (kcountHEpositivedirectionReconoiseD1 == 6)
19198  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
19199  if (kcountHEpositivedirectionReconoiseD1 == 7)
19200  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
19201  if (kcountHEpositivedirectionReconoiseD1 == 8)
19202  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
19203  if (kcountHEpositivedirectionReconoiseD1 == 9)
19204  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
19205  if (kcountHEpositivedirectionReconoiseD1 == 10)
19206  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
19207  if (kcountHEpositivedirectionReconoiseD1 == 11)
19208  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
19209  if (kcountHEpositivedirectionReconoiseD1 == 12)
19210  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
19211  HEpositivedirectionReconoiseD1->Draw("Error");
19212  kcountHEpositivedirectionReconoiseD1++;
19213  if (kcountHEpositivedirectionReconoiseD1 > 12)
19214  break; // 4x6 = 24
19215  } //ccctest>0
19216 
19217  } // for i
19218  } //if(jeta-41 >= 0)
19219  } //for jeta
19221  c3x5->Update();
19222  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
19223  c3x5->Clear();
19224  // clean-up
19225  if (h2CeffHEpositivedirectionReconoiseD1)
19226  delete h2CeffHEpositivedirectionReconoiseD1;
19227  //========================================================================================== 15
19228  //======================================================================
19229  //======================================================================1D plot: D vs phi , different eta, depth=2
19230  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
19231  c3x5->Clear();
19232  c3x5->Divide(3, 5);
19233  c3x5->cd(1);
19234  int kcountHEpositivedirectionReconoiseD2 = 1;
19235  TH1F *h2CeffHEpositivedirectionReconoiseD2 = new TH1F("h2CeffHEpositivedirectionReconoiseD2", "", nphi, 0., 72.);
19236 
19237  for (int jeta = 0; jeta < njeta; jeta++) {
19238  // positivedirectionReconoiseD:
19239  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19240  // for (int i=0;i<ndepth;i++) {
19241  // depth=2
19242  for (int i = 1; i < 2; i++) {
19243  TH1F *HEpositivedirectionReconoiseD2 = (TH1F *)h2CeffHEpositivedirectionReconoiseD2->Clone("twod1");
19244 
19245  float ccctest = 0; // to avoid empty massive elements
19246  for (int jphi = 0; jphi < nphi; jphi++) {
19247  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19248  if (areconoisehe[i][jeta][jphi] > 0.) {
19249  HEpositivedirectionReconoiseD2->Fill(jphi, ccc1);
19250  ccctest = 1.; //HEpositivedirectionReconoiseD2->SetBinError(i,0.01);
19251  }
19252  } // for jphi
19253  if (ccctest > 0.) {
19254  //cout<<"1515 kcountHEpositivedirectionReconoiseD2 = "<<kcountHEpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
19255  c3x5->cd(kcountHEpositivedirectionReconoiseD2);
19256  HEpositivedirectionReconoiseD2->SetMarkerStyle(20);
19257  HEpositivedirectionReconoiseD2->SetMarkerSize(0.4);
19258  HEpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
19259  HEpositivedirectionReconoiseD2->SetXTitle("HEpositivedirectionReconoiseD2 \b");
19260  HEpositivedirectionReconoiseD2->SetMarkerColor(2);
19261  HEpositivedirectionReconoiseD2->SetLineColor(0);
19262  gPad->SetGridy();
19263  gPad->SetGridx();
19264  // gPad->SetLogy();
19265  if (kcountHEpositivedirectionReconoiseD2 == 1)
19266  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
19267  if (kcountHEpositivedirectionReconoiseD2 == 2)
19268  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
19269  if (kcountHEpositivedirectionReconoiseD2 == 3)
19270  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
19271  if (kcountHEpositivedirectionReconoiseD2 == 4)
19272  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
19273  if (kcountHEpositivedirectionReconoiseD2 == 5)
19274  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
19275  if (kcountHEpositivedirectionReconoiseD2 == 6)
19276  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
19277  if (kcountHEpositivedirectionReconoiseD2 == 7)
19278  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
19279  if (kcountHEpositivedirectionReconoiseD2 == 8)
19280  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
19281  if (kcountHEpositivedirectionReconoiseD2 == 9)
19282  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
19283  if (kcountHEpositivedirectionReconoiseD2 == 10)
19284  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
19285  if (kcountHEpositivedirectionReconoiseD2 == 11)
19286  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
19287  if (kcountHEpositivedirectionReconoiseD2 == 12)
19288  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
19289  if (kcountHEpositivedirectionReconoiseD2 == 13)
19290  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
19291  HEpositivedirectionReconoiseD2->Draw("Error");
19292  kcountHEpositivedirectionReconoiseD2++;
19293  if (kcountHEpositivedirectionReconoiseD2 > 13)
19294  break; // 4x6 = 24
19295  } //ccctest>0
19296 
19297  } // for i
19298  } //if(jeta-41 >= 0)
19299  } //for jeta
19301  c3x5->Update();
19302  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
19303  c3x5->Clear();
19304  // clean-up
19305  if (h2CeffHEpositivedirectionReconoiseD2)
19306  delete h2CeffHEpositivedirectionReconoiseD2;
19307  //========================================================================================== 16
19308  //======================================================================
19309  //======================================================================1D plot: D vs phi , different eta, depth=3
19310  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
19311  c3x5->Clear();
19312  c3x5->Divide(3, 5);
19313  c3x5->cd(1);
19314  int kcountHEpositivedirectionReconoiseD3 = 1;
19315  TH1F *h2CeffHEpositivedirectionReconoiseD3 = new TH1F("h2CeffHEpositivedirectionReconoiseD3", "", nphi, 0., 72.);
19316 
19317  for (int jeta = 0; jeta < njeta; jeta++) {
19318  // positivedirectionReconoiseD:
19319  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19320  // for (int i=0;i<ndepth;i++) {
19321  // depth=3
19322  for (int i = 2; i < 3; i++) {
19323  TH1F *HEpositivedirectionReconoiseD3 = (TH1F *)h2CeffHEpositivedirectionReconoiseD3->Clone("twod1");
19324 
19325  float ccctest = 0; // to avoid empty massive elements
19326  for (int jphi = 0; jphi < nphi; jphi++) {
19327  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19328  if (areconoisehe[i][jeta][jphi] > 0.) {
19329  HEpositivedirectionReconoiseD3->Fill(jphi, ccc1);
19330  ccctest = 1.; //HEpositivedirectionReconoiseD3->SetBinError(i,0.01);
19331  }
19332  } // for jphi
19333  if (ccctest > 0.) {
19334  //cout<<"1616 kcountHEpositivedirectionReconoiseD3 = "<<kcountHEpositivedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
19335  c3x5->cd(kcountHEpositivedirectionReconoiseD3);
19336  HEpositivedirectionReconoiseD3->SetMarkerStyle(20);
19337  HEpositivedirectionReconoiseD3->SetMarkerSize(0.4);
19338  HEpositivedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
19339  HEpositivedirectionReconoiseD3->SetXTitle("HEpositivedirectionReconoiseD3 \b");
19340  HEpositivedirectionReconoiseD3->SetMarkerColor(2);
19341  HEpositivedirectionReconoiseD3->SetLineColor(0);
19342  gPad->SetGridy();
19343  gPad->SetGridx();
19344  // gPad->SetLogy();
19345  if (kcountHEpositivedirectionReconoiseD3 == 1)
19346  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
19347  if (kcountHEpositivedirectionReconoiseD3 == 2)
19348  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
19349  if (kcountHEpositivedirectionReconoiseD3 == 3)
19350  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
19351  if (kcountHEpositivedirectionReconoiseD3 == 4)
19352  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
19353  if (kcountHEpositivedirectionReconoiseD3 == 5)
19354  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
19355  if (kcountHEpositivedirectionReconoiseD3 == 6)
19356  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
19357  if (kcountHEpositivedirectionReconoiseD3 == 7)
19358  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
19359  if (kcountHEpositivedirectionReconoiseD3 == 8)
19360  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
19361  if (kcountHEpositivedirectionReconoiseD3 == 9)
19362  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
19363  if (kcountHEpositivedirectionReconoiseD3 == 10)
19364  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
19365  if (kcountHEpositivedirectionReconoiseD3 == 11)
19366  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
19367  if (kcountHEpositivedirectionReconoiseD3 == 12)
19368  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
19369  if (kcountHEpositivedirectionReconoiseD3 == 13)
19370  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
19371  HEpositivedirectionReconoiseD3->Draw("Error");
19372  kcountHEpositivedirectionReconoiseD3++;
19373  if (kcountHEpositivedirectionReconoiseD3 > 13)
19374  break; // 4x6 = 24
19375  } //ccctest>0
19376 
19377  } // for i
19378  } //if(jeta-41 >= 0)
19379  } //for jeta
19381  c3x5->Update();
19382  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
19383  c3x5->Clear();
19384  // clean-up
19385  if (h2CeffHEpositivedirectionReconoiseD3)
19386  delete h2CeffHEpositivedirectionReconoiseD3;
19387  //========================================================================================== 17
19388  //======================================================================
19389  //======================================================================1D plot: D vs phi , different eta, depth=4
19390  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
19391  c3x5->Clear();
19392  c3x5->Divide(3, 5);
19393  c3x5->cd(1);
19394  int kcountHEpositivedirectionReconoiseD4 = 1;
19395  TH1F *h2CeffHEpositivedirectionReconoiseD4 = new TH1F("h2CeffHEpositivedirectionReconoiseD4", "", nphi, 0., 72.);
19396 
19397  for (int jeta = 0; jeta < njeta; jeta++) {
19398  // positivedirectionReconoiseD:
19399  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19400  // for (int i=0;i<ndepth;i++) {
19401  // depth=4
19402  for (int i = 3; i < 4; i++) {
19403  TH1F *HEpositivedirectionReconoiseD4 = (TH1F *)h2CeffHEpositivedirectionReconoiseD4->Clone("twod1");
19404 
19405  float ccctest = 0; // to avoid empty massive elements
19406  for (int jphi = 0; jphi < nphi; jphi++) {
19407  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19408  if (areconoisehe[i][jeta][jphi] > 0.) {
19409  HEpositivedirectionReconoiseD4->Fill(jphi, ccc1);
19410  ccctest = 1.; //HEpositivedirectionReconoiseD4->SetBinError(i,0.01);
19411  }
19412  } // for jphi
19413  if (ccctest > 0.) {
19414  //cout<<"1717 kcountHEpositivedirectionReconoiseD4 = "<<kcountHEpositivedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
19415  c3x5->cd(kcountHEpositivedirectionReconoiseD4);
19416  HEpositivedirectionReconoiseD4->SetMarkerStyle(20);
19417  HEpositivedirectionReconoiseD4->SetMarkerSize(0.4);
19418  HEpositivedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
19419  HEpositivedirectionReconoiseD4->SetXTitle("HEpositivedirectionReconoiseD4 \b");
19420  HEpositivedirectionReconoiseD4->SetMarkerColor(2);
19421  HEpositivedirectionReconoiseD4->SetLineColor(0);
19422  gPad->SetGridy();
19423  gPad->SetGridx();
19424  // gPad->SetLogy();
19425  if (kcountHEpositivedirectionReconoiseD4 == 1)
19426  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
19427  if (kcountHEpositivedirectionReconoiseD4 == 2)
19428  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
19429  if (kcountHEpositivedirectionReconoiseD4 == 3)
19430  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
19431  if (kcountHEpositivedirectionReconoiseD4 == 4)
19432  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
19433  if (kcountHEpositivedirectionReconoiseD4 == 5)
19434  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
19435  if (kcountHEpositivedirectionReconoiseD4 == 6)
19436  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
19437  if (kcountHEpositivedirectionReconoiseD4 == 7)
19438  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
19439  if (kcountHEpositivedirectionReconoiseD4 == 8)
19440  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
19441  if (kcountHEpositivedirectionReconoiseD4 == 9)
19442  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
19443  if (kcountHEpositivedirectionReconoiseD4 == 10)
19444  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
19445  if (kcountHEpositivedirectionReconoiseD4 == 11)
19446  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
19447  if (kcountHEpositivedirectionReconoiseD4 == 12)
19448  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
19449  HEpositivedirectionReconoiseD4->Draw("Error");
19450  kcountHEpositivedirectionReconoiseD4++;
19451  if (kcountHEpositivedirectionReconoiseD4 > 12)
19452  break; // 4x6 = 24
19453  } //ccctest>0
19454 
19455  } // for i
19456  } //if(jeta-41 >= 0)
19457  } //for jeta
19459  c3x5->Update();
19460  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
19461  c3x5->Clear();
19462  // clean-up
19463  if (h2CeffHEpositivedirectionReconoiseD4)
19464  delete h2CeffHEpositivedirectionReconoiseD4;
19465  //========================================================================================== 18
19466  //======================================================================
19467  //======================================================================1D plot: D vs phi , different eta, depth=5
19468  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
19469  c3x5->Clear();
19470  c3x5->Divide(3, 5);
19471  c3x5->cd(1);
19472  int kcountHEpositivedirectionReconoiseD5 = 1;
19473  TH1F *h2CeffHEpositivedirectionReconoiseD5 = new TH1F("h2CeffHEpositivedirectionReconoiseD5", "", nphi, 0., 72.);
19474 
19475  for (int jeta = 0; jeta < njeta; jeta++) {
19476  // positivedirectionReconoiseD:
19477  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19478  // for (int i=0;i<ndepth;i++) {
19479  // depth=5
19480  for (int i = 4; i < 5; i++) {
19481  TH1F *HEpositivedirectionReconoiseD5 = (TH1F *)h2CeffHEpositivedirectionReconoiseD5->Clone("twod1");
19482 
19483  float ccctest = 0; // to avoid empty massive elements
19484  for (int jphi = 0; jphi < nphi; jphi++) {
19485  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19486  if (areconoisehe[i][jeta][jphi] > 0.) {
19487  HEpositivedirectionReconoiseD5->Fill(jphi, ccc1);
19488  ccctest = 1.; //HEpositivedirectionReconoiseD5->SetBinError(i,0.01);
19489  }
19490  } // for jphi
19491  if (ccctest > 0.) {
19492  //cout<<"1818 kcountHEpositivedirectionReconoiseD5 = "<<kcountHEpositivedirectionReconoiseD5 <<" jeta-41= "<< jeta-41 <<endl;
19493  c3x5->cd(kcountHEpositivedirectionReconoiseD5);
19494  HEpositivedirectionReconoiseD5->SetMarkerStyle(20);
19495  HEpositivedirectionReconoiseD5->SetMarkerSize(0.4);
19496  HEpositivedirectionReconoiseD5->GetYaxis()->SetLabelSize(0.04);
19497  HEpositivedirectionReconoiseD5->SetXTitle("HEpositivedirectionReconoiseD5 \b");
19498  HEpositivedirectionReconoiseD5->SetMarkerColor(2);
19499  HEpositivedirectionReconoiseD5->SetLineColor(0);
19500  gPad->SetGridy();
19501  gPad->SetGridx();
19502  // gPad->SetLogy();
19503  if (kcountHEpositivedirectionReconoiseD5 == 1)
19504  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
19505  if (kcountHEpositivedirectionReconoiseD5 == 2)
19506  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
19507  if (kcountHEpositivedirectionReconoiseD5 == 3)
19508  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
19509  if (kcountHEpositivedirectionReconoiseD5 == 4)
19510  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
19511  if (kcountHEpositivedirectionReconoiseD5 == 5)
19512  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
19513  if (kcountHEpositivedirectionReconoiseD5 == 6)
19514  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
19515  if (kcountHEpositivedirectionReconoiseD5 == 7)
19516  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
19517  if (kcountHEpositivedirectionReconoiseD5 == 8)
19518  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
19519  if (kcountHEpositivedirectionReconoiseD5 == 9)
19520  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
19521  if (kcountHEpositivedirectionReconoiseD5 == 10)
19522  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
19523  if (kcountHEpositivedirectionReconoiseD5 == 11)
19524  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
19525  HEpositivedirectionReconoiseD5->Draw("Error");
19526  kcountHEpositivedirectionReconoiseD5++;
19527  if (kcountHEpositivedirectionReconoiseD5 > 11)
19528  break; // 4x6 = 24
19529  } //ccctest>0
19530 
19531  } // for i
19532  } //if(jeta-41 >= 0)
19533  } //for jeta
19535  c3x5->Update();
19536  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
19537  c3x5->Clear();
19538  // clean-up
19539  if (h2CeffHEpositivedirectionReconoiseD5)
19540  delete h2CeffHEpositivedirectionReconoiseD5;
19541  //========================================================================================== 19
19542  //======================================================================
19543  //======================================================================1D plot: D vs phi , different eta, depth=6
19544  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
19545  c3x5->Clear();
19546  c3x5->Divide(3, 5);
19547  c3x5->cd(1);
19548  int kcountHEpositivedirectionReconoiseD6 = 1;
19549  TH1F *h2CeffHEpositivedirectionReconoiseD6 = new TH1F("h2CeffHEpositivedirectionReconoiseD6", "", nphi, 0., 72.);
19550 
19551  for (int jeta = 0; jeta < njeta; jeta++) {
19552  // positivedirectionReconoiseD:
19553  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19554  // for (int i=0;i<ndepth;i++) {
19555  // depth=6
19556  for (int i = 5; i < 6; i++) {
19557  TH1F *HEpositivedirectionReconoiseD6 = (TH1F *)h2CeffHEpositivedirectionReconoiseD6->Clone("twod1");
19558 
19559  float ccctest = 0; // to avoid empty massive elements
19560  for (int jphi = 0; jphi < nphi; jphi++) {
19561  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19562  if (areconoisehe[i][jeta][jphi] > 0.) {
19563  HEpositivedirectionReconoiseD6->Fill(jphi, ccc1);
19564  ccctest = 1.; //HEpositivedirectionReconoiseD6->SetBinError(i,0.01);
19565  }
19566  } // for jphi
19567  if (ccctest > 0.) {
19568  //cout<<"1919 kcountHEpositivedirectionReconoiseD6 = "<<kcountHEpositivedirectionReconoiseD6 <<" jeta-41= "<< jeta-41 <<endl;
19569  c3x5->cd(kcountHEpositivedirectionReconoiseD6);
19570  HEpositivedirectionReconoiseD6->SetMarkerStyle(20);
19571  HEpositivedirectionReconoiseD6->SetMarkerSize(0.4);
19572  HEpositivedirectionReconoiseD6->GetYaxis()->SetLabelSize(0.04);
19573  HEpositivedirectionReconoiseD6->SetXTitle("HEpositivedirectionReconoiseD6 \b");
19574  HEpositivedirectionReconoiseD6->SetMarkerColor(2);
19575  HEpositivedirectionReconoiseD6->SetLineColor(0);
19576  gPad->SetGridy();
19577  gPad->SetGridx();
19578  // gPad->SetLogy();
19579  if (kcountHEpositivedirectionReconoiseD6 == 1)
19580  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
19581  if (kcountHEpositivedirectionReconoiseD6 == 2)
19582  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
19583  if (kcountHEpositivedirectionReconoiseD6 == 3)
19584  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
19585  if (kcountHEpositivedirectionReconoiseD6 == 4)
19586  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
19587  if (kcountHEpositivedirectionReconoiseD6 == 5)
19588  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
19589  if (kcountHEpositivedirectionReconoiseD6 == 6)
19590  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
19591  if (kcountHEpositivedirectionReconoiseD6 == 7)
19592  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
19593  if (kcountHEpositivedirectionReconoiseD6 == 8)
19594  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
19595  if (kcountHEpositivedirectionReconoiseD6 == 9)
19596  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
19597  if (kcountHEpositivedirectionReconoiseD6 == 10)
19598  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
19599  HEpositivedirectionReconoiseD6->Draw("Error");
19600  kcountHEpositivedirectionReconoiseD6++;
19601  if (kcountHEpositivedirectionReconoiseD6 > 10)
19602  break; // 4x6 = 24
19603  } //ccctest>0
19604 
19605  } // for i
19606  } //if(jeta-41 >= 0)
19607  } //for jeta
19609  c3x5->Update();
19610  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
19611  c3x5->Clear();
19612  // clean-up
19613  if (h2CeffHEpositivedirectionReconoiseD6)
19614  delete h2CeffHEpositivedirectionReconoiseD6;
19615  //========================================================================================== 20
19616  //======================================================================
19617  //======================================================================1D plot: D vs phi , different eta, depth=7
19618  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
19619  c3x5->Clear();
19620  c3x5->Divide(3, 5);
19621  c3x5->cd(1);
19622  int kcountHEpositivedirectionReconoiseD7 = 1;
19623  TH1F *h2CeffHEpositivedirectionReconoiseD7 = new TH1F("h2CeffHEpositivedirectionReconoiseD7", "", nphi, 0., 72.);
19624 
19625  for (int jeta = 0; jeta < njeta; jeta++) {
19626  // positivedirectionReconoiseD:
19627  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19628  // for (int i=0;i<ndepth;i++) {
19629  // depth=7
19630  for (int i = 6; i < 7; i++) {
19631  TH1F *HEpositivedirectionReconoiseD7 = (TH1F *)h2CeffHEpositivedirectionReconoiseD7->Clone("twod1");
19632 
19633  float ccctest = 0; // to avoid empty massive elements
19634  for (int jphi = 0; jphi < nphi; jphi++) {
19635  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19636  if (areconoisehe[i][jeta][jphi] > 0.) {
19637  HEpositivedirectionReconoiseD7->Fill(jphi, ccc1);
19638  ccctest = 1.; //HEpositivedirectionReconoiseD7->SetBinError(i,0.01);
19639  }
19640  } // for jphi
19641  if (ccctest != 0.) {
19642  //cout<<"2020 kcountHEpositivedirectionReconoiseD7 = "<<kcountHEpositivedirectionReconoiseD7 <<" jeta-41= "<< jeta-41 <<endl;
19643  c3x5->cd(kcountHEpositivedirectionReconoiseD7);
19644  HEpositivedirectionReconoiseD7->SetMarkerStyle(20);
19645  HEpositivedirectionReconoiseD7->SetMarkerSize(0.4);
19646  HEpositivedirectionReconoiseD7->GetYaxis()->SetLabelSize(0.04);
19647  HEpositivedirectionReconoiseD7->SetXTitle("HEpositivedirectionReconoiseD7 \b");
19648  HEpositivedirectionReconoiseD7->SetMarkerColor(2);
19649  HEpositivedirectionReconoiseD7->SetLineColor(0);
19650  gPad->SetGridy();
19651  gPad->SetGridx();
19652  // gPad->SetLogy();
19653  if (kcountHEpositivedirectionReconoiseD7 == 1)
19654  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
19655  if (kcountHEpositivedirectionReconoiseD7 == 2)
19656  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
19657  if (kcountHEpositivedirectionReconoiseD7 == 3)
19658  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
19659  HEpositivedirectionReconoiseD7->Draw("Error");
19660  kcountHEpositivedirectionReconoiseD7++;
19661  if (kcountHEpositivedirectionReconoiseD7 > 3)
19662  break; // 4x6 = 24
19663  } //ccctest>0
19664 
19665  } // for i
19666  } //if(jeta-41 >= 0)
19667  } //for jeta
19669  c3x5->Update();
19670  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
19671  c3x5->Clear();
19672  // clean-up
19673  if (h2CeffHEpositivedirectionReconoiseD7)
19674  delete h2CeffHEpositivedirectionReconoiseD7;
19675 
19676  //========================================================================================== 22222214
19677  //======================================================================
19678  //======================================================================1D plot: D vs phi , different eta, depth=1
19679  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
19680  c3x5->Clear();
19682  c3x5->Divide(3, 5);
19683  c3x5->cd(1);
19684  int kcountHEnegativedirectionReconoiseD1 = 1;
19685  TH1F *h2CeffHEnegativedirectionReconoiseD1 = new TH1F("h2CeffHEnegativedirectionReconoiseD1", "", nphi, 0., 72.);
19686 
19687  for (int jeta = 0; jeta < njeta; jeta++) {
19688  // negativedirectionReconoiseD:
19689  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19690  // for (int i=0;i<ndepth;i++) {
19691  // depth=1
19692  for (int i = 0; i < 1; i++) {
19693  TH1F *HEnegativedirectionReconoiseD1 = (TH1F *)h2CeffHEnegativedirectionReconoiseD1->Clone("twod1");
19694 
19695  float ccctest = 0; // to avoid empty massive elements
19696  for (int jphi = 0; jphi < nphi; jphi++) {
19697  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19698  if (areconoisehe[i][jeta][jphi] > 0.) {
19699  HEnegativedirectionReconoiseD1->Fill(jphi, ccc1);
19700  ccctest = 1.; //HEnegativedirectionReconoiseD1->SetBinError(i,0.01);
19701  }
19702  } // for jphi
19703  if (ccctest > 0.) {
19704  //cout<<"1414 kcountHEnegativedirectionReconoiseD1 = "<<kcountHEnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
19705  c3x5->cd(kcountHEnegativedirectionReconoiseD1);
19706  HEnegativedirectionReconoiseD1->SetMarkerStyle(20);
19707  HEnegativedirectionReconoiseD1->SetMarkerSize(0.4);
19708  HEnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
19709  HEnegativedirectionReconoiseD1->SetXTitle("HEnegativedirectionReconoiseD1 \b");
19710  HEnegativedirectionReconoiseD1->SetMarkerColor(2);
19711  HEnegativedirectionReconoiseD1->SetLineColor(0);
19712  gPad->SetGridy();
19713  gPad->SetGridx();
19714  // gPad->SetLogy();
19715  if (kcountHEnegativedirectionReconoiseD1 == 1)
19716  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
19717  if (kcountHEnegativedirectionReconoiseD1 == 2)
19718  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
19719  if (kcountHEnegativedirectionReconoiseD1 == 3)
19720  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
19721  if (kcountHEnegativedirectionReconoiseD1 == 4)
19722  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
19723  if (kcountHEnegativedirectionReconoiseD1 == 5)
19724  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
19725  if (kcountHEnegativedirectionReconoiseD1 == 6)
19726  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
19727  if (kcountHEnegativedirectionReconoiseD1 == 7)
19728  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
19729  if (kcountHEnegativedirectionReconoiseD1 == 8)
19730  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
19731  if (kcountHEnegativedirectionReconoiseD1 == 9)
19732  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
19733  if (kcountHEnegativedirectionReconoiseD1 == 10)
19734  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
19735  if (kcountHEnegativedirectionReconoiseD1 == 11)
19736  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
19737  if (kcountHEnegativedirectionReconoiseD1 == 12)
19738  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
19739  HEnegativedirectionReconoiseD1->Draw("Error");
19740  kcountHEnegativedirectionReconoiseD1++;
19741  if (kcountHEnegativedirectionReconoiseD1 > 12)
19742  break; // 4x6 = 24
19743  } //ccctest>0
19744 
19745  } // for i
19746  } //if(jeta-41 < 0)
19747  } //for jeta
19749  c3x5->Update();
19750  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
19751  c3x5->Clear();
19752  // clean-up
19753  if (h2CeffHEnegativedirectionReconoiseD1)
19754  delete h2CeffHEnegativedirectionReconoiseD1;
19755  //========================================================================================== 22222215
19756  //======================================================================
19757  //======================================================================1D plot: D vs phi , different eta, depth=2
19758  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
19759  c3x5->Clear();
19760  c3x5->Divide(3, 5);
19761  c3x5->cd(1);
19762  int kcountHEnegativedirectionReconoiseD2 = 1;
19763  TH1F *h2CeffHEnegativedirectionReconoiseD2 = new TH1F("h2CeffHEnegativedirectionReconoiseD2", "", nphi, 0., 72.);
19764 
19765  for (int jeta = 0; jeta < njeta; jeta++) {
19766  // negativedirectionReconoiseD:
19767  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19768  // for (int i=0;i<ndepth;i++) {
19769  // depth=2
19770  for (int i = 1; i < 2; i++) {
19771  TH1F *HEnegativedirectionReconoiseD2 = (TH1F *)h2CeffHEnegativedirectionReconoiseD2->Clone("twod1");
19772 
19773  float ccctest = 0; // to avoid empty massive elements
19774  for (int jphi = 0; jphi < nphi; jphi++) {
19775  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19776  if (areconoisehe[i][jeta][jphi] > 0.) {
19777  HEnegativedirectionReconoiseD2->Fill(jphi, ccc1);
19778  ccctest = 1.; //HEnegativedirectionReconoiseD2->SetBinError(i,0.01);
19779  }
19780  } // for jphi
19781  if (ccctest > 0.) {
19782  //cout<<"1515 kcountHEnegativedirectionReconoiseD2 = "<<kcountHEnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
19783  c3x5->cd(kcountHEnegativedirectionReconoiseD2);
19784  HEnegativedirectionReconoiseD2->SetMarkerStyle(20);
19785  HEnegativedirectionReconoiseD2->SetMarkerSize(0.4);
19786  HEnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
19787  HEnegativedirectionReconoiseD2->SetXTitle("HEnegativedirectionReconoiseD2 \b");
19788  HEnegativedirectionReconoiseD2->SetMarkerColor(2);
19789  HEnegativedirectionReconoiseD2->SetLineColor(0);
19790  gPad->SetGridy();
19791  gPad->SetGridx();
19792  // gPad->SetLogy();
19793  if (kcountHEnegativedirectionReconoiseD2 == 1)
19794  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
19795  if (kcountHEnegativedirectionReconoiseD2 == 2)
19796  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
19797  if (kcountHEnegativedirectionReconoiseD2 == 3)
19798  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
19799  if (kcountHEnegativedirectionReconoiseD2 == 4)
19800  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
19801  if (kcountHEnegativedirectionReconoiseD2 == 5)
19802  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
19803  if (kcountHEnegativedirectionReconoiseD2 == 6)
19804  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
19805  if (kcountHEnegativedirectionReconoiseD2 == 7)
19806  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
19807  if (kcountHEnegativedirectionReconoiseD2 == 8)
19808  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
19809  if (kcountHEnegativedirectionReconoiseD2 == 9)
19810  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
19811  if (kcountHEnegativedirectionReconoiseD2 == 10)
19812  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
19813  if (kcountHEnegativedirectionReconoiseD2 == 11)
19814  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
19815  if (kcountHEnegativedirectionReconoiseD2 == 12)
19816  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
19817  if (kcountHEnegativedirectionReconoiseD2 == 13)
19818  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
19819  HEnegativedirectionReconoiseD2->Draw("Error");
19820  kcountHEnegativedirectionReconoiseD2++;
19821  if (kcountHEnegativedirectionReconoiseD2 > 13)
19822  break; // 4x6 = 24
19823  } //ccctest>0
19824 
19825  } // for i
19826  } //if(jeta-41 < 0)
19827  } //for jeta
19829  c3x5->Update();
19830  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
19831  c3x5->Clear();
19832  // clean-up
19833  if (h2CeffHEnegativedirectionReconoiseD2)
19834  delete h2CeffHEnegativedirectionReconoiseD2;
19835  //========================================================================================== 22222216
19836  //======================================================================
19837  //======================================================================1D plot: D vs phi , different eta, depth=3
19838  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
19839  c3x5->Clear();
19840  c3x5->Divide(3, 5);
19841  c3x5->cd(1);
19842  int kcountHEnegativedirectionReconoiseD3 = 1;
19843  TH1F *h2CeffHEnegativedirectionReconoiseD3 = new TH1F("h2CeffHEnegativedirectionReconoiseD3", "", nphi, 0., 72.);
19844 
19845  for (int jeta = 0; jeta < njeta; jeta++) {
19846  // negativedirectionReconoiseD:
19847  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19848  // for (int i=0;i<ndepth;i++) {
19849  // depth=3
19850  for (int i = 2; i < 3; i++) {
19851  TH1F *HEnegativedirectionReconoiseD3 = (TH1F *)h2CeffHEnegativedirectionReconoiseD3->Clone("twod1");
19852 
19853  float ccctest = 0; // to avoid empty massive elements
19854  for (int jphi = 0; jphi < nphi; jphi++) {
19855  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19856  if (areconoisehe[i][jeta][jphi] > 0.) {
19857  HEnegativedirectionReconoiseD3->Fill(jphi, ccc1);
19858  ccctest = 1.; //HEnegativedirectionReconoiseD3->SetBinError(i,0.01);
19859  }
19860  } // for jphi
19861  if (ccctest > 0.) {
19862  //cout<<"1616 kcountHEnegativedirectionReconoiseD3 = "<<kcountHEnegativedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
19863  c3x5->cd(kcountHEnegativedirectionReconoiseD3);
19864  HEnegativedirectionReconoiseD3->SetMarkerStyle(20);
19865  HEnegativedirectionReconoiseD3->SetMarkerSize(0.4);
19866  HEnegativedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
19867  HEnegativedirectionReconoiseD3->SetXTitle("HEnegativedirectionReconoiseD3 \b");
19868  HEnegativedirectionReconoiseD3->SetMarkerColor(2);
19869  HEnegativedirectionReconoiseD3->SetLineColor(0);
19870  gPad->SetGridy();
19871  gPad->SetGridx();
19872  // gPad->SetLogy();
19873  if (kcountHEnegativedirectionReconoiseD3 == 1)
19874  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
19875  if (kcountHEnegativedirectionReconoiseD3 == 2)
19876  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
19877  if (kcountHEnegativedirectionReconoiseD3 == 3)
19878  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
19879  if (kcountHEnegativedirectionReconoiseD3 == 4)
19880  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
19881  if (kcountHEnegativedirectionReconoiseD3 == 5)
19882  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
19883  if (kcountHEnegativedirectionReconoiseD3 == 6)
19884  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
19885  if (kcountHEnegativedirectionReconoiseD3 == 7)
19886  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
19887  if (kcountHEnegativedirectionReconoiseD3 == 8)
19888  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
19889  if (kcountHEnegativedirectionReconoiseD3 == 9)
19890  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
19891  if (kcountHEnegativedirectionReconoiseD3 == 10)
19892  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
19893  if (kcountHEnegativedirectionReconoiseD3 == 11)
19894  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
19895  if (kcountHEnegativedirectionReconoiseD3 == 12)
19896  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
19897  if (kcountHEnegativedirectionReconoiseD3 == 13)
19898  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
19899  HEnegativedirectionReconoiseD3->Draw("Error");
19900  kcountHEnegativedirectionReconoiseD3++;
19901  if (kcountHEnegativedirectionReconoiseD3 > 13)
19902  break; // 4x6 = 24
19903  } //ccctest>0
19904 
19905  } // for i
19906  } //if(jeta-41 < 0)
19907  } //for jeta
19909  c3x5->Update();
19910  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
19911  c3x5->Clear();
19912  // clean-up
19913  if (h2CeffHEnegativedirectionReconoiseD3)
19914  delete h2CeffHEnegativedirectionReconoiseD3;
19915  //========================================================================================== 22222217
19916  //======================================================================
19917  //======================================================================1D plot: D vs phi , different eta, depth=4
19918  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
19919  c3x5->Clear();
19920  c3x5->Divide(3, 5);
19921  c3x5->cd(1);
19922  int kcountHEnegativedirectionReconoiseD4 = 1;
19923  TH1F *h2CeffHEnegativedirectionReconoiseD4 = new TH1F("h2CeffHEnegativedirectionReconoiseD4", "", nphi, 0., 72.);
19924 
19925  for (int jeta = 0; jeta < njeta; jeta++) {
19926  // negativedirectionReconoiseD:
19927  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19928  // for (int i=0;i<ndepth;i++) {
19929  // depth=4
19930  for (int i = 3; i < 4; i++) {
19931  TH1F *HEnegativedirectionReconoiseD4 = (TH1F *)h2CeffHEnegativedirectionReconoiseD4->Clone("twod1");
19932 
19933  float ccctest = 0; // to avoid empty massive elements
19934  for (int jphi = 0; jphi < nphi; jphi++) {
19935  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19936  if (areconoisehe[i][jeta][jphi] > 0.) {
19937  HEnegativedirectionReconoiseD4->Fill(jphi, ccc1);
19938  ccctest = 1.; //HEnegativedirectionReconoiseD4->SetBinError(i,0.01);
19939  }
19940  } // for jphi
19941  if (ccctest > 0.) {
19942  //cout<<"1717 kcountHEnegativedirectionReconoiseD4 = "<<kcountHEnegativedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
19943  c3x5->cd(kcountHEnegativedirectionReconoiseD4);
19944  HEnegativedirectionReconoiseD4->SetMarkerStyle(20);
19945  HEnegativedirectionReconoiseD4->SetMarkerSize(0.4);
19946  HEnegativedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
19947  HEnegativedirectionReconoiseD4->SetXTitle("HEnegativedirectionReconoiseD4 \b");
19948  HEnegativedirectionReconoiseD4->SetMarkerColor(2);
19949  HEnegativedirectionReconoiseD4->SetLineColor(0);
19950  gPad->SetGridy();
19951  gPad->SetGridx();
19952  // gPad->SetLogy();
19953  if (kcountHEnegativedirectionReconoiseD4 == 1)
19954  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
19955  if (kcountHEnegativedirectionReconoiseD4 == 2)
19956  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
19957  if (kcountHEnegativedirectionReconoiseD4 == 3)
19958  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
19959  if (kcountHEnegativedirectionReconoiseD4 == 4)
19960  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
19961  if (kcountHEnegativedirectionReconoiseD4 == 5)
19962  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
19963  if (kcountHEnegativedirectionReconoiseD4 == 6)
19964  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
19965  if (kcountHEnegativedirectionReconoiseD4 == 7)
19966  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
19967  if (kcountHEnegativedirectionReconoiseD4 == 8)
19968  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
19969  if (kcountHEnegativedirectionReconoiseD4 == 9)
19970  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
19971  if (kcountHEnegativedirectionReconoiseD4 == 10)
19972  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
19973  if (kcountHEnegativedirectionReconoiseD4 == 11)
19974  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
19975  if (kcountHEnegativedirectionReconoiseD4 == 12)
19976  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
19977  HEnegativedirectionReconoiseD4->Draw("Error");
19978  kcountHEnegativedirectionReconoiseD4++;
19979  if (kcountHEnegativedirectionReconoiseD4 > 12)
19980  break; // 4x6 = 24
19981  } //ccctest>0
19982 
19983  } // for i
19984  } //if(jeta-41 < 0)
19985  } //for jeta
19987  c3x5->Update();
19988  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
19989  c3x5->Clear();
19990  // clean-up
19991  if (h2CeffHEnegativedirectionReconoiseD4)
19992  delete h2CeffHEnegativedirectionReconoiseD4;
19993  //========================================================================================== 22222218
19994  //======================================================================
19995  //======================================================================1D plot: D vs phi , different eta, depth=5
19996  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
19997  c3x5->Clear();
19998  c3x5->Divide(3, 5);
19999  c3x5->cd(1);
20000  int kcountHEnegativedirectionReconoiseD5 = 1;
20001  TH1F *h2CeffHEnegativedirectionReconoiseD5 = new TH1F("h2CeffHEnegativedirectionReconoiseD5", "", nphi, 0., 72.);
20002 
20003  for (int jeta = 0; jeta < njeta; jeta++) {
20004  // negativedirectionReconoiseD:
20005  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
20006  // for (int i=0;i<ndepth;i++) {
20007  // depth=5
20008  for (int i = 4; i < 5; i++) {
20009  TH1F *HEnegativedirectionReconoiseD5 = (TH1F *)h2CeffHEnegativedirectionReconoiseD5->Clone("twod1");
20010 
20011  float ccctest = 0; // to avoid empty massive elements
20012  for (int jphi = 0; jphi < nphi; jphi++) {
20013  double ccc1 = reconoisevariancehe[i][jeta][jphi];
20014  if (areconoisehe[i][jeta][jphi] > 0.) {
20015  HEnegativedirectionReconoiseD5->Fill(jphi, ccc1);
20016  ccctest = 1.; //HEnegativedirectionReconoiseD5->SetBinError(i,0.01);
20017  }
20018  } // for jphi
20019  if (ccctest > 0.) {
20020  //cout<<"1818 kcountHEnegativedirectionReconoiseD5 = "<<kcountHEnegativedirectionReconoiseD5 <<" jeta-41= "<< jeta-41 <<endl;
20021  c3x5->cd(kcountHEnegativedirectionReconoiseD5);
20022  HEnegativedirectionReconoiseD5->SetMarkerStyle(20);
20023  HEnegativedirectionReconoiseD5->SetMarkerSize(0.4);
20024  HEnegativedirectionReconoiseD5->GetYaxis()->SetLabelSize(0.04);
20025  HEnegativedirectionReconoiseD5->SetXTitle("HEnegativedirectionReconoiseD5 \b");
20026  HEnegativedirectionReconoiseD5->SetMarkerColor(2);
20027  HEnegativedirectionReconoiseD5->SetLineColor(0);
20028  gPad->SetGridy();
20029  gPad->SetGridx();
20030  // gPad->SetLogy();
20031  if (kcountHEnegativedirectionReconoiseD5 == 1)
20032  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
20033  if (kcountHEnegativedirectionReconoiseD5 == 2)
20034  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
20035  if (kcountHEnegativedirectionReconoiseD5 == 3)
20036  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
20037  if (kcountHEnegativedirectionReconoiseD5 == 4)
20038  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
20039  if (kcountHEnegativedirectionReconoiseD5 == 5)
20040  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
20041  if (kcountHEnegativedirectionReconoiseD5 == 6)
20042  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
20043  if (kcountHEnegativedirectionReconoiseD5 == 7)
20044  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
20045  if (kcountHEnegativedirectionReconoiseD5 == 8)
20046  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
20047  if (kcountHEnegativedirectionReconoiseD5 == 9)
20048  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
20049  if (kcountHEnegativedirectionReconoiseD5 == 10)
20050  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
20051  if (kcountHEnegativedirectionReconoiseD5 == 11)
20052  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
20053  HEnegativedirectionReconoiseD5->Draw("Error");
20054  kcountHEnegativedirectionReconoiseD5++;
20055  if (kcountHEnegativedirectionReconoiseD5 > 11)
20056  break; // 4x6 = 24
20057  } //ccctest>0
20058 
20059  } // for i
20060  } //if(jeta-41 < 0)
20061  } //for jeta
20063  c3x5->Update();
20064  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
20065  c3x5->Clear();
20066  // clean-up
20067  if (h2CeffHEnegativedirectionReconoiseD5)
20068  delete h2CeffHEnegativedirectionReconoiseD5;
20069  //========================================================================================== 22222219
20070  //======================================================================
20071  //======================================================================1D plot: D vs phi , different eta, depth=6
20072  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
20073  c3x5->Clear();
20074  c3x5->Divide(3, 5);
20075  c3x5->cd(1);
20076  int kcountHEnegativedirectionReconoiseD6 = 1;
20077  TH1F *h2CeffHEnegativedirectionReconoiseD6 = new TH1F("h2CeffHEnegativedirectionReconoiseD6", "", nphi, 0., 72.);
20078 
20079  for (int jeta = 0; jeta < njeta; jeta++) {
20080  // negativedirectionReconoiseD:
20081  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
20082  // for (int i=0;i<ndepth;i++) {
20083  // depth=6
20084  for (int i = 5; i < 6; i++) {
20085  TH1F *HEnegativedirectionReconoiseD6 = (TH1F *)h2CeffHEnegativedirectionReconoiseD6->Clone("twod1");
20086 
20087  float ccctest = 0; // to avoid empty massive elements
20088  for (int jphi = 0; jphi < nphi; jphi++) {
20089  double ccc1 = reconoisevariancehe[i][jeta][jphi];
20090  if (areconoisehe[i][jeta][jphi] > 0.) {
20091  HEnegativedirectionReconoiseD6->Fill(jphi, ccc1);
20092  ccctest = 1.; //HEnegativedirectionReconoiseD6->SetBinError(i,0.01);
20093  }
20094  } // for jphi
20095  if (ccctest > 0.) {
20096  //cout<<"1919 kcountHEnegativedirectionReconoiseD6 = "<<kcountHEnegativedirectionReconoiseD6 <<" jeta-41= "<< jeta-41 <<endl;
20097  c3x5->cd(kcountHEnegativedirectionReconoiseD6);
20098  HEnegativedirectionReconoiseD6->SetMarkerStyle(20);
20099  HEnegativedirectionReconoiseD6->SetMarkerSize(0.4);
20100  HEnegativedirectionReconoiseD6->GetYaxis()->SetLabelSize(0.04);
20101  HEnegativedirectionReconoiseD6->SetXTitle("HEnegativedirectionReconoiseD6 \b");
20102  HEnegativedirectionReconoiseD6->SetMarkerColor(2);
20103  HEnegativedirectionReconoiseD6->SetLineColor(0);
20104  gPad->SetGridy();
20105  gPad->SetGridx();
20106  // gPad->SetLogy();
20107  if (kcountHEnegativedirectionReconoiseD6 == 1)
20108  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
20109  if (kcountHEnegativedirectionReconoiseD6 == 2)
20110  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
20111  if (kcountHEnegativedirectionReconoiseD6 == 3)
20112  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
20113  if (kcountHEnegativedirectionReconoiseD6 == 4)
20114  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
20115  if (kcountHEnegativedirectionReconoiseD6 == 5)
20116  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
20117  if (kcountHEnegativedirectionReconoiseD6 == 6)
20118  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
20119  if (kcountHEnegativedirectionReconoiseD6 == 7)
20120  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
20121  if (kcountHEnegativedirectionReconoiseD6 == 8)
20122  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
20123  if (kcountHEnegativedirectionReconoiseD6 == 9)
20124  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
20125  if (kcountHEnegativedirectionReconoiseD6 == 10)
20126  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
20127  HEnegativedirectionReconoiseD6->Draw("Error");
20128  kcountHEnegativedirectionReconoiseD6++;
20129  if (kcountHEnegativedirectionReconoiseD6 > 10)
20130  break; // 4x6 = 24
20131  } //ccctest>0
20132 
20133  } // for i
20134  } //if(jeta-41 < 0)
20135  } //for jeta
20137  c3x5->Update();
20138  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
20139  c3x5->Clear();
20140  // clean-up
20141  if (h2CeffHEnegativedirectionReconoiseD6)
20142  delete h2CeffHEnegativedirectionReconoiseD6;
20143  //========================================================================================== 22222220
20144  //======================================================================
20145  //======================================================================1D plot: D vs phi , different eta, depth=7
20146  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
20147  c3x5->Clear();
20148  c3x5->Divide(3, 5);
20149  c3x5->cd(1);
20150  int kcountHEnegativedirectionReconoiseD7 = 1;
20151  TH1F *h2CeffHEnegativedirectionReconoiseD7 = new TH1F("h2CeffHEnegativedirectionReconoiseD7", "", nphi, 0., 72.);
20152 
20153  for (int jeta = 0; jeta < njeta; jeta++) {
20154  // negativedirectionReconoiseD:
20155  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
20156  // for (int i=0;i<ndepth;i++) {
20157  // depth=7
20158  for (int i = 6; i < 7; i++) {
20159  TH1F *HEnegativedirectionReconoiseD7 = (TH1F *)h2CeffHEnegativedirectionReconoiseD7->Clone("twod1");
20160 
20161  float ccctest = 0; // to avoid empty massive elements
20162  for (int jphi = 0; jphi < nphi; jphi++) {
20163  double ccc1 = reconoisevariancehe[i][jeta][jphi];
20164  if (areconoisehe[i][jeta][jphi] > 0.) {
20165  HEnegativedirectionReconoiseD7->Fill(jphi, ccc1);
20166  ccctest = 1.; //HEnegativedirectionReconoiseD7->SetBinError(i,0.01);
20167  }
20168  } // for jphi
20169  if (ccctest != 0.) {
20170  //cout<<"2020 kcountHEnegativedirectionReconoiseD7 = "<<kcountHEnegativedirectionReconoiseD7 <<" jeta-41= "<< jeta-41 <<endl;
20171  c3x5->cd(kcountHEnegativedirectionReconoiseD7);
20172  HEnegativedirectionReconoiseD7->SetMarkerStyle(20);
20173  HEnegativedirectionReconoiseD7->SetMarkerSize(0.4);
20174  HEnegativedirectionReconoiseD7->GetYaxis()->SetLabelSize(0.04);
20175  HEnegativedirectionReconoiseD7->SetXTitle("HEnegativedirectionReconoiseD7 \b");
20176  HEnegativedirectionReconoiseD7->SetMarkerColor(2);
20177  HEnegativedirectionReconoiseD7->SetLineColor(0);
20178  gPad->SetGridy();
20179  gPad->SetGridx();
20180  // gPad->SetLogy();
20181  if (kcountHEnegativedirectionReconoiseD7 == 1)
20182  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
20183  if (kcountHEnegativedirectionReconoiseD7 == 2)
20184  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
20185  if (kcountHEnegativedirectionReconoiseD7 == 3)
20186  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
20187  HEnegativedirectionReconoiseD7->Draw("Error");
20188  kcountHEnegativedirectionReconoiseD7++;
20189  if (kcountHEnegativedirectionReconoiseD7 > 3)
20190  break; // 4x6 = 24
20191  } //ccctest>0
20192 
20193  } // for i
20194  } //if(jeta-41 < 0)
20195  } //for jeta
20197  c3x5->Update();
20198  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
20199  c3x5->Clear();
20200  // clean-up
20201  if (h2CeffHEnegativedirectionReconoiseD7)
20202  delete h2CeffHEnegativedirectionReconoiseD7;
20203  //===================================================================== END of Reconoise HE for phi-symmetry
20204  //===================================================================== END of Reconoise HE for phi-symmetry
20205  //===================================================================== END of Reconoise HE for phi-symmetry
20209  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
20210  //ndepth = k_max[5];
20211  ndepth = 2;
20212  double areconoiseHF[ndepth][njeta][njphi];
20213  double breconoiseHF[ndepth][njeta][njphi];
20214  double reconoisevarianceHF[ndepth][njeta][njphi];
20215 
20216  TH2F *recNoiseEnergy1HF1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HF1");
20217  TH2F *recNoiseEnergy0HF1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HF1");
20218  TH2F *recNoiseEnergyHF1 = (TH2F *)recNoiseEnergy1HF1->Clone("recNoiseEnergyHF1");
20219  recNoiseEnergyHF1->Divide(recNoiseEnergy1HF1, recNoiseEnergy0HF1, 1, 1, "B");
20220  TH2F *recNoiseEnergy1HF2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy1_HF2");
20221  TH2F *recNoiseEnergy0HF2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HF2");
20222  TH2F *recNoiseEnergyHF2 = (TH2F *)recNoiseEnergy1HF2->Clone("recNoiseEnergyHF2");
20223  recNoiseEnergyHF2->Divide(recNoiseEnergy1HF2, recNoiseEnergy0HF2, 1, 1, "B");
20224  //====================================================================== PHI normalization & put R into massive areconoiseHF
20225  for (int jeta = 0; jeta < njeta; jeta++) {
20226  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20227  //preparation for PHI normalization:
20228  double sumreconoiseHF0 = 0;
20229  int nsumreconoiseHF0 = 0;
20230  double sumreconoiseHF1 = 0;
20231  int nsumreconoiseHF1 = 0;
20232  for (int jphi = 0; jphi < njphi; jphi++) {
20233  areconoiseHF[0][jeta][jphi] = recNoiseEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
20234  areconoiseHF[1][jeta][jphi] = recNoiseEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
20235  breconoiseHF[0][jeta][jphi] = recNoiseEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
20236  breconoiseHF[1][jeta][jphi] = recNoiseEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
20237  sumreconoiseHF0 += areconoiseHF[0][jeta][jphi];
20238  ++nsumreconoiseHF0;
20239  sumreconoiseHF1 += areconoiseHF[1][jeta][jphi];
20240  ++nsumreconoiseHF1;
20241  } // phi
20242 
20243  // PHI normalization for DIF:
20244  for (int jphi = 0; jphi < njphi; jphi++) {
20245  if (sumreconoiseHF0 != 0.)
20246  breconoiseHF[0][jeta][jphi] -= (sumreconoiseHF0 / nsumreconoiseHF0);
20247  if (sumreconoiseHF1 != 0.)
20248  breconoiseHF[1][jeta][jphi] -= (sumreconoiseHF1 / nsumreconoiseHF1);
20249  } // phi
20250 
20251  // PHI normalization for R:
20252  for (int jphi = 0; jphi < njphi; jphi++) {
20253  if (sumreconoiseHF0 != 0.)
20254  areconoiseHF[0][jeta][jphi] /= (sumreconoiseHF0 / nsumreconoiseHF0);
20255  if (sumreconoiseHF1 != 0.)
20256  areconoiseHF[1][jeta][jphi] /= (sumreconoiseHF1 / nsumreconoiseHF1);
20257  } // phi
20258 
20259  } // jeta-41
20260  } //eta
20262 
20263  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HF
20264  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
20265  //======================================================================
20266  //======================================================================
20267  // cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
20268  c2x1->Clear();
20270  c2x1->Divide(2, 1);
20271  c2x1->cd(1);
20272  TH2F *GefzRreconoiseHF42D = new TH2F("GefzRreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
20273  TH2F *GefzRreconoiseHF42D0 = new TH2F("GefzRreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
20274  TH2F *GefzRreconoiseHF42DF = (TH2F *)GefzRreconoiseHF42D0->Clone("GefzRreconoiseHF42DF");
20275  for (int i = 0; i < ndepth; i++) {
20276  for (int jeta = 0; jeta < neta; jeta++) {
20277  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20278  for (int jphi = 0; jphi < nphi; jphi++) {
20279  double ccc1 = areconoiseHF[i][jeta][jphi];
20280  int k2plot = jeta - 41;
20281  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
20282  if (ccc1 != 0.) {
20283  GefzRreconoiseHF42D->Fill(kkk, jphi, ccc1);
20284  GefzRreconoiseHF42D0->Fill(kkk, jphi, 1.);
20285  }
20286  }
20287  }
20288  }
20289  }
20290  GefzRreconoiseHF42DF->Divide(GefzRreconoiseHF42D, GefzRreconoiseHF42D0, 1, 1, "B"); // average A
20291  gPad->SetGridy();
20292  gPad->SetGridx(); // gPad->SetLogz();
20293  GefzRreconoiseHF42DF->SetXTitle("<R>_depth #eta \b");
20294  GefzRreconoiseHF42DF->SetYTitle(" #phi \b");
20295  GefzRreconoiseHF42DF->Draw("COLZ");
20296 
20297  c2x1->cd(2);
20298  TH1F *energyhitNoise_HF = (TH1F *)dir->FindObjectAny("h_energyhitNoise_HF");
20299  energyhitNoise_HF->SetMarkerStyle(20);
20300  energyhitNoise_HF->SetMarkerSize(0.4);
20301  energyhitNoise_HF->GetYaxis()->SetLabelSize(0.04);
20302  energyhitNoise_HF->SetXTitle("energyhitNoise_HF \b");
20303  energyhitNoise_HF->SetMarkerColor(2);
20304  energyhitNoise_HF->SetLineColor(0);
20305  gPad->SetGridy();
20306  gPad->SetGridx();
20307  energyhitNoise_HF->Draw("Error");
20308 
20310  c2x1->Update();
20311  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHF.png");
20312  c2x1->Clear();
20313  // clean-up
20314  if (GefzRreconoiseHF42D)
20315  delete GefzRreconoiseHF42D;
20316  if (GefzRreconoiseHF42D0)
20317  delete GefzRreconoiseHF42D0;
20318  if (GefzRreconoiseHF42DF)
20319  delete GefzRreconoiseHF42DF;
20320  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
20321  //======================================================================
20322  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
20323  c1x1->Clear();
20325  c1x1->Divide(1, 1);
20326  c1x1->cd(1);
20327  TH1F *GefzRreconoiseHF41D = new TH1F("GefzRreconoiseHF41D", "", nphi, 0., 72.);
20328  TH1F *GefzRreconoiseHF41D0 = new TH1F("GefzRreconoiseHF41D0", "", nphi, 0., 72.);
20329  TH1F *GefzRreconoiseHF41DF = (TH1F *)GefzRreconoiseHF41D0->Clone("GefzRreconoiseHF41DF");
20330  for (int jphi = 0; jphi < nphi; jphi++) {
20331  for (int jeta = 0; jeta < neta; jeta++) {
20332  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20333  for (int i = 0; i < ndepth; i++) {
20334  double ccc1 = areconoiseHF[i][jeta][jphi];
20335  if (ccc1 != 0.) {
20336  GefzRreconoiseHF41D->Fill(jphi, ccc1);
20337  GefzRreconoiseHF41D0->Fill(jphi, 1.);
20338  }
20339  }
20340  }
20341  }
20342  }
20343  GefzRreconoiseHF41DF->Divide(GefzRreconoiseHF41D, GefzRreconoiseHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
20344  GefzRreconoiseHF41D0->Sumw2();
20345  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHF41DF->SetBinError(jphi,0.01);}
20346  gPad->SetGridy();
20347  gPad->SetGridx(); // gPad->SetLogz();
20348  GefzRreconoiseHF41DF->SetMarkerStyle(20);
20349  GefzRreconoiseHF41DF->SetMarkerSize(1.4);
20350  GefzRreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
20351  GefzRreconoiseHF41DF->SetXTitle("#phi \b");
20352  GefzRreconoiseHF41DF->SetYTitle(" <R> \b");
20353  GefzRreconoiseHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
20354  GefzRreconoiseHF41DF->SetMarkerColor(4);
20355  GefzRreconoiseHF41DF->SetLineColor(
20356  4); // GefzRreconoiseHF41DF->SetMinimum(0.8); // GefzRreconoiseHF41DF->SetMaximum(1.000);
20357  GefzRreconoiseHF41DF->Draw("Error");
20359  c1x1->Update();
20360  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHF.png");
20361  c1x1->Clear();
20362  // clean-up
20363  if (GefzRreconoiseHF41D)
20364  delete GefzRreconoiseHF41D;
20365  if (GefzRreconoiseHF41D0)
20366  delete GefzRreconoiseHF41D0;
20367  if (GefzRreconoiseHF41DF)
20368  delete GefzRreconoiseHF41DF;
20369  //========================================================================================== 4
20370  //======================================================================
20371  //======================================================================1D plot: R vs phi , different eta, depth=1
20372  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
20373  c3x5->Clear();
20375  c3x5->Divide(3, 5);
20376  c3x5->cd(1);
20377  int kcountHFpositivedirectionReconoise1 = 1;
20378  TH1F *h2CeffHFpositivedirectionReconoise1 = new TH1F("h2CeffHFpositivedirectionReconoise1", "", nphi, 0., 72.);
20379  for (int jeta = 0; jeta < njeta; jeta++) {
20380  // positivedirectionReconoise:
20381  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20382  // for (int i=0;i<ndepth;i++) {
20383  // depth=1
20384  for (int i = 0; i < 1; i++) {
20385  TH1F *HFpositivedirectionReconoise1 = (TH1F *)h2CeffHFpositivedirectionReconoise1->Clone("twod1");
20386  float ccctest = 0; // to avoid empty massive elements
20387  for (int jphi = 0; jphi < nphi; jphi++) {
20388  double ccc1 = areconoiseHF[i][jeta][jphi];
20389  if (ccc1 != 0.) {
20390  HFpositivedirectionReconoise1->Fill(jphi, ccc1);
20391  ccctest = 1.; //HFpositivedirectionReconoise1->SetBinError(i,0.01);
20392  }
20393  } // for jphi
20394  if (ccctest > 0.) {
20395  // cout<<"444 kcountHFpositivedirectionReconoise1 = "<<kcountHFpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
20396  c3x5->cd(kcountHFpositivedirectionReconoise1);
20397  HFpositivedirectionReconoise1->SetMarkerStyle(20);
20398  HFpositivedirectionReconoise1->SetMarkerSize(0.4);
20399  HFpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
20400  HFpositivedirectionReconoise1->SetXTitle("HFpositivedirectionReconoise1 \b");
20401  HFpositivedirectionReconoise1->SetMarkerColor(2);
20402  HFpositivedirectionReconoise1->SetLineColor(0);
20403  gPad->SetGridy();
20404  gPad->SetGridx();
20405  // gPad->SetLogy();
20406  if (kcountHFpositivedirectionReconoise1 == 1)
20407  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
20408  if (kcountHFpositivedirectionReconoise1 == 2)
20409  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
20410  if (kcountHFpositivedirectionReconoise1 == 3)
20411  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
20412  if (kcountHFpositivedirectionReconoise1 == 4)
20413  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
20414  if (kcountHFpositivedirectionReconoise1 == 5)
20415  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
20416  if (kcountHFpositivedirectionReconoise1 == 6)
20417  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
20418  if (kcountHFpositivedirectionReconoise1 == 7)
20419  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
20420  if (kcountHFpositivedirectionReconoise1 == 8)
20421  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
20422  if (kcountHFpositivedirectionReconoise1 == 9)
20423  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
20424  if (kcountHFpositivedirectionReconoise1 == 10)
20425  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
20426  if (kcountHFpositivedirectionReconoise1 == 11)
20427  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
20428  if (kcountHFpositivedirectionReconoise1 == 12)
20429  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
20430  if (kcountHFpositivedirectionReconoise1 == 13)
20431  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
20432  HFpositivedirectionReconoise1->Draw("Error");
20433  kcountHFpositivedirectionReconoise1++;
20434  if (kcountHFpositivedirectionReconoise1 > 13)
20435  break; //
20436  } //ccctest>0
20437 
20438  } // for i
20439  } //if(jeta-41 >= 28 && jeta-41 <= 40
20440  } //for jeta
20442  c3x5->Update();
20443  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
20444  c3x5->Clear();
20445  // clean-up
20446  if (h2CeffHFpositivedirectionReconoise1)
20447  delete h2CeffHFpositivedirectionReconoise1;
20448 
20449  //========================================================================================== 5
20450  //======================================================================
20451  //======================================================================1D plot: R vs phi , different eta, depth=2
20452  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
20453  c3x5->Clear();
20455  c3x5->Divide(3, 5);
20456  c3x5->cd(1);
20457  int kcountHFpositivedirectionReconoise2 = 1;
20458  TH1F *h2CeffHFpositivedirectionReconoise2 = new TH1F("h2CeffHFpositivedirectionReconoise2", "", nphi, 0., 72.);
20459  for (int jeta = 0; jeta < njeta; jeta++) {
20460  // positivedirectionReconoise:
20461  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20462  // for (int i=0;i<ndepth;i++) {
20463  // depth=2
20464  for (int i = 1; i < 2; i++) {
20465  TH1F *HFpositivedirectionReconoise2 = (TH1F *)h2CeffHFpositivedirectionReconoise2->Clone("twod1");
20466  float ccctest = 0; // to avoid empty massive elements
20467  for (int jphi = 0; jphi < nphi; jphi++) {
20468  double ccc1 = areconoiseHF[i][jeta][jphi];
20469  if (ccc1 != 0.) {
20470  HFpositivedirectionReconoise2->Fill(jphi, ccc1);
20471  ccctest = 1.; //HFpositivedirectionReconoise2->SetBinError(i,0.01);
20472  }
20473  } // for jphi
20474  if (ccctest > 0.) {
20475  //cout<<"555 kcountHFpositivedirectionReconoise2 = "<<kcountHFpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
20476  c3x5->cd(kcountHFpositivedirectionReconoise2);
20477  HFpositivedirectionReconoise2->SetMarkerStyle(20);
20478  HFpositivedirectionReconoise2->SetMarkerSize(0.4);
20479  HFpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
20480  HFpositivedirectionReconoise2->SetXTitle("HFpositivedirectionReconoise2 \b");
20481  HFpositivedirectionReconoise2->SetMarkerColor(2);
20482  HFpositivedirectionReconoise2->SetLineColor(0);
20483  gPad->SetGridy();
20484  gPad->SetGridx();
20485  // gPad->SetLogy();
20486  if (kcountHFpositivedirectionReconoise2 == 1)
20487  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
20488  if (kcountHFpositivedirectionReconoise2 == 2)
20489  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
20490  if (kcountHFpositivedirectionReconoise2 == 3)
20491  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
20492  if (kcountHFpositivedirectionReconoise2 == 4)
20493  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
20494  if (kcountHFpositivedirectionReconoise2 == 5)
20495  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
20496  if (kcountHFpositivedirectionReconoise2 == 6)
20497  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
20498  if (kcountHFpositivedirectionReconoise2 == 7)
20499  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
20500  if (kcountHFpositivedirectionReconoise2 == 8)
20501  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
20502  if (kcountHFpositivedirectionReconoise2 == 9)
20503  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
20504  if (kcountHFpositivedirectionReconoise2 == 10)
20505  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
20506  if (kcountHFpositivedirectionReconoise2 == 11)
20507  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
20508  if (kcountHFpositivedirectionReconoise2 == 12)
20509  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
20510  if (kcountHFpositivedirectionReconoise2 == 13)
20511  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
20512  HFpositivedirectionReconoise2->Draw("Error");
20513  kcountHFpositivedirectionReconoise2++;
20514  if (kcountHFpositivedirectionReconoise2 > 13)
20515  break; // 4x6 = 24
20516  } //ccctest>0
20517 
20518  } // for i
20519  } //if(jeta-41 >= 28 && jeta-41 <= 40)
20520  } //for jeta
20522  c3x5->Update();
20523  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
20524  c3x5->Clear();
20525  // clean-up
20526  if (h2CeffHFpositivedirectionReconoise2)
20527  delete h2CeffHFpositivedirectionReconoise2;
20528 
20529  //========================================================================================== 1111114
20530  //======================================================================
20531  //======================================================================1D plot: R vs phi , different eta, depth=1
20532  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
20533  c3x5->Clear();
20535  c3x5->Divide(3, 5);
20536  c3x5->cd(1);
20537  int kcountHFnegativedirectionReconoise1 = 1;
20538  TH1F *h2CeffHFnegativedirectionReconoise1 = new TH1F("h2CeffHFnegativedirectionReconoise1", "", nphi, 0., 72.);
20539  for (int jeta = 0; jeta < njeta; jeta++) {
20540  // negativedirectionReconoise:
20541  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
20542  // for (int i=0;i<ndepth;i++) {
20543  // depth=1
20544  for (int i = 0; i < 1; i++) {
20545  TH1F *HFnegativedirectionReconoise1 = (TH1F *)h2CeffHFnegativedirectionReconoise1->Clone("twod1");
20546  float ccctest = 0; // to avoid empty massive elements
20547  for (int jphi = 0; jphi < nphi; jphi++) {
20548  double ccc1 = areconoiseHF[i][jeta][jphi];
20549  if (ccc1 != 0.) {
20550  HFnegativedirectionReconoise1->Fill(jphi, ccc1);
20551  ccctest = 1.; //HFnegativedirectionReconoise1->SetBinError(i,0.01);
20552  }
20553  } // for jphi
20554  if (ccctest > 0.) {
20555  // cout<<"444 kcountHFnegativedirectionReconoise1 = "<<kcountHFnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
20556  c3x5->cd(kcountHFnegativedirectionReconoise1);
20557  HFnegativedirectionReconoise1->SetMarkerStyle(20);
20558  HFnegativedirectionReconoise1->SetMarkerSize(0.4);
20559  HFnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
20560  HFnegativedirectionReconoise1->SetXTitle("HFnegativedirectionReconoise1 \b");
20561  HFnegativedirectionReconoise1->SetMarkerColor(2);
20562  HFnegativedirectionReconoise1->SetLineColor(0);
20563  gPad->SetGridy();
20564  gPad->SetGridx();
20565  // gPad->SetLogy();
20566  if (kcountHFnegativedirectionReconoise1 == 1)
20567  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
20568  if (kcountHFnegativedirectionReconoise1 == 2)
20569  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
20570  if (kcountHFnegativedirectionReconoise1 == 3)
20571  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
20572  if (kcountHFnegativedirectionReconoise1 == 4)
20573  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
20574  if (kcountHFnegativedirectionReconoise1 == 5)
20575  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
20576  if (kcountHFnegativedirectionReconoise1 == 6)
20577  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
20578  if (kcountHFnegativedirectionReconoise1 == 7)
20579  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
20580  if (kcountHFnegativedirectionReconoise1 == 8)
20581  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
20582  if (kcountHFnegativedirectionReconoise1 == 9)
20583  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
20584  if (kcountHFnegativedirectionReconoise1 == 10)
20585  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
20586  if (kcountHFnegativedirectionReconoise1 == 11)
20587  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
20588  if (kcountHFnegativedirectionReconoise1 == 12)
20589  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
20590  if (kcountHFnegativedirectionReconoise1 == 13)
20591  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
20592  HFnegativedirectionReconoise1->Draw("Error");
20593  kcountHFnegativedirectionReconoise1++;
20594  if (kcountHFnegativedirectionReconoise1 > 13)
20595  break; //
20596  } //ccctest>0
20597 
20598  } // for i
20599  } //if(jeta-41 >= -41 && jeta-41 <= -29)
20600  } //for jeta
20602  c3x5->Update();
20603  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
20604  c3x5->Clear();
20605  // clean-up
20606  if (h2CeffHFnegativedirectionReconoise1)
20607  delete h2CeffHFnegativedirectionReconoise1;
20608 
20609  //========================================================================================== 1111115
20610  //======================================================================
20611  //======================================================================1D plot: R vs phi , different eta, depth=2
20612  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
20613  c3x5->Clear();
20615  c3x5->Divide(3, 5);
20616  c3x5->cd(1);
20617  int kcountHFnegativedirectionReconoise2 = 1;
20618  TH1F *h2CeffHFnegativedirectionReconoise2 = new TH1F("h2CeffHFnegativedirectionReconoise2", "", nphi, 0., 72.);
20619  for (int jeta = 0; jeta < njeta; jeta++) {
20620  // negativedirectionReconoise:
20621  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
20622  // for (int i=0;i<ndepth;i++) {
20623  // depth=2
20624  for (int i = 1; i < 2; i++) {
20625  TH1F *HFnegativedirectionReconoise2 = (TH1F *)h2CeffHFnegativedirectionReconoise2->Clone("twod1");
20626  float ccctest = 0; // to avoid empty massive elements
20627  for (int jphi = 0; jphi < nphi; jphi++) {
20628  double ccc1 = areconoiseHF[i][jeta][jphi];
20629  if (ccc1 != 0.) {
20630  HFnegativedirectionReconoise2->Fill(jphi, ccc1);
20631  ccctest = 1.; //HFnegativedirectionReconoise2->SetBinError(i,0.01);
20632  }
20633  } // for jphi
20634  if (ccctest > 0.) {
20635  //cout<<"555 kcountHFnegativedirectionReconoise2 = "<<kcountHFnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
20636  c3x5->cd(kcountHFnegativedirectionReconoise2);
20637  HFnegativedirectionReconoise2->SetMarkerStyle(20);
20638  HFnegativedirectionReconoise2->SetMarkerSize(0.4);
20639  HFnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
20640  HFnegativedirectionReconoise2->SetXTitle("HFnegativedirectionReconoise2 \b");
20641  HFnegativedirectionReconoise2->SetMarkerColor(2);
20642  HFnegativedirectionReconoise2->SetLineColor(0);
20643  gPad->SetGridy();
20644  gPad->SetGridx();
20645  // gPad->SetLogy();
20646  if (kcountHFnegativedirectionReconoise2 == 1)
20647  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
20648  if (kcountHFnegativedirectionReconoise2 == 2)
20649  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
20650  if (kcountHFnegativedirectionReconoise2 == 3)
20651  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
20652  if (kcountHFnegativedirectionReconoise2 == 4)
20653  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
20654  if (kcountHFnegativedirectionReconoise2 == 5)
20655  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
20656  if (kcountHFnegativedirectionReconoise2 == 6)
20657  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
20658  if (kcountHFnegativedirectionReconoise2 == 7)
20659  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
20660  if (kcountHFnegativedirectionReconoise2 == 8)
20661  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
20662  if (kcountHFnegativedirectionReconoise2 == 9)
20663  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
20664  if (kcountHFnegativedirectionReconoise2 == 10)
20665  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
20666  if (kcountHFnegativedirectionReconoise2 == 11)
20667  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
20668  if (kcountHFnegativedirectionReconoise2 == 12)
20669  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
20670  if (kcountHFnegativedirectionReconoise2 == 13)
20671  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
20672  HFnegativedirectionReconoise2->Draw("Error");
20673  kcountHFnegativedirectionReconoise2++;
20674  if (kcountHFnegativedirectionReconoise2 > 13)
20675  break; // 4x6 = 24
20676  } //ccctest>0
20677 
20678  } // for i
20679  } //if(jeta-41 >= -41 && jeta-41 <= -29)
20680  } //for jeta
20682  c3x5->Update();
20683  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
20684  c3x5->Clear();
20685  // clean-up
20686  if (h2CeffHFnegativedirectionReconoise2)
20687  delete h2CeffHFnegativedirectionReconoise2;
20688 
20689  //======================================================================================================================
20690  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HF
20691  //------------------------ 2D-eta/phi-plot: DIF, averaged over depthfs
20692  //======================================================================
20693  //======================================================================
20694  // cout<<" DIF2D-eta/phi-plot: DIF, averaged over depthfs *****" <<endl;
20695  c2x1->Clear();
20697  c2x1->Divide(2, 1);
20698  c2x1->cd(1);
20699  TH2F *GefzDIFreconoiseHF42D = new TH2F("GefzDIFreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
20700  TH2F *GefzDIFreconoiseHF42D0 = new TH2F("GefzDIFreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
20701  TH2F *GefzDIFreconoiseHF42DF = (TH2F *)GefzDIFreconoiseHF42D0->Clone("GefzDIFreconoiseHF42DF");
20702  for (int i = 0; i < ndepth; i++) {
20703  for (int jeta = 0; jeta < neta; jeta++) {
20704  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20705  for (int jphi = 0; jphi < nphi; jphi++) {
20706  double ccc1 = breconoiseHF[i][jeta][jphi];
20707  int k2plot = jeta - 41;
20708  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
20709  if (ccc1 != 0.) {
20710  GefzDIFreconoiseHF42D->Fill(kkk, jphi, ccc1);
20711  GefzDIFreconoiseHF42D0->Fill(kkk, jphi, 1.);
20712  }
20713  }
20714  }
20715  }
20716  }
20717  GefzDIFreconoiseHF42DF->Divide(GefzDIFreconoiseHF42D, GefzDIFreconoiseHF42D0, 1, 1, "B"); // average A
20718  gPad->SetGridy();
20719  gPad->SetGridx(); // gPad->SetLogz();
20720  GefzDIFreconoiseHF42DF->SetXTitle("<DIF>_depth #eta \b");
20721  GefzDIFreconoiseHF42DF->SetYTitle(" #phi \b");
20722  GefzDIFreconoiseHF42DF->Draw("COLZ");
20723 
20724  c2x1->cd(2);
20725  // TH1F *energyhitNoiseCut_HF= (TH1F*)dir->FindObjectAny("h_energyhitNoiseCut_HF");
20726  // 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");
20727 
20729  c2x1->Update();
20730  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHF.png");
20731  c2x1->Clear();
20732  // clean-up
20733  if (GefzDIFreconoiseHF42D)
20734  delete GefzDIFreconoiseHF42D;
20735  if (GefzDIFreconoiseHF42D0)
20736  delete GefzDIFreconoiseHF42D0;
20737  if (GefzDIFreconoiseHF42DF)
20738  delete GefzDIFreconoiseHF42DF;
20739  //====================================================================== 1D plot: DIF vs phi , averaged over depthfs & eta
20740  //======================================================================
20741  //cout<<" 1D plot: DIF vs phi , averaged over depthfs & eta *****" <<endl;
20742  c1x1->Clear();
20744  c1x1->Divide(1, 1);
20745  c1x1->cd(1);
20746  TH1F *GefzDIFreconoiseHF41D = new TH1F("GefzDIFreconoiseHF41D", "", nphi, 0., 72.);
20747  TH1F *GefzDIFreconoiseHF41D0 = new TH1F("GefzDIFreconoiseHF41D0", "", nphi, 0., 72.);
20748  TH1F *GefzDIFreconoiseHF41DF = (TH1F *)GefzDIFreconoiseHF41D0->Clone("GefzDIFreconoiseHF41DF");
20749  for (int jphi = 0; jphi < nphi; jphi++) {
20750  for (int jeta = 0; jeta < neta; jeta++) {
20751  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20752  for (int i = 0; i < ndepth; i++) {
20753  double ccc1 = breconoiseHF[i][jeta][jphi];
20754  if (ccc1 != 0.) {
20755  GefzDIFreconoiseHF41D->Fill(jphi, ccc1);
20756  GefzDIFreconoiseHF41D0->Fill(jphi, 1.);
20757  }
20758  }
20759  }
20760  }
20761  }
20762  GefzDIFreconoiseHF41DF->Divide(
20763  GefzDIFreconoiseHF41D, GefzDIFreconoiseHF41D0, 1, 1, "B"); // DIF averaged over depthfs & eta
20764  GefzDIFreconoiseHF41D0->Sumw2();
20765  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHF41DF->SetBinError(jphi,0.01);}
20766  gPad->SetGridy();
20767  gPad->SetGridx(); // gPad->SetLogz();
20768  GefzDIFreconoiseHF41DF->SetMarkerStyle(20);
20769  GefzDIFreconoiseHF41DF->SetMarkerSize(1.4);
20770  GefzDIFreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
20771  GefzDIFreconoiseHF41DF->SetXTitle("#phi \b");
20772  GefzDIFreconoiseHF41DF->SetYTitle(" <DIF> \b");
20773  GefzDIFreconoiseHF41DF->SetZTitle("<DIF>_PHI - AllDepthfs \b");
20774  GefzDIFreconoiseHF41DF->SetMarkerColor(4);
20775  GefzDIFreconoiseHF41DF->SetLineColor(
20776  4); // GefzDIFreconoiseHF41DF->SetMinimum(0.8); // GefzDIFreconoiseHF41DF->SetMaximum(1.000);
20777  GefzDIFreconoiseHF41DF->Draw("Error");
20779  c1x1->Update();
20780  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHF.png");
20781  c1x1->Clear();
20782  // clean-up
20783  if (GefzDIFreconoiseHF41D)
20784  delete GefzDIFreconoiseHF41D;
20785  if (GefzDIFreconoiseHF41D0)
20786  delete GefzDIFreconoiseHF41D0;
20787  if (GefzDIFreconoiseHF41DF)
20788  delete GefzDIFreconoiseHF41DF;
20789  //========================================================================================== 4
20790  //======================================================================
20791  //======================================================================1D plot: DIF vs phi , different eta, depth=1
20792  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
20793  c3x5->Clear();
20795  c3x5->Divide(3, 5);
20796  c3x5->cd(1);
20797  int kcountHFpositivedirectionReconoiseDIF1 = 1;
20798  TH1F *h2CeffHFpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHFpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
20799  for (int jeta = 0; jeta < njeta; jeta++) {
20800  // positivedirectionReconoiseDIF:
20801  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20802  // for (int i=0;i<ndepth;i++) {
20803  // depth=1
20804  for (int i = 0; i < 1; i++) {
20805  TH1F *HFpositivedirectionReconoiseDIF1 = (TH1F *)h2CeffHFpositivedirectionReconoiseDIF1->Clone("twod1");
20806  float ccctest = 0; // to avoid empty massive elements
20807  for (int jphi = 0; jphi < nphi; jphi++) {
20808  double ccc1 = breconoiseHF[i][jeta][jphi];
20809  if (ccc1 != 0.) {
20810  HFpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
20811  ccctest = 1.; //HFpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
20812  }
20813  } // for jphi
20814  if (ccctest > 0.) {
20815  // cout<<"444 kcountHFpositivedirectionReconoiseDIF1 = "<<kcountHFpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
20816  c3x5->cd(kcountHFpositivedirectionReconoiseDIF1);
20817  HFpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
20818  HFpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
20819  HFpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
20820  HFpositivedirectionReconoiseDIF1->SetXTitle("HFpositivedirectionReconoiseDIF1 \b");
20821  HFpositivedirectionReconoiseDIF1->SetMarkerColor(2);
20822  HFpositivedirectionReconoiseDIF1->SetLineColor(0);
20823  gPad->SetGridy();
20824  gPad->SetGridx();
20825  // gPad->SetLogy();
20826  if (kcountHFpositivedirectionReconoiseDIF1 == 1)
20827  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 28; depth = 1 \b");
20828  if (kcountHFpositivedirectionReconoiseDIF1 == 2)
20829  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 29; depth = 1 \b");
20830  if (kcountHFpositivedirectionReconoiseDIF1 == 3)
20831  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 30; depth = 1 \b");
20832  if (kcountHFpositivedirectionReconoiseDIF1 == 4)
20833  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 31; depth = 1 \b");
20834  if (kcountHFpositivedirectionReconoiseDIF1 == 5)
20835  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 32; depth = 1 \b");
20836  if (kcountHFpositivedirectionReconoiseDIF1 == 6)
20837  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 33; depth = 1 \b");
20838  if (kcountHFpositivedirectionReconoiseDIF1 == 7)
20839  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 34; depth = 1 \b");
20840  if (kcountHFpositivedirectionReconoiseDIF1 == 8)
20841  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 35; depth = 1 \b");
20842  if (kcountHFpositivedirectionReconoiseDIF1 == 9)
20843  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 36; depth = 1 \b");
20844  if (kcountHFpositivedirectionReconoiseDIF1 == 10)
20845  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 37; depth = 1 \b");
20846  if (kcountHFpositivedirectionReconoiseDIF1 == 11)
20847  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 38; depth = 1 \b");
20848  if (kcountHFpositivedirectionReconoiseDIF1 == 12)
20849  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 39; depth = 1 \b");
20850  if (kcountHFpositivedirectionReconoiseDIF1 == 13)
20851  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 40; depth = 1 \b");
20852  HFpositivedirectionReconoiseDIF1->Draw("Error");
20853  kcountHFpositivedirectionReconoiseDIF1++;
20854  if (kcountHFpositivedirectionReconoiseDIF1 > 13)
20855  break; //
20856  } //ccctest>0
20857 
20858  } // for i
20859  } //if(jeta-41 >= 28 && jeta-41 <= 40
20860  } //for jeta
20862  c3x5->Update();
20863  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
20864  c3x5->Clear();
20865  // clean-up
20866  if (h2CeffHFpositivedirectionReconoiseDIF1)
20867  delete h2CeffHFpositivedirectionReconoiseDIF1;
20868 
20869  //========================================================================================== 5
20870  //======================================================================
20871  //======================================================================1D plot: R vs phi , different eta, depth=2
20872  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
20873  c3x5->Clear();
20875  c3x5->Divide(3, 5);
20876  c3x5->cd(1);
20877  int kcountHFpositivedirectionReconoiseDIF2 = 1;
20878  TH1F *h2CeffHFpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHFpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
20879  for (int jeta = 0; jeta < njeta; jeta++) {
20880  // positivedirectionReconoiseDIF:
20881  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20882  // for (int i=0;i<ndepth;i++) {
20883  // depth=2
20884  for (int i = 1; i < 2; i++) {
20885  TH1F *HFpositivedirectionReconoiseDIF2 = (TH1F *)h2CeffHFpositivedirectionReconoiseDIF2->Clone("twod1");
20886  float ccctest = 0; // to avoid empty massive elements
20887  for (int jphi = 0; jphi < nphi; jphi++) {
20888  double ccc1 = breconoiseHF[i][jeta][jphi];
20889  if (ccc1 != 0.) {
20890  HFpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
20891  ccctest = 1.; //HFpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
20892  }
20893  } // for jphi
20894  if (ccctest > 0.) {
20895  //cout<<"555 kcountHFpositivedirectionReconoiseDIF2 = "<<kcountHFpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
20896  c3x5->cd(kcountHFpositivedirectionReconoiseDIF2);
20897  HFpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
20898  HFpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
20899  HFpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
20900  HFpositivedirectionReconoiseDIF2->SetXTitle("HFpositivedirectionReconoiseDIF2 \b");
20901  HFpositivedirectionReconoiseDIF2->SetMarkerColor(2);
20902  HFpositivedirectionReconoiseDIF2->SetLineColor(0);
20903  gPad->SetGridy();
20904  gPad->SetGridx();
20905  // gPad->SetLogy();
20906  if (kcountHFpositivedirectionReconoiseDIF2 == 1)
20907  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 28; depth = 2 \b");
20908  if (kcountHFpositivedirectionReconoiseDIF2 == 2)
20909  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 29; depth = 2 \b");
20910  if (kcountHFpositivedirectionReconoiseDIF2 == 3)
20911  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 30; depth = 2 \b");
20912  if (kcountHFpositivedirectionReconoiseDIF2 == 4)
20913  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 31; depth = 2 \b");
20914  if (kcountHFpositivedirectionReconoiseDIF2 == 5)
20915  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 32; depth = 2 \b");
20916  if (kcountHFpositivedirectionReconoiseDIF2 == 6)
20917  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 33; depth = 2 \b");
20918  if (kcountHFpositivedirectionReconoiseDIF2 == 7)
20919  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 34; depth = 2 \b");
20920  if (kcountHFpositivedirectionReconoiseDIF2 == 8)
20921  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 35; depth = 2 \b");
20922  if (kcountHFpositivedirectionReconoiseDIF2 == 9)
20923  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 36; depth = 2 \b");
20924  if (kcountHFpositivedirectionReconoiseDIF2 == 10)
20925  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 37; depth = 2 \b");
20926  if (kcountHFpositivedirectionReconoiseDIF2 == 11)
20927  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 38; depth = 2 \b");
20928  if (kcountHFpositivedirectionReconoiseDIF2 == 12)
20929  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 39; depth = 2 \b");
20930  if (kcountHFpositivedirectionReconoiseDIF2 == 13)
20931  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 40; depth = 2 \b");
20932  HFpositivedirectionReconoiseDIF2->Draw("Error");
20933  kcountHFpositivedirectionReconoiseDIF2++;
20934  if (kcountHFpositivedirectionReconoiseDIF2 > 13)
20935  break; // 4x6 = 24
20936  } //ccctest>0
20937 
20938  } // for i
20939  } //if(jeta-41 >= 28 && jeta-41 <= 40)
20940  } //for jeta
20942  c3x5->Update();
20943  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
20944  c3x5->Clear();
20945  // clean-up
20946  if (h2CeffHFpositivedirectionReconoiseDIF2)
20947  delete h2CeffHFpositivedirectionReconoiseDIF2;
20948 
20949  //========================================================================================== 1111114
20950  //======================================================================
20951  //======================================================================1D plot: DIF vs phi , different eta, depth=1
20952  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
20953  c3x5->Clear();
20955  c3x5->Divide(3, 5);
20956  c3x5->cd(1);
20957  int kcountHFnegativedirectionReconoiseDIF1 = 1;
20958  TH1F *h2CeffHFnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHFnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
20959  for (int jeta = 0; jeta < njeta; jeta++) {
20960  // negativedirectionReconoiseDIF:
20961  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
20962  // for (int i=0;i<ndepth;i++) {
20963  // depth=1
20964  for (int i = 0; i < 1; i++) {
20965  TH1F *HFnegativedirectionReconoiseDIF1 = (TH1F *)h2CeffHFnegativedirectionReconoiseDIF1->Clone("twod1");
20966  float ccctest = 0; // to avoid empty massive elements
20967  for (int jphi = 0; jphi < nphi; jphi++) {
20968  double ccc1 = breconoiseHF[i][jeta][jphi];
20969  if (ccc1 != 0.) {
20970  HFnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
20971  ccctest = 1.; //HFnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
20972  }
20973  } // for jphi
20974  if (ccctest > 0.) {
20975  // cout<<"444 kcountHFnegativedirectionReconoiseDIF1 = "<<kcountHFnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
20976  c3x5->cd(kcountHFnegativedirectionReconoiseDIF1);
20977  HFnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
20978  HFnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
20979  HFnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
20980  HFnegativedirectionReconoiseDIF1->SetXTitle("HFnegativedirectionReconoiseDIF1 \b");
20981  HFnegativedirectionReconoiseDIF1->SetMarkerColor(2);
20982  HFnegativedirectionReconoiseDIF1->SetLineColor(0);
20983  gPad->SetGridy();
20984  gPad->SetGridx();
20985  // gPad->SetLogy();
20986  if (kcountHFnegativedirectionReconoiseDIF1 == 1)
20987  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-41; depth = 1 \b");
20988  if (kcountHFnegativedirectionReconoiseDIF1 == 2)
20989  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-40; depth = 1 \b");
20990  if (kcountHFnegativedirectionReconoiseDIF1 == 3)
20991  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-39; depth = 1 \b");
20992  if (kcountHFnegativedirectionReconoiseDIF1 == 4)
20993  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-38; depth = 1 \b");
20994  if (kcountHFnegativedirectionReconoiseDIF1 == 5)
20995  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-37; depth = 1 \b");
20996  if (kcountHFnegativedirectionReconoiseDIF1 == 6)
20997  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-36; depth = 1 \b");
20998  if (kcountHFnegativedirectionReconoiseDIF1 == 7)
20999  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-35; depth = 1 \b");
21000  if (kcountHFnegativedirectionReconoiseDIF1 == 8)
21001  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-34; depth = 1 \b");
21002  if (kcountHFnegativedirectionReconoiseDIF1 == 9)
21003  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-33; depth = 1 \b");
21004  if (kcountHFnegativedirectionReconoiseDIF1 == 10)
21005  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-32; depth = 1 \b");
21006  if (kcountHFnegativedirectionReconoiseDIF1 == 11)
21007  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-31; depth = 1 \b");
21008  if (kcountHFnegativedirectionReconoiseDIF1 == 12)
21009  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-30; depth = 1 \b");
21010  if (kcountHFnegativedirectionReconoiseDIF1 == 13)
21011  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-29; depth = 1 \b");
21012  HFnegativedirectionReconoiseDIF1->Draw("Error");
21013  kcountHFnegativedirectionReconoiseDIF1++;
21014  if (kcountHFnegativedirectionReconoiseDIF1 > 13)
21015  break; //
21016  } //ccctest>0
21017 
21018  } // for i
21019  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21020  } //for jeta
21022  c3x5->Update();
21023  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
21024  c3x5->Clear();
21025  // clean-up
21026  if (h2CeffHFnegativedirectionReconoiseDIF1)
21027  delete h2CeffHFnegativedirectionReconoiseDIF1;
21028 
21029  //========================================================================================== 1111115
21030  //======================================================================
21031  //======================================================================1D plot: R vs phi , different eta, depth=2
21032  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
21033  c3x5->Clear();
21035  c3x5->Divide(3, 5);
21036  c3x5->cd(1);
21037  int kcountHFnegativedirectionReconoiseDIF2 = 1;
21038  TH1F *h2CeffHFnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHFnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
21039  for (int jeta = 0; jeta < njeta; jeta++) {
21040  // negativedirectionReconoiseDIF:
21041  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
21042  // for (int i=0;i<ndepth;i++) {
21043  // depth=2
21044  for (int i = 1; i < 2; i++) {
21045  TH1F *HFnegativedirectionReconoiseDIF2 = (TH1F *)h2CeffHFnegativedirectionReconoiseDIF2->Clone("twod1");
21046  float ccctest = 0; // to avoid empty massive elements
21047  for (int jphi = 0; jphi < nphi; jphi++) {
21048  double ccc1 = breconoiseHF[i][jeta][jphi];
21049  if (ccc1 != 0.) {
21050  HFnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
21051  ccctest = 1.; //HFnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
21052  }
21053  } // for jphi
21054  if (ccctest > 0.) {
21055  //cout<<"555 kcountHFnegativedirectionReconoiseDIF2 = "<<kcountHFnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
21056  c3x5->cd(kcountHFnegativedirectionReconoiseDIF2);
21057  HFnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
21058  HFnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
21059  HFnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
21060  HFnegativedirectionReconoiseDIF2->SetXTitle("HFnegativedirectionReconoiseDIF2 \b");
21061  HFnegativedirectionReconoiseDIF2->SetMarkerColor(2);
21062  HFnegativedirectionReconoiseDIF2->SetLineColor(0);
21063  gPad->SetGridy();
21064  gPad->SetGridx();
21065  // gPad->SetLogy();
21066  if (kcountHFnegativedirectionReconoiseDIF2 == 1)
21067  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-41; depth = 2 \b");
21068  if (kcountHFnegativedirectionReconoiseDIF2 == 2)
21069  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-40; depth = 2 \b");
21070  if (kcountHFnegativedirectionReconoiseDIF2 == 3)
21071  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-39; depth = 2 \b");
21072  if (kcountHFnegativedirectionReconoiseDIF2 == 4)
21073  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-38; depth = 2 \b");
21074  if (kcountHFnegativedirectionReconoiseDIF2 == 5)
21075  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-37; depth = 2 \b");
21076  if (kcountHFnegativedirectionReconoiseDIF2 == 6)
21077  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-36; depth = 2 \b");
21078  if (kcountHFnegativedirectionReconoiseDIF2 == 7)
21079  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-35; depth = 2 \b");
21080  if (kcountHFnegativedirectionReconoiseDIF2 == 8)
21081  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-34; depth = 2 \b");
21082  if (kcountHFnegativedirectionReconoiseDIF2 == 9)
21083  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-33; depth = 2 \b");
21084  if (kcountHFnegativedirectionReconoiseDIF2 == 10)
21085  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-32; depth = 2 \b");
21086  if (kcountHFnegativedirectionReconoiseDIF2 == 11)
21087  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-31; depth = 2 \b");
21088  if (kcountHFnegativedirectionReconoiseDIF2 == 12)
21089  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-30; depth = 2 \b");
21090  if (kcountHFnegativedirectionReconoiseDIF2 == 13)
21091  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-20; depth = 2 \b");
21092  HFnegativedirectionReconoiseDIF2->Draw("Error");
21093  kcountHFnegativedirectionReconoiseDIF2++;
21094  if (kcountHFnegativedirectionReconoiseDIF2 > 13)
21095  break; // 4x6 = 24
21096  } //ccctest>0
21097 
21098  } // for i
21099  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21100  } //for jeta
21102  c3x5->Update();
21103  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
21104  c3x5->Clear();
21105  // clean-up
21106  if (h2CeffHFnegativedirectionReconoiseDIF2)
21107  delete h2CeffHFnegativedirectionReconoiseDIF2;
21108 
21109  //======================================================================================================================
21110  //======================================================================================================================
21111  //======================================================================================================================
21112  //======================================================================================================================
21113  //======================================================================================================================
21114  //======================================================================================================================
21115  //======================================================================================================================
21116  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
21117 
21118  //cout<<" Start Vaiance: preparation *****" <<endl;
21119  TH2F *reconoiseVariance1HF1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HF1");
21120  TH2F *reconoiseVariance0HF1 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HF1");
21121  TH2F *reconoiseVarianceHF1 = (TH2F *)reconoiseVariance1HF1->Clone("reconoiseVarianceHF1");
21122  reconoiseVarianceHF1->Divide(reconoiseVariance1HF1, reconoiseVariance0HF1, 1, 1, "B");
21123  TH2F *reconoiseVariance1HF2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy2_HF2");
21124  TH2F *reconoiseVariance0HF2 = (TH2F *)dir->FindObjectAny("h_recNoiseEnergy0_HF2");
21125  TH2F *reconoiseVarianceHF2 = (TH2F *)reconoiseVariance1HF2->Clone("reconoiseVarianceHF2");
21126  reconoiseVarianceHF2->Divide(reconoiseVariance1HF2, reconoiseVariance0HF2, 1, 1, "B");
21127  //cout<<" Vaiance: preparation DONE *****" <<endl;
21128  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevarianceHF
21129  // = sum(R*R)/N - (sum(R)/N)**2
21130  for (int jeta = 0; jeta < njeta; jeta++) {
21131  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
21132  //preparation for PHI normalization:
21133  double sumreconoiseHF0 = 0;
21134  int nsumreconoiseHF0 = 0;
21135  double sumreconoiseHF1 = 0;
21136  int nsumreconoiseHF1 = 0;
21137  for (int jphi = 0; jphi < njphi; jphi++) {
21138  reconoisevarianceHF[0][jeta][jphi] = reconoiseVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
21139  reconoisevarianceHF[1][jeta][jphi] = reconoiseVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
21140  sumreconoiseHF0 += reconoisevarianceHF[0][jeta][jphi];
21141  ++nsumreconoiseHF0;
21142  sumreconoiseHF1 += reconoisevarianceHF[1][jeta][jphi];
21143  ++nsumreconoiseHF1;
21144  } // phi
21145  // PHI normalization :
21146  for (int jphi = 0; jphi < njphi; jphi++) {
21147  if (reconoisevarianceHF[0][jeta][jphi] != 0.)
21148  reconoisevarianceHF[0][jeta][jphi] /= (sumreconoiseHF0 / nsumreconoiseHF0);
21149  if (reconoisevarianceHF[1][jeta][jphi] != 0.)
21150  reconoisevarianceHF[1][jeta][jphi] /= (sumreconoiseHF1 / nsumreconoiseHF1);
21151  } // phi
21152  // reconoisevarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
21153  for (int jphi = 0; jphi < njphi; jphi++) {
21154  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
21155  reconoisevarianceHF[0][jeta][jphi] -= areconoiseHF[0][jeta][jphi] * areconoiseHF[0][jeta][jphi];
21156  reconoisevarianceHF[0][jeta][jphi] = fabs(reconoisevarianceHF[0][jeta][jphi]);
21157  reconoisevarianceHF[1][jeta][jphi] -= areconoiseHF[1][jeta][jphi] * areconoiseHF[1][jeta][jphi];
21158  reconoisevarianceHF[1][jeta][jphi] = fabs(reconoisevarianceHF[1][jeta][jphi]);
21159  }
21160  }
21161  }
21162  //cout<<" Vaiance: DONE*****" <<endl;
21163  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
21164  //======================================================================
21165  //======================================================================
21166  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
21167  c1x1->Clear();
21169  c1x0->Divide(1, 1);
21170  c1x0->cd(1);
21171  TH2F *DefzDreconoiseHF42D = new TH2F("DefzDreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
21172  TH2F *DefzDreconoiseHF42D0 = new TH2F("DefzDreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
21173  TH2F *DefzDreconoiseHF42DF = (TH2F *)DefzDreconoiseHF42D0->Clone("DefzDreconoiseHF42DF");
21174  for (int i = 0; i < ndepth; i++) {
21175  for (int jeta = 0; jeta < neta; jeta++) {
21176  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
21177  for (int jphi = 0; jphi < nphi; jphi++) {
21178  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21179  int k2plot = jeta - 41;
21180  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
21181  if (areconoiseHF[i][jeta][jphi] > 0.) {
21182  DefzDreconoiseHF42D->Fill(kkk, jphi, ccc1);
21183  DefzDreconoiseHF42D0->Fill(kkk, jphi, 1.);
21184  }
21185  }
21186  }
21187  }
21188  }
21189  DefzDreconoiseHF42DF->Divide(DefzDreconoiseHF42D, DefzDreconoiseHF42D0, 1, 1, "B"); // average A
21190  // DefzDreconoiseHF1->Sumw2();
21191  gPad->SetGridy();
21192  gPad->SetGridx(); // gPad->SetLogz();
21193  DefzDreconoiseHF42DF->SetMarkerStyle(20);
21194  DefzDreconoiseHF42DF->SetMarkerSize(0.4);
21195  DefzDreconoiseHF42DF->GetZaxis()->SetLabelSize(0.08);
21196  DefzDreconoiseHF42DF->SetXTitle("<D>_depth #eta \b");
21197  DefzDreconoiseHF42DF->SetYTitle(" #phi \b");
21198  DefzDreconoiseHF42DF->SetZTitle("<D>_depth \b");
21199  DefzDreconoiseHF42DF->SetMarkerColor(2);
21200  DefzDreconoiseHF42DF->SetLineColor(
21201  0); // DefzDreconoiseHF42DF->SetMaximum(1.000); // DefzDreconoiseHF42DF->SetMinimum(1.0);
21202  DefzDreconoiseHF42DF->Draw("COLZ");
21204  c1x0->Update();
21205  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHF.png");
21206  c1x0->Clear();
21207  // clean-up
21208  if (DefzDreconoiseHF42D)
21209  delete DefzDreconoiseHF42D;
21210  if (DefzDreconoiseHF42D0)
21211  delete DefzDreconoiseHF42D0;
21212  if (DefzDreconoiseHF42DF)
21213  delete DefzDreconoiseHF42DF;
21214  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
21215  //======================================================================
21216  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
21217  c1x1->Clear();
21219  c1x1->Divide(1, 1);
21220  c1x1->cd(1);
21221  TH1F *DefzDreconoiseHF41D = new TH1F("DefzDreconoiseHF41D", "", nphi, 0., 72.);
21222  TH1F *DefzDreconoiseHF41D0 = new TH1F("DefzDreconoiseHF41D0", "", nphi, 0., 72.);
21223  TH1F *DefzDreconoiseHF41DF = (TH1F *)DefzDreconoiseHF41D0->Clone("DefzDreconoiseHF41DF");
21224 
21225  for (int jphi = 0; jphi < nphi; jphi++) {
21226  for (int jeta = 0; jeta < neta; jeta++) {
21227  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
21228  for (int i = 0; i < ndepth; i++) {
21229  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21230  if (areconoiseHF[i][jeta][jphi] > 0.) {
21231  DefzDreconoiseHF41D->Fill(jphi, ccc1);
21232  DefzDreconoiseHF41D0->Fill(jphi, 1.);
21233  }
21234  }
21235  }
21236  }
21237  }
21238  // DefzDreconoiseHF41D->Sumw2();DefzDreconoiseHF41D0->Sumw2();
21239 
21240  DefzDreconoiseHF41DF->Divide(DefzDreconoiseHF41D, DefzDreconoiseHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
21241  DefzDreconoiseHF41D0->Sumw2();
21242  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHF41DF->SetBinError(jphi,0.01);}
21243  gPad->SetGridy();
21244  gPad->SetGridx(); // gPad->SetLogz();
21245  DefzDreconoiseHF41DF->SetMarkerStyle(20);
21246  DefzDreconoiseHF41DF->SetMarkerSize(1.4);
21247  DefzDreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
21248  DefzDreconoiseHF41DF->SetXTitle("#phi \b");
21249  DefzDreconoiseHF41DF->SetYTitle(" <D> \b");
21250  DefzDreconoiseHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
21251  DefzDreconoiseHF41DF->SetMarkerColor(4);
21252  DefzDreconoiseHF41DF->SetLineColor(
21253  4); // DefzDreconoiseHF41DF->SetMinimum(0.8); DefzDreconoiseHF41DF->SetMinimum(-0.015);
21254  DefzDreconoiseHF41DF->Draw("Error");
21256  c1x1->Update();
21257  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHF.png");
21258  c1x1->Clear();
21259  // clean-up
21260  if (DefzDreconoiseHF41D)
21261  delete DefzDreconoiseHF41D;
21262  if (DefzDreconoiseHF41D0)
21263  delete DefzDreconoiseHF41D0;
21264  if (DefzDreconoiseHF41DF)
21265  delete DefzDreconoiseHF41DF;
21266  //========================================================================================== 14
21267  //======================================================================
21268  //======================================================================1D plot: D vs phi , different eta, depth=1
21269  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
21270  c3x5->Clear();
21272  c3x5->Divide(3, 5);
21273  c3x5->cd(1);
21274  int kcountHFpositivedirectionReconoiseD1 = 1;
21275  TH1F *h2CeffHFpositivedirectionReconoiseD1 = new TH1F("h2CeffHFpositivedirectionReconoiseD1", "", nphi, 0., 72.);
21276 
21277  for (int jeta = 0; jeta < njeta; jeta++) {
21278  // positivedirectionReconoiseD:
21279  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
21280  // for (int i=0;i<ndepth;i++) {
21281  // depth=1
21282  for (int i = 0; i < 1; i++) {
21283  TH1F *HFpositivedirectionReconoiseD1 = (TH1F *)h2CeffHFpositivedirectionReconoiseD1->Clone("twod1");
21284 
21285  float ccctest = 0; // to avoid empty massive elements
21286  for (int jphi = 0; jphi < nphi; jphi++) {
21287  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21288  if (areconoiseHF[i][jeta][jphi] > 0.) {
21289  HFpositivedirectionReconoiseD1->Fill(jphi, ccc1);
21290  ccctest = 1.; //HFpositivedirectionReconoiseD1->SetBinError(i,0.01);
21291  }
21292  } // for jphi
21293  if (ccctest > 0.) {
21294  //cout<<"1414 kcountHFpositivedirectionReconoiseD1 = "<<kcountHFpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
21295  c3x5->cd(kcountHFpositivedirectionReconoiseD1);
21296  HFpositivedirectionReconoiseD1->SetMarkerStyle(20);
21297  HFpositivedirectionReconoiseD1->SetMarkerSize(0.4);
21298  HFpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
21299  HFpositivedirectionReconoiseD1->SetXTitle("HFpositivedirectionReconoiseD1 \b");
21300  HFpositivedirectionReconoiseD1->SetMarkerColor(2);
21301  HFpositivedirectionReconoiseD1->SetLineColor(0);
21302  gPad->SetGridy();
21303  gPad->SetGridx();
21304  // gPad->SetLogy();
21305  if (kcountHFpositivedirectionReconoiseD1 == 1)
21306  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
21307  if (kcountHFpositivedirectionReconoiseD1 == 2)
21308  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
21309  if (kcountHFpositivedirectionReconoiseD1 == 3)
21310  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
21311  if (kcountHFpositivedirectionReconoiseD1 == 4)
21312  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
21313  if (kcountHFpositivedirectionReconoiseD1 == 5)
21314  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
21315  if (kcountHFpositivedirectionReconoiseD1 == 6)
21316  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
21317  if (kcountHFpositivedirectionReconoiseD1 == 7)
21318  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
21319  if (kcountHFpositivedirectionReconoiseD1 == 8)
21320  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
21321  if (kcountHFpositivedirectionReconoiseD1 == 9)
21322  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
21323  if (kcountHFpositivedirectionReconoiseD1 == 10)
21324  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
21325  if (kcountHFpositivedirectionReconoiseD1 == 11)
21326  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
21327  if (kcountHFpositivedirectionReconoiseD1 == 12)
21328  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
21329  if (kcountHFpositivedirectionReconoiseD1 == 13)
21330  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
21331  HFpositivedirectionReconoiseD1->Draw("Error");
21332  kcountHFpositivedirectionReconoiseD1++;
21333  if (kcountHFpositivedirectionReconoiseD1 > 13)
21334  break; // 4x6 = 24
21335  } //ccctest>0
21336 
21337  } // for i
21338  } //if(jeta-41 >= 28 && jeta-41 <= 40)
21339  } //for jeta
21341  c3x5->Update();
21342  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
21343  c3x5->Clear();
21344  // clean-up
21345  if (h2CeffHFpositivedirectionReconoiseD1)
21346  delete h2CeffHFpositivedirectionReconoiseD1;
21347  //========================================================================================== 15
21348  //======================================================================
21349  //======================================================================1D plot: D vs phi , different eta, depth=2
21350  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
21351  c3x5->Clear();
21352  c3x5->Divide(3, 5);
21353  c3x5->cd(1);
21354  int kcountHFpositivedirectionReconoiseD2 = 1;
21355  TH1F *h2CeffHFpositivedirectionReconoiseD2 = new TH1F("h2CeffHFpositivedirectionReconoiseD2", "", nphi, 0., 72.);
21356 
21357  for (int jeta = 0; jeta < njeta; jeta++) {
21358  // positivedirectionReconoiseD:
21359  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
21360  // for (int i=0;i<ndepth;i++) {
21361  // depth=2
21362  for (int i = 1; i < 2; i++) {
21363  TH1F *HFpositivedirectionReconoiseD2 = (TH1F *)h2CeffHFpositivedirectionReconoiseD2->Clone("twod1");
21364 
21365  float ccctest = 0; // to avoid empty massive elements
21366  for (int jphi = 0; jphi < nphi; jphi++) {
21367  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21368  if (areconoiseHF[i][jeta][jphi] > 0.) {
21369  HFpositivedirectionReconoiseD2->Fill(jphi, ccc1);
21370  ccctest = 1.; //HFpositivedirectionReconoiseD2->SetBinError(i,0.01);
21371  }
21372  } // for jphi
21373  if (ccctest > 0.) {
21374  //cout<<"1515 kcountHFpositivedirectionReconoiseD2 = "<<kcountHFpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
21375  c3x5->cd(kcountHFpositivedirectionReconoiseD2);
21376  HFpositivedirectionReconoiseD2->SetMarkerStyle(20);
21377  HFpositivedirectionReconoiseD2->SetMarkerSize(0.4);
21378  HFpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
21379  HFpositivedirectionReconoiseD2->SetXTitle("HFpositivedirectionReconoiseD2 \b");
21380  HFpositivedirectionReconoiseD2->SetMarkerColor(2);
21381  HFpositivedirectionReconoiseD2->SetLineColor(0);
21382  gPad->SetGridy();
21383  gPad->SetGridx();
21384  // gPad->SetLogy();
21385  if (kcountHFpositivedirectionReconoiseD2 == 1)
21386  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
21387  if (kcountHFpositivedirectionReconoiseD2 == 2)
21388  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
21389  if (kcountHFpositivedirectionReconoiseD2 == 3)
21390  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
21391  if (kcountHFpositivedirectionReconoiseD2 == 4)
21392  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
21393  if (kcountHFpositivedirectionReconoiseD2 == 5)
21394  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
21395  if (kcountHFpositivedirectionReconoiseD2 == 6)
21396  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
21397  if (kcountHFpositivedirectionReconoiseD2 == 7)
21398  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
21399  if (kcountHFpositivedirectionReconoiseD2 == 8)
21400  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
21401  if (kcountHFpositivedirectionReconoiseD2 == 9)
21402  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
21403  if (kcountHFpositivedirectionReconoiseD2 == 10)
21404  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
21405  if (kcountHFpositivedirectionReconoiseD2 == 11)
21406  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
21407  if (kcountHFpositivedirectionReconoiseD2 == 12)
21408  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
21409  if (kcountHFpositivedirectionReconoiseD2 == 13)
21410  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
21411  HFpositivedirectionReconoiseD2->Draw("Error");
21412  kcountHFpositivedirectionReconoiseD2++;
21413  if (kcountHFpositivedirectionReconoiseD2 > 13)
21414  break; // 4x6 = 24
21415  } //ccctest>0
21416 
21417  } // for i
21418  } //if(jeta-41 >= 28 && jeta-41 <= 40)
21419  } //for jeta
21421  c3x5->Update();
21422  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
21423  c3x5->Clear();
21424  // clean-up
21425  if (h2CeffHFpositivedirectionReconoiseD2)
21426  delete h2CeffHFpositivedirectionReconoiseD2;
21427  //========================================================================================== 22222214
21428  //======================================================================
21429  //======================================================================1D plot: D vs phi , different eta, depth=1
21430  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
21431  c3x5->Clear();
21433  c3x5->Divide(3, 5);
21434  c3x5->cd(1);
21435  int kcountHFnegativedirectionReconoiseD1 = 1;
21436  TH1F *h2CeffHFnegativedirectionReconoiseD1 = new TH1F("h2CeffHFnegativedirectionReconoiseD1", "", nphi, 0., 72.);
21437 
21438  for (int jeta = 0; jeta < njeta; jeta++) {
21439  // negativedirectionReconoiseD:
21440  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
21441  // for (int i=0;i<ndepth;i++) {
21442  // depth=1
21443  for (int i = 0; i < 1; i++) {
21444  TH1F *HFnegativedirectionReconoiseD1 = (TH1F *)h2CeffHFnegativedirectionReconoiseD1->Clone("twod1");
21445 
21446  float ccctest = 0; // to avoid empty massive elements
21447  for (int jphi = 0; jphi < nphi; jphi++) {
21448  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21449  if (areconoiseHF[i][jeta][jphi] > 0.) {
21450  HFnegativedirectionReconoiseD1->Fill(jphi, ccc1);
21451  ccctest = 1.; //HFnegativedirectionReconoiseD1->SetBinError(i,0.01);
21452  }
21453  } // for jphi
21454  if (ccctest > 0.) {
21455  //cout<<"1414 kcountHFnegativedirectionReconoiseD1 = "<<kcountHFnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
21456  c3x5->cd(kcountHFnegativedirectionReconoiseD1);
21457  HFnegativedirectionReconoiseD1->SetMarkerStyle(20);
21458  HFnegativedirectionReconoiseD1->SetMarkerSize(0.4);
21459  HFnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
21460  HFnegativedirectionReconoiseD1->SetXTitle("HFnegativedirectionReconoiseD1 \b");
21461  HFnegativedirectionReconoiseD1->SetMarkerColor(2);
21462  HFnegativedirectionReconoiseD1->SetLineColor(0);
21463  gPad->SetGridy();
21464  gPad->SetGridx();
21465  // gPad->SetLogy();
21466  if (kcountHFnegativedirectionReconoiseD1 == 1)
21467  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
21468  if (kcountHFnegativedirectionReconoiseD1 == 2)
21469  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
21470  if (kcountHFnegativedirectionReconoiseD1 == 3)
21471  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
21472  if (kcountHFnegativedirectionReconoiseD1 == 4)
21473  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
21474  if (kcountHFnegativedirectionReconoiseD1 == 5)
21475  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
21476  if (kcountHFnegativedirectionReconoiseD1 == 6)
21477  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
21478  if (kcountHFnegativedirectionReconoiseD1 == 7)
21479  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
21480  if (kcountHFnegativedirectionReconoiseD1 == 8)
21481  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
21482  if (kcountHFnegativedirectionReconoiseD1 == 9)
21483  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
21484  if (kcountHFnegativedirectionReconoiseD1 == 10)
21485  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
21486  if (kcountHFnegativedirectionReconoiseD1 == 11)
21487  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
21488  if (kcountHFnegativedirectionReconoiseD1 == 12)
21489  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
21490  if (kcountHFnegativedirectionReconoiseD1 == 13)
21491  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
21492  HFnegativedirectionReconoiseD1->Draw("Error");
21493  kcountHFnegativedirectionReconoiseD1++;
21494  if (kcountHFnegativedirectionReconoiseD1 > 13)
21495  break; // 4x6 = 24
21496  } //ccctest>0
21497 
21498  } // for i
21499  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21500  } //for jeta
21502  c3x5->Update();
21503  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
21504  c3x5->Clear();
21505  // clean-up
21506  if (h2CeffHFnegativedirectionReconoiseD1)
21507  delete h2CeffHFnegativedirectionReconoiseD1;
21508  //========================================================================================== 22222215
21509  //======================================================================
21510  //======================================================================1D plot: D vs phi , different eta, depth=2
21511  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
21512  c3x5->Clear();
21513  c3x5->Divide(3, 5);
21514  c3x5->cd(1);
21515  int kcountHFnegativedirectionReconoiseD2 = 1;
21516  TH1F *h2CeffHFnegativedirectionReconoiseD2 = new TH1F("h2CeffHFnegativedirectionReconoiseD2", "", nphi, 0., 72.);
21517 
21518  for (int jeta = 0; jeta < njeta; jeta++) {
21519  // negativedirectionReconoiseD:
21520  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
21521  // for (int i=0;i<ndepth;i++) {
21522  // depth=2
21523  for (int i = 1; i < 2; i++) {
21524  TH1F *HFnegativedirectionReconoiseD2 = (TH1F *)h2CeffHFnegativedirectionReconoiseD2->Clone("twod1");
21525 
21526  float ccctest = 0; // to avoid empty massive elements
21527  for (int jphi = 0; jphi < nphi; jphi++) {
21528  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21529  if (areconoiseHF[i][jeta][jphi] > 0.) {
21530  HFnegativedirectionReconoiseD2->Fill(jphi, ccc1);
21531  ccctest = 1.; //HFnegativedirectionReconoiseD2->SetBinError(i,0.01);
21532  }
21533  } // for jphi
21534  if (ccctest > 0.) {
21535  //cout<<"1515 kcountHFnegativedirectionReconoiseD2 = "<<kcountHFnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
21536  c3x5->cd(kcountHFnegativedirectionReconoiseD2);
21537  HFnegativedirectionReconoiseD2->SetMarkerStyle(20);
21538  HFnegativedirectionReconoiseD2->SetMarkerSize(0.4);
21539  HFnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
21540  HFnegativedirectionReconoiseD2->SetXTitle("HFnegativedirectionReconoiseD2 \b");
21541  HFnegativedirectionReconoiseD2->SetMarkerColor(2);
21542  HFnegativedirectionReconoiseD2->SetLineColor(0);
21543  gPad->SetGridy();
21544  gPad->SetGridx();
21545  // gPad->SetLogy();
21546  if (kcountHFnegativedirectionReconoiseD2 == 1)
21547  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
21548  if (kcountHFnegativedirectionReconoiseD2 == 2)
21549  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
21550  if (kcountHFnegativedirectionReconoiseD2 == 3)
21551  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
21552  if (kcountHFnegativedirectionReconoiseD2 == 4)
21553  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
21554  if (kcountHFnegativedirectionReconoiseD2 == 5)
21555  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
21556  if (kcountHFnegativedirectionReconoiseD2 == 6)
21557  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
21558  if (kcountHFnegativedirectionReconoiseD2 == 7)
21559  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
21560  if (kcountHFnegativedirectionReconoiseD2 == 8)
21561  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
21562  if (kcountHFnegativedirectionReconoiseD2 == 9)
21563  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
21564  if (kcountHFnegativedirectionReconoiseD2 == 10)
21565  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
21566  if (kcountHFnegativedirectionReconoiseD2 == 11)
21567  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
21568  if (kcountHFnegativedirectionReconoiseD2 == 12)
21569  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
21570  if (kcountHFnegativedirectionReconoiseD2 == 13)
21571  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
21572  HFnegativedirectionReconoiseD2->Draw("Error");
21573  kcountHFnegativedirectionReconoiseD2++;
21574  if (kcountHFnegativedirectionReconoiseD2 > 13)
21575  break; // 4x6 = 24
21576  } //ccctest>0
21577 
21578  } // for i
21579  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21580  } //for jeta
21582  c3x5->Update();
21583  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
21584  c3x5->Clear();
21585  // clean-up
21586  if (h2CeffHFnegativedirectionReconoiseD2)
21587  delete h2CeffHFnegativedirectionReconoiseD2;
21588 
21589  //===================================================================== END of Reconoise HF for phi-symmetry
21590  //===================================================================== END of Reconoise HF for phi-symmetry
21591  //===================================================================== END of Reconoise HF for phi-symmetry
21592  //============================================================================================================ END of Reconoise for phi-symmetry
21593  //============================================================================================================ END of Reconoise for phi-symmetry
21594  //============================================================================================================ END of Reconoise for phi-symmetry
21595 
21596  //==================================================================================================================================================== END for phi-symmetry
21597  //==================================================================================================================================================== END for phi-symmetry
21598  //==================================================================================================================================================== END for phi-symmetry
21599  //====================================================================================================================================================
21600 
21601  std::cout << " We are here to print 2017 MAPs " << std::endl;
21602  //======================================================================
21603 
21604  //======================================================================
21606 
21607  TH2F *Map_ALL = new TH2F("Map_All", "Map_all", 82, -41, 40, 72, 0, 71);
21608  int nx = Map_ALL->GetXaxis()->GetNbins();
21609  int ny = Map_ALL->GetYaxis()->GetNbins();
21610  int NBad = 0;
21611  int NWarn = 0;
21612  int NCalib = 0;
21613  int NPed = 0;
21614  // int Eta[3][10000]={0};
21615  int Eta[4][10000] = {0};
21616  int Phi[4][10000] = {0};
21617  int Sub[4][10000] = {0};
21618  int Depth[4][10000] = {0};
21619  string Comment[4][10000] = {""};
21620  string Text[33] = {"", "Cm", "Am", "Wm", "Rm", "TNm", "TXm", "", "", "", "", "Cc", "Ac", "Wc", "Rc", "TNc", "TXc",
21621  "", "", "", "", "GS", "", "", "", "", "", "", "", "", "", "Pm", "pWm"};
21622  int flag_W = 0;
21623  int flag_B = 0;
21624  int flag_P = 0;
21625 
21626  for (int i = 1; i <= nx; i++) { //Eta
21627  for (int j = 1; j <= ny; j++) { // Phi
21628  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
21629  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
21630  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
21631  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
21632  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
21633  if (Map_SUB[sub][k]->GetBinContent(i, j) != 0) {
21634  Map_SUB[sub][k]->SetBinContent(i, j, 0.5);
21635  Map_ALL->SetBinContent(i, j, 0.5);
21636  }
21637  }
21638  }
21639  }
21640  }
21641 
21642  for (int i = 1; i <= nx; i++) { //Eta
21643  for (int j = 1; j <= ny; j++) { // Phi
21644  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
21645  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
21646  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
21647  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
21648  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
21649  flag_W = 0;
21650  flag_B = 0;
21651  flag_P = 0;
21652  for (int test = 1; test <= 6; test++) { //Test: 1-Wm, 2-Rm, etc
21653  //Bad
21654 
21655  if (Map_Ampl[test][sub][k]->GetBinContent(i, j) > 0.1 &&
21656  NBad < 9999) { //Rate 0.1 for displaying on whole detector map and subdetector map
21657  Map_ALL->SetBinContent(i, j, 1.);
21658  Map_SUB[sub][k]->SetBinContent(i, j, 1.);
21659  if (flag_B == 0) {
21660  NBad += 1;
21661  Eta[2][NBad] = i - 41;
21662  Phi[2][NBad] = j - 1;
21663  Sub[2][NBad] = sub;
21664  Depth[2][NBad] = k;
21665  Comment[2][NBad] = Text[test];
21666  } else
21667  Comment[2][NBad] += ", " + Text[test];
21668  flag_B = 1;
21669  // cout<<"Map_Ampl["<<test<<"]["<<sub<<"]["<<k<<"]->GetBinContent("<<i<<","<<j<<")= "<<Map_Ampl[test][sub][k]->GetBinContent(i,j)<<endl;
21670  }
21671  //Warning
21672  /*
21673  if ((Map_Ampl[test][sub][k]->GetBinContent(i,j) != 0.)&&(Map_Ampl[test][sub][k]->GetBinContent(i,j) < 0.001) ) {
21674  if (Map_SUB[sub][k]->GetBinContent(i,j)!=1.) Map_SUB[sub][k]->SetBinContent(i,j,0.75);
21675  if (Map_ALL->GetBinContent(i,j)!=1.) Map_ALL->SetBinContent(i,j,0.75);
21676  if (flag_W == 0) {
21677  NWarn +=1;
21678  Eta[1][NWarn]=i-41;
21679  Phi[1][NWarn]=j-1;
21680  Sub[1][NWarn]=sub;
21681  Depth[1][NWarn]=k;
21682  Comment[1][NWarn]=Text[test];
21683  }
21684  else Comment[1][NWarn]+=", "+Text[test];
21685  flag_W = 1;
21686 // cout<<"Map_Ampl["<<test<<"]["<<sub<<"]["<<k<<"]->GetBinContent("<<i<<","<<j<<")= "<<Map_Ampl[test][sub][k]->GetBinContent(i,j)<<endl;
21687  }
21688 */
21689 
21690  } //end test
21691 
21692  //Calib
21693  /*
21694  for (int test=11;test<=16;test++) { //Test: 1-2.E, 2-2.F, etc
21695  if (Map_Ampl[test][sub][k]->GetBinContent(i,j) != 0.) {
21696 // if (Map_SUB[sub][k]->GetBinContent(i,j)!=1.0) Map_SUB[sub][k]->SetBinContent(i,j,0.3);
21697 // if (Map_ALL->GetBinContent(i,j)!=1.) Map_ALL->SetBinContent(i,j,0.3);
21698  if (flag_W == 0) {
21699  NWarn +=1;
21700  Eta[1][NWarn]=i-41;
21701  Phi[1][NWarn]=j-1;
21702  Sub[1][NWarn]=sub;
21703  Depth[1][NWarn]=k;
21704  Comment[1][NWarn]=Text[test];
21705  }
21706  else Comment[1][NWarn]+=", "+Text[test];
21707  flag_W = 1;
21708 // cout<<"Map_Ampl["<<test<<"]["<<sub<<"]["<<k<<"]->GetBinContent("<<i<<","<<j<<")= "<<Map_Ampl[test][sub][k]->GetBinContent(i,j)<<endl;
21709  }
21710  } //end test
21711 */
21712  //Gain stabil
21713  for (int test = 21; test <= 21; test++) {
21714  if (abs(Map_Ampl[test][sub][k]->GetBinContent(i, j)) > porog[sub]) {
21715  if (Map_SUB[sub][k]->GetBinContent(i, j) != 1.0)
21716  Map_SUB[sub][k]->SetBinContent(i, j, 0.75);
21717  if (Map_ALL->GetBinContent(i, j) != 1.) {
21718  Map_ALL->SetBinContent(i, j, 0.75);
21719  if (flag_W == 0) {
21720  NWarn += 1;
21721  Eta[1][NWarn] = i - 41;
21722  Phi[1][NWarn] = j - 1;
21723  Sub[1][NWarn] = sub;
21724  Depth[1][NWarn] = k;
21725  Comment[1][NWarn] = Text[test];
21726  } else
21727  Comment[1][NWarn] += ", " + Text[test];
21728  flag_W = 1;
21729 
21730  cout << "Map_Ampl[" << test << "][" << sub << "][" << k << "]->GetBinContent(" << i << "," << j
21731  << ")= " << Map_Ampl[test][sub][k]->GetBinContent(i, j) << endl;
21732  }
21733  }
21734  } //end test
21735 
21736  //Pedestals
21737  for (int test = 31; test <= 32; test++) {
21738  if (Map_Ampl[test][sub][k]->GetBinContent(i, j) > 0.1) {
21739  // if (Map_SUB[sub][k]->GetBinContent(i,j)!=1.0) Map_SUB[sub][k]->SetBinContent(i,j,0.75);
21740  // if (Map_ALL->GetBinContent(i,j)!=1.) Map_ALL->SetBinContent(i,j,0.75);
21741  if (flag_P == 0) {
21742  NPed += 1;
21743  Eta[3][NPed] = i - 41;
21744  Phi[3][NPed] = j - 1;
21745  Sub[3][NPed] = sub;
21746  Depth[3][NPed] = k;
21747  Comment[3][NPed] = Text[test];
21748  } else
21749  Comment[3][NPed] += ", " + Text[test];
21750  flag_P = 1;
21751 
21752  // cout<<"Map_Ampl["<<test<<"]["<<sub<<"]["<<k<<"]->GetBinContent("<<i<<","<<j<<")= "<<Map_Ampl[test][sub][k]->GetBinContent(i,j)<<endl;
21753  }
21754  } //end test
21755 
21756  } //end Depth
21757  } //end Sub
21758  } //end Phi
21759  } //end Eta
21760  // subdet maps
21761  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
21762 
21763  std::cout << " 2017 MAPS_SUB " << sub << std::endl;
21764  // if (sub==1) cHB->Divide(2,1);
21765  if (sub == 1)
21766  cHB->Divide(2, 2);
21767  // if (sub==2) cHE->Divide(3,1);
21768  if (sub == 2)
21769  cHE->Divide(3, 3);
21770  if (sub == 3)
21771  cONE->Divide(1, 1);
21772  // if (sub==4) cHB->Divide(2,1);
21773  if (sub == 4)
21774  cHF->Divide(2, 2);
21775  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
21776  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
21777  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
21778  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
21779  if (sub == 1)
21780  cHB->cd(k);
21781  if (sub == 2)
21782  cHE->cd(k);
21783  if (sub == 3)
21784  cONE->cd(k - 3);
21785  if (sub == 4)
21786  cHF->cd(k);
21787  gPad->SetGridy();
21788  gPad->SetGridx();
21789  // gPad->SetLogz();
21790  // gStyle->SetTitleOffset(0.5, "Y");
21791  if (sub == 1)
21792  sprintf(str, "HB, Depth%d \b", k);
21793  if (sub == 2)
21794  sprintf(str, "HE, Depth%d \b", k);
21795  if (sub == 3)
21796  sprintf(str, "HO, Depth%d \b", k);
21797  if (sub == 4)
21798  sprintf(str, "HF, Depth%d \b", k);
21799  Map_SUB[sub][k]->SetTitle(str);
21800  Map_SUB[sub][k]->SetXTitle("#eta \b");
21801  Map_SUB[sub][k]->SetYTitle("#phi \b");
21802  Map_SUB[sub][k]->Draw("COL");
21803  Map_SUB[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
21804  Map_SUB[sub][k]->GetZaxis()->SetRangeUser(0., 1.);
21805  if (sub == 1) {
21806  cHB->Modified();
21807  cHB->Update();
21808  }
21809  if (sub == 2) {
21810  cHE->Modified();
21811  cHE->Update();
21812  }
21813  if (sub == 3) {
21814  cONE->Modified();
21815  cONE->Update();
21816  }
21817  if (sub == 4) {
21818  cHF->Modified();
21819  cHF->Update();
21820  }
21821  } //end depth
21822  if (sub == 1) {
21823  cHB->Print("MAPHB.png");
21824  cHB->Clear();
21825  }
21826  if (sub == 2) {
21827  cHE->Print("MAPHE.png");
21828  cHE->Clear();
21829  }
21830  if (sub == 3) {
21831  cONE->Print("MAPHO.png");
21832  cONE->Clear();
21833  }
21834  if (sub == 4) {
21835  cHF->Print("MAPHF.png");
21836  cHF->Clear();
21837  }
21838  }
21839 
21841  // TCanvas *cmain1 = new TCanvas("cmain1","MAP",200,10,1400,1800);
21842  TCanvas *cmain1 = new TCanvas("cmain1", "MAP", 250, 10, 1450, 1410);
21843  cmain1->Divide(2, 2);
21844 
21845  cmain1->cd(1);
21846  TH1F *JDBEYESJ0 = (TH1F *)dir->FindObjectAny("h_totalAmplitudeHBperEvent");
21847  JDBEYESJ0->SetStats(0);
21848  JDBEYESJ0->SetMarkerStyle(20);
21849  JDBEYESJ0->SetMarkerSize(0.8);
21850  JDBEYESJ0->GetYaxis()->SetLabelSize(0.04);
21851  JDBEYESJ0->SetXTitle("iEvent \b");
21852  JDBEYESJ0->SetYTitle("totalAmplitude perEvent \b");
21853  JDBEYESJ0->SetTitle("HB \b");
21854  JDBEYESJ0->SetMarkerColor(2);
21855  JDBEYESJ0->SetLineColor(1);
21856  JDBEYESJ0->SetMinimum(0.8);
21857  JDBEYESJ0->Draw("HIST same P0");
21858 
21859  cmain1->cd(2);
21860  TH1F *JDBEYESJ1 = (TH1F *)dir->FindObjectAny("h_totalAmplitudeHEperEvent");
21861  JDBEYESJ1->SetStats(0);
21862  JDBEYESJ1->SetMarkerStyle(20);
21863  JDBEYESJ1->SetMarkerSize(0.8);
21864  JDBEYESJ1->GetYaxis()->SetLabelSize(0.04);
21865  JDBEYESJ1->SetXTitle("iEvent \b");
21866  JDBEYESJ1->SetYTitle("totalAmplitude perEvent \b");
21867  JDBEYESJ1->SetTitle("HE \b");
21868  JDBEYESJ1->SetMarkerColor(2);
21869  JDBEYESJ1->SetLineColor(1);
21870  JDBEYESJ1->SetMinimum(0.8);
21871  JDBEYESJ1->Draw("HIST same P0");
21872 
21873  cmain1->cd(3);
21874  TH1F *JDBEYESJ2 = (TH1F *)dir->FindObjectAny("h_totalAmplitudeHFperEvent");
21875  JDBEYESJ2->SetStats(0);
21876  JDBEYESJ2->SetMarkerStyle(20);
21877  JDBEYESJ2->SetMarkerSize(0.8);
21878  JDBEYESJ2->GetYaxis()->SetLabelSize(0.04);
21879  JDBEYESJ2->SetXTitle("iEvent \b");
21880  JDBEYESJ2->SetYTitle("totalAmplitude perEvent \b");
21881  JDBEYESJ2->SetTitle("HF \b");
21882  JDBEYESJ2->SetMarkerColor(2);
21883  JDBEYESJ2->SetLineColor(1);
21884  JDBEYESJ2->SetMinimum(0.8);
21885  JDBEYESJ2->Draw("HIST same P0");
21886 
21887  cmain1->cd(4);
21888  TH1F *JDBEYESJ3 = (TH1F *)dir->FindObjectAny("h_totalAmplitudeHOperEvent");
21889  JDBEYESJ3->SetStats(0);
21890  JDBEYESJ3->SetMarkerStyle(20);
21891  JDBEYESJ3->SetMarkerSize(0.8);
21892  JDBEYESJ3->GetYaxis()->SetLabelSize(0.04);
21893  JDBEYESJ3->SetXTitle("iEvent \b");
21894  JDBEYESJ3->SetYTitle("totalAmplitude perEvent \b");
21895  JDBEYESJ3->SetTitle("HO \b");
21896  JDBEYESJ3->SetMarkerColor(2);
21897  JDBEYESJ3->SetLineColor(1);
21898  JDBEYESJ3->SetMinimum(0.8);
21899  JDBEYESJ3->Draw("HIST same P0");
21900 
21901  cmain1->Modified();
21902  cmain1->Update();
21903  cmain1->Print("EVENTDEPENDENCE.png");
21904 
21905  std::cout << " EVENTDEPENDENCE " << std::endl;
21906 
21908  // ALL SubDet
21909  gStyle->SetOptTitle(0);
21910  TCanvas *cmain = new TCanvas("cmain", "MAP", 1000, 1000);
21911  //cmain->cd(1);
21912  gPad->SetGridy();
21913  gPad->SetGridx();
21914  // gPad->SetLogz();
21915  Map_ALL->SetTitleOffset(1.3, "Y");
21916  Map_ALL->SetXTitle("#eta \b");
21917  Map_ALL->SetYTitle("#phi \b");
21918  Map_ALL->Draw("COL");
21919  Map_ALL->GetYaxis()->SetRangeUser(0, 72.);
21920  Map_ALL->GetZaxis()->SetRangeUser(0, 1.);
21921  cmain->Modified();
21922  cmain->Update();
21923  cmain->Print("MAP.png");
21924 
21925  std::cout << "******** MAP_ALL done" << std::endl;
21926  std::cout << "********" << std::endl;
21927 
21928  std::cout << "********" << std::endl;
21929  std::cout << "************ Start creating each test kind for each subdet html pages:" << std::endl;
21930 
21931  //======================================================================
21932 
21933  //======================================================================
21934  // Creating each test kind for each subdet html pages:
21935  std::string raw_class, raw_class1, raw_class2, raw_class3;
21936  int ind = 0;
21937 
21938  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
21939  ofstream htmlFileT, htmlFileC, htmlFileD, htmlFileP, htmlFileS, htmlFileM, htmlFileR, htmlFileN;
21940  if (sub == 1) {
21941  htmlFileT.open("HB_Tile.html");
21942  htmlFileC.open("HB_Calib.html");
21943  htmlFileD.open("HB_Drift.html");
21944  htmlFileP.open("HB_Pedestals.html");
21945  htmlFileS.open("HB_Shapes.html");
21946  htmlFileM.open("HB_PhiSymmetryDigi.html");
21947  htmlFileR.open("HB_PhiSymmetryRecoSignal.html");
21948  htmlFileN.open("HB_PhiSymmetryRecoNoise.html");
21949  }
21950  if (sub == 2) {
21951  htmlFileT.open("HE_Tile.html");
21952  htmlFileC.open("HE_Calib.html");
21953  htmlFileD.open("HE_Drift.html");
21954  htmlFileP.open("HE_Pedestals.html");
21955  htmlFileS.open("HE_Shapes.html");
21956  htmlFileM.open("HE_PhiSymmetryDigi.html");
21957  htmlFileR.open("HE_PhiSymmetryRecoSignal.html");
21958  htmlFileN.open("HE_PhiSymmetryRecoNoise.html");
21959  }
21960  if (sub == 3) {
21961  htmlFileT.open("HO_Tile.html");
21962  htmlFileC.open("HO_Calib.html");
21963  htmlFileD.open("HO_Drift.html");
21964  htmlFileP.open("HO_Pedestals.html");
21965  htmlFileS.open("HO_Shapes.html");
21966  }
21967  if (sub == 4) {
21968  htmlFileT.open("HF_Tile.html");
21969  htmlFileC.open("HF_Calib.html");
21970  htmlFileD.open("HF_Drift.html");
21971  htmlFileP.open("HF_Pedestals.html");
21972  htmlFileS.open("HF_Shapes.html");
21973  htmlFileM.open("HF_PhiSymmetryDigi.html");
21974  htmlFileR.open("HF_PhiSymmetryRecoSignal.html");
21975  htmlFileN.open("HF_PhiSymmetryRecoNoise.html");
21976  }
21977 
21978  // Megatile channels
21979  htmlFileT << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
21980  htmlFileT << "<head>" << std::endl;
21981  htmlFileT << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
21982  htmlFileT << "<title> Remote Monitoring Tool </title>" << std::endl;
21983  htmlFileT << "<style type=\"text/css\">" << std::endl;
21984  htmlFileT << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
21985  << std::endl;
21986  htmlFileT << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
21987  htmlFileT << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
21988  "text-align: center;}"
21989  << std::endl;
21990  htmlFileT << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
21991  htmlFileT << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
21992  htmlFileT << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
21993  htmlFileT << "</style>" << std::endl;
21994  htmlFileT << "<body>" << std::endl;
21995 
21996  if (sub == 1)
21997  htmlFileT << "<h1> Criteria for megatile channels for HB, RUN = " << runnumber << " </h1>" << std::endl;
21998  if (sub == 2)
21999  htmlFileT << "<h1> Criteria for megatile channels for HE, RUN = " << runnumber << " </h1>" << std::endl;
22000  if (sub == 3)
22001  htmlFileT << "<h1> Criteria for megatile channels for HO, RUN = " << runnumber << " </h1>" << std::endl;
22002  if (sub == 4)
22003  htmlFileT << "<h1> Criteria for megatile channels for HF, RUN = " << runnumber << " </h1>" << std::endl;
22004  htmlFileT << "<br>" << std::endl;
22005 
22006  // Test Entries
22007 
22008  htmlFileT << "<h2> 0. Entries for each channel.</h3>" << std::endl;
22009  htmlFileT << "<h3> 0.A. Entries in each channel for each depth.</h3>" << std::endl;
22010  htmlFileT << "<h4> Channel legend: color is rate of entries </h4>" << std::endl;
22011  if (sub == 1)
22012  htmlFileT << " <img src=\"MapRateEntryHB.png\" />" << std::endl;
22013  if (sub == 2)
22014  htmlFileT << " <img src=\"MapRateEntryHE.png\" />" << std::endl;
22015  if (sub == 3)
22016  htmlFileT << " <img src=\"MapRateEntryHO.png\" />" << std::endl;
22017  if (sub == 4)
22018  htmlFileT << " <img src=\"MapRateEntryHF.png\" />" << std::endl;
22019  htmlFileT << "<br>" << std::endl;
22020 
22021  // Test Cm
22022  htmlFileT << "<h2> 1. Cm criterion: CapID errors for each channel.</h3>" << std::endl;
22023  htmlFileT << "<h3> 1.A. Rate of CapId failures in each channel for each depth.</h3>" << std::endl;
22024  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22025  if (sub == 1)
22026  htmlFileT << " <img src=\"MapRateCapIDHB.png\" />" << std::endl;
22027  if (sub == 2)
22028  htmlFileT << " <img src=\"MapRateCapIDHE.png\" />" << std::endl;
22029  if (sub == 3)
22030  htmlFileT << " <img src=\"MapRateCapIDHO.png\" />" << std::endl;
22031  if (sub == 4)
22032  htmlFileT << " <img src=\"MapRateCapIDHF.png\" />" << std::endl;
22033  htmlFileT << "<br>" << std::endl;
22034 
22035  // Am
22036  htmlFileT << "<h2> 2. Am criterion: ADC amplitude collected over all TSs(Full Amplitude) for each channel. </h3>"
22037  << std::endl;
22038  htmlFileT << "<h3> 2.A. Full ADC amplitude distribution over all events, channels and depths.</h3>" << std::endl;
22039  htmlFileT << "<h4> Legend: Bins less " << MIN_M[2][sub] << " correpond to bad ADC amplitude </h4>" << std::endl;
22040  if (sub == 1)
22041  htmlFileT << " <img src=\"HistAmplHB.png\" />" << std::endl;
22042  if (sub == 2)
22043  htmlFileT << " <img src=\"HistAmplHE.png\" />" << std::endl;
22044  if (sub == 3)
22045  htmlFileT << " <img src=\"HistAmplHO.png\" />" << std::endl;
22046  if (sub == 4)
22047  htmlFileT << " <img src=\"HistAmplHF.png\" />" << std::endl;
22048  htmlFileT << "<br>" << std::endl;
22049  htmlFileT << "<h3> 2.B. Rate of bad ADC amplitude (<" << MIN_M[2][sub] << ") in each channel for each depth. </h3>"
22050  << std::endl;
22051  htmlFileT << "<h4> Channel legend: white - good, other colours - bad. </h4>" << std::endl;
22052  if (sub == 1)
22053  htmlFileT << " <img src=\"MapRateAmplHB.png\" />" << std::endl;
22054  if (sub == 2)
22055  htmlFileT << " <img src=\"MapRateAmplHE.png\" />" << std::endl;
22056  if (sub == 3)
22057  htmlFileT << " <img src=\"MapRateAmplHO.png\" />" << std::endl;
22058  if (sub == 4)
22059  htmlFileT << " <img src=\"MapRateAmplHF.png\" />" << std::endl;
22060  htmlFileT << "<br>" << std::endl;
22061 
22062  // Test Wm
22063  htmlFileT << "<h2> 3. Wm criterion: RMS (width) of ADC amplutude for each channel.</h3>" << std::endl;
22064  htmlFileT << "<h3> 3.A. RMS distribution over all events, channel and depth.</h3>" << std::endl;
22065  htmlFileT << "<h4> Legend: Bins less " << MIN_M[3][sub] << " and more " << MAX_M[3][sub]
22066  << " correpond to bad RMS </h4>" << std::endl;
22067  if (sub == 1)
22068  htmlFileT << " <img src=\"HistRMSHB.png\" />" << std::endl;
22069  if (sub == 2)
22070  htmlFileT << " <img src=\"HistRMSHE.png\" />" << std::endl;
22071  if (sub == 3)
22072  htmlFileT << " <img src=\"HistRMSHO.png\" />" << std::endl;
22073  if (sub == 4)
22074  htmlFileT << " <img src=\"HistRMSHF.png\" />" << std::endl;
22075  htmlFileT << "<br>" << std::endl;
22076  htmlFileT << "<h3> 3.B. Rate of bad RMS (<" << MIN_M[3][sub] << ",>" << MAX_M[3][sub]
22077  << ") in each channel for each depth.</h3>" << std::endl;
22078  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22079  if (sub == 1)
22080  htmlFileT << " <img src=\"MapRateRMSHB.png\" />" << std::endl;
22081  if (sub == 2)
22082  htmlFileT << " <img src=\"MapRateRMSHE.png\" />" << std::endl;
22083  if (sub == 3)
22084  htmlFileT << " <img src=\"MapRateRMSHO.png\" />" << std::endl;
22085  if (sub == 4)
22086  htmlFileT << " <img src=\"MapRateRMSHF.png\" />" << std::endl;
22087  htmlFileT << "<br>" << std::endl;
22088 
22089  // Rm
22090  htmlFileT << "<h2> 4. Rm criterion: Ratio ADC value sum over four near maximum (-2, -1, max, +1) TS to ADC value "
22091  "sum over all TS for each channel. </h3>"
22092  << std::endl;
22093  htmlFileT << "<h3> 4.A. Ratio distribution over all events, channels and depths.</h3>" << std::endl;
22094  htmlFileT << "<h4> Legend: Bins less " << MIN_M[4][sub] << " and more " << MAX_M[4][sub]
22095  << " correpond to bad ratio </h4>" << std::endl;
22096  if (sub == 1)
22097  htmlFileT << " <img src=\"Hist43TStoAllTSHB.png\" />" << std::endl;
22098  if (sub == 2)
22099  htmlFileT << " <img src=\"Hist43TStoAllTSHE.png\" />" << std::endl;
22100  if (sub == 3)
22101  htmlFileT << " <img src=\"Hist43TStoAllTSHO.png\" />" << std::endl;
22102  if (sub == 4)
22103  htmlFileT << " <img src=\"Hist43TStoAllTSHF.png\" />" << std::endl;
22104  htmlFileT << "<br>" << std::endl;
22105  htmlFileT << "<h3> 4.B. Rate of bad ratio (<" << MIN_M[4][sub] << ", >" << MAX_M[4][sub]
22106  << ") in each channel for each depth.</h3>" << std::endl;
22107  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22108  if (sub == 1)
22109  htmlFileT << " <img src=\"MapRate43TStoAllTSHB.png\" />" << std::endl;
22110  if (sub == 2)
22111  htmlFileT << " <img src=\"MapRate43TStoAllTSHE.png\" />" << std::endl;
22112  if (sub == 3)
22113  htmlFileT << " <img src=\"MapRate43TStoAllTSHO.png\" />" << std::endl;
22114  if (sub == 4)
22115  htmlFileT << " <img src=\"MapRate43TStoAllTSHF.png\" />" << std::endl;
22116  htmlFileT << "<br>" << std::endl;
22117 
22118  // TNm
22119  htmlFileT << "<h2> 5. TNm criterion: Mean TS position for each channel.</h3>" << std::endl;
22120  htmlFileT << "<h3> 5.A. TN position distribution over all events, channels and depths.</h3>" << std::endl;
22121  htmlFileT << "<h4> Legend: Bins less " << MIN_M[5][sub] << " and more " << MAX_M[5][sub]
22122  << " correpond to bad mean position </h4>" << std::endl;
22123  if (sub == 1)
22124  htmlFileT << " <img src=\"HistMeanPosHB.png\" />" << std::endl;
22125  if (sub == 2)
22126  htmlFileT << " <img src=\"HistMeanPosHE.png\" />" << std::endl;
22127  if (sub == 3)
22128  htmlFileT << " <img src=\"HistMeanPosHO.png\" />" << std::endl;
22129  if (sub == 4)
22130  htmlFileT << " <img src=\"HistMeanPosHF.png\" />" << std::endl;
22131  htmlFileT << "<br>" << std::endl;
22132  htmlFileT << "<h3> 5.B. Rate of bad TN position (<" << MIN_M[5][sub] << ", >" << MAX_M[5][sub]
22133  << ") in each channel for each depth. </h3>" << std::endl;
22134  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22135  if (sub == 1)
22136  htmlFileT << " <img src=\"MapRateMeanPosHB.png\" />" << std::endl;
22137  if (sub == 2)
22138  htmlFileT << " <img src=\"MapRateMeanPosHE.png\" />" << std::endl;
22139  if (sub == 3)
22140  htmlFileT << " <img src=\"MapRateMeanPosHO.png\" />" << std::endl;
22141  if (sub == 4)
22142  htmlFileT << " <img src=\"MapRateMeanPosHF.png\" />" << std::endl;
22143  htmlFileT << "<br>" << std::endl;
22144 
22145  // TXm
22146  htmlFileT << "<h2> 6.TXm criterion: Maximum TS position for each channel.</h3>" << std::endl;
22147  htmlFileT << "<h3> 6.A. TX position distribution over all events, channel and depth.</h3>" << std::endl;
22148  htmlFileT << "<h4> Legend: Bins less " << MIN_M[6][sub] << " and more " << MAX_M[6][sub]
22149  << " correpond to bad position </h4>" << std::endl;
22150  if (sub == 1)
22151  htmlFileT << " <img src=\"HistMaxPosHB.png\" />" << std::endl;
22152  if (sub == 2)
22153  htmlFileT << " <img src=\"HistMaxPosHE.png\" />" << std::endl;
22154  if (sub == 3)
22155  htmlFileT << " <img src=\"HistMaxPosHO.png\" />" << std::endl;
22156  if (sub == 4)
22157  htmlFileT << " <img src=\"HistMaxPosHF.png\" />" << std::endl;
22158  htmlFileT << "<br>" << std::endl;
22159  htmlFileT << "<h3> 6.B. Rate of bad TX position (<" << MIN_M[6][sub] << ", >" << MAX_M[6][sub]
22160  << ") in each channel for each depth. </h3>" << std::endl;
22161  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22162  if (sub == 1)
22163  htmlFileT << " <img src=\"MapRateMaxPosHB.png\" />" << std::endl;
22164  if (sub == 2)
22165  htmlFileT << " <img src=\"MapRateMaxPosHE.png\" />" << std::endl;
22166  if (sub == 3)
22167  htmlFileT << " <img src=\"MapRateMaxPosHO.png\" />" << std::endl;
22168  if (sub == 4)
22169  htmlFileT << " <img src=\"MapRateMaxPosHF.png\" />" << std::endl;
22170  htmlFileT << "<br>" << std::endl;
22171 
22172  htmlFileT << "</body> " << std::endl;
22173  htmlFileT << "</html> " << std::endl;
22174  htmlFileT.close();
22175 
22176  //Calibration channels
22177  htmlFileC << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22178  htmlFileC << "<head>" << std::endl;
22179  htmlFileC << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22180  htmlFileC << "<title> Raw Data Analyser </title>" << std::endl;
22181  htmlFileC << "<style type=\"text/css\">" << std::endl;
22182  htmlFileC << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22183  << std::endl;
22184  htmlFileC << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22185  htmlFileC << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22186  "text-align: center;}"
22187  << std::endl;
22188  htmlFileC << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22189  htmlFileC << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22190  htmlFileC << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22191  htmlFileC << "</style>" << std::endl;
22192  htmlFileC << "<body>" << std::endl;
22193 
22194  if (sub == 1)
22195  htmlFileC << "<h1> Criteria for calibration channels for HB, RUN = " << runnumber << " </h1>" << std::endl;
22196  if (sub == 2)
22197  htmlFileC << "<h1> Criteria for calibration channels for HE, RUN = " << runnumber << " </h1>" << std::endl;
22198  if (sub == 3)
22199  htmlFileC << "<h1> Criteria for calibration channels for HO, RUN = " << runnumber << " </h1>" << std::endl;
22200  if (sub == 4)
22201  htmlFileC << "<h1> Criteria for calibration channels for HF, RUN = " << runnumber << " </h1>" << std::endl;
22202  htmlFileC << "<br>" << std::endl;
22203 
22204  // Test Entries
22205 
22206  htmlFileC << "<h2> 0. Entries for each channel.</h3>" << std::endl;
22207  htmlFileC << "<h3> 0.A. Entries in each channel for each depth.</h3>" << std::endl;
22208  htmlFileC << "<h4> Channel legend: color is rate of entries </h4>" << std::endl;
22209  if (sub == 1)
22210  htmlFileC << " <img src=\"MapRateCalibEntryHB.png\" />" << std::endl;
22211  if (sub == 2)
22212  htmlFileC << " <img src=\"MapRateCalibEntryHE.png\" />" << std::endl;
22213  if (sub == 3)
22214  htmlFileC << " <img src=\"MapRateCalibEntryHO.png\" />" << std::endl;
22215  if (sub == 4)
22216  htmlFileC << " <img src=\"MapRateCalibEntryHF.png\" />" << std::endl;
22217  htmlFileC << "<br>" << std::endl;
22218 
22219  // Test Cc
22220  htmlFileC << "<h2> 1. Cc criterion: CapID errors for each channel.</h3>" << std::endl;
22221  htmlFileC << "<h3> 1.A. Rate of CapId failures in each channel for each depth.</h3>" << std::endl;
22222  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22223  if (sub == 1)
22224  htmlFileC << " <img src=\"MapRateCapCalibHB.png\" />" << std::endl;
22225  if (sub == 2)
22226  htmlFileC << " <img src=\"MapRateCapCalibHE.png\" />" << std::endl;
22227  if (sub == 3)
22228  htmlFileC << " <img src=\"MapRateCapCalibHO.png\" />" << std::endl;
22229  if (sub == 4)
22230  htmlFileC << " <img src=\"MapRateCapCalibHF.png\" />" << std::endl;
22231  htmlFileC << "<br>" << std::endl;
22232 
22233  // Ac
22234  htmlFileC << "<h2> 2. Ac criterion: ADC amplitude collected over all TSs(Full Amplitude) for each channel. </h3>"
22235  << std::endl;
22236  htmlFileC << "<h3> 2.A. Full ADC amplitude distribution over all events, channels and depths.</h3>" << std::endl;
22237  htmlFileC << "<h4> Legend: Bins less " << MIN_C[2][sub] << " correpond to bad ADC amplitude </h4>" << std::endl;
22238  if (sub == 1)
22239  htmlFileC << " <img src=\"HistAmplCalibHB.png\" />" << std::endl;
22240  if (sub == 2)
22241  htmlFileC << " <img src=\"HistAmplCalibHE.png\" />" << std::endl;
22242  if (sub == 3)
22243  htmlFileC << " <img src=\"HistAmplCalibHO.png\" />" << std::endl;
22244  if (sub == 4)
22245  htmlFileC << " <img src=\"HistAmplCalibHF.png\" />" << std::endl;
22246  htmlFileC << "<br>" << std::endl;
22247  htmlFileC << "<h3> 2.B. Rate of bad ADC amplitude (<" << MIN_C[2][sub] << ") in each channel for each depth. </h3>"
22248  << std::endl;
22249  htmlFileC << "<h4> Channel legend: white - good, other colours - bad. </h4>" << std::endl;
22250  if (sub == 1)
22251  htmlFileC << " <img src=\"MapRateAmplCalibHB.png\" />" << std::endl;
22252  if (sub == 2)
22253  htmlFileC << " <img src=\"MapRateAmplCalibHE.png\" />" << std::endl;
22254  if (sub == 3)
22255  htmlFileC << " <img src=\"MapRateAmplCalibHO.png\" />" << std::endl;
22256  if (sub == 4)
22257  htmlFileC << " <img src=\"MapRateAmplCalibHF.png\" />" << std::endl;
22258  htmlFileC << "<br>" << std::endl;
22259 
22260  // Test Wc
22261  htmlFileC << "<h2> 3. Wc criterion: RMS (width) of ADC amplutude for each channel.</h3>" << std::endl;
22262  htmlFileC << "<h3> 3.A. W distribution over all events, channel and depth.</h3>" << std::endl;
22263  htmlFileC << "<h4> Legend: Bins less " << MIN_C[3][sub] << " and more " << MAX_C[3][sub]
22264  << " correpond to bad RMS </h4>" << std::endl;
22265  if (sub == 1)
22266  htmlFileC << " <img src=\"HistRMSCalibHB.png\" />" << std::endl;
22267  if (sub == 2)
22268  htmlFileC << " <img src=\"HistRMSCalibHE.png\" />" << std::endl;
22269  if (sub == 3)
22270  htmlFileC << " <img src=\"HistRMSCalibHO.png\" />" << std::endl;
22271  if (sub == 4)
22272  htmlFileC << " <img src=\"HistRMSCalibHF.png\" />" << std::endl;
22273  htmlFileC << "<br>" << std::endl;
22274  htmlFileC << "<h3> 3.B. Rate of bad W (<" << MIN_C[3][sub] << ",>" << MAX_C[3][sub]
22275  << ") in each channel for each depth.</h3>" << std::endl;
22276  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22277  if (sub == 1)
22278  htmlFileC << " <img src=\"MapRateRMSCalibHB.png\" />" << std::endl;
22279  if (sub == 2)
22280  htmlFileC << " <img src=\"MapRateRMSCalibHE.png\" />" << std::endl;
22281  if (sub == 3)
22282  htmlFileC << " <img src=\"MapRateRMSCalibHO.png\" />" << std::endl;
22283  if (sub == 4)
22284  htmlFileC << " <img src=\"MapRateRMSCalibHF.png\" />" << std::endl;
22285  htmlFileC << "<br>" << std::endl;
22286 
22287  // Rc
22288  htmlFileC << "<h2> 4. Rc criterion: Ratio ADC value sum over five near maximum (-2, -1, max, +1, +2) TS to ADC "
22289  "value sum over all TS for each channel. </h3>"
22290  << std::endl;
22291  htmlFileC << "<h3> 4.A. Ratio distribution over all events, channels and depths.</h3>" << std::endl;
22292  htmlFileC << "<h4> Legend: Bins less " << MIN_C[4][sub] << " and more " << MAX_C[4][sub]
22293  << " correpond to bad ratio </h4>" << std::endl;
22294  if (sub == 1)
22295  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHB.png\" />" << std::endl;
22296  if (sub == 2)
22297  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHE.png\" />" << std::endl;
22298  if (sub == 3)
22299  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHO.png\" />" << std::endl;
22300  if (sub == 4)
22301  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHF.png\" />" << std::endl;
22302  htmlFileC << "<br>" << std::endl;
22303  htmlFileC << "<h3> 4.B. Rate of bad Ratio (<" << MIN_C[4][sub] << ", >" << MAX_C[4][sub]
22304  << ") in each channel for each depth.</h3>" << std::endl;
22305  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22306  if (sub == 1)
22307  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHB.png\" />" << std::endl;
22308  if (sub == 2)
22309  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHE.png\" />" << std::endl;
22310  if (sub == 3)
22311  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHO.png\" />" << std::endl;
22312  if (sub == 4)
22313  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHF.png\" />" << std::endl;
22314  htmlFileC << "<br>" << std::endl;
22315 
22316  // TNc
22317  htmlFileC << "<h2> 5. TNc criterion: Mean TS position for each channel.</h3>" << std::endl;
22318  htmlFileC << "<h3> 5.A. TN position distribution over all events, channels and depths.</h3>" << std::endl;
22319  htmlFileC << "<h4> Legend: Bins less " << MIN_C[5][sub] << " and more " << MAX_C[5][sub]
22320  << " correpond to bad position </h4>" << std::endl;
22321  if (sub == 1)
22322  htmlFileC << " <img src=\"HistMeanPosCalibHB.png\" />" << std::endl;
22323  if (sub == 2)
22324  htmlFileC << " <img src=\"HistMeanPosCalibHE.png\" />" << std::endl;
22325  if (sub == 3)
22326  htmlFileC << " <img src=\"HistMeanPosCalibHO.png\" />" << std::endl;
22327  if (sub == 4)
22328  htmlFileC << " <img src=\"HistMeanPosCalibHF.png\" />" << std::endl;
22329  htmlFileC << "<br>" << std::endl;
22330  htmlFileC << "<h3> 5.B. Rate of bad TN position (<" << MIN_C[5][sub] << ", >" << MAX_C[5][sub]
22331  << ") in each channel for each depth. </h3>" << std::endl;
22332  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22333  if (sub == 1)
22334  htmlFileC << " <img src=\"MapRateMeanPosCalibHB.png\" />" << std::endl;
22335  if (sub == 2)
22336  htmlFileC << " <img src=\"MapRateMeanPosCalibHE.png\" />" << std::endl;
22337  if (sub == 3)
22338  htmlFileC << " <img src=\"MapRateMeanPosCalibHO.png\" />" << std::endl;
22339  if (sub == 4)
22340  htmlFileC << " <img src=\"MapRateMeanPosCalibHF.png\" />" << std::endl;
22341  htmlFileC << "<br>" << std::endl;
22342 
22343  // TXm
22344  htmlFileC << "<h2> 6.TXc criterion: Maximum TS position for each channel.</h3>" << std::endl;
22345  htmlFileC << "<h3> 6.A. TX position distribution over all events, channel and depth.</h3>" << std::endl;
22346  htmlFileC << "<h4> Legend: Bins less " << MIN_C[6][sub] << " and more " << MAX_C[6][sub]
22347  << " correpond to bad position </h4>" << std::endl;
22348  if (sub == 1)
22349  htmlFileC << " <img src=\"HistMaxPosCalibHB.png\" />" << std::endl;
22350  if (sub == 2)
22351  htmlFileC << " <img src=\"HistMaxPosCalibHE.png\" />" << std::endl;
22352  if (sub == 3)
22353  htmlFileC << " <img src=\"HistMaxPosCalibHO.png\" />" << std::endl;
22354  if (sub == 4)
22355  htmlFileC << " <img src=\"HistMaxPosCalibHF.png\" />" << std::endl;
22356  htmlFileC << "<br>" << std::endl;
22357  htmlFileC << "<h3> 6.B. Rate of bad TX position (<" << MIN_C[6][sub] << ", >" << MAX_C[6][sub]
22358  << ") in each channel for each depth. </h3>" << std::endl;
22359  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22360  if (sub == 1)
22361  htmlFileC << " <img src=\"MapRateMaxPosCalibHB.png\" />" << std::endl;
22362  if (sub == 2)
22363  htmlFileC << " <img src=\"MapRateMaxPosCalibHE.png\" />" << std::endl;
22364  if (sub == 3)
22365  htmlFileC << " <img src=\"MapRateMaxPosCalibHO.png\" />" << std::endl;
22366  if (sub == 4)
22367  htmlFileC << " <img src=\"MapRateMaxPosCalibHF.png\" />" << std::endl;
22368  htmlFileC << "<br>" << std::endl;
22369 
22370  htmlFileC << "</body> " << std::endl;
22371  htmlFileC << "</html> " << std::endl;
22372  htmlFileC.close();
22373 
22374  //Response drift
22375  htmlFileD << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22376  htmlFileD << "<head>" << std::endl;
22377  htmlFileD << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22378  htmlFileD << "<title> Remore Monitoring Tool </title>" << std::endl;
22379  htmlFileD << "<style type=\"text/css\">" << std::endl;
22380  htmlFileD << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22381  << std::endl;
22382  htmlFileD << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22383  htmlFileD << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22384  "text-align: center;}"
22385  << std::endl;
22386  htmlFileD << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22387  htmlFileD << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22388  htmlFileD << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22389  htmlFileD << "</style>" << std::endl;
22390  htmlFileD << "<body>" << std::endl;
22391 
22392  if (sub == 1)
22393  htmlFileD << "<h1> Response drift for HB: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
22394  << " </h1>" << std::endl;
22395  if (sub == 2)
22396  htmlFileD << "<h1> Response drift for HE: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
22397  << " </h1>" << std::endl;
22398  if (sub == 3)
22399  htmlFileD << "<h1> Response drift for HO: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
22400  << " </h1>" << std::endl;
22401  if (sub == 4)
22402  htmlFileD << "<h1> Response drift for HF: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
22403  << " </h1>" << std::endl;
22404  htmlFileD << "<br>" << std::endl;
22405 
22406  // test GS
22407  htmlFileD << "<h2> 1. Gain Stability (GS) </h3>" << std::endl;
22408  htmlFileD << "<h3> 1.A. Averaged channel response, collected over all TS, for Current run in each channel for each "
22409  "depth.</h3>"
22410  << std::endl;
22411  htmlFileD << "<h4> Channel legend: colour means cooresponding value of mean response. </h4>" << std::endl;
22412  if (sub == 1)
22413  htmlFileD << " <img src=\"MapRateAmpl1HB.png\" />" << std::endl;
22414  if (sub == 2)
22415  htmlFileD << " <img src=\"MapRateAmpl1HE.png\" />" << std::endl;
22416  if (sub == 3)
22417  htmlFileD << " <img src=\"MapRateAmpl1HO.png\" />" << std::endl;
22418  if (sub == 4)
22419  htmlFileD << " <img src=\"MapRateAmpl1HF.png\" />" << std::endl;
22420  htmlFileD << "<br>" << std::endl;
22421  htmlFileD << "<h3> 1.B. Averaged channel response, collected over all TS, for Reference run in each channel for "
22422  "each depth.</h3>"
22423  << std::endl;
22424  htmlFileD << "<h4> Channel legend: colour means cooresponding value of mean response. </h4>" << std::endl;
22425  if (sub == 1)
22426  htmlFileD << " <img src=\"MapRateAmpl2HB.png\" />" << std::endl;
22427  if (sub == 2)
22428  htmlFileD << " <img src=\"MapRateAmpl2HE.png\" />" << std::endl;
22429  if (sub == 3)
22430  htmlFileD << " <img src=\"MapRateAmpl2HO.png\" />" << std::endl;
22431  if (sub == 4)
22432  htmlFileD << " <img src=\"MapRateAmpl2HF.png\" />" << std::endl;
22433  htmlFileD << "<br>" << std::endl;
22434  htmlFileD << "<h3> 1.C. Relative difference between Current and Reference run distribution over all events, "
22435  "channels for each depth.</h3>"
22436  << std::endl;
22437  htmlFileD << "<h4> Legend: Bins less -" << porog[sub] << "% and more +" << porog[sub]
22438  << "% correpond to bad relative difference position </h4>" << std::endl;
22439  if (sub == 1)
22440  htmlFileD << " <img src=\"HistAmplDriftDepthHB.png\" />" << std::endl;
22441  if (sub == 2)
22442  htmlFileD << " <img src=\"HistAmplDriftDepthHE.png\" />" << std::endl;
22443  if (sub == 3)
22444  htmlFileD << " <img src=\"HistAmplDriftDepthHO.png\" />" << std::endl;
22445  if (sub == 4)
22446  htmlFileD << " <img src=\"HistAmplDriftDepthHF.png\" />" << std::endl;
22447  htmlFileD << "<br>" << std::endl;
22448  htmlFileD << "<h3> 1.D. Rate of bad relative difference (<-" << porog[sub] << ", >+" << porog[sub]
22449  << ") in each channel for each depth.</h3>" << std::endl;
22450  htmlFileD << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22451  if (sub == 1)
22452  htmlFileD << " <img src=\"MapRateAmplDriftHB.png\" />" << std::endl;
22453  if (sub == 2)
22454  htmlFileD << " <img src=\"MapRateAmplDriftHE.png\" />" << std::endl;
22455  if (sub == 3)
22456  htmlFileD << " <img src=\"MapRateAmplDriftHO.png\" />" << std::endl;
22457  if (sub == 4)
22458  htmlFileD << " <img src=\"MapRateAmplDriftHF.png\" />" << std::endl;
22459  htmlFileD << "<br>" << std::endl;
22460 
22461  htmlFileD << "</body> " << std::endl;
22462  htmlFileD << "</html> " << std::endl;
22463  htmlFileD.close();
22464 
22465  // Pedestals
22466  htmlFileP << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22467  htmlFileP << "<head>" << std::endl;
22468  htmlFileP << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22469  htmlFileP << "<title> Remote Monitoring Tool </title>" << std::endl;
22470  htmlFileP << "<style type=\"text/css\">" << std::endl;
22471  htmlFileP << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22472  << std::endl;
22473  htmlFileP << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22474  htmlFileP << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22475  "text-align: center;}"
22476  << std::endl;
22477  htmlFileP << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22478  htmlFileP << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22479  htmlFileP << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22480  htmlFileP << "</style>" << std::endl;
22481  htmlFileP << "<body>" << std::endl;
22482 
22483  if (sub == 1)
22484  htmlFileP << "<h1> Pedestals for HB, RUN = " << runnumber << " </h1>" << std::endl;
22485  if (sub == 2)
22486  htmlFileP << "<h1> Pedestals for HE, RUN = " << runnumber << " </h1>" << std::endl;
22487  if (sub == 3)
22488  htmlFileP << "<h1> Pedestals for HO, RUN = " << runnumber << " </h1>" << std::endl;
22489  if (sub == 4)
22490  htmlFileP << "<h1> Pedestals for HF, RUN = " << runnumber << " </h1>" << std::endl;
22491  htmlFileP << "<br>" << std::endl;
22492 
22493  // Pedestal:
22494  htmlFileP << "<h2> 1.Pm criterion: Pedestals for each CapID .</h3>" << std::endl;
22495  htmlFileP << "<h3> 1.A. Pedestal distribution over all events, channels for each CapID and all depths.</h3>"
22496  << std::endl;
22497  htmlFileP << "<h4> Legend: Bins less " << Pedest[0][sub] << " correpond to bad Pedestals </h4>" << std::endl;
22498  if (sub == 1)
22499  htmlFileP << " <img src=\"HistPedestalsHB.png\" />" << std::endl;
22500  if (sub == 2)
22501  htmlFileP << " <img src=\"HistPedestalsHE.png\" />" << std::endl;
22502  if (sub == 3)
22503  htmlFileP << " <img src=\"HistPedestalsHO.png\" />" << std::endl;
22504  if (sub == 4)
22505  htmlFileP << " <img src=\"HistPedestalsHF.png\" />" << std::endl;
22506  htmlFileP << "<br>" << std::endl;
22507  htmlFileP << "<h3> 1.B. Rate of channels at very low Pedestals at least in one CapID for each depth.</h3>"
22508  << std::endl;
22509  htmlFileP << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22510  if (sub == 1)
22511  htmlFileP << " <img src=\"MapRatePedHB.png\" />" << std::endl;
22512  if (sub == 2)
22513  htmlFileP << " <img src=\"MapRatePedHE.png\" />" << std::endl;
22514  if (sub == 3)
22515  htmlFileP << " <img src=\"MapRatePedHO.png\" />" << std::endl;
22516  if (sub == 4)
22517  htmlFileP << " <img src=\"MapRatePedHF.png\" />" << std::endl;
22518 
22519  // PedestalWidth:
22520  htmlFileP << "<h2> 2.pWm criterion: Pedestal Widths for each CapID .</h3>" << std::endl;
22521  htmlFileP << "<h3> 2.A. Pedestal Widths distribution over all events, channels for each CapID and all depths.</h3>"
22522  << std::endl;
22523  htmlFileP << "<h4> Legend: Bins less " << Pedest[1][sub] << " correpond to bad Pedestal Widths </h4>" << std::endl;
22524  if (sub == 1)
22525  htmlFileP << " <img src=\"HistPedestalWidthsHB.png\" />" << std::endl;
22526  if (sub == 2)
22527  htmlFileP << " <img src=\"HistPedestalWidthsHE.png\" />" << std::endl;
22528  if (sub == 3)
22529  htmlFileP << " <img src=\"HistPedestalWidthsHO.png\" />" << std::endl;
22530  if (sub == 4)
22531  htmlFileP << " <img src=\"HistPedestalWidthsHF.png\" />" << std::endl;
22532  htmlFileP << "<br>" << std::endl;
22533  htmlFileP << "<h3> 2.B. Rate of channels at very low Pedestal Widths at least in one CapID for each depth.</h3>"
22534  << std::endl;
22535  htmlFileP << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22536  if (sub == 1)
22537  htmlFileP << " <img src=\"MapRatePedWidthsHB.png\" />" << std::endl;
22538  if (sub == 2)
22539  htmlFileP << " <img src=\"MapRatePedWidthsHE.png\" />" << std::endl;
22540  if (sub == 3)
22541  htmlFileP << " <img src=\"MapRatePedWidthsHO.png\" />" << std::endl;
22542  if (sub == 4)
22543  htmlFileP << " <img src=\"MapRatePedWidthsHF.png\" />" << std::endl;
22544 
22545  // Correlations of Pedestal(Width) and fullAmplitude:
22546  htmlFileP << "<h2> 3.Pedestal and pedestalWidths vs Amplitude .</h3>" << std::endl;
22547  htmlFileP << "<h3> 3.A. Correlation of Pedestal(pedestalWidths) and Amplitude over all channels and events .</h3>"
22548  << std::endl;
22549  htmlFileP << "<h4> Legend: colour - entries </h4>" << std::endl;
22550  if (sub == 1)
22551  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHB.png\" />" << std::endl;
22552  if (sub == 2)
22553  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHE.png\" />" << std::endl;
22554  if (sub == 3)
22555  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHO.png\" />" << std::endl;
22556  if (sub == 4)
22557  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHF.png\" />" << std::endl;
22558  htmlFileP << "<br>" << std::endl;
22559  htmlFileP.close();
22560 
22561  // TSs Shapes:
22562 
22563  htmlFileS << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22564  htmlFileS << "<head>" << std::endl;
22565  htmlFileS << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22566  htmlFileS << "<title> Remote Monitoring Tool </title>" << std::endl;
22567  htmlFileS << "<style type=\"text/css\">" << std::endl;
22568  htmlFileS << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22569  << std::endl;
22570  htmlFileS << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22571  htmlFileS << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22572  "text-align: center;}"
22573  << std::endl;
22574  htmlFileS << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22575  htmlFileS << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22576  htmlFileS << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22577  htmlFileS << "</style>" << std::endl;
22578  htmlFileS << "<body>" << std::endl;
22579 
22580  if (sub == 1)
22581  htmlFileS << "<h1> ADC Shape for HB, RUN = " << runnumber << " </h1>" << std::endl;
22582  if (sub == 2)
22583  htmlFileS << "<h1> ADC Shape for HE, RUN = " << runnumber << " </h1>" << std::endl;
22584  if (sub == 3)
22585  htmlFileS << "<h1> ADC Shape for HO, RUN = " << runnumber << " </h1>" << std::endl;
22586  if (sub == 4)
22587  htmlFileS << "<h1> ADC Shape for HF, RUN = " << runnumber << " </h1>" << std::endl;
22588  htmlFileS << "<br>" << std::endl;
22589 
22590  htmlFileS << "<h2> 1.Mean ADC Shape.</h3>" << std::endl;
22591  htmlFileS << "<h3> 1.A. ADC shape averaged over all good channels, depth and events.</h3>" << std::endl;
22592  // htmlFileS << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22593  if (sub == 1)
22594  htmlFileS << " <img src=\"HistGoodTSshapesHB.png\" />" << std::endl;
22595  if (sub == 2)
22596  htmlFileS << " <img src=\"HistGoodTSshapesHE.png\" />" << std::endl;
22597  if (sub == 3)
22598  htmlFileS << " <img src=\"HistGoodTSshapesHO.png\" />" << std::endl;
22599  if (sub == 4)
22600  htmlFileS << " <img src=\"HistGoodTSshapesHF.png\" />" << std::endl;
22601  htmlFileS << "<br>" << std::endl;
22602  htmlFileS << "<h3> 1.B. ADC shape averaged over all bad channels, depth and events. Bad channels are selected by 5 "
22603  "criteria: CapId, A, W, P, Pw </h3>"
22604  << std::endl;
22605  // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22606  if (sub == 1)
22607  htmlFileS << " <img src=\"HistBadTSshapesHB.png\" />" << std::endl;
22608  if (sub == 2)
22609  htmlFileS << " <img src=\"HistBadTSshapesHE.png\" />" << std::endl;
22610  if (sub == 3)
22611  htmlFileS << " <img src=\"HistBadTSshapesHO.png\" />" << std::endl;
22612  if (sub == 4)
22613  htmlFileS << " <img src=\"HistBadTSshapesHF.png\" />" << std::endl;
22614 
22615  htmlFileS << "<h2> 2. Occupancy and rates of non-zero amplitudes for separate TSs in Sub-Detector over "
22616  "depth,eta.phi </h3>"
22617  << std::endl;
22618  htmlFileS << "<h3> 2.A. reminder:.......................... for HBHE, TS=2;...................................... "
22619  "for HF, TS=1;..................................... for HO, TS=0,1,2 </h3>"
22620  << std::endl;
22621  if (sub == 1)
22622  htmlFileS << " <img src=\"Hist_mapDepthAllTS2_HB.png\" />" << std::endl;
22623  if (sub == 2)
22624  htmlFileS << " <img src=\"Hist_mapDepthAllTS2_HE.png\" />" << std::endl;
22625  if (sub == 3)
22626  htmlFileS << " <img src=\"Hist_mapDepthAllTS012_HO.png\" />" << std::endl;
22627  if (sub == 4)
22628  htmlFileS << " <img src=\"Hist_mapDepthAllTS1_HF.png\" />" << std::endl;
22629  htmlFileS << "<br>" << std::endl;
22630 
22631  /*
22632  htmlFileS << "<h2> 2. ADC in Time Slice </h3>"<< std::endl;
22633  htmlFileS << "<h3> 2.A. ADC counts histogrammed over all channels, depth and events.</h3>"<< std::endl;
22634 // htmlFileS << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22635  if (sub==1) htmlFileS << " <img src=\"Hist_ADC_HB_All.png\" />" << std::endl;
22636  if (sub==2) htmlFileS << " <img src=\"Hist_ADC_HE_All.png\" />" << std::endl;
22637  if (sub==3) htmlFileS << " <img src=\"Hist_ADC_HO_All.png\" />" << std::endl;
22638  if (sub==4) htmlFileS << " <img src=\"Hist_ADC_HF_All.png\" />" << std::endl;
22639  htmlFileS << "<br>"<< std::endl;
22640  htmlFileS << "<h3> 2.B. ADC counts histogrammed over all channels and events for each depth separately. </h3>"<< std::endl;
22641 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22642  if (sub==1) htmlFileS << " <img src=\"Hist_ADC_HB_DS.png\" />" << std::endl;
22643  if (sub==2) htmlFileS << " <img src=\"Hist_ADC_HE_DS.png\" />" << std::endl;
22644  if (sub==3) htmlFileS << " <img src=\"Hist_ADC_HO_DS.png\" />" << std::endl;
22645  if (sub==4) htmlFileS << " <img src=\"Hist_ADC_HF_DS.png\" />" << std::endl;
22646 
22647  htmlFileS << "<h2> 3. ADC Sum in Time Slice </h3>"<< std::endl;
22648  htmlFileS << "<h3> 3.A. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"<< std::endl;
22649 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22650  if (sub==1) htmlFileS << " <img src=\"Hist_SumADC_HB.png\" />" << std::endl;
22651  if (sub==2) htmlFileS << " <img src=\"Hist_SumADC_HE.png\" />" << std::endl;
22652  if (sub==3) htmlFileS << " <img src=\"Hist_SumADC_HO.png\" />" << std::endl;
22653  if (sub==4) htmlFileS << " <img src=\"Hist_SumADC_HF.png\" />" << std::endl;
22654 
22655  htmlFileS << "<h3> 3.B. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"<< std::endl;
22656 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22657  if (sub==1) htmlFileS << " <img src=\"Hist_SumADC_HB0.png\" />" << std::endl;
22658  if (sub==2) htmlFileS << " <img src=\"Hist_SumADC_HE0.png\" />" << std::endl;
22659  if (sub==3) htmlFileS << " <img src=\"Hist_SumADC_HO0.png\" />" << std::endl;
22660  if (sub==4) htmlFileS << " <img src=\"Hist_SumADC_HF0.png\" />" << std::endl;
22661 
22662  htmlFileS << "<h3> 3.C. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"<< std::endl;
22663 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22664  if (sub==1) htmlFileS << " <img src=\"Hist_SumADC_HB1.png\" />" << std::endl;
22665  if (sub==2) htmlFileS << " <img src=\"Hist_SumADC_HE1.png\" />" << std::endl;
22666  if (sub==3) htmlFileS << " <img src=\"Hist_SumADC_HO1.png\" />" << std::endl;
22667  if (sub==4) htmlFileS << " <img src=\"Hist_SumADC_HF1.png\" />" << std::endl;
22668 */
22669  htmlFileS.close();
22670 
22672 
22674 
22676 
22677  htmlFileM << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22678  htmlFileM << "<head>" << std::endl;
22679  htmlFileM << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22680  htmlFileM << "<title> Remote Monitoring Tool </title>" << std::endl;
22681  htmlFileM << "<style type=\"text/css\">" << std::endl;
22682  htmlFileM << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22683  << std::endl;
22684  htmlFileM << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22685  htmlFileM << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22686  "text-align: center;}"
22687  << std::endl;
22688  htmlFileM << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22689  htmlFileM << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22690  htmlFileM << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22691  htmlFileM << "</style>" << std::endl;
22692  htmlFileM << "<body>" << std::endl;
22693 
22695 
22696  if (sub == 1)
22697  htmlFileM << "<h1> Digis Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>" << std::endl;
22698  if (sub == 2)
22699  htmlFileM << "<h1> Digis Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>" << std::endl;
22700  if (sub == 4)
22701  htmlFileM << "<h1> Digis Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>" << std::endl;
22702  htmlFileM << "<br>" << std::endl;
22703 
22704  htmlFileM << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
22705  htmlFileM << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
22706  // htmlFileM << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22707  if (sub == 1)
22708  htmlFileM << " <img src=\"RdigiGeneralD2PhiSymmetryHB.png\" />" << std::endl;
22709  if (sub == 2)
22710  htmlFileM << " <img src=\"RdigiGeneralD2PhiSymmetryHE.png\" />" << std::endl;
22711  if (sub == 4)
22712  htmlFileM << " <img src=\"RdigiGeneralD2PhiSymmetryHF.png\" />" << std::endl;
22713  htmlFileM << "<br>" << std::endl;
22714 
22715  htmlFileM << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
22716  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22717  if (sub == 1)
22718  htmlFileM << " <img src=\"RdigiGeneralD1PhiSymmetryHB.png\" />" << std::endl;
22719  if (sub == 2)
22720  htmlFileM << " <img src=\"RdigiGeneralD1PhiSymmetryHE.png\" />" << std::endl;
22721  if (sub == 4)
22722  htmlFileM << " <img src=\"RdigiGeneralD1PhiSymmetryHF.png\" />" << std::endl;
22723  htmlFileM << "<br>" << std::endl;
22724 
22726 
22728  htmlFileM << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
22729  htmlFileM << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
22730  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22731  if (sub == 1)
22732  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22733  if (sub == 2)
22734  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22735  if (sub == 4)
22736  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22737  htmlFileM << "<br>" << std::endl;
22738 
22739  htmlFileM << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
22740  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22741  if (sub == 1)
22742  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22743  if (sub == 2)
22744  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22745  if (sub == 4)
22746  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22747  htmlFileM << "<br>" << std::endl;
22748 
22749  htmlFileM << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
22750  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22751  if (sub == 1)
22752  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22753  if (sub == 2)
22754  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22755  if (sub == 4)
22756  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22757  htmlFileM << "<br>" << std::endl;
22758 
22759  htmlFileM << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
22760  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22761  if (sub == 1)
22762  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22763  if (sub == 2)
22764  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22765  if (sub == 4)
22766  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22767  htmlFileM << "<br>" << std::endl;
22768 
22769  if (sub == 2)
22770  htmlFileM << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
22771  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22772  if (sub == 2)
22773  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22774  htmlFileM << "<br>" << std::endl;
22775 
22776  if (sub == 2)
22777  htmlFileM << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
22778  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22779  if (sub == 2)
22780  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22781  htmlFileM << "<br>" << std::endl;
22782 
22783  if (sub == 2)
22784  htmlFileM << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
22785  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22786  if (sub == 2)
22787  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22788  htmlFileM << "<br>" << std::endl;
22789 
22791  htmlFileM << "<h2> 2: D(digivarianceSignalhe) </h3>" << std::endl;
22792  htmlFileM << "<h3> 2A: eta/phi-plot: D(digivarianceSignalhe), averaged over depthes </h3>" << std::endl;
22793  // htmlFileM << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22794  if (sub == 1)
22795  htmlFileM << " <img src=\"DdigiGeneralD2PhiSymmetryHB.png\" />" << std::endl;
22796  if (sub == 2)
22797  htmlFileM << " <img src=\"DdigiGeneralD2PhiSymmetryHE.png\" />" << std::endl;
22798  if (sub == 4)
22799  htmlFileM << " <img src=\"DdigiGeneralD2PhiSymmetryHF.png\" />" << std::endl;
22800  htmlFileM << "<br>" << std::endl;
22801 
22802  htmlFileM << "<h3> 2B: D(digivarianceSignalhe) vs phi , averaged over depthes & eta </h3>" << std::endl;
22803  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22804  if (sub == 1)
22805  htmlFileM << " <img src=\"DdigiGeneralD1PhiSymmetryHB.png\" />" << std::endl;
22806  if (sub == 2)
22807  htmlFileM << " <img src=\"DdigiGeneralD1PhiSymmetryHE.png\" />" << std::endl;
22808  if (sub == 4)
22809  htmlFileM << " <img src=\"DdigiGeneralD1PhiSymmetryHF.png\" />" << std::endl;
22810  htmlFileM << "<br>" << std::endl;
22811 
22814  htmlFileM << "<h2> Positive direction, D(digivarianceSignalhe) </h3>" << std::endl;
22815  htmlFileM << "<h3> 2C: D(digivarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
22816  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22817  if (sub == 1)
22818  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22819  if (sub == 2)
22820  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22821  if (sub == 4)
22822  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22823  htmlFileM << "<br>" << std::endl;
22824 
22825  htmlFileM << "<h3> 2.D. D(digivarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
22826  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22827  if (sub == 1)
22828  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22829  if (sub == 2)
22830  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22831  if (sub == 4)
22832  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22833  htmlFileM << "<br>" << std::endl;
22834 
22835  htmlFileM << "<h3> 2E: D(digivarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
22836  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22837  if (sub == 1)
22838  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22839  if (sub == 2)
22840  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22841  if (sub == 4)
22842  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22843  htmlFileM << "<br>" << std::endl;
22844 
22845  htmlFileM << "<h3> 2F: D(digivarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
22846  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22847  if (sub == 1)
22848  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22849  if (sub == 2)
22850  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22851  if (sub == 4)
22852  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22853  htmlFileM << "<br>" << std::endl;
22854 
22855  if (sub == 2)
22856  htmlFileM << "<h3> 2G: D(digivarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
22857  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22858  if (sub == 2)
22859  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22860  htmlFileM << "<br>" << std::endl;
22861 
22862  if (sub == 2)
22863  htmlFileM << "<h3> 2H: D(digivarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
22864  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22865  if (sub == 2)
22866  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22867  htmlFileM << "<br>" << std::endl;
22868 
22869  if (sub == 2)
22870  htmlFileM << "<h3> 2I: D(digivarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
22871  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22872  if (sub == 2)
22873  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22874  htmlFileM << "<br>" << std::endl;
22875 
22878  htmlFileM << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
22879  << std::endl;
22880 
22882  htmlFileM << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
22883  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22884  if (sub == 1)
22885  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22886  if (sub == 2)
22887  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22888  if (sub == 4)
22889  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22890  htmlFileM << "<br>" << std::endl;
22891 
22892  htmlFileM << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
22893  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22894  if (sub == 1)
22895  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22896  if (sub == 2)
22897  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22898  if (sub == 4)
22899  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22900  htmlFileM << "<br>" << std::endl;
22901 
22902  htmlFileM << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
22903  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22904  if (sub == 1)
22905  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22906  if (sub == 2)
22907  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22908  if (sub == 4)
22909  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22910  htmlFileM << "<br>" << std::endl;
22911 
22912  htmlFileM << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
22913  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22914  if (sub == 1)
22915  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22916  if (sub == 2)
22917  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22918  if (sub == 4)
22919  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22920  htmlFileM << "<br>" << std::endl;
22921 
22922  if (sub == 2)
22923  htmlFileM << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
22924  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22925  if (sub == 2)
22926  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22927  htmlFileM << "<br>" << std::endl;
22928 
22929  if (sub == 2)
22930  htmlFileM << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
22931  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22932  if (sub == 2)
22933  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22934  htmlFileM << "<br>" << std::endl;
22935 
22936  if (sub == 2)
22937  htmlFileM << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
22938  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22939  if (sub == 2)
22940  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22941  htmlFileM << "<br>" << std::endl;
22942 
22944  htmlFileM << "<h2> 4: Negative direction, D(digivarianceSignalhe) </h3>" << std::endl;
22946  htmlFileM << "<h3> 4C: D(digivarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
22947  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22948  if (sub == 1)
22949  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22950  if (sub == 2)
22951  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22952  if (sub == 4)
22953  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22954  htmlFileM << "<br>" << std::endl;
22955 
22956  htmlFileM << "<h3> 4.D. D(digivarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
22957  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22958  if (sub == 1)
22959  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22960  if (sub == 2)
22961  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22962  if (sub == 4)
22963  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22964  htmlFileM << "<br>" << std::endl;
22965 
22966  htmlFileM << "<h3> 4E: D(digivarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
22967  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22968  if (sub == 1)
22969  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22970  if (sub == 2)
22971  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22972  if (sub == 4)
22973  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22974  htmlFileM << "<br>" << std::endl;
22975 
22976  htmlFileM << "<h3> 4F: D(digivarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
22977  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22978  if (sub == 1)
22979  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22980  if (sub == 2)
22981  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22982  if (sub == 4)
22983  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22984  htmlFileM << "<br>" << std::endl;
22985 
22986  if (sub == 2)
22987  htmlFileM << "<h3> 4G: D(digivarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
22988  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22989  if (sub == 2)
22990  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22991  htmlFileM << "<br>" << std::endl;
22992 
22993  if (sub == 2)
22994  htmlFileM << "<h3> 4H: D(digivarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
22995  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22996  if (sub == 2)
22997  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22998  htmlFileM << "<br>" << std::endl;
22999 
23000  if (sub == 2)
23001  htmlFileM << "<h3> 4I: D(digivarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
23002  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23003  if (sub == 2)
23004  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23005  htmlFileM << "<br>" << std::endl;
23007  htmlFileM.close();
23009  //
23013 
23014  htmlFileR << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
23015  htmlFileR << "<head>" << std::endl;
23016  htmlFileR << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
23017  htmlFileR << "<title> Remote Monitoring Tool </title>" << std::endl;
23018  htmlFileR << "<style type=\"text/css\">" << std::endl;
23019  htmlFileR << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
23020  << std::endl;
23021  htmlFileR << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
23022  htmlFileR << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
23023  "text-align: center;}"
23024  << std::endl;
23025  htmlFileR << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
23026  htmlFileR << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
23027  htmlFileR << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
23028  htmlFileR << "</style>" << std::endl;
23029  htmlFileR << "<body>" << std::endl;
23030 
23032 
23033  if (sub == 1)
23034  htmlFileR << "<h1> RecoSignal Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>"
23035  << std::endl;
23036  if (sub == 2)
23037  htmlFileR << "<h1> RecoSignal Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>"
23038  << std::endl;
23039  if (sub == 4)
23040  htmlFileR << "<h1> RecoSignal Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>"
23041  << std::endl;
23042  htmlFileR << "<br>" << std::endl;
23043 
23044  htmlFileR << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
23045  htmlFileR << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
23046  // htmlFileR << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23047  if (sub == 1)
23048  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23049  if (sub == 2)
23050  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23051  if (sub == 4)
23052  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23053  htmlFileR << "<br>" << std::endl;
23054 
23055  htmlFileR << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
23056  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23057  if (sub == 1)
23058  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23059  if (sub == 2)
23060  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23061  if (sub == 4)
23062  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23063  htmlFileR << "<br>" << std::endl;
23064 
23066 
23068  htmlFileR << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
23069  htmlFileR << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
23070  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23071  if (sub == 1)
23072  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23073  if (sub == 2)
23074  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23075  if (sub == 4)
23076  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23077  htmlFileR << "<br>" << std::endl;
23078 
23079  htmlFileR << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
23080  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23081  if (sub == 1)
23082  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23083  if (sub == 2)
23084  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23085  if (sub == 4)
23086  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23087  htmlFileR << "<br>" << std::endl;
23088 
23089  if (sub == 1 || sub == 2)
23090  htmlFileR << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
23091  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23092  if (sub == 1)
23093  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23094  if (sub == 2)
23095  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23096  htmlFileR << "<br>" << std::endl;
23097 
23098  if (sub == 1 || sub == 2)
23099  htmlFileR << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
23100  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23101  if (sub == 1)
23102  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23103  if (sub == 2)
23104  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23105  htmlFileR << "<br>" << std::endl;
23106 
23107  if (sub == 2)
23108  htmlFileR << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
23109  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23110  if (sub == 2)
23111  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23112  htmlFileR << "<br>" << std::endl;
23113 
23114  if (sub == 2)
23115  htmlFileR << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
23116  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23117  if (sub == 2)
23118  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23119  htmlFileR << "<br>" << std::endl;
23120 
23121  if (sub == 2)
23122  htmlFileR << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
23123  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23124  if (sub == 2)
23125  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23126  htmlFileR << "<br>" << std::endl;
23127 
23129  htmlFileR << "<h2> 2: D(recosignalvarianceSignalhe) </h3>" << std::endl;
23130  htmlFileR << "<h3> 2A: eta/phi-plot: D(recosignalvarianceSignalhe), averaged over depthes </h3>" << std::endl;
23131  // htmlFileR << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23132  if (sub == 1)
23133  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23134  if (sub == 2)
23135  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23136  if (sub == 4)
23137  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23138  htmlFileR << "<br>" << std::endl;
23139 
23140  htmlFileR << "<h3> 2B: D(recosignalvarianceSignalhe) vs phi , averaged over depthes & eta </h3>" << std::endl;
23141  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23142  if (sub == 1)
23143  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23144  if (sub == 2)
23145  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23146  if (sub == 4)
23147  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23148  htmlFileR << "<br>" << std::endl;
23149 
23152  htmlFileR << "<h2> Positive direction, D(recosignalvarianceSignalhe) </h3>" << std::endl;
23153  htmlFileR << "<h3> 2C: D(recosignalvarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
23154  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23155  if (sub == 1)
23156  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23157  if (sub == 2)
23158  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23159  if (sub == 4)
23160  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23161  htmlFileR << "<br>" << std::endl;
23162 
23163  htmlFileR << "<h3> 2.D. D(recosignalvarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
23164  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23165  if (sub == 1)
23166  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23167  if (sub == 2)
23168  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23169  if (sub == 4)
23170  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23171  htmlFileR << "<br>" << std::endl;
23172 
23173  if (sub == 1 || sub == 2)
23174  htmlFileR << "<h3> 2E: D(recosignalvarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
23175  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23176  if (sub == 1)
23177  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23178  if (sub == 2)
23179  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23180  htmlFileR << "<br>" << std::endl;
23181 
23182  if (sub == 1 || sub == 2)
23183  htmlFileR << "<h3> 2F: D(recosignalvarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
23184  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23185  if (sub == 1)
23186  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23187  if (sub == 2)
23188  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23189  htmlFileR << "<br>" << std::endl;
23190 
23191  if (sub == 2)
23192  htmlFileR << "<h3> 2G: D(recosignalvarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
23193  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23194  if (sub == 2)
23195  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23196  htmlFileR << "<br>" << std::endl;
23197 
23198  if (sub == 2)
23199  htmlFileR << "<h3> 2H: D(recosignalvarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
23200  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23201  if (sub == 2)
23202  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23203  htmlFileR << "<br>" << std::endl;
23204 
23205  if (sub == 2)
23206  htmlFileR << "<h3> 2I: D(recosignalvarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
23207  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23208  if (sub == 2)
23209  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23210  htmlFileR << "<br>" << std::endl;
23211 
23214  htmlFileR << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
23215  << std::endl;
23216 
23218  htmlFileR << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
23219  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23220  if (sub == 1)
23221  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23222  if (sub == 2)
23223  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23224  if (sub == 4)
23225  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23226  htmlFileR << "<br>" << std::endl;
23227 
23228  htmlFileR << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
23229  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23230  if (sub == 1)
23231  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23232  if (sub == 2)
23233  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23234  if (sub == 4)
23235  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23236  htmlFileR << "<br>" << std::endl;
23237 
23238  if (sub == 1 || sub == 2)
23239  htmlFileR << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
23240  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23241  if (sub == 1)
23242  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23243  if (sub == 2)
23244  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23245  htmlFileR << "<br>" << std::endl;
23246 
23247  if (sub == 1 || sub == 2)
23248  htmlFileR << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
23249  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23250  if (sub == 1)
23251  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23252  if (sub == 2)
23253  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23254  htmlFileR << "<br>" << std::endl;
23255 
23256  if (sub == 2)
23257  htmlFileR << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
23258  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23259  if (sub == 2)
23260  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23261  htmlFileR << "<br>" << std::endl;
23262 
23263  if (sub == 2)
23264  htmlFileR << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
23265  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23266  if (sub == 2)
23267  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23268  htmlFileR << "<br>" << std::endl;
23269 
23270  if (sub == 2)
23271  htmlFileR << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
23272  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23273  if (sub == 2)
23274  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23275  htmlFileR << "<br>" << std::endl;
23276 
23278  htmlFileR << "<h2> 4: Negative direction, D(recosignalvarianceSignalhe) </h3>" << std::endl;
23280  htmlFileR << "<h3> 4C: D(recosignalvarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
23281  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23282  if (sub == 1)
23283  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23284  if (sub == 2)
23285  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23286  if (sub == 4)
23287  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23288  htmlFileR << "<br>" << std::endl;
23289 
23290  htmlFileR << "<h3> 4.D. D(recosignalvarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
23291  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23292  if (sub == 1)
23293  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23294  if (sub == 2)
23295  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23296  if (sub == 4)
23297  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23298  htmlFileR << "<br>" << std::endl;
23299 
23300  if (sub == 1 || sub == 2)
23301  htmlFileR << "<h3> 4E: D(recosignalvarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
23302  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23303  if (sub == 1)
23304  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23305  if (sub == 2)
23306  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23307  htmlFileR << "<br>" << std::endl;
23308 
23309  if (sub == 1 || sub == 2)
23310  htmlFileR << "<h3> 4F: D(recosignalvarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
23311  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23312  if (sub == 1)
23313  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23314  if (sub == 2)
23315  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23316  htmlFileR << "<br>" << std::endl;
23317 
23318  if (sub == 2)
23319  htmlFileR << "<h3> 4G: D(recosignalvarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
23320  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23321  if (sub == 2)
23322  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23323  htmlFileR << "<br>" << std::endl;
23324 
23325  if (sub == 2)
23326  htmlFileR << "<h3> 4H: D(recosignalvarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
23327  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23328  if (sub == 2)
23329  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23330  htmlFileR << "<br>" << std::endl;
23331 
23332  if (sub == 2)
23333  htmlFileR << "<h3> 4I: D(recosignalvarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
23334  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23335  if (sub == 2)
23336  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23337  htmlFileR << "<br>" << std::endl;
23339  htmlFileR.close();
23341  //
23345 
23346  htmlFileN << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
23347  htmlFileN << "<head>" << std::endl;
23348  htmlFileN << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
23349  htmlFileN << "<title> Remote Monitoring Tool </title>" << std::endl;
23350  htmlFileN << "<style type=\"text/css\">" << std::endl;
23351  htmlFileN << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
23352  << std::endl;
23353  htmlFileN << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
23354  htmlFileN << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
23355  "text-align: center;}"
23356  << std::endl;
23357  htmlFileN << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
23358  htmlFileN << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
23359  htmlFileN << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
23360  htmlFileN << "</style>" << std::endl;
23361  htmlFileN << "<body>" << std::endl;
23362 
23364 
23365  if (sub == 1)
23366  htmlFileN << "<h1> RecoNoise Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>"
23367  << std::endl;
23368  if (sub == 2)
23369  htmlFileN << "<h1> RecoNoise Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>"
23370  << std::endl;
23371  if (sub == 4)
23372  htmlFileN << "<h1> RecoNoise Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>"
23373  << std::endl;
23374  htmlFileN << "<br>" << std::endl;
23375 
23376  htmlFileN << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
23377  htmlFileN << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
23378  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23379  if (sub == 1)
23380  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23381  if (sub == 2)
23382  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23383  if (sub == 4)
23384  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23385  htmlFileN << "<br>" << std::endl;
23386 
23387  htmlFileN << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
23388  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23389  if (sub == 1)
23390  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23391  if (sub == 2)
23392  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23393  if (sub == 4)
23394  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23395  htmlFileN << "<br>" << std::endl;
23396 
23398 
23400  htmlFileN << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
23401  htmlFileN << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
23402  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23403  if (sub == 1)
23404  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23405  if (sub == 2)
23406  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23407  if (sub == 4)
23408  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23409  htmlFileN << "<br>" << std::endl;
23410 
23411  htmlFileN << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
23412  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23413  if (sub == 1)
23414  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23415  if (sub == 2)
23416  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23417  if (sub == 4)
23418  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23419  htmlFileN << "<br>" << std::endl;
23420 
23421  if (sub == 1 || sub == 2)
23422  htmlFileN << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
23423  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23424  if (sub == 1)
23425  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23426  if (sub == 2)
23427  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23428  htmlFileN << "<br>" << std::endl;
23429 
23430  if (sub == 1 || sub == 2)
23431  htmlFileN << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
23432  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23433  if (sub == 1)
23434  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23435  if (sub == 2)
23436  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23437  htmlFileN << "<br>" << std::endl;
23438 
23439  if (sub == 2)
23440  htmlFileN << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
23441  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23442  if (sub == 2)
23443  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23444  htmlFileN << "<br>" << std::endl;
23445 
23446  if (sub == 2)
23447  htmlFileN << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
23448  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23449  if (sub == 2)
23450  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23451  htmlFileN << "<br>" << std::endl;
23452 
23453  if (sub == 2)
23454  htmlFileN << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
23455  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23456  if (sub == 2)
23457  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23458  htmlFileN << "<br>" << std::endl;
23459 
23461  htmlFileN << "<h2> 2: D(reconoisevarianceNoisehe) </h3>" << std::endl;
23462  htmlFileN << "<h3> 2A: eta/phi-plot: D(reconoisevarianceNoisehe), averaged over depthes </h3>" << std::endl;
23463  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23464  if (sub == 1)
23465  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23466  if (sub == 2)
23467  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23468  if (sub == 4)
23469  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23470  htmlFileN << "<br>" << std::endl;
23471 
23472  htmlFileN << "<h3> 2B: D(reconoisevarianceNoisehe) vs phi , averaged over depthes & eta </h3>" << std::endl;
23473  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23474  if (sub == 1)
23475  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23476  if (sub == 2)
23477  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23478  if (sub == 4)
23479  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23480  htmlFileN << "<br>" << std::endl;
23481 
23484  htmlFileN << "<h2> Positive direction, D(reconoisevarianceNoisehe) </h3>" << std::endl;
23485  htmlFileN << "<h3> 2C: D(reconoisevarianceNoisehe) vs phi , different eta, Depth1 </h3>" << std::endl;
23486  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23487  if (sub == 1)
23488  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23489  if (sub == 2)
23490  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23491  if (sub == 4)
23492  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23493  htmlFileN << "<br>" << std::endl;
23494 
23495  htmlFileN << "<h3> 2.D. D(reconoisevarianceNoisehe) vs phi , different eta, Depth2 </h3>" << std::endl;
23496  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23497  if (sub == 1)
23498  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23499  if (sub == 2)
23500  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23501  if (sub == 4)
23502  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23503  htmlFileN << "<br>" << std::endl;
23504 
23505  if (sub == 1 || sub == 2)
23506  htmlFileN << "<h3> 2E: D(reconoisevarianceNoisehe) vs phi , different eta, Depth3 </h3>" << std::endl;
23507  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23508  if (sub == 1)
23509  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23510  if (sub == 2)
23511  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23512  htmlFileN << "<br>" << std::endl;
23513 
23514  if (sub == 1 || sub == 2)
23515  htmlFileN << "<h3> 2F: D(reconoisevarianceNoisehe) vs phi , different eta, Depth4 </h3>" << std::endl;
23516  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23517  if (sub == 1)
23518  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23519  if (sub == 2)
23520  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23521  htmlFileN << "<br>" << std::endl;
23522 
23523  if (sub == 2)
23524  htmlFileN << "<h3> 2G: D(reconoisevarianceNoisehe) vs phi , different eta, Depth5 </h3>" << std::endl;
23525  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23526  if (sub == 2)
23527  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23528  htmlFileN << "<br>" << std::endl;
23529 
23530  if (sub == 2)
23531  htmlFileN << "<h3> 2H: D(reconoisevarianceNoisehe) vs phi , different eta, Depth6 </h3>" << std::endl;
23532  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23533  if (sub == 2)
23534  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23535  htmlFileN << "<br>" << std::endl;
23536 
23537  if (sub == 2)
23538  htmlFileN << "<h3> 2I: D(reconoisevarianceNoisehe) vs phi , different eta, Depth7 </h3>" << std::endl;
23539  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23540  if (sub == 2)
23541  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23542  htmlFileN << "<br>" << std::endl;
23543 
23546  htmlFileN << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
23547  << std::endl;
23548 
23550  htmlFileN << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
23551  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23552  if (sub == 1)
23553  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23554  if (sub == 2)
23555  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23556  if (sub == 4)
23557  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23558  htmlFileN << "<br>" << std::endl;
23559 
23560  htmlFileN << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
23561  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23562  if (sub == 1)
23563  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23564  if (sub == 2)
23565  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23566  if (sub == 4)
23567  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23568  htmlFileN << "<br>" << std::endl;
23569 
23570  if (sub == 1 || sub == 2)
23571  htmlFileN << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
23572  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23573  if (sub == 1)
23574  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23575  if (sub == 2)
23576  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23577  htmlFileN << "<br>" << std::endl;
23578 
23579  if (sub == 1 || sub == 2)
23580  htmlFileN << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
23581  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23582  if (sub == 1)
23583  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23584  if (sub == 2)
23585  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23586  htmlFileN << "<br>" << std::endl;
23587 
23588  if (sub == 2)
23589  htmlFileN << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
23590  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23591  if (sub == 2)
23592  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23593  htmlFileN << "<br>" << std::endl;
23594 
23595  if (sub == 2)
23596  htmlFileN << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
23597  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23598  if (sub == 2)
23599  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23600  htmlFileN << "<br>" << std::endl;
23601 
23602  if (sub == 2)
23603  htmlFileN << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
23604  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23605  if (sub == 2)
23606  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23607  htmlFileN << "<br>" << std::endl;
23608 
23610  htmlFileN << "<h2> 4: Negative direction, D(reconoisevarianceNoisehe) </h3>" << std::endl;
23612  htmlFileN << "<h3> 4C: D(reconoisevarianceNoisehe) vs phi , different eta, Depth1 </h3>" << std::endl;
23613  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23614  if (sub == 1)
23615  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23616  if (sub == 2)
23617  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23618  if (sub == 4)
23619  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23620  htmlFileN << "<br>" << std::endl;
23621 
23622  htmlFileN << "<h3> 4.D. D(reconoisevarianceNoisehe) vs phi , different eta, Depth2 </h3>" << std::endl;
23623  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23624  if (sub == 1)
23625  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23626  if (sub == 2)
23627  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23628  if (sub == 4)
23629  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23630  htmlFileN << "<br>" << std::endl;
23631 
23632  if (sub == 1 || sub == 2)
23633  htmlFileN << "<h3> 4E: D(reconoisevarianceNoisehe) vs phi , different eta, Depth3 </h3>" << std::endl;
23634  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23635  if (sub == 1)
23636  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23637  if (sub == 2)
23638  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23639  htmlFileN << "<br>" << std::endl;
23640 
23641  if (sub == 1 || sub == 2)
23642  htmlFileN << "<h3> 4F: D(reconoisevarianceNoisehe) vs phi , different eta, Depth4 </h3>" << std::endl;
23643  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23644  if (sub == 1)
23645  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23646  if (sub == 2)
23647  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23648  htmlFileN << "<br>" << std::endl;
23649 
23650  if (sub == 2)
23651  htmlFileN << "<h3> 4G: D(reconoisevarianceNoisehe) vs phi , different eta, Depth5 </h3>" << std::endl;
23652  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23653  if (sub == 2)
23654  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23655  htmlFileN << "<br>" << std::endl;
23656 
23657  if (sub == 2)
23658  htmlFileN << "<h3> 4H: D(reconoisevarianceNoisehe) vs phi , different eta, Depth6 </h3>" << std::endl;
23659  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23660  if (sub == 2)
23661  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23662  htmlFileN << "<br>" << std::endl;
23663 
23664  if (sub == 2)
23665  htmlFileN << "<h3> 4I: D(reconoisevarianceNoisehe) vs phi , different eta, Depth7 </h3>" << std::endl;
23666  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23667  if (sub == 2)
23668  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23669  htmlFileN << "<br>" << std::endl;
23671 
23673 
23674  if (sub == 1)
23675  htmlFileN << "<h1> Only for Noise RecHits these lines below, HB, RUN = " << runnumber << " </h1>" << std::endl;
23676  if (sub == 2)
23677  htmlFileN << "<h1> Only for Noise RecHits these lines below, HE, RUN = " << runnumber << " </h1>" << std::endl;
23678  if (sub == 4)
23679  htmlFileN << "<h1> Only for Noise RecHits these lines below, HF, RUN = " << runnumber << " </h1>" << std::endl;
23680  htmlFileN << "<br>" << std::endl;
23681 
23682  htmlFileN << "<h2> 5: DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>" << std::endl;
23683  htmlFileN << "<h3> 5A: eta/phi-plot: DIF, averaged over depthes </h3>" << std::endl;
23684  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23685  if (sub == 1)
23686  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23687  if (sub == 2)
23688  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23689  if (sub == 4)
23690  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23691  htmlFileN << "<br>" << std::endl;
23692 
23693  htmlFileN << "<h3> 5B: DIF vs phi , averaged over depthes & eta </h3>" << std::endl;
23694  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23695  if (sub == 1)
23696  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23697  if (sub == 2)
23698  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23699  if (sub == 4)
23700  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23701  htmlFileN << "<br>" << std::endl;
23702 
23704 
23706  htmlFileN << "<h2> Positive direction, DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>"
23707  << std::endl;
23708  htmlFileN << "<h3> 5C: DIF vs phi , different eta, Depth1 </h3>" << std::endl;
23709  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23710  if (sub == 1)
23711  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23712  if (sub == 2)
23713  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23714  if (sub == 4)
23715  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23716  htmlFileN << "<br>" << std::endl;
23717 
23718  htmlFileN << "<h3> 5D: DIF vs phi , different eta, Depth2 </h3>" << std::endl;
23719  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23720  if (sub == 1)
23721  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23722  if (sub == 2)
23723  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23724  if (sub == 4)
23725  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23726  htmlFileN << "<br>" << std::endl;
23727 
23728  if (sub == 1 || sub == 2)
23729  htmlFileN << "<h3> 1E: DIF vs phi , different eta, Depth3 </h3>" << std::endl;
23730  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23731  if (sub == 1)
23732  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23733  if (sub == 2)
23734  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23735  htmlFileN << "<br>" << std::endl;
23736 
23737  if (sub == 1 || sub == 2)
23738  htmlFileN << "<h3> 5F: DIF vs phi , different eta, Depth4 </h3>" << std::endl;
23739  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23740  if (sub == 1)
23741  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23742  if (sub == 2)
23743  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23744  htmlFileN << "<br>" << std::endl;
23745 
23746  if (sub == 2)
23747  htmlFileN << "<h3> 5G: DIF vs phi , different eta, Depth5 </h3>" << std::endl;
23748  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23749  if (sub == 2)
23750  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23751  htmlFileN << "<br>" << std::endl;
23752 
23753  if (sub == 2)
23754  htmlFileN << "<h3> 5H: DIF vs phi , different eta, Depth6 </h3>" << std::endl;
23755  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23756  if (sub == 2)
23757  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23758  htmlFileN << "<br>" << std::endl;
23759 
23760  if (sub == 2)
23761  htmlFileN << "<h3> 5I: DIF vs phi , different eta, Depth7 </h3>" << std::endl;
23762  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23763  if (sub == 2)
23764  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23765  htmlFileN << "<br>" << std::endl;
23766 
23768 
23770  htmlFileN << "<h2> Negative direction, DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>"
23771  << std::endl;
23772  htmlFileN << "<h3> 5C: DIF vs phi , different eta, Depth1 </h3>" << std::endl;
23773  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23774  if (sub == 1)
23775  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23776  if (sub == 2)
23777  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23778  if (sub == 4)
23779  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23780  htmlFileN << "<br>" << std::endl;
23781 
23782  htmlFileN << "<h3> 5D: DIF vs phi , different eta, Depth2 </h3>" << std::endl;
23783  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23784  if (sub == 1)
23785  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23786  if (sub == 2)
23787  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23788  if (sub == 4)
23789  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23790  htmlFileN << "<br>" << std::endl;
23791 
23792  if (sub == 1 || sub == 2)
23793  htmlFileN << "<h3> 5E: DIF vs phi , different eta, Depth3 </h3>" << std::endl;
23794  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23795  if (sub == 1)
23796  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23797  if (sub == 2)
23798  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23799  htmlFileN << "<br>" << std::endl;
23800 
23801  if (sub == 1 || sub == 2)
23802  htmlFileN << "<h3> 5F: DIF vs phi , different eta, Depth4 </h3>" << std::endl;
23803  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23804  if (sub == 1)
23805  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23806  if (sub == 2)
23807  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23808  htmlFileN << "<br>" << std::endl;
23809 
23810  if (sub == 2)
23811  htmlFileN << "<h3> 5G: DIF vs phi , different eta, Depth5 </h3>" << std::endl;
23812  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23813  if (sub == 2)
23814  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23815  htmlFileN << "<br>" << std::endl;
23816 
23817  if (sub == 2)
23818  htmlFileN << "<h3> 5H: DIF vs phi , different eta, Depth6 </h3>" << std::endl;
23819  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23820  if (sub == 2)
23821  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23822  htmlFileN << "<br>" << std::endl;
23823 
23824  if (sub == 2)
23825  htmlFileN << "<h3> 5I: DIF vs phi , different eta, Depth7 </h3>" << std::endl;
23826  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23827  if (sub == 2)
23828  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23829  htmlFileN << "<br>" << std::endl;
23830 
23832 
23833  //
23834  //
23835  htmlFileN.close();
23836 
23839 
23840  //
23841  //
23842  } // end sub //for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
23843 
23844  //======================================================================
23845 
23846  std::cout << "********" << std::endl;
23847  std::cout << "************ Start creating subdet html pages: - rather long time needed, waiting please"
23848  << std::endl;
23849  //======================================================================
23850  // Creating subdet html pages:
23851 
23852  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
23853  ofstream htmlFile;
23854  if (sub == 1)
23855  htmlFile.open("HB.html");
23856  if (sub == 2)
23857  htmlFile.open("HE.html");
23858  if (sub == 3)
23859  htmlFile.open("HO.html");
23860  if (sub == 4)
23861  htmlFile.open("HF.html");
23862 
23863  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
23864  htmlFile << "<head>" << std::endl;
23865  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
23866  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
23867  htmlFile << "<style type=\"text/css\">" << std::endl;
23868  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
23869  << std::endl;
23870  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
23871  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
23872  "text-align: center;}"
23873  << std::endl;
23874  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
23875  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
23876  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
23877  htmlFile << " td.s5 { font-family: arial, arial ce, helvetica; background-color: #FF00FF; }" << std::endl;
23878  htmlFile << " td.s6 { font-family: arial, arial ce, helvetica; background-color: #9ACD32; }" << std::endl;
23879  htmlFile << " td.s7 { font-family: arial, arial ce, helvetica; background-color: #32CD32; }" << std::endl;
23880  htmlFile << " td.s8 { font-family: arial, arial ce, helvetica; background-color: #00FFFF; }" << std::endl;
23881  htmlFile << " td.s9 { font-family: arial, arial ce, helvetica; background-color: #FFE4E1; }" << std::endl;
23882  htmlFile << " td.s10 { font-family: arial, arial ce, helvetica; background-color: #A0522D; }" << std::endl;
23883  htmlFile << " td.s11 { font-family: arial, arial ce, helvetica; background-color: #1E90FF; }" << std::endl;
23884  htmlFile << " td.s12 { font-family: arial, arial ce, helvetica; background-color: #00BFFF; }" << std::endl;
23885  htmlFile << " td.s13 { font-family: arial, arial ce, helvetica; background-color: #FFFF00; }" << std::endl;
23886  htmlFile << " td.s14 { font-family: arial, arial ce, helvetica; background-color: #B8860B; }" << std::endl;
23887  htmlFile << "</style>" << std::endl;
23888  htmlFile << "<body>" << std::endl;
23889  if (sub == 1)
23890  htmlFile << "<h1> HCAL BARREL, RUN = " << runnumber << " </h1>" << std::endl;
23891  if (sub == 2)
23892  htmlFile << "<h1> HCAL ENDCAP, RUN = " << runnumber << " </h1>" << std::endl;
23893  if (sub == 3)
23894  htmlFile << "<h1> HCAL OUTER, RUN = " << runnumber << " </h1>" << std::endl;
23895  if (sub == 4)
23896  htmlFile << "<h1> HCAL FORWARD, RUN = " << runnumber << " </h1>" << std::endl;
23897  htmlFile << "<br>" << std::endl;
23898  if (sub == 1)
23899  htmlFile << "<h2> 1. Analysis results for HB</h2>" << std::endl;
23900  if (sub == 2)
23901  htmlFile << "<h2> 1. Analysis results for HE</h2>" << std::endl;
23902  if (sub == 3)
23903  htmlFile << "<h2> 1. Analysis results for HO</h2>" << std::endl;
23904  if (sub == 4)
23905  htmlFile << "<h2> 1. Analysis results for HF</h2>" << std::endl;
23906  htmlFile << "<table width=\"600\">" << std::endl;
23907  htmlFile << "<tr>" << std::endl;
23908 
23909  if (sub == 1) {
23910  /*
23911  htmlFile << " <td><a href=\"HB_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23912  htmlFile << " <td><a href=\"HB_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23913  htmlFile << " <td><a href=\"HB_Drift.html\">Gain Stability</a></td>"<< std::endl;
23914  htmlFile << " <td><a href=\"HB_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23915  htmlFile << " <td><a href=\"HB_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23916  htmlFile << " <td><a href=\"HB_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>"<< std::endl;
23917  htmlFile << " <td><a href=\"HB_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>"<< std::endl;
23918  htmlFile << " <td><a href=\"HB_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>"<< std::endl;
23919 */
23920 
23921  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23922  << "/HB_Tile.html\">Megatile Channels</a></td>" << std::endl;
23923  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23924  << "/HB_Calib.html\">Calibration Channels</a></td>" << std::endl;
23925  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23926  << "/HB_Drift.html\">Gain Stability</a></td>" << std::endl;
23927  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23928  << "/HB_Pedestals.html\">Pedestals</a></td>" << std::endl;
23929  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23930  << "/HB_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23931  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23932  << "/HB_PhiSymmetryDigi.html\">Phi-SymmetryDigi</a></td>" << std::endl;
23933  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23934  << "/HB_PhiSymmetryRecoSignal.html\">Phi-SymmetryRecoSignal</a></td>" << std::endl;
23935  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23936  << "/HB_PhiSymmetryRecoNoise.html\">Phi-SymmetryRecoNoise</a></td>" << std::endl;
23937  }
23938  if (sub == 2) {
23939  /*
23940  htmlFile << " <td><a href=\"HE_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23941  htmlFile << " <td><a href=\"HE_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23942  htmlFile << " <td><a href=\"HE_Drift.html\">Gain Stability</a></td>"<< std::endl;
23943  htmlFile << " <td><a href=\"HE_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23944  htmlFile << " <td><a href=\"HE_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23945  htmlFile << " <td><a href=\"HE_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>"<< std::endl;
23946  htmlFile << " <td><a href=\"HE_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>"<< std::endl;
23947  htmlFile << " <td><a href=\"HE_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>"<< std::endl;
23948 */
23949 
23950  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23951  << "/HE_Tile.html\">Megatile Channels</a></td>" << std::endl;
23952  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23953  << "/HE_Calib.html\">Calibration Channels</a></td>" << std::endl;
23954  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23955  << "/HE_Drift.html\">Gain Stability</a></td>" << std::endl;
23956  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23957  << "/HE_Pedestals.html\">Pedestals</a></td>" << std::endl;
23958  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23959  << "/HE_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23960  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23961  << "/HE_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>" << std::endl;
23962  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23963  << "/HE_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>" << std::endl;
23964  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23965  << "/HE_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>" << std::endl;
23966  }
23967  if (sub == 3) {
23968  /*
23969  htmlFile << " <td><a href=\"HO_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23970  htmlFile << " <td><a href=\"HO_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23971  htmlFile << " <td><a href=\"HO_Drift.html\">Gain Stability</a></td>"<< std::endl;
23972  htmlFile << " <td><a href=\"HO_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23973  htmlFile << " <td><a href=\"HO_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23974  */
23975  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23976  << "/HO_Tile.html\">Megatile Channels</a></td>" << std::endl;
23977  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23978  << "/HO_Calib.html\">Calibration Channels</a></td>" << std::endl;
23979  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23980  << "/HO_Drift.html\">Gain Stability</a></td>" << std::endl;
23981  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23982  << "/HO_Pedestals.html\">Pedestals</a></td>" << std::endl;
23983  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
23984  << "/HO_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23985  }
23986 
23987  if (sub == 4) {
23988  /*
23989  htmlFile << " <td><a href=\"HF_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23990  htmlFile << " <td><a href=\"HF_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23991  htmlFile << " <td><a href=\"HF_Drift.html\">Gain Stability</a></td>"<< std::endl;
23992  htmlFile << " <td><a href=\"HF_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23993  htmlFile << " <td><a href=\"HF_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23994  htmlFile << " <td><a href=\"HF_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>"<< std::endl;
23995  htmlFile << " <td><a href=\"HF_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>"<< std::endl;
23996  htmlFile << " <td><a href=\"HF_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>"<< std::endl;
23997  */
23998 
23999  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24000  << "/HF_Tile.html\">Megatile Channels</a></td>" << std::endl;
24001  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24002  << "/HF_Calib.html\">Calibration Channels</a></td>" << std::endl;
24003  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24004  << "/HF_Drift.html\">Gain Stability</a></td>" << std::endl;
24005  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24006  << "/HF_Pedestals.html\">Pedestals</a></td>" << std::endl;
24007  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24008  << "/HF_Shapes.html\">ADC Shapes</a></td>" << std::endl;
24009  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24010  << "/HF_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>" << std::endl;
24011  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24012  << "/HF_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>" << std::endl;
24013  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24014  << "/HF_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>" << std::endl;
24015  }
24016 
24017  htmlFile << "</tr>" << std::endl;
24018  htmlFile << "</table>" << std::endl;
24019  htmlFile << "<br>" << std::endl;
24020  if (sub == 1)
24021  htmlFile << "<h2> 2.Status HB over all criteria </h2>" << std::endl;
24022  if (sub == 2)
24023  htmlFile << "<h2> 2.Status HE over all criteria </h2>" << std::endl;
24024  if (sub == 3)
24025  htmlFile << "<h2> 2.Status HO over all criteria </h2>" << std::endl;
24026  if (sub == 4)
24027  htmlFile << "<h2> 2.Status HF over all criteria </h2>" << std::endl;
24028  htmlFile << "<h3> 2.A.Channel map for each Depth </h3>" << std::endl;
24029  htmlFile << "<h4> Channel legend: green - good, red - bad (rate of failures at least 0.1), yellow - at least 2% "
24030  "gain drift, white - not applicable or out of range </h4>"
24031  << std::endl;
24032  if (sub == 1)
24033  htmlFile << " <img src=\"MAPHB.png\" />" << std::endl;
24034  if (sub == 2)
24035  htmlFile << " <img src=\"MAPHE.png\" />" << std::endl;
24036  if (sub == 3)
24037  htmlFile << " <img src=\"MAPHO.png\" />" << std::endl;
24038  if (sub == 4)
24039  htmlFile << " <img src=\"MAPHF.png\" />" << std::endl;
24040  htmlFile << "<br>" << std::endl;
24041 
24042  htmlFile << "<h3> 2.B.List of Bad channels (rate > 0.1) and its rates for each RMT criteria (for GS - %) </h3>"
24043  << std::endl;
24044 
24045  // htmlFile << " <td><a href=\"HELP.html\"> Description of criteria for bad channel selection</a></td>"<< std::endl;
24046  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24047  << "/HELP.html\"> Description of criteria for bad channel selection</a></td>" << std::endl;
24048 
24049  htmlFile << "<table>" << std::endl;
24050  htmlFile << "<tr>";
24051  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24052  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24053  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24054  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24055  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24056  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24057  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24058  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24059  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24060  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24061  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24062  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24063  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24064  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24065  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24066  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24067  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24068  htmlFile << "<td class=\"s5\" align=\"center\">Cm</td>" << std::endl;
24069  htmlFile << "<td class=\"s5\" align=\"center\">Am</td>" << std::endl;
24070  htmlFile << "<td class=\"s5\" align=\"center\">Wm</td>" << std::endl;
24071  htmlFile << "<td class=\"s5\" align=\"center\">Rm</td>" << std::endl;
24072  htmlFile << "<td class=\"s5\" align=\"center\">TNm</td>" << std::endl;
24073  htmlFile << "<td class=\"s5\" align=\"center\">TXm</td>" << std::endl;
24074  htmlFile << "<td class=\"s9\" align=\"center\">GS (%)</td>" << std::endl;
24075  htmlFile << "<td class=\"s4\" align=\"center\">Pm</td>" << std::endl;
24076  htmlFile << "<td class=\"s4\" align=\"center\">pWm</td>" << std::endl;
24077  htmlFile << "<td class=\"s8\" align=\"center\">Cc</td>" << std::endl;
24078  htmlFile << "<td class=\"s8\" align=\"center\">Ac</td>" << std::endl;
24079  htmlFile << "<td class=\"s8\" align=\"center\">Wc</td>" << std::endl;
24080  htmlFile << "<td class=\"s8\" align=\"center\">Rc</td>" << std::endl;
24081  htmlFile << "<td class=\"s8\" align=\"center\">TNc</td>" << std::endl;
24082  htmlFile << "<td class=\"s8\" align=\"center\">TXc</td>" << std::endl;
24083 
24084  htmlFile << "</tr>" << std::endl;
24085 
24086  for (int i = 1; i <= NBad; i++) {
24087  if ((ind % 2) == 1) {
24088  raw_class = "<td class=\"s2\" align=\"center\">";
24089  raw_class1 = "<td class=\"s6\" align=\"center\">";
24090  raw_class2 = "<td class=\"s11\" align=\"center\">";
24091  raw_class3 = "<td class=\"s13\" align=\"center\">";
24092 
24093  } else {
24094  raw_class = "<td class=\"s3\" align=\"center\">";
24095  raw_class1 = "<td class=\"s7\" align=\"center\">";
24096  raw_class2 = "<td class=\"s12\" align=\"center\">";
24097  raw_class3 = "<td class=\"s14\" align=\"center\">";
24098  }
24099  const CellDB db;
24100  CellDB ce;
24101  if ((ce.size() >= 1) && (Sub[2][i] == sub)) {
24102  if (Sub[2][i] == 1) {
24103  ce = db.find("subdet", "HB").find("Eta", Eta[2][i]).find("Phi", Phi[2][i]).find("Depth", Depth[2][i]);
24104  if (ce.size() == 0) {
24105  // cout<<"Error: No such HB, Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;
24106  continue;
24107  } else if (ce.size() > 1) {
24108  cout << "Warning: More than one line correspond to such HB, Eta=" << Eta[2][i] << ", Phi=" << Phi[2][i]
24109  << ", Depth=" << Depth[2][i] << " in database" << endl;
24110  }
24111  }
24112  if (Sub[2][i] == 2) {
24113  ce = db.find("subdet", "HE").find("Eta", Eta[2][i]).find("Phi", Phi[2][i]).find("Depth", Depth[2][i]);
24114  if (ce.size() == 0) {
24115  // cout<<"Error: No such HE, Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;
24116  continue;
24117  } else if (ce.size() > 1) {
24118  cout << "Warning: More than one line correspond to such HE, Eta=" << Eta[2][i] << ", Phi=" << Phi[2][i]
24119  << ", Depth=" << Depth[2][i] << " in database" << endl;
24120  }
24121  }
24122  if (Sub[2][i] == 3) {
24123  ce = db.find("subdet", "HO").find("Eta", Eta[2][i]).find("Phi", Phi[2][i]).find("Depth", Depth[2][i]);
24124  if (ce.size() == 0) {
24125  // cout<<"Error: No such HO, Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;
24126  continue;
24127  } else if (ce.size() > 1) {
24128  cout << "Warning: More than one line correspond to such HO, Eta=" << Eta[2][i] << ", Phi=" << Phi[2][i]
24129  << ", Depth=" << Depth[2][i] << " in database" << endl;
24130  }
24131  }
24132  if (Sub[2][i] == 4) {
24133  ce = db.find("subdet", "HF").find("Eta", Eta[2][i]).find("Phi", Phi[2][i]).find("Depth", Depth[2][i]);
24134  if (ce.size() == 0) {
24135  // cout<<"Error: No such HF, Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;
24136  continue;
24137  } else if (ce.size() > 1) {
24138  cout << "Warning: More than one line correspond to such HF, Eta=" << Eta[2][i] << ", Phi=" << Phi[2][i]
24139  << ", Depth=" << Depth[2][i] << " in database" << endl;
24140  }
24141  }
24142  htmlFile << "<tr>" << std::endl;
24143  htmlFile << "<td class=\"s4\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24144  htmlFile << raw_class << Eta[2][i] << "</td>" << std::endl;
24145  htmlFile << raw_class << Phi[2][i] << "</td>" << std::endl;
24146  htmlFile << raw_class << Depth[2][i] << "</td>" << std::endl;
24147  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24148  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24149  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24150  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24151  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24152  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24153  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24154  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24155  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24156  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24157  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24158  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24159  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24160  htmlFile << raw_class1 << Map_Ampl[1][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24161  << "</td>" << std::endl;
24162  htmlFile << raw_class1 << Map_Ampl[2][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24163  << "</td>" << std::endl;
24164  htmlFile << raw_class1 << Map_Ampl[3][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24165  << "</td>" << std::endl;
24166  htmlFile << raw_class1 << Map_Ampl[4][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24167  << "</td>" << std::endl;
24168  htmlFile << raw_class1 << Map_Ampl[5][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24169  << "</td>" << std::endl;
24170  htmlFile << raw_class1 << Map_Ampl[6][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24171  << "</td>" << std::endl;
24172  htmlFile << raw_class3 << Map_Ampl[21][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24173  << "</td>" << std::endl;
24174  htmlFile << raw_class << Map_Ampl[31][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24175  << "</td>" << std::endl;
24176  htmlFile << raw_class << Map_Ampl[32][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24177  << "</td>" << std::endl;
24178  htmlFile << raw_class2 << Map_Ampl[11][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24179  << "</td>" << std::endl;
24180  htmlFile << raw_class2 << Map_Ampl[12][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24181  << "</td>" << std::endl;
24182  htmlFile << raw_class2 << Map_Ampl[13][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24183  << "</td>" << std::endl;
24184  htmlFile << raw_class2 << Map_Ampl[14][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24185  << "</td>" << std::endl;
24186  htmlFile << raw_class2 << Map_Ampl[15][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24187  << "</td>" << std::endl;
24188  htmlFile << raw_class2 << Map_Ampl[16][Sub[2][i]][Depth[2][i]]->GetBinContent(Eta[2][i] + 41, Phi[2][i] + 1)
24189  << "</td>" << std::endl;
24190  htmlFile << "</tr>" << std::endl;
24191 
24192  ind += 1;
24193  }
24194  }
24195  htmlFile << "</table>" << std::endl;
24196  htmlFile << "<br>" << std::endl;
24197 
24198  htmlFile << "<h3> 2.C.List of Gain unstable channels and its value in % (for other criterias - rate)</h3>"
24199  << std::endl;
24200  htmlFile << "<table>" << std::endl;
24201  htmlFile << "<tr>";
24202  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24203  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24204  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24205  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24206  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24207  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24208  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24209  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24210  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24211  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24212  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24213  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24214  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24215  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24216  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24217  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24218  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24219  htmlFile << "<td class=\"s5\" align=\"center\">Cm</td>" << std::endl;
24220  htmlFile << "<td class=\"s5\" align=\"center\">Am</td>" << std::endl;
24221  htmlFile << "<td class=\"s5\" align=\"center\">Wm</td>" << std::endl;
24222  htmlFile << "<td class=\"s5\" align=\"center\">Rm</td>" << std::endl;
24223  htmlFile << "<td class=\"s5\" align=\"center\">TNm</td>" << std::endl;
24224  htmlFile << "<td class=\"s5\" align=\"center\">TXm</td>" << std::endl;
24225  htmlFile << "<td class=\"s9\" align=\"center\">GS(%)</td>" << std::endl;
24226  htmlFile << "<td class=\"s4\" align=\"center\">Pm</td>" << std::endl;
24227  htmlFile << "<td class=\"s4\" align=\"center\">pWm</td>" << std::endl;
24228  htmlFile << "<td class=\"s8\" align=\"center\">Cc</td>" << std::endl;
24229  htmlFile << "<td class=\"s8\" align=\"center\">Ac</td>" << std::endl;
24230  htmlFile << "<td class=\"s8\" align=\"center\">Wc</td>" << std::endl;
24231  htmlFile << "<td class=\"s8\" align=\"center\">Rc</td>" << std::endl;
24232  htmlFile << "<td class=\"s8\" align=\"center\">TNc</td>" << std::endl;
24233  htmlFile << "<td class=\"s8\" align=\"center\">TXc</td>" << std::endl;
24234  htmlFile << "</tr>" << std::endl;
24235 
24236  for (int i = 1; i <= NWarn; i++) {
24237  if ((ind % 2) == 1) {
24238  raw_class = "<td class=\"s2\" align=\"center\">";
24239  raw_class1 = "<td class=\"s6\" align=\"center\">";
24240  raw_class2 = "<td class=\"s11\" align=\"center\">";
24241  raw_class3 = "<td class=\"s13\" align=\"center\">";
24242 
24243  } else {
24244  raw_class = "<td class=\"s3\" align=\"center\">";
24245  raw_class1 = "<td class=\"s7\" align=\"center\">";
24246  raw_class2 = "<td class=\"s12\" align=\"center\">";
24247  raw_class3 = "<td class=\"s14\" align=\"center\">";
24248  }
24249  const CellDB db;
24250  CellDB ce;
24251  if ((ce.size() >= 1) && (Sub[1][i] == sub)) {
24252  if (Sub[1][i] == 1) {
24253  ce = db.find("subdet", "HB").find("Eta", Eta[1][i]).find("Phi", Phi[1][i]).find("Depth", Depth[1][i]);
24254  if (ce.size() == 0) {
24255  // cout<<"Error: No such HB, Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;
24256  continue;
24257  } else if (ce.size() > 1) {
24258  cout << "Warning: More than one line correspond to such HB, Eta=" << Eta[1][i] << ", Phi=" << Phi[1][i]
24259  << ", Depth=" << Depth[1][i] << " in database" << endl;
24260  }
24261  }
24262  if (Sub[1][i] == 2) {
24263  ce = db.find("subdet", "HE").find("Eta", Eta[1][i]).find("Phi", Phi[1][i]).find("Depth", Depth[1][i]);
24264  if (ce.size() == 0) {
24265  // cout<<"Error: No such HE, Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;
24266  continue;
24267  } else if (ce.size() > 1) {
24268  cout << "Warning: More than one line correspond to such HE, Eta=" << Eta[1][i] << ", Phi=" << Phi[1][i]
24269  << ", Depth=" << Depth[1][i] << " in database" << endl;
24270  }
24271  }
24272  if (Sub[1][i] == 3) {
24273  ce = db.find("subdet", "HO").find("Eta", Eta[1][i]).find("Phi", Phi[1][i]).find("Depth", Depth[1][i]);
24274  if (ce.size() == 0) {
24275  // cout<<"Error: No such HO, Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;
24276  continue;
24277  } else if (ce.size() > 1) {
24278  cout << "Warning: More than one line correspond to such HO, Eta=" << Eta[1][i] << ", Phi=" << Phi[1][i]
24279  << ", Depth=" << Depth[1][i] << " in database" << endl;
24280  }
24281  }
24282  if (Sub[1][i] == 4) {
24283  ce = db.find("subdet", "HF").find("Eta", Eta[1][i]).find("Phi", Phi[1][i]).find("Depth", Depth[1][i]);
24284  if (ce.size() == 0) {
24285  // cout<<"Error: No such HF, Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;
24286  continue;
24287  } else if (ce.size() > 1) {
24288  cout << "Warning: More than one line correspond to such HF, Eta=" << Eta[1][i] << ", Phi=" << Phi[1][i]
24289  << ", Depth=" << Depth[1][i] << " in database" << endl;
24290  }
24291  }
24292  htmlFile << "<td class=\"s4\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24293  htmlFile << raw_class << Eta[1][i] << "</td>" << std::endl;
24294  htmlFile << raw_class << Phi[1][i] << "</td>" << std::endl;
24295  htmlFile << raw_class << Depth[1][i] << "</td>" << std::endl;
24296  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24297  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24298  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24299  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24300  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24301  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24302  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24303  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24304  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24305  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24306  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24307  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24308  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24309  htmlFile << raw_class1 << Map_Ampl[1][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24310  << "</td>" << std::endl;
24311  htmlFile << raw_class1 << Map_Ampl[2][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24312  << "</td>" << std::endl;
24313  htmlFile << raw_class1 << Map_Ampl[3][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24314  << "</td>" << std::endl;
24315  htmlFile << raw_class1 << Map_Ampl[4][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24316  << "</td>" << std::endl;
24317  htmlFile << raw_class1 << Map_Ampl[5][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24318  << "</td>" << std::endl;
24319  htmlFile << raw_class1 << Map_Ampl[6][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24320  << "</td>" << std::endl;
24321  htmlFile << raw_class3 << Map_Ampl[21][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24322  << "</td>" << std::endl;
24323  htmlFile << raw_class << Map_Ampl[31][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24324  << "</td>" << std::endl;
24325  htmlFile << raw_class << Map_Ampl[32][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24326  << "</td>" << std::endl;
24327  htmlFile << raw_class2 << Map_Ampl[11][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24328  << "</td>" << std::endl;
24329  htmlFile << raw_class2 << Map_Ampl[12][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24330  << "</td>" << std::endl;
24331  htmlFile << raw_class2 << Map_Ampl[13][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24332  << "</td>" << std::endl;
24333  htmlFile << raw_class2 << Map_Ampl[14][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24334  << "</td>" << std::endl;
24335  htmlFile << raw_class2 << Map_Ampl[15][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24336  << "</td>" << std::endl;
24337  htmlFile << raw_class2 << Map_Ampl[16][Sub[1][i]][Depth[1][i]]->GetBinContent(Eta[1][i] + 41, Phi[1][i] + 1)
24338  << "</td>" << std::endl;
24339  htmlFile << "</tr>" << std::endl;
24340  htmlFile << "</tr>" << std::endl;
24341  ind += 1;
24342  }
24343  }
24344  htmlFile << "</table>" << std::endl;
24345  htmlFile << "<br>" << std::endl;
24346 
24347  htmlFile << "<h3> 2.D.List of channels with Bad Pedestals (rate > 0.1) and its rates (for GS - %)</h3>"
24348  << std::endl;
24349  htmlFile << "<table>" << std::endl;
24350  htmlFile << "<tr>";
24351  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24352  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24353  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24354  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24355  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24356  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24357  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24358  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24359  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24360  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24361  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24362  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24363  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24364  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24365  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24366  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24367  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24368  htmlFile << "<td class=\"s5\" align=\"center\">Cm</td>" << std::endl;
24369  htmlFile << "<td class=\"s5\" align=\"center\">Am</td>" << std::endl;
24370  htmlFile << "<td class=\"s5\" align=\"center\">Wm</td>" << std::endl;
24371  htmlFile << "<td class=\"s5\" align=\"center\">Rm</td>" << std::endl;
24372  htmlFile << "<td class=\"s5\" align=\"center\">TNm</td>" << std::endl;
24373  htmlFile << "<td class=\"s5\" align=\"center\">TXm</td>" << std::endl;
24374  htmlFile << "<td class=\"s9\" align=\"center\">GS(%)</td>" << std::endl;
24375  htmlFile << "<td class=\"s4\" align=\"center\">Pm</td>" << std::endl;
24376  htmlFile << "<td class=\"s4\" align=\"center\">pWm</td>" << std::endl;
24377  htmlFile << "<td class=\"s8\" align=\"center\">Cc</td>" << std::endl;
24378  htmlFile << "<td class=\"s8\" align=\"center\">Ac</td>" << std::endl;
24379  htmlFile << "<td class=\"s8\" align=\"center\">Wc</td>" << std::endl;
24380  htmlFile << "<td class=\"s8\" align=\"center\">Rc</td>" << std::endl;
24381  htmlFile << "<td class=\"s8\" align=\"center\">TNc</td>" << std::endl;
24382  htmlFile << "<td class=\"s8\" align=\"center\">TXc</td>" << std::endl;
24383  htmlFile << "</tr>" << std::endl;
24384 
24385  for (int i = 1; i <= NPed; i++) {
24386  if ((ind % 2) == 1) {
24387  raw_class = "<td class=\"s2\" align=\"center\">";
24388  raw_class1 = "<td class=\"s6\" align=\"center\">";
24389  raw_class2 = "<td class=\"s11\" align=\"center\">";
24390  raw_class3 = "<td class=\"s13\" align=\"center\">";
24391 
24392  } else {
24393  raw_class = "<td class=\"s3\" align=\"center\">";
24394  raw_class1 = "<td class=\"s7\" align=\"center\">";
24395  raw_class2 = "<td class=\"s12\" align=\"center\">";
24396  raw_class3 = "<td class=\"s14\" align=\"center\">";
24397  }
24398  const CellDB db;
24399  CellDB ce;
24400  if ((ce.size() >= 1) && (Sub[3][i] == sub)) {
24401  if (Sub[3][i] == 1) {
24402  ce = db.find("subdet", "HB").find("Eta", Eta[3][i]).find("Phi", Phi[3][i]).find("Depth", Depth[3][i]);
24403  if (ce.size() == 0) {
24404  // cout<<"Error: No such HB, Eta="<< Eta[3][i] <<", Phi="<< Phi[3][i] <<", Depth="<< Depth[3][i] <<" in database"<<endl;
24405  continue;
24406  } else if (ce.size() > 1) {
24407  cout << "Warning: More than one line correspond to such HB, Eta=" << Eta[3][i] << ", Phi=" << Phi[3][i]
24408  << ", Depth=" << Depth[3][i] << " in database" << endl;
24409  }
24410  }
24411  if (Sub[3][i] == 2) {
24412  ce = db.find("subdet", "HE").find("Eta", Eta[3][i]).find("Phi", Phi[3][i]).find("Depth", Depth[3][i]);
24413  if (ce.size() == 0) {
24414  // cout<<"Error: No such HE, Eta="<< Eta[3][i] <<", Phi="<< Phi[3][i] <<", Depth="<< Depth[3][i] <<" in database"<<endl;
24415  continue;
24416  } else if (ce.size() > 1) {
24417  cout << "Warning: More than one line correspond to such HE, Eta=" << Eta[3][i] << ", Phi=" << Phi[3][i]
24418  << ", Depth=" << Depth[3][i] << " in database" << endl;
24419  }
24420  }
24421  if (Sub[3][i] == 3) {
24422  ce = db.find("subdet", "HO").find("Eta", Eta[3][i]).find("Phi", Phi[3][i]).find("Depth", Depth[3][i]);
24423  if (ce.size() == 0) {
24424  // cout<<"Error: No such HO, Eta="<< Eta[3][i] <<", Phi="<< Phi[3][i] <<", Depth="<< Depth[3][i] <<" in database"<<endl;
24425  continue;
24426  } else if (ce.size() > 1) {
24427  cout << "Warning: More than one line correspond to such HO, Eta=" << Eta[3][i] << ", Phi=" << Phi[3][i]
24428  << ", Depth=" << Depth[3][i] << " in database" << endl;
24429  }
24430  }
24431  if (Sub[3][i] == 4) {
24432  ce = db.find("subdet", "HF").find("Eta", Eta[3][i]).find("Phi", Phi[3][i]).find("Depth", Depth[3][i]);
24433  if (ce.size() == 0) {
24434  // cout<<"Error: No such HF, Eta="<< Eta[3][i] <<", Phi="<< Phi[3][i] <<", Depth="<< Depth[3][i] <<" in database"<<endl;
24435  continue;
24436  } else if (ce.size() > 1) {
24437  cout << "Warning: More than one line correspond to such HF, Eta=" << Eta[3][i] << ", Phi=" << Phi[3][i]
24438  << ", Depth=" << Depth[3][i] << " in database" << endl;
24439  }
24440  }
24441  htmlFile << "<td class=\"s4\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24442  htmlFile << raw_class << Eta[3][i] << "</td>" << std::endl;
24443  htmlFile << raw_class << Phi[3][i] << "</td>" << std::endl;
24444  htmlFile << raw_class << Depth[3][i] << "</td>" << std::endl;
24445  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24446  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24447  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24448  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24449  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24450  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24451  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24452  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24453  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24454  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24455  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24456  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24457  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24458  htmlFile << raw_class1 << Map_Ampl[1][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24459  << "</td>" << std::endl;
24460  htmlFile << raw_class1 << Map_Ampl[2][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24461  << "</td>" << std::endl;
24462  htmlFile << raw_class1 << Map_Ampl[3][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24463  << "</td>" << std::endl;
24464  htmlFile << raw_class1 << Map_Ampl[4][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24465  << "</td>" << std::endl;
24466  htmlFile << raw_class1 << Map_Ampl[5][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24467  << "</td>" << std::endl;
24468  htmlFile << raw_class1 << Map_Ampl[6][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24469  << "</td>" << std::endl;
24470  htmlFile << raw_class3 << Map_Ampl[21][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24471  << "</td>" << std::endl;
24472  htmlFile << raw_class << Map_Ampl[31][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24473  << "</td>" << std::endl;
24474  htmlFile << raw_class << Map_Ampl[32][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24475  << "</td>" << std::endl;
24476  htmlFile << raw_class2 << Map_Ampl[11][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24477  << "</td>" << std::endl;
24478  htmlFile << raw_class2 << Map_Ampl[12][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24479  << "</td>" << std::endl;
24480  htmlFile << raw_class2 << Map_Ampl[13][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24481  << "</td>" << std::endl;
24482  htmlFile << raw_class2 << Map_Ampl[14][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24483  << "</td>" << std::endl;
24484  htmlFile << raw_class2 << Map_Ampl[15][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24485  << "</td>" << std::endl;
24486  htmlFile << raw_class2 << Map_Ampl[16][Sub[3][i]][Depth[3][i]]->GetBinContent(Eta[3][i] + 41, Phi[3][i] + 1)
24487  << "</td>" << std::endl;
24488  htmlFile << "</tr>" << std::endl;
24489  htmlFile << "</tr>" << std::endl;
24490  ind += 1;
24491  }
24492  }
24493  htmlFile << "</table>" << std::endl;
24494 
24495  htmlFile << "</body> " << std::endl;
24496  htmlFile << "</html> " << std::endl;
24497  htmlFile.close();
24498  }
24499 
24500  //======================================================================
24501 
24502  std::cout << "********" << std::endl;
24503  std::cout << "************ Start creating description HELP html file:" << std::endl;
24504  //======================================================================
24505  // Creating description html file:
24506  ofstream htmlFile;
24507  htmlFile.open("HELP.html");
24508  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
24509  htmlFile << "<head>" << std::endl;
24510  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
24511  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
24512  htmlFile << "<style type=\"text/css\">" << std::endl;
24513  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
24514  << std::endl;
24515  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
24516  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
24517  "text-align: center;}"
24518  << std::endl;
24519  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
24520  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
24521  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
24522  htmlFile << "</style>" << std::endl;
24523  htmlFile << "<body>" << std::endl;
24524  htmlFile << "<h1> Description of Remote Monitoring Tool criteria for bad channel selection</h1>" << std::endl;
24525  htmlFile << "<br>" << std::endl;
24526  htmlFile << "<h3> - C means CAPID Errors assuming we inspect CAPID non-rotation,error & validation bits, and for "
24527  "this criterion - no need to apply any cuts to select bcs.</h3> "
24528  << std::endl;
24529  htmlFile << "<br>" << std::endl;
24530  htmlFile << "<h3> - A means full amplitude, collected over all time slices </h3> " << std::endl;
24531  htmlFile << "<h3> - R means ratio criterion where we define as a bad, the channels, for which the signal portion in "
24532  "4 middle TSs(plus one, minus two around TS with maximal amplitude) is out of some range of reasonable "
24533  "values </h3> "
24534  << std::endl;
24535  htmlFile << "<br>" << std::endl;
24536  htmlFile << "<h3> - W means width of shape distribution. Width is defined as square root from dispersion. </h3> "
24537  << std::endl;
24538  htmlFile << "<br>" << std::endl;
24539  htmlFile << "<h3> - TN means mean time position of adc signal. </h3> " << std::endl;
24540  htmlFile << "<br>" << std::endl;
24541  htmlFile << "<h3> - TX means TS number of maximum signal </h3> " << std::endl;
24542  htmlFile << "<br>" << std::endl;
24543  htmlFile << "<h3> - m means megatile channels. For example Am means Amplitude criteria for megatile channels </h3> "
24544  << std::endl;
24545  htmlFile << "<br>" << std::endl;
24546  htmlFile
24547  << "<h3> - c means calibration channels. For example Ac means Amplitude criteria for calibration channels </h3> "
24548  << std::endl;
24549  htmlFile << "<br>" << std::endl;
24550  htmlFile << "<h3> - Pm means Pedestals. </h3> " << std::endl;
24551  htmlFile << "<br>" << std::endl;
24552  htmlFile << "<h3> - pWm means pedestal Width. </h3> " << std::endl;
24553  htmlFile << "<br>" << std::endl;
24554  htmlFile << "</body> " << std::endl;
24555  htmlFile << "</html> " << std::endl;
24556  htmlFile.close();
24557 
24558  //======================================================================
24559 
24560  std::cout << "********" << std::endl;
24561  std::cout << "************ Start creating MAP html file: - rather long time needed, waiting please" << std::endl;
24562  //======================================================================
24563  // Creating main html file:
24564  htmlFile.open("MAP.html");
24565  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
24566  htmlFile << "<head>" << std::endl;
24567  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
24568  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
24569  htmlFile << "<style type=\"text/css\">" << std::endl;
24570  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
24571  << std::endl;
24572  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
24573  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
24574  "text-align: center;}"
24575  << std::endl;
24576  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
24577  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
24578  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
24579  htmlFile << " td.s5 { font-family: arial, arial ce, helvetica; background-color: #FF00FF; }" << std::endl;
24580  htmlFile << " td.s6 { font-family: arial, arial ce, helvetica; background-color: #9ACD32; }" << std::endl;
24581  htmlFile << " td.s7 { font-family: arial, arial ce, helvetica; background-color: #32CD32; }" << std::endl;
24582  htmlFile << "</style>" << std::endl;
24583  htmlFile << "<body>" << std::endl;
24584 
24585  htmlFile << "<h1> Remote Monitoring Tool, LED RUN = " << runnumber << ". </h1>" << std::endl;
24586  htmlFile << "<br>" << std::endl;
24587 
24588  htmlFile << "<h2> 1. Analysis results for subdetectors </h2>" << std::endl;
24589  htmlFile << "<table width=\"400\">" << std::endl;
24590  htmlFile << "<tr>" << std::endl;
24591 
24592  /*
24593  htmlFile << " <td><a href=\"HB.html\">HB</a></td>"<< std::endl;
24594  htmlFile << " <td><a href=\"HE.html\">HE</a></td>"<< std::endl;
24595  htmlFile << " <td><a href=\"HO.html\">HO</a></td>"<< std::endl;
24596  htmlFile << " <td><a href=\"HF.html\">HF</a></td>"<< std::endl;
24597 */
24598 
24599  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24600  << "/HB.html\">HB</a></td>" << std::endl;
24601  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24602  << "/HE.html\">HE</a></td>" << std::endl;
24603  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24604  << "/HO.html\">HO</a></td>" << std::endl;
24605  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24606  << "/HF.html\">HF</a></td>" << std::endl;
24607 
24608  htmlFile << "</tr>" << std::endl;
24609  htmlFile << "</table>" << std::endl;
24610  htmlFile << "<br>" << std::endl;
24611 
24612  htmlFile << "<h2> 2. Amplitude summed over all sub-detector channels vs first 1000 events of this Run </h2>"
24613  << std::endl;
24614  htmlFile << "<h3> 2.A. Total subdetector Amplitude vs iEvent </h3>" << std::endl;
24615  htmlFile << " <img src=\"EVENTDEPENDENCE.png\" />" << std::endl;
24616  htmlFile << "<br>" << std::endl;
24617  htmlFile << "<br>" << std::endl;
24618  htmlFile << "<br>" << std::endl;
24619 
24620  htmlFile << "<h2> 3. HCAL status over all criteria and subdetectors </h2>" << std::endl;
24621  htmlFile << "<h3> 3.A. Channels in detector space </h3>" << std::endl;
24622  htmlFile << "<h4> Legend for channel status: green - good, red - bad, yellow - at least 2% gain drift, white - not "
24623  "applicable or out of range </h4>"
24624  << std::endl;
24625  htmlFile << " <img src=\"MAP.png\" />" << std::endl;
24626  htmlFile << "<br>" << std::endl;
24627  htmlFile << "<br>" << std::endl;
24628 
24629  htmlFile << "<h3> 3.B. List of Bad channels </h3>" << std::endl;
24630 
24631  // htmlFile << " <td><a href=\"HELP.html\"> Description of criteria for bad channel selection</a></td>"<< std::endl;
24632  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24633  << "/HELP.html\"> Description of criteria for bad channel selection</a></td>" << std::endl;
24634  htmlFile << "<table>" << std::endl;
24635  htmlFile << "<tr>";
24636  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24637  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24638  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24639  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24640  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24641  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24642  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24643  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24644  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24645  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24646  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24647  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24648  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24649  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24650  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24651  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24652  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24653  htmlFile << "<td class=\"s5\" align=\"center\">RMT-criteria</td>" << std::endl;
24654  htmlFile << "</tr>" << std::endl;
24655 
24656  ind = 0;
24657 
24658  for (int i = 1; i <= NBad; i++) {
24659  if ((ind % 2) == 1) {
24660  raw_class = "<td class=\"s2\" align=\"center\">";
24661  raw_class1 = "<td class=\"s6\" align=\"center\">";
24662  } else {
24663  raw_class = "<td class=\"s3\" align=\"center\">";
24664  raw_class1 = "<td class=\"s7\" align=\"center\">";
24665  }
24666  const CellDB db;
24667  const CellDB ce = db.find("Eta", Eta[2][i]).find("Phi", Phi[2][i]).find("Depth", Depth[2][i]);
24668  if (ce.size() == 0) {
24669  // cout<<"Error: No such Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;
24670  continue;
24671  }
24672  // else if (ce.size()>1) { cout<<"Warning: More than one line correspond to such Eta="<< Eta[2][i] <<", Phi="<< Phi[2][i] <<", Depth="<< Depth[2][i] <<" in database"<<endl;}
24673 
24674  if (ce.size() >= 1) {
24675  htmlFile << "<tr>" << std::endl;
24676  htmlFile << "<td class=\"s1\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24677  htmlFile << raw_class << Eta[2][i] << "</td>" << std::endl;
24678  htmlFile << raw_class << Phi[2][i] << "</td>" << std::endl;
24679  htmlFile << raw_class << Depth[2][i] << "</td>" << std::endl;
24680  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24681  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24682  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24683  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24684  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24685  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24686  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24687  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24688  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24689  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24690  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24691  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24692  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24693  htmlFile << raw_class1 << Comment[2][i] << "</td>" << std::endl;
24694  htmlFile << "</tr>" << std::endl;
24695 
24696  ind += 1;
24697  }
24698  }
24699  htmlFile << "</table>" << std::endl;
24700  htmlFile << "<br>" << std::endl;
24701 
24702  htmlFile << "<h3> 2.C.List of Gain unstable channels </h3>" << std::endl;
24703  // htmlFile << " <td><a href=\"HELP.html\"> Description of criteria for bad channel selection</a></td>"<< std::endl;
24704  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24705  << "/HELP.html\"> Description of criteria for bad channel selection</a></td>" << std::endl;
24706 
24707  htmlFile << "<table>" << std::endl;
24708  htmlFile << "<tr>";
24709  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24710  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24711  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24712  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24713  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24714  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24715  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24716  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24717  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24718  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24719  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24720  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24721  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24722  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24723  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24724  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24725  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24726  htmlFile << "<td class=\"s5\" align=\"center\">Failed criteria</td>" << std::endl;
24727  htmlFile << "</tr>" << std::endl;
24728 
24729  for (int i = 1; i <= NWarn; i++) {
24730  if ((ind % 2) == 1) {
24731  raw_class = "<td class=\"s2\" align=\"center\">";
24732  raw_class1 = "<td class=\"s6\" align=\"center\">";
24733  } else {
24734  raw_class = "<td class=\"s3\" align=\"center\">";
24735  raw_class1 = "<td class=\"s7\" align=\"center\">";
24736  }
24737  const CellDB db;
24738  const CellDB ce = db.find("Eta", Eta[1][i]).find("Phi", Phi[1][i]).find("Depth", Depth[1][i]);
24739  if (ce.size() == 0) {
24740  // cout<<"Error: No such Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;
24741  continue;
24742  }
24743  // else if (ce.size()>1) { cout<<"Warning: More than one line correspond to such Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;}
24744 
24745  if (ce.size() >= 1) {
24746  htmlFile << "<tr>" << std::endl;
24747  htmlFile << "<td class=\"s1\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24748  htmlFile << raw_class << Eta[1][i] << "</td>" << std::endl;
24749  htmlFile << raw_class << Phi[1][i] << "</td>" << std::endl;
24750  htmlFile << raw_class << Depth[1][i] << "</td>" << std::endl;
24751  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24752  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24753  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24754  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24755  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24756  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24757  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24758  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24759  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24760  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24761  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24762  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24763  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24764  htmlFile << raw_class1 << Comment[1][i] << "</td>" << std::endl;
24765  htmlFile << "</tr>" << std::endl;
24766 
24767  ind += 1;
24768  }
24769  }
24770 
24771  htmlFile << "</table>" << std::endl;
24772  htmlFile << "<br>" << std::endl;
24773 
24774  htmlFile << "<h3> 2.D.List of channels with bad Pedestals </h3>" << std::endl;
24775  // htmlFile << " <td><a href=\"HELP.html\"> Description of criteria for bad channel selection</a></td>"<< std::endl;
24776  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/RMT/LED_" << runnumber
24777  << "/HELP.html\"> Description of criteria for bad channel selection</a></td>" << std::endl;
24778 
24779  htmlFile << "<table>" << std::endl;
24780  htmlFile << "<tr>";
24781  htmlFile << "<td class=\"s4\" align=\"center\">#</td>" << std::endl;
24782  htmlFile << "<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
24783  htmlFile << "<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
24784  htmlFile << "<td class=\"s1\" align=\"center\">DEPTH</td>" << std::endl;
24785  htmlFile << "<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
24786  htmlFile << "<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
24787  htmlFile << "<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
24788  htmlFile << "<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
24789  htmlFile << "<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
24790  htmlFile << "<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
24791  htmlFile << "<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
24792  htmlFile << "<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
24793  htmlFile << "<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
24794  htmlFile << "<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
24795  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
24796  htmlFile << "<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
24797  htmlFile << "<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
24798  htmlFile << "<td class=\"s5\" align=\"center\">Failed criteria</td>" << std::endl;
24799  htmlFile << "</tr>" << std::endl;
24800 
24801  for (int i = 1; i <= NPed; i++) {
24802  if ((ind % 2) == 1) {
24803  raw_class = "<td class=\"s2\" align=\"center\">";
24804  raw_class1 = "<td class=\"s6\" align=\"center\">";
24805  } else {
24806  raw_class = "<td class=\"s3\" align=\"center\">";
24807  raw_class1 = "<td class=\"s7\" align=\"center\">";
24808  }
24809  const CellDB db;
24810  const CellDB ce = db.find("Eta", Eta[3][i]).find("Phi", Phi[3][i]).find("Depth", Depth[3][i]);
24811  if (ce.size() == 0) {
24812  // cout<<"Error: No such Eta="<< Eta[3][i] << ", Phi="<< Phi[3][i] <<", Depth="<< Depth[3][i] <<" in database"<<endl;
24813  continue;
24814  }
24815  // else if (ce.size()>1) { cout<<"Warning: More than one line correspond to such Eta="<< Eta[1][i] <<", Phi="<< Phi[1][i] <<", Depth="<< Depth[1][i] <<" in database"<<endl;}
24816 
24817  if (ce.size() >= 1) {
24818  htmlFile << "<tr>" << std::endl;
24819  htmlFile << "<td class=\"s1\" align=\"center\">" << ind + 1 << "</td>" << std::endl;
24820  htmlFile << raw_class << Eta[3][i] << "</td>" << std::endl;
24821  htmlFile << raw_class << Phi[3][i] << "</td>" << std::endl;
24822  htmlFile << raw_class << Depth[3][i] << "</td>" << std::endl;
24823  htmlFile << raw_class << ce[0].RBX << "</td>" << std::endl;
24824  htmlFile << raw_class << ce[0].RM << "</td>" << std::endl;
24825  htmlFile << raw_class << ce[0].Pixel << "</td>" << std::endl;
24826  htmlFile << raw_class << ce[0].RMfiber << "</td>" << std::endl;
24827  htmlFile << raw_class << ce[0].FiberCh << "</td>" << std::endl;
24828  htmlFile << raw_class << ce[0].QIE << "</td>" << std::endl;
24829  htmlFile << raw_class << ce[0].ADC << "</td>" << std::endl;
24830  htmlFile << raw_class << ce[0].VMECardID << "</td>" << std::endl;
24831  htmlFile << raw_class << ce[0].dccID << "</td>" << std::endl;
24832  htmlFile << raw_class << ce[0].Spigot << "</td>" << std::endl;
24833  htmlFile << raw_class << ce[0].FiberIndex << "</td>" << std::endl;
24834  htmlFile << raw_class << ce[0].HtrSlot << "</td>" << std::endl;
24835  htmlFile << raw_class << ce[0].HtrTB << "</td>" << std::endl;
24836  htmlFile << raw_class1 << Comment[3][i] << "</td>" << std::endl;
24837  htmlFile << "</tr>" << std::endl;
24838 
24839  ind += 1;
24840  }
24841  }
24842 
24843  htmlFile << "</table>" << std::endl;
24844 
24845  htmlFile << "</body> " << std::endl;
24846  htmlFile << "</html> " << std::endl;
24847  htmlFile.close();
24848  //======================================================================
24849 
24850  //======================================================================
24851  // Close and delete all possible things:
24852  hfile->Close();
24853  // hfile->Delete();
24854  // Exit Root
24855  gSystem->Exit(0);
24856  //======================================================================
24857 }
const int nphi
int size() const
#define MAX(n, d)
Definition: nnet_common.h:9
#define MIN(n, d)
Definition: nnet_common.h:8
const int nsub
const int neta
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
string fname
main script
float x
const int ndepth
#define str(s)