18 using namespace GeomDetEnumerators;
19 using namespace ctfseeding;
23 template<
class T>
inline T sqr(
T t) {
return t*
t;}
40 theLayerCache(*layerCache), theOuterLayer(outer), theInnerLayer(inner)
55 if (innerHitsMap.
empty())
return;
58 if (outerHitsMap.
empty())
return;
66 vector<Hit> innerHits;
68 Hit ohit = (*oh).hit();
72 if (phiRange.
empty())
continue;
75 if(!checkRZ)
continue;
78 innerHitsMap.
hits(phiRange.
min(), phiRange.
max(), innerHits);
79 LogDebug(
"HitPairGeneratorFromLayerPair")<<
80 "preparing for combination of: "<<innerHits.size()<<
" inner and: "<<outerHits.second-outerHits.first<<
" outter";
81 for ( vector<Hit>::const_iterator ih=innerHits.begin(), ieh = innerHits.end(); ih < ieh; ++ih) {
87 allowed = checkRZ->
range(r_reduced);
88 float zErr = nSigmaRZ * (*ih)->errorGlobalZ();
89 hitRZ =
Range(innPos.
z()-zErr, innPos.
z()+zErr);
91 allowed = checkRZ->
range(innPos.
z());
92 float rErr = nSigmaRZ * (*ih)->errorGlobalR();
93 hitRZ =
Range(r_reduced-rErr, r_reduced+rErr);
96 if (! crossRange.empty() ) {
99 edm::LogError(
"TooManyPairs")<<
"number of pairs exceed maximum, no pairs produced";
108 LogDebug(
"HitPairGeneratorFromLayerPair")<<
" total number of pairs provided back: "<<result.
size();
virtual GlobalPoint origin() const =0
virtual Location location() const =0
Which part of the detector (barrel, endcap)
const DetLayer * detLayer() const
virtual Range range(const float &rORz) const =0
static const double nSigmaPhi
std::vector< Hit > hits(float phiMin, float phiMax) const
Geom::Phi< T > phi() const
HitPairGeneratorFromLayerPair(const Layer &inner, const Layer &outer, LayerCacheType *layerCache, unsigned int nSize=30000, unsigned int max=0)
virtual unsigned int size() const
virtual void hitPairs(const TrackingRegion ®, OrderedHitPairs &prs, const edm::Event &ev, const edm::EventSetup &es)
std::pair< HitIter, HitIter > Range
const T & max(const T &a, const T &b)
std::vector< HitWithPhi >::const_iterator HitIter
unsigned int theMaxElement
*virtual HitRZCompatibility * checkRZ(const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup) const =0
static const double nSigmaRZ
PixelRecoRange< float > Range
PixelRecoRange< T > intersection(const PixelRecoRange< T > &r) const
Square< F >::type sqr(const F &f)
TransientTrackingRecHit::ConstRecHitPointer Hit
LayerCacheType & theLayerCache