ATLAS Offline Software
Loading...
Searching...
No Matches
Tool_DetailsArranger.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9
11
12 return ( i.cachedElement()->bdtPi0Score() > j.cachedElement()->bdtPi0Score() );
13}
14
15
17 asg::AsgTool(name)
18{}
19
21
23
24 m_init=true;
25
27 ATH_CHECK( m_Tool_InformationStore->getInfo_String("FeatureExtractor_VarTypeName_varTypeName_Basic", m_varTypeName_Basic) );
28
29 return StatusCode::SUCCESS;
30}
31
32
33StatusCode PanTau::Tool_DetailsArranger::execute(PanTau::PanTauSeed* inSeed, xAOD::ParticleContainer& pi0Container, xAOD::PFOContainer& neutralPFOContainer) const {
34
37 bool noValidInputTau = inSeed->isOfTechnicalQuality(PanTau::PanTauSeed::t_NoValidInputTau);
38 bool isBadSeed = (noAnyConstituents || noSelConstituents || noValidInputTau);
39
40 //set the PFO link vector and pantau 4-vector to default values for every tau first (xAOD technicality)
41 //if the tau is valid, overwrite with non-default values
42 xAOD::TauJet* tauJet = inSeed->getTauJet();
43
44 if (isBadSeed) {
45 ATH_MSG_DEBUG("This seed is not useable for detail arranging (other than validity flag)");
48 return StatusCode::SUCCESS;
49 }
50
51 ATH_CHECK(arrangePFOLinks(inSeed, tauJet, pi0Container, neutralPFOContainer));
52
53 //Basic variables
59
60 //Final 4-vector
61 tauJet->setP4(xAOD::TauJetParameters::PanTauCellBased, inSeed->getFinalMomentum().Pt(), inSeed->getFinalMomentum().Eta(), inSeed->getFinalMomentum().Phi(), inSeed->getFinalMomentum().M());
62
63 //BDT variables
64 addPanTauDetailToTauJet(inSeed, "Basic_NNeutralConsts",
66 addPanTauDetailToTauJet(inSeed, "Charged_JetMoment_EtDRxTotalEt",
68 addPanTauDetailToTauJet(inSeed, "Charged_StdDev_Et_WrtEtAllConsts",
70 addPanTauDetailToTauJet(inSeed, "Neutral_HLV_SumM",
72 addPanTauDetailToTauJet(inSeed, "Neutral_PID_BDTValues_BDTSort_1",
74 addPanTauDetailToTauJet(inSeed, "Neutral_PID_BDTValues_BDTSort_2",
76 addPanTauDetailToTauJet(inSeed, "Neutral_Ratio_1stBDTEtOverEtAllConsts",
78 addPanTauDetailToTauJet(inSeed, "Neutral_Ratio_EtOverEtAllConsts",
80 addPanTauDetailToTauJet(inSeed, "Neutral_Shots_NPhotonsInSeed",
82 addPanTauDetailToTauJet(inSeed, "Combined_DeltaR1stNeutralTo1stCharged",
84 addPanTauDetailToTauJet(inSeed, "Charged_HLV_SumM",
86
87 return StatusCode::SUCCESS;
88}
89
90
92 const std::string& featName,
94 PanTauDetailsType detailType) const {
95
96 bool isValid;
97 const PanTau::TauFeature* features = inSeed->getFeatures();
98 std::string fullFeatName = "CellBased_" + featName;
99
100 double theValue = features->value(fullFeatName, isValid);
101 if (!isValid) {
102 bool noAnyConstituents = inSeed->isOfTechnicalQuality(PanTau::PanTauSeed::t_NoConstituentsAtAll);
104 bool noValidInputTau = inSeed->isOfTechnicalQuality(PanTau::PanTauSeed::t_NoValidInputTau);
105 bool isBadSeed = (noAnyConstituents || noSelConstituents || noValidInputTau);
106
107 if (!isBadSeed) {
108 ATH_MSG_DEBUG("WARNING --- Problems getting value for feature " << fullFeatName << " from map! This should not happen for this seed!");
109 ATH_MSG_DEBUG("WARNING --- Did the ModeDiscriminator set features used in BDTs that were not found to their default values?");
110 ATH_MSG_DEBUG("NOTE --- This can also happen for seeds with (for example) 0 neutrals when trying to get Neutral_SumM - check seed");
111 }
112 theValue = -1111.;
113 }
114
115 xAOD::TauJet* tauJet = inSeed->getTauJet();
116 int valueToAddInt = -1;
117 float valueToAddFloat = -1.1;
118
119 switch(detailType) {
121 valueToAddInt = static_cast<int>(theValue);
122 tauJet->setPanTauDetail(detailEnum, valueToAddInt);
123 break;
125 valueToAddFloat = static_cast<float>(theValue);
126 tauJet->setPanTauDetail(detailEnum, valueToAddFloat);
127 break;
128 default:
129 ATH_MSG_WARNING("Unknown PanTauDetailType! Please use enum PanTauDetailsType from PanTauAlgs/Tool_DetailsArranger.h.");
130 ATH_MSG_WARNING("!NOT! adding detail named " << featName);
131 break;
132 }
133
134 }
135
136
138
139 //get the PFO links
140 std::vector< ElementLink< xAOD::PFOContainer > > chrgPFOLinks = tauJet->protoChargedPFOLinks();
141 std::vector< ElementLink< xAOD::PFOContainer > > neutralPFOLinks = tauJet->protoNeutralPFOLinks();
142 std::vector< ElementLink< xAOD::PFOContainer > > pi0PFOLinks = CollectConstituentsAsPFOLinks( inSeed, tauJet->protoNeutralPFOLinks(), PanTau::TauConstituent::t_Pi0Neut );
143 std::vector< ElementLink< xAOD::PFOContainer > > preSelected_neutralPFOLinks = CollectConstituentsAsPFOLinks( inSeed, tauJet->protoNeutralPFOLinks(), PanTau::TauConstituent::t_Neutral );
144
145 //clear the default links, just to be safe
146 tauJet->clearChargedPFOLinks();
147 tauJet->clearNeutralPFOLinks();
148 tauJet->clearPi0PFOLinks();
149
150 std::vector< ElementLink< xAOD::PFOContainer > > preLinkPi0PFOLinks = tauJet->pi0PFOLinks();
151
152 // sort PFO links according to pi0 BDT score:
153 std::sort (pi0PFOLinks.begin(), pi0PFOLinks.end(), sortBDTscore);
154 std::sort (preSelected_neutralPFOLinks.begin(), preSelected_neutralPFOLinks.end(), sortBDTscore);
155 std::sort (neutralPFOLinks.begin(), neutralPFOLinks.end(), sortBDTscore);
156
157 // set the masses of all neutrals *and pi0 neutrals* to 0:
158 SetNeutralConstituentVectorMasses(neutralPFOLinks, neutralPFOContainer, 0.);
159
160 // arrange charged & neutral PFOs: they are not changed -> copy from cellbased
161 tauJet->setChargedPFOLinks(chrgPFOLinks);
162 tauJet->setNeutralPFOLinks(neutralPFOLinks);
163
164 tauJet->setDetail(xAOD::TauJetParameters::nCharged, static_cast<int>(chrgPFOLinks.size()));
165
166 //arrange pi0 pfos: depends on decay mode classification
167 int decayModeProto = inSeed->getDecayModeBySubAlg();
168 int decayModeFinal = inSeed->getDecayModeByPanTau();
169
170 if(decayModeFinal == xAOD::TauJetParameters::Mode_Other) {
171 tauJet->setPi0PFOLinks(pi0PFOLinks);
172 SetHLVTau(inSeed, tauJet, m_varTypeName_Basic);
173
174 return StatusCode::SUCCESS;
175 }
176
177 //if pantau sets the same decay mode as the substructure algorithm, just copy the links
178 if(decayModeProto == decayModeFinal) {
179
180 if( decayModeFinal == xAOD::TauJetParameters::Mode_3pXn && pi0PFOLinks.size() > 1 ){
181
182 // assign all neutrals but only one pi0 neutral to Pantau:
183 preLinkPi0PFOLinks.push_back( pi0PFOLinks.at(0) );
184
185 // set all masses correctly:
186 SetNeutralConstituentVectorMasses(preLinkPi0PFOLinks, neutralPFOContainer, MASS_PI0);
187
188 } else {
189
190 // assign the same constituents to Pantau:
191 preLinkPi0PFOLinks=pi0PFOLinks;
192
193 // set all masses correctly:
194 SetNeutralConstituentVectorMasses(preLinkPi0PFOLinks, neutralPFOContainer, MASS_PI0);
195 }
196
197 } else {
198
199 if( decayModeFinal == xAOD::TauJetParameters::Mode_1p1n && decayModeProto == xAOD::TauJetParameters::Mode_1p0n ){
200
201 // add the highest BDT-score neutral from the sub-alg:
202 if(!preSelected_neutralPFOLinks.empty()) preLinkPi0PFOLinks.push_back( preSelected_neutralPFOLinks.at(0) );
203 else ATH_MSG_WARNING("No neutral PFO Links although there should be!!");
204
205 // set the mass:
206 SetNeutralConstituentVectorMasses(preLinkPi0PFOLinks, neutralPFOContainer, MASS_PI0);
207
208 } else if( decayModeFinal == xAOD::TauJetParameters::Mode_1p0n && decayModeProto == xAOD::TauJetParameters::Mode_1p1n ){
209
210 // do nothing (leave the pi0 neutrals list empty)
211
212 } else if( decayModeFinal == xAOD::TauJetParameters::Mode_1pXn && decayModeProto == xAOD::TauJetParameters::Mode_1p1n ){
213
214
215 if( pi0PFOLinks.size() == 1 && HasMultPi0sInOneCluster(pi0PFOLinks.at(0).cachedElement(), decayModeProto) ){
216
217 // assign twice the pi0 mass to the one pi0 PFO:
218 SetNeutralConstituentVectorMasses(pi0PFOLinks, neutralPFOContainer, 2*MASS_PI0);
219
220 // assign the same constituents to Pantau:
221 preLinkPi0PFOLinks=pi0PFOLinks;
222
223 } else {
224
225 // copy all (really only one) pi0s from the sub-alg and add
226 // the highest BDT-score neutral:
227 preLinkPi0PFOLinks=pi0PFOLinks;
228 if(!preSelected_neutralPFOLinks.empty()) preLinkPi0PFOLinks.push_back( preSelected_neutralPFOLinks.at(0) );
229 else ATH_MSG_WARNING("No neutral PFO Links although there should be!!");
230
231 // set the mass:
232 SetNeutralConstituentVectorMasses(preLinkPi0PFOLinks, neutralPFOContainer, MASS_PI0);
233 }
234
235 } else if( decayModeFinal == xAOD::TauJetParameters::Mode_1p1n && decayModeProto == xAOD::TauJetParameters::Mode_1pXn ){
236
237 // copy all (two) pi0s from the sub-alg:
238 preLinkPi0PFOLinks.push_back( pi0PFOLinks.at(0) );
239 preLinkPi0PFOLinks.push_back( pi0PFOLinks.at(1) );
240
241 // set both pi0neutrals to mass 0 (photon mass):
242 SetNeutralConstituentVectorMasses(preLinkPi0PFOLinks, neutralPFOContainer, 0.);
243
244 } else if( decayModeFinal == xAOD::TauJetParameters::Mode_3pXn && decayModeProto == xAOD::TauJetParameters::Mode_3p0n ){
245
246 // add the highest BDT-score neutral from the sub-alg:
247 if(!preSelected_neutralPFOLinks.empty()) preLinkPi0PFOLinks.push_back( preSelected_neutralPFOLinks.at(0) );
248 else ATH_MSG_WARNING("No neutral PFO Links although there should be!!");
249
250 // set the mass:
251 SetNeutralConstituentVectorMasses(preLinkPi0PFOLinks, neutralPFOContainer, MASS_PI0);
252
253 } else if( decayModeFinal == xAOD::TauJetParameters::Mode_3p0n && decayModeProto == xAOD::TauJetParameters::Mode_3pXn ){
254
255 // do nothing (leave the pi0 neutrals list empty)
256 }
257 }
258
259 tauJet->setPi0PFOLinks(preLinkPi0PFOLinks);
260
261 SetHLVTau(inSeed, tauJet, m_varTypeName_Basic);
262
263 std::vector< ElementLink< xAOD::PFOContainer > > finalChrgPFOLinks = tauJet->chargedPFOLinks();
264 std::vector< ElementLink< xAOD::PFOContainer > > finalPi0PFOLinks = tauJet->pi0PFOLinks();
265 std::vector< ElementLink< xAOD::PFOContainer > > finalNeutralPFOLinks = tauJet->neutralPFOLinks();
266
267 // vector of 4-vectors of actual pi0s and a vector with pointers to PFOs:
268 std::vector< TLorentzVector > vec_pi04vec;
269 std::vector< std::vector< ElementLink<xAOD::PFOContainer> > > vec_pi0pfos;
270 createPi0Vectors(tauJet, vec_pi04vec, vec_pi0pfos);
271
272 for(unsigned int itlv=0; itlv!=vec_pi04vec.size(); ++itlv) {
274 pi0Container.push_back(p);
275 p->setPxPyPzE(vec_pi04vec.at(itlv).Px(), vec_pi04vec.at(itlv).Py(), vec_pi04vec.at(itlv).Pz(), vec_pi04vec.at(itlv).E());
276 std::vector< ElementLink< xAOD::PFOContainer > > pfo_link_vector;
277 for( uint ipfo = 0; ipfo != vec_pi0pfos.at(itlv).size(); ++ipfo) {
278 pfo_link_vector.push_back(vec_pi0pfos.at(itlv).at(ipfo));
279 }
280
281 static const SG::Accessor<std::vector< ElementLink< xAOD::PFOContainer > > > accPi0PFOLinks("pi0PFOLinks");
282 accPi0PFOLinks(*p) = pfo_link_vector;
283
285 linkToPi0.toContainedElement(pi0Container, dynamic_cast<xAOD::IParticle*> (p));
286
287 tauJet->addPi0Link(linkToPi0);
288 }
289
290 return StatusCode::SUCCESS;
291}
292
293
294// Calculate final 4-vector:
295void PanTau::Tool_DetailsArranger::SetHLVTau( PanTau::PanTauSeed* inSeed, xAOD::TauJet* tauJet, const std::string& varTypeName_Basic) {
296
297 std::vector< ElementLink< xAOD::PFOContainer > > finalChrgPFOLinks = tauJet->chargedPFOLinks();
298 std::vector< ElementLink< xAOD::PFOContainer > > finalPi0PFOLinks = tauJet->pi0PFOLinks();
299
300 unsigned int NCharged = finalChrgPFOLinks.size();
301 unsigned int NPi0Neut = finalPi0PFOLinks.size();
302
303 TLorentzVector tlv_PanTau_Final;
304 for(unsigned int iPFO=0; iPFO<NCharged; iPFO++) {
305 const xAOD::PFO* pfo = finalChrgPFOLinks.at(iPFO).cachedElement();
306 tlv_PanTau_Final += pfo->p4();
307 }
308 for(unsigned int iPFO=0; iPFO<NPi0Neut; iPFO++) {
309 const xAOD::PFO* pfo = finalPi0PFOLinks.at(iPFO).cachedElement();
310 tlv_PanTau_Final += pfo->p4();
311 }
312
313 inSeed->setFinalMomentum(tlv_PanTau_Final);
314
315 PanTau::TauFeature* featureMap = inSeed->getFeatures();
316 featureMap->addFeature("CellBased_" + varTypeName_Basic + "_FinalMomentumCore_pt", tlv_PanTau_Final.Pt() );
317 featureMap->addFeature("CellBased_" + varTypeName_Basic + "_FinalMomentumCore_eta", tlv_PanTau_Final.Eta() );
318 featureMap->addFeature("CellBased_" + varTypeName_Basic + "_FinalMomentumCore_phi", tlv_PanTau_Final.Phi() );
319 featureMap->addFeature("CellBased_" + varTypeName_Basic + "_FinalMomentumCore_m", tlv_PanTau_Final.M() );
320}
321
322
323bool PanTau::Tool_DetailsArranger::HasMultPi0sInOneCluster(const xAOD::PFO* pfo, int decayModeProto) const {
324
325 // this is only relevant for reco 1p1n modes, hence restrict the output to these modes
326
327 int nPi0sPerCluster = 1;
328
329 // cell-based sets this to 1pXn however below this function is
330 // called with the decayModeProto as evaluated by Pantau!
331 if (decayModeProto != xAOD::TauJetParameters::Mode_1p1n ) return (nPi0sPerCluster > 1);
332
333 if( !pfo->attribute(xAOD::PFODetails::nPi0Proto, nPi0sPerCluster) ) {
334 ATH_MSG_WARNING("Could not retrieve nPi0Proto. Will set it to 1.");
335 nPi0sPerCluster = 1;
336 }
337
338 return (nPi0sPerCluster > 1);
339}
340
341
343
344 TLorentzVector momentum;
345 PanTau::SetP4EEtaPhiM( momentum, neutral_pfo->e(), neutral_pfo->eta(), neutral_pfo->phi(), mass);
346 neutral_pfo->setP4(momentum.Pt(), neutral_pfo->eta(), neutral_pfo->phi(), mass);
347}
348
349
350void PanTau::Tool_DetailsArranger::SetNeutralConstituentVectorMasses(const std::vector< ElementLink<xAOD::PFOContainer> >& neutralPFOLinks, xAOD::PFOContainer& neutralPFOContainer, double mass) {
351
352 for (const auto& link : neutralPFOLinks) {
353 size_t index = link.index();
354 xAOD::PFO* curNeutralPFO = neutralPFOContainer.at(index);
355 SetNeutralConstituentMass(curNeutralPFO, mass);
356 }
357
358 }
359
360
361std::vector< ElementLink< xAOD::PFOContainer > > PanTau::Tool_DetailsArranger::CollectConstituentsAsPFOLinks( PanTau::PanTauSeed* inSeed,
362 const std::vector< ElementLink< xAOD::PFOContainer > >& cellbased_neutralPFOLinks,
364 // collect element links from tau constituents in the Pantau
365 // seed of type "type". cellbased_neutralPFOLinks is only used
366 // to obtain the ElementLinks.
367
368 std::vector< ElementLink< xAOD::PFOContainer > > new_links;
369
370 unsigned int nConstsOfType=0;
371 bool foundIt=false;
372 std::vector<PanTau::TauConstituent*> tauConstituents=inSeed->getConstituentsOfType(type,foundIt);
373
375 ATH_MSG_WARNING("CollectConstituentsAsPFOLinks: Function was called with type = " << type << " , however it was only designed for types t_Pi0Neut and t_Neutral! Returning...");
376 return new_links;
377 }
378
379 for(unsigned int iConst=0; iConst<tauConstituents.size(); iConst++) {
380 bool isOfType = tauConstituents[iConst]->isOfType(type);
381 if(!isOfType) continue;
382
383 // if the requested type is t_Neutral then exclude any t_Pi0Neut
384 // from the list (note: tau constituents that are t_Pi0Neut are
385 // also t_Neutral at the same time):
386 if(type==PanTau::TauConstituent::t_Neutral && tauConstituents[iConst]->isOfType(PanTau::TauConstituent::t_Pi0Neut) ) continue;
387 ++nConstsOfType;
388
389 for(unsigned int iPFO=0; iPFO<cellbased_neutralPFOLinks.size(); iPFO++) {
390 const xAOD::PFO* pfo = cellbased_neutralPFOLinks.at(iPFO).cachedElement();
391
392 if( tauConstituents[iConst]->getPFO() != pfo ) continue;
393
394 new_links.push_back( cellbased_neutralPFOLinks.at(iPFO) );
395 }
396 }
397
398 if( nConstsOfType != new_links.size() ){
399 ATH_MSG_WARNING("CollectConstituentsAsPFOLinks: Couldn't find PFOLinks " << new_links.size() << " for all tau constituents (" << tauConstituents.size() << ")!");
400 }
401
402 return new_links;
403}
404
405
406//______________________________________________________________________________
407void PanTau::Tool_DetailsArranger::createPi0Vectors(xAOD::TauJet* tauJet, std::vector<TLorentzVector>& vPi0s, std::vector< std::vector< ElementLink< xAOD::PFOContainer > > > &vec_pi0pfos)
408{
409 // reset the pi0s
410 vPi0s.clear();
411 vec_pi0pfos.clear();
412
413 // Since the PFO links as they come out of reconstruction, only correspond to
414 // calorimeter clusters, whereas we want the consts_pi0 vectors to correspond
415 // to real pi0s, we need to be careful to collect the PFOs correctly to pi0s
416 // for the cases where number of pi0s does not match to the decay mode:
417 size_t iNumPi0PFO = tauJet->nPi0PFOs();
418
419 int iDecayMode = -1;
421
422 if (iDecayMode == xAOD::TauJetParameters::Mode_1p1n && iNumPi0PFO > 1) {
423
424 // float fMassPi0 = ParticleConstants::piZeroMassInMeV;
425 float fMassPi0Squared = MASS_PI0*MASS_PI0;
426
427 // combine both photons (with 0 mass that is already set) to one pi0 vector:
428 const xAOD::PFO* xPfo1 = tauJet->pi0PFO(0);
429 const xAOD::PFO* xPfo2 = tauJet->pi0PFO(1);
430 vPi0s.push_back(xPfo1->p4() + xPfo2->p4());
431
432 // re-set the mass to one pi0:
433 double dNewMomentum = std::sqrt(vPi0s[0].E() * vPi0s[0].E() - fMassPi0Squared);
434 vPi0s[0].SetPxPyPzE(vPi0s[0].Vect().Unit().Px() * dNewMomentum,
435 vPi0s[0].Vect().Unit().Py() * dNewMomentum,
436 vPi0s[0].Vect().Unit().Pz() * dNewMomentum,
437 vPi0s[0].E());
438
439 std::vector< ElementLink<xAOD::PFOContainer> > pfovec;
440 pfovec.push_back(tauJet->pi0PFOLinks()[0]);
441 pfovec.push_back(tauJet->pi0PFOLinks()[1]);
442 vec_pi0pfos.push_back( pfovec );
443
444 } else if (iDecayMode == xAOD::TauJetParameters::DecayMode::Mode_1pXn && iNumPi0PFO == 1){
445
446 // make a single pi0 from a PFO that contains two pi0s:
447 const xAOD::PFO* xPfo = tauJet->pi0PFO(0);
448 // add the 2-pi0 vector preliminarily to the pi0vector:
449 vPi0s.push_back(xPfo->p4());
450
451 // re-set the mass back to one pi0:
452 double dNewMomentum = std::sqrt( (vPi0s[0].E()/2.)*(vPi0s[0].E()/2.) - MASS_PI0*MASS_PI0 );
453 vPi0s[0].SetVectM(vPi0s[0].Vect().Unit() * dNewMomentum, MASS_PI0 );
454
455 // create another pi0 from the same vector:
456 vPi0s.push_back(vPi0s[0]);
457
458 std::vector< ElementLink<xAOD::PFOContainer> > pfovec;
459 pfovec.push_back(tauJet->pi0PFOLinks()[0]);
460 vec_pi0pfos.push_back( pfovec );
461 vec_pi0pfos.push_back( pfovec );//fix rare crash?
462
463 } else {
464 // if it's not any of the special cases above then just collect the PFOs:
465 for (size_t iPFO = 0; iPFO < iNumPi0PFO; iPFO++){
466 vPi0s.push_back(tauJet->pi0PFO(iPFO)->p4());
467 std::vector< ElementLink<xAOD::PFOContainer> > pfovec;
468 pfovec.push_back(tauJet->pi0PFOLinks()[iPFO]);
469 vec_pi0pfos.push_back( pfovec );
470 }
471 }
472
473}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
unsigned int uint
bool sortBDTscore(const ElementLink< xAOD::PFOContainer > &i, const ElementLink< xAOD::PFOContainer > &j)
const T * at(size_type n) const
Access an element, as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
static StatusCode bindToolHandle(ToolHandle< T > &, std::string)
int getDecayModeByPanTau() const
Definition PanTauSeed.h:225
std::vector< PanTau::TauConstituent * > getConstituentsOfType(int tauConstituent_Type, bool &foundit)
void setFinalMomentum(TLorentzVector finalMom)
Definition PanTauSeed.h:229
bool isOfTechnicalQuality(int pantauSeed_TechnicalQuality) const
const xAOD::TauJet * getTauJet() const
Definition PanTauSeed.h:215
int getDecayModeBySubAlg() const
Definition PanTauSeed.h:224
TLorentzVector getFinalMomentum() const
Definition PanTauSeed.h:223
const PanTau::TauFeature * getFeatures() const
Definition PanTauSeed.h:217
Type
Type enumeration to specify type of this tau constituent.
Class containing features of a tau seed.
Definition TauFeature.h:19
bool addFeature(const std::string &name, const double value)
adds a new feature
double value(const std::string &name, bool &isValid) const
returns the value of the feature given by its name
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
StatusCode arrangePFOLinks(PanTau::PanTauSeed *inSeed, xAOD::TauJet *tauJet, xAOD::ParticleContainer &pi0Container, xAOD::PFOContainer &neutralPFOContainer) const
Gaudi::Property< std::string > m_Tool_InformationStoreName
static void SetHLVTau(PanTau::PanTauSeed *inSeed, xAOD::TauJet *tauJet, const std::string &varTypeName_Basic)
static void SetNeutralConstituentMass(xAOD::PFO *neutral_pfo, double mass)
static void createPi0Vectors(xAOD::TauJet *tauJet, std::vector< TLorentzVector > &vPi0s, std::vector< std::vector< ElementLink< xAOD::PFOContainer > > > &vec_pi0pfos)
ToolHandle< PanTau::ITool_InformationStore > m_Tool_InformationStore
Tool_DetailsArranger(const std::string &name)
bool HasMultPi0sInOneCluster(const xAOD::PFO *pfo, int decayModeProto) const
void addPanTauDetailToTauJet(PanTauSeed *inSeed, const std::string &featName, xAOD::TauJetParameters::PanTauDetails detailEnum, PanTauDetailsType detailType) const
static const constexpr float MASS_PI0
virtual StatusCode execute(PanTau::PanTauSeed *inSeed, xAOD::ParticleContainer &pi0Container, xAOD::PFOContainer &neutralPFOContainer) const
std::vector< ElementLink< xAOD::PFOContainer > > CollectConstituentsAsPFOLinks(PanTau::PanTauSeed *inSeed, const std::vector< ElementLink< xAOD::PFOContainer > > &cellbased_neutralPFOLinks, PanTau::TauConstituent::Type type) const
static void SetNeutralConstituentVectorMasses(const std::vector< ElementLink< xAOD::PFOContainer > > &neutralPFOLinks, xAOD::PFOContainer &neutralPFOContainer, double mass)
Helper class to provide type-safe access to aux data.
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
Class providing the definition of the 4-vector interface.
bool attribute(PFODetails::PFOAttributes AttributeType, T &anAttribute) const
get a PFO Variable via enum
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition PFO_v1.cxx:95
void setP4(const FourMom_t &vec)
set the 4-vec
Definition PFO_v1.cxx:107
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition PFO_v1.cxx:60
virtual double e() const
The total energy of the particle.
Definition PFO_v1.cxx:81
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition PFO_v1.cxx:67
void setPi0PFOLinks(const PFOLinks_t &pi0PFOs)
void setPanTauDetail(TauJetParameters::PanTauDetails panTauDetail, int value)
const PFO * pi0PFO(size_t i) const
Get the pointer to a given pi0 PFO associated with this tau.
void clearPi0PFOLinks()
Remove all pi0 PFOs from the tau.
const PFOLinks_t & pi0PFOLinks() const
const PFOLinks_t & protoChargedPFOLinks() const
cellbased pfos
size_t nPi0PFOs() const
Get the number of pi0 PFO particles associated with this tau.
void clearChargedPFOLinks()
Remove all charged PFOs from the tau.
void addPi0Link(const ElementLink< IParticleContainer > &tr)
add a pi0 link to the tau
void setDetail(TauJetParameters::Detail detail, int value)
void setP4(double pt, double eta, double phi, double m)
Set methods for IParticle values.
void clearNeutralPFOLinks()
Remove all neutral PFOs from the tau.
bool panTauDetail(TauJetParameters::PanTauDetails panTauDetail, int &value) const
Get and set values of pantau details variables via enum.
void setNeutralPFOLinks(const PFOLinks_t &neutralPFOs)
const PFOLinks_t & neutralPFOLinks() const
const PFOLinks_t & chargedPFOLinks() const
default pfos
void setChargedPFOLinks(const PFOLinks_t &chargedPFOs)
const PFOLinks_t & protoNeutralPFOLinks() const
static void SetP4EEtaPhiM(TLorentzVector &hlv, double e, double eta, double phi, double m)
Definition PanTauSeed.h:233
Definition index.py:1
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
PanTauDetails
Enum for tau details (scalar) calculated by pantau.
Definition TauDefs.h:355
@ PanTau_BDTVar_Neutral_PID_BDTValues_BDTSort_2
Definition TauDefs.h:371
@ PanTau_BDTVar_Charged_JetMoment_EtDRxTotalEt
Definition TauDefs.h:367
@ PanTau_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts
Definition TauDefs.h:372
@ PanTau_BDTVar_Neutral_PID_BDTValues_BDTSort_1
Definition TauDefs.h:370
@ PanTau_BDTVar_Combined_DeltaR1stNeutralTo1stCharged
Definition TauDefs.h:375
@ PanTau_BDTVar_Neutral_Ratio_EtOverEtAllConsts
Definition TauDefs.h:373
@ PanTau_BDTVar_Charged_StdDev_Et_WrtEtAllConsts
Definition TauDefs.h:368
@ PanTau_BDTVar_Neutral_Shots_NPhotonsInSeed
Definition TauDefs.h:374
PFO_v1 PFO
Definition of the current "pfo version".
Definition PFO.h:17
PFOContainer_v1 PFOContainer
Definition of the current "pfo container version".
Particle_v1 Particle
Define the latest version of the particle class.
ParticleContainer_v1 ParticleContainer
Define the latest version of the particle class.
TauJet_v3 TauJet
Definition of the current "tau version".