62#include "FairMCPoint.h"
64#include <TDatabasePDG.h>
67#include <TLorentzVector.h>
106 : TNamed(name, title)
107 , fEventFilter(
"EventFilter")
108 , fTrackFilter(
"TrackFilter")
109 , fPairPreFilterLegs(
"PairPreFilterLegs")
110 , fPairPreFilter(
"PairPreFilter")
111 , fFinalTrackFilter(
"FinalTrackFilter")
112 , fPairFilter(
"PairFilter")
113 , fTrackFilterMC(
"TrackFilterMC")
114 , fPairFilterMC(
"PairFilterMC")
116 , fPairCandidates(new TObjArray(8))
233 Fatal(
"Process",
"No vertex found!");
240 TDatabasePDG::Instance()->GetParticle(
fPdgMother)->Mass());
271 if (ev1 && cutmask != selectedMask)
return kFALSE;
285 for (Int_t itrackArr1 = 0; itrackArr1 < 2; ++itrackArr1) {
286 for (Int_t itrackArr2 = itrackArr1; itrackArr2 < 2; ++itrackArr2) {
302 Double_t ntracks =
fTracks[0].GetEntriesFast() +
fTracks[1].GetEntriesFast();
334 Int_t nSignals =
fSignalsMC->GetEntriesFast();
335 if (!nSignals)
return;
339 Bool_t bFillHF = kFALSE;
340 Bool_t bFillHist = kFALSE;
341 for (Int_t isig = 0; isig < nSignals; isig++) {
344 TString sigName = sigMC->GetName();
346 bFillHist |=
fHistos->HasHistClass(Form(
"Pair_%s_MCtruth", sigName.Data()));
347 bFillHist |=
fHistos->HasHistClass(Form(
"Track.Leg_%s_MCtruth", sigName.Data()));
351 bFillHF |=
fHistoArray->HasHistClass(Form(
"Pair_%s_MCtruth", sigName.Data()));
352 bFillHF |=
fHistoArray->HasHistClass(Form(
"Track.Leg_%s_MCtruth", sigName.Data()));
358 if (!bFillHF && !bFillHist)
return;
364 labels1 =
new Int_t*[nSignals];
365 labels2 =
new Int_t*[nSignals];
366 labels12 =
new Int_t*[nSignals];
367 Int_t* indexes1 =
new Int_t[nSignals];
368 Int_t* indexes2 =
new Int_t[nSignals];
369 Int_t* indexes12 =
new Int_t[nSignals];
370 for (Int_t isig = 0; isig < nSignals; ++isig) {
375 labels1[isig][ip] = -1;
376 labels2[isig][ip] = -1;
377 labels12[isig][ip] = -1;
384 Bool_t truth1 = kFALSE;
385 Bool_t truth2 = kFALSE;
391 for (Int_t ipart = 0; ipart < papaMC->
GetNMCTracks(); ++ipart) {
409 if (cutmask != selectedMask)
continue;
412 for (Int_t isig = 0; isig < nSignals; ++isig) {
425 if (truth1 && truth2) {
426 labels12[isig][indexes12[isig]] = ipart;
431 labels1[isig][indexes1[isig]] = ipart;
435 labels2[isig][indexes2[isig]] = ipart;
449 for (Int_t isig = 0; isig < nSignals; ++isig) {
452 for (Int_t i1 = 0; i1 < indexes1[isig]; ++i1) {
464 for (Int_t i2 = i1; i2 < indexes2[isig]; ++i2) {
482 pair->SetMCTracks(part1, part2);
486 if (cutmask != selectedMask)
continue;
488 if (bFillHF)
fHistoArray->
Fill(labels1[isig][i1], labels2[isig][i2], isig);
496 for (Int_t i1 = 0; i1 < indexes12[isig]; ++i1) {
497 for (Int_t i2 = 0; i2 < i1; ++i2) {
513 pair->SetMCTracks(part1, part2);
517 if (cutmask != selectedMask)
continue;
519 if (bFillHF)
fHistoArray->
Fill(labels12[isig][i1], labels12[isig][i2], isig);
529 for (Int_t isig = 0; isig < nSignals; ++isig) {
530 delete[] * (labels1 + isig);
531 delete[] * (labels2 + isig);
532 delete[] * (labels12 + isig);
550 TString className, className2;
555 for (Int_t i = 0; i < 2; ++i) {
557 if (!
fHistos->GetHistogramList()->FindObject(className.Data()))
continue;
558 Int_t ntracks =
tracks[i]->GetEntriesFast();
559 for (Int_t itrack = 0; itrack < ntracks; ++itrack) {
561 fHistos->FillClass(className, values);
594 TString className, className2, className3;
607 TBits trkClassMC(nsig);
608 TBits trkClassMChf(nsig);
614 Bool_t mergedtrkClass =
fHistos->HasHistClass(className2);
617 for (Int_t isig = 0; isig < nsig; isig++) {
618 sigName = className2 +
"_" +
fSignalsMC->At(isig)->GetName();
619 trkClassMC.SetBitNumber(isig,
fHistos->HasHistClass(sigName));
625 Bool_t trkClass =
fHistos->HasHistClass(className);
627 Bool_t fill = (mergedtrkClass || mergedtrkClass2 || trkClass || trkClass2);
629 if (!fill && !trkClassMC.CountBits() && !trkClassMChf.CountBits())
continue;
630 Int_t ntracks =
fTracks[i].GetEntriesFast();
632 for (Int_t itrack = 0; itrack < ntracks; ++itrack) {
635 if (trkClass)
fHistos->FillClass(className, values);
637 if (mergedtrkClass)
fHistos->FillClass(className2, values);
640 for (Int_t isig = 0; isig < nsig; isig++) {
641 if (!trkClassMC.TestBitNumber(isig) && !trkClassMChf.TestBitNumber(isig))
continue;
645 sigName = className2 +
"_" +
fSignalsMC->At(isig)->GetName();
647 if (fillMC.TestBitNumber(isig)) {
648 if (trkClassMC.TestBitNumber(isig))
fHistos->FillClass(sigName, values);
661 TBits legClassMC(nsig);
662 TBits legClassMChf(nsig);
663 TBits pairClassMC(nsig);
664 TBits pairClassMChf(nsig);
665 TObjArray arrLegs(100);
666 for (Int_t i = 0; i < (
fNTypes - 1); ++i) {
669 Bool_t pairClass =
fHistos->HasHistClass(className);
671 Bool_t legClass =
fHistos->HasHistClass(className2);
674 Bool_t legClassHits = kFALSE;
682 legClassHits =
fHistos->HasHistClass(className3);
683 if (legClassHits)
break;
687 for (Int_t isig = 0; isig < nsig; isig++) {
688 sigName = Form(
"Pair_%s",
fSignalsMC->At(isig)->GetName());
689 pairClassMC.SetBitNumber(isig,
fHistos->HasHistClass(sigName));
692 sigName = Form(
"Track.Legs_%s",
fSignalsMC->At(isig)->GetName());
693 legClassMC.SetBitNumber(isig,
fHistos->HasHistClass(sigName));
701 sigName = className3 +
"_" +
fSignalsMC->At(isig)->GetName();
702 legClassHits =
fHistos->HasHistClass(className3);
703 if (legClassHits)
break;
709 Bool_t fill = (pairClass || pairClass2 || legClass || legClass2 || legClassHits);
710 if (!fill && !legClassMC.CountBits() && !legClassMChf.CountBits() && !pairClassMC.CountBits()
711 && !pairClassMChf.CountBits())
716 Int_t npairs =
PairArray(i)->GetEntriesFast();
717 for (Int_t ipair = 0; ipair < npairs; ++ipair) {
721 if (pairClass || pairClass2 || pairClassMC.CountBits() || pairClassMChf.CountBits()) {
730 if (cutMask != selectedMask)
continue;
735 if (pairClass)
fHistos->FillClass(className, values);
739 fillMC.ResetAllBits();
741 for (Int_t isig = 0; isig < nsig; isig++) {
743 if (!pairClassMC.TestBitNumber(isig) && !pairClassMChf.TestBitNumber(isig))
continue;
747 Bool_t isMCtruth = mc->
IsMCTruth(pair, sigMC);
748 fillMC.SetBitNumber(isig, isMCtruth);
749 if (!isMCtruth)
continue;
750 sigName = Form(
"Pair_%s", sigMC->GetName());
751 if (pairClassMC.TestBitNumber(isig))
fHistos->FillClass(sigName, values);
762 if (legClass || legClass2 || legClassMC.CountBits() || legClassMChf.CountBits() || legClassHits) {
765 if (!arrLegs.FindObject(d1)) {
767 if (legClass)
fHistos->FillClass(className2, values);
771 for (Int_t isig = 0; isig < nsig; isig++) {
772 if (!fillMC.TestBitNumber(isig))
continue;
774 sigName = Form(
"Track.Legs_%s", sigMC->GetName());
775 if (legClassMC.TestBitNumber(isig))
fHistos->FillClass(sigName, values);
785 if (!arrLegs.FindObject(d2)) {
787 if (legClass)
fHistos->FillClass(className2, values);
791 for (Int_t isig = 0; isig < nsig; isig++) {
792 if (!fillMC.TestBitNumber(isig))
continue;
794 sigName = Form(
"Track.Legs_%s", sigMC->GetName());
795 if (legClassMC.TestBitNumber(isig))
fHistos->FillClass(sigName, values);
807 if (legClass || legClass2) arrLegs.Clear();
819 TString className, className2;
824 TObjArray arrLegs(100);
825 const Int_t type = pair->GetType();
835 Bool_t pairClass =
fHistos->HasHistClass(className);
837 Bool_t legClass =
fHistos->HasHistClass(className2);
841 if (pairClass || pairClass2) {
843 if (pairClass)
fHistos->FillClass(className, values);
847 if (legClass || legClass2) {
850 if (legClass)
fHistos->FillClass(className2, values);
855 if (legClass)
fHistos->FillClass(className2, values);
877 for (Int_t itrack = 0; itrack < ntracks; ++itrack) {
899 fHistos->FillClass(
"Track.noCuts", values);
906 if (cutmask != selectedMask)
continue;
912 for (Int_t isig = 0; isig <
fSignalsMC->GetEntriesFast(); isig++) {
914 Double_t wght = sigMC->
GetWeight(values);
915 Bool_t useMCweight = (TMath::Abs(wght - 1.) > 1.0e-15);
916 if (!useMCweight)
continue;
928 Bool_t hasMCweight = (TMath::Abs(wght - 1.) > 1.0e-15);
933 while (!hasMCweight) {
936 if (motherLabel == -1)
break;
939 for (Int_t isig = 0; isig <
fSignalsMC->GetEntriesFast(); isig++) {
941 Double_t wghtMC = sigMC->
GetWeight(values);
942 Bool_t useMCweight = (TMath::Abs(wghtMC - 1.) > 1.0e-15);
943 if (!useMCweight)
continue;
945 if (papaMC->
IsMCTruth(motherLabel, sigMC, 1) || papaMC->
IsMCTruth(motherLabel, sigMC, 2)) {
958 Short_t charge = particle->
Charge();
959 if (charge > 0)
fTracks[0].Add(particle);
980 Double_t mass = TDatabasePDG::Instance()->GetParticle(
fPdgLeg1)->Mass();
981 Double_t pt = gRandom->Exp(3.);
982 if (pt < 0.075) pt = 0.075;
983 Double_t eta = -TMath::Log(TMath::Tan((gRandom->Uniform(2.5, 25.) / 180. * TMath::Pi()) / 2));
984 Double_t phi = gRandom->Uniform(TMath::TwoPi());
987 t1->
GetMomentum()->SetPtEtaPhiM(pt, eta, phi, mass);
990 mass = TDatabasePDG::Instance()->GetParticle(
fPdgLeg2)->Mass();
991 pt = gRandom->Exp(3.);
992 if (pt < 0.075) pt = 0.075;
993 eta = -TMath::Log(TMath::Tan((gRandom->Uniform(2.5, 25.) / 180. * TMath::Pi()) / 2));
994 phi = gRandom->Uniform(TMath::TwoPi());
997 t2->
GetMomentum()->SetPtEtaPhiM(pt, eta, phi, mass);
1005 Bool_t isLeg1selected = kTRUE;
1006 Bool_t isLeg2selected = kTRUE;
1009 Int_t ntrack1 = arrTracks1.GetEntriesFast();
1010 Int_t ntrack2 = arrTracks2.GetEntriesFast();
1013 Bool_t* bTracks1 =
new Bool_t[ntrack1];
1014 for (Int_t itrack1 = 0; itrack1 < ntrack1; ++itrack1)
1015 bTracks1[itrack1] = kFALSE;
1016 Bool_t* bTracks2 =
new Bool_t[ntrack2];
1017 for (Int_t itrack2 = 0; itrack2 < ntrack2; ++itrack2)
1018 bTracks2[itrack2] = kFALSE;
1021 bTracks1[ntrack1 - 1] = kTRUE;
1022 bTracks2[ntrack2 - 1] = kTRUE;
1033 Int_t nRejPasses = 1;
1037 for (Int_t iRP = 0; iRP < nRejPasses; ++iRP) {
1040 Int_t arr1RP = arr1, arr2RP = arr2;
1041 TObjArray* arrTracks1RP = &arrTracks1;
1042 TObjArray* arrTracks2RP = &arrTracks2;
1043 Bool_t* bTracks1RP = bTracks1;
1044 Bool_t* bTracks2RP = bTracks2;
1051 arrTracks1RP = &arrTracks1;
1052 arrTracks2RP = &arrTracks1;
1053 bTracks1RP = bTracks1;
1054 bTracks2RP = bTracks1;
1059 arrTracks1RP = &arrTracks2;
1060 arrTracks2RP = &arrTracks2;
1061 bTracks1RP = bTracks2;
1062 bTracks2RP = bTracks2;
1067 Int_t ntrack1RP = (*arrTracks1RP).GetEntriesFast();
1068 Int_t ntrack2RP = (*arrTracks2RP).GetEntriesFast();
1072 for (Int_t itrack1 = 0; itrack1 < ntrack1RP; ++itrack1) {
1073 Int_t end = ntrack2RP;
1074 if (arr1RP == arr2RP) end = itrack1;
1076 TObject* track1 = (*arrTracks1RP).UncheckedAt(itrack1);
1077 if (!track1)
continue;
1084 if (selectedMaskLeg) {
1086 == selectedMaskLeg);
1091 for (Int_t itrack2 = 0; itrack2 < end; ++itrack2) {
1092 TObject* track2 = (*arrTracks2RP).UncheckedAt(itrack2);
1093 if (!track2)
continue;
1096 if (selectedMaskLeg) {
1099 == selectedMaskLeg);
1112 candidate->
SetType(pairIndex);
1116 Bool_t testParticle = (track1 == t1 || track1 == t2 || track2 == t1 || track2 == t2);
1122 if (!testParticle) {
1128 if (cutmask != selectedMask) {
continue; }
1141 bTracks1RP[itrack1] = kTRUE;
1142 bTracks2RP[itrack2] = kTRUE;
1152 for (Int_t itrack1 = 0; itrack1 < ntrack1; ++itrack1) {
1153 if (bTracks1[itrack1]) arrTracks1.AddAt(0x0, itrack1);
1155 for (Int_t itrack2 = 0; itrack2 < ntrack2; ++itrack2) {
1156 if (bTracks2[itrack2]) arrTracks2.AddAt(0x0, itrack2);
1164 arrTracks1.Compress();
1165 arrTracks2.Compress();
1221 for (Int_t itrack = 0; itrack < arrTracks1.GetEntriesFast(); ++itrack) {
1241 if (cutmask != selectedMask) arrTracks1.AddAt(0x0, itrack);
1243 arrTracks1.Compress();
1246 for (Int_t itrack = 0; itrack < arrTracks2.GetEntriesFast(); ++itrack) {
1267 if (cutmask != selectedMask) arrTracks2.AddAt(0x0, itrack);
1269 arrTracks2.Compress();
1279 TObjArray arrTracks1 =
fTracks[arr1];
1280 TObjArray arrTracks2 =
fTracks[arr2];
1287 Int_t ntrack1 = arrTracks1.GetEntriesFast();
1288 Int_t ntrack2 = arrTracks2.GetEntriesFast();
1299 candidate->
SetType(pairIndex);
1303 for (Int_t itrack1 = 0; itrack1 < ntrack1; ++itrack1) {
1304 Int_t end = ntrack2;
1305 if (arr1 == arr2) end = itrack1;
1306 for (Int_t itrack2 = 0; itrack2 < end; ++itrack2) {
1327 if (cutMask != selectedMask)
continue;
1342 candidate->
SetType(pairIndex);
1356 Int_t ntrack1 =
fTracks[0].GetEntriesFast();
1357 Int_t ntrack2 =
fTracks[1].GetEntriesFast();
1368 for (Int_t itrack1 = 0; itrack1 < ntrack1; ++itrack1) {
1369 for (Int_t itrack2 = 0; itrack2 < ntrack2; ++itrack2) {
1383 if (cutMask != selectedMask)
continue;
1433 TString className = Form(
"Pair_%s_MCtruth", sigMC->GetName());
1434 TString className2 = Form(
"Track.Legs_%s_MCtruth", sigMC->GetName());
1435 TString className3 = Form(
"Track.%s_%s_MCtruth",
fgkPairClassNames[1], sigMC->GetName());
1436 Bool_t pairClass =
fHistos->HasHistClass(className.Data());
1437 Bool_t legClass =
fHistos->HasHistClass(className2.Data());
1438 Bool_t trkClass =
fHistos->HasHistClass(className3.Data());
1440 if (!pairClass && !legClass && !trkClass)
return kFALSE;
1445 if (!part1 && !part2)
return kFALSE;
1446 if (part1 && part2) {
1465 if (legClass || trkClass) {
1468 if (part1 && trkClass)
fHistos->FillClass(className3, values);
1469 if (part1 && part2 && legClass)
fHistos->FillClass(className2, values);
1472 if (part2 && trkClass)
fHistos->FillClass(className3, values);
1473 if (part1 && part2 && legClass)
fHistos->FillClass(className2, values);
1477 FairMCPoint* pnt = NULL;
1480 for (Int_t ipart = 0; ipart < 2; ipart++) {
1483 Int_t label = (!ipart ? label1 : label2);
1484 if (!part)
continue;
1488 for (Int_t ileg = 0; ileg < 2; ileg++) {
1492 className4 = Form(
"Hit.%s", (ileg ?
"Legs." :
""));
1494 if (!
fHistos->HasHistClass(className4))
continue;
1498 if (!npnts)
continue;
1501 Int_t psize =
points->GetSize();
1502 if (!
points || psize < 1)
continue;
1505 for (Int_t idx = 0; idx < psize; idx++) {
1506 if (nfnd == npnts)
break;
1508 pnt =
static_cast<FairMCPoint*
>(
points->At(idx));
1509 if (pnt->GetTrackID() == label) {
1513 fHistos->FillClass(className4, values);
1522 if (pairClass && part1 && part2) {
1525 fHistos->FillClass(className, values);
1538 TString className, className2;
1543 if (!pairInfoOnly) {
1544 if (
fHistos->GetHistogramList()->FindObject(
"Event")) {
1552 TObjArray arrLegs(100);
1553 for (Int_t i = 0; i < (
fNTypes - 1); ++i) {
1554 Int_t npairs =
PairArray(i)->GetEntriesFast();
1555 if (npairs < 1)
continue;
1559 Bool_t pairClass =
fHistos->HasHistClass(className);
1560 Bool_t legClass =
fHistos->HasHistClass(className2);
1563 for (Int_t ipair = 0; ipair < npairs; ++ipair) {
1576 if (cutMask != selectedMask)
continue;
1587 fHistos->FillClass(className, values);
1594 if (!arrLegs.FindObject(d1)) {
1596 fHistos->FillClass(className2, values);
1599 if (!arrLegs.FindObject(d2)) {
1601 fHistos->FillClass(className2, values);
1606 if (legClass) arrLegs.Clear();
1612 const Double_t* values)
1621 TString classNameMC;
1624 PairAnalysisHistos histo;
1626 TIter next(filter->
GetCuts());
1632 for (Int_t isig = 0; isig < nsig; isig++) {
1635 classNameMC = classNamePM +
"_" + sigMC->GetName();
1640 if (isig && !isMCtruth)
continue;
1652 UInt_t cutRef = (1 << (iCut + 1)) - 1;
1656 if ((cutmask & cutRef) == cutRef) {
1660 histo.SetHistogramList(*(THashList*) filter->
GetHistogramList()->FindObject(cuts->GetName()), kFALSE);
1664 histo.FillClass(classNamePM, values);
1667 histo.FillClass(className, values);
1671 if (isMCtruth) histo.FillClass(classNameMC, values);
1688 TString classNameMC;
1691 PairAnalysisHistos histo;
1693 TIter next(filter->
GetCuts());
1699 for (Int_t isig = 0; isig < nsig; isig++) {
1702 classNameMC = classNamePM +
"_" + sigMC->GetName() +
"_MCtruth";
1710 if (isig && !isMCtruth)
continue;
1722 UInt_t cutRef = (1 << (iCut + 1)) - 1;
1725 if ((cutmask & cutRef) == cutRef) {
1728 histo.SetHistogramList(*(THashList*) filter->
GetHistogramList()->FindObject(cuts->GetName()), kFALSE);
1731 if (isMCtruth) histo.FillClass(classNameMC, values);
1740 Bool_t trackIsLeg, Double_t* values)
1748 TBits hitClassMC(nsig);
1749 TBits hitClassMChf(nsig);
1770 className.Form(
"Hit.%s", (trackIsLeg ?
"Legs." :
""));
1773 Bool_t hitClass =
fHistos->HasHistClass(className);
1777 for (Int_t isig = 0; isig < nsig; isig++) {
1778 sigName = className +
"_" +
fSignalsMC->At(isig)->GetName();
1779 hitClassMC.SetBitNumber(isig,
fHistos->HasHistClass(sigName));
1782 if (!hitClass && !hitClass2 && !hitClassMC.CountBits() && !hitClassMChf.CountBits())
continue;
1786 if (!
hits ||
hits->GetSize() < 1)
continue;
1810 if (trkl) nhits =
static_cast<CbmStsTrack*
>(trkl)->GetNofMvdHits();
1813 if (trkl) nhits =
static_cast<CbmStsTrack*
>(trkl)->GetNofStsHits();
1831 FairMCPoint* pnt = 0x0;
1832 for (Int_t ihit = 0; ihit < nhits; ihit++) {
1849 Bool_t trueHit = kTRUE;
1850 Bool_t fakeHit = kTRUE;
1862 for (Int_t iLink = 0; iLink < nlinks; iLink++) {
1871 if (!pnt) trueHit = kFALSE;
1873 Int_t lbl = pnt->GetTrackID();
1876 if (lbl != mctrk && lblM != mctrk && lblG != mctrk) trueHit = kFALSE;
1886 if (hitClass)
fHistos->FillClass(className, values);
1890 if (hitClass)
fHistos->FillClass(className +
"_true", values);
1894 if (hitClass)
fHistos->FillClass(className +
"_fake", values);
1898 if (hitClass)
fHistos->FillClass(className +
"_dist", values);
1902 for (Int_t isig = 0; isig < nsig; isig++) {
1903 sigName = className +
"_" +
fSignalsMC->At(isig)->GetName();
1904 if (fillMC->TestBitNumber(isig)) {
1905 if (hitClassMC.TestBitNumber(isig))
fHistos->FillClass(sigName, values);
@ kMvd
Micro-Vertex Detector.
@ kTrd
Transition Radiation Detector.
@ kTof
Time-of-flight Detector.
@ kSts
Silicon Tracking System.
@ kMuch
Muon detection system.
@ kNofSystems
For loops over active systems.
@ kRich
Ring-Imaging Cherenkov Detector.
static vector< vector< QAHit > > hits
ClassImp(PairAnalysis) const char *PairAnalysis
THashList * GetHistogramList()
virtual void AddCuts(AnalysisCuts *cuts)
virtual UInt_t IsSelected(Double_t *const values)
CbmMatch * GetMatch() const
double GetCharge() const
Charge of the associated particle.
int32_t GetMotherId() const
int32_t GetNPoints(ECbmModuleId detId) const
const CbmLink & GetLink(int32_t i) const
int32_t GetNofLinks() const
const CbmLink & GetMatchedLink() const
uint32_t GetHit(int32_t i) const
int32_t GetNofHits() const
virtual int32_t GetNofHits() const
int32_t GetHitIndex(int32_t iHit) const
void Fill(UInt_t mask, TObject *obj, UInt_t addIdx=0)
void AddTrackFilter2(AnalysisFilter *trkFilter2)
void AddTrackFilter(AnalysisFilter *trkFilter)
void AddPrePairFilter(AnalysisFilter *pairFilter)
void AddPairFilter(AnalysisFilter *pairFilter)
void AddEventFilter(AnalysisFilter *eventFilter)
void FillAll(TObject *obj, UInt_t addIdx=0)
void AddTrackFilterMC(AnalysisFilter *trkFilterMC)
TClonesArray * GetHits(ECbmModuleId det) const
CbmVertex * GetPrimaryVertex() const
Int_t GetNumberOfTracks() const
PairAnalysisTrack * GetTrack(UInt_t pos)
TClonesArray * GetPoints(ECbmModuleId det) const
void Fill(Int_t pairIndex, const PairAnalysisPair *particle)
void FillClass(const char *histClass, const Double_t *values)
Int_t GetLabelMotherWithPdg(const PairAnalysisPair *pair, Int_t pdgMother)
static PairAnalysisMC * Instance()
Int_t GetMothersLabel(Int_t daughterLabel) const
CbmMCTrack * GetMCTrackFromMCEvent(Int_t label) const
Bool_t IsMCTruth(const PairAnalysisPair *pair, const PairAnalysisSignalMC *signalMC) const
void Init(const PairAnalysis *papa=0x0)
Int_t FindBin(const Double_t values[], TString *dim=0x0)
void Fill(const PairAnalysisEvent *ev, PairAnalysis *papa)
AnalysisFilter & GetLeg2Filter()
AnalysisFilter & GetLeg1Filter()
void SetPdgCode(Int_t pdgCode)
void SetType(Char_t type)
virtual void SetTracks(PairAnalysisTrack *const particle1, Int_t pid1, PairAnalysisTrack *const particle2, Int_t pid2)=0
virtual void RotateTrack(PairAnalysisTrackRotator *rot)=0
void SetLabel(Int_t label)
void SetKFUsage(Bool_t KFUsage)
EBranchRelation GetMothersRelation() const
Bool_t GetFillPureMCStep() const
Bool_t IsSingleParticle() const
Double_t GetWeight() const
Int_t GetIterations() const
TLorentzVector * GetMomentum()
CbmTrackMatchNew * GetTrackMatch(ECbmModuleId det) const
CbmTrack * GetTrack(ECbmModuleId det) const
void SetMassHypo(Int_t pdg1, Int_t pdg2, Bool_t refitMassAssump)
void SetWeight(Double_t wght)
CbmTofHit * GetTofHit() const
void SetPdgCode(Int_t pdg)
Double_t GetWeight() const
CbmRichRing * GetRichRing() const
static void SetFillMap(TBits *map)
static void SetEvent(PairAnalysisEvent *const ev)
static void FillVarMCParticle(const CbmMCTrack *p1, const CbmMCTrack *p2, Double_t *const values)
static void SetValue(ValueTypes var, Double_t val)
static PairAnalysisEvent * GetCurrentEvent()
static Double_t * GetData()
static void Fill(const TObject *particle, Double_t *const values)
static void FillSum(const TObject *particle, Double_t *const values)
AnalysisFilter fPairPreFilterLegs
void FillCutStepHistograms(AnalysisFilter *filter, UInt_t cutmask, PairAnalysisTrack *trk, const Double_t *values)
PairAnalysisTrackRotator * fTrackRotator
Pair candidate arrays.
static const char * fgkPairClassNames[8]
AnalysisFilter fFinalTrackFilter
TObjArray * fPairCandidates
Selected track candidates.
PairAnalysisHF * fHistoArray
Bool_t fPreFilterUnlikeOnly
void FillHistograms(const PairAnalysisEvent *ev, Bool_t pairInfoOnly=kFALSE)
void FillHistogramsHits(const PairAnalysisEvent *ev, TBits *fillMC, PairAnalysisTrack *track, Bool_t trackIsLeg, Double_t *values)
AnalysisFilter fPairFilter
THashList * fCutStepHistos
AnalysisFilter fPairFilterMC
void FillTrackArrays(PairAnalysisEvent *const ev)
AnalysisFilter fPairPreFilter
Int_t GetPairIndex(Int_t arr1, Int_t arr2) const
Bool_t FillMCHistograms(Int_t label1, Int_t label2, Int_t nSignal)
Bool_t fStoreRotatedPairs
PairAnalysis()
pair prefilter leg cut logic
void FillHistogramsMC(const PairAnalysisEvent *ev, PairAnalysisEvent *ev1)
Bool_t fPreFilterAllSigns
void AddSignalMC(PairAnalysisSignalMC *signal)
static constexpr Int_t fLegTypes
TObjArray * PairArray(Int_t i)
AnalysisFilter fTrackFilter
void PairPreFilter(Int_t arr1, Int_t arr2, TObjArray &arrTracks1, TObjArray &arrTracks2)
PairAnalysisHistos * fHistos
void FillHistogramsTracks(TObjArray **tracks)
void FillHistogramsFromPairArray(Bool_t pairInfoOnly=kFALSE)
PairAnalysisCutQa * fQAmonitor
PairAnalysisMixingHandler * fMixing
void FillCutStepHistogramsMC(AnalysisFilter *filter, UInt_t cutmask, Int_t label, const Double_t *values)
AnalysisFilter fTrackFilterMC
static const char * fgkTrackClassNames[2]
void FillPairArrays(Int_t arr1, Int_t arr2)
AnalysisFilter fEventFilter
static constexpr Int_t fNTypes
void FilterTrackArrays(TObjArray &arrTracks1, TObjArray &arrTracks2)
void InitPairCandidateArrays()
void Process(TObjArray *arr)
void FillHistogramsPair(PairAnalysisPair *pair, Bool_t fromPreFilter=kFALSE)
TString GetDetName(ECbmModuleId det)