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
3 changes: 2 additions & 1 deletion ALICE3/Tasks/alice3-dilepton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,16 @@
auto mother_p1 = mcparticles.iteratorAt(motherid_p1);
int mother1_pdg = mother_p1.pdgCode();
// direct beauty
if (((500 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 599) || (5000 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 5999))) {

Check failure on line 173 in ALICE3/Tasks/alice3-dilepton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return HFType::kBe;
}
// charm direct or from beauty
if (((400 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 499) || (4000 < std::abs(mother1_pdg) && std::abs(mother1_pdg) < 4999))) {

Check failure on line 177 in ALICE3/Tasks/alice3-dilepton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (mother_p1.has_mothers()) {
int motherId = mother_p1.mothersIds()[0];
while (motherId > -1) {
auto mp = mcparticles.rawIteratorAt(motherId);
if (((500 < std::abs(mp.pdgCode()) && std::abs(mp.pdgCode()) < 599) || (5000 < std::abs(mp.pdgCode()) && std::abs(mp.pdgCode()) < 5999))) {

Check failure on line 182 in ALICE3/Tasks/alice3-dilepton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return HFType::kBCe;
}
if (mp.has_mothers()) {
Expand All @@ -192,12 +192,12 @@
return HFType::kCe;
}
// pi0 not from HF
if (mother1_pdg == 111) {

Check failure on line 195 in ALICE3/Tasks/alice3-dilepton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

Check failure on line 195 in ALICE3/Tasks/alice3-dilepton.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 (mother_p1.has_mothers()) {
int motherId = mother_p1.mothersIds()[0];
while (motherId > -1) {
auto mp = mcparticles.rawIteratorAt(motherId);
if (((500 < std::abs(mp.pdgCode()) && std::abs(mp.pdgCode()) < 599) || (5000 < std::abs(mp.pdgCode()) && std::abs(mp.pdgCode()) < 5999)) || ((400 < std::abs(mp.pdgCode()) && std::abs(mp.pdgCode()) < 499) || (4000 < std::abs(mp.pdgCode()) && std::abs(mp.pdgCode()) < 4999))) {

Check failure on line 200 in ALICE3/Tasks/alice3-dilepton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return HFType::kUndef;
}
if (mp.has_mothers()) {
Expand Down Expand Up @@ -290,10 +290,10 @@
}
if (requireHFE > -1) {
int typehfe = IsHF(mcParticle, mcParticles);
if (requireHFE < 3 && typehfe != requireHFE) {

Check failure on line 293 in ALICE3/Tasks/alice3-dilepton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
if (requireHFE == 3 && typehfe == HFType::kUndef) {

Check failure on line 296 in ALICE3/Tasks/alice3-dilepton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
}
Expand Down Expand Up @@ -405,7 +405,7 @@
// Calculate the number of particles in the FIT acceptance
for (const auto& mcParticle : mcParticles_per_coll) {
if (mcParticle.isPhysicalPrimary()) {
if ((2.2 < mcParticle.eta() && mcParticle.eta() < 5.0) || (-3.4 < mcParticle.eta() && mcParticle.eta() < -2.3)) {

Check failure on line 408 in ALICE3/Tasks/alice3-dilepton.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
auto pdgParticle = inspdg->GetParticle(mcParticle.pdgCode());
if (pdgParticle) {
float charge = pdgParticle->Charge() / 3.f; // Charge in units of |e|
Expand Down Expand Up @@ -658,7 +658,7 @@
&& std::abs(mother1_pdg) != o2::constants::physics::kOmega // omega
&& std::abs(mother1_pdg) != o2::constants::physics::kPhi // phi
&& std::abs(mother1_pdg) != o2::constants::physics::kJPsi // Jpsi
&& std::abs(mother1_pdg) != 100443 // psi2S

Check failure on line 661 in ALICE3/Tasks/alice3-dilepton.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.
) {
return -1;
}
Expand Down Expand Up @@ -1083,7 +1083,8 @@
} // end of processRec

void processRecAll(MyFilteredAlice3Collision const& collisions,
MyFilteredTracksMC const&)
MyFilteredTracksMC const&,
const aod::McParticles&)
{
for (const auto& collision : collisions) {
registry.fill(HIST("Reconstructed/Event/VtxZ"), collision.posZ());
Expand Down
Loading