CbmRoot
Loading...
Searching...
No Matches
CbmAnaConversionRecoFull.cxx
Go to the documentation of this file.
1/* Copyright (C) 2014-2019 Fakultaet fuer Mathematik und Naturwissenschaften, Bergische Universitaet Wuppertal, Wuppertal
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sascha Reinecke [committer], Florian Uhlig, Andrey Lebedev */
4
16
17// standard includes
18#include <iostream>
19
20// includes from ROOT
21#include "TRandom3.h"
22
23// included from CbmRoot
27#include "CbmDrawHist.h"
28#include "CbmGlobalTrack.h"
29#include "CbmL1PFFitter.h"
31#include "CbmMCTrack.h"
32#include "CbmRichPoint.h"
33#include "CbmRichRing.h"
34#include "CbmStsTrack.h"
35#include "CbmTrackMatchNew.h"
36
37#include "FairRootManager.h"
38#include <Logger.h>
39
40
41#define M2E 2.6112004954086e-7
42using namespace std;
43
44
46 : fRichPoints(NULL)
47 , fRichRings(NULL)
48 , fRichRingMatches(NULL)
49 , fMcTracks(NULL)
50 , fStsTracks(NULL)
51 , fStsTrackMatches(NULL)
52 , fGlobalTracks(NULL)
53 , fPrimVertex(NULL)
54 , fKFVertex()
55 , fHistoList_recofull()
56 , fHistoList_recofull_1()
57 , fHistoList_recofull_2()
58 , fHistoList_recofull_3()
59 , fHistoList_recofull_4()
60 , fHistoList_recofull_new()
61 , fhElectrons(NULL)
62 , fhMomentumFits(NULL)
63 , fhMomentumFits_electronRich(NULL)
64 , fhMomentumFits_pi0reco(NULL)
65 , fElectrons_track()
66 , fElectrons_momenta()
67 , fElectrons_momentaChi()
68 , fElectrons_mctrackID()
69 , fElectrons_track_1()
70 , fElectrons_momenta_1()
71 , fElectrons_momentaChi_1()
72 , fElectrons_mctrackID_1()
73 , fVector_photons_pairs_1()
74 , fElectrons_track_2()
75 , fElectrons_momenta_2()
76 , fElectrons_momentaChi_2()
77 , fElectrons_mctrackID_2()
78 , fVector_photons_pairs_2()
79 , fElectrons_track_3()
80 , fElectrons_momenta_3()
81 , fElectrons_momentaChi_3()
82 , fElectrons_mctrackID_3()
83 , fVector_photons_pairs_3()
84 , fElectrons_track_4()
85 , fElectrons_momenta_4()
86 , fElectrons_momentaChi_4()
87 , fElectrons_mctrackID_4()
88 , fVector_photons_pairs_4()
89 , fElectrons_track_new()
90 , fElectrons_momenta_new()
91 , fElectrons_momentaChi_new()
92 , fElectrons_mctrackID_new()
93 , fElectrons_globaltrackID_new()
94 , fVector_photons_pairs_new()
95 , fhElectrons_invmass(NULL)
96 , fhElectrons_invmass_cut(NULL)
97 , fhElectrons_nofPerEvent(NULL)
98 , fhPhotons_nofPerEvent(NULL)
99 , fVector_photons_pairs()
100 , fVector_photons_momenta()
101 , fhPhotons_invmass(NULL)
102 , fhPhotons_invmass_cut(NULL)
103 , fhPhotons_invmass_cut_chi1(NULL)
104 , fhPhotons_invmass_cut_chi3(NULL)
105 , fhPhotons_invmass_cut_chi5(NULL)
106 , fhPhotons_invmass_cut_chi10(NULL)
107 , fhPhotons_invmass_cut_chi25(NULL)
108 , fhPhotons_invmass_cut_chi40(NULL)
109 , fhPhotons_invmass_cut_chi65(NULL)
110 , fhPhotons_invmass_cut_chi80(NULL)
111 , fhPhotons_invmass_cut_ptBin1(NULL)
112 , fhPhotons_invmass_cut_ptBin2(NULL)
113 , fhPhotons_invmass_cut_ptBin3(NULL)
114 , fhPhotons_invmass_cut_ptBin4(NULL)
115 , fhPhotons_invmass_vs_chi(NULL)
116 , fhPhotons_startvertex_vs_chi(NULL)
117 , fhPhotons_angleBetween(NULL)
118 , fhPhotons_invmass_vs_pt(NULL)
119 , fhPhotons_rapidity_vs_pt(NULL)
120 , fhPhotons_invmass_vs_openingAngle(NULL)
121 , fhPhotons_openingAngle_vs_momentum(NULL)
122 , fhPhotons_MC_motherpdg(NULL)
123 , fhPhotons_MC_invmass1(NULL)
124 , fhPhotons_MC_invmass2(NULL)
125 , fhPhotons_MC_invmass3(NULL)
126 , fhPhotons_MC_invmass4(NULL)
127 , fhPhotons_MC_startvertexZ(NULL)
128 , fhPhotons_MC_motherIdCut(NULL)
129 , fhPhotons_Refit_chiDiff(NULL)
130 , fhPhotons_Refit_momentumDiff(NULL)
131 , fhPhotons_Refit_chiDistribution(NULL)
132 , fhPhotons_RefitPion_chiDistribution(NULL)
133 , fElectrons_track_refit()
134 , fElectrons_momenta_refit()
135 , fVector_photons_pairs_refit()
136 , fhPhotons_invmass_refit(NULL)
137 , fhPhotons_invmass_refit_cut(NULL)
138 , fVector_photons_pairs_direction()
139 , fhPhotons_invmass_direction(NULL)
140 , fhPhotons_invmass_direction_cut(NULL)
141 , fhPhotons_boostAngle(NULL)
142 , fhPhotons_boostAngleMC(NULL)
143 , fhPhotons_boostAngleTest(NULL)
144 , fhPhotons_tX(NULL)
145 , fhPhotons_tY(NULL)
146 , fhElectrons_nofPerEvent_1(NULL)
147 , fhPhotons_nofPerEvent_1(NULL)
148 , fhPhotons_invmass_1(NULL)
149 , fhPhotons_invmass_ptBin1_1(NULL)
150 , fhPhotons_invmass_ptBin2_1(NULL)
151 , fhPhotons_invmass_ptBin3_1(NULL)
152 , fhPhotons_invmass_ptBin4_1(NULL)
153 , fhElectrons_invmass_1(NULL)
154 , fhPhotons_invmass_vs_pt_1(NULL)
155 , fhElectrons_nofPerEvent_2(NULL)
156 , fhPhotons_nofPerEvent_2(NULL)
157 , fhPhotons_invmass_2(NULL)
158 , fhPhotons_invmass_ptBin1_2(NULL)
159 , fhPhotons_invmass_ptBin2_2(NULL)
160 , fhPhotons_invmass_ptBin3_2(NULL)
161 , fhPhotons_invmass_ptBin4_2(NULL)
162 , fhElectrons_invmass_2(NULL)
163 , fhPhotons_invmass_vs_pt_2(NULL)
164 , fhElectrons_nofPerEvent_3(NULL)
165 , fhPhotons_nofPerEvent_3(NULL)
166 , fhPhotons_invmass_3(NULL)
167 , fhPhotons_invmass_ptBin1_3(NULL)
168 , fhPhotons_invmass_ptBin2_3(NULL)
169 , fhPhotons_invmass_ptBin3_3(NULL)
170 , fhPhotons_invmass_ptBin4_3(NULL)
171 , fhElectrons_invmass_3(NULL)
172 , fhPhotons_invmass_vs_pt_3(NULL)
173 , fhElectrons_nofPerEvent_4(NULL)
174 , fhPhotons_nofPerEvent_4(NULL)
175 , fhPhotons_invmass_4(NULL)
176 , fhPhotons_invmass_ptBin1_4(NULL)
177 , fhPhotons_invmass_ptBin2_4(NULL)
178 , fhPhotons_invmass_ptBin3_4(NULL)
179 , fhPhotons_invmass_ptBin4_4(NULL)
180 , fhElectrons_invmass_4(NULL)
181 , fhPhotons_invmass_vs_pt_4(NULL)
182 , fhElectrons_nofPerEvent_new()
183 , fhPhotons_nofPerEvent_new()
184 , fhPhotons_nofPerEventAfter_new()
185 , fhPhotons_invmass_new()
186 , fhPhotons_invmass_ann0_new()
187 , fhPhotons_invmass_ptBin1_new()
188 , fhPhotons_invmass_ptBin2_new()
189 , fhPhotons_invmass_ptBin3_new()
190 , fhPhotons_invmass_ptBin4_new()
191 , fhElectrons_invmass_new()
192 , fhPhotons_invmass_vs_pt_new()
193 , fhPhotons_invmass_MCcut1_new()
194 , fhPhotons_invmass_MCcut2_new()
195 , fhPhotons_invmass_MCcut3_new()
196 , fhPhotons_invmass_MCcut4_new()
197 , fhPhotons_invmass_MCcut5_new()
198 , fhPhotons_invmass_MCcut6_new()
199 , fhPhotons_invmass_MCcut7_new()
200 , fhPhotons_invmass_MCcutTest_new()
201 , fhPhotons_invmass_MCcutTest2_new()
202 , fhPhotons_invmass_MCcutTest3_new()
203 , fhPhotons_invmass_MCcutAll_new()
204 , fhPhotons_pt_vs_rap_new()
205 , fhElectrons_openingAngle_sameSign_new()
206 , fhPhotons_stats()
207 , fhPhotons_MCtrue_pdgCodes()
208 , fhPhotons_peakCheck1()
209 , fhPhotons_peakCheck2()
210 , fhPhotons_invmass_ANNcuts_new()
211 , fhPhotons_phaseSpace_pi0()
212 , fhPhotons_phaseSpace_eta()
213 , fMixedEventsElectrons_list1()
214 , fMixedEventsElectrons_list2()
215 , fMixedEventsElectrons_list3()
216 , fMixedEventsElectrons_list4()
217 , fMixedEventsElectrons_list1_gtrack()
218 , fMixedEventsElectrons_list2_gtrack()
219 , fMixedEventsElectrons_list3_gtrack()
220 , fMixedEventsElectrons_list4_gtrack()
221 , fhMixedEventsTest2_invmass(NULL)
222 , fMixedTest3_momenta()
223 , fMixedTest3_gtrack()
224 , fMixedTest3_eventno()
225 , globalEventNo()
226 , fhMixedEventsTest3_invmass(NULL)
227 , fMixedTest4_photons()
228 , fMixedTest4_mctracks()
229 , fMixedTest4_isRichElectronAnn0()
230 , fMixedTest4_ElectronAnns()
231 , fMixedTest4_eventno()
232 , fhMixedEventsTest4_invmass(NULL)
233 , fhMixedEventsTest4_invmass_ann0(NULL)
234 , fhMixedEventsTest4_pt_vs_rap(NULL)
235 , fhMixedEventsTest4_invmass_ptBin1(NULL)
236 , fhMixedEventsTest4_invmass_ptBin2(NULL)
237 , fhMixedEventsTest4_invmass_ptBin3(NULL)
238 , fhMixedEventsTest4_invmass_ptBin4(NULL)
239 , fhMixedEventsTest4_invmass_ANNcuts(NULL)
240 , timer()
241 , fTime(0.)
242{
243}
244
246
247
249{
250 FairRootManager* ioman = FairRootManager::Instance();
251 if (NULL == ioman) { Fatal("CbmAnaConversion::Init", "RootManager not instantised!"); }
252
253 fRichPoints = (TClonesArray*) ioman->GetObject("RichPoint");
254 if (NULL == fRichPoints) { Fatal("CbmAnaConversion::Init", "No RichPoint array!"); }
255
256 fMcTracks = (TClonesArray*) ioman->GetObject("MCTrack");
257 if (NULL == fMcTracks) { Fatal("CbmAnaConversion::Init", "No MCTrack array!"); }
258
259 fStsTracks = (TClonesArray*) ioman->GetObject("StsTrack");
260 if (NULL == fStsTracks) { Fatal("CbmAnaConversion::Init", "No StsTrack array!"); }
261
262 fStsTrackMatches = (TClonesArray*) ioman->GetObject("StsTrackMatch");
263 if (NULL == fStsTrackMatches) { Fatal("CbmAnaConversion::Init", "No StsTrackMatch array!"); }
264
265 fGlobalTracks = (TClonesArray*) ioman->GetObject("GlobalTrack");
266 if (NULL == fGlobalTracks) { Fatal("CbmAnaConversion::Init", "No GlobalTrack array!"); }
267
268 // Get pointer to PrimaryVertex object from IOManager if it exists
269 // The old name for the object is "PrimaryVertex" the new one
270 // "PrimaryVertex." Check first for the new name
271 fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex."));
272 if (nullptr == fPrimVertex) { fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex")); }
273 if (nullptr == fPrimVertex) { LOG(fatal) << "No PrimaryVertex array!"; }
274
275 fRichRings = (TClonesArray*) ioman->GetObject("RichRing");
276 if (NULL == fRichRings) { Fatal("CbmAnaConversion::Init", "No RichRing array!"); }
277
278 fRichRingMatches = (TClonesArray*) ioman->GetObject("RichRingMatch");
279 if (NULL == fRichRingMatches) { Fatal("CbmAnaConversion::Init", "No RichRingMatch array!"); }
280
281
282 InitHistos();
284
285 globalEventNo = 0;
286}
287
288
290{
291 fHistoList_recofull.clear();
292 fHistoList_recofull_1.clear();
293 fHistoList_recofull_2.clear();
294 fHistoList_recofull_3.clear();
295 fHistoList_recofull_4.clear();
296
297 for (int i = 1; i <= 4; i++) {
298 fHistoList_recofull_new[i].clear();
299 }
300
301 Double_t invmassSpectra_nof = 800;
302 Double_t invmassSpectra_start = -0.00125;
303 Double_t invmassSpectra_end = 1.99875;
304
305
306 fhElectrons = new TH1I("fhElectrons", "fhElectrons;; #", 8, 0., 8.);
308 fhElectrons->GetXaxis()->SetBinLabel(1, "electrons rich");
309 fhElectrons->GetXaxis()->SetBinLabel(2, "electrons trd");
310 fhElectrons->GetXaxis()->SetBinLabel(3, "electrons tof");
311 fhElectrons->GetXaxis()->SetBinLabel(4, "electrons rich+trd");
312 fhElectrons->GetXaxis()->SetBinLabel(5, "electrons rich+tof");
313 fhElectrons->GetXaxis()->SetBinLabel(6, "electrons trd+tof");
314 fhElectrons->GetXaxis()->SetBinLabel(7, "electrons rich+trd+tof");
315 fhElectrons->GetXaxis()->SetBinLabel(8, "electrons 2 out of 3");
316
317
318 fhMomentumFits = new TH1D("fhMomentumFits", "fhMomentumFits; chi; #", 10000, 0., 1000.);
321 new TH1D("fhMomentumFits_electronRich", "fhMomentumFits_electronRich; chi; #", 10000, 0., 1000.);
323 fhMomentumFits_pi0reco = new TH1D("fhMomentumFits_pi0reco", "fhMomentumFits_pi0reco; chi; #", 10000, 0., 1000.);
325
326
327 fhElectrons_invmass = new TH1D("fhElectrons_invmass", "fhElectrons_invmass; invariant mass; #", invmassSpectra_nof,
328 invmassSpectra_start, invmassSpectra_end);
329 fhElectrons_invmass_cut = new TH1D("fhElectrons_invmass_cut", "fhElectrons_invmass_cut; invariant mass; #",
330 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
333
335 new TH1D("fhElectrons_nofPerEvent", "fhElectrons_nofPerEvent; nof electrons per event; #", 101, -0.5, 100.5);
338 new TH1D("fhPhotons_nofPerEvent", "fhPhotons_nofPerEvent; nof photons per event; #", 101, -0.5, 100.5);
340
341 fhPhotons_invmass = new TH1D("fhPhotons_invmass", "fhPhotons_invmass; invariant mass; #", invmassSpectra_nof,
342 invmassSpectra_start, invmassSpectra_end);
344 fhPhotons_invmass_cut = new TH1D("fhPhotons_invmass_cut", "fhPhotons_invmass_cut; invariant mass; #",
345 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
347
348
350 new TH1D("fhPhotons_invmass_cut_ptBin1", "fhPhotons_invmass_cut_ptBin1; invariant mass; #", invmassSpectra_nof,
351 invmassSpectra_start, invmassSpectra_end);
354 new TH1D("fhPhotons_invmass_cut_ptBin2", "fhPhotons_invmass_cut_ptBin2; invariant mass; #", invmassSpectra_nof,
355 invmassSpectra_start, invmassSpectra_end);
358 new TH1D("fhPhotons_invmass_cut_ptBin3", "fhPhotons_invmass_cut_ptBin3; invariant mass; #", invmassSpectra_nof,
359 invmassSpectra_start, invmassSpectra_end);
362 new TH1D("fhPhotons_invmass_cut_ptBin4", "fhPhotons_invmass_cut_ptBin4; invariant mass; #", invmassSpectra_nof,
363 invmassSpectra_start, invmassSpectra_end);
365
366
368 new TH1D("fhPhotons_angleBetween", "fhPhotons_angleBetween; opening angle [deg]; #", 1000, 0, 100);
370
371
372 fhPhotons_invmass_cut_chi1 = new TH1D("fhPhotons_invmass_cut_chi1", "fhPhotons_invmass_cut_chi1; invariant mass; #",
373 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
375 fhPhotons_invmass_cut_chi3 = new TH1D("fhPhotons_invmass_cut_chi3", "fhPhotons_invmass_cut_chi3; invariant mass; #",
376 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
378 fhPhotons_invmass_cut_chi5 = new TH1D("fhPhotons_invmass_cut_chi5", "fhPhotons_invmass_cut_chi5; invariant mass; #",
379 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
382 new TH1D("fhPhotons_invmass_cut_chi10", "fhPhotons_invmass_cut_chi10; invariant mass; #", invmassSpectra_nof,
383 invmassSpectra_start, invmassSpectra_end);
386 new TH1D("fhPhotons_invmass_cut_chi25", "fhPhotons_invmass_cut_chi25; invariant mass; #", invmassSpectra_nof,
387 invmassSpectra_start, invmassSpectra_end);
390 new TH1D("fhPhotons_invmass_cut_chi40", "fhPhotons_invmass_cut_chi40; invariant mass; #", invmassSpectra_nof,
391 invmassSpectra_start, invmassSpectra_end);
394 new TH1D("fhPhotons_invmass_cut_chi65", "fhPhotons_invmass_cut_chi65; invariant mass; #", invmassSpectra_nof,
395 invmassSpectra_start, invmassSpectra_end);
398 new TH1D("fhPhotons_invmass_cut_chi80", "fhPhotons_invmass_cut_chi80; invariant mass; #", invmassSpectra_nof,
399 invmassSpectra_start, invmassSpectra_end);
401
402 fhPhotons_invmass_vs_chi = new TH2D("fhPhotons_invmass_vs_chi", "fhPhotons_invmass_vs_chi; invariant mass; chi", 600,
403 -0.0025, 2.9975, 1000, 0., 100.);
406 "fhPhotons_startvertex_vs_chi", "fhPhotons_startvertex_vs_chi; startvertex; chi", 400, -5., 95., 1000, 0., 200.);
409 new TH2D("fhPhotons_invmass_vs_pt", "fhPhotons_invmass_vs_pt; invmass; pt", 600, -0.0025, 2.9975, 100, 0., 10.);
412 new TH2D("fhPhotons_rapidity_vs_pt", "fhPhotons_rapidity_vs_pt; pt [GeV]; rap [GeV]", 240, -2., 10., 210, 0., 7.);
414
416 new TH2D("fhPhotons_invmass_vs_openingAngle", "fhPhotons_invmass_vs_openingAngle; invmass; openingAngle", 600,
417 -0.0025, 2.9975, 100, 0., 10.);
420 new TH2D("fhPhotons_openingAngle_vs_momentum", "fhPhotons_openingAngle_vs_momentum; openingAngle; momentum", 100,
421 0., 10., 100, 0., 10.);
423
424
425 fhPhotons_MC_motherpdg = new TH1D("fhPhotons_MC_motherpdg", "fhPhotons_MC_motherpdg; pdg; #", 1000, 0., 1000.);
427 fhPhotons_MC_invmass1 = new TH1D("fhPhotons_MC_invmass1",
428 "fhPhotons_MC_minvmass1 (MC-true cut: at least gamma correct "
429 "reconstructed); invariant mass; #",
430 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
432 fhPhotons_MC_invmass2 = new TH1D("fhPhotons_MC_invmass2",
433 "fhPhotons_MC_minvmass2 (MC-true cut: gamma "
434 "from same mother); invariant mass; #",
435 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
437 fhPhotons_MC_invmass3 = new TH1D("fhPhotons_MC_invmass3",
438 "fhPhotons_MC_minvmass3 (MC-true cut: gamma "
439 "from different mother); invariant mass; #",
440 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
442 fhPhotons_MC_invmass4 = new TH1D("fhPhotons_MC_invmass4",
443 "fhPhotons_MC_minvmass4 (MC-true cut: wrong combination of "
444 "electrons); invariant mass; #",
445 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
447
449 new TH1D("fhPhotons_MC_startvertexZ", "fhPhotons_MC_startvertexZ; startvertexZ [cm]; #", 1000, -5., 95.);
451
452 fhPhotons_MC_motherIdCut = new TH1D("fhPhotons_MC_motherIdCut", "fhPhotons_MC_motherIdCut; invariant mass; #",
453 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
455
457 new TH1D("fhPhotons_Refit_chiDiff", "fhPhotons_Refit_chiDiff; difference of chi; #", 1000, -0.1, 99.9);
459
461 "fhPhotons_Refit_momentumDiff", "fhPhotons_Refit_momentumDiff; difference of momentum mag; #", 1000, -0.1, 4.9);
463
465 new TH1D("fhPhotons_Refit_chiDistribution", "fhPhotons_Refit_chiDistribution; chi value; #", 10000, 0., 1000.);
467
468 fhPhotons_RefitPion_chiDistribution = new TH1D("fhPhotons_RefitPion_chiDistribution",
469 "fhPhotons_RefitPion_chiDistribution; chi value; #", 10000, 0., 1000.);
471
472 fhPhotons_invmass_refit = new TH1D("fhPhotons_invmass_refit", "fhPhotons_invmass_refit; invariant mass; #",
473 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
476 new TH1D("fhPhotons_invmass_refit_cut", "fhPhotons_invmass_refit_cut; invariant mass; #", invmassSpectra_nof,
477 invmassSpectra_start, invmassSpectra_end);
479
480
482 new TH1D("fhPhotons_invmass_direction", "fhPhotons_invmass_direction; invariant mass; #", invmassSpectra_nof,
483 invmassSpectra_start, invmassSpectra_end);
486 new TH1D("fhPhotons_invmass_direction_cut", "fhPhotons_invmass_direction_cut; invariant mass; #",
487 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
489 fhPhotons_boostAngle = new TH1D("fhPhotons_boostAngle", "fhPhotons_boostAngle; boostAngle; #", 7400, -370., 370.);
492 new TH1D("fhPhotons_boostAngleMC", "fhPhotons_boostAngleMC; boostAngle; #", 7400, -370., 370.);
495 new TH1D("fhPhotons_boostAngleTest", "fhPhotons_boostAngleTest; boostAngle; #", 10000, -5., 5.);
497
498
499 fhPhotons_tX = new TH1D("fhPhotons_tX", "fhPhotons_tX; tX; #", 201, -1.005, 1.005);
501 fhPhotons_tY = new TH1D("fhPhotons_tY", "fhPhotons_tY; tY; #", 201, -1.005, 1.005);
503
504
505 // histograms for index = 1 (no refit, no chicut)
507 new TH1D("fhElectrons_nofPerEvent_1", "fhElectrons_nofPerEvent_1; nof electrons per event; #", 101, -0.5, 100.5);
510 new TH1D("fhPhotons_nofPerEvent_1", "fhPhotons_nofPerEvent_1; nof photons per event; #", 101, -0.5, 100.5);
512
513 fhPhotons_invmass_1 = new TH1D("fhPhotons_invmass_1", "fhPhotons_invmass_1; invariant mass; #", 600, -0.0025, 2.9975);
515
517 new TH1D("fhPhotons_invmass_ptBin1_1", "fhPhotons_invmass_ptBin1_1; invariant mass; #", 600, -0.0025, 2.9975);
520 new TH1D("fhPhotons_invmass_ptBin2_1", "fhPhotons_invmass_ptBin2_1; invariant mass; #", 600, -0.0025, 2.9975);
523 new TH1D("fhPhotons_invmass_ptBin3_1", "fhPhotons_invmass_ptBin3_1; invariant mass; #", 600, -0.0025, 2.9975);
526 new TH1D("fhPhotons_invmass_ptBin4_1", "fhPhotons_invmass_ptBin4_1; invariant mass; #", 600, -0.0025, 2.9975);
528
530 new TH1D("fhElectrons_invmass_1", "fhElectrons_invmass_1; invariant mass; #", 600, -0.0025, 2.9975);
533 new TH2D("fhPhotons_invmass_vs_pt_1", "fhPhotons_invmass_vs_pt_1; invmass; pt", 600, -0.0025, 2.9975, 100, 0., 10.);
535
536
537 // histograms for index = 2 (no refit, with chicut)
539 new TH1D("fhElectrons_nofPerEvent_2", "fhElectrons_nofPerEvent_2; nof electrons per event; #", 101, -0.5, 100.5);
542 new TH1D("fhPhotons_nofPerEvent_2", "fhPhotons_nofPerEvent_2; nof photons per event; #", 101, -0.5, 100.5);
544
545 fhPhotons_invmass_2 = new TH1D("fhPhotons_invmass_2", "fhPhotons_invmass_2; invariant mass; #", 600, -0.0025, 2.9975);
547
549 new TH1D("fhPhotons_invmass_ptBin1_2", "fhPhotons_invmass_ptBin1_2; invariant mass; #", 600, -0.0025, 2.9975);
552 new TH1D("fhPhotons_invmass_ptBin2_2", "fhPhotons_invmass_ptBin2_2; invariant mass; #", 600, -0.0025, 2.9975);
555 new TH1D("fhPhotons_invmass_ptBin3_2", "fhPhotons_invmass_ptBin3_2; invariant mass; #", 600, -0.0025, 2.9975);
558 new TH1D("fhPhotons_invmass_ptBin4_2", "fhPhotons_invmass_ptBin4_2; invariant mass; #", 600, -0.0025, 2.9975);
560
562 new TH1D("fhElectrons_invmass_2", "fhElectrons_invmass_2; invariant mass; #", 600, -0.0025, 2.9975);
565 new TH2D("fhPhotons_invmass_vs_pt_2", "fhPhotons_invmass_vs_pt_2; invmass; pt", 600, -0.0025, 2.9975, 100, 0., 10.);
567
568
569 // histograms for index = 3 (with refit, no chicut)
571 new TH1D("fhElectrons_nofPerEvent_3", "fhElectrons_nofPerEvent_3; nof electrons per event; #", 101, -0.5, 100.5);
574 new TH1D("fhPhotons_nofPerEvent_3", "fhPhotons_nofPerEvent_3; nof photons per event; #", 101, -0.5, 100.5);
576
577 fhPhotons_invmass_3 = new TH1D("fhPhotons_invmass_3", "fhPhotons_invmass_3; invariant mass; #", 600, -0.0025, 2.9975);
579
581 new TH1D("fhPhotons_invmass_ptBin1_3", "fhPhotons_invmass_ptBin1_3; invariant mass; #", 600, -0.0025, 2.9975);
584 new TH1D("fhPhotons_invmass_ptBin2_3", "fhPhotons_invmass_ptBin2_3; invariant mass; #", 600, -0.0025, 2.9975);
587 new TH1D("fhPhotons_invmass_ptBin3_3", "fhPhotons_invmass_ptBin3_3; invariant mass; #", 600, -0.0025, 2.9975);
590 new TH1D("fhPhotons_invmass_ptBin4_3", "fhPhotons_invmass_ptBin4_3; invariant mass; #", 600, -0.0025, 2.9975);
592
594 new TH1D("fhElectrons_invmass_3", "fhElectrons_invmass_3; invariant mass; #", 600, -0.0025, 2.9975);
597 new TH2D("fhPhotons_invmass_vs_pt_3", "fhPhotons_invmass_vs_pt_3; invmass; pt", 600, -0.0025, 2.9975, 100, 0., 10.);
599
600
601 // histograms for index = 4 (with refit, with chicut)
603 new TH1D("fhElectrons_nofPerEvent_4", "fhElectrons_nofPerEvent_4; nof electrons per event; #", 101, -0.5, 100.5);
606 new TH1D("fhPhotons_nofPerEvent_4", "fhPhotons_nofPerEvent_4; nof photons per event; #", 101, -0.5, 100.5);
608
609 fhPhotons_invmass_4 = new TH1D("fhPhotons_invmass_4", "fhPhotons_invmass_4; invariant mass; #", 600, -0.0025, 2.9975);
611
613 new TH1D("fhPhotons_invmass_ptBin1_4", "fhPhotons_invmass_ptBin1_4; invariant mass; #", 600, -0.0025, 2.9975);
616 new TH1D("fhPhotons_invmass_ptBin2_4", "fhPhotons_invmass_ptBin2_4; invariant mass; #", 600, -0.0025, 2.9975);
619 new TH1D("fhPhotons_invmass_ptBin3_4", "fhPhotons_invmass_ptBin3_4; invariant mass; #", 600, -0.0025, 2.9975);
622 new TH1D("fhPhotons_invmass_ptBin4_4", "fhPhotons_invmass_ptBin4_4; invariant mass; #", 600, -0.0025, 2.9975);
624
626 new TH1D("fhElectrons_invmass_4", "fhElectrons_invmass_4; invariant mass; #", 600, -0.0025, 2.9975);
629 new TH2D("fhPhotons_invmass_vs_pt_4", "fhPhotons_invmass_vs_pt_4; invmass; pt", 600, -0.0025, 2.9975, 100, 0., 10.);
631
632
633 for (int i = 1; i <= 4; i++) {
635 new TH1D(Form("fhElectrons_nofPerEvent_new_%i", i),
636 Form("fhElectrons_nofPerEvent_new_%i; nof electrons per event; #", i), 31, -0.5, 30.5);
639 new TH1D(Form("fhPhotons_nofPerEvent_new_%i", i),
640 Form("fhPhotons_nofPerEvent_new_%i; nof photons per event; #", i), 31, -0.5, 30.5);
643 new TH1D(Form("fhPhotons_nofPerEventAfter_new_%i", i),
644 Form("fhPhotons_nofPerEventAfter_new_%i; nof photons per event; #", i), 31, -0.5, 30.5);
646 fhPi0_nofPerEvent_new[i] = new TH1D(Form("fhPi0_nofPerEvent_new_%i", i),
647 Form("fhPi0_nofPerEvent_new_%i; nof pi0 per event; #", i), 31, -0.5, 30.5);
649
651 new TH1D(Form("fhPhotons_invmass_new_%i", i),
652 Form("fhPhotons_invmass_new_%i; invariant mass of 4 e^{#pm} in GeV/c^{2}; #", i), invmassSpectra_nof,
653 invmassSpectra_start, invmassSpectra_end);
655 fhPhotons_invmass_ann0_new[i] = new TH1D(Form("fhPhotons_invmass_ann0_new_%i", i),
656 Form("fhPhotons_invmass_ann0_new_%i; invariant mass of 4 "
657 "e^{#pm} in GeV/c^{2}; #",
658 i),
659 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
661
662 fhPhotons_invmass_ptBin1_new[i] = new TH1D(Form("fhPhotons_invmass_ptBin1_new_%i", i),
663 Form("fhPhotons_invmass_ptBin1_new_%i; invariant mass of 4 "
664 "e^{#pm} in GeV/c^{2}; #",
665 i),
666 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
668 fhPhotons_invmass_ptBin2_new[i] = new TH1D(Form("fhPhotons_invmass_ptBin2_new_%i", i),
669 Form("fhPhotons_invmass_ptBin2_new_%i; invariant mass of 4 "
670 "e^{#pm} in GeV/c^{2}; #",
671 i),
672 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
674 fhPhotons_invmass_ptBin3_new[i] = new TH1D(Form("fhPhotons_invmass_ptBin3_new_%i", i),
675 Form("fhPhotons_invmass_ptBin3_new_%i; invariant mass of 4 "
676 "e^{#pm} in GeV/c^{2}; #",
677 i),
678 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
680 fhPhotons_invmass_ptBin4_new[i] = new TH1D(Form("fhPhotons_invmass_ptBin4_new_%i", i),
681 Form("fhPhotons_invmass_ptBin4_new_%i; invariant mass of 4 "
682 "e^{#pm} in GeV/c^{2}; #",
683 i),
684 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
686 fhPhotons_invmass_ptBin5_new[i] = new TH1D(Form("fhPhotons_invmass_ptBin5_new_%i", i),
687 Form("fhPhotons_invmass_ptBin5_new_%i; invariant mass of 4 "
688 "e^{#pm} in GeV/c^{2}; #",
689 i),
690 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
692 fhPhotons_invmass_ptBin6_new[i] = new TH1D(Form("fhPhotons_invmass_ptBin6_new_%i", i),
693 Form("fhPhotons_invmass_ptBin6_new_%i; invariant mass of 4 "
694 "e^{#pm} in GeV/c^{2}; #",
695 i),
696 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
698
699 fhElectrons_invmass_new[i] = new TH1D(Form("fhElectrons_invmass_new_%i", i),
700 Form("fhElectrons_invmass_new_%i; invariant mass of 4 e^{#pm} "
701 "in GeV/c^{2}; #",
702 i),
703 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
705
706 fhPhotons_invmass_vs_pt_new[i] = new TH2D(Form("fhPhotons_invmass_vs_pt_new_%i", i),
707 Form("fhPhotons_invmass_vs_pt_new_%i; invariant mass of 4 "
708 "e^{#pm} in GeV/c^{2}; pt",
709 i),
710 600, -0.0025, 2.9975, 100, 0., 10.);
712
714 new TH1D(Form("fhPhotons_invmass_MCcut1_new_%i", i),
715 Form("fhPhotons_invmass_MCcut1_new_%i (MC-true cut: at least gamma correct "
716 "reconstructed); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
717 i),
718 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
720 fhPhotons_invmass_MCcut2_new[i] = new TH1D(Form("fhPhotons_invmass_MCcut2_new_%i", i),
721 Form("fhPhotons_invmass_MCcut2_new_%i (MC-true cut: gamma from "
722 "same mother); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
723 i),
724 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
727 new TH1D(Form("fhPhotons_invmass_MCcut3_new_%i", i),
728 Form("fhPhotons_invmass_MCcut3_new_%i (MC-true cut: gamma from different "
729 "mother); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
730 i),
731 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
734 new TH1D(Form("fhPhotons_invmass_MCcut4_new_%i", i),
735 Form("fhPhotons_invmass_MCcut4_new_%i (MC-true cut: wrong combination of "
736 "electrons); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
737 i),
738 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
741 new TH1D(Form("fhPhotons_invmass_MCcut5_new_%i", i),
742 Form("fhPhotons_invmass_MCcut5_new_%i (MC-true cut: wrong combination of "
743 "electrons); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
744 i),
745 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
748 new TH1D(Form("fhPhotons_invmass_MCcut6_new_%i", i),
749 Form("fhPhotons_invmass_MCcut6_new_%i (MC-true cut: wrong combination of "
750 "electrons); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
751 i),
752 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
755 new TH1D(Form("fhPhotons_invmass_MCcut7_new_%i", i),
756 Form("fhPhotons_invmass_MCcut7_new_%i (MC-true cut: wrong combination of "
757 "electrons); invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
758 i),
759 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
761
762 fhPhotons_invmass_MCcutAll_new[i] = new TH2D(Form("fhPhotons_invmass_MCcutAll_new_%i", i),
763 Form("fhPhotons_invmass_MCcutAll_new_%i; case; invmass", i), 25, 0.,
764 25., invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
766
767 fhPhotons_invmass_MCcutTest_new[i] = new TH1D(Form("fhPhotons_invmass_MCcutTest_new_%i", i),
768 Form("fhPhotons_invmass_MCcutTest_new_%i (MC-true cut: test); "
769 "invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
770 i),
771 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
773 fhPhotons_invmass_MCcutTest2_new[i] = new TH1D(Form("fhPhotons_invmass_MCcutTest2_new_%i", i),
774 Form("fhPhotons_invmass_MCcutTest2_new_%i (MC-true cut: test); "
775 "invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
776 i),
777 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
779 fhPhotons_invmass_MCcutTest3_new[i] = new TH1D(Form("fhPhotons_invmass_MCcutTest3_new_%i", i),
780 Form("fhPhotons_invmass_MCcutTest3_new_%i (MC-true cut: test); "
781 "invariant mass of 4 e^{#pm} in GeV/c^{2}; #",
782 i),
783 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
785
787 new TH2D(Form("fhPhotons_pt_vs_rap_new_%i", i), Form("fhPhotons_pt_vs_rap_new_%i; p_{t} in GeV/c; rapidity y", i),
788 240, -2., 10., 270, -2., 7.);
790
792 new TH1D(Form("fhElectrons_openingAngle_sameSign_new_%i", i),
793 Form("fhElectrons_openingAngle_sameSign_new_%i; opening angle; #", i), 101, -0.5, 100.5);
795
796
797 fhMixedEventsTest_invmass[i] = new TH1D(Form("fhMixedEventsTest_invmass_%i", i),
798 Form("fhMixedEventsTest_invmass_%i; invariant mass of 4 e^{#pm} "
799 "in GeV/c^{2}; #",
800 i),
801 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
803
804 fhPhotons_stats[i] = new TH1D(Form("fhPhotons_stats_%i", i), Form("fhPhotons_stats_%i; ; #", i), 16, 0, 16);
806 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(1, "fullrec_allCombs");
807 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(2, "fullrec_cut1");
808 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(3, "fullrec_cut2");
809 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(4, "fullrec_cut3");
810 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(5, "fullrec_cut4");
811 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(6, "fullrec_cut5");
812 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(7, "fullrec_cut6");
813 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(8, "");
814 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(9, "mix_allCombs");
815 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(10, "mix_cut1");
816 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(11, "mix_cut2");
817 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(12, "mix_cut3");
818 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(13, "mix_cut4");
819 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(14, "mix_cut5");
820 fhPhotons_stats[i]->GetXaxis()->SetBinLabel(15, "mix_cut6");
821
822
824 new TH1D(Form("fhPhotons_peakCheck1_%i", i), Form("fhPhotons_peakCheck1_%i; sum; #", i), 20, -0.5, 19.5);
826 new TH1D(Form("fhPhotons_peakCheck2_%i", i), Form("fhPhotons_peakCheck2_%i; sum; #", i), 20, -0.5, 19.5);
829
831 new TH2D(Form("fhPhotons_invmass_ANNcuts_new_%i", i),
832 Form("fhPhotons_invmass_ANNcuts_new_%i;ann;invariant mass of 4 "
833 "e^{#pm} in GeV/c^{2}",
834 i),
835 10, 0, 10, invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
837
838
840 new TH2D(Form("fhPhotons_phaseSpace_pi0_%i", i),
841 Form("fhPhotons_phaseSpace_pi0_%i; p_{t} in GeV/c;rapidity y", i), 240, -2., 10., 270, -2., 7.);
843 new TH2D(Form("fhPhotons_phaseSpace_eta_%i", i),
844 Form("fhPhotons_phaseSpace_eta_%i; p_{t} in GeV/c;rapidity y", i), 240, -2., 10., 270, -2., 7.);
847 }
848
849
850 fhPhotons_MCtrue_pdgCodes = new TH1D(Form("fhPhotons_MCtrue_pdgCodes_%i", 4),
851 Form("fhPhotons_MCtrue_pdgCodes_%i; pdg code; #", 4), 1000, 0, 1000);
853
854
855 // EVENT MIXING HISTOGRAMS
856 // =======================
857 fhMixedEventsTest2_invmass = new TH1D(Form("fhMixedEventsTest2_invmass_%i", 4),
858 Form("fhMixedEventsTest2_invmass_%i; invariant mass of 4 e^{#pm} "
859 "in GeV/c^{2}; #",
860 4),
861 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
863 fhMixedEventsTest3_invmass = new TH1D(Form("fhMixedEventsTest3_invmass_%i", 4),
864 Form("fhMixedEventsTest3_invmass_%i; invariant mass of 4 e^{#pm} "
865 "in GeV/c^{2}; #",
866 4),
867 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
869
870 fhMixedEventsTest4_invmass = new TH1D(Form("fhMixedEventsTest4_invmass_%i", 4),
871 Form("fhMixedEventsTest4_invmass_%i; invariant mass of 4 e^{#pm} "
872 "in GeV/c^{2}; #",
873 4),
874 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
876 fhMixedEventsTest4_invmass_ann0 = new TH1D(Form("fhMixedEventsTest4_invmass_ann0_%i", 4),
877 Form("fhMixedEventsTest4_invmass_ann0_%i; invariant mass of 4 "
878 "e^{#pm} in GeV/c^{2}; #",
879 4),
880 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
882
884 new TH2D(Form("fhMixedEventsTest4_pt_vs_rap_%i", 4),
885 Form("fhMixedEventsTest4_pt_vs_rap_%i; p_{t} in GeV/c; rapidity y", 4), 240, -2., 10., 270, -2., 7.);
887
888 fhMixedEventsTest4_invmass_ptBin1 = new TH1D(Form("fhMixedEventsTest4_invmass_%i_ptBin1", 4),
889 Form("fhMixedEventsTest4_invmass_%i_ptBin1; invariant mass of 4 "
890 "e^{#pm} in GeV/c^{2}; #",
891 4),
892 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
894 fhMixedEventsTest4_invmass_ptBin2 = new TH1D(Form("fhMixedEventsTest4_invmass_%i_ptBin2", 4),
895 Form("fhMixedEventsTest4_invmass_%i_ptBin2; invariant mass of 4 "
896 "e^{#pm} in GeV/c^{2}; #",
897 4),
898 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
900 fhMixedEventsTest4_invmass_ptBin3 = new TH1D(Form("fhMixedEventsTest4_invmass_%i_ptBin3", 4),
901 Form("fhMixedEventsTest4_invmass_%i_ptBin3; invariant mass of 4 "
902 "e^{#pm} in GeV/c^{2}; #",
903 4),
904 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
906 fhMixedEventsTest4_invmass_ptBin4 = new TH1D(Form("fhMixedEventsTest4_invmass_%i_ptBin4", 4),
907 Form("fhMixedEventsTest4_invmass_%i_ptBin4; invariant mass of 4 "
908 "e^{#pm} in GeV/c^{2}; #",
909 4),
910 invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
912
914 new TH2D(Form("fhMixedEventsTest4_invmass_ANNcuts_%i", 4),
915 Form("fhMixedEventsTest4_invmass_ANNcuts_%i;; invariant mass of 4 "
916 "e^{#pm} in GeV/c^{2}",
917 4),
918 10, 0, 10, invmassSpectra_nof, invmassSpectra_start, invmassSpectra_end);
920}
921
922
924{
925
926
927 gDirectory->mkdir("RecoFull");
928 gDirectory->cd("RecoFull");
929
930 gDirectory->mkdir("NoRefit-NoChicut"); // index 1
931 gDirectory->cd("NoRefit-NoChicut");
932 for (UInt_t i = 0; i < fHistoList_recofull_new[1].size(); i++) {
933 //for (UInt_t i = 0; i < fHistoList_recofull_1.size(); i++){
934 //fHistoList_recofull_1[i]->Write();
935 fHistoList_recofull_new[1][i]->Write();
936 }
937 gDirectory->cd("..");
938
939 gDirectory->mkdir("NoRefit-WithChicut"); // index 2
940 gDirectory->cd("NoRefit-WithChicut");
941 for (UInt_t i = 0; i < fHistoList_recofull_new[2].size(); i++) {
942 //for (UInt_t i = 0; i < fHistoList_recofull_2.size(); i++){
943 //fHistoList_recofull_2[i]->Write();
944 fHistoList_recofull_new[2][i]->Write();
945 }
946 gDirectory->cd("..");
947
948 gDirectory->mkdir("WithRefit-NoChicut"); // index 3
949 gDirectory->cd("WithRefit-NoChicut");
950 for (UInt_t i = 0; i < fHistoList_recofull_new[3].size(); i++) {
951 //for (UInt_t i = 0; i < fHistoList_recofull_3.size(); i++){
952 //fHistoList_recofull_3[i]->Write();
953 fHistoList_recofull_new[3][i]->Write();
954 }
955 gDirectory->cd("..");
956
957 gDirectory->mkdir("WithRefit-WithChicut"); // index 4
958 gDirectory->cd("WithRefit-WithChicut");
959 for (UInt_t i = 0; i < fHistoList_recofull_new[4].size(); i++) {
960 //for (UInt_t i = 0; i < fHistoList_recofull_4.size(); i++){
961 //fHistoList_recofull_4[i]->Write();
962 fHistoList_recofull_new[4][i]->Write();
963 }
964 gDirectory->cd("..");
965
966 for (UInt_t i = 0; i < fHistoList_recofull.size(); i++) {
967 fHistoList_recofull[i]->Write();
968 }
969 gDirectory->cd("..");
970
971
972 cout << "CbmAnaConversionRecoFull: Realtime - " << fTime << endl;
973}
974
976{
977 timer.Start();
978
980
981 if (fPrimVertex != NULL) { fKFVertex = CbmKFVertex(*fPrimVertex); }
982 else {
983 Fatal("CbmAnaConversion::Exec", "No PrimaryVertex array!");
984 }
985
986
987 fElectrons_track.clear();
988 fElectrons_momenta.clear();
989 fElectrons_momentaChi.clear();
990 fElectrons_mctrackID.clear();
991 fVector_photons_pairs.clear();
992
993 fElectrons_track_1.clear();
994 fElectrons_momenta_1.clear();
998
999 fElectrons_track_2.clear();
1000 fElectrons_momenta_2.clear();
1002 fElectrons_mctrackID_2.clear();
1004
1005 fElectrons_track_3.clear();
1006 fElectrons_momenta_3.clear();
1008 fElectrons_mctrackID_3.clear();
1010
1011 fElectrons_track_4.clear();
1012 fElectrons_momenta_4.clear();
1014 fElectrons_mctrackID_4.clear();
1016
1017
1018 for (int i = 1; i <= 4; i++) {
1019 fElectrons_track_new[i].clear();
1020 fElectrons_momenta_new[i].clear();
1021 fElectrons_momentaChi_new[i].clear();
1022 fElectrons_mctrackID_new[i].clear();
1024 fVector_photons_pairs_new[i].clear();
1025
1026 while (fMixedEventsElectrons[i].size() > 20) {
1027 fMixedEventsElectrons[i].erase(fMixedEventsElectrons[i].begin());
1029 }
1030 }
1031
1032
1033 // execution each 20/100 events (i.e. accumulation of data over 20/100 events)
1034 if (globalEventNo % 20 == 0) {
1036 fMixedTest3_momenta.clear();
1037 fMixedTest3_gtrack.clear();
1038 fMixedTest3_eventno.clear();
1039 }
1040 if (globalEventNo % 200 == 0) {
1042 fMixedTest4_photons.clear();
1043 fMixedTest4_mctracks.clear();
1044 fMixedTest4_eventno.clear();
1047 }
1048
1049
1050 fElectrons_track_refit.clear();
1053
1055
1056 Int_t nofGT_richsts = 0;
1057 Int_t nofElectrons = 0;
1058 Int_t nofElectrons_1 = 0;
1059 Int_t nofElectrons_2 = 0;
1060 Int_t nofElectrons_3 = 0;
1061 Int_t nofElectrons_4 = 0;
1062
1063
1064 Int_t FilledMixedEventElectron =
1065 0; // just one variable for test1 here, because only the first identified electron of each event should be taken (therefore the check below for variable < 5)
1066
1067 // everything related to reconstructed data
1068 Int_t nofGlobalTracks = fGlobalTracks->GetEntriesFast();
1069 cout << "CbmAnaConversionRecoFull: number of global tracks " << nofGlobalTracks << endl;
1070 for (int iG = 0; iG < nofGlobalTracks; iG++) {
1071 CbmGlobalTrack* gTrack = (CbmGlobalTrack*) fGlobalTracks->At(iG);
1072 if (NULL == gTrack) continue;
1073 int stsInd = gTrack->GetStsTrackIndex();
1074 int richInd = gTrack->GetRichRingIndex();
1075 if (richInd < 0) continue;
1076 if (stsInd < 0) continue;
1077
1078 CbmStsTrack* stsTrack = (CbmStsTrack*) fStsTracks->At(stsInd);
1079 if (stsTrack == NULL) continue;
1080
1081 /* CbmTrackMatchNew* stsMatch = (CbmTrackMatchNew*)fStsTrackMatches->At(stsInd);
1082 if (stsMatch == NULL) continue;
1083 int stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
1084 if (stsMcTrackId < 0) continue;
1085 CbmMCTrack* mcTrack1 = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
1086 if (mcTrack1 == NULL) continue;
1087
1088 CbmTrackMatchNew* richMatch = (CbmTrackMatchNew*)fRichRingMatches->At(richInd);
1089 if (richMatch == NULL) continue;
1090 int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
1091 if (richMcTrackId < 0) continue;
1092 CbmMCTrack* mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
1093 if (mcTrack2 == NULL) continue;
1094*/
1095 CbmTrackMatchNew* stsMatch = (CbmTrackMatchNew*) fStsTrackMatches->At(stsInd);
1096 int stsMcTrackId = 0;
1097 CbmMCTrack* mcTrack1;
1098 if (stsMatch != NULL) {
1099 if (stsMatch->GetNofLinks() > 0) {
1100 stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
1101 if (stsMcTrackId >= 0) {
1102 mcTrack1 = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
1103 if (mcTrack1 == NULL) stsMcTrackId = 0;
1104 }
1105 }
1106 }
1107
1108 CbmTrackMatchNew* richMatch = (CbmTrackMatchNew*) fRichRingMatches->At(richInd);
1109 int richMcTrackId = 0;
1110 CbmMCTrack* mcTrack2 = NULL;
1111 if (richMatch != NULL) {
1112 richMcTrackId = richMatch->GetMatchedLink().GetIndex();
1113 if (richMcTrackId >= 0) {
1114 mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
1115 if (mcTrack2 == NULL) richMcTrackId = 0;
1116 }
1117 }
1118
1119 //if(stsMcTrackId != richMcTrackId) continue;
1120 nofGT_richsts++;
1121
1122 // int pdg = TMath::Abs(mcTrack1->GetPdgCode());
1123
1124
1125 // calculate refitted momenta at primary vertex
1126 TVector3 refittedMomentum;
1127 CbmL1PFFitter fPFFitter;
1128 vector<CbmStsTrack> stsTracks;
1129 stsTracks.resize(1);
1130 stsTracks[0] = *stsTrack;
1131 vector<CbmL1PFFitter::PFFieldRegion> vField;
1132 vector<float> chiPrim;
1133 fPFFitter.GetChiToVertex(stsTracks, vField, chiPrim, fKFVertex, 3e6);
1134 //cand.chi2sts = stsTracks[0].GetChiSq() / stsTracks[0].GetNDF();
1135 //cand.chi2Prim = chiPrim[0];
1136 const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
1137 vtxTrack->Momentum(refittedMomentum);
1138
1139 // Double_t result_chi2ndf = stsTracks[0].GetChiSq() / stsTracks[0].GetNDF();
1140 float result_chi = chiPrim[0];
1141 fhMomentumFits->Fill(result_chi);
1142 // Int_t pidHypo = gTrack->GetPidHypo();
1143
1144 // #################################################################
1145 // ##### up to here standard calculation of reconstructed data #####
1146 // #################################################################
1147
1148
1149 // indizes in the following
1150 // 1 = no refit, no chicut
1151 // 2 = no refit, with chicut
1152 // 3 = with refit, no chicut
1153 // 4 = with refit, with chicut
1154
1155
1156 Bool_t electron_rich2 = CbmLitGlobalElectronId::GetInstance().IsRichElectron(iG, refittedMomentum.Mag());
1157
1158
1159 Double_t chiCut = CbmAnaConversionCutSettings::CalcChiCut(refittedMomentum.Perp());
1160
1161
1162 if (electron_rich2) { // electron identification without refit of momentum
1163 nofElectrons_1++;
1164 fElectrons_track_1.push_back(gTrack);
1165 fElectrons_momenta_1.push_back(refittedMomentum);
1166 fElectrons_momentaChi_1.push_back(result_chi);
1167 //fElectrons_mctrackID_1.push_back(richMcTrackId);
1168 fElectrons_mctrackID_1.push_back(stsMcTrackId);
1169
1170 fElectrons_track_new[1].push_back(gTrack);
1171 fElectrons_momenta_new[1].push_back(refittedMomentum);
1172 fElectrons_momentaChi_new[1].push_back(result_chi);
1173 //fElectrons_mctrackID_1.push_back(richMcTrackId);
1174 fElectrons_mctrackID_new[1].push_back(stsMcTrackId);
1175 fElectrons_globaltrackID_new[1].push_back(iG);
1176
1177 if (FilledMixedEventElectron < 5) {
1178 fMixedEventsElectrons[1].push_back(refittedMomentum);
1179 fMixedEventsElectrons_gtrack[1].push_back(gTrack);
1180 FilledMixedEventElectron++;
1181 }
1182
1183 // using the old method
1184 fElectrons_track.push_back(gTrack);
1185 fElectrons_momenta.push_back(refittedMomentum);
1186 fElectrons_momentaChi.push_back(result_chi);
1187 //fElectrons_mctrackID_1.push_back(richMcTrackId);
1188 fElectrons_mctrackID.push_back(stsMcTrackId);
1189
1190 if (result_chi <= chiCut) {
1191 nofElectrons_2++;
1192 fElectrons_track_2.push_back(gTrack);
1193 fElectrons_momenta_2.push_back(refittedMomentum);
1194 fElectrons_momentaChi_2.push_back(result_chi);
1195 //fElectrons_mctrackID_2.push_back(richMcTrackId);
1196 fElectrons_mctrackID_2.push_back(stsMcTrackId);
1197
1198 fElectrons_track_new[2].push_back(gTrack);
1199 fElectrons_momenta_new[2].push_back(refittedMomentum);
1200 fElectrons_momentaChi_new[2].push_back(result_chi);
1201 //fElectrons_mctrackID_1.push_back(richMcTrackId);
1202 fElectrons_mctrackID_new[2].push_back(stsMcTrackId);
1203 fElectrons_globaltrackID_new[2].push_back(iG);
1204
1205 if (FilledMixedEventElectron < 5) {
1206 fMixedEventsElectrons[2].push_back(refittedMomentum);
1207 fMixedEventsElectrons_gtrack[2].push_back(gTrack);
1208 FilledMixedEventElectron++;
1209 }
1210 }
1211 }
1212
1213
1214 // Doing refit of momenta
1215
1216 CbmL1PFFitter fPFFitter_electron;
1217 vector<CbmStsTrack> stsTracks_electron;
1218 stsTracks_electron.resize(1);
1219 stsTracks_electron[0] = *stsTrack;
1220 vector<CbmL1PFFitter::PFFieldRegion> vField_electron;
1221 vector<float> chiPrim_electron;
1222 vector<int> pidHypo_electron;
1223 pidHypo_electron.push_back(11);
1224 fPFFitter_electron.Fit(stsTracks_electron, pidHypo_electron);
1225 fPFFitter_electron.GetChiToVertex(stsTracks_electron, vField_electron, chiPrim_electron, fKFVertex, 3e6);
1226
1227 TVector3 refittedMomentum_electron;
1228 const FairTrackParam* vtxTrack_electron = stsTracks_electron[0].GetParamFirst();
1229 vtxTrack_electron->Momentum(refittedMomentum_electron);
1230 float result_chi_electron = chiPrim_electron[0];
1231
1232 refittedMomentum = refittedMomentum_electron;
1233 result_chi = result_chi_electron;
1234
1235 //cout << "refitted momenta!" << endl;
1236
1237
1238 Bool_t electron_rich = CbmLitGlobalElectronId::GetInstance().IsRichElectron(iG, refittedMomentum.Mag());
1239 //Bool_t electron_rich = (pdg == 11);
1240 Bool_t electron_trd = CbmLitGlobalElectronId::GetInstance().IsTrdElectron(iG, refittedMomentum.Mag());
1241 Bool_t electron_tof = CbmLitGlobalElectronId::GetInstance().IsTofElectron(iG, refittedMomentum.Mag());
1242
1243
1244 if (electron_rich) { // electron identification with refit of momentum
1245 nofElectrons_3++;
1246 fElectrons_track_3.push_back(gTrack);
1247 fElectrons_momenta_3.push_back(refittedMomentum);
1248 fElectrons_momentaChi_3.push_back(result_chi);
1249 //fElectrons_mctrackID_3.push_back(richMcTrackId);
1250 fElectrons_mctrackID_3.push_back(stsMcTrackId);
1251
1252 fElectrons_track_new[3].push_back(gTrack);
1253 fElectrons_momenta_new[3].push_back(refittedMomentum);
1254 fElectrons_momentaChi_new[3].push_back(result_chi);
1255 //fElectrons_mctrackID_1.push_back(richMcTrackId);
1256 fElectrons_mctrackID_new[3].push_back(stsMcTrackId);
1257 fElectrons_globaltrackID_new[3].push_back(iG);
1258
1259 if (FilledMixedEventElectron < 5) {
1260 fMixedEventsElectrons[3].push_back(refittedMomentum);
1261 fMixedEventsElectrons_gtrack[3].push_back(gTrack);
1262 FilledMixedEventElectron++;
1263 }
1264 if (result_chi <= chiCut) {
1265 nofElectrons_4++;
1266 fElectrons_track_4.push_back(gTrack);
1267 fElectrons_momenta_4.push_back(refittedMomentum);
1268 fElectrons_momentaChi_4.push_back(result_chi);
1269 //fElectrons_mctrackID_4.push_back(richMcTrackId);
1270 fElectrons_mctrackID_4.push_back(stsMcTrackId);
1271
1272 fElectrons_track_new[4].push_back(gTrack);
1273 fElectrons_momenta_new[4].push_back(refittedMomentum);
1274 fElectrons_momentaChi_new[4].push_back(result_chi);
1275 //fElectrons_mctrackID_1.push_back(richMcTrackId);
1276 fElectrons_mctrackID_new[4].push_back(stsMcTrackId);
1277 fElectrons_globaltrackID_new[4].push_back(iG);
1278
1279 // for event mixing technique
1280 if (FilledMixedEventElectron < 5) { // test1
1281 fMixedEventsElectrons[4].push_back(refittedMomentum);
1282 fMixedEventsElectrons_gtrack[4].push_back(gTrack);
1283 FilledMixedEventElectron++;
1284 }
1285 // test3
1286 fMixedTest3_momenta.push_back(refittedMomentum);
1287 fMixedTest3_gtrack.push_back(gTrack);
1289 }
1290
1291 fhMomentumFits_electronRich->Fill(result_chi);
1292 //TVector3 startvertex;
1293 //mcTrack2->GetStartVertex(startvertex);
1294 //fhPhotons_startvertex_vs_chi->Fill(startvertex.Z(), result_chi);
1295 }
1296
1297
1298 if (electron_rich) fhElectrons->Fill(0);
1299 if (electron_trd) fhElectrons->Fill(1);
1300 if (electron_tof) fhElectrons->Fill(2);
1301 if (electron_rich && electron_trd) fhElectrons->Fill(3);
1302 if (electron_rich && electron_tof) fhElectrons->Fill(4);
1303 if (electron_trd && electron_tof) fhElectrons->Fill(5);
1304 if (electron_rich && electron_trd && electron_tof) fhElectrons->Fill(6);
1305 if ((electron_rich && electron_trd) || (electron_rich && electron_tof) || (electron_trd && electron_tof))
1306 fhElectrons->Fill(7);
1307 }
1308
1309
1310 // for mixed events technique, test2
1319
1320
1321 fhElectrons_nofPerEvent->Fill(nofElectrons);
1322 fhElectrons_nofPerEvent_1->Fill(nofElectrons_1);
1323 fhElectrons_nofPerEvent_2->Fill(nofElectrons_2);
1324 fhElectrons_nofPerEvent_3->Fill(nofElectrons_3);
1325 fhElectrons_nofPerEvent_4->Fill(nofElectrons_4);
1326
1327 cout << "CbmAnaConversionRecoFull: number of global tracks in STS and RICH " << nofGT_richsts << endl;
1328
1331
1332 cout << "CbmAnaConversionRecoFull: combining for each case!" << endl;
1333
1334 for (int i = 1; i <= 4; i++) {
1335 cout << "CbmAnaConversionRecoFull: case " << i << endl;
1340 }
1341 /*
1342 CombineElectrons(fElectrons_track_1, fElectrons_momenta_1, fElectrons_momentaChi_1, fElectrons_mctrackID_1, fVector_photons_pairs_1, 1);
1343 CombinePhotons(fElectrons_track_1, fElectrons_momenta_1, fElectrons_momentaChi_1, fElectrons_mctrackID_1, fVector_photons_pairs_1, 1);
1344
1345 CombineElectrons(fElectrons_track_2, fElectrons_momenta_2, fElectrons_momentaChi_2, fElectrons_mctrackID_2, fVector_photons_pairs_2, 2);
1346 CombinePhotons(fElectrons_track_2, fElectrons_momenta_2, fElectrons_momentaChi_2, fElectrons_mctrackID_2, fVector_photons_pairs_2, 2);
1347
1348 CombineElectrons(fElectrons_track_3, fElectrons_momenta_3, fElectrons_momentaChi_3, fElectrons_mctrackID_3, fVector_photons_pairs_3, 3);
1349 CombinePhotons(fElectrons_track_3, fElectrons_momenta_3, fElectrons_momentaChi_3, fElectrons_mctrackID_3, fVector_photons_pairs_3, 3);
1350
1351 CombineElectrons(fElectrons_track_4, fElectrons_momenta_4, fElectrons_momentaChi_4, fElectrons_mctrackID_4, fVector_photons_pairs_4, 4);
1352 CombinePhotons(fElectrons_track_4, fElectrons_momenta_4, fElectrons_momentaChi_4, fElectrons_mctrackID_4, fVector_photons_pairs_4, 4);
1353*/
1354 //CombineElectronsRefit();
1355 //CombinePhotonsRefit();
1356
1357 //CombinePhotonsDirection();
1358
1359
1362
1363 timer.Stop();
1364 fTime += timer.RealTime();
1365}
1366
1367
1368//void CbmAnaConversionRecoFull::CombineElectrons( vector<CbmGlobalTrack*> gtrack, vector<TVector3> momenta, vector<float> momentaChi, vector<int> mctrackID)
1369void CbmAnaConversionRecoFull::CombineElectrons(vector<CbmGlobalTrack*> gtrack, vector<TVector3> momenta,
1370 vector<float> /*momentaChi*/, vector<int> /*mctrackID*/,
1371 vector<vector<int>> reconstructedPhotons, Int_t index)
1372{
1373 Int_t nof = momenta.size();
1374 fhElectrons_nofPerEvent_new[index]->Fill(nof);
1375 cout << "CbmAnaConversionRecoFull: " << index << ": CombineElectrons, nof - " << nof << endl;
1376 Int_t nofPhotons = 0;
1377 if (nof >= 2) {
1378 for (int a = 0; a < nof - 1; a++) {
1379 for (int b = a + 1; b < nof; b++) {
1380 Int_t check1 =
1381 (gtrack[a]->GetParamLast()->GetQp() > 0); // positive or negative charge (qp = charge over momentum ratio)
1382 Int_t check2 = (gtrack[b]->GetParamLast()->GetQp() > 0);
1383 Int_t test = check1 + check2;
1384 if (test != 1) continue; // need one electron and one positron
1385 //if(fElectrons_momentaChi[a] > 10 || fElectrons_momentaChi[b] > 10) continue;
1386
1387 LmvmKinePar params1 = CalculateKinematicParamsReco(momenta[a], momenta[b]);
1388
1391
1392 Double_t openingAngleCut = 1.8 - 0.6 * paramsTest.fPt;
1393 Double_t invMassCut = 0.03;
1394
1395 Int_t IsPhoton_openingAngle1 = (paramsTest.fAngle < openingAngleCut);
1396 Int_t IsPhoton_invMass1 = (paramsTest.fMinv < invMassCut);
1397
1398 /*
1399 Double_t tXa = gtrack[a]->GetParamLast()->GetTx();
1400 Double_t tYa = gtrack[a]->GetParamLast()->GetTy();
1401 Double_t tXb = gtrack[b]->GetParamLast()->GetTx();
1402 Double_t tYb = gtrack[b]->GetParamLast()->GetTy();
1403*/
1404
1405 if (IsPhoton_openingAngle1 && IsPhoton_invMass1) {
1406 nofPhotons++;
1407 vector<int> pair; // = {a, b};
1408 pair.push_back(a);
1409 pair.push_back(b);
1410 reconstructedPhotons.push_back(pair);
1411
1412 if (index == 1) {
1413 fhElectrons_invmass_1->Fill(params1.fMinv);
1414 fVector_photons_pairs_1.push_back(pair);
1415 //fVector_photons_pairs.push_back(pair);
1416 }
1417 if (index == 2) {
1418 fhElectrons_invmass_2->Fill(params1.fMinv);
1419 fVector_photons_pairs_2.push_back(pair);
1420 }
1421 if (index == 3) {
1422 fhElectrons_invmass_3->Fill(params1.fMinv);
1423 fVector_photons_pairs_3.push_back(pair);
1424 }
1425 if (index == 4) {
1426 fhElectrons_invmass_4->Fill(params1.fMinv);
1427 fVector_photons_pairs_4.push_back(pair);
1428 }
1429
1430 fhElectrons_invmass_new[index]->Fill(params1.fMinv);
1431 fVector_photons_pairs_new[index].push_back(pair);
1432
1433
1434 //fVector_photons_momenta.push_back(params1.momPair);
1435
1436 //fhPhotons_tX->Fill(tXa);
1437 //fhPhotons_tX->Fill(tXb);
1438 //fhPhotons_tY->Fill(tYa);
1439 //fhPhotons_tY->Fill(tYb);
1440
1441 TVector3 momentumE1f;
1442 TVector3 momentumE2f;
1443 gtrack[a]->GetParamFirst()->Momentum(momentumE1f);
1444 gtrack[b]->GetParamFirst()->Momentum(momentumE2f);
1445 TVector3 momentumE1l;
1446 TVector3 momentumE2l;
1447 gtrack[a]->GetParamLast()->Momentum(momentumE1l);
1448 gtrack[b]->GetParamLast()->Momentum(momentumE2l);
1449
1450 //Double_t energyE1 = TMath::Sqrt(momentumE1.Mag2() + M2E);
1451 //TLorentzVector lorVecE1(momentumE1, energyE1);
1452 //Double_t energyE2 = TMath::Sqrt(momentumE2.Mag2() + M2E);
1453 //TLorentzVector lorVecE2(momentumE2, energyE2);
1454 //TLorentzVector g = lorVecE1 + lorVecE2;
1455
1456 //lorVecE1.Boost(g.BoostVector() );
1457 //lorVecE2.Boost(g.BoostVector() );
1458
1459 TVector3 normal1 = momentumE1f.Cross(momentumE1l);
1460 TVector3 normal2 = momentumE2f.Cross(momentumE2l);
1461 Double_t normalAngle = normal1.Angle(normal2);
1462 Double_t theta = 180. * normalAngle / TMath::Pi();
1463
1464 //Double_t boostAngle = lorVecE1.Angle(lorVecE2.Vect());
1465
1466 //fhPhotons_boostAngle->Fill(normalAngle);
1467
1468
1469 //if( TMath::Abs(tXa - tXb) < 0.5 || TMath::Abs(tYa - tYb) < 0.5 ) {
1470 if (theta < 30) { fVector_photons_pairs_direction.push_back(pair); }
1471
1472
1473 // mixed event test, test4
1474 if (index == 4) {
1475 vector<TVector3> pairmomenta;
1476 pairmomenta.push_back(momenta[a]);
1477 pairmomenta.push_back(momenta[b]);
1478 vector<CbmMCTrack*> pair_mctracks;
1479 pair_mctracks.push_back((CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID_new[index][a]));
1480 pair_mctracks.push_back((CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID_new[index][b]));
1481 fMixedTest4_photons.push_back(pairmomenta);
1483 fMixedTest4_mctracks.push_back(pair_mctracks);
1484
1485 vector<Bool_t> IsRichElectronAnn0;
1486 IsRichElectronAnn0.push_back(CbmLitGlobalElectronId::GetInstance().IsRichElectron(
1487 fElectrons_globaltrackID_new[index][a], momenta[a].Mag()));
1488 IsRichElectronAnn0.push_back(CbmLitGlobalElectronId::GetInstance().IsRichElectron(
1489 fElectrons_globaltrackID_new[index][b], momenta[b].Mag()));
1490 fMixedTest4_isRichElectronAnn0.push_back(IsRichElectronAnn0);
1491
1492 vector<Double_t> electronANNs;
1493 electronANNs.push_back(ElectronANNvalue(fElectrons_globaltrackID_new[index][a], momenta[a].Mag()));
1494 electronANNs.push_back(ElectronANNvalue(fElectrons_globaltrackID_new[index][b], momenta[b].Mag()));
1495 fMixedTest4_ElectronAnns.push_back(electronANNs);
1496 }
1497 }
1498 }
1499 }
1500 }
1501 //if(index == 1) fhPhotons_nofPerEvent_1->Fill(nofPhotons);
1502 //if(index == 2) fhPhotons_nofPerEvent_2->Fill(nofPhotons);
1503 //if(index == 3) fhPhotons_nofPerEvent_3->Fill(nofPhotons);
1504 //if(index == 4) fhPhotons_nofPerEvent_4->Fill(nofPhotons);
1505 fhPhotons_nofPerEvent_new[index]->Fill(nofPhotons);
1506 //fhPhotons_nofPerEvent->Fill(nofPhotons);
1507 cout << "CbmAnaConversionRecoFull: CombineElectrons: " << index
1508 << ": Crosscheck - nof reconstructed photons: " << nofPhotons << endl;
1509}
1510
1511
1512Double_t CbmAnaConversionRecoFull::Invmass_4particlesRECO(const TVector3 part1, const TVector3 part2,
1513 const TVector3 part3, const TVector3 part4)
1514// calculation of invariant mass from four electrons/positrons
1515{
1516 Double_t energy1 = TMath::Sqrt(part1.Mag2() + M2E);
1517 TLorentzVector lorVec1(part1, energy1);
1518
1519 Double_t energy2 = TMath::Sqrt(part2.Mag2() + M2E);
1520 TLorentzVector lorVec2(part2, energy2);
1521
1522 Double_t energy3 = TMath::Sqrt(part3.Mag2() + M2E);
1523 TLorentzVector lorVec3(part3, energy3);
1524
1525 Double_t energy4 = TMath::Sqrt(part4.Mag2() + M2E);
1526 TLorentzVector lorVec4(part4, energy4);
1527
1528 TLorentzVector sum;
1529 sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
1530
1531 return sum.Mag();
1532}
1533
1534
1535Double_t CbmAnaConversionRecoFull::Pt_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3,
1536 const TVector3 part4)
1537{
1538 Double_t energy1 = TMath::Sqrt(part1.Mag2() + M2E);
1539 TLorentzVector lorVec1(part1, energy1);
1540
1541 Double_t energy2 = TMath::Sqrt(part2.Mag2() + M2E);
1542 TLorentzVector lorVec2(part2, energy2);
1543
1544 Double_t energy3 = TMath::Sqrt(part3.Mag2() + M2E);
1545 TLorentzVector lorVec3(part3, energy3);
1546
1547 Double_t energy4 = TMath::Sqrt(part4.Mag2() + M2E);
1548 TLorentzVector lorVec4(part4, energy4);
1549
1550 TLorentzVector sum;
1551 sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
1552
1553 Double_t perp = sum.Perp();
1554 Double_t pt = TMath::Sqrt(sum.X() * sum.X() + sum.Y() * sum.Y());
1555
1556 cout << "CbmAnaConversionRecoFull::Pt_4particlesRECO: perp/pt = " << perp << " / " << pt << endl;
1557
1558 return perp;
1559}
1560
1561
1562Double_t CbmAnaConversionRecoFull::Rap_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3,
1563 const TVector3 part4)
1564{
1565 Double_t energy1 = TMath::Sqrt(part1.Mag2() + M2E);
1566 TLorentzVector lorVec1(part1, energy1);
1567
1568 Double_t energy2 = TMath::Sqrt(part2.Mag2() + M2E);
1569 TLorentzVector lorVec2(part2, energy2);
1570
1571 Double_t energy3 = TMath::Sqrt(part3.Mag2() + M2E);
1572 TLorentzVector lorVec3(part3, energy3);
1573
1574 Double_t energy4 = TMath::Sqrt(part4.Mag2() + M2E);
1575 TLorentzVector lorVec4(part4, energy4);
1576
1577 TLorentzVector sum;
1578 sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
1579
1580
1581 TVector3 momPair = part1 + part2 + part3 + part4;
1582 Double_t energyPair = energy1 + energy2 + energy3 + energy4;
1583 Double_t pzPair = momPair.Pz();
1584 Double_t yPair = 0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
1585
1586 cout << "CbmAnaConversionRecoFull::Rap_4particlesRECO: yPair = " << yPair << endl;
1587
1588 return yPair;
1589}
1590
1591
1592LmvmKinePar CbmAnaConversionRecoFull::CalculateKinematicParamsReco(const TVector3 electron1, const TVector3 electron2)
1593{
1594 LmvmKinePar params;
1595
1596 Double_t energyP = TMath::Sqrt(electron1.Mag2() + M2E);
1597 TLorentzVector lorVecP(electron1, energyP);
1598
1599 Double_t energyM = TMath::Sqrt(electron2.Mag2() + M2E);
1600 TLorentzVector lorVecM(electron2, energyM);
1601
1602 TVector3 momPair = electron1 + electron2;
1603 Double_t energyPair = energyP + energyM;
1604 Double_t ptPair = momPair.Perp();
1605 Double_t pzPair = momPair.Pz();
1606 Double_t yPair = 0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
1607 Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
1608 Double_t theta = 180. * anglePair / TMath::Pi();
1609 Double_t minv = 2. * TMath::Sin(anglePair / 2.) * TMath::Sqrt(electron1.Mag() * electron2.Mag());
1610
1611 params.fMomentumMag = momPair.Mag();
1612 params.fPt = ptPair;
1613 params.fRapidity = yPair;
1614 params.fMinv = minv;
1615 params.fAngle = theta;
1616 return params;
1617}
1618
1619
1621 const TVector3 part3, const TVector3 part4)
1622{
1623 LmvmKinePar params;
1624
1625 Double_t energy1 = TMath::Sqrt(part1.Mag2() + M2E);
1626 TLorentzVector lorVec1(part1, energy1);
1627
1628 Double_t energy2 = TMath::Sqrt(part2.Mag2() + M2E);
1629 TLorentzVector lorVec2(part2, energy2);
1630
1631 Double_t energy3 = TMath::Sqrt(part3.Mag2() + M2E);
1632 TLorentzVector lorVec3(part3, energy3);
1633
1634 Double_t energy4 = TMath::Sqrt(part4.Mag2() + M2E);
1635 TLorentzVector lorVec4(part4, energy4);
1636
1637 TLorentzVector sum;
1638 sum = lorVec1 + lorVec2 + lorVec3 + lorVec4;
1639
1640 TVector3 momPair = part1 + part2 + part3 + part4;
1641 Double_t energyPair = energy1 + energy2 + energy3 + energy4;
1642 Double_t ptPair = momPair.Perp();
1643 Double_t pzPair = momPair.Pz();
1644 Double_t yPair = 0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
1645 // Double_t anglePair = 0;
1646 // Double_t theta = 180.*anglePair/TMath::Pi();
1647 Double_t minv = sum.Mag();
1648
1649 params.fMomentumMag = momPair.Mag();
1650 params.fPt = ptPair;
1651 params.fRapidity = yPair;
1652 params.fMinv = minv;
1653 params.fAngle = 0;
1654 return params;
1655}
1656
1657
1658void CbmAnaConversionRecoFull::CombinePhotons(vector<CbmGlobalTrack*> gtrack, vector<TVector3> momenta,
1659 vector<float> momentaChi, vector<int>,
1660 vector<vector<int>> reconstructedPhotons, Int_t index)
1661// index: kind of electron cut: 1 = no refit, no chicut; 2 = no refit, with chicut; 3 = with refit, no chicut; 4 = with refit, with chicut
1662{
1663 if (index == 1) reconstructedPhotons = fVector_photons_pairs_1;
1664 if (index == 2) reconstructedPhotons = fVector_photons_pairs_2;
1665 if (index == 3) reconstructedPhotons = fVector_photons_pairs_3;
1666 if (index == 4) reconstructedPhotons = fVector_photons_pairs_4;
1667
1668 reconstructedPhotons = fVector_photons_pairs_new[index];
1669
1670 Int_t nofPi0 = 0;
1671
1672 Int_t nof = reconstructedPhotons.size();
1673 fhPhotons_nofPerEventAfter_new[index]->Fill(nof);
1674 cout << "CbmAnaConversionRecoFull: " << index << ": CombinePhotons, nof - " << nof << endl;
1675 if (nof >= 2) {
1676 for (int a = 0; a < nof - 1; a++) {
1677 for (int b = a + 1; b < nof; b++) {
1678 cout << "####" << endl;
1679 cout << "CbmAnaConversionRecoFull: calculating invariant mass! (" << a << "/" << b << ")" << endl;
1680 Int_t electron11 = reconstructedPhotons[a][0];
1681 Int_t electron12 = reconstructedPhotons[a][1];
1682 Int_t electron21 = reconstructedPhotons[b][0];
1683 Int_t electron22 = reconstructedPhotons[b][1];
1684 cout << "CbmAnaConversionRecoFull: calculating invariant mass! (" << electron11 << "/" << electron12 << "/"
1685 << electron21 << "/" << electron22 << ")" << endl;
1686
1687 if (electron11 == electron12 || electron11 == electron21 || electron11 == electron22 || electron12 == electron21
1688 || electron12 == electron22 || electron21 == electron22) {
1689 cout << "CbmAnaConversionRecoFull: RecoFull_DoubleIndex!" << endl;
1690 continue;
1691 }
1692 nofPi0++;
1693
1694 Int_t charge11 = (gtrack[electron11]->GetParamLast()->GetQp() > 0);
1695 //Int_t charge12 = (gtrack[electron12]->GetParamLast()->GetQp() > 0);
1696 Int_t charge21 = (gtrack[electron21]->GetParamLast()->GetQp() > 0);
1697 Int_t charge22 = (gtrack[electron22]->GetParamLast()->GetQp() > 0);
1698 if ((charge11 + charge21 == 2) || (charge11 + charge21 == 0)) {
1700 CbmAnaConversionKinematicParams::KinematicParams_2particles_Reco(momenta[electron11], momenta[electron21]);
1702 CbmAnaConversionKinematicParams::KinematicParams_2particles_Reco(momenta[electron12], momenta[electron22]);
1703 fhElectrons_openingAngle_sameSign_new[index]->Fill(paramsTest1.fAngle);
1704 fhElectrons_openingAngle_sameSign_new[index]->Fill(paramsTest2.fAngle);
1705 }
1706 if ((charge11 + charge22 == 2) || (charge11 + charge22 == 0)) {
1708 CbmAnaConversionKinematicParams::KinematicParams_2particles_Reco(momenta[electron11], momenta[electron22]);
1710 CbmAnaConversionKinematicParams::KinematicParams_2particles_Reco(momenta[electron12], momenta[electron21]);
1711 fhElectrons_openingAngle_sameSign_new[index]->Fill(paramsTest1.fAngle);
1712 fhElectrons_openingAngle_sameSign_new[index]->Fill(paramsTest2.fAngle);
1713 }
1714
1715 Double_t invmass =
1716 Invmass_4particlesRECO(momenta[electron11], momenta[electron12], momenta[electron21], momenta[electron22]);
1717
1718 if (index == 1) fhPhotons_invmass_1->Fill(invmass);
1719 if (index == 2) fhPhotons_invmass_2->Fill(invmass);
1720 if (index == 3) fhPhotons_invmass_3->Fill(invmass);
1721 if (index == 4) fhPhotons_invmass_4->Fill(invmass);
1722 fhPhotons_invmass_new[index]->Fill(invmass);
1723
1724 Double_t pt =
1725 Pt_4particlesRECO(momenta[electron11], momenta[electron12], momenta[electron21], momenta[electron22]);
1726 Double_t rap =
1727 Rap_4particlesRECO(momenta[electron11], momenta[electron12], momenta[electron21], momenta[electron22]);
1728
1729 fhPhotons_pt_vs_rap_new[index]->Fill(pt, rap);
1730
1731 Double_t opening_angle = OpeningAngleBetweenPhotons(momenta, reconstructedPhotons[a], reconstructedPhotons[b]);
1732 if (index == 1) fhPhotons_angleBetween->Fill(opening_angle);
1733
1734
1735 LmvmKinePar params1 = CalculateKinematicParams_4particles(momenta[electron11], momenta[electron12],
1736 momenta[electron21], momenta[electron22]);
1737
1739 momenta[electron11], momenta[electron12], momenta[electron21], momenta[electron22]);
1740
1741 Bool_t IsRichElectron_ann0_e11 = CbmLitGlobalElectronId::GetInstance().IsRichElectron(
1742 fElectrons_globaltrackID_new[index][electron11], momenta[electron11].Mag());
1743 Bool_t IsRichElectron_ann0_e12 = CbmLitGlobalElectronId::GetInstance().IsRichElectron(
1744 fElectrons_globaltrackID_new[index][electron12], momenta[electron12].Mag());
1745 Bool_t IsRichElectron_ann0_e21 = CbmLitGlobalElectronId::GetInstance().IsRichElectron(
1746 fElectrons_globaltrackID_new[index][electron21], momenta[electron21].Mag());
1747 Bool_t IsRichElectron_ann0_e22 = CbmLitGlobalElectronId::GetInstance().IsRichElectron(
1748 fElectrons_globaltrackID_new[index][electron22], momenta[electron22].Mag());
1749
1750 Double_t ANNe11 = ElectronANNvalue(fElectrons_globaltrackID_new[index][electron11], momenta[electron11].Mag());
1751 Double_t ANNe12 = ElectronANNvalue(fElectrons_globaltrackID_new[index][electron12], momenta[electron12].Mag());
1752 Double_t ANNe21 = ElectronANNvalue(fElectrons_globaltrackID_new[index][electron21], momenta[electron21].Mag());
1753 Double_t ANNe22 = ElectronANNvalue(fElectrons_globaltrackID_new[index][electron22], momenta[electron22].Mag());
1754
1755 if (IsRichElectron_ann0_e11 && IsRichElectron_ann0_e12 && IsRichElectron_ann0_e21 && IsRichElectron_ann0_e22) {
1756 fhPhotons_invmass_ann0_new[index]->Fill(invmass);
1757 }
1758 if (ANNe11 > -1 && ANNe12 > -1 && ANNe21 > -1 && ANNe22 > -1)
1759 fhPhotons_invmass_ANNcuts_new[index]->Fill(1, invmass);
1760 if (ANNe11 > -0.9 && ANNe12 > -0.9 && ANNe21 > -0.9 && ANNe22 > -0.9)
1761 fhPhotons_invmass_ANNcuts_new[index]->Fill(2, invmass);
1762 if (ANNe11 > -0.8 && ANNe12 > -0.8 && ANNe21 > -0.8 && ANNe22 > -0.8)
1763 fhPhotons_invmass_ANNcuts_new[index]->Fill(3, invmass);
1764 if (ANNe11 > -0.7 && ANNe12 > -0.7 && ANNe21 > -0.7 && ANNe22 > -0.7)
1765 fhPhotons_invmass_ANNcuts_new[index]->Fill(4, invmass);
1766 if (ANNe11 > -0.6 && ANNe12 > -0.6 && ANNe21 > -0.6 && ANNe22 > -0.6)
1767 fhPhotons_invmass_ANNcuts_new[index]->Fill(5, invmass);
1768 if (ANNe11 > -0.5 && ANNe12 > -0.5 && ANNe21 > -0.5 && ANNe22 > -0.5)
1769 fhPhotons_invmass_ANNcuts_new[index]->Fill(6, invmass);
1770 if (ANNe11 > -0.0 && ANNe12 > -0.0 && ANNe21 > -0.0 && ANNe22 > -0.0)
1771 fhPhotons_invmass_ANNcuts_new[index]->Fill(7, invmass);
1772
1773 cout << "CbmAnaConversionRecoFull: debug: (" << invmass << "/" << paramsTest.fMinv << ") - (" << pt << "/"
1774 << paramsTest.fPt << ") - (" << rap << "/" << paramsTest.fRapidity << ")" << endl;
1775
1776 //TVector3 momentumE1;
1777 //TVector3 momentumE2;
1778 //gtrack[a]->GetParamLast()->Momentum(momentumE1);
1779 //gtrack[b]->GetParamLast()->Momentum(momentumE2);
1780
1781 Double_t energyE11 = TMath::Sqrt(momenta[electron11].Mag2() + M2E);
1782 TLorentzVector lorVecE11(momenta[electron11], energyE11);
1783 Double_t energyE12 = TMath::Sqrt(momenta[electron12].Mag2() + M2E);
1784 TLorentzVector lorVecE12(momenta[electron12], energyE12);
1785 Double_t energyE21 = TMath::Sqrt(momenta[electron21].Mag2() + M2E);
1786 TLorentzVector lorVecE21(momenta[electron21], energyE21);
1787 Double_t energyE22 = TMath::Sqrt(momenta[electron22].Mag2() + M2E);
1788 TLorentzVector lorVecE22(momenta[electron22], energyE22);
1789 TLorentzVector g1 = lorVecE11 + lorVecE12;
1790 TLorentzVector g2 = lorVecE21 + lorVecE22;
1791 TLorentzVector pi = lorVecE11 + lorVecE12 + lorVecE21 + lorVecE22;
1792
1793 g1.Boost(-pi.BoostVector());
1794 g2.Boost(-pi.BoostVector());
1795
1796 Double_t boostAngle = g1.Angle(g2.Vect());
1797 Double_t theta = 180. * boostAngle / TMath::Pi();
1798
1799 if (index == 1) fhPhotons_boostAngleTest->Fill(boostAngle);
1800
1801 //if(opening_angle < 10) {
1802 if (true) {
1803 if (false) {
1804 fhPhotons_boostAngle->Fill(theta);
1805
1806 fhPhotons_invmass_cut->Fill(invmass);
1807 fhPhotons_invmass_vs_pt->Fill(invmass, pt);
1808 fhPhotons_rapidity_vs_pt->Fill(pt, rap);
1809 fhPhotons_invmass_vs_openingAngle->Fill(invmass, opening_angle);
1810 fhPhotons_openingAngle_vs_momentum->Fill(opening_angle, params1.fMomentumMag);
1811
1812 fhMomentumFits_pi0reco->Fill(momentaChi[electron11]);
1813 fhMomentumFits_pi0reco->Fill(momentaChi[electron12]);
1814 fhMomentumFits_pi0reco->Fill(momentaChi[electron21]);
1815 fhMomentumFits_pi0reco->Fill(momentaChi[electron22]);
1816
1817 fhPhotons_invmass_vs_chi->Fill(invmass, momentaChi[electron11]);
1818 fhPhotons_invmass_vs_chi->Fill(invmass, momentaChi[electron12]);
1819 fhPhotons_invmass_vs_chi->Fill(invmass, momentaChi[electron21]);
1820 fhPhotons_invmass_vs_chi->Fill(invmass, momentaChi[electron22]);
1821 }
1822
1823 if (index == 1) {
1824 if (pt <= 1) fhPhotons_invmass_ptBin1_1->Fill(invmass);
1825 if (pt > 1 && pt <= 2) fhPhotons_invmass_ptBin2_1->Fill(invmass);
1826 if (pt > 2 && pt <= 3) fhPhotons_invmass_ptBin3_1->Fill(invmass);
1827 if (pt > 3 && pt <= 4) fhPhotons_invmass_ptBin4_1->Fill(invmass);
1828 fhPhotons_invmass_vs_pt_1->Fill(invmass, pt);
1829 }
1830 if (index == 2) {
1831 if (pt <= 1) fhPhotons_invmass_ptBin1_2->Fill(invmass);
1832 if (pt > 1 && pt <= 2) fhPhotons_invmass_ptBin2_2->Fill(invmass);
1833 if (pt > 2 && pt <= 3) fhPhotons_invmass_ptBin3_2->Fill(invmass);
1834 if (pt > 3 && pt <= 4) fhPhotons_invmass_ptBin4_2->Fill(invmass);
1835 fhPhotons_invmass_vs_pt_2->Fill(invmass, pt);
1836 }
1837 if (index == 3) {
1838 if (pt <= 1) fhPhotons_invmass_ptBin1_3->Fill(invmass);
1839 if (pt > 1 && pt <= 2) fhPhotons_invmass_ptBin2_3->Fill(invmass);
1840 if (pt > 2 && pt <= 3) fhPhotons_invmass_ptBin3_3->Fill(invmass);
1841 if (pt > 3 && pt <= 4) fhPhotons_invmass_ptBin4_3->Fill(invmass);
1842 fhPhotons_invmass_vs_pt_3->Fill(invmass, pt);
1843 }
1844 if (index == 4) {
1845 if (pt <= 1) fhPhotons_invmass_ptBin1_4->Fill(invmass);
1846 if (pt > 1 && pt <= 2) fhPhotons_invmass_ptBin2_4->Fill(invmass);
1847 if (pt > 2 && pt <= 3) fhPhotons_invmass_ptBin3_4->Fill(invmass);
1848 if (pt > 3 && pt <= 4) fhPhotons_invmass_ptBin4_4->Fill(invmass);
1849 fhPhotons_invmass_vs_pt_4->Fill(invmass, pt);
1850
1851 if (!(fElectrons_mctrackID_new[index][electron11] == fElectrons_mctrackID_new[index][electron12]
1852 || fElectrons_mctrackID_new[index][electron11] == fElectrons_mctrackID_new[index][electron21]
1853 || fElectrons_mctrackID_new[index][electron11] == fElectrons_mctrackID_new[index][electron22]
1854 || fElectrons_mctrackID_new[index][electron12] == fElectrons_mctrackID_new[index][electron21]
1855 || fElectrons_mctrackID_new[index][electron12] == fElectrons_mctrackID_new[index][electron22]
1856 || fElectrons_mctrackID_new[index][electron21] == fElectrons_mctrackID_new[index][electron22])) {
1857 fhPhotons_invmass_MCcutTest_new[index]->Fill(invmass);
1858 }
1859 }
1860
1861 if (pt <= 0.5) fhPhotons_invmass_ptBin1_new[index]->Fill(invmass);
1862 if (pt > 0.5 && pt <= 1) fhPhotons_invmass_ptBin2_new[index]->Fill(invmass);
1863 if (pt > 1 && pt <= 1.5) fhPhotons_invmass_ptBin3_new[index]->Fill(invmass);
1864 if (pt > 1.5 && pt <= 2) fhPhotons_invmass_ptBin4_new[index]->Fill(invmass);
1865 if (pt > 2 && pt <= 2.5) fhPhotons_invmass_ptBin5_new[index]->Fill(invmass);
1866 if (pt > 2.5 && pt <= 3) fhPhotons_invmass_ptBin6_new[index]->Fill(invmass);
1867 fhPhotons_invmass_vs_pt_new[index]->Fill(invmass, pt);
1868
1869 /*
1870 Double_t chicut = 1.0;
1871 if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
1872 fhPhotons_invmass_cut_chi1->Fill(invmass);
1873 }
1874 chicut = 3.0;
1875 if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
1876 fhPhotons_invmass_cut_chi3->Fill(invmass);
1877 }
1878 chicut = 5.0;
1879 if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
1880 fhPhotons_invmass_cut_chi5->Fill(invmass);
1881 }
1882 chicut = 10.0;
1883 if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
1884 fhPhotons_invmass_cut_chi10->Fill(invmass);
1885 }
1886 chicut = 25.0;
1887 if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
1888 fhPhotons_invmass_cut_chi25->Fill(invmass);
1889 }
1890 chicut = 40.0;
1891 if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
1892 fhPhotons_invmass_cut_chi40->Fill(invmass);
1893 }
1894 chicut = 65.0;
1895 if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
1896 fhPhotons_invmass_cut_chi65->Fill(invmass);
1897 }
1898 chicut = 80.0;
1899 if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
1900 fhPhotons_invmass_cut_chi80->Fill(invmass);
1901 }
1902 */
1903
1904
1905 if (fElectrons_mctrackID_new[index][electron11] == 0 || fElectrons_mctrackID_new[index][electron12] == 0
1906 || fElectrons_mctrackID_new[index][electron21] == 0 || fElectrons_mctrackID_new[index][electron22] == 0)
1907 continue;
1908
1909 // CROSSCHECK WITH MC-TRUE DATA!
1910 CbmMCTrack* mctrack11 =
1911 (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID_new[index][electron11]); // mctracks of four leptons
1912 CbmMCTrack* mctrack12 = (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID_new[index][electron12]);
1913 CbmMCTrack* mctrack21 = (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID_new[index][electron21]);
1914 CbmMCTrack* mctrack22 = (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID_new[index][electron22]);
1915
1916 Int_t pdg11 = mctrack11->GetPdgCode(); // pdg codes of four leptons
1917 Int_t pdg12 = mctrack12->GetPdgCode();
1918 Int_t pdg21 = mctrack21->GetPdgCode();
1919 Int_t pdg22 = mctrack22->GetPdgCode();
1920
1921 Int_t motherId11 = mctrack11->GetMotherId(); // motherIDs of four leptons
1922 Int_t motherId12 = mctrack12->GetMotherId();
1923 Int_t motherId21 = mctrack21->GetMotherId();
1924 Int_t motherId22 = mctrack22->GetMotherId();
1925
1926 CbmMCTrack* mothermctrack11 = NULL; // mctracks of mother particles of the four leptons
1927 CbmMCTrack* mothermctrack12 = NULL;
1928 CbmMCTrack* mothermctrack21 = NULL;
1929 CbmMCTrack* mothermctrack22 = NULL;
1930 if (motherId11 > 0) mothermctrack11 = (CbmMCTrack*) fMcTracks->At(motherId11);
1931 if (motherId11 > 0) mothermctrack12 = (CbmMCTrack*) fMcTracks->At(motherId12);
1932 if (motherId11 > 0) mothermctrack21 = (CbmMCTrack*) fMcTracks->At(motherId21);
1933 if (motherId11 > 0) mothermctrack22 = (CbmMCTrack*) fMcTracks->At(motherId22);
1934
1935 Int_t motherpdg11 = -2; // pdg codes of the mother particles
1936 Int_t motherpdg12 = -2;
1937 Int_t motherpdg21 = -2;
1938 Int_t motherpdg22 = -2;
1939 if (mothermctrack11 != NULL) motherpdg11 = mothermctrack11->GetPdgCode();
1940 if (mothermctrack12 != NULL) motherpdg12 = mothermctrack12->GetPdgCode();
1941 if (mothermctrack21 != NULL) motherpdg21 = mothermctrack21->GetPdgCode();
1942 if (mothermctrack22 != NULL) motherpdg22 = mothermctrack22->GetPdgCode();
1943
1944 Int_t grandmotherId11 = -2; // grandmotherIDs of four leptons
1945 Int_t grandmotherId12 = -2;
1946 Int_t grandmotherId21 = -2;
1947 Int_t grandmotherId22 = -2;
1948 if (mothermctrack11 != NULL) grandmotherId11 = mothermctrack11->GetMotherId();
1949 if (mothermctrack12 != NULL) grandmotherId12 = mothermctrack12->GetMotherId();
1950 if (mothermctrack21 != NULL) grandmotherId21 = mothermctrack21->GetMotherId();
1951 if (mothermctrack22 != NULL) grandmotherId22 = mothermctrack22->GetMotherId();
1952
1953
1954 Int_t sameGrandmothers1 = 0;
1955 Int_t sameGrandmothers2 = 0;
1956 Int_t sameGrandmothers3 = 0;
1957 Int_t sameGrandmothers4 = 0;
1958 if (grandmotherId11 == grandmotherId12) sameGrandmothers1++;
1959 if (grandmotherId11 == grandmotherId21) sameGrandmothers1++;
1960 if (grandmotherId11 == grandmotherId22) sameGrandmothers1++;
1961 if (grandmotherId12 == grandmotherId11) sameGrandmothers2++;
1962 if (grandmotherId12 == grandmotherId21) sameGrandmothers2++;
1963 if (grandmotherId12 == grandmotherId22) sameGrandmothers2++;
1964 if (grandmotherId21 == grandmotherId11) sameGrandmothers3++;
1965 if (grandmotherId21 == grandmotherId12) sameGrandmothers3++;
1966 if (grandmotherId21 == grandmotherId22) sameGrandmothers3++;
1967 if (grandmotherId22 == grandmotherId11) sameGrandmothers4++;
1968 if (grandmotherId22 == grandmotherId12) sameGrandmothers4++;
1969 if (grandmotherId22 == grandmotherId21) sameGrandmothers4++;
1970 Int_t sameGrandmothersSum = sameGrandmothers1 + sameGrandmothers2 + sameGrandmothers3 + sameGrandmothers4;
1971
1972 Int_t sameMothers1 = 0;
1973 Int_t sameMothers2 = 0;
1974 Int_t sameMothers3 = 0;
1975 Int_t sameMothers4 = 0;
1976 if (motherId11 == motherId12) sameMothers1++;
1977 if (motherId11 == motherId21) sameMothers1++;
1978 if (motherId11 == motherId22) sameMothers1++;
1979 if (motherId12 == motherId11) sameMothers2++;
1980 if (motherId12 == motherId21) sameMothers2++;
1981 if (motherId12 == motherId22) sameMothers2++;
1982 if (motherId21 == motherId11) sameMothers3++;
1983 if (motherId21 == motherId12) sameMothers3++;
1984 if (motherId21 == motherId22) sameMothers3++;
1985 if (motherId22 == motherId11) sameMothers4++;
1986 if (motherId22 == motherId12) sameMothers4++;
1987 if (motherId22 == motherId21) sameMothers4++;
1988 Int_t sameMothersSum = sameMothers1 + sameMothers2 + sameMothers3 + sameMothers4;
1989
1990
1991 if (
1992 motherId11 == motherId12
1993 && motherId21
1994 == motherId22) { // both combined e+e- pairs come from the same mother (which can be gamma, pi0, or whatever)
1995 fhPhotons_invmass_MCcutAll_new[index]->Fill(1, invmass);
1996 if (TMath::Abs(motherpdg11) == 22 && TMath::Abs(motherpdg21) == 22) {
1997 fhPhotons_invmass_MCcutAll_new[index]->Fill(2, invmass);
1998 }
1999 if (TMath::Abs(motherpdg11) == 22 && TMath::Abs(motherpdg21) == 22 && grandmotherId11 == grandmotherId21
2000 && grandmotherId11 > 0) { // decay in to gg of pi0 and eta
2001 fhPhotons_invmass_MCcutAll_new[index]->Fill(3, invmass);
2002 if (invmass < 0.3) fhPhotons_phaseSpace_pi0[index]->Fill(paramsTest.fPt, paramsTest.fRapidity);
2003 if (invmass > 0.3) fhPhotons_phaseSpace_eta[index]->Fill(paramsTest.fPt, paramsTest.fRapidity);
2004 }
2005 if (TMath::Abs(motherpdg11) == 22 && TMath::Abs(motherpdg21) == 22 && grandmotherId11 != grandmotherId21) {
2006 fhPhotons_invmass_MCcutAll_new[index]->Fill(4, invmass);
2007 }
2008 if ((TMath::Abs(motherpdg11) == 22 && TMath::Abs(motherpdg21) == 111)
2009 || (TMath::Abs(motherpdg11) == 111 && TMath::Abs(motherpdg21) == 22)) {
2010 fhPhotons_invmass_MCcutAll_new[index]->Fill(5, invmass);
2011 if (grandmotherId11 == motherId21 || motherId11 == grandmotherId21) { // Dalitz decay
2012 fhPhotons_invmass_MCcutAll_new[index]->Fill(12, invmass);
2013 fhPhotons_phaseSpace_pi0[index]->Fill(paramsTest.fPt, paramsTest.fRapidity);
2014 }
2015 }
2016 if (TMath::Abs(motherpdg11) == 111 && TMath::Abs(motherpdg21) == 111) {
2017 fhPhotons_invmass_MCcutAll_new[index]->Fill(6, invmass);
2018 }
2019 if ((TMath::Abs(motherpdg11) != 22 && TMath::Abs(motherpdg11) != 111)
2020 || (TMath::Abs(motherpdg21) != 22 && TMath::Abs(motherpdg21) != 111)) {
2021 fhPhotons_invmass_MCcutAll_new[index]->Fill(7, invmass);
2022 }
2023 if (TMath::Abs(motherpdg11) != 22 && TMath::Abs(motherpdg11) != 111 && TMath::Abs(motherpdg21) != 22
2024 && TMath::Abs(motherpdg21) != 111) {
2025 fhPhotons_invmass_MCcutAll_new[index]->Fill(8, invmass);
2026 }
2027 if (grandmotherId11 == grandmotherId21) { fhPhotons_invmass_MCcutAll_new[index]->Fill(9, invmass); }
2028 }
2029 if ((motherId11 == motherId12 && motherId21 != motherId22)
2030 || (motherId11 != motherId12 && motherId21 == motherId22)) {
2031 fhPhotons_invmass_MCcutAll_new[index]->Fill(10, invmass);
2032 }
2033 if (motherId11 != motherId12 && motherId21 != motherId22) {
2034 fhPhotons_invmass_MCcutAll_new[index]->Fill(11, invmass);
2035 if (sameGrandmothersSum == 12) fhPhotons_invmass_MCcutAll_new[index]->Fill(13, invmass);
2036 if (sameGrandmothersSum == 6) fhPhotons_invmass_MCcutAll_new[index]->Fill(14, invmass);
2037 if (sameGrandmothersSum == 4) {
2038 fhPhotons_invmass_MCcutAll_new[index]->Fill(15, invmass);
2039 if (grandmotherId11 < 0 || grandmotherId12 < 0 || grandmotherId21 < 0 || grandmotherId22 < 0) {
2040 fhPhotons_invmass_MCcutAll_new[index]->Fill(16, invmass);
2041 }
2042 if (grandmotherId11 == grandmotherId12) { fhPhotons_invmass_MCcutAll_new[index]->Fill(17, invmass); }
2043 if (grandmotherId11 != grandmotherId12) { fhPhotons_invmass_MCcutAll_new[index]->Fill(18, invmass); }
2044 if ((motherId11 == motherId21 || motherId11 == motherId22)
2045 && (motherId12 == motherId21 || motherId11 == motherId22)) {
2046 fhPhotons_invmass_MCcutAll_new[index]->Fill(19, invmass);
2047 }
2048 }
2049 if (sameGrandmothersSum == 2) fhPhotons_invmass_MCcutAll_new[index]->Fill(20, invmass);
2050 if (sameGrandmothersSum == 0) fhPhotons_invmass_MCcutAll_new[index]->Fill(21, invmass);
2051 fhPhotons_peakCheck1[index]->Fill(sameGrandmothersSum);
2052 fhPhotons_peakCheck2[index]->Fill(sameMothersSum);
2053
2054 cout << "CbmAnaConversionRecoFull: MC-Crosscheck: " << electron11 << "/" << electron12 << "/" << electron21
2055 << "/" << electron22 << " - " << pdg11 << "/" << pdg12 << "/" << pdg21 << "/" << pdg22 << " - "
2056 << motherId11 << "/" << motherId12 << "/" << motherId21 << "/" << motherId22 << " - " << motherpdg11
2057 << "/" << motherpdg12 << "/" << motherpdg21 << "/" << motherpdg22 << endl;
2058 cout << "CbmAnaConversionRecoFull: MC-Crosscheck: " << grandmotherId11 << "/" << grandmotherId12 << "/"
2059 << grandmotherId21 << "/" << grandmotherId22 << endl;
2060 }
2061
2062
2063 // ################################################
2064 if (index == 4 && TMath::Abs(pdg11) == 11 && TMath::Abs(pdg12) == 11 && TMath::Abs(pdg21) == 11
2065 && TMath::Abs(pdg22) == 11) {
2066 fhPhotons_invmass_MCcutTest2_new[index]->Fill(invmass);
2067 }
2068 if (index == 4 && (pdg11 + pdg12 + pdg21 + pdg22) == 0) {
2069 fhPhotons_invmass_MCcutTest3_new[index]->Fill(invmass);
2070 }
2071
2072 if (index == 4 && invmass < 0.1) {
2073 fhPhotons_MCtrue_pdgCodes->Fill(TMath::Abs(pdg11));
2074 fhPhotons_MCtrue_pdgCodes->Fill(TMath::Abs(pdg21));
2075 fhPhotons_MCtrue_pdgCodes->Fill(TMath::Abs(pdg12));
2076 fhPhotons_MCtrue_pdgCodes->Fill(TMath::Abs(pdg22));
2077 }
2078
2079
2080 TVector3 startvertex11;
2081 mctrack11->GetStartVertex(startvertex11);
2082 TVector3 startvertex12;
2083 mctrack12->GetStartVertex(startvertex12);
2084 TVector3 startvertex21;
2085 mctrack21->GetStartVertex(startvertex21);
2086 TVector3 startvertex22;
2087 mctrack22->GetStartVertex(startvertex22);
2088
2089 //fhPhotons_MC_startvertexZ->Fill(startvertex11.Z());
2090 //fhPhotons_MC_startvertexZ->Fill(startvertex12.Z());
2091 //fhPhotons_MC_startvertexZ->Fill(startvertex21.Z());
2092 //fhPhotons_MC_startvertexZ->Fill(startvertex22.Z());
2093
2094 fhPhotons_stats[index]->Fill(0); // all combinations
2095
2096 if (motherId11 == motherId12 && motherId21 == motherId22) {
2097 fhPhotons_invmass_MCcut1_new[index]->Fill(invmass);
2098 fhPhotons_stats[index]->Fill(1);
2099 if (motherId11 != -1 && motherId21 != -1) {
2100 CbmMCTrack* mothermctrack11n = (CbmMCTrack*) fMcTracks->At(motherId11);
2101 CbmMCTrack* mothermctrack21n = (CbmMCTrack*) fMcTracks->At(motherId21);
2102
2103 Int_t grandmotherId11n = mothermctrack11n->GetMotherId();
2104 Int_t grandmotherId21n = mothermctrack21n->GetMotherId();
2105
2106 if (grandmotherId11n == grandmotherId21n) {
2107 fhPhotons_invmass_MCcut2_new[index]->Fill(invmass);
2108 fhPhotons_stats[index]->Fill(2);
2109 if (grandmotherId11n == -1) continue;
2110 CbmMCTrack* pi0mctrack11 = (CbmMCTrack*) fMcTracks->At(grandmotherId11n);
2111 if (pi0mctrack11->GetMotherId() == -1) {
2112 //fhPhotons_MC_motherIdCut->Fill(invmass);
2113 }
2114 }
2115 if (grandmotherId11n != grandmotherId21n) {
2116 fhPhotons_invmass_MCcut3_new[index]->Fill(invmass);
2117 fhPhotons_stats[index]->Fill(3);
2118 }
2119 }
2120 }
2121
2122 if (motherId11 != motherId12 || motherId21 != motherId22) {
2123 fhPhotons_invmass_MCcut4_new[index]->Fill(invmass);
2124 fhPhotons_stats[index]->Fill(4);
2125 }
2126 if ((motherId11 != motherId12 && motherId21 == motherId22)
2127 || (motherId11 == motherId12 && motherId21 != motherId22)) {
2128 fhPhotons_invmass_MCcut5_new[index]->Fill(invmass);
2129 fhPhotons_stats[index]->Fill(5);
2130 }
2131 if (motherId11 != motherId12 && motherId21 != motherId22) {
2132 fhPhotons_invmass_MCcut6_new[index]->Fill(invmass);
2133 fhPhotons_stats[index]->Fill(6);
2134 if (TMath::Abs(pdg11) != 11 || TMath::Abs(pdg12) != 11 || TMath::Abs(pdg21) != 11
2135 || TMath::Abs(pdg22) != 11) {
2136 fhPhotons_invmass_MCcut7_new[index]->Fill(invmass);
2137 }
2138 }
2139
2140
2141 /*
2142 if(motherId11 != -1 && motherId12 != -1 && motherId21 != -1 && motherId22 != -1) {
2143 CbmMCTrack* mothermctrack11 = (CbmMCTrack*)fMcTracks->At(motherId11);
2144 CbmMCTrack* mothermctrack12 = (CbmMCTrack*)fMcTracks->At(motherId12);
2145 CbmMCTrack* mothermctrack21 = (CbmMCTrack*)fMcTracks->At(motherId21);
2146 CbmMCTrack* mothermctrack22 = (CbmMCTrack*)fMcTracks->At(motherId22);
2147
2148 fhPhotons_MC_motherpdg->Fill(mothermctrack11->GetPdgCode());
2149 fhPhotons_MC_motherpdg->Fill(mothermctrack12->GetPdgCode());
2150 fhPhotons_MC_motherpdg->Fill(mothermctrack21->GetPdgCode());
2151 fhPhotons_MC_motherpdg->Fill(mothermctrack22->GetPdgCode());
2152 }
2153
2154
2155
2156 TLorentzVector lorVecE11c;
2157 TLorentzVector lorVecE12c;
2158 TLorentzVector lorVecE21c;
2159 TLorentzVector lorVecE22c;
2160
2161 mctrack11->Get4Momentum(lorVecE11c);
2162 mctrack12->Get4Momentum(lorVecE12c);
2163 mctrack21->Get4Momentum(lorVecE21c);
2164 mctrack22->Get4Momentum(lorVecE22c);
2165
2166 TLorentzVector g1c = lorVecE11c + lorVecE12c;
2167 TLorentzVector g2c = lorVecE21c + lorVecE22c;
2168 TLorentzVector pic = lorVecE11c + lorVecE12c + lorVecE21c + lorVecE22c;
2169
2170 g1c.Boost(-pic.BoostVector() );
2171 g2c.Boost(-pic.BoostVector() );
2172
2173 Double_t boostAnglec = g1c.Angle(g2c.Vect());
2174 Double_t thetac = 180.*boostAnglec/TMath::Pi();
2175 fhPhotons_boostAngleMC->Fill(thetac);
2176
2177
2178 */
2179 }
2180 }
2181 }
2182 }
2183 fhPi0_nofPerEvent_new[index]->Fill(nofPi0);
2184}
2185
2186
2187Double_t CbmAnaConversionRecoFull::OpeningAngleBetweenPhotons(vector<TVector3> momenta, vector<int> photon1,
2188 vector<int> photon2)
2189{
2190 Double_t energy1 = TMath::Sqrt(momenta[photon1[0]].Mag2() + M2E);
2191 TLorentzVector lorVec1(momenta[photon1[0]], energy1);
2192
2193 Double_t energy2 = TMath::Sqrt(momenta[photon1[1]].Mag2() + M2E);
2194 TLorentzVector lorVec2(momenta[photon1[1]], energy2);
2195
2196 Double_t energy3 = TMath::Sqrt(momenta[photon2[0]].Mag2() + M2E);
2197 TLorentzVector lorVec3(momenta[photon2[0]], energy3);
2198
2199 Double_t energy4 = TMath::Sqrt(momenta[photon2[1]].Mag2() + M2E);
2200 TLorentzVector lorVec4(momenta[photon2[1]], energy4);
2201
2202 TLorentzVector lorPhoton1 = lorVec1 + lorVec2;
2203 TLorentzVector lorPhoton2 = lorVec3 + lorVec4;
2204
2205 Double_t angleBetweenPhotons = lorPhoton1.Angle(lorPhoton2.Vect());
2206 Double_t theta = 180. * angleBetweenPhotons / TMath::Pi();
2207
2208 return theta;
2209}
2210
2211
2212Double_t CbmAnaConversionRecoFull::OpeningAngleBetweenPhotons2(vector<int> photon1, vector<int> photon2)
2213{
2214 Double_t energy1 = TMath::Sqrt(fElectrons_momenta[photon1[0]].Mag2() + M2E);
2215 TLorentzVector lorVec1(fElectrons_momenta[photon1[0]], energy1);
2216
2217 Double_t energy2 = TMath::Sqrt(fElectrons_momenta[photon1[1]].Mag2() + M2E);
2218 TLorentzVector lorVec2(fElectrons_momenta[photon1[1]], energy2);
2219
2220 Double_t energy3 = TMath::Sqrt(fElectrons_momenta[photon2[0]].Mag2() + M2E);
2221 TLorentzVector lorVec3(fElectrons_momenta[photon2[0]], energy3);
2222
2223 Double_t energy4 = TMath::Sqrt(fElectrons_momenta[photon2[1]].Mag2() + M2E);
2224 TLorentzVector lorVec4(fElectrons_momenta[photon2[1]], energy4);
2225
2226 TLorentzVector lorPhoton1 = lorVec1 + lorVec2;
2227 TLorentzVector lorPhoton2 = lorVec3 + lorVec4;
2228
2229 Double_t angleBetweenPhotons = lorPhoton1.Angle(lorPhoton2.Vect());
2230 Double_t theta = 180. * angleBetweenPhotons / TMath::Pi();
2231
2232 return theta;
2233}
2234
2235
2236/*
2237void CbmAnaConversionRecoFull::CombineElectronsRefit()
2238{
2239 Int_t nof = fElectrons_momenta_refit.size();
2240 cout << "CbmAnaConversionRecoFull: CombineElectronsRefit, nof - " << nof << endl;
2241 if(nof >= 2) {
2242 for(int a=0; a<nof-1; a++) {
2243 for(int b=a+1; b<nof; b++) {
2244 Int_t check1 = (fElectrons_track_refit[a]->GetParamLast()->GetQp() > 0); // positive or negative charge (qp = charge over momentum ratio)
2245 Int_t check2 = (fElectrons_track_refit[b]->GetParamLast()->GetQp() > 0);
2246 Int_t test = check1 + check2;
2247 if(test != 1) continue; // need one electron and one positron
2248 //if(fElectrons_momentaChi[a] > 10 || fElectrons_momentaChi[b] > 10) continue;
2249
2250 LmvmKinePar params1 = CalculateKinematicParamsReco(fElectrons_momenta_refit[a], fElectrons_momenta_refit[b]);
2251
2252 Double_t openingAngleCut = 1;
2253 Double_t invMassCut = 0.03;
2254
2255 Int_t IsPhoton_openingAngle1 = (params1.fAngle < openingAngleCut);
2256 Int_t IsPhoton_invMass1 = (params1.fMinv < invMassCut);
2257
2258 if(IsPhoton_openingAngle1 && IsPhoton_invMass1) {
2259 vector<int> pair; // = {a, b};
2260 pair.push_back(a);
2261 pair.push_back(b);
2262 fVector_photons_pairs_refit.push_back(pair);
2263 }
2264 }
2265 }
2266 }
2267}
2268
2269
2270
2271
2272void CbmAnaConversionRecoFull::CombinePhotonsRefit()
2273{
2274 Int_t nof = fVector_photons_pairs_refit.size();
2275 cout << "CbmAnaConversionRecoFull: CombinePhotonsRefit, nof - " << nof << endl;
2276 if(nof >= 2) {
2277 for(int a=0; a<nof-1; a++) {
2278 for(int b=a+1; b<nof; b++) {
2279 Int_t electron11 = fVector_photons_pairs_refit[a][0];
2280 Int_t electron12 = fVector_photons_pairs_refit[a][1];
2281 Int_t electron21 = fVector_photons_pairs_refit[b][0];
2282 Int_t electron22 = fVector_photons_pairs_refit[b][1];
2283
2284 Double_t invmass = Invmass_4particlesRECO(fElectrons_momenta_refit[electron11], fElectrons_momenta_refit[electron12], fElectrons_momenta_refit[electron21], fElectrons_momenta_refit[electron22]);
2285 fhPhotons_invmass_refit->Fill(invmass);
2286
2287 Double_t opening_angle = OpeningAngleBetweenPhotonsRefit(fVector_photons_pairs_refit[a], fVector_photons_pairs_refit[b]);
2288 //fhPhotons_angleBetween->Fill(opening_angle);
2289
2290 if(opening_angle < 8) {
2291 fhPhotons_invmass_refit_cut->Fill(invmass);
2292
2293 //Double_t chicut = 1.0;
2294 //if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2295 // fhPhotons_invmass_cut_chi1->Fill(invmass);
2296 //}
2297 }
2298 }
2299 }
2300 }
2301}
2302
2303
2304
2305
2306Double_t CbmAnaConversionRecoFull::OpeningAngleBetweenPhotonsRefit(vector<int> photon1, vector<int> photon2)
2307{
2308 Double_t energy1 = TMath::Sqrt(fElectrons_momenta_refit[photon1[0]].Mag2() + M2E);
2309 TLorentzVector lorVec1(fElectrons_momenta_refit[photon1[0]], energy1);
2310
2311 Double_t energy2 = TMath::Sqrt(fElectrons_momenta_refit[photon1[1]].Mag2() + M2E);
2312 TLorentzVector lorVec2(fElectrons_momenta_refit[photon1[1]], energy2);
2313
2314 Double_t energy3 = TMath::Sqrt(fElectrons_momenta_refit[photon2[0]].Mag2() + M2E);
2315 TLorentzVector lorVec3(fElectrons_momenta_refit[photon2[0]], energy3);
2316
2317 Double_t energy4 = TMath::Sqrt(fElectrons_momenta_refit[photon2[1]].Mag2() + M2E);
2318 TLorentzVector lorVec4(fElectrons_momenta_refit[photon2[1]], energy4);
2319
2320 TLorentzVector lorPhoton1 = lorVec1 + lorVec2;
2321 TLorentzVector lorPhoton2 = lorVec3 + lorVec4;
2322
2323 Double_t angleBetweenPhotons = lorPhoton1.Angle(lorPhoton2.Vect());
2324 Double_t theta = 180.*angleBetweenPhotons/TMath::Pi();
2325
2326 return theta;
2327}
2328
2329
2330
2331void CbmAnaConversionRecoFull::CombinePhotonsDirection()
2332{
2333 Int_t nof = fVector_photons_pairs_direction.size();
2334 cout << "CbmAnaConversionRecoFull: CombinePhotonsDirection, nof - " << nof << endl;
2335 if(nof >= 2) {
2336 for(int a=0; a<nof-1; a++) {
2337 for(int b=a+1; b<nof; b++) {
2338 Int_t electron11 = fVector_photons_pairs_direction[a][0];
2339 Int_t electron12 = fVector_photons_pairs_direction[a][1];
2340 Int_t electron21 = fVector_photons_pairs_direction[b][0];
2341 Int_t electron22 = fVector_photons_pairs_direction[b][1];
2342
2343 Double_t invmass = Invmass_4particlesRECO(fElectrons_momenta[electron11], fElectrons_momenta[electron12], fElectrons_momenta[electron21], fElectrons_momenta[electron22]);
2344 fhPhotons_invmass_direction->Fill(invmass);
2345
2346 Double_t opening_angle = OpeningAngleBetweenPhotonsRefit(fVector_photons_pairs_direction[a], fVector_photons_pairs_direction[b]);
2347 //fhPhotons_angleBetween->Fill(opening_angle);
2348
2349 if(opening_angle < 8) {
2350 fhPhotons_invmass_direction_cut->Fill(invmass);
2351
2352 //Double_t chicut = 1.0;
2353 //if(fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2354 // fhPhotons_invmass_cut_chi1->Fill(invmass);
2355 //}
2356 }
2357 }
2358 }
2359 }
2360}
2361*/
2362
2363
2364/*
2365void CbmAnaConversionRecoFull::CombineElectrons()
2366{
2367 Int_t nof = fElectrons_momenta.size();
2368 if(nof >= 4) {
2369 for(int a=0; a<nof-3; a++) {
2370 for(int b=a; b<nof-2; b++) {
2371 for(int c=b; c<nof-1; c++) {
2372 for(int d=c; d<nof; d++) {
2373 Int_t check1 = (fElectrons_track[a]->GetParamLast()->GetQp() > 0); // positive or negative charge (qp = charge over momentum ratio)
2374 Int_t check2 = (fElectrons_track[b]->GetParamLast()->GetQp() > 0);
2375 Int_t check3 = (fElectrons_track[c]->GetParamLast()->GetQp() > 0);
2376 Int_t check4 = (fElectrons_track[d]->GetParamLast()->GetQp() > 0);
2377 Int_t test = check1 + check2 + check3 + check4;
2378 if(test != 2) continue; // need two electrons and two positrons
2379
2380
2381 Double_t invmass = Invmass_4particlesRECO(fElectrons_momenta[a], fElectrons_momenta[b], fElectrons_momenta[c], fElectrons_momenta[d]);
2382 fhElectrons_invmass->Fill(invmass);
2383
2384
2385 LmvmKinePar params1 = CalculateKinematicParamsReco(fElectrons_momenta[a], fElectrons_momenta[b]);
2386 LmvmKinePar params2 = CalculateKinematicParamsReco(fElectrons_momenta[a], fElectrons_momenta[c]);
2387 LmvmKinePar params3 = CalculateKinematicParamsReco(fElectrons_momenta[a], fElectrons_momenta[d]);
2388 LmvmKinePar params4 = CalculateKinematicParamsReco(fElectrons_momenta[b], fElectrons_momenta[c]);
2389 LmvmKinePar params5 = CalculateKinematicParamsReco(fElectrons_momenta[b], fElectrons_momenta[d]);
2390 LmvmKinePar params6 = CalculateKinematicParamsReco(fElectrons_momenta[c], fElectrons_momenta[d]);
2391
2392 Double_t openingAngleCut = 1;
2393 Int_t IsPhoton_openingAngle1 = (params1.fAngle < openingAngleCut);
2394 Int_t IsPhoton_openingAngle2 = (params2.fAngle < openingAngleCut);
2395 Int_t IsPhoton_openingAngle3 = (params3.fAngle < openingAngleCut);
2396 Int_t IsPhoton_openingAngle4 = (params4.fAngle < openingAngleCut);
2397 Int_t IsPhoton_openingAngle5 = (params5.fAngle < openingAngleCut);
2398 Int_t IsPhoton_openingAngle6 = (params6.fAngle < openingAngleCut);
2399
2400 Double_t invMassCut = 0.03;
2401 Int_t IsPhoton_invMass1 = (params1.fMinv < invMassCut);
2402 Int_t IsPhoton_invMass2 = (params2.fMinv < invMassCut);
2403 Int_t IsPhoton_invMass3 = (params3.fMinv < invMassCut);
2404 Int_t IsPhoton_invMass4 = (params4.fMinv < invMassCut);
2405 Int_t IsPhoton_invMass5 = (params5.fMinv < invMassCut);
2406 Int_t IsPhoton_invMass6 = (params6.fMinv < invMassCut);
2407
2408 if(IsPhoton_openingAngle1 && IsPhoton_openingAngle6 && IsPhoton_invMass1 && IsPhoton_invMass6 && (check1 + check2 == 1) && (check3 + check4 == 1)) {
2409 fhElectrons_invmass_cut->Fill(invmass);
2410 }
2411 if(IsPhoton_openingAngle2 && IsPhoton_openingAngle5 && IsPhoton_invMass2 && IsPhoton_invMass5 && (check1 + check3 == 1) && (check2 + check4 == 1)) {
2412 fhElectrons_invmass_cut->Fill(invmass);
2413 }
2414 if(IsPhoton_openingAngle3 && IsPhoton_openingAngle4 && IsPhoton_invMass3 && IsPhoton_invMass4 && (check1 + check4 == 1) && (check2 + check3 == 1)) {
2415 fhElectrons_invmass_cut->Fill(invmass);
2416 }
2417 }
2418 }
2419 }
2420 }
2421 }
2422}
2423*/
2424
2425
2427{
2428 Int_t nof = fElectrons_momenta.size();
2429 cout << "CbmAnaConversionRecoFull: CombineElectrons, nof - " << nof << endl;
2430 Int_t nofPhotons = 0;
2431 if (nof >= 2) {
2432 for (int a = 0; a < nof - 1; a++) {
2433 for (int b = a + 1; b < nof; b++) {
2434 Int_t check1 = (fElectrons_track[a]->GetParamLast()->GetQp()
2435 > 0); // positive or negative charge (qp = charge over momentum ratio)
2436 Int_t check2 = (fElectrons_track[b]->GetParamLast()->GetQp() > 0);
2437 Int_t test = check1 + check2;
2438 if (test != 1) continue; // need one electron and one positron
2439 //if(fElectrons_momentaChi[a] > 10 || fElectrons_momentaChi[b] > 10) continue;
2440
2442
2443 // standard fixed opening angle cut
2444 //Double_t openingAngleCut = 1;
2445
2446 // opening angle cut depending on pt of e+e- pair
2447 Double_t openingAngleCut = 1.8 - 0.6 * params1.fPt;
2448 //Double_t openingAngleCut = 1.5 - 0.5 * params1.fPt;
2449 //Double_t openingAngleCut = 1.2;
2450
2451 Double_t invMassCut = 0.03;
2452
2453 Int_t IsPhoton_openingAngle1 = (params1.fAngle < openingAngleCut);
2454 Int_t IsPhoton_invMass1 = (params1.fMinv < invMassCut);
2455
2456 Double_t tXa = fElectrons_track[a]->GetParamLast()->GetTx();
2457 Double_t tYa = fElectrons_track[a]->GetParamLast()->GetTy();
2458 Double_t tXb = fElectrons_track[b]->GetParamLast()->GetTx();
2459 Double_t tYb = fElectrons_track[b]->GetParamLast()->GetTy();
2460
2461 fhElectrons_invmass->Fill(params1.fMinv);
2462
2463 if (IsPhoton_openingAngle1 && IsPhoton_invMass1) {
2464 nofPhotons++;
2465 vector<int> pair; // = {a, b};
2466 pair.push_back(a);
2467 pair.push_back(b);
2468 fVector_photons_pairs.push_back(pair);
2469 fhElectrons_invmass_cut->Fill(params1.fMinv);
2470 //fVector_photons_momenta.push_back(params1.momPair);
2471
2472 fhPhotons_tX->Fill(tXa);
2473 fhPhotons_tX->Fill(tXb);
2474 fhPhotons_tY->Fill(tYa);
2475 fhPhotons_tY->Fill(tYb);
2476
2477 TVector3 momentumE1f;
2478 TVector3 momentumE2f;
2479 fElectrons_track[a]->GetParamFirst()->Momentum(momentumE1f);
2480 fElectrons_track[b]->GetParamFirst()->Momentum(momentumE2f);
2481 TVector3 momentumE1l;
2482 TVector3 momentumE2l;
2483 fElectrons_track[a]->GetParamLast()->Momentum(momentumE1l);
2484 fElectrons_track[b]->GetParamLast()->Momentum(momentumE2l);
2485
2486 //Double_t energyE1 = TMath::Sqrt(momentumE1.Mag2() + M2E);
2487 //TLorentzVector lorVecE1(momentumE1, energyE1);
2488 //Double_t energyE2 = TMath::Sqrt(momentumE2.Mag2() + M2E);
2489 //TLorentzVector lorVecE2(momentumE2, energyE2);
2490 //TLorentzVector g = lorVecE1 + lorVecE2;
2491
2492 //lorVecE1.Boost(g.BoostVector() );
2493 //lorVecE2.Boost(g.BoostVector() );
2494
2495 TVector3 normal1 = momentumE1f.Cross(momentumE1l);
2496 TVector3 normal2 = momentumE2f.Cross(momentumE2l);
2497 Double_t normalAngle = normal1.Angle(normal2);
2498 Double_t theta = 180. * normalAngle / TMath::Pi();
2499
2500 //Double_t boostAngle = lorVecE1.Angle(lorVecE2.Vect());
2501
2502 //fhPhotons_boostAngle->Fill(normalAngle);
2503
2504
2505 //if( TMath::Abs(tXa - tXb) < 0.5 || TMath::Abs(tYa - tYb) < 0.5 ) {
2506 if (theta < 30) { fVector_photons_pairs_direction.push_back(pair); }
2507 }
2508 }
2509 }
2510 }
2511 fhPhotons_nofPerEvent->Fill(nofPhotons);
2512}
2513
2514
2516{
2517 Int_t nof = fVector_photons_pairs.size();
2518 cout << "CbmAnaConversionRecoFull: CombinePhotons, nof - " << nof << endl;
2519 if (nof >= 2) {
2520 for (int a = 0; a < nof - 1; a++) {
2521 for (int b = a + 1; b < nof; b++) {
2522 Int_t electron11 = fVector_photons_pairs[a][0];
2523 Int_t electron12 = fVector_photons_pairs[a][1];
2524 Int_t electron21 = fVector_photons_pairs[b][0];
2525 Int_t electron22 = fVector_photons_pairs[b][1];
2526
2527
2528 if (electron11 == electron12 || electron11 == electron21 || electron11 == electron22 || electron12 == electron21
2529 || electron12 == electron22 || electron21 == electron22) {
2530 cout << "CbmAnaConversionRecoFull: "
2531 "RecoFull_CombinePhotons()_DoubleIndex!"
2532 << endl;
2533 continue;
2534 }
2535
2536 Double_t invmass = Invmass_4particlesRECO(fElectrons_momenta[electron11], fElectrons_momenta[electron12],
2537 fElectrons_momenta[electron21], fElectrons_momenta[electron22]);
2538 fhPhotons_invmass->Fill(invmass);
2539
2540 Double_t pt = Pt_4particlesRECO(fElectrons_momenta[electron11], fElectrons_momenta[electron12],
2541 fElectrons_momenta[electron21], fElectrons_momenta[electron22]);
2542 Double_t rap = Rap_4particlesRECO(fElectrons_momenta[electron11], fElectrons_momenta[electron12],
2543 fElectrons_momenta[electron21], fElectrons_momenta[electron22]);
2544
2546 fhPhotons_angleBetween->Fill(opening_angle);
2547
2548
2549 LmvmKinePar params1 =
2551 fElectrons_momenta[electron21], fElectrons_momenta[electron22]);
2552
2553
2554 //TVector3 momentumE1;
2555 //TVector3 momentumE2;
2556 //fElectrons_track[a]->GetParamLast()->Momentum(momentumE1);
2557 //fElectrons_track[b]->GetParamLast()->Momentum(momentumE2);
2558
2559 Double_t energyE11 = TMath::Sqrt(fElectrons_momenta[electron11].Mag2() + M2E);
2560 TLorentzVector lorVecE11(fElectrons_momenta[electron11], energyE11);
2561 Double_t energyE12 = TMath::Sqrt(fElectrons_momenta[electron12].Mag2() + M2E);
2562 TLorentzVector lorVecE12(fElectrons_momenta[electron12], energyE12);
2563 Double_t energyE21 = TMath::Sqrt(fElectrons_momenta[electron21].Mag2() + M2E);
2564 TLorentzVector lorVecE21(fElectrons_momenta[electron21], energyE21);
2565 Double_t energyE22 = TMath::Sqrt(fElectrons_momenta[electron22].Mag2() + M2E);
2566 TLorentzVector lorVecE22(fElectrons_momenta[electron22], energyE22);
2567 TLorentzVector g1 = lorVecE11 + lorVecE12;
2568 TLorentzVector g2 = lorVecE21 + lorVecE22;
2569 TLorentzVector pi = lorVecE11 + lorVecE12 + lorVecE21 + lorVecE22;
2570
2571 g1.Boost(-pi.BoostVector());
2572 g2.Boost(-pi.BoostVector());
2573
2574 Double_t boostAngle = g1.Angle(g2.Vect());
2575 Double_t theta = 180. * boostAngle / TMath::Pi();
2576
2577 fhPhotons_boostAngleTest->Fill(boostAngle);
2578
2579 //if(opening_angle < 10) {
2580 if (true) {
2581 fhPhotons_boostAngle->Fill(theta);
2582
2583 fhPhotons_invmass_cut->Fill(invmass);
2584 fhPhotons_invmass_vs_pt->Fill(invmass, pt);
2585 fhPhotons_rapidity_vs_pt->Fill(pt, rap);
2586 fhPhotons_invmass_vs_openingAngle->Fill(invmass, opening_angle);
2587 fhPhotons_openingAngle_vs_momentum->Fill(opening_angle, params1.fMomentumMag);
2588
2593
2594 fhPhotons_invmass_vs_chi->Fill(invmass, fElectrons_momentaChi[electron11]);
2595 fhPhotons_invmass_vs_chi->Fill(invmass, fElectrons_momentaChi[electron12]);
2596 fhPhotons_invmass_vs_chi->Fill(invmass, fElectrons_momentaChi[electron21]);
2597 fhPhotons_invmass_vs_chi->Fill(invmass, fElectrons_momentaChi[electron22]);
2598
2599 if (pt <= 1) fhPhotons_invmass_cut_ptBin1->Fill(invmass);
2600 if (pt > 1 && pt <= 2) fhPhotons_invmass_cut_ptBin2->Fill(invmass);
2601 if (pt > 2 && pt <= 3) fhPhotons_invmass_cut_ptBin3->Fill(invmass);
2602 if (pt > 3 && pt <= 4) fhPhotons_invmass_cut_ptBin4->Fill(invmass);
2603
2604 Double_t chicut = 1.0;
2605 if (fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut
2606 && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2607 fhPhotons_invmass_cut_chi1->Fill(invmass);
2608 }
2609 chicut = 3.0;
2610 if (fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut
2611 && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2612 fhPhotons_invmass_cut_chi3->Fill(invmass);
2613 }
2614 chicut = 5.0;
2615 if (fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut
2616 && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2617 fhPhotons_invmass_cut_chi5->Fill(invmass);
2618 }
2619 chicut = 10.0;
2620 if (fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut
2621 && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2622 fhPhotons_invmass_cut_chi10->Fill(invmass);
2623 }
2624 chicut = 25.0;
2625 if (fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut
2626 && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2627 fhPhotons_invmass_cut_chi25->Fill(invmass);
2628 }
2629 chicut = 40.0;
2630 if (fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut
2631 && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2632 fhPhotons_invmass_cut_chi40->Fill(invmass);
2633 }
2634 chicut = 65.0;
2635 if (fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut
2636 && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2637 fhPhotons_invmass_cut_chi65->Fill(invmass);
2638 }
2639 chicut = 80.0;
2640 if (fElectrons_momentaChi[electron11] < chicut && fElectrons_momentaChi[electron12] < chicut
2641 && fElectrons_momentaChi[electron21] < chicut && fElectrons_momentaChi[electron22] < chicut) {
2642 fhPhotons_invmass_cut_chi80->Fill(invmass);
2643 }
2644
2645
2646 if (fElectrons_mctrackID[electron11] == 0 || fElectrons_mctrackID[electron12] == 0
2647 || fElectrons_mctrackID[electron21] == 0 || fElectrons_mctrackID[electron22] == 0)
2648 continue;
2649 // CROSSCHECK WITH MC-TRUE DATA!
2650 CbmMCTrack* mctrack11 = (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID[electron11]);
2651 CbmMCTrack* mctrack12 = (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID[electron12]);
2652 CbmMCTrack* mctrack21 = (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID[electron21]);
2653 CbmMCTrack* mctrack22 = (CbmMCTrack*) fMcTracks->At(fElectrons_mctrackID[electron22]);
2654
2655 Int_t motherId11 = mctrack11->GetMotherId();
2656 Int_t motherId12 = mctrack12->GetMotherId();
2657 Int_t motherId21 = mctrack21->GetMotherId();
2658 Int_t motherId22 = mctrack22->GetMotherId();
2659
2660 TVector3 startvertex11;
2661 mctrack11->GetStartVertex(startvertex11);
2662 TVector3 startvertex12;
2663 mctrack12->GetStartVertex(startvertex12);
2664 TVector3 startvertex21;
2665 mctrack21->GetStartVertex(startvertex21);
2666 TVector3 startvertex22;
2667 mctrack22->GetStartVertex(startvertex22);
2668
2669 fhPhotons_MC_startvertexZ->Fill(startvertex11.Z());
2670 fhPhotons_MC_startvertexZ->Fill(startvertex12.Z());
2671 fhPhotons_MC_startvertexZ->Fill(startvertex21.Z());
2672 fhPhotons_MC_startvertexZ->Fill(startvertex22.Z());
2673
2674 if (motherId11 == motherId12 && motherId21 == motherId22) {
2675 fhPhotons_MC_invmass1->Fill(invmass);
2676 if (motherId11 != -1 && motherId21 != -1) {
2677 CbmMCTrack* mothermctrack11 = (CbmMCTrack*) fMcTracks->At(motherId11);
2678 CbmMCTrack* mothermctrack21 = (CbmMCTrack*) fMcTracks->At(motherId21);
2679
2680 Int_t grandmotherId11 = mothermctrack11->GetMotherId();
2681 Int_t grandmotherId21 = mothermctrack21->GetMotherId();
2682
2683 if (grandmotherId11 == grandmotherId21) {
2684 fhPhotons_MC_invmass2->Fill(invmass);
2685 if (grandmotherId11 == -1) continue;
2686 CbmMCTrack* pi0mctrack11 = (CbmMCTrack*) fMcTracks->At(grandmotherId11);
2687 if (pi0mctrack11->GetMotherId() == -1) { fhPhotons_MC_motherIdCut->Fill(invmass); }
2688 }
2689 if (grandmotherId11 != grandmotherId21) { fhPhotons_MC_invmass3->Fill(invmass); }
2690 }
2691 }
2692
2693 if (motherId11 != motherId12 || motherId21 != motherId22) { fhPhotons_MC_invmass4->Fill(invmass); }
2694
2695
2696 if (motherId11 != -1 && motherId12 != -1 && motherId21 != -1 && motherId22 != -1) {
2697 CbmMCTrack* mothermctrack11 = (CbmMCTrack*) fMcTracks->At(motherId11);
2698 CbmMCTrack* mothermctrack12 = (CbmMCTrack*) fMcTracks->At(motherId12);
2699 CbmMCTrack* mothermctrack21 = (CbmMCTrack*) fMcTracks->At(motherId21);
2700 CbmMCTrack* mothermctrack22 = (CbmMCTrack*) fMcTracks->At(motherId22);
2701
2702 fhPhotons_MC_motherpdg->Fill(mothermctrack11->GetPdgCode());
2703 fhPhotons_MC_motherpdg->Fill(mothermctrack12->GetPdgCode());
2704 fhPhotons_MC_motherpdg->Fill(mothermctrack21->GetPdgCode());
2705 fhPhotons_MC_motherpdg->Fill(mothermctrack22->GetPdgCode());
2706 }
2707
2708
2709 TLorentzVector lorVecE11c;
2710 TLorentzVector lorVecE12c;
2711 TLorentzVector lorVecE21c;
2712 TLorentzVector lorVecE22c;
2713
2714 mctrack11->Get4Momentum(lorVecE11c);
2715 mctrack12->Get4Momentum(lorVecE12c);
2716 mctrack21->Get4Momentum(lorVecE21c);
2717 mctrack22->Get4Momentum(lorVecE22c);
2718
2719 TLorentzVector g1c = lorVecE11c + lorVecE12c;
2720 TLorentzVector g2c = lorVecE21c + lorVecE22c;
2721 TLorentzVector pic = lorVecE11c + lorVecE12c + lorVecE21c + lorVecE22c;
2722
2723 g1c.Boost(-pic.BoostVector());
2724 g2c.Boost(-pic.BoostVector());
2725
2726 Double_t boostAnglec = g1c.Angle(g2c.Vect());
2727 Double_t thetac = 180. * boostAnglec / TMath::Pi();
2728 fhPhotons_boostAngleMC->Fill(thetac);
2729 }
2730 }
2731 }
2732 }
2733}
2734
2735
2737// takes all first identified electrons from all events and combines them afterwards
2738{
2739 for (int i = 1; i < 5; i++) {
2740 if (fMixedEventsElectrons[i].size() < 4) continue;
2741 for (UInt_t a = 0; a < fMixedEventsElectrons[i].size() - 3; a++) {
2742 for (UInt_t b = a + 1; b < fMixedEventsElectrons[i].size() - 2; b++) {
2743 for (UInt_t c = b + 1; c < fMixedEventsElectrons[i].size() - 1; c++) {
2744 for (UInt_t d = c + 1; d < fMixedEventsElectrons[i].size(); d++) {
2745 Int_t check1 = (fMixedEventsElectrons_gtrack[i][a]->GetParamLast()->GetQp() > 0);
2746 Int_t check2 = (fMixedEventsElectrons_gtrack[i][b]->GetParamLast()->GetQp() > 0);
2747 Int_t check3 = (fMixedEventsElectrons_gtrack[i][c]->GetParamLast()->GetQp() > 0);
2748 Int_t check4 = (fMixedEventsElectrons_gtrack[i][d]->GetParamLast()->GetQp() > 0);
2749
2750 if (check1 + check2 + check3 + check4 != 2) continue;
2751
2752 TVector3 e1 = fMixedEventsElectrons[i][a];
2753 TVector3 e2 = fMixedEventsElectrons[i][b];
2754 TVector3 e3 = fMixedEventsElectrons[i][c];
2755 TVector3 e4 = fMixedEventsElectrons[i][d];
2756
2757
2770
2771
2772 Int_t angleCheck12 = (params12.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params12.fPt)
2773 && check1 + check2 == 1);
2774 Int_t angleCheck13 = (params13.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params13.fPt)
2775 && check1 + check3 == 1);
2776 Int_t angleCheck14 = (params14.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params14.fPt)
2777 && check1 + check4 == 1);
2778 Int_t angleCheck23 = (params23.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params23.fPt)
2779 && check2 + check3 == 1);
2780 Int_t angleCheck24 = (params24.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params24.fPt)
2781 && check2 + check4 == 1);
2782 Int_t angleCheck34 = (params34.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params34.fPt)
2783 && check3 + check4 == 1);
2784
2785 if (angleCheck12 && angleCheck34) {
2788 fhMixedEventsTest_invmass[i]->Fill(params.fMinv);
2789 cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
2790 "filled!, part"
2791 << i << endl;
2792 }
2793 if (angleCheck13 && angleCheck24) {
2796 fhMixedEventsTest_invmass[i]->Fill(params.fMinv);
2797 cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
2798 "filled!, part"
2799 << i << endl;
2800 }
2801 if (angleCheck14 && angleCheck23) {
2804 fhMixedEventsTest_invmass[i]->Fill(params.fMinv);
2805 cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
2806 "filled!, part"
2807 << i << endl;
2808 }
2809 }
2810 }
2811 }
2812 }
2813 }
2814}
2815
2816
2818// takes all identified electron from the last 4 events
2819{
2820 if (fMixedEventsElectrons_list1.size() == 0 || fMixedEventsElectrons_list2.size() == 0
2821 || fMixedEventsElectrons_list3.size() == 0 || fMixedEventsElectrons_list4.size() == 0)
2822 return;
2823 for (UInt_t a = 0; a < fMixedEventsElectrons_list1.size(); a++) {
2824 for (UInt_t b = 0; b < fMixedEventsElectrons_list2.size(); b++) {
2825 for (UInt_t c = 0; c < fMixedEventsElectrons_list3.size(); c++) {
2826 for (UInt_t d = 0; d < fMixedEventsElectrons_list4.size(); d++) {
2827 Int_t check1 = (fMixedEventsElectrons_list1_gtrack[a]->GetParamLast()->GetQp() > 0);
2828 Int_t check2 = (fMixedEventsElectrons_list2_gtrack[b]->GetParamLast()->GetQp() > 0);
2829 Int_t check3 = (fMixedEventsElectrons_list3_gtrack[c]->GetParamLast()->GetQp() > 0);
2830 Int_t check4 = (fMixedEventsElectrons_list4_gtrack[d]->GetParamLast()->GetQp() > 0);
2831
2832 if (check1 + check2 + check3 + check4 != 2) continue;
2833
2834 TVector3 e1 = fMixedEventsElectrons_list1[a];
2835 TVector3 e2 = fMixedEventsElectrons_list2[b];
2836 TVector3 e3 = fMixedEventsElectrons_list3[c];
2837 TVector3 e4 = fMixedEventsElectrons_list4[d];
2838
2839
2852
2853
2854 Int_t angleCheck12 =
2855 (params12.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params12.fPt) && check1 + check2 == 1);
2856 Int_t angleCheck13 =
2857 (params13.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params13.fPt) && check1 + check3 == 1);
2858 Int_t angleCheck14 =
2859 (params14.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params14.fPt) && check1 + check4 == 1);
2860 Int_t angleCheck23 =
2861 (params23.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params23.fPt) && check2 + check3 == 1);
2862 Int_t angleCheck24 =
2863 (params24.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params24.fPt) && check2 + check4 == 1);
2864 Int_t angleCheck34 =
2865 (params34.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params34.fPt) && check3 + check4 == 1);
2866
2867 if (angleCheck12 && angleCheck34) {
2870 fhMixedEventsTest2_invmass->Fill(params.fMinv);
2871 cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
2872 "filled!, part"
2873 << endl;
2874 }
2875 if (angleCheck13 && angleCheck24) {
2878 fhMixedEventsTest2_invmass->Fill(params.fMinv);
2879 cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
2880 "filled!, part"
2881 << endl;
2882 }
2883 if (angleCheck14 && angleCheck23) {
2886 fhMixedEventsTest2_invmass->Fill(params.fMinv);
2887 cout << "CbmAnaConversionRecoFull: MixedEventTest(), event "
2888 "filled!, part"
2889 << endl;
2890 }
2891 }
2892 }
2893 }
2894 }
2895}
2896
2897
2899// takes all electrons from the last 20 events and combines them
2900{
2901 Int_t nof = fMixedTest3_momenta.size();
2902 cout << "CbmAnaConversionRecoFull: MixedEventTest3 - nof entries " << nof << endl;
2903 for (Int_t a = 0; a < nof - 3; a++) {
2904 for (Int_t b = a + 1; b < nof - 1; b++) {
2905 for (Int_t c = b + 1; c < nof - 1; c++) {
2906 for (Int_t d = c + 1; d < nof; d++) {
2910 continue;
2911 Int_t check1 = (fMixedTest3_gtrack[a]->GetParamLast()->GetQp() > 0);
2912 Int_t check2 = (fMixedTest3_gtrack[b]->GetParamLast()->GetQp() > 0);
2913 Int_t check3 = (fMixedTest3_gtrack[c]->GetParamLast()->GetQp() > 0);
2914 Int_t check4 = (fMixedTest3_gtrack[d]->GetParamLast()->GetQp() > 0);
2915
2916 if (check1 + check2 + check3 + check4 != 2) continue;
2917
2918 TVector3 e1 = fMixedTest3_momenta[a];
2919 TVector3 e2 = fMixedTest3_momenta[b];
2920 TVector3 e3 = fMixedTest3_momenta[c];
2921 TVector3 e4 = fMixedTest3_momenta[d];
2922
2923
2936
2937
2938 Int_t angleCheck12 =
2939 (params12.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params12.fPt) && check1 + check2 == 1);
2940 Int_t angleCheck13 =
2941 (params13.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params13.fPt) && check1 + check3 == 1);
2942 Int_t angleCheck14 =
2943 (params14.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params14.fPt) && check1 + check4 == 1);
2944 Int_t angleCheck23 =
2945 (params23.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params23.fPt) && check2 + check3 == 1);
2946 Int_t angleCheck24 =
2947 (params24.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params24.fPt) && check2 + check4 == 1);
2948 Int_t angleCheck34 =
2949 (params34.fAngle < CbmAnaConversionCutSettings::CalcOpeningAngleCut(params34.fPt) && check3 + check4 == 1);
2950
2951 if (angleCheck12 && angleCheck34) {
2954 fhMixedEventsTest3_invmass->Fill(params.fMinv);
2955 //cout << "CbmAnaConversionRecoFull: MixedEventTest3(), event filled!, part" << endl;
2956 }
2957 if (angleCheck13 && angleCheck24) {
2960 fhMixedEventsTest3_invmass->Fill(params.fMinv);
2961 //cout << "CbmAnaConversionRecoFull: MixedEventTest3(), event filled!, part" << endl;
2962 }
2963 if (angleCheck14 && angleCheck23) {
2966 fhMixedEventsTest3_invmass->Fill(params.fMinv);
2967 //cout << "CbmAnaConversionRecoFull: MixedEventTest3(), event filled!, part" << endl;
2968 }
2969 }
2970 }
2971 }
2972 }
2973}
2974
2975
2977// combines photons from two different events, taken from each time 200 events
2978{
2979 Int_t nof = fMixedTest4_photons.size();
2980 cout << "CbmAnaConversionRecoFull: MixedEventTest4 - nof entries " << nof << endl;
2981 for (Int_t a = 0; a < nof - 1; a++) {
2982 for (Int_t b = a + 1; b < nof; b++) {
2983 if (fMixedTest4_eventno[a] == fMixedTest4_eventno[b]) continue;
2984
2985 TVector3 e11 = fMixedTest4_photons[a][0];
2986 TVector3 e12 = fMixedTest4_photons[a][1];
2987 TVector3 e21 = fMixedTest4_photons[b][0];
2988 TVector3 e22 = fMixedTest4_photons[b][1];
2989
2990 CbmMCTrack* mctrack11 = fMixedTest4_mctracks[a][0];
2991 CbmMCTrack* mctrack12 = fMixedTest4_mctracks[a][1];
2992 CbmMCTrack* mctrack21 = fMixedTest4_mctracks[b][0];
2993 CbmMCTrack* mctrack22 = fMixedTest4_mctracks[b][1];
2994
2995 Int_t motherId11 = mctrack11->GetMotherId();
2996 Int_t motherId12 = mctrack12->GetMotherId();
2997 Int_t motherId21 = mctrack21->GetMotherId();
2998 Int_t motherId22 = mctrack22->GetMotherId();
2999
3000
3003 fhMixedEventsTest4_invmass->Fill(params.fMinv);
3004 fhMixedEventsTest4_pt_vs_rap->Fill(params.fPt, params.fRapidity);
3005 //cout << "CbmAnaConversionRecoFull: MixedEventTest4(), event filled!, part" << endl;
3006
3007 fhPhotons_stats[4]->Fill(8); // all combinations
3008 if (motherId11 == motherId12 && motherId21 == motherId22) { fhPhotons_stats[4]->Fill(9); }
3009 if (motherId11 != motherId12 || motherId21 != motherId22) { fhPhotons_stats[4]->Fill(12); }
3010 if ((motherId11 != motherId12 && motherId21 == motherId22)
3011 || (motherId11 == motherId12 && motherId21 != motherId22)) {
3012 fhPhotons_stats[4]->Fill(13);
3013 }
3014 if (motherId11 != motherId12 && motherId21 != motherId22) { fhPhotons_stats[4]->Fill(14); }
3015
3016
3017 if (params.fPt <= 0.5) fhMixedEventsTest4_invmass_ptBin1->Fill(params.fMinv);
3018 if (params.fPt > 0.5 && params.fPt <= 1) fhMixedEventsTest4_invmass_ptBin2->Fill(params.fMinv);
3019 if (params.fPt > 1 && params.fPt <= 1.5) fhMixedEventsTest4_invmass_ptBin3->Fill(params.fMinv);
3020 if (params.fPt > 1.5 && params.fPt <= 2) fhMixedEventsTest4_invmass_ptBin4->Fill(params.fMinv);
3021
3022
3023 Bool_t IsRichElectron_ann0_e11 = fMixedTest4_isRichElectronAnn0[a][0];
3024 Bool_t IsRichElectron_ann0_e12 = fMixedTest4_isRichElectronAnn0[a][1];
3025 Bool_t IsRichElectron_ann0_e21 = fMixedTest4_isRichElectronAnn0[b][0];
3026 Bool_t IsRichElectron_ann0_e22 = fMixedTest4_isRichElectronAnn0[b][1];
3027
3028 if (IsRichElectron_ann0_e11 && IsRichElectron_ann0_e12 && IsRichElectron_ann0_e21 && IsRichElectron_ann0_e22) {
3030 }
3031
3032
3033 Double_t ANNe11 = fMixedTest4_ElectronAnns[a][0];
3034 Double_t ANNe12 = fMixedTest4_ElectronAnns[a][1];
3035 Double_t ANNe21 = fMixedTest4_ElectronAnns[b][0];
3036 Double_t ANNe22 = fMixedTest4_ElectronAnns[b][1];
3037
3038 if (ANNe11 > -1 && ANNe12 > -1 && ANNe21 > -1 && ANNe22 > -1)
3040 if (ANNe11 > -0.9 && ANNe12 > -0.9 && ANNe21 > -0.9 && ANNe22 > -0.9)
3042 if (ANNe11 > -0.8 && ANNe12 > -0.8 && ANNe21 > -0.8 && ANNe22 > -0.8)
3044 if (ANNe11 > -0.7 && ANNe12 > -0.7 && ANNe21 > -0.7 && ANNe22 > -0.7)
3046 if (ANNe11 > -0.6 && ANNe12 > -0.6 && ANNe21 > -0.6 && ANNe22 > -0.6)
3048 if (ANNe11 > -0.5 && ANNe12 > -0.5 && ANNe21 > -0.5 && ANNe22 > -0.5)
3050 if (ANNe11 > -0.0 && ANNe12 > -0.0 && ANNe21 > -0.0 && ANNe22 > -0.0)
3052 }
3053 }
3054}
3055
3056
3057Double_t CbmAnaConversionRecoFull::ElectronANNvalue(Int_t globalTrackIndex, Double_t momentum)
3058{
3059 if (NULL == fGlobalTracks || NULL == fRichRings) return -2;
3060 //CbmGlobalTrack* globalTrack = (CbmGlobalTrack*) fGlobalTracks->At(globalTrackIndex);
3061 const CbmGlobalTrack* globalTrack = static_cast<const CbmGlobalTrack*>(fGlobalTracks->At(globalTrackIndex));
3062 Int_t richId = globalTrack->GetRichRingIndex();
3063 if (richId < 0) return -2;
3064 CbmRichRing* ring = static_cast<CbmRichRing*>(fRichRings->At(richId));
3065 if (NULL == ring) return -2;
3066
3067 Double_t ann = CbmRichElectronIdAnn::GetInstance().CalculateAnnValue(globalTrackIndex, momentum);
3068 return ann;
3069}
#define M2E
Helper functions for drawing 1D and 2D histograms and graphs.
Data class for STS tracks.
static constexpr size_t size()
Definition KfSimdPseudo.h:2
const double pi
static Double_t CalcOpeningAngleCut(Double_t pt)
static Double_t CalcChiCut(Double_t pt)
static CbmAnaConversionKinematicParams KinematicParams_2particles_Reco(const TVector3 electron1, const TVector3 electron2)
static CbmAnaConversionKinematicParams KinematicParams_4particles_Reco(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list3_gtrack
std::vector< std::vector< Bool_t > > fMixedTest4_isRichElectronAnn0
std::vector< CbmGlobalTrack * > fElectrons_track_2
std::vector< CbmGlobalTrack * > fMixedTest3_gtrack
std::vector< int > fElectrons_mctrackID_2
std::vector< float > fElectrons_momentaChi
std::vector< int > fElectrons_mctrackID_1
std::vector< TVector3 > fElectrons_momenta_3
std::vector< TH1 * > fHistoList_recofull_new[5]
std::vector< int > fElectrons_mctrackID_new[5]
Double_t Invmass_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
std::vector< TVector3 > fElectrons_momenta
std::vector< CbmGlobalTrack * > fElectrons_track_4
std::vector< TH1 * > fHistoList_recofull_3
std::vector< TH1 * > fHistoList_recofull_2
std::vector< TVector3 > fElectrons_momenta_new[5]
std::vector< std::vector< Double_t > > fMixedTest4_ElectronAnns
LmvmKinePar CalculateKinematicParams_4particles(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
std::vector< std::vector< TVector3 > > fMixedTest4_photons
std::vector< float > fElectrons_momentaChi_4
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list1_gtrack
std::vector< TVector3 > fMixedEventsElectrons_list1
std::vector< TVector3 > fMixedEventsElectrons_list3
std::vector< std::vector< int > > fVector_photons_pairs_4
std::vector< float > fElectrons_momentaChi_1
std::vector< TVector3 > fElectrons_momenta_4
std::vector< std::vector< int > > fVector_photons_pairs_new[5]
std::vector< std::vector< int > > fVector_photons_pairs_1
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list2_gtrack
std::vector< TVector3 > fMixedTest3_momenta
std::vector< CbmGlobalTrack * > fElectrons_track_new[5]
std::vector< int > fElectrons_globaltrackID_new[5]
std::vector< std::vector< int > > fVector_photons_pairs_3
std::vector< TVector3 > fMixedEventsElectrons_list2
std::vector< TH1 * > fHistoList_recofull_4
std::vector< CbmGlobalTrack * > fElectrons_track_refit
std::vector< int > fElectrons_mctrackID_4
std::vector< float > fElectrons_momentaChi_3
std::vector< TH1 * > fHistoList_recofull
std::vector< std::vector< int > > fVector_photons_pairs_2
std::vector< TVector3 > fMixedEventsElectrons[5]
std::vector< std::vector< int > > fVector_photons_pairs_direction
std::vector< std::vector< int > > fVector_photons_pairs
std::vector< TVector3 > fElectrons_momenta_1
std::vector< TVector3 > fElectrons_momenta_2
Double_t Rap_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
std::vector< float > fElectrons_momentaChi_new[5]
Double_t ElectronANNvalue(Int_t globalTrackIndex, Double_t momentum)
std::vector< CbmGlobalTrack * > fElectrons_track
std::vector< TVector3 > fElectrons_momenta_refit
std::vector< int > fElectrons_mctrackID_3
std::vector< std::vector< int > > fVector_photons_pairs_refit
std::vector< TVector3 > fMixedEventsElectrons_list4
std::vector< TH1 * > fHistoList_recofull_1
Double_t OpeningAngleBetweenPhotons2(std::vector< int > photon1, std::vector< int > photons2)
LmvmKinePar CalculateKinematicParamsReco(const TVector3 electron1, const TVector3 electron2)
Double_t OpeningAngleBetweenPhotons(std::vector< TVector3 > momenta, std::vector< int > photon1, std::vector< int > photons2)
std::vector< CbmGlobalTrack * > fElectrons_track_1
std::vector< CbmGlobalTrack * > fElectrons_track_3
std::vector< std::vector< CbmMCTrack * > > fMixedTest4_mctracks
std::vector< float > fElectrons_momentaChi_2
Double_t Pt_4particlesRECO(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_gtrack[5]
std::vector< CbmGlobalTrack * > fMixedEventsElectrons_list4_gtrack
int32_t GetStsTrackIndex() const
int32_t GetRichRingIndex() const
void GetChiToVertex(std::vector< CbmStsTrack > &Tracks, std::vector< PFFieldRegion > &field, std::vector< float > &chiToVtx, CbmKFVertex &primVtx, float chiPrim=-1)
void Fit(std::vector< CbmStsTrack > &Tracks, const std::vector< CbmMvdHit > &vMvdHits, const std::vector< CbmStsHit > &vStsHits, const std::vector< int > &pidHypo)
Bool_t IsTrdElectron(Int_t globalTrackindex, Double_t momentum)
Identify electron in RICH detector.
Bool_t IsTofElectron(Int_t globalTrackIndex, Double_t momentum, Double_t eventTime=1000.)
Identify electron in RICH detector.
Bool_t IsRichElectron(Int_t globalTrackIndex, Double_t momentum)
Identify electron in RICH detector.
void SetRichAnnCut(Double_t par)
Set cut on RICH ANN output value.
static CbmLitGlobalElectronId & GetInstance()
int32_t GetMotherId() const
Definition CbmMCTrack.h:69
int32_t GetPdgCode() const
Definition CbmMCTrack.h:68
void Get4Momentum(TLorentzVector &momentum) const
Definition CbmMCTrack.h:173
void GetStartVertex(TVector3 &vertex) const
Definition CbmMCTrack.h:176
int32_t GetNofLinks() const
Definition CbmMatch.h:42
const CbmLink & GetMatchedLink() const
Definition CbmMatch.h:41
double CalculateAnnValue(int globalTrackIndex, double momentum)
Calculate output value of the ANN.
static CbmRichElectronIdAnn & GetInstance()
Double_t fAngle
Definition LmvmKinePar.h:23
Double_t fMinv
Definition LmvmKinePar.h:22
Double_t fPt
Definition LmvmKinePar.h:20
Double_t fMomentumMag
Definition LmvmKinePar.h:19
Double_t fRapidity
Definition LmvmKinePar.h:21
Hash for CbmL1LinkKey.