Skip to content

Commit a0f7d52

Browse files
committed
add some cuts for central tracks
1 parent 62aea3d commit a0f7d52

File tree

1 file changed

+41
-33
lines changed

1 file changed

+41
-33
lines changed

PWGHF/HFC/Tasks/taskFlow.cxx

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ struct HfTaskFlow {
195195
Configurable<bool> isApplySameTrackCut{"isApplySameTrackCut", false, "apply track1 == track2 cut"};
196196
Configurable<float> maxMergingRadius{"maxMergingRadius", 2.5, "max radius for merging cut"};
197197
Configurable<float> mergingCut{"mergingCut", 0.02, "merging cut on track merge"};
198+
Configurable<float> minItsClusters{"minItsClusters", 5.0f, "cut for minimum ITS clusters"};
198199
Configurable<float> minMergingRadius{"minMergingRadius", 0.8, "max radius for merging cut"};
200+
Configurable<float> minTpcClusters{"minTpcClusters", 50.0f, "cut for minimum TPC clusters"};
201+
Configurable<float> minTpcCrossedRows{"minTpcCrossedRows", 70.0f, "cut for minimum TOC crossed rows"};
199202
Configurable<LabeledArray<float>> pairCut{"pairCut", {pairCutDefaults[0], 5, {"Photon", "K0", "Lambda", "Phi", "Rho"}}, "Pair cuts on various particles"};
200203
Configurable<float> ptCentralTrackMin{"ptCentralTrackMin", 0.2f, "min. pT of central tracks"};
201204
Configurable<float> ptCentralTrackMax{"ptCentralTrackMax", 10.0f, "max. pT of central tracks"};
@@ -250,7 +253,7 @@ struct HfTaskFlow {
250253
using FilteredCollisionsWSelMult = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults>>;
251254
using HfCandidatesSelD0 = soa::Filtered<soa::Join<aod::HfCand2Prong, aod::HfSelD0>>;
252255
using HfCandidatesSelLc = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelLc>>;
253-
using FilteredTracksWDcaSel = soa::Filtered<soa::Join<aod::TracksWDca, aod::TrackSelection, aod::TracksExtra>>;
256+
using FilteredTracksWDcaSel = soa::Filtered<soa::Join<aod::TracksWDca, aod::TrackSelection, aod::TracksExtra, aod::TracksExtra>>;
254257

255258
using FilteredMftTracks = soa::Filtered<aod::MFTTracks>;
256259

@@ -850,7 +853,21 @@ struct HfTaskFlow {
850853
return true;
851854
}
852855

853-
// TODO: Check how to put this into a Filter
856+
template <typename TTrack>
857+
bool isAcceptedCentralTrack(TTrack const& track)
858+
{
859+
if (track.tpcNClsFound() < configCentral.minTpcClusters) {
860+
return false;
861+
}
862+
if (track.tpcNClsCrossedRows() < configCentral.minTpcCrossedRows) {
863+
return false;
864+
}
865+
if (track.itsNCls() < configCentral.minItsClusters) {
866+
return false;
867+
}
868+
return true;
869+
}
870+
854871
template <typename TTrack>
855872
bool isAcceptedCandidate(TTrack const& candidate)
856873
{
@@ -952,16 +969,18 @@ struct HfTaskFlow {
952969
{
953970
auto triggerWeight = 1;
954971
auto associatedWeight = 1;
955-
956-
// To avoid filling associated tracks QA many times
957-
// I fill it only for the first trigger track of the collision
958-
auto loopCounter = 0;
972+
auto loopCounter = 0; // To avoid filling associated tracks QA many times, I fill it only for the first trigger track of the collision
959973

960974
// TRIGGER PARTICLE
961975
for (const auto& track1 : tracks1) {
962-
963976
loopCounter++;
964977

978+
if constexpr (std::is_same_v<FilteredTracksWDcaSel, TTracksTrig>) {
979+
if (!isAcceptedCentralTrack(track1)) {
980+
continue;
981+
}
982+
}
983+
965984
float eta1 = track1.eta();
966985
float pt1 = track1.pt();
967986
float phi1 = track1.phi();
@@ -1035,28 +1054,23 @@ struct HfTaskFlow {
10351054
}
10361055

10371056
if (configCentral.isApplySameTrackCut && (track1 == track2)) {
1038-
LOGF(info, "DO we enter applySameTrackCut ?");
10391057
continue;
10401058
}
10411059

10421060
if (configCentral.isApplyPtOrderingSameEvent && sameEvent && (track1.pt() <= track2.pt())) {
1043-
LOGF(info, "Do we enter PtOrderingSameEvent");
10441061
continue;
10451062
}
10461063
if (configCentral.isApplyPtOrderingMixedEvent && !sameEvent && (track1.pt() <= track2.pt())) {
1047-
LOGF(info, "Do we enter PtOrderingMixedEvent");
10481064
continue;
10491065
}
10501066

10511067
if (configCentral.isApplyIndexOrdering && (track1.index() <= track2.index())) {
1052-
LOGF(info, "Do we enter IndexOrdering");
10531068
continue;
10541069
}
10551070

10561071
// I have to add this condition, because ConversionCut is template to get the same type of tracks for both tracks
10571072
if constexpr (std::is_same_v<TTracksAssoc, TTracksTrig>) {
10581073
if (configCentral.isApplyConversionCut && mPairCuts.conversionCuts(track1, track2)) {
1059-
LOGF(info, "Do we enter conversionCuts");
10601074
continue;
10611075
}
10621076
}
@@ -1065,8 +1079,6 @@ struct HfTaskFlow {
10651079
if constexpr (std::is_same_v<TTracksTrig, FilteredTracksWDcaSel>) {
10661080
if (configCentral.isApplyTwoTrackCut && std::abs(eta1 - track2.eta()) < configCentral.mergingCut) {
10671081

1068-
LOGF(info, "Do we enter phi star cut ?");
1069-
10701082
double dPhiStarHigh = getDPhiStar(track1, track2, configCentral.maxMergingRadius, magneticField);
10711083
double dPhiStarLow = getDPhiStar(track1, track2, configCentral.minMergingRadius, magneticField);
10721084

@@ -1164,16 +1176,18 @@ struct HfTaskFlow {
11641176
{
11651177
auto triggerWeight = 1;
11661178
auto associatedWeight = 1;
1167-
1168-
// To avoid filling associated tracks QA many times
1169-
// I fill it only for the first trigger track of the collision
1170-
auto loopCounter = 0;
1179+
auto loopCounter = 0; // To avoid filling associated tracks QA many times, I fill it only for the first trigger track of the collision
11711180

11721181
// TRIGGER PARTICLE
11731182
for (const auto& track1 : tracks1) {
1174-
11751183
loopCounter++;
11761184

1185+
if constexpr (std::is_same_v<FilteredTracksWDcaSel, TTracksTrig>) {
1186+
if (!isAcceptedCentralTrack(track1)) {
1187+
continue;
1188+
}
1189+
}
1190+
11771191
float eta1 = track1.eta();
11781192
float pt1 = track1.pt();
11791193
float phi1 = track1.phi();
@@ -1261,21 +1275,17 @@ struct HfTaskFlow {
12611275
}
12621276

12631277
if (configCentral.isApplySameTrackCut && (track1 == reassociatedMftTrack)) {
1264-
LOGF(info, "DO we enter applySameTrackCut ?");
12651278
continue;
12661279
}
12671280

12681281
if (configCentral.isApplyPtOrderingSameEvent && sameEvent && (track1.pt() <= reassociatedMftTrack.pt())) {
1269-
LOGF(info, "Do we enter PtOrderingSameEvent");
12701282
continue;
12711283
}
12721284
if (configCentral.isApplyPtOrderingMixedEvent && !sameEvent && (track1.pt() <= reassociatedMftTrack.pt())) {
1273-
LOGF(info, "Do we enter PtOrderingMixedEvent");
12741285
continue;
12751286
}
12761287

12771288
if (configCentral.isApplyIndexOrdering && (track1.index() <= reassociatedMftTrack.index())) {
1278-
LOGF(info, "Do we enter IndexOrdering");
12791289
continue;
12801290
}
12811291

@@ -1329,16 +1339,18 @@ struct HfTaskFlow {
13291339
{
13301340
auto triggerWeight = 1;
13311341
auto associatedWeight = 1;
1332-
1333-
// To avoid filling associated tracks QA many times
1334-
// I fill it only for the first trigger track of the collision
1335-
auto loopCounter = 0;
1342+
auto loopCounter = 0; // To avoid filling associated tracks QA many times, I fill it only for the first trigger track of the collision
13361343

13371344
// TRIGGER PARTICLE
13381345
for (auto const& track1 : tracks1) {
1339-
13401346
loopCounter++;
13411347

1348+
if constexpr (std::is_same_v<FilteredTracksWDcaSel, TTracksTrig>) {
1349+
if (!isAcceptedCentralTrack(track1)) {
1350+
continue;
1351+
}
1352+
}
1353+
13421354
float eta1 = track1.eta();
13431355
float pt1 = track1.pt();
13441356
float phi1 = track1.phi();
@@ -1491,10 +1503,7 @@ struct HfTaskFlow {
14911503
{
14921504
auto triggerWeight = 1;
14931505
auto associatedWeight = 1;
1494-
1495-
// To avoid filling associated tracks QA many times
1496-
// I fill it only for the first trigger track of the collision
1497-
auto loopCounter = 0;
1506+
auto loopCounter = 0; // To avoid filling associated tracks QA many times, I fill it only for the first trigger track of the collision
14981507

14991508
// TRIGGER PARTICLE
15001509
for (auto const& track1 : tracks1) {
@@ -1618,7 +1627,6 @@ struct HfTaskFlow {
16181627
}
16191628

16201629
auto bc = collision1.template bc_as<aod::BCsWithTimestamps>();
1621-
16221630
const auto multiplicity = getMultiplicityEstimator(collision1, false);
16231631

16241632
corrContainer->fillEvent(multiplicity, step);

0 commit comments

Comments
 (0)