Skip to content

Commit a653ec3

Browse files
committed
Added centrality dependence of DCAxy cut and tighten DCAz cut
1 parent 1baf73c commit a653ec3

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

PWGLF/Tasks/Nuspex/spectraTOF.cxx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ struct tofSpectra {
127127

128128
struct : ConfigurableGroup {
129129
Configurable<float> cfgCutEtaMax{"cfgCutEtaMax", 0.8f, "Max eta range for tracks"};
130+
Configurable<float> cfgCutdcaZMax{"cfgCutdcaZMax", 0.02f, "Max dcaZ range for tracks"};
130131
Configurable<float> cfgCutNsigma{"cfgCutNsigma", 100.0f, "nsigma cut range for tracks"};
131132
Configurable<float> cfgCutEtaMin{"cfgCutEtaMin", -0.8f, "Min eta range for tracks"};
133+
Configurable<float> cfgCutdcaZMin{"cfgCutdcaZMin", -0.02f, "Min dcaZ range for tracks"};
132134
Configurable<float> cfgCutY{"cfgCutY", 0.5f, "Y range for tracks"};
133135
Configurable<int> lastRequiredTrdCluster{"lastRequiredTrdCluster", 5, "Last cluster to require in TRD for track selection. -1 does not require any TRD cluster"};
134136
Configurable<bool> requireTrdOnly{"requireTrdOnly", false, "Require only tracks from TRD"};
@@ -175,7 +177,7 @@ struct tofSpectra {
175177
Configurable<float> minChi2PerClusterTPC{"minChi2PerClusterTPC", 0.5f, "Additional cut on the minimum value of the chi2 per cluster in the TPC"};
176178
Configurable<float> maxChi2PerClusterITS{"maxChi2PerClusterITS", 36.f, "Additional cut on the maximum value of the chi2 per cluster in the ITS"};
177179
Configurable<float> maxDcaXYFactor{"maxDcaXYFactor", 1.f, "Additional cut on the maximum value of the DCA xy (multiplicative factor)"};
178-
Configurable<float> maxDcaZ{"maxDcaZ", 2.f, "Additional cut on the maximum value of the DCA z"};
180+
Configurable<float> maxDcaZ{"maxDcaZ", 0.02f, "Additional cut on the maximum value of the DCA z"};
179181
Configurable<float> minTPCNClsFound{"minTPCNClsFound", 100.f, "Additional cut on the minimum value of the number of found clusters in the TPC"};
180182
Configurable<bool> makeTHnSparseChoice{"makeTHnSparseChoice", false, "choose if produce thnsparse"}; // RD
181183
Configurable<bool> enableTPCTOFvsEtaHistograms{"enableTPCTOFvsEtaHistograms", false, "choose if produce TPC tof vs Eta"};
@@ -263,7 +265,7 @@ struct tofSpectra {
263265
LOG(info) << "\tminITSnClusters=" << minITSnClusters.value;
264266
LOG(info) << "\tminTPCNClsFound=" << minTPCNClsFound.value;
265267
LOG(info) << "\tmaxChi2PerClusterITS=" << maxChi2PerClusterITS.value;
266-
LOG(info) << "\tmaxDcaZ=" << maxDcaZ.value;
268+
LOG(info) << "\tmaxDcaZ=" << maxDcaZ;
267269
LOG(info) << "\tmakeTHnSparseChoice=" << makeTHnSparseChoice.value;
268270

269271
customTrackCuts = getGlobalTrackSelectionRun3ITSMatch(itsPattern.value);
@@ -278,7 +280,7 @@ struct tofSpectra {
278280
customTrackCuts.SetMinNClustersTPC(minTPCNClsFound.value);
279281
customTrackCuts.SetMinNCrossedRowsOverFindableClustersTPC(minNCrossedRowsOverFindableClustersTPC.value);
280282
customTrackCuts.SetMaxDcaXYPtDep([](float /*pt*/) { return 10000.f; }); // No DCAxy cut will be used, this is done via the member function of the task
281-
customTrackCuts.SetMaxDcaZ(maxDcaZ.value);
283+
customTrackCuts.SetMaxDcaZ(maxDcaZ);
282284
customTrackCuts.print();
283285
}
284286
// Histograms
@@ -757,7 +759,7 @@ struct tofSpectra {
757759
if (enableDCAxyzHistograms) {
758760
hDcaXYZ[i] = histos.add<TH3>(Form("dca/%s/%s", (i < Np) ? "pos" : "neg", pN[i % Np]), pTCharge[i], kTH3D, {ptAxis, dcaXyAxis, dcaZAxis});
759761
} else {
760-
histos.add(hdcaxy[i].data(), pTCharge[i], kTH2D, {ptAxis, dcaXyAxis});
762+
histos.add(hdcaxy[i].data(), pTCharge[i], kTH3D, {ptAxis, dcaXyAxis, multAxis});
761763
histos.add(hdcaz[i].data(), pTCharge[i], kTH2D, {ptAxis, dcaZAxis});
762764
}
763765

@@ -1127,15 +1129,15 @@ struct tofSpectra {
11271129
}
11281130
} else {
11291131
if (track.sign() > 0) {
1130-
histos.fill(HIST(hdcaxy[id]), track.pt(), track.dcaXY());
1132+
histos.fill(HIST(hdcaxy[id]), track.pt(), track.dcaXY(), multiplicity);
11311133
histos.fill(HIST(hdcaz[id]), track.pt(), track.dcaZ());
11321134
if (isInPtRangeForPhi) {
11331135
if (enableDCAxyphiHistograms) {
11341136
histos.fill(HIST(hdcaxyphi[id]), track.phi(), track.dcaXY());
11351137
}
11361138
}
11371139
} else {
1138-
histos.fill(HIST(hdcaxy[id + Np]), track.pt(), track.dcaXY());
1140+
histos.fill(HIST(hdcaxy[id + Np]), track.pt(), track.dcaXY(), multiplicity);
11391141
histos.fill(HIST(hdcaz[id + Np]), track.pt(), track.dcaZ());
11401142
if (isInPtRangeForPhi) {
11411143
if (enableDCAxyphiHistograms) {
@@ -1305,6 +1307,9 @@ struct tofSpectra {
13051307
if (track.eta() < trkselOptions.cfgCutEtaMin || track.eta() > trkselOptions.cfgCutEtaMax) {
13061308
return false;
13071309
}
1310+
if (track.dcaZ() < trkselOptions.cfgCutdcaZMin || track.dcaZ() > trkselOptions.cfgCutdcaZMax) {
1311+
return false;
1312+
}
13081313
if constexpr (fillHistograms) {
13091314
histos.fill(HIST("tracksel"), 2);
13101315
if (enableTrackCutHistograms) {
@@ -2773,7 +2778,7 @@ struct tofSpectra {
27732778
track.tpcChi2NCl() < minChi2PerClusterTPC ||
27742779
track.itsChi2NCl() > maxChi2PerClusterITS ||
27752780
!passesDCAxyCut(track) ||
2776-
std::abs(track.dcaZ()) > maxDcaZ ||
2781+
std::abs(track.dcaZ()) > maxDcaZ ||
27772782
std::abs(track.eta()) > trkselOptions.cfgCutEtaMax.value ||
27782783
track.tpcCrossedRowsOverFindableCls() < minNCrossedRowsOverFindableClustersTPC ||
27792784
track.tpcNClsFound() < minTPCNClsFound ||

0 commit comments

Comments
 (0)