Skip to content

Commit a9fd8eb

Browse files
committed
add new expression for angular correlation
1 parent 6126331 commit a9fd8eb

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

PWGLF/Tasks/Strangeness/taskLambdaSpinCorr.cxx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)