ATLAS Offline Software
Classes | Public Member Functions | Private Attributes | List of all members
InDet::SiDetElementLink_xk Class Reference

#include <SiDetElementLink_xk.h>

Collaboration diagram for InDet::SiDetElementLink_xk:

Classes

class  ElementWay
 

Public Member Functions

 SiDetElementLink_xk ()=default
 
 SiDetElementLink_xk (const InDetDD::SiDetectorElement *, const double *, bool isITk=false)
 
 SiDetElementLink_xk (const SiDetElementLink_xk &)=default
 
SiDetElementLink_xkoperator= (const SiDetElementLink_xk &)=default
 
 SiDetElementLink_xk (SiDetElementLink_xk &&)=default
 
SiDetElementLink_xkoperator= (SiDetElementLink_xk &&)=default
 
 ~SiDetElementLink_xk ()=default
 
void set (const double *, bool isITk=false)
 
const InDetDD::SiDetectorElementdetElement () const
 
float phi () const
 
float z () const
 
float dz () const
 
void intersect (const float *, const float *, float *) const
 
bool intersectITk (const float *, const float *, float &) const
 

Private Attributes

const InDetDD::SiDetectorElementm_detelement = nullptr
 
float m_phi = 0
 
float m_z = 0
 
float m_dz = 0
 
float m_geo [6] = {}
 
float m_center [2] = {}
 
float m_bound [4][3] = {}
 

Detailed Description

Definition at line 24 of file SiDetElementLink_xk.h.

Constructor & Destructor Documentation

◆ SiDetElementLink_xk() [1/4]

InDet::SiDetElementLink_xk::SiDetElementLink_xk ( )
default

◆ SiDetElementLink_xk() [2/4]

InDet::SiDetElementLink_xk::SiDetElementLink_xk ( const InDetDD::SiDetectorElement el,
const double *  P,
bool  isITk = false 
)
inline

Definition at line 80 of file SiDetElementLink_xk.h.

81  {
82  m_detelement = el;
83  set(P, isITk);
84 }

◆ SiDetElementLink_xk() [3/4]

InDet::SiDetElementLink_xk::SiDetElementLink_xk ( const SiDetElementLink_xk )
default

◆ SiDetElementLink_xk() [4/4]

InDet::SiDetElementLink_xk::SiDetElementLink_xk ( SiDetElementLink_xk &&  )
default

◆ ~SiDetElementLink_xk()

InDet::SiDetElementLink_xk::~SiDetElementLink_xk ( )
default

Member Function Documentation

◆ detElement()

const InDetDD::SiDetectorElement* InDet::SiDetElementLink_xk::detElement ( ) const
inline

Definition at line 59 of file SiDetElementLink_xk.h.

59 { return m_detelement; }

◆ dz()

float InDet::SiDetElementLink_xk::dz ( ) const
inline

Definition at line 62 of file SiDetElementLink_xk.h.

62 { return m_dz; }

◆ intersect()

void InDet::SiDetElementLink_xk::intersect ( const float *  r,
const float *  a,
float *  O 
) const

Definition at line 67 of file SiDetElementLink_xk.cxx.

69 {
70  const float* g = &m_geo[0];
71  float s[3] = {g[3]*g[4],g[2]*g[4],g[5]} ;
72  float S = a[0]*s[0]+a[1]*s[1]+a[2]*s[2] ;
73  if(S!=0.) S = (g[0]-(r[0]*s[0]+r[1]*s[1]+r[2]*s[2]))/S ;
74  float rn[3] = {r[0]+S*a[0],r[1]+S*a[1],r[2]+S*a[2]} ;
75  float d0 = rn[1]*g[3]-rn[0]*g[2] -m_center[0];
76  float d1 = g[5]*(rn[0]*g[3]+rn[1]*g[2])-g[4]*rn[2]-m_center[1];
77  O[0] = m_bound[0][0]*d0+m_bound[0][1]*d1-m_bound[0][2] ;
78  float daz = m_bound[2][0]*d0+m_bound[2][1]*d1-m_bound[2][2] ;
79  O[1] = m_bound[1][0]*d0+m_bound[1][1]*d1-m_bound[1][2] ;
80  float drz = m_bound[3][0]*d0+m_bound[3][1]*d1-m_bound[3][2] ;
81  if(O[0] < daz) O[0] = daz;
82  if(O[1] < drz) O[1] = drz;
83  O[2] = S;
84 }

◆ intersectITk()

bool InDet::SiDetElementLink_xk::intersectITk ( const float *  r,
const float *  a,
float &  Step 
) const

Definition at line 94 of file SiDetElementLink_xk.cxx.

96 {
97  const float* g = &m_geo[0];
98 
99  float S = a[0]*g[6]+a[1]*g[7]+a[2]*g[5] ;
100  if(S!=0.) S = (g[0]-(r[0]*g[6]+r[1]*g[7]+r[2]*g[5]))/S ;
101  float r0 = r[0]+S*a[0] ;
102  float r1 = r[1]+S*a[1] ;
103  float r2 = r[2]+S*a[2] ;
104  float d0 = r1*g[3]-r0*g[2] -g[8] ;
105  float d1 = g[5]*(r0*g[3]+r1*g[2])-(g[4]*r2+g[9]);
106 
107  if((m_bound[1][0]*d0+m_bound[1][1]*d1) > m_bound[1][2] ||
108  (m_bound[3][0]*d0+m_bound[3][1]*d1) > m_bound[3][2] ||
109  (m_bound[0][0]*d0+m_bound[0][1]*d1) > m_bound[0][2] ||
110  (m_bound[2][0]*d0+m_bound[2][1]*d1) > m_bound[2][2]) return false;
111  Step = S+r[5];
112  return true;
113 }

◆ operator=() [1/2]

SiDetElementLink_xk& InDet::SiDetElementLink_xk::operator= ( const SiDetElementLink_xk )
default

◆ operator=() [2/2]

SiDetElementLink_xk& InDet::SiDetElementLink_xk::operator= ( SiDetElementLink_xk &&  )
default

◆ phi()

float InDet::SiDetElementLink_xk::phi ( ) const
inline

Definition at line 60 of file SiDetElementLink_xk.h.

60 { return m_phi; }

◆ set()

void InDet::SiDetElementLink_xk::set ( const double *  P,
bool  isITk = false 
)

Definition at line 24 of file SiDetElementLink_xk.cxx.

25 {
26  m_z = float(P[ 1]) ; // Z
27  m_dz = float(std::abs(P[12]-P[11])*.5) ; // dZ
28  m_phi = float(P[ 2]) ; // azimuthal angle
29  m_geo [0] = float(P[ 3]) ; // min. distance
30  m_geo [1] = float(P[ 4]) ; // phi
31  m_geo [2] = float(P[ 5]) ; // sin(phi)
32  m_geo [3] = float(P[ 6]) ; // cos(phi)
33  m_geo [4] = float(P[ 7]) ; // sin(polar)
34  m_geo [5] = float(P[ 8]) ; // cos(polar)
35  m_center[0] = float(P[18]) ; //
36  m_center[1] = float(P[19]) ; //
37  m_bound [0][2] = float(sqrt(P[20]*P[20]+P[21]*P[21])); // -F
38  m_bound [0][0] = float(P[20]/double(m_bound[0][2])) ; //
39  m_bound [0][1] = float(P[21]/double(m_bound[0][2])) ; //
40  m_bound [1][2] = float(sqrt(P[22]*P[22]+P[23]*P[23])); // +ZR
41  m_bound [1][0] = float(P[22]/double(m_bound[1][2])) ; //
42  m_bound [1][1] = float(P[23]/double(m_bound[1][2])) ; //
43  m_bound [2][2] = float(sqrt(P[24]*P[24]+P[25]*P[25])); // +F
44  m_bound [2][0] = float(P[24]/double(m_bound[2][2])) ; //
45  m_bound [2][1] = float(P[25]/double(m_bound[2][2])) ; //
46  m_bound [3][2] = float(sqrt(P[26]*P[26]+P[27]*P[27])); // -ZR
47  m_bound [3][0] = float(P[26]/double(m_bound[3][2])) ; //
48  m_bound [3][1] = float(P[27]/double(m_bound[3][2])) ; //
49  if (isITk) {
50  m_bound [0][2]+=P[40];
51  m_bound [1][2]+=P[40];
52  m_bound [2][2]+=P[40];
53  m_bound [3][2]+=P[40];
54  }
55 }

◆ z()

float InDet::SiDetElementLink_xk::z ( ) const
inline

Definition at line 61 of file SiDetElementLink_xk.h.

61 { return m_z; }

Member Data Documentation

◆ m_bound

float InDet::SiDetElementLink_xk::m_bound[4][3] = {}
private

Definition at line 73 of file SiDetElementLink_xk.h.

◆ m_center

float InDet::SiDetElementLink_xk::m_center[2] = {}
private

Definition at line 72 of file SiDetElementLink_xk.h.

◆ m_detelement

const InDetDD::SiDetectorElement* InDet::SiDetElementLink_xk::m_detelement = nullptr
private

Definition at line 67 of file SiDetElementLink_xk.h.

◆ m_dz

float InDet::SiDetElementLink_xk::m_dz = 0
private

Definition at line 70 of file SiDetElementLink_xk.h.

◆ m_geo

float InDet::SiDetElementLink_xk::m_geo[6] = {}
private

Definition at line 71 of file SiDetElementLink_xk.h.

◆ m_phi

float InDet::SiDetElementLink_xk::m_phi = 0
private

Definition at line 68 of file SiDetElementLink_xk.h.

◆ m_z

float InDet::SiDetElementLink_xk::m_z = 0
private

Definition at line 69 of file SiDetElementLink_xk.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
DMTest::P
P_v1 P
Definition: P.h:23
dq_defect_virtual_defect_validation.d1
d1
Definition: dq_defect_virtual_defect_validation.py:79
MCP::ScaleSmearParam::r2
@ r2
JetTiledMap::S
@ S
Definition: TiledEtaPhiMap.h:44
lwtDev::Component::O
@ O
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
TRT_PAI_physicsConstants::r0
const double r0
electron radius{cm}
Definition: TRT_PAI_physicsConstants.h:20
python.BunchSpacingUtils.rn
rn
Definition: BunchSpacingUtils.py:87
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
python.Dumpers.daz
def daz(f)
Definition: Dumpers.py:149
a
TList * a
Definition: liststreamerinfos.cxx:10
MCP::ScaleSmearParam::r1
@ r1
readCCLHist.float
float
Definition: readCCLHist.py:83