ATLAS Offline Software
MuonSegmentOverlapRemovalTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUON_MUONSEGMENTSOVERLAPREMOVALTOOL_H
6 #define MUON_MUONSEGMENTSOVERLAPREMOVALTOOL_H
7 
9 #include "GaudiKernel/ServiceHandle.h"
10 #include "GaudiKernel/ToolHandle.h"
16 
17 namespace Muon {
18 
19  class MuonSegment;
20 
26  public:
28  MuonSegmentOverlapRemovalTool(const std::string&, const std::string&, const IInterface*);
29 
31  virtual ~MuonSegmentOverlapRemovalTool() = default;
32 
34  StatusCode initialize() override;
35 
38  void removeDuplicates(Trk::SegmentCollection& segments) const override;
39 
43  std::unique_ptr<MuonSegmentCombination> removeDuplicates(const MuonSegmentCombination& combi) const override;
44 
45  typedef std::vector<MuonSegment*> SegVec;
46 
47  private:
48  // this is only needed now by the call to remove duplicates from a MuonSegmentCombination
49  // cleaning of MuonSegmentCombinations is turned off, so perhaps this can be removed entirely
51 
53  this,
54  "MuonIdHelperSvc",
55  "Muon::MuonIdHelperSvc/MuonIdHelperSvc",
56  };
58  this,
59  "edmHelper",
60  "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
61  "Handle to the service providing the IMuonEDMHelperSvc interface",
62  };
63 
64  ToolHandle<Muon::MuonEDMPrinterTool> m_printer{
65  this,
66  "Printer",
67  "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
68  };
69 
70  Gaudi::Property<bool> m_removePartialOverlaps{
71  this, "RemovePartialOverlaps", true,
72  "removal partial overlaps between segments"};
73  Gaudi::Property<double> m_overlapFractionCut{
74  this, "OverlapFractionCut", 0.8,
75  "Cut overlap fraction, if fraction is smaller than cut both segments are kept"};
76  };
77 
78 } // namespace Muon
79 
80 #endif
Muon::MuonSegmentOverlapRemovalTool::initialize
StatusCode initialize() override
AlgTool initilize.
Definition: MuonSegmentOverlapRemovalTool.cxx:19
Muon::MuonSegmentCombination
Definition: MuonSegmentCombination.h:30
Muon::MuonSegmentOverlapRemovalTool
tool to remove overlaps between segments
Definition: MuonSegmentOverlapRemovalTool.h:25
MuonEDMPrinterTool.h
Muon::MuonSegmentOverlapRemovalTool::MuonSegmentOverlapRemovalTool
MuonSegmentOverlapRemovalTool(const std::string &, const std::string &, const IInterface *)
constructor
Definition: MuonSegmentOverlapRemovalTool.cxx:14
IMuonSegmentOverlapRemovalTool.h
Muon::MuonSegmentOverlapRemovalTool::SegVec
std::vector< MuonSegment * > SegVec
Definition: MuonSegmentOverlapRemovalTool.h:45
Muon::MuonSegmentOverlapRemovalTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSegmentOverlapRemovalTool.h:52
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
xAOD::MuonSegment
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/MuonSegment.h:13
Muon::MuonSegmentOverlapRemovalTool::removeDuplicates
void removeDuplicates(Trk::SegmentCollection &segments) const override
remove duplicates from a vector of segments.
Definition: MuonSegmentOverlapRemovalTool.cxx:27
MuonSegmentCombination.h
Muon::MuonSegmentOverlapRemovalTool::m_removePartialOverlaps
Gaudi::Property< bool > m_removePartialOverlaps
remove partial overlaps between segments
Definition: MuonSegmentOverlapRemovalTool.h:70
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Muon::IMuonSegmentOverlapRemovalTool
abstract interface for tools removing duplicates from segment collections and segment combinations
Definition: IMuonSegmentOverlapRemovalTool.h:22
DataVector< Trk::Segment >
Muon::MuonSegmentOverlapRemovalTool::~MuonSegmentOverlapRemovalTool
virtual ~MuonSegmentOverlapRemovalTool()=default
destructor
IMuonEDMHelperSvc.h
Muon::MuonSegmentOverlapRemovalTool::m_overlapFractionCut
Gaudi::Property< double > m_overlapFractionCut
cut on overlap fraction for segments
Definition: MuonSegmentOverlapRemovalTool.h:73
Muon::MuonSegmentCombination::SegmentVec
std::vector< std::unique_ptr< MuonSegment > > SegmentVec
Definition: MuonSegmentCombination.h:32
Muon::MuonSegmentOverlapRemovalTool::m_printer
ToolHandle< Muon::MuonEDMPrinterTool > m_printer
EDM printer tool.
Definition: MuonSegmentOverlapRemovalTool.h:64
Muon::MuonSegmentOverlapRemovalTool::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
EDM Helper tool.
Definition: MuonSegmentOverlapRemovalTool.h:57
AthAlgTool
Definition: AthAlgTool.h:26
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonIdHelperSvc >