Skip to content

Commit 58268b7

Browse files
author
sandeep dudi
committed
RCT flag added
1 parent 0af789a commit 58268b7

File tree

1 file changed

+132
-17
lines changed

1 file changed

+132
-17
lines changed

PWGUD/Tasks/sginclusivePhiKstarSD.cxx

Lines changed: 132 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ struct SginclusivePhiKstarSD {
5151

5252
HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
5353

54+
Configurable<int> cutRCTflag{"cutRCTflag", 0, {"0 = off, 1 = CBT, 2 = CBT+ZDC, 3 = CBThadron, 4 = CBThadron+ZDC"}};
5455
Configurable<float> fv0Cut{"fv0Cut", 50., "FV0A threshold"};
5556
Configurable<float> ft0aCut{"ft0aCut", 100., "FT0A threshold"};
5657
Configurable<float> ft0cCut{"ft0cCut", 50., "FT0C threshold"};
@@ -68,6 +69,7 @@ struct SginclusivePhiKstarSD {
6869
Configurable<int> useSbp{"useSbp", -1, "kNoSameBunchPileup cut"};
6970
Configurable<int> useZvtxftovpv{"useZvtxftovpv", -1, "kIsGoodZvtxFT0vsPV cut"};
7071
Configurable<int> useVtxItsTpc{"useVtxItsTpc", -1, "kIsVertexITSTPC cut"};
72+
Configurable<int> upcflag{"upcflag", -1, "upc run selection, 0 = std, 1= upc"};
7173

7274
// Track Selections
7375
Configurable<float> pvCut{"pvCut", 1.0, "Use Only PV tracks"};
@@ -120,8 +122,24 @@ struct SginclusivePhiKstarSD {
120122
Configurable<bool> reconstruction{"reconstruction", true, ""};
121123
Configurable<int> generatedId{"generatedId", 31, ""};
122124

125+
// Configurable axes for histogram
126+
ConfigurableAxis dcaAxisConfig{"dcaAxisConfig", {600, -0.3f, 0.3f}, "DCAxy & DCAz axis"};
127+
ConfigurableAxis etaAxisConfig{"etaAxisConfig", {400, -1.0f, 1.0f}, "Pseudorapidity & Rapidity axis"};
128+
ConfigurableAxis VrtxXAxisConfig{"VrtxXAxisConfig", {400, -0.1f, 0.1f}, "Vertex X axis"};
129+
ConfigurableAxis VrtxYAxisConfig{"VrtxYAxisConfig", {200, -0.05f, 0.05f}, "Vertex Y axis"};
130+
ConfigurableAxis VrtxZAxisConfig{"VrtxZAxisConfig", {600, -15.0f, 15.0f}, "Vertex Z axis"};
131+
123132
void init(InitContext const& context)
124133
{
134+
// Axes
135+
AxisSpec dcaxyAxis = {dcaAxisConfig, "DCAxy (cm)"};
136+
AxisSpec dcazAxis = {dcaAxisConfig, "DCAz (cm)"};
137+
AxisSpec etaAxis = {etaAxisConfig, "#eta"};
138+
AxisSpec rapAxis = {etaAxisConfig, "y"};
139+
AxisSpec VrtxXAxis = {VrtxXAxisConfig, "Vertex X (cm)"};
140+
AxisSpec VrtxYAxis = {VrtxYAxisConfig, "Vertex Y (cm)"};
141+
AxisSpec VrtxZAxis = {VrtxZAxisConfig, "Vertex Z (cm)"};
142+
125143
registry.add("GapSide", "Gap Side; Entries", kTH1F, {{4, -1.5, 2.5}});
126144
registry.add("TrueGapSide", "Gap Side; Entries", kTH1F, {{4, -1.5, 2.5}});
127145
registry.add("nPVContributors_data", "Multiplicity_dist_before track cut gap A", kTH1F, {{110, 0, 110}});
@@ -130,18 +148,18 @@ struct SginclusivePhiKstarSD {
130148
if (phi) {
131149
registry.add("os_KK_pT_0", "pt kaon pair", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
132150
registry.add("os_KK_pT_1", "pt kaon pair", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
133-
registry.add("os_KK_pT_2", "pt kaon pair", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
151+
registry.add("os_KK_pT_2", "pt kaon pair", kTH3F, {{305, 0.98, 2.2}, {80, -2.0, 2.0}, {100, 0, 10}});
134152
registry.add("os_KK_ls_pT_0", "kaon pair like sign", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
135153
registry.add("os_KK_ls_pT_1", "kaon pair like sign", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
136-
registry.add("os_KK_ls_pT_2", "kaon pair like sign", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
154+
registry.add("os_KK_ls_pT_2", "kaon pair like sign", kTH3F, {{305, 0.98, 2.2}, {80, -2.0, 2.0}, {100, 0, 10}});
137155

138156
registry.add("os_KK_mix_pT_0", "kaon pair mix event", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
139157
registry.add("os_KK_mix_pT_1", "kaon pair mix event", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
140-
registry.add("os_KK_mix_pT_2", "kaon pair mix event", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
158+
registry.add("os_KK_mix_pT_2", "kaon pair mix event", kTH3F, {{305, 0.98, 2.2}, {80, -2.0, 2.0}, {100, 0, 10}});
141159

142160
registry.add("os_KK_rot_pT_0", "kaon pair mix event", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
143161
registry.add("os_KK_rot_pT_1", "kaon pair mix event", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
144-
registry.add("os_KK_rot_pT_2", "kaon pair mix event", kTH3F, {{220, 0.98, 1.2}, {80, -2.0, 2.0}, {100, 0, 10}});
162+
registry.add("os_KK_rot_pT_2", "kaon pair mix event", kTH3F, {{305, 0.98, 2.2}, {80, -2.0, 2.0}, {100, 0, 10}});
145163
}
146164
if (rho) {
147165
registry.add("os_pp_pT_0", "pt pion pair", kTH3F, {{120, 1.44, 2.04}, {80, -2.0, 2.0}, {100, 0, 10}});
@@ -154,32 +172,32 @@ struct SginclusivePhiKstarSD {
154172
if (kstar) {
155173
registry.add("os_pk_pT_0", "pion-kaon pair", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
156174
registry.add("os_pk_pT_1", "pion-kaon pair", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
157-
registry.add("os_pk_pT_2", "pion-kaon pair", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
175+
registry.add("os_pk_pT_2", "pion-kaon pair", kTH3F, {{600, 0.0, 3.0}, {80, -2.0, 2.0}, {1000, 0, 10}});
158176

159177
registry.add("os_pk_mix_pT_0", "pion-kaon mix pair", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
160178
registry.add("os_pk_mix_pT_1", "pion-kaon mix pair", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
161-
registry.add("os_pk_mix_pT_2", "pion-kaon mix pair", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
179+
registry.add("os_pk_mix_pT_2", "pion-kaon mix pair", kTH3F, {{600, 0.0, 3.0}, {80, -2.0, 2.0}, {1000, 0, 10}});
162180

163181
registry.add("os_pk_rot_pT_0", "pion-kaon rotional pair", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
164182
registry.add("os_pk_rot_pT_1", "pion-kaon rotional pair", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
165-
registry.add("os_pk_rot_pT_2", "pion-kaon rotional pair", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
183+
registry.add("os_pk_rot_pT_2", "pion-kaon rotional pair", kTH3F, {{600, 0.0, 3.0}, {80, -2.0, 2.0}, {1000, 0, 10}});
166184

167185
registry.add("os_pk_ls_pT_0", "pion-kaon pair like sign", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
168186
registry.add("os_pk_ls_pT_1", "pion-kaon like sign", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
169-
registry.add("os_pk_ls_pT_2", "pion-kaon like sign", kTH3F, {{400, 0.0, 2.0}, {80, -2.0, 2.0}, {100, 0, 10}});
187+
registry.add("os_pk_ls_pT_2", "pion-kaon like sign", kTH3F, {{600, 0.0, 3.0}, {80, -2.0, 2.0}, {1000, 0, 10}});
170188

171189
registry.add("hRotation", "hRotation", kTH1F, {{360, 0.0, o2::constants::math::TwoPI}});
172190
}
173191
// qa plots
174192
if (qa) {
175-
registry.add("tpc_dedx", "p vs dE/dx", kTH2F, {{100, 0.0, 10.0}, {10000, 0.0, 2500.0}});
176-
registry.add("tof_beta", "p vs beta", kTH2F, {{100, 0.0, 10.0}, {100, 0.0, 5.0}});
177-
178-
registry.add("tpc_dedx_kaon", "p#k dE/dx", kTH2F, {{100, 0.0, 10.0}, {10000, 0.0, 2500.0}});
179-
registry.add("tpc_dedx_pion", "p#pi dE/dx", kTH2F, {{100, 0.0, 10.0}, {10000, 0.0, 2500.0}});
180-
registry.add("tpc_dedx_kaon_1", "tpc+tof pid cut p#k dE/dx", kTH2F, {{100, 0.0, 10.0}, {10000, 0.0, 2500.0}});
181-
registry.add("tpc_dedx_kaon_2", "tpc+tof pid cut1 p#k dE/dx", kTH2F, {{100, 0.0, 10.0}, {10000, 0.0, 2500.0}});
182-
registry.add("tpc_dedx_pion_1", "tpc+tof pid cut p#pi dE/dx", kTH2F, {{100, 0.0, 10.0}, {10000, 0.0, 25000.0}});
193+
registry.add("tpc_dedx", "p vs dE/dx", kTH2F, {{500, 0.0, 10.0}, {5000, 0.0, 5000.0}});
194+
registry.add("tof_beta", "p vs beta", kTH2F, {{500, 0.0, 10.0}, {500, 0.0, 1.0}});
195+
196+
registry.add("tpc_dedx_kaon", "p#k dE/dx", kTH2F, {{500, 0.0, 10.0}, {5000, 0.0, 5000.0}});
197+
registry.add("tpc_dedx_pion", "p#pi dE/dx", kTH2F, {{500, 0.0, 10.0}, {5000, 0.0, 5000.0}});
198+
registry.add("tpc_dedx_kaon_1", "tpc+tof pid cut p#k dE/dx", kTH2F, {{500, 0.0, 10.0}, {5000, 0.0, 5000.0}});
199+
registry.add("tpc_dedx_kaon_2", "tpc+tof pid cut1 p#k dE/dx", kTH2F, {{500, 0.0, 10.0}, {5000, 0.0, 5000.0}});
200+
registry.add("tpc_dedx_pion_1", "tpc+tof pid cut p#pi dE/dx", kTH2F, {{500, 0.0, 10.0}, {5000, 0.0, 5000.0}});
183201
registry.add("tpc_nsigma_kaon", "p#k n#sigma", kTH2F, {{100, 0.0, 10.0}, {100, -10.0, 10.0}});
184202
registry.add("tpc_nsigma_pion", "p#pi n#sigma", kTH2F, {{100, 0.0, 10.0}, {100, -10.0, 10.0}});
185203
registry.add("tpc_tof_nsigma_kaon", "p#k n#sigma TPC vs TOF", kTH2F, {{100, -10.0, 10.0}, {100, -10.0, 10.0}});
@@ -208,6 +226,31 @@ struct SginclusivePhiKstarSD {
208226
registry.add("V0A_0", "V0A amplitude", kTH1F, {{1000, 0.0, 1000.0}});
209227
registry.add("V0A_1", "V0A amplitude", kTH1F, {{1000, 0.0, 1000.0}});
210228

229+
registry.add("hDcaxy_all_before", "DCAxy Distribution of all tracks before track selection; DCAxy (cm); Counts", kTH1F, {dcaxyAxis});
230+
registry.add("hDcaz_all_before", "DCAz Distribution of all tracks before track selection; DCAz (cm); Counts", kTH1F, {dcazAxis});
231+
232+
registry.add("hDcaxy_all_after", "DCAxy Distribution of all tracks after track selection; DCAxy (cm); Counts", kTH1F, {dcaxyAxis});
233+
registry.add("hDcaz_all_after", "DCAz Distribution of all tracks after track selection; DCAz (cm); Counts", kTH1F, {dcazAxis});
234+
235+
registry.add("hDcaxy_pi", "DCAxy Distribution of selected pions; DCAxy (cm); Counts", kTH1F, {dcaxyAxis});
236+
registry.add("hDcaz_pi", "DCAz Distribution of selected pions; DCAz (cm); Counts", kTH1F, {dcazAxis});
237+
238+
registry.add("hDcaxy_ka", "DCAxy Distribution of selected kaons; DCAxy (cm); Counts", kTH1F, {dcaxyAxis});
239+
registry.add("hDcaz_ka", "DCAz Distribution of selected kaons; DCAz (cm); Counts", kTH1F, {dcazAxis});
240+
241+
registry.add("hVertexX", "Vertex X distribution; Vertex X (cm); Counts", kTH1F, {VrtxXAxis});
242+
registry.add("hVertexY", "Vertex Y distribution; Vertex Y (cm); Counts", kTH1F, {VrtxYAxis});
243+
registry.add("hVertexZ", "VertexZ distribution; Vertex Z (cm); Counts", kTH1F, {VrtxZAxis});
244+
245+
registry.add("hEta_all_after", "Pseudorapidity of all tracks after track selection; #eta; Counts", kTH1F, {etaAxis});
246+
registry.add("hRap_all_after", "Rapidity of all tracks after track selection; y; Counts", kTH1F, {rapAxis});
247+
248+
registry.add("hEta_pi", "Pseudorapidity of selected Pions; #eta; Counts", kTH1F, {etaAxis});
249+
registry.add("hRap_pi", "Rapidity of selected Pions; y; Counts", kTH1F, {rapAxis});
250+
251+
registry.add("hEta_ka", "Pseudorapidity of selected Kaons; #eta; Counts", kTH1F, {etaAxis});
252+
registry.add("hRap_ka", "Rapidity of selected Kaons; y; Counts", kTH1F, {rapAxis});
253+
211254
if (rapidityGap) {
212255
registry.add("mult_0", "mult0", kTH1F, {{150, 0, 150}});
213256
registry.add("mult_1", "mult1", kTH1F, {{150, 0, 150}});
@@ -432,6 +475,23 @@ struct SginclusivePhiKstarSD {
432475
return cosThetaCs;
433476
}
434477

478+
template <typename C>
479+
bool isGoodRCTflag(C const& coll)
480+
{
481+
switch (cutRCTflag) {
482+
case 1:
483+
return sgSelector.isCBTOk(coll);
484+
case 2:
485+
return sgSelector.isCBTZdcOk(coll);
486+
case 3:
487+
return sgSelector.isCBTHadronOk(coll);
488+
case 4:
489+
return sgSelector.isCBTHadronZdcOk(coll);
490+
default:
491+
return true;
492+
}
493+
}
494+
435495
template <typename T>
436496
bool selectionPIDKaon1(const T& candidate)
437497
{
@@ -575,7 +635,10 @@ struct SginclusivePhiKstarSD {
575635
return;
576636
if (useVtxItsTpc != -1 && collision.vtxITSTPC() != useVtxItsTpc)
577637
return;
578-
638+
if (!isGoodRCTflag(collision))
639+
return;
640+
if (upcflag != -1 && collision.flags() != upcflag)
641+
return;
579642
int mult = collision.numContrib();
580643
if (gapSide == 0) {
581644
registry.fill(HIST("gap_mult0"), mult);
@@ -597,6 +660,12 @@ struct SginclusivePhiKstarSD {
597660
int trackextra = 0;
598661
int trackextraDG = 0;
599662

663+
if (qa) {
664+
registry.fill(HIST("hVertexX"), collision.posX());
665+
registry.fill(HIST("hVertexY"), collision.posY());
666+
registry.fill(HIST("hVertexZ"), collision.posZ());
667+
}
668+
600669
/* Partition<UDtracksfull> pvContributors1 = aod::udtrack::isPVContributor == true;
601670
pvContributors1.bindTable(tracks);
602671
if (gapSide == 0) {
@@ -607,9 +676,24 @@ struct SginclusivePhiKstarSD {
607676
}
608677
*/
609678
for (const auto& track1 : tracks) {
679+
680+
if (qa) {
681+
registry.fill(HIST("hDcaxy_all_before"), track1.dcaXY());
682+
registry.fill(HIST("hDcaz_all_before"), track1.dcaZ());
683+
}
684+
610685
if (!trackselector(track1, parameters))
611686
continue;
687+
612688
v0.SetCoordinates(track1.px(), track1.py(), track1.pz(), o2::constants::physics::MassPionCharged);
689+
690+
if (qa) {
691+
registry.fill(HIST("hDcaxy_all_after"), track1.dcaXY());
692+
registry.fill(HIST("hDcaz_all_after"), track1.dcaZ());
693+
registry.fill(HIST("hEta_all_after"), v0.Eta());
694+
registry.fill(HIST("hRap_all_after"), v0.Rapidity());
695+
}
696+
613697
if (selectionPIDPion1(track1)) {
614698
onlyPionTrackspm.push_back(v0);
615699
rawPionTrackspm.push_back(track1);
@@ -660,13 +744,21 @@ struct SginclusivePhiKstarSD {
660744
registry.fill(HIST("tpc_nsigma_kaon"), v0.Pt(), track1.tpcNSigmaKa());
661745
registry.fill(HIST("tof_nsigma_kaon"), v0.Pt(), track1.tofNSigmaKa());
662746
registry.fill(HIST("tpc_tof_nsigma_kaon"), track1.tpcNSigmaKa(), track1.tofNSigmaKa());
747+
registry.fill(HIST("hEta_ka"), v0.Eta());
748+
registry.fill(HIST("hRap_ka"), v0.Rapidity());
749+
registry.fill(HIST("hDcaxy_ka"), track1.dcaXY());
750+
registry.fill(HIST("hDcaz_ka"), track1.dcaZ());
663751
}
664752

665753
if (selectionPIDPion1(track1)) {
666754
registry.fill(HIST("tpc_dedx_pion_1"), v0.P(), track1.tpcSignal());
667755
registry.fill(HIST("tpc_nsigma_pion"), v0.Pt(), track1.tpcNSigmaPi());
668756
registry.fill(HIST("tof_nsigma_pion"), v0.Pt(), track1.tofNSigmaPi());
669757
registry.fill(HIST("tpc_tof_nsigma_pion"), track1.tpcNSigmaPi(), track1.tofNSigmaPi());
758+
registry.fill(HIST("hEta_pi"), v0.Eta());
759+
registry.fill(HIST("hRap_pi"), v0.Rapidity());
760+
registry.fill(HIST("hDcaxy_pi"), track1.dcaXY());
761+
registry.fill(HIST("hDcaz_pi"), track1.dcaZ());
670762
}
671763
}
672764
}
@@ -1384,6 +1476,29 @@ struct SginclusivePhiKstarSD {
13841476
return;
13851477
if (std::abs(collision.occupancyInTime()) > occCut)
13861478
return;
1479+
if (std::abs(collision.hadronicRate()) > hadronicRate)
1480+
return;
1481+
if (useTrs != -1 && collision.trs() != useTrs)
1482+
return;
1483+
if (useTrofs != -1 && collision.trofs() != useTrofs)
1484+
return;
1485+
if (useHmpr != -1 && collision.hmpr() != useHmpr)
1486+
return;
1487+
if (useTfb != -1 && collision.tfb() != useTfb)
1488+
return;
1489+
if (useItsrofb != -1 && collision.itsROFb() != useItsrofb)
1490+
return;
1491+
if (useSbp != -1 && collision.sbp() != useSbp)
1492+
return;
1493+
if (useZvtxftovpv != -1 && collision.zVtxFT0vPV() != useZvtxftovpv)
1494+
return;
1495+
if (useVtxItsTpc != -1 && collision.vtxITSTPC() != useVtxItsTpc)
1496+
return;
1497+
if (!isGoodRCTflag(collision))
1498+
return;
1499+
if (upcflag != -1 && collision.flags() != upcflag)
1500+
return;
1501+
13871502
registry.get<TH1>(HIST("Reco/Stat"))->Fill(truegapSide, 1.);
13881503
if (truegapSide != gapsideMC)
13891504
return;

0 commit comments

Comments
 (0)