@@ -125,6 +125,7 @@ struct lambdapolarization {
125125 Configurable<std::string> cfgQvecRefBName{" cfgQvecRefBName" , " TPCneg" , " The name of detector for reference B" };
126126
127127 Configurable<bool > cfgPhiDepStudy{" cfgPhiDepStudy" , false , " cfg for phi dependent study" };
128+ Configurable<bool > cfgUSESP{" cfgUSESP" , false , " cfg for sp" };
128129 Configurable<float > cfgPhiDepSig{" cfgPhiDepSig" , 0.2 , " cfg for significance on phi dependent study" };
129130
130131 Configurable<bool > cfgShiftCorr{" cfgShiftCorr" , false , " additional shift correction" };
@@ -134,6 +135,9 @@ struct lambdapolarization {
134135 Configurable<bool > cfgEffCor{" cfgEffCor" , false , " flag to apply efficiency correction" };
135136 Configurable<std::string> cfgEffCorPath{" cfgEffCorPath" , " " , " path for pseudo efficiency correction" };
136137
138+ Configurable<bool > cfgAccCor{" cfgAccCor" , false , " flag to apply acceptance correction" };
139+ Configurable<std::string> cfgAccCorPath{" cfgAccCorPath" , " " , " path for pseudo acceptance correction" };
140+
137141 Configurable<bool > cfgCalcCum{" cfgCalcCum" , false , " flag to calculate cumulants" };
138142
139143 Configurable<bool > cfgRapidityDep{" cfgRapidityDep" , false , " flag for rapidity dependent study" };
@@ -167,6 +171,7 @@ struct lambdapolarization {
167171 int lastRunNumber = -999 ;
168172 std::vector<TProfile3D*> shiftprofile{};
169173 TProfile2D* EffMap = nullptr ;
174+ TProfile2D* AccMap = nullptr ;
170175
171176 std::string fullCCDBShiftCorrPath;
172177
@@ -697,9 +702,13 @@ struct lambdapolarization {
697702 1.0 / EffMap->GetBinContent (EffMap->GetXaxis ()->FindBin (v0.pt ()), EffMap->GetYaxis ()->FindBin (centrality)));
698703 }
699704 }
705+ double weight = 1.0 ;
706+ weight *= cfgEffCor ? 1.0 / EffMap->GetBinContent (EffMap->GetXaxis ()->FindBin (v0.pt ()), EffMap->GetYaxis ()->FindBin (centrality)) : 1 .;
707+ weight *= cfgAccCor ? 1.0 / AccMap->GetBinContent (AccMap->GetXaxis ()->FindBin (v0.pt ()), AccMap->GetYaxis ()->FindBin (v0.yLambda ())) : 1 .;
700708
701- double weight = cfgEffCor ? 1.0 / EffMap->GetBinContent (EffMap->GetXaxis ()->FindBin (v0.pt ()), EffMap->GetYaxis ()->FindBin (centrality)) : 1 .;
702- double qvecMag = TMath::Sqrt (TMath::Power (collision.qvecIm ()[3 + (nmode - 2 ) * 28 ], 2 ) + TMath::Power (collision.qvecRe ()[3 + (nmode - 2 ) * 28 ], 2 ));
709+ double qvecMag = 1.0 ;
710+ if (cfgUSESP)
711+ qvecMag *= TMath::Sqrt (TMath::Power (collision.qvecIm ()[3 + (nmode - 2 ) * 28 ], 2 ) + TMath::Power (collision.qvecRe ()[3 + (nmode - 2 ) * 28 ], 2 ));
703712
704713 if (nmode == 2 ) { // //////////
705714 if (LambdaTag) {
@@ -864,10 +873,13 @@ struct lambdapolarization {
864873 lastRunNumber = currentRunNumber;
865874 }
866875 }
876+ auto bc = collision.bc_as <aod::BCsWithTimestamps>();
867877 if (cfgEffCor) {
868- auto bc = collision.bc_as <aod::BCsWithTimestamps>();
869878 EffMap = ccdb->getForTimeStamp <TProfile2D>(cfgEffCorPath.value , bc.timestamp ());
870879 }
880+ if (cfgAccCor) {
881+ AccMap = ccdb->getForTimeStamp <TProfile2D>(cfgAccCorPath.value , bc.timestamp ());
882+ }
871883 for (int i = 2 ; i < cfgnMods + 2 ; i++) {
872884 if (cfgShiftCorrDef) {
873885 FillShiftCorrection (collision, i);
0 commit comments