|
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 162 of file ParticleJetLabelCommon.cxx.
168 if (container.size() == 0)
return nullptr;
169 auto itr = std::max_element(container.begin(), container.end(),
170 [](
auto*
p1,
auto*
p2) {
171 return p1->pt() < p2->pt();
183 labelling_particle = getMaxPtPart(
particles.b);
184 child_particle = getCharmChild(labelling_particle);
187 labelling_particle = getMaxPtPart(
particles.c);
190 labelling_particle = getMaxPtPart(
particles.tau);
202 decs.positionDPhi(
jet) = NAN;
203 decs.positionDEta(
jet) = NAN;
205 decs.childLxy(
jet) = NAN;
206 decs.childPt(
jet) = NAN;
207 decs.childPdgId(
jet) = 0;
208 decs.childPositionDPhi(
jet) = NAN;
209 decs.childPositionDEta(
jet) = NAN;
211 decs.pt(
jet) =
partPt(labelling_particle);
212 decs.Lxy(
jet) =
partLxy(labelling_particle, origin);
217 decs.barcode(
jet) = labelling_particle ?
219 decs.childLxy(
jet) =
partLxy(child_particle, origin);
220 decs.childPt(
jet) =
partPt(child_particle);
227 int double_label = 0;
247 bool hasElectrondecay =
false;
248 bool hasMuondecay =
false;
249 bool hasHadronicdecay =
false;
251 for (
size_t i = 0;
i< itau->nChildren();
i++){
252 if (itau->child(
i)->absPdgId() == 12 || itau->child(
i)->absPdgId() == 14 || itau->child(
i)->absPdgId() == 16)
continue;
253 if (
MC::isMuon(itau->child(
i))) hasMuondecay =
true;
255 else hasHadronicdecay =
true;
261 if (hasHadronicdecay){
263 if (hasMuondecay) double_label = 151513;
265 else if (hasElectrondecay) double_label = 151511;
267 else double_label = 1515;
271 if (hasHadronicdecay) double_label = 15;
276 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
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)