@@ -144,6 +144,7 @@ struct PidFlowPtCorr {
144144 O2_DEFINE_CONFIGURABLE (cfgOutPutPtSpectra, bool , false , " output pt spectra for data, MC and RECO" );
145145 O2_DEFINE_CONFIGURABLE (cfgCheck2MethodDiff, bool , false , " check difference between v2' && v2''" );
146146 O2_DEFINE_CONFIGURABLE (cfgUseITSOnly4MeanPt, bool , false , " use ITS only to calculate mean pt" );
147+ O2_DEFINE_CONFIGURABLE (cfgClosureTest, int , 0 , " choose (val) percent particle from charged to pass Pion PID selection" );
147148 } switchsOpts;
148149
149150 /* *
@@ -566,14 +567,23 @@ struct PidFlowPtCorr {
566567 registry.add (" meanptCentNbs/hChargedPionWithNpair" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
567568 registry.add (" meanptCentNbs/hChargedPionFull" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
568569 registry.add (" meanptCentNbs/hPion" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
570+ registry.add (" meanptCentNbs/hPionMeanptWeightPidflow" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
571+
572+ if (switchsOpts.cfgClosureTest .value != 0 ) {
573+ registry.add (" meanptCentNbs/hPionMeanptWeightC22pure" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
574+ registry.add (" meanptCentNbs/hPionMeanptWeightMeanpt" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
575+ registry.add (" meanptCentNbs/hPionMeanptWeightC22prime" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
576+ }
569577
570578 registry.add (" meanptCentNbs/hChargedKaonWithNpair" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
571579 registry.add (" meanptCentNbs/hChargedKaonFull" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
572580 registry.add (" meanptCentNbs/hKaon" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
581+ registry.add (" meanptCentNbs/hKaonMeanptWeightPidflow" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
573582
574583 registry.add (" meanptCentNbs/hChargedProtonWithNpair" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
575584 registry.add (" meanptCentNbs/hChargedProtonFull" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
576585 registry.add (" meanptCentNbs/hProton" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
586+ registry.add (" meanptCentNbs/hProtonMeanptWeightPidflow" , " " , {HistType::kTProfile3D , {cfgaxisMeanPt, axisMultiplicity, meanptC22GraphOpts.cfgaxisBootstrap }});
577587 // end pid
578588 // end init tprofile3d for <2'> - meanpt
579589
@@ -715,6 +725,13 @@ struct PidFlowPtCorr {
715725 template <typename TrackObject>
716726 bool isPion (TrackObject const & track)
717727 {
728+ if (switchsOpts.cfgClosureTest .value != 0 ) {
729+ float rnd4test = fRndm ->Rndm () * 100 ;
730+ if (rnd4test < switchsOpts.cfgClosureTest .value ) {
731+ return true ;
732+ }
733+ } // closure test
734+
718735 bool resultPion = true ;
719736
720737 // Declare ITSResponse object internally to get ITS Sigma
@@ -911,20 +928,19 @@ struct PidFlowPtCorr {
911928 return ;
912929
913930 registry.fill (HIST (" meanptCentNbs/hCharged" ), ptSum / nch, cent, rndm * cfgFlowNbootstrap, val, nch * dnx);
914- registry.fill (HIST (" meanptCentNbs/hChargedMeanpt" ), ptSum / nch, cent, rndm * cfgFlowNbootstrap, ptSum / nch, nch * dnx);
931+ registry.fill (HIST (" meanptCentNbs/hChargedMeanpt" ), ptSum / nch, cent, rndm * cfgFlowNbootstrap, ptSum / nch, nch * dnx * val );
915932 }
916933
917934 /* *
918- * @brief note that the graph's x axis is pid meanpt, for <2'> weight is nPid * npairPID, for <2> weight is nch * npair
935+ * @brief note that the graph's x axis is pid meanpt, for <2'> weight is nPid * npairPID, for <2> weight is nPid * npair
919936 *
920937 * @param cent
921- * @param nch
922938 * @param rndm
923939 * @param type
924940 * @param pidPtSum
925941 * @param nPid
926942 */
927- void fillFC4PtC22 (const double & cent, const double & nch, const double & rndm, MyParticleType type, const double & pidPtSum, const double & nPid)
943+ void fillFC4PtC22 (const double & cent, const double & rndm, MyParticleType type, const double & pidPtSum, const double & nPid)
928944 {
929945 // <2>
930946 double dnx, val;
@@ -951,8 +967,27 @@ struct PidFlowPtCorr {
951967 return ;
952968
953969 registry.fill (HIST (" meanptCentNbs/hPion" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, pidc22, nPid * npairPid);
954- registry.fill (HIST (" meanptCentNbs/hChargedPionFull" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, val, dnx * nch );
970+ registry.fill (HIST (" meanptCentNbs/hChargedPionFull" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, val, dnx * nPid );
955971 registry.fill (HIST (" meanptCentNbs/hChargedPionWithNpair" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, val, dnx);
972+ registry.fill (HIST (" meanptCentNbs/hPionMeanptWeightPidflow" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, pidPtSum / nPid, nPid * npairPid * pidc22 * pidc22 / val);
973+
974+ if (switchsOpts.cfgClosureTest .value != 0 ) {
975+ double npair4c22pure = fGFW ->Calculate (corrconfigs.at (29 ), 0 , kTRUE ).real ();
976+ if (npair4c22pure > 1e-3 )
977+ registry.fill (HIST (" meanptCentNbs/hPionMeanptWeightC22pure" ),
978+ pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap,
979+ pidPtSum / nPid,
980+ nPid * npairPid * fGFW ->Calculate (corrconfigs.at (29 ), 0 , kFALSE ).real () / npair4c22pure);
981+
982+ registry.fill (HIST (" meanptCentNbs/hPionMeanptWeightMeanpt" ),
983+ pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap,
984+ pidPtSum / nPid,
985+ nPid * npairPid * pidPtSum / nPid);
986+ registry.fill (HIST (" meanptCentNbs/hPionMeanptWeightC22prime" ),
987+ pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap,
988+ pidPtSum / nPid,
989+ nPid * npairPid * pidc22);
990+ }
956991
957992 break ;
958993 // end pion
@@ -967,8 +1002,9 @@ struct PidFlowPtCorr {
9671002 return ;
9681003
9691004 registry.fill (HIST (" meanptCentNbs/hKaon" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, pidc22, nPid * npairPid);
970- registry.fill (HIST (" meanptCentNbs/hChargedKaonFull" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, val, dnx * nch );
1005+ registry.fill (HIST (" meanptCentNbs/hChargedKaonFull" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, val, dnx * nPid );
9711006 registry.fill (HIST (" meanptCentNbs/hChargedKaonWithNpair" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, val, dnx);
1007+ registry.fill (HIST (" meanptCentNbs/hKaonMeanptWeightPidflow" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, pidPtSum / nPid, nPid * npairPid * pidc22 * pidc22 / val);
9721008
9731009 break ;
9741010 // end kaon
@@ -983,8 +1019,9 @@ struct PidFlowPtCorr {
9831019 return ;
9841020
9851021 registry.fill (HIST (" meanptCentNbs/hProton" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, pidc22, nPid * npairPid);
986- registry.fill (HIST (" meanptCentNbs/hChargedProtonFull" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, val, dnx * nch );
1022+ registry.fill (HIST (" meanptCentNbs/hChargedProtonFull" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, val, dnx * nPid );
9871023 registry.fill (HIST (" meanptCentNbs/hChargedProtonWithNpair" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, val, dnx);
1024+ registry.fill (HIST (" meanptCentNbs/hProtonMeanptWeightPidflow" ), pidPtSum / nPid, cent, rndm * cfgFlowNbootstrap, pidPtSum / nPid, nPid * npairPid * pidc22 * pidc22 / val);
9881025
9891026 break ;
9901027 // end proton
@@ -2066,13 +2103,13 @@ struct PidFlowPtCorr {
20662103
20672104 fillFC4PtC22 (cent, ptSum, nch, rndm);
20682105 if (nPionWeighted > 0 )
2069- fillFC4PtC22 (cent, nch, rndm, MyParticleType::kPion , pionPtSum, nPionWeighted);
2106+ fillFC4PtC22 (cent, rndm, MyParticleType::kPion , pionPtSum, nPionWeighted);
20702107
20712108 if (nKaonWeighted > 0 )
2072- fillFC4PtC22 (cent, nch, rndm, MyParticleType::kKaon , kaonPtSum, nKaonWeighted);
2109+ fillFC4PtC22 (cent, rndm, MyParticleType::kKaon , kaonPtSum, nKaonWeighted);
20732110
20742111 if (nProtonWeighted > 0 )
2075- fillFC4PtC22 (cent, nch, rndm, MyParticleType::kProton , protonPtSum, nProtonWeighted);
2112+ fillFC4PtC22 (cent, rndm, MyParticleType::kProton , protonPtSum, nProtonWeighted);
20762113
20772114 if (switchsOpts.cfgOutPutPtSpectra .value ) {
20782115 // charged calculation
0 commit comments