ATLAS Offline Software
Loading...
Searching...
No Matches
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>
7
8namespace 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
struct containing additional debug information on the hits that is not needed for the actual alg but ...
float x
layer identifier (packed word containing technology/sublayer)
float ymax
minimum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap)
Hit & operator=(const Hit &h_)
=operator
Definition Hit.cxx:22
~Hit()
destructor
const Trk::PrepRawData * prd
access to assiciated hit, either the prd or the tgc pointer is set in athena
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
void copy(const Hit &hit)
pointer to debug information
Definition Hit.cxx:29
float w
maximum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap)
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
LayerIndex
enum to classify the different layers in the muon spectrometer
float phimax
minimum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap)
~PhiHit()
destructor
float w
maximum value of the hit in the precision coordinate (y=z in barrel, y=r in endcap)
const Trk::PrepRawData * prd
access to assiciated hit, either the prd or the tgc pointer is set in athena
void copy(const PhiHit &hit)
pointer to debug information
Definition Hit.cxx:58
PhiHit & operator=(const PhiHit &h_)
=operator
Definition Hit.cxx:51
float r
layer identifier (packed word containing technology/sublayer)
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