Skip to content

Commit fe98a01

Browse files
sawankumawatSawan Sawan
andauthored
[PWGLF] Added pT dependent DCAxy cut (AliceO2Group#12394)
Co-authored-by: Sawan Sawan <[email protected]>
1 parent b3fbfe8 commit fe98a01

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

PWGLF/Tasks/Resonances/kstarqa.cxx

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ struct Kstarqa {
104104
Configurable<float> cfgTPCChi2NCl{"cfgTPCChi2NCl", 4.0, "TPC Chi2/NCl"};
105105
Configurable<bool> cfgUseITSTPCRefit{"cfgUseITSTPCRefit", false, "Require ITS Refit"};
106106
Configurable<bool> isNoCollInTimeRangeStandard{"isNoCollInTimeRangeStandard", false, "No collision in time range standard"};
107+
Configurable<bool> isApplyPtDepDCAxyCut{"isApplyPtDepDCAxyCut", false, "Apply pT dependent DCAxy cut"};
107108

108109
// cuts on mother
109110
Configurable<bool> isApplyCutsOnMother{"isApplyCutsOnMother", false, "Enable additional cuts on Kstar mother"};
@@ -419,8 +420,13 @@ struct Kstarqa {
419420
return false;
420421
if (std::abs(candidate.eta()) > selectionConfig.cfgCutEta)
421422
return false;
422-
if (std::abs(candidate.dcaXY()) > selectionConfig.cfgCutDCAxy)
423-
return false;
423+
if (!selectionConfig.isApplyPtDepDCAxyCut) {
424+
if (std::abs(candidate.dcaXY()) > selectionConfig.cfgCutDCAxy)
425+
return false;
426+
} else {
427+
if (std::abs(candidate.dcaXY()) > (0.0105 + 0.035 / std::pow(candidate.pt(), 1.1)))
428+
return false;
429+
}
424430
if (std::abs(candidate.dcaZ()) > selectionConfig.cfgCutDCAz)
425431
return false;
426432
if (candidate.tpcCrossedRowsOverFindableCls() < selectionConfig.cfgRCRFC)
@@ -660,7 +666,7 @@ struct Kstarqa {
660666
using EventCandidatesMC = soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::FT0Mults, aod::PVMults>;
661667

662668
using TrackCandidatesMC = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::McTrackLabels, aod::pidTOFbeta>>;
663-
using EventMCGenerated = soa::Join<aod::McCollisions, aod::PVMults>; // aod::CentNGlobals, aod::CentNTPVs, aod::CentMFTs
669+
using EventMCGenerated = soa::Join<aod::McCollisions, aod::MultsExtraMC>; // aod::CentNGlobals, aod::CentNTPVs, aod::CentMFTs
664670

665671
//*********Varibles declaration***************
666672
float multiplicity{-1.0}, theta2;
@@ -829,13 +835,13 @@ struct Kstarqa {
829835
// if (!collision.sel8()) {
830836
// return;
831837
// }
838+
int occupancy = collision.trackOccupancyInTimeRange();
839+
rEventSelection.fill(HIST("hOccupancy"), occupancy);
832840

833841
if (!selectionEvent(collision, true)) {
834842
return;
835843
}
836844

837-
int occupancy = collision.trackOccupancyInTimeRange();
838-
rEventSelection.fill(HIST("hOccupancy"), occupancy);
839845
multiplicity = -1;
840846

841847
if (cSelectMultEstimator == kFT0M) {
@@ -1058,7 +1064,8 @@ struct Kstarqa {
10581064

10591065
PROCESS_SWITCH(Kstarqa, processME, "Process Mixed event", true);
10601066

1061-
void processGen(EventMCGenerated::iterator const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups<EventCandidatesMC>& collisions)
1067+
// void processGen(EventMCGenerated::iterator const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups<EventCandidatesMC>& collisions)
1068+
void processGen(aod::McCollision const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups<EventCandidatesMC>& collisions)
10621069
{
10631070
rEventSelection.fill(HIST("eventsCheckGen"), 0.5);
10641071

@@ -1079,9 +1086,9 @@ struct Kstarqa {
10791086
multiplicity = -1.0;
10801087
// float impactParameter = mcCollision.impactParameter();
10811088

1082-
if (selectionConfig.isINELgt0 && !mcCollision.isInelGt0()) {
1083-
return;
1084-
}
1089+
// if (selectionConfig.isINELgt0 && !mcCollision.isInelGt0()) {
1090+
// return;
1091+
// }
10851092
rEventSelection.fill(HIST("eventsCheckGen"), 2.5);
10861093

10871094
for (const auto& collision : collisions) {
@@ -1122,12 +1129,16 @@ struct Kstarqa {
11221129

11231130
for (const auto& mcParticle : mcParticles) {
11241131
if (std::abs(mcParticle.y()) < selectionConfig.rapidityMotherData && std::abs(mcParticle.pdgCode()) == o2::constants::physics::kK0Star892) {
1132+
// if (inelgt0MCgen) {
11251133
hInvMass.fill(HIST("hAllKstarGenCollisisons"), multiplicity, mcParticle.pt());
1134+
// }
11261135
}
11271136
}
11281137

11291138
const auto evtReconstructedAndSelected = std::find(selectedEvents.begin(), selectedEvents.end(), mcCollision.globalIndex()) != selectedEvents.end();
1139+
// if (inelgt0MCgen) {
11301140
hInvMass.fill(HIST("hAllGenCollisions"), multiplicity);
1141+
// }
11311142
if (!cAllGenCollisions && !evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection
11321143
return;
11331144
}
@@ -1183,11 +1194,13 @@ struct Kstarqa {
11831194
}
11841195
PROCESS_SWITCH(Kstarqa, processGen, "Process Generated", false);
11851196

1186-
void processEvtLossSigLossMC(EventMCGenerated::iterator const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups<EventCandidatesMC>& recCollisions)
1197+
// void processEvtLossSigLossMC(EventMCGenerated::iterator const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups<EventCandidatesMC>& recCollisions)
1198+
void processEvtLossSigLossMC(aod::McCollisions::iterator const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups<EventCandidatesMC>& recCollisions)
11871199
{
1188-
if (selectionConfig.isINELgt0 && !mcCollision.isInelGt0()) {
1189-
return;
1190-
}
1200+
// if (selectionConfig.isINELgt0 && !mcCollision.isInelGt0()) {
1201+
// return;
1202+
// }
1203+
11911204
auto impactPar = mcCollision.impactParameter();
11921205
hInvMass.fill(HIST("MCcorrections/hImpactParameterGen"), impactPar);
11931206

0 commit comments

Comments
 (0)