|
ATLAS Offline Software
|
Go to the documentation of this file.
12 return decVtx->
v4().Vect().Mag() / decVtx->
genvecV4().Gamma();
17 double logRatio{-99.};
23 else logRatio = std::log10(
double(1./EMF - 1.));
40 if (!mother)
return {};
42 std::vector<const xAOD::TruthParticle*>
children{};
46 if (!child || child == mother)
continue;
57 std::vector<const xAOD::TruthParticle*> genStableChildren{};
60 genStableChildren.push_back(
particle);
61 return genStableChildren;
67 if (!child || child ==
particle)
continue;
68 if (child->hasDecayVtx() && child->decayVtx()->v4() ==
particle->decayVtx()->v4())
continue;
71 genStableChildren.insert(genStableChildren.end(), grandChildren.begin(), grandChildren.end());
74 return genStableChildren;
79 if (std::abs(ptcl->
pdgId())==pdgId)
return true;
80 if (ptcl->
parent()==
nullptr)
return false;
86 if (std::abs(ptcl->
pdgId())==pdgId_llp)
return ptcl;
87 if (ptcl->
parent()==
nullptr)
return nullptr;
93 double trackIso_pT,
double softTrackIso_R,
double jetIso_pT,
double jetIso_LogRatio){
104 double hardTrack_mindR{99.};
108 if(
Track->pt() >= trackIso_pT && dR < hardTrack_mindR) hardTrack_mindR = dR;
113 iso.track_mindR = hardTrack_mindR != 99. ? hardTrack_mindR : -1.;
114 iso.track_pTsum = softTrack_pTsum.mag() != 0. ? softTrack_pTsum.perp()/
Gaudi::Units::GeV : -1.;
117 double jet_mindR{99.};
119 if(
Jet->
pt() < jetIso_pT)
continue;
122 if(logratio >= jetIso_LogRatio)
continue;
129 iso.jet_mindR = jet_mindR != 99. ? jet_mindR : -1.;
const TruthParticle_v1 * parent(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
std::vector< const xAOD::TrackParticle * > Tracks
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
virtual double eta() const
pseudo rapidity
std::vector< const xAOD::TruthParticle * > getGenStableChildren(const xAOD::TruthParticle *particle)
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
double getCTau(const xAOD::TruthVertex *decVtx)
const Amg::Vector3D & position() const
Returns the 3-pos.
double getCalEnergyLogRatio(double EMF)
bool isFromParticle(const xAOD::TruthParticle *ptcl, int pdgId)
bool greater(double a, double b)
Compare two FP numbers, working around x87 precision issues.
FourVec_t v4() const
The full 4-vector of the vertex.
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
Class describing a truth particle in the MC record.
bool comparePt(const xAOD::TruthParticle *part1, const xAOD::TruthParticle *part2)
virtual double phi() const
phi in [-pi,pi[
bool greater_equal(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Class describing a truth vertex in the MC record.
size_t nChildren() const
Number of children of this particle.
Eigen::Matrix< double, 3, 1 > Vector3D
const xAOD::TruthParticle * getMotherLLP(const xAOD::TruthParticle *ptcl, int pdgId_llp)
Class describing a Vertex.
const TruthParticle_v1 * child(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
virtual double pt() const
transverse momentum
Class describing a TrackParticle.
GenVecFourVec_t genvecV4() const
The full 4-vector of the particle : GenVector form.
int pdgId() const
PDG ID code.
VtxIso getIso(const xAOD::Vertex *MSVtx, const xAOD::TrackParticleContainer &Tracks, const xAOD::JetContainer &Jets, double trackIso_pT, double softTrackIso_R, double jetIso_pT, double jetIso_LogRatio)
void zero(TH2 *h)
zero the contents of a 2d histogram
std::vector< const xAOD::TruthParticle * > getChildren(const xAOD::TruthParticle *mother)