ATLAS Offline Software
MuonSegmentFinderAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MOOSEGMENTFINDERS_MUOSEGMENTFINDERALGS_H
6 #define MOOSEGMENTFINDERS_MUOSEGMENTFINDERALGS_H
7 
21 
23 public:
24  MuonSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator);
25 
26  virtual ~MuonSegmentFinderAlg() = default;
27 
28  virtual StatusCode initialize() override;
29  virtual StatusCode execute(const EventContext& ctx) const override;
30 
31 private:
33  this,
34  "MuonIdHelperSvc",
35  "Muon::MuonIdHelperSvc/MuonIdHelperSvc",
36  };
37 
38  ToolHandle<Muon::MuonEDMPrinterTool> m_printer{
39  this,
40  "EDMPrinter",
41  "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
42  }; //<! helper printer tool
43  ToolHandle<Muon::IMuonPatternCalibration> m_patternCalibration{
44  this,
45  "MuonPatternCalibration",
46  "Muon::MuonPatternCalibration/MuonPatternCalibration",
47  };
48  ToolHandle<Muon::IMuonSegmentMaker> m_segmentMaker{
49  this,
50  "SegmentMaker",
51  "Muon::DCMathSegmentMaker/DCMathSegmentMaker",
52  };
53  ToolHandle<Muon::IMuonSegmentOverlapRemovalTool> m_segmentOverlapRemovalTool{
54  this,
55  "MuonSegmentOverlapRemovalTool",
56  "Muon::MuonSegmentOverlapRemovalTool/MuonSegmentOverlapRemovalTool",
57  };
58  ToolHandle<Muon::IMuonClusterOnTrackCreator> m_clusterCreator{
59  this,
60  "MuonClusterCreator",
61  "Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator",
62  }; //<! pointer to muon cluster rio ontrack creator
63  ToolHandle<Muon::IMuonNSWSegmentFinderTool> m_clusterSegMakerNSW{
64  this,
65  "NSWSegmentMaker",
66  "",
67  };
68  ToolHandle<ICscSegmentFinder> m_csc2dSegmentFinder{
69  this,
70  "Csc2dSegmentMaker",
71  "Csc2dSegmentMaker/Csc2dSegmentMaker",
72  };
73  ToolHandle<ICscSegmentFinder> m_csc4dSegmentFinder{
74  this,
75  "Csc4dSegmentMaker",
76  "Csc4dSegmentMaker/Csc4dSegmentMaker",
77  };
78 
79  ToolHandle<Muon::IMuonSegmentSelectionTool> m_segmentSelector{this, "SegmentSelector",
80  "Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool"};
81 
82  // the following Trk::SegmentCollection MuonSegments are standard MuonSegments, the MuGirl segments are stored in MuonCreatorAlg.h
84  this,
85  "SegmentCollectionName",
86  "TrackMuonSegments",
87  "Muon Segments",
88  };
89  SG::WriteHandleKey<Trk::SegmentCollection> m_segmentNSWCollectionKey{ //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  };
96  this,
97  "CSC_clusterkey",
98  "CSC_Clusters",
99  "CSC PRDs",
100  };
102  this,
103  "MuonLayerHoughCombisKey",
104  "MuonLayerHoughCombis",
105  "Hough combinations",
106  };
107 
108  StatusCode createSegmentsWithMDTs(const EventContext& ctx, const Muon::MuonPatternCombination* patt, Trk::SegmentCollection* segs) const;
109 
110 
112  void createNSWSegments(const EventContext& ctx,
113  const Muon::MuonPatternCombination* patt,
114  NSWSegmentCache& cache) const;
115 
117  StatusCode createCscSegments(const EventContext& ctx,
118  std::unique_ptr<MuonSegmentCombinationCollection>& csc4dSegmentCombinations) const;
119 
120  void appendSegmentsFromCombi(const std::unique_ptr<MuonSegmentCombinationCollection>& combi_coll,
121  Trk::SegmentCollection* segments) const;
122 
123 
124  Gaudi::Property<bool> m_printSummary{this, "PrintSummary", false};
125 
127  Gaudi::Property<bool> m_doFullFinder{this, "FullFinder", true};
129  Gaudi::Property<bool> m_runMdtSegments{this, "doMdtSegments", true};
131  Gaudi::Property<bool> m_doSTgcSegments{this, "doStgcSegments", true};
132  Gaudi::Property<bool> m_doMMSegments{this, "doMMSegments", true};
135  Gaudi::Property<bool> m_removeUsedNswHits{this, "removeUsedNSW", true};
137  Gaudi::Property<int> m_segQuality{this, "SegmentQuality", -1};
138 
141  template <class ContType> StatusCode loadFromStoreGate(const EventContext& ctx,
143  const ContType* & cont_ptr) const;
144 };
145 
146 #endif
MuonSegmentFinderAlg::m_segQuality
Gaudi::Property< int > m_segQuality
Apply a preselection on the segments.
Definition: MuonSegmentFinderAlg.h:137
MuonSegmentFinderAlg::appendSegmentsFromCombi
void appendSegmentsFromCombi(const std::unique_ptr< MuonSegmentCombinationCollection > &combi_coll, Trk::SegmentCollection *segments) const
Definition: MuonSegmentFinderAlg.cxx:133
MuonSegmentFinderAlg
Definition: MuonSegmentFinderAlg.h:22
MuonSegmentFinderAlg::m_doMMSegments
Gaudi::Property< bool > m_doMMSegments
Definition: MuonSegmentFinderAlg.h:132
MuonPatternChamberIntersect.h
MuonSegmentFinderAlg::initialize
virtual StatusCode initialize() override
Definition: MuonSegmentFinderAlg.cxx:24
MuonSegmentFinderAlg::MuonSegmentFinderAlg
MuonSegmentFinderAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MuonSegmentFinderAlg.cxx:22
MuonEDMPrinterTool.h
MuonSegmentFinderAlg::m_clusterCreator
ToolHandle< Muon::IMuonClusterOnTrackCreator > m_clusterCreator
Definition: MuonSegmentFinderAlg.h:58
MuonSegmentFinderAlg::m_csc4dSegmentFinder
ToolHandle< ICscSegmentFinder > m_csc4dSegmentFinder
Definition: MuonSegmentFinderAlg.h:73
MuonSegmentFinderAlg::m_patternCalibration
ToolHandle< Muon::IMuonPatternCalibration > m_patternCalibration
Definition: MuonSegmentFinderAlg.h:43
MuonSegmentFinderAlg::m_segmentSelector
ToolHandle< Muon::IMuonSegmentSelectionTool > m_segmentSelector
Definition: MuonSegmentFinderAlg.h:79
MuonSegmentFinderAlg::m_segmentCollectionKey
SG::WriteHandleKey< Trk::SegmentCollection > m_segmentCollectionKey
Definition: MuonSegmentFinderAlg.h:83
MuonSegmentFinderAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSegmentFinderAlg.h:32
IMuonSegmentOverlapRemovalTool.h
MuonSegmentFinderAlg::m_cscPrdsKey
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_cscPrdsKey
Definition: MuonSegmentFinderAlg.h:95
MuonSegmentFinderAlg::m_doFullFinder
Gaudi::Property< bool > m_doFullFinder
Run segment finding with eta / phi determination.
Definition: MuonSegmentFinderAlg.h:127
MuonSegmentFinderAlg::m_printer
ToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonSegmentFinderAlg.h:38
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
MuonSegmentFinderAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: MuonSegmentFinderAlg.cxx:48
MuonSegmentFinderAlg::m_removeUsedNswHits
Gaudi::Property< bool > m_removeUsedNswHits
If switched to true, hits that have been already successfully combined to a segment are removed from ...
Definition: MuonSegmentFinderAlg.h:135
MuonSegmentFinderAlg::loadFromStoreGate
StatusCode loadFromStoreGate(const EventContext &ctx, const SG::ReadHandleKey< ContType > &key, const ContType *&cont_ptr) const
load the container from storegate given a ReadHandleKey.
Definition: MuonSegmentFinderAlg.cxx:237
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
MuonSegmentFinderAlg::m_doSTgcSegments
Gaudi::Property< bool > m_doSTgcSegments
Run the NSW segment maker.
Definition: MuonSegmentFinderAlg.h:131
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
MuonSegmentFinderAlg::createSegmentsWithMDTs
StatusCode createSegmentsWithMDTs(const EventContext &ctx, const Muon::MuonPatternCombination *patt, Trk::SegmentCollection *segs) const
Definition: MuonSegmentFinderAlg.cxx:196
MuonSegmentFinderAlg::~MuonSegmentFinderAlg
virtual ~MuonSegmentFinderAlg()=default
IMuonSegmentSelectionTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IMuonNSWSegmentFinderTool.h
MuonSegmentCombinationCollection.h
IMuonClusterOnTrackCreator.h
MuonSegmentFinderAlg::m_printSummary
Gaudi::Property< bool > m_printSummary
Definition: MuonSegmentFinderAlg.h:124
DataVector< Trk::Segment >
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MuonSegmentFinderAlg::m_segmentMaker
ToolHandle< Muon::IMuonSegmentMaker > m_segmentMaker
Definition: MuonSegmentFinderAlg.h:48
MuonSegmentFinderAlg::createNSWSegments
void createNSWSegments(const EventContext &ctx, const Muon::MuonPatternCombination *patt, NSWSegmentCache &cache) const
Definition: MuonSegmentFinderAlg.cxx:162
MuonSegmentFinderAlg::m_csc2dSegmentFinder
ToolHandle< ICscSegmentFinder > m_csc2dSegmentFinder
Definition: MuonSegmentFinderAlg.h:68
MuonSegmentFinderAlg::m_segmentOverlapRemovalTool
ToolHandle< Muon::IMuonSegmentOverlapRemovalTool > m_segmentOverlapRemovalTool
Definition: MuonSegmentFinderAlg.h:53
IMuonPatternCalibration.h
MuonSegmentFinderAlg::m_segmentNSWCollectionKey
SG::WriteHandleKey< Trk::SegmentCollection > m_segmentNSWCollectionKey
Definition: MuonSegmentFinderAlg.h:89
Muon::IMuonNSWSegmentFinderTool::SegmentMakingCache
Helper struct to parse the data around.
Definition: IMuonNSWSegmentFinderTool.h:31
Muon::MuonPatternCombination
The MuonPatternCombination class provides the means to store the output of the initial global pattern...
Definition: MuonPatternCombination.h:29
MuonSegmentFinderAlg::m_patternCollKey
SG::ReadHandleKey< MuonPatternCombinationCollection > m_patternCollKey
Definition: MuonSegmentFinderAlg.h:101
MuonSegmentFinderAlg::createCscSegments
StatusCode createCscSegments(const EventContext &ctx, std::unique_ptr< MuonSegmentCombinationCollection > &csc4dSegmentCombinations) const
Retrieve the raw outputs from the Csc segment makers for the curved combination.
Definition: MuonSegmentFinderAlg.cxx:116
MuonSegmentFinderAlg::m_clusterSegMakerNSW
ToolHandle< Muon::IMuonNSWSegmentFinderTool > m_clusterSegMakerNSW
Definition: MuonSegmentFinderAlg.h:63
IMuonIdHelperSvc.h
SegmentCollection.h
ICscSegmentFinder.h
IMuonSegmentMaker.h
ServiceHandle< Muon::IMuonIdHelperSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
MuonSegmentFinderAlg::m_runMdtSegments
Gaudi::Property< bool > m_runMdtSegments
Run the Mdt segment maker (Switched of the NCB systems)
Definition: MuonSegmentFinderAlg.h:129