59 theFilter = std::make_unique<TripletFilter>(es);
80 const std::vector<SeedingLayerSetsHits::SeedingLayer>& thirdLayers)
95 if (pairs.empty())
return;
97 int size = thirdLayers.size();
101 for(
int il=0; il<
size; il++)
102 thirdHitMap[il] = &(*
theLayerCache)(thirdLayers[il], region, es);
108 for(OrderedHitPairs::const_iterator ip = pairs.begin();
109 ip!= pairs.end(); ip++)
112 vector<const TrackingRecHit*> recHits(3);
113 vector<GlobalPoint>
points(3);
115 recHits[0] = (*ip).inner()->hit();
116 recHits[1] = (*ip).outer()->hit();
123 for(
int i=0;
i<2;
i++)
128 thePrediction(region,
129 points[0],points[1], es,
133 for(
int il=0; il<
size; il++)
135 const DetLayer * layer = thirdLayers[il].detLayer();
139 <<
" " << layer->
location() << endl;
151 vector<Hit> thirdHits = thirdHitMap[il]->
hits(phiRange.
min(),phiRange.
max());
152 typedef vector<Hit>::const_iterator IH;
154 for (IH th=thirdHits.begin(), eh=thirdHits.end(); th < eh; ++th)
157 recHits[2] = (*th)->hit();
165 vector<GlobalVector> globalDirs;
167 (points[2], recHits, globalDirs, es) ==
false)
170 cerr <<
" not compatible: multiple scattering" << endl;
192 if(!
theFilter->checkTrack(recHits,globalDirs,tTopo, *clusterShapeCache))
195 cerr <<
" not compatible: cluster shape" << endl;
206 delete [] thirdHitMap;
216 const std::vector<const DetLayer *> & thirdLayerDetLayer,
217 const int nThirdLayers)
219 throw cms::Exception(
"Error")<<
"PixelTripletLowPtGenerator::hitTriplets is not implemented \n";
PixelTripletLowPtGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
T getParameter(std::string const &) const
std::vector< Hit > hits(float phiMin, float phiMax) const
void getTracker(const edm::EventSetup &es)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
void hitTriplets(const TrackingRegion ®ion, OrderedHitTriplets &trs, const edm::Event &ev, const edm::EventSetup &es, const SeedingLayerSetsHits::SeedingLayerSet &pairLayers, const std::vector< SeedingLayerSetsHits::SeedingLayer > &thirdLayers) override
virtual Location location() const =0
Which part of the detector (barrel, endcap)
std::unique_ptr< TripletFilter > theFilter
bool checkMultipleScattering
LayerCacheType * theLayerCache
virtual LocalPoint localPosition() const =0
edm::EDGetTokenT< SiPixelClusterShapeCache > theClusterShapeCacheToken
SeedingHitSet::ConstRecHitPointer Hit
BaseTrackerRecHit const * Hit
std::unique_ptr< HitPairGeneratorFromLayerPair > thePairGenerator
const TrackerGeometry * theTracker
const TrackerGeomDet * idToDet(DetId) const override
GlobalPoint getGlobalPosition(const TrackingRecHit *recHit)
DetId geographicalId() const
bool isCompatibleWithMultipleScattering(GlobalPoint g3, const std::vector< const TrackingRecHit * > &h, std::vector< GlobalVector > &localDirs, const edm::EventSetup &es)
void getRanges(const DetLayer *layer, float phi[], float rz[])
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)
~PixelTripletLowPtGenerator() override
T const * product() const
double nSigMultipleScattering