Skip to content

Commit 044a000

Browse files
[PWGLF] Update NucleiTPCPbPb.cxx (#11246)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 47a229c commit 044a000

File tree

1 file changed

+60
-25
lines changed

1 file changed

+60
-25
lines changed

PWGLF/Tasks/Nuspex/NucleiTPCPbPb.cxx

Lines changed: 60 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ constexpr double betheBlochDefault[nParticles][nBetheParams]{
6565
{5.393020, 7.859534, 0.004048, 2.323197, 1.609307, 0.09}, // triton
6666
{-126.557359, -0.858569, 1.111643, 1.210323, 2.656374, 0.09}, // helion
6767
{-126.557359, -0.858569, 1.111643, 1.210323, 2.656374, 0.09}}; // alpha
68-
const int nTrkSettings = 15;
69-
static const std::vector<std::string> trackPIDsettingsNames{"useBBparams", "minITSnCls", "minTPCnCls", "maxTPCchi2", "maxITSchi2", "minRigidity", "maxRigidity", "maxTPCnSigma", "TOFrequiredabove", "minTOFmass", "maxTOFmass", "maxDcaXY", "maxDcaZ", "minITSclsSize", "maxITSclsSize"};
68+
const int nTrkSettings = 16;
69+
static const std::vector<std::string> trackPIDsettingsNames{"useBBparams", "minITSnCls", "minTPCnCls", "maxTPCchi2", "maxITSchi2", "minRigidity", "maxRigidity", "maxTPCnSigma", "TOFrequiredabove", "minTOFmass", "maxTOFmass", "maxDcaXY", "maxDcaZ", "minITSclsSize", "maxITSclsSize", "minTPCnClsCrossedRows"};
7070
constexpr double trackPIDsettings[nParticles][nTrkSettings]{
71-
{0, 0, 60, 3.0, 100, 0.15, 1.2, 2.5, -1, 0, 100, 2., 2., 0., 1000},
72-
{1, 0, 70, 2.5, 100, 0.20, 4.0, 3.0, -1, 0, 100, 2., 2., 0., 1000},
73-
{1, 0, 70, 5.0, 100, 0.50, 5.0, 3.0, -1, 0, 100, 2., 2., 0., 1000},
74-
{1, 0, 70, 5.0, 100, 0.50, 5.0, 3.0, -1, 0, 100, 2., 2., 0., 1000},
75-
{1, 0, 75, 1.5, 100, 0.50, 5.0, 3.0, -1, 0, 100, 2., 2., 0., 1000},
76-
{1, 0, 70, 1.5, 100, 0.50, 5.0, 3.0, -1, 0, 100, 2., 2., 0., 1000}};
71+
{0, 0, 60, 3.0, 100, 0.15, 1.2, 2.5, -1, 0, 100, 2., 2., 0., 1000, 70},
72+
{1, 0, 70, 2.5, 100, 0.20, 4.0, 3.0, -1, 0, 100, 2., 2., 0., 1000, 70},
73+
{1, 0, 70, 5.0, 100, 0.50, 5.0, 3.0, -1, 0, 100, 2., 2., 0., 1000, 70},
74+
{1, 0, 70, 5.0, 100, 0.50, 5.0, 3.0, -1, 0, 100, 2., 2., 0., 1000, 70},
75+
{1, 0, 75, 1.5, 100, 0.50, 5.0, 3.0, -1, 0, 100, 2., 2., 0., 1000, 70},
76+
{1, 0, 70, 1.5, 100, 0.50, 5.0, 3.0, -1, 0, 100, 2., 2., 0., 1000, 70}};
7777
struct PrimParticles {
7878
TString name;
7979
int pdgCode, charge;
@@ -99,13 +99,34 @@ struct NucleitpcPbPb {
9999
Preslice<aod::TrackAssoc> perCollision = aod::track_association::collisionId;
100100
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
101101
Configurable<int> cfgDebug{"cfgDebug", 1, "debug level"};
102+
// event Selections cuts
103+
Configurable<bool> removeITSROFrameBorder{"removeITSROFrameBorder", false, "Remove TF border"};
104+
Configurable<bool> removeNoSameBunchPileup{"removeNoSameBunchPileup", false, "Remove TF border"};
105+
Configurable<bool> requireIsGoodZvtxFT0vsPV{"requireIsGoodZvtxFT0vsPV", false, "Remove TF border"};
106+
Configurable<bool> requireIsVertexITSTPC{"requireIsVertexITSTPC", false, "Remove TF border"};
107+
Configurable<bool> removeNoTimeFrameBorder{"removeNoTimeFrameBorder", false, "Remove TF border"};
102108
Configurable<bool> cfgRigidityCorrection{"cfgRigidityCorrection", false, "apply rigidity correction"};
109+
// Track Selection Cuts
103110
Configurable<float> cfgCutEta{"cfgCutEta", 0.9f, "Eta range for tracks"};
104111
Configurable<bool> cfgUsePVcontributors{"cfgUsePVcontributors", true, "use tracks that are PV contibutors"};
105112
Configurable<bool> cfgITSrequire{"cfgITSrequire", true, "Additional cut on ITS require"};
106113
Configurable<bool> cfgTPCrequire{"cfgTPCrequire", true, "Additional cut on TPC require"};
107114
Configurable<bool> cfgPassedITSRefit{"cfgPassedITSRefit", true, "Require ITS refit"};
108115
Configurable<bool> cfgPassedTPCRefit{"cfgPassedTPCRefit", true, "Require TPC refit"};
116+
Configurable<bool> cfgRapidityRequire{"cfgRapidityRequire", true, "Require Rapidity cut"};
117+
Configurable<bool> cfgTPCNClsfoundRequire{"cfgTPCNClsfoundRequire", true, "Require TPCNClsfound Cut"};
118+
Configurable<bool> cfgTPCNClsCrossedRowsRequire{"cfgTPCNClsCrossedRowsRequire", true, "Require TPCNClsCrossedRows Cut"};
119+
Configurable<bool> cfgmaxTPCchi2Require{"cfgmaxTPCchi2Require", true, "Require maxTPCchi2 Cut"};
120+
Configurable<bool> cfgminITSnClsRequire{"cfgminITSnClsRequire", true, "Require minITSnCls Cut"};
121+
Configurable<bool> cfgmaxITSchi2Require{"cfgmaxITSchi2Require", true, "Require maxITSchi2 Cut"};
122+
Configurable<bool> cfgmaxTPCnSigmaRequire{"cfgmaxTPCnSigmaRequire", true, "Require maxTPCnSigma Cut"};
123+
Configurable<bool> cfgminGetMeanItsClsSizeRequire{"cfgminGetMeanItsClsSizeRequire", true, "Require minGetMeanItsClsSize Cut"};
124+
Configurable<bool> cfgmaxGetMeanItsClsSizeRequire{"cfgmaxGetMeanItsClsSizeRequire", true, "Require maxGetMeanItsClsSize Cut"};
125+
Configurable<bool> cfgRigidityCutRequire{"cfgRigidityCutRequire", true, "Require Rigidity Cut"};
126+
Configurable<bool> cfgmassRequire{"cfgmassRequire", true, "Require mass Cuts"};
127+
Configurable<bool> cfgDCAwithptRequire{"cfgDCAwithptRequire", true, "Require DCA cuts with pt dependance"};
128+
Configurable<bool> cfgDCAnopt{"cfgDCAnopt", true, "Require DCA cuts without pt dependance"};
129+
Configurable<bool> cfgTwicemass{"cfgTwicemass", true, "multiply mass by its charge"};
109130
Configurable<LabeledArray<double>> cfgBetheBlochParams{"cfgBetheBlochParams", {betheBlochDefault[0], nParticles, nBetheParams, particleNames, betheBlochParNames}, "TPC Bethe-Bloch parameterisation for light nuclei"};
110131
Configurable<LabeledArray<double>> cfgTrackPIDsettings{"cfgTrackPIDsettings", {trackPIDsettings[0], nParticles, nTrkSettings, particleNames, trackPIDsettingsNames}, "track selection and PID criteria"};
111132
Configurable<bool> cfgFillDeDxWithoutCut{"cfgFillDeDxWithoutCut", false, "Fill without cut beth bloch"};
@@ -153,7 +174,7 @@ struct NucleitpcPbPb {
153174
const AxisSpec axisdEdx{2000, 0, 2000, "d#it{E}/d#it{x}"};
154175
const AxisSpec axisCent{100, 0, 100, "centrality"};
155176
const AxisSpec axisVtxZ{100, -20, 20, "z"};
156-
const AxisSpec ptAxis{100, 0, 20, "#it{p}_{T} (GeV/#it{c})"};
177+
const AxisSpec ptAxis{1000, 0, 20, "#it{p}_{T} (GeV/#it{c})"};
157178
const AxisSpec axiseta{100, -1, 1, "eta"};
158179
const AxisSpec axisrapidity{100, -2, 2, "rapidity"};
159180
const AxisSpec axismass{100, 0, 20, "mass^{2}"};
@@ -215,31 +236,30 @@ struct NucleitpcPbPb {
215236
if (std::abs(track.eta()) > cfgCutEta)
216237
continue;
217238
for (size_t i = 0; i < primaryParticles.size(); i++) {
218-
if (std::abs(getRapidity(track, i)) > cfgCutRapidity)
239+
if (std::abs(getRapidity(track, i)) > cfgCutRapidity && cfgRapidityRequire)
219240
continue;
220-
if (track.tpcNClsFound() < cfgTrackPIDsettings->get(i, "minTPCnCls"))
241+
if (track.tpcNClsFound() < cfgTrackPIDsettings->get(i, "minTPCnCls") && cfgTPCNClsfoundRequire)
221242
continue;
222-
if (track.tpcChi2NCl() > cfgTrackPIDsettings->get(i, "maxTPCchi2"))
243+
if (((track.tpcNClsCrossedRows() < cfgTrackPIDsettings->get(i, "minTPCnClsCrossedRows")) || track.tpcNClsCrossedRows() < 0.8 * track.tpcNClsFindable()) && cfgTPCNClsCrossedRowsRequire)
223244
continue;
224-
if (track.itsNCls() < cfgTrackPIDsettings->get(i, "minITSnCls"))
245+
if (track.tpcChi2NCl() > cfgTrackPIDsettings->get(i, "maxTPCchi2") && cfgmaxTPCchi2Require)
225246
continue;
226-
if (track.itsChi2NCl() > cfgTrackPIDsettings->get(i, "maxITSchi2"))
247+
if (track.itsNCls() < cfgTrackPIDsettings->get(i, "minITSnCls") && cfgminITSnClsRequire)
227248
continue;
228-
fillnsigma(track, i);
229-
if (std::abs(getTPCnSigma(track, primaryParticles.at(i))) > cfgTrackPIDsettings->get(i, "maxTPCnSigma"))
249+
if (track.itsChi2NCl() > cfgTrackPIDsettings->get(i, "maxITSchi2") && cfgmaxITSchi2Require)
230250
continue;
231-
filldedx(track, i);
232-
fillhmass(track, i);
233-
if (getMeanItsClsSize(track) < cfgTrackPIDsettings->get(i, "minITSclsSize"))
251+
if (getMeanItsClsSize(track) < cfgTrackPIDsettings->get(i, "minITSclsSize") && cfgminGetMeanItsClsSizeRequire)
234252
continue;
235-
if (getMeanItsClsSize(track) > cfgTrackPIDsettings->get(i, "maxITSclsSize"))
253+
if (getMeanItsClsSize(track) > cfgTrackPIDsettings->get(i, "maxITSclsSize") && cfgmaxGetMeanItsClsSizeRequire)
236254
continue;
237-
if (getRigidity(track) < cfgTrackPIDsettings->get(i, "minRigidity") || getRigidity(track) > cfgTrackPIDsettings->get(i, "maxRigidity"))
255+
if ((getRigidity(track) < cfgTrackPIDsettings->get(i, "minRigidity") || getRigidity(track) > cfgTrackPIDsettings->get(i, "maxRigidity")) && cfgRigidityCutRequire)
238256
continue;
239-
if (cfgTrackPIDsettings->get(i, "TOFrequiredabove") >= 0 && getRigidity(track) > cfgTrackPIDsettings->get(i, "TOFrequiredabove") && (track.mass() < cfgTrackPIDsettings->get(i, "minTOFmass") || track.mass() > cfgTrackPIDsettings->get(i, "maxTOFmass")))
257+
if ((cfgTrackPIDsettings->get(i, "TOFrequiredabove") >= 0 && getRigidity(track) > cfgTrackPIDsettings->get(i, "TOFrequiredabove") && (track.mass() < cfgTrackPIDsettings->get(i, "minTOFmass") || track.mass() > cfgTrackPIDsettings->get(i, "maxTOFmass"))) && cfgmassRequire)
240258
continue;
241259
bool insideDCAxy = (std::abs(track.dcaXY()) <= (cfgTrackPIDsettings->get(i, "maxDcaXY") * (0.0105f + 0.0350f / std::pow(track.pt(), 1.1f))));
242-
if (!(insideDCAxy) || std::abs(track.dcaZ()) > cfgTrackPIDsettings->get(i, "maxDcaZ"))
260+
if ((!(insideDCAxy) || std::abs(track.dcaZ()) > cfgTrackPIDsettings->get(i, "maxDcaZ")) && cfgDCAwithptRequire)
261+
continue;
262+
if ((std::abs(track.dcaXY()) > cfgTrackPIDsettings->get(i, "maxDcaXY") || std::abs(track.dcaZ()) > cfgTrackPIDsettings->get(i, "maxDcaZ")) && cfgDCAnopt)
243263
continue;
244264
if (track.sign() > 0) {
245265
histos.fill(HIST("histDcaZVsPtData_particle"), track.pt(), track.dcaZ());
@@ -249,6 +269,11 @@ struct NucleitpcPbPb {
249269
histos.fill(HIST("histDcaZVsPtData_antiparticle"), track.pt(), track.dcaZ());
250270
histos.fill(HIST("histDcaXYVsPtData_antiparticle"), track.pt(), track.dcaXY());
251271
}
272+
fillnsigma(track, i);
273+
if (std::abs(getTPCnSigma(track, primaryParticles.at(i))) > cfgTrackPIDsettings->get(i, "maxTPCnSigma") && cfgmaxTPCnSigmaRequire)
274+
continue;
275+
filldedx(track, i);
276+
fillhmass(track, i);
252277
}
253278
histos.fill(HIST("histeta"), track.eta());
254279
} // track loop
@@ -265,6 +290,16 @@ struct NucleitpcPbPb {
265290
continue;
266291
if (collision.centFT0C() > centcut)
267292
continue;
293+
if (removeITSROFrameBorder && !collision.selection_bit(aod::evsel::kNoITSROFrameBorder))
294+
continue;
295+
if (removeNoSameBunchPileup && !collision.selection_bit(aod::evsel::kNoSameBunchPileup))
296+
continue;
297+
if (requireIsGoodZvtxFT0vsPV && !collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV))
298+
continue;
299+
if (requireIsVertexITSTPC && !collision.selection_bit(aod::evsel::kIsVertexITSTPC))
300+
continue;
301+
if (removeNoTimeFrameBorder && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder))
302+
continue;
268303
histos.fill(HIST("histCentFTOC_cut"), collision.centFT0C());
269304
const uint64_t collIdx = collision.globalIndex();
270305
auto tracksByColl = tracksColl.sliceBy(perCollision, collIdx);
@@ -325,7 +360,7 @@ struct NucleitpcPbPb {
325360
// histos.fill(HIST("histCentFT0A"), collision.centFT0A());
326361
histos.fill(HIST("histCentFT0C"), collision.centFT0C());
327362
histos.fill(HIST("histCentFT0M"), collision.centFT0M());
328-
// histos.fill(HIST("histEvents"), collision.centFT0C(), occupancy);
363+
histos.fill(HIST("histEvents"), collision.centFT0C(), occupancy);
329364
}
330365
primVtx.assign({collision.posX(), collision.posY(), collision.posZ()});
331366
cents.assign({collision.centFT0A(), collision.centFT0C(), collision.centFT0M()});
@@ -379,7 +414,7 @@ struct NucleitpcPbPb {
379414
double mass;
380415
int speciesHe3 = 4;
381416
int speciesHe4 = 5;
382-
if (species == speciesHe3 || species == speciesHe4) {
417+
if ((species == speciesHe3 || species == speciesHe4) && cfgTwicemass) {
383418
mass = 2 * track.mass();
384419
} else {
385420
mass = track.mass();

0 commit comments

Comments
 (0)