![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <METTrackFilterTool.h>
|
| METTrackFilterTool (const std::string &name) |
|
| ~METTrackFilterTool () |
|
StatusCode | initialize () |
| Dummy implementation of the initialisation function. More...
|
|
StatusCode | finalize () |
|
virtual StatusCode | execute (xAOD::MissingET *metTerm, xAOD::MissingETComponentMap *metMap) const |
|
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 |
|
|
ToolHandle< InDet::IInDetTrackSelectionTool > | m_trkseltool {this,"TrackSelectorTool","",""} |
|
ToolHandle< CP::ITrackVertexAssociationTool > | m_trkToVertexTool {this,"TrackVxAssocTool","",""} |
|
ToolHandle< xAOD::ITrackIsolationTool > | m_trkIsolationTool {this,"TrackIsolationTool","",""} |
|
ToolHandle< xAOD::ICaloTopoClusterIsolationTool > | m_caloIsolationTool {this,"CaloIsolationTool","",""} |
|
bool | m_trk_doPVsel |
|
SG::ReadHandleKey< xAOD::ElectronContainer > | m_el_inputkey {this,"InputElectronKey","Electrons",""} |
|
SG::ReadHandleKey< xAOD::MuonContainer > | m_mu_inputkey {this,"InputMuonKey","Muons",""} |
|
SG::ReadHandleKey< xAOD::VertexContainer > | m_pv_inputkey {this,"InputPVKey","PrimaryVertices",""} |
|
SG::ReadHandleKey< xAOD::CaloClusterContainer > | m_cl_inputkey {this,"InputClusterKey","CaloCalTopoClusters",""} |
|
bool | m_doVxSep |
|
bool | m_doLepRecovery |
|
bool | m_useIsolationTools |
|
bool | m_trk_doEoverPsel |
|
double | m_cenTrackPtThr |
|
double | m_forTrackPtThr |
|
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 |
|
Definition at line 47 of file METTrackFilterTool.h.
◆ StoreGateSvc_t
◆ METTrackFilterTool() [1/2]
met::METTrackFilterTool::METTrackFilterTool |
( |
const std::string & |
name | ) |
|
◆ ~METTrackFilterTool()
met::METTrackFilterTool::~METTrackFilterTool |
( |
| ) |
|
|
default |
◆ METTrackFilterTool() [2/2]
met::METTrackFilterTool::METTrackFilterTool |
( |
| ) |
|
|
private |
◆ buildTrackMET()
Definition at line 310 of file METTrackFilterTool.cxx.
317 vector<const IParticle*> dummyList;
323 return StatusCode::FAILURE;
326 for(
const auto& trk : softTracks ) {
328 bool passFilters =
true;
330 if (!tcCont.isValid()) {
356 metTerm->
add(
el->pt()*
cos(trk->phi()),
357 el->pt()*
sin(trk->phi()),
361 metTerm->
add(trk->pt()*
cos(trk->phi()),trk->pt()*
sin(trk->phi()),trk->pt());
367 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
Implements IMETToolBase.
Definition at line 59 of file METRefinerTool.cxx.
63 if( metTerm==
nullptr ) {
65 return StatusCode::FAILURE;
67 if( metMap==
nullptr ) {
68 ATH_MSG_ERROR(
"Invalid input MissingETComponentMap pointer provided!");
69 return StatusCode::FAILURE;
◆ executeTool()
Implements met::METRefinerTool.
Definition at line 198 of file METTrackFilterTool.cxx.
203 std::vector<const xAOD::Electron*> selElectrons;
204 std::vector<const xAOD::Muon*> selMuons;
209 if (!elCont.isValid()) {
211 return StatusCode::SUCCESS;
216 if (!muCont.isValid()) {
218 return StatusCode::SUCCESS;
226 if(iter==metMap->
end()) {
228 return StatusCode::FAILURE;
240 if(citer==metMap->
end()) {
242 return StatusCode::FAILURE;
244 vector<const TrackParticle*> softTracks;
245 softTracks.reserve((*citer)->size());
246 for(
const auto&
obj : (*citer)->objects()) {
248 if(trk) {softTracks.push_back(trk);}
254 if (!vxCont.isValid()) {
257 vector<const Vertex*> vertices;
260 if(!vxCont->empty()) {
261 vertices.reserve(vxCont->size());
262 for(
const auto *
const vx : *vxCont) {
264 vertices.push_back(vx);
268 return StatusCode::FAILURE;
272 ATH_MSG_DEBUG(
"Did not find a primary vertex in the container. Reject all tracks.");
273 return StatusCode::SUCCESS;
285 for(
const auto *
const vx : *vxCont){
291 met_vx->setSource(metTerm->
source());
297 ATH_MSG_VERBOSE(
"Number of tracks associated to vertex " << vx->index() <<
": "<< (trktovxmap[vx]).size());
307 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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
◆ finalize()
StatusCode met::METTrackFilterTool::finalize |
( |
| ) |
|
|
virtual |
◆ getKey()
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
-
ptr | The 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.
121 #ifdef XAOD_STANDALONE
124 return evtStore()->event()->getKey( ptr );
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ 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
-
ptr | The 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.
108 #ifdef XAOD_STANDALONE
111 return evtStore()->event()->getName( ptr );
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ 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::METTrackFilterTool::initialize |
( |
| ) |
|
|
virtual |
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 met::METRefinerTool.
Definition at line 75 of file METTrackFilterTool.cxx.
93 return StatusCode::SUCCESS;
◆ inputHandles()
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.
◆ isElTrack()
◆ isGoodEoverP()
Definition at line 117 of file METTrackFilterTool.cxx.
133 for(
const auto&
obj : trkList) {
136 if(testtrk==trk)
continue;
141 else {
ATH_MSG_WARNING(
"METTrackFilterTool::isGoodEoveP given an object of type " <<
obj->type());}
145 for(
const auto *
const clus : *
clusters) {
156 std::vector<Iso::IsolationType> trkIsoCones;
168 std::vector<Iso::IsolationType> caloIsoCones_coreCone;
174 caloIsoCones_coreCone,
175 caloIsoCorr_coreCone);
186 if(Rerr>0.4)
return false;
187 else if (
EoverP<0.65 && ((
EoverP>0.1 && Rerr>0.05) || Rerr>0.1))
return false;
191 if(
etcone10/trkptsum<0.6 && trk->
pt()/trkptsum>0.6)
return false;
◆ isMuTrack()
Definition at line 382 of file METTrackFilterTool.cxx.
384 for(
const auto *
muon : muons) {
386 if((
muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle))==&trk) {
◆ msg() [1/2]
◆ msg() [2/2]
◆ 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.
◆ msgLvl()
◆ outputHandles()
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 |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, top::TopObjectSelection, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ renounce()
◆ renounceArray()
◆ selectElectrons()
◆ selectMuons()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_caloIsolationTool
◆ m_cenTrackPtThr
double met::METTrackFilterTool::m_cenTrackPtThr |
|
private |
◆ m_cl_inputkey
◆ m_detStore
◆ m_doLepRecovery
bool met::METTrackFilterTool::m_doLepRecovery |
|
private |
◆ m_doVxSep
bool met::METTrackFilterTool::m_doVxSep |
|
private |
◆ m_el_inputkey
◆ m_evtStore
◆ m_forTrackPtThr
double met::METTrackFilterTool::m_forTrackPtThr |
|
private |
◆ m_mu_inputkey
◆ m_output_met_key
std::string met::METRefinerTool::m_output_met_key |
|
protectedinherited |
◆ m_pv_inputkey
◆ m_trk_doEoverPsel
bool met::METTrackFilterTool::m_trk_doEoverPsel |
|
private |
◆ m_trk_doPVsel
bool met::METTrackFilterTool::m_trk_doPVsel |
|
private |
◆ m_trkIsolationTool
◆ m_trkseltool
◆ m_trkToVertexTool
◆ m_useIsolationTools
bool met::METTrackFilterTool::m_useIsolationTools |
|
private |
◆ m_useRapidity
bool met::METRefinerTool::m_useRapidity |
|
protectedinherited |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Const iterator class for DataVector/DataList.
@ coreEnergy
energy stored for this correction
@ Nominal
Primary vertex is nominal vertex.
float sumet() const
Returns.
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
@ coreTrackPtr
tracks pointer
static MissingETComponentMap::const_iterator find(const MissingETComponentMap *pMap, const MissingET *pmetObj)
Find non-modifiable contribution for a given MET object.
Iso::IsolationTrackCorrectionBitset trackbitset
static Types::bitmask_t track(Region reg=Region::FullAcceptance)
Bit mask for MET term from Track signal objects.
@ ptcone20
Track isolation.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::map< const xAOD::Vertex *, xAOD::TrackVertexAssociationList > TrackVertexAssociationMap
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
uint64_t bitmask_t
Type for status word bit mask.
void setSource(MissingETBase::Types::bitmask_t src)
Set the source of the MET object.
static Types::bitmask_t idTrack(Region reg=Region::FullAcceptance)
Bit pattern indicating a ID Track MET term.
@ SoftEvent
Indicator for the MET term from reconstructed soft event signals (tracks, clusters) or MC truth parti...
virtual void setOwner(IDataHandleHolder *o)=0
bool setStatusWord(MissingETBase::Types::bitmask_t sw=MissingETBase::Status::clearedStatus())
Set the statusword of a MET term.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
void setName(const std::string &name)
Set the name of the MET object.
static const MissingETComponent * getComponent(const MissingETComponentMap *pMap, const IParticle *pPart)
Access non-modifiable contribution object.
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.
@ PileupTrack
Reconstructed track based pile-up correction.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
(Non-const) Iterator class for DataVector/DataList.
@ etcone20
Calorimeter isolation.
std::map< Iso::IsolationCaloCorrection, std::map< Iso::IsolationCorrectionParameter, float > > coreCorrections
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const std::string & name() const
Identifier getters.
Athena::TPCnvVers::Old Athena::TPCnvVers::Old MissingET
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void add(const IParticle *particle)
Add particle kinematics to MET.
float qOverP() const
Returns the parameter.
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
std::string to_string(const DetectorType &type)
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 ...
std::vector< float > etcones
@ coreCone
core energy (in dR<0.1).
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.
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...
MissingETBase::Types::bitmask_t source() const
MET object source tag.
std::vector< float > ptcones
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
bool isLepton(const T &p)
APID: the fourth generation leptons are leptons.
Kinematic weight descriptor.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Class describing a TrackParticle.
const SG::AuxVectorData * container() const
Return the container holding this element.
bool isInDeltaR(const xAOD::IParticle &p1, const xAOD::IParticle &p2, double dR, bool useRapidity=true)
Check if 2 xAOD::IParticle are in a cone.
static Types::bitmask_t softEvent(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed soft event.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Iso::IsolationCaloCorrectionBitset calobitset
MET component descriptor contains object links and corresponding parameters.