41 return less_(*iLHS,*iRHS);
53 double originUncertainty,
57 double maxReducedChi2)
58 : maxHitsOnDetId_(maxHitsOnDetId)
59 , originUncertainty_(originUncertainty)
60 , phiBandWidth_(phiBandWidth)
61 , maxNormResid_(maxNormResid)
63 , maxReducedChi2_(maxReducedChi2)
98 LogDebug(
"") <<
" In prepareEvent " ;
137 LogDebug(
"") <<
" Leaving prepareEvent " ;
150 bool electronSuccess =
projectPhiBand(-1., superclusterIn, tTopo);
151 bool positronSuccess =
projectPhiBand( 1., superclusterIn, tTopo);
154 if ((electronSuccess && !positronSuccess) ||
167 std::ostringstream debugstr6;
168 debugstr6 <<
" HERE BEFORE SORT electron case " <<
" \n" ;
169 for (std::vector<const TrackingRecHit*>::iterator itHit=
outputHits_neg_.begin();
171 debugstr6 <<
" HIT "<<((*itHit)->geographicalId()).rawId()<<
" \n"
172 <<
" Local Position: "<<(*itHit)->localPosition()<<
" \n"
178 <<(((
TrackingGeometry*)(
tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).
z())<<
" \n";
185 debugstr6 <<
" Calling sort alongMomentum " <<
" \n";
192 debugstr6 <<
" Done with sort " <<
" \n";
194 debugstr6 <<
" HERE AFTER SORT electron case " <<
" \n";
195 for (std::vector<const TrackingRecHit*>::iterator itHit=
outputHits_neg_.begin();
197 debugstr6 <<
" HIT "<<((*itHit)->geographicalId()).rawId()<<
" \n"
198 <<
" Local Position: "<<(*itHit)->localPosition()<<
" \n"
204 <<(((
TrackingGeometry*)(
tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).
z())<<
" \n";;
213 for(std::vector<const TrackingRecHit*>::iterator itHit =
outputHits_neg_.begin();
218 LogDebug(
"") <<
" Assert failure " ;
232 trackCandidateOut.push_back(
TrackCandidate(hits, trajectorySeed, PTraj));
254 if ((!electronSuccess && positronSuccess) ||
267 std::ostringstream debugstr7;
268 debugstr7 <<
" HERE BEFORE SORT Positron case " <<
" \n";
269 for (std::vector<const TrackingRecHit*>::iterator itHit =
outputHits_pos_.begin();
271 debugstr7 <<
" HIT "<<((*itHit)->geographicalId()).rawId()<<
" \n"
272 <<
" Local Position: "<<(*itHit)->localPosition()<<
" \n"
278 <<(((
TrackingGeometry*)(
tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).
z())<<
" \n";
282 debugstr7 <<
" Calling sort alongMomentum " <<
" \n";
289 debugstr7 <<
" Done with sort " <<
" \n";
292 debugstr7 <<
" HERE AFTER SORT Positron case " <<
" \n";
293 for (std::vector<const TrackingRecHit*>::iterator itHit =
outputHits_pos_.begin();
295 debugstr7 <<
" HIT "<<((*itHit)->geographicalId()).rawId()<<
" \n"
296 <<
" Local Position: "<<(*itHit)->localPosition()<<
" \n"
302 <<(((
TrackingGeometry*)(
tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).
z())<<
" \n";
310 for(std::vector<const TrackingRecHit*>::iterator itHit =
outputHits_pos_.begin();
326 trackCandidateOut.push_back(
TrackCandidate(hits, trajectorySeed, PTraj));
369 for (; itdet != eddet; ++itdet) {
375 unsigned int numberOfHits = hits.
size();
384 if(!(*hit).isValid()) {
385 LogDebug(
"") <<
" InValid hit skipped in coarseHitSelection " << std::endl ;
389 bool isStereoDet =
false ;
406 LogDebug(
"") <<
" UHOH BIG PROBLEM - Unrecognized SI Layer" ;
411 if ((endcap && stereo && (theDet==
"TID" || theDet==
"TEC") && isStereoDet ) ||
412 (endcap && !stereo && (theDet==
"TID" || theDet==
"TEC") && !isStereoDet ) ||
413 (!endcap && stereo && (theDet==
"TIB" || theDet==
"TOB") && isStereoDet ) ||
414 (!endcap && !stereo && (theDet==
"TIB" || theDet==
"TOB" )&& !isStereoDet )
418 hitPointersOut.push_back(&(*
hit));
433 for (; itdet != eddet; ++itdet) {
439 unsigned int numberOfHits = 0;
450 if(!(*hit).isValid()) {
451 LogDebug(
"") <<
" InValid hit skipped in coarseMatchedHitSelection " << std::endl ;
457 coarseMatchedHitPointersOut.push_back(&(*
hit));
491 static const double rphiHitSmallestError = 0.0001 ;
492 static const double stereoHitSmallestError = 0.0001 ;
497 static const double stereoPitchAngle = 0.100 ;
498 static const double cos2SiPitchAngle =
cos(stereoPitchAngle)*
cos(stereoPitchAngle) ;
499 static const double sin2SiPitchAngle =
sin(stereoPitchAngle)*
sin(stereoPitchAngle) ;
502 static const double rphiErrFudge = 0.0200 ;
503 static const double stereoErrFudge = 0.0200 ;
506 static const double chi2HitMax = 25.0 ;
509 static const unsigned int nHitsLeftMinimum = 3 ;
512 std::vector<const SiStripRecHit2D*> stereoHits;
513 std::vector<const SiStripRecHit2D*> rphiBarrelHits;
514 std::vector<const SiStripRecHit2D*> zphiEndcapHits;
523 std::ostringstream debugstr1;
524 debugstr1 <<
" Getting barrel rphi hits " <<
" \n" ;
531 debugstr1 <<
" Getting matched hits " <<
" \n" ;
532 std::vector<const SiStripMatchedRecHit2D*> matchedHits;
537 double energy = superclusterIn->energy();
538 double pT = energy * superclusterIn->position().rho()/
sqrt(superclusterIn->x()*superclusterIn->x() +
539 superclusterIn->y()*superclusterIn->y() +
540 superclusterIn->z()*superclusterIn->z());
545 const double scr = superclusterIn->position().rho();
546 const double scz = superclusterIn->position().z();
549 std::vector<bool> uselist;
550 std::vector<double> rlist, philist, w2list;
551 std::vector<int> typelist;
552 std::vector<const SiStripRecHit2D*> hitlist;
554 std::vector<bool> matcheduselist;
555 std::vector<const SiStripMatchedRecHit2D*> matchedhitlist;
558 double zSlopeFitNumer = 0.;
559 double zSlopeFitDenom = 0.;
562 debugstr1 <<
" There are a total of " << stereoHits.size() <<
" stereoHits in this event " <<
" \n"
563 <<
" There are a total of " << rphiBarrelHits.size() <<
" rphiBarrelHits in this event " <<
" \n"
564 <<
" There are a total of " << zphiEndcapHits.size() <<
" zphiEndcapHits in this event " <<
" \n\n";
575 LogDebug(
"") <<
" Loop over matched hits " <<
" \n";
577 for (std::vector<const SiStripMatchedRecHit2D*>::const_iterator
hit = matchedHits.begin() ;
578 hit != matchedHits.end() ; ++
hit) {
586 double r =
sqrt(position.
x()*position.
x() + position.
y()*position.
y());
587 double phi =
unwrapPhi(position.
phi() - superclusterIn->position().phi());
588 double z = position.
z();
598 matcheduselist.push_back(
true);
599 matchedhitlist.push_back(*hit);
604 zSlopeFitNumer += -(scr -
r) * (z - scz);
605 zSlopeFitDenom += (scr -
r) * (scr - r);
614 if (zSlopeFitDenom > 0.) {
615 zVsRSlope = zSlopeFitNumer / zSlopeFitDenom;
623 LogDebug(
"") <<
" Loop over stereo hits" <<
" \n";
626 unsigned int numberOfStereoHits = 0;
627 for (std::vector<const SiStripRecHit2D*>::const_iterator
hit = stereoHits.begin();
hit != stereoHits.end(); ++
hit) {
632 double r_stereo =
sqrt(position.x()*position.x() + position.y()*position.y());
633 double phi_stereo =
unwrapPhi(position.phi() - superclusterIn->position().phi());
637 double r_stereo_err =
sqrt((*hit)->localPositionError().xx()*cos2SiPitchAngle +
638 (*hit)->localPositionError().yy()*sin2SiPitchAngle ) ;
644 if(r_stereo_err > stereoHitSmallestError ) {
645 r_stereo_err =
sqrt(r_stereo_err*r_stereo_err+stereoErrFudge*stereoErrFudge);
649 bool thisHitIsMatched =
false ;
653 unsigned int matcheduselist_size = matcheduselist.size();
654 for (
unsigned int i = 0;
i < matcheduselist_size;
i++) {
655 if (matcheduselist[
i]) {
656 OmniClusterRef const & mystereocluster = matchedhitlist[
i]->stereoClusterRef();
657 if( stereocluster == mystereocluster ) {
658 thisHitIsMatched =
true ;
665 if(thisHitIsMatched) {
667 uselist.push_back(
true);
668 rlist.push_back(r_stereo);
669 philist.push_back(phi_stereo);
670 w2list.push_back(1./(r_stereo_err/r_stereo)/(r_stereo_err/r_stereo));
671 typelist.push_back(0);
672 hitlist.push_back(*hit);
680 LogDebug(
"") <<
" There are " << uselist.size() <<
" good hits after stereo loop " ;
684 LogDebug(
"") <<
" Looping over barrel rphi hits " ;
685 unsigned int rphiMatchedCounter = 0 ;
686 unsigned int rphiUnMatchedCounter = 0 ;
687 unsigned int numberOfBarrelRphiHits = 0;
688 for (std::vector<const SiStripRecHit2D*>::const_iterator
hit = rphiBarrelHits.begin();
hit != rphiBarrelHits.end(); ++
hit) {
692 double r =
sqrt(position.x()*position.x() + position.y()*position.y());
693 double phi =
unwrapPhi(position.phi() - superclusterIn->position().phi());
694 double z = position.z();
695 double r_mono_err =
sqrt((*hit)->localPositionError().xx()) ;
698 if( r_mono_err > rphiHitSmallestError) {
700 r_mono_err=
sqrt(r_mono_err*r_mono_err+rphiErrFudge*rphiErrFudge);
707 (tTopo->
tibLayer((*hit)->geographicalId())==1 || tTopo->
tibLayer((*hit)->geographicalId())==2)) ||
709 && (tTopo->
tobLayer((*hit)->geographicalId())==1 || tTopo->
tobLayer((*hit)->geographicalId())==2)) ) {
710 bool thisHitIsMatched =
false ;
711 unsigned int matcheduselist_size = matcheduselist.size();
712 for (
unsigned int i = 0;
i < matcheduselist_size;
i++) {
713 if (matcheduselist[
i]) {
714 OmniClusterRef const & mymonocluster = matchedhitlist[
i]->monoClusterRef();
715 if( monocluster == mymonocluster ) {
716 thisHitIsMatched =
true ;
722 if( thisHitIsMatched ) {
724 uselist.push_back(
true);
726 philist.push_back(phi);
727 w2list.push_back(1./(r_mono_err/r)/(r_mono_err/r));
728 typelist.push_back(1);
729 hitlist.push_back(*hit);
730 rphiMatchedCounter++;
737 double zFit = zVsRSlope * (r -
scr) + scz;
750 uselist.push_back(
true);
752 philist.push_back(phi);
753 w2list.push_back(1./(r_mono_err/r)/(r_mono_err/r));
754 typelist.push_back(1);
755 hitlist.push_back(*hit);
756 rphiUnMatchedCounter++;
765 LogDebug(
"") <<
" There are " << rphiMatchedCounter <<
" matched rphi hits";
766 LogDebug(
"") <<
" There are " << rphiUnMatchedCounter <<
" unmatched rphi hits";
767 LogDebug(
"") <<
" There are " << uselist.size() <<
" good stereo+rphi hits " ;
777 LogDebug(
"") <<
" Looping over barrel zphi hits " ;
780 unsigned int numberOfEndcapZphiHits = 0;
781 for (std::vector<const SiStripRecHit2D*>::const_iterator
hit = zphiEndcapHits.begin();
782 hit != zphiEndcapHits.end(); ++
hit) {
787 double z = position.
z();
788 double phi =
unwrapPhi(position.
phi() - superclusterIn->position().phi());
792 double rFit = (z - scz)/zVsRSlope + scr;
803 uselist.push_back(
true);
804 rlist.push_back(rFit);
805 philist.push_back(phi);
806 w2list.push_back(1./(0.05/rFit)/(0.05/rFit));
807 typelist.push_back(2);
808 hitlist.push_back(*hit);
814 LogDebug(
"") <<
" There are " << uselist.size() <<
" good stereo+rphi+zphi hits " ;
818 std::ostringstream debugstr5;
819 debugstr5 <<
" List of hits before uniqification " <<
" \n" ;
820 for (
unsigned int i = 0;
i < uselist.size();
i++) {
823 debugstr5 <<
" DetID " << ((hit)->geographicalId()).rawId()
825 <<
" Phi " << philist[
i]
826 <<
" Weight " << w2list[
i]
827 <<
" PhiPred " << (rlist[
i]-
scr)*phiVsRSlope
828 <<
" Chi2 " << (philist[i]-(rlist[i]-scr)*phiVsRSlope)*(philist[i]-(rlist[i]-scr)*phiVsRSlope)*w2list[i]
832 debugstr5 <<
" \n\n\n" ;
834 debugstr5 <<
" Counting number of unique detectors " <<
" \n" ;
836 debugstr5 <<
" These are all the detectors with hits " <<
" \n";
840 std::vector<uint32_t> detIdList ;
842 for (
unsigned int i = 0;
i < uselist.size();
i++) {
845 uint32_t detIDUsed = ((hit)->geographicalId()).rawId() ;
847 debugstr5<<
" DetId " << detIDUsed <<
"\n";
849 detIdList.push_back(detIDUsed) ;
854 debugstr5 <<
" There are " << detIdList.size() <<
" hits on detectors \n";
857 std::sort(detIdList.begin(), detIdList.end());
859 std::unique(detIdList.begin(), detIdList.end()), detIdList.end());
861 debugstr5 <<
" There are " << detIdList.size() <<
" unique detectors \n";
867 debugstr5 <<
" Looping over detectors to choose best hit " <<
" \n";
870 for (
unsigned int idet = 0 ; idet < detIdList.size() ; idet++ ) {
871 for (
unsigned int i = 0;
i+1 < uselist.size();
i++) {
875 double r_hit1 = rlist[
i];
876 double phi_hit1 = philist[
i];
877 double w2_hit1 = w2list[
i] ;
878 double phi_pred1 = (r_hit1-
scr)*phiVsRSlope ;
879 double chi1 = (phi_hit1-phi_pred1)*(phi_hit1-phi_pred1)*w2_hit1;
880 if(detIdList[idet]== ((hit1)->geographicalId()).rawId()) {
881 for (
unsigned int j = i+1;
j < uselist.size();
j++) {
884 if(detIdList[idet]== ((hit2)->geographicalId()).rawId()) {
886 debugstr5 <<
" Found 2 hits on same Si Detector "
887 << ((hit2)->geographicalId()).rawId() <<
"\n";
890 double r_hit2 = rlist[
j];
891 double phi_hit2 = philist[
j];
892 double w2_hit2 = w2list[
j] ;
893 double phi_pred2 = (r_hit2-
scr)*phiVsRSlope ;
894 double chi2 = (phi_hit2-phi_pred2)*(phi_hit2-phi_pred2)*w2_hit2;
896 debugstr5 <<
" Chi1 " << chi1 <<
" Chi2 " << chi2 <<
"\n";
918 for (
unsigned int i = 0;
i < uselist.size();
i++ ) {
920 double localchi2 = (philist[
i]-(rlist[
i]-
scr)*phiVsRSlope)*(philist[
i]-(rlist[
i]-
scr)*phiVsRSlope)*w2list[
i] ;
921 if(localchi2 > chi2HitMax ) {
924 debugstr5 <<
" Throwing out "
925 <<
" DetID " << ((hit)->geographicalId()).rawId()
927 <<
" Phi " << philist[
i]
928 <<
" Weight " << w2list[
i]
929 <<
" PhiPred " << (rlist[
i]-
scr)*phiVsRSlope
930 <<
" Chi2 " << (philist[i]-(rlist[i]-scr)*phiVsRSlope)*(philist[i]-(rlist[i]-scr)*phiVsRSlope)*w2list[i]
939 debugstr5 <<
" List of hits after uniqification " <<
" \n" ;
940 for (
unsigned int i = 0;
i < uselist.size();
i++) {
943 debugstr5 <<
" DetID " << ((hit)->geographicalId()).rawId()
945 <<
" Phi " << philist[
i]
946 <<
" Weight " << w2list[
i]
947 <<
" PhiPred " << (rlist[
i]-
scr)*phiVsRSlope
948 <<
" Chi2 " << (philist[i]-(rlist[i]-scr)*phiVsRSlope)*(philist[i]-(rlist[i]-scr)*phiVsRSlope)*w2list[i]
952 debugstr5 <<
" \n\n\n" ;
956 unsigned int nHitsLeft =0;
957 for (
unsigned int i = 0;
i < uselist.size();
i++) {
962 if(nHitsLeft < nHitsLeftMinimum ) {
964 debugstr5 <<
" Too few hits "<< nHitsLeft
965 <<
" left - return false " <<
" \n";
976 double intercept = 0 ;
980 std::ostringstream debugstr4;
981 debugstr4 <<
" Calc of phi(r) "<<
" \n";
991 double phiBarOld = 0.;
995 double r2BarOld = 0.;
997 double phirBarOld = 0.;
998 double totalWeight = 0.;
999 double totalWeightOld = 0.;
1000 unsigned int uselist_size = uselist.size();
1001 for (
unsigned int i = 0;
i < uselist_size;
i++) {
1003 double r = rlist[
i];
1004 double phi = philist[
i];
1005 double weight2 = w2list[
i];
1007 totalWeight = totalWeightOld + weight2 ;
1012 double totalWeightRatio = totalWeightOld/totalWeight ;
1013 double localWeightRatio = weight2/totalWeight ;
1015 phiBar = phiBarOld*totalWeightRatio + phi*localWeightRatio ;
1016 rBar = rBarOld*totalWeightRatio + r*localWeightRatio ;
1017 r2Bar= r2BarOld*totalWeightRatio + r*r*localWeightRatio ;
1018 phirBar = phirBarOld*totalWeightRatio + phi*r*localWeightRatio ;
1020 totalWeightOld = totalWeight ;
1021 phiBarOld = phiBar ;
1024 phirBarOld = phirBar ;
1026 debugstr4 <<
" totalWeight " << totalWeight
1027 <<
" totalWeightRatio " << totalWeightRatio
1028 <<
" localWeightRatio "<< localWeightRatio
1029 <<
" phiBar " << phiBar
1031 <<
" r2Bar " << r2Bar
1032 <<
" phirBar " << phirBar
1038 slope = (phirBar-phiBar*rBar)/(r2Bar-rBar*rBar);
1039 intercept = phiBar-slope*rBar ;
1041 debugstr4 <<
" end of loop slope " << slope
1042 <<
" intercept " << intercept <<
" \n";
1046 double biggest_normresid = -1.;
1047 unsigned int biggest_index = 0;
1048 for (
unsigned int i = 0;
i < uselist_size;
i++) {
1050 double r = rlist[
i];
1051 double phi = philist[
i];
1052 double weight2 = w2list[
i];
1054 double normresid = weight2 * (phi - intercept - slope*
r)*(phi - intercept - slope*r);
1057 if (normresid > biggest_normresid) {
1058 biggest_normresid = normresid;
1066 debugstr4 <<
"Dropping hit from fit due to Chi2 " <<
" \n" ;
1068 debugstr4 <<
" DetID " << ((hit)->geographicalId()).rawId()
1069 <<
" R " << rlist[biggest_index]
1070 <<
" Phi " << philist[biggest_index]
1071 <<
" Weight " << w2list[biggest_index]
1072 <<
" PhiPred " << (rlist[biggest_index]-
scr)*phiVsRSlope
1073 <<
" Chi2 " << (philist[biggest_index]-(rlist[biggest_index]-scr)*phiVsRSlope)*(philist[biggest_index]-(rlist[biggest_index]-scr)*phiVsRSlope)*w2list[biggest_index]
1074 <<
" normresid " << biggest_normresid
1077 uselist[biggest_index] =
false;
1085 <<
" Intercept " << intercept
1086 <<
" slope " << slope
1097 double innerhitRadius = -1.;
1100 std::vector<const TrackingRecHit*> outputHits;
1102 std::vector<SiStripRecHit2D> outputRphiHits;
1103 std::vector<SiStripRecHit2D> outputStereoHits;
1108 for (
unsigned int i = 0;
i < uselist.size();
i++) {
1110 double r = rlist[
i];
1119 if (typelist[i] == 0) {
1120 numberOfStereoHits++;
1123 outputHits.push_back(hit);
1124 outputStereoHits.push_back(*hit);
1126 else if (typelist[i] == 1) {
1127 numberOfBarrelRphiHits++;
1130 outputHits.push_back(hit);
1131 outputRphiHits.push_back(*hit);
1133 else if (typelist[i] == 2) {
1134 numberOfEndcapZphiHits++;
1137 outputHits.push_back(hit);
1138 outputRphiHits.push_back(*hit);
1143 unsigned int totalNumberOfHits = numberOfStereoHits + numberOfBarrelRphiHits + numberOfEndcapZphiHits;
1144 double reducedChi2 = (totalNumberOfHits > 2 ? chi2 / (totalNumberOfHits - 2) : 1e10);
1153 throw cms::Exception(
"projectPhiBand") <<
"Pointer to tracker product is null!";
1160 double correct_pT = pT * phiVsRSlope /
slope;
1163 double phi = intercept + slope*
sqrt(position.
x()*position.
x() + position.
y()*position.
y()) + superclusterIn->position().phi();
1166 double pZ = correct_pT * zVsRSlope;
1171 if (chargeHypothesis > 0.) {
1212 LogDebug(
"") <<
" return from projectFindBand with True \n" << std::endl ;
1217 LogDebug(
"") <<
" return from projectFindBand with False \n" << std::endl ;
const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator end(bool update=false) const
std::vector< const TrackingRecHit * > outputHits_pos_
unsigned int tibLayer(const DetId &id) const
std::vector< SiStripRecHit2D > outputRphiHits_pos_
const edm::Handle< SiStripRecHit2DCollection > * stereoHits_hp_
GlobalPoint position_pos_
GlobalPoint position_neg_
virtual ~SiStripElectronAlgo()
const SiStripRecHit2D * innerhit_neg_
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
static const double slope[3]
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Sin< T >::type sin(const T &t)
std::vector< TrackCandidate > TrackCandidateCollection
uint32_t tobStereo(const DetId &id) const
Geom::Phi< T > phi() const
Global3DPoint GlobalPoint
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const SiStripRecHit2D * innerhit_pos_
uint32_t rawId() const
get the raw id
std::vector< SiStripRecHit2D > outputStereoHits_pos_
uint32_t tidStereo(const DetId &id) const
GlobalVector momentum_pos_
std::map< const TrackingRecHit *, bool > matchedHitUsed_
std::vector< SiStripElectron > SiStripElectronCollection
collectin of SiStripElectron objects
Cos< T >::type cos(const T &t)
GlobalVector momentum_neg_
data_type const * data(size_t cell) const
const SiStripRecHit2DCollection * rphiHits_p_
Abs< T >::type abs(const T &t)
double unwrapPhi(double phi) const
std::map< const SiStripRecHit2D *, unsigned int > stereoKey_
unsigned numberOfBarrelRphiHits_neg_
std::vector< SiStripRecHit2D > outputRphiHits_neg_
const SiStripRecHit2DCollection * stereoHits_p_
bool findElectron(reco::SiStripElectronCollection &electronOut, TrackCandidateCollection &trackCandidateOut, const reco::SuperClusterRef &superclusterIn, const TrackerTopology *tTopo)
unsigned int numberOfStereoHits_pos_
unsigned numberOfEndcapZphiHits_neg_
bool projectPhiBand(float chargeHypothesis, const reco::SuperClusterRef &superclusterIn, const TrackerTopology *tTopo)
T const * product() const
unsigned int numberOfBarrelRphiHits_pos_
std::vector< SiStripRecHit2D > outputStereoHits_neg_
void coarseHitSelection(std::vector< const SiStripRecHit2D * > &hitPointersOut, const TrackerTopology *tTopo, bool stereo, bool endcap)
const TrackerGeometry * tracker_p_
T const * product() const
const edm::Handle< SiStripRecHit2DCollection > * rphiHits_hp_
double originUncertainty_
const SiStripMatchedRecHit2DCollection * matchedHits_p_
unsigned numberOfStereoHits_neg_
std::map< const SiStripMatchedRecHit2D *, unsigned int > matchedKey_
T perp() const
Magnitude of transverse component.
static std::atomic< unsigned int > counter
static int position[264][3]
uint32_t tecStereo(const DetId &id) const
std::map< const TrackingRecHit *, bool > hitUsed_
void coarseMatchedHitSelection(std::vector< const SiStripMatchedRecHit2D * > &coarseMatchedHitPointersOut)
const MagneticField * magneticField_p_
DetId geographicalId() const
volatile std::atomic< bool > shutdown_flag false
std::map< const SiStripRecHit2D *, unsigned int > rphiKey_
uint32_t tibStereo(const DetId &id) const
SiStripElectronAlgo(unsigned int maxHitsOnDetId, double originUncertainty, double phiBandWidth, double maxNormResid, unsigned int minHits, double maxReducedChi2)
unsigned int maxHitsOnDetId_
unsigned int numberOfEndcapZphiHits_pos_
virtual LocalPoint localPosition() const final
const_iterator begin(bool update=false) const
unsigned int tobLayer(const DetId &id) const
void prepareEvent(const edm::ESHandle< TrackerGeometry > &tracker, const edm::Handle< SiStripRecHit2DCollection > &rphiHits, const edm::Handle< SiStripRecHit2DCollection > &stereoHits, const edm::Handle< SiStripMatchedRecHit2DCollection > &matchedHits, const edm::ESHandle< MagneticField > &magneticField)
Global3DVector GlobalVector
std::vector< const TrackingRecHit * > outputHits_neg_
const TrackerGeomDet * idToDet(DetId) const