CbmRoot
Loading...
Searching...
No Matches
CbmKresConversionCorrectedPhotons.cxx
Go to the documentation of this file.
1/* Copyright (C) 2018-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Ievgenii Kres, Florian Uhlig [committer] */
4
20
22
23#include "CbmGlobalTrack.h"
25#include "CbmKresConversionBG.h"
26#include "CbmKresFunctions.h"
27#include "CbmMCTrack.h"
28#include "CbmMvdHit.h"
29#include "CbmRichHit.h"
30#include "CbmRichRing.h"
31#include "CbmRichRingLight.h"
32#include "CbmRichUtil.h"
33#include "CbmStsHit.h"
34#include "CbmStsTrack.h"
35#include "CbmTrackMatchNew.h"
36#include "FairRootManager.h"
37#include "KFParticle/KFParticle.h"
38
39#include <iostream>
40
41using namespace std;
42
44 : fTrainPhotons(nullptr)
46 , fAnnPhotonsSelection(nullptr)
47 , UseAnnPhotons(0)
48 , fGammaCorrection(nullptr)
49 , UseCorrection(0)
50 , corr_all()
51 , corr_two()
52 , corr_onetwo()
53 , thresholdweight(0.)
54 , fMcTracks(nullptr)
55 , fGlobalTracks(nullptr)
56 , fStsTracks(nullptr)
57 , fStsTrackMatches(nullptr)
58 , fRichProjections(nullptr)
59 , fRichRings(nullptr)
60 , fRichRingMatches(nullptr)
61 , fRichHits(nullptr)
62 , fArrayMvdHit(nullptr)
63 , fArrayStsHit(nullptr)
64 , fPrimVertex(nullptr)
65 , fKFVertex()
66 , fTauFit(nullptr)
122 , CMother_PDG_Target(nullptr)
123 , CGrandMother_PDG_Target(nullptr)
125 , CMother_PDG_Outside(nullptr)
126 , CGrandMother_PDG_Outside(nullptr)
128 , CPdg_vs_Distance_for_dp(nullptr)
129 , CP_vs_Distance_for_dp(nullptr)
130 , CDP_AnnTruePairs(nullptr)
131 , CDP_AnnFalsePairs(nullptr)
136 , CDP_InvMass_vs_OA_Both(nullptr)
138 , CDP_InvMass_Both(nullptr)
139 , CDP_candidates_OA_Both(nullptr)
140 , CDP_OA_Both(nullptr)
147 , CDP_InvMass_vs_OA_Target(nullptr)
149 , CDP_InvMass_Target(nullptr)
150 , CDP_candidates_OA_Target(nullptr)
151 , CDP_OA_Target(nullptr)
160 , CDP_InvMass_Outside(nullptr)
162 , CDP_OA_Outside(nullptr)
170 , CDP_Pdg_all_Target(nullptr)
171 , CDP_P_reco_all_Target(nullptr)
172 , CDP_Pt_reco_all_Target(nullptr)
187 , CDP_Pdg_two_Target(nullptr)
188 , CDP_P_reco_two_Target(nullptr)
189 , CDP_Pt_reco_two_Target(nullptr)
204 , CDP_Pdg_onetwo_Target(nullptr)
205 , CDP_P_reco_onetwo_Target(nullptr)
221 , CDP_Pdg_all_Outside(nullptr)
222 , CDP_P_reco_all_Outside(nullptr)
223 , CDP_Pt_reco_all_Outside(nullptr)
238 , CDP_Pdg_two_Outside(nullptr)
239 , CDP_P_reco_two_Outside(nullptr)
240 , CDP_Pt_reco_two_Outside(nullptr)
255 , CDP_Pdg_onetwo_Outside(nullptr)
270 , CDP_InvMassReco_all_Both(nullptr)
272 , CDP_Pdg_all_Both(nullptr)
273 , CDP_P_reco_all_Both(nullptr)
274 , CDP_Pt_reco_all_Both(nullptr)
287 , CDP_InvMassReco_two_Both(nullptr)
289 , CDP_Pdg_two_Both(nullptr)
290 , CDP_P_reco_two_Both(nullptr)
291 , CDP_Pt_reco_two_Both(nullptr)
306 , CDP_Pdg_onetwo_Both(nullptr)
307 , CDP_P_reco_onetwo_Both(nullptr)
308 , CDP_Pt_reco_onetwo_Both(nullptr)
320 , CDP_EMT_Pt_all_Target(nullptr)
321 , CDP_EMT_Pt_two_Target(nullptr)
322 , CDP_EMT_Pt_onetwo_Target(nullptr)
323 , CDP_EMT_Pt_all_Outside(nullptr)
324 , CDP_EMT_Pt_two_Outside(nullptr)
326 , CDP_EMT_Pt_all_Both(nullptr)
327 , CDP_EMT_Pt_two_Both(nullptr)
328 , CDP_EMT_Pt_onetwo_Both(nullptr)
329 , CDP_LK_EMT_Pt_all_Target(nullptr)
330 , CDP_LK_EMT_Pt_two_Target(nullptr)
335 , CDP_LK_EMT_Pt_all_Both(nullptr)
336 , CDP_LK_EMT_Pt_two_Both(nullptr)
338{
339}
340
342
344{
345 FairRootManager* ioman = FairRootManager::Instance();
346 if (nullptr == ioman) { Fatal("CbmKresConversionCorrectedPhotons::Init", "RootManager not instantised!"); }
347
348 fMcTracks = (TClonesArray*) ioman->GetObject("MCTrack");
349 if (nullptr == fMcTracks) { Fatal("CbmKresConversionCorrectedPhotons::Init", "No MCTrack array!"); }
350
351 fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex."));
352 if (nullptr == fPrimVertex) { fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex")); }
353 if (nullptr == fPrimVertex) { LOG(fatal) << "CbmKresConversionCorrectedPhotons::Init No PrimaryVertex array!"; }
354
355 fGlobalTracks = (TClonesArray*) ioman->GetObject("GlobalTrack");
356 if (nullptr == fGlobalTracks) { Fatal("CbmKresConversionCorrectedPhotons::Init", "No GlobalTrack array!"); }
357
358 fStsTracks = (TClonesArray*) ioman->GetObject("StsTrack");
359 if (nullptr == fStsTracks) { Fatal("CbmKresConversionCorrectedPhotons::Init", "No StsTrack array!"); }
360
361 fStsTrackMatches = (TClonesArray*) ioman->GetObject("StsTrackMatch");
362 if (nullptr == fStsTrackMatches) { Fatal("CbmKresConversionCorrectedPhotons::Init", "No StsTrackMatch array!"); }
363
364 fRichProjections = (TClonesArray*) ioman->GetObject("RichProjection");
365 if (nullptr == fRichProjections) { Fatal("CbmKresConversionCorrectedPhotons::Init", "No RichProjection array!"); }
366
367 fRichRings = (TClonesArray*) ioman->GetObject("RichRing");
368 if (nullptr == fRichRings) { Fatal("CbmKresConversionCorrectedPhotons::Init", "No RichRing array!"); }
369
370 fRichRingMatches = (TClonesArray*) ioman->GetObject("RichRingMatch");
371 if (nullptr == fRichRingMatches) { Fatal("CbmKresConversionCorrectedPhotons::Init", "No RichRingMatch array!"); }
372
373 fRichHits = (TClonesArray*) ioman->GetObject("RichHit");
374 if (nullptr == fRichHits) { Fatal("CbmKresConversionCorrectedPhotons::Init", "No RichHit array!"); }
375
376 fArrayMvdHit = (TClonesArray*) ioman->GetObject("MvdHit");
377 if (nullptr == fArrayMvdHit) { Fatal("CbmKresConversionCorrectedPhotons::Init", "No MvdHit array!"); }
378
379 fArrayStsHit = (TClonesArray*) ioman->GetObject("StsHit");
380 if (nullptr == fArrayStsHit) { Fatal("CbmKresConversionCorrectedPhotons::Init", "No StsHit array!"); }
381
382
384
386
387 thresholdweight = 500;
388
389 UseCorrection = 1;
390 AnnTrainPhotons = 0;
391
393
394 if (AnnTrainPhotons == 1) {
396 fTrainPhotons->Init();
397 cout << endl;
398 cout << "\t *** CbmKresTrainAnnDirectPhotons ==> is "
399 "activated"
400 << endl;
401 }
402
403
404 if (UseAnnPhotons == 1) {
406 fAnnPhotonsSelection->Init();
407 cout << endl;
408 cout << "\t *** CbmKresSelectAnnPhotons ==> is "
409 "activated"
410 << endl;
411 }
412
413 if (UseCorrection == 1) {
416 cout << endl;
417 cout << "\t *** CbmKresGammaCorrection ==> is "
418 "activated"
419 << endl;
420 }
421}
422
423
424void CbmKresConversionCorrectedPhotons::Exec(int fEventNumDP, double OpeningAngleCut, double GammaInvMassCut,
425 int RealPID)
426{
427 cout << "CbmKresConversionCorrectedPhotons, event No. " << fEventNumDP << endl;
428
429 if (fPrimVertex != nullptr) { fKFVertex = CbmKFVertex(*fPrimVertex); }
430 else {
431 Fatal("CbmKresConversionCorrectedPhotons::Exec", "No PrimaryVertex array!");
432 }
433
436 VRings_minus_Outside.clear();
441 VRings_plus_Outside.clear();
444
446 VMomenta_minus_Target.clear();
448 VRings_minus_Target.clear();
451 VMCtracks_plus_Target.clear();
452 VStsTrack_plus_Target.clear();
453 VMomenta_plus_Target.clear();
454 VRings_plus_Target.clear();
455 VStsIndex_plus_Target.clear();
456 VRichRing_plus_Target.clear();
457
458
459 Int_t ngTracks = fGlobalTracks->GetEntriesFast();
460 for (Int_t i = 0; i < ngTracks; i++) {
461 CbmGlobalTrack* gTrack = (CbmGlobalTrack*) fGlobalTracks->At(i);
462 if (nullptr == gTrack) continue;
463 Int_t stsInd = gTrack->GetStsTrackIndex();
464 Int_t richInd = gTrack->GetRichRingIndex();
465
466 if (stsInd < 0) continue;
467 CbmStsTrack* stsTrack = (CbmStsTrack*) fStsTracks->At(stsInd);
468 if (stsTrack == nullptr) continue;
469 CbmTrackMatchNew* stsMatch = (CbmTrackMatchNew*) fStsTrackMatches->At(stsInd);
470 if (stsMatch == nullptr) continue;
471 if (stsMatch->GetNofLinks() <= 0) continue;
472 Int_t stsMcTrackId = stsMatch->GetMatchedLink().GetIndex();
473 if (stsMcTrackId < 0) continue;
474 CbmMCTrack* mcTrack = (CbmMCTrack*) fMcTracks->At(stsMcTrackId);
475 if (mcTrack == nullptr) continue;
476
477
478 FairTrackParam* proj = (FairTrackParam*) fRichProjections->At(i);
479 if (richInd < 0 && proj->GetX() > -115 && proj->GetX() < 115
480 && ((proj->GetY() < -120 && proj->GetY() > -200) || (proj->GetY() > 120 && proj->GetY() < 200)))
481 continue;
482 CbmRichRing* Ring = nullptr;
483 if (richInd > -1) {
484 Ring = static_cast<CbmRichRing*>(fRichRings->At(richInd));
486 if (TMath::Abs(mcTrack->GetPdgCode()) == 11)
488 }
489
490 // Doing fit with Fit To primary Vertex and calculate chi2 to primary vertex
491 double chi2 = 0;
492 TVector3 Momentum = CbmKresFunctions::FitToVertexAndGetChi(stsTrack, fKFVertex.GetRefX(), fKFVertex.GetRefY(),
493 fKFVertex.GetRefZ(), chi2);
494 const FairTrackParam* track_par = stsTrack->GetParamFirst();
495 double charge = track_par->GetQp();
496
497
498 if (chi2 != chi2) continue;
499 if (chi2 == 0) continue;
500
501 if (chi2 > 3) { SaveOutsideTracks(mcTrack, stsTrack, charge, stsInd, richInd, stsMcTrackId, Ring); }
502 if (chi2 > 3) continue;
503
504 SaveTargetTracks(mcTrack, stsTrack, Momentum, charge, stsInd, richInd, stsMcTrackId, Ring);
505 }
506
507
508 FindGammasTarget(fEventNumDP, OpeningAngleCut, GammaInvMassCut, RealPID, VMCtracks_minus_Target,
512
513 FindGammasOutside(fEventNumDP, OpeningAngleCut, GammaInvMassCut, RealPID, VMCtracks_minus_Outside,
517
518
519 if (UseAnnPhotons == 1) {
520 int numformix = 1000;
521 if (fEventNumDP % numformix == 0) {
522 CDP_Mixing_Target(OpeningAngleCut, GammaInvMassCut);
527
532 }
533
534 if (fEventNumDP % numformix == 0) {
535 CDP_Mixing_Outside(OpeningAngleCut, GammaInvMassCut);
541
547 }
548
549 // CDP_LK_EMT Target
550 CDP_likesign_Mixing_Target(OpeningAngleCut, GammaInvMassCut);
559
560 // CDP_LK_EMT Outside
561 CDP_likesign_Mixing_Outside(OpeningAngleCut, GammaInvMassCut);
568 }
569}
570
571
573 int stsInd, int richInd, int stsMcTrackId, CbmRichRing* RING)
574{
575 int InRich = FindInRich(richInd, stsMcTrackId);
576 if (charge < 0) {
577 VMCtracks_minus_Outside.push_back(mcTrack1);
578 VStsTrack_minus_Outside.push_back(stsTrack);
579 VRings_minus_Outside.push_back(InRich);
580 VStsIndex_minus_Outside.push_back(stsInd);
581 VRichRing_minus_Outside.push_back(RING);
582 }
583 if (charge > 0) {
584 VMCtracks_plus_Outside.push_back(mcTrack1);
585 VStsTrack_plus_Outside.push_back(stsTrack);
586 VRings_plus_Outside.push_back(InRich);
587 VStsIndex_plus_Outside.push_back(stsInd);
588 VRichRing_plus_Outside.push_back(RING);
589 }
590}
591
593 double charge, int stsInd, int richInd, int stsMcTrackId,
594 CbmRichRing* RING)
595{
596 int InRich = FindInRich(richInd, stsMcTrackId);
597 if (charge < 0) {
598 VMCtracks_minus_Target.push_back(mcTrack1);
599 VStsTrack_minus_Target.push_back(stsTrack);
600 VMomenta_minus_Target.push_back(refmom);
601 VRings_minus_Target.push_back(InRich);
602 VStsIndex_minus_Target.push_back(stsInd);
603 VRichRing_minus_Target.push_back(RING);
604 }
605 if (charge > 0) {
606 VMCtracks_plus_Target.push_back(mcTrack1);
607 VStsTrack_plus_Target.push_back(stsTrack);
608 VMomenta_plus_Target.push_back(refmom);
609 VRings_plus_Target.push_back(InRich);
610 VStsIndex_plus_Target.push_back(stsInd);
611 VRichRing_plus_Target.push_back(RING);
612 }
613}
614
615
617 int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector<CbmMCTrack*> MCtracks_minus,
618 vector<CbmMCTrack*> MCtracks_plus, vector<CbmStsTrack*> StsTrack_minus, vector<CbmStsTrack*> StsTrack_plus,
619 vector<TVector3> Momenta_minus, vector<TVector3> Momenta_plus, std::vector<int> Rings_minus,
620 std::vector<int> Rings_plus, std::vector<int> stsIndex_minus, std::vector<int> stsIndex_plus,
621 vector<CbmRichRing*> richRing_minus, vector<CbmRichRing*> richRing_plus)
622{
623 for (size_t i = 0; i < Momenta_minus.size(); i++) {
624 for (size_t j = 0; j < Momenta_plus.size(); j++) {
625
626 CbmStsTrack* sts1 = StsTrack_minus.at(i);
627 CbmStsTrack* sts2 = StsTrack_plus.at(j);
628
629 TVector3 part1 = Momenta_minus[i];
630 TVector3 part2 = Momenta_plus[j];
631 CbmMCTrack* part1MC = MCtracks_minus[i];
632 CbmMCTrack* part2MC = MCtracks_plus[j];
633 int sts1_index = stsIndex_minus[i];
634 int sts2_index = stsIndex_plus[j];
635
636 int richcheck_0 = 0;
637 int richcheck_1 = 0;
638 if (RealPID == 1) {
639 // Real PID
640 richcheck_0 = CheckIfElectron(richRing_minus[i], Momenta_minus[i].Mag());
641 richcheck_1 = CheckIfElectron(richRing_plus[j], Momenta_plus[j].Mag());
642 }
643 else {
644 // MC PID
645 richcheck_0 = Rings_minus[i];
646 richcheck_1 = Rings_plus[j];
647 }
648 int richcheck = richcheck_0 + richcheck_1;
649
650 Double_t InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(part1, part2);
651 Double_t OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(part1, part2);
653
654 if (params.fRapidity != params.fRapidity) continue;
655 if (params.fPt != params.fPt) continue;
656 if (params.fRapidity >= 4) continue;
657 if (params.fPt >= 3) continue;
658
659 double rap_step = 0.4;
660 double pt_step = 0.1;
661 int rap_coef = params.fRapidity / rap_step;
662 int pt_coef = params.fPt / pt_step;
663
664 CDP_candidates_InvMass_vs_OA_Target->Fill(InvmassReco, OpeningAngle);
665 CDP_candidates_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
666 CDP_candidates_InvMass_Target->Fill(InvmassReco);
667 CDP_candidates_InvMass_Both->Fill(InvmassReco);
668 CDP_candidates_OA_Target->Fill(OpeningAngle);
669 CDP_candidates_OA_Both->Fill(OpeningAngle);
670
671 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
672 double PlaneAngle_first = CalculatePlaneAngle_first(sts1, sts2);
673
674 int IdForANN = 0; // 0 - means wrong pair combination; 1 - means correct pair
675 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
676 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
677 if (mcTrackmama->GetMotherId() == -1 && mcTrackmama->GetPdgCode() == 22) {
678 IdForANN = 1;
679 CDP_InvMass_Target->Fill(InvmassReco);
680 CDP_InvMass_Both->Fill(InvmassReco);
681 CDP_OA_Target->Fill(OpeningAngle);
682 CDP_OA_Both->Fill(OpeningAngle);
683 CDP_InvMass_vs_OA_Target->Fill(InvmassReco, OpeningAngle);
684 CDP_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
685 CDP_PlaneAngles_last_Target->Fill(PlaneAngle_last);
686 CDP_PlaneAngles_last_Both->Fill(PlaneAngle_last);
687 CDP_PlaneAngles_first_Target->Fill(PlaneAngle_first);
688 CDP_PlaneAngles_first_Both->Fill(PlaneAngle_first);
689 }
690 }
691
692 // run ANN
693 if (AnnTrainPhotons == 1) {
694 fTrainPhotons->Exec(EventNumMan, IdForANN, InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(),
695 part1, part2);
696 continue;
697 }
698
699 double AnnValue = 999;
700 if (UseAnnPhotons == 1) {
701 AnnValue =
702 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), part1, part2);
703 if (IdForANN == 1) CDP_AnnTruePairs->Fill(AnnValue);
704 if (IdForANN == 0) CDP_AnnFalsePairs->Fill(AnnValue);
705 }
706
707
708 CDP_candidates_PlaneAngles_last_Target->Fill(PlaneAngle_last);
709 CDP_candidates_PlaneAngles_last_Both->Fill(PlaneAngle_last);
710 CDP_candidates_PlaneAngles_first_Target->Fill(PlaneAngle_first);
711 CDP_candidates_PlaneAngles_first_Both->Fill(PlaneAngle_first);
712
713
714 // cuts
715 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
716 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
717 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
718
719 int fromPions = 0;
720 int fromEta = 0;
721 int fromFireball = 0;
722 int fromDalitz = 0;
723 int fromXi = 0;
724 int fromOther = 0;
725 int fromCombinatorial = 0;
726 int fromConversion = 0;
727 int twoFromTarget = 0;
728 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
729 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
730 if (mcTrackmama->GetPdgCode() == 22) {
731 if (mcTrackmama->GetMotherId() == -1) { fromFireball = 1; }
732 else {
733 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
734 if (mcTrackGrmama->GetPdgCode() == 111) fromPions = 1;
735 if (mcTrackGrmama->GetPdgCode() == 221) fromEta = 1;
736 if (mcTrackGrmama->GetPdgCode() == 3212) fromXi = 1;
737 fromConversion = 1;
738 }
739 }
740 else {
741 if (mcTrackmama->GetPdgCode() == 111) fromDalitz = 1;
742 if (mcTrackmama->GetPdgCode() != 111) fromOther = 1;
743 }
744 }
745 else if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() == -1) {
746 twoFromTarget = 1;
747 }
748 else {
749 fromCombinatorial = 1;
750 }
751
752
753 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
754 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
755 CMother_PDG_Target->Fill(mcTrackmama->GetPdgCode());
756 if (mcTrackmama->GetPdgCode() == 22) {
757 if (mcTrackmama->GetMotherId() == -1) { CGrandMother_PDG_Target->Fill(mcTrackmama->GetMotherId()); }
758 else {
759 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
760 CGrandMother_PDG_Target->Fill(TMath::Abs(mcTrackGrmama->GetPdgCode()));
761 }
762 }
763 }
764
765
766 if (IdForANN == 1) CDP_AnnTruePairs_AfterCuts->Fill(AnnValue);
767 if (IdForANN == 0) CDP_AnnFalsePairs_AfterCuts->Fill(AnnValue);
768
769
770 // for event mixing CDP
771 std::vector<TVector3> minusTrack = SaveAllHits(sts1);
772 std::vector<TVector3> plusTrack = SaveAllHits(sts2);
773
774 CDP_EMT_Event_minus_Target.push_back(EventNumMan);
775 CDP_EMT_momenta_minus_Target.push_back(part1);
776 CDP_EMT_NofRings_minus_Target.push_back(richcheck_0);
777 CDP_EMT_Hits_minus_Target.push_back(minusTrack);
778
779 CDP_EMT_Event_plus_Target.push_back(EventNumMan);
780 CDP_EMT_momenta_plus_Target.push_back(part2);
781 CDP_EMT_NofRings_plus_Target.push_back(richcheck_1);
782 CDP_EMT_Hits_plus_Target.push_back(plusTrack);
783
784 // CDP_LK_EMT
785 CDP_LK_EMT_momenta_minus_Target.push_back(part1);
786 CDP_LK_EMT_NofRings_minus_Target.push_back(richcheck_0);
787 CDP_LK_EMT_STS_minus_Target.push_back(sts1);
788 CDP_LK_EMT_STS_minus_index_Target.push_back(sts1_index);
789
790 CDP_LK_EMT_momenta_plus_Target.push_back(part2);
791 CDP_LK_EMT_NofRings_plus_Target.push_back(richcheck_1);
792 CDP_LK_EMT_STS_plus_Target.push_back(sts2);
793 CDP_LK_EMT_STS_plus_index_Target.push_back(sts2_index);
794
795
796 // everything (RICH == 0, RICH == 1, RICH == 2) together
797 if (richcheck == 0 || richcheck == 1 || richcheck == 2) {
798 double weight_all = 0;
799 if (corr_all[rap_coef][pt_coef] != 0) weight_all = 1 / corr_all[rap_coef][pt_coef];
800 if (weight_all > thresholdweight) weight_all = 0;
801 CDP_InvMassReco_all_Target->Fill(InvmassReco, weight_all);
802 CDP_OpeningAngleReco_all_Target->Fill(OpeningAngle, weight_all);
803 CDP_Pdg_all_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
804 CDP_Pdg_all_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
805 CDP_P_reco_all_Target->Fill(params.fMomentumMag, weight_all);
806 CDP_Pt_reco_all_Target->Fill(params.fPt, weight_all);
807 CDP_InvMassReco_all_Both->Fill(InvmassReco, weight_all);
808 CDP_OpeningAngleReco_all_Both->Fill(OpeningAngle, weight_all);
809 CDP_Pdg_all_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
810 CDP_Pdg_all_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
811 CDP_P_reco_all_Both->Fill(params.fMomentumMag, weight_all);
812 CDP_Pt_reco_all_Both->Fill(params.fPt, weight_all);
813 if (fromFireball == 1) {
814 CPh_fromTarget_Pt_reco_all_Target->Fill(params.fPt, weight_all);
815 CPh_fromTarget_Pt_reco_all_Both->Fill(params.fPt, weight_all);
816 CPh_pt_vs_rap_est_all_Target->Fill(params.fRapidity, params.fPt);
817 CPh_pt_vs_rap_est_all_Both->Fill(params.fRapidity, params.fPt);
818 CPh_pt_vs_rap_est_corr_all_Target->Fill(params.fRapidity, params.fPt, weight_all);
819 CPh_pt_vs_rap_est_corr_all_Both->Fill(params.fRapidity, params.fPt, weight_all);
820 }
821 if (fromPions == 1) {
822 CPh_fromPions_Pt_reco_all_Target->Fill(params.fPt, weight_all);
823 CPh_fromPions_Pt_reco_all_Both->Fill(params.fPt, weight_all);
824 }
825 if (fromEta == 1) {
826 CPh_fromEtas_Pt_reco_all_Target->Fill(params.fPt, weight_all);
827 CPh_fromEtas_Pt_reco_all_Both->Fill(params.fPt, weight_all);
828 }
829 if (fromDalitz == 1) {
830 CPh_fromDalitz_Pt_reco_all_Target->Fill(params.fPt, weight_all);
831 CPh_fromDalitz_Pt_reco_all_Both->Fill(params.fPt, weight_all);
832 }
833 if (fromXi == 1) {
834 CPh_fromXi_Pt_reco_all_Target->Fill(params.fPt, weight_all);
835 CPh_fromXi_Pt_reco_all_Both->Fill(params.fPt, weight_all);
836 }
837 if (fromOther == 1) {
838 CPh_fromOther_Pt_reco_all_Target->Fill(params.fPt, weight_all);
839 CPh_fromOther_Pt_reco_all_Both->Fill(params.fPt, weight_all);
840 }
841 if (fromCombinatorial == 1) {
842 CPh_fromCombinatorial_Pt_reco_all_Target->Fill(params.fPt, weight_all);
843 CPh_fromCombinatorial_Pt_reco_all_Both->Fill(params.fPt, weight_all);
844 }
845 if (fromConversion == 1) {
846 CPh_fromConversion_Pt_reco_all_Target->Fill(params.fPt, weight_all);
847 CPh_fromConversion_Pt_reco_all_Both->Fill(params.fPt, weight_all);
848 }
849 if (twoFromTarget == 1) {
850 CPh_twoFromTarget_Pt_reco_all_Target->Fill(params.fPt, weight_all);
851 CPh_twoFromTarget_Pt_reco_all_Both->Fill(params.fPt, weight_all);
852 }
853 }
854
855 // only cases, when RICH == 2
856 if (richcheck == 2) {
857 double weight_two = 0;
858 if (corr_two[rap_coef][pt_coef] != 0) weight_two = 1 / corr_two[rap_coef][pt_coef];
859 if (weight_two > thresholdweight) weight_two = 0;
860 CDP_InvMassReco_two_Target->Fill(InvmassReco, weight_two);
861 CDP_OpeningAngleReco_two_Target->Fill(OpeningAngle, weight_two);
862 CDP_Pdg_two_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
863 CDP_Pdg_two_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
864 CDP_P_reco_two_Target->Fill(params.fMomentumMag, weight_two);
865 CDP_Pt_reco_two_Target->Fill(params.fPt, weight_two);
866 CDP_InvMassReco_two_Both->Fill(InvmassReco, weight_two);
867 CDP_OpeningAngleReco_two_Both->Fill(OpeningAngle, weight_two);
868 CDP_Pdg_two_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
869 CDP_Pdg_two_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
870 CDP_P_reco_two_Both->Fill(params.fMomentumMag, weight_two);
871 CDP_Pt_reco_two_Both->Fill(params.fPt, weight_two);
872 if (fromFireball == 1) {
873 CPh_fromTarget_Pt_reco_two_Target->Fill(params.fPt, weight_two);
874 CPh_fromTarget_Pt_reco_two_Both->Fill(params.fPt, weight_two);
875 CPh_pt_vs_rap_est_two_Target->Fill(params.fRapidity, params.fPt);
876 CPh_pt_vs_rap_est_two_Both->Fill(params.fRapidity, params.fPt);
877 CPh_pt_vs_rap_est_corr_two_Target->Fill(params.fRapidity, params.fPt, weight_two);
878 CPh_pt_vs_rap_est_corr_two_Both->Fill(params.fRapidity, params.fPt, weight_two);
879 }
880 if (fromPions == 1) {
881 CPh_fromPions_Pt_reco_two_Target->Fill(params.fPt, weight_two);
882 CPh_fromPions_Pt_reco_two_Both->Fill(params.fPt, weight_two);
883 }
884 if (fromEta == 1) {
885 CPh_fromEtas_Pt_reco_two_Target->Fill(params.fPt, weight_two);
886 CPh_fromEtas_Pt_reco_two_Both->Fill(params.fPt, weight_two);
887 }
888 if (fromDalitz == 1) {
889 CPh_fromDalitz_Pt_reco_two_Target->Fill(params.fPt, weight_two);
890 CPh_fromDalitz_Pt_reco_two_Both->Fill(params.fPt, weight_two);
891 }
892 if (fromXi == 1) {
893 CPh_fromXi_Pt_reco_two_Target->Fill(params.fPt, weight_two);
894 CPh_fromXi_Pt_reco_two_Both->Fill(params.fPt, weight_two);
895 }
896 if (fromOther == 1) {
897 CPh_fromOther_Pt_reco_two_Target->Fill(params.fPt, weight_two);
898 CPh_fromOther_Pt_reco_two_Both->Fill(params.fPt, weight_two);
899 }
900 if (fromCombinatorial == 1) {
901 CPh_fromCombinatorial_Pt_reco_two_Target->Fill(params.fPt, weight_two);
902 CPh_fromCombinatorial_Pt_reco_two_Both->Fill(params.fPt, weight_two);
903 }
904 if (fromConversion == 1) {
905 CPh_fromConversion_Pt_reco_two_Target->Fill(params.fPt, weight_two);
906 CPh_fromConversion_Pt_reco_two_Both->Fill(params.fPt, weight_two);
907 }
908 if (twoFromTarget == 1) {
909 CPh_twoFromTarget_Pt_reco_two_Target->Fill(params.fPt, weight_two);
910 CPh_twoFromTarget_Pt_reco_two_Both->Fill(params.fPt, weight_two);
911 }
912 }
913
914 // cases, when RICH == 1 or RICH == 2 together
915 if (richcheck == 1 || richcheck == 2) {
916 double weight_onetwo = 0;
917 if (corr_onetwo[rap_coef][pt_coef] != 0) weight_onetwo = 1 / corr_onetwo[rap_coef][pt_coef];
918 if (weight_onetwo > thresholdweight) weight_onetwo = 0;
919 // cout << "Rapidity = " << params.fRapidity << "; Pt = " << params.fPt << endl;
920 // cout << "rap_coef = " << rap_coef << "; pt_coef = " << pt_coef << "; correction factor is " << corr_onetwo[rap_coef][pt_coef] << endl;
921 CDP_InvMassReco_onetwo_Target->Fill(InvmassReco, weight_onetwo);
922 CDP_OpeningAngleReco_onetwo_Target->Fill(OpeningAngle, weight_onetwo);
923 CDP_Pdg_onetwo_Target->Fill(TMath::Abs(part1MC->GetPdgCode()));
924 CDP_Pdg_onetwo_Target->Fill(TMath::Abs(part2MC->GetPdgCode()));
925 CDP_P_reco_onetwo_Target->Fill(params.fMomentumMag, weight_onetwo);
926 CDP_Pt_reco_onetwo_Target->Fill(params.fPt, weight_onetwo);
927 CDP_InvMassReco_onetwo_Both->Fill(InvmassReco, weight_onetwo);
928 CDP_OpeningAngleReco_onetwo_Both->Fill(OpeningAngle, weight_onetwo);
929 CDP_Pdg_onetwo_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
930 CDP_Pdg_onetwo_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
931 CDP_P_reco_onetwo_Both->Fill(params.fMomentumMag, weight_onetwo);
932 CDP_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
933 if (fromFireball == 1) {
934 CPh_fromTarget_Pt_reco_onetwo_Target->Fill(params.fPt, weight_onetwo);
935 CPh_fromTarget_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
936 CPh_pt_vs_rap_est_onetwo_Target->Fill(params.fRapidity, params.fPt);
937 CPh_pt_vs_rap_est_onetwo_Both->Fill(params.fRapidity, params.fPt);
938 CPh_pt_vs_rap_est_corr_onetwo_Target->Fill(params.fRapidity, params.fPt, weight_onetwo);
939 CPh_pt_vs_rap_est_corr_onetwo_Both->Fill(params.fRapidity, params.fPt, weight_onetwo);
940 }
941 if (fromPions == 1) {
942 CPh_fromPions_Pt_reco_onetwo_Target->Fill(params.fPt, weight_onetwo);
943 CPh_fromPions_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
944 }
945 if (fromEta == 1) {
946 CPh_fromEtas_Pt_reco_onetwo_Target->Fill(params.fPt, weight_onetwo);
947 CPh_fromEtas_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
948 }
949 if (fromDalitz == 1) {
950 CPh_fromDalitz_Pt_reco_onetwo_Target->Fill(params.fPt, weight_onetwo);
951 CPh_fromDalitz_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
952 }
953 if (fromXi == 1) {
954 CPh_fromXi_Pt_reco_onetwo_Target->Fill(params.fPt, weight_onetwo);
955 CPh_fromXi_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
956 }
957 if (fromOther == 1) {
958 CPh_fromOther_Pt_reco_onetwo_Target->Fill(params.fPt, weight_onetwo);
959 CPh_fromOther_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
960 }
961 if (fromCombinatorial == 1) {
962 CPh_fromCombinatorial_Pt_reco_onetwo_Target->Fill(params.fPt, weight_onetwo);
963 CPh_fromCombinatorial_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
964 }
965 if (fromConversion == 1) {
966 CPh_fromConversion_Pt_reco_onetwo_Target->Fill(params.fPt, weight_onetwo);
967 CPh_fromConversion_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
968 }
969 if (twoFromTarget == 1) {
970 CPh_twoFromTarget_Pt_reco_onetwo_Target->Fill(params.fPt, weight_onetwo);
971 CPh_twoFromTarget_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
972 }
973 }
974 }
975 }
976}
977
978
980 int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector<CbmMCTrack*> MCtracks_minus_Outside,
981 vector<CbmMCTrack*> MCtracks_plus_Outside, vector<CbmStsTrack*> StsTrack_minus_Outside,
982 vector<CbmStsTrack*> StsTrack_plus_Outside, std::vector<int> Rings_minus_Outside, std::vector<int> Rings_plus_Outside,
983 std::vector<int> stsIndex_minus_Outside, std::vector<int> /*stsIndex_plus_Outside*/,
984 vector<CbmRichRing*> richRing_minus_Outside, vector<CbmRichRing*> richRing_plus_Outside)
985{
986 for (size_t i = 0; i < StsTrack_minus_Outside.size(); i++) {
987 for (size_t j = 0; j < StsTrack_plus_Outside.size(); j++) {
988
989 CbmStsTrack* part1STS = StsTrack_minus_Outside[i];
990 CbmStsTrack* part2STS = StsTrack_plus_Outside[j];
991 CbmMCTrack* part1MC = MCtracks_minus_Outside[i];
992 CbmMCTrack* part2MC = MCtracks_plus_Outside[j];
993 int sts1_index = stsIndex_minus_Outside[i];
994 // int sts2_index = stsIndex_plus_Outside[j];
995
996 KFParticle electron;
998 KFParticle positron;
1000 const KFParticle* daughters[2] = {&electron, &positron};
1001 KFParticle intersection;
1002 intersection.Construct(daughters, 2);
1003
1004 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
1005
1006 // fit to the vertex fitter
1007 TVector3 part1 =
1008 CbmKresFunctions::FitToVertex(part1STS, intersection.GetX(), intersection.GetY(), intersection.GetZ());
1009 TVector3 part2 =
1010 CbmKresFunctions::FitToVertex(part2STS, intersection.GetX(), intersection.GetY(), intersection.GetZ());
1011
1012 // TVector3 part1(electron.KFParticleBase::Px(), electron.KFParticleBase::Py(), electron.KFParticleBase::Pz());
1013 // TVector3 part2(positron.KFParticleBase::Px(), positron.KFParticleBase::Py(), positron.KFParticleBase::Pz());
1014
1015 int richcheck = 0;
1016 int richcheck_0 = 0;
1017 int richcheck_1 = 0;
1018 if (RealPID == 1) {
1019 // Real PID
1020 richcheck_0 = CheckIfElectron(richRing_minus_Outside[i], part1.Mag());
1021 richcheck_1 = CheckIfElectron(richRing_plus_Outside[j], part2.Mag());
1022 richcheck = richcheck_0 + richcheck_1;
1023 }
1024 else {
1025 // MC PID
1026 richcheck = Rings_minus_Outside[i] + Rings_plus_Outside[j];
1027 }
1028
1029
1030 Double_t InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(part1, part2);
1031 Double_t OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(part1, part2);
1033
1034 if (params.fRapidity != params.fRapidity) continue;
1035 if (params.fPt != params.fPt) continue;
1036 if (params.fRapidity >= 4) continue;
1037 if (params.fPt >= 3) continue;
1038
1039 double rap_step = 0.4;
1040 double pt_step = 0.1;
1041 int rap_coef = params.fRapidity / rap_step;
1042 int pt_coef = params.fPt / pt_step;
1043
1044 CDP_candidates_InvMass_vs_OA_Outside->Fill(InvmassReco, OpeningAngle);
1045 CDP_candidates_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
1046 CDP_candidates_InvMass_Outside->Fill(InvmassReco);
1047 CDP_candidates_InvMass_Both->Fill(InvmassReco);
1048 CDP_candidates_OA_Outside->Fill(OpeningAngle);
1049 CDP_candidates_OA_Both->Fill(OpeningAngle);
1050
1051 double PlaneAngle_last = CalculatePlaneAngle_last(part1STS, part2STS);
1052 double PlaneAngle_first = CalculatePlaneAngle_first(part1STS, part2STS);
1053
1054 int IdForANN = 0; // 0 - means wrong pair combination; 1 - means correct pair
1055 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
1056 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1057 if (mcTrackmama->GetMotherId() == -1 && mcTrackmama->GetPdgCode() == 22) {
1058 IdForANN = 1;
1059 CDP_InvMass_Outside->Fill(InvmassReco);
1060 CDP_InvMass_Both->Fill(InvmassReco);
1061 CDP_OA_Outside->Fill(OpeningAngle);
1062 CDP_OA_Both->Fill(OpeningAngle);
1063 CDP_InvMass_vs_OA_Outside->Fill(InvmassReco, OpeningAngle);
1064 CDP_InvMass_vs_OA_Both->Fill(InvmassReco, OpeningAngle);
1065 CDP_PlaneAngles_last_Outside->Fill(PlaneAngle_last);
1066 CDP_PlaneAngles_last_Both->Fill(PlaneAngle_last);
1067 CDP_PlaneAngles_first_Outside->Fill(PlaneAngle_first);
1068 CDP_PlaneAngles_first_Both->Fill(PlaneAngle_first);
1069 }
1070 }
1071
1072 // run ANN
1073 if (AnnTrainPhotons == 1) {
1074 fTrainPhotons->Exec(EventNumMan, IdForANN, InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(),
1075 part1, part2);
1076 continue;
1077 }
1078
1079 double AnnValue = 999;
1080 if (UseAnnPhotons == 1) {
1081 AnnValue =
1082 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(), part1, part2);
1083 if (IdForANN == 1) CDP_AnnTruePairs->Fill(AnnValue);
1084 if (IdForANN == 0) CDP_AnnFalsePairs->Fill(AnnValue);
1085 }
1086
1087 CDP_candidates_PlaneAngles_last_Outside->Fill(PlaneAngle_last);
1088 CDP_candidates_PlaneAngles_last_Both->Fill(PlaneAngle_last);
1089 CDP_candidates_PlaneAngles_first_Outside->Fill(PlaneAngle_first);
1090 CDP_candidates_PlaneAngles_first_Both->Fill(PlaneAngle_first);
1091
1092 // cuts
1093 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
1094 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
1095 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
1096
1097
1098 int fromPions = 0;
1099 int fromEta = 0;
1100 int fromFireball = 0;
1101 int fromDalitz = 0;
1102 int fromXi = 0;
1103 int fromOther = 0;
1104 int fromCombinatorial = 0;
1105 int fromConversion = 0;
1106 int twoFromTarget = 0;
1107 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
1108 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1109 if (mcTrackmama->GetPdgCode() == 22) {
1110 if (mcTrackmama->GetMotherId() == -1) { fromFireball = 1; }
1111 else {
1112 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
1113 if (mcTrackGrmama->GetPdgCode() == 111) fromPions = 1;
1114 if (mcTrackGrmama->GetPdgCode() == 221) fromEta = 1;
1115 if (mcTrackGrmama->GetPdgCode() == 3212) fromXi = 1;
1116 fromConversion = 1;
1117 }
1118 }
1119 else {
1120 if (mcTrackmama->GetPdgCode() == 111) fromDalitz = 1;
1121 if (mcTrackmama->GetPdgCode() != 111) fromOther = 1;
1122 }
1123 }
1124 else if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() == -1) {
1125 twoFromTarget = 1;
1126 }
1127 else {
1128 fromCombinatorial = 1;
1129 }
1130
1131
1132 if (part1MC->GetMotherId() == part2MC->GetMotherId() && part1MC->GetMotherId() != -1) {
1133 CbmMCTrack* mcTrackmama = (CbmMCTrack*) fMcTracks->At(part1MC->GetMotherId());
1134 if (mcTrackmama->GetPdgCode() == 22) {
1135 if (mcTrackmama->GetMotherId() == -1) { CGrandMother_PDG_Outside->Fill(mcTrackmama->GetMotherId()); }
1136 else {
1137 CbmMCTrack* mcTrackGrmama = (CbmMCTrack*) fMcTracks->At(mcTrackmama->GetMotherId());
1138 CGrandMother_PDG_Outside->Fill(TMath::Abs(mcTrackGrmama->GetPdgCode()));
1139 }
1140 }
1141 else {
1142 CMother_PDG_Outside->Fill(TMath::Abs(mcTrackmama->GetPdgCode()));
1143 }
1144 }
1145
1146 if (IdForANN == 1) CDP_AnnTruePairs_AfterCuts->Fill(AnnValue);
1147 if (IdForANN == 0) CDP_AnnFalsePairs_AfterCuts->Fill(AnnValue);
1148
1149
1150 // for event mixing CDP
1151 std::vector<TVector3> minusTrack = SaveAllHits(part1STS);
1152 std::vector<TVector3> plusTrack = SaveAllHits(part2STS);
1153
1154 CDP_EMT_Event_minus_Outside.push_back(EventNumMan);
1155 CDP_EMT_momenta_minus_Outside.push_back(part1STS);
1156 CDP_EMT_KFTrack_minus_Outside.push_back(electron);
1157 CDP_EMT_NofRings_minus_Outside.push_back(richcheck_0);
1158 CDP_EMT_Hits_minus_Outside.push_back(minusTrack);
1159
1160 CDP_EMT_Event_plus_Outside.push_back(EventNumMan);
1161 CDP_EMT_momenta_plus_Outside.push_back(part2STS);
1162 CDP_EMT_KFTrack_plus_Outside.push_back(positron);
1163 CDP_EMT_NofRings_plus_Outside.push_back(richcheck_1);
1164 CDP_EMT_Hits_plus_Outside.push_back(plusTrack);
1165
1166
1167 // CDP_LK_EMT
1168 CDP_LK_EMT_NofRings_minus_Outside.push_back(richcheck_0);
1169 CDP_LK_EMT_STS_minus_Outside.push_back(part1STS);
1170 CDP_LK_EMT_STS_minus_index_Outside.push_back(sts1_index);
1171
1172 CDP_LK_EMT_NofRings_plus_Outside.push_back(richcheck_1);
1173 CDP_LK_EMT_STS_plus_Outside.push_back(part2STS);
1174 CDP_LK_EMT_STS_plus_index_Outside.push_back(sts1_index);
1175
1176
1177 // everything (RICH == 0, RICH == 1, RICH == 2) together
1178 if (richcheck == 0 || richcheck == 1 || richcheck == 2) {
1179 double weight_all = 0;
1180 // cout << "Rapidity = " << params.fRapidity << "; Pt = " << params.fPt << endl;
1181 // cout << "rap_coef = " << rap_coef << "; pt_coef = " << pt_coef << "; correction factor is " << corr_all[rap_coef][pt_coef] << endl;
1182 if (corr_all[rap_coef][pt_coef] != 0) weight_all = 1 / corr_all[rap_coef][pt_coef];
1183 if (weight_all > thresholdweight) weight_all = 0;
1184 CDP_InvMassReco_all_Outside->Fill(InvmassReco, weight_all);
1185 CDP_OpeningAngleReco_all_Outside->Fill(OpeningAngle, weight_all);
1186 CDP_Pdg_all_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1187 CDP_Pdg_all_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1188 CDP_P_reco_all_Outside->Fill(params.fMomentumMag, weight_all);
1189 CDP_Pt_reco_all_Outside->Fill(params.fPt, weight_all);
1190 CDP_InvMassReco_all_Both->Fill(InvmassReco, weight_all);
1191 CDP_OpeningAngleReco_all_Both->Fill(OpeningAngle, weight_all);
1192 CDP_Pdg_all_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1193 CDP_Pdg_all_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1194 CDP_P_reco_all_Both->Fill(params.fMomentumMag, weight_all);
1195 CDP_Pt_reco_all_Both->Fill(params.fPt, weight_all);
1196 if (fromFireball == 1) {
1197 CPh_fromTarget_Pt_reco_all_Outside->Fill(params.fPt, weight_all);
1198 CPh_fromTarget_Pt_reco_all_Both->Fill(params.fPt, weight_all);
1199 CPh_pt_vs_rap_est_all_Outside->Fill(params.fRapidity, params.fPt);
1200 CPh_pt_vs_rap_est_all_Both->Fill(params.fRapidity, params.fPt);
1201 CPh_pt_vs_rap_est_corr_all_Outside->Fill(params.fRapidity, params.fPt, weight_all);
1202 CPh_pt_vs_rap_est_corr_all_Both->Fill(params.fRapidity, params.fPt, weight_all);
1203 }
1204 if (fromPions == 1) {
1205 CPh_fromPions_Pt_reco_all_Outside->Fill(params.fPt, weight_all);
1206 CPh_fromPions_Pt_reco_all_Both->Fill(params.fPt, weight_all);
1207 }
1208 if (fromEta == 1) {
1209 CPh_fromEtas_Pt_reco_all_Outside->Fill(params.fPt, weight_all);
1210 CPh_fromEtas_Pt_reco_all_Both->Fill(params.fPt, weight_all);
1211 }
1212 if (fromDalitz == 1) {
1213 CPh_fromDalitz_Pt_reco_all_Outside->Fill(params.fPt, weight_all);
1214 CPh_fromDalitz_Pt_reco_all_Both->Fill(params.fPt, weight_all);
1215 }
1216 if (fromXi == 1) {
1217 CPh_fromXi_Pt_reco_all_Outside->Fill(params.fPt, weight_all);
1218 CPh_fromXi_Pt_reco_all_Both->Fill(params.fPt, weight_all);
1219 }
1220 if (fromOther == 1) {
1221 CPh_fromOther_Pt_reco_all_Outside->Fill(params.fPt, weight_all);
1222 CPh_fromOther_Pt_reco_all_Both->Fill(params.fPt, weight_all);
1223 }
1224 if (fromCombinatorial == 1) {
1225 CPh_fromCombinatorial_Pt_reco_all_Outside->Fill(params.fPt, weight_all);
1226 CPh_fromCombinatorial_Pt_reco_all_Both->Fill(params.fPt, weight_all);
1227 }
1228 if (fromConversion == 1) {
1229 CPh_fromConversion_Pt_reco_all_Outside->Fill(params.fPt, weight_all);
1230 CPh_fromConversion_Pt_reco_all_Both->Fill(params.fPt, weight_all);
1231 }
1232 if (twoFromTarget == 1) {
1233 CPh_twoFromTarget_Pt_reco_all_Outside->Fill(params.fPt, weight_all);
1234 CPh_twoFromTarget_Pt_reco_all_Both->Fill(params.fPt, weight_all);
1235 }
1236 }
1237
1238 // only cases, when RICH == 2
1239 if (richcheck == 2) {
1240 double weight_two = 0;
1241 if (corr_two[rap_coef][pt_coef] != 0) weight_two = 1 / corr_two[rap_coef][pt_coef];
1242 if (weight_two > thresholdweight) weight_two = 0;
1243 CDP_InvMassReco_two_Outside->Fill(InvmassReco, weight_two);
1244 CDP_OpeningAngleReco_two_Outside->Fill(OpeningAngle, weight_two);
1245 CDP_Pdg_two_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1246 CDP_Pdg_two_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1247 CDP_P_reco_two_Outside->Fill(params.fMomentumMag, weight_two);
1248 CDP_Pt_reco_two_Outside->Fill(params.fPt, weight_two);
1249 CDP_InvMassReco_two_Both->Fill(InvmassReco, weight_two);
1250 CDP_OpeningAngleReco_two_Both->Fill(OpeningAngle, weight_two);
1251 CDP_Pdg_two_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1252 CDP_Pdg_two_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1253 CDP_P_reco_two_Both->Fill(params.fMomentumMag, weight_two);
1254 CDP_Pt_reco_two_Both->Fill(params.fPt, weight_two);
1255 if (fromFireball == 1) {
1256 CPh_fromTarget_Pt_reco_two_Outside->Fill(params.fPt, weight_two);
1257 CPh_fromTarget_Pt_reco_two_Both->Fill(params.fPt, weight_two);
1258 CPh_pt_vs_rap_est_two_Outside->Fill(params.fRapidity, params.fPt);
1259 CPh_pt_vs_rap_est_two_Both->Fill(params.fRapidity, params.fPt);
1260 CPh_pt_vs_rap_est_corr_two_Outside->Fill(params.fRapidity, params.fPt, weight_two);
1261 CPh_pt_vs_rap_est_corr_two_Both->Fill(params.fRapidity, params.fPt, weight_two);
1262 }
1263 if (fromPions == 1) {
1264 CPh_fromPions_Pt_reco_two_Outside->Fill(params.fPt, weight_two);
1265 CPh_fromPions_Pt_reco_two_Both->Fill(params.fPt, weight_two);
1266 }
1267 if (fromEta == 1) {
1268 CPh_fromEtas_Pt_reco_two_Outside->Fill(params.fPt, weight_two);
1269 CPh_fromEtas_Pt_reco_two_Both->Fill(params.fPt, weight_two);
1270 }
1271 if (fromDalitz == 1) {
1272 CPh_fromDalitz_Pt_reco_two_Outside->Fill(params.fPt, weight_two);
1273 CPh_fromDalitz_Pt_reco_two_Both->Fill(params.fPt, weight_two);
1274 }
1275 if (fromXi == 1) {
1276 CPh_fromXi_Pt_reco_two_Outside->Fill(params.fPt, weight_two);
1277 CPh_fromXi_Pt_reco_two_Both->Fill(params.fPt, weight_two);
1278 }
1279 if (fromOther == 1) {
1280 CPh_fromOther_Pt_reco_two_Outside->Fill(params.fPt, weight_two);
1281 CPh_fromOther_Pt_reco_two_Both->Fill(params.fPt, weight_two);
1282 }
1283 if (fromCombinatorial == 1) {
1284 CPh_fromCombinatorial_Pt_reco_two_Outside->Fill(params.fPt, weight_two);
1285 CPh_fromCombinatorial_Pt_reco_two_Both->Fill(params.fPt, weight_two);
1286 }
1287 if (fromConversion == 1) {
1288 CPh_fromConversion_Pt_reco_two_Outside->Fill(params.fPt, weight_two);
1289 CPh_fromConversion_Pt_reco_two_Both->Fill(params.fPt, weight_two);
1290 }
1291 if (twoFromTarget == 1) {
1292 CPh_twoFromTarget_Pt_reco_two_Outside->Fill(params.fPt, weight_two);
1293 CPh_twoFromTarget_Pt_reco_two_Both->Fill(params.fPt, weight_two);
1294 }
1295 }
1296
1297 // cases, when RICH == 1 or RICH == 2 together
1298 if (richcheck == 1 || richcheck == 2) {
1299 double weight_onetwo = 0;
1300 if (corr_onetwo[rap_coef][pt_coef] != 0) weight_onetwo = 1 / corr_onetwo[rap_coef][pt_coef];
1301 if (weight_onetwo > thresholdweight) weight_onetwo = 0;
1302 CDP_InvMassReco_onetwo_Outside->Fill(InvmassReco, weight_onetwo);
1303 CDP_OpeningAngleReco_onetwo_Outside->Fill(OpeningAngle, weight_onetwo);
1304 CDP_Pdg_onetwo_Outside->Fill(TMath::Abs(part1MC->GetPdgCode()));
1305 CDP_Pdg_onetwo_Outside->Fill(TMath::Abs(part2MC->GetPdgCode()));
1306 CDP_P_reco_onetwo_Outside->Fill(params.fMomentumMag, weight_onetwo);
1307 CDP_Pt_reco_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1308 CDP_InvMassReco_onetwo_Both->Fill(InvmassReco, weight_onetwo);
1309 CDP_OpeningAngleReco_onetwo_Both->Fill(OpeningAngle, weight_onetwo);
1310 CDP_Pdg_onetwo_Both->Fill(TMath::Abs(part1MC->GetPdgCode()));
1311 CDP_Pdg_onetwo_Both->Fill(TMath::Abs(part2MC->GetPdgCode()));
1312 CDP_P_reco_onetwo_Both->Fill(params.fMomentumMag, weight_onetwo);
1313 CDP_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
1314 if (fromFireball == 1) {
1315 CPh_fromTarget_Pt_reco_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1316 CPh_fromTarget_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
1317 CPh_pt_vs_rap_est_onetwo_Outside->Fill(params.fRapidity, params.fPt);
1318 CPh_pt_vs_rap_est_onetwo_Both->Fill(params.fRapidity, params.fPt);
1319 CPh_pt_vs_rap_est_corr_onetwo_Outside->Fill(params.fRapidity, params.fPt, weight_onetwo);
1320 CPh_pt_vs_rap_est_corr_onetwo_Both->Fill(params.fRapidity, params.fPt, weight_onetwo);
1321 }
1322 if (fromPions == 1) {
1323 CPh_fromPions_Pt_reco_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1324 CPh_fromPions_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
1325 }
1326 if (fromEta == 1) {
1327 CPh_fromEtas_Pt_reco_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1328 CPh_fromEtas_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
1329 }
1330 if (fromDalitz == 1) {
1331 CPh_fromDalitz_Pt_reco_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1332 CPh_fromDalitz_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
1333 }
1334 if (fromXi == 1) {
1335 CPh_fromXi_Pt_reco_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1336 CPh_fromXi_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
1337 }
1338 if (fromOther == 1) {
1339 CPh_fromOther_Pt_reco_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1340 CPh_fromOther_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
1341 }
1342 if (fromCombinatorial == 1) {
1343 CPh_fromCombinatorial_Pt_reco_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1344 CPh_fromCombinatorial_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
1345 }
1346 if (fromConversion == 1) {
1347 CPh_fromConversion_Pt_reco_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1348 CPh_fromConversion_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
1349 }
1350 if (twoFromTarget == 1) {
1351 CPh_twoFromTarget_Pt_reco_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1352 CPh_twoFromTarget_Pt_reco_onetwo_Both->Fill(params.fPt, weight_onetwo);
1353 }
1354 }
1355 }
1356 }
1357}
1358
1359
1360int CbmKresConversionCorrectedPhotons::FindInRich(int richInd, int stsMcTrackId)
1361{
1362 int RingsInRich = 0;
1363 if (richInd > -1) {
1364 CbmTrackMatchNew* richMatch = (CbmTrackMatchNew*) fRichRingMatches->At(richInd);
1365 if (richMatch != nullptr && richMatch->GetNofLinks() > 0) {
1366 int richMcTrackId = richMatch->GetMatchedLink().GetIndex();
1367 if (richMcTrackId > 0) {
1368 if (stsMcTrackId == richMcTrackId) { // check that global track was matched correctly for STS and RICH together
1369 CbmMCTrack* mcTrack2 = (CbmMCTrack*) fMcTracks->At(richMcTrackId);
1370 if (mcTrack2 != nullptr) {
1371 int pdgRICH = mcTrack2->GetPdgCode();
1372 if (TMath::Abs(pdgRICH) == 11) RingsInRich++;
1373 }
1374 }
1375 }
1376 }
1377 }
1378 return RingsInRich;
1379}
1380
1381
1383{
1384 int identified = 0;
1385
1386 if (nullptr != ring) {
1387 CbmRichRingLight ringHit;
1388 int nofHits = ring->GetNofHits();
1389 for (int i = 0; i < nofHits; i++) {
1390 int hitInd = ring->GetHit(i);
1391 CbmRichHit* hit = (CbmRichHit*) fRichHits->At(hitInd);
1392 if (nullptr == hit) continue;
1393 CbmRichHitLight hl(hit->GetX(), hit->GetY());
1394 ringHit.AddHit(hl);
1395 }
1396 fTauFit->DoFit(&ringHit);
1397 if (ringHit.GetAaxis() > 4 && ringHit.GetAaxis() < 6 && ringHit.GetBaxis() > 4 && ringHit.GetBaxis() < 6
1398 && momentum > 0.2 && momentum < 4.)
1399 identified++;
1400 //if (ring->GetDistance() < 2 && ringHit.GetAaxis() > 4 && ringHit.GetAaxis() < 6 && ringHit.GetBaxis() > 4 && ringHit.GetBaxis() < 6 && momentum > 0.2 && momentum < 4.) identified ++;
1401 }
1402
1403 return identified;
1404}
1405
1407{
1408 std::vector<TVector3> AllHitsOfTrack;
1409 AllHitsOfTrack.clear();
1410
1411 Int_t hitsMVD = track->GetNofMvdHits();
1412 Int_t hitsSTS = track->GetNofStsHits();
1413
1414 for (int i = 0; i < hitsMVD; i++) {
1415 Int_t mvdHitIndex = track->GetMvdHitIndex(i);
1416 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
1417 TVector3 position;
1418 mvdHit->Position(position);
1419 AllHitsOfTrack.push_back(position);
1420 }
1421 for (int i = 0; i < hitsSTS; i++) {
1422 Int_t stsHitIndex = track->GetStsHitIndex(i);
1423 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
1424 TVector3 position;
1425 stsHit->Position(position);
1426 AllHitsOfTrack.push_back(position);
1427 }
1428
1429 return AllHitsOfTrack;
1430}
1431
1433 std::vector<TVector3> track_2)
1434{
1435 double FinalAngle = 400;
1436
1437 int hits_1 = track_1.size();
1438 int hits_2 = track_2.size();
1439
1440 double Xpart1 = 0;
1441 double Ypart1 = 0;
1442 double Zpart1 = 0;
1443 double Xpart2 = 0;
1444 double Ypart2 = 0;
1445 double Zpart2 = 0;
1446
1447 TVector3 last1 = track_1[hits_1 - 1];
1448 TVector3 last2 = track_2[hits_2 - 1];
1449
1450 // // check difference in 2 cm, because of two slices of every STS and Mvd stations
1451 if (TMath::Abs(last1.Z() - last2.Z()) > 2
1452 && last1.Z() > last2.Z()) { // if last hits are in different stations --> try to find the latest common station
1453 for (int i = hits_1 - 2; i > -1; i--) { // start from second last station
1454 if (TMath::Abs(last1.Z() - last2.Z()) < 2) continue;
1455 last1 = track_1[i];
1456 Xpart1 = last1.X();
1457 Ypart1 = last1.Y();
1458 Zpart1 = last1.Z();
1459 }
1460 }
1461
1462 if (TMath::Abs(last1.Z() - last2.Z()) > 2
1463 && last1.Z() < last2.Z()) { // if last hits are in different stations --> try to find the latest common station
1464 for (int i = hits_2 - 2; i > -1; i--) { // start from second last station
1465 if (TMath::Abs(last1.Z() - last2.Z()) < 2) continue;
1466 last2 = track_2[i];
1467 Xpart2 = last2.X();
1468 Ypart2 = last2.Y();
1469 Zpart2 = last2.Z();
1470 }
1471 }
1472
1473 // calculate angle if we have found common station
1474 if (TMath::Abs(Zpart1 - Zpart2) < 2 && Zpart1 != 0 && Zpart2 != 0) {
1475 FinalAngle = TMath::ATan2(Ypart1 - Ypart2, Xpart1 - Xpart2) * (180 / TMath::Pi());
1476 }
1477
1478 return TMath::Abs(TMath::Abs(FinalAngle) - 180);
1479}
1480
1481
1483{
1484 double FinalAngle = 400;
1485 Int_t hits1sts = Sts_1->GetNofStsHits();
1486 Int_t hits2sts = Sts_2->GetNofStsHits();
1487 Int_t hits1mvd = Sts_1->GetNofMvdHits();
1488 Int_t hits2mvd = Sts_2->GetNofMvdHits();
1489
1490 double Xpart1 = 0;
1491 double Ypart1 = 0;
1492 double Zpart1 = 0;
1493 double Xpart2 = 0;
1494 double Ypart2 = 0;
1495 double Zpart2 = 0;
1496 if (hits1sts > 0) {
1497 Int_t stsHitIndex1 = Sts_1->GetStsHitIndex(hits1sts - 1);
1498 CbmStsHit* stsHit1 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex1);
1499 Xpart1 = stsHit1->GetX();
1500 Ypart1 = stsHit1->GetY();
1501 Zpart1 = stsHit1->GetZ();
1502 }
1503 else {
1504 Int_t mvdHitIndex1 = Sts_1->GetMvdHitIndex(hits1mvd - 1);
1505 CbmMvdHit* mvdHit1 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex1);
1506 Xpart1 = mvdHit1->GetX();
1507 Ypart1 = mvdHit1->GetY();
1508 Zpart1 = mvdHit1->GetZ();
1509 }
1510
1511 if (hits2sts > 0) {
1512 Int_t stsHitIndex2 = Sts_2->GetStsHitIndex(hits2sts - 1);
1513 CbmStsHit* stsHit2 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex2);
1514 Xpart2 = stsHit2->GetX();
1515 Ypart2 = stsHit2->GetY();
1516 Zpart2 = stsHit2->GetZ();
1517 }
1518 else {
1519 Int_t mvdHitIndex2 = Sts_2->GetMvdHitIndex(hits2mvd - 1);
1520 CbmMvdHit* mvdHit2 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex2);
1521 Xpart2 = mvdHit2->GetX();
1522 Ypart2 = mvdHit2->GetY();
1523 Zpart2 = mvdHit2->GetZ();
1524 }
1525
1526 // check difference in 2 cm, because of two slices of every STS and Mvd stations
1527 if (TMath::Abs(Zpart1 - Zpart2) > 2
1528 && Zpart1 > Zpart2) { // if last hits are in different stations --> try to find the latest common station
1529 for (int i = hits1sts - 2; i > -1; i--) { // start from second last station
1530 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
1531 Int_t stsHitIndex = Sts_1->GetStsHitIndex(i);
1532 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
1533 Xpart1 = stsHit->GetX();
1534 Ypart1 = stsHit->GetY();
1535 Zpart1 = stsHit->GetZ();
1536 }
1537 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 > Zpart2) {
1538 for (int i = hits1mvd - 2; i > -1; i--) {
1539 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
1540 Int_t mvdHitIndex = Sts_1->GetMvdHitIndex(i);
1541 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
1542 Xpart1 = mvdHit->GetX();
1543 Ypart1 = mvdHit->GetY();
1544 Zpart1 = mvdHit->GetZ();
1545 }
1546 }
1547 }
1548
1549 if (TMath::Abs(Zpart1 - Zpart2) > 2
1550 && Zpart1 < Zpart2) { // if last hits are in different stations --> try to find the latest common station
1551 for (int i = hits2sts - 2; i > -1; i--) { // start from second last station
1552 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
1553 Int_t stsHitIndex = Sts_2->GetStsHitIndex(i);
1554 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
1555 Xpart2 = stsHit->GetX();
1556 Ypart2 = stsHit->GetY();
1557 Zpart2 = stsHit->GetZ();
1558 }
1559 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 < Zpart2) {
1560 for (int i = hits2mvd - 2; i > -1; i--) {
1561 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
1562 Int_t mvdHitIndex = Sts_2->GetMvdHitIndex(i);
1563 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
1564 Xpart2 = mvdHit->GetX();
1565 Ypart2 = mvdHit->GetY();
1566 Zpart2 = mvdHit->GetZ();
1567 }
1568 }
1569 }
1570
1571 // calculate angle if we found common station
1572 if (TMath::Abs(Zpart1 - Zpart2) < 2 && Zpart1 != 0 && Zpart2 != 0) {
1573 FinalAngle = TMath::ATan2(Ypart1 - Ypart2, Xpart1 - Xpart2) * (180 / TMath::Pi());
1574 }
1575
1576 return TMath::Abs(TMath::Abs(FinalAngle) - 180);
1577}
1578
1580{
1581 double FinalAngle = 400;
1582 Int_t hits1sts = Sts_1->GetNofStsHits();
1583 Int_t hits2sts = Sts_2->GetNofStsHits();
1584 Int_t hits1mvd = Sts_1->GetNofMvdHits();
1585 Int_t hits2mvd = Sts_2->GetNofMvdHits();
1586
1587 double Xpart1 = 0;
1588 double Ypart1 = 0;
1589 double Zpart1 = 0;
1590 double Xpart2 = 0;
1591 double Ypart2 = 0;
1592 double Zpart2 = 0;
1593 if (hits1mvd > 0) {
1594 Int_t mvdHitIndex1 = Sts_1->GetMvdHitIndex(0);
1595 CbmMvdHit* mvdHit1 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex1);
1596 Xpart1 = mvdHit1->GetX();
1597 Ypart1 = mvdHit1->GetY();
1598 Zpart1 = mvdHit1->GetZ();
1599 }
1600 else {
1601 Int_t stsHitIndex1 = Sts_1->GetStsHitIndex(0);
1602 CbmStsHit* stsHit1 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex1);
1603 Xpart1 = stsHit1->GetX();
1604 Ypart1 = stsHit1->GetY();
1605 Zpart1 = stsHit1->GetZ();
1606 }
1607
1608 if (hits2mvd > 0) {
1609 Int_t mvdHitIndex2 = Sts_2->GetMvdHitIndex(0);
1610 CbmMvdHit* mvdHit2 = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex2);
1611 Xpart2 = mvdHit2->GetX();
1612 Ypart2 = mvdHit2->GetY();
1613 Zpart2 = mvdHit2->GetZ();
1614 }
1615 else {
1616 Int_t stsHitIndex2 = Sts_2->GetStsHitIndex(0);
1617 CbmStsHit* stsHit2 = (CbmStsHit*) fArrayStsHit->At(stsHitIndex2);
1618 Xpart2 = stsHit2->GetX();
1619 Ypart2 = stsHit2->GetY();
1620 Zpart2 = stsHit2->GetZ();
1621 }
1622
1623 // check difference in 2 cm, because of two slices of every STS and Mvd stations
1624 if (TMath::Abs(Zpart1 - Zpart2) > 2
1625 && Zpart1 < Zpart2) { // if first hits are in different stations --> try to find the earliest common station
1626 for (int i = 1; i < hits1mvd; i++) { // start from second hit
1627 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
1628 Int_t mvdHitIndex = Sts_1->GetMvdHitIndex(i);
1629 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
1630 Xpart1 = mvdHit->GetX();
1631 Ypart1 = mvdHit->GetY();
1632 Zpart1 = mvdHit->GetZ();
1633 }
1634 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 < Zpart2) {
1635 for (int i = 0; i < hits1sts; i++) {
1636 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
1637 Int_t stsHitIndex = Sts_1->GetStsHitIndex(i);
1638 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
1639 Xpart1 = stsHit->GetX();
1640 Ypart1 = stsHit->GetY();
1641 Zpart1 = stsHit->GetZ();
1642 }
1643 }
1644 }
1645
1646 if (TMath::Abs(Zpart1 - Zpart2) > 2
1647 && Zpart1 > Zpart2) { // if first hits are in different stations --> try to find the earliest common station
1648 for (int i = 1; i < hits2mvd; i++) { // start from second hit
1649 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
1650 Int_t mvdHitIndex = Sts_2->GetMvdHitIndex(i);
1651 CbmMvdHit* mvdHit = (CbmMvdHit*) fArrayMvdHit->At(mvdHitIndex);
1652 Xpart2 = mvdHit->GetX();
1653 Ypart2 = mvdHit->GetY();
1654 Zpart2 = mvdHit->GetZ();
1655 }
1656 if (TMath::Abs(Zpart1 - Zpart2) > 2 && Zpart1 > Zpart2) {
1657 for (int i = 0; i < hits2sts; i++) {
1658 if (TMath::Abs(Zpart1 - Zpart2) < 2) continue;
1659 Int_t stsHitIndex = Sts_2->GetStsHitIndex(i);
1660 CbmStsHit* stsHit = (CbmStsHit*) fArrayStsHit->At(stsHitIndex);
1661 Xpart2 = stsHit->GetX();
1662 Ypart2 = stsHit->GetY();
1663 Zpart2 = stsHit->GetZ();
1664 }
1665 }
1666 }
1667
1668 // calculate angle if we found common station
1669 if (TMath::Abs(Zpart1 - Zpart2) < 2 && Zpart1 != 0 && Zpart2 != 0) {
1670 FinalAngle = TMath::ATan2(Ypart1 - Ypart2, Xpart1 - Xpart2) * (180 / TMath::Pi());
1671 }
1672
1673 return TMath::Abs(TMath::Abs(FinalAngle) - 180);
1674}
1675
1677// mix particles with the same charge TARGET
1678{
1679 int nof_minus = CDP_LK_EMT_momenta_minus_Target.size();
1680 for (int a = 0; a < nof_minus - 1; a++) {
1681 for (int b = a + 1; b < nof_minus; b++) {
1683 TVector3 e1 = CDP_LK_EMT_momenta_minus_Target[a];
1684 TVector3 e2 = CDP_LK_EMT_momenta_minus_Target[b];
1687
1688 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
1689 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
1690 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
1691
1692 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
1693 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
1694
1695 // cuts
1696 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
1697 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
1698 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
1699
1701
1702 if (params.fRapidity != params.fRapidity) continue;
1703 if (params.fPt != params.fPt) continue;
1704 if (params.fRapidity >= 4) continue;
1705 if (params.fPt >= 3) continue;
1706
1707 double rap_step = 0.4;
1708 double pt_step = 0.1;
1709 int rap_coef = params.fRapidity / rap_step;
1710 int pt_coef = params.fPt / pt_step;
1711 double weight_all = 0;
1712 double weight_two = 0;
1713 double weight_onetwo = 0;
1714 if (corr_all[rap_coef][pt_coef] != 0) weight_all = 1 / corr_all[rap_coef][pt_coef];
1715 if (corr_two[rap_coef][pt_coef] != 0) weight_two = 1 / corr_two[rap_coef][pt_coef];
1716 if (corr_onetwo[rap_coef][pt_coef] != 0) weight_onetwo = 1 / corr_onetwo[rap_coef][pt_coef];
1717
1718 if (weight_all > thresholdweight) weight_all = 0;
1719 if (weight_two > thresholdweight) weight_two = 0;
1720 if (weight_onetwo > thresholdweight) weight_onetwo = 0;
1721
1723
1724 CDP_LK_EMT_Pt_all_Target->Fill(params.fPt, weight_all);
1725 if (rings_amount == 2) CDP_LK_EMT_Pt_two_Target->Fill(params.fPt, weight_two);
1726 if ((rings_amount == 1 || rings_amount == 2)) CDP_LK_EMT_Pt_onetwo_Target->Fill(params.fPt, weight_onetwo);
1727 CDP_LK_EMT_Pt_all_Both->Fill(params.fPt, weight_all);
1728 if (rings_amount == 2) CDP_LK_EMT_Pt_two_Both->Fill(params.fPt, weight_two);
1729 if ((rings_amount == 1 || rings_amount == 2)) CDP_LK_EMT_Pt_onetwo_Both->Fill(params.fPt, weight_onetwo);
1730 }
1731 }
1732
1733
1734 int nof_plus = CDP_LK_EMT_momenta_plus_Target.size();
1735 for (int a = 0; a < nof_plus - 1; a++) {
1736 for (int b = a + 1; b < nof_plus; b++) {
1738 TVector3 e1 = CDP_LK_EMT_momenta_plus_Target[a];
1739 TVector3 e2 = CDP_LK_EMT_momenta_plus_Target[b];
1742
1743 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
1744 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
1745 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
1746
1747 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
1748 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
1749
1750 // cuts
1751 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
1752 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
1753 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
1754
1756
1757 if (params.fRapidity != params.fRapidity) continue;
1758 if (params.fPt != params.fPt) continue;
1759 if (params.fRapidity >= 4) continue;
1760 if (params.fPt >= 3) continue;
1761
1762 double rap_step = 0.4;
1763 double pt_step = 0.1;
1764 int rap_coef = params.fRapidity / rap_step;
1765 int pt_coef = params.fPt / pt_step;
1766 double weight_all = 0;
1767 double weight_two = 0;
1768 double weight_onetwo = 0;
1769 if (corr_all[rap_coef][pt_coef] != 0) weight_all = 1 / corr_all[rap_coef][pt_coef];
1770 if (corr_two[rap_coef][pt_coef] != 0) weight_two = 1 / corr_two[rap_coef][pt_coef];
1771 if (corr_onetwo[rap_coef][pt_coef] != 0) weight_onetwo = 1 / corr_onetwo[rap_coef][pt_coef];
1772
1773 if (weight_all > thresholdweight) weight_all = 0;
1774 if (weight_two > thresholdweight) weight_two = 0;
1775 if (weight_onetwo > thresholdweight) weight_onetwo = 0;
1776
1778
1779 CDP_LK_EMT_Pt_all_Target->Fill(params.fPt, weight_all);
1780 if (rings_amount == 2) CDP_LK_EMT_Pt_two_Target->Fill(params.fPt, weight_two);
1781 if ((rings_amount == 1 || rings_amount == 2)) CDP_LK_EMT_Pt_onetwo_Target->Fill(params.fPt, weight_onetwo);
1782 CDP_LK_EMT_Pt_all_Both->Fill(params.fPt, weight_all);
1783 if (rings_amount == 2) CDP_LK_EMT_Pt_two_Both->Fill(params.fPt, weight_two);
1784 if ((rings_amount == 1 || rings_amount == 2)) CDP_LK_EMT_Pt_onetwo_Both->Fill(params.fPt, weight_onetwo);
1785 }
1786 }
1787}
1788
1790// mix particles with the same charge OUTSIDE
1791{
1792 int nof_minus = CDP_LK_EMT_NofRings_minus_Outside.size();
1793 for (int a = 0; a < nof_minus - 1; a++) {
1794 for (int b = a + 1; b < nof_minus; b++) {
1798
1799 KFParticle electron;
1801 KFParticle positron;
1803 const KFParticle* daughters[2] = {&electron, &positron};
1804 KFParticle intersection;
1805 intersection.Construct(daughters, 2);
1806
1807 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
1808
1809 TVector3 e1 = CbmKresFunctions::FitToVertex(sts1, intersection.GetX(), intersection.GetY(), intersection.GetZ());
1810 TVector3 e2 = CbmKresFunctions::FitToVertex(sts2, intersection.GetX(), intersection.GetY(), intersection.GetZ());
1811
1812 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
1813 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
1814 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
1815
1816 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
1817 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
1818
1819 // cuts
1820 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
1821 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
1822 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
1823
1825
1826 if (params.fRapidity != params.fRapidity) continue;
1827 if (params.fPt != params.fPt) continue;
1828 if (params.fRapidity >= 4) continue;
1829 if (params.fPt >= 3) continue;
1830
1831 double rap_step = 0.4;
1832 double pt_step = 0.1;
1833 int rap_coef = params.fRapidity / rap_step;
1834 int pt_coef = params.fPt / pt_step;
1835 double weight_all = 0;
1836 double weight_two = 0;
1837 double weight_onetwo = 0;
1838 if (corr_all[rap_coef][pt_coef] != 0) weight_all = 1 / corr_all[rap_coef][pt_coef];
1839 if (corr_two[rap_coef][pt_coef] != 0) weight_two = 1 / corr_two[rap_coef][pt_coef];
1840 if (corr_onetwo[rap_coef][pt_coef] != 0) weight_onetwo = 1 / corr_onetwo[rap_coef][pt_coef];
1841
1842 if (weight_all > thresholdweight) weight_all = 0;
1843 if (weight_two > thresholdweight) weight_two = 0;
1844 if (weight_onetwo > thresholdweight) weight_onetwo = 0;
1845
1847
1848 CDP_LK_EMT_Pt_all_Outside->Fill(params.fPt, weight_all);
1849 if (rings_amount == 2) CDP_LK_EMT_Pt_two_Outside->Fill(params.fPt, weight_two);
1850 if ((rings_amount == 1 || rings_amount == 2)) CDP_LK_EMT_Pt_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1851 CDP_LK_EMT_Pt_all_Both->Fill(params.fPt, weight_all);
1852 if (rings_amount == 2) CDP_LK_EMT_Pt_two_Both->Fill(params.fPt, weight_two);
1853 if ((rings_amount == 1 || rings_amount == 2)) CDP_LK_EMT_Pt_onetwo_Both->Fill(params.fPt, weight_onetwo);
1854 }
1855 }
1856
1857
1858 int nof_plus = CDP_LK_EMT_NofRings_plus_Outside.size();
1859 for (int a = 0; a < nof_plus - 1; a++) {
1860 for (int b = a + 1; b < nof_plus; b++) {
1864
1865 KFParticle electron;
1867 KFParticle positron;
1869 const KFParticle* daughters[2] = {&electron, &positron};
1870 KFParticle intersection;
1871 intersection.Construct(daughters, 2);
1872
1873 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
1874
1875 TVector3 e1 = CbmKresFunctions::FitToVertex(sts1, intersection.GetX(), intersection.GetY(), intersection.GetZ());
1876 TVector3 e2 = CbmKresFunctions::FitToVertex(sts2, intersection.GetX(), intersection.GetY(), intersection.GetZ());
1877
1878 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
1879 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
1880 double PlaneAngle_last = CalculatePlaneAngle_last(sts1, sts2);
1881
1882 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
1883 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
1884
1885 // cuts
1886 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
1887 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
1888 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
1889
1891
1892 if (params.fRapidity != params.fRapidity) continue;
1893 if (params.fPt != params.fPt) continue;
1894 if (params.fRapidity >= 4) continue;
1895 if (params.fPt >= 3) continue;
1896
1897 double rap_step = 0.4;
1898 double pt_step = 0.1;
1899 int rap_coef = params.fRapidity / rap_step;
1900 int pt_coef = params.fPt / pt_step;
1901 double weight_all = 0;
1902 double weight_two = 0;
1903 double weight_onetwo = 0;
1904 if (corr_all[rap_coef][pt_coef] != 0) weight_all = 1 / corr_all[rap_coef][pt_coef];
1905 if (corr_two[rap_coef][pt_coef] != 0) weight_two = 1 / corr_two[rap_coef][pt_coef];
1906 if (corr_onetwo[rap_coef][pt_coef] != 0) weight_onetwo = 1 / corr_onetwo[rap_coef][pt_coef];
1907
1908 if (weight_all > thresholdweight) weight_all = 0;
1909 if (weight_two > thresholdweight) weight_two = 0;
1910 if (weight_onetwo > thresholdweight) weight_onetwo = 0;
1911
1913
1914 CDP_LK_EMT_Pt_all_Outside->Fill(params.fPt, weight_all);
1915 if (rings_amount == 2) CDP_LK_EMT_Pt_two_Outside->Fill(params.fPt, weight_two);
1916 if ((rings_amount == 1 || rings_amount == 2)) CDP_LK_EMT_Pt_onetwo_Outside->Fill(params.fPt, weight_onetwo);
1917 CDP_LK_EMT_Pt_all_Both->Fill(params.fPt, weight_all);
1918 if (rings_amount == 2) CDP_LK_EMT_Pt_two_Both->Fill(params.fPt, weight_two);
1919 if ((rings_amount == 1 || rings_amount == 2)) CDP_LK_EMT_Pt_onetwo_Both->Fill(params.fPt, weight_onetwo);
1920 }
1921 }
1922}
1923
1924
1925void CbmKresConversionCorrectedPhotons::CDP_Mixing_Target(double AngleCut, double InvMassCut)
1926// TARGET
1927{
1928 int nof_Target = CDP_EMT_Event_minus_Target.size();
1929 cout << "Mixing for corrected direct photons in Target - nof entries " << nof_Target << endl;
1930
1931 for (size_t a = 0; a < CDP_EMT_Event_minus_Target.size(); a++) {
1932 for (size_t b = 0; b < CDP_EMT_Event_plus_Target.size(); b++) {
1934 continue; // to make sure that two particles are from two different events
1935 TVector3 e1 = CDP_EMT_momenta_minus_Target[a];
1936 TVector3 e2 = CDP_EMT_momenta_plus_Target[b];
1937 std::vector<TVector3> hits1 = CDP_EMT_Hits_minus_Target[a];
1938 std::vector<TVector3> hits2 = CDP_EMT_Hits_plus_Target[b];
1939
1940 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
1941 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
1942 double PlaneAngle_last = CalculatePlaneAngle_last_fromHits(hits1, hits2);
1943
1944 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
1945 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, fKFVertex.GetRefZ(), e1, e2);
1946
1947 // cuts
1948 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
1949 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
1950 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
1951
1953
1954 if (params.fRapidity != params.fRapidity) continue;
1955 if (params.fPt != params.fPt) continue;
1956 if (params.fRapidity >= 4) continue;
1957 if (params.fPt >= 3) continue;
1958
1959 double rap_step = 0.4;
1960 double pt_step = 0.1;
1961 int rap_coef = params.fRapidity / rap_step;
1962 int pt_coef = params.fPt / pt_step;
1963 double weight_all = 0;
1964 double weight_two = 0;
1965 double weight_onetwo = 0;
1966 if (corr_all[rap_coef][pt_coef] != 0) weight_all = 1 / corr_all[rap_coef][pt_coef];
1967 if (corr_two[rap_coef][pt_coef] != 0) weight_two = 1 / corr_two[rap_coef][pt_coef];
1968 if (corr_onetwo[rap_coef][pt_coef] != 0) weight_onetwo = 1 / corr_onetwo[rap_coef][pt_coef];
1969
1970 if (weight_all > thresholdweight) weight_all = 0;
1971 if (weight_two > thresholdweight) weight_two = 0;
1972 if (weight_onetwo > thresholdweight) weight_onetwo = 0;
1973
1975
1976 CDP_EMT_Pt_all_Target->Fill(params.fPt, weight_all);
1977 CDP_EMT_Pt_all_Both->Fill(params.fPt, weight_all);
1978 if (rings_amount == 2) {
1979 CDP_EMT_Pt_two_Target->Fill(params.fPt, weight_two);
1980 CDP_EMT_Pt_two_Both->Fill(params.fPt, weight_two);
1981 }
1982 if ((rings_amount == 1 || rings_amount == 2)) {
1983 CDP_EMT_Pt_onetwo_Target->Fill(params.fPt, weight_two);
1984 CDP_EMT_Pt_onetwo_Both->Fill(params.fPt, weight_two);
1985 }
1986 }
1987 }
1988}
1989
1990
1991void CbmKresConversionCorrectedPhotons::CDP_Mixing_Outside(double AngleCut, double InvMassCut)
1992// OUTSIDE
1993{
1994 int nof_Outside = CDP_EMT_Event_minus_Outside.size();
1995 cout << "Mixing for corrected direct photons in Outside - nof entries " << nof_Outside << endl;
1996
1997 for (size_t a = 0; a < CDP_EMT_Event_minus_Outside.size(); a++) {
1998 for (size_t b = 0; b < CDP_EMT_Event_plus_Outside.size(); b++) {
2000 continue; // to make sure that two particles are from two different events
2001
2002 KFParticle electron = CDP_EMT_KFTrack_minus_Outside[a];
2003 KFParticle positron = CDP_EMT_KFTrack_plus_Outside[b];
2004
2005 const KFParticle* daughters[2] = {&electron, &positron};
2006 KFParticle intersection;
2007 intersection.Construct(daughters, 2);
2008
2009 if (intersection.GetZ() > 75 || intersection.GetZ() < -5) continue; // kick weird intersections
2010
2011 TVector3 e1(electron.KFParticleBase::Px(), electron.KFParticleBase::Py(), electron.KFParticleBase::Pz());
2012 TVector3 e2(positron.KFParticleBase::Px(), positron.KFParticleBase::Py(), positron.KFParticleBase::Pz());
2013
2014 std::vector<TVector3> hits1 = CDP_EMT_Hits_minus_Outside[a];
2015 std::vector<TVector3> hits2 = CDP_EMT_Hits_plus_Outside[b];
2016
2017 double InvmassReco = CbmKresFunctions::Invmass_2particles_RECO(e1, e2);
2018 double OpeningAngle = CbmKresFunctions::CalculateOpeningAngle_Reco(e1, e2);
2019 double PlaneAngle_last = CalculatePlaneAngle_last_fromHits(hits1, hits2);
2020
2021 // double AnnValue = fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(), e1, e2);
2022 fAnnPhotonsSelection->DoSelect(InvmassReco, OpeningAngle, PlaneAngle_last, intersection.GetZ(), e1, e2);
2023
2024 // cuts
2025 if (TMath::Abs(OpeningAngle) > AngleCut) continue;
2026 if (TMath::Abs(InvmassReco) > InvMassCut) continue;
2027 // if (AnnValue < 0.9 || AnnValue > 1.1) continue;
2028
2030
2031 if (params.fRapidity != params.fRapidity) continue;
2032 if (params.fPt != params.fPt) continue;
2033 if (params.fRapidity >= 4) continue;
2034 if (params.fPt >= 3) continue;
2035
2036 double rap_step = 0.4;
2037 double pt_step = 0.1;
2038 int rap_coef = params.fRapidity / rap_step;
2039 int pt_coef = params.fPt / pt_step;
2040 double weight_all = 0;
2041 double weight_two = 0;
2042 double weight_onetwo = 0;
2043 if (corr_all[rap_coef][pt_coef] != 0) weight_all = 1 / corr_all[rap_coef][pt_coef];
2044 if (corr_two[rap_coef][pt_coef] != 0) weight_two = 1 / corr_two[rap_coef][pt_coef];
2045 if (corr_onetwo[rap_coef][pt_coef] != 0) weight_onetwo = 1 / corr_onetwo[rap_coef][pt_coef];
2046
2047 if (weight_all > thresholdweight) weight_all = 0;
2048 if (weight_two > thresholdweight) weight_two = 0;
2049 if (weight_onetwo > thresholdweight) weight_onetwo = 0;
2050
2052
2053 CDP_EMT_Pt_all_Outside->Fill(params.fPt, weight_all);
2054 CDP_EMT_Pt_all_Both->Fill(params.fPt, weight_all);
2055 if (rings_amount == 2) {
2056 CDP_EMT_Pt_two_Outside->Fill(params.fPt, weight_two);
2057 CDP_EMT_Pt_two_Both->Fill(params.fPt, weight_two);
2058 }
2059 if ((rings_amount == 1 || rings_amount == 2)) {
2060 CDP_EMT_Pt_onetwo_Outside->Fill(params.fPt, weight_two);
2061 CDP_EMT_Pt_onetwo_Both->Fill(params.fPt, weight_two);
2062 }
2063 }
2064 }
2065}
2066
2067
2069{
2070 gDirectory->mkdir("corrected photons");
2071 gDirectory->cd("corrected photons");
2072
2073 if (UseCorrection) { fGammaCorrection->Finish(); }
2074
2075 gDirectory->mkdir("Target");
2076 gDirectory->cd("Target");
2077 gDirectory->mkdir("CheckCuts_Target");
2078 gDirectory->cd("CheckCuts_Target");
2079 for (UInt_t i = 0; i < fHistoList_dp_cuts_Target.size(); i++) {
2080 fHistoList_dp_cuts_Target[i]->Write();
2081 }
2082 gDirectory->cd("..");
2083 gDirectory->mkdir("all");
2084 gDirectory->cd("all");
2085 for (UInt_t i = 0; i < fHistoList_dp_all_Target.size(); i++) {
2086 fHistoList_dp_all_Target[i]->Write();
2087 }
2088 gDirectory->cd("..");
2089 gDirectory->mkdir("two");
2090 gDirectory->cd("two");
2091 for (UInt_t i = 0; i < fHistoList_dp_two_Target.size(); i++) {
2092 fHistoList_dp_two_Target[i]->Write();
2093 }
2094 gDirectory->cd("..");
2095 gDirectory->mkdir("onetwo");
2096 gDirectory->cd("onetwo");
2097 for (UInt_t i = 0; i < fHistoList_dp_onetwo_Target.size(); i++) {
2098 fHistoList_dp_onetwo_Target[i]->Write();
2099 }
2100 gDirectory->cd("..");
2101 for (UInt_t i = 0; i < fHistoList_dp_Target.size(); i++) {
2102 fHistoList_dp_Target[i]->Write();
2103 }
2104 gDirectory->cd("..");
2105
2106
2107 gDirectory->mkdir("Outside");
2108 gDirectory->cd("Outside");
2109 gDirectory->mkdir("CheckCuts_Outside");
2110 gDirectory->cd("CheckCuts_Outside");
2111 for (UInt_t i = 0; i < fHistoList_dp_cuts_Outside.size(); i++) {
2112 fHistoList_dp_cuts_Outside[i]->Write();
2113 }
2114 gDirectory->cd("..");
2115 gDirectory->mkdir("all");
2116 gDirectory->cd("all");
2117 for (UInt_t i = 0; i < fHistoList_dp_all_Outside.size(); i++) {
2118 fHistoList_dp_all_Outside[i]->Write();
2119 }
2120 gDirectory->cd("..");
2121 gDirectory->mkdir("two");
2122 gDirectory->cd("two");
2123 for (UInt_t i = 0; i < fHistoList_dp_two_Outside.size(); i++) {
2124 fHistoList_dp_two_Outside[i]->Write();
2125 }
2126 gDirectory->cd("..");
2127 gDirectory->mkdir("onetwo");
2128 gDirectory->cd("onetwo");
2129 for (UInt_t i = 0; i < fHistoList_dp_onetwo_Outside.size(); i++) {
2130 fHistoList_dp_onetwo_Outside[i]->Write();
2131 }
2132 gDirectory->cd("..");
2133 for (UInt_t i = 0; i < fHistoList_dp_Outside.size(); i++) {
2134 fHistoList_dp_Outside[i]->Write();
2135 }
2136 gDirectory->cd("..");
2137
2138
2139 gDirectory->mkdir("Both");
2140 gDirectory->cd("Both");
2141 gDirectory->mkdir("CheckCuts_Both");
2142 gDirectory->cd("CheckCuts_Both");
2143 for (UInt_t i = 0; i < fHistoList_dp_cuts_Both.size(); i++) {
2144 fHistoList_dp_cuts_Both[i]->Write();
2145 }
2146 gDirectory->cd("..");
2147 gDirectory->mkdir("all");
2148 gDirectory->cd("all");
2149 for (UInt_t i = 0; i < fHistoList_dp_all_Both.size(); i++) {
2150 fHistoList_dp_all_Both[i]->Write();
2151 }
2152 gDirectory->cd("..");
2153 gDirectory->mkdir("two");
2154 gDirectory->cd("two");
2155 for (UInt_t i = 0; i < fHistoList_dp_two_Both.size(); i++) {
2156 fHistoList_dp_two_Both[i]->Write();
2157 }
2158 gDirectory->cd("..");
2159 gDirectory->mkdir("onetwo");
2160 gDirectory->cd("onetwo");
2161 for (UInt_t i = 0; i < fHistoList_dp_onetwo_Both.size(); i++) {
2162 fHistoList_dp_onetwo_Both[i]->Write();
2163 }
2164 gDirectory->cd("..");
2165 for (UInt_t i = 0; i < fHistoList_dp_Both.size(); i++) {
2166 fHistoList_dp_Both[i]->Write();
2167 }
2168 gDirectory->cd("..");
2169
2170
2171 gDirectory->cd("..");
2172}
2173
2174
2176{
2177 // Target
2178 CMother_PDG_Target = new TH1D("CMother_PDG_Target", "CMother_PDG_Target; Id;#", 1000, -10, 490);
2180 CGrandMother_PDG_Target = new TH1D("CGrandMother_PDG_Target", "CGrandMother_PDG_Target; Id;#", 1000, -10, 490);
2182
2183 // Outside
2184 CMother_PDG_Outside = new TH1D("CMother_PDG_Outside", "CMother_PDG_Outside; Id;#", 1000, -10, 490);
2186 CGrandMother_PDG_Outside = new TH1D("CGrandMother_PDG_Outside", "CGrandMother_PDG_Outside; Id;#", 1000, -10, 490);
2188
2189 // Both
2191 new TH2D("CPdg_vs_Distance_for_dp", "CPdg_vs_Distance_for_dp; pdg; distance in cm", 2500, 0, 2499, 500, 0, 50);
2193 CP_vs_Distance_for_dp = new TH2D("CP_vs_Distance_for_dp",
2194 "CDistance between projected track and center of the ring (for e+ "
2195 "and e-); P in GeV/c^{2}; distance in cm",
2196 300, 0, 3, 300, 0, 15);
2198 CDP_AnnTruePairs = new TH1D("CDP_AnnTruePairs", "CDP_AnnTruePairs; Ann value ;#", 100, -1.2, 1.2);
2200 CDP_AnnFalsePairs = new TH1D("CDP_AnnFalsePairs", "CDP_AnnFalsePairs; Ann value ;#", 100, -1.2, 1.2);
2203 new TH1D("CDP_AnnTruePairs_AfterCuts", "CDP_AnnTruePairs_AfterCuts; Ann value ;#", 100, -1.2, 1.2);
2206 new TH1D("CDP_AnnFalsePairs_AfterCuts", "CDP_AnnFalsePairs_AfterCuts; Ann value ;#", 100, -1.2, 1.2);
2208
2209
2212 CDP_candidates_InvMass_vs_OA_Both = new TH2D("CDP_candidates_InvMass_vs_OA_Both",
2213 "CDP_candidates_InvMass_vs_OA_Both; invariant mass in GeV/c^{2}; "
2214 "opening angle in degree",
2215 500, 0, 0.5, 500, 0, 50);
2217 CDP_InvMass_vs_OA_Both = new TH2D("CDP_InvMass_vs_OA_Both",
2218 "CDP_InvMass_vs_OA_Both; invariant mass in "
2219 "GeV/c^{2}; opening angle in degree",
2220 500, 0, 0.5, 500, 0, 50);
2222 CDP_candidates_InvMass_Both = new TH1D("CDP_candidates_InvMass_Both",
2223 "CDP_candidates_InvMass_Both; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2225 CDP_InvMass_Both = new TH1D("CDP_InvMass_Both", "CDP_InvMass_Both; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2228 new TH1D("CDP_candidates_OA_Both", "CDP_candidates_OA_Both; opening angle in degree;#", 300, -0.1, 29.9);
2230 CDP_OA_Both = new TH1D("CDP_OA_Both", "CDP_OA_Both; opening angle in degree;#", 300, -0.1, 29.9);
2233 new TH1D("CDP_candidates_PlaneAngles_last_Both", "CDP_candidates_PlaneAngles_last_Both; #theta angle in degree;#",
2234 720, -1., 179.);
2237 new TH1D("CDP_PlaneAngles_last_Both", "CDP_PlaneAngles_last_Both; #theta angle in degree;#", 720, -1., 179.);
2240 new TH1D("CDP_candidates_PlaneAngles_first_Both", "CDP_candidates_PlaneAngles_first_Both; #theta angle in degree;#",
2241 720, -1., 179.);
2244 new TH1D("CDP_PlaneAngles_first_Both", "CDP_PlaneAngles_first_Both; #theta angle in degree;#", 720, -1., 179.);
2246
2248 CDP_candidates_InvMass_vs_OA_Target = new TH2D("CDP_candidates_InvMass_vs_OA_Target",
2249 "CDP_candidates_InvMass_vs_OA_Target; invariant mass in "
2250 "GeV/c^{2}; opening angle in degree",
2251 500, 0, 0.5, 500, 0, 50);
2253 CDP_InvMass_vs_OA_Target = new TH2D("CDP_InvMass_vs_OA_Target",
2254 "CDP_InvMass_vs_OA_Target; invariant mass in GeV/c^{2}; opening "
2255 "angle in degree",
2256 500, 0, 0.5, 500, 0, 50);
2259 "CDP_candidates_InvMass_Target", "CDP_candidates_InvMass_Target; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2262 new TH1D("CDP_InvMass_Target", "CDP_InvMass_Target; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2265 new TH1D("CDP_candidates_OA_Target", "CDP_candidates_OA_Target; opening angle in degree;#", 300, -0.1, 29.9);
2267 CDP_OA_Target = new TH1D("CDP_OA_Target", "CDP_OA_Target; opening angle in degree;#", 300, -0.1, 29.9);
2270 new TH1D("CDP_candidates_PlaneAngles_last_Target",
2271 "CDP_candidates_PlaneAngles_last_Target; #theta angle in degree;#", 720, -1., 179.);
2274 new TH1D("CDP_PlaneAngles_last_Target", "CDP_PlaneAngles_last_Target; #theta angle in degree;#", 720, -1., 179.);
2277 new TH1D("CDP_candidates_PlaneAngles_first_Target",
2278 "CDP_candidates_PlaneAngles_first_Target; #theta angle in degree;#", 720, -1., 179.);
2281 new TH1D("CDP_PlaneAngles_first_Target", "CDP_PlaneAngles_first_Target; #theta angle in degree;#", 720, -1., 179.);
2283
2285 CDP_candidates_InvMass_vs_OA_Outside = new TH2D("CDP_candidates_InvMass_vs_OA_Outside",
2286 "CDP_candidates_InvMass_vs_OA_Outside; invariant mass in "
2287 "GeV/c^{2}; opening angle in degree",
2288 500, 0, 0.5, 500, 0, 50);
2290 CDP_InvMass_vs_OA_Outside = new TH2D("CDP_InvMass_vs_OA_Outside",
2291 "CDP_InvMass_vs_OA_Outside; invariant mass in GeV/c^{2}; opening "
2292 "angle in degree",
2293 500, 0, 0.5, 500, 0, 50);
2296 "CDP_candidates_InvMass_Outside", "CDP_candidates_InvMass_Outside; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2299 new TH1D("CDP_InvMass_Outside", "CDP_InvMass_Outside; invariant mass in GeV/c^{2};#", 510, -0.01, 0.5);
2302 new TH1D("CDP_candidates_OA_Outside", "CDP_candidates_OA_Outside; opening angle in degree;#", 300, -0.1, 29.9);
2304 CDP_OA_Outside = new TH1D("CDP_OA_Outside", "CDP_OA_Outside; opening angle in degree;#", 300, -0.1, 29.9);
2307 new TH1D("CDP_candidates_PlaneAngles_last_Outside",
2308 "CDP_candidates_PlaneAngles_last_Outside; #theta angle in degree;#", 720, -1., 179.);
2311 new TH1D("CDP_PlaneAngles_last_Outside", "CDP_PlaneAngles_last_Outside; #theta angle in degree;#", 720, -1., 179.);
2314 new TH1D("CDP_candidates_PlaneAngles_first_Outside",
2315 "CDP_candidates_PlaneAngles_first_Outside; #theta angle in degree;#", 720, -1., 179.);
2317 CDP_PlaneAngles_first_Outside = new TH1D("CDP_PlaneAngles_first_Outside",
2318 "CDP_PlaneAngles_first_Outside; #theta angle in degree;#", 720, -1., 179.);
2320
2321
2322 // Target => all
2323 CDP_InvMassReco_all_Target = new TH1D("CDP_InvMassReco_all_Target",
2324 "CDP_InvMassReco_all_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2327 new TH1D("CDP_OpeningAngleReco_all_Target", "CDP_OpeningAngleReco_all_Target; angle [deg];#", 45, -0.5, 4.);
2329 CDP_Pdg_all_Target = new TH1D("CDP_Pdg_all_Target", "CDP_Pdg_all_Target; Id;#", 1000, -10, 490);
2331 CDP_P_reco_all_Target = new TH1D("CDP_P_reco_all_Target", "CDP_P_reco_all_Target; P in GeV/c^{2};#", 200, 0, 10);
2333 CDP_Pt_reco_all_Target = new TH1D("CDP_Pt_reco_all_Target", "CDP_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2336 new TH1D("CPh_fromTarget_Pt_reco_all_Target", "CPh_fromTarget_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2339 new TH1D("CPh_fromPions_Pt_reco_all_Target", "CPh_fromPions_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2342 new TH1D("CPh_fromEtas_Pt_reco_all_Target", "CPh_fromEtas_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2345 new TH1D("CPh_fromDalitz_Pt_reco_all_Target", "CPh_fromDalitz_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2348 new TH1D("CPh_fromXi_Pt_reco_all_Target", "CPh_fromXi_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2351 new TH1D("CPh_fromOther_Pt_reco_all_Target", "CPh_fromOther_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2354 "CPh_twoFromTarget_Pt_reco_all_Target", "CPh_twoFromTarget_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2357 new TH1D("CPh_fromCombinatorial_Pt_reco_all_Target",
2358 "CPh_fromCombinatorial_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2361 "CPh_fromConversion_Pt_reco_all_Target", "CPh_fromConversion_Pt_reco_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2364 new TH2D("CPh_pt_vs_rap_est_all_Target", "CPh_pt_vs_rap_est_all_Target; rapidity y; p_{t} in GeV/c ", 10, 0., 4.,
2365 40, 0., 4.);
2368 new TH2D("CPh_pt_vs_rap_est_corr_all_Target", "CPh_pt_vs_rap_est_corr_all_Target; rapidity y; p_{t} in GeV/c ", 10,
2369 0., 4., 40, 0., 4.);
2371
2372 // Target => two
2373 CDP_InvMassReco_two_Target = new TH1D("CDP_InvMassReco_two_Target",
2374 "CDP_InvMassReco_two_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2377 new TH1D("CDP_OpeningAngleReco_two_Target", "CDP_OpeningAngleReco_two_Target; angle [deg];#", 45, -0.5, 4.);
2379 CDP_Pdg_two_Target = new TH1D("CDP_Pdg_two_Target", "CDP_Pdg_two_Target; Id;#", 1000, -10, 490);
2381 CDP_P_reco_two_Target = new TH1D("CDP_P_reco_two_Target", "CDP_P_reco_two_Target; P in GeV/c^{2};#", 200, 0, 10);
2383 CDP_Pt_reco_two_Target = new TH1D("CDP_Pt_reco_two_Target", "CDP_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2386 new TH1D("CPh_fromTarget_Pt_reco_two_Target", "CPh_fromTarget_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2389 new TH1D("CPh_fromPions_Pt_reco_two_Target", "CPh_fromPions_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2392 new TH1D("CPh_fromEtas_Pt_reco_two_Target", "CPh_fromEtas_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2395 new TH1D("CPh_fromDalitz_Pt_reco_two_Target", "CPh_fromDalitz_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2398 new TH1D("CPh_fromXi_Pt_reco_two_Target", "CPh_fromXi_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2401 new TH1D("CPh_fromOther_Pt_reco_two_Target", "CPh_fromOther_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2404 "CPh_twoFromTarget_Pt_reco_two_Target", "CPh_twoFromTarget_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2407 new TH1D("CPh_fromCombinatorial_Pt_reco_two_Target",
2408 "CPh_fromCombinatorial_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2411 "CPh_fromConversion_Pt_reco_two_Target", "CPh_fromConversion_Pt_reco_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2414 new TH2D("CPh_pt_vs_rap_est_two_Target", "CPh_pt_vs_rap_est_two_Target; rapidity y; p_{t} in GeV/c ", 10, 0., 4.,
2415 40, 0., 4.);
2418 new TH2D("CPh_pt_vs_rap_est_corr_two_Target", "CPh_pt_vs_rap_est_corr_two_Target; rapidity y; p_{t} in GeV/c ", 10,
2419 0., 4., 40, 0., 4.);
2421
2422 // Target => onetwo
2424 "CDP_InvMassReco_onetwo_Target", "CDP_InvMassReco_onetwo_Target; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2427 new TH1D("CDP_OpeningAngleReco_onetwo_Target", "CDP_OpeningAngleReco_onetwo_Target; angle [deg];#", 45, -0.5, 4.);
2429 CDP_Pdg_onetwo_Target = new TH1D("CDP_Pdg_onetwo_Target", "CDP_Pdg_onetwo_Target; Id;#", 1000, -10, 490);
2432 new TH1D("CDP_P_reco_onetwo_Target", "CDP_P_reco_onetwo_Target; P in GeV/c^{2};#", 200, 0, 10);
2435 new TH1D("CDP_Pt_reco_onetwo_Target", "CDP_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2438 "CPh_fromTarget_Pt_reco_onetwo_Target", "CPh_fromTarget_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2440 CPh_fromPions_Pt_reco_onetwo_Target = new TH1D("CPh_fromPions_Pt_reco_onetwo_Target",
2441 "CPh_fromPions_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2443 CPh_fromEtas_Pt_reco_onetwo_Target = new TH1D("CPh_fromEtas_Pt_reco_onetwo_Target",
2444 "CPh_fromEtas_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2447 "CPh_fromDalitz_Pt_reco_onetwo_Target", "CPh_fromDalitz_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2450 new TH1D("CPh_fromXi_Pt_reco_onetwo_Target", "CPh_fromXi_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2452 CPh_fromOther_Pt_reco_onetwo_Target = new TH1D("CPh_fromOther_Pt_reco_onetwo_Target",
2453 "CPh_fromOther_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2456 new TH1D("CPh_twoFromTarget_Pt_reco_onetwo_Target", "CPh_twoFromTarget_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#",
2457 30, 0, 3);
2460 new TH1D("CPh_fromCombinatorial_Pt_reco_onetwo_Target",
2461 "CPh_fromCombinatorial_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2464 new TH1D("CPh_fromConversion_Pt_reco_onetwo_Target",
2465 "CPh_fromConversion_Pt_reco_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2468 new TH2D("CPh_pt_vs_rap_est_onetwo_Target", "CPh_pt_vs_rap_est_onetwo_Target; rapidity y; p_{t} in GeV/c ", 10, 0.,
2469 4., 40, 0., 4.);
2472 new TH2D("CPh_pt_vs_rap_est_corr_onetwo_Target",
2473 "CPh_pt_vs_rap_est_corr_onetwo_Target; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
2475
2476
2477 // Outside => all
2478 CDP_InvMassReco_all_Outside = new TH1D(
2479 "CDP_InvMassReco_all_Outside", "CDP_InvMassReco_all_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2482 new TH1D("CDP_OpeningAngleReco_all_Outside", "CDP_OpeningAngleReco_all_Outside; angle [deg];#", 45, -0.5, 4.);
2484 CDP_Pdg_all_Outside = new TH1D("CDP_Pdg_all_Outside", "CDP_Pdg_all_Outside; Id;#", 1000, -10, 490);
2486 CDP_P_reco_all_Outside = new TH1D("CDP_P_reco_all_Outside", "CDP_P_reco_all_Outside; P in GeV/c^{2};#", 200, 0, 10);
2489 new TH1D("CDP_Pt_reco_all_Outside", "CDP_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2491 CPh_fromTarget_Pt_reco_all_Outside = new TH1D("CPh_fromTarget_Pt_reco_all_Outside",
2492 "CPh_fromTarget_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2495 new TH1D("CPh_fromPions_Pt_reco_all_Outside", "CPh_fromPions_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2498 new TH1D("CPh_fromEtas_Pt_reco_all_Outside", "CPh_fromEtas_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2500 CPh_fromDalitz_Pt_reco_all_Outside = new TH1D("CPh_fromDalitz_Pt_reco_all_Outside",
2501 "CPh_fromDalitz_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2504 new TH1D("CPh_fromXi_Pt_reco_all_Outside", "CPh_fromXi_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2507 new TH1D("CPh_fromOther_Pt_reco_all_Outside", "CPh_fromOther_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2510 "CPh_twoFromTarget_Pt_reco_all_Outside", "CPh_twoFromTarget_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2513 new TH1D("CPh_fromCombinatorial_Pt_reco_all_Outside",
2514 "CPh_fromCombinatorial_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2517 "CPh_fromConversion_Pt_reco_all_Outside", "CPh_fromConversion_Pt_reco_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2520 new TH2D("CPh_pt_vs_rap_est_all_Outside", "CPh_pt_vs_rap_est_all_Outside; rapidity y; p_{t} in GeV/c ", 10, 0., 4.,
2521 40, 0., 4.);
2524 new TH2D("CPh_pt_vs_rap_est_corr_all_Outside", "CPh_pt_vs_rap_est_corr_all_Outside; rapidity y; p_{t} in GeV/c ",
2525 10, 0., 4., 40, 0., 4.);
2527
2528 // Outside => two
2529 CDP_InvMassReco_two_Outside = new TH1D(
2530 "CDP_InvMassReco_two_Outside", "CDP_InvMassReco_two_Outside; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2533 new TH1D("CDP_OpeningAngleReco_two_Outside", "CDP_OpeningAngleReco_two_Outside; angle [deg];#", 45, -0.5, 4.);
2535 CDP_Pdg_two_Outside = new TH1D("CDP_Pdg_two_Outside", "CDP_Pdg_two_Outside; Id;#", 1000, -10, 490);
2537 CDP_P_reco_two_Outside = new TH1D("CDP_P_reco_two_Outside", "CDP_P_reco_two_Outside; P in GeV/c^{2};#", 200, 0, 10);
2540 new TH1D("CDP_Pt_reco_two_Outside", "CDP_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2542 CPh_fromTarget_Pt_reco_two_Outside = new TH1D("CPh_fromTarget_Pt_reco_two_Outside",
2543 "CPh_fromTarget_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2546 new TH1D("CPh_fromPions_Pt_reco_two_Outside", "CPh_fromPions_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2549 new TH1D("CPh_fromEtas_Pt_reco_two_Outside", "CPh_fromEtas_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2551 CPh_fromDalitz_Pt_reco_two_Outside = new TH1D("CPh_fromDalitz_Pt_reco_two_Outside",
2552 "CPh_fromDalitz_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2555 new TH1D("CPh_fromXi_Pt_reco_two_Outside", "CPh_fromXi_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2558 new TH1D("CPh_fromOther_Pt_reco_two_Outside", "CPh_fromOther_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2561 "CPh_twoFromTarget_Pt_reco_two_Outside", "CPh_twoFromTarget_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2564 new TH1D("CPh_fromCombinatorial_Pt_reco_two_Outside",
2565 "CPh_fromCombinatorial_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2568 "CPh_fromConversion_Pt_reco_two_Outside", "CPh_fromConversion_Pt_reco_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2571 new TH2D("CPh_pt_vs_rap_est_two_Outside", "CPh_pt_vs_rap_est_two_Outside; rapidity y; p_{t} in GeV/c ", 10, 0., 4.,
2572 40, 0., 4.);
2575 new TH2D("CPh_pt_vs_rap_est_corr_two_Outside", "CPh_pt_vs_rap_est_corr_two_Outside; rapidity y; p_{t} in GeV/c ",
2576 10, 0., 4., 40, 0., 4.);
2578
2579 // Outside => onetwo
2581 new TH1D("CDP_InvMassReco_onetwo_Outside", "CDP_InvMassReco_onetwo_Outside; invariant mass in GeV/c^{2};#", 50,
2582 -0.005, 0.045);
2585 new TH1D("CDP_OpeningAngleReco_onetwo_Outside", "CDP_OpeningAngleReco_onetwo_Outside; angle [deg];#", 45, -0.5, 4.);
2587 CDP_Pdg_onetwo_Outside = new TH1D("CDP_Pdg_onetwo_Outside", "CDP_Pdg_onetwo_Outside; Id;#", 1000, -10, 490);
2590 new TH1D("CDP_P_reco_onetwo_Outside", "CDP_P_reco_onetwo_Outside; P in GeV/c^{2};#", 200, 0, 10);
2593 new TH1D("CDP_Pt_reco_onetwo_Outside", "CDP_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2596 "CPh_fromTarget_Pt_reco_onetwo_Outside", "CPh_fromTarget_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2599 "CPh_fromPions_Pt_reco_onetwo_Outside", "CPh_fromPions_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2601 CPh_fromEtas_Pt_reco_onetwo_Outside = new TH1D("CPh_fromEtas_Pt_reco_onetwo_Outside",
2602 "CPh_fromEtas_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2605 "CPh_fromDalitz_Pt_reco_onetwo_Outside", "CPh_fromDalitz_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2608 new TH1D("CPh_fromXi_Pt_reco_onetwo_Outside", "CPh_fromXi_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2611 "CPh_fromOther_Pt_reco_onetwo_Outside", "CPh_fromOther_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2614 new TH1D("CPh_twoFromTarget_Pt_reco_onetwo_Outside",
2615 "CPh_twoFromTarget_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2618 new TH1D("CPh_fromCombinatorial_Pt_reco_onetwo_Outside",
2619 "CPh_fromCombinatorial_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2622 new TH1D("CPh_fromConversion_Pt_reco_onetwo_Outside",
2623 "CPh_fromConversion_Pt_reco_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2626 new TH2D("CPh_pt_vs_rap_est_onetwo_Outside", "CPh_pt_vs_rap_est_onetwo_Outside; rapidity y; p_{t} in GeV/c ", 10,
2627 0., 4., 40, 0., 4.);
2630 new TH2D("CPh_pt_vs_rap_est_corr_onetwo_Outside",
2631 "CPh_pt_vs_rap_est_corr_onetwo_Outside; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
2633
2634
2635 // Both => all
2637 new TH1D("CDP_InvMassReco_all_Both", "CDP_InvMassReco_all_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2640 new TH1D("CDP_OpeningAngleReco_all_Both", "CDP_OpeningAngleReco_all_Both; angle [deg];#", 45, -0.5, 4.);
2642 CDP_Pdg_all_Both = new TH1D("CDP_Pdg_all_Both", "CDP_Pdg_all_Both; Id;#", 1000, -10, 490);
2644 CDP_P_reco_all_Both = new TH1D("CDP_P_reco_all_Both", "CDP_P_reco_all_Both; P in GeV/c^{2};#", 200, 0, 10);
2646 CDP_Pt_reco_all_Both = new TH1D("CDP_Pt_reco_all_Both", "CDP_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2649 new TH1D("CPh_fromTarget_Pt_reco_all_Both", "CPh_fromTarget_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2652 new TH1D("CPh_fromPions_Pt_reco_all_Both", "CPh_fromPions_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2655 new TH1D("CPh_fromEtas_Pt_reco_all_Both", "CPh_fromEtas_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2658 new TH1D("CPh_fromDalitz_Pt_reco_all_Both", "CPh_fromDalitz_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2661 new TH1D("CPh_fromXi_Pt_reco_all_Both", "CPh_fromXi_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2664 new TH1D("CPh_fromOther_Pt_reco_all_Both", "CPh_fromOther_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2666 CPh_twoFromTarget_Pt_reco_all_Both = new TH1D("CPh_twoFromTarget_Pt_reco_all_Both",
2667 "CPh_twoFromTarget_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2670 "CPh_fromCombinatorial_Pt_reco_all_Both", "CPh_fromCombinatorial_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2672 CPh_fromConversion_Pt_reco_all_Both = new TH1D("CPh_fromConversion_Pt_reco_all_Both",
2673 "CPh_fromConversion_Pt_reco_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2675 CPh_pt_vs_rap_est_all_Both = new TH2D(
2676 "CPh_pt_vs_rap_est_all_Both", "CPh_pt_vs_rap_est_all_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
2679 new TH2D("CPh_pt_vs_rap_est_corr_all_Both", "CPh_pt_vs_rap_est_corr_all_Both; rapidity y; p_{t} in GeV/c ", 10, 0.,
2680 4., 40, 0., 4.);
2682
2683 // Both => two
2685 new TH1D("CDP_InvMassReco_two_Both", "CDP_InvMassReco_two_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2688 new TH1D("CDP_OpeningAngleReco_two_Both", "CDP_OpeningAngleReco_two_Both; angle [deg];#", 45, -0.5, 4.);
2690 CDP_Pdg_two_Both = new TH1D("CDP_Pdg_two_Both", "CDP_Pdg_two_Both; Id;#", 1000, -10, 490);
2692 CDP_P_reco_two_Both = new TH1D("CDP_P_reco_two_Both", "CDP_P_reco_two_Both; P in GeV/c^{2};#", 200, 0, 10);
2694 CDP_Pt_reco_two_Both = new TH1D("CDP_Pt_reco_two_Both", "CDP_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2697 new TH1D("CPh_fromTarget_Pt_reco_two_Both", "CPh_fromTarget_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2700 new TH1D("CPh_fromPions_Pt_reco_two_Both", "CPh_fromPions_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2703 new TH1D("CPh_fromEtas_Pt_reco_two_Both", "CPh_fromEtas_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2706 new TH1D("CPh_fromDalitz_Pt_reco_two_Both", "CPh_fromDalitz_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2709 new TH1D("CPh_fromXi_Pt_reco_two_Both", "CPh_fromXi_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2712 new TH1D("CPh_fromOther_Pt_reco_two_Both", "CPh_fromOther_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2714 CPh_twoFromTarget_Pt_reco_two_Both = new TH1D("CPh_twoFromTarget_Pt_reco_two_Both",
2715 "CPh_twoFromTarget_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2718 "CPh_fromCombinatorial_Pt_reco_two_Both", "CPh_fromCombinatorial_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2720 CPh_fromConversion_Pt_reco_two_Both = new TH1D("CPh_fromConversion_Pt_reco_two_Both",
2721 "CPh_fromConversion_Pt_reco_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2723 CPh_pt_vs_rap_est_two_Both = new TH2D(
2724 "CPh_pt_vs_rap_est_two_Both", "CPh_pt_vs_rap_est_two_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4., 40, 0., 4.);
2727 new TH2D("CPh_pt_vs_rap_est_corr_two_Both", "CPh_pt_vs_rap_est_corr_two_Both; rapidity y; p_{t} in GeV/c ", 10, 0.,
2728 4., 40, 0., 4.);
2730
2731 // Both => onetwo
2732 CDP_InvMassReco_onetwo_Both = new TH1D(
2733 "CDP_InvMassReco_onetwo_Both", "CDP_InvMassReco_onetwo_Both; invariant mass in GeV/c^{2};#", 50, -0.005, 0.045);
2736 new TH1D("CDP_OpeningAngleReco_onetwo_Both", "CDP_OpeningAngleReco_onetwo_Both; angle [deg];#", 45, -0.5, 4.);
2738 CDP_Pdg_onetwo_Both = new TH1D("CDP_Pdg_onetwo_Both", "CDP_Pdg_onetwo_Both; Id;#", 1000, -10, 490);
2740 CDP_P_reco_onetwo_Both = new TH1D("CDP_P_reco_onetwo_Both", "CDP_P_reco_onetwo_Both; P in GeV/c^{2};#", 200, 0, 10);
2743 new TH1D("CDP_Pt_reco_onetwo_Both", "CDP_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2745 CPh_fromTarget_Pt_reco_onetwo_Both = new TH1D("CPh_fromTarget_Pt_reco_onetwo_Both",
2746 "CPh_fromTarget_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2749 new TH1D("CPh_fromPions_Pt_reco_onetwo_Both", "CPh_fromPions_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2752 new TH1D("CPh_fromEtas_Pt_reco_onetwo_Both", "CPh_fromEtas_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2754 CPh_fromDalitz_Pt_reco_onetwo_Both = new TH1D("CPh_fromDalitz_Pt_reco_onetwo_Both",
2755 "CPh_fromDalitz_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2758 new TH1D("CPh_fromXi_Pt_reco_onetwo_Both", "CPh_fromXi_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2761 new TH1D("CPh_fromOther_Pt_reco_onetwo_Both", "CPh_fromOther_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2764 "CPh_twoFromTarget_Pt_reco_onetwo_Both", "CPh_twoFromTarget_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2767 new TH1D("CPh_fromCombinatorial_Pt_reco_onetwo_Both",
2768 "CPh_fromCombinatorial_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2771 "CPh_fromConversion_Pt_reco_onetwo_Both", "CPh_fromConversion_Pt_reco_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2774 new TH2D("CPh_pt_vs_rap_est_onetwo_Both", "CPh_pt_vs_rap_est_onetwo_Both; rapidity y; p_{t} in GeV/c ", 10, 0., 4.,
2775 40, 0., 4.);
2778 new TH2D("CPh_pt_vs_rap_est_corr_onetwo_Both", "CPh_pt_vs_rap_est_corr_onetwo_Both; rapidity y; p_{t} in GeV/c ",
2779 10, 0., 4., 40, 0., 4.);
2781
2782 // EMT Target
2783 CDP_EMT_Pt_all_Target = new TH1D("CDP_EMT_Pt_all_Target", "CDP_EMT_Pt_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2785 CDP_EMT_Pt_two_Target = new TH1D("CDP_EMT_Pt_two_Target", "CDP_EMT_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2788 new TH1D("CDP_EMT_Pt_onetwo_Target", "CDP_EMT_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2790
2791 // EMT Outside
2792 CDP_EMT_Pt_all_Outside = new TH1D("CDP_EMT_Pt_all_Outside", "CDP_EMT_Pt_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2794 CDP_EMT_Pt_two_Outside = new TH1D("CDP_EMT_Pt_two_Outside", "CDP_EMT_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2797 new TH1D("CDP_EMT_Pt_onetwo_Outside", "CDP_EMT_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2799
2800 // EMT Both
2801 CDP_EMT_Pt_all_Both = new TH1D("CDP_EMT_Pt_all_Both", "CDP_EMT_Pt_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2803 CDP_EMT_Pt_two_Both = new TH1D("CDP_EMT_Pt_two_Both", "CDP_EMT_Pt_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2805 CDP_EMT_Pt_onetwo_Both = new TH1D("CDP_EMT_Pt_onetwo_Both", "CDP_EMT_Pt_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2807
2808
2809 // CDP_LK_EMT Target
2811 new TH1D("CDP_LK_EMT_Pt_all_Target", "CDP_LK_EMT_Pt_all_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2814 new TH1D("CDP_LK_EMT_Pt_two_Target", "CDP_LK_EMT_Pt_two_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2817 new TH1D("CDP_LK_EMT_Pt_onetwo_Target", "CDP_LK_EMT_Pt_onetwo_Target; P_{t} in GeV/c^{2};#", 30, 0, 3);
2819
2820
2821 // CDP_LK_EMT Outside
2823 new TH1D("CDP_LK_EMT_Pt_all_Outside", "CDP_LK_EMT_Pt_all_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2826 new TH1D("CDP_LK_EMT_Pt_two_Outside", "CDP_LK_EMT_Pt_two_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2829 new TH1D("CDP_LK_EMT_Pt_onetwo_Outside", "CDP_LK_EMT_Pt_onetwo_Outside; P_{t} in GeV/c^{2};#", 30, 0, 3);
2831
2832
2833 // CDP_LK_EMT Both
2834 CDP_LK_EMT_Pt_all_Both = new TH1D("CDP_LK_EMT_Pt_all_Both", "CDP_LK_EMT_Pt_all_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2836 CDP_LK_EMT_Pt_two_Both = new TH1D("CDP_LK_EMT_Pt_two_Both", "CDP_LK_EMT_Pt_two_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2839 new TH1D("CDP_LK_EMT_Pt_onetwo_Both", "CDP_LK_EMT_Pt_onetwo_Both; P_{t} in GeV/c^{2};#", 30, 0, 3);
2841}
Data class for a reconstructed hit in the STS.
Data class for STS tracks.
int Int_t
int32_t GetStsTrackIndex() const
int32_t GetRichRingIndex() const
double GetZ() const
Definition CbmHit.h:74
static void SetKFParticleFromStsTrack(CbmStsTrack *track, KFParticle *particle, Int_t pdg=211, Bool_t firstPoint=kTRUE)
std::vector< CbmStsTrack * > CDP_LK_EMT_STS_minus_Outside
std::vector< std::vector< TVector3 > > CDP_EMT_Hits_plus_Target
void Exec(int fEventNumDP, double OpeningAngleCut, double GammaInvMassCut, int RealPID)
void SaveTargetTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, TVector3 refmom, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
std::vector< TVector3 > SaveAllHits(CbmStsTrack *track)
void CDP_likesign_Mixing_Outside(double AngleCut, double InvMassCut)
void CDP_likesign_Mixing_Target(double AngleCut, double InvMassCut)
int CheckIfElectron(CbmRichRing *ring, double momentum)
std::vector< std::vector< double > > corr_two
void CDP_Mixing_Target(double AngleCut, double InvMassCut)
std::vector< CbmStsTrack * > CDP_EMT_momenta_plus_Outside
std::vector< CbmStsTrack * > CDP_EMT_momenta_minus_Outside
double CalculatePlaneAngle_last(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
std::vector< std::vector< TVector3 > > CDP_EMT_Hits_minus_Outside
void SaveOutsideTracks(CbmMCTrack *mcTrack1, CbmStsTrack *stsTrack, double charge, int stsInd, int richInd, int stsMcTrackId, CbmRichRing *RING)
void CDP_Mixing_Outside(double AngleCut, double InvMassCut)
double CalculatePlaneAngle_first(CbmStsTrack *Sts_1, CbmStsTrack *Sts_2)
void FindGammasTarget(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector< CbmMCTrack * > MCtracks_minus, vector< CbmMCTrack * > MCtracks_plus, vector< CbmStsTrack * > StsTrack_minus, vector< CbmStsTrack * > StsTrack_plus, vector< TVector3 > Momenta_minus, vector< TVector3 > Momenta_plus, std::vector< int > Rings_minus, std::vector< int > Rings_plus, std::vector< int > stsIndex_minus, std::vector< int > stsIndex_plus, vector< CbmRichRing * > richRing_minus, vector< CbmRichRing * > richRing_plus)
std::vector< std::vector< double > > corr_all
std::vector< std::vector< TVector3 > > CDP_EMT_Hits_minus_Target
std::vector< std::vector< double > > corr_onetwo
std::vector< std::vector< TVector3 > > CDP_EMT_Hits_plus_Outside
double CalculatePlaneAngle_last_fromHits(std::vector< TVector3 > track_1, std::vector< TVector3 > track_2)
void FindGammasOutside(int EventNumMan, double AngleCut, double InvMassCut, int RealPID, vector< CbmMCTrack * > MCtracks_minus_Outside, vector< CbmMCTrack * > MCtracks_plus_Outside, vector< CbmStsTrack * > StsTrack_minus_Outside, vector< CbmStsTrack * > StsTrack_plus_Outside, std::vector< int > Rings_minus_Outside, std::vector< int > Rings_plus_Outside, std::vector< int > stsIndex_minus_Outside, std::vector< int > stsIndex_plus_Outside, vector< CbmRichRing * > richRing_minus_Outside, vector< CbmRichRing * > richRing_plus_Outside)
static TVector3 FitToVertexAndGetChi(CbmStsTrack *stsTrack, double x, double y, double z, double &chi)
static Double_t CalculateOpeningAngle_Reco(TVector3 electron1, TVector3 electron2)
static double Invmass_2particles_RECO(const TVector3 part1, const TVector3 part2)
static TVector3 FitToVertex(CbmStsTrack *stsTrack, double x, double y, double z)
static LmvmKinePar CalculateKinematicParamsReco(const TVector3 electron1, const TVector3 electron2)
double GetP() const
Definition CbmMCTrack.h:97
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
void Position(TVector3 &pos) const
Copies hit position to pos.
double GetY() const
Definition CbmPixelHit.h:74
double GetX() const
Definition CbmPixelHit.h:73
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
float GetAaxis() const
float GetBaxis() const
void AddHit(CbmRichHitLight hit)
Add new hit to the ring.
uint32_t GetHit(int32_t i) const
Definition CbmRichRing.h:39
int32_t GetNofHits() const
Definition CbmRichRing.h:37
static double GetRingTrackDistance(int globalTrackId)
data class for a reconstructed 3-d hit in the STS
Definition CbmStsHit.h:35
int32_t GetNofMvdHits() const
Definition CbmStsTrack.h:87
int32_t GetMvdHitIndex(int32_t iHit) const
Definition CbmStsTrack.h:75
int32_t GetStsHitIndex(int32_t iHit) const
int32_t GetNofStsHits() const
Definition CbmStsTrack.h:93
const FairTrackParam * GetParamFirst() const
Definition CbmTrack.h:68
Double_t fPt
Definition LmvmKinePar.h:18
Double_t fMomentumMag
Definition LmvmKinePar.h:17
Double_t fRapidity
Definition LmvmKinePar.h:19
Hash for CbmL1LinkKey.