18 using namespace ctfseeding;
24 thePairGenerator = pairs.
clone();
25 theLayerCache = layerCache;
27 checkMultipleScattering = ps.getParameter<
bool>(
"checkMultipleScattering");
28 nSigMultipleScattering = ps.getParameter<
double>(
"nSigMultipleScattering");
29 checkClusterShape = ps.getParameter<
bool>(
"checkClusterShape");
30 rzTolerance = ps.getParameter<
double>(
"rzTolerance");
31 maxAngleRatio = ps.getParameter<
double>(
"maxAngleRatio");
32 builderName = ps.getParameter<
string>(
"TTRHBuilder");
37 std::vector<SeedingLayerSetsHits::SeedingLayer> thirdLayers) {
38 thePairGenerator->setSeedingLayers(pairLayers);
39 theLayers = thirdLayers;
68 theTracker->idToDet(detId)->toGlobal(recHit->
localPosition());
86 thePairGenerator->hitPairs(region,pairs,ev,es);
88 if (pairs.
size() == 0)
return;
90 int size = theLayers.size();
94 for(
int il=0; il<
size; il++)
95 thirdHitMap[il] = &(*theLayerCache)(theLayers[il], region, ev, es);
101 for(OrderedHitPairs::const_iterator ip = pairs.begin();
102 ip!= pairs.end(); ip++)
105 vector<const TrackingRecHit*> recHits(3);
106 vector<GlobalPoint> points(3);
108 recHits[0] = (*ip).inner()->hit();
109 recHits[1] = (*ip).outer()->hit();
116 for(
int i=0;
i<2;
i++)
117 points[
i] = getGlobalPosition(recHits[
i]);
121 thePrediction(region,
122 points[0],points[1], es,
123 nSigMultipleScattering,maxAngleRatio,builderName);
126 for(
int il=0; il<
size; il++)
128 const DetLayer * layer = theLayers[il].detLayer();
132 <<
" " << layer->
location() << endl;
144 vector<Hit> thirdHits = thirdHitMap[il]->
hits(phiRange.
min(),phiRange.
max());
145 typedef vector<Hit>::const_iterator IH;
147 for (IH th=thirdHits.begin(), eh=thirdHits.end(); th < eh; ++th)
150 recHits[2] = (*th)->hit();
151 points[2] = getGlobalPosition(recHits[2]);
158 vector<GlobalVector> globalDirs;
160 (points[2], recHits, globalDirs, es) ==
false)
163 cerr <<
" not compatible: multiple scattering" << endl;
165 if(checkMultipleScattering)
continue;
183 if(checkClusterShape)
185 if(! theFilter->checkTrack(recHits,globalDirs,tTopo))
188 cerr <<
" not compatible: cluster shape" << endl;
199 delete [] thirdHitMap;
std::vector< Hit > hits(float phiMin, float phiMax) const
virtual HitPairGenerator * clone() const =0
void getTracker(const edm::EventSetup &es)
virtual Location location() const =0
Which part of the detector (barrel, endcap)
void setSeedingLayers(SeedingLayerSetsHits::SeedingLayerSet pairLayers, std::vector< SeedingLayerSetsHits::SeedingLayer > thirdLayers) override
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
virtual unsigned int size() const
void init(const HitPairGenerator &pairs, LayerCacheType *layerCache) override
T const * product() const
virtual void hitTriplets(const TrackingRegion ®ion, OrderedHitTriplets &trs, const edm::Event &ev, const edm::EventSetup &es)
TransientTrackingRecHit::ConstRecHitPointer Hit
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)
virtual LocalPoint localPosition() const =0
tuple size
Write out results.