140 if ( result > Geom::twoPi()) result = result -
Geom::twoPi();
161 const int nphibin = 24;
183 edm::LogInfo(
"RoadSearch") <<
"Found " << inputSeeds->size() <<
" input seeds.";
185 for ( RoadSearchSeedCollection::const_iterator seed = inputSeeds->begin(); seed != inputSeeds->end(); ++seed) {
189 if ( roadSeed == 0 ) {
190 edm::LogWarning(
"RoadSearch") <<
"RoadSeed could not be resolved from RoadSearchSeed hits, discard seed!";
193 Roads::type roadType = roads->getRoadType(roadSeed);
206 LogDebug(
"RoadSearch") <<
"Seed # " <<seed-inputSeeds->begin() <<
" inner hit (x/y/z): "
207 << innerSeedHitGlobalPosition.
x() <<
" / "
208 << innerSeedHitGlobalPosition.
y() <<
" / "
209 << innerSeedHitGlobalPosition.
z();
210 LogDebug(
"RoadSearch") <<
"Seed # " <<seed-inputSeeds->begin() <<
" outer hit (x/y/z): "
211 << outerSeedHitGlobalPosition.
x() <<
" / "
212 << outerSeedHitGlobalPosition.
y() <<
" / "
213 << outerSeedHitGlobalPosition.
z();
215 LogDebug(
"RoadSearch") <<
"Seed # " <<seed-inputSeeds->begin() <<
" inner hit (r/phi): "
216 << innerSeedHitGlobalPosition.
perp() <<
" / "
217 << innerSeedHitGlobalPosition.
phi();
218 LogDebug(
"RoadSearch") <<
"Seed # " <<seed-inputSeeds->begin() <<
" outer hit (r/phi): "
219 << outerSeedHitGlobalPosition.
perp() <<
" / "
220 << outerSeedHitGlobalPosition.
phi();
226 double k0 = -99999999.99;
229 double k1 = -99999999.99;
232 double outer_phi =
map_phi(outerSeedHitGlobalPosition.
phi());
233 double outer_eta = outerSeedHitGlobalPosition.
eta();
235 int phibin = (int)(nphibin*(outer_phi/(2*
Geom::pi())));
236 int etabin = (int)(netabin*(outer_eta+3.0)/6.0);
240 double dr = outerSeedHitGlobalPosition.
perp() - innerSeedHitGlobalPosition.
perp();
241 const double dr_min = 1;
243 edm::LogWarning(
"RoadSearch") <<
"RPhi road: seed Hits distance smaller than 1 cm, do not consider this seed.";
246 double det = innerSeedHitGlobalPosition.
x() * outerSeedHitGlobalPosition.
y() - innerSeedHitGlobalPosition.
y() * outerSeedHitGlobalPosition.
x();
248 edm::LogWarning(
"RoadSearch") <<
"RPhi road: 'det' == 0, do not consider this seed.";
250 double x0=0.0;
double y0=0.0;
251 double innerx=innerSeedHitGlobalPosition.
x();
252 double innery=innerSeedHitGlobalPosition.
y();
253 double outerx=outerSeedHitGlobalPosition.
x();
254 double outery=outerSeedHitGlobalPosition.
y();
257 phi0=atan2(outery-innery,outerx-innerx);
258 double alpha=atan2(innery,innerx);
259 double d1=
sqrt(innerx*innerx+innery*innery);
260 d0=d1*
sin(alpha-phi0); x0=-d0*
sin(phi0); y0=d0*
cos(phi0); k0=0.0;
262 makecircle(innerx,innery,outerx,outery,x0,y0);
266 LogDebug(
"RoadSearch") <<
"Seed # " <<seed-inputSeeds->begin() <<
" trajectory parameters: d0 = "<< d0 <<
" phi0 = " << phi0;
270 double dz = outerSeedHitGlobalPosition.
z() - innerSeedHitGlobalPosition.
z();
271 const double dz_min = 1.e-6;
273 edm::LogWarning(
"RoadSearch") <<
"ZPhi road: seed Hits are less than .01 microns away in z, do not consider this seed.";
276 k0 =
map_phi2(outerSeedHitGlobalPosition.
phi() - innerSeedHitGlobalPosition.
phi()) / dz;
277 phi0 =
map_phi(innerSeedHitGlobalPosition.
phi() - k0 * innerSeedHitGlobalPosition.
z());
280 makecircle(innerSeedHitGlobalPosition.
x(),innerSeedHitGlobalPosition.
y(),
281 outerSeedHitGlobalPosition.
x(),outerSeedHitGlobalPosition.
y(),
289 if ( (phi0 != -99.) && (k0 != -99999999.99) ) {
295 bool firstHitFound =
false;
296 unsigned int layerCounter = 0;
297 unsigned int usedLayers = 0;
298 unsigned int missedLayers = 0;
299 unsigned int consecutiveMissedLayers = 0;
301 unsigned int totalLayers = roadSet->
size();
306 if (minNumberOfUsedLayersPerCloud < 3) minNumberOfUsedLayersPerCloud = 3;
316 for ( Roads::RoadSet::const_iterator roadSetVector = roadSet->begin();
317 roadSetVector != roadSet->end();
321 unsigned int usedHitsInThisLayer = 0;
322 bool intersectsLayer =
false;
324 for ( std::vector<const Ring*>::const_iterator
ring = roadSetVector->begin();
ring != roadSetVector->end(); ++
ring ) {
328 double ringRadius = (*ring)->getrmin() + ((*ring)->getrmax()-(*ring)->getrmin())/2;
329 double ringZ = (*ring)->getzmin() + ((*ring)->getzmax()-(*ring)->getzmin())/2;
330 double ringPhi = 0.0;
336 if (ringPhi == -99)
continue;
337 intersectsLayer =
true;
339 LogDebug(
"RoadSearch") <<
"Seed # " <<seed-inputSeeds->begin() <<
" testing ring at R = " << ringRadius
340 <<
" Z = " << ringZ <<
" ringPhi = " << ringPhi;
342 int nDetIds = (*ring)->getNumDetIds();
345 double upperPhiRangeBorder =
map_phi2(ringPhi + theHalfRoad);
346 double lowerPhiRangeBorder =
map_phi2(ringPhi - theHalfRoad);
348 if ( lowerPhiRangeBorder <= upperPhiRangeBorder ) {
352 tracker.
product(),theHitMatcher,cloud);
358 tracker.
product(),theHitMatcher,cloud);
363 tracker.
product(),theHitMatcher,cloud);
366 LogDebug(
"RoadSearch") <<
"Seed # " <<seed-inputSeeds->begin() <<
" now has " << usedHitsInThisLayer <<
" hits in ring at R = " << ringRadius
367 <<
" Z = " << ringZ <<
" ringPhi = " << ringPhi;
370 if ( !firstHitFound ) {
371 if ( usedHitsInThisLayer > 0 ) {
373 firstHitFound =
true;
376 totalLayers = roadSet->size() - layerCounter + 1;
381 if (minNumberOfUsedLayersPerCloud < 3) minNumberOfUsedLayersPerCloud = 3;
392 consecutiveMissedLayers = 0;
396 if (intersectsLayer){
397 if ( usedHitsInThisLayer > 0 ) {
399 consecutiveMissedLayers = 0;
402 ++consecutiveMissedLayers;
405 LogDebug(
"RoadSearch") <<
"Seed # "<<seed-inputSeeds->begin() <<
" Layer info: "
406 <<
" totalLayers: " << totalLayers
407 <<
" usedLayers: " << usedLayers
408 <<
" missedLayers: " << missedLayers
409 <<
" consecutiveMissedLayers: " << consecutiveMissedLayers;
412 if ( consecutiveMissedLayers > maxNumberOfConsecutiveMissedLayersPerCloud ) {
413 LogDebug(
"RoadSearch") <<
"BREAK: seed # "<<seed-inputSeeds->begin()
414 <<
" More than " << maxNumberOfConsecutiveMissedLayersPerCloud <<
" missed consecutive layers!";
419 if ( missedLayers > maxNumberOfMissedLayersPerCloud ) {
420 LogDebug(
"RoadSearch") <<
"BREAK: seed # "<<seed-inputSeeds->begin()
421 <<
" More than " << maxNumberOfMissedLayersPerCloud <<
" missed layers!";
426 if ( totalLayers-missedLayers < minNumberOfUsedLayersPerCloud ) {
427 LogDebug(
"RoadSearch") <<
"BREAK: seed # "<<seed-inputSeeds->begin()
428 <<
" Cannot satisfy at least " << minNumberOfUsedLayersPerCloud <<
" used layers!";
435 if ( consecutiveMissedLayers <= maxNumberOfConsecutiveMissedLayersPerCloud ) {
436 if ( usedLayers >= minNumberOfUsedLayersPerCloud ) {
437 if ( missedLayers <= maxNumberOfMissedLayersPerCloud ) {
439 CloudArray[phibin][etabin].push_back(cloud);
442 LogDebug(
"RoadSearch") <<
"This r-phi seed # "<<seed-inputSeeds->begin()
443 <<
" yields a cloud with " <<cloud.
size() <<
" hits on " << usedLayers <<
" layers out of " << totalLayers;
445 LogDebug(
"RoadSearch") <<
"This z-phi seed # "<<seed-inputSeeds->begin()
446 <<
" yields a cloud with " <<cloud.
size() <<
" hits on " << usedLayers <<
" layers out of " << totalLayers;
449 LogDebug(
"RoadSearch") <<
"Missed layers: " << missedLayers <<
" More than " << maxNumberOfMissedLayersPerCloud <<
" missed layers!";
451 LogDebug(
"RoadSearch") <<
"This r-phi seed # "<<seed-inputSeeds->begin() <<
" yields no clouds";
453 LogDebug(
"RoadSearch") <<
"This z-phi seed # "<<seed-inputSeeds->begin() <<
" yields no clouds";
458 LogDebug(
"RoadSearch") <<
"Seed # "<<seed-inputSeeds->begin() <<
" fails: used layers = " << usedLayers <<
" < " << minNumberOfUsedLayersPerCloud;
462 LogDebug(
"RoadSearch") <<
"Seed # "<<seed-inputSeeds->begin() <<
" fails: consecutive missed layers = " << consecutiveMissedLayers <<
" > " << maxNumberOfConsecutiveMissedLayersPerCloud;
469 for (
int iphi=0; iphi<nphibin; ++iphi){
470 for (
int ieta=0; ieta<
netabin; ++ieta){
471 if (!CloudArray[iphi][ieta].
empty()) {
474 for ( RoadSearchCloudCollection::const_iterator ic = temp.begin(); ic!=temp.end(); ++ic)
475 output.push_back(*ic);
478 for ( RoadSearchCloudCollection::const_iterator ic = CloudArray[iphi][ieta].
begin();
479 ic!=CloudArray[iphi][ieta].end(); ++ic)
480 output.push_back(*ic);
485 delete theHitMatcher;
486 edm::LogInfo(
"RoadSearch") <<
"Found " << output.size() <<
" clouds.";
487 for ( RoadSearchCloudCollection::const_iterator ic = output.begin(); ic!=output.end(); ++ic)
488 edm::LogInfo(
"RoadSearch") <<
" Cloud " << ic-output.begin()<<
" has " << ic->size() <<
" hits.";
497 unsigned int usedRecHits = 0;
503 for ( std::vector<TrackingRecHit*>::const_iterator recHitIterator = recHitVector.begin(); recHitIterator != recHitVector.end(); ++recHitIterator) {
510 const SiStripRecHit2D *recHit = (SiStripRecHit2D*)(*recHitIterator);
511 DetId hitId = recHit->geographicalId();
513 LogDebug(
"RoadSearch") <<
" Testing hit at (x/y/z): "
514 << tracker->
idToDet(recHit->geographicalId())->surface().
toGlobal(recHit->localPosition()).
x() <<
" / "
515 << tracker->
idToDet(recHit->geographicalId())->surface().
toGlobal(recHit->localPosition()).
y() <<
" / "
516 << tracker->
idToDet(recHit->geographicalId())->surface().
toGlobal(recHit->localPosition()).
z();
528 SiStripMatchedRecHit2D* theCorrectedHit =
CorrectMatchedHit(*recHitIterator,theGluedDet,
529 tracker, theHitMatcher,
531 if (theCorrectedHit != 0){
534 double hitRadius =
sqrt(ghit.
x()*ghit.
x()+ghit.
y()*ghit.
y());
538 float dp = (hitphi-
phi);
539 float dx = hitRadius*
tan(dp);
541 LogDebug(
"RoadSearch") <<
" Hit phi = " << hitphi <<
" expected phi = " << phi
542 <<
" dx = " << dx <<
" for dxMax = " <<
phiMax(roadType,phi0,k0);
551 delete theCorrectedHit;
559 double hitRadius =
sqrt(ghit.
x()*ghit.
x()+ghit.
y()*ghit.
y());
563 float dp = (hitphi-
phi);
564 float dx = hitRadius*
tan(dp);
565 LogDebug(
"RoadSearch") <<
" Hit phi = " << hitphi <<
" expected phi = " << phi
566 <<
" dx = " << dx <<
" for dxMax = " <<
phiMax(roadType,phi0,k0);
602 innerRoadLocal, outerRoadLocal);
604 LogDebug(
"RoadSearch") <<
" Hit phi inner = " << innerHitGlobal.
phi() <<
" and outer = " << outerHitGlobal.
phi()
605 <<
" expected inner phi = " << innerExtrapolatedPhi
606 <<
" and outer phi = " << outerExtrapolatedPhi
607 <<
" dx = " << dxinter <<
" for dxMax = " <<
phiMax(roadType,phi0,k0);
609 if ( fabs(dxinter) <
phiMax(roadType,phi0,k0)) {
633 SiStripMatchedRecHit2D* theCorrectedHit =
CorrectMatchedHit(*recHitIterator,theGluedDet,
634 tracker, theHitMatcher,
636 if (theCorrectedHit != 0){
640 double hitZ = ghit.
z();
643 float dp = hitphi-
phi;
644 float dx = hitZ*
tan(dp);
655 delete theCorrectedHit;
678 double midPointZ = 0.5*(innerHitZ+outerHitZ);
681 innerExtrapolatedPhi, innerHitZ,
682 outerExtrapolatedPhi, outerHitZ);
684 double dX = midPointZ*
tan(dPhiInter);
716 double deltaX = hitZ*
tan(deltaPhi);
738 double hitRadius =
sqrt(ghit.
x()*ghit.
x()+ghit.
y()*ghit.
y());
742 float dp = hitphi-
phi;
743 float dx = hitRadius*
tan(dp);
764 double hitRadius =
sqrt(ghit.x()*ghit.x()+ghit.y()*ghit.y());
780 float dx = ghit.
z()*
tan(dphi);
789 edm::LogError(
"RoadSearch") <<
"recHitVector from general hit access function contains unknown detector id: " << (
unsigned int)
id.subdetId() <<
" rawId: " <<
id.rawId();
799 double d0,
double phi0,
double k0,
Roads::type roadType,
double ringPhi,
803 unsigned int usedRecHits = 0;
814 if (recHitMatch == inputRecHits->
end())
return usedRecHits;
819 recHitIterator != recHitRange.
end(); ++recHitIterator) {
829 double hitRadius =
sqrt(ghit.
x()*ghit.
x()+ghit.
y()*ghit.
y());
852 double hitRadius =
sqrt(ghit.x()*ghit.x()+ghit.y()*ghit.y());
869 if ( (phi -
phiMax(roadType,phi0,k0)) < ringPhi && (phi +
phiMax(roadType,phi0,k0))>ringPhi ) {
884 if ( !tibid.
glued() ) {
889 if ( !tobid.
glued() ) {
894 if ( !tidid.
glued() ) {
899 if ( !tecid.
glued() ) {
925 double ringPhi = -99.;
927 double omega=
k0, rl=ringRadius;
928 double sp0=
sin(phi0);
double cp0=
cos(phi0);
929 if (fabs(omega)>0.000005){
930 double xc=-sp0*(d0+1.0/omega);
931 double yc=cp0*(d0+1.0/omega);
932 double rh=fabs(1.0/omega);
933 double bbb=fabs(d0+1.0/omega);
934 double sss=0.5*(rl+rh+bbb);
935 double ddd=
sqrt((sss-bbb)*(sss-rh)/(sss*(sss-rl)));
936 double phil1=2.0*atan(ddd);
937 double phit=phi0+phil1;
if (omega<0.0)phit=phi0-phil1;
938 double xh=xc+
sin(phit)/omega;
939 double yh=yc-
cos(phit)/omega;
940 double phih=atan2(yh,xh);
944 double cee = rl*rl - d0*d0 -0.25*omega*omega - omega*d0;
945 if (cee<0.0){
return ringPhi;}
946 double l =
sqrt(cee);
947 double xh=-sp0*d0+l*cp0-0.5*l*l*omega*sp0;
948 double yh= cp0*d0+l*sp0+0.5*l*l*omega*cp0;
949 double phih=atan2(yh,xh);
954 ringPhi =
map_phi(phi0 + k0 * ringRadius);
961 double phi0,
double k0) {
981 double x2,
double y2,
double x3,
double y3){
982 double x1t=x1-x3;
double y1t=y1-y3;
double r1s=x1t*x1t+y1t*y1t;
983 double x2t=x2-x3;
double y2t=y2-y3;
double r2s=x2t*x2t+y2t*y2t;
984 double rho=x1t*y2t-x2t*y1t;
985 double xc, yc, rc, fac;
988 fac=
sqrt(x1t*x1t+y1t*y1t);
993 xc=fac*(r1s*y2t-r2s*y1t);
994 yc=fac*(r2s*x1t-r1s*x2t);
995 rc=
sqrt(xc*xc+yc*yc); xc+=x3; yc+=y3;
998 double f1=x1*yc-y1*xc;
double f2=x2*yc-y2*xc;
999 double f3=x3*yc-y3*xc;
1000 if ((f1<0.0)&&(f2<0.0)&&(f3<=0.0))s3=1.0;
1001 if ((f1>0.0)&&(f2>0.0)&&(f3>=0.0))s3=-1.0;
1002 d0h=-s3*(
sqrt(xc*xc+yc*yc)-rc);
1010 double deltaX = -999.;
1013 double det12 = inner1.
x()*outer1.
y() - inner1.
y()*outer1.
x();
1014 double det34 = inner2.
x()*outer2.
y() - inner2.
y()*outer2.
x();
1016 double xinter = (det12*(inner2.
x()-outer2.
x()) - det34*(inner1.
x()-outer1.
x()))/
1017 ((inner1.
x()-outer1.
x())*(inner2.
y()-outer2.
y()) -
1018 (inner2.
x()-outer2.
x())*(inner1.
y()-outer1.
y()));
1021 if (inner1.
x() < outer1.
x()){
1022 if ((xinter<inner1.
x()) || (xinter>outer1.
x())) inter =
false;
1025 if ((xinter>inner1.
x()) || (xinter<outer1.
x())) inter =
false;
1028 if (inner2.
x() < outer2.
x()){
1029 if ((xinter<inner2.
x()) || (xinter>outer2.
x())) inter =
false;
1032 if ((xinter>inner2.
x()) || (xinter<outer2.
x())) inter =
false;
1039 deltaX =
min(fabs(inner1.
x()-inner2.
x()),fabs(outer1.
x()-outer2.
x()));
1046 double iPhi2,
double iZ2,
double oPhi2,
double oZ2){
1058 double det12 = iZ1*oPhi1 - iPhi1*oZ1;
1059 double det34 = iZ2*oPhi2 - iPhi2*oZ2;
1061 double xinter = (det12*(iZ2-oZ2) - det34*(iZ1-oZ1))/
1062 ((iZ1-oZ1)*(iPhi2-oPhi2) -
1063 (iZ2-oZ2)*(iPhi1-oPhi1));
1067 if ((xinter<iZ1) || (xinter>oZ1)) inter =
false;
1070 if ((xinter>iZ1) || (xinter<oZ1)) inter =
false;
1074 if ((xinter<iZ2) || (xinter>oZ2)) inter =
false;
1077 if ((xinter>iZ2) || (xinter<oZ2)) inter =
false;
1084 deltaPhi =
min(fabs(iPhi2-iPhi1),fabs(oPhi2-oPhi1));
1095 double dPhiHits =
map_phi2(hitPhi1-hitPhi2);
1096 double dPhi1 =
map_phi2(hitPhi1-predictedPhi);
1097 double dPhi2 =
map_phi2(hitPhi2-predictedPhi);
1100 if ( (dPhi1>=0.0) && (dPhi2 <= 0.0))
1110 if ( (dPhi1<=0.0) && (dPhi2 >= 0.0))
1132 if ( inputCollection->empty() ){
1133 LogDebug(
"RoadSearch") <<
"Found " << output.size() <<
" clean clouds.";
1141 if ( 1==inputCollection->size() ){
1142 output = *inputCollection;
1146 LogDebug(
"RoadSearch") <<
"Found " << output.size() <<
" clean clouds.";
1153 std::vector<bool> already_gone(inputCollection->size());
1154 for (
unsigned int i=0;
i<inputCollection->size(); ++
i) {
1155 already_gone[
i] =
false;
1158 int raw_cloud_ctr=0;
1160 for ( RoadSearchCloudCollection::const_iterator raw_cloud = inputCollection->begin(); raw_cloud != inputCollection->end(); ++raw_cloud) {
1163 if (already_gone[raw_cloud_ctr-1])
continue;
1171 int second_cloud_ctr=raw_cloud_ctr;
1172 for ( RoadSearchCloudCollection::const_iterator second_cloud = raw_cloud+1; second_cloud != inputCollection->end(); ++second_cloud) {
1175 std::vector<const TrackingRecHit*> unshared_hits;
1177 if ( already_gone[second_cloud_ctr-1] )
continue;
1179 for ( RoadSearchCloud::RecHitVector::const_iterator second_cloud_hit = second_cloud->begin_hits();
1180 second_cloud_hit != second_cloud->end_hits();
1181 ++ second_cloud_hit ) {
1182 bool is_shared =
false;
1183 for ( RoadSearchCloud::RecHitVector::const_iterator lone_cloud_hit = lone_cloud.
begin_hits();
1184 lone_cloud_hit != lone_cloud.
end_hits();
1185 ++ lone_cloud_hit ) {
1187 if ((*lone_cloud_hit)->geographicalId() == (*second_cloud_hit)->geographicalId())
1188 if ((*lone_cloud_hit)->localPosition().x() == (*second_cloud_hit)->localPosition().x())
1189 if ((*lone_cloud_hit)->localPosition().y() == (*second_cloud_hit)->localPosition().y())
1190 {is_shared=
true;
break;}
1192 if (!is_shared) unshared_hits.push_back(*second_cloud_hit);
1194 if ( ((
float(unshared_hits.size())/
float(lone_cloud.
size())) >
1196 ((float(unshared_hits.size())/
float(second_cloud->size())) > (1-
mergingFraction_))){
1207 double f_lone_shared=double(second_cloud->size()-unshared_hits.size())/
double(lone_cloud.
size());
1208 double f_second_shared=double(second_cloud->size()-unshared_hits.size())/
double(second_cloud->size());
1210 if ( ( (static_cast<unsigned int>(f_lone_shared*1E9) > static_cast<unsigned int>(
mergingFraction_*1E9))||(static_cast<unsigned int>(f_second_shared*1E9) > static_cast<unsigned int>(
mergingFraction_*1E9)) )
1213 LogDebug(
"RoadSearch") <<
" Merge CloudA: " << raw_cloud_ctr <<
" with CloudB: " << second_cloud_ctr
1214 <<
" Shared fractions are " << f_lone_shared <<
" and " << f_second_shared;
1219 for (
unsigned int k=0;
k<unshared_hits.size(); ++
k) {
1220 lone_cloud.
addHit(unshared_hits[
k]);
1223 already_gone[second_cloud_ctr-1]=
true;
1229 output.push_back(lone_cloud);
1233 LogDebug(
"RoadSearch") <<
"Found " << output.size() <<
" clean clouds.";
1242 double k0,
double phi0) {
1246 const SiStripMatchedRecHit2D *theRH =
dynamic_cast<const SiStripMatchedRecHit2D*
>(originalHit);
1248 std::cout<<
" Could not cast original hit" << std::endl;
1251 const GeomDet *recHitGeomDet = tracker->
idToDet(theRH->geographicalId());
1255 const SiStripRecHit2D theMonoHit = theRH->monoHit();
1258 GlobalPoint gcenterofstrip=(theMonoDet->
surface()).toGlobal(theMonoHit.localPosition());
1260 float gtrackangle_xy =
map_phi2(phi0 + 2.0*asin(0.5*gcenterofstrip.
perp()*
k0));
1261 float rzangle = atan2(gcenterofstrip.
perp(),gcenterofstrip.
z());
1264 sin(gtrackangle_xy)*
sin(rzangle),
1269 SiStripMatchedRecHit2D* theCorrectedHit = theHitMatcher->
match(theRH,theGluedDet,trackdirection2);
1270 if (theCorrectedHit!=0)
return theCorrectedHit;
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
T getParameter(std::string const &) const
unsigned int maxRecHitsInCloud_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
bool isBarrelSensor(DetId id)
void setCollections(const SiStripRecHit2DCollection *rphiRecHits, const SiStripRecHit2DCollection *stereoRecHits, const SiStripMatchedRecHit2DCollection *matchedRecHits, const SiPixelRecHitCollection *pixelRecHits)
virtual float stripAngle(float strip) const =0
const GeomDetUnit * monoDet() const
double map_phi2(double phi)
double maxFractionOfMissedLayersPerCloud
unsigned int size() const
SiStripMatchedRecHit2D * CorrectMatchedHit(const TrackingRecHit *originalRH, const GluedGeomDet *gluedDet, const TrackerGeometry *tracker, const SiStripRecHitMatcher *theHitMatcher, double k0, double phi0)
double scalefactorRoadSeedWindow_
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
void use_rphiRecHits(bool input)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
double theMinimumHalfRoad
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
double phiMax(Roads::type roadType, double phi0, double k0)
RecHitVector::const_iterator begin_hits() const
double minFractionOfUsedLayersPerCloud
RoadSearchCloudCollection Clean(RoadSearchCloudCollection *rawColl)
std::vector< RoadSearchSeed > RoadSearchSeedCollection
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
double maxFractionOfConsecutiveMissedLayersPerCloud
const_iterator find(id_type i) const
double map_phi(double phi)
void run(edm::Handle< RoadSearchSeedCollection > input, const SiStripRecHit2DCollection *rphiRecHits, const SiStripRecHit2DCollection *stereoRecHits, const SiStripMatchedRecHit2DCollection *matchedRecHits, const SiPixelRecHitCollection *pixRecHits, const edm::EventSetup &es, RoadSearchCloudCollection &output)
Runs the algorithm.
virtual float strip(const LocalPoint &) const =0
double CheckZPhiIntersection(double iPhi1, double iZ1, double oPhi1, double oZ1, double iPhi2, double iZ2, double oPhi2, double oZ2)
std::vector< std::vector< const Ring * > > RoadSet
void makecircle(double x1_cs, double y1_cs, double x2_cs, double y2_cs, double x3_cs, double y3_cs)
unsigned int maxDetHitsInCloudPerDetId
virtual const Topology & topology() const =0
double CheckXYIntersection(LocalPoint &ip1, LocalPoint &op1, LocalPoint &ip2, LocalPoint &op2)
double phiFromExtrapolation(double d0, double phi0, double k0, double ringRadius, Roads::type roadType)
void addHit(const TrackingRecHit *input)
LocalPoint toLocal(const GlobalPoint &gp) const
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
double ZPhiDeltaPhi(double phi1, double phi2, double phiExpect)
const_iterator end() const
std::vector< TrackingRecHit * > getHitVector(const DetId *detid)
virtual const GeomDet * idToDet(DetId) const
std::pair< std::vector< const Ring * >, std::vector< const Ring * > > RoadSeed
void use_stereoRecHits(bool input)
bool isSingleLayer(DetId id)
RoadSearchCloudMakerAlgorithm(const edm::ParameterSet &conf)
RecHitVector::const_iterator end_hits() const
void setMode(accessMode input)
~RoadSearchCloudMakerAlgorithm()
T const * product() const
unsigned int FillRecHitsIntoCloudGeneral(DetId id, double d0, double phi0, double k0, double phi1, double k1, Roads::type roadType, double ringPhi, const TrackerGeometry *tracker, const SiStripRecHitMatcher *theHitMatcher, RoadSearchCloud &cloud)
T const * product() const
DetHitAccess recHitVectorClass
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const BoundPlane & surface() const
The nominal surface of the GeomDet.
unsigned int FillPixRecHitsIntoCloud(DetId id, const SiPixelRecHitCollection *inputRecHits, double d0, double phi0, double k0, Roads::type roadType, double ringPhi, const TrackerGeometry *tracker, RoadSearchCloud &cloud)
virtual float localStripLength(const LocalPoint &aLP) const =0
unsigned int increaseMaxNumberOfConsecutiveMissedLayersPerCloud
DetIdMap::const_iterator const_iterator
DetId geographicalId() const
virtual LocalPoint localPosition() const =0
unsigned int increaseMaxNumberOfMissedLayersPerCloud
std::vector< RoadSearchCloud > RoadSearchCloudCollection