28(
double r,
double dr,
double z,
double dz,
double df,
double wf,
double wz)
58 std::vector<std::pair<const InDet::TRT_DetElementLink_xk*, float> >& lDE,
59 std::vector<InDet::TRT_DetElementLink_xk::Used_t> &
used)
const
65 float a = (
A[0]*
P[0]+
A[1]*
P[1])*2.;
69 float b = 2.*(
A[0]*
A[0]+
A[1]*
A[1]);
74 if((s1*s2) > 0.) {std::abs(s1) < std::abs(s2) ? s = s1 : s = s2;}
75 else { s1 > 0. ? s = s1 : s = s2;}
78 float zc =
P[2]+
A[2]*s ;
if(std::abs(zc-
m_z)>(
m_dz+
P[4]))
return;
79 float zc0 = zc-
P[4]-
m_z ;
80 float zc1 = zc+
P[4]-
m_z ;
81 float yc =
P[1]+
A[1]*s ;
82 float xc =
P[0]+
A[0]*s ; s+=
P[5];
83 float fc = std::atan2(yc,xc);
85 int n = int((fc-
m_f0)*
m_sfi)*2;
if(n<0) n=0;
else if(n>m) n=m;
89 if((dx-
m_wf-
P[4]) <= 0.) {
91 assert(
used.size() >
static_cast<unsigned int>(n));
97 assert(
used.size() >
static_cast<unsigned int>(k));
102 if(dF>0.) { n!=62 ? n+=2 : n=0 ;}
103 else { n!= 0 ? n-=2 : n=62;}
106 if((dx-
m_wf-
P[4]) <= 0.) {
108 assert(
used.size() >
static_cast<unsigned int>(n));
114 assert(
used.size() >
static_cast<unsigned int>(k));
134 std::vector<std::pair<const InDet::TRT_DetElementLink_xk*,float> >& lDE,
135 std::vector<InDet::TRT_DetElementLink_xk::Used_t> &
used)
const
137 float a = (
A[0]*
P[0]+
A[1]*
P[1])*2.;
141 float b = 2.*(
A[0]*
A[0]+
A[1]*
A[1]);
142 float sq =
a*
a+2.*d*b;
sq>0. ?
sq=std::sqrt(
sq) :
sq=0.;
146 if((s1*s2) > 0.) {std::abs(s1) < std::abs(s2) ? s = s1 : s = s2;}
147 else { s1 > 0. ? s = s1 : s = s2;}
150 float zc =
P[2]+
A[2]*s ;
if(std::abs(zc-
m_z)>(
m_dz+
P[4]))
return;
151 float zc0 = zc-
P[4]-
m_z ;
152 float zc1 = zc+
P[4]-
m_z ;
153 float yc =
P[1]+
A[1]*s ;
154 float xc =
P[0]+
A[0]*s ; s+=
P[5];
156 for(
size_t n = 0; n <
m_elements.size(); n+=2) {
159 if((dx-
m_wf-
P[4]) <= 0.) {
161 assert(
used.size() >
static_cast<unsigned int>(n));
166 assert(
used.size() >
static_cast<unsigned int>(n+1));
167 if(zc1 >= 0. && !
used[n+1].
used()) {
188 std::vector<std::pair<const InDet::TRT_DetElementLink_xk*, float> >& lDE,
189 std::vector<InDet::TRT_DetElementLink_xk::Used_t> &
used)
const
191 const float pi2=2.*
M_PI;
193 float s = (
m_z-
P[2])/
A[2];
194 float xc =
P[0]+
A[0]*s;
195 float yc =
P[1]+
A[1]*s; s+=
P[5];
196 float rc = std::sqrt(xc*xc+yc*yc);
if(std::abs(
rc-
m_r)>
m_dr+
P[4])
return;
197 float fc = std::atan2(yc,xc);
198 float sf = 0.09817477+
P[4]/
rc;
201 int n = int((fc-
m_f0)*
m_sfi);
if(n<0) n=0;
else if(n>m) n=m;
204 assert(
used.size() >
static_cast<unsigned int>(n));
205 if(std::abs(dF) < sf && !
used[n].
used()) {
211 if(dF>0.) {
if(n!=m) ++n;
else {n=0 ; fc-=pi2;}}
212 else {
if(n!=0) --n;
else {n=m ; fc+=pi2;}}
214 assert(
used.size() >
static_cast<size_t>(n));
Scalar phi() const
phi method
std::vector< TRT_DetElementLink_xk > m_elements
void getBarrelDetElementsATL(const float *, const float *, std::vector< std::pair< const InDet::TRT_DetElementLink_xk *, float > > &, std::vector< InDet::TRT_DetElementLink_xk::Used_t > &used) const
void getBarrelDetElementsCTB(const float *, const float *, std::vector< std::pair< const InDet::TRT_DetElementLink_xk *, float > > &, std::vector< InDet::TRT_DetElementLink_xk::Used_t > &used) const
void set(double, double, double, double, double, double, double)
void getEndcapDetElements(const float *, const float *, std::vector< std::pair< const InDet::TRT_DetElementLink_xk *, float > > &, std::vector< InDet::TRT_DetElementLink_xk::Used_t > &used) const
holding In fact this class is here in order to allow STL container for all features This class is sho...
hold the test vectors and ease the comparison
Tell the compiler to optimize assuming that FP may trap.
#define CXXUTILS_TRAPPING_FP