ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Muon::MuonSegmentCombinationCleanerTool Class Reference

#include <MuonSegmentCombinationCleanerTool.h>

Inheritance diagram for Muon::MuonSegmentCombinationCleanerTool:
Collaboration diagram for Muon::MuonSegmentCombinationCleanerTool:

Public Member Functions

 MuonSegmentCombinationCleanerTool (const std::string &, const std::string &, const IInterface *)
 constructor More...
 
virtual ~MuonSegmentCombinationCleanerTool ()=default
 destructor More...
 
virtual StatusCode initialize () override
 initializes private members More...
 
std::unique_ptr< MuonSegmentCombinationCollectionclean (const MuonSegmentCombinationCollection &combiCol, MuonSegmentCombPatternCombAssociationMap *segPattMap) const override
 clean segment combination collections More...
 
std::unique_ptr< MuonSegmentCombinationremoveDuplicateSegments (MuonSegmentCombination &combi) const
 remove duplicates from a segment combination, returns a nullptr 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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 access to tool interface More...
 

Protected Member Functions

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

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void cleanAndMergeCombis (const MuonSegmentCombinationCollection &combiCol, std::unique_ptr< MuonSegmentCombinationCollection > &combiCleanCol, MuonSegmentCombPatternCombAssociationMap *segPattMap) const
 remove overlaps between combination and merge combinations with large overlap More...
 
bool subSetOfPrevious (MuonSegmentCombiSummary &summary, std::vector< MuonSegmentCombiSummary > &summaries) const
 check whether current summary is a subset of the previous once More...
 
MuonSegmentCombiOverlapSummary calculateOverlap (MuonSegmentCombiSummary &summary1, MuonSegmentCombiSummary &summary2) const
 calculate overlap between two summaries More...
 
void resolveLayerOverlap (const std::vector< MuonSegment * > &chamberVec1, const std::vector< MuonSegment * > &chamberVec2, MuonSegmentCombiOverlapSummary &summary) const
 
void fillSummary (MuonSegmentCombiSummary &combi) const
 create summary More...
 
std::string print (MuonSegmentCombiSummary &summary) const
 print summaries More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Static Private Member Functions

static std::string print (MuonSegmentCombiOverlapSummary &summary)
 

Private Attributes

ToolHandle< Muon::MuonEDMPrinterToolm_printer
 
ToolHandle< IMuonSegmentOverlapRemovalToolm_overlapRemovalTool
 
ServiceHandle< Muon::IMuonEDMHelperSvcm_edmHelperSvc
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
 
Gaudi::Property< bool > m_mergeAllCombis {this, "MergeAllCombis", false, "merge all combinations into one large combination"}
 If set to true, all combinaties will be merged into one big one. More...
 
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
 

Detailed Description

Definition at line 28 of file MuonSegmentCombinationCleanerTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonSegmentCombinationCleanerTool()

Muon::MuonSegmentCombinationCleanerTool::MuonSegmentCombinationCleanerTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

constructor

Definition at line 22 of file MuonSegmentCombinationCleanerTool.cxx.

22  :
23  AthAlgTool(t, n, p) {
24  declareInterface<IMuonSegmentCombinationCleanerTool>(this);
25  }

◆ ~MuonSegmentCombinationCleanerTool()

virtual Muon::MuonSegmentCombinationCleanerTool::~MuonSegmentCombinationCleanerTool ( )
virtualdefault

destructor

Member Function Documentation

◆ calculateOverlap()

MuonSegmentCombiOverlapSummary Muon::MuonSegmentCombinationCleanerTool::calculateOverlap ( MuonSegmentCombiSummary summary1,
MuonSegmentCombiSummary summary2 
) const
private

calculate overlap between two summaries

Definition at line 254 of file MuonSegmentCombinationCleanerTool.cxx.

255  {
256  ATH_MSG_DEBUG(" calculating overlap, size first " << summary1.nsegments << " size second " << summary2.nsegments);
257 
258  MuonSegmentCombiOverlapSummary summary;
259 
260  // loop over all chamber layers and compare per layer
261  for (unsigned int i = 0; i < MuonStationIndex::ChIndexMax; ++i) {
262  // get segment in chamber layer
263  MuonSegmentCombiSummary::SegVec& chamberVec1 = summary1.chamberSegments(i);
264  MuonSegmentCombiSummary::SegVec& chamberVec2 = summary2.chamberSegments(i);
265 
266  // if both no segments do nothing
267  if (chamberVec1.empty() && chamberVec2.empty()) continue;
268 
269  // if both not empty compare the two, exception for CSCs
270  if (!chamberVec1.empty() && !chamberVec2.empty()) {
271  ATH_MSG_DEBUG(" resolving chambe layer " << MuonStationIndex::chName((MuonStationIndex::ChIndex)i));
272 
273  resolveLayerOverlap(chamberVec1, chamberVec2, summary);
274 
275  } else {
276  if (!chamberVec1.empty()) summary.uniqueFirst.insert(summary.uniqueFirst.begin(), chamberVec1.begin(), chamberVec1.end());
277  if (!chamberVec2.empty()) summary.uniqueSecond.insert(summary.uniqueSecond.begin(), chamberVec2.begin(), chamberVec2.end());
278  }
279  }
281  return summary;
282  }

◆ clean()

std::unique_ptr< MuonSegmentCombinationCollection > Muon::MuonSegmentCombinationCleanerTool::clean ( const MuonSegmentCombinationCollection combiCol,
MuonSegmentCombPatternCombAssociationMap segPattMap 
) const
overridevirtual

clean segment combination collections

Implements Muon::IMuonSegmentCombinationCleanerTool.

Definition at line 37 of file MuonSegmentCombinationCleanerTool.cxx.

38  {
39  std::unique_ptr<MuonSegmentCombinationCollection> combiCleanCol = std::make_unique<MuonSegmentCombinationCollection>();
40 
41  cleanAndMergeCombis(combiCol, combiCleanCol, segPattMap);
42 
43  return combiCleanCol;
44  }

◆ cleanAndMergeCombis()

void Muon::MuonSegmentCombinationCleanerTool::cleanAndMergeCombis ( const MuonSegmentCombinationCollection combiCol,
std::unique_ptr< MuonSegmentCombinationCollection > &  combiCleanCol,
MuonSegmentCombPatternCombAssociationMap segPattMap 
) const
private

remove overlaps between combination and merge combinations with large overlap

No duplicates were actually removed

Definition at line 46 of file MuonSegmentCombinationCleanerTool.cxx.

48  {
49  ATH_MSG_DEBUG(" cleaning combis " << combiCol.size());
50 
51  std::vector<MuonSegmentCombiSummary> summaries;
52 
53  for (const Muon::MuonSegmentCombination* combi : combiCol) {
54  if (!combi) {
55  ATH_MSG_INFO(" empty MuonSegmentCombination!!! ");
56  continue;
57  }
58 
59  MuonSegmentCombiSummary summary{*combi};
62 
63  if (summary.stations.size() < 2) {
64  // keep combination if Endcap middle
65  if (summary.stations.count(MuonStationIndex::EM)) {
66  ATH_MSG_VERBOSE(" Keeping single station endcap middle MuonSegmentCombination ");
67 
68  } else {
69  ATH_MSG_DEBUG(" MuonSegmentCombination has too few station layers, rejecting ");
70  continue;
71  }
72  }
73 
74  if (summary.stationsGood.empty()) {
75  ATH_MSG_DEBUG(" MuonSegmentCombination has no station layer with good segment, rejecting ");
76  continue;
77  }
78 
79  if (!subSetOfPrevious(summary, summaries)) { summaries.emplace_back(std::move(summary)); }
80  }
81 
82  for (MuonSegmentCombiSummary& summary : summaries) {
83  // check whether there is an original, if so pass the pointer else clone the combi as it comes from the input
84  // collection
85 
86  std::unique_ptr<MuonSegmentCombination> finalCombi = m_overlapRemovalTool->removeDuplicates(summary.segmentCombination());
87 
89  if (!finalCombi) {
90  if (summary.has_ownership()) {
91  finalCombi = summary.release();
92  } else {
93  finalCombi = std::make_unique<MuonSegmentCombination>(*summary.get());
94  }
95  }
96 
97  const MuonSegmentCombination* originalCombi = summary.get();
98 
99  // lookup the patterncombi and add association
100  unsigned int count = segPattMap->count(originalCombi);
101  if (count != 1) {
102  ATH_MSG_INFO(" This list should only have one entry!! ");
103  } else {
104  std::pair<MuonSegmentCombPatternCombAssociationMap::const_iterator,
105  MuonSegmentCombPatternCombAssociationMap::const_iterator>
106  range = segPattMap->equal_range(originalCombi);
107  const Muon::MuonPatternCombination* pat = (range.first)->second;
108  if (pat)
109  segPattMap->insert(std::make_pair(finalCombi.get(), pat));
110  else
111  ATH_MSG_INFO(" The pattern pointer should never be zero!!!! ");
112  }
113 
114  combiCleanCol->push_back(std::move(finalCombi));
115  }
116  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

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

◆ fillSummary()

void Muon::MuonSegmentCombinationCleanerTool::fillSummary ( MuonSegmentCombiSummary combi) const
private

create summary

Definition at line 379 of file MuonSegmentCombinationCleanerTool.cxx.

379  {
380  const MuonSegmentCombination& combi = summary.segmentCombination();
381  unsigned int nstations = combi.numberOfStations();
382 
383  // loop over segments, add them to the chamber layers
384  // loop over chambers in combi and extract segments
385  for (unsigned int i = 0; i < nstations; ++i) {
386  // loop over segments in station
387  const MuonSegmentCombination::SegmentVec* stationSegs = combi.stationSegments(i);
388 
389  // check if not empty
390  if (!stationSegs || stationSegs->empty()) continue;
391 
392  // get chamber identifier, chamber index and station index
393  const Identifier chid = m_edmHelperSvc->chamberId(*stationSegs->front());
394  const MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(chid);
396 
397  summary.stations.insert(stIndex);
398 
399  // reserve space for the new segments
400  MuonSegmentCombiSummary::SegVec& chamberVec = summary.chamberSegments(chIndex);
401  chamberVec.reserve(chamberVec.size() + stationSegs->size());
402 
403  summary.nsegments += stationSegs->size();
404  for (const std::unique_ptr<MuonSegment>& seg : *stationSegs) {
405  if (seg->numberOfContainedROTs() > 3) { summary.stationsGood.insert(stIndex); }
406  chamberVec.push_back(seg.get());
407  }
408  }
409  }

◆ initialize()

StatusCode Muon::MuonSegmentCombinationCleanerTool::initialize ( )
overridevirtual

initializes private members

Definition at line 27 of file MuonSegmentCombinationCleanerTool.cxx.

27  {
28  ATH_MSG_VERBOSE(" MuonSegmentCombinationCleanerTool::Initializing ");
29  ATH_CHECK(m_printer.retrieve());
30  ATH_CHECK(m_edmHelperSvc.retrieve());
31  ATH_CHECK(m_idHelperSvc.retrieve());
32  ATH_CHECK(m_overlapRemovalTool.retrieve());
33  ATH_MSG_VERBOSE("End of Initializing");
34  return StatusCode::SUCCESS;
35  }

◆ inputHandles()

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

◆ interfaceID()

static const InterfaceID& Muon::IMuonSegmentCombinationCleanerTool::interfaceID ( )
inlinestaticinherited

access to tool interface

Definition at line 18 of file IMuonSegmentCombinationCleanerTool.h.

18  {
19  static const InterfaceID IID_IMuonSegmentCombinationCleanerTool("Muon::IMuonSegmentCombinationCleanerTool", 1, 0);
20  return IID_IMuonSegmentCombinationCleanerTool;
21  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

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

◆ print() [1/2]

std::string Muon::MuonSegmentCombinationCleanerTool::print ( MuonSegmentCombiOverlapSummary summary)
staticprivate

Definition at line 518 of file MuonSegmentCombinationCleanerTool.cxx.

518  {
519  std::ostringstream sout;
520 
521  sout << "SegmentCombi overlap " << std::endl
522  << " shared: " << summary.shared.size() << std::endl
523  << " uniqueFirst: " << summary.uniqueFirst.size() << std::endl
524  << " uniqueSecond: " << summary.uniqueSecond.size() << std::endl
525  << " subsetFirst: " << summary.subsetFirst.size() << std::endl
526  << " subsetSecond: " << summary.subsetSecond.size() << std::endl;
527  return sout.str();
528  }

◆ print() [2/2]

std::string Muon::MuonSegmentCombinationCleanerTool::print ( MuonSegmentCombiSummary summary) const
private

print summaries

Definition at line 494 of file MuonSegmentCombinationCleanerTool.cxx.

494  {
495  std::ostringstream sout;
496 
497  // loop over chamber layers
498  int index = 0;
499  MuonSegmentCombiSummary::ChSegVec& segmentsPerLayer = summary.segmentsPerLayer();
500 
501  sout << "SegmentCombi " << std::endl;
502 
503  for (MuonSegmentCombiSummary::SegVec& chiit : segmentsPerLayer) {
504  // skip empty layers
505  if (chiit.empty()) continue;
506 
507  sout << " Chamber Layer: " << MuonStationIndex::chName((MuonStationIndex::ChIndex)index) << " with " << chiit.size()
508  << " segments " << std::endl;
509 
510  for (MuonSegment* seg : chiit) sout << m_printer->print(*seg) << std::endl;
511 
512  ++index;
513  }
514 
515  return sout.str();
516  }

◆ removeDuplicateSegments()

std::unique_ptr< MuonSegmentCombination > Muon::MuonSegmentCombinationCleanerTool::removeDuplicateSegments ( MuonSegmentCombination combi) const

remove duplicates from a segment combination, returns a nullptr

Definition at line 411 of file MuonSegmentCombinationCleanerTool.cxx.

412  {
413  CompareMuonSegmentKeys compareKeys{};
414 
415  // store pointers to segments that should be kept
416  std::set<MuonSegment*> segmentsToBeKept;
417  unsigned int nsegments = 0; // total number of segments
418 
419  unsigned int nstations = combi.numberOfStations();
420 
421  // loop over segments, add them to the chamber layers
422  // loop over chambers in combi and extract segments
423  for (unsigned int i = 0; i < nstations; ++i) {
424  // loop over segments in station
425  MuonSegmentCombination::SegmentVec* stationSegs = combi.stationSegments(i);
426  // check if not empty
427  if (!stationSegs || stationSegs->empty()) continue;
428  nsegments += stationSegs->size();
429 
430  std::vector<std::pair<MuonSegmentKey, MuonSegment*> > keys;
431  keys.reserve(stationSegs->size());
432 
433  for (const std::unique_ptr<MuonSegment>& seg : *stationSegs) {
434  ATH_MSG_VERBOSE(" segment " << m_printer->print(*seg) << std::endl << m_printer->print(seg->containedMeasurements()));
435  // create key
436  MuonSegmentKey key{*seg};
437 
438  // loop over already added keys
439  bool addSegment = true;
440  for (std::pair<MuonSegmentKey, MuonSegment*>& key_pair : keys) {
441  CompareMuonSegmentKeys::OverlapResult overlapResult = compareKeys(key, key_pair.first);
442  ATH_MSG_VERBOSE(" overlap Result: " << compareKeys.print(overlapResult));
443 
444  if (overlapResult == CompareMuonSegmentKeys::Identical || overlapResult == CompareMuonSegmentKeys::SubSet) {
445  addSegment = false;
446  break;
447  } else if (overlapResult == CompareMuonSegmentKeys::SuperSet) {
448  key_pair.first = key;
449  key_pair.second = seg.get();
450  addSegment = false;
451  break;
452  } else if (overlapResult == CompareMuonSegmentKeys::Unknown) {
453  ATH_MSG_WARNING(" Got invalid return argument comparing segments: " << compareKeys.print(overlapResult));
454  }
455  }
456  if (addSegment) keys.emplace_back(std::move(key), seg.get());
457  }
458  for (const std::pair<MuonSegmentKey, MuonSegment*>& key_pair : keys) segmentsToBeKept.insert(key_pair.second);
459  }
460 
461  // check whether all segments were kept
462  if (nsegments == segmentsToBeKept.size()) {
463  ATH_MSG_DEBUG(" no segments removed ");
464  return nullptr;
465  }
466 
467  std::unique_ptr<MuonSegmentCombination> newCombi = std::make_unique<MuonSegmentCombination>();
468 
469  // create a new combination removing segments that overlap
470  for (unsigned int i = 0; i < nstations; ++i) {
471  // loop over segments in station
472  MuonSegmentCombination::SegmentVec* stationSegs = combi.stationSegments(i);
473 
474  // check if not empty
475  if (!stationSegs || stationSegs->empty()) continue;
476 
477  std::unique_ptr<MuonSegmentCombination::SegmentVec> segVec = std::make_unique<MuonSegmentCombination::SegmentVec>();
478  segVec->reserve(stationSegs->size());
479 
480  for (std::unique_ptr<MuonSegment>& seg : *stationSegs) {
481  if (!segmentsToBeKept.count(seg.get())) {
482  ATH_MSG_VERBOSE(" dropping segment " << m_printer->print(*seg));
483  continue;
484  } else
485  ATH_MSG_VERBOSE(" adding segment " << m_printer->print(*seg));
486  segVec->push_back(std::move(seg));
487  }
488  newCombi->addSegments(std::move(segVec));
489  }
490 
491  return newCombi;
492  }

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

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ resolveLayerOverlap()

void Muon::MuonSegmentCombinationCleanerTool::resolveLayerOverlap ( const std::vector< MuonSegment * > &  chamberVec1,
const std::vector< MuonSegment * > &  chamberVec2,
MuonSegmentCombiOverlapSummary summary 
) const
private

Definition at line 284 of file MuonSegmentCombinationCleanerTool.cxx.

286  {
287  CompareMuonSegmentKeys compareKeys{};
288 
289  std::vector<int> uniqueFirst(chamberVec1.size(), 1);
290  std::vector<int> uniqueSecond(chamberVec2.size(), 1);
291 
292  unsigned int index1 = 0;
293  for (MuonSegment* seg_chamb1 : chamberVec1) {
294  // identifier(s) of MDT chambers on segment
295  std::set<Identifier> chIds1 = m_edmHelperSvc->chamberIds(*seg_chamb1);
296  MuonSegmentKey key1(*seg_chamb1);
297 
298  unsigned int index2 = 0;
299  for (MuonSegment* seg_chamb2 : chamberVec2) {
300  if (!uniqueSecond[index2]) {
301  ++index2;
302  continue;
303  }
304 
305  // identifier(s) of MDT chambers on segment
306  std::set<Identifier> chIds2 = m_edmHelperSvc->chamberIds(*seg_chamb2);
307 
308  // check whether chamber identifiers overlap
309  bool hasOverlap = std::find_if(chIds2.begin(), chIds2.end(),
310  [&chIds1](const Identifier& id) { return chIds1.count(id) > 0; }) != chIds2.end();
311  // if no chamber identifier overlap continue with next segment
312  if (!hasOverlap) {
313  ++index2;
314  continue;
315  }
316  // compare the hits on the two segments
317 
318  MuonSegmentKey key2(*seg_chamb2);
319  CompareMuonSegmentKeys::OverlapResult overlapResult = compareKeys(key1, key2);
320  ATH_MSG_VERBOSE(" overlap Result: " << compareKeys.print(overlapResult));
321 
322  if (overlapResult == CompareMuonSegmentKeys::Identical) {
323  summary.shared.emplace_back(seg_chamb1, seg_chamb2);
324  uniqueFirst[index1] = 0;
325  uniqueSecond[index2] = 0;
326  } else if (overlapResult == CompareMuonSegmentKeys::SuperSet) {
327  summary.subsetSecond.emplace_back(seg_chamb1, seg_chamb2);
328  uniqueFirst[index1] = 0;
329  uniqueSecond[index2] = 0;
330  } else if (overlapResult == CompareMuonSegmentKeys::SubSet) {
331  summary.subsetFirst.emplace_back(seg_chamb1, seg_chamb2);
332  uniqueFirst[index1] = 0;
333  uniqueSecond[index2] = 0;
334  } else if (overlapResult == CompareMuonSegmentKeys::PartialOverlap) {
335  // keep partial overlaps for now....
336 
337  // in case of full overlap in the MDTs
338  if (compareKeys.intersectionSize == compareKeys.segment1Size &&
339  compareKeys.intersectionSize == compareKeys.segment2Size) {
340  // mark as same if more than 75% overlap in trigger hits
341  double intersectFrac1 = compareKeys.intersectionSizeTrigger == 0
342  ? 0.
343  : compareKeys.intersectionSizeTrigger / (double)compareKeys.segment1SizeTrigger;
344  double intersectFrac2 = compareKeys.intersectionSizeTrigger == 0
345  ? 0.
346  : compareKeys.intersectionSizeTrigger / (double)compareKeys.segment2SizeTrigger;
347  double openingAngle = seg_chamb1->globalDirection().dot(seg_chamb2->globalDirection());
348  ATH_MSG_VERBOSE(" Partial overlap: (" << intersectFrac1 << "," << intersectFrac2 << "), opening angle "
349  << openingAngle);
350  if (intersectFrac1 > 0.75 && intersectFrac2 > 0.75 && openingAngle > 0.99) {
351  summary.shared.emplace_back(seg_chamb1, seg_chamb2);
352  uniqueFirst[index1] = 0;
353  uniqueSecond[index2] = 0;
354  }
355  }
356 
357  } else if (overlapResult == CompareMuonSegmentKeys::NoOverlap) {
358  } else if (overlapResult == CompareMuonSegmentKeys::Unknown) {
359  ATH_MSG_WARNING(" Got invalid return argument comparing segments: " << compareKeys.print(overlapResult));
360  }
361  }
362  ++index1;
363  }
364 
365  // add unique segments
366  index1 = 0;
367  for (MuonSegment* seg_chamb1 : chamberVec1) {
368  if (uniqueFirst[index1]) summary.uniqueFirst.push_back(seg_chamb1);
369  ++index1;
370  }
371 
372  unsigned int index2 = 0;
373  for (MuonSegment* seg_chamb2 : chamberVec2) {
374  if (uniqueSecond[index2]) summary.uniqueSecond.push_back(seg_chamb2);
375  ++index2;
376  }
377  }

◆ subSetOfPrevious()

bool Muon::MuonSegmentCombinationCleanerTool::subSetOfPrevious ( MuonSegmentCombiSummary summary,
std::vector< MuonSegmentCombiSummary > &  summaries 
) const
private

check whether current summary is a subset of the previous once

Definition at line 118 of file MuonSegmentCombinationCleanerTool.cxx.

119  {
120  if (summaries.empty()) return false;
121 
122  ATH_MSG_DEBUG(" comparing combi with aleady handled ones ");
123  bool hasOverlap = false;
124 
125  for (MuonSegmentCombiSummary& existing : summaries) {
126  MuonSegmentCombiOverlapSummary overlap = calculateOverlap(summary, existing);
127 
128  // simplest case: no subsets
129  if (overlap.subsetFirst.empty() && overlap.subsetSecond.empty()) {
130  // no overlap
131  if (overlap.shared.empty()) {
132  if (!m_mergeAllCombis) continue;
133  }
134  // complete overlap, keep previous
135  if (overlap.uniqueFirst.empty() && overlap.uniqueSecond.empty()) {
136  ATH_MSG_VERBOSE(" -> complete overlap, keeping first ");
137  hasOverlap = true;
138  break;
139  }
140  }
141 
142  // second simple case, no unique segments in first and no subsets in second combi
143  if (overlap.uniqueFirst.empty() && overlap.subsetSecond.empty()) {
144  ATH_MSG_VERBOSE(" -> keeping selected combi ");
145  hasOverlap = true;
146  break;
147  } else if (overlap.uniqueSecond.empty() && overlap.subsetFirst.empty()) {
148  ATH_MSG_VERBOSE(" -> replacing selected combi ");
149  existing = std::move(summary);
150  hasOverlap = true;
151  break;
152  }
153 
154  // large overlap
155 
156  unsigned int overlappingSegments1 = overlap.subsetFirst.size() + overlap.shared.size();
157  unsigned int overlappingSegments2 = overlap.subsetSecond.size() + overlap.shared.size();
158 
159  unsigned int uniqueSegments1 = overlap.uniqueFirst.size();
160  unsigned int uniqueSegments2 = overlap.uniqueSecond.size();
161  if (overlappingSegments1 > uniqueSegments1 || overlappingSegments2 > uniqueSegments2 || m_mergeAllCombis) {
162  ATH_MSG_VERBOSE(" -> large overlap, merge candidate ");
163 
164  // set to make sure we are not adding segments twice
165  std::set<MuonSegment*> addedSegments;
166  std::vector<std::vector<MuonSegment*> > segmentsPerChamberLayer{MuonStationIndex::ChIndexMax};
167 
168  // first add shared segments, take one with best chi2
169  for (std::pair<MuonSegment*, MuonSegment*>& sh_iter : overlap.shared) {
170  // select segment with best chi2
171  const Trk::FitQuality* fq1 = sh_iter.first->fitQuality();
172  const Trk::FitQuality* fq2 = sh_iter.second->fitQuality();
173  double chi2First = fq1 ? fq1->chiSquared() : 1e10;
174  double chi2Second = fq2 ? fq2->chiSquared() : 1e10;
175  MuonSegment* bestSegment = chi2First < chi2Second ? sh_iter.first : sh_iter.second;
176 
177  // check whether already added
178  if (addedSegments.count(bestSegment)) continue;
179  addedSegments.insert(bestSegment);
180  Identifier chId = m_edmHelperSvc->chamberId(*bestSegment);
181  MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(chId);
182  segmentsPerChamberLayer[chIndex].push_back(bestSegment);
183  }
184 
185  for (MuonSegment* bestSegment : overlap.uniqueFirst) {
186  // check whether already added
187  if (addedSegments.count(bestSegment)) continue;
188  addedSegments.insert(bestSegment);
189  Identifier chId = m_edmHelperSvc->chamberId(*bestSegment);
190  MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(chId);
191  segmentsPerChamberLayer[chIndex].push_back(bestSegment);
192  }
193 
194  for (MuonSegment* bestSegment : overlap.uniqueSecond) {
195  // check whether already added
196  if (addedSegments.count(bestSegment)) continue;
197  addedSegments.insert(bestSegment);
198  Identifier chId = m_edmHelperSvc->chamberId(*bestSegment);
199  MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(chId);
200  segmentsPerChamberLayer[chIndex].push_back(bestSegment);
201  }
202 
203  for (std::pair<MuonSegment*, MuonSegment*>& sh_iter : overlap.subsetFirst) {
204  // check whether already added
205  MuonSegment* bestSegment = sh_iter.second;
206 
207  // check whether already added
208  if (addedSegments.count(bestSegment)) continue;
209  addedSegments.insert(bestSegment);
210  Identifier chId = m_edmHelperSvc->chamberId(*bestSegment);
211  MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(chId);
212  segmentsPerChamberLayer[chIndex].push_back(bestSegment);
213  }
214 
215  for (const std::pair<MuonSegment*, MuonSegment*>& sh_iter : overlap.subsetSecond) {
216  // check whether already added
217  MuonSegment* bestSegment = sh_iter.first;
218  // check whether already added
219  if (addedSegments.count(bestSegment)) continue;
220  addedSegments.insert(bestSegment);
221  Identifier chId = m_edmHelperSvc->chamberId(*bestSegment);
222  MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(chId);
223  segmentsPerChamberLayer[chIndex].push_back(bestSegment);
224  }
225 
226  // now create new combi
227  std::unique_ptr<MuonSegmentCombination> newCombi = std::make_unique<MuonSegmentCombination>();
228 
229  // loop over layers and add segments
230  for (const std::vector<MuonSegment*>& chamber_hits : segmentsPerChamberLayer) {
231  // skip empty ones
232  if (chamber_hits.empty()) continue;
233 
234  std::unique_ptr<MuonSegmentCombination::SegmentVec> segVec = std::make_unique<MuonSegmentCombination::SegmentVec>();
235  segVec->reserve(chamber_hits.size());
236  for (MuonSegment* seg : chamber_hits) segVec->emplace_back(seg->clone());
237  newCombi->addSegments(std::move(segVec));
238  }
239 
240  // create new summary
241  MuonSegmentCombiSummary newSummary{std::move(newCombi)};
242  fillSummary(newSummary);
243 
244  ATH_MSG_VERBOSE(" -> merged combis ");
245  existing = std::move(newSummary);
246  hasOverlap = true;
247  break;
248  }
249  }
250 
251  return hasOverlap;
252  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_edmHelperSvc

ServiceHandle<Muon::IMuonEDMHelperSvc> Muon::MuonSegmentCombinationCleanerTool::m_edmHelperSvc
private
Initial value:
{
this,
"edmHelper",
"Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface",
}

Definition at line 81 of file MuonSegmentCombinationCleanerTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_idHelperSvc

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

Definition at line 87 of file MuonSegmentCombinationCleanerTool.h.

◆ m_mergeAllCombis

Gaudi::Property<bool> Muon::MuonSegmentCombinationCleanerTool::m_mergeAllCombis {this, "MergeAllCombis", false, "merge all combinations into one large combination"}
private

If set to true, all combinaties will be merged into one big one.

Definition at line 94 of file MuonSegmentCombinationCleanerTool.h.

◆ m_overlapRemovalTool

ToolHandle<IMuonSegmentOverlapRemovalTool> Muon::MuonSegmentCombinationCleanerTool::m_overlapRemovalTool
private
Initial value:
{
this,
"SegmentOverlapRemovalTool",
"Muon::MuonSegmentOverlapRemovalTool/MuonSegmentOverlapRemovalTool",
"tool to removal overlaps in segment combinations",
}

Definition at line 74 of file MuonSegmentCombinationCleanerTool.h.

◆ m_printer

ToolHandle<Muon::MuonEDMPrinterTool> Muon::MuonSegmentCombinationCleanerTool::m_printer
private
Initial value:
{
this,
"Printer",
"Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
}

Definition at line 69 of file MuonSegmentCombinationCleanerTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
Muon::MuonStationIndex::chName
static const std::string & chName(ChIndex index)
convert ChIndex into a string
Definition: MuonStationIndex.cxx:157
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
Muon::MuonStationIndex::toStationIndex
static StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
Definition: MuonStationIndex.cxx:43
Muon::MuonSegmentCombination
Definition: MuonSegmentCombination.h:30
Muon::CompareMuonSegmentKeys::PartialOverlap
@ PartialOverlap
Definition: CompareMuonSegmentKeys.h:20
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Muon::MuonSegmentCombinationCleanerTool::m_overlapRemovalTool
ToolHandle< IMuonSegmentOverlapRemovalTool > m_overlapRemovalTool
Definition: MuonSegmentCombinationCleanerTool.h:74
Muon::CompareMuonSegmentKeys::SubSet
@ SubSet
Definition: CompareMuonSegmentKeys.h:18
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
index
Definition: index.py:1
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
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Muon::MuonSegmentCombiSummary::SegVec
std::vector< MuonSegment * > SegVec
Definition: MuonSegmentCombiSummary.h:22
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Muon::MuonSegmentCombinationCleanerTool::resolveLayerOverlap
void resolveLayerOverlap(const std::vector< MuonSegment * > &chamberVec1, const std::vector< MuonSegment * > &chamberVec2, MuonSegmentCombiOverlapSummary &summary) const
Definition: MuonSegmentCombinationCleanerTool.cxx:284
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
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
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
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
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
module_driven_slicing.key2
key2
Definition: module_driven_slicing.py:159
Muon::CompareMuonSegmentKeys::OverlapResult
OverlapResult
enum for the overlap result
Definition: CompareMuonSegmentKeys.h:16
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Muon::CompareMuonSegmentKeys::Identical
@ Identical
Definition: CompareMuonSegmentKeys.h:17
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::index1
@ index1
Definition: BoundarySurfaceFace.h:48
lumiFormat.i
int i
Definition: lumiFormat.py:92
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Muon::MuonSegmentCombinationCleanerTool::m_printer
ToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonSegmentCombinationCleanerTool.h:69
dso-stats.pat
pat
Definition: dso-stats.py:39
Muon::CompareMuonSegmentKeys::Unknown
@ Unknown
Definition: CompareMuonSegmentKeys.h:22
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
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::MuonStationIndex::ChIndexMax
@ ChIndexMax
Definition: MuonStationIndex.h:19
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
Muon::CompareMuonSegmentKeys::NoOverlap
@ NoOverlap
Definition: CompareMuonSegmentKeys.h:21
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::MuonSegmentCombination::SegmentVec
std::vector< std::unique_ptr< MuonSegment > > SegmentVec
Definition: MuonSegmentCombination.h:32
Muon::MuonSegmentCombinationCleanerTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSegmentCombinationCleanerTool.h:87
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
Muon::MuonSegmentCombinationCleanerTool::calculateOverlap
MuonSegmentCombiOverlapSummary calculateOverlap(MuonSegmentCombiSummary &summary1, MuonSegmentCombiSummary &summary2) const
calculate overlap between two summaries
Definition: MuonSegmentCombinationCleanerTool.cxx:254
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Muon::CompareMuonSegmentKeys::SuperSet
@ SuperSet
Definition: CompareMuonSegmentKeys.h:19
Muon::MuonPatternCombination
The MuonPatternCombination class provides the means to store the output of the initial global pattern...
Definition: MuonPatternCombination.h:29
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Muon::MuonStationIndex::EM
@ EM
Definition: MuonStationIndex.h:26
fitman.k
k
Definition: fitman.py:528
Muon::MuonSegmentCombiSummary::ChSegVec
std::vector< SegVec > ChSegVec
Definition: MuonSegmentCombiSummary.h:25
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
module_driven_slicing.key1
key1
Definition: module_driven_slicing.py:158
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65