Skip to content

Commit c1d516b

Browse files
author
Rafael Manhart
committed
Feature; implemented manual track cuts
1 parent bca9ee7 commit c1d516b

1 file changed

Lines changed: 40 additions & 5 deletions

File tree

PWGLF/Tasks/NucleiHistTask.cxx

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ using namespace o2;
3737
using namespace o2::framework;
3838
using namespace o2::framework::expressions;
3939

40+
4041
namespace o2::aod
4142
{
4243
namespace NucleiTableHist
@@ -236,9 +237,23 @@ struct NucleiHistTask {
236237
Configurable<float> cfgCutEta{"cfgCutEta", 0.8f, "Eta range for tracks"};
237238
Configurable<float> nsigmacutLow{"nsigmacutLow", -3.0, "Value of the Nsigma cut"};
238239
Configurable<float> nsigmacutHigh{"nsigmacutHigh", +3.0, "Value of the Nsigma cut"};
240+
241+
// Replacement for globalTrack filter
242+
Configurable<float> minNCrossedRowsTPC{"minNCrossedRowsTPC", 70.0f, "min number of crossed rows TPC"};
243+
Configurable<float> minRatioCrossedRowsTPC{"minRatioCrossedRowsTPC", 0.8f, "min ratio of crossed rows over findable clusters TPC"};
244+
Configurable<float> maxChi2TPC{"maxChi2TPC", 4.0f, "max chi2 per cluster TPC"};
245+
Configurable<float> maxChi2ITS{"maxChi2ITS", 36.0f, "max chi2 per cluster ITS"};
246+
Configurable<float> reqTPCrefit{"reqTPCrefit", true, "require TPC refit"};
247+
Configurable<float> reqITSrefit{"reqITSrefit", true, "require ITS refit"};
248+
Configurable<float> maxDCA_Z{"maxDCA_Z", 2.0f, "max DCA to vertex z"};
249+
Configurable<float> maxDCA_XY{"maxDCA_XY", 0.5f, "max DCA to vertex xy"};
250+
Configurable<float> minReqClusterITS{"minReqClusterITS", 1.0, "min number of clusters required in ITS"};
251+
Configurable<float> pTmin{"pTmin", 0.1f, "min pT"};
252+
Configurable<float> pTmax{"pTmax", 1e+10f, "max pT"};
253+
239254

240255
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
241-
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (requireGlobalTrackInFilter());
256+
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta);// && (requireGlobalTrackInFilter());
242257

243258
using TrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::pidTPCLfFullPr, aod::pidTOFFullPr, aod::pidTPCLfFullDe, aod::pidTOFFullDe, aod::pidTPCLfFullHe, aod::pidTOFFullHe, aod::TrackSelection, aod::TrackSelectionExtension, aod::TOFSignal, aod::pidTOFmass, aod::pidTOFbeta>>; // aod::ReducedTracks, aod::CentFV0As
244259

@@ -257,6 +272,29 @@ struct NucleiHistTask {
257272
spectra.fill(HIST("histRecVtxZData"), collision.posZ());
258273

259274
for (auto track : tracks) { // start loop over tracks
275+
276+
float TPCnumberCls = track.tpcNClsFound();
277+
float RatioCrossedRowsOverFindableTPC = track.tpcCrossedRowsOverFindableCls();
278+
float Chi2perClusterTPC = track.tpcChi2NCl();
279+
float Chi2perClusterITS = track.itsChi2NCl();
280+
281+
if ( TPCnumberCls < minNCrossedRowsTPC || RatioCrossedRowsOverFindableTPC < minRatioCrossedRowsTPC || Chi2perClusterTPC > maxChi2TPC || Chi2perClusterITS > maxChi2ITS || !(track.passedTPCRefit()) || !(track.passedITSRefit()) || track.itsNCls() < minReqClusterITS || track.pt() < pTmin || track.pt() > pTmax) {
282+
continue;
283+
}
284+
285+
if (track.sign() > 0) {
286+
spectra.fill(HIST("histDcaVsPtData_particle"), track.pt(), track.dcaXY());
287+
spectra.fill(HIST("histDcaZVsPtData_particle"), track.pt(), track.dcaZ());
288+
}
289+
290+
if (track.sign() < 0) {
291+
spectra.fill(HIST("histDcaVsPtData_antiparticle"), track.pt(), track.dcaXY());
292+
spectra.fill(HIST("histDcaZVsPtData_antiparticle"), track.pt(), track.dcaZ());
293+
}
294+
295+
if (TMath::Abs(track.dcaXY()) > maxDCA_XY || TMath::Abs(track.dcaZ()) > maxDCA_Z) {
296+
continue;
297+
}
260298

261299
// cut on rapidity
262300
TLorentzVector lorentzVector_proton{};
@@ -283,13 +321,12 @@ struct NucleiHistTask {
283321
spectra.fill(HIST("histNClusterITS"), track.pt(), track.itsNCls());
284322
spectra.fill(HIST("histChi2TPC"), track.pt(), track.tpcChi2NCl());
285323
spectra.fill(HIST("histChi2ITS"), track.pt(), track.itsChi2NCl());
324+
286325

287326
if (track.sign() > 0) {
288327
proton_erg.fill(HIST("histTpcNsigmaData"), track.pt(), nSigmaProton);
289328
deuteron_reg.fill(HIST("histTpcNsigmaData"), track.pt(), nSigmaDeut);
290329
Helium3_reg.fill(HIST("histTpcNsigmaData"), track.pt() * 2.0, nSigmaHe3);
291-
spectra.fill(HIST("histDcaVsPtData_particle"), track.pt(), track.dcaXY());
292-
spectra.fill(HIST("histDcaZVsPtData_particle"), track.pt(), track.dcaZ());
293330
/*
294331
if (track.centFV0A() > 0.0 && track.centFV0A() < 5.0) {
295332
proton_erg.fill(HIST("histTpcNsigmaData_cent_0-5"), track.pt(), nSigmaProton);
@@ -329,8 +366,6 @@ struct NucleiHistTask {
329366
aproton_erg.fill(HIST("histTpcNsigmaData"), track.pt(), nSigmaProton);
330367
adeuteron_reg.fill(HIST("histTpcNsigmaData"), track.pt(), nSigmaDeut);
331368
aHelium3_reg.fill(HIST("histTpcNsigmaData"), track.pt() * 2.0, nSigmaHe3);
332-
spectra.fill(HIST("histDcaVsPtData_antiparticle"), track.pt(), track.dcaXY());
333-
spectra.fill(HIST("histDcaZVsPtData_antiparticle"), track.pt(), track.dcaZ());
334369
/*
335370
if (track.centFV0A() > 0.0 && track.centFV0A() < 5.0) {
336371
aproton_erg.fill(HIST("histTpcNsigmaData_cent_0-5"), track.pt(), nSigmaProton);

0 commit comments

Comments
 (0)