@@ -417,18 +417,9 @@ struct cascadeFlow {
417417 return false ;
418418 }
419419
420- if (isFillHisto)
420+ if (isFillHisto) {
421421 histos.fill (HIST (" hNEvents" ), 7.5 );
422-
423- // TVX in TRD
424- // if (isNoTVXinTRD && collision.alias_bit(kTVXinTRD)){
425- // return false;
426- // }
427-
428- if (isFillHisto)
429422 histos.fill (HIST (" hNEvents" ), 8.5 );
430-
431- if (isFillHisto) {
432423 histos.fill (HIST (" hEventNchCorrelation" ), collision.multNTracksPVeta1 (), collision.multNTracksGlobal ());
433424 histos.fill (HIST (" hEventPVcontributorsVsCentrality" ), collision.centFT0C (), collision.multNTracksPVeta1 ());
434425 histos.fill (HIST (" hEventGlobalTracksVsCentrality" ), collision.centFT0C (), collision.multNTracksGlobal ());
@@ -568,13 +559,11 @@ struct cascadeFlow {
568559
569560 int currentRunNumber = -999 ;
570561 int lastRunNumber = -999 ;
571- TProfile3D* shiftprofile;
572- TProfile3D* shiftprofileFT0C;
573- TProfile3D* shiftprofileFV0A;
574- TProfile3D* shiftprofileFT0A;
575- TProfile3D* shiftprofileTPCL;
576- TProfile3D* shiftprofileTPCR;
577- std::string fullCCDBShiftCorrPath;
562+ TProfile3D* shiftprofileFT0C = nullptr ;
563+ TProfile3D* shiftprofileFV0A = nullptr ;
564+ TProfile3D* shiftprofileFT0A = nullptr ;
565+ TProfile3D* shiftprofileTPCL = nullptr ;
566+ TProfile3D* shiftprofileTPCR = nullptr ;
578567 std::string fullCCDBShiftCorrPathFT0C;
579568 std::string fullCCDBShiftCorrPathFV0A;
580569 std::string fullCCDBShiftCorrPathFT0A;
@@ -640,16 +629,16 @@ struct cascadeFlow {
640629 }
641630
642631 // objects to use for acceptance correction
643- TH2F * hAcceptanceXi;
644- TH2F * hAcceptanceOmega;
645- TH2F * hAcceptanceLambda;
646- TH2F * hAcceptancePrimaryLambda;
632+ TH2F * hAcceptanceXi = nullptr ;
633+ TH2F * hAcceptanceOmega = nullptr ;
634+ TH2F * hAcceptanceLambda = nullptr ;
635+ TH2F * hAcceptancePrimaryLambda = nullptr ;
647636
648637 // objects to use for resolution correction
649- TH1F * hReso;
638+ TH1F * hReso = nullptr ;
650639
651640 // objects to use for centrality weight
652- TH1F * hCentWeight;
641+ TH1F * hCentWeight = nullptr ;
653642
654643 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject, false , true };
655644 HistogramRegistry histosMCGen{" histosMCGen" , {}, OutputObjHandlingPolicy::AnalysisObject, false , true };
@@ -1232,8 +1221,8 @@ struct cascadeFlow {
12321221 continue ;
12331222 }
12341223
1235- float sigmaRangeXi[2 ]{getNsigmaMass (cascadev2::Xi, casc.pt (), sideBandStart), getNsigmaMass (cascadev2::Xi, casc.pt (), sideBandEnd)};
1236- float sigmaRangeOmega[2 ]{getNsigmaMass (cascadev2::Omega, casc.pt (), sideBandStart), getNsigmaMass (cascadev2::Omega, casc.pt (), sideBandEnd)};
1224+ const float sigmaRangeXi[2 ]{getNsigmaMass (cascadev2::Xi, casc.pt (), sideBandStart), getNsigmaMass (cascadev2::Xi, casc.pt (), sideBandEnd)};
1225+ const float sigmaRangeOmega[2 ]{getNsigmaMass (cascadev2::Omega, casc.pt (), sideBandStart), getNsigmaMass (cascadev2::Omega, casc.pt (), sideBandEnd)};
12371226
12381227 if ((std::abs (casc.mXi () - constants::physics::MassXiMinus) < sigmaRangeXi[0 ] ||
12391228 std::abs (casc.mXi () - constants::physics::MassXiMinus) > sigmaRangeXi[1 ]) &&
@@ -1404,7 +1393,7 @@ struct cascadeFlow {
14041393 bool isCascCandidate = 0 ;
14051394 isCascCandidate = IsCascAccepted (casc, negExtra, posExtra, bachExtra, counter);
14061395 histos.fill (HIST (" hCascade" ), counter);
1407- histos.fill (HIST (" hCascadeDauSel" ), ( int ) isCascCandidate);
1396+ histos.fill (HIST (" hCascadeDauSel" ), static_cast < int >( isCascCandidate) );
14081397 if (!isCascCandidate)
14091398 continue ;
14101399
@@ -1480,7 +1469,7 @@ struct cascadeFlow {
14801469 // polarization variables
14811470 double masses[2 ]{o2::constants::physics::MassXiMinus, o2::constants::physics::MassOmegaMinus};
14821471 ROOT ::Math::PxPyPzMVector cascadeVector[2 ], lambdaVector, protonVector;
1483- float cosThetaStarLambda[2 ], cosThetaStarProton;
1472+ double cosThetaStarLambda[2 ], cosThetaStarProton;
14841473
14851474 double massLambda = casc.mLambda ();
14861475 if (fillingConfigs.isFillNominalMass )
@@ -1735,7 +1724,7 @@ struct cascadeFlow {
17351724 bool isCascCandidate = 0 ;
17361725 isCascCandidate = IsCascAccepted (casc, negExtra, posExtra, bachExtra, counter);
17371726 histos.fill (HIST (" hCascade" ), counter);
1738- histos.fill (HIST (" hCascadeDauSel" ), ( int ) isCascCandidate);
1727+ histos.fill (HIST (" hCascadeDauSel" ), static_cast < int >( isCascCandidate) );
17391728 if (!isCascCandidate)
17401729 continue ;
17411730
@@ -1805,7 +1794,7 @@ struct cascadeFlow {
18051794 // polarization variables
18061795 double masses[nParticles]{o2::constants::physics::MassXiMinus, o2::constants::physics::MassOmegaMinus};
18071796 ROOT ::Math::PxPyPzMVector cascadeVector[nParticles], lambdaVector, protonVector;
1808- float cosThetaStarLambda[nParticles], cosThetaStarProton;
1797+ double cosThetaStarLambda[nParticles], cosThetaStarProton;
18091798
18101799 double massLambda = casc.mLambda ();
18111800 if (fillingConfigs.isFillNominalMass )
@@ -2134,7 +2123,6 @@ struct cascadeFlow {
21342123 centWeight = hCentWeight->GetBinContent (centBin);
21352124 }
21362125
2137- std::vector<float > bdtScore[nParticles];
21382126 for (auto const & v0 : V0s) {
21392127
21402128 // / Add some minimal cuts for single track variables (min number of TPC clusters)
@@ -2182,11 +2170,11 @@ struct cascadeFlow {
21822170 histos.fill (HIST (" hLambdaCandidate" ), 3 );
21832171 continue ; // in case of ambiguity between Lambda and AntiLambda, I skip the particle; checked to be zero in range 1.105 - 1.125
21842172 }
2185- if (v0.mLambda () > V0Configs.MinMassLambda && v0.mLambda () < V0Configs.MaxMassLambda )
2173+ if (v0.mLambda () > V0Configs.MinMassLambda && v0.mLambda () < V0Configs.MaxMassLambda ) {
21862174 chargeIndex = 0 ;
2187- else if (v0.mAntiLambda () > V0Configs.MinMassLambda && v0.mAntiLambda () < V0Configs.MaxMassLambda )
2175+ } else if (v0.mAntiLambda () > V0Configs.MinMassLambda && v0.mAntiLambda () < V0Configs.MaxMassLambda ) {
21882176 chargeIndex = 1 ;
2189- else {
2177+ } else {
21902178 chargeIndex = 2 ; // these are bkg candidates
21912179 histos.fill (HIST (" hLambdaCandidate" ), 4 );
21922180 }
@@ -2211,7 +2199,7 @@ struct cascadeFlow {
22112199 if (fillingConfigs.isFillNominalMass )
22122200 massLambda = o2::constants::physics::MassLambda;
22132201
2214- float cosThetaStarProton[nCharges];
2202+ double cosThetaStarProton[nCharges] = { 0 } ;
22152203 ROOT ::Math::PxPyPzMVector lambdaVector, protonVector[nCharges];
22162204 lambdaVector.SetCoordinates (v0.px (), v0.py (), v0.pz (), massLambda);
22172205 ROOT ::Math::Boost lambdaBoost{lambdaVector.BoostToCM ()};
@@ -2253,31 +2241,31 @@ struct cascadeFlow {
22532241 histos.fill (HIST (" hLambdaPhi" ), v0.phi ());
22542242 histos.fill (HIST (" hlambdaminuspsiT0C" ), lambdaminuspsiT0C);
22552243
2244+ double invMassLambda = 0 ;
2245+ if (chargeIndex == 0 )
2246+ invMassLambda = v0.mLambda ();
2247+ else if (chargeIndex == 1 )
2248+ invMassLambda = v0.mAntiLambda ();
2249+ else
2250+ invMassLambda = v0.mLambda ();
2251+
22562252 if (fillingConfigs.isFillTHNLambda ) {
22572253 if (fillingConfigs.isFillTHN_V2 )
2258- histos.get <THn>(HIST (" hLambdaV2" ))->Fill (collisionCentrality, chargeIndex, v0.pt (), v0. mLambda () , v2CEP);
2254+ histos.get <THn>(HIST (" hLambdaV2" ))->Fill (collisionCentrality, chargeIndex, v0.pt (), invMassLambda , v2CEP);
22592255 if (fillingConfigs.isFillTHN_Pz ) {
2260- // histos.get<THn>(HIST("hLambdaPzs2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), v0.mLambda() , pzs2Lambda);
2261- histos.get <THn>(HIST (" hLambdaPzs2" ))->Fill (collisionCentrality, chargeIndex, v0.pt (), v0. mLambda () , pzs2Lambda, centWeight);
2256+ // histos.get<THn>(HIST("hLambdaPzs2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), invMassLambda , pzs2Lambda);
2257+ histos.get <THn>(HIST (" hLambdaPzs2" ))->Fill (collisionCentrality, chargeIndex, v0.pt (), invMassLambda , pzs2Lambda, centWeight);
22622258 }
22632259 if (fillingConfigs.isFillTHN_Acc )
2264- histos.get <THn>(HIST (" hLambdaCos2Theta" ))->Fill (collisionCentrality, chargeIndex, v0.eta (), v0.pt (), v0. mLambda () , cos2ThetaLambda);
2260+ histos.get <THn>(HIST (" hLambdaCos2Theta" ))->Fill (collisionCentrality, chargeIndex, v0.eta (), v0.pt (), invMassLambda , cos2ThetaLambda);
22652261 }
22662262 if (fillingConfigs.isFillTHNLambda_PzVsPsi ) {
22672263 if (fillingConfigs.isFillTHN_Pz )
2268- histos.get <THn>(HIST (" hLambdaPzVsPsi" ))->Fill (collisionCentrality, chargeIndex, v0.pt (), v0. mLambda () , cosThetaLambda, 2 * lambdaminuspsiT0C, centWeight);
2264+ histos.get <THn>(HIST (" hLambdaPzVsPsi" ))->Fill (collisionCentrality, chargeIndex, v0.pt (), invMassLambda , cosThetaLambda, 2 * lambdaminuspsiT0C, centWeight);
22692265 if (fillingConfigs.isFillTHN_Acc )
2270- histos.get <THn>(HIST (" hLambdaCos2ThetaVsPsi" ))->Fill (collisionCentrality, chargeIndex, v0.eta (), v0.pt (), v0. mLambda () , cos2ThetaLambda, 2 * lambdaminuspsiT0C);
2266+ histos.get <THn>(HIST (" hLambdaCos2ThetaVsPsi" ))->Fill (collisionCentrality, chargeIndex, v0.eta (), v0.pt (), invMassLambda , cos2ThetaLambda, 2 * lambdaminuspsiT0C);
22712267 }
22722268
2273- double invMassLambda = 0 ;
2274- if (chargeIndex == 0 )
2275- invMassLambda = v0.mLambda ();
2276- else if (chargeIndex == 1 )
2277- invMassLambda = v0.mAntiLambda ();
2278- else
2279- invMassLambda = v0.mLambda ();
2280-
22812269 // mass selection
22822270 if (invMassLambda < V0Configs.MinMassLambdaInTree || invMassLambda > V0Configs.MaxMassLambdaInTree )
22832271 continue ;
@@ -2392,7 +2380,7 @@ struct cascadeFlow {
23922380 bool isCascCandidate = 0 ;
23932381 isCascCandidate = IsCascAccepted (casc, negExtra, posExtra, bachExtra, counter);
23942382 histos.fill (HIST (" hCascade" ), counter);
2395- histos.fill (HIST (" hCascadeDauSel" ), ( int ) isCascCandidate);
2383+ histos.fill (HIST (" hCascadeDauSel" ), static_cast < int >( isCascCandidate) );
23962384 if (!isCascCandidate)
23972385 continue ;
23982386
@@ -2551,7 +2539,7 @@ struct cascadeFlow {
25512539 bool isCascCandidate = 0 ;
25522540 isCascCandidate = IsCascAccepted (casc, negExtra, posExtra, bachExtra, counter);
25532541 histos.fill (HIST (" hCascade" ), counter);
2554- histos.fill (HIST (" hCascadeDauSel" ), ( int ) isCascCandidate);
2542+ histos.fill (HIST (" hCascadeDauSel" ), static_cast < int >( isCascCandidate) );
25552543 if (!isCascCandidate)
25562544 continue ;
25572545
0 commit comments