|
ATLAS Offline Software
|
EF Track Isolation tool.
More...
#include <TrigMuonEFTrackIsolationTool.h>
|
| TrigMuonEFTrackIsolationTool (const std::string &type, const std::string &name, const IInterface *parent) |
| Constructor. More...
|
|
virtual StatusCode | initialize () override |
| initialize the tool More...
|
|
virtual StatusCode | calcTrackIsolation (const xAOD::Muon *efmuon, const xAOD::TrackParticleContainer *idtrks, const std::vector< double > &conesizes, std::vector< double > &results, std::vector< double > *dzvals, std::vector< double > *drvals, std::vector< double > *selfremoval) const override |
| Sum the track pT in cones around the muon. 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 |
|
|
StatusCode | checkIsolation (const xAOD::IParticle *muon, double selfpt, const xAOD::TrackParticle *muon_idtrk, const Trk::Perigee *muidtrk_perigee, const xAOD::TrackParticleContainer *trks, std::vector< double > conesizes, std::vector< double > &results, std::vector< double > *dzvals, std::vector< double > *drvals, std::vector< double > *selfremoval) const |
|
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...
|
|
EF Track Isolation tool.
Calculates track isolation around EF muon in varying cone sizes. Has possibility to cut on dz(muon id trk, id trk) to suppress pileup.
Definition at line 22 of file TrigMuonEFTrackIsolationTool.h.
◆ StoreGateSvc_t
◆ TrigMuonEFTrackIsolationTool()
TrigMuonEFTrackIsolationTool::TrigMuonEFTrackIsolationTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ calcTrackIsolation()
StatusCode TrigMuonEFTrackIsolationTool::calcTrackIsolation |
( |
const xAOD::Muon * |
efmuon, |
|
|
const xAOD::TrackParticleContainer * |
idtrks, |
|
|
const std::vector< double > & |
conesizes, |
|
|
std::vector< double > & |
results, |
|
|
std::vector< double > * |
dzvals, |
|
|
std::vector< double > * |
drvals, |
|
|
std::vector< double > * |
selfremoval |
|
) |
| const |
|
overridevirtual |
Sum the track pT in cones around the muon.
- Parameters
-
efmuon | - EF muon |
idtrks | - Container of id trks |
conesizes | - Vector of conesizes (in dR) |
results | - Vector where the results for each cone will be stored |
dzvals | - Vector where dz vals of good tracks will be stored |
drvals | - Vector where dr vals of good tracks will be stored |
selfremoval | - Vector storing the selfpt and removed pt |
Implements IMuonEFTrackIsolationTool.
Definition at line 49 of file TrigMuonEFTrackIsolationTool.cxx.
78 selfpt = muon_idtrk->
pt();
80 msg() <<
MSG::DEBUG <<
"Found ID track attached to combined muon, " << muon_idtrk <<
",pt = " << selfpt <<
endmsg;
84 msg() << MSG::WARNING <<
"Found EF combined muon without a link to ID track, will use combined pt for self removal" <<
endmsg;
92 msg() << MSG::WARNING <<
"This EF muon has neither a combined or extrapolated muon and removeSelf is requested, do not process further" <<
endmsg;
93 return StatusCode::FAILURE;
95 msg() << MSG::WARNING <<
"This EF muon has neither a combined, extrapolated or MS muon, do not process further" <<
endmsg;
96 return StatusCode::FAILURE;
◆ checkIsolation()
consistency checks
Definition at line 111 of file TrigMuonEFTrackIsolationTool.cxx.
115 msg() << MSG::WARNING <<
"Inconsistency, removeSelf requested, but selfpt = 0" <<
endmsg;
118 msg() << MSG::WARNING <<
"Could not find a muon to update with the isolation, skipping this muon" <<
endmsg;
119 return StatusCode::FAILURE;
128 ntrks_tmp[0]=0; ntrks_tmp[1]=0;
132 trkit!=trks->
end(); ++trkit) {
136 msg() <<
MSG::DEBUG <<
"INFO: Track pT = " << (*trkit)->pt() <<
" eta = " << (*trkit)->eta() <<
endmsg;
139 const auto& trkSelResult =
m_trkSelTool->accept(*trkit);
145 for(
unsigned int i=0;
i<trkSelResult.getNCuts (); ++
i) {
146 ATH_MSG_DEBUG(
" Cut " <<
i << trkSelResult.getCutName(
i).data() <<
" pass = " << trkSelResult.getCutResult(
i));
155 const Trk::Perigee& idtrk_perigee = (*trkit)->perigeeParameters();
156 dz = idtrk_perigee.parameters()[
Trk::z0] - muidtrk_perigee->parameters()[
Trk::z0];
170 if(dzvals) dzvals->push_back(dz);
175 dr = (*trkit)->p4().DeltaR( muon_idtrk->
p4() );
177 dr = (*trkit)->p4().DeltaR(
muon->p4() );
180 if(drvals) drvals->push_back(
dr);
206 for(
unsigned int conepos=0; conepos<conesizes.size(); ++conepos) {
207 if(
dr < conesizes.at(conepos) ) {
209 msg() <<
MSG::DEBUG <<
"Adding trk pt = " << (*trkit)->pt() <<
", with dr = " <<
dr <<
", into cone = " << conesizes.at(conepos) <<
endmsg;
211 results.at(conepos) += (*trkit)->pt();
212 ++ntrks_tmp[conepos];
220 selfremoval->push_back(selfpt);
221 selfremoval->push_back(
muon->pt());
224 for(
unsigned int conepos=0; conepos<conesizes.size(); ++conepos) {
225 msg() <<
MSG::DEBUG <<
"Scalar pT sum of tracks around this muon cone " << conesizes.at(conepos) <<
" = " <<
results.at(conepos) <<
endmsg;
229 for(
unsigned int conepos=0; conepos<conesizes.size(); ++conepos) {
233 for(
unsigned int conepos=0; conepos<conesizes.size(); ++conepos) {
234 msg() <<
MSG::DEBUG <<
"Scalar pT sum of tracks around this muon cone " << conesizes.at(conepos) <<
" after self removal = " <<
results.at(conepos) <<
endmsg;
240 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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]
◆ 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
◆ initialize()
StatusCode TrigMuonEFTrackIsolationTool::initialize |
( |
| ) |
|
|
overridevirtual |
initialize the tool
Definition at line 244 of file TrigMuonEFTrackIsolationTool.cxx.
250 return StatusCode::FAILURE;
256 <<
"Properties set as follows: " <<
endmsg;
274 if(m_annulusSize < 0.0 || m_annulusSize > 0.2) {
275 msg() << MSG::ERROR <<
"Bad configuration of annulusSize = " <<
m_annulusSize <<
", fix your config!" <<
endmsg;
276 return StatusCode::FAILURE;
280 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.
◆ interfaceID()
static const InterfaceID& IMuonEFTrackIsolationTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ msg() [1/2]
◆ msg() [2/2]
◆ 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.
◆ renounce()
◆ renounceArray()
◆ 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_annulusSize
double TrigMuonEFTrackIsolationTool::m_annulusSize |
|
private |
◆ m_debug
bool TrigMuonEFTrackIsolationTool::m_debug |
|
private |
◆ m_deltaz_cut
double TrigMuonEFTrackIsolationTool::m_deltaz_cut |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_removeSelf
bool TrigMuonEFTrackIsolationTool::m_removeSelf |
|
private |
◆ m_trkSelTool
◆ m_useAnnulus
bool TrigMuonEFTrackIsolationTool::m_useAnnulus |
|
private |
◆ m_useVarIso
bool TrigMuonEFTrackIsolationTool::m_useVarIso |
|
private |
◆ 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.
@ ptvarcone20
Mini-Isolation http://arxiv.org/abs/1007.2221.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
virtual void setOwner(IDataHandleHolder *o)=0
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
::StatusCode StatusCode
StatusCode definition for legacy code.
const ElementLink< TrackParticleContainer > & muonSpectrometerTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const ElementLink< TrackParticleContainer > & inDetTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Class describing a TrackParticle.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const ElementLink< TrackParticleContainer > & combinedTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.