ATLAS Offline Software
Loading...
Searching...
No Matches
ITk::SiSpacePointsProSeed Class Referencefinal

#include <ITkSiSpacePointsProSeed.h>

Collaboration diagram for ITk::SiSpacePointsProSeed:

Public Member Functions

 SiSpacePointsProSeed ()
 SiSpacePointsProSeed (SiSpacePointForSeed *&, SiSpacePointForSeed *&, SiSpacePointForSeed *&, float)
 SiSpacePointsProSeed (const SiSpacePointsProSeed &)
SiSpacePointsProSeedoperator= (const SiSpacePointsProSeed &)
 SiSpacePointsProSeed (SiSpacePointsProSeed &&)=default
SiSpacePointsProSeedoperator= (SiSpacePointsProSeed &&)=default
 ~SiSpacePointsProSeed ()=default
SiSpacePointForSeedspacepoint0 ()
SiSpacePointForSeedspacepoint1 ()
SiSpacePointForSeedspacepoint2 ()
const float & z () const
const float & quality () const
void set (SiSpacePointForSeed *&, SiSpacePointForSeed *&, SiSpacePointForSeed *&, float)
bool setQuality (float)
bool set3 (InDet::SiSpacePointsSeed &, float pTPerHelixRadius)
void set2 (InDet::SiSpacePointsSeed &)

Private Member Functions

void estimateParameters (float pTPerHelixRadius)

Private Attributes

SiSpacePointForSeedm_s0 {}
SiSpacePointForSeedm_s1 {}
SiSpacePointForSeedm_s2 {}
float m_z {}
float m_q {}

Detailed Description

Definition at line 28 of file ITkSiSpacePointsProSeed.h.

Constructor & Destructor Documentation

◆ SiSpacePointsProSeed() [1/4]

ITk::SiSpacePointsProSeed::SiSpacePointsProSeed ( )

Definition at line 15 of file ITkSiSpacePointsProSeed.cxx.

16 {
17 m_s0 = nullptr ;
18 m_s1 = nullptr ;
19 m_s2 = nullptr ;
20 m_z = 0.;
21 m_q = 0.;
22 }

◆ SiSpacePointsProSeed() [2/4]

ITk::SiSpacePointsProSeed::SiSpacePointsProSeed ( SiSpacePointForSeed *& s0,
SiSpacePointForSeed *& s1,
SiSpacePointForSeed *& s2,
float z )

Definition at line 38 of file ITkSiSpacePointsProSeed.cxx.

40 {
41 set(s0,s1,s2,z); m_q = 0.;
42 }
static Double_t s0
void set(SiSpacePointForSeed *&, SiSpacePointForSeed *&, SiSpacePointForSeed *&, float)

◆ SiSpacePointsProSeed() [3/4]

ITk::SiSpacePointsProSeed::SiSpacePointsProSeed ( const SiSpacePointsProSeed & sp)

Definition at line 48 of file ITkSiSpacePointsProSeed.cxx.

48 : m_s0(sp.m_s0),m_s1(sp.m_s1),m_s2(sp.m_s2)
49 {
50 *this = sp;
51 }
static Double_t sp

◆ SiSpacePointsProSeed() [4/4]

ITk::SiSpacePointsProSeed::SiSpacePointsProSeed ( SiSpacePointsProSeed && )
default

◆ ~SiSpacePointsProSeed()

ITk::SiSpacePointsProSeed::~SiSpacePointsProSeed ( )
default

Member Function Documentation

◆ estimateParameters()

void ITk::SiSpacePointsProSeed::estimateParameters ( float pTPerHelixRadius)
private

Definition at line 123 of file ITkSiSpacePointsProSeed.cxx.

124 {
125
126 ITk::SiSpacePointForSeed& bottom = *m_s0;
127 ITk::SiSpacePointForSeed& medium = *m_s1;
128 ITk::SiSpacePointForSeed& top = *m_s2;
129
130 bool isPixel = !m_s2->spacepoint->clusterList().second;
131
132 auto extractCoordinates =
133 [] (const ITk::SiSpacePointForSeed& sp) -> std::array<float,4>
134 {
135 std::array<float, 4> coordinates {sp.x(), sp.y(), sp.z(), sp.radius()};
136 return coordinates;
137 };
138
139 auto extractQuantities =
140 [] (const std::array<float, 4>& sp,
141 const std::array<float, 4>& spM,
142 bool isBottom) -> std::array<float, 5>
143 {
144 const auto& [xM, yM, zM, rM] = spM;
145 const auto& [xO, yO, zO, rO] = sp;
146
147 float cosPhiM = xM / rM;
148 float sinPhiM = yM / rM;
149 float deltaX = xO - xM;
150 float deltaY = yO - yM;
151 float deltaZ = zO - zM;
152 float x = deltaX * cosPhiM + deltaY * sinPhiM;
153 float y = deltaY * cosPhiM - deltaX * sinPhiM;
154 float iDeltaR2 = 1. / (deltaX * deltaX + deltaY * deltaY);
155 float iDeltaR = std::sqrt(iDeltaR2);
156 int bottomFactor = 1 * (int(not isBottom)) - 1 * (int(isBottom));
157 float cot_theta = deltaZ * iDeltaR * bottomFactor;
158
159 // cotTheta, Zo, iDeltaR, U, V
160 std::array<float, 5> params =
161 {
162 cot_theta,
163 zM - rM * cot_theta,
164 iDeltaR,
165 x * iDeltaR2,
166 y * iDeltaR2
167 };
168
169 return params;
170 };
171
172 auto coo_b = extractCoordinates(bottom);
173 auto coo_m = extractCoordinates(medium);
174 auto coo_t = extractCoordinates(top);
175
176 // Compute the variables we need
177 auto [cotThetaB, Zob, iDeltaRB, Ub, Vb] = extractQuantities(coo_b, coo_m, true);
178 auto [cotThetaT, Zot, iDeltaRT, Ut, Vt] = extractQuantities(coo_t, coo_m, false);
179
180 float squarediDeltaR2B = iDeltaRB*iDeltaRB;
181 float squarediDeltaR2T = iDeltaRB*iDeltaRT;
182 float squarediDeltaR = std::min(squarediDeltaR2B, squarediDeltaR2T);
183
184 auto& [xB, yB, zB, rB] = coo_b;
185 auto& [xM, yM, zM, rM] = coo_m;
186 auto& [xT, yT, zT, rT] = coo_t;
187
188 float ax = xM / rM;
189 float ay = yM/ rM;
190
191 float dxb = xM - xB;
192 float dyb = yM - yB;
193 float dzb = zM - zB;
194 float xb = dxb * ax + dyb *ay;
195 float yb = dyb * ax - dxb * ay;
196 float dxyb = xb * xb + yb * yb;
197 float drb = std::sqrt( xb*xb + yb*yb + dzb*dzb );
198
199 float dxt = xT - xM;
200 float dyt = yT - yM;
201 float dzt = zT - zM;
202 float xt = dxt * ax + dyt *ay;
203 float yt = dyt * ax - dxt * ay;
204 float dxyt = xt * xt + yt * yt;
205 float drt = std::sqrt( xt*xt + yt*yt + dzt*dzt );
206
207 float tzb = dzb * std::sqrt( 1.f/dxyb );
208 float tzt = dzt * std::sqrt( 1.f/dxyt );
209
210 float sTzb2 = std::sqrt(1.f + tzb*tzb);
211
212 float dU = Ut - Ub;
213 if (dU == 0.) {
214 return;
215 }
216
217 float A = (Vt - Vb) / dU;
218 float S2 = 1.f + A * A;
219 float B = Vb - A * Ub;
220 if (B==0)
221 return;
222 float B2 = B * B;
223
224 // dzdr
225 float dzdr_b = (zM - zB) / (rM - rB);
226 float dzdr_t = (zT - zM) / (rT - rM);
227
228 // eta
229 float meanOneOverTanThetaSquare = isPixel ? (cotThetaB * cotThetaT) :
230 std::pow((cotThetaB + cotThetaT) / 2.f,2);
231 if (meanOneOverTanThetaSquare <= 0) {
232 return;
233 }
234 float theta = std::atan(1.f / std::sqrt(meanOneOverTanThetaSquare)); // [0, pi/2)
235 if (top.z()<0) {theta = -theta;} // (-pi/2, pi/2)
236 if (theta < 0.) {theta = theta + M_PI;} // [0, pi)
237 float eta = -std::log(std::tan(0.5f * theta));
238
239 // pt
240 float pt = pTPerHelixRadius*std::sqrt(S2 / B2);
241
242 // d0
243 float d0 = std::abs((A - B * rM) * rM);
244
245 // Attach variables to SPs
246 top.setDR(drt);
247 top.setDZDR(dzdr_t);
248 top.setScorePenalty( std::abs((tzb - tzt) / (squarediDeltaR * sTzb2)) );
249 top.setParam(d0);
250 top.setEta(eta);
251 top.setPt(pt);
252
253 bottom.setDR(drb);
254 bottom.setDZDR(dzdr_b);
255
256 }
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar theta() const
theta method
bool isBottom(const T &p)
Definition AtlasPID.h:182
struct TBPatternUnitContext S2
@ top
#define y
#define xt
#define yt
#define x
constexpr int pow(int base, int exp) noexcept

◆ operator=() [1/2]

SiSpacePointsProSeed & ITk::SiSpacePointsProSeed::operator= ( const SiSpacePointsProSeed & sp)

Definition at line 24 of file ITkSiSpacePointsProSeed.cxx.

26 {
27 if(&sp!=this) {
28
29 m_z = sp.m_z ;
30 m_q = sp.m_q ;
31 m_s0 = sp.m_s0;
32 m_s1 = sp.m_s1;
33 m_s2 = sp.m_s2;
34 }
35 return(*this);
36 }

◆ operator=() [2/2]

SiSpacePointsProSeed & ITk::SiSpacePointsProSeed::operator= ( SiSpacePointsProSeed && )
default

◆ quality()

const float & ITk::SiSpacePointsProSeed::quality ( ) const
inline

Definition at line 49 of file ITkSiSpacePointsProSeed.h.

49{return m_q ;}

◆ set()

void ITk::SiSpacePointsProSeed::set ( SiSpacePointForSeed *& s0,
SiSpacePointForSeed *& s1,
SiSpacePointForSeed *& s2,
float z )

◆ set2()

void ITk::SiSpacePointsProSeed::set2 ( InDet::SiSpacePointsSeed & s)

Definition at line 71 of file ITkSiSpacePointsProSeed.cxx.

72 {
73 s.erase();
74 s.add(m_s0->spacepoint);
75 s.add(m_s1->spacepoint);
76 s.setZVertex(double(m_z));
77 }

◆ set3()

bool ITk::SiSpacePointsProSeed::set3 ( InDet::SiSpacePointsSeed & s,
float pTPerHelixRadius )

Definition at line 83 of file ITkSiSpacePointsProSeed.cxx.

84 {
85 bool pixt = !m_s2->spacepoint->clusterList().second;
86
87 if(pixt) {
88 if(m_q > m_s0->quality() && m_q > m_s1->quality() && m_q > m_s2->quality()) return false;
89 }
90
91 m_s0->setQuality(m_q);
92 m_s1->setQuality(m_q);
93 m_s2->setQuality(m_q);
94
95 s.erase();
96 s.add(m_s0->spacepoint);
97 s.add(m_s1->spacepoint);
98 s.add(m_s2->spacepoint);
99 s.setZVertex(double(m_z));
100 s.setX1(m_s0->x());
101 s.setX2(m_s1->x());
102 s.setX3(m_s2->x());
103 s.setY1(m_s0->y());
104 s.setY2(m_s1->y());
105 s.setY3(m_s2->y());
106 s.setZ1(m_s0->z());
107 s.setZ2(m_s1->z());
108 s.setZ3(m_s2->z());
109 s.setR1(m_s0->radius());
110 s.setR2(m_s1->radius());
111 s.setR3(m_s2->radius());
112
113 estimateParameters(pTPerHelixRadius);
114 s.setD0(m_s2->param());
115 s.setEta(m_s2->eta());
116 s.setDZDR_B(m_s0->dzdr());
117 s.setDZDR_T(m_s2->dzdr());
118 s.setPt(m_s2->pt());
119
120 return true;
121 }
void estimateParameters(float pTPerHelixRadius)

◆ setQuality()

bool ITk::SiSpacePointsProSeed::setQuality ( float q)

Definition at line 262 of file ITkSiSpacePointsProSeed.cxx.

263 {
264 m_q = q;
265
266 if(!m_s2->spacepoint->clusterList().second) {
267 if(q > m_s0->quality() && q > m_s1->quality() && q > m_s2->quality()) return false;
268 }
269 m_s0->setQuality(m_q);
270 m_s1->setQuality(m_q);
271 m_s2->setQuality(m_q);
272 return true;
273 }

◆ spacepoint0()

SiSpacePointForSeed * ITk::SiSpacePointsProSeed::spacepoint0 ( )
inline

Definition at line 45 of file ITkSiSpacePointsProSeed.h.

45{return m_s0;}

◆ spacepoint1()

SiSpacePointForSeed * ITk::SiSpacePointsProSeed::spacepoint1 ( )
inline

Definition at line 46 of file ITkSiSpacePointsProSeed.h.

46{return m_s1;}

◆ spacepoint2()

SiSpacePointForSeed * ITk::SiSpacePointsProSeed::spacepoint2 ( )
inline

Definition at line 47 of file ITkSiSpacePointsProSeed.h.

47{return m_s2;}

◆ z()

const float & ITk::SiSpacePointsProSeed::z ( ) const
inline

Definition at line 48 of file ITkSiSpacePointsProSeed.h.

48{return m_z ;}

Member Data Documentation

◆ m_q

float ITk::SiSpacePointsProSeed::m_q {}
private

Definition at line 63 of file ITkSiSpacePointsProSeed.h.

63{} ;

◆ m_s0

SiSpacePointForSeed* ITk::SiSpacePointsProSeed::m_s0 {}
private

Definition at line 59 of file ITkSiSpacePointsProSeed.h.

59{};

◆ m_s1

SiSpacePointForSeed* ITk::SiSpacePointsProSeed::m_s1 {}
private

Definition at line 60 of file ITkSiSpacePointsProSeed.h.

60{};

◆ m_s2

SiSpacePointForSeed* ITk::SiSpacePointsProSeed::m_s2 {}
private

Definition at line 61 of file ITkSiSpacePointsProSeed.h.

61{};

◆ m_z

float ITk::SiSpacePointsProSeed::m_z {}
private

Definition at line 62 of file ITkSiSpacePointsProSeed.h.

62{} ;

The documentation for this class was generated from the following files: