|
ATLAS Offline Software
|
#include <MuonCandidateTool.h>
|
| MuonCandidateTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~MuonCandidateTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual void | create (const xAOD::TrackParticleContainer &tracks, MuonCandidateCollection &outputCollection, TrackCollection &outputTracks, const EventContext &ctx) const override |
| IMuonCandidateTool interface: build a MuonCandidateCollection from a TrackCollection of spectrometer tracks. 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"} |
|
ToolHandle< Rec::ICombinedMuonTrackBuilder > | m_trackBuilder {this, "TrackBuilder", "", ""} |
|
ToolHandle< Muon::IMuonTrackExtrapolationTool > | m_trackExtrapolationTool |
|
ToolHandle< Trk::ITrackAmbiguityProcessorTool > | m_ambiguityProcessor |
|
ToolHandle< Trk::IExtendedTrackSummaryTool > | m_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"} |
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
SG::ReadCondHandleKey< InDet::BeamSpotData > | m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"} |
|
SG::ReadHandleKey< Trk::SegmentCollection > | m_segmentKey {this, "SegmentContainer", ""} |
| Retrieve the segment container to perform the segment association offline. More...
|
|
PublicToolHandle< MuonCombined::IMuonTrackToSegmentAssociationTool > | m_trackSegmentAssociationTool |
|
Gaudi::Property< unsigned int > | m_extrapolationStrategy {this, "ExtrapolationStrategy", 0} |
|
Gaudi::Property< bool > | m_commissioning |
|
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 25 of file MuonCandidateTool.h.
◆ StoreGateSvc_t
◆ MuonCandidateTool()
MuonCombined::MuonCandidateTool::MuonCandidateTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~MuonCandidateTool()
virtual MuonCombined::MuonCandidateTool::~MuonCandidateTool |
( |
| ) |
|
|
virtualdefault |
◆ create()
IMuonCandidateTool interface: build a MuonCandidateCollection from a TrackCollection of spectrometer tracks.
Last but not least set the segments
Implements MuonCombined::IMuonCandidateTool.
Definition at line 47 of file MuonCandidateTool.cxx.
50 unsigned int ntracks = 0;
53 if (!beamSpotHandle.isValid()) {
58 ATH_MSG_DEBUG(
"Beamspot position bs_x=" << beamSpotHandle->beamPos());
60 std::vector<track_link> trackLinks;
62 unsigned int index = -1;
64 for (
const auto*
track : tracks) {
67 if (!
track->trackLink().isValid() || !
track->track()) {
76 std::unique_ptr<Trk::Track> standaloneTrack;
78 standaloneTrack =
m_trackBuilder->standaloneFit(ctx, msTrack, beamSpotHandle->beamPos(),
nullptr);
82 if (standaloneTrack) {
85 standaloneTrack.reset();
93 standaloneTrack.reset();
94 ATH_MSG_DEBUG(
"extrapolated track has a degraded fit, don't use it");
98 if (standaloneTrack) {
102 <<
m_printer->print(*standaloneTrack) << std::endl
103 <<
m_printer->printStations(*standaloneTrack));
108 ATH_MSG_WARNING(
" Track with perigee without covariance " << (*standaloneTrack));
109 trackLinks.emplace_back(std::move(standaloneTrack),
index,
true);
114 bool skipTrack =
true;
116 std::unique_ptr<Trk::TrackSummary> msTrackSummary;
130 if (!skipTrack) { trackLinks.emplace_back(std::make_unique<Trk::Track>(msTrack),
index,
false); }
134 std::unique_ptr<TrackCollection> extrapTracks = std::make_unique<TrackCollection>(
SG::VIEW_ELEMENTS);
135 extrapTracks->
reserve(trackLinks.size());
136 for (
const track_link& link : trackLinks) extrapTracks->
push_back(link.track.get());
137 ATH_MSG_DEBUG(
"Finished back-tracking, total number of successfull fits " << ntracks);
140 std::unique_ptr<const TrackCollection> resolvedTracks(
m_ambiguityProcessor->process(extrapTracks.get()));
142 ATH_MSG_DEBUG(
"Finished ambiguity solving: " << extrapTracks->
size() <<
" track(s) in -> " << resolvedTracks->size()
148 if (!readHandle.isValid()) {
151 segments = readHandle.cptr();
157 std::find_if(trackLinks.begin(), trackLinks.end(), [&
track](
const track_link& link) { return link.track.get() == track; });
159 if (tLink == trackLinks.end()) {
160 ATH_MSG_WARNING(
"Unable to find internal link between MS and SA tracks!");
164 std::unique_ptr<MuonCandidate> muon_candidate;
166 if (tLink->extp_succeed) {
167 outputTracks.
push_back(std::move(tLink->track));
169 muon_candidate = std::make_unique<MuonCandidate>(MS_TrkLink, saLink, outputTracks.
size() - 1);
173 muon_candidate = std::make_unique<MuonCandidate>(MS_TrkLink);
178 std::vector<const Muon::MuonSegment*> assoc_segs;
180 muon_candidate->setSegments(std::move(assoc_segs));
◆ 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 MuonCombined::MuonCandidateTool::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::IMuonCandidateTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Definition at line 22 of file IMuonCandidateTool.h.
23 static const InterfaceID IID_IMuonCandidateTool(
"MuonCombined::IMuonCandidateTool", 1, 0);
24 return IID_IMuonCandidateTool;
◆ 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_ambiguityProcessor
Initial value:{this, "AmbiguityProcessor",
"Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"}
Definition at line 41 of file MuonCandidateTool.h.
◆ m_beamSpotKey
◆ m_commissioning
Gaudi::Property<bool> MuonCombined::MuonCandidateTool::m_commissioning |
|
private |
Initial value:{this, "Commissioning", false,
"Flag deciding whether the candidate belongs to the comissioning."}
Definition at line 56 of file MuonCandidateTool.h.
◆ m_detStore
◆ m_evtStore
◆ m_extrapolationStrategy
Gaudi::Property<unsigned int> MuonCombined::MuonCandidateTool::m_extrapolationStrategy {this, "ExtrapolationStrategy", 0} |
|
private |
◆ m_idHelperSvc
◆ m_printer
◆ m_segmentKey
Retrieve the segment container to perform the segment association offline.
Definition at line 50 of file MuonCandidateTool.h.
◆ m_trackBuilder
◆ m_trackExtrapolationTool
Initial value:{this, "TrackExtrapolationTool",
"ExtrapolateMuonToIPTool/ExtrapolateMuonToIPTool"}
Definition at line 39 of file MuonCandidateTool.h.
◆ m_trackSegmentAssociationTool
Initial value:{
this, "TrackSegmentAssociationTool", "MuonCombined::TrackSegmentAssociationTool/TrackSegmentAssociationTool"}
Definition at line 51 of file MuonCandidateTool.h.
◆ m_trackSummaryTool
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
JetConstituentVector::iterator iterator
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
@ MuidStandAlone
MuidStandalone.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
@ u
Enums for curvilinear frames.
const std::vector< ChamberHitSummary > & chamberHitSummary() const
access to the vector of chamber hit summaries on the track
virtual void setOwner(IDataHandleHolder *o)=0
Detailed track summary for the muon system Give access to hit counts per chamber.
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 Perigee * perigeeParameters() const
return Perigee.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
#define ATH_MSG_WARNING(x)
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void setParticleHypothesis(const ParticleHypothesis &hypothesis)
Method re-setting the ParticleHypothesis.
double chiSquared() const
returns the of the overall track fit
void setPatternRecognitionInfo(const TrackPatternRecoInfo &patternReco)
Method setting the pattern recognition algorithm.
const MuonTrackSummary * muonTrackSummary() const
returns a pointer to the MuonTrackSummary if available
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double