1111// Lambda spin spin correlation task
1212// prottay.das@cern.ch, sourav.kundu@cern.ch
1313
14- #include < TH1F.h>
15- #include < TDirectory.h>
1614#include < THn.h>
1715#include < TLorentzVector.h>
1816#include < TMath.h>
1917#include < TObjArray.h>
20- #include < TFile.h>
21- #include < TH2F.h>
22- #include < TLorentzVector.h>
23- #include < TPDGCode.h>
2418#include < cmath>
2519#include < array>
2620#include < cstdlib>
2721#include < tuple>
28-
29- #include " TRandom3.h"
3022#include " Math/Vector3D.h"
3123#include " Math/Vector4D.h"
3224#include " Math/GenVector/Boost.h"
33- #include " TF1.h"
3425
3526#include " Framework/runDataProcessing.h"
3627#include " Framework/AnalysisTask.h"
4738#include " Common/Core/TrackSelection.h"
4839#include " Framework/ASoAHelpers.h"
4940#include " ReconstructionDataFormats/Track.h"
50- #include " DataFormatsParameters/GRPObject.h"
51- #include " DataFormatsParameters/GRPMagField.h"
5241#include " CCDB/BasicCCDBManager.h"
5342#include " PWGLF/DataModel/LFStrangenessTables.h"
5443#include " PWGLF/DataModel/LFStrangenessPIDTables.h"
@@ -128,20 +117,20 @@ struct lambdapolspspin {
128117
129118 histos.add (" hCentrality" , " Centrality distribution" , kTH1F , {{configcentAxis}});
130119
131- histos.add (" hSparseLambdaLambda" , " hSparseLambdaLambda" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, configthnAxispT}, true );
132- histos.add (" hSparseLambdaAntiLambda" , " hSparseLambdaAntiLambda" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, configthnAxispT}, true );
133- histos.add (" hSparseAntiLambdaAntiLambda" , " hSparseAntiLambdaAntiLambda" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, configthnAxispT}, true );
120+ histos.add (" hSparseLambdaLambda" , " hSparseLambdaLambda" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, configthnAxispT, configthnAxispT }, true );
121+ histos.add (" hSparseLambdaAntiLambda" , " hSparseLambdaAntiLambda" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, configthnAxispT, configthnAxispT }, true );
122+ histos.add (" hSparseAntiLambdaAntiLambda" , " hSparseAntiLambdaAntiLambda" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, configthnAxispT, configthnAxispT }, true );
134123 }
135124
136125 template <typename Collision, typename V0>
137126 bool SelectionV0 (Collision const & collision, V0 const & candidate)
138127 {
139- if (TMath::Abs (candidate.dcav0topv ()) > cMaxV0DCA) {
128+ if (std::abs (candidate.dcav0topv ()) > cMaxV0DCA) {
140129 return false ;
141130 }
142131 const float pT = candidate.pt ();
143132 const float tranRad = candidate.v0radius ();
144- const float dcaDaughv0 = TMath::Abs (candidate.dcaV0daughters ());
133+ const float dcaDaughv0 = std::abs (candidate.dcaV0daughters ());
145134 const float cpav0 = candidate.v0cosPA ();
146135
147136 float CtauLambda = candidate.distovertotmom (collision.posX (), collision.posY (), collision.posZ ()) * massLambda;
@@ -161,10 +150,10 @@ struct lambdapolspspin {
161150 if (tranRad > ConfV0TranRadV0Max) {
162151 return false ;
163152 }
164- if (TMath::Abs (CtauLambda) > cMaxV0LifeTime) {
153+ if (std::abs (CtauLambda) > cMaxV0LifeTime) {
165154 return false ;
166155 }
167- if (TMath::Abs (candidate.yLambda ()) > ConfV0Rap) {
156+ if (std::abs (candidate.yLambda ()) > ConfV0Rap) {
168157 return false ;
169158 }
170159 return true ;
@@ -183,10 +172,10 @@ struct lambdapolspspin {
183172 return false ;
184173 }
185174
186- if (pid == 0 && TMath::Abs (track.tpcNSigmaPr ()) > ConfDaughPIDCuts) {
175+ if (pid == 0 && std::abs (track.tpcNSigmaPr ()) > ConfDaughPIDCuts) {
187176 return false ;
188177 }
189- if (pid == 1 && TMath::Abs (track.tpcNSigmaPi ()) > ConfDaughPIDCuts) {
178+ if (pid == 1 && std::abs (track.tpcNSigmaPi ()) > ConfDaughPIDCuts) {
190179 return false ;
191180 }
192181 if (pid == 0 && (candidate.positivept () < cfgDaughPrPt || candidate.negativept () < cfgDaughPiPt)) {
@@ -199,10 +188,10 @@ struct lambdapolspspin {
199188 return false ;
200189 }
201190
202- if (pid == 0 && (TMath::Abs (candidate.dcapostopv ()) < cMinV0DCAPr || TMath::Abs (candidate.dcanegtopv ()) < cMinV0DCAPi)) {
191+ if (pid == 0 && (std::abs (candidate.dcapostopv ()) < cMinV0DCAPr || std::abs (candidate.dcanegtopv ()) < cMinV0DCAPi)) {
203192 return false ;
204193 }
205- if (pid == 1 && (TMath::Abs (candidate.dcapostopv ()) < cMinV0DCAPi || TMath::Abs (candidate.dcanegtopv ()) < cMinV0DCAPr)) {
194+ if (pid == 1 && (std::abs (candidate.dcapostopv ()) < cMinV0DCAPi || std::abs (candidate.dcanegtopv ()) < cMinV0DCAPr)) {
206195 return false ;
207196 }
208197
@@ -223,7 +212,7 @@ struct lambdapolspspin {
223212 void fillHistograms (bool tag1, bool tag2, bool tag3, bool tag4, const ROOT::Math::PxPyPzMVector& particlepair,
224213 const ROOT::Math::PxPyPzMVector& particle1, const ROOT::Math::PxPyPzMVector& particle2,
225214 const ROOT::Math::PxPyPzMVector& daughpart1, const ROOT::Math::PxPyPzMVector& daughpart2,
226- double centrality, double candmass, double candpt )
215+ double centrality)
227216 {
228217
229218 ROOT::Math::Boost boostPairToCM{particlepair.BoostToCM ()}; // boosting vector for pair CM
@@ -248,8 +237,8 @@ struct lambdapolspspin {
248237 double cosTheta1 = proton1_LambdaRF.Vect ().Unit ().Dot (quantizationAxis);
249238 double cosTheta2 = proton2_LambdaRF.Vect ().Unit ().Dot (-quantizationAxis); // Opposite for Lambda2
250239
251- double theta1 = acos (cosTheta1); // angle in radians
252- double theta2 = acos (cosTheta2); // angle in radians
240+ double theta1 = std:: acos (cosTheta1); // angle in radians
241+ double theta2 = std:: acos (cosTheta2); // angle in radians
253242 // Step 2: Compute sin(theta1) and sin(theta2)
254243 // double sinTheta1 = std::sqrt(1 - cosTheta1 * cosTheta1);
255244 // double sinTheta2 = std::sqrt(1 - cosTheta2 * cosTheta2);
@@ -259,11 +248,11 @@ struct lambdapolspspin {
259248 double cosThetaDiff = TMath::Cos (theta1 - theta2);
260249
261250 if (tag1 && tag3)
262- histos.fill (HIST (" hSparseLambdaLambda" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, candmass, candpt );
251+ histos.fill (HIST (" hSparseLambdaLambda" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, particle1. Pt (), particle2. Pt () );
263252 if (tag1 && tag4)
264- histos.fill (HIST (" hSparseLambdaAntiLambda" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, candmass, candpt );
253+ histos.fill (HIST (" hSparseLambdaAntiLambda" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, particle1. Pt (), particle2. Pt () );
265254 if (tag2 && tag4)
266- histos.fill (HIST (" hSparseAntiLambdaAntiLambda" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, candmass, candpt );
255+ histos.fill (HIST (" hSparseAntiLambdaAntiLambda" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, particle1. Pt (), particle2. Pt () );
267256 }
268257
269258 std::tuple<int , int , bool > getLambdaTags (const auto & v0, const auto & collision)
@@ -296,7 +285,7 @@ struct lambdapolspspin {
296285 return {0 , 0 , false }; // Fails selection
297286 }
298287
299- if (TMath::Abs (v0.eta ()) > 0.8 ) {
288+ if (std::abs (v0.eta ()) > 0.8 ) {
300289 return {0 , 0 , false }; // Fails selection
301290 }
302291
@@ -339,7 +328,7 @@ struct lambdapolspspin {
339328
340329 histos.fill (HIST (" hCentrality" ), centrality);
341330
342- for (auto v0 : V0s) {
331+ for (const auto & v0 : V0s) {
343332
344333 auto [LambdaTag, aLambdaTag, isValid] = getLambdaTags (v0, collision);
345334 if (!isValid)
@@ -364,7 +353,7 @@ struct lambdapolspspin {
364353 int tagb = aLambdaTag;
365354
366355 // 2nd loop for combination of lambda lambda
367- for (auto v02 : V0s) {
356+ for (const auto & v02 : V0s) {
368357
369358 if (v0.v0Id () >= v02.v0Id ())
370359 continue ;
@@ -395,7 +384,8 @@ struct lambdapolspspin {
395384 LambdaLambdapair = Lambdadummy + Lambdadummy2;
396385 tagb = 0 ;
397386 tagb2 = 0 ;
398- fillHistograms (taga, tagb, taga2, tagb2, LambdaLambdapair, Lambdadummy, Lambdadummy2, Proton, Proton2, centrality, LambdaLambdapair.M (), LambdaLambdapair.Pt ());
387+ // fillHistograms(taga, tagb, taga2, tagb2, LambdaLambdapair, Lambdadummy, Lambdadummy2, Proton, Proton2, centrality, LambdaLambdapair.M(), LambdaLambdapair.Pt());
388+ fillHistograms (taga, tagb, taga2, tagb2, LambdaLambdapair, Lambdadummy, Lambdadummy2, Proton, Proton2, centrality);
399389 }
400390
401391 tagb2 = aLambdaTag2;
@@ -404,7 +394,8 @@ struct lambdapolspspin {
404394 LambdaAntiLambdapair = Lambdadummy + AntiLambdadummy2;
405395 tagb = 0 ;
406396 taga2 = 0 ;
407- fillHistograms (taga, tagb, taga2, tagb2, LambdaAntiLambdapair, Lambdadummy, AntiLambdadummy2, Proton, AntiProton2, centrality, LambdaAntiLambdapair.M (), LambdaAntiLambdapair.Pt ());
397+ // fillHistograms(taga, tagb, taga2, tagb2, LambdaAntiLambdapair, Lambdadummy, AntiLambdadummy2, Proton, AntiProton2, centrality, LambdaAntiLambdapair.M(), LambdaAntiLambdapair.Pt());
398+ fillHistograms (taga, tagb, taga2, tagb2, LambdaAntiLambdapair, Lambdadummy, AntiLambdadummy2, Proton, AntiProton2, centrality);
408399 }
409400
410401 tagb = aLambdaTag;
@@ -414,7 +405,8 @@ struct lambdapolspspin {
414405 AntiLambdaAntiLambdapair = AntiLambdadummy + AntiLambdadummy2;
415406 taga = 0 ;
416407 taga2 = 0 ;
417- fillHistograms (taga, tagb, taga2, tagb2, AntiLambdaAntiLambdapair, AntiLambdadummy, AntiLambdadummy2, AntiProton, AntiProton2, centrality, AntiLambdaAntiLambdapair.M (), AntiLambdaAntiLambdapair.Pt ());
408+ // fillHistograms(taga, tagb, taga2, tagb2, AntiLambdaAntiLambdapair, AntiLambdadummy, AntiLambdadummy2, AntiProton, AntiProton2, centrality, AntiLambdaAntiLambdapair.M(), AntiLambdaAntiLambdapair.Pt());
409+ fillHistograms (taga, tagb, taga2, tagb2, AntiLambdaAntiLambdapair, AntiLambdadummy, AntiLambdadummy2, AntiProton, AntiProton2, centrality);
418410 }
419411 }
420412 }
0 commit comments