18 using namespace ctfseeding;
22 const vector<SeedingLayer> & layers,
25 thePairGenerator = pairs.
clone();
27 theLayerCache = layerCache;
29 checkMultipleScattering = ps.getParameter<
bool>(
"checkMultipleScattering");
30 nSigMultipleScattering = ps.getParameter<
double>(
"nSigMultipleScattering");
31 checkClusterShape = ps.getParameter<
bool>(
"checkClusterShape");
32 rzTolerance = ps.getParameter<
double>(
"rzTolerance");
33 maxAngleRatio = ps.getParameter<
double>(
"maxAngleRatio");
34 builderName = ps.getParameter<
string>(
"TTRHBuilder");
63 theTracker->idToDet(detId)->toGlobal(recHit->
localPosition());
81 thePairGenerator->hitPairs(region,pairs,ev,es);
83 if (pairs.
size() == 0)
return;
85 int size = theLayers.size();
89 for(
int il=0; il<
size; il++)
90 thirdHitMap[il] = &(*theLayerCache)(&theLayers[il], region, ev, es);
96 for(OrderedHitPairs::const_iterator ip = pairs.begin();
97 ip!= pairs.end(); ip++)
100 vector<const TrackingRecHit*> recHits(3);
101 vector<GlobalPoint> points(3);
103 recHits[0] = (*ip).inner()->hit();
104 recHits[1] = (*ip).outer()->hit();
111 for(
int i=0;
i<2;
i++)
112 points[
i] = getGlobalPosition(recHits[
i]);
116 thePrediction(region,
117 points[0],points[1], es,
118 nSigMultipleScattering,maxAngleRatio,builderName);
121 for(
int il=0; il<
size; il++)
128 <<
" " << layer->
location() << endl;
140 vector<Hit> thirdHits = thirdHitMap[il]->
hits(phiRange.
min(),phiRange.
max());
141 typedef vector<Hit>::const_iterator IH;
143 for (IH th=thirdHits.begin(), eh=thirdHits.end(); th < eh; ++th)
146 recHits[2] = (*th)->hit();
147 points[2] = getGlobalPosition(recHits[2]);
154 vector<GlobalVector> globalDirs;
156 (points[2], recHits, globalDirs, es) ==
false)
159 cerr <<
" not compatible: multiple scattering" << endl;
161 if(checkMultipleScattering)
continue;
179 if(checkClusterShape)
181 if(! theFilter->checkTrack(recHits,globalDirs,tTopo))
184 cerr <<
" not compatible: cluster shape" << endl;
195 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)
const DetLayer * detLayer() const
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
virtual unsigned int size() const
bool isCompatibleWithMultipleScattering(GlobalPoint g3, std::vector< const TrackingRecHit * > h, std::vector< GlobalVector > &localDirs, const edm::EventSetup &es)
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
void getRanges(const DetLayer *layer, float phi[], float rz[])
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)
virtual LocalPoint localPosition() const =0
virtual void init(const HitPairGenerator &pairs, const std::vector< ctfseeding::SeedingLayer > &layers, LayerCacheType *layerCache)
tuple size
Write out results.