#include <MSLayersAtAngle.h>
Public Member Functions | |
const MSLayer * | findLayer (const MSLayer &layer) const |
MSLayersAtAngle () | |
MSLayersAtAngle (const std::vector< MSLayer > &layers) | |
void | print () const |
int | size () const |
float | sumX0D (const PixelRecoPointRZ &pointI, const PixelRecoPointRZ &pointM, const PixelRecoPointRZ &pointO, float tip=0.) const |
float | sumX0D (const PixelRecoPointRZ &pointI, const PixelRecoPointRZ &pointO, float tip=0.) const |
void | update (const MSLayer &layer) |
Private Types | |
typedef std::vector< MSLayer > ::const_iterator | LayerItr |
Private Member Functions | |
LayerItr | findLayer (const PixelRecoPointRZ &point, LayerItr i1, LayerItr i2) const |
float | sum2RmRn (LayerItr i1, LayerItr i2, float rTarget, const PixelRecoLineRZ &line) const |
Private Attributes | |
std::vector< MSLayer > | theLayers |
Definition at line 14 of file MSLayersAtAngle.h.
typedef std::vector<MSLayer>::const_iterator MSLayersAtAngle::LayerItr [private] |
Definition at line 37 of file MSLayersAtAngle.h.
MSLayersAtAngle::MSLayersAtAngle | ( | ) | [inline] |
Definition at line 17 of file MSLayersAtAngle.h.
{ }
MSLayersAtAngle::MSLayersAtAngle | ( | const std::vector< MSLayer > & | layers | ) |
Definition at line 14 of file MSLayersAtAngle.cc.
References spr::find(), and theLayers.
Referenced by MSLayersKeeperX0AtEta::init(), MSLayersKeeperX0Averaged::init(), MSLayersKeeperX0Averaged::layer(), MSLayersKeeperX0DetLayer::layer(), MSLayer::sumX0D(), sumX0D(), and MSLayer::x0().
MSLayersAtAngle::LayerItr MSLayersAtAngle::findLayer | ( | const PixelRecoPointRZ & | point, |
MSLayersAtAngle::LayerItr | ibeg, | ||
MSLayersAtAngle::LayerItr | iend | ||
) | const [private] |
Definition at line 91 of file MSLayersAtAngle.cc.
References kinem::EPSILON, and f.
void MSLayersAtAngle::print | ( | void | ) | const |
Definition at line 111 of file MSLayersAtAngle.cc.
References gather_cfg::cout, and theLayers.
int MSLayersAtAngle::size | ( | void | ) | const [inline] |
float MSLayersAtAngle::sum2RmRn | ( | MSLayersAtAngle::LayerItr | i1, |
MSLayersAtAngle::LayerItr | i2, | ||
float | rTarget, | ||
const PixelRecoLineRZ & | line | ||
) | const [private] |
Definition at line 70 of file MSLayersAtAngle.cc.
References PixelRecoLineRZ::cotLine(), cross(), alignCSCRings::e, f, and create_public_lumi_plots::log.
Referenced by sumX0D().
{ float sum2 = 0.f; float cotTh = line.cotLine(); for (LayerItr it = i1; it < i2; it++) { pair<PixelRecoPointRZ,bool> cross = it->crossing(line); if (cross.second) { float x0 = it->x0(cotTh); float dr = rTarget-cross.first.r(); if (x0 > 1.e-5f) dr *= 1.f+0.038f*std::log(x0); sum2 += x0*dr*dr; } // cout << *it << " crossing: "<<cross.second<<endl; } return sum2; }
float MSLayersAtAngle::sumX0D | ( | const PixelRecoPointRZ & | pointI, |
const PixelRecoPointRZ & | pointM, | ||
const PixelRecoPointRZ & | pointO, | ||
float | tip = 0. |
||
) | const |
Definition at line 48 of file MSLayersAtAngle.cc.
References findLayer(), geometryCSVtoXML::line, PixelRecoPointRZ::r(), funct::sqr(), mathSSE::sqrt(), sum2RmRn(), and theLayers.
{ LayerItr iO = findLayer(pointO, theLayers.begin(), theLayers.end()); LayerItr iI = findLayer(pointI, theLayers.begin(), iO); LayerItr iM = findLayer(pointM, iI, iO); float drOI = pointO.r() - pointI.r(); float drMO = pointO.r() - pointM.r(); float drMI = pointM.r() - pointI.r(); PixelRecoLineRZ line(pointI, pointO, tip); float sum2I = sum2RmRn(iI+1, iM, pointI.r(), line); float sum2O = sum2RmRn(iM, iO, pointO.r(), line); return sqrt( sum2I* sqr(drMO) + sum2O*sqr(drMI) )/drOI; }
float MSLayersAtAngle::sumX0D | ( | const PixelRecoPointRZ & | pointI, |
const PixelRecoPointRZ & | pointO, | ||
float | tip = 0. |
||
) | const |
Definition at line 34 of file MSLayersAtAngle.cc.
References findLayer(), PixelRecoPointRZ::r(), mathSSE::sqrt(), sum2RmRn(), and theLayers.
Referenced by MultipleScatteringParametrisation::operator()().
void MSLayersAtAngle::update | ( | const MSLayer & | layer | ) |
Definition at line 22 of file MSLayersAtAngle.cc.
References spr::find(), python::multivaluedict::sort(), and theLayers.
std::vector<MSLayer> MSLayersAtAngle::theLayers [private] |
Definition at line 34 of file MSLayersAtAngle.h.
Referenced by findLayer(), print(), size(), sumX0D(), and update().