11 #if !defined(__INTEL_COMPILER)
12 #define USE_VECTORS_HERE
26 ~Stat() {
std::cout <<
"ASIN " <<
xmin <<
',' <<
xmax <<
',' <<
nt <<
',' <<
nn <<
',' << nl << std::endl; }
35 inline T cropped_asin(
T x) {
50 inline T cropped_asin(
T x) {
65 inline T f_asin07f(
T x) {
66 auto ret = 1.f + (
x *
x) * (0.157549798488616943359375
f + (x * x) * 0.125192224979400634765625f);
76 inline float f_atan2f(
float y,
float x) {
return unsafe_atan2f<7>(y, x); }
78 inline float f_phi(
V v) {
79 return f_atan2f(
v.y(),
v.x());
92 ol(outlayer.seqNum()),
93 theROrigin(
region.originRBound()),
96 theExtraTolerance(extraTolerance),
99 theVtxZ(
region.origin().z()),
102 sigma(&layer, iSetup)
121 const BarrelDetLayer& bl = static_cast<const BarrelDetLayer&>(outLayer);
134 const ForwardDetLayer& fl = static_cast<const ForwardDetLayer&>(outLayer);
149 const BarrelDetLayer& bl = static_cast<const BarrelDetLayer&>(layer);
158 const ForwardDetLayer& fl = static_cast<const ForwardDetLayer&>(layer);
163 theB = layerZ > 0 ? zMaxOrigin : zMinOrigin;
172 auto dHitmag = dHit.
mag();
187 rLayer = crossing.
mag();
188 dLayer =
t * dHitmag;
203 if (vtxmag2 < 1.
e-10
f) {
207 double var_c = vtxmag2 -
sqr(rLayer);
209 double var_delta =
sqr(var_b) - var_c;
219 #ifdef USE_VECTORS_HERE
220 cms_float32x4_t
num{dHitmag, dLayer,
theROrigin * (dHitmag - dLayer), 1.
f};
222 auto phis = f_asin07f(
num / den);
223 phis = phis * dLayer / (rLayer * cosCross);
225 auto deltaPhiOrig = phis[2];
230 OdeltaPhi *= dLayer / (rLayer * cosCross);
232 auto OdeltaPhiOrig = cropped_asin(
theROrigin * (dHitmag - dLayer) / (dHitmag * dLayer));
233 OdeltaPhiOrig *= dLayer / (rLayer * cosCross);
237 auto deltaPhiOrig = OdeltaPhiOrig;
243 auto phicross2 = f_phi(crossing2);
244 auto phicross1 = f_phi(crossing);
245 auto dphicross = phicross2 - phicross1;
246 if (dphicross < -
float(
M_PI))
248 if (dphicross >
float(
M_PI))
250 if (dphicross >
float(
M_PI / 2))
252 phicross2 = phicross1 + dphicross;
259 auto deltaPhiHitOuter = errRPhi / hitXY.
mag();
261 auto margin =
deltaPhi + deltaPhiOrig + deltaPhiHit + deltaPhiHitOuter;
278 margin += nscatt / rLayer;