ATLAS Offline Software
MuPatHit.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <iostream>
8 #include <utility>
9 
12 
13 namespace Muon {
14 
15 
16  // member functions
17  MuPatHit::MuPatHit(std::shared_ptr<const Trk::TrackParameters> pars, std::shared_ptr<const Trk::MeasurementBase> presMeas,
18  std::shared_ptr<const Trk::MeasurementBase> broadMeas, const Info& info) :
19  Trk::ObjectCounter<MuPatHit>{},
20  m_pars(std::move(pars)), m_precisionMeas(std::move(presMeas)), m_broadMeas(std::move(broadMeas)), m_info(info) {
21 
22  }
23 
25  Trk::ObjectCounter<MuPatHit>(hit) {
26  copy(hit);
27  }
28 
30  if (&hit != this) {
31  copy(hit);
32  }
33  return *this;
34  }
35  void MuPatHit::copy(const MuPatHit& hit) {
36  m_pars = hit.m_pars;
38  m_broadMeas = hit.m_broadMeas->uniqueClone();
39  m_residual = hit.m_residual;
40  m_pull = hit.m_pull;
41  m_info = hit.m_info;
42  }
43  const Trk::TrackParameters& MuPatHit::parameters() const { return *m_pars; }
44 
46  if (info().selection == Precise) return *m_precisionMeas;
47  return *m_broadMeas;
48  }
51  const MuPatHit::Info& MuPatHit::info() const { return m_info; }
53  double MuPatHit::residual() const{return m_residual;}
54  double MuPatHit::pull() const{return m_pull;}
55  void MuPatHit::setResidual(double residual, double pull) {
57  m_pull = pull;
58  }
59 } // namespace Muon
grepfile.info
info
Definition: grepfile.py:38
Muon::MuPatHit::MuPatHit
MuPatHit(std::shared_ptr< const Trk::TrackParameters > pars, std::shared_ptr< const Trk::MeasurementBase > presMeas, std::shared_ptr< const Trk::MeasurementBase > broadMeas, const Info &info)
construction taking all members as argument, ownership is taken only of the broadMeas.
Definition: MuPatHit.cxx:17
Muon::MuPatHit::m_precisionMeas
std::shared_ptr< const Trk::MeasurementBase > m_precisionMeas
Definition: MuPatHit.h:128
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
MeasurementBase.h
Muon::MuPatHit
Definition: MuPatHit.h:30
Muon::MuPatHit::m_pull
double m_pull
Definition: MuPatHit.h:132
Muon::MuPatHit::info
const Info & info() const
returns a reference to the hit info
Definition: MuPatHit.cxx:51
Muon::MuPatHit::measurement
const Trk::MeasurementBase & measurement() const
returns a reference to the selected measurement
Definition: MuPatHit.cxx:45
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
Muon::MuPatHit::m_residual
double m_residual
Definition: MuPatHit.h:131
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::MuPatHit::copy
void copy(const MuPatHit &hit)
copy hit
Definition: MuPatHit.cxx:35
Muon::MuPatHit::operator=
MuPatHit & operator=(const MuPatHit &)
assignment operator
Definition: MuPatHit.cxx:29
ResidualPull.h
Muon::MuPatHit::Info
Definition: MuPatHit.h:36
Muon::MuPatHit::broadMeasurement
const Trk::MeasurementBase & broadMeasurement() const
returns broad measurement
Definition: MuPatHit.cxx:50
Muon::MuPatHit::m_pars
std::shared_ptr< const Trk::TrackParameters > m_pars
Definition: MuPatHit.h:127
Muon::MuPatHit::m_broadMeas
std::shared_ptr< const Trk::MeasurementBase > m_broadMeas
Definition: MuPatHit.h:129
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:282
Muon::MuPatHit::residual
double residual() const
returns the residual of the measurement
Definition: MuPatHit.cxx:53
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
selection
const std::string selection
Definition: fbtTestBasics.cxx:74
Muon::MuPatHit::m_info
Info m_info
Definition: MuPatHit.h:130
Muon::MuPatHit::pull
double pull() const
returns the pull of the measurement
Definition: MuPatHit.cxx:54
Muon::MuPatHit::preciseMeasurement
const Trk::MeasurementBase & preciseMeasurement() const
returns precise measurement
Definition: MuPatHit.cxx:49
Muon::MuPatHit::parameters
const Trk::TrackParameters & parameters() const
returns a reference to the TrackParameters
Definition: MuPatHit.cxx:43
MuPatHit.h
Muon::MuPatHit::Precise
@ Precise
Definition: MuPatHit.h:34
Muon::MuPatHit::setResidual
void setResidual(double residual, double pull)
Definition: MuPatHit.cxx:55