Skip to content

Commit ae014d3

Browse files
prottayCMTProttay Das
andauthored
[PWGLF] added phi v1 and costhetastar for SA (#11592)
Co-authored-by: Prottay Das <prottay@alipap1.cern.ch>
1 parent f1eef1b commit ae014d3

File tree

2 files changed

+707
-224
lines changed

2 files changed

+707
-224
lines changed

PWGLF/Tasks/Resonances/kstarpbpb.cxx

Lines changed: 68 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -10,50 +10,51 @@
1010
// or submit itself to any jurisdiction.
1111
// sourav.kundu@cern.ch , sarjeeta.gami@cern.ch
1212

13-
#include <TH1F.h>
13+
#include "PWGLF/DataModel/EPCalibrationTables.h"
14+
#include "PWGMM/Mult/DataModel/Index.h" // for Particles2Tracks table
15+
16+
#include "Common/Core/TrackSelection.h"
17+
#include "Common/Core/trackUtilities.h"
18+
#include "Common/DataModel/Centrality.h"
19+
#include "Common/DataModel/EventSelection.h"
20+
#include "Common/DataModel/Multiplicity.h"
21+
#include "Common/DataModel/PIDResponse.h"
22+
#include "Common/DataModel/PIDResponseITS.h"
23+
#include "Common/DataModel/TrackSelectionTables.h"
24+
25+
#include "CCDB/BasicCCDBManager.h"
26+
#include "CCDB/CcdbApi.h"
27+
#include "CommonConstants/PhysicsConstants.h"
28+
#include "DataFormatsParameters/GRPMagField.h"
29+
#include "DataFormatsParameters/GRPObject.h"
30+
#include "Framework/ASoAHelpers.h"
31+
#include "Framework/AnalysisDataModel.h"
32+
#include "Framework/AnalysisTask.h"
33+
#include "Framework/HistogramRegistry.h"
34+
#include "Framework/StepTHn.h"
35+
#include "Framework/runDataProcessing.h"
36+
#include "ReconstructionDataFormats/Track.h"
37+
38+
#include "Math/GenVector/Boost.h"
39+
#include "Math/Vector3D.h"
40+
#include "Math/Vector4D.h"
41+
#include "TF1.h"
42+
#include "TRandom3.h"
1443
#include <TDirectory.h>
44+
#include <TFile.h>
45+
#include <TH1F.h>
46+
#include <TH2F.h>
1547
#include <THn.h>
1648
#include <TLorentzVector.h>
1749
#include <TMath.h>
1850
#include <TObjArray.h>
19-
#include <TFile.h>
20-
#include <TH2F.h>
21-
#include <TLorentzVector.h>
2251
#include <TPDGCode.h>
23-
#include <cmath>
52+
2453
#include <array>
54+
#include <cmath>
2555
#include <cstdlib>
26-
#include <vector>
2756
#include <string>
28-
29-
#include "TRandom3.h"
30-
#include "Math/Vector3D.h"
31-
#include "Math/Vector4D.h"
32-
#include "Math/GenVector/Boost.h"
33-
#include "TF1.h"
34-
35-
#include "PWGLF/DataModel/EPCalibrationTables.h"
36-
#include "Framework/runDataProcessing.h"
37-
#include "Framework/AnalysisTask.h"
38-
#include "Framework/AnalysisDataModel.h"
39-
#include "Framework/HistogramRegistry.h"
40-
#include "Framework/StepTHn.h"
41-
#include "Common/DataModel/PIDResponse.h"
42-
#include "Common/DataModel/Multiplicity.h"
43-
#include "Common/DataModel/Centrality.h"
44-
#include "Common/DataModel/TrackSelectionTables.h"
45-
#include "Common/DataModel/EventSelection.h"
46-
#include "Common/Core/trackUtilities.h"
47-
#include "CommonConstants/PhysicsConstants.h"
48-
#include "Common/Core/TrackSelection.h"
49-
#include "Framework/ASoAHelpers.h"
50-
#include "ReconstructionDataFormats/Track.h"
51-
#include "DataFormatsParameters/GRPObject.h"
52-
#include "DataFormatsParameters/GRPMagField.h"
53-
#include "CCDB/BasicCCDBManager.h"
54-
#include "CCDB/CcdbApi.h"
55-
#include "Common/DataModel/PIDResponseITS.h"
56-
#include "PWGMM/Mult/DataModel/Index.h" // for Particles2Tracks table
57+
#include <vector>
5758

5859
using namespace o2;
5960
using namespace o2::framework;
@@ -101,6 +102,7 @@ struct kstarpbpb {
101102
Configurable<float> cfgCutDCAxy{"cfgCutDCAxy", 2.0f, "DCAxy range for tracks"};
102103
Configurable<float> cfgCutDCAz{"cfgCutDCAz", 2.0f, "DCAz range for tracks"};
103104
Configurable<bool> useGlobalTrack{"useGlobalTrack", true, "use Global track"};
105+
Configurable<bool> usepolar{"usepolar", true, "flag to fill type of SA"};
104106
Configurable<float> nsigmaCutTOF{"nsigmacutTOF", 3.0, "Value of the TOF Nsigma cut"};
105107
Configurable<float> nsigmaCutTPC{"nsigmacutTPC", 3.0, "Value of the TPC Nsigma cut"};
106108
Configurable<bool> isTOFOnly{"isTOFOnly", false, "use TOF only PID"};
@@ -159,8 +161,8 @@ struct kstarpbpb {
159161
Preslice<TrackMCRecTable> perCollision = aod::track::collisionId;
160162

161163
SliceCache cache;
162-
Partition<TrackCandidates> posTracks = aod::track::signed1Pt > cfgCutCharge;
163-
Partition<TrackCandidates> negTracks = aod::track::signed1Pt < cfgCutCharge;
164+
// Partition<TrackCandidates> posTracks = aod::track::signed1Pt > cfgCutCharge;
165+
// Partition<TrackCandidates> negTracks = aod::track::signed1Pt < cfgCutCharge;
164166

165167
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
166168

@@ -183,8 +185,8 @@ struct kstarpbpb {
183185
AxisSpec resAxis = {6000, -30, 30, "Res"};
184186
AxisSpec centAxis = {8, 0, 80, "V0M (%)"};
185187
AxisSpec occupancyAxis = {occupancyBinning, "Occupancy"};
188+
histos.add("hEvtSelInfo", "hEvtSelInfo", kTH1F, {{10, 0, 10.0}});
186189
if (!fillSA) {
187-
histos.add("hEvtSelInfo", "hEvtSelInfo", kTH1F, {{10, 0, 10.0}});
188190
if (same) {
189191
histos.add("hSparseV2SASameEvent_V2", "hSparseV2SASameEvent_V2", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisPt, configThnAxisV2, configThnAxisCentrality});
190192
}
@@ -663,15 +665,25 @@ struct kstarpbpb {
663665
threeVecDauCM = fourVecDauCM.Vect();
664666
threeVecDauCMXY = ROOT::Math::XYZVector(threeVecDauCM.X(), threeVecDauCM.Y(), 0.);
665667
eventplaneVec = ROOT::Math::XYZVector(std::cos(2.0 * psiFT0C), std::sin(2.0 * psiFT0C), 0);
668+
eventplaneVecNorm = ROOT::Math::XYZVector(std::sin(2.0 * psiFT0C), -std::cos(2.0 * psiFT0C), 0);
666669
auto cosPhistarminuspsi = GetPhiInRange(fourVecDauCM.Phi() - psiFT0C);
667670
auto SA = TMath::Cos(2.0 * cosPhistarminuspsi);
671+
auto cosThetaStar = eventplaneVecNorm.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()) / std::sqrt(eventplaneVecNorm.Mag2());
668672

669-
if (track1Sign * track2Sign < 0)
670-
histos.fill(HIST("hSparseSAvsrapsameunlike"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
671-
else if (track1Sign * track2Sign > 0)
672-
histos.fill(HIST("hSparseSAvsrapsamelike"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
673+
if (track1Sign * track2Sign < 0) {
674+
if (usepolar) {
675+
histos.fill(HIST("hSparseSAvsrapsameunlike"), KstarMother.M(), KstarMother.Pt(), cosThetaStar, KstarMother.Rapidity(), centrality);
676+
} else {
677+
histos.fill(HIST("hSparseSAvsrapsameunlike"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
678+
}
679+
} else if (track1Sign * track2Sign > 0) {
680+
if (usepolar) {
681+
histos.fill(HIST("hSparseSAvsrapsamelike"), KstarMother.M(), KstarMother.Pt(), cosThetaStar, KstarMother.Rapidity(), centrality);
682+
} else {
683+
histos.fill(HIST("hSparseSAvsrapsamelike"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
684+
}
685+
}
673686
}
674-
675687
if (fillRotation) {
676688
for (int nrotbkg = 0; nrotbkg < nBkgRotations; nrotbkg++) {
677689
auto anglestart = confMinRot;
@@ -707,8 +719,12 @@ struct kstarpbpb {
707719
threeVecDauCMXYrot = ROOT::Math::XYZVector(threeVecDauCMrot.X(), threeVecDauCMrot.Y(), 0.);
708720
auto cosPhistarminuspsirot = GetPhiInRange(fourVecDauCMrot.Phi() - psiFT0C);
709721
auto SArot = TMath::Cos(2.0 * cosPhistarminuspsirot);
710-
711-
histos.fill(HIST("hSparseSAvsraprot"), kstarrot.M(), kstarrot.Pt(), SArot, kstarrot.Rapidity(), centrality);
722+
auto cosThetaStarrot = eventplaneVecNorm.Dot(threeVecDauCMrot) / std::sqrt(threeVecDauCMrot.Mag2()) / std::sqrt(eventplaneVecNorm.Mag2());
723+
if (usepolar) {
724+
histos.fill(HIST("hSparseSAvsraprot"), kstarrot.M(), kstarrot.Pt(), cosThetaStarrot, kstarrot.Rapidity(), centrality);
725+
} else {
726+
histos.fill(HIST("hSparseSAvsraprot"), kstarrot.M(), kstarrot.Pt(), SArot, kstarrot.Rapidity(), centrality);
727+
}
712728
}
713729
}
714730
}
@@ -1203,10 +1219,15 @@ struct kstarpbpb {
12031219
threeVecDauCM = fourVecDauCM.Vect();
12041220
threeVecDauCMXY = ROOT::Math::XYZVector(threeVecDauCM.X(), threeVecDauCM.Y(), 0.);
12051221
eventplaneVec = ROOT::Math::XYZVector(std::cos(2.0 * psiFT0C), std::sin(2.0 * psiFT0C), 0);
1222+
eventplaneVecNorm = ROOT::Math::XYZVector(std::sin(2.0 * psiFT0C), -std::cos(2.0 * psiFT0C), 0);
12061223
auto cosPhistarminuspsi = GetPhiInRange(fourVecDauCM.Phi() - psiFT0C);
12071224
auto SA = TMath::Cos(2.0 * cosPhistarminuspsi);
1208-
1209-
histos.fill(HIST("hSparseSAvsrapmix"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
1225+
auto cosThetaStar = eventplaneVecNorm.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()) / std::sqrt(eventplaneVecNorm.Mag2());
1226+
if (usepolar) {
1227+
histos.fill(HIST("hSparseSAvsrapmix"), KstarMother.M(), KstarMother.Pt(), cosThetaStar, KstarMother.Rapidity(), centrality);
1228+
} else {
1229+
histos.fill(HIST("hSparseSAvsrapmix"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
1230+
}
12101231
}
12111232
}
12121233
}

0 commit comments

Comments
 (0)