CbmRoot
Loading...
Searching...
No Matches
CbmKresConversionKF.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 "CbmKresConversionKF.h"
23
24#include "CbmGlobalTrack.h"
25#include "CbmKFParticleFinder.h"
27#include "CbmKresConversionBG.h"
28#include "CbmKresFunctions.h"
29#include "CbmMCTrack.h"
30#include "CbmRichHit.h"
31#include "CbmRichRing.h"
33#include "CbmRichRingLight.h"
34#include "CbmStsTrack.h"
35#include "CbmTrackMatchNew.h"
36#include "KFParticle/KFParticle.h"
37#include "KFParticle/KFParticleTopoReconstructor.h"
38#include "LmvmKinePar.h"
39
40#include <FairRootManager.h>
41
42#include <TDirectory.h>
43
44using namespace std;
45
47 : fKFparticle(nullptr)
48 , fKFparticleFinderQA(nullptr)
49 , fKFtopo(nullptr)
50 , fTauFit(nullptr)
51 , fAnaBG(nullptr)
52 , fMcTracks(nullptr)
53 , fStsTracks(nullptr)
54 , fStsTrackMatches(nullptr)
55 , fGlobalTracks(nullptr)
56 , fRichRingMatches(nullptr)
57 , fRichProjections(nullptr)
58 , fRichRings(nullptr)
59 , fRichHits(nullptr)
60 , frefmomentum()
61 , GammasAll()
62 , GammasZero()
63 , GammasOne()
64 , GammasTwo()
65 , GammasOneTwo()
66 , fStsInd()
72 , fmcvector()
73 , GammasAllMC()
74 , GammasZeroMC()
75 , GammasOneMC()
76 , GammasTwoMC()
78 , GammasAllZ()
79 , GammasZeroZ()
80 , GammasOneZ()
81 , GammasTwoZ()
83 , EMT_Event()
85 , EMT_NofRings()
86 , EMT_Z()
103 , CheckForCuts_InvMass_MC(nullptr)
105 , CheckForCuts_OA_MC(nullptr)
106 , CheckForCuts_OA_Reco(nullptr)
122 , fGammaInvMassReco_All(nullptr)
124 , fPdg_All(nullptr)
125 , fP_reco_All(nullptr)
126 , fPt_reco_All(nullptr)
127 , fPi0InvMassRecoKF_All(nullptr)
128 , fEMT_InvMass_All(nullptr)
129 , fPi0_pt_vs_rap_All(nullptr)
130 , fPi0_pt_vs_rap_est_All(nullptr)
135 , fEMT_InvMass_All_target(nullptr)
148 , fEMT_InvMass_All_outside(nullptr)
150 , fGammaInvMassReco_Zero(nullptr)
152 , fPdg_Zero(nullptr)
153 , fP_reco_Zero(nullptr)
154 , fPt_reco_Zero(nullptr)
155 , fPi0InvMassRecoKF_Zero(nullptr)
156 , fEMT_InvMass_Zero(nullptr)
157 , fPi0_pt_vs_rap_Zero(nullptr)
158 , fPi0_pt_vs_rap_est_Zero(nullptr)
163 , fEMT_InvMass_Zero_target(nullptr)
178 , fGammaInvMassReco_One(nullptr)
180 , fPdg_One(nullptr)
181 , fP_reco_One(nullptr)
182 , fPt_reco_One(nullptr)
183 , fPi0InvMassRecoKF_One(nullptr)
184 , fEMT_InvMass_One(nullptr)
185 , fPi0_pt_vs_rap_One(nullptr)
186 , fPi0_pt_vs_rap_est_One(nullptr)
191 , fEMT_InvMass_One_target(nullptr)
204 , fEMT_InvMass_One_outside(nullptr)
206 , fGammaInvMassReco_Two(nullptr)
208 , fPdg_Two(nullptr)
209 , fP_reco_Two(nullptr)
210 , fPt_reco_Two(nullptr)
211 , fPi0InvMassRecoKF_Two(nullptr)
212 , fEMT_InvMass_Two(nullptr)
213 , fPi0_pt_vs_rap_Two(nullptr)
214 , fPi0_pt_vs_rap_est_Two(nullptr)
219 , fEMT_InvMass_Two_target(nullptr)
232 , fEMT_InvMass_Two_outside(nullptr)
234 , fGammaInvMassReco_OneTwo(nullptr)
236 , fPdg_OneTwo(nullptr)
237 , fP_reco_OneTwo(nullptr)
238 , fPt_reco_OneTwo(nullptr)
239 , fPi0InvMassRecoKF_OneTwo(nullptr)
240 , fEMT_InvMass_OneTwo(nullptr)
241 , fPi0_pt_vs_rap_OneTwo(nullptr)
262 , MultiplicityGamma_All(nullptr)
263 , MultiplicityGamma_Zero(nullptr)
264 , MultiplicityGamma_One(nullptr)
265 , MultiplicityGamma_Two(nullptr)
266 , MultiplicityGamma_OneTwo(nullptr)
277 , EMTMulti_InvMass_All_m1(nullptr)
278 , EMTMulti_InvMass_All_m2(nullptr)
279 , EMTMulti_InvMass_All_m3(nullptr)
280 , EMTMulti_InvMass_All_m4(nullptr)
281 , EMTMulti_InvMass_All_m5(nullptr)
282 , EMTMulti_InvMass_All_m6(nullptr)
283 , EMTMulti_InvMass_All_m7(nullptr)
284 , EMTMulti_InvMass_Zero_m1(nullptr)
285 , EMTMulti_InvMass_Zero_m2(nullptr)
286 , EMTMulti_InvMass_Zero_m3(nullptr)
287 , EMTMulti_InvMass_Zero_m4(nullptr)
288 , EMTMulti_InvMass_Zero_m5(nullptr)
289 , EMTMulti_InvMass_Zero_m6(nullptr)
290 , EMTMulti_InvMass_Zero_m7(nullptr)
291 , EMTMulti_InvMass_One_m1(nullptr)
292 , EMTMulti_InvMass_One_m2(nullptr)
293 , EMTMulti_InvMass_One_m3(nullptr)
294 , EMTMulti_InvMass_One_m4(nullptr)
295 , EMTMulti_InvMass_One_m5(nullptr)
296 , EMTMulti_InvMass_One_m6(nullptr)
297 , EMTMulti_InvMass_One_m7(nullptr)
298 , EMTMulti_InvMass_Two_m1(nullptr)
299 , EMTMulti_InvMass_Two_m2(nullptr)
300 , EMTMulti_InvMass_Two_m3(nullptr)
301 , EMTMulti_InvMass_Two_m4(nullptr)
302 , EMTMulti_InvMass_Two_m5(nullptr)
303 , EMTMulti_InvMass_Two_m6(nullptr)
304 , EMTMulti_InvMass_Two_m7(nullptr)
313 , BG1_all(nullptr)
314 , BG2_all(nullptr)
315 , BG3_all(nullptr)
316 , BG4_all(nullptr)
317 , BG5_all(nullptr)
318 , BG6_all(nullptr)
319 , BG7_all(nullptr)
320 , BG8_all(nullptr)
321 , BG9_all(nullptr)
322 , BG10_all(nullptr)
323 , PdgCase8_all(nullptr)
324 , PdgCase8mothers_all(nullptr)
325 , sameMIDcase8_all(nullptr)
326 , sameGRIDcase8_all(nullptr)
327 , Case1ZYPos_all(nullptr)
331 , PdgCase8motherNonE_all(nullptr)
332 , Case8ElFromDalitz_all(nullptr)
333 , Case8NonElFrom_pn_all(nullptr)
334 , Case8NonElFrom_eta_all(nullptr)
335 , Case8NonElFrom_kaon_all(nullptr)
336 , sameMIDcase8NonEPdg_all(nullptr)
344 , BG1_zero(nullptr)
345 , BG2_zero(nullptr)
346 , BG3_zero(nullptr)
347 , BG4_zero(nullptr)
348 , BG5_zero(nullptr)
349 , BG6_zero(nullptr)
350 , BG7_zero(nullptr)
351 , BG8_zero(nullptr)
352 , BG9_zero(nullptr)
353 , BG10_zero(nullptr)
354 , PdgCase8_zero(nullptr)
355 , PdgCase8mothers_zero(nullptr)
356 , sameMIDcase8_zero(nullptr)
357 , sameGRIDcase8_zero(nullptr)
358 , Case1ZYPos_zero(nullptr)
362 , PdgCase8motherNonE_zero(nullptr)
363 , Case8ElFromDalitz_zero(nullptr)
364 , Case8NonElFrom_pn_zero(nullptr)
365 , Case8NonElFrom_eta_zero(nullptr)
366 , Case8NonElFrom_kaon_zero(nullptr)
367 , sameMIDcase8NonEPdg_zero(nullptr)
375 , BG1_one(nullptr)
376 , BG2_one(nullptr)
377 , BG3_one(nullptr)
378 , BG4_one(nullptr)
379 , BG5_one(nullptr)
380 , BG6_one(nullptr)
381 , BG7_one(nullptr)
382 , BG8_one(nullptr)
383 , BG9_one(nullptr)
384 , BG10_one(nullptr)
385 , PdgCase8_one(nullptr)
386 , PdgCase8mothers_one(nullptr)
387 , sameMIDcase8_one(nullptr)
388 , sameGRIDcase8_one(nullptr)
389 , Case1ZYPos_one(nullptr)
393 , PdgCase8motherNonE_one(nullptr)
394 , Case8ElFromDalitz_one(nullptr)
395 , Case8NonElFrom_pn_one(nullptr)
396 , Case8NonElFrom_eta_one(nullptr)
397 , Case8NonElFrom_kaon_one(nullptr)
398 , sameMIDcase8NonEPdg_one(nullptr)
406 , BG1_two(nullptr)
407 , BG2_two(nullptr)
408 , BG3_two(nullptr)
409 , BG4_two(nullptr)
410 , BG5_two(nullptr)
411 , BG6_two(nullptr)
412 , BG7_two(nullptr)
413 , BG8_two(nullptr)
414 , BG9_two(nullptr)
415 , BG10_two(nullptr)
416 , PdgCase8_two(nullptr)
417 , PdgCase8mothers_two(nullptr)
418 , sameMIDcase8_two(nullptr)
419 , sameGRIDcase8_two(nullptr)
420 , Case1ZYPos_two(nullptr)
424 , PdgCase8motherNonE_two(nullptr)
425 , Case8ElFromDalitz_two(nullptr)
426 , Case8NonElFrom_pn_two(nullptr)
427 , Case8NonElFrom_eta_two(nullptr)
428 , Case8NonElFrom_kaon_two(nullptr)
429 , sameMIDcase8NonEPdg_two(nullptr)
437 , BG1_onetwo(nullptr)
438 , BG2_onetwo(nullptr)
439 , BG3_onetwo(nullptr)
440 , BG4_onetwo(nullptr)
441 , BG5_onetwo(nullptr)
442 , BG6_onetwo(nullptr)
443 , BG7_onetwo(nullptr)
444 , BG8_onetwo(nullptr)
445 , BG9_onetwo(nullptr)
446 , BG10_onetwo(nullptr)
447 , PdgCase8_onetwo(nullptr)
448 , PdgCase8mothers_onetwo(nullptr)
449 , sameMIDcase8_onetwo(nullptr)
450 , sameGRIDcase8_onetwo(nullptr)
451 , Case1ZYPos_onetwo(nullptr)
456 , Case8ElFromDalitz_onetwo(nullptr)
457 , Case8NonElFrom_pn_onetwo(nullptr)
467{
468}
469
471
473{
474 fKFparticle = kfparticle;
475 fKFparticleFinderQA = kfparticleQA;
476 if (fKFparticle) { cout << "CbmKresConversionKF: kf works" << endl; }
477 else {
478 cout << "CbmKresConversionKF: kf does not work" << endl;
479 }
480}
481
483{
484 fKFtopo = fKFparticle->GetTopoReconstructor();
485
487
488 FairRootManager* ioman = FairRootManager::Instance();
489 if (nullptr == ioman) { Fatal("CbmKresConversionKF::Init", "RootManager not instantised!"); }
490
491 fMcTracks = (TClonesArray*) ioman->GetObject("MCTrack");
492 if (nullptr == fMcTracks) { Fatal("CbmKresConversionKF::Init", "No MCTrack array!"); }
493
494 fStsTracks = (TClonesArray*) ioman->GetObject("StsTrack");
495 if (nullptr == fStsTracks) { Fatal("CbmKresConversionKF::Init", "No StsTrack array!"); }
496
497 fStsTrackMatches = (TClonesArray*) ioman->GetObject("StsTrackMatch");
498 if (nullptr == fStsTrackMatches) { Fatal("CbmKresConversionKF::Init", "No StsTrackMatch array!"); }
499
500 fGlobalTracks = (TClonesArray*) ioman->GetObject("GlobalTrack");
501 if (nullptr == fGlobalTracks) { Fatal("CbmKresConversionKF::Init", "No GlobalTrack array!"); }
502
503 fRichRingMatches = (TClonesArray*) ioman->GetObject("RichRingMatch");
504 if (nullptr == fRichRingMatches) { Fatal("CbmKresConversionKF::Init", "No RichRingMatch array!"); }
505
506 fRichProjections = (TClonesArray*) ioman->GetObject("RichProjection");
507 if (nullptr == fRichProjections) { Fatal("CbmKresConversionKF::Init", "No RichProjection array!"); }
508
509 fRichRings = (TClonesArray*) ioman->GetObject("RichRing");
510 if (nullptr == fRichRings) { Fatal("CbmKresConversionKF::Init", "No RichRing array!"); }
511
512 fRichHits = (TClonesArray*) ioman->GetObject("RichHit");
513 if (nullptr == fRichHits) { Fatal("CbmKresConversionKF::Init", "No RichHit array!"); }
514
516
518 fAnaBG->Init();
519}
520
521
522void CbmKresConversionKF::Exec(int fEventNumKF, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
523{
524 cout << "CbmKresConversionKF, event No. " << fEventNumKF << endl;
525
526 //***** extract all particles from KFParticleFinder
527 vector<KFParticle> particlevector;
528 particlevector = fKFtopo->GetParticles();
529
530 //***** extract from all particles in KFParticleFinder only gammas
531 vector<KFParticle> allgammas;
532 allgammas.clear();
533 for (size_t vv = 0; vv < particlevector.size(); vv++) {
534 if (particlevector[vv].KFParticleBase::GetPDG() == 22) { // particle is gamma
535 if (particlevector[vv].KFParticleBase::NDaughters() != 2) continue; // check - if gamma has two particles
536 allgammas.push_back(particlevector[vv]);
537 }
538 }
539 cout << "number of all gammas from KFParticleFinder before any cuts = " << allgammas.size() << endl;
540
541 //***** sort gammas via number of identified leptons in RICH
542 GammasAll.clear();
543 GammasZero.clear();
544 GammasOne.clear();
545 GammasTwo.clear();
546 GammasOneTwo.clear();
547 GammasAllStsIndex.clear();
548 GammasZeroStsIndex.clear();
549 GammasOneStsIndex.clear();
550 GammasTwoStsIndex.clear();
551 GammasOneTwoStsIndex.clear();
552 GammasAllMC.clear();
553 GammasZeroMC.clear();
554 GammasOneMC.clear();
555 GammasTwoMC.clear();
556 GammasOneTwoMC.clear();
557 GammasAllZ.clear();
558 GammasZeroZ.clear();
559 GammasOneZ.clear();
560 GammasTwoZ.clear();
561 GammasOneTwoZ.clear();
562
563
564 FindGammas(allgammas, particlevector, fEventNumKF, OpeningAngleCut, GammaInvMassCut, RealPID);
565
566
570
575
579
583
588
589
590 if (fEventNumKF % 500 == 0) {
591 MixedEvent();
592 EMT_Event.clear();
593 EMT_pair_momenta.clear();
594 EMT_NofRings.clear();
595 EMT_Z.clear();
596 }
597
598 if (fEventNumKF % 1000 == 0) {
600 EMT_Event_multi_all.clear();
602 EMT_Event_multi_zero.clear();
604 EMT_Event_multi_one.clear();
606 EMT_Event_multi_two.clear();
610 EMT_multi_all.clear();
611 EMT_multi_one.clear();
612 EMT_multi_two.clear();
613 EMT_multi_zero.clear();
614 EMT_multi_onetwo.clear();
615 }
616
617
618 // pi0, which maksym accept
619 vector<vector<KFParticle>> primpi0;
620 primpi0 = fKFtopo->GetKFParticleFinder()->GetPrimaryPi0();
621 vector<KFParticle> primpi0inside;
622 primpi0inside = primpi0.at(0);
623 for (size_t tt = 0; tt < primpi0inside.size(); tt++) {
624 cout << "\t *********** primpi0->GetPt = " << primpi0inside[tt].GetPt()
625 << "; ->GetMass = " << primpi0inside[tt].GetMass() << "; ->GetX = " << primpi0inside[tt].GetX()
626 << "; ->GetY = " << primpi0inside[tt].GetY() << "; ->GetZ = " << primpi0inside[tt].GetZ()
627 << "; ->GetE = " << primpi0inside[tt].GetE() << endl;
628 }
629}
630
631
632void CbmKresConversionKF::FindGammas(vector<KFParticle> allgammas, vector<KFParticle> particlevector, int Event,
633 double AngleCut, double InvMassCut, int RealPID)
634{
635 for (size_t tt = 0; tt < allgammas.size(); tt++) {
636 if (allgammas[tt].GetZ() > 75 || allgammas[tt].GetZ() < -5) continue;
637 std::vector<int> electronIds = allgammas[tt].KFParticleBase::DaughterIds();
638 std::vector<int> grDaughter0 = particlevector[electronIds.at(0)].KFParticleBase::DaughterIds();
639 std::vector<int> grDaughter1 = particlevector[electronIds.at(1)].KFParticleBase::DaughterIds();
640 if (grDaughter0.size() != 1 || grDaughter1.size() != 1) continue; // check that it made only two particles
641
642 // STS ind
643 CbmStsTrack* stsTrack0 = (CbmStsTrack*) fStsTracks->At(grDaughter0.at(0));
644 CbmStsTrack* stsTrack1 = (CbmStsTrack*) fStsTracks->At(grDaughter1.at(0));
645 if (stsTrack0 == nullptr || stsTrack1 == nullptr) continue;
646 CbmTrackMatchNew* stsMatch0 = (CbmTrackMatchNew*) fStsTrackMatches->At(grDaughter0.at(0));
647 CbmTrackMatchNew* stsMatch1 = (CbmTrackMatchNew*) fStsTrackMatches->At(grDaughter1.at(0));
648 if (stsMatch0 == nullptr || stsMatch1 == nullptr) continue;
649 if (stsMatch0->GetNofLinks() <= 0 || stsMatch1->GetNofLinks() <= 0) continue;
650 int stsMcTrackId0 = stsMatch0->GetMatchedLink().GetIndex();
651 int stsMcTrackId1 = stsMatch1->GetMatchedLink().GetIndex();
652 if (stsMcTrackId0 < 0 || stsMcTrackId1 < 0) continue;
653 CbmMCTrack* mcTrack0 = (CbmMCTrack*) fMcTracks->At(stsMcTrackId0);
654 CbmMCTrack* mcTrack1 = (CbmMCTrack*) fMcTracks->At(stsMcTrackId1);
655 if (mcTrack0 == nullptr || mcTrack1 == nullptr) continue;
656
657 TVector3 refmomentum0 =
658 CbmKresFunctions::FitToVertex(stsTrack0, allgammas[tt].GetX(), allgammas[tt].GetY(), allgammas[tt].GetZ());
659 TVector3 refmomentum1 =
660 CbmKresFunctions::FitToVertex(stsTrack1, allgammas[tt].GetX(), allgammas[tt].GetY(), allgammas[tt].GetZ());
661
662 // RICH ind
663 Int_t ngTracks = fGlobalTracks->GetEntriesFast();
664 int richInd0 = 99999;
665 int richInd1 = 99999;
666 for (Int_t iTr = 0; iTr < ngTracks; iTr++) {
667 CbmGlobalTrack* gTrack = (CbmGlobalTrack*) fGlobalTracks->At(iTr);
668 if (nullptr == gTrack) continue;
669 int stsInd = gTrack->GetStsTrackIndex();
670 if (stsInd < 0) continue;
671 if (stsInd == grDaughter0.at(0)) {
672 if (gTrack->GetRichRingIndex() > -1) richInd0 = gTrack->GetRichRingIndex();
673 }
674 if (stsInd == grDaughter1.at(0)) {
675 if (gTrack->GetRichRingIndex() > -1) richInd1 = gTrack->GetRichRingIndex();
676 }
677 }
678
679 int richcheck_0 = 0;
680 int richcheck_1 = 0;
681 //***** MCPID for RICH identification
682 if (RealPID != 1) {
683 if (richInd0 != 99999) {
684 CbmTrackMatchNew* richMatch = (CbmTrackMatchNew*) fRichRingMatches->At(richInd0);
685 if (richMatch == nullptr) continue;
686 if (richMatch->GetNofLinks() <= 0) continue;
687 int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
688 if (richMcTrackId < 0) continue;
689 if (stsMcTrackId0 != richMcTrackId)
690 continue; // check that global track was matched correctly for STS and RICH together
691 CbmMCTrack* mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
692 if (mcTrack2 == nullptr) continue;
693 int pdgRICH = mcTrack2->GetPdgCode();
694 if (TMath::Abs(pdgRICH) == 11) richcheck_0++;
695 }
696 if (richInd1 != 99999) {
697 CbmTrackMatchNew* richMatch = (CbmTrackMatchNew*) fRichRingMatches->At(richInd1);
698 if (richMatch == nullptr) continue;
699 if (richMatch->GetNofLinks() <= 0) continue;
700 int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
701 if (richMcTrackId < 0) continue;
702 if (stsMcTrackId1 != richMcTrackId)
703 continue; // check that global track was matched correctly for STS and RICH together
704 CbmMCTrack* mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
705 if (mcTrack2 == nullptr) continue;
706 int pdgRICH = mcTrack2->GetPdgCode();
707 if (TMath::Abs(pdgRICH) == 11) richcheck_1++;
708 }
709 }
710
711 // Real PID for RICH identification
712 if (RealPID == 1) {
713 if (richInd0 != 99999) {
714 CbmRichRing* richRing = static_cast<CbmRichRing*>(fRichRings->At(richInd0));
715 richcheck_0 = CheckIfElectron(richRing, refmomentum0.Mag());
716 }
717 if (richInd1 != 99999) {
718 CbmRichRing* richRing = static_cast<CbmRichRing*>(fRichRings->At(richInd1));
719 richcheck_1 = CheckIfElectron(richRing, refmomentum1.Mag());
720 }
721 }
722 // Real RICH PID (END).
723
724 int richcheck = richcheck_0 + richcheck_1;
725
726
727 FairTrackParam* proj = (FairTrackParam*) fRichProjections->At(grDaughter0.at(0));
728 if (richcheck_0 == 0 && proj->GetX() > -115 && proj->GetX() < 115
729 && ((proj->GetY() < -120 && proj->GetY() > -200) || (proj->GetY() > 120 && proj->GetY() < 200)))
730 continue;
731 FairTrackParam* proj2 = (FairTrackParam*) fRichProjections->At(grDaughter1.at(0));
732 if (richcheck_1 == 0 && proj2->GetX() > -115 && proj2->GetX() < 115
733 && ((proj2->GetY() < -120 && proj2->GetY() > -200) || (proj2->GetY() > 120 && proj2->GetY() < 200)))
734 continue;
735
736
737 //cout << "=================" << endl;
738 //cout << "FitToVertex part1: px = " << refmomentum0.X() << "; \t py = " << refmomentum0.Y() << "; \t pz = " << refmomentum0.Z() << endl;
739 //cout << "FitToVertex part2: px = " << refmomentum1.X() << "; \t py = " << refmomentum1.Y() << "; \t pz = " << refmomentum1.Z() << endl;
740 //cout << "KFParticle part1: px = " << particlevector[electronIds.at(0)].KFParticleBase::Px() << "; \t py = " << particlevector[electronIds.at(0)].KFParticleBase::Py() << "; \t pz = " << particlevector[electronIds.at(0)].KFParticleBase::Pz() << endl;
741 //cout << "KFParticle part2: px = " << particlevector[electronIds.at(1)].KFParticleBase::Px() << "; \t py = " << particlevector[electronIds.at(1)].KFParticleBase::Py() << "; \t pz = " << particlevector[electronIds.at(1)].KFParticleBase::Pz() << endl;
742 //TVector3 refmomentum0(particlevector[electronIds.at(0)].KFParticleBase::Px(), particlevector[electronIds.at(0)].KFParticleBase::Py(), particlevector[electronIds.at(0)].KFParticleBase::Pz());
743 //TVector3 refmomentum1(particlevector[electronIds.at(1)].KFParticleBase::Px(), particlevector[electronIds.at(1)].KFParticleBase::Py(), particlevector[electronIds.at(1)].KFParticleBase::Pz());
744
745
746 frefmomentum.clear();
747 frefmomentum.push_back(refmomentum0);
748 frefmomentum.push_back(refmomentum1);
749 fmcvector.clear();
750 fmcvector.push_back(mcTrack0);
751 fmcvector.push_back(mcTrack1);
752 fStsInd.clear();
753 fStsInd.push_back(grDaughter0.at(0));
754 fStsInd.push_back(grDaughter1.at(0));
755
756 Double_t invmassTrue = CbmKresFunctions::Invmass_2particles_MC(fmcvector.at(0), fmcvector.at(1));
757 Double_t invmassReco = CbmKresFunctions::Invmass_2particles_RECO(frefmomentum.at(0), frefmomentum.at(1));
758 Double_t opening_angle_mc = CbmKresFunctions::CalculateOpeningAngle_MC(fmcvector.at(0), fmcvector.at(1));
759 Double_t opening_angle_refitted =
761
762
763 // graphs for understanding cuts:
764 CheckForCuts_InvMass_MC->Fill(invmassTrue);
765 CheckForCuts_InvMass_Reco->Fill(invmassReco);
766 CheckForCuts_OA_MC->Fill(opening_angle_mc);
767 CheckForCuts_OA_Reco->Fill(opening_angle_refitted);
768
769
770 if (TMath::Abs(mcTrack0->GetPdgCode()) == 11 && (mcTrack0->GetPdgCode() + mcTrack1->GetPdgCode()) == 0
771 && (mcTrack0->GetMotherId() == mcTrack1->GetMotherId()) && mcTrack0->GetMotherId() != -1) {
772 CbmMCTrack* mcTrackMother = (CbmMCTrack*) fMcTracks->At(mcTrack0->GetMotherId());
773 if (mcTrackMother != nullptr && mcTrackMother->GetPdgCode() == 22
774 && mcTrackMother->GetMotherId() != -1) { // electrons/positrons from gamma
775 CbmMCTrack* mcTrackMotherOfGamma = (CbmMCTrack*) fMcTracks->At(mcTrackMother->GetMotherId()); // pi0
776 if (mcTrackMotherOfGamma->GetPdgCode() == 111) {
777 CheckForCuts_OA_MC_from_one_pi0->Fill(opening_angle_mc);
778 CheckForCuts_OA_Reco_from_one_pi0->Fill(opening_angle_refitted);
779 CheckForCuts_InvMass_MC_from_one_pi0->Fill(invmassTrue);
781 CheckForCuts_z_vs_InvMass_MC_from_one_pi0->Fill(mcTrack0->GetStartZ(), invmassTrue);
782 CheckForCuts_z_vs_OA_MC_from_one_pi0->Fill(mcTrack0->GetStartZ(), opening_angle_mc);
783 CheckForCuts_z_vs_InvMass_Reco_from_one_pi0->Fill(allgammas[tt].GetZ(), invmassReco);
784 CheckForCuts_z_vs_OA_Reco_from_one_pi0->Fill(allgammas[tt].GetZ(), opening_angle_refitted);
785 if (allgammas[tt].GetZ() <= 4) {
787 CheckForCuts_OA_Reco_from_one_pi0_less4cm->Fill(opening_angle_refitted);
788 }
789 if (allgammas[tt].GetZ() <= 21 && allgammas[tt].GetZ() > 4) {
791 CheckForCuts_OA_Reco_from_one_pi0_4cm_21cm->Fill(opening_angle_refitted);
792 }
793 if (allgammas[tt].GetZ() > 21) {
795 CheckForCuts_OA_Reco_from_one_pi0_more21cm->Fill(opening_angle_refitted);
796 }
797 }
798 }
799 }
800
801
802 // cuts
803 if (TMath::Abs(opening_angle_refitted) > AngleCut) continue;
804 if (TMath::Abs(invmassReco) > InvMassCut) continue;
805
806
807 // for event mixing
808 EMT_Event.push_back(Event);
810 EMT_NofRings.push_back(richcheck);
811 EMT_Z.push_back(allgammas[tt].GetZ());
812
813
814 // everything (RICH == 0, RICH == 1, RICH == 2) together
815 if (richcheck == 0 || richcheck == 1 || richcheck == 2) {
816 // for event mixing multi
817 EMT_Event_multi_all.push_back(Event);
819
820 GammasAll.push_back(frefmomentum);
821 GammasAllStsIndex.push_back(fStsInd);
822 GammasAllMC.push_back(fmcvector);
823 GammasAllZ.push_back(allgammas[tt].GetZ());
824
825 fGammaInvMassReco_All->Fill(invmassReco);
826 fGammaOpeningAngleReco_All->Fill(opening_angle_refitted);
827 fPdg_All->Fill(TMath::Abs(mcTrack0->GetPdgCode()));
828 fPdg_All->Fill(TMath::Abs(mcTrack1->GetPdgCode()));
829 fP_reco_All->Fill(refmomentum0.Mag());
830 fP_reco_All->Fill(refmomentum1.Mag());
831 fPt_reco_All->Fill(refmomentum0.Perp());
832 fPt_reco_All->Fill(refmomentum1.Perp());
833 if (allgammas[tt].GetZ() < 4) {
834 fGammaInvMassReco_All_target->Fill(invmassReco);
835 fGammaOpeningAngleReco_All_target->Fill(opening_angle_refitted);
836 }
837 if (allgammas[tt].GetZ() > 4 && allgammas[tt].GetZ() < 21) {
838 fGammaInvMassReco_All_mvd->Fill(invmassReco);
839 fGammaOpeningAngleReco_All_mvd->Fill(opening_angle_refitted);
840 }
841 if (allgammas[tt].GetZ() > 21 && allgammas[tt].GetZ() < 75) {
842 fGammaInvMassReco_All_sts->Fill(invmassReco);
843 fGammaOpeningAngleReco_All_sts->Fill(opening_angle_refitted);
844 }
845 if (allgammas[tt].GetZ() > 4) {
846 fGammaInvMassReco_All_outside->Fill(invmassReco);
847 fGammaOpeningAngleReco_All_outside->Fill(opening_angle_refitted);
848 }
849 }
850
851
852 // only cases, when RICH == 0
853 if (richcheck == 0) {
854 // for event mixing multi
855 EMT_Event_multi_zero.push_back(Event);
857
858 GammasZero.push_back(frefmomentum);
859 GammasZeroStsIndex.push_back(fStsInd);
860 GammasZeroMC.push_back(fmcvector);
861 GammasZeroZ.push_back(allgammas[tt].GetZ());
862
863 fGammaInvMassReco_Zero->Fill(invmassReco);
864 fGammaOpeningAngleReco_Zero->Fill(opening_angle_refitted);
865 fPdg_Zero->Fill(TMath::Abs(mcTrack0->GetPdgCode()));
866 fPdg_Zero->Fill(TMath::Abs(mcTrack1->GetPdgCode()));
867 fP_reco_Zero->Fill(refmomentum0.Mag());
868 fP_reco_Zero->Fill(refmomentum1.Mag());
869 fPt_reco_Zero->Fill(refmomentum0.Perp());
870 fPt_reco_Zero->Fill(refmomentum1.Perp());
871 if (allgammas[tt].GetZ() < 4) {
872 fGammaInvMassReco_Zero_target->Fill(invmassReco);
873 fGammaOpeningAngleReco_Zero_target->Fill(opening_angle_refitted);
874 }
875 if (allgammas[tt].GetZ() > 4 && allgammas[tt].GetZ() < 21) {
876 fGammaInvMassReco_Zero_mvd->Fill(invmassReco);
877 fGammaOpeningAngleReco_Zero_mvd->Fill(opening_angle_refitted);
878 }
879 if (allgammas[tt].GetZ() > 21 && allgammas[tt].GetZ() < 75) {
880 fGammaInvMassReco_Zero_sts->Fill(invmassReco);
881 fGammaOpeningAngleReco_Zero_sts->Fill(opening_angle_refitted);
882 }
883 if (allgammas[tt].GetZ() > 4) {
884 fGammaInvMassReco_Zero_outside->Fill(invmassReco);
885 fGammaOpeningAngleReco_Zero_outside->Fill(opening_angle_refitted);
886 }
887 }
888
889 // only cases, when RICH == 1
890 if (richcheck == 1) {
891 // for event mixing multi
892 EMT_Event_multi_one.push_back(Event);
894
895 GammasOne.push_back(frefmomentum);
896 GammasOneStsIndex.push_back(fStsInd);
897 GammasOneMC.push_back(fmcvector);
898 GammasOneZ.push_back(allgammas[tt].GetZ());
899
900 fGammaInvMassReco_One->Fill(invmassReco);
901 fGammaOpeningAngleReco_One->Fill(opening_angle_refitted);
902 fPdg_One->Fill(TMath::Abs(mcTrack0->GetPdgCode()));
903 fPdg_One->Fill(TMath::Abs(mcTrack1->GetPdgCode()));
904 fP_reco_One->Fill(refmomentum0.Mag());
905 fP_reco_One->Fill(refmomentum1.Mag());
906 fPt_reco_One->Fill(refmomentum0.Perp());
907 fPt_reco_One->Fill(refmomentum1.Perp());
908 if (allgammas[tt].GetZ() < 4) {
909 fGammaInvMassReco_One_target->Fill(invmassReco);
910 fGammaOpeningAngleReco_One_target->Fill(opening_angle_refitted);
911 }
912 if (allgammas[tt].GetZ() > 4 && allgammas[tt].GetZ() < 21) {
913 fGammaInvMassReco_One_mvd->Fill(invmassReco);
914 fGammaOpeningAngleReco_One_mvd->Fill(opening_angle_refitted);
915 }
916 if (allgammas[tt].GetZ() > 21 && allgammas[tt].GetZ() < 75) {
917 fGammaInvMassReco_One_sts->Fill(invmassReco);
918 fGammaOpeningAngleReco_One_sts->Fill(opening_angle_refitted);
919 }
920 if (allgammas[tt].GetZ() > 4) {
921 fGammaInvMassReco_One_outside->Fill(invmassReco);
922 fGammaOpeningAngleReco_One_outside->Fill(opening_angle_refitted);
923 }
924 }
925
926 // only cases, when RICH == 2
927 if (richcheck == 2) {
928 // for event mixing multi
929 EMT_Event_multi_two.push_back(Event);
931
932 GammasTwo.push_back(frefmomentum);
933 GammasTwoStsIndex.push_back(fStsInd);
934 GammasTwoMC.push_back(fmcvector);
935 GammasTwoZ.push_back(allgammas[tt].GetZ());
936
937 fGammaInvMassReco_Two->Fill(invmassReco);
938 fGammaOpeningAngleReco_Two->Fill(opening_angle_refitted);
939 fPdg_Two->Fill(TMath::Abs(mcTrack0->GetPdgCode()));
940 fPdg_Two->Fill(TMath::Abs(mcTrack1->GetPdgCode()));
941 fP_reco_Two->Fill(refmomentum0.Mag());
942 fP_reco_Two->Fill(refmomentum1.Mag());
943 fPt_reco_Two->Fill(refmomentum0.Perp());
944 fPt_reco_Two->Fill(refmomentum1.Perp());
945 if (allgammas[tt].GetZ() < 4) {
946 fGammaInvMassReco_Two_target->Fill(invmassReco);
947 fGammaOpeningAngleReco_Two_target->Fill(opening_angle_refitted);
948 }
949 if (allgammas[tt].GetZ() > 4 && allgammas[tt].GetZ() < 21) {
950 fGammaInvMassReco_Two_mvd->Fill(invmassReco);
951 fGammaOpeningAngleReco_Two_mvd->Fill(opening_angle_refitted);
952 }
953 if (allgammas[tt].GetZ() > 21 && allgammas[tt].GetZ() < 75) {
954 fGammaInvMassReco_Two_sts->Fill(invmassReco);
955 fGammaOpeningAngleReco_Two_sts->Fill(opening_angle_refitted);
956 }
957 if (allgammas[tt].GetZ() > 4) {
958 fGammaInvMassReco_Two_outside->Fill(invmassReco);
959 fGammaOpeningAngleReco_Two_outside->Fill(opening_angle_refitted);
960 }
961 }
962
963 // cases, when RICH == 1 or RICH == 2 together
964 if (richcheck == 1 || richcheck == 2) {
965 // for event mixing multi
966 EMT_Event_multi_onetwo.push_back(Event);
968
969 GammasOneTwo.push_back(frefmomentum);
970 GammasOneTwoStsIndex.push_back(fStsInd);
971 GammasOneTwoMC.push_back(fmcvector);
972 GammasOneTwoZ.push_back(allgammas[tt].GetZ());
973
974 fGammaInvMassReco_OneTwo->Fill(invmassReco);
975 fGammaOpeningAngleReco_OneTwo->Fill(opening_angle_refitted);
976 fPdg_OneTwo->Fill(TMath::Abs(mcTrack0->GetPdgCode()));
977 fPdg_OneTwo->Fill(TMath::Abs(mcTrack1->GetPdgCode()));
978 fP_reco_OneTwo->Fill(refmomentum0.Mag());
979 fP_reco_OneTwo->Fill(refmomentum1.Mag());
980 fPt_reco_OneTwo->Fill(refmomentum0.Perp());
981 fPt_reco_OneTwo->Fill(refmomentum1.Perp());
982 if (allgammas[tt].GetZ() < 4) {
983 fGammaInvMassReco_OneTwo_target->Fill(invmassReco);
984 fGammaOpeningAngleReco_OneTwo_target->Fill(opening_angle_refitted);
985 }
986 if (allgammas[tt].GetZ() > 4 && allgammas[tt].GetZ() < 21) {
987 fGammaInvMassReco_OneTwo_mvd->Fill(invmassReco);
988 fGammaOpeningAngleReco_OneTwo_mvd->Fill(opening_angle_refitted);
989 }
990 if (allgammas[tt].GetZ() > 21 && allgammas[tt].GetZ() < 75) {
991 fGammaInvMassReco_OneTwo_sts->Fill(invmassReco);
992 fGammaOpeningAngleReco_OneTwo_sts->Fill(opening_angle_refitted);
993 }
994 if (allgammas[tt].GetZ() > 4) {
995 fGammaInvMassReco_OneTwo_outside->Fill(invmassReco);
996 fGammaOpeningAngleReco_OneTwo_outside->Fill(opening_angle_refitted);
997 }
998 }
999 }
1000
1001 //cout << "number of gammas with 0-2 electron identified in RICH = " << GammasAll.size() << endl;
1002 //cout << "number of gammas with 0 electron identified in RICH = " << GammasZero.size() << endl;
1003 //cout << "number of gammas with 1 electron identified in RICH = " << GammasOne.size() << endl;
1004 //cout << "number of gammas with 2 electron identified in RICH = " << GammasTwo.size() << endl;
1005 //cout << "number of gammas with 1-2 electron identified in RICH = " << GammasOneTwo.size() << endl;
1006
1007 for (size_t kk = 0; kk < GammasAll.size(); kk++) {
1008 EMT_multi_all.push_back(GammasAll.size());
1009 }
1010 for (size_t kk = 0; kk < GammasZero.size(); kk++) {
1011 EMT_multi_zero.push_back(GammasZero.size());
1012 }
1013 for (size_t kk = 0; kk < GammasOne.size(); kk++) {
1014 EMT_multi_one.push_back(GammasOne.size());
1015 }
1016 for (size_t kk = 0; kk < GammasTwo.size(); kk++) {
1017 EMT_multi_two.push_back(GammasTwo.size());
1018 }
1019 for (size_t kk = 0; kk < GammasOneTwo.size(); kk++) {
1020 EMT_multi_onetwo.push_back(GammasOneTwo.size());
1021 }
1022}
1023
1024
1025void CbmKresConversionKF::FindPi0(TString /*mod*/, vector<vector<TVector3>> Gammas, vector<vector<int>> StsIndex,
1026 vector<vector<CbmMCTrack*>> GammasMC, vector<Double_t> GammasZ,
1027 TH1D* Pi0InvMassRecoKF, TH2D* Pi0_pt_vs_rap, TH2D* Pi0_pt_vs_rap_est,
1028 TH1D* Pi0InvMassRecoKF_target, TH1D* Pi0InvMassRecoKF_mvd, TH1D* Pi0InvMassRecoKF_sts,
1029 TH1D* Pi0InvMassRecoKF_outside, TH2D* MultiplicityGamma,
1030 TH2D* MultiplicityChargedParticles, vector<TH1*> BGCases)
1031
1032{
1033 // combine all gamma in pi0 --> calculate inv mass for pi0 // not the case, when one particle used twice for different gammas
1034 if (Gammas.size() < 2) return; // min 2 gammas to form pi0 are required
1035
1036 for (size_t gamma1 = 0; gamma1 < Gammas.size() - 1; gamma1++) {
1037 for (size_t gamma2 = gamma1 + 1; gamma2 < Gammas.size(); gamma2++) {
1038
1039 if (StsIndex[gamma1][0] == StsIndex[gamma2][0] || StsIndex[gamma1][0] == StsIndex[gamma2][1]
1040 || StsIndex[gamma1][1] == StsIndex[gamma2][0] || StsIndex[gamma1][1] == StsIndex[gamma2][1])
1041 continue; // particles not used twice --> different
1042
1043 // 4 reconstructed particles from gammas
1044 TVector3 e1 = Gammas[gamma1][0];
1045 TVector3 e2 = Gammas[gamma1][1];
1046 TVector3 e3 = Gammas[gamma2][0];
1047 TVector3 e4 = Gammas[gamma2][1];
1048
1049 // MC true data for this particles
1050 CbmMCTrack* mcTrack1 = GammasMC[gamma1][0];
1051 CbmMCTrack* mcTrack2 = GammasMC[gamma1][1];
1052 CbmMCTrack* mcTrack3 = GammasMC[gamma2][0];
1053 CbmMCTrack* mcTrack4 = GammasMC[gamma2][1];
1054
1056
1057 Pi0InvMassRecoKF->Fill(params.fMinv);
1058
1059 MultiplicityGamma->Fill(Gammas.size(), params.fMinv);
1060 MultiplicityChargedParticles->Fill(fGlobalTracks->GetEntriesFast(), params.fMinv);
1061
1062 // check reconsrtucted z position of conversion
1063 if (GammasZ[gamma1] < 4 && GammasZ[gamma2] < 4) { Pi0InvMassRecoKF_target->Fill(params.fMinv); }
1064 if (GammasZ[gamma1] > 4 && GammasZ[gamma1] < 21 && GammasZ[gamma2] > 4 && GammasZ[gamma2] < 21) {
1065 Pi0InvMassRecoKF_mvd->Fill(params.fMinv);
1066 }
1067 if (GammasZ[gamma1] > 21 && GammasZ[gamma1] < 75 && GammasZ[gamma2] > 21 && GammasZ[gamma2] < 75) {
1068 Pi0InvMassRecoKF_sts->Fill(params.fMinv);
1069 }
1070 if (GammasZ[gamma1] > 4 && GammasZ[gamma2] > 4) { Pi0InvMassRecoKF_outside->Fill(params.fMinv); }
1071
1072 fAnaBG->Exec(mcTrack1, mcTrack2, mcTrack3, mcTrack4, params.fMinv, BGCases);
1073
1074 // fill histos with rapidity and Pt for correctly reconstructed pi0(dalitz) and pi0(g+g)
1075 if (nullptr == mcTrack1 || nullptr == mcTrack2 || nullptr == mcTrack3 || nullptr == mcTrack4) continue;
1076 if (TMath::Abs(mcTrack1->GetPdgCode()) != 11 || TMath::Abs(mcTrack2->GetPdgCode()) != 11
1077 || TMath::Abs(mcTrack3->GetPdgCode()) != 11 || TMath::Abs(mcTrack4->GetPdgCode()) != 11)
1078 continue;
1079 if (mcTrack1->GetPdgCode() + mcTrack2->GetPdgCode() != 0) continue;
1080 if (mcTrack3->GetPdgCode() + mcTrack4->GetPdgCode() != 0) continue;
1081 int motherId1 = mcTrack1->GetMotherId();
1082 int motherId2 = mcTrack2->GetMotherId();
1083 int motherId3 = mcTrack3->GetMotherId();
1084 int motherId4 = mcTrack4->GetMotherId();
1085 if (motherId1 == -1 || motherId2 == -1 || motherId3 == -1 || motherId4 == -1) continue;
1086 if (motherId1 != motherId2 || motherId3 != motherId4) continue;
1087 CbmMCTrack* mother1 = (CbmMCTrack*) fMcTracks->At(motherId1);
1088 CbmMCTrack* mother2 = (CbmMCTrack*) fMcTracks->At(motherId2);
1089 CbmMCTrack* mother3 = (CbmMCTrack*) fMcTracks->At(motherId3);
1090 CbmMCTrack* mother4 = (CbmMCTrack*) fMcTracks->At(motherId4);
1091 if (nullptr == mother1 || nullptr == mother2 || nullptr == mother3 || nullptr == mother4) continue;
1092 int mcMotherPdg1 = mother1->GetPdgCode();
1093 int mcMotherPdg2 = mother2->GetPdgCode();
1094 int mcMotherPdg3 = mother3->GetPdgCode();
1095 int mcMotherPdg4 = mother4->GetPdgCode();
1096 int grandmotherId1 = mother1->GetMotherId();
1097 int grandmotherId2 = mother2->GetMotherId();
1098 int grandmotherId3 = mother3->GetMotherId();
1099 int grandmotherId4 = mother4->GetMotherId();
1100
1101 if (mcMotherPdg1 == 22 && mcMotherPdg2 == 22 && mcMotherPdg3 == 111 && mcMotherPdg4 == 111) {
1102 if (grandmotherId1 != motherId3) continue;
1103 Pi0_pt_vs_rap->Fill(params.fRapidity, params.fPt);
1104 Pi0_pt_vs_rap_est->Fill(params.fRapidity, params.fPt);
1105 }
1106
1107 if (mcMotherPdg1 == 111 && mcMotherPdg2 == 111 && mcMotherPdg3 == 22 && mcMotherPdg4 == 22) {
1108 if (grandmotherId3 != motherId1) continue;
1109 Pi0_pt_vs_rap->Fill(params.fRapidity, params.fPt);
1110 Pi0_pt_vs_rap_est->Fill(params.fRapidity, params.fPt);
1111 }
1112
1113 if (mcMotherPdg1 == 22 && mcMotherPdg2 == 22 && mcMotherPdg3 == 22 && mcMotherPdg4 == 22) {
1114 if (grandmotherId1 != grandmotherId2 || grandmotherId3 != grandmotherId4 || grandmotherId1 != grandmotherId3)
1115 continue;
1116 if (grandmotherId1 == -1) continue;
1117 CbmMCTrack* grandmother1 = (CbmMCTrack*) fMcTracks->At(grandmotherId1);
1118 if (nullptr == grandmother1) continue;
1119 int mcGrandMotherPdg1 = grandmother1->GetPdgCode();
1120 if (mcGrandMotherPdg1 != 111) continue;
1121 Pi0_pt_vs_rap->Fill(params.fRapidity, params.fPt);
1122 Pi0_pt_vs_rap_est->Fill(params.fRapidity, params.fPt);
1123 }
1124 }
1125 }
1126}
1127
1128
1130{
1131 int identified = 0;
1132
1133 if (nullptr != ring) {
1134 CbmRichRingLight ringHit;
1135 int nofHits = ring->GetNofHits();
1136 for (int i = 0; i < nofHits; i++) {
1137 Int_t hitInd = ring->GetHit(i);
1138 CbmRichHit* hit = (CbmRichHit*) fRichHits->At(hitInd);
1139 if (nullptr == hit) continue;
1140 CbmRichHitLight hl(hit->GetX(), hit->GetY());
1141 ringHit.AddHit(hl);
1142 }
1143 fTauFit->DoFit(&ringHit);
1144 if (ringHit.GetAaxis() > 4 && ringHit.GetAaxis() < 6 && ringHit.GetBaxis() > 4 && ringHit.GetBaxis() < 6
1145 && momentum > 0.2 && momentum < 4.)
1146 identified++;
1147 //if (ring->GetDistance() < 2 && ringHit.GetAaxis() > 4 && ringHit.GetAaxis() < 6 && ringHit.GetBaxis() > 4 && ringHit.GetBaxis() < 6 && momentum > 0.2 && momentum < 4.) identified ++;
1148 }
1149
1150 return identified;
1151}
1152
1153
1155// combines photons from two different events, taken from each time N events
1156{
1157 Int_t nof = EMT_Event.size();
1158 cout << "MixedEvent CbmKresConversionKF - nof entries " << nof << endl;
1159 for (Int_t a = 0; a < nof - 1; a++) {
1160 for (Int_t b = a + 1; b < nof; b++) {
1161 if (EMT_Event[a] == EMT_Event[b]) continue; // to make sure that the photons are from two different events
1162 TVector3 e11 = EMT_pair_momenta[a][0];
1163 TVector3 e12 = EMT_pair_momenta[a][1];
1164 TVector3 e21 = EMT_pair_momenta[b][0];
1165 TVector3 e22 = EMT_pair_momenta[b][1];
1167
1168 fEMT_InvMass_All->Fill(params.fMinv);
1169 if (EMT_NofRings[a] == 0 && EMT_NofRings[b] == 0) fEMT_InvMass_Zero->Fill(params.fMinv);
1170 if (EMT_NofRings[a] == 1 && EMT_NofRings[b] == 1) fEMT_InvMass_One->Fill(params.fMinv);
1171 if (EMT_NofRings[a] == 2 && EMT_NofRings[b] == 2) fEMT_InvMass_Two->Fill(params.fMinv);
1172 if ((EMT_NofRings[a] == 1 || EMT_NofRings[a] == 2) && (EMT_NofRings[b] == 1 || EMT_NofRings[b] == 2))
1173 fEMT_InvMass_OneTwo->Fill(params.fMinv);
1174
1175 // for inside the targte and outside the target
1176 if (EMT_Z[a] < 4 && EMT_Z[b] < 4) {
1177 fEMT_InvMass_All_target->Fill(params.fMinv);
1178 if (EMT_NofRings[a] == 0 && EMT_NofRings[b] == 0) fEMT_InvMass_Zero_target->Fill(params.fMinv);
1179 if (EMT_NofRings[a] == 1 && EMT_NofRings[b] == 1) fEMT_InvMass_One_target->Fill(params.fMinv);
1180 if (EMT_NofRings[a] == 2 && EMT_NofRings[b] == 2) fEMT_InvMass_Two_target->Fill(params.fMinv);
1181 if ((EMT_NofRings[a] == 1 || EMT_NofRings[a] == 2) && (EMT_NofRings[b] == 1 || EMT_NofRings[b] == 2))
1182 fEMT_InvMass_OneTwo_target->Fill(params.fMinv);
1183 }
1184 if (EMT_Z[a] > 4 && EMT_Z[b] > 4) {
1185 fEMT_InvMass_All_outside->Fill(params.fMinv);
1186 if (EMT_NofRings[a] == 0 && EMT_NofRings[b] == 0) fEMT_InvMass_Zero_outside->Fill(params.fMinv);
1187 if (EMT_NofRings[a] == 1 && EMT_NofRings[b] == 1) fEMT_InvMass_One_outside->Fill(params.fMinv);
1188 if (EMT_NofRings[a] == 2 && EMT_NofRings[b] == 2) fEMT_InvMass_Two_outside->Fill(params.fMinv);
1189 if ((EMT_NofRings[a] == 1 || EMT_NofRings[a] == 2) && (EMT_NofRings[b] == 1 || EMT_NofRings[b] == 2))
1190 fEMT_InvMass_OneTwo_outside->Fill(params.fMinv);
1191 }
1192 }
1193 }
1194}
1195
1196
1198// combines photons from two different events, taken from each time N events
1199{
1200 // all
1201 Int_t nof_all = EMT_Event_multi_all.size();
1202 cout << "MixedEventMulti CbmKresConversionKF - nof entries all " << nof_all << endl;
1203 for (Int_t a = 0; a < nof_all - 1; a++) {
1204 for (Int_t b = a + 1; b < nof_all; b++) {
1206 continue; // to make sure that the photons are from two different events
1207 if (EMT_multi_all[a] != EMT_multi_all[b]) continue; // check same multiplicity
1208 TVector3 e11 = EMT_pair_momenta_multi_all[a][0];
1209 TVector3 e12 = EMT_pair_momenta_multi_all[a][1];
1210 TVector3 e21 = EMT_pair_momenta_multi_all[b][0];
1211 TVector3 e22 = EMT_pair_momenta_multi_all[b][1];
1213
1214 if (EMT_multi_all[a] == 1) EMTMulti_InvMass_All_m1->Fill(params.fMinv);
1215 if (EMT_multi_all[a] == 2) EMTMulti_InvMass_All_m2->Fill(params.fMinv);
1216 if (EMT_multi_all[a] == 3) EMTMulti_InvMass_All_m3->Fill(params.fMinv);
1217 if (EMT_multi_all[a] == 4) EMTMulti_InvMass_All_m4->Fill(params.fMinv);
1218 if (EMT_multi_all[a] == 5) EMTMulti_InvMass_All_m5->Fill(params.fMinv);
1219 if (EMT_multi_all[a] == 6) EMTMulti_InvMass_All_m6->Fill(params.fMinv);
1220 if (EMT_multi_all[a] == 7) EMTMulti_InvMass_All_m7->Fill(params.fMinv);
1221 }
1222 }
1223
1224 // zero
1225 Int_t nof_zero = EMT_Event_multi_zero.size();
1226 cout << "MixedEvent - nof entries zero " << nof_zero << endl;
1227 for (Int_t a = 0; a < nof_zero - 1; a++) {
1228 for (Int_t b = a + 1; b < nof_zero; b++) {
1230 continue; // to make sure that the photons are from two different events
1231 if (EMT_multi_zero[a] != EMT_multi_zero[b]) continue; // check same multiplicity
1232 TVector3 e11 = EMT_pair_momenta_multi_zero[a][0];
1233 TVector3 e12 = EMT_pair_momenta_multi_zero[a][1];
1234 TVector3 e21 = EMT_pair_momenta_multi_zero[b][0];
1235 TVector3 e22 = EMT_pair_momenta_multi_zero[b][1];
1237
1238 if (EMT_multi_zero[a] == 1) EMTMulti_InvMass_Zero_m1->Fill(params.fMinv);
1239 if (EMT_multi_zero[a] == 2) EMTMulti_InvMass_Zero_m2->Fill(params.fMinv);
1240 if (EMT_multi_zero[a] == 3) EMTMulti_InvMass_Zero_m3->Fill(params.fMinv);
1241 if (EMT_multi_zero[a] == 4) EMTMulti_InvMass_Zero_m4->Fill(params.fMinv);
1242 if (EMT_multi_zero[a] == 5) EMTMulti_InvMass_Zero_m5->Fill(params.fMinv);
1243 if (EMT_multi_zero[a] == 6) EMTMulti_InvMass_Zero_m6->Fill(params.fMinv);
1244 if (EMT_multi_zero[a] == 7) EMTMulti_InvMass_Zero_m7->Fill(params.fMinv);
1245 }
1246 }
1247
1248 // one
1249 Int_t nof_one = EMT_Event_multi_one.size();
1250 cout << "MixedEvent - nof entries one " << nof_one << endl;
1251 for (Int_t a = 0; a < nof_one - 1; a++) {
1252 for (Int_t b = a + 1; b < nof_one; b++) {
1254 continue; // to make sure that the photons are from two different events
1255 if (EMT_multi_one[a] != EMT_multi_one[b]) continue; // check same multiplicity
1256 TVector3 e11 = EMT_pair_momenta_multi_one[a][0];
1257 TVector3 e12 = EMT_pair_momenta_multi_one[a][1];
1258 TVector3 e21 = EMT_pair_momenta_multi_one[b][0];
1259 TVector3 e22 = EMT_pair_momenta_multi_one[b][1];
1261
1262 if (EMT_multi_one[a] == 1) EMTMulti_InvMass_One_m1->Fill(params.fMinv);
1263 if (EMT_multi_one[a] == 2) EMTMulti_InvMass_One_m2->Fill(params.fMinv);
1264 if (EMT_multi_one[a] == 3) EMTMulti_InvMass_One_m3->Fill(params.fMinv);
1265 if (EMT_multi_one[a] == 4) EMTMulti_InvMass_One_m4->Fill(params.fMinv);
1266 if (EMT_multi_one[a] == 5) EMTMulti_InvMass_One_m5->Fill(params.fMinv);
1267 if (EMT_multi_one[a] == 6) EMTMulti_InvMass_One_m6->Fill(params.fMinv);
1268 if (EMT_multi_one[a] == 7) EMTMulti_InvMass_One_m7->Fill(params.fMinv);
1269 }
1270 }
1271
1272 // two
1273 Int_t nof_two = EMT_Event_multi_two.size();
1274 cout << "MixedEvent - nof entries two " << nof_two << endl;
1275 for (Int_t a = 0; a < nof_two - 1; a++) {
1276 for (Int_t b = a + 1; b < nof_two; b++) {
1278 continue; // to make sure that the photons are from two different events
1279 if (EMT_multi_two[a] != EMT_multi_two[b]) continue; // check same multiplicity
1280 TVector3 e11 = EMT_pair_momenta_multi_two[a][0];
1281 TVector3 e12 = EMT_pair_momenta_multi_two[a][1];
1282 TVector3 e21 = EMT_pair_momenta_multi_two[b][0];
1283 TVector3 e22 = EMT_pair_momenta_multi_two[b][1];
1285
1286 if (EMT_multi_two[a] == 1) EMTMulti_InvMass_Two_m1->Fill(params.fMinv);
1287 if (EMT_multi_two[a] == 2) EMTMulti_InvMass_Two_m2->Fill(params.fMinv);
1288 if (EMT_multi_two[a] == 3) EMTMulti_InvMass_Two_m3->Fill(params.fMinv);
1289 if (EMT_multi_two[a] == 4) EMTMulti_InvMass_Two_m4->Fill(params.fMinv);
1290 if (EMT_multi_two[a] == 5) EMTMulti_InvMass_Two_m5->Fill(params.fMinv);
1291 if (EMT_multi_two[a] == 6) EMTMulti_InvMass_Two_m6->Fill(params.fMinv);
1292 if (EMT_multi_two[a] == 7) EMTMulti_InvMass_Two_m7->Fill(params.fMinv);
1293 }
1294 }
1295
1296 // onetwo
1297 Int_t nof_onetwo = EMT_Event_multi_onetwo.size();
1298 cout << "MixedEvent - nof entries onetwo " << nof_onetwo << endl;
1299 for (Int_t a = 0; a < nof_onetwo - 1; a++) {
1300 for (Int_t b = a + 1; b < nof_onetwo; b++) {
1302 continue; // to make sure that the photons are from two different events
1303 if (EMT_multi_onetwo[a] != EMT_multi_onetwo[b]) continue; // check same multiplicity
1304 TVector3 e11 = EMT_pair_momenta_multi_onetwo[a][0];
1305 TVector3 e12 = EMT_pair_momenta_multi_onetwo[a][1];
1306 TVector3 e21 = EMT_pair_momenta_multi_onetwo[b][0];
1307 TVector3 e22 = EMT_pair_momenta_multi_onetwo[b][1];
1309
1310 if (EMT_multi_onetwo[a] == 1) EMTMulti_InvMass_OneTwo_m1->Fill(params.fMinv);
1311 if (EMT_multi_onetwo[a] == 2) EMTMulti_InvMass_OneTwo_m2->Fill(params.fMinv);
1312 if (EMT_multi_onetwo[a] == 3) EMTMulti_InvMass_OneTwo_m3->Fill(params.fMinv);
1313 if (EMT_multi_onetwo[a] == 4) EMTMulti_InvMass_OneTwo_m4->Fill(params.fMinv);
1314 if (EMT_multi_onetwo[a] == 5) EMTMulti_InvMass_OneTwo_m5->Fill(params.fMinv);
1315 if (EMT_multi_onetwo[a] == 6) EMTMulti_InvMass_OneTwo_m6->Fill(params.fMinv);
1316 if (EMT_multi_onetwo[a] == 7) EMTMulti_InvMass_OneTwo_m7->Fill(params.fMinv);
1317 }
1318 }
1319}
1320
1321
1323{
1324 gDirectory->mkdir("KF");
1325 gDirectory->cd("KF");
1326
1327
1328 gDirectory->mkdir("CheckCuts");
1329 gDirectory->cd("CheckCuts");
1330 for (UInt_t i = 0; i < fHistoList_CheckForCuts.size(); i++) {
1331 fHistoList_CheckForCuts[i]->Write();
1332 }
1333 gDirectory->cd("..");
1334
1335
1336 gDirectory->mkdir("multiplicity");
1337 gDirectory->cd("multiplicity");
1338 gDirectory->mkdir("All");
1339 gDirectory->cd("All");
1340 for (UInt_t i = 0; i < fHistoList_multiplicity_All.size(); i++) {
1341 fHistoList_multiplicity_All[i]->Write();
1342 }
1343 gDirectory->cd("..");
1344 gDirectory->mkdir("Zero");
1345 gDirectory->cd("Zero");
1346 for (UInt_t i = 0; i < fHistoList_multiplicity_Zero.size(); i++) {
1347 fHistoList_multiplicity_Zero[i]->Write();
1348 }
1349 gDirectory->cd("..");
1350 gDirectory->mkdir("One");
1351 gDirectory->cd("One");
1352 for (UInt_t i = 0; i < fHistoList_multiplicity_One.size(); i++) {
1353 fHistoList_multiplicity_One[i]->Write();
1354 }
1355 gDirectory->cd("..");
1356 gDirectory->mkdir("Two");
1357 gDirectory->cd("Two");
1358 for (UInt_t i = 0; i < fHistoList_multiplicity_Two.size(); i++) {
1359 fHistoList_multiplicity_Two[i]->Write();
1360 }
1361 gDirectory->cd("..");
1362 gDirectory->mkdir("OneTwo");
1363 gDirectory->cd("OneTwo");
1364 for (UInt_t i = 0; i < fHistoList_multiplicity_OneTwo.size(); i++) {
1366 }
1367 gDirectory->cd("..");
1368 for (UInt_t i = 0; i < fHistoList_multiplicity.size(); i++) {
1369 fHistoList_multiplicity[i]->Write();
1370 }
1371 gDirectory->cd("..");
1372
1373
1374 gDirectory->mkdir("BG");
1375 gDirectory->cd("BG");
1376 gDirectory->mkdir("BG_all");
1377 gDirectory->cd("BG_all");
1378 for (UInt_t i = 0; i < fHistoList_bg_all.size(); i++) {
1379 fHistoList_bg_all[i]->Write();
1380 }
1381 gDirectory->cd("..");
1382 gDirectory->mkdir("BG_zero");
1383 gDirectory->cd("BG_zero");
1384 for (UInt_t i = 0; i < fHistoList_bg_zero.size(); i++) {
1385 fHistoList_bg_zero[i]->Write();
1386 }
1387 gDirectory->cd("..");
1388 gDirectory->mkdir("BG_one");
1389 gDirectory->cd("BG_one");
1390 for (UInt_t i = 0; i < fHistoList_bg_one.size(); i++) {
1391 fHistoList_bg_one[i]->Write();
1392 }
1393 gDirectory->cd("..");
1394 gDirectory->mkdir("BG_two");
1395 gDirectory->cd("BG_two");
1396 for (UInt_t i = 0; i < fHistoList_bg_two.size(); i++) {
1397 fHistoList_bg_two[i]->Write();
1398 }
1399 gDirectory->cd("..");
1400 gDirectory->mkdir("BG_onetwo");
1401 gDirectory->cd("BG_onetwo");
1402 for (UInt_t i = 0; i < fHistoList_bg_onetwo.size(); i++) {
1403 fHistoList_bg_onetwo[i]->Write();
1404 }
1405 gDirectory->cd("..");
1406 gDirectory->cd("..");
1407
1408
1409 gDirectory->mkdir("g->All");
1410 gDirectory->cd("g->All");
1411 gDirectory->mkdir("target(<4cm)");
1412 gDirectory->cd("target(<4cm)");
1413 for (UInt_t i = 0; i < fHistoList_All_target.size(); i++) {
1414 fHistoList_All_target[i]->Write();
1415 }
1416 gDirectory->cd("..");
1417 gDirectory->mkdir("mvd(4cm-21cm)");
1418 gDirectory->cd("mvd(4cm-21cm)");
1419 for (UInt_t i = 0; i < fHistoList_All_mvd.size(); i++) {
1420 fHistoList_All_mvd[i]->Write();
1421 }
1422 gDirectory->cd("..");
1423 gDirectory->mkdir("sts(21cm-75cm)");
1424 gDirectory->cd("sts(21cm-75cm)");
1425 for (UInt_t i = 0; i < fHistoList_All_sts.size(); i++) {
1426 fHistoList_All_sts[i]->Write();
1427 }
1428 gDirectory->cd("..");
1429 gDirectory->mkdir("outside the target(>4cm)");
1430 gDirectory->cd("outside the target(>4cm)");
1431 for (UInt_t i = 0; i < fHistoList_All_outside.size(); i++) {
1432 fHistoList_All_outside[i]->Write();
1433 }
1434 gDirectory->cd("..");
1435 for (UInt_t i = 0; i < fHistoList_All.size(); i++) {
1436 fHistoList_All[i]->Write();
1437 }
1438 gDirectory->cd("..");
1439
1440
1441 gDirectory->mkdir("g->Zero");
1442 gDirectory->cd("g->Zero");
1443 gDirectory->mkdir("target(<4cm)");
1444 gDirectory->cd("target(<4cm)");
1445 for (UInt_t i = 0; i < fHistoList_Zero_target.size(); i++) {
1446 fHistoList_Zero_target[i]->Write();
1447 }
1448 gDirectory->cd("..");
1449 gDirectory->mkdir("mvd(4cm-21cm)");
1450 gDirectory->cd("mvd(4cm-21cm)");
1451 for (UInt_t i = 0; i < fHistoList_Zero_mvd.size(); i++) {
1452 fHistoList_Zero_mvd[i]->Write();
1453 }
1454 gDirectory->cd("..");
1455 gDirectory->mkdir("sts(21cm-75cm)");
1456 gDirectory->cd("sts(21cm-75cm)");
1457 for (UInt_t i = 0; i < fHistoList_Zero_sts.size(); i++) {
1458 fHistoList_Zero_sts[i]->Write();
1459 }
1460 gDirectory->cd("..");
1461 gDirectory->mkdir("outside the target(>4cm)");
1462 gDirectory->cd("outside the target(>4cm)");
1463 for (UInt_t i = 0; i < fHistoList_Zero_outside.size(); i++) {
1464 fHistoList_Zero_outside[i]->Write();
1465 }
1466 gDirectory->cd("..");
1467 for (UInt_t i = 0; i < fHistoList_Zero.size(); i++) {
1468 fHistoList_Zero[i]->Write();
1469 }
1470 gDirectory->cd("..");
1471
1472
1473 gDirectory->mkdir("g->One");
1474 gDirectory->cd("g->One");
1475 gDirectory->mkdir("target(<4cm)");
1476 gDirectory->cd("target(<4cm)");
1477 for (UInt_t i = 0; i < fHistoList_One_target.size(); i++) {
1478 fHistoList_One_target[i]->Write();
1479 }
1480 gDirectory->cd("..");
1481 gDirectory->mkdir("mvd(4cm-21cm)");
1482 gDirectory->cd("mvd(4cm-21cm)");
1483 for (UInt_t i = 0; i < fHistoList_One_mvd.size(); i++) {
1484 fHistoList_One_mvd[i]->Write();
1485 }
1486 gDirectory->cd("..");
1487 gDirectory->mkdir("sts(21cm-75cm)");
1488 gDirectory->cd("sts(21cm-75cm)");
1489 for (UInt_t i = 0; i < fHistoList_One_sts.size(); i++) {
1490 fHistoList_One_sts[i]->Write();
1491 }
1492 gDirectory->cd("..");
1493 gDirectory->mkdir("outside the target(>4cm)");
1494 gDirectory->cd("outside the target(>4cm)");
1495 for (UInt_t i = 0; i < fHistoList_One_outside.size(); i++) {
1496 fHistoList_One_outside[i]->Write();
1497 }
1498 gDirectory->cd("..");
1499 for (UInt_t i = 0; i < fHistoList_One.size(); i++) {
1500 fHistoList_One[i]->Write();
1501 }
1502 gDirectory->cd("..");
1503
1504
1505 gDirectory->mkdir("g->Two");
1506 gDirectory->cd("g->Two");
1507 gDirectory->mkdir("target(<4cm)");
1508 gDirectory->cd("target(<4cm)");
1509 for (UInt_t i = 0; i < fHistoList_Two_target.size(); i++) {
1510 fHistoList_Two_target[i]->Write();
1511 }
1512 gDirectory->cd("..");
1513 gDirectory->mkdir("mvd(4cm-21cm)");
1514 gDirectory->cd("mvd(4cm-21cm)");
1515 for (UInt_t i = 0; i < fHistoList_Two_mvd.size(); i++) {
1516 fHistoList_Two_mvd[i]->Write();
1517 }
1518 gDirectory->cd("..");
1519 gDirectory->mkdir("sts(21cm-75cm)");
1520 gDirectory->cd("sts(21cm-75cm)");
1521 for (UInt_t i = 0; i < fHistoList_Two_sts.size(); i++) {
1522 fHistoList_Two_sts[i]->Write();
1523 }
1524 gDirectory->cd("..");
1525 gDirectory->mkdir("outside the target(>4cm)");
1526 gDirectory->cd("outside the target(>4cm)");
1527 for (UInt_t i = 0; i < fHistoList_Two_outside.size(); i++) {
1528 fHistoList_Two_outside[i]->Write();
1529 }
1530 gDirectory->cd("..");
1531 for (UInt_t i = 0; i < fHistoList_Two.size(); i++) {
1532 fHistoList_Two[i]->Write();
1533 }
1534 gDirectory->cd("..");
1535
1536
1537 gDirectory->mkdir("g->OneTwo");
1538 gDirectory->cd("g->OneTwo");
1539 gDirectory->mkdir("target(<4cm)");
1540 gDirectory->cd("target(<4cm)");
1541 for (UInt_t i = 0; i < fHistoList_OneTwo_target.size(); i++) {
1542 fHistoList_OneTwo_target[i]->Write();
1543 }
1544 gDirectory->cd("..");
1545 gDirectory->mkdir("mvd(4cm-21cm)");
1546 gDirectory->cd("mvd(4cm-21cm)");
1547 for (UInt_t i = 0; i < fHistoList_OneTwo_mvd.size(); i++) {
1548 fHistoList_OneTwo_mvd[i]->Write();
1549 }
1550 gDirectory->cd("..");
1551 gDirectory->mkdir("sts(21cm-75cm)");
1552 gDirectory->cd("sts(21cm-75cm)");
1553 for (UInt_t i = 0; i < fHistoList_OneTwo_sts.size(); i++) {
1554 fHistoList_OneTwo_sts[i]->Write();
1555 }
1556 gDirectory->cd("..");
1557 gDirectory->mkdir("outside the target(>4cm)");
1558 gDirectory->cd("outside the target(>4cm)");
1559 for (UInt_t i = 0; i < fHistoList_OneTwo_outside.size(); i++) {
1560 fHistoList_OneTwo_outside[i]->Write();
1561 }
1562 gDirectory->cd("..");
1563 for (UInt_t i = 0; i < fHistoList_OneTwo.size(); i++) {
1564 fHistoList_OneTwo[i]->Write();
1565 }
1566 gDirectory->cd("..");
1567
1568
1569 gDirectory->cd("..");
1570}
1571
1573{
1576 new TH1D("CheckForCuts_InvMass_MC", "CheckForCuts_InvMass_MC; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
1579 new TH1D("CheckForCuts_InvMass_Reco", "CheckForCuts_InvMass_Reco; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
1581 CheckForCuts_OA_MC = new TH1D("CheckForCuts_OA_MC", "CheckForCuts_OA_MC; #theta angle [deg];#", 300, -0.1, 29.9);
1584 new TH1D("CheckForCuts_OA_Reco", "CheckForCuts_OA_Reco; #theta angle [deg];#", 300, -0.1, 29.9);
1587 new TH1D("CheckForCuts_InvMass_MC_from_one_pi0",
1588 "CheckForCuts_InvMass_MC_from_one_pi0; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
1591 new TH1D("CheckForCuts_InvMass_Reco_from_one_pi0",
1592 "CheckForCuts_InvMass_Reco_from_one_pi0; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
1595 new TH1D("CheckForCuts_OA_MC_from_one_pi0", "CheckForCuts_OA_MC_from_one_pi0; angle [deg];#", 300, -0.1, 29.9);
1598 new TH1D("CheckForCuts_OA_Reco_from_one_pi0", "CheckForCuts_OA_Reco_from_one_pi0; angle [deg];#", 300, -0.1, 29.9);
1600 CheckForCuts_z_vs_InvMass_MC_from_one_pi0 = new TH2D("CheckForCuts_z_vs_InvMass_MC_from_one_pi0",
1601 "CheckForCuts_z_vs_InvMass_MC_from_one_pi0; Z [cm]; invariant "
1602 "mass in GeV/c^{2}; Nof",
1603 1000, -1, 99, 310, -0.01, 0.3);
1606 new TH2D("CheckForCuts_z_vs_InvMass_Reco_from_one_pi0",
1607 "CheckForCuts_z_vs_InvMass_Reco_from_one_pi0; Z [cm]; invariant "
1608 "mass in GeV/c^{2}; Nof",
1609 1000, -1, 99, 310, -0.01, 0.3);
1612 new TH2D("CheckForCuts_z_vs_OA_MC_from_one_pi0", "CheckForCuts_z_vs_OA_MC_from_one_pi0; Z [cm]; #theta in deg; Nof",
1613 1000, -1, 99, 300, -0.1, 29.9);
1616 new TH2D("CheckForCuts_z_vs_OA_Reco_from_one_pi0",
1617 "CheckForCuts_z_vs_OA_Reco_from_one_pi0; Z [cm]; #theta in deg; Nof", 1000, -1, 99, 300, -0.1, 29.9);
1620 new TH1D("CheckForCuts_InvMass_Reco_from_one_pi0_less4cm",
1621 "CheckForCuts_InvMass_Reco_from_one_pi0_less4cm; invariant mass "
1622 "in GeV/c^{2};#",
1623 310, -0.01, 0.3);
1626 new TH1D("CheckForCuts_OA_Reco_from_one_pi0_less4cm", "CheckForCuts_OA_Reco_from_one_pi0_less4cm; angle [deg];#",
1627 300, -0.1, 29.9);
1630 new TH1D("CheckForCuts_InvMass_Reco_from_one_pi0_4cm_21cm",
1631 "CheckForCuts_InvMass_Reco_from_one_pi0_4cm_21cm; invariant mass "
1632 "in GeV/c^{2};#",
1633 310, -0.01, 0.3);
1636 new TH1D("CheckForCuts_OA_Reco_from_one_pi0_4cm_21cm", "CheckForCuts_OA_Reco_from_one_pi0_4cm_21cm; angle [deg];#",
1637 300, -0.1, 29.9);
1640 new TH1D("CheckForCuts_InvMass_Reco_from_one_pi0_more21cm",
1641 "CheckForCuts_InvMass_Reco_from_one_pi0_more21cm; invariant mass "
1642 "in GeV/c^{2};#",
1643 310, -0.01, 0.3);
1646 new TH1D("CheckForCuts_OA_Reco_from_one_pi0_more21cm", "CheckForCuts_OA_Reco_from_one_pi0_more21cm; angle [deg];#",
1647 300, -0.1, 29.9);
1649
1650
1651 // 0-2 => All
1653 new TH1D("fGammaInvMassReco_All", "fGammaInvMassReco_All; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1656 new TH1D("fGammaOpeningAngleReco_All", "fGammaOpeningAngleReco_All; angle [deg];#", 200, -0.1, 19.9);
1658 fPdg_All = new TH1D("fPdg_All", "fPdg_All; Id ;#", 800, 0, 400);
1659 fHistoList_All.push_back(fPdg_All);
1660 fP_reco_All = new TH1D("fP_reco_All", "fP_reco_All; P in GeV/c^{2} ;#", 600, 0, 6);
1661 fHistoList_All.push_back(fP_reco_All);
1662 fPt_reco_All = new TH1D("fPt_reco_All", "fPt_reco_All; Pt in GeV/c^{2} ;#", 300, 0, 3);
1663 fHistoList_All.push_back(fPt_reco_All);
1665 new TH1D("fPi0InvMassRecoKF_All", "fPi0InvMassRecoKF_All; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1667 fEMT_InvMass_All = new TH1D("fEMT_InvMass_All", "fEMT_InvMass_All; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1670 new TH2D("fPi0_pt_vs_rap_All", "fPi0_pt_vs_rap_All; rapidity y; p_{t} in GeV/c ", 90, -2., 7., 60, -1., 5.);
1673 new TH2D("fPi0_pt_vs_rap_est_All", "fPi0_pt_vs_rap_est_All; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 10, 0., 4.);
1675 // 0-2 => All target
1677 "fGammaInvMassReco_All_target", "fGammaInvMassReco_All_target; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1680 new TH1D("fGammaOpeningAngleReco_All_target", "fGammaOpeningAngleReco_All_target; angle [deg];#", 200, -0.1, 19.9);
1682 fPi0InvMassRecoKF_All_target = new TH1D("fPi0InvMassRecoKF_All_target",
1683 "fPi0InvMassRecoKF_All_target; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1686 new TH1D("fEMT_InvMass_All_target", "fEMT_InvMass_All_target; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1688 // 0-2 => All mvd
1690 new TH1D("fGammaInvMassReco_All_mvd", "fGammaInvMassReco_All_mvd; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1693 new TH1D("fGammaOpeningAngleReco_All_mvd", "fGammaOpeningAngleReco_All_mvd; angle [deg];#", 200, -0.1, 19.9);
1696 new TH1D("fPi0InvMassRecoKF_All_mvd", "fPi0InvMassRecoKF_All_mvd; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1698 // 0-2 => All sts
1700 new TH1D("fGammaInvMassReco_All_sts", "fGammaInvMassReco_All_sts; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1703 new TH1D("fGammaOpeningAngleReco_All_sts", "fGammaOpeningAngleReco_All_sts; angle [deg];#", 200, -0.1, 19.9);
1706 new TH1D("fPi0InvMassRecoKF_All_sts", "fPi0InvMassRecoKF_All_sts; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1708 // 0-2 => All outside the target (mvd+sts+pipe)
1710 "fGammaInvMassReco_All_outside", "fGammaInvMassReco_All_outside; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1712 fGammaOpeningAngleReco_All_outside = new TH1D("fGammaOpeningAngleReco_All_outside",
1713 "fGammaOpeningAngleReco_All_outside; angle [deg];#", 200, -0.1, 19.9);
1716 "fPi0InvMassRecoKF_All_outside", "fPi0InvMassRecoKF_All_outside; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1719 new TH1D("fEMT_InvMass_All_outside", "fEMT_InvMass_All_outside; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1721
1722
1723 // 0 => Zero
1725 new TH1D("fGammaInvMassReco_Zero", "fGammaInvMassReco_Zero; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1728 new TH1D("fGammaOpeningAngleReco_Zero", "fGammaOpeningAngleReco_Zero; angle [deg];#", 200, -0.1, 19.9);
1730 fPdg_Zero = new TH1D("fPdg_Zero", "fPdg_Zero; Id ;#", 800, 0, 400);
1731 fHistoList_Zero.push_back(fPdg_Zero);
1732 fP_reco_Zero = new TH1D("fP_reco_Zero", "fP_reco_Zero; P in GeV/c^{2} ;#", 600, 0, 6);
1733 fHistoList_Zero.push_back(fP_reco_Zero);
1734 fPt_reco_Zero = new TH1D("fPt_reco_Zero", "fPt_reco_Zero; Pt in GeV/c^{2} ;#", 300, 0, 3);
1735 fHistoList_Zero.push_back(fPt_reco_Zero);
1737 new TH1D("fPi0InvMassRecoKF_Zero", "fPi0InvMassRecoKF_Zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1739 fEMT_InvMass_Zero = new TH1D("fEMT_InvMass_Zero", "fEMT_InvMass_Zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1742 new TH2D("fPi0_pt_vs_rap_Zero", "fPi0_pt_vs_rap_Zero; rapidity y; p_{t} in GeV/c ", 90, -2., 7., 60, -1., 5.);
1745 new TH2D("fPi0_pt_vs_rap_est_Zero", "fPi0_pt_vs_rap_est_Zero; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 10, 0., 4.);
1747 // 0 => Zero target
1749 "fGammaInvMassReco_Zero_target", "fGammaInvMassReco_Zero_target; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1751 fGammaOpeningAngleReco_Zero_target = new TH1D("fGammaOpeningAngleReco_Zero_target",
1752 "fGammaOpeningAngleReco_Zero_target; angle [deg];#", 200, -0.1, 19.9);
1755 "fPi0InvMassRecoKF_Zero_target", "fPi0InvMassRecoKF_Zero_target; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1758 new TH1D("fEMT_InvMass_Zero_target", "fEMT_InvMass_Zero_target; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1760 // 0 => Zero mvd
1761 fGammaInvMassReco_Zero_mvd = new TH1D("fGammaInvMassReco_Zero_mvd",
1762 "fGammaInvMassReco_Zero_mvd; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1765 new TH1D("fGammaOpeningAngleReco_Zero_mvd", "fGammaOpeningAngleReco_Zero_mvd; angle [deg];#", 200, -0.1, 19.9);
1768 new TH1D("fPi0InvMassRecoKF_Zero_mvd", "fPi0InvMassRecoKF_Zero_mvd; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1770 // 0 => Zero sts
1771 fGammaInvMassReco_Zero_sts = new TH1D("fGammaInvMassReco_Zero_sts",
1772 "fGammaInvMassReco_Zero_sts; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1775 new TH1D("fGammaOpeningAngleReco_Zero_sts", "fGammaOpeningAngleReco_Zero_sts; angle [deg];#", 200, -0.1, 19.9);
1778 new TH1D("fPi0InvMassRecoKF_Zero_sts", "fPi0InvMassRecoKF_Zero_sts; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1780 // 0 => Zero outside the target (mvd+sts+pipe)
1782 "fGammaInvMassReco_Zero_outside", "fGammaInvMassReco_Zero_outside; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1784 fGammaOpeningAngleReco_Zero_outside = new TH1D("fGammaOpeningAngleReco_Zero_outside",
1785 "fGammaOpeningAngleReco_Zero_outside; angle [deg];#", 200, -0.1, 19.9);
1788 "fPi0InvMassRecoKF_Zero_outside", "fPi0InvMassRecoKF_Zero_outside; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1791 new TH1D("fEMT_InvMass_Zero_outside", "fEMT_InvMass_Zero_outside; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1793
1794
1795 // 1 => One
1797 new TH1D("fGammaInvMassReco_One", "fGammaInvMassReco_One; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1800 new TH1D("fGammaOpeningAngleReco_One", "fGammaOpeningAngleReco_One; angle [deg];#", 200, -0.1, 19.9);
1802 fPdg_One = new TH1D("fPdg_One", "fPdg_One; Id ;#", 800, 0, 400);
1803 fHistoList_One.push_back(fPdg_One);
1804 fP_reco_One = new TH1D("fP_reco_One", "fP_reco_One; P in GeV/c^{2} ;#", 600, 0, 6);
1805 fHistoList_One.push_back(fP_reco_One);
1806 fPt_reco_One = new TH1D("fPt_reco_One", "fPt_reco_One; Pt in GeV/c^{2} ;#", 300, 0, 3);
1807 fHistoList_One.push_back(fPt_reco_One);
1809 new TH1D("fPi0InvMassRecoKF_One", "fPi0InvMassRecoKF_One; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1811 fEMT_InvMass_One = new TH1D("fEMT_InvMass_One", "fEMT_InvMass_One; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1814 new TH2D("fPi0_pt_vs_rap_One", "fPi0_pt_vs_rap_One; rapidity y; p_{t} in GeV/c ", 90, -2., 7., 60, -1., 5.);
1817 new TH2D("fPi0_pt_vs_rap_est_One", "fPi0_pt_vs_rap_est_One; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 10, 0., 4.);
1819 // 1 => One target
1821 "fGammaInvMassReco_One_target", "fGammaInvMassReco_One_target; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1824 new TH1D("fGammaOpeningAngleReco_One_target", "fGammaOpeningAngleReco_One_target; angle [deg];#", 200, -0.1, 19.9);
1826 fPi0InvMassRecoKF_One_target = new TH1D("fPi0InvMassRecoKF_One_target",
1827 "fPi0InvMassRecoKF_One_target; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1830 new TH1D("fEMT_InvMass_One_target", "fEMT_InvMass_One_target; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1832 // 1 => One mvd
1834 new TH1D("fGammaInvMassReco_One_mvd", "fGammaInvMassReco_One_mvd; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1837 new TH1D("fGammaOpeningAngleReco_One_mvd", "fGammaOpeningAngleReco_One_mvd; angle [deg];#", 200, -0.1, 19.9);
1840 new TH1D("fPi0InvMassRecoKF_One_mvd", "fPi0InvMassRecoKF_One_mvd; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1842 // 1 => One sts
1844 new TH1D("fGammaInvMassReco_One_sts", "fGammaInvMassReco_One_sts; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1847 new TH1D("fGammaOpeningAngleReco_One_sts", "fGammaOpeningAngleReco_One_sts; angle [deg];#", 200, -0.1, 19.9);
1850 new TH1D("fPi0InvMassRecoKF_One_sts", "fPi0InvMassRecoKF_One_sts; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1852 // 1 => One outside the target (mvd+sts+pipe)
1854 "fGammaInvMassReco_One_outside", "fGammaInvMassReco_One_outside; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1856 fGammaOpeningAngleReco_One_outside = new TH1D("fGammaOpeningAngleReco_One_outside",
1857 "fGammaOpeningAngleReco_One_outside; angle [deg];#", 200, -0.1, 19.9);
1860 "fPi0InvMassRecoKF_One_outside", "fPi0InvMassRecoKF_One_outside; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1863 new TH1D("fEMT_InvMass_One_outside", "fEMT_InvMass_One_outside; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1865
1866
1867 // 2 => Two
1869 new TH1D("fGammaInvMassReco_Two", "fGammaInvMassReco_Two; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1872 new TH1D("fGammaOpeningAngleReco_Two", "fGammaOpeningAngleReco_Two; angle [deg];#", 200, -0.1, 19.9);
1874 fPdg_Two = new TH1D("fPdg_Two", "fPdg_Two; Id ;#", 800, 0, 400);
1875 fHistoList_Two.push_back(fPdg_Two);
1876 fP_reco_Two = new TH1D("fP_reco_Two", "fP_reco_Two; P in GeV/c^{2} ;#", 600, 0, 6);
1877 fHistoList_Two.push_back(fP_reco_Two);
1878 fPt_reco_Two = new TH1D("fPt_reco_Two", "fPt_reco_Two; Pt in GeV/c^{2} ;#", 300, 0, 3);
1879 fHistoList_Two.push_back(fPt_reco_Two);
1881 new TH1D("fPi0InvMassRecoKF_Two", "fPi0InvMassRecoKF_Two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1883 fEMT_InvMass_Two = new TH1D("fEMT_InvMass_Two", "fEMT_InvMass_Two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1886 new TH2D("fPi0_pt_vs_rap_Two", "fPi0_pt_vs_rap_Two; rapidity y; p_{t} in GeV/c ", 90, -2., 7., 60, -1., 5.);
1889 new TH2D("fPi0_pt_vs_rap_est_Two", "fPi0_pt_vs_rap_est_Two; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 10, 0., 4.);
1891 // 2 => Two target
1893 "fGammaInvMassReco_Two_target", "fGammaInvMassReco_Two_target; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1896 new TH1D("fGammaOpeningAngleReco_Two_target", "fGammaOpeningAngleReco_Two_target; angle [deg];#", 200, -0.1, 19.9);
1898 fPi0InvMassRecoKF_Two_target = new TH1D("fPi0InvMassRecoKF_Two_target",
1899 "fPi0InvMassRecoKF_Two_target; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1902 new TH1D("fEMT_InvMass_Two_target", "fEMT_InvMass_Two_target; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1904 // 2 => Two mvd
1906 new TH1D("fGammaInvMassReco_Two_mvd", "fGammaInvMassReco_Two_mvd; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1909 new TH1D("fGammaOpeningAngleReco_Two_mvd", "fGammaOpeningAngleReco_Two_mvd; angle [deg];#", 200, -0.1, 19.9);
1912 new TH1D("fPi0InvMassRecoKF_Two_mvd", "fPi0InvMassRecoKF_Two_mvd; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1914 // 2 => Two sts
1916 new TH1D("fGammaInvMassReco_Two_sts", "fGammaInvMassReco_Two_sts; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1919 new TH1D("fGammaOpeningAngleReco_Two_sts", "fGammaOpeningAngleReco_Two_sts; angle [deg];#", 200, -0.1, 19.9);
1922 new TH1D("fPi0InvMassRecoKF_Two_sts", "fPi0InvMassRecoKF_Two_sts; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1924 // 2 => Two outside the target (mvd+sts+pipe)
1926 "fGammaInvMassReco_Two_outside", "fGammaInvMassReco_Two_outside; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1928 fGammaOpeningAngleReco_Two_outside = new TH1D("fGammaOpeningAngleReco_Two_outside",
1929 "fGammaOpeningAngleReco_Two_outside; angle [deg];#", 200, -0.1, 19.9);
1932 "fPi0InvMassRecoKF_Two_outside", "fPi0InvMassRecoKF_Two_outside; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1935 new TH1D("fEMT_InvMass_Two_outside", "fEMT_InvMass_Two_outside; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1937
1938
1939 // 1-2 => OneTwo
1941 new TH1D("fGammaInvMassReco_OneTwo", "fGammaInvMassReco_OneTwo; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1944 new TH1D("fGammaOpeningAngleReco_OneTwo", "fGammaOpeningAngleReco_OneTwo; angle [deg];#", 200, -0.1, 19.9);
1946 fPdg_OneTwo = new TH1D("fPdg_OneTwo", "fPdg_OneTwo; Id ;#", 800, 0, 400);
1947 fHistoList_OneTwo.push_back(fPdg_OneTwo);
1948 fP_reco_OneTwo = new TH1D("fP_reco_OneTwo", "fP_reco_OneTwo; P in GeV/c^{2} ;#", 600, 0, 6);
1950 fPt_reco_OneTwo = new TH1D("fPt_reco_OneTwo", "fPt_reco_OneTwo; Pt in GeV/c^{2} ;#", 300, 0, 3);
1953 new TH1D("fPi0InvMassRecoKF_OneTwo", "fPi0InvMassRecoKF_OneTwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1956 new TH1D("fEMT_InvMass_OneTwo", "fEMT_InvMass_OneTwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1959 new TH2D("fPi0_pt_vs_rap_OneTwo", "fPi0_pt_vs_rap_OneTwo; rapidity y; p_{t} in GeV/c ", 90, -2., 7., 60, -1., 5.);
1961 fPi0_pt_vs_rap_est_OneTwo = new TH2D(
1962 "fPi0_pt_vs_rap_est_OneTwo", "fPi0_pt_vs_rap_est_OneTwo; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 10, 0., 4.);
1964 // 1-2 => OneTwo target
1966 new TH1D("fGammaInvMassReco_OneTwo_target", "fGammaInvMassReco_OneTwo_target; invariant mass in GeV/c^{2};#", 110,
1967 -0.01, 0.1);
1970 "fGammaOpeningAngleReco_OneTwo_target", "fGammaOpeningAngleReco_OneTwo_target; angle [deg];#", 200, -0.1, 19.9);
1973 "fPi0InvMassRecoKF_OneTwo_target", "fPi0InvMassRecoKF_OneTwo_target; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1976 new TH1D("fEMT_InvMass_OneTwo_target", "fEMT_InvMass_OneTwo_target; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1978 // 1-2 => OneTwo mvd
1980 "fGammaInvMassReco_OneTwo_mvd", "fGammaInvMassReco_OneTwo_mvd; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1983 new TH1D("fGammaOpeningAngleReco_OneTwo_mvd", "fGammaOpeningAngleReco_OneTwo_mvd; angle [deg];#", 200, -0.1, 19.9);
1985 fPi0InvMassRecoKF_OneTwo_mvd = new TH1D("fPi0InvMassRecoKF_OneTwo_mvd",
1986 "fPi0InvMassRecoKF_OneTwo_mvd; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1988 // 1-2 => OneTwo sts
1990 "fGammaInvMassReco_OneTwo_sts", "fGammaInvMassReco_OneTwo_sts; invariant mass in GeV/c^{2};#", 110, -0.01, 0.1);
1993 new TH1D("fGammaOpeningAngleReco_OneTwo_sts", "fGammaOpeningAngleReco_OneTwo_sts; angle [deg];#", 200, -0.1, 19.9);
1995 fPi0InvMassRecoKF_OneTwo_sts = new TH1D("fPi0InvMassRecoKF_OneTwo_sts",
1996 "fPi0InvMassRecoKF_OneTwo_sts; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
1998 // 1-2 => OneTwo outside the target (mvd+sts+pipe)
2000 new TH1D("fGammaInvMassReco_OneTwo_outside", "fGammaInvMassReco_OneTwo_outside; invariant mass in GeV/c^{2};#", 110,
2001 -0.01, 0.1);
2004 "fGammaOpeningAngleReco_OneTwo_outside", "fGammaOpeningAngleReco_OneTwo_outside; angle [deg];#", 200, -0.1, 19.9);
2007 new TH1D("fPi0InvMassRecoKF_OneTwo_outside", "fPi0InvMassRecoKF_OneTwo_outside; invariant mass in GeV/c^{2};#",
2008 1000, 0, 2.0);
2011 new TH1D("fEMT_InvMass_OneTwo_outside", "fEMT_InvMass_OneTwo_outside; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2013
2014
2015 // multiplicity plots: How number of gammas change EMT plot and how many gammas we have per event after our cuts
2017 new TH2D("MultiplicityGamma_All", "MultiplicityGamma_All; Nof gammas in event; invariant mass in GeV/c^{2};#", 400,
2018 0, 30, 1000, 0, 2.0);
2020 MultiplicityGamma_Zero = new TH2D("MultiplicityGamma_Zero",
2021 "MultiplicityGamma_Zero; Nof gammas in "
2022 "event; invariant mass in GeV/c^{2};#",
2023 400, 0, 30, 1000, 0, 2.0);
2026 new TH2D("MultiplicityGamma_One", "MultiplicityGamma_One; Nof gammas in event; invariant mass in GeV/c^{2};#", 400,
2027 0, 30, 1000, 0, 2.0);
2030 new TH2D("MultiplicityGamma_Two", "MultiplicityGamma_Two; Nof gammas in event; invariant mass in GeV/c^{2};#", 400,
2031 0, 30, 1000, 0, 2.0);
2033 MultiplicityGamma_OneTwo = new TH2D("MultiplicityGamma_OneTwo",
2034 "MultiplicityGamma_OneTwo; Nof gammas in "
2035 "event; invariant mass in GeV/c^{2};#",
2036 400, 0, 30, 1000, 0, 2.0);
2038
2039 MultiplicityChargedParticles_All = new TH2D("MultiplicityChargedParticles_All",
2040 "MultiplicityChargedParticles_All; Nof charged particles in "
2041 "event; invariant mass in GeV/c^{2};#",
2042 1000, 0, 1000, 1000, 0, 2.0);
2044 MultiplicityChargedParticles_Zero = new TH2D("MultiplicityChargedParticles_Zero",
2045 "MultiplicityChargedParticles_Zero; Nof charged particles in "
2046 "event; invariant mass in GeV/c^{2};#",
2047 1000, 0, 1000, 1000, 0, 2.0);
2049 MultiplicityChargedParticles_One = new TH2D("MultiplicityChargedParticles_One",
2050 "MultiplicityChargedParticles_One; Nof charged particles in "
2051 "event; invariant mass in GeV/c^{2};#",
2052 1000, 0, 1000, 1000, 0, 2.0);
2054 MultiplicityChargedParticles_Two = new TH2D("MultiplicityChargedParticles_Two",
2055 "MultiplicityChargedParticles_Two; Nof charged particles in "
2056 "event; invariant mass in GeV/c^{2};#",
2057 1000, 0, 1000, 1000, 0, 2.0);
2059 MultiplicityChargedParticles_OneTwo = new TH2D("MultiplicityChargedParticles_OneTwo",
2060 "MultiplicityChargedParticles_OneTwo; Nof charged particles in "
2061 "event; invariant mass in GeV/c^{2};#",
2062 1000, 0, 1000, 1000, 0, 2.0);
2064
2065
2066 // Multi EMT
2068 new TH1D("EMTMulti_InvMass_All_m1", "EMTMulti_InvMass_All_m1; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2071 new TH1D("EMTMulti_InvMass_All_m2", "EMTMulti_InvMass_All_m2; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2074 new TH1D("EMTMulti_InvMass_All_m3", "EMTMulti_InvMass_All_m3; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2077 new TH1D("EMTMulti_InvMass_All_m4", "EMTMulti_InvMass_All_m4; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2080 new TH1D("EMTMulti_InvMass_All_m5", "EMTMulti_InvMass_All_m5; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2083 new TH1D("EMTMulti_InvMass_All_m6", "EMTMulti_InvMass_All_m6; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2086 new TH1D("EMTMulti_InvMass_All_m7", "EMTMulti_InvMass_All_m7; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2088
2090 new TH1D("EMTMulti_InvMass_Zero_m1", "EMTMulti_InvMass_Zero_m1; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2093 new TH1D("EMTMulti_InvMass_Zero_m2", "EMTMulti_InvMass_Zero_m2; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2096 new TH1D("EMTMulti_InvMass_Zero_m3", "EMTMulti_InvMass_Zero_m3; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2099 new TH1D("EMTMulti_InvMass_Zero_m4", "EMTMulti_InvMass_Zero_m4; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2102 new TH1D("EMTMulti_InvMass_Zero_m5", "EMTMulti_InvMass_Zero_m5; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2105 new TH1D("EMTMulti_InvMass_Zero_m6", "EMTMulti_InvMass_Zero_m6; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2108 new TH1D("EMTMulti_InvMass_Zero_m7", "EMTMulti_InvMass_Zero_m7; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2110
2112 new TH1D("EMTMulti_InvMass_One_m1", "EMTMulti_InvMass_One_m1; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2115 new TH1D("EMTMulti_InvMass_One_m2", "EMTMulti_InvMass_One_m2; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2118 new TH1D("EMTMulti_InvMass_One_m3", "EMTMulti_InvMass_One_m3; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2121 new TH1D("EMTMulti_InvMass_One_m4", "EMTMulti_InvMass_One_m4; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2124 new TH1D("EMTMulti_InvMass_One_m5", "EMTMulti_InvMass_One_m5; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2127 new TH1D("EMTMulti_InvMass_One_m6", "EMTMulti_InvMass_One_m6; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2130 new TH1D("EMTMulti_InvMass_One_m7", "EMTMulti_InvMass_One_m7; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2132
2134 new TH1D("EMTMulti_InvMass_Two_m1", "EMTMulti_InvMass_Two_m1; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2137 new TH1D("EMTMulti_InvMass_Two_m2", "EMTMulti_InvMass_Two_m2; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2140 new TH1D("EMTMulti_InvMass_Two_m3", "EMTMulti_InvMass_Two_m3; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2143 new TH1D("EMTMulti_InvMass_Two_m4", "EMTMulti_InvMass_Two_m4; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2146 new TH1D("EMTMulti_InvMass_Two_m5", "EMTMulti_InvMass_Two_m5; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2149 new TH1D("EMTMulti_InvMass_Two_m6", "EMTMulti_InvMass_Two_m6; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2152 new TH1D("EMTMulti_InvMass_Two_m7", "EMTMulti_InvMass_Two_m7; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2154
2156 new TH1D("EMTMulti_InvMass_OneTwo_m1", "EMTMulti_InvMass_OneTwo_m1; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2159 new TH1D("EMTMulti_InvMass_OneTwo_m2", "EMTMulti_InvMass_OneTwo_m2; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2162 new TH1D("EMTMulti_InvMass_OneTwo_m3", "EMTMulti_InvMass_OneTwo_m3; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2165 new TH1D("EMTMulti_InvMass_OneTwo_m4", "EMTMulti_InvMass_OneTwo_m4; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2168 new TH1D("EMTMulti_InvMass_OneTwo_m5", "EMTMulti_InvMass_OneTwo_m5; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2171 new TH1D("EMTMulti_InvMass_OneTwo_m6", "EMTMulti_InvMass_OneTwo_m6; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2174 new TH1D("EMTMulti_InvMass_OneTwo_m7", "EMTMulti_InvMass_OneTwo_m7; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2176
2177
2178 // BG cases
2179 //Both all
2180 BG1_all = new TH1D("BG1_all", "BG1_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2181 fHistoList_bg_all.push_back(BG1_all);
2182 BG2_all = new TH1D("BG2_all", "BG2_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2183 fHistoList_bg_all.push_back(BG2_all);
2184 BG3_all = new TH1D("BG3_all", "BG3_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2185 fHistoList_bg_all.push_back(BG3_all);
2186 BG4_all = new TH1D("BG4_all", "BG4_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2187 fHistoList_bg_all.push_back(BG4_all);
2188 BG5_all = new TH1D("BG5_all", "BG5_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2189 fHistoList_bg_all.push_back(BG5_all);
2190 BG6_all = new TH1D("BG6_all", "BG6_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2191 fHistoList_bg_all.push_back(BG6_all);
2192 BG7_all = new TH1D("BG7_all", "BG7_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2193 fHistoList_bg_all.push_back(BG7_all);
2194 BG8_all = new TH1D("BG8_all", "BG8_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2195 fHistoList_bg_all.push_back(BG8_all);
2196 BG9_all = new TH1D("BG9_all", "BG9_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2197 fHistoList_bg_all.push_back(BG9_all);
2198 BG10_all = new TH1D("BG10_all", "BG10_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2199 fHistoList_bg_all.push_back(BG10_all);
2200 PdgCase8_all = new TH1D("PdgCase8_all", "PdgCase8_all; Id ;#", 5000, -2500, 2500);
2202 PdgCase8mothers_all = new TH1D("PdgCase8mothers_all", "PdgCase8mothers_all; Id ;#", 5000, -2500, 2500);
2204 sameMIDcase8_all = new TH1D("sameMIDcase8_all", "sameMIDcase8_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2206 sameGRIDcase8_all = new TH1D("sameGRIDcase8_all", "sameGRIDcase8_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2208 Case1ZYPos_all = new TH2D("Case1ZYPos_all", "Case1ZYPos_all; z[cm]; y[cm]", 400, -1, 200, 200, -50, 50);
2211 new TH1D("sameMIDcase8_mothedPDG_all", "sameMIDcase8_mothedPDG_all; Id ;#", 5000, -2500, 2500);
2214 new TH1D("PdgCase8NonEComeFromTarget_all", "PdgCase8NonEComeFromTarget_all; Id ;#", 5000, -2500, 2500);
2217 new TH1D("PdgCase8NonE_NOT_FromTarget_all", "PdgCase8NonE_NOT_FromTarget_all; Id ;#", 5000, -2500, 2500);
2219 PdgCase8motherNonE_all = new TH1D("PdgCase8motherNonE_all", "PdgCase8motherNonE_all; Id ;#", 5000, -2500, 2500);
2222 new TH1D("Case8ElFromDalitz_all", "Case8ElFromDalitz_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2225 new TH1D("Case8NonElFrom_pn_all", "Case8NonElFrom_pn_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2228 new TH1D("Case8NonElFrom_eta_all", "Case8NonElFrom_eta_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2231 new TH1D("Case8NonElFrom_kaon_all", "Case8NonElFrom_kaon_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2233 sameMIDcase8NonEPdg_all = new TH1D("sameMIDcase8NonEPdg_all", "sameMIDcase8NonEPdg_all; Id ;#", 5000, -2500, 2500);
2236 new TH1D("sameMIDcase8NonEMotherPdg_all", "sameMIDcase8NonEMotherPdg_all; Id ;#", 5000, -2500, 2500);
2238 sameMIDcase8NonEMotherIM_all = new TH1D("sameMIDcase8NonEMotherIM_all",
2239 "sameMIDcase8NonEMotherIM_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2242 new TH1D("sameMIDcase8NonEPdgFromTarget_all", "sameMIDcase8NonEPdgFromTarget_all; Id ;#", 5000, -2500, 2500);
2245 new TH1D("sameMIDcase8NonEComeFromTargetIM_all",
2246 "sameMIDcase8NonEComeFromTargetIM_all; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2248 sameMIDcase8NonEComeFromTargetP_all = new TH1D("sameMIDcase8NonEComeFromTargetP_all",
2249 "sameMIDcase8NonEComeFromTargetP_all; P in GeV/c^{2} ;#", 200, 0, 10);
2252 "sameMIDcase8NonEComeFromTargetPt_all", "sameMIDcase8NonEComeFromTargetPt_all; Pt in GeV/c^{2} ;#", 200, 0, 10);
2254 //Both zero
2255 BG1_zero = new TH1D("BG1_zero", "BG1_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2256 fHistoList_bg_zero.push_back(BG1_zero);
2257 BG2_zero = new TH1D("BG2_zero", "BG2_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2258 fHistoList_bg_zero.push_back(BG2_zero);
2259 BG3_zero = new TH1D("BG3_zero", "BG3_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2260 fHistoList_bg_zero.push_back(BG3_zero);
2261 BG4_zero = new TH1D("BG4_zero", "BG4_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2262 fHistoList_bg_zero.push_back(BG4_zero);
2263 BG5_zero = new TH1D("BG5_zero", "BG5_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2264 fHistoList_bg_zero.push_back(BG5_zero);
2265 BG6_zero = new TH1D("BG6_zero", "BG6_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2266 fHistoList_bg_zero.push_back(BG6_zero);
2267 BG7_zero = new TH1D("BG7_zero", "BG7_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2268 fHistoList_bg_zero.push_back(BG7_zero);
2269 BG8_zero = new TH1D("BG8_zero", "BG8_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2270 fHistoList_bg_zero.push_back(BG8_zero);
2271 BG9_zero = new TH1D("BG9_zero", "BG9_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2272 fHistoList_bg_zero.push_back(BG9_zero);
2273 BG10_zero = new TH1D("BG10_zero", "BG10_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2274 fHistoList_bg_zero.push_back(BG10_zero);
2275 PdgCase8_zero = new TH1D("PdgCase8_zero", "PdgCase8_zero; Id ;#", 5000, -2500, 2500);
2277 PdgCase8mothers_zero = new TH1D("PdgCase8mothers_zero", "PdgCase8mothers_zero; Id ;#", 5000, -2500, 2500);
2279 sameMIDcase8_zero = new TH1D("sameMIDcase8_zero", "sameMIDcase8_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2282 new TH1D("sameGRIDcase8_zero", "sameGRIDcase8_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2284 Case1ZYPos_zero = new TH2D("Case1ZYPos_zero", "Case1ZYPos_zero; z[cm]; y[cm]", 400, -1, 200, 200, -50, 50);
2287 new TH1D("sameMIDcase8_mothedPDG_zero", "sameMIDcase8_mothedPDG_zero; Id ;#", 5000, -2500, 2500);
2290 new TH1D("PdgCase8NonEComeFromTarget_zero", "PdgCase8NonEComeFromTarget_zero; Id ;#", 5000, -2500, 2500);
2293 new TH1D("PdgCase8NonE_NOT_FromTarget_zero", "PdgCase8NonE_NOT_FromTarget_zero; Id ;#", 5000, -2500, 2500);
2295 PdgCase8motherNonE_zero = new TH1D("PdgCase8motherNonE_zero", "PdgCase8motherNonE_zero; Id ;#", 5000, -2500, 2500);
2298 new TH1D("Case8ElFromDalitz_zero", "Case8ElFromDalitz_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2301 new TH1D("Case8NonElFrom_pn_zero", "Case8NonElFrom_pn_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2304 new TH1D("Case8NonElFrom_eta_zero", "Case8NonElFrom_eta_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2307 new TH1D("Case8NonElFrom_kaon_zero", "Case8NonElFrom_kaon_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2309 sameMIDcase8NonEPdg_zero = new TH1D("sameMIDcase8NonEPdg_zero", "sameMIDcase8NonEPdg_zero; Id ;#", 5000, -2500, 2500);
2312 new TH1D("sameMIDcase8NonEMotherPdg_zero", "sameMIDcase8NonEMotherPdg_zero; Id ;#", 5000, -2500, 2500);
2315 "sameMIDcase8NonEMotherIM_zero", "sameMIDcase8NonEMotherIM_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2318 new TH1D("sameMIDcase8NonEPdgFromTarget_zero", "sameMIDcase8NonEPdgFromTarget_zero; Id ;#", 5000, -2500, 2500);
2321 new TH1D("sameMIDcase8NonEComeFromTargetIM_zero",
2322 "sameMIDcase8NonEComeFromTargetIM_zero; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2325 "sameMIDcase8NonEComeFromTargetP_zero", "sameMIDcase8NonEComeFromTargetP_zero; P in GeV/c^{2} ;#", 200, 0, 10);
2328 "sameMIDcase8NonEComeFromTargetPt_zero", "sameMIDcase8NonEComeFromTargetPt_zero; Pt in GeV/c^{2} ;#", 200, 0, 10);
2330 //Both one
2331 BG1_one = new TH1D("BG1_one", "BG1_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2332 fHistoList_bg_one.push_back(BG1_one);
2333 BG2_one = new TH1D("BG2_one", "BG2_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2334 fHistoList_bg_one.push_back(BG2_one);
2335 BG3_one = new TH1D("BG3_one", "BG3_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2336 fHistoList_bg_one.push_back(BG3_one);
2337 BG4_one = new TH1D("BG4_one", "BG4_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2338 fHistoList_bg_one.push_back(BG4_one);
2339 BG5_one = new TH1D("BG5_one", "BG5_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2340 fHistoList_bg_one.push_back(BG5_one);
2341 BG6_one = new TH1D("BG6_one", "BG6_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2342 fHistoList_bg_one.push_back(BG6_one);
2343 BG7_one = new TH1D("BG7_one", "BG7_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2344 fHistoList_bg_one.push_back(BG7_one);
2345 BG8_one = new TH1D("BG8_one", "BG8_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2346 fHistoList_bg_one.push_back(BG8_one);
2347 BG9_one = new TH1D("BG9_one", "BG9_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2348 fHistoList_bg_one.push_back(BG9_one);
2349 BG10_one = new TH1D("BG10_one", "BG10_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2350 fHistoList_bg_one.push_back(BG10_one);
2351 PdgCase8_one = new TH1D("PdgCase8_one", "PdgCase8_one; Id ;#", 5000, -2500, 2500);
2353 PdgCase8mothers_one = new TH1D("PdgCase8mothers_one", "PdgCase8mothers_one; Id ;#", 5000, -2500, 2500);
2355 sameMIDcase8_one = new TH1D("sameMIDcase8_one", "sameMIDcase8_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2357 sameGRIDcase8_one = new TH1D("sameGRIDcase8_one", "sameGRIDcase8_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2359 Case1ZYPos_one = new TH2D("Case1ZYPos_one", "Case1ZYPos_one; z[cm]; y[cm]", 400, -1, 200, 200, -50, 50);
2362 new TH1D("sameMIDcase8_mothedPDG_one", "sameMIDcase8_mothedPDG_one; Id ;#", 5000, -2500, 2500);
2365 new TH1D("PdgCase8NonEComeFromTarget_one", "PdgCase8NonEComeFromTarget_one; Id ;#", 5000, -2500, 2500);
2368 new TH1D("PdgCase8NonE_NOT_FromTarget_one", "PdgCase8NonE_NOT_FromTarget_one; Id ;#", 5000, -2500, 2500);
2370 PdgCase8motherNonE_one = new TH1D("PdgCase8motherNonE_one", "PdgCase8motherNonE_one; Id ;#", 5000, -2500, 2500);
2373 new TH1D("Case8ElFromDalitz_one", "Case8ElFromDalitz_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2376 new TH1D("Case8NonElFrom_pn_one", "Case8NonElFrom_pn_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2379 new TH1D("Case8NonElFrom_eta_one", "Case8NonElFrom_eta_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2382 new TH1D("Case8NonElFrom_kaon_one", "Case8NonElFrom_kaon_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2384 sameMIDcase8NonEPdg_one = new TH1D("sameMIDcase8NonEPdg_one", "sameMIDcase8NonEPdg_one; Id ;#", 5000, -2500, 2500);
2387 new TH1D("sameMIDcase8NonEMotherPdg_one", "sameMIDcase8NonEMotherPdg_one; Id ;#", 5000, -2500, 2500);
2389 sameMIDcase8NonEMotherIM_one = new TH1D("sameMIDcase8NonEMotherIM_one",
2390 "sameMIDcase8NonEMotherIM_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2393 new TH1D("sameMIDcase8NonEPdgFromTarget_one", "sameMIDcase8NonEPdgFromTarget_one; Id ;#", 5000, -2500, 2500);
2396 new TH1D("sameMIDcase8NonEComeFromTargetIM_one",
2397 "sameMIDcase8NonEComeFromTargetIM_one; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2399 sameMIDcase8NonEComeFromTargetP_one = new TH1D("sameMIDcase8NonEComeFromTargetP_one",
2400 "sameMIDcase8NonEComeFromTargetP_one; P in GeV/c^{2} ;#", 200, 0, 10);
2403 "sameMIDcase8NonEComeFromTargetPt_one", "sameMIDcase8NonEComeFromTargetPt_one; Pt in GeV/c^{2} ;#", 200, 0, 10);
2405 //Both two
2406 BG1_two = new TH1D("BG1_two", "BG1_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2407 fHistoList_bg_two.push_back(BG1_two);
2408 BG2_two = new TH1D("BG2_two", "BG2_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2409 fHistoList_bg_two.push_back(BG2_two);
2410 BG3_two = new TH1D("BG3_two", "BG3_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2411 fHistoList_bg_two.push_back(BG3_two);
2412 BG4_two = new TH1D("BG4_two", "BG4_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2413 fHistoList_bg_two.push_back(BG4_two);
2414 BG5_two = new TH1D("BG5_two", "BG5_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2415 fHistoList_bg_two.push_back(BG5_two);
2416 BG6_two = new TH1D("BG6_two", "BG6_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2417 fHistoList_bg_two.push_back(BG6_two);
2418 BG7_two = new TH1D("BG7_two", "BG7_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2419 fHistoList_bg_two.push_back(BG7_two);
2420 BG8_two = new TH1D("BG8_two", "BG8_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2421 fHistoList_bg_two.push_back(BG8_two);
2422 BG9_two = new TH1D("BG9_two", "BG9_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2423 fHistoList_bg_two.push_back(BG9_two);
2424 BG10_two = new TH1D("BG10_two", "BG10_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2425 fHistoList_bg_two.push_back(BG10_two);
2426 PdgCase8_two = new TH1D("PdgCase8_two", "PdgCase8_two; Id ;#", 5000, -2500, 2500);
2428 PdgCase8mothers_two = new TH1D("PdgCase8mothers_two", "PdgCase8mothers_two; Id ;#", 5000, -2500, 2500);
2430 sameMIDcase8_two = new TH1D("sameMIDcase8_two", "sameMIDcase8_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2432 sameGRIDcase8_two = new TH1D("sameGRIDcase8_two", "sameGRIDcase8_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2434 Case1ZYPos_two = new TH2D("Case1ZYPos_two", "Case1ZYPos_two; z[cm]; y[cm]", 400, -1, 200, 200, -50, 50);
2437 new TH1D("sameMIDcase8_mothedPDG_two", "sameMIDcase8_mothedPDG_two; Id ;#", 5000, -2500, 2500);
2440 new TH1D("PdgCase8NonEComeFromTarget_two", "PdgCase8NonEComeFromTarget_two; Id ;#", 5000, -2500, 2500);
2443 new TH1D("PdgCase8NonE_NOT_FromTarget_two", "PdgCase8NonE_NOT_FromTarget_two; Id ;#", 5000, -2500, 2500);
2445 PdgCase8motherNonE_two = new TH1D("PdgCase8motherNonE_two", "PdgCase8motherNonE_two; Id ;#", 5000, -2500, 2500);
2448 new TH1D("Case8ElFromDalitz_two", "Case8ElFromDalitz_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2451 new TH1D("Case8NonElFrom_pn_two", "Case8NonElFrom_pn_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2454 new TH1D("Case8NonElFrom_eta_two", "Case8NonElFrom_eta_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2457 new TH1D("Case8NonElFrom_kaon_two", "Case8NonElFrom_kaon_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2459 sameMIDcase8NonEPdg_two = new TH1D("sameMIDcase8NonEPdg_two", "sameMIDcase8NonEPdg_two; Id ;#", 5000, -2500, 2500);
2462 new TH1D("sameMIDcase8NonEMotherPdg_two", "sameMIDcase8NonEMotherPdg_two; Id ;#", 5000, -2500, 2500);
2464 sameMIDcase8NonEMotherIM_two = new TH1D("sameMIDcase8NonEMotherIM_two",
2465 "sameMIDcase8NonEMotherIM_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2468 new TH1D("sameMIDcase8NonEPdgFromTarget_two", "sameMIDcase8NonEPdgFromTarget_two; Id ;#", 5000, -2500, 2500);
2471 new TH1D("sameMIDcase8NonEComeFromTargetIM_two",
2472 "sameMIDcase8NonEComeFromTargetIM_two; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2474 sameMIDcase8NonEComeFromTargetP_two = new TH1D("sameMIDcase8NonEComeFromTargetP_two",
2475 "sameMIDcase8NonEComeFromTargetP_two; P in GeV/c^{2} ;#", 200, 0, 10);
2478 "sameMIDcase8NonEComeFromTargetPt_two", "sameMIDcase8NonEComeFromTargetPt_two; Pt in GeV/c^{2} ;#", 200, 0, 10);
2480 //Both onetwo
2481 BG1_onetwo = new TH1D("BG1_onetwo", "BG1_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2483 BG2_onetwo = new TH1D("BG2_onetwo", "BG2_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2485 BG3_onetwo = new TH1D("BG3_onetwo", "BG3_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2487 BG4_onetwo = new TH1D("BG4_onetwo", "BG4_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2489 BG5_onetwo = new TH1D("BG5_onetwo", "BG5_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2491 BG6_onetwo = new TH1D("BG6_onetwo", "BG6_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2493 BG7_onetwo = new TH1D("BG7_onetwo", "BG7_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2495 BG8_onetwo = new TH1D("BG8_onetwo", "BG8_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2497 BG9_onetwo = new TH1D("BG9_onetwo", "BG9_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2499 BG10_onetwo = new TH1D("BG10_onetwo", "BG10_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2501 PdgCase8_onetwo = new TH1D("PdgCase8_onetwo", "PdgCase8_onetwo; Id ;#", 5000, -2500, 2500);
2503 PdgCase8mothers_onetwo = new TH1D("PdgCase8mothers_onetwo", "PdgCase8mothers_onetwo; Id ;#", 5000, -2500, 2500);
2506 new TH1D("sameMIDcase8_onetwo", "sameMIDcase8_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2509 new TH1D("sameGRIDcase8_onetwo", "sameGRIDcase8_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2511 Case1ZYPos_onetwo = new TH2D("Case1ZYPos_onetwo", "Case1ZYPos_onetwo; z[cm]; y[cm]", 400, -1, 200, 200, -50, 50);
2514 new TH1D("sameMIDcase8_mothedPDG_onetwo", "sameMIDcase8_mothedPDG_onetwo; Id ;#", 5000, -2500, 2500);
2517 new TH1D("PdgCase8NonEComeFromTarget_onetwo", "PdgCase8NonEComeFromTarget_onetwo; Id ;#", 5000, -2500, 2500);
2520 new TH1D("PdgCase8NonE_NOT_FromTarget_onetwo", "PdgCase8NonE_NOT_FromTarget_onetwo; Id ;#", 5000, -2500, 2500);
2523 new TH1D("PdgCase8motherNonE_onetwo", "PdgCase8motherNonE_onetwo; Id ;#", 5000, -2500, 2500);
2526 new TH1D("Case8ElFromDalitz_onetwo", "Case8ElFromDalitz_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2529 new TH1D("Case8NonElFrom_pn_onetwo", "Case8NonElFrom_pn_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2532 new TH1D("Case8NonElFrom_eta_onetwo", "Case8NonElFrom_eta_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2535 new TH1D("Case8NonElFrom_kaon_onetwo", "Case8NonElFrom_kaon_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2538 new TH1D("sameMIDcase8NonEPdg_onetwo", "sameMIDcase8NonEPdg_onetwo; Id ;#", 5000, -2500, 2500);
2541 new TH1D("sameMIDcase8NonEMotherPdg_onetwo", "sameMIDcase8NonEMotherPdg_onetwo; Id ;#", 5000, -2500, 2500);
2544 "sameMIDcase8NonEMotherIM_onetwo", "sameMIDcase8NonEMotherIM_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2547 new TH1D("sameMIDcase8NonEPdgFromTarget_onetwo", "sameMIDcase8NonEPdgFromTarget_onetwo; Id ;#", 5000, -2500, 2500);
2550 new TH1D("sameMIDcase8NonEComeFromTargetIM_onetwo",
2551 "sameMIDcase8NonEComeFromTargetIM_onetwo; invariant mass in GeV/c^{2};#", 1000, 0, 2.0);
2554 "sameMIDcase8NonEComeFromTargetP_onetwo", "sameMIDcase8NonEComeFromTargetP_onetwo; P in GeV/c^{2} ;#", 200, 0, 10);
2557 new TH1D("sameMIDcase8NonEComeFromTargetPt_onetwo", "sameMIDcase8NonEComeFromTargetPt_onetwo; Pt in GeV/c^{2} ;#",
2558 200, 0, 10);
2560}
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Data class for STS tracks.
int Int_t
int32_t GetStsTrackIndex() const
int32_t GetRichRingIndex() const
std::vector< Double_t > EMT_Z
vector< TH1 * > fHistoList_All_outside
vector< TH1 * > fHistoList_Two_outside
std::vector< int > EMT_Event_multi_two
vector< TH1 * > fHistoList_One_mvd
std::vector< int > EMT_Event_multi_one
std::vector< std::vector< TVector3 > > GammasZero
vector< TH1 * > fHistoList_multiplicity_All
std::vector< std::vector< TVector3 > > EMT_pair_momenta_multi_zero
std::vector< std::vector< TVector3 > > EMT_pair_momenta_multi_all
std::vector< int > EMT_Event
TClonesArray * fRichProjections
std::vector< std::vector< int > > GammasOneTwoStsIndex
TH2D * CheckForCuts_z_vs_OA_Reco_from_one_pi0
TH1D * CheckForCuts_OA_Reco_from_one_pi0_4cm_21cm
std::vector< std::vector< int > > GammasAllStsIndex
std::vector< std::vector< TVector3 > > GammasAll
vector< TH1 * > fHistoList_multiplicity_One
std::vector< std::vector< TVector3 > > GammasOne
std::vector< Double_t > GammasZeroZ
vector< TH1 * > fHistoList_OneTwo_mvd
TClonesArray * fRichRingMatches
void SetKF(CbmKFParticleFinder *kfparticle, CbmKFParticleFinderQa *kfparticleQA)
std::vector< std::vector< CbmMCTrack * > > GammasTwoMC
TClonesArray * fGlobalTracks
vector< TH1 * > fHistoList_One_sts
vector< TH1 * > fHistoList_Two_sts
vector< TH1 * > fHistoList_multiplicity_Two
vector< TH1 * > fHistoList_Zero_mvd
vector< TH1 * > fHistoList_All
TH1D * CheckForCuts_InvMass_Reco_from_one_pi0
vector< TH1 * > fHistoList_bg_two
std::vector< int > EMT_multi_onetwo
vector< TH1 * > fHistoList_OneTwo_outside
std::vector< Double_t > GammasAllZ
vector< TH1 * > fHistoList_Zero
vector< TH1 * > fHistoList_OneTwo
std::vector< int > EMT_Event_multi_onetwo
std::vector< int > EMT_multi_one
std::vector< int > fStsInd
std::vector< std::vector< TVector3 > > GammasTwo
TH2D * CheckForCuts_z_vs_InvMass_MC_from_one_pi0
vector< TH1 * > fHistoList_bg_one
vector< TH1 * > fHistoList_Two_target
std::vector< std::vector< int > > GammasOneStsIndex
vector< TH1 * > fHistoList_OneTwo_sts
int CheckIfElectron(CbmRichRing *ring, double momentum)
vector< TH1 * > fHistoList_Zero_outside
std::vector< int > EMT_multi_two
std::vector< int > EMT_NofRings
std::vector< std::vector< TVector3 > > EMT_pair_momenta_multi_one
vector< TH1 * > fHistoList_All_target
TH1D * CheckForCuts_InvMass_Reco_from_one_pi0_less4cm
vector< TH1 * > fHistoList_Zero_sts
CbmKFParticleFinderQa * fKFparticleFinderQA
std::vector< CbmMCTrack * > fmcvector
vector< TH1 * > fHistoList_multiplicity_Zero
std::vector< std::vector< CbmMCTrack * > > GammasOneMC
std::vector< int > EMT_multi_all
vector< TH1 * > fHistoList_bg_onetwo
vector< TH1 * > fHistoList_bg_all
std::vector< std::vector< TVector3 > > EMT_pair_momenta
vector< TH1 * > fHistoList_One_outside
TH1D * CheckForCuts_InvMass_Reco_from_one_pi0_more21cm
CbmRichRingFitterEllipseTau * fTauFit
CbmKresConversionBG * fAnaBG
std::vector< int > EMT_multi_zero
std::vector< std::vector< int > > GammasZeroStsIndex
std::vector< std::vector< CbmMCTrack * > > GammasAllMC
std::vector< int > EMT_Event_multi_all
vector< TH1 * > fHistoList_All_mvd
TClonesArray * fStsTrackMatches
std::vector< std::vector< int > > GammasTwoStsIndex
void FindGammas(vector< KFParticle > allgammas, vector< KFParticle > particlevector, int Event, double AngleCut, double InvMassCut, int RealPID)
std::vector< std::vector< TVector3 > > GammasOneTwo
std::vector< Double_t > GammasOneTwoZ
std::vector< std::vector< TVector3 > > EMT_pair_momenta_multi_two
void FindPi0(TString mod, vector< vector< TVector3 > > Gammas, vector< vector< int > > StsIndex, vector< vector< CbmMCTrack * > > GammasMC, vector< Double_t > GammasZ, TH1D *Pi0InvMassRecoKF, TH2D *Pi0_pt_vs_rap, TH2D *Pi0_pt_vs_rap_est, TH1D *Pi0InvMassRecoKF_target, TH1D *Pi0InvMassRecoKF_mvd, TH1D *Pi0InvMassRecoKF_sts, TH1D *Pi0InvMassRecoKF_outside, TH2D *MultiplicityGamma, TH2D *MultiplicityChargedParticles, vector< TH1 * > BGCases)
vector< TH1 * > fHistoList_bg_zero
vector< TH1 * > fHistoList_CheckForCuts
CbmKFParticleFinder * fKFparticle
vector< TH1 * > fHistoList_multiplicity
TH2D * CheckForCuts_z_vs_InvMass_Reco_from_one_pi0
TH1D * sameMIDcase8NonEComeFromTargetIM_onetwo
vector< TH1 * > fHistoList_Zero_target
vector< TH1 * > fHistoList_Two_mvd
std::vector< std::vector< CbmMCTrack * > > GammasZeroMC
vector< TH1 * > fHistoList_All_sts
const KFParticleTopoReconstructor * fKFtopo
std::vector< std::vector< TVector3 > > EMT_pair_momenta_multi_onetwo
TH1D * sameMIDcase8NonEComeFromTargetPt_onetwo
TH1D * sameMIDcase8NonEComeFromTargetP_onetwo
std::vector< std::vector< CbmMCTrack * > > GammasOneTwoMC
std::vector< Double_t > GammasTwoZ
TH1D * CheckForCuts_OA_Reco_from_one_pi0_less4cm
TH1D * CheckForCuts_InvMass_Reco_from_one_pi0_4cm_21cm
TH1D * CheckForCuts_OA_Reco_from_one_pi0_more21cm
std::vector< TVector3 > frefmomentum
vector< TH1 * > fHistoList_Two
void Exec(int fEventNumKF, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
vector< TH1 * > fHistoList_multiplicity_OneTwo
std::vector< int > EMT_Event_multi_zero
vector< TH1 * > fHistoList_One_target
std::vector< Double_t > GammasOneZ
vector< TH1 * > fHistoList_OneTwo_target
vector< TH1 * > fHistoList_One
static Double_t CalculateOpeningAngle_Reco(TVector3 electron1, TVector3 electron2)
static double Invmass_2particles_MC(const CbmMCTrack *mctrack1, const CbmMCTrack *mctrack2)
static Double_t CalculateOpeningAngle_MC(CbmMCTrack *mctrack1, CbmMCTrack *mctrack2)
static LmvmKinePar CalculateKinematicParams_4particles(const TVector3 part1, const TVector3 part2, const TVector3 part3, const TVector3 part4)
static double Invmass_2particles_RECO(const TVector3 part1, const TVector3 part2)
static TVector3 FitToVertex(CbmStsTrack *stsTrack, double x, double y, double z)
double GetStartZ() const
Definition CbmMCTrack.h:74
int32_t GetMotherId() const
Definition CbmMCTrack.h:68
int32_t GetPdgCode() const
Definition CbmMCTrack.h:67
int32_t GetNofLinks() const
Definition CbmMatch.h:42
const CbmLink & GetMatchedLink() const
Definition CbmMatch.h:41
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.
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
Double_t fMinv
Definition LmvmKinePar.h:20
Double_t fPt
Definition LmvmKinePar.h:18
Double_t fRapidity
Definition LmvmKinePar.h:19
Hash for CbmL1LinkKey.