@@ -126,9 +126,9 @@ struct ThreeParticleCorrelations {
126126 Configurable<bool > confRDSwitch{" confRDSwitch" , true , " Switch for the radialDistanceFilter function" };
127127
128128 // Efficiency histograms
129- TH2D ** hEffPions = new TH2D *[2 ];
130- TH2D ** hEffKaons = new TH2D *[2 ];
131- TH2D ** hEffProtons = new TH2D *[2 ];
129+ TH3D ** hEffPions = new TH3D *[2 ];
130+ TH3D ** hEffKaons = new TH3D *[2 ];
131+ TH3D ** hEffProtons = new TH3D *[2 ];
132132
133133 // Correlation variables
134134 int triggSign, assocSign;
@@ -290,12 +290,12 @@ struct ThreeParticleCorrelations {
290290 ccdb->setURL (" http://alice-ccdb.cern.ch" );
291291 ccdb->setCaching (true );
292292 TList* efficiencyList = ccdb->getForTimeStamp <TList>(" Users/j/jstaa/Efficiency/ChargedParticles" , 1 );
293- hEffPions[0 ] = static_cast <TH2D *>(efficiencyList->FindObject (" hEfficiencyPionP" ));
294- hEffPions[1 ] = static_cast <TH2D *>(efficiencyList->FindObject (" hEfficiencyPionN" ));
295- hEffKaons[0 ] = static_cast <TH2D *>(efficiencyList->FindObject (" hEfficiencyKaonP" ));
296- hEffKaons[1 ] = static_cast <TH2D *>(efficiencyList->FindObject (" hEfficiencyKaonN" ));
297- hEffProtons[0 ] = static_cast <TH2D *>(efficiencyList->FindObject (" hEfficiencyProtonP" ));
298- hEffProtons[1 ] = static_cast <TH2D *>(efficiencyList->FindObject (" hEfficiencyProtonN" ));
293+ hEffPions[0 ] = static_cast <TH3D *>(efficiencyList->FindObject (" hEfficiencyPionP" ));
294+ hEffPions[1 ] = static_cast <TH3D *>(efficiencyList->FindObject (" hEfficiencyPionN" ));
295+ hEffKaons[0 ] = static_cast <TH3D *>(efficiencyList->FindObject (" hEfficiencyKaonP" ));
296+ hEffKaons[1 ] = static_cast <TH3D *>(efficiencyList->FindObject (" hEfficiencyKaonN" ));
297+ hEffProtons[0 ] = static_cast <TH3D *>(efficiencyList->FindObject (" hEfficiencyProtonP" ));
298+ hEffProtons[1 ] = static_cast <TH3D *>(efficiencyList->FindObject (" hEfficiencyProtonN" ));
299299 }
300300
301301 // ==========================================================================================================================================================================================================================================================================
@@ -331,15 +331,15 @@ struct ThreeParticleCorrelations {
331331 rQARegistry.fill (HIST (" hdEdx" ), track.pt (), track.tpcSignal ());
332332 rQARegistry.fill (HIST (" hBeta" ), track.pt (), track.beta ());
333333 if (assocPID[0 ] == pionID) { // Pions
334- rQARegistry.fill (HIST (" hPtPion" ), track.pt (), collision.centFT0C (), 1 . / trackEff (hEffPions, track));
334+ rQARegistry.fill (HIST (" hPtPion" ), track.pt (), collision.centFT0C (), 1 . / trackEff (hEffPions, track, collision. centFT0C () ));
335335 rQARegistry.fill (HIST (" hdEdxPion" ), track.pt (), track.tpcSignal ());
336336 rQARegistry.fill (HIST (" hBetaPion" ), track.pt (), track.beta ());
337337 } else if (assocPID[0 ] == kaonID) { // Kaons
338- rQARegistry.fill (HIST (" hPtKaon" ), track.pt (), collision.centFT0C (), 1 . / trackEff (hEffKaons, track));
338+ rQARegistry.fill (HIST (" hPtKaon" ), track.pt (), collision.centFT0C (), 1 . / trackEff (hEffKaons, track, collision. centFT0C () ));
339339 rQARegistry.fill (HIST (" hdEdxKaon" ), track.pt (), track.tpcSignal ());
340340 rQARegistry.fill (HIST (" hBetaKaon" ), track.pt (), track.beta ());
341341 } else if (assocPID[0 ] == protonID) { // Protons
342- rQARegistry.fill (HIST (" hPtProton" ), track.pt (), collision.centFT0C (), 1 . / trackEff (hEffProtons, track));
342+ rQARegistry.fill (HIST (" hPtProton" ), track.pt (), collision.centFT0C (), 1 . / trackEff (hEffProtons, track, collision. centFT0C () ));
343343 rQARegistry.fill (HIST (" hdEdxProton" ), track.pt (), track.tpcSignal ());
344344 rQARegistry.fill (HIST (" hBetaProton" ), track.pt (), track.beta ());
345345 }
@@ -371,36 +371,36 @@ struct ThreeParticleCorrelations {
371371
372372 if (candMass >= MassLambda0 - 4 * dGaussSigma && candMass <= MassLambda0 + 4 * dGaussSigma) {
373373 if (assocPID[0 ] == pionID) { // Pions
374- rSECorrRegistry.fill (HIST (" hSameLambdaPion_SGNL" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate));
374+ rSECorrRegistry.fill (HIST (" hSameLambdaPion_SGNL" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate, collision. centFT0C () ));
375375 } else if (assocPID[0 ] == kaonID) { // Kaons
376- rSECorrRegistry.fill (HIST (" hSameLambdaKaon_SGNL" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate));
376+ rSECorrRegistry.fill (HIST (" hSameLambdaKaon_SGNL" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate, collision. centFT0C () ));
377377 } else if (assocPID[0 ] == protonID) { // Protons
378- rSECorrRegistry.fill (HIST (" hSameLambdaProton_SGNL" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate));
378+ rSECorrRegistry.fill (HIST (" hSameLambdaProton_SGNL" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate, collision. centFT0C () ));
379379 }
380380
381381 } else if (candMass >= MassLambda0 - 8 * dGaussSigma && candMass <= MassLambda0 + 8 * dGaussSigma) {
382382 if (assocPID[0 ] == pionID) { // Pions
383- rSECorrRegistry.fill (HIST (" hSameLambdaPion_SB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate));
383+ rSECorrRegistry.fill (HIST (" hSameLambdaPion_SB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate, collision. centFT0C () ));
384384 if (candMass >= MassLambda0 - 8 * dGaussSigma && candMass < MassLambda0 - 4 * dGaussSigma) {
385- rSECorrRegistry.fill (HIST (" hSameLambdaPion_leftSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate));
385+ rSECorrRegistry.fill (HIST (" hSameLambdaPion_leftSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate, collision. centFT0C () ));
386386 } else if (candMass > MassLambda0 + 4 * dGaussSigma && candMass <= MassLambda0 + 8 * dGaussSigma) {
387- rSECorrRegistry.fill (HIST (" hSameLambdaPion_rightSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate));
387+ rSECorrRegistry.fill (HIST (" hSameLambdaPion_rightSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate, collision. centFT0C () ));
388388 }
389389
390390 } else if (assocPID[0 ] == kaonID) { // Kaons
391- rSECorrRegistry.fill (HIST (" hSameLambdaKaon_SB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate));
391+ rSECorrRegistry.fill (HIST (" hSameLambdaKaon_SB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate, collision. centFT0C () ));
392392 if (candMass >= MassLambda0 - 8 * dGaussSigma && candMass < MassLambda0 - 4 * dGaussSigma) {
393- rSECorrRegistry.fill (HIST (" hSameLambdaKaon_leftSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate));
393+ rSECorrRegistry.fill (HIST (" hSameLambdaKaon_leftSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate, collision. centFT0C () ));
394394 } else if (candMass > MassLambda0 + 4 * dGaussSigma && candMass <= MassLambda0 + 8 * dGaussSigma) {
395- rSECorrRegistry.fill (HIST (" hSameLambdaKaon_rightSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate));
395+ rSECorrRegistry.fill (HIST (" hSameLambdaKaon_rightSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate, collision. centFT0C () ));
396396 }
397397
398398 } else if (assocPID[0 ] == protonID) { // Protons
399- rSECorrRegistry.fill (HIST (" hSameLambdaProton_SB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate));
399+ rSECorrRegistry.fill (HIST (" hSameLambdaProton_SB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate, collision. centFT0C () ));
400400 if (candMass >= MassLambda0 - 8 * dGaussSigma && candMass < MassLambda0 - 4 * dGaussSigma) {
401- rSECorrRegistry.fill (HIST (" hSameLambdaProton_leftSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate));
401+ rSECorrRegistry.fill (HIST (" hSameLambdaProton_leftSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate, collision. centFT0C () ));
402402 } else if (candMass > MassLambda0 + 4 * dGaussSigma && candMass <= MassLambda0 + 8 * dGaussSigma) {
403- rSECorrRegistry.fill (HIST (" hSameLambdaProton_rightSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate));
403+ rSECorrRegistry.fill (HIST (" hSameLambdaProton_rightSB" ), deltaPhi, deltaEta, collision.centFT0C (), collision.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate, collision. centFT0C () ));
404404 }
405405 }
406406 }
@@ -441,36 +441,36 @@ struct ThreeParticleCorrelations {
441441
442442 if (candMass >= MassLambda0 - 4 * dGaussSigma && candMass <= MassLambda0 + 4 * dGaussSigma) {
443443 if (assocPID[0 ] == pionID) { // Pions
444- rMECorrRegistry.fill (HIST (" hMixLambdaPion_SGNL" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate));
444+ rMECorrRegistry.fill (HIST (" hMixLambdaPion_SGNL" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate, coll_1. centFT0C () ));
445445 } else if (assocPID[0 ] == kaonID) { // Kaons
446- rMECorrRegistry.fill (HIST (" hMixLambdaKaon_SGNL" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate));
446+ rMECorrRegistry.fill (HIST (" hMixLambdaKaon_SGNL" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate, coll_1. centFT0C () ));
447447 } else if (assocPID[0 ] == protonID) { // Protons
448- rMECorrRegistry.fill (HIST (" hMixLambdaProton_SGNL" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate));
448+ rMECorrRegistry.fill (HIST (" hMixLambdaProton_SGNL" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate, coll_1. centFT0C () ));
449449 }
450450
451451 } else if (candMass >= MassLambda0 - 8 * dGaussSigma && candMass <= MassLambda0 + 8 * dGaussSigma) {
452452 if (assocPID[0 ] == pionID) { // Pions
453- rMECorrRegistry.fill (HIST (" hMixLambdaPion_SB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate));
453+ rMECorrRegistry.fill (HIST (" hMixLambdaPion_SB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate, coll_1. centFT0C () ));
454454 if (candMass >= MassLambda0 - 8 * dGaussSigma && candMass < MassLambda0 - 4 * dGaussSigma) {
455- rMECorrRegistry.fill (HIST (" hMixLambdaPion_leftSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate));
455+ rMECorrRegistry.fill (HIST (" hMixLambdaPion_leftSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate, coll_1. centFT0C () ));
456456 } else if (candMass > MassLambda0 + 4 * dGaussSigma && candMass <= MassLambda0 + 8 * dGaussSigma) {
457- rMECorrRegistry.fill (HIST (" hMixLambdaPion_rightSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate));
457+ rMECorrRegistry.fill (HIST (" hMixLambdaPion_rightSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffPions, associate, coll_1. centFT0C () ));
458458 }
459459
460460 } else if (assocPID[0 ] == kaonID) { // Kaons
461- rMECorrRegistry.fill (HIST (" hMixLambdaKaon_SB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate));
461+ rMECorrRegistry.fill (HIST (" hMixLambdaKaon_SB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate, coll_1. centFT0C () ));
462462 if (candMass >= MassLambda0 - 8 * dGaussSigma && candMass < MassLambda0 - 4 * dGaussSigma) {
463- rMECorrRegistry.fill (HIST (" hMixLambdaKaon_leftSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate));
463+ rMECorrRegistry.fill (HIST (" hMixLambdaKaon_leftSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate, coll_1. centFT0C () ));
464464 } else if (candMass > MassLambda0 + 4 * dGaussSigma && candMass <= MassLambda0 + 8 * dGaussSigma) {
465- rMECorrRegistry.fill (HIST (" hMixLambdaKaon_rightSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate));
465+ rMECorrRegistry.fill (HIST (" hMixLambdaKaon_rightSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffKaons, associate, coll_1. centFT0C () ));
466466 }
467467
468468 } else if (assocPID[0 ] == protonID) { // Protons
469- rMECorrRegistry.fill (HIST (" hMixLambdaProton_SB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate));
469+ rMECorrRegistry.fill (HIST (" hMixLambdaProton_SB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate, coll_1. centFT0C () ));
470470 if (candMass >= MassLambda0 - 8 * dGaussSigma && candMass < MassLambda0 - 4 * dGaussSigma) {
471- rMECorrRegistry.fill (HIST (" hMixLambdaProton_leftSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate));
471+ rMECorrRegistry.fill (HIST (" hMixLambdaProton_leftSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate, coll_1. centFT0C () ));
472472 } else if (candMass > MassLambda0 + 4 * dGaussSigma && candMass <= MassLambda0 + 8 * dGaussSigma) {
473- rMECorrRegistry.fill (HIST (" hMixLambdaProton_rightSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate));
473+ rMECorrRegistry.fill (HIST (" hMixLambdaProton_rightSB" ), deltaPhi, deltaEta, coll_1.centFT0C (), coll_1.posZ (), triggSign, associate.sign (), 1 . / trackEff (hEffProtons, associate, coll_1. centFT0C () ));
474474 }
475475 }
476476 }
@@ -778,7 +778,7 @@ struct ThreeParticleCorrelations {
778778 }
779779
780780 template <class TrackCand >
781- double trackEff (TH2D ** efficiencies, const TrackCand& track)
781+ double trackEff (TH3D ** efficiencies, const TrackCand& track, double centrality )
782782 {
783783
784784 int index = -999 ;
@@ -788,7 +788,7 @@ struct ThreeParticleCorrelations {
788788 index = 1 ;
789789 }
790790
791- double efficiency = efficiencies[index]->GetBinContent (efficiencies[index]->FindBin (track.pt (), track.eta ()));
791+ double efficiency = efficiencies[index]->GetBinContent (efficiencies[index]->FindBin (track.pt (), track.eta (), centrality ));
792792 if (efficiency > 0 ) {
793793 return efficiency;
794794 } else {
0 commit comments