Skip to content
Closed
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
206 changes: 102 additions & 104 deletions PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -646,114 +646,112 @@
isEmbEta = true; // eta->pi0->gamma-> e
}

auto const& mother = particleMc.mothers_first_as<aod::McParticles>();

if (std::abs(mother.pdgCode()) == kEta || std::abs(mother.pdgCode()) == kPi0 || std::abs(mother.pdgCode()) == kGamma) {
registry.fill(HIST("hMcgenAllNonHfeElectron"), particleMc.pt());
auto const& gmother = mother.mothers_first_as<aod::McParticles>();
auto const& ggmother = gmother.mothers_first_as<aod::McParticles>();
auto const& gggmother = ggmother.mothers_first_as<aod::McParticles>();

// cases to consider: eta->e, eta->pi0->e, eta->gamma->e, eta->pi0->gamma->e, pi0->e, pi0->gamma->e

//================= eta->e ======================================
if (std::abs(mother.pdgCode()) == kEta) {
if (mother.isPhysicalPrimary()) {
if ((std::abs(gmother.pdgCode()) >= pdgCodeCharmMin && std::abs(gmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(gmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(gmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbEta = true;
}
}
//================= eta->pi0->e ======================================

if (std::abs(mother.pdgCode()) == kPi0) {
if (mother.isPhysicalPrimary()) {
if ((std::abs(gmother.pdgCode()) >= pdgCodeCharmMin && std::abs(gmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(gmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(gmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbPi0 = true; // pi0 -> e
}
auto const& mother = particleMc.mothers_first_as<aod::McParticles>();

if (std::abs(gmother.pdgCode()) == kEta) {
if (gmother.isPhysicalPrimary()) {
if ((std::abs(ggmother.pdgCode()) >= pdgCodeCharmMin && std::abs(ggmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(ggmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(ggmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbEta = true; // eta->pi0-> e
}
}
}

/// ==================================== eta->gamma->e and eta->pi0->gamma->e============
if (std::abs(mother.pdgCode()) == kGamma) {
if (std::abs(gmother.pdgCode()) == kEta) {
if (gmother.isPhysicalPrimary()) {
if ((std::abs(ggmother.pdgCode()) >= pdgCodeCharmMin && std::abs(ggmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(ggmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(ggmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbEta = true; // eta->gamma-> e
}
}
if (std::abs(mother.pdgCode()) == kEta || std::abs(mother.pdgCode()) == kPi0 || std::abs(mother.pdgCode()) == kGamma) {
registry.fill(HIST("hMcgenAllNonHfeElectron"), particleMc.pt());
auto const& gmother = mother.mothers_first_as<aod::McParticles>();
auto const& ggmother = gmother.mothers_first_as<aod::McParticles>();
auto const& gggmother = ggmother.mothers_first_as<aod::McParticles>();

if (std::abs(gmother.pdgCode()) == kPi0) {
if (gmother.isPhysicalPrimary()) {
if ((std::abs(ggmother.pdgCode()) >= pdgCodeCharmMin && std::abs(ggmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(ggmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(ggmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbPi0 = true; // pi0-> gamma-> e
}
// cases to consider: eta->e, eta->pi0->e, eta->gamma->e, eta->pi0->gamma->e, pi0->e, pi0->gamma->e

//================= eta->e ======================================
if (std::abs(mother.pdgCode()) == kEta) {
if (mother.isPhysicalPrimary()) {
if ((std::abs(gmother.pdgCode()) >= pdgCodeCharmMin && std::abs(gmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(gmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(gmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbEta = true;
}
}
//================= eta->pi0->e ======================================

if (std::abs(mother.pdgCode()) == kPi0) {
if (mother.isPhysicalPrimary()) {
if ((std::abs(gmother.pdgCode()) >= pdgCodeCharmMin && std::abs(gmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(gmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(gmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbPi0 = true; // pi0 -> e
}

if (std::abs(gmother.pdgCode()) == kEta) {
if (gmother.isPhysicalPrimary()) {
if ((std::abs(ggmother.pdgCode()) >= pdgCodeCharmMin && std::abs(ggmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(ggmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(ggmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbEta = true; // eta->pi0-> e
}
}
}

if (std::abs(ggmother.pdgCode()) == kEta) {
if (ggmother.isPhysicalPrimary()) {
if ((std::abs(gggmother.pdgCode()) >= pdgCodeCharmMin && std::abs(gggmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(gggmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(gggmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
/// ==================================== eta->gamma->e and eta->pi0->gamma->e============
if (std::abs(mother.pdgCode()) == kGamma) {
if (std::abs(gmother.pdgCode()) == kEta) {
if (gmother.isPhysicalPrimary()) {
if ((std::abs(ggmother.pdgCode()) >= pdgCodeCharmMin && std::abs(ggmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(ggmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(ggmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbEta = true; // eta->gamma-> e
}
}

if (std::abs(gmother.pdgCode()) == kPi0) {
if (gmother.isPhysicalPrimary()) {
if ((std::abs(ggmother.pdgCode()) >= pdgCodeCharmMin && std::abs(ggmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(ggmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(ggmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbPi0 = true; // pi0-> gamma-> e
}

if (std::abs(ggmother.pdgCode()) == kEta) {
if (ggmother.isPhysicalPrimary()) {
if ((std::abs(gggmother.pdgCode()) >= pdgCodeCharmMin && std::abs(gggmother.pdgCode()) < pdgCodeCharmMax) ||
(std::abs(gggmother.pdgCode()) >= pdgCodeBeautyMin && std::abs(gggmother.pdgCode()) < pdgCodeBeautyMax)) {
continue;
}
isEmbEta = true; // eta->pi0->gamma-> e
}
}
}

if (isEmbPi0 || isEmbEta) {
registry.fill(HIST("hMcgenNonHfeElectron"), particleMc.pt());
isNonHfe = true;
if (isEmbPi0) {

registry.fill(HIST("hPi0eEmbTrkPt"), particleMc.pt());
}
if (isEmbEta) {
registry.fill(HIST("hEtaeEmbTrkPt"), particleMc.pt());
}
}
if (isEmbPi0 || isEmbEta) {
registry.fill(HIST("hMcgenNonHfeElectron"), particleMc.pt());
isNonHfe = true;
if (isEmbPi0) {

registry.fill(HIST("hPi0eEmbTrkPt"), particleMc.pt());
}
if (isEmbEta) {
registry.fill(HIST("hEtaeEmbTrkPt"), particleMc.pt());
}
}
}

hfGenElectronSel(mcCollision.globalIndex(), particleMc.globalIndex(), particleMc.eta(), particleMc.phi(), particleMc.pt(), isNonHfe);
}
}
isEmbEta = true; // eta->pi0->gamma-> e
}
PROCESS_SWITCH(HfElectronSelectionWithTpcEmcal, processMcGen, "Process MC Gen mode", false);
};
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<HfElectronSelectionWithTpcEmcal>(cfgc)};
}
}

if (isEmbPi0 || isEmbEta) {
registry.fill(HIST("hMcgenNonHfeElectron"), particleMc.pt());
isNonHfe = true;
if (isEmbPi0) {

registry.fill(HIST("hPi0eEmbTrkPt"), particleMc.pt());
}
if (isEmbEta) {
registry.fill(HIST("hEtaeEmbTrkPt"), particleMc.pt());
}

}
if (isEmbPi0 || isEmbEta) {
registry.fill(HIST("hMcgenNonHfeElectron"), particleMc.pt());
isNonHfe = true;
if (isEmbPi0) {

registry.fill(HIST("hPi0eEmbTrkPt"), particleMc.pt());
}
if (isEmbEta) {
registry.fill(HIST("hEtaeEmbTrkPt"), particleMc.pt());

}
}
}

hfGenElectronSel(mcCollision.globalIndex(), particleMc.globalIndex(), particleMc.eta(), particleMc.phi(), particleMc.pt(), isNonHfe);
}
}
}
PROCESS_SWITCH(HfElectronSelectionWithTpcEmcal, processMcGen, "Process MC Gen mode", false);
};
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<HfElectronSelectionWithTpcEmcal>(cfgc)};
}

Check failure on line 757 in PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
Loading