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
4 changes: 2 additions & 2 deletions PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"

#include <iostream>

Check failure on line 28 in PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <map>
#include <random>
#include <vector>
Expand Down Expand Up @@ -60,8 +60,8 @@
Configurable<int> n_dummy_loop{"n_dummy_loop", 0, "for loop runs over n times"};
Configurable<float> down_scaling_omega{"down_scaling_omega", 1.1, "down scaling factor to store omega"};
Configurable<float> down_scaling_phi{"down_scaling_phi", 1.1, "down scaling factor to store phi"};
Configurable<float> min_eta_gen_primary{"min_eta_gen_primary", -1.5, "min eta to store generated information"}; // smearing is applied at analysis stage. set wider value.
Configurable<float> max_eta_gen_primary{"max_eta_gen_primary", +1.5, "max eta to store generated information"}; // smearing is applied at analysis stage. set wider value.
Configurable<float> min_eta_gen_primary{"min_eta_gen_primary", -1.5, "min eta to store generated information"}; // smearing is applied at analysis stage. set wider value.
Configurable<float> max_eta_gen_primary{"max_eta_gen_primary", +1.5, "max eta to store generated information"}; // smearing is applied at analysis stage. set wider value.
Configurable<float> min_eta_gen_primary_fwd{"min_eta_gen_primary_fwd", -6.0, "min eta to store generated information"}; // smearing is applied at analysis stage. set wider value.
Configurable<float> max_eta_gen_primary_fwd{"max_eta_gen_primary_fwd", -1.0, "max eta to store generated information"}; // smearing is applied at analysis stage. set wider value.

Expand Down Expand Up @@ -90,10 +90,10 @@
bool is_lepton = false, is_anti_lepton = false;
for (int d = mctrack.daughtersIds()[0]; d <= mctrack.daughtersIds()[1]; ++d) {
auto daughter = mcTracks.iteratorAt(d);
if (daughter.pdgCode() == 11 && (min_eta_gen_primary < daughter.eta() && daughter.eta() < max_eta_gen_primary)) {

Check failure on line 93 in PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.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.
is_lepton = true;
}
if (daughter.pdgCode() == -11 && (min_eta_gen_primary < daughter.eta() && daughter.eta() < max_eta_gen_primary)) {

Check failure on line 96 in PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.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.
is_anti_lepton = true;
}
}
Expand All @@ -114,10 +114,10 @@
bool is_lepton = false, is_anti_lepton = false;
for (int d = mctrack.daughtersIds()[0]; d <= mctrack.daughtersIds()[1]; ++d) {
auto daughter = mcTracks.iteratorAt(d);
if (daughter.pdgCode() == 13 && (min_eta_gen_primary_fwd < daughter.eta() && daughter.eta() < max_eta_gen_primary_fwd)) {

Check failure on line 117 in PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.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.
is_lepton = true;
}
if (daughter.pdgCode() == -13 && (min_eta_gen_primary_fwd < daughter.eta() && daughter.eta() < max_eta_gen_primary_fwd)) {

Check failure on line 120 in PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.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.
is_anti_lepton = true;
}
}
Expand All @@ -135,9 +135,9 @@
Preslice<aod::EMPrimaryMuons> perCollision_mu = aod::emprimarymuon::collisionId;

// apply rapidity cut for electrons
Partition<aod::McParticles> mcelectrons = nabs(o2::aod::mcparticle::pdgCode) == 11 && min_eta_gen_primary < o2::aod::mcparticle::eta && o2::aod::mcparticle::eta < max_eta_gen_primary;

Check failure on line 138 in PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.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.
Partition<aod::McParticles> mcmuons = nabs(o2::aod::mcparticle::pdgCode) == 13 && min_eta_gen_primary_fwd < o2::aod::mcparticle::eta && o2::aod::mcparticle::eta < max_eta_gen_primary_fwd;

Check failure on line 139 in PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.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.
Partition<aod::McParticles> mcvectormesons = o2::aod::mcparticle::pdgCode == 223 || o2::aod::mcparticle::pdgCode == 333;

Check failure on line 140 in PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.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.

template <uint8_t system, typename TTracks, typename TFwdTracks, typename TMFTTracks, typename TPCMs, typename TPCMLegs, typename TEMPrimaryElectrons, typename TEMPrimaryMuons>
void skimmingMC(MyCollisionsMC const& collisions, aod::BCs const&, aod::McCollisions const& mcCollisions, aod::McParticles const& mcTracks, TTracks const& o2tracks, TFwdTracks const& o2fwdtracks, TMFTTracks const&, TPCMs const& v0photons, TPCMLegs const&, TEMPrimaryElectrons const& emprimaryelectrons, TEMPrimaryMuons const& emprimarymuons)
Expand Down Expand Up @@ -323,7 +323,7 @@
// TODO: remove this check as soon as issues with MC production are fixed
if (d < mcTracks.size()) { // protect against bad daughter indices
auto daughter = mcTracks.iteratorAt(d);
if (std::abs(daughter.pdgCode()) == 11 || std::abs(daughter.pdgCode()) == 13) {

Check failure on line 326 in PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.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.
is_lepton_involved = true;
break;
}
Expand Down Expand Up @@ -644,7 +644,7 @@
continue;
}

if (mctrack.pdgCode() == 223) {

Check failure on line 647 in PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.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.
if (dist01(engine) < down_scaling_omega) {
emmcgenvms(fEventLabels[mcCollision.globalIndex()], mctrack.pdgCode(), mctrack.flags(), mctrack.px(), mctrack.py(), mctrack.pz(), mctrack.e(), down_scaling_omega.value);
}
Expand Down
Loading