|
28 | 28 | #include "PWGLF/DataModel/LFStrangenessTables.h" |
29 | 29 | #include "ReconstructionDataFormats/Track.h" |
30 | 30 | #include "Common/Core/TrackSelectionDefaults.h" |
| 31 | +#include "TF1.h" |
31 | 32 |
|
32 | 33 | using namespace o2; |
33 | 34 | using namespace o2::framework; |
@@ -58,6 +59,8 @@ struct DedxAnalysis { |
58 | 59 | float pionTofCut = 1.0; |
59 | 60 | float invMassCut = 0.01; |
60 | 61 | float invMassCutGamma = 0.0015; |
| 62 | + float magField = 1.0; |
| 63 | + float pTcut = 2.0; |
61 | 64 |
|
62 | 65 | // Configurable Parameters |
63 | 66 | // Tracks cuts |
@@ -103,6 +106,10 @@ struct DedxAnalysis { |
103 | 106 | Configurable<std::vector<float>> calibrationFactorPos{"calibrationFactorPos", {50.5157, 50.6359, 50.3198, 49.3345, 48.9197, 49.4931, 50.0188, 50.1406}, "positive calibration factors"}; |
104 | 107 | ConfigurableAxis binP{"binP", {VARIABLE_WIDTH, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 18.0, 20.0}, ""}; |
105 | 108 |
|
| 109 | + // phi cut fits |
| 110 | + TF1* fphiCutHigh = nullptr; |
| 111 | + TF1* fphiCutLow = nullptr; |
| 112 | + |
106 | 113 | TrackSelection myTrackSelection() |
107 | 114 | { |
108 | 115 | TrackSelection selectedTracks; |
@@ -130,6 +137,8 @@ struct DedxAnalysis { |
130 | 137 | AxisSpec ptAxis = {binP, "pT (GeV/c)"}; |
131 | 138 | AxisSpec etaAxis{8, -0.8, 0.8, "#eta"}; |
132 | 139 | AxisSpec pAxis = {binP, "#it{p}/Z (GeV/c)"}; |
| 140 | + fphiCutLow = new TF1("StandardPhiCutLow", "0.1/x/x+pi/18.0-0.025", 0, 50); |
| 141 | + fphiCutHigh = new TF1("StandardPhiCutHigh", "0.12/x+pi/18.0+0.035", 0, 50); |
133 | 142 | if (calibrationMode) { |
134 | 143 | // MIP for pions |
135 | 144 | registryDeDx.add( |
@@ -202,6 +211,11 @@ struct DedxAnalysis { |
202 | 211 | "hdEdx_vs_phi", "dE/dx", HistType::kTH2F, |
203 | 212 | {{100, 0.0, 6.4, "#phi"}, {dedxAxis}}); |
204 | 213 |
|
| 214 | + // phi cut |
| 215 | + registryDeDx.add( |
| 216 | + "hpt_vs_phi", "phi cut", HistType::kTH2F, |
| 217 | + {{ptAxis}, {100, 0.0, 6.4, "#phi"}}); |
| 218 | + |
205 | 219 | registryDeDx.add( |
206 | 220 | "hbeta_vs_p_Neg", "beta", HistType::kTH2F, |
207 | 221 | {{pAxis}, {100, 0.0, 1.1, "#beta"}}); |
@@ -375,6 +389,33 @@ struct DedxAnalysis { |
375 | 389 | return true; |
376 | 390 | } |
377 | 391 |
|
| 392 | + // Phi cut |
| 393 | + template <typename T> |
| 394 | + bool passedPhiCut(const T& trk, float magField, const TF1& fphiCutLow, const TF1& fphiCutHigh) |
| 395 | + { |
| 396 | + float pt = trk.pt(); |
| 397 | + float phi = trk.phi(); |
| 398 | + int charge = trk.sign(); |
| 399 | + |
| 400 | + if (pt < pTcut) |
| 401 | + return true; |
| 402 | + |
| 403 | + if (magField < 0.) // for negatve polarity field |
| 404 | + phi = o2::constants::math::TwoPI - phi; |
| 405 | + if (charge < 0) // for negatve charge |
| 406 | + phi = o2::constants::math::TwoPI - phi; |
| 407 | + |
| 408 | + // to center gap in the middle |
| 409 | + phi += o2::constants::math::PI / 18.0f; |
| 410 | + phi = std::fmod(phi, o2::constants::math::PI / 9.0f); |
| 411 | + |
| 412 | + if (phi < fphiCutHigh.Eval(pt) && phi > fphiCutLow.Eval(pt)) |
| 413 | + return false; // reject track |
| 414 | + |
| 415 | + registryDeDx.fill(HIST("hpt_vs_phi"), pt, phi); |
| 416 | + return true; |
| 417 | + } |
| 418 | + |
378 | 419 | // Process Data |
379 | 420 | void process(SelectedCollisions::iterator const& collision, |
380 | 421 | aod::V0Datas const& fullV0s, PIDTracks const& tracks) |
@@ -410,6 +451,10 @@ struct DedxAnalysis { |
410 | 451 | if (!mySelectionPrim.IsSelected(trk)) |
411 | 452 | continue; |
412 | 453 |
|
| 454 | + // phi cut |
| 455 | + if (!passedPhiCut(trk, magField, *fphiCutLow, *fphiCutHigh)) |
| 456 | + continue; |
| 457 | + |
413 | 458 | float signedP = trk.sign() * trk.tpcInnerParam(); |
414 | 459 |
|
415 | 460 | // MIP calibration for pions |
|
0 commit comments