ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
met::METRebuilder Class Reference

#include <METRebuilder.h>

Inheritance diagram for met::METRebuilder:
Collaboration diagram for met::METRebuilder:

Public Member Functions

 METRebuilder (const std::string &name)
 Constructor with parameters: More...
 
virtual ~METRebuilder ()=default
 Destructor: More...
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual StatusCode execute () override
 
virtual StatusCode copyMET (const std::string &metKey, xAOD::MissingETContainer *metCont, const xAOD::MissingETComponentMap *metMap) override
 
virtual StatusCode rebuildMET (const std::string &metKey, xAOD::MissingETContainer *metCont, const xAOD::IParticleContainer *collection, const xAOD::MissingETComponentMap *metMap, bool doTracks=true) override
 
virtual StatusCode rebuildMET (xAOD::MissingET *met, const xAOD::IParticleContainer *collection, const xAOD::MissingETComponent *component, bool doTracks=true) override
 
virtual StatusCode rebuildJetMET (const std::string &jetKey, const std::string &softKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETComponentMap *metMap, bool doTracks=true) override
 
virtual StatusCode rebuildJetMET (const std::string &jetKey, const std::string &softKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETComponentMap *metMap, bool doTracks, bool doJvfCut, bool pureTrkSoft, const std::string &softJetScale) override
 
virtual StatusCode rebuildJetMET (const std::string &jetKey, const std::string &softKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETComponentMap *metMap, bool doTracks, bool doJvfCut, bool pureTrkSoft, const std::string &softJetScale, float &stvf) override
 
virtual StatusCode rebuildJetMET (xAOD::MissingET *metJet, xAOD::MissingET *metSoft, const xAOD::JetContainer *jets, const xAOD::MissingETComponent *component, bool doTracks, bool doJvfCut, bool pureTrkSoft, const std::string &softJetScale, float &stvf, const xAOD::MissingETComponent *comp_softtrk=0) override
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool acceptTrack (const xAOD::TrackParticle *trk, const xAOD::Vertex *pv) const
 
void associateTracks (const xAOD::IParticle *obj)
 
 METRebuilder ()
 Default constructor: More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< xAOD::MissingETComponentMapm_METMapKey {this, "InputMap", "METMap_RefFinal", ""}
 
SG::ReadHandleKey< xAOD::ElectronContainerm_ElectronContainerKey {this, "EleColl", "ElectronCollection", ""}
 
SG::ReadHandleKey< xAOD::PhotonContainerm_PhotonContainerKey {this, "GammaColl", "PhotonCollection", ""}
 
SG::ReadHandleKey< xAOD::TauJetContainerm_TauJetContainerKey {this, "TauColl", "TauRecContainer", ""}
 
SG::ReadHandleKey< xAOD::MuonContainerm_MuonContainerKey {this, "MuonColl", "Muons", ""}
 
SG::ReadHandleKey< xAOD::JetContainerm_JetContainerKey {this, "JetColl", "AntiKt4LCTopoJets", ""}
 
SG::ReadHandleKey< xAOD::VertexContainerm_PVKey {this, "VertexColl", "PrimaryVertices", ""}
 
SG::WriteHandleKey< xAOD::MissingETContainerm_OutMETKey {this, "OutputContainer", "MET_MyRefFinal", ""}
 
Gaudi::Property< std::string > m_eleTerm {this, "EleTerm", "RefEle", ""}
 
Gaudi::Property< std::string > m_gammaTerm {this, "GammaTerm", "RefGamma", ""}
 
Gaudi::Property< std::string > m_tauTerm {this, "TauTerm", "RefTau", ""}
 
Gaudi::Property< std::string > m_jetTerm {this, "JetTerm", "RefJet", ""}
 
Gaudi::Property< std::string > m_muonTerm {this, "MuonTerm", "Muons", ""}
 
Gaudi::Property< std::string > m_softTerm {this, "SoftTerm", "", ""}
 
Gaudi::Property< std::string > m_softTermType {this, "SoftTermType", "TrackSoftTerm", ""}
 
Gaudi::Property< std::string > m_outMETTerm {this, "OutputTotal", "Final", ""}
 
bool m_doEle {}
 
bool m_doGamma {}
 
bool m_doTau {}
 
bool m_doMuon {}
 
bool m_rebuildEle {}
 
bool m_rebuildGamma {}
 
bool m_rebuildTau {}
 
bool m_rebuildMuon {}
 
Gaudi::Property< double > m_jetPtCut {this, "CalibJetPtCut", 20e3, ""}
 
Gaudi::Property< bool > m_jetDoJvf {this, "DoJetJVFCut", true, ""}
 
Gaudi::Property< double > m_jetJvfCut {this, "CalibJetJvfCut", 0.25, ""}
 
Gaudi::Property< std::string > m_softJetScale {this, "SoftJetScale", "", ""}
 
bool m_doTracks {true}
 
bool m_pureTrkSoft {true}
 
Gaudi::Property< bool > m_doSTVF {this, "ComputeSTVF", false, ""}
 
SG::AuxElement::Decorator< char > m_trkUsedDec {"usedByMET"}
 
Gaudi::Property< bool > m_trk_doPVsel {this, "DoTrackPVSel", true, ""}
 
ToolHandle< InDet::IInDetTrackSelectionToolm_trkseltool
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 56 of file METRebuilder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ METRebuilder() [1/2]

met::METRebuilder::METRebuilder ( const std::string &  name)

Constructor with parameters:

Definition at line 64 of file METRebuilder.cxx.

65  : AsgTool(name),
66  m_trkseltool("")
67  {
68  //
69  // Property declaration
70  //
71  declareProperty( "TrkSelTool", m_trkseltool );
72  }

◆ ~METRebuilder()

virtual met::METRebuilder::~METRebuilder ( )
virtualdefault

Destructor:

◆ METRebuilder() [2/2]

met::METRebuilder::METRebuilder ( )
private

Default constructor:

Member Function Documentation

◆ acceptTrack()

bool met::METRebuilder::acceptTrack ( const xAOD::TrackParticle trk,
const xAOD::Vertex pv 
) const
private

Definition at line 615 of file METRebuilder.cxx.

617  {
618 
619  // if(trk->d0()>m_trk_d0Max) return false;
620  // if(fabs(trk->z0()+trk->vz() - pv->z()) > m_trk_z0Max) return false;
621  if(m_trk_doPVsel && pv) {
622  return static_cast<bool>(m_trkseltool->accept( *trk, pv ));
623  }
624  else {
625  return static_cast<bool>(m_trkseltool->accept( trk ));
626  }
627  }

◆ associateTracks()

void met::METRebuilder::associateTracks ( const xAOD::IParticle obj)
private

Definition at line 629 of file METRebuilder.cxx.

629  {
630 
631  if(obj->type()==xAOD::Type::Electron) {
632  const xAOD::Electron* el = static_cast<const xAOD::Electron*>(obj);
633  for(size_t iTrk=0; iTrk<el->nTrackParticles(); ++iTrk) {
634  const TrackParticle* eltrk = xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF(el->trackParticle(iTrk));
635  if(eltrk) m_trkUsedDec(*eltrk) = true;
636  }
637  }
638  if(obj->type()==xAOD::Type::Photon) {
639  const xAOD::Photon* ph = static_cast<const xAOD::Photon*>(obj);
640  for(size_t iVtx=0; iVtx<ph->nVertices(); ++iVtx) {
641  const xAOD::Vertex* phvx = ph->vertex(iVtx);
642 
643  if(phvx) {
644  for(size_t iTrk=0; iTrk<phvx->nTrackParticles(); ++iTrk) {
646  if(phtrk) m_trkUsedDec(*phtrk) = true;
647  }
648  }
649  }
650  }
651  if(obj->type()==xAOD::Type::Tau) {
652  const xAOD::TauJet* tau = static_cast<const xAOD::TauJet*>(obj);
654  //const std::vector< ElementLink< xAOD::TrackParticleContainer > >& trackLinks = tau->trackLinks();
655  //for(const auto& trklink : trackLinks) {
656  // if(trklink.isValid()) {m_trkUsedDec(**trklink) = true;}
657  // else { ATH_MSG_WARNING("Invalid tau track link"); }
658  //}
659  //const std::vector< ElementLink< xAOD::TrackParticleContainer > >& otherTrackLinks = tau->otherTrackLinks();
660  //for(const auto& trklink : otherTrackLinks) {
661  // if(trklink.isValid()) {
662  // double dR = (*tau->jetLink())->p4().DeltaR((*trklink)->p4());
663  // if(dR<0.2) {
664  // m_trkUsedDec(**trklink) = true;
665  // }
666  // } else { ATH_MSG_WARNING("Invalid tau track link"); }
667  //}
668 
669  // TauJet_v3
670  //all track links dR<0.2 no track quality
671  std::vector<ElementLink< xAOD::TrackParticleContainer> > trackLinks = xAOD::TauHelpers::trackParticleLinks(tau, xAOD::TauJetParameters::coreTrack);
672  for(const auto& trklink : trackLinks) {
673  if(trklink.isValid()) {m_trkUsedDec(**trklink) = true;}
674  else { ATH_MSG_WARNING("Invalid tau track link"); }
675  }
676  }
677  if(obj->type()==xAOD::Type::Muon) {
678  const xAOD::Muon* mu = static_cast<const xAOD::Muon*>(obj);
679  if(mu->inDetTrackParticleLink().isValid()) {
680  m_trkUsedDec(**mu->inDetTrackParticleLink()) = true;
681  }
682  }
683  }

◆ copyMET()

StatusCode met::METRebuilder::copyMET ( const std::string &  metKey,
xAOD::MissingETContainer metCont,
const xAOD::MissingETComponentMap metMap 
)
overridevirtual

Implements IMETRebuilder.

Definition at line 276 of file METRebuilder.cxx.

278  {
279 
280  MissingET* metterm = new MissingET();
281  const MissingET* metterm_ref = MissingETComposition::getMissingET(metMap,metKey);
282  metCont->push_back(metterm);
283  *metterm = *metterm_ref;
284 
285  return StatusCode::SUCCESS;
286  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode met::METRebuilder::execute ( )
overridevirtual

Implements IMETRebuilder.

Definition at line 191 of file METRebuilder.cxx.

192  {
193  ATH_MSG_DEBUG ( name() << " in execute...");
194 
196  if (!METMap.isValid()) {
197  ATH_MSG_WARNING("Unable to retrieve MissingETComponentMap: " << METMap.key());
198  return StatusCode::SUCCESS;
199  }
200 
201  // Create a MissingETContainer with its aux store
203  std::unique_ptr<MissingETContainer> outCont = std::make_unique<xAOD::MissingETContainer>();
204  std::unique_ptr<MissingETAuxContainer> metAuxCont = std::make_unique<xAOD::MissingETAuxContainer>();
205  ATH_CHECK( OutMET.record(std::move(outCont),std::move(metAuxCont) ) );
206 
207  if(m_doEle) {
208  if(m_rebuildEle) {
210  if (!Electrons.isValid()) {
211  ATH_MSG_WARNING("Unable to retrieve ElectronContainer: " << Electrons.key());
212  return StatusCode::SUCCESS;
213  }
214  ATH_CHECK( rebuildMET(m_eleTerm, outCont.get(), Electrons.get(), METMap.get(), m_doTracks) );
215  } else {
216  ATH_CHECK( copyMET(m_eleTerm,outCont.get(),METMap.get()) );
217  }
218  }
219 
220  if(m_doGamma) {
221  if(m_rebuildGamma) {
223  if (!Gamma.isValid()) {
224  ATH_MSG_WARNING("Unable to retrieve GammaContainer: " << Gamma.key());
225  return StatusCode::FAILURE;
226  }
227  ATH_CHECK( rebuildMET(m_gammaTerm, outCont.get(), Gamma.get(), METMap.get(), m_doTracks) );
228  } else {
229  ATH_CHECK( copyMET(m_gammaTerm,outCont.get(),METMap.get()) );
230  }
231  }
232 
233  if(m_doTau) {
234  if(m_rebuildTau) {
236  if (!TauJets.isValid()) {
237  ATH_MSG_WARNING("Unable to retrieve TauJetContainer: " << TauJets.key());
238  return StatusCode::FAILURE;
239  }
240  ATH_CHECK( rebuildMET(m_tauTerm, outCont.get(), TauJets.get(), METMap.get(), m_doTracks) );
241  } else {
242  ATH_CHECK( copyMET(m_tauTerm,outCont.get(),METMap.get()) );
243  }
244  }
245 
246 
247  if(m_doMuon) {
248  if(m_rebuildMuon) {
249  // May need implementation of Eloss correction
250  // Place in separate tool (?)
252  if (!Muons.isValid()) {
253  ATH_MSG_WARNING("Unable to retrieve MuonContainer: " << Muons.key());
254  return StatusCode::FAILURE;
255  }
256  ATH_CHECK( rebuildMET(m_muonTerm, outCont.get(), Muons.get(), METMap.get(), m_doTracks) );
257  } else {
258  ATH_CHECK( copyMET(m_muonTerm,outCont.get(),METMap.get()) );
259  }
260  }
261 
262 
263  // Implementation of the jet/soft term rebuilding
264  // Place in separate tool (?)
266  if (!Jets.isValid()) {
267  ATH_MSG_WARNING("Unable to retrieve JetContainer: " << Jets.key());
268  return StatusCode::FAILURE;
269  }
270  ATH_CHECK( rebuildJetMET(m_jetTerm, m_softTerm, outCont.get(), Jets.get(), METMap.get(), m_doTracks) );
271  ATH_CHECK( buildMETSum(m_outMETTerm, outCont.get()) );
272 
273  return StatusCode::SUCCESS;
274  }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ initialize()

StatusCode met::METRebuilder::initialize ( )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 76 of file METRebuilder.cxx.

77  {
78  ATH_MSG_INFO ("Initializing " << name() << "...");
79 
80  if( m_METMapKey.empty() ) {
81  ATH_MSG_FATAL("Input MissingETComponentMap name must be provided.");
82  return StatusCode::FAILURE;
83  }
84  ATH_MSG_INFO ("Input MET Map: " << m_METMapKey.key());
85 
86  if( m_OutMETKey.empty() ) {
87  ATH_MSG_FATAL("Output MissingETContainer name must be provided.");
88  return StatusCode::FAILURE;
89  }
90  ATH_MSG_INFO ("Output MET Container: " << m_OutMETKey.key());
91 
92  ATH_MSG_INFO ("Configured to rebuild following MET Terms:");
93  if( !m_eleTerm.value().empty() ) {
94  m_doEle = true;
95  if( !m_ElectronContainerKey.empty() ) {
96  m_rebuildEle = true;
97  ATH_MSG_INFO(" Electrons: " << m_ElectronContainerKey.key()
98  << " > " << m_eleTerm.value() );
99  }
100  }
101  if( !m_gammaTerm.value().empty() ) {
102  m_doGamma = true;
103  if( !m_PhotonContainerKey.empty() ) {
104  m_rebuildGamma = true;
105  ATH_MSG_INFO(" Photons: " << m_PhotonContainerKey.key()
106  << " > " << m_gammaTerm.value() );
107  }
108  }
109  if( !m_tauTerm.value().empty() ) {
110  m_doTau = true;
111  if( !m_TauJetContainerKey.empty() ) {
112  m_rebuildTau = true;
113  ATH_MSG_INFO(" Taus: " << m_TauJetContainerKey.key()
114  << " > " << m_tauTerm.value() );
115  }
116  }
117  if( !m_muonTerm.value().empty() ) {
118  m_doMuon = true;
119  if( !m_MuonContainerKey.empty() ) {
120  m_rebuildMuon = true;
121  ATH_MSG_INFO(" Muons: " << m_MuonContainerKey.key()
122  << " > " << m_muonTerm.value() );
123  }
124  }
125  if( !m_JetContainerKey.empty() && !m_jetTerm.value().empty()) {
126  ATH_MSG_INFO(" Jets: " << m_JetContainerKey.key()
127  << " > " << m_jetTerm.value() );
128  } else {
129  ATH_MSG_FATAL("Error in configuration -- jet input and term keys must both be specified.");
130  return StatusCode::FAILURE;
131  }
132  if(m_softTerm.empty()) {
133  if(m_softTermType=="TrackSoftTerm") {
134  m_softTerm = "PVSoftTrk";
135  m_jetDoJvf = true;
136  m_softJetScale = "JetTrackScale";
137  } else if(m_softTermType=="ClusterSoftTerm") {
138  m_softTerm = "SoftClus";
139  m_jetDoJvf = false;
140  m_softJetScale = "JetConstitScaleMomentum";
141  }
142  if(m_softTermType=="Reference") {
143  m_softTerm = "SoftClus";
144  m_jetDoJvf = false;
145  m_softJetScale = "JetConstitScaleMomentum";
146  m_jetPtCut = 0.;
147  }
148  }
149  ATH_MSG_INFO (" Soft: " << m_softTerm);
150 
152  m_pureTrkSoft = (m_softJetScale == "JetTrackScale");
153 
154  if(m_doTracks) {
155  if(m_trkseltool.empty()) {
156 #ifdef ROOTCORE
157  InDet::InDetTrackSelectionTool* trkSelTool = new InDet::InDetTrackSelectionTool("IDTrkSel_MET");
158  ATH_CHECK( trkSelTool->setProperty("maxZ0SinTheta",1.5) );
159  ATH_CHECK( trkSelTool->setProperty("maxD0overSigmaD0",3.) );
160  ATH_CHECK( trkSelTool->setProperty("CutLevel", "TightPrimary") );
161  ATH_CHECK( trkSelTool->initialize() );
162  m_trkseltool = ToolHandle<InDet::IInDetTrackSelectionTool>(trkSelTool);
163 #else
164  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> josvc("JobOptionsSvc",name());
165  std::string toolName = "IDTrkSel_METUtil";
166  ATH_MSG_INFO("METRebuilder: Autoconfiguring " << toolName);
167  m_trkseltool.setTypeAndName("InDet::InDetTrackSelectionTool/"+toolName);
168  std::string fullToolName = "ToolSvc."+toolName;
169  josvc->set(fullToolName + ".maxZ0SinTheta", Gaudi::Utils::toString<float>(1.5));
170  josvc->set(fullToolName + ".maxD0overSigmaD0",Gaudi::Utils::toString<float>(1.5));
171  josvc->set(fullToolName + ".CutLevel","TightPrimary");
172 #endif
173  }
174  ATH_CHECK( m_trkseltool.retrieve() );
175  }
176 
177  // ReadHandleKey(s)
178  ATH_CHECK( m_METMapKey.initialize() );
180  ATH_CHECK( m_PhotonContainerKey.initialize() );
181  ATH_CHECK( m_TauJetContainerKey.initialize() );
182  ATH_CHECK( m_MuonContainerKey.initialize() );
183  ATH_CHECK( m_JetContainerKey.initialize() );
184  ATH_CHECK( m_PVKey.initialize() );
185  // WriteHandleKey(s)
186  ATH_CHECK( m_OutMETKey.initialize() );
187 
188  return StatusCode::SUCCESS;
189  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ rebuildJetMET() [1/4]

StatusCode met::METRebuilder::rebuildJetMET ( const std::string &  jetKey,
const std::string &  softKey,
xAOD::MissingETContainer metCont,
const xAOD::JetContainer jets,
const xAOD::MissingETComponentMap metMap,
bool  doTracks,
bool  doJvfCut,
bool  pureTrkSoft,
const std::string &  softJetScale 
)
overridevirtual

Implements IMETRebuilder.

Definition at line 384 of file METRebuilder.cxx.

392  {
393  float dummy(0);
394  return rebuildJetMET(jetKey,softKey,metCont,jets,metMap,doTracks,
395  doJvfCut,pureTrkSoft,softJetScale,dummy);
396  }

◆ rebuildJetMET() [2/4]

StatusCode met::METRebuilder::rebuildJetMET ( const std::string &  jetKey,
const std::string &  softKey,
xAOD::MissingETContainer metCont,
const xAOD::JetContainer jets,
const xAOD::MissingETComponentMap metMap,
bool  doTracks,
bool  doJvfCut,
bool  pureTrkSoft,
const std::string &  softJetScale,
float &  stvf 
)
overridevirtual

Implements IMETRebuilder.

Definition at line 398 of file METRebuilder.cxx.

407  {
408  const MissingETComponent* component = MissingETComposition::getComponent(metMap,jetKey);
409  if(!component) {
410  ATH_MSG_WARNING("Could not find METComponent for " << jetKey << " in MET Map!");
411  return StatusCode::FAILURE;
412  }
413  MissingET* metJet = nullptr; // new MissingET(0.,0.,0.,jetKey,component->metObject()->source());
414  if(fillMET(metJet, metCont, jetKey, component->metObject()->source()) != StatusCode::SUCCESS){
415  ATH_MSG_ERROR("failed to fill MET term");
416  return StatusCode::FAILURE;
417  }
418  // metCont->push_back(metJet);
419  ATH_CHECK( copyMET(softKey,metCont,metMap) );
420  // copy constructor needs correcting.
421  MissingET* metSoft = (*metCont)[softKey];
422  const MissingETComponent* comp_softtrk(nullptr);
423  if(m_doSTVF) {
425  if(!comp_softtrk) {
426  ATH_MSG_WARNING("Could not retrieve soft track component -- STVF calculation failed!");
427  return StatusCode::FAILURE;
428  }
429  }
430  return rebuildJetMET(metJet,metSoft,jets,component,doTracks,
431  doJvfCut,pureTrkSoft,softJetScale,
432  stvf,comp_softtrk);
433  }

◆ rebuildJetMET() [3/4]

virtual StatusCode met::METRebuilder::rebuildJetMET ( const std::string &  jetKey,
const std::string &  softKey,
xAOD::MissingETContainer metCont,
const xAOD::JetContainer jets,
const xAOD::MissingETComponentMap metMap,
bool  doTracks = true 
)
inlineoverridevirtual

Implements IMETRebuilder.

Definition at line 96 of file METRebuilder.h.

102  {
103  return rebuildJetMET(jetKey,softKey,metCont,jets,metMap,doTracks,
105  }

◆ rebuildJetMET() [4/4]

StatusCode met::METRebuilder::rebuildJetMET ( xAOD::MissingET metJet,
xAOD::MissingET metSoft,
const xAOD::JetContainer jets,
const xAOD::MissingETComponent component,
bool  doTracks,
bool  doJvfCut,
bool  pureTrkSoft,
const std::string &  softJetScale,
float &  stvf,
const xAOD::MissingETComponent comp_softtrk = 0 
)
overridevirtual

Implements IMETRebuilder.

Definition at line 435 of file METRebuilder.cxx.

444  {
445 
446  if(component->empty()) return StatusCode::SUCCESS;
447 
448  // const VertexContainer* vtxCont = 0;
450 
451  const Vertex* pv = nullptr;
452 
453 
454  if(doJvfCut || (m_trk_doPVsel && doTracks)) {
455  if (!PV.isValid()) {
456  ATH_MSG_WARNING("Unable to retrieve input primary vertex container");
457 
458  return StatusCode::FAILURE;
459  }
460 
461  for(const auto *const vx : *PV) {
462  if(vx->vertexType()==VxType::PriVtx)
463 
464  {pv = vx; break;}
465 
466  }
467  if(!pv) {
468  ATH_MSG_WARNING("Event has no primary vertex");
469  return StatusCode::SUCCESS;
470  } else{
471  ATH_MSG_DEBUG("Main primary vertex has z = " << pv->z());
472  }
473  }
474 
475 
476  stvf = 0.;
477  float trksumpt_allsoft(0.);
478  if(m_doSTVF) {
479  if(!comp_softtrk) {
480  ATH_MSG_WARNING("Could not retrieve soft track component -- STVF calculation failed!");
481  return StatusCode::FAILURE;
482  }
483  trksumpt_allsoft += comp_softtrk->metObject()->sumet();
484  }
485 
486  const IParticleContainer* testCollection = static_cast<const IParticleContainer*>(component->objects().front()->container());
487  const IParticleContainer* collcast = static_cast<const IParticleContainer*>(jets);
488  bool originalInputs = (testCollection == collcast);
489  bool matchCollection = true;
490  if(!jets->empty()) {
491  // Consistency test: check that the collection supplied is the original one
492  // used for MET reconstruction, or is derived from this collection
493  if(!originalInputs) {
494  const IParticle* pJet = jets->front();
495  if(!objLinkAcc.isAvailable(*pJet)) {
496  ATH_MSG_WARNING("Modified container provided without originalObjectLink -- cannot proceed.");
497  matchCollection = false;
498  } else {
499  const IParticleContainer* sourceCollection = static_cast<const IParticleContainer*>((*objLinkAcc(*pJet))->container());
500  matchCollection = (sourceCollection == testCollection);
501  }
502  }
503  }
504  if(!matchCollection) {
505  ATH_MSG_WARNING("Problem with input object container -- skipping these terms.");
506  return StatusCode::SUCCESS;
507  }
508  // 1. Loop over the jets in the collection
509  // 2. Find them or their originals in the METComponent
510  // 3. Add to the MET term with appropriate weights
511  for( JetContainer::const_iterator iJet=jets->begin();
512  iJet!=jets->end(); ++iJet ) {
513 
514  const xAOD::IParticle* pJet = *iJet;
515  if(!originalInputs) pJet = *objLinkAcc(*pJet);
516 
517  if(component->findIndex(pJet) != MissingETBase::Numerical::invalidIndex()) {
518 
519  MissingETBase::Types::weight_t jetWeight = component->weight(pJet);
520  bool passJVF = true;
521  if(doJvfCut) {
522  vector<float> jvf;
523  (*iJet)->getAttribute<vector<float> >(xAOD::JetAttribute::JVF,jvf);
524  passJVF = (*iJet)->pt()>50e3 || fabs((*iJet)->eta())>2.4 || fabs(jvf[pv->index()])>m_jetJvfCut;
525  ATH_MSG_VERBOSE("Jet with pt " << (*iJet)->pt() << " has jvf = " << jvf[pv->index()]);
526  }
527 
528  if((*iJet)->pt()>m_jetPtCut && passJVF) {
529 
530  ATH_MSG_VERBOSE("Retain jet with pt " << (*iJet)->pt() << " at full scale.");
531 
532  metJet->add((*iJet)->px()*jetWeight.wpx(),
533  (*iJet)->py()*jetWeight.wpy(),
534  (*iJet)->pt()*jetWeight.wet());
535  } // minimum pt cut for jet calibration
536  else {
537  double trkjetpx(0), trkjetpy(0), trkjetpt(0);
538  if(doTracks) {
539  ATH_MSG_VERBOSE("Add tracks from jet with pt " << (*iJet)->pt());
540  vector<const TrackParticle*> jettracks = (*iJet)->getAssociatedObjects<TrackParticle>(xAOD::JetAttribute::GhostTrack);
541  ATH_MSG_VERBOSE("Got jet tracks");
542  for(const auto& trk : jettracks) {
543  if(!trk) continue;
544  bool badTrack = false;
545  if( (fabs((trk)->eta())<1.5 && (trk)->pt()>200e3) ||
546  (fabs((trk)->eta())>=1.5 && (trk)->pt()>120e3) ) {
547  // Get relative error on qoverp
548  float Rerr = Amg::error(trk->definingParametersCovMatrix(),4)/fabs(trk->qOverP());
549  // Simplified cut -- remove tracks that are more energetic than the jet
550  if(Rerr>0.4 || trk->pt()>2*(*iJet)->pt()) badTrack = true;
551  } // additional cuts against high pt mismeasured tracks
552  bool uniqueTrack = true;
553  uniqueTrack = !m_trkUsedDec(*trk);
554  if(!badTrack && uniqueTrack) {
555  if(acceptTrack(trk,pv)) {
556  ATH_MSG_VERBOSE(" + track with pt " << trk->pt());
557  trkjetpx += trk->pt()*cos(trk->phi());
558  trkjetpy += trk->pt()*sin(trk->phi());
559  trkjetpt += trk->pt();
560  } else {
561  ATH_MSG_VERBOSE(" - track failed badtrack/uniqueness/PV");
562  if(m_doSTVF && acceptTrack(trk,nullptr)) {
563  trksumpt_allsoft += trk->pt();
564  } // STVF
565  } // track selection
566  } // reject bad/duplicate tracks
567  } // track loop
568  } // track-based soft term
569  if(pureTrkSoft){
570  metSoft->add(trkjetpx,trkjetpy,trkjetpt);
571  } else {
572  // just add the weighted constituent-scale jet
573  xAOD::JetFourMom_t jetP = (*iJet)->jetP4(softJetScale);
574  ATH_MSG_VERBOSE("Soft jet pt = " << jetP.Pt() << ", track pt = " << trkjetpt);
575  if(trkjetpt>jetP.Pt() || !passJVF) { // use tracks if higher scale than calo jet or fail JVF cut in central region
576  ATH_MSG_VERBOSE("Add jet with pt " << (*iJet)->pt()
577  << " at track scale (pt = " << trkjetpt << ").");
578  metSoft->add(trkjetpx,trkjetpy,trkjetpt);
579  } else {
580  ATH_MSG_VERBOSE("Add jet with pt " << (*iJet)->pt()
581  << " at constituent scale (pt = " << jetP.Pt() << ").");
582  metSoft->add(jetP.Px()*jetWeight.wpx(),
583  jetP.Py()*jetWeight.wpy(),
584  jetP.Pt()*jetWeight.wet());
585  } // otherwise, use calo jet at chosen scale
586  } // cluster-based soft term
587  } // jets below threshold should be added to the soft terms
588  } // used jet in MET
589  }
590 
591  ATH_MSG_DEBUG( "Original jet MET --"
592  << " mpx: " << component->metObject()->mpx()
593  << " mpy: " << component->metObject()->mpy()
594  );
595  ATH_MSG_DEBUG( "Rebuilt jet MET --"
596  << " mpx: " << metJet->mpx()
597  << " mpy: " << metJet->mpy()
598  );
599 
600  ATH_MSG_DEBUG( "Rebuilt MET soft --"
601  << " mpx: " << metSoft->mpx()
602  << " mpy: " << metSoft->mpy()
603  );
604 
605  if(m_doSTVF) stvf = metSoft->sumet()/trksumpt_allsoft;
606 
607  return StatusCode::SUCCESS;
608  }

◆ rebuildMET() [1/2]

StatusCode met::METRebuilder::rebuildMET ( const std::string &  metKey,
xAOD::MissingETContainer metCont,
const xAOD::IParticleContainer collection,
const xAOD::MissingETComponentMap metMap,
bool  doTracks = true 
)
overridevirtual

Implements IMETRebuilder.

Definition at line 290 of file METRebuilder.cxx.

294  {
295  ATH_MSG_DEBUG("Rebuild MET term: " << metKey);
296  const MissingETComponent* component = MissingETComposition::getComponent(metMap,metKey);
297  if(!component) {
298  ATH_MSG_WARNING("Could not find METComponent for " << metKey << " in MET Map!");
299  return StatusCode::FAILURE;
300  }
301  MissingET* met = nullptr; //= new MissingET(0.,0.,0.,metKey,component->metObject()->source());
302  if(fillMET(met, metCont, metKey, component->metObject()->source()) != StatusCode::SUCCESS){
303  ATH_MSG_ERROR("failed to fill MET term");
304  return StatusCode::FAILURE;
305  }
306  // metCont->push_back(met);
307  return rebuildMET(met,collection,component,doTracks);
308  }

◆ rebuildMET() [2/2]

StatusCode met::METRebuilder::rebuildMET ( xAOD::MissingET met,
const xAOD::IParticleContainer collection,
const xAOD::MissingETComponent component,
bool  doTracks = true 
)
overridevirtual

Implements IMETRebuilder.

Definition at line 310 of file METRebuilder.cxx.

313  {
314 
315  if(component->empty()) return StatusCode::SUCCESS;
316 
317  ATH_MSG_VERBOSE("Rebuilding MET term " << component->metObject()->name());
318 
319  const IParticleContainer* testCollection = dynamic_cast<const IParticleContainer*>(component->objects().front()->container());
320  bool originalInputs = (testCollection == collection);
321  bool matchCollection = true;
322  if(!collection->empty()) {
323  // Consistency test: check that the collection supplied is the original one
324  // used for MET reconstruction, or is derived from this collection
325  if(!originalInputs) {
326  const IParticle* pObj = collection->front();
327  if(!objLinkAcc.isAvailable(*pObj)) {
328  ATH_MSG_WARNING("Modified container provided without originalObjectLink -- cannot proceed.");
329  matchCollection = false;
330  } else {
331  const IParticleContainer* sourceCollection = dynamic_cast<const IParticleContainer*>((*objLinkAcc(*pObj))->container());
332  matchCollection = (sourceCollection == testCollection);
333  }
334  }
335  if(!matchCollection) {
336  ATH_MSG_WARNING("Problem with input object container -- skipping this term.");
337  return StatusCode::SUCCESS;
338  }
339  }
340 
341  // Method flow:
342  // 1. Loop over the objects in the collection
343  // 2. Find them or their originals in the METComponent
344  // 3. Add to the MET term with appropriate weights
345 
346  for( IParticleContainer::const_iterator iObj=collection->begin();
347  iObj!=collection->end(); ++iObj ) {
348 
349  const IParticle* pObj = *iObj;
350  // check if this is a copy - if so, get the original object pointer
351  if(!originalInputs) pObj = *objLinkAcc(*pObj);
352 
353  if(component->findIndex(pObj) != MissingETBase::Numerical::invalidIndex()) {
354  MissingETBase::Types::weight_t objWeight = component->weight(pObj);
355  ATH_MSG_VERBOSE( "Object with pt " << (*iObj)->pt() << " has weight " << objWeight.wet() );
356 
357  if(doTracks) {
358  associateTracks(*iObj);
359  }
360 
361  met->add((*iObj)->pt()*cos((*iObj)->phi())*objWeight.wpx(),
362  (*iObj)->pt()*sin((*iObj)->phi())*objWeight.wpy(),
363  (*iObj)->pt()*objWeight.wet());
364  } // used object in MET
365  else {
366  ATH_MSG_VERBOSE( "Object with pt " << (*iObj)->pt() << " not found." );
367  }
368  }
369 
370  ATH_MSG_DEBUG( "Original " << component->metObject()->name() << " MET --"
371  << " mpx: " << component->metObject()->mpx()
372  << " mpy: " << component->metObject()->mpy()
373  );
374  ATH_MSG_DEBUG( "Rebuilt " << component->metObject()->name() << " MET --"
375  << " mpx: " << met->mpx()
376  << " mpy: " << met->mpy()
377  );
378 
379  return StatusCode::SUCCESS;
380  }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doEle

bool met::METRebuilder::m_doEle {}
private

Definition at line 173 of file METRebuilder.h.

◆ m_doGamma

bool met::METRebuilder::m_doGamma {}
private

Definition at line 174 of file METRebuilder.h.

◆ m_doMuon

bool met::METRebuilder::m_doMuon {}
private

Definition at line 176 of file METRebuilder.h.

◆ m_doSTVF

Gaudi::Property<bool> met::METRebuilder::m_doSTVF {this, "ComputeSTVF", false, ""}
private

Definition at line 190 of file METRebuilder.h.

◆ m_doTau

bool met::METRebuilder::m_doTau {}
private

Definition at line 175 of file METRebuilder.h.

◆ m_doTracks

bool met::METRebuilder::m_doTracks {true}
private

Definition at line 188 of file METRebuilder.h.

◆ m_ElectronContainerKey

SG::ReadHandleKey<xAOD::ElectronContainer> met::METRebuilder::m_ElectronContainerKey {this, "EleColl", "ElectronCollection", ""}
private

Definition at line 152 of file METRebuilder.h.

◆ m_eleTerm

Gaudi::Property<std::string> met::METRebuilder::m_eleTerm {this, "EleTerm", "RefEle", ""}
private

Definition at line 162 of file METRebuilder.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_gammaTerm

Gaudi::Property<std::string> met::METRebuilder::m_gammaTerm {this, "GammaTerm", "RefGamma", ""}
private

Definition at line 163 of file METRebuilder.h.

◆ m_JetContainerKey

SG::ReadHandleKey<xAOD::JetContainer> met::METRebuilder::m_JetContainerKey {this, "JetColl", "AntiKt4LCTopoJets", ""}
private

Definition at line 156 of file METRebuilder.h.

◆ m_jetDoJvf

Gaudi::Property<bool> met::METRebuilder::m_jetDoJvf {this, "DoJetJVFCut", true, ""}
private

Definition at line 185 of file METRebuilder.h.

◆ m_jetJvfCut

Gaudi::Property<double> met::METRebuilder::m_jetJvfCut {this, "CalibJetJvfCut", 0.25, ""}
private

Definition at line 186 of file METRebuilder.h.

◆ m_jetPtCut

Gaudi::Property<double> met::METRebuilder::m_jetPtCut {this, "CalibJetPtCut", 20e3, ""}
private

Definition at line 184 of file METRebuilder.h.

◆ m_jetTerm

Gaudi::Property<std::string> met::METRebuilder::m_jetTerm {this, "JetTerm", "RefJet", ""}
private

Definition at line 165 of file METRebuilder.h.

◆ m_METMapKey

SG::ReadHandleKey<xAOD::MissingETComponentMap> met::METRebuilder::m_METMapKey {this, "InputMap", "METMap_RefFinal", ""}
private

Definition at line 151 of file METRebuilder.h.

◆ m_MuonContainerKey

SG::ReadHandleKey<xAOD::MuonContainer> met::METRebuilder::m_MuonContainerKey {this, "MuonColl", "Muons", ""}
private

Definition at line 155 of file METRebuilder.h.

◆ m_muonTerm

Gaudi::Property<std::string> met::METRebuilder::m_muonTerm {this, "MuonTerm", "Muons", ""}
private

Definition at line 166 of file METRebuilder.h.

◆ m_OutMETKey

SG::WriteHandleKey<xAOD::MissingETContainer> met::METRebuilder::m_OutMETKey {this, "OutputContainer", "MET_MyRefFinal", ""}
private

Definition at line 159 of file METRebuilder.h.

◆ m_outMETTerm

Gaudi::Property<std::string> met::METRebuilder::m_outMETTerm {this, "OutputTotal", "Final", ""}
private

Definition at line 170 of file METRebuilder.h.

◆ m_PhotonContainerKey

SG::ReadHandleKey<xAOD::PhotonContainer> met::METRebuilder::m_PhotonContainerKey {this, "GammaColl", "PhotonCollection", ""}
private

Definition at line 153 of file METRebuilder.h.

◆ m_pureTrkSoft

bool met::METRebuilder::m_pureTrkSoft {true}
private

Definition at line 189 of file METRebuilder.h.

◆ m_PVKey

SG::ReadHandleKey<xAOD::VertexContainer> met::METRebuilder::m_PVKey {this, "VertexColl", "PrimaryVertices", ""}
private

Definition at line 157 of file METRebuilder.h.

◆ m_rebuildEle

bool met::METRebuilder::m_rebuildEle {}
private

Definition at line 178 of file METRebuilder.h.

◆ m_rebuildGamma

bool met::METRebuilder::m_rebuildGamma {}
private

Definition at line 179 of file METRebuilder.h.

◆ m_rebuildMuon

bool met::METRebuilder::m_rebuildMuon {}
private

Definition at line 181 of file METRebuilder.h.

◆ m_rebuildTau

bool met::METRebuilder::m_rebuildTau {}
private

Definition at line 180 of file METRebuilder.h.

◆ m_softJetScale

Gaudi::Property<std::string> met::METRebuilder::m_softJetScale {this, "SoftJetScale", "", ""}
private

Definition at line 187 of file METRebuilder.h.

◆ m_softTerm

Gaudi::Property<std::string> met::METRebuilder::m_softTerm {this, "SoftTerm", "", ""}
private

Definition at line 167 of file METRebuilder.h.

◆ m_softTermType

Gaudi::Property<std::string> met::METRebuilder::m_softTermType {this, "SoftTermType", "TrackSoftTerm", ""}
private

Definition at line 168 of file METRebuilder.h.

◆ m_TauJetContainerKey

SG::ReadHandleKey<xAOD::TauJetContainer> met::METRebuilder::m_TauJetContainerKey {this, "TauColl", "TauRecContainer", ""}
private

Definition at line 154 of file METRebuilder.h.

◆ m_tauTerm

Gaudi::Property<std::string> met::METRebuilder::m_tauTerm {this, "TauTerm", "RefTau", ""}
private

Definition at line 164 of file METRebuilder.h.

◆ m_trk_doPVsel

Gaudi::Property<bool> met::METRebuilder::m_trk_doPVsel {this, "DoTrackPVSel", true, ""}
private

Definition at line 195 of file METRebuilder.h.

◆ m_trkseltool

ToolHandle<InDet::IInDetTrackSelectionTool> met::METRebuilder::m_trkseltool
private

Definition at line 196 of file METRebuilder.h.

◆ m_trkUsedDec

SG::AuxElement::Decorator<char> met::METRebuilder::m_trkUsedDec {"usedByMET"}
private

Definition at line 193 of file METRebuilder.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
met::METRebuilder::m_PVKey
SG::ReadHandleKey< xAOD::VertexContainer > m_PVKey
Definition: METRebuilder.h:157
xAOD::Photon_v1::nVertices
size_t nVertices() const
Return the number xAOD::Vertex/vertices that match the photon candidate.
test_pyathena.eta
eta
Definition: test_pyathena.py:10
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
xAOD::Vertex_v1::nTrackParticles
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Definition: Vertex_v1.cxx:270
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
met::METRebuilder::m_gammaTerm
Gaudi::Property< std::string > m_gammaTerm
Definition: METRebuilder.h:163
met::METRebuilder::m_trkUsedDec
SG::AuxElement::Decorator< char > m_trkUsedDec
Definition: METRebuilder.h:193
xAOD::MissingET_v1::sumet
float sumet() const
Returns.
xAOD::MissingETComponent_v1::weight
Weight weight(const IParticle *pPart) const
Get kinematic weight for a given object.
met::METRebuilder::m_doTau
bool m_doTau
Definition: METRebuilder.h:175
met::METRebuilder::m_METMapKey
SG::ReadHandleKey< xAOD::MissingETComponentMap > m_METMapKey
Definition: METRebuilder.h:151
met::METRebuilder::m_doGamma
bool m_doGamma
Definition: METRebuilder.h:174
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Jets
Definition: Jets.py:1
xAOD::MissingETComponent_v1::Weight::wet
double wet() const
Returns .
test_pyathena.pt
pt
Definition: test_pyathena.py:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
InDet::InDetTrackSelectionTool::initialize
virtual StatusCode initialize() override
Function initialising the tool.
Definition: InDetTrackSelectionTool.cxx:103
met::METRebuilder::m_rebuildTau
bool m_rebuildTau
Definition: METRebuilder.h:180
VP1PartSpect::Gamma
@ Gamma
Definition: VP1PartSpectFlags.h:22
met::METRebuilder::m_jetJvfCut
Gaudi::Property< double > m_jetJvfCut
Definition: METRebuilder.h:186
MissingETBase::Numerical::invalidIndex
static size_t invalidIndex()
Access invalid index indicator.
Definition: MissingETBase.h:103
objLinkAcc
const ort::objLinkAccessor_t objLinkAcc("overlapObject")
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
MissingETBase::Source::idTrack
static Types::bitmask_t idTrack(Region reg=Region::FullAcceptance)
Bit pattern indicating a ID Track MET term.
Definition: MissingETBase.h:366
MissingETBase::Source::Type::SoftEvent
@ SoftEvent
Indicator for the MET term from reconstructed soft event signals (tracks, clusters) or MC truth parti...
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
met::METRebuilder::m_TauJetContainerKey
SG::ReadHandleKey< xAOD::TauJetContainer > m_TauJetContainerKey
Definition: METRebuilder.h:154
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
met::buildMETSum
StatusCode buildMETSum(const std::string &totalName, xAOD::MissingETContainer *metCont)
Definition: METHelpers.cxx:64
met::METRebuilder::m_softJetScale
Gaudi::Property< std::string > m_softJetScale
Definition: METRebuilder.h:187
xAOD::MissingETComposition::getComponent
static const MissingETComponent * getComponent(const MissingETComponentMap *pMap, const IParticle *pPart)
Access non-modifiable contribution object.
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:122
met::METRebuilder::m_doEle
bool m_doEle
Definition: METRebuilder.h:173
met::METRebuilder::rebuildJetMET
virtual StatusCode rebuildJetMET(const std::string &jetKey, const std::string &softKey, xAOD::MissingETContainer *metCont, const xAOD::JetContainer *jets, const xAOD::MissingETComponentMap *metMap, bool doTracks=true) override
Definition: METRebuilder.h:96
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
met::METRebuilder::m_muonTerm
Gaudi::Property< std::string > m_muonTerm
Definition: METRebuilder.h:166
met
Definition: IMETSignificance.h:24
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
met::METRebuilder::m_jetDoJvf
Gaudi::Property< bool > m_jetDoJvf
Definition: METRebuilder.h:185
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
met::METRebuilder::m_softTerm
Gaudi::Property< std::string > m_softTerm
Definition: METRebuilder.h:167
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
met::METRebuilder::m_rebuildEle
bool m_rebuildEle
Definition: METRebuilder.h:178
vector< float >
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
met::METRebuilder::m_MuonContainerKey
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
Definition: METRebuilder.h:155
met::METRebuilder::m_jetTerm
Gaudi::Property< std::string > m_jetTerm
Definition: METRebuilder.h:165
met::METRebuilder::m_JetContainerKey
SG::ReadHandleKey< xAOD::JetContainer > m_JetContainerKey
Definition: METRebuilder.h:156
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
met::METRebuilder::m_doTracks
bool m_doTracks
Definition: METRebuilder.h:188
DataVector::front
const T * front() const
Access the first element in the collection as an rvalue.
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
xAOD::TauHelpers::trackParticleLinks
std::vector< ElementLink< xAOD::TrackParticleContainer > > trackParticleLinks(const xAOD::TauJet *tau, xAOD::TauJetParameters::TauTrackFlag flag=xAOD::TauJetParameters::TauTrackFlag::classifiedCharged)
Definition: TauxAODHelpers.cxx:22
xAOD::MissingETComposition::getMissingET
static const MissingET * getMissingET(const MissingETComponentMap *pMap, const IParticle *pPart)
Definition: Event/xAOD/xAODMissingET/Root/MissingETComposition.cxx:170
xAOD::MissingET_v1::mpx
float mpx() const
Returns .
met::METRebuilder::m_trk_doPVsel
Gaudi::Property< bool > m_trk_doPVsel
Definition: METRebuilder.h:195
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
xAOD::JetAttribute::JVF
@ JVF
Definition: JetAttributes.h:99
xAOD::Vertex_v1::trackParticle
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Definition: Vertex_v1.cxx:249
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::TauJetParameters::coreTrack
@ coreTrack
Definition: TauDefs.h:403
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::MissingETComponent_v1::Weight::wpy
double wpy() const
Returns .
xAOD::MissingET_v1::name
const std::string & name() const
Identifier getters.
MissingET
Athena::TPCnvVers::Old Athena::TPCnvVers::Old MissingET
Definition: RecTPCnv.cxx:64
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAOD::MissingET_v1::add
void add(const IParticle *particle)
Add particle kinematics to MET.
Definition: MissingET_v1.cxx:77
xAOD::JetFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition: JetTypes.h:17
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
met::METRebuilder::copyMET
virtual StatusCode copyMET(const std::string &metKey, xAOD::MissingETContainer *metCont, const xAOD::MissingETComponentMap *metMap) override
Definition: METRebuilder.cxx:276
met::METRebuilder::m_doSTVF
Gaudi::Property< bool > m_doSTVF
Definition: METRebuilder.h:190
met::METRebuilder::m_eleTerm
Gaudi::Property< std::string > m_eleTerm
Definition: METRebuilder.h:162
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
met::METRebuilder::m_doMuon
bool m_doMuon
Definition: METRebuilder.h:176
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAOD::EgammaHelpers::getOriginalTrackParticleFromGSF
const xAOD::TrackParticle * getOriginalTrackParticleFromGSF(const xAOD::TrackParticle *trkPar)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the GSF Track Particle...
Definition: ElectronxAODHelpers.cxx:22
xAOD::MissingET_v1::source
MissingETBase::Types::bitmask_t source() const
MET object source tag.
xAOD::MissingETComponent_v1::findIndex
size_t findIndex(const IParticle *pPart) const
Find index of given object in contributing object store.
Definition: MissingETComponent_v1.cxx:213
xAOD::MissingETComponent_v1::Weight::wpx
double wpx() const
Returns .
xAOD::Electron_v1
Definition: Electron_v1.h:34
met::METRebuilder::rebuildMET
virtual StatusCode rebuildMET(const std::string &metKey, xAOD::MissingETContainer *metCont, const xAOD::IParticleContainer *collection, const xAOD::MissingETComponentMap *metMap, bool doTracks=true) override
Definition: METRebuilder.cxx:290
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
Muon
struct TBPatternUnitContext Muon
met::METRebuilder::m_jetPtCut
Gaudi::Property< double > m_jetPtCut
Definition: METRebuilder.h:184
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
met::METRebuilder::acceptTrack
bool acceptTrack(const xAOD::TrackParticle *trk, const xAOD::Vertex *pv) const
Definition: METRebuilder.cxx:615
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::MissingETComponent_v1::metObject
const MissingET * metObject() const
Access MET object.
xAOD::Photon_v1
Definition: Photon_v1.h:37
Muons
Definition: Muons.py:1
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MissingET
Definition: Reconstruction/MissingETEvent/MissingETEvent/MissingET.h:23
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
met::METRebuilder::m_pureTrkSoft
bool m_pureTrkSoft
Definition: METRebuilder.h:189
python.changerun.pv
pv
Definition: changerun.py:81
InDet::InDetTrackSelectionTool
Implementation of the track selector tool.
Definition: InDetTrackSelectionTool.h:52
xAOD::MissingETComponent_v1::Weight
Kinematic weight descriptor.
Definition: MissingETComponent_v1.h:28
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
met::METRebuilder::m_rebuildGamma
bool m_rebuildGamma
Definition: METRebuilder.h:179
met::METRebuilder::m_softTermType
Gaudi::Property< std::string > m_softTermType
Definition: METRebuilder.h:168
xAODType::Tau
@ Tau
The object is a tau (jet)
Definition: ObjectType.h:49
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
met::fillMET
StatusCode fillMET(xAOD::MissingET *&met, xAOD::MissingETContainer *metCont, const std::string &metKey, const MissingETBase::Types::bitmask_t metSource)
Definition: METHelpers.cxx:123
met::METRebuilder::m_ElectronContainerKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronContainerKey
Definition: METRebuilder.h:152
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
met::METRebuilder::m_tauTerm
Gaudi::Property< std::string > m_tauTerm
Definition: METRebuilder.h:164
met::METRebuilder::m_rebuildMuon
bool m_rebuildMuon
Definition: METRebuilder.h:181
xAOD::MissingET_v1::mpy
float mpy() const
Returns .
xAOD::JetAttribute::GhostTrack
@ GhostTrack
Definition: JetAttributes.h:252
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SG::DataProxy
Definition: DataProxy.h:44
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
met::METRebuilder::m_OutMETKey
SG::WriteHandleKey< xAOD::MissingETContainer > m_OutMETKey
Definition: METRebuilder.h:159
xAOD::Photon_v1::vertex
const xAOD::Vertex * vertex(size_t index=0) const
Pointer to the xAOD::Vertex/es that match the photon candidate.
Definition: Photon_v1.cxx:46
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
met::METRebuilder::m_outMETTerm
Gaudi::Property< std::string > m_outMETTerm
Definition: METRebuilder.h:170
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
met::METRebuilder::m_trkseltool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkseltool
Definition: METRebuilder.h:196
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
met::METRebuilder::m_PhotonContainerKey
SG::ReadHandleKey< xAOD::PhotonContainer > m_PhotonContainerKey
Definition: METRebuilder.h:153
fitman.k
k
Definition: fitman.py:528
xAOD::MissingETComponent_v1
MET component descriptor contains object links and corresponding parameters.
Definition: MissingETComponent_v1.h:24
xAOD::MissingETComponent_v1::empty
bool empty() const
Empty list of contributing objects indicator.
ServiceHandle< Gaudi::Interfaces::IOptionsSvc >
met::METRebuilder::associateTracks
void associateTracks(const xAOD::IParticle *obj)
Definition: METRebuilder.cxx:629
xAOD::MissingETComponent_v1::objects
std::vector< const IParticle * > objects() const
Access contributing objects.
Definition: MissingETComponent_v1.cxx:295