Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions PWGMM/UE/Tasks/dedxAnalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ struct DedxAnalysis {
float invMassCutGamma = 0.0015;
float magField = 1;
float pTcut = 2.0;
float nclCut = 120.0;

// Configurable Parameters
// Tracks cuts
Expand Down Expand Up @@ -100,6 +99,8 @@ struct DedxAnalysis {
"Minimum Mass Gamma"};
Configurable<float> maxMassGamma{"maxMassGamma", 0.002022f,
"Maximum Mass Gamma"};
Configurable<float> nclCut{"nclCut", 135.0f,
"ncl Cut"};
Configurable<bool> calibrationMode{"calibrationMode", false, "calibration mode"};
Configurable<bool> additionalCuts{"additionalCuts", true, "additional cuts"};
// Histograms names
Expand Down Expand Up @@ -555,6 +556,38 @@ struct DedxAnalysis {
return true;
}

// Phi cut Secondaries
template <typename T>
bool passedPhiCutSecondaries(const T& trk, float magField, const TF1& fphiCutLow, const TF1& fphiCutHigh)
{
float pt = trk.pt();
float phi = trk.phi();
int charge = trk.sign();
auto nTPCCl = trk.tpcNClsFindable() - trk.tpcNClsFindableMinusFound();

if (pt < pTcut)
return true;

if (magField < 0) // for negatve polarity field
phi = o2::constants::math::TwoPI - phi;
if (charge < 0) // for negatve charge
phi = o2::constants::math::TwoPI - phi;

// to center gap in the middle
phi += o2::constants::math::PI / 18.0f;
phi = std::fmod(phi, o2::constants::math::PI / 9.0f);

// cut phi
if (phi < fphiCutHigh.Eval(pt) && phi > fphiCutLow.Eval(pt))
return false; // reject track

// cut Ncl
if (nTPCCl < nclCut)
return false;

return true;
}

// Process Data
void process(SelectedCollisions::iterator const& collision,
aod::V0Datas const& fullV0s, PIDTracks const& tracks)
Expand Down Expand Up @@ -590,7 +623,7 @@ struct DedxAnalysis {
if (!mySelectionPrim.IsSelected(trk))
continue;

// phi cut
// phi and Ncl cut
if (!passedPhiCut(trk, magField, *fphiCutLow, *fphiCutHigh))
continue;

Expand Down Expand Up @@ -702,6 +735,12 @@ struct DedxAnalysis {
continue;
if (!negTrack.passedTPCRefit())
continue;
// phi and Ncl cut
if (!passedPhiCutSecondaries(posTrack, magField, *fphiCutLow, *fphiCutHigh))
continue;

if (!passedPhiCutSecondaries(negTrack, magField, *fphiCutLow, *fphiCutHigh))
continue;

float signedPpos = posTrack.sign() * posTrack.tpcInnerParam();
float signedPneg = negTrack.sign() * negTrack.tpcInnerParam();
Expand Down
Loading