ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSegmentFinderAlg Class Reference

#include <MuonSegmentFinderAlg.h>

Inheritance diagram for MuonSegmentFinderAlg:
Collaboration diagram for MuonSegmentFinderAlg:

Public Member Functions

virtual ~MuonSegmentFinderAlg ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

using NSWSegmentCache = Muon::IMuonNSWSegmentFinderTool::SegmentMakingCache
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode createSegmentsWithMDTs (const EventContext &ctx, const Muon::MuonPatternCombination *patt, Trk::SegmentCollection *segs) const
void createNSWSegments (const EventContext &ctx, const Muon::MuonPatternCombination *patt, NSWSegmentCache &cache) const
StatusCode createCscSegments (const EventContext &ctx, std::unique_ptr< MuonSegmentCombinationCollection > &csc4dSegmentCombinations) const
 Retrieve the raw outputs from the Csc segment makers for the curved combination.
void appendSegmentsFromCombi (const std::unique_ptr< MuonSegmentCombinationCollection > &combi_coll, Trk::SegmentCollection *segments) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
PublicToolHandle< Muon::MuonEDMPrinterToolm_printer
ToolHandle< Muon::IMuonPatternCalibrationm_patternCalibration
ToolHandle< Muon::IMuonSegmentMakerm_segmentMaker
ToolHandle< Muon::IMuonSegmentOverlapRemovalToolm_segmentOverlapRemovalTool
ToolHandle< Muon::IMuonClusterOnTrackCreatorm_clusterCreator
ToolHandle< Muon::IMuonNSWSegmentFinderToolm_clusterSegMakerNSW
ToolHandle< ICscSegmentFinderm_csc2dSegmentFinder
ToolHandle< ICscSegmentFinderm_csc4dSegmentFinder
ToolHandle< Muon::IMuonSegmentSelectionToolm_segmentSelector
SG::WriteHandleKey< Trk::SegmentCollectionm_segmentCollectionKey
SG::WriteHandleKey< Trk::SegmentCollectionm_segmentNSWCollectionKey
SG::ReadHandleKey< Muon::CscPrepDataContainerm_cscPrdsKey
SG::ReadHandleKey< MuonPatternCombinationCollectionm_patternCollKey
Gaudi::Property< bool > m_printSummary {this, "PrintSummary", false}
Gaudi::Property< bool > m_doFullFinder {this, "FullFinder", true}
 Run segment finding with eta / phi determination.
Gaudi::Property< bool > m_runMdtSegments {this, "doMdtSegments", true}
 Run the Mdt segment maker (Switched of the NCB systems)
Gaudi::Property< bool > m_doSTgcSegments {this, "doStgcSegments", true}
 Run the NSW segment maker.
Gaudi::Property< bool > m_doMMSegments {this, "doMMSegments", true}
Gaudi::Property< bool > m_removeUsedNswHits {this, "removeUsedNSW", true}
 If switched to true, hits that have been already successfully combined to a segment are removed from future searches.
Gaudi::Property< int > m_segQuality {this, "SegmentQuality", -1}
 Apply a preselection on the segments.
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 22 of file MuonSegmentFinderAlg.h.

Member Typedef Documentation

◆ NSWSegmentCache

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~MuonSegmentFinderAlg()

virtual MuonSegmentFinderAlg::~MuonSegmentFinderAlg ( )
virtualdefault

Member Function Documentation

◆ appendSegmentsFromCombi()

void MuonSegmentFinderAlg::appendSegmentsFromCombi ( const std::unique_ptr< MuonSegmentCombinationCollection > & combi_coll,
Trk::SegmentCollection * segments ) const
private

Push back the output containers

Definition at line 132 of file MuonSegmentFinderAlg.cxx.

133 {
134 if (!combi_coll) return;
136 for (const Muon::MuonSegmentCombination* combi: *combi_coll) {
137 if (!combi) {
138 ATH_MSG_WARNING(" empty MuonSegmentCombination!!! ");
139 continue;
140 }
141 const unsigned int nstations = combi->numberOfStations();
142 const bool useEta = combi->useStripsInSegment(1);
143 const bool usePhi = combi->useStripsInSegment(0);
144
145 // loop over chambers in combi and extract segments
146 for (unsigned int i = 0; i < nstations; ++i) {
147 // loop over segments in station
148 Muon::MuonSegmentCombination::SegmentVec* segments = combi->stationSegments(i);
149 // check if not empty
150 if (!segments || segments->empty()) continue;
151 // loop over new segments, copy them into collection
152 for (std::unique_ptr<Muon::MuonSegment>& seg : *segments) {
153 if(m_segQuality >=0 && !m_segmentSelector->select(*seg, false, m_segQuality, useEta, usePhi)) continue;
154 ATH_MSG_VERBOSE("Append segment "<<std::endl<<m_printer->print(seg->containedMeasurements()));
155 segmentContainer->push_back(std::move(seg));
156 }
157
158 }
159 }
160}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Gaudi::Property< int > m_segQuality
Apply a preselection on the segments.
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
ToolHandle< Muon::IMuonSegmentSelectionTool > m_segmentSelector
std::vector< std::unique_ptr< MuonSegment > > SegmentVec

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ createCscSegments()

StatusCode MuonSegmentFinderAlg::createCscSegments ( const EventContext & ctx,
std::unique_ptr< MuonSegmentCombinationCollection > & csc4dSegmentCombinations ) const
private

Retrieve the raw outputs from the Csc segment makers for the curved combination.

Definition at line 115 of file MuonSegmentFinderAlg.cxx.

116 {
117
118 const Muon::CscPrepDataContainer* cscPrds{nullptr};
119 ATH_CHECK(SG::get(cscPrds, m_cscPrdsKey, ctx));
120 if (!cscPrds) return StatusCode::SUCCESS;
121
122 std::vector<const Muon::CscPrepDataCollection*> cscCols;
123 std::copy_if(cscPrds->begin(),cscPrds->end(), std::back_inserter(cscCols), [](const Muon::CscPrepDataCollection* coll) {return !coll->empty();});
124 ATH_MSG_DEBUG("Retrieved CscPrepDataContainer " << cscCols.size());
125 if (cscCols.empty()) return StatusCode::SUCCESS;
126 std::unique_ptr<MuonSegmentCombinationCollection> csc2dSegmentCombinations = m_csc2dSegmentFinder->find(cscCols, ctx);
127 if (!csc2dSegmentCombinations) return StatusCode::SUCCESS;
128
129 csc4dSegmentCombinations = m_csc4dSegmentFinder->find(*csc2dSegmentCombinations, ctx);
130 return StatusCode::SUCCESS;
131}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_cscPrdsKey
ToolHandle< ICscSegmentFinder > m_csc4dSegmentFinder
ToolHandle< ICscSegmentFinder > m_csc2dSegmentFinder
MuonPrepDataCollection< CscPrepData > CscPrepDataCollection
MuonPrepDataContainerT< CscPrepData > CscPrepDataContainer
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.

◆ createNSWSegments()

void MuonSegmentFinderAlg::createNSWSegments ( const EventContext & ctx,
const Muon::MuonPatternCombination * patt,
NSWSegmentCache & cache ) const
private

Constrain to NSW hits

Definition at line 161 of file MuonSegmentFinderAlg.cxx.

163 {
164 // turn the PRD into MuonCluster
165 if (!m_doSTgcSegments && !m_doMMSegments) return;
166 std::map<int, std::vector<std::unique_ptr<const Muon::MuonClusterOnTrack>> > clustersPerSector;
167
168
169 for (const Muon::MuonPatternChamberIntersect& it :patt->chamberData()) {
170 if (it.prepRawDataVec().empty()) continue;
171
172 const Identifier id = it.prepRawDataVec().front()->identify();
173 const int sector = m_idHelperSvc->sector(id);
175 if (!m_idHelperSvc->isMM(id) && !m_idHelperSvc->issTgc(id)) continue;
176 for (const Trk::PrepRawData* pit : it.prepRawDataVec()) {
177 const Muon::MuonCluster* cl = dynamic_cast<const Muon::MuonCluster*>(pit);
178 if (!cl) continue;
179 else if (!m_doMMSegments && m_idHelperSvc->isMM(cl->identify())) continue;
180 else if (!m_doSTgcSegments && m_idHelperSvc->issTgc(cl->identify())) continue;
181 else if (m_removeUsedNswHits && cache.usedHits.count(cl->identify())) continue;
182 const Muon::MuonClusterOnTrack* newCluster = m_clusterCreator->createRIO_OnTrack(*cl, cl->globalPosition());
183 if (!newCluster) continue;
184 std::vector<std::unique_ptr<const Muon::MuonClusterOnTrack>>& clusters = clustersPerSector[sector];
185 clusters.emplace_back(newCluster);
186 }
187 }
188 for (auto&[sector, clusters] :clustersPerSector) {
189 ATH_MSG_VERBOSE("Run segment making on sector "<<sector);
190 cache.inputClust = std::move(clusters);
191 m_clusterSegMakerNSW->find(ctx, cache);
192 }
193}
Gaudi::Property< bool > m_doMMSegments
ToolHandle< Muon::IMuonNSWSegmentFinderTool > m_clusterSegMakerNSW
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< bool > m_removeUsedNswHits
If switched to true, hits that have been already successfully combined to a segment are removed from ...
ToolHandle< Muon::IMuonClusterOnTrackCreator > m_clusterCreator
Gaudi::Property< bool > m_doSTgcSegments
Run the NSW segment maker.
const std::vector< MuonPatternChamberIntersect > & chamberData() const
access to the MuonPatternChamberIntersect associated with the MuonPatternCombination
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]

◆ createSegmentsWithMDTs()

StatusCode MuonSegmentFinderAlg::createSegmentsWithMDTs ( const EventContext & ctx,
const Muon::MuonPatternCombination * patt,
Trk::SegmentCollection * segs ) const
private

Definition at line 195 of file MuonSegmentFinderAlg.cxx.

197 {
198
199 if (!m_runMdtSegments) {
200 ATH_MSG_DEBUG("Do not search segments in the Mdt part of the muon spectrometer");
201 return StatusCode::SUCCESS;
202 }
203
204 bool hasPhiMeasurements = m_patternCalibration->checkForPhiMeasurements(*patcomb);
206 ATH_CHECK(m_patternCalibration->calibrate(ctx, *patcomb, hitsPerRegion));
208 using ROTRegion = Muon::IMuonPatternCalibration::ROTRegion;
209 for (const ROTRegion& region : hitsPerRegion) {
210 for (const MdtVec& mdts : region.mdts()) {
211 if (mdts.empty()) continue;
212 ATH_MSG_VERBOSE("Calling segment finding for sector " << m_idHelperSvc->chamberNameString(mdts.front()->identify()));
213 // fit the segments
214 if (m_doFullFinder) {
215 if (msgLvl(MSG::VERBOSE)){
216 std::vector<const Trk::MeasurementBase*> meas {};
217 meas.insert(meas.end(), mdts.begin(), mdts.end());
218 meas.insert(meas.end(), region.clusters().begin(), region.clusters().end());
219 ATH_MSG_VERBOSE("Call segment maker with road pos: "<<Amg::toString(region.regionPos)
220 << " road dir: "<<Amg::toString(region.regionDir)
221 <<" nMdts: "<<mdts.size()<<" nClusters "<<region.clusters().size()
222 <<std::endl<<m_printer->print(meas));
223
224 }
225 m_segmentMaker->find(region.regionPos, region.regionDir, mdts, region.clusters(), hasPhiMeasurements, segs,
226 region.regionDir.mag());
227 } else {
228 std::vector<const Trk::RIO_OnTrack*> rios;
229 rios.insert(rios.begin(), mdts.begin(), mdts.end());
230 m_segmentMaker->find(rios, segs);
231 }
232 } // end loop on hits per region
233 }
234 return StatusCode::SUCCESS;
235}
bool msgLvl(const MSG::Level lvl) const
Gaudi::Property< bool > m_runMdtSegments
Run the Mdt segment maker (Switched of the NCB systems)
Gaudi::Property< bool > m_doFullFinder
Run segment finding with eta / phi determination.
ToolHandle< Muon::IMuonSegmentMaker > m_segmentMaker
ToolHandle< Muon::IMuonPatternCalibration > m_patternCalibration
std::vector< const MdtDriftCircleOnTrack * > MdtVec
std::vector< ROTRegion > ROTsPerRegion
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode MuonSegmentFinderAlg::execute ( const EventContext & ctx) const
overridevirtual

Move the segments into the output

Get rid of all the duplicates in the segment container

Definition at line 47 of file MuonSegmentFinderAlg.cxx.

47 {
48
49 NSWSegmentCache nswCache{};
50 nswCache.buildQuads = !m_segmentNSWCollectionKey.empty();
51
52 std::unique_ptr<Trk::SegmentCollection> segmentContainer = std::make_unique<Trk::SegmentCollection>();
53 std::unique_ptr<Trk::SegmentCollection> nswSegmentContainer = !m_segmentNSWCollectionKey.empty() ? std::make_unique<Trk::SegmentCollection>()
54 : nullptr;
55
56
57 const MuonPatternCombinationCollection* patternColl{nullptr};
58 ATH_CHECK(SG::get(patternColl, m_patternCollKey, ctx));
59 ATH_MSG_DEBUG("Processing the pattern collections with " << patternColl->size() << " Collections ");
60
61 for (const Muon::MuonPatternCombination* patt : *patternColl) {
62 ATH_MSG_DEBUG("Working on pattern combination " << m_printer->print(*patt));
63 // check the technology & call the corresponding segment finder
64
65 ATH_CHECK(createSegmentsWithMDTs(ctx, patt, segmentContainer.get()));
66
67
68 createNSWSegments(ctx, patt, nswCache);
69
71 segmentContainer->insert(segmentContainer->end(), std::make_move_iterator(nswCache.constructedSegs.begin()),
72 std::make_move_iterator(nswCache.constructedSegs.end()));
73
74 nswCache.constructedSegs.clear();
75
76 if (!nswSegmentContainer) continue;
77 nswSegmentContainer->insert(nswSegmentContainer->end(), std::make_move_iterator(nswCache.quadSegs.begin()),
78 std::make_move_iterator(nswCache.quadSegs.end()));
79 nswCache.quadSegs.clear();
80
81 } // end loop on pattern combinations
82
83 m_segmentOverlapRemovalTool->removeDuplicates(*segmentContainer);
84
85 std::unique_ptr<MuonSegmentCombinationCollection> csc4dSegmentCombinations{};
86 ATH_CHECK(createCscSegments(ctx, csc4dSegmentCombinations));
87 appendSegmentsFromCombi(csc4dSegmentCombinations, segmentContainer.get());
88
90 ATH_MSG_DEBUG("segments before overlap removal: " << segmentContainer->size());
91 m_segmentOverlapRemovalTool->removeDuplicates(*segmentContainer);
92 ATH_MSG_DEBUG(" Segments after overlap removal: " << segmentContainer->size());
93
94
95 if (m_printSummary){
96 ATH_MSG_INFO("Number of segments found " << segmentContainer->size());
97 for (Trk::Segment* tseg : *segmentContainer) {
98 const Muon::MuonSegment* mseg{dynamic_cast<Muon::MuonSegment*>(tseg)};
99 ATH_MSG_INFO(m_printer->print(*mseg)<<std::endl<<m_printer->print(mseg->containedMeasurements())<<std::endl);
100 }
101 }
102
103
104 SG::WriteHandle<Trk::SegmentCollection> handle(m_segmentCollectionKey, ctx);
105 ATH_CHECK(handle.record(std::move(segmentContainer)));
106
107 if (!m_segmentNSWCollectionKey.empty()) {
108 m_segmentOverlapRemovalTool->removeDuplicates(*nswSegmentContainer);
109 SG::WriteHandle<Trk::SegmentCollection> handle_segNSW(m_segmentNSWCollectionKey, ctx);
110 ATH_CHECK(handle_segNSW.record(std::move(nswSegmentContainer)));
111 }
112 return StatusCode::SUCCESS;
113} // execute
#define ATH_MSG_INFO(x)
DataVector< Muon::MuonPatternCombination > MuonPatternCombinationCollection
This typedef represents a collection of MuonPatternCombination objects.
size_type size() const noexcept
Returns the number of elements in the collection.
SG::ReadHandleKey< MuonPatternCombinationCollection > m_patternCollKey
StatusCode createCscSegments(const EventContext &ctx, std::unique_ptr< MuonSegmentCombinationCollection > &csc4dSegmentCombinations) const
Retrieve the raw outputs from the Csc segment makers for the curved combination.
void appendSegmentsFromCombi(const std::unique_ptr< MuonSegmentCombinationCollection > &combi_coll, Trk::SegmentCollection *segments) const
SG::WriteHandleKey< Trk::SegmentCollection > m_segmentCollectionKey
StatusCode createSegmentsWithMDTs(const EventContext &ctx, const Muon::MuonPatternCombination *patt, Trk::SegmentCollection *segs) const
SG::WriteHandleKey< Trk::SegmentCollection > m_segmentNSWCollectionKey
Muon::IMuonNSWSegmentFinderTool::SegmentMakingCache NSWSegmentCache
Gaudi::Property< bool > m_printSummary
void createNSWSegments(const EventContext &ctx, const Muon::MuonPatternCombination *patt, NSWSegmentCache &cache) const
ToolHandle< Muon::IMuonSegmentOverlapRemovalTool > m_segmentOverlapRemovalTool
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode MuonSegmentFinderAlg::initialize ( )
overridevirtual

MDT segments

Initialize the alignment container in the NSW

Definition at line 23 of file MuonSegmentFinderAlg.cxx.

23 {
24 ATH_CHECK(m_idHelperSvc.retrieve());
25 ATH_CHECK(m_printer.retrieve());
27 ATH_CHECK(m_segmentSelector.retrieve(DisableTool{m_segQuality<0}));
29 ATH_CHECK(m_patternCalibration.retrieve(DisableTool{!m_runMdtSegments}));
30 ATH_CHECK(m_segmentMaker.retrieve(DisableTool{!m_runMdtSegments}));
31
32 const bool doNSW = m_doSTgcSegments || m_doMMSegments;
33 ATH_CHECK(m_clusterCreator.retrieve(DisableTool{!doNSW}));
34 ATH_CHECK(m_clusterSegMakerNSW.retrieve(DisableTool{!doNSW}));
35 ATH_CHECK(m_csc2dSegmentFinder.retrieve(DisableTool{m_cscPrdsKey.empty()}));
36 ATH_CHECK(m_csc4dSegmentFinder.retrieve(DisableTool{m_cscPrdsKey.empty()}));
37
41 ATH_CHECK(m_cscPrdsKey.initialize(!m_cscPrdsKey.empty())); // check for layouts without CSCs
42 ATH_CHECK(m_patternCollKey.initialize());
43
44 return StatusCode::SUCCESS;
45}

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ 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< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_ERROR(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_clusterCreator

ToolHandle<Muon::IMuonClusterOnTrackCreator> MuonSegmentFinderAlg::m_clusterCreator
private
Initial value:
{
this,
"MuonClusterCreator",
"Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator",
}

Definition at line 58 of file MuonSegmentFinderAlg.h.

58 {
59 this,
60 "MuonClusterCreator",
61 "Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator",
62 }; //<! pointer to muon cluster rio ontrack creator

◆ m_clusterSegMakerNSW

ToolHandle<Muon::IMuonNSWSegmentFinderTool> MuonSegmentFinderAlg::m_clusterSegMakerNSW
private
Initial value:
{
this,
"NSWSegmentMaker",
"",
}

Definition at line 63 of file MuonSegmentFinderAlg.h.

63 {
64 this,
65 "NSWSegmentMaker",
66 "",
67 };

◆ m_csc2dSegmentFinder

ToolHandle<ICscSegmentFinder> MuonSegmentFinderAlg::m_csc2dSegmentFinder
private
Initial value:
{
this,
"Csc2dSegmentMaker",
"Csc2dSegmentMaker/Csc2dSegmentMaker",
}

Definition at line 68 of file MuonSegmentFinderAlg.h.

68 {
69 this,
70 "Csc2dSegmentMaker",
71 "Csc2dSegmentMaker/Csc2dSegmentMaker",
72 };

◆ m_csc4dSegmentFinder

ToolHandle<ICscSegmentFinder> MuonSegmentFinderAlg::m_csc4dSegmentFinder
private
Initial value:
{
this,
"Csc4dSegmentMaker",
"Csc4dSegmentMaker/Csc4dSegmentMaker",
}

Definition at line 73 of file MuonSegmentFinderAlg.h.

73 {
74 this,
75 "Csc4dSegmentMaker",
76 "Csc4dSegmentMaker/Csc4dSegmentMaker",
77 };

◆ m_cscPrdsKey

SG::ReadHandleKey<Muon::CscPrepDataContainer> MuonSegmentFinderAlg::m_cscPrdsKey
private
Initial value:
{
this,
"CSC_clusterkey",
"CSC_Clusters",
"CSC PRDs",
}

Definition at line 95 of file MuonSegmentFinderAlg.h.

95 {
96 this,
97 "CSC_clusterkey",
98 "CSC_Clusters",
99 "CSC PRDs",
100 };

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doFullFinder

Gaudi::Property<bool> MuonSegmentFinderAlg::m_doFullFinder {this, "FullFinder", true}
private

Run segment finding with eta / phi determination.

Definition at line 127 of file MuonSegmentFinderAlg.h.

127{this, "FullFinder", true};

◆ m_doMMSegments

Gaudi::Property<bool> MuonSegmentFinderAlg::m_doMMSegments {this, "doMMSegments", true}
private

Definition at line 132 of file MuonSegmentFinderAlg.h.

132{this, "doMMSegments", true};

◆ m_doSTgcSegments

Gaudi::Property<bool> MuonSegmentFinderAlg::m_doSTgcSegments {this, "doStgcSegments", true}
private

Run the NSW segment maker.

Definition at line 131 of file MuonSegmentFinderAlg.h.

131{this, "doStgcSegments", true};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonSegmentFinderAlg::m_idHelperSvc
private
Initial value:
{
this,
"MuonIdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc",
}

Definition at line 32 of file MuonSegmentFinderAlg.h.

32 {
33 this,
34 "MuonIdHelperSvc",
35 "Muon::MuonIdHelperSvc/MuonIdHelperSvc",
36 };

◆ m_patternCalibration

ToolHandle<Muon::IMuonPatternCalibration> MuonSegmentFinderAlg::m_patternCalibration
private
Initial value:
{
this,
"MuonPatternCalibration",
"Muon::MuonPatternCalibration/MuonPatternCalibration",
}

Definition at line 43 of file MuonSegmentFinderAlg.h.

43 {
44 this,
45 "MuonPatternCalibration",
46 "Muon::MuonPatternCalibration/MuonPatternCalibration",
47 };

◆ m_patternCollKey

SG::ReadHandleKey<MuonPatternCombinationCollection> MuonSegmentFinderAlg::m_patternCollKey
private
Initial value:
{
this,
"MuonLayerHoughCombisKey",
"MuonLayerHoughCombis",
"Hough combinations",
}

Definition at line 101 of file MuonSegmentFinderAlg.h.

101 {
102 this,
103 "MuonLayerHoughCombisKey",
104 "MuonLayerHoughCombis",
105 "Hough combinations",
106 };

◆ m_printer

PublicToolHandle<Muon::MuonEDMPrinterTool> MuonSegmentFinderAlg::m_printer
private
Initial value:
{
this,
"EDMPrinter",
"Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
}

Definition at line 38 of file MuonSegmentFinderAlg.h.

38 {
39 this,
40 "EDMPrinter",
41 "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
42 }; //<! helper printer tool

◆ m_printSummary

Gaudi::Property<bool> MuonSegmentFinderAlg::m_printSummary {this, "PrintSummary", false}
private

Definition at line 124 of file MuonSegmentFinderAlg.h.

124{this, "PrintSummary", false};

◆ m_removeUsedNswHits

Gaudi::Property<bool> MuonSegmentFinderAlg::m_removeUsedNswHits {this, "removeUsedNSW", true}
private

If switched to true, hits that have been already successfully combined to a segment are removed from future searches.

Definition at line 135 of file MuonSegmentFinderAlg.h.

135{this, "removeUsedNSW", true};

◆ m_runMdtSegments

Gaudi::Property<bool> MuonSegmentFinderAlg::m_runMdtSegments {this, "doMdtSegments", true}
private

Run the Mdt segment maker (Switched of the NCB systems)

Definition at line 129 of file MuonSegmentFinderAlg.h.

129{this, "doMdtSegments", true};

◆ m_segmentCollectionKey

SG::WriteHandleKey<Trk::SegmentCollection> MuonSegmentFinderAlg::m_segmentCollectionKey
private
Initial value:
{
this,
"SegmentCollectionName",
"TrackMuonSegments",
"Muon Segments",
}

Definition at line 83 of file MuonSegmentFinderAlg.h.

83 {
84 this,
85 "SegmentCollectionName",
86 "TrackMuonSegments",
87 "Muon Segments",
88 };

◆ m_segmentMaker

ToolHandle<Muon::IMuonSegmentMaker> MuonSegmentFinderAlg::m_segmentMaker
private
Initial value:
{
this,
"SegmentMaker",
"Muon::DCMathSegmentMaker/DCMathSegmentMaker",
}

Definition at line 48 of file MuonSegmentFinderAlg.h.

48 {
49 this,
50 "SegmentMaker",
51 "Muon::DCMathSegmentMaker/DCMathSegmentMaker",
52 };

◆ m_segmentNSWCollectionKey

SG::WriteHandleKey<Trk::SegmentCollection> MuonSegmentFinderAlg::m_segmentNSWCollectionKey
private
Initial value:
{
this,
"NSWSegmentCollectionName",
"TrackMuonNSWSegments",
"WriteHandleKey for NSW Segments",
}

Definition at line 89 of file MuonSegmentFinderAlg.h.

89 { //this collection of segments are used to perform the alignment of the NSW
90 this,
91 "NSWSegmentCollectionName",
92 "TrackMuonNSWSegments",
93 "WriteHandleKey for NSW Segments",
94 };

◆ m_segmentOverlapRemovalTool

ToolHandle<Muon::IMuonSegmentOverlapRemovalTool> MuonSegmentFinderAlg::m_segmentOverlapRemovalTool
private
Initial value:
{
this,
"MuonSegmentOverlapRemovalTool",
"Muon::MuonSegmentOverlapRemovalTool/MuonSegmentOverlapRemovalTool",
}

Definition at line 53 of file MuonSegmentFinderAlg.h.

53 {
54 this,
55 "MuonSegmentOverlapRemovalTool",
56 "Muon::MuonSegmentOverlapRemovalTool/MuonSegmentOverlapRemovalTool",
57 };

◆ m_segmentSelector

ToolHandle<Muon::IMuonSegmentSelectionTool> MuonSegmentFinderAlg::m_segmentSelector
private
Initial value:
{this, "SegmentSelector",
"Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool"}

Definition at line 79 of file MuonSegmentFinderAlg.h.

79 {this, "SegmentSelector",
80 "Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool"};

◆ m_segQuality

Gaudi::Property<int> MuonSegmentFinderAlg::m_segQuality {this, "SegmentQuality", -1}
private

Apply a preselection on the segments.

Definition at line 137 of file MuonSegmentFinderAlg.h.

137{this, "SegmentQuality", -1};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: