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

#include <MuonRefitTool.h>

Inheritance diagram for Muon::MuonRefitTool:
Collaboration diagram for Muon::MuonRefitTool:

Classes

struct  State
 

Public Member Functions

 MuonRefitTool (const std::string &ty, const std::string &na, const IInterface *pa)
 
virtual ~MuonRefitTool ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
std::unique_ptr< Trk::Trackrefit (const Trk::Track &track, const EventContext &ctx, const Settings *settings) const override
 refit a track More...
 
std::vector< std::unique_ptr< Trk::Track > > refit (const std::vector< Trk::Track * > &tracks, const EventContext &ctx, const Settings *settings) const override
 refit and back extrapolate a vector of track pairs 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, V, H > &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

std::unique_ptr< Trk::TrackupdateErrors (const Trk::Track &track, const EventContext &ctx, const Settings &settings) const
 update errors on a muon track More...
 
std::unique_ptr< Trk::TrackupdateMdtErrors (const Trk::Track &track, const EventContext &ctx, const Settings &settings) const
 
std::unique_ptr< Trk::TrackupdateAlignmentErrors (const Trk::Track &track, const EventContext &ctx, const Settings &settings) const
 
std::unique_ptr< Trk::TrackmakeAEOTs (const Trk::Track &track) const
 
std::unique_ptr< Trk::TrackmakeSimpleAEOTs (const Trk::Track &track) const
 
std::unique_ptr< Trk::TrackremoveOutliers (const Trk::Track &track, const Settings &settings) const
 
bool removeMdtOutliers (const Trk::TrackParameters &pars, const std::vector< const MdtDriftCircleOnTrack * > &hits, std::set< Identifier > &removedIdentifiers, const Settings &settings) const
 
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

std::unique_ptr< Trk::PerigeecreatePerigee (const Trk::TrackParameters &pars, const EventContext &ctx) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< IMuonEDMHelperSvcm_edmHelperSvc
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ToolHandle< Trk::ITrkAlignmentDeviationToolm_alignErrorTool {this, "AlignmentErrorTool", "MuonAlign::AlignmentErrorTool"}
 Does not provide any method with EventContext yet. More...
 
PublicToolHandle< MuonEDMPrinterToolm_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
 
ToolHandle< Trk::ITrackFitterm_trackFitter {this, "Fitter", "Trk::GlobalChi2Fitter/MCTBFitterMaterialFromTrack"}
 
ToolHandle< Trk::IExtrapolatorm_muonExtrapolator {this, "MuonExtrapolator", "Trk::Extrapolator/MuonExtrapolator"}
 
ToolHandle< IMdtDriftCircleOnTrackCreatorm_mdtRotCreator
 
ToolHandle< IMuonCompetingClustersOnTrackCreatorm_compClusterCreator
 
ToolHandle< IDCSLFitProviderm_t0Fitter {this, "T0Fitter", ""}
 
ToolHandle< Muon::IMuonTrackExtrapolationToolm_muonEntryTrackExtrapolator {this, "MuonEntryExtrapolationTool", ""}
 
Gaudi::Property< int > m_finderDebugLevel {this, "FinderDebugLevel", -1}
 
Gaudi::Property< double > m_minMuonMomentum {this, "MinMuonMom", 4000}
 
Gaudi::Property< double > m_fixedError {this, "UsedFixedError", 1}
 
Gaudi::Property< double > m_flagT0FitRange {this, "FlagT0FitRange", 0.00005}
 
Gaudi::Property< float > m_alignmentDelta {this, "AlignmentDelta", 0}
 
Gaudi::Property< float > m_alignmentAngle {this, "AlignmentAngle", 0}
 
Gaudi::Property< float > m_alignmentDeltaError {this, "AlignmentDeltaError", 0.1}
 
Gaudi::Property< float > m_alignmentAngleError {this, "AlignmentAngleError", 0.001}
 
Gaudi::Property< bool > m_alignmentErrors {this, "AlignmentErrors", false}
 
Gaudi::Property< bool > m_simpleAEOTs {this, "SimpleAEOTs", false}
 
Gaudi::Property< bool > m_addAll {this, "AddAll", false}
 
Gaudi::Property< bool > m_addInner {this, "AddInner", false}
 
Gaudi::Property< bool > m_addMiddle {this, "AddMiddle", false}
 
Gaudi::Property< bool > m_addTwo {this, "AddTwo", false}
 
Gaudi::Property< bool > m_deweightBEE {this, "DeweightBEE", false}
 
Gaudi::Property< bool > m_deweightEE {this, "DeweightEE", false}
 
Gaudi::Property< bool > m_deweightBIS78 {this, "DeweightBIS78", true}
 
Gaudi::Property< bool > m_deweightBME {this, "DeweightBME", true}
 
Gaudi::Property< bool > m_deweightBOE {this, "DeweightBOE", true}
 
Gaudi::Property< bool > m_deweightEEL1C05 {this, "DeweightEEL1C05", false}
 
Gaudi::Property< bool > m_deweightTwoStationTracks {this, "DeweightTwoStationTracks", false}
 
MuonDriftCircleErrorStrategy m_errorStrategyBEE
 
MuonDriftCircleErrorStrategy m_errorStrategyEE
 
MuonDriftCircleErrorStrategy m_errorStrategyBIS78
 
MuonDriftCircleErrorStrategy m_errorStrategyBXE
 
MuonDriftCircleErrorStrategy m_errorStrategyEEL1C05
 
MuonDriftCircleErrorStrategy m_errorStrategyBarEnd
 
MuonDriftCircleErrorStrategy m_errorStrategySL
 
MuonDriftCircleErrorStrategy m_errorStrategyTwoStations
 
MuonDriftCircleErrorStrategy m_errorStrategy
 
MuonDriftCircleErrorStrategy m_muonErrorStrategy
 
Settings m_defaultSettings
 
std::atomic< unsigned int > m_nrefits {0}
 
std::atomic< unsigned int > m_ngoodRefits {0}
 
std::atomic< unsigned int > m_failedOutlierRemoval {0}
 
std::atomic< unsigned int > m_failedErrorUpdate {0}
 
std::atomic< unsigned int > m_failedRefit {0}
 
std::atomic< unsigned int > m_failedExtrapolationMuonEntry {0}
 
int m_BME_station {0}
 
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 34 of file MuonRefitTool.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

◆ MuonRefitTool()

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

◆ ~MuonRefitTool()

virtual Muon::MuonRefitTool::~MuonRefitTool ( )
virtualdefault

Member Function Documentation

◆ createPerigee()

std::unique_ptr< Trk::Perigee > Muon::MuonRefitTool::createPerigee ( const Trk::TrackParameters pars,
const EventContext &  ctx 
) const
private

Definition at line 1471 of file MuonRefitTool.cxx.

1471  {
1472  std::unique_ptr<Trk::Perigee> perigee;
1473  if (m_muonExtrapolator.empty()) { return perigee; }
1474  Trk::PerigeeSurface persurf(pars.position());
1475  std::unique_ptr<Trk::TrackParameters> exPars{m_muonExtrapolator->extrapolateDirectly(ctx, pars, persurf)};
1476  perigee.reset (dynamic_cast<Trk::Perigee*>(exPars.release()));
1477  if (!perigee) {
1478  ATH_MSG_WARNING(" Extrapolation to Perigee surface did not return a perigee!! ");
1479  return perigee;
1480  }
1481  return perigee;
1482  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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

◆ finalize()

StatusCode Muon::MuonRefitTool::finalize ( )
overridevirtual

Definition at line 135 of file MuonRefitTool.cxx.

135  {
136  double scaleRefit = m_nrefits != 0 ? 1. / (double)m_nrefits : 1.;
137  ATH_MSG_INFO("Number of refits "
138  << m_nrefits << std::endl
139  << "Good " << scaleRefit * m_ngoodRefits << std::endl
140  << "Failed Outlier removal " << scaleRefit * m_failedOutlierRemoval << std::endl
141  << "Failed Error Update " << scaleRefit * m_failedErrorUpdate << std::endl
142  << "Failed Refit " << scaleRefit * m_failedRefit << std::endl
143  << "Failed Extrapolation to Muon Entry " << scaleRefit * m_failedExtrapolationMuonEntry);
144  return StatusCode::SUCCESS;
145  }

◆ initialize()

StatusCode Muon::MuonRefitTool::initialize ( )
overridevirtual

Definition at line 45 of file MuonRefitTool.cxx.

45  {
46  ATH_MSG_INFO("Initializing MuonRefitTool " << name());
47 
48  ATH_CHECK(m_printer.retrieve());
49  ATH_CHECK(m_edmHelperSvc.retrieve());
50  ATH_CHECK(m_idHelperSvc.retrieve());
51  m_BME_station = m_idHelperSvc->mdtIdHelper().stationNameIndex("BME");
52 
53  if (m_alignmentErrors) {
54  if (!m_alignErrorTool.empty()) ATH_CHECK(m_alignErrorTool.retrieve());
55  } else {
56  m_alignErrorTool.disable();
57  }
58  ATH_CHECK(m_muonExtrapolator.retrieve());
59  ATH_CHECK(m_trackFitter.retrieve());
60 
61  ATH_MSG_INFO("Retrieved " << m_trackFitter);
62 
63  ATH_CHECK(m_mdtRotCreator.retrieve());
64  if (!m_compClusterCreator.empty()) ATH_CHECK(m_compClusterCreator.retrieve());
65 
66  if (!m_t0Fitter.empty()) {
67  ATH_CHECK(m_t0Fitter.retrieve());
68  ATH_MSG_INFO("Retrieved " << m_t0Fitter);
69  }
70 
72 
74  MuonDriftCircleErrorStrategy strategy(bits);
89 
92 
95 
98 
101 
104 
107 
111 
115 
119 
123 
124  ATH_MSG_INFO("Options:");
125  if (m_deweightBEE) ATH_MSG_INFO(" Deweight BEE");
126  if (m_deweightEE) ATH_MSG_INFO(" Deweight EE");
127  if (m_deweightBIS78) ATH_MSG_INFO(" Deweight BIS78");
128  if (m_deweightBME) ATH_MSG_INFO(" Deweight BME");
129  if (m_deweightBOE) ATH_MSG_INFO(" Deweight BOE");
130  if (m_deweightEEL1C05) ATH_MSG_INFO(" Deweight EEL1C05");
131  if (m_deweightTwoStationTracks) ATH_MSG_INFO(" Deweight Two stations");
132  return StatusCode::SUCCESS;
133  }

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

access to tool interface

Definition at line 63 of file IMuonRefitTool.h.

63  {
64  static const InterfaceID IID_IMuonRefitTool("Muon::IMuonRefitTool", 1, 0);
65  return IID_IMuonRefitTool;
66  }

◆ makeAEOTs()

std::unique_ptr< Trk::Track > Muon::MuonRefitTool::makeAEOTs ( const Trk::Track track) const
protected

Where do these magic numbers come from?

Definition at line 232 of file MuonRefitTool.cxx.

232  {
233  //
234  // use the new AlignmentEffectsOnTrack class and alignmentErrorTool
235  //
236  if (m_alignErrorTool.empty()) { return std::make_unique<Trk::Track>(track); }
237  //
238  // Use the alignmentErrorTool and store a list of hits with error on position and angle
239  //
240  std::map<std::vector<Identifier>, std::pair<double, double>> alignerrmap;
241 
242  std::vector<Trk::AlignmentDeviation*> align_deviations;
243  m_alignErrorTool->makeAlignmentDeviations(track, align_deviations);
244 
245  int iok = 0;
246  bool isSmallChamber = false;
247  bool isLargeChamber = false;
248  bool isEndcap = false;
249  bool isBarrel = false;
250  std::vector<int> usedRotations;
251 
252  // loop on deviations
253  for (Trk::AlignmentDeviation* it : align_deviations) {
254  double angleError = 0.;
255  double translationError = 0.;
256  bool differentChambers = false;
257  int jdifferent = -1;
258  isSmallChamber = false;
259  isLargeChamber = false;
260  isEndcap = false;
261  isBarrel = false;
262 
263  if (dynamic_cast<MuonAlign::AlignmentTranslationDeviation*>(it)) {
264  translationError = std::sqrt(it->getCovariance(0, 0));
265  // vector to store hit id
266  std::vector<Identifier> hitids;
267  const auto& vec_riowithdev = it->getListOfHits();
268  // bool to decide if deviation should be skipped (if it's for more than 1 station)
269  for (const Trk::RIO_OnTrack* riowithdev : vec_riowithdev) {
270  const Identifier id_riowithdev = riowithdev->identify();
271  if (m_idHelperSvc->isEndcap(id_riowithdev)) {
272  isEndcap = true;
273  } else {
274  isBarrel = true;
275  }
276  if (m_idHelperSvc->isSmallChamber(id_riowithdev)) {
277  isSmallChamber = true;
278  } else {
279  isLargeChamber = true;
280  }
281  hitids.push_back(id_riowithdev);
282  if (hitids.size() > 1 && m_idHelperSvc->chamberId(id_riowithdev) != m_idHelperSvc->chamberId(hitids[0])) {
283  differentChambers = true;
284  jdifferent = hitids.size() - 1;
285  }
286  }
287  bool matchFound = false;
288  if (!hitids.empty()) {
289  int iRot = -1;
290  for (Trk::AlignmentDeviation* itRot : align_deviations) {
291  ++iRot;
292  if (dynamic_cast<MuonAlign::AlignmentRotationDeviation*>(itRot)) {
293  if (itRot->hasValidHashOfHits() && it->hasValidHashOfHits()) {
294  if (itRot->getHashOfHits() == it->getHashOfHits()) {
295  angleError = std::sqrt(itRot->getCovariance(0, 0));
296  matchFound = true;
297  usedRotations.push_back(iRot);
298  }
299  } else {
300  ATH_MSG_ERROR("One of the alignment deviations has an invalid hash created from the hits.");
301  }
302  }
303  if (matchFound) break;
304  }
305  }
306  // if deviation is accepted (i.e. only on one station) store the hit IDs associated with the deviation and the error
307 
308  // store (all) translationError with or without a matched angleError
309  iok++;
310  alignerrmap.insert(std::pair<std::vector<Identifier>, std::pair<double, double>>(
311  hitids, std::pair<double, double>(translationError, angleError)));
312 
313  if (matchFound)
314  ATH_MSG_DEBUG(" AlignmentMap entry " << iok << " filled with nr hitids " << hitids.size() << " "
315  << m_idHelperSvc->toString(hitids[0]) << " translationError " << translationError
316  << " angleError " << angleError);
317  if (!matchFound)
318  ATH_MSG_DEBUG(" AlignmentMap entry No angleError" << iok << " filled with nr hitids " << hitids.size() << " "
319  << m_idHelperSvc->toString(hitids[0]) << " translationError "
320  << translationError << " angleError " << angleError);
321  if (isEndcap) ATH_MSG_DEBUG(" AlignmentMap Endcap Chamber ");
322  if (isBarrel) ATH_MSG_DEBUG(" AlignmentMap Barrel Chamber ");
323  if (isSmallChamber) ATH_MSG_DEBUG(" AlignmentMap Small Chamber ");
324  if (isLargeChamber) ATH_MSG_DEBUG(" AlignmentMap Large Chamber ");
325  if (differentChambers)
326  ATH_MSG_DEBUG(" AlignmentMap entry " << iok << " for different Chamber "
327  << m_idHelperSvc->toString(hitids[jdifferent]));
328  }
329  }
330 
331  // now add the angleErrors that were NOT matched to a translationError
332 
333  int iRot = -1;
334  for (Trk::AlignmentDeviation* itRot : align_deviations) {
335  ++iRot;
336  isSmallChamber = false;
337  isLargeChamber = false;
338  isEndcap = false;
339  isBarrel = false;
340  if (dynamic_cast<MuonAlign::AlignmentRotationDeviation*>(itRot)) {
341  bool used = std::find(usedRotations.begin(), usedRotations.end(), iRot) != usedRotations.end();
342  if (used) continue;
343  ATH_MSG_ERROR("This following code should not be reached anymore!");
344  const auto& vec_riowithdev = itRot->getListOfHits();
345 
346  std::vector<Identifier> hitids;
347  // bool to decide if deviation should be skipped (if it's for more than 1 station)
348  for (const Trk::RIO_OnTrack* riowithdev : vec_riowithdev) {
349  Identifier id_riowithdev = riowithdev->identify();
350  if (m_idHelperSvc->isEndcap(id_riowithdev)) {
351  isEndcap = true;
352  } else {
353  isBarrel = true;
354  }
355  if (m_idHelperSvc->isSmallChamber(id_riowithdev)) {
356  isSmallChamber = true;
357  } else {
358  isLargeChamber = true;
359  }
360  hitids.push_back(id_riowithdev);
361  }
362 
363  double translationError = 0.;
364  double angleError = std::sqrt(itRot->getCovariance(0, 0));
365 
366  iok++;
367  alignerrmap.insert(std::pair<std::vector<Identifier>, std::pair<double, double>>(
368  hitids, std::pair<double, double>(translationError, angleError)));
369  ATH_MSG_DEBUG(" AlignmentMap entry No Translation Error " << iok << " filled with nr hitids " << hitids.size() << " "
370  << m_idHelperSvc->toString(hitids[0]) << " translationError "
371  << translationError << " angleError " << angleError);
372  if (isEndcap) ATH_MSG_DEBUG(" AlignmentMap Endcap Chamber");
373  if (isBarrel) ATH_MSG_DEBUG(" AlignmentMap Barrel Chamber");
374  if (isSmallChamber) ATH_MSG_DEBUG(" AlignmentMap Small Chamber ");
375  if (isLargeChamber) ATH_MSG_DEBUG(" AlignmentMap Large Chamber ");
376  }
377  }
378 
379  // clean-up of alignment deviations
380  for (auto* it : align_deviations) delete it;
381  align_deviations.clear();
382 
383  const Trk::TrackStates* states = track.trackStateOnSurfaces();
384  if (!states) {
385  ATH_MSG_WARNING(" track without states, discarding track ");
386  return nullptr;
387  }
388 
389  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern(0);
390  typePattern.set(Trk::TrackStateOnSurface::Alignment);
391 
392  std::vector<int> indexAEOTs;
393  std::vector<std::unique_ptr<Trk::TrackStateOnSurface>> tsosAEOTs;
394 
395  ATH_MSG_DEBUG(" AlignmentMap size " << alignerrmap.size());
396 
397  std::set<ChIndex> stationIds;
398 
399  for (const auto& itAli : alignerrmap) {
400  unsigned int imiddle = (itAli.first.size()) / 2;
401  Identifier idMiddle = itAli.first[imiddle];
402  int index = -1;
403  bool found = false;
404  for (const Trk::TrackStateOnSurface* tsit : *states) {
405  index++;
406  const Trk::MeasurementBase* meas = tsit->measurementOnTrack();
407  if (!meas) { continue; }
408  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
409  if (!id.is_valid()) continue;
410 
411  if (m_idHelperSvc->isMdt(id)) stationIds.insert(m_idHelperSvc->chamberIndex(id));
412 
413  // make Alignment Effect using the surface of the TSOS
414 
415  if (idMiddle == id) {
417  const double deltaError = std::max(itAli.second.first, 0.01);
418  const double angleError = std::max(itAli.second.second, 0.000001);
419  auto aEOT = std::make_unique<Trk::AlignmentEffectsOnTrack>(
420  0.,
421  deltaError,
422  0.,
423  angleError,
424  itAli.first,
425  tsit->measurementOnTrack()->associatedSurface());
426  std::unique_ptr<Trk::TrackStateOnSurface> tsosAEOT =
427  std::make_unique<Trk::TrackStateOnSurface>(
428  nullptr,
429  tsit->trackParameters()->uniqueClone(),
430  nullptr,
431  typePattern,
432  std::move(aEOT));
433  indexAEOTs.push_back(index);
434  tsosAEOTs.emplace_back(std::move(tsosAEOT));
435  found = true;
436  break;
437  }
438  }
439  if (!found) ATH_MSG_WARNING(" This should not happen Identifier from AlignmentErrorTool is not found");
440  }
441 
442  //
443  // clone the TSOSs and add the tsosAEOTs
444  //
445  auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
446  trackStateOnSurfaces->reserve(states->size() + indexAEOTs.size());
447  int index = -1;
448  for (const Trk::TrackStateOnSurface* tsit : *states) {
449  index++;
450  for (unsigned int i = 0; i < indexAEOTs.size(); i++) {
451  if (index == indexAEOTs[i]) {
452  if (tsosAEOTs[i])
453  trackStateOnSurfaces->push_back(std::move(tsosAEOTs[i]));
454  else {
455  ATH_MSG_WARNING("There's a trial to push back the same AEOT twice to the track...");
456  }
457  }
458  }
459 
460  // Skip AEOTs that are already present, as they will be added above already
461  if (tsit->alignmentEffectsOnTrack()) {
462  ATH_MSG_DEBUG("makeAEOTs: Skipping insertion of old AEOT!");
463  continue;
464  }
465  trackStateOnSurfaces->push_back(tsit->clone());
466  }
467 
468  if (indexAEOTs.empty() && stationIds.size() > 1) ATH_MSG_WARNING(" Track without AEOT ");
469 
470  std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(track.info(), std::move(trackStateOnSurfaces),
471  track.fitQuality() ? track.fitQuality()->uniqueClone() : nullptr);
472 
473  ATH_MSG_DEBUG(m_printer->print(*newTrack));
474  ATH_MSG_DEBUG(m_printer->printMeasurements(*newTrack));
475 
476  return newTrack;
477  }

◆ makeSimpleAEOTs()

std::unique_ptr< Trk::Track > Muon::MuonRefitTool::makeSimpleAEOTs ( const Trk::Track track) const
protected

Definition at line 479 of file MuonRefitTool.cxx.

479  {
480  // use the new AlignmentEffectsOnTrack class
481 
482  const Trk::TrackStates* states = track.trackStateOnSurfaces();
483  if (!states) {
484  ATH_MSG_WARNING(" track without states, discarding track ");
485  return nullptr;
486  }
487 
488  //
489  // first clone the TSOSs
490  //
491  auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
492  trackStateOnSurfaces->reserve(states->size() + 1);
493  for (const Trk::TrackStateOnSurface* tsit : *states) { trackStateOnSurfaces->push_back(tsit->clone()); }
494 
495  // loop over TSOSs and look for EM or BM chambers
496  std::vector<const Trk::TrackStateOnSurface*> indicesOfAffectedTSOS;
497  std::vector<const Trk::TrackStateOnSurface*> indicesOfAffectedTSOSInner;
498  std::vector<Identifier> indicesOfAffectedIds;
499  std::vector<Identifier> indicesOfAffectedIdsInner;
500  int index {-1}, indexFirst {-1}, indexFirstInner {-1};
501  for (const Trk::TrackStateOnSurface* tsit : *trackStateOnSurfaces) {
502  ++index;
503  if (!tsit) continue; // sanity check
504 
505  const Trk::TrackParameters* pars = tsit->trackParameters();
506  if (!pars) continue;
507 
508  // check whether state is a measurement
509  const Trk::MeasurementBase* meas = tsit->measurementOnTrack();
510  if (!meas) { continue; }
511 
512  // skip outliers
513  if (tsit->type(Trk::TrackStateOnSurface::Outlier)) continue;
514  if (tsit->alignmentEffectsOnTrack()) {
515  ATH_MSG_WARNING(" AlignmentEffectOnTrack is already on track skip it");
516  continue;
517  }
518  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
519  // Not a ROT, else it would have had an identifier. Keep the TSOS.
520  if (!id.is_valid() || !m_idHelperSvc->isMuon(id)) continue;
521  StIndex stIndex = m_idHelperSvc->stationIndex(id);
522  // skip phi measurements
523  if ((m_idHelperSvc->isTrigger(id) && m_idHelperSvc->measuresPhi(id)) ||
524  (m_idHelperSvc->isCsc(id) && m_idHelperSvc->measuresPhi(id)))
525  continue;
526  if (m_addAll) {
527  // skip RPC and TGC eta (to avoid code crashes)
528  if (m_idHelperSvc->isTrigger(id)) continue;
529  if (indexFirst == -1) indexFirst = index;
530  indicesOfAffectedTSOS.push_back(tsit);
531  indicesOfAffectedIds.push_back(id);
532  } else {
533  // skip trigger hits and CSC phi measurements and select precision hits
534  if (m_idHelperSvc->isTrigger(id)) continue;
535  if (stIndex == StIndex::BM || stIndex == StIndex::EM) {
536  if (indexFirst == -1) indexFirst = index;
537  indicesOfAffectedTSOS.push_back(tsit);
538  indicesOfAffectedIds.push_back(id);
539  // two alignment discontinuities
540  if (m_addTwo) {
541  if (indexFirstInner == -1) indexFirstInner = index;
542  indicesOfAffectedTSOSInner.push_back(tsit);
543  indicesOfAffectedIdsInner.push_back(id);
544  }
545  }else if (stIndex == StIndex::BI || stIndex == StIndex::EI) {
546  if (indexFirstInner == -1) indexFirstInner = index;
547  indicesOfAffectedTSOSInner.push_back(tsit);
548  indicesOfAffectedIdsInner.push_back(id);
549  }
550  }
551  }
552 
553  if (indicesOfAffectedTSOS.empty() && indicesOfAffectedTSOSInner.empty()) {
554  std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(track.info(), std::move(trackStateOnSurfaces),
555  track.fitQuality() ? track.fitQuality()->uniqueClone() : nullptr);
556  return newTrack;
557  }
558 
559  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern(0);
560  typePattern.set(Trk::TrackStateOnSurface::Alignment);
561 
562  std::unique_ptr<Trk::TrackStateOnSurface> tsosAEOT;
563  if (!indicesOfAffectedTSOS.empty() && (m_addMiddle || m_addAll)) {
564  int middle = indicesOfAffectedTSOS.size() / 2;
565  const Trk::TrackStateOnSurface* tsos = indicesOfAffectedTSOS[middle];
566  auto aEOT = std::make_unique<Trk::AlignmentEffectsOnTrack>(
571  indicesOfAffectedIds,
573  ATH_MSG_DEBUG(" AlignmentEffectsOnTrack on surface "
574  << aEOT->associatedSurface()
575  << " nr of tsos affected "
576  << indicesOfAffectedTSOS.size());
577  tsosAEOT = std::make_unique<Trk::TrackStateOnSurface>(
578  nullptr,
579  tsos->trackParameters()->uniqueClone(),
580  nullptr,
581  typePattern,
582  std::move(aEOT));
583  }
584 
585  std::unique_ptr<Trk::TrackStateOnSurface> tsosAEOTInner;
586  if (!indicesOfAffectedTSOSInner.empty() && (m_addInner || m_addTwo)) {
587  int middle = indicesOfAffectedTSOSInner.size() / 2;
588  const Trk::TrackStateOnSurface* tsosInner = indicesOfAffectedTSOSInner[middle];
589  auto aEOTInner = std::make_unique<Trk::AlignmentEffectsOnTrack>(
594  indicesOfAffectedIdsInner,
595  tsosInner->measurementOnTrack()->associatedSurface());
596  tsosAEOTInner = std::make_unique<Trk::TrackStateOnSurface>(
597  nullptr,
598  tsosInner->trackParameters()->uniqueClone(),
599  nullptr,
600  typePattern,
601  std::move(aEOTInner));
602  }
603 
604  auto trackStateOnSurfacesAEOT = std::make_unique<Trk::TrackStates>();
605  trackStateOnSurfacesAEOT->reserve(states->size() + 2);
606  index = -1;
607  for (const Trk::TrackStateOnSurface* tsit : *trackStateOnSurfaces) {
608  index++;
609  if (index == indexFirst && tsosAEOT) {
610  trackStateOnSurfacesAEOT->push_back(std::move(tsosAEOT));
611  if (!m_addAll) ATH_MSG_DEBUG(" AlignmentEffectsOnTrack for Middle added to trackStateOnSurfacesAEOT ");
612  if (m_addAll) ATH_MSG_DEBUG(" AlignmentEffectsOnTrack for All stations added to trackStateOnSurfacesAEOT ");
613  }
614  if (index == indexFirstInner && tsosAEOTInner) {
615  trackStateOnSurfacesAEOT->push_back(std::move(tsosAEOTInner));
616  ATH_MSG_DEBUG(" AlignmentEffectsOnTrack for Inner added to trackStateOnSurfacesAEOT ");
617  if (m_addTwo) ATH_MSG_DEBUG(" also AlignmentEffectsOnTrack for Middle added to trackStateOnSurfacesAEOT ");
618  }
619  trackStateOnSurfacesAEOT->push_back(tsit);
620  }
621  std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(track.info(), std::move(trackStateOnSurfacesAEOT),
622  track.fitQuality() ? track.fitQuality()->uniqueClone() : nullptr);
623  ATH_MSG_DEBUG(m_printer->print(*newTrack));
624  ATH_MSG_DEBUG(m_printer->printMeasurements(*newTrack));
625 
626  return newTrack;
627  }

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

◆ refit() [1/2]

std::vector< std::unique_ptr< Trk::Track > > Muon::MuonRefitTool::refit ( const std::vector< Trk::Track * > &  tracks,
const EventContext &  ctx,
const Settings settings 
) const
overridevirtual

refit and back extrapolate a vector of track pairs

Implements Muon::IMuonRefitTool.

Definition at line 212 of file MuonRefitTool.cxx.

213  {
214  std::vector<std::unique_ptr<Trk::Track>> refittedTracks;
215  refittedTracks.reserve(tracks.size());
216  for (const Trk::Track* it : tracks) { refittedTracks.emplace_back(refit(*it, ctx, set)); }
217 
218  return refittedTracks;
219  }

◆ refit() [2/2]

std::unique_ptr< Trk::Track > Muon::MuonRefitTool::refit ( const Trk::Track track,
const EventContext &  ctx,
const Settings settings 
) const
overridevirtual

refit a track

Implements Muon::IMuonRefitTool.

Definition at line 146 of file MuonRefitTool.cxx.

147  {
148  const IMuonRefitTool::Settings& settings = set ? *set : m_defaultSettings;
149 
150  // to keep track of the latest track
151  std::unique_ptr<Trk::Track> newTrack;
152  ++m_nrefits;
153  if (settings.removeOutliers) {
154  std::unique_ptr<Trk::Track> cleanedTrack = removeOutliers(track, settings);
155  if (!cleanedTrack) {
156  ATH_MSG_DEBUG("Track lost during outlier removal");
158  return std::make_unique<Trk::Track>(track);
159  }
160  if (cleanedTrack->perigeeParameters() != track.perigeeParameters()) {
161  ATH_MSG_DEBUG("Outlier removal removed hits from track");
162  }
163  newTrack.swap(cleanedTrack);
164  } else
165  newTrack = std::make_unique<Trk::Track>(track);
166 
167  if (settings.updateErrors) {
168  ATH_MSG_DEBUG("track hits before error updating: " << m_printer->printMeasurements(*newTrack));
169  std::unique_ptr<Trk::Track> updateErrorTrack =
170  m_alignmentErrors ? updateAlignmentErrors(*newTrack, ctx, settings) : updateErrors(*newTrack, ctx, settings);
171  if (!updateErrorTrack) {
172  ATH_MSG_WARNING("Failed to update errors");
174  return newTrack;
175  }
176  newTrack.swap(updateErrorTrack);
177  }
178 
179  if (settings.refit) {
180  ATH_MSG_DEBUG("Original track" << m_printer->print(track));
181 
182  // do not put AEOTs on extremely bad chi2 tracks and do not refit them
183 
184  std::unique_ptr<Trk::Track> refittedTrack;
185  if (track.fitQuality() && track.fitQuality()->chiSquared() < 10000 * track.fitQuality()->numberDoF())
186  refittedTrack = std::unique_ptr<Trk::Track>(m_trackFitter->fit(ctx, *newTrack, false, Trk::muon));
187  if (!refittedTrack) {
188  ATH_MSG_DEBUG("Failed to refit track");
189  ++m_failedRefit;
190  // BUG fix Peter
191  return std::make_unique<Trk::Track>(track);
192  }
193  ATH_MSG_DEBUG("Refitted track" << m_printer->print(*refittedTrack));
194  ATH_MSG_DEBUG("Refitted track" << m_printer->printMeasurements(*refittedTrack));
195  newTrack.swap(refittedTrack);
196  }
197 
198  if (settings.extrapolateToMuonEntry) {
199  std::unique_ptr<Trk::Track> extrapolatedTrack(m_muonEntryTrackExtrapolator->extrapolate(*newTrack, ctx));
200  if (!extrapolatedTrack) {
201  ATH_MSG_WARNING("Failed to back-extrapolate track");
203  return newTrack;
204  }
205  ATH_MSG_DEBUG("Entry track " << m_printer->print(*extrapolatedTrack));
206  newTrack.swap(extrapolatedTrack);
207  }
208  ++m_ngoodRefits;
209 
210  return newTrack;
211  }

◆ removeMdtOutliers()

bool Muon::MuonRefitTool::removeMdtOutliers ( const Trk::TrackParameters pars,
const std::vector< const MdtDriftCircleOnTrack * > &  hits,
std::set< Identifier > &  removedIdentifiers,
const Settings settings 
) const
protected

Definition at line 1305 of file MuonRefitTool.cxx.

1306  {
1307  if (hits.size() < 3) {
1308  ATH_MSG_VERBOSE("Too few hits, cannot perform cleaning");
1309  return false;
1310  }
1311  ATH_MSG_VERBOSE("Performing cleaning, nhits " << hits.size());
1312 
1315  /* ******** Mdt hits ******** */
1316 
1317  const MuonGM::MdtReadoutElement* detEl = nullptr;
1318 
1319  Amg::Transform3D gToStation;
1320 
1321  TrkDriftCircleMath::DCSLFitter dcslFitter;
1322  TrkDriftCircleMath::SegmentFinder segFinder(5., 3., false);
1323  if (!m_t0Fitter.empty()) {
1324  std::shared_ptr<const TrkDriftCircleMath::DCSLFitter> fitter(m_t0Fitter->getFitter(), Muon::IDCSLFitProvider::Unowned{});
1325  segFinder.setFitter(fitter);
1326  }
1327  segFinder.debugLevel(m_finderDebugLevel);
1328  segFinder.setRecoverMDT(false);
1329 
1330  for (const MdtDriftCircleOnTrack* mdt : hits) {
1331 
1332  Identifier id = mdt->identify();
1333 
1334  if (!detEl) {
1335  detEl = mdt->prepRawData()->detectorElement();
1336  if (!detEl) {
1337  ATH_MSG_WARNING(" error aborting not detEl found ");
1338  break;
1339  }
1340  gToStation = detEl->GlobalToAmdbLRSTransform();
1341  }
1342  // calculate local AMDB position
1343  Amg::Vector3D locPos = gToStation * mdt->prepRawData()->globalPosition();
1344  TrkDriftCircleMath::LocVec2D lpos(locPos.y(), locPos.z());
1345 
1346  double r = std::abs(mdt->localParameters()[Trk::locR]);
1347  double dr = Amg::error(mdt->localCovariance(), Trk::locR);
1348  ATH_MSG_VERBOSE("New MDT " << m_idHelperSvc->toString(id) << " r " << mdt->localParameters()[Trk::locR] << " dr " << dr
1349  << " (original) " << Amg::error(mdt->localCovariance(), Trk::locR));
1350 
1351  // create identifier
1352  TrkDriftCircleMath::MdtId mdtid(m_idHelperSvc->mdtIdHelper().isBarrel(id), m_idHelperSvc->mdtIdHelper().multilayer(id) - 1,
1353  m_idHelperSvc->mdtIdHelper().tubeLayer(id) - 1, m_idHelperSvc->mdtIdHelper().tube(id) - 1);
1354 
1355  // create new DriftCircle
1357  dcsOnTrack.emplace_back(dc, 1., 1.);
1358  dcs.emplace_back(std::move(dc));
1359  }
1360 
1361  if (!detEl) return false;
1362  // define axis of chamber in global coordinates
1363  Amg::Transform3D amdbToGlobal = detEl->AmdbLRSToGlobalTransform();
1364 
1365  // create new surface
1366  Amg::Transform3D surfaceTransform(amdbToGlobal.rotation());
1367  surfaceTransform.pretranslate(pars.position());
1368  double surfDim = 500.;
1369  const std::unique_ptr<Trk::PlaneSurface> surf = std::make_unique<Trk::PlaneSurface>(surfaceTransform, surfDim, surfDim);
1370 
1371  Amg::Vector3D dir = pars.momentum().unit();
1372  if (dir.y() * pars.position().y() < 0.) { dir *= -1.; }
1375 
1376  Amg::Vector3D locDirTrack(gToStation.linear() * dir);
1377  double track_angleYZ = std::atan2(locDirTrack.z(), locDirTrack.y());
1378 
1379  // transform nominal pointing chamber position into surface frame
1380  Amg::Vector3D dirCh(gToStation.linear() * detEl->center());
1381  double chamber_angleYZ = std::atan2(dirCh.z(), dirCh.y());
1382  double angleYZ = locDir.angleYZ();
1383 
1384  const Amg::Vector3D lpos = gToStation * pars.position();
1385 
1386  TrkDriftCircleMath::LocVec2D segPos(lpos.y(), lpos.z());
1387  TrkDriftCircleMath::Line segPars(segPos, angleYZ);
1388 
1389  ATH_MSG_DEBUG("Seeding angles " << track_angleYZ << " from surf " << angleYZ << " ch angle " << chamber_angleYZ << " pos "
1390  << segPos);
1391  segFinder.setPhiRoad(track_angleYZ, chamber_angleYZ, 0.14);
1392 
1393  if (msgLvl(MSG::VERBOSE)) {
1395  if (dcslFitter.fit(segment, segPars, dcsOnTrack)) {
1396  segment.hitsOnTrack(dcsOnTrack.size());
1397  ATH_MSG_DEBUG(" segment after fit " << segment.chi2() << " ndof " << segment.ndof() << " local parameters "
1398  << segment.line().x0() << " " << segment.line().y0() << " phi "
1399  << segment.line().phi());
1400  } else {
1401  ATH_MSG_DEBUG("Fit failed: hits" << dcsOnTrack.size());
1402  }
1403  }
1404 
1405  TrkDriftCircleMath::SegVec segments = segFinder.findSegments(dcs);
1406  if (!segments.empty()) { ATH_MSG_DEBUG("Found segments " << segments.size()); }
1407 
1408  if (segments.size() != 1) {
1409  if (hits.size() > 3)
1410  ATH_MSG_WARNING(" Found two solutions ");
1411  else
1412  ATH_MSG_DEBUG(" Found two solutions ");
1413  double dthetaBest = 10000.;
1414  int index = 0;
1415  int indexBest = -1;
1416  TrkDriftCircleMath::SegIt sit = segments.begin();
1417  TrkDriftCircleMath::SegIt sit_end = segments.end();
1418  for (; sit != sit_end; ++sit, ++index) {
1419  double dtheta = std::abs(sit->line().phi() - track_angleYZ);
1420  if (dtheta < dthetaBest) {
1421  dthetaBest = dtheta;
1422  indexBest = index;
1423  }
1424  if (sit->hitsOnTrack() > 4) { ATH_MSG_DEBUG("Recoverable segment " << *sit); }
1425  }
1426  if (indexBest != -1) {
1427  TrkDriftCircleMath::SegVec selectedSegments;
1428  selectedSegments.push_back(segments[indexBest]);
1429  segments = selectedSegments;
1430  ATH_MSG_DEBUG("Selected segment " << segments.front());
1431 
1432  } else {
1433  return false;
1434  }
1435  }
1436 
1437  TrkDriftCircleMath::Segment& segment = segments.front();
1438  if (settings.discardNotCleanedTracks && !segment.hasT0Shift()) return false;
1439 
1440  if (segment.hasT0Shift() || segment.hitsOnTrack() > 5) { ATH_MSG_DEBUG("Segment with t0 shift " << segment.t0Shift()); }
1441 
1442  if (dcs.size() == segment.hitsOnTrack()) {
1443  ATH_MSG_DEBUG(" No hits removed ");
1444  return true;
1445  } else if (dcs.size() > segment.hitsOnTrack() + 1) {
1446  ATH_MSG_DEBUG(" more than one hit removed ");
1447  if (segment.hitsOnTrack() < 4) return false;
1448  }
1449 
1450  ATH_MSG_DEBUG(" removed hits: " << dcs.size() - segment.hitsOnTrack());
1451 
1452  float tubeRadius = detEl->innerTubeRadius();
1453 
1455  const TrkDriftCircleMath::DCOnTrackVec& matchedDCs = matchDC.match(segment.dcs());
1456 
1457  for (TrkDriftCircleMath::DCOnTrackCit dcit = matchedDCs.begin(); dcit != matchedDCs.end(); ++dcit) {
1458  if (dcit->state() == TrkDriftCircleMath::DCOnTrack::OnTrack) {
1459  if (std::abs(dcit->r()) - std::abs(dcit->rot()->driftRadius()) > 0.1) {
1460  ATH_MSG_DEBUG("Large change in drift radius: r_old " << dcit->rot()->driftRadius() << " r_new " << dcit->r());
1461  }
1462  continue;
1463  }
1464  removedIdentifiers.insert(dcit->rot()->identify());
1465  ATH_MSG_VERBOSE(" removing hit " << m_idHelperSvc->toString(dcit->rot()->identify()));
1466  }
1467  return true;
1468  }

◆ removeOutliers()

std::unique_ptr< Trk::Track > Muon::MuonRefitTool::removeOutliers ( const Trk::Track track,
const Settings settings 
) const
protected

Definition at line 1197 of file MuonRefitTool.cxx.

1197  {
1198  // loop over track and calculate residuals
1199  const Trk::TrackStates* states = track.trackStateOnSurfaces();
1200  if (!states) {
1201  ATH_MSG_WARNING(" track without states, discarding track ");
1202  return nullptr;
1203  }
1204 
1205  Identifier currentMdtChId;
1206  std::set<Identifier> removedIdentifiers;
1207  std::vector<const MdtDriftCircleOnTrack*> mdts;
1208  const Trk::TrackParameters* chamberPars = nullptr;
1209 
1210  // loop over TSOSs and find start parameters
1211  Trk::TrackStates::const_iterator tsit = states->begin();
1212  Trk::TrackStates::const_iterator tsit_end = states->end();
1213  for (; tsit != tsit_end; ++tsit) {
1214  if (!*tsit) continue; // sanity check
1215 
1216  // check whether state is a measurement
1217  const Trk::TrackParameters* pars = (*tsit)->trackParameters();
1218  if (!pars) { continue; }
1219 
1220  if (!(*tsit)->type(Trk::TrackStateOnSurface::Measurement)) { continue; }
1221 
1222  // check whether state is a measurement
1223  const Trk::MeasurementBase* meas = (*tsit)->measurementOnTrack();
1224  if (!meas) { continue; }
1225 
1226  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
1227 
1228  // Not a ROT, else it would have had an identifier. Keep the TSOS.
1229  if (!id.is_valid()) { continue; }
1230 
1231  if (m_idHelperSvc->isMdt(id)) {
1232  const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(meas);
1233  if (!mdt) {
1234  ATH_MSG_WARNING(" Measurement with MDT identifier that is not a MdtDriftCircleOnTrack ");
1235  continue;
1236  }
1237  // get ch ID
1238  Identifier chId = m_idHelperSvc->chamberId(id);
1239 
1240  // if we have a new chambers
1241  if (chId != currentMdtChId) {
1242  // check that there are pars (not the case for the first mdt), if so we collected all hits for this chamber so call
1243  // cleaning
1244  if (chamberPars) {
1245  if (!removeMdtOutliers(*chamberPars, mdts, removedIdentifiers, settings)) {
1246  if (mdts.size() > 4)
1247  ATH_MSG_WARNING("Problem removing outliers in chamber " << m_idHelperSvc->toStringChamber(currentMdtChId)
1248  << " hits " << mdts.size());
1249  if (settings.discardNotCleanedTracks) return nullptr;
1250  }
1251  }
1252  // update to new chamber
1253  chamberPars = pars;
1254  mdts.clear();
1255  currentMdtChId = chId;
1256  }
1257 
1258  mdts.push_back(mdt);
1259  }
1260  }
1261 
1262  // clean the last chamber on the track
1263  if (chamberPars) {
1264  if (!removeMdtOutliers(*chamberPars, mdts, removedIdentifiers, settings)) {
1265  if (mdts.size() > 4)
1266  ATH_MSG_WARNING("Problem removing outliers in chamber " << m_idHelperSvc->toStringChamber(currentMdtChId) << " hits "
1267  << mdts.size());
1268  if (settings.discardNotCleanedTracks) return nullptr;
1269  }
1270  }
1271 
1272  if (removedIdentifiers.empty()) {
1273  ATH_MSG_DEBUG("No hits remove, returning original track");
1274  return std::make_unique<Trk::Track>(track);
1275  }
1276 
1277  // states were added, create a new track
1278  auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
1279  trackStateOnSurfaces->reserve(states->size());
1280 
1281  ATH_MSG_DEBUG("Removing nhits: " << removedIdentifiers.size());
1282 
1283  for (const Trk::TrackStateOnSurface* tsos : *states) {
1284  if (!*tsit) continue; // sanity check
1285 
1286  // check whether state is a measurement
1287  const Trk::MeasurementBase* meas = tsos->measurementOnTrack();
1288  if (meas) {
1289  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
1290 
1291  if (removedIdentifiers.count(id)) {
1292  std::unique_ptr<Trk::TrackStateOnSurface> new_tsos = MuonTSOSHelper::cloneTSOS(*tsos, Trk::TrackStateOnSurface::Outlier);
1293  trackStateOnSurfaces->push_back(std::move(new_tsos));
1294  continue;
1295  }
1296  }
1297  trackStateOnSurfaces->push_back(tsos->clone());
1298  }
1299 
1300  std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(track.info(), std::move(trackStateOnSurfaces),
1301  track.fitQuality() ? track.fitQuality()->uniqueClone() : nullptr);
1302  return newTrack;
1303  }

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

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

◆ updateAlignmentErrors()

std::unique_ptr< Trk::Track > Muon::MuonRefitTool::updateAlignmentErrors ( const Trk::Track track,
const EventContext &  ctx,
const Settings settings 
) const
protected

Definition at line 221 of file MuonRefitTool.cxx.

222  {
223  // first scale the Mdt errors
224 
225  std::unique_ptr<Trk::Track> updatedTrack = updateMdtErrors(track, ctx, settings);
226 
227  std::unique_ptr<Trk::Track> updatedAEOTsTrack = m_simpleAEOTs ? makeSimpleAEOTs(*updatedTrack) : makeAEOTs(*updatedTrack);
228 
229  return updatedAEOTsTrack;
230  }

◆ updateErrors()

std::unique_ptr< Trk::Track > Muon::MuonRefitTool::updateErrors ( const Trk::Track track,
const EventContext &  ctx,
const Settings settings 
) const
protected

update errors on a muon track

default strategy

Definition at line 629 of file MuonRefitTool.cxx.

630  {
631  // loop over track and calculate residuals
632  const Trk::TrackStates* states = track.trackStateOnSurfaces();
633  if (!states) {
634  ATH_MSG_WARNING(" track without states, discarding track ");
635  return nullptr;
636  }
637 
638  // vector to store states, the boolean indicated whether the state was create in this routine (true) or belongs to the track (false)
639  // If any new state is created, all states will be cloned and a new track will beformed from them.
640  std::vector<std::unique_ptr<Trk::TrackStateOnSurface>> newStates;
641  newStates.reserve(states->size() + 5);
642 
643  const Trk::TrackParameters* startPars = nullptr;
644  std::map<int, std::set<StIndex>> stationsPerSector;
645 
646  // loop over TSOSs and find start parameters
647  for (const Trk::TrackStateOnSurface* tsit : *states) {
648 
649  if (!tsit) continue; // sanity check
650 
651  const Trk::TrackParameters* pars = tsit->trackParameters();
652  if (!pars) continue;
653 
654  if (tsit->type(Trk::TrackStateOnSurface::Perigee)) {
655  if (!dynamic_cast<const Trk::Perigee*>(pars)) {
656  if (!startPars) {
657  startPars = pars;
658  } else {
659  ATH_MSG_WARNING("Track with two fit starting parameters!!!");
660  }
661  }
662  }
663 
664  // check whether state is a measurement
665  const Trk::MeasurementBase* meas = tsit->measurementOnTrack();
666  if (!meas) { continue; }
667 
668  // skip outliers
669  if (tsit->type(Trk::TrackStateOnSurface::Outlier)) continue;
670 
671  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
672  // Not a ROT, else it would have had an identifier. Keep the TSOS.
673  if (!id.is_valid() || !m_idHelperSvc->isMuon(id)) continue;
674  if (m_idHelperSvc->isTrigger(id) || (m_idHelperSvc->isCsc(id) && m_idHelperSvc->measuresPhi(id))) continue;
675  StIndex stIndex = m_idHelperSvc->stationIndex(id);
676  int sector = m_idHelperSvc->sector(id);
677  stationsPerSector[sector].insert(stIndex);
678  }
679 
680  if (!startPars) {
681  if (!track.trackParameters() || track.trackParameters()->empty()) {
682  ATH_MSG_WARNING("Track without parameters, cannot update errors");
683  return nullptr;
684  }
685  startPars = track.trackParameters()->front();
686  ATH_MSG_VERBOSE("Did not find fit starting parameters, using first parameters " << m_printer->print(*startPars));
687  }
688 
689  // loop over sectors and select the one with most layers
690  std::vector<int> sectorsWithMostStations;
691  unsigned int nmaxStations = 0;
692  std::map<int, std::set<StIndex>>::iterator stit = stationsPerSector.begin();
693  std::map<int, std::set<StIndex>>::iterator stit_end = stationsPerSector.end();
694  for (; stit != stit_end; ++stit) {
695  if (msgLvl(MSG::VERBOSE)) {
696  ATH_MSG_VERBOSE(" sector " << stit->first);
697  for (std::set<StIndex>::iterator ssit = stit->second.begin(); ssit != stit->second.end(); ++ssit) {
698  ATH_MSG_VERBOSE(" " << stName(*ssit));
699  }
700  }
701  if (stit->second.size() > nmaxStations) {
702  nmaxStations = stit->second.size();
703  sectorsWithMostStations.clear();
704  sectorsWithMostStations.push_back(stit->first);
705  } else if (stit->second.size() == nmaxStations) {
706  sectorsWithMostStations.push_back(stit->first);
707  }
708  }
709  int selectedSector = -1;
710  if (sectorsWithMostStations.empty()) {
711  ATH_MSG_WARNING("No sector selected");
712  } else if (sectorsWithMostStations.size() == 1) {
713  selectedSector = sectorsWithMostStations.front();
714  } else {
715  ATH_MSG_DEBUG("Found track with special sector configuration " << sectorsWithMostStations.size() << " ch per sector "
716  << nmaxStations << " using first sector");
717  selectedSector = sectorsWithMostStations.front();
718  if (selectedSector % 2 == 1 && sectorsWithMostStations.back() % 2 != 1) {
719  ATH_MSG_DEBUG("Revising sector choice, picking small sector ");
720  selectedSector = sectorsWithMostStations.back();
721  }
722  }
723 
724  // no check whether we have a barrel/endcap overlap
725 
726  static constexpr std::array<StIndex, 3> barel_stations{StIndex::BI, StIndex::BM, StIndex::BO};
727  static constexpr std::array<StIndex, 5> endcap_stations{StIndex::EI,StIndex::EM, StIndex::EO, StIndex::EE, StIndex::BE};
728  const std::set<StIndex>& selected_set = stationsPerSector[selectedSector];
729  const int nbarrel = std::accumulate(barel_stations.begin(),barel_stations.end(),0, [&selected_set](int n, const StIndex& idx){
730  return (selected_set.count(idx) > 0) + n;
731  });
732  const int nendcap = std::accumulate(endcap_stations.begin(),endcap_stations.end(),0, [&selected_set](int n, const StIndex& idx){
733  return (selected_set.count(idx) > 0) + n;
734  });
735  bool barrelEndcap {false}, deweightBarrel{false}, deweightEndcap{false};
736  if (nbarrel > 0 && nendcap > 0) {
737  if (nbarrel < nendcap)
738  deweightBarrel = true;
739  else
740  deweightEndcap = true;
741  barrelEndcap = true;
742  }
743  if (msgLvl(MSG::DEBUG)) {
744  ATH_MSG_DEBUG(" Selected sector " << selectedSector << " nstations " << nmaxStations << " barrel " << nbarrel << " endcap "
745  << nendcap);
746  if (barrelEndcap) {
747  ATH_MSG_DEBUG(" barrel/endcap overlap ");
748  if (deweightEndcap) ATH_MSG_DEBUG(" deweight endcap ");
749  if (deweightBarrel) ATH_MSG_DEBUG(" deweight barrel ");
750  }
751  }
752 
753  unsigned int deweightHits = 0;
754  unsigned int removedSectorHits = 0;
755  bool addedPerigee = false;
756  // loop over TSOSs
757  for (const Trk::TrackStateOnSurface* tsos : * states) {
758  if (!tsos) continue; // sanity check
759 
760  // check whether state is a measurement, if not add it, except if we haven't added the perigee surface yet
761  const Trk::TrackParameters* pars = tsos->trackParameters();
762  if (settings.prepareForFit && !pars) {
763  if (addedPerigee) {
764  newStates.emplace_back(tsos->clone());
765  } else {
766  ATH_MSG_DEBUG("Dropping TSOS before perigee surface");
767  }
768  continue;
769  }
770 
771  // if preparing for fit and not recreating the starting parameters, add the original perigee before back extrapolation to MS
772  // entry
773  if (settings.prepareForFit && !settings.recreateStartingParameters && tsos->type(Trk::TrackStateOnSurface::Perigee)) {
774  if (pars == startPars) {
775  ATH_MSG_DEBUG("Found fit starting parameters " << m_printer->print(*pars));
776  std::unique_ptr<Trk::Perigee> perigee = createPerigee(*pars, ctx);
777  newStates.emplace_back(MuonTSOSHelper::createPerigeeTSOS(std::move(perigee)));
778  addedPerigee = true;
779  continue;
780  } else {
781  ATH_MSG_DEBUG("Removing perigee");
782  }
783  }
784 
785  // check whether state is a measurement
786  const Trk::MeasurementBase* meas = tsos->measurementOnTrack();
787  if (!meas) {
788  newStates.emplace_back(tsos->clone());
789  continue;
790  }
791 
792  if (settings.prepareForFit && settings.recreateStartingParameters && !addedPerigee) {
793  // small shift towards the ip
794  double sign = pars->position().dot(pars->momentum()) > 0 ? 1. : -1.;
795  Amg::Vector3D perpos = pars->position() - 100. * sign * pars->momentum().unit();
796 
797  // create perigee
798  double phi = pars->momentum().phi();
799  double theta = pars->momentum().theta();
800  double qoverp = pars->charge() / pars->momentum().mag();
801  Trk::PerigeeSurface persurf(perpos);
802  std::unique_ptr<Trk::Perigee> perigee = std::make_unique<Trk::Perigee>(0, 0, phi, theta, qoverp, persurf);
803  newStates.emplace_back(MuonTSOSHelper::createPerigeeTSOS(std::move(perigee)));
804  addedPerigee = true;
805  ATH_MSG_DEBUG("Adding perigee in front of first measurement");
806  }
807 
808  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
809 
810  // Not a ROT, else it would have had an identifier. Keep the TSOS.
811  if (!id.is_valid() || !m_idHelperSvc->isMuon(id)) {
812  newStates.emplace_back(tsos->clone());
813  continue;
814  }
815 
816  if (!settings.updateErrors) {
817  newStates.emplace_back(tsos->clone());
818  } else {
819  Identifier chId = m_idHelperSvc->chamberId(id);
820  StIndex stIndex = m_idHelperSvc->stationIndex(id);
821  if (m_idHelperSvc->isMdt(id)) {
822  const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(meas);
823  if (!mdt) {
824  ATH_MSG_WARNING(" Measurement with MDT identifier that is not a MdtDriftCircleOnTrack ");
825  continue;
826  }
827 
828  bool hasT0Fit = false;
829  if (mdt->errorStrategy().creationParameter(Muon::MuonDriftCircleErrorStrategy::T0Refit)) hasT0Fit = true;
830 
831  std::unique_ptr<MdtDriftCircleOnTrack> rot{};
832  int sector = m_idHelperSvc->sector(id);
836 
837  stIndex = m_idHelperSvc->stationIndex(id);
838 
839  // error update for three stations with barrel-endcap and shared sectors
840  if (!m_deweightTwoStationTracks || nmaxStations > 2) {
841  if (m_deweightEEL1C05 && m_idHelperSvc->chamberIndex(id) == ChIndex::EEL && m_idHelperSvc->stationEta(id) < 0 &&
842  m_idHelperSvc->stationPhi(id) == 3) {
843  // for this chamber the errors are enormous (for a period of time)
844  rot.reset(m_mdtRotCreator->updateError(*mdt, pars, &m_errorStrategyEEL1C05));
845 
846  } else if (deweightBarrel &&
847  std::find(barel_stations.begin(),barel_stations.end(),stIndex) != barel_stations.end()) {
848  rot.reset(m_mdtRotCreator->updateError(*mdt, pars, &m_errorStrategyBarEnd));
849  if (settings.removeBarrelEndcapOverlap) type = Trk::TrackStateOnSurface::Outlier;
850 
851  } else if (deweightEndcap &&
852  std::find(endcap_stations.begin(), endcap_stations.end(), stIndex) != endcap_stations.end()) { // BEE chambers enter the endcap alignment system!
853  rot.reset(m_mdtRotCreator->updateError(*mdt, pars, &m_errorStrategyBarEnd));
854  if (settings.removeBarrelEndcapOverlap) type = Trk::TrackStateOnSurface::Outlier;
855 
856  } else if (settings.deweightOtherSectors && sector != selectedSector) {
857  ++deweightHits;
858  rot.reset(m_mdtRotCreator->updateError(*mdt, pars, &m_errorStrategySL));
859 
860  } else if (m_deweightBEE && stIndex == StIndex::BE) {
861  rot.reset(m_mdtRotCreator->updateError(*mdt, pars, &m_errorStrategyBEE));
862  if (settings.removeBEE) type = Trk::TrackStateOnSurface::Outlier;
863 
864  } else if (m_deweightEE && stIndex == StIndex::EE) {
865  rot.reset(m_mdtRotCreator->updateError(*mdt, pars, &m_errorStrategyEE));
866 
867  } else if (m_deweightBIS78 && m_idHelperSvc->chamberIndex(id) == ChIndex::BIS &&
868  std::abs(m_idHelperSvc->stationEta(id)) > 6) {
869  rot.reset(m_mdtRotCreator->updateError(*mdt, pars, &m_errorStrategyBIS78));
870 
871  } else if (m_deweightBME && stIndex == StIndex::BM && m_idHelperSvc->stationPhi(id) == 7 &&
872  (m_idHelperSvc->mdtIdHelper()).stationName(id) == m_BME_station) {
873  rot.reset(m_mdtRotCreator->updateError(*mdt, pars, &m_errorStrategyBXE));
874 
875  } else if (m_deweightBOE && m_idHelperSvc->chamberIndex(id) == ChIndex::BOL &&
876  std::abs(m_idHelperSvc->stationEta(id)) == 7 &&
877  m_idHelperSvc->stationPhi(id) == 7) {
878  rot.reset(m_mdtRotCreator->updateError(*mdt, pars, &m_errorStrategyBXE));
879 
880  } else {
882  MuonDriftCircleErrorStrategy strat(m_errorStrategy);
883  if (hasT0Fit) strat.setParameter(MuonDriftCircleErrorStrategy::T0Refit, true);
884  if (settings.broad) strat.setParameter(MuonDriftCircleErrorStrategy::BroadError, true);
885  rot.reset( m_mdtRotCreator->updateError(*mdt, pars, &strat));
886  }
887  } else {
888  rot.reset(m_mdtRotCreator->updateError(*mdt, pars, &m_errorStrategyTwoStations));
889  }
890 
891 
892 
893  if (!rot) {
894  rot.reset(mdt->clone());
896  }
897  if (settings.removeOtherSectors) {
898  if (sector != selectedSector) {
899  ++removedSectorHits;
901  }
902  }
903  if (settings.chambersToBeremoved.count(chId) || settings.precisionLayersToBeremoved.count(stIndex)) {
905  }
906 
907  if (msgLvl(MSG::DEBUG)) {
908  ATH_MSG_DEBUG(m_idHelperSvc->toString(rot->identify())
909  << " radius " << rot->driftRadius() << " new err "
910  << Amg::error(rot->localCovariance(), Trk::locR) << " old err "
911  << Amg::error(mdt->localCovariance(), Trk::locR));
912  if (hasT0Fit)
913  ATH_MSG_DEBUG(" HasT0");
914  else
915  ATH_MSG_DEBUG(" No T0");
917  if (std::abs(rot->driftRadius() - mdt->driftRadius()) > 0.1)
918  ATH_MSG_DEBUG(" Bad recalibration: old r " << mdt->driftRadius());
919  }
920  //the following is a cop-out until can sort out the unique_ptr magic for rot, mdt
921  std::unique_ptr<Trk::TrackStateOnSurface> new_tsos = MuonTSOSHelper::createMeasTSOSWithUpdate(*tsos, std::move(rot), pars->uniqueClone(), type);
922  newStates.emplace_back(std::move(new_tsos));
923  } else if (m_idHelperSvc->isCsc(id)) {
924  if (settings.chambersToBeremoved.count(chId) || settings.precisionLayersToBeremoved.count(stIndex)) {
925  std::unique_ptr<Trk::TrackStateOnSurface> new_tsos = MuonTSOSHelper::cloneTSOS(*tsos, Trk::TrackStateOnSurface::Outlier);
926  newStates.emplace_back(std::move(new_tsos));
927 
928  } else {
929  newStates.emplace_back(tsos->clone());
930  }
931  } else if (m_idHelperSvc->isTrigger(id)) {
932  if (m_idHelperSvc->measuresPhi(id)) {
933  if (settings.chambersToBeremoved.count(chId) || settings.phiLayersToBeremoved.count(m_idHelperSvc->phiIndex(id))) {
934  std::unique_ptr<Trk::TrackStateOnSurface> new_tsos = MuonTSOSHelper::cloneTSOS(*tsos, Trk::TrackStateOnSurface::Outlier);
935  newStates.emplace_back(std::move(new_tsos));
936 
937  } else {
938  newStates.emplace_back(tsos->clone());
939  }
940 
941  } else {
942  if (settings.updateTriggerErrors) {
943  newStates.emplace_back(tsos->clone());
944 
945  } else {
946  newStates.emplace_back(tsos->clone());
947  }
948  }
949  } else if (m_idHelperSvc->isMM(id) || m_idHelperSvc->issTgc(id)) {
950  newStates.emplace_back(tsos->clone());
951 
952  } else {
953  ATH_MSG_WARNING(" unknown Identifier " << m_idHelperSvc->mdtIdHelper().print_to_string(id));
954  }
955  }
956  }
957 
958  if (deweightHits > 0) ATH_MSG_DEBUG(" de-weighted " << deweightHits << " MDT hits from neighbouring sectors");
959  if (removedSectorHits > 0) ATH_MSG_DEBUG(" removed " << removedSectorHits << " MDT hits from neighbouring sectors");
960 
961  ATH_MSG_VERBOSE(" original track had " << states->size() << " TSOS, adding " << newStates.size() - states->size() << " new TSOS ");
962 
963  // states were added, create a new track
964  auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
965  trackStateOnSurfaces->reserve(newStates.size());
966  for (std::unique_ptr<Trk::TrackStateOnSurface>& new_state : newStates) {
967  trackStateOnSurfaces->push_back(std::move(new_state));
968  }
969  std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(track.info(), std::move(trackStateOnSurfaces),
970  track.fitQuality() ? track.fitQuality()->uniqueClone() : nullptr);
971  ATH_MSG_DEBUG("new track measurements: " << m_printer->printMeasurements(*newTrack));
972 
973  return newTrack;
974  }

◆ updateMdtErrors()

std::unique_ptr< Trk::Track > Muon::MuonRefitTool::updateMdtErrors ( const Trk::Track track,
const EventContext &  ctx,
const Settings settings 
) const
protected

Definition at line 976 of file MuonRefitTool.cxx.

977  {
978  // uses the muonErrorStrategy
979 
980  // loop over track and calculate residuals
981  const Trk::TrackStates* states = track.trackStateOnSurfaces();
982  if (!states) {
983  ATH_MSG_WARNING(" track without states, discarding track ");
984  return nullptr;
985  }
986 
987  // vector to store states, the boolean indicated whether the state was create in this routine (true) or belongs to the track (false)
988  // If any new state is created, all states will be cloned and a new track will beformed from them.
989  std::vector<std::unique_ptr<Trk::TrackStateOnSurface>> newStates;
990  newStates.reserve(states->size() + 5);
991 
992  const Trk::TrackParameters* startPars = nullptr;
993 
994  // loop over TSOSs and find start parameters
995  for (const Trk::TrackStateOnSurface* tsos : *states) {
996  if (!tsos) continue; // sanity check
997 
998  const Trk::TrackParameters* pars = tsos->trackParameters();
999  if (!pars) continue;
1000 
1001  if (tsos->type(Trk::TrackStateOnSurface::Perigee)) {
1002  if (!dynamic_cast<const Trk::Perigee*>(pars)) {
1003  if (!startPars) {
1004  startPars = pars;
1005  } else {
1006  ATH_MSG_WARNING("Track with two fit starting parameters!!!");
1007  }
1008  }
1009  }
1010 
1011  // check whether state is a measurement
1012  const Trk::MeasurementBase* meas = tsos->measurementOnTrack();
1013  if (!meas) { continue; }
1014 
1015  // skip outliers
1016  if (tsos->type(Trk::TrackStateOnSurface::Outlier)) continue;
1017 
1018  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
1019  // Not a ROT, else it would have had an identifier. Keep the TSOS.
1020  if (!id.is_valid() || !m_idHelperSvc->isMuon(id)) continue;
1021  if (m_idHelperSvc->isTrigger(id) || (m_idHelperSvc->isCsc(id) && m_idHelperSvc->measuresPhi(id))) continue;
1022  }
1023 
1024  if (!startPars) {
1025  if (!track.trackParameters() || track.trackParameters()->empty()) {
1026  ATH_MSG_WARNING("Track without parameters, cannot update errors");
1027  return nullptr;
1028  }
1029  startPars = track.trackParameters()->front();
1030  ATH_MSG_VERBOSE("Did not find fit starting parameters, using first parameters " << m_printer->print(*startPars));
1031  }
1032 
1033  bool addedPerigee = false;
1034  // loop over TSOSs
1035  for (const Trk::TrackStateOnSurface* tsos : *states) {
1036  if (!tsos) continue; // sanity check
1037 
1038  // check whether state is a measurement, if not add it, except if we haven't added the perigee surface yet
1039  const Trk::TrackParameters* pars = tsos->trackParameters();
1040  if (settings.prepareForFit && !pars) {
1041  if (addedPerigee) {
1042  newStates.emplace_back(tsos->clone());
1043  continue;
1044  } else {
1045  ATH_MSG_DEBUG("Dropping TSOS before perigee surface");
1046  continue;
1047  }
1048  }
1049 
1050  // if preparing for fit and not recreating the starting parameters, add the original perigee before back extrapolation to MS
1051  // entry
1052  if (settings.prepareForFit && !settings.recreateStartingParameters && tsos->type(Trk::TrackStateOnSurface::Perigee)) {
1053  if (pars == startPars) {
1054  ATH_MSG_DEBUG("Found fit starting parameters " << m_printer->print(*pars));
1055  std::unique_ptr<Trk::Perigee> perigee = createPerigee(*pars, ctx);
1056  newStates.emplace_back(MuonTSOSHelper::createPerigeeTSOS(std::move(perigee)));
1057  addedPerigee = true;
1058  continue;
1059  } else {
1060  ATH_MSG_DEBUG("Removing perigee");
1061  }
1062  }
1063 
1064  // check whether state is a measurement
1065  const Trk::MeasurementBase* meas = tsos->measurementOnTrack();
1066  if (!meas) {
1067  newStates.emplace_back(tsos->clone());
1068  continue;
1069  }
1070 
1071  if (settings.prepareForFit && settings.recreateStartingParameters && !addedPerigee) {
1072  // small shift towards the ip
1073  double sign = pars->position().dot(pars->momentum()) > 0 ? 1. : -1.;
1074  Amg::Vector3D perpos = pars->position() - 100. * sign * pars->momentum().unit();
1075 
1076  // create perigee
1077  double phi = pars->momentum().phi();
1078  double theta = pars->momentum().theta();
1079  double qoverp = pars->charge() / pars->momentum().mag();
1080  Trk::PerigeeSurface persurf(perpos);
1081  std::unique_ptr<Trk::Perigee> perigee = std::make_unique<Trk::Perigee>(0, 0, phi, theta, qoverp, persurf);
1082  newStates.emplace_back(MuonTSOSHelper::createPerigeeTSOS(std::move(perigee)));
1083  addedPerigee = true;
1084  ATH_MSG_DEBUG("Adding perigee in front of first measurement");
1085  }
1086 
1087  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
1088 
1089  // Not a ROT, else it would have had an identifier. Keep the TSOS.
1090  if (!id.is_valid() || !m_idHelperSvc->isMuon(id)) {
1091  newStates.emplace_back(tsos->clone());
1092  continue;
1093  }
1094 
1095  if (!settings.updateErrors) {
1096  newStates.emplace_back(tsos->clone());
1097  } else {
1098  Identifier chId = m_idHelperSvc->chamberId(id);
1099  StIndex stIndex = m_idHelperSvc->stationIndex(id);
1100  if (m_idHelperSvc->isMdt(id)) {
1101  const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(meas);
1102  if (!mdt) {
1103  ATH_MSG_WARNING(" Measurement with MDT identifier that is not a MdtDriftCircleOnTrack ");
1104  continue;
1105  }
1106 
1107  bool hasT0Fit = false;
1108  if (mdt->errorStrategy().creationParameter(Muon::MuonDriftCircleErrorStrategy::T0Refit)) hasT0Fit = true;
1109 
1110  Trk::RIO_OnTrack* rot = nullptr;
1114 
1115  stIndex = m_idHelperSvc->stationIndex(id);
1116 
1117  // use the muonErrorStrategy
1118  MuonDriftCircleErrorStrategy strat(m_muonErrorStrategy);
1119  if (hasT0Fit) strat.setParameter(MuonDriftCircleErrorStrategy::T0Refit, true);
1120  if (settings.broad) strat.setParameter(MuonDriftCircleErrorStrategy::BroadError, true);
1121  rot = m_mdtRotCreator->updateError(*mdt, pars, &strat);
1122 
1123  MdtDriftCircleOnTrack* newMdt = rot ? dynamic_cast<MdtDriftCircleOnTrack*>(rot) : nullptr;
1124  if (!newMdt) {
1125  newMdt = mdt->clone();
1127  }
1128  if (settings.chambersToBeremoved.count(chId) || settings.precisionLayersToBeremoved.count(stIndex)) {
1130  }
1131 
1132  if (msgLvl(MSG::DEBUG)) {
1133  ATH_MSG_DEBUG(" updateMdtErrors " << m_idHelperSvc->toString(newMdt->identify()) << " radius "
1134  << newMdt->driftRadius() << " new err "
1135  << Amg::error(newMdt->localCovariance(), Trk::locR) << " old err "
1136  << Amg::error(mdt->localCovariance(), Trk::locR));
1137  if (hasT0Fit)
1138  ATH_MSG_DEBUG(" HasT0");
1139  else
1140  ATH_MSG_DEBUG(" No T0");
1142  if (std::abs(newMdt->driftRadius() - mdt->driftRadius()) > 0.1)
1143  ATH_MSG_DEBUG(" Bad recalibration: old r " << mdt->driftRadius());
1144  }
1145  std::unique_ptr<MdtDriftCircleOnTrack> newUniqueMdt {newMdt};
1146  std::unique_ptr<Trk::TrackStateOnSurface> new_tsos = MuonTSOSHelper::createMeasTSOSWithUpdate(*tsos, std::move(newUniqueMdt), pars->uniqueClone(), type);
1147  newStates.emplace_back(std::move(new_tsos));
1148  } else if (m_idHelperSvc->isCsc(id)) {
1149  if (settings.chambersToBeremoved.count(chId) || settings.precisionLayersToBeremoved.count(stIndex)) {
1150  std::unique_ptr<Trk::TrackStateOnSurface> new_tsos = MuonTSOSHelper::cloneTSOS(*tsos, Trk::TrackStateOnSurface::Outlier);
1151  newStates.emplace_back(std::move(new_tsos));
1152 
1153  } else {
1154  newStates.emplace_back(tsos->clone());
1155  }
1156  } else if (m_idHelperSvc->isTrigger(id)) {
1157  if (m_idHelperSvc->measuresPhi(id)) {
1158  if (settings.chambersToBeremoved.count(chId) || settings.phiLayersToBeremoved.count(m_idHelperSvc->phiIndex(id))) {
1159  std::unique_ptr<Trk::TrackStateOnSurface> new_tsos = MuonTSOSHelper::cloneTSOS(*tsos, Trk::TrackStateOnSurface::Outlier);
1160  newStates.emplace_back(std::move(new_tsos));
1161 
1162  } else {
1163  newStates.emplace_back(tsos->clone());
1164  }
1165 
1166  } else {
1167  if (settings.updateTriggerErrors) {
1168  newStates.emplace_back(tsos->clone());
1169 
1170  } else {
1171  newStates.emplace_back(tsos->clone());
1172  }
1173  }
1174  } else if (m_idHelperSvc->isMM(id) || m_idHelperSvc->issTgc(id)) {
1175  newStates.emplace_back(tsos->clone());
1176 
1177  } else {
1178  ATH_MSG_WARNING(" unknown Identifier " << m_idHelperSvc->mdtIdHelper().print_to_string(id));
1179  }
1180  }
1181  }
1182 
1183  ATH_MSG_VERBOSE(" original track had " << states->size() << " TSOS, adding " << newStates.size() - states->size() << " new TSOS ");
1184 
1185  // states were added, create a new track
1186  auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
1187  trackStateOnSurfaces->reserve(newStates.size());
1188  for ( std::unique_ptr<Trk::TrackStateOnSurface>& state : newStates) {
1189  // add states. If nit->first is true we have a new state. If it is false the state is from the old track and has to be cloned
1190  trackStateOnSurfaces->push_back(std::move(state));
1191  }
1192  std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(track.info(), std::move(trackStateOnSurfaces),
1193  track.fitQuality() ? track.fitQuality()->uniqueClone() : nullptr);
1194  return newTrack;
1195  }

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

Gaudi::Property<bool> Muon::MuonRefitTool::m_addAll {this, "AddAll", false}
private

Definition at line 103 of file MuonRefitTool.h.

◆ m_addInner

Gaudi::Property<bool> Muon::MuonRefitTool::m_addInner {this, "AddInner", false}
private

Definition at line 104 of file MuonRefitTool.h.

◆ m_addMiddle

Gaudi::Property<bool> Muon::MuonRefitTool::m_addMiddle {this, "AddMiddle", false}
private

Definition at line 105 of file MuonRefitTool.h.

◆ m_addTwo

Gaudi::Property<bool> Muon::MuonRefitTool::m_addTwo {this, "AddTwo", false}
private

Definition at line 106 of file MuonRefitTool.h.

◆ m_alignErrorTool

ToolHandle<Trk::ITrkAlignmentDeviationTool> Muon::MuonRefitTool::m_alignErrorTool {this, "AlignmentErrorTool", "MuonAlign::AlignmentErrorTool"}
private

Does not provide any method with EventContext yet.

Definition at line 78 of file MuonRefitTool.h.

◆ m_alignmentAngle

Gaudi::Property<float> Muon::MuonRefitTool::m_alignmentAngle {this, "AlignmentAngle", 0}
private

Definition at line 97 of file MuonRefitTool.h.

◆ m_alignmentAngleError

Gaudi::Property<float> Muon::MuonRefitTool::m_alignmentAngleError {this, "AlignmentAngleError", 0.001}
private

Definition at line 99 of file MuonRefitTool.h.

◆ m_alignmentDelta

Gaudi::Property<float> Muon::MuonRefitTool::m_alignmentDelta {this, "AlignmentDelta", 0}
private

Definition at line 96 of file MuonRefitTool.h.

◆ m_alignmentDeltaError

Gaudi::Property<float> Muon::MuonRefitTool::m_alignmentDeltaError {this, "AlignmentDeltaError", 0.1}
private

Definition at line 98 of file MuonRefitTool.h.

◆ m_alignmentErrors

Gaudi::Property<bool> Muon::MuonRefitTool::m_alignmentErrors {this, "AlignmentErrors", false}
private

Definition at line 101 of file MuonRefitTool.h.

◆ m_BME_station

int Muon::MuonRefitTool::m_BME_station {0}
private

Definition at line 137 of file MuonRefitTool.h.

◆ m_compClusterCreator

ToolHandle<IMuonCompetingClustersOnTrackCreator> Muon::MuonRefitTool::m_compClusterCreator
private
Initial value:
{
this, "CompClusterCreator", "Muon::TriggerChamberClusterOnTrackCreator/TriggerChamberClusterOnTrackCreator"}

Definition at line 85 of file MuonRefitTool.h.

◆ m_defaultSettings

Settings Muon::MuonRefitTool::m_defaultSettings
private

Definition at line 126 of file MuonRefitTool.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_deweightBEE

Gaudi::Property<bool> Muon::MuonRefitTool::m_deweightBEE {this, "DeweightBEE", false}
private

Definition at line 107 of file MuonRefitTool.h.

◆ m_deweightBIS78

Gaudi::Property<bool> Muon::MuonRefitTool::m_deweightBIS78 {this, "DeweightBIS78", true}
private

Definition at line 109 of file MuonRefitTool.h.

◆ m_deweightBME

Gaudi::Property<bool> Muon::MuonRefitTool::m_deweightBME {this, "DeweightBME", true}
private

Definition at line 110 of file MuonRefitTool.h.

◆ m_deweightBOE

Gaudi::Property<bool> Muon::MuonRefitTool::m_deweightBOE {this, "DeweightBOE", true}
private

Definition at line 111 of file MuonRefitTool.h.

◆ m_deweightEE

Gaudi::Property<bool> Muon::MuonRefitTool::m_deweightEE {this, "DeweightEE", false}
private

Definition at line 108 of file MuonRefitTool.h.

◆ m_deweightEEL1C05

Gaudi::Property<bool> Muon::MuonRefitTool::m_deweightEEL1C05 {this, "DeweightEEL1C05", false}
private

Definition at line 112 of file MuonRefitTool.h.

◆ m_deweightTwoStationTracks

Gaudi::Property<bool> Muon::MuonRefitTool::m_deweightTwoStationTracks {this, "DeweightTwoStationTracks", false}
private

Definition at line 113 of file MuonRefitTool.h.

◆ m_edmHelperSvc

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

Definition at line 73 of file MuonRefitTool.h.

◆ m_errorStrategy

MuonDriftCircleErrorStrategy Muon::MuonRefitTool::m_errorStrategy
private

Definition at line 123 of file MuonRefitTool.h.

◆ m_errorStrategyBarEnd

MuonDriftCircleErrorStrategy Muon::MuonRefitTool::m_errorStrategyBarEnd
private

Definition at line 120 of file MuonRefitTool.h.

◆ m_errorStrategyBEE

MuonDriftCircleErrorStrategy Muon::MuonRefitTool::m_errorStrategyBEE
private

Definition at line 115 of file MuonRefitTool.h.

◆ m_errorStrategyBIS78

MuonDriftCircleErrorStrategy Muon::MuonRefitTool::m_errorStrategyBIS78
private

Definition at line 117 of file MuonRefitTool.h.

◆ m_errorStrategyBXE

MuonDriftCircleErrorStrategy Muon::MuonRefitTool::m_errorStrategyBXE
private

Definition at line 118 of file MuonRefitTool.h.

◆ m_errorStrategyEE

MuonDriftCircleErrorStrategy Muon::MuonRefitTool::m_errorStrategyEE
private

Definition at line 116 of file MuonRefitTool.h.

◆ m_errorStrategyEEL1C05

MuonDriftCircleErrorStrategy Muon::MuonRefitTool::m_errorStrategyEEL1C05
private

Definition at line 119 of file MuonRefitTool.h.

◆ m_errorStrategySL

MuonDriftCircleErrorStrategy Muon::MuonRefitTool::m_errorStrategySL
private

Definition at line 121 of file MuonRefitTool.h.

◆ m_errorStrategyTwoStations

MuonDriftCircleErrorStrategy Muon::MuonRefitTool::m_errorStrategyTwoStations
private

Definition at line 122 of file MuonRefitTool.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_failedErrorUpdate

std::atomic<unsigned int> Muon::MuonRefitTool::m_failedErrorUpdate {0}
mutableprivate

Definition at line 131 of file MuonRefitTool.h.

◆ m_failedExtrapolationMuonEntry

std::atomic<unsigned int> Muon::MuonRefitTool::m_failedExtrapolationMuonEntry {0}
mutableprivate

Definition at line 133 of file MuonRefitTool.h.

◆ m_failedOutlierRemoval

std::atomic<unsigned int> Muon::MuonRefitTool::m_failedOutlierRemoval {0}
mutableprivate

Definition at line 130 of file MuonRefitTool.h.

◆ m_failedRefit

std::atomic<unsigned int> Muon::MuonRefitTool::m_failedRefit {0}
mutableprivate

Definition at line 132 of file MuonRefitTool.h.

◆ m_finderDebugLevel

Gaudi::Property<int> Muon::MuonRefitTool::m_finderDebugLevel {this, "FinderDebugLevel", -1}
private

Definition at line 90 of file MuonRefitTool.h.

◆ m_fixedError

Gaudi::Property<double> Muon::MuonRefitTool::m_fixedError {this, "UsedFixedError", 1}
private

Definition at line 93 of file MuonRefitTool.h.

◆ m_flagT0FitRange

Gaudi::Property<double> Muon::MuonRefitTool::m_flagT0FitRange {this, "FlagT0FitRange", 0.00005}
private

Definition at line 94 of file MuonRefitTool.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::MuonRefitTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 75 of file MuonRefitTool.h.

◆ m_mdtRotCreator

ToolHandle<IMdtDriftCircleOnTrackCreator> Muon::MuonRefitTool::m_mdtRotCreator
private
Initial value:
{this, "MdtRotCreator",
"Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"}

Definition at line 83 of file MuonRefitTool.h.

◆ m_minMuonMomentum

Gaudi::Property<double> Muon::MuonRefitTool::m_minMuonMomentum {this, "MinMuonMom", 4000}
private

Definition at line 92 of file MuonRefitTool.h.

◆ m_muonEntryTrackExtrapolator

ToolHandle<Muon::IMuonTrackExtrapolationTool> Muon::MuonRefitTool::m_muonEntryTrackExtrapolator {this, "MuonEntryExtrapolationTool", ""}
private

Definition at line 88 of file MuonRefitTool.h.

◆ m_muonErrorStrategy

MuonDriftCircleErrorStrategy Muon::MuonRefitTool::m_muonErrorStrategy
private

Definition at line 124 of file MuonRefitTool.h.

◆ m_muonExtrapolator

ToolHandle<Trk::IExtrapolator> Muon::MuonRefitTool::m_muonExtrapolator {this, "MuonExtrapolator", "Trk::Extrapolator/MuonExtrapolator"}
private

Definition at line 82 of file MuonRefitTool.h.

◆ m_ngoodRefits

std::atomic<unsigned int> Muon::MuonRefitTool::m_ngoodRefits {0}
mutableprivate

Definition at line 129 of file MuonRefitTool.h.

◆ m_nrefits

std::atomic<unsigned int> Muon::MuonRefitTool::m_nrefits {0}
mutableprivate

Definition at line 128 of file MuonRefitTool.h.

◆ m_printer

PublicToolHandle<MuonEDMPrinterTool> Muon::MuonRefitTool::m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
private

Definition at line 79 of file MuonRefitTool.h.

◆ m_simpleAEOTs

Gaudi::Property<bool> Muon::MuonRefitTool::m_simpleAEOTs {this, "SimpleAEOTs", false}
private

Definition at line 102 of file MuonRefitTool.h.

◆ m_t0Fitter

ToolHandle<IDCSLFitProvider> Muon::MuonRefitTool::m_t0Fitter {this, "T0Fitter", ""}
private

Definition at line 87 of file MuonRefitTool.h.

◆ m_trackFitter

ToolHandle<Trk::ITrackFitter> Muon::MuonRefitTool::m_trackFitter {this, "Fitter", "Trk::GlobalChi2Fitter/MCTBFitterMaterialFromTrack"}
private

Definition at line 81 of file MuonRefitTool.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:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Muon::MuonRefitTool::m_defaultSettings
Settings m_defaultSettings
Definition: MuonRefitTool.h:126
Muon::MuonTSOSHelper::cloneTSOS
static std::unique_ptr< Trk::TrackStateOnSurface > cloneTSOS(const Trk::TrackStateOnSurface &tsos, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
clone input, update the type
Definition: MuonTSOSHelper.h:15
xAOD::strategy
strategy
Definition: L2CombinedMuon_v1.cxx:108
Muon::MuonTSOSHelper::createPerigeeTSOS
static std::unique_ptr< Trk::TrackStateOnSurface > createPerigeeTSOS(std::unique_ptr< Trk::TrackParameters > perigee)
create a perigee TSOS, takes ownership of the Perigee
Definition: MuonTSOSHelper.h:54
used
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Muon::MuonRefitTool::m_deweightBEE
Gaudi::Property< bool > m_deweightBEE
Definition: MuonRefitTool.h:107
beamspotman.r
def r
Definition: beamspotman.py:674
LArSamples::FitterData::fitter
const ShapeFitter * fitter
Definition: ShapeFitter.cxx:23
Trk::TrackStateOnSurface::trackParameters
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
Muon::MuonDriftCircleErrorStrategy::Muon
@ Muon
Definition: MuonDriftCircleErrorStrategy.h:17
Muon::MuonRefitTool::m_alignmentAngle
Gaudi::Property< float > m_alignmentAngle
Definition: MuonRefitTool.h:97
Trk::TrackStateOnSurface::Perigee
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
Definition: TrackStateOnSurface.h:117
Muon::MuonRefitTool::updateErrors
std::unique_ptr< Trk::Track > updateErrors(const Trk::Track &track, const EventContext &ctx, const Settings &settings) const
update errors on a muon track
Definition: MuonRefitTool.cxx:629
MuonGM::MuonReadoutElement::AmdbLRSToGlobalTransform
virtual Amg::Transform3D AmdbLRSToGlobalTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:146
Muon::MuonRefitTool::m_deweightBME
Gaudi::Property< bool > m_deweightBME
Definition: MuonRefitTool.h:110
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
MuonAlign::AlignmentRotationDeviation
Definition: AlignmentRotationDeviation.h:11
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
Trk::TrackStateOnSurface::TrackStateOnSurfaceType
TrackStateOnSurfaceType
Definition: TrackStateOnSurface.h:98
TrkDriftCircleMath::DCOnTrackVec
std::vector< DCOnTrack > DCOnTrackVec
Definition: DCOnTrack.h:59
Muon::MuonRefitTool::m_errorStrategySL
MuonDriftCircleErrorStrategy m_errorStrategySL
Definition: MuonRefitTool.h:121
Muon::MuonRefitTool::removeMdtOutliers
bool removeMdtOutliers(const Trk::TrackParameters &pars, const std::vector< const MdtDriftCircleOnTrack * > &hits, std::set< Identifier > &removedIdentifiers, const Settings &settings) const
Definition: MuonRefitTool.cxx:1305
Muon::MuonRefitTool::m_printer
PublicToolHandle< MuonEDMPrinterTool > m_printer
Definition: MuonRefitTool.h:79
Muon::MuonRefitTool::m_deweightBOE
Gaudi::Property< bool > m_deweightBOE
Definition: MuonRefitTool.h:111
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
TrkDriftCircleMath::MdtId
Definition: MdtId.h:14
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
MuonGM::MdtReadoutElement::center
virtual const Amg::Vector3D & center(const Identifier &) const override final
Return the center of the surface associated with this identifier In the case of silicon it returns th...
Muon::MuonRefitTool::m_addAll
Gaudi::Property< bool > m_addAll
Definition: MuonRefitTool.h:103
Muon::MuonStationIndex::ChIndex::EEL
@ EEL
MuonGM::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
Muon::MuonRefitTool::m_errorStrategyBIS78
MuonDriftCircleErrorStrategy m_errorStrategyBIS78
Definition: MuonRefitTool.h:117
Trk::RIO_OnTrack::clone
virtual RIO_OnTrack * clone() const override=0
Pseudo-constructor, needed to avoid excessive RTTI.
TrkDriftCircleMath::DCSLFitter::fit
virtual bool fit(Segment &result, const Line &line, const DCOnTrackVec &dcs, double t0Seed=-99999.) const
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/DCSLFitter.h:38
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
index
Definition: index.py:1
TRT_PAI_gasdata::EO
const float EO[NO]
Energy levels for Oxygen.
Definition: TRT_PAI_gasdata.h:301
Muon::MuonStationIndex::StIndex::EM
@ EM
Trk::ParametersBase::uniqueClone
std::unique_ptr< ParametersBase< DIM, T > > uniqueClone() const
clone method for polymorphic deep copy returning unique_ptr; it is not overriden, but uses the existi...
Definition: ParametersBase.h:97
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
Muon::MuonRefitTool::m_failedOutlierRemoval
std::atomic< unsigned int > m_failedOutlierRemoval
Definition: MuonRefitTool.h:130
Muon::IDCSLFitProvider::Unowned
Helper struct to overload the destructors of smart pointers.
Definition: IDCSLFitProvider.h:39
TrkDriftCircleMath::MatchDCWithLine::Pull
@ Pull
Definition: MatchDCWithLine.h:18
Muon::MuonStationIndex::stName
const std::string & stName(StIndex index)
convert StIndex into a string
Definition: MuonStationIndex.cxx:104
MuonGM::MuonReadoutElement::GlobalToAmdbLRSTransform
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:154
skel.it
it
Definition: skel.GENtoEVGEN.py:407
TrkDriftCircleMath::DCSLFitter
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/DCSLFitter.h:17
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::MuonRefitTool::m_addTwo
Gaudi::Property< bool > m_addTwo
Definition: MuonRefitTool.h:106
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Trk::TrackStateOnSurface::measurementOnTrack
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:111
Muon::MuonRefitTool::m_BME_station
int m_BME_station
Definition: MuonRefitTool.h:137
Trk::locR
@ locR
Definition: ParamDefs.h:44
TrkDriftCircleMath::DriftCircle
This class represents a drift time measurement.
Definition: DriftCircle.h:22
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::MuonRefitTool::m_deweightEE
Gaudi::Property< bool > m_deweightEE
Definition: MuonRefitTool.h:108
Muon::MuonRefitTool::m_failedErrorUpdate
std::atomic< unsigned int > m_failedErrorUpdate
Definition: MuonRefitTool.h:131
Trk::TrackStateOnSurface::Alignment
@ Alignment
This TSOS contains a Trk::AlignmentEffectsOnTrack.
Definition: TrackStateOnSurface.h:150
Muon::MuonRefitTool::m_deweightTwoStationTracks
Gaudi::Property< bool > m_deweightTwoStationTracks
Definition: MuonRefitTool.h:113
Muon::MuonRefitTool::m_errorStrategyBarEnd
MuonDriftCircleErrorStrategy m_errorStrategyBarEnd
Definition: MuonRefitTool.h:120
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
Muon::MuonDriftCircleErrorStrategy::PropCorrection
@ PropCorrection
Propagation correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:26
Muon::MuonDriftCircleErrorStrategy::TempCorrection
@ TempCorrection
Temperature correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:27
Muon::MuonRefitTool::m_failedRefit
std::atomic< unsigned int > m_failedRefit
Definition: MuonRefitTool.h:132
TrkDriftCircleMath::Segment
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:18
Muon::MuonRefitTool::m_ngoodRefits
std::atomic< unsigned int > m_ngoodRefits
Definition: MuonRefitTool.h:129
TrkDriftCircleMath::LocVec2D
Implementation of 2 dimensional vector class.
Definition: LocVec2D.h:16
Muon::MuonRefitTool::removeOutliers
std::unique_ptr< Trk::Track > removeOutliers(const Trk::Track &track, const Settings &settings) const
Definition: MuonRefitTool.cxx:1197
TrkDriftCircleMath::DCVec
std::vector< DriftCircle > DCVec
Definition: DriftCircle.h:117
Muon::MuonDriftCircleErrorStrategy::T0Refit
@ T0Refit
A special error was applied to account for the T0 refit (user defined via jobProperties)
Definition: MuonDriftCircleErrorStrategy.h:24
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
Muon::MuonRefitTool::m_muonExtrapolator
ToolHandle< Trk::IExtrapolator > m_muonExtrapolator
Definition: MuonRefitTool.h:82
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
Muon::MuonRefitTool::updateAlignmentErrors
std::unique_ptr< Trk::Track > updateAlignmentErrors(const Trk::Track &track, const EventContext &ctx, const Settings &settings) const
Definition: MuonRefitTool.cxx:221
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
TrkDriftCircleMath::Line
Definition: Line.h:17
Muon::MuonRefitTool::m_mdtRotCreator
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtRotCreator
Definition: MuonRefitTool.h:83
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Muon::MuonDriftCircleErrorStrategy::SlewCorrection
@ SlewCorrection
Slewing correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:29
Muon::MuonRefitTool::m_muonErrorStrategy
MuonDriftCircleErrorStrategy m_muonErrorStrategy
Definition: MuonRefitTool.h:124
Muon::MuonRefitTool::m_errorStrategyBXE
MuonDriftCircleErrorStrategy m_errorStrategyBXE
Definition: MuonRefitTool.h:118
Muon::MuonRefitTool::m_errorStrategyEE
MuonDriftCircleErrorStrategy m_errorStrategyEE
Definition: MuonRefitTool.h:116
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Muon::MuonDriftCircleErrorStrategyInput
std::bitset< 23 > MuonDriftCircleErrorStrategyInput
Definition: MuonDriftCircleErrorStrategy.h:13
Muon::MuonRefitTool::m_alignmentErrors
Gaudi::Property< bool > m_alignmentErrors
Definition: MuonRefitTool.h:101
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Muon::MuonDriftCircleErrorStrategy::FixedError
@ FixedError
A fixed error is given to this hit (user defined via jobProperties)
Definition: MuonDriftCircleErrorStrategy.h:20
Muon::MuonStationIndex::ChIndex::BIS
@ BIS
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
MuonAlign::AlignmentTranslationDeviation
Definition: AlignmentTranslationDeviation.h:11
Muon::MuonRefitTool::m_errorStrategyEEL1C05
MuonDriftCircleErrorStrategy m_errorStrategyEEL1C05
Definition: MuonRefitTool.h:119
Muon::MuonRefitTool::m_simpleAEOTs
Gaudi::Property< bool > m_simpleAEOTs
Definition: MuonRefitTool.h:102
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::MuonRefitTool::m_alignmentDeltaError
Gaudi::Property< float > m_alignmentDeltaError
Definition: MuonRefitTool.h:98
beamspotman.n
n
Definition: beamspotman.py:729
Muon::MuonDriftCircleErrorStrategy::TofCorrection
@ TofCorrection
Time of flight correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:25
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
urldecode::states
states
Definition: urldecode.h:39
Muon::MuonRefitTool::m_nrefits
std::atomic< unsigned int > m_nrefits
Definition: MuonRefitTool.h:128
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Muon::MuonRefitTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonRefitTool.h:75
Muon::MuonRefitTool::m_compClusterCreator
ToolHandle< IMuonCompetingClustersOnTrackCreator > m_compClusterCreator
Definition: MuonRefitTool.h:85
Muon::MuonRefitTool::m_errorStrategy
MuonDriftCircleErrorStrategy m_errorStrategy
Definition: MuonRefitTool.h:123
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
Muon::MuonRefitTool::m_edmHelperSvc
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonRefitTool.h:73
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MuonDriftCircleErrorStrategy::BackgroundCorrection
@ BackgroundCorrection
Background correction was applied in calibration.
Definition: MuonDriftCircleErrorStrategy.h:30
TrkDriftCircleMath::DCOnTrackCit
DCOnTrackVec::const_iterator DCOnTrackCit
Definition: DCOnTrack.h:61
Trk::PlaneSurface::globalToLocalDirection
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
Definition: PlaneSurface.cxx:256
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
Muon::MuonRefitTool::m_alignmentDelta
Gaudi::Property< float > m_alignmentDelta
Definition: MuonRefitTool.h:96
TrkDriftCircleMath::MatchDCWithLine
Definition: MatchDCWithLine.h:16
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
Muon::MuonDriftCircleErrorStrategy::Segment
@ Segment
Treating a segment or a track.
Definition: MuonDriftCircleErrorStrategy.h:31
Trk::muon
@ muon
Definition: ParticleHypothesis.h:31
jobOption.theta
theta
Definition: jobOption.ParticleGun_fwd_sequence.py:13
Muon::MuonDriftCircleErrorStrategy::ErrorAtPredictedPosition
@ ErrorAtPredictedPosition
Definition: MuonDriftCircleErrorStrategy.h:23
DataVector< const Trk::TrackStateOnSurface >
Trk::LocalDirection
represents the three-dimensional global direction with respect to a planar surface frame.
Definition: LocalDirection.h:81
TrkDriftCircleMath::DCOnTrack::OnTrack
@ OnTrack
Definition: DCOnTrack.h:20
Muon::MuonDriftCircleErrorStrategy::MagFieldCorrection
@ MagFieldCorrection
Magnetic field correction was applied in calibration
Definition: MuonDriftCircleErrorStrategy.h:28
Trk::AlignmentDeviation
An object decorating a track and holding degrees of freedom reflecting alignment accuracy.
Definition: AlignmentDeviation.h:20
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Muon::MuonRefitTool::m_deweightBIS78
Gaudi::Property< bool > m_deweightBIS78
Definition: MuonRefitTool.h:109
beamspotman.dir
string dir
Definition: beamspotman.py:621
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
Muon::MuonRefitTool::m_deweightEEL1C05
Gaudi::Property< bool > m_deweightEEL1C05
Definition: MuonRefitTool.h:112
Muon::MuonStationIndex::StIndex::BO
@ BO
Muon::MuonRefitTool::makeAEOTs
std::unique_ptr< Trk::Track > makeAEOTs(const Trk::Track &track) const
Definition: MuonRefitTool.cxx:232
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
TrkDriftCircleMath::SegIt
SegVec::iterator SegIt
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:123
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
Muon::MuonRefitTool::m_alignmentAngleError
Gaudi::Property< float > m_alignmentAngleError
Definition: MuonRefitTool.h:99
Muon::MuonRefitTool::m_errorStrategyBEE
MuonDriftCircleErrorStrategy m_errorStrategyBEE
Definition: MuonRefitTool.h:115
Muon::MuonRefitTool::m_failedExtrapolationMuonEntry
std::atomic< unsigned int > m_failedExtrapolationMuonEntry
Definition: MuonRefitTool.h:133
Muon::MuonRefitTool::m_addInner
Gaudi::Property< bool > m_addInner
Definition: MuonRefitTool.h:104
Muon::MuonDriftCircleErrorStrategy::StationError
@ StationError
A term is added to account for misaligned.
Definition: MuonDriftCircleErrorStrategy.h:22
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
Muon::MuonStationIndex::StIndex::BE
@ BE
Muon::MuonRefitTool::m_muonEntryTrackExtrapolator
ToolHandle< Muon::IMuonTrackExtrapolationTool > m_muonEntryTrackExtrapolator
Definition: MuonRefitTool.h:88
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Trk::MeasurementBase::associatedSurface
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.copyTCTOutput.locDir
locDir
Definition: copyTCTOutput.py:112
Muon::MuonDriftCircleErrorStrategy::setParameter
void setParameter(CreationParameter, bool value)
Definition: MuonDriftCircleErrorStrategy.h:63
Muon::MuonDriftCircleErrorStrategy::setStrategy
void setStrategy(Strategy)
Select the strategy to be used - only one can be set at a time.
Definition: MuonDriftCircleErrorStrategy.h:54
Muon::MuonRefitTool::m_addMiddle
Gaudi::Property< bool > m_addMiddle
Definition: MuonRefitTool.h:105
Muon::MuonRefitTool::m_finderDebugLevel
Gaudi::Property< int > m_finderDebugLevel
Definition: MuonRefitTool.h:90
Muon::MuonDriftCircleErrorStrategy::ParameterisedErrors
@ ParameterisedErrors
Use parameterised errors.
Definition: MuonDriftCircleErrorStrategy.h:21
DeMoScan.index
string index
Definition: DeMoScan.py:362
runIDAlign.accumulate
accumulate
Update flags based on parser line args.
Definition: runIDAlign.py:60
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::MuonRefitTool::m_t0Fitter
ToolHandle< IDCSLFitProvider > m_t0Fitter
Definition: MuonRefitTool.h:87
DEBUG
#define DEBUG
Definition: page_access.h:11
Muon::StIndex
MuonStationIndex::StIndex StIndex
Definition: MuonSegmentMatchingTool.cxx:14
Muon::MuonRefitTool::m_trackFitter
ToolHandle< Trk::ITrackFitter > m_trackFitter
Definition: MuonRefitTool.h:81
Muon::MuonRefitTool::createPerigee
std::unique_ptr< Trk::Perigee > createPerigee(const Trk::TrackParameters &pars, const EventContext &ctx) const
Definition: MuonRefitTool.cxx:1471
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
python.LArCondContChannels.isBarrel
isBarrel
Definition: LArCondContChannels.py:659
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
TrkDriftCircleMath::SegVec
std::vector< Segment > SegVec
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:122
Muon::MuonDriftCircleErrorStrategy::BroadError
@ BroadError
Definition: MuonDriftCircleErrorStrategy.h:18
Muon::MuonTSOSHelper::createMeasTSOSWithUpdate
static std::unique_ptr< Trk::TrackStateOnSurface > createMeasTSOSWithUpdate(const Trk::TrackStateOnSurface &tsos, std::unique_ptr< Trk::MeasurementBase > meas, std::unique_ptr< Trk::TrackParameters > pars, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
create a TSOS with a measurement, takes ownership of the pointers
Definition: MuonTSOSHelper.h:74
TrkDriftCircleMath::SegmentFinder
Definition: SegmentFinder.h:32
Muon::MuonDriftCircleErrorStrategy::ScaledError
@ ScaledError
Definition: MuonDriftCircleErrorStrategy.h:19
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
Muon::MuonRefitTool::updateMdtErrors
std::unique_ptr< Trk::Track > updateMdtErrors(const Trk::Track &track, const EventContext &ctx, const Settings &settings) const
Definition: MuonRefitTool.cxx:976
Muon::MuonStationIndex::StIndex::BI
@ BI
Muon::MuonStationIndex::StIndex::BM
@ BM
Muon::MuonRefitTool::makeSimpleAEOTs
std::unique_ptr< Trk::Track > makeSimpleAEOTs(const Trk::Track &track) const
Definition: MuonRefitTool.cxx:479
Muon::MuonRefitTool::m_alignErrorTool
ToolHandle< Trk::ITrkAlignmentDeviationTool > m_alignErrorTool
Does not provide any method with EventContext yet.
Definition: MuonRefitTool.h:78
Muon::MuonRefitTool::refit
std::unique_ptr< Trk::Track > refit(const Trk::Track &track, const EventContext &ctx, const Settings *settings) const override
refit a track
Definition: MuonRefitTool.cxx:146
Muon::MuonRefitTool::m_errorStrategyTwoStations
MuonDriftCircleErrorStrategy m_errorStrategyTwoStations
Definition: MuonRefitTool.h:122
Muon::MuonStationIndex::StIndex::EI
@ EI
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
fitman.k
k
Definition: fitman.py:528
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
TrkDriftCircleMath::DriftCircle::InTime
@ InTime
drift time too small to be compatible with drift spectrum
Definition: DriftCircle.h:27
Muon::MuonStationIndex::ChIndex::BOL
@ BOL
Identifier
Definition: IdentifierFieldParser.cxx:14