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());
75 thePairGenerator->hitPairs(region,pairs,ev,es);
77 if (pairs.
size() == 0)
return;
79 int size = theLayers.size();
83 for(
int il=0; il<
size; il++)
84 thirdHitMap[il] = &(*theLayerCache)(&theLayers[il], region, ev, es);
90 for(OrderedHitPairs::const_iterator ip = pairs.begin();
91 ip!= pairs.end(); ip++)
94 vector<const TrackingRecHit*> recHits(3);
95 vector<GlobalPoint> points(3);
97 recHits[0] = (*ip).inner()->hit();
98 recHits[1] = (*ip).outer()->hit();
105 for(
int i=0;
i<2;
i++)
106 points[
i] = getGlobalPosition(recHits[
i]);
110 thePrediction(region,
111 points[0],points[1], es,
112 nSigMultipleScattering,maxAngleRatio,builderName);
115 for(
int il=0; il<
size; il++)
122 <<
" " << layer->
location() << endl;
134 vector<Hit> thirdHits = thirdHitMap[il]->
hits(phiRange.
min(),phiRange.
max());
135 typedef vector<Hit>::const_iterator IH;
137 for (IH th=thirdHits.begin(), eh=thirdHits.end(); th < eh; ++th)
140 recHits[2] = (*th)->hit();
141 points[2] = getGlobalPosition(recHits[2]);
148 vector<GlobalVector> globalDirs;
150 (points[2], recHits, globalDirs, es) ==
false)
153 cerr <<
" not compatible: multiple scattering" << endl;
155 if(checkMultipleScattering)
continue;
173 if(checkClusterShape)
175 if(! theFilter->checkTrack(recHits,globalDirs))
178 cerr <<
" not compatible: cluster shape" << endl;
189 delete [] thirdHitMap;
static std::string getInfo(const DetId &id)
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
std::vector< Hit > hits(float phiMin, float phiMax) 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[])
virtual LocalPoint localPosition() const =0
virtual void init(const HitPairGenerator &pairs, const std::vector< ctfseeding::SeedingLayer > &layers, LayerCacheType *layerCache)
tuple size
Write out results.