ATLAS Offline Software
Loading...
Searching...
No Matches
TrigSiSpacePointBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGINDETEVENT_TRIGSISPACEPOINTBASE_H
6#define TRIGINDETEVENT_TRIGSISPACEPOINTBASE_H
7
8#include <cmath>
10
11#define MAX_SILICON_LAYER_NUM 19
12
13// layer numbering scheme:
14// 3 Barrel Pixels 0,1,2
15// 4 Barrel SCT 3,4,5,6 i.e. offsetBarrelSCT = 3
16// 3 Endcap Pixels 7,8,9 i.e. offsetEndcapPixels = 7
17// 9 Endcap SCT 10,11,12,13,14,15,16,17,18 i.e. offsetEndcapSCT = 10
18
19#define OffsetEndcapPixels 7
20#define OffsetBarrelSCT 3
21#define OffsetEndcapSCT 10
22
24
25public:
26
27 // using cylindrical co-ordinates, no. errors
29 double r, double phi, double z,
30 double dr=0.0, double dz=0.0, const Trk::SpacePoint* offlineSpacePoint = nullptr) :
32 m_r(r), m_phi(phi), m_z(z),
33 m_dr(dr), m_dz(dz),
35 {
36 m_x = r * std::cos(phi);
37 m_y = r * std::sin(phi);
38 m_barCode=-1;
40 m_isPixel = (m_offlineSpacePoint->clusterList().second==nullptr);
41 }
42 else {
43 m_isPixel = false;//Arbitrarily choose value when no offline spacepoint
44 }
45 }
46
47 // Destructor
48 virtual ~TrigSiSpacePointBase() = default;
49
50 // Methods to set data members
51 void r( const double r ) {m_r = r; }
52 void phi(const double phi) {m_phi = phi;}
53 void z( const double z ) {m_z = z; }
54 void x( const double x ) {m_x = x; }
55 void y( const double y ) {m_y = y; }
56 void dr( const double dr ) {m_dr = dr; }
57 void dz( const double dz ) {m_dz = dz; }
58
59 void barCode(int code) {m_barCode = code;}
60
61 double r() const {return m_r;}
62 double phi() const {return m_phi;}
63 double z() const {return m_z;}
64 double dr() const {return m_dr;}
65 double dz() const {return m_dz;}
66 double x() const {return m_x;}
67 double y() const {return m_y;}
68 long layer() const {return m_layer;}
69
70 bool isPixel() const {return m_isPixel;}
71 bool isSCT() const {return !m_isPixel;}
72
73 // Methods to calculate associated values
74
75 double eta(double z0) const {
76 double zr = (m_z-z0)/m_r;
77 return log(zr+std::sqrt(1.+zr*zr));
78 }
79
80 int barCode() const {return m_barCode;}
82
83protected:
84
85 long m_layer;
86
87 double m_r;
88 double m_x;
89 double m_y;
90
91 double m_phi;
92 double m_z;
93 double m_dr;
94 double m_dz;
95
96 int m_barCode; //MC truth association
97 bool m_isPixel; //Stores whether spacepoint is Pixel or SCT
98
100};
101#endif
102
103
104
105
TrigSiSpacePointBase(long layer, double r, double phi, double z, double dr=0.0, double dz=0.0, const Trk::SpacePoint *offlineSpacePoint=nullptr)
double eta(double z0) const
const Trk::SpacePoint * offlineSpacePoint() const
void r(const double r)
void dr(const double dr)
virtual ~TrigSiSpacePointBase()=default
void y(const double y)
void dz(const double dz)
void phi(const double phi)
void x(const double x)
void z(const double z)
const Trk::SpacePoint * m_offlineSpacePoint