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
29 changes: 26 additions & 3 deletions PWGLF/Tasks/Resonances/phispectrapbpbqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
using namespace o2::framework;
using namespace o2::framework::expressions;
using std::array;
using namespace o2::aod::rctsel;
struct phispectrapbpbqa {
double bz = 0.;

Expand All @@ -75,6 +76,13 @@
Configurable<std::string> cfgURL{"cfgURL", "http://alice-ccdb.cern.ch", "Address of the CCDB to browse"};
Configurable<int64_t> nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "Latest acceptable timestamp of creation for the object"};
} cfgCcdbParam;

struct : ConfigurableGroup {
Configurable<bool> requireRCTFlagChecker{"requireRCTFlagChecker", true, "Check event quality in run condition table"};
Configurable<std::string> cfgEvtRCTFlagCheckerLabel{"cfgEvtRCTFlagCheckerLabel", "CBT_hadronPID", "Evt sel: RCT flag checker label"};
Configurable<bool> cfgEvtRCTFlagCheckerLimitAcceptAsBad{"cfgEvtRCTFlagCheckerLimitAcceptAsBad", true, "Evt sel: RCT flag checker treat Limited Acceptance As Bad"};
} rctCut;

TH3D* hTPCCallib;
TH3D* hTOFCallib;

Expand Down Expand Up @@ -141,13 +149,13 @@
Partition<TrackCandidates> negTracks = aod::track::signed1Pt < cfgCutCharge;

HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};

RCTFlagsChecker rctChecker;
// Event selection cuts - Alex
// TF1* fMultPVCutLow = nullptr;

void init(o2::framework::InitContext&)
{

rctChecker.init(rctCut.cfgEvtRCTFlagCheckerLabel, rctCut.cfgEvtRCTFlagCheckerLimitAcceptAsBad);
histos.add("hphiSE", "hphiSE", HistType::kTHnSparseF, {cnfgaxis.configThnAxisInvMass, cnfgaxis.configThnAxisPt, cnfgaxis.configThnAxisCentrality, axisOccupancy, cnfgaxis.configThnAxisSector}, true);
histos.add("hphiME", "hphiME", HistType::kTHnSparseF, {cnfgaxis.configThnAxisInvMass, cnfgaxis.configThnAxisPt, cnfgaxis.configThnAxisCentrality, axisOccupancy, cnfgaxis.configThnAxisSector}, true);
histos.add("hphiGen", "hphiGen", HistType::kTHnSparseF, {cnfgaxis.configThnAxisInvMass, cnfgaxis.configThnAxisPt, cnfgaxis.configThnAxisCentrality, axisOccupancy}, true);
Expand Down Expand Up @@ -213,10 +221,10 @@
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 224 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 227 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 @@ -246,10 +254,10 @@
bool selectionPID(const T& candidate, double nsigmaTPC, double nsigmaTOF)
{
if (applyTOF) {
if (!candidate.hasTOF() && TMath::Abs(nsigmaTPC) < nsigmaCutTPC) {

Check failure on line 257 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 260 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 @@ -272,7 +280,7 @@
return true;
}
}
} else if (TMath::Abs(nsigmaTPC) < nsigmaCutTPC) {

Check failure on line 283 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 @@ -289,7 +297,7 @@
pz2 = candidate2.pz();
p1 = candidate1.p();
p2 = candidate2.p();
angle = TMath::ACos((pt1 * pt2 + pz1 * pz2) / (p1 * p2));

Check failure on line 300 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 @@ -325,6 +333,11 @@
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)) {
return;
}
if (rctCut.requireRCTFlagChecker) {
if (!rctChecker(collision)) {
return;
}
}
auto centrality = collision.centFT0C();
int occupancy = collision.trackOccupancyInTimeRange();
histos.fill(HIST("hCentrality"), centrality);
Expand Down Expand Up @@ -461,7 +474,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 477 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 @@ -481,6 +494,11 @@
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)) {
continue;
}
if (rctCut.requireRCTFlagChecker) {
if (!rctChecker(collision1) || !rctChecker(collision2)) {
continue;
}
}
int occupancy = collision1.trackOccupancyInTimeRange();
auto centrality = collision1.centFT0C();
for (auto& [track1, track2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) {
Expand Down Expand Up @@ -546,7 +564,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 567 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 Down Expand Up @@ -574,7 +592,7 @@
histos.fill(HIST("hMC"), 4);
continue;
}
if (TMath::Abs(RecCollision.posZ()) > cfgCutVertex) {

Check failure on line 595 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 @@ -587,8 +605,13 @@
histos.fill(HIST("hMC"), 8);
continue;
}

histos.fill(HIST("hMC"), 9);
if (rctCut.requireRCTFlagChecker) {
if (!rctChecker(RecCollision)) {
continue;
}
}
histos.fill(HIST("hMC"), 10);
auto centrality = RecCollision.centFT0C();
int occupancy = RecCollision.trackOccupancyInTimeRange();
histos.fill(HIST("hOccupancy"), occupancy, centrality);
Expand Down Expand Up @@ -680,7 +703,7 @@

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

Check failure on line 706 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