Skip to content
Snippets Groups Projects
Commit 12a5d48c authored by Andrii Verbytskyi's avatar Andrii Verbytskyi Committed by Frank Winklmeier
Browse files

Replace some functions with templates in MCTruthClassifier

Replace some functions with templates in MCTruthClassifier
parent 10b9cee2
No related branches found
No related tags found
No related merge requests found
......@@ -223,9 +223,9 @@ private:
#ifndef GENERATIONBASE /*Disable when no recostruction packages are expected*/
double fracParticleInJet(const xAOD::TruthParticle*, const xAOD::Jet*, bool DR, bool nparts) const;
void findJetConstituents(const xAOD::Jet*, std::set<const xAOD::TruthParticle*>& constituents, bool DR) const;
static double deltaR(const xAOD::TruthParticle& v1, const xAOD::Jet& v2);
//
#endif
// Now that we use TLorentzVector for the momentum base class, this is straightforward
template <class A, class B> inline double deltaR(A& v1, B& v2) const {return v1.p4().DeltaR(v2.p4());}
void findAllJetMothers(const xAOD::TruthParticle*, std::set<const xAOD::TruthParticle*>&) const;
void findParticleDaughters(const xAOD::TruthParticle*, std::set<const xAOD::TruthParticle*>&) const;
......
......@@ -387,13 +387,7 @@ MCTruthClassifier::getGenPart(const xAOD::TrackParticle* trk, Info* info /*= nul
return (theGenParticle);
}
// Now that we use TLorentzVector for the momentum base class, this is straightforward
double
MCTruthClassifier::deltaR(const xAOD::TruthParticle& v1, const xAOD::Jet& v2)
{
// Should this use delta y though?
return v1.p4().DeltaR(v2.p4());
}
void
MCTruthClassifier::findJetConstituents(const xAOD::Jet* jet,
std::set<const xAOD::TruthParticle*>& constituents,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment