|
ATLAS Offline Software
|
|
Amg::Vector3D | p3 (const xAOD::TruthVertex *p) |
|
Amg::Vector3D | p3 (const xAOD::Jet &j) |
|
Amg::Vector3D | signalProcessP3 (const xAOD::TruthEventContainer &) |
|
void | setJetLabels (const xAOD::Jet &jet, const Particles &particles, const LabelNames &names) |
|
void | setJetLabels (const xAOD::Jet &jet, const Particles &particles, const LabelDecorators &decs) |
|
float | partPt (const xAOD::TruthParticle *part) |
|
float | partLxy (const xAOD::TruthParticle *part, const Amg::Vector3D &origin) |
|
float | partDR (const xAOD::TruthParticle *part, const xAOD::Jet &jet) |
|
int | partPdgId (const xAOD::TruthParticle *part) |
|
float | positionDPhi (const xAOD::TruthParticle *part, const xAOD::Jet &jet, const Amg::Vector3D &origin) |
|
float | positionDEta (const xAOD::TruthParticle *part, const xAOD::Jet &jet, const Amg::Vector3D &origin) |
|
void | childrenRemoved (const std::vector< const xAOD::TruthParticle * > &parents, std::vector< const xAOD::TruthParticle * > &children) |
|
template<typename T > |
void | declareProperties (T &tool, LabelNames *n) |
|
bool | isChild (const xAOD::TruthParticle *p, const xAOD::TruthParticle *c) |
|
◆ childrenRemoved()
◆ declareProperties()
template<typename T >
void ParticleJetTools::declareProperties |
( |
T & |
tool, |
|
|
LabelNames * |
n |
|
) |
| |
Definition at line 105 of file ParticleJetLabelCommon.h.
106 tool.declareProperty(
"LabelName",
n->singleint=
"",
"Jet label attribute to be added.");
107 tool.declareProperty(
"DoubleLabelName",
n->doubleint=
"",
"Jet label attribute to be added (with the possibility of up to 2 matched hadrons).");
108 tool.declareProperty(
"LabelPtName",
n->pt=
"",
"Attribute for labelling particle pt");
109 tool.declareProperty(
"LabelLxyName",
n->Lxy=
"",
"Attribute for Lxy of labelling particle");
110 tool.declareProperty(
"LabelDRName",
n->dr=
"",
"Attribute for dR(part, jet) for labelling particle");
111 tool.declareProperty(
"LabelPdgIdName",
n->pdgId=
"",
"Attribute for pdgID of labelling particle");
112 tool.declareProperty(
"LabelPositionDPhiName",
n->positionDPhi=
"",
"Attribute for the position dPhi of the labeling particle ");
113 tool.declareProperty(
"LabelPositionDEtaName",
n->positionDEta=
"",
"Attribute for the position dEta of the labeling particle ");
114 tool.declareProperty(
"LabelBarcodeName",
n->barcode=
"",
"Attribute for barcode of labeling particle");
115 tool.declareProperty(
"ChildLxyName",
n->childLxy=
"",
"Attribute for the labeling particle child Lxy");
116 tool.declareProperty(
"ChildPtName",
n->childPt=
"",
"Attribute for the labeling particle child Pt");
117 tool.declareProperty(
"ChildPdgIdName",
n->childPdgId=
"",
"Attribute for the labeling particle child pdg ID");
118 tool.declareProperty(
"ChildPositionDPhiName",
n->childPositionDPhi=
"",
"Attribute for the position dPhi of the labeling particle child");
119 tool.declareProperty(
"ChildPositionDEtaName",
n->childPositionDEta=
"",
"Attribute for the position dEta of the labeling particle child");
◆ isChild()
◆ p3() [1/2]
◆ p3() [2/2]
◆ partDR()
◆ partLxy()
◆ partPdgId()
◆ partPt()
◆ positionDEta()
◆ positionDPhi()
◆ setJetLabels() [1/2]
Definition at line 167 of file ParticleJetLabelCommon.cxx.
173 if (container.size() == 0)
return nullptr;
174 auto itr = std::max_element(container.begin(), container.end(),
175 [](
auto* p1,
auto* p2) {
176 return p1->pt() < p2->pt();
188 labelling_particle = getMaxPtPart(
particles.b);
189 child_particle = getCharmChild(labelling_particle);
192 labelling_particle = getMaxPtPart(
particles.c);
195 labelling_particle = getMaxPtPart(
particles.tau);
207 decs.positionDPhi(
jet) = NAN;
208 decs.positionDEta(
jet) = NAN;
210 decs.childLxy(
jet) = NAN;
211 decs.childPt(
jet) = NAN;
212 decs.childPdgId(
jet) = 0;
213 decs.childPositionDPhi(
jet) = NAN;
214 decs.childPositionDEta(
jet) = NAN;
216 decs.pt(
jet) =
partPt(labelling_particle);
217 decs.Lxy(
jet) =
partLxy(labelling_particle, origin);
222 decs.barcode(
jet) = labelling_particle ?
224 decs.childLxy(
jet) =
partLxy(child_particle, origin);
225 decs.childPt(
jet) =
partPt(child_particle);
232 int double_label = 0;
252 bool hasElectrondecay =
false;
253 bool hasMuondecay =
false;
254 bool hasHadronicdecay =
false;
256 for (
size_t i = 0;
i< itau->nChildren();
i++){
257 if (itau->child(
i)->absPdgId() == 12 || itau->child(
i)->absPdgId() == 14 || itau->child(
i)->absPdgId() == 16)
continue;
258 if (
MC::isMuon(itau->child(
i))) hasMuondecay =
true;
260 else hasHadronicdecay =
true;
266 if (hasHadronicdecay){
268 if (hasMuondecay) double_label = 151513;
270 else if (hasElectrondecay) double_label = 151511;
272 else double_label = 1515;
276 if (hasHadronicdecay) double_label = 15;
281 decs.doubleint(
jet) = double_label;
◆ setJetLabels() [2/2]
◆ signalProcessP3()
bool isChild(const xAOD::TruthParticle *p, const xAOD::TruthParticle *c)
parents
print ("==> buf:",buf)
float partDR(const xAOD::TruthParticle *part, const xAOD::Jet &jet)
constexpr int INVALID_PARTICLE_BARCODE
float positionDEta(const xAOD::TruthParticle *part, const xAOD::Jet &jet, const Amg::Vector3D &origin)
Amg::Vector3D p3(const xAOD::TruthVertex *p)
float pz() const
The z-component of the jet's momentum.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Class describing a truth particle in the MC record.
float py() const
The y-component of the jet's momentum.
void childrenRemoved(const std::vector< const xAOD::TruthParticle * > &parents, std::vector< const xAOD::TruthParticle * > &children)
float partPt(const xAOD::TruthParticle *part)
float px() const
The x-component of the jet's momentum.
Eigen::Matrix< double, 3, 1 > Vector3D
float positionDPhi(const xAOD::TruthParticle *part, const xAOD::Jet &jet, const Amg::Vector3D &origin)
void setJetLabels(const xAOD::Jet &jet, const Particles &particles, const LabelNames &names)
float partLxy(const xAOD::TruthParticle *part, const Amg::Vector3D &origin)
int partPdgId(const xAOD::TruthParticle *part)