ATLAS Offline Software
Hit.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <iostream>
6 #include "MuonLayerHough/Hit.h"
7 
8 namespace MuonHough {
9 
11  Muon::MuonStationIndex::LayerIndex layer_, int sublayer_) :
12  type(type_), sector(sector_), region(region_), layer(layer_), sublayer(sublayer_) {}
13 
14  Hit::Hit(int layer_, float x_, float ymin_, float ymax_, float w_, HitDebugInfo* d_, const Trk::PrepRawData* prd_,
15  const Muon::TgcClusterObj3D* tgc_) :
16  layer(layer_), x(x_), ymin(ymin_), ymax(ymax_), w(w_), prd(prd_), tgc(tgc_), m_debug(d_) {}
17 
18  Hit::~Hit() = default;
19 
20  Hit::Hit(const Hit& h_) { copy(h_); }
21 
22  Hit& Hit::operator=(const Hit& h_) {
23  if (&h_ != this) {
24  copy(h_);
25  }
26  return *this;
27  }
28 
29  void Hit::copy(const Hit& hit) {
30  layer = hit.layer;
31  x = hit.x;
32  ymin = hit.ymin;
33  ymax = hit.ymax;
34  w = hit.w;
35  if (hit.m_debug)
36  m_debug = std::make_unique< HitDebugInfo>(*hit.m_debug);
37  else
38  m_debug.reset();
39  prd = hit.prd;
40  tgc = hit.tgc;
41  }
42 
43  PhiHit::PhiHit(int layer_, float r_, float phimin_, float phimax_, float w_, HitDebugInfo* d_, const Trk::PrepRawData* prd_,
44  const Muon::TgcClusterObj3D* tgc_) :
45  layer(layer_), r(r_), phimin(phimin_), phimax(phimax_), w(w_), prd(prd_), tgc(tgc_), m_debug(d_) {}
46 
47  PhiHit::~PhiHit() = default;
48 
49  PhiHit::PhiHit(const PhiHit& h_) { copy(h_); }
50 
52  if (&h_ != this) {
53  copy(h_);
54  }
55  return *this;
56  }
57 
58  void PhiHit::copy(const PhiHit& hit) {
59  layer = hit.layer;
60  r = hit.r;
61  phimin = hit.phimin;
62  phimax = hit.phimax;
63  w = hit.w;
64  if (hit.m_debug)
65  m_debug = std::make_unique< HitDebugInfo>(*hit.m_debug);
66  else
67  m_debug.reset();
68  prd = hit.prd;
69  tgc = hit.tgc;
70  }
71 } // namespace MuonHough
beamspotman.r
def r
Definition: beamspotman.py:676
ymin
double ymin
Definition: listroot.cxx:63
MuonHough::Hit::ymin
float ymin
global hit position (x=r in barrel, x=z in endcap)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:79
MuonHough::PhiHit::m_debug
std::unique_ptr< HitDebugInfo > m_debug
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:130
MuonHough::Hit::w
float w
maximum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:81
MuonHough::Hit::operator=
Hit & operator=(const Hit &h_)
=operator
Definition: Hit.cxx:22
MuonHough::PhiHit::r
float r
layer identifier (packed word containing technology/sublayer)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:116
MuonHough::HitDebugInfo
struct containing additional debug information on the hits that is not needed for the actual alg but ...
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:26
Muon::MuonStationIndex::LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:38
MuonHough::Hit::layer
int layer
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:77
MuonHough::Hit
struct containing all hit information needed for the Hough transform
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:60
x
#define x
Hit.h
MuonHough::PhiHit::w
float w
maximum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:119
MuonHough::PhiHit::phimax
float phimax
minimum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:118
MuonHough::PhiHit::tgc
const Muon::TgcClusterObj3D * tgc
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:127
MuonHough::Hit::~Hit
~Hit()
destructor
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonHough
Definition: MuonLayerHoughTool.h:41
MuonHough::Hit::x
float x
layer identifier (packed word containing technology/sublayer)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:78
MuonHough::Hit::m_debug
std::unique_ptr< HitDebugInfo > m_debug
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:92
Muon::MuonStationIndex::DetectorRegionIndex
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:47
Trk::PrepRawData
Definition: PrepRawData.h:62
MuonHough::PhiHit::prd
const Trk::PrepRawData * prd
access to assiciated hit, either the prd or the tgc pointer is set in athena
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:126
MuonHough::PhiHit::PhiHit
PhiHit(int layer_, float r_, float phimin_, float phimax_, float w_, HitDebugInfo *d_=0, const Trk::PrepRawData *prd_=0, const Muon::TgcClusterObj3D *tgc_=0)
constructor, takes ownership of the HitDebugInfo pointer
Definition: Hit.cxx:43
MuonHough::PhiHit::operator=
PhiHit & operator=(const PhiHit &h_)
=operator
Definition: Hit.cxx:51
MuonHough::PhiHit::layer
int layer
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:115
MuonHough::PhiHit::~PhiHit
~PhiHit()
destructor
Muon::TgcClusterObj3D
Definition: TgcHitClustering.h:19
MuonHough::Hit::tgc
const Muon::TgcClusterObj3D * tgc
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:89
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonHough::Hit::Hit
Hit(int layer_, float x_, float ymin_, float ymax_, float w_, HitDebugInfo *d_=nullptr, const Trk::PrepRawData *prd_=nullptr, const Muon::TgcClusterObj3D *tgc_=nullptr)
constructor, takes ownership of the HitDebugInfo pointer
Definition: Hit.cxx:14
MuonHough::HitDebugInfo::HitDebugInfo
HitDebugInfo()=default
MuonHough::PhiHit::phimin
float phimin
global hit position (x=r in barrel, x=z in endcap)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:117
MuonHough::Hit::prd
const Trk::PrepRawData * prd
access to assiciated hit, either the prd or the tgc pointer is set in athena
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:88
MuonHough::Hit::ymax
float ymax
minimum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:80
MuonHough::PhiHit::copy
void copy(const PhiHit &hit)
pointer to debug information
Definition: Hit.cxx:58
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
MuonHough::PhiHit
struct containing all hit information needed for the Hough transform
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:99
MuonHough::Hit::copy
void copy(const Hit &hit)
pointer to debug information
Definition: Hit.cxx:29
ymax
double ymax
Definition: listroot.cxx:64