#include <RecoTracker/TkMSParametrization/interface/MSLayersAtAngle.h>
Public Member Functions | |
const MSLayer * | findLayer (const MSLayer &layer) const |
MSLayersAtAngle (const std::vector< MSLayer > &layers) | |
MSLayersAtAngle () | |
void | print () const |
int | size () const |
float | sumX0D (const PixelRecoPointRZ &pointI, const PixelRecoPointRZ &pointM, const PixelRecoPointRZ &pointO) const |
float | sumX0D (const PixelRecoPointRZ &pointI, const PixelRecoPointRZ &pointO) 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 35 of file MSLayersAtAngle.h.
MSLayersAtAngle::MSLayersAtAngle | ( | ) | [inline] |
MSLayersAtAngle::MSLayersAtAngle | ( | const std::vector< MSLayer > & | layers | ) |
MSLayersAtAngle::LayerItr MSLayersAtAngle::findLayer | ( | const PixelRecoPointRZ & | point, | |
MSLayersAtAngle::LayerItr | ibeg, | |||
MSLayersAtAngle::LayerItr | iend | |||
) | const [private] |
Definition at line 89 of file MSLayersAtAngle.cc.
References d, dist(), kinem::EPSILON, and it.
00093 { 00094 const float BIG=99999.; 00095 const float EPSILON = 1.e-4; 00096 LayerItr theIt = ibeg; float dist = BIG; 00097 for (LayerItr it = ibeg; it < iend; it++) { 00098 float d = it->distance(point); 00099 if (d < dist) { 00100 if (d < EPSILON) return it; 00101 dist = d; 00102 theIt = it; 00103 } 00104 } 00105 return theIt; 00106 }
Definition at line 14 of file MSLayersAtAngle.cc.
References find(), it, and theLayers.
Referenced by MSLayersKeeperX0AtEta::init(), MSLayersKeeperX0Averaged::init(), MSLayersKeeperX0Averaged::layer(), MSLayersKeeperX0DetLayer::layer(), MSLayer::sumX0D(), sumX0D(), and MSLayer::x0().
00015 { 00016 vector<MSLayer>::const_iterator it = 00017 find(theLayers.begin(), theLayers.end(), layer); 00018 return it==theLayers.end() ? 0 : &(*it); 00019 }
Definition at line 109 of file MSLayersAtAngle.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), it, and theLayers.
Referenced by MSLayersKeeperX0DetLayer::init().
00110 { 00111 for (LayerItr it = theLayers.begin(); it != theLayers.end(); it++) 00112 cout <<*it<<endl; 00113 }
Definition at line 28 of file MSLayersAtAngle.h.
References theLayers.
00028 { return theLayers.size(); }
float MSLayersAtAngle::sum2RmRn | ( | MSLayersAtAngle::LayerItr | i1, | |
MSLayersAtAngle::LayerItr | i2, | |||
float | rTarget, | |||
const PixelRecoLineRZ & | line | |||
) | const [private] |
Definition at line 68 of file MSLayersAtAngle.cc.
References PixelRecoLineRZ::cotLine(), e, it, and funct::log().
Referenced by sumX0D().
00073 { 00074 float sum2 = 0.; 00075 float cotTh = line.cotLine(); 00076 for (LayerItr it = i1; it < i2; it++) { 00077 pair<PixelRecoPointRZ,bool> cross = it->crossing(line); 00078 if (cross.second) { 00079 float x0 = it->x0(cotTh); 00080 float dr = rTarget-cross.first.r(); 00081 if (x0 > 1.e-5) dr *= 1+0.038*log(x0); 00082 sum2 += x0*dr*dr; 00083 } 00084 // cout << *it << " crossing: "<<cross.second<<endl; 00085 } 00086 return sum2; 00087 }
float MSLayersAtAngle::sumX0D | ( | const PixelRecoPointRZ & | pointI, | |
const PixelRecoPointRZ & | pointM, | |||
const PixelRecoPointRZ & | pointO | |||
) | const |
Definition at line 47 of file MSLayersAtAngle.cc.
References findLayer(), parsecf::pyparsing::line(), PixelRecoPointRZ::r(), sqr(), funct::sqrt(), sum2RmRn(), and theLayers.
00051 { 00052 LayerItr iO = findLayer(pointO, theLayers.begin(), theLayers.end()); 00053 LayerItr iI = findLayer(pointI, theLayers.begin(), iO); 00054 LayerItr iM = findLayer(pointM, iI, iO); 00055 00056 float drOI = pointO.r() - pointI.r(); 00057 float drMO = pointO.r() - pointM.r(); 00058 float drMI = pointM.r() - pointI.r(); 00059 00060 PixelRecoLineRZ line(pointI,pointO); 00061 float sum2I = sum2RmRn(iI+1,iM, pointI.r(), line); 00062 float sum2O = sum2RmRn(iM, iO, pointO.r(), line); 00063 00064 return sqrt( sum2I* sqr(drMO) + sum2O*sqr(drMI) )/drOI; 00065 }
float MSLayersAtAngle::sumX0D | ( | const PixelRecoPointRZ & | pointI, | |
const PixelRecoPointRZ & | pointO | |||
) | const |
Definition at line 34 of file MSLayersAtAngle.cc.
References findLayer(), PixelRecoPointRZ::r(), funct::sqrt(), sum2RmRn(), and theLayers.
Referenced by MSLayersKeeperX0DetLayer::init(), and MultipleScatteringParametrisation::operator()().
00037 { 00038 LayerItr iO = findLayer(pointO, theLayers.begin(), theLayers.end()); 00039 // cout << "outer Layer: "<<*iO<<endl; 00040 LayerItr iI = findLayer(pointI, theLayers.begin(), iO); 00041 // cout << "inner Layer: "<<*iI<<endl; 00042 00043 return sqrt(sum2RmRn(iI,iO, pointO.r(), 00044 PixelRecoLineRZ(pointI,pointO))); 00045 }
Definition at line 22 of file MSLayersAtAngle.cc.
References find(), it, python::multivaluedict::sort(), and theLayers.
Referenced by MSLayersKeeperX0DetLayer::init().
00023 { 00024 vector<MSLayer>::iterator it = find(theLayers.begin(),theLayers.end(),layer); 00025 if (it == theLayers.end()) { 00026 theLayers.push_back(layer); 00027 sort(theLayers.begin(), theLayers.end()); 00028 } else { 00029 *it = layer; 00030 } 00031 }
std::vector<MSLayer> MSLayersAtAngle::theLayers [private] |
Definition at line 32 of file MSLayersAtAngle.h.
Referenced by findLayer(), print(), size(), sumX0D(), and update().