 |
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 109 of file ParticleJetLabelCommon.h.
110 tool.declareProperty(
"LabelName",
n->singleint=
"",
"Jet label attribute to be added.");
111 tool.declareProperty(
"DoubleLabelName",
n->doubleint=
"",
"Jet label attribute to be added (with the possibility of up to 2 matched hadrons).");
112 tool.declareProperty(
"LabelPtName",
n->pt=
"",
"Attribute for labelling particle pt");
113 tool.declareProperty(
"LabelLxyName",
n->Lxy=
"",
"Attribute for Lxy of labelling particle");
114 tool.declareProperty(
"LabelDRName",
n->dr=
"",
"Attribute for dR(part, jet) for labelling particle");
115 tool.declareProperty(
"LabelPdgIdName",
n->pdgId=
"",
"Attribute for pdgID of labelling particle");
116 tool.declareProperty(
"LabelPositionDPhiName",
n->positionDPhi=
"",
"Attribute for the position dPhi of the labeling particle ");
117 tool.declareProperty(
"LabelPositionDEtaName",
n->positionDEta=
"",
"Attribute for the position dEta of the labeling particle ");
118 tool.declareProperty(
"LabelBarcodeName",
n->uniqueID=
"",
"Attribute for uniqueID of labeling particle");
119 tool.declareProperty(
"ChildLxyName",
n->childLxy=
"",
"Attribute for the labeling particle child Lxy");
120 tool.declareProperty(
"ChildPtName",
n->childPt=
"",
"Attribute for the labeling particle child Pt");
121 tool.declareProperty(
"ChildPdgIdName",
n->childPdgId=
"",
"Attribute for the labeling particle child pdg ID");
122 tool.declareProperty(
"ChildPositionDPhiName",
n->childPositionDPhi=
"",
"Attribute for the position dPhi of the labeling particle child");
123 tool.declareProperty(
"ChildPositionDEtaName",
n->childPositionDEta=
"",
"Attribute for the position dEta of the labeling particle child");
125 tool.declareProperty(
"useBarcode",
n->useBarcode=
false,
"use barcode instead of uid");
◆ isChild()
◆ p3() [1/2]
◆ p3() [2/2]
◆ partDR()
◆ partLxy()
◆ partPdgId()
◆ partPt()
◆ positionDEta()
◆ positionDPhi()
◆ setJetLabels() [1/2]
Definition at line 164 of file ParticleJetLabelCommon.cxx.
170 if (container.size() == 0)
return nullptr;
171 auto itr = std::max_element(container.begin(), container.end(),
172 [](
auto*
p1,
auto*
p2) {
173 return p1->pt() < p2->pt();
185 labelling_particle = getMaxPtPart(
particles.b);
186 child_particle = getCharmChild(labelling_particle);
189 labelling_particle = getMaxPtPart(
particles.c);
192 labelling_particle = getMaxPtPart(
particles.tau);
204 decs.positionDPhi(
jet) = NAN;
205 decs.positionDEta(
jet) = NAN;
207 decs.childLxy(
jet) = NAN;
208 decs.childPt(
jet) = NAN;
209 decs.childPdgId(
jet) = 0;
210 decs.childPositionDPhi(
jet) = NAN;
211 decs.childPositionDEta(
jet) = NAN;
213 decs.pt(
jet) =
partPt(labelling_particle);
214 decs.Lxy(
jet) =
partLxy(labelling_particle, origin);
219 decs.uniqueID(
jet) = labelling_particle ?
222 decs.childLxy(
jet) =
partLxy(child_particle, origin);
223 decs.childPt(
jet) =
partPt(child_particle);
230 int double_label = 0;
250 bool hasElectrondecay =
false;
251 bool hasMuondecay =
false;
252 bool hasHadronicdecay =
false;
254 for (
size_t i = 0;
i< itau->nChildren();
i++){
255 if (itau->child(
i)->absPdgId() == 12 || itau->child(
i)->absPdgId() == 14 || itau->child(
i)->absPdgId() == 16)
continue;
256 if (
MC::isMuon(itau->child(
i))) hasMuondecay =
true;
258 else hasHadronicdecay =
true;
264 if (hasHadronicdecay){
266 if (hasMuondecay) double_label = 151513;
268 else if (hasElectrondecay) double_label = 151511;
270 else double_label = 1515;
274 if (hasHadronicdecay) double_label = 15;
279 decs.doubleint(
jet) = double_label;
◆ setJetLabels() [2/2]
◆ signalProcessP3()
bool isChild(const xAOD::TruthParticle *p, const xAOD::TruthParticle *c)
parents
print ("==> buf:",buf)
constexpr int INVALID_PARTICLE_ID
float partDR(const xAOD::TruthParticle *part, const xAOD::Jet &jet)
bool is_same_particle(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same particle.
float positionDEta(const xAOD::TruthParticle *part, const xAOD::Jet &jet, const Amg::Vector3D &origin)
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)