10 template <
class T>
inline T sqr(
T t) {
return t*
t;}
16 std::sort(theLayers.begin(), theLayers.end());
17 int i = -1; indeces.clear();
18 for (
auto const &
l : theLayers ) {
22 if (sq>=
int(indeces.size())) indeces.resize(sq+1,-1);
36 vector<MSLayer>::const_iterator it =
38 return it==
theLayers.end() ?
nullptr : &(*it);
98 float drOI = pointO.
r() - pointI.
r();
99 float drMO = pointO.
r() - pointM.
r();
100 float drMI = pointM.
r() - pointI.
r();
112 << (*iM).seqNum() <<
" " << iM-
theLayers.begin() <<
", " 113 << (*iO).seqNum() <<
" " << iO-
theLayers.begin() <<
" " 114 << pointI.
r() <<
" " << pointI.
z()
138 float drOI = pointO.
r();
139 float drMO = pointO.
r() - pointI.
r();
140 float drMI = pointI.
r();
149 std::cout <<
"new " << il <<
" " << (*iI).seqNum() <<
" " << iI-
theLayers.begin() <<
", " 150 << ol <<
" " << (*iO).seqNum() <<
" " << iO-
theLayers.begin() <<
" " << zV
168 for (
LayerItr it = i1; it < i2; it++) {
169 std::pair<PixelRecoPointRZ,bool>
cross = it->crossing(line);
171 float x0 = it->x0(cotTh);
172 float dr = rTarget-cross.first.r();
173 if (x0 > 1.
e-5
f) dr *= 1.f+0.038f*unsafe_logf<2>(x0);
186 const float BIG=99999.f;
188 LayerItr theIt = ibeg;
float dist = BIG;
189 for (
LayerItr it = ibeg; it < iend; it++) {
190 float d = it->distance2(point);
192 if (d < EPSILON)
return it;
std::vector< int > indeces
std::vector< MSLayer > theLayers
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void update(const MSLayer &layer)
float sum2RmRn(LayerItr i1, LayerItr i2, float rTarget, const SimpleLineRZ &line) const
float sumX0D(const PixelRecoPointRZ &pointI, const PixelRecoPointRZ &pointO) const
std::vector< MSLayer >::const_iterator LayerItr
Square< F >::type sqr(const F &f)
static const bool doPrint
const MSLayer * findLayer(const MSLayer &layer) const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Basic3DVector cross(const Basic3DVector &v) const
Vector product, or "cross" product, with a vector of same type.