![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
71 return StatusCode::SUCCESS;
77 return StatusCode::SUCCESS;
91 return StatusCode::FAILURE;
97 return StatusCode::FAILURE;
103 return StatusCode::FAILURE;
109 return StatusCode::FAILURE;
115 return StatusCode::FAILURE;
121 return StatusCode::FAILURE;
127 return StatusCode::FAILURE;
132 return StatusCode::FAILURE;
137 return StatusCode::FAILURE;
140 return StatusCode::SUCCESS;
152 return StatusCode::FAILURE;
157 std::vector<const IParticle*> chargedTruth;
158 std::vector<const IParticle*> jetTruth;
159 std::vector<ElementLink<IParticleContainer> > jetconst;
160 jetTruth.reserve(20);
161 for(
const auto *
const jet : *jetCont) {
166 if(!cacc_ghosttruth.isAvailable(*
jet)) {
169 for (
const auto&
el : cacc_ghosttruth(*
jet)) {
173 if(fabs(truth->
charge())>1
e-6) {
177 jetconst.push_back(
el);
178 jetTruth.push_back(truth);
196 return StatusCode::SUCCESS;
208 metCont->
push_back(metCoreChargedCentralTruth);
214 if (!truthEventCont.
isValid()) {
216 return StatusCode::FAILURE;
232 <<
" unique truth particles.");
233 for(
const auto *
const part : *uniqueTruth) {
239 if(truth->
pt()<1 || fabs(truth->
eta())>5)
continue;
241 <<
" status " << truth->
status()
242 <<
" pdgId " << truth->
pdgId() );
243 if(fabs(truth->
charge())>1
e-6) {
245 if(fabs(truth->
eta())<2.5) *metCoreChargedCentralTruth += truth;
246 *metCoreChargedTruth += truth;
248 if(!truth->
isMuon()) *metCoreAllTruth += truth;
251 return StatusCode::SUCCESS;
257 std::vector<const xAOD::IParticle*>& truthlist)
const
259 switch(
obj->type()) {
269 ATH_MSG_WARNING(
"Invalid object type " <<
obj->type() <<
" passed to extractTruthParticle");
273 return StatusCode::FAILURE;
277 std::vector<const xAOD::IParticle*>& truthlist)
const
283 truthlist.push_back(eltruth);
294 if (!truthEventCont.
isValid()) {
296 return StatusCode::SUCCESS;
310 for(
const auto truth : truthParticleCont) {
311 if(truth->pt()<1)
continue;
313 if(!truth->isGenStable())
continue;
316 float etasize = 0.025/2;
317 float phisize = 0.025/2;
318 bool isSuperCluster =
false;
320 switch(
el->caloCluster()->clusterSize()) {
322 etasize *= 5; phisize *=5;
325 etasize *= 3; phisize *=5;
328 etasize *= 3; phisize *=7;
331 isSuperCluster =
true;
336 ATH_MSG_WARNING(
"Unexpected electron cluster size " <<
el->caloCluster()->clusterSize() <<
" received!");
339 float deltaEta(fabs(truth->eta()-
el->caloCluster()->eta()));
340 float deltaPhi(fabs(truth->p4().DeltaPhi(
el->caloCluster()->p4())));
344 for(
const auto& truthobj : truthlist) {
346 if(truth==truth2) {
skip =
true;
break;}
349 truthlist.push_back(truth);
354 return StatusCode::SUCCESS;
358 std::vector<const xAOD::IParticle*>& truthlist)
const
364 truthlist.push_back(phtruth);
388 if (!truthEventCont.
isValid()) {
390 return StatusCode::SUCCESS;
403 for(
const auto truth : truthParticleCont) {
404 if(!truth || truth->pt()<1)
continue;
406 if(!truth->isGenStable())
continue;
409 float etasize(0.025/2);
410 float phisize(0.025/2);
411 bool isSuperCluster =
false;
416 etasize *= 5; phisize *=5;
421 etasize *= 3; phisize *=5;
425 etasize *= 3; phisize *=7;
428 isSuperCluster =
true;
441 for(
const auto& truthobj : truthlist) {
443 if(truth==truth2) {
skip =
true;
break;}
446 truthlist.push_back(truth);
451 return StatusCode::SUCCESS;
455 std::vector<const xAOD::IParticle*>& truthlist)
462 truthlist.push_back(truth);
463 return StatusCode::SUCCESS;
467 std::vector<const xAOD::IParticle*>& truthlist)
const
471 std::vector<ElementLink<IParticleContainer> > jetconst = cacc_ghosttruth(*seedjet);
472 for(
const auto& truth : jetconst) {
477 truthlist.push_back(*truth);
480 return StatusCode::SUCCESS;
490 std::vector<const IParticle*> constlist;
491 constlist.reserve(20);
492 std::vector<const IParticle*> hardObjs_tmp;
493 for(
const auto *
const obj : *hardObjs) {
494 hardObjs_tmp.push_back(
obj);
496 std::sort(hardObjs_tmp.begin(),hardObjs_tmp.end(),greaterPt);
498 for(
const auto&
obj : hardObjs_tmp) {
502 ATH_CHECK( this->extractTruthParticles(
obj,constlist) );
507 for(
const auto& truthobj : constlist) {
510 <<
" status " << truth->
status()
511 <<
" pdgId " << truth->
pdgId()
512 <<
" charge " << truth->
charge());
526 return StatusCode::SUCCESS;
@ SECOND_R
Second Moment in .
StatusCode fillAssocMap(xAOD::MissingETAssociationMap *metMap, const xAOD::IParticleContainer *hardObjs) const final
Electron_v1 Electron
Definition of the current "egamma version".
SG::ReadHandleKey< xAOD::PhotonContainer > m_recoGamKey
@ TruthParticle
Truth particle based.
double getMomentValue(MomentType type) const
Retrieve individual moment - no check for existance! Returns -999 on error.
const_pointer_type cptr()
Dereference the pointer.
StatusCode extractTruthParticles(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
DataVector adapter that acts like it holds const pointers.
static bool addMiscAssociation(MissingETAssociationMap *pMap)
Add an association to hold objects not associated to any jet.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
const TruthParticle * truthParticle(size_t index) const
Get a pointer to one of the truth particles.
bool isGenStable() const
Check if this is generator stable particle.
@ Central
Indicator for MET contribution from the central region.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Helper class to provide constant type-safe access to aux data.
SG::ReadHandleKey< xAOD::JetContainer > m_recoJetKey
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
StatusCode extractTruthFromElectron(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
Class providing the definition of the 4-vector interface.
Vector sum of constituents for subtractive overlap removal.
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventKey
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
ClusterSize clusterSize() const
Get cluster size.
static Types::bitmask_t truthInt(Region reg=Region::FullAcceptance)
Standard bit pattern indicating effective true MET.
static bool insert(MissingETComponentMap *pMap, const MissingET *pMET, const IParticle *pPart, MissingETBase::Types::weight_t weight=MissingETBase::Types::weight_t())
Insert contributing signal or physics object by pointer, with optional kinematic weight object.
StatusCode initialize()
Dummy implementation of the initialisation function.
size_t findIndex(const Jet *pJet) const
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle *, bool debug=false)
return the truthParticle associated to the given IParticle (if any)
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
virtual double eta() const
The pseudorapidity ( ) of the particle.
@ ID
Indicator for MET terms reconstructed from inner detector (ID) tracks alone.
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
const IParticleContainer * getUniqueSignals(const IParticleContainer *signals, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::TrackCluster) const
Extract a container of constituents that are not in jets.
Class describing a tau jet.
const JetLink_t & jetLink() const
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
const T * front() const
Access the first element in the collection as an rvalue.
@ Calo
Indicator for MET terms reconstructed from calorimeter signals alone.
Principal data object for Missing ET.
Class describing a signal truth event in the MC record.
SG::ReadHandleKey< xAOD::TauJetContainer > m_recoTauKey
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Athena::TPCnvVers::Old Athena::TPCnvVers::Old MissingET
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Container for xAOD::MissingET_v1 objects.
size_t nTruthParticles() const
Get the number of truth particles.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
static bool add(MissingETComponentMap *pMap, const MissingET *pMET, MissingETBase::Types::bitmask_t sw=MissingETBase::Status::clearedStatus())
Adding a MissingET object to the map.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
static StatusCode extractTruthFromMuon(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist)
StatusCode extractTruthFromTau(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
Photon_v1 Photon
Definition of the current "egamma version".
struct TBPatternUnitContext Muon
StatusCode associateJets(xAOD::MissingETAssociationMap *metMap) const
SG::ReadHandleKey< xAOD::ElectronContainer > m_recoElKey
int status() const
Status code.
METTruthAssociator()
Default constructor:
#define ATH_MSG_WARNING(x)
DataVector adapter that acts like it holds const pointers.
float cpt() const
Returns .
bool isMuon() const
Whether the particle is a muon (or antimuon)
SG::ReadHandleKey< xAOD::MuonContainer > m_recoMuKey
StatusCode executeTool(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const
virtual double pt() const override final
The transverse momentum ( ) of the particle.
StatusCode extractTruthFromPhoton(const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &truthlist) const
@ Tau
The object is a tau (jet)
bool isInteracting(const T &p)
Identify if the particle with given PDG ID would not interact with the detector, i....
Class describing a TrackParticle.
bool isInDeltaR(const xAOD::IParticle &p1, const xAOD::IParticle &p2, double dR, bool useRapidity=true)
Check if 2 xAOD::IParticle are in a cone.
int pdgId() const
PDG ID code.
static Types::bitmask_t softEvent(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed soft event.
size_type size() const noexcept
Returns the number of elements in the collection.
double charge() const
Physical charge.
StatusCode computeSoftTerms(xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const