ATLAS Offline Software
MuonSegmentCombinationCleanerTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONSEGMENTCOMBINATIONCLEANERTOOL_H
6 #define MUONSEGMENTCOMBINATIONCLEANERTOOL_H
7 
8 #include <map>
9 #include <string>
10 #include <vector>
11 
13 #include "GaudiKernel/ServiceHandle.h"
14 #include "GaudiKernel/ToolHandle.h"
23 
24 namespace Muon {
25 
26  class MuonSegment;
27 
29  public:
31  MuonSegmentCombinationCleanerTool(const std::string&, const std::string&, const IInterface*);
32 
35 
37  virtual StatusCode initialize() override;
38 
40  std::unique_ptr<MuonSegmentCombinationCollection> clean(const MuonSegmentCombinationCollection& combiCol,
41  MuonSegmentCombPatternCombAssociationMap* segPattMap) const override;
42 
44  std::unique_ptr<MuonSegmentCombination> removeDuplicateSegments(MuonSegmentCombination& combi) const;
45 
46  private:
49  std::unique_ptr<MuonSegmentCombinationCollection>& combiCleanCol,
51 
53  bool subSetOfPrevious(MuonSegmentCombiSummary& summary, std::vector<MuonSegmentCombiSummary>& summaries) const;
54 
57 
58  /* resolve overlap between two vectors of segments */
59  void resolveLayerOverlap(const std::vector<MuonSegment*>& chamberVec1, const std::vector<MuonSegment*>& chamberVec2,
61 
63  void fillSummary(MuonSegmentCombiSummary& combi) const;
64 
66  std::string print(MuonSegmentCombiSummary& summary) const;
67  static std::string print(MuonSegmentCombiOverlapSummary& summary) ;
68 
69  PublicToolHandle<Muon::MuonEDMPrinterTool> m_printer{
70  this,
71  "Printer",
72  "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
73  };
74  ToolHandle<IMuonSegmentOverlapRemovalTool> m_overlapRemovalTool{
75  this,
76  "SegmentOverlapRemovalTool",
77  "Muon::MuonSegmentOverlapRemovalTool/MuonSegmentOverlapRemovalTool",
78  "tool to removal overlaps in segment combinations",
79  };
80 
82  this,
83  "edmHelper",
84  "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
85  "Handle to the service providing the IMuonEDMHelperSvc interface",
86  };
88  this,
89  "MuonIdHelperSvc",
90  "Muon::MuonIdHelperSvc/MuonIdHelperSvc",
91  };
92 
94  Gaudi::Property<bool> m_mergeAllCombis{this, "MergeAllCombis", false, "merge all combinations into one large combination"};
95  };
96 
97 } // namespace Muon
98 
99 #endif // MUONSEGMENTCOMBINATIONCLEANER_H
Muon::MuonSegmentCombinationCleanerTool::removeDuplicateSegments
std::unique_ptr< MuonSegmentCombination > removeDuplicateSegments(MuonSegmentCombination &combi) const
remove duplicates from a segment combination, returns a nullptr
Definition: MuonSegmentCombinationCleanerTool.cxx:411
Muon::MuonSegmentCombinationCleanerTool::initialize
virtual StatusCode initialize() override
initializes private members
Definition: MuonSegmentCombinationCleanerTool.cxx:27
MuonSegmentCombiSummary.h
Muon::MuonSegmentCombination
Definition: MuonSegmentCombination.h:30
Muon::MuonSegmentCombinationCleanerTool
Definition: MuonSegmentCombinationCleanerTool.h:28
Muon::MuonSegmentCombiOverlapSummary
Definition: MuonSegmentCombiOverlapSummary.h:14
Muon::MuonSegmentCombinationCleanerTool::m_overlapRemovalTool
ToolHandle< IMuonSegmentOverlapRemovalTool > m_overlapRemovalTool
Definition: MuonSegmentCombinationCleanerTool.h:74
MuonEDMPrinterTool.h
Muon::MuonSegmentCombinationCleanerTool::cleanAndMergeCombis
void cleanAndMergeCombis(const MuonSegmentCombinationCollection &combiCol, std::unique_ptr< MuonSegmentCombinationCollection > &combiCleanCol, MuonSegmentCombPatternCombAssociationMap *segPattMap) const
remove overlaps between combination and merge combinations with large overlap
Definition: MuonSegmentCombinationCleanerTool.cxx:46
Muon::MuonSegmentCombinationCleanerTool::m_mergeAllCombis
Gaudi::Property< bool > m_mergeAllCombis
If set to true, all combinaties will be merged into one big one.
Definition: MuonSegmentCombinationCleanerTool.h:94
IMuonSegmentOverlapRemovalTool.h
Muon::MuonSegmentCombinationCleanerTool::resolveLayerOverlap
void resolveLayerOverlap(const std::vector< MuonSegment * > &chamberVec1, const std::vector< MuonSegment * > &chamberVec2, MuonSegmentCombiOverlapSummary &summary) const
Definition: MuonSegmentCombinationCleanerTool.cxx:284
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::MuonSegmentCombinationCleanerTool::fillSummary
void fillSummary(MuonSegmentCombiSummary &combi) const
create summary
Definition: MuonSegmentCombinationCleanerTool.cxx:379
xAOD::MuonSegment
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/MuonSegment.h:13
Muon::MuonSegmentCombinationCleanerTool::subSetOfPrevious
bool subSetOfPrevious(MuonSegmentCombiSummary &summary, std::vector< MuonSegmentCombiSummary > &summaries) const
check whether current summary is a subset of the previous once
Definition: MuonSegmentCombinationCleanerTool.cxx:118
Muon::MuonSegmentCombinationCleanerTool::~MuonSegmentCombinationCleanerTool
virtual ~MuonSegmentCombinationCleanerTool()=default
destructor
Muon::MuonSegmentCombPatternCombAssociationMap
std::multimap< const MuonSegmentCombination *, const MuonPatternCombination * > MuonSegmentCombPatternCombAssociationMap
Definition: MuonSegmentCombPatternCombAssociationMap.h:12
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonSegmentCombiOverlapSummary.h
MuonSegmentCombinationCollection.h
AthAlgTool.h
Muon::MuonSegmentCombinationCleanerTool::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonSegmentCombinationCleanerTool.h:69
Muon::MuonSegmentCombinationCleanerTool::MuonSegmentCombinationCleanerTool
MuonSegmentCombinationCleanerTool(const std::string &, const std::string &, const IInterface *)
constructor
Definition: MuonSegmentCombinationCleanerTool.cxx:22
DataVector< Muon::MuonSegmentCombination >
Muon::MuonSegmentCombiSummary
Definition: MuonSegmentCombiSummary.h:19
IMuonEDMHelperSvc.h
IMuonSegmentCombinationCleanerTool.h
Muon::MuonSegmentCombinationCleanerTool::print
std::string print(MuonSegmentCombiSummary &summary) const
print summaries
Definition: MuonSegmentCombinationCleanerTool.cxx:494
Muon::MuonSegmentCombinationCleanerTool::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonSegmentCombinationCleanerTool.h:81
Muon::MuonSegmentCombinationCleanerTool::clean
std::unique_ptr< MuonSegmentCombinationCollection > clean(const MuonSegmentCombinationCollection &combiCol, MuonSegmentCombPatternCombAssociationMap *segPattMap) const override
clean segment combination collections
Definition: MuonSegmentCombinationCleanerTool.cxx:37
Muon::MuonSegmentCombinationCleanerTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSegmentCombinationCleanerTool.h:87
Muon::MuonSegmentCombinationCleanerTool::calculateOverlap
MuonSegmentCombiOverlapSummary calculateOverlap(MuonSegmentCombiSummary &summary1, MuonSegmentCombiSummary &summary2) const
calculate overlap between two summaries
Definition: MuonSegmentCombinationCleanerTool.cxx:254
AthAlgTool
Definition: AthAlgTool.h:26
Muon::IMuonSegmentCombinationCleanerTool
The IMuonSegmentMaker is a pure virtual interface for tools to find tracks starting from MuonSegmentC...
Definition: IMuonSegmentCombinationCleanerTool.h:15
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonEDMHelperSvc >
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65