5 hGemStripInfo(nullptr),
6 hSiliconStripInfo(nullptr),
7 pEmbSilHitEff(nullptr),
8 pEmbGemHitEff(nullptr),
9 pEffGemStatXY(nullptr),
10 pEffSilStatXY(nullptr),
12 hNhitsEmbReco(nullptr)
14 const Int_t nActiveAnals = 2;
15 for (Int_t iAnal = 0; iAnal < nActiveAnals; iAnal++)
16 isActive[iAnal] = kFALSE;
21 vector <Int_t> naturalGemOrder{11, 10, 5, 6, 8, 9};
23 const Int_t nAnalTypes = 2;
26 pureMc, afterEmbedding
31 hGemStripInfo =
new TH1F****[nAnalTypes];
32 hSiliconStripInfo =
new TH1F****[nAnalTypes];
34 for (Int_t iType = 0; iType < nAnalTypes; iType++) {
38 hGemStripInfo[iType] =
new TH1F***[nStatsGem];
39 hSiliconStripInfo[iType] =
new TH1F***[nStatsSil];
41 TString type = (iType == pureMc) ?
"MC-digits" :
"Digits after embedding";
43 for (Int_t iStat = 0; iStat < nStatsGem; iStat++) {
45 hGemStripInfo[iType][iStat] =
new TH1F**[nMods];
47 for (Int_t iMod = 0; iMod < nMods; iMod++) {
49 hGemStripInfo[iType][iStat][iMod] =
new TH1F*[nLays];
51 for (Int_t iLay = 0; iLay < nLays; iLay++) {
52 hGemStripInfo[iType][iStat][iMod][iLay] =
new TH1F(Form(
"GEM, Type# %d Stat# %d Mod# %d Lay# %d", iType, iStat, iMod, iLay),
53 Form(
"%s, Stat# %d (GEM %d), Mod# %d", type.Data(), iStat, naturalGemOrder[iStat], iMod), 1200, 0., 1200.);
54 hGemStripInfo[iType][iStat][iMod][iLay]->GetXaxis()->SetLabelSize(0.1);
55 hGemStripInfo[iType][iStat][iMod][iLay]->GetYaxis()->SetLabelSize(0.1);
56 hGemStripInfo[iType][iStat][iMod][iLay]->GetXaxis()->SetTitle(
"Strips#");
57 hGemStripInfo[iType][iStat][iMod][iLay]->GetXaxis()->SetTitleOffset(-.28);
58 hGemStripInfo[iType][iStat][iMod][iLay]->GetXaxis()->SetTitleSize(0.15);
59 hGemStripInfo[iType][iStat][iMod][iLay]->GetXaxis()->CenterTitle();
65 for (Int_t iStat = 0; iStat < nStatsSil; iStat++) {
67 hSiliconStripInfo[iType][iStat] =
new TH1F**[nMods];
69 for (Int_t iMod = 0; iMod < nMods; iMod++) {
71 hSiliconStripInfo[iType][iStat][iMod] =
new TH1F*[nLays];
73 for (Int_t iLay = 0; iLay < nLays; iLay++) {
74 hSiliconStripInfo[iType][iStat][iMod][iLay] =
new TH1F(Form(
"SILICON, Type# %d Stat# %d Mod# %d Lay# %d", iType, iStat, iMod, iLay),
75 Form(
"%s, Stat# %d, Mod# %d", type.Data(), iStat, iMod), 700, 0., 700.);
76 hSiliconStripInfo[iType][iStat][iMod][iLay]->GetXaxis()->SetLabelSize(0.1);
77 hSiliconStripInfo[iType][iStat][iMod][iLay]->GetYaxis()->SetLabelSize(0.1);
78 hSiliconStripInfo[iType][iStat][iMod][iLay]->GetXaxis()->SetTitle(
"Strips#");
79 hSiliconStripInfo[iType][iStat][iMod][iLay]->GetXaxis()->SetTitleOffset(-.28);
80 hSiliconStripInfo[iType][iStat][iMod][iLay]->GetXaxis()->SetTitleSize(0.15);
81 hSiliconStripInfo[iType][iStat][iMod][iLay]->GetXaxis()->CenterTitle();
92 const Int_t nSilModsMax = 8;
93 pEmbSilHitEff =
new TProfile2D(
"SILICON eff.",
"SILICON eff.",
SILICON->GetNStations(), 0.,
SILICON->GetNStations(), nSilModsMax, 0, nSilModsMax, 0., 1.);
95 const Int_t nZones = 2;
96 const Int_t nGemModsMax = 2;
97 pEmbGemHitEff =
new TProfile2D*[nZones];
98 TAxis* xAxis = pEmbSilHitEff->GetXaxis();
99 TAxis* yAxis = pEmbSilHitEff->GetYaxis();
101 for (Int_t iBin = 0; iBin <
SILICON->GetNStations(); iBin++)
102 xAxis->SetBinLabel(iBin + 1, Form(
"Stat# %d", iBin));
103 for (Int_t iBin = 0; iBin < nSilModsMax; iBin++)
104 yAxis->SetBinLabel(iBin + 1, Form(
"Mod# %d", iBin));
105 pEmbSilHitEff->GetXaxis()->SetLabelSize(0.07);
106 pEmbSilHitEff->GetYaxis()->SetLabelSize(0.07);
108 pEmbSilHitEff->GetXaxis()->SetTitleSize(0.06);
109 pEmbSilHitEff->GetYaxis()->SetTitleSize(0.06);
111 pEmbSilHitEff->GetXaxis()->SetTitleOffset(.83);
112 pEmbSilHitEff->GetYaxis()->SetTitleOffset(.77);
114 pEmbSilHitEff->SetMarkerSize(2.3);
116 for (Int_t iZone = 0; iZone < nZones; iZone++) {
117 TString zone = (iZone == 0) ?
"Hot Zone" :
"Big Zone";
118 pEmbGemHitEff[iZone] =
new TProfile2D(Form(
"GEM eff., %s", zone.Data()),
119 Form(
"GEM, %s", zone.Data()),
GEM->GetNStations(), 0.,
GEM->GetNStations(), nGemModsMax, 0., nGemModsMax, 0., 1.);
121 xAxis = pEmbGemHitEff[iZone]->GetXaxis();
122 yAxis = pEmbGemHitEff[iZone]->GetYaxis();
124 for (Int_t iBin = 0; iBin <
GEM->GetNStations(); iBin++)
125 xAxis->SetBinLabel(iBin + 1, Form(
"Stat# %d", iBin));
126 for (Int_t iBin = 0; iBin < nGemModsMax; iBin++)
127 yAxis->SetBinLabel(iBin + 1, Form(
"Mod# %d", iBin));
129 pEmbGemHitEff[iZone]->GetXaxis()->SetLabelSize(0.07);
130 pEmbGemHitEff[iZone]->GetYaxis()->SetLabelSize(0.07);
132 pEmbGemHitEff[iZone]->GetXaxis()->SetTitleSize(0.06);
133 pEmbGemHitEff[iZone]->GetYaxis()->SetTitleSize(0.06);
135 pEmbGemHitEff[iZone]->GetXaxis()->SetTitleOffset(.43);
136 pEmbGemHitEff[iZone]->GetYaxis()->SetTitleOffset(.77);
138 pEmbGemHitEff[iZone]->SetMarkerSize(2.3);
141 pEffGemStatXY =
new TProfile2D*[
GEM->GetNStations()];
142 for (Int_t iStat = 0; iStat <
GEM->GetNStations(); iStat++) {
143 pEffGemStatXY[iStat] =
new TProfile2D(Form(
"GEM eff. vs. X and Y, stat# %d", iStat),
144 Form(
"Stat# %d (GEM %d); X [cm]; Y [cm]", iStat, naturalGemOrder[iStat]), 500, -100., +100, 500, -10., +50., 0, 1);
145 pEffGemStatXY[iStat]->GetXaxis()->SetLabelSize(0.07);
146 pEffGemStatXY[iStat]->GetYaxis()->SetLabelSize(0.07);
148 pEffGemStatXY[iStat]->GetXaxis()->SetTitleSize(0.06);
149 pEffGemStatXY[iStat]->GetYaxis()->SetTitleSize(0.06);
151 pEffGemStatXY[iStat]->GetXaxis()->SetTitleOffset(.83);
152 pEffGemStatXY[iStat]->GetYaxis()->SetTitleOffset(.77);
155 pEffSilStatXY =
new TProfile2D*[
SILICON->GetNStations()];
156 for (Int_t iStat = 0; iStat <
SILICON->GetNStations(); iStat++) {
157 Double_t xLow = (iStat == 0) ? -8. : (iStat == 1) ? -8. : -13.;
158 Double_t xUp = -xLow;
160 Double_t yLow = (iStat == 0) ? -12. : (iStat == 1) ? -13. : -20.;
161 Double_t yUp = (iStat == 0) ? +3. : (iStat == 1) ? +4. : +10.;
163 pEffSilStatXY[iStat] =
new TProfile2D(Form(
"SILICON eff. vs. X and Y, stat# %d", iStat),
164 Form(
"Stat# %d; X [cm]; Y [cm]", iStat), 500, xLow, xUp, 500, yLow, yUp, 0., 1.);
165 pEffSilStatXY[iStat]->GetXaxis()->SetLabelSize(0.07);
166 pEffSilStatXY[iStat]->GetYaxis()->SetLabelSize(0.07);
168 pEffSilStatXY[iStat]->GetXaxis()->SetTitleSize(0.06);
169 pEffSilStatXY[iStat]->GetYaxis()->SetTitleSize(0.06);
171 pEffSilStatXY[iStat]->GetXaxis()->SetTitleOffset(.83);
172 pEffSilStatXY[iStat]->GetYaxis()->SetTitleOffset(.77);
175 const Int_t nParts = 2;
176 const TString particles[nParts] = {
"Protons",
"Pions"};
177 const Int_t nCuts = 4;
179 hEtaLambda =
new TH1F**[nParts];
180 hNhitsEmbReco =
new TH2F*[nParts];
182 for (Int_t iPart = 0; iPart < nParts; iPart++) {
183 hEtaLambda[iPart] =
new TH1F*[nCuts];
185 hNhitsEmbReco[iPart] =
new TH2F(Form(
"%s", particles[iPart].Data()),
186 Form(
"%s; Nhits_{reco}; NHits_{emb}", particles[iPart].Data()), 6, 4., 10., 6, 4., 10.);
187 hNhitsEmbReco[iPart]->GetXaxis()->SetLabelSize(0.07);
188 hNhitsEmbReco[iPart]->GetYaxis()->SetLabelSize(0.07);
190 hNhitsEmbReco[iPart]->GetXaxis()->SetTitleSize(0.07);
191 hNhitsEmbReco[iPart]->GetYaxis()->SetTitleSize(0.07);
193 hNhitsEmbReco[iPart]->GetXaxis()->SetTitleOffset(.53);
194 hNhitsEmbReco[iPart]->GetYaxis()->SetTitleOffset(.77);
197 const Int_t nBinsX = 16;
198 const Double_t xLow = 1.;
199 const Double_t xUp = 3.;
201 for (Int_t iCut = 0; iCut < nCuts; iCut++) {
202 hEtaLambda[iPart][iCut] =
new TH1F(Form(
"%s %d", particles[iPart].Data(), iCut),
203 Form(
"%s; #eta_{#Lambda^{0}}; N_{reco} / N_{emb}", particles[iPart].Data()), nBinsX, xLow, xUp);
204 hEtaLambda[iPart][iCut]->GetXaxis()->SetLabelSize(0.07);
205 hEtaLambda[iPart][iCut]->GetYaxis()->SetLabelSize(0.07);
207 hEtaLambda[iPart][iCut]->GetXaxis()->SetTitleSize(0.07);
208 hEtaLambda[iPart][iCut]->GetYaxis()->SetTitleSize(0.07);
210 hEtaLambda[iPart][iCut]->GetXaxis()->SetTitleOffset(-.53);
211 hEtaLambda[iPart][iCut]->GetYaxis()->SetTitleOffset(.77);
213 hEtaLambda[iPart][iCut]->GetYaxis()->SetRangeUser(0., 1.5);
219 gStyle->SetOptStat(0);
220 gStyle->SetTitleFontSize(0.1);
221 gStyle->SetTitleY(1.0);
224 TClonesArray* hPlace =
new TClonesArray(
"HistoPlacement");
227 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"a", 1, 1,
"SILICON", 0, 0, 0);
228 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"a", 1, 2,
"SILICON", 0, 0, 1);
229 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"a", 2, 1,
"SILICON", 1, 0, 0);
230 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"a", 2, 2,
"SILICON", 1, 0, 1);
231 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"a", 3, 1,
"SILICON", 0, 0, 2);
232 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"a", 3, 2,
"SILICON", 0, 0, 3);
233 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"a", 4, 1,
"SILICON", 1, 0, 2);
234 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"a", 4, 2,
"SILICON", 1, 0, 3);
236 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"b", 1, 1,
"SILICON", 0, 1, 0);
237 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"b", 1, 2,
"SILICON", 0, 1, 1);
238 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"b", 2, 1,
"SILICON", 1, 1, 0);
239 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"b", 2, 2,
"SILICON", 1, 1, 1);
241 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"c", 1, 1,
"SILICON", 0, 2, 0);
242 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"c", 1, 2,
"SILICON", 0, 2, 1);
243 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"c", 2, 1,
"SILICON", 1, 2, 0);
244 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"c", 2, 2,
"SILICON", 1, 2, 1);
245 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"c", 3, 1,
"SILICON", 0, 2, 2);
246 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"c", 3, 2,
"SILICON", 0, 2, 3);
247 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"c", 4, 1,
"SILICON", 1, 2, 2);
248 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"c", 4, 2,
"SILICON", 1, 2, 3);
250 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"d", 1, 1,
"SILICON", 0, 2, 4);
251 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"d", 1, 2,
"SILICON", 0, 2, 5);
252 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"d", 2, 1,
"SILICON", 1, 2, 4);
253 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"d", 2, 2,
"SILICON", 1, 2, 5);
254 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"d", 3, 1,
"SILICON", 0, 2, 6);
255 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"d", 3, 2,
"SILICON", 0, 2, 7);
256 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"d", 4, 1,
"SILICON", 1, 2, 6);
257 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"d", 4, 2,
"SILICON", 1, 2, 7);
259 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 1, 1,
"GEM", 0, 0, 0);
260 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 1, 2,
"GEM", 0, 0, 1);
261 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 2, 1,
"GEM", 1, 0, 0);
262 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 2, 2,
"GEM", 1, 0, 1);
263 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 3, 1,
"GEM", 0, 1, 0);
264 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 3, 2,
"GEM", 0, 1, 1);
265 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 4, 1,
"GEM", 1, 1, 0);
266 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 4, 2,
"GEM", 1, 1, 1);
267 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 5, 1,
"GEM", 0, 2, 0);
268 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 5, 2,
"GEM", 0, 2, 1);
269 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 6, 1,
"GEM", 1, 2, 0);
270 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"e", 6, 2,
"GEM", 1, 2, 1);
272 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 1, 1,
"GEM", 0, 3, 0);
273 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 1, 2,
"GEM", 0, 3, 1);
274 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 2, 1,
"GEM", 1, 3, 0);
275 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 2, 2,
"GEM", 1, 3, 1);
276 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 3, 1,
"GEM", 0, 4, 0);
277 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 3, 2,
"GEM", 0, 4, 1);
278 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 4, 1,
"GEM", 1, 4, 0);
279 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 4, 2,
"GEM", 1, 4, 1);
280 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 5, 1,
"GEM", 0, 5, 0);
281 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 5, 2,
"GEM", 0, 5, 1);
282 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 6, 1,
"GEM", 1, 5, 0);
283 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"f", 6, 2,
"GEM", 1, 5, 1);
286 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"g", 1,
"SILICON", 0);
287 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"g", 2,
"SILICON", 1);
288 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"g", 3,
"SILICON", 2);
290 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"h", 1,
"GEM", 0);
291 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"h", 2,
"GEM", 1);
292 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"h", 3,
"GEM", 2);
293 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"h", 4,
"GEM", 3);
294 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"h", 5,
"GEM", 4);
295 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"h", 6,
"GEM", 5);
297 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"i", 1,
"GEM", 1);
298 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"i", 2,
"GEM", 0);
299 new ((*hPlace)[hPlace->GetEntriesFast()])
HistoPlacement(
"i", 3,
"SILICON", 0);
301 const Int_t nPads = 6;
302 const Int_t nSubPads = 2;
306 const Int_t nCanvs = 6;
307 TCanvas* a =
new TCanvas(
"a",
"a", 1200, 800);
308 TCanvas* b =
new TCanvas(
"b",
"b", 1200, 800);
309 TCanvas* c =
new TCanvas(
"c",
"c", 1200, 800);
310 TCanvas*
d =
new TCanvas(
"d",
"d", 1200, 800);
311 TCanvas* e =
new TCanvas(
"e",
"e", 1200, 800);
312 TCanvas*
f =
new TCanvas(
"f",
"f", 1200, 800);
315 vector <TCanvas*> arrCanv{a, b, c,
d, e,
f};
317 for (Int_t iCanv = 0; iCanv < nCanvs; iCanv++) {
318 arrCanv[iCanv]->Divide(2, 3);
319 for (Int_t iPad = 1; iPad < nPads + 1; iPad++) {
320 Int_t analType = (iPad % 2 == 1) ? 0 : 1;
322 TVirtualPad* vPad = arrCanv[iCanv]->cd(iPad);
323 vPad->Divide(1, 2, 0.01, 0.01);
325 for (Int_t iSubPad = 1; iSubPad < nSubPads + 1; iSubPad++) {
328 for (Int_t iPlace = 0; iPlace < hPlace->GetEntriesFast(); iPlace++) {
333 Int_t pad = place->
GetPad();
338 if ((TString) arrCanv[iCanv]->GetName() != name || iPad != pad || iSubPad != subpad || analType != type)
342 Int_t mod = place->
GetMod();
344 if (det.Contains(
"SILICON")) {
345 hSiliconStripInfo[type][stat][mod][0]->Draw();
346 hSiliconStripInfo[type][stat][mod][0]->SetLineColor(kRed);
347 hSiliconStripInfo[type][stat][mod][1]->Draw(
"same");
348 hSiliconStripInfo[type][stat][mod][1]->SetLineColor(kBlue);
349 }
else if (det.Contains(
"GEM")) {
350 hGemStripInfo[type][stat][mod][0]->Draw();
351 hGemStripInfo[type][stat][mod][0]->SetLineColor(kRed);
352 hGemStripInfo[type][stat][mod][1]->Draw(
"same");
353 hGemStripInfo[type][stat][mod][1]->SetLineColor(kBlue);
363 a->SaveAs(
"siliconMcEmbedded_stat0.pdf");
364 b->SaveAs(
"siliconMcEmbedded_stat1.pdf");
365 c->SaveAs(
"siliconMcEmbedded_stat3_1.pdf");
366 d->SaveAs(
"siliconMcEmbedded_stat3_2.pdf");
367 e->SaveAs(
"gemMcEmbedded_stat012.pdf");
368 f->SaveAs(
"gemMcEmbedded_stat345.pdf");
373 TBox*** gemModBoxes =
nullptr;
374 TBox**** gemLayBoxes =
nullptr;
375 TPolyLine**** gemDeadZones =
nullptr;
376 geoms->
GetGemBorders(gemModBoxes, gemLayBoxes, gemDeadZones);
378 TBox*** silModBoxes =
nullptr;
379 TBox**** silLayBoxes =
nullptr;
380 TPolyLine**** silDeadZones =
nullptr;
384 TCanvas* g =
new TCanvas(
"g",
"g", 1200, 800);
385 TCanvas* h =
new TCanvas(
"h",
"h", 1200, 800);
388 vector <TCanvas*> arrCanv{g, h};
389 for (Int_t iCanv = 0; iCanv < nCanvs; iCanv++) {
390 arrCanv[iCanv]->Divide(2, 3);
391 for (Int_t iPad = 1; iPad < nPads + 1; iPad++) {
392 arrCanv[iCanv]->cd(iPad);
393 for (Int_t iPlace = 0; iPlace < hPlace->GetEntriesFast(); iPlace++) {
397 Int_t pad = place->
GetPad();
400 if ((TString) arrCanv[iCanv]->GetName() != name || iPad != pad)
403 if (det.Contains(
"SILICON")) {
405 pEffSilStatXY[stat]->Draw(
"colz");
408 silModBoxes[stat][iMod]->Draw(
"l");
411 silLayBoxes[stat][iMod][iLayer]->Draw(
"l");
412 if (stat == 2 && iMod == 7 && (iLayer == 0 || iLayer == 2))
413 silDeadZones[stat][iMod][iLayer]->
Draw(
"l");
416 }
else if (det.Contains(
"GEM")) {
418 pEffGemStatXY[stat]->Draw(
"colz");
421 gemModBoxes[stat][iMod]->Draw(
"l");
424 gemLayBoxes[stat][iMod][iLayer]->Draw(
"l");
425 gemDeadZones[stat][iMod][iLayer]->Draw(
"l");
435 g->SaveAs(
"siliconEff_XY.pdf");
436 h->SaveAs(
"gemEff_XY.pdf");
439 TCanvas*
i =
new TCanvas(
"i",
"i", 1200, 800);
442 for (Int_t iPad = 1; iPad < nPads + 1; iPad++) {
443 i->cd(iPad)->SetGrid();
444 for (Int_t iPlace = 0; iPlace < hPlace->GetEntriesFast(); iPlace++) {
448 Int_t pad = place->
GetPad();
451 if ((TString)
i->GetName() != name || iPad != pad)
454 if (det.Contains(
"SILICON")) {
455 pEmbSilHitEff->Draw(
"TEXT");
456 }
else if (det.Contains(
"GEM")) {
458 pEmbGemHitEff[zone]->Draw(
"TEXT");
465 i->SaveAs(
"gemSiliconEff.pdf");
467 TCanvas* j =
new TCanvas(
"j",
"j", 1200, 800);
470 for (Int_t iPad = 1; iPad < 3; iPad++) {
471 j->cd(iPad)->SetGrid();
473 hEtaLambda[iPad - 1][0]->SetMarkerStyle(kFullCircle);
474 hEtaLambda[iPad - 1][0]->SetMarkerColor(kRed);
475 hEtaLambda[iPad - 1][0]->Draw(
"P");
477 hEtaLambda[iPad - 1][1]->SetMarkerStyle(kFullSquare);
478 hEtaLambda[iPad - 1][1]->SetMarkerColor(kBlue);
479 hEtaLambda[iPad - 1][1]->Draw(
"Psame");
481 hEtaLambda[iPad - 1][2]->SetMarkerStyle(kFullTriangleUp);
482 hEtaLambda[iPad - 1][2]->SetMarkerColor(kMagenta);
483 hEtaLambda[iPad - 1][2]->Draw(
"Psame");
485 hEtaLambda[iPad - 1][3]->SetMarkerStyle(kFullTriangleDown);
486 hEtaLambda[iPad - 1][3]->Draw(
"Psame");
488 TLegend* legend =
new TLegend(0.1, 0.7, 0.58, 0.9);
489 legend->AddEntry(hEtaLambda[iPad - 1][0],
"nHitsReco = nHitsMc",
"p");
490 legend->AddEntry(hEtaLambda[iPad - 1][1],
"|nHitsReco - nHitsMc| / nHitsMc < 0.2",
"p");
491 legend->AddEntry(hEtaLambda[iPad - 1][2],
"|nHitsReco - nHitsMc| / nHitsMc < 0.4",
"p");
492 legend->AddEntry(hEtaLambda[iPad - 1][3],
"|nHitsReco - nHitsMc| / nHitsMc < 0.5",
"p");
497 for (Int_t iPad = 3; iPad < 5; iPad++) {
498 j->cd(iPad)->SetGrid();
499 j->cd(iPad)->SetLogz();
500 hNhitsEmbReco[iPad - 3]->Draw(
"colz");
503 j->SaveAs(
"etaLambda_nReco2Emb.pdf");