@@ -61,6 +61,7 @@ struct LfTaskLambdaSpinCorr {
6161 Configurable<bool > cfgEvtRCTFlagCheckerLimitAcceptAsBad{" cfgEvtRCTFlagCheckerLimitAcceptAsBad" , true , " Evt sel: RCT flag checker treat Limited Acceptance As Bad" };
6262 } rctCut;
6363 // mixing
64+ Configurable<int > cosCalculation{" cosCalculation" , 1 , " cos calculation" };
6465 Configurable<int > mixingCombination{" mixingCombination" , 1 , " mixing Combination" };
6566 Configurable<bool > mixingEvSel{" mixingEvSel" , false , " mixingEvSel" };
6667 Configurable<int > cfgCutOccupancy{" cfgCutOccupancy" , 2000 , " Occupancy cut" };
@@ -281,7 +282,18 @@ struct LfTaskLambdaSpinCorr {
281282 auto proton1LambdaRF = boostLambda1ToCM (proton1pairCM);
282283 auto proton2LambdaRF = boostLambda2ToCM (proton2pairCM);
283284
284- double cosThetaDiff = proton1LambdaRF.Vect ().Unit ().Dot (proton2LambdaRF.Vect ().Unit ());
285+ double cosThetaDiff;
286+ if (cosCalculation == 0 ) {
287+ cosThetaDiff = proton1LambdaRF.Vect ().Unit ().Dot (proton2LambdaRF.Vect ().Unit ());
288+ }
289+
290+ if (cosCalculation == 1 ) {
291+ ROOT::Math::XYZVector quantizationAxis = lambda1CM.Vect ().Unit ();
292+ double cosTheta1 = proton1LambdaRF.Vect ().Unit ().Dot (quantizationAxis);
293+ double cosTheta2 = proton2LambdaRF.Vect ().Unit ().Dot (quantizationAxis);
294+ cosThetaDiff = cosTheta1 * cosTheta2;
295+ }
296+
285297 double deltaR = TMath::Sqrt (TMath::Power (particle1.Eta () - particle2.Eta (), 2.0 ) + TMath::Power (particle1.Phi () - particle2.Phi (), 2.0 ));
286298 if (datatype == 0 ) {
287299 if (tag1 && tag3) {
0 commit comments