@@ -106,8 +106,8 @@ struct lambda1405analysis {
106106 HistogramRegistry rSigmaPlus{" sigmaPlus" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
107107 HistogramRegistry rSelections{" selections" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
108108 // Configurable for event selection
109- Configurable<float > cutzvertex {" cutZVertex" , 10 .0f , " Accepted z-vertex range (cm)" };
110- Configurable<float > cutEtaDaught {" cutEtaDaughter" , 0 .8f , " Eta cut for daughter tracks" };
109+ Configurable<float > cutZVertex {" cutZVertex" , 10 .0f , " Accepted z-vertex range (cm)" };
110+ Configurable<float > cutEtaDaughter {" cutEtaDaughter" , 0 .8f , " Eta cut for daughter tracks" };
111111 Configurable<float > cutDCAtoPvSigma{" cutDCAtoPvSigma" , 0 .1f , " Max DCA to primary vertex for Sigma candidates (cm)" };
112112 Configurable<float > cutDCAtoPvPiFromSigma{" cutDCAtoPvPiFromSigma" , 2 ., " Min DCA to primary vertex for pion from Sigma candidates (cm)" };
113113
@@ -135,15 +135,10 @@ struct lambda1405analysis {
135135 Configurable<float > ptDownSampleMax{" ptDownSampleMax" , 10 ., " Maximum pt for the application of the downsampling factor" };
136136
137137 Configurable<bool > fillOutputTree{" fillOutputTree" , true , " If true, fill the output tree with Lambda(1405) candidates" };
138- Configurable<bool > doLSBkg {" doLikeSignBkg" , false , " Use like-sign background" };
138+ Configurable<bool > doLikeSignBkg {" doLikeSignBkg" , false , " Use like-sign background" };
139139 Configurable<bool > useTof{" useTof" , false , " Use Tof for PId for pion candidates" };
140140
141- TF1 * funcMinQtAlphaAP = nullptr ;
142- TF1 * funcMaxQtAlphaAP = nullptr ;
143- TF1 * funcMinBachPiPtVsL1405Pt = nullptr ;
144- TF1 * funcMaxBachPiPtVsL1405Pt = nullptr ;
145- TF1 * funcMinSigmaPtVsL1405Pt = nullptr ;
146- TF1 * funcMaxSigmaPtVsL1405Pt = nullptr ;
141+ TF1 funcMinQtAlphaAP, funcMaxQtAlphaAP, funcMinBachPiPtVsL1405Pt, funcMaxBachPiPtVsL1405Pt, funcMinSigmaPtVsL1405Pt, funcMaxSigmaPtVsL1405Pt;
147142
148143 using CollisionsCentSel = soa::Filtered<CollisionsFullWCentQVecs>;
149144 using McRecoCollisionsCentSel = soa::Filtered<CollisionsFullMcWCent>;
@@ -342,17 +337,17 @@ struct lambda1405analysis {
342337 }
343338
344339 // Functional selections
345- funcMinQtAlphaAP = new TF1 (" funcMinQtAlphaAP" , Form (" %s" , cutSigmaQtAPMin.value .data ()), -1 , 1 );
340+ funcMinQtAlphaAP = TF1 (" funcMinQtAlphaAP" , Form (" %s" , cutSigmaQtAPMin.value .data ()), -1 , 1 );
346341 LOGF (info, " funcMinQtAlphaAP: %s" , Form (" %s" , cutSigmaQtAPMin.value .data ()));
347- funcMaxQtAlphaAP = new TF1 (" funcMaxQtAlphaAP" , Form (" %s" , cutSigmaQtAPMax.value .data ()), -1 , 1 );
342+ funcMinQtAlphaAP = TF1 (" funcMaxQtAlphaAP" , Form (" %s" , cutSigmaQtAPMax.value .data ()), -1 , 1 );
348343 LOGF (info, " funcMaxQtAlphaAP: %s" , Form (" %s" , cutSigmaQtAPMax.value .data ()));
349- funcMinBachPiPtVsL1405Pt = new TF1 (" funcMinBachPiPtVsL1405Pt" , Form (" %s" , cutMinBachPiPtVsL1405Pt.value .data ()), 0 ., 100 );
344+ funcMinQtAlphaAP = TF1 (" funcMinBachPiPtVsL1405Pt" , Form (" %s" , cutMinBachPiPtVsL1405Pt.value .data ()), 0 ., 100 );
350345 LOGF (info, " funcMinBachPiPtVsL1405Pt: %s" , Form (" %s" , cutMinBachPiPtVsL1405Pt.value .data ()));
351- funcMaxBachPiPtVsL1405Pt = new TF1 (" funcMaxBachPiPtVsL1405Pt" , Form (" %s" , cutMaxBachPiPtVsL1405Pt.value .data ()), 0 ., 100 );
346+ funcMinQtAlphaAP = TF1 (" funcMaxBachPiPtVsL1405Pt" , Form (" %s" , cutMaxBachPiPtVsL1405Pt.value .data ()), 0 ., 100 );
352347 LOGF (info, " funcMaxBachPiPtVsL1405Pt: %s" , Form (" %s" , cutMaxBachPiPtVsL1405Pt.value .data ()));
353- funcMinSigmaPtVsL1405Pt = new TF1 (" funcMinSigmaPtVsL1405Pt" , Form (" %s" , cutMinSigmaPtVsL1405Pt.value .data ()), 0 ., 100 );
348+ funcMinQtAlphaAP = TF1 (" funcMinSigmaPtVsL1405Pt" , Form (" %s" , cutMinSigmaPtVsL1405Pt.value .data ()), 0 ., 100 );
354349 LOGF (info, " funcMinSigmaPtVsL1405Pt: %s" , Form (" %s" , cutMinSigmaPtVsL1405Pt.value .data ()));
355- funcMaxSigmaPtVsL1405Pt = new TF1 (" funcMaxSigmaPtVsL1405Pt" , Form (" %s" , cutMaxSigmaPtVsL1405Pt.value .data ()), 0 ., 100 );
350+ funcMinQtAlphaAP = TF1 (" funcMaxSigmaPtVsL1405Pt" , Form (" %s" , cutMaxSigmaPtVsL1405Pt.value .data ()), 0 ., 100 );
356351 LOGF (info, " funcMaxSigmaPtVsL1405Pt: %s" , Form (" %s" , cutMaxSigmaPtVsL1405Pt.value .data ()));
357352 }
358353
@@ -385,7 +380,7 @@ struct lambda1405analysis {
385380 }
386381 rSelections.fill (HIST (" hSelectionsBachPi" ), 3 ); // Tpc clusters
387382
388- if (std::abs (std::abs ( candidate.eta ()) > cutEtaDaught) ) {
383+ if (std::abs (candidate.eta ()) > cutEtaDaughter ) {
389384 return false ;
390385 }
391386 rSelections.fill (HIST (" hSelectionsBachPi" ), 4 ); // Eta selection
@@ -408,7 +403,7 @@ struct lambda1405analysis {
408403 }
409404 rSelections.fill (HIST (" hSelectionsKinkPi" ), 2 ); // Tpc clusters
410405
411- if (std::abs (std::abs ( candidate.eta ()) > cutEtaDaught) ) {
406+ if (std::abs (candidate.eta ()) > cutEtaDaughter ) {
412407 return false ;
413408 }
414409 rSelections.fill (HIST (" hSelectionsKinkPi" ), 3 ); // Eta selection
@@ -446,7 +441,7 @@ struct lambda1405analysis {
446441 }
447442 rSelections.fill (HIST (" hSelectionsKinkPr" ), 2 ); // Tpc clusters
448443
449- if (std::abs (candidate.eta ()) > cutEtaDaught ) {
444+ if (std::abs (candidate.eta ()) > cutEtaDaughter ) {
450445 return false ;
451446 }
452447 rSelections.fill (HIST (" hSelectionsKinkPr" ), 3 ); // eta selection
@@ -618,8 +613,8 @@ struct lambda1405analysis {
618613 lambda1405Cand.sigmaRadius = sigmaRad;
619614 lambda1405Cand.kinkDcaDauToPv = sigmaCand.dcaDaugPv ();
620615
621- if (lambda1405Cand.sigmaQtAP < funcMinQtAlphaAP-> Eval (lambda1405Cand.sigmaAlphaAP ) ||
622- lambda1405Cand.sigmaQtAP > funcMaxQtAlphaAP-> Eval (lambda1405Cand.sigmaAlphaAP )) {
616+ if (lambda1405Cand.sigmaQtAP < funcMinQtAlphaAP. Eval (lambda1405Cand.sigmaAlphaAP ) ||
617+ lambda1405Cand.sigmaQtAP > funcMaxQtAlphaAP. Eval (lambda1405Cand.sigmaAlphaAP )) {
623618 return ;
624619 }
625620 if (sigmaCand.mothSign () < 0 ) {
@@ -643,7 +638,7 @@ struct lambda1405analysis {
643638 rSelections.fill (HIST (" hSelectionsBachPi" ), 0 ); // All bachelors
644639
645640 bool isUnlikeSign = (piTrack.sign () != sigmaCand.mothSign ());
646- bool acceptPair = doLSBkg ? !isUnlikeSign : isUnlikeSign;
641+ bool acceptPair = doLikeSignBkg ? !isUnlikeSign : isUnlikeSign;
647642 if (!acceptPair) {
648643 continue ;
649644 }
@@ -687,14 +682,14 @@ struct lambda1405analysis {
687682 lambda1405Cand.scalarProd = -1 ;
688683
689684 // Check correlations between transverse momenta of L1405, sigma and bachelor pi
690- if (std::hypot (sigmaCand.pxMoth (), sigmaCand.pyMoth ()) < funcMinSigmaPtVsL1405Pt-> Eval (lambda1405Cand.pt ()) ||
691- std::hypot (sigmaCand.pxMoth (), sigmaCand.pyMoth ()) > funcMaxSigmaPtVsL1405Pt-> Eval (lambda1405Cand.pt ())) {
685+ if (std::hypot (sigmaCand.pxMoth (), sigmaCand.pyMoth ()) < funcMinSigmaPtVsL1405Pt. Eval (lambda1405Cand.pt ()) ||
686+ std::hypot (sigmaCand.pxMoth (), sigmaCand.pyMoth ()) > funcMaxSigmaPtVsL1405Pt. Eval (lambda1405Cand.pt ())) {
692687 continue ;
693688 }
694689 rSelections.fill (HIST (" hSelectionsL1405" ), 4 ); // Accepted
695690
696- if (piTrack.pt () < funcMinBachPiPtVsL1405Pt-> Eval (lambda1405Cand.pt ()) ||
697- piTrack.pt () > funcMaxBachPiPtVsL1405Pt-> Eval (lambda1405Cand.pt ())) {
691+ if (piTrack.pt () < funcMinBachPiPtVsL1405Pt. Eval (lambda1405Cand.pt ()) ||
692+ piTrack.pt () > funcMaxBachPiPtVsL1405Pt. Eval (lambda1405Cand.pt ())) {
698693 continue ;
699694 }
700695 rSelections.fill (HIST (" hSelectionsL1405" ), 5 ); // Accepted
@@ -734,7 +729,7 @@ struct lambda1405analysis {
734729 return ;
735730 }
736731 }
737- if (std::abs (collision.posZ ()) > cutzvertex || !collision.sel8 ()) {
732+ if (std::abs (collision.posZ ()) > cutZVertex || !collision.sel8 ()) {
738733 return ;
739734 }
740735 rEventSelection.fill (HIST (" hVertexZRec" ), collision.posZ ());
@@ -896,7 +891,7 @@ struct lambda1405analysis {
896891 return ;
897892 }
898893 }
899- if (std::abs (collision.posZ ()) > cutzvertex ) { // || !collision.sel8()) {
894+ if (std::abs (collision.posZ ()) > cutZVertex ) { // || !collision.sel8()) {
900895 continue ;
901896 }
902897 rEventSelection.fill (HIST (" hVertexZRec" ), collision.posZ ());
@@ -931,7 +926,7 @@ struct lambda1405analysis {
931926 }
932927 rLambda1405.fill (HIST (" hRecoL1405" ), 2 ., lambda1405Cand.pt ()); // Has kink decay in MC
933928
934- if (std::abs (mcTrackPi.pdgCode ()) != 211 ) {
929+ if (std::abs (mcTrackPi.pdgCode ()) != PDG_t:: kPiPlus ) {
935930 continue ; // Skip if not a valid pion candidate
936931 }
937932 rLambda1405.fill (HIST (" hRecoL1405" ), 3 ., lambda1405Cand.pt ()); // Has bach pi
0 commit comments