Skip to content

Commit 04f2822

Browse files
committed
Please consider the following formatting changes
1 parent 2f476ae commit 04f2822

File tree

1 file changed

+36
-47
lines changed

1 file changed

+36
-47
lines changed

PWGLF/Tasks/Resonances/kstarflowv1.cxx

Lines changed: 36 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <TPDGCode.h>
2727
#include <string>
2828
#include <vector>
29-
//#include <TDatabasePDG.h>
29+
// #include <TDatabasePDG.h>
3030
#include <cmath>
3131
#include <array>
3232
#include <cstdlib>
@@ -70,7 +70,7 @@ using namespace o2::constants::physics;
7070
struct KstarFlowv1 {
7171

7272
Service<o2::ccdb::BasicCCDBManager> ccdb;
73-
//Service<o2::framework::O2DatabasePDG> pdg;
73+
// Service<o2::framework::O2DatabasePDG> pdg;
7474

7575
// events
7676
Configurable<float> cfgCutVertex{"cfgCutVertex", 10.0f, "Accepted z-vertex range"};
@@ -98,16 +98,16 @@ struct KstarFlowv1 {
9898
Configurable<float> confMaxRot{"confMaxRot", 7.0 * o2::constants::math::PI / 6.0, "Maximum of rotation"};
9999
Configurable<int> nBkgRotations{"nBkgRotations", 9, "Number of rotated copies (background) per each original candidate"};
100100
Configurable<bool> fillRotation{"fillRotation", true, "fill rotation"};
101-
Configurable<bool> like{"like", true, "fill rotation"};
101+
Configurable<bool> like{"like", true, "fill rotation"};
102102
Configurable<int> spNbins{"spNbins", 2000, "Number of bins in sp"};
103103
Configurable<float> lbinsp{"lbinsp", -1.0, "lower bin value in sp histograms"};
104104
Configurable<float> hbinsp{"hbinsp", 1.0, "higher bin value in sp histograms"};
105105

106-
ConfigurableAxis configcentAxis{"configcentAxis", {VARIABLE_WIDTH, 0.0, 10.0, 30.0,50.0,80.0}, "Cent V0M"};
106+
ConfigurableAxis configcentAxis{"configcentAxis", {VARIABLE_WIDTH, 0.0, 10.0, 30.0, 50.0, 80.0}, "Cent V0M"};
107107
ConfigurableAxis configthnAxisPt{"configthnAxisPt", {VARIABLE_WIDTH, 0.2, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.5, 8.0, 10.0, 50.0}, "#it{p}_{T} (GeV/#it{c})"};
108108
ConfigurableAxis configetaAxis{"configetaAxis", {VARIABLE_WIDTH, -0.8, -0.4, -0.2, 0, 0.2, 0.4, 0.8}, "Eta"};
109-
ConfigurableAxis configIMAxis{"configIMAxis", {VARIABLE_WIDTH, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0,1.05,1.1,1.15,1.2}, "IM"};
110-
109+
ConfigurableAxis configIMAxis{"configIMAxis", {VARIABLE_WIDTH, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.05, 1.1, 1.15, 1.2}, "IM"};
110+
111111
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
112112
Filter centralityFilter = nabs(aod::cent::centFT0C) < cfgCutCentrality;
113113
Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPT);
@@ -122,27 +122,24 @@ struct KstarFlowv1 {
122122

123123
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
124124

125-
126125
void init(o2::framework::InitContext&)
127126
{
128127
AxisSpec spAxis = {spNbins, lbinsp, hbinsp, "Sp"};
129-
128+
130129
histos.add("hpQxtQxpvscent", "hpQxtQxpvscent", HistType::kTHnSparseF, {configcentAxis, spAxis}, true);
131130
histos.add("hpQytQypvscent", "hpQytQypvscent", HistType::kTHnSparseF, {configcentAxis, spAxis}, true);
132131
histos.add("hpQxytpvscent", "hpQxytpvscent", HistType::kTHnSparseF, {configcentAxis, spAxis}, true);
133132
histos.add("hpQxtQypvscent", "hpQxtQypvscent", HistType::kTHnSparseF, {configcentAxis, spAxis}, true);
134133
histos.add("hpQxpQytvscent", "hpQxpQytvscent", HistType::kTHnSparseF, {configcentAxis, spAxis}, true);
135-
134+
136135
histos.add("hpv1vscentpteta", "hpv1vscentpteta", HistType::kTHnSparseF, {configIMAxis, configcentAxis, configthnAxisPt, configetaAxis, spAxis}, true);
137136
histos.add("hpv1vscentptetarot", "hpv1vscentptetarot", HistType::kTHnSparseF, {configIMAxis, configcentAxis, configthnAxisPt, configetaAxis, spAxis}, true);
138-
histos.add("hpv1vscentptetalike", "hpv1vscentptetalike", HistType::kTHnSparseF, {configIMAxis, configcentAxis, configthnAxisPt, configetaAxis, spAxis}, true);
137+
histos.add("hpv1vscentptetalike", "hpv1vscentptetalike", HistType::kTHnSparseF, {configIMAxis, configcentAxis, configthnAxisPt, configetaAxis, spAxis}, true);
139138
}
140139

141-
142140
double massKa = o2::constants::physics::MassKPlus;
143141
double massPi = o2::constants::physics::MassPiMinus;
144142

145-
146143
template <typename T>
147144
bool selectionTrack(const T& candidate)
148145
{
@@ -155,7 +152,6 @@ struct KstarFlowv1 {
155152
return true;
156153
}
157154

158-
159155
template <typename T>
160156
bool strategySelectionPID(const T& candidate, int PID, int strategy)
161157
{
@@ -217,7 +213,7 @@ struct KstarFlowv1 {
217213
}
218214

219215
double getPhiInRange(double phi)
220-
{
216+
{
221217
double pi = o2::constants::math::PI;
222218
double twoPi = 2.0 * pi;
223219
double result = phi;
@@ -226,24 +222,21 @@ struct KstarFlowv1 {
226222
// if (result < 0) {
227223
// result += twoPi;
228224
// }
229-
//result -= pi; // Now result is in [-pi, pi]
225+
// result -= pi; // Now result is in [-pi, pi]
230226

231-
// Convert from [-pi, pi] to [0, pi]
227+
// Convert from [-pi, pi] to [0, pi]
232228
if (result < 0) {
233-
result += pi; // Shift negative values to positive
229+
result += pi; // Shift negative values to positive
234230
}
235231

236232
// If phi > 2π, subtract π instead of normalizing by 2π
237233
if (phi > twoPi) {
238-
result -= pi;
234+
result -= pi;
239235
}
240236

241237
return result; // Ensures range is [0, π]
242-
}
238+
}
243239

244-
245-
246-
247240
template <typename T>
248241
bool isFakeKaon(T const& track, int /*PID*/)
249242
{
@@ -264,29 +257,26 @@ struct KstarFlowv1 {
264257
}
265258
auto centrality = collision.centFT0C();
266259

267-
268260
auto qxZDCA = collision.qxZDCA();
269261
auto qxZDCC = collision.qxZDCC();
270262
auto qyZDCA = collision.qyZDCA();
271263
auto qyZDCC = collision.qyZDCC();
272264
auto psiZDCC = collision.psiZDCC();
273265
auto psiZDCA = collision.psiZDCA();
274-
275-
266+
276267
auto proQxtQxp = qxZDCA * qxZDCC;
277268
auto proQytQyp = qyZDCA * qyZDCC;
278269
auto proQxytp = proQxtQxp + proQytQyp;
279270
auto proQxpQyt = qxZDCA * qyZDCC;
280271
auto proQxtQyp = qxZDCC * qyZDCA;
281-
272+
282273
histos.fill(HIST("hpQxtQxpvscent"), centrality, proQxtQxp);
283274
histos.fill(HIST("hpQytQypvscent"), centrality, proQytQyp);
284275
histos.fill(HIST("hpQxytpvscent"), centrality, proQxytp);
285276
histos.fill(HIST("hpQxpQytvscent"), centrality, proQxpQyt);
286277
histos.fill(HIST("hpQxtQypvscent"), centrality, proQxtQyp);
287-
288-
289-
for (const auto& track1 : tracks) {
278+
279+
for (const auto& track1 : tracks) {
290280
if (!selectionTrack(track1)) {
291281
continue;
292282
}
@@ -319,17 +309,17 @@ struct KstarFlowv1 {
319309
continue;
320310
}
321311

322-
// // constrain angle to 0 -> [0,0+2pi]
323-
// auto phi = RecoDecay::constrainAngle(KstarMother.Phi(), 0,o2::constants::math::TwoPI);
324-
325-
auto ux = std::cos(getPhiInRange(KstarMother.Phi()));
312+
// // constrain angle to 0 -> [0,0+2pi]
313+
// auto phi = RecoDecay::constrainAngle(KstarMother.Phi(), 0,o2::constants::math::TwoPI);
314+
315+
auto ux = std::cos(getPhiInRange(KstarMother.Phi()));
326316
auto uy = std::sin(getPhiInRange(KstarMother.Phi()));
327317
auto v1 = ux * (qxZDCA - qxZDCC) + uy * (qyZDCA - qyZDCC);
328-
318+
329319
// unlike sign
330320
if (track1.sign() * track2.sign() < 0) {
331321
histos.fill(HIST("hpv1vscentpteta"), KstarMother.M(), centrality, KstarMother.Pt(), KstarMother.Rapidity(), v1);
332-
if (fillRotation) {
322+
if (fillRotation) {
333323
for (int nrotbkg = 0; nrotbkg < nBkgRotations; nrotbkg++) {
334324
auto anglestart = confMinRot;
335325
auto angleend = confMaxRot;
@@ -340,30 +330,29 @@ struct KstarFlowv1 {
340330
kaonrot = ROOT::Math::PxPyPzMVector(rotkaonPx, rotkaonPy, track1.pz(), massKa);
341331
kstarrot = kaonrot + daughter2;
342332

343-
if (std::abs(kstarrot.Rapidity()) > 0.9) {
333+
if (std::abs(kstarrot.Rapidity()) > 0.9) {
344334
continue;
345335
}
346-
347-
auto uxrot = std::cos(getPhiInRange(KstarMother.Phi()));
348-
auto uyrot = std::sin(getPhiInRange(KstarMother.Phi()));
349-
350-
auto v1rot = uxrot * (qxZDCA - qxZDCC) + uyrot * (qyZDCA - qyZDCC);
351-
352-
histos.fill(HIST("hpv1vscentptetarot"), kstarrot.M(), centrality, kstarrot.Pt(), kstarrot.Rapidity(), v1rot);
336+
337+
auto uxrot = std::cos(getPhiInRange(KstarMother.Phi()));
338+
auto uyrot = std::sin(getPhiInRange(KstarMother.Phi()));
339+
340+
auto v1rot = uxrot * (qxZDCA - qxZDCC) + uyrot * (qyZDCA - qyZDCC);
341+
342+
histos.fill(HIST("hpv1vscentptetarot"), kstarrot.M(), centrality, kstarrot.Pt(), kstarrot.Rapidity(), v1rot);
353343
}
354344
}
355345
}
356346
// like sign
357347
if (track1.sign() * track2.sign() > 0) {
358-
histos.fill(HIST("hpv1vscentptetalike"), kstarrot.M(), centrality, kstarrot.Pt(), kstarrot.Rapidity(), v1);
359-
}
348+
histos.fill(HIST("hpv1vscentptetalike"), kstarrot.M(), centrality, kstarrot.Pt(), kstarrot.Rapidity(), v1);
349+
}
360350
}
361351
}
362352
}
363353
PROCESS_SWITCH(KstarFlowv1, processSE, "Process Same event", true);
364354
};
365-
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
355+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
366356
{
367357
return WorkflowSpec{adaptAnalysisTask<KstarFlowv1>(cfgc)};
368358
}
369-

0 commit comments

Comments
 (0)