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) {
515 LogDebug(
"RoadSearch") <<
" Testing hit at (x/y/z): "
531 tracker, theHitMatcher,
533 if (theCorrectedHit != 0){
536 double hitRadius =
sqrt(ghit.
x()*ghit.
x()+ghit.
y()*ghit.
y());
540 float dp = (hitphi-
phi);
541 float dx = hitRadius*
tan(dp);
543 LogDebug(
"RoadSearch") <<
" Hit phi = " << hitphi <<
" expected phi = " << phi
544 <<
" dx = " << dx <<
" for dxMax = " <<
phiMax(roadType,phi0,k0);
553 delete theCorrectedHit;
561 double hitRadius =
sqrt(ghit.
x()*ghit.
x()+ghit.
y()*ghit.
y());
565 float dp = (hitphi-
phi);
566 float dx = hitRadius*
tan(dp);
567 LogDebug(
"RoadSearch") <<
" Hit phi = " << hitphi <<
" expected phi = " << phi
568 <<
" dx = " << dx <<
" for dxMax = " <<
phiMax(roadType,phi0,k0);
604 innerRoadLocal, outerRoadLocal);
606 LogDebug(
"RoadSearch") <<
" Hit phi inner = " << innerHitGlobal.
phi() <<
" and outer = " << outerHitGlobal.
phi()
607 <<
" expected inner phi = " << innerExtrapolatedPhi
608 <<
" and outer phi = " << outerExtrapolatedPhi
609 <<
" dx = " << dxinter <<
" for dxMax = " <<
phiMax(roadType,phi0,k0);
611 if ( fabs(dxinter) <
phiMax(roadType,phi0,k0)) {
636 tracker, theHitMatcher,
638 if (theCorrectedHit != 0){
642 double hitZ = ghit.
z();
645 float dp = hitphi-
phi;
646 float dx = hitZ*
tan(dp);
657 delete theCorrectedHit;
680 double midPointZ = 0.5*(innerHitZ+outerHitZ);
683 innerExtrapolatedPhi, innerHitZ,
684 outerExtrapolatedPhi, outerHitZ);
686 double dX = midPointZ*
tan(dPhiInter);
718 double deltaX = hitZ*
tan(deltaPhi);
740 double hitRadius =
sqrt(ghit.
x()*ghit.
x()+ghit.
y()*ghit.
y());
744 float dp = hitphi-
phi;
745 float dx = hitRadius*
tan(dp);
766 double hitRadius =
sqrt(ghit.x()*ghit.x()+ghit.y()*ghit.y());
782 float dx = ghit.
z()*
tan(dphi);
791 edm::LogError(
"RoadSearch") <<
"recHitVector from general hit access function contains unknown detector id: " << (
unsigned int)
id.subdetId() <<
" rawId: " <<
id.rawId();
801 double d0,
double phi0,
double k0,
Roads::type roadType,
double ringPhi,
805 unsigned int usedRecHits = 0;
816 if (recHitMatch == inputRecHits->
end())
return usedRecHits;
821 recHitIterator != recHitRange.
end(); ++recHitIterator) {
831 double hitRadius =
sqrt(ghit.
x()*ghit.
x()+ghit.
y()*ghit.
y());
854 double hitRadius =
sqrt(ghit.x()*ghit.x()+ghit.y()*ghit.y());
871 if ( (phi -
phiMax(roadType,phi0,k0)) < ringPhi && (phi +
phiMax(roadType,phi0,k0))>ringPhi ) {
886 if ( !tibid.
glued() ) {
891 if ( !tobid.
glued() ) {
896 if ( !tidid.
glued() ) {
901 if ( !tecid.
glued() ) {
927 double ringPhi = -99.;
929 double omega=
k0, rl=ringRadius;
930 double sp0=
sin(phi0);
double cp0=
cos(phi0);
931 if (fabs(omega)>0.000005){
932 double xc=-sp0*(d0+1.0/omega);
933 double yc=cp0*(d0+1.0/omega);
934 double rh=fabs(1.0/omega);
935 double bbb=fabs(d0+1.0/omega);
936 double sss=0.5*(rl+rh+bbb);
937 double ddd=
sqrt((sss-bbb)*(sss-rh)/(sss*(sss-rl)));
938 double phil1=2.0*atan(ddd);
939 double phit=phi0+phil1;
if (omega<0.0)phit=phi0-phil1;
940 double xh=xc+
sin(phit)/omega;
941 double yh=yc-
cos(phit)/omega;
942 double phih=atan2(yh,xh);
946 double cee = rl*rl - d0*d0 -0.25*omega*omega - omega*
d0;
947 if (cee<0.0){
return ringPhi;}
948 double l =
sqrt(cee);
949 double xh=-sp0*d0+l*cp0-0.5*l*l*omega*sp0;
950 double yh= cp0*d0+l*sp0+0.5*l*l*omega*cp0;
951 double phih=atan2(yh,xh);
956 ringPhi =
map_phi(phi0 + k0 * ringRadius);
963 double phi0,
double k0) {
983 double x2,
double y2,
double x3,
double y3){
984 double x1t=x1-x3;
double y1t=y1-y3;
double r1s=x1t*x1t+y1t*y1t;
985 double x2t=x2-x3;
double y2t=y2-y3;
double r2s=x2t*x2t+y2t*y2t;
986 double rho=x1t*y2t-x2t*y1t;
987 double xc, yc, rc, fac;
990 fac=
sqrt(x1t*x1t+y1t*y1t);
995 xc=fac*(r1s*y2t-r2s*y1t);
996 yc=fac*(r2s*x1t-r1s*x2t);
997 rc=
sqrt(xc*xc+yc*yc); xc+=x3; yc+=y3;
1000 double f1=x1*yc-y1*xc;
double f2=x2*yc-y2*xc;
1001 double f3=x3*yc-y3*xc;
1002 if ((f1<0.0)&&(f2<0.0)&&(f3<=0.0))s3=1.0;
1003 if ((f1>0.0)&&(f2>0.0)&&(f3>=0.0))s3=-1.0;
1004 d0h=-s3*(
sqrt(xc*xc+yc*yc)-rc);
1012 double deltaX = -999.;
1015 double det12 = inner1.
x()*outer1.
y() - inner1.
y()*outer1.
x();
1016 double det34 = inner2.
x()*outer2.
y() - inner2.
y()*outer2.
x();
1018 double xinter = (det12*(inner2.
x()-outer2.
x()) - det34*(inner1.
x()-outer1.
x()))/
1019 ((inner1.
x()-outer1.
x())*(inner2.
y()-outer2.
y()) -
1020 (inner2.
x()-outer2.
x())*(inner1.
y()-outer1.
y()));
1023 if (inner1.
x() < outer1.
x()){
1024 if ((xinter<inner1.
x()) || (xinter>outer1.
x())) inter =
false;
1027 if ((xinter>inner1.
x()) || (xinter<outer1.
x())) inter =
false;
1030 if (inner2.
x() < outer2.
x()){
1031 if ((xinter<inner2.
x()) || (xinter>outer2.
x())) inter =
false;
1034 if ((xinter>inner2.
x()) || (xinter<outer2.
x())) inter =
false;
1041 deltaX =
min(fabs(inner1.
x()-inner2.
x()),fabs(outer1.
x()-outer2.
x()));
1048 double iPhi2,
double iZ2,
double oPhi2,
double oZ2){
1060 double det12 = iZ1*oPhi1 - iPhi1*oZ1;
1061 double det34 = iZ2*oPhi2 - iPhi2*oZ2;
1063 double xinter = (det12*(iZ2-oZ2) - det34*(iZ1-oZ1))/
1064 ((iZ1-oZ1)*(iPhi2-oPhi2) -
1065 (iZ2-oZ2)*(iPhi1-oPhi1));
1069 if ((xinter<iZ1) || (xinter>oZ1)) inter =
false;
1072 if ((xinter>iZ1) || (xinter<oZ1)) inter =
false;
1076 if ((xinter<iZ2) || (xinter>oZ2)) inter =
false;
1079 if ((xinter>iZ2) || (xinter<oZ2)) inter =
false;
1086 deltaPhi =
min(fabs(iPhi2-iPhi1),fabs(oPhi2-oPhi1));
1097 double dPhiHits =
map_phi2(hitPhi1-hitPhi2);
1098 double dPhi1 =
map_phi2(hitPhi1-predictedPhi);
1099 double dPhi2 =
map_phi2(hitPhi2-predictedPhi);
1102 if ( (dPhi1>=0.0) && (dPhi2 <= 0.0))
1112 if ( (dPhi1<=0.0) && (dPhi2 >= 0.0))
1134 if ( inputCollection->empty() ){
1135 LogDebug(
"RoadSearch") <<
"Found " << output.size() <<
" clean clouds.";
1143 if ( 1==inputCollection->size() ){
1144 output = *inputCollection;
1148 LogDebug(
"RoadSearch") <<
"Found " << output.size() <<
" clean clouds.";
1155 std::vector<bool> already_gone(inputCollection->size());
1156 for (
unsigned int i=0;
i<inputCollection->size(); ++
i) {
1157 already_gone[
i] =
false;
1160 int raw_cloud_ctr=0;
1162 for ( RoadSearchCloudCollection::const_iterator raw_cloud = inputCollection->begin(); raw_cloud != inputCollection->end(); ++raw_cloud) {
1165 if (already_gone[raw_cloud_ctr-1])
continue;
1173 int second_cloud_ctr=raw_cloud_ctr;
1174 for ( RoadSearchCloudCollection::const_iterator second_cloud = raw_cloud+1; second_cloud != inputCollection->end(); ++second_cloud) {
1177 std::vector<const TrackingRecHit*> unshared_hits;
1179 if ( already_gone[second_cloud_ctr-1] )
continue;
1181 for ( RoadSearchCloud::RecHitVector::const_iterator second_cloud_hit = second_cloud->begin_hits();
1182 second_cloud_hit != second_cloud->end_hits();
1183 ++ second_cloud_hit ) {
1184 bool is_shared =
false;
1185 for ( RoadSearchCloud::RecHitVector::const_iterator lone_cloud_hit = lone_cloud.
begin_hits();
1186 lone_cloud_hit != lone_cloud.
end_hits();
1187 ++ lone_cloud_hit ) {
1189 if ((*lone_cloud_hit)->geographicalId() == (*second_cloud_hit)->geographicalId())
1190 if ((*lone_cloud_hit)->localPosition().x() == (*second_cloud_hit)->localPosition().x())
1191 if ((*lone_cloud_hit)->localPosition().y() == (*second_cloud_hit)->localPosition().y())
1192 {is_shared=
true;
break;}
1194 if (!is_shared) unshared_hits.push_back(*second_cloud_hit);
1196 if ( ((
float(unshared_hits.size())/
float(lone_cloud.
size())) >
1198 ((float(unshared_hits.size())/
float(second_cloud->size())) > (1-
mergingFraction_))){
1209 double f_lone_shared=double(second_cloud->size()-unshared_hits.size())/
double(lone_cloud.
size());
1210 double f_second_shared=double(second_cloud->size()-unshared_hits.size())/
double(second_cloud->size());
1212 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)) )
1215 LogDebug(
"RoadSearch") <<
" Merge CloudA: " << raw_cloud_ctr <<
" with CloudB: " << second_cloud_ctr
1216 <<
" Shared fractions are " << f_lone_shared <<
" and " << f_second_shared;
1221 for (
unsigned int k=0;
k<unshared_hits.size(); ++
k) {
1222 lone_cloud.
addHit(unshared_hits[
k]);
1225 already_gone[second_cloud_ctr-1]=
true;
1231 output.push_back(lone_cloud);
1235 LogDebug(
"RoadSearch") <<
"Found " << output.size() <<
" clean clouds.";
1244 double k0,
double phi0) {
1248 std::cout<<
" Could not cast original hit" << std::endl;
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),
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_
double deltaPhi(float phi1, float phi2)
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)
virtual LocalPoint localPosition() const
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)
virtual uint32_t glued() const
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.
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
const SiStripRecHit2D * monoHit() const
virtual LocalPoint localPosition() const =0
unsigned int increaseMaxNumberOfMissedLayersPerCloud
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
std::vector< RoadSearchCloud > RoadSearchCloudCollection