CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripElectronAlgo Class Reference

#include <RecoEgamma/EgammaElectronAlgos/interface/SiStripElectronAlgo.h>

Public Member Functions

bool findElectron (reco::SiStripElectronCollection &electronOut, TrackCandidateCollection &trackCandidateOut, const reco::SuperClusterRef &superclusterIn)
 
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)
 
 SiStripElectronAlgo (unsigned int maxHitsOnDetId, double originUncertainty, double phiBandWidth, double maxNormResid, unsigned int minHits, double maxReducedChi2)
 
virtual ~SiStripElectronAlgo ()
 

Private Member Functions

void coarseBarrelMonoHitSelection (std::vector< const SiStripRecHit2D * > &monoHitPointersOut)
 
void coarseEndcapMonoHitSelection (std::vector< const SiStripRecHit2D * > &monoHitPointersOut)
 
void coarseHitSelection (std::vector< const SiStripRecHit2D * > &hitPointersOut, bool stereo, bool endcap)
 
void coarseMatchedHitSelection (std::vector< const SiStripMatchedRecHit2D * > &coarseMatchedHitPointersOut)
 
const SiStripElectronAlgooperator= (const SiStripElectronAlgo &)
 
bool projectPhiBand (float chargeHypothesis, const reco::SuperClusterRef &superclusterIn)
 
 SiStripElectronAlgo (const SiStripElectronAlgo &)
 
double unwrapPhi (double phi) const
 

Private Attributes

double chi2_neg_
 
double chi2_pos_
 
double correct_pT_neg_
 
double correct_pT_pos_
 
std::map< const TrackingRecHit
*, bool > 
hitUsed_
 
const SiStripRecHit2Dinnerhit_neg_
 
const SiStripRecHit2Dinnerhit_pos_
 
double intercept_neg_
 
double intercept_pos_
 
const MagneticFieldmagneticField_p_
 
const edm::Handle
< SiStripMatchedRecHit2DCollection > * 
matchedHits_hp_
 
const
SiStripMatchedRecHit2DCollection
matchedHits_p_
 
std::map< const TrackingRecHit
*, bool > 
matchedHitUsed_
 
std::map< const
SiStripMatchedRecHit2D
*, unsigned int > 
matchedKey_
 
unsigned int maxHitsOnDetId_
 
double maxNormResid_
 
double maxReducedChi2_
 
unsigned int minHits_
 
GlobalVector momentum_neg_
 
GlobalVector momentum_pos_
 
int ndof_neg_
 
int ndof_pos_
 
unsigned numberOfBarrelRphiHits_neg_
 
unsigned int numberOfBarrelRphiHits_pos_
 
unsigned numberOfEndcapZphiHits_neg_
 
unsigned int numberOfEndcapZphiHits_pos_
 
unsigned int numberOfMatchedHits_pos_
 
unsigned numberOfStereoHits_neg_
 
unsigned int numberOfStereoHits_pos_
 
double originUncertainty_
 
std::vector< const
TrackingRecHit * > 
outputHits_neg_
 
std::vector< const
TrackingRecHit * > 
outputHits_pos_
 
std::vector< SiStripRecHit2DoutputMatchedHits_neg_
 
std::vector< SiStripRecHit2DoutputRphiHits_neg_
 
std::vector< SiStripRecHit2DoutputRphiHits_pos_
 
std::vector< SiStripRecHit2DoutputStereoHits_neg_
 
std::vector< SiStripRecHit2DoutputStereoHits_pos_
 
double phiBandWidth_
 
double phiVsRSlope_neg_
 
double phiVsRSlope_pos_
 
GlobalPoint position_neg_
 
GlobalPoint position_pos_
 
double pZ_neg_
 
double pZ_pos_
 
double redchi2_neg_
 
double redchi2_pos_
 
const edm::Handle
< SiStripRecHit2DCollection > * 
rphiHits_hp_
 
const SiStripRecHit2DCollectionrphiHits_p_
 
std::map< const
SiStripRecHit2D *, unsigned
int > 
rphiKey_
 
double slope_neg_
 
double slope_pos_
 
const edm::Handle
< SiStripRecHit2DCollection > * 
stereoHits_hp_
 
const SiStripRecHit2DCollectionstereoHits_p_
 
std::map< const
SiStripRecHit2D *, unsigned
int > 
stereoKey_
 
const TrackerGeometrytracker_p_
 
double zVsRSlope_neg_
 
double zVsRSlope_pos_
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 58 of file SiStripElectronAlgo.h.

Constructor & Destructor Documentation

SiStripElectronAlgo::SiStripElectronAlgo ( unsigned int  maxHitsOnDetId,
double  originUncertainty,
double  phiBandWidth,
double  maxNormResid,
unsigned int  minHits,
double  maxReducedChi2 
)

Definition at line 58 of file SiStripElectronAlgo.cc.

64  : maxHitsOnDetId_(maxHitsOnDetId)
65  , originUncertainty_(originUncertainty)
66  , phiBandWidth_(phiBandWidth)
67  , maxNormResid_(maxNormResid)
68  , minHits_(minHits)
69  , maxReducedChi2_(maxReducedChi2)
70 {
71 }
SiStripElectronAlgo::~SiStripElectronAlgo ( )
virtual

Definition at line 78 of file SiStripElectronAlgo.cc.

79 {
80 }
SiStripElectronAlgo::SiStripElectronAlgo ( const SiStripElectronAlgo )
private

Member Function Documentation

void SiStripElectronAlgo::coarseBarrelMonoHitSelection ( std::vector< const SiStripRecHit2D * > &  monoHitPointersOut)
private
void SiStripElectronAlgo::coarseEndcapMonoHitSelection ( std::vector< const SiStripRecHit2D * > &  monoHitPointersOut)
private
void SiStripElectronAlgo::coarseHitSelection ( std::vector< const SiStripRecHit2D * > &  hitPointersOut,
bool  stereo,
bool  endcap 
)
private

Definition at line 357 of file SiStripElectronAlgo.cc.

References edmNew::DetSet< T >::begin(), edmNew::DetSetVector< T >::begin(), edmNew::DetSet< T >::detId(), edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), funct::false, TrackerGeometry::idToDetUnit(), TOBDetId::layer(), TIBDetId::layer(), LogDebug, maxHitsOnDetId_, rphiHits_p_, edmNew::DetSet< T >::size(), stereoHits_p_, GeomDetEnumerators::TEC, GeomDetEnumerators::TIB, GeomDetEnumerators::TID, GeomDetEnumerators::TOB, tracker_p_, funct::true, TIDDetId::wheel(), and TECDetId::wheel().

Referenced by projectPhiBand().

359 {
360  // This function is not time-efficient. If you want to improve the
361  // speed of the algorithm, you'll probably want to change this
362  // function. There may be a more efficienct way to extract hits,
363  // and it would definitely help to put a geographical cut on the
364  // DetIds. (How does one determine the global position of a given
365  // DetId? Is tracker_p_->idToDet(id)->surface().toGlobal(LocalPosition(0,0,0))
366  // expensive?)
367 
368  // Loop over the detector ids
371  for (; itdet != eddet; ++itdet) {
372  // Get the hits on this detector id
373  SiStripRecHit2DCollection::DetSet hits = *itdet;
374  DetId id(hits.detId());
375 
376  // Count the number of hits on this detector id
377  unsigned int numberOfHits = hits.size();
378 
379  // Only take the hits if there aren't too many
380  // (Would it be better to loop only once, fill a temporary list,
381  // and copy that if numberOfHits <= maxHitsOnDetId_?)
382  if (numberOfHits <= maxHitsOnDetId_) {
384  hit != hits.end(); ++hit) {
385  // check that hit is valid first !
386  if(!(*hit).isValid()) {
387  LogDebug("") << " InValid hit skipped in coarseHitSelection " << std::endl ;
388  continue ;
389  }
390  std::string theDet = "null";
391  int theLayer = -999;
392  bool isStereoDet = false ;
393  if(tracker_p_->idToDetUnit(hit->geographicalId())->type().subDetector() == GeomDetEnumerators::TIB) {
394  theDet = "TIB" ;
395  theLayer = TIBDetId(id).layer();
396  if(TIBDetId(id).stereo()==1) { isStereoDet = true ; }
397  } else if
398  (tracker_p_->idToDetUnit(hit->geographicalId())->type().subDetector() == GeomDetEnumerators::TOB) {
399  theDet = "TOB" ;
400  theLayer = TOBDetId(id).layer();
401  if(TOBDetId(id).stereo()==1) { isStereoDet = true ; }
402  }else if
403  (tracker_p_->idToDetUnit(hit->geographicalId())->type().subDetector() == GeomDetEnumerators::TID) {
404  theDet = "TID" ;
405  theLayer = TIDDetId(id).wheel(); // or ring ?
406  if(TIDDetId(id).stereo()==1) { isStereoDet = true ; }
407  }else if
408  (tracker_p_->idToDetUnit(hit->geographicalId())->type().subDetector() == GeomDetEnumerators::TEC) {
409  theDet = "TEC" ;
410  theLayer = TECDetId(id).wheel(); // or ring or petal ?
411  if(TECDetId(id).stereo()==1) { isStereoDet = true ; }
412  } else {
413  LogDebug("") << " UHOH BIG PROBLEM - Unrecognized SI Layer" ;
414  LogDebug("") << " Det "<< theDet << " Lay " << theLayer ;
415  assert(1!=1) ;
416  }
417 
418  if ((endcap && stereo && (theDet=="TID" || theDet== "TEC") && isStereoDet ) ||
419  (endcap && !stereo && (theDet=="TID" || theDet== "TEC") && !isStereoDet ) ||
420  (!endcap && stereo && (theDet=="TIB" || theDet=="TOB") && isStereoDet ) ||
421  (!endcap && !stereo && (theDet=="TIB" || theDet=="TOB" )&& !isStereoDet )
422  ) {
423 
424 
425  hitPointersOut.push_back(&(*hit));
426 
427  } // end if this is the right subdetector
428  } // end loop over hits
429  } // end if this detector id doesn't have too many hits on it
430  } // end loop over detector ids
431 }
#define LogDebug(id)
type
Definition: HCALResponse.h:22
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator begin() const
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
const SiStripRecHit2DCollection * rphiHits_p_
const_iterator end() const
const SiStripRecHit2DCollection * stereoHits_p_
Definition: DetId.h:20
const TrackerGeometry * tracker_p_
id_type detId() const
Definition: DetSetNew.h:72
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
iterator end()
Definition: DetSetNew.h:59
size_type size() const
Definition: DetSetNew.h:75
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
iterator begin()
Definition: DetSetNew.h:56
void SiStripElectronAlgo::coarseMatchedHitSelection ( std::vector< const SiStripMatchedRecHit2D * > &  coarseMatchedHitPointersOut)
private

Definition at line 435 of file SiStripElectronAlgo.cc.

References edmNew::DetSet< T >::begin(), edmNew::DetSetVector< T >::begin(), edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), LogDebug, matchedHits_p_, maxHitsOnDetId_, StripSubdetector::TIB, and StripSubdetector::TOB.

Referenced by projectPhiBand().

436 {
437 
438  // Loop over the detector ids
440  for (; itdet != eddet; ++itdet) {
441 
442  // Get the hits on this detector id
444 
445  // Count the number of hits on this detector id
446  unsigned int numberOfHits = 0;
448  if ( !((hit->geographicalId()).subdetId() == StripSubdetector::TIB) &&
449  !( (hit->geographicalId()).subdetId() == StripSubdetector::TOB )) { break;}
450  numberOfHits++;
451  if (numberOfHits > maxHitsOnDetId_) { break; }
452  }
453 
454  // Only take the hits if there aren't too many
455  if (numberOfHits <= maxHitsOnDetId_) {
457  if(!(*hit).isValid()) {
458  LogDebug("") << " InValid hit skipped in coarseMatchedHitSelection " << std::endl ;
459  continue ;
460  }
461  if ( !((hit->geographicalId()).subdetId() == StripSubdetector::TIB) &&
462  !( (hit->geographicalId()).subdetId() == StripSubdetector::TOB )) { break;}
463 
464  coarseMatchedHitPointersOut.push_back(&(*hit));
465  } // end loop over hits
466 
467  } // end if this detector id doesn't have too many hits on it
468  } // end loop over detector ids
469 
470 
471 }// end of matchedHitSelection
#define LogDebug(id)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator begin() const
const_iterator end() const
const SiStripMatchedRecHit2DCollection * matchedHits_p_
iterator end()
Definition: DetSetNew.h:59
iterator begin()
Definition: DetSetNew.h:56
bool SiStripElectronAlgo::findElectron ( reco::SiStripElectronCollection electronOut,
TrackCandidateCollection trackCandidateOut,
const reco::SuperClusterRef superclusterIn 
)

Definition at line 150 of file SiStripElectronAlgo.cc.

References alongMomentum, chi2_neg_, chi2_pos_, correct_pT_neg_, correct_pT_pos_, benchmark_cfg::errors, TrackingRecHit::geographicalId(), hitUsed_, TrackerGeometry::idToDet(), innerhit_neg_, innerhit_pos_, intercept_neg_, intercept_pos_, LogDebug, magneticField_p_, momentum_neg_, momentum_pos_, ndof_neg_, ndof_pos_, numberOfBarrelRphiHits_neg_, numberOfBarrelRphiHits_pos_, numberOfEndcapZphiHits_neg_, numberOfEndcapZphiHits_pos_, numberOfStereoHits_neg_, numberOfStereoHits_pos_, outputHits_neg_, outputHits_pos_, outputRphiHits_neg_, outputRphiHits_pos_, outputStereoHits_neg_, outputStereoHits_pos_, perp(), phi, phiVsRSlope_neg_, phiVsRSlope_pos_, position_neg_, position_pos_, projectPhiBand(), edm::OwnVector< T, P >::push_back(), pZ_neg_, pZ_pos_, DetId::rawId(), redchi2_neg_, redchi2_pos_, slope_neg_, slope_pos_, python.multivaluedict::sort(), evf::utils::state, tracker_p_, detailsBasic3DVector::z, zVsRSlope_neg_, and zVsRSlope_pos_.

Referenced by SiStripElectronProducer::produce().

153 {
154  // Try each of the two charge hypotheses, but only take one
155  bool electronSuccess = projectPhiBand(-1., superclusterIn);
156  bool positronSuccess = projectPhiBand( 1., superclusterIn);
157 
158  // electron hypothesis did better than electron
159  if ((electronSuccess && !positronSuccess) ||
160  (electronSuccess && positronSuccess && redchi2_neg_ <= redchi2_pos_)) {
161 
162  // Initial uncertainty for tracking
163  AlgebraicSymMatrix errors(5,1); // makes identity 5x5 matrix, indexed from (1,1) to (5,5)
164  errors(1,1) = 3.; // uncertainty**2 in 1/momentum
165  errors(2,2) = 0.01; // uncertainty**2 in lambda (lambda == pi/2 - polar angle theta)
166  errors(3,3) = 0.0001; // uncertainty**2 in phi
167  errors(4,4) = 0.01; // uncertainty**2 in x_transverse (where x is in cm)
168  errors(5,5) = 0.01; // uncertainty**2 in y_transverse (where y is in cm)
169 
170  // JED Debugging possible double hit sort problem
171  std::ostringstream debugstr6;
172  debugstr6 << " HERE BEFORE SORT electron case " << " \n" ;
173  for (std::vector<const TrackingRecHit*>::iterator itHit=outputHits_neg_.begin();
174  itHit != outputHits_neg_.end(); ++itHit) {
175  debugstr6 <<" HIT "<<((*itHit)->geographicalId()).rawId()<<" \n"
176  <<" Local Position: "<<(*itHit)->localPosition()<<" \n"
177  <<" Global Rho: "
178  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).perp())
179  <<" Phi "
180  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).phi())
181  << " Z "
182  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).z())<< " \n";
183  }
184  // end of dump
185 
186 
187 
188  // JED call dump
189  debugstr6 << " Calling sort alongMomentum " << " \n";
190 
193 
194 
195  debugstr6 << " Done with sort " << " \n";
196 
197  debugstr6 << " HERE AFTER SORT electron case " << " \n";
198  for (std::vector<const TrackingRecHit*>::iterator itHit=outputHits_neg_.begin();
199  itHit != outputHits_neg_.end(); ++itHit) {
200  debugstr6 <<" HIT "<<((*itHit)->geographicalId()).rawId()<<" \n"
201  <<" Local Position: "<<(*itHit)->localPosition()<<" \n"
202  <<" Global Rho: "
203  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).perp())
204  <<" Phi "
205  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).phi())
206  << " Z "
207  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).z())<< " \n";;
208  }
209  // end of dump
210 
211  LogDebug("")<< debugstr6.str();
212 
213 
214  //create an OwnVector needed by the classes which will be stored to the Event
216  for(std::vector<const TrackingRecHit*>::iterator itHit =outputHits_neg_.begin();
217  itHit != outputHits_neg_.end();
218  ++itHit) {
219  hits.push_back( (*itHit)->clone());
220  if( !(hitUsed_.find(*itHit) != hitUsed_.end()) ) {
221  LogDebug("") << " Assert failure " ;
222  assert(hitUsed_.find(*itHit) != hitUsed_.end());
223  }
224  hitUsed_[*itHit] = true;
225  }
226 
231 
232  TrajectoryStateTransform transformer;
233  PTrajectoryStateOnDet* PTraj = transformer.persistentState(state, innerhit_neg_->geographicalId().rawId());
234  TrajectorySeed trajectorySeed(*PTraj, hits, alongMomentum);
235  trackCandidateOut.push_back(TrackCandidate(hits, trajectorySeed, *PTraj));
236 
237  electronOut.push_back(reco::SiStripElectron(superclusterIn,
238  -1,
242  slope_neg_,
243  intercept_neg_ + superclusterIn->position().phi(),
244  chi2_neg_,
245  ndof_neg_,
247  pZ_neg_,
252 
253  delete PTraj; // ShR: fix memory leak reported per perfrmance task force
254 
255  return true;
256  }
257 
258  // positron hypothesis did better than electron
259  if ((!electronSuccess && positronSuccess) ||
260  (electronSuccess && positronSuccess && redchi2_neg_ > redchi2_pos_)) {
261 
262  // Initial uncertainty for tracking
263  AlgebraicSymMatrix errors(5,1); // makes identity 5x5 matrix, indexed from (1,1) to (5,5)
264  errors(1,1) = 3.; // uncertainty**2 in 1/momentum
265  errors(2,2) = 0.01; // uncertainty**2 in lambda (lambda == pi/2 - polar angle theta)
266  errors(3,3) = 0.0001; // uncertainty**2 in phi
267  errors(4,4) = 0.01; // uncertainty**2 in x_transverse (where x is in cm)
268  errors(5,5) = 0.01; // uncertainty**2 in y_transverse (where y is in cm)
269 
270  // JED Debugging possible double hit sort problem
271  std::ostringstream debugstr7;
272  debugstr7 << " HERE BEFORE SORT Positron case " << " \n";
273  for (std::vector<const TrackingRecHit*>::iterator itHit = outputHits_pos_.begin();
274  itHit != outputHits_pos_.end(); ++itHit) {
275  debugstr7 <<" HIT "<<((*itHit)->geographicalId()).rawId()<<" \n"
276  <<" Local Position: "<<(*itHit)->localPosition()<<" \n"
277  <<" Global Rho: "
278  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).perp())
279  <<" Phi "
280  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).phi())
281  << " Z "
282  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).z())<< " \n";
283  }
284  // end of dump
285 
286  debugstr7 << " Calling sort alongMomentum " << " \n";
287 
290 
291  debugstr7 << " Done with sort " << " \n";
292 
293  // JED Debugging possible double hit sort problem
294  debugstr7 << " HERE AFTER SORT Positron case " << " \n";
295  for (std::vector<const TrackingRecHit*>::iterator itHit = outputHits_pos_.begin();
296  itHit != outputHits_pos_.end(); ++itHit) {
297  debugstr7 <<" HIT "<<((*itHit)->geographicalId()).rawId()<<" \n"
298  <<" Local Position: "<<(*itHit)->localPosition()<<" \n"
299  <<" Global Rho: "
300  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).perp())
301  <<" Phi "
302  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).phi())
303  << " Z "
304  <<(((TrackingGeometry*)(tracker_p_))->idToDet((*itHit)->geographicalId())->surface().toGlobal((*itHit)->localPosition()).z())<< " \n";
305  }
306  // end of dump
307  LogDebug("") << debugstr7.str();
308 
309  //create an OwnVector needed by the classes which will be stored to the Event
311  for(std::vector<const TrackingRecHit*>::iterator itHit =outputHits_pos_.begin();
312  itHit != outputHits_pos_.end();
313  ++itHit) {
314  hits.push_back( (*itHit)->clone());
315  assert(hitUsed_.find(*itHit) != hitUsed_.end());
316  hitUsed_[*itHit] = true;
317  }
318 
323 
324  TrajectoryStateTransform transformer;
325  PTrajectoryStateOnDet* PTraj = transformer.persistentState(state, innerhit_pos_->geographicalId().rawId());
326  TrajectorySeed trajectorySeed(*PTraj, hits, alongMomentum);
327  trackCandidateOut.push_back(TrackCandidate(hits, trajectorySeed, *PTraj));
328 
329  electronOut.push_back(reco::SiStripElectron(superclusterIn,
330  1,
334  slope_pos_,
335  intercept_pos_ + superclusterIn->position().phi(),
336  chi2_pos_,
337  ndof_pos_,
339  pZ_pos_,
344 
345  delete PTraj; // JED: fix of 2nd memory leak reported per perfrmance task force
346 
347  return true;
348  }
349 
350  return false;
351 }
#define LogDebug(id)
std::vector< const TrackingRecHit * > outputHits_pos_
std::vector< SiStripRecHit2D > outputRphiHits_pos_
const SiStripRecHit2D * innerhit_neg_
const SiStripRecHit2D * innerhit_pos_
double double double z
bool projectPhiBand(float chargeHypothesis, const reco::SuperClusterRef &superclusterIn)
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
void push_back(D *&d)
Definition: OwnVector.h:290
std::vector< SiStripRecHit2D > outputStereoHits_pos_
virtual const GeomDet * idToDet(DetId) const
std::vector< SiStripRecHit2D > outputRphiHits_neg_
unsigned int numberOfStereoHits_pos_
unsigned int numberOfBarrelRphiHits_pos_
std::vector< SiStripRecHit2D > outputStereoHits_neg_
const TrackerGeometry * tracker_p_
char state
Definition: procUtils.cc:75
T perp() const
Magnitude of transverse component.
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::map< const TrackingRecHit *, bool > hitUsed_
const MagneticField * magneticField_p_
DetId geographicalId() const
unsigned int numberOfEndcapZphiHits_pos_
std::vector< const TrackingRecHit * > outputHits_neg_
Definition: DDAxes.h:10
const SiStripElectronAlgo& SiStripElectronAlgo::operator= ( const SiStripElectronAlgo )
private
void SiStripElectronAlgo::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 
)

Definition at line 98 of file SiStripElectronAlgo.cc.

References cmsDriverOptions::counter, edmNew::DetSetVector< T >::data(), hitUsed_, LogDebug, magneticField_p_, matchedHits_p_, matchedHitUsed_, matchedKey_, edm::Handle< T >::product(), edm::ESHandle< class >::product(), rphiHits_hp_, rphiHits_p_, rphiKey_, stereoHits_hp_, stereoHits_p_, stereoKey_, and tracker_p_.

Referenced by SiStripElectronProducer::produce().

103 {
104  LogDebug("") << " In prepareEvent " ;
105 
106  tracker_p_ = tracker.product();
107  rphiHits_p_ = rphiHits.product();
108  stereoHits_p_ = stereoHits.product();
109  matchedHits_p_ = matchedHits.product();
110  magneticField_p_ = magneticField.product();
111 
112  rphiHits_hp_ = &rphiHits;
113  stereoHits_hp_ = &stereoHits;
114 
115  // Keep a table that relates hit pointers to their index (key) in the collections
116  rphiKey_.clear();
117  stereoKey_.clear();
118  // Keep track of which hits have been used already (so a hit is assigned to only one electron)
119  hitUsed_.clear();
120  matchedHitUsed_.clear();
121 
122  unsigned int counter = 0;
124  rphiKey_[&(*it)] = counter;
125  hitUsed_[&(*it)] = false;
126  counter++;
127  }
128 
129  counter = 0;
131  stereoKey_[&(*it)] = counter;
132  hitUsed_[&(*it)] = false;
133  counter++;
134  }
135 
136  counter = 0;
138  matchedKey_[&(*it)] = counter;
139  matchedHitUsed_[&(*it)] = false;
140  counter++;
141  }
142 
143  LogDebug("") << " Leaving prepareEvent " ;
144 }
#define LogDebug(id)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const edm::Handle< SiStripRecHit2DCollection > * stereoHits_hp_
std::map< const TrackingRecHit *, bool > matchedHitUsed_
data_type const * data(size_t cell) const
const SiStripRecHit2DCollection * rphiHits_p_
std::map< const SiStripRecHit2D *, unsigned int > stereoKey_
const SiStripRecHit2DCollection * stereoHits_p_
const TrackerGeometry * tracker_p_
T const * product() const
Definition: ESHandle.h:62
const edm::Handle< SiStripRecHit2DCollection > * rphiHits_hp_
const SiStripMatchedRecHit2DCollection * matchedHits_p_
T const * product() const
Definition: Handle.h:74
std::map< const SiStripMatchedRecHit2D *, unsigned int > matchedKey_
std::map< const TrackingRecHit *, bool > hitUsed_
const MagneticField * magneticField_p_
std::map< const SiStripRecHit2D *, unsigned int > rphiKey_
bool SiStripElectronAlgo::projectPhiBand ( float  chargeHypothesis,
const reco::SuperClusterRef superclusterIn 
)
private

Definition at line 479 of file SiStripElectronAlgo.cc.

References abs, chi2_neg_, chi2_pos_, coarseHitSelection(), coarseMatchedHitSelection(), correct_pT_neg_, correct_pT_pos_, funct::cos(), generateEDF::done, relval_parameters_module::energy, funct::false, TrackingRecHit::geographicalId(), hitUsed_, i, TrackerGeometry::idToDet(), TrackerGeometry::idToDetUnit(), innerhit_neg_, innerhit_pos_, intercept_neg_, intercept_pos_, MagneticField::inTesla(), j, BaseSiTrackerRecHit2DLocalPos::localPosition(), LogDebug, magneticField_p_, matchedHitUsed_, maxNormResid_, maxReducedChi2_, minHits_, momentum_neg_, momentum_pos_, ndof_neg_, ndof_pos_, numberOfBarrelRphiHits_neg_, numberOfBarrelRphiHits_pos_, numberOfEndcapZphiHits_neg_, numberOfEndcapZphiHits_pos_, numberOfStereoHits_neg_, numberOfStereoHits_pos_, originUncertainty_, outputHits_neg_, outputHits_pos_, outputRphiHits_neg_, outputRphiHits_pos_, outputStereoHits_neg_, outputStereoHits_pos_, phi, PV3DBase< T, PVType, FrameType >::phi(), phiBandWidth_, phiVsRSlope_neg_, phiVsRSlope_pos_, position, position_neg_, position_pos_, pZ_neg_, pZ_pos_, csvReporter::r, redchi2_neg_, redchi2_pos_, funct::sin(), slope, slope_neg_, slope_pos_, python.multivaluedict::sort(), mathSSE::sqrt(), GeomDetEnumerators::TIB, GeomDetEnumerators::TOB, GeomDet::toGlobal(), tracker_p_, funct::true, unwrapPhi(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), detailsBasic3DVector::z, PV3DBase< T, PVType, FrameType >::z(), zVsRSlope_neg_, and zVsRSlope_pos_.

Referenced by findElectron().

480 {
481  // This algorithm projects a phi band into the tracker three times:
482  // (a) for all stereo hits, (b) for barrel rphi hits, and (c) for
483  // endcap zphi hits. While accumulating stereo hits in step (a),
484  // we fit r vs z to a line. This resolves the ambiguity in z for
485  // rphi hits and the ambiguity in r for zphi hits. We can then cut
486  // on the z of rphi hits (a little wider than one strip length),
487  // and we can convert the z of zphi hits into r to apply the phi
488  // band cut. (We don't take advantage of the endcap strips'
489  // segmentation in r.)
490  //
491  // As we project a phi band into the tracker, we count hits within
492  // that band and performs a linear fit for phi vs r. The number of
493  // hits and reduced chi^2 from the fit are used to select a good
494  // candidate.
495 
496  // set limits on Si hits - smallest error that makes sense = 1 micron ?
497  static const double rphiHitSmallestError = 0.0001 ;
498  static const double stereoHitSmallestError = 0.0001 ;
499  //not used since endcap is not implemented
500  // static const double zphiHitSmallestError = 0.0001 ;
501 
502 
503  static const double stereoPitchAngle = 0.100 ; // stereo angle in rad
504  static const double cos2SiPitchAngle = cos(stereoPitchAngle)*cos(stereoPitchAngle) ;
505  static const double sin2SiPitchAngle = sin(stereoPitchAngle)*sin(stereoPitchAngle) ;
506  // overall misalignment fudge to be added in quad to position errors.
507  // this is a rough approx to values reported in tracking meet 5/16/2007
508  static const double rphiErrFudge = 0.0200 ;
509  static const double stereoErrFudge = 0.0200 ;
510 
511  // max chi2 of a hit on an SiDet relative to the prediction
512  static const double chi2HitMax = 25.0 ;
513 
514  // Minimum number of hits to consider on a candidate
515  static const unsigned int nHitsLeftMinimum = 3 ;
516 
517  // Create and fill vectors of pointers to hits
518  std::vector<const SiStripRecHit2D*> stereoHits;
519  std::vector<const SiStripRecHit2D*> rphiBarrelHits;
520  std::vector<const SiStripRecHit2D*> zphiEndcapHits;
521 
522  // stereo? endcap?
523  coarseHitSelection(stereoHits, true, false);
524 
525  // skip endcap stereo for now
526  // LogDebug("") << " Getting endcap stereo hits " ;
527  // coarseHitSelection(stereoHits, true, true);
528  std::ostringstream debugstr1;
529  debugstr1 << " Getting barrel rphi hits " << " \n" ;
530 
531  coarseHitSelection(rphiBarrelHits, false, false);
532 
533  // LogDebug("") << " Getting endcap zphi hits " ;
534  // coarseHitSelection(zphiEndcapHits, false, true);
535 
536  debugstr1 << " Getting matched hits " << " \n" ;
537  std::vector<const SiStripMatchedRecHit2D*> matchedHits;
538  coarseMatchedHitSelection(matchedHits);
539 
540 
541  // Determine how to project from the supercluster into the tracker
542  double energy = superclusterIn->energy();
543  double pT = energy * superclusterIn->position().rho()/sqrt(superclusterIn->x()*superclusterIn->x() +
544  superclusterIn->y()*superclusterIn->y() +
545  superclusterIn->z()*superclusterIn->z());
546  // cf Jackson p. 581-2, a little geometry
547  double phiVsRSlope = -3.00e-3 * chargeHypothesis * magneticField_p_->inTesla(GlobalPoint(superclusterIn->x(), superclusterIn->y(), 0.)).z() / pT / 2.;
548 
549  // Shorthand for supercluster radius, z
550  const double scr = superclusterIn->position().rho();
551  const double scz = superclusterIn->position().z();
552 
553  // These are used to fit all hits to a line in phi(r)
554  std::vector<bool> uselist;
555  std::vector<double> rlist, philist, w2list;
556  std::vector<int> typelist; // stereo = 0, rphi barrel = 1, and zphi disk = 2 (only used in this function)
557  std::vector<const SiStripRecHit2D*> hitlist;
558 
559  std::vector<bool> matcheduselist;
560  std::vector<const SiStripMatchedRecHit2D*> matchedhitlist;
561 
562  // These are used to fit the stereo hits to a line in z(r), constrained to pass through supercluster
563  double zSlopeFitNumer = 0.;
564  double zSlopeFitDenom = 0.;
565 
566 
567  debugstr1 << " There are a total of " << stereoHits.size() << " stereoHits in this event " << " \n"
568  << " There are a total of " << rphiBarrelHits.size() << " rphiBarrelHits in this event " << " \n"
569  << " There are a total of " << zphiEndcapHits.size() << " zphiEndcapHits in this event " << " \n\n";
570 
571 
572  LogDebug("") << debugstr1.str() ;
573 
575 
576 
577  // Loop over all matched hits
578  // make a list of good matched rechits.
579  // in the stereo and rphi loops check to see if the hit is associated with a matchedhit
580  LogDebug("") << " Loop over matched hits " << " \n";
581 
582  for (std::vector<const SiStripMatchedRecHit2D*>::const_iterator hit = matchedHits.begin() ;
583  hit != matchedHits.end() ; ++ hit) {
584 
585  assert(matchedHitUsed_.find(*hit) != matchedHitUsed_.end());
586 
587  if (!matchedHitUsed_[*hit]) {
588 
589  // Calculate the 3-D position of this hit
590  GlobalPoint position = tracker_p_->idToDet((*hit)->geographicalId())->surface().toGlobal((*hit)->localPosition());
591  double r = sqrt(position.x()*position.x() + position.y()*position.y());
592  double phi = unwrapPhi(position.phi() - superclusterIn->position().phi()); // phi is relative to supercluster
593  double z = position.z();
594 
595  // Cut a triangle in the z-r plane using the supercluster's eta/dip angle information
596  // and the fact that the electron originated *near* the origin
597  if ((-originUncertainty_ + (scz + originUncertainty_)*(r/scr)) < z && z < (originUncertainty_ + (scz - originUncertainty_)*(r/scr))) {
598 
599  // Cut a narrow band around the supercluster's projection in phi
600  if (unwrapPhi((r-scr)*phiVsRSlope - phiBandWidth_) < phi && phi < unwrapPhi((r-scr)*phiVsRSlope + phiBandWidth_)) {
601 
602 
603  matcheduselist.push_back(true);
604  matchedhitlist.push_back(*hit);
605 
606 
607 
608  // Use this hit to fit z(r)
609  zSlopeFitNumer += -(scr - r) * (z - scz);
610  zSlopeFitDenom += (scr - r) * (scr - r);
611 
612  } // end cut on phi band
613  } // end cut on electron originating *near* the origin
614  } // end assign disjoint sets of hits to electrons
615  } // end loop over matched hits
616 
617  // Calculate the linear fit for z(r)
618  double zVsRSlope;
619  if (zSlopeFitDenom > 0.) {
620  zVsRSlope = zSlopeFitNumer / zSlopeFitDenom;
621  }
622  else {
623  // zVsRSlope assumes electron is from origin if there were no stereo hits
624  zVsRSlope = scz/scr;
625  }
626 
627  // // Loop over all stereo hits
628  LogDebug("") << " Loop over stereo hits" << " \n";
629 
630  // check if the stereo hit is matched to one of the matched hit
631  unsigned int numberOfStereoHits = 0;
632  for (std::vector<const SiStripRecHit2D*>::const_iterator hit = stereoHits.begin(); hit != stereoHits.end(); ++hit) {
633  assert(hitUsed_.find(*hit) != hitUsed_.end());
634 
635  // Calculate the 3-D position of this hit
636  GlobalPoint position = tracker_p_->idToDet((*hit)->geographicalId())->surface().toGlobal((*hit)->localPosition());
637  double r_stereo = sqrt(position.x()*position.x() + position.y()*position.y());
638  double phi_stereo = unwrapPhi(position.phi() - superclusterIn->position().phi()); // phi is relative to supercluster
639  // double z_stereo = position.z();
640 
641  // stereo is has a pitch of 100 mrad - so consider both components
642  double r_stereo_err = sqrt((*hit)->localPositionError().xx()*cos2SiPitchAngle +
643  (*hit)->localPositionError().yy()*sin2SiPitchAngle ) ;
644 
645 
646 
647  // make sure that the error for this hit is sensible, ie > 1 micron
648  // otherwise skip this hit
649  if(r_stereo_err > stereoHitSmallestError ) {
650  r_stereo_err = sqrt(r_stereo_err*r_stereo_err+stereoErrFudge*stereoErrFudge);
651 
652  const SiStripRecHit2D::ClusterRef & stereocluster=(*hit)->cluster();
653 
654  bool thisHitIsMatched = false ;
655 
656  if (!hitUsed_[*hit]) {
657 
658  unsigned int matcheduselist_size = matcheduselist.size();
659  for (unsigned int i = 0; i < matcheduselist_size; i++) {
660  if (matcheduselist[i]) {
661  const SiStripRecHit2D::ClusterRef & mystereocluster = matchedhitlist[i]->stereoHit()->cluster();
662  if( stereocluster == mystereocluster ) {
663  thisHitIsMatched = true ;
664  // LogDebug("")<< " This hit is matched " << tracker_p_->idToDet(matchedhitlist[i]->stereoHit()->geographicalId())->surface().toGlobal(matchedhitlist[i]->stereoHit()->localPosition()) << std::endl;
665  // break ;
666  }
667  } // check if matcheduselist okay
668  }// loop over matched hits
669 
670  if(thisHitIsMatched) {
671  // Use this hit to fit phi(r)
672  uselist.push_back(true);
673  rlist.push_back(r_stereo);
674  philist.push_back(phi_stereo);
675  w2list.push_back(1./(r_stereo_err/r_stereo)/(r_stereo_err/r_stereo)); // weight**2 == 1./uncertainty**2
676  typelist.push_back(0);
677  hitlist.push_back(*hit);
678  } // thisHitIsMatched
679  } // if(!hitUsed)
680 
681  } // end of check on hit position error size
682 
683  } // end loop over stereo hits
684 
685  LogDebug("") << " There are " << uselist.size() << " good hits after stereo loop " ;
686 
687 
688  // Loop over barrel rphi hits
689  LogDebug("") << " Looping over barrel rphi hits " ;
690  unsigned int rphiMatchedCounter = 0 ;
691  unsigned int rphiUnMatchedCounter = 0 ;
692  unsigned int numberOfBarrelRphiHits = 0;
693  for (std::vector<const SiStripRecHit2D*>::const_iterator hit = rphiBarrelHits.begin(); hit != rphiBarrelHits.end(); ++hit) {
694  assert(hitUsed_.find(*hit) != hitUsed_.end());
695  // Calculate the 2.5-D position of this hit
696  GlobalPoint position = tracker_p_->idToDet((*hit)->geographicalId())->surface().toGlobal((*hit)->localPosition());
697  double r = sqrt(position.x()*position.x() + position.y()*position.y());
698  double phi = unwrapPhi(position.phi() - superclusterIn->position().phi()); // phi is relative to supercluster
699  double z = position.z();
700  double r_mono_err = sqrt((*hit)->localPositionError().xx()) ;
701 
702  // only consider hits with errors that make sense
703  if( r_mono_err > rphiHitSmallestError) {
704  // inflate the reported error
705  r_mono_err=sqrt(r_mono_err*r_mono_err+rphiErrFudge*rphiErrFudge);
706 
707  const SiStripRecHit2D::ClusterRef & monocluster=(*hit)->cluster();
708 
709 
710  if (!hitUsed_[*hit]) {
711  if( (tracker_p_->idToDetUnit((*hit)->geographicalId())->type().subDetector() == GeomDetEnumerators::TIB &&
712  (TIBDetId((*hit)->geographicalId()).layer()==1 || TIBDetId((*hit)->geographicalId()).layer()==2)) ||
713  (tracker_p_->idToDetUnit((*hit)->geographicalId())->type().subDetector() == GeomDetEnumerators::TOB
714  && (TOBDetId((*hit)->geographicalId()).layer()==1 || TOBDetId((*hit)->geographicalId()).layer()==2)) ) {
715  bool thisHitIsMatched = false ;
716  unsigned int matcheduselist_size = matcheduselist.size();
717  for (unsigned int i = 0; i < matcheduselist_size; i++) {
718  if (matcheduselist[i]) {
719  const SiStripRecHit2D::ClusterRef & mymonocluster = matchedhitlist[i]->monoHit()->cluster();
720  if( monocluster == mymonocluster ) {
721  thisHitIsMatched = true ;
722  }
723  } // check if matcheduselist okay
724  }// loop over matched hits
725 
726 
727  if( thisHitIsMatched ) {
728  // Use this hit to fit phi(r)
729  uselist.push_back(true);
730  rlist.push_back(r);
731  philist.push_back(phi);
732  w2list.push_back(1./(r_mono_err/r)/(r_mono_err/r)); // weight**2 == 1./uncertainty**2
733  typelist.push_back(1);
734  hitlist.push_back(*hit);
735  rphiMatchedCounter++;
736  } // end of matched hit check
737 
738  } else {
739 
740 
741  // The expected z position of this hit, according to the z(r) fit
742  double zFit = zVsRSlope * (r - scr) + scz;
743 
744  // Cut on the Z of the strip
745  // TIB strips are 11 cm long, TOB strips are 19 cm long (can I get these from a function?)
746  if ((tracker_p_->idToDetUnit((*hit)->geographicalId())->type().subDetector() == GeomDetEnumerators::TIB &&
747  std::abs(z - zFit) < 12.) ||
748  (tracker_p_->idToDetUnit((*hit)->geographicalId())->type().subDetector() == GeomDetEnumerators::TOB &&
749  std::abs(z - zFit) < 20.) ) {
750 
751  // Cut a narrow band around the supercluster's projection in phi
752  if (unwrapPhi((r-scr)*phiVsRSlope - phiBandWidth_) < phi && phi < unwrapPhi((r-scr)*phiVsRSlope + phiBandWidth_)) {
753 
754  // Use this hit to fit phi(r)
755  uselist.push_back(true);
756  rlist.push_back(r);
757  philist.push_back(phi);
758  w2list.push_back(1./(r_mono_err/r)/(r_mono_err/r)); // weight**2 == 1./uncertainty**2
759  typelist.push_back(1);
760  hitlist.push_back(*hit);
761  rphiUnMatchedCounter++;
762 
763  } // end cut on phi band
764  } // end cut on strip z
765  } // loop over TIB/TOB layer 1,2
766  } // end assign disjoint sets of hits to electrons
767  } // end of check on rphi hit position error size
768  } // end loop over barrel rphi hits
769 
770  LogDebug("") << " There are " << rphiMatchedCounter <<" matched rphi hits";
771  LogDebug("") << " There are " << rphiUnMatchedCounter <<" unmatched rphi hits";
772  LogDebug("") << " There are " << uselist.size() << " good stereo+rphi hits " ;
773 
774 
775 
776 
777 
778 
780 
781  // Loop over endcap zphi hits
782  LogDebug("") << " Looping over barrel zphi hits " ;
783 
784 
785  unsigned int numberOfEndcapZphiHits = 0;
786  for (std::vector<const SiStripRecHit2D*>::const_iterator hit = zphiEndcapHits.begin();
787  hit != zphiEndcapHits.end(); ++hit) {
788  assert(hitUsed_.find(*hit) != hitUsed_.end());
789  if (!hitUsed_[*hit]) {
790  // Calculate the 2.5-D position of this hit
791  GlobalPoint position = tracker_p_->idToDet((*hit)->geographicalId())->surface().toGlobal((*hit)->localPosition());
792  double z = position.z();
793  double phi = unwrapPhi(position.phi() - superclusterIn->position().phi()); // phi is relative to supercluster
794  // double r=sqrt(position.x()*position.x()+position.y()*position.y()) ;
795 
796  // The expected r position of this hit, according to the z(r) fit
797  double rFit = (z - scz)/zVsRSlope + scr;
798 
799  // I don't know the r widths of the endcap strips, otherwise I
800  // would apply a cut on r similar to the rphi z cut
801 
802  // Cut a narrow band around the supercluster's projection in phi,
803  // and be sure the hit isn't in a reflected band (extrapolation of large z differences into negative r)
804  if (rFit > 0. &&
805  unwrapPhi((rFit-scr)*phiVsRSlope - phiBandWidth_) < phi && phi < unwrapPhi((rFit-scr)*phiVsRSlope + phiBandWidth_)) {
806 
807  // Use this hit to fit phi(r)
808  uselist.push_back(true);
809  rlist.push_back(rFit);
810  philist.push_back(phi);
811  w2list.push_back(1./(0.05/rFit)/(0.05/rFit)); // weight**2 == 1./uncertainty**2
812  typelist.push_back(2);
813  hitlist.push_back(*hit);
814 
815  } // end cut on phi band
816  } // end assign disjoint sets of hits to electrons
817  } // end loop over endcap zphi hits
818 
819  LogDebug("") << " There are " << uselist.size() << " good stereo+rphi+zphi hits " ;
821 
822  std::ostringstream debugstr5;
823  debugstr5 << " List of hits before uniqification " << " \n" ;
824  for (unsigned int i = 0; i < uselist.size(); i++) {
825  if ( uselist[i] ) {
826  const SiStripRecHit2D* hit = hitlist[i];
827  debugstr5 << " DetID " << ((hit)->geographicalId()).rawId()
828  << " R " << rlist[i]
829  << " Phi " << philist[i]
830  << " Weight " << w2list[i]
831  << " PhiPred " << (rlist[i]-scr)*phiVsRSlope
832  << " Chi2 " << (philist[i]-(rlist[i]-scr)*phiVsRSlope)*(philist[i]-(rlist[i]-scr)*phiVsRSlope)*w2list[i]
833  << " \n" ;
834  }
835  }
836  debugstr5 << " \n\n\n" ;
837 
838  debugstr5 << " Counting number of unique detectors " << " \n" ;
839 
840  debugstr5 << " These are all the detectors with hits " << " \n";
841  // Loop over hits, and find the best hit for each SiDetUnit - keep only those
842  // get a list of DetIds in uselist
843  std::vector<uint32_t> detIdList ;
844 
845  for (unsigned int i = 0; i < uselist.size(); i++) {
846  if (uselist[i]) {
847  const SiStripRecHit2D* hit = hitlist[i];
848  uint32_t detIDUsed = ((hit)->geographicalId()).rawId() ;
849  debugstr5<< " DetId " << detIDUsed << "\n";
850  detIdList.push_back(detIDUsed) ;
851  }
852  }
853  debugstr5 << " There are " << detIdList.size() << " hits on detectors \n";
854  // now sort and then uniq this list of detId
855  std::sort(detIdList.begin(), detIdList.end());
856  detIdList.erase(
857  std::unique(detIdList.begin(), detIdList.end()), detIdList.end());
858 
859  debugstr5 << " There are " << detIdList.size() << " unique detectors \n";
860 
861  //now we have a list of unique detectors used
862 
863 
864 
865  debugstr5 << " Looping over detectors to choose best hit " << " \n";
866  // Loop over detectors ID and hits to create list of hits on same DetId
867  for (unsigned int idet = 0 ; idet < detIdList.size() ; idet++ ) {
868  for (unsigned int i = 0; i+1 < uselist.size(); i++) {
869  if (uselist[i]) {
870  // Get Chi2 of this hit relative to predicted hit
871  const SiStripRecHit2D* hit1 = hitlist[i];
872  double r_hit1 = rlist[i];
873  double phi_hit1 = philist[i];
874  double w2_hit1 = w2list[i] ;
875  double phi_pred1 = (r_hit1-scr)*phiVsRSlope ;
876  double chi1 = (phi_hit1-phi_pred1)*(phi_hit1-phi_pred1)*w2_hit1;
877  if(detIdList[idet]== ((hit1)->geographicalId()).rawId()) {
878  for (unsigned int j = i+1; j < uselist.size(); j++) {
879  if (uselist[j]) {
880  const SiStripRecHit2D* hit2 = hitlist[j];
881  if(detIdList[idet]== ((hit2)->geographicalId()).rawId()) {
882  debugstr5 << " Found 2 hits on same Si Detector "
883  << ((hit2)->geographicalId()).rawId() << "\n";
884  // Get Chi2 of this hit relative to predicted hit
885  double r_hit2 = rlist[j];
886  double phi_hit2 = philist[j];
887  double w2_hit2 = w2list[j] ;
888  double phi_pred2 = (r_hit2-scr)*phiVsRSlope ;
889  double chi2 = (phi_hit2-phi_pred2)*(phi_hit2-phi_pred2)*w2_hit2;
890  debugstr5 << " Chi1 " << chi1 << " Chi2 " << chi2 <<"\n";
891  if( chi1< chi2 ){
892  uselist[j] = 0;
893  }else{
894  uselist[i] = 0;
895  }
896 
897  } // end of Det check
898  } // end of j- usehit check
899  } // end of j hit list loop
900 
901  } // end of detector check
902  } // end of uselist check
903  } // end of i-hit list loop
904 
905 
906  } // end of DetId loop
907 
908 
909 
910  // now let's through out hits with a predicted chi > chi2HitMax
911  for ( unsigned int i = 0; i < uselist.size(); i++ ) {
912  if ( uselist[i] ) {
913  const SiStripRecHit2D* hit = hitlist[i];
914  double localchi2 = (philist[i]-(rlist[i]-scr)*phiVsRSlope)*(philist[i]-(rlist[i]-scr)*phiVsRSlope)*w2list[i] ;
915  if(localchi2 > chi2HitMax ) {
916  debugstr5 << " Throwing out "
917  <<" DetID " << ((hit)->geographicalId()).rawId()
918  << " R " << rlist[i]
919  << " Phi " << philist[i]
920  << " Weight " << w2list[i]
921  << " PhiPred " << (rlist[i]-scr)*phiVsRSlope
922  << " Chi2 " << (philist[i]-(rlist[i]-scr)*phiVsRSlope)*(philist[i]-(rlist[i]-scr)*phiVsRSlope)*w2list[i]
923  << " \n" ;
924  uselist[i]=0 ;
925  }
926  }
927  }
928 
929  debugstr5 << " List of hits after uniqification " << " \n" ;
930  for (unsigned int i = 0; i < uselist.size(); i++) {
931  if ( uselist[i] ) {
932  const SiStripRecHit2D* hit = hitlist[i];
933  debugstr5 << " DetID " << ((hit)->geographicalId()).rawId()
934  << " R " << rlist[i]
935  << " Phi " << philist[i]
936  << " Weight " << w2list[i]
937  << " PhiPred " << (rlist[i]-scr)*phiVsRSlope
938  << " Chi2 " << (philist[i]-(rlist[i]-scr)*phiVsRSlope)*(philist[i]-(rlist[i]-scr)*phiVsRSlope)*w2list[i]
939  << " \n" ;
940  }
941  }
942  debugstr5 << " \n\n\n" ;
943 
944 
945  // need to check that there are more than 2 hits left here!
946  unsigned int nHitsLeft =0;
947  for (unsigned int i = 0; i < uselist.size(); i++) {
948  if ( uselist[i] ) {
949  nHitsLeft++;
950  }
951  }
952  if(nHitsLeft < nHitsLeftMinimum ) {
953  debugstr5 << " Too few hits "<< nHitsLeft
954  << " left - return false " << " \n";
955  return false ;
956  }
957  LogDebug("") << debugstr5.str();
958 
960 
961  // Calculate a linear phi(r) fit and drop hits until the biggest contributor to chi^2 is less than maxNormResid_
962  bool done = false;
963  double intercept = 0 ;
964  double slope = 0 ;
965  double chi2 = 0;
966 
967  std::ostringstream debugstr4;
968  debugstr4 <<" Calc of phi(r) "<<" \n";
969 
970  while (!done) {
971  // Use an iterative update of <psi>, <r> etc instead in an
972  // attempt to minize divisions of large numbers
973  // The linear fit psi = slope*r + intercept
974  // slope is (<psi*r>-<psi>*<r>) / (<r^2>-<r>^2>)
975  // intercept is <psi> - slope*<r>
976 
977  double phiBar = 0.;
978  double phiBarOld = 0.;
979  double rBar = 0.;
980  double rBarOld = 0.;
981  double r2Bar = 0.;
982  double r2BarOld = 0.;
983  double phirBar = 0.;
984  double phirBarOld = 0.;
985  double totalWeight = 0.;
986  double totalWeightOld = 0.;
987  unsigned int uselist_size = uselist.size();
988  for (unsigned int i = 0; i < uselist_size; i++) {
989  if (uselist[i]) {
990  double r = rlist[i];
991  double phi = philist[i];
992  double weight2 = w2list[i];
993 
994  totalWeight = totalWeightOld + weight2 ;
995 
996  //weight2 is 1/sigma^2. Typically sigma is 100micron pitch
997  // over root(12) = 30 microns so weight2 is about 10^5-10^6
998 
999  double totalWeightRatio = totalWeightOld/totalWeight ;
1000  double localWeightRatio = weight2/totalWeight ;
1001 
1002  phiBar = phiBarOld*totalWeightRatio + phi*localWeightRatio ;
1003  rBar = rBarOld*totalWeightRatio + r*localWeightRatio ;
1004  r2Bar= r2BarOld*totalWeightRatio + r*r*localWeightRatio ;
1005  phirBar = phirBarOld*totalWeightRatio + phi*r*localWeightRatio ;
1006 
1007  totalWeightOld = totalWeight ;
1008  phiBarOld = phiBar ;
1009  rBarOld = rBar ;
1010  r2BarOld = r2Bar ;
1011  phirBarOld = phirBar ;
1012 
1013  debugstr4 << " totalWeight " << totalWeight
1014  << " totalWeightRatio " << totalWeightRatio
1015  << " localWeightRatio "<< localWeightRatio
1016  << " phiBar " << phiBar
1017  << " rBar " << rBar
1018  << " r2Bar " << r2Bar
1019  << " phirBar " << phirBar
1020  << " \n ";
1021 
1022 
1023  } // end of use hit loop
1024  } // end of hit loop to calculate a linear fit
1025  slope = (phirBar-phiBar*rBar)/(r2Bar-rBar*rBar);
1026  intercept = phiBar-slope*rBar ;
1027 
1028  debugstr4 << " end of loop slope " << slope
1029  << " intercept " << intercept << " \n";
1030 
1031  // Calculate chi^2
1032  chi2 = 0.;
1033  double biggest_normresid = -1.;
1034  unsigned int biggest_index = 0;
1035  for (unsigned int i = 0; i < uselist_size; i++) {
1036  if (uselist[i]) {
1037  double r = rlist[i];
1038  double phi = philist[i];
1039  double weight2 = w2list[i];
1040 
1041  double normresid = weight2 * (phi - intercept - slope*r)*(phi - intercept - slope*r);
1042  chi2 += normresid;
1043 
1044  if (normresid > biggest_normresid) {
1045  biggest_normresid = normresid;
1046  biggest_index = i;
1047  }
1048  }
1049  } // end loop over hits to calculate chi^2 and find its biggest contributer
1050 
1051  if (biggest_normresid > maxNormResid_) {
1052  debugstr4 << "Dropping hit from fit due to Chi2 " << " \n" ;
1053  const SiStripRecHit2D* hit = hitlist[biggest_index];
1054  debugstr4 << " DetID " << ((hit)->geographicalId()).rawId()
1055  << " R " << rlist[biggest_index]
1056  << " Phi " << philist[biggest_index]
1057  << " Weight " << w2list[biggest_index]
1058  << " PhiPred " << (rlist[biggest_index]-scr)*phiVsRSlope
1059  << " Chi2 " << (philist[biggest_index]-(rlist[biggest_index]-scr)*phiVsRSlope)*(philist[biggest_index]-(rlist[biggest_index]-scr)*phiVsRSlope)*w2list[biggest_index]
1060  << " normresid " << biggest_normresid
1061  << " \n\n";
1062  uselist[biggest_index] = false;
1063  }
1064  else {
1065  done = true;
1066  }
1067  } // end loop over trial fits
1068 
1069  debugstr4 <<" Fit "
1070  << " Intercept " << intercept
1071  << " slope " << slope
1072  << " chi2 " << chi2
1073  << " \n" ;
1074 
1075  LogDebug("") << debugstr4.str() ;
1076 
1077 
1078  // Now we have intercept, slope, and chi2; uselist to tell us which hits are used, and hitlist for the hits
1079 
1080  // Identify the innermost hit
1081  const SiStripRecHit2D* innerhit = (SiStripRecHit2D*)(0);
1082  double innerhitRadius = -1.; // meaningless until innerhit is defined
1083 
1084  // Copy hits into an OwnVector, which we put in the TrackCandidate
1085  std::vector<const TrackingRecHit*> outputHits;
1086  // Reference rphi and stereo hits into RefVectors, which we put in the SiStripElectron
1087  std::vector<SiStripRecHit2D> outputRphiHits;
1088  std::vector<SiStripRecHit2D> outputStereoHits;
1089 
1090  typedef edm::Ref<SiStripRecHit2DCollection,SiStripRecHit2D> SiStripRecHit2DRef;
1091 
1092 
1093  for (unsigned int i = 0; i < uselist.size(); i++) {
1094  if (uselist[i]) {
1095  double r = rlist[i];
1096  const SiStripRecHit2D* hit = hitlist[i];
1097 
1098  // Keep track of the innermost hit
1099  if (innerhit == (SiStripRecHit2D*)(0) || r < innerhitRadius) {
1100  innerhit = hit;
1101  innerhitRadius = r;
1102  }
1103 
1104  if (typelist[i] == 0) {
1105  numberOfStereoHits++;
1106 
1107  // Copy this hit for the TrajectorySeed
1108  outputHits.push_back(hit);
1109  outputStereoHits.push_back(*hit);
1110  }
1111  else if (typelist[i] == 1) {
1112  numberOfBarrelRphiHits++;
1113 
1114  // Copy this hit for the TrajectorySeed
1115  outputHits.push_back(hit);
1116  outputRphiHits.push_back(*hit);
1117  }
1118  else if (typelist[i] == 2) {
1119  numberOfEndcapZphiHits++;
1120 
1121  // Copy this hit for the TrajectorySeed
1122  outputHits.push_back(hit);
1123  outputRphiHits.push_back(*hit);
1124  }
1125  }
1126  } // end loop over all hits, after having culled the ones with big residuals
1127 
1128  unsigned int totalNumberOfHits = numberOfStereoHits + numberOfBarrelRphiHits + numberOfEndcapZphiHits;
1129  double reducedChi2 = (totalNumberOfHits > 2 ? chi2 / (totalNumberOfHits - 2) : 1e10);
1130 
1131  // Select this candidate if it passes minHits_ and maxReducedChi2_ cuts
1132  if (totalNumberOfHits >= minHits_ && reducedChi2 <= maxReducedChi2_) {
1133  // GlobalTrajectoryParameters evaluated at the position of the innerhit
1134  GlobalPoint position = tracker_p_->idToDet(innerhit->geographicalId())->surface().toGlobal(innerhit->localPosition());
1135 
1136  // Use our phi(r) linear fit to correct pT (pT is inversely proportional to slope)
1137  // (By applying a correction instead of going back to first
1138  // principles, any correction to the phiVsRSlope definition
1139  // above will be automatically propagated here.)
1140  double correct_pT = pT * phiVsRSlope / slope;
1141 
1142  // Our phi(r) linear fit returns phi relative to the supercluster phi for a given radius
1143  double phi = intercept + slope*sqrt(position.x()*position.x() + position.y()*position.y()) + superclusterIn->position().phi();
1144 
1145  // Our z(r) linear fit gives us a better measurement of eta/dip angle
1146  double pZ = correct_pT * zVsRSlope;
1147 
1148  // Now we can construct a trajectory momentum out of linear fits to hits
1149  GlobalVector momentum = GlobalVector(correct_pT*cos(phi), correct_pT*sin(phi), pZ);
1150 
1151  if (chargeHypothesis > 0.) {
1152  redchi2_pos_ = chi2 / double(totalNumberOfHits - 2);
1154  momentum_pos_ = momentum;
1155  innerhit_pos_ = innerhit;
1156  outputHits_pos_ = outputHits;
1157  outputRphiHits_pos_ = outputRphiHits;
1158  outputStereoHits_pos_ = outputStereoHits;
1159  phiVsRSlope_pos_ = phiVsRSlope;
1160  slope_pos_ = slope;
1161  intercept_pos_ = intercept;
1162  chi2_pos_ = chi2;
1163  ndof_pos_ = totalNumberOfHits - 2;
1164  correct_pT_pos_ = correct_pT;
1165  pZ_pos_ = pZ;
1166  zVsRSlope_pos_ = zVsRSlope;
1167  numberOfStereoHits_pos_ = numberOfStereoHits;
1168  numberOfBarrelRphiHits_pos_ = numberOfBarrelRphiHits;
1169  numberOfEndcapZphiHits_pos_ = numberOfEndcapZphiHits;
1170  }
1171  else {
1172  redchi2_neg_ = chi2 / double(totalNumberOfHits - 2);
1174  momentum_neg_ = momentum;
1175  innerhit_neg_ = innerhit;
1176  outputHits_neg_ = outputHits;
1177  outputRphiHits_neg_ = outputRphiHits;
1178  outputStereoHits_neg_ = outputStereoHits;
1179  phiVsRSlope_neg_ = phiVsRSlope;
1180  slope_neg_ = slope;
1181  intercept_neg_ = intercept;
1182  chi2_neg_ = chi2;
1183  ndof_neg_ = totalNumberOfHits - 2;
1184  correct_pT_neg_ = correct_pT;
1185  pZ_neg_ = pZ;
1186  zVsRSlope_neg_ = zVsRSlope;
1187  numberOfStereoHits_neg_ = numberOfStereoHits;
1188  numberOfBarrelRphiHits_neg_ = numberOfBarrelRphiHits;
1189  numberOfEndcapZphiHits_neg_ = numberOfEndcapZphiHits;
1190  }
1191 
1192  LogDebug("") << " return from projectFindBand with True \n" << std::endl ;
1193  return true;
1194  } // end if this is a good electron candidate
1195 
1196  // Signal for a failed electron candidate
1197  LogDebug("") << " return from projectFindBand with False \n" << std::endl ;
1198  return false;
1199 }
#define LogDebug(id)
type
Definition: HCALResponse.h:22
int i
Definition: DBlmapReader.cc:9
std::vector< const TrackingRecHit * > outputHits_pos_
std::vector< SiStripRecHit2D > outputRphiHits_pos_
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.
Definition: GeomDet.h:49
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:63
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T y() const
Definition: PV3DBase.h:57
#define abs(x)
Definition: mlp_lapack.h:159
const SiStripRecHit2D * innerhit_pos_
double double double z
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
virtual LocalPoint localPosition() const
std::vector< SiStripRecHit2D > outputStereoHits_pos_
std::map< const TrackingRecHit *, bool > matchedHitUsed_
T sqrt(T t)
Definition: SSEVec.h:28
T z() const
Definition: PV3DBase.h:58
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
int j
Definition: DBlmapReader.cc:9
double unwrapPhi(double phi) const
virtual const GeomDet * idToDet(DetId) const
std::vector< SiStripRecHit2D > outputRphiHits_neg_
unsigned int numberOfStereoHits_pos_
unsigned int numberOfBarrelRphiHits_pos_
void coarseHitSelection(std::vector< const SiStripRecHit2D * > &hitPointersOut, bool stereo, bool endcap)
std::vector< SiStripRecHit2D > outputStereoHits_neg_
const TrackerGeometry * tracker_p_
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::map< const TrackingRecHit *, bool > hitUsed_
void coarseMatchedHitSelection(std::vector< const SiStripMatchedRecHit2D * > &coarseMatchedHitPointersOut)
const MagneticField * magneticField_p_
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:56
unsigned int numberOfEndcapZphiHits_pos_
Global3DVector GlobalVector
Definition: GlobalVector.h:10
std::vector< const TrackingRecHit * > outputHits_neg_
Definition: DDAxes.h:10
double SiStripElectronAlgo::unwrapPhi ( double  phi) const
inlineprivate

Definition at line 110 of file SiStripElectronAlgo.h.

References M_PI, and phi.

Referenced by projectPhiBand().

110  {
111  while (phi > M_PI) { phi -= 2.*M_PI; }
112  while (phi < -M_PI) { phi += 2.*M_PI; }
113  return phi;
114  }
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10

Member Data Documentation

double SiStripElectronAlgo::chi2_neg_
private

Definition at line 178 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::chi2_pos_
private

Definition at line 158 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::correct_pT_neg_
private

Definition at line 180 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::correct_pT_pos_
private

Definition at line 160 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

std::map<const TrackingRecHit*, bool> SiStripElectronAlgo::hitUsed_
private

Definition at line 142 of file SiStripElectronAlgo.h.

Referenced by findElectron(), prepareEvent(), and projectPhiBand().

const SiStripRecHit2D* SiStripElectronAlgo::innerhit_neg_
private

Definition at line 171 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

const SiStripRecHit2D* SiStripElectronAlgo::innerhit_pos_
private

Definition at line 149 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::intercept_neg_
private

Definition at line 177 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::intercept_pos_
private

Definition at line 157 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

const MagneticField* SiStripElectronAlgo::magneticField_p_
private

Definition at line 131 of file SiStripElectronAlgo.h.

Referenced by findElectron(), prepareEvent(), and projectPhiBand().

const edm::Handle<SiStripMatchedRecHit2DCollection>* SiStripElectronAlgo::matchedHits_hp_
private

Definition at line 135 of file SiStripElectronAlgo.h.

const SiStripMatchedRecHit2DCollection* SiStripElectronAlgo::matchedHits_p_
private

Definition at line 130 of file SiStripElectronAlgo.h.

Referenced by coarseMatchedHitSelection(), and prepareEvent().

std::map<const TrackingRecHit*, bool> SiStripElectronAlgo::matchedHitUsed_
private

Definition at line 143 of file SiStripElectronAlgo.h.

Referenced by prepareEvent(), and projectPhiBand().

std::map<const SiStripMatchedRecHit2D*, unsigned int> SiStripElectronAlgo::matchedKey_
private

Definition at line 140 of file SiStripElectronAlgo.h.

Referenced by prepareEvent().

unsigned int SiStripElectronAlgo::maxHitsOnDetId_
private

Definition at line 119 of file SiStripElectronAlgo.h.

Referenced by coarseHitSelection(), and coarseMatchedHitSelection().

double SiStripElectronAlgo::maxNormResid_
private

Definition at line 122 of file SiStripElectronAlgo.h.

Referenced by projectPhiBand().

double SiStripElectronAlgo::maxReducedChi2_
private

Definition at line 124 of file SiStripElectronAlgo.h.

Referenced by projectPhiBand().

unsigned int SiStripElectronAlgo::minHits_
private

Definition at line 123 of file SiStripElectronAlgo.h.

Referenced by projectPhiBand().

GlobalVector SiStripElectronAlgo::momentum_neg_
private

Definition at line 170 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

GlobalVector SiStripElectronAlgo::momentum_pos_
private

Definition at line 148 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

int SiStripElectronAlgo::ndof_neg_
private

Definition at line 179 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

int SiStripElectronAlgo::ndof_pos_
private

Definition at line 159 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

unsigned SiStripElectronAlgo::numberOfBarrelRphiHits_neg_
private

Definition at line 184 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

unsigned int SiStripElectronAlgo::numberOfBarrelRphiHits_pos_
private

Definition at line 165 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

unsigned SiStripElectronAlgo::numberOfEndcapZphiHits_neg_
private

Definition at line 185 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

unsigned int SiStripElectronAlgo::numberOfEndcapZphiHits_pos_
private

Definition at line 166 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

unsigned int SiStripElectronAlgo::numberOfMatchedHits_pos_
private

Definition at line 163 of file SiStripElectronAlgo.h.

unsigned SiStripElectronAlgo::numberOfStereoHits_neg_
private

Definition at line 183 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

unsigned int SiStripElectronAlgo::numberOfStereoHits_pos_
private

Definition at line 164 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::originUncertainty_
private

Definition at line 120 of file SiStripElectronAlgo.h.

Referenced by projectPhiBand().

std::vector<const TrackingRecHit*> SiStripElectronAlgo::outputHits_neg_
private

Definition at line 172 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

std::vector<const TrackingRecHit*> SiStripElectronAlgo::outputHits_pos_
private

Definition at line 150 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

std::vector<SiStripRecHit2D> SiStripElectronAlgo::outputMatchedHits_neg_
private

Definition at line 153 of file SiStripElectronAlgo.h.

std::vector<SiStripRecHit2D> SiStripElectronAlgo::outputRphiHits_neg_
private

Definition at line 173 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

std::vector<SiStripRecHit2D> SiStripElectronAlgo::outputRphiHits_pos_
private

Definition at line 151 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

std::vector<SiStripRecHit2D> SiStripElectronAlgo::outputStereoHits_neg_
private

Definition at line 174 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

std::vector<SiStripRecHit2D> SiStripElectronAlgo::outputStereoHits_pos_
private

Definition at line 152 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::phiBandWidth_
private

Definition at line 121 of file SiStripElectronAlgo.h.

Referenced by projectPhiBand().

double SiStripElectronAlgo::phiVsRSlope_neg_
private

Definition at line 175 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::phiVsRSlope_pos_
private

Definition at line 155 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

GlobalPoint SiStripElectronAlgo::position_neg_
private

Definition at line 169 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

GlobalPoint SiStripElectronAlgo::position_pos_
private

Definition at line 147 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::pZ_neg_
private

Definition at line 181 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::pZ_pos_
private

Definition at line 161 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::redchi2_neg_
private

Definition at line 168 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::redchi2_pos_
private

Definition at line 146 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

const edm::Handle<SiStripRecHit2DCollection>* SiStripElectronAlgo::rphiHits_hp_
private

Definition at line 133 of file SiStripElectronAlgo.h.

Referenced by prepareEvent().

const SiStripRecHit2DCollection* SiStripElectronAlgo::rphiHits_p_
private

Definition at line 128 of file SiStripElectronAlgo.h.

Referenced by coarseHitSelection(), and prepareEvent().

std::map<const SiStripRecHit2D*, unsigned int> SiStripElectronAlgo::rphiKey_
private

Definition at line 138 of file SiStripElectronAlgo.h.

Referenced by prepareEvent().

double SiStripElectronAlgo::slope_neg_
private

Definition at line 176 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::slope_pos_
private

Definition at line 156 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

const edm::Handle<SiStripRecHit2DCollection>* SiStripElectronAlgo::stereoHits_hp_
private

Definition at line 134 of file SiStripElectronAlgo.h.

Referenced by prepareEvent().

const SiStripRecHit2DCollection* SiStripElectronAlgo::stereoHits_p_
private

Definition at line 129 of file SiStripElectronAlgo.h.

Referenced by coarseHitSelection(), and prepareEvent().

std::map<const SiStripRecHit2D*, unsigned int> SiStripElectronAlgo::stereoKey_
private

Definition at line 139 of file SiStripElectronAlgo.h.

Referenced by prepareEvent().

const TrackerGeometry* SiStripElectronAlgo::tracker_p_
private
double SiStripElectronAlgo::zVsRSlope_neg_
private

Definition at line 182 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().

double SiStripElectronAlgo::zVsRSlope_pos_
private

Definition at line 162 of file SiStripElectronAlgo.h.

Referenced by findElectron(), and projectPhiBand().