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

tool to match segments using a curved trajectory. More...

#include <MuonSegmentMatchingTool.h>

Inheritance diagram for Muon::MuonSegmentMatchingTool:
Collaboration diagram for Muon::MuonSegmentMatchingTool:

Public Member Functions

 MuonSegmentMatchingTool (const std::string &, const std::string &, const IInterface *)
 constructor More...
 
virtual ~MuonSegmentMatchingTool ()=default
 destructor More...
 
StatusCode initialize ()
 AlgTool initilize. More...
 
StatusCode finalize ()
 AlgTool finalize. More...
 
bool match (const EventContext &ctx, const MuonSegment &seg1, const MuonSegment &seg2) const
 match two segments 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

bool straightLineMatch (const MuonSegment &seg1, const MuonSegment &seg2) const
 perform straight line matching using SL extrapolation More...
 
bool curvedMatch (const MuonSegment &seg1, const MuonSegment &seg2) const
 perform curved matching More...
 
bool overlapMatch (const EventContext &ctx, const MuonSegment &seg1, const MuonSegment &seg2) const
 perform overlap matching More...
 
bool initializeField () const
 setup field More...
 
bool hasStereoAngle (const Identifier &id1, const Identifier &id2) const
 check whether the two segments have a stereo angle More...
 
bool isSLMatch (const Identifier &chid1, const Identifier &chid2) const
 check whether we should perform a straight line match More...
 
bool suppressNoise (const MuonSegment &seg1, const MuonSegment &seg2, const bool &useTightCuts) const
 Suppress noise from cavern background/pile up using basic cuts
More...
 
bool suppressNoisePhi (const MuonSegment &seg1, const MuonSegment &seg2, const bool &useTightCuts) const
 Suppress noise from cavern background/pile up using basic cuts in phi. More...
 
void simpleEndcapExtrapolate (double x_segment, double y_segment, double z_segment, double theta_segment, double z_extrapolated, double &r_expected, double &theta_expected, double &rhoInv) const
 extrapolate segment in middle or outer endcap station to inner layer assuming the particle came from the IP More...
 
bool endcapExtrapolationMatch (const MuonSegment &seg1, const MuonSegment &seg2, bool useTightCuts) const
 match an endcap middle or outer segment with an inner segment using a simple analytic extrapolation model 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...
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
 
ServiceHandle< Muon::IMuonEDMHelperSvcm_edmHelperSvc
 EDM Helper tool. More...
 
PublicToolHandle< Muon::MuonEDMPrinterToolm_printer
 EDM printer tool. More...
 
ToolHandle< Muon::IMuonSegmentInOverlapResolvingToolm_overlapResolvingTool
 matching tool to handle the overlaps More...
 
ToolHandle< Muon::IMuonSegmentPairMatchingToolm_pairMatchingTool
 matching tool to handle the pairs of segments More...
 
Gaudi::Property< bool > m_toroidOn {this, "ToroidOn", true, "Status of toroidal B-Field"}
 
std::atomic_uint m_straightLineMatches {0}
 
std::atomic_uint m_straightLineMatchesGood {0}
 
std::atomic_uint m_overlapMatches {0}
 
std::atomic_uint m_overlapMatchesGood {0}
 
std::atomic_uint m_curvedMatches {0}
 
std::atomic_uint m_curvedMatchesGood {0}
 
std::atomic_uint m_duplicateHitUses {0}
 
bool m_isCosmics
 
bool m_doOverlapMatch
 
bool m_doStraightLineMatch
 
bool m_doCurvedMatch
 
bool m_thetaMatch
 
bool m_phiMatch
 
bool m_useLocalAngles {}
 
double m_straightLineMatchAngleCut
 
double m_straightLineMatchPositionCut
 
double m_overlapMatchAngleDPhiCut
 cut of the angular difference between phi from phi match and phi from positions More...
 
double m_overlapMatchAngleDYZCut
 cut of the angular difference between phi from phi match and phi from positions More...
 
double m_overlapMatchPositionCut
 cut on the distance of best position from the chamber bounds More...
 
double m_overlapMatchPositionResidualCut
 cut on the position residual for the best position match More...
 
double m_overlapMatchPhiHitPullCut
 cut on the average pull of the phi hits with the new segment parameters More...
 
double m_angleABCut {}
 
double m_maxDistSegments
 cut on the maximum distance between the segments More...
 
double m_minDistSegmentsCosmics {}
 cut on the minimum distance between the segments, if the distance is larger More...
 
double m_matchingbibm_lphisec
 
double m_matchingbibo_lphisec
 
double m_matchingbmbo_lphisec
 
double m_matchingeiem_lphisec
 
double m_matchingeieo_lphisec
 
double m_matchingemeo_lphisec
 
double m_matchingbibm_sphisec
 
double m_matchingbibo_sphisec
 
double m_matchingbmbo_sphisec
 
double m_matchingeiem_sphisec
 
double m_matchingeieo_sphisec
 
double m_matchingemeo_sphisec
 
double m_matchingbee_sphisec {}
 
bool m_onlySameSectorIfTight
 reject all segments in different sectors if in tight matching More...
 
bool m_useTightCuts
 only apply tight selection for busy combinations More...
 
bool m_dumpAngles
 dump matching angle info to screen More...
 
bool m_useEndcapExtrapolationMatching
 
double m_drExtrapRMS
 
double m_drExtrapAlignmentOffset
 
double m_dthetaExtrapRMS
 
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

tool to match segments using a curved trajectory.

The tool decides whether the matching should be performed with curvature or with a straight line. Cases in which a straight line will be used:

Definition at line 33 of file MuonSegmentMatchingTool.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

◆ MuonSegmentMatchingTool()

Muon::MuonSegmentMatchingTool::MuonSegmentMatchingTool ( const std::string &  ty,
const std::string &  na,
const IInterface *  pa 
)

constructor

Definition at line 14 of file MuonSegmentMatchingTool.cxx.

15  : AthAlgTool(ty, na, pa) {
16  declareInterface<IMuonSegmentMatchingTool>(this);
17  declareProperty("UseCosmicsSettings", m_isCosmics = false, "Pick up settings for cosmics");
18  declareProperty("DoOverlapMatch", m_doOverlapMatch = true,
19  "Perform matching for segments in a small/large overlap");
20  declareProperty("DoStraightLineMatch", m_doStraightLineMatch = true,
21  "Perform matching for segments in regions without field");
22  declareProperty("DoCurvedMatch", m_doCurvedMatch = true, "Perform matching for segments in a field regions");
23  declareProperty("doThetaMatching", m_thetaMatch = false, "Pre-matching in theta");
24  declareProperty("doPhiMatching", m_phiMatch = false, "Pre-matching in phi");
25 
27  "OverlapMatchAngleDPhiCut", m_overlapMatchAngleDPhiCut = 0.15,
28  "Cut on the angular difference between the best phi and the one consistent with the chamber bounds");
30  "OverlapMatchAngleDYZCut", m_overlapMatchAngleDYZCut = 0.05,
31  "Cut on the angular difference between the best phi and the one consistent with the chamber bounds");
32  declareProperty("OverlapMatchPositionCut", m_overlapMatchPositionCut = 100.,
33  "Cut on the distance of recalculated position to the tube edge");
34  declareProperty("OverlapMatchPositionResidualCut", m_overlapMatchPositionResidualCut = 30.,
35  "Cut on the segment position residual after recalculation of the paramters");
36  declareProperty("OverlapMatchAveragePhiHitPullCut", m_overlapMatchPhiHitPullCut = 20.,
37  "Cut on the average pull of the phi hits with the new segment parameters");
38 
39  declareProperty("StraightLineMatchAngleCut", m_straightLineMatchAngleCut = 0.1,
40  "Cut on the angular difference between the extrapolated segment angle and reference");
41  declareProperty("StraightLineMatchPositionCut", m_straightLineMatchPositionCut = 200.,
42  "Cut on the distance of extrapolated segment position and reference");
43  declareProperty("MaxDistanceBetweenSegments", m_maxDistSegments = 5000.,
44  "If the two segments are further apart than this distance, they are considered to not match");
45 
46  declareProperty("OnlySameSectorIfTight", m_onlySameSectorIfTight = true,
47  "Accept only segments that are in the same sector for tight matching");
48  declareProperty("TightSegmentMatching", m_useTightCuts = false,
49  "Use tight selection for busy event to suppress combinatorics and improve CPU");
50 
51  declareProperty("DumpAngles", m_dumpAngles = false,
52  "Print matching angle information to screen. WARNING: always returns True for suppressNoise");
53  declareProperty("DoMatchingCutsBIBM_S", m_matchingbibm_sphisec = 0.015,
54  "Cut on sumDeltaYZ, segments in BI and BM, small phi sec");
55  declareProperty("DoMatchingCutsBIBO_S", m_matchingbibo_sphisec = 0.015,
56  "Cut on sumDeltaYZ, segments in BI and BO, small phi sec");
57  declareProperty("DoMatchingCutsBMBO_S", m_matchingbmbo_sphisec = 0.015,
58  "Cut on sumDeltaYZ, segments in BM and BO, small phi sec");
59  declareProperty("DoMatchingCutsEIEM_S", m_matchingeiem_sphisec = 0.010 * 2,
60  "Cut on sumDeltaYZ, segments in EI and EM, small phi sec");
61  declareProperty("DoMatchingCutsEIEO_S", m_matchingeieo_sphisec = 0.020 * 2,
62  "Cut on sumDeltaYZ, segments in EI and EO, small phi sec");
63  declareProperty("DoMatchingCutsEMEO_S", m_matchingemeo_sphisec = 0.002,
64  "Cut on sumDeltaYZ, segments in EM and EO, small phi sec");
65  declareProperty("DoMatchingCutsBIBM_L", m_matchingbibm_lphisec = 0.005,
66  "Cut on sumDeltaYZ, segments in BI and BM, large phi sec");
67  declareProperty("DoMatchingCutsBIBO_L", m_matchingbibo_lphisec = 0.015,
68  "Cut on sumDeltaYZ, segments in BI and BO, large phi sec");
69  declareProperty("DoMatchingCutsBMBO_L", m_matchingbmbo_lphisec = 0.010,
70  "Cut on sumDeltaYZ, segments in BM and BO, large phi sec");
71  declareProperty("DoMatchingCutsEIEM_L", m_matchingeiem_lphisec = 0.015 * 2,
72  "Cut on sumDeltaYZ, segments in EI and EM, large phi sec");
73  declareProperty("DoMatchingCutsEIEO_L", m_matchingeieo_lphisec = 0.025 * 2,
74  "Cut on sumDeltaYZ, segments in EI and EO, large phi sec");
75  declareProperty("DoMatchingCutsEMEO_L", m_matchingemeo_lphisec = 0.002,
76  "Cut on sumDeltaYZ, segments in EM and EO, large phi sec");
77  declareProperty("UseEndcapExtrapolationMatching", m_useEndcapExtrapolationMatching = true);
78  declareProperty("DrExtrapolationRMS", m_drExtrapRMS = 10);
79  declareProperty("DThetaExtrapolationRMS", m_dthetaExtrapRMS = 0.01 * 2);
80  declareProperty("DrExtrapolationAlignementOffset", m_drExtrapAlignmentOffset = 50);
81 }

◆ ~MuonSegmentMatchingTool()

virtual Muon::MuonSegmentMatchingTool::~MuonSegmentMatchingTool ( )
virtualdefault

destructor

Member Function Documentation

◆ curvedMatch()

bool Muon::MuonSegmentMatchingTool::curvedMatch ( const MuonSegment seg1,
const MuonSegment seg2 
) const
private

perform curved matching

Definition at line 192 of file MuonSegmentMatchingTool.cxx.

193 {
194  ++m_curvedMatches;
195 
196  ATH_MSG_VERBOSE(" curved match ");
197 
198  // Suppress cavern background noise and combinatorics using both theta and phi matching
199  if (m_thetaMatch)
200  if (!suppressNoise(seg1, seg2, m_useTightCuts)) {
201  return false;
202  }
203 
204  // Suppress cavern background noise and combinatorics using phi matching
205  if (m_phiMatch) {
206  if (!suppressNoisePhi(seg1, seg2, m_useTightCuts)) return false;
207  }
208 
210  return true;
211 }

◆ 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; }

◆ endcapExtrapolationMatch()

bool Muon::MuonSegmentMatchingTool::endcapExtrapolationMatch ( const MuonSegment seg1,
const MuonSegment seg2,
bool  useTightCuts 
) const
private

match an endcap middle or outer segment with an inner segment using a simple analytic extrapolation model

Definition at line 780 of file MuonSegmentMatchingTool.cxx.

782 {
783 
784  if (!m_useEndcapExtrapolationMatching) return true;
785 
786  Identifier chid1 = m_edmHelperSvc->chamberId(seg1);
787  Identifier chid2 = m_edmHelperSvc->chamberId(seg2);
788  if (chid1 == chid2) return false;
789 
790  MuonStationIndex::StIndex stIndex1 = m_idHelperSvc->stationIndex(chid1);
791  MuonStationIndex::StIndex stIndex2 = m_idHelperSvc->stationIndex(chid2);
792  if (stIndex1 == stIndex2) return false;
793 
794  const MuonSegment* segInner = nullptr;
795  if (stIndex1 == MuonStationIndex::EI) segInner = &seg1;
796  if (stIndex2 == MuonStationIndex::EI) segInner = &seg2;
797 
798  const MuonSegment* segOuter = nullptr;
799  if (stIndex1 == MuonStationIndex::EM || stIndex1 == MuonStationIndex::EO) segOuter = &seg1;
800  if (stIndex2 == MuonStationIndex::EM || stIndex2 == MuonStationIndex::EO) segOuter = &seg2;
801 
802  if (!segInner || !segOuter) {
803  return false;
804  }
805  const Amg::Vector3D& pos1 = segOuter->globalPosition();
806  const Amg::Vector3D& dir1 = segOuter->globalDirection();
807  const Amg::Vector3D& pos2 = segInner->globalPosition();
808  const Amg::Vector3D& dir2 = segInner->globalDirection();
809 
810  // extrapolate the first segment to the inner layer
811  double r_expected{0.}, theta_expected{0.}, rhoInv{0.};
812  simpleEndcapExtrapolate(pos1.x(), pos1.y(), pos1.z(), dir1.theta(), pos2.z(), r_expected, theta_expected, rhoInv);
813 
814  if (rhoInv < 0) rhoInv *= -1.;
815  double dr = pos2.perp() - r_expected;
816  double dtheta = dir2.theta() - theta_expected;
817 
818 
819  double drCut = m_drExtrapRMS + 5.e6 * rhoInv;
820  if (useTightCuts)
821  drCut *= 2;
822  else
823  drCut *= 4;
824 
825  if ((stIndex1 == MuonStationIndex::EM && stIndex2 == MuonStationIndex::BI)
826  || (stIndex1 == MuonStationIndex::BI && stIndex2 == MuonStationIndex::EM))
827  {
828  drCut += 3 * m_drExtrapAlignmentOffset;
829  } else {
830  drCut += m_drExtrapAlignmentOffset;
831  }
832 
833  double dthetaCut = m_dthetaExtrapRMS + 1.5e3 * rhoInv;
834  if (useTightCuts)
835  dthetaCut *= 2;
836  else
837  dthetaCut *= 4;
838 
839  ATH_MSG_VERBOSE(" simple match " << m_printer->print(seg1) << std::endl
840  << " " << m_printer->print(seg2) << std::endl
841  << " dr " << dr << " cut " << drCut << " dtheta " << dtheta << " cut " << dthetaCut
842  << " rhoInv " << 1e6 * rhoInv);
843 
844  if (std::abs(dr) > drCut) return false;
845  if (std::abs(dtheta) > dthetaCut) return false;
846  return true;
847 }

◆ 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

◆ finalize()

StatusCode Muon::MuonSegmentMatchingTool::finalize ( )

AlgTool finalize.

Definition at line 96 of file MuonSegmentMatchingTool.cxx.

97 {
98  double goodOverlapMatchFraction =
100  ATH_MSG_INFO("Overlap matches: total " << std::setw(7) << m_overlapMatches << " good " << std::setw(7)
101  << m_overlapMatchesGood << " fraction " << goodOverlapMatchFraction);
102 
103  double goodStraightLineMatchFraction =
105  ATH_MSG_INFO("StraightLine matches: total " << std::setw(7) << m_straightLineMatches << " good " << std::setw(7)
106  << m_straightLineMatchesGood << " fraction "
107  << goodStraightLineMatchFraction);
108 
109  double goodCurvedMatchFraction =
111  ATH_MSG_INFO("Curved matches: total " << std::setw(7) << m_curvedMatches << " good " << std::setw(7)
112  << m_curvedMatchesGood << " fraction " << goodCurvedMatchFraction);
113 
114  ATH_MSG_INFO("Segments sharing hits: total " << std::setw(7) << m_duplicateHitUses);
115 
116 
117  return StatusCode::SUCCESS;
118 }

◆ hasStereoAngle()

bool Muon::MuonSegmentMatchingTool::hasStereoAngle ( const Identifier id1,
const Identifier id2 
) const
private

check whether the two segments have a stereo angle

Definition at line 304 of file MuonSegmentMatchingTool.cxx.

305 {
306 
307  // check whether same phi, else stereo angle (need correction for cosmic up-down tracks)
308  int phi1 = m_idHelperSvc->mdtIdHelper().stationPhi(id1);
309  int phi2 = m_idHelperSvc->mdtIdHelper().stationPhi(id2);
310 
311  if (phi1 != phi2) return true;
312 
313  // check whether there is a small/large overlap
314  bool isSmallChamber1 = m_idHelperSvc->isSmallChamber(id1);
315  bool isSmallChamber2 = m_idHelperSvc->isSmallChamber(id2);
316 
317  return isSmallChamber1 != isSmallChamber2;
318 }

◆ initialize()

StatusCode Muon::MuonSegmentMatchingTool::initialize ( )

AlgTool initilize.

Definition at line 84 of file MuonSegmentMatchingTool.cxx.

85 {
87  ATH_CHECK(m_edmHelperSvc.retrieve());
88  ATH_CHECK(m_printer.retrieve());
89  ATH_CHECK(m_idHelperSvc.retrieve());
90  ATH_CHECK(m_pairMatchingTool.retrieve());
92  return StatusCode::SUCCESS;
93 }

◆ initializeField()

bool Muon::MuonSegmentMatchingTool::initializeField ( ) const
private

setup field

◆ 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::IMuonSegmentMatchingTool::interfaceID ( )
inlinestaticinherited

access to tool interface

Definition at line 29 of file IMuonSegmentMatchingTool.h.

29  {
30  static const InterfaceID IID_IMuonSegmentMatchingTool("Muon::IMuonSegmentMatchingTool", 1, 0);
31 
32  return IID_IMuonSegmentMatchingTool;
33  }

◆ isSLMatch()

bool Muon::MuonSegmentMatchingTool::isSLMatch ( const Identifier chid1,
const Identifier chid2 
) const
private

check whether we should perform a straight line match

Definition at line 282 of file MuonSegmentMatchingTool.cxx.

283 {
284 
285  // check whether there is field
286  if (!m_toroidOn) return true;
287 
288  MuonStationIndex::StIndex stIndex1 = m_idHelperSvc->stationIndex(chid1);
289  MuonStationIndex::StIndex stIndex2 = m_idHelperSvc->stationIndex(chid2);
290 
291  // check whether segments in same station
292  if (stIndex1 == stIndex2) return true;
293 
294  // check whether segments in endcap EM/EO region
295  if ((stIndex1 == MuonStationIndex::EO && stIndex2 == MuonStationIndex::EM)
296  || (stIndex1 == MuonStationIndex::EM && stIndex2 == MuonStationIndex::EO))
297  return true;
298 
299  // all other cases should be treated with curvature
300  return false;
301 }

◆ match()

bool Muon::MuonSegmentMatchingTool::match ( const EventContext &  ctx,
const MuonSegment seg1,
const MuonSegment seg2 
) const
virtual

match two segments

Implements Muon::IMuonSegmentMatchingTool.

Definition at line 120 of file MuonSegmentMatchingTool.cxx.

120  {
121 
122  ATH_MSG_VERBOSE(" match: segments " << std::endl << m_printer->print(seg1) << std::endl << m_printer->print(seg2));
123 
124  // get identifiers
125  Identifier chid1 = m_edmHelperSvc->chamberId(seg1);
126  Identifier chid2 = m_edmHelperSvc->chamberId(seg2);
127  if (chid1 == chid2) return false;
128 
129  MuonStationIndex::StIndex stIndex1 = m_idHelperSvc->stationIndex(chid1);
130  MuonStationIndex::StIndex stIndex2 = m_idHelperSvc->stationIndex(chid2);
131 
132  if (isSLMatch(chid1, chid2)) {
133  if (!m_idHelperSvc->isMdt(chid1) || !m_idHelperSvc->isMdt(chid2)) return false;
134  // if there is a stereo angle match using overlap matching tool
135 
136  if (stIndex1 == stIndex2) {
137 
138  if (hasStereoAngle(chid1, chid2)) {
139  if (!m_doOverlapMatch) return true;
140  const int eta1 = m_idHelperSvc->mdtIdHelper().stationEta(chid1);
141  const int eta2 = m_idHelperSvc->mdtIdHelper().stationEta(chid2);
142  const int phi1 = m_idHelperSvc->sector(chid1);
143  const int phi2 = m_idHelperSvc->sector(chid2);
144  // require that the two segments are close in eta AND are in adjecent sectors
145  if ( std::abs(eta1-eta2) <=1
146  && ( std::abs(phi1 - phi2) == 1 || (phi1 == 1 && phi2 == 16)
147  || (phi1 == 16 && phi2 == 1)))
148  {
149  return overlapMatch(ctx, seg1, seg2);
150  } else
151  return false;
152  }
153  }
154  if (!m_doStraightLineMatch) return true;
155 
156  if (stIndex1 == stIndex2) return false;
157 
158  return straightLineMatch(seg1, seg2);
159  }
160 
161  // if we get here perform a curved matching
162  if (!m_doCurvedMatch) return true;
163  if (stIndex1 == stIndex2) return false;
164 
165  return curvedMatch(seg1, seg2);
166 }

◆ 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.

◆ overlapMatch()

bool Muon::MuonSegmentMatchingTool::overlapMatch ( const EventContext &  ctx,
const MuonSegment seg1,
const MuonSegment seg2 
) const
private

perform overlap matching

Definition at line 214 of file MuonSegmentMatchingTool.cxx.

215 {
217 
218  ATH_MSG_VERBOSE(" overlap match ");
219 
220  Identifier chid = m_edmHelperSvc->chamberId(seg1);
221 
222  // check the distance between the two segments
223  const float segDist = (seg1.globalPosition() - seg2.globalPosition()).mag();
224  ATH_MSG_VERBOSE(" Distance between segments " << segDist);
225  if (m_isCosmics && segDist > m_minDistSegmentsCosmics) {
226  ATH_MSG_DEBUG(" Too far appart, accepting ");
227  return true;
228  }
229  if (segDist > m_maxDistSegments) return false;
230 
231  if (!m_idHelperSvc->isMdt(chid)) {
232  ATH_MSG_DEBUG(" not a mdt segment " << m_idHelperSvc->toString(chid));
233  return true;
234  }
235 
236  IMuonSegmentInOverlapResolvingTool::SegmentMatchResult result = m_overlapResolvingTool->matchResult(ctx, seg1, seg2);
237 
238  ATH_MSG_VERBOSE(result.toString());
239 
240  if (!result.goodMatch()) {
241  ATH_MSG_DEBUG(" bad match ");
242  return false;
243  }
244 
245  result.phiResult = m_overlapResolvingTool->bestPhiMatch(seg1, seg2);
246  if (std::abs(result.angularDifferencePhi) > m_overlapMatchAngleDPhiCut
247  || std::abs(result.phiResult.deltaYZ) > m_overlapMatchAngleDYZCut)
248  {
249  ATH_MSG_DEBUG(" failed angle cut: diff phi " << result.angularDifferencePhi << " deltaYZ "
250  << result.phiResult.deltaYZ);
251  return false;
252  }
253 
254  if (std::abs(result.averagePhiHitPullSegment1) > m_overlapMatchPhiHitPullCut
255  || std::abs(result.averagePhiHitPullSegment2) > m_overlapMatchPhiHitPullCut)
256  {
257  ATH_MSG_DEBUG(" failed phi hit pull cut: seg1 " << result.averagePhiHitPullSegment1 << " seg2 "
258  << result.averagePhiHitPullSegment2);
259  return false;
260  }
261 
262  if (!result.segmentResult1.inBounds(m_overlapMatchPositionCut)
263  || !result.segmentResult2.inBounds(m_overlapMatchPositionCut))
264  {
265  ATH_MSG_DEBUG(" failed position cut ");
266  return false;
267  }
268 
269  if (std::abs(result.segmentResult1.positionResidual) > m_overlapMatchPositionResidualCut
270  || std::abs(result.segmentResult2.positionResidual) > m_overlapMatchPositionResidualCut)
271  {
272  ATH_MSG_DEBUG(" failed position residual cut: seg1 " << result.segmentResult1.positionResidual << " seg2 "
273  << result.segmentResult2.positionResidual);
274  return false;
275  }
276 
278  return true;
279 }

◆ 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  }

◆ simpleEndcapExtrapolate()

void Muon::MuonSegmentMatchingTool::simpleEndcapExtrapolate ( double  x_segment,
double  y_segment,
double  z_segment,
double  theta_segment,
double  z_extrapolated,
double &  r_expected,
double &  theta_expected,
double &  rhoInv 
) const
private

extrapolate segment in middle or outer endcap station to inner layer assuming the particle came from the IP

Definition at line 851 of file MuonSegmentMatchingTool.cxx.

854 {
855  //
856  // Endcap extrapolation with a parabolic track model
857  //
858  // In the region z = z start - z end of the Toroid one has:
859  // r_expected = z tan(theta) + (z - z start)*(z - z start)/ rho
860  //
861  // outside this region No field
862  //
863  // here z start = 6 000 z end = 10 000
864  // theta = direction at the vertex rho is the effective curvature
865  //
866  double z_start = 7000.;
867  double z_end = 12000.;
868 
869  if (z_extrapolated < 0) z_start = -z_start;
870  if (z_extrapolated < 0) z_end = -z_end;
871 
872  double r_segment = std::hypot(x_segment , y_segment);
873 
874  if (std::abs(z_extrapolated) > std::abs(z_segment)) {
875  ATH_MSG_WARNING(" extrapolate outwards is not implemented for z " << z_extrapolated);
876  r_expected = 0;
877  theta_expected = 0.;
878  return;
879  }
880  if (std::abs(z_segment) < std::abs(z_end)) {
881  ATH_MSG_WARNING(" segment before end of Toroid: SL extrapolation is used implemented " << z_segment);
882  }
883 
884  // use SL extrapolation to go to the z_end of the Toroid
885  const double tan_seg = std::tan(theta_segment);
886 
887  double r_end = r_segment + (z_end - z_segment) * tan_seg;
888 
889  double zgeo = (z_end - z_start) * (z_end - z_start) - 2 * z_end * (z_end - z_start);
890  rhoInv = (r_end - z_end * tan_seg) / zgeo;
891  double tantheta = tan_seg - 2 * (z_end - z_start) * rhoInv;
892  r_expected = z_extrapolated * tantheta + (z_extrapolated - z_start) * (z_extrapolated - z_start) * rhoInv;
893  //
894  // increase radius by 30% wrt straight line
895  //
896  double r_SL = r_segment + (z_extrapolated - z_segment) * tan_seg;
897  r_expected = r_expected + 0.3 * (r_expected - r_SL);
898  theta_expected = std::atan(tantheta + 2 * (z_extrapolated - z_start) * rhoInv);
899 
900  if (tan_seg < 0 && theta_expected < 0) theta_expected += M_PI;
901  if (tan_seg > 0 && theta_expected < 0) theta_expected = -theta_expected;
902 }

◆ straightLineMatch()

bool Muon::MuonSegmentMatchingTool::straightLineMatch ( const MuonSegment seg1,
const MuonSegment seg2 
) const
private

perform straight line matching using SL extrapolation

Definition at line 170 of file MuonSegmentMatchingTool.cxx.

171 {
173 
174  ATH_MSG_VERBOSE(" straight line match ");
175 
176  // Suppress cavern background noise and combinatorics using both theta and phi matching
177  if (m_thetaMatch)
178  if (!suppressNoise(seg1, seg2, m_useTightCuts)) {
179  return false;
180  }
181 
182  // Suppress cavern background noise and combinatorics using phi matching
183  if (m_phiMatch) {
184  if (!suppressNoisePhi(seg1, seg2, m_useTightCuts)) return false;
185  }
186 
188  return true;
189 }

◆ suppressNoise()

bool Muon::MuonSegmentMatchingTool::suppressNoise ( const MuonSegment seg1,
const MuonSegment seg2,
const bool &  useTightCuts 
) const
private

Suppress noise from cavern background/pile up using basic cuts

Definition at line 325 of file MuonSegmentMatchingTool.cxx.

326 {
327 
328  // calculate matching variables
329  IMuonSegmentPairMatchingTool::SegmentMatchResult result = m_pairMatchingTool->matchResult(seg1, seg2);
330 
331  MuonStationIndex::StIndex station_a = m_idHelperSvc->stationIndex(result.chid_a);
332  MuonStationIndex::StIndex station_b = m_idHelperSvc->stationIndex(result.chid_b);
333 
334  bool isEndcap_a = m_idHelperSvc->isEndcap(result.chid_a);
335  bool isCSC_a = m_idHelperSvc->isCsc(result.chid_a);
336  bool isBEE_a = station_a == MuonStationIndex::BE;
337 
338  bool isEndcap_b = m_idHelperSvc->isEndcap(result.chid_b);
339  bool isCSC_b = m_idHelperSvc->isCsc(result.chid_b);
340  bool isBEE_b = station_b == MuonStationIndex::BE;
341 
342 
343  if (m_dumpAngles) {
344 
345  std::cout << "SegmentPositionChange "
346  << " " << m_idHelperSvc->chamberNameString(result.chid_a) << " "
347  << m_idHelperSvc->chamberNameString(result.chid_b) << " " << result.phiSector_a << " "
348  << result.phiSector_b << " " << result.deltaTheta_a << " " << result.deltaTheta_b << " "
349  << result.deltaTheta << " " << result.angleAC << " " << result.angleBC << " " << result.angleAB
350  << std::endl;
351  // return true; // to get the maximum statistics and not be hindered by current cuts
352  }
353 
354  ATH_MSG_VERBOSE("matching " << m_idHelperSvc->chamberNameString(result.chid_a) << " "
355  << m_idHelperSvc->chamberNameString(result.chid_b) << " phis " << result.phiSector_a
356  << " " << result.phiSector_b << " thetas " << result.deltaTheta_a << " "
357  << result.deltaTheta_b << " thetaSum " << result.deltaTheta << " tight cuts "
358  << useTightCuts);
359 
360  // The difference between the segment direction in the inner and outer stations ~< 60 degrees in all cases
361  if (result.angleAB > 1.0) return false;
362 
363 
364  // First: loose selection
365  if (!useTightCuts) {
366  if (isCSC_a || isCSC_b) {
367  ATH_MSG_VERBOSE(" check CSC result ");
368  if (result.phiSector_a != result.phiSector_b) {
369  return false;
370  }
371  if ((isCSC_a && !isEndcap_b) || (isCSC_b && !isEndcap_a)) return false;
372  return endcapExtrapolationMatch(seg1, seg2, useTightCuts);
373  }
374  // BEE
375  else if (isBEE_a || isBEE_b)
376  {
377  ATH_MSG_VERBOSE(" check BEE result ");
378  return result.deltaTheta <= 0.300;
379  }
380  // Barrel/endcap overlap
381  else if (isEndcap_a != isEndcap_b)
382  {
383  ATH_MSG_VERBOSE(" check B-E result ");
384  return result.deltaTheta <= 0.300;
385  }
386  // Phi-sector overlap
387  else if (result.phiSector_a != result.phiSector_b)
388  {
389  ATH_MSG_VERBOSE(" check phiSector result ");
390  if (result.deltaTheta > 0.300) {
391  ATH_MSG_VERBOSE(" check phiSector reject ");
392  return false;
393  } else {
394  return true;
395  }
396  }
397  // Barrel inner to middle station
398  else if (station_a == MuonStationIndex::BI && station_b == MuonStationIndex::BM)
399  {
400  ATH_MSG_VERBOSE(" check BI BM result ");
401  if (result.phiSector_a % 2 == 0) {
402  return result.deltaTheta <= 6.67 * m_matchingbibm_sphisec;
403  } else if (result.phiSector_a % 2 == 1) {
404  return result.deltaTheta <= 6.67 * m_matchingbibm_lphisec;
405  }
406  }
407  // Barrel inner to outer station
408  else if (station_a == MuonStationIndex::BI && station_b == MuonStationIndex::BO)
409  {
410  ATH_MSG_VERBOSE(" check BI BO result ");
411  if (result.phiSector_a % 2 == 0) {
412  return result.deltaTheta <= 6.67 * m_matchingbibo_sphisec;
413  } else if (result.phiSector_a % 2 == 1) {
414  return result.deltaTheta <= 6.67 * m_matchingbibo_lphisec;
415  }
416  }
417 
418  // Barrel middle to outer station
419  else if (station_a == MuonStationIndex::BM && station_b == MuonStationIndex::BO)
420  {
421  ATH_MSG_VERBOSE(" check BM BO result ");
422  if (result.phiSector_a % 2 == 0) {
423  return result.deltaTheta <= 6.67 * m_matchingbmbo_sphisec;
424  } else if (result.phiSector_a % 2 == 1) {
425  return result.deltaTheta <= 6.67 * m_matchingbmbo_lphisec;
426  }
427  }
428  // Endcap inner to middle station
429  else if (station_a == MuonStationIndex::EI && (station_b == MuonStationIndex::EM))
430  {
431  ATH_MSG_VERBOSE(" check EI EM result ");
432  if (result.phiSector_a % 2 == 0) {
433  if (result.deltaTheta > 6.67 * m_matchingeiem_sphisec) {
434  ATH_MSG_VERBOSE(" reject EI EM S result ");
435  return false;
436  } else {
437  return endcapExtrapolationMatch(seg1, seg2, useTightCuts);
438  }
439  } else if (result.phiSector_a % 2 == 1) {
440  if (result.deltaTheta > 6.67 * m_matchingeiem_lphisec) {
441  ATH_MSG_VERBOSE(" reject EI EM L result ");
442  return false;
443  } else {
444  return endcapExtrapolationMatch(seg1, seg2, useTightCuts);
445  }
446  }
447  }
448  // Endcap inner to outer station
449  else if (station_a == MuonStationIndex::EI && (station_b == MuonStationIndex::EO))
450  {
451  ATH_MSG_VERBOSE(" check EI EO result ");
452  if (result.phiSector_a % 2 == 0) {
453  if (result.deltaTheta > 6.67 * m_matchingeieo_sphisec) {
454  ATH_MSG_VERBOSE(" reject EI EO S result ");
455  return false;
456  } else {
457  return endcapExtrapolationMatch(seg1, seg2, useTightCuts);
458  }
459  } else if (result.phiSector_a % 2 == 1) {
460  if (result.deltaTheta > 6.67 * m_matchingeieo_lphisec) {
461  ATH_MSG_VERBOSE(" reject EI EO L result ");
462  return false;
463  } else {
464  return endcapExtrapolationMatch(seg1, seg2, useTightCuts);
465  }
466  }
467  }
468  // Endcap middle to outer station
469  else if (station_a == MuonStationIndex::EM && station_b == MuonStationIndex::EO)
470  {
471  // 5 mrad
472  ATH_MSG_VERBOSE(" check EM EO result ");
473  if (result.phiSector_a % 2 == 0) {
474  return result.deltaTheta <= 6.67 * m_matchingemeo_sphisec;
475  } else if (result.phiSector_a % 2 == 1) {
476  return result.deltaTheta <= 6.67 * m_matchingemeo_lphisec;
477  }
478  }
479 
480  return true;
481  }
482 
483  ATH_MSG_VERBOSE(" check further matching result ");
484 
485  // Second: tight selection if only if requested
486  if (m_onlySameSectorIfTight && result.phiSector_a != result.phiSector_b) {
487  ATH_MSG_VERBOSE(" rejection pair as in different sector and using tight cuts");
488  return false;
489  }
490  if (isCSC_a || isCSC_b) {
491  if (result.phiSector_a != result.phiSector_b) {
492  return false;
493  } else {
494  if (result.deltaTheta > 0.100) {
495  return false;
496  } else {
497  if ((isCSC_a && !isEndcap_b) || (isCSC_b && !isEndcap_a)) return false;
498  return endcapExtrapolationMatch(seg1, seg2, useTightCuts);
499  }
500  }
501 
502 
503  }
504  // BEE
505  else if (isBEE_a || isBEE_b)
506  {
507  return result.deltaTheta <= 0.200;
508  }
509  // Looser cut for segment in two different phi sectors
510  else if (result.phiSector_a != result.phiSector_b)
511  {
512  return result.deltaTheta <= 0.150;
513  }
514  // Barrel/endcap overlap
515  else if (isEndcap_a != isEndcap_b)
516  {
517  return result.deltaTheta <= 0.150;
518  }
519  // Phi-sector overlap
520  else if (result.phiSector_a != result.phiSector_b)
521  {
522  unsigned nChambers_a = m_edmHelperSvc->chamberIds(seg1).size();
523  unsigned nChambers_b = m_edmHelperSvc->chamberIds(seg2).size();
524  if (nChambers_a < 2 && nChambers_b < 2) {
525  return false;
526  } else if (result.deltaTheta > 0.150) {
527  return false;
528  } else {
529  return true;
530  }
531  }
532  // Barrel inner to middle station
533  else if (station_a == MuonStationIndex::BI && station_b == MuonStationIndex::BM)
534  {
535  if (result.phiSector_a % 2 == 0) {
536  return result.deltaTheta <= m_matchingbibm_sphisec;
537  } else if (result.phiSector_a % 2 == 1) {
538  return result.deltaTheta <= m_matchingbibm_lphisec;
539  }
540  }
541  // Barrel inner to outer station
542  else if (station_a == MuonStationIndex::BI && station_b == MuonStationIndex::BO)
543  {
544  if (result.phiSector_a % 2 == 0) {
545  return result.deltaTheta <= m_matchingbibo_sphisec;
546  } else if (result.phiSector_a % 2 == 1) {
547  return result.deltaTheta <= m_matchingbibo_lphisec;
548  }
549  }
550  // Barrel middle to outer station
551  else if (station_a == MuonStationIndex::BM && station_b == MuonStationIndex::BO)
552  {
553  if (result.phiSector_a % 2 == 0) {
554  return result.deltaTheta <= m_matchingbmbo_sphisec;
555  } else if (result.phiSector_a % 2 == 1) {
556  return result.deltaTheta <= m_matchingbmbo_lphisec;
557  }
558  }
559  // Endcap inner to middle station
560  else if ((station_a == MuonStationIndex::EI || station_a == MuonStationIndex::BI)
561  && station_b == MuonStationIndex::EM)
562  {
563  if (result.phiSector_a % 2 == 0) {
564  if (result.deltaTheta > m_matchingeiem_sphisec) {
565  return false;
566  } else {
567  return endcapExtrapolationMatch(seg1, seg2, useTightCuts);
568  }
569  } else if (result.phiSector_a % 2 == 1) {
570  if (result.deltaTheta > m_matchingeiem_lphisec) {
571  return false;
572  } else {
573  return endcapExtrapolationMatch(seg1, seg2, useTightCuts);
574  }
575  }
576  }
577  // Endcap inner to outer station
578  else if (station_a == MuonStationIndex::EI && (station_b == MuonStationIndex::EO))
579  {
580  if (result.phiSector_a % 2 == 0) {
581  if (result.deltaTheta > m_matchingeieo_sphisec) {
582  return false;
583  } else {
584  return endcapExtrapolationMatch(seg1, seg2, useTightCuts);
585  }
586  } else if (result.phiSector_a % 2 == 1) {
587  if (result.deltaTheta > m_matchingeieo_lphisec) {
588  return false;
589  } else {
590  return endcapExtrapolationMatch(seg1, seg2, useTightCuts);
591  }
592  }
593  }
594  // Endcap middle to outer station
595  else if (station_a == MuonStationIndex::EM && station_b == MuonStationIndex::EO)
596  {
597  if (result.phiSector_a % 2 == 0) {
598  return result.deltaTheta <= m_matchingemeo_sphisec;
599  } else if (result.phiSector_a % 2 == 1) {
600  return result.deltaTheta <= m_matchingemeo_lphisec;
601  }
602  }
603 
604  return true;
605 } // if m_useLocalAngles

◆ suppressNoisePhi()

bool Muon::MuonSegmentMatchingTool::suppressNoisePhi ( const MuonSegment seg1,
const MuonSegment seg2,
const bool &  useTightCuts 
) const
private

Suppress noise from cavern background/pile up using basic cuts in phi.

Definition at line 608 of file MuonSegmentMatchingTool.cxx.

610 {
611  // calculate matching variables
612  IMuonSegmentPairMatchingTool::SegmentMatchResult result = m_pairMatchingTool->matchResult(seg1, seg2);
613 
614  MuonStationIndex::StIndex station_a = m_idHelperSvc->stationIndex(result.chid_a);
615  MuonStationIndex::StIndex station_b = m_idHelperSvc->stationIndex(result.chid_b);
616 
617  bool isEndcap_a = m_idHelperSvc->isEndcap(result.chid_a);
618 
619  bool isEndcap_b = m_idHelperSvc->isEndcap(result.chid_b);
620 
621  if (m_dumpAngles) {
622  std::cout << "SegmentPositionChange Phi"
623  << " " << m_idHelperSvc->chamberNameString(result.chid_a) << " "
624  << m_idHelperSvc->chamberNameString(result.chid_b) << " deltaPhipos " << result.deltaPhipos
625  << " deltaPhidir " << result.deltaPhidir << " phiposerr_a " << result.phiposerr_a << " phiposerr_b "
626  << result.phiposerr_b << " phidirerr_a " << result.phidirerr_a << " phidirerr_b "
627  << result.phidirerr_b << " shorttube_a " << result.shorttube_a << " shorttube_b "
628  << result.shorttube_b << std::endl;
629  // return true; // to get the maximum statistics and not be hindered by current cuts
630  }
631 
632  // Keep segments only if they are in the same or adjacent phi sectors
633  if (result.phiSector_a != result.phiSector_b
634  && ((result.phiSector_a != 16 && result.phiSector_b != 1)
635  && (result.phiSector_a != 1 && result.phiSector_b != 16))
636  && (result.phiSector_a != (result.phiSector_b + 1) && result.phiSector_a != (result.phiSector_b - 1)))
637  return false;
638 
639  // First: loose selection
640  if (!useTightCuts) {
641  // cuts on second coordinate
642  if (result.phiSector_a == result.phiSector_b) {
643  if (result.phiposerr_a < 10001.000 && result.phiposerr_b < 10001.000) {
644 
645  if (!isEndcap_a && !isEndcap_b) {
646  return result.deltaPhipos <= 0.1;
647  }
648  if (isEndcap_a && isEndcap_b) {
649  // small sectors
650  if (result.phiSector_a % 2 == 0) {
651  return result.deltaPhipos <= 0.1;
652  }
653  // large sectors
654  if (result.phiSector_a % 2 == 1) {
655  return result.deltaPhipos <= 0.2;
656  }
657  }
658  }
659  }
660 
661  if (result.phiSector_a != result.phiSector_b) {
662  if (result.phiposerr_a < 10001.000 && result.phiposerr_b < 10001.000) {
663  if (!isEndcap_a && !isEndcap_b) {
664  return result.deltaPhipos <= 0.1;
665  }
666  if (isEndcap_a && isEndcap_b) {
667  return result.deltaPhipos <= 0.2;
668  }
669  }
670  }
671 
672  // cuts on distance to tube edge
673  // only if in a different phi sector
674  if (result.phiSector_a != result.phiSector_b) {
675  // measured inner segment
676  if (result.phiposerr_a < 10001.000) {
677  if (station_a == MuonStationIndex::BM && station_b == MuonStationIndex::BO) {
678  return result.shorttube_a <= 800;
679  }
680  if (station_a == MuonStationIndex::EI && station_b == MuonStationIndex::EM) {
681  // MM or STGC have result.shorttube = 99999.
682  return result.shorttube_a <= 3500 || result.shorttube_a == 99999.;
683  }
684  if (station_a == MuonStationIndex::EI && station_b == MuonStationIndex::EO) {
685  return result.shorttube_a <= 3500 || result.shorttube_a == 99999.;
686  }
687  if (station_a == MuonStationIndex::EM && station_b == MuonStationIndex::EO) {
688  return result.shorttube_a <= 800;
689  }
690  }
691  // measured outer segment
692  if (result.phiposerr_b < 10001.000) {
693  if (station_a == MuonStationIndex::BI && station_b == MuonStationIndex::BM) {
694  return result.shorttube_b <= 800;
695  }
696  if (station_a == MuonStationIndex::BI && station_b == MuonStationIndex::BO) {
697  return result.shorttube_b <= 800;
698  }
699  if (station_a == MuonStationIndex::BM && station_b == MuonStationIndex::BO) {
700  return result.shorttube_b <= 800;
701  }
702  if (station_a == MuonStationIndex::EI && station_b == MuonStationIndex::EM) {
703  return result.shorttube_b <= 1400;
704  }
705  }
706  }
707  return true;
708  }
709 
710 
711  // Second: tight selection if only if requested
712  // cuts on second coordinate
713  if (result.phiSector_a == result.phiSector_b) {
714  if (result.phiposerr_a < 10001.000 && result.phiposerr_b < 10001.000) {
715  if (!isEndcap_a && !isEndcap_b) {
716  return result.deltaPhipos <= 0.1;
717  }
718  if (isEndcap_a && isEndcap_b) {
719  // small sectors
720  if (result.phiSector_a % 2 == 0) {
721  return result.deltaPhipos <= 0.08;
722  }
723  // large sectors
724  if (result.phiSector_a % 2 == 1) {
725  return result.deltaPhipos <= 0.1;
726  }
727  }
728  }
729  }
730  // cuts on distance to tube edge
731  // only if in a different phi sector
732  if (result.phiSector_a != result.phiSector_b) {
733  if (result.phiposerr_a < 10001.000 && result.phiposerr_b < 10001.000) {
734  if (!isEndcap_a && !isEndcap_b) {
735  return result.deltaPhipos <= 0.05;
736  }
737  if (isEndcap_a && isEndcap_b) {
738  return result.deltaPhipos <= 0.1;
739  }
740  }
741 
742 
743  // measured inner segment
744  if (result.phiposerr_a < 10001.000) {
745  if (station_a == MuonStationIndex::BM && station_b == MuonStationIndex::BO) {
746  return result.shorttube_a <= 600;
747  }
748  if (station_a == MuonStationIndex::EI && station_b == MuonStationIndex::EM) {
749  return result.shorttube_a <= 3500 || result.shorttube_a == 99999.;
750  }
751  if (station_a == MuonStationIndex::EI && station_b == MuonStationIndex::EO) {
752  return result.shorttube_a <= 3500 || result.shorttube_a == 99999.;
753  }
754  if (station_a == MuonStationIndex::EM && station_b == MuonStationIndex::EO) {
755  return result.shorttube_a <= 500;
756  }
757  }
758  // measured outer segment
759  if (result.phiposerr_b < 10001.000) {
760  if (station_a == MuonStationIndex::BI && station_b == MuonStationIndex::BM) {
761  return result.shorttube_b <= 600;
762  }
763  if (station_a == MuonStationIndex::BI && station_b == MuonStationIndex::BO) {
764  return result.shorttube_b <= 700;
765  }
766  if (station_a == MuonStationIndex::BM && station_b == MuonStationIndex::BO) {
767  return result.shorttube_b <= 700;
768  }
769  if (station_a == MuonStationIndex::EI && station_b == MuonStationIndex::EM) {
770  return result.shorttube_b <= 700;
771  }
772  }
773 
774  }
775  return true;
776 } // if m_useLocalAngles

◆ 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_angleABCut

double Muon::MuonSegmentMatchingTool::m_angleABCut {}
private

Definition at line 146 of file MuonSegmentMatchingTool.h.

◆ m_curvedMatches

std::atomic_uint Muon::MuonSegmentMatchingTool::m_curvedMatches {0}
mutableprivate

Definition at line 120 of file MuonSegmentMatchingTool.h.

◆ m_curvedMatchesGood

std::atomic_uint Muon::MuonSegmentMatchingTool::m_curvedMatchesGood {0}
mutableprivate

Definition at line 121 of file MuonSegmentMatchingTool.h.

◆ 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_doCurvedMatch

bool Muon::MuonSegmentMatchingTool::m_doCurvedMatch
private

Definition at line 127 of file MuonSegmentMatchingTool.h.

◆ m_doOverlapMatch

bool Muon::MuonSegmentMatchingTool::m_doOverlapMatch
private

Definition at line 125 of file MuonSegmentMatchingTool.h.

◆ m_doStraightLineMatch

bool Muon::MuonSegmentMatchingTool::m_doStraightLineMatch
private

Definition at line 126 of file MuonSegmentMatchingTool.h.

◆ m_drExtrapAlignmentOffset

double Muon::MuonSegmentMatchingTool::m_drExtrapAlignmentOffset
private

Definition at line 171 of file MuonSegmentMatchingTool.h.

◆ m_drExtrapRMS

double Muon::MuonSegmentMatchingTool::m_drExtrapRMS
private

Definition at line 170 of file MuonSegmentMatchingTool.h.

◆ m_dthetaExtrapRMS

double Muon::MuonSegmentMatchingTool::m_dthetaExtrapRMS
private

Definition at line 172 of file MuonSegmentMatchingTool.h.

◆ m_dumpAngles

bool Muon::MuonSegmentMatchingTool::m_dumpAngles
private

dump matching angle info to screen

Definition at line 167 of file MuonSegmentMatchingTool.h.

◆ m_duplicateHitUses

std::atomic_uint Muon::MuonSegmentMatchingTool::m_duplicateHitUses {0}
mutableprivate

Definition at line 122 of file MuonSegmentMatchingTool.h.

◆ m_edmHelperSvc

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

EDM Helper tool.

Definition at line 91 of file MuonSegmentMatchingTool.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::MuonSegmentMatchingTool::m_idHelperSvc
private
Initial value:
{
this,
"MuonIdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc",
}

Definition at line 86 of file MuonSegmentMatchingTool.h.

◆ m_isCosmics

bool Muon::MuonSegmentMatchingTool::m_isCosmics
private

Definition at line 124 of file MuonSegmentMatchingTool.h.

◆ m_matchingbee_sphisec

double Muon::MuonSegmentMatchingTool::m_matchingbee_sphisec {}
private

Definition at line 163 of file MuonSegmentMatchingTool.h.

◆ m_matchingbibm_lphisec

double Muon::MuonSegmentMatchingTool::m_matchingbibm_lphisec
private

Definition at line 150 of file MuonSegmentMatchingTool.h.

◆ m_matchingbibm_sphisec

double Muon::MuonSegmentMatchingTool::m_matchingbibm_sphisec
private

Definition at line 156 of file MuonSegmentMatchingTool.h.

◆ m_matchingbibo_lphisec

double Muon::MuonSegmentMatchingTool::m_matchingbibo_lphisec
private

Definition at line 151 of file MuonSegmentMatchingTool.h.

◆ m_matchingbibo_sphisec

double Muon::MuonSegmentMatchingTool::m_matchingbibo_sphisec
private

Definition at line 157 of file MuonSegmentMatchingTool.h.

◆ m_matchingbmbo_lphisec

double Muon::MuonSegmentMatchingTool::m_matchingbmbo_lphisec
private

Definition at line 152 of file MuonSegmentMatchingTool.h.

◆ m_matchingbmbo_sphisec

double Muon::MuonSegmentMatchingTool::m_matchingbmbo_sphisec
private

Definition at line 158 of file MuonSegmentMatchingTool.h.

◆ m_matchingeiem_lphisec

double Muon::MuonSegmentMatchingTool::m_matchingeiem_lphisec
private

Definition at line 153 of file MuonSegmentMatchingTool.h.

◆ m_matchingeiem_sphisec

double Muon::MuonSegmentMatchingTool::m_matchingeiem_sphisec
private

Definition at line 159 of file MuonSegmentMatchingTool.h.

◆ m_matchingeieo_lphisec

double Muon::MuonSegmentMatchingTool::m_matchingeieo_lphisec
private

Definition at line 154 of file MuonSegmentMatchingTool.h.

◆ m_matchingeieo_sphisec

double Muon::MuonSegmentMatchingTool::m_matchingeieo_sphisec
private

Definition at line 160 of file MuonSegmentMatchingTool.h.

◆ m_matchingemeo_lphisec

double Muon::MuonSegmentMatchingTool::m_matchingemeo_lphisec
private

Definition at line 155 of file MuonSegmentMatchingTool.h.

◆ m_matchingemeo_sphisec

double Muon::MuonSegmentMatchingTool::m_matchingemeo_sphisec
private

Definition at line 161 of file MuonSegmentMatchingTool.h.

◆ m_maxDistSegments

double Muon::MuonSegmentMatchingTool::m_maxDistSegments
private

cut on the maximum distance between the segments

Definition at line 147 of file MuonSegmentMatchingTool.h.

◆ m_minDistSegmentsCosmics

double Muon::MuonSegmentMatchingTool::m_minDistSegmentsCosmics {}
private

cut on the minimum distance between the segments, if the distance is larger

than the cut the segments are always matched (for cosmics)

Definition at line 148 of file MuonSegmentMatchingTool.h.

◆ m_onlySameSectorIfTight

bool Muon::MuonSegmentMatchingTool::m_onlySameSectorIfTight
private

reject all segments in different sectors if in tight matching

Definition at line 165 of file MuonSegmentMatchingTool.h.

◆ m_overlapMatchAngleDPhiCut

double Muon::MuonSegmentMatchingTool::m_overlapMatchAngleDPhiCut
private

cut of the angular difference between phi from phi match and phi from positions

Definition at line 137 of file MuonSegmentMatchingTool.h.

◆ m_overlapMatchAngleDYZCut

double Muon::MuonSegmentMatchingTool::m_overlapMatchAngleDYZCut
private

cut of the angular difference between phi from phi match and phi from positions

Definition at line 140 of file MuonSegmentMatchingTool.h.

◆ m_overlapMatches

std::atomic_uint Muon::MuonSegmentMatchingTool::m_overlapMatches {0}
mutableprivate

Definition at line 118 of file MuonSegmentMatchingTool.h.

◆ m_overlapMatchesGood

std::atomic_uint Muon::MuonSegmentMatchingTool::m_overlapMatchesGood {0}
mutableprivate

Definition at line 119 of file MuonSegmentMatchingTool.h.

◆ m_overlapMatchPhiHitPullCut

double Muon::MuonSegmentMatchingTool::m_overlapMatchPhiHitPullCut
private

cut on the average pull of the phi hits with the new segment parameters

Definition at line 143 of file MuonSegmentMatchingTool.h.

◆ m_overlapMatchPositionCut

double Muon::MuonSegmentMatchingTool::m_overlapMatchPositionCut
private

cut on the distance of best position from the chamber bounds

Definition at line 141 of file MuonSegmentMatchingTool.h.

◆ m_overlapMatchPositionResidualCut

double Muon::MuonSegmentMatchingTool::m_overlapMatchPositionResidualCut
private

cut on the position residual for the best position match

Definition at line 142 of file MuonSegmentMatchingTool.h.

◆ m_overlapResolvingTool

ToolHandle<Muon::IMuonSegmentInOverlapResolvingTool> Muon::MuonSegmentMatchingTool::m_overlapResolvingTool
private
Initial value:
{
this,
"MuonSegmentInOverlapResolvingTool",
"Muon::MuonSegmentInOverlapResolvingTool/MuonSegmentInOverlapResolvingTool",
}

matching tool to handle the overlaps

Definition at line 103 of file MuonSegmentMatchingTool.h.

◆ m_pairMatchingTool

ToolHandle<Muon::IMuonSegmentPairMatchingTool> Muon::MuonSegmentMatchingTool::m_pairMatchingTool
private
Initial value:
{
this,
"MuonSegmentPairMatchingTool",
"Muon::MuonSegmentPairMatchingTool/MuonSegmentPairMatchingTool",
}

matching tool to handle the pairs of segments

Definition at line 108 of file MuonSegmentMatchingTool.h.

◆ m_phiMatch

bool Muon::MuonSegmentMatchingTool::m_phiMatch
private

Definition at line 129 of file MuonSegmentMatchingTool.h.

◆ m_printer

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

EDM printer tool.

Definition at line 98 of file MuonSegmentMatchingTool.h.

◆ m_straightLineMatchAngleCut

double Muon::MuonSegmentMatchingTool::m_straightLineMatchAngleCut
private

Definition at line 133 of file MuonSegmentMatchingTool.h.

◆ m_straightLineMatches

std::atomic_uint Muon::MuonSegmentMatchingTool::m_straightLineMatches {0}
mutableprivate

Definition at line 116 of file MuonSegmentMatchingTool.h.

◆ m_straightLineMatchesGood

std::atomic_uint Muon::MuonSegmentMatchingTool::m_straightLineMatchesGood {0}
mutableprivate

Definition at line 117 of file MuonSegmentMatchingTool.h.

◆ m_straightLineMatchPositionCut

double Muon::MuonSegmentMatchingTool::m_straightLineMatchPositionCut
private

Definition at line 134 of file MuonSegmentMatchingTool.h.

◆ m_thetaMatch

bool Muon::MuonSegmentMatchingTool::m_thetaMatch
private

Definition at line 128 of file MuonSegmentMatchingTool.h.

◆ m_toroidOn

Gaudi::Property<bool> Muon::MuonSegmentMatchingTool::m_toroidOn {this, "ToroidOn", true, "Status of toroidal B-Field"}
private

Definition at line 114 of file MuonSegmentMatchingTool.h.

◆ m_useEndcapExtrapolationMatching

bool Muon::MuonSegmentMatchingTool::m_useEndcapExtrapolationMatching
private

Definition at line 169 of file MuonSegmentMatchingTool.h.

◆ m_useLocalAngles

bool Muon::MuonSegmentMatchingTool::m_useLocalAngles {}
private

Definition at line 130 of file MuonSegmentMatchingTool.h.

◆ m_useTightCuts

bool Muon::MuonSegmentMatchingTool::m_useTightCuts
private

only apply tight selection for busy combinations

Definition at line 166 of file MuonSegmentMatchingTool.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::MuonSegmentMatchingTool::m_doOverlapMatch
bool m_doOverlapMatch
Definition: MuonSegmentMatchingTool.h:125
Muon::MuonStationIndex::BE
@ BE
Definition: MuonStationIndex.h:25
Muon::MuonSegmentMatchingTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSegmentMatchingTool.h:86
Muon::MuonSegmentMatchingTool::m_matchingbibo_lphisec
double m_matchingbibo_lphisec
Definition: MuonSegmentMatchingTool.h:151
Muon::MuonSegmentMatchingTool::suppressNoise
bool suppressNoise(const MuonSegment &seg1, const MuonSegment &seg2, const bool &useTightCuts) const
Suppress noise from cavern background/pile up using basic cuts
Definition: MuonSegmentMatchingTool.cxx:325
Muon::MuonSegmentMatchingTool::m_overlapMatchPositionCut
double m_overlapMatchPositionCut
cut on the distance of best position from the chamber bounds
Definition: MuonSegmentMatchingTool.h:141
Muon::MuonSegmentMatchingTool::m_matchingemeo_lphisec
double m_matchingemeo_lphisec
Definition: MuonSegmentMatchingTool.h:155
get_generator_info.result
result
Definition: get_generator_info.py:21
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
Muon::MuonSegmentMatchingTool::m_maxDistSegments
double m_maxDistSegments
cut on the maximum distance between the segments
Definition: MuonSegmentMatchingTool.h:147
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Muon::MuonSegmentMatchingTool::m_straightLineMatchPositionCut
double m_straightLineMatchPositionCut
Definition: MuonSegmentMatchingTool.h:134
Muon::MuonSegmentMatchingTool::hasStereoAngle
bool hasStereoAngle(const Identifier &id1, const Identifier &id2) const
check whether the two segments have a stereo angle
Definition: MuonSegmentMatchingTool.cxx:304
Muon::MuonStationIndex::EO
@ EO
Definition: MuonStationIndex.h:26
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Muon::MuonSegmentMatchingTool::m_matchingbmbo_lphisec
double m_matchingbmbo_lphisec
Definition: MuonSegmentMatchingTool.h:152
initialize
void initialize()
Definition: run_EoverP.cxx:894
Muon::MuonSegmentMatchingTool::m_duplicateHitUses
std::atomic_uint m_duplicateHitUses
Definition: MuonSegmentMatchingTool.h:122
Muon::MuonSegmentMatchingTool::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
EDM printer tool.
Definition: MuonSegmentMatchingTool.h:98
M_PI
#define M_PI
Definition: ActiveFraction.h:11
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
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
Muon::MuonStationIndex::BI
@ BI
Definition: MuonStationIndex.h:25
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
Muon::MuonSegmentMatchingTool::m_overlapMatches
std::atomic_uint m_overlapMatches
Definition: MuonSegmentMatchingTool.h:118
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::MuonSegment
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/MuonSegment.h:13
Muon::MuonSegmentMatchingTool::m_matchingeiem_sphisec
double m_matchingeiem_sphisec
Definition: MuonSegmentMatchingTool.h:159
Muon::MuonSegmentMatchingTool::m_drExtrapRMS
double m_drExtrapRMS
Definition: MuonSegmentMatchingTool.h:170
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Muon::MuonSegmentMatchingTool::m_doCurvedMatch
bool m_doCurvedMatch
Definition: MuonSegmentMatchingTool.h:127
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
Muon::MuonSegmentMatchingTool::m_phiMatch
bool m_phiMatch
Definition: MuonSegmentMatchingTool.h:129
Muon::MuonSegmentMatchingTool::m_isCosmics
bool m_isCosmics
Definition: MuonSegmentMatchingTool.h:124
Muon::MuonSegmentMatchingTool::m_matchingbibo_sphisec
double m_matchingbibo_sphisec
Definition: MuonSegmentMatchingTool.h:157
Muon::MuonSegmentMatchingTool::m_straightLineMatches
std::atomic_uint m_straightLineMatches
Definition: MuonSegmentMatchingTool.h:116
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Muon::MuonSegmentMatchingTool::m_matchingemeo_sphisec
double m_matchingemeo_sphisec
Definition: MuonSegmentMatchingTool.h:161
Muon::MuonSegmentMatchingTool::m_curvedMatches
std::atomic_uint m_curvedMatches
Definition: MuonSegmentMatchingTool.h:120
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Muon::MuonSegmentMatchingTool::isSLMatch
bool isSLMatch(const Identifier &chid1, const Identifier &chid2) const
check whether we should perform a straight line match
Definition: MuonSegmentMatchingTool.cxx:282
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
id2
HWIdentifier id2
Definition: LArRodBlockPhysicsV0.cxx:562
Muon::MuonStationIndex::BM
@ BM
Definition: MuonStationIndex.h:25
Muon::MuonSegmentMatchingTool::m_matchingbibm_lphisec
double m_matchingbibm_lphisec
Definition: MuonSegmentMatchingTool.h:150
Muon::MuonSegmentMatchingTool::m_onlySameSectorIfTight
bool m_onlySameSectorIfTight
reject all segments in different sectors if in tight matching
Definition: MuonSegmentMatchingTool.h:165
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Muon::MuonStationIndex::EI
@ EI
Definition: MuonStationIndex.h:26
MuonHough::z_end
constexpr double z_end
z value whereafter no magnetic field / curvature
Definition: MuonHoughMathUtils.h:28
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
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
Muon::MuonSegmentMatchingTool::m_matchingeieo_sphisec
double m_matchingeieo_sphisec
Definition: MuonSegmentMatchingTool.h:160
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Muon::MuonSegmentMatchingTool::m_useEndcapExtrapolationMatching
bool m_useEndcapExtrapolationMatching
Definition: MuonSegmentMatchingTool.h:169
Muon::MuonSegmentMatchingTool::m_drExtrapAlignmentOffset
double m_drExtrapAlignmentOffset
Definition: MuonSegmentMatchingTool.h:171
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Muon::MuonSegmentMatchingTool::overlapMatch
bool overlapMatch(const EventContext &ctx, const MuonSegment &seg1, const MuonSegment &seg2) const
perform overlap matching
Definition: MuonSegmentMatchingTool.cxx:214
Muon::MuonSegmentMatchingTool::m_overlapResolvingTool
ToolHandle< Muon::IMuonSegmentInOverlapResolvingTool > m_overlapResolvingTool
matching tool to handle the overlaps
Definition: MuonSegmentMatchingTool.h:103
Muon::MuonSegmentMatchingTool::m_straightLineMatchesGood
std::atomic_uint m_straightLineMatchesGood
Definition: MuonSegmentMatchingTool.h:117
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::MuonSegmentMatchingTool::m_matchingeiem_lphisec
double m_matchingeiem_lphisec
Definition: MuonSegmentMatchingTool.h:153
Muon::MuonSegmentMatchingTool::m_overlapMatchAngleDPhiCut
double m_overlapMatchAngleDPhiCut
cut of the angular difference between phi from phi match and phi from positions
Definition: MuonSegmentMatchingTool.h:137
Muon::MuonSegmentMatchingTool::m_matchingbmbo_sphisec
double m_matchingbmbo_sphisec
Definition: MuonSegmentMatchingTool.h:158
a
TList * a
Definition: liststreamerinfos.cxx:10
Muon::MuonSegmentMatchingTool::m_dthetaExtrapRMS
double m_dthetaExtrapRMS
Definition: MuonSegmentMatchingTool.h:172
h
Muon::MuonStationIndex::BO
@ BO
Definition: MuonStationIndex.h:25
Muon::MuonSegmentMatchingTool::m_toroidOn
Gaudi::Property< bool > m_toroidOn
Definition: MuonSegmentMatchingTool.h:114
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::MuonSegmentMatchingTool::m_thetaMatch
bool m_thetaMatch
Definition: MuonSegmentMatchingTool.h:128
Muon::MuonSegmentMatchingTool::m_pairMatchingTool
ToolHandle< Muon::IMuonSegmentPairMatchingTool > m_pairMatchingTool
matching tool to handle the pairs of segments
Definition: MuonSegmentMatchingTool.h:108
Muon::MuonSegmentMatchingTool::m_overlapMatchPositionResidualCut
double m_overlapMatchPositionResidualCut
cut on the position residual for the best position match
Definition: MuonSegmentMatchingTool.h:142
Muon::MuonSegmentMatchingTool::endcapExtrapolationMatch
bool endcapExtrapolationMatch(const MuonSegment &seg1, const MuonSegment &seg2, bool useTightCuts) const
match an endcap middle or outer segment with an inner segment using a simple analytic extrapolation m...
Definition: MuonSegmentMatchingTool.cxx:780
Muon::MuonSegmentMatchingTool::m_doStraightLineMatch
bool m_doStraightLineMatch
Definition: MuonSegmentMatchingTool.h:126
Muon::MuonSegmentMatchingTool::m_straightLineMatchAngleCut
double m_straightLineMatchAngleCut
Definition: MuonSegmentMatchingTool.h:133
Muon::MuonSegmentMatchingTool::simpleEndcapExtrapolate
void simpleEndcapExtrapolate(double x_segment, double y_segment, double z_segment, double theta_segment, double z_extrapolated, double &r_expected, double &theta_expected, double &rhoInv) const
extrapolate segment in middle or outer endcap station to inner layer assuming the particle came from ...
Definition: MuonSegmentMatchingTool.cxx:851
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Muon::MuonSegmentMatchingTool::m_overlapMatchAngleDYZCut
double m_overlapMatchAngleDYZCut
cut of the angular difference between phi from phi match and phi from positions
Definition: MuonSegmentMatchingTool.h:140
Muon::MuonSegmentMatchingTool::curvedMatch
bool curvedMatch(const MuonSegment &seg1, const MuonSegment &seg2) const
perform curved matching
Definition: MuonSegmentMatchingTool.cxx:192
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:798
Muon::MuonSegmentMatchingTool::m_curvedMatchesGood
std::atomic_uint m_curvedMatchesGood
Definition: MuonSegmentMatchingTool.h:121
Muon::MuonSegmentMatchingTool::m_overlapMatchesGood
std::atomic_uint m_overlapMatchesGood
Definition: MuonSegmentMatchingTool.h:119
Muon::MuonSegmentMatchingTool::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
EDM Helper tool.
Definition: MuonSegmentMatchingTool.h:91
Muon::MuonSegmentMatchingTool::suppressNoisePhi
bool suppressNoisePhi(const MuonSegment &seg1, const MuonSegment &seg2, const bool &useTightCuts) const
Suppress noise from cavern background/pile up using basic cuts in phi.
Definition: MuonSegmentMatchingTool.cxx:608
Muon::MuonSegmentMatchingTool::m_dumpAngles
bool m_dumpAngles
dump matching angle info to screen
Definition: MuonSegmentMatchingTool.h:167
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:26
Muon::MuonSegmentMatchingTool::m_matchingeieo_lphisec
double m_matchingeieo_lphisec
Definition: MuonSegmentMatchingTool.h:154
Muon::MuonSegmentMatchingTool::m_useTightCuts
bool m_useTightCuts
only apply tight selection for busy combinations
Definition: MuonSegmentMatchingTool.h:166
Muon::MuonSegmentMatchingTool::straightLineMatch
bool straightLineMatch(const MuonSegment &seg1, const MuonSegment &seg2) const
perform straight line matching using SL extrapolation
Definition: MuonSegmentMatchingTool.cxx:170
Muon::MuonSegmentMatchingTool::m_minDistSegmentsCosmics
double m_minDistSegmentsCosmics
cut on the minimum distance between the segments, if the distance is larger
Definition: MuonSegmentMatchingTool.h:148
Muon::MuonStationIndex::EM
@ EM
Definition: MuonStationIndex.h:26
fitman.k
k
Definition: fitman.py:528
Muon::MuonSegmentMatchingTool::m_overlapMatchPhiHitPullCut
double m_overlapMatchPhiHitPullCut
cut on the average pull of the phi hits with the new segment parameters
Definition: MuonSegmentMatchingTool.h:143
Muon::MuonSegmentMatchingTool::m_matchingbibm_sphisec
double m_matchingbibm_sphisec
Definition: MuonSegmentMatchingTool.h:156
Identifier
Definition: IdentifierFieldParser.cxx:14