ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
InDetDD::SCT_ForwardModuleSideGeometry Class Reference

#include <SCT_ForwardModuleSideGeometry.h>

Collaboration diagram for InDetDD::SCT_ForwardModuleSideGeometry:

Public Member Functions

 SCT_ForwardModuleSideGeometry (const double radius1, const double halfHeight1, const double radius2, const double halfHeight2, const int strips, const double step, const int nCrystals)
 Constructor with parameters: r from inner crystal center to beam inner crystal half height r from outer crystal (if present) center to beam outer crystal (if present) half height number of strips (same for both crystals) strip step in angle (same for both crystals) number of crystals per module side. More...
 
virtual ~SCT_ForwardModuleSideGeometry ()=default
 Destructor: More...
 
double radius () const
 Nominal center radius of double wafer. More...
 
double radius1 () const
 r from inner crystal center to beam: More...
 
double halfHeight1 () const
 inner crystal half height: More...
 
double radius2 () const
 r from outer crystal (if present) center to beam: More...
 
double halfHeight2 () const
 outer crystal (if present) half height: More...
 
int strips () const
 number of strips (same for both crystals): More...
 
double step () const
 strip step in angle (same for both crystals): More...
 
double angularPitch () const
 
int nCrystals () const
 number of crystals per module side More...
 
void distanceToDetectorEdge (const SiLocalPosition &localPosition, const SCT_ForwardPolarPosition &polarPos, double &etaDist, double &phiDist) const
 
bool nearBondGap (const SiLocalPosition &localPosition, double etaTol) const
 Test if near bond gap within tolerances. More...
 
bool inActiveArea (const SiLocalPosition &chargePosition, bool checkBondGap=true) const
 check if position is in active area More...
 
bool inActiveArea (const SCT_ForwardPolarPosition &polarPos) const
 DEPRECATED. More...
 
double stripPitch (const SCT_ForwardPolarPosition &polarPos) const
 give the strip pitch (dependence on position needed for forward)
More...
 
double scaledDistanceToNearestDiode (const SCT_ForwardPolarPosition &polarPos) const
 give distance to the nearest diode in units of pitch, from 0.0 to 0.5, this method should be fast as it is called for every surface charge in the SCT_SurfaceChargesGenerator More...
 
double length () const
 Method to calculate length of a module. More...
 
double width () const
 Method to calculate average width of a module. More...
 
double minWidth () const
 Method to calculate minimum width of a module. More...
 
double maxWidth () const
 Method to calculate maximum width of a module. More...
 
double deadAreaLength () const
 give length of dead area More...
 
double deadAreaUpperBoundary () const
 give upper boundary of dead area More...
 
double deadAreaLowerBoundary () const
 give lower boundary of dead area More...
 

Private Member Functions

 SCT_ForwardModuleSideGeometry ()
 

Private Attributes

double m_radius
 r from nominal element center to beam More...
 
double m_radius1
 r from inner crystal center to beam More...
 
double m_halfHeight1
 inner crystal half height More...
 
double m_radius2
 r from outer crystal (if present) center to beam More...
 
double m_halfHeight2
 outer crystal (if present) half height More...
 
int m_strips
 number of strips (same for both crystals) More...
 
double m_step
 strip step in angle (same for both crystals) More...
 
int m_nCrystals
 number of crystals per module side More...
 
double m_leftSide
 left border of module in angle More...
 
double m_rightSide
 right border of module in angle More...
 
double m_upperSide1
 upper side of crystal 1 More...
 
double m_lowerSide1
 lower side of crystal 1 More...
 
double m_upperSide2
 upper side of crystal 2 More...
 
double m_lowerSide2
 lower side of crystal 2 More...
 
double m_halfLength
 top = +halfLength, bot = -halfLength
More...
 
double m_deadRegionUpper
 relative to center of detector. More...
 
double m_deadRegionLower
 relative to center of detector. More...
 
double m_tangent
 tan(theta) at edge = (halfWidth) / (radius) More...
 

Detailed Description

Geometry descriptor holding strig number, crystel inner and outer half length & radius.

Author
Grant Gorfine

Definition at line 29 of file SCT_ForwardModuleSideGeometry.h.

Constructor & Destructor Documentation

◆ SCT_ForwardModuleSideGeometry() [1/2]

InDetDD::SCT_ForwardModuleSideGeometry::SCT_ForwardModuleSideGeometry ( const double  radius1,
const double  halfHeight1,
const double  radius2,
const double  halfHeight2,
const int  strips,
const double  step,
const int  nCrystals 
)

Constructor with parameters: r from inner crystal center to beam inner crystal half height r from outer crystal (if present) center to beam outer crystal (if present) half height number of strips (same for both crystals) strip step in angle (same for both crystals) number of crystals per module side.

Definition at line 23 of file SCT_ForwardModuleSideGeometry.cxx.

29  :
35  m_step(step) ,
37  m_leftSide(step*strips*(-0.5)),
38  m_rightSide(step*strips*0.5),
43 
44 
45 {
46  if (m_radius1<0) m_radius1=0.0;
47  if (m_halfHeight1<0) m_halfHeight1=0.0;
48  if (m_radius2<0) m_radius2=0.0;
49  if (m_halfHeight2<0) m_halfHeight2=0.0;
50  if (m_strips<0) m_strips=0;
51  if (m_step<0) m_step=0.0;
52  if (m_nCrystals==0) m_nCrystals=1;
53  if (m_nCrystals<2) {
54  m_radius2=0;
55  m_halfHeight2=0;
56  }
57 
58  if (m_nCrystals==1) {
61  } else {
64  }
65 
67 
68  if (m_nCrystals==1) {
69  m_deadRegionUpper = 0;
70  m_deadRegionLower = 0;
71  } else {
74  }
75 
76 }

◆ ~SCT_ForwardModuleSideGeometry()

virtual InDetDD::SCT_ForwardModuleSideGeometry::~SCT_ForwardModuleSideGeometry ( )
virtualdefault

Destructor:

◆ SCT_ForwardModuleSideGeometry() [2/2]

InDetDD::SCT_ForwardModuleSideGeometry::SCT_ForwardModuleSideGeometry ( )
private

Member Function Documentation

◆ angularPitch()

double InDetDD::SCT_ForwardModuleSideGeometry::angularPitch ( ) const
inline

Definition at line 196 of file SCT_ForwardModuleSideGeometry.h.

197 {
198  return m_step;
199 }

◆ deadAreaLength()

double InDetDD::SCT_ForwardModuleSideGeometry::deadAreaLength ( ) const

give length of dead area

Definition at line 204 of file SCT_ForwardModuleSideGeometry.cxx.

205 {
206  if (m_nCrystals==1) {
207  return 0;
208  } else {
210  }
211 
212 }

◆ deadAreaLowerBoundary()

double InDetDD::SCT_ForwardModuleSideGeometry::deadAreaLowerBoundary ( ) const

give lower boundary of dead area

Definition at line 222 of file SCT_ForwardModuleSideGeometry.cxx.

223 {
224  return m_deadRegionLower;
225 }

◆ deadAreaUpperBoundary()

double InDetDD::SCT_ForwardModuleSideGeometry::deadAreaUpperBoundary ( ) const

give upper boundary of dead area

Definition at line 216 of file SCT_ForwardModuleSideGeometry.cxx.

217 {
218  return m_deadRegionUpper;
219 }

◆ distanceToDetectorEdge()

void InDetDD::SCT_ForwardModuleSideGeometry::distanceToDetectorEdge ( const SiLocalPosition localPosition,
const SCT_ForwardPolarPosition polarPos,
double &  etaDist,
double &  phiDist 
) const

Definition at line 84 of file SCT_ForwardModuleSideGeometry.cxx.

87 {
88 
89  // Distance to top/bottom.
90  // Calculation symmetric around zero so we can use abs.
91  etaDist = m_halfLength - std::abs(localPosition.xEta());
92 
93  // For phi distance use r*phiDiff.
94  phiDist = polar.r() * (m_rightSide - std::abs(polar.theta()));
95 
96 }

◆ halfHeight1()

double InDetDD::SCT_ForwardModuleSideGeometry::halfHeight1 ( ) const
inline

inner crystal half height:

Definition at line 171 of file SCT_ForwardModuleSideGeometry.h.

172 {
173  return m_halfHeight1;
174 }

◆ halfHeight2()

double InDetDD::SCT_ForwardModuleSideGeometry::halfHeight2 ( ) const
inline

outer crystal (if present) half height:

Definition at line 181 of file SCT_ForwardModuleSideGeometry.h.

182 {
183  return m_halfHeight2;
184 }

◆ inActiveArea() [1/2]

bool InDetDD::SCT_ForwardModuleSideGeometry::inActiveArea ( const SCT_ForwardPolarPosition polarPos) const

DEPRECATED.

Definition at line 131 of file SCT_ForwardModuleSideGeometry.cxx.

133 {
134  bool conditionTheta=false;
135  bool conditionEtaOne=false;
136  bool conditionEtaTwo=false;
137  double polarR = polarPos.r();
138  double polarTheta = polarPos.theta();
139  double cosPolarTheta = cos(polarTheta);
140 
141 
142  if (polarR*cosPolarTheta<m_upperSide1 &&
143  polarR*cosPolarTheta>m_lowerSide1)
144  conditionEtaOne=true;
145  if (polarR*cosPolarTheta<m_upperSide2 &&
146  polarR*cosPolarTheta>m_lowerSide2)
147  conditionEtaTwo=true;
148  if (polarTheta<m_rightSide &&
149  polarTheta>m_leftSide) conditionTheta=true;
150  return (conditionEtaOne || conditionEtaTwo) && conditionTheta;
151 }

◆ inActiveArea() [2/2]

bool InDetDD::SCT_ForwardModuleSideGeometry::inActiveArea ( const SiLocalPosition chargePosition,
bool  checkBondGap = true 
) const

check if position is in active area

Definition at line 110 of file SCT_ForwardModuleSideGeometry.cxx.

112 {
113  double xEta = chargePos.xEta();
114  double xPhi = chargePos.xPhi();
115 
116  if (std::abs(xEta) > m_halfLength) return false;
117 
118  if (checkBondGap && m_nCrystals > 1) {
119  // Check if in bond gap
120  if (xEta > m_deadRegionLower && xEta < m_deadRegionUpper) return false;
121  }
122 
123  // edge at xEta
124  double edge = (xEta + m_radius) * m_tangent;
125 
126  return (std::abs(xPhi) < edge);
127 }

◆ length()

double InDetDD::SCT_ForwardModuleSideGeometry::length ( ) const

Method to calculate length of a module.

Definition at line 175 of file SCT_ForwardModuleSideGeometry.cxx.

176 {
177  return 2 * m_halfLength;
178 }

◆ maxWidth()

double InDetDD::SCT_ForwardModuleSideGeometry::maxWidth ( ) const

Method to calculate maximum width of a module.

Definition at line 193 of file SCT_ForwardModuleSideGeometry.cxx.

194 {
195  if (m_nCrystals==1) {
196  return 2 * m_upperSide1 * m_tangent;
197  }
198  else {
199  return 2 * m_upperSide2 * m_tangent;
200  }
201 }

◆ minWidth()

double InDetDD::SCT_ForwardModuleSideGeometry::minWidth ( ) const

Method to calculate minimum width of a module.

Definition at line 187 of file SCT_ForwardModuleSideGeometry.cxx.

188 {
189  return 2 * m_lowerSide1 * m_tangent;
190 }

◆ nCrystals()

int InDetDD::SCT_ForwardModuleSideGeometry::nCrystals ( ) const
inline

number of crystals per module side

Definition at line 201 of file SCT_ForwardModuleSideGeometry.h.

202 {
203  return m_nCrystals;
204 }

◆ nearBondGap()

bool InDetDD::SCT_ForwardModuleSideGeometry::nearBondGap ( const SiLocalPosition localPosition,
double  etaTol 
) const

Test if near bond gap within tolerances.

Definition at line 99 of file SCT_ForwardModuleSideGeometry.cxx.

100 {
101  if (m_nCrystals == 1) return false; // No bond gap (eg for truncated middle detectors)
102 
103  return ((localPosition.xEta() < m_deadRegionUpper + etaTol ) &&
104  (localPosition.xEta() > m_deadRegionLower - etaTol));
105 
106 }

◆ radius()

double InDetDD::SCT_ForwardModuleSideGeometry::radius ( ) const
inline

Nominal center radius of double wafer.

Definition at line 166 of file SCT_ForwardModuleSideGeometry.h.

167 {
168  return m_radius;
169 }

◆ radius1()

double InDetDD::SCT_ForwardModuleSideGeometry::radius1 ( ) const
inline

r from inner crystal center to beam:

Definition at line 161 of file SCT_ForwardModuleSideGeometry.h.

162 {
163  return m_radius1;
164 }

◆ radius2()

double InDetDD::SCT_ForwardModuleSideGeometry::radius2 ( ) const
inline

r from outer crystal (if present) center to beam:

Definition at line 176 of file SCT_ForwardModuleSideGeometry.h.

177 {
178  return m_radius2;
179 }

◆ scaledDistanceToNearestDiode()

double InDetDD::SCT_ForwardModuleSideGeometry::scaledDistanceToNearestDiode ( const SCT_ForwardPolarPosition polarPos) const

give distance to the nearest diode in units of pitch, from 0.0 to 0.5, this method should be fast as it is called for every surface charge in the SCT_SurfaceChargesGenerator

Definition at line 163 of file SCT_ForwardModuleSideGeometry.cxx.

164 {
165  int stripIndex;
166  if (polarPos.theta()>0) stripIndex =
167  static_cast<int>(polarPos.theta()/m_step);
168  else stripIndex = static_cast<int>(polarPos.theta()/m_step-1);
169  const double thetaStrip = (stripIndex+0.5)*m_step;
170  const double pitch = 2.0*polarPos.r()*std::abs(sin(m_step*0.5));
171  return polarPos.r()*std::abs(sin(polarPos.theta()-thetaStrip))/pitch;
172 }

◆ step()

double InDetDD::SCT_ForwardModuleSideGeometry::step ( ) const
inline

strip step in angle (same for both crystals):

Definition at line 191 of file SCT_ForwardModuleSideGeometry.h.

192 {
193  return m_step;
194 }

◆ stripPitch()

double InDetDD::SCT_ForwardModuleSideGeometry::stripPitch ( const SCT_ForwardPolarPosition polarPos) const

give the strip pitch (dependence on position needed for forward)

Definition at line 154 of file SCT_ForwardModuleSideGeometry.cxx.

156 {
157  return 2.0*polarPos.r()*std::abs(sin(m_step*0.5));
158 }

◆ strips()

int InDetDD::SCT_ForwardModuleSideGeometry::strips ( ) const
inline

number of strips (same for both crystals):

Definition at line 186 of file SCT_ForwardModuleSideGeometry.h.

187 {
188  return m_strips;
189 }

◆ width()

double InDetDD::SCT_ForwardModuleSideGeometry::width ( ) const

Method to calculate average width of a module.

Definition at line 181 of file SCT_ForwardModuleSideGeometry.cxx.

182 {
183  return 2 * m_radius * m_tangent;
184 }

Member Data Documentation

◆ m_deadRegionLower

double InDetDD::SCT_ForwardModuleSideGeometry::m_deadRegionLower
private

relative to center of detector.

Definition at line 152 of file SCT_ForwardModuleSideGeometry.h.

◆ m_deadRegionUpper

double InDetDD::SCT_ForwardModuleSideGeometry::m_deadRegionUpper
private

relative to center of detector.

Definition at line 151 of file SCT_ForwardModuleSideGeometry.h.

◆ m_halfHeight1

double InDetDD::SCT_ForwardModuleSideGeometry::m_halfHeight1
private

inner crystal half height

Definition at line 137 of file SCT_ForwardModuleSideGeometry.h.

◆ m_halfHeight2

double InDetDD::SCT_ForwardModuleSideGeometry::m_halfHeight2
private

outer crystal (if present) half height

Definition at line 139 of file SCT_ForwardModuleSideGeometry.h.

◆ m_halfLength

double InDetDD::SCT_ForwardModuleSideGeometry::m_halfLength
private

top = +halfLength, bot = -halfLength

Definition at line 150 of file SCT_ForwardModuleSideGeometry.h.

◆ m_leftSide

double InDetDD::SCT_ForwardModuleSideGeometry::m_leftSide
private

left border of module in angle

Definition at line 143 of file SCT_ForwardModuleSideGeometry.h.

◆ m_lowerSide1

double InDetDD::SCT_ForwardModuleSideGeometry::m_lowerSide1
private

lower side of crystal 1

Definition at line 146 of file SCT_ForwardModuleSideGeometry.h.

◆ m_lowerSide2

double InDetDD::SCT_ForwardModuleSideGeometry::m_lowerSide2
private

lower side of crystal 2

Definition at line 148 of file SCT_ForwardModuleSideGeometry.h.

◆ m_nCrystals

int InDetDD::SCT_ForwardModuleSideGeometry::m_nCrystals
private

number of crystals per module side

Definition at line 142 of file SCT_ForwardModuleSideGeometry.h.

◆ m_radius

double InDetDD::SCT_ForwardModuleSideGeometry::m_radius
private

r from nominal element center to beam

Definition at line 135 of file SCT_ForwardModuleSideGeometry.h.

◆ m_radius1

double InDetDD::SCT_ForwardModuleSideGeometry::m_radius1
private

r from inner crystal center to beam

Definition at line 136 of file SCT_ForwardModuleSideGeometry.h.

◆ m_radius2

double InDetDD::SCT_ForwardModuleSideGeometry::m_radius2
private

r from outer crystal (if present) center to beam

Definition at line 138 of file SCT_ForwardModuleSideGeometry.h.

◆ m_rightSide

double InDetDD::SCT_ForwardModuleSideGeometry::m_rightSide
private

right border of module in angle

Definition at line 144 of file SCT_ForwardModuleSideGeometry.h.

◆ m_step

double InDetDD::SCT_ForwardModuleSideGeometry::m_step
private

strip step in angle (same for both crystals)

Definition at line 141 of file SCT_ForwardModuleSideGeometry.h.

◆ m_strips

int InDetDD::SCT_ForwardModuleSideGeometry::m_strips
private

number of strips (same for both crystals)

Definition at line 140 of file SCT_ForwardModuleSideGeometry.h.

◆ m_tangent

double InDetDD::SCT_ForwardModuleSideGeometry::m_tangent
private

tan(theta) at edge = (halfWidth) / (radius)

Definition at line 153 of file SCT_ForwardModuleSideGeometry.h.

◆ m_upperSide1

double InDetDD::SCT_ForwardModuleSideGeometry::m_upperSide1
private

upper side of crystal 1

Definition at line 145 of file SCT_ForwardModuleSideGeometry.h.

◆ m_upperSide2

double InDetDD::SCT_ForwardModuleSideGeometry::m_upperSide2
private

upper side of crystal 2

Definition at line 147 of file SCT_ForwardModuleSideGeometry.h.


The documentation for this class was generated from the following files:
InDetDD::SCT_ForwardModuleSideGeometry::m_halfHeight2
double m_halfHeight2
outer crystal (if present) half height
Definition: SCT_ForwardModuleSideGeometry.h:139
InDetDD::SCT_ForwardModuleSideGeometry::m_upperSide1
double m_upperSide1
upper side of crystal 1
Definition: SCT_ForwardModuleSideGeometry.h:145
InDetDD::SCT_ForwardModuleSideGeometry::m_leftSide
double m_leftSide
left border of module in angle
Definition: SCT_ForwardModuleSideGeometry.h:143
InDetDD::SCT_ForwardModuleSideGeometry::m_halfLength
double m_halfLength
top = +halfLength, bot = -halfLength
Definition: SCT_ForwardModuleSideGeometry.h:150
InDetDD::SCT_ForwardModuleSideGeometry::halfHeight1
double halfHeight1() const
inner crystal half height:
Definition: SCT_ForwardModuleSideGeometry.h:171
InDetDD::SCT_ForwardModuleSideGeometry::radius2
double radius2() const
r from outer crystal (if present) center to beam:
Definition: SCT_ForwardModuleSideGeometry.h:176
InDetDD::SCT_ForwardModuleSideGeometry::m_strips
int m_strips
number of strips (same for both crystals)
Definition: SCT_ForwardModuleSideGeometry.h:140
InDetDD::SCT_ForwardModuleSideGeometry::radius1
double radius1() const
r from inner crystal center to beam:
Definition: SCT_ForwardModuleSideGeometry.h:161
InDetDD::SCT_ForwardModuleSideGeometry::nCrystals
int nCrystals() const
number of crystals per module side
Definition: SCT_ForwardModuleSideGeometry.h:201
InDetDD::SCT_ForwardModuleSideGeometry::m_deadRegionLower
double m_deadRegionLower
relative to center of detector.
Definition: SCT_ForwardModuleSideGeometry.h:152
InDetDD::SCT_ForwardModuleSideGeometry::m_radius
double m_radius
r from nominal element center to beam
Definition: SCT_ForwardModuleSideGeometry.h:135
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
InDetDD::SCT_ForwardModuleSideGeometry::m_halfHeight1
double m_halfHeight1
inner crystal half height
Definition: SCT_ForwardModuleSideGeometry.h:137
InDetDD::SCT_ForwardModuleSideGeometry::strips
int strips() const
number of strips (same for both crystals):
Definition: SCT_ForwardModuleSideGeometry.h:186
InDetDD::SCT_ForwardModuleSideGeometry::m_upperSide2
double m_upperSide2
upper side of crystal 2
Definition: SCT_ForwardModuleSideGeometry.h:147
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
InDetDD::SCT_ForwardModuleSideGeometry::halfHeight2
double halfHeight2() const
outer crystal (if present) half height:
Definition: SCT_ForwardModuleSideGeometry.h:181
InDetDD::SCT_ForwardModuleSideGeometry::m_lowerSide1
double m_lowerSide1
lower side of crystal 1
Definition: SCT_ForwardModuleSideGeometry.h:146
InDetDD::SCT_ForwardModuleSideGeometry::m_radius1
double m_radius1
r from inner crystal center to beam
Definition: SCT_ForwardModuleSideGeometry.h:136
InDetDD::SCT_ForwardModuleSideGeometry::m_deadRegionUpper
double m_deadRegionUpper
relative to center of detector.
Definition: SCT_ForwardModuleSideGeometry.h:151
InDetDD::SCT_ForwardModuleSideGeometry::step
double step() const
strip step in angle (same for both crystals):
Definition: SCT_ForwardModuleSideGeometry.h:191
InDetDD::SCT_ForwardModuleSideGeometry::m_nCrystals
int m_nCrystals
number of crystals per module side
Definition: SCT_ForwardModuleSideGeometry.h:142
InDetDD::SCT_ForwardModuleSideGeometry::m_step
double m_step
strip step in angle (same for both crystals)
Definition: SCT_ForwardModuleSideGeometry.h:141
InDetDD::SCT_ForwardModuleSideGeometry::m_tangent
double m_tangent
tan(theta) at edge = (halfWidth) / (radius)
Definition: SCT_ForwardModuleSideGeometry.h:153
InDetDD::SCT_ForwardModuleSideGeometry::m_lowerSide2
double m_lowerSide2
lower side of crystal 2
Definition: SCT_ForwardModuleSideGeometry.h:148
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
InDetDD::SCT_ForwardModuleSideGeometry::m_rightSide
double m_rightSide
right border of module in angle
Definition: SCT_ForwardModuleSideGeometry.h:144
InDetDD::SCT_ForwardModuleSideGeometry::m_radius2
double m_radius2
r from outer crystal (if present) center to beam
Definition: SCT_ForwardModuleSideGeometry.h:138