Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 40 additions & 9 deletions PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
Configurable<std::string> ConfPathTOF{"ConfPathTOF", "Users/s/skundu/My/Object/PIDcallib/TOF", "Weight path TOF"};

// events
Configurable<bool> applyStrictEvSel{"applyStrictEvSel", true, "Apply strict event selection"};
Configurable<bool> applyMCsel8{"applyMCsel8", false, "Apply sel8 in MC"};
Configurable<int> cfgNoMixedEvents{"cfgNoMixedEvents", 10, "Number of event mixing"};
ConfigurableAxis axisVertex{"axisVertex", {20, -10, 10}, "vertex axis for bin"};
// ConfigurableAxis axisMultiplicityClass{"axisMultiplicityClass", {8, 0, 80}, "multiplicity percentile for bin"};
Expand All @@ -104,10 +106,12 @@

Configurable<int> cfgITScluster{"cfgITScluster", 4, "Number of ITS cluster"};
Configurable<int> cfgTPCcluster{"cfgTPCcluster", 80, "Number of TPC cluster"};
Configurable<int> cfgTPCPIDcluster{"cfgTPCPIDcluster", 80, "Number of TPC PID cluster"};
Configurable<int> cfgTPCcrossedRows{"cfgTPCcrossedRows", 90, "Number of TPC crossed Rows"};

Configurable<bool> cfgUpdatePID{"cfgUpdatePID", false, "Update PID callibration"};
Configurable<bool> applyPID{"applyPID", true, "Apply PID"};
Configurable<bool> applyPIDCluster{"applyPIDCluster", true, "Apply PID cluster"};
Configurable<bool> isDeepAngle{"isDeepAngle", false, "Deep Angle cut"};
Configurable<double> cfgDeepAngle{"cfgDeepAngle", 0.04, "Deep Angle cut value"};
Configurable<bool> timeFrameMC{"timeFrameMC", false, "time frame cut in MC"};
Expand All @@ -130,7 +134,7 @@
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
Filter centralityFilter = nabs(aod::cent::centFT0C) < cfgCutCentrality;
Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPT);
// Filter PIDcutFilter = nabs(aod::pidtpc::tpcNSigmaKa) < nsigmaCutTPC;
Filter PIDcutFilter = nabs(aod::pidtpc::tpcNSigmaKa) < nsigmaCutTPC;
// Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz);

using EventCandidates = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::TPCMults, aod::CentFT0Cs, aod::Mults>>;
Expand Down Expand Up @@ -180,7 +184,7 @@
histos.add("hOccupancy", "hOccupancy", kTH2F, {axisOccupancy, cnfgaxis.configThnAxisCentrality});
histos.add("hMC", "hMC", kTH1F, {{20, 0.0f, 20.0f}});
histos.add("h1PhiRecsplit", "h1PhiRecsplit", kTH1F, {{100, 0.0f, 10.0f}});

histos.add("hData", "hData", kTH1F, {{20, 0.0f, 20.0f}});
ccdb->setURL(cfgCcdbParam.cfgURL);
ccdbApi.init("http://alice-ccdb.cern.ch");
ccdb->setCaching(true);
Expand Down Expand Up @@ -215,16 +219,19 @@
if (!(candidate.isGlobalTrack() && candidate.isPVContributor() && candidate.itsNCls() > cfgITScluster && candidate.tpcNClsFound() > cfgTPCcluster && candidate.tpcNClsCrossedRows() > cfgTPCcrossedRows)) {
return false;
}
if (applyPIDCluster && candidate.tpcNClsPID() < cfgTPCPIDcluster) {
return false;
}
return true;
}

template <typename T>
bool selectionPIDpTdependent(const T& candidate, double nsigmaTPC, double nsigmaTOF)
{
if (candidate.p() < 0.7 && TMath::Abs(nsigmaTPC) < nsigmaCutTPC) {

Check failure on line 231 in PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
if (candidate.p() > 0.7 && candidate.hasTOF() && TMath::Abs(nsigmaTPC) < nsigmaCutTPC) {

Check failure on line 234 in PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (candidate.p() > 0.7 && candidate.p() < 1.6 && candidate.beta() > cfgCutTOFBeta && nsigmaTOF > -5.0 && nsigmaTOF < 10.0) {
return true;
}
Expand Down Expand Up @@ -254,10 +261,10 @@
bool selectionPID(const T& candidate, double nsigmaTPC, double nsigmaTOF)
{
if (applyTOF) {
if (!candidate.hasTOF() && TMath::Abs(nsigmaTPC) < nsigmaCutTPC) {

Check failure on line 264 in PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
if (candidate.p() > 0.5 && candidate.hasTOF() && TMath::Abs(nsigmaTPC) < nsigmaCutTPC) {

Check failure on line 267 in PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (candidate.p() > 0.5 && candidate.p() < 1.6 && candidate.beta() > cfgCutTOFBeta && nsigmaTOF > -5.0 && nsigmaTOF < 10.0) {
return true;
}
Expand All @@ -280,7 +287,7 @@
return true;
}
}
} else if (TMath::Abs(nsigmaTPC) < nsigmaCutTPC) {

Check failure on line 290 in PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
return false;
Expand All @@ -297,7 +304,7 @@
pz2 = candidate2.pz();
p1 = candidate1.p();
p2 = candidate2.p();
angle = TMath::ACos((pt1 * pt2 + pz1 * pz2) / (p1 * p2));

Check failure on line 307 in PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (isDeepAngle && angle < cfgDeepAngle) {
return false;
}
Expand Down Expand Up @@ -330,24 +337,34 @@
int lastRunNumber = -999;
void processSameEvent(EventCandidates::iterator const& collision, TrackCandidates const&, aod::BCsWithTimestamps const&)
{
if (!collision.sel8() || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder) || !collision.selection_bit(aod::evsel::kNoITSROFrameBorder) || !collision.selection_bit(aod::evsel::kNoSameBunchPileup) || !collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) || !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
histos.fill(HIST("hData"), 1);
if (!collision.sel8() || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder) || !collision.selection_bit(aod::evsel::kNoITSROFrameBorder) || !collision.selection_bit(aod::evsel::kNoSameBunchPileup) || !collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
return;
}
histos.fill(HIST("hData"), 2);
if (rctCut.requireRCTFlagChecker) {
if (!rctChecker(collision)) {
return;
}
}
histos.fill(HIST("hData"), 3);
if (applyStrictEvSel && (!collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll) || !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeNarrow))) {
return;
}
histos.fill(HIST("hData"), 4);
auto centrality = collision.centFT0C();
int occupancy = collision.trackOccupancyInTimeRange();
histos.fill(HIST("hCentrality"), centrality);
histos.fill(HIST("hVtxZ"), collision.posZ());
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();

/*auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
currentRunNumber = collision.bc_as<aod::BCsWithTimestamps>().runNumber();
if (currentRunNumber != lastRunNumber) {
bz = getMagneticField(bc.timestamp());
}
lastRunNumber = currentRunNumber;
*/

auto posThisColl = posTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
auto negThisColl = negTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);

Expand Down Expand Up @@ -474,7 +491,7 @@
KaonMinus = ROOT::Math::PxPyPzMVector(track2.px(), track2.py(), track2.pz(), massKa);
PhiMesonMother = KaonPlus + KaonMinus;

if (TMath::Abs(PhiMesonMother.Rapidity()) < 0.5) {

Check failure on line 494 in PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
histos.fill(HIST("hphiSE"), PhiMesonMother.M(), PhiMesonMother.Pt(), centrality, occupancy, passsector);
}
}
Expand All @@ -488,17 +505,23 @@
BinningTypeVertexContributor binningOnPositions{{axisVertex, cnfgaxis.configThnAxisCentrality, axisOccupancy}, true};
SameKindPair<EventCandidates, TrackCandidates, BinningTypeVertexContributor> pair{binningOnPositions, cfgNoMixedEvents, -1, collisions, tracksTuple, &cache};
for (auto& [collision1, tracks1, collision2, tracks2] : pair) {
if (!collision1.sel8() || !collision1.selection_bit(aod::evsel::kNoTimeFrameBorder) || !collision1.selection_bit(aod::evsel::kNoITSROFrameBorder) || !collision1.selection_bit(aod::evsel::kNoSameBunchPileup) || !collision1.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !collision1.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) || !collision1.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
if (!collision1.sel8() || !collision1.selection_bit(aod::evsel::kNoTimeFrameBorder) || !collision1.selection_bit(aod::evsel::kNoITSROFrameBorder) || !collision1.selection_bit(aod::evsel::kNoSameBunchPileup) || !collision1.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !collision1.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
continue;
}
if (!collision2.sel8() || !collision2.selection_bit(aod::evsel::kNoTimeFrameBorder) || !collision2.selection_bit(aod::evsel::kNoITSROFrameBorder) || !collision2.selection_bit(aod::evsel::kNoSameBunchPileup) || !collision2.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !collision2.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) || !collision2.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
if (!collision2.sel8() || !collision2.selection_bit(aod::evsel::kNoTimeFrameBorder) || !collision2.selection_bit(aod::evsel::kNoITSROFrameBorder) || !collision2.selection_bit(aod::evsel::kNoSameBunchPileup) || !collision2.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !collision2.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
continue;
}
if (rctCut.requireRCTFlagChecker) {
if (!rctChecker(collision1) || !rctChecker(collision2)) {
continue;
}
}
if (applyStrictEvSel && (!collision1.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll) || !collision1.selection_bit(o2::aod::evsel::kNoCollInTimeRangeNarrow))) {
return;
}
if (applyStrictEvSel && (!collision2.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll) || !collision2.selection_bit(o2::aod::evsel::kNoCollInTimeRangeNarrow))) {
return;
}
int occupancy = collision1.trackOccupancyInTimeRange();
auto centrality = collision1.centFT0C();
for (auto& [track1, track2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) {
Expand Down Expand Up @@ -564,7 +587,7 @@
KaonPlus = ROOT::Math::PxPyPzMVector(track1.px(), track1.py(), track1.pz(), massKa);
KaonMinus = ROOT::Math::PxPyPzMVector(track2.px(), track2.py(), track2.pz(), massKa);
PhiMesonMother = KaonPlus + KaonMinus;
if (TMath::Abs(PhiMesonMother.Rapidity()) < 0.5) {

Check failure on line 590 in PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
histos.fill(HIST("hphiME"), PhiMesonMother.M(), PhiMesonMother.Pt(), centrality, occupancy, passsector);
}
}
Expand All @@ -584,15 +607,19 @@
return;
}
for (auto& RecCollision : RecCollisions) {
if (!RecCollision.sel8()) {
if (applyMCsel8 && !RecCollision.sel8()) {
histos.fill(HIST("hMC"), 3);
continue;
}
if (!applyMCsel8 && !RecCollision.selection_bit(aod::evsel::kIsTriggerTVX)) {
histos.fill(HIST("hMC"), 3);
continue;
}
if (!RecCollision.selection_bit(aod::evsel::kNoSameBunchPileup) || !RecCollision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !RecCollision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) || !RecCollision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) {
if (!RecCollision.selection_bit(aod::evsel::kNoSameBunchPileup) || !RecCollision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !RecCollision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
histos.fill(HIST("hMC"), 4);
continue;
}
if (TMath::Abs(RecCollision.posZ()) > cfgCutVertex) {

Check failure on line 622 in PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
histos.fill(HIST("hMC"), 6);
continue;
}
Expand All @@ -601,7 +628,7 @@
histos.fill(HIST("hMC"), 7);
continue;
}
if (readOutFrameMC && RecCollision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
if (readOutFrameMC && !RecCollision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
histos.fill(HIST("hMC"), 8);
continue;
}
Expand All @@ -612,6 +639,10 @@
}
}
histos.fill(HIST("hMC"), 10);
if (applyStrictEvSel && (!RecCollision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll) || !RecCollision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeNarrow))) {
return;
}
histos.fill(HIST("hMC"), 11);
auto centrality = RecCollision.centFT0C();
int occupancy = RecCollision.trackOccupancyInTimeRange();
histos.fill(HIST("hOccupancy"), occupancy, centrality);
Expand Down Expand Up @@ -703,7 +734,7 @@

const auto mctrack1 = track1.mcParticle();
const auto mctrack2 = track2.mcParticle();
int track1PDG = TMath::Abs(mctrack1.pdgCode());

Check failure on line 737 in PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
int track2PDG = TMath::Abs(mctrack2.pdgCode());
if (!mctrack1.isPhysicalPrimary()) {
continue;
Expand Down
Loading