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());}
85 bool precise,
float extraTolerance) :
89 ol( outlayer.seqNum()),
90 theROrigin(region.originRBound()),
93 theExtraTolerance(extraTolerance),
96 theVtxZ(region.origin().z()),
97 thePtMin(region.
ptMin()),
98 theVtx(region.origin().x(),region.origin().y()),
157 float zMinOrigin,
float zMaxOrigin)
164 theB = layerZ > 0 ? zMaxOrigin : zMinOrigin;
176 auto dHitmag = dHit.
mag();
190 crossing = theVtx +
t*dHit;
191 rLayer = crossing.
mag();
192 dLayer =
t*dHitmag; dL =
dt * dHitmag;
206 auto vtxmag2 = theVtx.mag2();
207 if (vtxmag2 < 1.
e-10
f) {
212 double var_c = vtxmag2-
sqr(rLayer);
213 double var_b = theVtx.dot(dHit.
unit());
214 double var_delta =
sqr(var_b)-var_c;
215 if (var_delta <=0.) var_delta = 0;
218 crossing = theVtx+ dHit.
unit() * dLayer;
223 #ifdef USE_VECTORS_HERE 224 cms_float32x4_t
num{dHitmag,dLayer,
theROrigin * (dHitmag-dLayer),1.
f};
226 auto phis = f_asin07f(
num/den);
227 phis = phis*dLayer/(rLayer*cosCross);
229 auto deltaPhiOrig = phis[2];
234 OdeltaPhi *= dLayer/(rLayer*cosCross);
236 auto OdeltaPhiOrig = cropped_asin(
theROrigin * (dHitmag-dLayer) / (dHitmag*dLayer));
237 OdeltaPhiOrig *= dLayer/(rLayer*cosCross);
241 auto deltaPhiOrig = OdeltaPhiOrig;
246 Point2D crossing2 = theVtx + dHit.
unit()* (dLayer+dL);
247 auto phicross2 = f_phi(crossing2);
248 auto phicross1 = f_phi(crossing);
249 auto dphicross = phicross2-phicross1;
252 if (dphicross >
float(
M_PI/2)) dphicross = 0.;
253 phicross2 = phicross1 + dphicross;
262 auto deltaPhiHitOuter = errRPhi/hitXY.
mag();
264 auto margin =
deltaPhi+deltaPhiOrig+deltaPhiHit+deltaPhiHitOuter ;
281 margin += nscatt/ rLayer ;
virtual float length() const =0
void initBarrelMS(const DetLayer &outLayer)
bool isBarrel(GeomDetEnumerators::SubDetector m)
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