|
ATLAS Offline Software
|
#include <MuonCombinedTool.h>
|
| MuonCombinedTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~MuonCombinedTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual void | combine (const MuonCandidateCollection &muonCandidates, const InDetCandidateCollection &inDetCandidates, std::vector< InDetCandidateToTagMap * > tagMaps, TrackCollection *combinedTracks, TrackCollection *METracks, const EventContext &ctx) const override |
| IMuonCombinedTool interface: build combined muons from ID and MS candidates. 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 |
|
|
PublicToolHandle< Muon::MuonEDMPrinterTool > | m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"} |
|
ToolHandleArray< MuonCombined::IMuonCombinedTagTool > | m_muonCombinedTagTools {this, "MuonCombinedTagTools", {}} |
|
ToolHandle< MuonCombinedDebuggerTool > | m_muonCombDebugger |
|
PublicToolHandle< Muon::IMuonAlignmentUncertTool > | m_alignUncertTool {this, "AlignmentUncertTool", ""} |
| Use this tool to retrieve the last and first measurments of the ID and MS, respectively. More...
|
|
Gaudi::Property< float > | m_deltaEtaPreSelection {this, "DeltaEtaPreSelection", 0.5} |
|
Gaudi::Property< float > | m_deltaPhiPreSelection {this, "DeltaPhiPreSelection", 1} |
|
Gaudi::Property< float > | m_ptBalance {this, "PtBalancePreSelection", -1.} |
|
Gaudi::Property< bool > | m_runMuonCombinedDebugger {this, "RunMuonCombinedDebugger", false} |
|
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 23 of file MuonCombinedTool.h.
◆ StoreGateSvc_t
◆ MuonCombinedTool()
MuonCombined::MuonCombinedTool::MuonCombinedTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~MuonCombinedTool()
virtual MuonCombined::MuonCombinedTool::~MuonCombinedTool |
( |
| ) |
|
|
virtualdefault |
◆ associate()
Definition at line 79 of file MuonCombinedTool.cxx.
81 associatedIdCandidates.clear();
82 for (
const InDetCandidate* indetCand : inDetCandidates) {
84 associatedIdCandidates.push_back(indetCand);
◆ combine()
IMuonCombinedTool interface: build combined muons from ID and MS candidates.
Implements MuonCombined::IMuonCombinedTool.
Definition at line 46 of file MuonCombinedTool.cxx.
50 if (inDetCandidates.
empty())
return;
51 if (muonCandidates.
empty())
return;
53 ATH_MSG_ERROR(
"Number of tag maps does not match number of tag tools");
60 for (
const MuonCandidate* muonCandidate : muonCandidates) {
62 muonCandidate->extrapolatedTrack() ? *muonCandidate->extrapolatedTrack() : muonCandidate->muonSpectrometerTrack();
65 std::vector<const InDetCandidate*> associatedIdCandidates;
66 associate(*muonCandidate, inDetCandidates, associatedIdCandidates);
67 if (associatedIdCandidates.empty())
continue;
68 ATH_MSG_DEBUG(
"Associated ID candidates " << associatedIdCandidates.size());
73 tool->combine(*muonCandidate, associatedIdCandidates, *(tagMaps.at(
count)), combinedTracks, METracks, ctx);
◆ 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
◆ fill_debugging()
Definition at line 27 of file MuonCombinedTool.cxx.
31 debugger_tool->fillBranches(muonCandidates, inDetCandidates);
◆ initialize()
StatusCode MuonCombined::MuonCombinedTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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& MuonCombined::IMuonCombinedTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Definition at line 25 of file IMuonCombinedTool.h.
26 static const InterfaceID IID_IMuonCombinedTool(
"MuonCombined::IMuonCombinedTool", 1, 0);
27 return IID_IMuonCombinedTool;
◆ 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.
◆ pass_prematching()
Use the alignment uncertainty tool to find the last ID measurement and the first MS measurement
One of the two is not found use the old approach as a fallback
The reason is that the IDTrackParticle does not have an associated Trk::Track. That should never happen during reconstruction
Retrieve the position of the ID exit and the MS entrance
Check that both tracklets are actually out of range. That helps us to recover tracks in the endcaps where the MSOE vertex constraint worsens the compability
Definition at line 87 of file MuonCombinedTool.cxx.
88 const bool hasExtr = muonCandidate.extrapolatedTrack() !=
nullptr;
89 const Trk::Track* ms_trk = &muonCandidate.muonSpectrometerTrack();
90 const Trk::Track* msoe_trk = muonCandidate.extrapolatedTrack();
91 const Trk::Track* id_trk = idCandidate.indetTrackParticle().track();
92 if (!ms_trk && !msoe_trk) {
114 if (!msoe_entrance) msoe_entrance = ms_entrance;
115 if (!ms_entrance) ms_entrance = msoe_entrance;
119 if ((!id_exit && !id_extension) || !ms_entrance) {
122 if (!id_trk)
ATH_MSG_WARNING(
"Trk::Track not found for InDetTrack candidate!");
124 const Amg::Vector3D idtr_p3 = idCandidate.indetTrackParticle().perigeeParameters().momentum();
129 const double deltaEta = std::abs(muon_p3.eta() - idtr_p3.eta());
132 const double muonPt = muon_p3.perp();
133 const double indetPt = idtr_p3.perp();
134 const double ptBal = muonPt > 0. ? std::abs(muonPt - indetPt) / muonPt : 1.;
138 const Amg::Vector3D id_ex_pos = (id_extension ? id_extension : id_exit->trackParameters())->position();
139 const Amg::Vector3D ms_en_pos = ms_entrance->trackParameters()->position();
140 const Amg::Vector3D msoe_en_pos = msoe_entrance->trackParameters()->position();
143 const double deltaEta = std::abs(id_ex_pos.eta() - ms_en_pos.eta());
146 const double deltaEtaMSOE = std::abs(id_ex_pos.eta() - msoe_en_pos.eta());
157 const double muonPt = muonPars->
momentum().perp();
158 const double indetPt = idCandidate.indetTrackParticle().pt();
159 const double ptBal = muonPt > 0. ? std::abs(muonPt - indetPt) / muonPt : 1.;
◆ 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_alignUncertTool
Use this tool to retrieve the last and first measurments of the ID and MS, respectively.
Definition at line 49 of file MuonCombinedTool.h.
◆ m_deltaEtaPreSelection
Gaudi::Property<float> MuonCombined::MuonCombinedTool::m_deltaEtaPreSelection {this, "DeltaEtaPreSelection", 0.5} |
|
private |
◆ m_deltaPhiPreSelection
Gaudi::Property<float> MuonCombined::MuonCombinedTool::m_deltaPhiPreSelection {this, "DeltaPhiPreSelection", 1} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_muonCombDebugger
Initial value:{this, "MuonCombinedDebuggerTool",
"MuonCombined::MuonCombinedDebuggerTool/MuonCombinedDebuggerTool"}
Definition at line 45 of file MuonCombinedTool.h.
◆ m_muonCombinedTagTools
◆ m_printer
◆ m_ptBalance
Gaudi::Property<float> MuonCombined::MuonCombinedTool::m_ptBalance {this, "PtBalancePreSelection", -1.} |
|
private |
◆ m_runMuonCombinedDebugger
Gaudi::Property<bool> MuonCombined::MuonCombinedTool::m_runMuonCombinedDebugger {this, "RunMuonCombinedDebugger", false} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Tracking class to hold the extrapolation from a particle from the ID to the muon system (or the other...
const Amg::Vector3D & position() const
Access method for the position.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
const TrackParameters * muonEntryLayerIntersection() const
access to intersection with the muon entry layer return NULL if the intersection failed
virtual void setOwner(IDataHandleHolder *o)=0
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
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
represents the track state (measurement, material, fit parameters and quality) at a surface.
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & momentum() const
Access method for the momentum.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
#define ATLAS_THREAD_SAFE
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
bool empty() const noexcept
Returns true if the collection is empty.