12 #if !defined(__INTEL_COMPILER)
13 #define USE_VECTORS_HERE
27 ~Stat() {
std::cout <<
"ASIN " <<
xmin <<
',' <<
xmax <<
',' <<
nt <<
',' <<
nn <<
',' << nl << std::endl; }
36 inline T cropped_asin(
T x) {
51 inline T cropped_asin(
T x) {
66 inline T f_asin07f(
T x) {
67 auto ret = 1.f + (x * x) * (0.157549798488616943359375
f + (x * x) * 0.125192224979400634765625f);
77 inline float f_atan2f(
float y,
float x) {
return unsafe_atan2f<7>(y, x); }
79 inline float f_phi(
V v) {
80 return f_atan2f(v.y(), v.x());
94 ol(outlayer.seqNum()),
95 theROrigin(region.originRBound()),
98 theExtraTolerance(extraTolerance),
101 theVtxZ(region.origin().z()),
102 thePtMin(region.
ptMin()),
103 theVtx(region.origin().x(), region.origin().y()),
104 sigma(msmaker.parametrisation(&layer)) {
163 theB = layerZ > 0 ? zMaxOrigin : zMinOrigin;
172 auto dHitmag = dHit.
mag();
186 crossing = theVtx +
t * dHit;
187 rLayer = crossing.
mag();
188 dLayer =
t * dHitmag;
202 auto vtxmag2 = theVtx.mag2();
203 if (vtxmag2 < 1.
e-10
f) {
207 double var_c = vtxmag2 -
sqr(rLayer);
208 double var_b = theVtx.dot(dHit.
unit());
209 double var_delta =
sqr(var_b) - var_c;
214 crossing = theVtx + dHit.
unit() * dLayer;
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;
242 Point2D crossing2 = theVtx + dHit.
unit() * (dLayer + dL);
243 auto phicross2 = f_phi(crossing2);
244 auto phicross1 = f_phi(crossing);
245 auto dphicross = phicross2 - phicross1;
246 if (dphicross < -
float(
M_PI))
247 dphicross += float(2 *
M_PI);
248 if (dphicross >
float(
M_PI))
249 dphicross -= float(2 *
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;
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
tuple ret
prodAgent to be discontinued
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.
InnerDeltaPhi(const DetLayer &outlayer, const DetLayer &layer, const TrackingRegion ®ion, const MagneticField &field, const MultipleScatteringParametrisationMaker &msmaker, bool precise=true, float extraTolerance=0.f)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const Bounds & bounds() const
PixelRecoRange< float > phiRange(const Point2D &hitXY, float zHit, float errRPhi) const
constexpr std::array< uint8_t, layerIndexSize > layer
Basic2DVector unit() const
virtual float thickness() const =0
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
Abs< T >::type abs(const T &t)
float originZBound() const
bounds the particle vertex in the longitudinal plane
void initForwardMS(const DetLayer &outLayer)
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)
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
virtual const BoundDisk & specificSurface() const final
T bendingRadius(T pt, const MagneticField &field)
MultipleScatteringParametrisation sigma