@@ -83,10 +83,12 @@ struct correlateStrangeness {
8383
8484 // Implementation of on-the-spot efficiency correction
8585 Configurable<bool > applyEfficiencyCorrection{" applyEfficiencyCorrection" , false , " apply efficiency correction" };
86+ Configurable<bool > applyEfficiencyForTrigger{" applyEfficiencyForTrigger" , false , " apply efficiency correction for the trigger particle" };
8687 Configurable<std::string> ccdburl{" ccdb-url" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository to use" };
8788 Configurable<std::string> efficiencyCCDBPath{" efficiencyCCDBPath" , " GLO/Config/GeometryAligned" , " Path of the efficiency corrections" };
8889
8990 // objects to use for efficiency corrections
91+ TH2F* hEfficiencyTrigger;
9092 TH2F* hEfficiencyPion;
9193 TH2F* hEfficiencyK0Short;
9294 TH2F* hEfficiencyLambda;
@@ -147,6 +149,7 @@ struct correlateStrangeness {
147149 LOG (fatal) << " Problem getting TList object with efficiencies!" ;
148150 }
149151
152+ hEfficiencyTrigger = static_cast <TH2F*>(listEfficiencies->FindObject (" hEfficiencyTrigger" ));
150153 hEfficiencyK0Short = static_cast <TH2F*>(listEfficiencies->FindObject (" hEfficiencyK0Short" ));
151154 hEfficiencyLambda = static_cast <TH2F*>(listEfficiencies->FindObject (" hEfficiencyLambda" ));
152155 hEfficiencyAntiLambda = static_cast <TH2F*>(listEfficiencies->FindObject (" hEfficiencyAntiLambda" ));
@@ -204,9 +207,12 @@ struct correlateStrangeness {
204207 constexpr int index = i.value ;
205208 float efficiency = 1 .0f ;
206209 if (applyEfficiencyCorrection) {
207- efficiency = hEfficiencyV0[index]->GetBinContent (hEfficiencyV0[index]-> GetXaxis ()-> FindBin ( ptassoc), hEfficiencyV0[index]-> GetYaxis ()-> FindBin ( assoc.eta () ));
210+ efficiency = hEfficiencyV0[index]->Interpolate ( ptassoc, assoc.eta ());
208211 }
209- float weight = applyEfficiencyCorrection ? 1 . / efficiency : 1 .0f ;
212+ if (applyEfficiencyForTrigger) {
213+ efficiency = efficiency * hEfficiencyTrigger->Interpolate (pttrigger, trigg.eta ());
214+ }
215+ float weight = (applyEfficiencyCorrection || applyEfficiencyForTrigger) ? 1 . / efficiency : 1 .0f ;
210216 if (bitcheck (doCorrelation, index) && (!applyEfficiencyCorrection || efficiency != 0 )) {
211217 if (assocCandidate.compatible (index) && (!doMCassociation || assocCandidate.mcTrue (index)) && (!doAssocPhysicalPrimary || assocCandidate.mcPhysicalPrimary ()) && !mixing && assocCandidate.invMassRegionCheck (index, 1 ))
212218 histos.fill (HIST (" sameEvent/LeftBg/" ) + HIST (v0names[index]), deltaphi, deltaeta, ptassoc, pttrigger, pvz, mult, weight);
@@ -282,7 +288,10 @@ struct correlateStrangeness {
282288 if (applyEfficiencyCorrection) {
283289 efficiency = hEfficiencyCascade[index]->GetBinContent (hEfficiencyCascade[index]->GetXaxis ()->FindBin (ptassoc), hEfficiencyCascade[index]->GetYaxis ()->FindBin (assoc.eta ()));
284290 }
285- float weight = applyEfficiencyCorrection ? 1 . / efficiency : 1 .0f ;
291+ if (applyEfficiencyForTrigger) {
292+ efficiency = efficiency * hEfficiencyTrigger->Interpolate (pttrigger, trigg.eta ());
293+ }
294+ float weight = (applyEfficiencyCorrection || applyEfficiencyForTrigger) ? 1 . / efficiency : 1 .0f ;
286295 if (bitcheck (doCorrelation, index + 3 ) && (!applyEfficiencyCorrection || efficiency != 0 )) {
287296 if (assocCandidate.compatible (index) && (!doMCassociation || assocCandidate.mcTrue (index)) && (!doAssocPhysicalPrimary || assocCandidate.mcPhysicalPrimary ()) && !mixing && assocCandidate.invMassRegionCheck (index, 1 ))
288297 histos.fill (HIST (" sameEvent/LeftBg/" ) + HIST (cascadenames[index]), deltaphi, deltaeta, ptassoc, pttrigger, pvz, mult, weight);
@@ -592,6 +601,7 @@ struct correlateStrangeness {
592601
593602 // Some QA plots
594603 histos.add (" hTrackEtaVsPtVsPhi" , " hTrackEtaVsPtVsPhi" , kTH3F , {axisPtQA, axisEta, axisPhi});
604+ histos.add (" hTriggerPurityEtaVsPt" , " hTriggerPurityEtaVsPt" , kTH3F , {axisPtQA, axisEta, {2 , 0 , 2 }});
595605
596606 histos.add (" hNumberOfRejectedPairsV0" , " hNumberOfRejectedPairsV0" , kTH1F , {{1 , 0 , 1 }});
597607 histos.add (" hNumberOfRejectedPairsCascades" , " hNumberOfRejectedPairsCascades" , kTH1F , {{1 , 0 , 1 }});
@@ -611,9 +621,11 @@ struct correlateStrangeness {
611621 histos.add (" EventQA/hMixingQA" , " mixing QA" , kTH1F , {{2 , -0.5 , 1.5 }});
612622 histos.add (" EventQA/hMult" , " Multiplicity" , kTH1F , {axisMult});
613623 histos.add (" EventQA/hPvz" , " ;pvz;Entries" , kTH1F , {{30 , -15 , 15 }});
624+ histos.add (" EventQA/hMultFT0vsTPC" , " ;centFT0M;multNTracksPVeta1" , kTH2F , {{axisMult}, {300 , 0 , 300 }});
614625
615626 // MC generated plots
616627 if (doprocessMCGenerated) {
628+ histos.add (" Generated/hTrigger" , " " , kTH2F , {axisPtQA, axisEta});
617629 histos.add (" Generated/hPion" , " " , kTH2F , {axisPtQA, axisEta});
618630 histos.add (" Generated/hK0Short" , " " , kTH2F , {axisPtQA, axisEta});
619631 histos.add (" Generated/hLambda" , " " , kTH2F , {axisPtQA, axisEta});
@@ -643,26 +655,25 @@ struct correlateStrangeness {
643655 histos.add (" GeneratedWithPV/hXiPlus_MidYVsMult_TwoPVsOrMore" , " " , kTH2F , {axisPtQA, axisMult});
644656 histos.add (" GeneratedWithPV/hOmegaMinus_MidYVsMult_TwoPVsOrMore" , " " , kTH2F , {axisPtQA, axisMult});
645657 histos.add (" GeneratedWithPV/hOmegaPlus_MidYVsMult_TwoPVsOrMore" , " " , kTH2F , {axisPtQA, axisMult});
646-
647- if (doprocessClosureTest) {
648- histos.add (" ClosureTest/sameEvent/Pion" , " Pion" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
649- histos.add (" ClosureTest/sameEvent/K0Short" , " K0Short" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
650- histos.add (" ClosureTest/sameEvent/Lambda" , " Lambda" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
651- histos.add (" ClosureTest/sameEvent/AntiLambda" , " AntiLambda" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
652- histos.add (" ClosureTest/sameEvent/XiMinus" , " XiMinus" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
653- histos.add (" ClosureTest/sameEvent/XiPlus" , " XiPlus" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
654- histos.add (" ClosureTest/sameEvent/OmegaMinus" , " OmegaMinus" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
655- histos.add (" ClosureTest/sameEvent/OmegaPlus" , " OmegaPlus" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
656- histos.add (" ClosureTest/hTrigger" , " Trigger Tracks" , kTH3F , {axisPtQA, axisEta, axisPhi});
657- histos.add (" ClosureTest/hPion" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
658- histos.add (" ClosureTest/hK0Short" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
659- histos.add (" ClosureTest/hLambda" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
660- histos.add (" ClosureTest/hAntiLambda" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
661- histos.add (" ClosureTest/hXiMinus" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
662- histos.add (" ClosureTest/hXiPlus" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
663- histos.add (" ClosureTest/hOmegaMinus" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
664- histos.add (" ClosureTest/hOmegaPlus" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
665- }
658+ }
659+ if (doprocessClosureTest) {
660+ histos.add (" ClosureTest/sameEvent/Pion" , " Pion" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
661+ histos.add (" ClosureTest/sameEvent/K0Short" , " K0Short" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
662+ histos.add (" ClosureTest/sameEvent/Lambda" , " Lambda" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
663+ histos.add (" ClosureTest/sameEvent/AntiLambda" , " AntiLambda" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
664+ histos.add (" ClosureTest/sameEvent/XiMinus" , " XiMinus" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
665+ histos.add (" ClosureTest/sameEvent/XiPlus" , " XiPlus" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
666+ histos.add (" ClosureTest/sameEvent/OmegaMinus" , " OmegaMinus" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
667+ histos.add (" ClosureTest/sameEvent/OmegaPlus" , " OmegaPlus" , kTHnF , {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultCount});
668+ histos.add (" ClosureTest/hTrigger" , " Trigger Tracks" , kTH3F , {axisPtQA, axisEta, axisPhi});
669+ histos.add (" ClosureTest/hPion" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
670+ histos.add (" ClosureTest/hK0Short" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
671+ histos.add (" ClosureTest/hLambda" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
672+ histos.add (" ClosureTest/hAntiLambda" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
673+ histos.add (" ClosureTest/hXiMinus" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
674+ histos.add (" ClosureTest/hXiPlus" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
675+ histos.add (" ClosureTest/hOmegaMinus" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
676+ histos.add (" ClosureTest/hOmegaPlus" , " " , kTH3F , {axisPtQA, axisEta, axisPhi});
666677 }
667678 // initialize CCDB *only* if efficiency correction requested
668679 // skip if not requested, saves a bit of time
@@ -697,8 +708,10 @@ struct correlateStrangeness {
697708 histos.fill (HIST (" MixingQA/hSECollisionBins" ), colBinning.getBin ({collision.posZ (), collision.centFT0M ()}));
698709 histos.fill (HIST (" EventQA/hMult" ), collision.centFT0M ());
699710 histos.fill (HIST (" EventQA/hPvz" ), collision.posZ ());
711+ histos.fill (HIST (" EventQA/hMultFT0vsTPC" ), collision.centFT0M (), collision.multNTracksPVeta1 ());
700712 }
701713 // Do basic QA
714+
702715 if (applyEfficiencyCorrection) {
703716 auto bc = collision.bc_as <aod::BCsWithTimestamps>();
704717 initEfficiencyFromCCDB (bc);
@@ -714,7 +727,7 @@ struct correlateStrangeness {
714727 constexpr int index = i.value ;
715728 float efficiency = 1 .0f ;
716729 if (applyEfficiencyCorrection) {
717- efficiency = hEfficiencyV0[index]->GetBinContent (hEfficiencyV0[index]-> GetXaxis ()-> FindBin ( v0Data.pt ()), hEfficiencyV0[index]-> GetYaxis ()-> FindBin ( v0Data.eta () ));
730+ efficiency = hEfficiencyV0[index]->Interpolate ( v0Data.pt (), v0Data.eta ());
718731 }
719732 float weight = applyEfficiencyCorrection ? 1 . / efficiency : 1 .0f ;
720733 if (v0.compatible (index) && (!doMCassociation || v0.mcTrue (index)) && (!doAssocPhysicalPrimary || v0.mcPhysicalPrimary ()) && bitcheck (doCorrelation, index) && (!applyEfficiencyCorrection || efficiency != 0 )) {
@@ -731,9 +744,11 @@ struct correlateStrangeness {
731744 }
732745 if (!doprocessSameEventHCascades) {
733746 for (auto const & triggerTrack : triggerTracks) {
747+ auto track = triggerTrack.track_as <TracksComplete>();
748+ histos.fill (HIST (" hTriggerPurityEtaVsPt" ), track.pt (), track.eta (), 0.5 );
734749 if (doTriggPhysicalPrimary && !triggerTrack.mcPhysicalPrimary ())
735750 continue ;
736- auto track = triggerTrack. track_as <TracksComplete>( );
751+ histos. fill ( HIST ( " hTriggerPurityEtaVsPt " ), track. pt (), track. eta (), 1.5 );
737752 histos.fill (HIST (" hTrackEtaVsPtVsPhi" ), track.pt (), track.eta (), track.phi ());
738753 }
739754 }
@@ -782,7 +797,7 @@ struct correlateStrangeness {
782797 constexpr int index = i.value ;
783798 float efficiency = 1 .0f ;
784799 if (applyEfficiencyCorrection) {
785- efficiency = hEfficiencyCascade[index]->GetBinContent (hEfficiencyCascade[index]-> GetXaxis ()-> FindBin ( cascData.pt ()), hEfficiencyCascade[index]-> GetYaxis ()-> FindBin ( cascData.eta () ));
800+ efficiency = hEfficiencyCascade[index]->Interpolate ( cascData.pt (), cascData.eta ());
786801 }
787802 float weight = applyEfficiencyCorrection ? 1 . / efficiency : 1 .0f ;
788803 if (casc.compatible (index) && (!doMCassociation || casc.mcTrue (index)) && (!doAssocPhysicalPrimary || casc.mcPhysicalPrimary ()) && bitcheck (doCorrelation, index + 3 ) && (!applyEfficiencyCorrection || efficiency != 0 )) {
@@ -1045,6 +1060,8 @@ struct correlateStrangeness {
10451060 }
10461061 Double_t geta = mcParticle.eta ();
10471062 Double_t gpt = mcParticle.pt ();
1063+ if (abs (mcParticle.pdgCode ()) == 211 || abs (mcParticle.pdgCode ()) == 321 || abs (mcParticle.pdgCode ()) == 2212 || abs (mcParticle.pdgCode ()) == 11 || abs (mcParticle.pdgCode ()) == 13 )
1064+ histos.fill (HIST (" GeneratedWithPV/hTrigger" ), gpt, geta);
10481065 if (abs (mcParticle.pdgCode ()) == 211 )
10491066 histos.fill (HIST (" GeneratedWithPV/hPion" ), gpt, geta);
10501067 if (abs (mcParticle.pdgCode ()) == 310 )
@@ -1099,9 +1116,6 @@ struct correlateStrangeness {
10991116 int iteratorNum = -1 ;
11001117 for (auto const & mcParticle : mcParticles) {
11011118 iteratorNum = iteratorNum + 1 ;
1102- if (!mcParticle.isPhysicalPrimary ()) {
1103- continue ;
1104- }
11051119 Double_t geta = mcParticle.eta ();
11061120 Double_t gpt = mcParticle.pt ();
11071121 Double_t gphi = mcParticle.phi ();
0 commit comments