9 template <
class T>
inline T sqr(
T t) {
return t*
t;}
34 if (isInitialised)
return;
35 for (
auto x : keepers)
x->init(iSetup);
38 Keepers() : keepers{&x0DetLayer,&x0AtEta,&x0Averaged}, isInitialised(
false) {}
41 thread_local Keepers keepers;
58 theLayerKeeper = keepers(x0Source);
64 theLayer = theLayerKeeper->layer(layer);
69 float pT,
float cotTheta,
float)
const 71 float sumX0D = theLayer.sumX0D(cotTheta);
72 return x0ToSigma * sumX0D /
pT;
85 float sumX0D = layersAtEta.
sumX0D(pointI, pointO);
86 return x0ToSigma * sumX0D /
pT;
98 float sumX0D = layersAtEta.
sumX0D(il, theLayer.seqNum(), pointI, pointO);
99 return x0ToSigma * sumX0D /
pT;
115 float cotTheta = lineIO.
cotLine();
117 if (consecutive==useConsecutive) {
118 float dist = fabs( (pointO.
r()-pointM.
r())
119 * (pointM.
r()-pointI.
r())
120 / (pointO.
r()-pointI.
r()) );
121 return x0ToSigma *
sqrt(theLayer.x0(cotTheta)) * dist /pT;
123 const MSLayersAtAngle & layersAtEta = theLayerKeeper->layers(cotTheta);
124 float sumX0D = layersAtEta.
sumX0D(pointI, pointM, pointO);
125 return x0ToSigma * sumX0D /
pT;
138 float cotTheta = lineIO.
cotLine();
140 const MSLayersAtAngle & layersAtEta = theLayerKeeper->layers(cotTheta);
141 float sumX0D = layersAtEta.
sumX0D(pointV.
z(), theLayer.seqNum(), ol, pointI, pointO);
142 return x0ToSigma * sumX0D /
pT;
T x() const
Cartesian x coordinate.
float sumX0D(const PixelRecoPointRZ &pointI, const PixelRecoPointRZ &pointO) const
float operator()(float pt, float cotTheta, float transverseIP=0.) const
static void initKeepers(const edm::EventSetup &iSetup)
static const float x0ToSigma
void init(const DetLayer *layer, const edm::EventSetup &iSetup, X0Source x0source=useX0AtEta)