60 theFilter = std::make_unique<TripletFilter>(es);
81 const std::vector<SeedingLayerSetsHits::SeedingLayer>& thirdLayers)
96 if (pairs.empty())
return;
98 int size = thirdLayers.size();
102 for(
int il=0; il<
size; il++)
103 thirdHitMap[il] = &(*
theLayerCache)(thirdLayers[il], region, es);
109 for(OrderedHitPairs::const_iterator ip = pairs.begin();
110 ip!= pairs.end(); ip++)
113 vector<const TrackingRecHit*> recHits(3);
114 vector<GlobalPoint>
points(3);
116 recHits[0] = (*ip).inner()->hit();
117 recHits[1] = (*ip).outer()->hit();
124 for(
int i=0;
i<2;
i++)
129 thePrediction(region,
130 points[0],points[1], es,
134 for(
int il=0; il<
size; il++)
136 const DetLayer * layer = thirdLayers[il].detLayer();
140 <<
" " << layer->
location() << endl;
152 vector<Hit> thirdHits = thirdHitMap[il]->
hits(phiRange.
min(),phiRange.
max());
153 typedef vector<Hit>::const_iterator IH;
155 for (IH th=thirdHits.begin(), eh=thirdHits.end(); th < eh; ++th)
158 recHits[2] = (*th)->hit();
166 vector<GlobalVector> globalDirs;
168 (points[2], recHits, globalDirs, es) ==
false)
171 cerr <<
" not compatible: multiple scattering" << endl;
193 if(!
theFilter->checkTrack(recHits,globalDirs,tTopo, *clusterShapeCache))
196 cerr <<
" not compatible: cluster shape" << endl;
207 delete [] thirdHitMap;
217 const std::vector<const DetLayer *> & thirdLayerDetLayer,
218 const int nThirdLayers)
220 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