11 #if !defined(__INTEL_COMPILER) 12 #define USE_VECTORS_HERE 27 ~Stat() {
std::cout <<
"ASIN " << xmin <<
',' << xmax <<
',' << nt <<
','<< nn <<
','<< nl << std::endl;}
37 inline T cropped_asin(
T x) {
40 if (x>0.5
f)
stat.nl++;
50 inline T cropped_asin(
T x) {
59 template <
class T>
inline T sqr(
T t) {
return t*
t;}
63 inline T f_asin07f(
T x) {
66 1.f + (x*x) * (0.157549798488616943359375
f + (x*x)*0.125192224979400634765625f);
78 float f_atan2f(
float y,
float x) {
return unsafe_atan2f<7>(y,x); }
79 template<
typename V>
inline float f_phi(V
v) {
return f_atan2f(v.y(),v.x());}
83 inline double checked_asin(
double x,
const char *
expr,
const char *
file,
int line) {
84 if (fabs(x) >= 1.0)
throw cms::Exception(
"CorruptData") <<
"asin(x) called with x = " << expr <<
" = " << x <<
"\n\tat " << file <<
":" << line <<
"\n";
94 bool precise,
float extraTolerance) :
98 ol( outlayer.seqNum()),
99 theROrigin(region.originRBound()),
102 theExtraTolerance(extraTolerance),
105 theVtxZ(region.origin().z()),
106 thePtMin(region.
ptMin()),
107 theVtx(region.origin().x(),region.origin().y()),
166 float zMinOrigin,
float zMaxOrigin)
173 theB = layerZ > 0 ? zMaxOrigin : zMinOrigin;
185 auto dHitmag = dHit.
mag();
199 crossing = theVtx +
t*dHit;
200 rLayer = crossing.
mag();
201 dLayer =
t*dHitmag; dL =
dt * dHitmag;
215 auto vtxmag2 = theVtx.mag2();
216 if (vtxmag2 < 1.
e-10
f) {
221 double var_c = vtxmag2-
sqr(rLayer);
222 double var_b = theVtx.dot(dHit.
unit());
223 double var_delta =
sqr(var_b)-var_c;
224 if (var_delta <=0.) var_delta = 0;
227 crossing = theVtx+ dHit.
unit() * dLayer;
232 #ifdef USE_VECTORS_HERE 233 cms_float32x4_t
num{dHitmag,dLayer,
theROrigin * (dHitmag-dLayer),1.
f};
235 auto phis = f_asin07f(
num/den);
236 phis = phis*dLayer/(rLayer*cosCross);
238 auto deltaPhiOrig = phis[2];
243 OdeltaPhi *= dLayer/(rLayer*cosCross);
245 auto OdeltaPhiOrig = cropped_asin(
theROrigin * (dHitmag-dLayer) / (dHitmag*dLayer));
246 OdeltaPhiOrig *= dLayer/(rLayer*cosCross);
250 auto deltaPhiOrig = OdeltaPhiOrig;
255 Point2D crossing2 = theVtx + dHit.
unit()* (dLayer+dL);
256 auto phicross2 = f_phi(crossing2);
257 auto phicross1 = f_phi(crossing);
258 auto dphicross = phicross2-phicross1;
261 if (dphicross >
float(
M_PI/2)) dphicross = 0.;
262 phicross2 = phicross1 + dphicross;
271 auto deltaPhiHitOuter = errRPhi/hitXY.
mag();
273 auto margin =
deltaPhi+deltaPhiOrig+deltaPhiHit+deltaPhiHitOuter ;
290 margin += nscatt/ rLayer ;
virtual float length() const =0
void initBarrelMS(const DetLayer &outLayer)
T dot(const Basic2DVector &lh) const
Scalar product, or "dot" product, with a vector of same type.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const Bounds & bounds() const
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
PixelRecoRange< float > phiRange(const Point2D &hitXY, float zHit, float errRPhi) const
Basic2DVector unit() const
Abs< T >::type abs(const T &t)
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
float originZBound() const
bounds the particle vertex in the longitudinal plane
virtual const BoundDisk & specificSurface() const final
void initForwardMS(const DetLayer &outLayer)
virtual float thickness() const =0
virtual const Surface::PositionType & position() const
Returns position of the surface.
void initBarrelLayer(const DetLayer &layer)
void initForwardLayer(const DetLayer &layer, float zMinOrigin, float zMaxOrigin)
T bendingRadius(T pt, const edm::EventSetup &iSetup)
Square< F >::type sqr(const F &f)
InnerDeltaPhi(const DetLayer &outlayer, const DetLayer &layer, const TrackingRegion ®ion, const edm::EventSetup &iSetup, bool precise=true, float extraTolerance=0.f)
MultipleScatteringParametrisation sigma