CbmRoot
Loading...
Searching...
No Matches
CbmKresConversionPhotons.cxx
Go to the documentation of this file.
1/* Copyright (C) 2017-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Ievgenii Kres, Florian Uhlig [committer] */
4
21
22#include "CbmGlobalTrack.h"
24#include "CbmKresConversionBG.h"
25#include "CbmKresFunctions.h"
26#include "CbmMCTrack.h"
27#include "CbmMvdHit.h"
28#include "CbmRichHit.h"
29#include "CbmRichRing.h"
30#include "CbmRichRingLight.h"
31#include "CbmRichUtil.h"
32#include "CbmStsHit.h"
33#include "CbmStsTrack.h"
34#include "CbmTrackMatchNew.h"
35
36#include "FairRootManager.h"
37
38#include <iostream>
39
40#include "KFParticle.h"
41
42using namespace std;
43
45 : fTrainPhotons(nullptr)
46 , AnnTrainPhotons(0)
47 , fAnnPhotonsSelection(nullptr)
48 , UseAnnPhotons(0)
49 , fMcTracks(nullptr)
50 , fGlobalTracks(nullptr)
51 , fStsTracks(nullptr)
52 , fStsTrackMatches(nullptr)
53 , fRichProjections(nullptr)
54 , fRichRings(nullptr)
55 , fRichRingMatches(nullptr)
56 , fRichHits(nullptr)
57 , fArrayMvdHit(nullptr)
58 , fArrayStsHit(nullptr)
59 , fPrimVertex(nullptr)
60 , fKFVertex()
61 , fTauFit(nullptr)
62 , VStsTrack_minus_Outside()
63 , VMCtracks_minus_Outside()
64 , VRings_minus_Outside()
65 , VStsIndex_minus_Outside()
66 , VRichRing_minus_Outside()
67 , VStsTrack_plus_Outside()
68 , VMCtracks_plus_Outside()
69 , VRings_plus_Outside()
70 , VStsIndex_plus_Outside()
71 , VRichRing_plus_Outside()
72 , VMCtracks_minus_Target()
73 , VStsTrack_minus_Target()
74 , VMomenta_minus_Target()
75 , VRings_minus_Target()
76 , VStsIndex_minus_Target()
77 , VRichRing_minus_Target()
78 , VMCtracks_plus_Target()
79 , VStsTrack_plus_Target()
80 , VMomenta_plus_Target()
81 , VRings_plus_Target()
82 , VStsIndex_plus_Target()
83 , VRichRing_plus_Target()
84 , frefmomenta()
85 , frefId()
86 , fMCtracks()
87 , DP_LK_EMT_momenta_minus_Target()
88 , DP_LK_EMT_NofRings_minus_Target()
89 , DP_LK_EMT_STS_minus_Target()
90 , DP_LK_EMT_STS_minus_index_Target()
91 , DP_LK_EMT_momenta_plus_Target()
92 , DP_LK_EMT_NofRings_plus_Target()
93 , DP_LK_EMT_STS_plus_Target()
94 , DP_LK_EMT_STS_plus_index_Target()
95 , DP_LK_EMT_NofRings_minus_Outside()
96 , DP_LK_EMT_STS_minus_Outside()
97 , DP_LK_EMT_STS_minus_index_Outside()
98 , DP_LK_EMT_NofRings_plus_Outside()
99 , DP_LK_EMT_STS_plus_Outside()
100 , DP_LK_EMT_STS_plus_index_Outside()
101 , DP_EMT_Event_minus_Target()
102 , DP_EMT_momenta_minus_Target()
103 , DP_EMT_NofRings_minus_Target()
104 , DP_EMT_Hits_minus_Target()
105 , DP_EMT_Event_plus_Target()
106 , DP_EMT_momenta_plus_Target()
107 , DP_EMT_NofRings_plus_Target()
108 , DP_EMT_Hits_plus_Target()
109 , DP_EMT_Event_minus_Outside()
110 , DP_EMT_STS_minus_Outside()
111 , DP_EMT_KFTrack_minus_Outside()
112 , DP_EMT_NofRings_minus_Outside()
113 , DP_EMT_Hits_minus_Outside()
114 , DP_EMT_Event_plus_Outside()
115 , DP_EMT_STS_plus_Outside()
116 , DP_EMT_KFTrack_plus_Outside()
117 , DP_EMT_NofRings_plus_Outside()
118 , DP_EMT_Hits_plus_Outside()
119 , Gammas_all_Target()
120 , Gammas_zero_Target()
121 , Gammas_one_Target()
122 , Gammas_two_Target()
123 , Gammas_onetwo_Target()
124 , Gammas_stsIndex_all_Target()
125 , Gammas_stsIndex_zero_Target()
126 , Gammas_stsIndex_one_Target()
127 , Gammas_stsIndex_two_Target()
128 , Gammas_stsIndex_onetwo_Target()
129 , Gammas_MC_all_Target()
130 , Gammas_MC_zero_Target()
131 , Gammas_MC_one_Target()
132 , Gammas_MC_two_Target()
133 , Gammas_MC_onetwo_Target()
134 , Gammas_all_Outside()
135 , Gammas_zero_Outside()
136 , Gammas_one_Outside()
137 , Gammas_two_Outside()
138 , Gammas_onetwo_Outside()
139 , Gammas_stsIndex_all_Outside()
140 , Gammas_stsIndex_zero_Outside()
141 , Gammas_stsIndex_one_Outside()
142 , Gammas_stsIndex_two_Outside()
143 , Gammas_stsIndex_onetwo_Outside()
144 , Gammas_MC_all_Outside()
145 , Gammas_MC_zero_Outside()
146 , Gammas_MC_one_Outside()
147 , Gammas_MC_two_Outside()
148 , Gammas_MC_onetwo_Outside()
149 , Gammas_all_Both()
150 , Gammas_zero_Both()
151 , Gammas_one_Both()
152 , Gammas_two_Both()
153 , Gammas_onetwo_Both()
154 , Gammas_stsIndex_all_Both()
155 , Gammas_stsIndex_zero_Both()
156 , Gammas_stsIndex_one_Both()
157 , Gammas_stsIndex_two_Both()
158 , Gammas_stsIndex_onetwo_Both()
159 , Gammas_MC_all_Both()
160 , Gammas_MC_zero_Both()
161 , Gammas_MC_one_Both()
162 , Gammas_MC_two_Both()
163 , Gammas_MC_onetwo_Both()
164 , fHistoList_dp_Target()
165 , Mother_PDG_Target(nullptr)
166 , GrandMother_PDG_Target(nullptr)
167 , fHistoList_dp_Outside()
168 , Mother_PDG_Outside(nullptr)
169 , GrandMother_PDG_Outside(nullptr)
170 , fHistoList_dp_Both()
171 , Pdg_vs_Distance_for_dp(nullptr)
172 , P_vs_Distance_for_dp(nullptr)
173 , DP_AnnTruePairs(nullptr)
174 , DP_AnnFalsePairs(nullptr)
175 , DP_AnnTruePairs_AfterCuts(nullptr)
176 , DP_AnnFalsePairs_AfterCuts(nullptr)
177 , fHistoList_dp_cuts_Both()
178 , DP_candidates_InvMass_vs_OA_Both(nullptr)
179 , DP_InvMass_vs_OA_Both(nullptr)
180 , DP_candidates_InvMass_Both(nullptr)
181 , DP_InvMass_Both(nullptr)
182 , DP_candidates_OA_Both(nullptr)
183 , DP_OA_Both(nullptr)
184 , DP_candidates_PlaneAngles_last_Both(nullptr)
185 , DP_PlaneAngles_last_Both(nullptr)
186 , DP_candidates_PlaneAngles_first_Both(nullptr)
187 , DP_PlaneAngles_first_Both(nullptr)
188 , fHistoList_dp_cuts_Target()
189 , DP_candidates_InvMass_vs_OA_Target(nullptr)
190 , DP_InvMass_vs_OA_Target(nullptr)
191 , DP_candidates_InvMass_Target(nullptr)
192 , DP_InvMass_Target(nullptr)
193 , DP_candidates_OA_Target(nullptr)
194 , DP_OA_Target(nullptr)
195 , DP_candidates_PlaneAngles_last_Target(nullptr)
196 , DP_PlaneAngles_last_Target(nullptr)
197 , DP_candidates_PlaneAngles_first_Target(nullptr)
198 , DP_PlaneAngles_first_Target(nullptr)
199 , fHistoList_dp_cuts_Outside()
200 , DP_candidates_InvMass_vs_OA_Outside(nullptr)
201 , DP_InvMass_vs_OA_Outside(nullptr)
202 , DP_candidates_InvMass_Outside(nullptr)
203 , DP_InvMass_Outside(nullptr)
204 , DP_candidates_OA_Outside(nullptr)
205 , DP_OA_Outside(nullptr)
206 , DP_candidates_PlaneAngles_last_Outside(nullptr)
207 , DP_PlaneAngles_last_Outside(nullptr)
208 , DP_candidates_PlaneAngles_first_Outside(nullptr)
209 , DP_PlaneAngles_first_Outside(nullptr)
210 , fHistoList_dp_all_Target()
211 , DP_InvMassReco_all_Target(nullptr)
212 , DP_OpeningAngleReco_all_Target(nullptr)
213 , DP_Pdg_all_Target(nullptr)
214 , DP_P_reco_all_Target(nullptr)
215 , DP_Pt_reco_all_Target(nullptr)
216 , Ph_fromTarget_Pt_reco_all_Target(nullptr)
217 , Ph_fromPions_Pt_reco_all_Target(nullptr)
218 , Ph_fromEtas_Pt_reco_all_Target(nullptr)
219 , Ph_fromDalitz_Pt_reco_all_Target(nullptr)
220 , fHistoList_dp_zero_Target()
221 , DP_InvMassReco_zero_Target(nullptr)
222 , DP_OpeningAngleReco_zero_Target(nullptr)
223 , DP_Pdg_zero_Target(nullptr)
224 , DP_P_reco_zero_Target(nullptr)
225 , DP_Pt_reco_zero_Target(nullptr)
226 , Ph_fromTarget_Pt_reco_zero_Target(nullptr)
227 , Ph_fromPions_Pt_reco_zero_Target(nullptr)
228 , Ph_fromEtas_Pt_reco_zero_Target(nullptr)
229 , Ph_fromDalitz_Pt_reco_zero_Target(nullptr)
230 , fHistoList_dp_one_Target()
231 , DP_InvMassReco_one_Target(nullptr)
232 , DP_OpeningAngleReco_one_Target(nullptr)
233 , DP_Pdg_one_Target(nullptr)
234 , DP_P_reco_one_Target(nullptr)
235 , DP_Pt_reco_one_Target(nullptr)
236 , Ph_fromTarget_Pt_reco_one_Target(nullptr)
237 , Ph_fromPions_Pt_reco_one_Target(nullptr)
238 , Ph_fromEtas_Pt_reco_one_Target(nullptr)
239 , Ph_fromDalitz_Pt_reco_one_Target(nullptr)
240 , fHistoList_dp_two_Target()
241 , DP_InvMassReco_two_Target(nullptr)
242 , DP_OpeningAngleReco_two_Target(nullptr)
243 , DP_Pdg_two_Target(nullptr)
244 , DP_P_reco_two_Target(nullptr)
245 , DP_Pt_reco_two_Target(nullptr)
246 , Ph_fromTarget_Pt_reco_two_Target(nullptr)
247 , Ph_fromPions_Pt_reco_two_Target(nullptr)
248 , Ph_fromEtas_Pt_reco_two_Target(nullptr)
249 , Ph_fromDalitz_Pt_reco_two_Target(nullptr)
250 , Ph_fromXi_Pt_reco_two_Target(nullptr)
251 , Ph_fromOther_Pt_reco_two_Target(nullptr)
252 , Ph_twoFromTarget_Pt_reco_two_Target(nullptr)
253 , Ph_fromCombinatorial_Pt_reco_two_Target(nullptr)
254 , Ph_fromConversion_Pt_reco_two_Target(nullptr)
255 , twoFromTarget_PDG_two_Target(nullptr)
256 , fromCombinatorial_PDG_two_Target(nullptr)
257 , CombinatorialGrMotherPdg_two_Target(nullptr)
258 , CombinatorialMotherPdg_two_Target(nullptr)
259 , Electrons_two_Target(nullptr)
260 , Pions_two_Target(nullptr)
261 , PionElectron_two_Target(nullptr)
262 , elsePionOrElectron_two_Target(nullptr)
263 , DalitzAndConversion_Pt_two_Target(nullptr)
264 , DoubleConversion_Pt_two_Target(nullptr)
265 , fromFireball_P_two_Target(nullptr)
266 , twoFromTarget_P_two_Target(nullptr)
267 , fromCombinatorial_electron_P_two_Target(nullptr)
268 , fromCombinatorial_NOTelectron_P_two_Target(nullptr)
269 , fHistoList_dp_onetwo_Target()
270 , DP_InvMassReco_onetwo_Target(nullptr)
271 , DP_OpeningAngleReco_onetwo_Target(nullptr)
272 , DP_Pdg_onetwo_Target(nullptr)
273 , DP_P_reco_onetwo_Target(nullptr)
274 , DP_Pt_reco_onetwo_Target(nullptr)
275 , Ph_fromTarget_Pt_reco_onetwo_Target(nullptr)
276 , Ph_fromPions_Pt_reco_onetwo_Target(nullptr)
277 , Ph_fromEtas_Pt_reco_onetwo_Target(nullptr)
278 , Ph_fromDalitz_Pt_reco_onetwo_Target(nullptr)
279 , Ph_fromXi_Pt_reco_onetwo_Target(nullptr)
280 , Ph_fromOther_Pt_reco_onetwo_Target(nullptr)
281 , Ph_twoFromTarget_Pt_reco_onetwo_Target(nullptr)
282 , Ph_fromCombinatorial_Pt_reco_onetwo_Target(nullptr)
283 , Ph_fromConversion_Pt_reco_onetwo_Target(nullptr)
284 , twoFromTarget_PDG_onetwo_Target(nullptr)
285 , fromCombinatorial_PDG_onetwo_Target(nullptr)
286 , CombinatorialGrMotherPdg_onetwo_Target(nullptr)
287 , CombinatorialMotherPdg_onetwo_Target(nullptr)
288 , Electrons_onetwo_Target(nullptr)
289 , Pions_onetwo_Target(nullptr)
290 , PionElectron_onetwo_Target(nullptr)
291 , elsePionOrElectron_onetwo_Target(nullptr)
292 , DalitzAndConversion_Pt_onetwo_Target(nullptr)
293 , DoubleConversion_Pt_onetwo_Target(nullptr)
294 , fromFireball_P_onetwo_Target(nullptr)
295 , twoFromTarget_P_onetwo_Target(nullptr)
296 , fromCombinatorial_electron_P_onetwo_Target(nullptr)
297 , fromCombinatorial_NOTelectron_P_onetwo_Target(nullptr)
298 , fHistoList_dp_all_Outside()
299 , DP_InvMassReco_all_Outside(nullptr)
300 , DP_OpeningAngleReco_all_Outside(nullptr)
301 , DP_Pdg_all_Outside(nullptr)
302 , DP_P_reco_all_Outside(nullptr)
303 , DP_Pt_reco_all_Outside(nullptr)
304 , Ph_fromTarget_Pt_reco_all_Outside(nullptr)
305 , Ph_fromPions_Pt_reco_all_Outside(nullptr)
306 , Ph_fromEtas_Pt_reco_all_Outside(nullptr)
307 , Ph_fromDalitz_Pt_reco_all_Outside(nullptr)
308 , fHistoList_dp_zero_Outside()
309 , DP_InvMassReco_zero_Outside(nullptr)
310 , DP_OpeningAngleReco_zero_Outside(nullptr)
311 , DP_Pdg_zero_Outside(nullptr)
312 , DP_P_reco_zero_Outside(nullptr)
313 , DP_Pt_reco_zero_Outside(nullptr)
314 , Ph_fromTarget_Pt_reco_zero_Outside(nullptr)
315 , Ph_fromPions_Pt_reco_zero_Outside(nullptr)
316 , Ph_fromEtas_Pt_reco_zero_Outside(nullptr)
317 , Ph_fromDalitz_Pt_reco_zero_Outside(nullptr)
318 , fHistoList_dp_one_Outside()
319 , DP_InvMassReco_one_Outside(nullptr)
320 , DP_OpeningAngleReco_one_Outside(nullptr)
321 , DP_Pdg_one_Outside(nullptr)
322 , DP_P_reco_one_Outside(nullptr)
323 , DP_Pt_reco_one_Outside(nullptr)
324 , Ph_fromTarget_Pt_reco_one_Outside(nullptr)
325 , Ph_fromPions_Pt_reco_one_Outside(nullptr)
326 , Ph_fromEtas_Pt_reco_one_Outside(nullptr)
327 , Ph_fromDalitz_Pt_reco_one_Outside(nullptr)
328 , fHistoList_dp_two_Outside()
329 , DP_InvMassReco_two_Outside(nullptr)
330 , DP_OpeningAngleReco_two_Outside(nullptr)
331 , DP_Pdg_two_Outside(nullptr)
332 , DP_P_reco_two_Outside(nullptr)
333 , DP_Pt_reco_two_Outside(nullptr)
334 , Ph_fromTarget_Pt_reco_two_Outside(nullptr)
335 , Ph_fromPions_Pt_reco_two_Outside(nullptr)
336 , Ph_fromEtas_Pt_reco_two_Outside(nullptr)
337 , Ph_fromDalitz_Pt_reco_two_Outside(nullptr)
338 , Ph_fromXi_Pt_reco_two_Outside(nullptr)
339 , Ph_fromOther_Pt_reco_two_Outside(nullptr)
340 , Ph_twoFromTarget_Pt_reco_two_Outside(nullptr)
341 , Ph_fromCombinatorial_Pt_reco_two_Outside(nullptr)
342 , Ph_fromConversion_Pt_reco_two_Outside(nullptr)
343 , twoFromTarget_PDG_two_Outside(nullptr)
344 , fromCombinatorial_PDG_two_Outside(nullptr)
345 , CombinatorialGrMotherPdg_two_Outside(nullptr)
346 , CombinatorialMotherPdg_two_Outside(nullptr)
347 , Electrons_two_Outside(nullptr)
348 , Pions_two_Outside(nullptr)
349 , PionElectron_two_Outside(nullptr)
350 , elsePionOrElectron_two_Outside(nullptr)
351 , DalitzAndConversion_Pt_two_Outside(nullptr)
352 , DoubleConversion_Pt_two_Outside(nullptr)
353 , fromFireball_P_two_Outside(nullptr)
354 , twoFromTarget_P_two_Outside(nullptr)
355 , fromCombinatorial_electron_P_two_Outside(nullptr)
356 , fromCombinatorial_NOTelectron_P_two_Outside(nullptr)
357 , fHistoList_dp_onetwo_Outside()
358 , DP_InvMassReco_onetwo_Outside(nullptr)
359 , DP_OpeningAngleReco_onetwo_Outside(nullptr)
360 , DP_Pdg_onetwo_Outside(nullptr)
361 , DP_P_reco_onetwo_Outside(nullptr)
362 , DP_Pt_reco_onetwo_Outside(nullptr)
363 , Ph_fromTarget_Pt_reco_onetwo_Outside(nullptr)
364 , Ph_fromPions_Pt_reco_onetwo_Outside(nullptr)
365 , Ph_fromEtas_Pt_reco_onetwo_Outside(nullptr)
366 , Ph_fromDalitz_Pt_reco_onetwo_Outside(nullptr)
367 , Ph_fromXi_Pt_reco_onetwo_Outside(nullptr)
368 , Ph_fromOther_Pt_reco_onetwo_Outside(nullptr)
369 , Ph_twoFromTarget_Pt_reco_onetwo_Outside(nullptr)
370 , Ph_fromCombinatorial_Pt_reco_onetwo_Outside(nullptr)
371 , Ph_fromConversion_Pt_reco_onetwo_Outside(nullptr)
372 , twoFromTarget_PDG_onetwo_Outside(nullptr)
373 , fromCombinatorial_PDG_onetwo_Outside(nullptr)
374 , CombinatorialGrMotherPdg_onetwo_Outside(nullptr)
375 , CombinatorialMotherPdg_onetwo_Outside(nullptr)
376 , Electrons_onetwo_Outside(nullptr)
377 , Pions_onetwo_Outside(nullptr)
378 , PionElectron_onetwo_Outside(nullptr)
379 , elsePionOrElectron_onetwo_Outside(nullptr)
380 , DalitzAndConversion_Pt_onetwo_Outside(nullptr)
381 , DoubleConversion_Pt_onetwo_Outside(nullptr)
382 , fromFireball_P_onetwo_Outside(nullptr)
383 , twoFromTarget_P_onetwo_Outside(nullptr)
384 , fromCombinatorial_electron_P_onetwo_Outside(nullptr)
385 , fromCombinatorial_NOTelectron_P_onetwo_Outside(nullptr)
386 , fHistoList_dp_all_Both()
387 , DP_InvMassReco_all_Both(nullptr)
388 , DP_OpeningAngleReco_all_Both(nullptr)
389 , DP_Pdg_all_Both(nullptr)
390 , DP_P_reco_all_Both(nullptr)
391 , DP_Pt_reco_all_Both(nullptr)
392 , Ph_fromTarget_Pt_reco_all_Both(nullptr)
393 , Ph_fromPions_Pt_reco_all_Both(nullptr)
394 , Ph_fromEtas_Pt_reco_all_Both(nullptr)
395 , Ph_fromDalitz_Pt_reco_all_Both(nullptr)
396 , Ph_pt_vs_rap_est_all_Both(nullptr)
397 , fHistoList_dp_zero_Both()
398 , DP_InvMassReco_zero_Both(nullptr)
399 , DP_OpeningAngleReco_zero_Both(nullptr)
400 , DP_Pdg_zero_Both(nullptr)
401 , DP_P_reco_zero_Both(nullptr)
402 , DP_Pt_reco_zero_Both(nullptr)
403 , Ph_fromTarget_Pt_reco_zero_Both(nullptr)
404 , Ph_fromPions_Pt_reco_zero_Both(nullptr)
405 , Ph_fromEtas_Pt_reco_zero_Both(nullptr)
406 , Ph_fromDalitz_Pt_reco_zero_Both(nullptr)
407 , Ph_pt_vs_rap_est_zero_Both(nullptr)
408 , fHistoList_dp_one_Both()
409 , DP_InvMassReco_one_Both(nullptr)
410 , DP_OpeningAngleReco_one_Both(nullptr)
411 , DP_Pdg_one_Both(nullptr)
412 , DP_P_reco_one_Both(nullptr)
413 , DP_Pt_reco_one_Both(nullptr)
414 , Ph_fromTarget_Pt_reco_one_Both(nullptr)
415 , Ph_fromPions_Pt_reco_one_Both(nullptr)
416 , Ph_fromEtas_Pt_reco_one_Both(nullptr)
417 , Ph_fromDalitz_Pt_reco_one_Both(nullptr)
418 , Ph_pt_vs_rap_est_one_Both(nullptr)
419 , fHistoList_dp_two_Both()
420 , DP_InvMassReco_two_Both(nullptr)
421 , DP_OpeningAngleReco_two_Both(nullptr)
422 , DP_Pdg_two_Both(nullptr)
423 , DP_P_reco_two_Both(nullptr)
424 , DP_Pt_reco_two_Both(nullptr)
425 , Ph_fromTarget_Pt_reco_two_Both(nullptr)
426 , Ph_fromPions_Pt_reco_two_Both(nullptr)
427 , Ph_fromEtas_Pt_reco_two_Both(nullptr)
428 , Ph_fromDalitz_Pt_reco_two_Both(nullptr)
429 , Ph_twoFromTarget_Pt_reco_two_Both(nullptr)
430 , Ph_fromCombinatorial_Pt_reco_two_Both(nullptr)
431 , Ph_fromConversion_Pt_reco_two_Both(nullptr)
432 , Ph_pt_vs_rap_est_two_Both(nullptr)
433 , fHistoList_dp_onetwo_Both()
434 , DP_InvMassReco_onetwo_Both(nullptr)
435 , DP_OpeningAngleReco_onetwo_Both(nullptr)
436 , DP_Pdg_onetwo_Both(nullptr)
437 , DP_P_reco_onetwo_Both(nullptr)
438 , DP_Pt_reco_onetwo_Both(nullptr)
439 , Ph_fromTarget_Pt_reco_onetwo_Both(nullptr)
440 , Ph_fromPions_Pt_reco_onetwo_Both(nullptr)
441 , Ph_fromEtas_Pt_reco_onetwo_Both(nullptr)
442 , Ph_fromDalitz_Pt_reco_onetwo_Both(nullptr)
443 , Ph_twoFromTarget_Pt_reco_onetwo_Both(nullptr)
444 , Ph_fromCombinatorial_Pt_reco_onetwo_Both(nullptr)
445 , Ph_fromConversion_Pt_reco_onetwo_Both(nullptr)
446 , Ph_pt_vs_rap_est_onetwo_Both(nullptr)
447 , DP_EMT_Pt_all_Target(nullptr)
448 , DP_EMT_Pt_zero_Target(nullptr)
449 , DP_EMT_Pt_one_Target(nullptr)
450 , DP_EMT_Pt_two_Target(nullptr)
451 , DP_EMT_Pt_onetwo_Target(nullptr)
452 , DP_EMT_Pt_all_Outside(nullptr)
453 , DP_EMT_Pt_zero_Outside(nullptr)
454 , DP_EMT_Pt_one_Outside(nullptr)
455 , DP_EMT_Pt_two_Outside(nullptr)
456 , DP_EMT_Pt_onetwo_Outside(nullptr)
457 , DP_EMT_Pt_all_Both(nullptr)
458 , DP_EMT_Pt_zero_Both(nullptr)
459 , DP_EMT_Pt_one_Both(nullptr)
460 , DP_EMT_Pt_two_Both(nullptr)
461 , DP_EMT_Pt_onetwo_Both(nullptr)
462 , DP_LK_EMT_neg_Pt_all_Target(nullptr)
463 , DP_LK_EMT_neg_Pt_zero_Target(nullptr)
464 , DP_LK_EMT_neg_Pt_one_Target(nullptr)
465 , DP_LK_EMT_neg_Pt_two_Target(nullptr)
466 , DP_LK_EMT_neg_Pt_onetwo_Target(nullptr)
467 , DP_LK_EMT_pos_Pt_all_Target(nullptr)
468 , DP_LK_EMT_pos_Pt_zero_Target(nullptr)
469 , DP_LK_EMT_pos_Pt_one_Target(nullptr)
470 , DP_LK_EMT_pos_Pt_two_Target(nullptr)
471 , DP_LK_EMT_pos_Pt_onetwo_Target(nullptr)
472 , DP_LK_EMT_Pt_all_Target(nullptr)
473 , DP_LK_EMT_Pt_zero_Target(nullptr)
474 , DP_LK_EMT_Pt_one_Target(nullptr)
475 , DP_LK_EMT_Pt_two_Target(nullptr)
476 , DP_LK_EMT_Pt_onetwo_Target(nullptr)
477 , DP_LK_EMT_neg_Pt_all_Outside(nullptr)
478 , DP_LK_EMT_neg_Pt_zero_Outside(nullptr)
479 , DP_LK_EMT_neg_Pt_one_Outside(nullptr)
480 , DP_LK_EMT_neg_Pt_two_Outside(nullptr)
481 , DP_LK_EMT_neg_Pt_onetwo_Outside(nullptr)
482 , DP_LK_EMT_pos_Pt_all_Outside(nullptr)
483 , DP_LK_EMT_pos_Pt_zero_Outside(nullptr)
484 , DP_LK_EMT_pos_Pt_one_Outside(nullptr)
485 , DP_LK_EMT_pos_Pt_two_Outside(nullptr)
486 , DP_LK_EMT_pos_Pt_onetwo_Outside(nullptr)
487 , DP_LK_EMT_Pt_all_Outside(nullptr)
488 , DP_LK_EMT_Pt_zero_Outside(nullptr)
489 , DP_LK_EMT_Pt_one_Outside(nullptr)
490 , DP_LK_EMT_Pt_two_Outside(nullptr)
491 , DP_LK_EMT_Pt_onetwo_Outside(nullptr)
492{
493}
494
496
498{
499 FairRootManager* ioman = FairRootManager::Instance();
500 if (nullptr == ioman) { Fatal("CbmKresConversionPhotons::Init", "RootManager not instantised!"); }
501
502 fMcTracks = (TClonesArray*) ioman->GetObject("MCTrack");
503 if (nullptr == fMcTracks) { Fatal("CbmKresConversionPhotons::Init", "No MCTrack array!"); }
504
505 fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex."));
506 if (nullptr == fPrimVertex) { fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex")); }
507 if (nullptr == fPrimVertex) { LOG(fatal) << "CbmKresConversionPhotons::Init No PrimaryVertex array!"; }
508
509 fGlobalTracks = (TClonesArray*) ioman->GetObject("GlobalTrack");
510 if (nullptr == fGlobalTracks) { Fatal("CbmKresConversionPhotons::Init", "No GlobalTrack array!"); }
511
512 fStsTracks = (TClonesArray*) ioman->GetObject("StsTrack");
513 if (nullptr == fStsTracks) { Fatal("CbmKresConversionPhotons::Init", "No StsTrack array!"); }
514
515 fStsTrackMatches = (TClonesArray*) ioman->GetObject("StsTrackMatch");
516 if (nullptr == fStsTrackMatches) { Fatal("CbmKresConversionPhotons::Init", "No StsTrackMatch array!"); }
517
518 fRichProjections = (TClonesArray*) ioman->GetObject("RichProjection");
519 if (nullptr == fRichProjections) { Fatal("CbmKresConversionPhotons::Init", "No RichProjection array!"); }
520
521 fRichRings = (TClonesArray*) ioman->GetObject("RichRing");
522 if (nullptr == fRichRings) { Fatal("CbmKresConversionPhotons::Init", "No RichRing array!"); }
523
524 fRichRingMatches = (TClonesArray*) ioman->GetObject("RichRingMatch");
525 if (nullptr == fRichRingMatches) { Fatal("CbmKresConversionPhotons::Init", "No RichRingMatch array!"); }
526
527 fRichHits = (TClonesArray*) ioman->GetObject("RichHit");
528 if (nullptr == fRichHits) { Fatal("CbmKresConversionPhotons::Init", "No RichHit array!"); }
529
530 fArrayMvdHit = (TClonesArray*) ioman->GetObject("MvdHit");
531 if (nullptr == fArrayMvdHit) { Fatal("CbmKresConversionPhotons::Init", "No MvdHit array!"); }
532
533 fArrayStsHit = (TClonesArray*) ioman->GetObject("StsHit");
534 if (nullptr == fArrayStsHit) { Fatal("CbmKresConversionPhotons::Init", "No StsHit array!"); }
535
536
538
540
541 AnnTrainPhotons = 0;
542
544
545 if (AnnTrainPhotons == 1) {
548 cout << endl;
549 cout << "\t *** CbmKresTrainAnnDirectPhotons ==> is "
550 "activated"
551 << endl;
552 }
553
554
555 if (UseAnnPhotons == 1) {
558 cout << endl;
559 cout << "\t *** CbmKresSelectAnnPhotons ==> is "
560 "activated"
561 << endl;
562 }
563}
564
565
566void CbmKresConversionPhotons::Exec(int fEventNumDP, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
567{
568 cout << "CbmKresConversionPhotons, event No. " << fEventNumDP << endl;
569
570 if (fPrimVertex != nullptr) { fKFVertex = CbmKFVertex(*fPrimVertex); }
571 else {
572 Fatal("CbmKresConversionPhotons::Exec", "No PrimaryVertex array!");
573 }
574
575
576 Gammas_all_Target.clear();
577 Gammas_one_Target.clear();
578 Gammas_two_Target.clear();
579 Gammas_zero_Target.clear();
580 Gammas_onetwo_Target.clear();
586 Gammas_MC_all_Target.clear();
587 Gammas_MC_one_Target.clear();
588 Gammas_MC_two_Target.clear();
589 Gammas_MC_zero_Target.clear();
591 Gammas_all_Outside.clear();
592 Gammas_one_Outside.clear();
593 Gammas_two_Outside.clear();
594 Gammas_zero_Outside.clear();
595 Gammas_onetwo_Outside.clear();
601 Gammas_MC_all_Outside.clear();
602 Gammas_MC_one_Outside.clear();
603 Gammas_MC_two_Outside.clear();
606 Gammas_all_Both.clear();
607 Gammas_one_Both.clear();
608 Gammas_two_Both.clear();
609 Gammas_zero_Both.clear();
610 Gammas_onetwo_Both.clear();
616 Gammas_MC_all_Both.clear();
617 Gammas_MC_one_Both.clear();
618 Gammas_MC_two_Both.clear();
619 Gammas_MC_zero_Both.clear();
620 Gammas_MC_onetwo_Both.clear();
621
622
625 VRings_minus_Outside.clear();
630 VRings_plus_Outside.clear();
633
635 VMomenta_minus_Target.clear();
637 VRings_minus_Target.clear();
640 VMCtracks_plus_Target.clear();
641 VStsTrack_plus_Target.clear();
642 VMomenta_plus_Target.clear();
643 VRings_plus_Target.clear();
644 VStsIndex_plus_Target.clear();
645 VRichRing_plus_Target.clear();
646
647
648 Int_t ngTracks = fGlobalTracks->GetEntriesFast();
649 for (Int_t i = 0; i < ngTracks; i++) {
650 CbmGlobalTrack* gTrack = (CbmGlobalTrack*) fGlobalTracks->At(i);
651 if (nullptr == gTrack) continue;
652 Int_t stsInd = gTrack->GetStsTrackIndex();
653 Int_t richInd = gTrack->GetRichRingIndex();
654
655 if (stsInd < 0) continue;
656 CbmStsTrack* stsTrack = (CbmStsTrack*) fStsTracks->At(stsInd);
657 if (stsTrack == nullptr) continue;
658 CbmTrackMatchNew* stsMatch = (CbmTrackMatchNew*) fStsTrackMatches->At(stsInd);
659 if (stsMatch == nullptr) continue;
660 if (stsMatch->GetNofLinks() <= 0) continue;
661 Int_t stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
662 if (stsMcTrackId < 0) continue;
663 CbmMCTrack* mcTrack = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
664 if (mcTrack == nullptr) continue;
665
666
667 FairTrackParam* proj = (FairTrackParam*) fRichProjections->At(i);
668 if (richInd < 0 && proj->GetX() > -115 && proj->GetX() < 115
669 && ((proj->GetY() < -120 && proj->GetY() > -200) || (proj->GetY() > 120 && proj->GetY() < 200)))
670 continue;
671 CbmRichRing* Ring = nullptr;
672 if (richInd > -1) {
673 Ring = static_cast<CbmRichRing*>(fRichRings->At(richInd));
675 if (TMath::Abs(mcTrack->GetPdgCode()) == 11)
677 }
678
679 // Doing fit with Fit To primary Vertex and calculate chi2 to primary vertex
680 double chi2 = 0;
682 fKFVertex.GetRefZ(), chi2);
683 const FairTrackParam* track_par = stsTrack->GetParamFirst();
684 double charge = track_par->GetQp();
685
686
687 if (chi2 != chi2) continue;
688 if (chi2 == 0) continue;
689
690 if (chi2 > 3) { SaveOutsideTracks(mcTrack, stsTrack, charge, stsInd, richInd, stsMcTrackId, Ring); }
691 if (chi2 > 3) continue;
692
693 SaveTargetTracks(mcTrack, stsTrack, Momentum, charge, stsInd, richInd, stsMcTrackId, Ring);
694 }
695
696
697 FindGammasTarget(fEventNumDP, OpeningAngleCut, GammaInvMassCut, RealPID, VMCtracks_minus_Target,
701
702 FindGammasOutside(fEventNumDP, OpeningAngleCut, GammaInvMassCut, RealPID, VMCtracks_minus_Outside,
706
708
709
710 if (UseAnnPhotons == 1) {
711 int numformix = 1000;
712 if (fEventNumDP % numformix == 0) {
713 DP_Mixing_Target(OpeningAngleCut, GammaInvMassCut);
718
723 }
724
725 if (fEventNumDP % numformix == 0) {
726 DP_Mixing_Outside(OpeningAngleCut, GammaInvMassCut);
732
738 }
739
740 // DP_LK_EMT Target
741 DP_likesign_Mixing_Target(OpeningAngleCut, GammaInvMassCut);
750
751 // DP_LK_EMT Outside
752 DP_likesign_Mixing_Outside(OpeningAngleCut, GammaInvMassCut);
759 }
760}
761
762
763void CbmKresConversionPhotons::SaveOutsideTracks(CbmMCTrack* mcTrack1, CbmStsTrack* stsTrack, double charge, int stsInd,
764 int richInd, int stsMcTrackId, CbmRichRing* RING)
765{
766 int InRich = FindInRich(richInd, stsMcTrackId);
767 if (charge < 0) {
768 VMCtracks_minus_Outside.push_back(mcTrack1);
769 VStsTrack_minus_Outside.push_back(stsTrack);
770 VRings_minus_Outside.push_back(InRich);
771 VStsIndex_minus_Outside.push_back(stsInd);
772 VRichRing_minus_Outside.push_back(RING);
773 }
774 if (charge > 0) {
775 VMCtracks_plus_Outside.push_back(mcTrack1);
776 VStsTrack_plus_Outside.push_back(stsTrack);
777 VRings_plus_Outside.push_back(InRich);
778 VStsIndex_plus_Outside.push_back(stsInd);
779 VRichRing_plus_Outside.push_back(RING);
780 }
781}
782
783void CbmKresConversionPhotons::SaveTargetTracks(CbmMCTrack* mcTrack1, CbmStsTrack* stsTrack, TVector3 refmom,
784 double charge, int stsInd, int richInd, int stsMcTrackId,
785 CbmRichRing* RING)
786{
787 int InRich = FindInRich(richInd, stsMcTrackId);
788 if (charge < 0) {
789 VMCtracks_minus_Target.push_back(mcTrack1);
790 VStsTrack_minus_Target.push_back(stsTrack);
791 VMomenta_minus_Target.push_back(refmom);
792 VRings_minus_Target.push_back(InRich);
793 VStsIndex_minus_Target.push_back(stsInd);
794 VRichRing_minus_Target.push_back(RING);
795 }
796 if (charge > 0) {
797 VMCtracks_plus_Target.push_back(mcTrack1);
798 VStsTrack_plus_Target.push_back(stsTrack);
799 VMomenta_plus_Target.push_back(refmom);
800 VRings_plus_Target.push_back(InRich);
801 VStsIndex_plus_Target.push_back(stsInd);
802 VRichRing_plus_Target.push_back(RING);
803 }
804}
805
806
807void CbmKresConversionPhotons::FindGammasTarget(int EventNumMan, double AngleCut, double InvMassCut, int RealPID,
808 vector<CbmMCTrack*> MCtracks_minus, vector<CbmMCTrack*> MCtracks_plus,
809 vector<CbmStsTrack*> StsTrack_minus, vector<CbmStsTrack*> StsTrack_plus,
810 vector<TVector3> Momenta_minus, vector<TVector3> Momenta_plus,
811 std::vector<int> Rings_minus, std::vector<int> Rings_plus,
812 std::vector<int> stsIndex_minus, std::vector<int> stsIndex_plus,
813 vector<CbmRichRing*> richRing_minus, vector<CbmRichRing*> richRing_plus)
814{
815 for (size_t i = 0; i < Momenta_minus.size(); i++) {
816 for (size_t j = 0; j < Momenta_plus.size(); j++) {
817
818 CbmStsTrack* sts1 = StsTrack_minus.at(i);
819 CbmStsTrack* sts2 = StsTrack_plus.at(j);
820
821 TVector3 part1 = Momenta_minus[i];
822 TVector3 part2 = Momenta_plus[j];
823 CbmMCTrack* part1MC = MCtracks_minus[i];
824 CbmMCTrack* part2MC = MCtracks_plus[j];
825 int sts1_index = stsIndex_minus[i];
826 int sts2_index = stsIndex_plus[j];
827
828 int richcheck_0 = 0;
829 int richcheck_1 = 0;
830 if (RealPID == 1) {
831 // Real PID
832 richcheck_0 = CheckIfElectron(richRing_minus[i], Momenta_minus[i].Mag());
833 richcheck_1 = CheckIfElectron(richRing_plus[j], Momenta_plus[j].Mag());
834 }
835 else {
836 // MC PID
837 richcheck_0 = Rings_minus[i];
838 richcheck_1 = Rings_plus[j];
839 }
840 int richcheck = richcheck_0 + richcheck_1;
841
842 Double_t InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(part1, part2);
843 Double_t OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(part1, part2);
845
846 DP_candidates_InvMass_vs_OA_Target->Fill(InvmassReco, OpeningAngle);
847 DP_candidates_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
848 DP_candidates_InvMass_Target->Fill(InvmassReco);
849 DP_candidates_InvMass_Both->Fill(InvmassReco);
850 DP_candidates_OA_Target->Fill(OpeningAngle);
851 DP_candidates_OA_Both->Fill(OpeningAngle);
852
853 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
854 double PlaneAngle_first = CalculatePlaneAngle_first(sts1, sts2);
855
856 int IdForANN = 0; // 0 - means wrong pair combination; 1 - means correct pair
857 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
858 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
859 if (mcTrackmama->GetMotherId() == -1 && mcTrackmama->GetPdgCode() == 22) {
860 IdForANN = 1;
861 DP_InvMass_Target->Fill(InvmassReco);
862 DP_InvMass_Both->Fill(InvmassReco);
863 DP_OA_Target->Fill(OpeningAngle);
864 DP_OA_Both->Fill(OpeningAngle);
865 DP_InvMass_vs_OA_Target->Fill(InvmassReco, OpeningAngle);
866 DP_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
867 DP_PlaneAngles_last_Target->Fill(PlaneAngle_last);
868 DP_PlaneAngles_last_Both->Fill(PlaneAngle_last);
869 DP_PlaneAngles_first_Target->Fill(PlaneAngle_first);
870 DP_PlaneAngles_first_Both->Fill(PlaneAngle_first);
871 }
872 }
873
874 // run ANN
875 if (AnnTrainPhotons == 1) {
876 fTrainPhotons->Exec(EventNumMan, IdForANN, InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(),
877 part1, part2);
878 continue;
879 }
880
881 double AnnValue = 999;
882 if (UseAnnPhotons == 1) {
883 AnnValue =
884 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), part1, part2);
885 if (IdForANN == 1) DP_AnnTruePairs->Fill(AnnValue);
886 if (IdForANN == 0) DP_AnnFalsePairs->Fill(AnnValue);
887 }
888
889
890 DP_candidates_PlaneAngles_last_Target->Fill(PlaneAngle_last);
891 DP_candidates_PlaneAngles_last_Both->Fill(PlaneAngle_last);
892 DP_candidates_PlaneAngles_first_Target->Fill(PlaneAngle_first);
893 DP_candidates_PlaneAngles_first_Both->Fill(PlaneAngle_first);
894
895
896 // cuts
897 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
898 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
899 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
900
901 int fromPions = 0;
902 int fromEta = 0;
903 int fromFireball = 0;
904 int fromDalitz = 0;
905 int fromXi = 0;
906 int fromOther = 0;
907 int fromCombinatorial = 0;
908 int fromConversion = 0;
909 int twoFromTarget = 0;
910 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
911 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
912 if (mcTrackmama->GetPdgCode() == 22) {
913 if (mcTrackmama->GetMotherId() == -1) { fromFireball = 1; }
914 else {
915 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
916 if (mcTrackGrmama->GetPdgCode() == 111) fromPions = 1;
917 if (mcTrackGrmama->GetPdgCode() == 221) fromEta = 1;
918 if (mcTrackGrmama->GetPdgCode() == 3212) fromXi = 1;
919 fromConversion = 1;
920 }
921 }
922 else {
923 if (mcTrackmama->GetPdgCode() == 111) fromDalitz = 1;
924 if (mcTrackmama->GetPdgCode() != 111) fromOther = 1;
925 }
926 }
927 else if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() == -1) {
928 twoFromTarget = 1;
929 }
930 else {
931 fromCombinatorial = 1;
932 }
933
934
935 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
936 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
937 Mother_PDG_Target->Fill(mcTrackmama->GetPdgCode());
938 if (mcTrackmama->GetPdgCode() == 22) {
939 if (mcTrackmama->GetMotherId() == -1) { GrandMother_PDG_Target->Fill(mcTrackmama->GetMotherId()); }
940 else {
941 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
942 GrandMother_PDG_Target->Fill(TMath::Abs(mcTrackGrmama->GetPdgCode()));
943 }
944 }
945 }
946
947
948 if (IdForANN == 1) DP_AnnTruePairs_AfterCuts->Fill(AnnValue);
949 if (IdForANN == 0) DP_AnnFalsePairs_AfterCuts->Fill(AnnValue);
950
951 frefmomenta.clear();
952 frefmomenta.push_back(part1);
953 frefmomenta.push_back(part2);
954 frefId.clear();
955 frefId.push_back(stsIndex_minus[i]);
956 frefId.push_back(stsIndex_plus[j]);
957 fMCtracks.clear();
958 fMCtracks.push_back(part1MC);
959 fMCtracks.push_back(part2MC);
960
961
962 // for event mixing DP
963 std::vector<TVector3> minusTrack = SaveAllHits(sts1);
964 std::vector<TVector3> plusTrack = SaveAllHits(sts2);
965
966 DP_EMT_Event_minus_Target.push_back(EventNumMan);
967 DP_EMT_momenta_minus_Target.push_back(part1);
968 DP_EMT_NofRings_minus_Target.push_back(richcheck_0);
969 DP_EMT_Hits_minus_Target.push_back(minusTrack);
970
971 DP_EMT_Event_plus_Target.push_back(EventNumMan);
972 DP_EMT_momenta_plus_Target.push_back(part2);
973 DP_EMT_NofRings_plus_Target.push_back(richcheck_1);
974 DP_EMT_Hits_plus_Target.push_back(plusTrack);
975
976 // DP_LK_EMT
977 DP_LK_EMT_momenta_minus_Target.push_back(part1);
978 DP_LK_EMT_NofRings_minus_Target.push_back(richcheck_0);
979 DP_LK_EMT_STS_minus_Target.push_back(sts1);
980 DP_LK_EMT_STS_minus_index_Target.push_back(sts1_index);
981
982 DP_LK_EMT_momenta_plus_Target.push_back(part2);
983 DP_LK_EMT_NofRings_plus_Target.push_back(richcheck_1);
984 DP_LK_EMT_STS_plus_Target.push_back(sts2);
985 DP_LK_EMT_STS_plus_index_Target.push_back(sts2_index);
986
987
988 // everything (RICH == 0, RICH == 1, RICH == 2) together
989 if (richcheck == 0 || richcheck == 1 || richcheck == 2) {
993 DP_InvMassReco_all_Target->Fill(InvmassReco);
994 DP_OpeningAngleReco_all_Target->Fill(OpeningAngle);
995 DP_Pdg_all_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
996 DP_Pdg_all_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
998 DP_Pt_reco_all_Target->Fill(params.fPt);
999 DP_InvMassReco_all_Both->Fill(InvmassReco);
1000 DP_OpeningAngleReco_all_Both->Fill(OpeningAngle);
1001 DP_Pdg_all_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1002 DP_Pdg_all_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1003 DP_P_reco_all_Both->Fill(params.fMomentumMag);
1004 DP_Pt_reco_all_Both->Fill(params.fPt);
1005 if (fromFireball == 1) {
1007 Ph_fromTarget_Pt_reco_all_Both->Fill(params.fPt);
1008 Ph_pt_vs_rap_est_all_Both->Fill(params.fRapidity, params.fPt);
1009 }
1010 if (fromPions == 1) {
1012 Ph_fromPions_Pt_reco_all_Both->Fill(params.fPt);
1013 }
1014 if (fromEta == 1) {
1015 Ph_fromEtas_Pt_reco_all_Target->Fill(params.fPt);
1016 Ph_fromEtas_Pt_reco_all_Both->Fill(params.fPt);
1017 }
1018 if (fromDalitz == 1) {
1020 Ph_fromDalitz_Pt_reco_all_Both->Fill(params.fPt);
1021 }
1022 }
1023
1024 // only cases, when RICH == 0
1025 if (richcheck == 0) {
1029 DP_InvMassReco_zero_Target->Fill(InvmassReco);
1030 DP_OpeningAngleReco_zero_Target->Fill(OpeningAngle);
1031 DP_Pdg_zero_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1032 DP_Pdg_zero_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
1033 DP_P_reco_zero_Target->Fill(params.fMomentumMag);
1034 DP_Pt_reco_zero_Target->Fill(params.fPt);
1035 DP_InvMassReco_zero_Both->Fill(InvmassReco);
1036 DP_OpeningAngleReco_zero_Both->Fill(OpeningAngle);
1037 DP_Pdg_zero_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1038 DP_Pdg_zero_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1039 DP_P_reco_zero_Both->Fill(params.fMomentumMag);
1040 DP_Pt_reco_zero_Both->Fill(params.fPt);
1041 if (fromFireball == 1) {
1044 Ph_pt_vs_rap_est_zero_Both->Fill(params.fRapidity, params.fPt);
1045 }
1046 if (fromPions == 1) {
1048 Ph_fromPions_Pt_reco_zero_Both->Fill(params.fPt);
1049 }
1050 if (fromEta == 1) {
1052 Ph_fromEtas_Pt_reco_zero_Both->Fill(params.fPt);
1053 }
1054 if (fromDalitz == 1) {
1057 }
1058 }
1059
1060 // only cases, when RICH == 1
1061 if (richcheck == 1) {
1062 Gammas_one_Target.push_back(frefmomenta);
1065 DP_InvMassReco_one_Target->Fill(InvmassReco);
1066 DP_OpeningAngleReco_one_Target->Fill(OpeningAngle);
1067 DP_Pdg_one_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1068 DP_Pdg_one_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
1069 DP_P_reco_one_Target->Fill(params.fMomentumMag);
1070 DP_Pt_reco_one_Target->Fill(params.fPt);
1071 DP_InvMassReco_one_Both->Fill(InvmassReco);
1072 DP_OpeningAngleReco_one_Both->Fill(OpeningAngle);
1073 DP_Pdg_one_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1074 DP_Pdg_one_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1075 DP_P_reco_one_Both->Fill(params.fMomentumMag);
1076 DP_Pt_reco_one_Both->Fill(params.fPt);
1077 if (fromFireball == 1) {
1079 Ph_fromTarget_Pt_reco_one_Both->Fill(params.fPt);
1080 Ph_pt_vs_rap_est_one_Both->Fill(params.fRapidity, params.fPt);
1081 }
1082 if (fromPions == 1) {
1084 Ph_fromPions_Pt_reco_one_Both->Fill(params.fPt);
1085 }
1086 if (fromEta == 1) {
1087 Ph_fromEtas_Pt_reco_one_Target->Fill(params.fPt);
1088 Ph_fromEtas_Pt_reco_one_Both->Fill(params.fPt);
1089 }
1090 if (fromDalitz == 1) {
1092 Ph_fromDalitz_Pt_reco_one_Both->Fill(params.fPt);
1093 }
1094 }
1095
1096 // only cases, when RICH == 2
1097 if (richcheck == 2) {
1098 Gammas_two_Target.push_back(frefmomenta);
1101 DP_InvMassReco_two_Target->Fill(InvmassReco);
1102 DP_OpeningAngleReco_two_Target->Fill(OpeningAngle);
1103 DP_Pdg_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1104 DP_Pdg_two_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
1105 DP_P_reco_two_Target->Fill(params.fMomentumMag);
1106 DP_Pt_reco_two_Target->Fill(params.fPt);
1107 DP_InvMassReco_two_Both->Fill(InvmassReco);
1108 DP_OpeningAngleReco_two_Both->Fill(OpeningAngle);
1109 DP_Pdg_two_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1110 DP_Pdg_two_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1111 DP_P_reco_two_Both->Fill(params.fMomentumMag);
1112 DP_Pt_reco_two_Both->Fill(params.fPt);
1113 if (fromFireball == 1) {
1115 Ph_fromTarget_Pt_reco_two_Both->Fill(params.fPt);
1116 Ph_pt_vs_rap_est_two_Both->Fill(params.fRapidity, params.fPt);
1117 fromFireball_P_two_Target->Fill(part1.Mag());
1118 fromFireball_P_two_Target->Fill(part2.Mag());
1119 }
1120 if (fromPions == 1) {
1122 Ph_fromPions_Pt_reco_two_Both->Fill(params.fPt);
1123 }
1124 if (fromEta == 1) {
1125 Ph_fromEtas_Pt_reco_two_Target->Fill(params.fPt);
1126 Ph_fromEtas_Pt_reco_two_Both->Fill(params.fPt);
1127 }
1128 if (fromDalitz == 1) {
1130 Ph_fromDalitz_Pt_reco_two_Both->Fill(params.fPt);
1131 }
1132 if (fromXi == 1) { Ph_fromXi_Pt_reco_two_Target->Fill(params.fPt); }
1133 if (fromOther == 1) { Ph_fromOther_Pt_reco_two_Target->Fill(params.fPt); }
1134 if (fromCombinatorial == 1) {
1135
1136 // particle 1
1137 if (part1MC->GetMotherId() != -1) {
1138 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1139 CombinatorialMotherPdg_two_Target->Fill(TMath::Abs(mama1->GetPdgCode()));
1140 if (mama1->GetMotherId() != -1) {
1141 CbmMCTrack* grmama1 = (CbmMCTrack*) fMcTracks->At(mama1->GetMotherId());
1142 CombinatorialGrMotherPdg_two_Target->Fill(TMath::Abs(grmama1->GetPdgCode()));
1143 }
1144 else {
1146 }
1147 }
1148 else {
1150 }
1151
1152 // particle 2
1153 if (part2MC->GetMotherId() != -1) {
1154 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1155 CombinatorialMotherPdg_two_Target->Fill(TMath::Abs(mama2->GetPdgCode()));
1156 if (mama2->GetMotherId() != -1) {
1157 CbmMCTrack* grmama2 = (CbmMCTrack*) fMcTracks->At(mama2->GetMotherId());
1158 CombinatorialGrMotherPdg_two_Target->Fill(TMath::Abs(grmama2->GetPdgCode()));
1159 }
1160 else {
1162 }
1163 }
1164 else {
1166 }
1167
1168 // Check sources of BG
1169 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1170 Electrons_two_Target->Fill(params.fPt);
1171 }
1172 else if (TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 211) {
1173 Pions_two_Target->Fill(params.fPt);
1174 }
1175 else if ((TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 11)
1176 || (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 211)) {
1177 PionElectron_two_Target->Fill(params.fPt);
1178 }
1179 else {
1180 elsePionOrElectron_two_Target->Fill(params.fPt);
1181 }
1182
1183 // check special cases of BG, when two particles are electrons, but wrongly combined (with some correlation)
1184 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1185 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1186 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1187 int mama1PDG = mama1->GetPdgCode();
1188 int mama2PDG = mama2->GetPdgCode();
1189 if (
1190 (mama1PDG == 22 && mama2PDG == 111 && mama1->GetMotherId() == part2MC->GetMotherId())
1191 || (mama1PDG == 111 && mama2PDG == 22
1192 && mama2->GetMotherId()
1193 == part1MC
1194 ->GetMotherId())) { // pi -> e+e-g ===> combined wrongly (e+- from dalitz and e-+ from conversion)
1196 }
1197 if (
1198 mama1PDG == 22 && mama2PDG == 22 && mama1->GetMotherId() == mama2->GetMotherId()
1199 && part1MC->GetMotherId()
1200 != part2MC
1201 ->GetMotherId()) { // pi -> gg ===> combined wrongly (e+- from first and e-+ from second conversion)
1202 DoubleConversion_Pt_two_Target->Fill(params.fPt);
1203 }
1204 }
1205
1208 fromCombinatorial_PDG_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1209 fromCombinatorial_PDG_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1210 if (TMath::Abs(part1MC->GetPdgCode() == 11)) { fromCombinatorial_electron_P_two_Target->Fill(part1.Mag()); }
1211 else {
1213 }
1214 if (TMath::Abs(part2MC->GetPdgCode() == 11)) { fromCombinatorial_electron_P_two_Target->Fill(part2.Mag()); }
1215 else {
1217 }
1218 }
1219 if (fromConversion == 1) {
1222 }
1223 if (twoFromTarget == 1) {
1226 twoFromTarget_PDG_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1227 twoFromTarget_PDG_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1228 twoFromTarget_P_two_Target->Fill(TMath::Abs(part1.Mag()));
1229 twoFromTarget_P_two_Target->Fill(TMath::Abs(part2.Mag()));
1230 }
1231 }
1232
1233 // cases, when RICH == 1 or RICH == 2 together
1234 if (richcheck == 1 || richcheck == 2) {
1238 DP_InvMassReco_onetwo_Target->Fill(InvmassReco);
1239 DP_OpeningAngleReco_onetwo_Target->Fill(OpeningAngle);
1240 DP_Pdg_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1241 DP_Pdg_onetwo_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
1243 DP_Pt_reco_onetwo_Target->Fill(params.fPt);
1244 DP_InvMassReco_onetwo_Both->Fill(InvmassReco);
1245 DP_OpeningAngleReco_onetwo_Both->Fill(OpeningAngle);
1246 DP_Pdg_onetwo_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1247 DP_Pdg_onetwo_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1248 DP_P_reco_onetwo_Both->Fill(params.fMomentumMag);
1249 DP_Pt_reco_onetwo_Both->Fill(params.fPt);
1250 if (fromFireball == 1) {
1253 Ph_pt_vs_rap_est_onetwo_Both->Fill(params.fRapidity, params.fPt);
1254 fromFireball_P_onetwo_Target->Fill(part1.Mag());
1255 fromFireball_P_onetwo_Target->Fill(part2.Mag());
1256 }
1257 if (fromPions == 1) {
1260 }
1261 if (fromEta == 1) {
1264 }
1265 if (fromDalitz == 1) {
1268 }
1269 if (fromXi == 1) { Ph_fromXi_Pt_reco_onetwo_Target->Fill(params.fPt); }
1270 if (fromOther == 1) { Ph_fromOther_Pt_reco_onetwo_Target->Fill(params.fPt); }
1271 if (fromCombinatorial == 1) {
1272
1273 // particle 1
1274 if (part1MC->GetMotherId() != -1) {
1275 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1276 CombinatorialMotherPdg_onetwo_Target->Fill(TMath::Abs(mama1->GetPdgCode()));
1277 if (mama1->GetMotherId() != -1) {
1278 CbmMCTrack* grmama1 = (CbmMCTrack*) fMcTracks->At(mama1->GetMotherId());
1279 CombinatorialGrMotherPdg_onetwo_Target->Fill(TMath::Abs(grmama1->GetPdgCode()));
1280 }
1281 else {
1283 }
1284 }
1285 else {
1287 }
1288
1289 // particle 2
1290 if (part2MC->GetMotherId() != -1) {
1291 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1292 CombinatorialMotherPdg_onetwo_Target->Fill(TMath::Abs(mama2->GetPdgCode()));
1293 if (mama2->GetMotherId() != -1) {
1294 CbmMCTrack* grmama2 = (CbmMCTrack*) fMcTracks->At(mama2->GetMotherId());
1295 CombinatorialGrMotherPdg_onetwo_Target->Fill(TMath::Abs(grmama2->GetPdgCode()));
1296 }
1297 else {
1299 }
1300 }
1301 else {
1303 }
1304
1305 // Check sources of BG
1306 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1307 Electrons_onetwo_Target->Fill(params.fPt);
1308 }
1309 else if (TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 211) {
1310 Pions_onetwo_Target->Fill(params.fPt);
1311 }
1312 else if ((TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 11)
1313 || (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 211)) {
1314 PionElectron_onetwo_Target->Fill(params.fPt);
1315 }
1316 else {
1318 }
1319
1320 // check special cases of BG, when two particles are electrons, but wrongly combined (with some correlation)
1321 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1322 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1323 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1324 int mama1PDG = mama1->GetPdgCode();
1325 int mama2PDG = mama2->GetPdgCode();
1326 if (
1327 (mama1PDG == 22 && mama2PDG == 111 && mama1->GetMotherId() == part2MC->GetMotherId())
1328 || (mama1PDG == 111 && mama2PDG == 22
1329 && mama2->GetMotherId()
1330 == part1MC
1331 ->GetMotherId())) { // pi -> e+e-g ===> combined wrongly (e+- from dalitz and e-+ from conversion)
1333 }
1334 if (
1335 mama1PDG == 22 && mama2PDG == 22 && mama1->GetMotherId() == mama2->GetMotherId()
1336 && part1MC->GetMotherId()
1337 != part2MC
1338 ->GetMotherId()) { // pi -> gg ===> combined wrongly (e+- from first and e-+ from second conversion)
1340 }
1341 }
1342
1345 fromCombinatorial_PDG_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1346 fromCombinatorial_PDG_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1347 if (TMath::Abs(part1MC->GetPdgCode() == 11)) {
1349 }
1350 else {
1352 }
1353 if (TMath::Abs(part2MC->GetPdgCode() == 11)) {
1355 }
1356 else {
1358 }
1359 }
1360 if (fromConversion == 1) {
1363 }
1364 if (twoFromTarget == 1) {
1367 twoFromTarget_PDG_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1368 twoFromTarget_PDG_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
1369 twoFromTarget_P_onetwo_Target->Fill(TMath::Abs(part1.Mag()));
1370 twoFromTarget_P_onetwo_Target->Fill(TMath::Abs(part2.Mag()));
1371 }
1372 }
1373 }
1374 }
1375}
1376
1377
1379 int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector<CbmMCTrack*> MCtracks_minus_Outside,
1380 vector<CbmMCTrack*> MCtracks_plus_Outside, vector<CbmStsTrack*> StsTrack_minus_Outside,
1381 vector<CbmStsTrack*> StsTrack_plus_Outside, std::vector<int> Rings_minus_Outside, std::vector<int> Rings_plus_Outside,
1382 std::vector<int> stsIndex_minus_Outside, std::vector<int> stsIndex_plus_Outside,
1383 vector<CbmRichRing*> richRing_minus_Outside, vector<CbmRichRing*> richRing_plus_Outside)
1384{
1385 for (size_t i = 0; i < StsTrack_minus_Outside.size(); i++) {
1386 for (size_t j = 0; j < StsTrack_plus_Outside.size(); j++) {
1387
1388 CbmStsTrack* part1STS = StsTrack_minus_Outside[i];
1389 CbmStsTrack* part2STS = StsTrack_plus_Outside[j];
1390 CbmMCTrack* part1MC = MCtracks_minus_Outside[i];
1391 CbmMCTrack* part2MC = MCtracks_plus_Outside[j];
1392 int sts1_index = stsIndex_minus_Outside[i];
1393 // int sts2_index = stsIndex_plus_Outside[j];
1394
1395 KFParticle electron;
1397 KFParticle positron;
1398 CbmKFParticleInterface::SetKFParticleFromStsTrack(part2STS, &positron, -11);
1399 const KFParticle* daughters[2] = {&electron, &positron};
1400 KFParticle intersection;
1401 intersection.Construct(daughters, 2);
1402
1403 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
1404
1405 // fit to the vertex fitter
1406 TVector3 part1 =
1407 CbmKresFunctions::FitToVertex(part1STS, intersection.GetX(), intersection.GetY(), intersection.GetZ());
1408 TVector3 part2 =
1409 CbmKresFunctions::FitToVertex(part2STS, intersection.GetX(), intersection.GetY(), intersection.GetZ());
1410
1411 // TVector3 part1(electron.KFParticleBase::Px(), electron.KFParticleBase::Py(), electron.KFParticleBase::Pz());
1412 // TVector3 part2(positron.KFParticleBase::Px(), positron.KFParticleBase::Py(), positron.KFParticleBase::Pz());
1413
1414 int richcheck = 0;
1415 int richcheck_0 = 0;
1416 int richcheck_1 = 0;
1417 if (RealPID == 1) {
1418 // Real PID
1419 richcheck_0 = CheckIfElectron(richRing_minus_Outside[i], part1.Mag());
1420 richcheck_1 = CheckIfElectron(richRing_plus_Outside[j], part2.Mag());
1421 richcheck = richcheck_0 + richcheck_1;
1422 }
1423 else {
1424 // MC PID
1425 richcheck = Rings_minus_Outside[i] + Rings_plus_Outside[j];
1426 }
1427
1428
1429 Double_t InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(part1, part2);
1430 Double_t OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(part1, part2);
1432
1433 DP_candidates_InvMass_vs_OA_Outside->Fill(InvmassReco, OpeningAngle);
1434 DP_candidates_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
1435 DP_candidates_InvMass_Outside->Fill(InvmassReco);
1436 DP_candidates_InvMass_Both->Fill(InvmassReco);
1437 DP_candidates_OA_Outside->Fill(OpeningAngle);
1438 DP_candidates_OA_Both->Fill(OpeningAngle);
1439
1440 double PlaneAngle_last = CalculatePlaneAngle_last(part1STS, part2STS);
1441 double PlaneAngle_first = CalculatePlaneAngle_first(part1STS, part2STS);
1442
1443 int IdForANN = 0; // 0 - means wrong pair combination; 1 - means correct pair
1444 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
1445 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1446 if (mcTrackmama->GetMotherId() == -1 && mcTrackmama->GetPdgCode() == 22) {
1447 IdForANN = 1;
1448 DP_InvMass_Outside->Fill(InvmassReco);
1449 DP_InvMass_Both->Fill(InvmassReco);
1450 DP_OA_Outside->Fill(OpeningAngle);
1451 DP_OA_Both->Fill(OpeningAngle);
1452 DP_InvMass_vs_OA_Outside->Fill(InvmassReco, OpeningAngle);
1453 DP_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
1454 DP_PlaneAngles_last_Outside->Fill(PlaneAngle_last);
1455 DP_PlaneAngles_last_Both->Fill(PlaneAngle_last);
1456 DP_PlaneAngles_first_Outside->Fill(PlaneAngle_first);
1457 DP_PlaneAngles_first_Both->Fill(PlaneAngle_first);
1458 }
1459 }
1460
1461 // run ANN
1462 if (AnnTrainPhotons == 1) {
1463 fTrainPhotons->Exec(EventNumMan, IdForANN, InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(),
1464 part1, part2);
1465 continue;
1466 }
1467
1468 double AnnValue = 999;
1469 if (UseAnnPhotons == 1) {
1470 AnnValue =
1471 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(), part1, part2);
1472 if (IdForANN == 1) DP_AnnTruePairs->Fill(AnnValue);
1473 if (IdForANN == 0) DP_AnnFalsePairs->Fill(AnnValue);
1474 }
1475
1476 DP_candidates_PlaneAngles_last_Outside->Fill(PlaneAngle_last);
1477 DP_candidates_PlaneAngles_last_Both->Fill(PlaneAngle_last);
1478 DP_candidates_PlaneAngles_first_Outside->Fill(PlaneAngle_first);
1479 DP_candidates_PlaneAngles_first_Both->Fill(PlaneAngle_first);
1480
1481 // cuts
1482 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
1483 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
1484 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
1485
1486
1487 int fromPions = 0;
1488 int fromEta = 0;
1489 int fromFireball = 0;
1490 int fromDalitz = 0;
1491 int fromXi = 0;
1492 int fromOther = 0;
1493 int fromCombinatorial = 0;
1494 int fromConversion = 0;
1495 int twoFromTarget = 0;
1496 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
1497 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1498 if (mcTrackmama->GetPdgCode() == 22) {
1499 if (mcTrackmama->GetMotherId() == -1) { fromFireball = 1; }
1500 else {
1501 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
1502 if (mcTrackGrmama->GetPdgCode() == 111) fromPions = 1;
1503 if (mcTrackGrmama->GetPdgCode() == 221) fromEta = 1;
1504 if (mcTrackGrmama->GetPdgCode() == 3212) fromXi = 1;
1505 fromConversion = 1;
1506 }
1507 }
1508 else {
1509 if (mcTrackmama->GetPdgCode() == 111) fromDalitz = 1;
1510 if (mcTrackmama->GetPdgCode() != 111) fromOther = 1;
1511 }
1512 }
1513 else if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() == -1) {
1514 twoFromTarget = 1;
1515 }
1516 else {
1517 fromCombinatorial = 1;
1518 }
1519
1520
1521 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
1522 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1523 if (mcTrackmama->GetPdgCode() == 22) {
1524 if (mcTrackmama->GetMotherId() == -1) { GrandMother_PDG_Outside->Fill(mcTrackmama->GetMotherId()); }
1525 else {
1526 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
1527 GrandMother_PDG_Outside->Fill(TMath::Abs(mcTrackGrmama->GetPdgCode()));
1528 }
1529 }
1530 else {
1531 Mother_PDG_Outside->Fill(TMath::Abs(mcTrackmama->GetPdgCode()));
1532 }
1533 }
1534
1535 if (IdForANN == 1) DP_AnnTruePairs_AfterCuts->Fill(AnnValue);
1536 if (IdForANN == 0) DP_AnnFalsePairs_AfterCuts->Fill(AnnValue);
1537
1538 frefmomenta.clear();
1539 frefmomenta.push_back(part1);
1540 frefmomenta.push_back(part2);
1541
1542 frefId.clear();
1543 frefId.push_back(stsIndex_minus_Outside[i]);
1544 frefId.push_back(stsIndex_plus_Outside[j]);
1545 fMCtracks.clear();
1546 fMCtracks.push_back(part1MC);
1547 fMCtracks.push_back(part2MC);
1548
1549
1550 // for event mixing DP
1551 std::vector<TVector3> minusTrack = SaveAllHits(part1STS);
1552 std::vector<TVector3> plusTrack = SaveAllHits(part2STS);
1553
1554
1555 DP_EMT_Event_minus_Outside.push_back(EventNumMan);
1556 DP_EMT_STS_minus_Outside.push_back(part1STS);
1557 DP_EMT_KFTrack_minus_Outside.push_back(electron);
1558 DP_EMT_NofRings_minus_Outside.push_back(richcheck_0);
1559 DP_EMT_Hits_minus_Outside.push_back(minusTrack);
1560
1561 DP_EMT_Event_plus_Outside.push_back(EventNumMan);
1562 DP_EMT_STS_plus_Outside.push_back(part2STS);
1563 DP_EMT_KFTrack_plus_Outside.push_back(positron);
1564 DP_EMT_NofRings_plus_Outside.push_back(richcheck_1);
1565 DP_EMT_Hits_plus_Outside.push_back(plusTrack);
1566
1567 // DP_LK_EMT
1568 DP_LK_EMT_NofRings_minus_Outside.push_back(richcheck_0);
1569 DP_LK_EMT_STS_minus_Outside.push_back(part1STS);
1570 DP_LK_EMT_STS_minus_index_Outside.push_back(sts1_index);
1571
1572 DP_LK_EMT_NofRings_plus_Outside.push_back(richcheck_1);
1573 DP_LK_EMT_STS_plus_Outside.push_back(part2STS);
1574 DP_LK_EMT_STS_plus_index_Outside.push_back(sts1_index);
1575
1576
1577 // everything (RICH == 0, RICH == 1, RICH == 2) together
1578 if (richcheck == 0 || richcheck == 1 || richcheck == 2) {
1582 DP_InvMassReco_all_Outside->Fill(InvmassReco);
1583 DP_OpeningAngleReco_all_Outside->Fill(OpeningAngle);
1584 DP_Pdg_all_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1585 DP_Pdg_all_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1586 DP_P_reco_all_Outside->Fill(params.fMomentumMag);
1587 DP_Pt_reco_all_Outside->Fill(params.fPt);
1588 DP_InvMassReco_all_Both->Fill(InvmassReco);
1589 DP_OpeningAngleReco_all_Both->Fill(OpeningAngle);
1590 DP_Pdg_all_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1591 DP_Pdg_all_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1592 DP_P_reco_all_Both->Fill(params.fMomentumMag);
1593 DP_Pt_reco_all_Both->Fill(params.fPt);
1594 if (fromFireball == 1) {
1596 Ph_fromTarget_Pt_reco_all_Both->Fill(params.fPt);
1597 Ph_pt_vs_rap_est_all_Both->Fill(params.fRapidity, params.fPt);
1598 }
1599 if (fromPions == 1) {
1601 Ph_fromPions_Pt_reco_all_Both->Fill(params.fPt);
1602 }
1603 if (fromEta == 1) {
1605 Ph_fromEtas_Pt_reco_all_Both->Fill(params.fPt);
1606 }
1607 if (fromDalitz == 1) {
1609 Ph_fromDalitz_Pt_reco_all_Both->Fill(params.fPt);
1610 }
1611 }
1612
1613 // only cases, when RICH == 0
1614 if (richcheck == 0) {
1618 DP_InvMassReco_zero_Outside->Fill(InvmassReco);
1619 DP_OpeningAngleReco_zero_Outside->Fill(OpeningAngle);
1620 DP_Pdg_zero_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1621 DP_Pdg_zero_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1623 DP_Pt_reco_zero_Outside->Fill(params.fPt);
1624 DP_InvMassReco_zero_Both->Fill(InvmassReco);
1625 DP_OpeningAngleReco_zero_Both->Fill(OpeningAngle);
1626 DP_Pdg_zero_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1627 DP_Pdg_zero_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1628 DP_P_reco_zero_Both->Fill(params.fMomentumMag);
1629 DP_Pt_reco_zero_Both->Fill(params.fPt);
1630 if (fromFireball == 1) {
1633 Ph_pt_vs_rap_est_zero_Both->Fill(params.fRapidity, params.fPt);
1634 }
1635 if (fromPions == 1) {
1637 Ph_fromPions_Pt_reco_zero_Both->Fill(params.fPt);
1638 }
1639 if (fromEta == 1) {
1641 Ph_fromEtas_Pt_reco_zero_Both->Fill(params.fPt);
1642 }
1643 if (fromDalitz == 1) {
1646 }
1647 }
1648
1649 // only cases, when RICH == 1
1650 if (richcheck == 1) {
1654 DP_InvMassReco_one_Outside->Fill(InvmassReco);
1655 DP_OpeningAngleReco_one_Outside->Fill(OpeningAngle);
1656 DP_Pdg_one_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1657 DP_Pdg_one_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1658 DP_P_reco_one_Outside->Fill(params.fMomentumMag);
1659 DP_Pt_reco_one_Outside->Fill(params.fPt);
1660 DP_InvMassReco_one_Both->Fill(InvmassReco);
1661 DP_OpeningAngleReco_one_Both->Fill(OpeningAngle);
1662 DP_Pdg_one_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1663 DP_Pdg_one_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1664 DP_P_reco_one_Both->Fill(params.fMomentumMag);
1665 DP_Pt_reco_one_Both->Fill(params.fPt);
1666 if (fromFireball == 1) {
1668 Ph_fromTarget_Pt_reco_one_Both->Fill(params.fPt);
1669 Ph_pt_vs_rap_est_one_Both->Fill(params.fRapidity, params.fPt);
1670 }
1671 if (fromPions == 1) {
1673 Ph_fromPions_Pt_reco_one_Both->Fill(params.fPt);
1674 }
1675 if (fromEta == 1) {
1677 Ph_fromEtas_Pt_reco_one_Both->Fill(params.fPt);
1678 }
1679 if (fromDalitz == 1) {
1681 Ph_fromDalitz_Pt_reco_one_Both->Fill(params.fPt);
1682 }
1683 }
1684
1685 // only cases, when RICH == 2
1686 if (richcheck == 2) {
1690 DP_InvMassReco_two_Outside->Fill(InvmassReco);
1691 DP_OpeningAngleReco_two_Outside->Fill(OpeningAngle);
1692 DP_Pdg_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1693 DP_Pdg_two_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1694 DP_P_reco_two_Outside->Fill(params.fMomentumMag);
1695 DP_Pt_reco_two_Outside->Fill(params.fPt);
1696 DP_InvMassReco_two_Both->Fill(InvmassReco);
1697 DP_OpeningAngleReco_two_Both->Fill(OpeningAngle);
1698 DP_Pdg_two_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1699 DP_Pdg_two_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1700 DP_P_reco_two_Both->Fill(params.fMomentumMag);
1701 DP_Pt_reco_two_Both->Fill(params.fPt);
1702 if (fromFireball == 1) {
1704 Ph_fromTarget_Pt_reco_two_Both->Fill(params.fPt);
1705 Ph_pt_vs_rap_est_two_Both->Fill(params.fRapidity, params.fPt);
1706 fromFireball_P_two_Outside->Fill(part1.Mag());
1707 fromFireball_P_two_Outside->Fill(part2.Mag());
1708 }
1709 if (fromPions == 1) {
1711 Ph_fromPions_Pt_reco_two_Both->Fill(params.fPt);
1712 }
1713 if (fromEta == 1) {
1715 Ph_fromEtas_Pt_reco_two_Both->Fill(params.fPt);
1716 }
1717 if (fromDalitz == 1) {
1719 Ph_fromDalitz_Pt_reco_two_Both->Fill(params.fPt);
1720 }
1721 if (fromXi == 1) { Ph_fromXi_Pt_reco_two_Outside->Fill(params.fPt); }
1722 if (fromOther == 1) { Ph_fromOther_Pt_reco_two_Outside->Fill(params.fPt); }
1723 if (fromCombinatorial == 1) {
1724
1725 // particle 1
1726 if (part1MC->GetMotherId() != -1) {
1727 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1728 CombinatorialMotherPdg_two_Outside->Fill(TMath::Abs(mama1->GetPdgCode()));
1729 if (mama1->GetMotherId() != -1) {
1730 CbmMCTrack* grmama1 = (CbmMCTrack*) fMcTracks->At(mama1->GetMotherId());
1731 CombinatorialGrMotherPdg_two_Outside->Fill(TMath::Abs(grmama1->GetPdgCode()));
1732 }
1733 else {
1735 }
1736 }
1737 else {
1739 }
1740
1741 // particle 2
1742 if (part2MC->GetMotherId() != -1) {
1743 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1744 CombinatorialMotherPdg_two_Outside->Fill(TMath::Abs(mama2->GetPdgCode()));
1745 if (mama2->GetMotherId() != -1) {
1746 CbmMCTrack* grmama2 = (CbmMCTrack*) fMcTracks->At(mama2->GetMotherId());
1747 CombinatorialGrMotherPdg_two_Outside->Fill(TMath::Abs(grmama2->GetPdgCode()));
1748 }
1749 else {
1751 }
1752 }
1753 else {
1755 }
1756
1757 // Check sources of BG
1758 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1759 Electrons_two_Outside->Fill(params.fPt);
1760 }
1761 else if (TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 211) {
1762 Pions_two_Outside->Fill(params.fPt);
1763 }
1764 else if ((TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 11)
1765 || (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 211)) {
1766 PionElectron_two_Outside->Fill(params.fPt);
1767 }
1768 else {
1769 elsePionOrElectron_two_Outside->Fill(params.fPt);
1770 }
1771
1772 // check special cases of BG, when two particles are electrons, but wrongly combined (with some correlation)
1773 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1774 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1775 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1776 int mama1PDG = mama1->GetPdgCode();
1777 int mama2PDG = mama2->GetPdgCode();
1778 if (
1779 (mama1PDG == 22 && mama2PDG == 111 && mama1->GetMotherId() == part2MC->GetMotherId())
1780 || (mama1PDG == 111 && mama2PDG == 22
1781 && mama2->GetMotherId()
1782 == part1MC
1783 ->GetMotherId())) { // pi -> e+e-g ===> combined wrongly (e+- from dalitz and e-+ from conversion)
1785 }
1786 if (
1787 mama1PDG == 22 && mama2PDG == 22 && mama1->GetMotherId() == mama2->GetMotherId()
1788 && part1MC->GetMotherId()
1789 != part2MC
1790 ->GetMotherId()) { // pi -> gg ===> combined wrongly (e+- from first and e-+ from second conversion)
1792 }
1793 }
1794
1797 fromCombinatorial_PDG_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1798 fromCombinatorial_PDG_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1799 if (TMath::Abs(part1MC->GetPdgCode() == 11)) { fromCombinatorial_electron_P_two_Outside->Fill(part1.Mag()); }
1800 else {
1802 }
1803 if (TMath::Abs(part2MC->GetPdgCode() == 11)) { fromCombinatorial_electron_P_two_Outside->Fill(part2.Mag()); }
1804 else {
1806 }
1807 }
1808 if (fromConversion == 1) {
1811 }
1812 if (twoFromTarget == 1) {
1815 twoFromTarget_PDG_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1816 twoFromTarget_PDG_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1817 twoFromTarget_P_two_Outside->Fill(TMath::Abs(part1.Mag()));
1818 twoFromTarget_P_two_Outside->Fill(TMath::Abs(part2.Mag()));
1819 }
1820 }
1821
1822 // cases, when RICH == 1 or RICH == 2 together
1823 if (richcheck == 1 || richcheck == 2) {
1827 DP_InvMassReco_onetwo_Outside->Fill(InvmassReco);
1828 DP_OpeningAngleReco_onetwo_Outside->Fill(OpeningAngle);
1829 DP_Pdg_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1830 DP_Pdg_onetwo_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1832 DP_Pt_reco_onetwo_Outside->Fill(params.fPt);
1833 DP_InvMassReco_onetwo_Both->Fill(InvmassReco);
1834 DP_OpeningAngleReco_onetwo_Both->Fill(OpeningAngle);
1835 DP_Pdg_onetwo_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1836 DP_Pdg_onetwo_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1837 DP_P_reco_onetwo_Both->Fill(params.fMomentumMag);
1838 DP_Pt_reco_onetwo_Both->Fill(params.fPt);
1839 if (fromFireball == 1) {
1842 Ph_pt_vs_rap_est_onetwo_Both->Fill(params.fRapidity, params.fPt);
1843 fromFireball_P_onetwo_Outside->Fill(part1.Mag());
1844 fromFireball_P_onetwo_Outside->Fill(part2.Mag());
1845 }
1846 if (fromPions == 1) {
1849 }
1850 if (fromEta == 1) {
1853 }
1854 if (fromDalitz == 1) {
1857 }
1858 if (fromXi == 1) { Ph_fromXi_Pt_reco_onetwo_Outside->Fill(params.fPt); }
1859 if (fromOther == 1) { Ph_fromOther_Pt_reco_onetwo_Outside->Fill(params.fPt); }
1860 if (fromCombinatorial == 1) {
1861
1862 // particle 1
1863 if (part1MC->GetMotherId() != -1) {
1864 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1865 CombinatorialMotherPdg_onetwo_Outside->Fill(TMath::Abs(mama1->GetPdgCode()));
1866 if (mama1->GetMotherId() != -1) {
1867 CbmMCTrack* grmama1 = (CbmMCTrack*) fMcTracks->At(mama1->GetMotherId());
1868 CombinatorialGrMotherPdg_onetwo_Outside->Fill(TMath::Abs(grmama1->GetPdgCode()));
1869 }
1870 else {
1872 }
1873 }
1874 else {
1876 }
1877
1878 // particle 2
1879 if (part2MC->GetMotherId() != -1) {
1880 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1881 CombinatorialMotherPdg_onetwo_Outside->Fill(TMath::Abs(mama2->GetPdgCode()));
1882 if (mama2->GetMotherId() != -1) {
1883 CbmMCTrack* grmama2 = (CbmMCTrack*) fMcTracks->At(mama2->GetMotherId());
1884 CombinatorialGrMotherPdg_onetwo_Outside->Fill(TMath::Abs(grmama2->GetPdgCode()));
1885 }
1886 else {
1888 }
1889 }
1890 else {
1892 }
1893
1894 // Check sources of BG
1895 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1896 Electrons_onetwo_Outside->Fill(params.fPt);
1897 }
1898 else if (TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 211) {
1899 Pions_onetwo_Outside->Fill(params.fPt);
1900 }
1901 else if ((TMath::Abs(part1MC->GetPdgCode()) == 211 && TMath::Abs(part2MC->GetPdgCode()) == 11)
1902 || (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 211)) {
1903 PionElectron_onetwo_Outside->Fill(params.fPt);
1904 }
1905 else {
1907 }
1908
1909 // check special cases of BG, when two particles are electrons, but wrongly combined (with some correlation)
1910 if (TMath::Abs(part1MC->GetPdgCode()) == 11 && TMath::Abs(part2MC->GetPdgCode()) == 11) {
1911 CbmMCTrack* mama1 = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1912 CbmMCTrack* mama2 = (CbmMCTrack*) fMcTracks->At(part2MC->GetMotherId());
1913 int mama1PDG = mama1->GetPdgCode();
1914 int mama2PDG = mama2->GetPdgCode();
1915 if (
1916 (mama1PDG == 22 && mama2PDG == 111 && mama1->GetMotherId() == part2MC->GetMotherId())
1917 || (mama1PDG == 111 && mama2PDG == 22
1918 && mama2->GetMotherId()
1919 == part1MC
1920 ->GetMotherId())) { // pi -> e+e-g ===> combined wrongly (e+- from dalitz and e-+ from conversion)
1922 }
1923 if (
1924 mama1PDG == 22 && mama2PDG == 22 && mama1->GetMotherId() == mama2->GetMotherId()
1925 && part1MC->GetMotherId()
1926 != part2MC
1927 ->GetMotherId()) { // pi -> gg ===> combined wrongly (e+- from first and e-+ from second conversion)
1929 }
1930 }
1931
1934 fromCombinatorial_PDG_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1935 fromCombinatorial_PDG_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1936 if (TMath::Abs(part1MC->GetPdgCode() == 11)) {
1938 }
1939 else {
1941 }
1942 if (TMath::Abs(part2MC->GetPdgCode() == 11)) {
1944 }
1945 else {
1947 }
1948 }
1949 if (fromConversion == 1) {
1952 }
1953 if (twoFromTarget == 1) {
1956 twoFromTarget_PDG_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1957 twoFromTarget_PDG_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1958 twoFromTarget_P_onetwo_Outside->Fill(TMath::Abs(part1.Mag()));
1959 twoFromTarget_P_onetwo_Outside->Fill(TMath::Abs(part2.Mag()));
1960 }
1961 }
1962 }
1963 }
1964}
1965
1967{
1978
1999
2012}
2013
2014
2015int CbmKresConversionPhotons::FindInRich(int richInd, int stsMcTrackId)
2016{
2017 int RingsInRich = 0;
2018 if (richInd > -1) {
2019 CbmTrackMatchNew* richMatch = (CbmTrackMatchNew*) fRichRingMatches->At(richInd);
2020 if (richMatch != nullptr && richMatch->GetNofLinks() > 0) {
2021 int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
2022 if (richMcTrackId > 0) {
2023 if (stsMcTrackId == richMcTrackId) { // check that global track was matched correctly for STS and RICH together
2024 CbmMCTrack* mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
2025 if (mcTrack2 != nullptr) {
2026 int pdgRICH = mcTrack2->GetPdgCode();
2027 if (TMath::Abs(pdgRICH) == 11) RingsInRich++;
2028 }
2029 }
2030 }
2031 }
2032 }
2033 return RingsInRich;
2034}
2035
2036
2038{
2039 int identified = 0;
2040
2041 if (nullptr != ring) {
2042 CbmRichRingLight ringHit;
2043 int nofHits = ring->GetNofHits();
2044 for (int i = 0; i < nofHits; i++) {
2045 int hitInd = ring->GetHit(i);
2046 CbmRichHit* hit = (CbmRichHit*) fRichHits->At(hitInd);
2047 if (nullptr == hit) continue;
2048 CbmRichHitLight hl(hit->GetX(), hit->GetY());
2049 ringHit.AddHit(hl);
2050 }
2051 fTauFit->DoFit(&ringHit);
2052 if (ringHit.GetAaxis() > 4 && ringHit.GetAaxis() < 6 && ringHit.GetBaxis() > 4 && ringHit.GetBaxis() < 6
2053 && momentum > 0.2 && momentum < 4.)
2054 identified++;
2055 //if (ring->GetDistance() < 2 && ringHit.GetAaxis() > 4 && ringHit.GetAaxis() < 6 && ringHit.GetBaxis() > 4 && ringHit.GetBaxis() < 6 && momentum > 0.2 && momentum < 4.) identified ++;
2056 }
2057
2058 return identified;
2059}
2060
2062{
2063 std::vector<TVector3> AllHitsOfTrack;
2064 AllHitsOfTrack.clear();
2065
2066 Int_t hitsMVD = track->GetNofMvdHits();
2067 Int_t hitsSTS = track->GetNofStsHits();
2068
2069 for (int i = 0; i < hitsMVD; i++) {
2070 Int_t mvdHitIndex = track->GetMvdHitIndex(i);
2071 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
2072 TVector3 position;
2073 mvdHit->Position(position);
2074 AllHitsOfTrack.push_back(position);
2075 }
2076 for (int i = 0; i < hitsSTS; i++) {
2077 Int_t stsHitIndex = track->GetStsHitIndex(i);
2078 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
2079 TVector3 position;
2080 stsHit->Position(position);
2081 AllHitsOfTrack.push_back(position);
2082 }
2083
2084 return AllHitsOfTrack;
2085}
2086
2088 std::vector<TVector3> track_2)
2089{
2090 double FinalAngle = 400;
2091
2092 int hits_1 = track_1.size();
2093 int hits_2 = track_2.size();
2094
2095 double Xpart1 = 0;
2096 double Ypart1 = 0;
2097 double Zpart1 = 0;
2098 double Xpart2 = 0;
2099 double Ypart2 = 0;
2100 double Zpart2 = 0;
2101
2102 TVector3 last1 = track_1[hits_1 - 1];
2103 TVector3 last2 = track_2[hits_2 - 1];
2104
2105 // // check difference in 2 cm, because of two slices of every STS and Mvd stations
2106 if (TMath::Abs(last1.Z() - last2.Z()) > 2
2107 && last1.Z() > last2.Z()) { // if last hits are in different stations --> try to find the latest common station
2108 for (int i = hits_1 - 2; i > -1; i--) { // start from second last station
2109 if (TMath::Abs(last1.Z() - last2.Z()) < 2) continue;
2110 last1 = track_1[i];
2111 Xpart1 = last1.X();
2112 Ypart1 = last1.Y();
2113 Zpart1 = last1.Z();
2114 }
2115 }
2116
2117 if (TMath::Abs(last1.Z() - last2.Z()) > 2
2118 && last1.Z() < last2.Z()) { // if last hits are in different stations --> try to find the latest common station
2119 for (int i = hits_2 - 2; i > -1; i--) { // start from second last station
2120 if (TMath::Abs(last1.Z() - last2.Z()) < 2) continue;
2121 last2 = track_2[i];
2122 Xpart2 = last2.X();
2123 Ypart2 = last2.Y();
2124 Zpart2 = last2.Z();
2125 }
2126 }
2127
2128 // calculate angle if we have found common station
2129 if (TMath::Abs(Zpart1 - Zpart2) < 2 && Zpart1 != 0 && Zpart2 != 0) {
2130 FinalAngle = TMath::ATan2(Ypart1 - Ypart2, Xpart1 - Xpart2) * (180 / TMath::Pi());
2131 }
2132
2133 return TMath::Abs(TMath::Abs(FinalAngle) - 180);
2134}
2135
2136
2138{
2139 double FinalAngle = 400;
2140 Int_t hits1sts = Sts_1->GetNofStsHits();
2141 Int_t hits2sts = Sts_2->GetNofStsHits();
2142 Int_t hits1mvd = Sts_1->GetNofMvdHits();
2143 Int_t hits2mvd = Sts_2->GetNofMvdHits();
2144
2145 double Xpart1 = 0;
2146 double Ypart1 = 0;
2147 double Zpart1 = 0;
2148 double Xpart2 = 0;
2149 double Ypart2 = 0;
2150 double Zpart2 = 0;
2151 if (hits1sts > 0) {
2152 Int_t stsHitIndex1 = Sts_1->GetStsHitIndex(hits1sts - 1);
2153 CbmStsHit* stsHit1 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex1);
2154 Xpart1 = stsHit1->GetX();
2155 Ypart1 = stsHit1->GetY();
2156 Zpart1 = stsHit1->GetZ();
2157 }
2158 else {
2159 Int_t mvdHitIndex1 = Sts_1->GetMvdHitIndex(hits1mvd - 1);
2160 CbmMvdHit* mvdHit1 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex1);
2161 Xpart1 = mvdHit1->GetX();
2162 Ypart1 = mvdHit1->GetY();
2163 Zpart1 = mvdHit1->GetZ();
2164 }
2165
2166 if (hits2sts > 0) {
2167 Int_t stsHitIndex2 = Sts_2->GetStsHitIndex(hits2sts - 1);
2168 CbmStsHit* stsHit2 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex2);
2169 Xpart2 = stsHit2->GetX();
2170 Ypart2 = stsHit2->GetY();
2171 Zpart2 = stsHit2->GetZ();
2172 }
2173 else {
2174 Int_t mvdHitIndex2 = Sts_2->GetMvdHitIndex(hits2mvd - 1);
2175 CbmMvdHit* mvdHit2 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex2);
2176 Xpart2 = mvdHit2->GetX();
2177 Ypart2 = mvdHit2->GetY();
2178 Zpart2 = mvdHit2->GetZ();
2179 }
2180
2181 // check difference in 2 cm, because of two slices of every STS and Mvd stations
2182 if (TMath::Abs(Zpart1 - Zpart2) > 2
2183 && Zpart1 > Zpart2) { // if last hits are in different stations --> try to find the latest common station
2184 for (int i = hits1sts - 2; i > -1; i--) { // start from second last station
2185 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2186 Int_t stsHitIndex = Sts_1->GetStsHitIndex(i);
2187 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
2188 Xpart1 = stsHit->GetX();
2189 Ypart1 = stsHit->GetY();
2190 Zpart1 = stsHit->GetZ();
2191 }
2192 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 > Zpart2) {
2193 for (int i = hits1mvd - 2; i > -1; i--) {
2194 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2195 Int_t mvdHitIndex = Sts_1->GetMvdHitIndex(i);
2196 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
2197 Xpart1 = mvdHit->GetX();
2198 Ypart1 = mvdHit->GetY();
2199 Zpart1 = mvdHit->GetZ();
2200 }
2201 }
2202 }
2203
2204 if (TMath::Abs(Zpart1 - Zpart2) > 2
2205 && Zpart1 < Zpart2) { // if last hits are in different stations --> try to find the latest common station
2206 for (int i = hits2sts - 2; i > -1; i--) { // start from second last station
2207 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2208 Int_t stsHitIndex = Sts_2->GetStsHitIndex(i);
2209 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
2210 Xpart2 = stsHit->GetX();
2211 Ypart2 = stsHit->GetY();
2212 Zpart2 = stsHit->GetZ();
2213 }
2214 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 < Zpart2) {
2215 for (int i = hits2mvd - 2; i > -1; i--) {
2216 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2217 Int_t mvdHitIndex = Sts_2->GetMvdHitIndex(i);
2218 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
2219 Xpart2 = mvdHit->GetX();
2220 Ypart2 = mvdHit->GetY();
2221 Zpart2 = mvdHit->GetZ();
2222 }
2223 }
2224 }
2225
2226 // calculate angle if we found common station
2227 if (TMath::Abs(Zpart1 - Zpart2) < 2 && Zpart1 != 0 && Zpart2 != 0) {
2228 FinalAngle = TMath::ATan2(Ypart1 - Ypart2, Xpart1 - Xpart2) * (180 / TMath::Pi());
2229 }
2230
2231 return TMath::Abs(TMath::Abs(FinalAngle) - 180);
2232}
2233
2235{
2236 double FinalAngle = 400;
2237 Int_t hits1sts = Sts_1->GetNofStsHits();
2238 Int_t hits2sts = Sts_2->GetNofStsHits();
2239 Int_t hits1mvd = Sts_1->GetNofMvdHits();
2240 Int_t hits2mvd = Sts_2->GetNofMvdHits();
2241
2242 double Xpart1 = 0;
2243 double Ypart1 = 0;
2244 double Zpart1 = 0;
2245 double Xpart2 = 0;
2246 double Ypart2 = 0;
2247 double Zpart2 = 0;
2248 if (hits1mvd > 0) {
2249 Int_t mvdHitIndex1 = Sts_1->GetMvdHitIndex(0);
2250 CbmMvdHit* mvdHit1 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex1);
2251 Xpart1 = mvdHit1->GetX();
2252 Ypart1 = mvdHit1->GetY();
2253 Zpart1 = mvdHit1->GetZ();
2254 }
2255 else {
2256 Int_t stsHitIndex1 = Sts_1->GetStsHitIndex(0);
2257 CbmStsHit* stsHit1 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex1);
2258 Xpart1 = stsHit1->GetX();
2259 Ypart1 = stsHit1->GetY();
2260 Zpart1 = stsHit1->GetZ();
2261 }
2262
2263 if (hits2mvd > 0) {
2264 Int_t mvdHitIndex2 = Sts_2->GetMvdHitIndex(0);
2265 CbmMvdHit* mvdHit2 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex2);
2266 Xpart2 = mvdHit2->GetX();
2267 Ypart2 = mvdHit2->GetY();
2268 Zpart2 = mvdHit2->GetZ();
2269 }
2270 else {
2271 Int_t stsHitIndex2 = Sts_2->GetStsHitIndex(0);
2272 CbmStsHit* stsHit2 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex2);
2273 Xpart2 = stsHit2->GetX();
2274 Ypart2 = stsHit2->GetY();
2275 Zpart2 = stsHit2->GetZ();
2276 }
2277
2278 // check difference in 2 cm, because of two slices of every STS and Mvd stations
2279 if (TMath::Abs(Zpart1 - Zpart2) > 2
2280 && Zpart1 < Zpart2) { // if first hits are in different stations --> try to find the earliest common station
2281 for (int i = 1; i < hits1mvd; i++) { // start from second hit
2282 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2283 Int_t mvdHitIndex = Sts_1->GetMvdHitIndex(i);
2284 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
2285 Xpart1 = mvdHit->GetX();
2286 Ypart1 = mvdHit->GetY();
2287 Zpart1 = mvdHit->GetZ();
2288 }
2289 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 < Zpart2) {
2290 for (int i = 0; i < hits1sts; i++) {
2291 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2292 Int_t stsHitIndex = Sts_1->GetStsHitIndex(i);
2293 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
2294 Xpart1 = stsHit->GetX();
2295 Ypart1 = stsHit->GetY();
2296 Zpart1 = stsHit->GetZ();
2297 }
2298 }
2299 }
2300
2301 if (TMath::Abs(Zpart1 - Zpart2) > 2
2302 && Zpart1 > Zpart2) { // if first hits are in different stations --> try to find the earliest common station
2303 for (int i = 1; i < hits2mvd; i++) { // start from second hit
2304 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2305 Int_t mvdHitIndex = Sts_2->GetMvdHitIndex(i);
2306 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
2307 Xpart2 = mvdHit->GetX();
2308 Ypart2 = mvdHit->GetY();
2309 Zpart2 = mvdHit->GetZ();
2310 }
2311 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 > Zpart2) {
2312 for (int i = 0; i < hits2sts; i++) {
2313 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
2314 Int_t stsHitIndex = Sts_2->GetStsHitIndex(i);
2315 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
2316 Xpart2 = stsHit->GetX();
2317 Ypart2 = stsHit->GetY();
2318 Zpart2 = stsHit->GetZ();
2319 }
2320 }
2321 }
2322
2323 // calculate angle if we found common station
2324 if (TMath::Abs(Zpart1 - Zpart2) < 2 && Zpart1 != 0 && Zpart2 != 0) {
2325 FinalAngle = TMath::ATan2(Ypart1 - Ypart2, Xpart1 - Xpart2) * (180 / TMath::Pi());
2326 }
2327
2328 return TMath::Abs(TMath::Abs(FinalAngle) - 180);
2329}
2330
2331void CbmKresConversionPhotons::DP_likesign_Mixing_Target(double AngleCut, double InvMassCut)
2332// mix particles with the same charge TARGET
2333{
2334 int nof_minus = DP_LK_EMT_momenta_minus_Target.size();
2335 for (int a = 0; a < nof_minus - 1; a++) {
2336 for (int b = a + 1; b < nof_minus; b++) {
2338 TVector3 e1 = DP_LK_EMT_momenta_minus_Target[a];
2339 TVector3 e2 = DP_LK_EMT_momenta_minus_Target[b];
2342
2343 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2344 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2345 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
2346
2347 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2348 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2349
2350 // cuts
2351 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2352 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2353 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2354
2356
2358
2359 DP_LK_EMT_neg_Pt_all_Target->Fill(params.fPt);
2360 if (rings_amount == 0) DP_LK_EMT_neg_Pt_zero_Target->Fill(params.fPt);
2361 if (rings_amount == 1) DP_LK_EMT_neg_Pt_one_Target->Fill(params.fPt);
2362 if (rings_amount == 2) DP_LK_EMT_neg_Pt_two_Target->Fill(params.fPt);
2363 if ((rings_amount == 1 || rings_amount == 2)) { DP_LK_EMT_neg_Pt_onetwo_Target->Fill(params.fPt); }
2364 DP_LK_EMT_Pt_all_Target->Fill(params.fPt);
2365 if (rings_amount == 0) DP_LK_EMT_Pt_zero_Target->Fill(params.fPt);
2366 if (rings_amount == 1) DP_LK_EMT_Pt_one_Target->Fill(params.fPt);
2367 if (rings_amount == 2) DP_LK_EMT_Pt_two_Target->Fill(params.fPt);
2368 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_Pt_onetwo_Target->Fill(params.fPt);
2369 }
2370 }
2371
2372
2373 int nof_plus = DP_LK_EMT_momenta_plus_Target.size();
2374 for (int a = 0; a < nof_plus - 1; a++) {
2375 for (int b = a + 1; b < nof_plus; b++) {
2377 TVector3 e1 = DP_LK_EMT_momenta_plus_Target[a];
2378 TVector3 e2 = DP_LK_EMT_momenta_plus_Target[b];
2381
2382 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2383 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2384 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
2385
2386 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2387 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2388
2389 // cuts
2390 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2391 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2392 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2393
2395
2397
2398 DP_LK_EMT_pos_Pt_all_Target->Fill(params.fPt);
2399 if (rings_amount == 0) DP_LK_EMT_pos_Pt_zero_Target->Fill(params.fPt);
2400 if (rings_amount == 1) DP_LK_EMT_pos_Pt_one_Target->Fill(params.fPt);
2401 if (rings_amount == 2) DP_LK_EMT_pos_Pt_two_Target->Fill(params.fPt);
2402 if ((rings_amount == 1 || rings_amount == 2)) { DP_LK_EMT_pos_Pt_onetwo_Target->Fill(params.fPt); }
2403 DP_LK_EMT_Pt_all_Target->Fill(params.fPt);
2404 if (rings_amount == 0) DP_LK_EMT_Pt_zero_Target->Fill(params.fPt);
2405 if (rings_amount == 1) DP_LK_EMT_Pt_one_Target->Fill(params.fPt);
2406 if (rings_amount == 2) DP_LK_EMT_Pt_two_Target->Fill(params.fPt);
2407 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_Pt_onetwo_Target->Fill(params.fPt);
2408 }
2409 }
2410}
2411
2412void CbmKresConversionPhotons::DP_likesign_Mixing_Outside(double AngleCut, double InvMassCut)
2413// mix particles with the same charge OUTSIDE
2414{
2415 int nof_minus = DP_LK_EMT_NofRings_minus_Outside.size();
2416 for (int a = 0; a < nof_minus - 1; a++) {
2417 for (int b = a + 1; b < nof_minus; b++) {
2421
2422 KFParticle electron;
2424 KFParticle positron;
2426 const KFParticle* daughters[2] = {&electron, &positron};
2427 KFParticle intersection;
2428 intersection.Construct(daughters, 2);
2429
2430 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
2431
2432 TVector3 e1 = CbmKresFunctions::FitToVertex(sts1, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2433 TVector3 e2 = CbmKresFunctions::FitToVertex(sts2, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2434
2435 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2436 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2437 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
2438
2439 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2440 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2441
2442 // cuts
2443 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2444 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2445 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2446
2448
2450
2451 DP_LK_EMT_neg_Pt_all_Outside->Fill(params.fPt);
2452 if (rings_amount == 0) DP_LK_EMT_neg_Pt_zero_Outside->Fill(params.fPt);
2453 if (rings_amount == 1) DP_LK_EMT_neg_Pt_one_Outside->Fill(params.fPt);
2454 if (rings_amount == 2) DP_LK_EMT_neg_Pt_two_Outside->Fill(params.fPt);
2455 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_neg_Pt_onetwo_Outside->Fill(params.fPt);
2456 DP_LK_EMT_Pt_all_Outside->Fill(params.fPt);
2457 if (rings_amount == 0) DP_LK_EMT_Pt_zero_Outside->Fill(params.fPt);
2458 if (rings_amount == 1) DP_LK_EMT_Pt_one_Outside->Fill(params.fPt);
2459 if (rings_amount == 2) DP_LK_EMT_Pt_two_Outside->Fill(params.fPt);
2460 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_Pt_onetwo_Outside->Fill(params.fPt);
2461 }
2462 }
2463
2464
2465 int nof_plus = DP_LK_EMT_NofRings_plus_Outside.size();
2466 for (int a = 0; a < nof_plus - 1; a++) {
2467 for (int b = a + 1; b < nof_plus; b++) {
2471
2472 KFParticle electron;
2474 KFParticle positron;
2476 const KFParticle* daughters[2] = {&electron, &positron};
2477 KFParticle intersection;
2478 intersection.Construct(daughters, 2);
2479
2480 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
2481
2482 TVector3 e1 = CbmKresFunctions::FitToVertex(sts1, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2483 TVector3 e2 = CbmKresFunctions::FitToVertex(sts2, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2484
2485 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2486 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2487 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
2488
2489 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2490 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2491
2492 // cuts
2493 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2494 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2495 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2496
2498
2500
2501 DP_LK_EMT_pos_Pt_all_Outside->Fill(params.fPt);
2502 if (rings_amount == 0) DP_LK_EMT_pos_Pt_zero_Outside->Fill(params.fPt);
2503 if (rings_amount == 1) DP_LK_EMT_pos_Pt_one_Outside->Fill(params.fPt);
2504 if (rings_amount == 2) DP_LK_EMT_pos_Pt_two_Outside->Fill(params.fPt);
2505 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_pos_Pt_onetwo_Outside->Fill(params.fPt);
2506 DP_LK_EMT_Pt_all_Outside->Fill(params.fPt);
2507 if (rings_amount == 0) DP_LK_EMT_Pt_zero_Outside->Fill(params.fPt);
2508 if (rings_amount == 1) DP_LK_EMT_Pt_one_Outside->Fill(params.fPt);
2509 if (rings_amount == 2) DP_LK_EMT_Pt_two_Outside->Fill(params.fPt);
2510 if ((rings_amount == 1 || rings_amount == 2)) DP_LK_EMT_Pt_onetwo_Outside->Fill(params.fPt);
2511 }
2512 }
2513}
2514
2515
2516void CbmKresConversionPhotons::DP_Mixing_Target(double AngleCut, double InvMassCut)
2517// TARGET
2518{
2519 int nof_Target = DP_EMT_Event_minus_Target.size();
2520 cout << "Mixing for direct photons in Target - nof entries " << nof_Target << endl;
2521
2522 for (size_t a = 0; a < DP_EMT_Event_minus_Target.size(); a++) {
2523 for (size_t b = 0; b < DP_EMT_Event_plus_Target.size(); b++) {
2525 continue; // to make sure that two particles are from two different events
2526 TVector3 e1 = DP_EMT_momenta_minus_Target[a];
2527 TVector3 e2 = DP_EMT_momenta_plus_Target[b];
2528 std::vector<TVector3> hits1 = DP_EMT_Hits_minus_Target[a];
2529 std::vector<TVector3> hits2 = DP_EMT_Hits_plus_Target[b];
2530
2531 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2532 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2533 double PlaneAngle_last = CalculatePlaneAngle_last_fromHits(hits1, hits2);
2534
2535 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2536 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
2537
2538 // cuts
2539 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2540 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2541 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2542
2545
2546 DP_EMT_Pt_all_Target->Fill(params.fPt);
2547 DP_EMT_Pt_all_Both->Fill(params.fPt);
2548 if (rings_amount == 0) {
2549 DP_EMT_Pt_zero_Target->Fill(params.fPt);
2550 DP_EMT_Pt_zero_Both->Fill(params.fPt);
2551 }
2552 if (rings_amount == 1) {
2553 DP_EMT_Pt_one_Target->Fill(params.fPt);
2554 DP_EMT_Pt_one_Both->Fill(params.fPt);
2555 }
2556 if (rings_amount == 2) {
2557 DP_EMT_Pt_two_Target->Fill(params.fPt);
2558 DP_EMT_Pt_two_Both->Fill(params.fPt);
2559 }
2560 if ((rings_amount == 1 || rings_amount == 2)) {
2561 DP_EMT_Pt_onetwo_Target->Fill(params.fPt);
2562 DP_EMT_Pt_onetwo_Both->Fill(params.fPt);
2563 }
2564 }
2565 }
2566}
2567
2568
2569void CbmKresConversionPhotons::DP_Mixing_Outside(double AngleCut, double InvMassCut)
2570// OUTSIDE
2571{
2572 int nof_Outside = DP_EMT_Event_minus_Outside.size();
2573 cout << "Mixing for direct photons in Outside - nof entries " << nof_Outside << endl;
2574
2575 for (size_t a = 0; a < DP_EMT_Event_minus_Outside.size(); a++) {
2576 for (size_t b = 0; b < DP_EMT_Event_plus_Outside.size(); b++) {
2578 continue; // to make sure that two particles are from two different events
2579
2580 KFParticle electron = DP_EMT_KFTrack_minus_Outside[a];
2581 KFParticle positron = DP_EMT_KFTrack_plus_Outside[b];
2582
2583 const KFParticle* daughters[2] = {&electron, &positron};
2584 KFParticle intersection;
2585 intersection.Construct(daughters, 2);
2586
2587 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
2588
2589 // TVector3 e1 = CbmKresFunctions::FitToVertex(sts1, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2590 // TVector3 e2 = CbmKresFunctions::FitToVertex(sts2, intersection.GetX(), intersection.GetY(), intersection.GetZ());
2591
2592 TVector3 e1(electron.KFParticleBase::Px(), electron.KFParticleBase::Py(), electron.KFParticleBase::Pz());
2593 TVector3 e2(positron.KFParticleBase::Px(), positron.KFParticleBase::Py(), positron.KFParticleBase::Pz());
2594
2595 std::vector<TVector3> hits1 = DP_EMT_Hits_minus_Outside[a];
2596 std::vector<TVector3> hits2 = DP_EMT_Hits_plus_Outside[b];
2597
2598 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2599 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2600 double PlaneAngle_last = CalculatePlaneAngle_last_fromHits(hits1, hits2);
2601
2602 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(), e1, e2);
2603 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(), e1, e2);
2604
2605 // cuts
2606 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2607 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2608 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2609
2612
2613 DP_EMT_Pt_all_Outside->Fill(params.fPt);
2614 DP_EMT_Pt_all_Both->Fill(params.fPt);
2615 if (rings_amount == 0) {
2616 DP_EMT_Pt_zero_Outside->Fill(params.fPt);
2617 DP_EMT_Pt_zero_Both->Fill(params.fPt);
2618 }
2619 if (rings_amount == 1) {
2620 DP_EMT_Pt_one_Outside->Fill(params.fPt);
2621 DP_EMT_Pt_one_Both->Fill(params.fPt);
2622 }
2623 if (rings_amount == 2) {
2624 DP_EMT_Pt_two_Outside->Fill(params.fPt);
2625 DP_EMT_Pt_two_Both->Fill(params.fPt);
2626 }
2627 if ((rings_amount == 1 || rings_amount == 2)) {
2628 DP_EMT_Pt_onetwo_Outside->Fill(params.fPt);
2629 DP_EMT_Pt_onetwo_Both->Fill(params.fPt);
2630 }
2631 }
2632 }
2633}
2634
2635
2637{
2638 gDirectory->mkdir("direct photons");
2639 gDirectory->cd("direct photons");
2640
2641
2642 gDirectory->mkdir("Target");
2643 gDirectory->cd("Target");
2644 gDirectory->mkdir("CheckCuts_Target");
2645 gDirectory->cd("CheckCuts_Target");
2646 for (UInt_t i = 0; i < fHistoList_dp_cuts_Target.size(); i++) {
2647 fHistoList_dp_cuts_Target[i]->Write();
2648 }
2649 gDirectory->cd("..");
2650 gDirectory->mkdir("all");
2651 gDirectory->cd("all");
2652 for (UInt_t i = 0; i < fHistoList_dp_all_Target.size(); i++) {
2653 fHistoList_dp_all_Target[i]->Write();
2654 }
2655 gDirectory->cd("..");
2656 gDirectory->mkdir("zero");
2657 gDirectory->cd("zero");
2658 for (UInt_t i = 0; i < fHistoList_dp_zero_Target.size(); i++) {
2659 fHistoList_dp_zero_Target[i]->Write();
2660 }
2661 gDirectory->cd("..");
2662 gDirectory->mkdir("one");
2663 gDirectory->cd("one");
2664 for (UInt_t i = 0; i < fHistoList_dp_one_Target.size(); i++) {
2665 fHistoList_dp_one_Target[i]->Write();
2666 }
2667 gDirectory->cd("..");
2668 gDirectory->mkdir("two");
2669 gDirectory->cd("two");
2670 for (UInt_t i = 0; i < fHistoList_dp_two_Target.size(); i++) {
2671 fHistoList_dp_two_Target[i]->Write();
2672 }
2673 gDirectory->cd("..");
2674 gDirectory->mkdir("onetwo");
2675 gDirectory->cd("onetwo");
2676 for (UInt_t i = 0; i < fHistoList_dp_onetwo_Target.size(); i++) {
2677 fHistoList_dp_onetwo_Target[i]->Write();
2678 }
2679 gDirectory->cd("..");
2680 for (UInt_t i = 0; i < fHistoList_dp_Target.size(); i++) {
2681 fHistoList_dp_Target[i]->Write();
2682 }
2683 gDirectory->cd("..");
2684
2685
2686 gDirectory->mkdir("Outside");
2687 gDirectory->cd("Outside");
2688 gDirectory->mkdir("CheckCuts_Outside");
2689 gDirectory->cd("CheckCuts_Outside");
2690 for (UInt_t i = 0; i < fHistoList_dp_cuts_Outside.size(); i++) {
2691 fHistoList_dp_cuts_Outside[i]->Write();
2692 }
2693 gDirectory->cd("..");
2694 gDirectory->mkdir("all");
2695 gDirectory->cd("all");
2696 for (UInt_t i = 0; i < fHistoList_dp_all_Outside.size(); i++) {
2697 fHistoList_dp_all_Outside[i]->Write();
2698 }
2699 gDirectory->cd("..");
2700 gDirectory->mkdir("zero");
2701 gDirectory->cd("zero");
2702 for (UInt_t i = 0; i < fHistoList_dp_zero_Outside.size(); i++) {
2703 fHistoList_dp_zero_Outside[i]->Write();
2704 }
2705 gDirectory->cd("..");
2706 gDirectory->mkdir("one");
2707 gDirectory->cd("one");
2708 for (UInt_t i = 0; i < fHistoList_dp_one_Outside.size(); i++) {
2709 fHistoList_dp_one_Outside[i]->Write();
2710 }
2711 gDirectory->cd("..");
2712 gDirectory->mkdir("two");
2713 gDirectory->cd("two");
2714 for (UInt_t i = 0; i < fHistoList_dp_two_Outside.size(); i++) {
2715 fHistoList_dp_two_Outside[i]->Write();
2716 }
2717 gDirectory->cd("..");
2718 gDirectory->mkdir("onetwo");
2719 gDirectory->cd("onetwo");
2720 for (UInt_t i = 0; i < fHistoList_dp_onetwo_Outside.size(); i++) {
2721 fHistoList_dp_onetwo_Outside[i]->Write();
2722 }
2723 gDirectory->cd("..");
2724 for (UInt_t i = 0; i < fHistoList_dp_Outside.size(); i++) {
2725 fHistoList_dp_Outside[i]->Write();
2726 }
2727 gDirectory->cd("..");
2728
2729
2730 gDirectory->mkdir("Both");
2731 gDirectory->cd("Both");
2732 gDirectory->mkdir("CheckCuts_Both");
2733 gDirectory->cd("CheckCuts_Both");
2734 for (UInt_t i = 0; i < fHistoList_dp_cuts_Both.size(); i++) {
2735 fHistoList_dp_cuts_Both[i]->Write();
2736 }
2737 gDirectory->cd("..");
2738 gDirectory->mkdir("all");
2739 gDirectory->cd("all");
2740 for (UInt_t i = 0; i < fHistoList_dp_all_Both.size(); i++) {
2741 fHistoList_dp_all_Both[i]->Write();
2742 }
2743 gDirectory->cd("..");
2744 gDirectory->mkdir("zero");
2745 gDirectory->cd("zero");
2746 for (UInt_t i = 0; i < fHistoList_dp_zero_Both.size(); i++) {
2747 fHistoList_dp_zero_Both[i]->Write();
2748 }
2749 gDirectory->cd("..");
2750 gDirectory->mkdir("one");
2751 gDirectory->cd("one");
2752 for (UInt_t i = 0; i < fHistoList_dp_one_Both.size(); i++) {
2753 fHistoList_dp_one_Both[i]->Write();
2754 }
2755 gDirectory->cd("..");
2756 gDirectory->mkdir("two");
2757 gDirectory->cd("two");
2758 for (UInt_t i = 0; i < fHistoList_dp_two_Both.size(); i++) {
2759 fHistoList_dp_two_Both[i]->Write();
2760 }
2761 gDirectory->cd("..");
2762 gDirectory->mkdir("onetwo");
2763 gDirectory->cd("onetwo");
2764 for (UInt_t i = 0; i < fHistoList_dp_onetwo_Both.size(); i++) {
2765 fHistoList_dp_onetwo_Both[i]->Write();
2766 }
2767 gDirectory->cd("..");
2768 for (UInt_t i = 0; i < fHistoList_dp_Both.size(); i++) {
2769 fHistoList_dp_Both[i]->Write();
2770 }
2771 gDirectory->cd("..");
2772
2773
2774 gDirectory->cd("..");
2775}
2776
2777
2779{
2780 // Target
2781 Mother_PDG_Target = new TH1D("Mother_PDG_Target", "Mother_PDG_Target; Id;#", 1000, -10, 490);
2783 GrandMother_PDG_Target = new TH1D("GrandMother_PDG_Target", "GrandMother_PDG_Target; Id;#", 1000, -10, 490);
2785
2786 // Outside
2787 Mother_PDG_Outside = new TH1D("Mother_PDG_Outside", "Mother_PDG_Outside; Id;#", 1000, -10, 490);
2789 GrandMother_PDG_Outside = new TH1D("GrandMother_PDG_Outside", "GrandMother_PDG_Outside; Id;#", 1000, -10, 490);
2791
2792 // Both
2794 new TH2D("Pdg_vs_Distance_for_dp", "Pdg_vs_Distance_for_dp; pdg; distance in cm", 2500, 0, 2499, 500, 0, 50);
2796 P_vs_Distance_for_dp = new TH2D("P_vs_Distance_for_dp",
2797 "Distance between projected track and center of the ring (for e+ "
2798 "and e-); P in GeV/c^{2}; distance in cm",
2799 300, 0, 3, 300, 0, 15);
2801 DP_AnnTruePairs = new TH1D("DP_AnnTruePairs", "DP_AnnTruePairs; Ann value ;#", 100, -1.2, 1.2);
2803 DP_AnnFalsePairs = new TH1D("DP_AnnFalsePairs", "DP_AnnFalsePairs; Ann value ;#", 100, -1.2, 1.2);
2806 new TH1D("DP_AnnTruePairs_AfterCuts", "DP_AnnTruePairs_AfterCuts; Ann value ;#", 100, -1.2, 1.2);
2809 new TH1D("DP_AnnFalsePairs_AfterCuts", "DP_AnnFalsePairs_AfterCuts; Ann value ;#", 100, -1.2, 1.2);
2811
2812
2815 DP_candidates_InvMass_vs_OA_Both = new TH2D("DP_candidates_InvMass_vs_OA_Both",
2816 "DP_candidates_InvMass_vs_OA_Both; invariant mass in GeV/c^{2}; "
2817 "opening angle in degree",
2818 500, 0, 0.5, 500, 0, 50);
2820 DP_InvMass_vs_OA_Both = new TH2D("DP_InvMass_vs_OA_Both",
2821 "DP_InvMass_vs_OA_Both; invariant mass in "
2822 "GeV/c^{2}; opening angle in degree",
2823 500, 0, 0.5, 500, 0, 50);
2825 DP_candidates_InvMass_Both = new TH1D("DP_candidates_InvMass_Both",
2826 "DP_candidates_InvMass_Both; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2828 DP_InvMass_Both = new TH1D("DP_InvMass_Both", "DP_InvMass_Both; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2831 new TH1D("DP_candidates_OA_Both", "DP_candidates_OA_Both; opening angle in degree;#", 300, -0.1, 29.9);
2833 DP_OA_Both = new TH1D("DP_OA_Both", "DP_OA_Both; opening angle in degree;#", 300, -0.1, 29.9);
2836 new TH1D("DP_candidates_PlaneAngles_last_Both", "DP_candidates_PlaneAngles_last_Both; #theta angle in degree;#",
2837 720, -1., 179.);
2840 new TH1D("DP_PlaneAngles_last_Both", "DP_PlaneAngles_last_Both; #theta angle in degree;#", 720, -1., 179.);
2843 new TH1D("DP_candidates_PlaneAngles_first_Both", "DP_candidates_PlaneAngles_first_Both; #theta angle in degree;#",
2844 720, -1., 179.);
2847 new TH1D("DP_PlaneAngles_first_Both", "DP_PlaneAngles_first_Both; #theta angle in degree;#", 720, -1., 179.);
2849
2851 DP_candidates_InvMass_vs_OA_Target = new TH2D("DP_candidates_InvMass_vs_OA_Target",
2852 "DP_candidates_InvMass_vs_OA_Target; invariant mass in GeV/c^{2}; "
2853 "opening angle in degree",
2854 500, 0, 0.5, 500, 0, 50);
2856 DP_InvMass_vs_OA_Target = new TH2D("DP_InvMass_vs_OA_Target",
2857 "DP_InvMass_vs_OA_Target; invariant mass "
2858 "in GeV/c^{2}; opening angle in degree",
2859 500, 0, 0.5, 500, 0, 50);
2862 "DP_candidates_InvMass_Target", "DP_candidates_InvMass_Target; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2865 new TH1D("DP_InvMass_Target", "DP_InvMass_Target; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2868 new TH1D("DP_candidates_OA_Target", "DP_candidates_OA_Target; opening angle in degree;#", 300, -0.1, 29.9);
2870 DP_OA_Target = new TH1D("DP_OA_Target", "DP_OA_Target; opening angle in degree;#", 300, -0.1, 29.9);
2873 new TH1D("DP_candidates_PlaneAngles_last_Target", "DP_candidates_PlaneAngles_last_Target; #theta angle in degree;#",
2874 720, -1., 179.);
2877 new TH1D("DP_PlaneAngles_last_Target", "DP_PlaneAngles_last_Target; #theta angle in degree;#", 720, -1., 179.);
2880 new TH1D("DP_candidates_PlaneAngles_first_Target",
2881 "DP_candidates_PlaneAngles_first_Target; #theta angle in degree;#", 720, -1., 179.);
2884 new TH1D("DP_PlaneAngles_first_Target", "DP_PlaneAngles_first_Target; #theta angle in degree;#", 720, -1., 179.);
2886
2888 DP_candidates_InvMass_vs_OA_Outside = new TH2D("DP_candidates_InvMass_vs_OA_Outside",
2889 "DP_candidates_InvMass_vs_OA_Outside; invariant mass in "
2890 "GeV/c^{2}; opening angle in degree",
2891 500, 0, 0.5, 500, 0, 50);
2893 DP_InvMass_vs_OA_Outside = new TH2D("DP_InvMass_vs_OA_Outside",
2894 "DP_InvMass_vs_OA_Outside; invariant mass in GeV/c^{2}; opening "
2895 "angle in degree",
2896 500, 0, 0.5, 500, 0, 50);
2899 "DP_candidates_InvMass_Outside", "DP_candidates_InvMass_Outside; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2902 new TH1D("DP_InvMass_Outside", "DP_InvMass_Outside; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2905 new TH1D("DP_candidates_OA_Outside", "DP_candidates_OA_Outside; opening angle in degree;#", 300, -0.1, 29.9);
2907 DP_OA_Outside = new TH1D("DP_OA_Outside", "DP_OA_Outside; opening angle in degree;#", 300, -0.1, 29.9);
2910 new TH1D("DP_candidates_PlaneAngles_last_Outside",
2911 "DP_candidates_PlaneAngles_last_Outside; #theta angle in degree;#", 720, -1., 179.);
2914 new TH1D("DP_PlaneAngles_last_Outside", "DP_PlaneAngles_last_Outside; #theta angle in degree;#", 720, -1., 179.);
2917 new TH1D("DP_candidates_PlaneAngles_first_Outside",
2918 "DP_candidates_PlaneAngles_first_Outside; #theta angle in degree;#", 720, -1., 179.);
2921 new TH1D("DP_PlaneAngles_first_Outside", "DP_PlaneAngles_first_Outside; #theta angle in degree;#", 720, -1., 179.);
2923
2924
2925 // Target => all
2926 DP_InvMassReco_all_Target = new TH1D("DP_InvMassReco_all_Target",
2927 "DP_InvMassReco_all_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2930 new TH1D("DP_OpeningAngleReco_all_Target", "DP_OpeningAngleReco_all_Target; angle [deg];#", 45, -0.5, 4.);
2932 DP_Pdg_all_Target = new TH1D("DP_Pdg_all_Target", "DP_Pdg_all_Target; Id;#", 1000, -10, 490);
2934 DP_P_reco_all_Target = new TH1D("DP_P_reco_all_Target", "DP_P_reco_all_Target; P in GeV/c^{2};#", 200, 0, 10);
2936 DP_Pt_reco_all_Target = new TH1D("DP_Pt_reco_all_Target", "DP_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2939 new TH1D("Ph_fromTarget_Pt_reco_all_Target", "Ph_fromTarget_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2942 new TH1D("Ph_fromPions_Pt_reco_all_Target", "Ph_fromPions_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2945 new TH1D("Ph_fromEtas_Pt_reco_all_Target", "Ph_fromEtas_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2948 new TH1D("Ph_fromDalitz_Pt_reco_all_Target", "Ph_fromDalitz_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2950
2951 // Target => zero
2952 DP_InvMassReco_zero_Target = new TH1D("DP_InvMassReco_zero_Target",
2953 "DP_InvMassReco_zero_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2956 new TH1D("DP_OpeningAngleReco_zero_Target", "DP_OpeningAngleReco_zero_Target; angle [deg];#", 45, -0.5, 4.);
2958 DP_Pdg_zero_Target = new TH1D("DP_Pdg_zero_Target", "DP_Pdg_zero_Target; Id;#", 1000, -10, 490);
2960 DP_P_reco_zero_Target = new TH1D("DP_P_reco_zero_Target", "DP_P_reco_zero_Target; P in GeV/c^{2};#", 200, 0, 10);
2962 DP_Pt_reco_zero_Target = new TH1D("DP_Pt_reco_zero_Target", "DP_Pt_reco_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2965 new TH1D("Ph_fromTarget_Pt_reco_zero_Target", "Ph_fromTarget_Pt_reco_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2968 new TH1D("Ph_fromPions_Pt_reco_zero_Target", "Ph_fromPions_Pt_reco_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2971 new TH1D("Ph_fromEtas_Pt_reco_zero_Target", "Ph_fromEtas_Pt_reco_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2974 new TH1D("Ph_fromDalitz_Pt_reco_zero_Target", "Ph_fromDalitz_Pt_reco_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2976
2977 // Target => one
2978 DP_InvMassReco_one_Target = new TH1D("DP_InvMassReco_one_Target",
2979 "DP_InvMassReco_one_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2982 new TH1D("DP_OpeningAngleReco_one_Target", "DP_OpeningAngleReco_one_Target; angle [deg];#", 45, -0.5, 4.);
2984 DP_Pdg_one_Target = new TH1D("DP_Pdg_one_Target", "DP_Pdg_one_Target; Id;#", 1000, -10, 490);
2986 DP_P_reco_one_Target = new TH1D("DP_P_reco_one_Target", "DP_P_reco_one_Target; P in GeV/c^{2};#", 200, 0, 10);
2988 DP_Pt_reco_one_Target = new TH1D("DP_Pt_reco_one_Target", "DP_Pt_reco_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2991 new TH1D("Ph_fromTarget_Pt_reco_one_Target", "Ph_fromTarget_Pt_reco_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2994 new TH1D("Ph_fromPions_Pt_reco_one_Target", "Ph_fromPions_Pt_reco_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2997 new TH1D("Ph_fromEtas_Pt_reco_one_Target", "Ph_fromEtas_Pt_reco_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3000 new TH1D("Ph_fromDalitz_Pt_reco_one_Target", "Ph_fromDalitz_Pt_reco_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3002
3003 // Target => two
3004 DP_InvMassReco_two_Target = new TH1D("DP_InvMassReco_two_Target",
3005 "DP_InvMassReco_two_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3008 new TH1D("DP_OpeningAngleReco_two_Target", "DP_OpeningAngleReco_two_Target; angle [deg];#", 45, -0.5, 4.);
3010 DP_Pdg_two_Target = new TH1D("DP_Pdg_two_Target", "DP_Pdg_two_Target; Id;#", 1000, -10, 490);
3012 DP_P_reco_two_Target = new TH1D("DP_P_reco_two_Target", "DP_P_reco_two_Target; P in GeV/c^{2};#", 200, 0, 10);
3014 DP_Pt_reco_two_Target = new TH1D("DP_Pt_reco_two_Target", "DP_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3017 new TH1D("Ph_fromTarget_Pt_reco_two_Target", "Ph_fromTarget_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3020 new TH1D("Ph_fromPions_Pt_reco_two_Target", "Ph_fromPions_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3023 new TH1D("Ph_fromEtas_Pt_reco_two_Target", "Ph_fromEtas_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3026 new TH1D("Ph_fromXi_Pt_reco_two_Target", "Ph_fromXi_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3029 new TH1D("Ph_fromDalitz_Pt_reco_two_Target", "Ph_fromDalitz_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3032 new TH1D("Ph_fromOther_Pt_reco_two_Target", "Ph_fromOther_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3034 Ph_twoFromTarget_Pt_reco_two_Target = new TH1D("Ph_twoFromTarget_Pt_reco_two_Target",
3035 "Ph_twoFromTarget_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3038 new TH1D("Ph_fromCombinatorial_Pt_reco_two_Target", "Ph_fromCombinatorial_Pt_reco_two_Target; P_{t} in GeV/c^{2};#",
3039 30, 0, 3);
3042 "Ph_fromConversion_Pt_reco_two_Target", "Ph_fromConversion_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3044
3046 new TH1D("twoFromTarget_PDG_two_Target", "twoFromTarget_PDG_two_Target; Id;#", 1000, -10, 490);
3049 new TH1D("fromCombinatorial_PDG_two_Target", "fromCombinatorial_PDG_two_Target; Id;#", 1000, -10, 490);
3052 new TH1D("CombinatorialMotherPdg_two_Target", "CombinatorialMotherPdg_two_Target; Id;#", 1000, -10, 490);
3055 new TH1D("CombinatorialGrMotherPdg_two_Target", "CombinatorialGrMotherPdg_two_Target; Id;#", 1000, -10, 490);
3057 Electrons_two_Target = new TH1D("Electrons_two_Target", "Electrons_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3059 Pions_two_Target = new TH1D("Pions_two_Target", "Pions_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3062 new TH1D("PionElectron_two_Target", "PionElectron_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3065 new TH1D("elsePionOrElectron_two_Target", "elsePionOrElectron_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3068 new TH1D("DalitzAndConversion_Pt_two_Target", "DalitzAndConversion_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3071 new TH1D("DoubleConversion_Pt_two_Target", "DoubleConversion_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3074 new TH1D("fromFireball_P_two_Target", "fromFireball_P_two_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3077 new TH1D("twoFromTarget_P_two_Target", "twoFromTarget_P_two_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3080 new TH1D("fromCombinatorial_electron_P_two_Target", "fromCombinatorial_electron_P_two_Target; P_{t} in GeV/c^{2};#",
3081 120, 0, 6);
3084 new TH1D("fromCombinatorial_NOTelectron_P_two_Target",
3085 "fromCombinatorial_NOTelectron_P_two_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3087
3088 // Target => onetwo
3090 "DP_InvMassReco_onetwo_Target", "DP_InvMassReco_onetwo_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3093 new TH1D("DP_OpeningAngleReco_onetwo_Target", "DP_OpeningAngleReco_onetwo_Target; angle [deg];#", 45, -0.5, 4.);
3095 DP_Pdg_onetwo_Target = new TH1D("DP_Pdg_onetwo_Target", "DP_Pdg_onetwo_Target; Id;#", 1000, -10, 490);
3098 new TH1D("DP_P_reco_onetwo_Target", "DP_P_reco_onetwo_Target; P in GeV/c^{2};#", 200, 0, 10);
3101 new TH1D("DP_Pt_reco_onetwo_Target", "DP_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3103 Ph_fromTarget_Pt_reco_onetwo_Target = new TH1D("Ph_fromTarget_Pt_reco_onetwo_Target",
3104 "Ph_fromTarget_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3106 Ph_fromPions_Pt_reco_onetwo_Target = new TH1D("Ph_fromPions_Pt_reco_onetwo_Target",
3107 "Ph_fromPions_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3110 new TH1D("Ph_fromEtas_Pt_reco_onetwo_Target", "Ph_fromEtas_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3113 new TH1D("Ph_fromXi_Pt_reco_onetwo_Target", "Ph_fromXi_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3115 Ph_fromDalitz_Pt_reco_onetwo_Target = new TH1D("Ph_fromDalitz_Pt_reco_onetwo_Target",
3116 "Ph_fromDalitz_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3118 Ph_fromOther_Pt_reco_onetwo_Target = new TH1D("Ph_fromOther_Pt_reco_onetwo_Target",
3119 "Ph_fromOther_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3122 "Ph_twoFromTarget_Pt_reco_onetwo_Target", "Ph_twoFromTarget_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3125 new TH1D("Ph_fromCombinatorial_Pt_reco_onetwo_Target",
3126 "Ph_fromCombinatorial_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3129 new TH1D("Ph_fromConversion_Pt_reco_onetwo_Target", "Ph_fromConversion_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#",
3130 30, 0, 3);
3132
3134 new TH1D("twoFromTarget_PDG_onetwo_Target", "twoFromTarget_PDG_onetwo_Target; Id;#", 1000, -10, 490);
3137 new TH1D("fromCombinatorial_PDG_onetwo_Target", "fromCombinatorial_PDG_onetwo_Target; Id;#", 1000, -10, 490);
3140 new TH1D("CombinatorialMotherPdg_onetwo_Target", "CombinatorialMotherPdg_onetwo_Target; Id;#", 1000, -10, 490);
3143 new TH1D("CombinatorialGrMotherPdg_onetwo_Target", "CombinatorialGrMotherPdg_onetwo_Target; Id;#", 1000, -10, 490);
3146 new TH1D("Electrons_onetwo_Target", "Electrons_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3148 Pions_onetwo_Target = new TH1D("Pions_onetwo_Target", "Pions_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3151 new TH1D("PionElectron_onetwo_Target", "PionElectron_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3154 new TH1D("elsePionOrElectron_onetwo_Target", "elsePionOrElectron_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3157 "DalitzAndConversion_Pt_onetwo_Target", "DalitzAndConversion_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3160 new TH1D("DoubleConversion_Pt_onetwo_Target", "DoubleConversion_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3163 new TH1D("fromFireball_P_onetwo_Target", "fromFireball_P_onetwo_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3166 new TH1D("twoFromTarget_P_onetwo_Target", "twoFromTarget_P_onetwo_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3169 new TH1D("fromCombinatorial_electron_P_onetwo_Target",
3170 "fromCombinatorial_electron_P_onetwo_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3173 new TH1D("fromCombinatorial_NOTelectron_P_onetwo_Target",
3174 "fromCombinatorial_NOTelectron_P_onetwo_Target; P_{t} in GeV/c^{2};#", 120, 0, 6);
3176
3177
3178 // Outside => all
3179 DP_InvMassReco_all_Outside = new TH1D("DP_InvMassReco_all_Outside",
3180 "DP_InvMassReco_all_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3183 new TH1D("DP_OpeningAngleReco_all_Outside", "DP_OpeningAngleReco_all_Outside; angle [deg];#", 45, -0.5, 4.);
3185 DP_Pdg_all_Outside = new TH1D("DP_Pdg_all_Outside", "DP_Pdg_all_Outside; Id;#", 1000, -10, 490);
3187 DP_P_reco_all_Outside = new TH1D("DP_P_reco_all_Outside", "DP_P_reco_all_Outside; P in GeV/c^{2};#", 200, 0, 10);
3189 DP_Pt_reco_all_Outside = new TH1D("DP_Pt_reco_all_Outside", "DP_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3192 new TH1D("Ph_fromTarget_Pt_reco_all_Outside", "Ph_fromTarget_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3195 new TH1D("Ph_fromPions_Pt_reco_all_Outside", "Ph_fromPions_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3198 new TH1D("Ph_fromEtas_Pt_reco_all_Outside", "Ph_fromEtas_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3201 new TH1D("Ph_fromDalitz_Pt_reco_all_Outside", "Ph_fromDalitz_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3203
3204 // Outside => zero
3205 DP_InvMassReco_zero_Outside = new TH1D(
3206 "DP_InvMassReco_zero_Outside", "DP_InvMassReco_zero_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3209 new TH1D("DP_OpeningAngleReco_zero_Outside", "DP_OpeningAngleReco_zero_Outside; angle [deg];#", 45, -0.5, 4.);
3211 DP_Pdg_zero_Outside = new TH1D("DP_Pdg_zero_Outside", "DP_Pdg_zero_Outside; Id;#", 1000, -10, 490);
3213 DP_P_reco_zero_Outside = new TH1D("DP_P_reco_zero_Outside", "DP_P_reco_zero_Outside; P in GeV/c^{2};#", 200, 0, 10);
3216 new TH1D("DP_Pt_reco_zero_Outside", "DP_Pt_reco_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3218 Ph_fromTarget_Pt_reco_zero_Outside = new TH1D("Ph_fromTarget_Pt_reco_zero_Outside",
3219 "Ph_fromTarget_Pt_reco_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3222 new TH1D("Ph_fromPions_Pt_reco_zero_Outside", "Ph_fromPions_Pt_reco_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3225 new TH1D("Ph_fromEtas_Pt_reco_zero_Outside", "Ph_fromEtas_Pt_reco_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3227 Ph_fromDalitz_Pt_reco_zero_Outside = new TH1D("Ph_fromDalitz_Pt_reco_zero_Outside",
3228 "Ph_fromDalitz_Pt_reco_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3230
3231 // Outside => one
3232 DP_InvMassReco_one_Outside = new TH1D("DP_InvMassReco_one_Outside",
3233 "DP_InvMassReco_one_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3236 new TH1D("DP_OpeningAngleReco_one_Outside", "DP_OpeningAngleReco_one_Outside; angle [deg];#", 45, -0.5, 4.);
3238 DP_Pdg_one_Outside = new TH1D("DP_Pdg_one_Outside", "DP_Pdg_one_Outside; Id;#", 1000, -10, 490);
3240 DP_P_reco_one_Outside = new TH1D("DP_P_reco_one_Outside", "DP_P_reco_one_Outside; P in GeV/c^{2};#", 200, 0, 10);
3242 DP_Pt_reco_one_Outside = new TH1D("DP_Pt_reco_one_Outside", "DP_Pt_reco_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3245 new TH1D("Ph_fromTarget_Pt_reco_one_Outside", "Ph_fromTarget_Pt_reco_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3248 new TH1D("Ph_fromPions_Pt_reco_one_Outside", "Ph_fromPions_Pt_reco_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3251 new TH1D("Ph_fromEtas_Pt_reco_one_Outside", "Ph_fromEtas_Pt_reco_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3254 new TH1D("Ph_fromDalitz_Pt_reco_one_Outside", "Ph_fromDalitz_Pt_reco_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3256
3257 // Outside => two
3258 DP_InvMassReco_two_Outside = new TH1D("DP_InvMassReco_two_Outside",
3259 "DP_InvMassReco_two_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3262 new TH1D("DP_OpeningAngleReco_two_Outside", "DP_OpeningAngleReco_two_Outside; angle [deg];#", 45, -0.5, 4.);
3264 DP_Pdg_two_Outside = new TH1D("DP_Pdg_two_Outside", "DP_Pdg_two_Outside; Id;#", 1000, -10, 490);
3266 DP_P_reco_two_Outside = new TH1D("DP_P_reco_two_Outside", "DP_P_reco_two_Outside; P in GeV/c^{2};#", 200, 0, 10);
3268 DP_Pt_reco_two_Outside = new TH1D("DP_Pt_reco_two_Outside", "DP_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3271 new TH1D("Ph_fromTarget_Pt_reco_two_Outside", "Ph_fromTarget_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3274 new TH1D("Ph_fromPions_Pt_reco_two_Outside", "Ph_fromPions_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3277 new TH1D("Ph_fromEtas_Pt_reco_two_Outside", "Ph_fromEtas_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3280 new TH1D("Ph_fromXi_Pt_reco_two_Outside", "Ph_fromXi_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3283 new TH1D("Ph_fromDalitz_Pt_reco_two_Outside", "Ph_fromDalitz_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3286 new TH1D("Ph_fromOther_Pt_reco_two_Outside", "Ph_fromOther_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3289 "Ph_twoFromTarget_Pt_reco_two_Outside", "Ph_twoFromTarget_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3292 new TH1D("Ph_fromCombinatorial_Pt_reco_two_Outside",
3293 "Ph_fromCombinatorial_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3296 "Ph_fromConversion_Pt_reco_two_Outside", "Ph_fromConversion_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3299 new TH1D("twoFromTarget_PDG_two_Outside", "twoFromTarget_PDG_two_Outside; Id;#", 1000, -10, 490);
3302 new TH1D("fromCombinatorial_PDG_two_Outside", "fromCombinatorial_PDG_two_Outside; Id;#", 1000, -10, 490);
3305 new TH1D("CombinatorialMotherPdg_two_Outside", "CombinatorialMotherPdg_two_Outside; Id;#", 1000, -10, 490);
3308 new TH1D("CombinatorialGrMotherPdg_two_Outside", "CombinatorialGrMotherPdg_two_Outside; Id;#", 1000, -10, 490);
3310 Electrons_two_Outside = new TH1D("Electrons_two_Outside", "Electrons_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3312 Pions_two_Outside = new TH1D("Pions_two_Outside", "Pions_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3315 new TH1D("PionElectron_two_Outside", "PionElectron_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3318 new TH1D("elsePionOrElectron_two_Outside", "elsePionOrElectron_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3320 DalitzAndConversion_Pt_two_Outside = new TH1D("DalitzAndConversion_Pt_two_Outside",
3321 "DalitzAndConversion_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3324 new TH1D("DoubleConversion_Pt_two_Outside", "DoubleConversion_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3327 new TH1D("fromFireball_P_two_Outside", "fromFireball_P_two_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3330 new TH1D("twoFromTarget_P_two_Outside", "twoFromTarget_P_two_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3333 new TH1D("fromCombinatorial_electron_P_two_Outside",
3334 "fromCombinatorial_electron_P_two_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3337 new TH1D("fromCombinatorial_NOTelectron_P_two_Outside",
3338 "fromCombinatorial_NOTelectron_P_two_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3340
3341 // Outside => onetwo
3343 "DP_InvMassReco_onetwo_Outside", "DP_InvMassReco_onetwo_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3346 new TH1D("DP_OpeningAngleReco_onetwo_Outside", "DP_OpeningAngleReco_onetwo_Outside; angle [deg];#", 45, -0.5, 4.);
3348 DP_Pdg_onetwo_Outside = new TH1D("DP_Pdg_onetwo_Outside", "DP_Pdg_onetwo_Outside; Id;#", 1000, -10, 490);
3351 new TH1D("DP_P_reco_onetwo_Outside", "DP_P_reco_onetwo_Outside; P in GeV/c^{2};#", 200, 0, 10);
3354 new TH1D("DP_Pt_reco_onetwo_Outside", "DP_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3357 "Ph_fromTarget_Pt_reco_onetwo_Outside", "Ph_fromTarget_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3359 Ph_fromPions_Pt_reco_onetwo_Outside = new TH1D("Ph_fromPions_Pt_reco_onetwo_Outside",
3360 "Ph_fromPions_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3362 Ph_fromEtas_Pt_reco_onetwo_Outside = new TH1D("Ph_fromEtas_Pt_reco_onetwo_Outside",
3363 "Ph_fromEtas_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3366 new TH1D("Ph_fromXi_Pt_reco_onetwo_Outside", "Ph_fromXi_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3369 "Ph_fromDalitz_Pt_reco_onetwo_Outside", "Ph_fromDalitz_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3371 Ph_fromOther_Pt_reco_onetwo_Outside = new TH1D("Ph_fromOther_Pt_reco_onetwo_Outside",
3372 "Ph_fromOther_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3375 new TH1D("Ph_twoFromTarget_Pt_reco_onetwo_Outside", "Ph_twoFromTarget_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#",
3376 30, 0, 3);
3379 new TH1D("Ph_fromCombinatorial_Pt_reco_onetwo_Outside",
3380 "Ph_fromCombinatorial_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3383 new TH1D("Ph_fromConversion_Pt_reco_onetwo_Outside",
3384 "Ph_fromConversion_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3387 new TH1D("twoFromTarget_PDG_onetwo_Outside", "twoFromTarget_PDG_onetwo_Outside; Id;#", 1000, -10, 490);
3390 new TH1D("fromCombinatorial_PDG_onetwo_Outside", "fromCombinatorial_PDG_onetwo_Outside; Id;#", 1000, -10, 490);
3393 new TH1D("CombinatorialMotherPdg_onetwo_Outside", "CombinatorialMotherPdg_onetwo_Outside; Id;#", 1000, -10, 490);
3395 CombinatorialGrMotherPdg_onetwo_Outside = new TH1D("CombinatorialGrMotherPdg_onetwo_Outside",
3396 "CombinatorialGrMotherPdg_onetwo_Outside; Id;#", 1000, -10, 490);
3399 new TH1D("Electrons_onetwo_Outside", "Electrons_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3401 Pions_onetwo_Outside = new TH1D("Pions_onetwo_Outside", "Pions_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3404 new TH1D("PionElectron_onetwo_Outside", "PionElectron_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3407 new TH1D("elsePionOrElectron_onetwo_Outside", "elsePionOrElectron_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3410 "DalitzAndConversion_Pt_onetwo_Outside", "DalitzAndConversion_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3412 DoubleConversion_Pt_onetwo_Outside = new TH1D("DoubleConversion_Pt_onetwo_Outside",
3413 "DoubleConversion_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3416 new TH1D("fromFireball_P_onetwo_Outside", "fromFireball_P_onetwo_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3419 new TH1D("twoFromTarget_P_onetwo_Outside", "twoFromTarget_P_onetwo_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3422 new TH1D("fromCombinatorial_electron_P_onetwo_Outside",
3423 "fromCombinatorial_electron_P_onetwo_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3426 new TH1D("fromCombinatorial_NOTelectron_P_onetwo_Outside",
3427 "fromCombinatorial_NOTelectron_P_onetwo_Outside; P_{t} in GeV/c^{2};#", 120, 0, 6);
3429
3430
3431 // Both => all
3433 new TH1D("DP_InvMassReco_all_Both", "DP_InvMassReco_all_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3436 new TH1D("DP_OpeningAngleReco_all_Both", "DP_OpeningAngleReco_all_Both; angle [deg];#", 45, -0.5, 4.);
3438 DP_Pdg_all_Both = new TH1D("DP_Pdg_all_Both", "DP_Pdg_all_Both; Id;#", 1000, -10, 490);
3440 DP_P_reco_all_Both = new TH1D("DP_P_reco_all_Both", "DP_P_reco_all_Both; P in GeV/c^{2};#", 200, 0, 10);
3442 DP_Pt_reco_all_Both = new TH1D("DP_Pt_reco_all_Both", "DP_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3445 new TH1D("Ph_fromTarget_Pt_reco_all_Both", "Ph_fromTarget_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3448 new TH1D("Ph_fromPions_Pt_reco_all_Both", "Ph_fromPions_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3451 new TH1D("Ph_fromEtas_Pt_reco_all_Both", "Ph_fromEtas_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3454 new TH1D("Ph_fromDalitz_Pt_reco_all_Both", "Ph_fromDalitz_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3456 Ph_pt_vs_rap_est_all_Both = new TH2D(
3457 "Ph_pt_vs_rap_est_all_Both", "Ph_pt_vs_rap_est_all_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
3459
3460 // Both => zero
3462 new TH1D("DP_InvMassReco_zero_Both", "DP_InvMassReco_zero_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3465 new TH1D("DP_OpeningAngleReco_zero_Both", "DP_OpeningAngleReco_zero_Both; angle [deg];#", 45, -0.5, 4.);
3467 DP_Pdg_zero_Both = new TH1D("DP_Pdg_zero_Both", "DP_Pdg_zero_Both; Id;#", 1000, -10, 490);
3469 DP_P_reco_zero_Both = new TH1D("DP_P_reco_zero_Both", "DP_P_reco_zero_Both; P in GeV/c^{2};#", 200, 0, 10);
3471 DP_Pt_reco_zero_Both = new TH1D("DP_Pt_reco_zero_Both", "DP_Pt_reco_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3474 new TH1D("Ph_fromTarget_Pt_reco_zero_Both", "Ph_fromTarget_Pt_reco_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3477 new TH1D("Ph_fromPions_Pt_reco_zero_Both", "Ph_fromPions_Pt_reco_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3480 new TH1D("Ph_fromEtas_Pt_reco_zero_Both", "Ph_fromEtas_Pt_reco_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3483 new TH1D("Ph_fromDalitz_Pt_reco_zero_Both", "Ph_fromDalitz_Pt_reco_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3485 Ph_pt_vs_rap_est_zero_Both = new TH2D(
3486 "Ph_pt_vs_rap_est_zero_Both", "Ph_pt_vs_rap_est_zero_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
3488
3489 // Both => one
3491 new TH1D("DP_InvMassReco_one_Both", "DP_InvMassReco_one_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3494 new TH1D("DP_OpeningAngleReco_one_Both", "DP_OpeningAngleReco_one_Both; angle [deg];#", 45, -0.5, 4.);
3496 DP_Pdg_one_Both = new TH1D("DP_Pdg_one_Both", "DP_Pdg_one_Both; Id;#", 1000, -10, 490);
3498 DP_P_reco_one_Both = new TH1D("DP_P_reco_one_Both", "DP_P_reco_one_Both; P in GeV/c^{2};#", 200, 0, 10);
3500 DP_Pt_reco_one_Both = new TH1D("DP_Pt_reco_one_Both", "DP_Pt_reco_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3503 new TH1D("Ph_fromTarget_Pt_reco_one_Both", "Ph_fromTarget_Pt_reco_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3506 new TH1D("Ph_fromPions_Pt_reco_one_Both", "Ph_fromPions_Pt_reco_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3509 new TH1D("Ph_fromEtas_Pt_reco_one_Both", "Ph_fromEtas_Pt_reco_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3512 new TH1D("Ph_fromDalitz_Pt_reco_one_Both", "Ph_fromDalitz_Pt_reco_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3514 Ph_pt_vs_rap_est_one_Both = new TH2D(
3515 "Ph_pt_vs_rap_est_one_Both", "Ph_pt_vs_rap_est_one_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
3517
3518 // Both => two
3520 new TH1D("DP_InvMassReco_two_Both", "DP_InvMassReco_two_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3523 new TH1D("DP_OpeningAngleReco_two_Both", "DP_OpeningAngleReco_two_Both; angle [deg];#", 45, -0.5, 4.);
3525 DP_Pdg_two_Both = new TH1D("DP_Pdg_two_Both", "DP_Pdg_two_Both; Id;#", 1000, -10, 490);
3527 DP_P_reco_two_Both = new TH1D("DP_P_reco_two_Both", "DP_P_reco_two_Both; P in GeV/c^{2};#", 200, 0, 10);
3529 DP_Pt_reco_two_Both = new TH1D("DP_Pt_reco_two_Both", "DP_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3532 new TH1D("Ph_fromTarget_Pt_reco_two_Both", "Ph_fromTarget_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3535 new TH1D("Ph_fromPions_Pt_reco_two_Both", "Ph_fromPions_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3538 new TH1D("Ph_fromEtas_Pt_reco_two_Both", "Ph_fromEtas_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3541 new TH1D("Ph_fromDalitz_Pt_reco_two_Both", "Ph_fromDalitz_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3544 new TH1D("Ph_twoFromTarget_Pt_reco_two_Both", "Ph_twoFromTarget_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3547 "Ph_fromCombinatorial_Pt_reco_two_Both", "Ph_fromCombinatorial_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3549 Ph_fromConversion_Pt_reco_two_Both = new TH1D("Ph_fromConversion_Pt_reco_two_Both",
3550 "Ph_fromConversion_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3552 Ph_pt_vs_rap_est_two_Both = new TH2D(
3553 "Ph_pt_vs_rap_est_two_Both", "Ph_pt_vs_rap_est_two_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
3555
3556 // Both => onetwo
3557 DP_InvMassReco_onetwo_Both = new TH1D("DP_InvMassReco_onetwo_Both",
3558 "DP_InvMassReco_onetwo_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
3561 new TH1D("DP_OpeningAngleReco_onetwo_Both", "DP_OpeningAngleReco_onetwo_Both; angle [deg];#", 45, -0.5, 4.);
3563 DP_Pdg_onetwo_Both = new TH1D("DP_Pdg_onetwo_Both", "DP_Pdg_onetwo_Both; Id;#", 1000, -10, 490);
3565 DP_P_reco_onetwo_Both = new TH1D("DP_P_reco_onetwo_Both", "DP_P_reco_onetwo_Both; P in GeV/c^{2};#", 200, 0, 10);
3567 DP_Pt_reco_onetwo_Both = new TH1D("DP_Pt_reco_onetwo_Both", "DP_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3570 new TH1D("Ph_fromTarget_Pt_reco_onetwo_Both", "Ph_fromTarget_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3573 new TH1D("Ph_fromPions_Pt_reco_onetwo_Both", "Ph_fromPions_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3576 new TH1D("Ph_fromEtas_Pt_reco_onetwo_Both", "Ph_fromEtas_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3579 new TH1D("Ph_fromDalitz_Pt_reco_onetwo_Both", "Ph_fromDalitz_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3582 "Ph_twoFromTarget_Pt_reco_onetwo_Both", "Ph_twoFromTarget_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3585 new TH1D("Ph_fromCombinatorial_Pt_reco_onetwo_Both",
3586 "Ph_fromCombinatorial_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3589 "Ph_fromConversion_Pt_reco_onetwo_Both", "Ph_fromConversion_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3592 new TH2D("Ph_pt_vs_rap_est_onetwo_Both", "Ph_pt_vs_rap_est_onetwo_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4.,
3593 40, 0., 4.);
3595
3596
3597 DP_EMT_Pt_all_Target = new TH1D("DP_EMT_Pt_all_Target", "DP_EMT_Pt_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3599 DP_EMT_Pt_zero_Target = new TH1D("DP_EMT_Pt_zero_Target", "DP_EMT_Pt_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3601 DP_EMT_Pt_one_Target = new TH1D("DP_EMT_Pt_one_Target", "DP_EMT_Pt_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3603 DP_EMT_Pt_two_Target = new TH1D("DP_EMT_Pt_two_Target", "DP_EMT_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3606 new TH1D("DP_EMT_Pt_onetwo_Target", "DP_EMT_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3608
3609
3610 DP_EMT_Pt_all_Outside = new TH1D("DP_EMT_Pt_all_Outside", "DP_EMT_Pt_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3612 DP_EMT_Pt_zero_Outside = new TH1D("DP_EMT_Pt_zero_Outside", "DP_EMT_Pt_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3614 DP_EMT_Pt_one_Outside = new TH1D("DP_EMT_Pt_one_Outside", "DP_EMT_Pt_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3616 DP_EMT_Pt_two_Outside = new TH1D("DP_EMT_Pt_two_Outside", "DP_EMT_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3619 new TH1D("DP_EMT_Pt_onetwo_Outside", "DP_EMT_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3621
3622
3623 DP_EMT_Pt_all_Both = new TH1D("DP_EMT_Pt_all_Both", "DP_EMT_Pt_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3625 DP_EMT_Pt_zero_Both = new TH1D("DP_EMT_Pt_zero_Both", "DP_EMT_Pt_zero_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3627 DP_EMT_Pt_one_Both = new TH1D("DP_EMT_Pt_one_Both", "DP_EMT_Pt_one_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3629 DP_EMT_Pt_two_Both = new TH1D("DP_EMT_Pt_two_Both", "DP_EMT_Pt_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3631 DP_EMT_Pt_onetwo_Both = new TH1D("DP_EMT_Pt_onetwo_Both", "DP_EMT_Pt_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
3633
3634
3635 // DP_LK_EMT Target
3637 new TH1D("DP_LK_EMT_neg_Pt_all_Target", "DP_LK_EMT_neg_Pt_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3640 new TH1D("DP_LK_EMT_neg_Pt_zero_Target", "DP_LK_EMT_neg_Pt_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3643 new TH1D("DP_LK_EMT_neg_Pt_one_Target", "DP_LK_EMT_neg_Pt_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3646 new TH1D("DP_LK_EMT_neg_Pt_two_Target", "DP_LK_EMT_neg_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3649 new TH1D("DP_LK_EMT_neg_Pt_onetwo_Target", "DP_LK_EMT_neg_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3651
3653 new TH1D("DP_LK_EMT_pos_Pt_all_Target", "DP_LK_EMT_pos_Pt_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3656 new TH1D("DP_LK_EMT_pos_Pt_zero_Target", "DP_LK_EMT_pos_Pt_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3659 new TH1D("DP_LK_EMT_pos_Pt_one_Target", "DP_LK_EMT_pos_Pt_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3662 new TH1D("DP_LK_EMT_pos_Pt_two_Target", "DP_LK_EMT_pos_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3665 new TH1D("DP_LK_EMT_pos_Pt_onetwo_Target", "DP_LK_EMT_pos_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3667
3669 new TH1D("DP_LK_EMT_Pt_all_Target", "DP_LK_EMT_Pt_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3672 new TH1D("DP_LK_EMT_Pt_zero_Target", "DP_LK_EMT_Pt_zero_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3675 new TH1D("DP_LK_EMT_Pt_one_Target", "DP_LK_EMT_Pt_one_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3678 new TH1D("DP_LK_EMT_Pt_two_Target", "DP_LK_EMT_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3681 new TH1D("DP_LK_EMT_Pt_onetwo_Target", "DP_LK_EMT_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
3683
3684
3685 // DP_LK_EMT Outside
3687 new TH1D("DP_LK_EMT_neg_Pt_all_Outside", "DP_LK_EMT_neg_Pt_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3690 new TH1D("DP_LK_EMT_neg_Pt_zero_Outside", "DP_LK_EMT_neg_Pt_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3693 new TH1D("DP_LK_EMT_neg_Pt_one_Outside", "DP_LK_EMT_neg_Pt_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3696 new TH1D("DP_LK_EMT_neg_Pt_two_Outside", "DP_LK_EMT_neg_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3699 new TH1D("DP_LK_EMT_neg_Pt_onetwo_Outside", "DP_LK_EMT_neg_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3701
3703 new TH1D("DP_LK_EMT_pos_Pt_all_Outside", "DP_LK_EMT_pos_Pt_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3706 new TH1D("DP_LK_EMT_pos_Pt_zero_Outside", "DP_LK_EMT_pos_Pt_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3709 new TH1D("DP_LK_EMT_pos_Pt_one_Outside", "DP_LK_EMT_pos_Pt_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3712 new TH1D("DP_LK_EMT_pos_Pt_two_Outside", "DP_LK_EMT_pos_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3715 new TH1D("DP_LK_EMT_pos_Pt_onetwo_Outside", "DP_LK_EMT_pos_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3717
3719 new TH1D("DP_LK_EMT_Pt_all_Outside", "DP_LK_EMT_Pt_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3722 new TH1D("DP_LK_EMT_Pt_zero_Outside", "DP_LK_EMT_Pt_zero_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3725 new TH1D("DP_LK_EMT_Pt_one_Outside", "DP_LK_EMT_Pt_one_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3728 new TH1D("DP_LK_EMT_Pt_two_Outside", "DP_LK_EMT_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3731 new TH1D("DP_LK_EMT_Pt_onetwo_Outside", "DP_LK_EMT_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
3733}
Data class for a reconstructed hit in the STS.
Data class for STS tracks.
int32_t GetStsTrackIndex() const
int32_t GetRichRingIndex() const
double GetZ() const
Definition CbmHit.h:71
static void SetKFParticleFromStsTrack(CbmStsTrack *track, KFParticle *particle, Int_t pdg=211, Bool_t firstPoint=kTRUE)
Double_t & GetRefZ()
Definition CbmKFVertex.h:27
Double_t & GetRefX()
Definition CbmKFVertex.h:25
Double_t & GetRefY()
Definition CbmKFVertex.h:26
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Both
void DP_Mixing_Outside(double AngleCut, double InvMassCut)
vector< CbmMCTrack * > VMCtracks_minus_Outside
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Both
std::vector< std::vector< int > > Gammas_stsIndex_zero_Both
vector< CbmStsTrack * > VStsTrack_minus_Outside
std::vector< CbmStsTrack * > DP_LK_EMT_STS_minus_Outside
double CalculatePlaneAngle_last_fromHits(std::vector< TVector3 > track_1, std::vector< TVector3 > track_2)
std::vector< std::vector< TVector3 > > Gammas_two_Outside
std::vector< std::vector< int > > Gammas_stsIndex_all_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Both
std::vector< std::vector< int > > Gammas_stsIndex_all_Target
std::vector< std::vector< int > > Gammas_stsIndex_one_Outside
std::vector< std::vector< TVector3 > > Gammas_zero_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Both
std::vector< std::vector< TVector3 > > Gammas_one_Outside
std::vector< std::vector< int > > Gammas_stsIndex_one_Both
void DP_Mixing_Target(double AngleCut, double InvMassCut)
std::vector< TVector3 > DP_EMT_momenta_minus_Target
std::vector< int > DP_EMT_Event_plus_Target
std::vector< std::vector< TVector3 > > Gammas_all_Target
void Exec(int fEventNumDP, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
int CheckIfElectron(CbmRichRing *ring, double momentum)
std::vector< std::vector< TVector3 > > Gammas_onetwo_Target
std::vector< std::vector< int > > Gammas_stsIndex_two_Target
double CalculatePlaneAngle_first(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
void SaveTargetTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, TVector3 refmom, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
std::vector< std::vector< TVector3 > > Gammas_zero_Target
vector< CbmRichRing * > VRichRing_minus_Outside
vector< CbmMCTrack * > VMCtracks_plus_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Target
vector< CbmRichRing * > VRichRing_minus_Target
std::vector< std::vector< TVector3 > > DP_EMT_Hits_plus_Target
std::vector< std::vector< int > > Gammas_stsIndex_zero_Target
std::vector< std::vector< TVector3 > > DP_EMT_Hits_plus_Outside
std::vector< int > DP_EMT_Event_minus_Target
CbmKresTrainAnnDirectPhotons * fTrainPhotons
void FindGammasOutside(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector< CbmMCTrack * > MCtracks_minus_Outside, vector< CbmMCTrack * > MCtracks_plus_Outside, vector< CbmStsTrack * > StsTrack_minus_Outside, vector< CbmStsTrack * > StsTrack_plus_Outside, std::vector< int > Rings_minus_Outside, std::vector< int > Rings_plus_Outside, std::vector< int > stsIndex_minus_Outside, std::vector< int > stsIndex_plus_Outside, vector< CbmRichRing * > richRing_minus_Outside, vector< CbmRichRing * > richRing_plus_Outside)
vector< CbmStsTrack * > VStsTrack_plus_Outside
std::vector< CbmStsTrack * > DP_LK_EMT_STS_plus_Target
std::vector< std::vector< int > > Gammas_stsIndex_all_Both
std::vector< CbmStsTrack * > DP_EMT_STS_plus_Outside
std::vector< std::vector< int > > Gammas_stsIndex_one_Target
std::vector< std::vector< TVector3 > > Gammas_two_Both
double CalculatePlaneAngle_last(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
std::vector< std::vector< TVector3 > > Gammas_all_Both
void FindGammasTarget(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector< CbmMCTrack * > MCtracks_minus, vector< CbmMCTrack * > MCtracks_plus, vector< CbmStsTrack * > StsTrack_minus, vector< CbmStsTrack * > StsTrack_plus, vector< TVector3 > Momenta_minus, vector< TVector3 > Momenta_plus, std::vector< int > Rings_minus, std::vector< int > Rings_plus, std::vector< int > stsIndex_minus, std::vector< int > stsIndex_plus, vector< CbmRichRing * > richRing_minus, vector< CbmRichRing * > richRing_plus)
std::vector< int > DP_LK_EMT_STS_plus_index_Target
std::vector< std::vector< int > > Gammas_stsIndex_two_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Target
std::vector< int > DP_EMT_NofRings_minus_Target
std::vector< std::vector< TVector3 > > Gammas_one_Both
std::vector< int > DP_EMT_Event_minus_Outside
vector< CbmMCTrack * > VMCtracks_plus_Target
std::vector< std::vector< TVector3 > > Gammas_one_Target
std::vector< int > DP_LK_EMT_NofRings_plus_Target
std::vector< TVector3 > DP_LK_EMT_momenta_minus_Target
vector< CbmStsTrack * > VStsTrack_minus_Target
std::vector< TVector3 > DP_EMT_momenta_plus_Target
std::vector< int > DP_EMT_NofRings_minus_Outside
std::vector< std::vector< TVector3 > > Gammas_onetwo_Both
std::vector< CbmStsTrack * > DP_LK_EMT_STS_minus_Target
std::vector< std::vector< TVector3 > > Gammas_zero_Both
std::vector< int > DP_LK_EMT_STS_minus_index_Target
std::vector< TVector3 > DP_LK_EMT_momenta_plus_Target
vector< CbmMCTrack * > VMCtracks_minus_Target
std::vector< int > DP_EMT_NofRings_plus_Target
std::vector< std::vector< TVector3 > > Gammas_onetwo_Outside
std::vector< int > DP_EMT_NofRings_plus_Outside
std::vector< TVector3 > SaveAllHits(CbmStsTrack *track)
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Both
std::vector< int > VStsIndex_minus_Target
vector< CbmRichRing * > VRichRing_plus_Target
CbmRichRingFitterEllipseTau * fTauFit
std::vector< int > VStsIndex_minus_Outside
std::vector< int > DP_LK_EMT_STS_minus_index_Outside
CbmKresSelectAnnPhotons * fAnnPhotonsSelection
std::vector< std::vector< TVector3 > > DP_EMT_Hits_minus_Target
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Outside
std::vector< std::vector< TVector3 > > Gammas_all_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Target
void DP_likesign_Mixing_Outside(double AngleCut, double InvMassCut)
std::vector< int > VStsIndex_plus_Outside
vector< CbmStsTrack * > VStsTrack_plus_Target
std::vector< int > DP_EMT_Event_plus_Outside
vector< CbmRichRing * > VRichRing_plus_Outside
void DP_likesign_Mixing_Target(double AngleCut, double InvMassCut)
std::vector< CbmMCTrack * > fMCtracks
std::vector< std::vector< TVector3 > > Gammas_two_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Target
std::vector< KFParticle > DP_EMT_KFTrack_minus_Outside
int FindInRich(int richInd, int stsMcTrackId)
std::vector< std::vector< TVector3 > > DP_EMT_Hits_minus_Outside
std::vector< int > DP_LK_EMT_NofRings_minus_Outside
void SaveOutsideTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
std::vector< int > DP_LK_EMT_NofRings_plus_Outside
std::vector< std::vector< int > > Gammas_stsIndex_two_Both
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_onetwo_Outside
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_zero_Outside
std::vector< std::vector< int > > Gammas_stsIndex_onetwo_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_one_Both
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_all_Outside
std::vector< int > DP_LK_EMT_STS_plus_index_Outside
std::vector< int > DP_LK_EMT_NofRings_minus_Target
std::vector< std::vector< CbmMCTrack * > > Gammas_MC_two_Outside
std::vector< CbmStsTrack * > DP_LK_EMT_STS_plus_Outside
std::vector< CbmStsTrack * > DP_EMT_STS_minus_Outside
std::vector< KFParticle > DP_EMT_KFTrack_plus_Outside
std::vector< std::vector< int > > Gammas_stsIndex_zero_Outside
static TVector3 FitToVertexAndGetChi(CbmStsTrack *stsTrack, double x, double y, double z, double &chi)
static Double_t CalculateOpeningAngle_Reco(TVector3 electron1, TVector3 electron2)
static double Invmass_2particles_RECO(const TVector3 part1, const TVector3 part2)
static TVector3 FitToVertex(CbmStsTrack *stsTrack, double x, double y, double z)
static LmvmKinePar CalculateKinematicParamsReco(const TVector3 electron1, const TVector3 electron2)
double DoSelect(double InvariantMass, double OpeningAngle, double PlaneAngle_last, double ZPos, TVector3 Momentum1, TVector3 Momentum2)
void Exec(int event, int IdForANN, double InvariantMass, double OpeningAngle, double PlaneAngle_last, double ZPos, TVector3 Momentum1, TVector3 Momentum2)
double GetP() const
Definition CbmMCTrack.h:98
int32_t GetMotherId() const
Definition CbmMCTrack.h:69
int32_t GetPdgCode() const
Definition CbmMCTrack.h:68
int32_t GetNofLinks() const
Definition CbmMatch.h:42
const CbmLink & GetMatchedLink() const
Definition CbmMatch.h:41
void Position(TVector3 &pos) const
Copies hit position to pos.
double GetY() const
Definition CbmPixelHit.h:74
double GetX() const
Definition CbmPixelHit.h:73
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
virtual void DoFit(CbmRichRingLight *ring)
Inherited from CbmRichRingFitterBase.
float GetAaxis() const
float GetBaxis() const
void AddHit(CbmRichHitLight hit)
Add new hit to the ring.
uint32_t GetHit(int32_t i) const
Definition CbmRichRing.h:39
int32_t GetNofHits() const
Definition CbmRichRing.h:37
static double GetRingTrackDistance(int globalTrackId)
data class for a reconstructed 3-d hit in the STS
Definition CbmStsHit.h:35
int32_t GetNofMvdHits() const
Definition CbmStsTrack.h:87
int32_t GetMvdHitIndex(int32_t iHit) const
Definition CbmStsTrack.h:75
int32_t GetStsHitIndex(int32_t iHit) const
int32_t GetNofStsHits() const
Definition CbmStsTrack.h:93
const FairTrackParam * GetParamFirst() const
Definition CbmTrack.h:68
Double_t fPt
Definition LmvmKinePar.h:20
Double_t fMomentumMag
Definition LmvmKinePar.h:19
Double_t fRapidity
Definition LmvmKinePar.h:21
Hash for CbmL1LinkKey.