9 template <
class T>
inline T sqr(
T t) {
return t*
t;}
34 theLayerKeeper = &x0AtEta;
37 case useX0DataAveraged: {
39 theLayerKeeper = &x0Averaged;
45 theLayerKeeper = &x0DetLayer;
50 cout <<
"** MultipleScatteringParametrisation ** wrong x0Source"<<endl;
53 theLayerKeeper->init(iSetup);
55 theLayer = theLayerKeeper->layer(layer);
60 float pT,
float cotTheta,
float tip)
const
62 float sumX0D = theLayer.sumX0D(cotTheta);
63 return x0ToSigma * sumX0D /pT;
76 float sumX0D = layersAtEta.
sumX0D(pointI, pointO);
77 return x0ToSigma * sumX0D /pT;
92 float cotTheta = lineIO.
cotLine();
94 if (consecutive==useConsecutive) {
95 float dist = fabs( (pointO.
r()-pointM.
r())
96 * (pointM.
r()-pointI.
r())
97 / (pointO.
r()-pointI.
r()) );
98 return x0ToSigma *
sqrt(theLayer.x0(cotTheta)) * dist /pT;
100 const MSLayersAtAngle & layersAtEta = theLayerKeeper->layers(cotTheta);
101 float sumX0D = layersAtEta.
sumX0D(pointI, pointM, pointO);
102 return x0ToSigma * sumX0D /pT;
MultipleScatteringParametrisation(const DetLayer *layer, const edm::EventSetup &iSetup, X0Source x0source=useX0AtEta)
float operator()(float pt, float cotTheta, float transverseIP=0.) const
float sumX0D(const PixelRecoPointRZ &pointI, const PixelRecoPointRZ &pointO, float tip=0.) const
static const float x0ToSigma
Square< F >::type sqr(const F &f)