Skip to content
Merged
Show file tree
Hide file tree
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
20 changes: 14 additions & 6 deletions PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
Configurable<bool> applySkimming{"applySkimming", false, "Skimmed dataset processing"};
Configurable<std::string> cfgSkimming{"cfgSkimming", "fPD", "Configurable for skimming"};
Configurable<bool> CBThadronPID{"CBThadronPID", false, "Apply ev. sel. based on RCT flag `hadronPID`"}; // more in Common/CCDB/RCTSelectionFlags.h

Configurable<int> applyEvSel{"applyEvSel", 2, "Flag to apply rapidity cut: 0 -> no event selection, 1 -> Run 2 event selection, 2 -> Run 3 event selection"};
// Configurable<int> trackSelection{"trackSelection", 1, "Track selection: 0 -> No Cut, 1 -> kGlobalTrack, 2 -> kGlobalTrackWoPtEta, 3 -> kGlobalTrackWoDCA, 4 -> kQualityTracks, 5 -> kInAcceptanceTracks"};
Expand Down Expand Up @@ -134,6 +135,8 @@
HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject};
SliceCache cache;

rctsel::RCTFlagsChecker myChecker{"CBT_hadronPID"};

void init(InitContext&)
{

Expand All @@ -148,6 +151,8 @@
ccdb->setLocalObjectValidityChecking();
ccdb->setFatalWhenNull(false);

myChecker.init("CBT_hadronPID", true);

registry.add("hNEvents", "hNEvents", {HistType::kTH1D, {{2, 0.f, 2.f}}});
registry.get<TH1>(HIST("hNEvents"))->GetXaxis()->SetBinLabel(1, "All");
registry.get<TH1>(HIST("hNEvents"))->GetXaxis()->SetBinLabel(2, "Skimmed");
Expand All @@ -158,12 +163,12 @@

if (enable_gen_info) {
registry.add("hNEvents_MCGen", "hNEvents_MCGen", {HistType::kTH1F, {{1, 0.f, 1.f}}});
registry.add("hGen_EtaPhiPt_Proton", "Gen (anti)protons in true collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., 2 * TMath::Pi(), "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hGen_EtaPhiPt_Deuteron", "Gen (anti)deuteron in true collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., 2 * TMath::Pi(), "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hGen_EtaPhiPt_Helium3", "Gen (anti)Helium3 in true collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., 2 * TMath::Pi(), "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hReco_EtaPhiPt_Proton", "Gen (anti)protons in reco collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., 2 * TMath::Pi(), "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hReco_EtaPhiPt_Deuteron", "Gen (anti)deuteron in reco collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., 2 * TMath::Pi(), "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hReco_EtaPhiPt_Helium3", "Gen (anti)Helium3 in reco collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., 2 * TMath::Pi(), "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hGen_EtaPhiPt_Proton", "Gen (anti)protons in true collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., o2::constants::math::TwoPI, "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hGen_EtaPhiPt_Deuteron", "Gen (anti)deuteron in true collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., o2::constants::math::TwoPI, "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hGen_EtaPhiPt_Helium3", "Gen (anti)Helium3 in true collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., o2::constants::math::TwoPI, "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hReco_EtaPhiPt_Proton", "Gen (anti)protons in reco collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., o2::constants::math::TwoPI, "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hReco_EtaPhiPt_Deuteron", "Gen (anti)deuteron in reco collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., o2::constants::math::TwoPI, "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hReco_EtaPhiPt_Helium3", "Gen (anti)Helium3 in reco collisions", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., o2::constants::math::TwoPI, "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
}
}

Expand Down Expand Up @@ -349,6 +354,9 @@
const auto& bc = collision.bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);

if (!myChecker(*collision) && CBThadronPID)
return;

registry.fill(HIST("hNEvents"), 0.5);
if (applySkimming) {
if (!zorro.isSelected(bc.globalBC())) {
Expand Down Expand Up @@ -538,21 +546,21 @@
continue;
}

if (mcParticle.pdgCode() == 1000010020) {

Check failure on line 549 in PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hReco_EtaPhiPt_Deuteron"), mcParticle.eta(), mcParticle.phi(), mcParticle.pt());
} else if (mcParticle.pdgCode() == -1000010020) {

Check failure on line 551 in PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hReco_EtaPhiPt_Deuteron"), mcParticle.eta(), mcParticle.phi(), mcParticle.pt() * -1);
}

if (mcParticle.pdgCode() == 2212) {

Check failure on line 555 in PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hReco_EtaPhiPt_Proton"), mcParticle.eta(), mcParticle.phi(), mcParticle.pt());
} else if (mcParticle.pdgCode() == -2212) {

Check failure on line 557 in PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hReco_EtaPhiPt_Proton"), mcParticle.eta(), mcParticle.phi(), mcParticle.pt() * -1);
}

if (mcParticle.pdgCode() == 1000020030) {

Check failure on line 561 in PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hReco_EtaPhiPt_Helium3"), mcParticle.eta(), mcParticle.phi(), mcParticle.pt());
} else if (mcParticle.pdgCode() == -1000020030) {

Check failure on line 563 in PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hReco_EtaPhiPt_Helium3"), mcParticle.eta(), mcParticle.phi(), mcParticle.pt() * -1);
}
}
Expand All @@ -578,15 +586,15 @@
if (!mcParticle.isPhysicalPrimary()) {
continue;
}
if (mcParticle.pdgCode() == 1000010020) {

Check failure on line 589 in PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hGen_EtaPhiPt_Deuteron"), mcParticle.eta(), mcParticle.phi(), mcParticle.pt());
} else if (mcParticle.pdgCode() == -1000010020) {

Check failure on line 591 in PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hGen_EtaPhiPt_Deuteron"), mcParticle.eta(), mcParticle.phi(), mcParticle.pt() * -1);
}

if (mcParticle.pdgCode() == 2212) {

Check failure on line 595 in PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hGen_EtaPhiPt_Proton"), mcParticle.eta(), mcParticle.phi(), mcParticle.pt());
} else if (mcParticle.pdgCode() == -2212) {

Check failure on line 597 in PWGCF/Femto3D/TableProducer/singleTrackSelector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hGen_EtaPhiPt_Proton"), mcParticle.eta(), mcParticle.phi(), mcParticle.pt() * -1);
}

Expand Down
5 changes: 4 additions & 1 deletion PWGCF/Femto3D/Tasks/femto3dPairTaskMC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ struct FemtoCorrelationsMC {
std::pair<int, std::vector<float>> TOFcuts_2;

using FilteredCollisions = soa::Join<aod::SingleCollSels, aod::SingleCollExtras>;
using FilteredTracks = soa::Join<aod::SingleTrackSels, aod::SingleTrkMCs, aod::SinglePIDPis, aod::SinglePIDKas, aod::SinglePIDPrs, aod::SinglePIDDes, aod::SinglePIDTrs, aod::SinglePIDHes>;
using FilteredTracks = soa::Join<aod::SingleTrackSels, aod::SingleTrkMCs, aod::SinglePIDPrs, aod::SinglePIDDes>;
// using FilteredTracks = soa::Join<aod::SingleTrackSels, aod::SingleTrkMCs, aod::SinglePIDPis, aod::SinglePIDKas, aod::SinglePIDPrs, aod::SinglePIDDes, aod::SinglePIDTrs, aod::SinglePIDHes>;

typedef std::shared_ptr<soa::Filtered<FilteredTracks>::iterator> trkType;
typedef std::shared_ptr<soa::Filtered<FilteredCollisions>::iterator> colType;
Expand Down Expand Up @@ -143,6 +144,8 @@ struct FemtoCorrelationsMC {
void init(o2::framework::InitContext&)
{

o2::aod::ITSResponse::setMCDefaultParameters(); // set MC parametrisation for the ITS PID

IsIdentical = (_sign_1 * _particlePDG_1 == _sign_2 * _particlePDG_2);

Pair->SetIdentical(IsIdentical);
Expand Down
6 changes: 6 additions & 0 deletions PWGCF/Femto3D/Tasks/femto3dQA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ struct QAHistograms {
/// Construct a registry object with direct declaration
HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject};

Configurable<bool> _isMC{"isMC", false, ""};

Configurable<bool> _removeSameBunchPileup{"removeSameBunchPileup", false, ""};
Configurable<bool> _requestGoodZvtxFT0vsPV{"requestGoodZvtxFT0vsPV", false, ""};
Configurable<bool> _requestVertexITSTPC{"requestVertexITSTPC", false, ""};
Expand Down Expand Up @@ -101,6 +103,10 @@ struct QAHistograms {

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

if (_isMC.value)
o2::aod::ITSResponse::setMCDefaultParameters(); // set MC parametrisation for the ITS PID

TPCcuts = std::make_pair(_particlePDG, _tpcNSigma);
TOFcuts = std::make_pair(_particlePDG, _tofNSigma);

Expand Down
Loading