CMS 3D CMS Logo

Functions
RemoteMonitoringPSM.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[] 
)

===============================================================================================================================================================================================


variant2: for each run define phi-averaged A for normalization channel (Dref,16) and then, divide Rijk on it, i.e. get RRijk




















































































eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=29 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=28

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

Prepare maps of good/bad channels:

Definition at line 23 of file RemoteMonitoringPSM.cc.

References dir2webdir::argc, GCPpyPlots::argv, HLT_2024v12_cff::cap, gather_cfg::cout, DeadROC_duringRun::dir, alignmentValidation::fname, mps_fire::i, dqmiolumiharvest::j, METSignificanceParams_cfi::jeta, dqmdumpme::k, MAX, MIN, ndepth, neta, nphi, nsub, cond::runnumber, SiStripCommissioningClient_cfg::runtype, str, AlCaHLTBitMon_QueryRunRegistry::string, ctpps_dqm_sourceclient-live_cfg::test, and x.

23  {
24  std::string dirnm = "Analyzer";
25  gROOT->Reset();
26  gROOT->SetStyle("Plain");
27  gStyle->SetOptStat(0);
28  gStyle->SetOptTitle(1);
29  // ok change
30  if (argc < 3)
31  return 1;
32  char fname[300];
33  char refname[300];
34  char runtypeC[300];
35  sprintf(fname, "%s", argv[1]);
36  sprintf(refname, "%s", argv[2]);
37  sprintf(runtypeC, "%s", argv[3]);
38  // std::cout<<fname<<" "<<refname<<" "<<runtypeC<<std::endl;
39  std::cout << " We are here to print fname refname runtypeC " << fname << " " << refname << " " << runtypeC
40  << std::endl;
41  // ok change
42 
43  //======================================================================
44  // Connect the input files, parameters and get the 2-d histogram in memory
45  string promt = (string)fname;
46  string runtype = (string)runtypeC;
47  string runnumber = "";
48  for (unsigned int i = promt.size() - 11; i < promt.size() - 5; i++)
49  runnumber += fname[i];
50  string refrunnumber = "";
51  promt = (string)refname;
52  for (unsigned int i = promt.size() - 11; i < promt.size() - 5; i++)
53  refrunnumber += refname[i];
54 
55  TFile* hfile = new TFile(fname, "READ");
56  hfile->ls();
57  TDirectory* dir = (TDirectory*)hfile->FindObjectAny(dirnm.c_str());
58 
59  TFile* hreffile = new TFile(refname, "READ");
60  hreffile->ls();
61  TDirectory* refdir = (TDirectory*)hreffile->FindObjectAny(dirnm.c_str());
62 
63  // with TfileService implementation, change everywhere below: hreffile->Get to refdir->FindObjectAny
64  // with TfileService implementation, change everywhere below: hfile->Get to dir->FindObjectAny
65 
66  double MIN_M[7][5];
67  double MAX_M[7][5];
68  double MIN_C[7][5];
69  double MAX_C[7][5];
70  double porog[5];
71  double Pedest[2][5];
72 
73  if (runtype == "LED") {
74  //CUTS: [test][subdetector] ADC amplitude Am Width for Wm Ratio cut for Rm TS mean for TNm TS max for TXm
75  double MIN_M_LED[7][5] = {{0., 0., 0., 0., 0.},
76  {0., 0., 0., 0., 0.},
77  {0, 100., 70., 40., 40.},
78  {0, 0.7, 0.7, 0.1, 0.1},
79  {0, 0.7, 0.6, 0.40, 0.45},
80  {0, 2.5, 1.0, 1.0, 1.0},
81  {0, 1.5, 1.5, 0.5, 0.5}};
82  double MAX_M_LED[7][5] = {{0., 0., 0., 0., 0.},
83  {0., 0., 0., 0., 0.},
84  {0, 3000, 500000, 3000, 150000},
85  {0, 2.5, 2.5, 2.8, 2.6},
86  {0, 0.94, 0.95, 1.04, 1.02},
87  {0, 5.5, 5.2, 4.8, 4.2},
88  {0, 6.5, 6.5, 8.5, 8.5}};
89  double MIN_C_LED[7][5] = {{0., 0., 0., 0., 0.},
90  {0., 0., 0., 0., 0.},
91  {0, 1000., 1000., 1000., 100.},
92  {0, 1.3, 1.3, 0.7, 0.3},
93  {0, 0.76, 0.76, 0.85, 0.5},
94  {0, 2.4, 2.4, 1.5, 3.5},
95  {0, 1.5, 1.5, 1.5, 3.5}};
96  double MAX_C_LED[7][5] = {{0., 0., 0., 0., 0.},
97  {0., 0., 0., 0., 0.},
98  {0, 1E20, 1E20, 1E20, 1E20},
99  {0, 1.9, 1.9, 1.65, 1.5},
100  {0, 0.94, 0.94, 0.99, 0.8},
101  {0, 3.7, 3.7, 2.7, 4.5},
102  {0, 2.5, 2.5, 2.5, 4.5}};
103  double porog_LED[5] = {0., 2., 2., 2., 2.}; // Cut for GS test in pro cents
104  double Pedest_LED[2][5] = {{0., 0.1, 0.6, 0.1, 0.8},
105  {0., 0.1, 0.1, 0.1, 0.4}}; //Cuts for Pedestal and pedestal Width
106  for (int i = 0; i <= 6; i++)
107  for (int j = 0; j <= 4; j++) {
108  MIN_M[i][j] = MIN_M_LED[i][j];
109  MAX_M[i][j] = MAX_M_LED[i][j];
110  MIN_C[i][j] = MIN_C_LED[i][j];
111  MAX_C[i][j] = MAX_C_LED[i][j];
112  }
113  for (int i = 0; i <= 4; i++) {
114  porog[i] = porog_LED[i];
115  Pedest[0][i] = Pedest_LED[0][i];
116  Pedest[1][i] = Pedest_LED[1][i];
117  }
118  }
119 
120  if (runtype == "LASER") {
121  //CUTS: [test][subdetector] ADC amplitude Am Width for Wm Ratio cut for Rm TS mean for TNm TS max for TXm
122  double MIN_M_LASER[7][5] = {{0., 0., 0., 0., 0.},
123  {0., 0., 0., 0., 0.},
124  {0, 40., 40., 100., 40.},
125  {0, 0.3, 0.9, 0.2, 0.2},
126  {0, 0.5, 0.55, 0.55, 0.60},
127  {0, 5.0, 2.5, 1.1, 5.5},
128  {0, 1.5, 1.5, 1.5, 1.5}};
129  double MAX_M_LASER[7][5] = {{0., 0., 0., 0., 0.},
130  {0., 0., 0., 0., 0.},
131  {0, 3500, 350000, 3500, 150000},
132  {0, 2.5, 3.6, 2.6, 2.1},
133  {0, 1.00, 1.00, 1.04, 1.02},
134  {0, 7.5, 6.5, 4.4, 8.5},
135  {0, 8.5, 8.5, 6.5, 8.5}};
136  double MIN_C_LASER[7][5] = {{0., 0., 0., 0., 0.},
137  {0., 0., 0., 0., 0.},
138  {0, 1000., 1000., 1000., 100.},
139  {0, 1.3, 1.3, 0.7, 0.3},
140  {0, 0.76, 0.76, 0.85, 0.5},
141  {0, 2.4, 2.4, 1.5, 3.5},
142  {0, 1.5, 1.5, 1.5, 3.5}};
143  double MAX_C_LASER[7][5] = {{0., 0., 0., 0., 0.},
144  {0., 0., 0., 0., 0.},
145  {0, 1E20, 1E20, 1E20, 1E20},
146  {0, 1.9, 1.9, 1.65, 1.5},
147  {0, 0.94, 0.94, 1.0, 0.8},
148  {0, 3.7, 3.7, 2.7, 4.5},
149  {0, 2.5, 2.5, 2.5, 4.5}};
150  double porog_LASER[5] = {0., 2., 2., 2., 2.}; // Cut for GS test in pro cents
151  // double porog_LASER[5] = {0., 200., 200., 100., 100.}; // Cut for GS test in pro cents
152  double Pedest_LASER[2][5] = {{0., 0.1, 0.6, 0.1, 0.8},
153  {0., 0.1, 0.1, 0.1, 0.4}}; //Cuts for Pedestal and pedestal Width
154  for (int i = 0; i <= 6; i++)
155  for (int j = 0; j <= 4; j++) {
156  MIN_M[i][j] = MIN_M_LASER[i][j];
157  MAX_M[i][j] = MAX_M_LASER[i][j];
158  MIN_C[i][j] = MIN_C_LASER[i][j];
159  MAX_C[i][j] = MAX_C_LASER[i][j];
160  }
161  for (int i = 0; i <= 4; i++) {
162  porog[i] = porog_LASER[i];
163  Pedest[0][i] = Pedest_LASER[0][i];
164  Pedest[1][i] = Pedest_LASER[1][i];
165  }
166  }
167 
168  if (runtype == "PEDESTAL") {
169  //CUTS: [test][subdetector] ADC amplitude Am Width for Wm Ratio cut for Rm TS mean for TNm TS max for TXm
170  double MIN_M_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
171  {0., 0., 0., 0., 0.},
172  {0, 10., 10., 200., 5.},
173  {0, 2.7, 2.7, 2.7, 0.2},
174  {0, 0.31, 0.31, 0.05, 0.15},
175  {0, 4.5, 4.5, 4.5, 2.0},
176  {0, 0.5, 0.5, 0.5, 0.5}};
177  double MAX_M_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
178  {0., 0., 0., 0., 0.},
179  {0, 2500., 250000., 2500., 150000.},
180  {0, 3.0, 3.0, 5.0, 3.0},
181  {0, 0.95, 0.95, 1.00, 0.98},
182  {0, 4.6, 4.6, 4.6, 7.0},
183  {0, 9.5, 9.5, 8.5, 8.5}};
184  double MIN_C_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
185  {0., 0., 0., 0., 0.},
186  {0, 1000., 1000., 1000., 100.},
187  {0, 1.3, 1.3, 0.7, 0.3},
188  {0, 0.76, 0.76, 0.85, 0.5},
189  {0, 2.4, 2.4, 1.5, 3.5},
190  {0, 1.5, 1.5, 1.5, 3.5}};
191  double MAX_C_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
192  {0., 0., 0., 0., 0.},
193  {0, 1E20, 1E20, 1E20, 1E20},
194  {0, 1.9, 1.9, 1.65, 1.5},
195  {0, 0.94, 0.94, 1.0, 0.8},
196  {0, 3.7, 3.7, 2.7, 4.5},
197  {0, 2.5, 2.5, 2.5, 4.5}};
198  double porog_PEDESTAL[5] = {0., 2., 2., 2., 2.}; // Cut for GS test in pro cents
199  // double porog_PEDESTAL[5] = {0., 200., 200., 100., 100.}; // Cut for GS test in pro cents
200  double Pedest_PEDESTAL[2][5] = {{0., 0.1, 0.6, 0.1, 0.8},
201  {0., 0.1, 0.1, 0.1, 0.4}}; //Cuts for Pedestal and pedestal Width
202  for (int i = 0; i <= 6; i++)
203  for (int j = 0; j <= 4; j++) {
204  MIN_M[i][j] = MIN_M_PEDESTAL[i][j];
205  MAX_M[i][j] = MAX_M_PEDESTAL[i][j];
206  MIN_C[i][j] = MIN_C_PEDESTAL[i][j];
207  MAX_C[i][j] = MAX_C_PEDESTAL[i][j];
208  }
209  for (int i = 0; i <= 4; i++) {
210  porog[i] = porog_PEDESTAL[i];
211  Pedest[0][i] = Pedest_PEDESTAL[0][i];
212  Pedest[1][i] = Pedest_PEDESTAL[1][i];
213  }
214  }
215 
216  if (runtype == "Global") {
217  //CUTS: [test][subdetector] ADC amplitude Am Width for Wm Ratio cut for Rm TS mean for TNm TS max for TXm
218  double MIN_M_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
219  {0., 0., 0., 0., 0.},
220  {0, 10., 10., 200., 5.},
221  {0, 2.7, 2.7, 2.7, 0.2},
222  {0, 0.31, 0.31, 0.05, 0.15},
223  {0, 4.5, 4.5, 4.5, 2.0},
224  {0, 0.5, 0.5, 0.5, 0.5}};
225  double MAX_M_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
226  {0., 0., 0., 0., 0.},
227  {0, 2500., 250000., 2500., 150000.},
228  {0, 3.0, 3.0, 5.0, 3.0},
229  {0, 0.95, 0.95, 1.00, 0.98},
230  {0, 4.6, 4.6, 4.6, 7.0},
231  {0, 9.5, 9.5, 8.5, 8.5}};
232  double MIN_C_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
233  {0., 0., 0., 0., 0.},
234  {0, 1000., 1000., 1000., 100.},
235  {0, 1.3, 1.3, 0.7, 0.3},
236  {0, 0.76, 0.76, 0.85, 0.5},
237  {0, 2.4, 2.4, 1.5, 3.5},
238  {0, 1.5, 1.5, 1.5, 3.5}};
239  double MAX_C_PEDESTAL[7][5] = {{0., 0., 0., 0., 0.},
240  {0., 0., 0., 0., 0.},
241  {0, 1E20, 1E20, 1E20, 1E20},
242  {0, 1.9, 1.9, 1.65, 1.5},
243  {0, 0.94, 0.94, 1.0, 0.8},
244  {0, 3.7, 3.7, 2.7, 4.5},
245  {0, 2.5, 2.5, 2.5, 4.5}};
246  double porog_PEDESTAL[5] = {0., 2., 2., 2., 2.}; // Cut for GS test in pro cents
247  // double porog_PEDESTAL[5] = {0., 200., 200., 100., 100.}; // Cut for GS test in pro cents
248  double Pedest_PEDESTAL[2][5] = {{0., 0.1, 0.6, 0.1, 0.8},
249  {0., 0.1, 0.1, 0.1, 0.4}}; //Cuts for Pedestal and pedestal Width
250  for (int i = 0; i <= 6; i++)
251  for (int j = 0; j <= 4; j++) {
252  MIN_M[i][j] = MIN_M_PEDESTAL[i][j];
253  MAX_M[i][j] = MAX_M_PEDESTAL[i][j];
254  MIN_C[i][j] = MIN_C_PEDESTAL[i][j];
255  MAX_C[i][j] = MAX_C_PEDESTAL[i][j];
256  }
257  for (int i = 0; i <= 4; i++) {
258  porog[i] = porog_PEDESTAL[i];
259  Pedest[0][i] = Pedest_PEDESTAL[0][i];
260  Pedest[1][i] = Pedest_PEDESTAL[1][i];
261  }
262  }
263 
264  //======================================================================
265  // Prepare histograms and plot them to .png files
266 
267  //TCanvas *cHB = new TCanvas("cHB","cHB",1000,500);
268  TCanvas* cHB = new TCanvas("cHB", "cHB", 1000, 1000);
269  //TCanvas *cHE = new TCanvas("cHE","cHE",1500,500);
270  TCanvas* cHE = new TCanvas("cHE", "cHE", 1500, 1500);
271  //TCanvas *cONE = new TCanvas("cONE","cONE",500,500);
272  TCanvas* cONE = new TCanvas("cONE", "cONE", 1500, 500);
273  TCanvas* cPED = new TCanvas("cPED", "cPED", 1000, 500);
274  //TCanvas *cHF = new TCanvas("cHF","cHF",1000,1000);
275  TCanvas* cHF = new TCanvas("cHF", "cHF", 1000, 1000);
276 
277  // Phi-symmetry for Calibration Group:
278 
279  TCanvas* c1x0 = new TCanvas("c1x0", "c1x0", 300, 10, 800, 700);
280 
281  TCanvas* c1x1 = new TCanvas("c1x1", "c1x1", 100, 10, 600, 700);
282 
283  TCanvas* c2x1 = new TCanvas("c2x1", "c2x1", 200, 300, 1600, 800);
284 
285  TCanvas* c3x5 = new TCanvas("c3x5", "c3x5", 1000, 1500);
286  //
287 
288  char* str = (char*)alloca(10000);
289 
290  // before upgrade 2017:
291  // depth: HB depth1,2; HE depth1,2,3; HO depth4; HF depth1,2
292  // 5 depthes: 0(empty), 1,2,3,4
293 
294  // upgrade 2017:
295  // depth: HB depth1,2; HE depth1,2,3,4,5,6,7; HO depth4; HF depth1,2,3,4
296  // 8 depthes: 0(empty), 1,2,3,4,5,6,7
297 
298  // upgrade 2021:
299  // depth: HB depth1,2,3,4; HE depth1,2,3,4,5,6,7; HO depth4; HF depth1,2,3,4
300  // 10 depthes: 0(empty), 1,2,3,4,5,6,7,8,9
301 
302  // Int_t ALLDEPTH = 5;
303  // Int_t ALLDEPTH = 8;
304  Int_t ALLDEPTH = 10;
305 
306  int k_min[5] = {0, 1, 1, 4, 1}; // minimum depth for each subdet
307  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
308  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
309  int k_max[5] = {0, 4, 7, 4, 4}; // maximum depth for each subdet
310 
311  TH2F* Map_Ampl[33][5][ALLDEPTH]; // 2D histogramm for test,subdet,depth
312  TH2F* Map_SUB[5][ALLDEPTH]; // 2d histogramm for subdet, depth
313  TH1F* HistAmplDepth[22][5][ALLDEPTH]; // 1d histogramm for test,subdet, depth
314  TH1F* HistAmpl[22][5]; // 1d histogramm for test,subdet
315 
316  TH1F* HistPed[3][5][4]; // 1d histogramm for test,subdet, CapID
317  TH2F* Map_Ped[3][5]; // 2d histogramm for test,subdet -> test 33
318  TH1F* hist_GoodTSshape[5]; // 1d histogramm for TS shape subdet -> test 41
319  TH1F* hist_GoodTSshape0[5]; // 1d histogramm for TS shape subdet -> test 41
320  TH1F* hist_BadTSshape[5]; // 1d histogramm for TS shape subdet -> test 41
321  TH1F* hist_BadTSshape0[5]; // 1d histogramm for TS shape subdet -> test 41
322  TH1F* hist_ADC_All[5]; // 1d histogramm for TS shape subdet -> test 42
323  TH1F* hist_ADC_DS[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 42
324  TH1F* hist_SumADC[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 43
325  TH1F* hist_SumADC0[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 43
326  TH1F* hist_SumADC1[5][ALLDEPTH]; // 1d histogramm for TS shape subdet, depth -> test 43
327 
328  Map_SUB[1][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1_HB");
329  Map_SUB[1][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2_HB");
330  Map_SUB[2][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1_HE");
331  Map_SUB[2][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2_HE");
332  Map_SUB[2][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3_HE");
333  Map_SUB[3][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4_HO");
334  Map_SUB[4][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1_HF");
335  Map_SUB[4][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2_HF");
336 
337  Map_SUB[1][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3_HB");
338  Map_SUB[1][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4_HB");
339  Map_SUB[2][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4_HE");
340  Map_SUB[2][5] = (TH2F*)dir->FindObjectAny("h_mapDepth5_HE");
341  Map_SUB[2][6] = (TH2F*)dir->FindObjectAny("h_mapDepth6_HE");
342  Map_SUB[2][7] = (TH2F*)dir->FindObjectAny("h_mapDepth7_HE");
343  Map_SUB[4][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3_HF");
344  Map_SUB[4][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4_HF");
345 
346  //+++++++++++++++++++++++++++++
347  //Test 0 Entries
348  //+++++++++++++++++++++++++++++
349 
350  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
351  // if (sub==1) cHB->Divide(2,1);
352  if (sub == 1)
353  cHB->Divide(2, 2);
354  // if (sub==2) cHE->Divide(3,1);
355  if (sub == 2)
356  cHE->Divide(3, 3);
357  if (sub == 3)
358  cONE->Divide(1, 1);
359  // if (sub==4) cHF->Divide(2,1);
360  if (sub == 4)
361  cHF->Divide(2, 2);
362  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
363  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
364  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
365  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
366  if (sub == 1)
367  cHB->cd(k);
368  if (sub == 2)
369  cHE->cd(k);
370  if (sub == 3)
371  cONE->cd(k - 3);
372  if (sub == 4)
373  cHF->cd(k);
374  gPad->SetGridy();
375  gPad->SetGridx();
376  gPad->SetLogz();
377  if (sub == 1)
378  sprintf(str, "HB, Depth%d \b", k);
379  if (sub == 2)
380  sprintf(str, "HE, Depth%d \b", k);
381  if (sub == 3)
382  sprintf(str, "HO, Depth%d \b", k);
383  if (sub == 4)
384  sprintf(str, "HF, Depth%d \b", k);
385  Map_SUB[sub][k]->SetTitle(str);
386  Map_SUB[sub][k]->SetXTitle("#eta \b");
387  Map_SUB[sub][k]->SetYTitle("#phi \b");
388  Map_SUB[sub][k]->SetZTitle("Number of events \b");
389  if (sub == 3)
390  Map_SUB[sub][k]->SetTitleOffset(0.8, "Z");
391  Map_SUB[sub][k]->Draw("COLZ");
392  Map_SUB[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
393  // Map_SUB[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
394  if (sub == 1) {
395  cHB->Modified();
396  cHB->Update();
397  }
398  if (sub == 2) {
399  cHE->Modified();
400  cHE->Update();
401  }
402  if (sub == 3) {
403  cONE->Modified();
404  cONE->Update();
405  }
406  if (sub == 4) {
407  cHF->Modified();
408  cHF->Update();
409  }
410  } //end depth
411 
412  if (sub == 1) {
413  cHB->Print("MapRateEntryHB.png");
414  cHB->Clear();
415  }
416  if (sub == 2) {
417  cHE->Print("MapRateEntryHE.png");
418  cHE->Clear();
419  }
420  if (sub == 3) {
421  cONE->Print("MapRateEntryHO.png");
422  cONE->Clear();
423  }
424  if (sub == 4) {
425  cHF->Print("MapRateEntryHF.png");
426  cHF->Clear();
427  }
428  } // end sub
429 
430  //+++++++++++++++++++++++++++++
431  //Test 1 (Cm) Rate of Cap ID errors
432  //+++++++++++++++++++++++++++++
433 
434  Map_Ampl[1][1][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1Error_HB");
435  Map_Ampl[1][1][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2Error_HB");
436  Map_Ampl[1][2][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1Error_HE");
437  Map_Ampl[1][2][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2Error_HE");
438  Map_Ampl[1][2][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3Error_HE");
439  Map_Ampl[1][3][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Error_HO");
440  Map_Ampl[1][4][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1Error_HF");
441  Map_Ampl[1][4][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2Error_HF");
442 
443  Map_Ampl[1][1][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3Error_HB");
444  Map_Ampl[1][1][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Error_HB");
445  Map_Ampl[1][2][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Error_HE");
446  Map_Ampl[1][2][5] = (TH2F*)dir->FindObjectAny("h_mapDepth5Error_HE");
447  Map_Ampl[1][2][6] = (TH2F*)dir->FindObjectAny("h_mapDepth6Error_HE");
448  Map_Ampl[1][2][7] = (TH2F*)dir->FindObjectAny("h_mapDepth7Error_HE");
449  Map_Ampl[1][4][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3Error_HF");
450  Map_Ampl[1][4][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Error_HF");
451 
452  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
453  // if (sub==1) cHB->Divide(2,1);
454  if (sub == 1)
455  cHB->Divide(2, 2);
456  // if (sub==2) cHE->Divide(3,1);
457  if (sub == 2)
458  cHE->Divide(3, 3);
459  if (sub == 3)
460  cONE->Divide(1, 1);
461  // if (sub==4) cHF->Divide(2,1);
462  if (sub == 4)
463  cHF->Divide(2, 2);
464  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
465  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
466  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
467  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
468  if (sub == 1)
469  cHB->cd(k);
470  if (sub == 2)
471  cHE->cd(k);
472  if (sub == 3)
473  cONE->cd(k - 3);
474  if (sub == 4)
475  cHF->cd(k);
476  Map_Ampl[1][sub][k]->Divide(Map_Ampl[1][sub][k], Map_SUB[sub][k], 1, 1, "B");
477  gPad->SetGridy();
478  gPad->SetGridx();
479  gPad->SetLogz();
480  if (sub == 1)
481  sprintf(str, "HB, Depth%d \b", k);
482  if (sub == 2)
483  sprintf(str, "HE, Depth%d \b", k);
484  if (sub == 3)
485  sprintf(str, "HO, Depth%d \b", k);
486  if (sub == 4)
487  sprintf(str, "HF, Depth%d \b", k);
488  Map_Ampl[1][sub][k]->SetTitle(str);
489  Map_Ampl[1][sub][k]->SetXTitle("#eta \b");
490  Map_Ampl[1][sub][k]->SetYTitle("#phi \b");
491  Map_Ampl[1][sub][k]->SetZTitle("Rate \b");
492  if (sub == 3)
493  Map_Ampl[1][sub][k]->SetTitleOffset(0.8, "Z");
494  Map_Ampl[1][sub][k]->Draw("COLZ");
495  Map_Ampl[1][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
496  Map_Ampl[1][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
497  if (sub == 1) {
498  cHB->Modified();
499  cHB->Update();
500  }
501  if (sub == 2) {
502  cHE->Modified();
503  cHE->Update();
504  }
505  if (sub == 3) {
506  cONE->Modified();
507  cONE->Update();
508  }
509  if (sub == 4) {
510  cHF->Modified();
511  cHF->Update();
512  }
513  } //end depth
514 
515  if (sub == 1) {
516  cHB->Print("MapRateCapIDHB.png");
517  cHB->Clear();
518  }
519  if (sub == 2) {
520  cHE->Print("MapRateCapIDHE.png");
521  cHE->Clear();
522  }
523  if (sub == 3) {
524  cONE->Print("MapRateCapIDHO.png");
525  cONE->Clear();
526  }
527  if (sub == 4) {
528  cHF->Print("MapRateCapIDHF.png");
529  cHF->Clear();
530  }
531  } // end sub
532 
533  //+++++++++++++++++++++++++++++
534  //Test 2 (Am) ADC amplitude
535  //+++++++++++++++++++++++++++++
536 
537  Map_Ampl[2][1][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1ADCAmpl225_HB");
538  Map_Ampl[2][1][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2ADCAmpl225_HB");
539  Map_Ampl[2][2][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1ADCAmpl225_HE");
540  Map_Ampl[2][2][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2ADCAmpl225_HE");
541  Map_Ampl[2][2][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3ADCAmpl225_HE");
542  Map_Ampl[2][3][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4ADCAmpl225_HO");
543  Map_Ampl[2][4][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1ADCAmpl225_HF");
544  Map_Ampl[2][4][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2ADCAmpl225_HF");
545 
546  Map_Ampl[2][1][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3ADCAmpl225_HB");
547  Map_Ampl[2][1][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4ADCAmpl225_HB");
548  Map_Ampl[2][2][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4ADCAmpl225_HE");
549  Map_Ampl[2][2][5] = (TH2F*)dir->FindObjectAny("h_mapDepth5ADCAmpl225_HE");
550  Map_Ampl[2][2][6] = (TH2F*)dir->FindObjectAny("h_mapDepth6ADCAmpl225_HE");
551  Map_Ampl[2][2][7] = (TH2F*)dir->FindObjectAny("h_mapDepth7ADCAmpl225_HE");
552  Map_Ampl[2][4][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3ADCAmpl225_HF");
553  Map_Ampl[2][4][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4ADCAmpl225_HF");
554 
555  HistAmpl[2][1] = (TH1F*)dir->FindObjectAny("h_ADCAmpl_HB");
556  HistAmpl[2][2] = (TH1F*)dir->FindObjectAny("h_ADCAmpl_HE");
557  HistAmpl[2][3] = (TH1F*)dir->FindObjectAny("h_ADCAmpl_HO");
558  HistAmpl[2][4] = (TH1F*)dir->FindObjectAny("h_ADCAmpl_HF");
559 
560  //+++++++++++++++++++++++++++++
561  //Test 3 (Wm) Rate of RMS
562  //+++++++++++++++++++++++++++++
563 
564  Map_Ampl[3][1][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1Amplitude225_HB");
565  Map_Ampl[3][1][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2Amplitude225_HB");
566  Map_Ampl[3][2][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1Amplitude225_HE");
567  Map_Ampl[3][2][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2Amplitude225_HE");
568  Map_Ampl[3][2][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3Amplitude225_HE");
569  Map_Ampl[3][3][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Amplitude225_HO");
570  Map_Ampl[3][4][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1Amplitude225_HF");
571  Map_Ampl[3][4][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2Amplitude225_HF");
572 
573  Map_Ampl[3][1][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3Amplitude225_HB");
574  Map_Ampl[3][1][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Amplitude225_HB");
575  Map_Ampl[3][2][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Amplitude225_HE");
576  Map_Ampl[3][2][5] = (TH2F*)dir->FindObjectAny("h_mapDepth5Amplitude225_HE");
577  Map_Ampl[3][2][6] = (TH2F*)dir->FindObjectAny("h_mapDepth6Amplitude225_HE");
578  Map_Ampl[3][2][7] = (TH2F*)dir->FindObjectAny("h_mapDepth7Amplitude225_HE");
579  Map_Ampl[3][4][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3Amplitude225_HF");
580  Map_Ampl[3][4][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Amplitude225_HF");
581 
582  HistAmpl[3][1] = (TH1F*)dir->FindObjectAny("h_Amplitude_HB");
583  HistAmpl[3][2] = (TH1F*)dir->FindObjectAny("h_Amplitude_HE");
584  HistAmpl[3][3] = (TH1F*)dir->FindObjectAny("h_Amplitude_HO");
585  HistAmpl[3][4] = (TH1F*)dir->FindObjectAny("h_Amplitude_HF");
586 
587  //+++++++++++++++++++++++++++++
588  //Test 4 (Rm) Rate of ratio 4 near max TS/ All TS
589  //+++++++++++++++++++++++++++++
590 
591  Map_Ampl[4][1][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1Ampl047_HB");
592  Map_Ampl[4][1][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2Ampl047_HB");
593  Map_Ampl[4][2][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1Ampl047_HE");
594  Map_Ampl[4][2][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2Ampl047_HE");
595  Map_Ampl[4][2][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3Ampl047_HE");
596  Map_Ampl[4][3][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Ampl047_HO");
597  Map_Ampl[4][4][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1Ampl047_HF");
598  Map_Ampl[4][4][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2Ampl047_HF");
599 
600  Map_Ampl[4][1][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3Ampl047_HB");
601  Map_Ampl[4][1][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Ampl047_HB");
602  Map_Ampl[4][2][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Ampl047_HE");
603  Map_Ampl[4][2][5] = (TH2F*)dir->FindObjectAny("h_mapDepth5Ampl047_HE");
604  Map_Ampl[4][2][6] = (TH2F*)dir->FindObjectAny("h_mapDepth6Ampl047_HE");
605  Map_Ampl[4][2][7] = (TH2F*)dir->FindObjectAny("h_mapDepth7Ampl047_HE");
606  Map_Ampl[4][4][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3Ampl047_HF");
607  Map_Ampl[4][4][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4Ampl047_HF");
608 
609  HistAmpl[4][1] = (TH1F*)dir->FindObjectAny("h_Ampl_HB");
610  HistAmpl[4][2] = (TH1F*)dir->FindObjectAny("h_Ampl_HE");
611  HistAmpl[4][3] = (TH1F*)dir->FindObjectAny("h_Ampl_HO");
612  HistAmpl[4][4] = (TH1F*)dir->FindObjectAny("h_Ampl_HF");
613 
614  //+++++++++++++++++++++++++++++
615  //Test 5 (TNm) Mean position in 1-8 TS range
616  //+++++++++++++++++++++++++++++
617 
618  Map_Ampl[5][1][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1TSmeanA225_HB");
619  Map_Ampl[5][1][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2TSmeanA225_HB");
620  Map_Ampl[5][2][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1TSmeanA225_HE");
621  Map_Ampl[5][2][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2TSmeanA225_HE");
622  Map_Ampl[5][2][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3TSmeanA225_HE");
623  Map_Ampl[5][3][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4TSmeanA225_HO");
624  Map_Ampl[5][4][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1TSmeanA225_HF");
625  Map_Ampl[5][4][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2TSmeanA225_HF");
626 
627  Map_Ampl[5][1][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3TSmeanA225_HB");
628  Map_Ampl[5][1][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4TSmeanA225_HB");
629  Map_Ampl[5][2][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4TSmeanA225_HE");
630  Map_Ampl[5][2][5] = (TH2F*)dir->FindObjectAny("h_mapDepth5TSmeanA225_HE");
631  Map_Ampl[5][2][6] = (TH2F*)dir->FindObjectAny("h_mapDepth6TSmeanA225_HE");
632  Map_Ampl[5][2][7] = (TH2F*)dir->FindObjectAny("h_mapDepth7TSmeanA225_HE");
633  Map_Ampl[5][4][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3TSmeanA225_HF");
634  Map_Ampl[5][4][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4TSmeanA225_HF");
635 
636  HistAmpl[5][1] = (TH1F*)dir->FindObjectAny("h_TSmeanA_HB");
637  HistAmpl[5][2] = (TH1F*)dir->FindObjectAny("h_TSmeanA_HE");
638  HistAmpl[5][3] = (TH1F*)dir->FindObjectAny("h_TSmeanA_HO");
639  HistAmpl[5][4] = (TH1F*)dir->FindObjectAny("h_TSmeanA_HF");
640 
641  //+++++++++++++++++++++++++++++
642  //Test 6 (TXm) Maximum position in 1-8 TS range
643  //+++++++++++++++++++++++++++++
644 
645  Map_Ampl[6][1][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1TSmaxA225_HB");
646  Map_Ampl[6][1][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2TSmaxA225_HB");
647  Map_Ampl[6][2][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1TSmaxA225_HE");
648  Map_Ampl[6][2][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2TSmaxA225_HE");
649  Map_Ampl[6][2][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3TSmaxA225_HE");
650  Map_Ampl[6][3][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4TSmaxA225_HO");
651  Map_Ampl[6][4][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1TSmaxA225_HF");
652  Map_Ampl[6][4][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2TSmaxA225_HF");
653 
654  Map_Ampl[6][1][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3TSmaxA225_HB");
655  Map_Ampl[6][1][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4TSmaxA225_HB");
656  Map_Ampl[6][2][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4TSmaxA225_HE");
657  Map_Ampl[6][2][5] = (TH2F*)dir->FindObjectAny("h_mapDepth5TSmaxA225_HE");
658  Map_Ampl[6][2][6] = (TH2F*)dir->FindObjectAny("h_mapDepth6TSmaxA225_HE");
659  Map_Ampl[6][2][7] = (TH2F*)dir->FindObjectAny("h_mapDepth7TSmaxA225_HE");
660  Map_Ampl[6][4][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3TSmaxA225_HF");
661  Map_Ampl[6][4][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4TSmaxA225_HF");
662 
663  HistAmpl[6][1] = (TH1F*)dir->FindObjectAny("h_TSmaxA_HB");
664  HistAmpl[6][2] = (TH1F*)dir->FindObjectAny("h_TSmaxA_HE");
665  HistAmpl[6][3] = (TH1F*)dir->FindObjectAny("h_TSmaxA_HO");
666  HistAmpl[6][4] = (TH1F*)dir->FindObjectAny("h_TSmaxA_HF");
667 
668  for (int test = 2; test <= 6; test++) { //Test: 2-Am, 3-Wm, 4-Rm, 5-TNm, 6-TXm,
669  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
670  // if (sub==1) cHB->Divide(2,1);
671  if (sub == 1)
672  cHB->Divide(2, 2);
673  // if (sub==2) cHE->Divide(3,1);
674  if (sub == 2)
675  cHE->Divide(3, 3);
676  if (sub == 3)
677  cONE->Divide(1, 1);
678  // if (sub==4) cHF->Divide(2,1);
679  if (sub == 4)
680  cHF->Divide(2, 2);
681  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
682  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
683  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
684  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
685  if (sub == 1)
686  cHB->cd(k);
687  if (sub == 2)
688  cHE->cd(k);
689  if (sub == 3)
690  cONE->cd(k - 3);
691  if (sub == 4)
692  cHF->cd(k);
693  Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_SUB[sub][k], 1, 1, "B");
694  gPad->SetGridy();
695  gPad->SetGridx();
696  gPad->SetLogz();
697  if (sub == 1)
698  sprintf(str, "HB, Depth%d \b", k);
699  if (sub == 2)
700  sprintf(str, "HE, Depth%d \b", k);
701  if (sub == 3)
702  sprintf(str, "HO, Depth%d \b", k);
703  if (sub == 4)
704  sprintf(str, "HF, Depth%d \b", k);
705  Map_Ampl[test][sub][k]->SetTitle(str);
706  Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
707  Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
708  Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
709  if (sub == 3)
710  Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
711  Map_Ampl[test][sub][k]->Draw("COLZ");
712  Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
713  Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
714  if (sub == 1) {
715  cHB->Modified();
716  cHB->Update();
717  }
718  if (sub == 2) {
719  cHE->Modified();
720  cHE->Update();
721  }
722  if (sub == 3) {
723  cONE->Modified();
724  cONE->Update();
725  }
726  if (sub == 4) {
727  cHF->Modified();
728  cHF->Update();
729  }
730  } //end depth
731  if (test == 2) {
732  if (sub == 1) {
733  cHB->Print("MapRateAmplHB.png");
734  cHB->Clear();
735  }
736  if (sub == 2) {
737  cHE->Print("MapRateAmplHE.png");
738  cHE->Clear();
739  }
740  if (sub == 3) {
741  cONE->Print("MapRateAmplHO.png");
742  cONE->Clear();
743  }
744  if (sub == 4) {
745  cHF->Print("MapRateAmplHF.png");
746  cHF->Clear();
747  }
748  }
749  if (test == 3) {
750  if (sub == 1) {
751  cHB->Print("MapRateRMSHB.png");
752  cHB->Clear();
753  }
754  if (sub == 2) {
755  cHE->Print("MapRateRMSHE.png");
756  cHE->Clear();
757  }
758  if (sub == 3) {
759  cONE->Print("MapRateRMSHO.png");
760  cONE->Clear();
761  }
762  if (sub == 4) {
763  cHF->Print("MapRateRMSHF.png");
764  cHF->Clear();
765  }
766  }
767  if (test == 4) {
768  if (sub == 1) {
769  cHB->Print("MapRate43TStoAllTSHB.png");
770  cHB->Clear();
771  }
772  if (sub == 2) {
773  cHE->Print("MapRate43TStoAllTSHE.png");
774  cHE->Clear();
775  }
776  if (sub == 3) {
777  cONE->Print("MapRate43TStoAllTSHO.png");
778  cONE->Clear();
779  }
780  if (sub == 4) {
781  cHF->Print("MapRate43TStoAllTSHF.png");
782  cHF->Clear();
783  }
784  }
785  if (test == 5) {
786  if (sub == 1) {
787  cHB->Print("MapRateMeanPosHB.png");
788  cHB->Clear();
789  }
790  if (sub == 2) {
791  cHE->Print("MapRateMeanPosHE.png");
792  cHE->Clear();
793  }
794  if (sub == 3) {
795  cONE->Print("MapRateMeanPosHO.png");
796  cONE->Clear();
797  }
798  if (sub == 4) {
799  cHF->Print("MapRateMeanPosHF.png");
800  cHF->Clear();
801  }
802  }
803  if (test == 6) {
804  if (sub == 1) {
805  cHB->Print("MapRateMaxPosHB.png");
806  cHB->Clear();
807  }
808  if (sub == 2) {
809  cHE->Print("MapRateMaxPosHE.png");
810  cHE->Clear();
811  }
812  if (sub == 3) {
813  cONE->Print("MapRateMaxPosHO.png");
814  cONE->Clear();
815  }
816  if (sub == 4) {
817  cHF->Print("MapRateMaxPosHF.png");
818  cHF->Clear();
819  }
820  }
821 
822  // cONE->Divide(1,1);
823  cONE->Divide(3, 1);
824  if (test == 2 && sub == 2) {
825  cONE->cd(2);
826  TH1F* kjkjkhj2 = (TH1F*)dir->FindObjectAny("h_AmplitudeHEtest1");
827  kjkjkhj2->Draw("");
828  kjkjkhj2->SetTitle("HE, All Depth: shunt1");
829  cONE->cd(3);
830  TH1F* kjkjkhj3 = (TH1F*)dir->FindObjectAny("h_AmplitudeHEtest6");
831  kjkjkhj3->Draw("");
832  kjkjkhj3->SetTitle("HE, All Depth: shunt6");
833  }
834  if (test == 2 && sub == 1) {
835  cONE->cd(2);
836  TH1F* kjkjkhb2 = (TH1F*)dir->FindObjectAny("h_AmplitudeHBtest1");
837  kjkjkhb2->Draw("");
838  kjkjkhb2->SetTitle("HB, All Depth: shunt1");
839  cONE->cd(3);
840  TH1F* kjkjkhb3 = (TH1F*)dir->FindObjectAny("h_AmplitudeHBtest6");
841  kjkjkhb3->Draw("");
842  kjkjkhb3->SetTitle("HB, All Depth: shunt6");
843  }
844  cONE->cd(1);
845  gPad->SetGridy();
846  gPad->SetGridx();
847  gPad->SetLogy();
848  if (sub == 1)
849  HistAmpl[test][sub]->SetTitle("HB, All Depth: shunt6");
850  if (sub == 2)
851  HistAmpl[test][sub]->SetTitle("HE, All Depth: shunt6");
852  if (sub == 3)
853  HistAmpl[test][sub]->SetTitle("HO, All Depth");
854  if (sub == 4)
855  HistAmpl[test][sub]->SetTitle("HF, All Depth");
856  if (test == 2)
857  HistAmpl[test][sub]->SetXTitle("ADC Amlitude in each event & cell \b");
858  if (test == 3)
859  HistAmpl[test][sub]->SetXTitle("RMS in each event & cell \b");
860  if (test == 4)
861  HistAmpl[test][sub]->SetXTitle("Ratio in each event & cell \b");
862  if (test == 5)
863  HistAmpl[test][sub]->SetXTitle("Mean TS position in each event & cell \b");
864  if (test == 6)
865  HistAmpl[test][sub]->SetXTitle("Max TS position in each event & cell \b");
866  HistAmpl[test][sub]->SetYTitle("Number of cell-events \b");
867  HistAmpl[test][sub]->SetLineColor(4);
868  HistAmpl[test][sub]->SetLineWidth(2);
869  HistAmpl[test][sub]->SetTitleOffset(1.4, "Y");
870  HistAmpl[test][sub]->Draw("");
871  // // HistAmpl[test][sub]->GetYaxis()->SetRangeUser(1., 100.);
872  // if (test==2) {gPad->SetLogx(); HistAmpl[test][sub]->GetXaxis()->SetRangeUser(1., 10000.);}
873  if (test == 2) {
874  gPad->SetLogx();
875  }
876  if (test == 3)
877  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 5.); // width
878  if (test == 4)
879  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 1.); // R
880  if (test == 5)
881  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.); //Tn
882  if (test == 6)
883  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.); //Tx
884  cONE->Modified();
885  cONE->Update();
886  double min_x[] = {MIN_M[test][sub], MIN_M[test][sub]};
887  double min_y[] = {0., 100000000.};
888  TGraph* MIN = new TGraph(2, min_x, min_y);
889  MIN->SetLineStyle(2);
890  MIN->SetLineColor(2);
891  MIN->SetLineWidth(2 + 100 * 100);
892  MIN->SetFillStyle(3005);
893  MIN->SetFillColor(2);
894  MIN->Draw("L");
895  double max_x[] = {MAX_M[test][sub], MAX_M[test][sub]};
896  double max_y[] = {0., 100000000.};
897  TGraph* MAX = new TGraph(2, max_x, max_y);
898  MAX->SetLineStyle(2);
899  MAX->SetLineColor(2);
900  MAX->SetLineWidth(-2 - 100 * 100);
901  MAX->SetFillStyle(3004);
902  MAX->SetFillColor(2);
903  MAX->Draw("L");
904  if (test == 2) {
905  if (sub == 1) {
906  cONE->Print("HistAmplHB.png");
907  cONE->Clear();
908  }
909  if (sub == 2) {
910  cONE->Print("HistAmplHE.png");
911  cONE->Clear();
912  }
913  if (sub == 3) {
914  cONE->Print("HistAmplHO.png");
915  cONE->Clear();
916  }
917  if (sub == 4) {
918  cONE->Print("HistAmplHF.png");
919  cONE->Clear();
920  }
921  }
922  if (test == 3) {
923  if (sub == 1) {
924  cONE->Print("HistRMSHB.png");
925  cONE->Clear();
926  }
927  if (sub == 2) {
928  cONE->Print("HistRMSHE.png");
929  cONE->Clear();
930  }
931  if (sub == 3) {
932  cONE->Print("HistRMSHO.png");
933  cONE->Clear();
934  }
935  if (sub == 4) {
936  cONE->Print("HistRMSHF.png");
937  cONE->Clear();
938  }
939  }
940  if (test == 4) {
941  if (sub == 1) {
942  cONE->Print("Hist43TStoAllTSHB.png");
943  cONE->Clear();
944  }
945  if (sub == 2) {
946  cONE->Print("Hist43TStoAllTSHE.png");
947  cONE->Clear();
948  }
949  if (sub == 3) {
950  cONE->Print("Hist43TStoAllTSHO.png");
951  cONE->Clear();
952  }
953  if (sub == 4) {
954  cONE->Print("Hist43TStoAllTSHF.png");
955  cONE->Clear();
956  }
957  }
958  if (test == 5) {
959  if (sub == 1) {
960  cONE->Print("HistMeanPosHB.png");
961  cONE->Clear();
962  }
963  if (sub == 2) {
964  cONE->Print("HistMeanPosHE.png");
965  cONE->Clear();
966  }
967  if (sub == 3) {
968  cONE->Print("HistMeanPosHO.png");
969  cONE->Clear();
970  }
971  if (sub == 4) {
972  cONE->Print("HistMeanPosHF.png");
973  cONE->Clear();
974  }
975  }
976  if (test == 6) {
977  if (sub == 1) {
978  cONE->Print("HistMaxPosHB.png");
979  cONE->Clear();
980  }
981  if (sub == 2) {
982  cONE->Print("HistMaxPosHE.png");
983  cONE->Clear();
984  }
985  if (sub == 3) {
986  cONE->Print("HistMaxPosHO.png");
987  cONE->Clear();
988  }
989  if (sub == 4) {
990  cONE->Print("HistMaxPosHF.png");
991  cONE->Clear();
992  }
993  }
994  } // end sub
995  } //end test
996 
997  TH2F* Map_Calib[5][5]; // 2d histogramm for subdet, depth
998 
999  Map_Calib[1][1] = (TH2F*)dir->FindObjectAny("h_map_HB");
1000  Map_Calib[1][2] = (TH2F*)dir->FindObjectAny("h_map_HB");
1001  Map_Calib[2][1] = (TH2F*)dir->FindObjectAny("h_map_HE");
1002  Map_Calib[2][2] = (TH2F*)dir->FindObjectAny("h_map_HE");
1003  Map_Calib[2][3] = (TH2F*)dir->FindObjectAny("h_map_HE");
1004  Map_Calib[3][4] = (TH2F*)dir->FindObjectAny("h_map_HO");
1005  Map_Calib[4][1] = (TH2F*)dir->FindObjectAny("h_map_HF");
1006  Map_Calib[4][2] = (TH2F*)dir->FindObjectAny("h_map_HF");
1007 
1008  //+++++++++++++++++++++++++++++
1009  //Test 0 Entries
1010  //+++++++++++++++++++++++++++++
1011 
1012  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
1013  // if (sub==1) cHB->Divide(2,1);
1014  // if (sub==2) cHE->Divide(3,1);
1015  cONE->Divide(1, 1);
1016  // if (sub==4) cHB->Divide(2,1);
1017  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1018  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1019  // for (int k=k_min[sub];k<=k_max[sub];k++) { //Depth
1020  int k = 1;
1021  cONE->cd(k);
1022  // if (sub==1) cHB->cd(k);
1023  // if (sub==2) cHE->cd(k);
1024  if (sub == 3)
1025  k = 4;
1026  // if (sub==4) cHB->cd(k);
1027  gPad->SetGridy();
1028  gPad->SetGridx();
1029  gPad->SetLogz();
1030  if (sub == 1)
1031  sprintf(str, "HB");
1032  if (sub == 2)
1033  sprintf(str, "HE");
1034  if (sub == 3)
1035  sprintf(str, "HO");
1036  if (sub == 4)
1037  sprintf(str, "HF");
1038  Map_Calib[sub][k]->SetTitle(str);
1039  Map_Calib[sub][k]->SetXTitle("#eta \b");
1040  Map_Calib[sub][k]->SetYTitle("#phi \b");
1041  Map_Calib[sub][k]->SetZTitle("Number of events\b");
1042  if (sub == 3)
1043  Map_Calib[sub][k]->SetTitleOffset(0.8, "Z");
1044  Map_Calib[sub][k]->Draw("COLZ");
1045  Map_Calib[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1046  // Map_Calib[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
1047  // if (sub==1) {cHB->Modified(); cHB->Update();}
1048  // if (sub==2) {cHE->Modified(); cHE->Update();}
1049  cONE->Modified();
1050  cONE->Update();
1051  // if (sub==4) {cHB->Modified(); cHB->Update();}
1052  // }//end depth
1053 
1054  if (sub == 1) {
1055  cONE->Print("MapRateCalibEntryHB.png");
1056  cONE->Clear();
1057  }
1058  if (sub == 2) {
1059  cONE->Print("MapRateCalibEntryHE.png");
1060  cONE->Clear();
1061  }
1062  if (sub == 3) {
1063  cONE->Print("MapRateCalibEntryHO.png");
1064  cONE->Clear();
1065  }
1066  if (sub == 4) {
1067  cONE->Print("MapRateCalibEntryHF.png");
1068  cONE->Clear();
1069  }
1070  } // end sub
1071 
1072  //+++++++++++++++++++++++++++++
1073  //Test 11 (Cc) Rate of Cap ID errors for calibration channels
1074  //+++++++++++++++++++++++++++++
1075 
1076  Map_Ampl[11][1][1] = (TH2F*)dir->FindObjectAny("h_mapCapCalib047_HB");
1077  Map_Ampl[11][1][2] = (TH2F*)dir->FindObjectAny("h_mapCapCalib047_HB");
1078  Map_Ampl[11][2][1] = (TH2F*)dir->FindObjectAny("h_mapCapCalib047_HE");
1079  Map_Ampl[11][2][2] = (TH2F*)dir->FindObjectAny("h_mapCapCalib047_HE");
1080  Map_Ampl[11][2][3] = (TH2F*)dir->FindObjectAny("h_mapCapCalib047_HE");
1081  Map_Ampl[11][3][4] = (TH2F*)dir->FindObjectAny("h_mapCapCalib047_HO");
1082  Map_Ampl[11][4][1] = (TH2F*)dir->FindObjectAny("h_mapCapCalib047_HF");
1083  Map_Ampl[11][4][2] = (TH2F*)dir->FindObjectAny("h_mapCapCalib047_HF");
1084 
1085  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
1086  // if (sub==1) cHB->Divide(2,1);
1087  // if (sub==2) cHE->Divide(3,1);
1088  cONE->Divide(1, 1);
1089  // if (sub==4) cHB->Divide(2,1);
1090  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1091  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1092  // for (int k=k_min[sub];k<=k_max[sub];k++) { //Depth
1093  int k = 1;
1094  cONE->cd(k);
1095  // if (sub==1) cHB->cd(k);
1096  // if (sub==2) cHE->cd(k);
1097  if (sub == 3)
1098  k = 4;
1099  // if (sub==4) cHB->cd(k);
1100  Map_Ampl[11][sub][k]->Divide(Map_Ampl[11][sub][k], Map_Calib[sub][k], 1, 1, "B");
1101  gPad->SetGridy();
1102  gPad->SetGridx();
1103  gPad->SetLogz();
1104  if (sub == 1)
1105  sprintf(str, "HB");
1106  if (sub == 2)
1107  sprintf(str, "HE");
1108  if (sub == 3)
1109  sprintf(str, "HO");
1110  if (sub == 4)
1111  sprintf(str, "HF");
1112  Map_Ampl[11][sub][k]->SetTitle(str);
1113  Map_Ampl[11][sub][k]->SetXTitle("#eta \b");
1114  Map_Ampl[11][sub][k]->SetYTitle("#phi \b");
1115  Map_Ampl[11][sub][k]->SetZTitle("Rate \b");
1116  Map_Ampl[11][sub][k]->SetTitleOffset(0.75, "Z");
1117  Map_Ampl[11][sub][k]->Draw("COLZ");
1118  Map_Ampl[11][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1119  Map_Ampl[11][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
1120  // if (sub==1) {cHB->Modified(); cHB->Update();}
1121  // if (sub==2) {cHE->Modified(); cHE->Update();}
1122  cONE->Modified();
1123  cONE->Update();
1124  // if (sub==4) {cHB->Modified(); cHB->Update();}
1125  // }//end depth
1126 
1127  if (sub == 1) {
1128  cONE->Print("MapRateCapCalibHB.png");
1129  cONE->Clear();
1130  }
1131  if (sub == 2) {
1132  cONE->Print("MapRateCapCalibHE.png");
1133  cONE->Clear();
1134  }
1135  if (sub == 3) {
1136  cONE->Print("MapRateCapCalibHO.png");
1137  cONE->Clear();
1138  }
1139  if (sub == 4) {
1140  cONE->Print("MapRateCapCalibHF.png");
1141  cONE->Clear();
1142  }
1143  } // end sub
1144 
1145  //+++++++++++++++++++++++++++++
1146  //Test 12 (Ac) ADC amplitude for calibration chanels
1147  //+++++++++++++++++++++++++++++
1148 
1149  Map_Ampl[12][1][1] = (TH2F*)dir->FindObjectAny("h_mapADCCalib047_HB");
1150  Map_Ampl[12][1][2] = (TH2F*)dir->FindObjectAny("h_mapADCCalib047_HB");
1151  Map_Ampl[12][2][1] = (TH2F*)dir->FindObjectAny("h_mapADCCalib047_HE");
1152  Map_Ampl[12][2][2] = (TH2F*)dir->FindObjectAny("h_mapADCCalib047_HE");
1153  Map_Ampl[12][2][3] = (TH2F*)dir->FindObjectAny("h_mapADCCalib047_HE");
1154  Map_Ampl[12][3][4] = (TH2F*)dir->FindObjectAny("h_mapADCCalib047_HO");
1155  Map_Ampl[12][4][1] = (TH2F*)dir->FindObjectAny("h_mapADCCalib047_HF");
1156  Map_Ampl[12][4][2] = (TH2F*)dir->FindObjectAny("h_mapADCCalib047_HF");
1157 
1158  HistAmpl[12][1] = (TH1F*)dir->FindObjectAny("h_ADCCalib_HB");
1159  HistAmpl[12][2] = (TH1F*)dir->FindObjectAny("h_ADCCalib_HE");
1160  HistAmpl[12][3] = (TH1F*)dir->FindObjectAny("h_ADCCalib_HO");
1161  HistAmpl[12][4] = (TH1F*)dir->FindObjectAny("h_ADCCalib_HF");
1162 
1163  //+++++++++++++++++++++++++++++
1164  //Test 13 (Wc) Rate of RMS
1165  //+++++++++++++++++++++++++++++
1166 
1167  Map_Ampl[13][1][1] = (TH2F*)dir->FindObjectAny("h_mapWidthCalib047_HB");
1168  Map_Ampl[13][1][2] = (TH2F*)dir->FindObjectAny("h_mapWidthCalib047_HB");
1169  Map_Ampl[13][2][1] = (TH2F*)dir->FindObjectAny("h_mapWidthCalib047_HE");
1170  Map_Ampl[13][2][2] = (TH2F*)dir->FindObjectAny("h_mapWidthCalib047_HE");
1171  Map_Ampl[13][2][3] = (TH2F*)dir->FindObjectAny("h_mapWidthCalib047_HE");
1172  Map_Ampl[13][3][4] = (TH2F*)dir->FindObjectAny("h_mapWidthCalib047_HO");
1173  Map_Ampl[13][4][1] = (TH2F*)dir->FindObjectAny("h_mapWidthCalib047_HF");
1174  Map_Ampl[13][4][2] = (TH2F*)dir->FindObjectAny("h_mapWidthCalib047_HF");
1175 
1176  HistAmpl[13][1] = (TH1F*)dir->FindObjectAny("h_WidthCalib_HB");
1177  HistAmpl[13][2] = (TH1F*)dir->FindObjectAny("h_WidthCalib_HE");
1178  HistAmpl[13][3] = (TH1F*)dir->FindObjectAny("h_WidthCalib_HO");
1179  HistAmpl[13][4] = (TH1F*)dir->FindObjectAny("h_WidthCalib_HF");
1180 
1181  //+++++++++++++++++++++++++++++
1182  //Test 14 (Rc) Rate of ratio 4 near max TS/ All TS
1183  //+++++++++++++++++++++++++++++
1184 
1185  Map_Ampl[14][1][1] = (TH2F*)dir->FindObjectAny("h_mapRatioCalib047_HB");
1186  Map_Ampl[14][1][2] = (TH2F*)dir->FindObjectAny("h_mapRatioCalib047_HB");
1187  Map_Ampl[14][2][1] = (TH2F*)dir->FindObjectAny("h_mapRatioCalib047_HE");
1188  Map_Ampl[14][2][2] = (TH2F*)dir->FindObjectAny("h_mapRatioCalib047_HE");
1189  Map_Ampl[14][2][3] = (TH2F*)dir->FindObjectAny("h_mapRatioCalib047_HE");
1190  Map_Ampl[14][3][4] = (TH2F*)dir->FindObjectAny("h_mapRatioCalib047_HO");
1191  Map_Ampl[14][4][1] = (TH2F*)dir->FindObjectAny("h_mapRatioCalib047_HF");
1192  Map_Ampl[14][4][2] = (TH2F*)dir->FindObjectAny("h_mapRatioCalib047_HF");
1193 
1194  HistAmpl[14][1] = (TH1F*)dir->FindObjectAny("h_RatioCalib_HB");
1195  HistAmpl[14][2] = (TH1F*)dir->FindObjectAny("h_RatioCalib_HE");
1196  HistAmpl[14][3] = (TH1F*)dir->FindObjectAny("h_RatioCalib_HO");
1197  HistAmpl[14][4] = (TH1F*)dir->FindObjectAny("h_RatioCalib_HF");
1198 
1199  //+++++++++++++++++++++++++++++
1200  //Test 15 (TNc) Mean position in 1-8 TS range
1201  //+++++++++++++++++++++++++++++
1202 
1203  Map_Ampl[15][1][1] = (TH2F*)dir->FindObjectAny("h_mapTSmeanCalib047_HB");
1204  Map_Ampl[15][1][2] = (TH2F*)dir->FindObjectAny("h_mapTSmeanCalib047_HB");
1205  Map_Ampl[15][2][1] = (TH2F*)dir->FindObjectAny("h_mapTSmeanCalib047_HE");
1206  Map_Ampl[15][2][2] = (TH2F*)dir->FindObjectAny("h_mapTSmeanCalib047_HE");
1207  Map_Ampl[15][2][3] = (TH2F*)dir->FindObjectAny("h_mapTSmeanCalib047_HE");
1208  Map_Ampl[15][3][4] = (TH2F*)dir->FindObjectAny("h_mapTSmeanCalib047_HO");
1209  Map_Ampl[15][4][1] = (TH2F*)dir->FindObjectAny("h_mapTSmeanCalib047_HF");
1210  Map_Ampl[15][4][2] = (TH2F*)dir->FindObjectAny("h_mapTSmeanCalib047_HF");
1211 
1212  HistAmpl[15][1] = (TH1F*)dir->FindObjectAny("h_TSmeanCalib_HB");
1213  HistAmpl[15][2] = (TH1F*)dir->FindObjectAny("h_TSmeanCalib_HE");
1214  HistAmpl[15][3] = (TH1F*)dir->FindObjectAny("h_TSmeanCalib_HO");
1215  HistAmpl[15][4] = (TH1F*)dir->FindObjectAny("h_TSmeanCalib_HF");
1216 
1217  //+++++++++++++++++++++++++++++
1218  //Test 16 (TXc) Maximum position in 1-8 TS range
1219  //+++++++++++++++++++++++++++++
1220 
1221  Map_Ampl[16][1][1] = (TH2F*)dir->FindObjectAny("h_mapTSmaxCalib047_HB");
1222  Map_Ampl[16][1][2] = (TH2F*)dir->FindObjectAny("h_mapTSmaxCalib047_HB");
1223  Map_Ampl[16][2][1] = (TH2F*)dir->FindObjectAny("h_mapTSmaxCalib047_HE");
1224  Map_Ampl[16][2][2] = (TH2F*)dir->FindObjectAny("h_mapTSmaxCalib047_HE");
1225  Map_Ampl[16][2][3] = (TH2F*)dir->FindObjectAny("h_mapTSmaxCalib047_HE");
1226  Map_Ampl[16][3][4] = (TH2F*)dir->FindObjectAny("h_mapTSmaxCalib047_HO");
1227  Map_Ampl[16][4][1] = (TH2F*)dir->FindObjectAny("h_mapTSmaxCalib047_HF");
1228  Map_Ampl[16][4][2] = (TH2F*)dir->FindObjectAny("h_mapTSmaxCalib047_HF");
1229 
1230  HistAmpl[16][1] = (TH1F*)dir->FindObjectAny("h_TSmaxCalib_HB");
1231  HistAmpl[16][2] = (TH1F*)dir->FindObjectAny("h_TSmaxCalib_HE");
1232  HistAmpl[16][3] = (TH1F*)dir->FindObjectAny("h_TSmaxCalib_HO");
1233  HistAmpl[16][4] = (TH1F*)dir->FindObjectAny("h_TSmaxCalib_HF");
1234 
1235  for (int test = 12; test <= 16; test++) { //Test: 2-Am, 3-Wm, 4-Rm, 5-TNm, 6-TXm,
1236  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
1237  if (sub == 1)
1238  cONE->Divide(1, 1); //cHB->Divide(2,1);
1239  if (sub == 2)
1240  cONE->Divide(1, 1); //cHE->Divide(3,1);
1241  if (sub == 3)
1242  cONE->Divide(1, 1);
1243  if (sub == 4)
1244  cONE->Divide(1, 1); //cHB->Divide(2,1);
1245  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1246  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1247  // for (int k=k_min[sub];k<=k_max[sub];k++) { //Depth
1248  int k = 1;
1249  if (sub == 1) {
1250  k = 1;
1251  cONE->cd(k);
1252  } //cHB->cd(k); }
1253  if (sub == 2) {
1254  k = 1;
1255  cONE->cd(k);
1256  } //cHE->cd(k); }
1257  if (sub == 3) {
1258  k = 4;
1259  cONE->cd(k - 3);
1260  }
1261  if (sub == 4) {
1262  k = 1;
1263  cONE->cd(k);
1264  } //cHB->cd(k); }
1265  Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_Calib[sub][k], 1, 1, "B");
1266  gPad->SetGridy();
1267  gPad->SetGridx();
1268  gPad->SetLogz();
1269  if (sub == 1)
1270  sprintf(str, "HB");
1271  if (sub == 2)
1272  sprintf(str, "HE");
1273  if (sub == 3)
1274  sprintf(str, "HO");
1275  if (sub == 4)
1276  sprintf(str, "HF");
1277  Map_Ampl[test][sub][k]->SetTitle(str);
1278  Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
1279  Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
1280  Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
1281  Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
1282  Map_Ampl[test][sub][k]->Draw("COLZ");
1283  Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1284  Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.00001, 1.);
1285  // if (sub==1) {cHB->Modified(); cHB->Update();}
1286  // if (sub==2) {cHE->Modified(); cHE->Update();}
1287  cONE->Modified();
1288  cONE->Update();
1289  // if (sub==4) {cHB->Modified(); cHB->Update();}
1290  // }//end depth
1291  if (test == 12) {
1292  if (sub == 1) {
1293  cONE->Print("MapRateAmplCalibHB.png");
1294  cONE->Clear();
1295  }
1296  if (sub == 2) {
1297  cONE->Print("MapRateAmplCalibHE.png");
1298  cONE->Clear();
1299  }
1300  if (sub == 3) {
1301  cONE->Print("MapRateAmplCalibHO.png");
1302  cONE->Clear();
1303  }
1304  if (sub == 4) {
1305  cONE->Print("MapRateAmplCalibHF.png");
1306  cONE->Clear();
1307  }
1308  }
1309  if (test == 13) {
1310  if (sub == 1) {
1311  cONE->Print("MapRateRMSCalibHB.png");
1312  cONE->Clear();
1313  }
1314  if (sub == 2) {
1315  cONE->Print("MapRateRMSCalibHE.png");
1316  cONE->Clear();
1317  }
1318  if (sub == 3) {
1319  cONE->Print("MapRateRMSCalibHO.png");
1320  cONE->Clear();
1321  }
1322  if (sub == 4) {
1323  cONE->Print("MapRateRMSCalibHF.png");
1324  cONE->Clear();
1325  }
1326  }
1327  if (test == 14) {
1328  if (sub == 1) {
1329  cONE->Print("MapRate43TStoAllTSCalibHB.png");
1330  cONE->Clear();
1331  }
1332  if (sub == 2) {
1333  cONE->Print("MapRate43TStoAllTSCalibHE.png");
1334  cONE->Clear();
1335  }
1336  if (sub == 3) {
1337  cONE->Print("MapRate43TStoAllTSCalibHO.png");
1338  cONE->Clear();
1339  }
1340  if (sub == 4) {
1341  cONE->Print("MapRate43TStoAllTSCalibHF.png");
1342  cONE->Clear();
1343  }
1344  }
1345  if (test == 15) {
1346  if (sub == 1) {
1347  cONE->Print("MapRateMeanPosCalibHB.png");
1348  cONE->Clear();
1349  }
1350  if (sub == 2) {
1351  cONE->Print("MapRateMeanPosCalibHE.png");
1352  cONE->Clear();
1353  }
1354  if (sub == 3) {
1355  cONE->Print("MapRateMeanPosCalibHO.png");
1356  cONE->Clear();
1357  }
1358  if (sub == 4) {
1359  cONE->Print("MapRateMeanPosCalibHF.png");
1360  cONE->Clear();
1361  }
1362  }
1363  if (test == 16) {
1364  if (sub == 1) {
1365  cONE->Print("MapRateMaxPosCalibHB.png");
1366  cONE->Clear();
1367  }
1368  if (sub == 2) {
1369  cONE->Print("MapRateMaxPosCalibHE.png");
1370  cONE->Clear();
1371  }
1372  if (sub == 3) {
1373  cONE->Print("MapRateMaxPosCalibHO.png");
1374  cONE->Clear();
1375  }
1376  if (sub == 4) {
1377  cONE->Print("MapRateMaxPosCalibHF.png");
1378  cONE->Clear();
1379  }
1380  }
1381 
1382  cONE->Divide(1, 1);
1383  cONE->cd(1);
1384  gPad->SetGridy();
1385  gPad->SetGridx();
1386  gPad->SetLogy();
1387  if (sub == 1)
1388  HistAmpl[test][sub]->SetTitle("HB, All Depth");
1389  if (sub == 2)
1390  HistAmpl[test][sub]->SetTitle("HE, All Depth");
1391  if (sub == 3)
1392  HistAmpl[test][sub]->SetTitle("HO, All Depth");
1393  if (sub == 4)
1394  HistAmpl[test][sub]->SetTitle("HF, All Depth");
1395  if (test == 12)
1396  HistAmpl[test][sub]->SetXTitle("ADC Amlitude in each event & cell \b");
1397  if (test == 13)
1398  HistAmpl[test][sub]->SetXTitle("Amplitude RMS in each event & cell \b");
1399  if (test == 14)
1400  HistAmpl[test][sub]->SetXTitle("Ratio in each event & cell \b");
1401  if (test == 15)
1402  HistAmpl[test][sub]->SetXTitle("Mean TS position in each event & cell \b");
1403  if (test == 16)
1404  HistAmpl[test][sub]->SetXTitle("Max TS position in each event & cell \b");
1405  HistAmpl[test][sub]->SetYTitle("Number of cell-events \b");
1406  HistAmpl[test][sub]->SetLineColor(4);
1407  HistAmpl[test][sub]->SetLineWidth(2);
1408  HistAmpl[test][sub]->SetTitleOffset(1.4, "Y");
1409  HistAmpl[test][sub]->Draw("");
1410  // HistAmpl[test][sub]->GetYaxis()->SetRangeUser(1., 100.);
1411  if (test == 12) {
1412  gPad->SetLogx();
1413  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(1., 10000.);
1414  }
1415  if (test == 13)
1416  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 5.);
1417  if (test == 14)
1418  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 1.);
1419  if (test == 15)
1420  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.);
1421  if (test == 16)
1422  HistAmpl[test][sub]->GetXaxis()->SetRangeUser(0., 9.);
1423  cONE->Modified();
1424  cONE->Update();
1425  double min_x[] = {MIN_C[test - 10][sub], MIN_C[test - 10][sub]};
1426  double min_y[] = {0., 100000000.};
1427  TGraph* MIN = new TGraph(2, min_x, min_y);
1428  MIN->SetLineStyle(2);
1429  MIN->SetLineColor(2);
1430  MIN->SetLineWidth(2 + 100 * 100);
1431  MIN->SetFillStyle(3005);
1432  MIN->SetFillColor(2);
1433  MIN->Draw("L");
1434  double max_x[] = {MAX_C[test - 10][sub], MAX_C[test - 10][sub]};
1435  double max_y[] = {0., 100000000.};
1436  TGraph* MAX = new TGraph(2, max_x, max_y);
1437  MAX->SetLineStyle(2);
1438  MAX->SetLineColor(2);
1439  MAX->SetLineWidth(-2 - 100 * 100);
1440  MAX->SetFillStyle(3004);
1441  MAX->SetFillColor(2);
1442  MAX->Draw("L");
1443  if (test == 12) {
1444  if (sub == 1) {
1445  cONE->Print("HistAmplCalibHB.png");
1446  cONE->Clear();
1447  }
1448  if (sub == 2) {
1449  cONE->Print("HistAmplCalibHE.png");
1450  cONE->Clear();
1451  }
1452  if (sub == 3) {
1453  cONE->Print("HistAmplCalibHO.png");
1454  cONE->Clear();
1455  }
1456  if (sub == 4) {
1457  cONE->Print("HistAmplCalibHF.png");
1458  cONE->Clear();
1459  }
1460  }
1461  if (test == 13) {
1462  if (sub == 1) {
1463  cONE->Print("HistRMSCalibHB.png");
1464  cONE->Clear();
1465  }
1466  if (sub == 2) {
1467  cONE->Print("HistRMSCalibHE.png");
1468  cONE->Clear();
1469  }
1470  if (sub == 3) {
1471  cONE->Print("HistRMSCalibHO.png");
1472  cONE->Clear();
1473  }
1474  if (sub == 4) {
1475  cONE->Print("HistRMSCalibHF.png");
1476  cONE->Clear();
1477  }
1478  }
1479  if (test == 14) {
1480  if (sub == 1) {
1481  cONE->Print("Hist43TStoAllTSCalibHB.png");
1482  cONE->Clear();
1483  }
1484  if (sub == 2) {
1485  cONE->Print("Hist43TStoAllTSCalibHE.png");
1486  cONE->Clear();
1487  }
1488  if (sub == 3) {
1489  cONE->Print("Hist43TStoAllTSCalibHO.png");
1490  cONE->Clear();
1491  }
1492  if (sub == 4) {
1493  cONE->Print("Hist43TStoAllTSCalibHF.png");
1494  cONE->Clear();
1495  }
1496  }
1497  if (test == 15) {
1498  if (sub == 1) {
1499  cONE->Print("HistMeanPosCalibHB.png");
1500  cONE->Clear();
1501  }
1502  if (sub == 2) {
1503  cONE->Print("HistMeanPosCalibHE.png");
1504  cONE->Clear();
1505  }
1506  if (sub == 3) {
1507  cONE->Print("HistMeanPosCalibHO.png");
1508  cONE->Clear();
1509  }
1510  if (sub == 4) {
1511  cONE->Print("HistMeanPosCalibHF.png");
1512  cONE->Clear();
1513  }
1514  }
1515  if (test == 16) {
1516  if (sub == 1) {
1517  cONE->Print("HistMaxPosCalibHB.png");
1518  cONE->Clear();
1519  }
1520  if (sub == 2) {
1521  cONE->Print("HistMaxPosCalibHE.png");
1522  cONE->Clear();
1523  }
1524  if (sub == 3) {
1525  cONE->Print("HistMaxPosCalibHO.png");
1526  cONE->Clear();
1527  }
1528  if (sub == 4) {
1529  cONE->Print("HistMaxPosCalibHF.png");
1530  cONE->Clear();
1531  }
1532  }
1533  } // end sub
1534  } //end test
1535 
1536  //+++++++++++++++++++++++++++++
1537  //Test 21 (GS) Amplitude drift
1538  //+++++++++++++++++++++++++++++
1539 
1540  Map_Ampl[21][1][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1AmplE34_HB");
1541  Map_Ampl[21][1][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2AmplE34_HB");
1542  Map_Ampl[21][1][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3AmplE34_HB");
1543  Map_Ampl[21][1][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4AmplE34_HB");
1544  Map_Ampl[21][2][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1AmplE34_HE");
1545  Map_Ampl[21][2][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2AmplE34_HE");
1546  Map_Ampl[21][2][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3AmplE34_HE");
1547  Map_Ampl[21][2][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4AmplE34_HE");
1548  Map_Ampl[21][2][5] = (TH2F*)dir->FindObjectAny("h_mapDepth5AmplE34_HE");
1549  Map_Ampl[21][2][6] = (TH2F*)dir->FindObjectAny("h_mapDepth6AmplE34_HE");
1550  Map_Ampl[21][2][7] = (TH2F*)dir->FindObjectAny("h_mapDepth7AmplE34_HE");
1551  Map_Ampl[21][3][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4AmplE34_HO");
1552  Map_Ampl[21][4][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1AmplE34_HF");
1553  Map_Ampl[21][4][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2AmplE34_HF");
1554  Map_Ampl[21][4][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3AmplE34_HF");
1555  Map_Ampl[21][4][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4AmplE34_HF");
1556 
1557  TH2F* Map_RefAmpl[5][ALLDEPTH]; // 2D histogramm for subdet, depth
1558  TH2F* Map_RefSUB[5][ALLDEPTH]; // 2d histogramm for subdet, depth
1559 
1560  Map_RefAmpl[1][1] = (TH2F*)refdir->FindObjectAny("h_mapDepth1AmplE34_HB");
1561  Map_RefAmpl[1][2] = (TH2F*)refdir->FindObjectAny("h_mapDepth2AmplE34_HB");
1562  Map_RefAmpl[1][3] = (TH2F*)refdir->FindObjectAny("h_mapDepth3AmplE34_HB");
1563  Map_RefAmpl[1][4] = (TH2F*)refdir->FindObjectAny("h_mapDepth4AmplE34_HB");
1564  Map_RefAmpl[2][1] = (TH2F*)refdir->FindObjectAny("h_mapDepth1AmplE34_HE");
1565  Map_RefAmpl[2][2] = (TH2F*)refdir->FindObjectAny("h_mapDepth2AmplE34_HE");
1566  Map_RefAmpl[2][3] = (TH2F*)refdir->FindObjectAny("h_mapDepth3AmplE34_HE");
1567  Map_RefAmpl[2][4] = (TH2F*)refdir->FindObjectAny("h_mapDepth4AmplE34_HE");
1568  Map_RefAmpl[2][5] = (TH2F*)refdir->FindObjectAny("h_mapDepth5AmplE34_HE");
1569  Map_RefAmpl[2][6] = (TH2F*)refdir->FindObjectAny("h_mapDepth6AmplE34_HE");
1570  Map_RefAmpl[2][7] = (TH2F*)refdir->FindObjectAny("h_mapDepth7AmplE34_HE");
1571  Map_RefAmpl[3][4] = (TH2F*)refdir->FindObjectAny("h_mapDepth4AmplE34_HO");
1572  Map_RefAmpl[4][1] = (TH2F*)refdir->FindObjectAny("h_mapDepth1AmplE34_HF");
1573  Map_RefAmpl[4][2] = (TH2F*)refdir->FindObjectAny("h_mapDepth2AmplE34_HF");
1574  Map_RefAmpl[4][3] = (TH2F*)refdir->FindObjectAny("h_mapDepth3AmplE34_HF");
1575  Map_RefAmpl[4][4] = (TH2F*)refdir->FindObjectAny("h_mapDepth4AmplE34_HF");
1576 
1577  Map_RefSUB[1][1] = (TH2F*)refdir->FindObjectAny("h_mapDepth1_HB");
1578  Map_RefSUB[1][2] = (TH2F*)refdir->FindObjectAny("h_mapDepth2_HB");
1579  Map_RefSUB[1][3] = (TH2F*)refdir->FindObjectAny("h_mapDepth3_HB");
1580  Map_RefSUB[1][4] = (TH2F*)refdir->FindObjectAny("h_mapDepth4_HB");
1581  Map_RefSUB[2][1] = (TH2F*)refdir->FindObjectAny("h_mapDepth1_HE");
1582  Map_RefSUB[2][2] = (TH2F*)refdir->FindObjectAny("h_mapDepth2_HE");
1583  Map_RefSUB[2][3] = (TH2F*)refdir->FindObjectAny("h_mapDepth3_HE");
1584  Map_RefSUB[2][4] = (TH2F*)refdir->FindObjectAny("h_mapDepth4_HE");
1585  Map_RefSUB[2][5] = (TH2F*)refdir->FindObjectAny("h_mapDepth5_HE");
1586  Map_RefSUB[2][6] = (TH2F*)refdir->FindObjectAny("h_mapDepth6_HE");
1587  Map_RefSUB[2][7] = (TH2F*)refdir->FindObjectAny("h_mapDepth7_HE");
1588  Map_RefSUB[3][4] = (TH2F*)refdir->FindObjectAny("h_mapDepth4_HO");
1589  Map_RefSUB[4][1] = (TH2F*)refdir->FindObjectAny("h_mapDepth1_HF");
1590  Map_RefSUB[4][2] = (TH2F*)refdir->FindObjectAny("h_mapDepth2_HF");
1591  Map_RefSUB[4][3] = (TH2F*)refdir->FindObjectAny("h_mapDepth3_HF");
1592  Map_RefSUB[4][4] = (TH2F*)refdir->FindObjectAny("h_mapDepth4_HF");
1593 
1594  HistAmplDepth[21][1][1] = new TH1F("diffAmpl_Depth1_HB", "", 100, -10., 10.);
1595  HistAmplDepth[21][1][2] = new TH1F("diffAmpl_Depth2_HB", "", 100, -10., 10.);
1596  HistAmplDepth[21][1][3] = new TH1F("diffAmpl_Depth3_HB", "", 100, -10., 10.);
1597  HistAmplDepth[21][1][4] = new TH1F("diffAmpl_Depth4_HB", "", 100, -10., 10.);
1598  HistAmplDepth[21][2][1] = new TH1F("diffAmpl_Depth1_HE", "", 100, -10., 10.);
1599  HistAmplDepth[21][2][2] = new TH1F("diffAmpl_Depth2_HE", "", 100, -10., 10.);
1600  HistAmplDepth[21][2][3] = new TH1F("diffAmpl_Depth3_HE", "", 100, -10., 10.);
1601  HistAmplDepth[21][2][4] = new TH1F("diffAmpl_Depth4_HE", "", 100, -10., 10.);
1602  HistAmplDepth[21][2][5] = new TH1F("diffAmpl_Depth5_HE", "", 100, -10., 10.);
1603  HistAmplDepth[21][2][6] = new TH1F("diffAmpl_Depth6_HE", "", 100, -10., 10.);
1604  HistAmplDepth[21][2][7] = new TH1F("diffAmpl_Depth7_HE", "", 100, -10., 10.);
1605  HistAmplDepth[21][3][4] = new TH1F("diffAmpl_Depth4_HO", "", 100, -10., 10.);
1606  HistAmplDepth[21][4][1] = new TH1F("diffAmpl_Depth1_HF", "", 100, -10., 10.);
1607  HistAmplDepth[21][4][2] = new TH1F("diffAmpl_Depth2_HF", "", 100, -10., 10.);
1608  HistAmplDepth[21][4][3] = new TH1F("diffAmpl_Depth3_HF", "", 100, -10., 10.);
1609  HistAmplDepth[21][4][4] = new TH1F("diffAmpl_Depth4_HF", "", 100, -10., 10.);
1610 
1611  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
1612  // if (sub==1) cHB->Divide(2,1);
1613  if (sub == 1)
1614  cHB->Divide(2, 2);
1615  // if (sub==2) cHE->Divide(3,1);
1616  if (sub == 2)
1617  cHE->Divide(3, 3);
1618  if (sub == 3)
1619  cONE->Divide(1, 1);
1620  // if (sub==4) cHF->Divide(2,1);
1621  if (sub == 4)
1622  cHF->Divide(2, 2);
1623  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
1624  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
1625  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
1626  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1627  if (sub == 1)
1628  cHB->cd(k);
1629  if (sub == 2)
1630  cHE->cd(k);
1631  if (sub == 3)
1632  cONE->cd(k - 3);
1633  if (sub == 4)
1634  cHF->cd(k);
1635  Map_Ampl[21][sub][k]->Divide(Map_Ampl[21][sub][k], Map_SUB[sub][k], 1, 1, "B");
1636  gPad->SetGridy();
1637  gPad->SetGridx();
1638  gPad->SetLogz();
1639  if (sub == 1)
1640  sprintf(str, "HB, Depth%d \b", k);
1641  if (sub == 2)
1642  sprintf(str, "HE, Depth%d \b", k);
1643  if (sub == 3)
1644  sprintf(str, "HO, Depth%d \b", k);
1645  if (sub == 4)
1646  sprintf(str, "HF, Depth%d \b", k);
1647  Map_Ampl[21][sub][k]->SetTitle(str);
1648  Map_Ampl[21][sub][k]->SetXTitle("#eta \b");
1649  Map_Ampl[21][sub][k]->SetYTitle("#phi \b");
1650  Map_Ampl[21][sub][k]->SetZTitle("Response \b");
1651  Map_Ampl[21][sub][k]->SetTitleOffset(1.1, "Z");
1652  Map_Ampl[21][sub][k]->Draw("COLZ");
1653  Map_Ampl[21][sub][k]->GetYaxis()->SetRangeUser(0, 71.);
1654  // Map_Ampl[21][sub][k]->GetZaxis()->SetRangeUser(1., 10.);
1655  if (sub == 1) {
1656  cHB->Modified();
1657  cHB->Update();
1658  }
1659  if (sub == 2) {
1660  cHE->Modified();
1661  cHE->Update();
1662  }
1663  if (sub == 3) {
1664  cONE->Modified();
1665  cONE->Update();
1666  }
1667  if (sub == 4) {
1668  cHF->Modified();
1669  cHF->Update();
1670  }
1671  } //end depth
1672  if (sub == 1) {
1673  cHB->Print("MapRateAmpl1HB.png");
1674  cHB->Clear();
1675  }
1676  if (sub == 2) {
1677  cHE->Print("MapRateAmpl1HE.png");
1678  cHE->Clear();
1679  }
1680  if (sub == 3) {
1681  cONE->Print("MapRateAmpl1HO.png");
1682  cONE->Clear();
1683  }
1684  if (sub == 4) {
1685  cHF->Print("MapRateAmpl1HF.png");
1686  cHF->Clear();
1687  }
1688 
1689  // if (sub==1) cHB->Divide(2,1);
1690  if (sub == 1)
1691  cHB->Divide(2, 2);
1692  // if (sub==2) cHE->Divide(3,1);
1693  if (sub == 2)
1694  cHE->Divide(3, 3);
1695  if (sub == 3)
1696  cONE->Divide(1, 1);
1697  // if (sub==4) cHF->Divide(2,1);
1698  if (sub == 4)
1699  cHF->Divide(2, 2);
1700 
1701  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1702  if (sub == 1)
1703  cHB->cd(k);
1704  if (sub == 2)
1705  cHE->cd(k);
1706  if (sub == 3)
1707  cONE->cd(k - 3);
1708  if (sub == 4)
1709  cHF->cd(k);
1710  Map_RefAmpl[sub][k]->Divide(Map_RefAmpl[sub][k], Map_RefSUB[sub][k], 1, 1, "B");
1711  gPad->SetGridy();
1712  gPad->SetGridx();
1713  gPad->SetLogz();
1714  if (sub == 1)
1715  sprintf(str, "HB, Depth%d \b", k);
1716  if (sub == 2)
1717  sprintf(str, "HE, Depth%d \b", k);
1718  if (sub == 3)
1719  sprintf(str, "HO, Depth%d \b", k);
1720  if (sub == 4)
1721  sprintf(str, "HF, Depth%d \b", k);
1722  Map_RefAmpl[sub][k]->SetTitle(str);
1723  Map_RefAmpl[sub][k]->SetXTitle("#eta \b");
1724  Map_RefAmpl[sub][k]->SetYTitle("#phi \b");
1725  Map_RefAmpl[sub][k]->SetZTitle("Response\b");
1726  Map_RefAmpl[sub][k]->SetTitleOffset(1.1, "Z");
1727  Map_RefAmpl[sub][k]->Draw("COLZ");
1728  Map_RefAmpl[sub][k]->GetYaxis()->SetRangeUser(0, 71.);
1729  // Map_RefAmpl[21][sub][k]->GetZaxis()->SetRangeUser(1., 10.);
1730  if (sub == 1) {
1731  cHB->Modified();
1732  cHB->Update();
1733  }
1734  if (sub == 2) {
1735  cHE->Modified();
1736  cHE->Update();
1737  }
1738  if (sub == 3) {
1739  cONE->Modified();
1740  cONE->Update();
1741  }
1742  if (sub == 4) {
1743  cHF->Modified();
1744  cHF->Update();
1745  }
1746  } //end depth
1747  if (sub == 1) {
1748  cHB->Print("MapRateAmpl2HB.png");
1749  cHB->Clear();
1750  }
1751  if (sub == 2) {
1752  cHE->Print("MapRateAmpl2HE.png");
1753  cHE->Clear();
1754  }
1755  if (sub == 3) {
1756  cONE->Print("MapRateAmpl2HO.png");
1757  cONE->Clear();
1758  }
1759  if (sub == 4) {
1760  cHF->Print("MapRateAmpl2HF.png");
1761  cHF->Clear();
1762  }
1763 
1764  // if (sub==1) cHB->Divide(2,1);
1765  if (sub == 1)
1766  cHB->Divide(2, 2);
1767  // if (sub==2) cHE->Divide(3,1);
1768  if (sub == 2)
1769  cHE->Divide(3, 3);
1770  if (sub == 3)
1771  cONE->Divide(1, 1);
1772  // if (sub==4) cHF->Divide(2,1);
1773  if (sub == 4)
1774  cHF->Divide(2, 2);
1775 
1776  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1777  if (sub == 1)
1778  cHB->cd(k);
1779  if (sub == 2)
1780  cHE->cd(k);
1781  if (sub == 3)
1782  cONE->cd(k - 3);
1783  if (sub == 4)
1784  cHF->cd(k);
1785  TH2F* TTT = new TH2F("Map", "Map", 82, -41, 40, 72, 0, 71);
1786  for (int x = 1; x <= Map_Ampl[21][sub][k]->GetXaxis()->GetNbins(); x++) {
1787  for (int y = 1; y <= Map_Ampl[21][sub][k]->GetYaxis()->GetNbins(); y++) {
1788  if (Map_Ampl[21][sub][k]->GetBinContent(x, y) != 0 && Map_RefAmpl[sub][k]->GetBinContent(x, y) != 0) {
1789  double ccc1 = Map_Ampl[21][sub][k]->GetBinContent(x, y) - Map_RefAmpl[sub][k]->GetBinContent(x, y);
1790  ccc1 = 100. * ccc1 / Map_Ampl[21][sub][k]->GetBinContent(x, y); // in %
1791  HistAmplDepth[21][sub][k]->Fill(ccc1);
1792  Map_Ampl[21][sub][k]->SetBinContent(x, y, fabs(ccc1));
1793  if (fabs(ccc1) > porog[sub])
1794  TTT->SetBinContent(x, y, fabs(ccc1));
1795  else
1796  TTT->SetBinContent(x, y, 0);
1797  }
1798  } //end y
1799  } //esnd x
1800  gPad->SetGridy();
1801  gPad->SetGridx();
1802  // gPad->SetLogz();
1803  if (sub == 1)
1804  sprintf(str, "HB, Depth%d \b", k);
1805  if (sub == 2)
1806  sprintf(str, "HE, Depth%d \b", k);
1807  if (sub == 3)
1808  sprintf(str, "HO, Depth%d \b", k);
1809  if (sub == 4)
1810  sprintf(str, "HF, Depth%d \b", k);
1811  TTT->SetTitle(str);
1812  TTT->SetXTitle("#eta \b");
1813  TTT->SetYTitle("#phi \b");
1814  TTT->SetZTitle("Relative difference, % \b");
1815  TTT->SetTitleOffset(0.9, "Z");
1816  TTT->Draw("COLZ");
1817  TTT->GetYaxis()->SetRangeUser(0, 71.);
1818  TTT->GetZaxis()->SetRangeUser(0, 10.);
1819  if (sub == 1) {
1820  cHB->Modified();
1821  cHB->Update();
1822  }
1823  if (sub == 2) {
1824  cHE->Modified();
1825  cHE->Update();
1826  }
1827  if (sub == 3) {
1828  cONE->Modified();
1829  cONE->Update();
1830  }
1831  if (sub == 4) {
1832  cHF->Modified();
1833  cHF->Update();
1834  }
1835  } //end depth
1836 
1837  if (sub == 1) {
1838  cHB->Print("MapRateAmplDriftHB.png");
1839  cHB->Clear();
1840  }
1841  if (sub == 2) {
1842  cHE->Print("MapRateAmplDriftHE.png");
1843  cHE->Clear();
1844  }
1845  if (sub == 3) {
1846  cONE->Print("MapRateAmplDriftHO.png");
1847  cONE->Clear();
1848  }
1849  if (sub == 4) {
1850  cHF->Print("MapRateAmplDriftHF.png");
1851  cHF->Clear();
1852  }
1854 
1855  // if (sub==1) cHB->Divide(2,1);
1856  if (sub == 1)
1857  cHB->Divide(2, 2);
1858  // if (sub==2) cHE->Divide(3,1);
1859  if (sub == 2)
1860  cHE->Divide(3, 3);
1861  if (sub == 3)
1862  cONE->Divide(1, 1);
1863  // if (sub==4) cHF->Divide(2,1);
1864  if (sub == 4)
1865  cHF->Divide(2, 2);
1866 
1867  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depth
1868  if (sub == 1)
1869  cHB->cd(k);
1870  if (sub == 2)
1871  cHE->cd(k);
1872  if (sub == 3)
1873  cONE->cd(k - 3);
1874  if (sub == 4)
1875  cHF->cd(k);
1876  gPad->SetGridy();
1877  gPad->SetGridx();
1878  gPad->SetLogy();
1879  if (sub == 1)
1880  sprintf(str, "HB, Depth%d \b", k);
1881  if (sub == 2)
1882  sprintf(str, "HE, Depth%d \b", k);
1883  if (sub == 3)
1884  sprintf(str, "HO, Depth%d \b", k);
1885  if (sub == 4)
1886  sprintf(str, "HF, Depth%d \b", k);
1887  HistAmplDepth[21][sub][k]->SetTitle(str);
1888  HistAmplDepth[21][sub][k]->SetYTitle("Number of cell-events \b");
1889  HistAmplDepth[21][sub][k]->SetXTitle("Per cent \b");
1890  HistAmplDepth[21][sub][k]->SetLineColor(4);
1891  HistAmplDepth[21][sub][k]->SetLineWidth(2);
1892  HistAmplDepth[21][sub][k]->SetTitleOffset(1.4, "Y");
1893  HistAmplDepth[21][sub][k]->Draw();
1894  // HistAmplDepth[21][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
1895  HistAmplDepth[21][sub][k]->GetXaxis()->SetRangeUser(-10., 10.);
1896  if (sub == 1) {
1897  cHB->Modified();
1898  cHB->Update();
1899  }
1900  if (sub == 2) {
1901  cHE->Modified();
1902  cHE->Update();
1903  }
1904  if (sub == 3) {
1905  cONE->Modified();
1906  cONE->Update();
1907  }
1908  if (sub == 4) {
1909  cHF->Modified();
1910  cHF->Update();
1911  }
1912  double min_x[] = {-1 * porog[sub], -1 * porog[sub]};
1913  double min_y[] = {0., 100000000.};
1914  TGraph* MIN = new TGraph(2, min_x, min_y);
1915  MIN->SetLineStyle(2);
1916  MIN->SetLineColor(2);
1917  MIN->SetLineWidth(2 + 100 * 100);
1918  MIN->SetFillStyle(3005);
1919  MIN->SetFillColor(2);
1920  MIN->Draw("L");
1921  double max_x[] = {porog[sub], porog[sub]};
1922  double max_y[] = {0., 100000000.};
1923  TGraph* MAX = new TGraph(2, max_x, max_y);
1924  MAX->SetLineStyle(2);
1925  MAX->SetLineColor(2);
1926  MAX->SetLineWidth(-2 - 100 * 100);
1927  MAX->SetFillStyle(3004);
1928  MAX->SetFillColor(2);
1929  MAX->Draw("L");
1930  } // end depth
1931  if (sub == 1) {
1932  cHB->Print("HistAmplDriftDepthHB.png");
1933  cHB->Clear();
1934  }
1935  if (sub == 2) {
1936  cHE->Print("HistAmplDriftDepthHE.png");
1937  cHE->Clear();
1938  }
1939  if (sub == 3) {
1940  cONE->Print("HistAmplDriftDepthHO.png");
1941  cONE->Clear();
1942  }
1943  if (sub == 4) {
1944  cHF->Print("HistAmplDriftDepthHF.png");
1945  cHF->Clear();
1946  }
1947  } //end sub
1948 
1949  //+++++++++++++++++++++++++++++++++++
1950  //Test 31, 32 Pedestal, pedestalWidths
1951  //++++++++++++++++++++++++++++++++++++
1952 
1953  Map_Ampl[31][1][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1pedestal_HB");
1954  Map_Ampl[31][1][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2pedestal_HB");
1955  Map_Ampl[31][1][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3pedestal_HB");
1956  Map_Ampl[31][1][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4pedestal_HB");
1957  Map_Ampl[31][2][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1pedestal_HE");
1958  Map_Ampl[31][2][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2pedestal_HE");
1959  Map_Ampl[31][2][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3pedestal_HE");
1960  Map_Ampl[31][2][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4pedestal_HE");
1961  Map_Ampl[31][2][5] = (TH2F*)dir->FindObjectAny("h_mapDepth5pedestal_HE");
1962  Map_Ampl[31][2][6] = (TH2F*)dir->FindObjectAny("h_mapDepth6pedestal_HE");
1963  Map_Ampl[31][2][7] = (TH2F*)dir->FindObjectAny("h_mapDepth7pedestal_HE");
1964  Map_Ampl[31][3][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4pedestal_HO");
1965  Map_Ampl[31][4][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1pedestal_HF");
1966  Map_Ampl[31][4][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2pedestal_HF");
1967  Map_Ampl[31][4][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3pedestal_HF");
1968  Map_Ampl[31][4][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4pedestal_HF");
1969 
1970  Map_Ampl[32][1][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1pedestalw_HB");
1971  Map_Ampl[32][1][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2pedestalw_HB");
1972  Map_Ampl[32][1][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3pedestalw_HB");
1973  Map_Ampl[32][1][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4pedestalw_HB");
1974  Map_Ampl[32][2][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1pedestalw_HE");
1975  Map_Ampl[32][2][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2pedestalw_HE");
1976  Map_Ampl[32][2][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3pedestalw_HE");
1977  Map_Ampl[32][2][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4pedestalw_HE");
1978  Map_Ampl[32][2][5] = (TH2F*)dir->FindObjectAny("h_mapDepth5pedestalw_HE");
1979  Map_Ampl[32][2][6] = (TH2F*)dir->FindObjectAny("h_mapDepth6pedestalw_HE");
1980  Map_Ampl[32][2][7] = (TH2F*)dir->FindObjectAny("h_mapDepth7pedestalw_HE");
1981  Map_Ampl[32][3][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4pedestalw_HO");
1982  Map_Ampl[32][4][1] = (TH2F*)dir->FindObjectAny("h_mapDepth1pedestalw_HF");
1983  Map_Ampl[32][4][2] = (TH2F*)dir->FindObjectAny("h_mapDepth2pedestalw_HF");
1984  Map_Ampl[32][4][3] = (TH2F*)dir->FindObjectAny("h_mapDepth3pedestalw_HF");
1985  Map_Ampl[32][4][4] = (TH2F*)dir->FindObjectAny("h_mapDepth4pedestalw_HF");
1986 
1987  HistPed[1][1][0] = (TH1F*)dir->FindObjectAny("h_pedestal0_HB");
1988  HistPed[1][1][1] = (TH1F*)dir->FindObjectAny("h_pedestal1_HB");
1989  HistPed[1][1][2] = (TH1F*)dir->FindObjectAny("h_pedestal2_HB");
1990  HistPed[1][1][3] = (TH1F*)dir->FindObjectAny("h_pedestal3_HB");
1991  HistPed[2][1][0] = (TH1F*)dir->FindObjectAny("h_pedestalw0_HB");
1992  HistPed[2][1][1] = (TH1F*)dir->FindObjectAny("h_pedestalw1_HB");
1993  HistPed[2][1][2] = (TH1F*)dir->FindObjectAny("h_pedestalw2_HB");
1994  HistPed[2][1][3] = (TH1F*)dir->FindObjectAny("h_pedestalw3_HB");
1995 
1996  HistPed[1][2][0] = (TH1F*)dir->FindObjectAny("h_pedestal0_HE");
1997  HistPed[1][2][1] = (TH1F*)dir->FindObjectAny("h_pedestal1_HE");
1998  HistPed[1][2][2] = (TH1F*)dir->FindObjectAny("h_pedestal2_HE");
1999  HistPed[1][2][3] = (TH1F*)dir->FindObjectAny("h_pedestal3_HE");
2000  HistPed[2][2][0] = (TH1F*)dir->FindObjectAny("h_pedestalw0_HE");
2001  HistPed[2][2][1] = (TH1F*)dir->FindObjectAny("h_pedestalw1_HE");
2002  HistPed[2][2][2] = (TH1F*)dir->FindObjectAny("h_pedestalw2_HE");
2003  HistPed[2][2][3] = (TH1F*)dir->FindObjectAny("h_pedestalw3_HE");
2004 
2005  HistPed[1][3][0] = (TH1F*)dir->FindObjectAny("h_pedestal0_HO");
2006  HistPed[1][3][1] = (TH1F*)dir->FindObjectAny("h_pedestal1_HO");
2007  HistPed[1][3][2] = (TH1F*)dir->FindObjectAny("h_pedestal2_HO");
2008  HistPed[1][3][3] = (TH1F*)dir->FindObjectAny("h_pedestal3_HO");
2009  HistPed[2][3][0] = (TH1F*)dir->FindObjectAny("h_pedestalw0_HO");
2010  HistPed[2][3][1] = (TH1F*)dir->FindObjectAny("h_pedestalw1_HO");
2011  HistPed[2][3][2] = (TH1F*)dir->FindObjectAny("h_pedestalw2_HO");
2012  HistPed[2][3][3] = (TH1F*)dir->FindObjectAny("h_pedestalw3_HO");
2013 
2014  HistPed[1][4][0] = (TH1F*)dir->FindObjectAny("h_pedestal0_HF");
2015  HistPed[1][4][1] = (TH1F*)dir->FindObjectAny("h_pedestal1_HF");
2016  HistPed[1][4][2] = (TH1F*)dir->FindObjectAny("h_pedestal2_HF");
2017  HistPed[1][4][3] = (TH1F*)dir->FindObjectAny("h_pedestal3_HF");
2018  HistPed[2][4][0] = (TH1F*)dir->FindObjectAny("h_pedestalw0_HF");
2019  HistPed[2][4][1] = (TH1F*)dir->FindObjectAny("h_pedestalw1_HF");
2020  HistPed[2][4][2] = (TH1F*)dir->FindObjectAny("h_pedestalw2_HF");
2021  HistPed[2][4][3] = (TH1F*)dir->FindObjectAny("h_pedestalw3_HF");
2022 
2023  for (int test = 31; test <= 32; test++) { //Test: 31-Pedestals, 32-pedestal Widths,
2024  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2025  // if (sub==1) cHB->Divide(2,1);
2026  if (sub == 1)
2027  cHB->Divide(2, 2);
2028  // if (sub==2) cHE->Divide(3,1);
2029  if (sub == 2)
2030  cHE->Divide(3, 3);
2031  if (sub == 3)
2032  cONE->Divide(1, 1);
2033  // if (sub==4) cHF->Divide(2,1);
2034  if (sub == 4)
2035  cHF->Divide(2, 2);
2036  // int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2037  // int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2038  // int k_max[5]={0,2,7,4,4}; // maximum depth for each subdet
2039  for (int k = k_min[sub]; k <= k_max[sub]; k++) { //Depths
2040  if (sub == 1)
2041  cHB->cd(k);
2042  if (sub == 2)
2043  cHE->cd(k);
2044  if (sub == 3)
2045  cONE->cd(k - 3);
2046  if (sub == 4)
2047  cHF->cd(k);
2048  Map_Ampl[test][sub][k]->Divide(Map_Ampl[test][sub][k], Map_SUB[sub][k], 1, 1, "B");
2049  gPad->SetGridy();
2050  gPad->SetGridx();
2051  gPad->SetLogz();
2052  if (sub == 1)
2053  sprintf(str, "HB, Depth%d \b", k);
2054  if (sub == 2)
2055  sprintf(str, "HE, Depth%d \b", k);
2056  if (sub == 3)
2057  sprintf(str, "HO, Depth%d \b", k);
2058  if (sub == 4)
2059  sprintf(str, "HF, Depth%d \b", k);
2060  Map_Ampl[test][sub][k]->SetTitle(str);
2061  Map_Ampl[test][sub][k]->SetXTitle("#eta \b");
2062  Map_Ampl[test][sub][k]->SetYTitle("#phi \b");
2063  Map_Ampl[test][sub][k]->SetZTitle("Rate \b");
2064  if (sub == 3)
2065  Map_Ampl[test][sub][k]->SetTitleOffset(0.8, "Z");
2066  Map_Ampl[test][sub][k]->Draw("COLZ");
2067  Map_Ampl[test][sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2068  Map_Ampl[test][sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2069  if (sub == 1) {
2070  cHB->Modified();
2071  cHB->Update();
2072  }
2073  if (sub == 2) {
2074  cHE->Modified();
2075  cHE->Update();
2076  }
2077  if (sub == 3) {
2078  cONE->Modified();
2079  cONE->Update();
2080  }
2081  if (sub == 4) {
2082  cHF->Modified();
2083  cHF->Update();
2084  }
2085  } //end depth
2086  if (test == 31) {
2087  if (sub == 1) {
2088  cHB->Print("MapRatePedHB.png");
2089  cHB->Clear();
2090  }
2091  if (sub == 2) {
2092  cHE->Print("MapRatePedHE.png");
2093  cHE->Clear();
2094  }
2095  if (sub == 3) {
2096  cONE->Print("MapRatePedHO.png");
2097  cONE->Clear();
2098  }
2099  if (sub == 4) {
2100  cHF->Print("MapRatePedHF.png");
2101  cHF->Clear();
2102  }
2103  }
2104  if (test == 32) {
2105  if (sub == 1) {
2106  cHB->Print("MapRatePedWidthsHB.png");
2107  cHB->Clear();
2108  }
2109  if (sub == 2) {
2110  cHE->Print("MapRatePedWidthsHE.png");
2111  cHE->Clear();
2112  }
2113  if (sub == 3) {
2114  cONE->Print("MapRatePedWidthsHO.png");
2115  cONE->Clear();
2116  }
2117  if (sub == 4) {
2118  cHF->Print("MapRatePedWidthsHF.png");
2119  cHF->Clear();
2120  }
2121  }
2122 
2124 
2125  cPED->Divide(2, 2);
2126  for (int cap = 0; cap <= 3; cap++) {
2127  cPED->cd(cap + 1);
2128  gPad->SetGridy();
2129  gPad->SetGridx();
2130  gPad->SetLogy();
2131 
2132  if (sub == 1)
2133  sprintf(str, "HB, Cap%d, all depth\b", cap);
2134  if (sub == 2)
2135  sprintf(str, "HE, Cap%d, all depth\b", cap);
2136  if (sub == 3)
2137  sprintf(str, "HO, Cap%d, all depth\b", cap);
2138  if (sub == 4)
2139  sprintf(str, "HF, Cap%d, all depth\b", cap);
2140 
2141  HistPed[test - 30][sub][cap]->SetTitle(str);
2142 
2143  if (test == 31)
2144  HistPed[test - 30][sub][cap]->SetXTitle("Pedestals in each event & cell \b");
2145  if (test == 32)
2146  HistPed[test - 30][sub][cap]->SetXTitle("Pedestal Widths in each event & cell \b");
2147 
2148  HistPed[test - 30][sub][cap]->SetYTitle("Number of channel-events \b");
2149  HistPed[test - 30][sub][cap]->SetLineColor(4);
2150  HistPed[test - 30][sub][cap]->SetLineWidth(2);
2151  HistPed[test - 30][sub][cap]->SetTitleOffset(1.4, "Y");
2152  HistPed[test - 30][sub][cap]->Draw("");
2153  // HistPed[test-30][sub][cap]->GetYaxis()->SetRangeUser(1., 100.);
2154  // if (test==31) {gPad->SetLogx(); HistPed[test-30][sub][cap]->GetXaxis()->SetRangeUser(1., 10000.);}
2155  // if (test==32) HistPed[test-30][sub][cap]->GetXaxis()->SetRangeUser(0., 5.);
2156 
2157  cPED->Modified();
2158  cPED->Update();
2159  double min_x[] = {Pedest[test - 31][sub], Pedest[test - 31][sub]};
2160  double min_y[] = {0., 100000000.};
2161  TGraph* MIN = new TGraph(2, min_x, min_y);
2162  MIN->SetLineStyle(2);
2163  MIN->SetLineColor(2);
2164  MIN->SetLineWidth(2 + 100 * 100);
2165  MIN->SetFillStyle(3005);
2166  MIN->SetFillColor(2);
2167  MIN->Draw("L");
2168  }
2169  if (test == 31) {
2170  if (sub == 1) {
2171  cPED->Print("HistPedestalsHB.png");
2172  cPED->Clear();
2173  }
2174  if (sub == 2) {
2175  cPED->Print("HistPedestalsHE.png");
2176  cPED->Clear();
2177  }
2178  if (sub == 3) {
2179  cPED->Print("HistPedestalsHO.png");
2180  cPED->Clear();
2181  }
2182  if (sub == 4) {
2183  cPED->Print("HistPedestalsHF.png");
2184  cPED->Clear();
2185  }
2186  }
2187  if (test == 32) {
2188  if (sub == 1) {
2189  cPED->Print("HistPedestalWidthsHB.png");
2190  cPED->Clear();
2191  }
2192  if (sub == 2) {
2193  cPED->Print("HistPedestalWidthsHE.png");
2194  cPED->Clear();
2195  }
2196  if (sub == 3) {
2197  cPED->Print("HistPedestalWidthsHO.png");
2198  cPED->Clear();
2199  }
2200  if (sub == 4) {
2201  cPED->Print("HistPedestalWidthsHF.png");
2202  cPED->Clear();
2203  }
2204  }
2205  } // end sub
2206  } //end test 31,32
2207 
2208  //+++++++++++++++++++++++++++++++++++
2209  //Test 33 Correlation of Pedestal, pedestalWidths Vs fullAmplitude
2210  //++++++++++++++++++++++++++++++++++++
2211 
2212  cPED->Clear();
2213  Map_Ped[1][1] = (TH2F*)dir->FindObjectAny("h2_pedvsampl_HB");
2214  Map_Ped[1][2] = (TH2F*)dir->FindObjectAny("h2_pedvsampl_HE");
2215  Map_Ped[1][3] = (TH2F*)dir->FindObjectAny("h2_pedvsampl_HO");
2216  Map_Ped[1][4] = (TH2F*)dir->FindObjectAny("h2_pedvsampl_HF");
2217  Map_Ped[2][1] = (TH2F*)dir->FindObjectAny("h2_pedwvsampl_HB");
2218  Map_Ped[2][2] = (TH2F*)dir->FindObjectAny("h2_pedwvsampl_HE");
2219  Map_Ped[2][3] = (TH2F*)dir->FindObjectAny("h2_pedwvsampl_HO");
2220  Map_Ped[2][4] = (TH2F*)dir->FindObjectAny("h2_pedwvsampl_HF");
2221  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2222  cPED->Divide(2, 1);
2223  for (int test = 1; test <= 2; test++) {
2224  cPED->cd(test);
2225  gPad->SetGridy();
2226  gPad->SetGridx();
2227  gPad->SetLogz();
2228  if (test == 1)
2229  Map_Ped[test][sub]->SetXTitle("Pedestal, fC \b");
2230  if (test == 2)
2231  Map_Ped[test][sub]->SetXTitle("pedestal Width, fC \b");
2232  Map_Ped[test][sub]->SetYTitle("Amplitude, fC \b");
2233  Map_Ped[test][sub]->SetZTitle("entries \b");
2234  if (test == 1)
2235  sprintf(str, "Cap0 Pedestal vs Amplitude \b");
2236  if (test == 2)
2237  sprintf(str, "Cap0 pedestalWidth vs Amplitude \b");
2238  Map_Ped[test][sub]->SetTitle(str);
2239  Map_Ped[test][sub]->Draw("COLZ");
2240  // Map_Ped[test][sub]->GetYaxis()->SetRangeUser(0, 72.);
2241  // Map_Ped[test][sub]->GetZaxis()->SetRangeUser(0.0001, 1.);
2242  cPED->Modified();
2243  cPED->Update();
2244  } // test 1,2
2245  if (sub == 1) {
2246  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHB.png");
2247  cPED->Clear();
2248  }
2249  if (sub == 2) {
2250  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHE.png");
2251  cPED->Clear();
2252  }
2253  if (sub == 3) {
2254  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHO.png");
2255  cPED->Clear();
2256  }
2257  if (sub == 4) {
2258  cPED->Print("CorrelationsMapPedestalVsfullAmplitudeHF.png");
2259  cPED->Clear();
2260  }
2261  } // end sub
2262 
2263  //+++++++++++++++++++++++++++++++++++
2264  //Test 41 Time Slices shape for good and bad channels
2265  //++++++++++++++++++++++++++++++++++++
2266 
2267  cONE->Clear();
2268  hist_GoodTSshape[1] = (TH1F*)dir->FindObjectAny("h_shape_good_channels_HB");
2269  hist_GoodTSshape[2] = (TH1F*)dir->FindObjectAny("h_shape_good_channels_HE");
2270  hist_GoodTSshape[3] = (TH1F*)dir->FindObjectAny("h_shape_good_channels_HO");
2271  hist_GoodTSshape[4] = (TH1F*)dir->FindObjectAny("h_shape_good_channels_HF");
2272 
2273  hist_GoodTSshape0[1] = (TH1F*)dir->FindObjectAny("h_shape0_good_channels_HB");
2274  hist_GoodTSshape0[2] = (TH1F*)dir->FindObjectAny("h_shape0_good_channels_HE");
2275  hist_GoodTSshape0[3] = (TH1F*)dir->FindObjectAny("h_shape0_good_channels_HO");
2276  hist_GoodTSshape0[4] = (TH1F*)dir->FindObjectAny("h_shape0_good_channels_HF");
2277 
2278  hist_BadTSshape[1] = (TH1F*)dir->FindObjectAny("h_shape_bad_channels_HB");
2279  hist_BadTSshape[2] = (TH1F*)dir->FindObjectAny("h_shape_bad_channels_HE");
2280  hist_BadTSshape[3] = (TH1F*)dir->FindObjectAny("h_shape_bad_channels_HO");
2281  hist_BadTSshape[4] = (TH1F*)dir->FindObjectAny("h_shape_bad_channels_HF");
2282 
2283  hist_BadTSshape0[1] = (TH1F*)dir->FindObjectAny("h_shape0_bad_channels_HB");
2284  hist_BadTSshape0[2] = (TH1F*)dir->FindObjectAny("h_shape0_bad_channels_HE");
2285  hist_BadTSshape0[3] = (TH1F*)dir->FindObjectAny("h_shape0_bad_channels_HO");
2286  hist_BadTSshape0[4] = (TH1F*)dir->FindObjectAny("h_shape0_bad_channels_HF");
2287 
2288  cONE->cd(1);
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_GoodTSshape[sub]->Divide(hist_GoodTSshape[sub], hist_GoodTSshape0[sub], 1, 1, "B");
2296  hist_GoodTSshape[sub]->SetXTitle("Time slice \b");
2297  hist_GoodTSshape[sub]->SetYTitle("ADC counts \b");
2298  sprintf(str, "Mean ADC Shape \b");
2299  hist_GoodTSshape[sub]->SetTitle(str);
2300  hist_GoodTSshape[sub]->Draw("");
2301  // hist_GoodTSshape[sub]->GetYaxis()->SetRangeUser(0, 72.);
2302  // hist_GoodTSshape[sub]->GetZaxis()->SetRangeUser(0.0001, 1.);
2303  cONE->Modified();
2304  cONE->Update();
2305  if (sub == 1) {
2306  cONE->Print("HistGoodTSshapesHB.png");
2307  cONE->Clear();
2308  }
2309  if (sub == 2) {
2310  cONE->Print("HistGoodTSshapesHE.png");
2311  cONE->Clear();
2312  }
2313  if (sub == 3) {
2314  cONE->Print("HistGoodTSshapesHO.png");
2315  cONE->Clear();
2316  }
2317  if (sub == 4) {
2318  cONE->Print("HistGoodTSshapesHF.png");
2319  cONE->Clear();
2320  }
2321  } // end sub
2322 
2323  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2324 
2325  gPad->SetGridy();
2326  gPad->SetGridx();
2327  gPad->SetLogz();
2328  hist_BadTSshape[sub]->Divide(hist_BadTSshape[sub], hist_BadTSshape0[sub], 1, 1, "B");
2329  hist_BadTSshape[sub]->SetXTitle("Time slice \b");
2330  hist_BadTSshape[sub]->SetYTitle("ADC counts \b");
2331  sprintf(str, "Mean ADC Shape \b");
2332  hist_BadTSshape[sub]->SetTitle(str);
2333  hist_BadTSshape[sub]->Draw("");
2334  // hist_BadTSshape[sub]->GetYaxis()->SetRangeUser(0, 72.);
2335  // hist_BadTSshape[sub]->GetZaxis()->SetRangeUser(0.0001, 1.);
2336  cONE->Modified();
2337  cONE->Update();
2338  if (sub == 1) {
2339  cONE->Print("HistBadTSshapesHB.png");
2340  cONE->Clear();
2341  }
2342  if (sub == 2) {
2343  cONE->Print("HistBadTSshapesHE.png");
2344  cONE->Clear();
2345  }
2346  if (sub == 3) {
2347  cONE->Print("HistBadTSshapesHO.png");
2348  cONE->Clear();
2349  }
2350  if (sub == 4) {
2351  cONE->Print("HistBadTSshapesHF.png");
2352  cONE->Clear();
2353  }
2354  } // end sub
2355 
2356  /*
2357  //+++++++++++++++++++++++++++++++++++
2358 //Test 42 ADC in TS distributions
2359 //++++++++++++++++++++++++++++++++++++
2360 
2361 std::cout<<" We are here to print ADC "<<std::endl;
2362 
2363  hist_ADC_All[1] = (TH1F*)dir->FindObjectAny("h_ADC_HB");
2364  hist_ADC_All[2] = (TH1F*)dir->FindObjectAny("h_ADC_HE");
2365  hist_ADC_All[3] = (TH1F*)dir->FindObjectAny("h_ADC_HO");
2366  hist_ADC_All[4] = (TH1F*)dir->FindObjectAny("h_ADC_HF");
2367 
2368 
2369  hist_ADC_DS[1][1] = (TH1F*)dir->FindObjectAny("h_ADC_HBdepth1");
2370  hist_ADC_DS[1][2] = (TH1F*)dir->FindObjectAny("h_ADC_HBdepth2");
2371  hist_ADC_DS[2][1] = (TH1F*)dir->FindObjectAny("h_ADC_HEdepth1");
2372  hist_ADC_DS[2][2] = (TH1F*)dir->FindObjectAny("h_ADC_HEdepth2");
2373  hist_ADC_DS[2][3] = (TH1F*)dir->FindObjectAny("h_ADC_HEdepth3");
2374  hist_ADC_DS[3][4] = (TH1F*)dir->FindObjectAny("h_ADC_HOdepth4");
2375  hist_ADC_DS[4][1] = (TH1F*)dir->FindObjectAny("h_ADC_HFdepth1");
2376  hist_ADC_DS[4][2] = (TH1F*)dir->FindObjectAny("h_ADC_HFdepth2");
2377 
2378 
2379  cONE->Clear();
2380  cONE->Divide(1,1);
2381  cONE->cd(1);
2382 
2383  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2384  gPad->SetGridy();
2385  gPad->SetGridx();
2386  gPad->SetLogy();
2387  hist_ADC_All[sub]->SetXTitle("ADC counts \b");
2388  hist_ADC_All[sub]->SetYTitle("Number of channels-events \b");
2389  if (sub==1) sprintf(str,"ADC counts Distribution HB\b");
2390  if (sub==2) sprintf(str,"ADC counts Distribution HE\b");
2391  if (sub==3) sprintf(str,"ADC counts Distribution HO\b");
2392  if (sub==4) sprintf(str,"ADC counts Distribution HF\b");
2393  hist_ADC_All[sub]->SetTitle(str);
2394  hist_ADC_All[sub]->Draw("");
2395  // hist_ADC_All[sub]->GetYaxis()->SetRangeUser(0, 72.);
2396  hist_ADC_All[sub]->GetXaxis()->SetRangeUser(0.000, 1000.);
2397  cONE->Modified(); cONE->Update();
2398  if (sub==1) {cONE->Print("Hist_ADC_HB_All.png"); cONE->Clear();}
2399  if (sub==2) {cONE->Print("Hist_ADC_HE_All.png"); cONE->Clear();}
2400  if (sub==3) {cONE->Print("Hist_ADC_HO_All.png"); cONE->Clear();}
2401  if (sub==4) {cONE->Print("Hist_ADC_HF_All.png"); cONE->Clear();}
2402  }// end sub
2403 
2404 
2405  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2406  if (sub==1) cHB->Divide(2,1);
2407  if (sub==2) cHE->Divide(3,1);
2408  if (sub==3) cONE->Divide(1,1);
2409  if (sub==4) cHB->Divide(2,1);
2410  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2411  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2412  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2413  if (sub==1) cHB->cd(k);
2414  if (sub==2) cHE->cd(k);
2415  if (sub==3) cONE->cd(k-3);
2416  if (sub==4) cHB->cd(k);
2417  gPad->SetGridy();
2418  gPad->SetGridx();
2419  gPad->SetLogy();
2420  hist_ADC_DS[sub][k]->SetXTitle("ADC counts \b");
2421  hist_ADC_DS[sub][k]->SetYTitle("Number of channels-events \b");
2422  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2423  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2424  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2425  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2426  hist_ADC_DS[sub][k]->SetTitle(str);
2427  hist_ADC_DS[sub][k]->Draw("");
2428  // hist_ADC_DS[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2429  hist_ADC_DS[sub][k]->GetXaxis()->SetRangeUser(0.000, 1000.);
2430  if (sub==1) {cHB->Modified(); cHB->Update();}
2431  if (sub==2) {cHE->Modified(); cHE->Update();}
2432  if (sub==3) {cONE->Modified();cONE->Update();}
2433  if (sub==4) {cHB->Modified(); cHB->Update();}
2434  }//end depth
2435  if (sub==1) {cHB->Print("Hist_ADC_HB_DS.png"); cHB->Clear();}
2436  if (sub==2) {cHE->Print("Hist_ADC_HE_DS.png"); cHE->Clear();}
2437  if (sub==3) {cONE->Print("Hist_ADC_HO_DS.png"); cONE->Clear();}
2438  if (sub==4) {cHB->Print("Hist_ADC_HF_DS.png"); cHB->Clear();}
2439  }// end sub
2440 
2441 
2442  //+++++++++++++++++++++++++++++++++++
2443 //Test 43 Sum ADC in TS distributions
2444 //++++++++++++++++++++++++++++++++++++
2445 
2446  hist_SumADC[1][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HB");
2447  hist_SumADC[1][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HB");
2448  hist_SumADC[2][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HE");
2449  hist_SumADC[2][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HE");
2450  hist_SumADC[2][3] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth3_HE");
2451  hist_SumADC[3][4] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth4_HO");
2452  hist_SumADC[4][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HF");
2453  hist_SumADC[4][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HF");
2454 
2455  hist_SumADC0[1][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HB0");
2456  hist_SumADC0[1][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HB0");
2457  hist_SumADC0[2][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HE0");
2458  hist_SumADC0[2][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HE0");
2459  hist_SumADC0[2][3] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth3_HE0");
2460  hist_SumADC0[3][4] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth4_HO0");
2461  hist_SumADC0[4][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HF0");
2462  hist_SumADC0[4][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HF0");
2463 
2464  hist_SumADC1[1][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HB1");
2465  hist_SumADC1[1][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HB1");
2466  hist_SumADC1[2][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HE1");
2467  hist_SumADC1[2][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HE1");
2468  hist_SumADC1[2][3] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth3_HE1");
2469  hist_SumADC1[3][4] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth4_HO1");
2470  hist_SumADC1[4][1] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth1_HF1");
2471  hist_SumADC1[4][2] = (TH1F*)dir->FindObjectAny("h_sumamplitude_depth2_HF1");
2472 
2473  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2474  if (sub==1) cHB->Divide(2,1);
2475  if (sub==2) cHE->Divide(3,1);
2476  if (sub==3) cONE->Divide(1,1);
2477  if (sub==4) cHB->Divide(2,1);
2478  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2479  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2480  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2481  if (sub==1) cHB->cd(k);
2482  if (sub==2) cHE->cd(k);
2483  if (sub==3) cONE->cd(k-3);
2484  if (sub==4) cHB->cd(k);
2485  gPad->SetGridy();
2486  gPad->SetGridx();
2487  gPad->SetLogy();
2488  hist_SumADC[sub][k]->SetXTitle("ADC sum \b");
2489  hist_SumADC[sub][k]->SetYTitle("Number of channels-events \b");
2490  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2491  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2492  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2493  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2494  hist_SumADC[sub][k]->SetTitle(str);
2495  hist_SumADC[sub][k]->Draw("");
2496  // hist_SumADC[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2497  // hist_SumADC[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2498  if (sub==1) {cHB->Modified(); cHB->Update();}
2499  if (sub==2) {cHE->Modified(); cHE->Update();}
2500  if (sub==3) {cONE->Modified();cONE->Update();}
2501  if (sub==4) {cHB->Modified(); cHB->Update();}
2502  }//end depth
2503  if (sub==1) {cHB->Print("Hist_SumADC_HB.png"); cHB->Clear();}
2504  if (sub==2) {cHE->Print("Hist_SumADC_HE.png"); cHE->Clear();}
2505  if (sub==3) {cONE->Print("Hist_SumADC_HO.png"); cONE->Clear();}
2506  if (sub==4) {cHB->Print("Hist_SumADC_HF.png"); cHB->Clear();}
2507  }// end sub
2508 
2509 
2510  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2511  if (sub==1) cHB->Divide(2,1);
2512  if (sub==2) cHE->Divide(3,1);
2513  if (sub==3) cONE->Divide(1,1);
2514  if (sub==4) cHB->Divide(2,1);
2515  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2516  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2517  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2518  if (sub==1) cHB->cd(k);
2519  if (sub==2) cHE->cd(k);
2520  if (sub==3) cONE->cd(k-3);
2521  if (sub==4) cHB->cd(k);
2522  gPad->SetGridy();
2523  gPad->SetGridx();
2524  gPad->SetLogy();
2525  hist_SumADC0[sub][k]->SetXTitle("ADC sum \b");
2526  hist_SumADC0[sub][k]->SetYTitle("Number of channels-events \b");
2527  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2528  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2529  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2530  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2531  hist_SumADC0[sub][k]->SetTitle(str);
2532  hist_SumADC0[sub][k]->Draw("");
2533  // hist_SumADC0[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2534  // hist_SumADC0[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2535  if (sub==1) {cHB->Modified(); cHB->Update();}
2536  if (sub==2) {cHE->Modified(); cHE->Update();}
2537  if (sub==3) {cONE->Modified();cONE->Update();}
2538  if (sub==4) {cHB->Modified(); cHB->Update();}
2539  }//end depth
2540  if (sub==1) {cHB->Print("Hist_SumADC_HB0.png"); cHB->Clear();}
2541  if (sub==2) {cHE->Print("Hist_SumADC_HE0.png"); cHE->Clear();}
2542  if (sub==3) {cONE->Print("Hist_SumADC_HO0.png"); cONE->Clear();}
2543  if (sub==4) {cHB->Print("Hist_SumADC_HF0.png"); cHB->Clear();}
2544  }// end sub
2545 
2546  for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HO, 4-HF
2547  if (sub==1) cHB->Divide(2,1);
2548  if (sub==2) cHE->Divide(3,1);
2549  if (sub==3) cONE->Divide(1,1);
2550  if (sub==4) cHB->Divide(2,1);
2551  int k_min[5]={0,1,1,4,1}; // minimum depth for each subdet
2552  int k_max[5]={0,2,3,4,2}; // maximum depth for each subdet
2553  for (int k=k_min[sub];k<=k_max[sub];k++) { //Depths
2554  if (sub==1) cHB->cd(k);
2555  if (sub==2) cHE->cd(k);
2556  if (sub==3) cONE->cd(k-3);
2557  if (sub==4) cHB->cd(k);
2558  gPad->SetGridy();
2559  gPad->SetGridx();
2560  gPad->SetLogy();
2561  hist_SumADC1[sub][k]->SetXTitle("ADC sum \b");
2562  hist_SumADC1[sub][k]->SetYTitle("Number of channels-events \b");
2563  if (sub==1) sprintf(str,"HB, Depth%d \b", k);
2564  if (sub==2) sprintf(str,"HE, Depth%d \b", k);
2565  if (sub==3) sprintf(str,"HO, Depth%d \b", k);
2566  if (sub==4) sprintf(str,"HF, Depth%d \b", k);
2567  hist_SumADC1[sub][k]->SetTitle(str);
2568  hist_SumADC1[sub][k]->Draw("");
2569  // hist_SumADC1[sub][k]->GetYaxis()->SetRangeUser(0, 72.);
2570  // hist_SumADC1[sub][k]->GetZaxis()->SetRangeUser(0.0001, 1.);
2571  if (sub==1) {cHB->Modified(); cHB->Update();}
2572  if (sub==2) {cHE->Modified(); cHE->Update();}
2573  if (sub==3) {cONE->Modified();cONE->Update();}
2574  if (sub==4) {cHB->Modified(); cHB->Update();}
2575  }//end depth
2576  if (sub==1) {cHB->Print("Hist_SumADC_HB1.png"); cHB->Clear();}
2577  if (sub==2) {cHE->Print("Hist_SumADC_HE1.png"); cHE->Clear();}
2578  if (sub==3) {cONE->Print("Hist_SumADC_HO1.png"); cONE->Clear();}
2579  if (sub==4) {cHB->Print("Hist_SumADC_HF1.png"); cHB->Clear();}
2580  }// end sub
2581 
2582 */
2583 
2589 
2590  /*
2591  depth=5 all
2592  i=1-82 in initial histo
2593  j=i-1 in massives
2594 
2595  j= 13 23 (11) 12 25 (!!!)
2596  j-41 in histo
2597  -28 -18 (11) -29 -16
2598 
2599  j= 59 69 (11) 57 70 (!!!)
2600  j-41 in histo
2601  18 28 (11) 16 29
2602  */
2603 
2604  const int nsub = 4;
2605  const int neta = 82;
2606  const int nphi = 72;
2607  int njeta = neta;
2608  int njphi = nphi;
2609  //const int ndepth = 7;
2610  int ndepth;
2614 
2622  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
2623  //ndepth = k_max[5];
2624  ndepth = 4;
2625  double adigiHB[ndepth][njeta][njphi];
2626  double digivarianceHB[ndepth][njeta][njphi];
2627  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Digi HB
2628  TH2F* amplitudechannel1HB1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HB1");
2629  TH2F* amplitudechannel0HB1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HB1");
2630  TH2F* amplitudechannelHB1 = (TH2F*)amplitudechannel1HB1->Clone("amplitudechannelHB1");
2631  amplitudechannelHB1->Divide(amplitudechannel1HB1, amplitudechannel0HB1, 1, 1, "B");
2632  TH2F* amplitudechannel1HB2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HB2");
2633  TH2F* amplitudechannel0HB2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HB2");
2634  TH2F* amplitudechannelHB2 = (TH2F*)amplitudechannel1HB2->Clone("amplitudechannelHB2");
2635  amplitudechannelHB2->Divide(amplitudechannel1HB2, amplitudechannel0HB2, 1, 1, "B");
2636  TH2F* amplitudechannel1HB3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HB3");
2637  TH2F* amplitudechannel0HB3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HB3");
2638  TH2F* amplitudechannelHB3 = (TH2F*)amplitudechannel1HB3->Clone("amplitudechannelHB3");
2639  amplitudechannelHB3->Divide(amplitudechannel1HB3, amplitudechannel0HB3, 1, 1, "B");
2640  TH2F* amplitudechannel1HB4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HB4");
2641  TH2F* amplitudechannel0HB4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HB4");
2642  TH2F* amplitudechannelHB4 = (TH2F*)amplitudechannel1HB4->Clone("amplitudechannelHB4");
2643  amplitudechannelHB4->Divide(amplitudechannel1HB4, amplitudechannel0HB4, 1, 1, "B");
2644  for (int jeta = 0; jeta < njeta; jeta++) {
2645  //====================================================================== PHI normalization & put R into massive adigiHB
2646  //preparation for PHI normalization:
2647  double sumdigiHB0 = 0;
2648  int nsumdigiHB0 = 0;
2649  double sumdigiHB1 = 0;
2650  int nsumdigiHB1 = 0;
2651  double sumdigiHB2 = 0;
2652  int nsumdigiHB2 = 0;
2653  double sumdigiHB3 = 0;
2654  int nsumdigiHB3 = 0;
2655  for (int jphi = 0; jphi < njphi; jphi++) {
2656  adigiHB[0][jeta][jphi] = amplitudechannelHB1->GetBinContent(jeta + 1, jphi + 1);
2657  adigiHB[1][jeta][jphi] = amplitudechannelHB2->GetBinContent(jeta + 1, jphi + 1);
2658  adigiHB[2][jeta][jphi] = amplitudechannelHB3->GetBinContent(jeta + 1, jphi + 1);
2659  adigiHB[3][jeta][jphi] = amplitudechannelHB4->GetBinContent(jeta + 1, jphi + 1);
2660  if (adigiHB[0][jeta][jphi] > 0.) {
2661  sumdigiHB0 += adigiHB[0][jeta][jphi];
2662  ++nsumdigiHB0;
2663  }
2664  if (adigiHB[1][jeta][jphi] > 0.) {
2665  sumdigiHB1 += adigiHB[1][jeta][jphi];
2666  ++nsumdigiHB1;
2667  }
2668  if (adigiHB[2][jeta][jphi] > 0.) {
2669  sumdigiHB2 += adigiHB[2][jeta][jphi];
2670  ++nsumdigiHB2;
2671  }
2672  if (adigiHB[3][jeta][jphi] > 0.) {
2673  sumdigiHB3 += adigiHB[3][jeta][jphi];
2674  ++nsumdigiHB3;
2675  }
2676  } // phi
2677  // PHI normalization:
2678  for (int jphi = 0; jphi < njphi; jphi++) {
2679  if (adigiHB[0][jeta][jphi] > 0.)
2680  adigiHB[0][jeta][jphi] /= (sumdigiHB0 / nsumdigiHB0);
2681  if (adigiHB[1][jeta][jphi] > 0.)
2682  adigiHB[1][jeta][jphi] /= (sumdigiHB1 / nsumdigiHB1);
2683  if (adigiHB[2][jeta][jphi] > 0.)
2684  adigiHB[2][jeta][jphi] /= (sumdigiHB2 / nsumdigiHB2);
2685  if (adigiHB[3][jeta][jphi] > 0.)
2686  adigiHB[3][jeta][jphi] /= (sumdigiHB3 / nsumdigiHB3);
2687  } // phi
2688  } //eta
2689  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
2690  //======================================================================
2691  //======================================================================
2692  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
2693  c1x0->Clear();
2695  c1x0->Divide(1, 1);
2696  c1x0->cd(1);
2697  TH2F* GefzRdigiHB42D = new TH2F("GefzRdigiHB42D", "", neta, -41., 41., nphi, 0., 72.);
2698  TH2F* GefzRdigiHB42D0 = new TH2F("GefzRdigiHB42D0", "", neta, -41., 41., nphi, 0., 72.);
2699  TH2F* GefzRdigiHB42DF = (TH2F*)GefzRdigiHB42D0->Clone("GefzRdigiHB42DF");
2700  for (int i = 0; i < ndepth; i++) {
2701  for (int jeta = 0; jeta < neta; jeta++) {
2702  for (int jphi = 0; jphi < nphi; jphi++) {
2703  double ccc1 = adigiHB[i][jeta][jphi];
2704  int k2plot = jeta - 41;
2705  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
2706  if (ccc1 != 0.) {
2707  GefzRdigiHB42D->Fill(kkk, jphi, ccc1);
2708  GefzRdigiHB42D0->Fill(kkk, jphi, 1.);
2709  }
2710  }
2711  }
2712  }
2713  GefzRdigiHB42DF->Divide(GefzRdigiHB42D, GefzRdigiHB42D0, 1, 1, "B"); // average A
2714  gPad->SetGridy();
2715  gPad->SetGridx(); // gPad->SetLogz();
2716  GefzRdigiHB42DF->SetMarkerStyle(20);
2717  GefzRdigiHB42DF->SetMarkerSize(0.4);
2718  GefzRdigiHB42DF->GetZaxis()->SetLabelSize(0.08);
2719  GefzRdigiHB42DF->SetXTitle("<R>_depth #eta \b");
2720  GefzRdigiHB42DF->SetYTitle(" #phi \b");
2721  GefzRdigiHB42DF->SetZTitle("<R>_depth \b");
2722  GefzRdigiHB42DF->SetMarkerColor(2);
2723  GefzRdigiHB42DF->SetLineColor(
2724  0); // GefzRdigiHB42DF->SetMaximum(1.000); // GefzRdigiHB42DF->SetMinimum(1.0);
2725  GefzRdigiHB42DF->Draw("COLZ");
2727  c1x0->Update();
2728  c1x0->Print("RdigiGeneralD2PhiSymmetryHB.png");
2729  c1x0->Clear();
2730  // clean-up
2731  if (GefzRdigiHB42D)
2732  delete GefzRdigiHB42D;
2733  if (GefzRdigiHB42D0)
2734  delete GefzRdigiHB42D0;
2735  if (GefzRdigiHB42DF)
2736  delete GefzRdigiHB42DF;
2737  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
2738  //======================================================================
2739  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
2740  c1x1->Clear();
2742  c1x1->Divide(1, 1);
2743  c1x1->cd(1);
2744  TH1F* GefzRdigiHB41D = new TH1F("GefzRdigiHB41D", "", nphi, 0., 72.);
2745  TH1F* GefzRdigiHB41D0 = new TH1F("GefzRdigiHB41D0", "", nphi, 0., 72.);
2746  TH1F* GefzRdigiHB41DF = (TH1F*)GefzRdigiHB41D0->Clone("GefzRdigiHB41DF");
2747  for (int jphi = 0; jphi < nphi; jphi++) {
2748  for (int jeta = 0; jeta < neta; jeta++) {
2749  for (int i = 0; i < ndepth; i++) {
2750  double ccc1 = adigiHB[i][jeta][jphi];
2751  if (ccc1 != 0.) {
2752  GefzRdigiHB41D->Fill(jphi, ccc1);
2753  GefzRdigiHB41D0->Fill(jphi, 1.);
2754  }
2755  }
2756  }
2757  }
2758  GefzRdigiHB41DF->Divide(GefzRdigiHB41D, GefzRdigiHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
2759  GefzRdigiHB41D0->Sumw2();
2760  // for (int jphi=1;jphi<73;jphi++) {GefzRdigiHB41DF->SetBinError(jphi,0.01);}
2761  gPad->SetGridy();
2762  gPad->SetGridx(); // gPad->SetLogz();
2763  GefzRdigiHB41DF->SetMarkerStyle(20);
2764  GefzRdigiHB41DF->SetMarkerSize(1.4);
2765  GefzRdigiHB41DF->GetZaxis()->SetLabelSize(0.08);
2766  GefzRdigiHB41DF->SetXTitle("#phi \b");
2767  GefzRdigiHB41DF->SetYTitle(" <R> \b");
2768  GefzRdigiHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
2769  GefzRdigiHB41DF->SetMarkerColor(4);
2770  GefzRdigiHB41DF->SetLineColor(
2771  4); // GefzRdigiHB41DF->SetMinimum(0.8); // GefzRdigiHB41DF->SetMaximum(1.000);
2772  GefzRdigiHB41DF->Draw("Error");
2774  c1x1->Update();
2775  c1x1->Print("RdigiGeneralD1PhiSymmetryHB.png");
2776  c1x1->Clear();
2777  // clean-up
2778  if (GefzRdigiHB41D)
2779  delete GefzRdigiHB41D;
2780  if (GefzRdigiHB41D0)
2781  delete GefzRdigiHB41D0;
2782  if (GefzRdigiHB41DF)
2783  delete GefzRdigiHB41DF;
2784  //========================================================================================== 4
2785  //======================================================================
2786  //======================================================================1D plot: R vs phi , different eta, depth=1
2787  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
2788  c3x5->Clear();
2790  c3x5->Divide(4, 4);
2791  c3x5->cd(1);
2792  int kcountHBpositivedirectionDigi1 = 1;
2793  TH1F* h2CeffHBpositivedirectionDigi1 = new TH1F("h2CeffHBpositivedirectionDigi1", "", nphi, 0., 72.);
2794  for (int jeta = 0; jeta < njeta; jeta++) {
2795  // positivedirectionDigi:
2796  if (jeta - 41 >= 0) {
2797  // for (int i=0;i<ndepth;i++) {
2798  // depth=1
2799  for (int i = 0; i < 1; i++) {
2800  TH1F* HBpositivedirectionDigi1 = (TH1F*)h2CeffHBpositivedirectionDigi1->Clone("twod1");
2801  float ccctest = 0; // to avoid empty massive elements
2802  for (int jphi = 0; jphi < nphi; jphi++) {
2803  double ccc1 = adigiHB[i][jeta][jphi];
2804  if (ccc1 != 0.) {
2805  HBpositivedirectionDigi1->Fill(jphi, ccc1);
2806  ccctest = 1.; //HBpositivedirectionDigi1->SetBinError(i,0.01);
2807  }
2808  } // for jphi
2809  if (ccctest > 0.) {
2810  // cout<<"444 kcountHBpositivedirectionDigi1 = "<<kcountHBpositivedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
2811  c3x5->cd(kcountHBpositivedirectionDigi1);
2812  HBpositivedirectionDigi1->SetMarkerStyle(20);
2813  HBpositivedirectionDigi1->SetMarkerSize(0.4);
2814  HBpositivedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
2815  HBpositivedirectionDigi1->SetXTitle("HBpositivedirectionDigi1 \b");
2816  HBpositivedirectionDigi1->SetMarkerColor(2);
2817  HBpositivedirectionDigi1->SetLineColor(0);
2818  gPad->SetGridy();
2819  gPad->SetGridx();
2820  // gPad->SetLogy();
2821  if (kcountHBpositivedirectionDigi1 == 1)
2822  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
2823  if (kcountHBpositivedirectionDigi1 == 2)
2824  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
2825  if (kcountHBpositivedirectionDigi1 == 3)
2826  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
2827  if (kcountHBpositivedirectionDigi1 == 4)
2828  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
2829  if (kcountHBpositivedirectionDigi1 == 5)
2830  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
2831  if (kcountHBpositivedirectionDigi1 == 6)
2832  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
2833  if (kcountHBpositivedirectionDigi1 == 7)
2834  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
2835  if (kcountHBpositivedirectionDigi1 == 8)
2836  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
2837  if (kcountHBpositivedirectionDigi1 == 9)
2838  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
2839  if (kcountHBpositivedirectionDigi1 == 10)
2840  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
2841  if (kcountHBpositivedirectionDigi1 == 11)
2842  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
2843  if (kcountHBpositivedirectionDigi1 == 12)
2844  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
2845  if (kcountHBpositivedirectionDigi1 == 13)
2846  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
2847  if (kcountHBpositivedirectionDigi1 == 14)
2848  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
2849  if (kcountHBpositivedirectionDigi1 == 15)
2850  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
2851  if (kcountHBpositivedirectionDigi1 == 16)
2852  HBpositivedirectionDigi1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
2853  HBpositivedirectionDigi1->Draw("Error");
2854  kcountHBpositivedirectionDigi1++;
2855  if (kcountHBpositivedirectionDigi1 > 16)
2856  break; //
2857  } //ccctest>0
2858 
2859  } // for i
2860  } //if(jeta-41 >= 0)
2861  } //for jeta
2863  c3x5->Update();
2864  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
2865  c3x5->Clear();
2866  // clean-up
2867  if (h2CeffHBpositivedirectionDigi1)
2868  delete h2CeffHBpositivedirectionDigi1;
2869 
2870  //========================================================================================== 5
2871  //======================================================================
2872  //======================================================================1D plot: R vs phi , different eta, depth=2
2873  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
2874  c3x5->Clear();
2876  c3x5->Divide(4, 4);
2877  c3x5->cd(1);
2878  int kcountHBpositivedirectionDigi2 = 1;
2879  TH1F* h2CeffHBpositivedirectionDigi2 = new TH1F("h2CeffHBpositivedirectionDigi2", "", nphi, 0., 72.);
2880  for (int jeta = 0; jeta < njeta; jeta++) {
2881  // positivedirectionDigi:
2882  if (jeta - 41 >= 0) {
2883  // for (int i=0;i<ndepth;i++) {
2884  // depth=2
2885  for (int i = 1; i < 2; i++) {
2886  TH1F* HBpositivedirectionDigi2 = (TH1F*)h2CeffHBpositivedirectionDigi2->Clone("twod1");
2887  float ccctest = 0; // to avoid empty massive elements
2888  for (int jphi = 0; jphi < nphi; jphi++) {
2889  double ccc1 = adigiHB[i][jeta][jphi];
2890  if (ccc1 != 0.) {
2891  HBpositivedirectionDigi2->Fill(jphi, ccc1);
2892  ccctest = 1.; //HBpositivedirectionDigi2->SetBinError(i,0.01);
2893  }
2894  } // for jphi
2895  if (ccctest > 0.) {
2896  //cout<<"555 kcountHBpositivedirectionDigi2 = "<<kcountHBpositivedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
2897  c3x5->cd(kcountHBpositivedirectionDigi2);
2898  HBpositivedirectionDigi2->SetMarkerStyle(20);
2899  HBpositivedirectionDigi2->SetMarkerSize(0.4);
2900  HBpositivedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
2901  HBpositivedirectionDigi2->SetXTitle("HBpositivedirectionDigi2 \b");
2902  HBpositivedirectionDigi2->SetMarkerColor(2);
2903  HBpositivedirectionDigi2->SetLineColor(0);
2904  gPad->SetGridy();
2905  gPad->SetGridx();
2906  // gPad->SetLogy();
2907  if (kcountHBpositivedirectionDigi2 == 1)
2908  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
2909  if (kcountHBpositivedirectionDigi2 == 2)
2910  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
2911  if (kcountHBpositivedirectionDigi2 == 3)
2912  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
2913  if (kcountHBpositivedirectionDigi2 == 4)
2914  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
2915  if (kcountHBpositivedirectionDigi2 == 5)
2916  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
2917  if (kcountHBpositivedirectionDigi2 == 6)
2918  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
2919  if (kcountHBpositivedirectionDigi2 == 7)
2920  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
2921  if (kcountHBpositivedirectionDigi2 == 8)
2922  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
2923  if (kcountHBpositivedirectionDigi2 == 9)
2924  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
2925  if (kcountHBpositivedirectionDigi2 == 10)
2926  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
2927  if (kcountHBpositivedirectionDigi2 == 11)
2928  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
2929  if (kcountHBpositivedirectionDigi2 == 12)
2930  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
2931  if (kcountHBpositivedirectionDigi2 == 13)
2932  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
2933  if (kcountHBpositivedirectionDigi2 == 14)
2934  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
2935  if (kcountHBpositivedirectionDigi2 == 15)
2936  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
2937  if (kcountHBpositivedirectionDigi2 == 16)
2938  HBpositivedirectionDigi2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
2939  HBpositivedirectionDigi2->Draw("Error");
2940  kcountHBpositivedirectionDigi2++;
2941  if (kcountHBpositivedirectionDigi2 > 16)
2942  break; // 4x6 = 24
2943  } //ccctest>0
2944 
2945  } // for i
2946  } //if(jeta-41 >= 0)
2947  } //for jeta
2949  c3x5->Update();
2950  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
2951  c3x5->Clear();
2952  // clean-up
2953  if (h2CeffHBpositivedirectionDigi2)
2954  delete h2CeffHBpositivedirectionDigi2;
2955  //========================================================================================== 6
2956  //======================================================================
2957  //======================================================================1D plot: R vs phi , different eta, depth=3
2958  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
2959  c3x5->Clear();
2961  c3x5->Divide(4, 4);
2962  c3x5->cd(1);
2963  int kcountHBpositivedirectionDigi3 = 1;
2964  TH1F* h2CeffHBpositivedirectionDigi3 = new TH1F("h2CeffHBpositivedirectionDigi3", "", nphi, 0., 72.);
2965  for (int jeta = 0; jeta < njeta; jeta++) {
2966  // positivedirectionDigi:
2967  if (jeta - 41 >= 0) {
2968  // for (int i=0;i<ndepth;i++) {
2969  // depth=3
2970  for (int i = 2; i < 3; i++) {
2971  TH1F* HBpositivedirectionDigi3 = (TH1F*)h2CeffHBpositivedirectionDigi3->Clone("twod1");
2972  float ccctest = 0; // to avoid empty massive elements
2973  for (int jphi = 0; jphi < nphi; jphi++) {
2974  double ccc1 = adigiHB[i][jeta][jphi];
2975  if (ccc1 != 0.) {
2976  HBpositivedirectionDigi3->Fill(jphi, ccc1);
2977  ccctest = 1.; //HBpositivedirectionDigi3->SetBinError(i,0.01);
2978  }
2979  } // for jphi
2980  if (ccctest > 0.) {
2981  //cout<<"666 kcountHBpositivedirectionDigi3 = "<<kcountHBpositivedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
2982  c3x5->cd(kcountHBpositivedirectionDigi3);
2983  HBpositivedirectionDigi3->SetMarkerStyle(20);
2984  HBpositivedirectionDigi3->SetMarkerSize(0.4);
2985  HBpositivedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
2986  HBpositivedirectionDigi3->SetXTitle("HBpositivedirectionDigi3 \b");
2987  HBpositivedirectionDigi3->SetMarkerColor(2);
2988  HBpositivedirectionDigi3->SetLineColor(0);
2989  gPad->SetGridy();
2990  gPad->SetGridx();
2991  // gPad->SetLogy();
2992  if (kcountHBpositivedirectionDigi3 == 1)
2993  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
2994  if (kcountHBpositivedirectionDigi3 == 2)
2995  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
2996  if (kcountHBpositivedirectionDigi3 == 3)
2997  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
2998  if (kcountHBpositivedirectionDigi3 == 4)
2999  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
3000  if (kcountHBpositivedirectionDigi3 == 5)
3001  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
3002  if (kcountHBpositivedirectionDigi3 == 6)
3003  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
3004  if (kcountHBpositivedirectionDigi3 == 7)
3005  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
3006  if (kcountHBpositivedirectionDigi3 == 8)
3007  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
3008  if (kcountHBpositivedirectionDigi3 == 9)
3009  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
3010  if (kcountHBpositivedirectionDigi3 == 10)
3011  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
3012  if (kcountHBpositivedirectionDigi3 == 11)
3013  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
3014  if (kcountHBpositivedirectionDigi3 == 12)
3015  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
3016  if (kcountHBpositivedirectionDigi3 == 13)
3017  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
3018  if (kcountHBpositivedirectionDigi3 == 14)
3019  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
3020  if (kcountHBpositivedirectionDigi3 == 15)
3021  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
3022  if (kcountHBpositivedirectionDigi3 == 16)
3023  HBpositivedirectionDigi3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
3024  HBpositivedirectionDigi3->Draw("Error");
3025  kcountHBpositivedirectionDigi3++;
3026  if (kcountHBpositivedirectionDigi3 > 16)
3027  break; // 4x6 = 24
3028  } //ccctest>0
3029 
3030  } // for i
3031  } //if(jeta-41 >= 0)
3032  } //for jeta
3034  c3x5->Update();
3035  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
3036  c3x5->Clear();
3037  // clean-up
3038  if (h2CeffHBpositivedirectionDigi3)
3039  delete h2CeffHBpositivedirectionDigi3;
3040  //========================================================================================== 7
3041  //======================================================================
3042  //======================================================================1D plot: R vs phi , different eta, depth=4
3043  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
3044  c3x5->Clear();
3046  c3x5->Divide(4, 4);
3047  c3x5->cd(1);
3048  int kcountHBpositivedirectionDigi4 = 1;
3049  TH1F* h2CeffHBpositivedirectionDigi4 = new TH1F("h2CeffHBpositivedirectionDigi4", "", nphi, 0., 72.);
3050 
3051  for (int jeta = 0; jeta < njeta; jeta++) {
3052  // positivedirectionDigi:
3053  if (jeta - 41 >= 0) {
3054  // for (int i=0;i<ndepth;i++) {
3055  // depth=4
3056  for (int i = 3; i < 4; i++) {
3057  TH1F* HBpositivedirectionDigi4 = (TH1F*)h2CeffHBpositivedirectionDigi4->Clone("twod1");
3058 
3059  float ccctest = 0; // to avoid empty massive elements
3060  for (int jphi = 0; jphi < nphi; jphi++) {
3061  double ccc1 = adigiHB[i][jeta][jphi];
3062  if (ccc1 != 0.) {
3063  HBpositivedirectionDigi4->Fill(jphi, ccc1);
3064  ccctest = 1.; //HBpositivedirectionDigi4->SetBinError(i,0.01);
3065  }
3066  } // for jphi
3067  if (ccctest > 0.) {
3068  //cout<<"777 kcountHBpositivedirectionDigi4 = "<<kcountHBpositivedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
3069  c3x5->cd(kcountHBpositivedirectionDigi4);
3070  HBpositivedirectionDigi4->SetMarkerStyle(20);
3071  HBpositivedirectionDigi4->SetMarkerSize(0.4);
3072  HBpositivedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
3073  HBpositivedirectionDigi4->SetXTitle("HBpositivedirectionDigi4 \b");
3074  HBpositivedirectionDigi4->SetMarkerColor(2);
3075  HBpositivedirectionDigi4->SetLineColor(0);
3076  gPad->SetGridy();
3077  gPad->SetGridx();
3078  // gPad->SetLogy();
3079  if (kcountHBpositivedirectionDigi4 == 1)
3080  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
3081  if (kcountHBpositivedirectionDigi4 == 2)
3082  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
3083  if (kcountHBpositivedirectionDigi4 == 3)
3084  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
3085  if (kcountHBpositivedirectionDigi4 == 4)
3086  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
3087  if (kcountHBpositivedirectionDigi4 == 5)
3088  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
3089  if (kcountHBpositivedirectionDigi4 == 6)
3090  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
3091  if (kcountHBpositivedirectionDigi4 == 7)
3092  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
3093  if (kcountHBpositivedirectionDigi4 == 8)
3094  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
3095  if (kcountHBpositivedirectionDigi4 == 9)
3096  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
3097  if (kcountHBpositivedirectionDigi4 == 10)
3098  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
3099  if (kcountHBpositivedirectionDigi4 == 11)
3100  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
3101  if (kcountHBpositivedirectionDigi4 == 12)
3102  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
3103  if (kcountHBpositivedirectionDigi4 == 13)
3104  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
3105  if (kcountHBpositivedirectionDigi4 == 14)
3106  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
3107  if (kcountHBpositivedirectionDigi4 == 15)
3108  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
3109  if (kcountHBpositivedirectionDigi4 == 16)
3110  HBpositivedirectionDigi4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
3111  HBpositivedirectionDigi4->Draw("Error");
3112  kcountHBpositivedirectionDigi4++;
3113  if (kcountHBpositivedirectionDigi4 > 16)
3114  break; // 4x6 = 24
3115  } //ccctest>0
3116 
3117  } // for i
3118  } //if(jeta-41 >= 0)
3119  } //for jeta
3121  c3x5->Update();
3122  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
3123  c3x5->Clear();
3124  // clean-up
3125  if (h2CeffHBpositivedirectionDigi4)
3126  delete h2CeffHBpositivedirectionDigi4;
3127 
3128  //========================================================================================== 1114
3129  //======================================================================
3130  //======================================================================1D plot: R vs phi , different eta, depth=1
3131  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
3132  c3x5->Clear();
3134  c3x5->Divide(4, 4);
3135  c3x5->cd(1);
3136  int kcountHBnegativedirectionDigi1 = 1;
3137  TH1F* h2CeffHBnegativedirectionDigi1 = new TH1F("h2CeffHBnegativedirectionDigi1", "", nphi, 0., 72.);
3138  for (int jeta = 0; jeta < njeta; jeta++) {
3139  // negativedirectionDigi:
3140  if (jeta - 41 < 0) {
3141  // for (int i=0;i<ndepth;i++) {
3142  // depth=1
3143  for (int i = 0; i < 1; i++) {
3144  TH1F* HBnegativedirectionDigi1 = (TH1F*)h2CeffHBnegativedirectionDigi1->Clone("twod1");
3145  float ccctest = 0; // to avoid empty massive elements
3146  for (int jphi = 0; jphi < nphi; jphi++) {
3147  double ccc1 = adigiHB[i][jeta][jphi];
3148  if (ccc1 != 0.) {
3149  HBnegativedirectionDigi1->Fill(jphi, ccc1);
3150  ccctest = 1.; //HBnegativedirectionDigi1->SetBinError(i,0.01);
3151  }
3152  } // for jphi
3153  if (ccctest > 0.) {
3154  // cout<<"444 kcountHBnegativedirectionDigi1 = "<<kcountHBnegativedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
3155  c3x5->cd(kcountHBnegativedirectionDigi1);
3156  HBnegativedirectionDigi1->SetMarkerStyle(20);
3157  HBnegativedirectionDigi1->SetMarkerSize(0.4);
3158  HBnegativedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
3159  HBnegativedirectionDigi1->SetXTitle("HBnegativedirectionDigi1 \b");
3160  HBnegativedirectionDigi1->SetMarkerColor(2);
3161  HBnegativedirectionDigi1->SetLineColor(0);
3162  gPad->SetGridy();
3163  gPad->SetGridx();
3164  // gPad->SetLogy();
3165  if (kcountHBnegativedirectionDigi1 == 1)
3166  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
3167  if (kcountHBnegativedirectionDigi1 == 2)
3168  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
3169  if (kcountHBnegativedirectionDigi1 == 3)
3170  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
3171  if (kcountHBnegativedirectionDigi1 == 4)
3172  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
3173  if (kcountHBnegativedirectionDigi1 == 5)
3174  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
3175  if (kcountHBnegativedirectionDigi1 == 6)
3176  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
3177  if (kcountHBnegativedirectionDigi1 == 7)
3178  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
3179  if (kcountHBnegativedirectionDigi1 == 8)
3180  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
3181  if (kcountHBnegativedirectionDigi1 == 9)
3182  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
3183  if (kcountHBnegativedirectionDigi1 == 10)
3184  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
3185  if (kcountHBnegativedirectionDigi1 == 11)
3186  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
3187  if (kcountHBnegativedirectionDigi1 == 12)
3188  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
3189  if (kcountHBnegativedirectionDigi1 == 13)
3190  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
3191  if (kcountHBnegativedirectionDigi1 == 14)
3192  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
3193  if (kcountHBnegativedirectionDigi1 == 15)
3194  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
3195  if (kcountHBnegativedirectionDigi1 == 16)
3196  HBnegativedirectionDigi1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
3197  HBnegativedirectionDigi1->Draw("Error");
3198  kcountHBnegativedirectionDigi1++;
3199  if (kcountHBnegativedirectionDigi1 > 16)
3200  break; //
3201  } //ccctest>0
3202 
3203  } // for i
3204  } //if(jeta-41 < 0 )
3205  } //for jeta
3207  c3x5->Update();
3208  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
3209  c3x5->Clear();
3210  // clean-up
3211  if (h2CeffHBnegativedirectionDigi1)
3212  delete h2CeffHBnegativedirectionDigi1;
3213 
3214  //========================================================================================== 1115
3215  //======================================================================
3216  //======================================================================1D plot: R vs phi , different eta, depth=2
3217  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
3218  c3x5->Clear();
3220  c3x5->Divide(4, 4);
3221  c3x5->cd(1);
3222  int kcountHBnegativedirectionDigi2 = 1;
3223  TH1F* h2CeffHBnegativedirectionDigi2 = new TH1F("h2CeffHBnegativedirectionDigi2", "", nphi, 0., 72.);
3224  for (int jeta = 0; jeta < njeta; jeta++) {
3225  // negativedirectionDigi:
3226  if (jeta - 41 < 0) {
3227  // for (int i=0;i<ndepth;i++) {
3228  // depth=2
3229  for (int i = 1; i < 2; i++) {
3230  TH1F* HBnegativedirectionDigi2 = (TH1F*)h2CeffHBnegativedirectionDigi2->Clone("twod1");
3231  float ccctest = 0; // to avoid empty massive elements
3232  for (int jphi = 0; jphi < nphi; jphi++) {
3233  double ccc1 = adigiHB[i][jeta][jphi];
3234  if (ccc1 != 0.) {
3235  HBnegativedirectionDigi2->Fill(jphi, ccc1);
3236  ccctest = 1.; //HBnegativedirectionDigi2->SetBinError(i,0.01);
3237  }
3238  } // for jphi
3239  if (ccctest > 0.) {
3240  //cout<<"555 kcountHBnegativedirectionDigi2 = "<<kcountHBnegativedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
3241  c3x5->cd(kcountHBnegativedirectionDigi2);
3242  HBnegativedirectionDigi2->SetMarkerStyle(20);
3243  HBnegativedirectionDigi2->SetMarkerSize(0.4);
3244  HBnegativedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
3245  HBnegativedirectionDigi2->SetXTitle("HBnegativedirectionDigi2 \b");
3246  HBnegativedirectionDigi2->SetMarkerColor(2);
3247  HBnegativedirectionDigi2->SetLineColor(0);
3248  gPad->SetGridy();
3249  gPad->SetGridx();
3250  // gPad->SetLogy();
3251  if (kcountHBnegativedirectionDigi2 == 1)
3252  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
3253  if (kcountHBnegativedirectionDigi2 == 2)
3254  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
3255  if (kcountHBnegativedirectionDigi2 == 3)
3256  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
3257  if (kcountHBnegativedirectionDigi2 == 4)
3258  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
3259  if (kcountHBnegativedirectionDigi2 == 5)
3260  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
3261  if (kcountHBnegativedirectionDigi2 == 6)
3262  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
3263  if (kcountHBnegativedirectionDigi2 == 7)
3264  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
3265  if (kcountHBnegativedirectionDigi2 == 8)
3266  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
3267  if (kcountHBnegativedirectionDigi2 == 9)
3268  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
3269  if (kcountHBnegativedirectionDigi2 == 10)
3270  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
3271  if (kcountHBnegativedirectionDigi2 == 11)
3272  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
3273  if (kcountHBnegativedirectionDigi2 == 12)
3274  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
3275  if (kcountHBnegativedirectionDigi2 == 13)
3276  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
3277  if (kcountHBnegativedirectionDigi2 == 14)
3278  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
3279  if (kcountHBnegativedirectionDigi2 == 15)
3280  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
3281  if (kcountHBnegativedirectionDigi2 == 16)
3282  HBnegativedirectionDigi2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
3283  HBnegativedirectionDigi2->Draw("Error");
3284  kcountHBnegativedirectionDigi2++;
3285  if (kcountHBnegativedirectionDigi2 > 16)
3286  break; // 4x6 = 24
3287  } //ccctest>0
3288 
3289  } // for i
3290  } //if(jeta-41 < 0 )
3291  } //for jeta
3293  c3x5->Update();
3294  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
3295  c3x5->Clear();
3296  // clean-up
3297  if (h2CeffHBnegativedirectionDigi2)
3298  delete h2CeffHBnegativedirectionDigi2;
3299  //========================================================================================== 1116
3300  //======================================================================
3301  //======================================================================1D plot: R vs phi , different eta, depth=3
3302  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
3303  c3x5->Clear();
3305  c3x5->Divide(4, 4);
3306  c3x5->cd(1);
3307  int kcountHBnegativedirectionDigi3 = 1;
3308  TH1F* h2CeffHBnegativedirectionDigi3 = new TH1F("h2CeffHBnegativedirectionDigi3", "", nphi, 0., 72.);
3309  for (int jeta = 0; jeta < njeta; jeta++) {
3310  // negativedirectionDigi:
3311  if (jeta - 41 < 0) {
3312  // for (int i=0;i<ndepth;i++) {
3313  // depth=3
3314  for (int i = 2; i < 3; i++) {
3315  TH1F* HBnegativedirectionDigi3 = (TH1F*)h2CeffHBnegativedirectionDigi3->Clone("twod1");
3316  float ccctest = 0; // to avoid empty massive elements
3317  for (int jphi = 0; jphi < nphi; jphi++) {
3318  double ccc1 = adigiHB[i][jeta][jphi];
3319  if (ccc1 != 0.) {
3320  HBnegativedirectionDigi3->Fill(jphi, ccc1);
3321  ccctest = 1.; //HBnegativedirectionDigi3->SetBinError(i,0.01);
3322  }
3323  } // for jphi
3324  if (ccctest > 0.) {
3325  //cout<<"666 kcountHBnegativedirectionDigi3 = "<<kcountHBnegativedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
3326  c3x5->cd(kcountHBnegativedirectionDigi3);
3327  HBnegativedirectionDigi3->SetMarkerStyle(20);
3328  HBnegativedirectionDigi3->SetMarkerSize(0.4);
3329  HBnegativedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
3330  HBnegativedirectionDigi3->SetXTitle("HBnegativedirectionDigi3 \b");
3331  HBnegativedirectionDigi3->SetMarkerColor(2);
3332  HBnegativedirectionDigi3->SetLineColor(0);
3333  gPad->SetGridy();
3334  gPad->SetGridx();
3335  // gPad->SetLogy();
3336  if (kcountHBnegativedirectionDigi3 == 1)
3337  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
3338  if (kcountHBnegativedirectionDigi3 == 2)
3339  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
3340  if (kcountHBnegativedirectionDigi3 == 3)
3341  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
3342  if (kcountHBnegativedirectionDigi3 == 4)
3343  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
3344  if (kcountHBnegativedirectionDigi3 == 5)
3345  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
3346  if (kcountHBnegativedirectionDigi3 == 6)
3347  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
3348  if (kcountHBnegativedirectionDigi3 == 7)
3349  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
3350  if (kcountHBnegativedirectionDigi3 == 8)
3351  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
3352  if (kcountHBnegativedirectionDigi3 == 9)
3353  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
3354  if (kcountHBnegativedirectionDigi3 == 10)
3355  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
3356  if (kcountHBnegativedirectionDigi3 == 11)
3357  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
3358  if (kcountHBnegativedirectionDigi3 == 12)
3359  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
3360  if (kcountHBnegativedirectionDigi3 == 13)
3361  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
3362  if (kcountHBnegativedirectionDigi3 == 14)
3363  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
3364  if (kcountHBnegativedirectionDigi3 == 15)
3365  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
3366  if (kcountHBnegativedirectionDigi3 == 16)
3367  HBnegativedirectionDigi3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
3368 
3369  HBnegativedirectionDigi3->Draw("Error");
3370  kcountHBnegativedirectionDigi3++;
3371  if (kcountHBnegativedirectionDigi3 > 16)
3372  break; // 4x6 = 24
3373  } //ccctest>0
3374 
3375  } // for i
3376  } //if(jeta-41 < 0 )
3377  } //for jeta
3379  c3x5->Update();
3380  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
3381  c3x5->Clear();
3382  // clean-up
3383  if (h2CeffHBnegativedirectionDigi3)
3384  delete h2CeffHBnegativedirectionDigi3;
3385  //========================================================================================== 1117
3386  //======================================================================
3387  //======================================================================1D plot: R vs phi , different eta, depth=4
3388  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
3389  c3x5->Clear();
3391  c3x5->Divide(4, 4);
3392  c3x5->cd(1);
3393  int kcountHBnegativedirectionDigi4 = 1;
3394  TH1F* h2CeffHBnegativedirectionDigi4 = new TH1F("h2CeffHBnegativedirectionDigi4", "", nphi, 0., 72.);
3395 
3396  for (int jeta = 0; jeta < njeta; jeta++) {
3397  // negativedirectionDigi:
3398  if (jeta - 41 < 0) {
3399  // for (int i=0;i<ndepth;i++) {
3400  // depth=4
3401  for (int i = 3; i < 4; i++) {
3402  TH1F* HBnegativedirectionDigi4 = (TH1F*)h2CeffHBnegativedirectionDigi4->Clone("twod1");
3403 
3404  float ccctest = 0; // to avoid empty massive elements
3405  for (int jphi = 0; jphi < nphi; jphi++) {
3406  double ccc1 = adigiHB[i][jeta][jphi];
3407  if (ccc1 != 0.) {
3408  HBnegativedirectionDigi4->Fill(jphi, ccc1);
3409  ccctest = 1.; //HBnegativedirectionDigi4->SetBinError(i,0.01);
3410  }
3411  } // for jphi
3412  if (ccctest > 0.) {
3413  //cout<<"777 kcountHBnegativedirectionDigi4 = "<<kcountHBnegativedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
3414  c3x5->cd(kcountHBnegativedirectionDigi4);
3415  HBnegativedirectionDigi4->SetMarkerStyle(20);
3416  HBnegativedirectionDigi4->SetMarkerSize(0.4);
3417  HBnegativedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
3418  HBnegativedirectionDigi4->SetXTitle("HBnegativedirectionDigi4 \b");
3419  HBnegativedirectionDigi4->SetMarkerColor(2);
3420  HBnegativedirectionDigi4->SetLineColor(0);
3421  gPad->SetGridy();
3422  gPad->SetGridx();
3423  // gPad->SetLogy();
3424  if (kcountHBnegativedirectionDigi4 == 1)
3425  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
3426  if (kcountHBnegativedirectionDigi4 == 2)
3427  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
3428  if (kcountHBnegativedirectionDigi4 == 3)
3429  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
3430  if (kcountHBnegativedirectionDigi4 == 4)
3431  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
3432  if (kcountHBnegativedirectionDigi4 == 5)
3433  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
3434  if (kcountHBnegativedirectionDigi4 == 6)
3435  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
3436  if (kcountHBnegativedirectionDigi4 == 7)
3437  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
3438  if (kcountHBnegativedirectionDigi4 == 8)
3439  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
3440  if (kcountHBnegativedirectionDigi4 == 9)
3441  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
3442  if (kcountHBnegativedirectionDigi4 == 10)
3443  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
3444  if (kcountHBnegativedirectionDigi4 == 11)
3445  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
3446  if (kcountHBnegativedirectionDigi4 == 12)
3447  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
3448  if (kcountHBnegativedirectionDigi4 == 13)
3449  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
3450  if (kcountHBnegativedirectionDigi4 == 14)
3451  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
3452  if (kcountHBnegativedirectionDigi4 == 15)
3453  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
3454  if (kcountHBnegativedirectionDigi4 == 16)
3455  HBnegativedirectionDigi4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
3456  HBnegativedirectionDigi4->Draw("Error");
3457  kcountHBnegativedirectionDigi4++;
3458  if (kcountHBnegativedirectionDigi4 > 16)
3459  break; // 4x6 = 24
3460  } //ccctest>0
3461 
3462  } // for i
3463  } //if(jeta-41 < 0 )
3464  } //for jeta
3466  c3x5->Update();
3467  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
3468  c3x5->Clear();
3469  // clean-up
3470  if (h2CeffHBnegativedirectionDigi4)
3471  delete h2CeffHBnegativedirectionDigi4;
3472 
3473  //======================================================================================================================
3474  //======================================================================================================================
3475  //======================================================================================================================
3476  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
3477 
3478  //cout<<" Start Vaiance: preparation *****" <<endl;
3479  TH2F* digiVariance1HB1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HB1");
3480  TH2F* digiVariance0HB1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HB1");
3481  TH2F* digiVarianceHB1 = (TH2F*)digiVariance1HB1->Clone("digiVarianceHB1");
3482  digiVarianceHB1->Divide(digiVariance1HB1, digiVariance0HB1, 1, 1, "B");
3483  TH2F* digiVariance1HB2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HB2");
3484  TH2F* digiVariance0HB2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HB2");
3485  TH2F* digiVarianceHB2 = (TH2F*)digiVariance1HB2->Clone("digiVarianceHB2");
3486  digiVarianceHB2->Divide(digiVariance1HB2, digiVariance0HB2, 1, 1, "B");
3487  TH2F* digiVariance1HB3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HB3");
3488  TH2F* digiVariance0HB3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HB3");
3489  TH2F* digiVarianceHB3 = (TH2F*)digiVariance1HB3->Clone("digiVarianceHB3");
3490  digiVarianceHB3->Divide(digiVariance1HB3, digiVariance0HB3, 1, 1, "B");
3491  TH2F* digiVariance1HB4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HB4");
3492  TH2F* digiVariance0HB4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HB4");
3493  TH2F* digiVarianceHB4 = (TH2F*)digiVariance1HB4->Clone("digiVarianceHB4");
3494  digiVarianceHB4->Divide(digiVariance1HB4, digiVariance0HB4, 1, 1, "B");
3495  //cout<<" Vaiance: preparation DONE *****" <<endl;
3496  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive digivarianceHB
3497  // = sum(R*R)/N - (sum(R)/N)**2
3498  for (int jeta = 0; jeta < njeta; jeta++) {
3499  //preparation for PHI normalization:
3500  double sumdigiHB0 = 0;
3501  int nsumdigiHB0 = 0;
3502  double sumdigiHB1 = 0;
3503  int nsumdigiHB1 = 0;
3504  double sumdigiHB2 = 0;
3505  int nsumdigiHB2 = 0;
3506  double sumdigiHB3 = 0;
3507  int nsumdigiHB3 = 0;
3508  for (int jphi = 0; jphi < njphi; jphi++) {
3509  digivarianceHB[0][jeta][jphi] = digiVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
3510  digivarianceHB[1][jeta][jphi] = digiVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
3511  digivarianceHB[2][jeta][jphi] = digiVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
3512  digivarianceHB[3][jeta][jphi] = digiVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
3513  if (digivarianceHB[0][jeta][jphi] > 0.) {
3514  sumdigiHB0 += digivarianceHB[0][jeta][jphi];
3515  ++nsumdigiHB0;
3516  }
3517  if (digivarianceHB[1][jeta][jphi] > 0.) {
3518  sumdigiHB1 += digivarianceHB[1][jeta][jphi];
3519  ++nsumdigiHB1;
3520  }
3521  if (digivarianceHB[2][jeta][jphi] > 0.) {
3522  sumdigiHB2 += digivarianceHB[2][jeta][jphi];
3523  ++nsumdigiHB2;
3524  }
3525  if (digivarianceHB[3][jeta][jphi] > 0.) {
3526  sumdigiHB3 += digivarianceHB[3][jeta][jphi];
3527  ++nsumdigiHB3;
3528  }
3529  } // phi
3530  // PHI normalization :
3531  for (int jphi = 0; jphi < njphi; jphi++) {
3532  if (digivarianceHB[0][jeta][jphi] > 0.)
3533  digivarianceHB[0][jeta][jphi] /= (sumdigiHB0 / nsumdigiHB0);
3534  if (digivarianceHB[1][jeta][jphi] > 0.)
3535  digivarianceHB[1][jeta][jphi] /= (sumdigiHB1 / nsumdigiHB1);
3536  if (digivarianceHB[2][jeta][jphi] > 0.)
3537  digivarianceHB[2][jeta][jphi] /= (sumdigiHB2 / nsumdigiHB2);
3538  if (digivarianceHB[3][jeta][jphi] > 0.)
3539  digivarianceHB[3][jeta][jphi] /= (sumdigiHB3 / nsumdigiHB3);
3540  } // phi
3541  // digivarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
3542  for (int jphi = 0; jphi < njphi; jphi++) {
3543  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
3544  digivarianceHB[0][jeta][jphi] -= adigiHB[0][jeta][jphi] * adigiHB[0][jeta][jphi];
3545  digivarianceHB[0][jeta][jphi] = fabs(digivarianceHB[0][jeta][jphi]);
3546  digivarianceHB[1][jeta][jphi] -= adigiHB[1][jeta][jphi] * adigiHB[1][jeta][jphi];
3547  digivarianceHB[1][jeta][jphi] = fabs(digivarianceHB[1][jeta][jphi]);
3548  digivarianceHB[2][jeta][jphi] -= adigiHB[2][jeta][jphi] * adigiHB[2][jeta][jphi];
3549  digivarianceHB[2][jeta][jphi] = fabs(digivarianceHB[2][jeta][jphi]);
3550  digivarianceHB[3][jeta][jphi] -= adigiHB[3][jeta][jphi] * adigiHB[3][jeta][jphi];
3551  digivarianceHB[3][jeta][jphi] = fabs(digivarianceHB[3][jeta][jphi]);
3552  }
3553  }
3554  //cout<<" Vaiance: DONE*****" <<endl;
3555  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
3556  //======================================================================
3557  //======================================================================
3558  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
3559  c1x1->Clear();
3561  c1x0->Divide(1, 1);
3562  c1x0->cd(1);
3563  TH2F* DefzDdigiHB42D = new TH2F("DefzDdigiHB42D", "", neta, -41., 41., nphi, 0., 72.);
3564  TH2F* DefzDdigiHB42D0 = new TH2F("DefzDdigiHB42D0", "", neta, -41., 41., nphi, 0., 72.);
3565  TH2F* DefzDdigiHB42DF = (TH2F*)DefzDdigiHB42D0->Clone("DefzDdigiHB42DF");
3566  for (int i = 0; i < ndepth; i++) {
3567  for (int jeta = 0; jeta < neta; jeta++) {
3568  for (int jphi = 0; jphi < nphi; jphi++) {
3569  double ccc1 = digivarianceHB[i][jeta][jphi];
3570  int k2plot = jeta - 41;
3571  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
3572  if (adigiHB[i][jeta][jphi] > 0.) {
3573  DefzDdigiHB42D->Fill(kkk, jphi, ccc1);
3574  DefzDdigiHB42D0->Fill(kkk, jphi, 1.);
3575  }
3576  }
3577  }
3578  }
3579  DefzDdigiHB42DF->Divide(DefzDdigiHB42D, DefzDdigiHB42D0, 1, 1, "B"); // average A
3580  // DefzDdigiHB1->Sumw2();
3581  gPad->SetGridy();
3582  gPad->SetGridx(); // gPad->SetLogz();
3583  DefzDdigiHB42DF->SetMarkerStyle(20);
3584  DefzDdigiHB42DF->SetMarkerSize(0.4);
3585  DefzDdigiHB42DF->GetZaxis()->SetLabelSize(0.08);
3586  DefzDdigiHB42DF->SetXTitle("<D>_depth #eta \b");
3587  DefzDdigiHB42DF->SetYTitle(" #phi \b");
3588  DefzDdigiHB42DF->SetZTitle("<D>_depth \b");
3589  DefzDdigiHB42DF->SetMarkerColor(2);
3590  DefzDdigiHB42DF->SetLineColor(
3591  0); // DefzDdigiHB42DF->SetMaximum(1.000); // DefzDdigiHB42DF->SetMinimum(1.0);
3592  DefzDdigiHB42DF->Draw("COLZ");
3594  c1x0->Update();
3595  c1x0->Print("DdigiGeneralD2PhiSymmetryHB.png");
3596  c1x0->Clear();
3597  // clean-up
3598  if (DefzDdigiHB42D)
3599  delete DefzDdigiHB42D;
3600  if (DefzDdigiHB42D0)
3601  delete DefzDdigiHB42D0;
3602  if (DefzDdigiHB42DF)
3603  delete DefzDdigiHB42DF;
3604  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
3605  //======================================================================
3606  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
3607  c1x1->Clear();
3609  c1x1->Divide(1, 1);
3610  c1x1->cd(1);
3611  TH1F* DefzDdigiHB41D = new TH1F("DefzDdigiHB41D", "", nphi, 0., 72.);
3612  TH1F* DefzDdigiHB41D0 = new TH1F("DefzDdigiHB41D0", "", nphi, 0., 72.);
3613  TH1F* DefzDdigiHB41DF = (TH1F*)DefzDdigiHB41D0->Clone("DefzDdigiHB41DF");
3614 
3615  for (int jphi = 0; jphi < nphi; jphi++) {
3616  for (int jeta = 0; jeta < neta; jeta++) {
3617  for (int i = 0; i < ndepth; i++) {
3618  double ccc1 = digivarianceHB[i][jeta][jphi];
3619  if (adigiHB[i][jeta][jphi] > 0.) {
3620  DefzDdigiHB41D->Fill(jphi, ccc1);
3621  DefzDdigiHB41D0->Fill(jphi, 1.);
3622  }
3623  }
3624  }
3625  }
3626  // DefzDdigiHB41D->Sumw2();DefzDdigiHB41D0->Sumw2();
3627 
3628  DefzDdigiHB41DF->Divide(DefzDdigiHB41D, DefzDdigiHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
3629  DefzDdigiHB41D0->Sumw2();
3630  // for (int jphi=1;jphi<73;jphi++) {DefzDdigiHB41DF->SetBinError(jphi,0.01);}
3631  gPad->SetGridy();
3632  gPad->SetGridx(); // gPad->SetLogz();
3633  DefzDdigiHB41DF->SetMarkerStyle(20);
3634  DefzDdigiHB41DF->SetMarkerSize(1.4);
3635  DefzDdigiHB41DF->GetZaxis()->SetLabelSize(0.08);
3636  DefzDdigiHB41DF->SetXTitle("#phi \b");
3637  DefzDdigiHB41DF->SetYTitle(" <D> \b");
3638  DefzDdigiHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
3639  DefzDdigiHB41DF->SetMarkerColor(4);
3640  DefzDdigiHB41DF->SetLineColor(4); // DefzDdigiHB41DF->SetMinimum(0.8); DefzDdigiHB41DF->SetMinimum(-0.015);
3641  DefzDdigiHB41DF->Draw("Error");
3643  c1x1->Update();
3644  c1x1->Print("DdigiGeneralD1PhiSymmetryHB.png");
3645  c1x1->Clear();
3646  // clean-up
3647  if (DefzDdigiHB41D)
3648  delete DefzDdigiHB41D;
3649  if (DefzDdigiHB41D0)
3650  delete DefzDdigiHB41D0;
3651  if (DefzDdigiHB41DF)
3652  delete DefzDdigiHB41DF;
3653 
3654  //========================================================================================== 14
3655  //======================================================================
3656  //======================================================================1D plot: D vs phi , different eta, depth=1
3657  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
3658  c3x5->Clear();
3660  c3x5->Divide(4, 4);
3661  c3x5->cd(1);
3662  int kcountHBpositivedirectionDigiD1 = 1;
3663  TH1F* h2CeffHBpositivedirectionDigiD1 = new TH1F("h2CeffHBpositivedirectionDigiD1", "", nphi, 0., 72.);
3664 
3665  for (int jeta = 0; jeta < njeta; jeta++) {
3666  // positivedirectionDigiD:
3667  if (jeta - 41 >= 0) {
3668  // for (int i=0;i<ndepth;i++) {
3669  // depth=1
3670  for (int i = 0; i < 1; i++) {
3671  TH1F* HBpositivedirectionDigiD1 = (TH1F*)h2CeffHBpositivedirectionDigiD1->Clone("twod1");
3672 
3673  float ccctest = 0; // to avoid empty massive elements
3674  for (int jphi = 0; jphi < nphi; jphi++) {
3675  double ccc1 = digivarianceHB[i][jeta][jphi];
3676  if (adigiHB[i][jeta][jphi] > 0.) {
3677  HBpositivedirectionDigiD1->Fill(jphi, ccc1);
3678  ccctest = 1.; //HBpositivedirectionDigiD1->SetBinError(i,0.01);
3679  }
3680  } // for jphi
3681  if (ccctest > 0.) {
3682  //cout<<"1414 kcountHBpositivedirectionDigiD1 = "<<kcountHBpositivedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
3683  c3x5->cd(kcountHBpositivedirectionDigiD1);
3684  HBpositivedirectionDigiD1->SetMarkerStyle(20);
3685  HBpositivedirectionDigiD1->SetMarkerSize(0.4);
3686  HBpositivedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
3687  HBpositivedirectionDigiD1->SetXTitle("HBpositivedirectionDigiD1 \b");
3688  HBpositivedirectionDigiD1->SetMarkerColor(2);
3689  HBpositivedirectionDigiD1->SetLineColor(0);
3690  gPad->SetGridy();
3691  gPad->SetGridx();
3692  // gPad->SetLogy();
3693  if (kcountHBpositivedirectionDigiD1 == 1)
3694  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
3695  if (kcountHBpositivedirectionDigiD1 == 2)
3696  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
3697  if (kcountHBpositivedirectionDigiD1 == 3)
3698  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
3699  if (kcountHBpositivedirectionDigiD1 == 4)
3700  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
3701  if (kcountHBpositivedirectionDigiD1 == 5)
3702  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
3703  if (kcountHBpositivedirectionDigiD1 == 6)
3704  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
3705  if (kcountHBpositivedirectionDigiD1 == 7)
3706  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
3707  if (kcountHBpositivedirectionDigiD1 == 8)
3708  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
3709  if (kcountHBpositivedirectionDigiD1 == 9)
3710  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
3711  if (kcountHBpositivedirectionDigiD1 == 10)
3712  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
3713  if (kcountHBpositivedirectionDigiD1 == 11)
3714  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
3715  if (kcountHBpositivedirectionDigiD1 == 12)
3716  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
3717  if (kcountHBpositivedirectionDigiD1 == 13)
3718  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
3719  if (kcountHBpositivedirectionDigiD1 == 14)
3720  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
3721  if (kcountHBpositivedirectionDigiD1 == 15)
3722  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
3723  if (kcountHBpositivedirectionDigiD1 == 16)
3724  HBpositivedirectionDigiD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
3725  HBpositivedirectionDigiD1->Draw("Error");
3726  kcountHBpositivedirectionDigiD1++;
3727  if (kcountHBpositivedirectionDigiD1 > 16)
3728  break; // 4x6 = 24
3729  } //ccctest>0
3730 
3731  } // for i
3732  } //if(jeta-41 >= 0)
3733  } //for jeta
3735  c3x5->Update();
3736  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
3737  c3x5->Clear();
3738  // clean-up
3739  if (h2CeffHBpositivedirectionDigiD1)
3740  delete h2CeffHBpositivedirectionDigiD1;
3741  //========================================================================================== 15
3742  //======================================================================
3743  //======================================================================1D plot: D vs phi , different eta, depth=2
3744  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
3745  c3x5->Clear();
3746  c3x5->Divide(4, 4);
3747  c3x5->cd(1);
3748  int kcountHBpositivedirectionDigiD2 = 1;
3749  TH1F* h2CeffHBpositivedirectionDigiD2 = new TH1F("h2CeffHBpositivedirectionDigiD2", "", nphi, 0., 72.);
3750 
3751  for (int jeta = 0; jeta < njeta; jeta++) {
3752  // positivedirectionDigiD:
3753  if (jeta - 41 >= 0) {
3754  // for (int i=0;i<ndepth;i++) {
3755  // depth=2
3756  for (int i = 1; i < 2; i++) {
3757  TH1F* HBpositivedirectionDigiD2 = (TH1F*)h2CeffHBpositivedirectionDigiD2->Clone("twod1");
3758 
3759  float ccctest = 0; // to avoid empty massive elements
3760  for (int jphi = 0; jphi < nphi; jphi++) {
3761  double ccc1 = digivarianceHB[i][jeta][jphi];
3762  if (adigiHB[i][jeta][jphi] > 0.) {
3763  HBpositivedirectionDigiD2->Fill(jphi, ccc1);
3764  ccctest = 1.; //HBpositivedirectionDigiD2->SetBinError(i,0.01);
3765  }
3766  } // for jphi
3767  if (ccctest > 0.) {
3768  //cout<<"1515 kcountHBpositivedirectionDigiD2 = "<<kcountHBpositivedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
3769  c3x5->cd(kcountHBpositivedirectionDigiD2);
3770  HBpositivedirectionDigiD2->SetMarkerStyle(20);
3771  HBpositivedirectionDigiD2->SetMarkerSize(0.4);
3772  HBpositivedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
3773  HBpositivedirectionDigiD2->SetXTitle("HBpositivedirectionDigiD2 \b");
3774  HBpositivedirectionDigiD2->SetMarkerColor(2);
3775  HBpositivedirectionDigiD2->SetLineColor(0);
3776  gPad->SetGridy();
3777  gPad->SetGridx();
3778  // gPad->SetLogy();
3779  if (kcountHBpositivedirectionDigiD2 == 1)
3780  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
3781  if (kcountHBpositivedirectionDigiD2 == 2)
3782  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
3783  if (kcountHBpositivedirectionDigiD2 == 3)
3784  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
3785  if (kcountHBpositivedirectionDigiD2 == 4)
3786  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
3787  if (kcountHBpositivedirectionDigiD2 == 5)
3788  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
3789  if (kcountHBpositivedirectionDigiD2 == 6)
3790  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
3791  if (kcountHBpositivedirectionDigiD2 == 7)
3792  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
3793  if (kcountHBpositivedirectionDigiD2 == 8)
3794  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
3795  if (kcountHBpositivedirectionDigiD2 == 9)
3796  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
3797  if (kcountHBpositivedirectionDigiD2 == 10)
3798  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
3799  if (kcountHBpositivedirectionDigiD2 == 11)
3800  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
3801  if (kcountHBpositivedirectionDigiD2 == 12)
3802  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
3803  if (kcountHBpositivedirectionDigiD2 == 13)
3804  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
3805  if (kcountHBpositivedirectionDigiD2 == 14)
3806  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
3807  if (kcountHBpositivedirectionDigiD2 == 15)
3808  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
3809  if (kcountHBpositivedirectionDigiD2 == 16)
3810  HBpositivedirectionDigiD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
3811  HBpositivedirectionDigiD2->Draw("Error");
3812  kcountHBpositivedirectionDigiD2++;
3813  if (kcountHBpositivedirectionDigiD2 > 16)
3814  break; // 4x6 = 24
3815  } //ccctest>0
3816 
3817  } // for i
3818  } //if(jeta-41 >= 0)
3819  } //for jeta
3821  c3x5->Update();
3822  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
3823  c3x5->Clear();
3824  // clean-up
3825  if (h2CeffHBpositivedirectionDigiD2)
3826  delete h2CeffHBpositivedirectionDigiD2;
3827  //========================================================================================== 16
3828  //======================================================================
3829  //======================================================================1D plot: D vs phi , different eta, depth=3
3830  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
3831  c3x5->Clear();
3832  c3x5->Divide(4, 4);
3833  c3x5->cd(1);
3834  int kcountHBpositivedirectionDigiD3 = 1;
3835  TH1F* h2CeffHBpositivedirectionDigiD3 = new TH1F("h2CeffHBpositivedirectionDigiD3", "", nphi, 0., 72.);
3836 
3837  for (int jeta = 0; jeta < njeta; jeta++) {
3838  // positivedirectionDigiD:
3839  if (jeta - 41 >= 0) {
3840  // for (int i=0;i<ndepth;i++) {
3841  // depth=3
3842  for (int i = 2; i < 3; i++) {
3843  TH1F* HBpositivedirectionDigiD3 = (TH1F*)h2CeffHBpositivedirectionDigiD3->Clone("twod1");
3844 
3845  float ccctest = 0; // to avoid empty massive elements
3846  for (int jphi = 0; jphi < nphi; jphi++) {
3847  double ccc1 = digivarianceHB[i][jeta][jphi];
3848  if (adigiHB[i][jeta][jphi] > 0.) {
3849  HBpositivedirectionDigiD3->Fill(jphi, ccc1);
3850  ccctest = 1.; //HBpositivedirectionDigiD3->SetBinError(i,0.01);
3851  }
3852  } // for jphi
3853  if (ccctest > 0.) {
3854  //cout<<"1616 kcountHBpositivedirectionDigiD3 = "<<kcountHBpositivedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
3855  c3x5->cd(kcountHBpositivedirectionDigiD3);
3856  HBpositivedirectionDigiD3->SetMarkerStyle(20);
3857  HBpositivedirectionDigiD3->SetMarkerSize(0.4);
3858  HBpositivedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
3859  HBpositivedirectionDigiD3->SetXTitle("HBpositivedirectionDigiD3 \b");
3860  HBpositivedirectionDigiD3->SetMarkerColor(2);
3861  HBpositivedirectionDigiD3->SetLineColor(0);
3862  gPad->SetGridy();
3863  gPad->SetGridx();
3864  // gPad->SetLogy();
3865  if (kcountHBpositivedirectionDigiD3 == 1)
3866  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
3867  if (kcountHBpositivedirectionDigiD3 == 2)
3868  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
3869  if (kcountHBpositivedirectionDigiD3 == 3)
3870  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
3871  if (kcountHBpositivedirectionDigiD3 == 4)
3872  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
3873  if (kcountHBpositivedirectionDigiD3 == 5)
3874  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
3875  if (kcountHBpositivedirectionDigiD3 == 6)
3876  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
3877  if (kcountHBpositivedirectionDigiD3 == 7)
3878  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
3879  if (kcountHBpositivedirectionDigiD3 == 8)
3880  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
3881  if (kcountHBpositivedirectionDigiD3 == 9)
3882  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
3883  if (kcountHBpositivedirectionDigiD3 == 10)
3884  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
3885  if (kcountHBpositivedirectionDigiD3 == 11)
3886  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
3887  if (kcountHBpositivedirectionDigiD3 == 12)
3888  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
3889  if (kcountHBpositivedirectionDigiD3 == 13)
3890  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
3891  if (kcountHBpositivedirectionDigiD3 == 14)
3892  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
3893  if (kcountHBpositivedirectionDigiD3 == 15)
3894  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
3895  if (kcountHBpositivedirectionDigiD3 == 16)
3896  HBpositivedirectionDigiD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
3897  HBpositivedirectionDigiD3->Draw("Error");
3898  kcountHBpositivedirectionDigiD3++;
3899  if (kcountHBpositivedirectionDigiD3 > 16)
3900  break; // 4x6 = 24
3901  } //ccctest>0
3902 
3903  } // for i
3904  } //if(jeta-41 >= 0)
3905  } //for jeta
3907  c3x5->Update();
3908  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
3909  c3x5->Clear();
3910  // clean-up
3911  if (h2CeffHBpositivedirectionDigiD3)
3912  delete h2CeffHBpositivedirectionDigiD3;
3913  //========================================================================================== 17
3914  //======================================================================
3915  //======================================================================1D plot: D vs phi , different eta, depth=4
3916  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
3917  c3x5->Clear();
3918  c3x5->Divide(4, 4);
3919  c3x5->cd(1);
3920  int kcountHBpositivedirectionDigiD4 = 1;
3921  TH1F* h2CeffHBpositivedirectionDigiD4 = new TH1F("h2CeffHBpositivedirectionDigiD4", "", nphi, 0., 72.);
3922 
3923  for (int jeta = 0; jeta < njeta; jeta++) {
3924  // positivedirectionDigiD:
3925  if (jeta - 41 >= 0) {
3926  // for (int i=0;i<ndepth;i++) {
3927  // depth=4
3928  for (int i = 3; i < 4; i++) {
3929  TH1F* HBpositivedirectionDigiD4 = (TH1F*)h2CeffHBpositivedirectionDigiD4->Clone("twod1");
3930 
3931  float ccctest = 0; // to avoid empty massive elements
3932  for (int jphi = 0; jphi < nphi; jphi++) {
3933  double ccc1 = digivarianceHB[i][jeta][jphi];
3934  if (adigiHB[i][jeta][jphi] > 0.) {
3935  HBpositivedirectionDigiD4->Fill(jphi, ccc1);
3936  ccctest = 1.; //HBpositivedirectionDigiD4->SetBinError(i,0.01);
3937  }
3938  } // for jphi
3939  if (ccctest > 0.) {
3940  //cout<<"1717 kcountHBpositivedirectionDigiD4 = "<<kcountHBpositivedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
3941  c3x5->cd(kcountHBpositivedirectionDigiD4);
3942  HBpositivedirectionDigiD4->SetMarkerStyle(20);
3943  HBpositivedirectionDigiD4->SetMarkerSize(0.4);
3944  HBpositivedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
3945  HBpositivedirectionDigiD4->SetXTitle("HBpositivedirectionDigiD4 \b");
3946  HBpositivedirectionDigiD4->SetMarkerColor(2);
3947  HBpositivedirectionDigiD4->SetLineColor(0);
3948  gPad->SetGridy();
3949  gPad->SetGridx();
3950  // gPad->SetLogy();
3951  if (kcountHBpositivedirectionDigiD4 == 1)
3952  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
3953  if (kcountHBpositivedirectionDigiD4 == 2)
3954  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
3955  if (kcountHBpositivedirectionDigiD4 == 3)
3956  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
3957  if (kcountHBpositivedirectionDigiD4 == 4)
3958  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
3959  if (kcountHBpositivedirectionDigiD4 == 5)
3960  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
3961  if (kcountHBpositivedirectionDigiD4 == 6)
3962  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
3963  if (kcountHBpositivedirectionDigiD4 == 7)
3964  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
3965  if (kcountHBpositivedirectionDigiD4 == 8)
3966  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
3967  if (kcountHBpositivedirectionDigiD4 == 9)
3968  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
3969  if (kcountHBpositivedirectionDigiD4 == 10)
3970  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
3971  if (kcountHBpositivedirectionDigiD4 == 11)
3972  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
3973  if (kcountHBpositivedirectionDigiD4 == 12)
3974  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
3975  if (kcountHBpositivedirectionDigiD4 == 13)
3976  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
3977  if (kcountHBpositivedirectionDigiD4 == 14)
3978  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
3979  if (kcountHBpositivedirectionDigiD4 == 15)
3980  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
3981  if (kcountHBpositivedirectionDigiD4 == 16)
3982  HBpositivedirectionDigiD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
3983  HBpositivedirectionDigiD4->Draw("Error");
3984  kcountHBpositivedirectionDigiD4++;
3985  if (kcountHBpositivedirectionDigiD4 > 16)
3986  break; // 4x6 = 24
3987  } //ccctest>0
3988 
3989  } // for i
3990  } //if(jeta-41 >= 0)
3991  } //for jeta
3993  c3x5->Update();
3994  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
3995  c3x5->Clear();
3996  // clean-up
3997  if (h2CeffHBpositivedirectionDigiD4)
3998  delete h2CeffHBpositivedirectionDigiD4;
3999 
4000  //========================================================================================== 22214
4001  //======================================================================
4002  //======================================================================1D plot: D vs phi , different eta, depth=1
4003  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
4004  c3x5->Clear();
4006  c3x5->Divide(4, 4);
4007  c3x5->cd(1);
4008  int kcountHBnegativedirectionDigiD1 = 1;
4009  TH1F* h2CeffHBnegativedirectionDigiD1 = new TH1F("h2CeffHBnegativedirectionDigiD1", "", nphi, 0., 72.);
4010 
4011  for (int jeta = 0; jeta < njeta; jeta++) {
4012  // negativedirectionDigiD:
4013  if (jeta - 41 < 0) {
4014  // for (int i=0;i<ndepth;i++) {
4015  // depth=1
4016  for (int i = 0; i < 1; i++) {
4017  TH1F* HBnegativedirectionDigiD1 = (TH1F*)h2CeffHBnegativedirectionDigiD1->Clone("twod1");
4018 
4019  float ccctest = 0; // to avoid empty massive elements
4020  for (int jphi = 0; jphi < nphi; jphi++) {
4021  double ccc1 = digivarianceHB[i][jeta][jphi];
4022  if (adigiHB[i][jeta][jphi] > 0.) {
4023  HBnegativedirectionDigiD1->Fill(jphi, ccc1);
4024  ccctest = 1.; //HBnegativedirectionDigiD1->SetBinError(i,0.01);
4025  }
4026  } // for jphi
4027  if (ccctest > 0.) {
4028  //cout<<"1414 kcountHBnegativedirectionDigiD1 = "<<kcountHBnegativedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
4029  c3x5->cd(kcountHBnegativedirectionDigiD1);
4030  HBnegativedirectionDigiD1->SetMarkerStyle(20);
4031  HBnegativedirectionDigiD1->SetMarkerSize(0.4);
4032  HBnegativedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
4033  HBnegativedirectionDigiD1->SetXTitle("HBnegativedirectionDigiD1 \b");
4034  HBnegativedirectionDigiD1->SetMarkerColor(2);
4035  HBnegativedirectionDigiD1->SetLineColor(0);
4036  gPad->SetGridy();
4037  gPad->SetGridx();
4038  // gPad->SetLogy();
4039  if (kcountHBnegativedirectionDigiD1 == 1)
4040  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-16; depth = 1 \b");
4041  if (kcountHBnegativedirectionDigiD1 == 2)
4042  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-15; depth = 1 \b");
4043  if (kcountHBnegativedirectionDigiD1 == 3)
4044  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-14; depth = 1 \b");
4045  if (kcountHBnegativedirectionDigiD1 == 4)
4046  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-13; depth = 1 \b");
4047  if (kcountHBnegativedirectionDigiD1 == 5)
4048  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-12; depth = 1 \b");
4049  if (kcountHBnegativedirectionDigiD1 == 6)
4050  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-11; depth = 1 \b");
4051  if (kcountHBnegativedirectionDigiD1 == 7)
4052  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-10; depth = 1 \b");
4053  if (kcountHBnegativedirectionDigiD1 == 8)
4054  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-9; depth = 1 \b");
4055  if (kcountHBnegativedirectionDigiD1 == 9)
4056  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-8; depth = 1 \b");
4057  if (kcountHBnegativedirectionDigiD1 == 10)
4058  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-7; depth = 1 \b");
4059  if (kcountHBnegativedirectionDigiD1 == 11)
4060  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-6; depth = 1 \b");
4061  if (kcountHBnegativedirectionDigiD1 == 12)
4062  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-5; depth = 1 \b");
4063  if (kcountHBnegativedirectionDigiD1 == 13)
4064  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-4; depth = 1 \b");
4065  if (kcountHBnegativedirectionDigiD1 == 14)
4066  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-3; depth = 1 \b");
4067  if (kcountHBnegativedirectionDigiD1 == 15)
4068  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-2; depth = 1 \b");
4069  if (kcountHBnegativedirectionDigiD1 == 16)
4070  HBnegativedirectionDigiD1->SetXTitle("D for HB- jeta =-1; depth = 1 \b");
4071  HBnegativedirectionDigiD1->Draw("Error");
4072  kcountHBnegativedirectionDigiD1++;
4073  if (kcountHBnegativedirectionDigiD1 > 16)
4074  break; // 4x6 = 24
4075  } //ccctest>0
4076 
4077  } // for i
4078  } //if(jeta-41 < 0)
4079  } //for jeta
4081  c3x5->Update();
4082  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
4083  c3x5->Clear();
4084  // clean-up
4085  if (h2CeffHBnegativedirectionDigiD1)
4086  delete h2CeffHBnegativedirectionDigiD1;
4087  //========================================================================================== 22215
4088  //======================================================================
4089  //======================================================================1D plot: D vs phi , different eta, depth=2
4090  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
4091  c3x5->Clear();
4092  c3x5->Divide(4, 4);
4093  c3x5->cd(1);
4094  int kcountHBnegativedirectionDigiD2 = 1;
4095  TH1F* h2CeffHBnegativedirectionDigiD2 = new TH1F("h2CeffHBnegativedirectionDigiD2", "", nphi, 0., 72.);
4096 
4097  for (int jeta = 0; jeta < njeta; jeta++) {
4098  // negativedirectionDigiD:
4099  if (jeta - 41 < 0) {
4100  // for (int i=0;i<ndepth;i++) {
4101  // depth=2
4102  for (int i = 1; i < 2; i++) {
4103  TH1F* HBnegativedirectionDigiD2 = (TH1F*)h2CeffHBnegativedirectionDigiD2->Clone("twod1");
4104 
4105  float ccctest = 0; // to avoid empty massive elements
4106  for (int jphi = 0; jphi < nphi; jphi++) {
4107  double ccc1 = digivarianceHB[i][jeta][jphi];
4108  if (adigiHB[i][jeta][jphi] > 0.) {
4109  HBnegativedirectionDigiD2->Fill(jphi, ccc1);
4110  ccctest = 1.; //HBnegativedirectionDigiD2->SetBinError(i,0.01);
4111  }
4112  } // for jphi
4113  if (ccctest > 0.) {
4114  //cout<<"1515 kcountHBnegativedirectionDigiD2 = "<<kcountHBnegativedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
4115  c3x5->cd(kcountHBnegativedirectionDigiD2);
4116  HBnegativedirectionDigiD2->SetMarkerStyle(20);
4117  HBnegativedirectionDigiD2->SetMarkerSize(0.4);
4118  HBnegativedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
4119  HBnegativedirectionDigiD2->SetXTitle("HBnegativedirectionDigiD2 \b");
4120  HBnegativedirectionDigiD2->SetMarkerColor(2);
4121  HBnegativedirectionDigiD2->SetLineColor(0);
4122  gPad->SetGridy();
4123  gPad->SetGridx();
4124  // gPad->SetLogy();
4125  if (kcountHBnegativedirectionDigiD2 == 1)
4126  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
4127  if (kcountHBnegativedirectionDigiD2 == 2)
4128  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
4129  if (kcountHBnegativedirectionDigiD2 == 3)
4130  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
4131  if (kcountHBnegativedirectionDigiD2 == 4)
4132  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
4133  if (kcountHBnegativedirectionDigiD2 == 5)
4134  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
4135  if (kcountHBnegativedirectionDigiD2 == 6)
4136  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
4137  if (kcountHBnegativedirectionDigiD2 == 7)
4138  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
4139  if (kcountHBnegativedirectionDigiD2 == 8)
4140  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-9; depth = 2 \b");
4141  if (kcountHBnegativedirectionDigiD2 == 9)
4142  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-8; depth = 2 \b");
4143  if (kcountHBnegativedirectionDigiD2 == 10)
4144  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-7; depth = 2 \b");
4145  if (kcountHBnegativedirectionDigiD2 == 11)
4146  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-6; depth = 2 \b");
4147  if (kcountHBnegativedirectionDigiD2 == 12)
4148  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-5; depth = 2 \b");
4149  if (kcountHBnegativedirectionDigiD2 == 13)
4150  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-4; depth = 2 \b");
4151  if (kcountHBnegativedirectionDigiD2 == 14)
4152  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-3; depth = 2 \b");
4153  if (kcountHBnegativedirectionDigiD2 == 15)
4154  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-2; depth = 2 \b");
4155  if (kcountHBnegativedirectionDigiD2 == 16)
4156  HBnegativedirectionDigiD2->SetXTitle("D for HB- jeta =-1; depth = 2 \b");
4157  HBnegativedirectionDigiD2->Draw("Error");
4158  kcountHBnegativedirectionDigiD2++;
4159  if (kcountHBnegativedirectionDigiD2 > 16)
4160  break; // 4x6 = 24
4161  } //ccctest>0
4162 
4163  } // for i
4164  } //if(jeta-41 < 0)
4165  } //for jeta
4167  c3x5->Update();
4168  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
4169  c3x5->Clear();
4170  // clean-up
4171  if (h2CeffHBnegativedirectionDigiD2)
4172  delete h2CeffHBnegativedirectionDigiD2;
4173  //========================================================================================== 22216
4174  //======================================================================
4175  //======================================================================1D plot: D vs phi , different eta, depth=3
4176  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
4177  c3x5->Clear();
4178  c3x5->Divide(4, 4);
4179  c3x5->cd(1);
4180  int kcountHBnegativedirectionDigiD3 = 1;
4181  TH1F* h2CeffHBnegativedirectionDigiD3 = new TH1F("h2CeffHBnegativedirectionDigiD3", "", nphi, 0., 72.);
4182 
4183  for (int jeta = 0; jeta < njeta; jeta++) {
4184  // negativedirectionDigiD:
4185  if (jeta - 41 < 0) {
4186  // for (int i=0;i<ndepth;i++) {
4187  // depth=3
4188  for (int i = 2; i < 3; i++) {
4189  TH1F* HBnegativedirectionDigiD3 = (TH1F*)h2CeffHBnegativedirectionDigiD3->Clone("twod1");
4190 
4191  float ccctest = 0; // to avoid empty massive elements
4192  for (int jphi = 0; jphi < nphi; jphi++) {
4193  double ccc1 = digivarianceHB[i][jeta][jphi];
4194  if (adigiHB[i][jeta][jphi] > 0.) {
4195  HBnegativedirectionDigiD3->Fill(jphi, ccc1);
4196  ccctest = 1.; //HBnegativedirectionDigiD3->SetBinError(i,0.01);
4197  }
4198  } // for jphi
4199  if (ccctest > 0.) {
4200  //cout<<"1616 kcountHBnegativedirectionDigiD3 = "<<kcountHBnegativedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
4201  c3x5->cd(kcountHBnegativedirectionDigiD3);
4202  HBnegativedirectionDigiD3->SetMarkerStyle(20);
4203  HBnegativedirectionDigiD3->SetMarkerSize(0.4);
4204  HBnegativedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
4205  HBnegativedirectionDigiD3->SetXTitle("HBnegativedirectionDigiD3 \b");
4206  HBnegativedirectionDigiD3->SetMarkerColor(2);
4207  HBnegativedirectionDigiD3->SetLineColor(0);
4208  gPad->SetGridy();
4209  gPad->SetGridx();
4210  // gPad->SetLogy();
4211  if (kcountHBnegativedirectionDigiD3 == 1)
4212  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
4213  if (kcountHBnegativedirectionDigiD3 == 2)
4214  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
4215  if (kcountHBnegativedirectionDigiD3 == 3)
4216  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
4217  if (kcountHBnegativedirectionDigiD3 == 4)
4218  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
4219  if (kcountHBnegativedirectionDigiD3 == 5)
4220  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
4221  if (kcountHBnegativedirectionDigiD3 == 6)
4222  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
4223  if (kcountHBnegativedirectionDigiD3 == 7)
4224  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
4225  if (kcountHBnegativedirectionDigiD3 == 8)
4226  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-9; depth = 3 \b");
4227  if (kcountHBnegativedirectionDigiD3 == 9)
4228  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-8; depth = 3 \b");
4229  if (kcountHBnegativedirectionDigiD3 == 10)
4230  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-7; depth = 3 \b");
4231  if (kcountHBnegativedirectionDigiD3 == 11)
4232  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-6; depth = 3 \b");
4233  if (kcountHBnegativedirectionDigiD3 == 12)
4234  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-5; depth = 3 \b");
4235  if (kcountHBnegativedirectionDigiD3 == 13)
4236  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-4; depth = 3 \b");
4237  if (kcountHBnegativedirectionDigiD3 == 14)
4238  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-3; depth = 3 \b");
4239  if (kcountHBnegativedirectionDigiD3 == 15)
4240  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-2; depth = 3 \b");
4241  if (kcountHBnegativedirectionDigiD3 == 16)
4242  HBnegativedirectionDigiD3->SetXTitle("D for HB- jeta =-1; depth = 3 \b");
4243  HBnegativedirectionDigiD3->Draw("Error");
4244  kcountHBnegativedirectionDigiD3++;
4245  if (kcountHBnegativedirectionDigiD3 > 16)
4246  break; // 4x6 = 24
4247  } //ccctest>0
4248 
4249  } // for i
4250  } //if(jeta-41 < 0)
4251  } //for jeta
4253  c3x5->Update();
4254  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
4255  c3x5->Clear();
4256  // clean-up
4257  if (h2CeffHBnegativedirectionDigiD3)
4258  delete h2CeffHBnegativedirectionDigiD3;
4259  //========================================================================================== 22217
4260  //======================================================================
4261  //======================================================================1D plot: D vs phi , different eta, depth=4
4262  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
4263  c3x5->Clear();
4264  c3x5->Divide(4, 4);
4265  c3x5->cd(1);
4266  int kcountHBnegativedirectionDigiD4 = 1;
4267  TH1F* h2CeffHBnegativedirectionDigiD4 = new TH1F("h2CeffHBnegativedirectionDigiD4", "", nphi, 0., 72.);
4268 
4269  for (int jeta = 0; jeta < njeta; jeta++) {
4270  // negativedirectionDigiD:
4271  if (jeta - 41 < 0) {
4272  // for (int i=0;i<ndepth;i++) {
4273  // depth=4
4274  for (int i = 3; i < 4; i++) {
4275  TH1F* HBnegativedirectionDigiD4 = (TH1F*)h2CeffHBnegativedirectionDigiD4->Clone("twod1");
4276 
4277  float ccctest = 0; // to avoid empty massive elements
4278  for (int jphi = 0; jphi < nphi; jphi++) {
4279  double ccc1 = digivarianceHB[i][jeta][jphi];
4280  if (adigiHB[i][jeta][jphi] > 0.) {
4281  HBnegativedirectionDigiD4->Fill(jphi, ccc1);
4282  ccctest = 1.; //HBnegativedirectionDigiD4->SetBinError(i,0.01);
4283  }
4284  } // for jphi
4285  if (ccctest > 0.) {
4286  //cout<<"1717 kcountHBnegativedirectionDigiD4 = "<<kcountHBnegativedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
4287  c3x5->cd(kcountHBnegativedirectionDigiD4);
4288  HBnegativedirectionDigiD4->SetMarkerStyle(20);
4289  HBnegativedirectionDigiD4->SetMarkerSize(0.4);
4290  HBnegativedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
4291  HBnegativedirectionDigiD4->SetXTitle("HBnegativedirectionDigiD4 \b");
4292  HBnegativedirectionDigiD4->SetMarkerColor(2);
4293  HBnegativedirectionDigiD4->SetLineColor(0);
4294  gPad->SetGridy();
4295  gPad->SetGridx();
4296  // gPad->SetLogy();
4297  if (kcountHBnegativedirectionDigiD4 == 1)
4298  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
4299  if (kcountHBnegativedirectionDigiD4 == 2)
4300  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
4301  if (kcountHBnegativedirectionDigiD4 == 3)
4302  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
4303  if (kcountHBnegativedirectionDigiD4 == 4)
4304  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
4305  if (kcountHBnegativedirectionDigiD4 == 5)
4306  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
4307  if (kcountHBnegativedirectionDigiD4 == 6)
4308  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
4309  if (kcountHBnegativedirectionDigiD4 == 7)
4310  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
4311  if (kcountHBnegativedirectionDigiD4 == 8)
4312  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-9; depth = 4 \b");
4313  if (kcountHBnegativedirectionDigiD4 == 9)
4314  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-8; depth = 4 \b");
4315  if (kcountHBnegativedirectionDigiD4 == 10)
4316  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-7; depth = 4 \b");
4317  if (kcountHBnegativedirectionDigiD4 == 11)
4318  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-6; depth = 4 \b");
4319  if (kcountHBnegativedirectionDigiD4 == 12)
4320  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-5; depth = 4 \b");
4321  if (kcountHBnegativedirectionDigiD4 == 13)
4322  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-4; depth = 4 \b");
4323  if (kcountHBnegativedirectionDigiD4 == 14)
4324  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-3; depth = 4 \b");
4325  if (kcountHBnegativedirectionDigiD4 == 15)
4326  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-2; depth = 4 \b");
4327  if (kcountHBnegativedirectionDigiD4 == 16)
4328  HBnegativedirectionDigiD4->SetXTitle("D for HB- jeta =-1; depth = 4 \b");
4329  HBnegativedirectionDigiD4->Draw("Error");
4330  kcountHBnegativedirectionDigiD4++;
4331  if (kcountHBnegativedirectionDigiD4 > 16)
4332  break; // 4x6 = 24
4333  } //ccctest>0
4334 
4335  } // for i
4336  } //if(jeta-41 < 0)
4337  } //for jeta
4339  c3x5->Update();
4340  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
4341  c3x5->Clear();
4342  // clean-up
4343  if (h2CeffHBnegativedirectionDigiD4)
4344  delete h2CeffHBnegativedirectionDigiD4;
4345 
4346  //===================================================================== END of Digi HB for phi-symmetry
4347  //===================================================================== END of Digi HB for phi-symmetry
4348  //===================================================================== END of Digi HB for phi-symmetry
4349 
4353  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
4354  //ndepth = k_max[3];
4355  ndepth = 7;
4356  // const int ndepth = 7;
4357  double adigihe[ndepth][njeta][njphi];
4358  double digivariancehe[ndepth][njeta][njphi];
4359  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Digi HE
4360  TH2F* amplitudechannel1HE1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HE1");
4361  TH2F* amplitudechannel0HE1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE1");
4362  TH2F* amplitudechannelHE1 = (TH2F*)amplitudechannel1HE1->Clone("amplitudechannelHE1");
4363  amplitudechannelHE1->Divide(amplitudechannel1HE1, amplitudechannel0HE1, 1, 1, "B");
4364  TH2F* amplitudechannel1HE2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HE2");
4365  TH2F* amplitudechannel0HE2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE2");
4366  TH2F* amplitudechannelHE2 = (TH2F*)amplitudechannel1HE2->Clone("amplitudechannelHE2");
4367  amplitudechannelHE2->Divide(amplitudechannel1HE2, amplitudechannel0HE2, 1, 1, "B");
4368  TH2F* amplitudechannel1HE3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HE3");
4369  TH2F* amplitudechannel0HE3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE3");
4370  TH2F* amplitudechannelHE3 = (TH2F*)amplitudechannel1HE3->Clone("amplitudechannelHE3");
4371  amplitudechannelHE3->Divide(amplitudechannel1HE3, amplitudechannel0HE3, 1, 1, "B");
4372  TH2F* amplitudechannel1HE4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HE4");
4373  TH2F* amplitudechannel0HE4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE4");
4374  TH2F* amplitudechannelHE4 = (TH2F*)amplitudechannel1HE4->Clone("amplitudechannelHE4");
4375  amplitudechannelHE4->Divide(amplitudechannel1HE4, amplitudechannel0HE4, 1, 1, "B");
4376  TH2F* amplitudechannel1HE5 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HE5");
4377  TH2F* amplitudechannel0HE5 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE5");
4378  TH2F* amplitudechannelHE5 = (TH2F*)amplitudechannel1HE5->Clone("amplitudechannelHE5");
4379  amplitudechannelHE5->Divide(amplitudechannel1HE5, amplitudechannel0HE5, 1, 1, "B");
4380  TH2F* amplitudechannel1HE6 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HE6");
4381  TH2F* amplitudechannel0HE6 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE6");
4382  TH2F* amplitudechannelHE6 = (TH2F*)amplitudechannel1HE6->Clone("amplitudechannelHE6");
4383  amplitudechannelHE6->Divide(amplitudechannel1HE6, amplitudechannel0HE6, 1, 1, "B");
4384  TH2F* amplitudechannel1HE7 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HE7");
4385  TH2F* amplitudechannel0HE7 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE7");
4386  TH2F* amplitudechannelHE7 = (TH2F*)amplitudechannel1HE7->Clone("amplitudechannelHE7");
4387  amplitudechannelHE7->Divide(amplitudechannel1HE7, amplitudechannel0HE7, 1, 1, "B");
4388  for (int jeta = 0; jeta < njeta; jeta++) {
4389  //====================================================================== PHI normalization & put R into massive adigihe
4390  //preparation for PHI normalization:
4391  double sumdigiHE0 = 0;
4392  int nsumdigiHE0 = 0;
4393  double sumdigiHE1 = 0;
4394  int nsumdigiHE1 = 0;
4395  double sumdigiHE2 = 0;
4396  int nsumdigiHE2 = 0;
4397  double sumdigiHE3 = 0;
4398  int nsumdigiHE3 = 0;
4399  double sumdigiHE4 = 0;
4400  int nsumdigiHE4 = 0;
4401  double sumdigiHE5 = 0;
4402  int nsumdigiHE5 = 0;
4403  double sumdigiHE6 = 0;
4404  int nsumdigiHE6 = 0;
4405  for (int jphi = 0; jphi < njphi; jphi++) {
4406  adigihe[0][jeta][jphi] = amplitudechannelHE1->GetBinContent(jeta + 1, jphi + 1);
4407  adigihe[1][jeta][jphi] = amplitudechannelHE2->GetBinContent(jeta + 1, jphi + 1);
4408  adigihe[2][jeta][jphi] = amplitudechannelHE3->GetBinContent(jeta + 1, jphi + 1);
4409  adigihe[3][jeta][jphi] = amplitudechannelHE4->GetBinContent(jeta + 1, jphi + 1);
4410  adigihe[4][jeta][jphi] = amplitudechannelHE5->GetBinContent(jeta + 1, jphi + 1);
4411  adigihe[5][jeta][jphi] = amplitudechannelHE6->GetBinContent(jeta + 1, jphi + 1);
4412  adigihe[6][jeta][jphi] = amplitudechannelHE7->GetBinContent(jeta + 1, jphi + 1);
4413  if (adigihe[0][jeta][jphi] > 0.) {
4414  sumdigiHE0 += adigihe[0][jeta][jphi];
4415  ++nsumdigiHE0;
4416  }
4417  if (adigihe[1][jeta][jphi] > 0.) {
4418  sumdigiHE1 += adigihe[1][jeta][jphi];
4419  ++nsumdigiHE1;
4420  }
4421  if (adigihe[2][jeta][jphi] > 0.) {
4422  sumdigiHE2 += adigihe[2][jeta][jphi];
4423  ++nsumdigiHE2;
4424  }
4425  if (adigihe[3][jeta][jphi] > 0.) {
4426  sumdigiHE3 += adigihe[3][jeta][jphi];
4427  ++nsumdigiHE3;
4428  }
4429  if (adigihe[4][jeta][jphi] > 0.) {
4430  sumdigiHE4 += adigihe[4][jeta][jphi];
4431  ++nsumdigiHE4;
4432  }
4433  if (adigihe[5][jeta][jphi] > 0.) {
4434  sumdigiHE5 += adigihe[5][jeta][jphi];
4435  ++nsumdigiHE5;
4436  }
4437  if (adigihe[6][jeta][jphi] > 0.) {
4438  sumdigiHE6 += adigihe[6][jeta][jphi];
4439  ++nsumdigiHE6;
4440  }
4441  } // phi
4442  // PHI normalization:
4443  for (int jphi = 0; jphi < njphi; jphi++) {
4444  if (adigihe[0][jeta][jphi] > 0.)
4445  adigihe[0][jeta][jphi] /= (sumdigiHE0 / nsumdigiHE0);
4446  if (adigihe[1][jeta][jphi] > 0.)
4447  adigihe[1][jeta][jphi] /= (sumdigiHE1 / nsumdigiHE1);
4448  if (adigihe[2][jeta][jphi] > 0.)
4449  adigihe[2][jeta][jphi] /= (sumdigiHE2 / nsumdigiHE2);
4450  if (adigihe[3][jeta][jphi] > 0.)
4451  adigihe[3][jeta][jphi] /= (sumdigiHE3 / nsumdigiHE3);
4452  if (adigihe[4][jeta][jphi] > 0.)
4453  adigihe[4][jeta][jphi] /= (sumdigiHE4 / nsumdigiHE4);
4454  if (adigihe[5][jeta][jphi] > 0.)
4455  adigihe[5][jeta][jphi] /= (sumdigiHE5 / nsumdigiHE5);
4456  if (adigihe[6][jeta][jphi] > 0.)
4457  adigihe[6][jeta][jphi] /= (sumdigiHE6 / nsumdigiHE6);
4458  } // phi
4459  } //eta
4460  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
4461  //======================================================================
4462  //======================================================================
4463  //cout<<" R2D-eta/phi-plot: R, averaged over depthes *****" <<endl;
4464  c1x0->Clear();
4466  c1x0->Divide(1, 1);
4467  c1x0->cd(1);
4468  TH2F* GefzRdigiHE42D = new TH2F("GefzRdigiHE42D", "", neta, -41., 41., nphi, 0., 72.);
4469  TH2F* GefzRdigiHE42D0 = new TH2F("GefzRdigiHE42D0", "", neta, -41., 41., nphi, 0., 72.);
4470  TH2F* GefzRdigiHE42DF = (TH2F*)GefzRdigiHE42D0->Clone("GefzRdigiHE42DF");
4471  for (int i = 0; i < ndepth; i++) {
4472  for (int jeta = 0; jeta < neta; jeta++) {
4473  for (int jphi = 0; jphi < nphi; jphi++) {
4474  double ccc1 = adigihe[i][jeta][jphi];
4475  int k2plot = jeta - 41;
4476  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
4477  if (ccc1 != 0.) {
4478  GefzRdigiHE42D->Fill(kkk, jphi, ccc1);
4479  GefzRdigiHE42D0->Fill(kkk, jphi, 1.);
4480  }
4481  }
4482  }
4483  }
4484  GefzRdigiHE42DF->Divide(GefzRdigiHE42D, GefzRdigiHE42D0, 1, 1, "B"); // average A
4485  gPad->SetGridy();
4486  gPad->SetGridx(); // gPad->SetLogz();
4487  GefzRdigiHE42DF->SetMarkerStyle(20);
4488  GefzRdigiHE42DF->SetMarkerSize(0.4);
4489  GefzRdigiHE42DF->GetZaxis()->SetLabelSize(0.08);
4490  GefzRdigiHE42DF->SetXTitle("<R>_depth #eta \b");
4491  GefzRdigiHE42DF->SetYTitle(" #phi \b");
4492  GefzRdigiHE42DF->SetZTitle("<R>_depth \b");
4493  GefzRdigiHE42DF->SetMarkerColor(2);
4494  GefzRdigiHE42DF->SetLineColor(
4495  0); // GefzRdigiHE42DF->SetMaximum(1.000); // GefzRdigiHE42DF->SetMinimum(1.0);
4496  GefzRdigiHE42DF->Draw("COLZ");
4498  c1x0->Update();
4499  c1x0->Print("RdigiGeneralD2PhiSymmetryHE.png");
4500  c1x0->Clear();
4501  // clean-up
4502  if (GefzRdigiHE42D)
4503  delete GefzRdigiHE42D;
4504  if (GefzRdigiHE42D0)
4505  delete GefzRdigiHE42D0;
4506  if (GefzRdigiHE42DF)
4507  delete GefzRdigiHE42DF;
4508  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
4509  //======================================================================
4510  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
4511  c1x1->Clear();
4513  c1x1->Divide(1, 1);
4514  c1x1->cd(1);
4515  TH1F* GefzRdigiHE41D = new TH1F("GefzRdigiHE41D", "", nphi, 0., 72.);
4516  TH1F* GefzRdigiHE41D0 = new TH1F("GefzRdigiHE41D0", "", nphi, 0., 72.);
4517  TH1F* GefzRdigiHE41DF = (TH1F*)GefzRdigiHE41D0->Clone("GefzRdigiHE41DF");
4518  for (int jphi = 0; jphi < nphi; jphi++) {
4519  for (int jeta = 0; jeta < neta; jeta++) {
4520  for (int i = 0; i < ndepth; i++) {
4521  double ccc1 = adigihe[i][jeta][jphi];
4522  if (ccc1 != 0.) {
4523  GefzRdigiHE41D->Fill(jphi, ccc1);
4524  GefzRdigiHE41D0->Fill(jphi, 1.);
4525  }
4526  }
4527  }
4528  }
4529  GefzRdigiHE41DF->Divide(GefzRdigiHE41D, GefzRdigiHE41D0, 1, 1, "B"); // R averaged over depthes & eta
4530  GefzRdigiHE41D0->Sumw2();
4531  // for (int jphi=1;jphi<73;jphi++) {GefzRdigiHE41DF->SetBinError(jphi,0.01);}
4532  gPad->SetGridy();
4533  gPad->SetGridx(); // gPad->SetLogz();
4534  GefzRdigiHE41DF->SetMarkerStyle(20);
4535  GefzRdigiHE41DF->SetMarkerSize(1.4);
4536  GefzRdigiHE41DF->GetZaxis()->SetLabelSize(0.08);
4537  GefzRdigiHE41DF->SetXTitle("#phi \b");
4538  GefzRdigiHE41DF->SetYTitle(" <R> \b");
4539  GefzRdigiHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
4540  GefzRdigiHE41DF->SetMarkerColor(4);
4541  GefzRdigiHE41DF->SetLineColor(
4542  4); // GefzRdigiHE41DF->SetMinimum(0.8); // GefzRdigiHE41DF->SetMaximum(1.000);
4543  GefzRdigiHE41DF->Draw("Error");
4545  c1x1->Update();
4546  c1x1->Print("RdigiGeneralD1PhiSymmetryHE.png");
4547  c1x1->Clear();
4548  // clean-up
4549  if (GefzRdigiHE41D)
4550  delete GefzRdigiHE41D;
4551  if (GefzRdigiHE41D0)
4552  delete GefzRdigiHE41D0;
4553  if (GefzRdigiHE41DF)
4554  delete GefzRdigiHE41DF;
4555 
4556  //========================================================================================== 4
4557  //======================================================================
4558  //======================================================================1D plot: R vs phi , different eta, depth=1
4559  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
4560  c3x5->Clear();
4562  c3x5->Divide(3, 5);
4563  c3x5->cd(1);
4564  int kcountHEpositivedirectionDigi1 = 1;
4565  TH1F* h2CeffHEpositivedirectionDigi1 = new TH1F("h2CeffHEpositivedirectionDigi1", "", nphi, 0., 72.);
4566  for (int jeta = 0; jeta < njeta; jeta++) {
4567  // positivedirectionDigi:
4568  if (jeta - 41 >= 0) {
4569  // for (int i=0;i<ndepth;i++) {
4570  // depth=1
4571  for (int i = 0; i < 1; i++) {
4572  TH1F* HEpositivedirectionDigi1 = (TH1F*)h2CeffHEpositivedirectionDigi1->Clone("twod1");
4573  float ccctest = 0; // to avoid empty massive elements
4574  for (int jphi = 0; jphi < nphi; jphi++) {
4575  double ccc1 = adigihe[i][jeta][jphi];
4576  if (ccc1 != 0.) {
4577  HEpositivedirectionDigi1->Fill(jphi, ccc1);
4578  ccctest = 1.; //HEpositivedirectionDigi1->SetBinError(i,0.01);
4579  }
4580  } // for jphi
4581  if (ccctest > 0.) {
4582  // cout<<"444 kcountHEpositivedirectionDigi1 = "<<kcountHEpositivedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
4583  c3x5->cd(kcountHEpositivedirectionDigi1);
4584  HEpositivedirectionDigi1->SetMarkerStyle(20);
4585  HEpositivedirectionDigi1->SetMarkerSize(0.4);
4586  HEpositivedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
4587  HEpositivedirectionDigi1->SetXTitle("HEpositivedirectionDigi1 \b");
4588  HEpositivedirectionDigi1->SetMarkerColor(2);
4589  HEpositivedirectionDigi1->SetLineColor(0);
4590  gPad->SetGridy();
4591  gPad->SetGridx();
4592  // gPad->SetLogy();
4593  if (kcountHEpositivedirectionDigi1 == 1)
4594  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
4595  if (kcountHEpositivedirectionDigi1 == 2)
4596  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
4597  if (kcountHEpositivedirectionDigi1 == 3)
4598  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
4599  if (kcountHEpositivedirectionDigi1 == 4)
4600  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
4601  if (kcountHEpositivedirectionDigi1 == 5)
4602  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
4603  if (kcountHEpositivedirectionDigi1 == 6)
4604  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
4605  if (kcountHEpositivedirectionDigi1 == 7)
4606  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
4607  if (kcountHEpositivedirectionDigi1 == 8)
4608  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
4609  if (kcountHEpositivedirectionDigi1 == 9)
4610  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
4611  if (kcountHEpositivedirectionDigi1 == 10)
4612  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
4613  if (kcountHEpositivedirectionDigi1 == 11)
4614  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
4615  if (kcountHEpositivedirectionDigi1 == 12)
4616  HEpositivedirectionDigi1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
4617  HEpositivedirectionDigi1->Draw("Error");
4618  kcountHEpositivedirectionDigi1++;
4619  if (kcountHEpositivedirectionDigi1 > 12)
4620  break; // 4x6 = 24
4621  } //ccctest>0
4622 
4623  } // for i
4624  } //if(jeta-41 >= 0)
4625  } //for jeta
4627  c3x5->Update();
4628  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
4629  c3x5->Clear();
4630  // clean-up
4631  if (h2CeffHEpositivedirectionDigi1)
4632  delete h2CeffHEpositivedirectionDigi1;
4633 
4634  //========================================================================================== 5
4635  //======================================================================
4636  //======================================================================1D plot: R vs phi , different eta, depth=2
4637  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
4638  c3x5->Clear();
4640  c3x5->Divide(3, 5);
4641  c3x5->cd(1);
4642  int kcountHEpositivedirectionDigi2 = 1;
4643  TH1F* h2CeffHEpositivedirectionDigi2 = new TH1F("h2CeffHEpositivedirectionDigi2", "", nphi, 0., 72.);
4644  for (int jeta = 0; jeta < njeta; jeta++) {
4645  // positivedirectionDigi:
4646  if (jeta - 41 >= 0) {
4647  // for (int i=0;i<ndepth;i++) {
4648  // depth=2
4649  for (int i = 1; i < 2; i++) {
4650  TH1F* HEpositivedirectionDigi2 = (TH1F*)h2CeffHEpositivedirectionDigi2->Clone("twod1");
4651  float ccctest = 0; // to avoid empty massive elements
4652  for (int jphi = 0; jphi < nphi; jphi++) {
4653  double ccc1 = adigihe[i][jeta][jphi];
4654  if (ccc1 != 0.) {
4655  HEpositivedirectionDigi2->Fill(jphi, ccc1);
4656  ccctest = 1.; //HEpositivedirectionDigi2->SetBinError(i,0.01);
4657  }
4658  } // for jphi
4659  if (ccctest > 0.) {
4660  //cout<<"555 kcountHEpositivedirectionDigi2 = "<<kcountHEpositivedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
4661  c3x5->cd(kcountHEpositivedirectionDigi2);
4662  HEpositivedirectionDigi2->SetMarkerStyle(20);
4663  HEpositivedirectionDigi2->SetMarkerSize(0.4);
4664  HEpositivedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
4665  HEpositivedirectionDigi2->SetXTitle("HEpositivedirectionDigi2 \b");
4666  HEpositivedirectionDigi2->SetMarkerColor(2);
4667  HEpositivedirectionDigi2->SetLineColor(0);
4668  gPad->SetGridy();
4669  gPad->SetGridx();
4670  // gPad->SetLogy();
4671  if (kcountHEpositivedirectionDigi2 == 1)
4672  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
4673  if (kcountHEpositivedirectionDigi2 == 2)
4674  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
4675  if (kcountHEpositivedirectionDigi2 == 3)
4676  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
4677  if (kcountHEpositivedirectionDigi2 == 4)
4678  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
4679  if (kcountHEpositivedirectionDigi2 == 5)
4680  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
4681  if (kcountHEpositivedirectionDigi2 == 6)
4682  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
4683  if (kcountHEpositivedirectionDigi2 == 7)
4684  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
4685  if (kcountHEpositivedirectionDigi2 == 8)
4686  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
4687  if (kcountHEpositivedirectionDigi2 == 9)
4688  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
4689  if (kcountHEpositivedirectionDigi2 == 10)
4690  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
4691  if (kcountHEpositivedirectionDigi2 == 11)
4692  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
4693  if (kcountHEpositivedirectionDigi2 == 12)
4694  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
4695  if (kcountHEpositivedirectionDigi2 == 13)
4696  HEpositivedirectionDigi2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
4697  HEpositivedirectionDigi2->Draw("Error");
4698  kcountHEpositivedirectionDigi2++;
4699  if (kcountHEpositivedirectionDigi2 > 13)
4700  break; // 4x6 = 24
4701  } //ccctest>0
4702 
4703  } // for i
4704  } //if(jeta-41 >= 0)
4705  } //for jeta
4707  c3x5->Update();
4708  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
4709  c3x5->Clear();
4710  // clean-up
4711  if (h2CeffHEpositivedirectionDigi2)
4712  delete h2CeffHEpositivedirectionDigi2;
4713  //========================================================================================== 6
4714  //======================================================================
4715  //======================================================================1D plot: R vs phi , different eta, depth=3
4716  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
4717  c3x5->Clear();
4719  c3x5->Divide(3, 5);
4720  c3x5->cd(1);
4721  int kcountHEpositivedirectionDigi3 = 1;
4722  TH1F* h2CeffHEpositivedirectionDigi3 = new TH1F("h2CeffHEpositivedirectionDigi3", "", nphi, 0., 72.);
4723  for (int jeta = 0; jeta < njeta; jeta++) {
4724  // positivedirectionDigi:
4725  if (jeta - 41 >= 0) {
4726  // for (int i=0;i<ndepth;i++) {
4727  // depth=3
4728  for (int i = 2; i < 3; i++) {
4729  TH1F* HEpositivedirectionDigi3 = (TH1F*)h2CeffHEpositivedirectionDigi3->Clone("twod1");
4730  float ccctest = 0; // to avoid empty massive elements
4731  for (int jphi = 0; jphi < nphi; jphi++) {
4732  double ccc1 = adigihe[i][jeta][jphi];
4733  if (ccc1 != 0.) {
4734  HEpositivedirectionDigi3->Fill(jphi, ccc1);
4735  ccctest = 1.; //HEpositivedirectionDigi3->SetBinError(i,0.01);
4736  }
4737  } // for jphi
4738  if (ccctest > 0.) {
4739  //cout<<"666 kcountHEpositivedirectionDigi3 = "<<kcountHEpositivedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
4740  c3x5->cd(kcountHEpositivedirectionDigi3);
4741  HEpositivedirectionDigi3->SetMarkerStyle(20);
4742  HEpositivedirectionDigi3->SetMarkerSize(0.4);
4743  HEpositivedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
4744  HEpositivedirectionDigi3->SetXTitle("HEpositivedirectionDigi3 \b");
4745  HEpositivedirectionDigi3->SetMarkerColor(2);
4746  HEpositivedirectionDigi3->SetLineColor(0);
4747  gPad->SetGridy();
4748  gPad->SetGridx();
4749  // gPad->SetLogy();
4750  if (kcountHEpositivedirectionDigi3 == 1)
4751  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
4752  if (kcountHEpositivedirectionDigi3 == 2)
4753  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
4754  if (kcountHEpositivedirectionDigi3 == 3)
4755  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
4756  if (kcountHEpositivedirectionDigi3 == 4)
4757  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
4758  if (kcountHEpositivedirectionDigi3 == 5)
4759  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
4760  if (kcountHEpositivedirectionDigi3 == 6)
4761  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
4762  if (kcountHEpositivedirectionDigi3 == 7)
4763  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
4764  if (kcountHEpositivedirectionDigi3 == 8)
4765  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
4766  if (kcountHEpositivedirectionDigi3 == 9)
4767  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
4768  if (kcountHEpositivedirectionDigi3 == 10)
4769  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
4770  if (kcountHEpositivedirectionDigi3 == 11)
4771  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
4772  if (kcountHEpositivedirectionDigi3 == 12)
4773  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
4774  if (kcountHEpositivedirectionDigi3 == 13)
4775  HEpositivedirectionDigi3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
4776  HEpositivedirectionDigi3->Draw("Error");
4777  kcountHEpositivedirectionDigi3++;
4778  if (kcountHEpositivedirectionDigi3 > 13)
4779  break; // 4x6 = 24
4780  } //ccctest>0
4781 
4782  } // for i
4783  } //if(jeta-41 >= 0)
4784  } //for jeta
4786  c3x5->Update();
4787  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
4788  c3x5->Clear();
4789  // clean-up
4790  if (h2CeffHEpositivedirectionDigi3)
4791  delete h2CeffHEpositivedirectionDigi3;
4792  //========================================================================================== 7
4793  //======================================================================
4794  //======================================================================1D plot: R vs phi , different eta, depth=4
4795  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
4796  c3x5->Clear();
4798  c3x5->Divide(3, 5);
4799  c3x5->cd(1);
4800  int kcountHEpositivedirectionDigi4 = 1;
4801  TH1F* h2CeffHEpositivedirectionDigi4 = new TH1F("h2CeffHEpositivedirectionDigi4", "", nphi, 0., 72.);
4802 
4803  for (int jeta = 0; jeta < njeta; jeta++) {
4804  // positivedirectionDigi:
4805  if (jeta - 41 >= 0) {
4806  // for (int i=0;i<ndepth;i++) {
4807  // depth=4
4808  for (int i = 3; i < 4; i++) {
4809  TH1F* HEpositivedirectionDigi4 = (TH1F*)h2CeffHEpositivedirectionDigi4->Clone("twod1");
4810 
4811  float ccctest = 0; // to avoid empty massive elements
4812  for (int jphi = 0; jphi < nphi; jphi++) {
4813  double ccc1 = adigihe[i][jeta][jphi];
4814  if (ccc1 != 0.) {
4815  HEpositivedirectionDigi4->Fill(jphi, ccc1);
4816  ccctest = 1.; //HEpositivedirectionDigi4->SetBinError(i,0.01);
4817  }
4818  } // for jphi
4819  if (ccctest > 0.) {
4820  //cout<<"777 kcountHEpositivedirectionDigi4 = "<<kcountHEpositivedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
4821  c3x5->cd(kcountHEpositivedirectionDigi4);
4822  HEpositivedirectionDigi4->SetMarkerStyle(20);
4823  HEpositivedirectionDigi4->SetMarkerSize(0.4);
4824  HEpositivedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
4825  HEpositivedirectionDigi4->SetXTitle("HEpositivedirectionDigi4 \b");
4826  HEpositivedirectionDigi4->SetMarkerColor(2);
4827  HEpositivedirectionDigi4->SetLineColor(0);
4828  gPad->SetGridy();
4829  gPad->SetGridx();
4830  // gPad->SetLogy();
4831  if (kcountHEpositivedirectionDigi4 == 1)
4832  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
4833  if (kcountHEpositivedirectionDigi4 == 2)
4834  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
4835  if (kcountHEpositivedirectionDigi4 == 3)
4836  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
4837  if (kcountHEpositivedirectionDigi4 == 4)
4838  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
4839  if (kcountHEpositivedirectionDigi4 == 5)
4840  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
4841  if (kcountHEpositivedirectionDigi4 == 6)
4842  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
4843  if (kcountHEpositivedirectionDigi4 == 7)
4844  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
4845  if (kcountHEpositivedirectionDigi4 == 8)
4846  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
4847  if (kcountHEpositivedirectionDigi4 == 9)
4848  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
4849  if (kcountHEpositivedirectionDigi4 == 10)
4850  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
4851  if (kcountHEpositivedirectionDigi4 == 11)
4852  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
4853  if (kcountHEpositivedirectionDigi4 == 12)
4854  HEpositivedirectionDigi4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
4855  HEpositivedirectionDigi4->Draw("Error");
4856  kcountHEpositivedirectionDigi4++;
4857  if (kcountHEpositivedirectionDigi4 > 12)
4858  break; // 4x6 = 24
4859  } //ccctest>0
4860 
4861  } // for i
4862  } //if(jeta-41 >= 0)
4863  } //for jeta
4865  c3x5->Update();
4866  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
4867  c3x5->Clear();
4868  // clean-up
4869  if (h2CeffHEpositivedirectionDigi4)
4870  delete h2CeffHEpositivedirectionDigi4;
4871  //========================================================================================== 8
4872  //======================================================================
4873  //======================================================================1D plot: R vs phi , different eta, depth=5
4874  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
4875  c3x5->Clear();
4877  c3x5->Divide(3, 5);
4878  c3x5->cd(1);
4879  int kcountHEpositivedirectionDigi5 = 1;
4880  TH1F* h2CeffHEpositivedirectionDigi5 = new TH1F("h2CeffHEpositivedirectionDigi5", "", nphi, 0., 72.);
4881 
4882  for (int jeta = 0; jeta < njeta; jeta++) {
4883  // positivedirectionDigi:
4884  if (jeta - 41 >= 0) {
4885  // for (int i=0;i<ndepth;i++) {
4886  // depth=5
4887  for (int i = 4; i < 5; i++) {
4888  TH1F* HEpositivedirectionDigi5 = (TH1F*)h2CeffHEpositivedirectionDigi5->Clone("twod1");
4889 
4890  float ccctest = 0; // to avoid empty massive elements
4891  for (int jphi = 0; jphi < nphi; jphi++) {
4892  // cout<<"888 initial kcountHEpositivedirectionDigi5 = "<<kcountHEpositivedirectionDigi5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" adigihe[i][jeta][jphi]= "<< adigihe[i][jeta][jphi] <<" depth= "<< i <<endl;
4893 
4894  double ccc1 = adigihe[i][jeta][jphi];
4895  if (ccc1 != 0.) {
4896  HEpositivedirectionDigi5->Fill(jphi, ccc1);
4897  ccctest = 1.; //HEpositivedirectionDigi5->SetBinError(i,0.01);
4898  }
4899  } // for jphi
4900  if (ccctest > 0.) {
4901  //cout<<"888 kcountHEpositivedirectionDigi5 = "<<kcountHEpositivedirectionDigi5 <<" jeta-41= "<< jeta-41 <<endl;
4902  c3x5->cd(kcountHEpositivedirectionDigi5);
4903  HEpositivedirectionDigi5->SetMarkerStyle(20);
4904  HEpositivedirectionDigi5->SetMarkerSize(0.4);
4905  HEpositivedirectionDigi5->GetYaxis()->SetLabelSize(0.04);
4906  HEpositivedirectionDigi5->SetXTitle("HEpositivedirectionDigi5 \b");
4907  HEpositivedirectionDigi5->SetMarkerColor(2);
4908  HEpositivedirectionDigi5->SetLineColor(0);
4909  gPad->SetGridy();
4910  gPad->SetGridx();
4911  // gPad->SetLogy();
4912  if (kcountHEpositivedirectionDigi5 == 1)
4913  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
4914  if (kcountHEpositivedirectionDigi5 == 2)
4915  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
4916  if (kcountHEpositivedirectionDigi5 == 3)
4917  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
4918  if (kcountHEpositivedirectionDigi5 == 4)
4919  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
4920  if (kcountHEpositivedirectionDigi5 == 5)
4921  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
4922  if (kcountHEpositivedirectionDigi5 == 6)
4923  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
4924  if (kcountHEpositivedirectionDigi5 == 7)
4925  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
4926  if (kcountHEpositivedirectionDigi5 == 8)
4927  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
4928  if (kcountHEpositivedirectionDigi5 == 9)
4929  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
4930  if (kcountHEpositivedirectionDigi5 == 10)
4931  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
4932  if (kcountHEpositivedirectionDigi5 == 11)
4933  HEpositivedirectionDigi5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
4934  HEpositivedirectionDigi5->Draw("Error");
4935  kcountHEpositivedirectionDigi5++;
4936  if (kcountHEpositivedirectionDigi5 > 11)
4937  break; // 4x6 = 24
4938  } //ccctest>0
4939 
4940  } // for i
4941  } //if(jeta-41 >= 0)
4942  } //for jeta
4944  c3x5->Update();
4945  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
4946  c3x5->Clear();
4947  // clean-up
4948  if (h2CeffHEpositivedirectionDigi5)
4949  delete h2CeffHEpositivedirectionDigi5;
4950  //========================================================================================== 9
4951  //======================================================================
4952  //======================================================================1D plot: R vs phi , different eta, depth=6
4953  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
4954  c3x5->Clear();
4956  c3x5->Divide(3, 5);
4957  c3x5->cd(1);
4958  int kcountHEpositivedirectionDigi6 = 1;
4959  TH1F* h2CeffHEpositivedirectionDigi6 = new TH1F("h2CeffHEpositivedirectionDigi6", "", nphi, 0., 72.);
4960 
4961  for (int jeta = 0; jeta < njeta; jeta++) {
4962  // positivedirectionDigi:
4963  if (jeta - 41 >= 0) {
4964  // for (int i=0;i<ndepth;i++) {
4965  // depth=6
4966  for (int i = 5; i < 6; i++) {
4967  TH1F* HEpositivedirectionDigi6 = (TH1F*)h2CeffHEpositivedirectionDigi6->Clone("twod1");
4968 
4969  float ccctest = 0; // to avoid empty massive elements
4970  for (int jphi = 0; jphi < nphi; jphi++) {
4971  double ccc1 = adigihe[i][jeta][jphi];
4972  if (ccc1 != 0.) {
4973  HEpositivedirectionDigi6->Fill(jphi, ccc1);
4974  ccctest = 1.; //HEpositivedirectionDigi6->SetBinError(i,0.01);
4975  }
4976  } // for jphi
4977  if (ccctest > 0.) {
4978  //cout<<"999 kcountHEpositivedirectionDigi6 = "<<kcountHEpositivedirectionDigi6 <<" jeta-41= "<< jeta-41 <<endl;
4979  c3x5->cd(kcountHEpositivedirectionDigi6);
4980  HEpositivedirectionDigi6->SetMarkerStyle(20);
4981  HEpositivedirectionDigi6->SetMarkerSize(0.4);
4982  HEpositivedirectionDigi6->GetYaxis()->SetLabelSize(0.04);
4983  HEpositivedirectionDigi6->SetXTitle("HEpositivedirectionDigi6 \b");
4984  HEpositivedirectionDigi6->SetMarkerColor(2);
4985  HEpositivedirectionDigi6->SetLineColor(0);
4986  gPad->SetGridy();
4987  gPad->SetGridx();
4988  // gPad->SetLogy();
4989  if (kcountHEpositivedirectionDigi6 == 1)
4990  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
4991  if (kcountHEpositivedirectionDigi6 == 2)
4992  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
4993  if (kcountHEpositivedirectionDigi6 == 3)
4994  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
4995  if (kcountHEpositivedirectionDigi6 == 4)
4996  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
4997  if (kcountHEpositivedirectionDigi6 == 5)
4998  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
4999  if (kcountHEpositivedirectionDigi6 == 6)
5000  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
5001  if (kcountHEpositivedirectionDigi6 == 7)
5002  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
5003  if (kcountHEpositivedirectionDigi6 == 8)
5004  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
5005  if (kcountHEpositivedirectionDigi6 == 9)
5006  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
5007  if (kcountHEpositivedirectionDigi6 == 10)
5008  HEpositivedirectionDigi6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
5009  HEpositivedirectionDigi6->Draw("Error");
5010  kcountHEpositivedirectionDigi6++;
5011  if (kcountHEpositivedirectionDigi6 > 10)
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("RdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
5021  c3x5->Clear();
5022  // clean-up
5023  if (h2CeffHEpositivedirectionDigi6)
5024  delete h2CeffHEpositivedirectionDigi6;
5025  //========================================================================================== 10
5026  //======================================================================
5027  //======================================================================1D plot: R vs phi , different eta, depth=7
5028  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
5029  c3x5->Clear();
5031  c3x5->Divide(3, 5);
5032  c3x5->cd(1);
5033  int kcountHEpositivedirectionDigi7 = 1;
5034  TH1F* h2CeffHEpositivedirectionDigi7 = new TH1F("h2CeffHEpositivedirectionDigi7", "", 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=7
5041  for (int i = 6; i < 7; i++) {
5042  TH1F* HEpositivedirectionDigi7 = (TH1F*)h2CeffHEpositivedirectionDigi7->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  HEpositivedirectionDigi7->Fill(jphi, ccc1);
5049  ccctest = 1.; //HEpositivedirectionDigi7->SetBinError(i,0.01);
5050  }
5051  } // for jphi
5052  if (ccctest > 0.) {
5053  //cout<<"1010 kcountHEpositivedirectionDigi7 = "<<kcountHEpositivedirectionDigi7 <<" jeta-41= "<< jeta-41 <<endl;
5054  c3x5->cd(kcountHEpositivedirectionDigi7);
5055  HEpositivedirectionDigi7->SetMarkerStyle(20);
5056  HEpositivedirectionDigi7->SetMarkerSize(0.4);
5057  HEpositivedirectionDigi7->GetYaxis()->SetLabelSize(0.04);
5058  HEpositivedirectionDigi7->SetXTitle("HEpositivedirectionDigi7 \b");
5059  HEpositivedirectionDigi7->SetMarkerColor(2);
5060  HEpositivedirectionDigi7->SetLineColor(0);
5061  gPad->SetGridy();
5062  gPad->SetGridx();
5063  // gPad->SetLogy();
5064  if (kcountHEpositivedirectionDigi7 == 1)
5065  HEpositivedirectionDigi7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
5066  if (kcountHEpositivedirectionDigi7 == 2)
5067  HEpositivedirectionDigi7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
5068  if (kcountHEpositivedirectionDigi7 == 3)
5069  HEpositivedirectionDigi7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
5070  HEpositivedirectionDigi7->Draw("Error");
5071  kcountHEpositivedirectionDigi7++;
5072  if (kcountHEpositivedirectionDigi7 > 3)
5073  break; //
5074  } //ccctest>0
5075 
5076  } // for i
5077  } //if(jeta-41 >= 0)
5078  } //for jeta
5080  c3x5->Update();
5081  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
5082  c3x5->Clear();
5083  // clean-up
5084  if (h2CeffHEpositivedirectionDigi7)
5085  delete h2CeffHEpositivedirectionDigi7;
5086 
5088  //========================================================================================== 1114
5089  //======================================================================
5090  //======================================================================1D plot: R vs phi , different eta, depth=1
5091  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
5092  c3x5->Clear();
5094  c3x5->Divide(3, 5);
5095  c3x5->cd(1);
5096  int kcountHEnegativedirectionDigi1 = 1;
5097  TH1F* h2CeffHEnegativedirectionDigi1 = new TH1F("h2CeffHEnegativedirectionDigi1", "", nphi, 0., 72.);
5098  for (int jeta = 0; jeta < njeta; jeta++) {
5099  // negativedirectionDigi:
5100  if (jeta - 41 < 0) {
5101  // for (int i=0;i<ndepth;i++) {
5102  // depth=1
5103  for (int i = 0; i < 1; i++) {
5104  TH1F* HEnegativedirectionDigi1 = (TH1F*)h2CeffHEnegativedirectionDigi1->Clone("twod1");
5105  float ccctest = 0; // to avoid empty massive elements
5106  for (int jphi = 0; jphi < nphi; jphi++) {
5107  double ccc1 = adigihe[i][jeta][jphi];
5108  if (ccc1 != 0.) {
5109  HEnegativedirectionDigi1->Fill(jphi, ccc1);
5110  ccctest = 1.; //HEnegativedirectionDigi1->SetBinError(i,0.01);
5111  }
5112  } // for jphi
5113  if (ccctest > 0.) {
5114  // cout<<"444 kcountHEnegativedirectionDigi1 = "<<kcountHEnegativedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
5115  c3x5->cd(kcountHEnegativedirectionDigi1);
5116  HEnegativedirectionDigi1->SetMarkerStyle(20);
5117  HEnegativedirectionDigi1->SetMarkerSize(0.4);
5118  HEnegativedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
5119  HEnegativedirectionDigi1->SetXTitle("HEnegativedirectionDigi1 \b");
5120  HEnegativedirectionDigi1->SetMarkerColor(2);
5121  HEnegativedirectionDigi1->SetLineColor(0);
5122  gPad->SetGridy();
5123  gPad->SetGridx();
5124  // gPad->SetLogy();
5125  if (kcountHEnegativedirectionDigi1 == 1)
5126  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
5127  if (kcountHEnegativedirectionDigi1 == 2)
5128  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
5129  if (kcountHEnegativedirectionDigi1 == 3)
5130  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
5131  if (kcountHEnegativedirectionDigi1 == 4)
5132  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
5133  if (kcountHEnegativedirectionDigi1 == 5)
5134  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
5135  if (kcountHEnegativedirectionDigi1 == 6)
5136  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
5137  if (kcountHEnegativedirectionDigi1 == 7)
5138  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
5139  if (kcountHEnegativedirectionDigi1 == 8)
5140  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
5141  if (kcountHEnegativedirectionDigi1 == 9)
5142  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
5143  if (kcountHEnegativedirectionDigi1 == 10)
5144  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
5145  if (kcountHEnegativedirectionDigi1 == 11)
5146  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
5147  if (kcountHEnegativedirectionDigi1 == 12)
5148  HEnegativedirectionDigi1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
5149  HEnegativedirectionDigi1->Draw("Error");
5150  kcountHEnegativedirectionDigi1++;
5151  if (kcountHEnegativedirectionDigi1 > 12)
5152  break; // 4x6 = 24
5153  } //ccctest>0
5154 
5155  } // for i
5156  } //if(jeta-41 < 0)
5157  } //for jeta
5159  c3x5->Update();
5160  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
5161  c3x5->Clear();
5162  // clean-up
5163  if (h2CeffHEnegativedirectionDigi1)
5164  delete h2CeffHEnegativedirectionDigi1;
5165 
5166  //========================================================================================== 1115
5167  //======================================================================
5168  //======================================================================1D plot: R vs phi , different eta, depth=2
5169  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
5170  c3x5->Clear();
5172  c3x5->Divide(3, 5);
5173  c3x5->cd(1);
5174  int kcountHEnegativedirectionDigi2 = 1;
5175  TH1F* h2CeffHEnegativedirectionDigi2 = new TH1F("h2CeffHEnegativedirectionDigi2", "", nphi, 0., 72.);
5176  for (int jeta = 0; jeta < njeta; jeta++) {
5177  // negativedirectionDigi:
5178  if (jeta - 41 < 0) {
5179  // for (int i=0;i<ndepth;i++) {
5180  // depth=2
5181  for (int i = 1; i < 2; i++) {
5182  TH1F* HEnegativedirectionDigi2 = (TH1F*)h2CeffHEnegativedirectionDigi2->Clone("twod1");
5183  float ccctest = 0; // to avoid empty massive elements
5184  for (int jphi = 0; jphi < nphi; jphi++) {
5185  double ccc1 = adigihe[i][jeta][jphi];
5186  if (ccc1 != 0.) {
5187  HEnegativedirectionDigi2->Fill(jphi, ccc1);
5188  ccctest = 1.; //HEnegativedirectionDigi2->SetBinError(i,0.01);
5189  }
5190  } // for jphi
5191  if (ccctest > 0.) {
5192  //cout<<"555 kcountHEnegativedirectionDigi2 = "<<kcountHEnegativedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
5193  c3x5->cd(kcountHEnegativedirectionDigi2);
5194  HEnegativedirectionDigi2->SetMarkerStyle(20);
5195  HEnegativedirectionDigi2->SetMarkerSize(0.4);
5196  HEnegativedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
5197  HEnegativedirectionDigi2->SetXTitle("HEnegativedirectionDigi2 \b");
5198  HEnegativedirectionDigi2->SetMarkerColor(2);
5199  HEnegativedirectionDigi2->SetLineColor(0);
5200  gPad->SetGridy();
5201  gPad->SetGridx();
5202  // gPad->SetLogy();
5203  if (kcountHEnegativedirectionDigi2 == 1)
5204  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
5205  if (kcountHEnegativedirectionDigi2 == 2)
5206  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
5207  if (kcountHEnegativedirectionDigi2 == 3)
5208  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
5209  if (kcountHEnegativedirectionDigi2 == 4)
5210  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
5211  if (kcountHEnegativedirectionDigi2 == 5)
5212  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
5213  if (kcountHEnegativedirectionDigi2 == 6)
5214  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
5215  if (kcountHEnegativedirectionDigi2 == 7)
5216  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
5217  if (kcountHEnegativedirectionDigi2 == 8)
5218  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
5219  if (kcountHEnegativedirectionDigi2 == 9)
5220  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
5221  if (kcountHEnegativedirectionDigi2 == 10)
5222  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
5223  if (kcountHEnegativedirectionDigi2 == 11)
5224  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
5225  if (kcountHEnegativedirectionDigi2 == 12)
5226  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
5227  if (kcountHEnegativedirectionDigi2 == 13)
5228  HEnegativedirectionDigi2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
5229  HEnegativedirectionDigi2->Draw("Error");
5230  kcountHEnegativedirectionDigi2++;
5231  if (kcountHEnegativedirectionDigi2 > 13)
5232  break; // 4x6 = 24
5233  } //ccctest>0
5234 
5235  } // for i
5236  } //if(jeta-41 < 0)
5237  } //for jeta
5239  c3x5->Update();
5240  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
5241  c3x5->Clear();
5242  // clean-up
5243  if (h2CeffHEnegativedirectionDigi2)
5244  delete h2CeffHEnegativedirectionDigi2;
5245  //========================================================================================== 1116
5246  //======================================================================
5247  //======================================================================1D plot: R vs phi , different eta, depth=3
5248  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
5249  c3x5->Clear();
5251  c3x5->Divide(3, 5);
5252  c3x5->cd(1);
5253  int kcountHEnegativedirectionDigi3 = 1;
5254  TH1F* h2CeffHEnegativedirectionDigi3 = new TH1F("h2CeffHEnegativedirectionDigi3", "", nphi, 0., 72.);
5255  for (int jeta = 0; jeta < njeta; jeta++) {
5256  // negativedirectionDigi:
5257  if (jeta - 41 < 0) {
5258  // for (int i=0;i<ndepth;i++) {
5259  // depth=3
5260  for (int i = 2; i < 3; i++) {
5261  TH1F* HEnegativedirectionDigi3 = (TH1F*)h2CeffHEnegativedirectionDigi3->Clone("twod1");
5262  float ccctest = 0; // to avoid empty massive elements
5263  for (int jphi = 0; jphi < nphi; jphi++) {
5264  double ccc1 = adigihe[i][jeta][jphi];
5265  if (ccc1 != 0.) {
5266  HEnegativedirectionDigi3->Fill(jphi, ccc1);
5267  ccctest = 1.; //HEnegativedirectionDigi3->SetBinError(i,0.01);
5268  }
5269  } // for jphi
5270  if (ccctest > 0.) {
5271  //cout<<"666 kcountHEnegativedirectionDigi3 = "<<kcountHEnegativedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
5272  c3x5->cd(kcountHEnegativedirectionDigi3);
5273  HEnegativedirectionDigi3->SetMarkerStyle(20);
5274  HEnegativedirectionDigi3->SetMarkerSize(0.4);
5275  HEnegativedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
5276  HEnegativedirectionDigi3->SetXTitle("HEnegativedirectionDigi3 \b");
5277  HEnegativedirectionDigi3->SetMarkerColor(2);
5278  HEnegativedirectionDigi3->SetLineColor(0);
5279  gPad->SetGridy();
5280  gPad->SetGridx();
5281  // gPad->SetLogy();
5282  if (kcountHEnegativedirectionDigi3 == 1)
5283  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
5284  if (kcountHEnegativedirectionDigi3 == 2)
5285  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
5286  if (kcountHEnegativedirectionDigi3 == 3)
5287  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
5288  if (kcountHEnegativedirectionDigi3 == 4)
5289  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
5290  if (kcountHEnegativedirectionDigi3 == 5)
5291  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
5292  if (kcountHEnegativedirectionDigi3 == 6)
5293  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
5294  if (kcountHEnegativedirectionDigi3 == 7)
5295  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
5296  if (kcountHEnegativedirectionDigi3 == 8)
5297  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
5298  if (kcountHEnegativedirectionDigi3 == 9)
5299  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
5300  if (kcountHEnegativedirectionDigi3 == 10)
5301  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
5302  if (kcountHEnegativedirectionDigi3 == 11)
5303  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
5304  if (kcountHEnegativedirectionDigi3 == 12)
5305  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
5306  if (kcountHEnegativedirectionDigi3 == 13)
5307  HEnegativedirectionDigi3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
5308  HEnegativedirectionDigi3->Draw("Error");
5309  kcountHEnegativedirectionDigi3++;
5310  if (kcountHEnegativedirectionDigi3 > 13)
5311  break; // 4x6 = 24
5312  } //ccctest>0
5313 
5314  } // for i
5315  } //if(jeta-41 < 0)
5316  } //for jeta
5318  c3x5->Update();
5319  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
5320  c3x5->Clear();
5321  // clean-up
5322  if (h2CeffHEnegativedirectionDigi3)
5323  delete h2CeffHEnegativedirectionDigi3;
5324  //========================================================================================== 1117
5325  //======================================================================
5326  //======================================================================1D plot: R vs phi , different eta, depth=4
5327  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
5328  c3x5->Clear();
5330  c3x5->Divide(3, 5);
5331  c3x5->cd(1);
5332  int kcountHEnegativedirectionDigi4 = 1;
5333  TH1F* h2CeffHEnegativedirectionDigi4 = new TH1F("h2CeffHEnegativedirectionDigi4", "", nphi, 0., 72.);
5334 
5335  for (int jeta = 0; jeta < njeta; jeta++) {
5336  // negativedirectionDigi:
5337  if (jeta - 41 < 0) {
5338  // for (int i=0;i<ndepth;i++) {
5339  // depth=4
5340  for (int i = 3; i < 4; i++) {
5341  TH1F* HEnegativedirectionDigi4 = (TH1F*)h2CeffHEnegativedirectionDigi4->Clone("twod1");
5342 
5343  float ccctest = 0; // to avoid empty massive elements
5344  for (int jphi = 0; jphi < nphi; jphi++) {
5345  double ccc1 = adigihe[i][jeta][jphi];
5346  if (ccc1 != 0.) {
5347  HEnegativedirectionDigi4->Fill(jphi, ccc1);
5348  ccctest = 1.; //HEnegativedirectionDigi4->SetBinError(i,0.01);
5349  }
5350  } // for jphi
5351  if (ccctest > 0.) {
5352  //cout<<"777 kcountHEnegativedirectionDigi4 = "<<kcountHEnegativedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
5353  c3x5->cd(kcountHEnegativedirectionDigi4);
5354  HEnegativedirectionDigi4->SetMarkerStyle(20);
5355  HEnegativedirectionDigi4->SetMarkerSize(0.4);
5356  HEnegativedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
5357  HEnegativedirectionDigi4->SetXTitle("HEnegativedirectionDigi4 \b");
5358  HEnegativedirectionDigi4->SetMarkerColor(2);
5359  HEnegativedirectionDigi4->SetLineColor(0);
5360  gPad->SetGridy();
5361  gPad->SetGridx();
5362  // gPad->SetLogy();
5363  if (kcountHEnegativedirectionDigi4 == 1)
5364  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
5365  if (kcountHEnegativedirectionDigi4 == 2)
5366  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
5367  if (kcountHEnegativedirectionDigi4 == 3)
5368  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
5369  if (kcountHEnegativedirectionDigi4 == 4)
5370  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
5371  if (kcountHEnegativedirectionDigi4 == 5)
5372  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
5373  if (kcountHEnegativedirectionDigi4 == 6)
5374  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
5375  if (kcountHEnegativedirectionDigi4 == 7)
5376  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
5377  if (kcountHEnegativedirectionDigi4 == 8)
5378  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
5379  if (kcountHEnegativedirectionDigi4 == 9)
5380  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
5381  if (kcountHEnegativedirectionDigi4 == 10)
5382  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
5383  if (kcountHEnegativedirectionDigi4 == 11)
5384  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
5385  if (kcountHEnegativedirectionDigi4 == 12)
5386  HEnegativedirectionDigi4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
5387  HEnegativedirectionDigi4->Draw("Error");
5388  kcountHEnegativedirectionDigi4++;
5389  if (kcountHEnegativedirectionDigi4 > 12)
5390  break; // 4x6 = 24
5391  } //ccctest>0
5392 
5393  } // for i
5394  } //if(jeta-41 < 0)
5395  } //for jeta
5397  c3x5->Update();
5398  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
5399  c3x5->Clear();
5400  // clean-up
5401  if (h2CeffHEnegativedirectionDigi4)
5402  delete h2CeffHEnegativedirectionDigi4;
5403  //========================================================================================== 1118
5404  //======================================================================
5405  //======================================================================1D plot: R vs phi , different eta, depth=5
5406  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
5407  c3x5->Clear();
5409  c3x5->Divide(3, 5);
5410  c3x5->cd(1);
5411  int kcountHEnegativedirectionDigi5 = 1;
5412  TH1F* h2CeffHEnegativedirectionDigi5 = new TH1F("h2CeffHEnegativedirectionDigi5", "", nphi, 0., 72.);
5413 
5414  for (int jeta = 0; jeta < njeta; jeta++) {
5415  // negativedirectionDigi:
5416  if (jeta - 41 < 0) {
5417  // for (int i=0;i<ndepth;i++) {
5418  // depth=5
5419  for (int i = 4; i < 5; i++) {
5420  TH1F* HEnegativedirectionDigi5 = (TH1F*)h2CeffHEnegativedirectionDigi5->Clone("twod1");
5421 
5422  float ccctest = 0; // to avoid empty massive elements
5423  for (int jphi = 0; jphi < nphi; jphi++) {
5424  // cout<<"888 initial kcountHEnegativedirectionDigi5 = "<<kcountHEnegativedirectionDigi5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" adigihe[i][jeta][jphi]= "<< adigihe[i][jeta][jphi] <<" depth= "<< i <<endl;
5425 
5426  double ccc1 = adigihe[i][jeta][jphi];
5427  if (ccc1 != 0.) {
5428  HEnegativedirectionDigi5->Fill(jphi, ccc1);
5429  ccctest = 1.; //HEnegativedirectionDigi5->SetBinError(i,0.01);
5430  }
5431  } // for jphi
5432  if (ccctest > 0.) {
5433  //cout<<"888 kcountHEnegativedirectionDigi5 = "<<kcountHEnegativedirectionDigi5 <<" jeta-41= "<< jeta-41 <<endl;
5434  c3x5->cd(kcountHEnegativedirectionDigi5);
5435  HEnegativedirectionDigi5->SetMarkerStyle(20);
5436  HEnegativedirectionDigi5->SetMarkerSize(0.4);
5437  HEnegativedirectionDigi5->GetYaxis()->SetLabelSize(0.04);
5438  HEnegativedirectionDigi5->SetXTitle("HEnegativedirectionDigi5 \b");
5439  HEnegativedirectionDigi5->SetMarkerColor(2);
5440  HEnegativedirectionDigi5->SetLineColor(0);
5441  gPad->SetGridy();
5442  gPad->SetGridx();
5443  // gPad->SetLogy();
5444  if (kcountHEnegativedirectionDigi5 == 1)
5445  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
5446  if (kcountHEnegativedirectionDigi5 == 2)
5447  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
5448  if (kcountHEnegativedirectionDigi5 == 3)
5449  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
5450  if (kcountHEnegativedirectionDigi5 == 4)
5451  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
5452  if (kcountHEnegativedirectionDigi5 == 5)
5453  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
5454  if (kcountHEnegativedirectionDigi5 == 6)
5455  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
5456  if (kcountHEnegativedirectionDigi5 == 7)
5457  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
5458  if (kcountHEnegativedirectionDigi5 == 8)
5459  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
5460  if (kcountHEnegativedirectionDigi5 == 9)
5461  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
5462  if (kcountHEnegativedirectionDigi5 == 10)
5463  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
5464  if (kcountHEnegativedirectionDigi5 == 11)
5465  HEnegativedirectionDigi5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
5466  HEnegativedirectionDigi5->Draw("Error");
5467  kcountHEnegativedirectionDigi5++;
5468  if (kcountHEnegativedirectionDigi5 > 11)
5469  break; // 4x6 = 24
5470  } //ccctest>0
5471 
5472  } // for i
5473  } //if(jeta-41 < 0)
5474  } //for jeta
5476  c3x5->Update();
5477  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
5478  c3x5->Clear();
5479  // clean-up
5480  if (h2CeffHEnegativedirectionDigi5)
5481  delete h2CeffHEnegativedirectionDigi5;
5482  //========================================================================================== 1119
5483  //======================================================================
5484  //======================================================================1D plot: R vs phi , different eta, depth=6
5485  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
5486  c3x5->Clear();
5488  c3x5->Divide(3, 5);
5489  c3x5->cd(1);
5490  int kcountHEnegativedirectionDigi6 = 1;
5491  TH1F* h2CeffHEnegativedirectionDigi6 = new TH1F("h2CeffHEnegativedirectionDigi6", "", nphi, 0., 72.);
5492 
5493  for (int jeta = 0; jeta < njeta; jeta++) {
5494  // negativedirectionDigi:
5495  if (jeta - 41 < 0) {
5496  // for (int i=0;i<ndepth;i++) {
5497  // depth=6
5498  for (int i = 5; i < 6; i++) {
5499  TH1F* HEnegativedirectionDigi6 = (TH1F*)h2CeffHEnegativedirectionDigi6->Clone("twod1");
5500 
5501  float ccctest = 0; // to avoid empty massive elements
5502  for (int jphi = 0; jphi < nphi; jphi++) {
5503  double ccc1 = adigihe[i][jeta][jphi];
5504  if (ccc1 != 0.) {
5505  HEnegativedirectionDigi6->Fill(jphi, ccc1);
5506  ccctest = 1.; //HEnegativedirectionDigi6->SetBinError(i,0.01);
5507  }
5508  } // for jphi
5509  if (ccctest > 0.) {
5510  //cout<<"999 kcountHEnegativedirectionDigi6 = "<<kcountHEnegativedirectionDigi6 <<" jeta-41= "<< jeta-41 <<endl;
5511  c3x5->cd(kcountHEnegativedirectionDigi6);
5512  HEnegativedirectionDigi6->SetMarkerStyle(20);
5513  HEnegativedirectionDigi6->SetMarkerSize(0.4);
5514  HEnegativedirectionDigi6->GetYaxis()->SetLabelSize(0.04);
5515  HEnegativedirectionDigi6->SetXTitle("HEnegativedirectionDigi6 \b");
5516  HEnegativedirectionDigi6->SetMarkerColor(2);
5517  HEnegativedirectionDigi6->SetLineColor(0);
5518  gPad->SetGridy();
5519  gPad->SetGridx();
5520  // gPad->SetLogy();
5521  if (kcountHEnegativedirectionDigi6 == 1)
5522  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
5523  if (kcountHEnegativedirectionDigi6 == 2)
5524  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
5525  if (kcountHEnegativedirectionDigi6 == 3)
5526  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
5527  if (kcountHEnegativedirectionDigi6 == 4)
5528  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
5529  if (kcountHEnegativedirectionDigi6 == 5)
5530  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
5531  if (kcountHEnegativedirectionDigi6 == 6)
5532  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
5533  if (kcountHEnegativedirectionDigi6 == 7)
5534  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
5535  if (kcountHEnegativedirectionDigi6 == 8)
5536  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
5537  if (kcountHEnegativedirectionDigi6 == 9)
5538  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
5539  if (kcountHEnegativedirectionDigi6 == 10)
5540  HEnegativedirectionDigi6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
5541  HEnegativedirectionDigi6->Draw("Error");
5542  kcountHEnegativedirectionDigi6++;
5543  if (kcountHEnegativedirectionDigi6 > 10)
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("RdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
5553  c3x5->Clear();
5554  // clean-up
5555  if (h2CeffHEnegativedirectionDigi6)
5556  delete h2CeffHEnegativedirectionDigi6;
5557  //========================================================================================== 11110
5558  //======================================================================
5559  //======================================================================1D plot: R vs phi , different eta, depth=7
5560  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
5561  c3x5->Clear();
5563  c3x5->Divide(3, 5);
5564  c3x5->cd(1);
5565  int kcountHEnegativedirectionDigi7 = 1;
5566  TH1F* h2CeffHEnegativedirectionDigi7 = new TH1F("h2CeffHEnegativedirectionDigi7", "", 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=7
5573  for (int i = 6; i < 7; i++) {
5574  TH1F* HEnegativedirectionDigi7 = (TH1F*)h2CeffHEnegativedirectionDigi7->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  HEnegativedirectionDigi7->Fill(jphi, ccc1);
5581  ccctest = 1.; //HEnegativedirectionDigi7->SetBinError(i,0.01);
5582  }
5583  } // for jphi
5584  if (ccctest > 0.) {
5585  //cout<<"1010 kcountHEnegativedirectionDigi7 = "<<kcountHEnegativedirectionDigi7 <<" jeta-41= "<< jeta-41 <<endl;
5586  c3x5->cd(kcountHEnegativedirectionDigi7);
5587  HEnegativedirectionDigi7->SetMarkerStyle(20);
5588  HEnegativedirectionDigi7->SetMarkerSize(0.4);
5589  HEnegativedirectionDigi7->GetYaxis()->SetLabelSize(0.04);
5590  HEnegativedirectionDigi7->SetXTitle("HEnegativedirectionDigi7 \b");
5591  HEnegativedirectionDigi7->SetMarkerColor(2);
5592  HEnegativedirectionDigi7->SetLineColor(0);
5593  gPad->SetGridy();
5594  gPad->SetGridx();
5595  // gPad->SetLogy();
5596  if (kcountHEnegativedirectionDigi7 == 1)
5597  HEnegativedirectionDigi7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
5598  if (kcountHEnegativedirectionDigi7 == 2)
5599  HEnegativedirectionDigi7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
5600  if (kcountHEnegativedirectionDigi7 == 3)
5601  HEnegativedirectionDigi7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
5602  HEnegativedirectionDigi7->Draw("Error");
5603  kcountHEnegativedirectionDigi7++;
5604  if (kcountHEnegativedirectionDigi7 > 3)
5605  break; // 4x6 = 24
5606  } //ccctest>0
5607 
5608  } // for i
5609  } //if(jeta-41 < 0)
5610  } //for jeta
5612  c3x5->Update();
5613  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
5614  c3x5->Clear();
5615  // clean-up
5616  if (h2CeffHEnegativedirectionDigi7)
5617  delete h2CeffHEnegativedirectionDigi7;
5618 
5620 
5621  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
5622 
5623  //cout<<" Start Vaiance: preparation *****" <<endl;
5624  TH2F* digiVariance1HE1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HE1");
5625  TH2F* digiVariance0HE1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE1");
5626  TH2F* digiVarianceHE1 = (TH2F*)digiVariance1HE1->Clone("digiVarianceHE1");
5627  digiVarianceHE1->Divide(digiVariance1HE1, digiVariance0HE1, 1, 1, "B");
5628  TH2F* digiVariance1HE2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HE2");
5629  TH2F* digiVariance0HE2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE2");
5630  TH2F* digiVarianceHE2 = (TH2F*)digiVariance1HE2->Clone("digiVarianceHE2");
5631  digiVarianceHE2->Divide(digiVariance1HE2, digiVariance0HE2, 1, 1, "B");
5632  TH2F* digiVariance1HE3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HE3");
5633  TH2F* digiVariance0HE3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE3");
5634  TH2F* digiVarianceHE3 = (TH2F*)digiVariance1HE3->Clone("digiVarianceHE3");
5635  digiVarianceHE3->Divide(digiVariance1HE3, digiVariance0HE3, 1, 1, "B");
5636  TH2F* digiVariance1HE4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HE4");
5637  TH2F* digiVariance0HE4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE4");
5638  TH2F* digiVarianceHE4 = (TH2F*)digiVariance1HE4->Clone("digiVarianceHE4");
5639  digiVarianceHE4->Divide(digiVariance1HE4, digiVariance0HE4, 1, 1, "B");
5640  TH2F* digiVariance1HE5 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HE5");
5641  TH2F* digiVariance0HE5 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE5");
5642  TH2F* digiVarianceHE5 = (TH2F*)digiVariance1HE5->Clone("digiVarianceHE5");
5643  digiVarianceHE5->Divide(digiVariance1HE5, digiVariance0HE5, 1, 1, "B");
5644  TH2F* digiVariance1HE6 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HE6");
5645  TH2F* digiVariance0HE6 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE6");
5646  TH2F* digiVarianceHE6 = (TH2F*)digiVariance1HE6->Clone("digiVarianceHE6");
5647  digiVarianceHE6->Divide(digiVariance1HE6, digiVariance0HE6, 1, 1, "B");
5648  TH2F* digiVariance1HE7 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HE7");
5649  TH2F* digiVariance0HE7 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HE7");
5650  TH2F* digiVarianceHE7 = (TH2F*)digiVariance1HE7->Clone("digiVarianceHE7");
5651  digiVarianceHE7->Divide(digiVariance1HE7, digiVariance0HE7, 1, 1, "B");
5652  //cout<<" Vaiance: preparation DONE *****" <<endl;
5653  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive digivariancehe
5654  // = sum(R*R)/N - (sum(R)/N)**2
5655  for (int jeta = 0; jeta < njeta; jeta++) {
5656  //preparation for PHI normalization:
5657  double sumdigiHE0 = 0;
5658  int nsumdigiHE0 = 0;
5659  double sumdigiHE1 = 0;
5660  int nsumdigiHE1 = 0;
5661  double sumdigiHE2 = 0;
5662  int nsumdigiHE2 = 0;
5663  double sumdigiHE3 = 0;
5664  int nsumdigiHE3 = 0;
5665  double sumdigiHE4 = 0;
5666  int nsumdigiHE4 = 0;
5667  double sumdigiHE5 = 0;
5668  int nsumdigiHE5 = 0;
5669  double sumdigiHE6 = 0;
5670  int nsumdigiHE6 = 0;
5671  for (int jphi = 0; jphi < njphi; jphi++) {
5672  digivariancehe[0][jeta][jphi] = digiVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
5673  digivariancehe[1][jeta][jphi] = digiVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
5674  digivariancehe[2][jeta][jphi] = digiVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
5675  digivariancehe[3][jeta][jphi] = digiVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
5676  digivariancehe[4][jeta][jphi] = digiVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
5677  digivariancehe[5][jeta][jphi] = digiVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
5678  digivariancehe[6][jeta][jphi] = digiVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
5679  if (digivariancehe[0][jeta][jphi] > 0.) {
5680  sumdigiHE0 += digivariancehe[0][jeta][jphi];
5681  ++nsumdigiHE0;
5682  }
5683  if (digivariancehe[1][jeta][jphi] > 0.) {
5684  sumdigiHE1 += digivariancehe[1][jeta][jphi];
5685  ++nsumdigiHE1;
5686  }
5687  if (digivariancehe[2][jeta][jphi] > 0.) {
5688  sumdigiHE2 += digivariancehe[2][jeta][jphi];
5689  ++nsumdigiHE2;
5690  }
5691  if (digivariancehe[3][jeta][jphi] > 0.) {
5692  sumdigiHE3 += digivariancehe[3][jeta][jphi];
5693  ++nsumdigiHE3;
5694  }
5695  if (digivariancehe[4][jeta][jphi] > 0.) {
5696  sumdigiHE4 += digivariancehe[4][jeta][jphi];
5697  ++nsumdigiHE4;
5698  }
5699  if (digivariancehe[5][jeta][jphi] > 0.) {
5700  sumdigiHE5 += digivariancehe[5][jeta][jphi];
5701  ++nsumdigiHE5;
5702  }
5703  if (digivariancehe[6][jeta][jphi] > 0.) {
5704  sumdigiHE6 += digivariancehe[6][jeta][jphi];
5705  ++nsumdigiHE6;
5706  }
5707  } // phi
5708  // PHI normalization :
5709  for (int jphi = 0; jphi < njphi; jphi++) {
5710  if (digivariancehe[0][jeta][jphi] > 0.)
5711  digivariancehe[0][jeta][jphi] /= (sumdigiHE0 / nsumdigiHE0);
5712  if (digivariancehe[1][jeta][jphi] > 0.)
5713  digivariancehe[1][jeta][jphi] /= (sumdigiHE1 / nsumdigiHE1);
5714  if (digivariancehe[2][jeta][jphi] > 0.)
5715  digivariancehe[2][jeta][jphi] /= (sumdigiHE2 / nsumdigiHE2);
5716  if (digivariancehe[3][jeta][jphi] > 0.)
5717  digivariancehe[3][jeta][jphi] /= (sumdigiHE3 / nsumdigiHE3);
5718  if (digivariancehe[4][jeta][jphi] > 0.)
5719  digivariancehe[4][jeta][jphi] /= (sumdigiHE4 / nsumdigiHE4);
5720  if (digivariancehe[5][jeta][jphi] > 0.)
5721  digivariancehe[5][jeta][jphi] /= (sumdigiHE5 / nsumdigiHE5);
5722  if (digivariancehe[6][jeta][jphi] > 0.)
5723  digivariancehe[6][jeta][jphi] /= (sumdigiHE6 / nsumdigiHE6);
5724  } // phi
5725  // digivariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
5726  for (int jphi = 0; jphi < njphi; jphi++) {
5727  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
5728  digivariancehe[0][jeta][jphi] -= adigihe[0][jeta][jphi] * adigihe[0][jeta][jphi];
5729  digivariancehe[0][jeta][jphi] = fabs(digivariancehe[0][jeta][jphi]);
5730  digivariancehe[1][jeta][jphi] -= adigihe[1][jeta][jphi] * adigihe[1][jeta][jphi];
5731  digivariancehe[1][jeta][jphi] = fabs(digivariancehe[1][jeta][jphi]);
5732  digivariancehe[2][jeta][jphi] -= adigihe[2][jeta][jphi] * adigihe[2][jeta][jphi];
5733  digivariancehe[2][jeta][jphi] = fabs(digivariancehe[2][jeta][jphi]);
5734  digivariancehe[3][jeta][jphi] -= adigihe[3][jeta][jphi] * adigihe[3][jeta][jphi];
5735  digivariancehe[3][jeta][jphi] = fabs(digivariancehe[3][jeta][jphi]);
5736  digivariancehe[4][jeta][jphi] -= adigihe[4][jeta][jphi] * adigihe[4][jeta][jphi];
5737  digivariancehe[4][jeta][jphi] = fabs(digivariancehe[4][jeta][jphi]);
5738  digivariancehe[5][jeta][jphi] -= adigihe[5][jeta][jphi] * adigihe[5][jeta][jphi];
5739  digivariancehe[5][jeta][jphi] = fabs(digivariancehe[5][jeta][jphi]);
5740  digivariancehe[6][jeta][jphi] -= adigihe[6][jeta][jphi] * adigihe[6][jeta][jphi];
5741  digivariancehe[6][jeta][jphi] = fabs(digivariancehe[6][jeta][jphi]);
5742  }
5743  }
5744  //cout<<" Vaiance: DONE*****" <<endl;
5745  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
5746  //======================================================================
5747  //======================================================================
5748  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
5749  c1x1->Clear();
5751  c1x0->Divide(1, 1);
5752  c1x0->cd(1);
5753  TH2F* DefzDdigiHE42D = new TH2F("DefzDdigiHE42D", "", neta, -41., 41., nphi, 0., 72.);
5754  TH2F* DefzDdigiHE42D0 = new TH2F("DefzDdigiHE42D0", "", neta, -41., 41., nphi, 0., 72.);
5755  TH2F* DefzDdigiHE42DF = (TH2F*)DefzDdigiHE42D0->Clone("DefzDdigiHE42DF");
5756  for (int i = 0; i < ndepth; i++) {
5757  for (int jeta = 0; jeta < neta; jeta++) {
5758  for (int jphi = 0; jphi < nphi; jphi++) {
5759  double ccc1 = digivariancehe[i][jeta][jphi];
5760  int k2plot = jeta - 41;
5761  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
5762  if (adigihe[i][jeta][jphi] > 0.) {
5763  DefzDdigiHE42D->Fill(kkk, jphi, ccc1);
5764  DefzDdigiHE42D0->Fill(kkk, jphi, 1.);
5765  }
5766  }
5767  }
5768  }
5769  DefzDdigiHE42DF->Divide(DefzDdigiHE42D, DefzDdigiHE42D0, 1, 1, "B"); // average A
5770  // DefzDdigiHE1->Sumw2();
5771  gPad->SetGridy();
5772  gPad->SetGridx(); // gPad->SetLogz();
5773  DefzDdigiHE42DF->SetMarkerStyle(20);
5774  DefzDdigiHE42DF->SetMarkerSize(0.4);
5775  DefzDdigiHE42DF->GetZaxis()->SetLabelSize(0.08);
5776  DefzDdigiHE42DF->SetXTitle("<D>_depth #eta \b");
5777  DefzDdigiHE42DF->SetYTitle(" #phi \b");
5778  DefzDdigiHE42DF->SetZTitle("<D>_depth \b");
5779  DefzDdigiHE42DF->SetMarkerColor(2);
5780  DefzDdigiHE42DF->SetLineColor(
5781  0); // DefzDdigiHE42DF->SetMaximum(1.000); // DefzDdigiHE42DF->SetMinimum(1.0);
5782  DefzDdigiHE42DF->Draw("COLZ");
5784  c1x0->Update();
5785  c1x0->Print("DdigiGeneralD2PhiSymmetryHE.png");
5786  c1x0->Clear();
5787  // clean-up
5788  if (DefzDdigiHE42D)
5789  delete DefzDdigiHE42D;
5790  if (DefzDdigiHE42D0)
5791  delete DefzDdigiHE42D0;
5792  if (DefzDdigiHE42DF)
5793  delete DefzDdigiHE42DF;
5794  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
5795  //======================================================================
5796  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
5797  c1x1->Clear();
5799  c1x1->Divide(1, 1);
5800  c1x1->cd(1);
5801  TH1F* DefzDdigiHE41D = new TH1F("DefzDdigiHE41D", "", nphi, 0., 72.);
5802  TH1F* DefzDdigiHE41D0 = new TH1F("DefzDdigiHE41D0", "", nphi, 0., 72.);
5803  TH1F* DefzDdigiHE41DF = (TH1F*)DefzDdigiHE41D0->Clone("DefzDdigiHE41DF");
5804 
5805  for (int jphi = 0; jphi < nphi; jphi++) {
5806  for (int jeta = 0; jeta < neta; jeta++) {
5807  for (int i = 0; i < ndepth; i++) {
5808  double ccc1 = digivariancehe[i][jeta][jphi];
5809  if (adigihe[i][jeta][jphi] > 0.) {
5810  DefzDdigiHE41D->Fill(jphi, ccc1);
5811  DefzDdigiHE41D0->Fill(jphi, 1.);
5812  }
5813  }
5814  }
5815  }
5816  // DefzDdigiHE41D->Sumw2();DefzDdigiHE41D0->Sumw2();
5817 
5818  DefzDdigiHE41DF->Divide(DefzDdigiHE41D, DefzDdigiHE41D0, 1, 1, "B"); // R averaged over depthes & eta
5819  DefzDdigiHE41D0->Sumw2();
5820  // for (int jphi=1;jphi<73;jphi++) {DefzDdigiHE41DF->SetBinError(jphi,0.01);}
5821  gPad->SetGridy();
5822  gPad->SetGridx(); // gPad->SetLogz();
5823  DefzDdigiHE41DF->SetMarkerStyle(20);
5824  DefzDdigiHE41DF->SetMarkerSize(1.4);
5825  DefzDdigiHE41DF->GetZaxis()->SetLabelSize(0.08);
5826  DefzDdigiHE41DF->SetXTitle("#phi \b");
5827  DefzDdigiHE41DF->SetYTitle(" <D> \b");
5828  DefzDdigiHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
5829  DefzDdigiHE41DF->SetMarkerColor(4);
5830  DefzDdigiHE41DF->SetLineColor(4); // DefzDdigiHE41DF->SetMinimum(0.8); DefzDdigiHE41DF->SetMinimum(-0.015);
5831  DefzDdigiHE41DF->Draw("Error");
5833  c1x1->Update();
5834  c1x1->Print("DdigiGeneralD1PhiSymmetryHE.png");
5835  c1x1->Clear();
5836  // clean-up
5837  if (DefzDdigiHE41D)
5838  delete DefzDdigiHE41D;
5839  if (DefzDdigiHE41D0)
5840  delete DefzDdigiHE41D0;
5841  if (DefzDdigiHE41DF)
5842  delete DefzDdigiHE41DF;
5843  //========================================================================================== 14
5844  //======================================================================
5845  //======================================================================1D plot: D vs phi , different eta, depth=1
5846  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
5847  c3x5->Clear();
5849  c3x5->Divide(3, 5);
5850  c3x5->cd(1);
5851  int kcountHEpositivedirectionDigiD1 = 1;
5852  TH1F* h2CeffHEpositivedirectionDigiD1 = new TH1F("h2CeffHEpositivedirectionDigiD1", "", nphi, 0., 72.);
5853 
5854  for (int jeta = 0; jeta < njeta; jeta++) {
5855  // positivedirectionDigiD:
5856  if (jeta - 41 >= 0) {
5857  // for (int i=0;i<ndepth;i++) {
5858  // depth=1
5859  for (int i = 0; i < 1; i++) {
5860  TH1F* HEpositivedirectionDigiD1 = (TH1F*)h2CeffHEpositivedirectionDigiD1->Clone("twod1");
5861 
5862  float ccctest = 0; // to avoid empty massive elements
5863  for (int jphi = 0; jphi < nphi; jphi++) {
5864  double ccc1 = digivariancehe[i][jeta][jphi];
5865  if (adigihe[i][jeta][jphi] > 0.) {
5866  HEpositivedirectionDigiD1->Fill(jphi, ccc1);
5867  ccctest = 1.; //HEpositivedirectionDigiD1->SetBinError(i,0.01);
5868  }
5869  } // for jphi
5870  if (ccctest > 0.) {
5871  //cout<<"1414 kcountHEpositivedirectionDigiD1 = "<<kcountHEpositivedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
5872  c3x5->cd(kcountHEpositivedirectionDigiD1);
5873  HEpositivedirectionDigiD1->SetMarkerStyle(20);
5874  HEpositivedirectionDigiD1->SetMarkerSize(0.4);
5875  HEpositivedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
5876  HEpositivedirectionDigiD1->SetXTitle("HEpositivedirectionDigiD1 \b");
5877  HEpositivedirectionDigiD1->SetMarkerColor(2);
5878  HEpositivedirectionDigiD1->SetLineColor(0);
5879  gPad->SetGridy();
5880  gPad->SetGridx();
5881  // gPad->SetLogy();
5882  if (kcountHEpositivedirectionDigiD1 == 1)
5883  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
5884  if (kcountHEpositivedirectionDigiD1 == 2)
5885  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
5886  if (kcountHEpositivedirectionDigiD1 == 3)
5887  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
5888  if (kcountHEpositivedirectionDigiD1 == 4)
5889  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
5890  if (kcountHEpositivedirectionDigiD1 == 5)
5891  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
5892  if (kcountHEpositivedirectionDigiD1 == 6)
5893  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
5894  if (kcountHEpositivedirectionDigiD1 == 7)
5895  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
5896  if (kcountHEpositivedirectionDigiD1 == 8)
5897  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
5898  if (kcountHEpositivedirectionDigiD1 == 9)
5899  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
5900  if (kcountHEpositivedirectionDigiD1 == 10)
5901  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
5902  if (kcountHEpositivedirectionDigiD1 == 11)
5903  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
5904  if (kcountHEpositivedirectionDigiD1 == 12)
5905  HEpositivedirectionDigiD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
5906  HEpositivedirectionDigiD1->Draw("Error");
5907  kcountHEpositivedirectionDigiD1++;
5908  if (kcountHEpositivedirectionDigiD1 > 12)
5909  break; // 4x6 = 24
5910  } //ccctest>0
5911 
5912  } // for i
5913  } //if(jeta-41 >= 0)
5914  } //for jeta
5916  c3x5->Update();
5917  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
5918  c3x5->Clear();
5919  // clean-up
5920  if (h2CeffHEpositivedirectionDigiD1)
5921  delete h2CeffHEpositivedirectionDigiD1;
5922  //========================================================================================== 15
5923  //======================================================================
5924  //======================================================================1D plot: D vs phi , different eta, depth=2
5925  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
5926  c3x5->Clear();
5927  c3x5->Divide(3, 5);
5928  c3x5->cd(1);
5929  int kcountHEpositivedirectionDigiD2 = 1;
5930  TH1F* h2CeffHEpositivedirectionDigiD2 = new TH1F("h2CeffHEpositivedirectionDigiD2", "", nphi, 0., 72.);
5931 
5932  for (int jeta = 0; jeta < njeta; jeta++) {
5933  // positivedirectionDigiD:
5934  if (jeta - 41 >= 0) {
5935  // for (int i=0;i<ndepth;i++) {
5936  // depth=2
5937  for (int i = 1; i < 2; i++) {
5938  TH1F* HEpositivedirectionDigiD2 = (TH1F*)h2CeffHEpositivedirectionDigiD2->Clone("twod1");
5939 
5940  float ccctest = 0; // to avoid empty massive elements
5941  for (int jphi = 0; jphi < nphi; jphi++) {
5942  double ccc1 = digivariancehe[i][jeta][jphi];
5943  if (adigihe[i][jeta][jphi] > 0.) {
5944  HEpositivedirectionDigiD2->Fill(jphi, ccc1);
5945  ccctest = 1.; //HEpositivedirectionDigiD2->SetBinError(i,0.01);
5946  }
5947  } // for jphi
5948  if (ccctest > 0.) {
5949  //cout<<"1515 kcountHEpositivedirectionDigiD2 = "<<kcountHEpositivedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
5950  c3x5->cd(kcountHEpositivedirectionDigiD2);
5951  HEpositivedirectionDigiD2->SetMarkerStyle(20);
5952  HEpositivedirectionDigiD2->SetMarkerSize(0.4);
5953  HEpositivedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
5954  HEpositivedirectionDigiD2->SetXTitle("HEpositivedirectionDigiD2 \b");
5955  HEpositivedirectionDigiD2->SetMarkerColor(2);
5956  HEpositivedirectionDigiD2->SetLineColor(0);
5957  gPad->SetGridy();
5958  gPad->SetGridx();
5959  // gPad->SetLogy();
5960  if (kcountHEpositivedirectionDigiD2 == 1)
5961  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
5962  if (kcountHEpositivedirectionDigiD2 == 2)
5963  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
5964  if (kcountHEpositivedirectionDigiD2 == 3)
5965  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
5966  if (kcountHEpositivedirectionDigiD2 == 4)
5967  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
5968  if (kcountHEpositivedirectionDigiD2 == 5)
5969  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
5970  if (kcountHEpositivedirectionDigiD2 == 6)
5971  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
5972  if (kcountHEpositivedirectionDigiD2 == 7)
5973  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
5974  if (kcountHEpositivedirectionDigiD2 == 8)
5975  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
5976  if (kcountHEpositivedirectionDigiD2 == 9)
5977  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
5978  if (kcountHEpositivedirectionDigiD2 == 10)
5979  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
5980  if (kcountHEpositivedirectionDigiD2 == 11)
5981  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
5982  if (kcountHEpositivedirectionDigiD2 == 12)
5983  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
5984  if (kcountHEpositivedirectionDigiD2 == 13)
5985  HEpositivedirectionDigiD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
5986  HEpositivedirectionDigiD2->Draw("Error");
5987  kcountHEpositivedirectionDigiD2++;
5988  if (kcountHEpositivedirectionDigiD2 > 13)
5989  break; // 4x6 = 24
5990  } //ccctest>0
5991 
5992  } // for i
5993  } //if(jeta-41 >= 0)
5994  } //for jeta
5996  c3x5->Update();
5997  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
5998  c3x5->Clear();
5999  // clean-up
6000  if (h2CeffHEpositivedirectionDigiD2)
6001  delete h2CeffHEpositivedirectionDigiD2;
6002  //========================================================================================== 16
6003  //======================================================================
6004  //======================================================================1D plot: D vs phi , different eta, depth=3
6005  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
6006  c3x5->Clear();
6007  c3x5->Divide(3, 5);
6008  c3x5->cd(1);
6009  int kcountHEpositivedirectionDigiD3 = 1;
6010  TH1F* h2CeffHEpositivedirectionDigiD3 = new TH1F("h2CeffHEpositivedirectionDigiD3", "", nphi, 0., 72.);
6011 
6012  for (int jeta = 0; jeta < njeta; jeta++) {
6013  // positivedirectionDigiD:
6014  if (jeta - 41 >= 0) {
6015  // for (int i=0;i<ndepth;i++) {
6016  // depth=3
6017  for (int i = 2; i < 3; i++) {
6018  TH1F* HEpositivedirectionDigiD3 = (TH1F*)h2CeffHEpositivedirectionDigiD3->Clone("twod1");
6019 
6020  float ccctest = 0; // to avoid empty massive elements
6021  for (int jphi = 0; jphi < nphi; jphi++) {
6022  double ccc1 = digivariancehe[i][jeta][jphi];
6023  if (adigihe[i][jeta][jphi] > 0.) {
6024  HEpositivedirectionDigiD3->Fill(jphi, ccc1);
6025  ccctest = 1.; //HEpositivedirectionDigiD3->SetBinError(i,0.01);
6026  }
6027  } // for jphi
6028  if (ccctest > 0.) {
6029  //cout<<"1616 kcountHEpositivedirectionDigiD3 = "<<kcountHEpositivedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
6030  c3x5->cd(kcountHEpositivedirectionDigiD3);
6031  HEpositivedirectionDigiD3->SetMarkerStyle(20);
6032  HEpositivedirectionDigiD3->SetMarkerSize(0.4);
6033  HEpositivedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
6034  HEpositivedirectionDigiD3->SetXTitle("HEpositivedirectionDigiD3 \b");
6035  HEpositivedirectionDigiD3->SetMarkerColor(2);
6036  HEpositivedirectionDigiD3->SetLineColor(0);
6037  gPad->SetGridy();
6038  gPad->SetGridx();
6039  // gPad->SetLogy();
6040  if (kcountHEpositivedirectionDigiD3 == 1)
6041  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
6042  if (kcountHEpositivedirectionDigiD3 == 2)
6043  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
6044  if (kcountHEpositivedirectionDigiD3 == 3)
6045  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
6046  if (kcountHEpositivedirectionDigiD3 == 4)
6047  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
6048  if (kcountHEpositivedirectionDigiD3 == 5)
6049  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
6050  if (kcountHEpositivedirectionDigiD3 == 6)
6051  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
6052  if (kcountHEpositivedirectionDigiD3 == 7)
6053  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
6054  if (kcountHEpositivedirectionDigiD3 == 8)
6055  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
6056  if (kcountHEpositivedirectionDigiD3 == 9)
6057  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
6058  if (kcountHEpositivedirectionDigiD3 == 10)
6059  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
6060  if (kcountHEpositivedirectionDigiD3 == 11)
6061  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
6062  if (kcountHEpositivedirectionDigiD3 == 12)
6063  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
6064  if (kcountHEpositivedirectionDigiD3 == 13)
6065  HEpositivedirectionDigiD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
6066  HEpositivedirectionDigiD3->Draw("Error");
6067  kcountHEpositivedirectionDigiD3++;
6068  if (kcountHEpositivedirectionDigiD3 > 13)
6069  break; // 4x6 = 24
6070  } //ccctest>0
6071 
6072  } // for i
6073  } //if(jeta-41 >= 0)
6074  } //for jeta
6076  c3x5->Update();
6077  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
6078  c3x5->Clear();
6079  // clean-up
6080  if (h2CeffHEpositivedirectionDigiD3)
6081  delete h2CeffHEpositivedirectionDigiD3;
6082  //========================================================================================== 17
6083  //======================================================================
6084  //======================================================================1D plot: D vs phi , different eta, depth=4
6085  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
6086  c3x5->Clear();
6087  c3x5->Divide(3, 5);
6088  c3x5->cd(1);
6089  int kcountHEpositivedirectionDigiD4 = 1;
6090  TH1F* h2CeffHEpositivedirectionDigiD4 = new TH1F("h2CeffHEpositivedirectionDigiD4", "", nphi, 0., 72.);
6091 
6092  for (int jeta = 0; jeta < njeta; jeta++) {
6093  // positivedirectionDigiD:
6094  if (jeta - 41 >= 0) {
6095  // for (int i=0;i<ndepth;i++) {
6096  // depth=4
6097  for (int i = 3; i < 4; i++) {
6098  TH1F* HEpositivedirectionDigiD4 = (TH1F*)h2CeffHEpositivedirectionDigiD4->Clone("twod1");
6099 
6100  float ccctest = 0; // to avoid empty massive elements
6101  for (int jphi = 0; jphi < nphi; jphi++) {
6102  double ccc1 = digivariancehe[i][jeta][jphi];
6103  if (adigihe[i][jeta][jphi] > 0.) {
6104  HEpositivedirectionDigiD4->Fill(jphi, ccc1);
6105  ccctest = 1.; //HEpositivedirectionDigiD4->SetBinError(i,0.01);
6106  }
6107  } // for jphi
6108  if (ccctest > 0.) {
6109  //cout<<"1717 kcountHEpositivedirectionDigiD4 = "<<kcountHEpositivedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
6110  c3x5->cd(kcountHEpositivedirectionDigiD4);
6111  HEpositivedirectionDigiD4->SetMarkerStyle(20);
6112  HEpositivedirectionDigiD4->SetMarkerSize(0.4);
6113  HEpositivedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
6114  HEpositivedirectionDigiD4->SetXTitle("HEpositivedirectionDigiD4 \b");
6115  HEpositivedirectionDigiD4->SetMarkerColor(2);
6116  HEpositivedirectionDigiD4->SetLineColor(0);
6117  gPad->SetGridy();
6118  gPad->SetGridx();
6119  // gPad->SetLogy();
6120  if (kcountHEpositivedirectionDigiD4 == 1)
6121  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
6122  if (kcountHEpositivedirectionDigiD4 == 2)
6123  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
6124  if (kcountHEpositivedirectionDigiD4 == 3)
6125  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
6126  if (kcountHEpositivedirectionDigiD4 == 4)
6127  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
6128  if (kcountHEpositivedirectionDigiD4 == 5)
6129  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
6130  if (kcountHEpositivedirectionDigiD4 == 6)
6131  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
6132  if (kcountHEpositivedirectionDigiD4 == 7)
6133  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
6134  if (kcountHEpositivedirectionDigiD4 == 8)
6135  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
6136  if (kcountHEpositivedirectionDigiD4 == 9)
6137  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
6138  if (kcountHEpositivedirectionDigiD4 == 10)
6139  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
6140  if (kcountHEpositivedirectionDigiD4 == 11)
6141  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
6142  if (kcountHEpositivedirectionDigiD4 == 12)
6143  HEpositivedirectionDigiD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
6144  HEpositivedirectionDigiD4->Draw("Error");
6145  kcountHEpositivedirectionDigiD4++;
6146  if (kcountHEpositivedirectionDigiD4 > 12)
6147  break; // 4x6 = 24
6148  } //ccctest>0
6149 
6150  } // for i
6151  } //if(jeta-41 >= 0)
6152  } //for jeta
6154  c3x5->Update();
6155  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
6156  c3x5->Clear();
6157  // clean-up
6158  if (h2CeffHEpositivedirectionDigiD4)
6159  delete h2CeffHEpositivedirectionDigiD4;
6160  //========================================================================================== 18
6161  //======================================================================
6162  //======================================================================1D plot: D vs phi , different eta, depth=5
6163  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
6164  c3x5->Clear();
6165  c3x5->Divide(3, 5);
6166  c3x5->cd(1);
6167  int kcountHEpositivedirectionDigiD5 = 1;
6168  TH1F* h2CeffHEpositivedirectionDigiD5 = new TH1F("h2CeffHEpositivedirectionDigiD5", "", nphi, 0., 72.);
6169 
6170  for (int jeta = 0; jeta < njeta; jeta++) {
6171  // positivedirectionDigiD:
6172  if (jeta - 41 >= 0) {
6173  // for (int i=0;i<ndepth;i++) {
6174  // depth=5
6175  for (int i = 4; i < 5; i++) {
6176  TH1F* HEpositivedirectionDigiD5 = (TH1F*)h2CeffHEpositivedirectionDigiD5->Clone("twod1");
6177 
6178  float ccctest = 0; // to avoid empty massive elements
6179  for (int jphi = 0; jphi < nphi; jphi++) {
6180  double ccc1 = digivariancehe[i][jeta][jphi];
6181  if (adigihe[i][jeta][jphi] > 0.) {
6182  HEpositivedirectionDigiD5->Fill(jphi, ccc1);
6183  ccctest = 1.; //HEpositivedirectionDigiD5->SetBinError(i,0.01);
6184  }
6185  } // for jphi
6186  if (ccctest > 0.) {
6187  //cout<<"1818 kcountHEpositivedirectionDigiD5 = "<<kcountHEpositivedirectionDigiD5 <<" jeta-41= "<< jeta-41 <<endl;
6188  c3x5->cd(kcountHEpositivedirectionDigiD5);
6189  HEpositivedirectionDigiD5->SetMarkerStyle(20);
6190  HEpositivedirectionDigiD5->SetMarkerSize(0.4);
6191  HEpositivedirectionDigiD5->GetYaxis()->SetLabelSize(0.04);
6192  HEpositivedirectionDigiD5->SetXTitle("HEpositivedirectionDigiD5 \b");
6193  HEpositivedirectionDigiD5->SetMarkerColor(2);
6194  HEpositivedirectionDigiD5->SetLineColor(0);
6195  gPad->SetGridy();
6196  gPad->SetGridx();
6197  // gPad->SetLogy();
6198  if (kcountHEpositivedirectionDigiD5 == 1)
6199  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
6200  if (kcountHEpositivedirectionDigiD5 == 2)
6201  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
6202  if (kcountHEpositivedirectionDigiD5 == 3)
6203  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
6204  if (kcountHEpositivedirectionDigiD5 == 4)
6205  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
6206  if (kcountHEpositivedirectionDigiD5 == 5)
6207  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
6208  if (kcountHEpositivedirectionDigiD5 == 6)
6209  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
6210  if (kcountHEpositivedirectionDigiD5 == 7)
6211  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
6212  if (kcountHEpositivedirectionDigiD5 == 8)
6213  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
6214  if (kcountHEpositivedirectionDigiD5 == 9)
6215  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
6216  if (kcountHEpositivedirectionDigiD5 == 10)
6217  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
6218  if (kcountHEpositivedirectionDigiD5 == 11)
6219  HEpositivedirectionDigiD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
6220  HEpositivedirectionDigiD5->Draw("Error");
6221  kcountHEpositivedirectionDigiD5++;
6222  if (kcountHEpositivedirectionDigiD5 > 11)
6223  break; // 4x6 = 24
6224  } //ccctest>0
6225 
6226  } // for i
6227  } //if(jeta-41 >= 0)
6228  } //for jeta
6230  c3x5->Update();
6231  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
6232  c3x5->Clear();
6233  // clean-up
6234  if (h2CeffHEpositivedirectionDigiD5)
6235  delete h2CeffHEpositivedirectionDigiD5;
6236  //========================================================================================== 19
6237  //======================================================================
6238  //======================================================================1D plot: D vs phi , different eta, depth=6
6239  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
6240  c3x5->Clear();
6241  c3x5->Divide(3, 5);
6242  c3x5->cd(1);
6243  int kcountHEpositivedirectionDigiD6 = 1;
6244  TH1F* h2CeffHEpositivedirectionDigiD6 = new TH1F("h2CeffHEpositivedirectionDigiD6", "", nphi, 0., 72.);
6245 
6246  for (int jeta = 0; jeta < njeta; jeta++) {
6247  // positivedirectionDigiD:
6248  if (jeta - 41 >= 0) {
6249  // for (int i=0;i<ndepth;i++) {
6250  // depth=6
6251  for (int i = 5; i < 6; i++) {
6252  TH1F* HEpositivedirectionDigiD6 = (TH1F*)h2CeffHEpositivedirectionDigiD6->Clone("twod1");
6253 
6254  float ccctest = 0; // to avoid empty massive elements
6255  for (int jphi = 0; jphi < nphi; jphi++) {
6256  double ccc1 = digivariancehe[i][jeta][jphi];
6257  if (adigihe[i][jeta][jphi] > 0.) {
6258  HEpositivedirectionDigiD6->Fill(jphi, ccc1);
6259  ccctest = 1.; //HEpositivedirectionDigiD6->SetBinError(i,0.01);
6260  }
6261  } // for jphi
6262  if (ccctest > 0.) {
6263  //cout<<"1919 kcountHEpositivedirectionDigiD6 = "<<kcountHEpositivedirectionDigiD6 <<" jeta-41= "<< jeta-41 <<endl;
6264  c3x5->cd(kcountHEpositivedirectionDigiD6);
6265  HEpositivedirectionDigiD6->SetMarkerStyle(20);
6266  HEpositivedirectionDigiD6->SetMarkerSize(0.4);
6267  HEpositivedirectionDigiD6->GetYaxis()->SetLabelSize(0.04);
6268  HEpositivedirectionDigiD6->SetXTitle("HEpositivedirectionDigiD6 \b");
6269  HEpositivedirectionDigiD6->SetMarkerColor(2);
6270  HEpositivedirectionDigiD6->SetLineColor(0);
6271  gPad->SetGridy();
6272  gPad->SetGridx();
6273  // gPad->SetLogy();
6274  if (kcountHEpositivedirectionDigiD6 == 1)
6275  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
6276  if (kcountHEpositivedirectionDigiD6 == 2)
6277  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
6278  if (kcountHEpositivedirectionDigiD6 == 3)
6279  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
6280  if (kcountHEpositivedirectionDigiD6 == 4)
6281  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
6282  if (kcountHEpositivedirectionDigiD6 == 5)
6283  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
6284  if (kcountHEpositivedirectionDigiD6 == 6)
6285  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
6286  if (kcountHEpositivedirectionDigiD6 == 7)
6287  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
6288  if (kcountHEpositivedirectionDigiD6 == 8)
6289  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
6290  if (kcountHEpositivedirectionDigiD6 == 9)
6291  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
6292  if (kcountHEpositivedirectionDigiD6 == 10)
6293  HEpositivedirectionDigiD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
6294  HEpositivedirectionDigiD6->Draw("Error");
6295  kcountHEpositivedirectionDigiD6++;
6296  if (kcountHEpositivedirectionDigiD6 > 10)
6297  break; // 4x6 = 24
6298  } //ccctest>0
6299 
6300  } // for i
6301  } //if(jeta-41 >= 0)
6302  } //for jeta
6304  c3x5->Update();
6305  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
6306  c3x5->Clear();
6307  // clean-up
6308  if (h2CeffHEpositivedirectionDigiD6)
6309  delete h2CeffHEpositivedirectionDigiD6;
6310  //========================================================================================== 20
6311  //======================================================================
6312  //======================================================================1D plot: D vs phi , different eta, depth=7
6313  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
6314  c3x5->Clear();
6315  c3x5->Divide(3, 5);
6316  c3x5->cd(1);
6317  int kcountHEpositivedirectionDigiD7 = 1;
6318  TH1F* h2CeffHEpositivedirectionDigiD7 = new TH1F("h2CeffHEpositivedirectionDigiD7", "", nphi, 0., 72.);
6319 
6320  for (int jeta = 0; jeta < njeta; jeta++) {
6321  // positivedirectionDigiD:
6322  if (jeta - 41 >= 0) {
6323  // for (int i=0;i<ndepth;i++) {
6324  // depth=7
6325  for (int i = 6; i < 7; i++) {
6326  TH1F* HEpositivedirectionDigiD7 = (TH1F*)h2CeffHEpositivedirectionDigiD7->Clone("twod1");
6327 
6328  float ccctest = 0; // to avoid empty massive elements
6329  for (int jphi = 0; jphi < nphi; jphi++) {
6330  double ccc1 = digivariancehe[i][jeta][jphi];
6331  if (adigihe[i][jeta][jphi] > 0.) {
6332  HEpositivedirectionDigiD7->Fill(jphi, ccc1);
6333  ccctest = 1.; //HEpositivedirectionDigiD7->SetBinError(i,0.01);
6334  }
6335  } // for jphi
6336  if (ccctest != 0.) {
6337  //cout<<"2020 kcountHEpositivedirectionDigiD7 = "<<kcountHEpositivedirectionDigiD7 <<" jeta-41= "<< jeta-41 <<endl;
6338  c3x5->cd(kcountHEpositivedirectionDigiD7);
6339  HEpositivedirectionDigiD7->SetMarkerStyle(20);
6340  HEpositivedirectionDigiD7->SetMarkerSize(0.4);
6341  HEpositivedirectionDigiD7->GetYaxis()->SetLabelSize(0.04);
6342  HEpositivedirectionDigiD7->SetXTitle("HEpositivedirectionDigiD7 \b");
6343  HEpositivedirectionDigiD7->SetMarkerColor(2);
6344  HEpositivedirectionDigiD7->SetLineColor(0);
6345  gPad->SetGridy();
6346  gPad->SetGridx();
6347  // gPad->SetLogy();
6348  if (kcountHEpositivedirectionDigiD7 == 1)
6349  HEpositivedirectionDigiD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
6350  if (kcountHEpositivedirectionDigiD7 == 2)
6351  HEpositivedirectionDigiD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
6352  if (kcountHEpositivedirectionDigiD7 == 3)
6353  HEpositivedirectionDigiD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
6354  HEpositivedirectionDigiD7->Draw("Error");
6355  kcountHEpositivedirectionDigiD7++;
6356  if (kcountHEpositivedirectionDigiD7 > 3)
6357  break; // 4x6 = 24
6358  } //ccctest>0
6359 
6360  } // for i
6361  } //if(jeta-41 >= 0)
6362  } //for jeta
6364  c3x5->Update();
6365  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
6366  c3x5->Clear();
6367  // clean-up
6368  if (h2CeffHEpositivedirectionDigiD7)
6369  delete h2CeffHEpositivedirectionDigiD7;
6370 
6371  //========================================================================================== 22222214
6372  //======================================================================
6373  //======================================================================1D plot: D vs phi , different eta, depth=1
6374  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
6375  c3x5->Clear();
6377  c3x5->Divide(3, 5);
6378  c3x5->cd(1);
6379  int kcountHEnegativedirectionDigiD1 = 1;
6380  TH1F* h2CeffHEnegativedirectionDigiD1 = new TH1F("h2CeffHEnegativedirectionDigiD1", "", nphi, 0., 72.);
6381 
6382  for (int jeta = 0; jeta < njeta; jeta++) {
6383  // negativedirectionDigiD:
6384  if (jeta - 41 < 0) {
6385  // for (int i=0;i<ndepth;i++) {
6386  // depth=1
6387  for (int i = 0; i < 1; i++) {
6388  TH1F* HEnegativedirectionDigiD1 = (TH1F*)h2CeffHEnegativedirectionDigiD1->Clone("twod1");
6389 
6390  float ccctest = 0; // to avoid empty massive elements
6391  for (int jphi = 0; jphi < nphi; jphi++) {
6392  double ccc1 = digivariancehe[i][jeta][jphi];
6393  if (adigihe[i][jeta][jphi] > 0.) {
6394  HEnegativedirectionDigiD1->Fill(jphi, ccc1);
6395  ccctest = 1.; //HEnegativedirectionDigiD1->SetBinError(i,0.01);
6396  }
6397  } // for jphi
6398  if (ccctest > 0.) {
6399  //cout<<"1414 kcountHEnegativedirectionDigiD1 = "<<kcountHEnegativedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
6400  c3x5->cd(kcountHEnegativedirectionDigiD1);
6401  HEnegativedirectionDigiD1->SetMarkerStyle(20);
6402  HEnegativedirectionDigiD1->SetMarkerSize(0.4);
6403  HEnegativedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
6404  HEnegativedirectionDigiD1->SetXTitle("HEnegativedirectionDigiD1 \b");
6405  HEnegativedirectionDigiD1->SetMarkerColor(2);
6406  HEnegativedirectionDigiD1->SetLineColor(0);
6407  gPad->SetGridy();
6408  gPad->SetGridx();
6409  // gPad->SetLogy();
6410  if (kcountHEnegativedirectionDigiD1 == 1)
6411  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
6412  if (kcountHEnegativedirectionDigiD1 == 2)
6413  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
6414  if (kcountHEnegativedirectionDigiD1 == 3)
6415  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
6416  if (kcountHEnegativedirectionDigiD1 == 4)
6417  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
6418  if (kcountHEnegativedirectionDigiD1 == 5)
6419  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
6420  if (kcountHEnegativedirectionDigiD1 == 6)
6421  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
6422  if (kcountHEnegativedirectionDigiD1 == 7)
6423  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
6424  if (kcountHEnegativedirectionDigiD1 == 8)
6425  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
6426  if (kcountHEnegativedirectionDigiD1 == 9)
6427  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
6428  if (kcountHEnegativedirectionDigiD1 == 10)
6429  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
6430  if (kcountHEnegativedirectionDigiD1 == 11)
6431  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
6432  if (kcountHEnegativedirectionDigiD1 == 12)
6433  HEnegativedirectionDigiD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
6434  HEnegativedirectionDigiD1->Draw("Error");
6435  kcountHEnegativedirectionDigiD1++;
6436  if (kcountHEnegativedirectionDigiD1 > 12)
6437  break; // 4x6 = 24
6438  } //ccctest>0
6439 
6440  } // for i
6441  } //if(jeta-41 < 0)
6442  } //for jeta
6444  c3x5->Update();
6445  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
6446  c3x5->Clear();
6447  // clean-up
6448  if (h2CeffHEnegativedirectionDigiD1)
6449  delete h2CeffHEnegativedirectionDigiD1;
6450  //========================================================================================== 22222215
6451  //======================================================================
6452  //======================================================================1D plot: D vs phi , different eta, depth=2
6453  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
6454  c3x5->Clear();
6455  c3x5->Divide(3, 5);
6456  c3x5->cd(1);
6457  int kcountHEnegativedirectionDigiD2 = 1;
6458  TH1F* h2CeffHEnegativedirectionDigiD2 = new TH1F("h2CeffHEnegativedirectionDigiD2", "", nphi, 0., 72.);
6459 
6460  for (int jeta = 0; jeta < njeta; jeta++) {
6461  // negativedirectionDigiD:
6462  if (jeta - 41 < 0) {
6463  // for (int i=0;i<ndepth;i++) {
6464  // depth=2
6465  for (int i = 1; i < 2; i++) {
6466  TH1F* HEnegativedirectionDigiD2 = (TH1F*)h2CeffHEnegativedirectionDigiD2->Clone("twod1");
6467 
6468  float ccctest = 0; // to avoid empty massive elements
6469  for (int jphi = 0; jphi < nphi; jphi++) {
6470  double ccc1 = digivariancehe[i][jeta][jphi];
6471  if (adigihe[i][jeta][jphi] > 0.) {
6472  HEnegativedirectionDigiD2->Fill(jphi, ccc1);
6473  ccctest = 1.; //HEnegativedirectionDigiD2->SetBinError(i,0.01);
6474  }
6475  } // for jphi
6476  if (ccctest > 0.) {
6477  //cout<<"1515 kcountHEnegativedirectionDigiD2 = "<<kcountHEnegativedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
6478  c3x5->cd(kcountHEnegativedirectionDigiD2);
6479  HEnegativedirectionDigiD2->SetMarkerStyle(20);
6480  HEnegativedirectionDigiD2->SetMarkerSize(0.4);
6481  HEnegativedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
6482  HEnegativedirectionDigiD2->SetXTitle("HEnegativedirectionDigiD2 \b");
6483  HEnegativedirectionDigiD2->SetMarkerColor(2);
6484  HEnegativedirectionDigiD2->SetLineColor(0);
6485  gPad->SetGridy();
6486  gPad->SetGridx();
6487  // gPad->SetLogy();
6488  if (kcountHEnegativedirectionDigiD2 == 1)
6489  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
6490  if (kcountHEnegativedirectionDigiD2 == 2)
6491  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
6492  if (kcountHEnegativedirectionDigiD2 == 3)
6493  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
6494  if (kcountHEnegativedirectionDigiD2 == 4)
6495  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
6496  if (kcountHEnegativedirectionDigiD2 == 5)
6497  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
6498  if (kcountHEnegativedirectionDigiD2 == 6)
6499  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
6500  if (kcountHEnegativedirectionDigiD2 == 7)
6501  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
6502  if (kcountHEnegativedirectionDigiD2 == 8)
6503  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
6504  if (kcountHEnegativedirectionDigiD2 == 9)
6505  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
6506  if (kcountHEnegativedirectionDigiD2 == 10)
6507  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
6508  if (kcountHEnegativedirectionDigiD2 == 11)
6509  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
6510  if (kcountHEnegativedirectionDigiD2 == 12)
6511  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
6512  if (kcountHEnegativedirectionDigiD2 == 13)
6513  HEnegativedirectionDigiD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
6514  HEnegativedirectionDigiD2->Draw("Error");
6515  kcountHEnegativedirectionDigiD2++;
6516  if (kcountHEnegativedirectionDigiD2 > 13)
6517  break; // 4x6 = 24
6518  } //ccctest>0
6519 
6520  } // for i
6521  } //if(jeta-41 < 0)
6522  } //for jeta
6524  c3x5->Update();
6525  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
6526  c3x5->Clear();
6527  // clean-up
6528  if (h2CeffHEnegativedirectionDigiD2)
6529  delete h2CeffHEnegativedirectionDigiD2;
6530  //========================================================================================== 22222216
6531  //======================================================================
6532  //======================================================================1D plot: D vs phi , different eta, depth=3
6533  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
6534  c3x5->Clear();
6535  c3x5->Divide(3, 5);
6536  c3x5->cd(1);
6537  int kcountHEnegativedirectionDigiD3 = 1;
6538  TH1F* h2CeffHEnegativedirectionDigiD3 = new TH1F("h2CeffHEnegativedirectionDigiD3", "", nphi, 0., 72.);
6539 
6540  for (int jeta = 0; jeta < njeta; jeta++) {
6541  // negativedirectionDigiD:
6542  if (jeta - 41 < 0) {
6543  // for (int i=0;i<ndepth;i++) {
6544  // depth=3
6545  for (int i = 2; i < 3; i++) {
6546  TH1F* HEnegativedirectionDigiD3 = (TH1F*)h2CeffHEnegativedirectionDigiD3->Clone("twod1");
6547 
6548  float ccctest = 0; // to avoid empty massive elements
6549  for (int jphi = 0; jphi < nphi; jphi++) {
6550  double ccc1 = digivariancehe[i][jeta][jphi];
6551  if (adigihe[i][jeta][jphi] > 0.) {
6552  HEnegativedirectionDigiD3->Fill(jphi, ccc1);
6553  ccctest = 1.; //HEnegativedirectionDigiD3->SetBinError(i,0.01);
6554  }
6555  } // for jphi
6556  if (ccctest > 0.) {
6557  //cout<<"1616 kcountHEnegativedirectionDigiD3 = "<<kcountHEnegativedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
6558  c3x5->cd(kcountHEnegativedirectionDigiD3);
6559  HEnegativedirectionDigiD3->SetMarkerStyle(20);
6560  HEnegativedirectionDigiD3->SetMarkerSize(0.4);
6561  HEnegativedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
6562  HEnegativedirectionDigiD3->SetXTitle("HEnegativedirectionDigiD3 \b");
6563  HEnegativedirectionDigiD3->SetMarkerColor(2);
6564  HEnegativedirectionDigiD3->SetLineColor(0);
6565  gPad->SetGridy();
6566  gPad->SetGridx();
6567  // gPad->SetLogy();
6568  if (kcountHEnegativedirectionDigiD3 == 1)
6569  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
6570  if (kcountHEnegativedirectionDigiD3 == 2)
6571  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
6572  if (kcountHEnegativedirectionDigiD3 == 3)
6573  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
6574  if (kcountHEnegativedirectionDigiD3 == 4)
6575  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
6576  if (kcountHEnegativedirectionDigiD3 == 5)
6577  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
6578  if (kcountHEnegativedirectionDigiD3 == 6)
6579  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
6580  if (kcountHEnegativedirectionDigiD3 == 7)
6581  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
6582  if (kcountHEnegativedirectionDigiD3 == 8)
6583  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
6584  if (kcountHEnegativedirectionDigiD3 == 9)
6585  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
6586  if (kcountHEnegativedirectionDigiD3 == 10)
6587  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
6588  if (kcountHEnegativedirectionDigiD3 == 11)
6589  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
6590  if (kcountHEnegativedirectionDigiD3 == 12)
6591  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
6592  if (kcountHEnegativedirectionDigiD3 == 13)
6593  HEnegativedirectionDigiD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
6594  HEnegativedirectionDigiD3->Draw("Error");
6595  kcountHEnegativedirectionDigiD3++;
6596  if (kcountHEnegativedirectionDigiD3 > 13)
6597  break; // 4x6 = 24
6598  } //ccctest>0
6599 
6600  } // for i
6601  } //if(jeta-41 < 0)
6602  } //for jeta
6604  c3x5->Update();
6605  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
6606  c3x5->Clear();
6607  // clean-up
6608  if (h2CeffHEnegativedirectionDigiD3)
6609  delete h2CeffHEnegativedirectionDigiD3;
6610  //========================================================================================== 22222217
6611  //======================================================================
6612  //======================================================================1D plot: D vs phi , different eta, depth=4
6613  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
6614  c3x5->Clear();
6615  c3x5->Divide(3, 5);
6616  c3x5->cd(1);
6617  int kcountHEnegativedirectionDigiD4 = 1;
6618  TH1F* h2CeffHEnegativedirectionDigiD4 = new TH1F("h2CeffHEnegativedirectionDigiD4", "", nphi, 0., 72.);
6619 
6620  for (int jeta = 0; jeta < njeta; jeta++) {
6621  // negativedirectionDigiD:
6622  if (jeta - 41 < 0) {
6623  // for (int i=0;i<ndepth;i++) {
6624  // depth=4
6625  for (int i = 3; i < 4; i++) {
6626  TH1F* HEnegativedirectionDigiD4 = (TH1F*)h2CeffHEnegativedirectionDigiD4->Clone("twod1");
6627 
6628  float ccctest = 0; // to avoid empty massive elements
6629  for (int jphi = 0; jphi < nphi; jphi++) {
6630  double ccc1 = digivariancehe[i][jeta][jphi];
6631  if (adigihe[i][jeta][jphi] > 0.) {
6632  HEnegativedirectionDigiD4->Fill(jphi, ccc1);
6633  ccctest = 1.; //HEnegativedirectionDigiD4->SetBinError(i,0.01);
6634  }
6635  } // for jphi
6636  if (ccctest > 0.) {
6637  //cout<<"1717 kcountHEnegativedirectionDigiD4 = "<<kcountHEnegativedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
6638  c3x5->cd(kcountHEnegativedirectionDigiD4);
6639  HEnegativedirectionDigiD4->SetMarkerStyle(20);
6640  HEnegativedirectionDigiD4->SetMarkerSize(0.4);
6641  HEnegativedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
6642  HEnegativedirectionDigiD4->SetXTitle("HEnegativedirectionDigiD4 \b");
6643  HEnegativedirectionDigiD4->SetMarkerColor(2);
6644  HEnegativedirectionDigiD4->SetLineColor(0);
6645  gPad->SetGridy();
6646  gPad->SetGridx();
6647  // gPad->SetLogy();
6648  if (kcountHEnegativedirectionDigiD4 == 1)
6649  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
6650  if (kcountHEnegativedirectionDigiD4 == 2)
6651  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
6652  if (kcountHEnegativedirectionDigiD4 == 3)
6653  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
6654  if (kcountHEnegativedirectionDigiD4 == 4)
6655  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
6656  if (kcountHEnegativedirectionDigiD4 == 5)
6657  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
6658  if (kcountHEnegativedirectionDigiD4 == 6)
6659  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
6660  if (kcountHEnegativedirectionDigiD4 == 7)
6661  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
6662  if (kcountHEnegativedirectionDigiD4 == 8)
6663  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
6664  if (kcountHEnegativedirectionDigiD4 == 9)
6665  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
6666  if (kcountHEnegativedirectionDigiD4 == 10)
6667  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
6668  if (kcountHEnegativedirectionDigiD4 == 11)
6669  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
6670  if (kcountHEnegativedirectionDigiD4 == 12)
6671  HEnegativedirectionDigiD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
6672  HEnegativedirectionDigiD4->Draw("Error");
6673  kcountHEnegativedirectionDigiD4++;
6674  if (kcountHEnegativedirectionDigiD4 > 12)
6675  break; // 4x6 = 24
6676  } //ccctest>0
6677 
6678  } // for i
6679  } //if(jeta-41 < 0)
6680  } //for jeta
6682  c3x5->Update();
6683  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
6684  c3x5->Clear();
6685  // clean-up
6686  if (h2CeffHEnegativedirectionDigiD4)
6687  delete h2CeffHEnegativedirectionDigiD4;
6688  //========================================================================================== 22222218
6689  //======================================================================
6690  //======================================================================1D plot: D vs phi , different eta, depth=5
6691  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
6692  c3x5->Clear();
6693  c3x5->Divide(3, 5);
6694  c3x5->cd(1);
6695  int kcountHEnegativedirectionDigiD5 = 1;
6696  TH1F* h2CeffHEnegativedirectionDigiD5 = new TH1F("h2CeffHEnegativedirectionDigiD5", "", nphi, 0., 72.);
6697 
6698  for (int jeta = 0; jeta < njeta; jeta++) {
6699  // negativedirectionDigiD:
6700  if (jeta - 41 < 0) {
6701  // for (int i=0;i<ndepth;i++) {
6702  // depth=5
6703  for (int i = 4; i < 5; i++) {
6704  TH1F* HEnegativedirectionDigiD5 = (TH1F*)h2CeffHEnegativedirectionDigiD5->Clone("twod1");
6705 
6706  float ccctest = 0; // to avoid empty massive elements
6707  for (int jphi = 0; jphi < nphi; jphi++) {
6708  double ccc1 = digivariancehe[i][jeta][jphi];
6709  if (adigihe[i][jeta][jphi] > 0.) {
6710  HEnegativedirectionDigiD5->Fill(jphi, ccc1);
6711  ccctest = 1.; //HEnegativedirectionDigiD5->SetBinError(i,0.01);
6712  }
6713  } // for jphi
6714  if (ccctest > 0.) {
6715  //cout<<"1818 kcountHEnegativedirectionDigiD5 = "<<kcountHEnegativedirectionDigiD5 <<" jeta-41= "<< jeta-41 <<endl;
6716  c3x5->cd(kcountHEnegativedirectionDigiD5);
6717  HEnegativedirectionDigiD5->SetMarkerStyle(20);
6718  HEnegativedirectionDigiD5->SetMarkerSize(0.4);
6719  HEnegativedirectionDigiD5->GetYaxis()->SetLabelSize(0.04);
6720  HEnegativedirectionDigiD5->SetXTitle("HEnegativedirectionDigiD5 \b");
6721  HEnegativedirectionDigiD5->SetMarkerColor(2);
6722  HEnegativedirectionDigiD5->SetLineColor(0);
6723  gPad->SetGridy();
6724  gPad->SetGridx();
6725  // gPad->SetLogy();
6726  if (kcountHEnegativedirectionDigiD5 == 1)
6727  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
6728  if (kcountHEnegativedirectionDigiD5 == 2)
6729  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
6730  if (kcountHEnegativedirectionDigiD5 == 3)
6731  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
6732  if (kcountHEnegativedirectionDigiD5 == 4)
6733  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
6734  if (kcountHEnegativedirectionDigiD5 == 5)
6735  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
6736  if (kcountHEnegativedirectionDigiD5 == 6)
6737  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
6738  if (kcountHEnegativedirectionDigiD5 == 7)
6739  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
6740  if (kcountHEnegativedirectionDigiD5 == 8)
6741  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
6742  if (kcountHEnegativedirectionDigiD5 == 9)
6743  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
6744  if (kcountHEnegativedirectionDigiD5 == 10)
6745  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
6746  if (kcountHEnegativedirectionDigiD5 == 11)
6747  HEnegativedirectionDigiD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
6748  HEnegativedirectionDigiD5->Draw("Error");
6749  kcountHEnegativedirectionDigiD5++;
6750  if (kcountHEnegativedirectionDigiD5 > 11)
6751  break; // 4x6 = 24
6752  } //ccctest>0
6753 
6754  } // for i
6755  } //if(jeta-41 < 0)
6756  } //for jeta
6758  c3x5->Update();
6759  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
6760  c3x5->Clear();
6761  // clean-up
6762  if (h2CeffHEnegativedirectionDigiD5)
6763  delete h2CeffHEnegativedirectionDigiD5;
6764  //========================================================================================== 22222219
6765  //======================================================================
6766  //======================================================================1D plot: D vs phi , different eta, depth=6
6767  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
6768  c3x5->Clear();
6769  c3x5->Divide(3, 5);
6770  c3x5->cd(1);
6771  int kcountHEnegativedirectionDigiD6 = 1;
6772  TH1F* h2CeffHEnegativedirectionDigiD6 = new TH1F("h2CeffHEnegativedirectionDigiD6", "", nphi, 0., 72.);
6773 
6774  for (int jeta = 0; jeta < njeta; jeta++) {
6775  // negativedirectionDigiD:
6776  if (jeta - 41 < 0) {
6777  // for (int i=0;i<ndepth;i++) {
6778  // depth=6
6779  for (int i = 5; i < 6; i++) {
6780  TH1F* HEnegativedirectionDigiD6 = (TH1F*)h2CeffHEnegativedirectionDigiD6->Clone("twod1");
6781 
6782  float ccctest = 0; // to avoid empty massive elements
6783  for (int jphi = 0; jphi < nphi; jphi++) {
6784  double ccc1 = digivariancehe[i][jeta][jphi];
6785  if (adigihe[i][jeta][jphi] > 0.) {
6786  HEnegativedirectionDigiD6->Fill(jphi, ccc1);
6787  ccctest = 1.; //HEnegativedirectionDigiD6->SetBinError(i,0.01);
6788  }
6789  } // for jphi
6790  if (ccctest > 0.) {
6791  //cout<<"1919 kcountHEnegativedirectionDigiD6 = "<<kcountHEnegativedirectionDigiD6 <<" jeta-41= "<< jeta-41 <<endl;
6792  c3x5->cd(kcountHEnegativedirectionDigiD6);
6793  HEnegativedirectionDigiD6->SetMarkerStyle(20);
6794  HEnegativedirectionDigiD6->SetMarkerSize(0.4);
6795  HEnegativedirectionDigiD6->GetYaxis()->SetLabelSize(0.04);
6796  HEnegativedirectionDigiD6->SetXTitle("HEnegativedirectionDigiD6 \b");
6797  HEnegativedirectionDigiD6->SetMarkerColor(2);
6798  HEnegativedirectionDigiD6->SetLineColor(0);
6799  gPad->SetGridy();
6800  gPad->SetGridx();
6801  // gPad->SetLogy();
6802  if (kcountHEnegativedirectionDigiD6 == 1)
6803  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
6804  if (kcountHEnegativedirectionDigiD6 == 2)
6805  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
6806  if (kcountHEnegativedirectionDigiD6 == 3)
6807  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
6808  if (kcountHEnegativedirectionDigiD6 == 4)
6809  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
6810  if (kcountHEnegativedirectionDigiD6 == 5)
6811  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
6812  if (kcountHEnegativedirectionDigiD6 == 6)
6813  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
6814  if (kcountHEnegativedirectionDigiD6 == 7)
6815  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
6816  if (kcountHEnegativedirectionDigiD6 == 8)
6817  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
6818  if (kcountHEnegativedirectionDigiD6 == 9)
6819  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
6820  if (kcountHEnegativedirectionDigiD6 == 10)
6821  HEnegativedirectionDigiD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
6822  HEnegativedirectionDigiD6->Draw("Error");
6823  kcountHEnegativedirectionDigiD6++;
6824  if (kcountHEnegativedirectionDigiD6 > 10)
6825  break; // 4x6 = 24
6826  } //ccctest>0
6827 
6828  } // for i
6829  } //if(jeta-41 < 0)
6830  } //for jeta
6832  c3x5->Update();
6833  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
6834  c3x5->Clear();
6835  // clean-up
6836  if (h2CeffHEnegativedirectionDigiD6)
6837  delete h2CeffHEnegativedirectionDigiD6;
6838  //========================================================================================== 22222220
6839  //======================================================================
6840  //======================================================================1D plot: D vs phi , different eta, depth=7
6841  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
6842  c3x5->Clear();
6843  c3x5->Divide(3, 5);
6844  c3x5->cd(1);
6845  int kcountHEnegativedirectionDigiD7 = 1;
6846  TH1F* h2CeffHEnegativedirectionDigiD7 = new TH1F("h2CeffHEnegativedirectionDigiD7", "", nphi, 0., 72.);
6847 
6848  for (int jeta = 0; jeta < njeta; jeta++) {
6849  // negativedirectionDigiD:
6850  if (jeta - 41 < 0) {
6851  // for (int i=0;i<ndepth;i++) {
6852  // depth=7
6853  for (int i = 6; i < 7; i++) {
6854  TH1F* HEnegativedirectionDigiD7 = (TH1F*)h2CeffHEnegativedirectionDigiD7->Clone("twod1");
6855 
6856  float ccctest = 0; // to avoid empty massive elements
6857  for (int jphi = 0; jphi < nphi; jphi++) {
6858  double ccc1 = digivariancehe[i][jeta][jphi];
6859  if (adigihe[i][jeta][jphi] > 0.) {
6860  HEnegativedirectionDigiD7->Fill(jphi, ccc1);
6861  ccctest = 1.; //HEnegativedirectionDigiD7->SetBinError(i,0.01);
6862  }
6863  } // for jphi
6864  if (ccctest != 0.) {
6865  //cout<<"2020 kcountHEnegativedirectionDigiD7 = "<<kcountHEnegativedirectionDigiD7 <<" jeta-41= "<< jeta-41 <<endl;
6866  c3x5->cd(kcountHEnegativedirectionDigiD7);
6867  HEnegativedirectionDigiD7->SetMarkerStyle(20);
6868  HEnegativedirectionDigiD7->SetMarkerSize(0.4);
6869  HEnegativedirectionDigiD7->GetYaxis()->SetLabelSize(0.04);
6870  HEnegativedirectionDigiD7->SetXTitle("HEnegativedirectionDigiD7 \b");
6871  HEnegativedirectionDigiD7->SetMarkerColor(2);
6872  HEnegativedirectionDigiD7->SetLineColor(0);
6873  gPad->SetGridy();
6874  gPad->SetGridx();
6875  // gPad->SetLogy();
6876  if (kcountHEnegativedirectionDigiD7 == 1)
6877  HEnegativedirectionDigiD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
6878  if (kcountHEnegativedirectionDigiD7 == 2)
6879  HEnegativedirectionDigiD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
6880  if (kcountHEnegativedirectionDigiD7 == 3)
6881  HEnegativedirectionDigiD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
6882  HEnegativedirectionDigiD7->Draw("Error");
6883  kcountHEnegativedirectionDigiD7++;
6884  if (kcountHEnegativedirectionDigiD7 > 3)
6885  break; // 4x6 = 24
6886  } //ccctest>0
6887 
6888  } // for i
6889  } //if(jeta-41 < 0)
6890  } //for jeta
6892  c3x5->Update();
6893  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
6894  c3x5->Clear();
6895  // clean-up
6896  if (h2CeffHEnegativedirectionDigiD7)
6897  delete h2CeffHEnegativedirectionDigiD7;
6898  //===================================================================== END of Digi HE for phi-symmetry
6899  //===================================================================== END of Digi HE for phi-symmetry
6900  //===================================================================== END of Digi HE for phi-symmetry
6904  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
6905  //ndepth = k_max[5];
6906  ndepth = 4;
6907  double adigiHF[ndepth][njeta][njphi];
6908  double digivarianceHF[ndepth][njeta][njphi];
6909  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Digi HF
6910  TH2F* amplitudechannel1HF1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HF1");
6911  TH2F* amplitudechannel0HF1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HF1");
6912  TH2F* amplitudechannelHF1 = (TH2F*)amplitudechannel1HF1->Clone("amplitudechannelHF1");
6913  amplitudechannelHF1->Divide(amplitudechannel1HF1, amplitudechannel0HF1, 1, 1, "B");
6914  TH2F* amplitudechannel1HF2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HF2");
6915  TH2F* amplitudechannel0HF2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HF2");
6916  TH2F* amplitudechannelHF2 = (TH2F*)amplitudechannel1HF2->Clone("amplitudechannelHF2");
6917  amplitudechannelHF2->Divide(amplitudechannel1HF2, amplitudechannel0HF2, 1, 1, "B");
6918  TH2F* amplitudechannel1HF3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HF3");
6919  TH2F* amplitudechannel0HF3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HF3");
6920  TH2F* amplitudechannelHF3 = (TH2F*)amplitudechannel1HF3->Clone("amplitudechannelHF3");
6921  amplitudechannelHF3->Divide(amplitudechannel1HF3, amplitudechannel0HF3, 1, 1, "B");
6922  TH2F* amplitudechannel1HF4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel1_HF4");
6923  TH2F* amplitudechannel0HF4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HF4");
6924  TH2F* amplitudechannelHF4 = (TH2F*)amplitudechannel1HF4->Clone("amplitudechannelHF4");
6925  amplitudechannelHF4->Divide(amplitudechannel1HF4, amplitudechannel0HF4, 1, 1, "B");
6926  for (int jeta = 0; jeta < njeta; jeta++) {
6927  //====================================================================== PHI normalization & put R into massive adigiHF
6928  //preparation for PHI normalization:
6929  double sumdigiHF0 = 0;
6930  int nsumdigiHF0 = 0;
6931  double sumdigiHF1 = 0;
6932  int nsumdigiHF1 = 0;
6933  double sumdigiHF2 = 0;
6934  int nsumdigiHF2 = 0;
6935  double sumdigiHF3 = 0;
6936  int nsumdigiHF3 = 0;
6937  for (int jphi = 0; jphi < njphi; jphi++) {
6938  adigiHF[0][jeta][jphi] = amplitudechannelHF1->GetBinContent(jeta + 1, jphi + 1);
6939  adigiHF[1][jeta][jphi] = amplitudechannelHF2->GetBinContent(jeta + 1, jphi + 1);
6940  adigiHF[2][jeta][jphi] = amplitudechannelHF3->GetBinContent(jeta + 1, jphi + 1);
6941  adigiHF[3][jeta][jphi] = amplitudechannelHF4->GetBinContent(jeta + 1, jphi + 1);
6942  if (adigiHF[0][jeta][jphi] > 0.) {
6943  sumdigiHF0 += adigiHF[0][jeta][jphi];
6944  ++nsumdigiHF0;
6945  }
6946  if (adigiHF[1][jeta][jphi] > 0.) {
6947  sumdigiHF1 += adigiHF[1][jeta][jphi];
6948  ++nsumdigiHF1;
6949  }
6950  if (adigiHF[2][jeta][jphi] > 0.) {
6951  sumdigiHF2 += adigiHF[2][jeta][jphi];
6952  ++nsumdigiHF2;
6953  }
6954  if (adigiHF[3][jeta][jphi] > 0.) {
6955  sumdigiHF3 += adigiHF[3][jeta][jphi];
6956  ++nsumdigiHF3;
6957  }
6958  } // phi
6959  // PHI normalization:
6960  for (int jphi = 0; jphi < njphi; jphi++) {
6961  if (adigiHF[0][jeta][jphi] > 0.)
6962  adigiHF[0][jeta][jphi] /= (sumdigiHF0 / nsumdigiHF0);
6963  if (adigiHF[1][jeta][jphi] > 0.)
6964  adigiHF[1][jeta][jphi] /= (sumdigiHF1 / nsumdigiHF1);
6965  if (adigiHF[2][jeta][jphi] > 0.)
6966  adigiHF[2][jeta][jphi] /= (sumdigiHF2 / nsumdigiHF2);
6967  if (adigiHF[3][jeta][jphi] > 0.)
6968  adigiHF[3][jeta][jphi] /= (sumdigiHF3 / nsumdigiHF3);
6969  } // phi
6970  } //eta
6971  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
6972  //======================================================================
6973  //======================================================================
6974  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
6975  c1x0->Clear();
6977  c1x0->Divide(1, 1);
6978  c1x0->cd(1);
6979  TH2F* GefzRdigiHF42D = new TH2F("GefzRdigiHF42D", "", neta, -41., 41., nphi, 0., 72.);
6980  TH2F* GefzRdigiHF42D0 = new TH2F("GefzRdigiHF42D0", "", neta, -41., 41., nphi, 0., 72.);
6981  TH2F* GefzRdigiHF42DF = (TH2F*)GefzRdigiHF42D0->Clone("GefzRdigiHF42DF");
6982  for (int i = 0; i < ndepth; i++) {
6983  for (int jeta = 0; jeta < neta; jeta++) {
6984  for (int jphi = 0; jphi < nphi; jphi++) {
6985  double ccc1 = adigiHF[i][jeta][jphi];
6986  int k2plot = jeta - 41;
6987  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
6988  if (ccc1 != 0.) {
6989  GefzRdigiHF42D->Fill(kkk, jphi, ccc1);
6990  GefzRdigiHF42D0->Fill(kkk, jphi, 1.);
6991  }
6992  }
6993  }
6994  }
6995  GefzRdigiHF42DF->Divide(GefzRdigiHF42D, GefzRdigiHF42D0, 1, 1, "B"); // average A
6996  gPad->SetGridy();
6997  gPad->SetGridx(); // gPad->SetLogz();
6998  GefzRdigiHF42DF->SetMarkerStyle(20);
6999  GefzRdigiHF42DF->SetMarkerSize(0.4);
7000  GefzRdigiHF42DF->GetZaxis()->SetLabelSize(0.08);
7001  GefzRdigiHF42DF->SetXTitle("<R>_depth #eta \b");
7002  GefzRdigiHF42DF->SetYTitle(" #phi \b");
7003  GefzRdigiHF42DF->SetZTitle("<R>_depth \b");
7004  GefzRdigiHF42DF->SetMarkerColor(2);
7005  GefzRdigiHF42DF->SetLineColor(
7006  0); // GefzRdigiHF42DF->SetMaximum(1.000); // GefzRdigiHF42DF->SetMinimum(1.0);
7007  GefzRdigiHF42DF->Draw("COLZ");
7009  c1x0->Update();
7010  c1x0->Print("RdigiGeneralD2PhiSymmetryHF.png");
7011  c1x0->Clear();
7012  // clean-up
7013  if (GefzRdigiHF42D)
7014  delete GefzRdigiHF42D;
7015  if (GefzRdigiHF42D0)
7016  delete GefzRdigiHF42D0;
7017  if (GefzRdigiHF42DF)
7018  delete GefzRdigiHF42DF;
7019  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
7020  //======================================================================
7021  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
7022  c1x1->Clear();
7024  c1x1->Divide(1, 1);
7025  c1x1->cd(1);
7026  TH1F* GefzRdigiHF41D = new TH1F("GefzRdigiHF41D", "", nphi, 0., 72.);
7027  TH1F* GefzRdigiHF41D0 = new TH1F("GefzRdigiHF41D0", "", nphi, 0., 72.);
7028  TH1F* GefzRdigiHF41DF = (TH1F*)GefzRdigiHF41D0->Clone("GefzRdigiHF41DF");
7029  for (int jphi = 0; jphi < nphi; jphi++) {
7030  for (int jeta = 0; jeta < neta; jeta++) {
7031  for (int i = 0; i < ndepth; i++) {
7032  double ccc1 = adigiHF[i][jeta][jphi];
7033  if (ccc1 != 0.) {
7034  GefzRdigiHF41D->Fill(jphi, ccc1);
7035  GefzRdigiHF41D0->Fill(jphi, 1.);
7036  }
7037  }
7038  }
7039  }
7040  GefzRdigiHF41DF->Divide(GefzRdigiHF41D, GefzRdigiHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
7041  GefzRdigiHF41D0->Sumw2();
7042  // for (int jphi=1;jphi<73;jphi++) {GefzRdigiHF41DF->SetBinError(jphi,0.01);}
7043  gPad->SetGridy();
7044  gPad->SetGridx(); // gPad->SetLogz();
7045  GefzRdigiHF41DF->SetMarkerStyle(20);
7046  GefzRdigiHF41DF->SetMarkerSize(1.4);
7047  GefzRdigiHF41DF->GetZaxis()->SetLabelSize(0.08);
7048  GefzRdigiHF41DF->SetXTitle("#phi \b");
7049  GefzRdigiHF41DF->SetYTitle(" <R> \b");
7050  GefzRdigiHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
7051  GefzRdigiHF41DF->SetMarkerColor(4);
7052  GefzRdigiHF41DF->SetLineColor(
7053  4); // GefzRdigiHF41DF->SetMinimum(0.8); // GefzRdigiHF41DF->SetMaximum(1.000);
7054  GefzRdigiHF41DF->Draw("Error");
7056  c1x1->Update();
7057  c1x1->Print("RdigiGeneralD1PhiSymmetryHF.png");
7058  c1x1->Clear();
7059  // clean-up
7060  if (GefzRdigiHF41D)
7061  delete GefzRdigiHF41D;
7062  if (GefzRdigiHF41D0)
7063  delete GefzRdigiHF41D0;
7064  if (GefzRdigiHF41DF)
7065  delete GefzRdigiHF41DF;
7066  //========================================================================================== 4
7067  //======================================================================
7068  //======================================================================1D plot: R vs phi , different eta, depth=1
7069  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
7070  c3x5->Clear();
7072  c3x5->Divide(3, 5);
7073  c3x5->cd(1);
7074  int kcountHFpositivedirectionDigi1 = 1;
7075  TH1F* h2CeffHFpositivedirectionDigi1 = new TH1F("h2CeffHFpositivedirectionDigi1", "", nphi, 0., 72.);
7076  for (int jeta = 0; jeta < njeta; jeta++) {
7077  // positivedirectionDigi:
7078  if (jeta - 41 >= 0) {
7079  // for (int i=0;i<ndepth;i++) {
7080  // depth=1
7081  for (int i = 0; i < 1; i++) {
7082  TH1F* HFpositivedirectionDigi1 = (TH1F*)h2CeffHFpositivedirectionDigi1->Clone("twod1");
7083  float ccctest = 0; // to avoid empty massive elements
7084  for (int jphi = 0; jphi < nphi; jphi++) {
7085  double ccc1 = adigiHF[i][jeta][jphi];
7086  if (ccc1 != 0.) {
7087  HFpositivedirectionDigi1->Fill(jphi, ccc1);
7088  ccctest = 1.; //HFpositivedirectionDigi1->SetBinError(i,0.01);
7089  }
7090  } // for jphi
7091  if (ccctest > 0.) {
7092  // cout<<"444 kcountHFpositivedirectionDigi1 = "<<kcountHFpositivedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
7093  c3x5->cd(kcountHFpositivedirectionDigi1);
7094  HFpositivedirectionDigi1->SetMarkerStyle(20);
7095  HFpositivedirectionDigi1->SetMarkerSize(0.4);
7096  HFpositivedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
7097  HFpositivedirectionDigi1->SetXTitle("HFpositivedirectionDigi1 \b");
7098  HFpositivedirectionDigi1->SetMarkerColor(2);
7099  HFpositivedirectionDigi1->SetLineColor(0);
7100  gPad->SetGridy();
7101  gPad->SetGridx();
7102  // gPad->SetLogy();
7103  if (kcountHFpositivedirectionDigi1 == 1)
7104  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
7105  if (kcountHFpositivedirectionDigi1 == 2)
7106  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
7107  if (kcountHFpositivedirectionDigi1 == 3)
7108  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
7109  if (kcountHFpositivedirectionDigi1 == 4)
7110  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
7111  if (kcountHFpositivedirectionDigi1 == 5)
7112  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
7113  if (kcountHFpositivedirectionDigi1 == 6)
7114  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
7115  if (kcountHFpositivedirectionDigi1 == 7)
7116  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
7117  if (kcountHFpositivedirectionDigi1 == 8)
7118  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
7119  if (kcountHFpositivedirectionDigi1 == 9)
7120  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
7121  if (kcountHFpositivedirectionDigi1 == 10)
7122  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
7123  if (kcountHFpositivedirectionDigi1 == 11)
7124  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
7125  if (kcountHFpositivedirectionDigi1 == 12)
7126  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
7127  if (kcountHFpositivedirectionDigi1 == 13)
7128  HFpositivedirectionDigi1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
7129  HFpositivedirectionDigi1->Draw("Error");
7130  kcountHFpositivedirectionDigi1++;
7131  if (kcountHFpositivedirectionDigi1 > 13)
7132  break; //
7133  } //ccctest>0
7134 
7135  } // for i
7136  } //if(jeta-41 >= 0)
7137  } //for jeta
7139  c3x5->Update();
7140  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
7141  c3x5->Clear();
7142  // clean-up
7143  if (h2CeffHFpositivedirectionDigi1)
7144  delete h2CeffHFpositivedirectionDigi1;
7145 
7146  //========================================================================================== 5
7147  //======================================================================
7148  //======================================================================1D plot: R vs phi , different eta, depth=2
7149  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
7150  c3x5->Clear();
7152  c3x5->Divide(3, 5);
7153  c3x5->cd(1);
7154  int kcountHFpositivedirectionDigi2 = 1;
7155  TH1F* h2CeffHFpositivedirectionDigi2 = new TH1F("h2CeffHFpositivedirectionDigi2", "", nphi, 0., 72.);
7156  for (int jeta = 0; jeta < njeta; jeta++) {
7157  // positivedirectionDigi:
7158  if (jeta - 41 >= 0) {
7159  // for (int i=0;i<ndepth;i++) {
7160  // depth=2
7161  for (int i = 1; i < 2; i++) {
7162  TH1F* HFpositivedirectionDigi2 = (TH1F*)h2CeffHFpositivedirectionDigi2->Clone("twod1");
7163  float ccctest = 0; // to avoid empty massive elements
7164  for (int jphi = 0; jphi < nphi; jphi++) {
7165  double ccc1 = adigiHF[i][jeta][jphi];
7166  if (ccc1 != 0.) {
7167  HFpositivedirectionDigi2->Fill(jphi, ccc1);
7168  ccctest = 1.; //HFpositivedirectionDigi2->SetBinError(i,0.01);
7169  }
7170  } // for jphi
7171  if (ccctest > 0.) {
7172  //cout<<"555 kcountHFpositivedirectionDigi2 = "<<kcountHFpositivedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
7173  c3x5->cd(kcountHFpositivedirectionDigi2);
7174  HFpositivedirectionDigi2->SetMarkerStyle(20);
7175  HFpositivedirectionDigi2->SetMarkerSize(0.4);
7176  HFpositivedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
7177  HFpositivedirectionDigi2->SetXTitle("HFpositivedirectionDigi2 \b");
7178  HFpositivedirectionDigi2->SetMarkerColor(2);
7179  HFpositivedirectionDigi2->SetLineColor(0);
7180  gPad->SetGridy();
7181  gPad->SetGridx();
7182  // gPad->SetLogy();
7183  if (kcountHFpositivedirectionDigi2 == 1)
7184  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
7185  if (kcountHFpositivedirectionDigi2 == 2)
7186  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
7187  if (kcountHFpositivedirectionDigi2 == 3)
7188  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
7189  if (kcountHFpositivedirectionDigi2 == 4)
7190  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
7191  if (kcountHFpositivedirectionDigi2 == 5)
7192  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
7193  if (kcountHFpositivedirectionDigi2 == 6)
7194  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
7195  if (kcountHFpositivedirectionDigi2 == 7)
7196  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
7197  if (kcountHFpositivedirectionDigi2 == 8)
7198  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
7199  if (kcountHFpositivedirectionDigi2 == 9)
7200  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
7201  if (kcountHFpositivedirectionDigi2 == 10)
7202  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
7203  if (kcountHFpositivedirectionDigi2 == 11)
7204  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
7205  if (kcountHFpositivedirectionDigi2 == 12)
7206  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
7207  if (kcountHFpositivedirectionDigi2 == 13)
7208  HFpositivedirectionDigi2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
7209  HFpositivedirectionDigi2->Draw("Error");
7210  kcountHFpositivedirectionDigi2++;
7211  if (kcountHFpositivedirectionDigi2 > 13)
7212  break; // 4x6 = 24
7213  } //ccctest>0
7214 
7215  } // for i
7216  } //if(jeta-41 >= 0)
7217  } //for jeta
7219  c3x5->Update();
7220  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
7221  c3x5->Clear();
7222  // clean-up
7223  if (h2CeffHFpositivedirectionDigi2)
7224  delete h2CeffHFpositivedirectionDigi2;
7225  //========================================================================================== 6
7226  //======================================================================
7227  //======================================================================1D plot: R vs phi , different eta, depth=3
7228  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
7229  c3x5->Clear();
7231  c3x5->Divide(3, 5);
7232  c3x5->cd(1);
7233  int kcountHFpositivedirectionDigi3 = 1;
7234  TH1F* h2CeffHFpositivedirectionDigi3 = new TH1F("h2CeffHFpositivedirectionDigi3", "", nphi, 0., 72.);
7235  for (int jeta = 0; jeta < njeta; jeta++) {
7236  // positivedirectionDigi:
7237  if (jeta - 41 >= 0) {
7238  // for (int i=0;i<ndepth;i++) {
7239  // depth=3
7240  for (int i = 2; i < 3; i++) {
7241  TH1F* HFpositivedirectionDigi3 = (TH1F*)h2CeffHFpositivedirectionDigi3->Clone("twod1");
7242  float ccctest = 0; // to avoid empty massive elements
7243  for (int jphi = 0; jphi < nphi; jphi++) {
7244  double ccc1 = adigiHF[i][jeta][jphi];
7245  if (ccc1 != 0.) {
7246  HFpositivedirectionDigi3->Fill(jphi, ccc1);
7247  ccctest = 1.; //HFpositivedirectionDigi3->SetBinError(i,0.01);
7248  }
7249  } // for jphi
7250  if (ccctest > 0.) {
7251  //cout<<"666 kcountHFpositivedirectionDigi3 = "<<kcountHFpositivedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
7252  c3x5->cd(kcountHFpositivedirectionDigi3);
7253  HFpositivedirectionDigi3->SetMarkerStyle(20);
7254  HFpositivedirectionDigi3->SetMarkerSize(0.4);
7255  HFpositivedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
7256  HFpositivedirectionDigi3->SetXTitle("HFpositivedirectionDigi3 \b");
7257  HFpositivedirectionDigi3->SetMarkerColor(2);
7258  HFpositivedirectionDigi3->SetLineColor(0);
7259  gPad->SetGridy();
7260  gPad->SetGridx();
7261  // gPad->SetLogy();
7262  if (kcountHFpositivedirectionDigi3 == 1)
7263  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 28; depth = 3 \b");
7264  if (kcountHFpositivedirectionDigi3 == 2)
7265  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 29; depth = 3 \b");
7266  if (kcountHFpositivedirectionDigi3 == 3)
7267  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 30; depth = 3 \b");
7268  if (kcountHFpositivedirectionDigi3 == 4)
7269  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 31; depth = 3 \b");
7270  if (kcountHFpositivedirectionDigi3 == 5)
7271  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 32; depth = 3 \b");
7272  if (kcountHFpositivedirectionDigi3 == 6)
7273  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 33; depth = 3 \b");
7274  if (kcountHFpositivedirectionDigi3 == 7)
7275  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 34; depth = 3 \b");
7276  if (kcountHFpositivedirectionDigi3 == 8)
7277  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 35; depth = 3 \b");
7278  if (kcountHFpositivedirectionDigi3 == 9)
7279  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 36; depth = 3 \b");
7280  if (kcountHFpositivedirectionDigi3 == 10)
7281  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 37; depth = 3 \b");
7282  if (kcountHFpositivedirectionDigi3 == 11)
7283  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 38; depth = 3 \b");
7284  if (kcountHFpositivedirectionDigi3 == 12)
7285  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 39; depth = 3 \b");
7286  if (kcountHFpositivedirectionDigi3 == 13)
7287  HFpositivedirectionDigi3->SetXTitle("R for HF+ jeta = 40; depth = 3 \b");
7288  HFpositivedirectionDigi3->Draw("Error");
7289  kcountHFpositivedirectionDigi3++;
7290  if (kcountHFpositivedirectionDigi3 > 13)
7291  break; // 4x6 = 24
7292  } //ccctest>0
7293 
7294  } // for i
7295  } //if(jeta-41 >= 0)
7296  } //for jeta
7298  c3x5->Update();
7299  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png");
7300  c3x5->Clear();
7301  // clean-up
7302  if (h2CeffHFpositivedirectionDigi3)
7303  delete h2CeffHFpositivedirectionDigi3;
7304  //========================================================================================== 7
7305  //======================================================================
7306  //======================================================================1D plot: R vs phi , different eta, depth=4
7307  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
7308  c3x5->Clear();
7310  c3x5->Divide(3, 5);
7311  c3x5->cd(1);
7312  int kcountHFpositivedirectionDigi4 = 1;
7313  TH1F* h2CeffHFpositivedirectionDigi4 = new TH1F("h2CeffHFpositivedirectionDigi4", "", nphi, 0., 72.);
7314 
7315  for (int jeta = 0; jeta < njeta; jeta++) {
7316  // positivedirectionDigi:
7317  if (jeta - 41 >= 0) {
7318  // for (int i=0;i<ndepth;i++) {
7319  // depth=4
7320  for (int i = 3; i < 4; i++) {
7321  TH1F* HFpositivedirectionDigi4 = (TH1F*)h2CeffHFpositivedirectionDigi4->Clone("twod1");
7322 
7323  float ccctest = 0; // to avoid empty massive elements
7324  for (int jphi = 0; jphi < nphi; jphi++) {
7325  double ccc1 = adigiHF[i][jeta][jphi];
7326  if (ccc1 != 0.) {
7327  HFpositivedirectionDigi4->Fill(jphi, ccc1);
7328  ccctest = 1.; //HFpositivedirectionDigi4->SetBinError(i,0.01);
7329  }
7330  } // for jphi
7331  if (ccctest > 0.) {
7332  //cout<<"777 kcountHFpositivedirectionDigi4 = "<<kcountHFpositivedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
7333  c3x5->cd(kcountHFpositivedirectionDigi4);
7334  HFpositivedirectionDigi4->SetMarkerStyle(20);
7335  HFpositivedirectionDigi4->SetMarkerSize(0.4);
7336  HFpositivedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
7337  HFpositivedirectionDigi4->SetXTitle("HFpositivedirectionDigi4 \b");
7338  HFpositivedirectionDigi4->SetMarkerColor(2);
7339  HFpositivedirectionDigi4->SetLineColor(0);
7340  gPad->SetGridy();
7341  gPad->SetGridx();
7342  // gPad->SetLogy();
7343  if (kcountHFpositivedirectionDigi4 == 1)
7344  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 28; depth = 4 \b");
7345  if (kcountHFpositivedirectionDigi4 == 2)
7346  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 29; depth = 4 \b");
7347  if (kcountHFpositivedirectionDigi4 == 3)
7348  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 30; depth = 4 \b");
7349  if (kcountHFpositivedirectionDigi4 == 4)
7350  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 31; depth = 4 \b");
7351  if (kcountHFpositivedirectionDigi4 == 5)
7352  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 32; depth = 4 \b");
7353  if (kcountHFpositivedirectionDigi4 == 6)
7354  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 33; depth = 4 \b");
7355  if (kcountHFpositivedirectionDigi4 == 7)
7356  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 34; depth = 4 \b");
7357  if (kcountHFpositivedirectionDigi4 == 8)
7358  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 35; depth = 4 \b");
7359  if (kcountHFpositivedirectionDigi4 == 9)
7360  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 36; depth = 4 \b");
7361  if (kcountHFpositivedirectionDigi4 == 10)
7362  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 37; depth = 4 \b");
7363  if (kcountHFpositivedirectionDigi4 == 11)
7364  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 38; depth = 4 \b");
7365  if (kcountHFpositivedirectionDigi4 == 12)
7366  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 39; depth = 4 \b");
7367  if (kcountHFpositivedirectionDigi4 == 13)
7368  HFpositivedirectionDigi4->SetXTitle("R for HF+ jeta = 40; depth = 4 \b");
7369  HFpositivedirectionDigi4->Draw("Error");
7370  kcountHFpositivedirectionDigi4++;
7371  if (kcountHFpositivedirectionDigi4 > 13)
7372  break; // 4x6 = 24
7373  } //ccctest>0
7374 
7375  } // for i
7376  } //if(jeta-41 >= 0)
7377  } //for jeta
7379  c3x5->Update();
7380  c3x5->Print("RdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png");
7381  c3x5->Clear();
7382  // clean-up
7383  if (h2CeffHFpositivedirectionDigi4)
7384  delete h2CeffHFpositivedirectionDigi4;
7385 
7386  //========================================================================================== 1111114
7387  //======================================================================
7388  //======================================================================1D plot: R vs phi , different eta, depth=1
7389  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
7390  c3x5->Clear();
7392  c3x5->Divide(3, 5);
7393  c3x5->cd(1);
7394  int kcountHFnegativedirectionDigi1 = 1;
7395  TH1F* h2CeffHFnegativedirectionDigi1 = new TH1F("h2CeffHFnegativedirectionDigi1", "", nphi, 0., 72.);
7396  for (int jeta = 0; jeta < njeta; jeta++) {
7397  // negativedirectionDigi:
7398  if (jeta - 41 < 0) {
7399  // for (int i=0;i<ndepth;i++) {
7400  // depth=1
7401  for (int i = 0; i < 1; i++) {
7402  TH1F* HFnegativedirectionDigi1 = (TH1F*)h2CeffHFnegativedirectionDigi1->Clone("twod1");
7403  float ccctest = 0; // to avoid empty massive elements
7404  for (int jphi = 0; jphi < nphi; jphi++) {
7405  double ccc1 = adigiHF[i][jeta][jphi];
7406  if (ccc1 != 0.) {
7407  HFnegativedirectionDigi1->Fill(jphi, ccc1);
7408  ccctest = 1.; //HFnegativedirectionDigi1->SetBinError(i,0.01);
7409  }
7410  } // for jphi
7411  if (ccctest > 0.) {
7412  // cout<<"444 kcountHFnegativedirectionDigi1 = "<<kcountHFnegativedirectionDigi1 <<" jeta-41= "<< jeta-41 <<endl;
7413  c3x5->cd(kcountHFnegativedirectionDigi1);
7414  HFnegativedirectionDigi1->SetMarkerStyle(20);
7415  HFnegativedirectionDigi1->SetMarkerSize(0.4);
7416  HFnegativedirectionDigi1->GetYaxis()->SetLabelSize(0.04);
7417  HFnegativedirectionDigi1->SetXTitle("HFnegativedirectionDigi1 \b");
7418  HFnegativedirectionDigi1->SetMarkerColor(2);
7419  HFnegativedirectionDigi1->SetLineColor(0);
7420  gPad->SetGridy();
7421  gPad->SetGridx();
7422  // gPad->SetLogy();
7423  if (kcountHFnegativedirectionDigi1 == 1)
7424  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
7425  if (kcountHFnegativedirectionDigi1 == 2)
7426  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
7427  if (kcountHFnegativedirectionDigi1 == 3)
7428  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
7429  if (kcountHFnegativedirectionDigi1 == 4)
7430  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
7431  if (kcountHFnegativedirectionDigi1 == 5)
7432  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
7433  if (kcountHFnegativedirectionDigi1 == 6)
7434  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
7435  if (kcountHFnegativedirectionDigi1 == 7)
7436  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
7437  if (kcountHFnegativedirectionDigi1 == 8)
7438  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
7439  if (kcountHFnegativedirectionDigi1 == 9)
7440  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
7441  if (kcountHFnegativedirectionDigi1 == 10)
7442  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
7443  if (kcountHFnegativedirectionDigi1 == 11)
7444  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
7445  if (kcountHFnegativedirectionDigi1 == 12)
7446  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
7447  if (kcountHFnegativedirectionDigi1 == 13)
7448  HFnegativedirectionDigi1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
7449  HFnegativedirectionDigi1->Draw("Error");
7450  kcountHFnegativedirectionDigi1++;
7451  if (kcountHFnegativedirectionDigi1 > 13)
7452  break; //
7453  } //ccctest>0
7454 
7455  } // for i
7456  } //if(jeta-41< 0)
7457  } //for jeta
7459  c3x5->Update();
7460  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
7461  c3x5->Clear();
7462  // clean-up
7463  if (h2CeffHFnegativedirectionDigi1)
7464  delete h2CeffHFnegativedirectionDigi1;
7465 
7466  //========================================================================================== 1111115
7467  //======================================================================
7468  //======================================================================1D plot: R vs phi , different eta, depth=2
7469  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
7470  c3x5->Clear();
7472  c3x5->Divide(3, 5);
7473  c3x5->cd(1);
7474  int kcountHFnegativedirectionDigi2 = 1;
7475  TH1F* h2CeffHFnegativedirectionDigi2 = new TH1F("h2CeffHFnegativedirectionDigi2", "", nphi, 0., 72.);
7476  for (int jeta = 0; jeta < njeta; jeta++) {
7477  // negativedirectionDigi:
7478  if (jeta - 41 < 0) {
7479  // for (int i=0;i<ndepth;i++) {
7480  // depth=2
7481  for (int i = 1; i < 2; i++) {
7482  TH1F* HFnegativedirectionDigi2 = (TH1F*)h2CeffHFnegativedirectionDigi2->Clone("twod1");
7483  float ccctest = 0; // to avoid empty massive elements
7484  for (int jphi = 0; jphi < nphi; jphi++) {
7485  double ccc1 = adigiHF[i][jeta][jphi];
7486  if (ccc1 != 0.) {
7487  HFnegativedirectionDigi2->Fill(jphi, ccc1);
7488  ccctest = 1.; //HFnegativedirectionDigi2->SetBinError(i,0.01);
7489  }
7490  } // for jphi
7491  if (ccctest > 0.) {
7492  //cout<<"555 kcountHFnegativedirectionDigi2 = "<<kcountHFnegativedirectionDigi2 <<" jeta-41= "<< jeta-41 <<endl;
7493  c3x5->cd(kcountHFnegativedirectionDigi2);
7494  HFnegativedirectionDigi2->SetMarkerStyle(20);
7495  HFnegativedirectionDigi2->SetMarkerSize(0.4);
7496  HFnegativedirectionDigi2->GetYaxis()->SetLabelSize(0.04);
7497  HFnegativedirectionDigi2->SetXTitle("HFnegativedirectionDigi2 \b");
7498  HFnegativedirectionDigi2->SetMarkerColor(2);
7499  HFnegativedirectionDigi2->SetLineColor(0);
7500  gPad->SetGridy();
7501  gPad->SetGridx();
7502  // gPad->SetLogy();
7503  if (kcountHFnegativedirectionDigi2 == 1)
7504  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
7505  if (kcountHFnegativedirectionDigi2 == 2)
7506  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
7507  if (kcountHFnegativedirectionDigi2 == 3)
7508  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
7509  if (kcountHFnegativedirectionDigi2 == 4)
7510  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
7511  if (kcountHFnegativedirectionDigi2 == 5)
7512  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
7513  if (kcountHFnegativedirectionDigi2 == 6)
7514  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
7515  if (kcountHFnegativedirectionDigi2 == 7)
7516  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
7517  if (kcountHFnegativedirectionDigi2 == 8)
7518  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
7519  if (kcountHFnegativedirectionDigi2 == 9)
7520  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
7521  if (kcountHFnegativedirectionDigi2 == 10)
7522  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
7523  if (kcountHFnegativedirectionDigi2 == 11)
7524  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
7525  if (kcountHFnegativedirectionDigi2 == 12)
7526  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
7527  if (kcountHFnegativedirectionDigi2 == 13)
7528  HFnegativedirectionDigi2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
7529  HFnegativedirectionDigi2->Draw("Error");
7530  kcountHFnegativedirectionDigi2++;
7531  if (kcountHFnegativedirectionDigi2 > 13)
7532  break; // 4x6 = 24
7533  } //ccctest>0
7534 
7535  } // for i
7536  } //if(jeta-41< 0)
7537  } //for jeta
7539  c3x5->Update();
7540  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
7541  c3x5->Clear();
7542  // clean-up
7543  if (h2CeffHFnegativedirectionDigi2)
7544  delete h2CeffHFnegativedirectionDigi2;
7545  //========================================================================================== 1111116
7546  //======================================================================
7547  //======================================================================1D plot: R vs phi , different eta, depth=3
7548  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
7549  c3x5->Clear();
7551  c3x5->Divide(3, 5);
7552  c3x5->cd(1);
7553  int kcountHFnegativedirectionDigi3 = 1;
7554  TH1F* h2CeffHFnegativedirectionDigi3 = new TH1F("h2CeffHFnegativedirectionDigi3", "", nphi, 0., 72.);
7555  for (int jeta = 0; jeta < njeta; jeta++) {
7556  // negativedirectionDigi:
7557  if (jeta - 41 < 0) {
7558  // for (int i=0;i<ndepth;i++) {
7559  // depth=3
7560  for (int i = 2; i < 3; i++) {
7561  TH1F* HFnegativedirectionDigi3 = (TH1F*)h2CeffHFnegativedirectionDigi3->Clone("twod1");
7562  float ccctest = 0; // to avoid empty massive elements
7563  for (int jphi = 0; jphi < nphi; jphi++) {
7564  double ccc1 = adigiHF[i][jeta][jphi];
7565  if (ccc1 != 0.) {
7566  HFnegativedirectionDigi3->Fill(jphi, ccc1);
7567  ccctest = 1.; //HFnegativedirectionDigi3->SetBinError(i,0.01);
7568  }
7569  } // for jphi
7570  if (ccctest > 0.) {
7571  //cout<<"666 kcountHFnegativedirectionDigi3 = "<<kcountHFnegativedirectionDigi3 <<" jeta-41= "<< jeta-41 <<endl;
7572  c3x5->cd(kcountHFnegativedirectionDigi3);
7573  HFnegativedirectionDigi3->SetMarkerStyle(20);
7574  HFnegativedirectionDigi3->SetMarkerSize(0.4);
7575  HFnegativedirectionDigi3->GetYaxis()->SetLabelSize(0.04);
7576  HFnegativedirectionDigi3->SetXTitle("HFnegativedirectionDigi3 \b");
7577  HFnegativedirectionDigi3->SetMarkerColor(2);
7578  HFnegativedirectionDigi3->SetLineColor(0);
7579  gPad->SetGridy();
7580  gPad->SetGridx();
7581  // gPad->SetLogy();
7582  if (kcountHFnegativedirectionDigi3 == 1)
7583  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-41; depth = 3 \b");
7584  if (kcountHFnegativedirectionDigi3 == 2)
7585  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-40; depth = 3 \b");
7586  if (kcountHFnegativedirectionDigi3 == 3)
7587  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-39; depth = 3 \b");
7588  if (kcountHFnegativedirectionDigi3 == 4)
7589  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-38; depth = 3 \b");
7590  if (kcountHFnegativedirectionDigi3 == 5)
7591  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-37; depth = 3 \b");
7592  if (kcountHFnegativedirectionDigi3 == 6)
7593  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-36; depth = 3 \b");
7594  if (kcountHFnegativedirectionDigi3 == 7)
7595  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-35; depth = 3 \b");
7596  if (kcountHFnegativedirectionDigi3 == 8)
7597  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-34; depth = 3 \b");
7598  if (kcountHFnegativedirectionDigi3 == 9)
7599  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-33; depth = 3 \b");
7600  if (kcountHFnegativedirectionDigi3 == 10)
7601  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-32; depth = 3 \b");
7602  if (kcountHFnegativedirectionDigi3 == 11)
7603  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-31; depth = 3 \b");
7604  if (kcountHFnegativedirectionDigi3 == 12)
7605  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-30; depth = 3 \b");
7606  if (kcountHFnegativedirectionDigi3 == 13)
7607  HFnegativedirectionDigi3->SetXTitle("R for HF- jeta =-29; depth = 3 \b");
7608  HFnegativedirectionDigi3->Draw("Error");
7609  kcountHFnegativedirectionDigi3++;
7610  if (kcountHFnegativedirectionDigi3 > 13)
7611  break; // 4x6 = 24
7612  } //ccctest>0
7613 
7614  } // for i
7615  } //if(jeta-41< 0)
7616  } //for jeta
7618  c3x5->Update();
7619  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png");
7620  c3x5->Clear();
7621  // clean-up
7622  if (h2CeffHFnegativedirectionDigi3)
7623  delete h2CeffHFnegativedirectionDigi3;
7624  //========================================================================================== 1111117
7625  //======================================================================
7626  //======================================================================1D plot: R vs phi , different eta, depth=4
7627  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
7628  c3x5->Clear();
7630  c3x5->Divide(3, 5);
7631  c3x5->cd(1);
7632  int kcountHFnegativedirectionDigi4 = 1;
7633  TH1F* h2CeffHFnegativedirectionDigi4 = new TH1F("h2CeffHFnegativedirectionDigi4", "", nphi, 0., 72.);
7634 
7635  for (int jeta = 0; jeta < njeta; jeta++) {
7636  // negativedirectionDigi:
7637  if (jeta - 41 < 0) {
7638  // for (int i=0;i<ndepth;i++) {
7639  // depth=4
7640  for (int i = 3; i < 4; i++) {
7641  TH1F* HFnegativedirectionDigi4 = (TH1F*)h2CeffHFnegativedirectionDigi4->Clone("twod1");
7642 
7643  float ccctest = 0; // to avoid empty massive elements
7644  for (int jphi = 0; jphi < nphi; jphi++) {
7645  double ccc1 = adigiHF[i][jeta][jphi];
7646  if (ccc1 != 0.) {
7647  HFnegativedirectionDigi4->Fill(jphi, ccc1);
7648  ccctest = 1.; //HFnegativedirectionDigi4->SetBinError(i,0.01);
7649  }
7650  } // for jphi
7651  if (ccctest > 0.) {
7652  //cout<<"777 kcountHFnegativedirectionDigi4 = "<<kcountHFnegativedirectionDigi4 <<" jeta-41= "<< jeta-41 <<endl;
7653  c3x5->cd(kcountHFnegativedirectionDigi4);
7654  HFnegativedirectionDigi4->SetMarkerStyle(20);
7655  HFnegativedirectionDigi4->SetMarkerSize(0.4);
7656  HFnegativedirectionDigi4->GetYaxis()->SetLabelSize(0.04);
7657  HFnegativedirectionDigi4->SetXTitle("HFnegativedirectionDigi4 \b");
7658  HFnegativedirectionDigi4->SetMarkerColor(2);
7659  HFnegativedirectionDigi4->SetLineColor(0);
7660  gPad->SetGridy();
7661  gPad->SetGridx();
7662  // gPad->SetLogy();
7663  if (kcountHFnegativedirectionDigi4 == 1)
7664  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-41; depth = 4 \b");
7665  if (kcountHFnegativedirectionDigi4 == 2)
7666  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-40; depth = 4 \b");
7667  if (kcountHFnegativedirectionDigi4 == 3)
7668  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-39; depth = 4 \b");
7669  if (kcountHFnegativedirectionDigi4 == 4)
7670  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-38; depth = 4 \b");
7671  if (kcountHFnegativedirectionDigi4 == 5)
7672  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-37; depth = 4 \b");
7673  if (kcountHFnegativedirectionDigi4 == 6)
7674  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-36; depth = 4 \b");
7675  if (kcountHFnegativedirectionDigi4 == 7)
7676  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-35; depth = 4 \b");
7677  if (kcountHFnegativedirectionDigi4 == 8)
7678  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-34; depth = 4 \b");
7679  if (kcountHFnegativedirectionDigi4 == 9)
7680  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-33; depth = 4 \b");
7681  if (kcountHFnegativedirectionDigi4 == 10)
7682  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-32; depth = 4 \b");
7683  if (kcountHFnegativedirectionDigi4 == 11)
7684  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-31; depth = 4 \b");
7685  if (kcountHFnegativedirectionDigi4 == 12)
7686  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-30; depth = 4 \b");
7687  if (kcountHFnegativedirectionDigi4 == 13)
7688  HFnegativedirectionDigi4->SetXTitle("R for HF- jeta =-29; depth = 4 \b");
7689  HFnegativedirectionDigi4->Draw("Error");
7690  kcountHFnegativedirectionDigi4++;
7691  if (kcountHFnegativedirectionDigi4 > 13)
7692  break; // 4x6 = 24
7693  } //ccctest>0
7694 
7695  } // for i
7696  } //if(jeta-41< 0)
7697  } //for jeta
7699  c3x5->Update();
7700  c3x5->Print("RdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png");
7701  c3x5->Clear();
7702  // clean-up
7703  if (h2CeffHFnegativedirectionDigi4)
7704  delete h2CeffHFnegativedirectionDigi4;
7705 
7706  //======================================================================================================================
7707  //======================================================================================================================
7708  //======================================================================================================================
7709  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
7710 
7711  //cout<<" Start Vaiance: preparation *****" <<endl;
7712  TH2F* digiVariance1HF1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HF1");
7713  TH2F* digiVariance0HF1 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HF1");
7714  TH2F* digiVarianceHF1 = (TH2F*)digiVariance1HF1->Clone("digiVarianceHF1");
7715  digiVarianceHF1->Divide(digiVariance1HF1, digiVariance0HF1, 1, 1, "B");
7716  TH2F* digiVariance1HF2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HF2");
7717  TH2F* digiVariance0HF2 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HF2");
7718  TH2F* digiVarianceHF2 = (TH2F*)digiVariance1HF2->Clone("digiVarianceHF2");
7719  digiVarianceHF2->Divide(digiVariance1HF2, digiVariance0HF2, 1, 1, "B");
7720  TH2F* digiVariance1HF3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HF3");
7721  TH2F* digiVariance0HF3 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HF3");
7722  TH2F* digiVarianceHF3 = (TH2F*)digiVariance1HF3->Clone("digiVarianceHF3");
7723  digiVarianceHF3->Divide(digiVariance1HF3, digiVariance0HF3, 1, 1, "B");
7724  TH2F* digiVariance1HF4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel2_HF4");
7725  TH2F* digiVariance0HF4 = (TH2F*)dir->FindObjectAny("h_amplitudechannel0_HF4");
7726  TH2F* digiVarianceHF4 = (TH2F*)digiVariance1HF4->Clone("digiVarianceHF4");
7727  digiVarianceHF4->Divide(digiVariance1HF4, digiVariance0HF4, 1, 1, "B");
7728  //cout<<" Vaiance: preparation DONE *****" <<endl;
7729  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive digivarianceHF
7730  // = sum(R*R)/N - (sum(R)/N)**2
7731  for (int jeta = 0; jeta < njeta; jeta++) {
7732  //preparation for PHI normalization:
7733  double sumdigiHF0 = 0;
7734  int nsumdigiHF0 = 0;
7735  double sumdigiHF1 = 0;
7736  int nsumdigiHF1 = 0;
7737  double sumdigiHF2 = 0;
7738  int nsumdigiHF2 = 0;
7739  double sumdigiHF3 = 0;
7740  int nsumdigiHF3 = 0;
7741  for (int jphi = 0; jphi < njphi; jphi++) {
7742  digivarianceHF[0][jeta][jphi] = digiVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
7743  digivarianceHF[1][jeta][jphi] = digiVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
7744  digivarianceHF[2][jeta][jphi] = digiVarianceHF3->GetBinContent(jeta + 1, jphi + 1);
7745  digivarianceHF[3][jeta][jphi] = digiVarianceHF4->GetBinContent(jeta + 1, jphi + 1);
7746  if (digivarianceHF[0][jeta][jphi] > 0.) {
7747  sumdigiHF0 += digivarianceHF[0][jeta][jphi];
7748  ++nsumdigiHF0;
7749  }
7750  if (digivarianceHF[1][jeta][jphi] > 0.) {
7751  sumdigiHF1 += digivarianceHF[1][jeta][jphi];
7752  ++nsumdigiHF1;
7753  }
7754  if (digivarianceHF[2][jeta][jphi] > 0.) {
7755  sumdigiHF2 += digivarianceHF[2][jeta][jphi];
7756  ++nsumdigiHF2;
7757  }
7758  if (digivarianceHF[3][jeta][jphi] > 0.) {
7759  sumdigiHF3 += digivarianceHF[3][jeta][jphi];
7760  ++nsumdigiHF3;
7761  }
7762  } // phi
7763  // PHI normalization :
7764  for (int jphi = 0; jphi < njphi; jphi++) {
7765  if (digivarianceHF[0][jeta][jphi] > 0.)
7766  digivarianceHF[0][jeta][jphi] /= (sumdigiHF0 / nsumdigiHF0);
7767  if (digivarianceHF[1][jeta][jphi] > 0.)
7768  digivarianceHF[1][jeta][jphi] /= (sumdigiHF1 / nsumdigiHF1);
7769  if (digivarianceHF[2][jeta][jphi] > 0.)
7770  digivarianceHF[2][jeta][jphi] /= (sumdigiHF2 / nsumdigiHF2);
7771  if (digivarianceHF[3][jeta][jphi] > 0.)
7772  digivarianceHF[3][jeta][jphi] /= (sumdigiHF3 / nsumdigiHF3);
7773  } // phi
7774  // digivarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
7775  for (int jphi = 0; jphi < njphi; jphi++) {
7776  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
7777  digivarianceHF[0][jeta][jphi] -= adigiHF[0][jeta][jphi] * adigiHF[0][jeta][jphi];
7778  digivarianceHF[0][jeta][jphi] = fabs(digivarianceHF[0][jeta][jphi]);
7779  digivarianceHF[1][jeta][jphi] -= adigiHF[1][jeta][jphi] * adigiHF[1][jeta][jphi];
7780  digivarianceHF[1][jeta][jphi] = fabs(digivarianceHF[1][jeta][jphi]);
7781  digivarianceHF[2][jeta][jphi] -= adigiHF[2][jeta][jphi] * adigiHF[2][jeta][jphi];
7782  digivarianceHF[2][jeta][jphi] = fabs(digivarianceHF[2][jeta][jphi]);
7783  digivarianceHF[3][jeta][jphi] -= adigiHF[3][jeta][jphi] * adigiHF[3][jeta][jphi];
7784  digivarianceHF[3][jeta][jphi] = fabs(digivarianceHF[3][jeta][jphi]);
7785  }
7786  }
7787  //cout<<" Vaiance: DONE*****" <<endl;
7788  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
7789  //======================================================================
7790  //======================================================================
7791  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
7792  c1x1->Clear();
7794  c1x0->Divide(1, 1);
7795  c1x0->cd(1);
7796  TH2F* DefzDdigiHF42D = new TH2F("DefzDdigiHF42D", "", neta, -41., 41., nphi, 0., 72.);
7797  TH2F* DefzDdigiHF42D0 = new TH2F("DefzDdigiHF42D0", "", neta, -41., 41., nphi, 0., 72.);
7798  TH2F* DefzDdigiHF42DF = (TH2F*)DefzDdigiHF42D0->Clone("DefzDdigiHF42DF");
7799  for (int i = 0; i < ndepth; i++) {
7800  for (int jeta = 0; jeta < neta; jeta++) {
7801  for (int jphi = 0; jphi < nphi; jphi++) {
7802  double ccc1 = digivarianceHF[i][jeta][jphi];
7803  int k2plot = jeta - 41;
7804  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
7805  if (adigiHF[i][jeta][jphi] > 0.) {
7806  DefzDdigiHF42D->Fill(kkk, jphi, ccc1);
7807  DefzDdigiHF42D0->Fill(kkk, jphi, 1.);
7808  }
7809  }
7810  }
7811  }
7812  DefzDdigiHF42DF->Divide(DefzDdigiHF42D, DefzDdigiHF42D0, 1, 1, "B"); // average A
7813  // DefzDdigiHF1->Sumw2();
7814  gPad->SetGridy();
7815  gPad->SetGridx(); // gPad->SetLogz();
7816  DefzDdigiHF42DF->SetMarkerStyle(20);
7817  DefzDdigiHF42DF->SetMarkerSize(0.4);
7818  DefzDdigiHF42DF->GetZaxis()->SetLabelSize(0.08);
7819  DefzDdigiHF42DF->SetXTitle("<D>_depth #eta \b");
7820  DefzDdigiHF42DF->SetYTitle(" #phi \b");
7821  DefzDdigiHF42DF->SetZTitle("<D>_depth \b");
7822  DefzDdigiHF42DF->SetMarkerColor(2);
7823  DefzDdigiHF42DF->SetLineColor(
7824  0); // DefzDdigiHF42DF->SetMaximum(1.000); // DefzDdigiHF42DF->SetMinimum(1.0);
7825  DefzDdigiHF42DF->Draw("COLZ");
7827  c1x0->Update();
7828  c1x0->Print("DdigiGeneralD2PhiSymmetryHF.png");
7829  c1x0->Clear();
7830  // clean-up
7831  if (DefzDdigiHF42D)
7832  delete DefzDdigiHF42D;
7833  if (DefzDdigiHF42D0)
7834  delete DefzDdigiHF42D0;
7835  if (DefzDdigiHF42DF)
7836  delete DefzDdigiHF42DF;
7837  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
7838  //======================================================================
7839  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
7840  c1x1->Clear();
7842  c1x1->Divide(1, 1);
7843  c1x1->cd(1);
7844  TH1F* DefzDdigiHF41D = new TH1F("DefzDdigiHF41D", "", nphi, 0., 72.);
7845  TH1F* DefzDdigiHF41D0 = new TH1F("DefzDdigiHF41D0", "", nphi, 0., 72.);
7846  TH1F* DefzDdigiHF41DF = (TH1F*)DefzDdigiHF41D0->Clone("DefzDdigiHF41DF");
7847 
7848  for (int jphi = 0; jphi < nphi; jphi++) {
7849  for (int jeta = 0; jeta < neta; jeta++) {
7850  for (int i = 0; i < ndepth; i++) {
7851  double ccc1 = digivarianceHF[i][jeta][jphi];
7852  if (adigiHF[i][jeta][jphi] > 0.) {
7853  DefzDdigiHF41D->Fill(jphi, ccc1);
7854  DefzDdigiHF41D0->Fill(jphi, 1.);
7855  }
7856  }
7857  }
7858  }
7859  // DefzDdigiHF41D->Sumw2();DefzDdigiHF41D0->Sumw2();
7860 
7861  DefzDdigiHF41DF->Divide(DefzDdigiHF41D, DefzDdigiHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
7862  DefzDdigiHF41D0->Sumw2();
7863  // for (int jphi=1;jphi<73;jphi++) {DefzDdigiHF41DF->SetBinError(jphi,0.01);}
7864  gPad->SetGridy();
7865  gPad->SetGridx(); // gPad->SetLogz();
7866  DefzDdigiHF41DF->SetMarkerStyle(20);
7867  DefzDdigiHF41DF->SetMarkerSize(1.4);
7868  DefzDdigiHF41DF->GetZaxis()->SetLabelSize(0.08);
7869  DefzDdigiHF41DF->SetXTitle("#phi \b");
7870  DefzDdigiHF41DF->SetYTitle(" <D> \b");
7871  DefzDdigiHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
7872  DefzDdigiHF41DF->SetMarkerColor(4);
7873  DefzDdigiHF41DF->SetLineColor(4); // DefzDdigiHF41DF->SetMinimum(0.8); DefzDdigiHF41DF->SetMinimum(-0.015);
7874  DefzDdigiHF41DF->Draw("Error");
7876  c1x1->Update();
7877  c1x1->Print("DdigiGeneralD1PhiSymmetryHF.png");
7878  c1x1->Clear();
7879  // clean-up
7880  if (DefzDdigiHF41D)
7881  delete DefzDdigiHF41D;
7882  if (DefzDdigiHF41D0)
7883  delete DefzDdigiHF41D0;
7884  if (DefzDdigiHF41DF)
7885  delete DefzDdigiHF41DF;
7886  //========================================================================================== 14
7887  //======================================================================
7888  //======================================================================1D plot: D vs phi , different eta, depth=1
7889  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
7890  c3x5->Clear();
7892  c3x5->Divide(3, 5);
7893  c3x5->cd(1);
7894  int kcountHFpositivedirectionDigiD1 = 1;
7895  TH1F* h2CeffHFpositivedirectionDigiD1 = new TH1F("h2CeffHFpositivedirectionDigiD1", "", nphi, 0., 72.);
7896 
7897  for (int jeta = 0; jeta < njeta; jeta++) {
7898  // positivedirectionDigiD:
7899  if (jeta - 41 >= 0) {
7900  // for (int i=0;i<ndepth;i++) {
7901  // depth=1
7902  for (int i = 0; i < 1; i++) {
7903  TH1F* HFpositivedirectionDigiD1 = (TH1F*)h2CeffHFpositivedirectionDigiD1->Clone("twod1");
7904 
7905  float ccctest = 0; // to avoid empty massive elements
7906  for (int jphi = 0; jphi < nphi; jphi++) {
7907  double ccc1 = digivarianceHF[i][jeta][jphi];
7908  if (adigiHF[i][jeta][jphi] > 0.) {
7909  HFpositivedirectionDigiD1->Fill(jphi, ccc1);
7910  ccctest = 1.; //HFpositivedirectionDigiD1->SetBinError(i,0.01);
7911  }
7912  } // for jphi
7913  if (ccctest > 0.) {
7914  //cout<<"1414 kcountHFpositivedirectionDigiD1 = "<<kcountHFpositivedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
7915  c3x5->cd(kcountHFpositivedirectionDigiD1);
7916  HFpositivedirectionDigiD1->SetMarkerStyle(20);
7917  HFpositivedirectionDigiD1->SetMarkerSize(0.4);
7918  HFpositivedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
7919  HFpositivedirectionDigiD1->SetXTitle("HFpositivedirectionDigiD1 \b");
7920  HFpositivedirectionDigiD1->SetMarkerColor(2);
7921  HFpositivedirectionDigiD1->SetLineColor(0);
7922  gPad->SetGridy();
7923  gPad->SetGridx();
7924  // gPad->SetLogy();
7925  if (kcountHFpositivedirectionDigiD1 == 1)
7926  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
7927  if (kcountHFpositivedirectionDigiD1 == 2)
7928  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
7929  if (kcountHFpositivedirectionDigiD1 == 3)
7930  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
7931  if (kcountHFpositivedirectionDigiD1 == 4)
7932  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
7933  if (kcountHFpositivedirectionDigiD1 == 5)
7934  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
7935  if (kcountHFpositivedirectionDigiD1 == 6)
7936  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
7937  if (kcountHFpositivedirectionDigiD1 == 7)
7938  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
7939  if (kcountHFpositivedirectionDigiD1 == 8)
7940  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
7941  if (kcountHFpositivedirectionDigiD1 == 9)
7942  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
7943  if (kcountHFpositivedirectionDigiD1 == 10)
7944  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
7945  if (kcountHFpositivedirectionDigiD1 == 11)
7946  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
7947  if (kcountHFpositivedirectionDigiD1 == 12)
7948  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
7949  if (kcountHFpositivedirectionDigiD1 == 13)
7950  HFpositivedirectionDigiD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
7951  HFpositivedirectionDigiD1->Draw("Error");
7952  kcountHFpositivedirectionDigiD1++;
7953  if (kcountHFpositivedirectionDigiD1 > 13)
7954  break; // 4x6 = 24
7955  } //ccctest>0
7956 
7957  } // for i
7958  } //if(jeta-41 >= 0)
7959  } //for jeta
7961  c3x5->Update();
7962  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
7963  c3x5->Clear();
7964  // clean-up
7965  if (h2CeffHFpositivedirectionDigiD1)
7966  delete h2CeffHFpositivedirectionDigiD1;
7967  //========================================================================================== 15
7968  //======================================================================
7969  //======================================================================1D plot: D vs phi , different eta, depth=2
7970  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
7971  c3x5->Clear();
7972  c3x5->Divide(3, 5);
7973  c3x5->cd(1);
7974  int kcountHFpositivedirectionDigiD2 = 1;
7975  TH1F* h2CeffHFpositivedirectionDigiD2 = new TH1F("h2CeffHFpositivedirectionDigiD2", "", nphi, 0., 72.);
7976 
7977  for (int jeta = 0; jeta < njeta; jeta++) {
7978  // positivedirectionDigiD:
7979  if (jeta - 41 >= 0) {
7980  // for (int i=0;i<ndepth;i++) {
7981  // depth=2
7982  for (int i = 1; i < 2; i++) {
7983  TH1F* HFpositivedirectionDigiD2 = (TH1F*)h2CeffHFpositivedirectionDigiD2->Clone("twod1");
7984 
7985  float ccctest = 0; // to avoid empty massive elements
7986  for (int jphi = 0; jphi < nphi; jphi++) {
7987  double ccc1 = digivarianceHF[i][jeta][jphi];
7988  if (adigiHF[i][jeta][jphi] > 0.) {
7989  HFpositivedirectionDigiD2->Fill(jphi, ccc1);
7990  ccctest = 1.; //HFpositivedirectionDigiD2->SetBinError(i,0.01);
7991  }
7992  } // for jphi
7993  if (ccctest > 0.) {
7994  //cout<<"1515 kcountHFpositivedirectionDigiD2 = "<<kcountHFpositivedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
7995  c3x5->cd(kcountHFpositivedirectionDigiD2);
7996  HFpositivedirectionDigiD2->SetMarkerStyle(20);
7997  HFpositivedirectionDigiD2->SetMarkerSize(0.4);
7998  HFpositivedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
7999  HFpositivedirectionDigiD2->SetXTitle("HFpositivedirectionDigiD2 \b");
8000  HFpositivedirectionDigiD2->SetMarkerColor(2);
8001  HFpositivedirectionDigiD2->SetLineColor(0);
8002  gPad->SetGridy();
8003  gPad->SetGridx();
8004  // gPad->SetLogy();
8005  if (kcountHFpositivedirectionDigiD2 == 1)
8006  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
8007  if (kcountHFpositivedirectionDigiD2 == 2)
8008  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
8009  if (kcountHFpositivedirectionDigiD2 == 3)
8010  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
8011  if (kcountHFpositivedirectionDigiD2 == 4)
8012  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
8013  if (kcountHFpositivedirectionDigiD2 == 5)
8014  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
8015  if (kcountHFpositivedirectionDigiD2 == 6)
8016  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
8017  if (kcountHFpositivedirectionDigiD2 == 7)
8018  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
8019  if (kcountHFpositivedirectionDigiD2 == 8)
8020  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
8021  if (kcountHFpositivedirectionDigiD2 == 9)
8022  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
8023  if (kcountHFpositivedirectionDigiD2 == 10)
8024  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
8025  if (kcountHFpositivedirectionDigiD2 == 11)
8026  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
8027  if (kcountHFpositivedirectionDigiD2 == 12)
8028  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
8029  if (kcountHFpositivedirectionDigiD2 == 13)
8030  HFpositivedirectionDigiD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
8031  HFpositivedirectionDigiD2->Draw("Error");
8032  kcountHFpositivedirectionDigiD2++;
8033  if (kcountHFpositivedirectionDigiD2 > 13)
8034  break; // 4x6 = 24
8035  } //ccctest>0
8036 
8037  } // for i
8038  } //if(jeta-41 >= 0)
8039  } //for jeta
8041  c3x5->Update();
8042  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
8043  c3x5->Clear();
8044  // clean-up
8045  if (h2CeffHFpositivedirectionDigiD2)
8046  delete h2CeffHFpositivedirectionDigiD2;
8047  //========================================================================================== 16
8048  //======================================================================
8049  //======================================================================1D plot: D vs phi , different eta, depth=3
8050  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
8051  c3x5->Clear();
8052  c3x5->Divide(3, 5);
8053  c3x5->cd(1);
8054  int kcountHFpositivedirectionDigiD3 = 1;
8055  TH1F* h2CeffHFpositivedirectionDigiD3 = new TH1F("h2CeffHFpositivedirectionDigiD3", "", nphi, 0., 72.);
8056 
8057  for (int jeta = 0; jeta < njeta; jeta++) {
8058  // positivedirectionDigiD:
8059  if (jeta - 41 >= 0) {
8060  // for (int i=0;i<ndepth;i++) {
8061  // depth=3
8062  for (int i = 2; i < 3; i++) {
8063  TH1F* HFpositivedirectionDigiD3 = (TH1F*)h2CeffHFpositivedirectionDigiD3->Clone("twod1");
8064 
8065  float ccctest = 0; // to avoid empty massive elements
8066  for (int jphi = 0; jphi < nphi; jphi++) {
8067  double ccc1 = digivarianceHF[i][jeta][jphi];
8068  if (adigiHF[i][jeta][jphi] > 0.) {
8069  HFpositivedirectionDigiD3->Fill(jphi, ccc1);
8070  ccctest = 1.; //HFpositivedirectionDigiD3->SetBinError(i,0.01);
8071  }
8072  } // for jphi
8073  if (ccctest > 0.) {
8074  //cout<<"1616 kcountHFpositivedirectionDigiD3 = "<<kcountHFpositivedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
8075  c3x5->cd(kcountHFpositivedirectionDigiD3);
8076  HFpositivedirectionDigiD3->SetMarkerStyle(20);
8077  HFpositivedirectionDigiD3->SetMarkerSize(0.4);
8078  HFpositivedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
8079  HFpositivedirectionDigiD3->SetXTitle("HFpositivedirectionDigiD3 \b");
8080  HFpositivedirectionDigiD3->SetMarkerColor(2);
8081  HFpositivedirectionDigiD3->SetLineColor(0);
8082  gPad->SetGridy();
8083  gPad->SetGridx();
8084  // gPad->SetLogy();
8085  if (kcountHFpositivedirectionDigiD3 == 1)
8086  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 28; depth = 3 \b");
8087  if (kcountHFpositivedirectionDigiD3 == 2)
8088  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 29; depth = 3 \b");
8089  if (kcountHFpositivedirectionDigiD3 == 3)
8090  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 30; depth = 3 \b");
8091  if (kcountHFpositivedirectionDigiD3 == 4)
8092  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 31; depth = 3 \b");
8093  if (kcountHFpositivedirectionDigiD3 == 5)
8094  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 32; depth = 3 \b");
8095  if (kcountHFpositivedirectionDigiD3 == 6)
8096  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 33; depth = 3 \b");
8097  if (kcountHFpositivedirectionDigiD3 == 7)
8098  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 34; depth = 3 \b");
8099  if (kcountHFpositivedirectionDigiD3 == 8)
8100  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 35; depth = 3 \b");
8101  if (kcountHFpositivedirectionDigiD3 == 9)
8102  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 36; depth = 3 \b");
8103  if (kcountHFpositivedirectionDigiD3 == 10)
8104  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 37; depth = 3 \b");
8105  if (kcountHFpositivedirectionDigiD3 == 11)
8106  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 38; depth = 3 \b");
8107  if (kcountHFpositivedirectionDigiD3 == 12)
8108  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 39; depth = 3 \b");
8109  if (kcountHFpositivedirectionDigiD3 == 13)
8110  HFpositivedirectionDigiD3->SetXTitle("D for HF+ jeta = 40; depth = 3 \b");
8111  HFpositivedirectionDigiD3->Draw("Error");
8112  kcountHFpositivedirectionDigiD3++;
8113  if (kcountHFpositivedirectionDigiD3 > 13)
8114  break; // 4x6 = 24
8115  } //ccctest>0
8116 
8117  } // for i
8118  } //if(jeta-41 >= 0)
8119  } //for jeta
8121  c3x5->Update();
8122  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png");
8123  c3x5->Clear();
8124  // clean-up
8125  if (h2CeffHFpositivedirectionDigiD3)
8126  delete h2CeffHFpositivedirectionDigiD3;
8127  //========================================================================================== 17
8128  //======================================================================
8129  //======================================================================1D plot: D vs phi , different eta, depth=4
8130  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
8131  c3x5->Clear();
8132  c3x5->Divide(3, 5);
8133  c3x5->cd(1);
8134  int kcountHFpositivedirectionDigiD4 = 1;
8135  TH1F* h2CeffHFpositivedirectionDigiD4 = new TH1F("h2CeffHFpositivedirectionDigiD4", "", nphi, 0., 72.);
8136 
8137  for (int jeta = 0; jeta < njeta; jeta++) {
8138  // positivedirectionDigiD:
8139  if (jeta - 41 >= 0) {
8140  // for (int i=0;i<ndepth;i++) {
8141  // depth=4
8142  for (int i = 3; i < 4; i++) {
8143  TH1F* HFpositivedirectionDigiD4 = (TH1F*)h2CeffHFpositivedirectionDigiD4->Clone("twod1");
8144 
8145  float ccctest = 0; // to avoid empty massive elements
8146  for (int jphi = 0; jphi < nphi; jphi++) {
8147  double ccc1 = digivarianceHF[i][jeta][jphi];
8148  if (adigiHF[i][jeta][jphi] > 0.) {
8149  HFpositivedirectionDigiD4->Fill(jphi, ccc1);
8150  ccctest = 1.; //HFpositivedirectionDigiD4->SetBinError(i,0.01);
8151  }
8152  } // for jphi
8153  if (ccctest > 0.) {
8154  //cout<<"1717 kcountHFpositivedirectionDigiD4 = "<<kcountHFpositivedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
8155  c3x5->cd(kcountHFpositivedirectionDigiD4);
8156  HFpositivedirectionDigiD4->SetMarkerStyle(20);
8157  HFpositivedirectionDigiD4->SetMarkerSize(0.4);
8158  HFpositivedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
8159  HFpositivedirectionDigiD4->SetXTitle("HFpositivedirectionDigiD4 \b");
8160  HFpositivedirectionDigiD4->SetMarkerColor(2);
8161  HFpositivedirectionDigiD4->SetLineColor(0);
8162  gPad->SetGridy();
8163  gPad->SetGridx();
8164  // gPad->SetLogy();
8165  if (kcountHFpositivedirectionDigiD4 == 1)
8166  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 28; depth = 4 \b");
8167  if (kcountHFpositivedirectionDigiD4 == 2)
8168  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 29; depth = 4 \b");
8169  if (kcountHFpositivedirectionDigiD4 == 3)
8170  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 30; depth = 4 \b");
8171  if (kcountHFpositivedirectionDigiD4 == 4)
8172  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 31; depth = 4 \b");
8173  if (kcountHFpositivedirectionDigiD4 == 5)
8174  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 32; depth = 4 \b");
8175  if (kcountHFpositivedirectionDigiD4 == 6)
8176  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 33; depth = 4 \b");
8177  if (kcountHFpositivedirectionDigiD4 == 7)
8178  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 34; depth = 4 \b");
8179  if (kcountHFpositivedirectionDigiD4 == 8)
8180  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 35; depth = 4 \b");
8181  if (kcountHFpositivedirectionDigiD4 == 9)
8182  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 36; depth = 4 \b");
8183  if (kcountHFpositivedirectionDigiD4 == 10)
8184  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 37; depth = 4 \b");
8185  if (kcountHFpositivedirectionDigiD4 == 11)
8186  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 38; depth = 4 \b");
8187  if (kcountHFpositivedirectionDigiD4 == 12)
8188  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 39; depth = 4 \b");
8189  if (kcountHFpositivedirectionDigiD4 == 13)
8190  HFpositivedirectionDigiD4->SetXTitle("D for HF+ jeta = 40; depth = 4 \b");
8191  HFpositivedirectionDigiD4->Draw("Error");
8192  kcountHFpositivedirectionDigiD4++;
8193  if (kcountHFpositivedirectionDigiD4 > 13)
8194  break; // 4x6 = 24
8195  } //ccctest>0
8196 
8197  } // for i
8198  } //if(jeta-41 >= 0)
8199  } //for jeta
8201  c3x5->Update();
8202  c3x5->Print("DdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png");
8203  c3x5->Clear();
8204  // clean-up
8205  if (h2CeffHFpositivedirectionDigiD4)
8206  delete h2CeffHFpositivedirectionDigiD4;
8207 
8208  //========================================================================================== 22222214
8209  //======================================================================
8210  //======================================================================1D plot: D vs phi , different eta, depth=1
8211  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
8212  c3x5->Clear();
8214  c3x5->Divide(3, 5);
8215  c3x5->cd(1);
8216  int kcountHFnegativedirectionDigiD1 = 1;
8217  TH1F* h2CeffHFnegativedirectionDigiD1 = new TH1F("h2CeffHFnegativedirectionDigiD1", "", nphi, 0., 72.);
8218 
8219  for (int jeta = 0; jeta < njeta; jeta++) {
8220  // negativedirectionDigiD:
8221  if (jeta - 41 < 0) {
8222  // for (int i=0;i<ndepth;i++) {
8223  // depth=1
8224  for (int i = 0; i < 1; i++) {
8225  TH1F* HFnegativedirectionDigiD1 = (TH1F*)h2CeffHFnegativedirectionDigiD1->Clone("twod1");
8226 
8227  float ccctest = 0; // to avoid empty massive elements
8228  for (int jphi = 0; jphi < nphi; jphi++) {
8229  double ccc1 = digivarianceHF[i][jeta][jphi];
8230  if (adigiHF[i][jeta][jphi] > 0.) {
8231  HFnegativedirectionDigiD1->Fill(jphi, ccc1);
8232  ccctest = 1.; //HFnegativedirectionDigiD1->SetBinError(i,0.01);
8233  }
8234  } // for jphi
8235  if (ccctest > 0.) {
8236  //cout<<"1414 kcountHFnegativedirectionDigiD1 = "<<kcountHFnegativedirectionDigiD1 <<" jeta-41= "<< jeta-41 <<endl;
8237  c3x5->cd(kcountHFnegativedirectionDigiD1);
8238  HFnegativedirectionDigiD1->SetMarkerStyle(20);
8239  HFnegativedirectionDigiD1->SetMarkerSize(0.4);
8240  HFnegativedirectionDigiD1->GetYaxis()->SetLabelSize(0.04);
8241  HFnegativedirectionDigiD1->SetXTitle("HFnegativedirectionDigiD1 \b");
8242  HFnegativedirectionDigiD1->SetMarkerColor(2);
8243  HFnegativedirectionDigiD1->SetLineColor(0);
8244  gPad->SetGridy();
8245  gPad->SetGridx();
8246  // gPad->SetLogy();
8247  if (kcountHFnegativedirectionDigiD1 == 1)
8248  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
8249  if (kcountHFnegativedirectionDigiD1 == 2)
8250  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
8251  if (kcountHFnegativedirectionDigiD1 == 3)
8252  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
8253  if (kcountHFnegativedirectionDigiD1 == 4)
8254  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
8255  if (kcountHFnegativedirectionDigiD1 == 5)
8256  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
8257  if (kcountHFnegativedirectionDigiD1 == 6)
8258  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
8259  if (kcountHFnegativedirectionDigiD1 == 7)
8260  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
8261  if (kcountHFnegativedirectionDigiD1 == 8)
8262  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
8263  if (kcountHFnegativedirectionDigiD1 == 9)
8264  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
8265  if (kcountHFnegativedirectionDigiD1 == 10)
8266  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
8267  if (kcountHFnegativedirectionDigiD1 == 11)
8268  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
8269  if (kcountHFnegativedirectionDigiD1 == 12)
8270  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
8271  if (kcountHFnegativedirectionDigiD1 == 13)
8272  HFnegativedirectionDigiD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
8273  HFnegativedirectionDigiD1->Draw("Error");
8274  kcountHFnegativedirectionDigiD1++;
8275  if (kcountHFnegativedirectionDigiD1 > 13)
8276  break; // 4x6 = 24
8277  } //ccctest>0
8278 
8279  } // for i
8280  } //if(jeta-41< 0)
8281  } //for jeta
8283  c3x5->Update();
8284  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
8285  c3x5->Clear();
8286  // clean-up
8287  if (h2CeffHFnegativedirectionDigiD1)
8288  delete h2CeffHFnegativedirectionDigiD1;
8289  //========================================================================================== 22222215
8290  //======================================================================
8291  //======================================================================1D plot: D vs phi , different eta, depth=2
8292  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
8293  c3x5->Clear();
8294  c3x5->Divide(3, 5);
8295  c3x5->cd(1);
8296  int kcountHFnegativedirectionDigiD2 = 1;
8297  TH1F* h2CeffHFnegativedirectionDigiD2 = new TH1F("h2CeffHFnegativedirectionDigiD2", "", nphi, 0., 72.);
8298 
8299  for (int jeta = 0; jeta < njeta; jeta++) {
8300  // negativedirectionDigiD:
8301  if (jeta - 41 < 0) {
8302  // for (int i=0;i<ndepth;i++) {
8303  // depth=2
8304  for (int i = 1; i < 2; i++) {
8305  TH1F* HFnegativedirectionDigiD2 = (TH1F*)h2CeffHFnegativedirectionDigiD2->Clone("twod1");
8306 
8307  float ccctest = 0; // to avoid empty massive elements
8308  for (int jphi = 0; jphi < nphi; jphi++) {
8309  double ccc1 = digivarianceHF[i][jeta][jphi];
8310  if (adigiHF[i][jeta][jphi] > 0.) {
8311  HFnegativedirectionDigiD2->Fill(jphi, ccc1);
8312  ccctest = 1.; //HFnegativedirectionDigiD2->SetBinError(i,0.01);
8313  }
8314  } // for jphi
8315  if (ccctest > 0.) {
8316  //cout<<"1515 kcountHFnegativedirectionDigiD2 = "<<kcountHFnegativedirectionDigiD2 <<" jeta-41= "<< jeta-41 <<endl;
8317  c3x5->cd(kcountHFnegativedirectionDigiD2);
8318  HFnegativedirectionDigiD2->SetMarkerStyle(20);
8319  HFnegativedirectionDigiD2->SetMarkerSize(0.4);
8320  HFnegativedirectionDigiD2->GetYaxis()->SetLabelSize(0.04);
8321  HFnegativedirectionDigiD2->SetXTitle("HFnegativedirectionDigiD2 \b");
8322  HFnegativedirectionDigiD2->SetMarkerColor(2);
8323  HFnegativedirectionDigiD2->SetLineColor(0);
8324  gPad->SetGridy();
8325  gPad->SetGridx();
8326  // gPad->SetLogy();
8327  if (kcountHFnegativedirectionDigiD2 == 1)
8328  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
8329  if (kcountHFnegativedirectionDigiD2 == 2)
8330  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
8331  if (kcountHFnegativedirectionDigiD2 == 3)
8332  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
8333  if (kcountHFnegativedirectionDigiD2 == 4)
8334  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
8335  if (kcountHFnegativedirectionDigiD2 == 5)
8336  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
8337  if (kcountHFnegativedirectionDigiD2 == 6)
8338  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
8339  if (kcountHFnegativedirectionDigiD2 == 7)
8340  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
8341  if (kcountHFnegativedirectionDigiD2 == 8)
8342  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
8343  if (kcountHFnegativedirectionDigiD2 == 9)
8344  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
8345  if (kcountHFnegativedirectionDigiD2 == 10)
8346  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
8347  if (kcountHFnegativedirectionDigiD2 == 11)
8348  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
8349  if (kcountHFnegativedirectionDigiD2 == 12)
8350  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
8351  if (kcountHFnegativedirectionDigiD2 == 13)
8352  HFnegativedirectionDigiD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
8353  HFnegativedirectionDigiD2->Draw("Error");
8354  kcountHFnegativedirectionDigiD2++;
8355  if (kcountHFnegativedirectionDigiD2 > 13)
8356  break; // 4x6 = 24
8357  } //ccctest>0
8358 
8359  } // for i
8360  } //if(jeta-41< 0)
8361  } //for jeta
8363  c3x5->Update();
8364  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
8365  c3x5->Clear();
8366  // clean-up
8367  if (h2CeffHFnegativedirectionDigiD2)
8368  delete h2CeffHFnegativedirectionDigiD2;
8369  //========================================================================================== 22222216
8370  //======================================================================
8371  //======================================================================1D plot: D vs phi , different eta, depth=3
8372  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
8373  c3x5->Clear();
8374  c3x5->Divide(3, 5);
8375  c3x5->cd(1);
8376  int kcountHFnegativedirectionDigiD3 = 1;
8377  TH1F* h2CeffHFnegativedirectionDigiD3 = new TH1F("h2CeffHFnegativedirectionDigiD3", "", nphi, 0., 72.);
8378 
8379  for (int jeta = 0; jeta < njeta; jeta++) {
8380  // negativedirectionDigiD:
8381  if (jeta - 41 < 0) {
8382  // for (int i=0;i<ndepth;i++) {
8383  // depth=3
8384  for (int i = 2; i < 3; i++) {
8385  TH1F* HFnegativedirectionDigiD3 = (TH1F*)h2CeffHFnegativedirectionDigiD3->Clone("twod1");
8386 
8387  float ccctest = 0; // to avoid empty massive elements
8388  for (int jphi = 0; jphi < nphi; jphi++) {
8389  double ccc1 = digivarianceHF[i][jeta][jphi];
8390  if (adigiHF[i][jeta][jphi] > 0.) {
8391  HFnegativedirectionDigiD3->Fill(jphi, ccc1);
8392  ccctest = 1.; //HFnegativedirectionDigiD3->SetBinError(i,0.01);
8393  }
8394  } // for jphi
8395  if (ccctest > 0.) {
8396  //cout<<"1616 kcountHFnegativedirectionDigiD3 = "<<kcountHFnegativedirectionDigiD3 <<" jeta-41= "<< jeta-41 <<endl;
8397  c3x5->cd(kcountHFnegativedirectionDigiD3);
8398  HFnegativedirectionDigiD3->SetMarkerStyle(20);
8399  HFnegativedirectionDigiD3->SetMarkerSize(0.4);
8400  HFnegativedirectionDigiD3->GetYaxis()->SetLabelSize(0.04);
8401  HFnegativedirectionDigiD3->SetXTitle("HFnegativedirectionDigiD3 \b");
8402  HFnegativedirectionDigiD3->SetMarkerColor(2);
8403  HFnegativedirectionDigiD3->SetLineColor(0);
8404  gPad->SetGridy();
8405  gPad->SetGridx();
8406  // gPad->SetLogy();
8407  if (kcountHFnegativedirectionDigiD3 == 1)
8408  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-41; depth = 3 \b");
8409  if (kcountHFnegativedirectionDigiD3 == 2)
8410  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-40; depth = 3 \b");
8411  if (kcountHFnegativedirectionDigiD3 == 3)
8412  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-39; depth = 3 \b");
8413  if (kcountHFnegativedirectionDigiD3 == 4)
8414  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-38; depth = 3 \b");
8415  if (kcountHFnegativedirectionDigiD3 == 5)
8416  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-37; depth = 3 \b");
8417  if (kcountHFnegativedirectionDigiD3 == 6)
8418  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-36; depth = 3 \b");
8419  if (kcountHFnegativedirectionDigiD3 == 7)
8420  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-35; depth = 3 \b");
8421  if (kcountHFnegativedirectionDigiD3 == 8)
8422  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-34; depth = 3 \b");
8423  if (kcountHFnegativedirectionDigiD3 == 9)
8424  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-33; depth = 3 \b");
8425  if (kcountHFnegativedirectionDigiD3 == 10)
8426  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-32; depth = 3 \b");
8427  if (kcountHFnegativedirectionDigiD3 == 11)
8428  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-31; depth = 3 \b");
8429  if (kcountHFnegativedirectionDigiD3 == 12)
8430  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-30; depth = 3 \b");
8431  if (kcountHFnegativedirectionDigiD3 == 13)
8432  HFnegativedirectionDigiD3->SetXTitle("D for HF- jeta =-29; depth = 3 \b");
8433  HFnegativedirectionDigiD3->Draw("Error");
8434  kcountHFnegativedirectionDigiD3++;
8435  if (kcountHFnegativedirectionDigiD3 > 13)
8436  break; // 4x6 = 24
8437  } //ccctest>0
8438 
8439  } // for i
8440  } //if(jeta-41< 0)
8441  } //for jeta
8443  c3x5->Update();
8444  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png");
8445  c3x5->Clear();
8446  // clean-up
8447  if (h2CeffHFnegativedirectionDigiD3)
8448  delete h2CeffHFnegativedirectionDigiD3;
8449  //========================================================================================== 22222217
8450  //======================================================================
8451  //======================================================================1D plot: D vs phi , different eta, depth=4
8452  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
8453  c3x5->Clear();
8454  c3x5->Divide(3, 5);
8455  c3x5->cd(1);
8456  int kcountHFnegativedirectionDigiD4 = 1;
8457  TH1F* h2CeffHFnegativedirectionDigiD4 = new TH1F("h2CeffHFnegativedirectionDigiD4", "", nphi, 0., 72.);
8458 
8459  for (int jeta = 0; jeta < njeta; jeta++) {
8460  // negativedirectionDigiD:
8461  if (jeta - 41 < 0) {
8462  // for (int i=0;i<ndepth;i++) {
8463  // depth=4
8464  for (int i = 3; i < 4; i++) {
8465  TH1F* HFnegativedirectionDigiD4 = (TH1F*)h2CeffHFnegativedirectionDigiD4->Clone("twod1");
8466 
8467  float ccctest = 0; // to avoid empty massive elements
8468  for (int jphi = 0; jphi < nphi; jphi++) {
8469  double ccc1 = digivarianceHF[i][jeta][jphi];
8470  if (adigiHF[i][jeta][jphi] > 0.) {
8471  HFnegativedirectionDigiD4->Fill(jphi, ccc1);
8472  ccctest = 1.; //HFnegativedirectionDigiD4->SetBinError(i,0.01);
8473  }
8474  } // for jphi
8475  if (ccctest > 0.) {
8476  //cout<<"1717 kcountHFnegativedirectionDigiD4 = "<<kcountHFnegativedirectionDigiD4 <<" jeta-41= "<< jeta-41 <<endl;
8477  c3x5->cd(kcountHFnegativedirectionDigiD4);
8478  HFnegativedirectionDigiD4->SetMarkerStyle(20);
8479  HFnegativedirectionDigiD4->SetMarkerSize(0.4);
8480  HFnegativedirectionDigiD4->GetYaxis()->SetLabelSize(0.04);
8481  HFnegativedirectionDigiD4->SetXTitle("HFnegativedirectionDigiD4 \b");
8482  HFnegativedirectionDigiD4->SetMarkerColor(2);
8483  HFnegativedirectionDigiD4->SetLineColor(0);
8484  gPad->SetGridy();
8485  gPad->SetGridx();
8486  // gPad->SetLogy();
8487  if (kcountHFnegativedirectionDigiD4 == 1)
8488  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-41; depth = 4 \b");
8489  if (kcountHFnegativedirectionDigiD4 == 2)
8490  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-40; depth = 4 \b");
8491  if (kcountHFnegativedirectionDigiD4 == 3)
8492  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-39; depth = 4 \b");
8493  if (kcountHFnegativedirectionDigiD4 == 4)
8494  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-38; depth = 4 \b");
8495  if (kcountHFnegativedirectionDigiD4 == 5)
8496  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-37; depth = 4 \b");
8497  if (kcountHFnegativedirectionDigiD4 == 6)
8498  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-36; depth = 4 \b");
8499  if (kcountHFnegativedirectionDigiD4 == 7)
8500  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-35; depth = 4 \b");
8501  if (kcountHFnegativedirectionDigiD4 == 8)
8502  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-34; depth = 4 \b");
8503  if (kcountHFnegativedirectionDigiD4 == 9)
8504  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-33; depth = 4 \b");
8505  if (kcountHFnegativedirectionDigiD4 == 10)
8506  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-32; depth = 4 \b");
8507  if (kcountHFnegativedirectionDigiD4 == 11)
8508  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-31; depth = 4 \b");
8509  if (kcountHFnegativedirectionDigiD4 == 12)
8510  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-30; depth = 4 \b");
8511  if (kcountHFnegativedirectionDigiD4 == 13)
8512  HFnegativedirectionDigiD4->SetXTitle("D for HF- jeta =-29; depth = 4 \b");
8513  HFnegativedirectionDigiD4->Draw("Error");
8514  kcountHFnegativedirectionDigiD4++;
8515  if (kcountHFnegativedirectionDigiD4 > 13)
8516  break; // 4x6 = 24
8517  } //ccctest>0
8518 
8519  } // for i
8520  } //if(jeta-41< 0)
8521  } //for jeta
8523  c3x5->Update();
8524  c3x5->Print("DdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png");
8525  c3x5->Clear();
8526  // clean-up
8527  if (h2CeffHFnegativedirectionDigiD4)
8528  delete h2CeffHFnegativedirectionDigiD4;
8529 
8530  //===================================================================== END of Digi HF for phi-symmetry
8531  //===================================================================== END of Digi HF for phi-symmetry
8532  //===================================================================== END of Digi HF for phi-symmetry
8533  //============================================================================================================ END of Digi for phi-symmetry
8534  //============================================================================================================ END of Digi for phi-symmetry
8535  //============================================================================================================ END of Digi for phi-symmetry
8536  // END of Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi
8537 
8544  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
8545  //ndepth = k_max[5];
8546  ndepth = 4;
8547  double arecosignalHB[ndepth][njeta][njphi];
8548  double recosignalvarianceHB[ndepth][njeta][njphi];
8549  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HB recSignalEnergy
8550  TH2F* recSignalEnergy1HB1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HB1");
8551  TH2F* recSignalEnergy0HB1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB1");
8552  TH2F* recSignalEnergyHB1 = (TH2F*)recSignalEnergy1HB1->Clone("recSignalEnergyHB1");
8553  recSignalEnergyHB1->Divide(recSignalEnergy1HB1, recSignalEnergy0HB1, 1, 1, "B");
8554  TH2F* recSignalEnergy1HB2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HB2");
8555  TH2F* recSignalEnergy0HB2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB2");
8556  TH2F* recSignalEnergyHB2 = (TH2F*)recSignalEnergy1HB2->Clone("recSignalEnergyHB2");
8557  recSignalEnergyHB2->Divide(recSignalEnergy1HB2, recSignalEnergy0HB2, 1, 1, "B");
8558  TH2F* recSignalEnergy1HB3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HB3");
8559  TH2F* recSignalEnergy0HB3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB3");
8560  TH2F* recSignalEnergyHB3 = (TH2F*)recSignalEnergy1HB3->Clone("recSignalEnergyHB3");
8561  recSignalEnergyHB3->Divide(recSignalEnergy1HB3, recSignalEnergy0HB3, 1, 1, "B");
8562  TH2F* recSignalEnergy1HB4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HB4");
8563  TH2F* recSignalEnergy0HB4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB4");
8564  TH2F* recSignalEnergyHB4 = (TH2F*)recSignalEnergy1HB4->Clone("recSignalEnergyHB4");
8565  recSignalEnergyHB4->Divide(recSignalEnergy1HB4, recSignalEnergy0HB4, 1, 1, "B");
8566  for (int jeta = 0; jeta < njeta; jeta++) {
8567  //====================================================================== PHI normalization & put R into massive arecosignalHB
8568  //preparation for PHI normalization:
8569  double sumrecosignalHB0 = 0;
8570  int nsumrecosignalHB0 = 0;
8571  double sumrecosignalHB1 = 0;
8572  int nsumrecosignalHB1 = 0;
8573  double sumrecosignalHB2 = 0;
8574  int nsumrecosignalHB2 = 0;
8575  double sumrecosignalHB3 = 0;
8576  int nsumrecosignalHB3 = 0;
8577  for (int jphi = 0; jphi < njphi; jphi++) {
8578  arecosignalHB[0][jeta][jphi] = recSignalEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
8579  arecosignalHB[1][jeta][jphi] = recSignalEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
8580  arecosignalHB[2][jeta][jphi] = recSignalEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
8581  arecosignalHB[3][jeta][jphi] = recSignalEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
8582  if (arecosignalHB[0][jeta][jphi] > 0.) {
8583  sumrecosignalHB0 += arecosignalHB[0][jeta][jphi];
8584  ++nsumrecosignalHB0;
8585  }
8586  if (arecosignalHB[1][jeta][jphi] > 0.) {
8587  sumrecosignalHB1 += arecosignalHB[1][jeta][jphi];
8588  ++nsumrecosignalHB1;
8589  }
8590  if (arecosignalHB[2][jeta][jphi] > 0.) {
8591  sumrecosignalHB2 += arecosignalHB[2][jeta][jphi];
8592  ++nsumrecosignalHB2;
8593  }
8594  if (arecosignalHB[3][jeta][jphi] > 0.) {
8595  sumrecosignalHB3 += arecosignalHB[3][jeta][jphi];
8596  ++nsumrecosignalHB3;
8597  }
8598  } // phi
8599  // PHI normalization:
8600  for (int jphi = 0; jphi < njphi; jphi++) {
8601  if (arecosignalHB[0][jeta][jphi] > 0.)
8602  arecosignalHB[0][jeta][jphi] /= (sumrecosignalHB0 / nsumrecosignalHB0);
8603  if (arecosignalHB[1][jeta][jphi] > 0.)
8604  arecosignalHB[1][jeta][jphi] /= (sumrecosignalHB1 / nsumrecosignalHB1);
8605  if (arecosignalHB[2][jeta][jphi] > 0.)
8606  arecosignalHB[2][jeta][jphi] /= (sumrecosignalHB2 / nsumrecosignalHB2);
8607  if (arecosignalHB[3][jeta][jphi] > 0.)
8608  arecosignalHB[3][jeta][jphi] /= (sumrecosignalHB3 / nsumrecosignalHB3);
8609  } // phi
8610  } //eta
8611  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
8612  //======================================================================
8613  //======================================================================
8614  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
8615  c2x1->Clear();
8617  c2x1->Divide(2, 1);
8618  c2x1->cd(1);
8619  TH2F* GefzRrecosignalHB42D = new TH2F("GefzRrecosignalHB42D", "", neta, -41., 41., nphi, 0., 72.);
8620  TH2F* GefzRrecosignalHB42D0 = new TH2F("GefzRrecosignalHB42D0", "", neta, -41., 41., nphi, 0., 72.);
8621  TH2F* GefzRrecosignalHB42DF = (TH2F*)GefzRrecosignalHB42D0->Clone("GefzRrecosignalHB42DF");
8622  for (int i = 0; i < ndepth; i++) {
8623  for (int jeta = 0; jeta < neta; jeta++) {
8624  for (int jphi = 0; jphi < nphi; jphi++) {
8625  double ccc1 = arecosignalHB[i][jeta][jphi];
8626  int k2plot = jeta - 41;
8627  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
8628  if (ccc1 != 0.) {
8629  GefzRrecosignalHB42D->Fill(kkk, jphi, ccc1);
8630  GefzRrecosignalHB42D0->Fill(kkk, jphi, 1.);
8631  }
8632  }
8633  }
8634  }
8635  GefzRrecosignalHB42DF->Divide(GefzRrecosignalHB42D, GefzRrecosignalHB42D0, 1, 1, "B"); // average A
8636  gPad->SetGridy();
8637  gPad->SetGridx(); // gPad->SetLogz();
8638  GefzRrecosignalHB42DF->SetXTitle("<R>_depth #eta \b");
8639  GefzRrecosignalHB42DF->SetYTitle(" #phi \b");
8640  GefzRrecosignalHB42DF->Draw("COLZ");
8641 
8642  c2x1->cd(2);
8643  TH1F* energyhitSignal_HB = (TH1F*)dir->FindObjectAny("h_energyhitSignal_HB");
8644  energyhitSignal_HB->SetMarkerStyle(20);
8645  energyhitSignal_HB->SetMarkerSize(0.4);
8646  energyhitSignal_HB->GetYaxis()->SetLabelSize(0.04);
8647  energyhitSignal_HB->SetXTitle("energyhitSignal_HB \b");
8648  energyhitSignal_HB->SetMarkerColor(2);
8649  energyhitSignal_HB->SetLineColor(0);
8650  gPad->SetGridy();
8651  gPad->SetGridx();
8652  energyhitSignal_HB->Draw("Error");
8653 
8655  c2x1->Update();
8656  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHB.png");
8657  c2x1->Clear();
8658  // clean-up
8659  if (GefzRrecosignalHB42D)
8660  delete GefzRrecosignalHB42D;
8661  if (GefzRrecosignalHB42D0)
8662  delete GefzRrecosignalHB42D0;
8663  if (GefzRrecosignalHB42DF)
8664  delete GefzRrecosignalHB42DF;
8665  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
8666  //======================================================================
8667  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
8668  c1x1->Clear();
8670  c1x1->Divide(1, 1);
8671  c1x1->cd(1);
8672  TH1F* GefzRrecosignalHB41D = new TH1F("GefzRrecosignalHB41D", "", nphi, 0., 72.);
8673  TH1F* GefzRrecosignalHB41D0 = new TH1F("GefzRrecosignalHB41D0", "", nphi, 0., 72.);
8674  TH1F* GefzRrecosignalHB41DF = (TH1F*)GefzRrecosignalHB41D0->Clone("GefzRrecosignalHB41DF");
8675  for (int jphi = 0; jphi < nphi; jphi++) {
8676  for (int jeta = 0; jeta < neta; jeta++) {
8677  for (int i = 0; i < ndepth; i++) {
8678  double ccc1 = arecosignalHB[i][jeta][jphi];
8679  if (ccc1 != 0.) {
8680  GefzRrecosignalHB41D->Fill(jphi, ccc1);
8681  GefzRrecosignalHB41D0->Fill(jphi, 1.);
8682  }
8683  }
8684  }
8685  }
8686  GefzRrecosignalHB41DF->Divide(
8687  GefzRrecosignalHB41D, GefzRrecosignalHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
8688  GefzRrecosignalHB41D0->Sumw2();
8689  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHB41DF->SetBinError(jphi,0.01);}
8690  gPad->SetGridy();
8691  gPad->SetGridx(); // gPad->SetLogz();
8692  GefzRrecosignalHB41DF->SetMarkerStyle(20);
8693  GefzRrecosignalHB41DF->SetMarkerSize(1.4);
8694  GefzRrecosignalHB41DF->GetZaxis()->SetLabelSize(0.08);
8695  GefzRrecosignalHB41DF->SetXTitle("#phi \b");
8696  GefzRrecosignalHB41DF->SetYTitle(" <R> \b");
8697  GefzRrecosignalHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
8698  GefzRrecosignalHB41DF->SetMarkerColor(4);
8699  GefzRrecosignalHB41DF->SetLineColor(
8700  4); // GefzRrecosignalHB41DF->SetMinimum(0.8); // GefzRrecosignalHB41DF->SetMaximum(1.000);
8701  GefzRrecosignalHB41DF->Draw("Error");
8703  c1x1->Update();
8704  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHB.png");
8705  c1x1->Clear();
8706  // clean-up
8707  if (GefzRrecosignalHB41D)
8708  delete GefzRrecosignalHB41D;
8709  if (GefzRrecosignalHB41D0)
8710  delete GefzRrecosignalHB41D0;
8711  if (GefzRrecosignalHB41DF)
8712  delete GefzRrecosignalHB41DF;
8713  //========================================================================================== 4
8714  //======================================================================
8715  //======================================================================1D plot: R vs phi , different eta, depth=1
8716  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
8717  c3x5->Clear();
8719  c3x5->Divide(4, 4);
8720  c3x5->cd(1);
8721  int kcountHBpositivedirectionRecosignal1 = 1;
8722  TH1F* h2CeffHBpositivedirectionRecosignal1 = new TH1F("h2CeffHBpositivedirectionRecosignal1", "", nphi, 0., 72.);
8723  for (int jeta = 0; jeta < njeta; jeta++) {
8724  // positivedirectionRecosignal:
8725  if (jeta - 41 >= 0) {
8726  // for (int i=0;i<ndepth;i++) {
8727  // depth=1
8728  for (int i = 0; i < 1; i++) {
8729  TH1F* HBpositivedirectionRecosignal1 = (TH1F*)h2CeffHBpositivedirectionRecosignal1->Clone("twod1");
8730  float ccctest = 0; // to avoid empty massive elements
8731  for (int jphi = 0; jphi < nphi; jphi++) {
8732  double ccc1 = arecosignalHB[i][jeta][jphi];
8733  if (ccc1 != 0.) {
8734  HBpositivedirectionRecosignal1->Fill(jphi, ccc1);
8735  ccctest = 1.; //HBpositivedirectionRecosignal1->SetBinError(i,0.01);
8736  }
8737  } // for jphi
8738  if (ccctest > 0.) {
8739  // cout<<"444 kcountHBpositivedirectionRecosignal1 = "<<kcountHBpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
8740  c3x5->cd(kcountHBpositivedirectionRecosignal1);
8741  HBpositivedirectionRecosignal1->SetMarkerStyle(20);
8742  HBpositivedirectionRecosignal1->SetMarkerSize(0.4);
8743  HBpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
8744  HBpositivedirectionRecosignal1->SetXTitle("HBpositivedirectionRecosignal1 \b");
8745  HBpositivedirectionRecosignal1->SetMarkerColor(2);
8746  HBpositivedirectionRecosignal1->SetLineColor(0);
8747  gPad->SetGridy();
8748  gPad->SetGridx();
8749  // gPad->SetLogy();
8750  if (kcountHBpositivedirectionRecosignal1 == 1)
8751  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
8752  if (kcountHBpositivedirectionRecosignal1 == 2)
8753  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
8754  if (kcountHBpositivedirectionRecosignal1 == 3)
8755  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
8756  if (kcountHBpositivedirectionRecosignal1 == 4)
8757  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
8758  if (kcountHBpositivedirectionRecosignal1 == 5)
8759  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
8760  if (kcountHBpositivedirectionRecosignal1 == 6)
8761  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
8762  if (kcountHBpositivedirectionRecosignal1 == 7)
8763  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
8764  if (kcountHBpositivedirectionRecosignal1 == 8)
8765  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
8766  if (kcountHBpositivedirectionRecosignal1 == 9)
8767  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
8768  if (kcountHBpositivedirectionRecosignal1 == 10)
8769  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
8770  if (kcountHBpositivedirectionRecosignal1 == 11)
8771  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
8772  if (kcountHBpositivedirectionRecosignal1 == 12)
8773  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
8774  if (kcountHBpositivedirectionRecosignal1 == 13)
8775  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
8776  if (kcountHBpositivedirectionRecosignal1 == 14)
8777  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
8778  if (kcountHBpositivedirectionRecosignal1 == 15)
8779  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
8780  if (kcountHBpositivedirectionRecosignal1 == 16)
8781  HBpositivedirectionRecosignal1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
8782  HBpositivedirectionRecosignal1->Draw("Error");
8783  kcountHBpositivedirectionRecosignal1++;
8784  if (kcountHBpositivedirectionRecosignal1 > 16)
8785  break; //
8786  } //ccctest>0
8787 
8788  } // for i
8789  } //if(jeta-41 >= 0)
8790  } //for jeta
8792  c3x5->Update();
8793  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
8794  c3x5->Clear();
8795  // clean-up
8796  if (h2CeffHBpositivedirectionRecosignal1)
8797  delete h2CeffHBpositivedirectionRecosignal1;
8798 
8799  //========================================================================================== 5
8800  //======================================================================
8801  //======================================================================1D plot: R vs phi , different eta, depth=2
8802  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
8803  c3x5->Clear();
8805  c3x5->Divide(4, 4);
8806  c3x5->cd(1);
8807  int kcountHBpositivedirectionRecosignal2 = 1;
8808  TH1F* h2CeffHBpositivedirectionRecosignal2 = new TH1F("h2CeffHBpositivedirectionRecosignal2", "", nphi, 0., 72.);
8809  for (int jeta = 0; jeta < njeta; jeta++) {
8810  // positivedirectionRecosignal:
8811  if (jeta - 41 >= 0) {
8812  // for (int i=0;i<ndepth;i++) {
8813  // depth=2
8814  for (int i = 1; i < 2; i++) {
8815  TH1F* HBpositivedirectionRecosignal2 = (TH1F*)h2CeffHBpositivedirectionRecosignal2->Clone("twod1");
8816  float ccctest = 0; // to avoid empty massive elements
8817  for (int jphi = 0; jphi < nphi; jphi++) {
8818  double ccc1 = arecosignalHB[i][jeta][jphi];
8819  if (ccc1 != 0.) {
8820  HBpositivedirectionRecosignal2->Fill(jphi, ccc1);
8821  ccctest = 1.; //HBpositivedirectionRecosignal2->SetBinError(i,0.01);
8822  }
8823  } // for jphi
8824  if (ccctest > 0.) {
8825  //cout<<"555 kcountHBpositivedirectionRecosignal2 = "<<kcountHBpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
8826  c3x5->cd(kcountHBpositivedirectionRecosignal2);
8827  HBpositivedirectionRecosignal2->SetMarkerStyle(20);
8828  HBpositivedirectionRecosignal2->SetMarkerSize(0.4);
8829  HBpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
8830  HBpositivedirectionRecosignal2->SetXTitle("HBpositivedirectionRecosignal2 \b");
8831  HBpositivedirectionRecosignal2->SetMarkerColor(2);
8832  HBpositivedirectionRecosignal2->SetLineColor(0);
8833  gPad->SetGridy();
8834  gPad->SetGridx();
8835  // gPad->SetLogy();
8836  if (kcountHBpositivedirectionRecosignal2 == 1)
8837  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
8838  if (kcountHBpositivedirectionRecosignal2 == 2)
8839  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
8840  if (kcountHBpositivedirectionRecosignal2 == 3)
8841  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
8842  if (kcountHBpositivedirectionRecosignal2 == 4)
8843  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
8844  if (kcountHBpositivedirectionRecosignal2 == 5)
8845  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
8846  if (kcountHBpositivedirectionRecosignal2 == 6)
8847  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
8848  if (kcountHBpositivedirectionRecosignal2 == 7)
8849  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
8850  if (kcountHBpositivedirectionRecosignal2 == 8)
8851  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
8852  if (kcountHBpositivedirectionRecosignal2 == 9)
8853  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
8854  if (kcountHBpositivedirectionRecosignal2 == 10)
8855  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
8856  if (kcountHBpositivedirectionRecosignal2 == 11)
8857  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
8858  if (kcountHBpositivedirectionRecosignal2 == 12)
8859  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
8860  if (kcountHBpositivedirectionRecosignal2 == 13)
8861  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
8862  if (kcountHBpositivedirectionRecosignal2 == 14)
8863  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
8864  if (kcountHBpositivedirectionRecosignal2 == 15)
8865  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
8866  if (kcountHBpositivedirectionRecosignal2 == 16)
8867  HBpositivedirectionRecosignal2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
8868  HBpositivedirectionRecosignal2->Draw("Error");
8869  kcountHBpositivedirectionRecosignal2++;
8870  if (kcountHBpositivedirectionRecosignal2 > 16)
8871  break; // 4x6 = 24
8872  } //ccctest>0
8873 
8874  } // for i
8875  } //if(jeta-41 >= 0)
8876  } //for jeta
8878  c3x5->Update();
8879  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
8880  c3x5->Clear();
8881  // clean-up
8882  if (h2CeffHBpositivedirectionRecosignal2)
8883  delete h2CeffHBpositivedirectionRecosignal2;
8884  //========================================================================================== 6
8885  //======================================================================
8886  //======================================================================1D plot: R vs phi , different eta, depth=3
8887  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
8888  c3x5->Clear();
8890  c3x5->Divide(4, 4);
8891  c3x5->cd(1);
8892  int kcountHBpositivedirectionRecosignal3 = 1;
8893  TH1F* h2CeffHBpositivedirectionRecosignal3 = new TH1F("h2CeffHBpositivedirectionRecosignal3", "", nphi, 0., 72.);
8894  for (int jeta = 0; jeta < njeta; jeta++) {
8895  // positivedirectionRecosignal:
8896  if (jeta - 41 >= 0) {
8897  // for (int i=0;i<ndepth;i++) {
8898  // depth=3
8899  for (int i = 2; i < 3; i++) {
8900  TH1F* HBpositivedirectionRecosignal3 = (TH1F*)h2CeffHBpositivedirectionRecosignal3->Clone("twod1");
8901  float ccctest = 0; // to avoid empty massive elements
8902  for (int jphi = 0; jphi < nphi; jphi++) {
8903  double ccc1 = arecosignalHB[i][jeta][jphi];
8904  if (ccc1 != 0.) {
8905  HBpositivedirectionRecosignal3->Fill(jphi, ccc1);
8906  ccctest = 1.; //HBpositivedirectionRecosignal3->SetBinError(i,0.01);
8907  }
8908  } // for jphi
8909  if (ccctest > 0.) {
8910  //cout<<"666 kcountHBpositivedirectionRecosignal3 = "<<kcountHBpositivedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
8911  c3x5->cd(kcountHBpositivedirectionRecosignal3);
8912  HBpositivedirectionRecosignal3->SetMarkerStyle(20);
8913  HBpositivedirectionRecosignal3->SetMarkerSize(0.4);
8914  HBpositivedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
8915  HBpositivedirectionRecosignal3->SetXTitle("HBpositivedirectionRecosignal3 \b");
8916  HBpositivedirectionRecosignal3->SetMarkerColor(2);
8917  HBpositivedirectionRecosignal3->SetLineColor(0);
8918  gPad->SetGridy();
8919  gPad->SetGridx();
8920  // gPad->SetLogy();
8921  if (kcountHBpositivedirectionRecosignal3 == 1)
8922  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
8923  if (kcountHBpositivedirectionRecosignal3 == 2)
8924  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
8925  if (kcountHBpositivedirectionRecosignal3 == 3)
8926  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
8927  if (kcountHBpositivedirectionRecosignal3 == 4)
8928  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
8929  if (kcountHBpositivedirectionRecosignal3 == 5)
8930  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
8931  if (kcountHBpositivedirectionRecosignal3 == 6)
8932  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
8933  if (kcountHBpositivedirectionRecosignal3 == 7)
8934  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
8935  if (kcountHBpositivedirectionRecosignal3 == 8)
8936  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
8937  if (kcountHBpositivedirectionRecosignal3 == 9)
8938  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
8939  if (kcountHBpositivedirectionRecosignal3 == 10)
8940  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
8941  if (kcountHBpositivedirectionRecosignal3 == 11)
8942  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
8943  if (kcountHBpositivedirectionRecosignal3 == 12)
8944  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
8945  if (kcountHBpositivedirectionRecosignal3 == 13)
8946  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
8947  if (kcountHBpositivedirectionRecosignal3 == 14)
8948  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
8949  if (kcountHBpositivedirectionRecosignal3 == 15)
8950  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
8951  if (kcountHBpositivedirectionRecosignal3 == 16)
8952  HBpositivedirectionRecosignal3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
8953  HBpositivedirectionRecosignal3->Draw("Error");
8954  kcountHBpositivedirectionRecosignal3++;
8955  if (kcountHBpositivedirectionRecosignal3 > 16)
8956  break; // 4x6 = 24
8957  } //ccctest>0
8958 
8959  } // for i
8960  } //if(jeta-41 >= 0)
8961  } //for jeta
8963  c3x5->Update();
8964  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
8965  c3x5->Clear();
8966  // clean-up
8967  if (h2CeffHBpositivedirectionRecosignal3)
8968  delete h2CeffHBpositivedirectionRecosignal3;
8969  //========================================================================================== 7
8970  //======================================================================
8971  //======================================================================1D plot: R vs phi , different eta, depth=4
8972  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
8973  c3x5->Clear();
8975  c3x5->Divide(4, 4);
8976  c3x5->cd(1);
8977  int kcountHBpositivedirectionRecosignal4 = 1;
8978  TH1F* h2CeffHBpositivedirectionRecosignal4 = new TH1F("h2CeffHBpositivedirectionRecosignal4", "", nphi, 0., 72.);
8979 
8980  for (int jeta = 0; jeta < njeta; jeta++) {
8981  // positivedirectionRecosignal:
8982  if (jeta - 41 >= 0) {
8983  // for (int i=0;i<ndepth;i++) {
8984  // depth=4
8985  for (int i = 3; i < 4; i++) {
8986  TH1F* HBpositivedirectionRecosignal4 = (TH1F*)h2CeffHBpositivedirectionRecosignal4->Clone("twod1");
8987 
8988  float ccctest = 0; // to avoid empty massive elements
8989  for (int jphi = 0; jphi < nphi; jphi++) {
8990  double ccc1 = arecosignalHB[i][jeta][jphi];
8991  if (ccc1 != 0.) {
8992  HBpositivedirectionRecosignal4->Fill(jphi, ccc1);
8993  ccctest = 1.; //HBpositivedirectionRecosignal4->SetBinError(i,0.01);
8994  }
8995  } // for jphi
8996  if (ccctest > 0.) {
8997  //cout<<"777 kcountHBpositivedirectionRecosignal4 = "<<kcountHBpositivedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
8998  c3x5->cd(kcountHBpositivedirectionRecosignal4);
8999  HBpositivedirectionRecosignal4->SetMarkerStyle(20);
9000  HBpositivedirectionRecosignal4->SetMarkerSize(0.4);
9001  HBpositivedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
9002  HBpositivedirectionRecosignal4->SetXTitle("HBpositivedirectionRecosignal4 \b");
9003  HBpositivedirectionRecosignal4->SetMarkerColor(2);
9004  HBpositivedirectionRecosignal4->SetLineColor(0);
9005  gPad->SetGridy();
9006  gPad->SetGridx();
9007  // gPad->SetLogy();
9008  if (kcountHBpositivedirectionRecosignal4 == 1)
9009  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
9010  if (kcountHBpositivedirectionRecosignal4 == 2)
9011  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
9012  if (kcountHBpositivedirectionRecosignal4 == 3)
9013  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
9014  if (kcountHBpositivedirectionRecosignal4 == 4)
9015  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
9016  if (kcountHBpositivedirectionRecosignal4 == 5)
9017  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
9018  if (kcountHBpositivedirectionRecosignal4 == 6)
9019  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
9020  if (kcountHBpositivedirectionRecosignal4 == 7)
9021  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
9022  if (kcountHBpositivedirectionRecosignal4 == 8)
9023  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
9024  if (kcountHBpositivedirectionRecosignal4 == 9)
9025  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
9026  if (kcountHBpositivedirectionRecosignal4 == 10)
9027  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
9028  if (kcountHBpositivedirectionRecosignal4 == 11)
9029  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
9030  if (kcountHBpositivedirectionRecosignal4 == 12)
9031  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
9032  if (kcountHBpositivedirectionRecosignal4 == 13)
9033  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
9034  if (kcountHBpositivedirectionRecosignal4 == 14)
9035  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
9036  if (kcountHBpositivedirectionRecosignal4 == 15)
9037  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
9038  if (kcountHBpositivedirectionRecosignal4 == 16)
9039  HBpositivedirectionRecosignal4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
9040  HBpositivedirectionRecosignal4->Draw("Error");
9041  kcountHBpositivedirectionRecosignal4++;
9042  if (kcountHBpositivedirectionRecosignal4 > 16)
9043  break; // 4x6 = 24
9044  } //ccctest>0
9045 
9046  } // for i
9047  } //if(jeta-41 >= 0)
9048  } //for jeta
9050  c3x5->Update();
9051  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
9052  c3x5->Clear();
9053  // clean-up
9054  if (h2CeffHBpositivedirectionRecosignal4)
9055  delete h2CeffHBpositivedirectionRecosignal4;
9056 
9057  //========================================================================================== 1114
9058  //======================================================================
9059  //======================================================================1D plot: R vs phi , different eta, depth=1
9060  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
9061  c3x5->Clear();
9063  c3x5->Divide(4, 4);
9064  c3x5->cd(1);
9065  int kcountHBnegativedirectionRecosignal1 = 1;
9066  TH1F* h2CeffHBnegativedirectionRecosignal1 = new TH1F("h2CeffHBnegativedirectionRecosignal1", "", nphi, 0., 72.);
9067  for (int jeta = 0; jeta < njeta; jeta++) {
9068  // negativedirectionRecosignal:
9069  if (jeta - 41 < 0) {
9070  // for (int i=0;i<ndepth;i++) {
9071  // depth=1
9072  for (int i = 0; i < 1; i++) {
9073  TH1F* HBnegativedirectionRecosignal1 = (TH1F*)h2CeffHBnegativedirectionRecosignal1->Clone("twod1");
9074  float ccctest = 0; // to avoid empty massive elements
9075  for (int jphi = 0; jphi < nphi; jphi++) {
9076  double ccc1 = arecosignalHB[i][jeta][jphi];
9077  if (ccc1 != 0.) {
9078  HBnegativedirectionRecosignal1->Fill(jphi, ccc1);
9079  ccctest = 1.; //HBnegativedirectionRecosignal1->SetBinError(i,0.01);
9080  }
9081  } // for jphi
9082  if (ccctest > 0.) {
9083  // cout<<"444 kcountHBnegativedirectionRecosignal1 = "<<kcountHBnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
9084  c3x5->cd(kcountHBnegativedirectionRecosignal1);
9085  HBnegativedirectionRecosignal1->SetMarkerStyle(20);
9086  HBnegativedirectionRecosignal1->SetMarkerSize(0.4);
9087  HBnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
9088  HBnegativedirectionRecosignal1->SetXTitle("HBnegativedirectionRecosignal1 \b");
9089  HBnegativedirectionRecosignal1->SetMarkerColor(2);
9090  HBnegativedirectionRecosignal1->SetLineColor(0);
9091  gPad->SetGridy();
9092  gPad->SetGridx();
9093  // gPad->SetLogy();
9094  if (kcountHBnegativedirectionRecosignal1 == 1)
9095  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
9096  if (kcountHBnegativedirectionRecosignal1 == 2)
9097  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
9098  if (kcountHBnegativedirectionRecosignal1 == 3)
9099  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
9100  if (kcountHBnegativedirectionRecosignal1 == 4)
9101  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
9102  if (kcountHBnegativedirectionRecosignal1 == 5)
9103  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
9104  if (kcountHBnegativedirectionRecosignal1 == 6)
9105  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
9106  if (kcountHBnegativedirectionRecosignal1 == 7)
9107  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
9108  if (kcountHBnegativedirectionRecosignal1 == 8)
9109  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
9110  if (kcountHBnegativedirectionRecosignal1 == 9)
9111  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
9112  if (kcountHBnegativedirectionRecosignal1 == 10)
9113  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
9114  if (kcountHBnegativedirectionRecosignal1 == 11)
9115  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
9116  if (kcountHBnegativedirectionRecosignal1 == 12)
9117  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
9118  if (kcountHBnegativedirectionRecosignal1 == 13)
9119  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
9120  if (kcountHBnegativedirectionRecosignal1 == 14)
9121  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
9122  if (kcountHBnegativedirectionRecosignal1 == 15)
9123  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
9124  if (kcountHBnegativedirectionRecosignal1 == 16)
9125  HBnegativedirectionRecosignal1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
9126  HBnegativedirectionRecosignal1->Draw("Error");
9127  kcountHBnegativedirectionRecosignal1++;
9128  if (kcountHBnegativedirectionRecosignal1 > 16)
9129  break; //
9130  } //ccctest>0
9131 
9132  } // for i
9133  } //if(jeta-41 < 0 )
9134  } //for jeta
9136  c3x5->Update();
9137  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
9138  c3x5->Clear();
9139  // clean-up
9140  if (h2CeffHBnegativedirectionRecosignal1)
9141  delete h2CeffHBnegativedirectionRecosignal1;
9142 
9143  //========================================================================================== 1115
9144  //======================================================================
9145  //======================================================================1D plot: R vs phi , different eta, depth=2
9146  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
9147  c3x5->Clear();
9149  c3x5->Divide(4, 4);
9150  c3x5->cd(1);
9151  int kcountHBnegativedirectionRecosignal2 = 1;
9152  TH1F* h2CeffHBnegativedirectionRecosignal2 = new TH1F("h2CeffHBnegativedirectionRecosignal2", "", nphi, 0., 72.);
9153  for (int jeta = 0; jeta < njeta; jeta++) {
9154  // negativedirectionRecosignal:
9155  if (jeta - 41 < 0) {
9156  // for (int i=0;i<ndepth;i++) {
9157  // depth=2
9158  for (int i = 1; i < 2; i++) {
9159  TH1F* HBnegativedirectionRecosignal2 = (TH1F*)h2CeffHBnegativedirectionRecosignal2->Clone("twod1");
9160  float ccctest = 0; // to avoid empty massive elements
9161  for (int jphi = 0; jphi < nphi; jphi++) {
9162  double ccc1 = arecosignalHB[i][jeta][jphi];
9163  if (ccc1 != 0.) {
9164  HBnegativedirectionRecosignal2->Fill(jphi, ccc1);
9165  ccctest = 1.; //HBnegativedirectionRecosignal2->SetBinError(i,0.01);
9166  }
9167  } // for jphi
9168  if (ccctest > 0.) {
9169  //cout<<"555 kcountHBnegativedirectionRecosignal2 = "<<kcountHBnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
9170  c3x5->cd(kcountHBnegativedirectionRecosignal2);
9171  HBnegativedirectionRecosignal2->SetMarkerStyle(20);
9172  HBnegativedirectionRecosignal2->SetMarkerSize(0.4);
9173  HBnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
9174  HBnegativedirectionRecosignal2->SetXTitle("HBnegativedirectionRecosignal2 \b");
9175  HBnegativedirectionRecosignal2->SetMarkerColor(2);
9176  HBnegativedirectionRecosignal2->SetLineColor(0);
9177  gPad->SetGridy();
9178  gPad->SetGridx();
9179  // gPad->SetLogy();
9180  if (kcountHBnegativedirectionRecosignal2 == 1)
9181  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
9182  if (kcountHBnegativedirectionRecosignal2 == 2)
9183  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
9184  if (kcountHBnegativedirectionRecosignal2 == 3)
9185  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
9186  if (kcountHBnegativedirectionRecosignal2 == 4)
9187  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
9188  if (kcountHBnegativedirectionRecosignal2 == 5)
9189  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
9190  if (kcountHBnegativedirectionRecosignal2 == 6)
9191  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
9192  if (kcountHBnegativedirectionRecosignal2 == 7)
9193  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
9194  if (kcountHBnegativedirectionRecosignal2 == 8)
9195  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
9196  if (kcountHBnegativedirectionRecosignal2 == 9)
9197  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
9198  if (kcountHBnegativedirectionRecosignal2 == 10)
9199  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
9200  if (kcountHBnegativedirectionRecosignal2 == 11)
9201  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
9202  if (kcountHBnegativedirectionRecosignal2 == 12)
9203  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
9204  if (kcountHBnegativedirectionRecosignal2 == 13)
9205  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
9206  if (kcountHBnegativedirectionRecosignal2 == 14)
9207  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
9208  if (kcountHBnegativedirectionRecosignal2 == 15)
9209  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
9210  if (kcountHBnegativedirectionRecosignal2 == 16)
9211  HBnegativedirectionRecosignal2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
9212  HBnegativedirectionRecosignal2->Draw("Error");
9213  kcountHBnegativedirectionRecosignal2++;
9214  if (kcountHBnegativedirectionRecosignal2 > 16)
9215  break; // 4x6 = 24
9216  } //ccctest>0
9217 
9218  } // for i
9219  } //if(jeta-41 < 0 )
9220  } //for jeta
9222  c3x5->Update();
9223  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
9224  c3x5->Clear();
9225  // clean-up
9226  if (h2CeffHBnegativedirectionRecosignal2)
9227  delete h2CeffHBnegativedirectionRecosignal2;
9228  //========================================================================================== 1116
9229  //======================================================================
9230  //======================================================================1D plot: R vs phi , different eta, depth=3
9231  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
9232  c3x5->Clear();
9234  c3x5->Divide(4, 4);
9235  c3x5->cd(1);
9236  int kcountHBnegativedirectionRecosignal3 = 1;
9237  TH1F* h2CeffHBnegativedirectionRecosignal3 = new TH1F("h2CeffHBnegativedirectionRecosignal3", "", nphi, 0., 72.);
9238  for (int jeta = 0; jeta < njeta; jeta++) {
9239  // negativedirectionRecosignal:
9240  if (jeta - 41 < 0) {
9241  // for (int i=0;i<ndepth;i++) {
9242  // depth=3
9243  for (int i = 2; i < 3; i++) {
9244  TH1F* HBnegativedirectionRecosignal3 = (TH1F*)h2CeffHBnegativedirectionRecosignal3->Clone("twod1");
9245  float ccctest = 0; // to avoid empty massive elements
9246  for (int jphi = 0; jphi < nphi; jphi++) {
9247  double ccc1 = arecosignalHB[i][jeta][jphi];
9248  if (ccc1 != 0.) {
9249  HBnegativedirectionRecosignal3->Fill(jphi, ccc1);
9250  ccctest = 1.; //HBnegativedirectionRecosignal3->SetBinError(i,0.01);
9251  }
9252  } // for jphi
9253  if (ccctest > 0.) {
9254  //cout<<"666 kcountHBnegativedirectionRecosignal3 = "<<kcountHBnegativedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
9255  c3x5->cd(kcountHBnegativedirectionRecosignal3);
9256  HBnegativedirectionRecosignal3->SetMarkerStyle(20);
9257  HBnegativedirectionRecosignal3->SetMarkerSize(0.4);
9258  HBnegativedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
9259  HBnegativedirectionRecosignal3->SetXTitle("HBnegativedirectionRecosignal3 \b");
9260  HBnegativedirectionRecosignal3->SetMarkerColor(2);
9261  HBnegativedirectionRecosignal3->SetLineColor(0);
9262  gPad->SetGridy();
9263  gPad->SetGridx();
9264  // gPad->SetLogy();
9265  if (kcountHBnegativedirectionRecosignal3 == 1)
9266  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
9267  if (kcountHBnegativedirectionRecosignal3 == 2)
9268  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
9269  if (kcountHBnegativedirectionRecosignal3 == 3)
9270  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
9271  if (kcountHBnegativedirectionRecosignal3 == 4)
9272  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
9273  if (kcountHBnegativedirectionRecosignal3 == 5)
9274  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
9275  if (kcountHBnegativedirectionRecosignal3 == 6)
9276  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
9277  if (kcountHBnegativedirectionRecosignal3 == 7)
9278  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
9279  if (kcountHBnegativedirectionRecosignal3 == 8)
9280  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
9281  if (kcountHBnegativedirectionRecosignal3 == 9)
9282  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
9283  if (kcountHBnegativedirectionRecosignal3 == 10)
9284  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
9285  if (kcountHBnegativedirectionRecosignal3 == 11)
9286  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
9287  if (kcountHBnegativedirectionRecosignal3 == 12)
9288  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
9289  if (kcountHBnegativedirectionRecosignal3 == 13)
9290  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
9291  if (kcountHBnegativedirectionRecosignal3 == 14)
9292  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
9293  if (kcountHBnegativedirectionRecosignal3 == 15)
9294  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
9295  if (kcountHBnegativedirectionRecosignal3 == 16)
9296  HBnegativedirectionRecosignal3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
9297 
9298  HBnegativedirectionRecosignal3->Draw("Error");
9299  kcountHBnegativedirectionRecosignal3++;
9300  if (kcountHBnegativedirectionRecosignal3 > 16)
9301  break; // 4x6 = 24
9302  } //ccctest>0
9303 
9304  } // for i
9305  } //if(jeta-41 < 0 )
9306  } //for jeta
9308  c3x5->Update();
9309  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
9310  c3x5->Clear();
9311  // clean-up
9312  if (h2CeffHBnegativedirectionRecosignal3)
9313  delete h2CeffHBnegativedirectionRecosignal3;
9314  //========================================================================================== 1117
9315  //======================================================================
9316  //======================================================================1D plot: R vs phi , different eta, depth=4
9317  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
9318  c3x5->Clear();
9320  c3x5->Divide(4, 4);
9321  c3x5->cd(1);
9322  int kcountHBnegativedirectionRecosignal4 = 1;
9323  TH1F* h2CeffHBnegativedirectionRecosignal4 = new TH1F("h2CeffHBnegativedirectionRecosignal4", "", nphi, 0., 72.);
9324 
9325  for (int jeta = 0; jeta < njeta; jeta++) {
9326  // negativedirectionRecosignal:
9327  if (jeta - 41 < 0) {
9328  // for (int i=0;i<ndepth;i++) {
9329  // depth=4
9330  for (int i = 3; i < 4; i++) {
9331  TH1F* HBnegativedirectionRecosignal4 = (TH1F*)h2CeffHBnegativedirectionRecosignal4->Clone("twod1");
9332 
9333  float ccctest = 0; // to avoid empty massive elements
9334  for (int jphi = 0; jphi < nphi; jphi++) {
9335  double ccc1 = arecosignalHB[i][jeta][jphi];
9336  if (ccc1 != 0.) {
9337  HBnegativedirectionRecosignal4->Fill(jphi, ccc1);
9338  ccctest = 1.; //HBnegativedirectionRecosignal4->SetBinError(i,0.01);
9339  }
9340  } // for jphi
9341  if (ccctest > 0.) {
9342  //cout<<"777 kcountHBnegativedirectionRecosignal4 = "<<kcountHBnegativedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
9343  c3x5->cd(kcountHBnegativedirectionRecosignal4);
9344  HBnegativedirectionRecosignal4->SetMarkerStyle(20);
9345  HBnegativedirectionRecosignal4->SetMarkerSize(0.4);
9346  HBnegativedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
9347  HBnegativedirectionRecosignal4->SetXTitle("HBnegativedirectionRecosignal4 \b");
9348  HBnegativedirectionRecosignal4->SetMarkerColor(2);
9349  HBnegativedirectionRecosignal4->SetLineColor(0);
9350  gPad->SetGridy();
9351  gPad->SetGridx();
9352  // gPad->SetLogy();
9353  if (kcountHBnegativedirectionRecosignal4 == 1)
9354  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
9355  if (kcountHBnegativedirectionRecosignal4 == 2)
9356  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
9357  if (kcountHBnegativedirectionRecosignal4 == 3)
9358  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
9359  if (kcountHBnegativedirectionRecosignal4 == 4)
9360  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
9361  if (kcountHBnegativedirectionRecosignal4 == 5)
9362  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
9363  if (kcountHBnegativedirectionRecosignal4 == 6)
9364  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
9365  if (kcountHBnegativedirectionRecosignal4 == 7)
9366  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
9367  if (kcountHBnegativedirectionRecosignal4 == 8)
9368  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
9369  if (kcountHBnegativedirectionRecosignal4 == 9)
9370  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
9371  if (kcountHBnegativedirectionRecosignal4 == 10)
9372  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
9373  if (kcountHBnegativedirectionRecosignal4 == 11)
9374  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
9375  if (kcountHBnegativedirectionRecosignal4 == 12)
9376  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
9377  if (kcountHBnegativedirectionRecosignal4 == 13)
9378  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
9379  if (kcountHBnegativedirectionRecosignal4 == 14)
9380  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
9381  if (kcountHBnegativedirectionRecosignal4 == 15)
9382  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
9383  if (kcountHBnegativedirectionRecosignal4 == 16)
9384  HBnegativedirectionRecosignal4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
9385  HBnegativedirectionRecosignal4->Draw("Error");
9386  kcountHBnegativedirectionRecosignal4++;
9387  if (kcountHBnegativedirectionRecosignal4 > 16)
9388  break; // 4x6 = 24
9389  } //ccctest>0
9390 
9391  } // for i
9392  } //if(jeta-41 < 0 )
9393  } //for jeta
9395  c3x5->Update();
9396  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
9397  c3x5->Clear();
9398  // clean-up
9399  if (h2CeffHBnegativedirectionRecosignal4)
9400  delete h2CeffHBnegativedirectionRecosignal4;
9401 
9402  //======================================================================================================================
9403  //======================================================================================================================
9404  //======================================================================================================================
9405  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
9406 
9407  //cout<<" Start Vaiance: preparation *****" <<endl;
9408  TH2F* recosignalVariance1HB1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HB1");
9409  TH2F* recosignalVariance0HB1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB1");
9410  TH2F* recosignalVarianceHB1 = (TH2F*)recosignalVariance1HB1->Clone("recosignalVarianceHB1");
9411  recosignalVarianceHB1->Divide(recosignalVariance1HB1, recosignalVariance0HB1, 1, 1, "B");
9412  TH2F* recosignalVariance1HB2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HB2");
9413  TH2F* recosignalVariance0HB2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB2");
9414  TH2F* recosignalVarianceHB2 = (TH2F*)recosignalVariance1HB2->Clone("recosignalVarianceHB2");
9415  recosignalVarianceHB2->Divide(recosignalVariance1HB2, recosignalVariance0HB2, 1, 1, "B");
9416  TH2F* recosignalVariance1HB3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HB3");
9417  TH2F* recosignalVariance0HB3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB3");
9418  TH2F* recosignalVarianceHB3 = (TH2F*)recosignalVariance1HB3->Clone("recosignalVarianceHB3");
9419  recosignalVarianceHB3->Divide(recosignalVariance1HB3, recosignalVariance0HB3, 1, 1, "B");
9420  TH2F* recosignalVariance1HB4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HB4");
9421  TH2F* recosignalVariance0HB4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HB4");
9422  TH2F* recosignalVarianceHB4 = (TH2F*)recosignalVariance1HB4->Clone("recosignalVarianceHB4");
9423  recosignalVarianceHB4->Divide(recosignalVariance1HB4, recosignalVariance0HB4, 1, 1, "B");
9424  //cout<<" Vaiance: preparation DONE *****" <<endl;
9425  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvarianceHB
9426  // = sum(R*R)/N - (sum(R)/N)**2
9427  for (int jeta = 0; jeta < njeta; jeta++) {
9428  //preparation for PHI normalization:
9429  double sumrecosignalHB0 = 0;
9430  int nsumrecosignalHB0 = 0;
9431  double sumrecosignalHB1 = 0;
9432  int nsumrecosignalHB1 = 0;
9433  double sumrecosignalHB2 = 0;
9434  int nsumrecosignalHB2 = 0;
9435  double sumrecosignalHB3 = 0;
9436  int nsumrecosignalHB3 = 0;
9437  for (int jphi = 0; jphi < njphi; jphi++) {
9438  recosignalvarianceHB[0][jeta][jphi] = recosignalVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
9439  recosignalvarianceHB[1][jeta][jphi] = recosignalVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
9440  recosignalvarianceHB[2][jeta][jphi] = recosignalVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
9441  recosignalvarianceHB[3][jeta][jphi] = recosignalVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
9442  if (recosignalvarianceHB[0][jeta][jphi] > 0.) {
9443  sumrecosignalHB0 += recosignalvarianceHB[0][jeta][jphi];
9444  ++nsumrecosignalHB0;
9445  }
9446  if (recosignalvarianceHB[1][jeta][jphi] > 0.) {
9447  sumrecosignalHB1 += recosignalvarianceHB[1][jeta][jphi];
9448  ++nsumrecosignalHB1;
9449  }
9450  if (recosignalvarianceHB[2][jeta][jphi] > 0.) {
9451  sumrecosignalHB2 += recosignalvarianceHB[2][jeta][jphi];
9452  ++nsumrecosignalHB2;
9453  }
9454  if (recosignalvarianceHB[3][jeta][jphi] > 0.) {
9455  sumrecosignalHB3 += recosignalvarianceHB[3][jeta][jphi];
9456  ++nsumrecosignalHB3;
9457  }
9458  } // phi
9459  // PHI normalization :
9460  for (int jphi = 0; jphi < njphi; jphi++) {
9461  if (recosignalvarianceHB[0][jeta][jphi] > 0.)
9462  recosignalvarianceHB[0][jeta][jphi] /= (sumrecosignalHB0 / nsumrecosignalHB0);
9463  if (recosignalvarianceHB[1][jeta][jphi] > 0.)
9464  recosignalvarianceHB[1][jeta][jphi] /= (sumrecosignalHB1 / nsumrecosignalHB1);
9465  if (recosignalvarianceHB[2][jeta][jphi] > 0.)
9466  recosignalvarianceHB[2][jeta][jphi] /= (sumrecosignalHB2 / nsumrecosignalHB2);
9467  if (recosignalvarianceHB[3][jeta][jphi] > 0.)
9468  recosignalvarianceHB[3][jeta][jphi] /= (sumrecosignalHB3 / nsumrecosignalHB3);
9469  } // phi
9470  // recosignalvarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
9471  for (int jphi = 0; jphi < njphi; jphi++) {
9472  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
9473  recosignalvarianceHB[0][jeta][jphi] -= arecosignalHB[0][jeta][jphi] * arecosignalHB[0][jeta][jphi];
9474  recosignalvarianceHB[0][jeta][jphi] = fabs(recosignalvarianceHB[0][jeta][jphi]);
9475  recosignalvarianceHB[1][jeta][jphi] -= arecosignalHB[1][jeta][jphi] * arecosignalHB[1][jeta][jphi];
9476  recosignalvarianceHB[1][jeta][jphi] = fabs(recosignalvarianceHB[1][jeta][jphi]);
9477  recosignalvarianceHB[2][jeta][jphi] -= arecosignalHB[2][jeta][jphi] * arecosignalHB[2][jeta][jphi];
9478  recosignalvarianceHB[2][jeta][jphi] = fabs(recosignalvarianceHB[2][jeta][jphi]);
9479  recosignalvarianceHB[3][jeta][jphi] -= arecosignalHB[3][jeta][jphi] * arecosignalHB[3][jeta][jphi];
9480  recosignalvarianceHB[3][jeta][jphi] = fabs(recosignalvarianceHB[3][jeta][jphi]);
9481  }
9482  }
9483  //cout<<" Vaiance: DONE*****" <<endl;
9484  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
9485  //======================================================================
9486  //======================================================================
9487  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
9488  c1x1->Clear();
9490  c1x0->Divide(1, 1);
9491  c1x0->cd(1);
9492  TH2F* DefzDrecosignalHB42D = new TH2F("DefzDrecosignalHB42D", "", neta, -41., 41., nphi, 0., 72.);
9493  TH2F* DefzDrecosignalHB42D0 = new TH2F("DefzDrecosignalHB42D0", "", neta, -41., 41., nphi, 0., 72.);
9494  TH2F* DefzDrecosignalHB42DF = (TH2F*)DefzDrecosignalHB42D0->Clone("DefzDrecosignalHB42DF");
9495  for (int i = 0; i < ndepth; i++) {
9496  for (int jeta = 0; jeta < neta; jeta++) {
9497  for (int jphi = 0; jphi < nphi; jphi++) {
9498  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9499  int k2plot = jeta - 41;
9500  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
9501  if (arecosignalHB[i][jeta][jphi] > 0.) {
9502  DefzDrecosignalHB42D->Fill(kkk, jphi, ccc1);
9503  DefzDrecosignalHB42D0->Fill(kkk, jphi, 1.);
9504  }
9505  }
9506  }
9507  }
9508  DefzDrecosignalHB42DF->Divide(DefzDrecosignalHB42D, DefzDrecosignalHB42D0, 1, 1, "B"); // average A
9509  // DefzDrecosignalHB1->Sumw2();
9510  gPad->SetGridy();
9511  gPad->SetGridx(); // gPad->SetLogz();
9512  DefzDrecosignalHB42DF->SetMarkerStyle(20);
9513  DefzDrecosignalHB42DF->SetMarkerSize(0.4);
9514  DefzDrecosignalHB42DF->GetZaxis()->SetLabelSize(0.08);
9515  DefzDrecosignalHB42DF->SetXTitle("<D>_depth #eta \b");
9516  DefzDrecosignalHB42DF->SetYTitle(" #phi \b");
9517  DefzDrecosignalHB42DF->SetZTitle("<D>_depth \b");
9518  DefzDrecosignalHB42DF->SetMarkerColor(2);
9519  DefzDrecosignalHB42DF->SetLineColor(
9520  0); // DefzDrecosignalHB42DF->SetMaximum(1.000); // DefzDrecosignalHB42DF->SetMinimum(1.0);
9521  DefzDrecosignalHB42DF->Draw("COLZ");
9523  c1x0->Update();
9524  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHB.png");
9525  c1x0->Clear();
9526  // clean-up
9527  if (DefzDrecosignalHB42D)
9528  delete DefzDrecosignalHB42D;
9529  if (DefzDrecosignalHB42D0)
9530  delete DefzDrecosignalHB42D0;
9531  if (DefzDrecosignalHB42DF)
9532  delete DefzDrecosignalHB42DF;
9533  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
9534  //======================================================================
9535  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
9536  c1x1->Clear();
9538  c1x1->Divide(1, 1);
9539  c1x1->cd(1);
9540  TH1F* DefzDrecosignalHB41D = new TH1F("DefzDrecosignalHB41D", "", nphi, 0., 72.);
9541  TH1F* DefzDrecosignalHB41D0 = new TH1F("DefzDrecosignalHB41D0", "", nphi, 0., 72.);
9542  TH1F* DefzDrecosignalHB41DF = (TH1F*)DefzDrecosignalHB41D0->Clone("DefzDrecosignalHB41DF");
9543 
9544  for (int jphi = 0; jphi < nphi; jphi++) {
9545  for (int jeta = 0; jeta < neta; jeta++) {
9546  for (int i = 0; i < ndepth; i++) {
9547  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9548  if (arecosignalHB[i][jeta][jphi] > 0.) {
9549  DefzDrecosignalHB41D->Fill(jphi, ccc1);
9550  DefzDrecosignalHB41D0->Fill(jphi, 1.);
9551  }
9552  }
9553  }
9554  }
9555  // DefzDrecosignalHB41D->Sumw2();DefzDrecosignalHB41D0->Sumw2();
9556 
9557  DefzDrecosignalHB41DF->Divide(
9558  DefzDrecosignalHB41D, DefzDrecosignalHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
9559  DefzDrecosignalHB41D0->Sumw2();
9560  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHB41DF->SetBinError(jphi,0.01);}
9561  gPad->SetGridy();
9562  gPad->SetGridx(); // gPad->SetLogz();
9563  DefzDrecosignalHB41DF->SetMarkerStyle(20);
9564  DefzDrecosignalHB41DF->SetMarkerSize(1.4);
9565  DefzDrecosignalHB41DF->GetZaxis()->SetLabelSize(0.08);
9566  DefzDrecosignalHB41DF->SetXTitle("#phi \b");
9567  DefzDrecosignalHB41DF->SetYTitle(" <D> \b");
9568  DefzDrecosignalHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
9569  DefzDrecosignalHB41DF->SetMarkerColor(4);
9570  DefzDrecosignalHB41DF->SetLineColor(
9571  4); // DefzDrecosignalHB41DF->SetMinimum(0.8); DefzDrecosignalHB41DF->SetMinimum(-0.015);
9572  DefzDrecosignalHB41DF->Draw("Error");
9574  c1x1->Update();
9575  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHB.png");
9576  c1x1->Clear();
9577  // clean-up
9578  if (DefzDrecosignalHB41D)
9579  delete DefzDrecosignalHB41D;
9580  if (DefzDrecosignalHB41D0)
9581  delete DefzDrecosignalHB41D0;
9582  if (DefzDrecosignalHB41DF)
9583  delete DefzDrecosignalHB41DF;
9584 
9585  //========================================================================================== 14
9586  //======================================================================
9587  //======================================================================1D plot: D vs phi , different eta, depth=1
9588  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
9589  c3x5->Clear();
9591  c3x5->Divide(4, 4);
9592  c3x5->cd(1);
9593  int kcountHBpositivedirectionRecosignalD1 = 1;
9594  TH1F* h2CeffHBpositivedirectionRecosignalD1 = new TH1F("h2CeffHBpositivedirectionRecosignalD1", "", nphi, 0., 72.);
9595 
9596  for (int jeta = 0; jeta < njeta; jeta++) {
9597  // positivedirectionRecosignalD:
9598  if (jeta - 41 >= 0) {
9599  // for (int i=0;i<ndepth;i++) {
9600  // depth=1
9601  for (int i = 0; i < 1; i++) {
9602  TH1F* HBpositivedirectionRecosignalD1 = (TH1F*)h2CeffHBpositivedirectionRecosignalD1->Clone("twod1");
9603 
9604  float ccctest = 0; // to avoid empty massive elements
9605  for (int jphi = 0; jphi < nphi; jphi++) {
9606  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9607  if (arecosignalHB[i][jeta][jphi] > 0.) {
9608  HBpositivedirectionRecosignalD1->Fill(jphi, ccc1);
9609  ccctest = 1.; //HBpositivedirectionRecosignalD1->SetBinError(i,0.01);
9610  }
9611  } // for jphi
9612  if (ccctest > 0.) {
9613  //cout<<"1414 kcountHBpositivedirectionRecosignalD1 = "<<kcountHBpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
9614  c3x5->cd(kcountHBpositivedirectionRecosignalD1);
9615  HBpositivedirectionRecosignalD1->SetMarkerStyle(20);
9616  HBpositivedirectionRecosignalD1->SetMarkerSize(0.4);
9617  HBpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
9618  HBpositivedirectionRecosignalD1->SetXTitle("HBpositivedirectionRecosignalD1 \b");
9619  HBpositivedirectionRecosignalD1->SetMarkerColor(2);
9620  HBpositivedirectionRecosignalD1->SetLineColor(0);
9621  gPad->SetGridy();
9622  gPad->SetGridx();
9623  // gPad->SetLogy();
9624  if (kcountHBpositivedirectionRecosignalD1 == 1)
9625  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
9626  if (kcountHBpositivedirectionRecosignalD1 == 2)
9627  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
9628  if (kcountHBpositivedirectionRecosignalD1 == 3)
9629  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
9630  if (kcountHBpositivedirectionRecosignalD1 == 4)
9631  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
9632  if (kcountHBpositivedirectionRecosignalD1 == 5)
9633  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
9634  if (kcountHBpositivedirectionRecosignalD1 == 6)
9635  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
9636  if (kcountHBpositivedirectionRecosignalD1 == 7)
9637  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
9638  if (kcountHBpositivedirectionRecosignalD1 == 8)
9639  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
9640  if (kcountHBpositivedirectionRecosignalD1 == 9)
9641  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
9642  if (kcountHBpositivedirectionRecosignalD1 == 10)
9643  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
9644  if (kcountHBpositivedirectionRecosignalD1 == 11)
9645  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
9646  if (kcountHBpositivedirectionRecosignalD1 == 12)
9647  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
9648  if (kcountHBpositivedirectionRecosignalD1 == 13)
9649  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
9650  if (kcountHBpositivedirectionRecosignalD1 == 14)
9651  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
9652  if (kcountHBpositivedirectionRecosignalD1 == 15)
9653  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
9654  if (kcountHBpositivedirectionRecosignalD1 == 16)
9655  HBpositivedirectionRecosignalD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
9656  HBpositivedirectionRecosignalD1->Draw("Error");
9657  kcountHBpositivedirectionRecosignalD1++;
9658  if (kcountHBpositivedirectionRecosignalD1 > 16)
9659  break; // 4x6 = 24
9660  } //ccctest>0
9661 
9662  } // for i
9663  } //if(jeta-41 >= 0)
9664  } //for jeta
9666  c3x5->Update();
9667  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png");
9668  c3x5->Clear();
9669  // clean-up
9670  if (h2CeffHBpositivedirectionRecosignalD1)
9671  delete h2CeffHBpositivedirectionRecosignalD1;
9672  //========================================================================================== 15
9673  //======================================================================
9674  //======================================================================1D plot: D vs phi , different eta, depth=2
9675  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
9676  c3x5->Clear();
9677  c3x5->Divide(4, 4);
9678  c3x5->cd(1);
9679  int kcountHBpositivedirectionRecosignalD2 = 1;
9680  TH1F* h2CeffHBpositivedirectionRecosignalD2 = new TH1F("h2CeffHBpositivedirectionRecosignalD2", "", nphi, 0., 72.);
9681 
9682  for (int jeta = 0; jeta < njeta; jeta++) {
9683  // positivedirectionRecosignalD:
9684  if (jeta - 41 >= 0) {
9685  // for (int i=0;i<ndepth;i++) {
9686  // depth=2
9687  for (int i = 1; i < 2; i++) {
9688  TH1F* HBpositivedirectionRecosignalD2 = (TH1F*)h2CeffHBpositivedirectionRecosignalD2->Clone("twod1");
9689 
9690  float ccctest = 0; // to avoid empty massive elements
9691  for (int jphi = 0; jphi < nphi; jphi++) {
9692  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9693  if (arecosignalHB[i][jeta][jphi] > 0.) {
9694  HBpositivedirectionRecosignalD2->Fill(jphi, ccc1);
9695  ccctest = 1.; //HBpositivedirectionRecosignalD2->SetBinError(i,0.01);
9696  }
9697  } // for jphi
9698  if (ccctest > 0.) {
9699  //cout<<"1515 kcountHBpositivedirectionRecosignalD2 = "<<kcountHBpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
9700  c3x5->cd(kcountHBpositivedirectionRecosignalD2);
9701  HBpositivedirectionRecosignalD2->SetMarkerStyle(20);
9702  HBpositivedirectionRecosignalD2->SetMarkerSize(0.4);
9703  HBpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
9704  HBpositivedirectionRecosignalD2->SetXTitle("HBpositivedirectionRecosignalD2 \b");
9705  HBpositivedirectionRecosignalD2->SetMarkerColor(2);
9706  HBpositivedirectionRecosignalD2->SetLineColor(0);
9707  gPad->SetGridy();
9708  gPad->SetGridx();
9709  // gPad->SetLogy();
9710  if (kcountHBpositivedirectionRecosignalD2 == 1)
9711  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
9712  if (kcountHBpositivedirectionRecosignalD2 == 2)
9713  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
9714  if (kcountHBpositivedirectionRecosignalD2 == 3)
9715  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
9716  if (kcountHBpositivedirectionRecosignalD2 == 4)
9717  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
9718  if (kcountHBpositivedirectionRecosignalD2 == 5)
9719  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
9720  if (kcountHBpositivedirectionRecosignalD2 == 6)
9721  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
9722  if (kcountHBpositivedirectionRecosignalD2 == 7)
9723  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
9724  if (kcountHBpositivedirectionRecosignalD2 == 8)
9725  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
9726  if (kcountHBpositivedirectionRecosignalD2 == 9)
9727  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
9728  if (kcountHBpositivedirectionRecosignalD2 == 10)
9729  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
9730  if (kcountHBpositivedirectionRecosignalD2 == 11)
9731  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
9732  if (kcountHBpositivedirectionRecosignalD2 == 12)
9733  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
9734  if (kcountHBpositivedirectionRecosignalD2 == 13)
9735  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
9736  if (kcountHBpositivedirectionRecosignalD2 == 14)
9737  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
9738  if (kcountHBpositivedirectionRecosignalD2 == 15)
9739  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
9740  if (kcountHBpositivedirectionRecosignalD2 == 16)
9741  HBpositivedirectionRecosignalD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
9742  HBpositivedirectionRecosignalD2->Draw("Error");
9743  kcountHBpositivedirectionRecosignalD2++;
9744  if (kcountHBpositivedirectionRecosignalD2 > 16)
9745  break; // 4x6 = 24
9746  } //ccctest>0
9747 
9748  } // for i
9749  } //if(jeta-41 >= 0)
9750  } //for jeta
9752  c3x5->Update();
9753  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png");
9754  c3x5->Clear();
9755  // clean-up
9756  if (h2CeffHBpositivedirectionRecosignalD2)
9757  delete h2CeffHBpositivedirectionRecosignalD2;
9758  //========================================================================================== 16
9759  //======================================================================
9760  //======================================================================1D plot: D vs phi , different eta, depth=3
9761  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
9762  c3x5->Clear();
9763  c3x5->Divide(4, 4);
9764  c3x5->cd(1);
9765  int kcountHBpositivedirectionRecosignalD3 = 1;
9766  TH1F* h2CeffHBpositivedirectionRecosignalD3 = new TH1F("h2CeffHBpositivedirectionRecosignalD3", "", nphi, 0., 72.);
9767 
9768  for (int jeta = 0; jeta < njeta; jeta++) {
9769  // positivedirectionRecosignalD:
9770  if (jeta - 41 >= 0) {
9771  // for (int i=0;i<ndepth;i++) {
9772  // depth=3
9773  for (int i = 2; i < 3; i++) {
9774  TH1F* HBpositivedirectionRecosignalD3 = (TH1F*)h2CeffHBpositivedirectionRecosignalD3->Clone("twod1");
9775 
9776  float ccctest = 0; // to avoid empty massive elements
9777  for (int jphi = 0; jphi < nphi; jphi++) {
9778  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9779  if (arecosignalHB[i][jeta][jphi] > 0.) {
9780  HBpositivedirectionRecosignalD3->Fill(jphi, ccc1);
9781  ccctest = 1.; //HBpositivedirectionRecosignalD3->SetBinError(i,0.01);
9782  }
9783  } // for jphi
9784  if (ccctest > 0.) {
9785  //cout<<"1616 kcountHBpositivedirectionRecosignalD3 = "<<kcountHBpositivedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
9786  c3x5->cd(kcountHBpositivedirectionRecosignalD3);
9787  HBpositivedirectionRecosignalD3->SetMarkerStyle(20);
9788  HBpositivedirectionRecosignalD3->SetMarkerSize(0.4);
9789  HBpositivedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
9790  HBpositivedirectionRecosignalD3->SetXTitle("HBpositivedirectionRecosignalD3 \b");
9791  HBpositivedirectionRecosignalD3->SetMarkerColor(2);
9792  HBpositivedirectionRecosignalD3->SetLineColor(0);
9793  gPad->SetGridy();
9794  gPad->SetGridx();
9795  // gPad->SetLogy();
9796  if (kcountHBpositivedirectionRecosignalD3 == 1)
9797  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
9798  if (kcountHBpositivedirectionRecosignalD3 == 2)
9799  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
9800  if (kcountHBpositivedirectionRecosignalD3 == 3)
9801  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
9802  if (kcountHBpositivedirectionRecosignalD3 == 4)
9803  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
9804  if (kcountHBpositivedirectionRecosignalD3 == 5)
9805  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
9806  if (kcountHBpositivedirectionRecosignalD3 == 6)
9807  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
9808  if (kcountHBpositivedirectionRecosignalD3 == 7)
9809  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
9810  if (kcountHBpositivedirectionRecosignalD3 == 8)
9811  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
9812  if (kcountHBpositivedirectionRecosignalD3 == 9)
9813  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
9814  if (kcountHBpositivedirectionRecosignalD3 == 10)
9815  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
9816  if (kcountHBpositivedirectionRecosignalD3 == 11)
9817  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
9818  if (kcountHBpositivedirectionRecosignalD3 == 12)
9819  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
9820  if (kcountHBpositivedirectionRecosignalD3 == 13)
9821  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
9822  if (kcountHBpositivedirectionRecosignalD3 == 14)
9823  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
9824  if (kcountHBpositivedirectionRecosignalD3 == 15)
9825  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
9826  if (kcountHBpositivedirectionRecosignalD3 == 16)
9827  HBpositivedirectionRecosignalD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
9828  HBpositivedirectionRecosignalD3->Draw("Error");
9829  kcountHBpositivedirectionRecosignalD3++;
9830  if (kcountHBpositivedirectionRecosignalD3 > 16)
9831  break; // 4x6 = 24
9832  } //ccctest>0
9833 
9834  } // for i
9835  } //if(jeta-41 >= 0)
9836  } //for jeta
9838  c3x5->Update();
9839  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png");
9840  c3x5->Clear();
9841  // clean-up
9842  if (h2CeffHBpositivedirectionRecosignalD3)
9843  delete h2CeffHBpositivedirectionRecosignalD3;
9844  //========================================================================================== 17
9845  //======================================================================
9846  //======================================================================1D plot: D vs phi , different eta, depth=4
9847  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
9848  c3x5->Clear();
9849  c3x5->Divide(4, 4);
9850  c3x5->cd(1);
9851  int kcountHBpositivedirectionRecosignalD4 = 1;
9852  TH1F* h2CeffHBpositivedirectionRecosignalD4 = new TH1F("h2CeffHBpositivedirectionRecosignalD4", "", nphi, 0., 72.);
9853 
9854  for (int jeta = 0; jeta < njeta; jeta++) {
9855  // positivedirectionRecosignalD:
9856  if (jeta - 41 >= 0) {
9857  // for (int i=0;i<ndepth;i++) {
9858  // depth=4
9859  for (int i = 3; i < 4; i++) {
9860  TH1F* HBpositivedirectionRecosignalD4 = (TH1F*)h2CeffHBpositivedirectionRecosignalD4->Clone("twod1");
9861 
9862  float ccctest = 0; // to avoid empty massive elements
9863  for (int jphi = 0; jphi < nphi; jphi++) {
9864  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9865  if (arecosignalHB[i][jeta][jphi] > 0.) {
9866  HBpositivedirectionRecosignalD4->Fill(jphi, ccc1);
9867  ccctest = 1.; //HBpositivedirectionRecosignalD4->SetBinError(i,0.01);
9868  }
9869  } // for jphi
9870  if (ccctest > 0.) {
9871  //cout<<"1717 kcountHBpositivedirectionRecosignalD4 = "<<kcountHBpositivedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
9872  c3x5->cd(kcountHBpositivedirectionRecosignalD4);
9873  HBpositivedirectionRecosignalD4->SetMarkerStyle(20);
9874  HBpositivedirectionRecosignalD4->SetMarkerSize(0.4);
9875  HBpositivedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
9876  HBpositivedirectionRecosignalD4->SetXTitle("HBpositivedirectionRecosignalD4 \b");
9877  HBpositivedirectionRecosignalD4->SetMarkerColor(2);
9878  HBpositivedirectionRecosignalD4->SetLineColor(0);
9879  gPad->SetGridy();
9880  gPad->SetGridx();
9881  // gPad->SetLogy();
9882  if (kcountHBpositivedirectionRecosignalD4 == 1)
9883  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
9884  if (kcountHBpositivedirectionRecosignalD4 == 2)
9885  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
9886  if (kcountHBpositivedirectionRecosignalD4 == 3)
9887  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
9888  if (kcountHBpositivedirectionRecosignalD4 == 4)
9889  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
9890  if (kcountHBpositivedirectionRecosignalD4 == 5)
9891  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
9892  if (kcountHBpositivedirectionRecosignalD4 == 6)
9893  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
9894  if (kcountHBpositivedirectionRecosignalD4 == 7)
9895  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
9896  if (kcountHBpositivedirectionRecosignalD4 == 8)
9897  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
9898  if (kcountHBpositivedirectionRecosignalD4 == 9)
9899  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
9900  if (kcountHBpositivedirectionRecosignalD4 == 10)
9901  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
9902  if (kcountHBpositivedirectionRecosignalD4 == 11)
9903  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
9904  if (kcountHBpositivedirectionRecosignalD4 == 12)
9905  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
9906  if (kcountHBpositivedirectionRecosignalD4 == 13)
9907  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
9908  if (kcountHBpositivedirectionRecosignalD4 == 14)
9909  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
9910  if (kcountHBpositivedirectionRecosignalD4 == 15)
9911  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
9912  if (kcountHBpositivedirectionRecosignalD4 == 16)
9913  HBpositivedirectionRecosignalD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
9914  HBpositivedirectionRecosignalD4->Draw("Error");
9915  kcountHBpositivedirectionRecosignalD4++;
9916  if (kcountHBpositivedirectionRecosignalD4 > 16)
9917  break; // 4x6 = 24
9918  } //ccctest>0
9919 
9920  } // for i
9921  } //if(jeta-41 >= 0)
9922  } //for jeta
9924  c3x5->Update();
9925  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png");
9926  c3x5->Clear();
9927  // clean-up
9928  if (h2CeffHBpositivedirectionRecosignalD4)
9929  delete h2CeffHBpositivedirectionRecosignalD4;
9930 
9931  //========================================================================================== 22214
9932  //======================================================================
9933  //======================================================================1D plot: D vs phi , different eta, depth=1
9934  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
9935  c3x5->Clear();
9937  c3x5->Divide(4, 4);
9938  c3x5->cd(1);
9939  int kcountHBnegativedirectionRecosignalD1 = 1;
9940  TH1F* h2CeffHBnegativedirectionRecosignalD1 = new TH1F("h2CeffHBnegativedirectionRecosignalD1", "", nphi, 0., 72.);
9941 
9942  for (int jeta = 0; jeta < njeta; jeta++) {
9943  // negativedirectionRecosignalD:
9944  if (jeta - 41 < 0) {
9945  // for (int i=0;i<ndepth;i++) {
9946  // depth=1
9947  for (int i = 0; i < 1; i++) {
9948  TH1F* HBnegativedirectionRecosignalD1 = (TH1F*)h2CeffHBnegativedirectionRecosignalD1->Clone("twod1");
9949 
9950  float ccctest = 0; // to avoid empty massive elements
9951  for (int jphi = 0; jphi < nphi; jphi++) {
9952  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
9953  if (arecosignalHB[i][jeta][jphi] > 0.) {
9954  HBnegativedirectionRecosignalD1->Fill(jphi, ccc1);
9955  ccctest = 1.; //HBnegativedirectionRecosignalD1->SetBinError(i,0.01);
9956  }
9957  } // for jphi
9958  if (ccctest > 0.) {
9959  //cout<<"1414 kcountHBnegativedirectionRecosignalD1 = "<<kcountHBnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
9960  c3x5->cd(kcountHBnegativedirectionRecosignalD1);
9961  HBnegativedirectionRecosignalD1->SetMarkerStyle(20);
9962  HBnegativedirectionRecosignalD1->SetMarkerSize(0.4);
9963  HBnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
9964  HBnegativedirectionRecosignalD1->SetXTitle("HBnegativedirectionRecosignalD1 \b");
9965  HBnegativedirectionRecosignalD1->SetMarkerColor(2);
9966  HBnegativedirectionRecosignalD1->SetLineColor(0);
9967  gPad->SetGridy();
9968  gPad->SetGridx();
9969  // gPad->SetLogy();
9970  if (kcountHBnegativedirectionRecosignalD1 == 1)
9971  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -16; depth = 1 \b");
9972  if (kcountHBnegativedirectionRecosignalD1 == 2)
9973  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -15; depth = 1 \b");
9974  if (kcountHBnegativedirectionRecosignalD1 == 3)
9975  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -14; depth = 1 \b");
9976  if (kcountHBnegativedirectionRecosignalD1 == 4)
9977  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -13; depth = 1 \b");
9978  if (kcountHBnegativedirectionRecosignalD1 == 5)
9979  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -12; depth = 1 \b");
9980  if (kcountHBnegativedirectionRecosignalD1 == 6)
9981  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -11; depth = 1 \b");
9982  if (kcountHBnegativedirectionRecosignalD1 == 7)
9983  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -10; depth = 1 \b");
9984  if (kcountHBnegativedirectionRecosignalD1 == 8)
9985  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -9; depth = 1 \b");
9986  if (kcountHBnegativedirectionRecosignalD1 == 9)
9987  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -8; depth = 1 \b");
9988  if (kcountHBnegativedirectionRecosignalD1 == 10)
9989  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -7; depth = 1 \b");
9990  if (kcountHBnegativedirectionRecosignalD1 == 11)
9991  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -6; depth = 1 \b");
9992  if (kcountHBnegativedirectionRecosignalD1 == 12)
9993  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -5; depth = 1 \b");
9994  if (kcountHBnegativedirectionRecosignalD1 == 13)
9995  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -4; depth = 1 \b");
9996  if (kcountHBnegativedirectionRecosignalD1 == 14)
9997  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -3; depth = 1 \b");
9998  if (kcountHBnegativedirectionRecosignalD1 == 15)
9999  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -2; depth = 1 \b");
10000  if (kcountHBnegativedirectionRecosignalD1 == 16)
10001  HBnegativedirectionRecosignalD1->SetXTitle("D for HB- jeta = -1; depth = 1 \b");
10002  HBnegativedirectionRecosignalD1->Draw("Error");
10003  kcountHBnegativedirectionRecosignalD1++;
10004  if (kcountHBnegativedirectionRecosignalD1 > 16)
10005  break; // 4x6 = 24
10006  } //ccctest>0
10007 
10008  } // for i
10009  } //if(jeta-41 < 0)
10010  } //for jeta
10012  c3x5->Update();
10013  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
10014  c3x5->Clear();
10015  // clean-up
10016  if (h2CeffHBnegativedirectionRecosignalD1)
10017  delete h2CeffHBnegativedirectionRecosignalD1;
10018  //========================================================================================== 22215
10019  //======================================================================
10020  //======================================================================1D plot: D vs phi , different eta, depth=2
10021  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
10022  c3x5->Clear();
10023  c3x5->Divide(4, 4);
10024  c3x5->cd(1);
10025  int kcountHBnegativedirectionRecosignalD2 = 1;
10026  TH1F* h2CeffHBnegativedirectionRecosignalD2 = new TH1F("h2CeffHBnegativedirectionRecosignalD2", "", nphi, 0., 72.);
10027 
10028  for (int jeta = 0; jeta < njeta; jeta++) {
10029  // negativedirectionRecosignalD:
10030  if (jeta - 41 < 0) {
10031  // for (int i=0;i<ndepth;i++) {
10032  // depth=2
10033  for (int i = 1; i < 2; i++) {
10034  TH1F* HBnegativedirectionRecosignalD2 = (TH1F*)h2CeffHBnegativedirectionRecosignalD2->Clone("twod1");
10035 
10036  float ccctest = 0; // to avoid empty massive elements
10037  for (int jphi = 0; jphi < nphi; jphi++) {
10038  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10039  if (arecosignalHB[i][jeta][jphi] > 0.) {
10040  HBnegativedirectionRecosignalD2->Fill(jphi, ccc1);
10041  ccctest = 1.; //HBnegativedirectionRecosignalD2->SetBinError(i,0.01);
10042  }
10043  } // for jphi
10044  if (ccctest > 0.) {
10045  //cout<<"1515 kcountHBnegativedirectionRecosignalD2 = "<<kcountHBnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
10046  c3x5->cd(kcountHBnegativedirectionRecosignalD2);
10047  HBnegativedirectionRecosignalD2->SetMarkerStyle(20);
10048  HBnegativedirectionRecosignalD2->SetMarkerSize(0.4);
10049  HBnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
10050  HBnegativedirectionRecosignalD2->SetXTitle("HBnegativedirectionRecosignalD2 \b");
10051  HBnegativedirectionRecosignalD2->SetMarkerColor(2);
10052  HBnegativedirectionRecosignalD2->SetLineColor(0);
10053  gPad->SetGridy();
10054  gPad->SetGridx();
10055  // gPad->SetLogy();
10056  if (kcountHBnegativedirectionRecosignalD2 == 1)
10057  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
10058  if (kcountHBnegativedirectionRecosignalD2 == 2)
10059  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
10060  if (kcountHBnegativedirectionRecosignalD2 == 3)
10061  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
10062  if (kcountHBnegativedirectionRecosignalD2 == 4)
10063  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
10064  if (kcountHBnegativedirectionRecosignalD2 == 5)
10065  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
10066  if (kcountHBnegativedirectionRecosignalD2 == 6)
10067  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
10068  if (kcountHBnegativedirectionRecosignalD2 == 7)
10069  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
10070  if (kcountHBnegativedirectionRecosignalD2 == 8)
10071  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-9 ; depth = 2 \b");
10072  if (kcountHBnegativedirectionRecosignalD2 == 9)
10073  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-8 ; depth = 2 \b");
10074  if (kcountHBnegativedirectionRecosignalD2 == 10)
10075  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-7 ; depth = 2 \b");
10076  if (kcountHBnegativedirectionRecosignalD2 == 11)
10077  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-6 ; depth = 2 \b");
10078  if (kcountHBnegativedirectionRecosignalD2 == 12)
10079  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-5 ; depth = 2 \b");
10080  if (kcountHBnegativedirectionRecosignalD2 == 13)
10081  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-4 ; depth = 2 \b");
10082  if (kcountHBnegativedirectionRecosignalD2 == 14)
10083  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-3 ; depth = 2 \b");
10084  if (kcountHBnegativedirectionRecosignalD2 == 15)
10085  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-2 ; depth = 2 \b");
10086  if (kcountHBnegativedirectionRecosignalD2 == 16)
10087  HBnegativedirectionRecosignalD2->SetXTitle("D for HB- jeta =-1 ; depth = 2 \b");
10088  HBnegativedirectionRecosignalD2->Draw("Error");
10089  kcountHBnegativedirectionRecosignalD2++;
10090  if (kcountHBnegativedirectionRecosignalD2 > 16)
10091  break; // 4x6 = 24
10092  } //ccctest>0
10093 
10094  } // for i
10095  } //if(jeta-41 < 0)
10096  } //for jeta
10098  c3x5->Update();
10099  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
10100  c3x5->Clear();
10101  // clean-up
10102  if (h2CeffHBnegativedirectionRecosignalD2)
10103  delete h2CeffHBnegativedirectionRecosignalD2;
10104  //========================================================================================== 22216
10105  //======================================================================
10106  //======================================================================1D plot: D vs phi , different eta, depth=3
10107  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
10108  c3x5->Clear();
10109  c3x5->Divide(4, 4);
10110  c3x5->cd(1);
10111  int kcountHBnegativedirectionRecosignalD3 = 1;
10112  TH1F* h2CeffHBnegativedirectionRecosignalD3 = new TH1F("h2CeffHBnegativedirectionRecosignalD3", "", nphi, 0., 72.);
10113 
10114  for (int jeta = 0; jeta < njeta; jeta++) {
10115  // negativedirectionRecosignalD:
10116  if (jeta - 41 < 0) {
10117  // for (int i=0;i<ndepth;i++) {
10118  // depth=3
10119  for (int i = 2; i < 3; i++) {
10120  TH1F* HBnegativedirectionRecosignalD3 = (TH1F*)h2CeffHBnegativedirectionRecosignalD3->Clone("twod1");
10121 
10122  float ccctest = 0; // to avoid empty massive elements
10123  for (int jphi = 0; jphi < nphi; jphi++) {
10124  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10125  if (arecosignalHB[i][jeta][jphi] > 0.) {
10126  HBnegativedirectionRecosignalD3->Fill(jphi, ccc1);
10127  ccctest = 1.; //HBnegativedirectionRecosignalD3->SetBinError(i,0.01);
10128  }
10129  } // for jphi
10130  if (ccctest > 0.) {
10131  //cout<<"1616 kcountHBnegativedirectionRecosignalD3 = "<<kcountHBnegativedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
10132  c3x5->cd(kcountHBnegativedirectionRecosignalD3);
10133  HBnegativedirectionRecosignalD3->SetMarkerStyle(20);
10134  HBnegativedirectionRecosignalD3->SetMarkerSize(0.4);
10135  HBnegativedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
10136  HBnegativedirectionRecosignalD3->SetXTitle("HBnegativedirectionRecosignalD3 \b");
10137  HBnegativedirectionRecosignalD3->SetMarkerColor(2);
10138  HBnegativedirectionRecosignalD3->SetLineColor(0);
10139  gPad->SetGridy();
10140  gPad->SetGridx();
10141  // gPad->SetLogy();
10142  if (kcountHBnegativedirectionRecosignalD3 == 1)
10143  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
10144  if (kcountHBnegativedirectionRecosignalD3 == 2)
10145  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
10146  if (kcountHBnegativedirectionRecosignalD3 == 3)
10147  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
10148  if (kcountHBnegativedirectionRecosignalD3 == 4)
10149  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
10150  if (kcountHBnegativedirectionRecosignalD3 == 5)
10151  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
10152  if (kcountHBnegativedirectionRecosignalD3 == 6)
10153  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
10154  if (kcountHBnegativedirectionRecosignalD3 == 7)
10155  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
10156  if (kcountHBnegativedirectionRecosignalD3 == 8)
10157  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-9 ; depth = 3 \b");
10158  if (kcountHBnegativedirectionRecosignalD3 == 9)
10159  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-8 ; depth = 3 \b");
10160  if (kcountHBnegativedirectionRecosignalD3 == 10)
10161  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-7 ; depth = 3 \b");
10162  if (kcountHBnegativedirectionRecosignalD3 == 11)
10163  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-6 ; depth = 3 \b");
10164  if (kcountHBnegativedirectionRecosignalD3 == 12)
10165  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-5 ; depth = 3 \b");
10166  if (kcountHBnegativedirectionRecosignalD3 == 13)
10167  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-4 ; depth = 3 \b");
10168  if (kcountHBnegativedirectionRecosignalD3 == 14)
10169  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-3 ; depth = 3 \b");
10170  if (kcountHBnegativedirectionRecosignalD3 == 15)
10171  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-2 ; depth = 3 \b");
10172  if (kcountHBnegativedirectionRecosignalD3 == 16)
10173  HBnegativedirectionRecosignalD3->SetXTitle("D for HB- jeta =-1 ; depth = 3 \b");
10174  HBnegativedirectionRecosignalD3->Draw("Error");
10175  kcountHBnegativedirectionRecosignalD3++;
10176  if (kcountHBnegativedirectionRecosignalD3 > 16)
10177  break; // 4x6 = 24
10178  } //ccctest>0
10179 
10180  } // for i
10181  } //if(jeta-41 < 0)
10182  } //for jeta
10184  c3x5->Update();
10185  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
10186  c3x5->Clear();
10187  // clean-up
10188  if (h2CeffHBnegativedirectionRecosignalD3)
10189  delete h2CeffHBnegativedirectionRecosignalD3;
10190  //========================================================================================== 22217
10191  //======================================================================
10192  //======================================================================1D plot: D vs phi , different eta, depth=4
10193  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
10194  c3x5->Clear();
10195  c3x5->Divide(4, 4);
10196  c3x5->cd(1);
10197  int kcountHBnegativedirectionRecosignalD4 = 1;
10198  TH1F* h2CeffHBnegativedirectionRecosignalD4 = new TH1F("h2CeffHBnegativedirectionRecosignalD4", "", nphi, 0., 72.);
10199 
10200  for (int jeta = 0; jeta < njeta; jeta++) {
10201  // negativedirectionRecosignalD:
10202  if (jeta - 41 < 0) {
10203  // for (int i=0;i<ndepth;i++) {
10204  // depth=4
10205  for (int i = 3; i < 4; i++) {
10206  TH1F* HBnegativedirectionRecosignalD4 = (TH1F*)h2CeffHBnegativedirectionRecosignalD4->Clone("twod1");
10207 
10208  float ccctest = 0; // to avoid empty massive elements
10209  for (int jphi = 0; jphi < nphi; jphi++) {
10210  double ccc1 = recosignalvarianceHB[i][jeta][jphi];
10211  if (arecosignalHB[i][jeta][jphi] > 0.) {
10212  HBnegativedirectionRecosignalD4->Fill(jphi, ccc1);
10213  ccctest = 1.; //HBnegativedirectionRecosignalD4->SetBinError(i,0.01);
10214  }
10215  } // for jphi
10216  if (ccctest > 0.) {
10217  //cout<<"1717 kcountHBnegativedirectionRecosignalD4 = "<<kcountHBnegativedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
10218  c3x5->cd(kcountHBnegativedirectionRecosignalD4);
10219  HBnegativedirectionRecosignalD4->SetMarkerStyle(20);
10220  HBnegativedirectionRecosignalD4->SetMarkerSize(0.4);
10221  HBnegativedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
10222  HBnegativedirectionRecosignalD4->SetXTitle("HBnegativedirectionRecosignalD4 \b");
10223  HBnegativedirectionRecosignalD4->SetMarkerColor(2);
10224  HBnegativedirectionRecosignalD4->SetLineColor(0);
10225  gPad->SetGridy();
10226  gPad->SetGridx();
10227  // gPad->SetLogy();
10228  if (kcountHBnegativedirectionRecosignalD4 == 1)
10229  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
10230  if (kcountHBnegativedirectionRecosignalD4 == 2)
10231  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
10232  if (kcountHBnegativedirectionRecosignalD4 == 3)
10233  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
10234  if (kcountHBnegativedirectionRecosignalD4 == 4)
10235  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
10236  if (kcountHBnegativedirectionRecosignalD4 == 5)
10237  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
10238  if (kcountHBnegativedirectionRecosignalD4 == 6)
10239  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
10240  if (kcountHBnegativedirectionRecosignalD4 == 7)
10241  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
10242  if (kcountHBnegativedirectionRecosignalD4 == 8)
10243  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-9 ; depth = 4 \b");
10244  if (kcountHBnegativedirectionRecosignalD4 == 9)
10245  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-8 ; depth = 4 \b");
10246  if (kcountHBnegativedirectionRecosignalD4 == 10)
10247  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-7 ; depth = 4 \b");
10248  if (kcountHBnegativedirectionRecosignalD4 == 11)
10249  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-6 ; depth = 4 \b");
10250  if (kcountHBnegativedirectionRecosignalD4 == 12)
10251  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-5 ; depth = 4 \b");
10252  if (kcountHBnegativedirectionRecosignalD4 == 13)
10253  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-4 ; depth = 4 \b");
10254  if (kcountHBnegativedirectionRecosignalD4 == 14)
10255  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-3 ; depth = 4 \b");
10256  if (kcountHBnegativedirectionRecosignalD4 == 15)
10257  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-2 ; depth = 4 \b");
10258  if (kcountHBnegativedirectionRecosignalD4 == 16)
10259  HBnegativedirectionRecosignalD4->SetXTitle("D for HB- jeta =-1 ; depth = 4 \b");
10260  HBnegativedirectionRecosignalD4->Draw("Error");
10261  kcountHBnegativedirectionRecosignalD4++;
10262  if (kcountHBnegativedirectionRecosignalD4 > 16)
10263  break; // 4x6 = 24
10264  } //ccctest>0
10265 
10266  } // for i
10267  } //if(jeta-41 < 0)
10268  } //for jeta
10270  c3x5->Update();
10271  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
10272  c3x5->Clear();
10273  // clean-up
10274  if (h2CeffHBnegativedirectionRecosignalD4)
10275  delete h2CeffHBnegativedirectionRecosignalD4;
10276 
10277  //===================================================================== END of Recosignal HB for phi-symmetry
10278  //===================================================================== END of Recosignal HB for phi-symmetry
10279  //===================================================================== END of Recosignal HB for phi-symmetry
10280 
10284  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
10285  //ndepth = k_max[3];
10286  ndepth = 7;
10287  // const int ndepth = 7;
10288  double arecosignalhe[ndepth][njeta][njphi];
10289  double recosignalvariancehe[ndepth][njeta][njphi];
10290  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HE
10291  TH2F* recSignalEnergy1HE1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE1");
10292  TH2F* recSignalEnergy0HE1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE1");
10293  TH2F* recSignalEnergyHE1 = (TH2F*)recSignalEnergy1HE1->Clone("recSignalEnergyHE1");
10294  recSignalEnergyHE1->Divide(recSignalEnergy1HE1, recSignalEnergy0HE1, 1, 1, "B");
10295  TH2F* recSignalEnergy1HE2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE2");
10296  TH2F* recSignalEnergy0HE2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE2");
10297  TH2F* recSignalEnergyHE2 = (TH2F*)recSignalEnergy1HE2->Clone("recSignalEnergyHE2");
10298  recSignalEnergyHE2->Divide(recSignalEnergy1HE2, recSignalEnergy0HE2, 1, 1, "B");
10299  TH2F* recSignalEnergy1HE3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE3");
10300  TH2F* recSignalEnergy0HE3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE3");
10301  TH2F* recSignalEnergyHE3 = (TH2F*)recSignalEnergy1HE3->Clone("recSignalEnergyHE3");
10302  recSignalEnergyHE3->Divide(recSignalEnergy1HE3, recSignalEnergy0HE3, 1, 1, "B");
10303  TH2F* recSignalEnergy1HE4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE4");
10304  TH2F* recSignalEnergy0HE4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE4");
10305  TH2F* recSignalEnergyHE4 = (TH2F*)recSignalEnergy1HE4->Clone("recSignalEnergyHE4");
10306  recSignalEnergyHE4->Divide(recSignalEnergy1HE4, recSignalEnergy0HE4, 1, 1, "B");
10307  TH2F* recSignalEnergy1HE5 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE5");
10308  TH2F* recSignalEnergy0HE5 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE5");
10309  TH2F* recSignalEnergyHE5 = (TH2F*)recSignalEnergy1HE5->Clone("recSignalEnergyHE5");
10310  recSignalEnergyHE5->Divide(recSignalEnergy1HE5, recSignalEnergy0HE5, 1, 1, "B");
10311  TH2F* recSignalEnergy1HE6 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE6");
10312  TH2F* recSignalEnergy0HE6 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE6");
10313  TH2F* recSignalEnergyHE6 = (TH2F*)recSignalEnergy1HE6->Clone("recSignalEnergyHE6");
10314  recSignalEnergyHE6->Divide(recSignalEnergy1HE6, recSignalEnergy0HE6, 1, 1, "B");
10315  TH2F* recSignalEnergy1HE7 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HE7");
10316  TH2F* recSignalEnergy0HE7 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE7");
10317  TH2F* recSignalEnergyHE7 = (TH2F*)recSignalEnergy1HE7->Clone("recSignalEnergyHE7");
10318  recSignalEnergyHE7->Divide(recSignalEnergy1HE7, recSignalEnergy0HE7, 1, 1, "B");
10319  for (int jeta = 0; jeta < njeta; jeta++) {
10320  //====================================================================== PHI normalization & put R into massive arecosignalhe
10321  //preparation for PHI normalization:
10322  double sumrecosignalHE0 = 0;
10323  int nsumrecosignalHE0 = 0;
10324  double sumrecosignalHE1 = 0;
10325  int nsumrecosignalHE1 = 0;
10326  double sumrecosignalHE2 = 0;
10327  int nsumrecosignalHE2 = 0;
10328  double sumrecosignalHE3 = 0;
10329  int nsumrecosignalHE3 = 0;
10330  double sumrecosignalHE4 = 0;
10331  int nsumrecosignalHE4 = 0;
10332  double sumrecosignalHE5 = 0;
10333  int nsumrecosignalHE5 = 0;
10334  double sumrecosignalHE6 = 0;
10335  int nsumrecosignalHE6 = 0;
10336  for (int jphi = 0; jphi < njphi; jphi++) {
10337  arecosignalhe[0][jeta][jphi] = recSignalEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
10338  arecosignalhe[1][jeta][jphi] = recSignalEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
10339  arecosignalhe[2][jeta][jphi] = recSignalEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
10340  arecosignalhe[3][jeta][jphi] = recSignalEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
10341  arecosignalhe[4][jeta][jphi] = recSignalEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
10342  arecosignalhe[5][jeta][jphi] = recSignalEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
10343  arecosignalhe[6][jeta][jphi] = recSignalEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
10344  if (arecosignalhe[0][jeta][jphi] > 0.) {
10345  sumrecosignalHE0 += arecosignalhe[0][jeta][jphi];
10346  ++nsumrecosignalHE0;
10347  }
10348  if (arecosignalhe[1][jeta][jphi] > 0.) {
10349  sumrecosignalHE1 += arecosignalhe[1][jeta][jphi];
10350  ++nsumrecosignalHE1;
10351  }
10352  if (arecosignalhe[2][jeta][jphi] > 0.) {
10353  sumrecosignalHE2 += arecosignalhe[2][jeta][jphi];
10354  ++nsumrecosignalHE2;
10355  }
10356  if (arecosignalhe[3][jeta][jphi] > 0.) {
10357  sumrecosignalHE3 += arecosignalhe[3][jeta][jphi];
10358  ++nsumrecosignalHE3;
10359  }
10360  if (arecosignalhe[4][jeta][jphi] > 0.) {
10361  sumrecosignalHE4 += arecosignalhe[4][jeta][jphi];
10362  ++nsumrecosignalHE4;
10363  }
10364  if (arecosignalhe[5][jeta][jphi] > 0.) {
10365  sumrecosignalHE5 += arecosignalhe[5][jeta][jphi];
10366  ++nsumrecosignalHE5;
10367  }
10368  if (arecosignalhe[6][jeta][jphi] > 0.) {
10369  sumrecosignalHE6 += arecosignalhe[6][jeta][jphi];
10370  ++nsumrecosignalHE6;
10371  }
10372  } // phi
10373  // PHI normalization:
10374  for (int jphi = 0; jphi < njphi; jphi++) {
10375  if (arecosignalhe[0][jeta][jphi] > 0.)
10376  arecosignalhe[0][jeta][jphi] /= (sumrecosignalHE0 / nsumrecosignalHE0);
10377  if (arecosignalhe[1][jeta][jphi] > 0.)
10378  arecosignalhe[1][jeta][jphi] /= (sumrecosignalHE1 / nsumrecosignalHE1);
10379  if (arecosignalhe[2][jeta][jphi] > 0.)
10380  arecosignalhe[2][jeta][jphi] /= (sumrecosignalHE2 / nsumrecosignalHE2);
10381  if (arecosignalhe[3][jeta][jphi] > 0.)
10382  arecosignalhe[3][jeta][jphi] /= (sumrecosignalHE3 / nsumrecosignalHE3);
10383  if (arecosignalhe[4][jeta][jphi] > 0.)
10384  arecosignalhe[4][jeta][jphi] /= (sumrecosignalHE4 / nsumrecosignalHE4);
10385  if (arecosignalhe[5][jeta][jphi] > 0.)
10386  arecosignalhe[5][jeta][jphi] /= (sumrecosignalHE5 / nsumrecosignalHE5);
10387  if (arecosignalhe[6][jeta][jphi] > 0.)
10388  arecosignalhe[6][jeta][jphi] /= (sumrecosignalHE6 / nsumrecosignalHE6);
10389  } // phi
10390  } //eta
10391  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
10392  //======================================================================
10393  //======================================================================
10394  //cout<<" R2D-eta/phi-plot: R, averaged over depthes *****" <<endl;
10395  c2x1->Clear();
10397  c2x1->Divide(2, 1);
10398  c2x1->cd(1);
10399  TH2F* GefzRrecosignalHE42D = new TH2F("GefzRrecosignalHE42D", "", neta, -41., 41., nphi, 0., 72.);
10400  TH2F* GefzRrecosignalHE42D0 = new TH2F("GefzRrecosignalHE42D0", "", neta, -41., 41., nphi, 0., 72.);
10401  TH2F* GefzRrecosignalHE42DF = (TH2F*)GefzRrecosignalHE42D0->Clone("GefzRrecosignalHE42DF");
10402  for (int i = 0; i < ndepth; i++) {
10403  for (int jeta = 0; jeta < neta; jeta++) {
10404  for (int jphi = 0; jphi < nphi; jphi++) {
10405  double ccc1 = arecosignalhe[i][jeta][jphi];
10406  int k2plot = jeta - 41;
10407  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
10408  if (ccc1 != 0.) {
10409  GefzRrecosignalHE42D->Fill(kkk, jphi, ccc1);
10410  GefzRrecosignalHE42D0->Fill(kkk, jphi, 1.);
10411  }
10412  }
10413  }
10414  }
10415  GefzRrecosignalHE42DF->Divide(GefzRrecosignalHE42D, GefzRrecosignalHE42D0, 1, 1, "B"); // average A
10416  gPad->SetGridy();
10417  gPad->SetGridx(); // gPad->SetLogz();
10418  GefzRrecosignalHE42DF->SetXTitle("<R>_depth #eta \b");
10419  GefzRrecosignalHE42DF->SetYTitle(" #phi \b");
10420  GefzRrecosignalHE42DF->Draw("COLZ");
10421 
10422  c2x1->cd(2);
10423  TH1F* energyhitSignal_HE = (TH1F*)dir->FindObjectAny("h_energyhitSignal_HE");
10424  energyhitSignal_HE->SetMarkerStyle(20);
10425  energyhitSignal_HE->SetMarkerSize(0.4);
10426  energyhitSignal_HE->GetYaxis()->SetLabelSize(0.04);
10427  energyhitSignal_HE->SetXTitle("energyhitSignal_HE \b");
10428  energyhitSignal_HE->SetMarkerColor(2);
10429  energyhitSignal_HE->SetLineColor(0);
10430  gPad->SetGridy();
10431  gPad->SetGridx();
10432  energyhitSignal_HE->Draw("Error");
10433 
10435  c2x1->Update();
10436  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHE.png");
10437  c2x1->Clear();
10438  // clean-up
10439  if (GefzRrecosignalHE42D)
10440  delete GefzRrecosignalHE42D;
10441  if (GefzRrecosignalHE42D0)
10442  delete GefzRrecosignalHE42D0;
10443  if (GefzRrecosignalHE42DF)
10444  delete GefzRrecosignalHE42DF;
10445  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
10446  //======================================================================
10447  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
10448  c1x1->Clear();
10450  c1x1->Divide(1, 1);
10451  c1x1->cd(1);
10452  TH1F* GefzRrecosignalHE41D = new TH1F("GefzRrecosignalHE41D", "", nphi, 0., 72.);
10453  TH1F* GefzRrecosignalHE41D0 = new TH1F("GefzRrecosignalHE41D0", "", nphi, 0., 72.);
10454  TH1F* GefzRrecosignalHE41DF = (TH1F*)GefzRrecosignalHE41D0->Clone("GefzRrecosignalHE41DF");
10455  for (int jphi = 0; jphi < nphi; jphi++) {
10456  for (int jeta = 0; jeta < neta; jeta++) {
10457  for (int i = 0; i < ndepth; i++) {
10458  double ccc1 = arecosignalhe[i][jeta][jphi];
10459  if (ccc1 != 0.) {
10460  GefzRrecosignalHE41D->Fill(jphi, ccc1);
10461  GefzRrecosignalHE41D0->Fill(jphi, 1.);
10462  }
10463  }
10464  }
10465  }
10466  GefzRrecosignalHE41DF->Divide(
10467  GefzRrecosignalHE41D, GefzRrecosignalHE41D0, 1, 1, "B"); // R averaged over depthes & eta
10468  GefzRrecosignalHE41D0->Sumw2();
10469  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHE41DF->SetBinError(jphi,0.01);}
10470  gPad->SetGridy();
10471  gPad->SetGridx(); // gPad->SetLogz();
10472  GefzRrecosignalHE41DF->SetMarkerStyle(20);
10473  GefzRrecosignalHE41DF->SetMarkerSize(1.4);
10474  GefzRrecosignalHE41DF->GetZaxis()->SetLabelSize(0.08);
10475  GefzRrecosignalHE41DF->SetXTitle("#phi \b");
10476  GefzRrecosignalHE41DF->SetYTitle(" <R> \b");
10477  GefzRrecosignalHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
10478  GefzRrecosignalHE41DF->SetMarkerColor(4);
10479  GefzRrecosignalHE41DF->SetLineColor(
10480  4); // GefzRrecosignalHE41DF->SetMinimum(0.8); // GefzRrecosignalHE41DF->SetMaximum(1.000);
10481  GefzRrecosignalHE41DF->Draw("Error");
10483  c1x1->Update();
10484  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHE.png");
10485  c1x1->Clear();
10486  // clean-up
10487  if (GefzRrecosignalHE41D)
10488  delete GefzRrecosignalHE41D;
10489  if (GefzRrecosignalHE41D0)
10490  delete GefzRrecosignalHE41D0;
10491  if (GefzRrecosignalHE41DF)
10492  delete GefzRrecosignalHE41DF;
10493 
10494  //========================================================================================== 4
10495  //======================================================================
10496  //======================================================================1D plot: R vs phi , different eta, depth=1
10497  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
10498  c3x5->Clear();
10500  c3x5->Divide(3, 5);
10501  c3x5->cd(1);
10502  int kcountHEpositivedirectionRecosignal1 = 1;
10503  TH1F* h2CeffHEpositivedirectionRecosignal1 = new TH1F("h2CeffHEpositivedirectionRecosignal1", "", nphi, 0., 72.);
10504  for (int jeta = 0; jeta < njeta; jeta++) {
10505  // positivedirectionRecosignal:
10506  if (jeta - 41 >= 0) {
10507  // for (int i=0;i<ndepth;i++) {
10508  // depth=1
10509  for (int i = 0; i < 1; i++) {
10510  TH1F* HEpositivedirectionRecosignal1 = (TH1F*)h2CeffHEpositivedirectionRecosignal1->Clone("twod1");
10511  float ccctest = 0; // to avoid empty massive elements
10512  for (int jphi = 0; jphi < nphi; jphi++) {
10513  double ccc1 = arecosignalhe[i][jeta][jphi];
10514  if (ccc1 != 0.) {
10515  HEpositivedirectionRecosignal1->Fill(jphi, ccc1);
10516  ccctest = 1.; //HEpositivedirectionRecosignal1->SetBinError(i,0.01);
10517  }
10518  } // for jphi
10519  if (ccctest > 0.) {
10520  // cout<<"444 kcountHEpositivedirectionRecosignal1 = "<<kcountHEpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
10521  c3x5->cd(kcountHEpositivedirectionRecosignal1);
10522  HEpositivedirectionRecosignal1->SetMarkerStyle(20);
10523  HEpositivedirectionRecosignal1->SetMarkerSize(0.4);
10524  HEpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
10525  HEpositivedirectionRecosignal1->SetXTitle("HEpositivedirectionRecosignal1 \b");
10526  HEpositivedirectionRecosignal1->SetMarkerColor(2);
10527  HEpositivedirectionRecosignal1->SetLineColor(0);
10528  gPad->SetGridy();
10529  gPad->SetGridx();
10530  // gPad->SetLogy();
10531  if (kcountHEpositivedirectionRecosignal1 == 1)
10532  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
10533  if (kcountHEpositivedirectionRecosignal1 == 2)
10534  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
10535  if (kcountHEpositivedirectionRecosignal1 == 3)
10536  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
10537  if (kcountHEpositivedirectionRecosignal1 == 4)
10538  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
10539  if (kcountHEpositivedirectionRecosignal1 == 5)
10540  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
10541  if (kcountHEpositivedirectionRecosignal1 == 6)
10542  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
10543  if (kcountHEpositivedirectionRecosignal1 == 7)
10544  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
10545  if (kcountHEpositivedirectionRecosignal1 == 8)
10546  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
10547  if (kcountHEpositivedirectionRecosignal1 == 9)
10548  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
10549  if (kcountHEpositivedirectionRecosignal1 == 10)
10550  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
10551  if (kcountHEpositivedirectionRecosignal1 == 11)
10552  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
10553  if (kcountHEpositivedirectionRecosignal1 == 12)
10554  HEpositivedirectionRecosignal1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
10555  HEpositivedirectionRecosignal1->Draw("Error");
10556  kcountHEpositivedirectionRecosignal1++;
10557  if (kcountHEpositivedirectionRecosignal1 > 12)
10558  break; // 4x6 = 24
10559  } //ccctest>0
10560 
10561  } // for i
10562  } //if(jeta-41 >= 0)
10563  } //for jeta
10565  c3x5->Update();
10566  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
10567  c3x5->Clear();
10568  // clean-up
10569  if (h2CeffHEpositivedirectionRecosignal1)
10570  delete h2CeffHEpositivedirectionRecosignal1;
10571 
10572  //========================================================================================== 5
10573  //======================================================================
10574  //======================================================================1D plot: R vs phi , different eta, depth=2
10575  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
10576  c3x5->Clear();
10578  c3x5->Divide(3, 5);
10579  c3x5->cd(1);
10580  int kcountHEpositivedirectionRecosignal2 = 1;
10581  TH1F* h2CeffHEpositivedirectionRecosignal2 = new TH1F("h2CeffHEpositivedirectionRecosignal2", "", nphi, 0., 72.);
10582  for (int jeta = 0; jeta < njeta; jeta++) {
10583  // positivedirectionRecosignal:
10584  if (jeta - 41 >= 0) {
10585  // for (int i=0;i<ndepth;i++) {
10586  // depth=2
10587  for (int i = 1; i < 2; i++) {
10588  TH1F* HEpositivedirectionRecosignal2 = (TH1F*)h2CeffHEpositivedirectionRecosignal2->Clone("twod1");
10589  float ccctest = 0; // to avoid empty massive elements
10590  for (int jphi = 0; jphi < nphi; jphi++) {
10591  double ccc1 = arecosignalhe[i][jeta][jphi];
10592  if (ccc1 != 0.) {
10593  HEpositivedirectionRecosignal2->Fill(jphi, ccc1);
10594  ccctest = 1.; //HEpositivedirectionRecosignal2->SetBinError(i,0.01);
10595  }
10596  } // for jphi
10597  if (ccctest > 0.) {
10598  //cout<<"555 kcountHEpositivedirectionRecosignal2 = "<<kcountHEpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
10599  c3x5->cd(kcountHEpositivedirectionRecosignal2);
10600  HEpositivedirectionRecosignal2->SetMarkerStyle(20);
10601  HEpositivedirectionRecosignal2->SetMarkerSize(0.4);
10602  HEpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
10603  HEpositivedirectionRecosignal2->SetXTitle("HEpositivedirectionRecosignal2 \b");
10604  HEpositivedirectionRecosignal2->SetMarkerColor(2);
10605  HEpositivedirectionRecosignal2->SetLineColor(0);
10606  gPad->SetGridy();
10607  gPad->SetGridx();
10608  // gPad->SetLogy();
10609  if (kcountHEpositivedirectionRecosignal2 == 1)
10610  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
10611  if (kcountHEpositivedirectionRecosignal2 == 2)
10612  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
10613  if (kcountHEpositivedirectionRecosignal2 == 3)
10614  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
10615  if (kcountHEpositivedirectionRecosignal2 == 4)
10616  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
10617  if (kcountHEpositivedirectionRecosignal2 == 5)
10618  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
10619  if (kcountHEpositivedirectionRecosignal2 == 6)
10620  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
10621  if (kcountHEpositivedirectionRecosignal2 == 7)
10622  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
10623  if (kcountHEpositivedirectionRecosignal2 == 8)
10624  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
10625  if (kcountHEpositivedirectionRecosignal2 == 9)
10626  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
10627  if (kcountHEpositivedirectionRecosignal2 == 10)
10628  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
10629  if (kcountHEpositivedirectionRecosignal2 == 11)
10630  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
10631  if (kcountHEpositivedirectionRecosignal2 == 12)
10632  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
10633  if (kcountHEpositivedirectionRecosignal2 == 13)
10634  HEpositivedirectionRecosignal2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
10635  HEpositivedirectionRecosignal2->Draw("Error");
10636  kcountHEpositivedirectionRecosignal2++;
10637  if (kcountHEpositivedirectionRecosignal2 > 13)
10638  break; // 4x6 = 24
10639  } //ccctest>0
10640 
10641  } // for i
10642  } //if(jeta-41 >= 0)
10643  } //for jeta
10645  c3x5->Update();
10646  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
10647  c3x5->Clear();
10648  // clean-up
10649  if (h2CeffHEpositivedirectionRecosignal2)
10650  delete h2CeffHEpositivedirectionRecosignal2;
10651  //========================================================================================== 6
10652  //======================================================================
10653  //======================================================================1D plot: R vs phi , different eta, depth=3
10654  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
10655  c3x5->Clear();
10657  c3x5->Divide(3, 5);
10658  c3x5->cd(1);
10659  int kcountHEpositivedirectionRecosignal3 = 1;
10660  TH1F* h2CeffHEpositivedirectionRecosignal3 = new TH1F("h2CeffHEpositivedirectionRecosignal3", "", nphi, 0., 72.);
10661  for (int jeta = 0; jeta < njeta; jeta++) {
10662  // positivedirectionRecosignal:
10663  if (jeta - 41 >= 0) {
10664  // for (int i=0;i<ndepth;i++) {
10665  // depth=3
10666  for (int i = 2; i < 3; i++) {
10667  TH1F* HEpositivedirectionRecosignal3 = (TH1F*)h2CeffHEpositivedirectionRecosignal3->Clone("twod1");
10668  float ccctest = 0; // to avoid empty massive elements
10669  for (int jphi = 0; jphi < nphi; jphi++) {
10670  double ccc1 = arecosignalhe[i][jeta][jphi];
10671  if (ccc1 != 0.) {
10672  HEpositivedirectionRecosignal3->Fill(jphi, ccc1);
10673  ccctest = 1.; //HEpositivedirectionRecosignal3->SetBinError(i,0.01);
10674  }
10675  } // for jphi
10676  if (ccctest > 0.) {
10677  //cout<<"666 kcountHEpositivedirectionRecosignal3 = "<<kcountHEpositivedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
10678  c3x5->cd(kcountHEpositivedirectionRecosignal3);
10679  HEpositivedirectionRecosignal3->SetMarkerStyle(20);
10680  HEpositivedirectionRecosignal3->SetMarkerSize(0.4);
10681  HEpositivedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
10682  HEpositivedirectionRecosignal3->SetXTitle("HEpositivedirectionRecosignal3 \b");
10683  HEpositivedirectionRecosignal3->SetMarkerColor(2);
10684  HEpositivedirectionRecosignal3->SetLineColor(0);
10685  gPad->SetGridy();
10686  gPad->SetGridx();
10687  // gPad->SetLogy();
10688  if (kcountHEpositivedirectionRecosignal3 == 1)
10689  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
10690  if (kcountHEpositivedirectionRecosignal3 == 2)
10691  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
10692  if (kcountHEpositivedirectionRecosignal3 == 3)
10693  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
10694  if (kcountHEpositivedirectionRecosignal3 == 4)
10695  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
10696  if (kcountHEpositivedirectionRecosignal3 == 5)
10697  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
10698  if (kcountHEpositivedirectionRecosignal3 == 6)
10699  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
10700  if (kcountHEpositivedirectionRecosignal3 == 7)
10701  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
10702  if (kcountHEpositivedirectionRecosignal3 == 8)
10703  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
10704  if (kcountHEpositivedirectionRecosignal3 == 9)
10705  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
10706  if (kcountHEpositivedirectionRecosignal3 == 10)
10707  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
10708  if (kcountHEpositivedirectionRecosignal3 == 11)
10709  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
10710  if (kcountHEpositivedirectionRecosignal3 == 12)
10711  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
10712  if (kcountHEpositivedirectionRecosignal3 == 13)
10713  HEpositivedirectionRecosignal3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
10714  HEpositivedirectionRecosignal3->Draw("Error");
10715  kcountHEpositivedirectionRecosignal3++;
10716  if (kcountHEpositivedirectionRecosignal3 > 13)
10717  break; // 4x6 = 24
10718  } //ccctest>0
10719 
10720  } // for i
10721  } //if(jeta-41 >= 0)
10722  } //for jeta
10724  c3x5->Update();
10725  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
10726  c3x5->Clear();
10727  // clean-up
10728  if (h2CeffHEpositivedirectionRecosignal3)
10729  delete h2CeffHEpositivedirectionRecosignal3;
10730  //========================================================================================== 7
10731  //======================================================================
10732  //======================================================================1D plot: R vs phi , different eta, depth=4
10733  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
10734  c3x5->Clear();
10736  c3x5->Divide(3, 5);
10737  c3x5->cd(1);
10738  int kcountHEpositivedirectionRecosignal4 = 1;
10739  TH1F* h2CeffHEpositivedirectionRecosignal4 = new TH1F("h2CeffHEpositivedirectionRecosignal4", "", nphi, 0., 72.);
10740 
10741  for (int jeta = 0; jeta < njeta; jeta++) {
10742  // positivedirectionRecosignal:
10743  if (jeta - 41 >= 0) {
10744  // for (int i=0;i<ndepth;i++) {
10745  // depth=4
10746  for (int i = 3; i < 4; i++) {
10747  TH1F* HEpositivedirectionRecosignal4 = (TH1F*)h2CeffHEpositivedirectionRecosignal4->Clone("twod1");
10748 
10749  float ccctest = 0; // to avoid empty massive elements
10750  for (int jphi = 0; jphi < nphi; jphi++) {
10751  double ccc1 = arecosignalhe[i][jeta][jphi];
10752  if (ccc1 != 0.) {
10753  HEpositivedirectionRecosignal4->Fill(jphi, ccc1);
10754  ccctest = 1.; //HEpositivedirectionRecosignal4->SetBinError(i,0.01);
10755  }
10756  } // for jphi
10757  if (ccctest > 0.) {
10758  //cout<<"777 kcountHEpositivedirectionRecosignal4 = "<<kcountHEpositivedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
10759  c3x5->cd(kcountHEpositivedirectionRecosignal4);
10760  HEpositivedirectionRecosignal4->SetMarkerStyle(20);
10761  HEpositivedirectionRecosignal4->SetMarkerSize(0.4);
10762  HEpositivedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
10763  HEpositivedirectionRecosignal4->SetXTitle("HEpositivedirectionRecosignal4 \b");
10764  HEpositivedirectionRecosignal4->SetMarkerColor(2);
10765  HEpositivedirectionRecosignal4->SetLineColor(0);
10766  gPad->SetGridy();
10767  gPad->SetGridx();
10768  // gPad->SetLogy();
10769  if (kcountHEpositivedirectionRecosignal4 == 1)
10770  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
10771  if (kcountHEpositivedirectionRecosignal4 == 2)
10772  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
10773  if (kcountHEpositivedirectionRecosignal4 == 3)
10774  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
10775  if (kcountHEpositivedirectionRecosignal4 == 4)
10776  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
10777  if (kcountHEpositivedirectionRecosignal4 == 5)
10778  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
10779  if (kcountHEpositivedirectionRecosignal4 == 6)
10780  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
10781  if (kcountHEpositivedirectionRecosignal4 == 7)
10782  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
10783  if (kcountHEpositivedirectionRecosignal4 == 8)
10784  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
10785  if (kcountHEpositivedirectionRecosignal4 == 9)
10786  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
10787  if (kcountHEpositivedirectionRecosignal4 == 10)
10788  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
10789  if (kcountHEpositivedirectionRecosignal4 == 11)
10790  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
10791  if (kcountHEpositivedirectionRecosignal4 == 12)
10792  HEpositivedirectionRecosignal4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
10793  HEpositivedirectionRecosignal4->Draw("Error");
10794  kcountHEpositivedirectionRecosignal4++;
10795  if (kcountHEpositivedirectionRecosignal4 > 12)
10796  break; // 4x6 = 24
10797  } //ccctest>0
10798 
10799  } // for i
10800  } //if(jeta-41 >= 0)
10801  } //for jeta
10803  c3x5->Update();
10804  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
10805  c3x5->Clear();
10806  // clean-up
10807  if (h2CeffHEpositivedirectionRecosignal4)
10808  delete h2CeffHEpositivedirectionRecosignal4;
10809  //========================================================================================== 8
10810  //======================================================================
10811  //======================================================================1D plot: R vs phi , different eta, depth=5
10812  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
10813  c3x5->Clear();
10815  c3x5->Divide(3, 5);
10816  c3x5->cd(1);
10817  int kcountHEpositivedirectionRecosignal5 = 1;
10818  TH1F* h2CeffHEpositivedirectionRecosignal5 = new TH1F("h2CeffHEpositivedirectionRecosignal5", "", nphi, 0., 72.);
10819 
10820  for (int jeta = 0; jeta < njeta; jeta++) {
10821  // positivedirectionRecosignal:
10822  if (jeta - 41 >= 0) {
10823  // for (int i=0;i<ndepth;i++) {
10824  // depth=5
10825  for (int i = 4; i < 5; i++) {
10826  TH1F* HEpositivedirectionRecosignal5 = (TH1F*)h2CeffHEpositivedirectionRecosignal5->Clone("twod1");
10827 
10828  float ccctest = 0; // to avoid empty massive elements
10829  for (int jphi = 0; jphi < nphi; jphi++) {
10830  // cout<<"888 initial kcountHEpositivedirectionRecosignal5 = "<<kcountHEpositivedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" arecosignalhe[i][jeta][jphi]= "<< arecosignalhe[i][jeta][jphi] <<" depth= "<< i <<endl;
10831 
10832  double ccc1 = arecosignalhe[i][jeta][jphi];
10833  if (ccc1 != 0.) {
10834  HEpositivedirectionRecosignal5->Fill(jphi, ccc1);
10835  ccctest = 1.; //HEpositivedirectionRecosignal5->SetBinError(i,0.01);
10836  }
10837  } // for jphi
10838  if (ccctest > 0.) {
10839  //cout<<"888 kcountHEpositivedirectionRecosignal5 = "<<kcountHEpositivedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<endl;
10840  c3x5->cd(kcountHEpositivedirectionRecosignal5);
10841  HEpositivedirectionRecosignal5->SetMarkerStyle(20);
10842  HEpositivedirectionRecosignal5->SetMarkerSize(0.4);
10843  HEpositivedirectionRecosignal5->GetYaxis()->SetLabelSize(0.04);
10844  HEpositivedirectionRecosignal5->SetXTitle("HEpositivedirectionRecosignal5 \b");
10845  HEpositivedirectionRecosignal5->SetMarkerColor(2);
10846  HEpositivedirectionRecosignal5->SetLineColor(0);
10847  gPad->SetGridy();
10848  gPad->SetGridx();
10849  // gPad->SetLogy();
10850  if (kcountHEpositivedirectionRecosignal5 == 1)
10851  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
10852  if (kcountHEpositivedirectionRecosignal5 == 2)
10853  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
10854  if (kcountHEpositivedirectionRecosignal5 == 3)
10855  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
10856  if (kcountHEpositivedirectionRecosignal5 == 4)
10857  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
10858  if (kcountHEpositivedirectionRecosignal5 == 5)
10859  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
10860  if (kcountHEpositivedirectionRecosignal5 == 6)
10861  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
10862  if (kcountHEpositivedirectionRecosignal5 == 7)
10863  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
10864  if (kcountHEpositivedirectionRecosignal5 == 8)
10865  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
10866  if (kcountHEpositivedirectionRecosignal5 == 9)
10867  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
10868  if (kcountHEpositivedirectionRecosignal5 == 10)
10869  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
10870  if (kcountHEpositivedirectionRecosignal5 == 11)
10871  HEpositivedirectionRecosignal5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
10872  HEpositivedirectionRecosignal5->Draw("Error");
10873  kcountHEpositivedirectionRecosignal5++;
10874  if (kcountHEpositivedirectionRecosignal5 > 11)
10875  break; // 4x6 = 24
10876  } //ccctest>0
10877 
10878  } // for i
10879  } //if(jeta-41 >= 0)
10880  } //for jeta
10882  c3x5->Update();
10883  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
10884  c3x5->Clear();
10885  // clean-up
10886  if (h2CeffHEpositivedirectionRecosignal5)
10887  delete h2CeffHEpositivedirectionRecosignal5;
10888  //========================================================================================== 9
10889  //======================================================================
10890  //======================================================================1D plot: R vs phi , different eta, depth=6
10891  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
10892  c3x5->Clear();
10894  c3x5->Divide(3, 5);
10895  c3x5->cd(1);
10896  int kcountHEpositivedirectionRecosignal6 = 1;
10897  TH1F* h2CeffHEpositivedirectionRecosignal6 = new TH1F("h2CeffHEpositivedirectionRecosignal6", "", nphi, 0., 72.);
10898 
10899  for (int jeta = 0; jeta < njeta; jeta++) {
10900  // positivedirectionRecosignal:
10901  if (jeta - 41 >= 0) {
10902  // for (int i=0;i<ndepth;i++) {
10903  // depth=6
10904  for (int i = 5; i < 6; i++) {
10905  TH1F* HEpositivedirectionRecosignal6 = (TH1F*)h2CeffHEpositivedirectionRecosignal6->Clone("twod1");
10906 
10907  float ccctest = 0; // to avoid empty massive elements
10908  for (int jphi = 0; jphi < nphi; jphi++) {
10909  double ccc1 = arecosignalhe[i][jeta][jphi];
10910  if (ccc1 != 0.) {
10911  HEpositivedirectionRecosignal6->Fill(jphi, ccc1);
10912  ccctest = 1.; //HEpositivedirectionRecosignal6->SetBinError(i,0.01);
10913  }
10914  } // for jphi
10915  if (ccctest > 0.) {
10916  //cout<<"999 kcountHEpositivedirectionRecosignal6 = "<<kcountHEpositivedirectionRecosignal6 <<" jeta-41= "<< jeta-41 <<endl;
10917  c3x5->cd(kcountHEpositivedirectionRecosignal6);
10918  HEpositivedirectionRecosignal6->SetMarkerStyle(20);
10919  HEpositivedirectionRecosignal6->SetMarkerSize(0.4);
10920  HEpositivedirectionRecosignal6->GetYaxis()->SetLabelSize(0.04);
10921  HEpositivedirectionRecosignal6->SetXTitle("HEpositivedirectionRecosignal6 \b");
10922  HEpositivedirectionRecosignal6->SetMarkerColor(2);
10923  HEpositivedirectionRecosignal6->SetLineColor(0);
10924  gPad->SetGridy();
10925  gPad->SetGridx();
10926  // gPad->SetLogy();
10927  if (kcountHEpositivedirectionRecosignal6 == 1)
10928  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
10929  if (kcountHEpositivedirectionRecosignal6 == 2)
10930  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
10931  if (kcountHEpositivedirectionRecosignal6 == 3)
10932  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
10933  if (kcountHEpositivedirectionRecosignal6 == 4)
10934  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
10935  if (kcountHEpositivedirectionRecosignal6 == 5)
10936  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
10937  if (kcountHEpositivedirectionRecosignal6 == 6)
10938  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
10939  if (kcountHEpositivedirectionRecosignal6 == 7)
10940  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
10941  if (kcountHEpositivedirectionRecosignal6 == 8)
10942  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
10943  if (kcountHEpositivedirectionRecosignal6 == 9)
10944  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
10945  if (kcountHEpositivedirectionRecosignal6 == 10)
10946  HEpositivedirectionRecosignal6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
10947  HEpositivedirectionRecosignal6->Draw("Error");
10948  kcountHEpositivedirectionRecosignal6++;
10949  if (kcountHEpositivedirectionRecosignal6 > 10)
10950  break; // 4x6 = 24
10951  } //ccctest>0
10952 
10953  } // for i
10954  } //if(jeta-41 >= 0)
10955  } //for jeta
10957  c3x5->Update();
10958  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
10959  c3x5->Clear();
10960  // clean-up
10961  if (h2CeffHEpositivedirectionRecosignal6)
10962  delete h2CeffHEpositivedirectionRecosignal6;
10963  //========================================================================================== 10
10964  //======================================================================
10965  //======================================================================1D plot: R vs phi , different eta, depth=7
10966  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
10967  c3x5->Clear();
10969  c3x5->Divide(3, 5);
10970  c3x5->cd(1);
10971  int kcountHEpositivedirectionRecosignal7 = 1;
10972  TH1F* h2CeffHEpositivedirectionRecosignal7 = new TH1F("h2CeffHEpositivedirectionRecosignal7", "", nphi, 0., 72.);
10973 
10974  for (int jeta = 0; jeta < njeta; jeta++) {
10975  // positivedirectionRecosignal:
10976  if (jeta - 41 >= 0) {
10977  // for (int i=0;i<ndepth;i++) {
10978  // depth=7
10979  for (int i = 6; i < 7; i++) {
10980  TH1F* HEpositivedirectionRecosignal7 = (TH1F*)h2CeffHEpositivedirectionRecosignal7->Clone("twod1");
10981 
10982  float ccctest = 0; // to avoid empty massive elements
10983  for (int jphi = 0; jphi < nphi; jphi++) {
10984  double ccc1 = arecosignalhe[i][jeta][jphi];
10985  if (ccc1 != 0.) {
10986  HEpositivedirectionRecosignal7->Fill(jphi, ccc1);
10987  ccctest = 1.; //HEpositivedirectionRecosignal7->SetBinError(i,0.01);
10988  }
10989  } // for jphi
10990  if (ccctest > 0.) {
10991  //cout<<"1010 kcountHEpositivedirectionRecosignal7 = "<<kcountHEpositivedirectionRecosignal7 <<" jeta-41= "<< jeta-41 <<endl;
10992  c3x5->cd(kcountHEpositivedirectionRecosignal7);
10993  HEpositivedirectionRecosignal7->SetMarkerStyle(20);
10994  HEpositivedirectionRecosignal7->SetMarkerSize(0.4);
10995  HEpositivedirectionRecosignal7->GetYaxis()->SetLabelSize(0.04);
10996  HEpositivedirectionRecosignal7->SetXTitle("HEpositivedirectionRecosignal7 \b");
10997  HEpositivedirectionRecosignal7->SetMarkerColor(2);
10998  HEpositivedirectionRecosignal7->SetLineColor(0);
10999  gPad->SetGridy();
11000  gPad->SetGridx();
11001  // gPad->SetLogy();
11002  if (kcountHEpositivedirectionRecosignal7 == 1)
11003  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
11004  if (kcountHEpositivedirectionRecosignal7 == 2)
11005  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
11006  if (kcountHEpositivedirectionRecosignal7 == 3)
11007  HEpositivedirectionRecosignal7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
11008  HEpositivedirectionRecosignal7->Draw("Error");
11009  kcountHEpositivedirectionRecosignal7++;
11010  if (kcountHEpositivedirectionRecosignal7 > 3)
11011  break; //
11012  } //ccctest>0
11013 
11014  } // for i
11015  } //if(jeta-41 >= 0)
11016  } //for jeta
11018  c3x5->Update();
11019  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
11020  c3x5->Clear();
11021  // clean-up
11022  if (h2CeffHEpositivedirectionRecosignal7)
11023  delete h2CeffHEpositivedirectionRecosignal7;
11024 
11026  //========================================================================================== 1114
11027  //======================================================================
11028  //======================================================================1D plot: R vs phi , different eta, depth=1
11029  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
11030  c3x5->Clear();
11032  c3x5->Divide(3, 5);
11033  c3x5->cd(1);
11034  int kcountHEnegativedirectionRecosignal1 = 1;
11035  TH1F* h2CeffHEnegativedirectionRecosignal1 = new TH1F("h2CeffHEnegativedirectionRecosignal1", "", nphi, 0., 72.);
11036  for (int jeta = 0; jeta < njeta; jeta++) {
11037  // negativedirectionRecosignal:
11038  if (jeta - 41 < 0) {
11039  // for (int i=0;i<ndepth;i++) {
11040  // depth=1
11041  for (int i = 0; i < 1; i++) {
11042  TH1F* HEnegativedirectionRecosignal1 = (TH1F*)h2CeffHEnegativedirectionRecosignal1->Clone("twod1");
11043  float ccctest = 0; // to avoid empty massive elements
11044  for (int jphi = 0; jphi < nphi; jphi++) {
11045  double ccc1 = arecosignalhe[i][jeta][jphi];
11046  if (ccc1 != 0.) {
11047  HEnegativedirectionRecosignal1->Fill(jphi, ccc1);
11048  ccctest = 1.; //HEnegativedirectionRecosignal1->SetBinError(i,0.01);
11049  }
11050  } // for jphi
11051  if (ccctest > 0.) {
11052  // cout<<"444 kcountHEnegativedirectionRecosignal1 = "<<kcountHEnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
11053  c3x5->cd(kcountHEnegativedirectionRecosignal1);
11054  HEnegativedirectionRecosignal1->SetMarkerStyle(20);
11055  HEnegativedirectionRecosignal1->SetMarkerSize(0.4);
11056  HEnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
11057  HEnegativedirectionRecosignal1->SetXTitle("HEnegativedirectionRecosignal1 \b");
11058  HEnegativedirectionRecosignal1->SetMarkerColor(2);
11059  HEnegativedirectionRecosignal1->SetLineColor(0);
11060  gPad->SetGridy();
11061  gPad->SetGridx();
11062  // gPad->SetLogy();
11063  if (kcountHEnegativedirectionRecosignal1 == 1)
11064  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
11065  if (kcountHEnegativedirectionRecosignal1 == 2)
11066  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
11067  if (kcountHEnegativedirectionRecosignal1 == 3)
11068  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
11069  if (kcountHEnegativedirectionRecosignal1 == 4)
11070  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
11071  if (kcountHEnegativedirectionRecosignal1 == 5)
11072  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
11073  if (kcountHEnegativedirectionRecosignal1 == 6)
11074  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
11075  if (kcountHEnegativedirectionRecosignal1 == 7)
11076  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
11077  if (kcountHEnegativedirectionRecosignal1 == 8)
11078  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
11079  if (kcountHEnegativedirectionRecosignal1 == 9)
11080  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
11081  if (kcountHEnegativedirectionRecosignal1 == 10)
11082  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
11083  if (kcountHEnegativedirectionRecosignal1 == 11)
11084  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
11085  if (kcountHEnegativedirectionRecosignal1 == 12)
11086  HEnegativedirectionRecosignal1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
11087  HEnegativedirectionRecosignal1->Draw("Error");
11088  kcountHEnegativedirectionRecosignal1++;
11089  if (kcountHEnegativedirectionRecosignal1 > 12)
11090  break; // 4x6 = 24
11091  } //ccctest>0
11092 
11093  } // for i
11094  } //if(jeta-41 < 0)
11095  } //for jeta
11097  c3x5->Update();
11098  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
11099  c3x5->Clear();
11100  // clean-up
11101  if (h2CeffHEnegativedirectionRecosignal1)
11102  delete h2CeffHEnegativedirectionRecosignal1;
11103 
11104  //========================================================================================== 1115
11105  //======================================================================
11106  //======================================================================1D plot: R vs phi , different eta, depth=2
11107  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
11108  c3x5->Clear();
11110  c3x5->Divide(3, 5);
11111  c3x5->cd(1);
11112  int kcountHEnegativedirectionRecosignal2 = 1;
11113  TH1F* h2CeffHEnegativedirectionRecosignal2 = new TH1F("h2CeffHEnegativedirectionRecosignal2", "", nphi, 0., 72.);
11114  for (int jeta = 0; jeta < njeta; jeta++) {
11115  // negativedirectionRecosignal:
11116  if (jeta - 41 < 0) {
11117  // for (int i=0;i<ndepth;i++) {
11118  // depth=2
11119  for (int i = 1; i < 2; i++) {
11120  TH1F* HEnegativedirectionRecosignal2 = (TH1F*)h2CeffHEnegativedirectionRecosignal2->Clone("twod1");
11121  float ccctest = 0; // to avoid empty massive elements
11122  for (int jphi = 0; jphi < nphi; jphi++) {
11123  double ccc1 = arecosignalhe[i][jeta][jphi];
11124  if (ccc1 != 0.) {
11125  HEnegativedirectionRecosignal2->Fill(jphi, ccc1);
11126  ccctest = 1.; //HEnegativedirectionRecosignal2->SetBinError(i,0.01);
11127  }
11128  } // for jphi
11129  if (ccctest > 0.) {
11130  //cout<<"555 kcountHEnegativedirectionRecosignal2 = "<<kcountHEnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
11131  c3x5->cd(kcountHEnegativedirectionRecosignal2);
11132  HEnegativedirectionRecosignal2->SetMarkerStyle(20);
11133  HEnegativedirectionRecosignal2->SetMarkerSize(0.4);
11134  HEnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
11135  HEnegativedirectionRecosignal2->SetXTitle("HEnegativedirectionRecosignal2 \b");
11136  HEnegativedirectionRecosignal2->SetMarkerColor(2);
11137  HEnegativedirectionRecosignal2->SetLineColor(0);
11138  gPad->SetGridy();
11139  gPad->SetGridx();
11140  // gPad->SetLogy();
11141  if (kcountHEnegativedirectionRecosignal2 == 1)
11142  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
11143  if (kcountHEnegativedirectionRecosignal2 == 2)
11144  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
11145  if (kcountHEnegativedirectionRecosignal2 == 3)
11146  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
11147  if (kcountHEnegativedirectionRecosignal2 == 4)
11148  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
11149  if (kcountHEnegativedirectionRecosignal2 == 5)
11150  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
11151  if (kcountHEnegativedirectionRecosignal2 == 6)
11152  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
11153  if (kcountHEnegativedirectionRecosignal2 == 7)
11154  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
11155  if (kcountHEnegativedirectionRecosignal2 == 8)
11156  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
11157  if (kcountHEnegativedirectionRecosignal2 == 9)
11158  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
11159  if (kcountHEnegativedirectionRecosignal2 == 10)
11160  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
11161  if (kcountHEnegativedirectionRecosignal2 == 11)
11162  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
11163  if (kcountHEnegativedirectionRecosignal2 == 12)
11164  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
11165  if (kcountHEnegativedirectionRecosignal2 == 13)
11166  HEnegativedirectionRecosignal2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
11167  HEnegativedirectionRecosignal2->Draw("Error");
11168  kcountHEnegativedirectionRecosignal2++;
11169  if (kcountHEnegativedirectionRecosignal2 > 13)
11170  break; // 4x6 = 24
11171  } //ccctest>0
11172 
11173  } // for i
11174  } //if(jeta-41 < 0)
11175  } //for jeta
11177  c3x5->Update();
11178  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
11179  c3x5->Clear();
11180  // clean-up
11181  if (h2CeffHEnegativedirectionRecosignal2)
11182  delete h2CeffHEnegativedirectionRecosignal2;
11183  //========================================================================================== 1116
11184  //======================================================================
11185  //======================================================================1D plot: R vs phi , different eta, depth=3
11186  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
11187  c3x5->Clear();
11189  c3x5->Divide(3, 5);
11190  c3x5->cd(1);
11191  int kcountHEnegativedirectionRecosignal3 = 1;
11192  TH1F* h2CeffHEnegativedirectionRecosignal3 = new TH1F("h2CeffHEnegativedirectionRecosignal3", "", nphi, 0., 72.);
11193  for (int jeta = 0; jeta < njeta; jeta++) {
11194  // negativedirectionRecosignal:
11195  if (jeta - 41 < 0) {
11196  // for (int i=0;i<ndepth;i++) {
11197  // depth=3
11198  for (int i = 2; i < 3; i++) {
11199  TH1F* HEnegativedirectionRecosignal3 = (TH1F*)h2CeffHEnegativedirectionRecosignal3->Clone("twod1");
11200  float ccctest = 0; // to avoid empty massive elements
11201  for (int jphi = 0; jphi < nphi; jphi++) {
11202  double ccc1 = arecosignalhe[i][jeta][jphi];
11203  if (ccc1 != 0.) {
11204  HEnegativedirectionRecosignal3->Fill(jphi, ccc1);
11205  ccctest = 1.; //HEnegativedirectionRecosignal3->SetBinError(i,0.01);
11206  }
11207  } // for jphi
11208  if (ccctest > 0.) {
11209  //cout<<"666 kcountHEnegativedirectionRecosignal3 = "<<kcountHEnegativedirectionRecosignal3 <<" jeta-41= "<< jeta-41 <<endl;
11210  c3x5->cd(kcountHEnegativedirectionRecosignal3);
11211  HEnegativedirectionRecosignal3->SetMarkerStyle(20);
11212  HEnegativedirectionRecosignal3->SetMarkerSize(0.4);
11213  HEnegativedirectionRecosignal3->GetYaxis()->SetLabelSize(0.04);
11214  HEnegativedirectionRecosignal3->SetXTitle("HEnegativedirectionRecosignal3 \b");
11215  HEnegativedirectionRecosignal3->SetMarkerColor(2);
11216  HEnegativedirectionRecosignal3->SetLineColor(0);
11217  gPad->SetGridy();
11218  gPad->SetGridx();
11219  // gPad->SetLogy();
11220  if (kcountHEnegativedirectionRecosignal3 == 1)
11221  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
11222  if (kcountHEnegativedirectionRecosignal3 == 2)
11223  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
11224  if (kcountHEnegativedirectionRecosignal3 == 3)
11225  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
11226  if (kcountHEnegativedirectionRecosignal3 == 4)
11227  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
11228  if (kcountHEnegativedirectionRecosignal3 == 5)
11229  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
11230  if (kcountHEnegativedirectionRecosignal3 == 6)
11231  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
11232  if (kcountHEnegativedirectionRecosignal3 == 7)
11233  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
11234  if (kcountHEnegativedirectionRecosignal3 == 8)
11235  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
11236  if (kcountHEnegativedirectionRecosignal3 == 9)
11237  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
11238  if (kcountHEnegativedirectionRecosignal3 == 10)
11239  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
11240  if (kcountHEnegativedirectionRecosignal3 == 11)
11241  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
11242  if (kcountHEnegativedirectionRecosignal3 == 12)
11243  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
11244  if (kcountHEnegativedirectionRecosignal3 == 13)
11245  HEnegativedirectionRecosignal3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
11246  HEnegativedirectionRecosignal3->Draw("Error");
11247  kcountHEnegativedirectionRecosignal3++;
11248  if (kcountHEnegativedirectionRecosignal3 > 13)
11249  break; // 4x6 = 24
11250  } //ccctest>0
11251 
11252  } // for i
11253  } //if(jeta-41 < 0)
11254  } //for jeta
11256  c3x5->Update();
11257  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
11258  c3x5->Clear();
11259  // clean-up
11260  if (h2CeffHEnegativedirectionRecosignal3)
11261  delete h2CeffHEnegativedirectionRecosignal3;
11262  //========================================================================================== 1117
11263  //======================================================================
11264  //======================================================================1D plot: R vs phi , different eta, depth=4
11265  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
11266  c3x5->Clear();
11268  c3x5->Divide(3, 5);
11269  c3x5->cd(1);
11270  int kcountHEnegativedirectionRecosignal4 = 1;
11271  TH1F* h2CeffHEnegativedirectionRecosignal4 = new TH1F("h2CeffHEnegativedirectionRecosignal4", "", nphi, 0., 72.);
11272 
11273  for (int jeta = 0; jeta < njeta; jeta++) {
11274  // negativedirectionRecosignal:
11275  if (jeta - 41 < 0) {
11276  // for (int i=0;i<ndepth;i++) {
11277  // depth=4
11278  for (int i = 3; i < 4; i++) {
11279  TH1F* HEnegativedirectionRecosignal4 = (TH1F*)h2CeffHEnegativedirectionRecosignal4->Clone("twod1");
11280 
11281  float ccctest = 0; // to avoid empty massive elements
11282  for (int jphi = 0; jphi < nphi; jphi++) {
11283  double ccc1 = arecosignalhe[i][jeta][jphi];
11284  if (ccc1 != 0.) {
11285  HEnegativedirectionRecosignal4->Fill(jphi, ccc1);
11286  ccctest = 1.; //HEnegativedirectionRecosignal4->SetBinError(i,0.01);
11287  }
11288  } // for jphi
11289  if (ccctest > 0.) {
11290  //cout<<"777 kcountHEnegativedirectionRecosignal4 = "<<kcountHEnegativedirectionRecosignal4 <<" jeta-41= "<< jeta-41 <<endl;
11291  c3x5->cd(kcountHEnegativedirectionRecosignal4);
11292  HEnegativedirectionRecosignal4->SetMarkerStyle(20);
11293  HEnegativedirectionRecosignal4->SetMarkerSize(0.4);
11294  HEnegativedirectionRecosignal4->GetYaxis()->SetLabelSize(0.04);
11295  HEnegativedirectionRecosignal4->SetXTitle("HEnegativedirectionRecosignal4 \b");
11296  HEnegativedirectionRecosignal4->SetMarkerColor(2);
11297  HEnegativedirectionRecosignal4->SetLineColor(0);
11298  gPad->SetGridy();
11299  gPad->SetGridx();
11300  // gPad->SetLogy();
11301  if (kcountHEnegativedirectionRecosignal4 == 1)
11302  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
11303  if (kcountHEnegativedirectionRecosignal4 == 2)
11304  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
11305  if (kcountHEnegativedirectionRecosignal4 == 3)
11306  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
11307  if (kcountHEnegativedirectionRecosignal4 == 4)
11308  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
11309  if (kcountHEnegativedirectionRecosignal4 == 5)
11310  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
11311  if (kcountHEnegativedirectionRecosignal4 == 6)
11312  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
11313  if (kcountHEnegativedirectionRecosignal4 == 7)
11314  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
11315  if (kcountHEnegativedirectionRecosignal4 == 8)
11316  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
11317  if (kcountHEnegativedirectionRecosignal4 == 9)
11318  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
11319  if (kcountHEnegativedirectionRecosignal4 == 10)
11320  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
11321  if (kcountHEnegativedirectionRecosignal4 == 11)
11322  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
11323  if (kcountHEnegativedirectionRecosignal4 == 12)
11324  HEnegativedirectionRecosignal4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
11325  HEnegativedirectionRecosignal4->Draw("Error");
11326  kcountHEnegativedirectionRecosignal4++;
11327  if (kcountHEnegativedirectionRecosignal4 > 12)
11328  break; // 4x6 = 24
11329  } //ccctest>0
11330 
11331  } // for i
11332  } //if(jeta-41 < 0)
11333  } //for jeta
11335  c3x5->Update();
11336  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
11337  c3x5->Clear();
11338  // clean-up
11339  if (h2CeffHEnegativedirectionRecosignal4)
11340  delete h2CeffHEnegativedirectionRecosignal4;
11341  //========================================================================================== 1118
11342  //======================================================================
11343  //======================================================================1D plot: R vs phi , different eta, depth=5
11344  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
11345  c3x5->Clear();
11347  c3x5->Divide(3, 5);
11348  c3x5->cd(1);
11349  int kcountHEnegativedirectionRecosignal5 = 1;
11350  TH1F* h2CeffHEnegativedirectionRecosignal5 = new TH1F("h2CeffHEnegativedirectionRecosignal5", "", nphi, 0., 72.);
11351 
11352  for (int jeta = 0; jeta < njeta; jeta++) {
11353  // negativedirectionRecosignal:
11354  if (jeta - 41 < 0) {
11355  // for (int i=0;i<ndepth;i++) {
11356  // depth=5
11357  for (int i = 4; i < 5; i++) {
11358  TH1F* HEnegativedirectionRecosignal5 = (TH1F*)h2CeffHEnegativedirectionRecosignal5->Clone("twod1");
11359 
11360  float ccctest = 0; // to avoid empty massive elements
11361  for (int jphi = 0; jphi < nphi; jphi++) {
11362  // cout<<"888 initial kcountHEnegativedirectionRecosignal5 = "<<kcountHEnegativedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" arecosignalhe[i][jeta][jphi]= "<< arecosignalhe[i][jeta][jphi] <<" depth= "<< i <<endl;
11363 
11364  double ccc1 = arecosignalhe[i][jeta][jphi];
11365  if (ccc1 != 0.) {
11366  HEnegativedirectionRecosignal5->Fill(jphi, ccc1);
11367  ccctest = 1.; //HEnegativedirectionRecosignal5->SetBinError(i,0.01);
11368  }
11369  } // for jphi
11370  if (ccctest > 0.) {
11371  //cout<<"888 kcountHEnegativedirectionRecosignal5 = "<<kcountHEnegativedirectionRecosignal5 <<" jeta-41= "<< jeta-41 <<endl;
11372  c3x5->cd(kcountHEnegativedirectionRecosignal5);
11373  HEnegativedirectionRecosignal5->SetMarkerStyle(20);
11374  HEnegativedirectionRecosignal5->SetMarkerSize(0.4);
11375  HEnegativedirectionRecosignal5->GetYaxis()->SetLabelSize(0.04);
11376  HEnegativedirectionRecosignal5->SetXTitle("HEnegativedirectionRecosignal5 \b");
11377  HEnegativedirectionRecosignal5->SetMarkerColor(2);
11378  HEnegativedirectionRecosignal5->SetLineColor(0);
11379  gPad->SetGridy();
11380  gPad->SetGridx();
11381  // gPad->SetLogy();
11382  if (kcountHEnegativedirectionRecosignal5 == 1)
11383  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
11384  if (kcountHEnegativedirectionRecosignal5 == 2)
11385  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
11386  if (kcountHEnegativedirectionRecosignal5 == 3)
11387  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
11388  if (kcountHEnegativedirectionRecosignal5 == 4)
11389  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
11390  if (kcountHEnegativedirectionRecosignal5 == 5)
11391  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
11392  if (kcountHEnegativedirectionRecosignal5 == 6)
11393  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
11394  if (kcountHEnegativedirectionRecosignal5 == 7)
11395  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
11396  if (kcountHEnegativedirectionRecosignal5 == 8)
11397  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
11398  if (kcountHEnegativedirectionRecosignal5 == 9)
11399  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
11400  if (kcountHEnegativedirectionRecosignal5 == 10)
11401  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
11402  if (kcountHEnegativedirectionRecosignal5 == 11)
11403  HEnegativedirectionRecosignal5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
11404  HEnegativedirectionRecosignal5->Draw("Error");
11405  kcountHEnegativedirectionRecosignal5++;
11406  if (kcountHEnegativedirectionRecosignal5 > 11)
11407  break; // 4x6 = 24
11408  } //ccctest>0
11409 
11410  } // for i
11411  } //if(jeta-41 < 0)
11412  } //for jeta
11414  c3x5->Update();
11415  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
11416  c3x5->Clear();
11417  // clean-up
11418  if (h2CeffHEnegativedirectionRecosignal5)
11419  delete h2CeffHEnegativedirectionRecosignal5;
11420  //========================================================================================== 1119
11421  //======================================================================
11422  //======================================================================1D plot: R vs phi , different eta, depth=6
11423  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
11424  c3x5->Clear();
11426  c3x5->Divide(3, 5);
11427  c3x5->cd(1);
11428  int kcountHEnegativedirectionRecosignal6 = 1;
11429  TH1F* h2CeffHEnegativedirectionRecosignal6 = new TH1F("h2CeffHEnegativedirectionRecosignal6", "", nphi, 0., 72.);
11430 
11431  for (int jeta = 0; jeta < njeta; jeta++) {
11432  // negativedirectionRecosignal:
11433  if (jeta - 41 < 0) {
11434  // for (int i=0;i<ndepth;i++) {
11435  // depth=6
11436  for (int i = 5; i < 6; i++) {
11437  TH1F* HEnegativedirectionRecosignal6 = (TH1F*)h2CeffHEnegativedirectionRecosignal6->Clone("twod1");
11438 
11439  float ccctest = 0; // to avoid empty massive elements
11440  for (int jphi = 0; jphi < nphi; jphi++) {
11441  double ccc1 = arecosignalhe[i][jeta][jphi];
11442  if (ccc1 != 0.) {
11443  HEnegativedirectionRecosignal6->Fill(jphi, ccc1);
11444  ccctest = 1.; //HEnegativedirectionRecosignal6->SetBinError(i,0.01);
11445  }
11446  } // for jphi
11447  if (ccctest > 0.) {
11448  //cout<<"999 kcountHEnegativedirectionRecosignal6 = "<<kcountHEnegativedirectionRecosignal6 <<" jeta-41= "<< jeta-41 <<endl;
11449  c3x5->cd(kcountHEnegativedirectionRecosignal6);
11450  HEnegativedirectionRecosignal6->SetMarkerStyle(20);
11451  HEnegativedirectionRecosignal6->SetMarkerSize(0.4);
11452  HEnegativedirectionRecosignal6->GetYaxis()->SetLabelSize(0.04);
11453  HEnegativedirectionRecosignal6->SetXTitle("HEnegativedirectionRecosignal6 \b");
11454  HEnegativedirectionRecosignal6->SetMarkerColor(2);
11455  HEnegativedirectionRecosignal6->SetLineColor(0);
11456  gPad->SetGridy();
11457  gPad->SetGridx();
11458  // gPad->SetLogy();
11459  if (kcountHEnegativedirectionRecosignal6 == 1)
11460  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
11461  if (kcountHEnegativedirectionRecosignal6 == 2)
11462  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
11463  if (kcountHEnegativedirectionRecosignal6 == 3)
11464  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
11465  if (kcountHEnegativedirectionRecosignal6 == 4)
11466  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
11467  if (kcountHEnegativedirectionRecosignal6 == 5)
11468  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
11469  if (kcountHEnegativedirectionRecosignal6 == 6)
11470  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
11471  if (kcountHEnegativedirectionRecosignal6 == 7)
11472  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
11473  if (kcountHEnegativedirectionRecosignal6 == 8)
11474  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
11475  if (kcountHEnegativedirectionRecosignal6 == 9)
11476  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
11477  if (kcountHEnegativedirectionRecosignal6 == 10)
11478  HEnegativedirectionRecosignal6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
11479  HEnegativedirectionRecosignal6->Draw("Error");
11480  kcountHEnegativedirectionRecosignal6++;
11481  if (kcountHEnegativedirectionRecosignal6 > 10)
11482  break; // 4x6 = 24
11483  } //ccctest>0
11484 
11485  } // for i
11486  } //if(jeta-41 < 0)
11487  } //for jeta
11489  c3x5->Update();
11490  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
11491  c3x5->Clear();
11492  // clean-up
11493  if (h2CeffHEnegativedirectionRecosignal6)
11494  delete h2CeffHEnegativedirectionRecosignal6;
11495  //========================================================================================== 11110
11496  //======================================================================
11497  //======================================================================1D plot: R vs phi , different eta, depth=7
11498  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
11499  c3x5->Clear();
11501  c3x5->Divide(3, 5);
11502  c3x5->cd(1);
11503  int kcountHEnegativedirectionRecosignal7 = 1;
11504  TH1F* h2CeffHEnegativedirectionRecosignal7 = new TH1F("h2CeffHEnegativedirectionRecosignal7", "", nphi, 0., 72.);
11505 
11506  for (int jeta = 0; jeta < njeta; jeta++) {
11507  // negativedirectionRecosignal:
11508  if (jeta - 41 < 0) {
11509  // for (int i=0;i<ndepth;i++) {
11510  // depth=7
11511  for (int i = 6; i < 7; i++) {
11512  TH1F* HEnegativedirectionRecosignal7 = (TH1F*)h2CeffHEnegativedirectionRecosignal7->Clone("twod1");
11513 
11514  float ccctest = 0; // to avoid empty massive elements
11515  for (int jphi = 0; jphi < nphi; jphi++) {
11516  double ccc1 = arecosignalhe[i][jeta][jphi];
11517  if (ccc1 != 0.) {
11518  HEnegativedirectionRecosignal7->Fill(jphi, ccc1);
11519  ccctest = 1.; //HEnegativedirectionRecosignal7->SetBinError(i,0.01);
11520  }
11521  } // for jphi
11522  if (ccctest > 0.) {
11523  //cout<<"1010 kcountHEnegativedirectionRecosignal7 = "<<kcountHEnegativedirectionRecosignal7 <<" jeta-41= "<< jeta-41 <<endl;
11524  c3x5->cd(kcountHEnegativedirectionRecosignal7);
11525  HEnegativedirectionRecosignal7->SetMarkerStyle(20);
11526  HEnegativedirectionRecosignal7->SetMarkerSize(0.4);
11527  HEnegativedirectionRecosignal7->GetYaxis()->SetLabelSize(0.04);
11528  HEnegativedirectionRecosignal7->SetXTitle("HEnegativedirectionRecosignal7 \b");
11529  HEnegativedirectionRecosignal7->SetMarkerColor(2);
11530  HEnegativedirectionRecosignal7->SetLineColor(0);
11531  gPad->SetGridy();
11532  gPad->SetGridx();
11533  // gPad->SetLogy();
11534  if (kcountHEnegativedirectionRecosignal7 == 1)
11535  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
11536  if (kcountHEnegativedirectionRecosignal7 == 2)
11537  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
11538  if (kcountHEnegativedirectionRecosignal7 == 3)
11539  HEnegativedirectionRecosignal7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
11540  HEnegativedirectionRecosignal7->Draw("Error");
11541  kcountHEnegativedirectionRecosignal7++;
11542  if (kcountHEnegativedirectionRecosignal7 > 3)
11543  break; // 4x6 = 24
11544  } //ccctest>0
11545 
11546  } // for i
11547  } //if(jeta-41 < 0)
11548  } //for jeta
11550  c3x5->Update();
11551  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
11552  c3x5->Clear();
11553  // clean-up
11554  if (h2CeffHEnegativedirectionRecosignal7)
11555  delete h2CeffHEnegativedirectionRecosignal7;
11556 
11558 
11559  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
11560 
11561  //cout<<" Start Vaiance: preparation *****" <<endl;
11562  TH2F* recosignalVariance1HE1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE1");
11563  TH2F* recosignalVariance0HE1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE1");
11564  TH2F* recosignalVarianceHE1 = (TH2F*)recosignalVariance1HE1->Clone("recosignalVarianceHE1");
11565  recosignalVarianceHE1->Divide(recosignalVariance1HE1, recosignalVariance0HE1, 1, 1, "B");
11566  TH2F* recosignalVariance1HE2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE2");
11567  TH2F* recosignalVariance0HE2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE2");
11568  TH2F* recosignalVarianceHE2 = (TH2F*)recosignalVariance1HE2->Clone("recosignalVarianceHE2");
11569  recosignalVarianceHE2->Divide(recosignalVariance1HE2, recosignalVariance0HE2, 1, 1, "B");
11570  TH2F* recosignalVariance1HE3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE3");
11571  TH2F* recosignalVariance0HE3 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE3");
11572  TH2F* recosignalVarianceHE3 = (TH2F*)recosignalVariance1HE3->Clone("recosignalVarianceHE3");
11573  recosignalVarianceHE3->Divide(recosignalVariance1HE3, recosignalVariance0HE3, 1, 1, "B");
11574  TH2F* recosignalVariance1HE4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE4");
11575  TH2F* recosignalVariance0HE4 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE4");
11576  TH2F* recosignalVarianceHE4 = (TH2F*)recosignalVariance1HE4->Clone("recosignalVarianceHE4");
11577  recosignalVarianceHE4->Divide(recosignalVariance1HE4, recosignalVariance0HE4, 1, 1, "B");
11578  TH2F* recosignalVariance1HE5 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE5");
11579  TH2F* recosignalVariance0HE5 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE5");
11580  TH2F* recosignalVarianceHE5 = (TH2F*)recosignalVariance1HE5->Clone("recosignalVarianceHE5");
11581  recosignalVarianceHE5->Divide(recosignalVariance1HE5, recosignalVariance0HE5, 1, 1, "B");
11582  TH2F* recosignalVariance1HE6 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE6");
11583  TH2F* recosignalVariance0HE6 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE6");
11584  TH2F* recosignalVarianceHE6 = (TH2F*)recosignalVariance1HE6->Clone("recosignalVarianceHE6");
11585  recosignalVarianceHE6->Divide(recosignalVariance1HE6, recosignalVariance0HE6, 1, 1, "B");
11586  TH2F* recosignalVariance1HE7 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HE7");
11587  TH2F* recosignalVariance0HE7 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HE7");
11588  TH2F* recosignalVarianceHE7 = (TH2F*)recosignalVariance1HE7->Clone("recosignalVarianceHE7");
11589  recosignalVarianceHE7->Divide(recosignalVariance1HE7, recosignalVariance0HE7, 1, 1, "B");
11590  //cout<<" Vaiance: preparation DONE *****" <<endl;
11591  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvariancehe
11592  // = sum(R*R)/N - (sum(R)/N)**2
11593  for (int jeta = 0; jeta < njeta; jeta++) {
11594  //preparation for PHI normalization:
11595  double sumrecosignalHE0 = 0;
11596  int nsumrecosignalHE0 = 0;
11597  double sumrecosignalHE1 = 0;
11598  int nsumrecosignalHE1 = 0;
11599  double sumrecosignalHE2 = 0;
11600  int nsumrecosignalHE2 = 0;
11601  double sumrecosignalHE3 = 0;
11602  int nsumrecosignalHE3 = 0;
11603  double sumrecosignalHE4 = 0;
11604  int nsumrecosignalHE4 = 0;
11605  double sumrecosignalHE5 = 0;
11606  int nsumrecosignalHE5 = 0;
11607  double sumrecosignalHE6 = 0;
11608  int nsumrecosignalHE6 = 0;
11609  for (int jphi = 0; jphi < njphi; jphi++) {
11610  recosignalvariancehe[0][jeta][jphi] = recosignalVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
11611  recosignalvariancehe[1][jeta][jphi] = recosignalVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
11612  recosignalvariancehe[2][jeta][jphi] = recosignalVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
11613  recosignalvariancehe[3][jeta][jphi] = recosignalVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
11614  recosignalvariancehe[4][jeta][jphi] = recosignalVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
11615  recosignalvariancehe[5][jeta][jphi] = recosignalVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
11616  recosignalvariancehe[6][jeta][jphi] = recosignalVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
11617  if (recosignalvariancehe[0][jeta][jphi] > 0.) {
11618  sumrecosignalHE0 += recosignalvariancehe[0][jeta][jphi];
11619  ++nsumrecosignalHE0;
11620  }
11621  if (recosignalvariancehe[1][jeta][jphi] > 0.) {
11622  sumrecosignalHE1 += recosignalvariancehe[1][jeta][jphi];
11623  ++nsumrecosignalHE1;
11624  }
11625  if (recosignalvariancehe[2][jeta][jphi] > 0.) {
11626  sumrecosignalHE2 += recosignalvariancehe[2][jeta][jphi];
11627  ++nsumrecosignalHE2;
11628  }
11629  if (recosignalvariancehe[3][jeta][jphi] > 0.) {
11630  sumrecosignalHE3 += recosignalvariancehe[3][jeta][jphi];
11631  ++nsumrecosignalHE3;
11632  }
11633  if (recosignalvariancehe[4][jeta][jphi] > 0.) {
11634  sumrecosignalHE4 += recosignalvariancehe[4][jeta][jphi];
11635  ++nsumrecosignalHE4;
11636  }
11637  if (recosignalvariancehe[5][jeta][jphi] > 0.) {
11638  sumrecosignalHE5 += recosignalvariancehe[5][jeta][jphi];
11639  ++nsumrecosignalHE5;
11640  }
11641  if (recosignalvariancehe[6][jeta][jphi] > 0.) {
11642  sumrecosignalHE6 += recosignalvariancehe[6][jeta][jphi];
11643  ++nsumrecosignalHE6;
11644  }
11645  } // phi
11646  // PHI normalization :
11647  for (int jphi = 0; jphi < njphi; jphi++) {
11648  if (recosignalvariancehe[0][jeta][jphi] > 0.)
11649  recosignalvariancehe[0][jeta][jphi] /= (sumrecosignalHE0 / nsumrecosignalHE0);
11650  if (recosignalvariancehe[1][jeta][jphi] > 0.)
11651  recosignalvariancehe[1][jeta][jphi] /= (sumrecosignalHE1 / nsumrecosignalHE1);
11652  if (recosignalvariancehe[2][jeta][jphi] > 0.)
11653  recosignalvariancehe[2][jeta][jphi] /= (sumrecosignalHE2 / nsumrecosignalHE2);
11654  if (recosignalvariancehe[3][jeta][jphi] > 0.)
11655  recosignalvariancehe[3][jeta][jphi] /= (sumrecosignalHE3 / nsumrecosignalHE3);
11656  if (recosignalvariancehe[4][jeta][jphi] > 0.)
11657  recosignalvariancehe[4][jeta][jphi] /= (sumrecosignalHE4 / nsumrecosignalHE4);
11658  if (recosignalvariancehe[5][jeta][jphi] > 0.)
11659  recosignalvariancehe[5][jeta][jphi] /= (sumrecosignalHE5 / nsumrecosignalHE5);
11660  if (recosignalvariancehe[6][jeta][jphi] > 0.)
11661  recosignalvariancehe[6][jeta][jphi] /= (sumrecosignalHE6 / nsumrecosignalHE6);
11662  } // phi
11663  // recosignalvariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
11664  for (int jphi = 0; jphi < njphi; jphi++) {
11665  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
11666  recosignalvariancehe[0][jeta][jphi] -= arecosignalhe[0][jeta][jphi] * arecosignalhe[0][jeta][jphi];
11667  recosignalvariancehe[0][jeta][jphi] = fabs(recosignalvariancehe[0][jeta][jphi]);
11668  recosignalvariancehe[1][jeta][jphi] -= arecosignalhe[1][jeta][jphi] * arecosignalhe[1][jeta][jphi];
11669  recosignalvariancehe[1][jeta][jphi] = fabs(recosignalvariancehe[1][jeta][jphi]);
11670  recosignalvariancehe[2][jeta][jphi] -= arecosignalhe[2][jeta][jphi] * arecosignalhe[2][jeta][jphi];
11671  recosignalvariancehe[2][jeta][jphi] = fabs(recosignalvariancehe[2][jeta][jphi]);
11672  recosignalvariancehe[3][jeta][jphi] -= arecosignalhe[3][jeta][jphi] * arecosignalhe[3][jeta][jphi];
11673  recosignalvariancehe[3][jeta][jphi] = fabs(recosignalvariancehe[3][jeta][jphi]);
11674  recosignalvariancehe[4][jeta][jphi] -= arecosignalhe[4][jeta][jphi] * arecosignalhe[4][jeta][jphi];
11675  recosignalvariancehe[4][jeta][jphi] = fabs(recosignalvariancehe[4][jeta][jphi]);
11676  recosignalvariancehe[5][jeta][jphi] -= arecosignalhe[5][jeta][jphi] * arecosignalhe[5][jeta][jphi];
11677  recosignalvariancehe[5][jeta][jphi] = fabs(recosignalvariancehe[5][jeta][jphi]);
11678  recosignalvariancehe[6][jeta][jphi] -= arecosignalhe[6][jeta][jphi] * arecosignalhe[6][jeta][jphi];
11679  recosignalvariancehe[6][jeta][jphi] = fabs(recosignalvariancehe[6][jeta][jphi]);
11680  }
11681  }
11682  //cout<<" Vaiance: DONE*****" <<endl;
11683  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
11684  //======================================================================
11685  //======================================================================
11686  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
11687  c1x1->Clear();
11689  c1x0->Divide(1, 1);
11690  c1x0->cd(1);
11691  TH2F* DefzDrecosignalHE42D = new TH2F("DefzDrecosignalHE42D", "", neta, -41., 41., nphi, 0., 72.);
11692  TH2F* DefzDrecosignalHE42D0 = new TH2F("DefzDrecosignalHE42D0", "", neta, -41., 41., nphi, 0., 72.);
11693  TH2F* DefzDrecosignalHE42DF = (TH2F*)DefzDrecosignalHE42D0->Clone("DefzDrecosignalHE42DF");
11694  for (int i = 0; i < ndepth; i++) {
11695  for (int jeta = 0; jeta < neta; jeta++) {
11696  for (int jphi = 0; jphi < nphi; jphi++) {
11697  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11698  int k2plot = jeta - 41;
11699  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
11700  if (arecosignalhe[i][jeta][jphi] > 0.) {
11701  DefzDrecosignalHE42D->Fill(kkk, jphi, ccc1);
11702  DefzDrecosignalHE42D0->Fill(kkk, jphi, 1.);
11703  }
11704  }
11705  }
11706  }
11707  DefzDrecosignalHE42DF->Divide(DefzDrecosignalHE42D, DefzDrecosignalHE42D0, 1, 1, "B"); // average A
11708  // DefzDrecosignalHE1->Sumw2();
11709  gPad->SetGridy();
11710  gPad->SetGridx(); // gPad->SetLogz();
11711  DefzDrecosignalHE42DF->SetMarkerStyle(20);
11712  DefzDrecosignalHE42DF->SetMarkerSize(0.4);
11713  DefzDrecosignalHE42DF->GetZaxis()->SetLabelSize(0.08);
11714  DefzDrecosignalHE42DF->SetXTitle("<D>_depth #eta \b");
11715  DefzDrecosignalHE42DF->SetYTitle(" #phi \b");
11716  DefzDrecosignalHE42DF->SetZTitle("<D>_depth \b");
11717  DefzDrecosignalHE42DF->SetMarkerColor(2);
11718  DefzDrecosignalHE42DF->SetLineColor(
11719  0); // DefzDrecosignalHE42DF->SetMaximum(1.000); // DefzDrecosignalHE42DF->SetMinimum(1.0);
11720  DefzDrecosignalHE42DF->Draw("COLZ");
11722  c1x0->Update();
11723  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHE.png");
11724  c1x0->Clear();
11725  // clean-up
11726  if (DefzDrecosignalHE42D)
11727  delete DefzDrecosignalHE42D;
11728  if (DefzDrecosignalHE42D0)
11729  delete DefzDrecosignalHE42D0;
11730  if (DefzDrecosignalHE42DF)
11731  delete DefzDrecosignalHE42DF;
11732  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
11733  //======================================================================
11734  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
11735  c1x1->Clear();
11737  c1x1->Divide(1, 1);
11738  c1x1->cd(1);
11739  TH1F* DefzDrecosignalHE41D = new TH1F("DefzDrecosignalHE41D", "", nphi, 0., 72.);
11740  TH1F* DefzDrecosignalHE41D0 = new TH1F("DefzDrecosignalHE41D0", "", nphi, 0., 72.);
11741  TH1F* DefzDrecosignalHE41DF = (TH1F*)DefzDrecosignalHE41D0->Clone("DefzDrecosignalHE41DF");
11742 
11743  for (int jphi = 0; jphi < nphi; jphi++) {
11744  for (int jeta = 0; jeta < neta; jeta++) {
11745  for (int i = 0; i < ndepth; i++) {
11746  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11747  if (arecosignalhe[i][jeta][jphi] > 0.) {
11748  DefzDrecosignalHE41D->Fill(jphi, ccc1);
11749  DefzDrecosignalHE41D0->Fill(jphi, 1.);
11750  }
11751  }
11752  }
11753  }
11754  // DefzDrecosignalHE41D->Sumw2();DefzDrecosignalHE41D0->Sumw2();
11755 
11756  DefzDrecosignalHE41DF->Divide(
11757  DefzDrecosignalHE41D, DefzDrecosignalHE41D0, 1, 1, "B"); // R averaged over depthes & eta
11758  DefzDrecosignalHE41D0->Sumw2();
11759  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHE41DF->SetBinError(jphi,0.01);}
11760  gPad->SetGridy();
11761  gPad->SetGridx(); // gPad->SetLogz();
11762  DefzDrecosignalHE41DF->SetMarkerStyle(20);
11763  DefzDrecosignalHE41DF->SetMarkerSize(1.4);
11764  DefzDrecosignalHE41DF->GetZaxis()->SetLabelSize(0.08);
11765  DefzDrecosignalHE41DF->SetXTitle("#phi \b");
11766  DefzDrecosignalHE41DF->SetYTitle(" <D> \b");
11767  DefzDrecosignalHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
11768  DefzDrecosignalHE41DF->SetMarkerColor(4);
11769  DefzDrecosignalHE41DF->SetLineColor(
11770  4); // DefzDrecosignalHE41DF->SetMinimum(0.8); DefzDrecosignalHE41DF->SetMinimum(-0.015);
11771  DefzDrecosignalHE41DF->Draw("Error");
11773  c1x1->Update();
11774  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHE.png");
11775  c1x1->Clear();
11776  // clean-up
11777  if (DefzDrecosignalHE41D)
11778  delete DefzDrecosignalHE41D;
11779  if (DefzDrecosignalHE41D0)
11780  delete DefzDrecosignalHE41D0;
11781  if (DefzDrecosignalHE41DF)
11782  delete DefzDrecosignalHE41DF;
11783  //========================================================================================== 14
11784  //======================================================================
11785  //======================================================================1D plot: D vs phi , different eta, depth=1
11786  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
11787  c3x5->Clear();
11789  c3x5->Divide(3, 5);
11790  c3x5->cd(1);
11791  int kcountHEpositivedirectionRecosignalD1 = 1;
11792  TH1F* h2CeffHEpositivedirectionRecosignalD1 = new TH1F("h2CeffHEpositivedirectionRecosignalD1", "", nphi, 0., 72.);
11793 
11794  for (int jeta = 0; jeta < njeta; jeta++) {
11795  // positivedirectionRecosignalD:
11796  if (jeta - 41 >= 0) {
11797  // for (int i=0;i<ndepth;i++) {
11798  // depth=1
11799  for (int i = 0; i < 1; i++) {
11800  TH1F* HEpositivedirectionRecosignalD1 = (TH1F*)h2CeffHEpositivedirectionRecosignalD1->Clone("twod1");
11801 
11802  float ccctest = 0; // to avoid empty massive elements
11803  for (int jphi = 0; jphi < nphi; jphi++) {
11804  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11805  if (arecosignalhe[i][jeta][jphi] > 0.) {
11806  HEpositivedirectionRecosignalD1->Fill(jphi, ccc1);
11807  ccctest = 1.; //HEpositivedirectionRecosignalD1->SetBinError(i,0.01);
11808  }
11809  } // for jphi
11810  if (ccctest > 0.) {
11811  //cout<<"1414 kcountHEpositivedirectionRecosignalD1 = "<<kcountHEpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
11812  c3x5->cd(kcountHEpositivedirectionRecosignalD1);
11813  HEpositivedirectionRecosignalD1->SetMarkerStyle(20);
11814  HEpositivedirectionRecosignalD1->SetMarkerSize(0.4);
11815  HEpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
11816  HEpositivedirectionRecosignalD1->SetXTitle("HEpositivedirectionRecosignalD1 \b");
11817  HEpositivedirectionRecosignalD1->SetMarkerColor(2);
11818  HEpositivedirectionRecosignalD1->SetLineColor(0);
11819  gPad->SetGridy();
11820  gPad->SetGridx();
11821  // gPad->SetLogy();
11822  if (kcountHEpositivedirectionRecosignalD1 == 1)
11823  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
11824  if (kcountHEpositivedirectionRecosignalD1 == 2)
11825  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
11826  if (kcountHEpositivedirectionRecosignalD1 == 3)
11827  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
11828  if (kcountHEpositivedirectionRecosignalD1 == 4)
11829  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
11830  if (kcountHEpositivedirectionRecosignalD1 == 5)
11831  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
11832  if (kcountHEpositivedirectionRecosignalD1 == 6)
11833  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
11834  if (kcountHEpositivedirectionRecosignalD1 == 7)
11835  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
11836  if (kcountHEpositivedirectionRecosignalD1 == 8)
11837  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
11838  if (kcountHEpositivedirectionRecosignalD1 == 9)
11839  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
11840  if (kcountHEpositivedirectionRecosignalD1 == 10)
11841  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
11842  if (kcountHEpositivedirectionRecosignalD1 == 11)
11843  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
11844  if (kcountHEpositivedirectionRecosignalD1 == 12)
11845  HEpositivedirectionRecosignalD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
11846  HEpositivedirectionRecosignalD1->Draw("Error");
11847  kcountHEpositivedirectionRecosignalD1++;
11848  if (kcountHEpositivedirectionRecosignalD1 > 12)
11849  break; // 4x6 = 24
11850  } //ccctest>0
11851 
11852  } // for i
11853  } //if(jeta-41 >= 0)
11854  } //for jeta
11856  c3x5->Update();
11857  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png");
11858  c3x5->Clear();
11859  // clean-up
11860  if (h2CeffHEpositivedirectionRecosignalD1)
11861  delete h2CeffHEpositivedirectionRecosignalD1;
11862  //========================================================================================== 15
11863  //======================================================================
11864  //======================================================================1D plot: D vs phi , different eta, depth=2
11865  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
11866  c3x5->Clear();
11867  c3x5->Divide(3, 5);
11868  c3x5->cd(1);
11869  int kcountHEpositivedirectionRecosignalD2 = 1;
11870  TH1F* h2CeffHEpositivedirectionRecosignalD2 = new TH1F("h2CeffHEpositivedirectionRecosignalD2", "", nphi, 0., 72.);
11871 
11872  for (int jeta = 0; jeta < njeta; jeta++) {
11873  // positivedirectionRecosignalD:
11874  if (jeta - 41 >= 0) {
11875  // for (int i=0;i<ndepth;i++) {
11876  // depth=2
11877  for (int i = 1; i < 2; i++) {
11878  TH1F* HEpositivedirectionRecosignalD2 = (TH1F*)h2CeffHEpositivedirectionRecosignalD2->Clone("twod1");
11879 
11880  float ccctest = 0; // to avoid empty massive elements
11881  for (int jphi = 0; jphi < nphi; jphi++) {
11882  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11883  if (arecosignalhe[i][jeta][jphi] > 0.) {
11884  HEpositivedirectionRecosignalD2->Fill(jphi, ccc1);
11885  ccctest = 1.; //HEpositivedirectionRecosignalD2->SetBinError(i,0.01);
11886  }
11887  } // for jphi
11888  if (ccctest > 0.) {
11889  //cout<<"1515 kcountHEpositivedirectionRecosignalD2 = "<<kcountHEpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
11890  c3x5->cd(kcountHEpositivedirectionRecosignalD2);
11891  HEpositivedirectionRecosignalD2->SetMarkerStyle(20);
11892  HEpositivedirectionRecosignalD2->SetMarkerSize(0.4);
11893  HEpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
11894  HEpositivedirectionRecosignalD2->SetXTitle("HEpositivedirectionRecosignalD2 \b");
11895  HEpositivedirectionRecosignalD2->SetMarkerColor(2);
11896  HEpositivedirectionRecosignalD2->SetLineColor(0);
11897  gPad->SetGridy();
11898  gPad->SetGridx();
11899  // gPad->SetLogy();
11900  if (kcountHEpositivedirectionRecosignalD2 == 1)
11901  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
11902  if (kcountHEpositivedirectionRecosignalD2 == 2)
11903  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
11904  if (kcountHEpositivedirectionRecosignalD2 == 3)
11905  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
11906  if (kcountHEpositivedirectionRecosignalD2 == 4)
11907  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
11908  if (kcountHEpositivedirectionRecosignalD2 == 5)
11909  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
11910  if (kcountHEpositivedirectionRecosignalD2 == 6)
11911  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
11912  if (kcountHEpositivedirectionRecosignalD2 == 7)
11913  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
11914  if (kcountHEpositivedirectionRecosignalD2 == 8)
11915  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
11916  if (kcountHEpositivedirectionRecosignalD2 == 9)
11917  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
11918  if (kcountHEpositivedirectionRecosignalD2 == 10)
11919  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
11920  if (kcountHEpositivedirectionRecosignalD2 == 11)
11921  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
11922  if (kcountHEpositivedirectionRecosignalD2 == 12)
11923  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
11924  if (kcountHEpositivedirectionRecosignalD2 == 13)
11925  HEpositivedirectionRecosignalD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
11926  HEpositivedirectionRecosignalD2->Draw("Error");
11927  kcountHEpositivedirectionRecosignalD2++;
11928  if (kcountHEpositivedirectionRecosignalD2 > 13)
11929  break; // 4x6 = 24
11930  } //ccctest>0
11931 
11932  } // for i
11933  } //if(jeta-41 >= 0)
11934  } //for jeta
11936  c3x5->Update();
11937  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png");
11938  c3x5->Clear();
11939  // clean-up
11940  if (h2CeffHEpositivedirectionRecosignalD2)
11941  delete h2CeffHEpositivedirectionRecosignalD2;
11942  //========================================================================================== 16
11943  //======================================================================
11944  //======================================================================1D plot: D vs phi , different eta, depth=3
11945  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
11946  c3x5->Clear();
11947  c3x5->Divide(3, 5);
11948  c3x5->cd(1);
11949  int kcountHEpositivedirectionRecosignalD3 = 1;
11950  TH1F* h2CeffHEpositivedirectionRecosignalD3 = new TH1F("h2CeffHEpositivedirectionRecosignalD3", "", nphi, 0., 72.);
11951 
11952  for (int jeta = 0; jeta < njeta; jeta++) {
11953  // positivedirectionRecosignalD:
11954  if (jeta - 41 >= 0) {
11955  // for (int i=0;i<ndepth;i++) {
11956  // depth=3
11957  for (int i = 2; i < 3; i++) {
11958  TH1F* HEpositivedirectionRecosignalD3 = (TH1F*)h2CeffHEpositivedirectionRecosignalD3->Clone("twod1");
11959 
11960  float ccctest = 0; // to avoid empty massive elements
11961  for (int jphi = 0; jphi < nphi; jphi++) {
11962  double ccc1 = recosignalvariancehe[i][jeta][jphi];
11963  if (arecosignalhe[i][jeta][jphi] > 0.) {
11964  HEpositivedirectionRecosignalD3->Fill(jphi, ccc1);
11965  ccctest = 1.; //HEpositivedirectionRecosignalD3->SetBinError(i,0.01);
11966  }
11967  } // for jphi
11968  if (ccctest > 0.) {
11969  //cout<<"1616 kcountHEpositivedirectionRecosignalD3 = "<<kcountHEpositivedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
11970  c3x5->cd(kcountHEpositivedirectionRecosignalD3);
11971  HEpositivedirectionRecosignalD3->SetMarkerStyle(20);
11972  HEpositivedirectionRecosignalD3->SetMarkerSize(0.4);
11973  HEpositivedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
11974  HEpositivedirectionRecosignalD3->SetXTitle("HEpositivedirectionRecosignalD3 \b");
11975  HEpositivedirectionRecosignalD3->SetMarkerColor(2);
11976  HEpositivedirectionRecosignalD3->SetLineColor(0);
11977  gPad->SetGridy();
11978  gPad->SetGridx();
11979  // gPad->SetLogy();
11980  if (kcountHEpositivedirectionRecosignalD3 == 1)
11981  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
11982  if (kcountHEpositivedirectionRecosignalD3 == 2)
11983  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
11984  if (kcountHEpositivedirectionRecosignalD3 == 3)
11985  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
11986  if (kcountHEpositivedirectionRecosignalD3 == 4)
11987  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
11988  if (kcountHEpositivedirectionRecosignalD3 == 5)
11989  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
11990  if (kcountHEpositivedirectionRecosignalD3 == 6)
11991  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
11992  if (kcountHEpositivedirectionRecosignalD3 == 7)
11993  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
11994  if (kcountHEpositivedirectionRecosignalD3 == 8)
11995  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
11996  if (kcountHEpositivedirectionRecosignalD3 == 9)
11997  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
11998  if (kcountHEpositivedirectionRecosignalD3 == 10)
11999  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
12000  if (kcountHEpositivedirectionRecosignalD3 == 11)
12001  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
12002  if (kcountHEpositivedirectionRecosignalD3 == 12)
12003  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
12004  if (kcountHEpositivedirectionRecosignalD3 == 13)
12005  HEpositivedirectionRecosignalD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
12006  HEpositivedirectionRecosignalD3->Draw("Error");
12007  kcountHEpositivedirectionRecosignalD3++;
12008  if (kcountHEpositivedirectionRecosignalD3 > 13)
12009  break; // 4x6 = 24
12010  } //ccctest>0
12011 
12012  } // for i
12013  } //if(jeta-41 >= 0)
12014  } //for jeta
12016  c3x5->Update();
12017  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png");
12018  c3x5->Clear();
12019  // clean-up
12020  if (h2CeffHEpositivedirectionRecosignalD3)
12021  delete h2CeffHEpositivedirectionRecosignalD3;
12022  //========================================================================================== 17
12023  //======================================================================
12024  //======================================================================1D plot: D vs phi , different eta, depth=4
12025  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
12026  c3x5->Clear();
12027  c3x5->Divide(3, 5);
12028  c3x5->cd(1);
12029  int kcountHEpositivedirectionRecosignalD4 = 1;
12030  TH1F* h2CeffHEpositivedirectionRecosignalD4 = new TH1F("h2CeffHEpositivedirectionRecosignalD4", "", nphi, 0., 72.);
12031 
12032  for (int jeta = 0; jeta < njeta; jeta++) {
12033  // positivedirectionRecosignalD:
12034  if (jeta - 41 >= 0) {
12035  // for (int i=0;i<ndepth;i++) {
12036  // depth=4
12037  for (int i = 3; i < 4; i++) {
12038  TH1F* HEpositivedirectionRecosignalD4 = (TH1F*)h2CeffHEpositivedirectionRecosignalD4->Clone("twod1");
12039 
12040  float ccctest = 0; // to avoid empty massive elements
12041  for (int jphi = 0; jphi < nphi; jphi++) {
12042  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12043  if (arecosignalhe[i][jeta][jphi] > 0.) {
12044  HEpositivedirectionRecosignalD4->Fill(jphi, ccc1);
12045  ccctest = 1.; //HEpositivedirectionRecosignalD4->SetBinError(i,0.01);
12046  }
12047  } // for jphi
12048  if (ccctest > 0.) {
12049  //cout<<"1717 kcountHEpositivedirectionRecosignalD4 = "<<kcountHEpositivedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
12050  c3x5->cd(kcountHEpositivedirectionRecosignalD4);
12051  HEpositivedirectionRecosignalD4->SetMarkerStyle(20);
12052  HEpositivedirectionRecosignalD4->SetMarkerSize(0.4);
12053  HEpositivedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
12054  HEpositivedirectionRecosignalD4->SetXTitle("HEpositivedirectionRecosignalD4 \b");
12055  HEpositivedirectionRecosignalD4->SetMarkerColor(2);
12056  HEpositivedirectionRecosignalD4->SetLineColor(0);
12057  gPad->SetGridy();
12058  gPad->SetGridx();
12059  // gPad->SetLogy();
12060  if (kcountHEpositivedirectionRecosignalD4 == 1)
12061  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
12062  if (kcountHEpositivedirectionRecosignalD4 == 2)
12063  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
12064  if (kcountHEpositivedirectionRecosignalD4 == 3)
12065  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
12066  if (kcountHEpositivedirectionRecosignalD4 == 4)
12067  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
12068  if (kcountHEpositivedirectionRecosignalD4 == 5)
12069  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
12070  if (kcountHEpositivedirectionRecosignalD4 == 6)
12071  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
12072  if (kcountHEpositivedirectionRecosignalD4 == 7)
12073  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
12074  if (kcountHEpositivedirectionRecosignalD4 == 8)
12075  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
12076  if (kcountHEpositivedirectionRecosignalD4 == 9)
12077  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
12078  if (kcountHEpositivedirectionRecosignalD4 == 10)
12079  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
12080  if (kcountHEpositivedirectionRecosignalD4 == 11)
12081  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
12082  if (kcountHEpositivedirectionRecosignalD4 == 12)
12083  HEpositivedirectionRecosignalD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
12084  HEpositivedirectionRecosignalD4->Draw("Error");
12085  kcountHEpositivedirectionRecosignalD4++;
12086  if (kcountHEpositivedirectionRecosignalD4 > 12)
12087  break; // 4x6 = 24
12088  } //ccctest>0
12089 
12090  } // for i
12091  } //if(jeta-41 >= 0)
12092  } //for jeta
12094  c3x5->Update();
12095  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png");
12096  c3x5->Clear();
12097  // clean-up
12098  if (h2CeffHEpositivedirectionRecosignalD4)
12099  delete h2CeffHEpositivedirectionRecosignalD4;
12100  //========================================================================================== 18
12101  //======================================================================
12102  //======================================================================1D plot: D vs phi , different eta, depth=5
12103  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
12104  c3x5->Clear();
12105  c3x5->Divide(3, 5);
12106  c3x5->cd(1);
12107  int kcountHEpositivedirectionRecosignalD5 = 1;
12108  TH1F* h2CeffHEpositivedirectionRecosignalD5 = new TH1F("h2CeffHEpositivedirectionRecosignalD5", "", nphi, 0., 72.);
12109 
12110  for (int jeta = 0; jeta < njeta; jeta++) {
12111  // positivedirectionRecosignalD:
12112  if (jeta - 41 >= 0) {
12113  // for (int i=0;i<ndepth;i++) {
12114  // depth=5
12115  for (int i = 4; i < 5; i++) {
12116  TH1F* HEpositivedirectionRecosignalD5 = (TH1F*)h2CeffHEpositivedirectionRecosignalD5->Clone("twod1");
12117 
12118  float ccctest = 0; // to avoid empty massive elements
12119  for (int jphi = 0; jphi < nphi; jphi++) {
12120  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12121  if (arecosignalhe[i][jeta][jphi] > 0.) {
12122  HEpositivedirectionRecosignalD5->Fill(jphi, ccc1);
12123  ccctest = 1.; //HEpositivedirectionRecosignalD5->SetBinError(i,0.01);
12124  }
12125  } // for jphi
12126  if (ccctest > 0.) {
12127  //cout<<"1818 kcountHEpositivedirectionRecosignalD5 = "<<kcountHEpositivedirectionRecosignalD5 <<" jeta-41= "<< jeta-41 <<endl;
12128  c3x5->cd(kcountHEpositivedirectionRecosignalD5);
12129  HEpositivedirectionRecosignalD5->SetMarkerStyle(20);
12130  HEpositivedirectionRecosignalD5->SetMarkerSize(0.4);
12131  HEpositivedirectionRecosignalD5->GetYaxis()->SetLabelSize(0.04);
12132  HEpositivedirectionRecosignalD5->SetXTitle("HEpositivedirectionRecosignalD5 \b");
12133  HEpositivedirectionRecosignalD5->SetMarkerColor(2);
12134  HEpositivedirectionRecosignalD5->SetLineColor(0);
12135  gPad->SetGridy();
12136  gPad->SetGridx();
12137  // gPad->SetLogy();
12138  if (kcountHEpositivedirectionRecosignalD5 == 1)
12139  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
12140  if (kcountHEpositivedirectionRecosignalD5 == 2)
12141  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
12142  if (kcountHEpositivedirectionRecosignalD5 == 3)
12143  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
12144  if (kcountHEpositivedirectionRecosignalD5 == 4)
12145  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
12146  if (kcountHEpositivedirectionRecosignalD5 == 5)
12147  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
12148  if (kcountHEpositivedirectionRecosignalD5 == 6)
12149  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
12150  if (kcountHEpositivedirectionRecosignalD5 == 7)
12151  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
12152  if (kcountHEpositivedirectionRecosignalD5 == 8)
12153  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
12154  if (kcountHEpositivedirectionRecosignalD5 == 9)
12155  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
12156  if (kcountHEpositivedirectionRecosignalD5 == 10)
12157  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
12158  if (kcountHEpositivedirectionRecosignalD5 == 11)
12159  HEpositivedirectionRecosignalD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
12160  HEpositivedirectionRecosignalD5->Draw("Error");
12161  kcountHEpositivedirectionRecosignalD5++;
12162  if (kcountHEpositivedirectionRecosignalD5 > 11)
12163  break; // 4x6 = 24
12164  } //ccctest>0
12165 
12166  } // for i
12167  } //if(jeta-41 >= 0)
12168  } //for jeta
12170  c3x5->Update();
12171  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png");
12172  c3x5->Clear();
12173  // clean-up
12174  if (h2CeffHEpositivedirectionRecosignalD5)
12175  delete h2CeffHEpositivedirectionRecosignalD5;
12176  //========================================================================================== 19
12177  //======================================================================
12178  //======================================================================1D plot: D vs phi , different eta, depth=6
12179  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
12180  c3x5->Clear();
12181  c3x5->Divide(3, 5);
12182  c3x5->cd(1);
12183  int kcountHEpositivedirectionRecosignalD6 = 1;
12184  TH1F* h2CeffHEpositivedirectionRecosignalD6 = new TH1F("h2CeffHEpositivedirectionRecosignalD6", "", nphi, 0., 72.);
12185 
12186  for (int jeta = 0; jeta < njeta; jeta++) {
12187  // positivedirectionRecosignalD:
12188  if (jeta - 41 >= 0) {
12189  // for (int i=0;i<ndepth;i++) {
12190  // depth=6
12191  for (int i = 5; i < 6; i++) {
12192  TH1F* HEpositivedirectionRecosignalD6 = (TH1F*)h2CeffHEpositivedirectionRecosignalD6->Clone("twod1");
12193 
12194  float ccctest = 0; // to avoid empty massive elements
12195  for (int jphi = 0; jphi < nphi; jphi++) {
12196  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12197  if (arecosignalhe[i][jeta][jphi] > 0.) {
12198  HEpositivedirectionRecosignalD6->Fill(jphi, ccc1);
12199  ccctest = 1.; //HEpositivedirectionRecosignalD6->SetBinError(i,0.01);
12200  }
12201  } // for jphi
12202  if (ccctest > 0.) {
12203  //cout<<"1919 kcountHEpositivedirectionRecosignalD6 = "<<kcountHEpositivedirectionRecosignalD6 <<" jeta-41= "<< jeta-41 <<endl;
12204  c3x5->cd(kcountHEpositivedirectionRecosignalD6);
12205  HEpositivedirectionRecosignalD6->SetMarkerStyle(20);
12206  HEpositivedirectionRecosignalD6->SetMarkerSize(0.4);
12207  HEpositivedirectionRecosignalD6->GetYaxis()->SetLabelSize(0.04);
12208  HEpositivedirectionRecosignalD6->SetXTitle("HEpositivedirectionRecosignalD6 \b");
12209  HEpositivedirectionRecosignalD6->SetMarkerColor(2);
12210  HEpositivedirectionRecosignalD6->SetLineColor(0);
12211  gPad->SetGridy();
12212  gPad->SetGridx();
12213  // gPad->SetLogy();
12214  if (kcountHEpositivedirectionRecosignalD6 == 1)
12215  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
12216  if (kcountHEpositivedirectionRecosignalD6 == 2)
12217  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
12218  if (kcountHEpositivedirectionRecosignalD6 == 3)
12219  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
12220  if (kcountHEpositivedirectionRecosignalD6 == 4)
12221  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
12222  if (kcountHEpositivedirectionRecosignalD6 == 5)
12223  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
12224  if (kcountHEpositivedirectionRecosignalD6 == 6)
12225  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
12226  if (kcountHEpositivedirectionRecosignalD6 == 7)
12227  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
12228  if (kcountHEpositivedirectionRecosignalD6 == 8)
12229  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
12230  if (kcountHEpositivedirectionRecosignalD6 == 9)
12231  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
12232  if (kcountHEpositivedirectionRecosignalD6 == 10)
12233  HEpositivedirectionRecosignalD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
12234  HEpositivedirectionRecosignalD6->Draw("Error");
12235  kcountHEpositivedirectionRecosignalD6++;
12236  if (kcountHEpositivedirectionRecosignalD6 > 10)
12237  break; // 4x6 = 24
12238  } //ccctest>0
12239 
12240  } // for i
12241  } //if(jeta-41 >= 0)
12242  } //for jeta
12244  c3x5->Update();
12245  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png");
12246  c3x5->Clear();
12247  // clean-up
12248  if (h2CeffHEpositivedirectionRecosignalD6)
12249  delete h2CeffHEpositivedirectionRecosignalD6;
12250  //========================================================================================== 20
12251  //======================================================================
12252  //======================================================================1D plot: D vs phi , different eta, depth=7
12253  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
12254  c3x5->Clear();
12255  c3x5->Divide(3, 5);
12256  c3x5->cd(1);
12257  int kcountHEpositivedirectionRecosignalD7 = 1;
12258  TH1F* h2CeffHEpositivedirectionRecosignalD7 = new TH1F("h2CeffHEpositivedirectionRecosignalD7", "", nphi, 0., 72.);
12259 
12260  for (int jeta = 0; jeta < njeta; jeta++) {
12261  // positivedirectionRecosignalD:
12262  if (jeta - 41 >= 0) {
12263  // for (int i=0;i<ndepth;i++) {
12264  // depth=7
12265  for (int i = 6; i < 7; i++) {
12266  TH1F* HEpositivedirectionRecosignalD7 = (TH1F*)h2CeffHEpositivedirectionRecosignalD7->Clone("twod1");
12267 
12268  float ccctest = 0; // to avoid empty massive elements
12269  for (int jphi = 0; jphi < nphi; jphi++) {
12270  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12271  if (arecosignalhe[i][jeta][jphi] > 0.) {
12272  HEpositivedirectionRecosignalD7->Fill(jphi, ccc1);
12273  ccctest = 1.; //HEpositivedirectionRecosignalD7->SetBinError(i,0.01);
12274  }
12275  } // for jphi
12276  if (ccctest != 0.) {
12277  //cout<<"2020 kcountHEpositivedirectionRecosignalD7 = "<<kcountHEpositivedirectionRecosignalD7 <<" jeta-41= "<< jeta-41 <<endl;
12278  c3x5->cd(kcountHEpositivedirectionRecosignalD7);
12279  HEpositivedirectionRecosignalD7->SetMarkerStyle(20);
12280  HEpositivedirectionRecosignalD7->SetMarkerSize(0.4);
12281  HEpositivedirectionRecosignalD7->GetYaxis()->SetLabelSize(0.04);
12282  HEpositivedirectionRecosignalD7->SetXTitle("HEpositivedirectionRecosignalD7 \b");
12283  HEpositivedirectionRecosignalD7->SetMarkerColor(2);
12284  HEpositivedirectionRecosignalD7->SetLineColor(0);
12285  gPad->SetGridy();
12286  gPad->SetGridx();
12287  // gPad->SetLogy();
12288  if (kcountHEpositivedirectionRecosignalD7 == 1)
12289  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
12290  if (kcountHEpositivedirectionRecosignalD7 == 2)
12291  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
12292  if (kcountHEpositivedirectionRecosignalD7 == 3)
12293  HEpositivedirectionRecosignalD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
12294  HEpositivedirectionRecosignalD7->Draw("Error");
12295  kcountHEpositivedirectionRecosignalD7++;
12296  if (kcountHEpositivedirectionRecosignalD7 > 3)
12297  break; // 4x6 = 24
12298  } //ccctest>0
12299 
12300  } // for i
12301  } //if(jeta-41 >= 0)
12302  } //for jeta
12304  c3x5->Update();
12305  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png");
12306  c3x5->Clear();
12307  // clean-up
12308  if (h2CeffHEpositivedirectionRecosignalD7)
12309  delete h2CeffHEpositivedirectionRecosignalD7;
12310 
12311  //========================================================================================== 22222214
12312  //======================================================================
12313  //======================================================================1D plot: D vs phi , different eta, depth=1
12314  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
12315  c3x5->Clear();
12317  c3x5->Divide(3, 5);
12318  c3x5->cd(1);
12319  int kcountHEnegativedirectionRecosignalD1 = 1;
12320  TH1F* h2CeffHEnegativedirectionRecosignalD1 = new TH1F("h2CeffHEnegativedirectionRecosignalD1", "", nphi, 0., 72.);
12321 
12322  for (int jeta = 0; jeta < njeta; jeta++) {
12323  // negativedirectionRecosignalD:
12324  if (jeta - 41 < 0) {
12325  // for (int i=0;i<ndepth;i++) {
12326  // depth=1
12327  for (int i = 0; i < 1; i++) {
12328  TH1F* HEnegativedirectionRecosignalD1 = (TH1F*)h2CeffHEnegativedirectionRecosignalD1->Clone("twod1");
12329 
12330  float ccctest = 0; // to avoid empty massive elements
12331  for (int jphi = 0; jphi < nphi; jphi++) {
12332  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12333  if (arecosignalhe[i][jeta][jphi] > 0.) {
12334  HEnegativedirectionRecosignalD1->Fill(jphi, ccc1);
12335  ccctest = 1.; //HEnegativedirectionRecosignalD1->SetBinError(i,0.01);
12336  }
12337  } // for jphi
12338  if (ccctest > 0.) {
12339  //cout<<"1414 kcountHEnegativedirectionRecosignalD1 = "<<kcountHEnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
12340  c3x5->cd(kcountHEnegativedirectionRecosignalD1);
12341  HEnegativedirectionRecosignalD1->SetMarkerStyle(20);
12342  HEnegativedirectionRecosignalD1->SetMarkerSize(0.4);
12343  HEnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
12344  HEnegativedirectionRecosignalD1->SetXTitle("HEnegativedirectionRecosignalD1 \b");
12345  HEnegativedirectionRecosignalD1->SetMarkerColor(2);
12346  HEnegativedirectionRecosignalD1->SetLineColor(0);
12347  gPad->SetGridy();
12348  gPad->SetGridx();
12349  // gPad->SetLogy();
12350  if (kcountHEnegativedirectionRecosignalD1 == 1)
12351  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
12352  if (kcountHEnegativedirectionRecosignalD1 == 2)
12353  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
12354  if (kcountHEnegativedirectionRecosignalD1 == 3)
12355  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
12356  if (kcountHEnegativedirectionRecosignalD1 == 4)
12357  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
12358  if (kcountHEnegativedirectionRecosignalD1 == 5)
12359  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
12360  if (kcountHEnegativedirectionRecosignalD1 == 6)
12361  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
12362  if (kcountHEnegativedirectionRecosignalD1 == 7)
12363  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
12364  if (kcountHEnegativedirectionRecosignalD1 == 8)
12365  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
12366  if (kcountHEnegativedirectionRecosignalD1 == 9)
12367  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
12368  if (kcountHEnegativedirectionRecosignalD1 == 10)
12369  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
12370  if (kcountHEnegativedirectionRecosignalD1 == 11)
12371  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
12372  if (kcountHEnegativedirectionRecosignalD1 == 12)
12373  HEnegativedirectionRecosignalD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
12374  HEnegativedirectionRecosignalD1->Draw("Error");
12375  kcountHEnegativedirectionRecosignalD1++;
12376  if (kcountHEnegativedirectionRecosignalD1 > 12)
12377  break; // 4x6 = 24
12378  } //ccctest>0
12379 
12380  } // for i
12381  } //if(jeta-41 < 0)
12382  } //for jeta
12384  c3x5->Update();
12385  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
12386  c3x5->Clear();
12387  // clean-up
12388  if (h2CeffHEnegativedirectionRecosignalD1)
12389  delete h2CeffHEnegativedirectionRecosignalD1;
12390  //========================================================================================== 22222215
12391  //======================================================================
12392  //======================================================================1D plot: D vs phi , different eta, depth=2
12393  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
12394  c3x5->Clear();
12395  c3x5->Divide(3, 5);
12396  c3x5->cd(1);
12397  int kcountHEnegativedirectionRecosignalD2 = 1;
12398  TH1F* h2CeffHEnegativedirectionRecosignalD2 = new TH1F("h2CeffHEnegativedirectionRecosignalD2", "", nphi, 0., 72.);
12399 
12400  for (int jeta = 0; jeta < njeta; jeta++) {
12401  // negativedirectionRecosignalD:
12402  if (jeta - 41 < 0) {
12403  // for (int i=0;i<ndepth;i++) {
12404  // depth=2
12405  for (int i = 1; i < 2; i++) {
12406  TH1F* HEnegativedirectionRecosignalD2 = (TH1F*)h2CeffHEnegativedirectionRecosignalD2->Clone("twod1");
12407 
12408  float ccctest = 0; // to avoid empty massive elements
12409  for (int jphi = 0; jphi < nphi; jphi++) {
12410  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12411  if (arecosignalhe[i][jeta][jphi] > 0.) {
12412  HEnegativedirectionRecosignalD2->Fill(jphi, ccc1);
12413  ccctest = 1.; //HEnegativedirectionRecosignalD2->SetBinError(i,0.01);
12414  }
12415  } // for jphi
12416  if (ccctest > 0.) {
12417  //cout<<"1515 kcountHEnegativedirectionRecosignalD2 = "<<kcountHEnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
12418  c3x5->cd(kcountHEnegativedirectionRecosignalD2);
12419  HEnegativedirectionRecosignalD2->SetMarkerStyle(20);
12420  HEnegativedirectionRecosignalD2->SetMarkerSize(0.4);
12421  HEnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
12422  HEnegativedirectionRecosignalD2->SetXTitle("HEnegativedirectionRecosignalD2 \b");
12423  HEnegativedirectionRecosignalD2->SetMarkerColor(2);
12424  HEnegativedirectionRecosignalD2->SetLineColor(0);
12425  gPad->SetGridy();
12426  gPad->SetGridx();
12427  // gPad->SetLogy();
12428  if (kcountHEnegativedirectionRecosignalD2 == 1)
12429  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
12430  if (kcountHEnegativedirectionRecosignalD2 == 2)
12431  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
12432  if (kcountHEnegativedirectionRecosignalD2 == 3)
12433  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
12434  if (kcountHEnegativedirectionRecosignalD2 == 4)
12435  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
12436  if (kcountHEnegativedirectionRecosignalD2 == 5)
12437  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
12438  if (kcountHEnegativedirectionRecosignalD2 == 6)
12439  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
12440  if (kcountHEnegativedirectionRecosignalD2 == 7)
12441  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
12442  if (kcountHEnegativedirectionRecosignalD2 == 8)
12443  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
12444  if (kcountHEnegativedirectionRecosignalD2 == 9)
12445  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
12446  if (kcountHEnegativedirectionRecosignalD2 == 10)
12447  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
12448  if (kcountHEnegativedirectionRecosignalD2 == 11)
12449  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
12450  if (kcountHEnegativedirectionRecosignalD2 == 12)
12451  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
12452  if (kcountHEnegativedirectionRecosignalD2 == 13)
12453  HEnegativedirectionRecosignalD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
12454  HEnegativedirectionRecosignalD2->Draw("Error");
12455  kcountHEnegativedirectionRecosignalD2++;
12456  if (kcountHEnegativedirectionRecosignalD2 > 13)
12457  break; // 4x6 = 24
12458  } //ccctest>0
12459 
12460  } // for i
12461  } //if(jeta-41 < 0)
12462  } //for jeta
12464  c3x5->Update();
12465  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
12466  c3x5->Clear();
12467  // clean-up
12468  if (h2CeffHEnegativedirectionRecosignalD2)
12469  delete h2CeffHEnegativedirectionRecosignalD2;
12470  //========================================================================================== 22222216
12471  //======================================================================
12472  //======================================================================1D plot: D vs phi , different eta, depth=3
12473  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
12474  c3x5->Clear();
12475  c3x5->Divide(3, 5);
12476  c3x5->cd(1);
12477  int kcountHEnegativedirectionRecosignalD3 = 1;
12478  TH1F* h2CeffHEnegativedirectionRecosignalD3 = new TH1F("h2CeffHEnegativedirectionRecosignalD3", "", nphi, 0., 72.);
12479 
12480  for (int jeta = 0; jeta < njeta; jeta++) {
12481  // negativedirectionRecosignalD:
12482  if (jeta - 41 < 0) {
12483  // for (int i=0;i<ndepth;i++) {
12484  // depth=3
12485  for (int i = 2; i < 3; i++) {
12486  TH1F* HEnegativedirectionRecosignalD3 = (TH1F*)h2CeffHEnegativedirectionRecosignalD3->Clone("twod1");
12487 
12488  float ccctest = 0; // to avoid empty massive elements
12489  for (int jphi = 0; jphi < nphi; jphi++) {
12490  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12491  if (arecosignalhe[i][jeta][jphi] > 0.) {
12492  HEnegativedirectionRecosignalD3->Fill(jphi, ccc1);
12493  ccctest = 1.; //HEnegativedirectionRecosignalD3->SetBinError(i,0.01);
12494  }
12495  } // for jphi
12496  if (ccctest > 0.) {
12497  //cout<<"1616 kcountHEnegativedirectionRecosignalD3 = "<<kcountHEnegativedirectionRecosignalD3 <<" jeta-41= "<< jeta-41 <<endl;
12498  c3x5->cd(kcountHEnegativedirectionRecosignalD3);
12499  HEnegativedirectionRecosignalD3->SetMarkerStyle(20);
12500  HEnegativedirectionRecosignalD3->SetMarkerSize(0.4);
12501  HEnegativedirectionRecosignalD3->GetYaxis()->SetLabelSize(0.04);
12502  HEnegativedirectionRecosignalD3->SetXTitle("HEnegativedirectionRecosignalD3 \b");
12503  HEnegativedirectionRecosignalD3->SetMarkerColor(2);
12504  HEnegativedirectionRecosignalD3->SetLineColor(0);
12505  gPad->SetGridy();
12506  gPad->SetGridx();
12507  // gPad->SetLogy();
12508  if (kcountHEnegativedirectionRecosignalD3 == 1)
12509  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
12510  if (kcountHEnegativedirectionRecosignalD3 == 2)
12511  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
12512  if (kcountHEnegativedirectionRecosignalD3 == 3)
12513  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
12514  if (kcountHEnegativedirectionRecosignalD3 == 4)
12515  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
12516  if (kcountHEnegativedirectionRecosignalD3 == 5)
12517  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
12518  if (kcountHEnegativedirectionRecosignalD3 == 6)
12519  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
12520  if (kcountHEnegativedirectionRecosignalD3 == 7)
12521  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
12522  if (kcountHEnegativedirectionRecosignalD3 == 8)
12523  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
12524  if (kcountHEnegativedirectionRecosignalD3 == 9)
12525  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
12526  if (kcountHEnegativedirectionRecosignalD3 == 10)
12527  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
12528  if (kcountHEnegativedirectionRecosignalD3 == 11)
12529  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
12530  if (kcountHEnegativedirectionRecosignalD3 == 12)
12531  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
12532  if (kcountHEnegativedirectionRecosignalD3 == 13)
12533  HEnegativedirectionRecosignalD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
12534  HEnegativedirectionRecosignalD3->Draw("Error");
12535  kcountHEnegativedirectionRecosignalD3++;
12536  if (kcountHEnegativedirectionRecosignalD3 > 13)
12537  break; // 4x6 = 24
12538  } //ccctest>0
12539 
12540  } // for i
12541  } //if(jeta-41 < 0)
12542  } //for jeta
12544  c3x5->Update();
12545  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
12546  c3x5->Clear();
12547  // clean-up
12548  if (h2CeffHEnegativedirectionRecosignalD3)
12549  delete h2CeffHEnegativedirectionRecosignalD3;
12550  //========================================================================================== 22222217
12551  //======================================================================
12552  //======================================================================1D plot: D vs phi , different eta, depth=4
12553  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
12554  c3x5->Clear();
12555  c3x5->Divide(3, 5);
12556  c3x5->cd(1);
12557  int kcountHEnegativedirectionRecosignalD4 = 1;
12558  TH1F* h2CeffHEnegativedirectionRecosignalD4 = new TH1F("h2CeffHEnegativedirectionRecosignalD4", "", nphi, 0., 72.);
12559 
12560  for (int jeta = 0; jeta < njeta; jeta++) {
12561  // negativedirectionRecosignalD:
12562  if (jeta - 41 < 0) {
12563  // for (int i=0;i<ndepth;i++) {
12564  // depth=4
12565  for (int i = 3; i < 4; i++) {
12566  TH1F* HEnegativedirectionRecosignalD4 = (TH1F*)h2CeffHEnegativedirectionRecosignalD4->Clone("twod1");
12567 
12568  float ccctest = 0; // to avoid empty massive elements
12569  for (int jphi = 0; jphi < nphi; jphi++) {
12570  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12571  if (arecosignalhe[i][jeta][jphi] > 0.) {
12572  HEnegativedirectionRecosignalD4->Fill(jphi, ccc1);
12573  ccctest = 1.; //HEnegativedirectionRecosignalD4->SetBinError(i,0.01);
12574  }
12575  } // for jphi
12576  if (ccctest > 0.) {
12577  //cout<<"1717 kcountHEnegativedirectionRecosignalD4 = "<<kcountHEnegativedirectionRecosignalD4 <<" jeta-41= "<< jeta-41 <<endl;
12578  c3x5->cd(kcountHEnegativedirectionRecosignalD4);
12579  HEnegativedirectionRecosignalD4->SetMarkerStyle(20);
12580  HEnegativedirectionRecosignalD4->SetMarkerSize(0.4);
12581  HEnegativedirectionRecosignalD4->GetYaxis()->SetLabelSize(0.04);
12582  HEnegativedirectionRecosignalD4->SetXTitle("HEnegativedirectionRecosignalD4 \b");
12583  HEnegativedirectionRecosignalD4->SetMarkerColor(2);
12584  HEnegativedirectionRecosignalD4->SetLineColor(0);
12585  gPad->SetGridy();
12586  gPad->SetGridx();
12587  // gPad->SetLogy();
12588  if (kcountHEnegativedirectionRecosignalD4 == 1)
12589  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
12590  if (kcountHEnegativedirectionRecosignalD4 == 2)
12591  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
12592  if (kcountHEnegativedirectionRecosignalD4 == 3)
12593  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
12594  if (kcountHEnegativedirectionRecosignalD4 == 4)
12595  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
12596  if (kcountHEnegativedirectionRecosignalD4 == 5)
12597  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
12598  if (kcountHEnegativedirectionRecosignalD4 == 6)
12599  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
12600  if (kcountHEnegativedirectionRecosignalD4 == 7)
12601  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
12602  if (kcountHEnegativedirectionRecosignalD4 == 8)
12603  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
12604  if (kcountHEnegativedirectionRecosignalD4 == 9)
12605  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
12606  if (kcountHEnegativedirectionRecosignalD4 == 10)
12607  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
12608  if (kcountHEnegativedirectionRecosignalD4 == 11)
12609  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
12610  if (kcountHEnegativedirectionRecosignalD4 == 12)
12611  HEnegativedirectionRecosignalD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
12612  HEnegativedirectionRecosignalD4->Draw("Error");
12613  kcountHEnegativedirectionRecosignalD4++;
12614  if (kcountHEnegativedirectionRecosignalD4 > 12)
12615  break; // 4x6 = 24
12616  } //ccctest>0
12617 
12618  } // for i
12619  } //if(jeta-41 < 0)
12620  } //for jeta
12622  c3x5->Update();
12623  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
12624  c3x5->Clear();
12625  // clean-up
12626  if (h2CeffHEnegativedirectionRecosignalD4)
12627  delete h2CeffHEnegativedirectionRecosignalD4;
12628  //========================================================================================== 22222218
12629  //======================================================================
12630  //======================================================================1D plot: D vs phi , different eta, depth=5
12631  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
12632  c3x5->Clear();
12633  c3x5->Divide(3, 5);
12634  c3x5->cd(1);
12635  int kcountHEnegativedirectionRecosignalD5 = 1;
12636  TH1F* h2CeffHEnegativedirectionRecosignalD5 = new TH1F("h2CeffHEnegativedirectionRecosignalD5", "", nphi, 0., 72.);
12637 
12638  for (int jeta = 0; jeta < njeta; jeta++) {
12639  // negativedirectionRecosignalD:
12640  if (jeta - 41 < 0) {
12641  // for (int i=0;i<ndepth;i++) {
12642  // depth=5
12643  for (int i = 4; i < 5; i++) {
12644  TH1F* HEnegativedirectionRecosignalD5 = (TH1F*)h2CeffHEnegativedirectionRecosignalD5->Clone("twod1");
12645 
12646  float ccctest = 0; // to avoid empty massive elements
12647  for (int jphi = 0; jphi < nphi; jphi++) {
12648  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12649  if (arecosignalhe[i][jeta][jphi] > 0.) {
12650  HEnegativedirectionRecosignalD5->Fill(jphi, ccc1);
12651  ccctest = 1.; //HEnegativedirectionRecosignalD5->SetBinError(i,0.01);
12652  }
12653  } // for jphi
12654  if (ccctest > 0.) {
12655  //cout<<"1818 kcountHEnegativedirectionRecosignalD5 = "<<kcountHEnegativedirectionRecosignalD5 <<" jeta-41= "<< jeta-41 <<endl;
12656  c3x5->cd(kcountHEnegativedirectionRecosignalD5);
12657  HEnegativedirectionRecosignalD5->SetMarkerStyle(20);
12658  HEnegativedirectionRecosignalD5->SetMarkerSize(0.4);
12659  HEnegativedirectionRecosignalD5->GetYaxis()->SetLabelSize(0.04);
12660  HEnegativedirectionRecosignalD5->SetXTitle("HEnegativedirectionRecosignalD5 \b");
12661  HEnegativedirectionRecosignalD5->SetMarkerColor(2);
12662  HEnegativedirectionRecosignalD5->SetLineColor(0);
12663  gPad->SetGridy();
12664  gPad->SetGridx();
12665  // gPad->SetLogy();
12666  if (kcountHEnegativedirectionRecosignalD5 == 1)
12667  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
12668  if (kcountHEnegativedirectionRecosignalD5 == 2)
12669  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
12670  if (kcountHEnegativedirectionRecosignalD5 == 3)
12671  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
12672  if (kcountHEnegativedirectionRecosignalD5 == 4)
12673  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
12674  if (kcountHEnegativedirectionRecosignalD5 == 5)
12675  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
12676  if (kcountHEnegativedirectionRecosignalD5 == 6)
12677  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
12678  if (kcountHEnegativedirectionRecosignalD5 == 7)
12679  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
12680  if (kcountHEnegativedirectionRecosignalD5 == 8)
12681  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
12682  if (kcountHEnegativedirectionRecosignalD5 == 9)
12683  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
12684  if (kcountHEnegativedirectionRecosignalD5 == 10)
12685  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
12686  if (kcountHEnegativedirectionRecosignalD5 == 11)
12687  HEnegativedirectionRecosignalD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
12688  HEnegativedirectionRecosignalD5->Draw("Error");
12689  kcountHEnegativedirectionRecosignalD5++;
12690  if (kcountHEnegativedirectionRecosignalD5 > 11)
12691  break; // 4x6 = 24
12692  } //ccctest>0
12693 
12694  } // for i
12695  } //if(jeta-41 < 0)
12696  } //for jeta
12698  c3x5->Update();
12699  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
12700  c3x5->Clear();
12701  // clean-up
12702  if (h2CeffHEnegativedirectionRecosignalD5)
12703  delete h2CeffHEnegativedirectionRecosignalD5;
12704  //========================================================================================== 22222219
12705  //======================================================================
12706  //======================================================================1D plot: D vs phi , different eta, depth=6
12707  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
12708  c3x5->Clear();
12709  c3x5->Divide(3, 5);
12710  c3x5->cd(1);
12711  int kcountHEnegativedirectionRecosignalD6 = 1;
12712  TH1F* h2CeffHEnegativedirectionRecosignalD6 = new TH1F("h2CeffHEnegativedirectionRecosignalD6", "", nphi, 0., 72.);
12713 
12714  for (int jeta = 0; jeta < njeta; jeta++) {
12715  // negativedirectionRecosignalD:
12716  if (jeta - 41 < 0) {
12717  // for (int i=0;i<ndepth;i++) {
12718  // depth=6
12719  for (int i = 5; i < 6; i++) {
12720  TH1F* HEnegativedirectionRecosignalD6 = (TH1F*)h2CeffHEnegativedirectionRecosignalD6->Clone("twod1");
12721 
12722  float ccctest = 0; // to avoid empty massive elements
12723  for (int jphi = 0; jphi < nphi; jphi++) {
12724  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12725  if (arecosignalhe[i][jeta][jphi] > 0.) {
12726  HEnegativedirectionRecosignalD6->Fill(jphi, ccc1);
12727  ccctest = 1.; //HEnegativedirectionRecosignalD6->SetBinError(i,0.01);
12728  }
12729  } // for jphi
12730  if (ccctest > 0.) {
12731  //cout<<"1919 kcountHEnegativedirectionRecosignalD6 = "<<kcountHEnegativedirectionRecosignalD6 <<" jeta-41= "<< jeta-41 <<endl;
12732  c3x5->cd(kcountHEnegativedirectionRecosignalD6);
12733  HEnegativedirectionRecosignalD6->SetMarkerStyle(20);
12734  HEnegativedirectionRecosignalD6->SetMarkerSize(0.4);
12735  HEnegativedirectionRecosignalD6->GetYaxis()->SetLabelSize(0.04);
12736  HEnegativedirectionRecosignalD6->SetXTitle("HEnegativedirectionRecosignalD6 \b");
12737  HEnegativedirectionRecosignalD6->SetMarkerColor(2);
12738  HEnegativedirectionRecosignalD6->SetLineColor(0);
12739  gPad->SetGridy();
12740  gPad->SetGridx();
12741  // gPad->SetLogy();
12742  if (kcountHEnegativedirectionRecosignalD6 == 1)
12743  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
12744  if (kcountHEnegativedirectionRecosignalD6 == 2)
12745  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
12746  if (kcountHEnegativedirectionRecosignalD6 == 3)
12747  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
12748  if (kcountHEnegativedirectionRecosignalD6 == 4)
12749  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
12750  if (kcountHEnegativedirectionRecosignalD6 == 5)
12751  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
12752  if (kcountHEnegativedirectionRecosignalD6 == 6)
12753  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
12754  if (kcountHEnegativedirectionRecosignalD6 == 7)
12755  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
12756  if (kcountHEnegativedirectionRecosignalD6 == 8)
12757  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
12758  if (kcountHEnegativedirectionRecosignalD6 == 9)
12759  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
12760  if (kcountHEnegativedirectionRecosignalD6 == 10)
12761  HEnegativedirectionRecosignalD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
12762  HEnegativedirectionRecosignalD6->Draw("Error");
12763  kcountHEnegativedirectionRecosignalD6++;
12764  if (kcountHEnegativedirectionRecosignalD6 > 10)
12765  break; // 4x6 = 24
12766  } //ccctest>0
12767 
12768  } // for i
12769  } //if(jeta-41 < 0)
12770  } //for jeta
12772  c3x5->Update();
12773  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
12774  c3x5->Clear();
12775  // clean-up
12776  if (h2CeffHEnegativedirectionRecosignalD6)
12777  delete h2CeffHEnegativedirectionRecosignalD6;
12778  //========================================================================================== 22222220
12779  //======================================================================
12780  //======================================================================1D plot: D vs phi , different eta, depth=7
12781  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
12782  c3x5->Clear();
12783  c3x5->Divide(3, 5);
12784  c3x5->cd(1);
12785  int kcountHEnegativedirectionRecosignalD7 = 1;
12786  TH1F* h2CeffHEnegativedirectionRecosignalD7 = new TH1F("h2CeffHEnegativedirectionRecosignalD7", "", nphi, 0., 72.);
12787 
12788  for (int jeta = 0; jeta < njeta; jeta++) {
12789  // negativedirectionRecosignalD:
12790  if (jeta - 41 < 0) {
12791  // for (int i=0;i<ndepth;i++) {
12792  // depth=7
12793  for (int i = 6; i < 7; i++) {
12794  TH1F* HEnegativedirectionRecosignalD7 = (TH1F*)h2CeffHEnegativedirectionRecosignalD7->Clone("twod1");
12795 
12796  float ccctest = 0; // to avoid empty massive elements
12797  for (int jphi = 0; jphi < nphi; jphi++) {
12798  double ccc1 = recosignalvariancehe[i][jeta][jphi];
12799  if (arecosignalhe[i][jeta][jphi] > 0.) {
12800  HEnegativedirectionRecosignalD7->Fill(jphi, ccc1);
12801  ccctest = 1.; //HEnegativedirectionRecosignalD7->SetBinError(i,0.01);
12802  }
12803  } // for jphi
12804  if (ccctest != 0.) {
12805  //cout<<"2020 kcountHEnegativedirectionRecosignalD7 = "<<kcountHEnegativedirectionRecosignalD7 <<" jeta-41= "<< jeta-41 <<endl;
12806  c3x5->cd(kcountHEnegativedirectionRecosignalD7);
12807  HEnegativedirectionRecosignalD7->SetMarkerStyle(20);
12808  HEnegativedirectionRecosignalD7->SetMarkerSize(0.4);
12809  HEnegativedirectionRecosignalD7->GetYaxis()->SetLabelSize(0.04);
12810  HEnegativedirectionRecosignalD7->SetXTitle("HEnegativedirectionRecosignalD7 \b");
12811  HEnegativedirectionRecosignalD7->SetMarkerColor(2);
12812  HEnegativedirectionRecosignalD7->SetLineColor(0);
12813  gPad->SetGridy();
12814  gPad->SetGridx();
12815  // gPad->SetLogy();
12816  if (kcountHEnegativedirectionRecosignalD7 == 1)
12817  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
12818  if (kcountHEnegativedirectionRecosignalD7 == 2)
12819  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
12820  if (kcountHEnegativedirectionRecosignalD7 == 3)
12821  HEnegativedirectionRecosignalD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
12822  HEnegativedirectionRecosignalD7->Draw("Error");
12823  kcountHEnegativedirectionRecosignalD7++;
12824  if (kcountHEnegativedirectionRecosignalD7 > 3)
12825  break; // 4x6 = 24
12826  } //ccctest>0
12827 
12828  } // for i
12829  } //if(jeta-41 < 0)
12830  } //for jeta
12832  c3x5->Update();
12833  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
12834  c3x5->Clear();
12835  // clean-up
12836  if (h2CeffHEnegativedirectionRecosignalD7)
12837  delete h2CeffHEnegativedirectionRecosignalD7;
12838  //===================================================================== END of Recosignal HE for phi-symmetry
12839  //===================================================================== END of Recosignal HE for phi-symmetry
12840  //===================================================================== END of Recosignal HE for phi-symmetry
12844  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
12845  //ndepth = k_max[5];
12846  ndepth = 2;
12847  double arecosignalHF[ndepth][njeta][njphi];
12848  double recosignalvarianceHF[ndepth][njeta][njphi];
12849  //cout<<"111RRRRRRRRRRRRRRRRRRRRRRRRR Recosignal HF" <<endl;
12850  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Recosignal HF
12851  TH2F* recSignalEnergy1HF1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HF1");
12852  TH2F* recSignalEnergy0HF1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HF1");
12853  TH2F* recSignalEnergyHF1 = (TH2F*)recSignalEnergy1HF1->Clone("recSignalEnergyHF1");
12854  recSignalEnergyHF1->Divide(recSignalEnergy1HF1, recSignalEnergy0HF1, 1, 1, "B");
12855  TH2F* recSignalEnergy1HF2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy1_HF2");
12856  TH2F* recSignalEnergy0HF2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HF2");
12857  TH2F* recSignalEnergyHF2 = (TH2F*)recSignalEnergy1HF2->Clone("recSignalEnergyHF2");
12858  recSignalEnergyHF2->Divide(recSignalEnergy1HF2, recSignalEnergy0HF2, 1, 1, "B");
12859  // cout<<"222RRRRRRRRRRRRRRRRRRRRRRRRR Recosignal HF" <<endl;
12860  //====================================================================== PHI normalization & put R into massive arecosignalHF
12861  for (int jeta = 0; jeta < njeta; jeta++) {
12862  //preparation for PHI normalization:
12863  double sumrecosignalHF0 = 0;
12864  int nsumrecosignalHF0 = 0;
12865  double sumrecosignalHF1 = 0;
12866  int nsumrecosignalHF1 = 0;
12867  for (int jphi = 0; jphi < njphi; jphi++) {
12868  arecosignalHF[0][jeta][jphi] = recSignalEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
12869  arecosignalHF[1][jeta][jphi] = recSignalEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
12870  if (arecosignalHF[0][jeta][jphi] > 0.) {
12871  sumrecosignalHF0 += arecosignalHF[0][jeta][jphi];
12872  ++nsumrecosignalHF0;
12873  }
12874  if (arecosignalHF[1][jeta][jphi] > 0.) {
12875  sumrecosignalHF1 += arecosignalHF[1][jeta][jphi];
12876  ++nsumrecosignalHF1;
12877  }
12878  } // phi
12879  // PHI normalization:
12880  for (int jphi = 0; jphi < njphi; jphi++) {
12881  if (arecosignalHF[0][jeta][jphi] > 0.)
12882  arecosignalHF[0][jeta][jphi] /= (sumrecosignalHF0 / nsumrecosignalHF0);
12883  if (arecosignalHF[1][jeta][jphi] > 0.)
12884  arecosignalHF[1][jeta][jphi] /= (sumrecosignalHF1 / nsumrecosignalHF1);
12885  } // phi
12886  } //eta
12887  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
12888  //======================================================================
12889  //======================================================================
12890  // cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
12891  c2x1->Clear();
12893  c2x1->Divide(2, 1);
12894  c2x1->cd(1);
12895  TH2F* GefzRrecosignalHF42D = new TH2F("GefzRrecosignalHF42D", "", neta, -41., 41., nphi, 0., 72.);
12896  TH2F* GefzRrecosignalHF42D0 = new TH2F("GefzRrecosignalHF42D0", "", neta, -41., 41., nphi, 0., 72.);
12897  TH2F* GefzRrecosignalHF42DF = (TH2F*)GefzRrecosignalHF42D0->Clone("GefzRrecosignalHF42DF");
12898  for (int i = 0; i < ndepth; i++) {
12899  for (int jeta = 0; jeta < neta; jeta++) {
12900  for (int jphi = 0; jphi < nphi; jphi++) {
12901  double ccc1 = arecosignalHF[i][jeta][jphi];
12902  int k2plot = jeta - 41;
12903  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
12904  if (ccc1 != 0.) {
12905  GefzRrecosignalHF42D->Fill(kkk, jphi, ccc1);
12906  GefzRrecosignalHF42D0->Fill(kkk, jphi, 1.);
12907  }
12908  }
12909  }
12910  }
12911  GefzRrecosignalHF42DF->Divide(GefzRrecosignalHF42D, GefzRrecosignalHF42D0, 1, 1, "B"); // average A
12912  gPad->SetGridy();
12913  gPad->SetGridx(); // gPad->SetLogz();
12914  GefzRrecosignalHF42DF->SetXTitle("<R>_depth #eta \b");
12915  GefzRrecosignalHF42DF->SetYTitle(" #phi \b");
12916  GefzRrecosignalHF42DF->Draw("COLZ");
12917 
12918  c2x1->cd(2);
12919  TH1F* energyhitSignal_HF = (TH1F*)dir->FindObjectAny("h_energyhitSignal_HF");
12920  energyhitSignal_HF->SetMarkerStyle(20);
12921  energyhitSignal_HF->SetMarkerSize(0.4);
12922  energyhitSignal_HF->GetYaxis()->SetLabelSize(0.04);
12923  energyhitSignal_HF->SetXTitle("energyhitSignal_HF \b");
12924  energyhitSignal_HF->SetMarkerColor(2);
12925  energyhitSignal_HF->SetLineColor(0);
12926  gPad->SetGridy();
12927  gPad->SetGridx();
12928  energyhitSignal_HF->Draw("Error");
12929 
12931  c2x1->Update();
12932  c2x1->Print("RrecosignalGeneralD2PhiSymmetryHF.png");
12933  c2x1->Clear();
12934  // clean-up
12935  if (GefzRrecosignalHF42D)
12936  delete GefzRrecosignalHF42D;
12937  if (GefzRrecosignalHF42D0)
12938  delete GefzRrecosignalHF42D0;
12939  if (GefzRrecosignalHF42DF)
12940  delete GefzRrecosignalHF42DF;
12941  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
12942  //======================================================================
12943  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
12944  c1x1->Clear();
12946  c1x1->Divide(1, 1);
12947  c1x1->cd(1);
12948  TH1F* GefzRrecosignalHF41D = new TH1F("GefzRrecosignalHF41D", "", nphi, 0., 72.);
12949  TH1F* GefzRrecosignalHF41D0 = new TH1F("GefzRrecosignalHF41D0", "", nphi, 0., 72.);
12950  TH1F* GefzRrecosignalHF41DF = (TH1F*)GefzRrecosignalHF41D0->Clone("GefzRrecosignalHF41DF");
12951  for (int jphi = 0; jphi < nphi; jphi++) {
12952  for (int jeta = 0; jeta < neta; jeta++) {
12953  for (int i = 0; i < ndepth; i++) {
12954  double ccc1 = arecosignalHF[i][jeta][jphi];
12955  if (ccc1 != 0.) {
12956  GefzRrecosignalHF41D->Fill(jphi, ccc1);
12957  GefzRrecosignalHF41D0->Fill(jphi, 1.);
12958  }
12959  }
12960  }
12961  }
12962  GefzRrecosignalHF41DF->Divide(
12963  GefzRrecosignalHF41D, GefzRrecosignalHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
12964  GefzRrecosignalHF41D0->Sumw2();
12965  // for (int jphi=1;jphi<73;jphi++) {GefzRrecosignalHF41DF->SetBinError(jphi,0.01);}
12966  gPad->SetGridy();
12967  gPad->SetGridx(); // gPad->SetLogz();
12968  GefzRrecosignalHF41DF->SetMarkerStyle(20);
12969  GefzRrecosignalHF41DF->SetMarkerSize(1.4);
12970  GefzRrecosignalHF41DF->GetZaxis()->SetLabelSize(0.08);
12971  GefzRrecosignalHF41DF->SetXTitle("#phi \b");
12972  GefzRrecosignalHF41DF->SetYTitle(" <R> \b");
12973  GefzRrecosignalHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
12974  GefzRrecosignalHF41DF->SetMarkerColor(4);
12975  GefzRrecosignalHF41DF->SetLineColor(
12976  4); // GefzRrecosignalHF41DF->SetMinimum(0.8); // GefzRrecosignalHF41DF->SetMaximum(1.000);
12977  GefzRrecosignalHF41DF->Draw("Error");
12979  c1x1->Update();
12980  c1x1->Print("RrecosignalGeneralD1PhiSymmetryHF.png");
12981  c1x1->Clear();
12982  // clean-up
12983  if (GefzRrecosignalHF41D)
12984  delete GefzRrecosignalHF41D;
12985  if (GefzRrecosignalHF41D0)
12986  delete GefzRrecosignalHF41D0;
12987  if (GefzRrecosignalHF41DF)
12988  delete GefzRrecosignalHF41DF;
12989  //========================================================================================== 4
12990  //======================================================================
12991  //======================================================================1D plot: R vs phi , different eta, depth=1
12992  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
12993  c3x5->Clear();
12995  c3x5->Divide(3, 5);
12996  c3x5->cd(1);
12997  int kcountHFpositivedirectionRecosignal1 = 1;
12998  TH1F* h2CeffHFpositivedirectionRecosignal1 = new TH1F("h2CeffHFpositivedirectionRecosignal1", "", nphi, 0., 72.);
12999  for (int jeta = 0; jeta < njeta; jeta++) {
13000  // positivedirectionRecosignal:
13001  if (jeta - 41 >= 0) {
13002  // for (int i=0;i<ndepth;i++) {
13003  // depth=1
13004  for (int i = 0; i < 1; i++) {
13005  TH1F* HFpositivedirectionRecosignal1 = (TH1F*)h2CeffHFpositivedirectionRecosignal1->Clone("twod1");
13006  float ccctest = 0; // to avoid empty massive elements
13007  for (int jphi = 0; jphi < nphi; jphi++) {
13008  double ccc1 = arecosignalHF[i][jeta][jphi];
13009  if (ccc1 != 0.) {
13010  HFpositivedirectionRecosignal1->Fill(jphi, ccc1);
13011  ccctest = 1.; //HFpositivedirectionRecosignal1->SetBinError(i,0.01);
13012  }
13013  } // for jphi
13014  if (ccctest > 0.) {
13015  // cout<<"444 kcountHFpositivedirectionRecosignal1 = "<<kcountHFpositivedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
13016  c3x5->cd(kcountHFpositivedirectionRecosignal1);
13017  HFpositivedirectionRecosignal1->SetMarkerStyle(20);
13018  HFpositivedirectionRecosignal1->SetMarkerSize(0.4);
13019  HFpositivedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
13020  HFpositivedirectionRecosignal1->SetXTitle("HFpositivedirectionRecosignal1 \b");
13021  HFpositivedirectionRecosignal1->SetMarkerColor(2);
13022  HFpositivedirectionRecosignal1->SetLineColor(0);
13023  gPad->SetGridy();
13024  gPad->SetGridx();
13025  // gPad->SetLogy();
13026  if (kcountHFpositivedirectionRecosignal1 == 1)
13027  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
13028  if (kcountHFpositivedirectionRecosignal1 == 2)
13029  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
13030  if (kcountHFpositivedirectionRecosignal1 == 3)
13031  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
13032  if (kcountHFpositivedirectionRecosignal1 == 4)
13033  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
13034  if (kcountHFpositivedirectionRecosignal1 == 5)
13035  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
13036  if (kcountHFpositivedirectionRecosignal1 == 6)
13037  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
13038  if (kcountHFpositivedirectionRecosignal1 == 7)
13039  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
13040  if (kcountHFpositivedirectionRecosignal1 == 8)
13041  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
13042  if (kcountHFpositivedirectionRecosignal1 == 9)
13043  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
13044  if (kcountHFpositivedirectionRecosignal1 == 10)
13045  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
13046  if (kcountHFpositivedirectionRecosignal1 == 11)
13047  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
13048  if (kcountHFpositivedirectionRecosignal1 == 12)
13049  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
13050  if (kcountHFpositivedirectionRecosignal1 == 13)
13051  HFpositivedirectionRecosignal1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
13052  HFpositivedirectionRecosignal1->Draw("Error");
13053  kcountHFpositivedirectionRecosignal1++;
13054  if (kcountHFpositivedirectionRecosignal1 > 13)
13055  break; //
13056  } //ccctest>0
13057 
13058  } // for i
13059  } //if(jeta-41 >= 0)
13060  } //for jeta
13062  c3x5->Update();
13063  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
13064  c3x5->Clear();
13065  // clean-up
13066  if (h2CeffHFpositivedirectionRecosignal1)
13067  delete h2CeffHFpositivedirectionRecosignal1;
13068 
13069  //========================================================================================== 5
13070  //======================================================================
13071  //======================================================================1D plot: R vs phi , different eta, depth=2
13072  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
13073  c3x5->Clear();
13075  c3x5->Divide(3, 5);
13076  c3x5->cd(1);
13077  int kcountHFpositivedirectionRecosignal2 = 1;
13078  TH1F* h2CeffHFpositivedirectionRecosignal2 = new TH1F("h2CeffHFpositivedirectionRecosignal2", "", nphi, 0., 72.);
13079  for (int jeta = 0; jeta < njeta; jeta++) {
13080  // positivedirectionRecosignal:
13081  if (jeta - 41 >= 0) {
13082  // for (int i=0;i<ndepth;i++) {
13083  // depth=2
13084  for (int i = 1; i < 2; i++) {
13085  TH1F* HFpositivedirectionRecosignal2 = (TH1F*)h2CeffHFpositivedirectionRecosignal2->Clone("twod1");
13086  float ccctest = 0; // to avoid empty massive elements
13087  for (int jphi = 0; jphi < nphi; jphi++) {
13088  double ccc1 = arecosignalHF[i][jeta][jphi];
13089  if (ccc1 != 0.) {
13090  HFpositivedirectionRecosignal2->Fill(jphi, ccc1);
13091  ccctest = 1.; //HFpositivedirectionRecosignal2->SetBinError(i,0.01);
13092  }
13093  } // for jphi
13094  if (ccctest > 0.) {
13095  //cout<<"555 kcountHFpositivedirectionRecosignal2 = "<<kcountHFpositivedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
13096  c3x5->cd(kcountHFpositivedirectionRecosignal2);
13097  HFpositivedirectionRecosignal2->SetMarkerStyle(20);
13098  HFpositivedirectionRecosignal2->SetMarkerSize(0.4);
13099  HFpositivedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
13100  HFpositivedirectionRecosignal2->SetXTitle("HFpositivedirectionRecosignal2 \b");
13101  HFpositivedirectionRecosignal2->SetMarkerColor(2);
13102  HFpositivedirectionRecosignal2->SetLineColor(0);
13103  gPad->SetGridy();
13104  gPad->SetGridx();
13105  // gPad->SetLogy();
13106  if (kcountHFpositivedirectionRecosignal2 == 1)
13107  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
13108  if (kcountHFpositivedirectionRecosignal2 == 2)
13109  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
13110  if (kcountHFpositivedirectionRecosignal2 == 3)
13111  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
13112  if (kcountHFpositivedirectionRecosignal2 == 4)
13113  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
13114  if (kcountHFpositivedirectionRecosignal2 == 5)
13115  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
13116  if (kcountHFpositivedirectionRecosignal2 == 6)
13117  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
13118  if (kcountHFpositivedirectionRecosignal2 == 7)
13119  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
13120  if (kcountHFpositivedirectionRecosignal2 == 8)
13121  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
13122  if (kcountHFpositivedirectionRecosignal2 == 9)
13123  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
13124  if (kcountHFpositivedirectionRecosignal2 == 10)
13125  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
13126  if (kcountHFpositivedirectionRecosignal2 == 11)
13127  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
13128  if (kcountHFpositivedirectionRecosignal2 == 12)
13129  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
13130  if (kcountHFpositivedirectionRecosignal2 == 13)
13131  HFpositivedirectionRecosignal2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
13132  HFpositivedirectionRecosignal2->Draw("Error");
13133  kcountHFpositivedirectionRecosignal2++;
13134  if (kcountHFpositivedirectionRecosignal2 > 13)
13135  break; // 4x6 = 24
13136  } //ccctest>0
13137 
13138  } // for i
13139  } //if(jeta-41 >= 0)
13140  } //for jeta
13142  c3x5->Update();
13143  c3x5->Print("RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
13144  c3x5->Clear();
13145  // clean-up
13146  if (h2CeffHFpositivedirectionRecosignal2)
13147  delete h2CeffHFpositivedirectionRecosignal2;
13148 
13149  //========================================================================================== 1111114
13150  //======================================================================
13151  //======================================================================1D plot: R vs phi , different eta, depth=1
13152  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
13153  c3x5->Clear();
13155  c3x5->Divide(3, 5);
13156  c3x5->cd(1);
13157  int kcountHFnegativedirectionRecosignal1 = 1;
13158  TH1F* h2CeffHFnegativedirectionRecosignal1 = new TH1F("h2CeffHFnegativedirectionRecosignal1", "", nphi, 0., 72.);
13159  for (int jeta = 0; jeta < njeta; jeta++) {
13160  // negativedirectionRecosignal:
13161  if (jeta - 41 < 0) {
13162  // for (int i=0;i<ndepth;i++) {
13163  // depth=1
13164  for (int i = 0; i < 1; i++) {
13165  TH1F* HFnegativedirectionRecosignal1 = (TH1F*)h2CeffHFnegativedirectionRecosignal1->Clone("twod1");
13166  float ccctest = 0; // to avoid empty massive elements
13167  for (int jphi = 0; jphi < nphi; jphi++) {
13168  double ccc1 = arecosignalHF[i][jeta][jphi];
13169  if (ccc1 != 0.) {
13170  HFnegativedirectionRecosignal1->Fill(jphi, ccc1);
13171  ccctest = 1.; //HFnegativedirectionRecosignal1->SetBinError(i,0.01);
13172  }
13173  } // for jphi
13174  if (ccctest > 0.) {
13175  // cout<<"444 kcountHFnegativedirectionRecosignal1 = "<<kcountHFnegativedirectionRecosignal1 <<" jeta-41= "<< jeta-41 <<endl;
13176  c3x5->cd(kcountHFnegativedirectionRecosignal1);
13177  HFnegativedirectionRecosignal1->SetMarkerStyle(20);
13178  HFnegativedirectionRecosignal1->SetMarkerSize(0.4);
13179  HFnegativedirectionRecosignal1->GetYaxis()->SetLabelSize(0.04);
13180  HFnegativedirectionRecosignal1->SetXTitle("HFnegativedirectionRecosignal1 \b");
13181  HFnegativedirectionRecosignal1->SetMarkerColor(2);
13182  HFnegativedirectionRecosignal1->SetLineColor(0);
13183  gPad->SetGridy();
13184  gPad->SetGridx();
13185  // gPad->SetLogy();
13186  if (kcountHFnegativedirectionRecosignal1 == 1)
13187  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
13188  if (kcountHFnegativedirectionRecosignal1 == 2)
13189  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
13190  if (kcountHFnegativedirectionRecosignal1 == 3)
13191  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
13192  if (kcountHFnegativedirectionRecosignal1 == 4)
13193  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
13194  if (kcountHFnegativedirectionRecosignal1 == 5)
13195  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
13196  if (kcountHFnegativedirectionRecosignal1 == 6)
13197  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
13198  if (kcountHFnegativedirectionRecosignal1 == 7)
13199  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
13200  if (kcountHFnegativedirectionRecosignal1 == 8)
13201  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
13202  if (kcountHFnegativedirectionRecosignal1 == 9)
13203  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
13204  if (kcountHFnegativedirectionRecosignal1 == 10)
13205  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
13206  if (kcountHFnegativedirectionRecosignal1 == 11)
13207  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
13208  if (kcountHFnegativedirectionRecosignal1 == 12)
13209  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
13210  if (kcountHFnegativedirectionRecosignal1 == 13)
13211  HFnegativedirectionRecosignal1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
13212  HFnegativedirectionRecosignal1->Draw("Error");
13213  kcountHFnegativedirectionRecosignal1++;
13214  if (kcountHFnegativedirectionRecosignal1 > 13)
13215  break; //
13216  } //ccctest>0
13217 
13218  } // for i
13219  } //if(jeta-41< 0)
13220  } //for jeta
13222  c3x5->Update();
13223  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
13224  c3x5->Clear();
13225  // clean-up
13226  if (h2CeffHFnegativedirectionRecosignal1)
13227  delete h2CeffHFnegativedirectionRecosignal1;
13228 
13229  //========================================================================================== 1111115
13230  //======================================================================
13231  //======================================================================1D plot: R vs phi , different eta, depth=2
13232  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
13233  c3x5->Clear();
13235  c3x5->Divide(3, 5);
13236  c3x5->cd(1);
13237  int kcountHFnegativedirectionRecosignal2 = 1;
13238  TH1F* h2CeffHFnegativedirectionRecosignal2 = new TH1F("h2CeffHFnegativedirectionRecosignal2", "", nphi, 0., 72.);
13239  for (int jeta = 0; jeta < njeta; jeta++) {
13240  // negativedirectionRecosignal:
13241  if (jeta - 41 < 0) {
13242  // for (int i=0;i<ndepth;i++) {
13243  // depth=2
13244  for (int i = 1; i < 2; i++) {
13245  TH1F* HFnegativedirectionRecosignal2 = (TH1F*)h2CeffHFnegativedirectionRecosignal2->Clone("twod1");
13246  float ccctest = 0; // to avoid empty massive elements
13247  for (int jphi = 0; jphi < nphi; jphi++) {
13248  double ccc1 = arecosignalHF[i][jeta][jphi];
13249  if (ccc1 != 0.) {
13250  HFnegativedirectionRecosignal2->Fill(jphi, ccc1);
13251  ccctest = 1.; //HFnegativedirectionRecosignal2->SetBinError(i,0.01);
13252  }
13253  } // for jphi
13254  if (ccctest > 0.) {
13255  //cout<<"555 kcountHFnegativedirectionRecosignal2 = "<<kcountHFnegativedirectionRecosignal2 <<" jeta-41= "<< jeta-41 <<endl;
13256  c3x5->cd(kcountHFnegativedirectionRecosignal2);
13257  HFnegativedirectionRecosignal2->SetMarkerStyle(20);
13258  HFnegativedirectionRecosignal2->SetMarkerSize(0.4);
13259  HFnegativedirectionRecosignal2->GetYaxis()->SetLabelSize(0.04);
13260  HFnegativedirectionRecosignal2->SetXTitle("HFnegativedirectionRecosignal2 \b");
13261  HFnegativedirectionRecosignal2->SetMarkerColor(2);
13262  HFnegativedirectionRecosignal2->SetLineColor(0);
13263  gPad->SetGridy();
13264  gPad->SetGridx();
13265  // gPad->SetLogy();
13266  if (kcountHFnegativedirectionRecosignal2 == 1)
13267  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
13268  if (kcountHFnegativedirectionRecosignal2 == 2)
13269  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
13270  if (kcountHFnegativedirectionRecosignal2 == 3)
13271  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
13272  if (kcountHFnegativedirectionRecosignal2 == 4)
13273  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
13274  if (kcountHFnegativedirectionRecosignal2 == 5)
13275  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
13276  if (kcountHFnegativedirectionRecosignal2 == 6)
13277  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
13278  if (kcountHFnegativedirectionRecosignal2 == 7)
13279  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
13280  if (kcountHFnegativedirectionRecosignal2 == 8)
13281  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
13282  if (kcountHFnegativedirectionRecosignal2 == 9)
13283  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
13284  if (kcountHFnegativedirectionRecosignal2 == 10)
13285  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
13286  if (kcountHFnegativedirectionRecosignal2 == 11)
13287  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
13288  if (kcountHFnegativedirectionRecosignal2 == 12)
13289  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
13290  if (kcountHFnegativedirectionRecosignal2 == 13)
13291  HFnegativedirectionRecosignal2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
13292  HFnegativedirectionRecosignal2->Draw("Error");
13293  kcountHFnegativedirectionRecosignal2++;
13294  if (kcountHFnegativedirectionRecosignal2 > 13)
13295  break; // 4x6 = 24
13296  } //ccctest>0
13297 
13298  } // for i
13299  } //if(jeta-41< 0)
13300  } //for jeta
13302  c3x5->Update();
13303  c3x5->Print("RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
13304  c3x5->Clear();
13305  // clean-up
13306  if (h2CeffHFnegativedirectionRecosignal2)
13307  delete h2CeffHFnegativedirectionRecosignal2;
13308 
13309  //======================================================================================================================
13310  //======================================================================================================================
13311  //======================================================================================================================
13312  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
13313 
13314  //cout<<" Start Vaiance: preparation *****" <<endl;
13315  TH2F* recosignalVariance1HF1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HF1");
13316  TH2F* recosignalVariance0HF1 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HF1");
13317  TH2F* recosignalVarianceHF1 = (TH2F*)recosignalVariance1HF1->Clone("recosignalVarianceHF1");
13318  recosignalVarianceHF1->Divide(recosignalVariance1HF1, recosignalVariance0HF1, 1, 1, "B");
13319  TH2F* recosignalVariance1HF2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy2_HF2");
13320  TH2F* recosignalVariance0HF2 = (TH2F*)dir->FindObjectAny("h_recSignalEnergy0_HF2");
13321  TH2F* recosignalVarianceHF2 = (TH2F*)recosignalVariance1HF2->Clone("recosignalVarianceHF2");
13322  recosignalVarianceHF2->Divide(recosignalVariance1HF2, recosignalVariance0HF2, 1, 1, "B");
13323  //cout<<" Vaiance: preparation DONE *****" <<endl;
13324  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive recosignalvarianceHF
13325  // = sum(R*R)/N - (sum(R)/N)**2
13326  for (int jeta = 0; jeta < njeta; jeta++) {
13327  //preparation for PHI normalization:
13328  double sumrecosignalHF0 = 0;
13329  int nsumrecosignalHF0 = 0;
13330  double sumrecosignalHF1 = 0;
13331  int nsumrecosignalHF1 = 0;
13332  for (int jphi = 0; jphi < njphi; jphi++) {
13333  recosignalvarianceHF[0][jeta][jphi] = recosignalVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
13334  recosignalvarianceHF[1][jeta][jphi] = recosignalVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
13335  if (recosignalvarianceHF[0][jeta][jphi] > 0.) {
13336  sumrecosignalHF0 += recosignalvarianceHF[0][jeta][jphi];
13337  ++nsumrecosignalHF0;
13338  }
13339  if (recosignalvarianceHF[1][jeta][jphi] > 0.) {
13340  sumrecosignalHF1 += recosignalvarianceHF[1][jeta][jphi];
13341  ++nsumrecosignalHF1;
13342  }
13343  } // phi
13344  // PHI normalization :
13345  for (int jphi = 0; jphi < njphi; jphi++) {
13346  if (recosignalvarianceHF[0][jeta][jphi] > 0.)
13347  recosignalvarianceHF[0][jeta][jphi] /= (sumrecosignalHF0 / nsumrecosignalHF0);
13348  if (recosignalvarianceHF[1][jeta][jphi] > 0.)
13349  recosignalvarianceHF[1][jeta][jphi] /= (sumrecosignalHF1 / nsumrecosignalHF1);
13350  } // phi
13351  // recosignalvarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
13352  for (int jphi = 0; jphi < njphi; jphi++) {
13353  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
13354  recosignalvarianceHF[0][jeta][jphi] -= arecosignalHF[0][jeta][jphi] * arecosignalHF[0][jeta][jphi];
13355  recosignalvarianceHF[0][jeta][jphi] = fabs(recosignalvarianceHF[0][jeta][jphi]);
13356  recosignalvarianceHF[1][jeta][jphi] -= arecosignalHF[1][jeta][jphi] * arecosignalHF[1][jeta][jphi];
13357  recosignalvarianceHF[1][jeta][jphi] = fabs(recosignalvarianceHF[1][jeta][jphi]);
13358  }
13359  }
13360  //cout<<" Vaiance: DONE*****" <<endl;
13361  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
13362  //======================================================================
13363  //======================================================================
13364  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
13365  c1x1->Clear();
13367  c1x0->Divide(1, 1);
13368  c1x0->cd(1);
13369  TH2F* DefzDrecosignalHF42D = new TH2F("DefzDrecosignalHF42D", "", neta, -41., 41., nphi, 0., 72.);
13370  TH2F* DefzDrecosignalHF42D0 = new TH2F("DefzDrecosignalHF42D0", "", neta, -41., 41., nphi, 0., 72.);
13371  TH2F* DefzDrecosignalHF42DF = (TH2F*)DefzDrecosignalHF42D0->Clone("DefzDrecosignalHF42DF");
13372  for (int i = 0; i < ndepth; i++) {
13373  for (int jeta = 0; jeta < neta; jeta++) {
13374  for (int jphi = 0; jphi < nphi; jphi++) {
13375  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13376  int k2plot = jeta - 41;
13377  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
13378  if (arecosignalHF[i][jeta][jphi] > 0.) {
13379  DefzDrecosignalHF42D->Fill(kkk, jphi, ccc1);
13380  DefzDrecosignalHF42D0->Fill(kkk, jphi, 1.);
13381  }
13382  }
13383  }
13384  }
13385  DefzDrecosignalHF42DF->Divide(DefzDrecosignalHF42D, DefzDrecosignalHF42D0, 1, 1, "B"); // average A
13386  // DefzDrecosignalHF1->Sumw2();
13387  gPad->SetGridy();
13388  gPad->SetGridx(); // gPad->SetLogz();
13389  DefzDrecosignalHF42DF->SetMarkerStyle(20);
13390  DefzDrecosignalHF42DF->SetMarkerSize(0.4);
13391  DefzDrecosignalHF42DF->GetZaxis()->SetLabelSize(0.08);
13392  DefzDrecosignalHF42DF->SetXTitle("<D>_depth #eta \b");
13393  DefzDrecosignalHF42DF->SetYTitle(" #phi \b");
13394  DefzDrecosignalHF42DF->SetZTitle("<D>_depth \b");
13395  DefzDrecosignalHF42DF->SetMarkerColor(2);
13396  DefzDrecosignalHF42DF->SetLineColor(
13397  0); // DefzDrecosignalHF42DF->SetMaximum(1.000); // DefzDrecosignalHF42DF->SetMinimum(1.0);
13398  DefzDrecosignalHF42DF->Draw("COLZ");
13400  c1x0->Update();
13401  c1x0->Print("DrecosignalGeneralD2PhiSymmetryHF.png");
13402  c1x0->Clear();
13403  // clean-up
13404  if (DefzDrecosignalHF42D)
13405  delete DefzDrecosignalHF42D;
13406  if (DefzDrecosignalHF42D0)
13407  delete DefzDrecosignalHF42D0;
13408  if (DefzDrecosignalHF42DF)
13409  delete DefzDrecosignalHF42DF;
13410  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
13411  //======================================================================
13412  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
13413  c1x1->Clear();
13415  c1x1->Divide(1, 1);
13416  c1x1->cd(1);
13417  TH1F* DefzDrecosignalHF41D = new TH1F("DefzDrecosignalHF41D", "", nphi, 0., 72.);
13418  TH1F* DefzDrecosignalHF41D0 = new TH1F("DefzDrecosignalHF41D0", "", nphi, 0., 72.);
13419  TH1F* DefzDrecosignalHF41DF = (TH1F*)DefzDrecosignalHF41D0->Clone("DefzDrecosignalHF41DF");
13420 
13421  for (int jphi = 0; jphi < nphi; jphi++) {
13422  for (int jeta = 0; jeta < neta; jeta++) {
13423  for (int i = 0; i < ndepth; i++) {
13424  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13425  if (arecosignalHF[i][jeta][jphi] > 0.) {
13426  DefzDrecosignalHF41D->Fill(jphi, ccc1);
13427  DefzDrecosignalHF41D0->Fill(jphi, 1.);
13428  }
13429  }
13430  }
13431  }
13432  // DefzDrecosignalHF41D->Sumw2();DefzDrecosignalHF41D0->Sumw2();
13433 
13434  DefzDrecosignalHF41DF->Divide(
13435  DefzDrecosignalHF41D, DefzDrecosignalHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
13436  DefzDrecosignalHF41D0->Sumw2();
13437  // for (int jphi=1;jphi<73;jphi++) {DefzDrecosignalHF41DF->SetBinError(jphi,0.01);}
13438  gPad->SetGridy();
13439  gPad->SetGridx(); // gPad->SetLogz();
13440  DefzDrecosignalHF41DF->SetMarkerStyle(20);
13441  DefzDrecosignalHF41DF->SetMarkerSize(1.4);
13442  DefzDrecosignalHF41DF->GetZaxis()->SetLabelSize(0.08);
13443  DefzDrecosignalHF41DF->SetXTitle("#phi \b");
13444  DefzDrecosignalHF41DF->SetYTitle(" <D> \b");
13445  DefzDrecosignalHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
13446  DefzDrecosignalHF41DF->SetMarkerColor(4);
13447  DefzDrecosignalHF41DF->SetLineColor(
13448  4); // DefzDrecosignalHF41DF->SetMinimum(0.8); DefzDrecosignalHF41DF->SetMinimum(-0.015);
13449  DefzDrecosignalHF41DF->Draw("Error");
13451  c1x1->Update();
13452  c1x1->Print("DrecosignalGeneralD1PhiSymmetryHF.png");
13453  c1x1->Clear();
13454  // clean-up
13455  if (DefzDrecosignalHF41D)
13456  delete DefzDrecosignalHF41D;
13457  if (DefzDrecosignalHF41D0)
13458  delete DefzDrecosignalHF41D0;
13459  if (DefzDrecosignalHF41DF)
13460  delete DefzDrecosignalHF41DF;
13461  //========================================================================================== 14
13462  //======================================================================
13463  //======================================================================1D plot: D vs phi , different eta, depth=1
13464  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
13465  c3x5->Clear();
13467  c3x5->Divide(3, 5);
13468  c3x5->cd(1);
13469  int kcountHFpositivedirectionRecosignalD1 = 1;
13470  TH1F* h2CeffHFpositivedirectionRecosignalD1 = new TH1F("h2CeffHFpositivedirectionRecosignalD1", "", nphi, 0., 72.);
13471 
13472  for (int jeta = 0; jeta < njeta; jeta++) {
13473  // positivedirectionRecosignalD:
13474  if (jeta - 41 >= 0) {
13475  // for (int i=0;i<ndepth;i++) {
13476  // depth=1
13477  for (int i = 0; i < 1; i++) {
13478  TH1F* HFpositivedirectionRecosignalD1 = (TH1F*)h2CeffHFpositivedirectionRecosignalD1->Clone("twod1");
13479 
13480  float ccctest = 0; // to avoid empty massive elements
13481  for (int jphi = 0; jphi < nphi; jphi++) {
13482  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13483  if (arecosignalHF[i][jeta][jphi] > 0.) {
13484  HFpositivedirectionRecosignalD1->Fill(jphi, ccc1);
13485  ccctest = 1.; //HFpositivedirectionRecosignalD1->SetBinError(i,0.01);
13486  }
13487  } // for jphi
13488  if (ccctest > 0.) {
13489  //cout<<"1414 kcountHFpositivedirectionRecosignalD1 = "<<kcountHFpositivedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
13490  c3x5->cd(kcountHFpositivedirectionRecosignalD1);
13491  HFpositivedirectionRecosignalD1->SetMarkerStyle(20);
13492  HFpositivedirectionRecosignalD1->SetMarkerSize(0.4);
13493  HFpositivedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
13494  HFpositivedirectionRecosignalD1->SetXTitle("HFpositivedirectionRecosignalD1 \b");
13495  HFpositivedirectionRecosignalD1->SetMarkerColor(2);
13496  HFpositivedirectionRecosignalD1->SetLineColor(0);
13497  gPad->SetGridy();
13498  gPad->SetGridx();
13499  // gPad->SetLogy();
13500  if (kcountHFpositivedirectionRecosignalD1 == 1)
13501  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
13502  if (kcountHFpositivedirectionRecosignalD1 == 2)
13503  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
13504  if (kcountHFpositivedirectionRecosignalD1 == 3)
13505  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
13506  if (kcountHFpositivedirectionRecosignalD1 == 4)
13507  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
13508  if (kcountHFpositivedirectionRecosignalD1 == 5)
13509  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
13510  if (kcountHFpositivedirectionRecosignalD1 == 6)
13511  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
13512  if (kcountHFpositivedirectionRecosignalD1 == 7)
13513  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
13514  if (kcountHFpositivedirectionRecosignalD1 == 8)
13515  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
13516  if (kcountHFpositivedirectionRecosignalD1 == 9)
13517  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
13518  if (kcountHFpositivedirectionRecosignalD1 == 10)
13519  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
13520  if (kcountHFpositivedirectionRecosignalD1 == 11)
13521  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
13522  if (kcountHFpositivedirectionRecosignalD1 == 12)
13523  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
13524  if (kcountHFpositivedirectionRecosignalD1 == 13)
13525  HFpositivedirectionRecosignalD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
13526  HFpositivedirectionRecosignalD1->Draw("Error");
13527  kcountHFpositivedirectionRecosignalD1++;
13528  if (kcountHFpositivedirectionRecosignalD1 > 13)
13529  break; // 4x6 = 24
13530  } //ccctest>0
13531 
13532  } // for i
13533  } //if(jeta-41 >= 0)
13534  } //for jeta
13536  c3x5->Update();
13537  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png");
13538  c3x5->Clear();
13539  // clean-up
13540  if (h2CeffHFpositivedirectionRecosignalD1)
13541  delete h2CeffHFpositivedirectionRecosignalD1;
13542  //========================================================================================== 15
13543  //======================================================================
13544  //======================================================================1D plot: D vs phi , different eta, depth=2
13545  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
13546  c3x5->Clear();
13547  c3x5->Divide(3, 5);
13548  c3x5->cd(1);
13549  int kcountHFpositivedirectionRecosignalD2 = 1;
13550  TH1F* h2CeffHFpositivedirectionRecosignalD2 = new TH1F("h2CeffHFpositivedirectionRecosignalD2", "", nphi, 0., 72.);
13551 
13552  for (int jeta = 0; jeta < njeta; jeta++) {
13553  // positivedirectionRecosignalD:
13554  if (jeta - 41 >= 0) {
13555  // for (int i=0;i<ndepth;i++) {
13556  // depth=2
13557  for (int i = 1; i < 2; i++) {
13558  TH1F* HFpositivedirectionRecosignalD2 = (TH1F*)h2CeffHFpositivedirectionRecosignalD2->Clone("twod1");
13559 
13560  float ccctest = 0; // to avoid empty massive elements
13561  for (int jphi = 0; jphi < nphi; jphi++) {
13562  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13563  if (arecosignalHF[i][jeta][jphi] > 0.) {
13564  HFpositivedirectionRecosignalD2->Fill(jphi, ccc1);
13565  ccctest = 1.; //HFpositivedirectionRecosignalD2->SetBinError(i,0.01);
13566  }
13567  } // for jphi
13568  if (ccctest > 0.) {
13569  //cout<<"1515 kcountHFpositivedirectionRecosignalD2 = "<<kcountHFpositivedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
13570  c3x5->cd(kcountHFpositivedirectionRecosignalD2);
13571  HFpositivedirectionRecosignalD2->SetMarkerStyle(20);
13572  HFpositivedirectionRecosignalD2->SetMarkerSize(0.4);
13573  HFpositivedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
13574  HFpositivedirectionRecosignalD2->SetXTitle("HFpositivedirectionRecosignalD2 \b");
13575  HFpositivedirectionRecosignalD2->SetMarkerColor(2);
13576  HFpositivedirectionRecosignalD2->SetLineColor(0);
13577  gPad->SetGridy();
13578  gPad->SetGridx();
13579  // gPad->SetLogy();
13580  if (kcountHFpositivedirectionRecosignalD2 == 1)
13581  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
13582  if (kcountHFpositivedirectionRecosignalD2 == 2)
13583  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
13584  if (kcountHFpositivedirectionRecosignalD2 == 3)
13585  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
13586  if (kcountHFpositivedirectionRecosignalD2 == 4)
13587  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
13588  if (kcountHFpositivedirectionRecosignalD2 == 5)
13589  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
13590  if (kcountHFpositivedirectionRecosignalD2 == 6)
13591  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
13592  if (kcountHFpositivedirectionRecosignalD2 == 7)
13593  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
13594  if (kcountHFpositivedirectionRecosignalD2 == 8)
13595  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
13596  if (kcountHFpositivedirectionRecosignalD2 == 9)
13597  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
13598  if (kcountHFpositivedirectionRecosignalD2 == 10)
13599  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
13600  if (kcountHFpositivedirectionRecosignalD2 == 11)
13601  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
13602  if (kcountHFpositivedirectionRecosignalD2 == 12)
13603  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
13604  if (kcountHFpositivedirectionRecosignalD2 == 13)
13605  HFpositivedirectionRecosignalD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
13606  HFpositivedirectionRecosignalD2->Draw("Error");
13607  kcountHFpositivedirectionRecosignalD2++;
13608  if (kcountHFpositivedirectionRecosignalD2 > 13)
13609  break; // 4x6 = 24
13610  } //ccctest>0
13611 
13612  } // for i
13613  } //if(jeta-41 >= 0)
13614  } //for jeta
13616  c3x5->Update();
13617  c3x5->Print("DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png");
13618  c3x5->Clear();
13619  // clean-up
13620  if (h2CeffHFpositivedirectionRecosignalD2)
13621  delete h2CeffHFpositivedirectionRecosignalD2;
13622  //========================================================================================== 22222214
13623  //======================================================================
13624  //======================================================================1D plot: D vs phi , different eta, depth=1
13625  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
13626  c3x5->Clear();
13628  c3x5->Divide(3, 5);
13629  c3x5->cd(1);
13630  int kcountHFnegativedirectionRecosignalD1 = 1;
13631  TH1F* h2CeffHFnegativedirectionRecosignalD1 = new TH1F("h2CeffHFnegativedirectionRecosignalD1", "", nphi, 0., 72.);
13632 
13633  for (int jeta = 0; jeta < njeta; jeta++) {
13634  // negativedirectionRecosignalD:
13635  if (jeta - 41 < 0) {
13636  // for (int i=0;i<ndepth;i++) {
13637  // depth=1
13638  for (int i = 0; i < 1; i++) {
13639  TH1F* HFnegativedirectionRecosignalD1 = (TH1F*)h2CeffHFnegativedirectionRecosignalD1->Clone("twod1");
13640 
13641  float ccctest = 0; // to avoid empty massive elements
13642  for (int jphi = 0; jphi < nphi; jphi++) {
13643  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13644  if (arecosignalHF[i][jeta][jphi] > 0.) {
13645  HFnegativedirectionRecosignalD1->Fill(jphi, ccc1);
13646  ccctest = 1.; //HFnegativedirectionRecosignalD1->SetBinError(i,0.01);
13647  }
13648  } // for jphi
13649  if (ccctest > 0.) {
13650  //cout<<"1414 kcountHFnegativedirectionRecosignalD1 = "<<kcountHFnegativedirectionRecosignalD1 <<" jeta-41= "<< jeta-41 <<endl;
13651  c3x5->cd(kcountHFnegativedirectionRecosignalD1);
13652  HFnegativedirectionRecosignalD1->SetMarkerStyle(20);
13653  HFnegativedirectionRecosignalD1->SetMarkerSize(0.4);
13654  HFnegativedirectionRecosignalD1->GetYaxis()->SetLabelSize(0.04);
13655  HFnegativedirectionRecosignalD1->SetXTitle("HFnegativedirectionRecosignalD1 \b");
13656  HFnegativedirectionRecosignalD1->SetMarkerColor(2);
13657  HFnegativedirectionRecosignalD1->SetLineColor(0);
13658  gPad->SetGridy();
13659  gPad->SetGridx();
13660  // gPad->SetLogy();
13661  if (kcountHFnegativedirectionRecosignalD1 == 1)
13662  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
13663  if (kcountHFnegativedirectionRecosignalD1 == 2)
13664  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
13665  if (kcountHFnegativedirectionRecosignalD1 == 3)
13666  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
13667  if (kcountHFnegativedirectionRecosignalD1 == 4)
13668  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
13669  if (kcountHFnegativedirectionRecosignalD1 == 5)
13670  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
13671  if (kcountHFnegativedirectionRecosignalD1 == 6)
13672  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
13673  if (kcountHFnegativedirectionRecosignalD1 == 7)
13674  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
13675  if (kcountHFnegativedirectionRecosignalD1 == 8)
13676  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
13677  if (kcountHFnegativedirectionRecosignalD1 == 9)
13678  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
13679  if (kcountHFnegativedirectionRecosignalD1 == 10)
13680  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
13681  if (kcountHFnegativedirectionRecosignalD1 == 11)
13682  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
13683  if (kcountHFnegativedirectionRecosignalD1 == 12)
13684  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
13685  if (kcountHFnegativedirectionRecosignalD1 == 13)
13686  HFnegativedirectionRecosignalD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
13687  HFnegativedirectionRecosignalD1->Draw("Error");
13688  kcountHFnegativedirectionRecosignalD1++;
13689  if (kcountHFnegativedirectionRecosignalD1 > 13)
13690  break; // 4x6 = 24
13691  } //ccctest>0
13692 
13693  } // for i
13694  } //if(jeta-41< 0)
13695  } //for jeta
13697  c3x5->Update();
13698  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
13699  c3x5->Clear();
13700  // clean-up
13701  if (h2CeffHFnegativedirectionRecosignalD1)
13702  delete h2CeffHFnegativedirectionRecosignalD1;
13703  //========================================================================================== 22222215
13704  //======================================================================
13705  //======================================================================1D plot: D vs phi , different eta, depth=2
13706  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
13707  c3x5->Clear();
13708  c3x5->Divide(3, 5);
13709  c3x5->cd(1);
13710  int kcountHFnegativedirectionRecosignalD2 = 1;
13711  TH1F* h2CeffHFnegativedirectionRecosignalD2 = new TH1F("h2CeffHFnegativedirectionRecosignalD2", "", nphi, 0., 72.);
13712 
13713  for (int jeta = 0; jeta < njeta; jeta++) {
13714  // negativedirectionRecosignalD:
13715  if (jeta - 41 < 0) {
13716  // for (int i=0;i<ndepth;i++) {
13717  // depth=2
13718  for (int i = 1; i < 2; i++) {
13719  TH1F* HFnegativedirectionRecosignalD2 = (TH1F*)h2CeffHFnegativedirectionRecosignalD2->Clone("twod1");
13720 
13721  float ccctest = 0; // to avoid empty massive elements
13722  for (int jphi = 0; jphi < nphi; jphi++) {
13723  double ccc1 = recosignalvarianceHF[i][jeta][jphi];
13724  if (arecosignalHF[i][jeta][jphi] > 0.) {
13725  HFnegativedirectionRecosignalD2->Fill(jphi, ccc1);
13726  ccctest = 1.; //HFnegativedirectionRecosignalD2->SetBinError(i,0.01);
13727  }
13728  } // for jphi
13729  if (ccctest > 0.) {
13730  //cout<<"1515 kcountHFnegativedirectionRecosignalD2 = "<<kcountHFnegativedirectionRecosignalD2 <<" jeta-41= "<< jeta-41 <<endl;
13731  c3x5->cd(kcountHFnegativedirectionRecosignalD2);
13732  HFnegativedirectionRecosignalD2->SetMarkerStyle(20);
13733  HFnegativedirectionRecosignalD2->SetMarkerSize(0.4);
13734  HFnegativedirectionRecosignalD2->GetYaxis()->SetLabelSize(0.04);
13735  HFnegativedirectionRecosignalD2->SetXTitle("HFnegativedirectionRecosignalD2 \b");
13736  HFnegativedirectionRecosignalD2->SetMarkerColor(2);
13737  HFnegativedirectionRecosignalD2->SetLineColor(0);
13738  gPad->SetGridy();
13739  gPad->SetGridx();
13740  // gPad->SetLogy();
13741  if (kcountHFnegativedirectionRecosignalD2 == 1)
13742  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
13743  if (kcountHFnegativedirectionRecosignalD2 == 2)
13744  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
13745  if (kcountHFnegativedirectionRecosignalD2 == 3)
13746  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
13747  if (kcountHFnegativedirectionRecosignalD2 == 4)
13748  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
13749  if (kcountHFnegativedirectionRecosignalD2 == 5)
13750  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
13751  if (kcountHFnegativedirectionRecosignalD2 == 6)
13752  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
13753  if (kcountHFnegativedirectionRecosignalD2 == 7)
13754  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
13755  if (kcountHFnegativedirectionRecosignalD2 == 8)
13756  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
13757  if (kcountHFnegativedirectionRecosignalD2 == 9)
13758  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
13759  if (kcountHFnegativedirectionRecosignalD2 == 10)
13760  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
13761  if (kcountHFnegativedirectionRecosignalD2 == 11)
13762  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
13763  if (kcountHFnegativedirectionRecosignalD2 == 12)
13764  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
13765  if (kcountHFnegativedirectionRecosignalD2 == 13)
13766  HFnegativedirectionRecosignalD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
13767  HFnegativedirectionRecosignalD2->Draw("Error");
13768  kcountHFnegativedirectionRecosignalD2++;
13769  if (kcountHFnegativedirectionRecosignalD2 > 13)
13770  break; // 4x6 = 24
13771  } //ccctest>0
13772 
13773  } // for i
13774  } //if(jeta-41< 0)
13775  } //for jeta
13777  c3x5->Update();
13778  c3x5->Print("DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
13779  c3x5->Clear();
13780  // clean-up
13781  if (h2CeffHFnegativedirectionRecosignalD2)
13782  delete h2CeffHFnegativedirectionRecosignalD2;
13783 
13784  //===================================================================== END of Recosignal HF for phi-symmetry
13785  //===================================================================== END of Recosignal HF for phi-symmetry
13786  //===================================================================== END of Recosignal HF for phi-symmetry
13787  //============================================================================================================ END of Recosignal for phi-symmetry
13788  //============================================================================================================ END of Recosignal for phi-symmetry
13789  //============================================================================================================ END of Recosignal for phi-symmetry
13790 
13797  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
13798  //ndepth = k_max[5];
13799  ndepth = 4;
13800  double areconoiseHB[ndepth][njeta][njphi];
13801  double breconoiseHB[ndepth][njeta][njphi];
13802  double reconoisevarianceHB[ndepth][njeta][njphi];
13803  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HB recNoiseEnergy
13804  TH2F* recNoiseEnergy1HB1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HB1");
13805  TH2F* recNoiseEnergy0HB1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB1");
13806  TH2F* recNoiseEnergyHB1 = (TH2F*)recNoiseEnergy1HB1->Clone("recNoiseEnergyHB1");
13807  recNoiseEnergyHB1->Divide(recNoiseEnergy1HB1, recNoiseEnergy0HB1, 1, 1, "B");
13808  TH2F* recNoiseEnergy1HB2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HB2");
13809  TH2F* recNoiseEnergy0HB2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB2");
13810  TH2F* recNoiseEnergyHB2 = (TH2F*)recNoiseEnergy1HB2->Clone("recNoiseEnergyHB2");
13811  recNoiseEnergyHB2->Divide(recNoiseEnergy1HB2, recNoiseEnergy0HB2, 1, 1, "B");
13812  TH2F* recNoiseEnergy1HB3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HB3");
13813  TH2F* recNoiseEnergy0HB3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB3");
13814  TH2F* recNoiseEnergyHB3 = (TH2F*)recNoiseEnergy1HB3->Clone("recNoiseEnergyHB3");
13815  recNoiseEnergyHB3->Divide(recNoiseEnergy1HB3, recNoiseEnergy0HB3, 1, 1, "B");
13816  TH2F* recNoiseEnergy1HB4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HB4");
13817  TH2F* recNoiseEnergy0HB4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB4");
13818  TH2F* recNoiseEnergyHB4 = (TH2F*)recNoiseEnergy1HB4->Clone("recNoiseEnergyHB4");
13819  recNoiseEnergyHB4->Divide(recNoiseEnergy1HB4, recNoiseEnergy0HB4, 1, 1, "B");
13820  for (int jeta = 0; jeta < njeta; jeta++) {
13821  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
13822  //====================================================================== PHI normalization & put R into massive areconoiseHB
13823  //preparation for PHI normalization:
13824  double sumreconoiseHB0 = 0;
13825  int nsumreconoiseHB0 = 0;
13826  double sumreconoiseHB1 = 0;
13827  int nsumreconoiseHB1 = 0;
13828  double sumreconoiseHB2 = 0;
13829  int nsumreconoiseHB2 = 0;
13830  double sumreconoiseHB3 = 0;
13831  int nsumreconoiseHB3 = 0;
13832  for (int jphi = 0; jphi < njphi; jphi++) {
13833  areconoiseHB[0][jeta][jphi] = recNoiseEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
13834  areconoiseHB[1][jeta][jphi] = recNoiseEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
13835  areconoiseHB[2][jeta][jphi] = recNoiseEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
13836  areconoiseHB[3][jeta][jphi] = recNoiseEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
13837  breconoiseHB[0][jeta][jphi] = recNoiseEnergyHB1->GetBinContent(jeta + 1, jphi + 1);
13838  breconoiseHB[1][jeta][jphi] = recNoiseEnergyHB2->GetBinContent(jeta + 1, jphi + 1);
13839  breconoiseHB[2][jeta][jphi] = recNoiseEnergyHB3->GetBinContent(jeta + 1, jphi + 1);
13840  breconoiseHB[3][jeta][jphi] = recNoiseEnergyHB4->GetBinContent(jeta + 1, jphi + 1);
13841  if (areconoiseHB[0][jeta][jphi] != 0.) {
13842  sumreconoiseHB0 += areconoiseHB[0][jeta][jphi];
13843  ++nsumreconoiseHB0;
13844  }
13845  if (areconoiseHB[1][jeta][jphi] != 0.) {
13846  sumreconoiseHB1 += areconoiseHB[1][jeta][jphi];
13847  ++nsumreconoiseHB1;
13848  }
13849  if (areconoiseHB[2][jeta][jphi] != 0.) {
13850  sumreconoiseHB2 += areconoiseHB[2][jeta][jphi];
13851  ++nsumreconoiseHB2;
13852  }
13853  if (areconoiseHB[3][jeta][jphi] != 0.) {
13854  sumreconoiseHB3 += areconoiseHB[3][jeta][jphi];
13855  ++nsumreconoiseHB3;
13856  }
13857  } // phi
13858  // PHI normalization: DIF
13859  for (int jphi = 0; jphi < njphi; jphi++) {
13860  if (sumreconoiseHB0 != 0.)
13861  breconoiseHB[0][jeta][jphi] -= (sumreconoiseHB0 / nsumreconoiseHB0);
13862  if (sumreconoiseHB1 != 0.)
13863  breconoiseHB[1][jeta][jphi] -= (sumreconoiseHB1 / nsumreconoiseHB1);
13864  if (sumreconoiseHB2 != 0.)
13865  breconoiseHB[2][jeta][jphi] -= (sumreconoiseHB2 / nsumreconoiseHB2);
13866  if (sumreconoiseHB3 != 0.)
13867  breconoiseHB[3][jeta][jphi] -= (sumreconoiseHB3 / nsumreconoiseHB3);
13868  } // phi
13869  // PHI normalization: R
13870  for (int jphi = 0; jphi < njphi; jphi++) {
13871  if (areconoiseHB[0][jeta][jphi] != 0.)
13872  areconoiseHB[0][jeta][jphi] /= (sumreconoiseHB0 / nsumreconoiseHB0);
13873  if (areconoiseHB[1][jeta][jphi] != 0.)
13874  areconoiseHB[1][jeta][jphi] /= (sumreconoiseHB1 / nsumreconoiseHB1);
13875  if (areconoiseHB[2][jeta][jphi] != 0.)
13876  areconoiseHB[2][jeta][jphi] /= (sumreconoiseHB2 / nsumreconoiseHB2);
13877  if (areconoiseHB[3][jeta][jphi] != 0.)
13878  areconoiseHB[3][jeta][jphi] /= (sumreconoiseHB3 / nsumreconoiseHB3);
13879  } // phi
13880  } //if eta
13881  } //eta
13882  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
13883  //======================================================================
13884  //======================================================================
13885  //cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
13886  c2x1->Clear();
13888  c2x1->Divide(2, 1);
13889  c2x1->cd(1);
13890  TH2F* GefzRreconoiseHB42D = new TH2F("GefzRreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
13891  TH2F* GefzRreconoiseHB42D0 = new TH2F("GefzRreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
13892  TH2F* GefzRreconoiseHB42DF = (TH2F*)GefzRreconoiseHB42D0->Clone("GefzRreconoiseHB42DF");
13893  for (int i = 0; i < ndepth; i++) {
13894  for (int jeta = 0; jeta < neta; jeta++) {
13895  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
13896  for (int jphi = 0; jphi < nphi; jphi++) {
13897  double ccc1 = areconoiseHB[i][jeta][jphi];
13898  int k2plot = jeta - 41;
13899  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
13900  if (ccc1 != 0.) {
13901  GefzRreconoiseHB42D->Fill(kkk, jphi, ccc1);
13902  GefzRreconoiseHB42D0->Fill(kkk, jphi, 1.);
13903  }
13904  }
13905  }
13906  }
13907  }
13908  GefzRreconoiseHB42DF->Divide(GefzRreconoiseHB42D, GefzRreconoiseHB42D0, 1, 1, "B"); // average A
13909  gPad->SetGridy();
13910  gPad->SetGridx(); // gPad->SetLogz();
13911  GefzRreconoiseHB42DF->SetXTitle("<R>_depth #eta \b");
13912  GefzRreconoiseHB42DF->SetYTitle(" #phi \b");
13913  GefzRreconoiseHB42DF->Draw("COLZ");
13914 
13915  c2x1->cd(2);
13916  TH1F* energyhitNoise_HB = (TH1F*)dir->FindObjectAny("h_energyhitNoise_HB");
13917  energyhitNoise_HB->SetMarkerStyle(20);
13918  energyhitNoise_HB->SetMarkerSize(0.4);
13919  energyhitNoise_HB->GetYaxis()->SetLabelSize(0.04);
13920  energyhitNoise_HB->SetXTitle("energyhitNoise_HB \b");
13921  energyhitNoise_HB->SetMarkerColor(2);
13922  energyhitNoise_HB->SetLineColor(0);
13923  gPad->SetGridy();
13924  gPad->SetGridx();
13925  energyhitNoise_HB->Draw("Error");
13926 
13928  c2x1->Update();
13929  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHB.png");
13930  c2x1->Clear();
13931  // clean-up
13932  if (GefzRreconoiseHB42D)
13933  delete GefzRreconoiseHB42D;
13934  if (GefzRreconoiseHB42D0)
13935  delete GefzRreconoiseHB42D0;
13936  if (GefzRreconoiseHB42DF)
13937  delete GefzRreconoiseHB42DF;
13938  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
13939  //======================================================================
13940  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
13941  c1x1->Clear();
13943  c1x1->Divide(1, 1);
13944  c1x1->cd(1);
13945  TH1F* GefzRreconoiseHB41D = new TH1F("GefzRreconoiseHB41D", "", nphi, 0., 72.);
13946  TH1F* GefzRreconoiseHB41D0 = new TH1F("GefzRreconoiseHB41D0", "", nphi, 0., 72.);
13947  TH1F* GefzRreconoiseHB41DF = (TH1F*)GefzRreconoiseHB41D0->Clone("GefzRreconoiseHB41DF");
13948  for (int jphi = 0; jphi < nphi; jphi++) {
13949  for (int jeta = 0; jeta < neta; jeta++) {
13950  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
13951  for (int i = 0; i < ndepth; i++) {
13952  double ccc1 = areconoiseHB[i][jeta][jphi];
13953  if (ccc1 != 0.) {
13954  GefzRreconoiseHB41D->Fill(jphi, ccc1);
13955  GefzRreconoiseHB41D0->Fill(jphi, 1.);
13956  }
13957  }
13958  }
13959  }
13960  }
13961  GefzRreconoiseHB41DF->Divide(GefzRreconoiseHB41D, GefzRreconoiseHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
13962  GefzRreconoiseHB41D0->Sumw2();
13963  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHB41DF->SetBinError(jphi,0.01);}
13964  gPad->SetGridy();
13965  gPad->SetGridx(); // gPad->SetLogz();
13966  GefzRreconoiseHB41DF->SetMarkerStyle(20);
13967  GefzRreconoiseHB41DF->SetMarkerSize(1.4);
13968  GefzRreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
13969  GefzRreconoiseHB41DF->SetXTitle("#phi \b");
13970  GefzRreconoiseHB41DF->SetYTitle(" <R> \b");
13971  GefzRreconoiseHB41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
13972  GefzRreconoiseHB41DF->SetMarkerColor(4);
13973  GefzRreconoiseHB41DF->SetLineColor(
13974  4); //GefzRreconoiseHB41DF->SetMinimum(0.8); // GefzRreconoiseHB41DF->SetMaximum(1.000);
13975  GefzRreconoiseHB41DF->Draw("Error");
13977  c1x1->Update();
13978  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHB.png");
13979  c1x1->Clear();
13980  // clean-up
13981  if (GefzRreconoiseHB41D)
13982  delete GefzRreconoiseHB41D;
13983  if (GefzRreconoiseHB41D0)
13984  delete GefzRreconoiseHB41D0;
13985  if (GefzRreconoiseHB41DF)
13986  delete GefzRreconoiseHB41DF;
13987  //========================================================================================== 4
13988  //======================================================================
13989  //======================================================================1D plot: R vs phi , different eta, depth=1
13990  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
13991  c3x5->Clear();
13993  c3x5->Divide(4, 4);
13994  c3x5->cd(1);
13995  int kcountHBpositivedirectionReconoise1 = 1;
13996  TH1F* h2CeffHBpositivedirectionReconoise1 = new TH1F("h2CeffHBpositivedirectionReconoise1", "", nphi, 0., 72.);
13997  for (int jeta = 0; jeta < njeta; jeta++) {
13998  // positivedirectionReconoise:
13999  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14000  // for (int i=0;i<ndepth;i++) {
14001  // depth=1
14002  for (int i = 0; i < 1; i++) {
14003  TH1F* HBpositivedirectionReconoise1 = (TH1F*)h2CeffHBpositivedirectionReconoise1->Clone("twod1");
14004  float ccctest = 0; // to avoid empty massive elements
14005  for (int jphi = 0; jphi < nphi; jphi++) {
14006  double ccc1 = areconoiseHB[i][jeta][jphi];
14007  if (ccc1 != 0.) {
14008  HBpositivedirectionReconoise1->Fill(jphi, ccc1);
14009  ccctest = 1.; //HBpositivedirectionReconoise1->SetBinError(i,0.01);
14010  }
14011  } // for jphi
14012  if (ccctest > 0.) {
14013  // cout<<"444 kcountHBpositivedirectionReconoise1 = "<<kcountHBpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
14014  c3x5->cd(kcountHBpositivedirectionReconoise1);
14015  HBpositivedirectionReconoise1->SetMarkerStyle(20);
14016  HBpositivedirectionReconoise1->SetMarkerSize(0.4);
14017  HBpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
14018  HBpositivedirectionReconoise1->SetXTitle("HBpositivedirectionReconoise1 \b");
14019  HBpositivedirectionReconoise1->SetMarkerColor(2);
14020  HBpositivedirectionReconoise1->SetLineColor(0);
14021  gPad->SetGridy();
14022  gPad->SetGridx();
14023  // gPad->SetLogy();
14024  if (kcountHBpositivedirectionReconoise1 == 1)
14025  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 0; depth = 1 \b");
14026  if (kcountHBpositivedirectionReconoise1 == 2)
14027  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 1; depth = 1 \b");
14028  if (kcountHBpositivedirectionReconoise1 == 3)
14029  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 2; depth = 1 \b");
14030  if (kcountHBpositivedirectionReconoise1 == 4)
14031  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 3; depth = 1 \b");
14032  if (kcountHBpositivedirectionReconoise1 == 5)
14033  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 4; depth = 1 \b");
14034  if (kcountHBpositivedirectionReconoise1 == 6)
14035  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 5; depth = 1 \b");
14036  if (kcountHBpositivedirectionReconoise1 == 7)
14037  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 6; depth = 1 \b");
14038  if (kcountHBpositivedirectionReconoise1 == 8)
14039  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 7; depth = 1 \b");
14040  if (kcountHBpositivedirectionReconoise1 == 9)
14041  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 8; depth = 1 \b");
14042  if (kcountHBpositivedirectionReconoise1 == 10)
14043  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 9; depth = 1 \b");
14044  if (kcountHBpositivedirectionReconoise1 == 11)
14045  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 10; depth = 1 \b");
14046  if (kcountHBpositivedirectionReconoise1 == 12)
14047  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 11; depth = 1 \b");
14048  if (kcountHBpositivedirectionReconoise1 == 13)
14049  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 12; depth = 1 \b");
14050  if (kcountHBpositivedirectionReconoise1 == 14)
14051  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 13; depth = 1 \b");
14052  if (kcountHBpositivedirectionReconoise1 == 15)
14053  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 14; depth = 1 \b");
14054  if (kcountHBpositivedirectionReconoise1 == 16)
14055  HBpositivedirectionReconoise1->SetXTitle("R for HB+ jeta = 15; depth = 1 \b");
14056  HBpositivedirectionReconoise1->Draw("Error");
14057  kcountHBpositivedirectionReconoise1++;
14058  if (kcountHBpositivedirectionReconoise1 > 16)
14059  break; //
14060  } //ccctest>0
14061 
14062  } // for i
14063  } //if(jeta-41 >= 0)
14064  } //for jeta
14066  c3x5->Update();
14067  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
14068  c3x5->Clear();
14069  // clean-up
14070  if (h2CeffHBpositivedirectionReconoise1)
14071  delete h2CeffHBpositivedirectionReconoise1;
14072 
14073  //========================================================================================== 5
14074  //======================================================================
14075  //======================================================================1D plot: R vs phi , different eta, depth=2
14076  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
14077  c3x5->Clear();
14079  c3x5->Divide(4, 4);
14080  c3x5->cd(1);
14081  int kcountHBpositivedirectionReconoise2 = 1;
14082  TH1F* h2CeffHBpositivedirectionReconoise2 = new TH1F("h2CeffHBpositivedirectionReconoise2", "", nphi, 0., 72.);
14083  for (int jeta = 0; jeta < njeta; jeta++) {
14084  // positivedirectionReconoise:
14085  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14086  // for (int i=0;i<ndepth;i++) {
14087  // depth=2
14088  for (int i = 1; i < 2; i++) {
14089  TH1F* HBpositivedirectionReconoise2 = (TH1F*)h2CeffHBpositivedirectionReconoise2->Clone("twod1");
14090  float ccctest = 0; // to avoid empty massive elements
14091  for (int jphi = 0; jphi < nphi; jphi++) {
14092  double ccc1 = areconoiseHB[i][jeta][jphi];
14093  if (ccc1 != 0.) {
14094  HBpositivedirectionReconoise2->Fill(jphi, ccc1);
14095  ccctest = 1.; //HBpositivedirectionReconoise2->SetBinError(i,0.01);
14096  }
14097  } // for jphi
14098  if (ccctest > 0.) {
14099  //cout<<"555 kcountHBpositivedirectionReconoise2 = "<<kcountHBpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
14100  c3x5->cd(kcountHBpositivedirectionReconoise2);
14101  HBpositivedirectionReconoise2->SetMarkerStyle(20);
14102  HBpositivedirectionReconoise2->SetMarkerSize(0.4);
14103  HBpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
14104  HBpositivedirectionReconoise2->SetXTitle("HBpositivedirectionReconoise2 \b");
14105  HBpositivedirectionReconoise2->SetMarkerColor(2);
14106  HBpositivedirectionReconoise2->SetLineColor(0);
14107  gPad->SetGridy();
14108  gPad->SetGridx();
14109  // gPad->SetLogy();
14110  if (kcountHBpositivedirectionReconoise2 == 1)
14111  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 0; depth = 2 \b");
14112  if (kcountHBpositivedirectionReconoise2 == 2)
14113  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 1; depth = 2 \b");
14114  if (kcountHBpositivedirectionReconoise2 == 3)
14115  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 2; depth = 2 \b");
14116  if (kcountHBpositivedirectionReconoise2 == 4)
14117  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 3; depth = 2 \b");
14118  if (kcountHBpositivedirectionReconoise2 == 5)
14119  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 4; depth = 2 \b");
14120  if (kcountHBpositivedirectionReconoise2 == 6)
14121  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 5; depth = 2 \b");
14122  if (kcountHBpositivedirectionReconoise2 == 7)
14123  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 6; depth = 2 \b");
14124  if (kcountHBpositivedirectionReconoise2 == 8)
14125  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 7; depth = 2 \b");
14126  if (kcountHBpositivedirectionReconoise2 == 9)
14127  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 8; depth = 2 \b");
14128  if (kcountHBpositivedirectionReconoise2 == 10)
14129  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 9; depth = 2 \b");
14130  if (kcountHBpositivedirectionReconoise2 == 11)
14131  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 10; depth = 2 \b");
14132  if (kcountHBpositivedirectionReconoise2 == 12)
14133  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 11; depth = 2 \b");
14134  if (kcountHBpositivedirectionReconoise2 == 13)
14135  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 12; depth = 2 \b");
14136  if (kcountHBpositivedirectionReconoise2 == 14)
14137  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 13; depth = 2 \b");
14138  if (kcountHBpositivedirectionReconoise2 == 15)
14139  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 14; depth = 2 \b");
14140  if (kcountHBpositivedirectionReconoise2 == 16)
14141  HBpositivedirectionReconoise2->SetXTitle("R for HB+ jeta = 15; depth = 2 \b");
14142  HBpositivedirectionReconoise2->Draw("Error");
14143  kcountHBpositivedirectionReconoise2++;
14144  if (kcountHBpositivedirectionReconoise2 > 16)
14145  break; // 4x6 = 24
14146  } //ccctest>0
14147 
14148  } // for i
14149  } //if(jeta-41 >= 0)
14150  } //for jeta
14152  c3x5->Update();
14153  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
14154  c3x5->Clear();
14155  // clean-up
14156  if (h2CeffHBpositivedirectionReconoise2)
14157  delete h2CeffHBpositivedirectionReconoise2;
14158  //========================================================================================== 6
14159  //======================================================================
14160  //======================================================================1D plot: R vs phi , different eta, depth=3
14161  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
14162  c3x5->Clear();
14164  c3x5->Divide(4, 4);
14165  c3x5->cd(1);
14166  int kcountHBpositivedirectionReconoise3 = 1;
14167  TH1F* h2CeffHBpositivedirectionReconoise3 = new TH1F("h2CeffHBpositivedirectionReconoise3", "", nphi, 0., 72.);
14168  for (int jeta = 0; jeta < njeta; jeta++) {
14169  // positivedirectionReconoise:
14170  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14171  // for (int i=0;i<ndepth;i++) {
14172  // depth=3
14173  for (int i = 2; i < 3; i++) {
14174  TH1F* HBpositivedirectionReconoise3 = (TH1F*)h2CeffHBpositivedirectionReconoise3->Clone("twod1");
14175  float ccctest = 0; // to avoid empty massive elements
14176  for (int jphi = 0; jphi < nphi; jphi++) {
14177  double ccc1 = areconoiseHB[i][jeta][jphi];
14178  if (ccc1 != 0.) {
14179  HBpositivedirectionReconoise3->Fill(jphi, ccc1);
14180  ccctest = 1.; //HBpositivedirectionReconoise3->SetBinError(i,0.01);
14181  }
14182  } // for jphi
14183  if (ccctest > 0.) {
14184  //cout<<"666 kcountHBpositivedirectionReconoise3 = "<<kcountHBpositivedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
14185  c3x5->cd(kcountHBpositivedirectionReconoise3);
14186  HBpositivedirectionReconoise3->SetMarkerStyle(20);
14187  HBpositivedirectionReconoise3->SetMarkerSize(0.4);
14188  HBpositivedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
14189  HBpositivedirectionReconoise3->SetXTitle("HBpositivedirectionReconoise3 \b");
14190  HBpositivedirectionReconoise3->SetMarkerColor(2);
14191  HBpositivedirectionReconoise3->SetLineColor(0);
14192  gPad->SetGridy();
14193  gPad->SetGridx();
14194  // gPad->SetLogy();
14195  if (kcountHBpositivedirectionReconoise3 == 1)
14196  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
14197  if (kcountHBpositivedirectionReconoise3 == 2)
14198  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 1; depth = 3 \b");
14199  if (kcountHBpositivedirectionReconoise3 == 3)
14200  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 2; depth = 3 \b");
14201  if (kcountHBpositivedirectionReconoise3 == 4)
14202  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 3; depth = 3 \b");
14203  if (kcountHBpositivedirectionReconoise3 == 5)
14204  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 4; depth = 3 \b");
14205  if (kcountHBpositivedirectionReconoise3 == 6)
14206  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 5; depth = 3 \b");
14207  if (kcountHBpositivedirectionReconoise3 == 7)
14208  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 6; depth = 3 \b");
14209  if (kcountHBpositivedirectionReconoise3 == 8)
14210  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 7; depth = 3 \b");
14211  if (kcountHBpositivedirectionReconoise3 == 9)
14212  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 8; depth = 3 \b");
14213  if (kcountHBpositivedirectionReconoise3 == 10)
14214  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 9; depth = 3 \b");
14215  if (kcountHBpositivedirectionReconoise3 == 11)
14216  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 0; depth = 3 \b");
14217  if (kcountHBpositivedirectionReconoise3 == 12)
14218  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 11; depth = 3 \b");
14219  if (kcountHBpositivedirectionReconoise3 == 13)
14220  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 12; depth = 3 \b");
14221  if (kcountHBpositivedirectionReconoise3 == 14)
14222  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 13; depth = 3 \b");
14223  if (kcountHBpositivedirectionReconoise3 == 15)
14224  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 14; depth = 3 \b");
14225  if (kcountHBpositivedirectionReconoise3 == 16)
14226  HBpositivedirectionReconoise3->SetXTitle("R for HB+ jeta = 15; depth = 3 \b");
14227  HBpositivedirectionReconoise3->Draw("Error");
14228  kcountHBpositivedirectionReconoise3++;
14229  if (kcountHBpositivedirectionReconoise3 > 16)
14230  break; // 4x6 = 24
14231  } //ccctest>0
14232 
14233  } // for i
14234  } //if(jeta-41 >= 0)
14235  } //for jeta
14237  c3x5->Update();
14238  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
14239  c3x5->Clear();
14240  // clean-up
14241  if (h2CeffHBpositivedirectionReconoise3)
14242  delete h2CeffHBpositivedirectionReconoise3;
14243  //========================================================================================== 7
14244  //======================================================================
14245  //======================================================================1D plot: R vs phi , different eta, depth=4
14246  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
14247  c3x5->Clear();
14249  c3x5->Divide(4, 4);
14250  c3x5->cd(1);
14251  int kcountHBpositivedirectionReconoise4 = 1;
14252  TH1F* h2CeffHBpositivedirectionReconoise4 = new TH1F("h2CeffHBpositivedirectionReconoise4", "", nphi, 0., 72.);
14253 
14254  for (int jeta = 0; jeta < njeta; jeta++) {
14255  // positivedirectionReconoise:
14256  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14257  // for (int i=0;i<ndepth;i++) {
14258  // depth=4
14259  for (int i = 3; i < 4; i++) {
14260  TH1F* HBpositivedirectionReconoise4 = (TH1F*)h2CeffHBpositivedirectionReconoise4->Clone("twod1");
14261 
14262  float ccctest = 0; // to avoid empty massive elements
14263  for (int jphi = 0; jphi < nphi; jphi++) {
14264  double ccc1 = areconoiseHB[i][jeta][jphi];
14265  if (ccc1 != 0.) {
14266  HBpositivedirectionReconoise4->Fill(jphi, ccc1);
14267  ccctest = 1.; //HBpositivedirectionReconoise4->SetBinError(i,0.01);
14268  }
14269  } // for jphi
14270  if (ccctest > 0.) {
14271  //cout<<"777 kcountHBpositivedirectionReconoise4 = "<<kcountHBpositivedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
14272  c3x5->cd(kcountHBpositivedirectionReconoise4);
14273  HBpositivedirectionReconoise4->SetMarkerStyle(20);
14274  HBpositivedirectionReconoise4->SetMarkerSize(0.4);
14275  HBpositivedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
14276  HBpositivedirectionReconoise4->SetXTitle("HBpositivedirectionReconoise4 \b");
14277  HBpositivedirectionReconoise4->SetMarkerColor(2);
14278  HBpositivedirectionReconoise4->SetLineColor(0);
14279  gPad->SetGridy();
14280  gPad->SetGridx();
14281  // gPad->SetLogy();
14282  if (kcountHBpositivedirectionReconoise4 == 1)
14283  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 0; depth = 4 \b");
14284  if (kcountHBpositivedirectionReconoise4 == 2)
14285  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 1; depth = 4 \b");
14286  if (kcountHBpositivedirectionReconoise4 == 3)
14287  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 2; depth = 4 \b");
14288  if (kcountHBpositivedirectionReconoise4 == 4)
14289  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 3; depth = 4 \b");
14290  if (kcountHBpositivedirectionReconoise4 == 5)
14291  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 4; depth = 4 \b");
14292  if (kcountHBpositivedirectionReconoise4 == 6)
14293  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 5; depth = 4 \b");
14294  if (kcountHBpositivedirectionReconoise4 == 7)
14295  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 6; depth = 4 \b");
14296  if (kcountHBpositivedirectionReconoise4 == 8)
14297  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 7; depth = 4 \b");
14298  if (kcountHBpositivedirectionReconoise4 == 9)
14299  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 8; depth = 4 \b");
14300  if (kcountHBpositivedirectionReconoise4 == 10)
14301  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 9; depth = 4 \b");
14302  if (kcountHBpositivedirectionReconoise4 == 11)
14303  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 10; depth = 4 \b");
14304  if (kcountHBpositivedirectionReconoise4 == 12)
14305  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 11; depth = 4 \b");
14306  if (kcountHBpositivedirectionReconoise4 == 13)
14307  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 12; depth = 4 \b");
14308  if (kcountHBpositivedirectionReconoise4 == 14)
14309  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 13; depth = 4 \b");
14310  if (kcountHBpositivedirectionReconoise4 == 15)
14311  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 14; depth = 4 \b");
14312  if (kcountHBpositivedirectionReconoise4 == 16)
14313  HBpositivedirectionReconoise4->SetXTitle("R for HB+ jeta = 15; depth = 4 \b");
14314  HBpositivedirectionReconoise4->Draw("Error");
14315  kcountHBpositivedirectionReconoise4++;
14316  if (kcountHBpositivedirectionReconoise4 > 16)
14317  break; // 4x6 = 24
14318  } //ccctest>0
14319 
14320  } // for i
14321  } //if(jeta-41 >= 0)
14322  } //for jeta
14324  c3x5->Update();
14325  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
14326  c3x5->Clear();
14327  // clean-up
14328  if (h2CeffHBpositivedirectionReconoise4)
14329  delete h2CeffHBpositivedirectionReconoise4;
14330 
14331  //========================================================================================== 1114
14332  //======================================================================
14333  //======================================================================1D plot: R vs phi , different eta, depth=1
14334  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
14335  c3x5->Clear();
14337  c3x5->Divide(4, 4);
14338  c3x5->cd(1);
14339  int kcountHBnegativedirectionReconoise1 = 1;
14340  TH1F* h2CeffHBnegativedirectionReconoise1 = new TH1F("h2CeffHBnegativedirectionReconoise1", "", nphi, 0., 72.);
14341  for (int jeta = 0; jeta < njeta; jeta++) {
14342  // negativedirectionReconoise:
14343  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14344  // for (int i=0;i<ndepth;i++) {
14345  // depth=1
14346  for (int i = 0; i < 1; i++) {
14347  TH1F* HBnegativedirectionReconoise1 = (TH1F*)h2CeffHBnegativedirectionReconoise1->Clone("twod1");
14348  float ccctest = 0; // to avoid empty massive elements
14349  for (int jphi = 0; jphi < nphi; jphi++) {
14350  double ccc1 = areconoiseHB[i][jeta][jphi];
14351  if (ccc1 != 0.) {
14352  HBnegativedirectionReconoise1->Fill(jphi, ccc1);
14353  ccctest = 1.; //HBnegativedirectionReconoise1->SetBinError(i,0.01);
14354  }
14355  } // for jphi
14356  if (ccctest > 0.) {
14357  // cout<<"444 kcountHBnegativedirectionReconoise1 = "<<kcountHBnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
14358  c3x5->cd(kcountHBnegativedirectionReconoise1);
14359  HBnegativedirectionReconoise1->SetMarkerStyle(20);
14360  HBnegativedirectionReconoise1->SetMarkerSize(0.4);
14361  HBnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
14362  HBnegativedirectionReconoise1->SetXTitle("HBnegativedirectionReconoise1 \b");
14363  HBnegativedirectionReconoise1->SetMarkerColor(2);
14364  HBnegativedirectionReconoise1->SetLineColor(0);
14365  gPad->SetGridy();
14366  gPad->SetGridx();
14367  // gPad->SetLogy();
14368  if (kcountHBnegativedirectionReconoise1 == 1)
14369  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -16; depth = 1 \b");
14370  if (kcountHBnegativedirectionReconoise1 == 2)
14371  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -15; depth = 1 \b");
14372  if (kcountHBnegativedirectionReconoise1 == 3)
14373  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -14; depth = 1 \b");
14374  if (kcountHBnegativedirectionReconoise1 == 4)
14375  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -13; depth = 1 \b");
14376  if (kcountHBnegativedirectionReconoise1 == 5)
14377  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -12; depth = 1 \b");
14378  if (kcountHBnegativedirectionReconoise1 == 6)
14379  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -11; depth = 1 \b");
14380  if (kcountHBnegativedirectionReconoise1 == 7)
14381  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -10; depth = 1 \b");
14382  if (kcountHBnegativedirectionReconoise1 == 8)
14383  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -9; depth = 1 \b");
14384  if (kcountHBnegativedirectionReconoise1 == 9)
14385  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -8; depth = 1 \b");
14386  if (kcountHBnegativedirectionReconoise1 == 10)
14387  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -7; depth = 1 \b");
14388  if (kcountHBnegativedirectionReconoise1 == 11)
14389  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -6; depth = 1 \b");
14390  if (kcountHBnegativedirectionReconoise1 == 12)
14391  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -5; depth = 1 \b");
14392  if (kcountHBnegativedirectionReconoise1 == 13)
14393  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -4; depth = 1 \b");
14394  if (kcountHBnegativedirectionReconoise1 == 14)
14395  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -3; depth = 1 \b");
14396  if (kcountHBnegativedirectionReconoise1 == 15)
14397  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -2; depth = 1 \b");
14398  if (kcountHBnegativedirectionReconoise1 == 16)
14399  HBnegativedirectionReconoise1->SetXTitle("R for HB- jeta = -1; depth = 1 \b");
14400  HBnegativedirectionReconoise1->Draw("Error");
14401  kcountHBnegativedirectionReconoise1++;
14402  if (kcountHBnegativedirectionReconoise1 > 16)
14403  break; //
14404  } //ccctest>0
14405 
14406  } // for i
14407  } //if(jeta-41 < 0 )
14408  } //for jeta
14410  c3x5->Update();
14411  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
14412  c3x5->Clear();
14413  // clean-up
14414  if (h2CeffHBnegativedirectionReconoise1)
14415  delete h2CeffHBnegativedirectionReconoise1;
14416 
14417  //========================================================================================== 1115
14418  //======================================================================
14419  //======================================================================1D plot: R vs phi , different eta, depth=2
14420  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
14421  c3x5->Clear();
14423  c3x5->Divide(4, 4);
14424  c3x5->cd(1);
14425  int kcountHBnegativedirectionReconoise2 = 1;
14426  TH1F* h2CeffHBnegativedirectionReconoise2 = new TH1F("h2CeffHBnegativedirectionReconoise2", "", nphi, 0., 72.);
14427  for (int jeta = 0; jeta < njeta; jeta++) {
14428  // negativedirectionReconoise:
14429  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14430  // for (int i=0;i<ndepth;i++) {
14431  // depth=2
14432  for (int i = 1; i < 2; i++) {
14433  TH1F* HBnegativedirectionReconoise2 = (TH1F*)h2CeffHBnegativedirectionReconoise2->Clone("twod1");
14434  float ccctest = 0; // to avoid empty massive elements
14435  for (int jphi = 0; jphi < nphi; jphi++) {
14436  double ccc1 = areconoiseHB[i][jeta][jphi];
14437  if (ccc1 != 0.) {
14438  HBnegativedirectionReconoise2->Fill(jphi, ccc1);
14439  ccctest = 1.; //HBnegativedirectionReconoise2->SetBinError(i,0.01);
14440  }
14441  } // for jphi
14442  if (ccctest > 0.) {
14443  //cout<<"555 kcountHBnegativedirectionReconoise2 = "<<kcountHBnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
14444  c3x5->cd(kcountHBnegativedirectionReconoise2);
14445  HBnegativedirectionReconoise2->SetMarkerStyle(20);
14446  HBnegativedirectionReconoise2->SetMarkerSize(0.4);
14447  HBnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
14448  HBnegativedirectionReconoise2->SetXTitle("HBnegativedirectionReconoise2 \b");
14449  HBnegativedirectionReconoise2->SetMarkerColor(2);
14450  HBnegativedirectionReconoise2->SetLineColor(0);
14451  gPad->SetGridy();
14452  gPad->SetGridx();
14453  // gPad->SetLogy();
14454  if (kcountHBnegativedirectionReconoise2 == 1)
14455  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -16; depth = 2 \b");
14456  if (kcountHBnegativedirectionReconoise2 == 2)
14457  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -15; depth = 2 \b");
14458  if (kcountHBnegativedirectionReconoise2 == 3)
14459  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -14; depth = 2 \b");
14460  if (kcountHBnegativedirectionReconoise2 == 4)
14461  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -13; depth = 2 \b");
14462  if (kcountHBnegativedirectionReconoise2 == 5)
14463  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -12; depth = 2 \b");
14464  if (kcountHBnegativedirectionReconoise2 == 6)
14465  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -11; depth = 2 \b");
14466  if (kcountHBnegativedirectionReconoise2 == 7)
14467  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -10; depth = 2 \b");
14468  if (kcountHBnegativedirectionReconoise2 == 8)
14469  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -9; depth = 2 \b");
14470  if (kcountHBnegativedirectionReconoise2 == 9)
14471  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -8; depth = 2 \b");
14472  if (kcountHBnegativedirectionReconoise2 == 10)
14473  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -7; depth = 2 \b");
14474  if (kcountHBnegativedirectionReconoise2 == 11)
14475  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -6; depth = 2 \b");
14476  if (kcountHBnegativedirectionReconoise2 == 12)
14477  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -5; depth = 2 \b");
14478  if (kcountHBnegativedirectionReconoise2 == 13)
14479  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -4; depth = 2 \b");
14480  if (kcountHBnegativedirectionReconoise2 == 14)
14481  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -3; depth = 2 \b");
14482  if (kcountHBnegativedirectionReconoise2 == 15)
14483  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -2; depth = 2 \b");
14484  if (kcountHBnegativedirectionReconoise2 == 16)
14485  HBnegativedirectionReconoise2->SetXTitle("R for HB- jeta = -1; depth = 2 \b");
14486  HBnegativedirectionReconoise2->Draw("Error");
14487  kcountHBnegativedirectionReconoise2++;
14488  if (kcountHBnegativedirectionReconoise2 > 16)
14489  break; // 4x6 = 24
14490  } //ccctest>0
14491 
14492  } // for i
14493  } //if(jeta-41 < 0 )
14494  } //for jeta
14496  c3x5->Update();
14497  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
14498  c3x5->Clear();
14499  // clean-up
14500  if (h2CeffHBnegativedirectionReconoise2)
14501  delete h2CeffHBnegativedirectionReconoise2;
14502  //========================================================================================== 1116
14503  //======================================================================
14504  //======================================================================1D plot: R vs phi , different eta, depth=3
14505  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
14506  c3x5->Clear();
14508  c3x5->Divide(4, 4);
14509  c3x5->cd(1);
14510  int kcountHBnegativedirectionReconoise3 = 1;
14511  TH1F* h2CeffHBnegativedirectionReconoise3 = new TH1F("h2CeffHBnegativedirectionReconoise3", "", nphi, 0., 72.);
14512  for (int jeta = 0; jeta < njeta; jeta++) {
14513  // negativedirectionReconoise:
14514  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14515  // for (int i=0;i<ndepth;i++) {
14516  // depth=3
14517  for (int i = 2; i < 3; i++) {
14518  TH1F* HBnegativedirectionReconoise3 = (TH1F*)h2CeffHBnegativedirectionReconoise3->Clone("twod1");
14519  float ccctest = 0; // to avoid empty massive elements
14520  for (int jphi = 0; jphi < nphi; jphi++) {
14521  double ccc1 = areconoiseHB[i][jeta][jphi];
14522  if (ccc1 != 0.) {
14523  HBnegativedirectionReconoise3->Fill(jphi, ccc1);
14524  ccctest = 1.; //HBnegativedirectionReconoise3->SetBinError(i,0.01);
14525  }
14526  } // for jphi
14527  if (ccctest > 0.) {
14528  //cout<<"666 kcountHBnegativedirectionReconoise3 = "<<kcountHBnegativedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
14529  c3x5->cd(kcountHBnegativedirectionReconoise3);
14530  HBnegativedirectionReconoise3->SetMarkerStyle(20);
14531  HBnegativedirectionReconoise3->SetMarkerSize(0.4);
14532  HBnegativedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
14533  HBnegativedirectionReconoise3->SetXTitle("HBnegativedirectionReconoise3 \b");
14534  HBnegativedirectionReconoise3->SetMarkerColor(2);
14535  HBnegativedirectionReconoise3->SetLineColor(0);
14536  gPad->SetGridy();
14537  gPad->SetGridx();
14538  // gPad->SetLogy();
14539  if (kcountHBnegativedirectionReconoise3 == 1)
14540  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -16; depth = 3 \b");
14541  if (kcountHBnegativedirectionReconoise3 == 2)
14542  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -15; depth = 3 \b");
14543  if (kcountHBnegativedirectionReconoise3 == 3)
14544  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -14; depth = 3 \b");
14545  if (kcountHBnegativedirectionReconoise3 == 4)
14546  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -13; depth = 3 \b");
14547  if (kcountHBnegativedirectionReconoise3 == 5)
14548  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -12; depth = 3 \b");
14549  if (kcountHBnegativedirectionReconoise3 == 6)
14550  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -11; depth = 3 \b");
14551  if (kcountHBnegativedirectionReconoise3 == 7)
14552  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -10; depth = 3 \b");
14553  if (kcountHBnegativedirectionReconoise3 == 8)
14554  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -9; depth = 3 \b");
14555  if (kcountHBnegativedirectionReconoise3 == 9)
14556  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -8; depth = 3 \b");
14557  if (kcountHBnegativedirectionReconoise3 == 10)
14558  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -7; depth = 3 \b");
14559  if (kcountHBnegativedirectionReconoise3 == 11)
14560  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -6; depth = 3 \b");
14561  if (kcountHBnegativedirectionReconoise3 == 12)
14562  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -5; depth = 3 \b");
14563  if (kcountHBnegativedirectionReconoise3 == 13)
14564  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -4; depth = 3 \b");
14565  if (kcountHBnegativedirectionReconoise3 == 14)
14566  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -3; depth = 3 \b");
14567  if (kcountHBnegativedirectionReconoise3 == 15)
14568  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -2; depth = 3 \b");
14569  if (kcountHBnegativedirectionReconoise3 == 16)
14570  HBnegativedirectionReconoise3->SetXTitle("R for HB- jeta = -1; depth = 3 \b");
14571 
14572  HBnegativedirectionReconoise3->Draw("Error");
14573  kcountHBnegativedirectionReconoise3++;
14574  if (kcountHBnegativedirectionReconoise3 > 16)
14575  break; // 4x6 = 24
14576  } //ccctest>0
14577 
14578  } // for i
14579  } //if(jeta-41 < 0 )
14580  } //for jeta
14582  c3x5->Update();
14583  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
14584  c3x5->Clear();
14585  // clean-up
14586  if (h2CeffHBnegativedirectionReconoise3)
14587  delete h2CeffHBnegativedirectionReconoise3;
14588  //========================================================================================== 1117
14589  //======================================================================
14590  //======================================================================1D plot: R vs phi , different eta, depth=4
14591  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
14592  c3x5->Clear();
14594  c3x5->Divide(4, 4);
14595  c3x5->cd(1);
14596  int kcountHBnegativedirectionReconoise4 = 1;
14597  TH1F* h2CeffHBnegativedirectionReconoise4 = new TH1F("h2CeffHBnegativedirectionReconoise4", "", nphi, 0., 72.);
14598 
14599  for (int jeta = 0; jeta < njeta; jeta++) {
14600  // negativedirectionReconoise:
14601  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
14602  // for (int i=0;i<ndepth;i++) {
14603  // depth=4
14604  for (int i = 3; i < 4; i++) {
14605  TH1F* HBnegativedirectionReconoise4 = (TH1F*)h2CeffHBnegativedirectionReconoise4->Clone("twod1");
14606 
14607  float ccctest = 0; // to avoid empty massive elements
14608  for (int jphi = 0; jphi < nphi; jphi++) {
14609  double ccc1 = areconoiseHB[i][jeta][jphi];
14610  if (ccc1 != 0.) {
14611  HBnegativedirectionReconoise4->Fill(jphi, ccc1);
14612  ccctest = 1.; //HBnegativedirectionReconoise4->SetBinError(i,0.01);
14613  }
14614  } // for jphi
14615  if (ccctest > 0.) {
14616  //cout<<"777 kcountHBnegativedirectionReconoise4 = "<<kcountHBnegativedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
14617  c3x5->cd(kcountHBnegativedirectionReconoise4);
14618  HBnegativedirectionReconoise4->SetMarkerStyle(20);
14619  HBnegativedirectionReconoise4->SetMarkerSize(0.4);
14620  HBnegativedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
14621  HBnegativedirectionReconoise4->SetXTitle("HBnegativedirectionReconoise4 \b");
14622  HBnegativedirectionReconoise4->SetMarkerColor(2);
14623  HBnegativedirectionReconoise4->SetLineColor(0);
14624  gPad->SetGridy();
14625  gPad->SetGridx();
14626  // gPad->SetLogy();
14627  if (kcountHBnegativedirectionReconoise4 == 1)
14628  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -16; depth = 4 \b");
14629  if (kcountHBnegativedirectionReconoise4 == 2)
14630  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -15; depth = 4 \b");
14631  if (kcountHBnegativedirectionReconoise4 == 3)
14632  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -14; depth = 4 \b");
14633  if (kcountHBnegativedirectionReconoise4 == 4)
14634  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -13; depth = 4 \b");
14635  if (kcountHBnegativedirectionReconoise4 == 5)
14636  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -12; depth = 4 \b");
14637  if (kcountHBnegativedirectionReconoise4 == 6)
14638  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -11; depth = 4 \b");
14639  if (kcountHBnegativedirectionReconoise4 == 7)
14640  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -10; depth = 4 \b");
14641  if (kcountHBnegativedirectionReconoise4 == 8)
14642  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -9; depth = 4 \b");
14643  if (kcountHBnegativedirectionReconoise4 == 9)
14644  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -8; depth = 4 \b");
14645  if (kcountHBnegativedirectionReconoise4 == 10)
14646  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -7; depth = 4 \b");
14647  if (kcountHBnegativedirectionReconoise4 == 11)
14648  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -6; depth = 4 \b");
14649  if (kcountHBnegativedirectionReconoise4 == 12)
14650  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -5; depth = 4 \b");
14651  if (kcountHBnegativedirectionReconoise4 == 13)
14652  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -4; depth = 4 \b");
14653  if (kcountHBnegativedirectionReconoise4 == 14)
14654  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -3; depth = 4 \b");
14655  if (kcountHBnegativedirectionReconoise4 == 15)
14656  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -2; depth = 4 \b");
14657  if (kcountHBnegativedirectionReconoise4 == 16)
14658  HBnegativedirectionReconoise4->SetXTitle("R for HB- jeta = -1; depth = 4 \b");
14659  HBnegativedirectionReconoise4->Draw("Error");
14660  kcountHBnegativedirectionReconoise4++;
14661  if (kcountHBnegativedirectionReconoise4 > 16)
14662  break; // 4x6 = 24
14663  } //ccctest>0
14664 
14665  } // for i
14666  } //if(jeta-41 < 0 )
14667  } //for jeta
14669  c3x5->Update();
14670  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
14671  c3x5->Clear();
14672  // clean-up
14673  if (h2CeffHBnegativedirectionReconoise4)
14674  delete h2CeffHBnegativedirectionReconoise4;
14675 
14676  //======================================================================================================================
14677  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HE
14678  //======================================================================================================================
14679  //======================================================================
14680  //cout<<" R2D-eta/phi-plot: DIF, averaged over depthfs *****" <<endl;
14681  c2x1->Clear();
14683  c2x1->Divide(2, 1);
14684  c2x1->cd(1);
14685  TH2F* GefzDIFreconoiseHB42D = new TH2F("GefzDIFreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
14686  TH2F* GefzDIFreconoiseHB42D0 = new TH2F("GefzDIFreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
14687  TH2F* GefzDIFreconoiseHB42DF = (TH2F*)GefzDIFreconoiseHB42D0->Clone("GefzDIFreconoiseHB42DF");
14688  for (int i = 0; i < ndepth; i++) {
14689  for (int jeta = 0; jeta < neta; jeta++) {
14690  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
14691  for (int jphi = 0; jphi < nphi; jphi++) {
14692  double ccc1 = breconoiseHB[i][jeta][jphi];
14693  int k2plot = jeta - 41;
14694  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
14695  if (ccc1 != 0.) {
14696  GefzDIFreconoiseHB42D->Fill(kkk, jphi, ccc1);
14697  GefzDIFreconoiseHB42D0->Fill(kkk, jphi, 1.);
14698  }
14699  }
14700  }
14701  }
14702  }
14703  GefzDIFreconoiseHB42DF->Divide(GefzDIFreconoiseHB42D, GefzDIFreconoiseHB42D0, 1, 1, "B"); // average A
14704  gPad->SetGridy();
14705  gPad->SetGridx(); // gPad->SetLogz();
14706  GefzDIFreconoiseHB42DF->SetXTitle("<DIF>_depth #eta \b");
14707  GefzDIFreconoiseHB42DF->SetYTitle(" #phi \b");
14708  GefzDIFreconoiseHB42DF->Draw("COLZ");
14709 
14710  // c2x1->cd(2);
14711  // TH1F *energyhitNoise_HB= (TH1F*)dir->FindObjectAny("h_energyhitNoise_HB");
14712  // 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");
14713 
14715  c2x1->Update();
14716  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHB.png");
14717  c2x1->Clear();
14718  // clean-up
14719  if (GefzDIFreconoiseHB42D)
14720  delete GefzDIFreconoiseHB42D;
14721  if (GefzDIFreconoiseHB42D0)
14722  delete GefzDIFreconoiseHB42D0;
14723  if (GefzDIFreconoiseHB42DF)
14724  delete GefzDIFreconoiseHB42DF;
14725  //====================================================================== 1D plot: DIF vs phi , averaged over depthfs & eta
14726  //======================================================================
14727  //cout<<" 1D plot: DIF vs phi , averaged over depthfs & eta *****" <<endl;
14728  c1x1->Clear();
14730  c1x1->Divide(1, 1);
14731  c1x1->cd(1);
14732  TH1F* GefzDIFreconoiseHB41D = new TH1F("GefzDIFreconoiseHB41D", "", nphi, 0., 72.);
14733  TH1F* GefzDIFreconoiseHB41D0 = new TH1F("GefzDIFreconoiseHB41D0", "", nphi, 0., 72.);
14734  TH1F* GefzDIFreconoiseHB41DF = (TH1F*)GefzDIFreconoiseHB41D0->Clone("GefzDIFreconoiseHB41DF");
14735  for (int jphi = 0; jphi < nphi; jphi++) {
14736  for (int jeta = 0; jeta < neta; jeta++) {
14737  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
14738  for (int i = 0; i < ndepth; i++) {
14739  double ccc1 = breconoiseHB[i][jeta][jphi];
14740  if (ccc1 != 0.) {
14741  GefzDIFreconoiseHB41D->Fill(jphi, ccc1);
14742  GefzDIFreconoiseHB41D0->Fill(jphi, 1.);
14743  }
14744  }
14745  }
14746  }
14747  }
14748  GefzDIFreconoiseHB41DF->Divide(
14749  GefzDIFreconoiseHB41D, GefzDIFreconoiseHB41D0, 1, 1, "B"); // DIF averaged over depthfs & eta
14750  GefzDIFreconoiseHB41D0->Sumw2();
14751  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHB41DF->SetBinError(jphi,0.01);}
14752  gPad->SetGridy();
14753  gPad->SetGridx(); // gPad->SetLogz();
14754  GefzDIFreconoiseHB41DF->SetMarkerStyle(20);
14755  GefzDIFreconoiseHB41DF->SetMarkerSize(1.4);
14756  GefzDIFreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
14757  GefzDIFreconoiseHB41DF->SetXTitle("#phi \b");
14758  GefzDIFreconoiseHB41DF->SetYTitle(" <DIF> \b");
14759  GefzDIFreconoiseHB41DF->SetZTitle("<DIF>_PHI - AllDepthfs \b");
14760  GefzDIFreconoiseHB41DF->SetMarkerColor(4);
14761  GefzDIFreconoiseHB41DF->SetLineColor(
14762  4); //GefzDIFreconoiseHB41DF->SetMinimum(0.8); // GefzDIFreconoiseHB41DF->SetMaximum(1.000);
14763  GefzDIFreconoiseHB41DF->Draw("Error");
14765  c1x1->Update();
14766  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHB.png");
14767  c1x1->Clear();
14768  // clean-up
14769  if (GefzDIFreconoiseHB41D)
14770  delete GefzDIFreconoiseHB41D;
14771  if (GefzDIFreconoiseHB41D0)
14772  delete GefzDIFreconoiseHB41D0;
14773  if (GefzDIFreconoiseHB41DF)
14774  delete GefzDIFreconoiseHB41DF;
14775  //========================================================================================== 4
14776  //======================================================================
14777  //======================================================================1D plot: DIF vs phi , different eta, depth=1
14778  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
14779  c3x5->Clear();
14781  c3x5->Divide(4, 4);
14782  c3x5->cd(1);
14783  int kcountHBpositivedirectionReconoiseDIF1 = 1;
14784  TH1F* h2CeffHBpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
14785  for (int jeta = 0; jeta < njeta; jeta++) {
14786  // positivedirectionReconoiseDIF:
14787  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14788  // for (int i=0;i<ndepth;i++) {
14789  // depth=1
14790  for (int i = 0; i < 1; i++) {
14791  TH1F* HBpositivedirectionReconoiseDIF1 = (TH1F*)h2CeffHBpositivedirectionReconoiseDIF1->Clone("twod1");
14792  float ccctest = 0; // to avoid empty massive elements
14793  for (int jphi = 0; jphi < nphi; jphi++) {
14794  double ccc1 = breconoiseHB[i][jeta][jphi];
14795  if (ccc1 != 0.) {
14796  HBpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
14797  ccctest = 1.; //HBpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
14798  }
14799  } // for jphi
14800  if (ccctest > 0.) {
14801  // cout<<"444 kcountHBpositivedirectionReconoiseDIF1 = "<<kcountHBpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
14802  c3x5->cd(kcountHBpositivedirectionReconoiseDIF1);
14803  HBpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
14804  HBpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
14805  HBpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
14806  HBpositivedirectionReconoiseDIF1->SetXTitle("HBpositivedirectionReconoiseDIF1 \b");
14807  HBpositivedirectionReconoiseDIF1->SetMarkerColor(2);
14808  HBpositivedirectionReconoiseDIF1->SetLineColor(0);
14809  gPad->SetGridy();
14810  gPad->SetGridx();
14811  // gPad->SetLogy();
14812  if (kcountHBpositivedirectionReconoiseDIF1 == 1)
14813  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 0; depth = 1 \b");
14814  if (kcountHBpositivedirectionReconoiseDIF1 == 2)
14815  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 1; depth = 1 \b");
14816  if (kcountHBpositivedirectionReconoiseDIF1 == 3)
14817  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 2; depth = 1 \b");
14818  if (kcountHBpositivedirectionReconoiseDIF1 == 4)
14819  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 3; depth = 1 \b");
14820  if (kcountHBpositivedirectionReconoiseDIF1 == 5)
14821  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 4; depth = 1 \b");
14822  if (kcountHBpositivedirectionReconoiseDIF1 == 6)
14823  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 5; depth = 1 \b");
14824  if (kcountHBpositivedirectionReconoiseDIF1 == 7)
14825  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 6; depth = 1 \b");
14826  if (kcountHBpositivedirectionReconoiseDIF1 == 8)
14827  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 7; depth = 1 \b");
14828  if (kcountHBpositivedirectionReconoiseDIF1 == 9)
14829  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 8; depth = 1 \b");
14830  if (kcountHBpositivedirectionReconoiseDIF1 == 10)
14831  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 9; depth = 1 \b");
14832  if (kcountHBpositivedirectionReconoiseDIF1 == 11)
14833  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 10; depth = 1 \b");
14834  if (kcountHBpositivedirectionReconoiseDIF1 == 12)
14835  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 11; depth = 1 \b");
14836  if (kcountHBpositivedirectionReconoiseDIF1 == 13)
14837  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 12; depth = 1 \b");
14838  if (kcountHBpositivedirectionReconoiseDIF1 == 14)
14839  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 13; depth = 1 \b");
14840  if (kcountHBpositivedirectionReconoiseDIF1 == 15)
14841  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 14; depth = 1 \b");
14842  if (kcountHBpositivedirectionReconoiseDIF1 == 16)
14843  HBpositivedirectionReconoiseDIF1->SetXTitle("DIF for HB+ jeta = 15; depth = 1 \b");
14844  HBpositivedirectionReconoiseDIF1->Draw("Error");
14845  kcountHBpositivedirectionReconoiseDIF1++;
14846  if (kcountHBpositivedirectionReconoiseDIF1 > 16)
14847  break; //
14848  } //ccctest>0
14849 
14850  } // for i
14851  } //if(jeta-41 >= 0)
14852  } //for jeta
14854  c3x5->Update();
14855  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
14856  c3x5->Clear();
14857  // clean-up
14858  if (h2CeffHBpositivedirectionReconoiseDIF1)
14859  delete h2CeffHBpositivedirectionReconoiseDIF1;
14860 
14861  //========================================================================================== 5
14862  //======================================================================
14863  //======================================================================1D plot: R vs phi , different eta, depth=2
14864  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
14865  c3x5->Clear();
14867  c3x5->Divide(4, 4);
14868  c3x5->cd(1);
14869  int kcountHBpositivedirectionReconoiseDIF2 = 1;
14870  TH1F* h2CeffHBpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
14871  for (int jeta = 0; jeta < njeta; jeta++) {
14872  // positivedirectionReconoiseDIF:
14873  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14874  // for (int i=0;i<ndepth;i++) {
14875  // depth=2
14876  for (int i = 1; i < 2; i++) {
14877  TH1F* HBpositivedirectionReconoiseDIF2 = (TH1F*)h2CeffHBpositivedirectionReconoiseDIF2->Clone("twod1");
14878  float ccctest = 0; // to avoid empty massive elements
14879  for (int jphi = 0; jphi < nphi; jphi++) {
14880  double ccc1 = breconoiseHB[i][jeta][jphi];
14881  if (ccc1 != 0.) {
14882  HBpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
14883  ccctest = 1.; //HBpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
14884  }
14885  } // for jphi
14886  if (ccctest > 0.) {
14887  //cout<<"555 kcountHBpositivedirectionReconoiseDIF2 = "<<kcountHBpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
14888  c3x5->cd(kcountHBpositivedirectionReconoiseDIF2);
14889  HBpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
14890  HBpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
14891  HBpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
14892  HBpositivedirectionReconoiseDIF2->SetXTitle("HBpositivedirectionReconoiseDIF2 \b");
14893  HBpositivedirectionReconoiseDIF2->SetMarkerColor(2);
14894  HBpositivedirectionReconoiseDIF2->SetLineColor(0);
14895  gPad->SetGridy();
14896  gPad->SetGridx();
14897  // gPad->SetLogy();
14898  if (kcountHBpositivedirectionReconoiseDIF2 == 1)
14899  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 0; depth = 2 \b");
14900  if (kcountHBpositivedirectionReconoiseDIF2 == 2)
14901  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 1; depth = 2 \b");
14902  if (kcountHBpositivedirectionReconoiseDIF2 == 3)
14903  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 2; depth = 2 \b");
14904  if (kcountHBpositivedirectionReconoiseDIF2 == 4)
14905  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 3; depth = 2 \b");
14906  if (kcountHBpositivedirectionReconoiseDIF2 == 5)
14907  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 4; depth = 2 \b");
14908  if (kcountHBpositivedirectionReconoiseDIF2 == 6)
14909  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 5; depth = 2 \b");
14910  if (kcountHBpositivedirectionReconoiseDIF2 == 7)
14911  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 6; depth = 2 \b");
14912  if (kcountHBpositivedirectionReconoiseDIF2 == 8)
14913  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 7; depth = 2 \b");
14914  if (kcountHBpositivedirectionReconoiseDIF2 == 9)
14915  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 8; depth = 2 \b");
14916  if (kcountHBpositivedirectionReconoiseDIF2 == 10)
14917  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 9; depth = 2 \b");
14918  if (kcountHBpositivedirectionReconoiseDIF2 == 11)
14919  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 10; depth = 2 \b");
14920  if (kcountHBpositivedirectionReconoiseDIF2 == 12)
14921  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 11; depth = 2 \b");
14922  if (kcountHBpositivedirectionReconoiseDIF2 == 13)
14923  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 12; depth = 2 \b");
14924  if (kcountHBpositivedirectionReconoiseDIF2 == 14)
14925  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 13; depth = 2 \b");
14926  if (kcountHBpositivedirectionReconoiseDIF2 == 15)
14927  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 14; depth = 2 \b");
14928  if (kcountHBpositivedirectionReconoiseDIF2 == 16)
14929  HBpositivedirectionReconoiseDIF2->SetXTitle("DIF for HB+ jeta = 15; depth = 2 \b");
14930  HBpositivedirectionReconoiseDIF2->Draw("Error");
14931  kcountHBpositivedirectionReconoiseDIF2++;
14932  if (kcountHBpositivedirectionReconoiseDIF2 > 16)
14933  break; // 4x6 = 24
14934  } //ccctest>0
14935 
14936  } // for i
14937  } //if(jeta-41 >= 0)
14938  } //for jeta
14940  c3x5->Update();
14941  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
14942  c3x5->Clear();
14943  // clean-up
14944  if (h2CeffHBpositivedirectionReconoiseDIF2)
14945  delete h2CeffHBpositivedirectionReconoiseDIF2;
14946  //========================================================================================== 6
14947  //======================================================================
14948  //======================================================================1D plot: R vs phi , different eta, depth=3
14949  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
14950  c3x5->Clear();
14952  c3x5->Divide(4, 4);
14953  c3x5->cd(1);
14954  int kcountHBpositivedirectionReconoiseDIF3 = 1;
14955  TH1F* h2CeffHBpositivedirectionReconoiseDIF3 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF3", "", nphi, 0., 72.);
14956  for (int jeta = 0; jeta < njeta; jeta++) {
14957  // positivedirectionReconoiseDIF:
14958  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
14959  // for (int i=0;i<ndepth;i++) {
14960  // depth=3
14961  for (int i = 2; i < 3; i++) {
14962  TH1F* HBpositivedirectionReconoiseDIF3 = (TH1F*)h2CeffHBpositivedirectionReconoiseDIF3->Clone("twod1");
14963  float ccctest = 0; // to avoid empty massive elements
14964  for (int jphi = 0; jphi < nphi; jphi++) {
14965  double ccc1 = breconoiseHB[i][jeta][jphi];
14966  if (ccc1 != 0.) {
14967  HBpositivedirectionReconoiseDIF3->Fill(jphi, ccc1);
14968  ccctest = 1.; //HBpositivedirectionReconoiseDIF3->SetBinError(i,0.01);
14969  }
14970  } // for jphi
14971  if (ccctest > 0.) {
14972  //cout<<"666 kcountHBpositivedirectionReconoiseDIF3 = "<<kcountHBpositivedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
14973  c3x5->cd(kcountHBpositivedirectionReconoiseDIF3);
14974  HBpositivedirectionReconoiseDIF3->SetMarkerStyle(20);
14975  HBpositivedirectionReconoiseDIF3->SetMarkerSize(0.4);
14976  HBpositivedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
14977  HBpositivedirectionReconoiseDIF3->SetXTitle("HBpositivedirectionReconoiseDIF3 \b");
14978  HBpositivedirectionReconoiseDIF3->SetMarkerColor(2);
14979  HBpositivedirectionReconoiseDIF3->SetLineColor(0);
14980  gPad->SetGridy();
14981  gPad->SetGridx();
14982  // gPad->SetLogy();
14983  if (kcountHBpositivedirectionReconoiseDIF3 == 1)
14984  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 0; depth = 3 \b");
14985  if (kcountHBpositivedirectionReconoiseDIF3 == 2)
14986  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 1; depth = 3 \b");
14987  if (kcountHBpositivedirectionReconoiseDIF3 == 3)
14988  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 2; depth = 3 \b");
14989  if (kcountHBpositivedirectionReconoiseDIF3 == 4)
14990  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 3; depth = 3 \b");
14991  if (kcountHBpositivedirectionReconoiseDIF3 == 5)
14992  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 4; depth = 3 \b");
14993  if (kcountHBpositivedirectionReconoiseDIF3 == 6)
14994  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 5; depth = 3 \b");
14995  if (kcountHBpositivedirectionReconoiseDIF3 == 7)
14996  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 6; depth = 3 \b");
14997  if (kcountHBpositivedirectionReconoiseDIF3 == 8)
14998  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 7; depth = 3 \b");
14999  if (kcountHBpositivedirectionReconoiseDIF3 == 9)
15000  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 8; depth = 3 \b");
15001  if (kcountHBpositivedirectionReconoiseDIF3 == 10)
15002  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 9; depth = 3 \b");
15003  if (kcountHBpositivedirectionReconoiseDIF3 == 11)
15004  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 0; depth = 3 \b");
15005  if (kcountHBpositivedirectionReconoiseDIF3 == 12)
15006  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 11; depth = 3 \b");
15007  if (kcountHBpositivedirectionReconoiseDIF3 == 13)
15008  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 12; depth = 3 \b");
15009  if (kcountHBpositivedirectionReconoiseDIF3 == 14)
15010  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 13; depth = 3 \b");
15011  if (kcountHBpositivedirectionReconoiseDIF3 == 15)
15012  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 14; depth = 3 \b");
15013  if (kcountHBpositivedirectionReconoiseDIF3 == 16)
15014  HBpositivedirectionReconoiseDIF3->SetXTitle("DIF for HB+ jeta = 15; depth = 3 \b");
15015  HBpositivedirectionReconoiseDIF3->Draw("Error");
15016  kcountHBpositivedirectionReconoiseDIF3++;
15017  if (kcountHBpositivedirectionReconoiseDIF3 > 16)
15018  break; // 4x6 = 24
15019  } //ccctest>0
15020 
15021  } // for i
15022  } //if(jeta-41 >= 0)
15023  } //for jeta
15025  c3x5->Update();
15026  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
15027  c3x5->Clear();
15028  // clean-up
15029  if (h2CeffHBpositivedirectionReconoiseDIF3)
15030  delete h2CeffHBpositivedirectionReconoiseDIF3;
15031  //========================================================================================== 7
15032  //======================================================================
15033  //======================================================================1D plot: R vs phi , different eta, depth=4
15034  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
15035  c3x5->Clear();
15037  c3x5->Divide(4, 4);
15038  c3x5->cd(1);
15039  int kcountHBpositivedirectionReconoiseDIF4 = 1;
15040  TH1F* h2CeffHBpositivedirectionReconoiseDIF4 = new TH1F("h2CeffHBpositivedirectionReconoiseDIF4", "", nphi, 0., 72.);
15041 
15042  for (int jeta = 0; jeta < njeta; jeta++) {
15043  // positivedirectionReconoiseDIF:
15044  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15045  // for (int i=0;i<ndepth;i++) {
15046  // depth=4
15047  for (int i = 3; i < 4; i++) {
15048  TH1F* HBpositivedirectionReconoiseDIF4 = (TH1F*)h2CeffHBpositivedirectionReconoiseDIF4->Clone("twod1");
15049 
15050  float ccctest = 0; // to avoid empty massive elements
15051  for (int jphi = 0; jphi < nphi; jphi++) {
15052  double ccc1 = breconoiseHB[i][jeta][jphi];
15053  if (ccc1 != 0.) {
15054  HBpositivedirectionReconoiseDIF4->Fill(jphi, ccc1);
15055  ccctest = 1.; //HBpositivedirectionReconoiseDIF4->SetBinError(i,0.01);
15056  }
15057  } // for jphi
15058  if (ccctest > 0.) {
15059  //cout<<"777 kcountHBpositivedirectionReconoiseDIF4 = "<<kcountHBpositivedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
15060  c3x5->cd(kcountHBpositivedirectionReconoiseDIF4);
15061  HBpositivedirectionReconoiseDIF4->SetMarkerStyle(20);
15062  HBpositivedirectionReconoiseDIF4->SetMarkerSize(0.4);
15063  HBpositivedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
15064  HBpositivedirectionReconoiseDIF4->SetXTitle("HBpositivedirectionReconoiseDIF4 \b");
15065  HBpositivedirectionReconoiseDIF4->SetMarkerColor(2);
15066  HBpositivedirectionReconoiseDIF4->SetLineColor(0);
15067  gPad->SetGridy();
15068  gPad->SetGridx();
15069  // gPad->SetLogy();
15070  if (kcountHBpositivedirectionReconoiseDIF4 == 1)
15071  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 0; depth = 4 \b");
15072  if (kcountHBpositivedirectionReconoiseDIF4 == 2)
15073  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 1; depth = 4 \b");
15074  if (kcountHBpositivedirectionReconoiseDIF4 == 3)
15075  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 2; depth = 4 \b");
15076  if (kcountHBpositivedirectionReconoiseDIF4 == 4)
15077  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 3; depth = 4 \b");
15078  if (kcountHBpositivedirectionReconoiseDIF4 == 5)
15079  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 4; depth = 4 \b");
15080  if (kcountHBpositivedirectionReconoiseDIF4 == 6)
15081  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 5; depth = 4 \b");
15082  if (kcountHBpositivedirectionReconoiseDIF4 == 7)
15083  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 6; depth = 4 \b");
15084  if (kcountHBpositivedirectionReconoiseDIF4 == 8)
15085  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 7; depth = 4 \b");
15086  if (kcountHBpositivedirectionReconoiseDIF4 == 9)
15087  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 8; depth = 4 \b");
15088  if (kcountHBpositivedirectionReconoiseDIF4 == 10)
15089  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 9; depth = 4 \b");
15090  if (kcountHBpositivedirectionReconoiseDIF4 == 11)
15091  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 10; depth = 4 \b");
15092  if (kcountHBpositivedirectionReconoiseDIF4 == 12)
15093  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 11; depth = 4 \b");
15094  if (kcountHBpositivedirectionReconoiseDIF4 == 13)
15095  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 12; depth = 4 \b");
15096  if (kcountHBpositivedirectionReconoiseDIF4 == 14)
15097  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 13; depth = 4 \b");
15098  if (kcountHBpositivedirectionReconoiseDIF4 == 15)
15099  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 14; depth = 4 \b");
15100  if (kcountHBpositivedirectionReconoiseDIF4 == 16)
15101  HBpositivedirectionReconoiseDIF4->SetXTitle("DIF for HB+ jeta = 15; depth = 4 \b");
15102  HBpositivedirectionReconoiseDIF4->Draw("Error");
15103  kcountHBpositivedirectionReconoiseDIF4++;
15104  if (kcountHBpositivedirectionReconoiseDIF4 > 16)
15105  break; // 4x6 = 24
15106  } //ccctest>0
15107 
15108  } // for i
15109  } //if(jeta-41 >= 0)
15110  } //for jeta
15112  c3x5->Update();
15113  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
15114  c3x5->Clear();
15115  // clean-up
15116  if (h2CeffHBpositivedirectionReconoiseDIF4)
15117  delete h2CeffHBpositivedirectionReconoiseDIF4;
15118 
15119  //========================================================================================== 1114
15120  //======================================================================
15121  //======================================================================1D plot: R vs phi , different eta, depth=1
15122  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
15123  c3x5->Clear();
15125  c3x5->Divide(4, 4);
15126  c3x5->cd(1);
15127  int kcountHBnegativedirectionReconoiseDIF1 = 1;
15128  TH1F* h2CeffHBnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
15129  for (int jeta = 0; jeta < njeta; jeta++) {
15130  // negativedirectionReconoiseDIF:
15131  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15132  // for (int i=0;i<ndepth;i++) {
15133  // depth=1
15134  for (int i = 0; i < 1; i++) {
15135  TH1F* HBnegativedirectionReconoiseDIF1 = (TH1F*)h2CeffHBnegativedirectionReconoiseDIF1->Clone("twod1");
15136  float ccctest = 0; // to avoid empty massive elements
15137  for (int jphi = 0; jphi < nphi; jphi++) {
15138  double ccc1 = breconoiseHB[i][jeta][jphi];
15139  if (ccc1 != 0.) {
15140  HBnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
15141  ccctest = 1.; //HBnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
15142  }
15143  } // for jphi
15144  if (ccctest > 0.) {
15145  // cout<<"444 kcountHBnegativedirectionReconoiseDIF1 = "<<kcountHBnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
15146  c3x5->cd(kcountHBnegativedirectionReconoiseDIF1);
15147  HBnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
15148  HBnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
15149  HBnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
15150  HBnegativedirectionReconoiseDIF1->SetXTitle("HBnegativedirectionReconoiseDIF1 \b");
15151  HBnegativedirectionReconoiseDIF1->SetMarkerColor(2);
15152  HBnegativedirectionReconoiseDIF1->SetLineColor(0);
15153  gPad->SetGridy();
15154  gPad->SetGridx();
15155  // gPad->SetLogy();
15156  if (kcountHBnegativedirectionReconoiseDIF1 == 1)
15157  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -16; depth = 1 \b");
15158  if (kcountHBnegativedirectionReconoiseDIF1 == 2)
15159  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -15; depth = 1 \b");
15160  if (kcountHBnegativedirectionReconoiseDIF1 == 3)
15161  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -14; depth = 1 \b");
15162  if (kcountHBnegativedirectionReconoiseDIF1 == 4)
15163  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -13; depth = 1 \b");
15164  if (kcountHBnegativedirectionReconoiseDIF1 == 5)
15165  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -12; depth = 1 \b");
15166  if (kcountHBnegativedirectionReconoiseDIF1 == 6)
15167  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -11; depth = 1 \b");
15168  if (kcountHBnegativedirectionReconoiseDIF1 == 7)
15169  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -10; depth = 1 \b");
15170  if (kcountHBnegativedirectionReconoiseDIF1 == 8)
15171  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -9; depth = 1 \b");
15172  if (kcountHBnegativedirectionReconoiseDIF1 == 9)
15173  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -8; depth = 1 \b");
15174  if (kcountHBnegativedirectionReconoiseDIF1 == 10)
15175  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -7; depth = 1 \b");
15176  if (kcountHBnegativedirectionReconoiseDIF1 == 11)
15177  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -6; depth = 1 \b");
15178  if (kcountHBnegativedirectionReconoiseDIF1 == 12)
15179  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -5; depth = 1 \b");
15180  if (kcountHBnegativedirectionReconoiseDIF1 == 13)
15181  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -4; depth = 1 \b");
15182  if (kcountHBnegativedirectionReconoiseDIF1 == 14)
15183  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -3; depth = 1 \b");
15184  if (kcountHBnegativedirectionReconoiseDIF1 == 15)
15185  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -2; depth = 1 \b");
15186  if (kcountHBnegativedirectionReconoiseDIF1 == 16)
15187  HBnegativedirectionReconoiseDIF1->SetXTitle("DIF for HB- jeta = -1; depth = 1 \b");
15188  HBnegativedirectionReconoiseDIF1->Draw("Error");
15189  kcountHBnegativedirectionReconoiseDIF1++;
15190  if (kcountHBnegativedirectionReconoiseDIF1 > 16)
15191  break; //
15192  } //ccctest>0
15193 
15194  } // for i
15195  } //if(jeta-41 < 0 )
15196  } //for jeta
15198  c3x5->Update();
15199  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
15200  c3x5->Clear();
15201  // clean-up
15202  if (h2CeffHBnegativedirectionReconoiseDIF1)
15203  delete h2CeffHBnegativedirectionReconoiseDIF1;
15204 
15205  //========================================================================================== 1115
15206  //======================================================================
15207  //======================================================================1D plot: R vs phi , different eta, depth=2
15208  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
15209  c3x5->Clear();
15211  c3x5->Divide(4, 4);
15212  c3x5->cd(1);
15213  int kcountHBnegativedirectionReconoiseDIF2 = 1;
15214  TH1F* h2CeffHBnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
15215  for (int jeta = 0; jeta < njeta; jeta++) {
15216  // negativedirectionReconoiseDIF:
15217  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15218  // for (int i=0;i<ndepth;i++) {
15219  // depth=2
15220  for (int i = 1; i < 2; i++) {
15221  TH1F* HBnegativedirectionReconoiseDIF2 = (TH1F*)h2CeffHBnegativedirectionReconoiseDIF2->Clone("twod1");
15222  float ccctest = 0; // to avoid empty massive elements
15223  for (int jphi = 0; jphi < nphi; jphi++) {
15224  double ccc1 = breconoiseHB[i][jeta][jphi];
15225  if (ccc1 != 0.) {
15226  HBnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
15227  ccctest = 1.; //HBnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
15228  }
15229  } // for jphi
15230  if (ccctest > 0.) {
15231  //cout<<"555 kcountHBnegativedirectionReconoiseDIF2 = "<<kcountHBnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
15232  c3x5->cd(kcountHBnegativedirectionReconoiseDIF2);
15233  HBnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
15234  HBnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
15235  HBnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
15236  HBnegativedirectionReconoiseDIF2->SetXTitle("HBnegativedirectionReconoiseDIF2 \b");
15237  HBnegativedirectionReconoiseDIF2->SetMarkerColor(2);
15238  HBnegativedirectionReconoiseDIF2->SetLineColor(0);
15239  gPad->SetGridy();
15240  gPad->SetGridx();
15241  // gPad->SetLogy();
15242  if (kcountHBnegativedirectionReconoiseDIF2 == 1)
15243  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -16; depth = 2 \b");
15244  if (kcountHBnegativedirectionReconoiseDIF2 == 2)
15245  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -15; depth = 2 \b");
15246  if (kcountHBnegativedirectionReconoiseDIF2 == 3)
15247  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -14; depth = 2 \b");
15248  if (kcountHBnegativedirectionReconoiseDIF2 == 4)
15249  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -13; depth = 2 \b");
15250  if (kcountHBnegativedirectionReconoiseDIF2 == 5)
15251  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -12; depth = 2 \b");
15252  if (kcountHBnegativedirectionReconoiseDIF2 == 6)
15253  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -11; depth = 2 \b");
15254  if (kcountHBnegativedirectionReconoiseDIF2 == 7)
15255  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -10; depth = 2 \b");
15256  if (kcountHBnegativedirectionReconoiseDIF2 == 8)
15257  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -9; depth = 2 \b");
15258  if (kcountHBnegativedirectionReconoiseDIF2 == 9)
15259  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -8; depth = 2 \b");
15260  if (kcountHBnegativedirectionReconoiseDIF2 == 10)
15261  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -7; depth = 2 \b");
15262  if (kcountHBnegativedirectionReconoiseDIF2 == 11)
15263  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -6; depth = 2 \b");
15264  if (kcountHBnegativedirectionReconoiseDIF2 == 12)
15265  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -5; depth = 2 \b");
15266  if (kcountHBnegativedirectionReconoiseDIF2 == 13)
15267  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -4; depth = 2 \b");
15268  if (kcountHBnegativedirectionReconoiseDIF2 == 14)
15269  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -3; depth = 2 \b");
15270  if (kcountHBnegativedirectionReconoiseDIF2 == 15)
15271  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -2; depth = 2 \b");
15272  if (kcountHBnegativedirectionReconoiseDIF2 == 16)
15273  HBnegativedirectionReconoiseDIF2->SetXTitle("DIF for HB- jeta = -1; depth = 2 \b");
15274  HBnegativedirectionReconoiseDIF2->Draw("Error");
15275  kcountHBnegativedirectionReconoiseDIF2++;
15276  if (kcountHBnegativedirectionReconoiseDIF2 > 16)
15277  break; // 4x6 = 24
15278  } //ccctest>0
15279 
15280  } // for i
15281  } //if(jeta-41 < 0 )
15282  } //for jeta
15284  c3x5->Update();
15285  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
15286  c3x5->Clear();
15287  // clean-up
15288  if (h2CeffHBnegativedirectionReconoiseDIF2)
15289  delete h2CeffHBnegativedirectionReconoiseDIF2;
15290  //========================================================================================== 1116
15291  //======================================================================
15292  //======================================================================1D plot: R vs phi , different eta, depth=3
15293  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
15294  c3x5->Clear();
15296  c3x5->Divide(4, 4);
15297  c3x5->cd(1);
15298  int kcountHBnegativedirectionReconoiseDIF3 = 1;
15299  TH1F* h2CeffHBnegativedirectionReconoiseDIF3 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF3", "", nphi, 0., 72.);
15300  for (int jeta = 0; jeta < njeta; jeta++) {
15301  // negativedirectionReconoiseDIF:
15302  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15303  // for (int i=0;i<ndepth;i++) {
15304  // depth=3
15305  for (int i = 2; i < 3; i++) {
15306  TH1F* HBnegativedirectionReconoiseDIF3 = (TH1F*)h2CeffHBnegativedirectionReconoiseDIF3->Clone("twod1");
15307  float ccctest = 0; // to avoid empty massive elements
15308  for (int jphi = 0; jphi < nphi; jphi++) {
15309  double ccc1 = breconoiseHB[i][jeta][jphi];
15310  if (ccc1 != 0.) {
15311  HBnegativedirectionReconoiseDIF3->Fill(jphi, ccc1);
15312  ccctest = 1.; //HBnegativedirectionReconoiseDIF3->SetBinError(i,0.01);
15313  }
15314  } // for jphi
15315  if (ccctest > 0.) {
15316  //cout<<"666 kcountHBnegativedirectionReconoiseDIF3 = "<<kcountHBnegativedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
15317  c3x5->cd(kcountHBnegativedirectionReconoiseDIF3);
15318  HBnegativedirectionReconoiseDIF3->SetMarkerStyle(20);
15319  HBnegativedirectionReconoiseDIF3->SetMarkerSize(0.4);
15320  HBnegativedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
15321  HBnegativedirectionReconoiseDIF3->SetXTitle("HBnegativedirectionReconoiseDIF3 \b");
15322  HBnegativedirectionReconoiseDIF3->SetMarkerColor(2);
15323  HBnegativedirectionReconoiseDIF3->SetLineColor(0);
15324  gPad->SetGridy();
15325  gPad->SetGridx();
15326  // gPad->SetLogy();
15327  if (kcountHBnegativedirectionReconoiseDIF3 == 1)
15328  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -16; depth = 3 \b");
15329  if (kcountHBnegativedirectionReconoiseDIF3 == 2)
15330  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -15; depth = 3 \b");
15331  if (kcountHBnegativedirectionReconoiseDIF3 == 3)
15332  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -14; depth = 3 \b");
15333  if (kcountHBnegativedirectionReconoiseDIF3 == 4)
15334  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -13; depth = 3 \b");
15335  if (kcountHBnegativedirectionReconoiseDIF3 == 5)
15336  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -12; depth = 3 \b");
15337  if (kcountHBnegativedirectionReconoiseDIF3 == 6)
15338  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -11; depth = 3 \b");
15339  if (kcountHBnegativedirectionReconoiseDIF3 == 7)
15340  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -10; depth = 3 \b");
15341  if (kcountHBnegativedirectionReconoiseDIF3 == 8)
15342  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -9; depth = 3 \b");
15343  if (kcountHBnegativedirectionReconoiseDIF3 == 9)
15344  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -8; depth = 3 \b");
15345  if (kcountHBnegativedirectionReconoiseDIF3 == 10)
15346  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -7; depth = 3 \b");
15347  if (kcountHBnegativedirectionReconoiseDIF3 == 11)
15348  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -6; depth = 3 \b");
15349  if (kcountHBnegativedirectionReconoiseDIF3 == 12)
15350  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -5; depth = 3 \b");
15351  if (kcountHBnegativedirectionReconoiseDIF3 == 13)
15352  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -4; depth = 3 \b");
15353  if (kcountHBnegativedirectionReconoiseDIF3 == 14)
15354  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -3; depth = 3 \b");
15355  if (kcountHBnegativedirectionReconoiseDIF3 == 15)
15356  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -2; depth = 3 \b");
15357  if (kcountHBnegativedirectionReconoiseDIF3 == 16)
15358  HBnegativedirectionReconoiseDIF3->SetXTitle("DIF for HB- jeta = -1; depth = 3 \b");
15359 
15360  HBnegativedirectionReconoiseDIF3->Draw("Error");
15361  kcountHBnegativedirectionReconoiseDIF3++;
15362  if (kcountHBnegativedirectionReconoiseDIF3 > 16)
15363  break; // 4x6 = 24
15364  } //ccctest>0
15365 
15366  } // for i
15367  } //if(jeta-41 < 0 )
15368  } //for jeta
15370  c3x5->Update();
15371  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
15372  c3x5->Clear();
15373  // clean-up
15374  if (h2CeffHBnegativedirectionReconoiseDIF3)
15375  delete h2CeffHBnegativedirectionReconoiseDIF3;
15376  //========================================================================================== 1117
15377  //======================================================================
15378  //======================================================================1D plot: R vs phi , different eta, depth=4
15379  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
15380  c3x5->Clear();
15382  c3x5->Divide(4, 4);
15383  c3x5->cd(1);
15384  int kcountHBnegativedirectionReconoiseDIF4 = 1;
15385  TH1F* h2CeffHBnegativedirectionReconoiseDIF4 = new TH1F("h2CeffHBnegativedirectionReconoiseDIF4", "", nphi, 0., 72.);
15386 
15387  for (int jeta = 0; jeta < njeta; jeta++) {
15388  // negativedirectionReconoiseDIF:
15389  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
15390  // for (int i=0;i<ndepth;i++) {
15391  // depth=4
15392  for (int i = 3; i < 4; i++) {
15393  TH1F* HBnegativedirectionReconoiseDIF4 = (TH1F*)h2CeffHBnegativedirectionReconoiseDIF4->Clone("twod1");
15394 
15395  float ccctest = 0; // to avoid empty massive elements
15396  for (int jphi = 0; jphi < nphi; jphi++) {
15397  double ccc1 = breconoiseHB[i][jeta][jphi];
15398  if (ccc1 != 0.) {
15399  HBnegativedirectionReconoiseDIF4->Fill(jphi, ccc1);
15400  ccctest = 1.; //HBnegativedirectionReconoiseDIF4->SetBinError(i,0.01);
15401  }
15402  } // for jphi
15403  if (ccctest > 0.) {
15404  //cout<<"777 kcountHBnegativedirectionReconoiseDIF4 = "<<kcountHBnegativedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
15405  c3x5->cd(kcountHBnegativedirectionReconoiseDIF4);
15406  HBnegativedirectionReconoiseDIF4->SetMarkerStyle(20);
15407  HBnegativedirectionReconoiseDIF4->SetMarkerSize(0.4);
15408  HBnegativedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
15409  HBnegativedirectionReconoiseDIF4->SetXTitle("HBnegativedirectionReconoiseDIF4 \b");
15410  HBnegativedirectionReconoiseDIF4->SetMarkerColor(2);
15411  HBnegativedirectionReconoiseDIF4->SetLineColor(0);
15412  gPad->SetGridy();
15413  gPad->SetGridx();
15414  // gPad->SetLogy();
15415  if (kcountHBnegativedirectionReconoiseDIF4 == 1)
15416  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -16; depth = 4 \b");
15417  if (kcountHBnegativedirectionReconoiseDIF4 == 2)
15418  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -15; depth = 4 \b");
15419  if (kcountHBnegativedirectionReconoiseDIF4 == 3)
15420  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -14; depth = 4 \b");
15421  if (kcountHBnegativedirectionReconoiseDIF4 == 4)
15422  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -13; depth = 4 \b");
15423  if (kcountHBnegativedirectionReconoiseDIF4 == 5)
15424  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -12; depth = 4 \b");
15425  if (kcountHBnegativedirectionReconoiseDIF4 == 6)
15426  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -11; depth = 4 \b");
15427  if (kcountHBnegativedirectionReconoiseDIF4 == 7)
15428  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -10; depth = 4 \b");
15429  if (kcountHBnegativedirectionReconoiseDIF4 == 8)
15430  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -9; depth = 4 \b");
15431  if (kcountHBnegativedirectionReconoiseDIF4 == 9)
15432  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -8; depth = 4 \b");
15433  if (kcountHBnegativedirectionReconoiseDIF4 == 10)
15434  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -7; depth = 4 \b");
15435  if (kcountHBnegativedirectionReconoiseDIF4 == 11)
15436  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -6; depth = 4 \b");
15437  if (kcountHBnegativedirectionReconoiseDIF4 == 12)
15438  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -5; depth = 4 \b");
15439  if (kcountHBnegativedirectionReconoiseDIF4 == 13)
15440  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -4; depth = 4 \b");
15441  if (kcountHBnegativedirectionReconoiseDIF4 == 14)
15442  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -3; depth = 4 \b");
15443  if (kcountHBnegativedirectionReconoiseDIF4 == 15)
15444  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -2; depth = 4 \b");
15445  if (kcountHBnegativedirectionReconoiseDIF4 == 16)
15446  HBnegativedirectionReconoiseDIF4->SetXTitle("DIF for HB- jeta = -1; depth = 4 \b");
15447  HBnegativedirectionReconoiseDIF4->Draw("Error");
15448  kcountHBnegativedirectionReconoiseDIF4++;
15449  if (kcountHBnegativedirectionReconoiseDIF4 > 16)
15450  break; // 4x6 = 24
15451  } //ccctest>0
15452 
15453  } // for i
15454  } //if(jeta-41 < 0 )
15455  } //for jeta
15457  c3x5->Update();
15458  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
15459  c3x5->Clear();
15460  // clean-up
15461  if (h2CeffHBnegativedirectionReconoiseDIF4)
15462  delete h2CeffHBnegativedirectionReconoiseDIF4;
15463 
15464  //======================================================================================================================
15465  //======================================================================================================================
15466  //======================================================================================================================
15467  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
15468 
15469  //cout<<" Start Vaiance: preparation *****" <<endl;
15470  TH2F* reconoiseVariance1HB1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HB1");
15471  TH2F* reconoiseVariance0HB1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB1");
15472  TH2F* reconoiseVarianceHB1 = (TH2F*)reconoiseVariance1HB1->Clone("reconoiseVarianceHB1");
15473  reconoiseVarianceHB1->Divide(reconoiseVariance1HB1, reconoiseVariance0HB1, 1, 1, "B");
15474  TH2F* reconoiseVariance1HB2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HB2");
15475  TH2F* reconoiseVariance0HB2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB2");
15476  TH2F* reconoiseVarianceHB2 = (TH2F*)reconoiseVariance1HB2->Clone("reconoiseVarianceHB2");
15477  reconoiseVarianceHB2->Divide(reconoiseVariance1HB2, reconoiseVariance0HB2, 1, 1, "B");
15478  TH2F* reconoiseVariance1HB3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HB3");
15479  TH2F* reconoiseVariance0HB3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB3");
15480  TH2F* reconoiseVarianceHB3 = (TH2F*)reconoiseVariance1HB3->Clone("reconoiseVarianceHB3");
15481  reconoiseVarianceHB3->Divide(reconoiseVariance1HB3, reconoiseVariance0HB3, 1, 1, "B");
15482  TH2F* reconoiseVariance1HB4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HB4");
15483  TH2F* reconoiseVariance0HB4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HB4");
15484  TH2F* reconoiseVarianceHB4 = (TH2F*)reconoiseVariance1HB4->Clone("reconoiseVarianceHB4");
15485  reconoiseVarianceHB4->Divide(reconoiseVariance1HB4, reconoiseVariance0HB4, 1, 1, "B");
15486  //cout<<" Vaiance: preparation DONE *****" <<endl;
15487  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevarianceHB
15488  // = sum(R*R)/N - (sum(R)/N)**2
15489  for (int jeta = 0; jeta < njeta; jeta++) {
15490  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
15491  //preparation for PHI normalization:
15492  double sumreconoiseHB0 = 0;
15493  int nsumreconoiseHB0 = 0;
15494  double sumreconoiseHB1 = 0;
15495  int nsumreconoiseHB1 = 0;
15496  double sumreconoiseHB2 = 0;
15497  int nsumreconoiseHB2 = 0;
15498  double sumreconoiseHB3 = 0;
15499  int nsumreconoiseHB3 = 0;
15500  for (int jphi = 0; jphi < njphi; jphi++) {
15501  reconoisevarianceHB[0][jeta][jphi] = reconoiseVarianceHB1->GetBinContent(jeta + 1, jphi + 1);
15502  reconoisevarianceHB[1][jeta][jphi] = reconoiseVarianceHB2->GetBinContent(jeta + 1, jphi + 1);
15503  reconoisevarianceHB[2][jeta][jphi] = reconoiseVarianceHB3->GetBinContent(jeta + 1, jphi + 1);
15504  reconoisevarianceHB[3][jeta][jphi] = reconoiseVarianceHB4->GetBinContent(jeta + 1, jphi + 1);
15505  if (reconoisevarianceHB[0][jeta][jphi] != 0.) {
15506  sumreconoiseHB0 += reconoisevarianceHB[0][jeta][jphi];
15507  ++nsumreconoiseHB0;
15508  }
15509  if (reconoisevarianceHB[1][jeta][jphi] != 0.) {
15510  sumreconoiseHB1 += reconoisevarianceHB[1][jeta][jphi];
15511  ++nsumreconoiseHB1;
15512  }
15513  if (reconoisevarianceHB[2][jeta][jphi] != 0.) {
15514  sumreconoiseHB2 += reconoisevarianceHB[2][jeta][jphi];
15515  ++nsumreconoiseHB2;
15516  }
15517  if (reconoisevarianceHB[3][jeta][jphi] != 0.) {
15518  sumreconoiseHB3 += reconoisevarianceHB[3][jeta][jphi];
15519  ++nsumreconoiseHB3;
15520  }
15521  } // phi
15522  // PHI normalization :
15523  for (int jphi = 0; jphi < njphi; jphi++) {
15524  if (sumreconoiseHB0 != 0.)
15525  reconoisevarianceHB[0][jeta][jphi] /= (sumreconoiseHB0 / nsumreconoiseHB0);
15526  if (sumreconoiseHB1 != 0.)
15527  reconoisevarianceHB[1][jeta][jphi] /= (sumreconoiseHB1 / nsumreconoiseHB1);
15528  if (sumreconoiseHB2 != 0.)
15529  reconoisevarianceHB[2][jeta][jphi] /= (sumreconoiseHB2 / nsumreconoiseHB2);
15530  if (sumreconoiseHB3 != 0.)
15531  reconoisevarianceHB[3][jeta][jphi] /= (sumreconoiseHB3 / nsumreconoiseHB3);
15532  } // phi
15533  // reconoisevarianceHB (D) = sum(R*R)/N - (sum(R)/N)**2
15534  for (int jphi = 0; jphi < njphi; jphi++) {
15535  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
15536  reconoisevarianceHB[0][jeta][jphi] -= areconoiseHB[0][jeta][jphi] * areconoiseHB[0][jeta][jphi];
15537  reconoisevarianceHB[0][jeta][jphi] = fabs(reconoisevarianceHB[0][jeta][jphi]);
15538  reconoisevarianceHB[1][jeta][jphi] -= areconoiseHB[1][jeta][jphi] * areconoiseHB[1][jeta][jphi];
15539  reconoisevarianceHB[1][jeta][jphi] = fabs(reconoisevarianceHB[1][jeta][jphi]);
15540  reconoisevarianceHB[2][jeta][jphi] -= areconoiseHB[2][jeta][jphi] * areconoiseHB[2][jeta][jphi];
15541  reconoisevarianceHB[2][jeta][jphi] = fabs(reconoisevarianceHB[2][jeta][jphi]);
15542  reconoisevarianceHB[3][jeta][jphi] -= areconoiseHB[3][jeta][jphi] * areconoiseHB[3][jeta][jphi];
15543  reconoisevarianceHB[3][jeta][jphi] = fabs(reconoisevarianceHB[3][jeta][jphi]);
15544  }
15545  }
15546  }
15547  //cout<<" Vaiance: DONE*****" <<endl;
15548  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
15549  //======================================================================
15550  //======================================================================
15551  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
15552  c1x1->Clear();
15554  c1x0->Divide(1, 1);
15555  c1x0->cd(1);
15556  TH2F* DefzDreconoiseHB42D = new TH2F("DefzDreconoiseHB42D", "", neta, -41., 41., nphi, 0., 72.);
15557  TH2F* DefzDreconoiseHB42D0 = new TH2F("DefzDreconoiseHB42D0", "", neta, -41., 41., nphi, 0., 72.);
15558  TH2F* DefzDreconoiseHB42DF = (TH2F*)DefzDreconoiseHB42D0->Clone("DefzDreconoiseHB42DF");
15559  for (int i = 0; i < ndepth; i++) {
15560  for (int jeta = 0; jeta < neta; jeta++) {
15561  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
15562  for (int jphi = 0; jphi < nphi; jphi++) {
15563  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15564  int k2plot = jeta - 41;
15565  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
15566  if (areconoiseHB[i][jeta][jphi] > 0.) {
15567  DefzDreconoiseHB42D->Fill(kkk, jphi, ccc1);
15568  DefzDreconoiseHB42D0->Fill(kkk, jphi, 1.);
15569  }
15570  }
15571  }
15572  }
15573  }
15574  DefzDreconoiseHB42DF->Divide(DefzDreconoiseHB42D, DefzDreconoiseHB42D0, 1, 1, "B"); // average A
15575  // DefzDreconoiseHB1->Sumw2();
15576  gPad->SetGridy();
15577  gPad->SetGridx(); // gPad->SetLogz();
15578  DefzDreconoiseHB42DF->SetMarkerStyle(20);
15579  DefzDreconoiseHB42DF->SetMarkerSize(0.4);
15580  DefzDreconoiseHB42DF->GetZaxis()->SetLabelSize(0.08);
15581  DefzDreconoiseHB42DF->SetXTitle("<D>_depth #eta \b");
15582  DefzDreconoiseHB42DF->SetYTitle(" #phi \b");
15583  DefzDreconoiseHB42DF->SetZTitle("<D>_depth \b");
15584  DefzDreconoiseHB42DF->SetMarkerColor(2);
15585  DefzDreconoiseHB42DF->SetLineColor(
15586  0); // DefzDreconoiseHB42DF->SetMaximum(1.000); // DefzDreconoiseHB42DF->SetMinimum(1.0);
15587  DefzDreconoiseHB42DF->Draw("COLZ");
15589  c1x0->Update();
15590  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHB.png");
15591  c1x0->Clear();
15592  // clean-up
15593  if (DefzDreconoiseHB42D)
15594  delete DefzDreconoiseHB42D;
15595  if (DefzDreconoiseHB42D0)
15596  delete DefzDreconoiseHB42D0;
15597  if (DefzDreconoiseHB42DF)
15598  delete DefzDreconoiseHB42DF;
15599  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
15600  //======================================================================
15601  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
15602  c1x1->Clear();
15604  c1x1->Divide(1, 1);
15605  c1x1->cd(1);
15606  TH1F* DefzDreconoiseHB41D = new TH1F("DefzDreconoiseHB41D", "", nphi, 0., 72.);
15607  TH1F* DefzDreconoiseHB41D0 = new TH1F("DefzDreconoiseHB41D0", "", nphi, 0., 72.);
15608  TH1F* DefzDreconoiseHB41DF = (TH1F*)DefzDreconoiseHB41D0->Clone("DefzDreconoiseHB41DF");
15609 
15610  for (int jphi = 0; jphi < nphi; jphi++) {
15611  for (int jeta = 0; jeta < neta; jeta++) {
15612  if ((jeta - 41 >= -16 && jeta - 41 <= -1) || (jeta - 41 >= 0 && jeta - 41 <= 15)) {
15613  for (int i = 0; i < ndepth; i++) {
15614  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15615  if (areconoiseHB[i][jeta][jphi] > 0.) {
15616  DefzDreconoiseHB41D->Fill(jphi, ccc1);
15617  DefzDreconoiseHB41D0->Fill(jphi, 1.);
15618  }
15619  }
15620  }
15621  }
15622  }
15623  // DefzDreconoiseHB41D->Sumw2();DefzDreconoiseHB41D0->Sumw2();
15624 
15625  DefzDreconoiseHB41DF->Divide(DefzDreconoiseHB41D, DefzDreconoiseHB41D0, 1, 1, "B"); // R averaged over depthfs & eta
15626  DefzDreconoiseHB41D0->Sumw2();
15627  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHB41DF->SetBinError(jphi,0.01);}
15628  gPad->SetGridy();
15629  gPad->SetGridx(); // gPad->SetLogz();
15630  DefzDreconoiseHB41DF->SetMarkerStyle(20);
15631  DefzDreconoiseHB41DF->SetMarkerSize(1.4);
15632  DefzDreconoiseHB41DF->GetZaxis()->SetLabelSize(0.08);
15633  DefzDreconoiseHB41DF->SetXTitle("#phi \b");
15634  DefzDreconoiseHB41DF->SetYTitle(" <D> \b");
15635  DefzDreconoiseHB41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
15636  DefzDreconoiseHB41DF->SetMarkerColor(4);
15637  DefzDreconoiseHB41DF->SetLineColor(
15638  4); //DefzDreconoiseHB41DF->SetMinimum(0.8); DefzDreconoiseHB41DF->SetMinimum(-0.015);
15639  DefzDreconoiseHB41DF->Draw("Error");
15641  c1x1->Update();
15642  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHB.png");
15643  c1x1->Clear();
15644  // clean-up
15645  if (DefzDreconoiseHB41D)
15646  delete DefzDreconoiseHB41D;
15647  if (DefzDreconoiseHB41D0)
15648  delete DefzDreconoiseHB41D0;
15649  if (DefzDreconoiseHB41DF)
15650  delete DefzDreconoiseHB41DF;
15651 
15652  //========================================================================================== 14
15653  //======================================================================
15654  //======================================================================1D plot: D vs phi , different eta, depth=1
15655  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
15656  c3x5->Clear();
15658  c3x5->Divide(4, 4);
15659  c3x5->cd(1);
15660  int kcountHBpositivedirectionReconoiseD1 = 1;
15661  TH1F* h2CeffHBpositivedirectionReconoiseD1 = new TH1F("h2CeffHBpositivedirectionReconoiseD1", "", nphi, 0., 72.);
15662 
15663  for (int jeta = 0; jeta < njeta; jeta++) {
15664  // positivedirectionReconoiseD:
15665  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15666  // for (int i=0;i<ndepth;i++) {
15667  // depth=1
15668  for (int i = 0; i < 1; i++) {
15669  TH1F* HBpositivedirectionReconoiseD1 = (TH1F*)h2CeffHBpositivedirectionReconoiseD1->Clone("twod1");
15670 
15671  float ccctest = 0; // to avoid empty massive elements
15672  for (int jphi = 0; jphi < nphi; jphi++) {
15673  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15674  if (areconoiseHB[i][jeta][jphi] > 0.) {
15675  HBpositivedirectionReconoiseD1->Fill(jphi, ccc1);
15676  ccctest = 1.; //HBpositivedirectionReconoiseD1->SetBinError(i,0.01);
15677  }
15678  } // for jphi
15679  if (ccctest > 0.) {
15680  //cout<<"1414 kcountHBpositivedirectionReconoiseD1 = "<<kcountHBpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
15681  c3x5->cd(kcountHBpositivedirectionReconoiseD1);
15682  HBpositivedirectionReconoiseD1->SetMarkerStyle(20);
15683  HBpositivedirectionReconoiseD1->SetMarkerSize(0.4);
15684  HBpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
15685  HBpositivedirectionReconoiseD1->SetXTitle("HBpositivedirectionReconoiseD1 \b");
15686  HBpositivedirectionReconoiseD1->SetMarkerColor(2);
15687  HBpositivedirectionReconoiseD1->SetLineColor(0);
15688  gPad->SetGridy();
15689  gPad->SetGridx();
15690  // gPad->SetLogy();
15691  if (kcountHBpositivedirectionReconoiseD1 == 1)
15692  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 0; depth = 1 \b");
15693  if (kcountHBpositivedirectionReconoiseD1 == 2)
15694  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 1; depth = 1 \b");
15695  if (kcountHBpositivedirectionReconoiseD1 == 3)
15696  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 2; depth = 1 \b");
15697  if (kcountHBpositivedirectionReconoiseD1 == 4)
15698  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 3; depth = 1 \b");
15699  if (kcountHBpositivedirectionReconoiseD1 == 5)
15700  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 4; depth = 1 \b");
15701  if (kcountHBpositivedirectionReconoiseD1 == 6)
15702  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 5; depth = 1 \b");
15703  if (kcountHBpositivedirectionReconoiseD1 == 7)
15704  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 6; depth = 1 \b");
15705  if (kcountHBpositivedirectionReconoiseD1 == 8)
15706  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 7; depth = 1 \b");
15707  if (kcountHBpositivedirectionReconoiseD1 == 9)
15708  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 8; depth = 1 \b");
15709  if (kcountHBpositivedirectionReconoiseD1 == 10)
15710  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 9; depth = 1 \b");
15711  if (kcountHBpositivedirectionReconoiseD1 == 11)
15712  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 10; depth = 1 \b");
15713  if (kcountHBpositivedirectionReconoiseD1 == 12)
15714  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 11; depth = 1 \b");
15715  if (kcountHBpositivedirectionReconoiseD1 == 13)
15716  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 12; depth = 1 \b");
15717  if (kcountHBpositivedirectionReconoiseD1 == 14)
15718  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 13; depth = 1 \b");
15719  if (kcountHBpositivedirectionReconoiseD1 == 15)
15720  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 14; depth = 1 \b");
15721  if (kcountHBpositivedirectionReconoiseD1 == 16)
15722  HBpositivedirectionReconoiseD1->SetXTitle("D for HB+ jeta = 15; depth = 1 \b");
15723  HBpositivedirectionReconoiseD1->Draw("Error");
15724  kcountHBpositivedirectionReconoiseD1++;
15725  if (kcountHBpositivedirectionReconoiseD1 > 16)
15726  break; // 4x6 = 24
15727  } //ccctest>0
15728 
15729  } // for i
15730  } //if(jeta-41 >= 0)
15731  } //for jeta
15733  c3x5->Update();
15734  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png");
15735  c3x5->Clear();
15736  // clean-up
15737  if (h2CeffHBpositivedirectionReconoiseD1)
15738  delete h2CeffHBpositivedirectionReconoiseD1;
15739  //========================================================================================== 15
15740  //======================================================================
15741  //======================================================================1D plot: D vs phi , different eta, depth=2
15742  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
15743  c3x5->Clear();
15744  c3x5->Divide(4, 4);
15745  c3x5->cd(1);
15746  int kcountHBpositivedirectionReconoiseD2 = 1;
15747  TH1F* h2CeffHBpositivedirectionReconoiseD2 = new TH1F("h2CeffHBpositivedirectionReconoiseD2", "", nphi, 0., 72.);
15748 
15749  for (int jeta = 0; jeta < njeta; jeta++) {
15750  // positivedirectionReconoiseD:
15751  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15752  // for (int i=0;i<ndepth;i++) {
15753  // depth=2
15754  for (int i = 1; i < 2; i++) {
15755  TH1F* HBpositivedirectionReconoiseD2 = (TH1F*)h2CeffHBpositivedirectionReconoiseD2->Clone("twod1");
15756 
15757  float ccctest = 0; // to avoid empty massive elements
15758  for (int jphi = 0; jphi < nphi; jphi++) {
15759  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15760  if (areconoiseHB[i][jeta][jphi] > 0.) {
15761  HBpositivedirectionReconoiseD2->Fill(jphi, ccc1);
15762  ccctest = 1.; //HBpositivedirectionReconoiseD2->SetBinError(i,0.01);
15763  }
15764  } // for jphi
15765  if (ccctest > 0.) {
15766  //cout<<"1515 kcountHBpositivedirectionReconoiseD2 = "<<kcountHBpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
15767  c3x5->cd(kcountHBpositivedirectionReconoiseD2);
15768  HBpositivedirectionReconoiseD2->SetMarkerStyle(20);
15769  HBpositivedirectionReconoiseD2->SetMarkerSize(0.4);
15770  HBpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
15771  HBpositivedirectionReconoiseD2->SetXTitle("HBpositivedirectionReconoiseD2 \b");
15772  HBpositivedirectionReconoiseD2->SetMarkerColor(2);
15773  HBpositivedirectionReconoiseD2->SetLineColor(0);
15774  gPad->SetGridy();
15775  gPad->SetGridx();
15776  // gPad->SetLogy();
15777  if (kcountHBpositivedirectionReconoiseD2 == 1)
15778  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 0; depth = 2 \b");
15779  if (kcountHBpositivedirectionReconoiseD2 == 2)
15780  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 1; depth = 2 \b");
15781  if (kcountHBpositivedirectionReconoiseD2 == 3)
15782  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 2; depth = 2 \b");
15783  if (kcountHBpositivedirectionReconoiseD2 == 4)
15784  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 3; depth = 2 \b");
15785  if (kcountHBpositivedirectionReconoiseD2 == 5)
15786  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 4; depth = 2 \b");
15787  if (kcountHBpositivedirectionReconoiseD2 == 6)
15788  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 5; depth = 2 \b");
15789  if (kcountHBpositivedirectionReconoiseD2 == 7)
15790  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 6; depth = 2 \b");
15791  if (kcountHBpositivedirectionReconoiseD2 == 8)
15792  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 7; depth = 2 \b");
15793  if (kcountHBpositivedirectionReconoiseD2 == 9)
15794  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 8; depth = 2 \b");
15795  if (kcountHBpositivedirectionReconoiseD2 == 10)
15796  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 9; depth = 2 \b");
15797  if (kcountHBpositivedirectionReconoiseD2 == 11)
15798  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 10; depth = 2 \b");
15799  if (kcountHBpositivedirectionReconoiseD2 == 12)
15800  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 11; depth = 2 \b");
15801  if (kcountHBpositivedirectionReconoiseD2 == 13)
15802  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 12; depth = 2 \b");
15803  if (kcountHBpositivedirectionReconoiseD2 == 14)
15804  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 13; depth = 2 \b");
15805  if (kcountHBpositivedirectionReconoiseD2 == 15)
15806  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 14; depth = 2 \b");
15807  if (kcountHBpositivedirectionReconoiseD2 == 16)
15808  HBpositivedirectionReconoiseD2->SetXTitle("D for HB+ jeta = 15; depth = 2 \b");
15809  HBpositivedirectionReconoiseD2->Draw("Error");
15810  kcountHBpositivedirectionReconoiseD2++;
15811  if (kcountHBpositivedirectionReconoiseD2 > 16)
15812  break; // 4x6 = 24
15813  } //ccctest>0
15814 
15815  } // for i
15816  } //if(jeta-41 >= 0)
15817  } //for jeta
15819  c3x5->Update();
15820  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png");
15821  c3x5->Clear();
15822  // clean-up
15823  if (h2CeffHBpositivedirectionReconoiseD2)
15824  delete h2CeffHBpositivedirectionReconoiseD2;
15825  //========================================================================================== 16
15826  //======================================================================
15827  //======================================================================1D plot: D vs phi , different eta, depth=3
15828  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
15829  c3x5->Clear();
15830  c3x5->Divide(4, 4);
15831  c3x5->cd(1);
15832  int kcountHBpositivedirectionReconoiseD3 = 1;
15833  TH1F* h2CeffHBpositivedirectionReconoiseD3 = new TH1F("h2CeffHBpositivedirectionReconoiseD3", "", nphi, 0., 72.);
15834 
15835  for (int jeta = 0; jeta < njeta; jeta++) {
15836  // positivedirectionReconoiseD:
15837  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15838  // for (int i=0;i<ndepth;i++) {
15839  // depth=3
15840  for (int i = 2; i < 3; i++) {
15841  TH1F* HBpositivedirectionReconoiseD3 = (TH1F*)h2CeffHBpositivedirectionReconoiseD3->Clone("twod1");
15842 
15843  float ccctest = 0; // to avoid empty massive elements
15844  for (int jphi = 0; jphi < nphi; jphi++) {
15845  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15846  if (areconoiseHB[i][jeta][jphi] > 0.) {
15847  HBpositivedirectionReconoiseD3->Fill(jphi, ccc1);
15848  ccctest = 1.; //HBpositivedirectionReconoiseD3->SetBinError(i,0.01);
15849  }
15850  } // for jphi
15851  if (ccctest > 0.) {
15852  //cout<<"1616 kcountHBpositivedirectionReconoiseD3 = "<<kcountHBpositivedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
15853  c3x5->cd(kcountHBpositivedirectionReconoiseD3);
15854  HBpositivedirectionReconoiseD3->SetMarkerStyle(20);
15855  HBpositivedirectionReconoiseD3->SetMarkerSize(0.4);
15856  HBpositivedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
15857  HBpositivedirectionReconoiseD3->SetXTitle("HBpositivedirectionReconoiseD3 \b");
15858  HBpositivedirectionReconoiseD3->SetMarkerColor(2);
15859  HBpositivedirectionReconoiseD3->SetLineColor(0);
15860  gPad->SetGridy();
15861  gPad->SetGridx();
15862  // gPad->SetLogy();
15863  if (kcountHBpositivedirectionReconoiseD3 == 1)
15864  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 0; depth = 3 \b");
15865  if (kcountHBpositivedirectionReconoiseD3 == 2)
15866  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 1; depth = 3 \b");
15867  if (kcountHBpositivedirectionReconoiseD3 == 3)
15868  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 2; depth = 3 \b");
15869  if (kcountHBpositivedirectionReconoiseD3 == 4)
15870  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 3; depth = 3 \b");
15871  if (kcountHBpositivedirectionReconoiseD3 == 5)
15872  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 4; depth = 3 \b");
15873  if (kcountHBpositivedirectionReconoiseD3 == 6)
15874  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 5; depth = 3 \b");
15875  if (kcountHBpositivedirectionReconoiseD3 == 7)
15876  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 6; depth = 3 \b");
15877  if (kcountHBpositivedirectionReconoiseD3 == 8)
15878  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 7; depth = 3 \b");
15879  if (kcountHBpositivedirectionReconoiseD3 == 9)
15880  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 8; depth = 3 \b");
15881  if (kcountHBpositivedirectionReconoiseD3 == 10)
15882  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 9; depth = 3 \b");
15883  if (kcountHBpositivedirectionReconoiseD3 == 11)
15884  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 10; depth = 3 \b");
15885  if (kcountHBpositivedirectionReconoiseD3 == 12)
15886  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 11; depth = 3 \b");
15887  if (kcountHBpositivedirectionReconoiseD3 == 13)
15888  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 12; depth = 3 \b");
15889  if (kcountHBpositivedirectionReconoiseD3 == 14)
15890  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 13; depth = 3 \b");
15891  if (kcountHBpositivedirectionReconoiseD3 == 15)
15892  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 14; depth = 3 \b");
15893  if (kcountHBpositivedirectionReconoiseD3 == 16)
15894  HBpositivedirectionReconoiseD3->SetXTitle("D for HB+ jeta = 15; depth = 3 \b");
15895  HBpositivedirectionReconoiseD3->Draw("Error");
15896  kcountHBpositivedirectionReconoiseD3++;
15897  if (kcountHBpositivedirectionReconoiseD3 > 16)
15898  break; // 4x6 = 24
15899  } //ccctest>0
15900 
15901  } // for i
15902  } //if(jeta-41 >= 0)
15903  } //for jeta
15905  c3x5->Update();
15906  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png");
15907  c3x5->Clear();
15908  // clean-up
15909  if (h2CeffHBpositivedirectionReconoiseD3)
15910  delete h2CeffHBpositivedirectionReconoiseD3;
15911  //========================================================================================== 17
15912  //======================================================================
15913  //======================================================================1D plot: D vs phi , different eta, depth=4
15914  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
15915  c3x5->Clear();
15916  c3x5->Divide(4, 4);
15917  c3x5->cd(1);
15918  int kcountHBpositivedirectionReconoiseD4 = 1;
15919  TH1F* h2CeffHBpositivedirectionReconoiseD4 = new TH1F("h2CeffHBpositivedirectionReconoiseD4", "", nphi, 0., 72.);
15920 
15921  for (int jeta = 0; jeta < njeta; jeta++) {
15922  // positivedirectionReconoiseD:
15923  if (jeta - 41 >= 0 && jeta - 41 <= 15) {
15924  // for (int i=0;i<ndepth;i++) {
15925  // depth=4
15926  for (int i = 3; i < 4; i++) {
15927  TH1F* HBpositivedirectionReconoiseD4 = (TH1F*)h2CeffHBpositivedirectionReconoiseD4->Clone("twod1");
15928 
15929  float ccctest = 0; // to avoid empty massive elements
15930  for (int jphi = 0; jphi < nphi; jphi++) {
15931  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
15932  if (areconoiseHB[i][jeta][jphi] > 0.) {
15933  HBpositivedirectionReconoiseD4->Fill(jphi, ccc1);
15934  ccctest = 1.; //HBpositivedirectionReconoiseD4->SetBinError(i,0.01);
15935  }
15936  } // for jphi
15937  if (ccctest > 0.) {
15938  //cout<<"1717 kcountHBpositivedirectionReconoiseD4 = "<<kcountHBpositivedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
15939  c3x5->cd(kcountHBpositivedirectionReconoiseD4);
15940  HBpositivedirectionReconoiseD4->SetMarkerStyle(20);
15941  HBpositivedirectionReconoiseD4->SetMarkerSize(0.4);
15942  HBpositivedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
15943  HBpositivedirectionReconoiseD4->SetXTitle("HBpositivedirectionReconoiseD4 \b");
15944  HBpositivedirectionReconoiseD4->SetMarkerColor(2);
15945  HBpositivedirectionReconoiseD4->SetLineColor(0);
15946  gPad->SetGridy();
15947  gPad->SetGridx();
15948  // gPad->SetLogy();
15949  if (kcountHBpositivedirectionReconoiseD4 == 1)
15950  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 0; depth = 4 \b");
15951  if (kcountHBpositivedirectionReconoiseD4 == 2)
15952  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 1; depth = 4 \b");
15953  if (kcountHBpositivedirectionReconoiseD4 == 3)
15954  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 2; depth = 4 \b");
15955  if (kcountHBpositivedirectionReconoiseD4 == 4)
15956  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 3; depth = 4 \b");
15957  if (kcountHBpositivedirectionReconoiseD4 == 5)
15958  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 4; depth = 4 \b");
15959  if (kcountHBpositivedirectionReconoiseD4 == 6)
15960  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 5; depth = 4 \b");
15961  if (kcountHBpositivedirectionReconoiseD4 == 7)
15962  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 6; depth = 4 \b");
15963  if (kcountHBpositivedirectionReconoiseD4 == 8)
15964  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 7; depth = 4 \b");
15965  if (kcountHBpositivedirectionReconoiseD4 == 9)
15966  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 8; depth = 4 \b");
15967  if (kcountHBpositivedirectionReconoiseD4 == 10)
15968  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 9; depth = 4 \b");
15969  if (kcountHBpositivedirectionReconoiseD4 == 11)
15970  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 10; depth = 4 \b");
15971  if (kcountHBpositivedirectionReconoiseD4 == 12)
15972  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 11; depth = 4 \b");
15973  if (kcountHBpositivedirectionReconoiseD4 == 13)
15974  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 12; depth = 4 \b");
15975  if (kcountHBpositivedirectionReconoiseD4 == 14)
15976  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 13; depth = 4 \b");
15977  if (kcountHBpositivedirectionReconoiseD4 == 15)
15978  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 14; depth = 4 \b");
15979  if (kcountHBpositivedirectionReconoiseD4 == 16)
15980  HBpositivedirectionReconoiseD4->SetXTitle("D for HB+ jeta = 15; depth = 4 \b");
15981  HBpositivedirectionReconoiseD4->Draw("Error");
15982  kcountHBpositivedirectionReconoiseD4++;
15983  if (kcountHBpositivedirectionReconoiseD4 > 16)
15984  break; // 4x6 = 24
15985  } //ccctest>0
15986 
15987  } // for i
15988  } //if(jeta-41 >= 0)
15989  } //for jeta
15991  c3x5->Update();
15992  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png");
15993  c3x5->Clear();
15994  // clean-up
15995  if (h2CeffHBpositivedirectionReconoiseD4)
15996  delete h2CeffHBpositivedirectionReconoiseD4;
15997 
15998  //========================================================================================== 22214
15999  //======================================================================
16000  //======================================================================1D plot: D vs phi , different eta, depth=1
16001  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
16002  c3x5->Clear();
16004  c3x5->Divide(4, 4);
16005  c3x5->cd(1);
16006  int kcountHBnegativedirectionReconoiseD1 = 1;
16007  TH1F* h2CeffHBnegativedirectionReconoiseD1 = new TH1F("h2CeffHBnegativedirectionReconoiseD1", "", nphi, 0., 72.);
16008 
16009  for (int jeta = 0; jeta < njeta; jeta++) {
16010  // negativedirectionReconoiseD:
16011  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16012  // for (int i=0;i<ndepth;i++) {
16013  // depth=1
16014  for (int i = 0; i < 1; i++) {
16015  TH1F* HBnegativedirectionReconoiseD1 = (TH1F*)h2CeffHBnegativedirectionReconoiseD1->Clone("twod1");
16016 
16017  float ccctest = 0; // to avoid empty massive elements
16018  for (int jphi = 0; jphi < nphi; jphi++) {
16019  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16020  if (areconoiseHB[i][jeta][jphi] > 0.) {
16021  HBnegativedirectionReconoiseD1->Fill(jphi, ccc1);
16022  ccctest = 1.; //HBnegativedirectionReconoiseD1->SetBinError(i,0.01);
16023  }
16024  } // for jphi
16025  if (ccctest > 0.) {
16026  //cout<<"1414 kcountHBnegativedirectionReconoiseD1 = "<<kcountHBnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
16027  c3x5->cd(kcountHBnegativedirectionReconoiseD1);
16028  HBnegativedirectionReconoiseD1->SetMarkerStyle(20);
16029  HBnegativedirectionReconoiseD1->SetMarkerSize(0.4);
16030  HBnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
16031  HBnegativedirectionReconoiseD1->SetXTitle("HBnegativedirectionReconoiseD1 \b");
16032  HBnegativedirectionReconoiseD1->SetMarkerColor(2);
16033  HBnegativedirectionReconoiseD1->SetLineColor(0);
16034  gPad->SetGridy();
16035  gPad->SetGridx();
16036  // gPad->SetLogy();
16037  if (kcountHBnegativedirectionReconoiseD1 == 1)
16038  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-16; depth = 1 \b");
16039  if (kcountHBnegativedirectionReconoiseD1 == 2)
16040  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-15; depth = 1 \b");
16041  if (kcountHBnegativedirectionReconoiseD1 == 3)
16042  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-14; depth = 1 \b");
16043  if (kcountHBnegativedirectionReconoiseD1 == 4)
16044  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-13; depth = 1 \b");
16045  if (kcountHBnegativedirectionReconoiseD1 == 5)
16046  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-12; depth = 1 \b");
16047  if (kcountHBnegativedirectionReconoiseD1 == 6)
16048  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-11; depth = 1 \b");
16049  if (kcountHBnegativedirectionReconoiseD1 == 7)
16050  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-10; depth = 1 \b");
16051  if (kcountHBnegativedirectionReconoiseD1 == 8)
16052  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-9; depth = 1 \b");
16053  if (kcountHBnegativedirectionReconoiseD1 == 9)
16054  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-8; depth = 1 \b");
16055  if (kcountHBnegativedirectionReconoiseD1 == 10)
16056  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-7; depth = 1 \b");
16057  if (kcountHBnegativedirectionReconoiseD1 == 11)
16058  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-6; depth = 1 \b");
16059  if (kcountHBnegativedirectionReconoiseD1 == 12)
16060  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-5; depth = 1 \b");
16061  if (kcountHBnegativedirectionReconoiseD1 == 13)
16062  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-4; depth = 1 \b");
16063  if (kcountHBnegativedirectionReconoiseD1 == 14)
16064  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-3; depth = 1 \b");
16065  if (kcountHBnegativedirectionReconoiseD1 == 15)
16066  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-2; depth = 1 \b");
16067  if (kcountHBnegativedirectionReconoiseD1 == 16)
16068  HBnegativedirectionReconoiseD1->SetXTitle("D for HB- jeta =-1; depth = 1 \b");
16069  HBnegativedirectionReconoiseD1->Draw("Error");
16070  kcountHBnegativedirectionReconoiseD1++;
16071  if (kcountHBnegativedirectionReconoiseD1 > 16)
16072  break; // 4x6 = 24
16073  } //ccctest>0
16074 
16075  } // for i
16076  } //if(jeta-41 < 0)
16077  } //for jeta
16079  c3x5->Update();
16080  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png");
16081  c3x5->Clear();
16082  // clean-up
16083  if (h2CeffHBnegativedirectionReconoiseD1)
16084  delete h2CeffHBnegativedirectionReconoiseD1;
16085  //========================================================================================== 22215
16086  //======================================================================
16087  //======================================================================1D plot: D vs phi , different eta, depth=2
16088  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
16089  c3x5->Clear();
16090  c3x5->Divide(4, 4);
16091  c3x5->cd(1);
16092  int kcountHBnegativedirectionReconoiseD2 = 1;
16093  TH1F* h2CeffHBnegativedirectionReconoiseD2 = new TH1F("h2CeffHBnegativedirectionReconoiseD2", "", nphi, 0., 72.);
16094 
16095  for (int jeta = 0; jeta < njeta; jeta++) {
16096  // negativedirectionReconoiseD:
16097  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16098  // for (int i=0;i<ndepth;i++) {
16099  // depth=2
16100  for (int i = 1; i < 2; i++) {
16101  TH1F* HBnegativedirectionReconoiseD2 = (TH1F*)h2CeffHBnegativedirectionReconoiseD2->Clone("twod1");
16102 
16103  float ccctest = 0; // to avoid empty massive elements
16104  for (int jphi = 0; jphi < nphi; jphi++) {
16105  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16106  if (areconoiseHB[i][jeta][jphi] > 0.) {
16107  HBnegativedirectionReconoiseD2->Fill(jphi, ccc1);
16108  ccctest = 1.; //HBnegativedirectionReconoiseD2->SetBinError(i,0.01);
16109  }
16110  } // for jphi
16111  if (ccctest > 0.) {
16112  //cout<<"1515 kcountHBnegativedirectionReconoiseD2 = "<<kcountHBnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
16113  c3x5->cd(kcountHBnegativedirectionReconoiseD2);
16114  HBnegativedirectionReconoiseD2->SetMarkerStyle(20);
16115  HBnegativedirectionReconoiseD2->SetMarkerSize(0.4);
16116  HBnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
16117  HBnegativedirectionReconoiseD2->SetXTitle("HBnegativedirectionReconoiseD2 \b");
16118  HBnegativedirectionReconoiseD2->SetMarkerColor(2);
16119  HBnegativedirectionReconoiseD2->SetLineColor(0);
16120  gPad->SetGridy();
16121  gPad->SetGridx();
16122  // gPad->SetLogy();
16123  if (kcountHBnegativedirectionReconoiseD2 == 1)
16124  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-16; depth = 2 \b");
16125  if (kcountHBnegativedirectionReconoiseD2 == 2)
16126  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-15; depth = 2 \b");
16127  if (kcountHBnegativedirectionReconoiseD2 == 3)
16128  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-14; depth = 2 \b");
16129  if (kcountHBnegativedirectionReconoiseD2 == 4)
16130  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-13; depth = 2 \b");
16131  if (kcountHBnegativedirectionReconoiseD2 == 5)
16132  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-12; depth = 2 \b");
16133  if (kcountHBnegativedirectionReconoiseD2 == 6)
16134  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-11; depth = 2 \b");
16135  if (kcountHBnegativedirectionReconoiseD2 == 7)
16136  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-10; depth = 2 \b");
16137  if (kcountHBnegativedirectionReconoiseD2 == 8)
16138  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-9; depth = 2 \b");
16139  if (kcountHBnegativedirectionReconoiseD2 == 9)
16140  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-8; depth = 2 \b");
16141  if (kcountHBnegativedirectionReconoiseD2 == 10)
16142  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-7; depth = 2 \b");
16143  if (kcountHBnegativedirectionReconoiseD2 == 11)
16144  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-6; depth = 2 \b");
16145  if (kcountHBnegativedirectionReconoiseD2 == 12)
16146  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-5; depth = 2 \b");
16147  if (kcountHBnegativedirectionReconoiseD2 == 13)
16148  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-4; depth = 2 \b");
16149  if (kcountHBnegativedirectionReconoiseD2 == 14)
16150  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-3; depth = 2 \b");
16151  if (kcountHBnegativedirectionReconoiseD2 == 15)
16152  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-2; depth = 2 \b");
16153  if (kcountHBnegativedirectionReconoiseD2 == 16)
16154  HBnegativedirectionReconoiseD2->SetXTitle("D for HB- jeta =-1; depth = 2 \b");
16155  HBnegativedirectionReconoiseD2->Draw("Error");
16156  kcountHBnegativedirectionReconoiseD2++;
16157  if (kcountHBnegativedirectionReconoiseD2 > 16)
16158  break; // 4x6 = 24
16159  } //ccctest>0
16160 
16161  } // for i
16162  } //if(jeta-41 < 0)
16163  } //for jeta
16165  c3x5->Update();
16166  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png");
16167  c3x5->Clear();
16168  // clean-up
16169  if (h2CeffHBnegativedirectionReconoiseD2)
16170  delete h2CeffHBnegativedirectionReconoiseD2;
16171  //========================================================================================== 22216
16172  //======================================================================
16173  //======================================================================1D plot: D vs phi , different eta, depth=3
16174  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
16175  c3x5->Clear();
16176  c3x5->Divide(4, 4);
16177  c3x5->cd(1);
16178  int kcountHBnegativedirectionReconoiseD3 = 1;
16179  TH1F* h2CeffHBnegativedirectionReconoiseD3 = new TH1F("h2CeffHBnegativedirectionReconoiseD3", "", nphi, 0., 72.);
16180 
16181  for (int jeta = 0; jeta < njeta; jeta++) {
16182  // negativedirectionReconoiseD:
16183  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16184  // for (int i=0;i<ndepth;i++) {
16185  // depth=3
16186  for (int i = 2; i < 3; i++) {
16187  TH1F* HBnegativedirectionReconoiseD3 = (TH1F*)h2CeffHBnegativedirectionReconoiseD3->Clone("twod1");
16188 
16189  float ccctest = 0; // to avoid empty massive elements
16190  for (int jphi = 0; jphi < nphi; jphi++) {
16191  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16192  if (areconoiseHB[i][jeta][jphi] > 0.) {
16193  HBnegativedirectionReconoiseD3->Fill(jphi, ccc1);
16194  ccctest = 1.; //HBnegativedirectionReconoiseD3->SetBinError(i,0.01);
16195  }
16196  } // for jphi
16197  if (ccctest > 0.) {
16198  //cout<<"1616 kcountHBnegativedirectionReconoiseD3 = "<<kcountHBnegativedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
16199  c3x5->cd(kcountHBnegativedirectionReconoiseD3);
16200  HBnegativedirectionReconoiseD3->SetMarkerStyle(20);
16201  HBnegativedirectionReconoiseD3->SetMarkerSize(0.4);
16202  HBnegativedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
16203  HBnegativedirectionReconoiseD3->SetXTitle("HBnegativedirectionReconoiseD3 \b");
16204  HBnegativedirectionReconoiseD3->SetMarkerColor(2);
16205  HBnegativedirectionReconoiseD3->SetLineColor(0);
16206  gPad->SetGridy();
16207  gPad->SetGridx();
16208  // gPad->SetLogy();
16209  if (kcountHBnegativedirectionReconoiseD3 == 1)
16210  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-16; depth = 3 \b");
16211  if (kcountHBnegativedirectionReconoiseD3 == 2)
16212  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-15; depth = 3 \b");
16213  if (kcountHBnegativedirectionReconoiseD3 == 3)
16214  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-14; depth = 3 \b");
16215  if (kcountHBnegativedirectionReconoiseD3 == 4)
16216  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-13; depth = 3 \b");
16217  if (kcountHBnegativedirectionReconoiseD3 == 5)
16218  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-12; depth = 3 \b");
16219  if (kcountHBnegativedirectionReconoiseD3 == 6)
16220  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-11; depth = 3 \b");
16221  if (kcountHBnegativedirectionReconoiseD3 == 7)
16222  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-10; depth = 3 \b");
16223  if (kcountHBnegativedirectionReconoiseD3 == 8)
16224  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-9; depth = 3 \b");
16225  if (kcountHBnegativedirectionReconoiseD3 == 9)
16226  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-8; depth = 3 \b");
16227  if (kcountHBnegativedirectionReconoiseD3 == 10)
16228  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-7; depth = 3 \b");
16229  if (kcountHBnegativedirectionReconoiseD3 == 11)
16230  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-6; depth = 3 \b");
16231  if (kcountHBnegativedirectionReconoiseD3 == 12)
16232  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-5; depth = 3 \b");
16233  if (kcountHBnegativedirectionReconoiseD3 == 13)
16234  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-4; depth = 3 \b");
16235  if (kcountHBnegativedirectionReconoiseD3 == 14)
16236  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-3; depth = 3 \b");
16237  if (kcountHBnegativedirectionReconoiseD3 == 15)
16238  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-2; depth = 3 \b");
16239  if (kcountHBnegativedirectionReconoiseD3 == 16)
16240  HBnegativedirectionReconoiseD3->SetXTitle("D for HB- jeta =-1; depth = 3 \b");
16241  HBnegativedirectionReconoiseD3->Draw("Error");
16242  kcountHBnegativedirectionReconoiseD3++;
16243  if (kcountHBnegativedirectionReconoiseD3 > 16)
16244  break; // 4x6 = 24
16245  } //ccctest>0
16246 
16247  } // for i
16248  } //if(jeta-41 < 0)
16249  } //for jeta
16251  c3x5->Update();
16252  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png");
16253  c3x5->Clear();
16254  // clean-up
16255  if (h2CeffHBnegativedirectionReconoiseD3)
16256  delete h2CeffHBnegativedirectionReconoiseD3;
16257  //========================================================================================== 22217
16258  //======================================================================
16259  //======================================================================1D plot: D vs phi , different eta, depth=4
16260  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
16261  c3x5->Clear();
16262  c3x5->Divide(4, 4);
16263  c3x5->cd(1);
16264  int kcountHBnegativedirectionReconoiseD4 = 1;
16265  TH1F* h2CeffHBnegativedirectionReconoiseD4 = new TH1F("h2CeffHBnegativedirectionReconoiseD4", "", nphi, 0., 72.);
16266 
16267  for (int jeta = 0; jeta < njeta; jeta++) {
16268  // negativedirectionReconoiseD:
16269  if (jeta - 41 >= -16 && jeta - 41 <= -1) {
16270  // for (int i=0;i<ndepth;i++) {
16271  // depth=4
16272  for (int i = 3; i < 4; i++) {
16273  TH1F* HBnegativedirectionReconoiseD4 = (TH1F*)h2CeffHBnegativedirectionReconoiseD4->Clone("twod1");
16274 
16275  float ccctest = 0; // to avoid empty massive elements
16276  for (int jphi = 0; jphi < nphi; jphi++) {
16277  double ccc1 = reconoisevarianceHB[i][jeta][jphi];
16278  if (areconoiseHB[i][jeta][jphi] > 0.) {
16279  HBnegativedirectionReconoiseD4->Fill(jphi, ccc1);
16280  ccctest = 1.; //HBnegativedirectionReconoiseD4->SetBinError(i,0.01);
16281  }
16282  } // for jphi
16283  if (ccctest > 0.) {
16284  //cout<<"1717 kcountHBnegativedirectionReconoiseD4 = "<<kcountHBnegativedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
16285  c3x5->cd(kcountHBnegativedirectionReconoiseD4);
16286  HBnegativedirectionReconoiseD4->SetMarkerStyle(20);
16287  HBnegativedirectionReconoiseD4->SetMarkerSize(0.4);
16288  HBnegativedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
16289  HBnegativedirectionReconoiseD4->SetXTitle("HBnegativedirectionReconoiseD4 \b");
16290  HBnegativedirectionReconoiseD4->SetMarkerColor(2);
16291  HBnegativedirectionReconoiseD4->SetLineColor(0);
16292  gPad->SetGridy();
16293  gPad->SetGridx();
16294  // gPad->SetLogy();
16295  if (kcountHBnegativedirectionReconoiseD4 == 1)
16296  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-16; depth = 4 \b");
16297  if (kcountHBnegativedirectionReconoiseD4 == 2)
16298  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-15; depth = 4 \b");
16299  if (kcountHBnegativedirectionReconoiseD4 == 3)
16300  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-14; depth = 4 \b");
16301  if (kcountHBnegativedirectionReconoiseD4 == 4)
16302  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-13; depth = 4 \b");
16303  if (kcountHBnegativedirectionReconoiseD4 == 5)
16304  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-12; depth = 4 \b");
16305  if (kcountHBnegativedirectionReconoiseD4 == 6)
16306  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-11; depth = 4 \b");
16307  if (kcountHBnegativedirectionReconoiseD4 == 7)
16308  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-10; depth = 4 \b");
16309  if (kcountHBnegativedirectionReconoiseD4 == 8)
16310  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-9; depth = 4 \b");
16311  if (kcountHBnegativedirectionReconoiseD4 == 9)
16312  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-8; depth = 4 \b");
16313  if (kcountHBnegativedirectionReconoiseD4 == 10)
16314  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-7; depth = 4 \b");
16315  if (kcountHBnegativedirectionReconoiseD4 == 11)
16316  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-6; depth = 4 \b");
16317  if (kcountHBnegativedirectionReconoiseD4 == 12)
16318  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-5; depth = 4 \b");
16319  if (kcountHBnegativedirectionReconoiseD4 == 13)
16320  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-4; depth = 4 \b");
16321  if (kcountHBnegativedirectionReconoiseD4 == 14)
16322  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-3; depth = 4 \b");
16323  if (kcountHBnegativedirectionReconoiseD4 == 15)
16324  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-2; depth = 4 \b");
16325  if (kcountHBnegativedirectionReconoiseD4 == 16)
16326  HBnegativedirectionReconoiseD4->SetXTitle("D for HB- jeta =-1; depth = 4 \b");
16327  HBnegativedirectionReconoiseD4->Draw("Error");
16328  kcountHBnegativedirectionReconoiseD4++;
16329  if (kcountHBnegativedirectionReconoiseD4 > 16)
16330  break; // 4x6 = 24
16331  } //ccctest>0
16332 
16333  } // for i
16334  } //if(jeta-41 < 0)
16335  } //for jeta
16337  c3x5->Update();
16338  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png");
16339  c3x5->Clear();
16340  // clean-up
16341  if (h2CeffHBnegativedirectionReconoiseD4)
16342  delete h2CeffHBnegativedirectionReconoiseD4;
16343 
16344  //===================================================================== END of Reconoise HB for phi-symmetry
16345  //===================================================================== END of Reconoise HB for phi-symmetry
16346  //===================================================================== END of Reconoise HB for phi-symmetry
16347 
16351  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
16352  //ndepth = k_max[3];
16353  ndepth = 7;
16354  // const int ndepth = 7;
16355  double areconoisehe[ndepth][njeta][njphi];
16356  double breconoisehe[ndepth][njeta][njphi];
16357  double reconoisevariancehe[ndepth][njeta][njphi];
16359  TH2F* recNoiseEnergy1HE1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE1");
16360  TH2F* recNoiseEnergy0HE1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE1");
16361  TH2F* recNoiseEnergyHE1 = (TH2F*)recNoiseEnergy1HE1->Clone("recNoiseEnergyHE1");
16362  recNoiseEnergyHE1->Divide(recNoiseEnergy1HE1, recNoiseEnergy0HE1, 1, 1, "B");
16363  TH2F* recNoiseEnergy1HE2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE2");
16364  TH2F* recNoiseEnergy0HE2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE2");
16365  TH2F* recNoiseEnergyHE2 = (TH2F*)recNoiseEnergy1HE2->Clone("recNoiseEnergyHE2");
16366  recNoiseEnergyHE2->Divide(recNoiseEnergy1HE2, recNoiseEnergy0HE2, 1, 1, "B");
16367  TH2F* recNoiseEnergy1HE3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE3");
16368  TH2F* recNoiseEnergy0HE3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE3");
16369  TH2F* recNoiseEnergyHE3 = (TH2F*)recNoiseEnergy1HE3->Clone("recNoiseEnergyHE3");
16370  recNoiseEnergyHE3->Divide(recNoiseEnergy1HE3, recNoiseEnergy0HE3, 1, 1, "B");
16371  TH2F* recNoiseEnergy1HE4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE4");
16372  TH2F* recNoiseEnergy0HE4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE4");
16373  TH2F* recNoiseEnergyHE4 = (TH2F*)recNoiseEnergy1HE4->Clone("recNoiseEnergyHE4");
16374  recNoiseEnergyHE4->Divide(recNoiseEnergy1HE4, recNoiseEnergy0HE4, 1, 1, "B");
16375  TH2F* recNoiseEnergy1HE5 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE5");
16376  TH2F* recNoiseEnergy0HE5 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE5");
16377  TH2F* recNoiseEnergyHE5 = (TH2F*)recNoiseEnergy1HE5->Clone("recNoiseEnergyHE5");
16378  recNoiseEnergyHE5->Divide(recNoiseEnergy1HE5, recNoiseEnergy0HE5, 1, 1, "B");
16379  TH2F* recNoiseEnergy1HE6 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE6");
16380  TH2F* recNoiseEnergy0HE6 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE6");
16381  TH2F* recNoiseEnergyHE6 = (TH2F*)recNoiseEnergy1HE6->Clone("recNoiseEnergyHE6");
16382  recNoiseEnergyHE6->Divide(recNoiseEnergy1HE6, recNoiseEnergy0HE6, 1, 1, "B");
16383  TH2F* recNoiseEnergy1HE7 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HE7");
16384  TH2F* recNoiseEnergy0HE7 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE7");
16385  TH2F* recNoiseEnergyHE7 = (TH2F*)recNoiseEnergy1HE7->Clone("recNoiseEnergyHE7");
16386  recNoiseEnergyHE7->Divide(recNoiseEnergy1HE7, recNoiseEnergy0HE7, 1, 1, "B");
16387  for (int jeta = 0; jeta < njeta; jeta++) {
16388  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
16389  //====================================================================== PHI normalization & put R into massive areconoisehe
16390  //preparation for PHI normalization:
16391  double sumreconoiseHE0 = 0;
16392  int nsumreconoiseHE0 = 0;
16393  double sumreconoiseHE1 = 0;
16394  int nsumreconoiseHE1 = 0;
16395  double sumreconoiseHE2 = 0;
16396  int nsumreconoiseHE2 = 0;
16397  double sumreconoiseHE3 = 0;
16398  int nsumreconoiseHE3 = 0;
16399  double sumreconoiseHE4 = 0;
16400  int nsumreconoiseHE4 = 0;
16401  double sumreconoiseHE5 = 0;
16402  int nsumreconoiseHE5 = 0;
16403  double sumreconoiseHE6 = 0;
16404  int nsumreconoiseHE6 = 0;
16405  for (int jphi = 0; jphi < njphi; jphi++) {
16406  areconoisehe[0][jeta][jphi] = recNoiseEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
16407  areconoisehe[1][jeta][jphi] = recNoiseEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
16408  areconoisehe[2][jeta][jphi] = recNoiseEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
16409  areconoisehe[3][jeta][jphi] = recNoiseEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
16410  areconoisehe[4][jeta][jphi] = recNoiseEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
16411  areconoisehe[5][jeta][jphi] = recNoiseEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
16412  areconoisehe[6][jeta][jphi] = recNoiseEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
16413 
16414  breconoisehe[0][jeta][jphi] = recNoiseEnergyHE1->GetBinContent(jeta + 1, jphi + 1);
16415  breconoisehe[1][jeta][jphi] = recNoiseEnergyHE2->GetBinContent(jeta + 1, jphi + 1);
16416  breconoisehe[2][jeta][jphi] = recNoiseEnergyHE3->GetBinContent(jeta + 1, jphi + 1);
16417  breconoisehe[3][jeta][jphi] = recNoiseEnergyHE4->GetBinContent(jeta + 1, jphi + 1);
16418  breconoisehe[4][jeta][jphi] = recNoiseEnergyHE5->GetBinContent(jeta + 1, jphi + 1);
16419  breconoisehe[5][jeta][jphi] = recNoiseEnergyHE6->GetBinContent(jeta + 1, jphi + 1);
16420  breconoisehe[6][jeta][jphi] = recNoiseEnergyHE7->GetBinContent(jeta + 1, jphi + 1);
16421 
16422  if (areconoisehe[0][jeta][jphi] != 0.) {
16423  sumreconoiseHE0 += areconoisehe[0][jeta][jphi];
16424  ++nsumreconoiseHE0;
16425  }
16426  if (areconoisehe[1][jeta][jphi] != 0.) {
16427  sumreconoiseHE1 += areconoisehe[1][jeta][jphi];
16428  ++nsumreconoiseHE1;
16429  }
16430  if (areconoisehe[2][jeta][jphi] != 0.) {
16431  sumreconoiseHE2 += areconoisehe[2][jeta][jphi];
16432  ++nsumreconoiseHE2;
16433  }
16434  if (areconoisehe[3][jeta][jphi] != 0.) {
16435  sumreconoiseHE3 += areconoisehe[3][jeta][jphi];
16436  ++nsumreconoiseHE3;
16437  }
16438  if (areconoisehe[4][jeta][jphi] != 0.) {
16439  sumreconoiseHE4 += areconoisehe[4][jeta][jphi];
16440  ++nsumreconoiseHE4;
16441  }
16442  if (areconoisehe[5][jeta][jphi] != 0.) {
16443  sumreconoiseHE5 += areconoisehe[5][jeta][jphi];
16444  ++nsumreconoiseHE5;
16445  }
16446  if (areconoisehe[6][jeta][jphi] != 0.) {
16447  sumreconoiseHE6 += areconoisehe[6][jeta][jphi];
16448  ++nsumreconoiseHE6;
16449  }
16450  } // phi
16451 
16452  // PHI normalization for DIF:
16453  for (int jphi = 0; jphi < njphi; jphi++) {
16454  if (sumreconoiseHE0 != 0.)
16455  breconoisehe[0][jeta][jphi] -= (sumreconoiseHE0 / nsumreconoiseHE0);
16456  if (sumreconoiseHE1 != 0.)
16457  breconoisehe[1][jeta][jphi] -= (sumreconoiseHE1 / nsumreconoiseHE1);
16458  if (sumreconoiseHE2 != 0.)
16459  breconoisehe[2][jeta][jphi] -= (sumreconoiseHE2 / nsumreconoiseHE2);
16460  if (sumreconoiseHE3 != 0.)
16461  breconoisehe[3][jeta][jphi] -= (sumreconoiseHE3 / nsumreconoiseHE3);
16462  if (sumreconoiseHE4 != 0.)
16463  breconoisehe[4][jeta][jphi] -= (sumreconoiseHE4 / nsumreconoiseHE4);
16464  if (sumreconoiseHE5 != 0.)
16465  breconoisehe[5][jeta][jphi] -= (sumreconoiseHE5 / nsumreconoiseHE5);
16466  if (sumreconoiseHE6 != 0.)
16467  breconoisehe[6][jeta][jphi] -= (sumreconoiseHE6 / nsumreconoiseHE6);
16468  } // phi
16469 
16470  // PHI normalization for R:
16471  for (int jphi = 0; jphi < njphi; jphi++) {
16472  if (sumreconoiseHE0 != 0.)
16473  areconoisehe[0][jeta][jphi] /= (sumreconoiseHE0 / nsumreconoiseHE0);
16474  if (sumreconoiseHE1 != 0.)
16475  areconoisehe[1][jeta][jphi] /= (sumreconoiseHE1 / nsumreconoiseHE1);
16476  if (sumreconoiseHE2 != 0.)
16477  areconoisehe[2][jeta][jphi] /= (sumreconoiseHE2 / nsumreconoiseHE2);
16478  if (sumreconoiseHE3 != 0.)
16479  areconoisehe[3][jeta][jphi] /= (sumreconoiseHE3 / nsumreconoiseHE3);
16480  if (sumreconoiseHE4 != 0.)
16481  areconoisehe[4][jeta][jphi] /= (sumreconoiseHE4 / nsumreconoiseHE4);
16482  if (sumreconoiseHE5 != 0.)
16483  areconoisehe[5][jeta][jphi] /= (sumreconoiseHE5 / nsumreconoiseHE5);
16484  if (sumreconoiseHE6 != 0.)
16485  areconoisehe[6][jeta][jphi] /= (sumreconoiseHE6 / nsumreconoiseHE6);
16486  } // phi
16487  } //if( (jeta-41 >=
16488  } //eta
16489  //------------------------ 2D-eta/phi-plot: R, averaged over depthes
16490  //======================================================================
16491  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HE
16492  //======================================================================
16493  c2x1->Clear();
16495  c2x1->Divide(2, 1);
16496  c2x1->cd(1);
16497  TH2F* GefzRreconoiseHE42D = new TH2F("GefzRreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
16498  TH2F* GefzRreconoiseHE42D0 = new TH2F("GefzRreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
16499  TH2F* GefzRreconoiseHE42DF = (TH2F*)GefzRreconoiseHE42D0->Clone("GefzRreconoiseHE42DF");
16500  for (int i = 0; i < ndepth; i++) {
16501  for (int jeta = 0; jeta < neta; jeta++) {
16502  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
16503  for (int jphi = 0; jphi < nphi; jphi++) {
16504  double ccc1 = areconoisehe[i][jeta][jphi];
16505  int k2plot = jeta - 41;
16506  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
16507  if (ccc1 != 0.) {
16508  GefzRreconoiseHE42D->Fill(kkk, jphi, ccc1);
16509  GefzRreconoiseHE42D0->Fill(kkk, jphi, 1.);
16510  }
16511  }
16512  }
16513  }
16514  }
16515  GefzRreconoiseHE42DF->Divide(GefzRreconoiseHE42D, GefzRreconoiseHE42D0, 1, 1, "B"); // average A
16516  gPad->SetGridy();
16517  gPad->SetGridx(); // gPad->SetLogz();
16518  GefzRreconoiseHE42DF->SetXTitle("<R>_depth #eta \b");
16519  GefzRreconoiseHE42DF->SetYTitle(" #phi \b");
16520  GefzRreconoiseHE42DF->Draw("COLZ");
16521 
16522  c2x1->cd(2);
16523  TH1F* energyhitNoise_HE = (TH1F*)dir->FindObjectAny("h_energyhitNoise_HE");
16524  energyhitNoise_HE->SetMarkerStyle(20);
16525  energyhitNoise_HE->SetMarkerSize(0.4);
16526  energyhitNoise_HE->GetYaxis()->SetLabelSize(0.04);
16527  energyhitNoise_HE->SetXTitle("energyhitNoise_HE \b");
16528  energyhitNoise_HE->SetMarkerColor(2);
16529  energyhitNoise_HE->SetLineColor(0);
16530  gPad->SetGridy();
16531  gPad->SetGridx();
16532  energyhitNoise_HE->Draw("Error");
16533 
16535  c2x1->Update();
16536  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHE.png");
16537  c2x1->Clear();
16538  // clean-up
16539  if (GefzRreconoiseHE42D)
16540  delete GefzRreconoiseHE42D;
16541  if (GefzRreconoiseHE42D0)
16542  delete GefzRreconoiseHE42D0;
16543  if (GefzRreconoiseHE42DF)
16544  delete GefzRreconoiseHE42DF;
16545  //====================================================================== 1D plot: R vs phi , averaged over depthes & eta
16546  //======================================================================
16547  //cout<<" 1D plot: R vs phi , averaged over depthes & eta *****" <<endl;
16548  c1x1->Clear();
16550  c1x1->Divide(1, 1);
16551  c1x1->cd(1);
16552  TH1F* GefzRreconoiseHE41D = new TH1F("GefzRreconoiseHE41D", "", nphi, 0., 72.);
16553  TH1F* GefzRreconoiseHE41D0 = new TH1F("GefzRreconoiseHE41D0", "", nphi, 0., 72.);
16554  TH1F* GefzRreconoiseHE41DF = (TH1F*)GefzRreconoiseHE41D0->Clone("GefzRreconoiseHE41DF");
16555  for (int jphi = 0; jphi < nphi; jphi++) {
16556  for (int jeta = 0; jeta < neta; jeta++) {
16557  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
16558  for (int i = 0; i < ndepth; i++) {
16559  double ccc1 = areconoisehe[i][jeta][jphi];
16560  if (ccc1 != 0.) {
16561  GefzRreconoiseHE41D->Fill(jphi, ccc1);
16562  GefzRreconoiseHE41D0->Fill(jphi, 1.);
16563  }
16564  }
16565  }
16566  }
16567  }
16568  GefzRreconoiseHE41DF->Divide(GefzRreconoiseHE41D, GefzRreconoiseHE41D0, 1, 1, "B"); // R averaged over depthes & eta
16569  GefzRreconoiseHE41D0->Sumw2();
16570  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHE41DF->SetBinError(jphi,0.01);}
16571  gPad->SetGridy();
16572  gPad->SetGridx(); // gPad->SetLogz();
16573  GefzRreconoiseHE41DF->SetMarkerStyle(20);
16574  GefzRreconoiseHE41DF->SetMarkerSize(1.4);
16575  GefzRreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
16576  GefzRreconoiseHE41DF->SetXTitle("#phi \b");
16577  GefzRreconoiseHE41DF->SetYTitle(" <R> \b");
16578  GefzRreconoiseHE41DF->SetZTitle("<R>_PHI - AllDepthes \b");
16579  GefzRreconoiseHE41DF->SetMarkerColor(4);
16580  GefzRreconoiseHE41DF->SetLineColor(
16581  4); // GefzRreconoiseHE41DF->SetMinimum(0.8); // GefzRreconoiseHE41DF->SetMaximum(1.000);
16582  GefzRreconoiseHE41DF->Draw("Error");
16584  c1x1->Update();
16585  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHE.png");
16586  c1x1->Clear();
16587  // clean-up
16588  if (GefzRreconoiseHE41D)
16589  delete GefzRreconoiseHE41D;
16590  if (GefzRreconoiseHE41D0)
16591  delete GefzRreconoiseHE41D0;
16592  if (GefzRreconoiseHE41DF)
16593  delete GefzRreconoiseHE41DF;
16594 
16595  //========================================================================================== 4
16596  //======================================================================
16597  //======================================================================1D plot: R vs phi , different eta, depth=1
16598  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
16599  c3x5->Clear();
16601  c3x5->Divide(3, 5);
16602  c3x5->cd(1);
16603  int kcountHEpositivedirectionReconoise1 = 1;
16604  TH1F* h2CeffHEpositivedirectionReconoise1 = new TH1F("h2CeffHEpositivedirectionReconoise1", "", nphi, 0., 72.);
16605  for (int jeta = 0; jeta < njeta; jeta++) {
16606  // positivedirectionReconoise:
16607  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16608  // for (int i=0;i<ndepth;i++) {
16609  // depth=1
16610  for (int i = 0; i < 1; i++) {
16611  TH1F* HEpositivedirectionReconoise1 = (TH1F*)h2CeffHEpositivedirectionReconoise1->Clone("twod1");
16612  float ccctest = 0; // to avoid empty massive elements
16613  for (int jphi = 0; jphi < nphi; jphi++) {
16614  double ccc1 = areconoisehe[i][jeta][jphi];
16615  if (ccc1 != 0.) {
16616  HEpositivedirectionReconoise1->Fill(jphi, ccc1);
16617  ccctest = 1.; //HEpositivedirectionReconoise1->SetBinError(i,0.01);
16618  }
16619  } // for jphi
16620  if (ccctest > 0.) {
16621  // cout<<"444 kcountHEpositivedirectionReconoise1 = "<<kcountHEpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
16622  c3x5->cd(kcountHEpositivedirectionReconoise1);
16623  HEpositivedirectionReconoise1->SetMarkerStyle(20);
16624  HEpositivedirectionReconoise1->SetMarkerSize(0.4);
16625  HEpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
16626  HEpositivedirectionReconoise1->SetXTitle("HEpositivedirectionReconoise1 \b");
16627  HEpositivedirectionReconoise1->SetMarkerColor(2);
16628  HEpositivedirectionReconoise1->SetLineColor(0);
16629  gPad->SetGridy();
16630  gPad->SetGridx();
16631  // gPad->SetLogy();
16632  if (kcountHEpositivedirectionReconoise1 == 1)
16633  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 17; depth = 1 \b");
16634  if (kcountHEpositivedirectionReconoise1 == 2)
16635  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 18; depth = 1 \b");
16636  if (kcountHEpositivedirectionReconoise1 == 3)
16637  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 19; depth = 1 \b");
16638  if (kcountHEpositivedirectionReconoise1 == 4)
16639  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 20; depth = 1 \b");
16640  if (kcountHEpositivedirectionReconoise1 == 5)
16641  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 21; depth = 1 \b");
16642  if (kcountHEpositivedirectionReconoise1 == 6)
16643  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 22; depth = 1 \b");
16644  if (kcountHEpositivedirectionReconoise1 == 7)
16645  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 23; depth = 1 \b");
16646  if (kcountHEpositivedirectionReconoise1 == 8)
16647  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 24; depth = 1 \b");
16648  if (kcountHEpositivedirectionReconoise1 == 9)
16649  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 25; depth = 1 \b");
16650  if (kcountHEpositivedirectionReconoise1 == 10)
16651  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 26; depth = 1 \b");
16652  if (kcountHEpositivedirectionReconoise1 == 11)
16653  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 27; depth = 1 \b");
16654  if (kcountHEpositivedirectionReconoise1 == 12)
16655  HEpositivedirectionReconoise1->SetXTitle("R for HE+ jeta = 28; depth = 1 \b");
16656  HEpositivedirectionReconoise1->Draw("Error");
16657  kcountHEpositivedirectionReconoise1++;
16658  if (kcountHEpositivedirectionReconoise1 > 12)
16659  break; // 4x6 = 24
16660  } //ccctest>0
16661 
16662  } // for i
16663  } //if(jeta-41 >= 15 && jeta-41 <= 28
16664  } //for jeta
16666  c3x5->Update();
16667  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
16668  c3x5->Clear();
16669  // clean-up
16670  if (h2CeffHEpositivedirectionReconoise1)
16671  delete h2CeffHEpositivedirectionReconoise1;
16672 
16673  //========================================================================================== 5
16674  //======================================================================
16675  //======================================================================1D plot: R vs phi , different eta, depth=2
16676  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
16677  c3x5->Clear();
16679  c3x5->Divide(3, 5);
16680  c3x5->cd(1);
16681  int kcountHEpositivedirectionReconoise2 = 1;
16682  TH1F* h2CeffHEpositivedirectionReconoise2 = new TH1F("h2CeffHEpositivedirectionReconoise2", "", nphi, 0., 72.);
16683  for (int jeta = 0; jeta < njeta; jeta++) {
16684  // positivedirectionReconoise:
16685  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16686  // for (int i=0;i<ndepth;i++) {
16687  // depth=2
16688  for (int i = 1; i < 2; i++) {
16689  TH1F* HEpositivedirectionReconoise2 = (TH1F*)h2CeffHEpositivedirectionReconoise2->Clone("twod1");
16690  float ccctest = 0; // to avoid empty massive elements
16691  for (int jphi = 0; jphi < nphi; jphi++) {
16692  double ccc1 = areconoisehe[i][jeta][jphi];
16693  if (ccc1 != 0.) {
16694  HEpositivedirectionReconoise2->Fill(jphi, ccc1);
16695  ccctest = 1.; //HEpositivedirectionReconoise2->SetBinError(i,0.01);
16696  }
16697  } // for jphi
16698  if (ccctest > 0.) {
16699  //cout<<"555 kcountHEpositivedirectionReconoise2 = "<<kcountHEpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
16700  c3x5->cd(kcountHEpositivedirectionReconoise2);
16701  HEpositivedirectionReconoise2->SetMarkerStyle(20);
16702  HEpositivedirectionReconoise2->SetMarkerSize(0.4);
16703  HEpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
16704  HEpositivedirectionReconoise2->SetXTitle("HEpositivedirectionReconoise2 \b");
16705  HEpositivedirectionReconoise2->SetMarkerColor(2);
16706  HEpositivedirectionReconoise2->SetLineColor(0);
16707  gPad->SetGridy();
16708  gPad->SetGridx();
16709  // gPad->SetLogy();
16710  if (kcountHEpositivedirectionReconoise2 == 1)
16711  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 16; depth = 2 \b");
16712  if (kcountHEpositivedirectionReconoise2 == 2)
16713  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 17; depth = 2 \b");
16714  if (kcountHEpositivedirectionReconoise2 == 3)
16715  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 18; depth = 2 \b");
16716  if (kcountHEpositivedirectionReconoise2 == 4)
16717  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 19; depth = 2 \b");
16718  if (kcountHEpositivedirectionReconoise2 == 5)
16719  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 20; depth = 2 \b");
16720  if (kcountHEpositivedirectionReconoise2 == 6)
16721  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 21; depth = 2 \b");
16722  if (kcountHEpositivedirectionReconoise2 == 7)
16723  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 22; depth = 2 \b");
16724  if (kcountHEpositivedirectionReconoise2 == 8)
16725  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 23; depth = 2 \b");
16726  if (kcountHEpositivedirectionReconoise2 == 9)
16727  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 24; depth = 2 \b");
16728  if (kcountHEpositivedirectionReconoise2 == 10)
16729  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 25; depth = 2 \b");
16730  if (kcountHEpositivedirectionReconoise2 == 11)
16731  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 26; depth = 2 \b");
16732  if (kcountHEpositivedirectionReconoise2 == 12)
16733  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 27; depth = 2 \b");
16734  if (kcountHEpositivedirectionReconoise2 == 13)
16735  HEpositivedirectionReconoise2->SetXTitle("R for HE+ jeta = 28; depth = 2 \b");
16736  HEpositivedirectionReconoise2->Draw("Error");
16737  kcountHEpositivedirectionReconoise2++;
16738  if (kcountHEpositivedirectionReconoise2 > 13)
16739  break; // 4x6 = 24
16740  } //ccctest>0
16741 
16742  } // for i
16743  } //if(jeta-41
16744  } //for jeta
16746  c3x5->Update();
16747  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
16748  c3x5->Clear();
16749  // clean-up
16750  if (h2CeffHEpositivedirectionReconoise2)
16751  delete h2CeffHEpositivedirectionReconoise2;
16752  //========================================================================================== 6
16753  //======================================================================
16754  //======================================================================1D plot: R vs phi , different eta, depth=3
16755  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
16756  c3x5->Clear();
16758  c3x5->Divide(3, 5);
16759  c3x5->cd(1);
16760  int kcountHEpositivedirectionReconoise3 = 1;
16761  TH1F* h2CeffHEpositivedirectionReconoise3 = new TH1F("h2CeffHEpositivedirectionReconoise3", "", nphi, 0., 72.);
16762  for (int jeta = 0; jeta < njeta; jeta++) {
16763  // positivedirectionReconoise:
16764  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16765  // for (int i=0;i<ndepth;i++) {
16766  // depth=3
16767  for (int i = 2; i < 3; i++) {
16768  TH1F* HEpositivedirectionReconoise3 = (TH1F*)h2CeffHEpositivedirectionReconoise3->Clone("twod1");
16769  float ccctest = 0; // to avoid empty massive elements
16770  for (int jphi = 0; jphi < nphi; jphi++) {
16771  double ccc1 = areconoisehe[i][jeta][jphi];
16772  if (ccc1 != 0.) {
16773  HEpositivedirectionReconoise3->Fill(jphi, ccc1);
16774  ccctest = 1.; //HEpositivedirectionReconoise3->SetBinError(i,0.01);
16775  }
16776  } // for jphi
16777  if (ccctest > 0.) {
16778  //cout<<"666 kcountHEpositivedirectionReconoise3 = "<<kcountHEpositivedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
16779  c3x5->cd(kcountHEpositivedirectionReconoise3);
16780  HEpositivedirectionReconoise3->SetMarkerStyle(20);
16781  HEpositivedirectionReconoise3->SetMarkerSize(0.4);
16782  HEpositivedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
16783  HEpositivedirectionReconoise3->SetXTitle("HEpositivedirectionReconoise3 \b");
16784  HEpositivedirectionReconoise3->SetMarkerColor(2);
16785  HEpositivedirectionReconoise3->SetLineColor(0);
16786  gPad->SetGridy();
16787  gPad->SetGridx();
16788  // gPad->SetLogy();
16789  if (kcountHEpositivedirectionReconoise3 == 1)
16790  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 16; depth = 3 \b");
16791  if (kcountHEpositivedirectionReconoise3 == 2)
16792  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 17; depth = 3 \b");
16793  if (kcountHEpositivedirectionReconoise3 == 3)
16794  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 18; depth = 3 \b");
16795  if (kcountHEpositivedirectionReconoise3 == 4)
16796  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 19; depth = 3 \b");
16797  if (kcountHEpositivedirectionReconoise3 == 5)
16798  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 20; depth = 3 \b");
16799  if (kcountHEpositivedirectionReconoise3 == 6)
16800  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 21; depth = 3 \b");
16801  if (kcountHEpositivedirectionReconoise3 == 7)
16802  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 22; depth = 3 \b");
16803  if (kcountHEpositivedirectionReconoise3 == 8)
16804  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 23; depth = 3 \b");
16805  if (kcountHEpositivedirectionReconoise3 == 9)
16806  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 24; depth = 3 \b");
16807  if (kcountHEpositivedirectionReconoise3 == 10)
16808  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 25; depth = 3 \b");
16809  if (kcountHEpositivedirectionReconoise3 == 11)
16810  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 26; depth = 3 \b");
16811  if (kcountHEpositivedirectionReconoise3 == 12)
16812  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 27; depth = 3 \b");
16813  if (kcountHEpositivedirectionReconoise3 == 13)
16814  HEpositivedirectionReconoise3->SetXTitle("R for HE+ jeta = 28; depth = 3 \b");
16815  HEpositivedirectionReconoise3->Draw("Error");
16816  kcountHEpositivedirectionReconoise3++;
16817  if (kcountHEpositivedirectionReconoise3 > 13)
16818  break; // 4x6 = 24
16819  } //ccctest>0
16820 
16821  } // for i
16822  } //if(jeta-41 >=
16823  } //for jeta
16825  c3x5->Update();
16826  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
16827  c3x5->Clear();
16828  // clean-up
16829  if (h2CeffHEpositivedirectionReconoise3)
16830  delete h2CeffHEpositivedirectionReconoise3;
16831  //========================================================================================== 7
16832  //======================================================================
16833  //======================================================================1D plot: R vs phi , different eta, depth=4
16834  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
16835  c3x5->Clear();
16837  c3x5->Divide(3, 5);
16838  c3x5->cd(1);
16839  int kcountHEpositivedirectionReconoise4 = 1;
16840  TH1F* h2CeffHEpositivedirectionReconoise4 = new TH1F("h2CeffHEpositivedirectionReconoise4", "", nphi, 0., 72.);
16841 
16842  for (int jeta = 0; jeta < njeta; jeta++) {
16843  // positivedirectionReconoise:
16844  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16845  // for (int i=0;i<ndepth;i++) {
16846  // depth=4
16847  for (int i = 3; i < 4; i++) {
16848  TH1F* HEpositivedirectionReconoise4 = (TH1F*)h2CeffHEpositivedirectionReconoise4->Clone("twod1");
16849 
16850  float ccctest = 0; // to avoid empty massive elements
16851  for (int jphi = 0; jphi < nphi; jphi++) {
16852  double ccc1 = areconoisehe[i][jeta][jphi];
16853  if (ccc1 != 0.) {
16854  HEpositivedirectionReconoise4->Fill(jphi, ccc1);
16855  ccctest = 1.; //HEpositivedirectionReconoise4->SetBinError(i,0.01);
16856  }
16857  } // for jphi
16858  if (ccctest > 0.) {
16859  //cout<<"777 kcountHEpositivedirectionReconoise4 = "<<kcountHEpositivedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
16860  c3x5->cd(kcountHEpositivedirectionReconoise4);
16861  HEpositivedirectionReconoise4->SetMarkerStyle(20);
16862  HEpositivedirectionReconoise4->SetMarkerSize(0.4);
16863  HEpositivedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
16864  HEpositivedirectionReconoise4->SetXTitle("HEpositivedirectionReconoise4 \b");
16865  HEpositivedirectionReconoise4->SetMarkerColor(2);
16866  HEpositivedirectionReconoise4->SetLineColor(0);
16867  gPad->SetGridy();
16868  gPad->SetGridx();
16869  // gPad->SetLogy();
16870  if (kcountHEpositivedirectionReconoise4 == 1)
16871  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 15; depth = 4 \b");
16872  if (kcountHEpositivedirectionReconoise4 == 2)
16873  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 17; depth = 4 \b");
16874  if (kcountHEpositivedirectionReconoise4 == 3)
16875  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 18; depth = 4 \b");
16876  if (kcountHEpositivedirectionReconoise4 == 4)
16877  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 19; depth = 4 \b");
16878  if (kcountHEpositivedirectionReconoise4 == 5)
16879  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 20; depth = 4 \b");
16880  if (kcountHEpositivedirectionReconoise4 == 6)
16881  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 21; depth = 4 \b");
16882  if (kcountHEpositivedirectionReconoise4 == 7)
16883  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 22; depth = 4 \b");
16884  if (kcountHEpositivedirectionReconoise4 == 8)
16885  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 23; depth = 4 \b");
16886  if (kcountHEpositivedirectionReconoise4 == 9)
16887  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 24; depth = 4 \b");
16888  if (kcountHEpositivedirectionReconoise4 == 10)
16889  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 25; depth = 4 \b");
16890  if (kcountHEpositivedirectionReconoise4 == 11)
16891  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 26; depth = 4 \b");
16892  if (kcountHEpositivedirectionReconoise4 == 12)
16893  HEpositivedirectionReconoise4->SetXTitle("R for HE+ jeta = 27; depth = 4 \b");
16894  HEpositivedirectionReconoise4->Draw("Error");
16895  kcountHEpositivedirectionReconoise4++;
16896  if (kcountHEpositivedirectionReconoise4 > 12)
16897  break; // 4x6 = 24
16898  } //ccctest>0
16899 
16900  } // for i
16901  } //if(jeta-41 >= -29 && jeta-41 <= -16)
16902  } //for jeta
16904  c3x5->Update();
16905  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
16906  c3x5->Clear();
16907  // clean-up
16908  if (h2CeffHEpositivedirectionReconoise4)
16909  delete h2CeffHEpositivedirectionReconoise4;
16910  //========================================================================================== 8
16911  //======================================================================
16912  //======================================================================1D plot: R vs phi , different eta, depth=5
16913  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
16914  c3x5->Clear();
16916  c3x5->Divide(3, 5);
16917  c3x5->cd(1);
16918  int kcountHEpositivedirectionReconoise5 = 1;
16919  TH1F* h2CeffHEpositivedirectionReconoise5 = new TH1F("h2CeffHEpositivedirectionReconoise5", "", nphi, 0., 72.);
16920 
16921  for (int jeta = 0; jeta < njeta; jeta++) {
16922  // positivedirectionReconoise:
16923  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
16924  // for (int i=0;i<ndepth;i++) {
16925  // depth=5
16926  for (int i = 4; i < 5; i++) {
16927  TH1F* HEpositivedirectionReconoise5 = (TH1F*)h2CeffHEpositivedirectionReconoise5->Clone("twod1");
16928 
16929  float ccctest = 0; // to avoid empty massive elements
16930  for (int jphi = 0; jphi < nphi; jphi++) {
16931  // cout<<"888 initial kcountHEpositivedirectionReconoise5 = "<<kcountHEpositivedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" areconoisehe[i][jeta][jphi]= "<< areconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
16932 
16933  double ccc1 = areconoisehe[i][jeta][jphi];
16934  if (ccc1 != 0.) {
16935  HEpositivedirectionReconoise5->Fill(jphi, ccc1);
16936  ccctest = 1.; //HEpositivedirectionReconoise5->SetBinError(i,0.01);
16937  }
16938  } // for jphi
16939  if (ccctest > 0.) {
16940  //cout<<"888 kcountHEpositivedirectionReconoise5 = "<<kcountHEpositivedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<endl;
16941  c3x5->cd(kcountHEpositivedirectionReconoise5);
16942  HEpositivedirectionReconoise5->SetMarkerStyle(20);
16943  HEpositivedirectionReconoise5->SetMarkerSize(0.4);
16944  HEpositivedirectionReconoise5->GetYaxis()->SetLabelSize(0.04);
16945  HEpositivedirectionReconoise5->SetXTitle("HEpositivedirectionReconoise5 \b");
16946  HEpositivedirectionReconoise5->SetMarkerColor(2);
16947  HEpositivedirectionReconoise5->SetLineColor(0);
16948  gPad->SetGridy();
16949  gPad->SetGridx();
16950  // gPad->SetLogy();
16951  if (kcountHEpositivedirectionReconoise5 == 1)
16952  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 17; depth = 5 \b");
16953  if (kcountHEpositivedirectionReconoise5 == 2)
16954  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 18; depth = 5 \b");
16955  if (kcountHEpositivedirectionReconoise5 == 3)
16956  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 19; depth = 5 \b");
16957  if (kcountHEpositivedirectionReconoise5 == 4)
16958  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 20; depth = 5 \b");
16959  if (kcountHEpositivedirectionReconoise5 == 5)
16960  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 21; depth = 5 \b");
16961  if (kcountHEpositivedirectionReconoise5 == 6)
16962  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 22; depth = 5 \b");
16963  if (kcountHEpositivedirectionReconoise5 == 7)
16964  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 23; depth = 5 \b");
16965  if (kcountHEpositivedirectionReconoise5 == 8)
16966  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 24; depth = 5 \b");
16967  if (kcountHEpositivedirectionReconoise5 == 9)
16968  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 25; depth = 5 \b");
16969  if (kcountHEpositivedirectionReconoise5 == 10)
16970  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 26; depth = 5 \b");
16971  if (kcountHEpositivedirectionReconoise5 == 11)
16972  HEpositivedirectionReconoise5->SetXTitle("R for HE+ jeta = 27; depth = 5 \b");
16973  HEpositivedirectionReconoise5->Draw("Error");
16974  kcountHEpositivedirectionReconoise5++;
16975  if (kcountHEpositivedirectionReconoise5 > 11)
16976  break; // 4x6 = 24
16977  } //ccctest>0
16978 
16979  } // for i
16980  } //if(jeta-41 >= -29 && jeta-41 <= -16)
16981  } //for jeta
16983  c3x5->Update();
16984  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
16985  c3x5->Clear();
16986  // clean-up
16987  if (h2CeffHEpositivedirectionReconoise5)
16988  delete h2CeffHEpositivedirectionReconoise5;
16989  //========================================================================================== 9
16990  //======================================================================
16991  //======================================================================1D plot: R vs phi , different eta, depth=6
16992  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
16993  c3x5->Clear();
16995  c3x5->Divide(3, 5);
16996  c3x5->cd(1);
16997  int kcountHEpositivedirectionReconoise6 = 1;
16998  TH1F* h2CeffHEpositivedirectionReconoise6 = new TH1F("h2CeffHEpositivedirectionReconoise6", "", nphi, 0., 72.);
16999 
17000  for (int jeta = 0; jeta < njeta; jeta++) {
17001  // positivedirectionReconoise:
17002  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17003  // for (int i=0;i<ndepth;i++) {
17004  // depth=6
17005  for (int i = 5; i < 6; i++) {
17006  TH1F* HEpositivedirectionReconoise6 = (TH1F*)h2CeffHEpositivedirectionReconoise6->Clone("twod1");
17007 
17008  float ccctest = 0; // to avoid empty massive elements
17009  for (int jphi = 0; jphi < nphi; jphi++) {
17010  double ccc1 = areconoisehe[i][jeta][jphi];
17011  if (ccc1 != 0.) {
17012  HEpositivedirectionReconoise6->Fill(jphi, ccc1);
17013  ccctest = 1.; //HEpositivedirectionReconoise6->SetBinError(i,0.01);
17014  }
17015  } // for jphi
17016  if (ccctest > 0.) {
17017  //cout<<"999 kcountHEpositivedirectionReconoise6 = "<<kcountHEpositivedirectionReconoise6 <<" jeta-41= "<< jeta-41 <<endl;
17018  c3x5->cd(kcountHEpositivedirectionReconoise6);
17019  HEpositivedirectionReconoise6->SetMarkerStyle(20);
17020  HEpositivedirectionReconoise6->SetMarkerSize(0.4);
17021  HEpositivedirectionReconoise6->GetYaxis()->SetLabelSize(0.04);
17022  HEpositivedirectionReconoise6->SetXTitle("HEpositivedirectionReconoise6 \b");
17023  HEpositivedirectionReconoise6->SetMarkerColor(2);
17024  HEpositivedirectionReconoise6->SetLineColor(0);
17025  gPad->SetGridy();
17026  gPad->SetGridx();
17027  // gPad->SetLogy();
17028  if (kcountHEpositivedirectionReconoise6 == 1)
17029  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 18; depth = 6 \b");
17030  if (kcountHEpositivedirectionReconoise6 == 2)
17031  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 19; depth = 6 \b");
17032  if (kcountHEpositivedirectionReconoise6 == 3)
17033  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 20; depth = 6 \b");
17034  if (kcountHEpositivedirectionReconoise6 == 4)
17035  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 21; depth = 6 \b");
17036  if (kcountHEpositivedirectionReconoise6 == 5)
17037  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 22; depth = 6 \b");
17038  if (kcountHEpositivedirectionReconoise6 == 6)
17039  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 23; depth = 6 \b");
17040  if (kcountHEpositivedirectionReconoise6 == 7)
17041  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 24; depth = 6 \b");
17042  if (kcountHEpositivedirectionReconoise6 == 8)
17043  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 25; depth = 6 \b");
17044  if (kcountHEpositivedirectionReconoise6 == 9)
17045  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 26; depth = 6 \b");
17046  if (kcountHEpositivedirectionReconoise6 == 10)
17047  HEpositivedirectionReconoise6->SetXTitle("R for HE+ jeta = 27; depth = 6 \b");
17048  HEpositivedirectionReconoise6->Draw("Error");
17049  kcountHEpositivedirectionReconoise6++;
17050  if (kcountHEpositivedirectionReconoise6 > 10)
17051  break; // 4x6 = 24
17052  } //ccctest>0
17053 
17054  } // for i
17055  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17056  } //for jeta
17058  c3x5->Update();
17059  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
17060  c3x5->Clear();
17061  // clean-up
17062  if (h2CeffHEpositivedirectionReconoise6)
17063  delete h2CeffHEpositivedirectionReconoise6;
17064  //========================================================================================== 10
17065  //======================================================================
17066  //======================================================================1D plot: R vs phi , different eta, depth=7
17067  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
17068  c3x5->Clear();
17070  c3x5->Divide(3, 5);
17071  c3x5->cd(1);
17072  int kcountHEpositivedirectionReconoise7 = 1;
17073  TH1F* h2CeffHEpositivedirectionReconoise7 = new TH1F("h2CeffHEpositivedirectionReconoise7", "", nphi, 0., 72.);
17074 
17075  for (int jeta = 0; jeta < njeta; jeta++) {
17076  // positivedirectionReconoise:
17077  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17078  // for (int i=0;i<ndepth;i++) {
17079  // depth=7
17080  for (int i = 6; i < 7; i++) {
17081  TH1F* HEpositivedirectionReconoise7 = (TH1F*)h2CeffHEpositivedirectionReconoise7->Clone("twod1");
17082 
17083  float ccctest = 0; // to avoid empty massive elements
17084  for (int jphi = 0; jphi < nphi; jphi++) {
17085  double ccc1 = areconoisehe[i][jeta][jphi];
17086  if (ccc1 != 0.) {
17087  HEpositivedirectionReconoise7->Fill(jphi, ccc1);
17088  ccctest = 1.; //HEpositivedirectionReconoise7->SetBinError(i,0.01);
17089  }
17090  } // for jphi
17091  if (ccctest > 0.) {
17092  //cout<<"1010 kcountHEpositivedirectionReconoise7 = "<<kcountHEpositivedirectionReconoise7 <<" jeta-41= "<< jeta-41 <<endl;
17093  c3x5->cd(kcountHEpositivedirectionReconoise7);
17094  HEpositivedirectionReconoise7->SetMarkerStyle(20);
17095  HEpositivedirectionReconoise7->SetMarkerSize(0.4);
17096  HEpositivedirectionReconoise7->GetYaxis()->SetLabelSize(0.04);
17097  HEpositivedirectionReconoise7->SetXTitle("HEpositivedirectionReconoise7 \b");
17098  HEpositivedirectionReconoise7->SetMarkerColor(2);
17099  HEpositivedirectionReconoise7->SetLineColor(0);
17100  gPad->SetGridy();
17101  gPad->SetGridx();
17102  // gPad->SetLogy();
17103  if (kcountHEpositivedirectionReconoise7 == 1)
17104  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 25; depth = 7 \b");
17105  if (kcountHEpositivedirectionReconoise7 == 2)
17106  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 26; depth = 7 \b");
17107  if (kcountHEpositivedirectionReconoise7 == 3)
17108  HEpositivedirectionReconoise7->SetXTitle("R for HE+ jeta = 27; depth = 7 \b");
17109  HEpositivedirectionReconoise7->Draw("Error");
17110  kcountHEpositivedirectionReconoise7++;
17111  if (kcountHEpositivedirectionReconoise7 > 3)
17112  break; //
17113  } //ccctest>0
17114 
17115  } // for i
17116  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17117  } //for jeta
17119  c3x5->Update();
17120  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
17121  c3x5->Clear();
17122  // clean-up
17123  if (h2CeffHEpositivedirectionReconoise7)
17124  delete h2CeffHEpositivedirectionReconoise7;
17125 
17127  //========================================================================================== 1114
17128  //======================================================================
17129  //======================================================================1D plot: R vs phi , different eta, depth=1
17130  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
17131  c3x5->Clear();
17133  c3x5->Divide(3, 5);
17134  c3x5->cd(1);
17135  int kcountHEnegativedirectionReconoise1 = 1;
17136  TH1F* h2CeffHEnegativedirectionReconoise1 = new TH1F("h2CeffHEnegativedirectionReconoise1", "", nphi, 0., 72.);
17137  for (int jeta = 0; jeta < njeta; jeta++) {
17138  // negativedirectionReconoise:
17139  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17140  // for (int i=0;i<ndepth;i++) {
17141  // depth=1
17142  for (int i = 0; i < 1; i++) {
17143  TH1F* HEnegativedirectionReconoise1 = (TH1F*)h2CeffHEnegativedirectionReconoise1->Clone("twod1");
17144  float ccctest = 0; // to avoid empty massive elements
17145  for (int jphi = 0; jphi < nphi; jphi++) {
17146  double ccc1 = areconoisehe[i][jeta][jphi];
17147  if (ccc1 != 0.) {
17148  HEnegativedirectionReconoise1->Fill(jphi, ccc1);
17149  ccctest = 1.; //HEnegativedirectionReconoise1->SetBinError(i,0.01);
17150  }
17151  } // for jphi
17152  if (ccctest > 0.) {
17153  // cout<<"444 kcountHEnegativedirectionReconoise1 = "<<kcountHEnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
17154  c3x5->cd(kcountHEnegativedirectionReconoise1);
17155  HEnegativedirectionReconoise1->SetMarkerStyle(20);
17156  HEnegativedirectionReconoise1->SetMarkerSize(0.4);
17157  HEnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
17158  HEnegativedirectionReconoise1->SetXTitle("HEnegativedirectionReconoise1 \b");
17159  HEnegativedirectionReconoise1->SetMarkerColor(2);
17160  HEnegativedirectionReconoise1->SetLineColor(0);
17161  gPad->SetGridy();
17162  gPad->SetGridx();
17163  // gPad->SetLogy();
17164  if (kcountHEnegativedirectionReconoise1 == 1)
17165  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-29; depth = 1 \b");
17166  if (kcountHEnegativedirectionReconoise1 == 2)
17167  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-28; depth = 1 \b");
17168  if (kcountHEnegativedirectionReconoise1 == 3)
17169  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-27; depth = 1 \b");
17170  if (kcountHEnegativedirectionReconoise1 == 4)
17171  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-26; depth = 1 \b");
17172  if (kcountHEnegativedirectionReconoise1 == 5)
17173  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-25; depth = 1 \b");
17174  if (kcountHEnegativedirectionReconoise1 == 6)
17175  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-24; depth = 1 \b");
17176  if (kcountHEnegativedirectionReconoise1 == 7)
17177  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-23; depth = 1 \b");
17178  if (kcountHEnegativedirectionReconoise1 == 8)
17179  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-22; depth = 1 \b");
17180  if (kcountHEnegativedirectionReconoise1 == 9)
17181  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-21; depth = 1 \b");
17182  if (kcountHEnegativedirectionReconoise1 == 10)
17183  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-20; depth = 1 \b");
17184  if (kcountHEnegativedirectionReconoise1 == 11)
17185  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-19; depth = 1 \b");
17186  if (kcountHEnegativedirectionReconoise1 == 12)
17187  HEnegativedirectionReconoise1->SetXTitle("R for HE- jeta =-18; depth = 1 \b");
17188  HEnegativedirectionReconoise1->Draw("Error");
17189  kcountHEnegativedirectionReconoise1++;
17190  if (kcountHEnegativedirectionReconoise1 > 12)
17191  break; // 4x6 = 24
17192  } //ccctest>0
17193 
17194  } // for i
17195  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17196  } //for jeta
17198  c3x5->Update();
17199  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
17200  c3x5->Clear();
17201  // clean-up
17202  if (h2CeffHEnegativedirectionReconoise1)
17203  delete h2CeffHEnegativedirectionReconoise1;
17204 
17205  //========================================================================================== 1115
17206  //======================================================================
17207  //======================================================================1D plot: R vs phi , different eta, depth=2
17208  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
17209  c3x5->Clear();
17211  c3x5->Divide(3, 5);
17212  c3x5->cd(1);
17213  int kcountHEnegativedirectionReconoise2 = 1;
17214  TH1F* h2CeffHEnegativedirectionReconoise2 = new TH1F("h2CeffHEnegativedirectionReconoise2", "", nphi, 0., 72.);
17215  for (int jeta = 0; jeta < njeta; jeta++) {
17216  // negativedirectionReconoise:
17217  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17218  // for (int i=0;i<ndepth;i++) {
17219  // depth=2
17220  for (int i = 1; i < 2; i++) {
17221  TH1F* HEnegativedirectionReconoise2 = (TH1F*)h2CeffHEnegativedirectionReconoise2->Clone("twod1");
17222  float ccctest = 0; // to avoid empty massive elements
17223  for (int jphi = 0; jphi < nphi; jphi++) {
17224  double ccc1 = areconoisehe[i][jeta][jphi];
17225  if (ccc1 != 0.) {
17226  HEnegativedirectionReconoise2->Fill(jphi, ccc1);
17227  ccctest = 1.; //HEnegativedirectionReconoise2->SetBinError(i,0.01);
17228  }
17229  } // for jphi
17230  if (ccctest > 0.) {
17231  //cout<<"555 kcountHEnegativedirectionReconoise2 = "<<kcountHEnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
17232  c3x5->cd(kcountHEnegativedirectionReconoise2);
17233  HEnegativedirectionReconoise2->SetMarkerStyle(20);
17234  HEnegativedirectionReconoise2->SetMarkerSize(0.4);
17235  HEnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
17236  HEnegativedirectionReconoise2->SetXTitle("HEnegativedirectionReconoise2 \b");
17237  HEnegativedirectionReconoise2->SetMarkerColor(2);
17238  HEnegativedirectionReconoise2->SetLineColor(0);
17239  gPad->SetGridy();
17240  gPad->SetGridx();
17241  // gPad->SetLogy();
17242  if (kcountHEnegativedirectionReconoise2 == 1)
17243  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-29; depth = 2 \b");
17244  if (kcountHEnegativedirectionReconoise2 == 2)
17245  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-28; depth = 2 \b");
17246  if (kcountHEnegativedirectionReconoise2 == 3)
17247  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-27; depth = 2 \b");
17248  if (kcountHEnegativedirectionReconoise2 == 4)
17249  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-26; depth = 2 \b");
17250  if (kcountHEnegativedirectionReconoise2 == 5)
17251  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-25; depth = 2 \b");
17252  if (kcountHEnegativedirectionReconoise2 == 6)
17253  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-24; depth = 2 \b");
17254  if (kcountHEnegativedirectionReconoise2 == 7)
17255  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-23; depth = 2 \b");
17256  if (kcountHEnegativedirectionReconoise2 == 8)
17257  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-22; depth = 2 \b");
17258  if (kcountHEnegativedirectionReconoise2 == 9)
17259  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-21; depth = 2 \b");
17260  if (kcountHEnegativedirectionReconoise2 == 10)
17261  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-20; depth = 2 \b");
17262  if (kcountHEnegativedirectionReconoise2 == 11)
17263  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-19; depth = 2 \b");
17264  if (kcountHEnegativedirectionReconoise2 == 12)
17265  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-18; depth = 2 \b");
17266  if (kcountHEnegativedirectionReconoise2 == 13)
17267  HEnegativedirectionReconoise2->SetXTitle("R for HE- jeta =-17; depth = 2 \b");
17268  HEnegativedirectionReconoise2->Draw("Error");
17269  kcountHEnegativedirectionReconoise2++;
17270  if (kcountHEnegativedirectionReconoise2 > 13)
17271  break; // 4x6 = 24
17272  } //ccctest>0
17273 
17274  } // for i
17275  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17276  } //for jeta
17278  c3x5->Update();
17279  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
17280  c3x5->Clear();
17281  // clean-up
17282  if (h2CeffHEnegativedirectionReconoise2)
17283  delete h2CeffHEnegativedirectionReconoise2;
17284  //========================================================================================== 1116
17285  //======================================================================
17286  //======================================================================1D plot: R vs phi , different eta, depth=3
17287  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
17288  c3x5->Clear();
17290  c3x5->Divide(3, 5);
17291  c3x5->cd(1);
17292  int kcountHEnegativedirectionReconoise3 = 1;
17293  TH1F* h2CeffHEnegativedirectionReconoise3 = new TH1F("h2CeffHEnegativedirectionReconoise3", "", nphi, 0., 72.);
17294  for (int jeta = 0; jeta < njeta; jeta++) {
17295  // negativedirectionReconoise:
17296  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17297  // for (int i=0;i<ndepth;i++) {
17298  // depth=3
17299  for (int i = 2; i < 3; i++) {
17300  TH1F* HEnegativedirectionReconoise3 = (TH1F*)h2CeffHEnegativedirectionReconoise3->Clone("twod1");
17301  float ccctest = 0; // to avoid empty massive elements
17302  for (int jphi = 0; jphi < nphi; jphi++) {
17303  double ccc1 = areconoisehe[i][jeta][jphi];
17304  if (ccc1 != 0.) {
17305  HEnegativedirectionReconoise3->Fill(jphi, ccc1);
17306  ccctest = 1.; //HEnegativedirectionReconoise3->SetBinError(i,0.01);
17307  }
17308  } // for jphi
17309  if (ccctest > 0.) {
17310  //cout<<"666 kcountHEnegativedirectionReconoise3 = "<<kcountHEnegativedirectionReconoise3 <<" jeta-41= "<< jeta-41 <<endl;
17311  c3x5->cd(kcountHEnegativedirectionReconoise3);
17312  HEnegativedirectionReconoise3->SetMarkerStyle(20);
17313  HEnegativedirectionReconoise3->SetMarkerSize(0.4);
17314  HEnegativedirectionReconoise3->GetYaxis()->SetLabelSize(0.04);
17315  HEnegativedirectionReconoise3->SetXTitle("HEnegativedirectionReconoise3 \b");
17316  HEnegativedirectionReconoise3->SetMarkerColor(2);
17317  HEnegativedirectionReconoise3->SetLineColor(0);
17318  gPad->SetGridy();
17319  gPad->SetGridx();
17320  // gPad->SetLogy();
17321  if (kcountHEnegativedirectionReconoise3 == 1)
17322  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-29; depth = 3 \b");
17323  if (kcountHEnegativedirectionReconoise3 == 2)
17324  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-28; depth = 3 \b");
17325  if (kcountHEnegativedirectionReconoise3 == 3)
17326  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-27; depth = 3 \b");
17327  if (kcountHEnegativedirectionReconoise3 == 4)
17328  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-26; depth = 3 \b");
17329  if (kcountHEnegativedirectionReconoise3 == 5)
17330  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-25; depth = 3 \b");
17331  if (kcountHEnegativedirectionReconoise3 == 6)
17332  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-24; depth = 3 \b");
17333  if (kcountHEnegativedirectionReconoise3 == 7)
17334  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-23; depth = 3 \b");
17335  if (kcountHEnegativedirectionReconoise3 == 8)
17336  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-22; depth = 3 \b");
17337  if (kcountHEnegativedirectionReconoise3 == 9)
17338  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-21; depth = 3 \b");
17339  if (kcountHEnegativedirectionReconoise3 == 10)
17340  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-20; depth = 3 \b");
17341  if (kcountHEnegativedirectionReconoise3 == 11)
17342  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-19; depth = 3 \b");
17343  if (kcountHEnegativedirectionReconoise3 == 12)
17344  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-18; depth = 3 \b");
17345  if (kcountHEnegativedirectionReconoise3 == 13)
17346  HEnegativedirectionReconoise3->SetXTitle("R for HE- jeta =-17; depth = 3 \b");
17347  HEnegativedirectionReconoise3->Draw("Error");
17348  kcountHEnegativedirectionReconoise3++;
17349  if (kcountHEnegativedirectionReconoise3 > 13)
17350  break; // 4x6 = 24
17351  } //ccctest>0
17352 
17353  } // for i
17354  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17355  } //for jeta
17357  c3x5->Update();
17358  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
17359  c3x5->Clear();
17360  // clean-up
17361  if (h2CeffHEnegativedirectionReconoise3)
17362  delete h2CeffHEnegativedirectionReconoise3;
17363  //========================================================================================== 1117
17364  //======================================================================
17365  //======================================================================1D plot: R vs phi , different eta, depth=4
17366  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
17367  c3x5->Clear();
17369  c3x5->Divide(3, 5);
17370  c3x5->cd(1);
17371  int kcountHEnegativedirectionReconoise4 = 1;
17372  TH1F* h2CeffHEnegativedirectionReconoise4 = new TH1F("h2CeffHEnegativedirectionReconoise4", "", nphi, 0., 72.);
17373 
17374  for (int jeta = 0; jeta < njeta; jeta++) {
17375  // negativedirectionReconoise:
17376  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17377  // for (int i=0;i<ndepth;i++) {
17378  // depth=4
17379  for (int i = 3; i < 4; i++) {
17380  TH1F* HEnegativedirectionReconoise4 = (TH1F*)h2CeffHEnegativedirectionReconoise4->Clone("twod1");
17381 
17382  float ccctest = 0; // to avoid empty massive elements
17383  for (int jphi = 0; jphi < nphi; jphi++) {
17384  double ccc1 = areconoisehe[i][jeta][jphi];
17385  if (ccc1 != 0.) {
17386  HEnegativedirectionReconoise4->Fill(jphi, ccc1);
17387  ccctest = 1.; //HEnegativedirectionReconoise4->SetBinError(i,0.01);
17388  }
17389  } // for jphi
17390  if (ccctest > 0.) {
17391  //cout<<"777 kcountHEnegativedirectionReconoise4 = "<<kcountHEnegativedirectionReconoise4 <<" jeta-41= "<< jeta-41 <<endl;
17392  c3x5->cd(kcountHEnegativedirectionReconoise4);
17393  HEnegativedirectionReconoise4->SetMarkerStyle(20);
17394  HEnegativedirectionReconoise4->SetMarkerSize(0.4);
17395  HEnegativedirectionReconoise4->GetYaxis()->SetLabelSize(0.04);
17396  HEnegativedirectionReconoise4->SetXTitle("HEnegativedirectionReconoise4 \b");
17397  HEnegativedirectionReconoise4->SetMarkerColor(2);
17398  HEnegativedirectionReconoise4->SetLineColor(0);
17399  gPad->SetGridy();
17400  gPad->SetGridx();
17401  // gPad->SetLogy();
17402  if (kcountHEnegativedirectionReconoise4 == 1)
17403  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-28; depth = 4 \b");
17404  if (kcountHEnegativedirectionReconoise4 == 2)
17405  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-27; depth = 4 \b");
17406  if (kcountHEnegativedirectionReconoise4 == 3)
17407  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-26; depth = 4 \b");
17408  if (kcountHEnegativedirectionReconoise4 == 4)
17409  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-25; depth = 4 \b");
17410  if (kcountHEnegativedirectionReconoise4 == 5)
17411  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-24; depth = 4 \b");
17412  if (kcountHEnegativedirectionReconoise4 == 6)
17413  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-23; depth = 4 \b");
17414  if (kcountHEnegativedirectionReconoise4 == 7)
17415  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-22; depth = 4 \b");
17416  if (kcountHEnegativedirectionReconoise4 == 8)
17417  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-21; depth = 4 \b");
17418  if (kcountHEnegativedirectionReconoise4 == 9)
17419  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-20; depth = 4 \b");
17420  if (kcountHEnegativedirectionReconoise4 == 10)
17421  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-19; depth = 4 \b");
17422  if (kcountHEnegativedirectionReconoise4 == 11)
17423  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-18; depth = 4 \b");
17424  if (kcountHEnegativedirectionReconoise4 == 12)
17425  HEnegativedirectionReconoise4->SetXTitle("R for HE- jeta =-16; depth = 4 \b");
17426  HEnegativedirectionReconoise4->Draw("Error");
17427  kcountHEnegativedirectionReconoise4++;
17428  if (kcountHEnegativedirectionReconoise4 > 12)
17429  break; // 4x6 = 24
17430  } //ccctest>0
17431 
17432  } // for i
17433  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17434  } //for jeta
17436  c3x5->Update();
17437  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
17438  c3x5->Clear();
17439  // clean-up
17440  if (h2CeffHEnegativedirectionReconoise4)
17441  delete h2CeffHEnegativedirectionReconoise4;
17442  //========================================================================================== 1118
17443  //======================================================================
17444  //======================================================================1D plot: R vs phi , different eta, depth=5
17445  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
17446  c3x5->Clear();
17448  c3x5->Divide(3, 5);
17449  c3x5->cd(1);
17450  int kcountHEnegativedirectionReconoise5 = 1;
17451  TH1F* h2CeffHEnegativedirectionReconoise5 = new TH1F("h2CeffHEnegativedirectionReconoise5", "", nphi, 0., 72.);
17452 
17453  for (int jeta = 0; jeta < njeta; jeta++) {
17454  // negativedirectionReconoise:
17455  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17456  // for (int i=0;i<ndepth;i++) {
17457  // depth=5
17458  for (int i = 4; i < 5; i++) {
17459  TH1F* HEnegativedirectionReconoise5 = (TH1F*)h2CeffHEnegativedirectionReconoise5->Clone("twod1");
17460 
17461  float ccctest = 0; // to avoid empty massive elements
17462  for (int jphi = 0; jphi < nphi; jphi++) {
17463  // cout<<"888 initial kcountHEnegativedirectionReconoise5 = "<<kcountHEnegativedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" areconoisehe[i][jeta][jphi]= "<< areconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
17464 
17465  double ccc1 = areconoisehe[i][jeta][jphi];
17466  if (ccc1 != 0.) {
17467  HEnegativedirectionReconoise5->Fill(jphi, ccc1);
17468  ccctest = 1.; //HEnegativedirectionReconoise5->SetBinError(i,0.01);
17469  }
17470  } // for jphi
17471  if (ccctest > 0.) {
17472  //cout<<"888 kcountHEnegativedirectionReconoise5 = "<<kcountHEnegativedirectionReconoise5 <<" jeta-41= "<< jeta-41 <<endl;
17473  c3x5->cd(kcountHEnegativedirectionReconoise5);
17474  HEnegativedirectionReconoise5->SetMarkerStyle(20);
17475  HEnegativedirectionReconoise5->SetMarkerSize(0.4);
17476  HEnegativedirectionReconoise5->GetYaxis()->SetLabelSize(0.04);
17477  HEnegativedirectionReconoise5->SetXTitle("HEnegativedirectionReconoise5 \b");
17478  HEnegativedirectionReconoise5->SetMarkerColor(2);
17479  HEnegativedirectionReconoise5->SetLineColor(0);
17480  gPad->SetGridy();
17481  gPad->SetGridx();
17482  // gPad->SetLogy();
17483  if (kcountHEnegativedirectionReconoise5 == 1)
17484  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-28; depth = 5 \b");
17485  if (kcountHEnegativedirectionReconoise5 == 2)
17486  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-27; depth = 5 \b");
17487  if (kcountHEnegativedirectionReconoise5 == 3)
17488  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-26; depth = 5 \b");
17489  if (kcountHEnegativedirectionReconoise5 == 4)
17490  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-25; depth = 5 \b");
17491  if (kcountHEnegativedirectionReconoise5 == 5)
17492  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-24; depth = 5 \b");
17493  if (kcountHEnegativedirectionReconoise5 == 6)
17494  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-23; depth = 5 \b");
17495  if (kcountHEnegativedirectionReconoise5 == 7)
17496  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-22; depth = 5 \b");
17497  if (kcountHEnegativedirectionReconoise5 == 8)
17498  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-21; depth = 5 \b");
17499  if (kcountHEnegativedirectionReconoise5 == 9)
17500  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-20; depth = 5 \b");
17501  if (kcountHEnegativedirectionReconoise5 == 10)
17502  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-19; depth = 5 \b");
17503  if (kcountHEnegativedirectionReconoise5 == 11)
17504  HEnegativedirectionReconoise5->SetXTitle("R for HE- jeta =-18; depth = 5 \b");
17505  HEnegativedirectionReconoise5->Draw("Error");
17506  kcountHEnegativedirectionReconoise5++;
17507  if (kcountHEnegativedirectionReconoise5 > 11)
17508  break; // 4x6 = 24
17509  } //ccctest>0
17510 
17511  } // for i
17512  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17513  } //for jeta
17515  c3x5->Update();
17516  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
17517  c3x5->Clear();
17518  // clean-up
17519  if (h2CeffHEnegativedirectionReconoise5)
17520  delete h2CeffHEnegativedirectionReconoise5;
17521  //========================================================================================== 1119
17522  //======================================================================
17523  //======================================================================1D plot: R vs phi , different eta, depth=6
17524  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
17525  c3x5->Clear();
17527  c3x5->Divide(3, 5);
17528  c3x5->cd(1);
17529  int kcountHEnegativedirectionReconoise6 = 1;
17530  TH1F* h2CeffHEnegativedirectionReconoise6 = new TH1F("h2CeffHEnegativedirectionReconoise6", "", nphi, 0., 72.);
17531 
17532  for (int jeta = 0; jeta < njeta; jeta++) {
17533  // negativedirectionReconoise:
17534  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17535  // for (int i=0;i<ndepth;i++) {
17536  // depth=6
17537  for (int i = 5; i < 6; i++) {
17538  TH1F* HEnegativedirectionReconoise6 = (TH1F*)h2CeffHEnegativedirectionReconoise6->Clone("twod1");
17539 
17540  float ccctest = 0; // to avoid empty massive elements
17541  for (int jphi = 0; jphi < nphi; jphi++) {
17542  double ccc1 = areconoisehe[i][jeta][jphi];
17543  if (ccc1 != 0.) {
17544  HEnegativedirectionReconoise6->Fill(jphi, ccc1);
17545  ccctest = 1.; //HEnegativedirectionReconoise6->SetBinError(i,0.01);
17546  }
17547  } // for jphi
17548  if (ccctest > 0.) {
17549  //cout<<"999 kcountHEnegativedirectionReconoise6 = "<<kcountHEnegativedirectionReconoise6 <<" jeta-41= "<< jeta-41 <<endl;
17550  c3x5->cd(kcountHEnegativedirectionReconoise6);
17551  HEnegativedirectionReconoise6->SetMarkerStyle(20);
17552  HEnegativedirectionReconoise6->SetMarkerSize(0.4);
17553  HEnegativedirectionReconoise6->GetYaxis()->SetLabelSize(0.04);
17554  HEnegativedirectionReconoise6->SetXTitle("HEnegativedirectionReconoise6 \b");
17555  HEnegativedirectionReconoise6->SetMarkerColor(2);
17556  HEnegativedirectionReconoise6->SetLineColor(0);
17557  gPad->SetGridy();
17558  gPad->SetGridx();
17559  // gPad->SetLogy();
17560  if (kcountHEnegativedirectionReconoise6 == 1)
17561  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-28; depth = 6 \b");
17562  if (kcountHEnegativedirectionReconoise6 == 2)
17563  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-27; depth = 6 \b");
17564  if (kcountHEnegativedirectionReconoise6 == 3)
17565  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-26; depth = 6 \b");
17566  if (kcountHEnegativedirectionReconoise6 == 4)
17567  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-25; depth = 6 \b");
17568  if (kcountHEnegativedirectionReconoise6 == 5)
17569  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-24; depth = 6 \b");
17570  if (kcountHEnegativedirectionReconoise6 == 6)
17571  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-23; depth = 6 \b");
17572  if (kcountHEnegativedirectionReconoise6 == 7)
17573  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-22; depth = 6 \b");
17574  if (kcountHEnegativedirectionReconoise6 == 8)
17575  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-21; depth = 6 \b");
17576  if (kcountHEnegativedirectionReconoise6 == 9)
17577  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-20; depth = 6 \b");
17578  if (kcountHEnegativedirectionReconoise6 == 10)
17579  HEnegativedirectionReconoise6->SetXTitle("R for HE- jeta =-19; depth = 6 \b");
17580  HEnegativedirectionReconoise6->Draw("Error");
17581  kcountHEnegativedirectionReconoise6++;
17582  if (kcountHEnegativedirectionReconoise6 > 10)
17583  break; // 4x6 = 24
17584  } //ccctest>0
17585 
17586  } // for i
17587  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17588  } //for jeta
17590  c3x5->Update();
17591  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
17592  c3x5->Clear();
17593  // clean-up
17594  if (h2CeffHEnegativedirectionReconoise6)
17595  delete h2CeffHEnegativedirectionReconoise6;
17596  //========================================================================================== 11110
17597  //======================================================================
17598  //======================================================================1D plot: R vs phi , different eta, depth=7
17599  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
17600  c3x5->Clear();
17602  c3x5->Divide(3, 5);
17603  c3x5->cd(1);
17604  int kcountHEnegativedirectionReconoise7 = 1;
17605  TH1F* h2CeffHEnegativedirectionReconoise7 = new TH1F("h2CeffHEnegativedirectionReconoise7", "", nphi, 0., 72.);
17606 
17607  for (int jeta = 0; jeta < njeta; jeta++) {
17608  // negativedirectionReconoise:
17609  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
17610  // for (int i=0;i<ndepth;i++) {
17611  // depth=7
17612  for (int i = 6; i < 7; i++) {
17613  TH1F* HEnegativedirectionReconoise7 = (TH1F*)h2CeffHEnegativedirectionReconoise7->Clone("twod1");
17614 
17615  float ccctest = 0; // to avoid empty massive elements
17616  for (int jphi = 0; jphi < nphi; jphi++) {
17617  double ccc1 = areconoisehe[i][jeta][jphi];
17618  if (ccc1 != 0.) {
17619  HEnegativedirectionReconoise7->Fill(jphi, ccc1);
17620  ccctest = 1.; //HEnegativedirectionReconoise7->SetBinError(i,0.01);
17621  }
17622  } // for jphi
17623  if (ccctest > 0.) {
17624  //cout<<"1010 kcountHEnegativedirectionReconoise7 = "<<kcountHEnegativedirectionReconoise7 <<" jeta-41= "<< jeta-41 <<endl;
17625  c3x5->cd(kcountHEnegativedirectionReconoise7);
17626  HEnegativedirectionReconoise7->SetMarkerStyle(20);
17627  HEnegativedirectionReconoise7->SetMarkerSize(0.4);
17628  HEnegativedirectionReconoise7->GetYaxis()->SetLabelSize(0.04);
17629  HEnegativedirectionReconoise7->SetXTitle("HEnegativedirectionReconoise7 \b");
17630  HEnegativedirectionReconoise7->SetMarkerColor(2);
17631  HEnegativedirectionReconoise7->SetLineColor(0);
17632  gPad->SetGridy();
17633  gPad->SetGridx();
17634  // gPad->SetLogy();
17635  if (kcountHEnegativedirectionReconoise7 == 1)
17636  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-28; depth = 7 \b");
17637  if (kcountHEnegativedirectionReconoise7 == 2)
17638  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-27; depth = 7 \b");
17639  if (kcountHEnegativedirectionReconoise7 == 3)
17640  HEnegativedirectionReconoise7->SetXTitle("R for HE- jeta =-26; depth = 7 \b");
17641  HEnegativedirectionReconoise7->Draw("Error");
17642  kcountHEnegativedirectionReconoise7++;
17643  if (kcountHEnegativedirectionReconoise7 > 3)
17644  break; // 4x6 = 24
17645  } //ccctest>0
17646 
17647  } // for i
17648  } //if(jeta-41 >= -29 && jeta-41 <= -16)
17649  } //for jeta
17651  c3x5->Update();
17652  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
17653  c3x5->Clear();
17654  // clean-up
17655  if (h2CeffHEnegativedirectionReconoise7)
17656  delete h2CeffHEnegativedirectionReconoise7;
17657 
17658  //======================================================================================================================
17659  //======================================================================================================================
17661  //======================================================================================================================
17662  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HE
17663  //======================================================================================================================
17664  //======================================================================
17665  c2x1->Clear();
17667  c2x1->Divide(2, 1);
17668  c2x1->cd(1);
17669  TH2F* GefzDIFreconoiseHE42D = new TH2F("GefzDIFreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
17670  TH2F* GefzDIFreconoiseHE42D0 = new TH2F("GefzDIFreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
17671  TH2F* GefzDIFreconoiseHE42DF = (TH2F*)GefzDIFreconoiseHE42D0->Clone("GefzDIFreconoiseHE42DF");
17672  for (int i = 0; i < ndepth; i++) {
17673  for (int jeta = 0; jeta < neta; jeta++) {
17674  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
17675  for (int jphi = 0; jphi < nphi; jphi++) {
17676  double ccc1 = breconoisehe[i][jeta][jphi];
17677  int k2plot = jeta - 41;
17678  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
17679  if (ccc1 != 0.) {
17680  GefzDIFreconoiseHE42D->Fill(kkk, jphi, ccc1);
17681  GefzDIFreconoiseHE42D0->Fill(kkk, jphi, 1.);
17682  }
17683  }
17684  }
17685  }
17686  }
17687  GefzDIFreconoiseHE42DF->Divide(GefzDIFreconoiseHE42D, GefzDIFreconoiseHE42D0, 1, 1, "B"); // average A
17688  gPad->SetGridy();
17689  gPad->SetGridx(); // gPad->SetLogz();
17690  GefzDIFreconoiseHE42DF->SetXTitle("<DIF>_depth #eta \b");
17691  GefzDIFreconoiseHE42DF->SetYTitle(" #phi \b");
17692  GefzDIFreconoiseHE42DF->Draw("COLZ");
17693 
17694  //c2x1->cd(2);
17695  //TH1F *energyhitNoise_HE= (TH1F*)dir->FindObjectAny("h_energyhitNoise_HE");
17696  //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");
17697 
17699  c2x1->Update();
17700  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHE.png");
17701  c2x1->Clear();
17702  // clean-up
17703  if (GefzDIFreconoiseHE42D)
17704  delete GefzDIFreconoiseHE42D;
17705  if (GefzDIFreconoiseHE42D0)
17706  delete GefzDIFreconoiseHE42D0;
17707  if (GefzDIFreconoiseHE42DF)
17708  delete GefzDIFreconoiseHE42DF;
17709  //====================================================================== 1D plot: DIF vs phi , averaged over depthes & eta
17710  //======================================================================
17711  //cout<<" 1D plot: DIF vs phi , averaged over depthes & eta *****" <<endl;
17712  c1x1->Clear();
17714  c1x1->Divide(1, 1);
17715  c1x1->cd(1);
17716  TH1F* GefzDIFreconoiseHE41D = new TH1F("GefzDIFreconoiseHE41D", "", nphi, 0., 72.);
17717  TH1F* GefzDIFreconoiseHE41D0 = new TH1F("GefzDIFreconoiseHE41D0", "", nphi, 0., 72.);
17718  TH1F* GefzDIFreconoiseHE41DF = (TH1F*)GefzDIFreconoiseHE41D0->Clone("GefzDIFreconoiseHE41DF");
17719  for (int jphi = 0; jphi < nphi; jphi++) {
17720  for (int jeta = 0; jeta < neta; jeta++) {
17721  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
17722  for (int i = 0; i < ndepth; i++) {
17723  double ccc1 = breconoisehe[i][jeta][jphi];
17724  if (ccc1 != 0.) {
17725  GefzDIFreconoiseHE41D->Fill(jphi, ccc1);
17726  GefzDIFreconoiseHE41D0->Fill(jphi, 1.);
17727  }
17728  }
17729  }
17730  }
17731  }
17732  GefzDIFreconoiseHE41DF->Divide(
17733  GefzDIFreconoiseHE41D, GefzDIFreconoiseHE41D0, 1, 1, "B"); // DIF averaged over depthes & eta
17734  GefzDIFreconoiseHE41D0->Sumw2();
17735  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHE41DF->SetBinError(jphi,0.01);}
17736  gPad->SetGridy();
17737  gPad->SetGridx(); // gPad->SetLogz();
17738  GefzDIFreconoiseHE41DF->SetMarkerStyle(20);
17739  GefzDIFreconoiseHE41DF->SetMarkerSize(1.4);
17740  GefzDIFreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
17741  GefzDIFreconoiseHE41DF->SetXTitle("#phi \b");
17742  GefzDIFreconoiseHE41DF->SetYTitle(" <DIF> \b");
17743  GefzDIFreconoiseHE41DF->SetZTitle("<DIF>_PHI - AllDepthes \b");
17744  GefzDIFreconoiseHE41DF->SetMarkerColor(4);
17745  GefzDIFreconoiseHE41DF->SetLineColor(
17746  4); // GefzDIFreconoiseHE41DF->SetMinimum(0.8); // GefzDIFreconoiseHE41DF->SetMaximum(1.000);
17747  GefzDIFreconoiseHE41DF->Draw("Error");
17749  c1x1->Update();
17750  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHE.png");
17751  c1x1->Clear();
17752  // clean-up
17753  if (GefzDIFreconoiseHE41D)
17754  delete GefzDIFreconoiseHE41D;
17755  if (GefzDIFreconoiseHE41D0)
17756  delete GefzDIFreconoiseHE41D0;
17757  if (GefzDIFreconoiseHE41DF)
17758  delete GefzDIFreconoiseHE41DF;
17759 
17760  //========================================================================================== 4
17761  //======================================================================
17762  //======================================================================1D plot: DIF vs phi , different eta, depth=1
17763  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
17764  c3x5->Clear();
17766  c3x5->Divide(3, 5);
17767  c3x5->cd(1);
17768  int kcountHEpositivedirectionReconoiseDIF1 = 1;
17769  TH1F* h2CeffHEpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
17770  for (int jeta = 0; jeta < njeta; jeta++) {
17771  // positivedirectionReconoiseDIF:
17772  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17773  // for (int i=0;i<ndepth;i++) {
17774  // depth=1
17775  for (int i = 0; i < 1; i++) {
17776  TH1F* HEpositivedirectionReconoiseDIF1 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF1->Clone("twod1");
17777  float ccctest = 0; // to avoid empty massive elements
17778  for (int jphi = 0; jphi < nphi; jphi++) {
17779  double ccc1 = breconoisehe[i][jeta][jphi];
17780  if (ccc1 != 0.) {
17781  HEpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
17782  ccctest = 1.; //HEpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
17783  }
17784  } // for jphi
17785  if (ccctest > 0.) {
17786  // cout<<"444 kcountHEpositivedirectionReconoiseDIF1 = "<<kcountHEpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
17787  c3x5->cd(kcountHEpositivedirectionReconoiseDIF1);
17788  HEpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
17789  HEpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
17790  HEpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
17791  HEpositivedirectionReconoiseDIF1->SetXTitle("HEpositivedirectionReconoiseDIF1 \b");
17792  HEpositivedirectionReconoiseDIF1->SetMarkerColor(2);
17793  HEpositivedirectionReconoiseDIF1->SetLineColor(0);
17794  gPad->SetGridy();
17795  gPad->SetGridx();
17796  // gPad->SetLogy();
17797  if (kcountHEpositivedirectionReconoiseDIF1 == 1)
17798  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 17; depth = 1 \b");
17799  if (kcountHEpositivedirectionReconoiseDIF1 == 2)
17800  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 18; depth = 1 \b");
17801  if (kcountHEpositivedirectionReconoiseDIF1 == 3)
17802  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 19; depth = 1 \b");
17803  if (kcountHEpositivedirectionReconoiseDIF1 == 4)
17804  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 20; depth = 1 \b");
17805  if (kcountHEpositivedirectionReconoiseDIF1 == 5)
17806  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 21; depth = 1 \b");
17807  if (kcountHEpositivedirectionReconoiseDIF1 == 6)
17808  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 22; depth = 1 \b");
17809  if (kcountHEpositivedirectionReconoiseDIF1 == 7)
17810  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 23; depth = 1 \b");
17811  if (kcountHEpositivedirectionReconoiseDIF1 == 8)
17812  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 24; depth = 1 \b");
17813  if (kcountHEpositivedirectionReconoiseDIF1 == 9)
17814  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 25; depth = 1 \b");
17815  if (kcountHEpositivedirectionReconoiseDIF1 == 10)
17816  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 26; depth = 1 \b");
17817  if (kcountHEpositivedirectionReconoiseDIF1 == 11)
17818  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 27; depth = 1 \b");
17819  if (kcountHEpositivedirectionReconoiseDIF1 == 12)
17820  HEpositivedirectionReconoiseDIF1->SetXTitle("DIF for HE+ jeta = 28; depth = 1 \b");
17821  HEpositivedirectionReconoiseDIF1->Draw("Error");
17822  kcountHEpositivedirectionReconoiseDIF1++;
17823  if (kcountHEpositivedirectionReconoiseDIF1 > 12)
17824  break; // 4x6 = 24
17825  } //ccctest>0
17826 
17827  } // for i
17828  } //if(jeta-41 >= 15 && jeta-41 <= 28
17829  } //for jeta
17831  c3x5->Update();
17832  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
17833  c3x5->Clear();
17834  // clean-up
17835  if (h2CeffHEpositivedirectionReconoiseDIF1)
17836  delete h2CeffHEpositivedirectionReconoiseDIF1;
17837 
17838  //========================================================================================== 5
17839  //======================================================================
17840  //======================================================================1D plot: R vs phi , different eta, depth=2
17841  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
17842  c3x5->Clear();
17844  c3x5->Divide(3, 5);
17845  c3x5->cd(1);
17846  int kcountHEpositivedirectionReconoiseDIF2 = 1;
17847  TH1F* h2CeffHEpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
17848  for (int jeta = 0; jeta < njeta; jeta++) {
17849  // positivedirectionReconoiseDIF:
17850  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17851  // for (int i=0;i<ndepth;i++) {
17852  // depth=2
17853  for (int i = 1; i < 2; i++) {
17854  TH1F* HEpositivedirectionReconoiseDIF2 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF2->Clone("twod1");
17855  float ccctest = 0; // to avoid empty massive elements
17856  for (int jphi = 0; jphi < nphi; jphi++) {
17857  double ccc1 = breconoisehe[i][jeta][jphi];
17858  if (ccc1 != 0.) {
17859  HEpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
17860  ccctest = 1.; //HEpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
17861  }
17862  } // for jphi
17863  if (ccctest > 0.) {
17864  //cout<<"555 kcountHEpositivedirectionReconoiseDIF2 = "<<kcountHEpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
17865  c3x5->cd(kcountHEpositivedirectionReconoiseDIF2);
17866  HEpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
17867  HEpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
17868  HEpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
17869  HEpositivedirectionReconoiseDIF2->SetXTitle("HEpositivedirectionReconoiseDIF2 \b");
17870  HEpositivedirectionReconoiseDIF2->SetMarkerColor(2);
17871  HEpositivedirectionReconoiseDIF2->SetLineColor(0);
17872  gPad->SetGridy();
17873  gPad->SetGridx();
17874  // gPad->SetLogy();
17875  if (kcountHEpositivedirectionReconoiseDIF2 == 1)
17876  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 16; depth = 2 \b");
17877  if (kcountHEpositivedirectionReconoiseDIF2 == 2)
17878  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 17; depth = 2 \b");
17879  if (kcountHEpositivedirectionReconoiseDIF2 == 3)
17880  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 18; depth = 2 \b");
17881  if (kcountHEpositivedirectionReconoiseDIF2 == 4)
17882  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 19; depth = 2 \b");
17883  if (kcountHEpositivedirectionReconoiseDIF2 == 5)
17884  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 20; depth = 2 \b");
17885  if (kcountHEpositivedirectionReconoiseDIF2 == 6)
17886  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 21; depth = 2 \b");
17887  if (kcountHEpositivedirectionReconoiseDIF2 == 7)
17888  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 22; depth = 2 \b");
17889  if (kcountHEpositivedirectionReconoiseDIF2 == 8)
17890  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 23; depth = 2 \b");
17891  if (kcountHEpositivedirectionReconoiseDIF2 == 9)
17892  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 24; depth = 2 \b");
17893  if (kcountHEpositivedirectionReconoiseDIF2 == 10)
17894  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 25; depth = 2 \b");
17895  if (kcountHEpositivedirectionReconoiseDIF2 == 11)
17896  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 26; depth = 2 \b");
17897  if (kcountHEpositivedirectionReconoiseDIF2 == 12)
17898  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 27; depth = 2 \b");
17899  if (kcountHEpositivedirectionReconoiseDIF2 == 13)
17900  HEpositivedirectionReconoiseDIF2->SetXTitle("DIF for HE+ jeta = 28; depth = 2 \b");
17901  HEpositivedirectionReconoiseDIF2->Draw("Error");
17902  kcountHEpositivedirectionReconoiseDIF2++;
17903  if (kcountHEpositivedirectionReconoiseDIF2 > 13)
17904  break; // 4x6 = 24
17905  } //ccctest>0
17906 
17907  } // for i
17908  } //if(jeta-41
17909  } //for jeta
17911  c3x5->Update();
17912  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
17913  c3x5->Clear();
17914  // clean-up
17915  if (h2CeffHEpositivedirectionReconoiseDIF2)
17916  delete h2CeffHEpositivedirectionReconoiseDIF2;
17917  //========================================================================================== 6
17918  //======================================================================
17919  //======================================================================1D plot: R vs phi , different eta, depth=3
17920  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
17921  c3x5->Clear();
17923  c3x5->Divide(3, 5);
17924  c3x5->cd(1);
17925  int kcountHEpositivedirectionReconoiseDIF3 = 1;
17926  TH1F* h2CeffHEpositivedirectionReconoiseDIF3 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF3", "", nphi, 0., 72.);
17927  for (int jeta = 0; jeta < njeta; jeta++) {
17928  // positivedirectionReconoiseDIF:
17929  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
17930  // for (int i=0;i<ndepth;i++) {
17931  // depth=3
17932  for (int i = 2; i < 3; i++) {
17933  TH1F* HEpositivedirectionReconoiseDIF3 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF3->Clone("twod1");
17934  float ccctest = 0; // to avoid empty massive elements
17935  for (int jphi = 0; jphi < nphi; jphi++) {
17936  double ccc1 = breconoisehe[i][jeta][jphi];
17937  if (ccc1 != 0.) {
17938  HEpositivedirectionReconoiseDIF3->Fill(jphi, ccc1);
17939  ccctest = 1.; //HEpositivedirectionReconoiseDIF3->SetBinError(i,0.01);
17940  }
17941  } // for jphi
17942  if (ccctest > 0.) {
17943  //cout<<"666 kcountHEpositivedirectionReconoiseDIF3 = "<<kcountHEpositivedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
17944  c3x5->cd(kcountHEpositivedirectionReconoiseDIF3);
17945  HEpositivedirectionReconoiseDIF3->SetMarkerStyle(20);
17946  HEpositivedirectionReconoiseDIF3->SetMarkerSize(0.4);
17947  HEpositivedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
17948  HEpositivedirectionReconoiseDIF3->SetXTitle("HEpositivedirectionReconoiseDIF3 \b");
17949  HEpositivedirectionReconoiseDIF3->SetMarkerColor(2);
17950  HEpositivedirectionReconoiseDIF3->SetLineColor(0);
17951  gPad->SetGridy();
17952  gPad->SetGridx();
17953  // gPad->SetLogy();
17954  if (kcountHEpositivedirectionReconoiseDIF3 == 1)
17955  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 16; depth = 3 \b");
17956  if (kcountHEpositivedirectionReconoiseDIF3 == 2)
17957  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 17; depth = 3 \b");
17958  if (kcountHEpositivedirectionReconoiseDIF3 == 3)
17959  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 18; depth = 3 \b");
17960  if (kcountHEpositivedirectionReconoiseDIF3 == 4)
17961  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 19; depth = 3 \b");
17962  if (kcountHEpositivedirectionReconoiseDIF3 == 5)
17963  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 20; depth = 3 \b");
17964  if (kcountHEpositivedirectionReconoiseDIF3 == 6)
17965  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 21; depth = 3 \b");
17966  if (kcountHEpositivedirectionReconoiseDIF3 == 7)
17967  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 22; depth = 3 \b");
17968  if (kcountHEpositivedirectionReconoiseDIF3 == 8)
17969  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 23; depth = 3 \b");
17970  if (kcountHEpositivedirectionReconoiseDIF3 == 9)
17971  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 24; depth = 3 \b");
17972  if (kcountHEpositivedirectionReconoiseDIF3 == 10)
17973  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 25; depth = 3 \b");
17974  if (kcountHEpositivedirectionReconoiseDIF3 == 11)
17975  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 26; depth = 3 \b");
17976  if (kcountHEpositivedirectionReconoiseDIF3 == 12)
17977  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 27; depth = 3 \b");
17978  if (kcountHEpositivedirectionReconoiseDIF3 == 13)
17979  HEpositivedirectionReconoiseDIF3->SetXTitle("DIF for HE+ jeta = 28; depth = 3 \b");
17980  HEpositivedirectionReconoiseDIF3->Draw("Error");
17981  kcountHEpositivedirectionReconoiseDIF3++;
17982  if (kcountHEpositivedirectionReconoiseDIF3 > 13)
17983  break; // 4x6 = 24
17984  } //ccctest>0
17985 
17986  } // for i
17987  } //if(jeta-41 >=
17988  } //for jeta
17990  c3x5->Update();
17991  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
17992  c3x5->Clear();
17993  // clean-up
17994  if (h2CeffHEpositivedirectionReconoiseDIF3)
17995  delete h2CeffHEpositivedirectionReconoiseDIF3;
17996  //========================================================================================== 7
17997  //======================================================================
17998  //======================================================================1D plot: R vs phi , different eta, depth=4
17999  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
18000  c3x5->Clear();
18002  c3x5->Divide(3, 5);
18003  c3x5->cd(1);
18004  int kcountHEpositivedirectionReconoiseDIF4 = 1;
18005  TH1F* h2CeffHEpositivedirectionReconoiseDIF4 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF4", "", nphi, 0., 72.);
18006 
18007  for (int jeta = 0; jeta < njeta; jeta++) {
18008  // positivedirectionReconoiseDIF:
18009  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18010  // for (int i=0;i<ndepth;i++) {
18011  // depth=4
18012  for (int i = 3; i < 4; i++) {
18013  TH1F* HEpositivedirectionReconoiseDIF4 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF4->Clone("twod1");
18014 
18015  float ccctest = 0; // to avoid empty massive elements
18016  for (int jphi = 0; jphi < nphi; jphi++) {
18017  double ccc1 = breconoisehe[i][jeta][jphi];
18018  if (ccc1 != 0.) {
18019  HEpositivedirectionReconoiseDIF4->Fill(jphi, ccc1);
18020  ccctest = 1.; //HEpositivedirectionReconoiseDIF4->SetBinError(i,0.01);
18021  }
18022  } // for jphi
18023  if (ccctest > 0.) {
18024  //cout<<"777 kcountHEpositivedirectionReconoiseDIF4 = "<<kcountHEpositivedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
18025  c3x5->cd(kcountHEpositivedirectionReconoiseDIF4);
18026  HEpositivedirectionReconoiseDIF4->SetMarkerStyle(20);
18027  HEpositivedirectionReconoiseDIF4->SetMarkerSize(0.4);
18028  HEpositivedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
18029  HEpositivedirectionReconoiseDIF4->SetXTitle("HEpositivedirectionReconoiseDIF4 \b");
18030  HEpositivedirectionReconoiseDIF4->SetMarkerColor(2);
18031  HEpositivedirectionReconoiseDIF4->SetLineColor(0);
18032  gPad->SetGridy();
18033  gPad->SetGridx();
18034  // gPad->SetLogy();
18035  if (kcountHEpositivedirectionReconoiseDIF4 == 1)
18036  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 15; depth = 4 \b");
18037  if (kcountHEpositivedirectionReconoiseDIF4 == 2)
18038  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 17; depth = 4 \b");
18039  if (kcountHEpositivedirectionReconoiseDIF4 == 3)
18040  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 18; depth = 4 \b");
18041  if (kcountHEpositivedirectionReconoiseDIF4 == 4)
18042  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 19; depth = 4 \b");
18043  if (kcountHEpositivedirectionReconoiseDIF4 == 5)
18044  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 20; depth = 4 \b");
18045  if (kcountHEpositivedirectionReconoiseDIF4 == 6)
18046  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 21; depth = 4 \b");
18047  if (kcountHEpositivedirectionReconoiseDIF4 == 7)
18048  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 22; depth = 4 \b");
18049  if (kcountHEpositivedirectionReconoiseDIF4 == 8)
18050  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 23; depth = 4 \b");
18051  if (kcountHEpositivedirectionReconoiseDIF4 == 9)
18052  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 24; depth = 4 \b");
18053  if (kcountHEpositivedirectionReconoiseDIF4 == 10)
18054  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 25; depth = 4 \b");
18055  if (kcountHEpositivedirectionReconoiseDIF4 == 11)
18056  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 26; depth = 4 \b");
18057  if (kcountHEpositivedirectionReconoiseDIF4 == 12)
18058  HEpositivedirectionReconoiseDIF4->SetXTitle("DIF for HE+ jeta = 27; depth = 4 \b");
18059  HEpositivedirectionReconoiseDIF4->Draw("Error");
18060  kcountHEpositivedirectionReconoiseDIF4++;
18061  if (kcountHEpositivedirectionReconoiseDIF4 > 12)
18062  break; // 4x6 = 24
18063  } //ccctest>0
18064 
18065  } // for i
18066  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18067  } //for jeta
18069  c3x5->Update();
18070  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
18071  c3x5->Clear();
18072  // clean-up
18073  if (h2CeffHEpositivedirectionReconoiseDIF4)
18074  delete h2CeffHEpositivedirectionReconoiseDIF4;
18075  //========================================================================================== 8
18076  //======================================================================
18077  //======================================================================1D plot: R vs phi , different eta, depth=5
18078  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
18079  c3x5->Clear();
18081  c3x5->Divide(3, 5);
18082  c3x5->cd(1);
18083  int kcountHEpositivedirectionReconoiseDIF5 = 1;
18084  TH1F* h2CeffHEpositivedirectionReconoiseDIF5 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF5", "", nphi, 0., 72.);
18085 
18086  for (int jeta = 0; jeta < njeta; jeta++) {
18087  // positivedirectionReconoiseDIF:
18088  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18089  // for (int i=0;i<ndepth;i++) {
18090  // depth=5
18091  for (int i = 4; i < 5; i++) {
18092  TH1F* HEpositivedirectionReconoiseDIF5 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF5->Clone("twod1");
18093 
18094  float ccctest = 0; // to avoid empty massive elements
18095  for (int jphi = 0; jphi < nphi; jphi++) {
18096  // cout<<"888 initial kcountHEpositivedirectionReconoiseDIF5 = "<<kcountHEpositivedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" breconoisehe[i][jeta][jphi]= "<< breconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
18097 
18098  double ccc1 = breconoisehe[i][jeta][jphi];
18099  if (ccc1 != 0.) {
18100  HEpositivedirectionReconoiseDIF5->Fill(jphi, ccc1);
18101  ccctest = 1.; //HEpositivedirectionReconoiseDIF5->SetBinError(i,0.01);
18102  }
18103  } // for jphi
18104  if (ccctest > 0.) {
18105  //cout<<"888 kcountHEpositivedirectionReconoiseDIF5 = "<<kcountHEpositivedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<endl;
18106  c3x5->cd(kcountHEpositivedirectionReconoiseDIF5);
18107  HEpositivedirectionReconoiseDIF5->SetMarkerStyle(20);
18108  HEpositivedirectionReconoiseDIF5->SetMarkerSize(0.4);
18109  HEpositivedirectionReconoiseDIF5->GetYaxis()->SetLabelSize(0.04);
18110  HEpositivedirectionReconoiseDIF5->SetXTitle("HEpositivedirectionReconoiseDIF5 \b");
18111  HEpositivedirectionReconoiseDIF5->SetMarkerColor(2);
18112  HEpositivedirectionReconoiseDIF5->SetLineColor(0);
18113  gPad->SetGridy();
18114  gPad->SetGridx();
18115  // gPad->SetLogy();
18116  if (kcountHEpositivedirectionReconoiseDIF5 == 1)
18117  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 17; depth = 5 \b");
18118  if (kcountHEpositivedirectionReconoiseDIF5 == 2)
18119  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 18; depth = 5 \b");
18120  if (kcountHEpositivedirectionReconoiseDIF5 == 3)
18121  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 19; depth = 5 \b");
18122  if (kcountHEpositivedirectionReconoiseDIF5 == 4)
18123  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 20; depth = 5 \b");
18124  if (kcountHEpositivedirectionReconoiseDIF5 == 5)
18125  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 21; depth = 5 \b");
18126  if (kcountHEpositivedirectionReconoiseDIF5 == 6)
18127  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 22; depth = 5 \b");
18128  if (kcountHEpositivedirectionReconoiseDIF5 == 7)
18129  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 23; depth = 5 \b");
18130  if (kcountHEpositivedirectionReconoiseDIF5 == 8)
18131  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 24; depth = 5 \b");
18132  if (kcountHEpositivedirectionReconoiseDIF5 == 9)
18133  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 25; depth = 5 \b");
18134  if (kcountHEpositivedirectionReconoiseDIF5 == 10)
18135  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 26; depth = 5 \b");
18136  if (kcountHEpositivedirectionReconoiseDIF5 == 11)
18137  HEpositivedirectionReconoiseDIF5->SetXTitle("DIF for HE+ jeta = 27; depth = 5 \b");
18138  HEpositivedirectionReconoiseDIF5->Draw("Error");
18139  kcountHEpositivedirectionReconoiseDIF5++;
18140  if (kcountHEpositivedirectionReconoiseDIF5 > 11)
18141  break; // 4x6 = 24
18142  } //ccctest>0
18143 
18144  } // for i
18145  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18146  } //for jeta
18148  c3x5->Update();
18149  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
18150  c3x5->Clear();
18151  // clean-up
18152  if (h2CeffHEpositivedirectionReconoiseDIF5)
18153  delete h2CeffHEpositivedirectionReconoiseDIF5;
18154  //========================================================================================== 9
18155  //======================================================================
18156  //======================================================================1D plot: R vs phi , different eta, depth=6
18157  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
18158  c3x5->Clear();
18160  c3x5->Divide(3, 5);
18161  c3x5->cd(1);
18162  int kcountHEpositivedirectionReconoiseDIF6 = 1;
18163  TH1F* h2CeffHEpositivedirectionReconoiseDIF6 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF6", "", nphi, 0., 72.);
18164 
18165  for (int jeta = 0; jeta < njeta; jeta++) {
18166  // positivedirectionReconoiseDIF:
18167  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18168  // for (int i=0;i<ndepth;i++) {
18169  // depth=6
18170  for (int i = 5; i < 6; i++) {
18171  TH1F* HEpositivedirectionReconoiseDIF6 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF6->Clone("twod1");
18172 
18173  float ccctest = 0; // to avoid empty massive elements
18174  for (int jphi = 0; jphi < nphi; jphi++) {
18175  double ccc1 = breconoisehe[i][jeta][jphi];
18176  if (ccc1 != 0.) {
18177  HEpositivedirectionReconoiseDIF6->Fill(jphi, ccc1);
18178  ccctest = 1.; //HEpositivedirectionReconoiseDIF6->SetBinError(i,0.01);
18179  }
18180  } // for jphi
18181  if (ccctest > 0.) {
18182  //cout<<"999 kcountHEpositivedirectionReconoiseDIF6 = "<<kcountHEpositivedirectionReconoiseDIF6 <<" jeta-41= "<< jeta-41 <<endl;
18183  c3x5->cd(kcountHEpositivedirectionReconoiseDIF6);
18184  HEpositivedirectionReconoiseDIF6->SetMarkerStyle(20);
18185  HEpositivedirectionReconoiseDIF6->SetMarkerSize(0.4);
18186  HEpositivedirectionReconoiseDIF6->GetYaxis()->SetLabelSize(0.04);
18187  HEpositivedirectionReconoiseDIF6->SetXTitle("HEpositivedirectionReconoiseDIF6 \b");
18188  HEpositivedirectionReconoiseDIF6->SetMarkerColor(2);
18189  HEpositivedirectionReconoiseDIF6->SetLineColor(0);
18190  gPad->SetGridy();
18191  gPad->SetGridx();
18192  // gPad->SetLogy();
18193  if (kcountHEpositivedirectionReconoiseDIF6 == 1)
18194  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 18; depth = 6 \b");
18195  if (kcountHEpositivedirectionReconoiseDIF6 == 2)
18196  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 19; depth = 6 \b");
18197  if (kcountHEpositivedirectionReconoiseDIF6 == 3)
18198  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 20; depth = 6 \b");
18199  if (kcountHEpositivedirectionReconoiseDIF6 == 4)
18200  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 21; depth = 6 \b");
18201  if (kcountHEpositivedirectionReconoiseDIF6 == 5)
18202  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 22; depth = 6 \b");
18203  if (kcountHEpositivedirectionReconoiseDIF6 == 6)
18204  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 23; depth = 6 \b");
18205  if (kcountHEpositivedirectionReconoiseDIF6 == 7)
18206  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 24; depth = 6 \b");
18207  if (kcountHEpositivedirectionReconoiseDIF6 == 8)
18208  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 25; depth = 6 \b");
18209  if (kcountHEpositivedirectionReconoiseDIF6 == 9)
18210  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 26; depth = 6 \b");
18211  if (kcountHEpositivedirectionReconoiseDIF6 == 10)
18212  HEpositivedirectionReconoiseDIF6->SetXTitle("DIF for HE+ jeta = 27; depth = 6 \b");
18213  HEpositivedirectionReconoiseDIF6->Draw("Error");
18214  kcountHEpositivedirectionReconoiseDIF6++;
18215  if (kcountHEpositivedirectionReconoiseDIF6 > 10)
18216  break; // 4x6 = 24
18217  } //ccctest>0
18218 
18219  } // for i
18220  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18221  } //for jeta
18223  c3x5->Update();
18224  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
18225  c3x5->Clear();
18226  // clean-up
18227  if (h2CeffHEpositivedirectionReconoiseDIF6)
18228  delete h2CeffHEpositivedirectionReconoiseDIF6;
18229  //========================================================================================== 10
18230  //======================================================================
18231  //======================================================================1D plot: R vs phi , different eta, depth=7
18232  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
18233  c3x5->Clear();
18235  c3x5->Divide(3, 5);
18236  c3x5->cd(1);
18237  int kcountHEpositivedirectionReconoiseDIF7 = 1;
18238  TH1F* h2CeffHEpositivedirectionReconoiseDIF7 = new TH1F("h2CeffHEpositivedirectionReconoiseDIF7", "", nphi, 0., 72.);
18239 
18240  for (int jeta = 0; jeta < njeta; jeta++) {
18241  // positivedirectionReconoiseDIF:
18242  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
18243  // for (int i=0;i<ndepth;i++) {
18244  // depth=7
18245  for (int i = 6; i < 7; i++) {
18246  TH1F* HEpositivedirectionReconoiseDIF7 = (TH1F*)h2CeffHEpositivedirectionReconoiseDIF7->Clone("twod1");
18247 
18248  float ccctest = 0; // to avoid empty massive elements
18249  for (int jphi = 0; jphi < nphi; jphi++) {
18250  double ccc1 = breconoisehe[i][jeta][jphi];
18251  if (ccc1 != 0.) {
18252  HEpositivedirectionReconoiseDIF7->Fill(jphi, ccc1);
18253  ccctest = 1.; //HEpositivedirectionReconoiseDIF7->SetBinError(i,0.01);
18254  }
18255  } // for jphi
18256  if (ccctest > 0.) {
18257  //cout<<"1010 kcountHEpositivedirectionReconoiseDIF7 = "<<kcountHEpositivedirectionReconoiseDIF7 <<" jeta-41= "<< jeta-41 <<endl;
18258  c3x5->cd(kcountHEpositivedirectionReconoiseDIF7);
18259  HEpositivedirectionReconoiseDIF7->SetMarkerStyle(20);
18260  HEpositivedirectionReconoiseDIF7->SetMarkerSize(0.4);
18261  HEpositivedirectionReconoiseDIF7->GetYaxis()->SetLabelSize(0.04);
18262  HEpositivedirectionReconoiseDIF7->SetXTitle("HEpositivedirectionReconoiseDIF7 \b");
18263  HEpositivedirectionReconoiseDIF7->SetMarkerColor(2);
18264  HEpositivedirectionReconoiseDIF7->SetLineColor(0);
18265  gPad->SetGridy();
18266  gPad->SetGridx();
18267  // gPad->SetLogy();
18268  if (kcountHEpositivedirectionReconoiseDIF7 == 1)
18269  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 25; depth = 7 \b");
18270  if (kcountHEpositivedirectionReconoiseDIF7 == 2)
18271  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 26; depth = 7 \b");
18272  if (kcountHEpositivedirectionReconoiseDIF7 == 3)
18273  HEpositivedirectionReconoiseDIF7->SetXTitle("DIF for HE+ jeta = 27; depth = 7 \b");
18274  HEpositivedirectionReconoiseDIF7->Draw("Error");
18275  kcountHEpositivedirectionReconoiseDIF7++;
18276  if (kcountHEpositivedirectionReconoiseDIF7 > 3)
18277  break; //
18278  } //ccctest>0
18279 
18280  } // for i
18281  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18282  } //for jeta
18284  c3x5->Update();
18285  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
18286  c3x5->Clear();
18287  // clean-up
18288  if (h2CeffHEpositivedirectionReconoiseDIF7)
18289  delete h2CeffHEpositivedirectionReconoiseDIF7;
18290 
18292  //========================================================================================== 1114
18293  //======================================================================
18294  //======================================================================1D plot: R vs phi , different eta, depth=1
18295  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
18296  c3x5->Clear();
18298  c3x5->Divide(3, 5);
18299  c3x5->cd(1);
18300  int kcountHEnegativedirectionReconoiseDIF1 = 1;
18301  TH1F* h2CeffHEnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
18302  for (int jeta = 0; jeta < njeta; jeta++) {
18303  // negativedirectionReconoiseDIF:
18304  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18305  // for (int i=0;i<ndepth;i++) {
18306  // depth=1
18307  for (int i = 0; i < 1; i++) {
18308  TH1F* HEnegativedirectionReconoiseDIF1 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF1->Clone("twod1");
18309  float ccctest = 0; // to avoid empty massive elements
18310  for (int jphi = 0; jphi < nphi; jphi++) {
18311  double ccc1 = breconoisehe[i][jeta][jphi];
18312  if (ccc1 != 0.) {
18313  HEnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
18314  ccctest = 1.; //HEnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
18315  }
18316  } // for jphi
18317  if (ccctest > 0.) {
18318  // cout<<"444 kcountHEnegativedirectionReconoiseDIF1 = "<<kcountHEnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
18319  c3x5->cd(kcountHEnegativedirectionReconoiseDIF1);
18320  HEnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
18321  HEnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
18322  HEnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
18323  HEnegativedirectionReconoiseDIF1->SetXTitle("HEnegativedirectionReconoiseDIF1 \b");
18324  HEnegativedirectionReconoiseDIF1->SetMarkerColor(2);
18325  HEnegativedirectionReconoiseDIF1->SetLineColor(0);
18326  gPad->SetGridy();
18327  gPad->SetGridx();
18328  // gPad->SetLogy();
18329  if (kcountHEnegativedirectionReconoiseDIF1 == 1)
18330  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-29; depth = 1 \b");
18331  if (kcountHEnegativedirectionReconoiseDIF1 == 2)
18332  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-28; depth = 1 \b");
18333  if (kcountHEnegativedirectionReconoiseDIF1 == 3)
18334  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-27; depth = 1 \b");
18335  if (kcountHEnegativedirectionReconoiseDIF1 == 4)
18336  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-26; depth = 1 \b");
18337  if (kcountHEnegativedirectionReconoiseDIF1 == 5)
18338  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-25; depth = 1 \b");
18339  if (kcountHEnegativedirectionReconoiseDIF1 == 6)
18340  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-24; depth = 1 \b");
18341  if (kcountHEnegativedirectionReconoiseDIF1 == 7)
18342  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-23; depth = 1 \b");
18343  if (kcountHEnegativedirectionReconoiseDIF1 == 8)
18344  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-22; depth = 1 \b");
18345  if (kcountHEnegativedirectionReconoiseDIF1 == 9)
18346  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-21; depth = 1 \b");
18347  if (kcountHEnegativedirectionReconoiseDIF1 == 10)
18348  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-20; depth = 1 \b");
18349  if (kcountHEnegativedirectionReconoiseDIF1 == 11)
18350  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-19; depth = 1 \b");
18351  if (kcountHEnegativedirectionReconoiseDIF1 == 12)
18352  HEnegativedirectionReconoiseDIF1->SetXTitle("DIF for HE- jeta =-18; depth = 1 \b");
18353  HEnegativedirectionReconoiseDIF1->Draw("Error");
18354  kcountHEnegativedirectionReconoiseDIF1++;
18355  if (kcountHEnegativedirectionReconoiseDIF1 > 12)
18356  break; // 4x6 = 24
18357  } //ccctest>0
18358 
18359  } // for i
18360  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18361  } //for jeta
18363  c3x5->Update();
18364  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
18365  c3x5->Clear();
18366  // clean-up
18367  if (h2CeffHEnegativedirectionReconoiseDIF1)
18368  delete h2CeffHEnegativedirectionReconoiseDIF1;
18369 
18370  //========================================================================================== 1115
18371  //======================================================================
18372  //======================================================================1D plot: R vs phi , different eta, depth=2
18373  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
18374  c3x5->Clear();
18376  c3x5->Divide(3, 5);
18377  c3x5->cd(1);
18378  int kcountHEnegativedirectionReconoiseDIF2 = 1;
18379  TH1F* h2CeffHEnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
18380  for (int jeta = 0; jeta < njeta; jeta++) {
18381  // negativedirectionReconoiseDIF:
18382  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18383  // for (int i=0;i<ndepth;i++) {
18384  // depth=2
18385  for (int i = 1; i < 2; i++) {
18386  TH1F* HEnegativedirectionReconoiseDIF2 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF2->Clone("twod1");
18387  float ccctest = 0; // to avoid empty massive elements
18388  for (int jphi = 0; jphi < nphi; jphi++) {
18389  double ccc1 = breconoisehe[i][jeta][jphi];
18390  if (ccc1 != 0.) {
18391  HEnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
18392  ccctest = 1.; //HEnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
18393  }
18394  } // for jphi
18395  if (ccctest > 0.) {
18396  //cout<<"555 kcountHEnegativedirectionReconoiseDIF2 = "<<kcountHEnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
18397  c3x5->cd(kcountHEnegativedirectionReconoiseDIF2);
18398  HEnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
18399  HEnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
18400  HEnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
18401  HEnegativedirectionReconoiseDIF2->SetXTitle("HEnegativedirectionReconoiseDIF2 \b");
18402  HEnegativedirectionReconoiseDIF2->SetMarkerColor(2);
18403  HEnegativedirectionReconoiseDIF2->SetLineColor(0);
18404  gPad->SetGridy();
18405  gPad->SetGridx();
18406  // gPad->SetLogy();
18407  if (kcountHEnegativedirectionReconoiseDIF2 == 1)
18408  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-29; depth = 2 \b");
18409  if (kcountHEnegativedirectionReconoiseDIF2 == 2)
18410  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-28; depth = 2 \b");
18411  if (kcountHEnegativedirectionReconoiseDIF2 == 3)
18412  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-27; depth = 2 \b");
18413  if (kcountHEnegativedirectionReconoiseDIF2 == 4)
18414  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-26; depth = 2 \b");
18415  if (kcountHEnegativedirectionReconoiseDIF2 == 5)
18416  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-25; depth = 2 \b");
18417  if (kcountHEnegativedirectionReconoiseDIF2 == 6)
18418  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-24; depth = 2 \b");
18419  if (kcountHEnegativedirectionReconoiseDIF2 == 7)
18420  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-23; depth = 2 \b");
18421  if (kcountHEnegativedirectionReconoiseDIF2 == 8)
18422  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-22; depth = 2 \b");
18423  if (kcountHEnegativedirectionReconoiseDIF2 == 9)
18424  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-21; depth = 2 \b");
18425  if (kcountHEnegativedirectionReconoiseDIF2 == 10)
18426  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-20; depth = 2 \b");
18427  if (kcountHEnegativedirectionReconoiseDIF2 == 11)
18428  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-19; depth = 2 \b");
18429  if (kcountHEnegativedirectionReconoiseDIF2 == 12)
18430  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-18; depth = 2 \b");
18431  if (kcountHEnegativedirectionReconoiseDIF2 == 13)
18432  HEnegativedirectionReconoiseDIF2->SetXTitle("DIF for HE- jeta =-17; depth = 2 \b");
18433  HEnegativedirectionReconoiseDIF2->Draw("Error");
18434  kcountHEnegativedirectionReconoiseDIF2++;
18435  if (kcountHEnegativedirectionReconoiseDIF2 > 13)
18436  break; // 4x6 = 24
18437  } //ccctest>0
18438 
18439  } // for i
18440  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18441  } //for jeta
18443  c3x5->Update();
18444  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
18445  c3x5->Clear();
18446  // clean-up
18447  if (h2CeffHEnegativedirectionReconoiseDIF2)
18448  delete h2CeffHEnegativedirectionReconoiseDIF2;
18449  //========================================================================================== 1116
18450  //======================================================================
18451  //======================================================================1D plot: R vs phi , different eta, depth=3
18452  //cout<<" 1D plot: R vs phi , different eta, depth=3 *****" <<endl;
18453  c3x5->Clear();
18455  c3x5->Divide(3, 5);
18456  c3x5->cd(1);
18457  int kcountHEnegativedirectionReconoiseDIF3 = 1;
18458  TH1F* h2CeffHEnegativedirectionReconoiseDIF3 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF3", "", nphi, 0., 72.);
18459  for (int jeta = 0; jeta < njeta; jeta++) {
18460  // negativedirectionReconoiseDIF:
18461  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18462  // for (int i=0;i<ndepth;i++) {
18463  // depth=3
18464  for (int i = 2; i < 3; i++) {
18465  TH1F* HEnegativedirectionReconoiseDIF3 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF3->Clone("twod1");
18466  float ccctest = 0; // to avoid empty massive elements
18467  for (int jphi = 0; jphi < nphi; jphi++) {
18468  double ccc1 = breconoisehe[i][jeta][jphi];
18469  if (ccc1 != 0.) {
18470  HEnegativedirectionReconoiseDIF3->Fill(jphi, ccc1);
18471  ccctest = 1.; //HEnegativedirectionReconoiseDIF3->SetBinError(i,0.01);
18472  }
18473  } // for jphi
18474  if (ccctest > 0.) {
18475  //cout<<"666 kcountHEnegativedirectionReconoiseDIF3 = "<<kcountHEnegativedirectionReconoiseDIF3 <<" jeta-41= "<< jeta-41 <<endl;
18476  c3x5->cd(kcountHEnegativedirectionReconoiseDIF3);
18477  HEnegativedirectionReconoiseDIF3->SetMarkerStyle(20);
18478  HEnegativedirectionReconoiseDIF3->SetMarkerSize(0.4);
18479  HEnegativedirectionReconoiseDIF3->GetYaxis()->SetLabelSize(0.04);
18480  HEnegativedirectionReconoiseDIF3->SetXTitle("HEnegativedirectionReconoiseDIF3 \b");
18481  HEnegativedirectionReconoiseDIF3->SetMarkerColor(2);
18482  HEnegativedirectionReconoiseDIF3->SetLineColor(0);
18483  gPad->SetGridy();
18484  gPad->SetGridx();
18485  // gPad->SetLogy();
18486  if (kcountHEnegativedirectionReconoiseDIF3 == 1)
18487  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-29; depth = 3 \b");
18488  if (kcountHEnegativedirectionReconoiseDIF3 == 2)
18489  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-28; depth = 3 \b");
18490  if (kcountHEnegativedirectionReconoiseDIF3 == 3)
18491  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-27; depth = 3 \b");
18492  if (kcountHEnegativedirectionReconoiseDIF3 == 4)
18493  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-26; depth = 3 \b");
18494  if (kcountHEnegativedirectionReconoiseDIF3 == 5)
18495  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-25; depth = 3 \b");
18496  if (kcountHEnegativedirectionReconoiseDIF3 == 6)
18497  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-24; depth = 3 \b");
18498  if (kcountHEnegativedirectionReconoiseDIF3 == 7)
18499  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-23; depth = 3 \b");
18500  if (kcountHEnegativedirectionReconoiseDIF3 == 8)
18501  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-22; depth = 3 \b");
18502  if (kcountHEnegativedirectionReconoiseDIF3 == 9)
18503  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-21; depth = 3 \b");
18504  if (kcountHEnegativedirectionReconoiseDIF3 == 10)
18505  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-20; depth = 3 \b");
18506  if (kcountHEnegativedirectionReconoiseDIF3 == 11)
18507  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-19; depth = 3 \b");
18508  if (kcountHEnegativedirectionReconoiseDIF3 == 12)
18509  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-18; depth = 3 \b");
18510  if (kcountHEnegativedirectionReconoiseDIF3 == 13)
18511  HEnegativedirectionReconoiseDIF3->SetXTitle("DIF for HE- jeta =-17; depth = 3 \b");
18512  HEnegativedirectionReconoiseDIF3->Draw("Error");
18513  kcountHEnegativedirectionReconoiseDIF3++;
18514  if (kcountHEnegativedirectionReconoiseDIF3 > 13)
18515  break; // 4x6 = 24
18516  } //ccctest>0
18517 
18518  } // for i
18519  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18520  } //for jeta
18522  c3x5->Update();
18523  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
18524  c3x5->Clear();
18525  // clean-up
18526  if (h2CeffHEnegativedirectionReconoiseDIF3)
18527  delete h2CeffHEnegativedirectionReconoiseDIF3;
18528  //========================================================================================== 1117
18529  //======================================================================
18530  //======================================================================1D plot: R vs phi , different eta, depth=4
18531  //cout<<" 1D plot: R vs phi , different eta, depth=4 *****" <<endl;
18532  c3x5->Clear();
18534  c3x5->Divide(3, 5);
18535  c3x5->cd(1);
18536  int kcountHEnegativedirectionReconoiseDIF4 = 1;
18537  TH1F* h2CeffHEnegativedirectionReconoiseDIF4 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF4", "", nphi, 0., 72.);
18538 
18539  for (int jeta = 0; jeta < njeta; jeta++) {
18540  // negativedirectionReconoiseDIF:
18541  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18542  // for (int i=0;i<ndepth;i++) {
18543  // depth=4
18544  for (int i = 3; i < 4; i++) {
18545  TH1F* HEnegativedirectionReconoiseDIF4 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF4->Clone("twod1");
18546 
18547  float ccctest = 0; // to avoid empty massive elements
18548  for (int jphi = 0; jphi < nphi; jphi++) {
18549  double ccc1 = breconoisehe[i][jeta][jphi];
18550  if (ccc1 != 0.) {
18551  HEnegativedirectionReconoiseDIF4->Fill(jphi, ccc1);
18552  ccctest = 1.; //HEnegativedirectionReconoiseDIF4->SetBinError(i,0.01);
18553  }
18554  } // for jphi
18555  if (ccctest > 0.) {
18556  //cout<<"777 kcountHEnegativedirectionReconoiseDIF4 = "<<kcountHEnegativedirectionReconoiseDIF4 <<" jeta-41= "<< jeta-41 <<endl;
18557  c3x5->cd(kcountHEnegativedirectionReconoiseDIF4);
18558  HEnegativedirectionReconoiseDIF4->SetMarkerStyle(20);
18559  HEnegativedirectionReconoiseDIF4->SetMarkerSize(0.4);
18560  HEnegativedirectionReconoiseDIF4->GetYaxis()->SetLabelSize(0.04);
18561  HEnegativedirectionReconoiseDIF4->SetXTitle("HEnegativedirectionReconoiseDIF4 \b");
18562  HEnegativedirectionReconoiseDIF4->SetMarkerColor(2);
18563  HEnegativedirectionReconoiseDIF4->SetLineColor(0);
18564  gPad->SetGridy();
18565  gPad->SetGridx();
18566  // gPad->SetLogy();
18567  if (kcountHEnegativedirectionReconoiseDIF4 == 1)
18568  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-28; depth = 4 \b");
18569  if (kcountHEnegativedirectionReconoiseDIF4 == 2)
18570  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-27; depth = 4 \b");
18571  if (kcountHEnegativedirectionReconoiseDIF4 == 3)
18572  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-26; depth = 4 \b");
18573  if (kcountHEnegativedirectionReconoiseDIF4 == 4)
18574  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-25; depth = 4 \b");
18575  if (kcountHEnegativedirectionReconoiseDIF4 == 5)
18576  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-24; depth = 4 \b");
18577  if (kcountHEnegativedirectionReconoiseDIF4 == 6)
18578  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-23; depth = 4 \b");
18579  if (kcountHEnegativedirectionReconoiseDIF4 == 7)
18580  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-22; depth = 4 \b");
18581  if (kcountHEnegativedirectionReconoiseDIF4 == 8)
18582  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-21; depth = 4 \b");
18583  if (kcountHEnegativedirectionReconoiseDIF4 == 9)
18584  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-20; depth = 4 \b");
18585  if (kcountHEnegativedirectionReconoiseDIF4 == 10)
18586  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-19; depth = 4 \b");
18587  if (kcountHEnegativedirectionReconoiseDIF4 == 11)
18588  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-18; depth = 4 \b");
18589  if (kcountHEnegativedirectionReconoiseDIF4 == 12)
18590  HEnegativedirectionReconoiseDIF4->SetXTitle("DIF for HE- jeta =-16; depth = 4 \b");
18591  HEnegativedirectionReconoiseDIF4->Draw("Error");
18592  kcountHEnegativedirectionReconoiseDIF4++;
18593  if (kcountHEnegativedirectionReconoiseDIF4 > 12)
18594  break; // 4x6 = 24
18595  } //ccctest>0
18596 
18597  } // for i
18598  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18599  } //for jeta
18601  c3x5->Update();
18602  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
18603  c3x5->Clear();
18604  // clean-up
18605  if (h2CeffHEnegativedirectionReconoiseDIF4)
18606  delete h2CeffHEnegativedirectionReconoiseDIF4;
18607  //========================================================================================== 1118
18608  //======================================================================
18609  //======================================================================1D plot: R vs phi , different eta, depth=5
18610  //cout<<" 1D plot: R vs phi , different eta, depth=5 *****" <<endl;
18611  c3x5->Clear();
18613  c3x5->Divide(3, 5);
18614  c3x5->cd(1);
18615  int kcountHEnegativedirectionReconoiseDIF5 = 1;
18616  TH1F* h2CeffHEnegativedirectionReconoiseDIF5 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF5", "", nphi, 0., 72.);
18617 
18618  for (int jeta = 0; jeta < njeta; jeta++) {
18619  // negativedirectionReconoiseDIF:
18620  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18621  // for (int i=0;i<ndepth;i++) {
18622  // depth=5
18623  for (int i = 4; i < 5; i++) {
18624  TH1F* HEnegativedirectionReconoiseDIF5 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF5->Clone("twod1");
18625 
18626  float ccctest = 0; // to avoid empty massive elements
18627  for (int jphi = 0; jphi < nphi; jphi++) {
18628  // cout<<"888 initial kcountHEnegativedirectionReconoiseDIF5 = "<<kcountHEnegativedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<" jphi= "<< jphi <<" breconoisehe[i][jeta][jphi]= "<< breconoisehe[i][jeta][jphi] <<" depth= "<< i <<endl;
18629 
18630  double ccc1 = breconoisehe[i][jeta][jphi];
18631  if (ccc1 != 0.) {
18632  HEnegativedirectionReconoiseDIF5->Fill(jphi, ccc1);
18633  ccctest = 1.; //HEnegativedirectionReconoiseDIF5->SetBinError(i,0.01);
18634  }
18635  } // for jphi
18636  if (ccctest > 0.) {
18637  //cout<<"888 kcountHEnegativedirectionReconoiseDIF5 = "<<kcountHEnegativedirectionReconoiseDIF5 <<" jeta-41= "<< jeta-41 <<endl;
18638  c3x5->cd(kcountHEnegativedirectionReconoiseDIF5);
18639  HEnegativedirectionReconoiseDIF5->SetMarkerStyle(20);
18640  HEnegativedirectionReconoiseDIF5->SetMarkerSize(0.4);
18641  HEnegativedirectionReconoiseDIF5->GetYaxis()->SetLabelSize(0.04);
18642  HEnegativedirectionReconoiseDIF5->SetXTitle("HEnegativedirectionReconoiseDIF5 \b");
18643  HEnegativedirectionReconoiseDIF5->SetMarkerColor(2);
18644  HEnegativedirectionReconoiseDIF5->SetLineColor(0);
18645  gPad->SetGridy();
18646  gPad->SetGridx();
18647  // gPad->SetLogy();
18648  if (kcountHEnegativedirectionReconoiseDIF5 == 1)
18649  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-28; depth = 5 \b");
18650  if (kcountHEnegativedirectionReconoiseDIF5 == 2)
18651  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-27; depth = 5 \b");
18652  if (kcountHEnegativedirectionReconoiseDIF5 == 3)
18653  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-26; depth = 5 \b");
18654  if (kcountHEnegativedirectionReconoiseDIF5 == 4)
18655  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-25; depth = 5 \b");
18656  if (kcountHEnegativedirectionReconoiseDIF5 == 5)
18657  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-24; depth = 5 \b");
18658  if (kcountHEnegativedirectionReconoiseDIF5 == 6)
18659  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-23; depth = 5 \b");
18660  if (kcountHEnegativedirectionReconoiseDIF5 == 7)
18661  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-22; depth = 5 \b");
18662  if (kcountHEnegativedirectionReconoiseDIF5 == 8)
18663  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-21; depth = 5 \b");
18664  if (kcountHEnegativedirectionReconoiseDIF5 == 9)
18665  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-20; depth = 5 \b");
18666  if (kcountHEnegativedirectionReconoiseDIF5 == 10)
18667  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-19; depth = 5 \b");
18668  if (kcountHEnegativedirectionReconoiseDIF5 == 11)
18669  HEnegativedirectionReconoiseDIF5->SetXTitle("DIF for HE- jeta =-18; depth = 5 \b");
18670  HEnegativedirectionReconoiseDIF5->Draw("Error");
18671  kcountHEnegativedirectionReconoiseDIF5++;
18672  if (kcountHEnegativedirectionReconoiseDIF5 > 11)
18673  break; // 4x6 = 24
18674  } //ccctest>0
18675 
18676  } // for i
18677  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18678  } //for jeta
18680  c3x5->Update();
18681  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
18682  c3x5->Clear();
18683  // clean-up
18684  if (h2CeffHEnegativedirectionReconoiseDIF5)
18685  delete h2CeffHEnegativedirectionReconoiseDIF5;
18686  //========================================================================================== 1119
18687  //======================================================================
18688  //======================================================================1D plot: R vs phi , different eta, depth=6
18689  //cout<<" 1D plot: R vs phi , different eta, depth=6 *****" <<endl;
18690  c3x5->Clear();
18692  c3x5->Divide(3, 5);
18693  c3x5->cd(1);
18694  int kcountHEnegativedirectionReconoiseDIF6 = 1;
18695  TH1F* h2CeffHEnegativedirectionReconoiseDIF6 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF6", "", nphi, 0., 72.);
18696 
18697  for (int jeta = 0; jeta < njeta; jeta++) {
18698  // negativedirectionReconoiseDIF:
18699  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18700  // for (int i=0;i<ndepth;i++) {
18701  // depth=6
18702  for (int i = 5; i < 6; i++) {
18703  TH1F* HEnegativedirectionReconoiseDIF6 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF6->Clone("twod1");
18704 
18705  float ccctest = 0; // to avoid empty massive elements
18706  for (int jphi = 0; jphi < nphi; jphi++) {
18707  double ccc1 = breconoisehe[i][jeta][jphi];
18708  if (ccc1 != 0.) {
18709  HEnegativedirectionReconoiseDIF6->Fill(jphi, ccc1);
18710  ccctest = 1.; //HEnegativedirectionReconoiseDIF6->SetBinError(i,0.01);
18711  }
18712  } // for jphi
18713  if (ccctest > 0.) {
18714  //cout<<"999 kcountHEnegativedirectionReconoiseDIF6 = "<<kcountHEnegativedirectionReconoiseDIF6 <<" jeta-41= "<< jeta-41 <<endl;
18715  c3x5->cd(kcountHEnegativedirectionReconoiseDIF6);
18716  HEnegativedirectionReconoiseDIF6->SetMarkerStyle(20);
18717  HEnegativedirectionReconoiseDIF6->SetMarkerSize(0.4);
18718  HEnegativedirectionReconoiseDIF6->GetYaxis()->SetLabelSize(0.04);
18719  HEnegativedirectionReconoiseDIF6->SetXTitle("HEnegativedirectionReconoiseDIF6 \b");
18720  HEnegativedirectionReconoiseDIF6->SetMarkerColor(2);
18721  HEnegativedirectionReconoiseDIF6->SetLineColor(0);
18722  gPad->SetGridy();
18723  gPad->SetGridx();
18724  // gPad->SetLogy();
18725  if (kcountHEnegativedirectionReconoiseDIF6 == 1)
18726  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-28; depth = 6 \b");
18727  if (kcountHEnegativedirectionReconoiseDIF6 == 2)
18728  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-27; depth = 6 \b");
18729  if (kcountHEnegativedirectionReconoiseDIF6 == 3)
18730  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-26; depth = 6 \b");
18731  if (kcountHEnegativedirectionReconoiseDIF6 == 4)
18732  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-25; depth = 6 \b");
18733  if (kcountHEnegativedirectionReconoiseDIF6 == 5)
18734  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-24; depth = 6 \b");
18735  if (kcountHEnegativedirectionReconoiseDIF6 == 6)
18736  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-23; depth = 6 \b");
18737  if (kcountHEnegativedirectionReconoiseDIF6 == 7)
18738  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-22; depth = 6 \b");
18739  if (kcountHEnegativedirectionReconoiseDIF6 == 8)
18740  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-21; depth = 6 \b");
18741  if (kcountHEnegativedirectionReconoiseDIF6 == 9)
18742  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-20; depth = 6 \b");
18743  if (kcountHEnegativedirectionReconoiseDIF6 == 10)
18744  HEnegativedirectionReconoiseDIF6->SetXTitle("DIF for HE- jeta =-19; depth = 6 \b");
18745  HEnegativedirectionReconoiseDIF6->Draw("Error");
18746  kcountHEnegativedirectionReconoiseDIF6++;
18747  if (kcountHEnegativedirectionReconoiseDIF6 > 10)
18748  break; // 4x6 = 24
18749  } //ccctest>0
18750 
18751  } // for i
18752  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18753  } //for jeta
18755  c3x5->Update();
18756  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
18757  c3x5->Clear();
18758  // clean-up
18759  if (h2CeffHEnegativedirectionReconoiseDIF6)
18760  delete h2CeffHEnegativedirectionReconoiseDIF6;
18761  //========================================================================================== 11110
18762  //======================================================================
18763  //======================================================================1D plot: R vs phi , different eta, depth=7
18764  //cout<<" 1D plot: R vs phi , different eta, depth=7 *****" <<endl;
18765  c3x5->Clear();
18767  c3x5->Divide(3, 5);
18768  c3x5->cd(1);
18769  int kcountHEnegativedirectionReconoiseDIF7 = 1;
18770  TH1F* h2CeffHEnegativedirectionReconoiseDIF7 = new TH1F("h2CeffHEnegativedirectionReconoiseDIF7", "", nphi, 0., 72.);
18771 
18772  for (int jeta = 0; jeta < njeta; jeta++) {
18773  // negativedirectionReconoiseDIF:
18774  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
18775  // for (int i=0;i<ndepth;i++) {
18776  // depth=7
18777  for (int i = 6; i < 7; i++) {
18778  TH1F* HEnegativedirectionReconoiseDIF7 = (TH1F*)h2CeffHEnegativedirectionReconoiseDIF7->Clone("twod1");
18779 
18780  float ccctest = 0; // to avoid empty massive elements
18781  for (int jphi = 0; jphi < nphi; jphi++) {
18782  double ccc1 = breconoisehe[i][jeta][jphi];
18783  if (ccc1 != 0.) {
18784  HEnegativedirectionReconoiseDIF7->Fill(jphi, ccc1);
18785  ccctest = 1.; //HEnegativedirectionReconoiseDIF7->SetBinError(i,0.01);
18786  }
18787  } // for jphi
18788  if (ccctest > 0.) {
18789  //cout<<"1010 kcountHEnegativedirectionReconoiseDIF7 = "<<kcountHEnegativedirectionReconoiseDIF7 <<" jeta-41= "<< jeta-41 <<endl;
18790  c3x5->cd(kcountHEnegativedirectionReconoiseDIF7);
18791  HEnegativedirectionReconoiseDIF7->SetMarkerStyle(20);
18792  HEnegativedirectionReconoiseDIF7->SetMarkerSize(0.4);
18793  HEnegativedirectionReconoiseDIF7->GetYaxis()->SetLabelSize(0.04);
18794  HEnegativedirectionReconoiseDIF7->SetXTitle("HEnegativedirectionReconoiseDIF7 \b");
18795  HEnegativedirectionReconoiseDIF7->SetMarkerColor(2);
18796  HEnegativedirectionReconoiseDIF7->SetLineColor(0);
18797  gPad->SetGridy();
18798  gPad->SetGridx();
18799  // gPad->SetLogy();
18800  if (kcountHEnegativedirectionReconoiseDIF7 == 1)
18801  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-28; depth = 7 \b");
18802  if (kcountHEnegativedirectionReconoiseDIF7 == 2)
18803  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-27; depth = 7 \b");
18804  if (kcountHEnegativedirectionReconoiseDIF7 == 3)
18805  HEnegativedirectionReconoiseDIF7->SetXTitle("DIF for HE- jeta =-26; depth = 7 \b");
18806  HEnegativedirectionReconoiseDIF7->Draw("Error");
18807  kcountHEnegativedirectionReconoiseDIF7++;
18808  if (kcountHEnegativedirectionReconoiseDIF7 > 3)
18809  break; // 4x6 = 24
18810  } //ccctest>0
18811 
18812  } // for i
18813  } //if(jeta-41 >= -29 && jeta-41 <= -16)
18814  } //for jeta
18816  c3x5->Update();
18817  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
18818  c3x5->Clear();
18819  // clean-up
18820  if (h2CeffHEnegativedirectionReconoiseDIF7)
18821  delete h2CeffHEnegativedirectionReconoiseDIF7;
18822 
18823  //======================================================================================================================
18824  //======================================================================================================================
18826  //======================================================================================================================
18827  //======================================================================================================================
18828  //======================================================================================================================
18829 
18830  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
18831 
18832  //cout<<" Start Vaiance: preparation *****" <<endl;
18833  TH2F* reconoiseVariance1HE1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE1");
18834  TH2F* reconoiseVariance0HE1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE1");
18835  TH2F* reconoiseVarianceHE1 = (TH2F*)reconoiseVariance1HE1->Clone("reconoiseVarianceHE1");
18836  reconoiseVarianceHE1->Divide(reconoiseVariance1HE1, reconoiseVariance0HE1, 1, 1, "B");
18837  TH2F* reconoiseVariance1HE2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE2");
18838  TH2F* reconoiseVariance0HE2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE2");
18839  TH2F* reconoiseVarianceHE2 = (TH2F*)reconoiseVariance1HE2->Clone("reconoiseVarianceHE2");
18840  reconoiseVarianceHE2->Divide(reconoiseVariance1HE2, reconoiseVariance0HE2, 1, 1, "B");
18841  TH2F* reconoiseVariance1HE3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE3");
18842  TH2F* reconoiseVariance0HE3 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE3");
18843  TH2F* reconoiseVarianceHE3 = (TH2F*)reconoiseVariance1HE3->Clone("reconoiseVarianceHE3");
18844  reconoiseVarianceHE3->Divide(reconoiseVariance1HE3, reconoiseVariance0HE3, 1, 1, "B");
18845  TH2F* reconoiseVariance1HE4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE4");
18846  TH2F* reconoiseVariance0HE4 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE4");
18847  TH2F* reconoiseVarianceHE4 = (TH2F*)reconoiseVariance1HE4->Clone("reconoiseVarianceHE4");
18848  reconoiseVarianceHE4->Divide(reconoiseVariance1HE4, reconoiseVariance0HE4, 1, 1, "B");
18849  TH2F* reconoiseVariance1HE5 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE5");
18850  TH2F* reconoiseVariance0HE5 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE5");
18851  TH2F* reconoiseVarianceHE5 = (TH2F*)reconoiseVariance1HE5->Clone("reconoiseVarianceHE5");
18852  reconoiseVarianceHE5->Divide(reconoiseVariance1HE5, reconoiseVariance0HE5, 1, 1, "B");
18853  TH2F* reconoiseVariance1HE6 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE6");
18854  TH2F* reconoiseVariance0HE6 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE6");
18855  TH2F* reconoiseVarianceHE6 = (TH2F*)reconoiseVariance1HE6->Clone("reconoiseVarianceHE6");
18856  reconoiseVarianceHE6->Divide(reconoiseVariance1HE6, reconoiseVariance0HE6, 1, 1, "B");
18857  TH2F* reconoiseVariance1HE7 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HE7");
18858  TH2F* reconoiseVariance0HE7 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HE7");
18859  TH2F* reconoiseVarianceHE7 = (TH2F*)reconoiseVariance1HE7->Clone("reconoiseVarianceHE7");
18860  reconoiseVarianceHE7->Divide(reconoiseVariance1HE7, reconoiseVariance0HE7, 1, 1, "B");
18861  //cout<<" Vaiance: preparation DONE *****" <<endl;
18862  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevariancehe
18863  // = sum(R*R)/N - (sum(R)/N)**2
18864  for (int jeta = 0; jeta < njeta; jeta++) {
18865  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
18866  //preparation for PHI normalization:
18867  double sumreconoiseHE0 = 0;
18868  int nsumreconoiseHE0 = 0;
18869  double sumreconoiseHE1 = 0;
18870  int nsumreconoiseHE1 = 0;
18871  double sumreconoiseHE2 = 0;
18872  int nsumreconoiseHE2 = 0;
18873  double sumreconoiseHE3 = 0;
18874  int nsumreconoiseHE3 = 0;
18875  double sumreconoiseHE4 = 0;
18876  int nsumreconoiseHE4 = 0;
18877  double sumreconoiseHE5 = 0;
18878  int nsumreconoiseHE5 = 0;
18879  double sumreconoiseHE6 = 0;
18880  int nsumreconoiseHE6 = 0;
18881  for (int jphi = 0; jphi < njphi; jphi++) {
18882  reconoisevariancehe[0][jeta][jphi] = reconoiseVarianceHE1->GetBinContent(jeta + 1, jphi + 1);
18883  reconoisevariancehe[1][jeta][jphi] = reconoiseVarianceHE2->GetBinContent(jeta + 1, jphi + 1);
18884  reconoisevariancehe[2][jeta][jphi] = reconoiseVarianceHE3->GetBinContent(jeta + 1, jphi + 1);
18885  reconoisevariancehe[3][jeta][jphi] = reconoiseVarianceHE4->GetBinContent(jeta + 1, jphi + 1);
18886  reconoisevariancehe[4][jeta][jphi] = reconoiseVarianceHE5->GetBinContent(jeta + 1, jphi + 1);
18887  reconoisevariancehe[5][jeta][jphi] = reconoiseVarianceHE6->GetBinContent(jeta + 1, jphi + 1);
18888  reconoisevariancehe[6][jeta][jphi] = reconoiseVarianceHE7->GetBinContent(jeta + 1, jphi + 1);
18889  if (reconoisevariancehe[0][jeta][jphi] != 0.) {
18890  sumreconoiseHE0 += reconoisevariancehe[0][jeta][jphi];
18891  ++nsumreconoiseHE0;
18892  }
18893  if (reconoisevariancehe[1][jeta][jphi] != 0.) {
18894  sumreconoiseHE1 += reconoisevariancehe[1][jeta][jphi];
18895  ++nsumreconoiseHE1;
18896  }
18897  if (reconoisevariancehe[2][jeta][jphi] != 0.) {
18898  sumreconoiseHE2 += reconoisevariancehe[2][jeta][jphi];
18899  ++nsumreconoiseHE2;
18900  }
18901  if (reconoisevariancehe[3][jeta][jphi] != 0.) {
18902  sumreconoiseHE3 += reconoisevariancehe[3][jeta][jphi];
18903  ++nsumreconoiseHE3;
18904  }
18905  if (reconoisevariancehe[4][jeta][jphi] != 0.) {
18906  sumreconoiseHE4 += reconoisevariancehe[4][jeta][jphi];
18907  ++nsumreconoiseHE4;
18908  }
18909  if (reconoisevariancehe[5][jeta][jphi] != 0.) {
18910  sumreconoiseHE5 += reconoisevariancehe[5][jeta][jphi];
18911  ++nsumreconoiseHE5;
18912  }
18913  if (reconoisevariancehe[6][jeta][jphi] != 0.) {
18914  sumreconoiseHE6 += reconoisevariancehe[6][jeta][jphi];
18915  ++nsumreconoiseHE6;
18916  }
18917  } // phi
18918  // PHI normalization :
18919  for (int jphi = 0; jphi < njphi; jphi++) {
18920  if (sumreconoiseHE0 != 0.)
18921  reconoisevariancehe[0][jeta][jphi] /= (sumreconoiseHE0 / nsumreconoiseHE0);
18922  if (sumreconoiseHE1 != 0.)
18923  reconoisevariancehe[1][jeta][jphi] /= (sumreconoiseHE1 / nsumreconoiseHE1);
18924  if (sumreconoiseHE2 != 0.)
18925  reconoisevariancehe[2][jeta][jphi] /= (sumreconoiseHE2 / nsumreconoiseHE2);
18926  if (sumreconoiseHE3 != 0.)
18927  reconoisevariancehe[3][jeta][jphi] /= (sumreconoiseHE3 / nsumreconoiseHE3);
18928  if (sumreconoiseHE4 != 0.)
18929  reconoisevariancehe[4][jeta][jphi] /= (sumreconoiseHE4 / nsumreconoiseHE4);
18930  if (sumreconoiseHE5 != 0.)
18931  reconoisevariancehe[5][jeta][jphi] /= (sumreconoiseHE5 / nsumreconoiseHE5);
18932  if (sumreconoiseHE6 != 0.)
18933  reconoisevariancehe[6][jeta][jphi] /= (sumreconoiseHE6 / nsumreconoiseHE6);
18934  } // phi
18935  // reconoisevariancehe (D) = sum(R*R)/N - (sum(R)/N)**2
18936  for (int jphi = 0; jphi < njphi; jphi++) {
18937  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
18938  reconoisevariancehe[0][jeta][jphi] -= areconoisehe[0][jeta][jphi] * areconoisehe[0][jeta][jphi];
18939  reconoisevariancehe[0][jeta][jphi] = fabs(reconoisevariancehe[0][jeta][jphi]);
18940  reconoisevariancehe[1][jeta][jphi] -= areconoisehe[1][jeta][jphi] * areconoisehe[1][jeta][jphi];
18941  reconoisevariancehe[1][jeta][jphi] = fabs(reconoisevariancehe[1][jeta][jphi]);
18942  reconoisevariancehe[2][jeta][jphi] -= areconoisehe[2][jeta][jphi] * areconoisehe[2][jeta][jphi];
18943  reconoisevariancehe[2][jeta][jphi] = fabs(reconoisevariancehe[2][jeta][jphi]);
18944  reconoisevariancehe[3][jeta][jphi] -= areconoisehe[3][jeta][jphi] * areconoisehe[3][jeta][jphi];
18945  reconoisevariancehe[3][jeta][jphi] = fabs(reconoisevariancehe[3][jeta][jphi]);
18946  reconoisevariancehe[4][jeta][jphi] -= areconoisehe[4][jeta][jphi] * areconoisehe[4][jeta][jphi];
18947  reconoisevariancehe[4][jeta][jphi] = fabs(reconoisevariancehe[4][jeta][jphi]);
18948  reconoisevariancehe[5][jeta][jphi] -= areconoisehe[5][jeta][jphi] * areconoisehe[5][jeta][jphi];
18949  reconoisevariancehe[5][jeta][jphi] = fabs(reconoisevariancehe[5][jeta][jphi]);
18950  reconoisevariancehe[6][jeta][jphi] -= areconoisehe[6][jeta][jphi] * areconoisehe[6][jeta][jphi];
18951  reconoisevariancehe[6][jeta][jphi] = fabs(reconoisevariancehe[6][jeta][jphi]);
18952  }
18953  }
18954  }
18955  //cout<<" Vaiance: DONE*****" <<endl;
18956  //------------------------ 2D-eta/phi-plot: D, averaged over depthes
18957  //======================================================================
18958  //======================================================================
18959  //cout<<" R2D-eta/phi-plot: D, averaged over depthes *****" <<endl;
18960  c1x1->Clear();
18962  c1x0->Divide(1, 1);
18963  c1x0->cd(1);
18964  TH2F* DefzDreconoiseHE42D = new TH2F("DefzDreconoiseHE42D", "", neta, -41., 41., nphi, 0., 72.);
18965  TH2F* DefzDreconoiseHE42D0 = new TH2F("DefzDreconoiseHE42D0", "", neta, -41., 41., nphi, 0., 72.);
18966  TH2F* DefzDreconoiseHE42DF = (TH2F*)DefzDreconoiseHE42D0->Clone("DefzDreconoiseHE42DF");
18967  for (int i = 0; i < ndepth; i++) {
18968  for (int jeta = 0; jeta < neta; jeta++) {
18969  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
18970  for (int jphi = 0; jphi < nphi; jphi++) {
18971  double ccc1 = reconoisevariancehe[i][jeta][jphi];
18972  int k2plot = jeta - 41;
18973  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
18974  if (areconoisehe[i][jeta][jphi] > 0.) {
18975  DefzDreconoiseHE42D->Fill(kkk, jphi, ccc1);
18976  DefzDreconoiseHE42D0->Fill(kkk, jphi, 1.);
18977  }
18978  }
18979  }
18980  }
18981  }
18982  DefzDreconoiseHE42DF->Divide(DefzDreconoiseHE42D, DefzDreconoiseHE42D0, 1, 1, "B"); // average A
18983  // DefzDreconoiseHE1->Sumw2();
18984  gPad->SetGridy();
18985  gPad->SetGridx(); // gPad->SetLogz();
18986  DefzDreconoiseHE42DF->SetMarkerStyle(20);
18987  DefzDreconoiseHE42DF->SetMarkerSize(0.4);
18988  DefzDreconoiseHE42DF->GetZaxis()->SetLabelSize(0.08);
18989  DefzDreconoiseHE42DF->SetXTitle("<D>_depth #eta \b");
18990  DefzDreconoiseHE42DF->SetYTitle(" #phi \b");
18991  DefzDreconoiseHE42DF->SetZTitle("<D>_depth \b");
18992  DefzDreconoiseHE42DF->SetMarkerColor(2);
18993  DefzDreconoiseHE42DF->SetLineColor(
18994  0); // DefzDreconoiseHE42DF->SetMaximum(1.000); // DefzDreconoiseHE42DF->SetMinimum(1.0);
18995  DefzDreconoiseHE42DF->Draw("COLZ");
18997  c1x0->Update();
18998  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHE.png");
18999  c1x0->Clear();
19000  // clean-up
19001  if (DefzDreconoiseHE42D)
19002  delete DefzDreconoiseHE42D;
19003  if (DefzDreconoiseHE42D0)
19004  delete DefzDreconoiseHE42D0;
19005  if (DefzDreconoiseHE42DF)
19006  delete DefzDreconoiseHE42DF;
19007  //====================================================================== 1D plot: D vs phi , averaged over depthes & eta
19008  //======================================================================
19009  //cout<<" 1D plot: D vs phi , averaged over depthes & eta *****" <<endl;
19010  c1x1->Clear();
19012  c1x1->Divide(1, 1);
19013  c1x1->cd(1);
19014  TH1F* DefzDreconoiseHE41D = new TH1F("DefzDreconoiseHE41D", "", nphi, 0., 72.);
19015  TH1F* DefzDreconoiseHE41D0 = new TH1F("DefzDreconoiseHE41D0", "", nphi, 0., 72.);
19016  TH1F* DefzDreconoiseHE41DF = (TH1F*)DefzDreconoiseHE41D0->Clone("DefzDreconoiseHE41DF");
19017 
19018  for (int jphi = 0; jphi < nphi; jphi++) {
19019  for (int jeta = 0; jeta < neta; jeta++) {
19020  if ((jeta - 41 >= -29 && jeta - 41 <= -16) || (jeta - 41 >= 15 && jeta - 41 <= 28)) {
19021  for (int i = 0; i < ndepth; i++) {
19022  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19023  if (areconoisehe[i][jeta][jphi] > 0.) {
19024  DefzDreconoiseHE41D->Fill(jphi, ccc1);
19025  DefzDreconoiseHE41D0->Fill(jphi, 1.);
19026  }
19027  }
19028  }
19029  }
19030  }
19031  // DefzDreconoiseHE41D->Sumw2();DefzDreconoiseHE41D0->Sumw2();
19032 
19033  DefzDreconoiseHE41DF->Divide(DefzDreconoiseHE41D, DefzDreconoiseHE41D0, 1, 1, "B"); // R averaged over depthes & eta
19034  DefzDreconoiseHE41D0->Sumw2();
19035  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHE41DF->SetBinError(jphi,0.01);}
19036  gPad->SetGridy();
19037  gPad->SetGridx(); // gPad->SetLogz();
19038  DefzDreconoiseHE41DF->SetMarkerStyle(20);
19039  DefzDreconoiseHE41DF->SetMarkerSize(1.4);
19040  DefzDreconoiseHE41DF->GetZaxis()->SetLabelSize(0.08);
19041  DefzDreconoiseHE41DF->SetXTitle("#phi \b");
19042  DefzDreconoiseHE41DF->SetYTitle(" <D> \b");
19043  DefzDreconoiseHE41DF->SetZTitle("<D>_PHI - AllDepthes \b");
19044  DefzDreconoiseHE41DF->SetMarkerColor(4);
19045  DefzDreconoiseHE41DF->SetLineColor(
19046  4); // DefzDreconoiseHE41DF->SetMinimum(0.8); DefzDreconoiseHE41DF->SetMinimum(-0.015);
19047  DefzDreconoiseHE41DF->Draw("Error");
19049  c1x1->Update();
19050  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHE.png");
19051  c1x1->Clear();
19052  // clean-up
19053  if (DefzDreconoiseHE41D)
19054  delete DefzDreconoiseHE41D;
19055  if (DefzDreconoiseHE41D0)
19056  delete DefzDreconoiseHE41D0;
19057  if (DefzDreconoiseHE41DF)
19058  delete DefzDreconoiseHE41DF;
19059  //========================================================================================== 14
19060  //======================================================================
19061  //======================================================================1D plot: D vs phi , different eta, depth=1
19062  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
19063  c3x5->Clear();
19065  c3x5->Divide(3, 5);
19066  c3x5->cd(1);
19067  int kcountHEpositivedirectionReconoiseD1 = 1;
19068  TH1F* h2CeffHEpositivedirectionReconoiseD1 = new TH1F("h2CeffHEpositivedirectionReconoiseD1", "", nphi, 0., 72.);
19069 
19070  for (int jeta = 0; jeta < njeta; jeta++) {
19071  // positivedirectionReconoiseD:
19072  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19073  // for (int i=0;i<ndepth;i++) {
19074  // depth=1
19075  for (int i = 0; i < 1; i++) {
19076  TH1F* HEpositivedirectionReconoiseD1 = (TH1F*)h2CeffHEpositivedirectionReconoiseD1->Clone("twod1");
19077 
19078  float ccctest = 0; // to avoid empty massive elements
19079  for (int jphi = 0; jphi < nphi; jphi++) {
19080  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19081  if (areconoisehe[i][jeta][jphi] > 0.) {
19082  HEpositivedirectionReconoiseD1->Fill(jphi, ccc1);
19083  ccctest = 1.; //HEpositivedirectionReconoiseD1->SetBinError(i,0.01);
19084  }
19085  } // for jphi
19086  if (ccctest > 0.) {
19087  //cout<<"1414 kcountHEpositivedirectionReconoiseD1 = "<<kcountHEpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
19088  c3x5->cd(kcountHEpositivedirectionReconoiseD1);
19089  HEpositivedirectionReconoiseD1->SetMarkerStyle(20);
19090  HEpositivedirectionReconoiseD1->SetMarkerSize(0.4);
19091  HEpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
19092  HEpositivedirectionReconoiseD1->SetXTitle("HEpositivedirectionReconoiseD1 \b");
19093  HEpositivedirectionReconoiseD1->SetMarkerColor(2);
19094  HEpositivedirectionReconoiseD1->SetLineColor(0);
19095  gPad->SetGridy();
19096  gPad->SetGridx();
19097  // gPad->SetLogy();
19098  if (kcountHEpositivedirectionReconoiseD1 == 1)
19099  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 17; depth = 1 \b");
19100  if (kcountHEpositivedirectionReconoiseD1 == 2)
19101  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 18; depth = 1 \b");
19102  if (kcountHEpositivedirectionReconoiseD1 == 3)
19103  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 19; depth = 1 \b");
19104  if (kcountHEpositivedirectionReconoiseD1 == 4)
19105  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 20; depth = 1 \b");
19106  if (kcountHEpositivedirectionReconoiseD1 == 5)
19107  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 21; depth = 1 \b");
19108  if (kcountHEpositivedirectionReconoiseD1 == 6)
19109  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 22; depth = 1 \b");
19110  if (kcountHEpositivedirectionReconoiseD1 == 7)
19111  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 23; depth = 1 \b");
19112  if (kcountHEpositivedirectionReconoiseD1 == 8)
19113  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 24; depth = 1 \b");
19114  if (kcountHEpositivedirectionReconoiseD1 == 9)
19115  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 25; depth = 1 \b");
19116  if (kcountHEpositivedirectionReconoiseD1 == 10)
19117  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 26; depth = 1 \b");
19118  if (kcountHEpositivedirectionReconoiseD1 == 11)
19119  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 27; depth = 1 \b");
19120  if (kcountHEpositivedirectionReconoiseD1 == 12)
19121  HEpositivedirectionReconoiseD1->SetXTitle("D for HE+ jeta = 28; depth = 1 \b");
19122  HEpositivedirectionReconoiseD1->Draw("Error");
19123  kcountHEpositivedirectionReconoiseD1++;
19124  if (kcountHEpositivedirectionReconoiseD1 > 12)
19125  break; // 4x6 = 24
19126  } //ccctest>0
19127 
19128  } // for i
19129  } //if(jeta-41 >= 0)
19130  } //for jeta
19132  c3x5->Update();
19133  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png");
19134  c3x5->Clear();
19135  // clean-up
19136  if (h2CeffHEpositivedirectionReconoiseD1)
19137  delete h2CeffHEpositivedirectionReconoiseD1;
19138  //========================================================================================== 15
19139  //======================================================================
19140  //======================================================================1D plot: D vs phi , different eta, depth=2
19141  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
19142  c3x5->Clear();
19143  c3x5->Divide(3, 5);
19144  c3x5->cd(1);
19145  int kcountHEpositivedirectionReconoiseD2 = 1;
19146  TH1F* h2CeffHEpositivedirectionReconoiseD2 = new TH1F("h2CeffHEpositivedirectionReconoiseD2", "", nphi, 0., 72.);
19147 
19148  for (int jeta = 0; jeta < njeta; jeta++) {
19149  // positivedirectionReconoiseD:
19150  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19151  // for (int i=0;i<ndepth;i++) {
19152  // depth=2
19153  for (int i = 1; i < 2; i++) {
19154  TH1F* HEpositivedirectionReconoiseD2 = (TH1F*)h2CeffHEpositivedirectionReconoiseD2->Clone("twod1");
19155 
19156  float ccctest = 0; // to avoid empty massive elements
19157  for (int jphi = 0; jphi < nphi; jphi++) {
19158  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19159  if (areconoisehe[i][jeta][jphi] > 0.) {
19160  HEpositivedirectionReconoiseD2->Fill(jphi, ccc1);
19161  ccctest = 1.; //HEpositivedirectionReconoiseD2->SetBinError(i,0.01);
19162  }
19163  } // for jphi
19164  if (ccctest > 0.) {
19165  //cout<<"1515 kcountHEpositivedirectionReconoiseD2 = "<<kcountHEpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
19166  c3x5->cd(kcountHEpositivedirectionReconoiseD2);
19167  HEpositivedirectionReconoiseD2->SetMarkerStyle(20);
19168  HEpositivedirectionReconoiseD2->SetMarkerSize(0.4);
19169  HEpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
19170  HEpositivedirectionReconoiseD2->SetXTitle("HEpositivedirectionReconoiseD2 \b");
19171  HEpositivedirectionReconoiseD2->SetMarkerColor(2);
19172  HEpositivedirectionReconoiseD2->SetLineColor(0);
19173  gPad->SetGridy();
19174  gPad->SetGridx();
19175  // gPad->SetLogy();
19176  if (kcountHEpositivedirectionReconoiseD2 == 1)
19177  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 16; depth = 2 \b");
19178  if (kcountHEpositivedirectionReconoiseD2 == 2)
19179  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 17; depth = 2 \b");
19180  if (kcountHEpositivedirectionReconoiseD2 == 3)
19181  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 18; depth = 2 \b");
19182  if (kcountHEpositivedirectionReconoiseD2 == 4)
19183  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 19; depth = 2 \b");
19184  if (kcountHEpositivedirectionReconoiseD2 == 5)
19185  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 20; depth = 2 \b");
19186  if (kcountHEpositivedirectionReconoiseD2 == 6)
19187  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 21; depth = 2 \b");
19188  if (kcountHEpositivedirectionReconoiseD2 == 7)
19189  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 22; depth = 2 \b");
19190  if (kcountHEpositivedirectionReconoiseD2 == 8)
19191  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 23; depth = 2 \b");
19192  if (kcountHEpositivedirectionReconoiseD2 == 9)
19193  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 24; depth = 2 \b");
19194  if (kcountHEpositivedirectionReconoiseD2 == 10)
19195  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 25; depth = 2 \b");
19196  if (kcountHEpositivedirectionReconoiseD2 == 11)
19197  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 26; depth = 2 \b");
19198  if (kcountHEpositivedirectionReconoiseD2 == 12)
19199  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 27; depth = 2 \b");
19200  if (kcountHEpositivedirectionReconoiseD2 == 13)
19201  HEpositivedirectionReconoiseD2->SetXTitle("D for HE+ jeta = 28; depth = 2 \b");
19202  HEpositivedirectionReconoiseD2->Draw("Error");
19203  kcountHEpositivedirectionReconoiseD2++;
19204  if (kcountHEpositivedirectionReconoiseD2 > 13)
19205  break; // 4x6 = 24
19206  } //ccctest>0
19207 
19208  } // for i
19209  } //if(jeta-41 >= 0)
19210  } //for jeta
19212  c3x5->Update();
19213  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png");
19214  c3x5->Clear();
19215  // clean-up
19216  if (h2CeffHEpositivedirectionReconoiseD2)
19217  delete h2CeffHEpositivedirectionReconoiseD2;
19218  //========================================================================================== 16
19219  //======================================================================
19220  //======================================================================1D plot: D vs phi , different eta, depth=3
19221  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
19222  c3x5->Clear();
19223  c3x5->Divide(3, 5);
19224  c3x5->cd(1);
19225  int kcountHEpositivedirectionReconoiseD3 = 1;
19226  TH1F* h2CeffHEpositivedirectionReconoiseD3 = new TH1F("h2CeffHEpositivedirectionReconoiseD3", "", nphi, 0., 72.);
19227 
19228  for (int jeta = 0; jeta < njeta; jeta++) {
19229  // positivedirectionReconoiseD:
19230  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19231  // for (int i=0;i<ndepth;i++) {
19232  // depth=3
19233  for (int i = 2; i < 3; i++) {
19234  TH1F* HEpositivedirectionReconoiseD3 = (TH1F*)h2CeffHEpositivedirectionReconoiseD3->Clone("twod1");
19235 
19236  float ccctest = 0; // to avoid empty massive elements
19237  for (int jphi = 0; jphi < nphi; jphi++) {
19238  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19239  if (areconoisehe[i][jeta][jphi] > 0.) {
19240  HEpositivedirectionReconoiseD3->Fill(jphi, ccc1);
19241  ccctest = 1.; //HEpositivedirectionReconoiseD3->SetBinError(i,0.01);
19242  }
19243  } // for jphi
19244  if (ccctest > 0.) {
19245  //cout<<"1616 kcountHEpositivedirectionReconoiseD3 = "<<kcountHEpositivedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
19246  c3x5->cd(kcountHEpositivedirectionReconoiseD3);
19247  HEpositivedirectionReconoiseD3->SetMarkerStyle(20);
19248  HEpositivedirectionReconoiseD3->SetMarkerSize(0.4);
19249  HEpositivedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
19250  HEpositivedirectionReconoiseD3->SetXTitle("HEpositivedirectionReconoiseD3 \b");
19251  HEpositivedirectionReconoiseD3->SetMarkerColor(2);
19252  HEpositivedirectionReconoiseD3->SetLineColor(0);
19253  gPad->SetGridy();
19254  gPad->SetGridx();
19255  // gPad->SetLogy();
19256  if (kcountHEpositivedirectionReconoiseD3 == 1)
19257  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 16; depth = 3 \b");
19258  if (kcountHEpositivedirectionReconoiseD3 == 2)
19259  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 17; depth = 3 \b");
19260  if (kcountHEpositivedirectionReconoiseD3 == 3)
19261  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 18; depth = 3 \b");
19262  if (kcountHEpositivedirectionReconoiseD3 == 4)
19263  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 19; depth = 3 \b");
19264  if (kcountHEpositivedirectionReconoiseD3 == 5)
19265  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 20; depth = 3 \b");
19266  if (kcountHEpositivedirectionReconoiseD3 == 6)
19267  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 21; depth = 3 \b");
19268  if (kcountHEpositivedirectionReconoiseD3 == 7)
19269  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 22; depth = 3 \b");
19270  if (kcountHEpositivedirectionReconoiseD3 == 8)
19271  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 23; depth = 3 \b");
19272  if (kcountHEpositivedirectionReconoiseD3 == 9)
19273  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 24; depth = 3 \b");
19274  if (kcountHEpositivedirectionReconoiseD3 == 10)
19275  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 25; depth = 3 \b");
19276  if (kcountHEpositivedirectionReconoiseD3 == 11)
19277  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 26; depth = 3 \b");
19278  if (kcountHEpositivedirectionReconoiseD3 == 12)
19279  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 27; depth = 3 \b");
19280  if (kcountHEpositivedirectionReconoiseD3 == 13)
19281  HEpositivedirectionReconoiseD3->SetXTitle("D for HE+ jeta = 28; depth = 3 \b");
19282  HEpositivedirectionReconoiseD3->Draw("Error");
19283  kcountHEpositivedirectionReconoiseD3++;
19284  if (kcountHEpositivedirectionReconoiseD3 > 13)
19285  break; // 4x6 = 24
19286  } //ccctest>0
19287 
19288  } // for i
19289  } //if(jeta-41 >= 0)
19290  } //for jeta
19292  c3x5->Update();
19293  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png");
19294  c3x5->Clear();
19295  // clean-up
19296  if (h2CeffHEpositivedirectionReconoiseD3)
19297  delete h2CeffHEpositivedirectionReconoiseD3;
19298  //========================================================================================== 17
19299  //======================================================================
19300  //======================================================================1D plot: D vs phi , different eta, depth=4
19301  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
19302  c3x5->Clear();
19303  c3x5->Divide(3, 5);
19304  c3x5->cd(1);
19305  int kcountHEpositivedirectionReconoiseD4 = 1;
19306  TH1F* h2CeffHEpositivedirectionReconoiseD4 = new TH1F("h2CeffHEpositivedirectionReconoiseD4", "", nphi, 0., 72.);
19307 
19308  for (int jeta = 0; jeta < njeta; jeta++) {
19309  // positivedirectionReconoiseD:
19310  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19311  // for (int i=0;i<ndepth;i++) {
19312  // depth=4
19313  for (int i = 3; i < 4; i++) {
19314  TH1F* HEpositivedirectionReconoiseD4 = (TH1F*)h2CeffHEpositivedirectionReconoiseD4->Clone("twod1");
19315 
19316  float ccctest = 0; // to avoid empty massive elements
19317  for (int jphi = 0; jphi < nphi; jphi++) {
19318  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19319  if (areconoisehe[i][jeta][jphi] > 0.) {
19320  HEpositivedirectionReconoiseD4->Fill(jphi, ccc1);
19321  ccctest = 1.; //HEpositivedirectionReconoiseD4->SetBinError(i,0.01);
19322  }
19323  } // for jphi
19324  if (ccctest > 0.) {
19325  //cout<<"1717 kcountHEpositivedirectionReconoiseD4 = "<<kcountHEpositivedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
19326  c3x5->cd(kcountHEpositivedirectionReconoiseD4);
19327  HEpositivedirectionReconoiseD4->SetMarkerStyle(20);
19328  HEpositivedirectionReconoiseD4->SetMarkerSize(0.4);
19329  HEpositivedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
19330  HEpositivedirectionReconoiseD4->SetXTitle("HEpositivedirectionReconoiseD4 \b");
19331  HEpositivedirectionReconoiseD4->SetMarkerColor(2);
19332  HEpositivedirectionReconoiseD4->SetLineColor(0);
19333  gPad->SetGridy();
19334  gPad->SetGridx();
19335  // gPad->SetLogy();
19336  if (kcountHEpositivedirectionReconoiseD4 == 1)
19337  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 15; depth = 4 \b");
19338  if (kcountHEpositivedirectionReconoiseD4 == 2)
19339  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 17; depth = 4 \b");
19340  if (kcountHEpositivedirectionReconoiseD4 == 3)
19341  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 18; depth = 4 \b");
19342  if (kcountHEpositivedirectionReconoiseD4 == 4)
19343  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 19; depth = 4 \b");
19344  if (kcountHEpositivedirectionReconoiseD4 == 5)
19345  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 20; depth = 4 \b");
19346  if (kcountHEpositivedirectionReconoiseD4 == 6)
19347  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 21; depth = 4 \b");
19348  if (kcountHEpositivedirectionReconoiseD4 == 7)
19349  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 22; depth = 4 \b");
19350  if (kcountHEpositivedirectionReconoiseD4 == 8)
19351  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 23; depth = 4 \b");
19352  if (kcountHEpositivedirectionReconoiseD4 == 9)
19353  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 24; depth = 4 \b");
19354  if (kcountHEpositivedirectionReconoiseD4 == 10)
19355  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 25; depth = 4 \b");
19356  if (kcountHEpositivedirectionReconoiseD4 == 11)
19357  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 26; depth = 4 \b");
19358  if (kcountHEpositivedirectionReconoiseD4 == 12)
19359  HEpositivedirectionReconoiseD4->SetXTitle("D for HE+ jeta = 27; depth = 4 \b");
19360  HEpositivedirectionReconoiseD4->Draw("Error");
19361  kcountHEpositivedirectionReconoiseD4++;
19362  if (kcountHEpositivedirectionReconoiseD4 > 12)
19363  break; // 4x6 = 24
19364  } //ccctest>0
19365 
19366  } // for i
19367  } //if(jeta-41 >= 0)
19368  } //for jeta
19370  c3x5->Update();
19371  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png");
19372  c3x5->Clear();
19373  // clean-up
19374  if (h2CeffHEpositivedirectionReconoiseD4)
19375  delete h2CeffHEpositivedirectionReconoiseD4;
19376  //========================================================================================== 18
19377  //======================================================================
19378  //======================================================================1D plot: D vs phi , different eta, depth=5
19379  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
19380  c3x5->Clear();
19381  c3x5->Divide(3, 5);
19382  c3x5->cd(1);
19383  int kcountHEpositivedirectionReconoiseD5 = 1;
19384  TH1F* h2CeffHEpositivedirectionReconoiseD5 = new TH1F("h2CeffHEpositivedirectionReconoiseD5", "", nphi, 0., 72.);
19385 
19386  for (int jeta = 0; jeta < njeta; jeta++) {
19387  // positivedirectionReconoiseD:
19388  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19389  // for (int i=0;i<ndepth;i++) {
19390  // depth=5
19391  for (int i = 4; i < 5; i++) {
19392  TH1F* HEpositivedirectionReconoiseD5 = (TH1F*)h2CeffHEpositivedirectionReconoiseD5->Clone("twod1");
19393 
19394  float ccctest = 0; // to avoid empty massive elements
19395  for (int jphi = 0; jphi < nphi; jphi++) {
19396  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19397  if (areconoisehe[i][jeta][jphi] > 0.) {
19398  HEpositivedirectionReconoiseD5->Fill(jphi, ccc1);
19399  ccctest = 1.; //HEpositivedirectionReconoiseD5->SetBinError(i,0.01);
19400  }
19401  } // for jphi
19402  if (ccctest > 0.) {
19403  //cout<<"1818 kcountHEpositivedirectionReconoiseD5 = "<<kcountHEpositivedirectionReconoiseD5 <<" jeta-41= "<< jeta-41 <<endl;
19404  c3x5->cd(kcountHEpositivedirectionReconoiseD5);
19405  HEpositivedirectionReconoiseD5->SetMarkerStyle(20);
19406  HEpositivedirectionReconoiseD5->SetMarkerSize(0.4);
19407  HEpositivedirectionReconoiseD5->GetYaxis()->SetLabelSize(0.04);
19408  HEpositivedirectionReconoiseD5->SetXTitle("HEpositivedirectionReconoiseD5 \b");
19409  HEpositivedirectionReconoiseD5->SetMarkerColor(2);
19410  HEpositivedirectionReconoiseD5->SetLineColor(0);
19411  gPad->SetGridy();
19412  gPad->SetGridx();
19413  // gPad->SetLogy();
19414  if (kcountHEpositivedirectionReconoiseD5 == 1)
19415  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 17; depth = 5 \b");
19416  if (kcountHEpositivedirectionReconoiseD5 == 2)
19417  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 18; depth = 5 \b");
19418  if (kcountHEpositivedirectionReconoiseD5 == 3)
19419  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 19; depth = 5 \b");
19420  if (kcountHEpositivedirectionReconoiseD5 == 4)
19421  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 20; depth = 5 \b");
19422  if (kcountHEpositivedirectionReconoiseD5 == 5)
19423  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 21; depth = 5 \b");
19424  if (kcountHEpositivedirectionReconoiseD5 == 6)
19425  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 22; depth = 5 \b");
19426  if (kcountHEpositivedirectionReconoiseD5 == 7)
19427  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 23; depth = 5 \b");
19428  if (kcountHEpositivedirectionReconoiseD5 == 8)
19429  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 24; depth = 5 \b");
19430  if (kcountHEpositivedirectionReconoiseD5 == 9)
19431  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 25; depth = 5 \b");
19432  if (kcountHEpositivedirectionReconoiseD5 == 10)
19433  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 26; depth = 5 \b");
19434  if (kcountHEpositivedirectionReconoiseD5 == 11)
19435  HEpositivedirectionReconoiseD5->SetXTitle("D for HE+ jeta = 27; depth = 5 \b");
19436  HEpositivedirectionReconoiseD5->Draw("Error");
19437  kcountHEpositivedirectionReconoiseD5++;
19438  if (kcountHEpositivedirectionReconoiseD5 > 11)
19439  break; // 4x6 = 24
19440  } //ccctest>0
19441 
19442  } // for i
19443  } //if(jeta-41 >= 0)
19444  } //for jeta
19446  c3x5->Update();
19447  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png");
19448  c3x5->Clear();
19449  // clean-up
19450  if (h2CeffHEpositivedirectionReconoiseD5)
19451  delete h2CeffHEpositivedirectionReconoiseD5;
19452  //========================================================================================== 19
19453  //======================================================================
19454  //======================================================================1D plot: D vs phi , different eta, depth=6
19455  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
19456  c3x5->Clear();
19457  c3x5->Divide(3, 5);
19458  c3x5->cd(1);
19459  int kcountHEpositivedirectionReconoiseD6 = 1;
19460  TH1F* h2CeffHEpositivedirectionReconoiseD6 = new TH1F("h2CeffHEpositivedirectionReconoiseD6", "", nphi, 0., 72.);
19461 
19462  for (int jeta = 0; jeta < njeta; jeta++) {
19463  // positivedirectionReconoiseD:
19464  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19465  // for (int i=0;i<ndepth;i++) {
19466  // depth=6
19467  for (int i = 5; i < 6; i++) {
19468  TH1F* HEpositivedirectionReconoiseD6 = (TH1F*)h2CeffHEpositivedirectionReconoiseD6->Clone("twod1");
19469 
19470  float ccctest = 0; // to avoid empty massive elements
19471  for (int jphi = 0; jphi < nphi; jphi++) {
19472  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19473  if (areconoisehe[i][jeta][jphi] > 0.) {
19474  HEpositivedirectionReconoiseD6->Fill(jphi, ccc1);
19475  ccctest = 1.; //HEpositivedirectionReconoiseD6->SetBinError(i,0.01);
19476  }
19477  } // for jphi
19478  if (ccctest > 0.) {
19479  //cout<<"1919 kcountHEpositivedirectionReconoiseD6 = "<<kcountHEpositivedirectionReconoiseD6 <<" jeta-41= "<< jeta-41 <<endl;
19480  c3x5->cd(kcountHEpositivedirectionReconoiseD6);
19481  HEpositivedirectionReconoiseD6->SetMarkerStyle(20);
19482  HEpositivedirectionReconoiseD6->SetMarkerSize(0.4);
19483  HEpositivedirectionReconoiseD6->GetYaxis()->SetLabelSize(0.04);
19484  HEpositivedirectionReconoiseD6->SetXTitle("HEpositivedirectionReconoiseD6 \b");
19485  HEpositivedirectionReconoiseD6->SetMarkerColor(2);
19486  HEpositivedirectionReconoiseD6->SetLineColor(0);
19487  gPad->SetGridy();
19488  gPad->SetGridx();
19489  // gPad->SetLogy();
19490  if (kcountHEpositivedirectionReconoiseD6 == 1)
19491  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 18; depth = 6 \b");
19492  if (kcountHEpositivedirectionReconoiseD6 == 2)
19493  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 19; depth = 6 \b");
19494  if (kcountHEpositivedirectionReconoiseD6 == 3)
19495  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 20; depth = 6 \b");
19496  if (kcountHEpositivedirectionReconoiseD6 == 4)
19497  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 21; depth = 6 \b");
19498  if (kcountHEpositivedirectionReconoiseD6 == 5)
19499  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 22; depth = 6 \b");
19500  if (kcountHEpositivedirectionReconoiseD6 == 6)
19501  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 23; depth = 6 \b");
19502  if (kcountHEpositivedirectionReconoiseD6 == 7)
19503  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 24; depth = 6 \b");
19504  if (kcountHEpositivedirectionReconoiseD6 == 8)
19505  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 25; depth = 6 \b");
19506  if (kcountHEpositivedirectionReconoiseD6 == 9)
19507  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 26; depth = 6 \b");
19508  if (kcountHEpositivedirectionReconoiseD6 == 10)
19509  HEpositivedirectionReconoiseD6->SetXTitle("D for HE+ jeta = 27; depth = 6 \b");
19510  HEpositivedirectionReconoiseD6->Draw("Error");
19511  kcountHEpositivedirectionReconoiseD6++;
19512  if (kcountHEpositivedirectionReconoiseD6 > 10)
19513  break; // 4x6 = 24
19514  } //ccctest>0
19515 
19516  } // for i
19517  } //if(jeta-41 >= 0)
19518  } //for jeta
19520  c3x5->Update();
19521  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png");
19522  c3x5->Clear();
19523  // clean-up
19524  if (h2CeffHEpositivedirectionReconoiseD6)
19525  delete h2CeffHEpositivedirectionReconoiseD6;
19526  //========================================================================================== 20
19527  //======================================================================
19528  //======================================================================1D plot: D vs phi , different eta, depth=7
19529  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
19530  c3x5->Clear();
19531  c3x5->Divide(3, 5);
19532  c3x5->cd(1);
19533  int kcountHEpositivedirectionReconoiseD7 = 1;
19534  TH1F* h2CeffHEpositivedirectionReconoiseD7 = new TH1F("h2CeffHEpositivedirectionReconoiseD7", "", nphi, 0., 72.);
19535 
19536  for (int jeta = 0; jeta < njeta; jeta++) {
19537  // positivedirectionReconoiseD:
19538  if (jeta - 41 >= 15 && jeta - 41 <= 28) {
19539  // for (int i=0;i<ndepth;i++) {
19540  // depth=7
19541  for (int i = 6; i < 7; i++) {
19542  TH1F* HEpositivedirectionReconoiseD7 = (TH1F*)h2CeffHEpositivedirectionReconoiseD7->Clone("twod1");
19543 
19544  float ccctest = 0; // to avoid empty massive elements
19545  for (int jphi = 0; jphi < nphi; jphi++) {
19546  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19547  if (areconoisehe[i][jeta][jphi] > 0.) {
19548  HEpositivedirectionReconoiseD7->Fill(jphi, ccc1);
19549  ccctest = 1.; //HEpositivedirectionReconoiseD7->SetBinError(i,0.01);
19550  }
19551  } // for jphi
19552  if (ccctest != 0.) {
19553  //cout<<"2020 kcountHEpositivedirectionReconoiseD7 = "<<kcountHEpositivedirectionReconoiseD7 <<" jeta-41= "<< jeta-41 <<endl;
19554  c3x5->cd(kcountHEpositivedirectionReconoiseD7);
19555  HEpositivedirectionReconoiseD7->SetMarkerStyle(20);
19556  HEpositivedirectionReconoiseD7->SetMarkerSize(0.4);
19557  HEpositivedirectionReconoiseD7->GetYaxis()->SetLabelSize(0.04);
19558  HEpositivedirectionReconoiseD7->SetXTitle("HEpositivedirectionReconoiseD7 \b");
19559  HEpositivedirectionReconoiseD7->SetMarkerColor(2);
19560  HEpositivedirectionReconoiseD7->SetLineColor(0);
19561  gPad->SetGridy();
19562  gPad->SetGridx();
19563  // gPad->SetLogy();
19564  if (kcountHEpositivedirectionReconoiseD7 == 1)
19565  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 25; depth = 7 \b");
19566  if (kcountHEpositivedirectionReconoiseD7 == 2)
19567  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 26; depth = 7 \b");
19568  if (kcountHEpositivedirectionReconoiseD7 == 3)
19569  HEpositivedirectionReconoiseD7->SetXTitle("D for HE+ jeta = 27; depth = 7 \b");
19570  HEpositivedirectionReconoiseD7->Draw("Error");
19571  kcountHEpositivedirectionReconoiseD7++;
19572  if (kcountHEpositivedirectionReconoiseD7 > 3)
19573  break; // 4x6 = 24
19574  } //ccctest>0
19575 
19576  } // for i
19577  } //if(jeta-41 >= 0)
19578  } //for jeta
19580  c3x5->Update();
19581  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png");
19582  c3x5->Clear();
19583  // clean-up
19584  if (h2CeffHEpositivedirectionReconoiseD7)
19585  delete h2CeffHEpositivedirectionReconoiseD7;
19586 
19587  //========================================================================================== 22222214
19588  //======================================================================
19589  //======================================================================1D plot: D vs phi , different eta, depth=1
19590  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
19591  c3x5->Clear();
19593  c3x5->Divide(3, 5);
19594  c3x5->cd(1);
19595  int kcountHEnegativedirectionReconoiseD1 = 1;
19596  TH1F* h2CeffHEnegativedirectionReconoiseD1 = new TH1F("h2CeffHEnegativedirectionReconoiseD1", "", nphi, 0., 72.);
19597 
19598  for (int jeta = 0; jeta < njeta; jeta++) {
19599  // negativedirectionReconoiseD:
19600  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19601  // for (int i=0;i<ndepth;i++) {
19602  // depth=1
19603  for (int i = 0; i < 1; i++) {
19604  TH1F* HEnegativedirectionReconoiseD1 = (TH1F*)h2CeffHEnegativedirectionReconoiseD1->Clone("twod1");
19605 
19606  float ccctest = 0; // to avoid empty massive elements
19607  for (int jphi = 0; jphi < nphi; jphi++) {
19608  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19609  if (areconoisehe[i][jeta][jphi] > 0.) {
19610  HEnegativedirectionReconoiseD1->Fill(jphi, ccc1);
19611  ccctest = 1.; //HEnegativedirectionReconoiseD1->SetBinError(i,0.01);
19612  }
19613  } // for jphi
19614  if (ccctest > 0.) {
19615  //cout<<"1414 kcountHEnegativedirectionReconoiseD1 = "<<kcountHEnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
19616  c3x5->cd(kcountHEnegativedirectionReconoiseD1);
19617  HEnegativedirectionReconoiseD1->SetMarkerStyle(20);
19618  HEnegativedirectionReconoiseD1->SetMarkerSize(0.4);
19619  HEnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
19620  HEnegativedirectionReconoiseD1->SetXTitle("HEnegativedirectionReconoiseD1 \b");
19621  HEnegativedirectionReconoiseD1->SetMarkerColor(2);
19622  HEnegativedirectionReconoiseD1->SetLineColor(0);
19623  gPad->SetGridy();
19624  gPad->SetGridx();
19625  // gPad->SetLogy();
19626  if (kcountHEnegativedirectionReconoiseD1 == 1)
19627  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-29; depth = 1 \b");
19628  if (kcountHEnegativedirectionReconoiseD1 == 2)
19629  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-28; depth = 1 \b");
19630  if (kcountHEnegativedirectionReconoiseD1 == 3)
19631  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-27; depth = 1 \b");
19632  if (kcountHEnegativedirectionReconoiseD1 == 4)
19633  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-26; depth = 1 \b");
19634  if (kcountHEnegativedirectionReconoiseD1 == 5)
19635  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-25; depth = 1 \b");
19636  if (kcountHEnegativedirectionReconoiseD1 == 6)
19637  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-24; depth = 1 \b");
19638  if (kcountHEnegativedirectionReconoiseD1 == 7)
19639  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-23; depth = 1 \b");
19640  if (kcountHEnegativedirectionReconoiseD1 == 8)
19641  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-22; depth = 1 \b");
19642  if (kcountHEnegativedirectionReconoiseD1 == 9)
19643  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-21; depth = 1 \b");
19644  if (kcountHEnegativedirectionReconoiseD1 == 10)
19645  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-20; depth = 1 \b");
19646  if (kcountHEnegativedirectionReconoiseD1 == 11)
19647  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-19; depth = 1 \b");
19648  if (kcountHEnegativedirectionReconoiseD1 == 12)
19649  HEnegativedirectionReconoiseD1->SetXTitle("D for HE- jeta =-18; depth = 1 \b");
19650  HEnegativedirectionReconoiseD1->Draw("Error");
19651  kcountHEnegativedirectionReconoiseD1++;
19652  if (kcountHEnegativedirectionReconoiseD1 > 12)
19653  break; // 4x6 = 24
19654  } //ccctest>0
19655 
19656  } // for i
19657  } //if(jeta-41 < 0)
19658  } //for jeta
19660  c3x5->Update();
19661  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png");
19662  c3x5->Clear();
19663  // clean-up
19664  if (h2CeffHEnegativedirectionReconoiseD1)
19665  delete h2CeffHEnegativedirectionReconoiseD1;
19666  //========================================================================================== 22222215
19667  //======================================================================
19668  //======================================================================1D plot: D vs phi , different eta, depth=2
19669  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
19670  c3x5->Clear();
19671  c3x5->Divide(3, 5);
19672  c3x5->cd(1);
19673  int kcountHEnegativedirectionReconoiseD2 = 1;
19674  TH1F* h2CeffHEnegativedirectionReconoiseD2 = new TH1F("h2CeffHEnegativedirectionReconoiseD2", "", nphi, 0., 72.);
19675 
19676  for (int jeta = 0; jeta < njeta; jeta++) {
19677  // negativedirectionReconoiseD:
19678  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19679  // for (int i=0;i<ndepth;i++) {
19680  // depth=2
19681  for (int i = 1; i < 2; i++) {
19682  TH1F* HEnegativedirectionReconoiseD2 = (TH1F*)h2CeffHEnegativedirectionReconoiseD2->Clone("twod1");
19683 
19684  float ccctest = 0; // to avoid empty massive elements
19685  for (int jphi = 0; jphi < nphi; jphi++) {
19686  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19687  if (areconoisehe[i][jeta][jphi] > 0.) {
19688  HEnegativedirectionReconoiseD2->Fill(jphi, ccc1);
19689  ccctest = 1.; //HEnegativedirectionReconoiseD2->SetBinError(i,0.01);
19690  }
19691  } // for jphi
19692  if (ccctest > 0.) {
19693  //cout<<"1515 kcountHEnegativedirectionReconoiseD2 = "<<kcountHEnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
19694  c3x5->cd(kcountHEnegativedirectionReconoiseD2);
19695  HEnegativedirectionReconoiseD2->SetMarkerStyle(20);
19696  HEnegativedirectionReconoiseD2->SetMarkerSize(0.4);
19697  HEnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
19698  HEnegativedirectionReconoiseD2->SetXTitle("HEnegativedirectionReconoiseD2 \b");
19699  HEnegativedirectionReconoiseD2->SetMarkerColor(2);
19700  HEnegativedirectionReconoiseD2->SetLineColor(0);
19701  gPad->SetGridy();
19702  gPad->SetGridx();
19703  // gPad->SetLogy();
19704  if (kcountHEnegativedirectionReconoiseD2 == 1)
19705  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-29; depth = 2 \b");
19706  if (kcountHEnegativedirectionReconoiseD2 == 2)
19707  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-28; depth = 2 \b");
19708  if (kcountHEnegativedirectionReconoiseD2 == 3)
19709  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-27; depth = 2 \b");
19710  if (kcountHEnegativedirectionReconoiseD2 == 4)
19711  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-26; depth = 2 \b");
19712  if (kcountHEnegativedirectionReconoiseD2 == 5)
19713  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-25; depth = 2 \b");
19714  if (kcountHEnegativedirectionReconoiseD2 == 6)
19715  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-24; depth = 2 \b");
19716  if (kcountHEnegativedirectionReconoiseD2 == 7)
19717  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-23; depth = 2 \b");
19718  if (kcountHEnegativedirectionReconoiseD2 == 8)
19719  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-22; depth = 2 \b");
19720  if (kcountHEnegativedirectionReconoiseD2 == 9)
19721  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-21; depth = 2 \b");
19722  if (kcountHEnegativedirectionReconoiseD2 == 10)
19723  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-20; depth = 2 \b");
19724  if (kcountHEnegativedirectionReconoiseD2 == 11)
19725  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-19; depth = 2 \b");
19726  if (kcountHEnegativedirectionReconoiseD2 == 12)
19727  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-18; depth = 2 \b");
19728  if (kcountHEnegativedirectionReconoiseD2 == 13)
19729  HEnegativedirectionReconoiseD2->SetXTitle("D for HE- jeta =-17; depth = 2 \b");
19730  HEnegativedirectionReconoiseD2->Draw("Error");
19731  kcountHEnegativedirectionReconoiseD2++;
19732  if (kcountHEnegativedirectionReconoiseD2 > 13)
19733  break; // 4x6 = 24
19734  } //ccctest>0
19735 
19736  } // for i
19737  } //if(jeta-41 < 0)
19738  } //for jeta
19740  c3x5->Update();
19741  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png");
19742  c3x5->Clear();
19743  // clean-up
19744  if (h2CeffHEnegativedirectionReconoiseD2)
19745  delete h2CeffHEnegativedirectionReconoiseD2;
19746  //========================================================================================== 22222216
19747  //======================================================================
19748  //======================================================================1D plot: D vs phi , different eta, depth=3
19749  //cout<<" 1D plot: D vs phi , different eta, depth=3 *****" <<endl;
19750  c3x5->Clear();
19751  c3x5->Divide(3, 5);
19752  c3x5->cd(1);
19753  int kcountHEnegativedirectionReconoiseD3 = 1;
19754  TH1F* h2CeffHEnegativedirectionReconoiseD3 = new TH1F("h2CeffHEnegativedirectionReconoiseD3", "", nphi, 0., 72.);
19755 
19756  for (int jeta = 0; jeta < njeta; jeta++) {
19757  // negativedirectionReconoiseD:
19758  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19759  // for (int i=0;i<ndepth;i++) {
19760  // depth=3
19761  for (int i = 2; i < 3; i++) {
19762  TH1F* HEnegativedirectionReconoiseD3 = (TH1F*)h2CeffHEnegativedirectionReconoiseD3->Clone("twod1");
19763 
19764  float ccctest = 0; // to avoid empty massive elements
19765  for (int jphi = 0; jphi < nphi; jphi++) {
19766  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19767  if (areconoisehe[i][jeta][jphi] > 0.) {
19768  HEnegativedirectionReconoiseD3->Fill(jphi, ccc1);
19769  ccctest = 1.; //HEnegativedirectionReconoiseD3->SetBinError(i,0.01);
19770  }
19771  } // for jphi
19772  if (ccctest > 0.) {
19773  //cout<<"1616 kcountHEnegativedirectionReconoiseD3 = "<<kcountHEnegativedirectionReconoiseD3 <<" jeta-41= "<< jeta-41 <<endl;
19774  c3x5->cd(kcountHEnegativedirectionReconoiseD3);
19775  HEnegativedirectionReconoiseD3->SetMarkerStyle(20);
19776  HEnegativedirectionReconoiseD3->SetMarkerSize(0.4);
19777  HEnegativedirectionReconoiseD3->GetYaxis()->SetLabelSize(0.04);
19778  HEnegativedirectionReconoiseD3->SetXTitle("HEnegativedirectionReconoiseD3 \b");
19779  HEnegativedirectionReconoiseD3->SetMarkerColor(2);
19780  HEnegativedirectionReconoiseD3->SetLineColor(0);
19781  gPad->SetGridy();
19782  gPad->SetGridx();
19783  // gPad->SetLogy();
19784  if (kcountHEnegativedirectionReconoiseD3 == 1)
19785  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-29; depth = 3 \b");
19786  if (kcountHEnegativedirectionReconoiseD3 == 2)
19787  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-28; depth = 3 \b");
19788  if (kcountHEnegativedirectionReconoiseD3 == 3)
19789  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-27; depth = 3 \b");
19790  if (kcountHEnegativedirectionReconoiseD3 == 4)
19791  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-26; depth = 3 \b");
19792  if (kcountHEnegativedirectionReconoiseD3 == 5)
19793  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-25; depth = 3 \b");
19794  if (kcountHEnegativedirectionReconoiseD3 == 6)
19795  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-24; depth = 3 \b");
19796  if (kcountHEnegativedirectionReconoiseD3 == 7)
19797  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-23; depth = 3 \b");
19798  if (kcountHEnegativedirectionReconoiseD3 == 8)
19799  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-22; depth = 3 \b");
19800  if (kcountHEnegativedirectionReconoiseD3 == 9)
19801  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-21; depth = 3 \b");
19802  if (kcountHEnegativedirectionReconoiseD3 == 10)
19803  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-20; depth = 3 \b");
19804  if (kcountHEnegativedirectionReconoiseD3 == 11)
19805  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-19; depth = 3 \b");
19806  if (kcountHEnegativedirectionReconoiseD3 == 12)
19807  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-18; depth = 3 \b");
19808  if (kcountHEnegativedirectionReconoiseD3 == 13)
19809  HEnegativedirectionReconoiseD3->SetXTitle("D for HE- jeta =-17; depth = 3 \b");
19810  HEnegativedirectionReconoiseD3->Draw("Error");
19811  kcountHEnegativedirectionReconoiseD3++;
19812  if (kcountHEnegativedirectionReconoiseD3 > 13)
19813  break; // 4x6 = 24
19814  } //ccctest>0
19815 
19816  } // for i
19817  } //if(jeta-41 < 0)
19818  } //for jeta
19820  c3x5->Update();
19821  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png");
19822  c3x5->Clear();
19823  // clean-up
19824  if (h2CeffHEnegativedirectionReconoiseD3)
19825  delete h2CeffHEnegativedirectionReconoiseD3;
19826  //========================================================================================== 22222217
19827  //======================================================================
19828  //======================================================================1D plot: D vs phi , different eta, depth=4
19829  //cout<<" 1D plot: D vs phi , different eta, depth=4 *****" <<endl;
19830  c3x5->Clear();
19831  c3x5->Divide(3, 5);
19832  c3x5->cd(1);
19833  int kcountHEnegativedirectionReconoiseD4 = 1;
19834  TH1F* h2CeffHEnegativedirectionReconoiseD4 = new TH1F("h2CeffHEnegativedirectionReconoiseD4", "", nphi, 0., 72.);
19835 
19836  for (int jeta = 0; jeta < njeta; jeta++) {
19837  // negativedirectionReconoiseD:
19838  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19839  // for (int i=0;i<ndepth;i++) {
19840  // depth=4
19841  for (int i = 3; i < 4; i++) {
19842  TH1F* HEnegativedirectionReconoiseD4 = (TH1F*)h2CeffHEnegativedirectionReconoiseD4->Clone("twod1");
19843 
19844  float ccctest = 0; // to avoid empty massive elements
19845  for (int jphi = 0; jphi < nphi; jphi++) {
19846  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19847  if (areconoisehe[i][jeta][jphi] > 0.) {
19848  HEnegativedirectionReconoiseD4->Fill(jphi, ccc1);
19849  ccctest = 1.; //HEnegativedirectionReconoiseD4->SetBinError(i,0.01);
19850  }
19851  } // for jphi
19852  if (ccctest > 0.) {
19853  //cout<<"1717 kcountHEnegativedirectionReconoiseD4 = "<<kcountHEnegativedirectionReconoiseD4 <<" jeta-41= "<< jeta-41 <<endl;
19854  c3x5->cd(kcountHEnegativedirectionReconoiseD4);
19855  HEnegativedirectionReconoiseD4->SetMarkerStyle(20);
19856  HEnegativedirectionReconoiseD4->SetMarkerSize(0.4);
19857  HEnegativedirectionReconoiseD4->GetYaxis()->SetLabelSize(0.04);
19858  HEnegativedirectionReconoiseD4->SetXTitle("HEnegativedirectionReconoiseD4 \b");
19859  HEnegativedirectionReconoiseD4->SetMarkerColor(2);
19860  HEnegativedirectionReconoiseD4->SetLineColor(0);
19861  gPad->SetGridy();
19862  gPad->SetGridx();
19863  // gPad->SetLogy();
19864  if (kcountHEnegativedirectionReconoiseD4 == 1)
19865  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-28; depth = 4 \b");
19866  if (kcountHEnegativedirectionReconoiseD4 == 2)
19867  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-27; depth = 4 \b");
19868  if (kcountHEnegativedirectionReconoiseD4 == 3)
19869  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-26; depth = 4 \b");
19870  if (kcountHEnegativedirectionReconoiseD4 == 4)
19871  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-25; depth = 4 \b");
19872  if (kcountHEnegativedirectionReconoiseD4 == 5)
19873  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-24; depth = 4 \b");
19874  if (kcountHEnegativedirectionReconoiseD4 == 6)
19875  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-23; depth = 4 \b");
19876  if (kcountHEnegativedirectionReconoiseD4 == 7)
19877  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-22; depth = 4 \b");
19878  if (kcountHEnegativedirectionReconoiseD4 == 8)
19879  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-21; depth = 4 \b");
19880  if (kcountHEnegativedirectionReconoiseD4 == 9)
19881  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-20; depth = 4 \b");
19882  if (kcountHEnegativedirectionReconoiseD4 == 10)
19883  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-19; depth = 4 \b");
19884  if (kcountHEnegativedirectionReconoiseD4 == 11)
19885  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-18; depth = 4 \b");
19886  if (kcountHEnegativedirectionReconoiseD4 == 12)
19887  HEnegativedirectionReconoiseD4->SetXTitle("D for HE- jeta =-16; depth = 4 \b");
19888  HEnegativedirectionReconoiseD4->Draw("Error");
19889  kcountHEnegativedirectionReconoiseD4++;
19890  if (kcountHEnegativedirectionReconoiseD4 > 12)
19891  break; // 4x6 = 24
19892  } //ccctest>0
19893 
19894  } // for i
19895  } //if(jeta-41 < 0)
19896  } //for jeta
19898  c3x5->Update();
19899  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png");
19900  c3x5->Clear();
19901  // clean-up
19902  if (h2CeffHEnegativedirectionReconoiseD4)
19903  delete h2CeffHEnegativedirectionReconoiseD4;
19904  //========================================================================================== 22222218
19905  //======================================================================
19906  //======================================================================1D plot: D vs phi , different eta, depth=5
19907  //cout<<" 1D plot: D vs phi , different eta, depth=5 *****" <<endl;
19908  c3x5->Clear();
19909  c3x5->Divide(3, 5);
19910  c3x5->cd(1);
19911  int kcountHEnegativedirectionReconoiseD5 = 1;
19912  TH1F* h2CeffHEnegativedirectionReconoiseD5 = new TH1F("h2CeffHEnegativedirectionReconoiseD5", "", nphi, 0., 72.);
19913 
19914  for (int jeta = 0; jeta < njeta; jeta++) {
19915  // negativedirectionReconoiseD:
19916  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19917  // for (int i=0;i<ndepth;i++) {
19918  // depth=5
19919  for (int i = 4; i < 5; i++) {
19920  TH1F* HEnegativedirectionReconoiseD5 = (TH1F*)h2CeffHEnegativedirectionReconoiseD5->Clone("twod1");
19921 
19922  float ccctest = 0; // to avoid empty massive elements
19923  for (int jphi = 0; jphi < nphi; jphi++) {
19924  double ccc1 = reconoisevariancehe[i][jeta][jphi];
19925  if (areconoisehe[i][jeta][jphi] > 0.) {
19926  HEnegativedirectionReconoiseD5->Fill(jphi, ccc1);
19927  ccctest = 1.; //HEnegativedirectionReconoiseD5->SetBinError(i,0.01);
19928  }
19929  } // for jphi
19930  if (ccctest > 0.) {
19931  //cout<<"1818 kcountHEnegativedirectionReconoiseD5 = "<<kcountHEnegativedirectionReconoiseD5 <<" jeta-41= "<< jeta-41 <<endl;
19932  c3x5->cd(kcountHEnegativedirectionReconoiseD5);
19933  HEnegativedirectionReconoiseD5->SetMarkerStyle(20);
19934  HEnegativedirectionReconoiseD5->SetMarkerSize(0.4);
19935  HEnegativedirectionReconoiseD5->GetYaxis()->SetLabelSize(0.04);
19936  HEnegativedirectionReconoiseD5->SetXTitle("HEnegativedirectionReconoiseD5 \b");
19937  HEnegativedirectionReconoiseD5->SetMarkerColor(2);
19938  HEnegativedirectionReconoiseD5->SetLineColor(0);
19939  gPad->SetGridy();
19940  gPad->SetGridx();
19941  // gPad->SetLogy();
19942  if (kcountHEnegativedirectionReconoiseD5 == 1)
19943  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-28; depth = 5 \b");
19944  if (kcountHEnegativedirectionReconoiseD5 == 2)
19945  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-27; depth = 5 \b");
19946  if (kcountHEnegativedirectionReconoiseD5 == 3)
19947  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-26; depth = 5 \b");
19948  if (kcountHEnegativedirectionReconoiseD5 == 4)
19949  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-25; depth = 5 \b");
19950  if (kcountHEnegativedirectionReconoiseD5 == 5)
19951  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-24; depth = 5 \b");
19952  if (kcountHEnegativedirectionReconoiseD5 == 6)
19953  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-23; depth = 5 \b");
19954  if (kcountHEnegativedirectionReconoiseD5 == 7)
19955  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-22; depth = 5 \b");
19956  if (kcountHEnegativedirectionReconoiseD5 == 8)
19957  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-21; depth = 5 \b");
19958  if (kcountHEnegativedirectionReconoiseD5 == 9)
19959  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-20; depth = 5 \b");
19960  if (kcountHEnegativedirectionReconoiseD5 == 10)
19961  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-19; depth = 5 \b");
19962  if (kcountHEnegativedirectionReconoiseD5 == 11)
19963  HEnegativedirectionReconoiseD5->SetXTitle("D for HE- jeta =-18; depth = 5 \b");
19964  HEnegativedirectionReconoiseD5->Draw("Error");
19965  kcountHEnegativedirectionReconoiseD5++;
19966  if (kcountHEnegativedirectionReconoiseD5 > 11)
19967  break; // 4x6 = 24
19968  } //ccctest>0
19969 
19970  } // for i
19971  } //if(jeta-41 < 0)
19972  } //for jeta
19974  c3x5->Update();
19975  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png");
19976  c3x5->Clear();
19977  // clean-up
19978  if (h2CeffHEnegativedirectionReconoiseD5)
19979  delete h2CeffHEnegativedirectionReconoiseD5;
19980  //========================================================================================== 22222219
19981  //======================================================================
19982  //======================================================================1D plot: D vs phi , different eta, depth=6
19983  //cout<<" 1D plot: D vs phi , different eta, depth=6 *****" <<endl;
19984  c3x5->Clear();
19985  c3x5->Divide(3, 5);
19986  c3x5->cd(1);
19987  int kcountHEnegativedirectionReconoiseD6 = 1;
19988  TH1F* h2CeffHEnegativedirectionReconoiseD6 = new TH1F("h2CeffHEnegativedirectionReconoiseD6", "", nphi, 0., 72.);
19989 
19990  for (int jeta = 0; jeta < njeta; jeta++) {
19991  // negativedirectionReconoiseD:
19992  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
19993  // for (int i=0;i<ndepth;i++) {
19994  // depth=6
19995  for (int i = 5; i < 6; i++) {
19996  TH1F* HEnegativedirectionReconoiseD6 = (TH1F*)h2CeffHEnegativedirectionReconoiseD6->Clone("twod1");
19997 
19998  float ccctest = 0; // to avoid empty massive elements
19999  for (int jphi = 0; jphi < nphi; jphi++) {
20000  double ccc1 = reconoisevariancehe[i][jeta][jphi];
20001  if (areconoisehe[i][jeta][jphi] > 0.) {
20002  HEnegativedirectionReconoiseD6->Fill(jphi, ccc1);
20003  ccctest = 1.; //HEnegativedirectionReconoiseD6->SetBinError(i,0.01);
20004  }
20005  } // for jphi
20006  if (ccctest > 0.) {
20007  //cout<<"1919 kcountHEnegativedirectionReconoiseD6 = "<<kcountHEnegativedirectionReconoiseD6 <<" jeta-41= "<< jeta-41 <<endl;
20008  c3x5->cd(kcountHEnegativedirectionReconoiseD6);
20009  HEnegativedirectionReconoiseD6->SetMarkerStyle(20);
20010  HEnegativedirectionReconoiseD6->SetMarkerSize(0.4);
20011  HEnegativedirectionReconoiseD6->GetYaxis()->SetLabelSize(0.04);
20012  HEnegativedirectionReconoiseD6->SetXTitle("HEnegativedirectionReconoiseD6 \b");
20013  HEnegativedirectionReconoiseD6->SetMarkerColor(2);
20014  HEnegativedirectionReconoiseD6->SetLineColor(0);
20015  gPad->SetGridy();
20016  gPad->SetGridx();
20017  // gPad->SetLogy();
20018  if (kcountHEnegativedirectionReconoiseD6 == 1)
20019  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-28; depth = 6 \b");
20020  if (kcountHEnegativedirectionReconoiseD6 == 2)
20021  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-27; depth = 6 \b");
20022  if (kcountHEnegativedirectionReconoiseD6 == 3)
20023  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-26; depth = 6 \b");
20024  if (kcountHEnegativedirectionReconoiseD6 == 4)
20025  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-25; depth = 6 \b");
20026  if (kcountHEnegativedirectionReconoiseD6 == 5)
20027  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-24; depth = 6 \b");
20028  if (kcountHEnegativedirectionReconoiseD6 == 6)
20029  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-23; depth = 6 \b");
20030  if (kcountHEnegativedirectionReconoiseD6 == 7)
20031  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-22; depth = 6 \b");
20032  if (kcountHEnegativedirectionReconoiseD6 == 8)
20033  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-21; depth = 6 \b");
20034  if (kcountHEnegativedirectionReconoiseD6 == 9)
20035  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-20; depth = 6 \b");
20036  if (kcountHEnegativedirectionReconoiseD6 == 10)
20037  HEnegativedirectionReconoiseD6->SetXTitle("D for HE- jeta =-19; depth = 6 \b");
20038  HEnegativedirectionReconoiseD6->Draw("Error");
20039  kcountHEnegativedirectionReconoiseD6++;
20040  if (kcountHEnegativedirectionReconoiseD6 > 10)
20041  break; // 4x6 = 24
20042  } //ccctest>0
20043 
20044  } // for i
20045  } //if(jeta-41 < 0)
20046  } //for jeta
20048  c3x5->Update();
20049  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png");
20050  c3x5->Clear();
20051  // clean-up
20052  if (h2CeffHEnegativedirectionReconoiseD6)
20053  delete h2CeffHEnegativedirectionReconoiseD6;
20054  //========================================================================================== 22222220
20055  //======================================================================
20056  //======================================================================1D plot: D vs phi , different eta, depth=7
20057  //cout<<" 1D plot: D vs phi , different eta, depth=7 *****" <<endl;
20058  c3x5->Clear();
20059  c3x5->Divide(3, 5);
20060  c3x5->cd(1);
20061  int kcountHEnegativedirectionReconoiseD7 = 1;
20062  TH1F* h2CeffHEnegativedirectionReconoiseD7 = new TH1F("h2CeffHEnegativedirectionReconoiseD7", "", nphi, 0., 72.);
20063 
20064  for (int jeta = 0; jeta < njeta; jeta++) {
20065  // negativedirectionReconoiseD:
20066  if (jeta - 41 >= -29 && jeta - 41 <= -16) {
20067  // for (int i=0;i<ndepth;i++) {
20068  // depth=7
20069  for (int i = 6; i < 7; i++) {
20070  TH1F* HEnegativedirectionReconoiseD7 = (TH1F*)h2CeffHEnegativedirectionReconoiseD7->Clone("twod1");
20071 
20072  float ccctest = 0; // to avoid empty massive elements
20073  for (int jphi = 0; jphi < nphi; jphi++) {
20074  double ccc1 = reconoisevariancehe[i][jeta][jphi];
20075  if (areconoisehe[i][jeta][jphi] > 0.) {
20076  HEnegativedirectionReconoiseD7->Fill(jphi, ccc1);
20077  ccctest = 1.; //HEnegativedirectionReconoiseD7->SetBinError(i,0.01);
20078  }
20079  } // for jphi
20080  if (ccctest != 0.) {
20081  //cout<<"2020 kcountHEnegativedirectionReconoiseD7 = "<<kcountHEnegativedirectionReconoiseD7 <<" jeta-41= "<< jeta-41 <<endl;
20082  c3x5->cd(kcountHEnegativedirectionReconoiseD7);
20083  HEnegativedirectionReconoiseD7->SetMarkerStyle(20);
20084  HEnegativedirectionReconoiseD7->SetMarkerSize(0.4);
20085  HEnegativedirectionReconoiseD7->GetYaxis()->SetLabelSize(0.04);
20086  HEnegativedirectionReconoiseD7->SetXTitle("HEnegativedirectionReconoiseD7 \b");
20087  HEnegativedirectionReconoiseD7->SetMarkerColor(2);
20088  HEnegativedirectionReconoiseD7->SetLineColor(0);
20089  gPad->SetGridy();
20090  gPad->SetGridx();
20091  // gPad->SetLogy();
20092  if (kcountHEnegativedirectionReconoiseD7 == 1)
20093  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-28; depth = 7 \b");
20094  if (kcountHEnegativedirectionReconoiseD7 == 2)
20095  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-27; depth = 7 \b");
20096  if (kcountHEnegativedirectionReconoiseD7 == 3)
20097  HEnegativedirectionReconoiseD7->SetXTitle("D for HE- jeta =-26; depth = 7 \b");
20098  HEnegativedirectionReconoiseD7->Draw("Error");
20099  kcountHEnegativedirectionReconoiseD7++;
20100  if (kcountHEnegativedirectionReconoiseD7 > 3)
20101  break; // 4x6 = 24
20102  } //ccctest>0
20103 
20104  } // for i
20105  } //if(jeta-41 < 0)
20106  } //for jeta
20108  c3x5->Update();
20109  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png");
20110  c3x5->Clear();
20111  // clean-up
20112  if (h2CeffHEnegativedirectionReconoiseD7)
20113  delete h2CeffHEnegativedirectionReconoiseD7;
20114  //===================================================================== END of Reconoise HE for phi-symmetry
20115  //===================================================================== END of Reconoise HE for phi-symmetry
20116  //===================================================================== END of Reconoise HE for phi-symmetry
20120  // int k_max[5]={0,4,7,4,4}; // maximum depth for each subdet
20121  //ndepth = k_max[5];
20122  ndepth = 2;
20123  double areconoiseHF[ndepth][njeta][njphi];
20124  double breconoiseHF[ndepth][njeta][njphi];
20125  double reconoisevarianceHF[ndepth][njeta][njphi];
20126 
20127  TH2F* recNoiseEnergy1HF1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HF1");
20128  TH2F* recNoiseEnergy0HF1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HF1");
20129  TH2F* recNoiseEnergyHF1 = (TH2F*)recNoiseEnergy1HF1->Clone("recNoiseEnergyHF1");
20130  recNoiseEnergyHF1->Divide(recNoiseEnergy1HF1, recNoiseEnergy0HF1, 1, 1, "B");
20131  TH2F* recNoiseEnergy1HF2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy1_HF2");
20132  TH2F* recNoiseEnergy0HF2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HF2");
20133  TH2F* recNoiseEnergyHF2 = (TH2F*)recNoiseEnergy1HF2->Clone("recNoiseEnergyHF2");
20134  recNoiseEnergyHF2->Divide(recNoiseEnergy1HF2, recNoiseEnergy0HF2, 1, 1, "B");
20135  //====================================================================== PHI normalization & put R into massive areconoiseHF
20136  for (int jeta = 0; jeta < njeta; jeta++) {
20137  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20138  //preparation for PHI normalization:
20139  double sumreconoiseHF0 = 0;
20140  int nsumreconoiseHF0 = 0;
20141  double sumreconoiseHF1 = 0;
20142  int nsumreconoiseHF1 = 0;
20143  for (int jphi = 0; jphi < njphi; jphi++) {
20144  areconoiseHF[0][jeta][jphi] = recNoiseEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
20145  areconoiseHF[1][jeta][jphi] = recNoiseEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
20146  breconoiseHF[0][jeta][jphi] = recNoiseEnergyHF1->GetBinContent(jeta + 1, jphi + 1);
20147  breconoiseHF[1][jeta][jphi] = recNoiseEnergyHF2->GetBinContent(jeta + 1, jphi + 1);
20148  sumreconoiseHF0 += areconoiseHF[0][jeta][jphi];
20149  ++nsumreconoiseHF0;
20150  sumreconoiseHF1 += areconoiseHF[1][jeta][jphi];
20151  ++nsumreconoiseHF1;
20152  } // phi
20153 
20154  // PHI normalization for DIF:
20155  for (int jphi = 0; jphi < njphi; jphi++) {
20156  if (sumreconoiseHF0 != 0.)
20157  breconoiseHF[0][jeta][jphi] -= (sumreconoiseHF0 / nsumreconoiseHF0);
20158  if (sumreconoiseHF1 != 0.)
20159  breconoiseHF[1][jeta][jphi] -= (sumreconoiseHF1 / nsumreconoiseHF1);
20160  } // phi
20161 
20162  // PHI normalization for R:
20163  for (int jphi = 0; jphi < njphi; jphi++) {
20164  if (sumreconoiseHF0 != 0.)
20165  areconoiseHF[0][jeta][jphi] /= (sumreconoiseHF0 / nsumreconoiseHF0);
20166  if (sumreconoiseHF1 != 0.)
20167  areconoiseHF[1][jeta][jphi] /= (sumreconoiseHF1 / nsumreconoiseHF1);
20168  } // phi
20169 
20170  } // jeta-41
20171  } //eta
20173 
20174  // RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR: Reconoise HF
20175  //------------------------ 2D-eta/phi-plot: R, averaged over depthfs
20176  //======================================================================
20177  //======================================================================
20178  // cout<<" R2D-eta/phi-plot: R, averaged over depthfs *****" <<endl;
20179  c2x1->Clear();
20181  c2x1->Divide(2, 1);
20182  c2x1->cd(1);
20183  TH2F* GefzRreconoiseHF42D = new TH2F("GefzRreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
20184  TH2F* GefzRreconoiseHF42D0 = new TH2F("GefzRreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
20185  TH2F* GefzRreconoiseHF42DF = (TH2F*)GefzRreconoiseHF42D0->Clone("GefzRreconoiseHF42DF");
20186  for (int i = 0; i < ndepth; i++) {
20187  for (int jeta = 0; jeta < neta; jeta++) {
20188  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20189  for (int jphi = 0; jphi < nphi; jphi++) {
20190  double ccc1 = areconoiseHF[i][jeta][jphi];
20191  int k2plot = jeta - 41;
20192  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
20193  if (ccc1 != 0.) {
20194  GefzRreconoiseHF42D->Fill(kkk, jphi, ccc1);
20195  GefzRreconoiseHF42D0->Fill(kkk, jphi, 1.);
20196  }
20197  }
20198  }
20199  }
20200  }
20201  GefzRreconoiseHF42DF->Divide(GefzRreconoiseHF42D, GefzRreconoiseHF42D0, 1, 1, "B"); // average A
20202  gPad->SetGridy();
20203  gPad->SetGridx(); // gPad->SetLogz();
20204  GefzRreconoiseHF42DF->SetXTitle("<R>_depth #eta \b");
20205  GefzRreconoiseHF42DF->SetYTitle(" #phi \b");
20206  GefzRreconoiseHF42DF->Draw("COLZ");
20207 
20208  c2x1->cd(2);
20209  TH1F* energyhitNoise_HF = (TH1F*)dir->FindObjectAny("h_energyhitNoise_HF");
20210  energyhitNoise_HF->SetMarkerStyle(20);
20211  energyhitNoise_HF->SetMarkerSize(0.4);
20212  energyhitNoise_HF->GetYaxis()->SetLabelSize(0.04);
20213  energyhitNoise_HF->SetXTitle("energyhitNoise_HF \b");
20214  energyhitNoise_HF->SetMarkerColor(2);
20215  energyhitNoise_HF->SetLineColor(0);
20216  gPad->SetGridy();
20217  gPad->SetGridx();
20218  energyhitNoise_HF->Draw("Error");
20219 
20221  c2x1->Update();
20222  c2x1->Print("RreconoiseGeneralD2PhiSymmetryHF.png");
20223  c2x1->Clear();
20224  // clean-up
20225  if (GefzRreconoiseHF42D)
20226  delete GefzRreconoiseHF42D;
20227  if (GefzRreconoiseHF42D0)
20228  delete GefzRreconoiseHF42D0;
20229  if (GefzRreconoiseHF42DF)
20230  delete GefzRreconoiseHF42DF;
20231  //====================================================================== 1D plot: R vs phi , averaged over depthfs & eta
20232  //======================================================================
20233  //cout<<" 1D plot: R vs phi , averaged over depthfs & eta *****" <<endl;
20234  c1x1->Clear();
20236  c1x1->Divide(1, 1);
20237  c1x1->cd(1);
20238  TH1F* GefzRreconoiseHF41D = new TH1F("GefzRreconoiseHF41D", "", nphi, 0., 72.);
20239  TH1F* GefzRreconoiseHF41D0 = new TH1F("GefzRreconoiseHF41D0", "", nphi, 0., 72.);
20240  TH1F* GefzRreconoiseHF41DF = (TH1F*)GefzRreconoiseHF41D0->Clone("GefzRreconoiseHF41DF");
20241  for (int jphi = 0; jphi < nphi; jphi++) {
20242  for (int jeta = 0; jeta < neta; jeta++) {
20243  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20244  for (int i = 0; i < ndepth; i++) {
20245  double ccc1 = areconoiseHF[i][jeta][jphi];
20246  if (ccc1 != 0.) {
20247  GefzRreconoiseHF41D->Fill(jphi, ccc1);
20248  GefzRreconoiseHF41D0->Fill(jphi, 1.);
20249  }
20250  }
20251  }
20252  }
20253  }
20254  GefzRreconoiseHF41DF->Divide(GefzRreconoiseHF41D, GefzRreconoiseHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
20255  GefzRreconoiseHF41D0->Sumw2();
20256  // for (int jphi=1;jphi<73;jphi++) {GefzRreconoiseHF41DF->SetBinError(jphi,0.01);}
20257  gPad->SetGridy();
20258  gPad->SetGridx(); // gPad->SetLogz();
20259  GefzRreconoiseHF41DF->SetMarkerStyle(20);
20260  GefzRreconoiseHF41DF->SetMarkerSize(1.4);
20261  GefzRreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
20262  GefzRreconoiseHF41DF->SetXTitle("#phi \b");
20263  GefzRreconoiseHF41DF->SetYTitle(" <R> \b");
20264  GefzRreconoiseHF41DF->SetZTitle("<R>_PHI - AllDepthfs \b");
20265  GefzRreconoiseHF41DF->SetMarkerColor(4);
20266  GefzRreconoiseHF41DF->SetLineColor(
20267  4); // GefzRreconoiseHF41DF->SetMinimum(0.8); // GefzRreconoiseHF41DF->SetMaximum(1.000);
20268  GefzRreconoiseHF41DF->Draw("Error");
20270  c1x1->Update();
20271  c1x1->Print("RreconoiseGeneralD1PhiSymmetryHF.png");
20272  c1x1->Clear();
20273  // clean-up
20274  if (GefzRreconoiseHF41D)
20275  delete GefzRreconoiseHF41D;
20276  if (GefzRreconoiseHF41D0)
20277  delete GefzRreconoiseHF41D0;
20278  if (GefzRreconoiseHF41DF)
20279  delete GefzRreconoiseHF41DF;
20280  //========================================================================================== 4
20281  //======================================================================
20282  //======================================================================1D plot: R vs phi , different eta, depth=1
20283  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
20284  c3x5->Clear();
20286  c3x5->Divide(3, 5);
20287  c3x5->cd(1);
20288  int kcountHFpositivedirectionReconoise1 = 1;
20289  TH1F* h2CeffHFpositivedirectionReconoise1 = new TH1F("h2CeffHFpositivedirectionReconoise1", "", nphi, 0., 72.);
20290  for (int jeta = 0; jeta < njeta; jeta++) {
20291  // positivedirectionReconoise:
20292  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20293  // for (int i=0;i<ndepth;i++) {
20294  // depth=1
20295  for (int i = 0; i < 1; i++) {
20296  TH1F* HFpositivedirectionReconoise1 = (TH1F*)h2CeffHFpositivedirectionReconoise1->Clone("twod1");
20297  float ccctest = 0; // to avoid empty massive elements
20298  for (int jphi = 0; jphi < nphi; jphi++) {
20299  double ccc1 = areconoiseHF[i][jeta][jphi];
20300  if (ccc1 != 0.) {
20301  HFpositivedirectionReconoise1->Fill(jphi, ccc1);
20302  ccctest = 1.; //HFpositivedirectionReconoise1->SetBinError(i,0.01);
20303  }
20304  } // for jphi
20305  if (ccctest > 0.) {
20306  // cout<<"444 kcountHFpositivedirectionReconoise1 = "<<kcountHFpositivedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
20307  c3x5->cd(kcountHFpositivedirectionReconoise1);
20308  HFpositivedirectionReconoise1->SetMarkerStyle(20);
20309  HFpositivedirectionReconoise1->SetMarkerSize(0.4);
20310  HFpositivedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
20311  HFpositivedirectionReconoise1->SetXTitle("HFpositivedirectionReconoise1 \b");
20312  HFpositivedirectionReconoise1->SetMarkerColor(2);
20313  HFpositivedirectionReconoise1->SetLineColor(0);
20314  gPad->SetGridy();
20315  gPad->SetGridx();
20316  // gPad->SetLogy();
20317  if (kcountHFpositivedirectionReconoise1 == 1)
20318  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 28; depth = 1 \b");
20319  if (kcountHFpositivedirectionReconoise1 == 2)
20320  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 29; depth = 1 \b");
20321  if (kcountHFpositivedirectionReconoise1 == 3)
20322  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 30; depth = 1 \b");
20323  if (kcountHFpositivedirectionReconoise1 == 4)
20324  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 31; depth = 1 \b");
20325  if (kcountHFpositivedirectionReconoise1 == 5)
20326  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 32; depth = 1 \b");
20327  if (kcountHFpositivedirectionReconoise1 == 6)
20328  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 33; depth = 1 \b");
20329  if (kcountHFpositivedirectionReconoise1 == 7)
20330  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 34; depth = 1 \b");
20331  if (kcountHFpositivedirectionReconoise1 == 8)
20332  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 35; depth = 1 \b");
20333  if (kcountHFpositivedirectionReconoise1 == 9)
20334  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 36; depth = 1 \b");
20335  if (kcountHFpositivedirectionReconoise1 == 10)
20336  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 37; depth = 1 \b");
20337  if (kcountHFpositivedirectionReconoise1 == 11)
20338  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 38; depth = 1 \b");
20339  if (kcountHFpositivedirectionReconoise1 == 12)
20340  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 39; depth = 1 \b");
20341  if (kcountHFpositivedirectionReconoise1 == 13)
20342  HFpositivedirectionReconoise1->SetXTitle("R for HF+ jeta = 40; depth = 1 \b");
20343  HFpositivedirectionReconoise1->Draw("Error");
20344  kcountHFpositivedirectionReconoise1++;
20345  if (kcountHFpositivedirectionReconoise1 > 13)
20346  break; //
20347  } //ccctest>0
20348 
20349  } // for i
20350  } //if(jeta-41 >= 28 && jeta-41 <= 40
20351  } //for jeta
20353  c3x5->Update();
20354  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
20355  c3x5->Clear();
20356  // clean-up
20357  if (h2CeffHFpositivedirectionReconoise1)
20358  delete h2CeffHFpositivedirectionReconoise1;
20359 
20360  //========================================================================================== 5
20361  //======================================================================
20362  //======================================================================1D plot: R vs phi , different eta, depth=2
20363  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
20364  c3x5->Clear();
20366  c3x5->Divide(3, 5);
20367  c3x5->cd(1);
20368  int kcountHFpositivedirectionReconoise2 = 1;
20369  TH1F* h2CeffHFpositivedirectionReconoise2 = new TH1F("h2CeffHFpositivedirectionReconoise2", "", nphi, 0., 72.);
20370  for (int jeta = 0; jeta < njeta; jeta++) {
20371  // positivedirectionReconoise:
20372  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20373  // for (int i=0;i<ndepth;i++) {
20374  // depth=2
20375  for (int i = 1; i < 2; i++) {
20376  TH1F* HFpositivedirectionReconoise2 = (TH1F*)h2CeffHFpositivedirectionReconoise2->Clone("twod1");
20377  float ccctest = 0; // to avoid empty massive elements
20378  for (int jphi = 0; jphi < nphi; jphi++) {
20379  double ccc1 = areconoiseHF[i][jeta][jphi];
20380  if (ccc1 != 0.) {
20381  HFpositivedirectionReconoise2->Fill(jphi, ccc1);
20382  ccctest = 1.; //HFpositivedirectionReconoise2->SetBinError(i,0.01);
20383  }
20384  } // for jphi
20385  if (ccctest > 0.) {
20386  //cout<<"555 kcountHFpositivedirectionReconoise2 = "<<kcountHFpositivedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
20387  c3x5->cd(kcountHFpositivedirectionReconoise2);
20388  HFpositivedirectionReconoise2->SetMarkerStyle(20);
20389  HFpositivedirectionReconoise2->SetMarkerSize(0.4);
20390  HFpositivedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
20391  HFpositivedirectionReconoise2->SetXTitle("HFpositivedirectionReconoise2 \b");
20392  HFpositivedirectionReconoise2->SetMarkerColor(2);
20393  HFpositivedirectionReconoise2->SetLineColor(0);
20394  gPad->SetGridy();
20395  gPad->SetGridx();
20396  // gPad->SetLogy();
20397  if (kcountHFpositivedirectionReconoise2 == 1)
20398  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 28; depth = 2 \b");
20399  if (kcountHFpositivedirectionReconoise2 == 2)
20400  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 29; depth = 2 \b");
20401  if (kcountHFpositivedirectionReconoise2 == 3)
20402  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 30; depth = 2 \b");
20403  if (kcountHFpositivedirectionReconoise2 == 4)
20404  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 31; depth = 2 \b");
20405  if (kcountHFpositivedirectionReconoise2 == 5)
20406  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 32; depth = 2 \b");
20407  if (kcountHFpositivedirectionReconoise2 == 6)
20408  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 33; depth = 2 \b");
20409  if (kcountHFpositivedirectionReconoise2 == 7)
20410  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 34; depth = 2 \b");
20411  if (kcountHFpositivedirectionReconoise2 == 8)
20412  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 35; depth = 2 \b");
20413  if (kcountHFpositivedirectionReconoise2 == 9)
20414  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 36; depth = 2 \b");
20415  if (kcountHFpositivedirectionReconoise2 == 10)
20416  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 37; depth = 2 \b");
20417  if (kcountHFpositivedirectionReconoise2 == 11)
20418  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 38; depth = 2 \b");
20419  if (kcountHFpositivedirectionReconoise2 == 12)
20420  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 39; depth = 2 \b");
20421  if (kcountHFpositivedirectionReconoise2 == 13)
20422  HFpositivedirectionReconoise2->SetXTitle("R for HF+ jeta = 40; depth = 2 \b");
20423  HFpositivedirectionReconoise2->Draw("Error");
20424  kcountHFpositivedirectionReconoise2++;
20425  if (kcountHFpositivedirectionReconoise2 > 13)
20426  break; // 4x6 = 24
20427  } //ccctest>0
20428 
20429  } // for i
20430  } //if(jeta-41 >= 28 && jeta-41 <= 40)
20431  } //for jeta
20433  c3x5->Update();
20434  c3x5->Print("RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
20435  c3x5->Clear();
20436  // clean-up
20437  if (h2CeffHFpositivedirectionReconoise2)
20438  delete h2CeffHFpositivedirectionReconoise2;
20439 
20440  //========================================================================================== 1111114
20441  //======================================================================
20442  //======================================================================1D plot: R vs phi , different eta, depth=1
20443  //cout<<" 1D plot: R vs phi , different eta, depth=1 *****" <<endl;
20444  c3x5->Clear();
20446  c3x5->Divide(3, 5);
20447  c3x5->cd(1);
20448  int kcountHFnegativedirectionReconoise1 = 1;
20449  TH1F* h2CeffHFnegativedirectionReconoise1 = new TH1F("h2CeffHFnegativedirectionReconoise1", "", nphi, 0., 72.);
20450  for (int jeta = 0; jeta < njeta; jeta++) {
20451  // negativedirectionReconoise:
20452  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
20453  // for (int i=0;i<ndepth;i++) {
20454  // depth=1
20455  for (int i = 0; i < 1; i++) {
20456  TH1F* HFnegativedirectionReconoise1 = (TH1F*)h2CeffHFnegativedirectionReconoise1->Clone("twod1");
20457  float ccctest = 0; // to avoid empty massive elements
20458  for (int jphi = 0; jphi < nphi; jphi++) {
20459  double ccc1 = areconoiseHF[i][jeta][jphi];
20460  if (ccc1 != 0.) {
20461  HFnegativedirectionReconoise1->Fill(jphi, ccc1);
20462  ccctest = 1.; //HFnegativedirectionReconoise1->SetBinError(i,0.01);
20463  }
20464  } // for jphi
20465  if (ccctest > 0.) {
20466  // cout<<"444 kcountHFnegativedirectionReconoise1 = "<<kcountHFnegativedirectionReconoise1 <<" jeta-41= "<< jeta-41 <<endl;
20467  c3x5->cd(kcountHFnegativedirectionReconoise1);
20468  HFnegativedirectionReconoise1->SetMarkerStyle(20);
20469  HFnegativedirectionReconoise1->SetMarkerSize(0.4);
20470  HFnegativedirectionReconoise1->GetYaxis()->SetLabelSize(0.04);
20471  HFnegativedirectionReconoise1->SetXTitle("HFnegativedirectionReconoise1 \b");
20472  HFnegativedirectionReconoise1->SetMarkerColor(2);
20473  HFnegativedirectionReconoise1->SetLineColor(0);
20474  gPad->SetGridy();
20475  gPad->SetGridx();
20476  // gPad->SetLogy();
20477  if (kcountHFnegativedirectionReconoise1 == 1)
20478  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-41; depth = 1 \b");
20479  if (kcountHFnegativedirectionReconoise1 == 2)
20480  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-40; depth = 1 \b");
20481  if (kcountHFnegativedirectionReconoise1 == 3)
20482  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-39; depth = 1 \b");
20483  if (kcountHFnegativedirectionReconoise1 == 4)
20484  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-38; depth = 1 \b");
20485  if (kcountHFnegativedirectionReconoise1 == 5)
20486  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-37; depth = 1 \b");
20487  if (kcountHFnegativedirectionReconoise1 == 6)
20488  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-36; depth = 1 \b");
20489  if (kcountHFnegativedirectionReconoise1 == 7)
20490  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-35; depth = 1 \b");
20491  if (kcountHFnegativedirectionReconoise1 == 8)
20492  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-34; depth = 1 \b");
20493  if (kcountHFnegativedirectionReconoise1 == 9)
20494  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-33; depth = 1 \b");
20495  if (kcountHFnegativedirectionReconoise1 == 10)
20496  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-32; depth = 1 \b");
20497  if (kcountHFnegativedirectionReconoise1 == 11)
20498  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-31; depth = 1 \b");
20499  if (kcountHFnegativedirectionReconoise1 == 12)
20500  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-30; depth = 1 \b");
20501  if (kcountHFnegativedirectionReconoise1 == 13)
20502  HFnegativedirectionReconoise1->SetXTitle("R for HF- jeta =-29; depth = 1 \b");
20503  HFnegativedirectionReconoise1->Draw("Error");
20504  kcountHFnegativedirectionReconoise1++;
20505  if (kcountHFnegativedirectionReconoise1 > 13)
20506  break; //
20507  } //ccctest>0
20508 
20509  } // for i
20510  } //if(jeta-41 >= -41 && jeta-41 <= -29)
20511  } //for jeta
20513  c3x5->Update();
20514  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
20515  c3x5->Clear();
20516  // clean-up
20517  if (h2CeffHFnegativedirectionReconoise1)
20518  delete h2CeffHFnegativedirectionReconoise1;
20519 
20520  //========================================================================================== 1111115
20521  //======================================================================
20522  //======================================================================1D plot: R vs phi , different eta, depth=2
20523  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
20524  c3x5->Clear();
20526  c3x5->Divide(3, 5);
20527  c3x5->cd(1);
20528  int kcountHFnegativedirectionReconoise2 = 1;
20529  TH1F* h2CeffHFnegativedirectionReconoise2 = new TH1F("h2CeffHFnegativedirectionReconoise2", "", nphi, 0., 72.);
20530  for (int jeta = 0; jeta < njeta; jeta++) {
20531  // negativedirectionReconoise:
20532  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
20533  // for (int i=0;i<ndepth;i++) {
20534  // depth=2
20535  for (int i = 1; i < 2; i++) {
20536  TH1F* HFnegativedirectionReconoise2 = (TH1F*)h2CeffHFnegativedirectionReconoise2->Clone("twod1");
20537  float ccctest = 0; // to avoid empty massive elements
20538  for (int jphi = 0; jphi < nphi; jphi++) {
20539  double ccc1 = areconoiseHF[i][jeta][jphi];
20540  if (ccc1 != 0.) {
20541  HFnegativedirectionReconoise2->Fill(jphi, ccc1);
20542  ccctest = 1.; //HFnegativedirectionReconoise2->SetBinError(i,0.01);
20543  }
20544  } // for jphi
20545  if (ccctest > 0.) {
20546  //cout<<"555 kcountHFnegativedirectionReconoise2 = "<<kcountHFnegativedirectionReconoise2 <<" jeta-41= "<< jeta-41 <<endl;
20547  c3x5->cd(kcountHFnegativedirectionReconoise2);
20548  HFnegativedirectionReconoise2->SetMarkerStyle(20);
20549  HFnegativedirectionReconoise2->SetMarkerSize(0.4);
20550  HFnegativedirectionReconoise2->GetYaxis()->SetLabelSize(0.04);
20551  HFnegativedirectionReconoise2->SetXTitle("HFnegativedirectionReconoise2 \b");
20552  HFnegativedirectionReconoise2->SetMarkerColor(2);
20553  HFnegativedirectionReconoise2->SetLineColor(0);
20554  gPad->SetGridy();
20555  gPad->SetGridx();
20556  // gPad->SetLogy();
20557  if (kcountHFnegativedirectionReconoise2 == 1)
20558  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-41; depth = 2 \b");
20559  if (kcountHFnegativedirectionReconoise2 == 2)
20560  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-40; depth = 2 \b");
20561  if (kcountHFnegativedirectionReconoise2 == 3)
20562  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-39; depth = 2 \b");
20563  if (kcountHFnegativedirectionReconoise2 == 4)
20564  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-38; depth = 2 \b");
20565  if (kcountHFnegativedirectionReconoise2 == 5)
20566  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-37; depth = 2 \b");
20567  if (kcountHFnegativedirectionReconoise2 == 6)
20568  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-36; depth = 2 \b");
20569  if (kcountHFnegativedirectionReconoise2 == 7)
20570  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-35; depth = 2 \b");
20571  if (kcountHFnegativedirectionReconoise2 == 8)
20572  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-34; depth = 2 \b");
20573  if (kcountHFnegativedirectionReconoise2 == 9)
20574  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-33; depth = 2 \b");
20575  if (kcountHFnegativedirectionReconoise2 == 10)
20576  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-32; depth = 2 \b");
20577  if (kcountHFnegativedirectionReconoise2 == 11)
20578  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-31; depth = 2 \b");
20579  if (kcountHFnegativedirectionReconoise2 == 12)
20580  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-30; depth = 2 \b");
20581  if (kcountHFnegativedirectionReconoise2 == 13)
20582  HFnegativedirectionReconoise2->SetXTitle("R for HF- jeta =-20; depth = 2 \b");
20583  HFnegativedirectionReconoise2->Draw("Error");
20584  kcountHFnegativedirectionReconoise2++;
20585  if (kcountHFnegativedirectionReconoise2 > 13)
20586  break; // 4x6 = 24
20587  } //ccctest>0
20588 
20589  } // for i
20590  } //if(jeta-41 >= -41 && jeta-41 <= -29)
20591  } //for jeta
20593  c3x5->Update();
20594  c3x5->Print("RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
20595  c3x5->Clear();
20596  // clean-up
20597  if (h2CeffHFnegativedirectionReconoise2)
20598  delete h2CeffHFnegativedirectionReconoise2;
20599 
20600  //======================================================================================================================
20601  // DIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIFDIF: Reconoise HF
20602  //------------------------ 2D-eta/phi-plot: DIF, averaged over depthfs
20603  //======================================================================
20604  //======================================================================
20605  // cout<<" DIF2D-eta/phi-plot: DIF, averaged over depthfs *****" <<endl;
20606  c2x1->Clear();
20608  c2x1->Divide(2, 1);
20609  c2x1->cd(1);
20610  TH2F* GefzDIFreconoiseHF42D = new TH2F("GefzDIFreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
20611  TH2F* GefzDIFreconoiseHF42D0 = new TH2F("GefzDIFreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
20612  TH2F* GefzDIFreconoiseHF42DF = (TH2F*)GefzDIFreconoiseHF42D0->Clone("GefzDIFreconoiseHF42DF");
20613  for (int i = 0; i < ndepth; i++) {
20614  for (int jeta = 0; jeta < neta; jeta++) {
20615  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20616  for (int jphi = 0; jphi < nphi; jphi++) {
20617  double ccc1 = breconoiseHF[i][jeta][jphi];
20618  int k2plot = jeta - 41;
20619  int kkk = k2plot; //if(k2plot >0 ) kkk=k2plot+1; //-41 +41 !=0
20620  if (ccc1 != 0.) {
20621  GefzDIFreconoiseHF42D->Fill(kkk, jphi, ccc1);
20622  GefzDIFreconoiseHF42D0->Fill(kkk, jphi, 1.);
20623  }
20624  }
20625  }
20626  }
20627  }
20628  GefzDIFreconoiseHF42DF->Divide(GefzDIFreconoiseHF42D, GefzDIFreconoiseHF42D0, 1, 1, "B"); // average A
20629  gPad->SetGridy();
20630  gPad->SetGridx(); // gPad->SetLogz();
20631  GefzDIFreconoiseHF42DF->SetXTitle("<DIF>_depth #eta \b");
20632  GefzDIFreconoiseHF42DF->SetYTitle(" #phi \b");
20633  GefzDIFreconoiseHF42DF->Draw("COLZ");
20634 
20635  c2x1->cd(2);
20636  // TH1F *energyhitNoiseCut_HF= (TH1F*)dir->FindObjectAny("h_energyhitNoiseCut_HF");
20637  // 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");
20638 
20640  c2x1->Update();
20641  c2x1->Print("DIFreconoiseGeneralD2PhiSymmetryHF.png");
20642  c2x1->Clear();
20643  // clean-up
20644  if (GefzDIFreconoiseHF42D)
20645  delete GefzDIFreconoiseHF42D;
20646  if (GefzDIFreconoiseHF42D0)
20647  delete GefzDIFreconoiseHF42D0;
20648  if (GefzDIFreconoiseHF42DF)
20649  delete GefzDIFreconoiseHF42DF;
20650  //====================================================================== 1D plot: DIF vs phi , averaged over depthfs & eta
20651  //======================================================================
20652  //cout<<" 1D plot: DIF vs phi , averaged over depthfs & eta *****" <<endl;
20653  c1x1->Clear();
20655  c1x1->Divide(1, 1);
20656  c1x1->cd(1);
20657  TH1F* GefzDIFreconoiseHF41D = new TH1F("GefzDIFreconoiseHF41D", "", nphi, 0., 72.);
20658  TH1F* GefzDIFreconoiseHF41D0 = new TH1F("GefzDIFreconoiseHF41D0", "", nphi, 0., 72.);
20659  TH1F* GefzDIFreconoiseHF41DF = (TH1F*)GefzDIFreconoiseHF41D0->Clone("GefzDIFreconoiseHF41DF");
20660  for (int jphi = 0; jphi < nphi; jphi++) {
20661  for (int jeta = 0; jeta < neta; jeta++) {
20662  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
20663  for (int i = 0; i < ndepth; i++) {
20664  double ccc1 = breconoiseHF[i][jeta][jphi];
20665  if (ccc1 != 0.) {
20666  GefzDIFreconoiseHF41D->Fill(jphi, ccc1);
20667  GefzDIFreconoiseHF41D0->Fill(jphi, 1.);
20668  }
20669  }
20670  }
20671  }
20672  }
20673  GefzDIFreconoiseHF41DF->Divide(
20674  GefzDIFreconoiseHF41D, GefzDIFreconoiseHF41D0, 1, 1, "B"); // DIF averaged over depthfs & eta
20675  GefzDIFreconoiseHF41D0->Sumw2();
20676  // for (int jphi=1;jphi<73;jphi++) {GefzDIFreconoiseHF41DF->SetBinError(jphi,0.01);}
20677  gPad->SetGridy();
20678  gPad->SetGridx(); // gPad->SetLogz();
20679  GefzDIFreconoiseHF41DF->SetMarkerStyle(20);
20680  GefzDIFreconoiseHF41DF->SetMarkerSize(1.4);
20681  GefzDIFreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
20682  GefzDIFreconoiseHF41DF->SetXTitle("#phi \b");
20683  GefzDIFreconoiseHF41DF->SetYTitle(" <DIF> \b");
20684  GefzDIFreconoiseHF41DF->SetZTitle("<DIF>_PHI - AllDepthfs \b");
20685  GefzDIFreconoiseHF41DF->SetMarkerColor(4);
20686  GefzDIFreconoiseHF41DF->SetLineColor(
20687  4); // GefzDIFreconoiseHF41DF->SetMinimum(0.8); // GefzDIFreconoiseHF41DF->SetMaximum(1.000);
20688  GefzDIFreconoiseHF41DF->Draw("Error");
20690  c1x1->Update();
20691  c1x1->Print("DIFreconoiseGeneralD1PhiSymmetryHF.png");
20692  c1x1->Clear();
20693  // clean-up
20694  if (GefzDIFreconoiseHF41D)
20695  delete GefzDIFreconoiseHF41D;
20696  if (GefzDIFreconoiseHF41D0)
20697  delete GefzDIFreconoiseHF41D0;
20698  if (GefzDIFreconoiseHF41DF)
20699  delete GefzDIFreconoiseHF41DF;
20700  //========================================================================================== 4
20701  //======================================================================
20702  //======================================================================1D plot: DIF vs phi , different eta, depth=1
20703  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
20704  c3x5->Clear();
20706  c3x5->Divide(3, 5);
20707  c3x5->cd(1);
20708  int kcountHFpositivedirectionReconoiseDIF1 = 1;
20709  TH1F* h2CeffHFpositivedirectionReconoiseDIF1 = new TH1F("h2CeffHFpositivedirectionReconoiseDIF1", "", nphi, 0., 72.);
20710  for (int jeta = 0; jeta < njeta; jeta++) {
20711  // positivedirectionReconoiseDIF:
20712  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20713  // for (int i=0;i<ndepth;i++) {
20714  // depth=1
20715  for (int i = 0; i < 1; i++) {
20716  TH1F* HFpositivedirectionReconoiseDIF1 = (TH1F*)h2CeffHFpositivedirectionReconoiseDIF1->Clone("twod1");
20717  float ccctest = 0; // to avoid empty massive elements
20718  for (int jphi = 0; jphi < nphi; jphi++) {
20719  double ccc1 = breconoiseHF[i][jeta][jphi];
20720  if (ccc1 != 0.) {
20721  HFpositivedirectionReconoiseDIF1->Fill(jphi, ccc1);
20722  ccctest = 1.; //HFpositivedirectionReconoiseDIF1->SetBinError(i,0.01);
20723  }
20724  } // for jphi
20725  if (ccctest > 0.) {
20726  // cout<<"444 kcountHFpositivedirectionReconoiseDIF1 = "<<kcountHFpositivedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
20727  c3x5->cd(kcountHFpositivedirectionReconoiseDIF1);
20728  HFpositivedirectionReconoiseDIF1->SetMarkerStyle(20);
20729  HFpositivedirectionReconoiseDIF1->SetMarkerSize(0.4);
20730  HFpositivedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
20731  HFpositivedirectionReconoiseDIF1->SetXTitle("HFpositivedirectionReconoiseDIF1 \b");
20732  HFpositivedirectionReconoiseDIF1->SetMarkerColor(2);
20733  HFpositivedirectionReconoiseDIF1->SetLineColor(0);
20734  gPad->SetGridy();
20735  gPad->SetGridx();
20736  // gPad->SetLogy();
20737  if (kcountHFpositivedirectionReconoiseDIF1 == 1)
20738  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 28; depth = 1 \b");
20739  if (kcountHFpositivedirectionReconoiseDIF1 == 2)
20740  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 29; depth = 1 \b");
20741  if (kcountHFpositivedirectionReconoiseDIF1 == 3)
20742  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 30; depth = 1 \b");
20743  if (kcountHFpositivedirectionReconoiseDIF1 == 4)
20744  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 31; depth = 1 \b");
20745  if (kcountHFpositivedirectionReconoiseDIF1 == 5)
20746  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 32; depth = 1 \b");
20747  if (kcountHFpositivedirectionReconoiseDIF1 == 6)
20748  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 33; depth = 1 \b");
20749  if (kcountHFpositivedirectionReconoiseDIF1 == 7)
20750  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 34; depth = 1 \b");
20751  if (kcountHFpositivedirectionReconoiseDIF1 == 8)
20752  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 35; depth = 1 \b");
20753  if (kcountHFpositivedirectionReconoiseDIF1 == 9)
20754  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 36; depth = 1 \b");
20755  if (kcountHFpositivedirectionReconoiseDIF1 == 10)
20756  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 37; depth = 1 \b");
20757  if (kcountHFpositivedirectionReconoiseDIF1 == 11)
20758  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 38; depth = 1 \b");
20759  if (kcountHFpositivedirectionReconoiseDIF1 == 12)
20760  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 39; depth = 1 \b");
20761  if (kcountHFpositivedirectionReconoiseDIF1 == 13)
20762  HFpositivedirectionReconoiseDIF1->SetXTitle("DIF for HF+ jeta = 40; depth = 1 \b");
20763  HFpositivedirectionReconoiseDIF1->Draw("Error");
20764  kcountHFpositivedirectionReconoiseDIF1++;
20765  if (kcountHFpositivedirectionReconoiseDIF1 > 13)
20766  break; //
20767  } //ccctest>0
20768 
20769  } // for i
20770  } //if(jeta-41 >= 28 && jeta-41 <= 40
20771  } //for jeta
20773  c3x5->Update();
20774  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
20775  c3x5->Clear();
20776  // clean-up
20777  if (h2CeffHFpositivedirectionReconoiseDIF1)
20778  delete h2CeffHFpositivedirectionReconoiseDIF1;
20779 
20780  //========================================================================================== 5
20781  //======================================================================
20782  //======================================================================1D plot: R vs phi , different eta, depth=2
20783  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
20784  c3x5->Clear();
20786  c3x5->Divide(3, 5);
20787  c3x5->cd(1);
20788  int kcountHFpositivedirectionReconoiseDIF2 = 1;
20789  TH1F* h2CeffHFpositivedirectionReconoiseDIF2 = new TH1F("h2CeffHFpositivedirectionReconoiseDIF2", "", nphi, 0., 72.);
20790  for (int jeta = 0; jeta < njeta; jeta++) {
20791  // positivedirectionReconoiseDIF:
20792  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
20793  // for (int i=0;i<ndepth;i++) {
20794  // depth=2
20795  for (int i = 1; i < 2; i++) {
20796  TH1F* HFpositivedirectionReconoiseDIF2 = (TH1F*)h2CeffHFpositivedirectionReconoiseDIF2->Clone("twod1");
20797  float ccctest = 0; // to avoid empty massive elements
20798  for (int jphi = 0; jphi < nphi; jphi++) {
20799  double ccc1 = breconoiseHF[i][jeta][jphi];
20800  if (ccc1 != 0.) {
20801  HFpositivedirectionReconoiseDIF2->Fill(jphi, ccc1);
20802  ccctest = 1.; //HFpositivedirectionReconoiseDIF2->SetBinError(i,0.01);
20803  }
20804  } // for jphi
20805  if (ccctest > 0.) {
20806  //cout<<"555 kcountHFpositivedirectionReconoiseDIF2 = "<<kcountHFpositivedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
20807  c3x5->cd(kcountHFpositivedirectionReconoiseDIF2);
20808  HFpositivedirectionReconoiseDIF2->SetMarkerStyle(20);
20809  HFpositivedirectionReconoiseDIF2->SetMarkerSize(0.4);
20810  HFpositivedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
20811  HFpositivedirectionReconoiseDIF2->SetXTitle("HFpositivedirectionReconoiseDIF2 \b");
20812  HFpositivedirectionReconoiseDIF2->SetMarkerColor(2);
20813  HFpositivedirectionReconoiseDIF2->SetLineColor(0);
20814  gPad->SetGridy();
20815  gPad->SetGridx();
20816  // gPad->SetLogy();
20817  if (kcountHFpositivedirectionReconoiseDIF2 == 1)
20818  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 28; depth = 2 \b");
20819  if (kcountHFpositivedirectionReconoiseDIF2 == 2)
20820  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 29; depth = 2 \b");
20821  if (kcountHFpositivedirectionReconoiseDIF2 == 3)
20822  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 30; depth = 2 \b");
20823  if (kcountHFpositivedirectionReconoiseDIF2 == 4)
20824  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 31; depth = 2 \b");
20825  if (kcountHFpositivedirectionReconoiseDIF2 == 5)
20826  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 32; depth = 2 \b");
20827  if (kcountHFpositivedirectionReconoiseDIF2 == 6)
20828  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 33; depth = 2 \b");
20829  if (kcountHFpositivedirectionReconoiseDIF2 == 7)
20830  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 34; depth = 2 \b");
20831  if (kcountHFpositivedirectionReconoiseDIF2 == 8)
20832  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 35; depth = 2 \b");
20833  if (kcountHFpositivedirectionReconoiseDIF2 == 9)
20834  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 36; depth = 2 \b");
20835  if (kcountHFpositivedirectionReconoiseDIF2 == 10)
20836  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 37; depth = 2 \b");
20837  if (kcountHFpositivedirectionReconoiseDIF2 == 11)
20838  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 38; depth = 2 \b");
20839  if (kcountHFpositivedirectionReconoiseDIF2 == 12)
20840  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 39; depth = 2 \b");
20841  if (kcountHFpositivedirectionReconoiseDIF2 == 13)
20842  HFpositivedirectionReconoiseDIF2->SetXTitle("DIF for HF+ jeta = 40; depth = 2 \b");
20843  HFpositivedirectionReconoiseDIF2->Draw("Error");
20844  kcountHFpositivedirectionReconoiseDIF2++;
20845  if (kcountHFpositivedirectionReconoiseDIF2 > 13)
20846  break; // 4x6 = 24
20847  } //ccctest>0
20848 
20849  } // for i
20850  } //if(jeta-41 >= 28 && jeta-41 <= 40)
20851  } //for jeta
20853  c3x5->Update();
20854  c3x5->Print("DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
20855  c3x5->Clear();
20856  // clean-up
20857  if (h2CeffHFpositivedirectionReconoiseDIF2)
20858  delete h2CeffHFpositivedirectionReconoiseDIF2;
20859 
20860  //========================================================================================== 1111114
20861  //======================================================================
20862  //======================================================================1D plot: DIF vs phi , different eta, depth=1
20863  //cout<<" 1D plot: DIF vs phi , different eta, depth=1 *****" <<endl;
20864  c3x5->Clear();
20866  c3x5->Divide(3, 5);
20867  c3x5->cd(1);
20868  int kcountHFnegativedirectionReconoiseDIF1 = 1;
20869  TH1F* h2CeffHFnegativedirectionReconoiseDIF1 = new TH1F("h2CeffHFnegativedirectionReconoiseDIF1", "", nphi, 0., 72.);
20870  for (int jeta = 0; jeta < njeta; jeta++) {
20871  // negativedirectionReconoiseDIF:
20872  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
20873  // for (int i=0;i<ndepth;i++) {
20874  // depth=1
20875  for (int i = 0; i < 1; i++) {
20876  TH1F* HFnegativedirectionReconoiseDIF1 = (TH1F*)h2CeffHFnegativedirectionReconoiseDIF1->Clone("twod1");
20877  float ccctest = 0; // to avoid empty massive elements
20878  for (int jphi = 0; jphi < nphi; jphi++) {
20879  double ccc1 = breconoiseHF[i][jeta][jphi];
20880  if (ccc1 != 0.) {
20881  HFnegativedirectionReconoiseDIF1->Fill(jphi, ccc1);
20882  ccctest = 1.; //HFnegativedirectionReconoiseDIF1->SetBinError(i,0.01);
20883  }
20884  } // for jphi
20885  if (ccctest > 0.) {
20886  // cout<<"444 kcountHFnegativedirectionReconoiseDIF1 = "<<kcountHFnegativedirectionReconoiseDIF1 <<" jeta-41= "<< jeta-41 <<endl;
20887  c3x5->cd(kcountHFnegativedirectionReconoiseDIF1);
20888  HFnegativedirectionReconoiseDIF1->SetMarkerStyle(20);
20889  HFnegativedirectionReconoiseDIF1->SetMarkerSize(0.4);
20890  HFnegativedirectionReconoiseDIF1->GetYaxis()->SetLabelSize(0.04);
20891  HFnegativedirectionReconoiseDIF1->SetXTitle("HFnegativedirectionReconoiseDIF1 \b");
20892  HFnegativedirectionReconoiseDIF1->SetMarkerColor(2);
20893  HFnegativedirectionReconoiseDIF1->SetLineColor(0);
20894  gPad->SetGridy();
20895  gPad->SetGridx();
20896  // gPad->SetLogy();
20897  if (kcountHFnegativedirectionReconoiseDIF1 == 1)
20898  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-41; depth = 1 \b");
20899  if (kcountHFnegativedirectionReconoiseDIF1 == 2)
20900  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-40; depth = 1 \b");
20901  if (kcountHFnegativedirectionReconoiseDIF1 == 3)
20902  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-39; depth = 1 \b");
20903  if (kcountHFnegativedirectionReconoiseDIF1 == 4)
20904  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-38; depth = 1 \b");
20905  if (kcountHFnegativedirectionReconoiseDIF1 == 5)
20906  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-37; depth = 1 \b");
20907  if (kcountHFnegativedirectionReconoiseDIF1 == 6)
20908  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-36; depth = 1 \b");
20909  if (kcountHFnegativedirectionReconoiseDIF1 == 7)
20910  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-35; depth = 1 \b");
20911  if (kcountHFnegativedirectionReconoiseDIF1 == 8)
20912  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-34; depth = 1 \b");
20913  if (kcountHFnegativedirectionReconoiseDIF1 == 9)
20914  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-33; depth = 1 \b");
20915  if (kcountHFnegativedirectionReconoiseDIF1 == 10)
20916  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-32; depth = 1 \b");
20917  if (kcountHFnegativedirectionReconoiseDIF1 == 11)
20918  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-31; depth = 1 \b");
20919  if (kcountHFnegativedirectionReconoiseDIF1 == 12)
20920  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-30; depth = 1 \b");
20921  if (kcountHFnegativedirectionReconoiseDIF1 == 13)
20922  HFnegativedirectionReconoiseDIF1->SetXTitle("DIF for HF- jeta =-29; depth = 1 \b");
20923  HFnegativedirectionReconoiseDIF1->Draw("Error");
20924  kcountHFnegativedirectionReconoiseDIF1++;
20925  if (kcountHFnegativedirectionReconoiseDIF1 > 13)
20926  break; //
20927  } //ccctest>0
20928 
20929  } // for i
20930  } //if(jeta-41 >= -41 && jeta-41 <= -29)
20931  } //for jeta
20933  c3x5->Update();
20934  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
20935  c3x5->Clear();
20936  // clean-up
20937  if (h2CeffHFnegativedirectionReconoiseDIF1)
20938  delete h2CeffHFnegativedirectionReconoiseDIF1;
20939 
20940  //========================================================================================== 1111115
20941  //======================================================================
20942  //======================================================================1D plot: R vs phi , different eta, depth=2
20943  // cout<<" 1D plot: R vs phi , different eta, depth=2 *****" <<endl;
20944  c3x5->Clear();
20946  c3x5->Divide(3, 5);
20947  c3x5->cd(1);
20948  int kcountHFnegativedirectionReconoiseDIF2 = 1;
20949  TH1F* h2CeffHFnegativedirectionReconoiseDIF2 = new TH1F("h2CeffHFnegativedirectionReconoiseDIF2", "", nphi, 0., 72.);
20950  for (int jeta = 0; jeta < njeta; jeta++) {
20951  // negativedirectionReconoiseDIF:
20952  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
20953  // for (int i=0;i<ndepth;i++) {
20954  // depth=2
20955  for (int i = 1; i < 2; i++) {
20956  TH1F* HFnegativedirectionReconoiseDIF2 = (TH1F*)h2CeffHFnegativedirectionReconoiseDIF2->Clone("twod1");
20957  float ccctest = 0; // to avoid empty massive elements
20958  for (int jphi = 0; jphi < nphi; jphi++) {
20959  double ccc1 = breconoiseHF[i][jeta][jphi];
20960  if (ccc1 != 0.) {
20961  HFnegativedirectionReconoiseDIF2->Fill(jphi, ccc1);
20962  ccctest = 1.; //HFnegativedirectionReconoiseDIF2->SetBinError(i,0.01);
20963  }
20964  } // for jphi
20965  if (ccctest > 0.) {
20966  //cout<<"555 kcountHFnegativedirectionReconoiseDIF2 = "<<kcountHFnegativedirectionReconoiseDIF2 <<" jeta-41= "<< jeta-41 <<endl;
20967  c3x5->cd(kcountHFnegativedirectionReconoiseDIF2);
20968  HFnegativedirectionReconoiseDIF2->SetMarkerStyle(20);
20969  HFnegativedirectionReconoiseDIF2->SetMarkerSize(0.4);
20970  HFnegativedirectionReconoiseDIF2->GetYaxis()->SetLabelSize(0.04);
20971  HFnegativedirectionReconoiseDIF2->SetXTitle("HFnegativedirectionReconoiseDIF2 \b");
20972  HFnegativedirectionReconoiseDIF2->SetMarkerColor(2);
20973  HFnegativedirectionReconoiseDIF2->SetLineColor(0);
20974  gPad->SetGridy();
20975  gPad->SetGridx();
20976  // gPad->SetLogy();
20977  if (kcountHFnegativedirectionReconoiseDIF2 == 1)
20978  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-41; depth = 2 \b");
20979  if (kcountHFnegativedirectionReconoiseDIF2 == 2)
20980  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-40; depth = 2 \b");
20981  if (kcountHFnegativedirectionReconoiseDIF2 == 3)
20982  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-39; depth = 2 \b");
20983  if (kcountHFnegativedirectionReconoiseDIF2 == 4)
20984  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-38; depth = 2 \b");
20985  if (kcountHFnegativedirectionReconoiseDIF2 == 5)
20986  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-37; depth = 2 \b");
20987  if (kcountHFnegativedirectionReconoiseDIF2 == 6)
20988  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-36; depth = 2 \b");
20989  if (kcountHFnegativedirectionReconoiseDIF2 == 7)
20990  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-35; depth = 2 \b");
20991  if (kcountHFnegativedirectionReconoiseDIF2 == 8)
20992  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-34; depth = 2 \b");
20993  if (kcountHFnegativedirectionReconoiseDIF2 == 9)
20994  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-33; depth = 2 \b");
20995  if (kcountHFnegativedirectionReconoiseDIF2 == 10)
20996  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-32; depth = 2 \b");
20997  if (kcountHFnegativedirectionReconoiseDIF2 == 11)
20998  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-31; depth = 2 \b");
20999  if (kcountHFnegativedirectionReconoiseDIF2 == 12)
21000  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-30; depth = 2 \b");
21001  if (kcountHFnegativedirectionReconoiseDIF2 == 13)
21002  HFnegativedirectionReconoiseDIF2->SetXTitle("DIF for HF- jeta =-20; depth = 2 \b");
21003  HFnegativedirectionReconoiseDIF2->Draw("Error");
21004  kcountHFnegativedirectionReconoiseDIF2++;
21005  if (kcountHFnegativedirectionReconoiseDIF2 > 13)
21006  break; // 4x6 = 24
21007  } //ccctest>0
21008 
21009  } // for i
21010  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21011  } //for jeta
21013  c3x5->Update();
21014  c3x5->Print("DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
21015  c3x5->Clear();
21016  // clean-up
21017  if (h2CeffHFnegativedirectionReconoiseDIF2)
21018  delete h2CeffHFnegativedirectionReconoiseDIF2;
21019 
21020  //======================================================================================================================
21021  //======================================================================================================================
21022  //======================================================================================================================
21023  //======================================================================================================================
21024  //======================================================================================================================
21025  //======================================================================================================================
21026  //======================================================================================================================
21027  // DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD:
21028 
21029  //cout<<" Start Vaiance: preparation *****" <<endl;
21030  TH2F* reconoiseVariance1HF1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HF1");
21031  TH2F* reconoiseVariance0HF1 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HF1");
21032  TH2F* reconoiseVarianceHF1 = (TH2F*)reconoiseVariance1HF1->Clone("reconoiseVarianceHF1");
21033  reconoiseVarianceHF1->Divide(reconoiseVariance1HF1, reconoiseVariance0HF1, 1, 1, "B");
21034  TH2F* reconoiseVariance1HF2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy2_HF2");
21035  TH2F* reconoiseVariance0HF2 = (TH2F*)dir->FindObjectAny("h_recNoiseEnergy0_HF2");
21036  TH2F* reconoiseVarianceHF2 = (TH2F*)reconoiseVariance1HF2->Clone("reconoiseVarianceHF2");
21037  reconoiseVarianceHF2->Divide(reconoiseVariance1HF2, reconoiseVariance0HF2, 1, 1, "B");
21038  //cout<<" Vaiance: preparation DONE *****" <<endl;
21039  //====================================================================== put Vaiance=Dispersia = Sig**2=<R**2> - (<R>)**2 into massive reconoisevarianceHF
21040  // = sum(R*R)/N - (sum(R)/N)**2
21041  for (int jeta = 0; jeta < njeta; jeta++) {
21042  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
21043  //preparation for PHI normalization:
21044  double sumreconoiseHF0 = 0;
21045  int nsumreconoiseHF0 = 0;
21046  double sumreconoiseHF1 = 0;
21047  int nsumreconoiseHF1 = 0;
21048  for (int jphi = 0; jphi < njphi; jphi++) {
21049  reconoisevarianceHF[0][jeta][jphi] = reconoiseVarianceHF1->GetBinContent(jeta + 1, jphi + 1);
21050  reconoisevarianceHF[1][jeta][jphi] = reconoiseVarianceHF2->GetBinContent(jeta + 1, jphi + 1);
21051  sumreconoiseHF0 += reconoisevarianceHF[0][jeta][jphi];
21052  ++nsumreconoiseHF0;
21053  sumreconoiseHF1 += reconoisevarianceHF[1][jeta][jphi];
21054  ++nsumreconoiseHF1;
21055  } // phi
21056  // PHI normalization :
21057  for (int jphi = 0; jphi < njphi; jphi++) {
21058  if (reconoisevarianceHF[0][jeta][jphi] != 0.)
21059  reconoisevarianceHF[0][jeta][jphi] /= (sumreconoiseHF0 / nsumreconoiseHF0);
21060  if (reconoisevarianceHF[1][jeta][jphi] != 0.)
21061  reconoisevarianceHF[1][jeta][jphi] /= (sumreconoiseHF1 / nsumreconoiseHF1);
21062  } // phi
21063  // reconoisevarianceHF (D) = sum(R*R)/N - (sum(R)/N)**2
21064  for (int jphi = 0; jphi < njphi; jphi++) {
21065  // cout<<"12 12 12 jeta= "<< jeta <<" jphi = "<<jphi <<endl;
21066  reconoisevarianceHF[0][jeta][jphi] -= areconoiseHF[0][jeta][jphi] * areconoiseHF[0][jeta][jphi];
21067  reconoisevarianceHF[0][jeta][jphi] = fabs(reconoisevarianceHF[0][jeta][jphi]);
21068  reconoisevarianceHF[1][jeta][jphi] -= areconoiseHF[1][jeta][jphi] * areconoiseHF[1][jeta][jphi];
21069  reconoisevarianceHF[1][jeta][jphi] = fabs(reconoisevarianceHF[1][jeta][jphi]);
21070  }
21071  }
21072  }
21073  //cout<<" Vaiance: DONE*****" <<endl;
21074  //------------------------ 2D-eta/phi-plot: D, averaged over depthfs
21075  //======================================================================
21076  //======================================================================
21077  //cout<<" R2D-eta/phi-plot: D, averaged over depthfs *****" <<endl;
21078  c1x1->Clear();
21080  c1x0->Divide(1, 1);
21081  c1x0->cd(1);
21082  TH2F* DefzDreconoiseHF42D = new TH2F("DefzDreconoiseHF42D", "", neta, -41., 41., nphi, 0., 72.);
21083  TH2F* DefzDreconoiseHF42D0 = new TH2F("DefzDreconoiseHF42D0", "", neta, -41., 41., nphi, 0., 72.);
21084  TH2F* DefzDreconoiseHF42DF = (TH2F*)DefzDreconoiseHF42D0->Clone("DefzDreconoiseHF42DF");
21085  for (int i = 0; i < ndepth; i++) {
21086  for (int jeta = 0; jeta < neta; jeta++) {
21087  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
21088  for (int jphi = 0; jphi < nphi; jphi++) {
21089  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21090  int k2plot = jeta - 41;
21091  int kkk = k2plot; //if(k2plot >0 kkk=k2plot+1; //-41 +41 !=0
21092  if (areconoiseHF[i][jeta][jphi] > 0.) {
21093  DefzDreconoiseHF42D->Fill(kkk, jphi, ccc1);
21094  DefzDreconoiseHF42D0->Fill(kkk, jphi, 1.);
21095  }
21096  }
21097  }
21098  }
21099  }
21100  DefzDreconoiseHF42DF->Divide(DefzDreconoiseHF42D, DefzDreconoiseHF42D0, 1, 1, "B"); // average A
21101  // DefzDreconoiseHF1->Sumw2();
21102  gPad->SetGridy();
21103  gPad->SetGridx(); // gPad->SetLogz();
21104  DefzDreconoiseHF42DF->SetMarkerStyle(20);
21105  DefzDreconoiseHF42DF->SetMarkerSize(0.4);
21106  DefzDreconoiseHF42DF->GetZaxis()->SetLabelSize(0.08);
21107  DefzDreconoiseHF42DF->SetXTitle("<D>_depth #eta \b");
21108  DefzDreconoiseHF42DF->SetYTitle(" #phi \b");
21109  DefzDreconoiseHF42DF->SetZTitle("<D>_depth \b");
21110  DefzDreconoiseHF42DF->SetMarkerColor(2);
21111  DefzDreconoiseHF42DF->SetLineColor(
21112  0); // DefzDreconoiseHF42DF->SetMaximum(1.000); // DefzDreconoiseHF42DF->SetMinimum(1.0);
21113  DefzDreconoiseHF42DF->Draw("COLZ");
21115  c1x0->Update();
21116  c1x0->Print("DreconoiseGeneralD2PhiSymmetryHF.png");
21117  c1x0->Clear();
21118  // clean-up
21119  if (DefzDreconoiseHF42D)
21120  delete DefzDreconoiseHF42D;
21121  if (DefzDreconoiseHF42D0)
21122  delete DefzDreconoiseHF42D0;
21123  if (DefzDreconoiseHF42DF)
21124  delete DefzDreconoiseHF42DF;
21125  //====================================================================== 1D plot: D vs phi , averaged over depthfs & eta
21126  //======================================================================
21127  //cout<<" 1D plot: D vs phi , averaged over depthfs & eta *****" <<endl;
21128  c1x1->Clear();
21130  c1x1->Divide(1, 1);
21131  c1x1->cd(1);
21132  TH1F* DefzDreconoiseHF41D = new TH1F("DefzDreconoiseHF41D", "", nphi, 0., 72.);
21133  TH1F* DefzDreconoiseHF41D0 = new TH1F("DefzDreconoiseHF41D0", "", nphi, 0., 72.);
21134  TH1F* DefzDreconoiseHF41DF = (TH1F*)DefzDreconoiseHF41D0->Clone("DefzDreconoiseHF41DF");
21135 
21136  for (int jphi = 0; jphi < nphi; jphi++) {
21137  for (int jeta = 0; jeta < neta; jeta++) {
21138  if ((jeta - 41 >= -41 && jeta - 41 <= -29) || (jeta - 41 >= 28 && jeta - 41 <= 40)) {
21139  for (int i = 0; i < ndepth; i++) {
21140  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21141  if (areconoiseHF[i][jeta][jphi] > 0.) {
21142  DefzDreconoiseHF41D->Fill(jphi, ccc1);
21143  DefzDreconoiseHF41D0->Fill(jphi, 1.);
21144  }
21145  }
21146  }
21147  }
21148  }
21149  // DefzDreconoiseHF41D->Sumw2();DefzDreconoiseHF41D0->Sumw2();
21150 
21151  DefzDreconoiseHF41DF->Divide(DefzDreconoiseHF41D, DefzDreconoiseHF41D0, 1, 1, "B"); // R averaged over depthfs & eta
21152  DefzDreconoiseHF41D0->Sumw2();
21153  // for (int jphi=1;jphi<73;jphi++) {DefzDreconoiseHF41DF->SetBinError(jphi,0.01);}
21154  gPad->SetGridy();
21155  gPad->SetGridx(); // gPad->SetLogz();
21156  DefzDreconoiseHF41DF->SetMarkerStyle(20);
21157  DefzDreconoiseHF41DF->SetMarkerSize(1.4);
21158  DefzDreconoiseHF41DF->GetZaxis()->SetLabelSize(0.08);
21159  DefzDreconoiseHF41DF->SetXTitle("#phi \b");
21160  DefzDreconoiseHF41DF->SetYTitle(" <D> \b");
21161  DefzDreconoiseHF41DF->SetZTitle("<D>_PHI - AllDepthfs \b");
21162  DefzDreconoiseHF41DF->SetMarkerColor(4);
21163  DefzDreconoiseHF41DF->SetLineColor(
21164  4); // DefzDreconoiseHF41DF->SetMinimum(0.8); DefzDreconoiseHF41DF->SetMinimum(-0.015);
21165  DefzDreconoiseHF41DF->Draw("Error");
21167  c1x1->Update();
21168  c1x1->Print("DreconoiseGeneralD1PhiSymmetryHF.png");
21169  c1x1->Clear();
21170  // clean-up
21171  if (DefzDreconoiseHF41D)
21172  delete DefzDreconoiseHF41D;
21173  if (DefzDreconoiseHF41D0)
21174  delete DefzDreconoiseHF41D0;
21175  if (DefzDreconoiseHF41DF)
21176  delete DefzDreconoiseHF41DF;
21177  //========================================================================================== 14
21178  //======================================================================
21179  //======================================================================1D plot: D vs phi , different eta, depth=1
21180  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
21181  c3x5->Clear();
21183  c3x5->Divide(3, 5);
21184  c3x5->cd(1);
21185  int kcountHFpositivedirectionReconoiseD1 = 1;
21186  TH1F* h2CeffHFpositivedirectionReconoiseD1 = new TH1F("h2CeffHFpositivedirectionReconoiseD1", "", nphi, 0., 72.);
21187 
21188  for (int jeta = 0; jeta < njeta; jeta++) {
21189  // positivedirectionReconoiseD:
21190  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
21191  // for (int i=0;i<ndepth;i++) {
21192  // depth=1
21193  for (int i = 0; i < 1; i++) {
21194  TH1F* HFpositivedirectionReconoiseD1 = (TH1F*)h2CeffHFpositivedirectionReconoiseD1->Clone("twod1");
21195 
21196  float ccctest = 0; // to avoid empty massive elements
21197  for (int jphi = 0; jphi < nphi; jphi++) {
21198  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21199  if (areconoiseHF[i][jeta][jphi] > 0.) {
21200  HFpositivedirectionReconoiseD1->Fill(jphi, ccc1);
21201  ccctest = 1.; //HFpositivedirectionReconoiseD1->SetBinError(i,0.01);
21202  }
21203  } // for jphi
21204  if (ccctest > 0.) {
21205  //cout<<"1414 kcountHFpositivedirectionReconoiseD1 = "<<kcountHFpositivedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
21206  c3x5->cd(kcountHFpositivedirectionReconoiseD1);
21207  HFpositivedirectionReconoiseD1->SetMarkerStyle(20);
21208  HFpositivedirectionReconoiseD1->SetMarkerSize(0.4);
21209  HFpositivedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
21210  HFpositivedirectionReconoiseD1->SetXTitle("HFpositivedirectionReconoiseD1 \b");
21211  HFpositivedirectionReconoiseD1->SetMarkerColor(2);
21212  HFpositivedirectionReconoiseD1->SetLineColor(0);
21213  gPad->SetGridy();
21214  gPad->SetGridx();
21215  // gPad->SetLogy();
21216  if (kcountHFpositivedirectionReconoiseD1 == 1)
21217  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 28; depth = 1 \b");
21218  if (kcountHFpositivedirectionReconoiseD1 == 2)
21219  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 29; depth = 1 \b");
21220  if (kcountHFpositivedirectionReconoiseD1 == 3)
21221  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 30; depth = 1 \b");
21222  if (kcountHFpositivedirectionReconoiseD1 == 4)
21223  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 31; depth = 1 \b");
21224  if (kcountHFpositivedirectionReconoiseD1 == 5)
21225  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 32; depth = 1 \b");
21226  if (kcountHFpositivedirectionReconoiseD1 == 6)
21227  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 33; depth = 1 \b");
21228  if (kcountHFpositivedirectionReconoiseD1 == 7)
21229  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 34; depth = 1 \b");
21230  if (kcountHFpositivedirectionReconoiseD1 == 8)
21231  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 35; depth = 1 \b");
21232  if (kcountHFpositivedirectionReconoiseD1 == 9)
21233  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 36; depth = 1 \b");
21234  if (kcountHFpositivedirectionReconoiseD1 == 10)
21235  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 37; depth = 1 \b");
21236  if (kcountHFpositivedirectionReconoiseD1 == 11)
21237  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 38; depth = 1 \b");
21238  if (kcountHFpositivedirectionReconoiseD1 == 12)
21239  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 39; depth = 1 \b");
21240  if (kcountHFpositivedirectionReconoiseD1 == 13)
21241  HFpositivedirectionReconoiseD1->SetXTitle("D for HF+ jeta = 40; depth = 1 \b");
21242  HFpositivedirectionReconoiseD1->Draw("Error");
21243  kcountHFpositivedirectionReconoiseD1++;
21244  if (kcountHFpositivedirectionReconoiseD1 > 13)
21245  break; // 4x6 = 24
21246  } //ccctest>0
21247 
21248  } // for i
21249  } //if(jeta-41 >= 28 && jeta-41 <= 40)
21250  } //for jeta
21252  c3x5->Update();
21253  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png");
21254  c3x5->Clear();
21255  // clean-up
21256  if (h2CeffHFpositivedirectionReconoiseD1)
21257  delete h2CeffHFpositivedirectionReconoiseD1;
21258  //========================================================================================== 15
21259  //======================================================================
21260  //======================================================================1D plot: D vs phi , different eta, depth=2
21261  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
21262  c3x5->Clear();
21263  c3x5->Divide(3, 5);
21264  c3x5->cd(1);
21265  int kcountHFpositivedirectionReconoiseD2 = 1;
21266  TH1F* h2CeffHFpositivedirectionReconoiseD2 = new TH1F("h2CeffHFpositivedirectionReconoiseD2", "", nphi, 0., 72.);
21267 
21268  for (int jeta = 0; jeta < njeta; jeta++) {
21269  // positivedirectionReconoiseD:
21270  if (jeta - 41 >= 28 && jeta - 41 <= 40) {
21271  // for (int i=0;i<ndepth;i++) {
21272  // depth=2
21273  for (int i = 1; i < 2; i++) {
21274  TH1F* HFpositivedirectionReconoiseD2 = (TH1F*)h2CeffHFpositivedirectionReconoiseD2->Clone("twod1");
21275 
21276  float ccctest = 0; // to avoid empty massive elements
21277  for (int jphi = 0; jphi < nphi; jphi++) {
21278  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21279  if (areconoiseHF[i][jeta][jphi] > 0.) {
21280  HFpositivedirectionReconoiseD2->Fill(jphi, ccc1);
21281  ccctest = 1.; //HFpositivedirectionReconoiseD2->SetBinError(i,0.01);
21282  }
21283  } // for jphi
21284  if (ccctest > 0.) {
21285  //cout<<"1515 kcountHFpositivedirectionReconoiseD2 = "<<kcountHFpositivedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
21286  c3x5->cd(kcountHFpositivedirectionReconoiseD2);
21287  HFpositivedirectionReconoiseD2->SetMarkerStyle(20);
21288  HFpositivedirectionReconoiseD2->SetMarkerSize(0.4);
21289  HFpositivedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
21290  HFpositivedirectionReconoiseD2->SetXTitle("HFpositivedirectionReconoiseD2 \b");
21291  HFpositivedirectionReconoiseD2->SetMarkerColor(2);
21292  HFpositivedirectionReconoiseD2->SetLineColor(0);
21293  gPad->SetGridy();
21294  gPad->SetGridx();
21295  // gPad->SetLogy();
21296  if (kcountHFpositivedirectionReconoiseD2 == 1)
21297  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 28; depth = 2 \b");
21298  if (kcountHFpositivedirectionReconoiseD2 == 2)
21299  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 29; depth = 2 \b");
21300  if (kcountHFpositivedirectionReconoiseD2 == 3)
21301  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 30; depth = 2 \b");
21302  if (kcountHFpositivedirectionReconoiseD2 == 4)
21303  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 31; depth = 2 \b");
21304  if (kcountHFpositivedirectionReconoiseD2 == 5)
21305  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 32; depth = 2 \b");
21306  if (kcountHFpositivedirectionReconoiseD2 == 6)
21307  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 33; depth = 2 \b");
21308  if (kcountHFpositivedirectionReconoiseD2 == 7)
21309  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 34; depth = 2 \b");
21310  if (kcountHFpositivedirectionReconoiseD2 == 8)
21311  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 35; depth = 2 \b");
21312  if (kcountHFpositivedirectionReconoiseD2 == 9)
21313  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 36; depth = 2 \b");
21314  if (kcountHFpositivedirectionReconoiseD2 == 10)
21315  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 37; depth = 2 \b");
21316  if (kcountHFpositivedirectionReconoiseD2 == 11)
21317  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 38; depth = 2 \b");
21318  if (kcountHFpositivedirectionReconoiseD2 == 12)
21319  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 39; depth = 2 \b");
21320  if (kcountHFpositivedirectionReconoiseD2 == 13)
21321  HFpositivedirectionReconoiseD2->SetXTitle("D for HF+ jeta = 40; depth = 2 \b");
21322  HFpositivedirectionReconoiseD2->Draw("Error");
21323  kcountHFpositivedirectionReconoiseD2++;
21324  if (kcountHFpositivedirectionReconoiseD2 > 13)
21325  break; // 4x6 = 24
21326  } //ccctest>0
21327 
21328  } // for i
21329  } //if(jeta-41 >= 28 && jeta-41 <= 40)
21330  } //for jeta
21332  c3x5->Update();
21333  c3x5->Print("DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png");
21334  c3x5->Clear();
21335  // clean-up
21336  if (h2CeffHFpositivedirectionReconoiseD2)
21337  delete h2CeffHFpositivedirectionReconoiseD2;
21338  //========================================================================================== 22222214
21339  //======================================================================
21340  //======================================================================1D plot: D vs phi , different eta, depth=1
21341  //cout<<" 1D plot: D vs phi , different eta, depth=1 *****" <<endl;
21342  c3x5->Clear();
21344  c3x5->Divide(3, 5);
21345  c3x5->cd(1);
21346  int kcountHFnegativedirectionReconoiseD1 = 1;
21347  TH1F* h2CeffHFnegativedirectionReconoiseD1 = new TH1F("h2CeffHFnegativedirectionReconoiseD1", "", nphi, 0., 72.);
21348 
21349  for (int jeta = 0; jeta < njeta; jeta++) {
21350  // negativedirectionReconoiseD:
21351  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
21352  // for (int i=0;i<ndepth;i++) {
21353  // depth=1
21354  for (int i = 0; i < 1; i++) {
21355  TH1F* HFnegativedirectionReconoiseD1 = (TH1F*)h2CeffHFnegativedirectionReconoiseD1->Clone("twod1");
21356 
21357  float ccctest = 0; // to avoid empty massive elements
21358  for (int jphi = 0; jphi < nphi; jphi++) {
21359  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21360  if (areconoiseHF[i][jeta][jphi] > 0.) {
21361  HFnegativedirectionReconoiseD1->Fill(jphi, ccc1);
21362  ccctest = 1.; //HFnegativedirectionReconoiseD1->SetBinError(i,0.01);
21363  }
21364  } // for jphi
21365  if (ccctest > 0.) {
21366  //cout<<"1414 kcountHFnegativedirectionReconoiseD1 = "<<kcountHFnegativedirectionReconoiseD1 <<" jeta-41= "<< jeta-41 <<endl;
21367  c3x5->cd(kcountHFnegativedirectionReconoiseD1);
21368  HFnegativedirectionReconoiseD1->SetMarkerStyle(20);
21369  HFnegativedirectionReconoiseD1->SetMarkerSize(0.4);
21370  HFnegativedirectionReconoiseD1->GetYaxis()->SetLabelSize(0.04);
21371  HFnegativedirectionReconoiseD1->SetXTitle("HFnegativedirectionReconoiseD1 \b");
21372  HFnegativedirectionReconoiseD1->SetMarkerColor(2);
21373  HFnegativedirectionReconoiseD1->SetLineColor(0);
21374  gPad->SetGridy();
21375  gPad->SetGridx();
21376  // gPad->SetLogy();
21377  if (kcountHFnegativedirectionReconoiseD1 == 1)
21378  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-41; depth = 1 \b");
21379  if (kcountHFnegativedirectionReconoiseD1 == 2)
21380  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-40; depth = 1 \b");
21381  if (kcountHFnegativedirectionReconoiseD1 == 3)
21382  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-39; depth = 1 \b");
21383  if (kcountHFnegativedirectionReconoiseD1 == 4)
21384  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-38; depth = 1 \b");
21385  if (kcountHFnegativedirectionReconoiseD1 == 5)
21386  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-37; depth = 1 \b");
21387  if (kcountHFnegativedirectionReconoiseD1 == 6)
21388  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-36; depth = 1 \b");
21389  if (kcountHFnegativedirectionReconoiseD1 == 7)
21390  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-35; depth = 1 \b");
21391  if (kcountHFnegativedirectionReconoiseD1 == 8)
21392  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-34; depth = 1 \b");
21393  if (kcountHFnegativedirectionReconoiseD1 == 9)
21394  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-33; depth = 1 \b");
21395  if (kcountHFnegativedirectionReconoiseD1 == 10)
21396  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-32; depth = 1 \b");
21397  if (kcountHFnegativedirectionReconoiseD1 == 11)
21398  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-31; depth = 1 \b");
21399  if (kcountHFnegativedirectionReconoiseD1 == 12)
21400  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-30; depth = 1 \b");
21401  if (kcountHFnegativedirectionReconoiseD1 == 13)
21402  HFnegativedirectionReconoiseD1->SetXTitle("D for HF- jeta =-29; depth = 1 \b");
21403  HFnegativedirectionReconoiseD1->Draw("Error");
21404  kcountHFnegativedirectionReconoiseD1++;
21405  if (kcountHFnegativedirectionReconoiseD1 > 13)
21406  break; // 4x6 = 24
21407  } //ccctest>0
21408 
21409  } // for i
21410  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21411  } //for jeta
21413  c3x5->Update();
21414  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png");
21415  c3x5->Clear();
21416  // clean-up
21417  if (h2CeffHFnegativedirectionReconoiseD1)
21418  delete h2CeffHFnegativedirectionReconoiseD1;
21419  //========================================================================================== 22222215
21420  //======================================================================
21421  //======================================================================1D plot: D vs phi , different eta, depth=2
21422  //cout<<" 1D plot: D vs phi , different eta, depth=2 *****" <<endl;
21423  c3x5->Clear();
21424  c3x5->Divide(3, 5);
21425  c3x5->cd(1);
21426  int kcountHFnegativedirectionReconoiseD2 = 1;
21427  TH1F* h2CeffHFnegativedirectionReconoiseD2 = new TH1F("h2CeffHFnegativedirectionReconoiseD2", "", nphi, 0., 72.);
21428 
21429  for (int jeta = 0; jeta < njeta; jeta++) {
21430  // negativedirectionReconoiseD:
21431  if (jeta - 41 >= -41 && jeta - 41 <= -29) {
21432  // for (int i=0;i<ndepth;i++) {
21433  // depth=2
21434  for (int i = 1; i < 2; i++) {
21435  TH1F* HFnegativedirectionReconoiseD2 = (TH1F*)h2CeffHFnegativedirectionReconoiseD2->Clone("twod1");
21436 
21437  float ccctest = 0; // to avoid empty massive elements
21438  for (int jphi = 0; jphi < nphi; jphi++) {
21439  double ccc1 = reconoisevarianceHF[i][jeta][jphi];
21440  if (areconoiseHF[i][jeta][jphi] > 0.) {
21441  HFnegativedirectionReconoiseD2->Fill(jphi, ccc1);
21442  ccctest = 1.; //HFnegativedirectionReconoiseD2->SetBinError(i,0.01);
21443  }
21444  } // for jphi
21445  if (ccctest > 0.) {
21446  //cout<<"1515 kcountHFnegativedirectionReconoiseD2 = "<<kcountHFnegativedirectionReconoiseD2 <<" jeta-41= "<< jeta-41 <<endl;
21447  c3x5->cd(kcountHFnegativedirectionReconoiseD2);
21448  HFnegativedirectionReconoiseD2->SetMarkerStyle(20);
21449  HFnegativedirectionReconoiseD2->SetMarkerSize(0.4);
21450  HFnegativedirectionReconoiseD2->GetYaxis()->SetLabelSize(0.04);
21451  HFnegativedirectionReconoiseD2->SetXTitle("HFnegativedirectionReconoiseD2 \b");
21452  HFnegativedirectionReconoiseD2->SetMarkerColor(2);
21453  HFnegativedirectionReconoiseD2->SetLineColor(0);
21454  gPad->SetGridy();
21455  gPad->SetGridx();
21456  // gPad->SetLogy();
21457  if (kcountHFnegativedirectionReconoiseD2 == 1)
21458  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-41; depth = 2 \b");
21459  if (kcountHFnegativedirectionReconoiseD2 == 2)
21460  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-40; depth = 2 \b");
21461  if (kcountHFnegativedirectionReconoiseD2 == 3)
21462  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-39; depth = 2 \b");
21463  if (kcountHFnegativedirectionReconoiseD2 == 4)
21464  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-38; depth = 2 \b");
21465  if (kcountHFnegativedirectionReconoiseD2 == 5)
21466  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-37; depth = 2 \b");
21467  if (kcountHFnegativedirectionReconoiseD2 == 6)
21468  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-36; depth = 2 \b");
21469  if (kcountHFnegativedirectionReconoiseD2 == 7)
21470  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-35; depth = 2 \b");
21471  if (kcountHFnegativedirectionReconoiseD2 == 8)
21472  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-34; depth = 2 \b");
21473  if (kcountHFnegativedirectionReconoiseD2 == 9)
21474  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-33; depth = 2 \b");
21475  if (kcountHFnegativedirectionReconoiseD2 == 10)
21476  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-32; depth = 2 \b");
21477  if (kcountHFnegativedirectionReconoiseD2 == 11)
21478  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-31; depth = 2 \b");
21479  if (kcountHFnegativedirectionReconoiseD2 == 12)
21480  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-30; depth = 2 \b");
21481  if (kcountHFnegativedirectionReconoiseD2 == 13)
21482  HFnegativedirectionReconoiseD2->SetXTitle("D for HF- jeta =-29; depth = 2 \b");
21483  HFnegativedirectionReconoiseD2->Draw("Error");
21484  kcountHFnegativedirectionReconoiseD2++;
21485  if (kcountHFnegativedirectionReconoiseD2 > 13)
21486  break; // 4x6 = 24
21487  } //ccctest>0
21488 
21489  } // for i
21490  } //if(jeta-41 >= -41 && jeta-41 <= -29)
21491  } //for jeta
21493  c3x5->Update();
21494  c3x5->Print("DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png");
21495  c3x5->Clear();
21496  // clean-up
21497  if (h2CeffHFnegativedirectionReconoiseD2)
21498  delete h2CeffHFnegativedirectionReconoiseD2;
21499 
21500  //===================================================================== END of Reconoise HF for phi-symmetry
21501  //===================================================================== END of Reconoise HF for phi-symmetry
21502  //===================================================================== END of Reconoise HF for phi-symmetry
21503  //============================================================================================================ END of Reconoise for phi-symmetry
21504  //============================================================================================================ END of Reconoise for phi-symmetry
21505  //============================================================================================================ END of Reconoise for phi-symmetry
21506 
21507  //==================================================================================================================================================== END for phi-symmetry
21508  //==================================================================================================================================================== END for phi-symmetry
21509  //==================================================================================================================================================== END for phi-symmetry
21510  //====================================================================================================================================================
21511 
21512  //======================================================================
21513  // Creating each test kind for each subdet html pages:
21514  std::string raw_class, raw_class1, raw_class2, raw_class3;
21515  int ind = 0;
21516 
21517  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
21518  ofstream htmlFileT, htmlFileC, htmlFileD, htmlFileP, htmlFileS, htmlFileM, htmlFileR, htmlFileN;
21519  if (sub == 1) {
21520  htmlFileT.open("HB_Tile.html");
21521  htmlFileC.open("HB_Calib.html");
21522  htmlFileD.open("HB_Drift.html");
21523  htmlFileP.open("HB_Pedestals.html");
21524  htmlFileS.open("HB_Shapes.html");
21525  htmlFileM.open("HB_PhiSymmetryDigi.html");
21526  htmlFileR.open("HB_PhiSymmetryRecoSignal.html");
21527  htmlFileN.open("HB_PhiSymmetryRecoNoise.html");
21528  }
21529  if (sub == 2) {
21530  htmlFileT.open("HE_Tile.html");
21531  htmlFileC.open("HE_Calib.html");
21532  htmlFileD.open("HE_Drift.html");
21533  htmlFileP.open("HE_Pedestals.html");
21534  htmlFileS.open("HE_Shapes.html");
21535  htmlFileM.open("HE_PhiSymmetryDigi.html");
21536  htmlFileR.open("HE_PhiSymmetryRecoSignal.html");
21537  htmlFileN.open("HE_PhiSymmetryRecoNoise.html");
21538  }
21539  if (sub == 3) {
21540  htmlFileT.open("HO_Tile.html");
21541  htmlFileC.open("HO_Calib.html");
21542  htmlFileD.open("HO_Drift.html");
21543  htmlFileP.open("HO_Pedestals.html");
21544  htmlFileS.open("HO_Shapes.html");
21545  }
21546  if (sub == 4) {
21547  htmlFileT.open("HF_Tile.html");
21548  htmlFileC.open("HF_Calib.html");
21549  htmlFileD.open("HF_Drift.html");
21550  htmlFileP.open("HF_Pedestals.html");
21551  htmlFileS.open("HF_Shapes.html");
21552  htmlFileM.open("HF_PhiSymmetryDigi.html");
21553  htmlFileR.open("HF_PhiSymmetryRecoSignal.html");
21554  htmlFileN.open("HF_PhiSymmetryRecoNoise.html");
21555  }
21556 
21557  // Megatile channels
21558  htmlFileT << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
21559  htmlFileT << "<head>" << std::endl;
21560  htmlFileT << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
21561  htmlFileT << "<title> Remote Monitoring Tool </title>" << std::endl;
21562  htmlFileT << "<style type=\"text/css\">" << std::endl;
21563  htmlFileT << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
21564  << std::endl;
21565  htmlFileT << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
21566  htmlFileT << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
21567  "text-align: center;}"
21568  << std::endl;
21569  htmlFileT << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
21570  htmlFileT << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
21571  htmlFileT << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
21572  htmlFileT << "</style>" << std::endl;
21573  htmlFileT << "<body>" << std::endl;
21574 
21575  if (sub == 1)
21576  htmlFileT << "<h1> Criteria for megatile channels for HB, RUN = " << runnumber << " </h1>" << std::endl;
21577  if (sub == 2)
21578  htmlFileT << "<h1> Criteria for megatile channels for HE, RUN = " << runnumber << " </h1>" << std::endl;
21579  if (sub == 3)
21580  htmlFileT << "<h1> Criteria for megatile channels for HO, RUN = " << runnumber << " </h1>" << std::endl;
21581  if (sub == 4)
21582  htmlFileT << "<h1> Criteria for megatile channels for HF, RUN = " << runnumber << " </h1>" << std::endl;
21583  htmlFileT << "<br>" << std::endl;
21584 
21585  // Test Entries
21586 
21587  htmlFileT << "<h2> 0. Entries for each channel.</h3>" << std::endl;
21588  htmlFileT << "<h3> 0.A. Entries in each channel for each depth.</h3>" << std::endl;
21589  htmlFileT << "<h4> Channel legend: color is rate of entries </h4>" << std::endl;
21590  if (sub == 1)
21591  htmlFileT << " <img src=\"MapRateEntryHB.png\" />" << std::endl;
21592  if (sub == 2)
21593  htmlFileT << " <img src=\"MapRateEntryHE.png\" />" << std::endl;
21594  if (sub == 3)
21595  htmlFileT << " <img src=\"MapRateEntryHO.png\" />" << std::endl;
21596  if (sub == 4)
21597  htmlFileT << " <img src=\"MapRateEntryHF.png\" />" << std::endl;
21598  htmlFileT << "<br>" << std::endl;
21599 
21600  // Test Cm
21601  htmlFileT << "<h2> 1. Cm criterion: CapID errors for each channel.</h3>" << std::endl;
21602  htmlFileT << "<h3> 1.A. Rate of CapId failures in each channel for each depth.</h3>" << std::endl;
21603  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
21604  if (sub == 1)
21605  htmlFileT << " <img src=\"MapRateCapIDHB.png\" />" << std::endl;
21606  if (sub == 2)
21607  htmlFileT << " <img src=\"MapRateCapIDHE.png\" />" << std::endl;
21608  if (sub == 3)
21609  htmlFileT << " <img src=\"MapRateCapIDHO.png\" />" << std::endl;
21610  if (sub == 4)
21611  htmlFileT << " <img src=\"MapRateCapIDHF.png\" />" << std::endl;
21612  htmlFileT << "<br>" << std::endl;
21613 
21614  // Am
21615  htmlFileT << "<h2> 2. Am criterion: ADC amplitude collected over all TSs(Full Amplitude) for each channel. </h3>"
21616  << std::endl;
21617  htmlFileT << "<h3> 2.A. Full ADC amplitude distribution over all events, channels and depths.</h3>" << std::endl;
21618  htmlFileT << "<h4> Legend: Bins less " << MIN_M[2][sub] << " correpond to bad ADC amplitude </h4>" << std::endl;
21619  if (sub == 1)
21620  htmlFileT << " <img src=\"HistAmplHB.png\" />" << std::endl;
21621  if (sub == 2)
21622  htmlFileT << " <img src=\"HistAmplHE.png\" />" << std::endl;
21623  if (sub == 3)
21624  htmlFileT << " <img src=\"HistAmplHO.png\" />" << std::endl;
21625  if (sub == 4)
21626  htmlFileT << " <img src=\"HistAmplHF.png\" />" << std::endl;
21627  htmlFileT << "<br>" << std::endl;
21628  htmlFileT << "<h3> 2.B. Rate of bad ADC amplitude (<" << MIN_M[2][sub] << ") in each channel for each depth. </h3>"
21629  << std::endl;
21630  htmlFileT << "<h4> Channel legend: white - good, other colours - bad. </h4>" << std::endl;
21631  if (sub == 1)
21632  htmlFileT << " <img src=\"MapRateAmplHB.png\" />" << std::endl;
21633  if (sub == 2)
21634  htmlFileT << " <img src=\"MapRateAmplHE.png\" />" << std::endl;
21635  if (sub == 3)
21636  htmlFileT << " <img src=\"MapRateAmplHO.png\" />" << std::endl;
21637  if (sub == 4)
21638  htmlFileT << " <img src=\"MapRateAmplHF.png\" />" << std::endl;
21639  htmlFileT << "<br>" << std::endl;
21640 
21641  // Test Wm
21642  htmlFileT << "<h2> 3. Wm criterion: RMS (width) of ADC amplutude for each channel.</h3>" << std::endl;
21643  htmlFileT << "<h3> 3.A. RMS distribution over all events, channel and depth.</h3>" << std::endl;
21644  htmlFileT << "<h4> Legend: Bins less " << MIN_M[3][sub] << " and more " << MAX_M[3][sub]
21645  << " correpond to bad RMS </h4>" << std::endl;
21646  if (sub == 1)
21647  htmlFileT << " <img src=\"HistRMSHB.png\" />" << std::endl;
21648  if (sub == 2)
21649  htmlFileT << " <img src=\"HistRMSHE.png\" />" << std::endl;
21650  if (sub == 3)
21651  htmlFileT << " <img src=\"HistRMSHO.png\" />" << std::endl;
21652  if (sub == 4)
21653  htmlFileT << " <img src=\"HistRMSHF.png\" />" << std::endl;
21654  htmlFileT << "<br>" << std::endl;
21655  htmlFileT << "<h3> 3.B. Rate of bad RMS (<" << MIN_M[3][sub] << ",>" << MAX_M[3][sub]
21656  << ") in each channel for each depth.</h3>" << std::endl;
21657  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
21658  if (sub == 1)
21659  htmlFileT << " <img src=\"MapRateRMSHB.png\" />" << std::endl;
21660  if (sub == 2)
21661  htmlFileT << " <img src=\"MapRateRMSHE.png\" />" << std::endl;
21662  if (sub == 3)
21663  htmlFileT << " <img src=\"MapRateRMSHO.png\" />" << std::endl;
21664  if (sub == 4)
21665  htmlFileT << " <img src=\"MapRateRMSHF.png\" />" << std::endl;
21666  htmlFileT << "<br>" << std::endl;
21667 
21668  // Rm
21669  htmlFileT << "<h2> 4. Rm criterion: Ratio ADC value sum over four near maximum (-2, -1, max, +1) TS to ADC value "
21670  "sum over all TS for each channel. </h3>"
21671  << std::endl;
21672  htmlFileT << "<h3> 4.A. Ratio distribution over all events, channels and depths.</h3>" << std::endl;
21673  htmlFileT << "<h4> Legend: Bins less " << MIN_M[4][sub] << " and more " << MAX_M[4][sub]
21674  << " correpond to bad ratio </h4>" << std::endl;
21675  if (sub == 1)
21676  htmlFileT << " <img src=\"Hist43TStoAllTSHB.png\" />" << std::endl;
21677  if (sub == 2)
21678  htmlFileT << " <img src=\"Hist43TStoAllTSHE.png\" />" << std::endl;
21679  if (sub == 3)
21680  htmlFileT << " <img src=\"Hist43TStoAllTSHO.png\" />" << std::endl;
21681  if (sub == 4)
21682  htmlFileT << " <img src=\"Hist43TStoAllTSHF.png\" />" << std::endl;
21683  htmlFileT << "<br>" << std::endl;
21684  htmlFileT << "<h3> 4.B. Rate of bad ratio (<" << MIN_M[4][sub] << ", >" << MAX_M[4][sub]
21685  << ") in each channel for each depth.</h3>" << std::endl;
21686  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
21687  if (sub == 1)
21688  htmlFileT << " <img src=\"MapRate43TStoAllTSHB.png\" />" << std::endl;
21689  if (sub == 2)
21690  htmlFileT << " <img src=\"MapRate43TStoAllTSHE.png\" />" << std::endl;
21691  if (sub == 3)
21692  htmlFileT << " <img src=\"MapRate43TStoAllTSHO.png\" />" << std::endl;
21693  if (sub == 4)
21694  htmlFileT << " <img src=\"MapRate43TStoAllTSHF.png\" />" << std::endl;
21695  htmlFileT << "<br>" << std::endl;
21696 
21697  // TNm
21698  htmlFileT << "<h2> 5. TNm criterion: Mean TS position for each channel.</h3>" << std::endl;
21699  htmlFileT << "<h3> 5.A. TN position distribution over all events, channels and depths.</h3>" << std::endl;
21700  htmlFileT << "<h4> Legend: Bins less " << MIN_M[5][sub] << " and more " << MAX_M[5][sub]
21701  << " correpond to bad mean position </h4>" << std::endl;
21702  if (sub == 1)
21703  htmlFileT << " <img src=\"HistMeanPosHB.png\" />" << std::endl;
21704  if (sub == 2)
21705  htmlFileT << " <img src=\"HistMeanPosHE.png\" />" << std::endl;
21706  if (sub == 3)
21707  htmlFileT << " <img src=\"HistMeanPosHO.png\" />" << std::endl;
21708  if (sub == 4)
21709  htmlFileT << " <img src=\"HistMeanPosHF.png\" />" << std::endl;
21710  htmlFileT << "<br>" << std::endl;
21711  htmlFileT << "<h3> 5.B. Rate of bad TN position (<" << MIN_M[5][sub] << ", >" << MAX_M[5][sub]
21712  << ") in each channel for each depth. </h3>" << std::endl;
21713  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
21714  if (sub == 1)
21715  htmlFileT << " <img src=\"MapRateMeanPosHB.png\" />" << std::endl;
21716  if (sub == 2)
21717  htmlFileT << " <img src=\"MapRateMeanPosHE.png\" />" << std::endl;
21718  if (sub == 3)
21719  htmlFileT << " <img src=\"MapRateMeanPosHO.png\" />" << std::endl;
21720  if (sub == 4)
21721  htmlFileT << " <img src=\"MapRateMeanPosHF.png\" />" << std::endl;
21722  htmlFileT << "<br>" << std::endl;
21723 
21724  // TXm
21725  htmlFileT << "<h2> 6.TXm criterion: Maximum TS position for each channel.</h3>" << std::endl;
21726  htmlFileT << "<h3> 6.A. TX position distribution over all events, channel and depth.</h3>" << std::endl;
21727  htmlFileT << "<h4> Legend: Bins less " << MIN_M[6][sub] << " and more " << MAX_M[6][sub]
21728  << " correpond to bad position </h4>" << std::endl;
21729  if (sub == 1)
21730  htmlFileT << " <img src=\"HistMaxPosHB.png\" />" << std::endl;
21731  if (sub == 2)
21732  htmlFileT << " <img src=\"HistMaxPosHE.png\" />" << std::endl;
21733  if (sub == 3)
21734  htmlFileT << " <img src=\"HistMaxPosHO.png\" />" << std::endl;
21735  if (sub == 4)
21736  htmlFileT << " <img src=\"HistMaxPosHF.png\" />" << std::endl;
21737  htmlFileT << "<br>" << std::endl;
21738  htmlFileT << "<h3> 6.B. Rate of bad TX position (<" << MIN_M[6][sub] << ", >" << MAX_M[6][sub]
21739  << ") in each channel for each depth. </h3>" << std::endl;
21740  htmlFileT << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
21741  if (sub == 1)
21742  htmlFileT << " <img src=\"MapRateMaxPosHB.png\" />" << std::endl;
21743  if (sub == 2)
21744  htmlFileT << " <img src=\"MapRateMaxPosHE.png\" />" << std::endl;
21745  if (sub == 3)
21746  htmlFileT << " <img src=\"MapRateMaxPosHO.png\" />" << std::endl;
21747  if (sub == 4)
21748  htmlFileT << " <img src=\"MapRateMaxPosHF.png\" />" << std::endl;
21749  htmlFileT << "<br>" << std::endl;
21750 
21751  htmlFileT << "</body> " << std::endl;
21752  htmlFileT << "</html> " << std::endl;
21753  htmlFileT.close();
21754 
21755  //Calibration channels
21756  htmlFileC << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
21757  htmlFileC << "<head>" << std::endl;
21758  htmlFileC << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
21759  htmlFileC << "<title> Raw Data Analyser </title>" << std::endl;
21760  htmlFileC << "<style type=\"text/css\">" << std::endl;
21761  htmlFileC << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
21762  << std::endl;
21763  htmlFileC << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
21764  htmlFileC << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
21765  "text-align: center;}"
21766  << std::endl;
21767  htmlFileC << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
21768  htmlFileC << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
21769  htmlFileC << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
21770  htmlFileC << "</style>" << std::endl;
21771  htmlFileC << "<body>" << std::endl;
21772 
21773  if (sub == 1)
21774  htmlFileC << "<h1> Criteria for calibration channels for HB, RUN = " << runnumber << " </h1>" << std::endl;
21775  if (sub == 2)
21776  htmlFileC << "<h1> Criteria for calibration channels for HE, RUN = " << runnumber << " </h1>" << std::endl;
21777  if (sub == 3)
21778  htmlFileC << "<h1> Criteria for calibration channels for HO, RUN = " << runnumber << " </h1>" << std::endl;
21779  if (sub == 4)
21780  htmlFileC << "<h1> Criteria for calibration channels for HF, RUN = " << runnumber << " </h1>" << std::endl;
21781  htmlFileC << "<br>" << std::endl;
21782 
21783  // Test Entries
21784 
21785  htmlFileC << "<h2> 0. Entries for each channel.</h3>" << std::endl;
21786  htmlFileC << "<h3> 0.A. Entries in each channel for each depth.</h3>" << std::endl;
21787  htmlFileC << "<h4> Channel legend: color is rate of entries </h4>" << std::endl;
21788  if (sub == 1)
21789  htmlFileC << " <img src=\"MapRateCalibEntryHB.png\" />" << std::endl;
21790  if (sub == 2)
21791  htmlFileC << " <img src=\"MapRateCalibEntryHE.png\" />" << std::endl;
21792  if (sub == 3)
21793  htmlFileC << " <img src=\"MapRateCalibEntryHO.png\" />" << std::endl;
21794  if (sub == 4)
21795  htmlFileC << " <img src=\"MapRateCalibEntryHF.png\" />" << std::endl;
21796  htmlFileC << "<br>" << std::endl;
21797 
21798  // Test Cc
21799  htmlFileC << "<h2> 1. Cc criterion: CapID errors for each channel.</h3>" << std::endl;
21800  htmlFileC << "<h3> 1.A. Rate of CapId failures in each channel for each depth.</h3>" << std::endl;
21801  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
21802  if (sub == 1)
21803  htmlFileC << " <img src=\"MapRateCapCalibHB.png\" />" << std::endl;
21804  if (sub == 2)
21805  htmlFileC << " <img src=\"MapRateCapCalibHE.png\" />" << std::endl;
21806  if (sub == 3)
21807  htmlFileC << " <img src=\"MapRateCapCalibHO.png\" />" << std::endl;
21808  if (sub == 4)
21809  htmlFileC << " <img src=\"MapRateCapCalibHF.png\" />" << std::endl;
21810  htmlFileC << "<br>" << std::endl;
21811 
21812  // Ac
21813  htmlFileC << "<h2> 2. Ac criterion: ADC amplitude collected over all TSs(Full Amplitude) for each channel. </h3>"
21814  << std::endl;
21815  htmlFileC << "<h3> 2.A. Full ADC amplitude distribution over all events, channels and depths.</h3>" << std::endl;
21816  htmlFileC << "<h4> Legend: Bins less " << MIN_C[2][sub] << " correpond to bad ADC amplitude </h4>" << std::endl;
21817  if (sub == 1)
21818  htmlFileC << " <img src=\"HistAmplCalibHB.png\" />" << std::endl;
21819  if (sub == 2)
21820  htmlFileC << " <img src=\"HistAmplCalibHE.png\" />" << std::endl;
21821  if (sub == 3)
21822  htmlFileC << " <img src=\"HistAmplCalibHO.png\" />" << std::endl;
21823  if (sub == 4)
21824  htmlFileC << " <img src=\"HistAmplCalibHF.png\" />" << std::endl;
21825  htmlFileC << "<br>" << std::endl;
21826  htmlFileC << "<h3> 2.B. Rate of bad ADC amplitude (<" << MIN_C[2][sub] << ") in each channel for each depth. </h3>"
21827  << std::endl;
21828  htmlFileC << "<h4> Channel legend: white - good, other colours - bad. </h4>" << std::endl;
21829  if (sub == 1)
21830  htmlFileC << " <img src=\"MapRateAmplCalibHB.png\" />" << std::endl;
21831  if (sub == 2)
21832  htmlFileC << " <img src=\"MapRateAmplCalibHE.png\" />" << std::endl;
21833  if (sub == 3)
21834  htmlFileC << " <img src=\"MapRateAmplCalibHO.png\" />" << std::endl;
21835  if (sub == 4)
21836  htmlFileC << " <img src=\"MapRateAmplCalibHF.png\" />" << std::endl;
21837  htmlFileC << "<br>" << std::endl;
21838 
21839  // Test Wc
21840  htmlFileC << "<h2> 3. Wc criterion: RMS (width) of ADC amplutude for each channel.</h3>" << std::endl;
21841  htmlFileC << "<h3> 3.A. W distribution over all events, channel and depth.</h3>" << std::endl;
21842  htmlFileC << "<h4> Legend: Bins less " << MIN_C[3][sub] << " and more " << MAX_C[3][sub]
21843  << " correpond to bad RMS </h4>" << std::endl;
21844  if (sub == 1)
21845  htmlFileC << " <img src=\"HistRMSCalibHB.png\" />" << std::endl;
21846  if (sub == 2)
21847  htmlFileC << " <img src=\"HistRMSCalibHE.png\" />" << std::endl;
21848  if (sub == 3)
21849  htmlFileC << " <img src=\"HistRMSCalibHO.png\" />" << std::endl;
21850  if (sub == 4)
21851  htmlFileC << " <img src=\"HistRMSCalibHF.png\" />" << std::endl;
21852  htmlFileC << "<br>" << std::endl;
21853  htmlFileC << "<h3> 3.B. Rate of bad W (<" << MIN_C[3][sub] << ",>" << MAX_C[3][sub]
21854  << ") in each channel for each depth.</h3>" << std::endl;
21855  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
21856  if (sub == 1)
21857  htmlFileC << " <img src=\"MapRateRMSCalibHB.png\" />" << std::endl;
21858  if (sub == 2)
21859  htmlFileC << " <img src=\"MapRateRMSCalibHE.png\" />" << std::endl;
21860  if (sub == 3)
21861  htmlFileC << " <img src=\"MapRateRMSCalibHO.png\" />" << std::endl;
21862  if (sub == 4)
21863  htmlFileC << " <img src=\"MapRateRMSCalibHF.png\" />" << std::endl;
21864  htmlFileC << "<br>" << std::endl;
21865 
21866  // Rc
21867  htmlFileC << "<h2> 4. Rc criterion: Ratio ADC value sum over five near maximum (-2, -1, max, +1, +2) TS to ADC "
21868  "value sum over all TS for each channel. </h3>"
21869  << std::endl;
21870  htmlFileC << "<h3> 4.A. Ratio distribution over all events, channels and depths.</h3>" << std::endl;
21871  htmlFileC << "<h4> Legend: Bins less " << MIN_C[4][sub] << " and more " << MAX_C[4][sub]
21872  << " correpond to bad ratio </h4>" << std::endl;
21873  if (sub == 1)
21874  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHB.png\" />" << std::endl;
21875  if (sub == 2)
21876  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHE.png\" />" << std::endl;
21877  if (sub == 3)
21878  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHO.png\" />" << std::endl;
21879  if (sub == 4)
21880  htmlFileC << " <img src=\"Hist43TStoAllTSCalibHF.png\" />" << std::endl;
21881  htmlFileC << "<br>" << std::endl;
21882  htmlFileC << "<h3> 4.B. Rate of bad Ratio (<" << MIN_C[4][sub] << ", >" << MAX_C[4][sub]
21883  << ") in each channel for each depth.</h3>" << std::endl;
21884  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
21885  if (sub == 1)
21886  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHB.png\" />" << std::endl;
21887  if (sub == 2)
21888  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHE.png\" />" << std::endl;
21889  if (sub == 3)
21890  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHO.png\" />" << std::endl;
21891  if (sub == 4)
21892  htmlFileC << " <img src=\"MapRate43TStoAllTSCalibHF.png\" />" << std::endl;
21893  htmlFileC << "<br>" << std::endl;
21894 
21895  // TNc
21896  htmlFileC << "<h2> 5. TNc criterion: Mean TS position for each channel.</h3>" << std::endl;
21897  htmlFileC << "<h3> 5.A. TN position distribution over all events, channels and depths.</h3>" << std::endl;
21898  htmlFileC << "<h4> Legend: Bins less " << MIN_C[5][sub] << " and more " << MAX_C[5][sub]
21899  << " correpond to bad position </h4>" << std::endl;
21900  if (sub == 1)
21901  htmlFileC << " <img src=\"HistMeanPosCalibHB.png\" />" << std::endl;
21902  if (sub == 2)
21903  htmlFileC << " <img src=\"HistMeanPosCalibHE.png\" />" << std::endl;
21904  if (sub == 3)
21905  htmlFileC << " <img src=\"HistMeanPosCalibHO.png\" />" << std::endl;
21906  if (sub == 4)
21907  htmlFileC << " <img src=\"HistMeanPosCalibHF.png\" />" << std::endl;
21908  htmlFileC << "<br>" << std::endl;
21909  htmlFileC << "<h3> 5.B. Rate of bad TN position (<" << MIN_C[5][sub] << ", >" << MAX_C[5][sub]
21910  << ") in each channel for each depth. </h3>" << std::endl;
21911  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
21912  if (sub == 1)
21913  htmlFileC << " <img src=\"MapRateMeanPosCalibHB.png\" />" << std::endl;
21914  if (sub == 2)
21915  htmlFileC << " <img src=\"MapRateMeanPosCalibHE.png\" />" << std::endl;
21916  if (sub == 3)
21917  htmlFileC << " <img src=\"MapRateMeanPosCalibHO.png\" />" << std::endl;
21918  if (sub == 4)
21919  htmlFileC << " <img src=\"MapRateMeanPosCalibHF.png\" />" << std::endl;
21920  htmlFileC << "<br>" << std::endl;
21921 
21922  // TXm
21923  htmlFileC << "<h2> 6.TXc criterion: Maximum TS position for each channel.</h3>" << std::endl;
21924  htmlFileC << "<h3> 6.A. TX position distribution over all events, channel and depth.</h3>" << std::endl;
21925  htmlFileC << "<h4> Legend: Bins less " << MIN_C[6][sub] << " and more " << MAX_C[6][sub]
21926  << " correpond to bad position </h4>" << std::endl;
21927  if (sub == 1)
21928  htmlFileC << " <img src=\"HistMaxPosCalibHB.png\" />" << std::endl;
21929  if (sub == 2)
21930  htmlFileC << " <img src=\"HistMaxPosCalibHE.png\" />" << std::endl;
21931  if (sub == 3)
21932  htmlFileC << " <img src=\"HistMaxPosCalibHO.png\" />" << std::endl;
21933  if (sub == 4)
21934  htmlFileC << " <img src=\"HistMaxPosCalibHF.png\" />" << std::endl;
21935  htmlFileC << "<br>" << std::endl;
21936  htmlFileC << "<h3> 6.B. Rate of bad TX position (<" << MIN_C[6][sub] << ", >" << MAX_C[6][sub]
21937  << ") in each channel for each depth. </h3>" << std::endl;
21938  htmlFileC << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
21939  if (sub == 1)
21940  htmlFileC << " <img src=\"MapRateMaxPosCalibHB.png\" />" << std::endl;
21941  if (sub == 2)
21942  htmlFileC << " <img src=\"MapRateMaxPosCalibHE.png\" />" << std::endl;
21943  if (sub == 3)
21944  htmlFileC << " <img src=\"MapRateMaxPosCalibHO.png\" />" << std::endl;
21945  if (sub == 4)
21946  htmlFileC << " <img src=\"MapRateMaxPosCalibHF.png\" />" << std::endl;
21947  htmlFileC << "<br>" << std::endl;
21948 
21949  htmlFileC << "</body> " << std::endl;
21950  htmlFileC << "</html> " << std::endl;
21951  htmlFileC.close();
21952 
21953  //Response drift
21954  htmlFileD << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
21955  htmlFileD << "<head>" << std::endl;
21956  htmlFileD << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
21957  htmlFileD << "<title> Remore Monitoring Tool </title>" << std::endl;
21958  htmlFileD << "<style type=\"text/css\">" << std::endl;
21959  htmlFileD << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
21960  << std::endl;
21961  htmlFileD << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
21962  htmlFileD << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
21963  "text-align: center;}"
21964  << std::endl;
21965  htmlFileD << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
21966  htmlFileD << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
21967  htmlFileD << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
21968  htmlFileD << "</style>" << std::endl;
21969  htmlFileD << "<body>" << std::endl;
21970 
21971  if (sub == 1)
21972  htmlFileD << "<h1> Response drift for HB: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
21973  << " </h1>" << std::endl;
21974  if (sub == 2)
21975  htmlFileD << "<h1> Response drift for HE: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
21976  << " </h1>" << std::endl;
21977  if (sub == 3)
21978  htmlFileD << "<h1> Response drift for HO: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
21979  << " </h1>" << std::endl;
21980  if (sub == 4)
21981  htmlFileD << "<h1> Response drift for HF: Current RUN = " << runnumber << ", Reference RUN = " << refrunnumber
21982  << " </h1>" << std::endl;
21983  htmlFileD << "<br>" << std::endl;
21984 
21985  // test GS
21986  htmlFileD << "<h2> 1. Gain Stability (GS) </h3>" << std::endl;
21987  htmlFileD << "<h3> 1.A. Averaged channel response, collected over all TS, for Current run in each channel for each "
21988  "depth.</h3>"
21989  << std::endl;
21990  htmlFileD << "<h4> Channel legend: colour means cooresponding value of mean response. </h4>" << std::endl;
21991  if (sub == 1)
21992  htmlFileD << " <img src=\"MapRateAmpl1HB.png\" />" << std::endl;
21993  if (sub == 2)
21994  htmlFileD << " <img src=\"MapRateAmpl1HE.png\" />" << std::endl;
21995  if (sub == 3)
21996  htmlFileD << " <img src=\"MapRateAmpl1HO.png\" />" << std::endl;
21997  if (sub == 4)
21998  htmlFileD << " <img src=\"MapRateAmpl1HF.png\" />" << std::endl;
21999  htmlFileD << "<br>" << std::endl;
22000  htmlFileD << "<h3> 1.B. Averaged channel response, collected over all TS, for Reference run in each channel for "
22001  "each depth.</h3>"
22002  << std::endl;
22003  htmlFileD << "<h4> Channel legend: colour means cooresponding value of mean response. </h4>" << std::endl;
22004  if (sub == 1)
22005  htmlFileD << " <img src=\"MapRateAmpl2HB.png\" />" << std::endl;
22006  if (sub == 2)
22007  htmlFileD << " <img src=\"MapRateAmpl2HE.png\" />" << std::endl;
22008  if (sub == 3)
22009  htmlFileD << " <img src=\"MapRateAmpl2HO.png\" />" << std::endl;
22010  if (sub == 4)
22011  htmlFileD << " <img src=\"MapRateAmpl2HF.png\" />" << std::endl;
22012  htmlFileD << "<br>" << std::endl;
22013  htmlFileD << "<h3> 1.C. Relative difference between Current and Reference run distribution over all events, "
22014  "channels for each depth.</h3>"
22015  << std::endl;
22016  htmlFileD << "<h4> Legend: Bins less -" << porog[sub] << "% and more +" << porog[sub]
22017  << "% correpond to bad relative difference position </h4>" << std::endl;
22018  if (sub == 1)
22019  htmlFileD << " <img src=\"HistAmplDriftDepthHB.png\" />" << std::endl;
22020  if (sub == 2)
22021  htmlFileD << " <img src=\"HistAmplDriftDepthHE.png\" />" << std::endl;
22022  if (sub == 3)
22023  htmlFileD << " <img src=\"HistAmplDriftDepthHO.png\" />" << std::endl;
22024  if (sub == 4)
22025  htmlFileD << " <img src=\"HistAmplDriftDepthHF.png\" />" << std::endl;
22026  htmlFileD << "<br>" << std::endl;
22027  htmlFileD << "<h3> 1.D. Rate of bad relative difference (<-" << porog[sub] << ", >+" << porog[sub]
22028  << ") in each channel for each depth.</h3>" << std::endl;
22029  htmlFileD << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22030  if (sub == 1)
22031  htmlFileD << " <img src=\"MapRateAmplDriftHB.png\" />" << std::endl;
22032  if (sub == 2)
22033  htmlFileD << " <img src=\"MapRateAmplDriftHE.png\" />" << std::endl;
22034  if (sub == 3)
22035  htmlFileD << " <img src=\"MapRateAmplDriftHO.png\" />" << std::endl;
22036  if (sub == 4)
22037  htmlFileD << " <img src=\"MapRateAmplDriftHF.png\" />" << std::endl;
22038  htmlFileD << "<br>" << std::endl;
22039 
22040  htmlFileD << "</body> " << std::endl;
22041  htmlFileD << "</html> " << std::endl;
22042  htmlFileD.close();
22043 
22044  // Pedestals
22045  htmlFileP << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22046  htmlFileP << "<head>" << std::endl;
22047  htmlFileP << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22048  htmlFileP << "<title> Remote Monitoring Tool </title>" << std::endl;
22049  htmlFileP << "<style type=\"text/css\">" << std::endl;
22050  htmlFileP << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22051  << std::endl;
22052  htmlFileP << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22053  htmlFileP << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22054  "text-align: center;}"
22055  << std::endl;
22056  htmlFileP << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22057  htmlFileP << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22058  htmlFileP << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22059  htmlFileP << "</style>" << std::endl;
22060  htmlFileP << "<body>" << std::endl;
22061 
22062  if (sub == 1)
22063  htmlFileP << "<h1> Pedestals for HB, RUN = " << runnumber << " </h1>" << std::endl;
22064  if (sub == 2)
22065  htmlFileP << "<h1> Pedestals for HE, RUN = " << runnumber << " </h1>" << std::endl;
22066  if (sub == 3)
22067  htmlFileP << "<h1> Pedestals for HO, RUN = " << runnumber << " </h1>" << std::endl;
22068  if (sub == 4)
22069  htmlFileP << "<h1> Pedestals for HF, RUN = " << runnumber << " </h1>" << std::endl;
22070  htmlFileP << "<br>" << std::endl;
22071 
22072  // Pedestal:
22073  htmlFileP << "<h2> 1.Pm criterion: Pedestals for each CapID .</h3>" << std::endl;
22074  htmlFileP << "<h3> 1.A. Pedestal distribution over all events, channels for each CapID and all depths.</h3>"
22075  << std::endl;
22076  htmlFileP << "<h4> Legend: Bins less " << Pedest[0][sub] << " correpond to bad Pedestals </h4>" << std::endl;
22077  if (sub == 1)
22078  htmlFileP << " <img src=\"HistPedestalsHB.png\" />" << std::endl;
22079  if (sub == 2)
22080  htmlFileP << " <img src=\"HistPedestalsHE.png\" />" << std::endl;
22081  if (sub == 3)
22082  htmlFileP << " <img src=\"HistPedestalsHO.png\" />" << std::endl;
22083  if (sub == 4)
22084  htmlFileP << " <img src=\"HistPedestalsHF.png\" />" << std::endl;
22085  htmlFileP << "<br>" << std::endl;
22086  htmlFileP << "<h3> 1.B. Rate of channels at very low Pedestals at least in one CapID for each depth.</h3>"
22087  << std::endl;
22088  htmlFileP << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22089  if (sub == 1)
22090  htmlFileP << " <img src=\"MapRatePedHB.png\" />" << std::endl;
22091  if (sub == 2)
22092  htmlFileP << " <img src=\"MapRatePedHE.png\" />" << std::endl;
22093  if (sub == 3)
22094  htmlFileP << " <img src=\"MapRatePedHO.png\" />" << std::endl;
22095  if (sub == 4)
22096  htmlFileP << " <img src=\"MapRatePedHF.png\" />" << std::endl;
22097 
22098  // PedestalWidth:
22099  htmlFileP << "<h2> 2.pWm criterion: Pedestal Widths for each CapID .</h3>" << std::endl;
22100  htmlFileP << "<h3> 2.A. Pedestal Widths distribution over all events, channels for each CapID and all depths.</h3>"
22101  << std::endl;
22102  htmlFileP << "<h4> Legend: Bins less " << Pedest[1][sub] << " correpond to bad Pedestal Widths </h4>" << std::endl;
22103  if (sub == 1)
22104  htmlFileP << " <img src=\"HistPedestalWidthsHB.png\" />" << std::endl;
22105  if (sub == 2)
22106  htmlFileP << " <img src=\"HistPedestalWidthsHE.png\" />" << std::endl;
22107  if (sub == 3)
22108  htmlFileP << " <img src=\"HistPedestalWidthsHO.png\" />" << std::endl;
22109  if (sub == 4)
22110  htmlFileP << " <img src=\"HistPedestalWidthsHF.png\" />" << std::endl;
22111  htmlFileP << "<br>" << std::endl;
22112  htmlFileP << "<h3> 2.B. Rate of channels at very low Pedestal Widths at least in one CapID for each depth.</h3>"
22113  << std::endl;
22114  htmlFileP << "<h4> Channel legend: white - good, other colour - bad. </h4>" << std::endl;
22115  if (sub == 1)
22116  htmlFileP << " <img src=\"MapRatePedWidthsHB.png\" />" << std::endl;
22117  if (sub == 2)
22118  htmlFileP << " <img src=\"MapRatePedWidthsHE.png\" />" << std::endl;
22119  if (sub == 3)
22120  htmlFileP << " <img src=\"MapRatePedWidthsHO.png\" />" << std::endl;
22121  if (sub == 4)
22122  htmlFileP << " <img src=\"MapRatePedWidthsHF.png\" />" << std::endl;
22123 
22124  // Correlations of Pedestal(Width) and fullAmplitude:
22125  htmlFileP << "<h2> 3.Pedestal and pedestalWidths vs Amplitude .</h3>" << std::endl;
22126  htmlFileP << "<h3> 3.A. Correlation of Pedestal(pedestalWidths) and Amplitude over all channels and events .</h3>"
22127  << std::endl;
22128  htmlFileP << "<h4> Legend: colour - entries </h4>" << std::endl;
22129  if (sub == 1)
22130  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHB.png\" />" << std::endl;
22131  if (sub == 2)
22132  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHE.png\" />" << std::endl;
22133  if (sub == 3)
22134  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHO.png\" />" << std::endl;
22135  if (sub == 4)
22136  htmlFileP << "<img src=\"CorrelationsMapPedestalVsfullAmplitudeHF.png\" />" << std::endl;
22137  htmlFileP << "<br>" << std::endl;
22138  htmlFileP.close();
22139 
22140  // TSs Shapes:
22141 
22142  htmlFileS << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22143  htmlFileS << "<head>" << std::endl;
22144  htmlFileS << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22145  htmlFileS << "<title> Remote Monitoring Tool </title>" << std::endl;
22146  htmlFileS << "<style type=\"text/css\">" << std::endl;
22147  htmlFileS << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22148  << std::endl;
22149  htmlFileS << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22150  htmlFileS << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22151  "text-align: center;}"
22152  << std::endl;
22153  htmlFileS << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22154  htmlFileS << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22155  htmlFileS << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22156  htmlFileS << "</style>" << std::endl;
22157  htmlFileS << "<body>" << std::endl;
22158 
22159  if (sub == 1)
22160  htmlFileS << "<h1> ADC Shape for HB, RUN = " << runnumber << " </h1>" << std::endl;
22161  if (sub == 2)
22162  htmlFileS << "<h1> ADC Shape for HE, RUN = " << runnumber << " </h1>" << std::endl;
22163  if (sub == 3)
22164  htmlFileS << "<h1> ADC Shape for HO, RUN = " << runnumber << " </h1>" << std::endl;
22165  if (sub == 4)
22166  htmlFileS << "<h1> ADC Shape for HF, RUN = " << runnumber << " </h1>" << std::endl;
22167  htmlFileS << "<br>" << std::endl;
22168 
22169  htmlFileS << "<h2> 1.Mean ADC Shape.</h3>" << std::endl;
22170  htmlFileS << "<h3> 1.A. ADC shape averaged over all good channels, depth and events.</h3>" << std::endl;
22171  // htmlFileS << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22172  if (sub == 1)
22173  htmlFileS << " <img src=\"HistGoodTSshapesHB.png\" />" << std::endl;
22174  if (sub == 2)
22175  htmlFileS << " <img src=\"HistGoodTSshapesHE.png\" />" << std::endl;
22176  if (sub == 3)
22177  htmlFileS << " <img src=\"HistGoodTSshapesHO.png\" />" << std::endl;
22178  if (sub == 4)
22179  htmlFileS << " <img src=\"HistGoodTSshapesHF.png\" />" << std::endl;
22180  htmlFileS << "<br>" << std::endl;
22181  htmlFileS << "<h3> 1.B. ADC shape averaged over all bad channels, depth and events. Bad channels are selected by 5 "
22182  "criteria: CapId, A, W, P, Pw </h3>"
22183  << std::endl;
22184  // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22185  if (sub == 1)
22186  htmlFileS << " <img src=\"HistBadTSshapesHB.png\" />" << std::endl;
22187  if (sub == 2)
22188  htmlFileS << " <img src=\"HistBadTSshapesHE.png\" />" << std::endl;
22189  if (sub == 3)
22190  htmlFileS << " <img src=\"HistBadTSshapesHO.png\" />" << std::endl;
22191  if (sub == 4)
22192  htmlFileS << " <img src=\"HistBadTSshapesHF.png\" />" << std::endl;
22193  /*
22194  htmlFileS << "<h2> 2. ADC in Time Slice </h3>"<< std::endl;
22195  htmlFileS << "<h3> 2.A. ADC counts histogrammed over all channels, depth and events.</h3>"<< std::endl;
22196 // htmlFileS << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22197  if (sub==1) htmlFileS << " <img src=\"Hist_ADC_HB_All.png\" />" << std::endl;
22198  if (sub==2) htmlFileS << " <img src=\"Hist_ADC_HE_All.png\" />" << std::endl;
22199  if (sub==3) htmlFileS << " <img src=\"Hist_ADC_HO_All.png\" />" << std::endl;
22200  if (sub==4) htmlFileS << " <img src=\"Hist_ADC_HF_All.png\" />" << std::endl;
22201  htmlFileS << "<br>"<< std::endl;
22202  htmlFileS << "<h3> 2.B. ADC counts histogrammed over all channels and events for each depth separately. </h3>"<< std::endl;
22203 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22204  if (sub==1) htmlFileS << " <img src=\"Hist_ADC_HB_DS.png\" />" << std::endl;
22205  if (sub==2) htmlFileS << " <img src=\"Hist_ADC_HE_DS.png\" />" << std::endl;
22206  if (sub==3) htmlFileS << " <img src=\"Hist_ADC_HO_DS.png\" />" << std::endl;
22207  if (sub==4) htmlFileS << " <img src=\"Hist_ADC_HF_DS.png\" />" << std::endl;
22208 
22209  htmlFileS << "<h2> 3. ADC Sum in Time Slice </h3>"<< std::endl;
22210  htmlFileS << "<h3> 3.A. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"<< std::endl;
22211 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22212  if (sub==1) htmlFileS << " <img src=\"Hist_SumADC_HB.png\" />" << std::endl;
22213  if (sub==2) htmlFileS << " <img src=\"Hist_SumADC_HE.png\" />" << std::endl;
22214  if (sub==3) htmlFileS << " <img src=\"Hist_SumADC_HO.png\" />" << std::endl;
22215  if (sub==4) htmlFileS << " <img src=\"Hist_SumADC_HF.png\" />" << std::endl;
22216 
22217  htmlFileS << "<h3> 3.B. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"<< std::endl;
22218 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22219  if (sub==1) htmlFileS << " <img src=\"Hist_SumADC_HB0.png\" />" << std::endl;
22220  if (sub==2) htmlFileS << " <img src=\"Hist_SumADC_HE0.png\" />" << std::endl;
22221  if (sub==3) htmlFileS << " <img src=\"Hist_SumADC_HO0.png\" />" << std::endl;
22222  if (sub==4) htmlFileS << " <img src=\"Hist_SumADC_HF0.png\" />" << std::endl;
22223 
22224  htmlFileS << "<h3> 3.C. ADC Sum over all channels histogrammed over all events for each depth separately. </h3>"<< std::endl;
22225 // htmlFileS << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22226  if (sub==1) htmlFileS << " <img src=\"Hist_SumADC_HB1.png\" />" << std::endl;
22227  if (sub==2) htmlFileS << " <img src=\"Hist_SumADC_HE1.png\" />" << std::endl;
22228  if (sub==3) htmlFileS << " <img src=\"Hist_SumADC_HO1.png\" />" << std::endl;
22229  if (sub==4) htmlFileS << " <img src=\"Hist_SumADC_HF1.png\" />" << std::endl;
22230 */
22231  htmlFileS.close();
22232 
22234 
22236 
22238 
22239  htmlFileM << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22240  htmlFileM << "<head>" << std::endl;
22241  htmlFileM << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22242  htmlFileM << "<title> Remote Monitoring Tool </title>" << std::endl;
22243  htmlFileM << "<style type=\"text/css\">" << std::endl;
22244  htmlFileM << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22245  << std::endl;
22246  htmlFileM << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22247  htmlFileM << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22248  "text-align: center;}"
22249  << std::endl;
22250  htmlFileM << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22251  htmlFileM << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22252  htmlFileM << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22253  htmlFileM << "</style>" << std::endl;
22254  htmlFileM << "<body>" << std::endl;
22255 
22257 
22258  if (sub == 1)
22259  htmlFileM << "<h1> Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>" << std::endl;
22260  if (sub == 2)
22261  htmlFileM << "<h1> Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>" << std::endl;
22262  if (sub == 4)
22263  htmlFileM << "<h1> Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>" << std::endl;
22264  htmlFileM << "<br>" << std::endl;
22265 
22266  htmlFileM << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
22267  htmlFileM << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
22268  // htmlFileM << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22269  if (sub == 1)
22270  htmlFileM << " <img src=\"RdigiGeneralD2PhiSymmetryHB.png\" />" << std::endl;
22271  if (sub == 2)
22272  htmlFileM << " <img src=\"RdigiGeneralD2PhiSymmetryHE.png\" />" << std::endl;
22273  if (sub == 4)
22274  htmlFileM << " <img src=\"RdigiGeneralD2PhiSymmetryHF.png\" />" << std::endl;
22275  htmlFileM << "<br>" << std::endl;
22276 
22277  htmlFileM << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
22278  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22279  if (sub == 1)
22280  htmlFileM << " <img src=\"RdigiGeneralD1PhiSymmetryHB.png\" />" << std::endl;
22281  if (sub == 2)
22282  htmlFileM << " <img src=\"RdigiGeneralD1PhiSymmetryHE.png\" />" << std::endl;
22283  if (sub == 4)
22284  htmlFileM << " <img src=\"RdigiGeneralD1PhiSymmetryHF.png\" />" << std::endl;
22285  htmlFileM << "<br>" << std::endl;
22286 
22288 
22290  htmlFileM << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
22291  htmlFileM << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
22292  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22293  if (sub == 1)
22294  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22295  if (sub == 2)
22296  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22297  if (sub == 4)
22298  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22299  htmlFileM << "<br>" << std::endl;
22300 
22301  htmlFileM << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
22302  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22303  if (sub == 1)
22304  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22305  if (sub == 2)
22306  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22307  if (sub == 4)
22308  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22309  htmlFileM << "<br>" << std::endl;
22310 
22311  htmlFileM << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
22312  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22313  if (sub == 1)
22314  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22315  if (sub == 2)
22316  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22317  if (sub == 4)
22318  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22319  htmlFileM << "<br>" << std::endl;
22320 
22321  htmlFileM << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
22322  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22323  if (sub == 1)
22324  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22325  if (sub == 2)
22326  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22327  if (sub == 4)
22328  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22329  htmlFileM << "<br>" << std::endl;
22330 
22331  if (sub == 2)
22332  htmlFileM << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
22333  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22334  if (sub == 2)
22335  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22336  htmlFileM << "<br>" << std::endl;
22337 
22338  if (sub == 2)
22339  htmlFileM << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
22340  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22341  if (sub == 2)
22342  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22343  htmlFileM << "<br>" << std::endl;
22344 
22345  if (sub == 2)
22346  htmlFileM << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
22347  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22348  if (sub == 2)
22349  htmlFileM << " <img src=\"RdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22350  htmlFileM << "<br>" << std::endl;
22351 
22353  htmlFileM << "<h2> 2: D(digivarianceSignalhe) </h3>" << std::endl;
22354  htmlFileM << "<h3> 2A: eta/phi-plot: D(digivarianceSignalhe), averaged over depthes </h3>" << std::endl;
22355  // htmlFileM << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22356  if (sub == 1)
22357  htmlFileM << " <img src=\"DdigiGeneralD2PhiSymmetryHB.png\" />" << std::endl;
22358  if (sub == 2)
22359  htmlFileM << " <img src=\"DdigiGeneralD2PhiSymmetryHE.png\" />" << std::endl;
22360  if (sub == 4)
22361  htmlFileM << " <img src=\"DdigiGeneralD2PhiSymmetryHF.png\" />" << std::endl;
22362  htmlFileM << "<br>" << std::endl;
22363 
22364  htmlFileM << "<h3> 2B: D(digivarianceSignalhe) vs phi , averaged over depthes & eta </h3>" << std::endl;
22365  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22366  if (sub == 1)
22367  htmlFileM << " <img src=\"DdigiGeneralD1PhiSymmetryHB.png\" />" << std::endl;
22368  if (sub == 2)
22369  htmlFileM << " <img src=\"DdigiGeneralD1PhiSymmetryHE.png\" />" << std::endl;
22370  if (sub == 4)
22371  htmlFileM << " <img src=\"DdigiGeneralD1PhiSymmetryHF.png\" />" << std::endl;
22372  htmlFileM << "<br>" << std::endl;
22373 
22376  htmlFileM << "<h2> Positive direction, D(digivarianceSignalhe) </h3>" << std::endl;
22377  htmlFileM << "<h3> 2C: D(digivarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
22378  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22379  if (sub == 1)
22380  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22381  if (sub == 2)
22382  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22383  if (sub == 4)
22384  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22385  htmlFileM << "<br>" << std::endl;
22386 
22387  htmlFileM << "<h3> 2.D. D(digivarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
22388  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22389  if (sub == 1)
22390  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22391  if (sub == 2)
22392  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22393  if (sub == 4)
22394  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22395  htmlFileM << "<br>" << std::endl;
22396 
22397  htmlFileM << "<h3> 2E: D(digivarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
22398  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22399  if (sub == 1)
22400  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22401  if (sub == 2)
22402  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22403  if (sub == 4)
22404  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22405  htmlFileM << "<br>" << std::endl;
22406 
22407  htmlFileM << "<h3> 2F: D(digivarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
22408  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22409  if (sub == 1)
22410  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22411  if (sub == 2)
22412  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22413  if (sub == 4)
22414  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22415  htmlFileM << "<br>" << std::endl;
22416 
22417  if (sub == 2)
22418  htmlFileM << "<h3> 2G: D(digivarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
22419  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22420  if (sub == 2)
22421  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22422  htmlFileM << "<br>" << std::endl;
22423 
22424  if (sub == 2)
22425  htmlFileM << "<h3> 2H: D(digivarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
22426  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22427  if (sub == 2)
22428  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22429  htmlFileM << "<br>" << std::endl;
22430 
22431  if (sub == 2)
22432  htmlFileM << "<h3> 2I: D(digivarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
22433  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22434  if (sub == 2)
22435  htmlFileM << " <img src=\"DdigiPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22436  htmlFileM << "<br>" << std::endl;
22437 
22440  htmlFileM << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
22441  << std::endl;
22442 
22444  htmlFileM << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
22445  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22446  if (sub == 1)
22447  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22448  if (sub == 2)
22449  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22450  if (sub == 4)
22451  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22452  htmlFileM << "<br>" << std::endl;
22453 
22454  htmlFileM << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
22455  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22456  if (sub == 1)
22457  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22458  if (sub == 2)
22459  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22460  if (sub == 4)
22461  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22462  htmlFileM << "<br>" << std::endl;
22463 
22464  htmlFileM << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
22465  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22466  if (sub == 1)
22467  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22468  if (sub == 2)
22469  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22470  if (sub == 4)
22471  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22472  htmlFileM << "<br>" << std::endl;
22473 
22474  htmlFileM << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
22475  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22476  if (sub == 1)
22477  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22478  if (sub == 2)
22479  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22480  if (sub == 4)
22481  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22482  htmlFileM << "<br>" << std::endl;
22483 
22484  if (sub == 2)
22485  htmlFileM << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
22486  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22487  if (sub == 2)
22488  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22489  htmlFileM << "<br>" << std::endl;
22490 
22491  if (sub == 2)
22492  htmlFileM << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
22493  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22494  if (sub == 2)
22495  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22496  htmlFileM << "<br>" << std::endl;
22497 
22498  if (sub == 2)
22499  htmlFileM << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
22500  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22501  if (sub == 2)
22502  htmlFileM << " <img src=\"RdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22503  htmlFileM << "<br>" << std::endl;
22504 
22506  htmlFileM << "<h2> 4: Negative direction, D(digivarianceSignalhe) </h3>" << std::endl;
22508  htmlFileM << "<h3> 4C: D(digivarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
22509  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22510  if (sub == 1)
22511  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22512  if (sub == 2)
22513  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22514  if (sub == 4)
22515  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22516  htmlFileM << "<br>" << std::endl;
22517 
22518  htmlFileM << "<h3> 4.D. D(digivarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
22519  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22520  if (sub == 1)
22521  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22522  if (sub == 2)
22523  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22524  if (sub == 4)
22525  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22526  htmlFileM << "<br>" << std::endl;
22527 
22528  htmlFileM << "<h3> 4E: D(digivarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
22529  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22530  if (sub == 1)
22531  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22532  if (sub == 2)
22533  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22534  if (sub == 4)
22535  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth3HF.png\" />" << std::endl;
22536  htmlFileM << "<br>" << std::endl;
22537 
22538  htmlFileM << "<h3> 4F: D(digivarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
22539  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22540  if (sub == 1)
22541  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22542  if (sub == 2)
22543  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22544  if (sub == 4)
22545  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth4HF.png\" />" << std::endl;
22546  htmlFileM << "<br>" << std::endl;
22547 
22548  if (sub == 2)
22549  htmlFileM << "<h3> 4G: D(digivarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
22550  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22551  if (sub == 2)
22552  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22553  htmlFileM << "<br>" << std::endl;
22554 
22555  if (sub == 2)
22556  htmlFileM << "<h3> 4H: D(digivarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
22557  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22558  if (sub == 2)
22559  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22560  htmlFileM << "<br>" << std::endl;
22561 
22562  if (sub == 2)
22563  htmlFileM << "<h3> 4I: D(digivarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
22564  // htmlFileM << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22565  if (sub == 2)
22566  htmlFileM << " <img src=\"DdigiNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22567  htmlFileM << "<br>" << std::endl;
22569  htmlFileM.close();
22571  //
22575 
22576  htmlFileR << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22577  htmlFileR << "<head>" << std::endl;
22578  htmlFileR << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22579  htmlFileR << "<title> Remote Monitoring Tool </title>" << std::endl;
22580  htmlFileR << "<style type=\"text/css\">" << std::endl;
22581  htmlFileR << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22582  << std::endl;
22583  htmlFileR << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22584  htmlFileR << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22585  "text-align: center;}"
22586  << std::endl;
22587  htmlFileR << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22588  htmlFileR << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22589  htmlFileR << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22590  htmlFileR << "</style>" << std::endl;
22591  htmlFileR << "<body>" << std::endl;
22592 
22594 
22595  if (sub == 1)
22596  htmlFileR << "<h1> Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>" << std::endl;
22597  if (sub == 2)
22598  htmlFileR << "<h1> Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>" << std::endl;
22599  if (sub == 4)
22600  htmlFileR << "<h1> Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>" << std::endl;
22601  htmlFileR << "<br>" << std::endl;
22602 
22603  htmlFileR << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
22604  htmlFileR << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
22605  // htmlFileR << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22606  if (sub == 1)
22607  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHB.png\" />" << std::endl;
22608  if (sub == 2)
22609  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHE.png\" />" << std::endl;
22610  if (sub == 4)
22611  htmlFileR << " <img src=\"RrecosignalGeneralD2PhiSymmetryHF.png\" />" << std::endl;
22612  htmlFileR << "<br>" << std::endl;
22613 
22614  htmlFileR << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
22615  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22616  if (sub == 1)
22617  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHB.png\" />" << std::endl;
22618  if (sub == 2)
22619  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHE.png\" />" << std::endl;
22620  if (sub == 4)
22621  htmlFileR << " <img src=\"RrecosignalGeneralD1PhiSymmetryHF.png\" />" << std::endl;
22622  htmlFileR << "<br>" << std::endl;
22623 
22625 
22627  htmlFileR << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
22628  htmlFileR << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
22629  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22630  if (sub == 1)
22631  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22632  if (sub == 2)
22633  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22634  if (sub == 4)
22635  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22636  htmlFileR << "<br>" << std::endl;
22637 
22638  htmlFileR << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
22639  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22640  if (sub == 1)
22641  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22642  if (sub == 2)
22643  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22644  if (sub == 4)
22645  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22646  htmlFileR << "<br>" << std::endl;
22647 
22648  if (sub == 1 || sub == 2)
22649  htmlFileR << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
22650  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22651  if (sub == 1)
22652  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22653  if (sub == 2)
22654  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22655  htmlFileR << "<br>" << std::endl;
22656 
22657  if (sub == 1 || sub == 2)
22658  htmlFileR << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
22659  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22660  if (sub == 1)
22661  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22662  if (sub == 2)
22663  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22664  htmlFileR << "<br>" << std::endl;
22665 
22666  if (sub == 2)
22667  htmlFileR << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
22668  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22669  if (sub == 2)
22670  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22671  htmlFileR << "<br>" << std::endl;
22672 
22673  if (sub == 2)
22674  htmlFileR << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
22675  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22676  if (sub == 2)
22677  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22678  htmlFileR << "<br>" << std::endl;
22679 
22680  if (sub == 2)
22681  htmlFileR << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
22682  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22683  if (sub == 2)
22684  htmlFileR << " <img src=\"RrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22685  htmlFileR << "<br>" << std::endl;
22686 
22688  htmlFileR << "<h2> 2: D(recosignalvarianceSignalhe) </h3>" << std::endl;
22689  htmlFileR << "<h3> 2A: eta/phi-plot: D(recosignalvarianceSignalhe), averaged over depthes </h3>" << std::endl;
22690  // htmlFileR << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22691  if (sub == 1)
22692  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHB.png\" />" << std::endl;
22693  if (sub == 2)
22694  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHE.png\" />" << std::endl;
22695  if (sub == 4)
22696  htmlFileR << " <img src=\"DrecosignalGeneralD2PhiSymmetryHF.png\" />" << std::endl;
22697  htmlFileR << "<br>" << std::endl;
22698 
22699  htmlFileR << "<h3> 2B: D(recosignalvarianceSignalhe) vs phi , averaged over depthes & eta </h3>" << std::endl;
22700  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22701  if (sub == 1)
22702  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHB.png\" />" << std::endl;
22703  if (sub == 2)
22704  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHE.png\" />" << std::endl;
22705  if (sub == 4)
22706  htmlFileR << " <img src=\"DrecosignalGeneralD1PhiSymmetryHF.png\" />" << std::endl;
22707  htmlFileR << "<br>" << std::endl;
22708 
22711  htmlFileR << "<h2> Positive direction, D(recosignalvarianceSignalhe) </h3>" << std::endl;
22712  htmlFileR << "<h3> 2C: D(recosignalvarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
22713  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22714  if (sub == 1)
22715  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22716  if (sub == 2)
22717  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22718  if (sub == 4)
22719  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22720  htmlFileR << "<br>" << std::endl;
22721 
22722  htmlFileR << "<h3> 2.D. D(recosignalvarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
22723  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22724  if (sub == 1)
22725  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22726  if (sub == 2)
22727  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22728  if (sub == 4)
22729  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22730  htmlFileR << "<br>" << std::endl;
22731 
22732  if (sub == 1 || sub == 2)
22733  htmlFileR << "<h3> 2E: D(recosignalvarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
22734  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22735  if (sub == 1)
22736  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22737  if (sub == 2)
22738  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22739  htmlFileR << "<br>" << std::endl;
22740 
22741  if (sub == 1 || sub == 2)
22742  htmlFileR << "<h3> 2F: D(recosignalvarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
22743  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22744  if (sub == 1)
22745  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22746  if (sub == 2)
22747  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22748  htmlFileR << "<br>" << std::endl;
22749 
22750  if (sub == 2)
22751  htmlFileR << "<h3> 2G: D(recosignalvarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
22752  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22753  if (sub == 2)
22754  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22755  htmlFileR << "<br>" << std::endl;
22756 
22757  if (sub == 2)
22758  htmlFileR << "<h3> 2H: D(recosignalvarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
22759  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22760  if (sub == 2)
22761  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22762  htmlFileR << "<br>" << std::endl;
22763 
22764  if (sub == 2)
22765  htmlFileR << "<h3> 2I: D(recosignalvarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
22766  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22767  if (sub == 2)
22768  htmlFileR << " <img src=\"DrecosignalPositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22769  htmlFileR << "<br>" << std::endl;
22770 
22773  htmlFileR << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
22774  << std::endl;
22775 
22777  htmlFileR << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
22778  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22779  if (sub == 1)
22780  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22781  if (sub == 2)
22782  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22783  if (sub == 4)
22784  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22785  htmlFileR << "<br>" << std::endl;
22786 
22787  htmlFileR << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
22788  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22789  if (sub == 1)
22790  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22791  if (sub == 2)
22792  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22793  if (sub == 4)
22794  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22795  htmlFileR << "<br>" << std::endl;
22796 
22797  if (sub == 1 || sub == 2)
22798  htmlFileR << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
22799  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22800  if (sub == 1)
22801  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22802  if (sub == 2)
22803  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22804  htmlFileR << "<br>" << std::endl;
22805 
22806  if (sub == 1 || sub == 2)
22807  htmlFileR << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
22808  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22809  if (sub == 1)
22810  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22811  if (sub == 2)
22812  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22813  htmlFileR << "<br>" << std::endl;
22814 
22815  if (sub == 2)
22816  htmlFileR << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
22817  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22818  if (sub == 2)
22819  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22820  htmlFileR << "<br>" << std::endl;
22821 
22822  if (sub == 2)
22823  htmlFileR << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
22824  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22825  if (sub == 2)
22826  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22827  htmlFileR << "<br>" << std::endl;
22828 
22829  if (sub == 2)
22830  htmlFileR << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
22831  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22832  if (sub == 2)
22833  htmlFileR << " <img src=\"RrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22834  htmlFileR << "<br>" << std::endl;
22835 
22837  htmlFileR << "<h2> 4: Negative direction, D(recosignalvarianceSignalhe) </h3>" << std::endl;
22839  htmlFileR << "<h3> 4C: D(recosignalvarianceSignalhe) vs phi , different eta, Depth1 </h3>" << std::endl;
22840  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22841  if (sub == 1)
22842  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22843  if (sub == 2)
22844  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22845  if (sub == 4)
22846  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22847  htmlFileR << "<br>" << std::endl;
22848 
22849  htmlFileR << "<h3> 4.D. D(recosignalvarianceSignalhe) vs phi , different eta, Depth2 </h3>" << std::endl;
22850  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22851  if (sub == 1)
22852  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22853  if (sub == 2)
22854  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22855  if (sub == 4)
22856  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22857  htmlFileR << "<br>" << std::endl;
22858 
22859  if (sub == 1 || sub == 2)
22860  htmlFileR << "<h3> 4E: D(recosignalvarianceSignalhe) vs phi , different eta, Depth3 </h3>" << std::endl;
22861  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22862  if (sub == 1)
22863  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22864  if (sub == 2)
22865  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22866  htmlFileR << "<br>" << std::endl;
22867 
22868  if (sub == 1 || sub == 2)
22869  htmlFileR << "<h3> 4F: D(recosignalvarianceSignalhe) vs phi , different eta, Depth4 </h3>" << std::endl;
22870  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22871  if (sub == 1)
22872  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22873  if (sub == 2)
22874  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22875  htmlFileR << "<br>" << std::endl;
22876 
22877  if (sub == 2)
22878  htmlFileR << "<h3> 4G: D(recosignalvarianceSignalhe) vs phi , different eta, Depth5 </h3>" << std::endl;
22879  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22880  if (sub == 2)
22881  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
22882  htmlFileR << "<br>" << std::endl;
22883 
22884  if (sub == 2)
22885  htmlFileR << "<h3> 4H: D(recosignalvarianceSignalhe) vs phi , different eta, Depth6 </h3>" << std::endl;
22886  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22887  if (sub == 2)
22888  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
22889  htmlFileR << "<br>" << std::endl;
22890 
22891  if (sub == 2)
22892  htmlFileR << "<h3> 4I: D(recosignalvarianceSignalhe) vs phi , different eta, Depth7 </h3>" << std::endl;
22893  // htmlFileR << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22894  if (sub == 2)
22895  htmlFileR << " <img src=\"DrecosignalNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
22896  htmlFileR << "<br>" << std::endl;
22898  htmlFileR.close();
22900  //
22904 
22905  htmlFileN << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
22906  htmlFileN << "<head>" << std::endl;
22907  htmlFileN << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
22908  htmlFileN << "<title> Remote Monitoring Tool </title>" << std::endl;
22909  htmlFileN << "<style type=\"text/css\">" << std::endl;
22910  htmlFileN << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
22911  << std::endl;
22912  htmlFileN << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
22913  htmlFileN << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
22914  "text-align: center;}"
22915  << std::endl;
22916  htmlFileN << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
22917  htmlFileN << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
22918  htmlFileN << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
22919  htmlFileN << "</style>" << std::endl;
22920  htmlFileN << "<body>" << std::endl;
22921 
22923 
22924  if (sub == 1)
22925  htmlFileN << "<h1> Phi-symmetry for Calibration Group, HB, RUN = " << runnumber << " </h1>" << std::endl;
22926  if (sub == 2)
22927  htmlFileN << "<h1> Phi-symmetry for Calibration Group, HE, RUN = " << runnumber << " </h1>" << std::endl;
22928  if (sub == 4)
22929  htmlFileN << "<h1> Phi-symmetry for Calibration Group, HF, RUN = " << runnumber << " </h1>" << std::endl;
22930  htmlFileN << "<br>" << std::endl;
22931 
22932  htmlFileN << "<h2> 1: R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
22933  htmlFileN << "<h3> 1A: eta/phi-plot: R, averaged over depthes </h3>" << std::endl;
22934  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
22935  if (sub == 1)
22936  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
22937  if (sub == 2)
22938  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
22939  if (sub == 4)
22940  htmlFileN << " <img src=\"RreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
22941  htmlFileN << "<br>" << std::endl;
22942 
22943  htmlFileN << "<h3> 1B: R vs phi , averaged over depthes & eta </h3>" << std::endl;
22944  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22945  if (sub == 1)
22946  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
22947  if (sub == 2)
22948  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
22949  if (sub == 4)
22950  htmlFileN << " <img src=\"RreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
22951  htmlFileN << "<br>" << std::endl;
22952 
22954 
22956  htmlFileN << "<h2> Positive direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>" << std::endl;
22957  htmlFileN << "<h3> 1C: R vs phi , different eta, Depth1 </h3>" << std::endl;
22958  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22959  if (sub == 1)
22960  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
22961  if (sub == 2)
22962  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
22963  if (sub == 4)
22964  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
22965  htmlFileN << "<br>" << std::endl;
22966 
22967  htmlFileN << "<h3> 1D: R vs phi , different eta, Depth2 </h3>" << std::endl;
22968  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22969  if (sub == 1)
22970  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
22971  if (sub == 2)
22972  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
22973  if (sub == 4)
22974  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
22975  htmlFileN << "<br>" << std::endl;
22976 
22977  if (sub == 1 || sub == 2)
22978  htmlFileN << "<h3> 1E: R vs phi , different eta, Depth3 </h3>" << std::endl;
22979  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22980  if (sub == 1)
22981  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
22982  if (sub == 2)
22983  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
22984  htmlFileN << "<br>" << std::endl;
22985 
22986  if (sub == 1 || sub == 2)
22987  htmlFileN << "<h3> 1F: R vs phi , different eta, Depth4 </h3>" << std::endl;
22988  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22989  if (sub == 1)
22990  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
22991  if (sub == 2)
22992  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
22993  htmlFileN << "<br>" << std::endl;
22994 
22995  if (sub == 2)
22996  htmlFileN << "<h3> 1G: R vs phi , different eta, Depth5 </h3>" << std::endl;
22997  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
22998  if (sub == 2)
22999  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23000  htmlFileN << "<br>" << std::endl;
23001 
23002  if (sub == 2)
23003  htmlFileN << "<h3> 1H: R vs phi , different eta, Depth6 </h3>" << std::endl;
23004  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23005  if (sub == 2)
23006  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23007  htmlFileN << "<br>" << std::endl;
23008 
23009  if (sub == 2)
23010  htmlFileN << "<h3> 1I: R vs phi , different eta, Depth7 </h3>" << std::endl;
23011  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23012  if (sub == 2)
23013  htmlFileN << " <img src=\"RreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23014  htmlFileN << "<br>" << std::endl;
23015 
23017  htmlFileN << "<h2> 2: D(reconoisevarianceNoisehe) </h3>" << std::endl;
23018  htmlFileN << "<h3> 2A: eta/phi-plot: D(reconoisevarianceNoisehe), averaged over depthes </h3>" << std::endl;
23019  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23020  if (sub == 1)
23021  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23022  if (sub == 2)
23023  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23024  if (sub == 4)
23025  htmlFileN << " <img src=\"DreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23026  htmlFileN << "<br>" << std::endl;
23027 
23028  htmlFileN << "<h3> 2B: D(reconoisevarianceNoisehe) vs phi , averaged over depthes & eta </h3>" << std::endl;
23029  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23030  if (sub == 1)
23031  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23032  if (sub == 2)
23033  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23034  if (sub == 4)
23035  htmlFileN << " <img src=\"DreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23036  htmlFileN << "<br>" << std::endl;
23037 
23040  htmlFileN << "<h2> Positive direction, D(reconoisevarianceNoisehe) </h3>" << std::endl;
23041  htmlFileN << "<h3> 2C: D(reconoisevarianceNoisehe) vs phi , different eta, Depth1 </h3>" << std::endl;
23042  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23043  if (sub == 1)
23044  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23045  if (sub == 2)
23046  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23047  if (sub == 4)
23048  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23049  htmlFileN << "<br>" << std::endl;
23050 
23051  htmlFileN << "<h3> 2.D. D(reconoisevarianceNoisehe) vs phi , different eta, Depth2 </h3>" << std::endl;
23052  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23053  if (sub == 1)
23054  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23055  if (sub == 2)
23056  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23057  if (sub == 4)
23058  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23059  htmlFileN << "<br>" << std::endl;
23060 
23061  if (sub == 1 || sub == 2)
23062  htmlFileN << "<h3> 2E: D(reconoisevarianceNoisehe) vs phi , different eta, Depth3 </h3>" << std::endl;
23063  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23064  if (sub == 1)
23065  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23066  if (sub == 2)
23067  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23068  htmlFileN << "<br>" << std::endl;
23069 
23070  if (sub == 1 || sub == 2)
23071  htmlFileN << "<h3> 2F: D(reconoisevarianceNoisehe) vs phi , different eta, Depth4 </h3>" << std::endl;
23072  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23073  if (sub == 1)
23074  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23075  if (sub == 2)
23076  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23077  htmlFileN << "<br>" << std::endl;
23078 
23079  if (sub == 2)
23080  htmlFileN << "<h3> 2G: D(reconoisevarianceNoisehe) vs phi , different eta, Depth5 </h3>" << std::endl;
23081  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23082  if (sub == 2)
23083  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23084  htmlFileN << "<br>" << std::endl;
23085 
23086  if (sub == 2)
23087  htmlFileN << "<h3> 2H: D(reconoisevarianceNoisehe) vs phi , different eta, Depth6 </h3>" << std::endl;
23088  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23089  if (sub == 2)
23090  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23091  htmlFileN << "<br>" << std::endl;
23092 
23093  if (sub == 2)
23094  htmlFileN << "<h3> 2I: D(reconoisevarianceNoisehe) vs phi , different eta, Depth7 </h3>" << std::endl;
23095  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23096  if (sub == 2)
23097  htmlFileN << " <img src=\"DreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23098  htmlFileN << "<br>" << std::endl;
23099 
23102  htmlFileN << "<h2> 3: Negative direction, R = R_depth_ieta_iphi = E_depth_ieta_iphi/E_depth_ieta </h3>"
23103  << std::endl;
23104 
23106  htmlFileN << "<h3> 3C: R vs phi , different eta, Depth1 </h3>" << std::endl;
23107  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23108  if (sub == 1)
23109  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23110  if (sub == 2)
23111  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23112  if (sub == 4)
23113  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23114  htmlFileN << "<br>" << std::endl;
23115 
23116  htmlFileN << "<h3> 3D: R vs phi , different eta, Depth2 </h3>" << std::endl;
23117  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23118  if (sub == 1)
23119  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23120  if (sub == 2)
23121  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23122  if (sub == 4)
23123  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23124  htmlFileN << "<br>" << std::endl;
23125 
23126  if (sub == 1 || sub == 2)
23127  htmlFileN << "<h3> 3E: R vs phi , different eta, Depth3 </h3>" << std::endl;
23128  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23129  if (sub == 1)
23130  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23131  if (sub == 2)
23132  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23133  htmlFileN << "<br>" << std::endl;
23134 
23135  if (sub == 1 || sub == 2)
23136  htmlFileN << "<h3> 3F: R vs phi , different eta, Depth4 </h3>" << std::endl;
23137  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23138  if (sub == 1)
23139  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23140  if (sub == 2)
23141  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23142  htmlFileN << "<br>" << std::endl;
23143 
23144  if (sub == 2)
23145  htmlFileN << "<h3> 3G: R vs phi , different eta, Depth5 </h3>" << std::endl;
23146  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23147  if (sub == 2)
23148  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23149  htmlFileN << "<br>" << std::endl;
23150 
23151  if (sub == 2)
23152  htmlFileN << "<h3> 3H: R vs phi , different eta, Depth6 </h3>" << std::endl;
23153  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23154  if (sub == 2)
23155  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23156  htmlFileN << "<br>" << std::endl;
23157 
23158  if (sub == 2)
23159  htmlFileN << "<h3> 3I: R vs phi , different eta, Depth7 </h3>" << std::endl;
23160  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23161  if (sub == 2)
23162  htmlFileN << " <img src=\"RreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23163  htmlFileN << "<br>" << std::endl;
23164 
23166  htmlFileN << "<h2> 4: Negative direction, D(reconoisevarianceNoisehe) </h3>" << std::endl;
23168  htmlFileN << "<h3> 4C: D(reconoisevarianceNoisehe) vs phi , different eta, Depth1 </h3>" << std::endl;
23169  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23170  if (sub == 1)
23171  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23172  if (sub == 2)
23173  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23174  if (sub == 4)
23175  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23176  htmlFileN << "<br>" << std::endl;
23177 
23178  htmlFileN << "<h3> 4.D. D(reconoisevarianceNoisehe) vs phi , different eta, Depth2 </h3>" << std::endl;
23179  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23180  if (sub == 1)
23181  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23182  if (sub == 2)
23183  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23184  if (sub == 4)
23185  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23186  htmlFileN << "<br>" << std::endl;
23187 
23188  if (sub == 1 || sub == 2)
23189  htmlFileN << "<h3> 4E: D(reconoisevarianceNoisehe) vs phi , different eta, Depth3 </h3>" << std::endl;
23190  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23191  if (sub == 1)
23192  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23193  if (sub == 2)
23194  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23195  htmlFileN << "<br>" << std::endl;
23196 
23197  if (sub == 1 || sub == 2)
23198  htmlFileN << "<h3> 4F: D(reconoisevarianceNoisehe) vs phi , different eta, Depth4 </h3>" << std::endl;
23199  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23200  if (sub == 1)
23201  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23202  if (sub == 2)
23203  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23204  htmlFileN << "<br>" << std::endl;
23205 
23206  if (sub == 2)
23207  htmlFileN << "<h3> 4G: D(reconoisevarianceNoisehe) vs phi , different eta, Depth5 </h3>" << std::endl;
23208  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23209  if (sub == 2)
23210  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23211  htmlFileN << "<br>" << std::endl;
23212 
23213  if (sub == 2)
23214  htmlFileN << "<h3> 4H: D(reconoisevarianceNoisehe) vs phi , different eta, Depth6 </h3>" << std::endl;
23215  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23216  if (sub == 2)
23217  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23218  htmlFileN << "<br>" << std::endl;
23219 
23220  if (sub == 2)
23221  htmlFileN << "<h3> 4I: D(reconoisevarianceNoisehe) vs phi , different eta, Depth7 </h3>" << std::endl;
23222  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23223  if (sub == 2)
23224  htmlFileN << " <img src=\"DreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23225  htmlFileN << "<br>" << std::endl;
23227 
23229 
23230  if (sub == 1)
23231  htmlFileN << "<h1> Only for Noise RecHits these lines below, HB, RUN = " << runnumber << " </h1>" << std::endl;
23232  if (sub == 2)
23233  htmlFileN << "<h1> Only for Noise RecHits these lines below, HE, RUN = " << runnumber << " </h1>" << std::endl;
23234  if (sub == 4)
23235  htmlFileN << "<h1> Only for Noise RecHits these lines below, HF, RUN = " << runnumber << " </h1>" << std::endl;
23236  htmlFileN << "<br>" << std::endl;
23237 
23238  htmlFileN << "<h2> 5: DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>" << std::endl;
23239  htmlFileN << "<h3> 5A: eta/phi-plot: DIF, averaged over depthes </h3>" << std::endl;
23240  // htmlFileN << "<h4> Legend: Bins less "<<Pedest[0][sub]<<" correpond to bad Pedestals </h4>"<< std::endl;
23241  if (sub == 1)
23242  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHB.png\" />" << std::endl;
23243  if (sub == 2)
23244  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHE.png\" />" << std::endl;
23245  if (sub == 4)
23246  htmlFileN << " <img src=\"DIFreconoiseGeneralD2PhiSymmetryHF.png\" />" << std::endl;
23247  htmlFileN << "<br>" << std::endl;
23248 
23249  htmlFileN << "<h3> 5B: DIF vs phi , averaged over depthes & eta </h3>" << std::endl;
23250  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23251  if (sub == 1)
23252  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHB.png\" />" << std::endl;
23253  if (sub == 2)
23254  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHE.png\" />" << std::endl;
23255  if (sub == 4)
23256  htmlFileN << " <img src=\"DIFreconoiseGeneralD1PhiSymmetryHF.png\" />" << std::endl;
23257  htmlFileN << "<br>" << std::endl;
23258 
23260 
23262  htmlFileN << "<h2> Positive direction, DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>"
23263  << std::endl;
23264  htmlFileN << "<h3> 5C: DIF vs phi , different eta, Depth1 </h3>" << std::endl;
23265  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23266  if (sub == 1)
23267  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23268  if (sub == 2)
23269  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23270  if (sub == 4)
23271  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23272  htmlFileN << "<br>" << std::endl;
23273 
23274  htmlFileN << "<h3> 5D: DIF vs phi , different eta, Depth2 </h3>" << std::endl;
23275  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23276  if (sub == 1)
23277  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23278  if (sub == 2)
23279  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23280  if (sub == 4)
23281  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23282  htmlFileN << "<br>" << std::endl;
23283 
23284  if (sub == 1 || sub == 2)
23285  htmlFileN << "<h3> 1E: DIF vs phi , different eta, Depth3 </h3>" << std::endl;
23286  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23287  if (sub == 1)
23288  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23289  if (sub == 2)
23290  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23291  htmlFileN << "<br>" << std::endl;
23292 
23293  if (sub == 1 || sub == 2)
23294  htmlFileN << "<h3> 5F: DIF vs phi , different eta, Depth4 </h3>" << std::endl;
23295  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23296  if (sub == 1)
23297  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23298  if (sub == 2)
23299  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23300  htmlFileN << "<br>" << std::endl;
23301 
23302  if (sub == 2)
23303  htmlFileN << "<h3> 5G: DIF vs phi , different eta, Depth5 </h3>" << std::endl;
23304  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23305  if (sub == 2)
23306  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23307  htmlFileN << "<br>" << std::endl;
23308 
23309  if (sub == 2)
23310  htmlFileN << "<h3> 5H: DIF vs phi , different eta, Depth6 </h3>" << std::endl;
23311  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23312  if (sub == 2)
23313  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23314  htmlFileN << "<br>" << std::endl;
23315 
23316  if (sub == 2)
23317  htmlFileN << "<h3> 5I: DIF vs phi , different eta, Depth7 </h3>" << std::endl;
23318  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23319  if (sub == 2)
23320  htmlFileN << " <img src=\"DIFreconoisePositiveDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23321  htmlFileN << "<br>" << std::endl;
23322 
23324 
23326  htmlFileN << "<h2> Negative direction, DIF = DIF_depth_ieta_iphi = E_depth_ieta_iphi - E_depth_ieta </h3>"
23327  << std::endl;
23328  htmlFileN << "<h3> 5C: DIF vs phi , different eta, Depth1 </h3>" << std::endl;
23329  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23330  if (sub == 1)
23331  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HB.png\" />" << std::endl;
23332  if (sub == 2)
23333  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HE.png\" />" << std::endl;
23334  if (sub == 4)
23335  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth1HF.png\" />" << std::endl;
23336  htmlFileN << "<br>" << std::endl;
23337 
23338  htmlFileN << "<h3> 5D: DIF vs phi , different eta, Depth2 </h3>" << std::endl;
23339  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23340  if (sub == 1)
23341  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HB.png\" />" << std::endl;
23342  if (sub == 2)
23343  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HE.png\" />" << std::endl;
23344  if (sub == 4)
23345  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth2HF.png\" />" << std::endl;
23346  htmlFileN << "<br>" << std::endl;
23347 
23348  if (sub == 1 || sub == 2)
23349  htmlFileN << "<h3> 5E: DIF vs phi , different eta, Depth3 </h3>" << std::endl;
23350  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23351  if (sub == 1)
23352  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HB.png\" />" << std::endl;
23353  if (sub == 2)
23354  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth3HE.png\" />" << std::endl;
23355  htmlFileN << "<br>" << std::endl;
23356 
23357  if (sub == 1 || sub == 2)
23358  htmlFileN << "<h3> 5F: DIF vs phi , different eta, Depth4 </h3>" << std::endl;
23359  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23360  if (sub == 1)
23361  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HB.png\" />" << std::endl;
23362  if (sub == 2)
23363  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth4HE.png\" />" << std::endl;
23364  htmlFileN << "<br>" << std::endl;
23365 
23366  if (sub == 2)
23367  htmlFileN << "<h3> 5G: DIF vs phi , different eta, Depth5 </h3>" << std::endl;
23368  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23369  if (sub == 2)
23370  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth5HE.png\" />" << std::endl;
23371  htmlFileN << "<br>" << std::endl;
23372 
23373  if (sub == 2)
23374  htmlFileN << "<h3> 5H: DIF vs phi , different eta, Depth6 </h3>" << std::endl;
23375  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23376  if (sub == 2)
23377  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth6HE.png\" />" << std::endl;
23378  htmlFileN << "<br>" << std::endl;
23379 
23380  if (sub == 2)
23381  htmlFileN << "<h3> 5I: DIF vs phi , different eta, Depth7 </h3>" << std::endl;
23382  // htmlFileN << "<h4> Channel legend: white - good, other colour - bad. </h4>"<< std::endl;
23383  if (sub == 2)
23384  htmlFileN << " <img src=\"DIFreconoiseNegativeDirectionhistD1PhiSymmetryDepth7HE.png\" />" << std::endl;
23385  htmlFileN << "<br>" << std::endl;
23386 
23388 
23389  //
23390  //
23391  htmlFileN.close();
23392 
23395 
23396  //
23397  //
23398  } // end sub //for (int sub=1;sub<=4;sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
23399 
23400  //======================================================================
23401 
23402  std::cout << "********" << std::endl;
23403  std::cout << "************ Start creating subdet html pages: - rather long time needed, waiting please"
23404  << std::endl;
23405  //======================================================================
23406  // Creating subdet html pages:
23407 
23408  for (int sub = 1; sub <= 4; sub++) { //Subdetector: 1-HB, 2-HE, 3-HF, 4-HO
23409  ofstream htmlFile;
23410  if (sub == 1)
23411  htmlFile.open("HB.html");
23412  if (sub == 2)
23413  htmlFile.open("HE.html");
23414  if (sub == 3)
23415  htmlFile.open("HO.html");
23416  if (sub == 4)
23417  htmlFile.open("HF.html");
23418 
23419  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
23420  htmlFile << "<head>" << std::endl;
23421  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
23422  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
23423  htmlFile << "<style type=\"text/css\">" << std::endl;
23424  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
23425  << std::endl;
23426  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
23427  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
23428  "text-align: center;}"
23429  << std::endl;
23430  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
23431  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
23432  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
23433  htmlFile << " td.s5 { font-family: arial, arial ce, helvetica; background-color: #FF00FF; }" << std::endl;
23434  htmlFile << " td.s6 { font-family: arial, arial ce, helvetica; background-color: #9ACD32; }" << std::endl;
23435  htmlFile << " td.s7 { font-family: arial, arial ce, helvetica; background-color: #32CD32; }" << std::endl;
23436  htmlFile << " td.s8 { font-family: arial, arial ce, helvetica; background-color: #00FFFF; }" << std::endl;
23437  htmlFile << " td.s9 { font-family: arial, arial ce, helvetica; background-color: #FFE4E1; }" << std::endl;
23438  htmlFile << " td.s10 { font-family: arial, arial ce, helvetica; background-color: #A0522D; }" << std::endl;
23439  htmlFile << " td.s11 { font-family: arial, arial ce, helvetica; background-color: #1E90FF; }" << std::endl;
23440  htmlFile << " td.s12 { font-family: arial, arial ce, helvetica; background-color: #00BFFF; }" << std::endl;
23441  htmlFile << " td.s13 { font-family: arial, arial ce, helvetica; background-color: #FFFF00; }" << std::endl;
23442  htmlFile << " td.s14 { font-family: arial, arial ce, helvetica; background-color: #B8860B; }" << std::endl;
23443  htmlFile << "</style>" << std::endl;
23444  htmlFile << "<body>" << std::endl;
23445  if (sub == 1)
23446  htmlFile << "<h1> HCAL BARREL, RUN = " << runnumber << " </h1>" << std::endl;
23447  if (sub == 2)
23448  htmlFile << "<h1> HCAL ENDCAP, RUN = " << runnumber << " </h1>" << std::endl;
23449  if (sub == 3)
23450  htmlFile << "<h1> HCAL OUTER, RUN = " << runnumber << " </h1>" << std::endl;
23451  if (sub == 4)
23452  htmlFile << "<h1> HCAL FORWARD, RUN = " << runnumber << " </h1>" << std::endl;
23453  htmlFile << "<br>" << std::endl;
23454  if (sub == 1)
23455  htmlFile << "<h2> 1. Analysis results for HB</h2>" << std::endl;
23456  if (sub == 2)
23457  htmlFile << "<h2> 1. Analysis results for HE</h2>" << std::endl;
23458  if (sub == 3)
23459  htmlFile << "<h2> 1. Analysis results for HO</h2>" << std::endl;
23460  if (sub == 4)
23461  htmlFile << "<h2> 1. Analysis results for HF</h2>" << std::endl;
23462  htmlFile << "<table width=\"600\">" << std::endl;
23463  htmlFile << "<tr>" << std::endl;
23464 
23465  if (sub == 1) {
23466  /*
23467  htmlFile << " <td><a href=\"HB_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23468  htmlFile << " <td><a href=\"HB_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23469  htmlFile << " <td><a href=\"HB_Drift.html\">Gain Stability</a></td>"<< std::endl;
23470  htmlFile << " <td><a href=\"HB_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23471  htmlFile << " <td><a href=\"HB_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23472  htmlFile << " <td><a href=\"HB_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>"<< std::endl;
23473  htmlFile << " <td><a href=\"HB_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>"<< std::endl;
23474  htmlFile << " <td><a href=\"HB_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>"<< std::endl;
23475 */
23476 
23477  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23478  << runnumber << "/HB_Tile.html\">Megatile Channels</a></td>" << std::endl;
23479  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23480  << runnumber << "/HB_Calib.html\">Calibration Channels</a></td>" << std::endl;
23481  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23482  << runnumber << "/HB_Drift.html\">Gain Stability</a></td>" << std::endl;
23483  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23484  << runnumber << "/HB_Pedestals.html\">Pedestals</a></td>" << std::endl;
23485  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23486  << runnumber << "/HB_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23487  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23488  << runnumber << "/HB_PhiSymmetryDigi.html\">Phi-SymmetryDigi</a></td>" << std::endl;
23489  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23490  << runnumber << "/HB_PhiSymmetryRecoSignal.html\">Phi-SymmetryRecoSignal</a></td>" << std::endl;
23491  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23492  << runnumber << "/HB_PhiSymmetryRecoNoise.html\">Phi-SymmetryRecoNoise</a></td>" << std::endl;
23493  }
23494  if (sub == 2) {
23495  /*
23496  htmlFile << " <td><a href=\"HE_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23497  htmlFile << " <td><a href=\"HE_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23498  htmlFile << " <td><a href=\"HE_Drift.html\">Gain Stability</a></td>"<< std::endl;
23499  htmlFile << " <td><a href=\"HE_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23500  htmlFile << " <td><a href=\"HE_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23501  htmlFile << " <td><a href=\"HE_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>"<< std::endl;
23502  htmlFile << " <td><a href=\"HE_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>"<< std::endl;
23503  htmlFile << " <td><a href=\"HE_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>"<< std::endl;
23504  */
23505 
23506  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23507  << runnumber << "/HE_Tile.html\">Megatile Channels</a></td>" << std::endl;
23508  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23509  << runnumber << "/HE_Calib.html\">Calibration Channels</a></td>" << std::endl;
23510  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23511  << runnumber << "/HE_Drift.html\">Gain Stability</a></td>" << std::endl;
23512  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23513  << runnumber << "/HE_Pedestals.html\">Pedestals</a></td>" << std::endl;
23514  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23515  << runnumber << "/HE_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23516  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23517  << runnumber << "/HE_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>" << std::endl;
23518  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23519  << runnumber << "/HE_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>" << std::endl;
23520  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23521  << runnumber << "/HE_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>" << std::endl;
23522  }
23523  if (sub == 3) {
23524  /*
23525  htmlFile << " <td><a href=\"HO_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23526  htmlFile << " <td><a href=\"HO_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23527  htmlFile << " <td><a href=\"HO_Drift.html\">Gain Stability</a></td>"<< std::endl;
23528  htmlFile << " <td><a href=\"HO_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23529  htmlFile << " <td><a href=\"HO_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23530  */
23531  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23532  << runnumber << "/HO_Tile.html\">Megatile Channels</a></td>" << std::endl;
23533  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23534  << runnumber << "/HO_Calib.html\">Calibration Channels</a></td>" << std::endl;
23535  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23536  << runnumber << "/HO_Drift.html\">Gain Stability</a></td>" << std::endl;
23537  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23538  << runnumber << "/HO_Pedestals.html\">Pedestals</a></td>" << std::endl;
23539  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23540  << runnumber << "/HO_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23541  }
23542 
23543  if (sub == 4) {
23544  /*
23545  htmlFile << " <td><a href=\"HF_Tile.html\">Megatile Channels</a></td>"<< std::endl;
23546  htmlFile << " <td><a href=\"HF_Calib.html\">Calibration Channels</a></td>"<< std::endl;
23547  htmlFile << " <td><a href=\"HF_Drift.html\">Gain Stability</a></td>"<< std::endl;
23548  htmlFile << " <td><a href=\"HF_Pedestals.html\">Pedestals</a></td>"<< std::endl;
23549  htmlFile << " <td><a href=\"HF_Shapes.html\">ADC Shapes</a></td>"<< std::endl;
23550  htmlFile << " <td><a href=\"HF_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>"<< std::endl;
23551  htmlFile << " <td><a href=\"HF_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>"<< std::endl;
23552  htmlFile << " <td><a href=\"HF_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>"<< std::endl;
23553  */
23554 
23555  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23556  << runnumber << "/HF_Tile.html\">Megatile Channels</a></td>" << std::endl;
23557  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23558  << runnumber << "/HF_Calib.html\">Calibration Channels</a></td>" << std::endl;
23559  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23560  << runnumber << "/HF_Drift.html\">Gain Stability</a></td>" << std::endl;
23561  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23562  << runnumber << "/HF_Pedestals.html\">Pedestals</a></td>" << std::endl;
23563  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23564  << runnumber << "/HF_Shapes.html\">ADC Shapes</a></td>" << std::endl;
23565  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23566  << runnumber << "/HF_PhiSymmetryDigi.html\">Phi-symmetryDigi</a></td>" << std::endl;
23567  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23568  << runnumber << "/HF_PhiSymmetryRecoSignal.html\">Phi-symmetryRecoSignal</a></td>" << std::endl;
23569  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23570  << runnumber << "/HF_PhiSymmetryRecoNoise.html\">Phi-symmetryRecoNoise</a></td>" << std::endl;
23571  }
23572 
23573  htmlFile << "</tr>" << std::endl;
23574  htmlFile << "</table>" << std::endl;
23575  htmlFile << "<br>" << std::endl;
23576 
23577  htmlFile << "</body> " << std::endl;
23578  htmlFile << "</html> " << std::endl;
23579  htmlFile.close();
23580  }
23581 
23582  //======================================================================
23583 
23584  std::cout << "********" << std::endl;
23585  std::cout << "************ Start creating description HELP html file:" << std::endl;
23586  //======================================================================
23587  // Creating description html file:
23588  ofstream htmlFile;
23589  htmlFile.open("HELP.html");
23590  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
23591  htmlFile << "<head>" << std::endl;
23592  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
23593  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
23594  htmlFile << "<style type=\"text/css\">" << std::endl;
23595  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
23596  << std::endl;
23597  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
23598  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
23599  "text-align: center;}"
23600  << std::endl;
23601  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
23602  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
23603  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
23604  htmlFile << "</style>" << std::endl;
23605  htmlFile << "<body>" << std::endl;
23606  htmlFile << "<h1> Description of Remote Monitoring Tool criteria for bad channel selection</h1>" << std::endl;
23607  htmlFile << "<br>" << std::endl;
23608  htmlFile << "<h3> - C means CAPID Errors assuming we inspect CAPID non-rotation,error & validation bits, and for "
23609  "this criterion - no need to apply any cuts to select bcs.</h3> "
23610  << std::endl;
23611  htmlFile << "<br>" << std::endl;
23612  htmlFile << "<h3> - A means full amplitude, collected over all time slices </h3> " << std::endl;
23613  htmlFile << "<h3> - R means ratio criterion where we define as a bad, the channels, for which the signal portion in "
23614  "4 middle TSs(plus one, minus two around TS with maximal amplitude) is out of some range of reasonable "
23615  "values </h3> "
23616  << std::endl;
23617  htmlFile << "<br>" << std::endl;
23618  htmlFile << "<h3> - W means width of shape distribution. Width is defined as square root from dispersion. </h3> "
23619  << std::endl;
23620  htmlFile << "<br>" << std::endl;
23621  htmlFile << "<h3> - TN means mean time position of adc signal. </h3> " << std::endl;
23622  htmlFile << "<br>" << std::endl;
23623  htmlFile << "<h3> - TX means TS number of maximum signal </h3> " << std::endl;
23624  htmlFile << "<br>" << std::endl;
23625  htmlFile << "<h3> - m means megatile channels. For example Am means Amplitude criteria for megatile channels </h3> "
23626  << std::endl;
23627  htmlFile << "<br>" << std::endl;
23628  htmlFile
23629  << "<h3> - c means calibration channels. For example Ac means Amplitude criteria for calibration channels </h3> "
23630  << std::endl;
23631  htmlFile << "<br>" << std::endl;
23632  htmlFile << "<h3> - Pm means Pedestals. </h3> " << std::endl;
23633  htmlFile << "<br>" << std::endl;
23634  htmlFile << "<h3> - pWm means pedestal Width. </h3> " << std::endl;
23635  htmlFile << "<br>" << std::endl;
23636  htmlFile << "</body> " << std::endl;
23637  htmlFile << "</html> " << std::endl;
23638  htmlFile.close();
23639 
23640  //======================================================================
23641 
23642  std::cout << "********" << std::endl;
23643  std::cout << "************ Start creating MAP html file: - rather long time needed, waiting please" << std::endl;
23644  //======================================================================
23645  // Creating main html file:
23646  htmlFile.open("MAP.html");
23647  htmlFile << "</html><html xmlns=\"http://www.w3.org/1999/xhtml\">" << std::endl;
23648  htmlFile << "<head>" << std::endl;
23649  htmlFile << "<meta http-equiv=\"Content-Type\" content=\"text/html\"/>" << std::endl;
23650  htmlFile << "<title> Remote Monitoring Tool </title>" << std::endl;
23651  htmlFile << "<style type=\"text/css\">" << std::endl;
23652  htmlFile << " body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"
23653  << std::endl;
23654  htmlFile << " td.s0 { font-family: arial, arial ce, helvetica; }" << std::endl;
23655  htmlFile << " td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; "
23656  "text-align: center;}"
23657  << std::endl;
23658  htmlFile << " td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }" << std::endl;
23659  htmlFile << " td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }" << std::endl;
23660  htmlFile << " td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }" << std::endl;
23661  htmlFile << " td.s5 { font-family: arial, arial ce, helvetica; background-color: #FF00FF; }" << std::endl;
23662  htmlFile << " td.s6 { font-family: arial, arial ce, helvetica; background-color: #9ACD32; }" << std::endl;
23663  htmlFile << " td.s7 { font-family: arial, arial ce, helvetica; background-color: #32CD32; }" << std::endl;
23664  htmlFile << "</style>" << std::endl;
23665  htmlFile << "<body>" << std::endl;
23666 
23667  htmlFile << "<h1> Remote Monitoring Tool, RUN = " << runnumber << ". </h1>" << std::endl;
23668  htmlFile << "<br>" << std::endl;
23669 
23670  htmlFile << "<h2> 1. Analysis results for subdetectors </h2>" << std::endl;
23671  htmlFile << "<table width=\"400\">" << std::endl;
23672  htmlFile << "<tr>" << std::endl;
23673 
23674  /*
23675  htmlFile << " <td><a href=\"HB.html\">HB</a></td>"<< std::endl;
23676  htmlFile << " <td><a href=\"HE.html\">HE</a></td>"<< std::endl;
23677  htmlFile << " <td><a href=\"HO.html\">HO</a></td>"<< std::endl;
23678  htmlFile << " <td><a href=\"HF.html\">HF</a></td>"<< std::endl;
23679 */
23680  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23681  << runnumber << "/HB.html\">HB</a></td>" << std::endl;
23682  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23683  << runnumber << "/HE.html\">HE</a></td>" << std::endl;
23684  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23685  << runnumber << "/HO.html\">HO</a></td>" << std::endl;
23686  htmlFile << " <td><a href=\"https://cms-conddb.cern.ch/eosweb/hcal/HcalRemoteMonitoring/GlobalPSM/GLOBAL_"
23687  << runnumber << "/HF.html\">HF</a></td>" << std::endl;
23688 
23689  htmlFile << "</tr>" << std::endl;
23690  htmlFile << "</table>" << std::endl;
23691  htmlFile << "<br>" << std::endl;
23692 
23693  htmlFile << "</body> " << std::endl;
23694  htmlFile << "</html> " << std::endl;
23695  htmlFile.close();
23696  //======================================================================
23697 
23698  //======================================================================
23699  // Close and delete all possible things:
23700  hfile->Close();
23701  // hfile->Delete();
23702  // Exit Root
23703  gSystem->Exit(0);
23704  //======================================================================
23705 }
const int nphi
#define MAX(n, d)
Definition: nnet_common.h:9
#define MIN(n, d)
Definition: nnet_common.h:8
const int nsub
const int neta
string fname
main script
float x
const int ndepth
#define str(s)