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
2 changes: 1 addition & 1 deletion DPG/Tasks/ITS/filterTracks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
// just for internal check
// double mass=particleMother.e()*particleMother.e()-particleMother.pt()*particleMother.pt()-particleMother.pz()*particleMother.pz();
// filteredTracksMC(mcparticle.pdgCode(),mcparticle.isPhysicalPrimary(),particleMother.pdgCode(),0,motherIndex,0,particleMother.pt(),particleMother.y(),std::sqrt(mass),0);
if (pdgParticleMother == 310) {

Check failure on line 187 in DPG/Tasks/ITS/filterTracks.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.
auto daughtersSlice = mcparticle.template daughters_as<aod::McParticles>();
int ndaught = daughtersSlice.size(); // might not be accurate in case K0s interact with material before decaying
if (ndaught != 2)
Expand All @@ -196,13 +196,13 @@

int ndaught = 0;
std::vector<int> indxDaughers;
if (pdgParticleMother == 421) {

Check failure on line 199 in DPG/Tasks/ITS/filterTracks.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 (RecoDecay::isMatchedMCGen<true, false>(mcParticles, particleMother, pdgParticleMother, pdgDecayDzero, true, nullptr, 3, &indxDaughers)) {
ndaught = 2;
// std::cout<<"######## FOUND D0, MATCHED! pdg: " <<particleMother.pdgCode()<<"################ size array "<<indxDaughers.size()<<std::endl;
} else
ndaught = -indxDaughers.size();
} else if (pdgParticleMother == 4122) {

Check failure on line 205 in DPG/Tasks/ITS/filterTracks.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 (RecoDecay::isMatchedMCGen<true, false>(mcParticles, particleMother, pdgParticleMother, pdgDecayLc, true, nullptr, 3, &indxDaughers)) {
ndaught = 3;
} else
Expand Down Expand Up @@ -238,14 +238,14 @@
void processData(soa::Filtered<TracksWithSelAndDca> const& tracks)
{
if (trackPtSampling == 0) {
for (auto& track : tracks) {

Check failure on line 241 in DPG/Tasks/ITS/filterTracks.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
fillTableData(track);
}
} else {
for (auto& track : lowPtTracks) {

Check failure on line 245 in DPG/Tasks/ITS/filterTracks.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
fillTableData(track);
}
for (auto& track : midPtTracks) {

Check failure on line 248 in DPG/Tasks/ITS/filterTracks.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
fillTableData(track);
}
for (auto& track : highPtTracks) {
Expand Down Expand Up @@ -280,12 +280,12 @@
std::vector<int> indxDaughers;
float etamax = 0;
bool isMatchedToSignal = false;
if (std::abs(pdgCode) == 310) {

Check failure on line 283 in DPG/Tasks/ITS/filterTracks.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.
isMatchedToSignal = RecoDecay::isMatchedMCGen<true, false>(mcParticles, mcpart, 310, pdgDecayKzero, true, nullptr, 1, &indxDaughers);
}
if (std::abs(pdgCode) == 421) {

Check failure on line 286 in DPG/Tasks/ITS/filterTracks.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.
isMatchedToSignal = RecoDecay::isMatchedMCGen<true, false>(mcParticles, mcpart, 421, pdgDecayDzero, true, nullptr, 3, &indxDaughers);
} else if (std::abs(pdgCode) == 4122) {

Check failure on line 288 in DPG/Tasks/ITS/filterTracks.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.
isMatchedToSignal = RecoDecay::isMatchedMCGen<true, false>(mcParticles, mcpart, 4122, pdgDecayLc, true, nullptr, 3, &indxDaughers);
// std::cout<<"Lc found, matched to MC? "<<isMatchedToSignal<<std::endl;
// if(!isMatchedToSignal){
Expand All @@ -300,11 +300,11 @@
for (auto mcpartdaughtIdx : indxDaughers) {
auto mcPartDaught = mcParticles.rawIteratorAt(mcpartdaughtIdx);
double eta = std::abs(mcPartDaught.eta());
if ((eta) > etamax){
if ((eta) > etamax) {
etamax = eta;
}
}
if (pdgCode == 310) {

Check failure on line 307 in DPG/Tasks/ITS/filterTracks.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.
selectedGenParticles(mcpart.pdgCode(), mcpart.mcCollisionId(), 0, mcpart.pt(), mcpart.y(), etamax, 0, 0);
continue;
}
Expand Down
Loading