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

#include <MuPatHit.h>

Inheritance diagram for Muon::MuPatHit:
Collaboration diagram for Muon::MuPatHit:

Classes

struct  Info
 

Public Types

enum  Type {
  UnknownType = -1, MDT = 0, RPC = 1, TGC = 2,
  CSC = 3, MM = 4, sTGC = 5, PREC = 6,
  Pseudo = 7, Scatterer = 8
}
 
enum  Status { UnknownStatus = -1, OnTrack = 0, Outlier, NotOnTrack }
 
enum  HitSelection { UnknownSelection = -1, Precise = 0, Broad = 1 }
 

Public Member Functions

 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. More...
 
 MuPatHit (const MuPatHit &hit)
 copy constructor More...
 
MuPatHitoperator= (const MuPatHit &)
 assignment operator More...
 
virtual ~MuPatHit ()=default
 destructor More...
 
const Trk::TrackParametersparameters () const
 returns a reference to the TrackParameters More...
 
const Trk::MeasurementBasemeasurement () const
 returns a reference to the selected measurement More...
 
const Infoinfo () const
 returns a reference to the hit info More...
 
Infoinfo ()
 returns a reference to the hit info More...
 
std::unique_ptr< MuPatHitclone () const
 clones the MuPatHit More...
 
const Trk::MeasurementBasepreciseMeasurement () const
 returns precise measurement More...
 
const Trk::MeasurementBasebroadMeasurement () const
 returns broad measurement More...
 
void setResidual (double residual, double pull)
 
double residual () const
 returns the residual of the measurement More...
 
double pull () const
 returns the pull of the measurement More...
 

Static Public Member Functions

static unsigned int maxNumberOfInstantiations ()
 maximum number of objects of this type in memory More...
 
static unsigned int numberOfInstantiations ()
 current number of objects of this type in memory More...
 
static unsigned int numberOfCopies ()
 number of times the copy constructor was called since last reset More...
 

Static Public Attributes

static std::atomic_size_t s_numberOfInstantiations
 

Private Member Functions

void copy (const MuPatHit &hit)
 copy hit More...
 

Private Attributes

std::shared_ptr< const Trk::TrackParametersm_pars {}
 
std::shared_ptr< const Trk::MeasurementBasem_precisionMeas {}
 
std::shared_ptr< const Trk::MeasurementBasem_broadMeas
 
Info m_info {}
 
double m_residual {0.}
 
double m_pull {0.}
 

Detailed Description

Definition at line 30 of file MuPatHit.h.

Member Enumeration Documentation

◆ HitSelection

Enumerator
UnknownSelection 
Precise 
Broad 

Definition at line 34 of file MuPatHit.h.

34 { UnknownSelection = -1, Precise = 0, Broad = 1 };

◆ Status

Enumerator
UnknownStatus 
OnTrack 
Outlier 
NotOnTrack 

Definition at line 33 of file MuPatHit.h.

33 { UnknownStatus = -1, OnTrack = 0, Outlier, NotOnTrack };

◆ Type

Enumerator
UnknownType 
MDT 
RPC 
TGC 
CSC 
MM 
sTGC 
PREC 
Pseudo 
Scatterer 

Definition at line 32 of file MuPatHit.h.

32 { UnknownType = -1, MDT = 0, RPC = 1, TGC = 2, CSC = 3, MM = 4, sTGC = 5, PREC = 6, Pseudo = 7, Scatterer = 8 };

Constructor & Destructor Documentation

◆ MuPatHit() [1/2]

Muon::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.

Parameters
parspredicted TrackParameters at the surface of the measurement
presMeasprecisely calibrated measurement
broadMeasmeasurement with enlarged errors
presResPullresidual and pull of the hit for the precise measurement
broadResPullresidual and pull of the hit for the broad measurement
idHit Identifier (can be invalid (Pseudos), user should check validity)
typeHit type enum
measuresPhiboolean indicating whether this is an eta or phi measurement
usedenum indicating the hit status

Definition at line 17 of file MuPatHit.cxx.

18  :
20  m_pars(std::move(pars)), m_precisionMeas(std::move(presMeas)), m_broadMeas(std::move(broadMeas)), m_info(info) {
21 
22  }

◆ MuPatHit() [2/2]

Muon::MuPatHit::MuPatHit ( const MuPatHit hit)

copy constructor

Definition at line 24 of file MuPatHit.cxx.

24  :
26  copy(hit);
27  }

◆ ~MuPatHit()

virtual Muon::MuPatHit::~MuPatHit ( )
virtualdefault

destructor

Member Function Documentation

◆ broadMeasurement()

const Trk::MeasurementBase & Muon::MuPatHit::broadMeasurement ( ) const

returns broad measurement

Definition at line 50 of file MuPatHit.cxx.

50 { return *m_broadMeas; }

◆ clone()

std::unique_ptr<MuPatHit> Muon::MuPatHit::clone ( ) const
inline

clones the MuPatHit

Definition at line 98 of file MuPatHit.h.

98 { return std::make_unique<MuPatHit>(*this); }

◆ copy()

void Muon::MuPatHit::copy ( const MuPatHit hit)
private

copy hit

Definition at line 35 of file MuPatHit.cxx.

35  {
36  m_pars = hit.m_pars;
37  m_precisionMeas = hit.m_precisionMeas;
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  }

◆ info() [1/2]

MuPatHit::Info & Muon::MuPatHit::info ( )

returns a reference to the hit info

Definition at line 52 of file MuPatHit.cxx.

52 { return m_info; }

◆ info() [2/2]

const MuPatHit::Info & Muon::MuPatHit::info ( ) const

returns a reference to the hit info

Definition at line 51 of file MuPatHit.cxx.

51 { return m_info; }

◆ maxNumberOfInstantiations()

static unsigned int Muon::MuPatHit::maxNumberOfInstantiations ( )
static

maximum number of objects of this type in memory

◆ measurement()

const Trk::MeasurementBase & Muon::MuPatHit::measurement ( ) const

returns a reference to the selected measurement

Definition at line 45 of file MuPatHit.cxx.

45  {
46  if (info().selection == Precise) return *m_precisionMeas;
47  return *m_broadMeas;
48  }

◆ numberOfCopies()

static unsigned int Muon::MuPatHit::numberOfCopies ( )
static

number of times the copy constructor was called since last reset

◆ numberOfInstantiations()

static unsigned int Muon::MuPatHit::numberOfInstantiations ( )
static

current number of objects of this type in memory

◆ operator=()

MuPatHit & Muon::MuPatHit::operator= ( const MuPatHit hit)

assignment operator

Definition at line 29 of file MuPatHit.cxx.

29  {
30  if (&hit != this) {
31  copy(hit);
32  }
33  return *this;
34  }

◆ parameters()

const Trk::TrackParameters & Muon::MuPatHit::parameters ( ) const

returns a reference to the TrackParameters

Definition at line 43 of file MuPatHit.cxx.

43 { return *m_pars; }

◆ preciseMeasurement()

const Trk::MeasurementBase & Muon::MuPatHit::preciseMeasurement ( ) const

returns precise measurement

Definition at line 49 of file MuPatHit.cxx.

49 { return *m_precisionMeas; }

◆ pull()

double Muon::MuPatHit::pull ( ) const

returns the pull of the measurement

Definition at line 54 of file MuPatHit.cxx.

54 {return m_pull;}

◆ residual()

double Muon::MuPatHit::residual ( ) const

returns the residual of the measurement

Definition at line 53 of file MuPatHit.cxx.

53 {return m_residual;}

◆ setResidual()

void Muon::MuPatHit::setResidual ( double  residual,
double  pull 
)

Definition at line 55 of file MuPatHit.cxx.

55  {
57  m_pull = pull;
58  }

Member Data Documentation

◆ m_broadMeas

std::shared_ptr<const Trk::MeasurementBase> Muon::MuPatHit::m_broadMeas
private

Definition at line 129 of file MuPatHit.h.

◆ m_info

Info Muon::MuPatHit::m_info {}
private

Definition at line 130 of file MuPatHit.h.

◆ m_pars

std::shared_ptr<const Trk::TrackParameters> Muon::MuPatHit::m_pars {}
private

Definition at line 127 of file MuPatHit.h.

◆ m_precisionMeas

std::shared_ptr<const Trk::MeasurementBase> Muon::MuPatHit::m_precisionMeas {}
private

Definition at line 128 of file MuPatHit.h.

◆ m_pull

double Muon::MuPatHit::m_pull {0.}
private

Definition at line 132 of file MuPatHit.h.

◆ m_residual

double Muon::MuPatHit::m_residual {0.}
private

Definition at line 131 of file MuPatHit.h.

◆ s_numberOfInstantiations

std::atomic_size_t Trk::ObjectCounter< MuPatHit >::s_numberOfInstantiations
inlinestaticinherited

Definition at line 22 of file TrkObjectCounter.h.


The documentation for this class was generated from the following files:
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
Muon::MuPatHit::Scatterer
@ Scatterer
Definition: MuPatHit.h:32
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::m_residual
double m_residual
Definition: MuPatHit.h:131
Muon::MuPatHit::Pseudo
@ Pseudo
Definition: MuPatHit.h:32
Muon::MuPatHit::Broad
@ Broad
Definition: MuPatHit.h:34
Muon::MuPatHit::copy
void copy(const MuPatHit &hit)
copy hit
Definition: MuPatHit.cxx:35
Trk::ObjectCounter< MuPatHit >
Muon::MuPatHit::CSC
@ CSC
Definition: MuPatHit.h:32
Muon::MuPatHit::PREC
@ PREC
Definition: MuPatHit.h:32
Muon::MuPatHit::RPC
@ RPC
Definition: MuPatHit.h:32
TGC
Definition: TgcBase.h:6
Muon::MuPatHit::OnTrack
@ OnTrack
Definition: MuPatHit.h:33
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
Muon::MuPatHit::UnknownType
@ UnknownType
Definition: MuPatHit.h:32
Muon::MuPatHit::NotOnTrack
@ NotOnTrack
Definition: MuPatHit.h:33
Muon::MuPatHit::residual
double residual() const
returns the residual of the measurement
Definition: MuPatHit.cxx:53
Muon::MuPatHit::MDT
@ MDT
Definition: MuPatHit.h:32
selection
std::string selection
Definition: fbtTestBasics.cxx:75
Muon::MuPatHit::MM
@ MM
Definition: MuPatHit.h:32
Muon::MuPatHit::m_info
Info m_info
Definition: MuPatHit.h:130
Muon::MuPatHit::Outlier
@ Outlier
Definition: MuPatHit.h:33
Muon::MuPatHit::UnknownSelection
@ UnknownSelection
Definition: MuPatHit.h:34
Muon::MuPatHit::pull
double pull() const
returns the pull of the measurement
Definition: MuPatHit.cxx:54
Muon::MuPatHit::Precise
@ Precise
Definition: MuPatHit.h:34
Muon::MuPatHit::sTGC
@ sTGC
Definition: MuPatHit.h:32
Muon::MuPatHit::UnknownStatus
@ UnknownStatus
Definition: MuPatHit.h:33